/*! * Web analytics for Conviva v1.5.2 (http://bit.ly/sp-js) * Copyright 2022 Snowplow Analytics Ltd, 2010 Anthon Pang * Licensed under BSD-3-Clause */ "use strict";!function(){function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:t}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,r=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw r}}}}function o(e,t,n){return(t=s(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function l(e){for(var t=1;tt.indexOf(n)&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(e);rt.indexOf(n[r])&&Object.prototype.propertyIsEnumerable.call(e,n[r])&&(i[n[r]]=e[n[r]])}return i}function f(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function l(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){e.done?r(e.value):function(e){return e instanceof n?e:new n((function(t){t(e)}))}(e.value).then(a,l)}s((i=i.apply(e,t||[])).next())}))}function v(e,t){function n(n){return function(a){return function(n){if(i)throw new TypeError("Generator is already executing.");for(;l;)try{if(i=1,r&&(o=2&n[0]?r.return:n[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,n[1])).done)return o;switch(r=0,o&&(n=[2&n[0],o.value]),n[0]){case 0:case 1:o=n;break;case 4:return l.label++,{value:n[1],done:!1};case 5:l.label++,r=n[1],n=[0];continue;case 7:n=l.ops.pop(),l.trys.pop();continue;default:if(!(o=l.trys,(o=0o[0]&&n[1]>18&63,c=d>>12&63,u=d>>6&63,d&=63,l[a++]=Ut.charAt(s)+Ut.charAt(c)+Ut.charAt(u)+Ut.charAt(d)}while(o>16&255,l=c>>8&255,c&=255,o[i++]=64===r?String.fromCharCode(a):64===s?String.fromCharCode(a,l):String.fromCharCode(a,l,c)}while(n=e.length}function R(e){return A(e)||S(e)}function N(e){return!(!Array.isArray(e)||2!==e.length)&&(Array.isArray(e[1])?A(e[0])&&e[1].every(R):A(e[0])&&R(e[1]))}function O(e){return!(!Array.isArray(e)||2!==e.length)&&(!!function(e){var t=0;if(null!=e&&"object"===c(e)&&!Array.isArray(e)){if(Object.prototype.hasOwnProperty.call(e,"accept")){if(!T(e.accept))return!1;t+=1}if(Object.prototype.hasOwnProperty.call(e,"reject")){if(!T(e.reject))return!1;t+=1}return 0=t}return!1}(e[0])&&(Array.isArray(e[1])?e[1].every(R):R(e[1])))}function I(e){return N(e)||O(e)}function x(e,t){if(!C(e))return!1;if(e=k(e),t=null!==(t=/^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(t))?t.slice(1,6):void 0,e&&t){if(!function(e,t){if(t=t.split("."),e=e.split("."),t&&e){if(t.length!==e.length)return!1;for(var n=0;nn;n++)if(!L(e[n],t[n]))return!1;return!0}return!1}function L(e,t){return e&&t&&"*"===e||e===t}function M(e){return Array.isArray(e)?e:[e]}function D(e,t,n,i){var r;return e=M(e).map((function(e){e:if(S(e))e=[e];else{if(A(e)){t:{var r=void 0;try{if(r=e({event:t.getPayload(),eventType:n,eventSchema:i}),Array.isArray(r)&&r.every(S)||S(r)){var o=r;break t}o=void 0;break t}catch(e){}o=void 0}if(S(o)){e=[o];break e}if(Array.isArray(o)){e=o;break e}}e=void 0}if(e&&0!==e.length)return e})),(r=[]).concat.apply(r,e.filter((function(e){return null!=e&&e.filter(Boolean)})))}function P(e){void 0===e&&(e={});var t,n,i,r,o,a,l,s,c=e.base64,u=e.corePlugins,d=null!=u?u:[];t=null==c||c,n=d,i=e.callback,r=function(e){return{addPluginContexts:function(t){var n=t?g([],t,!0):[];return e.forEach((function(e){try{e.contexts&&n.push.apply(n,e.contexts())}catch(e){Gt.error("Error adding plugin contexts",e)}})),n}}}(n),o=b(),a=t,l={},s=null;var f=bt(bt({},c={track:function(e,t,s){e.withJsonProcessor(p(a)),e.add("eid",Pt.v4()),e.addDict(l),s=function(e){return null==e?{type:"dtm",value:(new Date).getTime()}:"number"==typeof e?{type:"dtm",value:e}:"ttm"===e.type?{type:"ttm",value:e.value}:{type:"dtm",value:e.value||(new Date).getTime()}}(s),e.add(s.type,s.value.toString()),t=function(e,t){e=o.getApplicableContexts(e);var n=[];return t&&t.length&&n.push.apply(n,t),e&&e.length&&n.push.apply(n,e),n}(e,r.addPluginContexts(t)),void 0!==(t=t&&t.length?{sc:"sp/ctx/1-0-0",dt:t}:void 0)&&e.addJson("cx","co",t),n.forEach((function(t){try{t.beforeTrack&&t.beforeTrack(e)}catch(e){Gt.error("Plugin beforeTrack",e)}})),"function"==typeof i&&i(e);var c=e.build();return n.forEach((function(e){try{e.afterTrack&&e.afterTrack(c)}catch(e){Gt.error("Plugin afterTrack",e)}})),c},addPayloadPair:function(e,t){l[e]=t},configuration:e,getConfig:function(){return e},setConfig:function(t){t&&(void 0!==t.base64&&(a=e.base64=t.base64),void 0!==t.lifecycleAutotracking&&(e.lifecycleAutotracking=t.lifecycleAutotracking),void 0!==t.cacheRefreshInterval&&(e.cacheRefreshInterval=t.cacheRefreshInterval),void 0!==t.exceptionAutotracking&&(e.exceptionAutotracking=t.exceptionAutotracking),void 0!==t.enablePeriodicHeartbeat&&(e.enablePeriodicHeartbeat=t.enablePeriodicHeartbeat),void 0!==t.periodicHeartbeatInterval&&(e.periodicHeartbeatInterval=t.periodicHeartbeatInterval),void 0!==t.enc&&(e.enc=t.enc),void 0!==t.mend&&(e.mend=t.mend),void 0!==t.maxLocalStorageQueueSize&&(e.maxLocalStorageQueueSize=t.maxLocalStorageQueueSize),void 0!==t.maxGetBytes&&(e.maxGetBytes=t.maxGetBytes),void 0!==t.bufferSize&&(e.bufferSize=t.bufferSize),void 0!==t.customEventTrackingConfiguration&&(e.customEventTrackingConfiguration=t.customEventTrackingConfiguration),void 0!==t.networkRequestTrackingConfiguration&&(e.networkRequestTrackingConfiguration=t.networkRequestTrackingConfiguration),void 0!==t.traceparentconfig&&(e.traceparentconfig=t.traceparentconfig),void 0!==t.baggageConfiguration&&(e.baggageConfiguration=t.baggageConfiguration),void 0!==t.metaTagsTrackingConfiguration&&(e.metaTagsTrackingConfiguration=t.metaTagsTrackingConfiguration),void 0!==t.evtStreamTrackingConfiguration&&(e.evtStreamTrackingConfiguration=t.evtStreamTrackingConfiguration),void 0!==t.performanceContextConfig&&(e.performanceContextConfig=t.performanceContextConfig),void 0!==t.configurationVersion&&(e.configurationVersion=t.configurationVersion),void 0!==t.catRcLastUpdatedTs&&(e.catRcLastUpdatedTs=t.catRcLastUpdatedTs),void 0!==t.endpoint&&(e.endpoint=t.endpoint),void 0!==t.controlIngestConfig&&(e.controlIngestConfig=t.controlIngestConfig),void 0!==t.applicationContext&&(e.applicationContext=t.applicationContext),void 0!==t.emitterConfiguration&&(e.emitterConfiguration=t.emitterConfiguration),void 0!==t.di&&(e.di=t.di),void 0!==t.clickcc&&(e.clickcc=t.clickcc),void 0!==t.collectionRateLimit&&(e.collectionRateLimit=t.collectionRateLimit),e.pageUrlTrackingConfig=void 0!==t.pageUrlTrackingConfig?t.pageUrlTrackingConfig:null,e.sessionReplayConfiguration=void 0!==t.sessionReplayConfiguration?t.sessionReplayConfiguration:null,e.valueProbes=void 0!==t.valueProbes?t.valueProbes:null,e.webVitals=void 0!==t.webVitals?t.webVitals:null)},getBase64Encoding:function(){return a},setBase64Encoding:function(e){a=e},addPayloadDict:function(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(l[t]=e[t])},resetPayloadPairs:function(e){l=y(e)?e:{}},setTrackerVersion:function(e){l.tv=e},setTrackerNamespace:function(e){l.tna=e},setAppId:function(e){l.aid=e},setPlatform:function(e){l.p=e},setUserId:function(e){l.uid=e},setConversationId:function(e){s=e},getConversationId:function(){return s},setScreenResolution:function(e,t){l.res=e+"x"+t},setViewport:function(e,t){l.vp=e+"x"+t},setColorDepth:function(e){l.cd=e},setTimezone:function(e){l.tz=e},setLang:function(e){l.lang=e},setIpAddress:function(e){l.ip=e},setUseragent:function(e){l.ua=e},addGlobalContexts:function(e){o.addGlobalContexts(e)},clearGlobalContexts:function(){o.clearGlobalContexts()},removeGlobalContexts:function(e){o.removeGlobalContexts(e)}}),{addPlugin:function(e){var t,n;e=e.plugin,d.push(e),null===(t=e.logger)||void 0===t||t.call(e,Gt),null===(n=e.activateCorePlugin)||void 0===n||n.call(e,f)}});return null==d||d.forEach((function(e){var t,n;null===(t=e.logger)||void 0===t||t.call(e,Gt),null===(n=e.activateCorePlugin)||void 0===n||n.call(e,f)})),f}function U(e){var t=e.event;return e={sc:"sp/ue/1-0-0",dt:{sc:e=t.sc,dt:t.dt}},(t=h()).add("e","ue"),t.addJson("ue_px","ue_pr",e),t}function q(e){return U({event:{sc:"cv/re/1-0-1",dt:G({name:e.name,data:e.data})}})}function G(e,t){void 0===t&&(t={});var n,i={};for(n in e)(t[n]||null!==e[n]&&void 0!==e[n])&&(i[n]=e[n]);return i}function B(e){for(var t=e.length;0<=--t;)e[t]=0}function z(e,t,n,i,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=i,this.max_length=r,this.has_stree=e&&e.length}function H(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function j(e,t,n,i,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=i,this.func=r}function F(){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=jn,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),Vn(this.dyn_ltree),Vn(this.dyn_dtree),Vn(this.bl_tree),this.bl_desc=this.d_desc=this.l_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),Vn(this.heap),this.heap_max=this.heap_len=0,this.depth=new Uint16Array(573),Vn(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 V(e){(e=this.options=ci.assign({level:ki,method:Ei,chunkSize:16384,windowBits:15,memLevel:8,strategy:Ci},e||{})).raw&&0e.windowBits&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gi,this.strm.avail_out=0;var t=si.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(t!==wi)throw Error(Cn[t]);if(e.header&&si.deflateSetHeader(this.strm,e.header),e.dictionary){if(e="string"==typeof e.dictionary?vi.string2buf(e.dictionary):"[object ArrayBuffer]"===hi.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,(t=si.deflateSetDictionary(this.strm,e))!==wi)throw Error(Cn[t]);this._dict_set=!0}}function W(e,t){if((t=new V(t)).push(e,!0),t.err)throw t.msg||Cn[t.err];return t.result}function K(){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 Z(e){var t=this.options=ci.assign({chunkSize:65536,windowBits:15,to:""},e||{});if(t.raw&&0<=t.windowBits&&16>t.windowBits&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(0<=t.windowBits&&16>t.windowBits)||e&&e.windowBits||(t.windowBits+=32),15t.windowBits&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new gi,this.strm.avail_out=0,(e=Xi.inflateInit2(this.strm,t.windowBits))!==nr)throw Error(Cn[e]);if(this.header=new Qi,Xi.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=vi.string2buf(t.dictionary):"[object ArrayBuffer]"===$i.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=Xi.inflateSetDictionary(this.strm,t.dictionary))!==nr))throw Error(Cn[e])}function J(e,t){if((t=new Z(t)).push(e),t.err)throw t.msg||Cn[t.err];return t.result}function Y(e){return!(!e||"string"!=typeof e.valueOf())}function X(e){return Number.isInteger&&Number.isInteger(e)||"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}function Q(e){if(!Y(e)){e=e.text||"";var t=document.getElementsByTagName("title");t&&null!=t[0]&&(e=t[0].text)}return e}function $(e){var t=/^(?:(?:https?|ftp):)\/*(?:[^@]+@)?([^:/#]+)/.exec(e);return t?t[1]:e}function ee(e){var t=e.length;return"."===e.charAt(--t)&&(e=e.slice(0,t)),"*."===e.slice(0,2)&&(e=e.slice(1)),e}function te(e){var t=window,n=ie("referrer",t.location.href)||ie("referer",t.location.href);if(n)return n;if(e)return e;try{if(t.top)return t.top.document.referrer;if(t.parent)return t.parent.document.referrer}catch(e){}return document.referrer}function ne(e,t,n,i){return void 0!==e&&(e.addEventListener?(e.addEventListener(t,n,i),!0):e.attachEvent?e.attachEvent("on"+t,n):void(e["on"+t]=n))}function ie(e,t){return(e=new RegExp("^[^#]*[?&]"+e+"=([^&#]*)").exec(t))?decodeURIComponent(e[1].replace(/\+/g," ")):null}function re(e,t,n){void 0===n&&(n=63072e3);try{var i=window.localStorage,r=Date.now()+1e3*n;return i.setItem("".concat(e,".expires"),r.toString()),i.setItem(e,t),!0}catch(e){return!1}}function oe(e){try{var t=window.localStorage;return t.removeItem(e),t.removeItem(e+".expires"),!0}catch(e){return!1}}function ae(e,t,n,i){return le(e,"",-1,"/",t,n,i)}function le(e,t,n,i,r,o,a){return 1":return e>n;case"<":return e=":return e>=n;case"<=":return e<=n;case"contains":return""!==n&&"string"==typeof e&&"string"==typeof n&&-1!==e.toLowerCase().indexOf(n.toLowerCase());default:return!1}}catch(e){return console.warn("Conviva App Tracker: Error in Compare values nwreq ".concat(e)),!1}}function ge(e,t){try{for(var n=0;n(t||10240))return;i="undefined"!=typeof URLSearchParams?new URLSearchParams(a):null}catch(e){return void console.warn("Conviva App Tracker: Error creating URLSearchParams: ".concat(e))}var l={};if(i instanceof URLSearchParams)i.forEach((function(e,t){l[t]=e}));else{t=0;for(var s=n.substring(n.indexOf("?")+1).split("&");t=t&&e<=i:void 0!==r&&void 0!==n&&(e>r&&e":return e>n;case">=":return e>=n;case"<":return e_)}catch(e){Gt.warn("Conviva Eco Sensor:: Error occured while checking diagnostic event is allowed",e),C=!1}o=!C}if(!o&&"boolean"==typeof(null===(i=null==a?void 0:a.di)||void 0===i?void 0:i.en)&&!0===(null===(r=null==a?void 0:a.di)||void 0===r?void 0:r.en))if(null==e);else{var E=e.track,T=U({event:{sc:"iglu:com.conviva/di/jsonschema/1-0-4",dt:G({msg:p.message,cn:p.className,st:p.stackTrace,en:p.exceptionName,ed:p.extraData,rcv:p.remoteConfigVersion,cat:p.configAppliedTime,cri:p.cacheRefreshInterval,csrc:p.configAppliedSrc,srn:p.samplingRandomNumber,spr:p.samplingPercentage,ss:p.samplingStatus,sd:p.samplingDecision})}});E.call(e,T)}}}catch(e){Gt.warn("Conviva Eco Sensor:: Error occurred while sending reportDiagnosticError",e)}}function xe(){var e,t,n=null===(e=null==Or?void 0:Or.core)||void 0===e?void 0:e.getConfig();jr=(null==(jr=(null===(t=null==n?void 0:n.clickcc)||void 0===t?void 0:t.cssSelectorList)||jr)?void 0:jr.replace(/\s+/g,""))||""}function Le(e,t){if(!(e instanceof HTMLElement||e instanceof SVGElement))return null;var n=null==e?void 0:e.closest(Br);if(n)return n;if(n=null==e?void 0:e.closest(jr))return function(e,t){var n;if(0===(e=e.querySelectorAll(Br)).length)return null;if(1===e.length&&0=o.left&&i<=o.right&&t>=o.top&&t?@[\\\]^`{|}~]/g,"\\$&")}(e.id))).length)return'//*[@id="'.concat(e.id,'"]');var t=[],n=e;for(e=function(){var e=n.tagName.toLowerCase(),i=n.parentElement;if(i){var r=Array.from(i.children).filter((function(t){return t.tagName.toLowerCase()===e}));1>"),n=i.host}};n&&n.nodeType===Node.ELEMENT_NODE&&"break"!==e(););return"/"+t.join("/")}catch(e){return Gt.warn("Conviva Browser Tracker caused Exception in calculateXPath method of user click tracking module",e),null}}function De(e){try{var t=Date.now(),n=ur.CLICK_DEBOUNCING_DELAY;if(null===qr||t-qr>=n){var i,r,o,a,l,s,c;try{var u,d;if(null!==(u=e.target)&&void 0!==u&&u.shadowRoot)var f=null===(d=e.composedPath)||void 0===d?void 0:d.call(e);var v=function(e,t){var n,i;try{if(!Or||!Or.core||!e)return null;var r=Or.core.getConfig();if(!0!==(null===(n=null==r?void 0:r.clickcc)||void 0===n?void 0:n.en))return null;var o=null===(i=null==r?void 0:r.clickcc)||void 0===i?void 0:i.uiMode;return o===Ir.RAW?e:o===Ir.BOTH?Le(e,t)||e:Le(e,t)}catch(e){return Gt.warn("Conviva App Tracker caused Exception in getTrackedElement method of user click tracking module",e),null}}(f&&f[0]||e.target,e);if(v&&(v instanceof HTMLElement||v instanceof HTMLInputElement)){e={};var g=ur.CLICK_KEY_MAX_LENGTH;null!=v&&v.id&&(e.id=de(v.id,g)),null!=v&&v.className&&(e.class=de(v.className,g)),null!=v&&v.tagName&&(e.elementName=de(v.tagName.toLowerCase(),g)),null!==(i=null==v?void 0:v.innerText)&&void 0!==i&&i.trim()&&(e.text=de(v.innerText.trim(),g)),null!=v&&v.getAttribute("name")&&(e.name=de(v.getAttribute("name")||"",g)),null!=v&&v.getAttribute("type")&&(e.elementType=de((null===(r=v.getAttribute("type"))||void 0===r?void 0:r.toLowerCase())||"",g)),null!=v&&v.placeholder&&(e.placeholder=de(v.placeholder,g)),null!=v&&v.getAttribute("type")&&"password"!==(null==v?void 0:v.getAttribute("type"))&&v.value&&(e.value=de(v.value,g));var h=null===(o=null==Or?void 0:Or.core)||void 0===o?void 0:o.getConfig(),p=null===(a=null==h?void 0:h.clickcc)||void 0===a?void 0:a.collectattr;if(p)for(i=0;i",u,"ms → cancelling",t),g.cancel()}),u)})(),v.label=1;case 1:v.trys.push([1,5,6,7]),v.label=2;case 2:return[4,g.read()];case 3:if(w=v.sent(),_=w.value,w.done)return[3,4];if(b(),p+=h.decode(_,{stream:!0}),(new TextEncoder).encode(p).length>f)return console.warn("Conviva App Tracker:: SSE buffer exceeded",f,"bytes, cancelling stream",t),g.cancel(),[3,4];for(k=void 0;-1!==(k=p.search(n));)if(C=p.slice(0,k).replace(/\s+$/,""),T=(E=p.match(n))?E[0].length:0,p=p.slice(k+T),(S=i(C))&&(r(S),++m>=d)){console.warn("Conviva App Tracker:: event budget reached → cancelling",t),g.cancel();break}return[3,2];case 4:return[3,7];case 5:if(!((A=v.sent())instanceof DOMException&&"AbortError"===A.name))throw A;return[3,7];case 6:return clearTimeout(y),g.releaseLock(),a&&a(),[7];case 7:return[2]}}))}))}function Be(e){var t={data:""},n=0;for(e=e.split(/\n+/);n=i?t+=1:2047>=i?t+=2:55296<=i&&57343>=i?(t+=4,n++):t=65535>i?t+3:t+4}return t}function k(e,t){t=T(t,!0,!1),e=S(A([e.evt]));try{h().toLowerCase()!==br.NONE&&(e=cr.gzip(e,{level:6}),t.setRequestHeader("Content-Encoding",br.GZIP))}catch(e){}b()!==ur.SAMPLING_MODES.NONE&&t.send(e)}function C(e){try{if("undefined"!=typeof window&&void 0!==window.__CONVIVA_VISUAL_ACTIVATION_EXTENSION__&&"function"==typeof window.__CONVIVA_VISUAL_ACTIVATION_EXTENSION__.postMessage){var t=S(A(e));t&&0L.length)x=!1;else{if(!Y(N))throw"No collector configured";if(x=!0,window.clearTimeout(M),M=-1,U){var t=function(e){for(var t=0,n=0;t=m());)t+=1;return t},i=void 0,r=void 0;if("object"===c(L[0])){var o=T(i=N,!0,e);r=t(L)}else i=R(L[0]),o=T(i,!1,e),r=1;var a=setTimeout((function(){o.abort(),x=!1}),u);if(o.onreadystatechange=function(){4===o.readyState&&(clearTimeout(a),200<=o.status&&300>o.status?E():(Gt.error("Status ".concat(o.status,", will not retry.")),x=!1))},"object"!==c(L[0]))o.send();else if(0<(t=L.slice(0,r)).length){if(e=!1,t=t.map((function(e){return e.evt})),P){var l=new Blob([S(A(t))],{type:"application/json"});try{e=navigator.sendBeacon(i,l)}catch(t){e=!1}}if(!0===e)E();else{i=S(A(t));try{h().toLowerCase()!==br.NONE&&(i=cr.gzip(i,{level:6}),o.setRequestHeader("Content-Encoding",br.GZIP))}catch(e){}try{b()!==ur.SAMPLING_MODES.NONE&&o.send(i)}catch(e){}}}!function(e){for(var t=0;t=t)return x||E(),Gt.warn("Event ("+e.bytes+"B) too big, max is "+t),void k(e,N);L.push(e)}else{var l,c="?",u={co:!0,cx:!0},d=!0;for(l in e)e.hasOwnProperty(l)&&!u.hasOwnProperty(l)&&(d?d=!1:c+="&",c+=encodeURIComponent(l)+"="+encodeURIComponent(e[l]));for(var f in u)e.hasOwnProperty(f)&&u.hasOwnProperty(f)&&(c+="&"+f+"="+encodeURIComponent(e[f]));if(0<(u=a())&&(d=_(d=R(c)))>=u)return Gt.warn("Event ("+d+"B) too big, max is "+u),void(U&&(e=w(e),C([e.evt]),k(e,t+r)));L.push(c)}t=!1,n&&(t=re(B,JSON.stringify(L.slice(-1*s())))),!x&&-1===M&&t&&(M=window.setTimeout(E,y()+Math.floor(Math.random()*g))),!x&&(!t||!p()||q&&(q?L.reduce((function(e,t){return e+t.bytes}),0):L.reduce((function(e,t){return e+t.length}),0))>m()||L.length>o||i)&&E()}},executeQueue:function(){x||E()},setUseLocalStorage:function(e){n=e},setAnonymousTracking:function(e){d=e},setCollectorUrl:function(e){N=e+G},setBufferSize:function(e){o=e},setCustomHeaders:function(e){f=e}}}function Ve(e){try{null!=Kr&&Kr.isAllowedToSendEvent()&&Ke({message:e.message,filename:e.filename,lineno:e.lineno,colno:e.colno,error:e.error})}catch(e){console.warn("Conviva App Tracker caused Exception in captureError method of error tracking module",e)}}function We(e){try{null!=Kr&&Kr.isAllowedToSendEvent()&&Ke({message:e.reason})}catch(e){console.warn("Conviva App Tracker caused Exception in captureRejection method of error tracking module",e)}}function Ke(e){var t,n,i=e.message,r=e.filename,o=e.lineno,a=e.colno,l=e.error,s=e.context;if(e=e.timestamp,l=l&&l.stack?l.stack:void 0,!(void 0===i||null===i&&void 0===l||null===l&&void 0===o||null===o&&void 0===a||null===a&&void 0===r||null===r)){var c=null===(t=null==Wr?void 0:Wr.core)||void 0===t?void 0:t.getConfig();null!=c&&c.exceptionAutotracking&&(null===(n=null==Wr?void 0:Wr.core)||void 0===n||n.track(U({event:{sc:"sp/ae/1-0-1",dt:{programmingLanguage:"JAVASCRIPT",message:i?fo(i,2048):"JS Exception.",stackTrace:l?fo(l,8192):"",lineNumber:o,lineColumn:a,fileName:r}}}),s,e))}}function Ze(e){return e=new URL(e,location.href),"".concat(e.origin).concat(e.pathname).concat(e.search).concat(e.hash)}function Je(e){var t=(e=e.split("#"))[1];return{originPathSearch:e[0],hash:null!=t?t:""}}function Ye(e,t){return new Promise((function(n){var i=function(){var r=performance.now();if(r-e>=go.maxMeasurementMs)n(r);else{var o=performance.now()-((null==ho?void 0:ho.lastLongTaskTs)||0)>=t,a=0===((null==mo?void 0:mo.getInflightRequests())||0);o&&a?n(r):requestAnimationFrame(i)}};setTimeout((function(){return requestAnimationFrame(i)}),50)}))}function Xe(e){var t=history[e];history[e]=function(n,i,r){return n=t.call(this,n,i,r),Qe(e,null!=r?r:location.href),n}}function Qe(e,t){if(ho){if(t=Ze(t),!go.includeHashChanges){var n=Je(ho.lastUrlKey),i=Je(t);if(n.originPathSearch===i.originPathSearch&&n.hash!==i.hash)return}t===ho.lastUrlKey&&"replaceState"!==e||(ho.lastUrlKey=t,ho.currentMeasurement&&(ho.currentMeasurement=null),function(e,t){f(this,void 0,void 0,(function(){var n,i,r,o,a;return v(this,(function(l){switch(l.label){case 0:return ho&&po?(n=++ho.navSeq,i=performance.now(),ho.currentMeasurement={id:n,startTime:i,urlKey:t,trigger:e},[4,Ye(i,go.idleWindowMs)]):[2];case 1:if(r=l.sent(),!ho.currentMeasurement||ho.currentMeasurement.id!==n)return[2];o=Math.round((r-i)/1e3*100)/100,a={load_time:o,page_url:t,trigger:e,navigation_id:n,start_time:Math.round(i/1e3*100)/100,end_time:Math.round(r/1e3*100)/100};try{po.trackCustomEvent({name:"conviva_soft_navigation",data:a})}catch(e){}return ho.currentMeasurement=null,[2]}}))}))}(e,t))}}function $e(e){var t,n,i;try{var r=null===(t=null==e?void 0:e.core)||void 0===t?void 0:t.getConfig();if(function(e){var t,n,i,r,o;null!=e&&e.softNavigationTrackingConfiguration&&(e=e.softNavigationTrackingConfiguration,go=bt(bt({},vo),{idleWindowMs:null!==(t=e.idleWindowMs)&&void 0!==t?t:vo.idleWindowMs,maxMeasurementMs:null!==(n=e.maxMeasurementMs)&&void 0!==n?n:vo.maxMeasurementMs,includeHashChanges:null!==(i=e.includeHashChanges)&&void 0!==i?i:vo.includeHashChanges,domainAllowlist:null!==(r=e.domainAllowlist)&&void 0!==r?r:vo.domainAllowlist,domainBlocklist:null!==(o=e.domainBlocklist)&&void 0!==o?o:vo.domainBlocklist,requireLcp:vo.requireLcp,lcpTimeoutMs:vo.lcpTimeoutMs}))}(r),(null!==(i=null===(n=null==r?void 0:r.softNavigationTrackingConfiguration)||void 0===n?void 0:n.enabled)&&void 0!==i?i:wr.softNavigationTrackingConfiguration.enabled)&&(null==e?void 0:e.getSamplingMode())!==ur.SAMPLING_MODES.NONE){var o=location.hostname;go.domainAllowlist.length&&!go.domainAllowlist.some((function(e){return o.endsWith(e)}))||go.domainBlocklist.some((function(e){return o.endsWith(e)}))||(ho={lastLongTaskTs:0,lastLcpTs:0,currentMeasurement:null,navSeq:0,patched:!1,lastUrlKey:Ze(location.href)},po=e,mo=so.getInstance(e.trackNetworkRequest,e.trackerConfiguration,e.getSamplingMode),function(){if(ho&&!ho.patched){ho.patched=!0;try{new PerformanceObserver((function(e){var t=0;for(e=e.getEntries();t=a)return[3,5];c++,_=e.conditions,k=[],C=0;for(var E=e.selectors;CDate.now())var i=t.getItem(e);else t.removeItem(e),t.removeItem(e+".expires"),i=void 0}catch(e){i=void 0}return i}if("cookie"==Lt||"cookieAndLocalStorage"==Lt)return le(e)}function m(){l(),Qe=Ft((kt||lt)+(Ct||"/")).slice(0,4)}function y(){Fe=(new Date).getTime()}function b(){var e=_(),t=e[0];tJe&&(Je=t),(e=e[1])Xe&&(Xe=e),y()}function _(){var e="undefined"!=typeof document?null===document||void 0===document?void 0:document.documentElement:void 0;return e?[e.scrollLeft||window.pageXOffset,e.scrollTop||window.pageYOffset]:[0,0]}function k(){var e=_(),t=e[0];Je=Ze=t,Xe=Ye=e=e[1]}function C(){T(_t+"ses."+Qe,"*",Nt)}function E(e){var t=_t+"id."+Qe;e.shift(),T(t,e=e.join("."),Rt)}function T(e,t,n){xt&&!Ot||("localStorage"==Lt?re(e,t,n):("cookie"==Lt||"cookieAndLocalStorage"==Lt)&&le(e,t,n,Ct,kt,Et,Tt))}function S(e){var t=_t+"id."+Qe,n=_t+"ses."+Qe;oe(t),oe(n),ae(t,kt,Et,Tt),ae(n,kt,Et,Tt),null!=e&&e.preserveSession||(et=Pt.v4(),qt=1),null!=e&&e.preserveUser||($e=Pt.v4(),tt=null)}function A(e){e&&e.stateStorageStrategy&&(r.stateStorageStrategy=e.stateStorageStrategy,Lt=xe(r)),xt=!!r.anonymousTracking,Ot=Le(r),It=Me(r),Bt.setUseLocalStorage("localStorage"==Lt||"cookieAndLocalStorage"==Lt),Bt.setAnonymousTracking(It)}function R(){var e;try{var t=null;if(null!==(e=null==r?void 0:r.configs)&&void 0!==e&&e.enableClIdInCookies){e:{e="Conviva_sdkConfig";try{var n=le(e);if(n&&0r.getTime()||!0===Vt)&&i(e.callback,(t||[]).concat(n?n():[]))};e.activityInterval=window.setInterval(r,e.configHeartBeatTimer)}function F(e){var t=e.minimumVisitLength,n=e.heartbeatDelay;if(e=e.callback,X(t)&&X(n))return{configMinimumVisitLength:1e3*t,configHeartBeatTimer:1e3*n,callback:e};Gt.error("Activity tracking minimumVisitLength & heartbeatDelay must be integers")}function V(e){var t=e.context,n=e.minXOffset,i=e.minYOffset,r=e.maxXOffset,o=e.maxYOffset;if((e=document.title)!==yt&&(yt=e,qe=void 0),it()!==ur.SAMPLING_MODES.NONE){W();var a=(e=ot).track,l=f(Pe||st),s=Q(qe||yt),c=f(De||ct);n=Math.round(n),r=Math.round(r),i=Math.round(i),o=Math.round(o);var u=h();u.add("e","pp"),u.add("url",l),u.add("page",s),u.add("refr",c),n&&!isNaN(Number(n))&&u.add("pp_mix",n.toString()),r&&!isNaN(Number(r))&&u.add("pp_max",r.toString()),i&&!isNaN(Number(i))&&u.add("pp_miy",i.toString()),o&&!isNaN(Number(o))&&u.add("pp_may",o.toString()),a.call(e,u,t)}}function W(){var e,t,n=null===(t=null==a?void 0:a.core)||void 0===t?void 0:t.getConfig().pageUrlTrackingConfig;if(t=pt[ur.PAGE_URL_QUERY_PARAMS],n){var i={targetUrl:f(Pe||st),rqq:{}};i=fe(i,null==n?void 0:n.collectattr,null,null==n?void 0:n.maxQueryLength),(!t&&i.rqq||t!==JSON.stringify(i.rqq))&&(z([ur.PAGE_URL_QUERY_PARAMS]),function(e){try{var t=Object.keys(e);D(JSON.stringify(e))?t.forEach((function(t){if(""!==t.trim()){var n=e[t];n&&""!==n&&("object"!==c(n)&&(n=""+n),Object.defineProperty(pt,t,{value:n,writable:!0,enumerable:!0,configurable:!0}))}})):console.warn("Conviva AppTracker:: Invalid JSON Format")}catch(e){console.warn("Conviva AppTracker:: Invalid JSON Format: Error Message=",e)}}(((e={})[ur.PAGE_URL_QUERY_PARAMS]=i.rqq,e)))}else t&&z([ur.PAGE_URL_QUERY_PARAMS])}var K,Z,J,Y,se,de,ve,ge,he,pe,me,ye,be,Te,Se,Ae;if(window&&window.localStorage){var Re=window.localStorage,Ne={sensorVersion:n,ck:null!==(K=r.convivaCustomerKey)&&void 0!==K?K:""};Ne=JSON.stringify(Ne),Ne="function"==typeof btoa?btoa(Ne):function(e){e=unescape(encodeURIComponent(e));for(var t="",n=0;n>2;i=(3&i)<<4|r>>4,r=isNaN(r)?64:(15&r)<<2|o>>6,o=isNaN(o)?64:63&o,t+=Ut.charAt(a)+Ut.charAt(i)+Ut.charAt(r)+Ut.charAt(o)}return t}(Ne),Re.setItem(ur.VISUAL_LABELLING_CONFIG,Ne)}var Oe=dr;Oe&&gr||("function"==typeof AbortController&&(dr=new AbortController),gr=null==dr?void 0:dr.signal),t||(t="CAT");var Ie=io(n,t,r).convivaRemoteTrackerConfig;null===(Z=Ce(Ie.performanceContextConfig))||void 0===Z||Z.activateLCPObserver(),r.eventMethod=null!==(J=r.eventMethod)&&void 0!==J?J:"post";var xe=function(e){var t;return null!==(t=e.stateStorageStrategy)&&void 0!==t?t:"cookieAndLocalStorage"},Le=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withSessionTracking))&&void 0!==n&&n)},Me=function(e){var t,n;return"boolean"!=typeof e.anonymousTracking&&(null!==(n=!0===(null===(t=e.anonymousTracking)||void 0===t?void 0:t.withServerAnonymisation))&&void 0!==n&&n)};o.push({beforeTrack:function(e){var t=p("ses"),n=N();nt=!!ze&&!!le(ze),At||nt?S():("0"===n[0]?(et=t||"none"==Lt?n[6]:_e(n),qt=n[3]):(new Date).getTime()-Dt>1e3*Nt&&(qt++,et=_e(n,qt)),ke(n),e.add("uid",xt?null:tt),l(),e.add("refr",f(De||ct)),document&&(yt=document.title,t=Q(qe||yt),e.add("page",t)),e.add("url",f(Pe||st)),"none"!=Lt&&(E(n),C()),Dt=(new Date).getTime())}}),o.push({contexts:function(){return[{sc:"cv/clid/1-0-2",dt:{clid:He,iid:je.toString(),ck:gt,eventIndex:Mt++}}]}}),o.push({contexts:function(){return[{sc:"cv/ct/1-0-0",dt:{data:bt(bt({},pt),mt)}}]}}),o.push({contexts:function(){var e,t=null===(e=null==a?void 0:a.core)||void 0===e?void 0:e.getConfig();return!0===(null==t?void 0:t.applicationContext)?[{sc:"spm/app/1-0-0",dt:{build:ht,version:ht}}]:[]}}),o.push({contexts:function(){var e={sch:"sdk.js.eco.1"};e.cat=fr.DeviceCategory.WEB;try{var t=null==r?void 0:r.deviceMetadata;if(t){var n=t.DeviceBrand,i=t.DeviceCategory,o=t.DeviceManufacturer,a=t.DeviceModel,l=t.DeviceType,s=t.DeviceVersion,c=t.OperatingSystemName,u=t.OperatingSystemVersion,d=t.FrameworkName,f=t.FrameworkVersion;"string"==typeof i&&Object.values(fr.DeviceCategory).includes(i)?e.cat=i:e.cat="INVALID"+(i?": ".concat(i):""),"string"==typeof n&&""!=n&&(e.dvb=n),"string"==typeof o&&""!=o&&(e.dvma=o),"string"==typeof a&&""!=a&&(e.dvm=a),l&&Object.values(fr.DeviceType).includes(l)&&(e.dvt=l),"string"==typeof s&&""!=s&&(e.dvv=s),"string"==typeof c&&""!=c&&(e.os=c),"string"==typeof u&&""!=u&&(e.osv=u),"string"==typeof d&&""!=d&&(e.fw=d),"string"==typeof f&&""!=f&&(e.fwv=f)}}catch(e){Gt.warn("error in setting platform metadata context",e)}return null!=e&&0t&&0t;t++)0==(3&t)&&(e=4294967296*Math.random()),Ct[t]=e>>>((3&t)<<3)&255;return Ct}}for(var Et=[],Tt=0;256>Tt;++Tt)Et[Tt]=(Tt+256).toString(16).substr(1);var St,At,Rt=function(e,t){return t=t||0,[Et[e[t++]],Et[e[t++]],Et[e[t++]],Et[e[t++]],"-",Et[e[t++]],Et[e[t++]],"-",Et[e[t++]],Et[e[t++]],"-",Et[e[t++]],Et[e[t++]],"-",Et[e[t++]],Et[e[t++]],Et[e[t++]],Et[e[t++]],Et[e[t++]],Et[e[t++]]].join("")},Nt=wt,Ot=0,It=0,xt=wt,Lt=function(e,t,n){if(n=t&&n||0,"string"==typeof e&&(t="binary"===e?Array(16):null,e=null),(e=(e=e||{}).random||(e.rng||xt)())[6]=15&e[6]|64,e[8]=63&e[8]|128,t)for(var i=0;16>i;++i)t[n+i]=e[i];return t||Rt(e)};Lt.v1=function(e,t,n){n=t&&n||0;var i=t||[],r=(e=e||{}).node||St,o=void 0!==e.clockseq?e.clockseq:At;if(null==r||null==o){var a=Nt();null==r&&(r=St=[1|a[0],a[1],a[2],a[3],a[4],a[5]]),null==o&&(o=At=16383&(a[6]<<8|a[7]))}a=void 0!==e.msecs?e.msecs:(new Date).getTime();var l=void 0!==e.nsecs?e.nsecs:It+1,s=a-Ot+(l-It)/1e4;if(0>s&&void 0===e.clockseq&&(o=o+1&16383),(0>s||a>Ot)&&void 0===e.nsecs&&(l=0),1e4<=l)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");for(Ot=a,It=l,At=o,e=(1e4*(268435455&(a+=122192928e5))+l)%4294967296,i[n++]=e>>>24&255,i[n++]=e>>>16&255,i[n++]=e>>>8&255,i[n++]=255&e,e=a/4294967296*1e4&268435455,i[n++]=e>>>8&255,i[n++]=255&e,i[n++]=e>>>24&15|16,i[n++]=e>>>16&255,i[n++]=o>>>8|128,i[n++]=255&o,o=0;6>o;++o)i[n+o]=r[o];return t||Rt(i)};var Mt,Dt,Pt=Lt.v4=Lt,Ut="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";(Dt=Mt||(Mt={}))[Dt.none=0]="none",Dt[Dt.error=1]="error",Dt[Dt.warn=2]="warn",Dt[Dt.debug=3]="debug",Dt[Dt.info=4]="info";var qt,Gt=function(e){return void 0===e&&(e=Mt.warn),{setLogLevel:function(t){e=Mt[t]?t:Mt.warn},warn:function(t,n){for(var i=[],r=2;r=Mt.warn&&"undefined"!=typeof console&&(r="Conviva: "+t,n?console.warn.apply(console,g([r+"\n",n],i,!1)):console.warn.apply(console,g([r],i,!1)))},error:function(t,n){for(var i=[],r=2;r=Mt.error&&"undefined"!=typeof console&&(r="Conviva: "+t+"\n",n?console.error.apply(console,g([r+"\n",n],i,!1)):console.error.apply(console,g([r],i,!1)))},debug:function(t){for(var n=[],i=1;i=Mt.debug&&"undefined"!=typeof console&&console.debug.apply(console,g(["Conviva: "+t],n,!1))},info:function(t){for(var n=[],i=1;i=Mt.info&&"undefined"!=typeof console&&console.info.apply(console,g(["Conviva: "+t],n,!1))}}}();!function(e){e.response_body="rsb",e.request_body="rqb",e.response_headers="rsh",e.request_headers="rqh",e.request_query="rqq"}(qt||(qt={}));var Bt={},zt={};!function(){var e={rotl:function(e,t){return e<>>32-t},rotr:function(e,t){return e<<32-t|e>>>t},endian:function(t){if(t.constructor==Number)return 16711935&e.rotl(t,8)|4278255360&e.rotl(t,24);for(var n=0;n>>5]|=e[n]<<24-i%32;return t},wordsToBytes:function(e){for(var t=[],n=0;n<32*e.length;n+=8)t.push(e[n>>>5]>>>24-n%32&255);return t},bytesToHex:function(e){for(var t=[],n=0;n>>4).toString(16)),t.push((15&e[n]).toString(16));return t.join("")},hexToBytes:function(e){for(var t=[],n=0;nr;r++)8*n+6*r<=8*e.length?t.push("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(i>>>6*(3-r)&63)):t.push("=");return t.join("")},base64ToBytes:function(e){e=e.replace(/[^A-Z0-9+\/]/gi,"");for(var t=[],n=0,i=0;n>>6-2*i);return t}};zt=e}();var Ht={utf8:{stringToBytes:function(e){return Ht.bin.stringToBytes(unescape(encodeURIComponent(e)))},bytesToString:function(e){return decodeURIComponent(escape(Ht.bin.bytesToString(e)))}},bin:{stringToBytes:function(e){for(var t=[],n=0;n>5]|=128<<24-l%32,i[15+(l+64>>>9<<4)]=l,l=0;ly;y++){if(16>y)a[y]=i[l+y];else{var b=a[y-3]^a[y-8]^a[y-14]^a[y-16];a[y]=b<<1|b>>>31}b=(s<<5|s>>>27)+f+(a[y]>>>0)+(20>y?1518500249+(c&u|~c&d):40>y?1859775393+(c^u^d):60>y?(c&u|c&d|u&d)-1894007588:(c^u^d)-899497514),f=d,d=u,u=c<<30|c>>>2,c=s,s=b}s+=v,c+=g,u+=h,d+=p,f+=m}return o=o.call(e,[s,c,u,d,f]),r&&r.asBytes?o:r&&r.asString?n.bytesToString(o):e.bytesToHex(o)};i._blocksize=16,i._digestsize=20,Bt=i}();var Ft=Bt,Vt=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]),Wt=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]),Kt=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),Zt=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Jt=Array(576);B(Jt);var Yt=Array(60);B(Yt);var Xt=Array(512);B(Xt);var Qt=Array(256);B(Qt);var $t=Array(29);B($t);var en=Array(30);B(en);var tn,nn,rn,on=function(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255},an=function(e,t,n){e.bi_valid>16-n?(e.bi_buf|=t<>16-e.bi_valid,e.bi_valid+=n-16):(e.bi_buf|=t<>>=1,n<<=1}while(0<--t);return n>>>1},cn=function(e,t,n){var i,r=Array(16),o=0;for(i=1;15>=i;i++)o=o+n[i-1]<<1,r[i]=o;for(n=0;n<=t;n++)0!==(o=e[2*n+1])&&(e[2*n]=sn(r[o]++,o))},un=function(e){var t;for(t=0;286>t;t++)e.dyn_ltree[2*t]=0;for(t=0;30>t;t++)e.dyn_dtree[2*t]=0;for(t=0;19>t;t++)e.bl_tree[2*t]=0;e.dyn_ltree[512]=1,e.opt_len=e.static_len=0,e.sym_next=e.matches=0},dn=function(e){8--r?Xt[r]:Xt[256+(r>>>7)],ln(e,a,n),0!==(l=Wt[a])&&(r-=en[a],an(e,r,l))}}while(ie.heap_len;){var s=e.heap[++e.heap_len]=2>l?++l:0;i[2*s]=1,e.depth[s]=0,e.opt_len--,o&&(e.static_len-=r[2*s+1])}for(t.max_code=l,n=e.heap_len>>1;1<=n;n--)vn(e,i,n);s=a;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],vn(e,i,1),r=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=r,i[2*s]=i[2*n]+i[2*r],e.depth[s]=(e.depth[n]>=e.depth[r]?e.depth[n]:e.depth[r])+1,i[2*n+1]=i[2*r+1]=s,e.heap[1]=s++,vn(e,i,1)}while(2<=e.heap_len);e.heap[--e.heap_max]=e.heap[1],n=t.dyn_tree,s=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits;var c,u=t.stat_desc.extra_base,d=t.stat_desc.max_length,f=0;for(c=0;15>=c;c++)e.bl_count[c]=0;for(n[2*e.heap[e.heap_max]+1]=0,t=e.heap_max+1;573>t;t++){var v=e.heap[t];if((c=n[2*n[2*v+1]+1]+1)>d&&(c=d,f++),n[2*v+1]=c,!(v>s)){e.bl_count[c]++;var g=0;v>=u&&(g=a[v-u]);var h=n[2*v];e.opt_len+=h*(c+g),o&&(e.static_len+=h*(r[2*v+1]+g))}}if(0!==f){do{for(c=d-1;0===e.bl_count[c];)c--;e.bl_count[c]--,e.bl_count[c+1]+=2,e.bl_count[d]--,f-=2}while(0s||(n[2*r+1]!==c&&(e.opt_len+=(c-n[2*r+1])*n[2*r],n[2*r+1]=c),v--)}cn(i,l,e.bl_count)},pn=function(e,t,n){var i,r=-1,o=t[1],a=0,l=7,s=4;for(0===o&&(l=138,s=3),t[2*(n+1)+1]=65535,i=0;i<=n;i++){var c=o;o=t[2*(i+1)+1],++a=a?e.bl_tree[34]++:e.bl_tree[36]++,a=0,r=c,0===o?(l=138,s=3):c===o?(l=6,s=3):(l=7,s=4))}},mn=function(e,t,n){var i,r=-1,o=t[1],a=0,l=7,s=4;for(0===o&&(l=138,s=3),i=0;i<=n;i++){var c=o;if(o=t[2*(i+1)+1],!(++a=a?(ln(e,17,e.bl_tree),an(e,a-3,3)):(ln(e,18,e.bl_tree),an(e,a-11,7));a=0,r=c,0===o?(l=138,s=3):c===o?(l=6,s=3):(l=7,s=4)}}},yn=!1,bn=function(e,t,n,i){an(e,i?1:0,3),dn(e),on(e,n),on(e,~n),n&&e.pending_buf.set(e.window.subarray(t,t+n),e.pending),e.pending+=n},wn=function(e,t,n,i){var r,o=65535&e|0;for(e=e>>>16&65535|0;0!==n;){n-=r=2e3n;n++){e=n;for(var i=0;8>i;i++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}()),kn=function(e,t,n,i){for(n=i+n,e^=-1;i>>8^_n[255&(e^t[i])];return-1^e},Cn={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"},En={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},Tn=function(e,t,n){return e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=n,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(Qt[n]+256+1)]++,e.dyn_dtree[2*(256>t?Xt[t]:Xt[256+(t>>>7)])]++),e.sym_next===e.sym_end},Sn=En.Z_NO_FLUSH,An=En.Z_PARTIAL_FLUSH,Rn=En.Z_FULL_FLUSH,Nn=En.Z_FINISH,On=En.Z_BLOCK,In=En.Z_OK,xn=En.Z_STREAM_END,Ln=En.Z_STREAM_ERROR,Mn=En.Z_DATA_ERROR,Dn=En.Z_BUF_ERROR,Pn=En.Z_DEFAULT_COMPRESSION,Un=En.Z_FILTERED,qn=En.Z_HUFFMAN_ONLY,Gn=En.Z_RLE,Bn=En.Z_FIXED,zn=En.Z_DEFAULT_STRATEGY,Hn=En.Z_UNKNOWN,jn=En.Z_DEFLATED,Fn=function(e,t){return e.msg=Cn[t],t},Vn=function(e){for(var t=e.length;0<=--t;)e[t]=0},Wn=function(e,t,n){return(t<e.avail_out&&(n=e.avail_out),0!==n&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+n),e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))},Zn=function(e,t){var n=0<=e.block_start?e.block_start:-1,i=e.strstart-e.block_start,r=0;if(0=t;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return 0;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return 1;for(t=32;256>t;t++)if(0!==e.dyn_ltree[2*t])return 1;return 0}(e)),hn(e,e.l_desc),hn(e,e.d_desc),pn(e,e.dyn_ltree,e.l_desc.max_code),pn(e,e.dyn_dtree,e.d_desc.max_code),hn(e,e.bl_desc),r=18;3<=r&&0===e.bl_tree[2*Zt[r]+1];r--);e.opt_len+=3*(r+1)+14;var o=e.opt_len+3+7>>>3,a=e.static_len+3+7>>>3;a<=o&&(o=a)}else o=a=i+5;if(i+4<=o&&-1!==n)bn(e,n,i,t);else if(4===e.strategy||a===o)an(e,2+(t?1:0),3),gn(e,Jt,Yt);else{for(an(e,4+(t?1:0),3),n=e.l_desc.max_code+1,i=e.d_desc.max_code+1,r+=1,an(e,n-257,5),an(e,i-1,5),an(e,r-4,4),o=0;o>>8&255,e.pending_buf[e.pending++]=255&t},Xn=function(e,t,n,i){var r=e.avail_in;return r>i&&(r=i),0===r?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),n),1===e.state.wrap?e.adler=wn(e.adler,t,r,n):2===e.state.wrap&&(e.adler=kn(e.adler,t,r,n)),e.next_in+=r,e.total_in+=r,r)},Qn=function(e,t){var n=e.max_chain_length,i=e.strstart,r=e.prev_length,o=e.nice_match,a=e.strstart>e.w_size-262?e.strstart-(e.w_size-262):0,l=e.window,s=e.w_mask,c=e.prev,u=e.strstart+258,d=l[i+r-1],f=l[i+r];e.prev_length>=e.good_match&&(n>>=2),o>e.lookahead&&(o=e.lookahead);do{var v=t;if(l[v+r]===f&&l[v+r-1]===d&&l[v]===l[i]&&l[++v]===l[i+1]){for(i+=2,v++;l[++i]===l[++v]&&l[++i]===l[++v]&&l[++i]===l[++v]&&l[++i]===l[++v]&&l[++i]===l[++v]&&l[++i]===l[++v]&&l[++i]===l[++v]&&l[++i]===l[++v]&&ir){if(e.match_start=t,r=v,v>=o)break;d=l[i+r-1],f=l[i+r]}}}while((t=c[t&s])>a&&0!=--n);return r<=e.lookahead?r:e.lookahead},$n=function(e){var t=e.w_size;do{var n=e.window_size-e.lookahead-e.strstart;if(e.strstart>=t+(t-262)){e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart);var i,r=e,o=r.w_size,a=i=r.hash_size;do{var l=r.head[--a];r.head[a]=l>=o?l-o:0}while(--i);a=i=o;do{l=r.prev[--a],r.prev[a]=l>=o?l-o:0}while(--i);n+=t}if(0===e.strm.avail_in)break;if(n=Xn(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=n,3<=e.lookahead+e.insert)for(n=e.strstart-e.insert,e.ins_h=e.window[n],e.ins_h=Wn(e,e.ins_h,e.window[n+1]);e.insert&&(e.ins_h=Wn(e,e.ins_h,e.window[n+3-1]),e.prev[n&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=n,n++,e.insert--,!(3>e.lookahead+e.insert)););}while(262>e.lookahead&&0!==e.strm.avail_in)},ei=function(e,t){var n=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,i=0,r=e.strm.avail_in;do{var o=65535,a=e.bi_valid+42>>3;if(e.strm.avail_outl+e.strm.avail_in&&(o=l+e.strm.avail_in),o>a&&(o=a),o>8,e.pending_buf[e.pending-2]=~o,e.pending_buf[e.pending-1]=~o>>8,Kn(e.strm),l&&(l>o&&(l=o),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+l),e.strm.next_out),e.strm.next_out+=l,e.strm.avail_out-=l,e.strm.total_out+=l,e.block_start+=l,o-=l),o&&(Xn(e.strm,e.strm.output,e.strm.next_out,o),e.strm.next_out+=o,e.strm.avail_out-=o,e.strm.total_out+=o)}while(0===i);return(r-=e.strm.avail_in)&&(r>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=r&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),2>e.matches&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-r,e.strm.next_in),e.strstart),e.strstart+=r,e.insert+=r>e.w_size-e.insert?e.w_size-e.insert:r),e.block_start=e.strstart),e.high_watera&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),2>e.matches&&e.matches++,a+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),a>e.strm.avail_in&&(a=e.strm.avail_in),a&&(Xn(e.strm,e.window,e.strstart,a),e.strstart+=a,e.insert+=a>e.w_size-e.insert?e.w_size-e.insert:a),e.high_water>3,n=(a=65535e.w_size?e.w_size:a,((l=e.strstart-e.block_start)>=n||(l||t===Nn)&&t!==Sn&&0===e.strm.avail_in&&l<=a)&&(o=l>a?a:l,i=t===Nn&&0===e.strm.avail_in&&o===l?1:0,bn(e,e.block_start,o,i),e.block_start+=o,Kn(e.strm)),i?3:1)},ti=function(e,t){for(var n;;){if(262>e.lookahead){if($n(e),262>e.lookahead&&t===Sn)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=Wn(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-262&&(e.match_length=Qn(e,n)),3<=e.match_length)if(n=Tn(e,e.strstart-e.match_start,e.match_length-3),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&3<=e.lookahead){e.match_length--;do{e.strstart++,e.ins_h=Wn(e,e.ins_h,e.window[e.strstart+3-1]),e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Wn(e,e.ins_h,e.window[e.strstart+1]);else n=Tn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(Zn(e,!1),0===e.strm.avail_out))return 1}return e.insert=2>e.strstart?e.strstart:2,t===Nn?(Zn(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Zn(e,!1),0===e.strm.avail_out)?1:2},ni=function(e,t){for(var n,i;;){if(262>e.lookahead){if($n(e),262>e.lookahead&&t===Sn)return 1;if(0===e.lookahead)break}if(n=0,3<=e.lookahead&&(e.ins_h=Wn(e,e.ins_h,e.window[e.strstart+3-1]),n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=2,0!==n&&e.prev_length=e.match_length&&(e.strategy===Un||3===e.match_length&&4096e.strstart?e.strstart:2,t===Nn?(Zn(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Zn(e,!1),0===e.strm.avail_out)?1:2},ii=[new j(0,0,0,0,ei),new j(4,4,8,4,ti),new j(4,5,16,8,ti),new j(4,6,32,32,ti),new j(4,4,16,16,ni),new j(8,16,32,32,ni),new j(8,16,128,128,ni),new j(8,32,128,256,ni),new j(32,128,258,1024,ni),new j(32,258,258,4096,ni)],ri=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||42!==t.status&&57!==t.status&&69!==t.status&&73!==t.status&&91!==t.status&&103!==t.status&&113!==t.status&&666!==t.status?1:0},oi=function(e){if(ri(e))return Fn(e,Ln);e.total_in=e.total_out=0,e.data_type=Hn;var t=e.state;if(t.pending=0,t.pending_out=0,0>t.wrap&&(t.wrap=-t.wrap),t.status=2===t.wrap?57:t.wrap?42:113,e.adler=2===t.wrap?0:1,t.last_flush=-2,!yn){var n,i,r;for(e=Array(16),r=i=0;28>r;r++)for($t[r]=i,n=0;n<1<r;r++)for(en[r]=i,n=0;n<1<>=7;30>r;r++)for(en[r]=i<<7,n=0;n<1<=n;n++)e[n]=0;for(n=0;143>=n;)Jt[2*n+1]=8,n++,e[8]++;for(;255>=n;)Jt[2*n+1]=9,n++,e[9]++;for(;279>=n;)Jt[2*n+1]=7,n++,e[7]++;for(;287>=n;)Jt[2*n+1]=8,n++,e[8]++;for(cn(Jt,287,e),n=0;30>n;n++)Yt[2*n+1]=5,Yt[2*n]=sn(n,5);tn=new z(Jt,Vt,257,286,15),nn=new z(Yt,Wt,0,30,15),rn=new z([],Kt,0,19,7),yn=!0}return t.l_desc=new H(t.dyn_ltree,tn),t.d_desc=new H(t.dyn_dtree,nn),t.bl_desc=new H(t.bl_tree,rn),t.bi_buf=0,t.bi_valid=0,un(t),In},ai=function(e){var t=oi(e);return t===In&&((e=e.state).window_size=2*e.w_size,Vn(e.head),e.max_lazy_match=ii[e.level].max_lazy,e.good_match=ii[e.level].good_length,e.nice_match=ii[e.level].nice_length,e.max_chain_length=ii[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),t},li=function(e,t,n,i,r,o){if(!e)return Ln;var a=1;if(t===Pn&&(t=6),0>i?(a=0,i=-i):15r||9i||15t||9o||o>Bn||8===i&&1!==a)return Fn(e,Ln);8===i&&(i=9);var l=new F;return e.state=l,l.strm=e,l.status=42,l.wrap=a,l.gzhead=null,l.w_bits=i,l.w_size=1<On||0>t)return e?Fn(e,Ln):Ln;var n=e.state;if(!e.output||0!==e.avail_in&&!e.input||666===n.status&&t!==Nn)return Fn(e,0===e.avail_out?Dn:Ln);var i=n.last_flush;if(n.last_flush=t,0!==n.pending){if(Kn(e),0===e.avail_out)return n.last_flush=-1,In}else if(0===e.avail_in&&2*t-(4=qn||2>n.level?0:6>n.level?1:6===n.level?2:3)<<6,0!==n.strstart&&(i|=32),Yn(n,i+(31-i%31)),0!==n.strstart&&(Yn(n,e.adler>>>16),Yn(n,65535&e.adler)),e.adler=1,n.status=113,Kn(e),0!==n.pending))return n.last_flush=-1,In;if(57===n.status)if(e.adler=0,Jn(n,31),Jn(n,139),Jn(n,8),n.gzhead)Jn(n,(n.gzhead.text?1:0)+(n.gzhead.hcrc?2:0)+(n.gzhead.extra?4:0)+(n.gzhead.name?8:0)+(n.gzhead.comment?16:0)),Jn(n,255&n.gzhead.time),Jn(n,n.gzhead.time>>8&255),Jn(n,n.gzhead.time>>16&255),Jn(n,n.gzhead.time>>24&255),Jn(n,9===n.level?2:n.strategy>=qn||2>n.level?4:0),Jn(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Jn(n,255&n.gzhead.extra.length),Jn(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(e.adler=kn(e.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69;else if(Jn(n,0),Jn(n,0),Jn(n,0),Jn(n,0),Jn(n,0),Jn(n,9===n.level?2:n.strategy>=qn||2>n.level?4:0),Jn(n,3),n.status=113,Kn(e),0!==n.pending)return n.last_flush=-1,In;if(69===n.status){if(n.gzhead.extra){i=n.pending;for(var r=(65535&n.gzhead.extra.length)-n.gzindex;n.pending+r>n.pending_buf_size;){var o=n.pending_buf_size-n.pending;if(n.pending_buf.set(n.gzhead.extra.subarray(n.gzindex,n.gzindex+o),n.pending),n.pending=n.pending_buf_size,n.gzhead.hcrc&&n.pending>i&&(e.adler=kn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex+=o,Kn(e),0!==n.pending)return n.last_flush=-1,In;i=0,r-=o}o=new Uint8Array(n.gzhead.extra),n.pending_buf.set(o.subarray(n.gzindex,n.gzindex+r),n.pending),n.pending+=r,n.gzhead.hcrc&&n.pending>i&&(e.adler=kn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=73}if(73===n.status){if(n.gzhead.name){i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=kn(e.adler,n.pending_buf,n.pending-i,i)),Kn(e),0!==n.pending)return n.last_flush=-1,In;i=0}r=n.gzindexi&&(e.adler=kn(e.adler,n.pending_buf,n.pending-i,i)),n.gzindex=0}n.status=91}if(91===n.status){if(n.gzhead.comment){i=n.pending;do{if(n.pending===n.pending_buf_size){if(n.gzhead.hcrc&&n.pending>i&&(e.adler=kn(e.adler,n.pending_buf,n.pending-i,i)),Kn(e),0!==n.pending)return n.last_flush=-1,In;i=0}r=n.gzindexi&&(e.adler=kn(e.adler,n.pending_buf,n.pending-i,i))}n.status=103}if(103===n.status){if(n.gzhead.hcrc){if(n.pending+2>n.pending_buf_size&&(Kn(e),0!==n.pending))return n.last_flush=-1,In;Jn(n,255&e.adler),Jn(n,e.adler>>8&255),e.adler=0}if(n.status=113,Kn(e),0!==n.pending)return n.last_flush=-1,In}if(0!==e.avail_in||0!==n.lookahead||t!==Sn&&666!==n.status){if(i=0===n.level?ei(n,t):n.strategy===qn?function(e,t){for(var n;;){if(0===e.lookahead&&($n(e),0===e.lookahead)){if(t===Sn)return 1;break}if(e.match_length=0,n=Tn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(Zn(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Nn?(Zn(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Zn(e,!1),0===e.strm.avail_out)?1:2}(n,t):n.strategy===Gn?function(e,t){for(var n,i,r,o=e.window;;){if(258>=e.lookahead){if($n(e),258>=e.lookahead&&t===Sn)return 1;if(0===e.lookahead)break}if(e.match_length=0,3<=e.lookahead&&0e.lookahead&&(e.match_length=e.lookahead)}if(3<=e.match_length?(n=Tn(e,1,e.match_length-3),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Tn(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(Zn(e,!1),0===e.strm.avail_out))return 1}return e.insert=0,t===Nn?(Zn(e,!0),0===e.strm.avail_out?3:4):e.sym_next&&(Zn(e,!1),0===e.strm.avail_out)?1:2}(n,t):ii[n.level].func(n,t),3!==i&&4!==i||(n.status=666),1===i||3===i)return 0===e.avail_out&&(n.last_flush=-1),In;if(2===i&&(t===An?(an(n,2,3),ln(n,256,Jt),16===n.bi_valid?(on(n,n.bi_buf),n.bi_buf=0,n.bi_valid=0):8<=n.bi_valid&&(n.pending_buf[n.pending++]=255&n.bi_buf,n.bi_buf>>=8,n.bi_valid-=8)):t!==On&&(bn(n,0,0,!1),t===Rn&&(Vn(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Kn(e),0===e.avail_out))return n.last_flush=-1,In}return t!==Nn?In:0>=n.wrap?xn:(2===n.wrap?(Jn(n,255&e.adler),Jn(n,e.adler>>8&255),Jn(n,e.adler>>16&255),Jn(n,e.adler>>24&255),Jn(n,255&e.total_in),Jn(n,e.total_in>>8&255),Jn(n,e.total_in>>16&255),Jn(n,e.total_in>>24&255)):(Yn(n,e.adler>>>16),Yn(n,65535&e.adler)),Kn(e),0=i.w_size){0===r&&(Vn(i.head),i.strstart=0,i.block_start=0,i.insert=0);var o=new Uint8Array(i.w_size);o.set(t.subarray(n-i.w_size,n),0),t=o,n=i.w_size}o=e.avail_in;var a=e.next_in,l=e.input;for(e.avail_in=n,e.next_in=0,e.input=t,$n(i);3<=i.lookahead;){t=i.strstart,n=i.lookahead-2;do{i.ins_h=Wn(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--n);i.strstart=t,i.lookahead=2,$n(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,e.next_in=a,e.input=l,e.avail_in=o,i.wrap=r,In},deflateInfo:"pako deflate (from Nodeca project)"},ci={assign:function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!==c(n))throw new TypeError(n+"must be non-object");for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(e[i]=n[i])}}return e},flattenChunks:function(e){for(var t=0,n=0,i=e.length;nfi;fi++)di[fi]=252<=fi?6:248<=fi?5:240<=fi?4:224<=fi?3:192<=fi?2:1;di[254]=di[254]=1;var vi={string2buf:function(e){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(e);var t,n,i=e.length,r=0;for(t=0;to?1:2048>o?2:65536>o?3:4}var l=new Uint8Array(r);for(t=n=0;no?l[n++]=o:(2048>o?l[n++]=192|o>>>6:(65536>o?l[n++]=224|o>>>12:(l[n++]=240|o>>>18,l[n++]=128|o>>>12&63),l[n++]=128|o>>>6&63),l[n++]=128|63&o);return l},buf2string:function(e,t){var n,i,r=t||e.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(e.subarray(0,t));for(t=Array(2*r),n=i=0;no)t[i++]=o;else{var a=di[o];if(4o?t[i++]=o:(o-=65536,t[i++]=55296|o>>10&1023,t[i++]=56320|1023&o)}}}if(65534>(e=i)&&t.subarray&&ui)t=String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));else{for(r="",n=0;ne.length&&(t=e.length);for(var n=t-1;0<=n&&128==(192&e[n]);)n--;return 0>n||0===n?t:n+di[e[n]]>t?n:t}},gi=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},hi=Object.prototype.toString,pi=En.Z_NO_FLUSH,mi=En.Z_SYNC_FLUSH,yi=En.Z_FULL_FLUSH,bi=En.Z_FINISH,wi=En.Z_OK,_i=En.Z_STREAM_END,ki=En.Z_DEFAULT_COMPRESSION,Ci=En.Z_DEFAULT_STRATEGY,Ei=En.Z_DEFLATED;V.prototype.push=function(e,t){var n=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(t=t===~~t?t:!0===t?bi:pi,"string"==typeof e?n.input=vi.string2buf(e):"[object ArrayBuffer]"===hi.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;)if(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(t===mi||t===yi)&&6>=n.avail_out)this.onData(n.output.subarray(0,n.next_out)),n.avail_out=0;else{if((e=si.deflate(n,t))===_i)return 0=s;s++)p[s]=0;for(c=0;cu&&(y=u),0===u)return r[o++]=20971520,r[o++]=20971520,l.bits=1,0;for(h=1;h=s;s++)if(d<<=1,0>(d-=p[s]))return-1;if(0s;s++)m[s+1]=m[s]+p[s];for(c=0;c=w?(S=g[a[c]-w],A=b[a[c]-w]):(S=96,A=0);d=1<>m)+(v-=d)]=T<<24|S<<16|A|0}while(0!==v);for(d=1<>=1;if(0!==d?(f&=d-1,f+=d):f=0,c++,0==--p[s]){if(s===u)break;s=t[n+a[c]]}if(s>y&&(f&E)!==k){for(0===m&&(m=y),_+=h,d=1<<(i=s-m);i+m=(d-=p[i+m]));)i++,d<<=1;if(C+=1<>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)},Fi=function(e){if(!e)return 1;var t=e.state;return!t||t.strm!==e||16180>t.mode||16211t){var i=0;t=-t}else i=5+(t>>4),48>t&&(t&=15);return t&&(8>t||15=r.wsize?(r.window.set(t.subarray(n-r.wsize,n),0),r.wnext=0,r.whave=r.wsize):((e=r.wsize-r.wnext)>i&&(e=i),r.window.set(t.subarray(n-i,n-i+e),r.wnext),(i-=e)?(r.window.set(t.subarray(n-i,n),0),r.wnext=i,r.whave=r.wsize):(r.wnext+=e,r.wnext===r.wsize&&(r.wnext=0),r.whavef;){if(0===u)break e;u--,d+=c[s++]<>>8&255,r.check=kn(r.check,n,2,0),f=d=0,r.mode=16181;break}if(r.head&&(r.head.done=!1),!(1&r.wrap)||(((255&d)<<8)+(d>>8))%31){e.msg="incorrect header check",r.mode=16209;break}if((15&d)!==Hi){e.msg="unknown compression method",r.mode=16209;break}f-=4;var p=8+(15&(d>>>=4));if(0===r.wbits&&(r.wbits=p),15r.wbits){e.msg="invalid window size",r.mode=16209;break}r.dmax=1<f;){if(0===u)break e;u--,d+=c[s++]<>8&1),512&r.flags&&4&r.wrap&&(n[0]=255&d,n[1]=d>>>8&255,r.check=kn(r.check,n,2,0)),f=d=0,r.mode=16182;case 16182:for(;32>f;){if(0===u)break e;u--,d+=c[s++]<>>8&255,n[2]=d>>>16&255,n[3]=d>>>24&255,r.check=kn(r.check,n,4,0)),f=d=0,r.mode=16183;case 16183:for(;16>f;){if(0===u)break e;u--,d+=c[s++]<>8),512&r.flags&&4&r.wrap&&(n[0]=255&d,n[1]=d>>>8&255,r.check=kn(r.check,n,2,0)),f=d=0,r.mode=16184;case 16184:if(1024&r.flags){for(;16>f;){if(0===u)break e;u--,d+=c[s++]<>>8&255,r.check=kn(r.check,n,2,0)),f=d=0}else r.head&&(r.head.extra=null);r.mode=16185;case 16185:if(1024&r.flags){var m=r.length;if(m>u&&(m=u),m&&(r.head&&(p=r.head.extra_len-r.length,r.head.extra||(r.head.extra=new Uint8Array(r.head.extra_len)),r.head.extra.set(c.subarray(s,s+m),p)),512&r.flags&&4&r.wrap&&(r.check=kn(r.check,c,m,s)),u-=m,s+=m,r.length-=m),r.length)break e}r.length=0,r.mode=16186;case 16186:if(2048&r.flags){if(0===u)break e;m=0;do{p=c[s+m++],r.head&&p&&65536>r.length&&(r.head.name+=String.fromCharCode(p))}while(p&&mr.length&&(r.head.comment+=String.fromCharCode(p))}while(p&&mf;){if(0===u)break e;u--,d+=c[s++]<>9&1,r.head.done=!0),e.adler=r.check=0,r.mode=16191;break;case 16189:for(;32>f;){if(0===u)break e;u--,d+=c[s++]<>>=7&f,f-=7&f,r.mode=16206;break}for(;3>f;){if(0===u)break e;u--,d+=c[s++]<>>=1)){case 0:r.mode=16193;break;case 1:if(m=r,Ji){for(Ti=new Int32Array(512),Si=new Int32Array(32),p=0;144>p;)m.lens[p++]=8;for(;256>p;)m.lens[p++]=9;for(;280>p;)m.lens[p++]=7;for(;288>p;)m.lens[p++]=8;for(Ii(1,m.lens,0,288,Ti,0,m.work,{bits:9}),p=0;32>p;)m.lens[p++]=5;Ii(2,m.lens,0,32,Si,0,m.work,{bits:5}),Ji=!1}if(m.lencode=Ti,m.lenbits=9,m.distcode=Si,m.distbits=5,r.mode=16199,t===Mi){d>>>=2,f-=2;break e}break;case 2:r.mode=16196;break;case 3:e.msg="invalid block type",r.mode=16209}d>>>=2,f-=2;break;case 16193:for(d>>>=7&f,f-=7&f;32>f;){if(0===u)break e;u--,d+=c[s++]<>>16^65535)){e.msg="invalid stored block lengths",r.mode=16209;break}if(r.length=65535&d,f=d=0,r.mode=16194,t===Mi)break e;case 16194:r.mode=16195;case 16195:if(m=r.length){if(m>u&&(m=u),m>l&&(m=l),0===m)break e;a.set(c.subarray(s,s+m),o),u-=m,s+=m,l-=m,o+=m,r.length-=m;break}r.mode=16191;break;case 16196:for(;14>f;){if(0===u)break e;u--,d+=c[s++]<>>=5,f-=5,r.ndist=1+(31&d),d>>>=5,f-=5,r.ncode=4+(15&d),d>>>=4,f-=4,286f;){if(0===u)break e;u--,d+=c[s++]<>>=3,f-=3}for(;19>r.have;)r.lens[i[r.have++]]=0;if(r.lencode=r.lendyn,r.lenbits=7,m={bits:r.lenbits},h=Ii(0,r.lens,0,19,r.lencode,0,r.work,m),r.lenbits=m.bits,h){e.msg="invalid code lengths set",r.mode=16209;break}r.have=0,r.mode=16198;case 16198:for(;r.have>>24,y&=65535,m<=f)break;if(0===u)break e;u--,d+=c[s++]<y)d>>>=m,f-=m,r.lens[r.have++]=y;else{if(16===y){for(p=m+2;f>>=m,f-=m,0===r.have){e.msg="invalid bit length repeat",r.mode=16209;break}p=r.lens[r.have-1],m=3+(3&d),d>>>=2,f-=2}else if(17===y){for(p=m+3;f>>=m)),d>>>=3,f-=3}else{for(p=m+7;f>>=m)),d>>>=7,f-=7}if(r.have+m>r.nlen+r.ndist){e.msg="invalid bit length repeat",r.mode=16209;break}for(;m--;)r.lens[r.have++]=p}}if(16209===r.mode)break;if(0===r.lens[256]){e.msg="invalid code -- missing end-of-block",r.mode=16209;break}if(r.lenbits=9,m={bits:r.lenbits},h=Ii(1,r.lens,0,r.nlen,r.lencode,0,r.work,m),r.lenbits=m.bits,h){e.msg="invalid literal/lengths set",r.mode=16209;break}if(r.distbits=6,r.distcode=r.distdyn,m={bits:r.distbits},h=Ii(2,r.lens,r.nlen,r.ndist,r.distcode,0,r.work,m),r.distbits=m.bits,h){e.msg="invalid distances set",r.mode=16209;break}if(r.mode=16199,t===Mi)break e;case 16199:r.mode=16200;case 16200:if(6<=u&&258<=l){e.next_out=o,e.avail_out=l,e.next_in=s,e.avail_in=u,r.hold=d,r.bits=f;var b=e,w=b.state,_=b.next_in;a=b.input;var k=_+(b.avail_in-5),C=b.next_out;c=b.output;var E=C-(g-b.avail_out),T=C+(b.avail_out-257),S=w.dmax;y=w.wsize;var A=w.whave,R=w.wnext,N=w.window;p=w.hold,m=w.bits,f=w.lencode,d=w.distcode,l=(1<m&&(p+=a[_++]<>>=o=O>>>24,m-=o,0===(o=O>>>16&255))c[C++]=65535&O;else{if(!(16&o)){if(0==(64&o)){O=f[(65535&O)+(p&(1<>>=o,m-=o),15>m&&(p+=a[_++]<>>=o=O>>>24,m-=o,!(16&(o=O>>>16&255))){if(0==(64&o)){O=d[(65535&O)+(p&(1<S){b.msg="invalid distance too far back",w.mode=16209;break t}if(p>>>=o,m-=o,I>(o=C-E)){if((o=I-o)>A&&w.sane){b.msg="invalid distance too far back",w.mode=16209;break t}var x=0;if(O=N,0===R){if(x+=y-o,o>3,m-=s<<3,b.next_in=_,b.next_out=C,b.avail_in=_>>24,p=y>>>16&255,y&=65535,!(m<=f);){if(0===u)break e;u--,d+=c[s++]<>N)])>>>24,p=y>>>16&255,y&=65535,!(N+m<=f);){if(0===u)break e;u--,d+=c[s++]<>>=N,f-=N,r.back+=N}if(d>>>=m,f-=m,r.back+=m,r.length=y,0===p){r.mode=16205;break}if(32&p){r.back=-1,r.mode=16191;break}if(64&p){e.msg="invalid literal/length code",r.mode=16209;break}r.extra=15&p,r.mode=16201;case 16201:if(r.extra){for(p=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}r.was=r.length,r.mode=16202;case 16202:for(;m=(y=r.distcode[d&(1<>>24,p=y>>>16&255,y&=65535,!(m<=f);){if(0===u)break e;u--,d+=c[s++]<>N)])>>>24,p=y>>>16&255,y&=65535,!(N+m<=f);){if(0===u)break e;u--,d+=c[s++]<>>=N,f-=N,r.back+=N}if(d>>>=m,f-=m,r.back+=m,64&p){e.msg="invalid distance code",r.mode=16209;break}r.offset=y,r.extra=15&p,r.mode=16203;case 16203:if(r.extra){for(p=r.extra;f>>=r.extra,f-=r.extra,r.back+=r.extra}if(r.offset>r.dmax){e.msg="invalid distance too far back",r.mode=16209;break}r.mode=16204;case 16204:if(0===l)break e;if(m=g-l,r.offset>m){if((m=r.offset-m)>r.whave&&r.sane){e.msg="invalid distance too far back",r.mode=16209;break}m>r.wnext?(m-=r.wnext,p=r.wsize-m):p=r.wnext-m,m>r.length&&(m=r.length),N=r.window}else N=a,p=o-r.offset,m=r.length;m>l&&(m=l),l-=m,r.length-=m;do{a[o++]=N[p++]}while(--m);0===r.length&&(r.mode=16200);break;case 16205:if(0===l)break e;a[o++]=r.length,l--,r.mode=16200;break;case 16206:if(r.wrap){for(;32>f;){if(0===u)break e;u--,d|=c[s++]<f;){if(0===u)break e;u--,d+=c[s++]<r.mode&&(16206>r.mode||t!==xi))&&Yi(e,e.output,e.next_out,g-e.avail_out),v-=e.avail_in,g-=e.avail_out,e.total_in+=v,e.total_out+=g,r.total+=g,4&r.wrap&&g&&(e.adler=r.check=r.flags?kn(r.check,a,g,e.next_out-g):wn(r.check,a,g,e.next_out-g)),e.data_type=r.bits+(r.last?64:0)+(16191===r.mode?128:0)+(16199===r.mode||16194===r.mode?256:0),(0===v&&0===g||t===xi)&&h===Di&&(h=zi),h},inflateEnd:function(e){if(Fi(e))return qi;var t=e.state;return t.window&&(t.window=null),e.state=null,Di},inflateGetHeader:function(e,t){return Fi(e)||0==(2&(e=e.state).wrap)?qi:(e.head=t,t.done=!1,Di)},inflateSetDictionary:function(e,t){var n=t.length;if(Fi(e))return qi;var i=e.state;if(0!==i.wrap&&16190!==i.mode)return qi;if(16190===i.mode&&wn(1,t,n,0)!==i.check)return Gi;return Yi(e,t,n,n)?(i.mode=16210,Bi):(i.havedict=1,Di)},inflateInfo:"pako inflate (from Nodeca project)"},Qi=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},$i=Object.prototype.toString,er=En.Z_NO_FLUSH,tr=En.Z_FINISH,nr=En.Z_OK,ir=En.Z_STREAM_END,rr=En.Z_NEED_DICT,or=En.Z_STREAM_ERROR,ar=En.Z_DATA_ERROR,lr=En.Z_MEM_ERROR;Z.prototype.push=function(e,t){var n=this.strm,i=this.options.chunkSize,r=this.options.dictionary;if(this.ended)return!1;var o=t===~~t?t:!0===t?tr:er;for("[object ArrayBuffer]"===$i.call(e)?n.input=new Uint8Array(e):n.input=e,n.next_in=0,n.avail_in=n.input.length;;){for(0===n.avail_out&&(n.output=new Uint8Array(i),n.next_out=0,n.avail_out=i),(t=Xi.inflate(n,o))===rr&&r&&((t=Xi.inflateSetDictionary(n,r))===nr?t=Xi.inflate(n,o):t===ar&&(t=rr));0a?wr.cacheRefreshInterval:X(a)?a:wr.cacheRefreshInterval,c.cacheRefreshInterval!=a&&(c.cacheRefreshInterval=a,ro(c.cacheRefreshInterval,c.catRcLastUpdatedTs,n,v,ur.RC_FETCH_MODE.DO_NOT_FETCH_UPDATE_TIMER)),ao(r,c.catRcLastUpdatedTs,n)){var l=new Event("RemoteConfigUpdateApplied");null!==window&&void 0!==window&&window.dispatchEvent&&window.dispatchEvent(l)}}}else try{2>to&&window.setTimeout((function(){null!=n&&n.trackerConfigUrl?oo(null==n?void 0:n.trackerConfigUrl,!0):oo(v,!0)}),5e3*(to+1));var s={message:"Remote config request is not successful - ".concat("number"==typeof Fr.status?Fr.status:""),className:"configtimerCallback - onreadystatechange",configAppliedSrc:Mr,configAppliedTime:Dr};Ie(kr,null==Vr?void 0:Vr.getSamplingMode,s),2<=to&&Ie(kr,null==Vr?void 0:Vr.getSamplingMode,{message:"Remote config is not applied since failed to download remote config after 3 tries",className:"configtimerCallback - onreadystatechange",configAppliedSrc:Mr,configAppliedTime:Dr})}catch(e){}}catch(e){$r=!1,console.warn("Conviva App Tracker:: Error in fetching remote-config ".concat(e)),Ie(kr,null==Vr?void 0:Vr.getSamplingMode,{className:"configtimerCallback - onreadystatechange",error:e,configAppliedSrc:Mr,configAppliedTime:Dr})}},ro(c.cacheRefreshInterval,c.catRcLastUpdatedTs,n,v,void 0!==no&&!0===no?ur.RC_FETCH_MODE.IMMEDIATE_FETCH:ur.RC_FETCH_MODE.UPDATE_TIMER_WITH_DIFF)),{convivaRemoteTrackerConfig:c}},ro=function(e,t,n,i,r){var o=n.trackerConfigUrl?n.trackerConfigUrl:i;if("number"==typeof eo){window.clearInterval(eo);var a={message:"Cancelling remote config timer",className:"updateRemoteConfig",extraData:{mode:r},configAppliedSrc:Mr,configAppliedTime:Dr};setTimeout((function(){Ie(kr,null==Vr?void 0:Vr.getSamplingMode,a)}),0)}var l=function(){var t={message:"Starting remote config timer with delay of ".concat(60*e," seconds"),className:"updateRemoteConfig",configAppliedSrc:Mr,configAppliedTime:Dr};setTimeout((function(){Ie(kr,null==Vr?void 0:Vr.getSamplingMode,t)}),0),eo=window.setInterval(oo,6e4*e,o)};try{var s=t?((new Date).getTime()-t)/6e4:e;if(n=e-s,i=3*e/100,"string"==typeof r&&r===ur.RC_FETCH_MODE.DO_NOT_FETCH_UPDATE_TIMER)l();else if("string"==typeof r&&r===ur.RC_FETCH_MODE.UPDATE_TIMER_WITH_DIFF&&0i){window.setTimeout((function(){oo(o),l()}),6e4*n);var c={message:"Starting remote config timer with delay of ".concat(60*n," seconds"),className:"updateRemoteConfig",extraData:{mode:r},configAppliedSrc:Mr,configAppliedTime:Dr};setTimeout((function(){Ie(kr,null==Vr?void 0:Vr.getSamplingMode,c)}),0)}else oo(o),l()}catch(e){console.warn("Conviva App Tracker:: Error in setting cacheRefreshIntervalTimer",e),oo(o),l();var u={className:"cacheRefreshIntervalTimer",error:e,configAppliedSrc:Mr,configAppliedTime:Dr};setTimeout((function(){Ie(kr,null==Vr?void 0:Vr.getSamplingMode,u)}),0)}},oo=function(e,t){try{if("boolean"==typeof $r&&!1===$r){t?to++:to=0,Fr.timeout=3e4,Fr.open("GET",e,!0),$r=!0;var n={message:"Remote config fetch attempt",className:"updateRemoteConfig",configAppliedSrc:Mr,configAppliedTime:Dr};setTimeout((function(){Ie(kr,null==Vr?void 0:Vr.getSamplingMode,n)}),0),Fr.send()}}catch(e){$r=!1,Gt.warn("Conviva App Tracker:: Error in configtimerCallback ".concat(e));var i={className:"configtimerCallback",error:e,configAppliedSrc:Mr,configAppliedTime:Dr};setTimeout((function(){Ie(kr,null==Vr?void 0:Vr.getSamplingMode,i)}),0)}},ao=function(e,t,n){var i,r,o,a,l,s,c,u,d,f,v,g,h,p,m,y,b,w,_,k,C,E,T,S,A,R,N,O,I,x,L,M,D,P,U,q=kr;try{var G=(new Qr).setBase64(e.configurationBundle[0].trackerConfiguration.base64Encoding).setCacheRefreshInterval(e.cri||e.cacheRefreshInterval).setLifecycleAutotracking(null===(r=null===(i=e.configurationBundle[0])||void 0===i?void 0:i.trackerConfiguration)||void 0===r?void 0:r.lifecycleAutotracking).setExceptionAutotracking(null===(a=null===(o=e.configurationBundle[0])||void 0===o?void 0:o.trackerConfiguration)||void 0===a?void 0:a.exceptionAutotracking).setEnablePeriodicHeartbeat(null===(s=null===(l=e.configurationBundle[0])||void 0===l?void 0:l.trackerConfiguration)||void 0===s?void 0:s.enablePeriodicHeartbeat).setPeriodicHeartbeatInterval(null===(u=null===(c=e.configurationBundle[0])||void 0===c?void 0:c.trackerConfiguration)||void 0===u?void 0:u.periodicHeartbeatInterval).setEnc(null===(f=null===(d=e.configurationBundle[0])||void 0===d?void 0:d.networkConfiguration)||void 0===f?void 0:f.enc,null===(g=null===(v=null==n?void 0:n.configs)||void 0===v?void 0:v.network)||void 0===g?void 0:g.encoding).setMaxLocalStorageQueueSize(null===(p=null===(h=e.configurationBundle[0])||void 0===h?void 0:h.networkConfiguration)||void 0===p?void 0:p.maxLocalStorageQueueSize).setMaxGetBytes(null===(y=null===(m=e.configurationBundle[0])||void 0===m?void 0:m.networkConfiguration)||void 0===y?void 0:y.maxGetBytes).setBufferSize(null===(w=null===(b=e.configurationBundle[0])||void 0===b?void 0:b.networkConfiguration)||void 0===w?void 0:w.bufferSize).setCustomEventTrackingConfiguration(null===(_=e.configurationBundle[0])||void 0===_?void 0:_.customEventTrackingConfiguration).setSoftNavigationTrackingConfiguration(null===(k=e.configurationBundle[0])||void 0===k?void 0:k.softNavigationTrackingConfiguration).setEndPoint(null===(E=null===(C=e.configurationBundle[0])||void 0===C?void 0:C.networkConfiguration)||void 0===E?void 0:E.endpoint,n.gatewayUrl,n.proxyGatewayUrl).setNetworkRequestTrackingConfiguration(null===(T=e.configurationBundle[0])||void 0===T?void 0:T.networkRequestTrackingConfiguration,!0,null===(A=null===(S=e.configurationBundle[0])||void 0===S?void 0:S.networkConfiguration)||void 0===A?void 0:A.endpoint).setMetaTagsTrackingConfiguration(null===(R=e.configurationBundle[0])||void 0===R?void 0:R.metaTagsTrackingConfiguration).setTraceparentconfig(null===(N=e.configurationBundle[0])||void 0===N?void 0:N.traceparentconfig).setBaggageConfiguration(null===(O=e.configurationBundle[0])||void 0===O?void 0:O.baggageConfiguration).setMend(null===(x=null===(I=e.configurationBundle[0])||void 0===I?void 0:I.networkConfiguration)||void 0===x?void 0:x.mend,null===(M=null===(L=null==n?void 0:n.configs)||void 0===L?void 0:L.network)||void 0===M?void 0:M.mergeEndpoint).setPerformanceContextConfig(null===(P=null===(D=e.configurationBundle[0])||void 0===D?void 0:D.trackerConfiguration)||void 0===P?void 0:P.perfCx).setConfigurationVersion(e.configurationVersion).setCatRcLastUpdatedTs(t).setEmitterConfiguration(e.configurationBundle[0].emitterConfiguration).setcontrolIngestConfig(e["ctrl-ingst"]).setApplicationContext(e.configurationBundle[0].trackerConfiguration.applicationContext).setDi(e.configurationBundle[0].di).setClickcc(e.configurationBundle[0].clickcc).setCollectionRateLimit(e.configurationBundle[0].collectionRateLimit).setPageUrlTrackingConfig(e.configurationBundle[0].pageUrlTrackingConfig).setSessionReplayConfiguration(e.configurationBundle[0].sessionReplayConfiguration).setEvtStreamTrackingConfiguration(e.configurationBundle[0].evtStreamTrackingConfiguration).setValueProbes(e.configurationBundle[0].valueProbes).setWebVitals(e.configurationBundle[0].webVitals).build();Mr=ur.CONFIG_SOURCE.REMOTE,Dr=(new Date).getTime(),null==q||q.setConfig(G),e={message:"Remote Config Applied",className:"updateRemoteConfig - tracker",configAppliedSrc:Mr,configAppliedTime:Dr},Ie(kr,null==Vr?void 0:Vr.getSamplingMode,e),null==Vr||Vr.setCollectorUrl(null===(U=null==q?void 0:q.getConfig())||void 0===U?void 0:U.endpoint,n.convivaCustomerKey);try{window.localStorage&&(localStorage.removeItem(ur.REMOTE_CONFIG_STORAGE_KEY),localStorage.setItem(ur.REMOTE_CONFIG_STORAGE_KEY,JSON.stringify(G)))}catch(e){Ie(kr,null==Vr?void 0:Vr.getSamplingMode,{className:"updateRemoteConfig - localstorage",error:e,configAppliedSrc:Mr,configAppliedTime:Dr}),console.warn("Conviva: Error while saving remote-config to localstorage",e)}}catch(t){return e={className:"updateRemoteConfig - tracker",error:t,configAppliedSrc:Mr,configAppliedTime:Dr},Ie(kr,null==Vr?void 0:Vr.getSamplingMode,e),console.warn("Conviva: Error while updating remote-config",t),!1}return!0},lo={idleMs:3e4,maxEvents:1e4,bufferMaxBytes:1e6},so=function(){function e(e,t,n){var i;this.originalFetch=null===(i=null===window||void 0===window?void 0:window.fetch)||void 0===i?void 0:i.bind(window),this.sseCountStates=new Map,this.inflightRequests=0,this.core=kr,this.trackerMethods=e,this.trackerConfiguration=t,this.getSamplingMode=n,this.handleResponse=this.handleResponse.bind(this),this.addTraceparentHeader=this.addTraceparentHeader.bind(this),this.addBaggageHeader=this.addBaggageHeader.bind(this)}return e.prototype.cleanupNetworkRequestHandler=function(){e.instance=null},e.getInstance=function(t,n,i){return e.instance||(e.instance=new e(t,n,i)),e.instance},e.prototype.initiateNetworkRequestTracking=function(){try{this.decorateXMLHttpRequest(),this.decorateFetch(),this.decorateWebSocket(),this.decorateEventSource()}catch(e){console.warn("Conviva App Tracker:: Unable to track network request ".concat(e))}},e.prototype.decorateXMLHttpRequest=function(){var e=this,t=XMLHttpRequest.prototype.open,n=XMLHttpRequest.prototype.send,i=XMLHttpRequest.prototype.setRequestHeader;XMLHttpRequest.prototype.open=function(){for(var n=[],i=0;it)){var r=new TextDecoder("utf-8",{fatal:!1}).decode(e.data),o=[];je(r).forEach((function(e){try{var t=JSON.parse(e.trim());o.push(t)}catch(t){o.push(e)}}));var a={data:o,url:this.getWebSocketUrl(e.target)};this.sendWebSocketEvent("server",a,{},!0)}}else{n=void 0;try{(n="string"==typeof e.data?JSON.parse(e.data):e.data).url=this.getWebSocketUrl(e.target)}catch(t){n={data:e.data,url:e.target?this.getWebSocketUrl(e.target):void 0}}this.sendWebSocketEvent("server",n)}}catch(t){e={data:e.data,url:e.target?this.getWebSocketUrl(e.target):void 0},this.sendWebSocketEvent("server",e)}},e.prototype.handleWebSocketSend=function(e,t){var n,i,r,o,a=null===(n=this.core)||void 0===n?void 0:n.getConfig().evtStreamTrackingConfiguration;n=null!==(i=null==a?void 0:a.bufferMaxBytes)&&void 0!==i?i:1048576;try{if(e instanceof ArrayBuffer){if(!(e.byteLength>n)){var l=new TextDecoder("utf-8",{fatal:!1}).decode(e),s=[];je(l).forEach((function(e){try{if("string"==typeof e){var t=JSON.parse(e);s.push(t)}else s.push(e)}catch(t){s.push(e)}}));var c={url:this.getWebSocketUrl(t)},u={data:s};this.sendWebSocketEvent("send",c,u,!0)}}else{var d="string"==typeof e?JSON.parse(e):e;c={url:this.getWebSocketUrl(t),type:null!==(o=null!==(r=d.type)&&void 0!==r?r:d.method)&&void 0!==o?o:void 0},this.sendWebSocketEvent("send",c,d)}}catch(n){c={url:this.getWebSocketUrl(t)},d={data:e},this.sendWebSocketEvent("send",c,d)}},e.prototype.handleWebSocketError=function(e){var t,n,i,r,o,a,l;try{var s={url:this.getWebSocketUrl(e.target),type:e.type,timestamp:Date.now(),readyState:this.getWebSocketReadyState(e.target),errorMessage:e.message||"WebSocket error occurred",errorType:(null===(t=e.error)||void 0===t?void 0:t.name)||"WebSocketError",errorCode:null===(n=e.error)||void 0===n?void 0:n.code,errorDetails:null===(i=e.error)||void 0===i?void 0:i.message,networkType:(null===(r=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===r?void 0:r.type)||"unknown",networkEffectiveType:(null===(o=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===o?void 0:o.effectiveType)||"unknown",networkDownlink:null===(a=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===a?void 0:a.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(t){s={url:this.getWebSocketUrl(e.target),type:"error",timestamp:Date.now(),error:"Failed to process WebSocket error event: ".concat(t instanceof Error?t.message:String(t)),originalEvent:e}}this.sendWebSocketEvent("error",s)},e.prototype.handleEventSourceOpen=function(e){try{var t={url:this.getEventSourceUrl(e.target),type:e.type}}catch(n){t={data:e.data,url:e.target?this.getEventSourceUrl(e.target):void 0,type:e.type}}this.sendEventSourceEvent(t)},e.prototype.handleEventSourceMessage=function(e){var t={};try{if("string"==typeof e.data)try{t.data=JSON.parse(e.data)}catch(n){t.data=e.data}else t.data=e.data;t.url=this.getEventSourceUrl(e.target),t.type=e.type,t.id=e.lastEventId}catch(n){t={data:e.data,url:e.target?this.getEventSourceUrl(e.target):void 0,type:e.type,id:e.lastEventId}}this.sendEventSourceEvent(t)},e.prototype.handleEventSourceError=function(e){var t,n,i,r;try{var o={url:this.getEventSourceUrl(e.target),type:e.type,readyState:this.getEventSourceReadyState(e.target),errorMessage:e.message||"EventSource error occurred",errorType:"EventSourceError",networkType:(null===(t=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===t?void 0:t.type)||"unknown",networkEffectiveType:(null===(n=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===n?void 0:n.effectiveType)||"unknown",networkDownlink:null===(i=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===i?void 0:i.downlink,networkRtt:null===(r=null===navigator||void 0===navigator?void 0:navigator.connection)||void 0===r?void 0:r.rtt,userAgent:null===navigator||void 0===navigator?void 0:navigator.userAgent}}catch(t){o={url:this.getEventSourceUrl(e.target),type:"error",error:"Failed to process EventSource error event: ".concat(t instanceof Error?t.message:String(t)),originalEvent:e}}this.sendEventSourceEvent(o)},e.prototype.handleEventSourceClose=function(e){this.sendEventSourceEvent({url:e,type:"close"})},e.prototype.sendWebSocketEvent=function(e,t,n,i){var r;void 0===n&&(n={}),void 0===i&&(i=!1);try{var o=null===(r=this.core.getConfig())||void 0===r?void 0:r.evtStreamTrackingConfiguration;if(null!=o&&o.enabled){var a=this.getStreamCountState(t.url),l=bt("send"===e?bt(bt({},t),n):bt({},t),{event:e}),s=Te(o.collect,o.block,l,t.url);if(null!=s&&s.result){var c=null==s?void 0:s.matchedConfig;if(!0===(null==c?void 0:c.count)&&(a.tokenCount++,null==s||!s.shouldSend))return;var u={url:t.url,id:t.id,type:t.type,event:e};if(!0===(null==c?void 0:c.countReset)&&(0this.eventMaxLimit)||(this.circuitBreakerUntil=e+this.cooldown,this.breakerPreviouslyOpen=!0,this.droppedCount++,!1))},e.prototype.updateErrortRateLimitConfig=function(e,t,n){this.eventMaxLimit=e,this.cooldown=t,this.timeWindow=n},e}(),fo=function(e,t){return e.length>t?"".concat(e.slice(0,t-3),"..."):e},vo={idleWindowMs:600,requireLcp:!1,lcpTimeoutMs:3e3,maxMeasurementMs:1e4,includeHashChanges:!1,domainAllowlist:[],domainBlocklist:["sdk.fra-01.braze.eu","tr.snapchat.com","analytics.google.com","ams.creativecdn.com","analytics.tiktok.com"]},go=bt({},vo),ho=null,po=null,mo=null,yo=null,bo=!1,wo=!1,_o=new Set,ko=new Set,Co=0,Eo=[],To=i((function e(){t(this,e),o(this,"t",void 0),o(this,"o",0),o(this,"i",[])}),[{key:"u",value:function(e){var t;if(!e.hadRecentInput){var n=this.i[0],i=this.i.at(-1);this.o&&n&&i&&1e3>e.startTime-i.startTime&&5e3>e.startTime-n.startTime?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),null===(t=this.t)||void 0===t||t.call(this,e)}}}]),So=function(){var e=performance.getEntriesByType("navigation")[0];if(e&&0"+n:v,r.id)break;t=r.parentNode}}catch(e){}return n},No=new WeakMap,Oo=-1,Io=function(e){addEventListener("pageshow",(function(t){t.persisted&&(Oo=t.timeStamp,e(t))}),!0)},xo=function(e,t,n,i){var r,o;return function(a){var l;0<=t.value&&(a||i)&&((o=t.value-(null!==(l=r)&&void 0!==l?l:0))||void 0===r)&&(r=t.value,t.delta=o,a=t.value,t.rating=a>n[1]?"poor":a>n[0]?"needs-improvement":"good",e(t))}},Lo=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},Mo=function(){var e,t=So();return null!==(e=null==t?void 0:t.activationStart)&&void 0!==e?e:0},Do=function(e){var t=1qo){var e,t=Mo(),n=document.prerendering||null===(e=globalThis.performance.getEntriesByType("visibility-state").filter((function(e){return"hidden"===e.name&&e.startTime>t}))[0])||void 0===e?void 0:e.startTime;qo=null!=n?n:"hidden"!==document.visibilityState||document.prerendering?1/0:0,addEventListener("visibilitychange",Bo,!0),addEventListener("prerenderingchange",Bo,!0),Io((function(){setTimeout((function(){qo="hidden"!==document.visibilityState||document.prerendering?1/0:0}))}))}return{get firstHiddenTime(){return qo},onHidden:function(e){Go.add(e)}}},Ho=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},jo=[1800,3e3],Fo=function(e){var t=1o.value&&(o.value=a.o,o.entries=a.i,i())},s=Po("layout-shift",l);s&&(i=xo(e,o,Vo,t.reportAllChanges),n.onHidden((function(){l(s.takeRecords()),i(!0)})),Io((function(){a.o=0,o=Do("CLS",0),i=xo(e,o,Vo,t.reportAllChanges),Lo((function(){return i()}))})),setTimeout(i))})))}((function(t){t=function(e){var t={};if(e.entries.length){var n,r=e.entries.reduce((function(e,t){return e.value>t.value?e:t}));null!=r&&null!==(n=r.sources)&&void 0!==n&&n.length&&(n=Wo(r.sources))&&(t={largestShiftTarget:i.get(n),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:n,largestShiftEntry:r,loadState:Ao(r.startTime)})}return Object.assign(e,{attribution:t})}(t),e(t)}),t)},Zo=0,Jo=1/0,Yo=0,Xo=function(e){var t;e=r(e);try{for(e.s();!(t=e.n()).done;){var n=t.value;n.interactionId&&(Jo=Math.min(Jo,n.interactionId),Yo=Math.max(Yo,n.interactionId),Zo=Yo?(Yo-Jo)/7+1:0)}}catch(t){e.e(t)}finally{e.f()}},Qo=function(){var e;return Zr?Zo:null!==(e=performance.interactionCount)&&void 0!==e?e:0},$o=0,ea=i((function e(){t(this,e),o(this,"l",[]),o(this,"h",new Map),o(this,"m",void 0),o(this,"p",void 0)}),[{key:"v",value:function(){$o=Qo(),this.l.length=0,this.h.clear()}},{key:"M",value:function(){var e=Math.min(this.l.length-1,Math.floor((Qo()-$o)/50));return this.l[e]}},{key:"u",value:function(e){var t;if(null!==(t=this.m)&&void 0!==t&&t.call(this,e),e.interactionId||"first-input"===e.entryType){var n=this.l.at(-1);if((t=this.h.get(e.interactionId))||10>this.l.length||e.duration>n.T){var i;if(t?e.duration>t.T?(t.entries=[e],t.T=e.duration):e.duration===t.T&&e.startTime===t.entries[0].startTime&&t.entries.push(e):(t={id:e.interactionId,entries:[e],T:e.duration},this.h.set(t.id,t),this.l.push(t)),this.l.sort((function(e,t){return t.T-e.T})),10=t||e.includes(n)}));var s,u=new Set,f=r(o);try{for(f.s();!(s=f.n()).done;){var v,g=s.value,h=r(d(g.startTime,g.processingEnd));try{for(h.s();!(v=h.n()).done;)u.add(v.value)}catch(e){h.e(e)}finally{h.f()}}}catch(e){f.e(e)}finally{f.f()}var p=i.length-1-50;i=i.filter((function(e,t){return e.startTime>a&&t>p||u.has(e)})),c=!1};n.m=function(e){var t=e.startTime+e.duration;a=Math.max(a,e.processingEnd);for(var n=o.length-1;0<=n;n--){var i=o[n];if(8>=Math.abs(t-i.renderTime)){var r=i;r.startTime=Math.min(e.startTime,r.startTime),r.processingStart=Math.min(e.processingStart,r.processingStart),r.processingEnd=Math.max(e.processingEnd,r.processingEnd),r.entries.push(e);break}}r||(r={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:t,entries:[e]},o.push(r)),(e.interactionId||"first-input"===e.entryType)&&l.set(e,r),c||(ta(u),c=!0)},n.p=function(e){if(!s.get(e)){var n,i,r,o=e.entries[0].target;if(o)o=null!==(n=null===(i=(r=t).generateTarget)||void 0===i?void 0:i.call(r,o))&&void 0!==n?n:Ro(o),s.set(e,o)}};var d=function(e,t){var n,o=[],a=r(i);try{for(a.s();!(n=a.n()).done;){var l=n.value;if(!(l.startTime+l.durationt)break;o.push(l)}}}catch(e){a.e(e)}finally{a.f()}return o},f=function(e){var t=e.entries[0],i=l.get(t),o=t.processingStart,a=Math.max(t.startTime+t.duration,o),c=Math.min(i.processingEnd,a);i=i.entries.sort((function(e,t){return e.processingStart-t.processingStart}));var u=d(t.startTime,c),f=n.h.get(t.interactionId);return function(e,t){if(null!==(t=e.longAnimationFrameEntries)&&void 0!==t&&t.length){t=e.interactionTime;var n,i,o,a=e.inputDelay,l=e.processingDuration,s=0,c=0,u=0,d=0,f=r(e.longAnimationFrameEntries);try{for(f.s();!(o=f.n()).done;){var v=o.value;c=c+v.startTime+v.duration-v.styleAndLayoutStart;var g,h=r(v.scripts);try{for(h.s();!(g=h.n()).done;){var p=g.value,m=p.startTime+p.duration;if(!(md&&(i=p.startTime=t+a+l?"presentation-delay":"processing-duration",n=p,d=y)}}}catch(e){h.e(e)}finally{h.f()}}}catch(e){f.e(e)}finally{f.f()}(o=(o=e.longAnimationFrameEntries.at(-1))?o.startTime+o.duration:0)>=t+a+l&&(u=e.nextPaintTime-o),n&&i&&(e.longestScript={entry:n,subpart:i,intersectingDuration:d}),e.totalScriptDuration=s,e.totalStyleAndLayoutDuration=c,e.totalPaintDuration=u,e.totalUnattributedDuration=e.nextPaintTime-t-s-c-u}}(t={interactionTarget:s.get(f),interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:a,processedEventEntries:i,longAnimationFrameEntries:u,inputDelay:o-t.startTime,processingDuration:c-o,presentationDelay:a-c,loadState:Ao(t.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0}),Object.assign(e,{attribution:t})};Po("long-animation-frame",(function(e){i=i.concat(e),c||(ta(u),c=!0)})),function(e){var t=1t.length&&Array.isArray(t[0])&&(t=[{},t[0]]),i(e[0],t)})))}var o;if("string"==typeof e[0]&&E(e[1])&&(void 0===e[2]||Array.isArray(e[2]))){var a=e[0],l=e[1],u=e[2];if(null===(o=e[3])||void 0===o||o){var f=s.setTimeout((function(){n(a)}),5e3);v[a]={timeout:f}}(f=c.createElement("script")).setAttribute("src",a),f.setAttribute("async","1"),ne(f,"error",(function(){n(a),Gt.warn("Failed to load plugin ".concat(l[0]," from ").concat(a))}),!0),ne(f,"load",(function(){var e=l[1],i=s[l[0]];if(i&&"object"==typeof i){var o=i[e];e=d(i,["symbol"==typeof e?e:e+""]),p.addPlugin.apply(null,[{plugin:o.apply(null,u)},t]),r(e)}n(a)}),!0),c.head.appendChild(f)}else{if("object"==typeof e[0]&&"string"==typeof e[1]&&(void 0===e[2]||Array.isArray(e[2]))){var h=e[0],m=e[1];if(o=e[2],h)return e=h[m],h=d(h,["symbol"==typeof m?m:m+""]),null===(f=p.addPlugin)||void 0===f||f.apply(null,[{plugin:e.apply(null,o)},t]),void r(h)}Gt.warn("Failed to add Plugin: ".concat(e[1]))}}function l(){for(var t=[],r=0;r