@convivainc/conviva-js-appanalytics
Version:
Conviva ECO Sensor library
360 lines • 183 kB
JavaScript
/*!
* Browser tracker for Conviva v1.3.2 (http://bit.ly/sp-js)
* Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang
* Licensed under BSD-3-Clause
*/
'use strict';!function(ya,la){"object"==typeof exports&&"undefined"!=typeof module?la(exports):"function"==typeof define&&define.amd?define(["exports"],la):la((ya="undefined"!=typeof globalThis?globalThis:ya||self).convivaBrowserTracking={})}(this,function(ya){function la(a){return la="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(c){return typeof c}:function(c){return c&&"function"==typeof Symbol&&c.constructor===Symbol&&c!==Symbol.prototype?"symbol":typeof c},la(a)}function Gg(a,
c,b,d){return new (b||(b=Promise))(function(e,g){function f(m){try{l(d.next(m))}catch(q){g(q)}}function h(m){try{l(d.throw(m))}catch(q){g(q)}}function l(m){var q;m.done?e(m.value):(q=m.value,q instanceof b?q:new b(function(p){p(q)})).then(f,h)}l((d=d.apply(a,c||[])).next())})}function Hg(a,c){function b(l){return function(m){return function(q){if(d)throw new TypeError("Generator is already executing.");for(;h&&(h=0,q[0]&&(f=0)),f;)try{if(d=1,e&&(g=2&q[0]?e.return:q[0]?e.throw||((g=e.return)&&g.call(e),
0):e.next)&&!(g=g.call(e,q[1])).done)return g;switch(e=0,g&&(q=[2&q[0],g.value]),q[0]){case 0:case 1:g=q;break;case 4:return f.label++,{value:q[1],done:!1};case 5:f.label++;e=q[1];q=[0];continue;case 7:q=f.ops.pop();f.trys.pop();continue;default:if(!(g=f.trys,(g=0<g.length&&g[g.length-1])||6!==q[0]&&2!==q[0])){f=0;continue}if(3===q[0]&&(!g||q[1]>g[0]&&q[1]<g[3]))f.label=q[1];else if(6===q[0]&&f.label<g[1])f.label=g[1],g=q;else if(g&&f.label<g[2])f.label=g[2],f.ops.push(q);else{g[2]&&f.ops.pop();f.trys.pop();
continue}}q=c.call(a,f)}catch(p){q=[6,p],e=0}finally{d=g=0}if(5&q[0])throw q[1];return{value:q[0]?q[1]:void 0,done:!0}}([l,m])}}var d,e,g,f={label:0,sent:function(){if(1&g[0])throw g[1];return g[1]},trys:[],ops:[]},h=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return h.next=b(0),h.throw=b(1),h.return=b(2),"function"==typeof Symbol&&(h[Symbol.iterator]=function(){return this}),h}function Ea(a,c,b){if(b||2===arguments.length)for(var d,e=0,g=c.length;e<g;e++)!d&&e in c||(d||
(d=Array.prototype.slice.call(c,0,e)),d[e]=c[e]);return a.concat(d||Array.prototype.slice.call(c))}function Ig(a){if(!a)return a;switch(4-a.length%4){case 2:a+="==";break;case 3:a+="="}return function(c){var b,d,e,g=0,f=0,h="",l=[];if(!c)return c;c+="";do{var m=(b=Ya.indexOf(c.charAt(g++))<<18|Ya.indexOf(c.charAt(g++))<<12|(d=Ya.indexOf(c.charAt(g++)))<<6|(e=Ya.indexOf(c.charAt(g++))))>>16&255;var q=b>>8&255;b&=255;l[f++]=64===d?String.fromCharCode(m):64===e?String.fromCharCode(m,q):String.fromCharCode(m,
q,b)}while(g<c.length);return h=l.join(""),function(p){return decodeURIComponent(p.split("").map(function(n){return"%"+("00"+n.charCodeAt(0).toString(16)).slice(-2)}).join(""))}(h.replace(/\0+$/,""))}(a.replace(/-/g,"+").replace(/_/g,"/"))}function xd(){var a,c={},b=[],d=[],e=[],g=function(f,h){null!=h&&""!==h&&(c[f]=h)};return{add:g,addDict:function(f){for(var h in f)Object.prototype.hasOwnProperty.call(f,h)&&g(h,f[h])},addJson:function(f,h,l){l&&Ie(l)&&(f={keyIfEncoded:f,keyIfNotEncoded:h,json:l},
d.push(f),b.push(f))},addContextEntity:function(f){e.push(f)},getPayload:function(){return c},getJson:function(){return b},withJsonProcessor:function(f){a=f},build:function(){return null==a||a(this,d,e),c}}}function Jg(a){return function(c,b,d){for(var e=function(m,q,p){m=JSON.stringify(m);if(a){p=c.add;if(m){var n,y=0,E=0,x=[];if(m){m=unescape(encodeURIComponent(m));do{var z=(n=m.charCodeAt(y++)<<16|m.charCodeAt(y++)<<8|m.charCodeAt(y++))>>18&63;var w=n>>12&63;var u=n>>6&63;n&=63;x[E++]=Ya.charAt(z)+
Ya.charAt(w)+Ya.charAt(u)+Ya.charAt(n)}while(y<m.length);z=x.join("");m=m.length%3;m=(m?z.slice(0,m-3):z)+"===".slice(m||3)}m=m.replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}p.call(c,q,m)}else c.add(p,m)},g=function(m,q){m||(m=c.getPayload(),m=(a?m.cx:m.co)?JSON.parse(a?Ig(m.cx):m.co):void 0);return m?m.dt=m.dt.concat(q.dt):m=q,m},f=void 0,h=0;h<b.length;h++){var l=b[h];"cx"===l.keyIfEncoded?f=g(f,l.json):e(l.json,l.keyIfEncoded,l.keyIfNotEncoded)}(b.length=0,d.length)&&(f=g(f,{sc:"sp/ctx/1-0-0",
dt:Ea([],d,!0)}),d.length=0);f&&e(f,"cx","co")}}function Ie(a){if(!Je(a))return!1;for(var c in a)if(Object.prototype.hasOwnProperty.call(a,c))return!0;return!1}function Je(a){return null!=a&&(a.constructor==={}.constructor||a.constructor===[].constructor)}function Kg(){var a=[],c=[],b=function(d){var e=function(l){var m=0;for(l=l.getJson();m<l.length;m++){var q=l[m];if("ue_px"===q.keyIfEncoded&&"object"===la(q.json.data)&&(q=q.json.data.schema,"string"==typeof q))return q}return""}(d),g=function(l){l=
l.getPayload().e;return"string"==typeof l?l:""}(d),f=[],h=yd(a,d,g,e);f.push.apply(f,h);d=function(l,m,q,p){var n;l=Ke(l).map(function(y){if((y=function(E,x,z,w){if(Le(E)){var u=E[0],t=!1;try{t=u({event:x.getPayload(),eventType:z,eventSchema:w})}catch(F){t=!1}if(!0===t)return yd(E[1],x,z,w)}else if(Me(E)&&function(F,G){var Q=0,C=0,L=F.accept;Array.isArray(L)?F.accept.some(function(O){return Nc(O,G)})&&C++:"string"==typeof L&&Nc(L,G)&&C++;L=F.reject;Array.isArray(L)?F.reject.some(function(O){return Nc(O,
G)})&&Q++:"string"==typeof L&&Nc(L,G)&&Q++;return 0<C&&0===Q?!0:!1}(E[0],w))return yd(E[1],x,z,w);return[]}(y,m,q,p))&&0!==y.length)return y});return(n=[]).concat.apply(n,l.filter(function(y){return null!=y&&y.filter(Boolean)}))}(c,d,g,e);return f.push.apply(f,d),f};return{getGlobalPrimitives:function(){return a},getConditionalProviders:function(){return c},addGlobalContexts:function(d){for(var e=[],g=[],f=0;f<d.length;f++){var h=d[f];Ne(h)?e.push(h):Sb(h)&&g.push(h)}a=a.concat(g);c=c.concat(e)},
clearGlobalContexts:function(){c=[];a=[]},removeGlobalContexts:function(d){for(var e=function(f){Ne(f)?c=c.filter(function(h){return JSON.stringify(h)!==JSON.stringify(f)}):Sb(f)&&(a=a.filter(function(h){return JSON.stringify(h)!==JSON.stringify(f)}))},g=0;g<d.length;g++)e(d[g])},getApplicableContexts:function(d){return b(d)}}}function Oe(a){for(var c,b=[],d=1;d<arguments.length;d++)b[d-1]=arguments[d];return null!==(c=null==a?void 0:a.map(function(e){if("function"!=typeof e)return e;try{return e.apply(void 0,
b)}catch(g){}}).filter(Boolean))&&void 0!==c?c:[]}function Pe(a){a=a.split(".");return!!(a&&1<a.length)&&function(c){if("*"===c[0]||"*"===c[1])return!1;if(0<c.slice(2).length){var b=!1,d=0;for(c=c.slice(2);d<c.length;d++)if("*"===c[d])b=!0;else if(b)return!1;return!0}return 2==c.length}(a)}function Qe(a){a=/^iglu:((?:(?:[a-zA-Z0-9-_]+|\*).)+(?:[a-zA-Z0-9-_]+|\*))\/([a-zA-Z0-9-_.]+|\*)\/jsonschema\/([1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)-(0|[1-9][0-9]*|\*)$/.exec(a);if(null!==a&&Pe(a[1]))return a.slice(1,
6)}function zd(a){if(a=Qe(a)){var c=a[0];return 5===a.length&&Pe(c)}return!1}function Re(a){return function(c){return Array.isArray(c)&&c.every(function(b){return"string"==typeof b})}(a)?a.every(function(c){return zd(c)}):"string"==typeof a&&zd(a)}function fc(a){return!!(Ie(a)&&"sc"in a&&"dt"in a)&&"string"==typeof a.sc&&"object"===la(a.dt)}function Oc(a){return"function"==typeof a&&1>=a.length}function Sb(a){return Oc(a)||fc(a)}function Le(a){return!(!Array.isArray(a)||2!==a.length)&&(Array.isArray(a[1])?
Oc(a[0])&&a[1].every(Sb):Oc(a[0])&&Sb(a[1]))}function Me(a){return!(!Array.isArray(a)||2!==a.length)&&!!function(c){var b=0;if(null!=c&&"object"===la(c)&&!Array.isArray(c)){if(Object.prototype.hasOwnProperty.call(c,"accept")){if(!Re(c.accept))return!1;b+=1}if(Object.prototype.hasOwnProperty.call(c,"reject")){if(!Re(c.reject))return!1;b+=1}return 0<b&&2>=b}return!1}(a[0])&&(Array.isArray(a[1])?a[1].every(Sb):Sb(a[1]))}function Ne(a){return Le(a)||Me(a)}function Nc(a,c){if(!zd(a))return!1;a=Qe(a);c=
function(d){d=/^iglu:([a-zA-Z0-9-_.]+)\/([a-zA-Z0-9-_]+)\/jsonschema\/([1-9][0-9]*)-(0|[1-9][0-9]*)-(0|[1-9][0-9]*)$/.exec(d);if(null!==d)return d.slice(1,6)}(c);if(a&&c){if(!function(d,e){e=e.split(".");d=d.split(".");if(e&&d){if(e.length!==d.length)return!1;for(var g=0;g<d.length;g++)if(!Se(e[g],d[g]))return!1;return!0}return!1}(a[0],c[0]))return!1;for(var b=1;5>b;b++)if(!Se(a[b],c[b]))return!1;return!0}return!1}function Se(a,c){return a&&c&&"*"===a||a===c}function Ke(a){return Array.isArray(a)?
a:[a]}function yd(a,c,b,d){var e;a=Ke(a).map(function(g){a:if(fc(g))g=[g];else{if(Oc(g)){b:{var f=void 0;try{var h=(f=g({event:c.getPayload(),eventType:b,eventSchema:d}),Array.isArray(f)&&f.every(fc)||fc(f)?f:void 0);break b}catch(l){}h=void 0}if(fc(h)){g=[h];break a}if(Array.isArray(h)){g=h;break a}}g=void 0}if(g&&0!==g.length)return g});return(e=[]).concat.apply(e,a.filter(function(g){return null!=g&&g.filter(Boolean)}))}function Lg(a){void 0===a&&(a={});var c=a.base64,b=a.corePlugins,d=null!=b?
b:[];c=function(g,f,h){var l=function(n){return{addPluginContexts:function(y){var E=y?Ea([],y,!0):[];return n.forEach(function(x){try{x.contexts&&E.push.apply(E,x.contexts())}catch(z){ea.error("Error adding plugin contexts",z)}}),E}}}(f),m=Kg(),q=g,p={};return{track:function(n,y,E){n.withJsonProcessor(Jg(q));n.add("eid",sb.v4());n.addDict(p);E=function(z){return null==z?{type:"dtm",value:(new Date).getTime()}:"number"==typeof z?{type:"dtm",value:z}:"ttm"===z.type?{type:"ttm",value:z.value}:{type:"dtm",
value:z.value||(new Date).getTime()}}(E);n.add(E.type,E.value.toString());y=function(z){if(z&&z.length)return{sc:"sp/ctx/1-0-0",dt:z}}(function(z,w){z=m.getApplicableContexts(z);var u=[];return w&&w.length&&u.push.apply(u,w),z&&z.length&&u.push.apply(u,z),u}(n,l.addPluginContexts(y)));void 0!==y&&n.addJson("cx","co",y);f.forEach(function(z){try{z.beforeTrack&&z.beforeTrack(n)}catch(w){ea.error("Plugin beforeTrack",w)}});"function"==typeof h&&h(n);var x=n.build();return f.forEach(function(z){try{z.afterTrack&&
z.afterTrack(x)}catch(w){ea.error("Plugin afterTrack",w)}}),x},addPayloadPair:function(n,y){p[n]=y},configuration:a,getConfig:function(){return a},setConfig:function(n){n&&(void 0!==n.base64&&(a.base64=n.base64,q=n.base64),void 0!==n.lifecycleAutotracking&&(a.lifecycleAutotracking=n.lifecycleAutotracking),void 0!==n.cacheRefreshInterval&&(a.cacheRefreshInterval=n.cacheRefreshInterval),void 0!==n.exceptionAutotracking&&(a.exceptionAutotracking=n.exceptionAutotracking),void 0!==n.enablePeriodicHeartbeat&&
(a.enablePeriodicHeartbeat=n.enablePeriodicHeartbeat),void 0!==n.periodicHeartbeatInterval&&(a.periodicHeartbeatInterval=n.periodicHeartbeatInterval),void 0!==n.enc&&(a.enc=n.enc),void 0!==n.mend&&(a.mend=n.mend),void 0!==n.maxLocalStorageQueueSize&&(a.maxLocalStorageQueueSize=n.maxLocalStorageQueueSize),void 0!==n.maxGetBytes&&(a.maxGetBytes=n.maxGetBytes),void 0!==n.bufferSize&&(a.bufferSize=n.bufferSize),void 0!==n.customEventTrackingConfiguration&&(a.customEventTrackingConfiguration=n.customEventTrackingConfiguration),
void 0!==n.networkRequestTrackingConfiguration&&(a.networkRequestTrackingConfiguration=n.networkRequestTrackingConfiguration),void 0!==n.traceparentconfig&&(a.traceparentconfig=n.traceparentconfig),void 0!==n.metaTagsTrackingConfiguration&&(a.metaTagsTrackingConfiguration=n.metaTagsTrackingConfiguration),void 0!==n.evtStreamTrackingConfiguration&&(a.evtStreamTrackingConfiguration=n.evtStreamTrackingConfiguration),void 0!==n.performanceContextConfig&&(a.performanceContextConfig=n.performanceContextConfig),
void 0!==n.configurationVersion&&(a.configurationVersion=n.configurationVersion),void 0!==n.catRcLastUpdatedTs&&(a.catRcLastUpdatedTs=n.catRcLastUpdatedTs),void 0!==n.endpoint&&(a.endpoint=n.endpoint),void 0!==n.controlIngestConfig&&(a.controlIngestConfig=n.controlIngestConfig),void 0!==n.applicationContext&&(a.applicationContext=n.applicationContext),void 0!==n.emitterConfiguration&&(a.emitterConfiguration=n.emitterConfiguration),void 0!==n.di&&(a.di=n.di),void 0!==n.clickcc&&(a.clickcc=n.clickcc),
void 0!==n.collectionRateLimit&&(a.collectionRateLimit=n.collectionRateLimit),void 0!==n.pageUrlTrackingConfig?a.pageUrlTrackingConfig=n.pageUrlTrackingConfig:a.pageUrlTrackingConfig=null)},getBase64Encoding:function(){return q},setBase64Encoding:function(n){q=n},addPayloadDict:function(n){for(var y in n)Object.prototype.hasOwnProperty.call(n,y)&&(p[y]=n[y])},resetPayloadPairs:function(n){p=Je(n)?n:{}},setTrackerVersion:function(n){p.tv=n},setTrackerNamespace:function(n){p.tna=n},setAppId:function(n){p.aid=
n},setPlatform:function(n){p.p=n},setUserId:function(n){p.uid=n},setScreenResolution:function(n,y){p.res=n+"x"+y},setViewport:function(n,y){p.vp=n+"x"+y},setColorDepth:function(n){p.cd=n},setTimezone:function(n){p.tz=n},setLang:function(n){p.lang=n},setIpAddress:function(n){p.ip=n},setUseragent:function(n){p.ua=n},addGlobalContexts:function(n){m.addGlobalContexts(n)},clearGlobalContexts:function(){m.clearGlobalContexts()},removeGlobalContexts:function(n){m.removeGlobalContexts(n)}}}(null==c||c,d,
a.callback);var e=Z(Z({},c),{addPlugin:function(g){var f,h;g=g.plugin;d.push(g);null===(f=g.logger)||void 0===f||f.call(g,ea);null===(h=g.activateCorePlugin)||void 0===h||h.call(g,e)}});return null==d||d.forEach(function(g){var f,h;null===(f=g.logger)||void 0===f||f.call(g,ea);null===(h=g.activateCorePlugin)||void 0===h||h.call(g,e)}),e}function Eb(a){var c=a.event;a=c.sc;var b=c.dt;c=xd();a={sc:"sp/ue/1-0-0",dt:{sc:a,dt:b}};return c.add("e","ue"),c.addJson("ue_px","ue_pr",a),c}function gc(a){return Eb({event:{sc:"cv/re/1-0-1",
dt:Tb({name:a.name,data:a.data})}})}function Tb(a,c){void 0===c&&(c={});var b={},d;for(d in a)(c[d]||null!==a[d]&&void 0!==a[d])&&(b[d]=a[d]);return b}function Ub(a){for(var c=a.length;0<=--c;)a[c]=0}function Ad(a,c,b,d,e){this.static_tree=a;this.extra_bits=c;this.extra_base=b;this.elems=d;this.max_length=e;this.has_stree=a&&a.length}function Bd(a,c){this.dyn_tree=a;this.max_code=0;this.stat_desc=c}function db(a,c,b,d,e){this.good_length=a;this.max_lazy=c;this.nice_length=b;this.max_chain=d;this.func=
e}function Mg(){this.strm=null;this.status=0;this.pending_buf=null;this.wrap=this.pending=this.pending_out=this.pending_buf_size=0;this.gzhead=null;this.gzindex=0;this.method=Pc;this.last_flush=-1;this.w_mask=this.w_bits=this.w_size=0;this.window=null;this.window_size=0;this.head=this.prev=null;this.nice_match=this.good_match=this.strategy=this.level=this.max_lazy_match=this.max_chain_length=this.prev_length=this.lookahead=this.match_start=this.strstart=this.match_available=this.prev_match=this.match_length=
this.block_start=this.hash_shift=this.hash_mask=this.hash_bits=this.hash_size=this.ins_h=0;this.dyn_ltree=new Uint16Array(1146);this.dyn_dtree=new Uint16Array(122);this.bl_tree=new Uint16Array(78);tb(this.dyn_ltree);tb(this.dyn_dtree);tb(this.bl_tree);this.bl_desc=this.d_desc=this.l_desc=null;this.bl_count=new Uint16Array(16);this.heap=new Uint16Array(573);tb(this.heap);this.heap_max=this.heap_len=0;this.depth=new Uint16Array(573);tb(this.depth);this.bi_valid=this.bi_buf=this.insert=this.matches=
this.static_len=this.opt_len=this.sym_end=this.sym_next=this.lit_bufsize=this.sym_buf=0}function hc(a){a=this.options=Te({level:Ng,method:Og,chunkSize:16384,windowBits:15,memLevel:8,strategy:Pg},a||{});a.raw&&0<a.windowBits?a.windowBits=-a.windowBits:a.gzip&&0<a.windowBits&&16>a.windowBits&&(a.windowBits+=16);this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new Ue;this.strm.avail_out=0;var c=ic.deflateInit2(this.strm,a.level,a.method,a.windowBits,a.memLevel,a.strategy);if(c!==Qc)throw Error(Fb[c]);
if(a.header&&ic.deflateSetHeader(this.strm,a.header),a.dictionary){var b;if(b="string"==typeof a.dictionary?Cd(a.dictionary):"[object ArrayBuffer]"===Ve.call(a.dictionary)?new Uint8Array(a.dictionary):a.dictionary,(c=ic.deflateSetDictionary(this.strm,b))!==Qc)throw Error(Fb[c]);this._dict_set=!0}}function Dd(a,c){c=new hc(c);if(c.push(a,!0),c.err)throw c.msg||Fb[c.err];return c.result}function Qg(){this.strm=null;this.mode=0;this.last=!1;this.wrap=0;this.havedict=!1;this.total=this.check=this.dmax=
this.flags=0;this.head=null;this.wnext=this.whave=this.wsize=this.wbits=0;this.window=null;this.extra=this.offset=this.length=this.bits=this.hold=0;this.distcode=this.lencode=null;this.have=this.ndist=this.nlen=this.ncode=this.distbits=this.lenbits=0;this.next=null;this.lens=new Uint16Array(320);this.work=new Uint16Array(288);this.distdyn=this.lendyn=null;this.was=this.back=this.sane=0}function jc(a){var c=this.options=Te({chunkSize:65536,windowBits:15,to:""},a||{});c.raw&&0<=c.windowBits&&16>c.windowBits&&
(c.windowBits=-c.windowBits,0===c.windowBits&&(c.windowBits=-15));!(0<=c.windowBits&&16>c.windowBits)||a&&a.windowBits||(c.windowBits+=32);15<c.windowBits&&48>c.windowBits&&(15&c.windowBits||(c.windowBits|=15));this.err=0;this.msg="";this.ended=!1;this.chunks=[];this.strm=new Ue;this.strm.avail_out=0;a=jb.inflateInit2(this.strm,c.windowBits);if(a!==kc)throw Error(Fb[a]);if(this.header=new Rg,jb.inflateGetHeader(this.strm,this.header),c.dictionary&&("string"==typeof c.dictionary?c.dictionary=Cd(c.dictionary):
"[object ArrayBuffer]"===We.call(c.dictionary)&&(c.dictionary=new Uint8Array(c.dictionary)),c.raw&&(a=jb.inflateSetDictionary(this.strm,c.dictionary))!==kc))throw Error(Fb[a]);}function Ed(a,c){c=new jc(c);if(c.push(a),c.err)throw c.msg||Fb[c.err];return c.result}function Fd(a){return!(!a||"string"!=typeof a.valueOf())}function lc(a){return Number.isInteger&&Number.isInteger(a)||"number"==typeof a&&isFinite(a)&&Math.floor(a)===a}function Gd(a){if(!Fd(a)){a=a.text||"";var c=document.getElementsByTagName("title");
c&&null!=c[0]&&(a=c[0].text)}return a}function Rc(a){var c=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(a);return c?c[1]:a}function Xe(a){var c=a.length;return"."===a.charAt(--c)&&(a=a.slice(0,c)),"*."===a.slice(0,2)&&(a=a.slice(1)),a}function Hd(a){var c=window,b=mc("referrer",c.location.href)||mc("referer",c.location.href);if(b)return b;if(a)return a;try{if(c.top)return c.top.document.referrer;if(c.parent)return c.parent.document.referrer}catch(d){}return document.referrer}function ab(a,c,
b,d){return void 0!==a&&(a.addEventListener?(a.addEventListener(c,b,d),!0):a.attachEvent?a.attachEvent("on"+c,b):void(a["on"+c]=b))}function mc(a,c){return(a=(new RegExp("^[^#]*[?&]"+a+"=([^&#]*)")).exec(c))?decodeURIComponent(a[1].replace(/\+/g," ")):null}function Sc(a,c,b){void 0===b&&(b=63072E3);try{var d=window.localStorage,e=Date.now()+1E3*b;return d.setItem("".concat(a,".expires"),e.toString()),d.setItem(a,c),!0}catch(g){return!1}}function Ye(a){try{var c=window.localStorage;return c.removeItem(a),
c.removeItem(a+".expires"),!0}catch(b){return!1}}function nc(a,c,b,d){return kb(a,"",-1,"/",c,b,d)}function kb(a,c,b,d,e,g,f){return 1<arguments.length?document.cookie=a+"="+encodeURIComponent(null!=c?c:"")+(b?"; Expires="+(new Date(+new Date+1E3*b)).toUTCString():"")+(d?"; Path="+d:"")+(e?"; Domain="+e:"")+(g?"; SameSite="+g:"")+(f?"; Secure":""):decodeURIComponent((("; "+document.cookie).split("; "+a+"=")[1]||"").split(";")[0])}function Ze(a){try{var c=null===window||void 0===window?void 0:window.localStorage;
return!!c&&(c.removeItem(a),!0)}catch(b){return!1}}function Tc(){"undefined"!=typeof window&&void 0!==window.localStorage&&localStorage.removeItem(H.SAMPLING_STORAGE_RANDOM_NUMBER_KEY)}function Id(a,c){return void 0!==a.act&&void 0!==a.act[c]&&(a=a.act[c],void 0!==a)?a:H.DEFAULT_SAMPLING_ACTION[c]}function Ma(a,c){return a.length<=c?a:a.slice(0,c-3)+"..."}function $e(a,c,b,d){var e=[pa.request_body,pa.response_body,pa.request_headers,pa.response_headers,pa.request_query],g={};if(c&&0<c.length)for(var f=
0;f<c.length;f++){var h=c[f],l=h.conditions;var m=void 0;var q=["conditions"],p={};for(m in h)Object.prototype.hasOwnProperty.call(h,m)&&0>q.indexOf(m)&&(p[m]=h[m]);if(null!=h&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(m=Object.getOwnPropertySymbols(h);n<m.length;n++)0>q.indexOf(m[n])&&Object.prototype.propertyIsEnumerable.call(h,m[n])&&(p[m[n]]=h[m[n]])}m=p;try{a:{h=a;try{for(q=0;q<l.length;q++){var y=l[q];p=!1;if(0<Object.keys(y).length){n=0;for(var E=Object.entries(y);n<E.length;n++){var x=
E[n],z=x[1],w=h[x[0]];if(0<z.length){for(var u=0,t=0,F=z;t<F.length;t++){var G=F[t],Q="contains",C=G;if("object"===la(G)&&G.length?(Q=G[1],C=G[0]):"boolean"!=typeof G&&null!==G||(Q="equal",C=G),Sg(w,Q,C)){p=!0;break}if(p=!1,u+1===z.length)break;u++}if(!1===p)break}}}if(p){var L=!0;break a}}}catch(aa){console.warn("Conviva App Tracker: Error in Applying nwreqConfig ".concat(aa))}L=!1}if(L){h=0;for(var O=Object.entries(a);h<O.length;h++){var T=O[h],S=T[0],ma=T[1];e.includes(S)||(g[S]=ma)}h=0;for(var V=
Object.entries(m);h<V.length;h++){var ja=V[h];S=ja[0];ma=ja[1];try{if(ma&&0<m[S].length){q=!1;S!==pa.response_headers&&S!==pa.request_headers||(q=!0);if(S===pa.request_body){Q=F=t=u=n=p=l=void 0;C=b;var U=a;void 0===C&&(C={});var na=af(null===(Q=null==C?void 0:C.requestDetails)||void 0===Q?void 0:Q.headers);if(void 0!==na&&(na.toLowerCase().includes("text/plain")||na.toLowerCase().includes("json")||na.toLowerCase().includes("text/javascript")||na.toLowerCase().includes("application/javascript")||
na.toLowerCase().includes("text/html"))||void 0===na)try{if("string"==typeof(null===(F=null==C?void 0:C.requestDetails)||void 0===F?void 0:F.body)&&10240>=(null===(t=null==C?void 0:C.requestDetails)||void 0===t?void 0:t.body.length))try{U[pa.request_body]=JSON.parse(null===(u=null==C?void 0:C.requestDetails)||void 0===u?void 0:u.body)}catch(aa){}else"object"===la(null===(n=null==C?void 0:C.requestDetails)||void 0===n?void 0:n.body)&&10240>=JSON.stringify(null===(p=null==C?void 0:C.requestDetails)||
void 0===p?void 0:p.body).length&&(U[pa.request_body]=null===(l=null==C?void 0:C.requestDetails)||void 0===l?void 0:l.body)}catch(aa){}}if(S===pa.response_body){var oa=U=C=Q=F=t=u=n=p=l=void 0,ta=void 0,fa=void 0,W=void 0,N=b,ua=a;void 0===N&&(N={});a:{var Na=null===(W=null==N?void 0:N.responseDetails)||void 0===W?void 0:W.headers;try{W=void 0;var M=(null!=Na&&(W=Na["content-length"]||Na["Content-Length"]||Na["Content-length"]),null==W||isNaN(W)?W:Number(W));break a}catch(aa){}M=void 0}var P=af(null===
(fa=null==N?void 0:N.responseDetails)||void 0===fa?void 0:fa.headers);if(void 0!==P&&(P.toLowerCase().includes("text/plain")||P.toLowerCase().includes("json")||P.toLowerCase().includes("text/javascript")||P.toLowerCase().includes("application/javascript")||P.toLowerCase().includes("text/html")))if(void 0!==M&&10240>=M)if("string"==typeof(null===(ta=null==N?void 0:N.responseDetails)||void 0===ta?void 0:ta.body))try{ua[pa.response_body]=JSON.parse(null===(oa=null==N?void 0:N.responseDetails)||void 0===
oa?void 0:oa.body)}catch(aa){}else"object"===la(null===(U=null==N?void 0:N.responseDetails)||void 0===U?void 0:U.body)&&(ua[pa.response_body]=null===(C=null==N?void 0:N.responseDetails)||void 0===C?void 0:C.body);else if(void 0===M)try{if("string"==typeof(null===(Q=null==N?void 0:N.responseDetails)||void 0===Q?void 0:Q.body)&&10240>=(null===(t=null===(F=null==N?void 0:N.responseDetails)||void 0===F?void 0:F.body)||void 0===t?void 0:t.length))try{ua[pa.response_body]=JSON.parse(null===(u=null==N?void 0:
N.responseDetails)||void 0===u?void 0:u.body)}catch(aa){}else"object"===la(null===(n=null==N?void 0:N.responseDetails)||void 0===n?void 0:n.body)&&10240>=JSON.stringify(null===(p=null==N?void 0:N.responseDetails)||void 0===p?void 0:p.body).length&&(ua[pa.response_body]=null===(l=null==N?void 0:N.responseDetails)||void 0===l?void 0:l.body)}catch(aa){}}S===pa.request_query&&Tg(a,d);var Y=Ug(a[S],m[S],q);0!==Object.keys(Y).length&&(g[S]=Y)}}catch(aa){g[S]=void 0}}return g}}catch(aa){console.warn("Conviva App Tracker: Error in collecting attributes nwreqConfig ".concat(aa))}}g=
Z({},a);for(a=0;a<e.length;a++)c=e[a],null!=g&&g.hasOwnProperty(c)&&delete g[c];return g}function Sg(a,c,b){try{if("string"==typeof b&&"string"==typeof a&&"*"===b.trim())return!0;switch(c){case "==":case "equal":return a===b;case "!=":return a!==b;case ">":return a>b;case "<":return a<b;case ">=":return a>=b;case "<=":return a<=b;case "contains":return""!==b&&"string"==typeof a&&"string"==typeof b&&-1!==a.toLowerCase().indexOf(b.toLowerCase());default:return!1}}catch(d){return console.warn("Conviva App Tracker: Error in Compare values nwreq ".concat(d)),
!1}}function Ug(a,c,b){var d={};try{for(var e=0;e<c.length;e++){var g=c[e],f=a,h=d;b&&(g=g.toLowerCase(),f=f&&Object.entries(f).reduce(function(p,n){var y=n[1];return p[n[0].toLowerCase()]=y,p},{}));for(var l=g.split("."),m=0;m<l.length;m++){var q=l[m];if(null==f||!f.hasOwnProperty(q))break;m===l.length-1?h[q]=f[q]:(h[q]=h[q]||{},f=f[q],h=h[q])}}}catch(p){console.warn("Conviva App Tracker: Error in filtering schema object nwreq ".concat(p))}return d}function Tg(a,c){try{var b=null==a?void 0:a.targetUrl;
if(b&&"string"==typeof b&&b.includes("?")){var d=void 0;try{var e=b.indexOf("?");if(-1===e)return;var g=b.indexOf("#",e),f=-1!==g?b.substring(e+1,g):b.substring(e+1);if(!f||f.length>(c||10240))return;d="undefined"!=typeof URLSearchParams?new URLSearchParams(f):null}catch(y){return void console.warn("Conviva App Tracker: Error creating URLSearchParams: ".concat(y))}var h={};if(d instanceof URLSearchParams)d.forEach(function(y,E){h[E]=y});else{c=0;for(var l=b.substring(b.indexOf("?")+1).split("&");c<
l.length;c++){var m=l[c];if(m){var q=m.indexOf("="),p=0<q?decodeURIComponent(m.substring(0,q)):decodeURIComponent(m);if(p){var n=0<q&&q<m.length-1?decodeURIComponent(m.substring(q+1)):"";h[p]=n}}}}0<Object.keys(h).length&&(a[pa.request_query]=h)}}catch(y){console.warn("Conviva App Tracker: Error parsing request query parameters: ".concat(y))}}function bf(a,c,b,d){for(var e={},g=0;g<c.length;g++){var f=c[g],h=f.req,l=f.opt;f=f.smb;try{var m=d([{req:h,opt:l}],[],a,b);if((null==m?0:m.result)&&f&&Array.isArray(f)){var q=
Vg(a,f,!1);return 0<Object.keys(q).length&&Object.assign(e,q),e}}catch(p){console.warn("Conviva App Tracker: Error in collecting conditional SSE attributes ".concat(p))}}return e}function Vg(a,c,b){var d={};try{for(var e=0;e<c.length;e++){var g=c[e],f=a,h=d;b&&(g=g.toLowerCase(),f=f&&Object.entries(f).reduce(function(p,n){var y=n[1];return p[n[0].toLowerCase()]=y,p},{}));for(var l=g.split("."),m=0;m<l.length;m++){var q=l[m];if(null==f||!f.hasOwnProperty(q))break;if(m===l.length-1)h[q]=f[q];else{if(h[q]=
h[q]||{},"string"==typeof(f=f[q])&&m<l.length-1)try{f=JSON.parse(f)}catch(p){}h=h[q]}}}}catch(p){console.warn("Conviva App Tracker: Error in filtering SSE object ".concat(p))}return d}function cf(a,c,b){var d,e,g;return"translate.googleusercontent.com"===a?(""===b&&(b=c),a=Rc(c=null!==(e=c,d=(g=/^(?:https?|ftp)(?::\/*(?:[^?]+))([?][^#]+)/.exec(e))&&1<(null==g?void 0:g.length)?mc("u",g[1]):null)&&void 0!==d?d:"")):"cc.bingj.com"!==a&&"webcache.googleusercontent.com"!==a||(a=Rc(c=document.links[0].href)),
[a,c,b]}function oc(a,c){void 0===c&&(c=1);"0"===a[0]?(a[7]=a[6],a[5]=a[4],a[3]++):a[3]=c;c=sb.v4();return a[6]=c,a[8]="",a[9]=void 0,c}function Jd(a){a[4]=Math.round((new Date).getTime()/1E3)}function Uc(a){return{activateLCPObserver:function(){try{PerformanceObserver&&(new PerformanceObserver(function(c){try{c.getEntries().forEach(function(b){var d;if("largest-contentful-paint"===b.entryType){var e=null===performance||void 0===performance?void 0:performance.getEntriesByType("navigation"),g=void 0;
e&&0<(null==e?void 0:e.length)&&(g=null===(d=e[0])||void 0===d?void 0:d.activationStart);wa=Z(Z({},b.toJSON()),{performanceNavigationActivationStart:null!=g?g:0})}})}catch(b){console.warn("convivaAppTracker error in conviva lcp observer "+b)}})).observe({type:"largest-contentful-paint",buffered:!0})}catch(c){console.warn("convivaAppTracker conviva_lcp failed "+c)}},contexts:function(){try{switch(a){case H.PERFORMANCE_CONTEXT.DISABLED:return[];case H.PERFORMANCE_CONTEXT.PERFORMANCE_NAVIGATION_TIMING:return function(){var c,
b,d;try{var e=window.performance||window.mozPerformance||window.msPerformance||window.webkitPerformance||{};if(e.getEntriesByType){var g=e.getEntriesByType("navigation")[0],f=null!==(c=null==e?void 0:e.timeOrigin)&&void 0!==c?c:0;if(!g)return[];var h={st:Math.floor(f+g.startTime),dls:Math.floor(f+g.domainLookupStart),dle:Math.floor(f+g.domainLookupEnd),rss:Math.floor(f+g.responseStart),rse:Math.floor(f+g.responseEnd),le:Math.floor(f+g.loadEventEnd),dur:Math.floor(f+g.duration),as:Math.floor(f+g.activationStart)};
return(null==wa?void 0:wa.startTime)&&(h.lcp={rt:Math.floor(f+wa.startTime),url:128<(null===(b=null==wa?void 0:wa.url)||void 0===b?void 0:b.length)?null===(d=null==wa?void 0:wa.url)||void 0===d?void 0:d.substring(0,128):wa.url,sz:wa.size}),[{sc:"cv/pc/1-0-1",dt:h}]}return[]}catch(l){return console.warn("ConvivaAppTracker: issue will getting performance Navigation timing context"),[]}}();default:return Ea(Ea([],function(){var c=window;c=c.performance||c.mozPerformance||c.msPerformance||c.webkitPerformance;
var b=c.timing;return c?[{sc:"w3/pt/1-0-0",dt:{navigationStart:b.navigationStart,domainLookupStart:b.domainLookupStart,domainLookupEnd:b.domainLookupEnd,responseStart:b.responseStart,responseEnd:b.responseEnd,loadEventEnd:b.loadEventEnd}}]:[]}(),!0),function(){var c,b,d;try{if(void 0!==(null==wa?void 0:wa.startTime)&&"number"==typeof(null==wa?void 0:wa.startTime))return[{sc:"cv/lcp/1-0-0",dt:{lcp:Math.round(wa.startTime)-(null!==(c=wa.performanceNavigationActivationStart)&&void 0!==c?c:0),url:128<
(null===(b=null==wa?void 0:wa.url)||void 0===b?void 0:b.length)?null===(d=null==wa?void 0:wa.url)||void 0===d?void 0:d.substring(0,128):wa.url}}]}catch(e){}return[]}(),!0)}}catch(c){return console.warn("convivaAppTracker problem in perfromance context "+c),[]}}}}function Vc(a,c,b,d,e,g){var f;try{var h,l=null,m=null!==(f=g.url)&&void 0!==f?f:"";if(!m)return!0;if(Wg.some(function(y){return m.includes(y)}))return!1;var q=(h=new URL(m)).protocol.replace(":","");f=function(y,E){var x;y=df(y,{scheme:q,
host:h.hostname,path:decodeURIComponent(h.pathname)},eb.NETWORK_REQUEST);return y.matched?y.opt?ub(y.opt,{responseStatusCode:null!==(x=null==e?void 0:e.status)&&void 0!==x?x:0,duration:Date.now()-g.requestTimestamp},eb.NETWORK_REQUEST)===E:E:null};if(a&&null===l&&(l=f(a,!0)),c&&null===l&&(l=f(c,!1)),null===l){var p=(null==b?void 0:b.includes("*"))||(null==b?void 0:b.some(function(y){return!(!y||""===y)&&m.includes(y)})),n=null==d?void 0:d.some(function(y){return!(!y||""===y)&&m.includes(y)});l=!p||
n}return!0===l}catch(y){return!0}}function Wc(a,c,b,d){try{var e,g=null;d=null!=d?d:"";if(!d)return{result:!0};var f=(e=new URL(d)).protocol.replace(":","");d=function(h,l){var m;h=df(h,Z({scheme:f,host:e.hostname,path:decodeURIComponent(e.pathname)},b),eb.SSE_EVENT);if(h.matched){if(h.opt){var q=ub(h.opt,b,eb.SSE_EVENT);return!0!==(null===(m=null==h?void 0:h.item)||void 0===m?void 0:m.count)||q?{result:q===l,matchedConfig:h.item,shouldSend:!0}:{result:h.matched===l,matchedConfig:h.item,shouldSend:!1}}return{result:l,
matchedConfig:h.item,shouldSend:!1}}return null};return a&&null===g&&(g=d(a,!0)),c&&null===g&&(g=d(c,!1)),(!a||Array.isArray(a)&&0===a.length)&&null===g&&(g={result:!0}),g}catch(h){return{result:!0}}}function df(a,c,b){try{for(var d=0;d<a.length;d++){var e=a[d],g=e.opt;if(ub(e.req,c,b))return{matched:!0,opt:g||null,item:e}}return{matched:!1,opt:null}}catch(f){return{matched:!1,opt:null}}}function ub(a,c,b){try{if(!a)return!1;if("and"===a.type){for(var d=0,e=a.cond;d<e.length;d++)if(!ub(e[d],c,b))return!1;
return!0}if("or"===a.type){e=0;for(d=a.cond;e<d.length;e++)if(ub(d[e],c,b))return!0;return!1}return b===eb.NETWORK_REQUEST?function(g,f){var h=g.key,l=g.op;g=g.val;if(!h||!l)return!1;switch(h){case "sch":return!!f.scheme&&vb(f.scheme,l,g);case "host":return!!f.host&&vb(f.host,l,g);case "path":return!!f.path&&vb(f.path,l,g);case "dur":return!!f.duration&&Xc(f.duration,l,g);case "rsc":return void 0!==f.responseStatusCode&&0<=f.responseStatusCode&&Xc(f.responseStatusCode,l,g);default:return!1}}(a,c):
b===eb.CUSTOM_EVENT?function(g,f){var h=g.key,l=g.op;g=g.val;if(!h||!l)return!1;if(void 0!==f[h]){if(Fd(f[h]))return vb(f[h],l,g);if("boolean"==typeof f[h])switch(f=f[h],l){case "!=":return f!==g;case "==":return f===g;default:return!1}if(Number.isInteger(f[h]))return Xc(f[h],l,g)}return!1}(a,c):b===eb.SSE_EVENT&&function(g,f){var h=g.key,l=g.op;g=g.val;if(!h||!l)return!1;switch(h){case "sch":return!!f.scheme&&vb(f.scheme,l,g);case "host":return!!f.host&&vb(f.host,l,g);case "path":return!!f.path&&
vb(f.path,l,g);default:f=(m=f,(q=h)?q.split(".").reduce(function(p,n){if(null!=p){if("string"==typeof p)try{p=JSON.parse(p)}catch(y){}n=/^\d+$/.test(n)?Number(n):n;return null==p?void 0:p[n]}},m):m);if(null!=f){if("string"==typeof f)return vb(f,l,g);if("boolean"==typeof f)switch(l){case "!=":return f!==g;case "==":return f===g;default:return!1}if("number"==typeof f&&Number.isInteger(f))return Xc(f,l,g)}return!1}var m,q}(a,c)}catch(g){return!1}}function vb(a,c,b){var d;return"=="===c&&Array.isArray(b)?
!!(d=b).includes("*")||d.some(function(e){return!(!e||""===e)&&a===e}):"contains"===c&&Array.isArray(b)?!!(d=b).includes("*")||d.some(function(e){return!(!e||""===e)&&a.includes(e)}):"sw"===c&&Array.isArray(b)?!!(d=b).includes("*")||d.some(function(e){return!(!e||""===e)&&a.startsWith(e)}):!("ew"!==c||!Array.isArray(b))&&(!!(d=b).includes("*")||d.some(function(e){return!(!e||""===e)&&a.endsWith(e)}))}function Xc(a,c,b){if("in"===c.toLowerCase()&&Array.isArray(b))return b.includes(a);if("range"===
c.toLowerCase()&&"object"===la(b)){c=b.min;var d=b.max,e=b.minExclusive;b=b.maxExclusive;return void 0!==c&&void 0!==d?a>=c&&a<=d:void 0!==e&&void 0!==b&&a>e&&a<b}if(lc(b))switch(c){case "!=":return a!==b;case ">":return a>b;case ">=":return a>=b;case "<":return a<b;case "<=":return a<=b;case "==":return a===b}return!1}function ef(a,c,b){var d=null;a:{for(var e=0;e<a.length;e++){var g=a[e];var f=g.opt;if(ub(g.req,c,b)){if(!f){a=!0;f=null;break a}if(ub(f,c,b)){a=!0;break a}}}a=!1;f=null}a&&(d=!f||
!!ub(f,c,b));return d}function za(a,c,b){var d,e;try{if(a&&c){var g=null==a?void 0:a.getConfig(),f=function(h,l,m){var q,p,n,y={message:""};try{var E=m.message,x=m.error,z=m.className,w=m.extraData;if(E)y.message=E;else if("string"==typeof x){if(!(0<x.trim().length))return ea.warn("Conviva Eco Sensor:: Mandatory field message is missing"),null;y.message=x}else"object"===la(x)&&("string"==typeof x.message&&0<x.message.trim().length&&(y.message=Ma(x.message,H.DIAGNOSTIC_INFO_MAX_LENGTH.MAX_MESSAGE_LENGTH)),
"string"==typeof x.name&&0<x.name.trim().length&&(y.exceptionName=Ma(x.name,H.DIAGNOSTIC_INFO_MAX_LENGTH.MAX_EXCEPTION_NAME_LENGTH)),"string"==typeof x.stack&&0<x.stack.trim().length&&(y.stackTrace=Ma(x.stack,H.DIAGNOSTIC_INFO_MAX_LENGTH.MAX_STACK_LENGTH)));if(0===y.message.trim().length)return ea.warn("Conviva Eco Sensor:: Mandatory field message is missing"),null;"string"==typeof z&&0<z.trim().length&&(y.className=Ma(z,H.DIAGNOSTIC_INFO_MAX_LENGTH.MAX_CLASSNAME_LENGTH));null!=w&&(y.extraData=w);
var u=null==h?void 0:h.getConfig();if((null==u?void 0:u.configurationVersion)&&(y.remoteConfigVersion=u.configurationVersion),(null==m?void 0:m.configAppliedTime)&&(y.configAppliedTime=null==m?void 0:m.configAppliedTime),(null==u?void 0:u.cacheRefreshInterval)&&(y.cacheRefreshInterval=u.cacheRefreshInterval),(null==m?void 0:m.configAppliedSrc)&&(y.configAppliedSrc=null==m?void 0:m.configAppliedSrc),localStorage){var t=localStorage.getItem(H.SAMPLING_STORAGE_RANDOM_NUMBER_KEY);null!=t&&(y.samplingRandomNumber=
parseFloat(t))}"number"==typeof(null===(p=null===(q=null==u?void 0:u.controlIngestConfig)||void 0===q?void 0:q.sel)||void 0===p?void 0:p.pct)?(y.samplingPercentage=u.controlIngestConfig.sel.pct,y.samplingDecision=H.SAMPLING_STATUS.DERIVED,null!=la(null===(n=null==u?void 0:u.controlIngestConfig)||void 0===n?void 0:n.act)&&(y.extraData=Z(Z({},y.extraData),{samplingActionConfig:u.controlIngestConfig.act}))):y.samplingDecision=H.SAMPLING_STATUS.DEFAULT;"function"==typeof l&&"string"==typeof l()&&(y.samplingStatus=
l()==H.SAMPLING_MODES.RCFG)}catch(F){return ea.warn("Error occurred while generating diagnostic object",F),null}return y}(a,c,b);f&&function(h){var l;try{var m=null==h?void 0:h.getConfig(),q=(null===(l=null==m?void 0:m.di)||void 0===l?void 0:l.lim)||10,p=Date.now();return 6E4<=p-ff&&(gf=0,ff=p),!(++gf>q)}catch(n){return ea.warn("Conviva Eco Sensor:: Error occured while checking diagnostic event is allowed",n),!1}}(a)&&("boolean"!=typeof(null===(d=null==g?void 0:g.di)||void 0===d?void 0:d.en)||!0!==
(null===(e=null==g?void 0:g.di)||void 0===e?void 0:e.en)||null!=a&&a.track(Eb({event:{sc:"iglu:com.conviva/di/jsonschema/1-0-4",dt:Tb({msg:f.message,cn:f.className,st:f.stackTrace,en:f.exceptionName,ed:f.extraData,rcv:f.remoteConfigVersion,cat:f.configAppliedTime,cri:f.cacheRefreshInterval,csrc:f.configAppliedSrc,srn:f.samplingRandomNumber,spr:f.samplingPercentage,ss:f.samplingStatus,sd:f.samplingDecision})}})))}}catch(h){ea.warn("Conviva Eco Sensor:: Error occurred while sending reportDiagnosticError",
h)}}function hf(){var a,c,b=null===(a=null==Aa?void 0:Aa.core)||void 0===a?void 0:a.getConfig();pc=(null==(pc=(null===(c=null==b?void 0:b.clickcc)||void 0===c?void 0:c.cssSelectorList)||pc)?void 0:pc.replace(/\s+/g,""))||""}function jf(a,c){if(!(a instanceof HTMLElement||a instanceof SVGElement))return null;var b=null==a?void 0:a.closest(kf);if(b)return b;if(b=null==a?void 0:a.closest(pc))return function(e,g){var f;e=e.querySelectorAll(kf);if(0===e.length)return null;if(1===e.length&&0<e[0].offsetWidth&&
0<e[0].offsetHeight)return e[0];var h=g.clientX;g=g.clientY;if(e.length<=("IntersectionObserver"in window&&"fetch"in window&&"Promise"in window?H.MAX_NATIVE_SCAN:H.MAX_NATIVE_SCAN_LEGACY))for(var l=0;l<e.length;l++){var m=null===(f=e[l])||void 0===f?void 0:f.getBoundingClientRect();if(m&&h>=m.left&&h<=m.right&&g>=m.top&&g<m.bottom)return e[l]}return null}(b,c)||b;c=a;b=0;var d=H.CLICK_MAX_DEPTH;if(function(e){if(e.style){if(e.style.visibility&&""!==e.style.visibility&&"hidden"==e.style.visibility||
e.style.pointerEvents&&""!==e.style.pointerEvents&&"none"==e.style.pointerEvents)return!1;if(e.style.cursor&&""!==e.style.cursor&&"pointer"==e.style.cursor)return!0}e=getComputedStyle(e);return"hidden"!==e.visibility&&"none"!==e.pointerEvents&&"pointer"===e.cursor}(c)){for(;c&&c!==document.documentElement&&(c instanceof HTMLElement||c instanceof SVGElement)&&b<d;){if("function"==typeof c.onclick)return c;c=c.parentElement;b++}return a.closest(Xg)||a}return null}function Yg(a){var c,b,d,e,g,f,h;try{var l=
function(F,G){var Q,C;try{if(!Aa||!Aa.core||!F)return null;var L=Aa.core.getConfig();if(!0!==(null===(Q=null==L?void 0:L.clickcc)||void 0===Q?void 0:Q.en))return null;var O=null===(C=null==L?void 0:L.clickcc)||void 0===C?void 0:C.uiMode;return O===qc.RAW?F:O===qc.BOTH?jf(F,G)||F:jf(F,G)}catch(T){return ea.warn("Conviva App Tracker caused Exception in getTrackedElement method of user click tracking module",T),null}}(function(F){var G,Q,C;return(null===(G=F.target)||void 0===G?void 0:G.shadowRoot)&&
(C=null===(Q=F.composedPath)||void 0===Q?void 0:Q.call(F)),C&&C[0]||F.target}(a),a);if(l&&(l instanceof HTMLElement||l instanceof HTMLInputElement)){a={};var m=H.CLICK_KEY_MAX_LENGTH;(null==l?0:l.id)&&(a.id=Ma(l.id,m));(null==l?0:l.className)&&(a.class=Ma(l.className,m));(null==l?0:l.tagName)&&(a.elementName=Ma(l.tagName.toLowerCase(),m));(null===(c=null==l?void 0:l.innerText)||void 0===c?0:c.trim())&&(a.text=Ma(l.innerText.trim(),m));(null==l?0:l.getAttribute("name"))&&(a.name=Ma(l.getAttribute("name")||
"",m));(null==l?0:l.getAttribute("type"))&&(a.elementType=Ma((null===(b=l.getAttribute("type"))||void 0===b?void 0:b.toLowerCase())||"",m));(null==l?0:l.placeholder)&&(a.placeholder=Ma(l.placeholder,m));(null==l?0:l.getAttribute("type"))&&"password"!==(null==l?void 0:l.getAttribute("type"))&&l.value&&(a.value=Ma(l.value,m));var q=null===(d=null==Aa?void 0:Aa.core)||void 0===d?void 0:d.getConfig(),p=null===(e=null==q?void 0:q.clickcc)||void 0===e?void 0:e.collectattr;if(p)for(c=0;c<p.length;c++){var n=
p[c],y=null==l?void 0:l.getAttribute(n);y&&(a[n]=Ma(y,m))}try{if("A"===l.tagName.toUpperCase()||"AREA"===l.tagName.toUpperCase()){if(null!=l.href){var E=l.hostname||Rc(l.href),x=E.toLowerCase(),z=l.href.replace(E,x);/^(javascript|vbscript|jscript|mocha|livescript|ecmascript|mailto):/i.test(z)||(a.targetUrl=Ma(decodeURIComponent(z),m))}l.target&&(a.target=Ma(l.target,m))}}catch(F){ea.warn("Conviva App Tracker caused Exception in handleClick href setting",F)}var w=null===(g=l.querySelector("use"))||
void 0===g?void 0:g.getAttribute("xlink:href");w&&(a["xlink:href"]=Ma(w,m));var u=null!==(f=null==q?void 0:q.clickcc)&&void 0!==f?f:{},t=function(F,G,Q){var C=F.collect,L=F.block;F=null;if(C&&(F=ef(C,G,Q)),L&&null===F)G=ef(L,G,Q),"boolean"==typeof G&&(F=!G);return null===F||F}({collect:u.collect,block:u.block},a,eb.CUSTOM_EVENT);if("boolean"!=typeof t||!1!==t)null===(h=null==Aa?void 0:Aa.core)||void 0===h||h.track(gc({name:"conviva_click",data:JSON.stringify(a)}))}}catch(F){return void ea.warn("Conviva App Tracker caused Exception in handleClick method of user click tracking module",
F)}}function lf(a){try{var c=Date.now(),b=H.CLICK_DEBOUNCING_DELAY;null===Kd||c-Kd>=b?((Yg(a),0<Yc)&&za(Aa.core,Aa.getSamplingMode,{className:"clickTracking - droppedEvent",message:"total click events dropped to Avoid tracking spam from rapid clicks",extraData:{clickEventDropped:Yc}}),Yc=0):Yc++;Kd=c}catch(d){console.warn("Conviva App Tracker caused Exception in immediateClickHandler method of user click tracking module",d)}}function Zg(){try{rc||"undefined"==typeof document||(document.body?(Gb=lf,
ab(document.body,"click",Gb,{signal:Ua,capture:!0,passive:!0}),rc=!0):document.addEventListener("DOMContentLoaded",function(){(null===document||void 0===document?0:document.body)&&(Gb=lf,ab(document.body,"click",Gb,{signal:Ua,capture:!0,passive:!0}),rc=!0)}),hf(),(null===window||void 0===window?void 0:window.addEventListener)&&window.addEventListener("RemoteConfigUpdateApplied",function(){hf()},{signal:Ua}))}catch(a){ea.warn("Conviva App Tracker caused Exception in enableUserClickTracking method of user click tracking module",
a)}}function mf(){try{rc&&"undefined"!=typeof document&&document.body&&(Gb&&(document.body.removeEventListener("click",Gb),Gb=null),rc=!1)}catch(a){ea.warn("Conviva App Tracker caused Exception in disableUserClickTracking method of user click tracking module",a)}}function $g(a){var c={data:""},b=0;for(a=a.split(/\n+/);b<a.length;b++){var d=a[b];if(d&&!d.startsWith(":")){var e=d.indexOf(":"),g=(-1===e?d:d.slice(0,e)).trim();d=-1===e?"":d.slice(e+1).replace(/^\s+/,"");switch(g){case "data":c.data+=
(c.data?"\n":"")+d;break;case "event":c.event=d;break;case "id":c.id=d}}}return c.data?c:null}function ah(){try{var a=!!window.localStorage}catch(b){a=!0}if(!a)return!1;try{var c=window.localStorage;return c.setItem("modernizr","modernizr"),c.removeItem("modernizr"),!0}catch(b){return!1}}function bh(a,c,b,d,e,g,f,h,l,m,q,p,n,y,E,x,z,w,u){function t(M){var P=Object.keys(M).map(function(Y){return[Y,M[Y]]}).reduce(function(Y,aa){return Y[aa[0]]=aa[1].toString(),Y},{});return{evt:P,bytes:F(JSON.stringify(P))}}
function F(M){for(var P=0,Y=0;Y<M.length;Y++){var aa=M.charCodeAt(Y);127>=aa?P+=1:2047>=aa?P+=2:55296<=aa&&57343>=aa?(P+=4,Y++):P+=65535>aa?3:4}return P}function G(M,P){P=L(P,!0,!1);M=O(T([M.evt]));try{E().toLowerCase()!==lb.NONE&&(M=nf.gzip(M,{level:6}),P.setRequestHeader("Content-Encoding",lb.GZIP))}catch(Y){}u()!==H.SAMPLING_MODES.NONE&&P.send(M)}function Q(M){try{if("undefined"!=typeof window&&void 0!==window.__CONVIVA_VISUAL_ACTIVATION_EXTENSION__&&"function"==typeof window.__CONVIVA_VISUAL_ACTIVATION_EXTENSION__.postMessage){var P=
O(T(M));window.__CONVIVA_VISUAL_ACTIVATION_EXTENSION__.postMessage(P)}}catch(Y){ea.warn("Error occured while sending message to Visual Labelling Extension",Y)}}function C(M){for(void 0===M&&(M=!1);U.length&&"string"!=typeof U[0]&&"object"!==la(U[0]);)U.shift();if(1>U.length)ja=!1;else{if(!Fd(ma))throw"No collector configured";if(ja=!0,window.clearTimeout(na),na=-1,fa){var P,Y=void 0,aa=void 0;"object"===la(U[0])?(P=L(Y=ma,!0,M),aa=function(sa){for(var Ba=0,mb=0;Ba<sa.length&&!((mb+=sa[Ba].bytes)>=
z());)Ba+=1;return Ba}(U)):(Y=S(U[0]),P=L(Y,!1,M),aa=1);var Oa=setTimeout(function(){P.abort();ja=!1},m);if(P.onreadystatechange=function(){4===P.readyState&&(clearTimeout(Oa),200<=P.status&&300>P.status?C():(ea.error("Status ".concat(P.status,", will not retry.")),ja=!1))},"object"===la(U[0])){var Pa=U.slice(0,aa);if(0<Pa.length){M=!1;Pa=Pa.map(function(sa){return sa.evt});if(ta){var Va=new Blob([O(T(Pa))],{type:"application/json"});try{M=navigator.sendBeacon(Y,Va)}catch(sa){M=!1}}if(!0===M)C();
else{Y=O(T(Pa));try{E().toLowerCase()!==lb.NONE&&(Y=nf.gzip(Y,{level:6}),P.setRequestHeader("Content-Encoding",lb.GZIP))}catch(sa){}try{u()!==H.SAMPLING_MODES.NONE&&P.send(Y)}catch(sa){}}}}else P.send();!function(sa){for(var Ba=0;Ba<sa;Ba++)U.shift();b&&Sc(ua,JSON.stringify(U.slice(-1*l())))}(aa)}else if(q||"object"===la(U[0]))ja=!1;else{aa=new Image(1,1);var Ca=!0;aa.onload=function(){Ca&&(Ca=!1,U.shift(),b&&Sc(ua,JSON.stringify(U.slice(-1*l()))),C())};aa.onerror=function(){Ca&&(Ca=!1,ja=!1)};aa.src=
S(U[0]);setTimeout(function(){Ca&&ja&&(Ca=!1,C())},m)}}}function L(M,P,Y){var aa=new XMLHttpRequest,Oa;for(Oa in P?(aa.open("POST",M,!Y),aa.setRequestHeader("Content-Type","application/json; charset=UTF-8")):aa.open("GET",M,!Y),aa.withCredentials=n,q&&aa.setRequestHeader("SP-Anonymous","*"),p)Object.prototype.hasOwnProperty.call(p,Oa)&&aa.setRequestHeader(Oa,p[Oa]);return aa}function O(M){return JSON.stringify({sc:"sp/pd/1-0-4",dt:M})}function T(M){for(var P=(new Date).getTime().toString(),Y=0;Y<
M.length;Y++)M[Y].stm=P;return M}function S(M){return h?ma+M.replace("?","?stm="+(new Date).getTime()+"&"):ma+M}(null===window||void 0===window?0:window.addEventListener)&&window.addEventListener("RemoteConfigUpdateApplied",function(){C()},{signal:Ua});var ma,V,ja=!1,U=[],na=-1,oa=!0===(d="string"==typeof d?d.toLowerCase():d)||"beacon"===d||"true"===d,ta=!(!(oa&&window.navigator&&window.navigator.sendBeacon)||function(M,P){P=P.match(/\(iP.+; CPU .*OS (\d+)[_\d]*.*\) AppleWebKit\//);return!(!P||!P.length)&&
parseInt(P[0])<=M}(13,V=window.navigator.userAgent)||function(M,P,Y){Y=Y.match("(Macintosh;.*Mac OS X (\\d+)_(\\d+)[_\\d]*.*) AppleWebKit/");return!(!Y||!Y.length)&&(parseInt(Y[2])<=M||parseInt(Y[2])===M&&parseInt(Y[3])<=P)}(10,15,V)&&function(M){return/^(?!.*Chrome)(?!.*Chromium)(?!.*Edg)(?!.*OPR)(?=.*Safari)/.test(M)&&!/(Chrome|Chromium|Edg|OPR)/.test(M)}(V))&&oa,fa=!!(window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest),W="get"!==d&&fa&&("post"===d||oa),N=W?e:"/i";d="convivaOutQueue_".concat(a,
"_").concat(W?"post2":"get");var ua="convivaOutQueue_".concat(a,"_").concat(W?"post2":"get");if(Ze(d),Ze("".concat(d,".expires")),oa&&(p={}),g=b&&ah()&&W&&g||1,b)try{var Na=window.localStorage.getItem(ua);U=Na?JSON.parse(Na):[]}catch(M){}Array.isArray(U)||(U=[]);c.outQueues.push(U);fa&&1<g&&c.bufferFlushers.push(function(M){ja||C(M)});return{enqueueRequest:function(M,P,Y){if(u()!=H.SAMPLING_MODES.NONE){ma=P+N;if(W){Q([(M=t(M)).evt]);P=z();if(M.bytes>=P)return ja||C(),ea.warn("Event ("+M.bytes+"B) too big, max is "+
P),void G(M,ma);U.push(M)}else{var aa=function(sa){var Ba="?",mb={co:!0,cx:!0},Vb=!0,nb;for(nb in sa)sa.hasOwnProperty(nb)&&!mb.hasOwnProperty(nb)&&(Vb?Vb=!1:Ba+="&",Ba+=encodeURIComponent(nb)+"="+encodeURIComponent(sa[nb]));for(var wb in mb)sa.hasOwnProperty(wb)&&mb.hasOwnProperty(wb)&&(Ba+="&"+wb+"="+encodeURIComponent(sa[wb]));return Ba}(M),Oa=f();if(0<Oa){var Pa=F(S(aa));if(Pa>=Oa){if(ea.warn("Event ("+Pa+"B) too big, max is "+Oa),fa)Q([(M=t(M)).evt]),G(M,P+e);return}}U.push(aa)}P=!1;b&&(P=Sc(ua,
JSON.stringify(U.slice(-1*l()))));!ja&&-1===na&&P&&(na=window.setTimeout(C,w()+(Ca=y,Math.floor(Math.random()*Ca))));ja||!(!P||!x()||W&&(Va=0,Va=W?U.reduce(function(sa,Ba){return sa+Ba.bytes},0):U.reduce(function(sa,Ba){return sa+Ba.length},0),Va>z())||U.length>g||Y)||C()}var Va,Ca},executeQueue:function(){ja||C()},setUseLocalStorage:function(M){b=M},setAnonymousTracking:function(M){q=M},setCollectorUrl:function(M){ma=M+N},setBufferSize:function(M){g=M},setCustomHeaders:function(M){p=M}}}function ch(){(null===
window||void 0===window?0:window.addEventListener)&&window.addEventListener("RemoteConfigUpdateApplied",function(){var a,c,b,d,e,g,f,h=null===(a=null==Sa?void 0:Sa.core)||void 0===a?void 0:a.getConfig();a=null===(b=null===(c=null==h?void 0:h.collectionRateLimit)||void 0===c?void 0:c.exceptionAutotracking)||void 0===b?void 0:b.maxEvents;c=null===(e=null===(d=null==h?void 0:h.collectionRateLimit)||void 0===d?void 0:d.exceptionAutotracking)||void 0===e?void 0:e.disconnectDuration;d=null===(f=null===
(g=null==h?void 0:h.collectionRateLimit)||void 0===g?void 0:g.exceptionAutotracking)||void 0===f?void 0:f.timeWindow;null==Hb||Hb.updateErrortRateLimitConfig(a,c,d);!0},{signal:Ua})}function dh(a){try{Sa=a;var c,b,d,e,g,f,h;try{var l=null===(c=null==Sa?void 0:Sa.core)||void 0===c?void 0:c.getConfig(),m=null===(d=null===(b=null==l?void 0:l.collectionRateLimit)||void 0===b?void 0:b.exceptionAutotracking)||void 0===d?void 0:d.maxEvents,q=null===(g=null===(e=null==l?void 0:l.collectionRateLimit)||void 0===
e?void 0:e.exceptionAutotracking)||void 0===g?void 0:g.disconnectDuration,p=null===(h=null===(f=null==l?void 0:l.collectionRateLimit)||void 0===f?void 0:f.exceptionAutotracking)||void 0===h?void 0:h.timeWindow;Hb=new eh(m,q,p,null==Sa?void 0:Sa.core,null==Sa?void 0:Sa.getSamplingMode)}catch(n){console.warn("Conviva App Tracker caused Exception in initialiseRateLimiter method of error tracking module",n)}ch();ab(window,"error",of,!0);ab(window,"unhandledrejection",pf,!0)}catch(n){console.warn("Conviva App Tracker caused Exception in enableErrorTracking method of error tracking module",
n)}}function of(a){try{(null==Hb?0:Hb.isAllowedToSendEvent())&&Ld({message:a.message,filename:a.filename,lineno:a.lineno,colno:a.colno,error:a.error})}catch(c){console.warn("Conviva App Tracker caused Exception in captureError method of error tracking module",c)}}function pf(a){try{(null==Hb?0:Hb.isAllowedToSendEvent())&&Ld({message:a.reason})}catch(c){console.warn("Conviva App Tracker caused Exception in captureRejection method of error tracking module",c)}}function Ld(a){var c,b,d=a.message,e=a.filename,
g=a.lineno,f=a.colno,h=a.error,l=a.context;a=a.timestamp;h=h&&h.stack?h.stack:void 0;if(!(void 0===d||null===d&&void 0===h||null===h&&void 0===g||null===g&&void 0===f||null===f&&void 0===e||null===e)){var m=null===(c=null==Sa?void 0:Sa.core)||void 0===c?void 0:c.getConfig();(null==m?0:m.exceptionAutotracking)&&(null===(b=null==Sa?void 0:Sa.core)||void 0===b||b.track(Eb({event:{sc:"sp/ae/1-0-1",dt:{programmingLanguage:"JAVASCRIPT",message:d?qf(d,2048):"JS Exception.",stackTrace:h?qf(h,8192):"",lineNumber:g,
lineColumn:f,fileName:e}}}),l,a))}}function fh(a,c){var b;if(void 0===c&&(c=!0),!1!==c)try{var d=0,e=0;if("complete"===document.readyState){var g=null===(b=null==a?void 0:a.core)||void 0===b?void 0:b.getConfig();null==a||a.trackCustomEvent({name:"conviva_window_loaded",data:"{}",context:Uc(null==g?void 0:g.performanceContextConfig).contexts()})}else null===window||void 0===window||window.addEventListener("load",function(){var f;try{var h=null===(f=null==a?void 0:a.core)||void 0===f?void 0:f.getConfig();
null==a||a.trackCustomEvent({name:"conviva_window_loaded",data:"{}",context:Uc(null==h?void 0:h.performanceContextConfig).contexts()})}catch(l){console.warn("ConvivaAppTracker : issue while registering window loaded event",l)}},{signal:Ua});null===document||void 0===document||document.addEventListener("visibilitychange",function(){var f,h;try{if((null==a?void 0:a.getSamplingMode())!==H.SAMPLING_MODES.NONE)if("hidden"===document.visibilityState)setTimeout(function(){var m,q;try{var p=null===(m=null==
a?void 0:a.core)||void 0===m?void 0:m.getConfig();e++;(null==p?0:p.lifecycleAutotracking)&&(null===(q=null==a?void 0:a.core)||void 0===q||q.track(Eb({event:{sc:"sp/abg/1-0-0",dt:Tb({backgroundIndex:e})}})));"hidden"!==document.visibilityState||(null==a?0:a.getPageViewSent())||null==a||a.trackCustomEvent({name:"conviva_app_backgrnd_before_page_view",data:"{}"})}catch(n){console.warn("ConvivaAppTracker : issue while tracking visibility change",n)}},0);else{var l=null===(f=null==a?void 0:a.core)||void 0===
f?void 0:f.getConfig();d++;(null==l?0:l.lifecycleAutotracking)&&(null===(h=null==a?void 0:a.core)||void 0===h||h.track(Eb({event:{sc:"sp/afg/1-0-0",dt:Tb({foregroundIndex:d})}})))}}catch(m){console.warn("convivaAppTracker visibilitychange failed "+m)}},{signal:Ua});"undefined"!=typeof document&&document&&document.addEventListener&&document.addEventListener("convivaVideoEvent",function(f){f&&a&&(null==a?void 0:a.getSamplingMode())!==H.SAMPLING_MODES.NONE&&(null==a||a.trackVideoEvent(f))},{signal:Ua})}catch(f){console.warn("convivaAppTracker error in page load metrics"+
f)}}function gh(a,c,b,d,e){void 0===e&&(e={});var g=[];a=function(h,l,m,q,p){function n(){(Wb=cf(window.location.hostname,window.location.href,Hd()))[1]!==ob&&(sc=Hd(ob));rf=Xe(Wb[0]);ob=Wb[1]}function y(k){try{var r=(new Date).getTime(),v=k.currentTarget;if(null==v?0:v.href){k="_cnv="+(Zc+"."+r);var A=v.href.split("#"),D=A[0].split("?"),K=D.shift(),J=D.join("?");if(J){D=!0;var I=J.split("&");for(r=0;r<I.length;r++)if("_cnv="===I[r].substr(0,5)){D=!1;I[r]=k;J=I.join("&");break}D&&(J=k+"&"+J)}else J=
k;var B=(A[0]=K+"?"+J,A.join("#"));v.href=B}}catch(R){console.warn("Conviva App Tracker:: Error in linkDecorationHandler of decorateLinks ".concat(R))}}function E(k){if("undefined"!=typeof document&&document.links&&0<document.links.length)for(var r=0;r<document.links.length;r++){var v=document.links[r];!v.spDecorationEnabled&&k(v)&&(ab(v,"click",y,!0),ab(v,"mousedown",y,!0),v.spDecorationEnabled=!0)}}function x(k){var r;return sf&&(r=/#.*/,k=k.replace(r,"")),tf&&(r=/[{}]/g,k=k.replace(r,"")),k}function z(k){return(k=
/^([a-z]+):/.exec(k))?k[1]:null}function w(k){k=Xb+k+"."+Ib;if("localStorage"==Ia)try{var r=window.localStorage,v=r.getItem(k+".expires");var A=null===v||+v>Date.now()?r.getItem(k):(r.removeItem(k),void r.removeItem(k+".expires"))}catch(D){A=void 0}else A="cookie"==Ia||"cookieAndLocalStorage"==Ia?kb(k):void 0;return A}function u(){n();Ib=hh((tc||rf)+(Md||"/")).slice(0,4)}function t(){Nd=(new Date).getTime()}function F(){var k=G(),r=k[0];r<$c?$c=r:r>ad&&(ad=r);k=k[1];k<bd?bd=k:k>cd&&(cd=k);!0;t()}
function G(){var k="undefined"!=typeof document?null===document||void 0===document?void 0:document.documentElement:void 0;return k?[k.scrollLeft||window.pageXOffset,k.scrollTop||window.pageYOffset]:[0,0]}function Q(){var k=G(),r=k[0];ad=$c=r;cd=bd=k=k[1]}function C(){O(Xb+"ses."+Ib,"*",uf)}function L(k){var r=Xb+"id."+Ib;k=(k.shift(),k.join("."));O(r,k,vf)}function O(k,r,v){uc&&!dd||("localStorage"==Ia?Sc(k,r,v):"cookie"!=Ia&&"cookieAndLocalStorage"!=Ia||kb(k,r,v,Md,tc,ed,fd))}function T(k){var r=
Xb+"id."+Ib,v=Xb+"ses."+Ib;Ye(r);Ye(v);nc(r,tc,ed,fd);nc(v,tc,ed,fd);(null==k?0:k.preserveSession)||(Jb=sb.v4(),fb=1);(null==k?0:k.preserveUser)||(Zc=sb.v4(),Kb=null)}function S(k){k&&k.stateStorageStrategy&&(p.stateStorageStrategy=k.stateStorageStrategy,Ia=wf(p));uc=!!p.anonymousTracking;dd=xf(p);Od=yf(p);pb.setUseLocalStorage("localStorage"==Ia||"cookieAndLocalStorage"==Ia);pb.setAnonymousTracking(Od)}function ma(){if(function(){var v;try{var A=null;if(null===(v=null==p?void 0:p.configs)||void 0===
v?0:v.enableClIdInCookies){var D=function(J){try{var I=kb(J);return I&&0<I.length?I:window.localStorage.getItem(J)}catch(B){return ea.warn("getConvivaCookie",B),null}}("Conviva_sdkConfig");D&&(A=D)}else try{nc("Conviva_sdkConfig",oa(),"None",!0)}catch(J){}A||(A=window.localStorage.getItem("Conviva.sdkConfig"));var K=JSON.parse(A||"{}");"{}"===K||void 0===K?(vc=ta(),gd=fa()):(vc=K.clId||ta(),2147483648<=hd?hd=-1:hd++,gd=fa());(function(J){var I;try{var B=null;try{B=JSON.stringify(J)}catch(ha){return}if(window.localStorage.setItem("Conviva.sdkConfig",
B),null===(I=null==p?void 0:p.configs)||void 0===I?void 0:I.enableClIdInCookies){try{var R=(kb("Conviva_sdkConfig",B,void 0,"/",oa(),"None",!0),!0)}catch(ha){R=(ea.warn("setConvivaCookie",ha),!1)}!R}return!0}catch(ha){}})(Z(Z({},K),{clId:vc,iid:gd}))}catch(J){return void ea.warn("getEventIndexByClid",J)}}(),!uc||dd){var k="none"!=Ia&&!!w("ses"),r=V();Zc=function(v,A){var D;return v[1]?D=v[1]:A?(D="",v[1]=D):(D=sb.v4(),v[1]=D),D}(r,uc);Jb=k?r[6]:oc(r);fb=r[3];"none"!=Ia&&(C(),Jd(r),L(r))}}function V(){return"none"==
Ia?["1","",0,0,0,void 0,"","","",void 0]:function(k,r,v,A){var D,K=Math.round((new Date).getTime()/1E3);k?(D=k.split(".")).unshift("0"):D=["1",r,K,A,K,"",v];D[6]&&"undefined"!==D[6]||(D[6]=sb.v4());D[7]&&"undefined"!==D[7]||(D[7]="");D[8]&&"undefined"!==D[8]||(D[8]="");D[9]&&"undefined"!==D[9]||(D[9]="");D[10]&&"undefined"!==D[10]||(D[10]=-1);var J=function(I,B){I=parseInt(I);return isNaN(I)?B:I};k=function(I){return I?J(I,void 0):void 0};return[D[0],D[1],J(D[2],K),J(D[3],A),J(D[4],K),k(D[5]),D[6],
D[7],D[8],k(D[9])]}(w("id")||void 0,Zc,Jb,fb)}function ja(k,r){var v,A,D,K,J=!0,I=xb.getConfig();return void 0!==I.mend?J=I.mend:void 0!==(null===(A=null===(v=null==p?void 0:p.configs)||void 0===v?void 0:v.network)||void 0===A?void 0:A.mergeEndpoint)&&(J=null===(K=null===(D=null==p?void 0:p.configs)||void 0===D?void 0:D.network)||void 0===K?void 0:K.mergeEndpoint),0===k.indexOf("http")?(r&&J&&(k=k.replace(/^(https?:\/\/)(.*)$/,"$1"+r+".$2")),k):r&&J?("https:"===document.location.protocol?"https":
"http")+"://"+r+"."+k:("https:"===document.location.protocol?"https":"http")+"://"+k}function U(){zf&&null!=q.pageViewId||(q.pageViewId=sb.v4())}function na(){return null==q.pageViewId&&(q.pageViewId=sb.v4()),q.pageViewId}function oa(){var k=window.location.hostname,r=k.split(".");return 2<=r.length?"."+r.slice(-2).join("."):k}function ta(){try{return N({"First Launch":"Yes"}),Math.floor(2147483647*Math.random()).toString()+"."+Math.floor(2147483647*Math.random()).toString()+"."+Math.floor(2147483647*
Math.random()).toString()+"."+Math.floor(2147483647*Math.random()).toString()}catch(k){return void console.warn(k)}}function fa(){try{return Math.floor(2147483647*Math.random())}catch(k){return console.warn(k),-1}}function W(k){try{return"object"===la(JSON.parse(k))}catch(r){return!1}}function N(k){try{var r=Object.keys(k);W(JSON.stringify(k))?r.forEach(function(v){if(""!==v.trim()){var A=k[v];A&&""!==A&&(A="object"===la(A)?JSON.stringify(A):""+A,Object.defineProperty(wc,v,{value:A,writable:!0,enumerable:!0,
configurable:!0}))}}):console.warn("Conviva AppTracker:: Invalid JSON Format")}catch(v){console.warn("Conviva AppTracker:: Invalid JSON Format: Error Message=",v)}}function ua(k){try{k.forEach(function(r){delete wc[r]})}catch(r){console.warn("Conviva AppTracker:: Failed to unset Custom tag(s). Check format of keys set.")}}function Na(k){var r=k.title,v=k.context,A=k.timestamp;k=k.contextCallback;n();Pd&&U();Pd=!0;yb=document.title;r=Gd((xc=r)||yb);Lb()!==H.SAMPLING_MODES.NONE&&(Oa(),xb.track(function(J){var I=
J.pageUrl,B=J.pageTitle;J=J.referrer;var R=xd();return R.add("e","pv"),R.add("url",I),R.add("page",B),R.add("refr",J),R}({pageUrl:x(yc||ob),pageTitle:r,referrer:x(id||sc)}),(v||[]).concat(k?k():[]),A));A=new Date;r=!1;if(Qa.enabled&&!Qa.installed){r=Qa.installed=!0;var D={update:function(){if("undefined"!=typeof window&&"function"==typeof window.addEventListener){var J=!1,I=Object.defineProperty({},"passive",{get:function(){J=!0},set:function(){}}),B=function(){};window.addEventListener("testPassiveEventSupport",
B,I);window.removeEventListener("testPassiveEventSupport",B,I);D.hasSupport=J}}};D.update();var K="onwheel"in document.createElement("div")?"wheel":void 0!==document.onmousewheel?"mousewheel":"DOMMouseScroll";Object.prototype.hasOwnProperty.call(D,"hasSupport")?ab(document,K,t,{passive:!0}):ab(document,K,t);Q();K=function(J,I){return void 0===I&&(I=t),function(B){return ab(document,B,I)}};"click mouseup mousedown mousemove keypress keydown keyup".split(" ").forEach(K(document));["resize","focus",
"blur"].forEach(K(window));K(window,F)("scroll")}if(Qa.enabled&&(ih||r))for(A in Nd=A.getTime(),A=void 0,Qa.configurations)(r=Qa.configurations[A])&&(window.clearInterval(r.activityInterval),P(r,v,k))}function M(){var k,r,v,A,D,K,J,I,B,R,ha,Ja,Fa,Ra,ca,X,qa,Ga,gb,zc,Ac,Mb,Qd,Rd,Sd,Td,Ud,Vd,Wd,Xd,Yd,Zd,Af;try{var Da=null===(k=null==f?void 0:f.core)||void 0===k?void 0:k.getConfig();k=void 0;$d={};var jd=Yb.MERGE;switch(void 0!==(null===(v=null===(r=null==p?void 0:p.configs)||void 0===r?void 0:r.metaTagsTracking)||
void 0===v?void 0:v.preference)?jd=null===(D=null===(A=null==p?void 0:p.configs)||void 0===A?void 0:A.metaTagsTracking)||void 0===D?void 0:D.preference:!0===(null===(J=null===(K=null==p?void 0:p.configs)||void 0===K?void 0:K.metaTagsTracking)||void 0===J?void 0:J.force)?jd=Yb.APP:void 0!==(null===(I=null==Da?void 0:Da.metaTagsTrackingConfiguration)||void 0===I?void 0:I.pref)&&(jd=null===(B=null==Da?void 0:Da.metaTagsTrackingConfiguration)||void 0===B?void 0:B.pref),jd){case Yb.APP:if(!1===(null===
(ha=null===(R=null==p?void 0:p.configs)||void 0===R?void 0:R.metaTagsTracking)||void 0===ha?void 0:ha.enabled))return;0<(null===(Ra=null===(Fa=null===(Ja=null==p?void 0:p.configs)||void 0===Ja?void 0:Ja.metaTagsTracking)||void 0===Fa?void 0:Fa.tags)||void 0===Ra?void 0:Ra.length)&&(k=Ea([],null===(X=null===(ca=null==p?void 0:p.configs)||void 0===ca?void 0:ca.metaTagsTracking)||void 0===X?void 0:X.tags,!0));break;case Yb.REMOTE:if(!1===(null===(qa=null==Da?void 0:Da.metaTagsTrackingConfiguration)||
void 0===qa?void 0:qa.enabled))return;void 0!==(null==Da?void 0:Da.metaTagsTrackingConfiguration)&&0<(null===(gb=null===(Ga=null==Da?void 0:Da.metaTagsTrackingConfiguration)||void 0===Ga?void 0:Ga.tags)||void 0===gb?void 0:gb.length)&&(k=Ea([],null===(zc=null==Da?void 0:Da.metaTagsTrackingConfiguration)||void 0===zc?void 0:zc.tags,!0));break;default:if(void 0===(null==Da?void 0:Da.metaTagsTrackingConfiguration)&&!1===(null===(Mb=null===(Ac=null==p?void 0:p.configs)||void 0===Ac?void 0:Ac.metaTagsTracking)||
void 0===Mb?void 0:Mb.enabled)||void 0===(null===(Qd=null==p?void 0:p.configs)||void 0===Qd?void 0:Qd.metaTagsTracking)&&!1===(null===(Rd=null==Da?void 0:Da.metaTagsTrackingConfiguration)||void 0===Rd?void 0:Rd.enabled))return;var Bf=null===(Td=null===(Sd=null==p?void 0:p.configs)||void 0===Sd?void 0:Sd.metaTagsTracking)||void 0===Td?void 0:Td.tags,Cf=null===(Ud=null==Da?void 0:Da.metaTagsTrackingConfiguration)||void 0===Ud?void 0:Ud.tags;!1===(null===(Wd=null===(Vd=null==p?void 0:p.configs)||void 0===
Vd?void 0:Vd.metaTagsTracking)||void 0===Wd?void 0:Wd.enabled)&&(Bf=[]);!1===(null===(Xd=null==Da?void 0:Da.metaTagsTrackingConfiguration)||void 0===Xd?void 0:Xd.enabled)&&(Cf=[]);k=Ea([],(Af=Cf||[],Ea(Ea([],Bf||[],!0),Af,!0).reduce(function(Bc,kd){var ae=Bc.find(function(jh){return jh.key===kd.key});return ae?kd.condition&&(ae.condition=Ea(Ea([],ae.condition||[],!0),kd.condition,!0)):Bc.push(Z({},kd)),Bc},[])),!0)}if(void 0!==k&&0<(null==k?void 0:k.length)){r={};var Zb=null===document||void 0===
document?void 0:document.head,Cc=null==Zb?void 0:Zb.getElementsByTagName("meta");if(void 0!==Cc&&0<(null==Cc?void 0:Cc.length))for(Zb=0;Zb<Cc.length;Zb++){var Df=Cc[Zb];for(v=0;v<k.length;v++){var ld=Df.getAttribute(k[v].key),Ef=Df.getAttribute(k[v].value);A=void 0;(null===(Yd=k[v])||void 0===Yd?0:Yd.condition)&&(A=null===(Zd=k[v])||void 0===Zd?void 0:Zd.condition);ld&&(A&&A.includes(ld)?r[ld]=Ef:A&&0!==A.length||(r[ld]=Ef))}}f.setMetaCustomTags(r)}}catch(Bc){console.warn("Conviva App Tracker:: setPageMetaTagsAsCustomTags",
Bc)}}function P(k,r,v){var A=function(K,J){var I;n();var B=null===(I=null==f?void 0:f.core)||void 0===I?void 0:I.getConfig();B.enablePeriodicHeartbeat?(null!=B.periodicHeartbeatInterval&&(I=1E3*B.periodicHeartbeatInterval,I!=k.configHeartBeatTimer&&(k.configHeartBeatTimer=I,window.clearInterval(k.activityInterval),k.activityInterval=window.setInterval(D,I))),K({context:J,pageViewId:na(),minXOffset:$c,minYOffset:bd,maxXOffset:ad,maxYOffset:cd})):window.clearInterval(k.activityInterval);Q()};window.setTimeout(function(){A(k.callback,
(r||[]).concat(v?v():[]))},2E3);var D=function(){var K=new Date;(!1===(null===document||void 0===document?void 0:document.hidden)||"visible"==(null===document||void 0===document?void 0:document.visibilityState)||(null===document||void 0===document?0:document.pictureInPictureElement)||Nd+k.configHeartBeatTimer>K.getTime()||!0===Ff)&&A(k.callback,(r||[]).concat(v?v():[]))};k.activityInterval=window.setInterval(D,k.configHeartBeatTimer)}function Y(k){var r=k.minimumVisitLength,v=k.heartbeatDelay;k=k.callback;
if(lc(r)&&lc(v))return{configMinimumVisitLength:1E3*r,configHeartBeatTimer:1E3*v,callback:k};ea.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function aa(k){var r=k.context,v=k.minXOffset,A=k.minYOffset,D=k.maxXOffset,K=k.maxYOffset;k=document.title;k!==yb&&(yb=k,xc=void 0);if(Lb()!==H.SAMPLING_MODES.NONE){Oa();k=xb;var J=k.track;var I=x(yc||ob);var B=Gd(xc||yb),R=x(id||sc);v=Math.round(v);D=Math.round(D);A=Math.round(A);K=Math.round(K);var ha=xd();I=(ha.add("e",
"pp"),ha.add("url",I),ha.add("page",B),ha.add("refr",R),v&&!isNaN(Number(v))&&ha.add("pp_mix",v.toString()),D&&!isNaN(Number(D))&&ha.add("pp_max",D.toString()),A&&!isNaN(Number(A))&&ha.add("pp_miy",A.toString()),K&&!isNaN(Number(K))&&ha.add("pp_may",K.toString()),ha);J.call(k,I,r)}}function Oa(){var k,r,v=null===(r=null==f?void 0:f.core)||void 0===r?void 0:r.getConfig().pageUrlTrackingConfig;r=wc[H.PAGE_URL_QUERY_PARAMS];if(v){var A={targetUrl:x(yc||ob),rqq:{}};A=$e(A,null==v?void 0:v.collectattr,
null,null==v?void 0:v.maxQueryLength);(!r&&A.rqq||r!==JSON.stringify(A.rqq))&&(ua([H.PAGE_URL_QUERY_PARAMS]),function(D){try{var K=Object.keys(D);W(JSON.stringify(D))?K.forEach(function(J){if(""!==J.trim()){var I=D[J];I&&""!==I&&("object"===la(I)||(I=""+I),Object.defineProperty(wc,J,{value:I,writable:!0,enumerable:!0,configurable:!0}))}}):console.warn("Conviva AppTracker:: Invalid JSON Format")}catch(J){console.warn("Conviva AppTracker:: Invalid JSON Format: Error Message=",J)}}(((k={})[H.PAGE_URL_QUERY_PARAMS]=
A.rqq,k)))}else r&&ua([H.PAGE_URL_QUERY_PARAMS])}var Pa,Va,Ca,sa,Ba,mb,Vb,nb,wb,be,ce,de,ee,fe,ge,he;if(window&&window.localStorage){var kh=window.localStorage,$b={sensorVersion:m,ck:null!==(Pa=p.convivaCustomerKey)&&void 0!==Pa?Pa:""};$b=JSON.stringify($b);$b="function"==typeof btoa?btoa($b):function(k){k=unescape(encodeURIComponent(k));for(var r="",v=0;v<k.length;){var A=k.charCodeAt(v++),D=k.charCodeAt(v++),K=k.charCodeAt(v++),J=A>>2;A=(3&A)<<4|D>>4;D=isNaN(D)?64:(15&D)<<2|K>>6;K=isNaN(K)?64:63&
K;r+=Ya.charAt(J)+Ya.charAt(A)+Ya.charAt(D)+Ya.charAt(K)}return r}($b);kh.setItem(H.VISUAL_LABELLING_CONFIG,$b)}var ie=zb,lh=Ua;ie&&lh||("function"==typeof AbortController&&(zb=new AbortController),Ua=null==zb?void 0:zb.signal);l||(l="CAT");var nd=function(k,r,v){var A,D,K,J,I,B={},R={};if("undefined"!=typeof window&&(null===window||void 0===window?0:window.localStorage))try{localStorage.removeItem(H.END_POINT_STORAGE_KEY),(I=localStorage.getItem(H.REMOTE_CONFIG_STORAGE_KEY))?va=H.CONFIG_SOURCE.CACHED:
I=JSON.stringify(R)}catch(ca){I=JSON.stringify(R);md=!0;var ha={className:"fetchRemoteConfig - localstorage",error:ca,configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:da.getSamplingMode,ha)},0);ea.warn("Issue while fetching data from local storage")}else I=JSON.stringify(R);try{B=JSON.parse(I)}catch(ca){md=!0;var Ja={className:"fetchRemoteConfig - parsing cached data",error:ca,configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:
da.getSamplingMode,Ja)},0);ea.warn("Issue while parsing storedConvivaRemoteConfig")}R=(new Gf).setBase64(null==B?void 0:B.base64).setCacheRefreshInterval(null==B?void 0:B.cacheRefreshInterval).setLifecycleAutotracking(null==B?void 0:B.lifecycleAutotracking).setExceptionAutotracking(null==B?void 0:B.exceptionAutotracking).setEnablePeriodicHeartbeat(null==B?void 0:B.enablePeriodicHeartbeat).setPeriodicHeartbeatInterval(null==B?void 0:B.periodicHeartbeatInterval).setEnc(null==B?void 0:B.enc,null===(D=
null===(A=null==v?void 0:v.configs)||void 0===A?void 0:A.network)||void 0===D?void 0:D.encoding).setMaxLocalStorageQueueSize(null==B?void 0:B.maxLocalStorageQueueSize).setMaxGetBytes(null==B?void 0:B.maxGetBytes).setBufferSize(null==B?void 0:B.bufferSize).setCustomEventTrackingConfiguration(null==B?void 0:B.customEventTrackingConfiguration).setEndPoint(null==B?void 0:B.endpoint,v.gatewayUrl,v.proxyGatewayUrl).setNetworkRequestTrackingConfiguration(null==B?void 0:B.networkRequestTrackingConfiguration,
!1).setMetaTagsTrackingConfiguration(null==B?void 0:B.metaTagsTrackingConfiguration).setTraceparentconfig(null==B?void 0:B.traceparentconfig).setMend(null==B?void 0:B.mend,null===(J=null===(K=null==v?void 0:v.configs)||void 0===K?void 0:K.network)||void 0===J?void 0:J.mergeEndpoint).setPerformanceContextConfig(null==B?void 0:B.performanceContextConfig).setConfigurationVersion(null==B?void 0:B.configurationVersion).setCatRcLastUpdatedTs(null==B?void 0:B.catRcLastUpdatedTs).setEmitterConfiguration(null==
B?void 0:B.emitterConfiguration).setcontrolIngestConfig(null==B?void 0:B.controlIngestConfig).setApplicationContext(null==B?void 0:B.applicationContext).setDi(null==B?void 0:B.di).setClickcc(null==B?void 0:B.clickcc).setCollectionRateLimit(null==B?void 0:B.collectionRateLimit).setPageUrlTrackingConfig(null==B?void 0:B.pageUrlTrackingConfig).setEvtStreamTrackingConfiguration(null==B?void 0:B.evtStreamTrackingConfiguration).build();A="Cached Config Applied";va===H.CONFIG_SOURCE.DEFAULT&&(A="Default Config Applied");
xa=(new Date).getTime();var Fa={message:A,className:"browserTrackerCore",configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:da.getSamplingMode,Fa)},0);k=k.split("js-")[1].split(" ")[0];var Ra=(v.proxyGatewayUrl?v.proxyGatewayUrl+"/js/":H.REMOTE_CONFIG_URL_PREFIX)+v.convivaCustomerKey+"/"+k+H.REMOTE_CONFIG_FILE_NAME;return window.XMLHttpRequest&&((bb=new XMLHttpRequest).onreadystatechange=function(){var ca;try{if(4==bb.readyState)if(ac=!1,200==bb.status){var X={message:"Remote config request is successful - ".concat("number"==
typeof bb.status?bb.status:""),className:"configtimerCallback - onreadystatechange",configAppliedSrc:va,configAppliedTime:xa};za(ra,null==da?void 0:da.getSamplingMode,X);bc=0;var qa=JSON.parse(bb.response);X=ra;if((null==qa?void 0:qa.configurationBundle[0].namespace)!==r)return void za(ra,null==da?void 0:da.getSamplingMode,{message:"Remote Config not Applied due to a missing namespace",className:"updateRemoteConfig",configAppliedSrc:va,configAppliedTime:xa});if(!qa.hasOwnProperty("configurationVersion")||
(null===(ca=X.getConfig())||void 0===ca?void 0:ca.configurationVersion)===(null==qa?void 0:qa.configurationVersion)){var Ga=localStorage.getItem(H.REMOTE_CONFIG_STORAGE_KEY);if(Ga)return(Ga=JSON.parse(Ga)).catRcLastUpdatedTs=(new Date).getTime(),window.localStorage&&(localStorage.removeItem(H.REMOTE_CONFIG_STORAGE_KEY),localStorage.setItem(H.REMOTE_CONFIG_STORAGE_KEY,JSON.stringify(Ga))),void za(ra,null==da?void 0:da.getSamplingMode,{message:"Remote Config not Applied as same version is fetched",
className:"updateRemoteConfig",configAppliedSrc:va,configAppliedTime:xa})}R.catRcLastUpdatedTs=(new Date).getTime();var gb=qa.cri||qa.cacheRefreshInterval||ka.cacheRefreshInterval;if(gb=1>gb?ka.cacheRefreshInterval:lc(gb)?gb:ka.cacheRefreshInterval,R.cacheRefreshInterval!=gb&&(R.cacheRefreshInterval=gb,Hf(R.cacheRefreshInterval,R.catRcLastUpdatedTs,v,Ra,H.RC_FETCH_MODE.DO_NOT_FETCH_UPDATE_TIMER)),mh(qa,R.catRcLastUpdatedTs,v)){var zc=new Event("RemoteConfigUpdateApplied");(null===window||void 0===
window?0:window.dispatchEvent)&&window.dispatchEvent(zc)}}else try{2>bc&&window.setTimeout(function(){(null==v?0:v.trackerConfigUrl)?cc(null==v?void 0:v.trackerConfigUrl,!0):cc(Ra,!0)},5E3*(bc+1));var Ac={message:"Remote config request is not successful - ".concat("number"==typeof bb.status?bb.status:""),className:"configtimerCallback - onreadystatechange",configAppliedSrc:va,configAppliedTime:xa};(za(ra,null==da?void 0:da.getSamplingMode,Ac),2<=bc)&&za(ra,null==da?void 0:da.getSamplingMode,{message:"Remote config is not applied since failed to download remote config after 3 tries",
className:"configtimerCallback - onreadystatechange",configAppliedSrc:va,configAppliedTime:xa})}catch(Mb){}}catch(Mb){ac=!1,console.warn("Conviva App Tracker:: Error in fetching remote-config ".concat(Mb)),za(ra,null==da?void 0:da.getSamplingMode,{className:"configtimerCallback - onreadystatechange",error:Mb,configAppliedSrc:va,configAppliedTime:xa})}},Hf(R.cacheRefreshInterval,R.catRcLastUpdatedTs,v,Ra,void 0!==md&&!0===md?H.RC_FETCH_MODE.IMMEDIATE_FETCH:H.RC_FETCH_MODE.UPDATE_TIMER_WITH_DIFF)),
{convivaRemoteTrackerConfig:R}}(m,l,p).convivaRemoteTrackerConfig;null===(Va=Uc(nd.performanceContextConfig))||void 0===Va||Va.activateLCPObserver();p.eventMethod=null!==(Ca=p.eventMethod)&&void 0!==Ca?Ca:"post";var wf=function(k){var r;return null!==(r=k.stateStorageStrategy)&&void 0!==r?r:"cookieAndLocalStorage"},xf=function(k){var r,v;return"boolean"!=typeof k.anonymousTracking&&null!==(v=!0===(null===(r=k.anonymousTracking)||void 0===r?void 0:r.withSessionTracking))&&void 0!==v&&v},yf=function(k){var r,
v;return"boolean"!=typeof k.anonymousTracking&&null!==(v=!0===(null===(r=k.anonymousTracking)||void 0===r?void 0:r.withServerAnonymisation))&&void 0!==v&&v};g.push({beforeTrack:function(k){var r=w("ses"),v=V();if(je=!!ke&&!!kb(ke),If||je)T();else{var A;if("0"===v[0]?(Jb=r||"none"==Ia?v[6]:oc(v),fb=v[3]):(new Date).getTime()-le>1E3*uf&&(fb++,Jb=oc(v,fb)),Jd(v),k.add("uid",(A=Kb,uc?null:A)),n(),k.add("refr",x(id||sc)),document)yb=document.title,r=Gd(xc||yb),k.add("page",r);k.add("url",x(yc||ob));"none"!=
Ia&&(L(v),C());le=(new Date).getTime()}}});g.push({contexts:function(){return[{sc:"cv/clid/1-0-2",dt:{clid:vc,iid:gd.toString(),ck:nh,eventIndex:hd++}}]}});g.push({contexts:function(){return[{sc:"cv/ct/1-0-0",dt:(k={data:Z(Z({},wc),$d)},k)}];var k}});g.push({contexts:function(){var k,r=null===(k=null==f?void 0:f.core)||void 0===k?void 0:k.getConfig();return!0===(null==r?void 0:r.applicationContext)?[{sc:"spm/app/1-0-0",dt:{build:Jf,version:Jf}}]:[]}});g.push({contexts:function(){var k={sch:"sdk.js.eco.1"};
k.cat=Kf.WEB;try{var r=null==p?void 0:p.deviceMetadata;if(r){var v=r.DeviceBrand,A=r.DeviceCategory,D=r.DeviceManufacturer,K=r.DeviceModel,J=r.DeviceType,I=r.DeviceVersion,B=r.OperatingSystemName,R=r.OperatingSystemVersion,ha=r.FrameworkName,Ja=r.FrameworkVersion;"string"==typeof A&&Object.values(Kf).includes(A)?k.cat=A:k.cat="INVALID"+(A?": ".concat(A):"");"string"==typeof v&&""!=v&&(k.dvb=v);"string"==typeof D&&""!=D&&(k.dvma=D);"string"==typeof K&&""!=K&&(k.dvm=K);J&&Object.values(oh).includes(J)&&
(k.dvt=J);"string"==typeof I&&""!=I&&(k.dvv=I);"string"==typeof B&&""!=B&&(k.os=B);"string"==typeof R&&""!=R&&(k.osv=R);"string"==typeof ha&&""!=ha&&(k.fw=ha);"string"==typeof Ja&&""!=Ja&&(k.fwv=Ja)}}catch(Fa){ea.warn("error in setting platform metadata context",Fa)}return null!=k&&0<Object.keys(k).length?[{sc:"iglu:com.conviva/pm/jsonschema/1-0-2",dt:k}]:[]}});try{(null!==(sa=null==p?void 0:p.plugins)&&void 0!==sa?sa:[]).forEach(function(k){k.contexts||g.push(k)})}catch(k){console.warn("ConvivaAppTracker : issue while processing customer passed pligins",
k)}var id,yc,xc,sf,tf,ke,vc,gd,Nd,$c,ad,bd,cd,Ib,Zc,Jb,Kb,je,Lb=function(){var k;try{var r=null===(k=null==f?void 0:f.core)||void 0===k?void 0:k.getConfig();return r?void 0===r.catRcLastUpdatedTs||0===r.catRcLastUpdatedTs?H.SAMPLING_MODES.RCFG:r.controlIngestConfig?function(v){try{if(void 0===v.sel)return Tc(),H.SAMPLING_MODES.RCFG;var A=v.sel.pct;if("number"==typeof A&&100>A&&0<A&&0==A%1){if("undefined"!=typeof window&&void 0!==window.localStorage){var D=localStorage.getItem(H.SAMPLING_STORAGE_RANDOM_NUMBER_KEY);
if(null!=D)return parseFloat(D)<=A?Id(v,H.SAMPLING_ACTION.SAMPLED):Id(v,H.SAMPLING_ACTION.NON_SAMPLED);var K=100*Math.random();return localStorage.setItem(H.SAMPLING_STORAGE_RANDOM_NUMBER_KEY,K.toString()),Id(v,K<A?H.SAMPLING_ACTION.SAMPLED:H.SAMPLING_ACTION.NON_SAMPLED)}return H.SAMPLING_MODES.NONE}return"number"==typeof A&&0===A?(Tc(),H.SAMPLING_MODES.NONE):(Tc(),H.SAMPLING_MODES.RCFG)}catch(J){}return H.SAMPLING_MODES.RCFG}(null==r?void 0:r.controlIngestConfig):H.SAMPLING_MODES.RCFG:H.SAMPLING_MODES.RCFG}catch(v){return ea.error("Error while getting sampling mode"),
H.SAMPLING_MODES.RCFG}},xb=ph(nd,g,function(k){If||je||pb.enqueueRequest(k.build(),me,function(r){var v,A,D,K=null!==(D=null===(A=null===(v=xb.getConfig().emitterConfiguration)||void 0===v?void 0:v.batching)||void 0===A?void 0:A.urgentEvents)&&void 0!==D?D:[],J=v="",I="",B="";A=r.getPayload();"string"==typeof A.e&&(B=A.e);if("ue"!==B&&"pv"!==B&&"pp"!==B)return!1;r=r.getJson().find(function(R){return"ue_pr"===R.keyIfNotEncoded||"ue_px"===R.keyIfEncoded});void 0!==r&&(r=r.json,"object"===la(r.dt)&&
null!==r.dt&&(r=r.dt,"string"==typeof r.sc&&(v=r.sc),"object"===la(r.dt)&&"string"==typeof r.dt.name&&(J=r.dt.name)),I=v.split("/")[1]||"");return K.some(function(R){R=R.toLowerCase();return""!==R&&(R===B.toLowerCase()||R===I.toLowerCase()||R===J.toLowerCase())})}(k))}),Wb=cf(window.location.hostname,window.location.href,Hd()),rf=Xe(Wb[0]),ob=Wb[1],sc=Wb[2],qh=null!==(Ba=p.platform)&&void 0!==Ba?Ba:"web",me=ja(nd.endpoint,p.convivaCustomerKey),rh=null!==(mb=p.postPath)&&void 0!==mb?mb:"/ctp",sh=null!==
(Vb=p.appId)&&void 0!==Vb?Vb:"",nh=null!==(nb=p.convivaCustomerKey)&&void 0!==nb?nb:"",Jf=null!==(wb=p.appVersion)&&void 0!==wb?wb:"",wc={},$d={},yb="undefined"!=typeof document?document.title:void 0,ih=null===(be=p.resetActivityTrackingOnPageView)||void 0===be||be,Xb=null!==(ce=p.cookieName)&&void 0!==ce?ce:"_cnv_",tc=null!==(de=p.cookieDomain)&&void 0!==de?de:void 0,Md="/",ed=null!==(ee=p.cookieSameSite)&&void 0!==ee?ee:"None",fd=null===(fe=p.cookieSecure)||void 0===fe||fe,Lf=navigator.doNotTrack||
navigator.msDoNotTrack||window.doNotTrack,If=void 0!==p.respectDoNotTrack&&p.respectDoNotTrack&&("yes"===Lf||"1"===Lf),vf=null!==(ge=p.cookieLifetime)&&void 0!==ge?ge:63072E3,uf=null!==(he=p.sessionCookieTimeout)&&void 0!==he?he:1800,dd=xf(p),Od=yf(p),uc=!!p.anonymousTracking,Ia=wf(p),hd=-1,le=(new Date).getTime(),fb=1,pb=function(k,r,v,A,D,K,J,I){var B,R,ha,Ja,Fa=ra,Ra=function(){var ca=Fa.getConfig();return!ca.emitterConfiguration||!ca.emitterConfiguration.batching||ca.emitterConfiguration.batching.enabled};
return bh(k,r,"localStorage"==v||"cookieAndLocalStorage"==v,A.eventMethod,D,function(){var ca,X=Fa.getConfig();return null!==(ca=X.bufferSize?X.bufferSize:A.bufferSize)&&void 0!==ca?ca:20}(),function(){var ca,X=Fa.getConfig();return null!==(ca=X.maxGetBytes?X.maxGetBytes:A.maxGetBytes)&&void 0!==ca?ca:0},null===(B=A.useStm)||void 0===B||B,function(){var ca,X=Fa.getConfig();return null!==(ca=X.maxLocalStorageQueueSize?X.maxLocalStorageQueueSize:A.maxLocalStorageQueueSize)&&void 0!==ca?ca:10},null!==
(R=A.connectionTimeout)&&void 0!==R?R:3E4,K,null!==(ha=A.customHeaders)&&void 0!==ha?ha:{},null!==(Ja=A.withCredentials)&&void 0!==Ja&&Ja,J,function(){var ca,X,qa,Ga=Fa.getConfig();return null!==(qa=(null==Ga?0:Ga.enc)?Ga.enc:null===(X=null===(ca=null==A?void 0:A.configs)||void 0===ca?void 0:ca.network)||void 0===X?void 0:X.encoding)&&void 0!==qa?qa:lb.GZIP},Ra,function(){var ca,X,qa=Fa.getConfig();return Ra()?"number"==typeof(null===(X=null===(ca=qa.emitterConfiguration)||void 0===ca?void 0:ca.batching)||
void 0===X?void 0:X.byteLimitPostInKB)?1E3*qa.emitterConfiguration.batching.byteLimitPostInKB:25E4:4E4},function(){var ca,X,qa=null===(X=null===(ca=Fa.getConfig().emitterConfiguration)||void 0===ca?void 0:ca.batching)||void 0===X?void 0:X.batchingIntervalInSec;return 1E3*("number"==typeof qa?qa:5)},I)}(h,q,Ia,p,rh,Od,5E3,Lb),zf=!1,Pd=!1,Qa={enabled:!0,installed:!1,configurations:{pagePing:{configMinimumVisitLength:5E3,configHeartBeatTimer:1E3*nd.periodicHeartbeatInterval,callback:aa}}},Ff=!1;p.hasOwnProperty("discoverRootDomain")&&
p.discoverRootDomain&&(tc=function(k,r){for(var v=window.location.hostname,A="_cnv_root_domain_test_"+(new Date).getTime(),D="_test_value_"+(new Date).getTime(),K=v.split("."),J=K.length-1;0<=J;){var I=K.slice(J,K.length).join(".");if(kb(A,D,0,"/",I,k,r),kb(A)===D){nc(A,I,k,r);v=document.cookie.split("; ");A=[];for(D=0;D<v.length;D++)"_cnv_root_domain_test_"===v[D].substring(0,22)&&A.push(v[D]);v=A;for(A=0;A<v.length;A++)nc(v[A],I,k,r);return I}--J}return v}(ed,fd));xb.setTrackerVersion(m);xb.setAppId(sh);
xb.setPlatform(qh);u();ma();pb.setCustomHeaders({"x-client-id":""+vc});p.crossDomainLinker&&E(p.crossDomainLinker);var ne={getDomainSessionIndex:function(){return fb},getPageViewId:function(){return na()},newSession:function(){var k=V();"0"===k[0]?(Jb="none"!=Ia?oc(k):k[6],fb=k[3],C()):(fb++,Jb=oc(k,fb));Jd(k);"none"!=Ia&&(L(k),C());le=(new Date).getTime()},getCookieName:function(k){return Xb+k+"."+Ib},getUserId:function(){return Kb},getDomainUserId:function(){var k=V();return k&&1<k.length?k[1]:
null},getDomainUserInfo:function(){return V()},setReferrerUrl:function(k){id=k},setCustomUrl:function(k){n();var r=ob,v;yc=z(k)?k:"/"===k.slice(0,1)?z(r)+"://"+Rc(r)+k:(0<=(v=(r=x(r)).indexOf("?"))&&(r=r.slice(0,v)),(v=r.lastIndexOf("/"))!==r.length-1&&(r=r.slice(0,v+1)),r+k)},setDocumentTitle:function(k){yb=document.title;xc=k},discardHashTag:function(k){sf=k},discardBrace:function(k){tf=k},setCookiePath:function(k){Md=k;u()},setVisitorCookieTimeout:function(k){vf=k},crossDomainLinker:function(k){E(k)},
enableActivityTracking:function(k){Qa.configurations.pagePing||(Qa.enabled=!0,Qa.configurations.pagePing=Y(Z(Z({},k),{callback:aa})))},enableActivityTrackingCallback:function(k){Qa.configurations.callback||(Qa.enabled=!0,Qa.configurations.callback=Y(k))},updatePageActivity:function(){t()},setOptOutCookie:function(k){ke=k},setUserId:function(k){Kb=k},setUserIdFromLocation:function(k){n();Kb=mc(k,ob)},setUserIdFromReferrer:function(k){n();Kb=mc(k,sc)},setUserIdFromCookie:function(k){Kb=kb(k)},setCollectorUrl:function(k,
r){me=ja(k,r);pb.setCollectorUrl(me)},setBufferSize:function(k){pb.setBufferSize(k)},flushBuffer:function(k){void 0===k&&(k={});pb.executeQueue();k.newBufferSize&&pb.setBufferSize(k.newBufferSize)},trackPageView:function(k){var r;void 0===k&&(k={});M();var v=null===(r=null==f?void 0:f.core)||void 0===r?void 0:r.getConfig();try{k=Z(Z({},k),{context:Uc(null==v?void 0:v.performanceContextConfig).contexts()})}catch(A){console.warn("Conviva App Tracker:: error adding performacetiming context to page view",
A)}Na(k)},trackVideoEvent:function(k){var r,v,A,D,K;void 0===k&&(k={});try{var J=null===(r=null==f?void 0:f.core)||void 0===r?void 0:r.getConfig();if(null!==(A=null===(v=null==J?void 0:J.customEventTrackingConfiguration)||void 0===v?void 0:v.enabled)&&void 0!==A?A:ka.customEventTrackingConfiguration.enabled){""!=k.name&&null!=k.name||console.warn("Conviva App Tracker:: Video event could not be tracked due to missing name property!!");var I=null===(D=null==J?void 0:J.customEventTrackingConfiguration)||
void 0===D?void 0:D.blocklist;(null==I?0:I.includes("*"))||(null==I?0:I.some(function(B){return 0<(null==B?void 0:B.length)&&k.name.toLowerCase().includes(B.toLowerCase())}))||null===(K=null==f?void 0:f.core)||void 0===K||K.track(function(B){return Eb({event:{sc:"cv/ve/1-0-5",dt:Tb({name:B.name,sid:B.sid,iid:B.iid,clid:B.clid,st:B.st,sst:B.sst,an:B.an,cl:B.cl,lv:B.lv,pn:B.pn,vid:B.vid,fw:B.fw,fwv:B.fwv,mn:B.mn,mv:B.mv,url:B.url,tags:B.tags,cen:B.cen,ced:B.ced,oldsc:B.oldsc,newsc:B.newsc,err:B.err,
br:B.br,ft:B.ft,avgbr:B.avgbr})}})}({name:k.name,sid:k.sid,iid:k.iid,clid:k.clid,st:k.st,sst:k.sst,an:k.an,cl:k.cl,lv:k.lv,pn:k.pn,vid:k.vid,fw:k.fw,fwv:k.fwv,mn:k.mn,mv:k.mv,url:k.url,tags:k.tags,cen:k.cen,ced:k.ced,oldsc:k.old,newsc:k.new,err:k.err,br:k.br,ft:k.ft,avgbr:k.avgbr}),k.context,k.timestamp)}}catch(B){console.warn("Conviva App Tracker:: Video event could not be tracked due to an exception!!",B)}},trackCustomEvent:function(k){var r,v,A,D,K;void 0===k&&(k={});try{if(Lb()!==H.SAMPLING_MODES.NONE){var J=
null===(r=null==f?void 0:f.core)||void 0===r?void 0:r.getConfig();if(null!==(A=null===(v=null==J?void 0:J.customEventTrackingConfiguration)||void 0===v?void 0:v.enabled)&&void 0!==A?A:ka.customEventTrackingConfiguration.enabled){if(!k.name||"string"==typeof k.name&&""==k.name.trim())return void console.warn("Conviva App Tracker:: custom event name is mandatory for trackCustomEvent API!!");var I=k.data;try{"string"!=typeof k.data&&(I=JSON.stringify(k.data))}catch(R){}var B=null===(D=null==J?void 0:
J.customEventTrackingConfiguration)||void 0===D?void 0:D.blocklist;(null==B?0:B.includes("*"))||(null==B?0:B.some(function(R){return 0<(null==R?void 0:R.length)&&k.name.toLowerCase().includes(R.toLowerCase())}))||null===(K=null==f?void 0:f.core)||void 0===K||K.track(gc({name:k.name,data:I}),k.context,k.timestamp)}}}catch(R){console.warn("Conviva App Tracker:: Unable to track custom event! "+R)}},trackSSEEvent:function(k){var r;void 0===k&&(k={});try{Lb()===H.SAMPLING_MODES.NONE||null!==(r=null==f?
void 0:f.core)&&void 0!==r&&r.track(gc(k),k.context,k.timestamp)}catch(v){}},trackNetworkRequest:function(k){var r,v,A,D,K,J,I,B,R,ha,Ja,Fa;void 0===k&&(k={});try{var Ra=null===(A=null==f?void 0:f.core)||void 0===A?void 0:A.getConfig().networkRequestTrackingConfiguration,ca=k.responseDetails.responseTime-k.requestDetails.requestTime;try{ca=parseFloat(ca.toFixed(3))}catch(Ga){console.warn("Conviva App Tracker:: exception while converting duration to 3 decimal",Ga)}try{var X=$e(((r={targetUrl:null===
(D=null==k?void 0:k.requestDetails)||void 0===D?void 0:D.url,method:null===(K=null==k?void 0:k.requestDetails)||void 0===K?void 0:K.method,responseStatusCode:(null===(J=null==k?void 0:k.responseDetails)||void 0===J?0:J.status)?k.responseDetails.status:0,responseStatusText:(null===(I=null==k?void 0:k.responseDetails)||void 0===I?0:I.statusText)?k.responseDetails.statusText:"ok"})[pa.request_headers]=null===(B=null==k?void 0:k.requestDetails)||void 0===B?void 0:B.headers,r[pa.response_headers]=null===
(R=null==k?void 0:k.responseDetails)||void 0===R?void 0:R.headers,r.duration=ca,r),null==Ra?void 0:Ra.collectattr,k,null==Ra?void 0:Ra.maxQueryLength);if(null===(ha=null==k?void 0:k.requestDetails)||void 0===ha?0:ha[H.TRACEPARENT_HEADER_KEY]){var qa=((v={})[H.TRACEPARENT_HEADER_KEY]=null===(Ja=null==k?void 0:k.requestDetails)||void 0===Ja?void 0:Ja[H.TRACEPARENT_HEADER_KEY],v);X[pa.request_headers]?X[pa.request_headers]=Z(Z({},X[pa.request_headers]),qa):X[pa.request_headers]=qa}null===(Fa=null==f?
void 0:f.core)||void 0===Fa||Fa.track(Eb({event:{sc:"cv/nr/1-0-5",dt:Tb({targetUrl:X.targetUrl,method:X.method,queryParameters:X.queryParameters,responseStatusCode:X.responseStatusCode,responseStatusText:X.responseStatusText,rqh:X.rqh,rsh:X.rsh,rqb:X.rqb,rsb:X.rsb,rqq:X.rqq,requestSize:X.requestSize,responseSize:X.responseSize,duration:X.duration,contentType:X.contentType,requestTimestamp:X.requestTimestamp,responseTimestamp:X.responseTimestamp})}}),k.context,k.timestamp)}catch(Ga){console.warn("Conviva App Tracker:: Network request could not be tracked due to an exception!!",
Ga)}}catch(Ga){console.warn("Conviva App Tracker:: Network request could not be tracked due to an exception!!",Ga)}},trackButtonClick:function(k){var r,v,A;try{var D=null===(r=null==Aa?void 0:Aa.core)||void 0===r?void 0:r.getConfig();!0===(null===(v=null==D?void 0:D.clickcc)||void 0===v?void 0:v.en)&&(k.elementType="button",null===(A=null==Aa?void 0:Aa.core)||void 0===A||A.track(gc({name:"conviva_click",data:JSON.stringify(k)}),Oe(void 0,void 0)))}catch(K){ea.warn("Conviva App Tracker caused Exception in sendButtonClick method of user click tracking module",
K)}!0},trackLinkClick:function(k){var r,v,A;try{var D=null===(r=null==Aa?void 0:Aa.core)||void 0===r?void 0:r.getConfig();!0===(null===(v=null==D?void 0:D.clickcc)||void 0===v?void 0:v.en)&&(k.elementType="link",null===(A=null==Aa?void 0:Aa.core)||void 0===A||A.track(gc({name:"conviva_click",data:JSON.stringify(k)}),Oe(void 0,void 0)))}catch(K){ea.warn("Conviva App Tracker caused Exception in sendLinkClick method of user click tracking module",K)}!0},trackErrorEvent:function(k){Ld(k)},setCustomTags:function(k){void 0===
k&&(k={});N(k)},setMetaCustomTags:function(k){void 0===k&&(k={});(function(r){try{var v=Object.keys(r);W(JSON.stringify(r))?v.forEach(function(A){""!==A&&Object.defineProperty($d,A,{value:""+r[A],writable:!0,enumerable:!0,configurable:!0})}):console.warn("Conviva AppTracker:: Invalid JSON Format: Error Message=")}catch(A){console.warn("Conviva AppTracker:: Invalid JSON Format: Error Message=",A)}})(k)},unsetCustomTags:function(k){void 0===k&&(k=[]);ua(k)},preservePageViewId:function(){zf=!0},disableAnonymousTracking:function(k){p.anonymousTracking=
!1;S(k);ma();pb.executeQueue()},enableAnonymousTracking:function(k){var r;p.anonymousTracking=null===(r=k&&(null==k?void 0:k.options))||void 0===r||r;S(k);dd||U()},clearUserData:T,setKeepAliveInBG:function(k){void 0===k&&(k=!1);Ff=k},clearTimers:function(){ra=null;Mf.cleanupNetworkRequestHandler();try{Sa=f,removeEventListener("error",of,!0),removeEventListener("unhandledrejection",pf,!0)}catch(v){console.warn("Conviva App Tracker caused Exception in disableErrorTracking method of error tracking module",
v)}mf();null==ie||ie.abort();Ua=zb=void 0;if(Dc&&window.clearInterval(Dc),Qa.enabled){var k=void 0;for(k in Qa.configurations){var r=Qa.configurations[k];r&&window.clearInterval(r.activityInterval)}}f&&(f.core=null);this.tracker=null},getSamplingMode:Lb,getPageViewSent:function(){return Pd}};da=ne;!0;var Mf=th.getInstance(ne,p,Lb);return Mf.initiateNetworkRequestTracking(),Z(Z({},ne),{id:h,namespace:l,core:xb,sharedState:q})}(a,c,b,d,e);var f=Z(Z({},a),{addPlugin:function(h){var l,m,q;null===(l=null==
f?void 0:f.core)||void 0===l||l.addPlugin(h);null===(q=(m=h.plugin).activateBrowserPlugin)||void 0===q||q.call(m,f)}});return g.forEach(function(h){var l;null===(l=h.activateBrowserPlugin)||void 0===l||l.call(h,f)}),fh(f,null==e?void 0:e.enableCommonEvents),dh(f),Aa=f,f}function Za(a,c){try{var b=null!=a?a:Object.keys(Nb);a=Nb;for(var d=[],e=0;e<b.length;e++){var g=b[e];a.hasOwnProperty(g)?d.push(a[g]):ea.warn(g+" not configured")}d.forEach(c)}catch(f){ea.error("Function failed",f)}}var Z=function(){return Z=
Object.assign||function(a){for(var c,b=1,d=arguments.length;b<d;b++)for(var e in c=arguments[b])Object.prototype.hasOwnProperty.call(c,e)&&(a[e]=c[e]);return a},Z.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;var od={},Nf="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof window.msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto);if(Nf){var Of=new Uint8Array(16);od=function(){return Nf(Of),
Of}}else{var Pf=Array(16);od=function(){for(var a,c=0;16>c;c++)3&c||(a=4294967296*Math.random()),Pf[c]=a>>>((3&c)<<3)&255;return Pf}}for(var Ka=[],pd=0;256>pd;++pd)Ka[pd]=(pd+256).toString(16).substr(1);var Qf,oe,Rf=function(a,c){c=c||0;return[Ka[a[c++]],Ka[a[c++]],Ka[a[c++]],Ka[a[c++]],"-",Ka[a[c++]],Ka[a[c++]],"-",Ka[a[c++]],Ka[a[c++]],"-",Ka[a[c++]],Ka[a[c++]],"-",Ka[a[c++]],Ka[a[c++]],Ka[a[c++]],Ka[a[c++]],Ka[a[c++]],Ka[a[c++]]].join("")},uh=od,pe=0,qe=0,vh=od,re=function(a,c,b){b=c&&b||0;"string"==
typeof a&&(c="binary"===a?Array(16):null,a=null);var d=(a=a||{}).random||(a.rng||vh)();if(d[6]=15&d[6]|64,d[8]=63&d[8]|128,c)for(a=0;16>a;++a)c[b+a]=d[a];return c||Rf(d)};re.v1=function(a,c,b){b=c&&b||0;var d=c||[],e=(a=a||{}).node||Qf,g=void 0!==a.clockseq?a.clockseq:oe;if(null==e||null==g){var f=uh();null==e&&(e=Qf=[1|f[0],f[1],f[2],f[3],f[4],f[5]]);null==g&&(g=oe=16383&(f[6]<<8|f[7]))}f=void 0!==a.msecs?a.msecs:(new Date).getTime();var h=void 0!==a.nsecs?a.nsecs:qe+1,l=f-pe+(h-qe)/1E4;if(0>l&&
void 0===a.clockseq&&(g=g+1&16383),(0>l||f>pe)&&void 0===a.nsecs&&(h=0),1E4<=h)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");pe=f;qe=h;oe=g;a=(1E4*(268435455&(f+=122192928E5))+h)%4294967296;d[b++]=a>>>24&255;d[b++]=a>>>16&255;d[b++]=a>>>8&255;d[b++]=255&a;a=f/4294967296*1E4&268435455;d[b++]=a>>>8&255;d[b++]=255&a;d[b++]=a>>>24&15|16;d[b++]=a>>>16&255;d[b++]=g>>>8|128;d[b++]=255&g;for(g=0;6>g;++g)d[b+g]=e[g];return c||Rf(d)};var sb=re.v4=re,Ya="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
qb;!function(a){a[a.none=0]="none";a[a.error=1]="error";a[a.warn=2]="warn";a[a.debug=3]="debug";a[a.info=4]="info"}(qb||(qb={}));var Sf,ea=function(a){void 0===a&&(a=qb.warn);return{setLogLevel:function(c){a=qb[c]?c:qb.warn},warn:function(c,b){for(var d=[],e=2;e<arguments.length;e++)d[e-2]=arguments[e];a>=qb.warn&&"undefined"!=typeof console&&(e="Conviva: "+c,b?console.warn.apply(console,Ea([e+"\n",b],d,!1)):console.warn.apply(console,Ea([e],d,!1)))},error:function(c,b){for(var d=[],e=2;e<arguments.length;e++)d[e-
2]=arguments[e];a>=qb.error&&"undefined"!=typeof console&&(e="Conviva: "+c+"\n",b?console.error.apply(console,Ea([e+"\n",b],d,!1)):console.error.apply(console,Ea([e],d,!1)))},debug:function(c){for(var b=[],d=1;d<arguments.length;d++)b[d-1]=arguments[d];a>=qb.debug&&"undefined"!=typeof console&&console.debug.apply(console,Ea(["Conviva: "+c],b,!1))},info:function(c){for(var b=[],d=1;d<arguments.length;d++)b[d-1]=arguments[d];a>=qb.info&&"undefined"!=typeof console&&console.info.apply(console,Ea(["Conviva: "+
c],b,!1))}}}();!function(a){a.response_body="rsb";a.request_body="rqb";a.response_headers="rsh";a.request_headers="rqh";a.request_query="rqq"}(Sf||(Sf={}));var qd,Tf={},Uf={};Uf=qd={rotl:function(a,c){return a<<c|a>>>32-c},rotr:function(a,c){return a<<32-c|a>>>c},endian:function(a){if(a.constructor==Number)return 16711935&qd.rotl(a,8)|4278255360&qd.rotl(a,24);for(var c=0;c<a.length;c++)a[c]=qd.endian(a[c]);return a},randomBytes:function(a){for(var c=[];0<a;a--)c.push(Math.floor(256*Math.random()));
return c},bytesToWords:function(a){for(var c=[],b=0,d=0;b<a.length;b++,d+=8)c[d>>>5]|=a[b]<<24-d%32;return c},wordsToBytes:function(a){for(var c=[],b=0;b<32*a.length;b+=8)c.push(a[b>>>5]>>>24-b%32&255);return c},bytesToHex:function(a){for(var c=[],b=0;b<a.length;b++)c.push((a[b]>>>4).toString(16)),c.push((15&a[b]).toString(16));return c.join("")},hexToBytes:function(a){for(var c=[],b=0;b<a.length;b+=2)c.push(parseInt(a.substr(b,2),16));return c},bytesToBase64:function(a){for(var c=[],b=0;b<a.length;b+=
3)for(var d=a[b]<<16|a[b+1]<<8|a[b+2],e=0;4>e;e++)8*b+6*e<=8*a.length?c.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(d>>>6*(3-e)&63)):c.push("=");return c.join("")},base64ToBytes:function(a){a=a.replace(/[^A-Z0-9+\/]/gi,"");for(var c=[],b=0,d=0;b<a.length;d=++b%4)0!=d&&c.push(("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(b-1))&Math.pow(2,-2*d+8)-1)<<2*d|"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".indexOf(a.charAt(b))>>>
6-2*d);return c}};var se={utf8:{stringToBytes:function(a){return se.bin.stringToBytes(unescape(encodeURIComponent(a)))},bytesToString:function(a){return decodeURIComponent(escape(se.bin.bytesToString(a)))}},bin:{stringToBytes:function(a){for(var c=[],b=0;b<a.length;b++)c.push(255&a.charCodeAt(b));return c},bytesToString:function(a){for(var c=[],b=0;b<a.length;b++)c.push(String.fromCharCode(a[b]));return c.join("")}}},Vf=se;!function(){var a=Uf,c=Vf.utf8,b=Vf.bin,d=function(e,g){var f=a.wordsToBytes,
h=e;h.constructor==String?h=c.stringToBytes(h):"undefined"!=typeof Buffer&&"function"==typeof Buffer.isBuffer&&Buffer.isBuffer(h)?h=Array.prototype.slice.call(h,0):Array.isArray(h)||(h=h.toString());e=a.bytesToWords(h);var l=8*h.length;h=[];var m=1732584193,q=-271733879,p=-1732584194,n=271733878,y=-1009589776;e[l>>5]|=128<<24-l%32;e[15+(l+64>>>9<<4)]=l;for(l=0;l<e.length;l+=16){for(var E=m,x=q,z=p,w=n,u=y,t=0;80>t;t++){if(16>t)h[t]=e[l+t];else{var F=h[t-3]^h[t-8]^h[t-14]^h[t-16];h[t]=F<<1|F>>>31}F=
(m<<5|m>>>27)+y+(h[t]>>>0)+(20>t?1518500249+(q&p|~q&n):40>t?1859775393+(q^p^n):60>t?(q&p|q&n|p&n)-1894007588:(q^p^n)-899497514);y=n;n=p;p=q<<30|q>>>2;q=m;m=F}m+=E;q+=x;p+=z;n+=w;y+=u}f=f.call(a,[m,q,p,n,y]);return g&&g.asBytes?f:g&&g.asString?b.bytesToString(f):a.bytesToHex(f)};d._blocksize=16;d._digestsize=20;Tf=d}();var hh=Tf,te=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),rd=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),wh=
new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Wf=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),rb=Array(576);Ub(rb);var Ec=Array(60);Ub(Ec);var Ob=Array(512);Ub(Ob);var Fc=Array(256);Ub(Fc);var ue=Array(29);Ub(ue);var Xf,Yf,Zf,sd=Array(30);Ub(sd);var Gc=function(a,c){a.pending_buf[a.pending++]=255&c;a.pending_buf[a.pending++]=c>>>8&255},Ta=function(a,c,b){a.bi_valid>16-b?(a.bi_buf|=c<<a.bi_valid&65535,Gc(a,a.bi_buf),a.bi_buf=c>>16-a.bi_valid,a.bi_valid+=b-16):(a.bi_buf|=
c<<a.bi_valid&65535,a.bi_valid+=b)},hb=function(a,c,b){Ta(a,b[2*c],b[2*c+1])},$f=function(a,c){var b=0;do b|=1&a,a>>>=1,b<<=1;while(0<--c);return b>>>1},ag=function(a,c,b){var d,e=Array(16),g=0;for(d=1;15>=d;d++)g=g+b[d-1]<<1,e[d]=g;for(b=0;b<=c;b++)d=a[2*b+1],0!==d&&(a[2*b]=$f(e[d]++,d))},bg=function(a){var c;for(c=0;286>c;c++)a.dyn_ltree[2*c]=0;for(c=0;30>c;c++)a.dyn_dtree[2*c]=0;for(c=0;19>c;c++)a.bl_tree[2*c]=0;a.dyn_ltree[512]=1;a.opt_len=a.static_len=0;a.sym_next=a.matches=0},cg=function(a){8<
a.bi_valid?Gc(a,a.bi_buf):0<a.bi_valid&&(a.pending_buf[a.pending++]=a.bi_buf);a.bi_buf=0;a.bi_valid=0},dg=function(a,c,b,d){var e=2*c,g=2*b;return a[e]<a[g]||a[e]===a[g]&&d[c]<=d[b]},ve=function(a,c,b){for(var d=a.heap[b],e=b<<1;e<=a.heap_len&&(e<a.heap_len&&dg(c,a.heap[e+1],a.heap[e],a.depth)&&e++,!dg(c,d,a.heap[e],a.depth));)a.heap[b]=a.heap[e],b=e,e<<=1;a.heap[b]=d},eg=function(a,c,b){var d,e,g=0;if(0!==a.sym_next){do{var f=255&a.pending_buf[a.sym_buf+g++];f+=(255&a.pending_buf[a.sym_buf+g++])<<
8;var h=a.pending_buf[a.sym_buf+g++];0===f?hb(a,h,c):(d=Fc[h],hb(a,d+256+1,c),0!==(e=te[d])&&(h-=ue[d],Ta(a,h,e)),f--,d=256>f?Ob[f]:Ob[256+(f>>>7)],hb(a,d,b),0!==(e=rd[d])&&(f-=sd[d],Ta(a,f,e)))}while(g<a.sym_next)}hb(a,256,c)},we=function(a,c){var b,d,e=c.dyn_tree;var g=c.stat_desc.static_tree;var f=c.stat_desc.has_stree,h=c.stat_desc.elems,l=-1;a.heap_len=0;a.heap_max=573;for(b=0;b<h;b++)0!==e[2*b]?(a.heap[++a.heap_len]=l=b,a.depth[b]=0):e[2*b+1]=0;for(;2>a.heap_len;)e[2*(d=a.heap[++a.heap_len]=
2>l?++l:0)]=1,a.depth[d]=0,a.opt_len--,f&&(a.static_len-=g[2*d+1]);c.max_code=l;for(b=a.heap_len>>1;1<=b;b--)ve(a,e,b);d=h;do b=a.heap[1],a.heap[1]=a.heap[a.heap_len--],ve(a,e,1),g=a.heap[1],a.heap[--a.heap_max]=b,a.heap[--a.heap_max]=g,e[2*d]=e[2*b]+e[2*g],a.depth[d]=(a.depth[b]>=a.depth[g]?a.depth[b]:a.depth[g])+1,e[2*b+1]=e[2*g+1]=d,a.heap[1]=d++,ve(a,e,1);while(2<=a.heap_len);a.heap[--a.heap_max]=a.heap[1];var m,q,p,n,y;b=c.dyn_tree;d=c.max_code;g=c.stat_desc.static_tree;f=c.stat_desc.has_stree;
h=c.stat_desc.extra_bits;var E=c.stat_desc.extra_base,x=c.stat_desc.max_length,z=0;for(p=0;15>=p;p++)a.bl_count[p]=0;b[2*a.heap[a.heap_max]+1]=0;for(c=a.heap_max+1;573>c;c++)(p=b[2*b[2*(m=a.heap[c])+1]+1]+1)>x&&(p=x,z++),b[2*m+1]=p,m>d||(a.bl_count[p]++,n=0,m>=E&&(n=h[m-E]),y=b[2*m],a.opt_len+=y*(p+n),f&&(a.static_len+=y*(g[2*m+1]+n)));if(0!==z){do{for(p=x-1;0===a.bl_count[p];)p--;a.bl_count[p]--;a.bl_count[p+1]+=2;a.bl_count[x]--;z-=2}while(0<z);for(p=x;0!==p;p--)for(m=a.bl_count[p];0!==m;)(q=a.heap[--c])>
d||(b[2*q+1]!==p&&(a.opt_len+=(p-b[2*q+1])*b[2*q],b[2*q+1]=p),m--)}ag(e,l,a.bl_count)},fg=function(a,c,b){var d,e=-1,g=c[1],f=0,h=7,l=4;0===g&&(h=138,l=3);c[2*(b+1)+1]=65535;for(d=0;d<=b;d++){var m=g;g=c[2*(d+1)+1];++f<h&&m===g||(f<l?a.bl_tree[2*m]+=f:0!==m?(m!==e&&a.bl_tree[2*m]++,a.bl_tree[32]++):10>=f?a.bl_tree[34]++:a.bl_tree[36]++,f=0,e=m,0===g?(h=138,l=3):m===g?(h=6,l=3):(h=7,l=4))}},gg=function(a,c,b){var d,e,g=-1,f=c[1],h=0,l=7,m=4;0===f&&(l=138,m=3);for(d=0;d<=b;d++)if(e=f,f=c[2*(d+1)+1],
!(++h<l&&e===f)){if(h<m){do hb(a,e,a.bl_tree);while(0!=--h)}else 0!==e?(e!==g&&(hb(a,e,a.bl_tree),h--),hb(a,16,a.bl_tree),Ta(a,h-3,2)):10>=h?(hb(a,17,a.bl_tree),Ta(a,h-3,3)):(hb(a,18,a.bl_tree),Ta(a,h-11,7));h=0;g=e;0===f?(l=138,m=3):e===f?(l=6,m=3):(l=7,m=4)}},hg=!1,td=function(a,c,b,d){Ta(a,d?1:0,3);cg(a);Gc(a,b);Gc(a,~b);b&&a.pending_buf.set(a.window.subarray(c,c+b),a.pending);a.pending+=b},Hc=function(a,c,b,d){var e=65535&a;a=a>>>16&65535;for(var g;0!==b;){b-=g=2E3<b?2E3:b;do a=a+(e=e+c[d++]|
0)|0;while(--g);e%=65521;a%=65521}return e|a<<16},xh=new Uint32Array(function(){for(var a,c=[],b=0;256>b;b++){a=b;for(var d=0;8>d;d++)a=1&a?3988292384^a>>>1:a>>>1;c[b]=a}return c}()),Ha=function(a,c,b,d){b=d+b;for(a^=-1;d<b;d++)a=a>>>8^xh[255&(a^c[d])];return~a},Fb={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},ba={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,
Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},yh=function(a,c,b,d){var e,g,f=0;0<a.level?(2===a.strm.data_type&&(a.strm.data_type=function(h){var l,m=4093624447;for(l=0;31>=l;l++,m>>>=1)if(1&m&&0!==h.dyn_ltree[2*
l])return 0;if(0!==h.dyn_ltree[18]||0!==h.dyn_ltree[20]||0!==h.dyn_ltree[26])return 1;for(l=32;256>l;l++)if(0!==h.dyn_ltree[2*l])return 1;return 0}(a)),we(a,a.l_desc),we(a,a.d_desc),f=function(h){var l;fg(h,h.dyn_ltree,h.l_desc.max_code);fg(h,h.dyn_dtree,h.d_desc.max_code);we(h,h.bl_desc);for(l=18;3<=l&&0===h.bl_tree[2*Wf[l]+1];l--);return h.opt_len+=3*(l+1)+14,l}(a),e=a.opt_len+3+7>>>3,(g=a.static_len+3+7>>>3)<=e&&(e=g)):e=g=b+5;b+4<=e&&-1!==c?td(a,c,b,d):4===a.strategy||g===e?(Ta(a,2+(d?1:0),3),
eg(a,rb,Ec)):(Ta(a,4+(d?1:0),3),function(h,l,m,q){var p;Ta(h,l-257,5);Ta(h,m-1,5);Ta(h,q-4,4);for(p=0;p<q;p++)Ta(h,h.bl_tree[2*Wf[p]+1],3);gg(h,h.dyn_ltree,l-1);gg(h,h.dyn_dtree,m-1)}(a,a.l_desc.max_code+1,a.d_desc.max_code+1,f+1),eg(a,a.dyn_ltree,a.dyn_dtree));bg(a);d&&cg(a)},Ab=function(a,c,b){return a.pending_buf[a.sym_buf+a.sym_next++]=c,a.pending_buf[a.sym_buf+a.sym_next++]=c>>8,a.pending_buf[a.sym_buf+a.sym_next++]=b,0===c?a.dyn_ltree[2*b]++:(a.matches++,c--,a.dyn_ltree[2*(Fc[b]+256+1)]++,a.dyn_dtree[2*
(256>c?Ob[c]:Ob[256+(c>>>7)])]++),a.sym_next===a.sym_end},zh=function(a){Ta(a,2,3);hb(a,256,rb);16===a.bi_valid?(Gc(a,a.bi_buf),a.bi_buf=0,a.bi_valid=0):8<=a.bi_valid&&(a.pending_buf[a.pending++]=255&a.bi_buf,a.bi_buf>>=8,a.bi_valid-=8)},Bb=ba.Z_NO_FLUSH,Ah=ba.Z_PARTIAL_FLUSH,Bh=ba.Z_FULL_FLUSH,$a=ba.Z_FINISH,ig=ba.Z_BLOCK,La=ba.Z_OK,jg=ba.Z_STREAM_END,ib=ba.Z_STREAM_ERROR,Ch=ba.Z_DATA_ERROR,xe=ba.Z_BUF_ERROR,Dh=ba.Z_DEFAULT_COMPRESSION,Eh=ba.Z_FILTERED,ud=ba.Z_HUFFMAN_ONLY,Fh=ba.Z_RLE,Gh=ba.Z_FIXED,
Hh=ba.Z_DEFAULT_STRATEGY,Ih=ba.Z_UNKNOWN,Pc=ba.Z_DEFLATED,Pb=function(a,c){return a.msg=Fb[c],c},tb=function(a){for(var c=a.length;0<=--c;)a[c]=0},Cb=function(a,c,b){return(c<<a.hash_shift^b)&a.hash_mask},Wa=function(a){var c=a.state,b=c.pending;b>a.avail_out&&(b=a.avail_out);0!==b&&(a.output.set(c.pending_buf.subarray(c.pending_out,c.pending_out+b),a.next_out),a.next_out+=b,c.pending_out+=b,a.total_out+=b,a.avail_out-=b,c.pending-=b,0===c.pending&&(c.pending_out=0))},Xa=function(a,c){yh(a,0<=a.block_start?
a.block_start:-1,a.strstart-a.block_start,c);a.block_start=a.strstart;Wa(a.strm)},ia=function(a,c){a.pending_buf[a.pending++]=c},Ic=function(a,c){a.pending_buf[a.pending++]=c>>>8&255;a.pending_buf[a.pending++]=255&c},ye=function(a,c,b,d){var e=a.avail_in;return e>d&&(e=d),0===e?0:(a.avail_in-=e,c.set(a.input.subarray(a.next_in,a.next_in+e),b),1===a.state.wrap?a.adler=Hc(a.adler,c,e,b):2===a.state.wrap&&(a.adler=Ha(a.adler,c,e,b)),a.next_in+=e,a.total_in+=e,e)},kg=function(a,c){var b,d,e=a.max_chain_length,
g=a.strstart,f=a.prev_length,h=a.nice_match,l=a.strstart>a.w_size-262?a.strstart-(a.w_size-262):0,m=a.window,q=a.w_mask,p=a.prev,n=a.strstart+258,y=m[g+f-1],E=m[g+f];a.prev_length>=a.good_match&&(e>>=2);h>a.lookahead&&(h=a.lookahead);do if(m[(b=c)+f]===E&&m[b+f-1]===y&&m[b]===m[g]&&m[++b]===m[g+1]){g+=2;for(b++;m[++g]===m[++b]&&m[++g]===m[++b]&&m[++g]===m[++b]&&m[++g]===m[++b]&&m[++g]===m[++b]&&m[++g]===m[++b]&&m[++g]===m[++b]&&m[++g]===m[++b]&&g<n;);if(d=258-(n-g),g=n-258,d>f){if(a.match_start=c,
f=d,d>=h)break;y=m[g+f-1];E=m[g+f]}}while((c=p[c&q])>l&&0!=--e);return f<=a.lookahead?f:a.lookahead},dc=function(a){var c,b=a.w_size;do{var d=a.window_size-a.lookahead-a.strstart;if(a.strstart>=b+(b-262)){a.window.set(a.window.subarray(b,b+b-d),0);a.match_start-=b;a.strstart-=b;a.block_start-=b;a.insert>a.strstart&&(a.insert=a.strstart);var e,g=a,f=g.w_size;var h=e=g.hash_size;do{var l=g.head[--h];g.head[h]=l>=f?l-f:0}while(--e);h=e=f;do l=g.prev[--h],g.prev[h]=l>=f?l-f:0;while(--e);d+=b}if(0===a.strm.avail_in)break;
if(c=ye(a.strm,a.window,a.strstart+a.lookahead,d),a.lookahead+=c,3<=a.lookahead+a.insert)for(d=a.strstart-a.insert,a.ins_h=a.window[d],a.ins_h=Cb(a,a.ins_h,a.window[d+1]);a.insert&&(a.ins_h=Cb(a,a.ins_h,a.window[d+3-1]),a.prev[d&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=d,d++,a.insert--,!(3>a.lookahead+a.insert)););}while(262>a.lookahead&&0!==a.strm.avail_in)},lg=function(a,c){var b,d,e,g=a.pending_buf_size-5>a.w_size?a.w_size:a.pending_buf_size-5,f=0,h=a.strm.avail_in;do{if(b=65535,e=a.bi_valid+
42>>3,a.strm.avail_out<e)break;if(e=a.strm.avail_out-e,b>(d=a.strstart-a.block_start)+a.strm.avail_in&&(b=d+a.strm.avail_in),b>e&&(b=e),b<g&&(0===b&&c!==$a||c===Bb||b!==d+a.strm.avail_in))break;f=c===$a&&b===d+a.strm.avail_in?1:0;td(a,0,0,f);a.pending_buf[a.pending-4]=b;a.pending_buf[a.pending-3]=b>>8;a.pending_buf[a.pending-2]=~b;a.pending_buf[a.pending-1]=~b>>8;Wa(a.strm);d&&(d>b&&(d=b),a.strm.output.set(a.window.subarray(a.block_start,a.block_start+d),a.strm.next_out),a.strm.next_out+=d,a.strm.avail_out-=
d,a.strm.total_out+=d,a.block_start+=d,b-=d);b&&(ye(a.strm,a.strm.output,a.strm.next_out,b),a.strm.next_out+=b,a.strm.avail_out-=b,a.strm.total_out+=b)}while(0===f);return(h-=a.strm.avail_in)&&(h>=a.w_size?(a.matches=2,a.window.set(a.strm.input.subarray(a.strm.next_in-a.w_size,a.strm.next_in),0),a.strstart=a.w_size,a.insert=a.strstart):(a.window_size-a.strstart<=h&&(a.strstart-=a.w_size,a.window.set(a.window.subarray(a.w_size,a.w_size+a.strstart),0),2>a.matches&&a.matches++,a.insert>a.strstart&&(a.insert=
a.strstart)),a.window.set(a.strm.input.subarray(a.strm.next_in-h,a.strm.next_in),a.strstart),a.strstart+=h,a.insert+=h>a.w_size-a.insert?a.w_size-a.insert:h),a.block_start=a.strstart),a.high_water<a.strstart&&(a.high_water=a.strstart),f?4:c!==Bb&&c!==$a&&0===a.strm.avail_in&&a.strstart===a.block_start?2:(e=a.window_size-a.strstart,a.strm.avail_in>e&&a.block_start>=a.w_size&&(a.block_start-=a.w_size,a.strstart-=a.w_size,a.window.set(a.window.subarray(a.w_size,a.w_size+a.strstart),0),2>a.matches&&a.matches++,
e+=a.w_size,a.insert>a.strstart&&(a.insert=a.strstart)),e>a.strm.avail_in&&(e=a.strm.avail_in),e&&(ye(a.strm,a.window,a.strstart,e),a.strstart+=e,a.insert+=e>a.w_size-a.insert?a.w_size-a.insert:e),a.high_water<a.strstart&&(a.high_water=a.strstart),e=a.bi_valid+42>>3,g=(e=65535<a.pending_buf_size-e?65535:a.pending_buf_size-e)>a.w_size?a.w_size:e,((d=a.strstart-a.block_start)>=g||(d||c===$a)&&c!==Bb&&0===a.strm.avail_in&&d<=e)&&(b=d>e?e:d,f=c===$a&&0===a.strm.avail_in&&b===d?1:0,td(a,a.block_start,
b,f),a.block_start+=b,Wa(a.strm)),f?3:1)},ze=function(a,c){for(var b,d;;){if(262>a.lookahead){if(dc(a),262>a.lookahead&&c===Bb)return 1;if(0===a.lookahead)break}if(b=0,3<=a.lookahead&&(a.ins_h=Cb(a,a.ins_h,a.window[a.strstart+3-1]),b=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),0!==b&&a.strstart-b<=a.w_size-262&&(a.match_length=kg(a,b)),3<=a.match_length)if(d=Ab(a,a.strstart-a.match_start,a.match_length-3),a.lookahead-=a.match_length,a.match_length<=a.max_lazy_match&&3<=
a.lookahead){a.match_length--;do a.strstart++,a.ins_h=Cb(a,a.ins_h,a.window[a.strstart+3-1]),b=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart;while(0!=--a.match_length);a.strstart++}else a.strstart+=a.match_length,a.match_length=0,a.ins_h=a.window[a.strstart],a.ins_h=Cb(a,a.ins_h,a.window[a.strstart+1]);else d=Ab(a,0,a.window[a.strstart]),a.lookahead--,a.strstart++;if(d&&(Xa(a,!1),0===a.strm.avail_out))return 1}return a.insert=2>a.strstart?a.strstart:2,c===$a?(Xa(a,!0),0===
a.strm.avail_out?3:4):a.sym_next&&(Xa(a,!1),0===a.strm.avail_out)?1:2},ec=function(a,c){for(var b,d,e;;){if(262>a.lookahead){if(dc(a),262>a.lookahead&&c===Bb)return 1;if(0===a.lookahead)break}if(b=0,3<=a.lookahead&&(a.ins_h=Cb(a,a.ins_h,a.window[a.strstart+3-1]),b=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart),a.prev_length=a.match_length,a.prev_match=a.match_start,a.match_length=2,0!==b&&a.prev_length<a.max_lazy_match&&a.strstart-b<=a.w_size-262&&(a.match_length=kg(a,b),
5>=a.match_length&&(a.strategy===Eh||3===a.match_length&&4096<a.strstart-a.match_start)&&(a.match_length=2)),3<=a.prev_length&&a.match_length<=a.prev_length){e=a.strstart+a.lookahead-3;d=Ab(a,a.strstart-1-a.prev_match,a.prev_length-3);a.lookahead-=a.prev_length-1;a.prev_length-=2;do++a.strstart<=e&&(a.ins_h=Cb(a,a.ins_h,a.window[a.strstart+3-1]),b=a.prev[a.strstart&a.w_mask]=a.head[a.ins_h],a.head[a.ins_h]=a.strstart);while(0!=--a.prev_length);if(a.match_available=0,a.match_length=2,a.strstart++,
d&&(Xa(a,!1),0===a.strm.avail_out))return 1}else if(a.match_available){if(Ab(a,0,a.window[a.strstart-1])&&Xa(a,!1),a.strstart++,a.lookahead--,0===a.strm.avail_out)return 1}else a.match_available=1,a.strstart++,a.lookahead--}return a.match_available&&(Ab(a,0,a.window[a.strstart-1]),a.match_available=0),a.insert=2>a.strstart?a.strstart:2,c===$a?(Xa(a,!0),0===a.strm.avail_out?3:4):a.sym_next&&(Xa(a,!1),0===a.strm.avail_out)?1:2},Jc=[new db(0,0,0,0,lg),new db(4,4,8,4,ze),new db(4,5,16,8,ze),new db(4,
6,32,32,ze),new db(4,4,16,16,ec),new db(8,16,32,32,ec),new db(8,16,128,128,ec),new db(8,32,128,256,ec),new db(32,128,258,1024,ec),new db(32,258,258,4096,ec)],Kc=function(a){if(!a)return 1;var c=a.state;return!c||c.strm!==a||42!==c.status&&57!==c.status&&69!==c.status&&73!==c.status&&91!==c.status&&103!==c.status&&113!==c.status&&666!==c.status?1:0},mg=function(a){if(Kc(a))return Pb(a,ib);a.total_in=a.total_out=0;a.data_type=Ih;var c=a.state;c.pending=0;c.pending_out=0;0>c.wrap&&(c.wrap=-c.wrap);c.status=
2===c.wrap?57:c.wrap?42:113;a.adler=2===c.wrap?0:1;c.last_flush=-2;if(!hg){var b,d,e;a=Array(16);for(e=d=0;28>e;e++)for(ue[e]=d,b=0;b<1<<te[e];b++)Fc[d++]=e;Fc[d-1]=e;for(e=d=0;16>e;e++)for(sd[e]=d,b=0;b<1<<rd[e];b++)Ob[d++]=e;for(d>>=7;30>e;e++)for(sd[e]=d<<7,b=0;b<1<<rd[e]-7;b++)Ob[256+d++]=e;for(b=0;15>=b;b++)a[b]=0;for(b=0;143>=b;)rb[2*b+1]=8,b++,a[8]++;for(;255>=b;)rb[2*b+1]=9,b++,a[9]++;for(;279>=b;)rb[2*b+1]=7,b++,a[7]++;for(;287>=b;)rb[2*b+1]=8,b++,a[8]++;ag(rb,287,a);for(b=0;30>b;b++)Ec[2*
b+1]=5,Ec[2*b]=$f(b,5);Xf=new Ad(rb,te,257,286,15);Yf=new Ad(Ec,rd,0,30,15);Zf=new Ad([],wh,0,19,7);!0;hg=!0}c.l_desc=new Bd(c.dyn_ltree,Xf);c.d_desc=new Bd(c.dyn_dtree,Yf);c.bl_desc=new Bd(c.bl_tree,Zf);c.bi_buf=0;c.bi_valid=0;bg(c);return La},ng=function(a){var c,b=mg(a);return b===La&&((c=a.state).window_size=2*c.w_size,tb(c.head),c.max_lazy_match=Jc[c.level].max_lazy,c.good_match=Jc[c.level].good_length,c.nice_match=Jc[c.level].nice_length,c.max_chain_length=Jc[c.level].max_chain,c.strstart=0,
c.block_start=0,c.lookahead=0,c.insert=0,c.match_length=c.prev_length=2,c.match_available=0,c.ins_h=0),b},og=function(a,c,b,d,e,g){if(!a)return ib;var f=1;if(c===Dh&&(c=6),0>d?(f=0,d=-d):15<d&&(f=2,d-=16),1>e||9<e||b!==Pc||8>d||15<d||0>c||9<c||0>g||g>Gh||8===d&&1!==f)return Pb(a,ib);8===d&&(d=9);var h=new Mg;return a.state=h,h.strm=a,h.status=42,h.wrap=f,h.gzhead=null,h.w_bits=d,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=e+7,h.hash_size=1<<h.hash_bits,h.hash_mask=h.hash_size-1,h.hash_shift=
~~((h.hash_bits+3-1)/3),h.window=new Uint8Array(2*h.w_size),h.head=new Uint16Array(h.hash_size),h.prev=new Uint16Array(h.w_size),h.lit_bufsize=1<<e+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.sym_buf=h.lit_bufsize,h.sym_end=3*(h.lit_bufsize-1),h.level=c,h.strategy=g,h.method=b,ng(a)},ic={deflateInit:function(a,c){return og(a,c,Pc,15,8,Hh)},deflateInit2:og,deflateReset:ng,deflateResetKeep:mg,deflateSetHeader:function(a,c){return Kc(a)||2!==a.state.wrap?ib:
(a.state.gzhead=c,La)},deflate:function(a,c){if(Kc(a)||c>ig||0>c)return a?Pb(a,ib):ib;var b=a.state;if(!a.output||0!==a.avail_in&&!a.input||666===b.status&&c!==$a)return Pb(a,0===a.avail_out?xe:ib);var d=b.last_flush;if(b.last_flush=c,0!==b.pending){if(Wa(a),0===a.avail_out)return b.last_flush=-1,La}else if(0===a.avail_in&&2*c-(4<c?9:0)<=2*d-(4<d?9:0)&&c!==$a)return Pb(a,xe);if(666===b.status&&0!==a.avail_in)return Pb(a,xe);if(42===b.status&&0===b.wrap&&(b.status=113),42===b.status)if(d=Pc+(b.w_bits-
8<<4)<<8,d|=(b.strategy>=ud||2>b.level?0:6>b.level?1:6===b.level?2:3)<<6,0!==b.strstart&&(d|=32),Ic(b,d+=31-d%31),0!==b.strstart&&(Ic(b,a.adler>>>16),Ic(b,65535&a.adler)),a.adler=1,b.status=113,Wa(a),0!==b.pending)return b.last_flush=-1,La;if(57===b.status)if(a.adler=0,ia(b,31),ia(b,139),ia(b,8),b.gzhead)ia(b,(b.gzhead.text?1:0)+(b.gzhead.hcrc?2:0)+(b.gzhead.extra?4:0)+(b.gzhead.name?8:0)+(b.gzhead.comment?16:0)),ia(b,255&b.gzhead.time),ia(b,b.gzhead.time>>8&255),ia(b,b.gzhead.time>>16&255),ia(b,
b.gzhead.time>>24&255),ia(b,9===b.level?2:b.strategy>=ud||2>b.level?4:0),ia(b,255&b.gzhead.os),b.gzhead.extra&&b.gzhead.extra.length&&(ia(b,255&b.gzhead.extra.length),ia(b,b.gzhead.extra.length>>8&255)),b.gzhead.hcrc&&(a.adler=Ha(a.adler,b.pending_buf,b.pending,0)),b.gzindex=0,b.status=69;else if(ia(b,0),ia(b,0),ia(b,0),ia(b,0),ia(b,0),ia(b,9===b.level?2:b.strategy>=ud||2>b.level?4:0),ia(b,3),b.status=113,Wa(a),0!==b.pending)return b.last_flush=-1,La;if(69===b.status){if(b.gzhead.extra){d=b.pending;
for(var e=(65535&b.gzhead.extra.length)-b.gzindex;b.pending+e>b.pending_buf_size;){var g=b.pending_buf_size-b.pending;if(b.pending_buf.set(b.gzhead.extra.subarray(b.gzindex,b.gzindex+g),b.pending),b.pending=b.pending_buf_size,b.gzhead.hcrc&&b.pending>d&&(a.adler=Ha(a.adler,b.pending_buf,b.pending-d,d)),b.gzindex+=g,Wa(a),0!==b.pending)return b.last_flush=-1,La;d=0;e-=g}g=new Uint8Array(b.gzhead.extra);b.pending_buf.set(g.subarray(b.gzindex,b.gzindex+e),b.pending);b.pending+=e;b.gzhead.hcrc&&b.pending>
d&&(a.adler=Ha(a.adler,b.pending_buf,b.pending-d,d));b.gzindex=0}b.status=73}if(73===b.status){if(b.gzhead.name){e=b.pending;do{if(b.pending===b.pending_buf_size){if(b.gzhead.hcrc&&b.pending>e&&(a.adler=Ha(a.adler,b.pending_buf,b.pending-e,e)),Wa(a),0!==b.pending)return b.last_flush=-1,La;e=0}d=b.gzindex<b.gzhead.name.length?255&b.gzhead.name.charCodeAt(b.gzindex++):0;ia(b,d)}while(0!==d);b.gzhead.hcrc&&b.pending>e&&(a.adler=Ha(a.adler,b.pending_buf,b.pending-e,e));b.gzindex=0}b.status=91}if(91===
b.status){if(b.gzhead.comment){e=b.pending;do{if(b.pending===b.pending_buf_size){if(b.gzhead.hcrc&&b.pending>e&&(a.adler=Ha(a.adler,b.pending_buf,b.pending-e,e)),Wa(a),0!==b.pending)return b.last_flush=-1,La;e=0}d=b.gzindex<b.gzhead.comment.length?255&b.gzhead.comment.charCodeAt(b.gzindex++):0;ia(b,d)}while(0!==d);b.gzhead.hcrc&&b.pending>e&&(a.adler=Ha(a.adler,b.pending_buf,b.pending-e,e))}b.status=103}if(103===b.status){if(b.gzhead.hcrc){if(b.pending+2>b.pending_buf_size&&(Wa(a),0!==b.pending))return b.last_flush=
-1,La;ia(b,255&a.adler);ia(b,a.adler>>8&255);a.adler=0}if(b.status=113,Wa(a),0!==b.pending)return b.last_flush=-1,La}if(0!==a.avail_in||0!==b.lookahead||c!==Bb&&666!==b.status){d=0===b.level?lg(b,c):b.strategy===ud?function(f,h){for(var l;;){if(0===f.lookahead&&(dc(f),0===f.lookahead)){if(h===Bb)return 1;break}if(f.match_length=0,l=Ab(f,0,f.window[f.strstart]),f.lookahead--,f.strstart++,l&&(Xa(f,!1),0===f.strm.avail_out))return 1}return f.insert=0,h===$a?(Xa(f,!0),0===f.strm.avail_out?3:4):f.sym_next&&
(Xa(f,!1),0===f.strm.avail_out)?1:2}(b,c):b.strategy===Fh?function(f,h){for(var l,m,q,p,n=f.window;;){if(258>=f.lookahead){if(dc(f),258>=f.lookahead&&h===Bb)return 1;if(0===f.lookahead)break}if(f.match_length=0,3<=f.lookahead&&0<f.strstart&&(m=n[q=f.strstart-1])===n[++q]&&m===n[++q]&&m===n[++q]){for(p=f.strstart+258;m===n[++q]&&m===n[++q]&&m===n[++q]&&m===n[++q]&&m===n[++q]&&m===n[++q]&&m===n[++q]&&m===n[++q]&&q<p;);f.match_length=258-(p-q);f.match_length>f.lookahead&&(f.match_length=f.lookahead)}if(3<=
f.match_length?(l=Ab(f,1,f.match_length-3),f.lookahead-=f.match_length,f.strstart+=f.match_length,f.match_length=0):(l=Ab(f,0,f.window[f.strstart]),f.lookahead--,f.strstart++),l&&(Xa(f,!1),0===f.strm.avail_out))return 1}return f.insert=0,h===$a?(Xa(f,!0),0===f.strm.avail_out?3:4):f.sym_next&&(Xa(f,!1),0===f.strm.avail_out)?1:2}(b,c):Jc[b.level].func(b,c);if(3!==d&&4!==d||(b.status=666),1===d||3===d)return 0===a.avail_out&&(b.last_flush=-1),La;if(2===d&&(c===Ah?zh(b):c!==ig&&(td(b,0,0,!1),c===Bh&&
(tb(b.head),0===b.lookahead&&(b.strstart=0,b.block_start=0,b.insert=0))),Wa(a),0===a.avail_out))return b.last_flush=-1,La}return c!==$a?La:0>=b.wrap?jg:(2===b.wrap?(ia(b,255&a.adler),ia(b,a.adler>>8&255),ia(b,a.adler>>16&255),ia(b,a.adler>>24&255),ia(b,255&a.total_in),ia(b,a.total_in>>8&255),ia(b,a.total_in>>16&255),ia(b,a.total_in>>24&255)):(Ic(b,a.adler>>>16),Ic(b,65535&a.adler)),Wa(a),0<b.wrap&&(b.wrap=-b.wrap),0!==b.pending?La:jg)},deflateEnd:function(a){if(Kc(a))return ib;var c=a.state.status;
return a.state=null,113===c?Pb(a,Ch):La},deflateSetDictionary:function(a,c){var b=c.length;if(Kc(a))return ib;var d=a.state,e=d.wrap;if(2===e||1===e&&42!==d.status||d.lookahead)return ib;if(1===e&&(a.adler=Hc(a.adler,c,b,0)),d.wrap=0,b>=d.w_size){0===e&&(tb(d.head),d.strstart=0,d.block_start=0,d.insert=0);var g=new Uint8Array(d.w_size);g.set(c.subarray(b-d.w_size,b),0);c=g;b=d.w_size}g=a.avail_in;var f=a.next_in,h=a.input;a.avail_in=b;a.next_in=0;a.input=c;for(dc(d);3<=d.lookahead;){c=d.strstart;
b=d.lookahead-2;do d.ins_h=Cb(d,d.ins_h,d.window[c+3-1]),d.prev[c&d.w_mask]=d.head[d.ins_h],d.head[d.ins_h]=c,c++;while(--b);d.strstart=c;d.lookahead=2;dc(d)}return d.strstart+=d.lookahead,d.block_start=d.strstart,d.insert=d.lookahead,d.lookahead=0,d.match_length=d.prev_length=2,d.match_available=0,a.next_in=f,a.input=h,a.avail_in=g,d.wrap=e,La},deflateInfo:"pako deflate (from Nodeca project)"},Te=function(a){for(var c=Array.prototype.slice.call(arguments,1);c.length;){var b=c.shift();if(b){if("object"!==
la(b))throw new TypeError(b+"must be non-object");for(var d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d])}}return a},pg=function(a){for(var c=0,b=0,d=a.length;b<d;b++)c+=a[b].length;c=new Uint8Array(c);d=b=0;for(var e=a.length;b<e;b++){var g=a[b];c.set(g,d);d+=g.length}return c},qg=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(a){qg=!1}for(var Lc=new Uint8Array(256),Db=0;256>Db;Db++)Lc[Db]=252<=Db?6:248<=Db?5:240<=Db?4:224<=Db?3:192<=Db?2:1;Lc[254]=Lc[254]=1;var Cd=
function(a){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(a);var c,b,d,e,g=a.length,f=0;for(d=0;d<g;d++)55296==(64512&(c=a.charCodeAt(d)))&&d+1<g&&56320==(64512&(b=a.charCodeAt(d+1)))&&(c=65536+(c-55296<<10)+(b-56320),d++),f+=128>c?1:2048>c?2:65536>c?3:4;var h=new Uint8Array(f);for(d=e=0;e<f;d++)55296==(64512&(c=a.charCodeAt(d)))&&d+1<g&&56320==(64512&(b=a.charCodeAt(d+1)))&&(c=65536+(c-55296<<10)+(b-56320),d++),128>c?h[e++]=c:2048>c?(h[e++]=192|c>>>
6,h[e++]=128|63&c):65536>c?(h[e++]=224|c>>>12,h[e++]=128|c>>>6&63,h[e++]=128|63&c):(h[e++]=240|c>>>18,h[e++]=128|c>>>12&63,h[e++]=128|c>>>6&63,h[e++]=128|63&c);return h},Ue=function(){this.input=null;this.total_in=this.avail_in=this.next_in=0;this.output=null;this.total_out=this.avail_out=this.next_out=0;this.msg="";this.state=null;this.data_type=2;this.adler=0},Ve=Object.prototype.toString,Jh=ba.Z_NO_FLUSH,Kh=ba.Z_SYNC_FLUSH,Lh=ba.Z_FULL_FLUSH,Mh=ba.Z_FINISH,Qc=ba.Z_OK,Nh=ba.Z_STREAM_END,Ng=ba.Z_DEFAULT_COMPRESSION,
Pg=ba.Z_DEFAULT_STRATEGY,Og=ba.Z_DEFLATED;hc.prototype.push=function(a,c){var b=this.strm,d=this.options.chunkSize;if(this.ended)return!1;c=c===~~c?c:!0===c?Mh:Jh;"string"==typeof a?b.input=Cd(a):"[object ArrayBuffer]"===Ve.call(a)?b.input=new Uint8Array(a):b.input=a;b.next_in=0;for(b.avail_in=b.input.length;;)if(0===b.avail_out&&(b.output=new Uint8Array(d),b.next_out=0,b.avail_out=d),(c===Kh||c===Lh)&&6>=b.avail_out)this.onData(b.output.subarray(0,b.next_out)),b.avail_out=0;else{if((a=ic.deflate(b,
c))===Nh)return 0<b.next_out&&this.onData(b.output.subarray(0,b.next_out)),a=ic.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===Qc;if(0!==b.avail_out)if(0<c&&0<b.next_out)this.onData(b.output.subarray(0,b.next_out)),b.avail_out=0;else{if(0===b.avail_in)break}else this.onData(b.output)}return!0};hc.prototype.onData=function(a){this.chunks.push(a)};hc.prototype.onEnd=function(a){a===Qc&&(this.result=pg(this.chunks));this.chunks=[];this.err=a;this.msg=this.strm.msg};var Oh=new Uint16Array([3,4,
5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Ph=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),Qh=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Rh=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Mc=function(a,c,b,d,e,g,f,h){var l,m,q,p,n,y,
E=h.bits,x,z,w,u,t,F=0,G,Q=null,C=new Uint16Array(16);var L=new Uint16Array(16);var O=null;for(x=0;15>=x;x++)C[x]=0;for(z=0;z<d;z++)C[c[b+z]]++;var T=E;for(w=15;1<=w&&0===C[w];w--);if(T>w&&(T=w),0===w)return e[g++]=20971520,e[g++]=20971520,h.bits=1,0;for(E=1;E<w&&0===C[E];E++);T<E&&(T=E);for(x=l=1;15>=x;x++)if(l<<=1,0>(l-=C[x]))return-1;if(0<l&&(0===a||1!==w))return-1;L[1]=0;for(x=1;15>x;x++)L[x+1]=L[x]+C[x];for(z=0;z<d;z++)0!==c[b+z]&&(f[L[c[b+z]]++]=z);if(0===a?(Q=O=f,p=20):1===a?(Q=Oh,O=Ph,p=257):
(Q=Qh,O=Rh,p=0),G=0,z=0,x=E,L=g,u=T,t=0,q=-1,d=(F=1<<T)-1,1===a&&852<F||2===a&&592<F)return 1;for(;;){var S=x-t;f[z]+1<p?(n=0,y=f[z]):f[z]>=p?(n=O[f[z]-p],y=Q[f[z]-p]):(n=96,y=0);l=1<<x-t;E=m=1<<u;do e[L+(G>>t)+(m-=l)]=S<<24|n<<16|y;while(0!==m);for(l=1<<x-1;G&l;)l>>=1;if(0!==l?(G&=l-1,G+=l):G=0,z++,0==--C[x]){if(x===w)break;x=c[b+f[z]]}if(x>T&&(G&d)!==q){0===t&&(t=T);L+=E;for(l=1<<(u=x-t);u+t<w&&!(0>=(l-=C[u+t]));)u++,l<<=1;if(F+=1<<u,1===a&&852<F||2===a&&592<F)return 1;e[q=G&d]=T<<24|u<<16|L-g}}return 0!==
G&&(e[L+G]=x-t<<24|4194304),h.bits=T,0},rg=ba.Z_FINISH,Sh=ba.Z_BLOCK,vd=ba.Z_TREES,Qb=ba.Z_OK,Th=ba.Z_STREAM_END,Uh=ba.Z_NEED_DICT,cb=ba.Z_STREAM_ERROR,sg=ba.Z_DATA_ERROR,tg=ba.Z_MEM_ERROR,Vh=ba.Z_BUF_ERROR,ug=ba.Z_DEFLATED,vg=function(a){return(a>>>24&255)+(a>>>8&65280)+((65280&a)<<8)+((255&a)<<24)},Ae,Be,Rb=function(a){if(!a)return 1;var c=a.state;return!c||c.strm!==a||16180>c.mode||16211<c.mode?1:0},wg=function(a){if(Rb(a))return cb;var c=a.state;return a.total_in=a.total_out=c.total=0,a.msg="",
c.wrap&&(a.adler=1&c.wrap),c.mode=16180,c.last=0,c.havedict=0,c.flags=-1,c.dmax=32768,c.head=null,c.hold=0,c.bits=0,c.lencode=c.lendyn=new Int32Array(852),c.distcode=c.distdyn=new Int32Array(592),c.sane=1,c.back=-1,Qb},xg=function(a){if(Rb(a))return cb;var c=a.state;return c.wsize=0,c.whave=0,c.wnext=0,wg(a)},yg=function(a,c){var b;if(Rb(a))return cb;var d=a.state;return 0>c?(b=0,c=-c):(b=5+(c>>4),48>c&&(c&=15)),c&&(8>c||15<c)?cb:(null!==d.window&&d.wbits!==c&&(d.window=null),d.wrap=b,d.wbits=c,xg(a))},
zg=function(a,c){if(!a)return cb;var b=new Qg;a.state=b;b.strm=a;b.window=null;b.mode=16180;c=yg(a,c);return c!==Qb&&(a.state=null),c},Ag=!0,Bg=function(a,c,b,d){var e;a=a.state;return null===a.window&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),d>=a.wsize?(a.window.set(c.subarray(b-a.wsize,b),0),a.wnext=0,a.whave=a.wsize):((e=a.wsize-a.wnext)>d&&(e=d),a.window.set(c.subarray(b-d,b-d+e),a.wnext),(d-=e)?(a.window.set(c.subarray(b-d,b),0),a.wnext=d,a.whave=a.wsize):(a.wnext+=
e,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=e))),0},jb={inflateReset:xg,inflateReset2:yg,inflateResetKeep:wg,inflateInit:function(a){return zg(a,15)},inflateInit2:zg,inflate:function(a,c){var b,d,e,g,f,h,l,m=0,q=new Uint8Array(4),p=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Rb(a)||!a.output||!a.input&&0!==a.avail_in)return cb;16191===(b=a.state).mode&&(b.mode=16192);var n=a.next_out;var y=a.output;var E=a.avail_out;var x=a.next_in;var z=a.input;var w=a.avail_in;
var u=b.hold;var t=b.bits;var F=w;var G=E;var Q=Qb;a:for(;;)switch(b.mode){case 16180:if(0===b.wrap){b.mode=16192;break}for(;16>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(2&b.wrap&&35615===u){0===b.wbits&&(b.wbits=15);b.check=0;q[0]=255&u;q[1]=u>>>8&255;b.check=Ha(b.check,q,2,0);t=u=0;b.mode=16181;break}if(b.head&&(b.head.done=!1),!(1&b.wrap)||(((255&u)<<8)+(u>>8))%31){a.msg="incorrect header check";b.mode=16209;break}if((15&u)!==ug){a.msg="unknown compression method";b.mode=16209;break}if(t-=
4,h=8+(15&(u>>>=4)),0===b.wbits&&(b.wbits=h),15<h||h>b.wbits){a.msg="invalid window size";b.mode=16209;break}b.dmax=1<<b.wbits;b.flags=0;a.adler=b.check=1;b.mode=512&u?16189:16191;t=u=0;break;case 16181:for(;16>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(b.flags=u,(255&b.flags)!==ug){a.msg="unknown compression method";b.mode=16209;break}if(57344&b.flags){a.msg="unknown header flags set";b.mode=16209;break}b.head&&(b.head.text=u>>8&1);512&b.flags&&4&b.wrap&&(q[0]=255&u,q[1]=u>>>8&255,b.check=Ha(b.check,
q,2,0));t=u=0;b.mode=16182;case 16182:for(;32>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}b.head&&(b.head.time=u);512&b.flags&&4&b.wrap&&(q[0]=255&u,q[1]=u>>>8&255,q[2]=u>>>16&255,q[3]=u>>>24&255,b.check=Ha(b.check,q,4,0));t=u=0;b.mode=16183;case 16183:for(;16>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}b.head&&(b.head.xflags=255&u,b.head.os=u>>8);512&b.flags&&4&b.wrap&&(q[0]=255&u,q[1]=u>>>8&255,b.check=Ha(b.check,q,2,0));t=u=0;b.mode=16184;case 16184:if(1024&b.flags){for(;16>t;){if(0===w)break a;
w--;u+=z[x++]<<t;t+=8}b.length=u;b.head&&(b.head.extra_len=u);512&b.flags&&4&b.wrap&&(q[0]=255&u,q[1]=u>>>8&255,b.check=Ha(b.check,q,2,0));t=u=0}else b.head&&(b.head.extra=null);b.mode=16185;case 16185:if(1024&b.flags&&((d=b.length)>w&&(d=w),d&&(b.head&&(h=b.head.extra_len-b.length,b.head.extra||(b.head.extra=new Uint8Array(b.head.extra_len)),b.head.extra.set(z.subarray(x,x+d),h)),512&b.flags&&4&b.wrap&&(b.check=Ha(b.check,z,d,x)),w-=d,x+=d,b.length-=d),b.length))break a;b.length=0;b.mode=16186;case 16186:if(2048&
b.flags){if(0===w)break a;d=0;do h=z[x+d++],b.head&&h&&65536>b.length&&(b.head.name+=String.fromCharCode(h));while(h&&d<w);if(512&b.flags&&4&b.wrap&&(b.check=Ha(b.check,z,d,x)),w-=d,x+=d,h)break a}else b.head&&(b.head.name=null);b.length=0;b.mode=16187;case 16187:if(4096&b.flags){if(0===w)break a;d=0;do h=z[x+d++],b.head&&h&&65536>b.length&&(b.head.comment+=String.fromCharCode(h));while(h&&d<w);if(512&b.flags&&4&b.wrap&&(b.check=Ha(b.check,z,d,x)),w-=d,x+=d,h)break a}else b.head&&(b.head.comment=
null);b.mode=16188;case 16188:if(512&b.flags){for(;16>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(4&b.wrap&&u!==(65535&b.check)){a.msg="header crc mismatch";b.mode=16209;break}t=u=0}b.head&&(b.head.hcrc=b.flags>>9&1,b.head.done=!0);a.adler=b.check=0;b.mode=16191;break;case 16189:for(;32>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}a.adler=b.check=vg(u);t=u=0;b.mode=16190;case 16190:if(0===b.havedict)return a.next_out=n,a.avail_out=E,a.next_in=x,a.avail_in=w,b.hold=u,b.bits=t,Uh;a.adler=b.check=1;
b.mode=16191;case 16191:if(c===Sh||c===vd)break a;case 16192:if(b.last){u>>>=7&t;t-=7&t;b.mode=16206;break}for(;3>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}switch(b.last=1&u,--t,3&(u>>>=1)){case 0:b.mode=16193;break;case 1:var C=b;if(Ag){Ae=new Int32Array(512);Be=new Int32Array(32);for(g=0;144>g;)C.lens[g++]=8;for(;256>g;)C.lens[g++]=9;for(;280>g;)C.lens[g++]=7;for(;288>g;)C.lens[g++]=8;Mc(1,C.lens,0,288,Ae,0,C.work,{bits:9});for(g=0;32>g;)C.lens[g++]=5;Mc(2,C.lens,0,32,Be,0,C.work,{bits:5});Ag=
!1}C.lencode=Ae;C.lenbits=9;C.distcode=Be;C.distbits=5;if(b.mode=16199,c===vd){u>>>=2;t-=2;break a}break;case 2:b.mode=16196;break;case 3:a.msg="invalid block type",b.mode=16209}u>>>=2;t-=2;break;case 16193:u>>>=7&t;for(t-=7&t;32>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if((65535&u)!=(u>>>16^65535)){a.msg="invalid stored block lengths";b.mode=16209;break}if(b.length=65535&u,u=0,t=0,b.mode=16194,c===vd)break a;case 16194:b.mode=16195;case 16195:if(d=b.length){if(d>w&&(d=w),d>E&&(d=E),0===d)break a;
y.set(z.subarray(x,x+d),n);w-=d;x+=d;E-=d;n+=d;b.length-=d;break}b.mode=16191;break;case 16196:for(;14>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(b.nlen=257+(31&u),u>>>=5,t-=5,b.ndist=1+(31&u),u>>>=5,t-=5,b.ncode=4+(15&u),u>>>=4,t-=4,286<b.nlen||30<b.ndist){a.msg="too many length or distance symbols";b.mode=16209;break}b.have=0;b.mode=16197;case 16197:for(;b.have<b.ncode;){for(;3>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}b.lens[p[b.have++]]=7&u;u>>>=3;t-=3}for(;19>b.have;)b.lens[p[b.have++]]=
0;if(b.lencode=b.lendyn,b.lenbits=7,l={bits:b.lenbits},Q=Mc(0,b.lens,0,19,b.lencode,0,b.work,l),b.lenbits=l.bits,Q){a.msg="invalid code lengths set";b.mode=16209;break}b.have=0;b.mode=16198;case 16198:for(;b.have<b.nlen+b.ndist;){for(;m=b.lencode[u&(1<<b.lenbits)-1],f=65535&m,!((C=m>>>24)<=t);){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(16>f)u>>>=C,t-=C,b.lens[b.have++]=f;else{if(16===f){for(g=C+2;t<g;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(u>>>=C,t-=C,0===b.have){a.msg="invalid bit length repeat";
b.mode=16209;break}h=b.lens[b.have-1];d=3+(3&u);u>>>=2;t-=2}else if(17===f){for(g=C+3;t<g;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}t-=C;h=0;d=3+(7&(u>>>=C));u>>>=3;t-=3}else{for(g=C+7;t<g;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}t-=C;h=0;d=11+(127&(u>>>=C));u>>>=7;t-=7}if(b.have+d>b.nlen+b.ndist){a.msg="invalid bit length repeat";b.mode=16209;break}for(;d--;)b.lens[b.have++]=h}}if(16209===b.mode)break;if(0===b.lens[256]){a.msg="invalid code -- missing end-of-block";b.mode=16209;break}if(b.lenbits=
9,l={bits:b.lenbits},Q=Mc(1,b.lens,0,b.nlen,b.lencode,0,b.work,l),b.lenbits=l.bits,Q){a.msg="invalid literal/lengths set";b.mode=16209;break}if(b.distbits=6,b.distcode=b.distdyn,l={bits:b.distbits},Q=Mc(2,b.lens,b.nlen,b.ndist,b.distcode,0,b.work,l),b.distbits=l.bits,Q){a.msg="invalid distances set";b.mode=16209;break}if(b.mode=16199,c===vd)break a;case 16199:b.mode=16200;case 16200:if(6<=w&&258<=E){a.next_out=n;a.avail_out=E;a.next_in=x;a.avail_in=w;b.hold=u;b.bits=t;var L;w=x=void 0;var O=a,T=O.state;
var S=O.next_in;y=O.input;var ma=S+(O.avail_in-5);var V=O.next_out;z=O.output;var ja=V-(G-O.avail_out);var U=V+(O.avail_out-257);var na=T.dmax;var oa=T.wsize;var ta=T.whave;var fa=T.wnext;var W=T.window;f=T.hold;g=T.bits;C=T.lencode;t=T.distcode;u=(1<<T.lenbits)-1;E=(1<<T.distbits)-1;b:do{15>g&&(f+=y[S++]<<g,g+=8,f+=y[S++]<<g,g+=8);var N=C[f&u];c:for(;;){if(f>>>=w=N>>>24,g-=w,0===(w=N>>>16&255))z[V++]=65535&N;else{if(!(16&w)){if(64&w){if(32&w){T.mode=16191;break b}O.msg="invalid literal/length code";
T.mode=16209;break b}N=C[(65535&N)+(f&(1<<w)-1)];continue c}n=65535&N;(w&=15)&&(g<w&&(f+=y[S++]<<g,g+=8),n+=f&(1<<w)-1,f>>>=w,g-=w);15>g&&(f+=y[S++]<<g,g+=8,f+=y[S++]<<g,g+=8);for(N=t[f&E];;){if(f>>>=w=N>>>24,g-=w,16&(w=N>>>16&255)){if(x=65535&N,g<(w&=15)&&(f+=y[S++]<<g,(g+=8)<w&&(f+=y[S++]<<g,g+=8)),(x+=f&(1<<w)-1)>na){O.msg="invalid distance too far back";T.mode=16209;break b}if(f>>>=w,g-=w,x>(w=V-ja)){if((w=x-w)>ta&&T.sane){O.msg="invalid distance too far back";T.mode=16209;break b}if(L=0,N=W,
0===fa){if(L+=oa-w,w<n){n-=w;do z[V++]=W[L++];while(--w);L=V-x;N=z}}else if(fa<w){if(L+=oa+fa-w,(w-=fa)<n){n-=w;do z[V++]=W[L++];while(--w);if(L=0,fa<n){n-=w=fa;do z[V++]=W[L++];while(--w);L=V-x;N=z}}}else if(L+=fa-w,w<n){n-=w;do z[V++]=W[L++];while(--w);L=V-x;N=z}for(;2<n;)z[V++]=N[L++],z[V++]=N[L++],z[V++]=N[L++],n-=3;n&&(z[V++]=N[L++],1<n&&(z[V++]=N[L++]))}else{L=V-x;do z[V++]=z[L++],z[V++]=z[L++],z[V++]=z[L++],n-=3;while(2<n);n&&(z[V++]=z[L++],1<n&&(z[V++]=z[L++]))}break}if(64&w){O.msg="invalid distance code";
T.mode=16209;break b}N=t[(65535&N)+(f&(1<<w)-1)]}}break}}while(S<ma&&V<U);S-=n=g>>3;f&=(1<<(g-=n<<3))-1;O.next_in=S;O.next_out=V;O.avail_in=S<ma?ma-S+5:5-(S-ma);O.avail_out=V<U?U-V+257:257-(V-U);T.hold=f;T.bits=g;n=a.next_out;y=a.output;E=a.avail_out;x=a.next_in;z=a.input;w=a.avail_in;u=b.hold;t=b.bits;16191===b.mode&&(b.back=-1);break}for(b.back=0;g=(m=b.lencode[u&(1<<b.lenbits)-1])>>>16&255,f=65535&m,!((C=m>>>24)<=t);){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(g&&!(240&g)){W=C;fa=g;for(ta=f;g=(m=
b.lencode[ta+((u&(1<<W+fa)-1)>>W)])>>>16&255,f=65535&m,!(W+(C=m>>>24)<=t);){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}u>>>=W;t-=W;b.back+=W}if(u>>>=C,t-=C,b.back+=C,b.length=f,0===g){b.mode=16205;break}if(32&g){b.back=-1;b.mode=16191;break}if(64&g){a.msg="invalid literal/length code";b.mode=16209;break}b.extra=15&g;b.mode=16201;case 16201:if(b.extra){for(g=b.extra;t<g;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}b.length+=u&(1<<b.extra)-1;u>>>=b.extra;t-=b.extra;b.back+=b.extra}b.was=b.length;b.mode=16202;
case 16202:for(;g=(m=b.distcode[u&(1<<b.distbits)-1])>>>16&255,f=65535&m,!((C=m>>>24)<=t);){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(!(240&g)){W=C;fa=g;for(ta=f;g=(m=b.distcode[ta+((u&(1<<W+fa)-1)>>W)])>>>16&255,f=65535&m,!(W+(C=m>>>24)<=t);){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}u>>>=W;t-=W;b.back+=W}if(u>>>=C,t-=C,b.back+=C,64&g){a.msg="invalid distance code";b.mode=16209;break}b.offset=f;b.extra=15&g;b.mode=16203;case 16203:if(b.extra){for(g=b.extra;t<g;){if(0===w)break a;w--;u+=z[x++]<<t;t+=
8}b.offset+=u&(1<<b.extra)-1;u>>>=b.extra;t-=b.extra;b.back+=b.extra}if(b.offset>b.dmax){a.msg="invalid distance too far back";b.mode=16209;break}b.mode=16204;case 16204:if(0===E)break a;if(d=G-E,b.offset>d){if((d=b.offset-d)>b.whave&&b.sane){a.msg="invalid distance too far back";b.mode=16209;break}d>b.wnext?(d-=b.wnext,e=b.wsize-d):e=b.wnext-d;d>b.length&&(d=b.length);C=b.window}else C=y,e=n-b.offset,d=b.length;d>E&&(d=E);E-=d;b.length-=d;do y[n++]=C[e++];while(--d);0===b.length&&(b.mode=16200);
break;case 16205:if(0===E)break a;y[n++]=b.length;E--;b.mode=16200;break;case 16206:if(b.wrap){for(;32>t;){if(0===w)break a;w--;u|=z[x++]<<t;t+=8}if(G-=E,a.total_out+=G,b.total+=G,4&b.wrap&&G&&(a.adler=b.check=b.flags?Ha(b.check,y,G,n-G):Hc(b.check,y,G,n-G)),G=E,4&b.wrap&&(b.flags?u:vg(u))!==b.check){a.msg="incorrect data check";b.mode=16209;break}t=u=0}b.mode=16207;case 16207:if(b.wrap&&b.flags){for(;32>t;){if(0===w)break a;w--;u+=z[x++]<<t;t+=8}if(4&b.wrap&&u!==(4294967295&b.total)){a.msg="incorrect length check";
b.mode=16209;break}t=u=0}b.mode=16208;case 16208:Q=Th;break a;case 16209:Q=sg;break a;case 16210:return tg;default:return cb}return a.next_out=n,a.avail_out=E,a.next_in=x,a.avail_in=w,b.hold=u,b.bits=t,(b.wsize||G!==a.avail_out&&16209>b.mode&&(16206>b.mode||c!==rg))&&Bg(a,a.output,a.next_out,G-a.avail_out),F-=a.avail_in,G-=a.avail_out,a.total_in+=F,a.total_out+=G,b.total+=G,4&b.wrap&&G&&(a.adler=b.check=b.flags?Ha(b.check,y,G,a.next_out-G):Hc(b.check,y,G,a.next_out-G)),a.data_type=b.bits+(b.last?
64:0)+(16191===b.mode?128:0)+(16199===b.mode||16194===b.mode?256:0),(0===F&&0===G||c===rg)&&Q===Qb&&(Q=Vh),Q},inflateEnd:function(a){if(Rb(a))return cb;var c=a.state;return c.window&&(c.window=null),a.state=null,Qb},inflateGetHeader:function(a,c){if(Rb(a))return cb;a=a.state;return 2&a.wrap?(a.head=c,c.done=!1,Qb):cb},inflateSetDictionary:function(a,c){var b,d=c.length;return Rb(a)||0!==(b=a.state).wrap&&16190!==b.mode?cb:16190===b.mode&&Hc(1,c,d,0)!==b.check?sg:Bg(a,c,d,d)?(b.mode=16210,tg):(b.havedict=
1,Qb)},inflateInfo:"pako inflate (from Nodeca project)"},Rg=function(){this.os=this.xflags=this.time=this.text=0;this.extra=null;this.extra_len=0;this.comment=this.name="";this.hcrc=0;this.done=!1},We=Object.prototype.toString,Wh=ba.Z_NO_FLUSH,Xh=ba.Z_FINISH,kc=ba.Z_OK,Ce=ba.Z_STREAM_END,De=ba.Z_NEED_DICT,Yh=ba.Z_STREAM_ERROR,Cg=ba.Z_DATA_ERROR,Zh=ba.Z_MEM_ERROR;jc.prototype.push=function(a,c){var b,d,e=this.strm,g=this.options.chunkSize,f=this.options.dictionary;if(this.ended)return!1;c=c===~~c?
c:!0===c?Xh:Wh;"[object ArrayBuffer]"===We.call(a)?e.input=new Uint8Array(a):e.input=a;e.next_in=0;for(e.avail_in=e.input.length;;){0===e.avail_out&&(e.output=new Uint8Array(g),e.next_out=0,e.avail_out=g);for((b=jb.inflate(e,c))===De&&f&&((b=jb.inflateSetDictionary(e,f))===kc?b=jb.inflate(e,c):b===Cg&&(b=De));0<e.avail_in&&b===Ce&&0<e.state.wrap&&0!==a[e.next_in];)jb.inflateReset(e),b=jb.inflate(e,c);switch(b){case Yh:case Cg:case De:case Zh:return this.onEnd(b),this.ended=!0,!1}if(d=e.avail_out,
e.next_out&&(0===e.avail_out||b===Ce))if("string"===this.options.to){var h=e.output;var l=e.next_out;(l=l||h.length)>h.length&&(l=h.length);for(var m=l-1;0<=m&&128==(192&h[m]);)m--;h=0>m||0===m?l:m+Lc[h[m]]>l?m:l;l=e.next_out-h;var q,p,n=e.output,y=(m=h)||n.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)m=(new TextDecoder).decode(n.subarray(0,m));else{m=Array(2*y);for(p=q=0;p<y;){var E=n[p++];if(128>E)m[q++]=E;else{var x=Lc[E];if(4<x)m[q++]=65533,p+=x-1;else{for(E&=2===x?31:
3===x?15:7;1<x&&p<y;)E=E<<6|63&n[p++],x--;1<x?m[q++]=65533:65536>E?m[q++]=E:(E-=65536,m[q++]=55296|E>>10&1023,m[q++]=56320|1023&E)}}}n=q;if(65534>n&&m.subarray&&qg)m=String.fromCharCode.apply(null,m.length===n?m:m.subarray(0,n));else{y="";for(q=0;q<n;q++)y+=String.fromCharCode(m[q]);m=y}}e.next_out=l;e.avail_out=g-l;l&&e.output.set(e.output.subarray(h,h+l),0);this.onData(m)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(b!==kc||0!==d){if(b===Ce)return b=
jb.inflateEnd(this.strm),this.onEnd(b),this.ended=!0,!0;if(0===e.avail_in)break}}return!0};jc.prototype.onData=function(a){this.chunks.push(a)};jc.prototype.onEnd=function(a){a===kc&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=pg(this.chunks));this.chunks=[];this.err=a;this.msg=this.strm.msg};var Dg,nf={Deflate:hc,deflate:Dd,deflateRaw:function(a,c){return(c=c||{}).raw=!0,Dd(a,c)},gzip:function(a,c){return(c=c||{}).gzip=!0,Dd(a,c)},Inflate:jc,inflate:Ed,inflateRaw:function(a,
c){return(c=c||{}).raw=!0,Ed(a,c)},ungzip:Ed,constants:ba};!function(a){a.BRAND="DeviceBrand";a.MANUFACTURER="DeviceManufacturer";a.MODEL="DeviceModel";a.TYPE="DeviceType";a.VERSION="DeviceVersion";a.OS_NAME="OperatingSystemName";a.OS_VERSION="OperatingSystemVersion";a.CATEGORY="DeviceCategory";a.FRAMEWORK_NAME="FrameworkName";a.FRAMEWORK_VERSION="FrameworkVersion"}(Dg||(Dg={}));var H,zb,oh={CONSOLE:"Console",DESKTOP:"DESKTOP",MOBILE:"Mobile",SETTOP:"Settop",SMARTTV:"SmartTV",TABLET:"Tablet",VEHICLE:"Vehicle",
OTHER:"Other"},Kf={ANDROID_DEVICE:"AND",APPLE_DEVICE:"APL",CHROMECAST:"CHR",DESKTOP_APP:"DSKAPP",DEVICE_SIMULATOR:"SIMULATOR",KAIOS_DEVICE:"KAIOS",LG_TV:"LGTV",LINUX:"LNX",NINTENDO:"NINTENDO",PLAYSTATION:"PS",ROKU:"RK",SAMSUNG_TV:"SAMSUNGTV",VIDAA_DEVICE:"VIDAA",VIZIO_TV:"VIZIOTV",WEB:"WEB",WINDOWS_DEVICE:"WIN",XBOX:"XB"};!function(a){var c,b,d,e,g;a.TRACEPARENT_HEADER_KEY="traceparent";(function(f){f.NONE="NONE";f.RCFG="RCFG"})(b=a.SAMPLING_MODES||(a.SAMPLING_MODES={}));(d=a.SAMPLING_STATUS||(a.SAMPLING_STATUS=
{})).DERIVED="DERIVED";d.DEFAULT="DEFAULT";(function(f){f.SAMPLED="sl";f.NON_SAMPLED="nsl"})(d=a.SAMPLING_ACTION||(a.SAMPLING_ACTION={}));a.DEFAULT_SAMPLING_ACTION=((c={})[d.SAMPLED]=b.RCFG,c[d.NON_SAMPLED]=b.NONE,c);(c=a.CONFIG_SOURCE||(a.CONFIG_SOURCE={})).DEFAULT="def";c.CACHED="cac";c.REMOTE="rem";(e=a.CONFIG_PREFERENCES||(a.CONFIG_PREFERENCES={}))[e.APP=0]="APP";e[e.REMOTE=1]="REMOTE";e[e.MERGE=2]="MERGE";(g=a.PERFORMANCE_CONTEXT||(a.PERFORMANCE_CONTEXT={}))[g.DISABLED=0]="DISABLED";g[g.PERFORMANCE_TIMING=
1]="PERFORMANCE_TIMING";g[g.PERFORMANCE_NAVIGATION_TIMING=2]="PERFORMANCE_NAVIGATION_TIMING";(e=a.RC_FETCH_MODE||(a.RC_FETCH_MODE={})).DO_NOT_FETCH_UPDATE_TIMER="updateTimer";e.IMMEDIATE_FETCH="urgentFetch";e.UPDATE_TIMER_WITH_DIFF="checkDiff";a.REMOTE_CONFIG_STORAGE_KEY="ConvivaRemoteConfig";a.END_POINT_STORAGE_KEY="ConvivaEndpoint";a.DEFAULT_END_POINT="https://appgw.conviva.com";a.REMOTE_CONFIG_URL_PREFIX="https://rc.conviva.com/js/";a.REMOTE_CONFIG_FILE_NAME="/remote_config.json";a.SAMPLING_STORAGE_RANDOM_NUMBER_KEY=
"ConvivaSamplingRandomNumber";a.VISUAL_LABELLING_CONFIG="ConvivaVisualLabellingConfig";a.DIAGNOSTIC_INFO_MAX_LENGTH={MAX_MESSAGE_LENGTH:1024,MAX_STACK_LENGTH:2048,MAX_CLASSNAME_LENGTH:1024,MAX_EXCEPTION_NAME_LENGTH:1024};a.CLICK_KEY_MAX_LENGTH=1024;a.CLICK_DEBOUNCING_DELAY=300;a.CLICK_MAX_DEPTH=16;a.MAX_NATIVE_SCAN=16;a.MAX_NATIVE_SCAN_LEGACY=8;a.PAGE_URL_QUERY_PARAMS="pgq"}(H||(H={}));"function"==typeof AbortController&&(zb=new AbortController);var pa,Ua=null==zb?void 0:zb.signal;!function(a){a.response_body=
"rsb";a.request_body="rqb";a.response_headers="rsh";a.request_headers="rqh";a.request_query="rqq"}(pa||(pa={}));var af=function(a){try{var c=void 0;return null!=a&&(c=a["content-type"]||a["Content-Type"]||a["Content-type"]),c}catch(b){}},wd,wa={};!function(a){a.APPLICATION_BACKGROUND="abg";a.APPLICATION_ERROR="ae"}(wd||(wd={}));var lb,ra,ka={cacheRefreshInterval:30,base64:!1,lifecycleAutotracking:!0,exceptionAutotracking:!0,enablePeriodicHeartbeat:!0,periodicHeartbeatInterval:40,customEventTrackingConfiguration:{enabled:!0},
networkRequestTrackingConfiguration:{blocklist:["*"]},traceparentconfig:{enabled:!1,pref:H.CONFIG_PREFERENCES.MERGE,targetUrl:[]},performanceContextConfig:1,configurationVersion:-1,catRcLastUpdatedTs:0,endpoint:H.DEFAULT_END_POINT,applicationContext:!0,maxLocalStorageQueueSize:10,emitterConfiguration:{batching:{enabled:!0,byteLimitPostInKB:250,batchingIntervalInSec:5,urgentEvents:[wd.APPLICATION_BACKGROUND,wd.APPLICATION_ERROR]}},enc:"gzip",mend:!0,di:{en:!1,lim:30},clickcc:{en:!0,cssSelectorList:'\n [role="button"],\n [data-role="button"],\n li,\n [class^="btn"],\n [class*="click"],\n [data-click],\n [data-action],\n [tabindex]:not([tabindex="-1"]),\n [onclick],\n [role="datepicker"],\n [class*="datepicker"],\n [class*="date-picker"],\n [class*="mat-datepicker"],\n [class*="ant-picker"],\n [class*="v-date-picker"],\n [class*="react-datepicker"],\n [class*="ngx-datepicker"],\n [data-ng-click],\n [ng-click],\n [v-on\\:click],\n [\\@click],\n [data-test-id*="click"],\n [data-testid*="button"],\n [class*="-btn"],\n [class*="-button"],\n [class*="mat-button"],\n [class*="v-btn"],\n [class*="v-icon-button"],\n [data-listener-count-click],\n [class*="Button"]\n',
uiMode:"closest"},collectionRateLimit:{exceptionAutotracking:{maxEvents:20,timeWindow:1E3,disconnectDuration:2E3}},evtStreamTrackingConfiguration:{enabled:!1,collect:[],block:[],conditionalCollectAttr:[]}},$h="cws.conviva.com /wsg /ctp remote_config pings.conviva.com .m3u8 .mpd .ism .m4 .mp4 .ts .png .jpg .jpeg .bmp google-analytics.com googlesyndication.com googleapis stats.g.doubleclick chartbeat.com omtrdc.net app-measurement.com firebase nr-data.net newrelic bitmovin.com/impression bitmovin.com/analytics api.segment.io youbora hotjar mixpanel.com clevertap auryc .aac .vtt .googlevideo webp appsflyer facebook dynatrace mparticle npaw .pdf bookkeeper kochava mp3 marketingcloudapis demdex scorecardresearch lura.live perimeterx.net permutive.app segment.com vaicore.site boomtrain ketchcdn qualtrics .svg amplitude datadoghq branch.io hotjar splunkcloud".split(" ");
!function(a){a.NONE="none";a.GZIP="gzip"}(lb||(lb={}));var eb,ph=function(a,c,b){return ra=Lg({base64:null==a?void 0:a.base64,corePlugins:c,callback:b,exceptionAutotracking:a.exceptionAutotracking,enablePeriodicHeartbeat:a.enablePeriodicHeartbeat,periodicHeartbeatInterval:a.periodicHeartbeatInterval,enc:a.enc,mend:a.mend,maxLocalStorageQueueSize:a.maxLocalStorageQueueSize,maxGetBytes:a.maxGetBytes,bufferSize:a.bufferSize,customEventTrackingConfiguration:a.customEventTrackingConfiguration,networkRequestTrackingConfiguration:a.networkRequestTrackingConfiguration,
metaTagsTrackingConfiguration:a.metaTagsTrackingConfiguration,traceparentconfig:a.traceparentconfig,performanceContextConfig:a.performanceContextConfig,lifecycleAutotracking:a.lifecycleAutotracking,configurationVersion:a.configurationVersion,catRcLastUpdatedTs:a.catRcLastUpdatedTs,cacheRefreshInterval:a.cacheRefreshInterval,endpoint:a.endpoint,controlIngestConfig:a.controlIngestConfig,applicationContext:a.applicationContext,emitterConfiguration:a.emitterConfiguration,di:a.di,clickcc:a.clickcc,collectionRateLimit:a.collectionRateLimit,
pageUrlTrackingConfig:a.pageUrlTrackingConfig,evtStreamTrackingConfiguration:a.evtStreamTrackingConfiguration})},Eg=function(a){var c={};return a.forEach(function(b,d){c[d]=b}),c},Wg=["/ctp","/wsg","remote_config","rc.conviva.com","pings.conviva.com"];!function(a){a[a.NETWORK_REQUEST=0]="NETWORK_REQUEST";a[a.CUSTOM_EVENT=1]="CUSTOM_EVENT";a[a.SSE_EVENT=2]="SSE_EVENT"}(eb||(eb={}));var Ee,Fe,Ge,gf=0,ff=0,va=H.CONFIG_SOURCE.DEFAULT,xa=0,Aa,qc,rc=!1,Gb=null,Kd=null,Yc=0,kf='\n button,\n a,\n select,\n textarea,\n input:not([type="hidden"]),\n summary,\n video,\n audio\n'.replace(/\s+/g,
"")||"",Xg='\n[class*="card"]\n'.replace(/\s+/g,"")||"",Fg="undefined"!=typeof window&&(null===window||void 0===window?0:window.localStorage)?localStorage.getItem(H.REMOTE_CONFIG_STORAGE_KEY):null,pc=Fg?null===(Fe=null===(Ee=JSON.parse(Fg).clickcc)||void 0===Ee?void 0:Ee.cssSelectorList)||void 0===Fe?void 0:Fe.replace(/\s+/g,""):null===(Ge=ka.clickcc)||void 0===Ge?void 0:Ge.cssSelectorList;!function(a){a.BOTH="both";a.CLOSEST="closest";a.RAW="raw"}(qc||(qc={}));"undefined"!=typeof Element&&Element.prototype&&
!Element.prototype.closest&&(Element.prototype.closest=function(a){try{for(var c=this;c;){if(c.matches(a))return c;c=c.parentElement}}catch(b){ea.warn("Conviva App Tracker caused Exception in closest polyfill method of user click tracking module",b)}return null});var bb,da,ai=function(a){this.cacheRefreshInterval=a.cacheRefreshInterval;this.base64=a.base64;this.corePlugins=a.corePlugins;this.callback=a.callback;this.lifecycleAutotracking=a.lifecycleAutotracking;this.exceptionAutotracking=a.exceptionAutotracking;
this.enablePeriodicHeartbeat=a.enablePeriodicHeartbeat;this.periodicHeartbeatInterval=a.periodicHeartbeatInterval;this.enc=a.enc;this.maxLocalStorageQueueSize=a.maxLocalStorageQueueSize;this.maxPostBytes=a.maxPostBytes;this.maxGetBytes=a.maxGetBytes;this.bufferSize=a.bufferSize;this.customEventTrackingConfiguration=a.customEventTrackingConfiguration;this.networkRequestTrackingConfiguration=a.networkRequestTrackingConfiguration;this.traceparentconfig=a.traceparentconfig;this.metaTagsTrackingConfiguration=
a.metaTagsTrackingConfiguration;this.performanceContextConfig=a.performanceContextConfig;this.mend=a.mend;this.configurationVersion=a.configurationVersion;this.catRcLastUpdatedTs=a.catRcLastUpdatedTs;this.endpoint=a.endpoint;this.emitterConfiguration=a.emitterConfiguration;this.controlIngestConfig=a.controlIngestConfig;this.applicationContext=a.applicationContext;this.di=a.di;this.clickcc=a.clickcc;this.collectionRateLimit=a.collectionRateLimit;this.pageUrlTrackingConfig=a.pageUrlTrackingConfig;this.evtStreamTrackingConfiguration=
a.evtStreamTrackingConfiguration},Gf=function(){function a(){this.cacheRefreshInterval=ka.cacheRefreshInterval;this.base64=ka.base64;this.lifecycleAutotracking=ka.lifecycleAutotracking;this.exceptionAutotracking=ka.exceptionAutotracking;this.enablePeriodicHeartbeat=ka.enablePeriodicHeartbeat;this.periodicHeartbeatInterval=ka.periodicHeartbeatInterval;this.customEventTrackingConfiguration=Z({},ka.customEventTrackingConfiguration);this.networkRequestTrackingConfiguration=Z({},ka.networkRequestTrackingConfiguration);
this.traceparentconfig=Z({},ka.traceparentconfig);this.performanceContextConfig=ka.performanceContextConfig;this.configurationVersion=ka.configurationVersion;this.catRcLastUpdatedTs=ka.catRcLastUpdatedTs;this.endpoint=ka.endpoint;this.emitterConfiguration=ka.emitterConfiguration;this.applicationContext=ka.applicationContext;this.enc=ka.enc;this.mend=ka.mend;this.di=Z({},ka.di);this.clickcc=Z({},ka.clickcc);this.collectionRateLimit=Z({},ka.collectionRateLimit);this.evtStreamTrackingConfiguration=Z({},
ka.evtStreamTrackingConfiguration)}return a.prototype.setCacheRefreshInterval=function(c){return this.cacheRefreshInterval="number"==typeof c&&1<=c&&lc(c)?c:ka.cacheRefreshInterval,this},a.prototype.setBase64=function(c){return"boolean"==typeof c&&(this.base64=c),this},a.prototype.setCorePlugins=function(c){return c&&(this.corePlugins=c),this},a.prototype.setCallback=function(c){return c&&(this.callback=c),this},a.prototype.setLifecycleAutotracking=function(c){return"boolean"==typeof c&&(this.lifecycleAutotracking=
c),this},a.prototype.setExceptionAutotracking=function(c){return"boolean"==typeof c&&(this.exceptionAutotracking=c),this},a.prototype.setEnablePeriodicHeartbeat=function(c){return"boolean"==typeof c&&(this.enablePeriodicHeartbeat=c),this},a.prototype.setPeriodicHeartbeatInterval=function(c){return"number"==typeof c&&1<=c&&(this.periodicHeartbeatInterval=~~c),this},a.prototype.setEnc=function(c,b){return"string"==typeof c&&Object.values(lb).includes(c)?this.enc=c:b&&"string"==typeof b&&Object.values(lb).includes(b)?
this.enc=b:this.enc=ka.enc,this},a.prototype.setMaxLocalStorageQueueSize=function(c){return"number"==typeof c&&(this.maxLocalStorageQueueSize=c),this},a.prototype.setMaxGetBytes=function(c){return"number"==typeof c&&(this.maxGetBytes=c),this},a.prototype.setBufferSize=function(c){return"number"==typeof c&&(this.bufferSize=c),this},a.prototype.setCustomEventTrackingConfiguration=function(c){return c&&(this.customEventTrackingConfiguration=c),this},a.prototype.setEmitterConfiguration=function(c){return void 0!==
c&&(void 0!==c.batching.enabled&&(this.emitterConfiguration.batching.enabled=c.batching.enabled),void 0!==c.batching.batchingIntervalInSec&&0<c.batching.batchingIntervalInSec&&(this.emitterConfiguration.batching.batchingIntervalInSec=c.batching.batchingIntervalInSec),"undefined"!=c.batching.byteLimitPostInKB&&0<c.batching.byteLimitPostInKB&&(this.emitterConfiguration.batching.byteLimitPostInKB=c.batching.byteLimitPostInKB),void 0!==c.batching.urgentEvents&&(this.emitterConfiguration.batching.urgentEvents=
c.batching.urgentEvents)),this},a.prototype.setNetworkRequestTrackingConfiguration=function(c,b,d){return c&&(this.networkRequestTrackingConfiguration=c,b&&(this.networkRequestTrackingConfiguration.blocklist||(this.networkRequestTrackingConfiguration.blocklist=[]),d&&this.networkRequestTrackingConfiguration.blocklist.push(d),this.networkRequestTrackingConfiguration.blocklist=this.networkRequestTrackingConfiguration.blocklist.concat($h))),this},a.prototype.setTraceparentconfig=function(c){return c&&
(this.traceparentconfig=c),this},a.prototype.setMetaTagsTrackingConfiguration=function(c){return c&&(this.metaTagsTrackingConfiguration=c),this},a.prototype.setPerformanceContextConfig=function(c){return"number"==typeof c&&(this.performanceContextConfig=c),this},a.prototype.setMend=function(c,b){return"boolean"==typeof c?this.mend=c:"boolean"==typeof b&&(this.mend=b),this},a.prototype.setConfigurationVersion=function(c){return"number"==typeof c&&(this.configurationVersion=c),this},a.prototype.setCatRcLastUpdatedTs=
function(c){return"number"==typeof c&&(this.catRcLastUpdatedTs=c),this},a.prototype.setEndPoint=function(c,b,d){return"string"==typeof d&&0<d.trim().length?this.endpoint=d:"string"==typeof c&&0<c.trim().length?this.endpoint=c:b&&"string"==typeof b&&0<b.trim().length?this.endpoint=b:this.endpoint=ka.endpoint,this},a.prototype.setcontrolIngestConfig=function(c){return void 0!==c?this.controlIngestConfig=c:Tc(),this},a.prototype.setApplicationContext=function(c){return void 0!==c&&(this.applicationContext=
c),this},a.prototype.setDi=function(c){return void 0!==c&&(this.di=Z(Z({},this.di),c)),this},a.prototype.setClickcc=function(c){var b,d;return void 0!==c&&("boolean"==typeof c.en&&(this.clickcc.en=c.en),c.cssSelectorList&&0<c.cssSelectorList.trim().length&&(this.clickcc.cssSelectorList=c.cssSelectorList),"string"==typeof c.uiMode&&Object.values(qc).includes(c.uiMode)&&(this.clickcc.uiMode=c.uiMode),void 0!==c.block&&(this.clickcc.block=c.block),void 0!==c.collect&&(this.clickcc.collect=c.collect),
void 0!==c.collectattr&&(this.clickcc.collectattr=c.collectattr)),"boolean"==typeof(null===(b=null==this?void 0:this.clickcc)||void 0===b?void 0:b.en)&&!0===(null===(d=null==this?void 0:this.clickcc)||void 0===d?void 0:d.en)?Zg():mf(),this},a.prototype.setCollectionRateLimit=function(c){return null!=c&&(this.collectionRateLimit=Z(Z({},this.collectionRateLimit),c)),this},a.prototype.setPageUrlTrackingConfig=function(c){return this.pageUrlTrackingConfig=void 0!==c?c:null,this},a.prototype.setEvtStreamTrackingConfiguration=
function(c){return void 0!==c&&("boolean"==typeof c.enabled&&(this.evtStreamTrackingConfiguration.enabled=c.enabled),void 0!==c.block&&(this.evtStreamTrackingConfiguration.block=c.block),void 0!==c.collect&&(this.evtStreamTrackingConfiguration.collect=c.collect),void 0!==c.conditionalCollectAttr&&(this.evtStreamTrackingConfiguration.conditionalCollectAttr=c.conditionalCollectAttr)),this},a.prototype.build=function(){return new ai(this)},a}(),ac=!1,Dc=null,bc=0,md=!1,Hf=function(a,c,b,d,e){var g=b.trackerConfigUrl?
b.trackerConfigUrl:d;if("number"==typeof Dc){window.clearInterval(Dc);var f={message:"Cancelling remote config timer",className:"updateRemoteConfig",extraData:{mode:e},configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:da.getSamplingMode,f)},0)}var h=function(){var p={message:"Starting remote config timer with delay of ".concat(60*a," seconds"),className:"updateRemoteConfig",configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:da.getSamplingMode,
p)},0);Dc=window.setInterval(cc,6E4*a,g)};try{var l=c?((new Date).getTime()-c)/6E4:a;b=a-l;d=3*a/100;if("string"==typeof e&&e===H.RC_FETCH_MODE.DO_NOT_FETCH_UPDATE_TIMER)h();else if("string"==typeof e&&e===H.RC_FETCH_MODE.UPDATE_TIMER_WITH_DIFF&&0<c&&b>d){window.setTimeout(function(){cc(g);h()},6E4*b);var m={message:"Starting remote config timer with delay of ".concat(60*b," seconds"),className:"updateRemoteConfig",extraData:{mode:e},configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,
null==da?void 0:da.getSamplingMode,m)},0)}else cc(g),h()}catch(p){console.warn("Conviva App Tracker:: Error in setting cacheRefreshIntervalTimer",p);cc(g);h();var q={className:"cacheRefreshIntervalTimer",error:p,configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:da.getSamplingMode,q)},0)}},cc=function(a,c){try{if("boolean"==typeof ac&&!1===ac){c?bc++:bc=0;bb.timeout=3E4;bb.open("GET",a,!0);ac=!0;var b={message:"Remote config fetch attempt",className:"updateRemoteConfig",
configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:da.getSamplingMode,b)},0);bb.send()}}catch(e){ac=!1;ea.warn("Conviva App Tracker:: Error in configtimerCallback ".concat(e));var d={className:"configtimerCallback",error:e,configAppliedSrc:va,configAppliedTime:xa};setTimeout(function(){za(ra,null==da?void 0:da.getSamplingMode,d)},0)}},mh=function(a,c,b){var d,e,g,f,h,l,m,q,p,n,y,E,x,z,w,u,t,F,G,Q,C,L,O,T,S,ma,V,ja,U,na,oa,ta,fa,W=ra;try{var N=(new Gf).setBase64(a.configurationBundle[0].trackerConfiguration.base64Encoding).setCacheRefreshInterval(a.cri||
a.cacheRefreshInterval).setLifecycleAutotracking(null===(e=null===(d=a.configurationBundle[0])||void 0===d?void 0:d.trackerConfiguration)||void 0===e?void 0:e.lifecycleAutotracking).setExceptionAutotracking(null===(f=null===(g=a.configurationBundle[0])||void 0===g?void 0:g.trackerConfiguration)||void 0===f?void 0:f.exceptionAutotracking).setEnablePeriodicHeartbeat(null===(l=null===(h=a.configurationBundle[0])||void 0===h?void 0:h.trackerConfiguration)||void 0===l?void 0:l.enablePeriodicHeartbeat).setPeriodicHeartbeatInterval(null===
(q=null===(m=a.configurationBundle[0])||void 0===m?void 0:m.trackerConfiguration)||void 0===q?void 0:q.periodicHeartbeatInterval).setEnc(null===(n=null===(p=a.configurationBundle[0])||void 0===p?void 0:p.networkConfiguration)||void 0===n?void 0:n.enc,null===(E=null===(y=null==b?void 0:b.configs)||void 0===y?void 0:y.network)||void 0===E?void 0:E.encoding).setMaxLocalStorageQueueSize(null===(z=null===(x=a.configurationBundle[0])||void 0===x?void 0:x.networkConfiguration)||void 0===z?void 0:z.maxLocalStorageQueueSize).setMaxGetBytes(null===
(u=null===(w=a.configurationBundle[0])||void 0===w?void 0:w.networkConfiguration)||void 0===u?void 0:u.maxGetBytes).setBufferSize(null===(F=null===(t=a.configurationBundle[0])||void 0===t?void 0:t.networkConfiguration)||void 0===F?void 0:F.bufferSize).setCustomEventTrackingConfiguration(null===(G=a.configurationBundle[0])||void 0===G?void 0:G.customEventTrackingConfiguration).setEndPoint(null===(C=null===(Q=a.configurationBundle[0])||void 0===Q?void 0:Q.networkConfiguration)||void 0===C?void 0:C.endpoint,
b.gatewayUrl,b.proxyGatewayUrl).setNetworkRequestTrackingConfiguration(null===(L=a.configurationBundle[0])||void 0===L?void 0:L.networkRequestTrackingConfiguration,!0,null===(T=null===(O=a.configurationBundle[0])||void 0===O?void 0:O.networkConfiguration)||void 0===T?void 0:T.endpoint).setMetaTagsTrackingConfiguration(null===(S=a.configurationBundle[0])||void 0===S?void 0:S.metaTagsTrackingConfiguration).setTraceparentconfig(null===(ma=a.configurationBundle[0])||void 0===ma?void 0:ma.traceparentconfig).setMend(null===
(ja=null===(V=a.configurationBundle[0])||void 0===V?void 0:V.networkConfiguration)||void 0===ja?void 0:ja.mend,null===(na=null===(U=null==b?void 0:b.configs)||void 0===U?void 0:U.network)||void 0===na?void 0:na.mergeEndpoint).setPerformanceContextConfig(null===(ta=null===(oa=a.configurationBundle[0])||void 0===oa?void 0:oa.trackerConfiguration)||void 0===ta?void 0:ta.perfCx).setConfigurationVersion(a.configurationVersion).setCatRcLastUpdatedTs(c).setEmitterConfiguration(a.configurationBundle[0].emitterConfiguration).setcontrolIngestConfig(a["ctrl-ingst"]).setApplicationContext(a.configurationBundle[0].trackerConfiguration.applicationContext).setDi(a.configurationBundle[0].di).setClickcc(a.configurationBundle[0].clickcc).setCollectionRateLimit(a.configurationBundle[0].collectionRateLimit).setPageUrlTrackingConfig(a.configurationBundle[0].pageUrlTrackingConfig).setEvtStreamTrackingConfiguration(a.configurationBundle[0].evtStreamTrackingConfiguration).build();
va=H.CONFIG_SOURCE.REMOTE;xa=(new Date).getTime();null==W||W.setConfig(N);a={message:"Remote Config Applied",className:"updateRemoteConfig - tracker",configAppliedSrc:va,configAppliedTime:xa};za(ra,null==da?void 0:da.getSamplingMode,a);null==da||da.setCollectorUrl(null===(fa=null==W?void 0:W.getConfig())||void 0===fa?void 0:fa.endpoint,b.convivaCustomerKey);try{window.localStorage&&(localStorage.removeItem(H.REMOTE_CONFIG_STORAGE_KEY),localStorage.setItem(H.REMOTE_CONFIG_STORAGE_KEY,JSON.stringify(N)))}catch(ua){za(ra,
null==da?void 0:da.getSamplingMode,{className:"updateRemoteConfig - localstorage",error:ua,configAppliedSrc:va,configAppliedTime:xa}),console.warn("Conviva: Error while saving remote-config to localstorage",ua)}}catch(ua){return a={className:"updateRemoteConfig - tracker",error:ua,configAppliedSrc:va,configAppliedTime:xa},za(ra,null==da?void 0:da.getSamplingMode,a),console.warn("Conviva: Error while updating remote-config",ua),!1}return!0},He={idleMs:3E4,maxEvents:1E4,bufferMaxBytes:1E6},th=function(){function a(c,
b,d){var e;this.originalFetch=null===(e=null===window||void 0===window?void 0:window.fetch)||void 0===e?void 0:e.bind(window);this.sseCountStates=new Map;this.core=ra;this.trackerMethods=c;this.trackerConfiguration=b;this.getSamplingMode=d;this.handleResponse=this.handleResponse.bind(this);this.addTraceparentHeader=this.addTraceparentHeader.bind(this)}return a.prototype.cleanupNetworkRequestHandler=function(){a.instance=null},a.getInstance=function(c,b,d){return a.instance||(a.instance=new a(c,b,
d)),a.instance},a.prototype.initiateNetworkRequestTracking=function(){try{this.decorateXMLHttpRequest(),this.decorateFetch(),this.decorateWebSocket()}catch(c){console.warn("Conviva App Tracker:: Unable to track network request ".concat(c))}},a.prototype.decorateXMLHttpRequest=function(){var c=this,b=XMLHttpRequest.prototype.open,d=XMLHttpRequest.prototype.send,e=XMLHttpRequest.prototype.setRequestHeader;XMLHttpRequest.prototype.open=function(){for(var g=this,f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];
return setTimeout(function(){try{g._conviva={method:f[0],url:c.normalizeUrl(f[1]),headers:{}}}catch(l){console.warn("Conviva App Tracker:: Unable to normalizeUrl while open ".concat(l))}},0),b.apply(this,f)};XMLHttpRequest.prototype.setRequestHeader=function(){for(var g=this,f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];return setTimeout(function(){try{g._conviva&&(g._conviva.headers[f[0]]=f[1])}catch(l){console.warn("Conviva App Tracker:: while setRequestHeader ".concat(l))}},0),e.apply(this,
f)};XMLHttpRequest.prototype.send=function(){for(var g=this,f=[],h=0;h<arguments.length;h++)f[h]=arguments[h];return setTimeout(function(){try{var l=g._conviva;if(l){var m=c.addTraceparentHeader(g,l.url,l.headers),q=c.createRequestDetails(l.method,l.url,l.headers,f[0],m);l=Ua;g.addEventListener("load",function(){return c.handleResponse(g,q,"load")},{signal:l});g.addEventListener("error",function(){return c.handleResponse(g,q,"error")},{signal:l});g.addEventListener("abort",function(){return c.handleResponse(g,
q,"abort")},{signal:l});g.addEventListener("timeout",function(){return c.handleResponse(g,q,"timeout")},{signal:l})}}catch(p){console.warn("Conviva App Tracker:: Unable to track network request while send ".concat(p))}},0),d.apply(this,f)}},a.prototype.decorateFetch=function(){window.fetch=this.interceptFetch.bind(this)},a.prototype.interceptFetch=function(c,b){var d,e,g,f,h=this,l=null;if(c instanceof Request){var m=null==c?void 0:c.clone();try{var q=!1;null===(d=null==m?void 0:m.headers)||void 0===
d||d.forEach(function(F,G){H.TRACEPARENT_HEADER_KEY===G&&(q=!0)});q||null!==(l=this.generateTraceparentHeader(m.url))&&""!==l&&m.headers.set(H.TRACEPARENT_HEADER_KEY,l)}catch(F){console.warn("ConvivaAppTracker: Issue while adding traceparent header",F)}d=this.originalFetch(m)}else{try{if(b&&b.headers){var p=new Headers(b.headers),n=!1;p.forEach(function(F,G){H.TRACEPARENT_HEADER_KEY===G&&(n=!0)});n||null!==(l=this.generateTraceparentHeader(c))&&""!==l&&p.set(H.TRACEPARENT_HEADER_KEY,l);b.headers=
p}else p=new Headers,null!==(l=this.generateTraceparentHeader(c))&&""!==l&&p.set(H.TRACEPARENT_HEADER_KEY,l),b?b.headers=p:(b={}).headers=p}catch(F){console.warn("ConvivaAppTracker: Issue while adding traceparent header",F)}d=this.originalFetch(c,b);m=(new Request(c,b)).clone()}try{c=void 0;try{c=Eg(m.headers)}catch(F){}p=void 0;try{p=null==b?void 0:b.body}catch(F){}var y={method:m.method,url:decodeURIComponent(m.url),headers:c,body:p,requestTimestamp:null===Date||void 0===Date?void 0:Date.now(),
requestTime:(null===performance||void 0===performance?void 0:performance.now())||(null===Date||void 0===Date?void 0:Date.now())};if(this.getSamplingMode()!==H.SAMPLING_MODES.NONE){var E=this.core.getConfig().networkRequestTrackingConfiguration,x=this.core.getConfig().evtStreamTrackingConfiguration,z=E.blocklist,w=null===(f=null===(g=null===(e=this.trackerConfiguration)||void 0===e?void 0:e.configs)||void 0===g?void 0:g.networkRequestTracking)||void 0===f?void 0:f.safelist,u=E.collect,t=E.block;null!==
l&&""!==l&&(y[H.TRACEPARENT_HEADER_KEY]=l);d.then(function(F){try{var G=F.headers.get("content-type");if(x&&x.enabled&&G&&G.includes("text/event-stream")){var Q=F.clone().body;Q?function(L,O,T,S,ma){var V,ja,U;return void 0===S&&(S={}),Gg(this,void 0,void 0,function(){var na,oa,ta,fa,W,N,ua,Na,M,P,Y,aa,Oa,Pa,Va;return Hg(this,function(Ca){switch(Ca.label){case 0:na=null!==(V=S.idleMs)&&void 0!==V?V:3E4,oa=null!==(ja=S.maxEvents)&&void 0!==ja?ja:1E4,ta=null!==(U=S.bufferMaxBytes)&&void 0!==U?U:1E6,
fa=L.getReader(),W=new TextDecoder("utf-8"),N="",ua=0,Na=void 0,(M=function(){void 0!==Na&&(clearTimeout(Na),Na=void 0);Na=setTimeout(function(){console.warn("Conviva App Tracker:: stream idle >",na,"ms \u2192 cancelling",O);fa.cancel()},na)})(),Ca.label=1;case 1:Ca.trys.push([1,5,6,7]),Ca.label=2;case 2:return[4,fa.read()];case 3:if(P=Ca.sent(),Y=P.value,P.done)return[3,4];if(M(),N+=W.decode(Y,{stream:!0}),(new TextEncoder).encode(N).length>ta)return console.warn("Conviva App Tracker:: SSE buffer exceeded",
ta,"bytes, cancelling stream",O),fa.cancel(),[3,4];for(aa=void 0;-1!==(aa=N.search(/\r?\n\r?\n/));)if(Oa=N.slice(0,aa).replace(/\s+$/,""),N=N.slice(aa+2),(Pa=$g(Oa))&&(T(Pa),++ua>=oa)){console.warn("Conviva App Tracker:: event budget reached \u2192 cancelling",O);fa.cancel();break}return[3,2];case 4:return[3,7];case 5:if(!((Va=Ca.sent())instanceof DOMException&&"AbortError"===Va.name))throw Va;return[3,7];case 6:return clearTimeout(Na),fa.releaseLock(),ma&&ma(),[7];case 7:return[2]}})})}(Q,m.url,
function(L){h.processSSEEvent(L,m.url)},{idleMs:x.idleMs,maxEvents:x.maxEvents,bufferMaxBytes:x.bufferMaxBytes},function(){h.cleanupSSECountState(m.url)}).catch(function(){}):console.warn("Conviva App Tracker:: Response body is null, cannot read as stream")}else if(E&&E.enabled&&(G=Vc(u,t,z,w,F,y))){G=void 0;try{G=Eg(F.headers)}catch(L){}var C={status:null==F?void 0:F.status,statusText:""!==(null==F?void 0:F.statusText)?null==F?void 0:F.statusText:void 0,headers:G,size:0,responseTimestamp:null===
Date||void 0===Date?void 0:Date.now(),responseTime:(null===performance||void 0===performance?void 0:performance.now())||(null===Date||void 0===Date?void 0:Date.now())};F.clone().json().then(function(L){C.body=L;h.trackerMethods.trackNetworkRequest({requestDetails:y,responseDetails:C})}).catch(function(){h.trackerMethods.trackNetworkRequest({requestDetails:y,responseDetails:C})})}}catch(L){G=Vc(u,t,z,w,F,y),E&&E.enabled&&G&&(F={statusText:L.toString(),responseTimestamp:null===Date||void 0===Date?void 0:
Date.now(),responseTime:(null===performance||void 0===performance?void 0:performance.now())||(null===Date||void 0===Date?void 0:Date.now())},h.trackerMethods.trackNetworkRequest({requestDetails:y,responseDetails:F}))}}).catch(function(F){var G=Vc(u,t,z,w,null,y);E&&E.enabled&&G&&(F={statusText:F.toString(),responseTimestamp:null===Date||void 0===Date?void 0:Date.now(),responseTime:(null===performance||void 0===performance?void 0:performance.now())||(null===Date||void 0===Date?void 0:Date.now())},
h.trackerMethods.trackNetworkRequest({requestDetails:y,responseDetails:F}))})}}catch(F){console.warn("Conviva App Tracker:: Unable to track network request while fetch interceptRequest ".concat(F))}return d},a.prototype.handleResponse=function(c,b,d){var e,g,f,h,l,m;try{if(this.getSamplingMode()!==H.SAMPLING_MODES.NONE){var q=null===(e=this.core)||void 0===e?void 0:e.getConfig().networkRequestTrackingConfiguration,p=q.blocklist,n=null===(h=null===(f=null===(g=this.trackerConfiguration)||void 0===
g?void 0:g.configs)||void 0===f?void 0:f.networkRequestTracking)||void 0===h?void 0:h.safelist,y=Vc(q.collect,q.block,p,n,c,b);if(q&&q.enabled&&y){var E={status:c.status,statusText:c.statusText||("load"!==d?d:void 0),responseTimestamp:Date.now(),responseTime:performance.now()||Date.now(),headers:(l=c.getAllResponseHeaders(),m={},l.trim().split(/[\r\n]+/).forEach(function(x){x=x.split(":");var z=x[1];m[x[0].trim()]=null==z?void 0:z.trim()}),m),body:c.response};this.trackerMethods.trackNetworkRequest({requestDetails:b,
responseDetails:E})}}}catch(x){ea.warn("Conviva App Tracker:: Unable to track network request error while handleResponse ".concat(x))}},a.prototype.decorateWebSocket=function(){function c(f){d?d.has(f)||(d.add(f),b.addWebSocketEventListeners(f)):f.__convivaWsTag__||(f.__convivaWsTag__=!0,b.addWebSocketEventListeners(f))}var b=this,d="undefined"!=typeof WeakSet?new WeakSet:null,e=WebSocket.prototype.send;WebSocket.prototype.send=function(f){try{"string"==typeof f&&b.handleWebSocketSend(f,this),c(this)}catch(h){ea.warn("Conviva WS tracking error:",
h)}return e.apply(this,arguments)};var g=WebSocket;window.WebSocket=function(f,h){f=new g(f,h);return c(f),f};window.WebSocket.prototype=g.prototype;Object.assign(window.WebSocket,g)},a.prototype.addWebSocketEventListeners=function(c){var b=this,d=Ua;c.addEventListener("message",function(e){return b.handleWebSocketMessage(e)},{signal:d});c.addEventListener("open",function(e){return b.handleWebSocketOpen(e)},{signal:d});c.addEventListener("close",function(e){return b.handleWebSocketClose(e)},{signal:d});
c.addEventListener("error",function(e){return b.handleWebSocketError(e)},{signal:d})},a.prototype.handleWebSocketOpen=function(c){try{var b={url:this.getWebSocketUrl(c.target),type:c.type,timestamp:Date.now()}}catch(d){b={data:c.data,url:c.target?this.getWebSocketUrl(c.target):void 0}}this.sendWebSocketEvent("open",b)},a.prototype.handleWebSocketClose=function(c){try{var b={url:this.getWebSocketUrl(c.target),type:c.type,code:c.code,reason:c.reason,wasClean:c.wasClean,timestamp:Date.now()}}catch(d){b=
{data:c.data,url:c.target?this.getWebSocketUrl(c.target):void 0}}this.sendWebSocketEvent("close",b)},a.prototype.handleWebSocketMessage=function(c){var b;try{(b="string"==typeof c.data?JSON.parse(c.data):c.data).url=this.getWebSocketUrl(c.target)}catch(d){b={data:c.data,url:c.target?this.getWebSocketUrl(c.target):void 0}}this.sendWebSocketEvent("server",b)},a.prototype.handleWebSocketSend=function(c,b){try{var d="string"==typeof c?JSON.parse(c):c;var e={url:this.getWebSocketUrl(b),type:d.type}}catch(g){e=
{url:this.getWebSocketUrl(b)},d={data:c}}this.sendWebSocketEvent("send",e,d)},a.prototype.handleWebSocketError=function(c){var b,d,e,g,f,h,l;try{var m={url:this.getWebSocketUrl(c.target),type:c.type,timestamp:Date.now(),readyState:this.getWebSocketReadyState(c.target),errorMessage:c.message||"WebSocket error occurred",errorType:(null===(b=c.error)||void 0===b?void 0:b.name)||"WebSocketError",errorCode:null===(d=c.error)||void 0===d?void 0:d.code,errorDetails:null===(e=c.error)||void 0===e?void 0:
e.message,networkType:(null===(g=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===g?void 0:g.type)||"unknown",networkEffectiveType:(null===(f=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===f?void 0:f.effectiveType)||"unknown",networkDownlink:null===(h=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===h?void 0:h.downlink,networkRtt:null===(l=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===
l?void 0:l.rtt,userAgent:null===navigator||void 0===navigator?void 0:navigator.userAgent}}catch(q){m={url:this.getWebSocketUrl(c.target),type:"error",timestamp:Date.now(),error:"Failed to process WebSocket error event: ".concat(q instanceof Error?q.message:String(q)),originalEvent:c}}this.sendWebSocketEvent("error",m)},a.prototype.sendWebSocketEvent=function(c,b,d){var e;void 0===d&&(d={});try{var g=null===(e=this.core.getConfig())||void 0===e?void 0:e.evtStreamTrackingConfiguration;if(null!=g&&g.enabled){var f=
this.getSSECountState(b.url),h=Z("send"===c?Z(Z({},b),d):Z({},b),{event:c}),l=Wc(g.collect,g.block,h,b.url);if(null!=l&&l.result){var m=null==l?void 0:l.matchedConfig;if(!0!==(null==m?void 0:m.count)||(f.tokenCount++,null==l?!1:l.shouldSend)){var q={url:b.url,id:b.id,type:b.type,event:c};!0===(null==m?void 0:m.countReset)&&(0<f.tokenCount&&(q.tokenCount=f.tokenCount),this.resetSSECountState(b.url));c="send"===c?d:b;if(g.conditionalCollectAttr&&0<g.conditionalCollectAttr.length){var p=bf(c,g.conditionalCollectAttr,
b.url,Wc);0<Object.keys(p).length&&(q=Z(Z({},q),p))}this.trackerMethods.trackSSEEvent({name:"conviva_ws_message",data:JSON.stringify(q)})}}}}catch(n){}},a.prototype.getWebSocketUrl=function(c){try{return c&&"object"===la(c)&&"url"in c?c.url:void 0}catch(b){}},a.prototype.getWebSocketReadyState=function(c){try{return c&&"object"===la(c)&&"readyState"in c?c.readyState:void 0}catch(b){}},a.prototype.addTraceparentHeader=function(c,b,d){var e=null;return H.TRACEPARENT_HEADER_KEY in d||(e=this.generateTraceparentHeader(b))&&
c.setRequestHeader(H.TRACEPARENT_HEADER_KEY,e),e},a.prototype.createRequestDetails=function(c,b,d,e,g){c={method:c,url:b,headers:d,body:e,requestTimestamp:Date.now(),requestTime:performance.now()||Date.now()};return g&&(c[H.TRACEPARENT_HEADER_KEY]=g),c},a.prototype.normalizeUrl=function(c){if(c instanceof URL)return c.href;try{if("undefined"!=typeof document){var b=URL;if(document.baseURI)var d=document.baseURI;else{var e=document.querySelector("base");d=e&&e.href?e.href:document.location.href}return(new b(c,
d)).href}}catch(g){}return c},a.prototype.generateTraceparentHeader=function(c){var b,d,e,g,f,h,l,m,q,p,n,y,E,x,z,w,u,t,F,G,Q,C,L;try{if(this.core&&c){var O=this.core.getConfig(),T=H.CONFIG_PREFERENCES.MERGE,S=[];switch((null===(e=null===(d=null===(b=this.trackerConfiguration)||void 0===b?void 0:b.configs)||void 0===d?void 0:d.traceparentGeneration)||void 0===e?0:e.force)?T=H.CONFIG_PREFERENCES.APP:(null===(g=null==O?void 0:O.traceparentconfig)||void 0===g?void 0:g.pref)&&(T=O.traceparentconfig.pref),
T){case H.CONFIG_PREFERENCES.APP:if(!1===(null===(l=null===(h=null===(f=this.trackerConfiguration)||void 0===f?void 0:f.configs)||void 0===h?void 0:h.traceparentGeneration)||void 0===l?void 0:l.enabled))return"";S=(null===(p=null===(q=null===(m=this.trackerConfiguration)||void 0===m?void 0:m.configs)||void 0===q?void 0:q.traceparentGeneration)||void 0===p?void 0:p.targetUrl)||[];break;case H.CONFIG_PREFERENCES.REMOTE:if(!1===(null===(n=null==O?void 0:O.traceparentconfig)||void 0===n?void 0:n.enabled))return"";
S=(null===(y=null==O?void 0:O.traceparentconfig)||void 0===y?void 0:y.targetUrl)||[];break;default:if((null==O||!O.traceparentconfig)&&!1===(null===(z=null===(x=null===(E=this.trackerConfiguration)||void 0===E?void 0:E.configs)||void 0===x?void 0:x.traceparentGeneration)||void 0===z?void 0:z.enabled)||(null===(u=null===(w=this.trackerConfiguration)||void 0===w?void 0:w.configs)||void 0===u||!u.traceparentGeneration)&&!1===(null===(t=null==O?void 0:O.traceparentconfig)||void 0===t?void 0:t.enabled))return"";
var ma=(null===(Q=null===(G=null===(F=this.trackerConfiguration)||void 0===F?void 0:F.configs)||void 0===G?void 0:G.traceparentGeneration)||void 0===Q?void 0:Q.targetUrl)||[],V=(null===(C=null==O?void 0:O.traceparentconfig)||void 0===C?void 0:C.targetUrl)||[],ja=new Set(Ea(Ea([],V,!0),ma,!0));S=Array.from(ja)}if(0<S.length&&(S.includes("*")||S.some(function(oa){return 0<(null==oa?void 0:oa.length)&&c.toLowerCase().includes(oa.toLowerCase())}))&&(null===(L=null==O?void 0:O.networkRequestTrackingConfiguration)||
void 0===L?0:L.enabled)){var U=Array.from({length:32},function(){return Math.floor(16*Math.random()).toString(16)}).join(""),na=Array.from({length:16},function(){return Math.floor(16*Math.random()).toString(16)}).join("");return"00-".concat(U,"-").concat(na,"-00")}}}catch(oa){console.warn("Conviva App Tracker:: Unable to generate traceparent header ".concat(oa))}return""},a.prototype.updateSSETrackingConfig=function(c){He=Z(Z({},He),c)},a.prototype.getSSETrackingConfig=function(){return Z({},He)},
a.prototype.processSSEEvent=function(c,b){var d,e;try{if("ping"!==c.event){var g=c.data;try{g=JSON.parse(c.data)}catch(y){}var f={url:b,id:c.id,event:null!==(d=c.event)&&void 0!==d?d:"message",data:g},h=null===(e=this.core.getConfig())||void 0===e?void 0:e.evtStreamTrackingConfiguration;if(null!=h&&h.enabled){var l=this.getSSECountState(b),m=Wc(h.collect,h.block,f,b);if(null!=m&&m.result){var q=null==m?void 0:m.matchedConfig;if(!0!==(null==q?void 0:q.count)||(l.tokenCount++,null==m?!1:m.shouldSend)){var p=
{url:f.url,id:f.id,event:f.event};if(!0===(null==q?void 0:q.countReset)&&(0<l.tokenCount&&(p.tokenCount=l.tokenCount),this.resetSSECountState(b)),h.conditionalCollectAttr&&0<h.conditionalCollectAttr.length){var n=bf(f,h.conditionalCollectAttr,b,Wc);0<Object.keys(n).length&&(p=Z(Z({},p),n))}this.trackerMethods.trackSSEEvent({name:"conviva_sse_message",data:JSON.stringify(p)})}}}}}catch(y){}},a.prototype.getSSECountState=function(c){return this.sseCountStates.has(c)||this.sseCountStates.set(c,{tokenCount:0}),
this.sseCountStates.get(c)},a.prototype.resetSSECountState=function(c){this.sseCountStates.set(c,{tokenCount:0})},a.prototype.cleanupSSECountState=function(c){this.sseCountStates.delete(c)},a}(),Sa,Hb,eh=function(){function a(c,b,d,e,g){void 0===c&&(c=20);void 0===b&&(b=2E3);void 0===d&&(d=1E3);this.eventMaxLimit=c;this.cooldown=b;this.windowStart=Date.now();this.circuitBreakerUntil=this.eventCount=0;this.breakerPreviouslyOpen=!1;this.droppedCount=0;this.trackerCore=e;this.timeWindow=d;this.getSamplingMode=
g}return a.prototype.isAllowedToSendEvent=function(){var c=Date.now();if(c<this.circuitBreakerUntil)return this.droppedCount++,!1;this.breakerPreviouslyOpen&&(this.breakerPreviouslyOpen=!1,za(this.trackerCore,this.getSamplingMode,{message:"Application Error",className:"errorRateLimiter - isAllowedToSendEvent",extraData:{droppedCount:this.droppedCount},configAppliedSrc:va,configAppliedTime:xa}),this.droppedCount=0);return c-this.windowStart<this.timeWindow?this.eventCount++:(this.windowStart=c,this.eventCount=
1),!(this.eventCount>this.eventMaxLimit)||(this.circuitBreakerUntil=c+this.cooldown,this.breakerPreviouslyOpen=!0,this.droppedCount++,!1)},a.prototype.updateErrortRateLimitConfig=function(c,b,d){this.eventMaxLimit=c;this.cooldown=b;this.timeWindow=d},a}(),Yb,qf=function(a,c){return a.length>c?"".concat(a.slice(0,c-3),"..."):a};!function(a){a[a.APP=0]="APP";a[a.REMOTE=1]="REMOTE";a[a.MERGE=2]="MERGE"}(Yb||(Yb={}));var Nb={},bi=function(){this.outQueues=[];this.bufferFlushers=[];this.hasLoaded=!1;this.registeredOnLoadHandlers=
[]};ya.cleanup=function(a){Za(a,function(c){c.clearTimers()});(function(c){if(c)for(var b=0;b<c.length;b++){var d=c[b];Nb.hasOwnProperty(d)?delete Nb[d]:ea.warn(d+" not configured")}})(a)};ya.convivaAppTracker=function(a){void 0===a&&(a={});try{var c="undefined"!=typeof window?function(){function b(){var f;if(!d.hasLoaded)for(d.hasLoaded=!0,f=0;f<d.registeredOnLoadHandlers.length;f++)d.registeredOnLoadHandlers[f]();return!0}var d=new bi,e=document,g=window;return ab(g,"beforeunload",function(){try{d.bufferFlushers.forEach(function(f){f(!1)})}catch(f){console.warn("Conviva App Tracker:: Error in flushBuffers of constructor ".concat(f))}},
!1),"loading"===document.readyState?(e.addEventListener?e.addEventListener("DOMContentLoaded",function h(){e.removeEventListener("DOMContentLoaded",h,!1);b()}):e.attachEvent&&e.attachEvent("onreadystatechange",function l(){"complete"===e.readyState&&(e.detachEvent("onreadystatechange",l),b())}),ab(g,"load",b,!1)):b(),d}():void 0;if(c)return function(b,d,e,g,f){return Nb.hasOwnProperty(b)?null:(Nb[b]=gh(b,d,e,g,f),Nb[b])}("CAT","CAT",a.trackerVersionSuffix?"js-".concat("1.3.2"," ").concat(a.trackerVersionSuffix):
"js-".concat("1.3.2"),c,a)}catch(b){return void console.warn("Conviva App Tracker:: Initialisation failed! "+b)}};ya.getClientId=function(){if("undefined"!=typeof window&&(null===window||void 0===window?0:window.localStorage)){var a=window.localStorage.getItem("Conviva.sdkConfig");a=JSON.parse(a||"{}");return"{}"===a||void 0===a?"":a.clId}return""};ya.setClientId=function(a){if(a&&"string"==typeof a)try{var c=a.split(".");if(4!==c.length)return void console.warn('Conviva App Tracker:: Invalid clientId format! It should be in the format of "x.x.x.x"');
if(!1===c.every(function(f){return/^\d+$/.test(f)}))return void console.warn("Conviva App Tracker:: Invalid clientId format! Every part of clientId should be numeric");if("undefined"!=typeof window&&(null===window||void 0===window?0:window.localStorage)){var b=window.localStorage,d=b.getItem("Conviva.sdkConfig"),e=JSON.parse(d||"{}");"{}"===e||void 0===e?e={clId:a}:e.clId=a;var g=JSON.stringify(e);b.setItem("Conviva.sdkConfig",g)}else console.warn("Conviva App Tracker:: window or local storage is not available")}catch(f){console.warn(f)}else console.warn("Conviva App Tracker:: Unable to set clinetId string!")};
ya.setCustomTags=function(a,c){Za(c,function(b){try{b.setCustomTags(a)}catch(d){console.warn("Conviva App Tracker:: Unable to set custom tags data!")}})};ya.setCustomUrl=function(a,c){Za(c,function(b){b.setCustomUrl(a)})};ya.setDocumentTitle=function(a,c){Za(c,function(b){b.setDocumentTitle(a)})};ya.setReferrerUrl=function(a,c){Za(c,function(b){b.setReferrerUrl(a)})};ya.setUserId=function(a,c){Za(c,function(b){b.setUserId(a)})};ya.trackButtonClick=function(a,c){Za(c,function(b){try{b.trackButtonClick(a)}catch(d){console.warn("Conviva App Tracker:: Unable to track button click event! "+
d)}})};ya.trackCustomEvent=function(a,c){Za(c,function(b){try{b.trackCustomEvent(a)}catch(d){console.warn("Conviva App Tracker:: Unable to track custom event! "+d)}})};ya.trackError=function(a,c){Za(c,function(b){try{b.trackErrorEvent(a)}catch(d){console.warn("Conviva App Tracker:: Unable to track error!")}})};ya.trackLinkClick=function(a,c){Za(c,function(b){try{b.trackLinkClick(a)}catch(d){console.warn("Conviva App Tracker:: Unable to track link click event! "+d)}})};ya.trackPageView=function(a,
c){Za(c,function(b){b.trackPageView(a)})};ya.unsetCustomTags=function(a,c){Za(c,function(b){try{b.unsetCustomTags(a)}catch(d){console.warn("Conviva App Tracker:: Unable to set custom tags data!")}})};ya.version="1.3.2";Object.defineProperty(ya,"__esModule",{value:!0})})
//# sourceMappingURL=conviva-eco-js-sensor.umd.min.js.map