t.contentsquare.net
Open in
urlscan Pro
3.167.163.10
Public Scan
URL:
https://t.contentsquare.net/uxa/b24c098d64f69.js
Submission: On October 03 via api from IT — Scanned from IT
Submission: On October 03 via api from IT — Scanned from IT
Form analysis
0 forms found in the DOMText Content
var CS_CONF={"isSMB":false,"projectId":4459,"status":1,"hostnames":["samsung.com"],"crossDomainTracking":0,"crossDomainSingleIframeTracking":0,"consentRequired":0,"allowSubdomains":1,"visitorCookieTimeout":34164000000,"sampleRate":100,"replayRecordingRate":10,"validationRate":10,"lastTrackingDraw":null,"trackerDomain":"c.contentsquare.net","recordingDomain":"r.contentsquare.net","useMalkaPipeline":1,"ed":"l.contentsquare.net/log/web","eMerchandisingEnabled":0,"mouseMoveHeatmapEnabled":1,"autoInsightsEnabled":0,"jsErrorsEnabled":1,"customErrorsEnabled":1,"jsCustomErrorsEnabled":0,"apiErrorsEnabled":1,"customHashIdEnabled":1,"recordingEncryptionEnabled":0,"recordingEncryptionPublicKey":null,"recordingEncryptionPublicKeyId":0,"secureCookiesEnabled":0,"triggerSessionReplayEnabled":0,"triggerSessionReplayRegex":null,"dynamicIdRegex":null,"whitelistedAttributes":[],"replayRecordingUnmaskedUrlRegex":null,"replayRecordingUnmaskedUrlRegexRules":[],"replayRecordingMaskedUrlRegexRules":[],"replayRecordingMaskedUrlRegex":".*(\\/orderConfirmation\\/|\\/multi\\/delivery-address\\/|\\/my-account\\/).*","anonymisationMethod":"replayRecordingMaskedUrlRegex","tagDeploymentMode":"CONTENTSQUARE","experimental":null,"iframesTracking":0,"textVisibilityEnabled":0,"cookielessTrackingEnabled":0,"malkaUrlEnabled":0,"malkaEtrEnabled":0,"pathComputationRules":{"reliableSelectors":[],"uniqueAttributes":[],"uniqueCssSelectors":[]},"asyncSerializerEnabled":1,"pendingInactivityTimeout":5000,"accessibilityEnabled":0,"uxaDomain":"app.contentsquare.com","webviewsTrackingEnabled":0,"useStaticResourceManager":1,"performanceTimingOptions":{"withResource":false,"withNavigation":false},"replayConsentRequiredForSession":0,"eventsApiEnabled":0,"apiErrors":{"validCustomHeaders":[],"plainCustomHeaders":[],"validUrls":[],"configurableApiErrorRules":[],"collectStandardHeaders":0,"collectQueryParam":0,"collectRequestBody":0,"collectResponseBody":0,"collectionRules":[]},"customErrors":{"consoleMessageLogLevels":[]},"displayAdOptions":null,"taskSchedulerOptions":{"enabled":1},"malkaQuotaServiceDomain":"q-aeu1.contentsquare.net","malkaRecordingDomain":"k-aeu1.contentsquare.net","staticResourceManagerDomain":"srm.ba.contentsquare.net","voc":{"siteId":null,"enabled":0}}; ; var CS_INTEGRATIONS_CONF = {"medallia":{}}; /* integration-medallia 2.14.1 */ !function(e){var n={};function t(i){if(n[i])return n[i].exports;var a=n[i]={i:i,l:!1,exports:{}};return e[i].call(a.exports,a,a.exports,t),a.l=!0,a.exports}t.m=e,t.c=n,t.d=function(e,n,i){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:i})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(t.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)t.d(i,a,function(n){return e[n]}.bind(null,a));return i},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=1)}([function(e){e.exports=JSON.parse('{"name":"@contentsquare/integration-medallia-contentsquare","version":"2.14.1","scripts":{"build:snippet":"webpack"}}')},function(e,n,t){"use strict";function i(e,n){try{e()}catch(e){window._uxa=window._uxa||[],_uxa.push(["logSnippetError",n,e.message])}}function a(e){return"object"==typeof e&&null!==e}function o(e,n,t){if((t=t||window)&&n&&e){var i=!1,a=t[e];a?n():Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:function(){return a},set:function(e){a=e,i||(i=!0,n())}})}}t.r(n);const r=t(0);let c,d=r.name,u=r.version;const s=function(e){var n,t,a,o;if(i((function(){var i=e.name;a=e.version;var r=i.replace("@contentsquare/integration-","");n=r+"-"+a;var c="-contentsquare";o=new RegExp(c+"$").test(r),t=r.replace(/-contentsquare([^-contentsquare]*)$/,"$1"),o||(c="-cap",o=new RegExp(c+"$").test(r),t=r.replace(/-cap([^-cap]*)$/,"$1"))}),"Shared-Function-readPackageJSON"),o)return{snippetBuildName:n,parameterName:t,snippetVersion:a}}(r);s&&(c=s.parameterName,d=s.snippetBuildName,u=s.snippetVersion),i((function(){window._uxa=window._uxa||[],CS_CONF.integrations=CS_CONF.integrations||[],CS_CONF.integrations.push("Medallia - v"+u);const e=function(e,n){if(a(window.CS_INTEGRATIONS_CONF)&&a(window.CS_INTEGRATIONS_CONF[e]))return window.CS_INTEGRATIONS_CONF[e][n]}(c,"settings");let n=!1,t=!1,r=!1,s=!1,l="";e&&(e.indexOf("sendArtificialPageviews")>-1&&(n=!0),e.indexOf("sendPageEvents")>-1&&(t=!0),e.indexOf("setReplayLinkToFirstPV")>-1&&(l=0),e.indexOf("disallowOpenEndedQuestions")>-1&&(r=!0),e.indexOf("sendIDToCS")>-1&&(s=!0));let f=!1;function p(e,i,a,o){if(e="FB_MD_"+e,_uxa.push(["trackDynamicVariable",{key:e,value:i}]),t){const n=e+" | "+i;_uxa.push(["trackPageEvent",n])}f&&"etr"===a&&_uxa.push(["trackEventTriggerRecording","@ETS@"+e]),o&&n&&_uxa.push(["trackPageview",window.location.pathname+"?"+o])}function _(e){!function(e,n,t){t=t||window;var i=e.split(".");if(1==i.length)o(e,n,t);else{var a=t,r=0;const e=function(){a=r>0?a[i[r-1]]:window,++r>=i.length?o(i[r-1],n,a):o(i[r-1],e,a)};e()}}("MDIGITAL",(function(){i((function(){window.addEventListener("MDigital_Feedback_Button_Clicked",(function(e){i((function(){if(e&&e.detail&&e.detail.Form_ID){p("Feedback Button Clicked","Survey ID : "+e.detail.Form_ID.toString())}}),d)})),window.addEventListener("MDigital_Invite_Displayed",(function(e){i((function(){if(e&&e.detail&&e.detail.Form_ID){const n=e.detail.Form_ID.toString();p("Feedback Invite Displayed","Survey ID : "+n,0,"cs_medallia=feedback_invite_displayed_"+n)}}),d)})),window.addEventListener("MDigital_Invite_Accepted",(function(e){i((function(){if(e&&e.detail&&e.detail.Form_ID){p("Feedback Invite Accepted","Survey ID : "+e.detail.Form_ID.toString())}}),d)})),window.addEventListener("MDigital_Form_Displayed",(function(e){i((function(){if(e&&e.detail&&e.detail.Form_ID){const n=e.detail.Form_ID.toString();p("Feedback Displayed","Survey ID : "+n,0,"cs_medallia=feedback_displayed_"+n)}}),d)})),window.addEventListener("MDigital_Submit_Feedback",(function(e){i((function(){if(e&&e.detail){const n=e.detail;if(n.Feedback_UUID&&n.Form_ID&&n.Form_Type){const e=n.Form_ID.toString(),t=n.Feedback_UUID,i=n.Form_Type;p("Feedback Submitted","Survey ID : "+e,"etr","cs_medallia=feedback_submitted_"+e),p("Feedback UUID",t),p("Form Type",i)}if(n.Content)for(let e=0;e<n.Content.length;e++){const t=n.Content[e].value,i=n.Content[e].type,a=n.Content[e].unique_name,o=n.Content[e].id;let c=a;if(s&&(c=o),i)if(i.toLowerCase().indexOf("grading")>-1||i.toLowerCase().indexOf("nps")>-1){if(!isNaN(t)){const i=parseInt(t);isNaN(i)||(n.Content[e].type.toLowerCase().indexOf("nps")>-1?p("NPS Rating "+c,i):p("Rating "+c,i))}}else if("select"===i||"radio"===i){if("object"==typeof t){let e=t.label;s&&(e=t.selection_id.toString()),e&&p(c,e)}}else r||"textInput"!==i&&"textArea"!==i||t&&p(c,t)}}}),d)})),setTimeout((function(){if(f=_uxa.push(["isRecording"]),f){const n=function(e,n,t){e||(e="missingFromDynamicSnippet");var i=n;if(isNaN(i)&&(n=0),t){var a=t.sessionKey.split("."),o=t.projectId,r=a[0],c=a[1],d=t.pageNumber,u=d-n;return n>=d&&(u=d),0===i&&(u=1),"https://app.contentsquare.com/quick-playback/index.html?pid="+o+"&uu="+r+"&sn="+c+"&pvid="+u+"&recordingType=cs&vd="+e}}("md",l,e);n&&(window.ClickTale||(window.ClickTale={}),ClickTale.KampyleLink=n,CS_CONF.integrations_handler=CS_CONF.integrations_handler||{},CS_CONF.integrations_handler.medallia=n)}}),500)}),d)}))}let g=!1;_uxa.push(["afterPageView",function(e){i((function(){!function(e){g||(g=!0,_(e))}(e)}),d)}])}),d)}]);; ; (()=>{"use strict";var t={d:(s,e)=>{for(var i in e)t.o(e,i)&&!t.o(s,i)&&Object.defineProperty(s,i,{enumerable:!0,get:e[i]})},o:(t,s)=>Object.prototype.hasOwnProperty.call(t,s),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},s={};function e(t,s){let e;return window.Zone&&"function"==typeof window.Zone.__symbol__&&(e=t[window.Zone.__symbol__(s)]),e||(e=t[s]),e}t.r(s),t.d(s,{getRequestParameters:()=>Lh});const i="cs-native-frame",n={navigatorProperties:[{propertyName:"sendBeacon",binding:navigator}],nodeProperties:["childNodes","parentNode","nextSibling","firstChild"],elementProperties:["shadowRoot"],elementPropertiesValues:["matches","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector"],eventProperties:["target"],imageProperties:["src"],constructors:{Date:"csDate",JSON:"csJSON",Array:"csArray",String:"csString",URL:"csURL",MutationObserver:"csMutationObserver",screen:"csScreen"}};function r(t,s,e){const i=function(t,s){let e,i=t;for(;i&&!(e=Object.getOwnPropertyDescriptor(i,s));)i=Object.getPrototypeOf(i);return e}(t,s);if(!i)return function(){return this[s]};switch(e){case"get":return i.get;case"set":return i.set;case"value":return i.value}}function o(t){Object.keys(n.constructors).forEach((s=>{window[n.constructors[s]]=t[s]instanceof Function&&null==t[s].prototype?t[s].bind(window):t[s]})),function(t){window.csquerySelector={1:t.Element.prototype.querySelector,9:t.Document.prototype.querySelector,11:t.DocumentFragment.prototype.querySelector},window.csquerySelectorAll={1:t.Element.prototype.querySelectorAll,9:t.Document.prototype.querySelectorAll,11:t.DocumentFragment.prototype.querySelectorAll}}(t),("Prototype"in window||/^((?!chrome|android).)*safari/i.test(navigator.userAgent))&&(window.csMutationObserver=window.WebKitMutationObserver||window.MutationObserver),h("csNode",n.nodeProperties,t.Node.prototype,"get"),h("csElement",n.elementProperties,t.Element.prototype,"get"),h("csElement",n.elementPropertiesValues,t.Element.prototype,"value",!1),h("csHTMLImageElement",n.imageProperties,t.HTMLImageElement.prototype,"set"),h("csEvent",n.eventProperties,t.Event.prototype,"get"),h("csNavigator",n.navigatorProperties,t.navigator,"value")}function h(t,s,e,i,n=!0){s.forEach((s=>{const o="string"!=typeof s&&"binding"in s,h=o?s.propertyName:s;(n||h in e)&&(window[`${t+h}`]=r(e,h,i),o&&(window[`${t+h}`]=window[`${t+h}`].bind(s.binding)))}))}function c(t,s){window.CSProtectnativeFunctionsLogs=window.CSProtectnativeFunctionsLogs||{},window.CSProtectnativeFunctionsLogs[t]=s}if(window.csSetTimeout=e(window,"setTimeout"),window.csQueueMicrotask=e(window,"queueMicrotask"),window.csClearTimeout=e(window,"clearTimeout"),(()=>{var t;let s=0;function e(t){return"$$"+t+ ++s}e.for=e,window.csSymbol=null!==(t=window.Symbol)&&void 0!==t?t:e})(),!function(){try{const t=function(){const t=document.createElement("iframe");t.id=i,t.setAttribute("hidden",""),t.setAttribute("title","Intentionally blank"),t.setAttribute("sandbox","allow-same-origin");const s=document.createElement("cs-native-frame-holder");if(s.setAttribute("hidden",""),document.body.appendChild(s),Boolean(Element.prototype.attachShadow)){const e=s.attachShadow({mode:"closed"});return e.innerHTML=t.outerHTML,e.firstElementChild.contentWindow}return s.innerHTML=t.outerHTML,s.firstElementChild.contentWindow}();return!!t&&(window.CSPureWindow=t,o(window.CSPureWindow),!0)}catch(t){return c("Warning",`failed to copy references from pure iframe: ${t.message}`),!1}}())try{o(window)}catch(bo){c("Critical",`failed to copy references from window: ${bo.message}`)}function a(t){return u(csString.prototype.toLowerCase.call(t.localName))}function u(t){return csString.prototype.replace.call(t,/([#;&,.+*~':"!^$[\]()<=>|/%?@`{}\\ ])/g,"\\$1")}function l(t){return 1===t.nodeType}function d(t){return 3===t.nodeType}function f(t){return l(t)&&"link"===t.localName}function p(t){return l(t)&&"a"===t.localName}function v(t){return f(t)&&-1!==csString.prototype.indexOf.call(t.rel,"stylesheet")}function m(t){return l(t)&&"style"===t.localName}function g(t){return l(t)&&"input"===t.localName}function w(t){return l(t)&&"textarea"===t.localName}function y(t){return l(t)&&"script"===t.localName}function E(t){return l(t)&&"ownerSVGElement"in t}function A(t){return l(t)&&"select"===t.localName}function _(t){switch(t.nodeType){case 9:case 11:case 1:return!0;default:return!1}}function R(t){return 9===t.nodeType}function S(t){return function(t){switch(t.nodeType){case 9:case 11:return!0;default:return!1}}(t)&&"host"in t&&"mode"in t}function T(t){return l(t)&&!!csElementshadowRoot.apply(t)&&S(csElementshadowRoot.apply(t))}const I=["annotation-xml","color-profile","font-face","font-face-src","font-face-uri","font-face-format","font-face-name","missing-glyph"];const P="detached";function b(t){let s=t;const e=[s];for(;null!==csNodeparentNode.apply(s);)s=csNodeparentNode.apply(s),csArray.prototype.push.call(e,s);return V(s)&&csArray.prototype.push.call(e,P),{ancestors:e,selectionRoot:s}}function V(t){return q.isValidElement(t)}const C=window.csElementmatches||window.csElementmatchesSelector||window.csElementmozMatchesSelector||window.csElementmsMatchesSelector||window.csElementoMatchesSelector||window.csElementwebkitMatchesSelector;function N(t,s){return!!s&&csArray.prototype.some.call(s,(s=>C.call(t,s)))}const O=[/\d{4}/,/^ember\d+$/],k="data-cs-override-id",x="data-cs-dynamic-id";function $(t,s,e,i){const n=i.dynamicIdRegex||null,r=i.dynamicElementNameRegex;let o=a(t);if(r){r.test(t.localName)&&(o=csString.prototype.replace.call(o,r,"$1@"))}if(function(t,s){const e=L(t);return e&&csString.prototype.match.call(e,/^[\w-]+$/)&&D(k,e,s)}(t,e)){const s=L(t);return{hasUniqueIdentifier:!0,elementSelector:`${o}[${k}="${s}"]`}}const h=function(t,s,e){if(!e.uniqueAttributes)return{success:!1};for(const i of e.uniqueAttributes){const e=t.getAttribute(i);if(null!==e){if(D(i,e,s))return{attributeName:i,attributeValue:e,success:!0}}}return{success:!1}}(t,e,i);if(h.success)return{hasUniqueIdentifier:!0,elementSelector:`${o}#UA[${h.attributeName}="${h.attributeValue}"]`};const c=function(t,s,e){if(!e.uniqueCssSelectors)return;for(const i of e.uniqueCssSelectors)if(C.call(t,i)&&M(i,s))return i;return}(t,e,i);if(c)return{hasUniqueIdentifier:!0,elementSelector:`${o}#UCS[${c}]`};const l=function(t){const s=t.getAttribute("id");return s?u(s):s}(t);if(function(t,s,e,i){return s&&!function(t){return null!==L(t)}(t)&&!function(t,s,e){return t.hasAttribute(x)||function(t,s){let e=!1;t&&s&&(e=s.test(t));return t&&(csArray.prototype.some.call(O,(s=>s.test(t)))||e)}(s,e)}(t,s,i)&&function(t,s){return t&&D("id",t,s)}(s,e)}(t,l,e,n))return{hasUniqueIdentifier:!0,elementSelector:`${o}#${l}`};const d=function(t,s){if(!s.reliableSelectors)return;for(const e of s.reliableSelectors)if(C.call(t,e))return e;return}(t,i);if(d){const e=function(t,s,e){if(t===P||9===t.nodeType)return 0;let i=0,n=s.previousElementSibling;for(;n;)C.call(n,e)&&(i+=1),n=n.previousElementSibling;return i}(s,t,d);return{hasUniqueIdentifier:!1,elementSelector:`${o}[${d}](${e})`}}const f=function(t,s,e){if(t===P||9===t.nodeType)return 0;const i=e.dynamicElementNameRegex,n=!!(null==i?void 0:i.test(s.localName)),r=a(s);let o=0,h=s.previousElementSibling;for(;h;)(a(h)===r||n&&(null==i?void 0:i.test(h.localName)))&&!N(h,e.reliableSelectors)&&(o+=1),h=h.previousElementSibling;return o}(s,t,i);return{hasUniqueIdentifier:!1,elementSelector:`${o}:eq(${f})`}}function L(t){return t.getAttribute(k)}function D(t,s,e){try{return 1===window.csquerySelectorAll[e.nodeType].call(e,`[${t}="${s}"]`).length}catch(t){if("SyntaxError"!==t.name)throw t}return!1}function M(t,s){try{return 1===window.csquerySelectorAll[s.nodeType].call(s,t).length}catch(t){if("SyntaxError"!==t.name)throw t}return!1}function U(t,s,e){const i=csArray.prototype.shift.call(t);if(0===t.length)return F(i,e);const n=i,r=t[0],{elementSelector:o,hasUniqueIdentifier:h}=$(n,r,s,e);if(!e.fullPath&&h){return`${F(t[t.length-1],e)}${o}`}const c=U(t,s,e);return`${c?`${c}>`:""}${o}`}function F(t,s){if(t===P)return"|detached|";if(t.host){const{ancestors:e,selectionRoot:i}=b(t.host);return`${U(e,i,s)}|shadow-root|`}return 11===t.nodeType?"|fragment|":""}var q;!function(t){function s(t){return!!t&&"localName"in t&&"getAttribute"in t&&"hasAttribute"in t&&"parentNode"in t}function e(t){return t&&"jquery"in t&&1===t.length?t[0]:t}t.INVALID_ELEMENT="INVALID_ELEMENT",t.isValidElement=s,t.getElementPath=function(i,n={fullPath:!1,dynamicIdRegex:null}){const r=e(i);if(r===document)return"";if(!s(r))return t.INVALID_ELEMENT;const{ancestors:o,selectionRoot:h}=b(r);return U(o,h,n)},t.getElementPathAndFirstAnchorParent=function(i,n={fullPath:!1,dynamicIdRegex:null}){const r=e(i);if(r===document)return{path:"",firstAnchorParent:null};if(!s(r))return{path:t.INVALID_ELEMENT,firstAnchorParent:null};const{firstAnchorParent:o,ancestors:h,selectionRoot:c}=function(t){let s=t;const e=[s];let i=null;for(;null!==csNodeparentNode.apply(s);)null===i&&p(s)&&(i=s),csArray.prototype.push.call(e,csNodeparentNode.apply(s)),s=csNodeparentNode.apply(s);return V(s)&&csArray.prototype.push.call(e,P),{firstAnchorParent:i,ancestors:e,selectionRoot:s}}(r);return{path:U(h,c,n),firstAnchorParent:o}}}(q||(q={})),window.CSPathComputation=window.CSPathComputation||q;const B=Number.MAX_SAFE_INTEGER||9007199254740991;function H(){}function j(t,s){return 0===csString.prototype.lastIndexOf.call(t,s,0)}const z=34164e6,G={percentage:()=>Math.floor(1e4*Math.random())/100,boolean(t){return this.percentage()<t},integer:(t=B)=>Math.floor(Math.random()*t)},Z=csSymbol("cachedJson");const W=void 0!==window.Symbol?function(t){if(t[Z])return t[Z];if(csArray.isArray(t)){if(0===t.length)return"[]";let s="["+W(t[0]);for(let e=1;e<t.length;e++)s+=","+W(t[e]);return s+="]"}return t[Z]=csJSON.stringify(t)}:csJSON.stringify;class J{constructor(t){var s,e,i,n;this.isSMB=t.isSMB,this.trackerDomain=t.trackerDomain,this.loggerDomain=t.ed,this.minLogLevel=t.logLevel,this.projectId=t.projectId,this.smbConf=t.smbConf,this.status=t.status,this.hostnames=t.hostnames,this.iframesTracking=!!t.iframesTracking,this.crossDomainTracking=!!t.crossDomainTracking,this.crossDomainSingleIframeTracking=!!t.crossDomainSingleIframeTracking,this.consentRequired=!!t.consentRequired,this.allowSubdomains=!!t.allowSubdomains,this.visitorCookieTimeout=t.visitorCookieTimeout||z,this.sampleRate=t.sampleRate,this.replayRecordingRate=t.replayRecordingRate,this.validationRate=t.validationRate,this.lastTrackingDraw=t.lastTrackingDraw||1,this.useHttps=!0,this.eMerchandisingEnabled=t.eMerchandisingEnabled,this.mouseMoveHeatmapEnabled=t.mouseMoveHeatmapEnabled,this.jsErrorsEnabled=t.jsErrorsEnabled,this.apiErrors={enabled:null!==(s=t.apiErrorsEnabled)&&void 0!==s?s:0,...t.apiErrors},this.customErrors={enabled:null!==(e=t.customErrorsEnabled)&&void 0!==e?e:0,...t.customErrors},this.jsCustomErrorsEnabled=t.jsCustomErrorsEnabled,this.triggerSessionReplayEnabled=t.triggerSessionReplayEnabled,this.triggerSessionReplayRegex=this.t(t.triggerSessionReplayRegex),this.dynamicIdRegex=t.dynamicIdRegex?new RegExp(t.dynamicIdRegex):null,this.whitelistedAttributes=t.whitelistedAttributes||[],this.replayRecordingUnmaskedUrlRegex=this.t(t.replayRecordingUnmaskedUrlRegex),this.replayRecordingMaskedUrlRegex=this.t(t.replayRecordingMaskedUrlRegex),this.replayRecordingMaskedUrlRegexRules=t.replayRecordingMaskedUrlRegexRules||null,this.replayRecordingUnmaskedUrlRegexRules=t.replayRecordingUnmaskedUrlRegexRules||null,this.anonymisationMethod=t.anonymisationMethod||null,this.tagDeploymentMode=t.tagDeploymentMode,this.dualCollectionTagDomain=t.dualCollectionTagDomain||null,this.ptcDomain=t.ptcDomain||null,this.ptcGuid=t.ptcGuid||null,this.secureCookiesEnabled=!!t.secureCookiesEnabled,this.ptcSha512=t.ptcSha512||null,this.ptcSnapshotPath=t.ptcSnapshotPath||null,this.emitDebugEvents=!1,this.malkaQuotaServiceDomain=t.malkaQuotaServiceDomain||null,this.staticResourceManagerDomain=t.staticResourceManagerDomain||null,this.malkaRecordingDomain=t.malkaRecordingDomain||null,this.textVisibilityEnabled=t.textVisibilityEnabled,this.experimental=t.experimental||{},this.malkaEtrEnabled=!!t.malkaEtrEnabled,this.malkaUrlEnabled=!!t.malkaUrlEnabled,this.cookielessTrackingEnabled=t.cookielessTrackingEnabled,this.customHashIdEnabled=!!t.customHashIdEnabled,this.encryptionEnabled=!!t.recordingEncryptionEnabled,this.encryptionPublicKey=t.recordingEncryptionPublicKey||null,this.pathComputationRules=t.pathComputationRules||{},t.pathComputationRules&&""===t.pathComputationRules.dynamicElementNameRegex&&(this.pathComputationRules.dynamicElementNameRegex=null),t.pathComputationRules&&t.pathComputationRules.dynamicElementNameRegex&&(this.pathComputationRules.dynamicElementNameRegex=new RegExp(t.pathComputationRules.dynamicElementNameRegex)),this.asyncSerializerEnabled=!!t.asyncSerializerEnabled,this.encryptionPublicKeyId=t.recordingEncryptionPublicKeyId,this.pendingInactivityTimeout=t.pendingInactivityTimeout||5e3,this.accessibilityEnabled=!!t.accessibilityEnabled,this.useStaticResourceManager=!!t.useStaticResourceManager,t.taskSchedulerOptions&&(this.taskSchedulerOptions={...t.taskSchedulerOptions,enabled:!!t.taskSchedulerOptions.enabled}),this.uxaDomain=t.uxaDomain,this.performanceTimingOptions=t.performanceTimingOptions,this.replayConsentRequiredForSession=!!t.replayConsentRequiredForSession,this.isWebView=!1,t.displayAdOptions&&t.displayAdOptions.length&&(this.displayAdOptions=t.displayAdOptions),t.voc&&(this.voc={...t.voc,enabled:!!t.voc.enabled}),t.heapEnvironment&&(this.heapEnvironment=t.heapEnvironment),t.implementations&&t.implementations.length&&(this.implementations=t.implementations),this.eventsApiEnabled=!!t.eventsApiEnabled,this.anonymizeDigits=null!==(i=t.anonymizeDigits)&&void 0!==i?i:null,this.anonymizeEmails=null!==(n=t.anonymizeEmails)&&void 0!==n?n:null,this.isHeapPresent=void 0!==window.heap}getTrackerUri(){return`${this.i()}://${this.trackerDomain}`}getRecordingUri(){return`${this.i()}://${this.malkaRecordingDomain}`}getQuotaServiceUri(){return`${this.i()}://${this.malkaQuotaServiceDomain}`}getLoggerUri(){return`${this.i()}://${this.loggerDomain}`}getStaticResourceManagerUri(){return`${this.i()}://${this.staticResourceManagerDomain}`}i(){return this.useHttps?"https":"http"}isProjectActive(){return 1===this.status}processOptionOverrides(t){t&&t.forEach&&t.forEach((([t,...s])=>{if("setOption"===t){const[t,e]=s;this.h(t,e)}}))}h(t,s){"trackerDomain"===t&&(this.trackerDomain=s),"loggerDomain"===t&&(this.loggerDomain=s),"malkaRecordingDomain"===t&&(this.malkaRecordingDomain=s),"malkaQuotaServiceDomain"===t&&(this.malkaQuotaServiceDomain=s),"staticResourceManagerDomain"===t&&(this.staticResourceManagerDomain=s),"minLogLevel"===t&&(this.minLogLevel=s),"useHttps"===t&&(this.useHttps=!!s),"isWebView"===t&&(this.isWebView=s)}t(t){return t?this.u(t):null}getRequestParameters(){return{pid:`${this.projectId}`}}updateDynamicFields(t,s){"emitDebugEvents"===t&&(this.emitDebugEvents=s),"minLogLevel"===t&&(this.minLogLevel=s)}u(t){try{const s=/^\/(.*)\/([gim]*)$/.exec(t);if(s){const[,t,e]=s;return new RegExp(`^${t}$`,e)}return new RegExp(`^${t}$`)}catch(t){return null}}isHeaderCollectionActive(){var t,s;return this.apiErrors.collectStandardHeaders||!!(null===(t=this.apiErrors.validCustomHeaders)||void 0===t?void 0:t.length)||!!(null===(s=this.apiErrors.plainCustomHeaders)||void 0===s?void 0:s.length)}isCsSideloadingHeap(){var t;return"cs_sideloads_heap"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)&&!this.isHeapPresent}isHeapSideloadsCsV5(){var t,s;const e="function"==typeof(null===(t=window.heap)||void 0===t?void 0:t.getUserId);return"heap_sideloads_cs"===(null===(s=this.heapEnvironment)||void 0===s?void 0:s.heap_tag_status)&&e}isCsCrosswritingHeap(){var t;return"cs_crosswrites_heap"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)}}class Q{constructor(t,s){this.A=t,this._=s}init(){this.R=this.A!==this.A.top,this.S=this._.isWebView&&this.A===this.A.top,this._.iframesTracking&&this.R||this.S?this.T=!1:this.T=!0}isInIframeContext(){return this.R}isTopWindowTracker(){return this.T}isInWebViewContext(){return this.S}}var Y,K;!function(t){t.debug="debug",t.warn="warn",t.error="error",t.critical="critical"}(Y||(Y={})),function(t){t.toQuery=function(t){return csArray.prototype.join.call(csArray.prototype.map.call(Object.keys(t),(s=>`${encodeURIComponent(s)}=${encodeURIComponent(t[s])}`)),"&")}}(K||(K={}));class X{constructor(t,s){this.domainUri=t,this.path=s,this.beforeRequestCallbacks=[],this.afterRequestCallbacks=[]}setRequestParametersProviders(...t){this.requestParametersProviders=t}before(t){csArray.prototype.push.call(this.beforeRequestCallbacks,t)}after(t){csArray.prototype.push.call(this.afterRequestCallbacks,t)}retrieveParameters(){return this.requestParametersProviders?csArray.prototype.reduce.call(csArray.prototype.map.call(this.requestParametersProviders,(t=>t.getRequestParameters())),((t,s)=>({...t,...s}))):{}}}class tt extends X{constructor(t,s){super(t,s)}send(){csArray.prototype.forEach.call(this.beforeRequestCallbacks,(t=>t()));const t=this.retrieveParameters();this.I(t);const s=K.toQuery(t);this.P(s),csArray.prototype.forEach.call(this.afterRequestCallbacks,(t=>t()))}P(t){const s=new window.Image(1,1);s.onload=H,s.onerror=H,csHTMLImageElementsrc.call(s,`${this.domainUri}${this.path?`/${this.path}`:""}?${t}`)}I(t){t.r=csString.prototype.slice.call(`${Math.random()}`,2,8)}}class st{constructor(t,s){this.V=t,this.C=s}init(){this.N=new tt(this.V.getLoggerUri()),this.N.setRequestParametersProviders(this,this.C)}send(t){this.O=t,this.N.send()}getRequestParameters(){return{a:this.O.app,l:this.O.level,m:this.O.message,s:this.O.stacktrace}}}const et=/[a-zA-Z0-9._%+-]+(?:@|%40|%2540)[a-zA-Z0-9.%-_]+((?:\.|%2[eE])[a-zA-Z0-9-]+)+/g,it=/[a-zA-Z0-9+_-](?:@|%40|%2540)/,nt="([-A-Za-z0-9+/=_]|=[^=]|={3,})+",rt=new RegExp(`(ey${nt}\\.ey${nt}\\.${nt})`,"g"),ot=/[0-9]{4}/,ht=/(^|[^a-zA-Z0-9*.,-])([45*][0-9*]{3}([ -]?)[0-9*]{4}\3[0-9*]{4}\3[0-9*]{4})($|[^a-zA-Z0-9*.,-])/g,ct="CS_ANONYMIZED_PII",at=/\d+/g,ut=/([+(]{0,2}\d[-_ ()/]{0,4}){9,}/,lt=/(?:\d{1,3}\.){3}\d{1,3}/,dt=/(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}/;var ft;!function(t){t.replaceEmail=function(t){return csString.prototype.replace.call(t,et,"CS_ANONYMIZED_EMAIL")},t.replaceJWT=function(t){return csString.prototype.replace.call(t,rt,"CS_ANONYMIZED_JWT")},t.replaceCreditCardNumber=function(t,s){return csString.prototype.replace.call(t,ht,s)},t.replaceDigits=function(t){return csString.prototype.replace.call(t,at,ct)},t.replaceNumberSequence=function(t){return csString.prototype.replace.call(t,ut,ct)},t.mayHaveIPAddress=function(t){return lt.test(t)||dt.test(t)},t.mayHaveNumberSequence=function(t){return ut.test(t)},t.mayHaveCreditCardNumber=function(t){return ot.test(t)},t.mayHaveEmail=function(t){return it.test(t)}}(ft||(ft={}));class pt{checkAndAnonymizePII(t,s,e){let i=this.anonymizeCreditCard(t);return!0===s?i=this.anonymizeAllDigits(i):!1===s&&(i=this.anonymizeNumberSequence(i)),!0!==e&&null!==e||(i=this.anonymizeEmail(i)),i}anonymizePII(t){return"string"==typeof t&&(t=this.anonymizeEmail(t)),t}anonymizeEmail(t){return ft.mayHaveEmail(t)?ft.replaceEmail(t):t}anonymizeAllDigits(t){return ft.replaceDigits(t)}anonymizeNumberSequence(t){return ft.replaceNumberSequence(t)}anonymizeCreditCard(t){return ft.mayHaveCreditCardNumber(t)?ft.replaceCreditCardNumber(t,((t,s,e,i,n)=>{if(-1===csString.prototype.indexOf.call(e,"*")){const s=i.length?csArray.prototype.join.call(csString.prototype.split.call(e,i),""):e;if(!this.$(s))return t}return`${s}${ct}${n}`})):t}$(t){const s=parseInt(t[t.length-1]);let e=0;for(let s=t.length-2;s>=0;s--){let i=parseInt(t[s]);s%2==0&&(i*=2),e+=Math.floor(i/10)+i%10}return 10-e%10===s}anonymizeJwt(t){return ft.replaceJWT(t)}anonymizeFields(t,s){return csArray.prototype.forEach.call(s,(s=>{t[s]=this.anonymizeEmail(t[s])})),t}}const vt="15.19.3";function mt(){return{v:vt}}function gt(t){return At(t)&&("number"==typeof t||t instanceof Number)&&!isNaN(t)}function wt(t){return t===parseInt(t,10)}function yt(t){return At(t)&&("string"==typeof t||t instanceof csString)}function Et(t){return"object"==typeof t}function At(t){return void 0!==t}function _t(t){return At(t)&&null!==t}function Rt(t){return"function"==typeof t}function St(t){return t instanceof Element}function Tt(t){return t instanceof Error}const It={now:()=>void 0!==window.performance&&window.performance.now?window.performance.timing.navigationStart+Math.round(window.performance.now()):csDate.now()};function Pt(){return Math.floor(It.now()/1e3)}function bt(){return"function"==typeof window.Promise}function Vt(){var t,s;return"function"==typeof(null===(t=window.navigation)||void 0===t?void 0:t.addEventListener)&&"function"==typeof(null===(s=window.navigation)||void 0===s?void 0:s.removeEventListener)}function Ct(t,s){return 0===csString.prototype.lastIndexOf.call(t,s,0)}function Nt(t,s){return-1!==csString.prototype.indexOf.call(t,s,t.length-s.length)}class Ot{constructor(t,s){this.L=t,this.D=s}getRequestParameters(){return{d:`${It.now()}`,p:this.D.anonymizePII(window.location.href),...this.L.getRequestParameters(),...mt()}}}const kt="snippet-",xt="implementation-snippet-";var $t,Lt;!function(t){t.IMPLEMENTATION="implementation",t.DYNAMIC="dynamic"}($t||($t={})),function(t){t[t.debug=0]="debug",t[t.warn=1]="warn",t[t.error=2]="error",t[t.critical=3]="critical"}(Lt||(Lt={}));class Dt{constructor(t,s,e){this.M=s,this.D=new pt,this.U=Lt[Y.warn],this.U=Lt[t.minLogLevel||Y.warn],this.N=e||new st(t,new Ot(t,this.D)),this.F={[Y.debug]:[],[Y.warn]:[],[Y.error]:[],[Y.critical]:[]},this.q={implementation:{},dynamic:{}},this.N.init()}send(t,s="",e=Y.warn){if(!this.B(e,s))return;csArray.prototype.push.call(this.F[e],s||"");const i={message:this.H(t,s),stacktrace:this.j(t),app:"uxa",level:e};this.N.send(i)}H(t,s){let e=Tt(t)?this.D.anonymizePII(t.message||t.toString()):t;return s&&(e+=` ErrorCode: ${s}`),e}j(t){return Tt(t)?`${t.stack||"No stacktrace"} ${this.G()}`:this.G()}G(){const t=this.M.getVisitorService(),s=null==t?void 0:t.getVisitor();if(!s)return"No context";const e=this.M.getSessionService(),i=e&&e.getSession(),n={userId:s.id,sessionNumber:s.visitsCount,pageNumber:i&&i.pageNumber};return csJSON.stringify(n)}B(t,s){if(Lt[t]<this.U)return!1;if(0===(null==s?void 0:csString.prototype.indexOf.call(s,xt,0)))return this.Z(s,$t.IMPLEMENTATION);if(0===(null==s?void 0:csString.prototype.indexOf.call(s,kt,0)))return this.Z(s,$t.DYNAMIC);const e=this.F[t];return!(e.length>=5)&&(!s||!csArray.prototype.some.call(e,(t=>t===s)))}Z(t,s){return t in this.q[s]?!(this.q[s][t]>=5)&&(this.q[s][t]+=1,!0):(this.q[s][t]=1,!0)}}const Mt="undefined"==typeof window,Ut="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:process;const Ft=!Mt&&document.createElement("a"),qt=/(:443|:80)$/;function Bt(t){return Ft?(Ft.href=t,Ft.href):""}function Ht(t){const s=Gt(t);return null===s?"":decodeURIComponent(s.hostname)}function jt(t,s){return csArray.prototype.some.call(s,(s=>Nt(t,`.${s}`)||t===s||""===s))}function zt(t){return csString.prototype.replace.call(t,qt,"")}function Gt(t){return Ft&&(Ct(t,"http://")||Ct(t,"https://"))?(Ft.href=t,{hash:Ft.hash,host:zt(Ft.host),hostname:Ft.hostname,href:Ft.href,origin:Ft.origin?Ft.origin:zt(`${Ft.protocol}//${Ft.host}`),pathname:(s=Ft.pathname,"/"===s[0]?s:`/${s}`),port:Ft.port,protocol:Ft.protocol,search:Ft.search}):null;var s}const Zt="CS_IFRAME_MESSAGE";var Wt,Jt,Qt,Yt;!function(t){t.AfterPageView="afterPageView",t.GetSessionKey="getSessionKey"}(Wt||(Wt={})),function(t){t.Parent="parent",t.Child="child"}(Jt||(Jt={})),function(t){t.Discovery="discovery",t.Stop="stop",t.RecordingStatus="recordingStatus",t.RecordingEvent="recordingEvent",t.EndOfBufferedMessages="endOfBufferedMessages",t.ChildLogMessage="childLogMessage",t.AnalysisEvent="analysisEvent",t.JavascriptError="javascriptError",t.ApiError="apiError",t.Assets="assets",t.DetailedApiError="detailedApiError",t.EmerchandisingMessage="emerchandisingMessage",t.Commands="commands",t.IntegrationCallback="integrationCallback",t.StaticResource="staticResource",t.TrackingContextResultMessage="trackingContextResultMessage",t.TrackingContextRequestMessage="trackingContextRequestMessage",t.CustomError="customError"}(Qt||(Qt={})),function(t){t.buildBaseMessage=function(t,s,e,i){const n={type:t,from:s,pid:e,signature:Zt};return void 0!==i&&i>=0&&(n.id=i),n},t.isMessageValid=function(t,s,e,i){const n=Ht(t.origin);return!!t.data&&!!t.data.type&&t.data.signature===Zt&&t.data.from===s&&t.data.pid===e&&jt(n,i)},t.sendPostMessage=function(t,s,e,i){i?t.postMessage(e,s,i):t.postMessage(e,s)},t.getNewChannelMessage=function(){return new MessageChannel},t.sendChannelMessage=function(t,s){t.postMessage(s)},t.closeChannelPort=function(t){t.close()}}(Yt||(Yt={}));class Kt{constructor(t){this.L=t}send(t,s="",e=Y.warn){const i={message:t,errorCode:s,level:e},n=Yt.buildBaseMessage(Qt.ChildLogMessage,Jt.Child,this.L.projectId);n.content=i,Yt.sendPostMessage(window.parent,"*",n)}}class Xt{setContext(t,s){this.W=t,this.J=s}getVisitorService(){return this.W}getSessionService(){return this.J}}const ts=["t.contentsquare.net","clicktale"];window.addEventListener("error",(t=>{"string"!=typeof t.filename||!csArray.prototype.some.call(ts,(s=>csString.prototype.indexOf.call(t.filename,s)>-1))||csString.prototype.indexOf.call(t.filename,"blob")>-1&&(null==t.message?void 0:csString.prototype.indexOf.call(t.message,"importScripts"))>-1||ss.critical(`Uncaught jsError: filename: ${t.filename} - lineno: ${t.lineno} - colno: ${t.colno} - message: ${t.message} `)}));class ss{constructor(){}static whiteListFilename(t){csArray.prototype.push.call(ts,t)}static setStrategy(t){ss.Y=t}static computeIsActive(t){ss.K=G.boolean(t),ss.K?ss.X=G.boolean(10):ss.X=!1}static isLoggingActive(){return ss.K}static getStrategy(){return ss.Y}static debug(t,s=""){ss.K&&this.Y.send(t,s,Y.debug)}static warn(t,s=""){ss.K&&this.Y.send(t,s,Y.warn)}static error(t,s=""){ss.K&&this.Y.send(t,s,Y.error)}static critical(t,s=""){this.Y.send(t,s,Y.critical)}static tryToExecute(t,s){return(...e)=>{try{const i=s(...e);return At(window.Promise)&&i instanceof window.Promise?i.then((t=>t),(s=>this.error(s,t))):i}catch(s){try{this.error(s,t)}catch{}}}}static isPerfLoggingActive(){return ss.X}}ss.K=!1,ss.X=!1;let es={debug(...t){},warn(...t){},error(...t){},critical(...t){},isPerfLoggingActive:()=>!1};const is=t=>(s,e,i)=>{const n=(null==e?void 0:e.toString())||"",r=t||`${s.constructor&&s.constructor.name}.${n}`;if(i){const t=i.value;i.value=function(...s){return ns(r,t.bind(this))(...s)}}};function ns(t,s){return(...e)=>{try{const i=s(...e);return At(window.Promise)&&i instanceof window.Promise?i.then((t=>t),(s=>es.error(s,t))):i}catch(s){try{es.error(s,t)}catch{}}}}let rs=!1;function os(){return(t,s,e)=>{const i=e.value;e.value=function(t,s){!1===(null==t?void 0:t.isTrusted)&&rs||i.call(this,t,s)}}}class hs{constructor(){this.tt=0}get length(){return this.tt}get isEmpty(){return!this.st}pushAll(t){for(let s=0;s<t.length;s++)this.push(t[s])}push(t){this.tt++,this.et?this.et=this.et[1]=[t,void 0]:this.et=this.st=[t,void 0]}pop(){if(!this.st)return null;this.tt--;const t=this.st[0];return this.st=this.st[1],this.st||(this.et=void 0),t}forEach(t){let s=this.st;for(;null==s?void 0:s.length;)t(s[0]),s=s[1]}clear(){this.tt=0,this.st=this.et=void 0}}let cs=50,as=.1;let us=!1;const ls=new hs;const ds=[];let fs=[];function ps(t){csArray.prototype.push.call(ds,t),performance.mark(`${t}-start`)}function vs(t){const s=performance.measure(t,`${t}-start`);if(!s)return;const e=s.duration;e>=as&&csArray.prototype.push.call(fs,{mName:t,mDuration:+e.toFixed(2)}),csArray.prototype.pop.call(ds),0===ds.length&&(e>cs&&ls.push(fs),fs=[])}function ms(t,s){return function(...e){if(!us)return t.apply(this,e);ps(s);const i=t.apply(this,e);return vs(s),i}}const gs=function(t){return function(s,e,i){const n=i.value;i.value=function(){if(!us)return i.value=n,n.apply(this,arguments);ps(t);const s=n.apply(this,arguments);return vs(t),s}}};function ws(t,s,e,i){var n,r=arguments.length,o=r<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(s,e,o):n(s,e))||o);return r>3&&o&&Object.defineProperty(s,e,o),o}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var ys,Es,As,_s;!function(t){function s(t){const s=new RegExp(`(^|;)[ ]*${t}=([^;]*)`).exec(document.cookie);return s?decodeURIComponent(s[2]):null}function e(s,e,n,r,o,h){const c=encodeURIComponent(`${e}`),a=n===t.CURRENT_DOMAIN?void 0:n,u=i(r);let l=`${s}=${c}${u?`;expires=${u.toUTCString()}`:""};path=/${_t(a)?`;domain=${a}`:""}`;return At(o)&&o!==As.NotSet&&(l=`${l};SameSite=${o}`),At(h)&&h===_s.Yes&&(l=`${l};Secure`),document.cookie=l,!0}function i(t){return gt(t)?new csDate(It.now()+t):t}function n(t,i){s(t)&&e(t,"",i,new csDate(0)),s(t)&&e(t,"",i,new csDate(0),As.None,_s.Yes)}t.CURRENT_DOMAIN="CURRENT_DOMAIN",t.get=s,t.set=e,t.toExpireDate=i,t.remove=n,t.isCookiePresent=function(){return document.cookie.length>0},t.getRootDomain=function(t,i){const r="_cs_root-domain";let o=s(r);if(null!==o&&"1"!==o)return o;const h=csString.prototype.split.call(window.location.hostname,".");let c=csArray.prototype.pop.call(h);for(;h.length&&(null===o||"1"===o);)c=csArray.prototype.join.call([csArray.prototype.pop.call(h),c],"."),e(r,c,c,void 0,t,i),o=s(r);return n(r,c),c}}(ys||(ys={})),function(t){t.browserIsSafariV12=function(){return window.navigator.vendor&&csString.prototype.indexOf.call(window.navigator.vendor,"Apple")>-1&&window.navigator.appVersion&&csString.prototype.indexOf.call(window.navigator.appVersion,"Version/12.")>-1}}(Es||(Es={})),function(t){t.None="None",t.Lax="Lax",t.NotSet="X"}(As||(As={})),function(t){t[t.Yes=1]="Yes",t[t.No=0]="No"}(_s||(_s={}));class Rs{constructor(t,s,e){this.L=t,this.it=s,this.nt=e,this.ot=!1,this.ht=As.NotSet,this.ut=_s.No}getSameSiteFlag(){return this.ht}getSecureFlag(){return this.ut}getDomain(){return this.lt}getRootDomain(){return this.ft}init(){if(this.L.cookielessTrackingEnabled)return;const t=this.vt(),s=this.gt();this.ot=this.wt(t,s),this.ot?(this.ht=t,this.ut=s):this.L.secureCookiesEnabled&&"https:"===this.it.getUrlProtocol()&&(this.ut=_s.Yes),this.ft=this.yt(),this.lt=this.Et(this.ft)}wt(t,s){return!Es.browserIsSafariV12()&&(ys.set(Rs.COOKIE_TEST_FOR_SAME_SITE,"Test same site",Rs.CURRENT_DOMAIN,void 0,t,s),!!ys.get(Rs.COOKIE_TEST_FOR_SAME_SITE)&&(ys.remove(Rs.COOKIE_TEST_FOR_SAME_SITE,Rs.CURRENT_DOMAIN),!0))}vt(){return"http:"===this.it.getUrlProtocol()?As.Lax:this.nt.isSameSiteNoneSecureNeeded()||this.L.crossDomainTracking?As.None:As.Lax}gt(){return"http:"===this.it.getUrlProtocol()?_s.No:this.L.secureCookiesEnabled||this.L.crossDomainTracking||this.nt.isSameSiteNoneSecureNeeded()?_s.Yes:_s.No}isSameSiteSupported(){return this.ot}set(t,s,e){const i=ys.toExpireDate(e);ys.set(t,s,this.lt,i,this.getSameSiteFlag(),this.getSecureFlag())}get(t){const s=new RegExp(`(^|;)[ ]*${t}=([^;]*)`).exec(document.cookie);return s?decodeURIComponent(s[2]):null}delete(t,s){const e=s||this.lt;ys.remove(t,e)}yt(){const t=this.nt.isSameSiteNoneSecureNeeded()&&this.isSameSiteSupported(),s=t?As.None:void 0,e=t?_s.Yes:void 0;return ys.getRootDomain(s,e)}Et(t){return this.L.allowSubdomains?t:ys.CURRENT_DOMAIN}}Rs.CURRENT_DOMAIN="CURRENT_DOMAIN",Rs.COOKIE_TEST_FOR_SAME_SITE="_cs_same_site";const Ss="_cs_t";class Ts{constructor(t,s){this.At=t,this.L=s,this._t=!1,this.Rt=!1}init(){if(!this.L.cookielessTrackingEnabled&&this.At.isTopWindowTracker()&&"cookie"in document){if(!this.At.isInIframeContext()&&ys.isCookiePresent())return this._t=!0,void(this.Rt=!1);if(ys.set(Ss,"1",ys.CURRENT_DOMAIN),null!==ys.get(Ss))return this._t=!0,this.Rt=!1,void ys.remove(Ss,ys.CURRENT_DOMAIN);ys.set(Ss,"1",ys.CURRENT_DOMAIN,void 0,As.None,_s.Yes),null!==ys.get(Ss)&&(this._t=!0,this.Rt=!0,ys.remove(Ss,ys.CURRENT_DOMAIN))}}areCookiesEnabled(){return this._t}isSameSiteNoneSecureNeeded(){return this.Rt}}class Is{constructor(t,s){this.L=t,this.nt=s}canTrack(){return this.L.isProjectActive()&&this.St()&&this.Tt()&&this.It()}canTrackInChild(){return this.L.isProjectActive()&&this.Pt()&&(this.Tt()||this.bt())}It(){return this.L.cookielessTrackingEnabled?function(){const t="CSSessionStorageTest";try{return sessionStorage.setItem(t,t),sessionStorage.getItem(t)===t&&(sessionStorage.removeItem(t),!0)}catch{return!1}}():this.nt.areCookiesEnabled()}Tt(){return jt(window.location.hostname,this.L.hostnames)}St(){return!this.Vt()&&this.Ct()}Pt(){return!this.Vt()&&this.Nt()}bt(){return j(window.location.href,"about:srcdoc")&&"about:"===window.location.protocol&&""===window.location.hostname}Vt(){return"visibilityState"in document&&"prerender"===document.visibilityState}Ct(){return this.Ot()&&this.kt()}Nt(){return this.Ot()}kt(){try{return!!window.localStorage}catch{return!1}}Ot(){return"pageXOffset"in window&&"pageYOffset"in window&&"onpagehide"in window&&"JSON"in window&&"parse"in window.csJSON&&"stringify"in window.csJSON&&"addEventListener"in window&&"removeEventListener"in window&&"Node"in window&&"filter"in csArray.prototype&&"forEach"in csArray.prototype&&"querySelectorAll"in document&&"now"in csDate&&"keys"in Object&&"performance"in window&&"Map"in window&&"Set"in window}}class Ps{constructor(t){this.xt=!1,this.$t=new Map,this.Lt=new Map,this.Dt=new Map,this.Mt="CS_WORKER_SIGNATURE";const s=`\n const algorithm = ${t.algorithm};\n const compressor = (${t.getCompressorSourceCode()})();\n (()=>{"use strict";var e;!function(e){e.UNCOMPRESSED="0",e.GZIP="2"}(e||(e={}));let t={debug(...e){},warn(...e){},error(...e){},critical(...e){},isPerfLoggingActive:()=>!1};class s{constructor(e){var t;this.queryParams={},this.headers={},this.handleRecoveredRequests=e=>{for(const t of e){const{metadata:e,events:s}=t;this.send(s,e)}},this.endpoint=e.endpoint,this.compressionOpts=e.compressionOpts,this.recoveryStorage=e.recoveryStorage,this.mandatoryParameters=null!==(t=e.mandatoryParameters)&&void 0!==t?t:[],this.worker=!!e.worker,this.recoveryStorage&&this.recoveryStorage.recover(this.handleRecoveredRequests)}setQueryParams(e){Object.keys(e).forEach((t=>{this.queryParams[t]=e[t]}))}removeQueryParams(e){e?e.forEach((e=>{delete this.queryParams[e]})):this.queryParams={}}send(s,r){const a=r||{...this.queryParams},o=!("ct"in a),i="string"!=typeof s&&!this.isArrayBuffer(s);"ct"in a||(this.compressionOpts&&o?a.ct=this.compressionOpts.compressionType:a.ct=e.UNCOMPRESSED);const n=i?JSON.stringify(s):s,h=Object.keys(a).map((e=>\`\${encodeURIComponent(e)}=\${encodeURIComponent(a[e])}\`)).join("&"),c=\`\${this.endpoint}?\${h}\`;!function(e,t){const s=e.length;for(let r=0;r<s;r++)if(t(e[r],r))return!0;return!1}(this.mandatoryParameters,(e=>null==a[e]))?this.compressionOpts&&o&&"string"==typeof n?this.compressionOpts.compressor(n,this.compressionOpts.compressionOutputType,(e=>this.doSend(c,a,e))):this.doSend(c,a,n):t.warn(\`[\${this.worker?"WORKER":"MAIN"}] All mandatory parameters are not present on \${c}\`)}onLoad(e){this.onLoadCallback=e}onError(e){this.onErrorCallback=e}onTimeout(e,t){this.onTimeoutCallback=e,this.timeout=t}abort(){this.abortCurrentXhrCall&&this.abortCurrentXhrCall()}setRequestHeader(e,t){this.headers[e]=t}getQueryParams(){return this.queryParams}isArrayBuffer(e){return e&&void 0!==e.byteLength}doSend(e,t,s){const r=new XMLHttpRequest,a=Object.keys(t).map((e=>\`\${encodeURIComponent(e)}=\${encodeURIComponent(t[e])}\`)).join("&");r.open("POST",e),r.onload=()=>{if(this.recoveryStorage&&this.recoveryStorage.recover(this.handleRecoveredRequests),this.onLoadCallback){const e={params:t,responseText:r.responseText,status:r.status};this.onLoadCallback(e)}},r.onerror=()=>{this.recoveryStorage&&this.recoveryStorage.save({key:a,metadata:t,events:s}),this.onErrorCallback&&this.onErrorCallback({params:t})},this.timeout&&this.onTimeoutCallback&&(r.timeout=this.timeout,r.ontimeout=()=>{this.onTimeoutCallback()}),this.abortCurrentXhrCall=()=>r.abort(),Object.keys(this.headers).forEach((e=>{r.setRequestHeader(e,this.headers[e])})),r.send(s)}}class r{constructor(e){this.maxStoredBytes=e,this.storageBytesUsed=0}addString(e){this.storageBytesUsed+=2*e.length}addArrayBuffer(e){this.storageBytesUsed+=e.byteLength}isThresholdReached(){return this.storageBytesUsed>this.maxStoredBytes}reset(){this.storageBytesUsed=0}}class a{constructor(e){this.ramStorage={},this.byteSizeCounter=new r(e)}save({key:e,metadata:t,events:s}){this.byteSizeCounter.isThresholdReached()||(this.byteSizeCounter.addString(e),"string"==typeof s?this.byteSizeCounter.addString(s):this.byteSizeCounter.addArrayBuffer(s),this.byteSizeCounter.isThresholdReached()||(this.ramStorage[e]={metadata:t,events:s}))}recover(e){const t=[];this.getStorageKeys().forEach((e=>{const s=this.ramStorage[e];void 0!==s&&(delete s.metadata.datatype,t.push(s),this.removeItem(e))})),0!==t.length&&(e(t),this.byteSizeCounter.reset())}getStorageKeys(){return Object.keys(this.ramStorage)}removeItem(e){delete this.ramStorage[e]}}var o;!function(e){e[e.NOT_STARTED=0]="NOT_STARTED",e[e.OPEN_IN_PROGRESS=1]="OPEN_IN_PROGRESS",e[e.OPEN_FAILED=2]="OPEN_FAILED",e[e.READY=3]="READY"}(o||(o={}));class i{constructor(e,t,s){this.storageName=e,this.onOpenError=s,this.cacheState=o.NOT_STARTED,this.toBeSavedBuffer=[],this.recoveryInProgress=0,this.origin=self.origin,this.context="object"==typeof window?"":"worker-",this.byteSizeCounter=new r(t),this.init()}async init(){await this.openCache(),this.cacheState===o.READY?this.flushToBeSavedBuffer():this.onOpenError(this.toBeSavedBuffer)}flushToBeSavedBuffer(){this.toBeSavedBuffer.forEach((e=>{this.save(e)})),this.toBeSavedBuffer=[]}async save(e){try{if(this.cacheState===o.OPEN_IN_PROGRESS)return void this.toBeSavedBuffer.push(e);if(this.cacheState!==o.READY)return;if(this.byteSizeCounter.isThresholdReached())return;const{key:t,metadata:s,events:r}=e;if(this.byteSizeCounter.addString(t),"string"==typeof r?this.byteSizeCounter.addString(r):this.byteSizeCounter.addArrayBuffer(r),this.byteSizeCounter.isThresholdReached())return;await this.cache.put(\`\${this.origin}/\${t}\`,new Response(r,{headers:s}))}catch{}}async recover(e){(this.cache||(await this.openCache(),this.cacheState===o.READY))&&this.doRecover(e)}async openCache(){try{this.cacheState=o.OPEN_IN_PROGRESS,this.cache=await self.caches.open(\`\${this.context}\${this.storageName}\`),this.cacheState=o.READY}catch{this.cacheState=o.OPEN_FAILED}}async doRecover(e){try{if(this.recoveryInProgress++,this.recoveryInProgress>1)return;const t=await this.cache.keys();if(0===t.length)return;const s=(await this.cache.matchAll()).map((e=>{const t={};e.headers.forEach(((e,s)=>{t[s]=e})),delete t["content-type"];const s=t.datatype;return delete t.datatype,"json"===s||"base64"===s?e.text().then((e=>({metadata:t,events:e}))):e.arrayBuffer().then((e=>({metadata:t,events:e})))})),r=await Promise.all(s);await Promise.all(t.map((e=>this.cache.delete(e)))),e(r),this.byteSizeCounter.reset()}catch{}finally{this.recoveryInProgress--}}}class n{constructor(e){try{this.initializeStorageStrategy(e)}catch(e){this.setRamStorageStrategy()}}initializeStorageStrategy(e){self.caches?this.setCachesStrategy(e):this.setRamStorageStrategy()}save(e){this.storageStrategy.save(e)}recover(e){this.storageStrategy.recover(e)}setCachesStrategy(e){this.storageStrategy=new i(e,n.MAX_SIZE,(e=>{this.setRamStorageStrategy(e)}))}setRamStorageStrategy(e){this.storageStrategy=new a(n.MAX_SIZE),e&&e.forEach((e=>{this.storageStrategy.save(e)}))}}n.MAX_SIZE=16777216,function(){const e="CS_WORKER_SIGNATURE",t=new Map,r=new n("csPersisted");function a(a){var o;if((o=a)&&o.WORKER_SIGNATURE===e)switch(a.type){case"CreatePostRequest":{const{endpoint:o,compressionOutputType:i,useRetry:n,mandatoryParameters:h}=a,c={endpoint:o,mandatoryParameters:h,worker:!0};i&&(c.compressionOpts={compressor,compressionOutputType:i,compressionType:algorithm}),n&&(c.recoveryStorage=r);const d=new s(c);t.set(o,d),d.onLoad((t=>{const s={type:"onLoad",endpoint:o,response:t,WORKER_SIGNATURE:e};self.postMessage(s)})),d.onError((t=>{const s={type:"onError",endpoint:o,response:t,WORKER_SIGNATURE:e};self.postMessage(s)}))}break;case"SetQueryParams":{const{endpoint:e,queryParams:s}=a,r=t.get(e);r&&r.setQueryParams(s)}break;case"RemoveQueryParams":{const{endpoint:e,queryParams:s}=a,r=t.get(e);r&&r.removeQueryParams(s)}break;case"Send":{const{endpoint:e,payload:s,queryParams:r}=a,o=t.get(e);o&&o.send(s,r)}break;case"Abort":{const{endpoint:e}=a,s=t.get(e);s&&s.abort()}break;case"SetHeader":{const{endpoint:e,headerName:s,headerValue:r}=a,o=t.get(e);o&&o.setRequestHeader(s,r)}break;case"SetTimeout":{const{endpoint:s,timeout:r}=a,o=t.get(s);o&&o.onTimeout((()=>{const t={type:"onTimeout",endpoint:s,WORKER_SIGNATURE:e};self.postMessage(t)}),r)}break;default:throw new Error(JSON.stringify(a))}}self.addEventListener("message",(function(e){e.data.getReader?async function(e,t){const s=e.getReader();for(;;){const{done:e,value:r}=await s.read();if(e)break;t(r)}}(e.data,a):a(e.data)}))}()})();`;try{this.Ut=this.Ft(s),this.xt=!0,this.qt()&&(this.Bt=new ReadableStream({start:t=>{this.Ht=t}}),this.Ut.postMessage(this.Bt,[this.Bt]),this.postMessage=this.postMessageAsTransferable)}catch(t){this.xt=!1}}postMessage(t){t.WORKER_SIGNATURE=this.Mt,this.Ut.postMessage(t)}postMessageAsTransferable(t){t.WORKER_SIGNATURE=this.Mt,this.Ht.enqueue(t)}Ft(t){const s=window.csURL||window.webkitURL,e=window.Blob,i=window.Worker,n=new e([t],{type:"application/javascript"}),r=s.createObjectURL(n);ss.whiteListFilename(r);const o=new i(r);return o.onmessage=t=>{const{type:s,endpoint:e,WORKER_SIGNATURE:i}=t.data;if(i===this.Mt)if("onLoad"===s){const{response:s}=t.data,i=this.$t.get(e);i&&i(s)}else if("onError"===s){const{response:s}=t.data,i=this.Lt.get(e);i&&i(s)}else if("onTimeout"===s){const t=this.Dt.get(e);t&&t()}},o}registerOnLoadCallback(t,s){this.$t.set(t,s)}registerOnErrorCallback(t,s){this.Lt.set(t,s)}registerOnTimeoutCallback(t,s){this.Dt.set(t,s)}isSupported(){return this.xt}qt(){try{const t=new ReadableStream;return structuredClone(t,{transfer:[t]}),!0}catch{return!1}}}class bs{constructor(t){var s;this.jt={},this.zt=t.endpoint,this.Gt=t.networkWorker,this.Zt=t.compressionOutputType,this.Wt=t.useRetry,this.Gt.postMessage({type:"CreatePostRequest",endpoint:this.zt,compressionOutputType:this.Zt,useRetry:this.Wt,mandatoryParameters:null!==(s=t.mandatoryParameters)&&void 0!==s?s:[]})}setQueryParams(t){this.Gt.postMessage({type:"SetQueryParams",endpoint:this.zt,queryParams:t}),csArray.prototype.forEach.call(Object.keys(t),(s=>{this.jt[s]=t[s]}))}getQueryParams(){return this.jt}removeQueryParams(t){this.Gt.postMessage({type:"RemoveQueryParams",endpoint:this.zt,queryParams:t}),t&&csArray.prototype.forEach.call(t,(t=>{delete this.jt[t]}))}send(t,s){this.Gt.postMessage({type:"Send",endpoint:this.zt,payload:t,queryParams:s})}abort(){this.Gt.postMessage({type:"Abort",endpoint:this.zt})}onLoad(t){this.Gt.registerOnLoadCallback(this.zt,t)}onError(t){this.Gt.registerOnErrorCallback(this.zt,t)}setRequestHeader(t,s){this.Gt.postMessage({type:"SetHeader",endpoint:this.zt,headerName:t,headerValue:s})}onTimeout(t,s){this.Gt.registerOnTimeoutCallback(this.zt,t),this.Gt.postMessage({type:"SetTimeout",endpoint:this.zt,timeout:s})}}var Vs;!function(t){t.UNCOMPRESSED="0",t.GZIP="2"}(Vs||(Vs={}));class Cs{constructor(t){this.onError=t}}function Ns(t){var s;const e=null!==(s=t.length)&&void 0!==s?s:0,i=new csArray(e);for(let s=0;s<e;s+=1)i[s]=t[s];return i}function Os(t,s){const e=t.length,i=new csArray(e);for(let n=0;n<e;n+=1)i[n]=s(t[n]);return i}function ks(t,s){const e=[];return function(t,s,e){let i=0;for(let n=0;n<t.length;n+=1){const r=s(t[n]);for(let t=0;t<r.length;t++)e(r[t],i++)}}(t,s,(t=>csArray.prototype.push.call(e,t))),e}function xs(t,s){if(t.length>=0){const e=t.length;for(let i=0;i<e;i++)s(t[i],i)}else{let e=0,i=t.next();for(;!i.done;)s(i.value,e++),i=t.next()}}function $s(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return t[i]}function Ls(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return!0;return!1}function Ds(t,s){const e=t.length,i=[];for(let n=0;n<e;n+=1){const e=t[n];s(e)&&csArray.prototype.push.call(i,e)}return i}function Ms(t,s){for(let e=0;e<t.length;e++)csArray.prototype.push.call(s,t[e])}function Us(t){const s=t instanceof Map,e=[];return t.forEach(((t,i)=>csArray.prototype.push.call(e,s?[i,t]:t))),e}class Fs{constructor(t){var s;this.jt={},this.Jt={},this.Qt=t=>{for(const s of t){const{metadata:t,events:e}=s;this.send(e,t)}},this.zt=t.endpoint,this.Yt=t.compressionOpts,this.Kt=t.recoveryStorage,this.mandatoryParameters=null!==(s=t.mandatoryParameters)&&void 0!==s?s:[],this.worker=!!t.worker,this.Kt&&this.Kt.recover(this.Qt)}setQueryParams(t){Object.keys(t).forEach((s=>{this.jt[s]=t[s]}))}removeQueryParams(t){t?t.forEach((t=>{delete this.jt[t]})):this.jt={}}send(t,s){const e=s||{...this.jt},i=!("ct"in e),n="string"!=typeof t&&!this.Xt(t);"ct"in e||(this.Yt&&i?e.ct=this.Yt.compressionType:e.ct=Vs.UNCOMPRESSED);const r=n?JSON.stringify(t):t,o=Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&"),h=`${this.zt}?${o}`;Ls(this.mandatoryParameters,(t=>null==e[t]))?es.warn(`[${this.worker?"WORKER":"MAIN"}] All mandatory parameters are not present on ${h}`):this.Yt&&i&&"string"==typeof r?this.Yt.compressor(r,this.Yt.compressionOutputType,(t=>this.ss(h,e,t))):this.ss(h,e,r)}onLoad(t){this.es=t}onError(t){this.ns=t}onTimeout(t,s){this.rs=t,this.hs=s}abort(){this.cs&&this.cs()}setRequestHeader(t,s){this.Jt[t]=s}getQueryParams(){return this.jt}Xt(t){return t&&void 0!==t.byteLength}ss(t,s,e){const i=new XMLHttpRequest,n=Object.keys(s).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(s[t])}`)).join("&");i.open("POST",t),i.onload=()=>{if(this.Kt&&this.Kt.recover(this.Qt),this.es){const t={params:s,responseText:i.responseText,status:i.status};this.es(t)}},i.onerror=()=>{this.Kt&&this.Kt.save({key:n,metadata:s,events:e}),this.ns&&this.ns({params:s})},this.hs&&this.rs&&(i.timeout=this.hs,i.ontimeout=()=>{this.rs()}),this.cs=()=>i.abort(),Object.keys(this.Jt).forEach((t=>{i.setRequestHeader(t,this.Jt[t])})),i.send(e)}}class qs{constructor(t){this.us=t,this.Gt=new Ps(this.us)}create(t,s,e,i,n=[]){if(this.Gt.isSupported()&&s)return new bs({networkWorker:this.Gt,endpoint:t,compressionOutputType:e,useRetry:!!i,mandatoryParameters:n});{const s=e?{compressor:this.us.compress,compressionOutputType:e,compressionType:this.us.algorithm}:void 0;return new Fs({endpoint:t,compressionOpts:s,recoveryStorage:i})}}}class Bs{constructor(t,s,e,i,n){this.W=t,this.J=s,this.ls=e,this.ds=i,this.L=n}get(){return{exclusion:this.ls.getAppliedTrackingDraw(),visitor:this.W.getVisitor(),session:this.J.getSession(),cvars:this.ds.getCustomVariablesSession()}}apply(t){t&&(t.exclusion?this.exclude():this.include(t))}exclude(){this.ls.exclude(this.L),this.W.removeVisitor(),this.J.removeSession(),this.ds.removeCustomVariablesSession()}include(t){this.ls.removeExclusion(),this.W.setVisitor(t.visitor),t.session?this.J.setSession(t.session):this.J.removeSession(),t.cvars?this.ds.setCustomVariableSession(t.cvars):this.ds.removeCustomVariablesSession()}}function Hs(t,s,e,i){var n,r=arguments.length,o=r<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(s,e,o):n(s,e))||o);return r>3&&o&&Object.defineProperty(s,e,o),o}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;var js,zs;function Gs(t,s=Js.SHOW_ALL){const e=s|Js.SHOW_ELEMENT,i=[document.createTreeWalker(t,e,null,!1)];let n=Zs(t);n&&csArray.prototype.push.call(i,document.createTreeWalker(n,e,null,!1));let r=null;return{root:t,nextNode(){if(n){const t=n;return n=null,t}for(;i.length>0;){if(r){const t=r;return r=null,t}const t=i[i.length-1].nextNode();if(!t){csArray.prototype.pop.call(i);continue}const n=Zs(t);if(s&Js.SHOW_DOCUMENT_FRAGMENT&&n&&(r=n),n&&csArray.prototype.push.call(i,document.createTreeWalker(n,e,null,!1)),Qs[t.nodeType]&s)return t}return null},visitAll(e){Qs[t.nodeType]&s&&e(t);let i=this.nextNode();for(;i;)Qs[i.nodeType]&s?(e(i),i=this.nextNode()):i=this.nextNode()},collectAll(t){const s=[];return this.visitAll((e=>csArray.prototype.push.call(s,t?t(e):e))),s}}}function Zs(t){return t&&T(t)?t.shadowRoot:null}const Ws=null!==(js=Ut.Node)&&void 0!==js?js:{},Js=null!==(zs=Ut.NodeFilter)&&void 0!==zs?zs:{},Qs={2:Js.SHOW_ATTRIBUTE,4:Js.SHOW_CDATA_SECTION,8:Js.SHOW_COMMENT,11:Js.SHOW_DOCUMENT_FRAGMENT,9:Js.SHOW_DOCUMENT,10:Js.SHOW_DOCUMENT_TYPE,1:Js.SHOW_ELEMENT,[Ws.ENTITY_NODE]:Js.SHOW_ENTITY,[Ws.ENTITY_REFERENCE_NODE]:Js.SHOW_ENTITY_REFERENCE,[Ws.NOTATION_NODE]:Js.SHOW_NOTATION,7:Js.SHOW_PROCESSING_INSTRUCTION,3:Js.SHOW_TEXT};function Ys(){const t=new Error;let s=t.stack?csArray.prototype.filter.call(csString.prototype.split.call(t.stack,"\n"),(t=>"Error"!==t&&-1===csString.prototype.indexOf.call(csString.prototype.toLowerCase.call(t),"promise ")&&-1===csString.prototype.indexOf.call(t,"[native code]"))):[];if(0===s.length)return"";const e=function(t){return t.length>0?Ks(t[0]):""}(s);return""===e?"":(s=function(t,s){return csArray.prototype.filter.call(t,(t=>-1===csString.prototype.indexOf.call(t,s)))}(s,e),0===s.length?"":Ks(s[0]))}function Ks(t){let s,e="";var i;i=t,s=-1!==csString.prototype.indexOf.call(i,"@")?new RegExp("@(.+):(\\d+):(\\d+)$"):new RegExp("\\((.+):(\\d+):(\\d+)\\)");const n=s.exec(t);return n&&(e=n[1]),e}const Xs=t=>t;function te({target:t,methodName:s,hook:e,hookPrepareArgs:i=Xs,options:n}){var r;if(!(null===(r=Object.getOwnPropertyDescriptor(t,s))||void 0===r?void 0:r.writable))return es.warn(`Cannot intercept read only function '${csString(s)}' of object '${t}'`),null;let o=!1;const h=t[s];if("function"==typeof h){const r=function(){const t=i(arguments),s=h.apply(this,arguments);if(o){let i;n&&n.withCallerName&&(i=Ys());try{e({result:s,context:this,args:t,callerName:i})}catch(t){es.error(t)}}return s};a=h,(c=r).prototype=a.prototype,Object.defineProperty(c,"toString",{value:()=>a.toString()}),t[s]=r}var c,a;return{activate:()=>o=!0,deactivate:()=>o=!1}}function se(t,s,e){let i=!1;const n=Object.getOwnPropertyDescriptor(t,s);if(n){if(!n.configurable)return es.warn(`Cannot intercept read only property '${csString(s)}' of object '${t}'`),null;const r=function(){const t=arguments,r=this[s],o=n.set.apply(this,t);if(i)try{e(this,t[0],r)}catch(t){es.error(t)}return o};Object.defineProperty(t,s,{set:r})}return{activate:()=>i=!0,deactivate:()=>i=!1}}var ee,ie;!function(t){t.isSupported=function(){return!!Element.prototype.attachShadow},t.getShadowRoot=function(t){return t&&T(t)?t.shadowRoot:null},t.getAllShadowHosts=ms((function(t){return Gs(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).collectAll((t=>t.host))}),"getAllShadowHosts")}(ee||(ee={}));class ne{static fs(t){this.ps.forEach((s=>{t(s,"initial")}))}static vs(t){if(csArray.prototype.push.call(this.gs,t),!this.ws){this.ws=!0,this.ys.observe(document,this.Es);for(const t of ee.getAllShadowHosts(document)){const s=csElementshadowRoot.apply(t);this.ps.add(s),this.ys.observe(s,this.Es)}this.As||(this.As=te({target:Element.prototype,methodName:"attachShadow",hook:t=>t.result.isConnected&&this._s(t.result)})),this.As.activate()}this.fs(t)}static Rs(t){var s;this.gs=csArray.prototype.filter.call(this.gs,(s=>s!==t)),0===this.gs.length&&(this.gs=[],this.ws=!1,this.ys.disconnect(),null===(s=this.As)||void 0===s||s.deactivate(),this.ps.clear())}constructor(t){this.Ss=t,this.Ss=ns("DocumentShadowRootObserver:callback",((s,e)=>t(s,e)))}get shadowRoots(){return Us(ie.ps)}takeRecords(){var t,s;return null!==(s=null===(t=ie.ys)||void 0===t?void 0:t.takeRecords())&&void 0!==s?s:[]}observe(){ee.isSupported()&&ie.vs(this.Ss)}disconnect(){ee.isSupported()&&ie.Rs(this.Ss)}}ie=ne,ne.gs=[],ne.ps=new Set,ne.ws=!1,ne.Es={childList:!0,subtree:!0},ne.ys=new csMutationObserver((t=>{for(const s of t)s.target.isConnected&&xs(s.addedNodes,ie.Ts),xs(s.removedNodes,ie.Is)})),ne._s=t=>{ie.ps.has(t)||(ie.ys.observe(t,ie.Es),ie.ps.add(t),xs(ie.gs,(s=>s(t,"added"))))},ne.Ts=t=>{Gs(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll(ie._s)},ne.Is=t=>{t.isConnected||Gs(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll((t=>{ie.ps.has(t)&&(ie.ps.delete(t),xs(ie.gs,(s=>s(t,"removed"))))}))},Hs([is()],ne.prototype,"observe",null),Hs([is()],ne.prototype,"disconnect",null);function re(t,s=true){t.boundElement.addEventListener(t.type,t.listener,s)}function oe(t,s=true){t.boundElement.removeEventListener(t.type,t.listener,s)}function he(t,s=0){const e=Math.pow(10,s);return Math.round(t*e)/e}function ce(t,s){"number"==typeof s&&(s={wait:s});const e=s.wait;if(s.ignoreThrottledCalls){let s=0;return function(...i){const n=It.now();if(n-s>e)return s=n,t.apply(this,i)}}let i,n,r=[],o=null,h=0;const c=()=>{h=It.now(),o=null,n=t.apply(i,r)},a=function(...s){const a=It.now(),u=e-(a-h);return i=null!=this?this:window,r=[...s],u<=0||u>e?(h=a,n=t.apply(i,r),o?(window.csClearTimeout(o),o=null):r=[]):o||(o=window.csSetTimeout(c,u)),n};return a.cancel=()=>{o&&(window.csClearTimeout(o),h=0,o=null,r=[])},a.flushPending=()=>{o&&(window.csClearTimeout(o),c())},a}var ae,ue,le,de,fe,pe;function ve(t){const s=csEventtarget.apply(t);return s&&l(s)&&csElementshadowRoot.apply(s)&&t.composedPath?t.__csOriginalTarget||t.composedPath()[0]:s}!function(t){t[t.MUTATION_INSERT=1]="MUTATION_INSERT",t[t.MUTATION_REMOVE=2]="MUTATION_REMOVE",t[t.MUTATION_ATTRIBUTE=3]="MUTATION_ATTRIBUTE",t[t.MUTATION_CHARACTER_DATA=4]="MUTATION_CHARACTER_DATA",t[t.INITIAL_DOM=5]="INITIAL_DOM",t[t.SCROLL=6]="SCROLL",t[t.CLICK=8]="CLICK",t[t.RESIZE=9]="RESIZE",t[t.INPUT_CHECKABLE=10]="INPUT_CHECKABLE",t[t.INPUT_SELECT=11]="INPUT_SELECT",t[t.INPUT_TEXT=12]="INPUT_TEXT",t[t.HASH_CHANGE=13]="HASH_CHANGE",t[t.UNANONYMIZED_CONSENT_GRANTED=14]="UNANONYMIZED_CONSENT_GRANTED",t[t.UNANONYMIZED_CONSENT_WITHDRAWN=15]="UNANONYMIZED_CONSENT_WITHDRAWN",t[t.MOUSE_OVER=16]="MOUSE_OVER",t[t.VISIBILITY_CHANGE=17]="VISIBILITY_CHANGE",t[t.STYLESHEET_RULE_INSERT=18]="STYLESHEET_RULE_INSERT",t[t.STATIC_RESOURCE_URL=19]="STATIC_RESOURCE_URL",t[t.PERFORMANCE_TIMINGS=20]="PERFORMANCE_TIMINGS",t[t.ATTACH_SHADOW=22]="ATTACH_SHADOW",t[t.STYLESHEET_CSS_TEXT_UPDATE=23]="STYLESHEET_CSS_TEXT_UPDATE",t[t.JAVASCRIPT_ERROR=26]="JAVASCRIPT_ERROR",t[t.PAGE_EVENT=27]="PAGE_EVENT",t[t.API_ERROR=28]="API_ERROR",t[t.TEXT_VISIBILITY=29]="TEXT_VISIBILITY",t[t.MUTATION_ENCRYPTED_CHARACTER_DATA=30]="MUTATION_ENCRYPTED_CHARACTER_DATA",t[t.INPUT_ENCRYPTED_TEXT=31]="INPUT_ENCRYPTED_TEXT",t[t.KEY_DOWN=32]="KEY_DOWN",t[t.KEY_UP=33]="KEY_UP",t[t.CLIPBOARD_COMMAND=34]="CLIPBOARD_COMMAND",t[t.STYLESHEET_RULE_DELETE=37]="STYLESHEET_RULE_DELETE",t[t.USER_IDENTIFIER=38]="USER_IDENTIFIER",t[t.TOUCH_START=41]="TOUCH_START",t[t.TOUCH_MOVE=42]="TOUCH_MOVE",t[t.TOUCH_END=43]="TOUCH_END",t[t.GESTURE_RECOGNITION=44]="GESTURE_RECOGNITION",t[t.POINTER_DOWN=47]="POINTER_DOWN",t[t.POINTER_MOVE=48]="POINTER_MOVE",t[t.POINTER_UP=49]="POINTER_UP",t[t.CUSTOM_ERROR=50]="CUSTOM_ERROR",t[t.CUSTOM_ELEMENT_REGISTRATION=54]="CUSTOM_ELEMENT_REGISTRATION",t[t.REGISTER_ADOPTED_STYLE_SHEET=60]="REGISTER_ADOPTED_STYLE_SHEET",t[t.SET_ADOPTED_STYLE_SHEETS=61]="SET_ADOPTED_STYLE_SHEETS",t[t.ADOPTED_STYLESHEET_RULE_INSERT=62]="ADOPTED_STYLESHEET_RULE_INSERT",t[t.ADOPTED_STYLESHEET_RULE_DELETE=63]="ADOPTED_STYLESHEET_RULE_DELETE",t[t.SCREEN_RESIZE=65]="SCREEN_RESIZE",t[t.RESOURCE_HASHES=66]="RESOURCE_HASHES",t[t.PERFORMANCE_NAVIGATION_TIMING=67]="PERFORMANCE_NAVIGATION_TIMING",t[t.PERFORMANCE_RESOURCE_TIMING=68]="PERFORMANCE_RESOURCE_TIMING",t[t.RECORDING_INFO_EVENT=72]="RECORDING_INFO_EVENT",t[t.TEXT_REF=73]="TEXT_REF",t[t.TOUCH_CANCEL=74]="TOUCH_CANCEL",t[t.MUTATION_MOVE=75]="MUTATION_MOVE",t[t.STYLESHEET_RULE_UPDATE=76]="STYLESHEET_RULE_UPDATE",t[t.ADOPTED_STYLESHEET_RULE_UPDATE=77]="ADOPTED_STYLESHEET_RULE_UPDATE",t[t.DEBUG=999]="DEBUG"}(ae||(ae={})),function(t){t[t.RECORDING_CONSENT_FOR_SESSION_GRANTED=1]="RECORDING_CONSENT_FOR_SESSION_GRANTED",t[t.RECORDING_CONSENT_FOR_SESSION_WITHDRAWN=2]="RECORDING_CONSENT_FOR_SESSION_WITHDRAWN"}(ue||(ue={})),function(t){t[t.Left=0]="Left",t[t.Middle=1]="Middle",t[t.Right=2]="Right",t[t.Fourth=3]="Fourth",t[t.Fifth=4]="Fifth"}(le||(le={})),function(t){t[t.SWIPE=0]="SWIPE",t[t.PINCH_IN=1]="PINCH_IN",t[t.PINCH_OUT=2]="PINCH_OUT",t[t.LONG_PRESS=3]="LONG_PRESS",t[t.TAP=4]="TAP",t[t.DOUBLE_TAP=5]="DOUBLE_TAP"}(de||(de={})),function(t){t[t.SPACE=0]="SPACE",t[t.ENTER=1]="ENTER",t[t.BACKSPACE=2]="BACKSPACE",t[t.DELETE=3]="DELETE",t[t.ARROWUP=4]="ARROWUP",t[t.ARROWDOWN=5]="ARROWDOWN",t[t.ARROWLEFT=6]="ARROWLEFT",t[t.ARROWRIGHT=7]="ARROWRIGHT",t[t.CAPSLOCK=8]="CAPSLOCK",t[t.SHIFT=9]="SHIFT",t[t.TAB=10]="TAB",t[t.ALPHANUMERICAL=11]="ALPHANUMERICAL",t[t.ESCAPE=12]="ESCAPE",t[t.END=13]="END",t[t.ALT=14]="ALT",t[t.CTRL=15]="CTRL",t[t.META=16]="META"}(fe||(fe={})),function(t){t[t.COPY=0]="COPY",t[t.CUT=1]="CUT",t[t.PASTE=2]="PASTE"}(pe||(pe={}));const me=!!window.chrome,ge="data-cs-scroll-container";var we;!function(t){t.isEventOnScrollContainer=function(t){return!!(_t(t)&&function(t){try{if(_t(csEventtarget.apply(t)))return!0}catch{}return!1}(t)&&St(csEventtarget.apply(t))&&null!==csEventtarget.apply(t).getAttribute(ge))},t.getScrollContainer=function(){return window.csquerySelector[document.nodeType].call(document,`[${ge}]`)}}(we||(we={}));const ye=function(){const t=csSymbol.for("propStore");return{getStore:s=>s[t],get(s,e){const i=s[t];return null==i?void 0:i[e]},set(s,e,i){let n=s[t];n||(n={},s[t]=n),n[e]=i}}}();var Ee;!function(t){function s(t,e,i){let n=!1;if(i(t,e,(()=>n=!0)),n)return;const r=t.shadowRoot;r&&s(r,t,i);const o=t.children;if(null==o?void 0:o.length)for(const e of o)if(e&&(s(e,t,i),n))break}t.setProperty=function(t,s,e){var i;t instanceof Node?ye.set(t,s,e):(null!==(i=t.props)&&void 0!==i||(t.props={}),t.props[s]=e)},t.getProperty=function(t,s){var e;return t instanceof Node?ye.get(t,s):null===(e=t.props)||void 0===e?void 0:e[s]},t.getProperties=function(t){return t instanceof Node?ye.getStore(t):t.props},t.traverse=function(t,e){s(t,void 0,e)}}(Ee||(Ee={}));let Ae=1,_e=csSymbol("nodeIdentifier");function Re(t){const s=Ee.getProperty(t,_e);return null!=s?s:(Ee.setProperty(t,_e,Ae++),Ee.getProperty(t,_e))}var Se;const Te=null!==(Se=Ut.Element)&&void 0!==Se?Se:{prototype:{}},Ie=window.csElementmatches||window.csElementmatchesSelector||window.csElementmozMatchesSelector||window.csElementmsMatchesSelector||window.csElementoMatchesSelector||window.csElementwebkitMatchesSelector,Pe=Te.prototype.closest,be=document.createElement("div");function Ve(t){if(!(!!t&&yt(t)))return es.warn(`isValidSelector: invalid selector provided '${t}'`),!1;try{return Ie.call(be,t),!0}catch{return es.warn(`isValidSelector: invalid selector provided '${t}'`),!1}}function Ce(t,s){if(Pe)return Pe.call(t,s);let e=t;do{if(Ie.call(e,s))return e;e=null==e?void 0:e.parentElement}while(null!==e&&1===e.nodeType);return null}var Ne;!function(t){let s;!function(t){t[t.NotSensitive=0]="NotSensitive",t[t.Parent=1]="Parent",t[t.Child=2]="Child"}(s=t.SensitiveState||(t.SensitiveState={})),t.sensitiveProp="sensitive",t.sensitiveAttributeProp="sensitiveAttribute",t.isSelectorUserInput=function(t){return!!(Et(t)&&"Attributes"in t&&"PIISelectors"in t)&&(t.Attributes instanceof Array&&t.PIISelectors instanceof Array)},t.sanitizeSelectorUserInput=function(t){return"Attributes"in t||(t.Attributes=[]),"PIISelectors"in t||(t.PIISelectors=[]),t},t.getSensitiveDetails=function(e){var i;return null!==(i=Ee.getProperty(e,t.sensitiveProp))&&void 0!==i?i:{state:s.NotSensitive}},t.getAttributeSensitiveDetails=function(s){var e;return null!==(e=Ee.getProperty(s,t.sensitiveAttributeProp))&&void 0!==e?e:{attributes:[]}},t.isSensitive=function(e){const i=Ee.getProperty(e,t.sensitiveProp);return(null==i?void 0:i.state)===s.Parent},t.isSensitiveChild=function(e){const i=Ee.getProperty(e,t.sensitiveProp);return(null==i?void 0:i.state)===s.Child},t.isSensitiveAttribute=function(s,e){const i=Ee.getProperty(s,t.sensitiveAttributeProp);return(null==(null==i?void 0:i.attributes)?void 0:csArray.prototype.indexOf.call(null==i?void 0:i.attributes,e))>-1},t.setSensitiveProperty=function(s,e){Ee.setProperty(s,t.sensitiveProp,e)},t.unsetSensitiveProperty=function(s){Ee.setProperty(s,t.sensitiveProp,void 0)},t.setSensitiveAttributeProperty=function(s,e){Ee.setProperty(s,t.sensitiveAttributeProp,e)},t.getComputedSelectorSettings=function(t,s){const e=csArray.prototype.filter.call(t.PIISelectors,(t=>Ve(t)));s.elementSelector.length>0&&csArray.prototype.push.call(e,...csString.prototype.split.call(s.elementSelector,","));const i=function(t){if(t.length<=1)return t;const s=[];for(const e of t){const t=csString.prototype.split.call(e,",");for(const e of t)-1===csArray.prototype.indexOf.call(s,e)&&csArray.prototype.push.call(s,e)}return s}([...e]),n={elementSelector:csArray.prototype.join.call(i,","),attrSelector:s.attrSelector,attrSelectors:s.attrSelectors};return csArray.prototype.forEach.call(t.Attributes,(t=>{(null==t?void 0:t.attrName)&&(null==t?void 0:t.selector)&&Ve(t.selector)&&!function(t,s){return csArray.prototype.some.call(t,(t=>t.selector===s.selector&&t.attrName===s.attrName))}(n.attrSelectors,t)&&csArray.prototype.push.call(n.attrSelectors,t)})),n.attrSelector=function(t){let s="";return csArray.prototype.forEach.call(t,(t=>{const e=csString.prototype.split.call(t.selector,",");csArray.prototype.forEach.call(e,(t=>{Ve(t)&&(s&&(s+=","),s+=t)}))})),s}(n.attrSelectors),n}}(Ne||(Ne={}));class Oe{constructor(){this.Ps=[],this.bs=[{type:"pointerup",listener:t=>this.pointerUpListener(t),boundElement:document},{type:"pointermove",listener:t=>this.pointerMoveListener(t),boundElement:document},{type:"pointerdown",listener:t=>this.pointerDownListener(t),boundElement:document}],this.Vs=[{type:"touchstart",listener:t=>this.touchStartListener(t),boundElement:document},{type:"touchmove",listener:t=>this.touchMoveListener(t),boundElement:document},{type:"touchend",listener:t=>this.touchEndCancelListener(t),boundElement:document},{type:"touchcancel",listener:t=>this.touchEndCancelListener(t),boundElement:document}],this.Cs=[{type:"click",listener:t=>this.clickListener(t),boundElement:document},{type:"keyup",listener:t=>this.keyUpListener(t),boundElement:document},{type:"keydown",listener:t=>this.keyDownListener(t),boundElement:document},{type:"copy",listener:t=>this.copyListener(t),boundElement:document},{type:"cut",listener:t=>this.cutListener(t),boundElement:document},{type:"paste",listener:t=>this.pasteListener(t),boundElement:document},{type:"scroll",listener:t=>this.scrollListener(csEventtarget.apply(t)),boundElement:document},{type:"mouseover",listener:t=>this.mouseOverListener(t),boundElement:document}],this.Ns=[{type:"scroll",listener:t=>this.scrollListener(csEventtarget.apply(t))}];const t=function(t){if(!yt(t))return null;const s=/iP(ad|hone|od).+Version\/(\d+)\..*Safari/i.exec(t);return s?Number(s[2]):null}(window.navigator.userAgent);(null===t||t&&t>=16)&&csArray.prototype.push.call(this.Ns,{type:"mouseover",listener:t=>this.mouseOverListener(t)}),this.Os=new ne(((t,s)=>{switch(s){case"initial":case"added":this.ks(t);break;case"removed":this.xs(t)}}))}init(){this.$s(),this.Ls(),this.Ds()}onEvent(t){csArray.prototype.push.call(this.Ps,t)}Ms(t,s=!1){csArray.prototype.forEach.call(this.Ps,(e=>e(t,s)))}start(){this.Us(),this.ks(document),this.Os.observe()}stop(){this.xs(document),this.Os.disconnect()}Ls(){this.Fs()&&csArray.prototype.push.call(this.Cs,...this.bs)}$s(){this.qs()&&csArray.prototype.push.call(this.Cs,...this.Vs)}ks(t){R(t)?csArray.prototype.forEach.call(this.Cs,(t=>re(t))):csArray.prototype.forEach.call(this.Ns,(s=>{re({type:s.type,listener:s.listener,boundElement:t})}))}xs(t){R(t)?csArray.prototype.forEach.call(this.Cs,(t=>oe(t))):csArray.prototype.forEach.call(this.Ns,(s=>{oe({type:s.type,listener:s.listener,boundElement:t})}))}Fs(){return"PointerEvent"in window&&"function"==typeof window.PointerEvent}qs(){return"TouchEvent"in window&&"function"==typeof window.TouchEvent}Us(){this.Bs()}Bs(){const t=we.getScrollContainer()||document,s=Re(t),e=this.Hs(t);if(0!==e.top||0!==e.left){const t={type:ae.SCROLL,args:[s,e.left,e.top],date:It.now()};this.Ms(t,!0)}}Hs(t){return t===document?{top:window.pageYOffset,left:window.pageXOffset}:{top:t.scrollTop,left:t.scrollLeft}}scrollListener(t){if(Ne.isSensitive(t)||Ne.isSensitiveChild(t))return;const s=Re(t),e=this.Hs(t),i={type:ae.SCROLL,args:[s,e.left,e.top],date:It.now()};this.Ms(i)}mouseOverListener(t){if(Ne.isSensitiveChild(t.target))return;const s=Re(t.target),e={type:ae.MOUSE_OVER,args:[s],date:It.now()};this.Ms(e)}clickListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i={type:ae.CLICK,args:[e],date:It.now()};this.Ms(i)}keyUpListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i=this.js[t.key];if(void 0===i)return;const n={type:ae.KEY_UP,args:[e,i],date:It.now()};this.Ms(n)}keyDownListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i=this.js[t.key];if(void 0===i)return;const n={type:ae.KEY_DOWN,args:[e,i],date:It.now()};this.Ms(n)}copyListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i={type:ae.CLIPBOARD_COMMAND,args:[e,pe.COPY],date:It.now()};this.Ms(i)}cutListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i={type:ae.CLIPBOARD_COMMAND,args:[e,pe.CUT],date:It.now()};this.Ms(i)}pasteListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i={type:ae.CLIPBOARD_COMMAND,args:[e,pe.PASTE],date:It.now()};this.Ms(i)}pointerUpListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i={type:ae.POINTER_UP,args:[t.pointerId,t.pointerType,he(t.clientX,1),he(t.clientY,1),e,t.button],date:It.now()};this.Ms(i)}pointerMoveListener(t){const s={type:ae.POINTER_MOVE,args:[t.pointerId,t.pointerType,he(t.clientX,1),he(t.clientY,1)],date:It.now()};this.Ms(s)}pointerDownListener(t){const s=ve(t);if(Ne.isSensitiveChild(s))return;const e=Re(s),i={type:ae.POINTER_DOWN,args:[t.pointerId,t.pointerType,he(t.clientX,1),he(t.clientY,1),e,t.button,{pageX:he(t.pageX,1),pageY:he(t.pageY,1)}],date:It.now()};this.Ms(i)}touchStartListener(t){if(!t.changedTouches)return;const{changedTouches:s}=t;for(let t=0;t<s.length;t+=1){const e=s[t],i={type:ae.TOUCH_START,args:[e.identifier,he(e.clientX,1),he(e.clientY,1)],date:It.now()};this.Ms(i)}}touchMoveListener(t){if(!t.changedTouches)return;const{changedTouches:s}=t;for(let t=0;t<s.length;t+=1){const e=s[t],i={type:ae.TOUCH_MOVE,args:[e.identifier,he(e.clientX,1),he(e.clientY,1)],date:It.now()};this.Ms(i)}}touchEndCancelListener(t){if(!t.changedTouches)return;const{changedTouches:s}=t;for(let e=0;e<s.length;e+=1){const i=s[e],n={type:"touchend"===t.type?ae.TOUCH_END:ae.TOUCH_CANCEL,args:[i.identifier,he(i.clientX,1),he(i.clientY,1)],date:It.now()};this.Ms(n)}}Ds(){this.js={},this.js[" "]=fe.SPACE,this.js.Spacebar=fe.SPACE,this.js.Backspace=fe.BACKSPACE,this.js.Enter=fe.ENTER,this.js.Delete=fe.DELETE,this.js.ArrowUp=fe.ARROWUP,this.js.ArrowDown=fe.ARROWDOWN,this.js.ArrowLeft=fe.ARROWLEFT,this.js.ArrowRight=fe.ARROWRIGHT,this.js.Up=fe.ARROWUP,this.js.Down=fe.ARROWDOWN,this.js.Left=fe.ARROWLEFT,this.js.Right=fe.ARROWRIGHT,this.js.CapsLock=fe.CAPSLOCK,this.js.Shift=fe.SHIFT,this.js.Tab=fe.TAB,this.js.Escape=fe.ESCAPE,this.js.Esc=fe.ESCAPE,this.js.End=fe.END,this.js.Alt=fe.ALT,this.js.Control=fe.CTRL,this.js.Meta=fe.META}}var ke;ws([gs("RecordingPageEvents.start")],Oe.prototype,"start",null),ws([is("scroll")],Oe.prototype,"scrollListener",null),ws([is("mouseOver"),os(),(t,s,e)=>{const i=e.value;return i&&(e.value=function(t){if(ve(t)===csEventtarget.apply(t))return i.call(this,t)}),e}],Oe.prototype,"mouseOverListener",null),ws([is("click"),os()],Oe.prototype,"clickListener",null),ws([is("Event handler type: keyup")],Oe.prototype,"keyUpListener",null),ws([is("Event handler type: keydown")],Oe.prototype,"keyDownListener",null),ws([is("Event handler type: copy")],Oe.prototype,"copyListener",null),ws([is("Event handler type: cut")],Oe.prototype,"cutListener",null),ws([is("Event handler type: paste")],Oe.prototype,"pasteListener",null),ws([is("Event handler type: pointerup"),os()],Oe.prototype,"pointerUpListener",null),ws([is("Event handler type: pointermove"),os(),(ke={wait:33,ignoreThrottledCalls:!1},(t,s,e)=>{e.value=ce(e.value,ke)})],Oe.prototype,"pointerMoveListener",null),ws([is("Event handler type: pointerdown"),os()],Oe.prototype,"pointerDownListener",null),ws([is("Event handler type: touchstart"),os()],Oe.prototype,"touchStartListener",null),ws([is("Event handler type: touchmove"),os()],Oe.prototype,"touchMoveListener",null),ws([is("Event handler type: touchend-cancel"),os()],Oe.prototype,"touchEndCancelListener",null);class xe{constructor(t){this.zs=t,this.Gs=0}addString(t){this.Gs+=2*t.length}addArrayBuffer(t){this.Gs+=t.byteLength}isThresholdReached(){return this.Gs>this.zs}reset(){this.Gs=0}}class $e{constructor(t=[],s=512e3){this.Zs=t,this.Ws=new xe(s)}addEvent(t){this.Ws.addString(W(t)),csArray.prototype.push.call(this.Zs,t)}addEventByTimestamp(t){let s=0;for(;s<this.Zs.length;s+=1){if(this.Zs[s].date>=t.date)break}csArray.prototype.splice.call(this.Zs,s,0,t)}eventsCount(){return this.Zs.length}clearEvents(){this.Ws.reset(),this.Zs=[]}isFull(){return this.eventsCount()>=200}isThresholdReached(){return this.Ws.isThresholdReached()}getEvents(){return this.Zs}extractEvents(...t){const s=[],e=[];return csArray.prototype.forEach.call(this.Zs,(i=>{-1!==csArray.prototype.indexOf.call(t,i.type)?csArray.prototype.push.call(s,i):csArray.prototype.push.call(e,i)})),this.Zs=e,s}stringifyEvents(){return W(this.Zs)}Js(t){t.type===ae.INITIAL_DOM&&(window.CSDomSerialized=window.CSDomSerialized?window.CSDomSerialized+1:1)}}ws([gs("RecordingBatch.addEvent")],$e.prototype,"addEvent",null);class Le{constructor(){this.Qs=1}getCurrentIndex(){return this.Qs}increment(){this.Qs+=1}reset(){this.Qs=1}getRequestParameters(){return{ri:`${this.Qs}`}}}class De{emit(t,s,e,i=document){const n=`${void 0!==e?`${e}`:`${De.Ys}`}${t}`,r=De.createEvent(n,{detail:s});null!==r&&i.dispatchEvent(r)}static createEvent(t,s={}){if("function"==typeof CustomEvent)return new CustomEvent(t,s);const e=this.Ks();if(null===e)return null;const{bubbles:i=!1,cancelable:n=!1,detail:r}=s;return e.initCustomEvent(t,i,n,r),e}static Ks(){try{return document.createEvent("CustomEvent")}catch{return null}}}De.Ys="cs.tracking.";class Me{constructor(){this._isStarted=!1}get isStarted(){return this._isStarted}start(...t){this._isStarted||(this._isStarted=!0,this.onStart(...t))}stop(){this._isStarted&&(this._isStarted=!1,this.onStop())}restart(){this.stop(),this.start()}}var Ue,Fe,qe,Be,He;!function(t){t.ANALYTICS_ONLY="0",t.TEMPORARILY="T",t.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED="B",t.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN="W",t.RECORDING_GLOBAL_SAMPLING="5",t.RECORDING_URL_SAMPLING="6",t.RECORDING_ETR_SAMPLING="7",t.RECORDING_RULES_TARGETING="8"}(Ue||(Ue={})),function(t){t.ETR_OFF="0",t.ETR_ON="1"}(Fe||(Fe={})),function(t){t.ETR_LEGACY="0",t.ETR_SESSION="1",t.ETR_PAGE="2"}(qe||(qe={})),function(t){t.Visible="visible",t.Hidden="hidden",t.Blur="blur",t.PagehideVisible="pagehideVisible",t.PagehideHidden="pagehideHidden",t.ExitPageByNavigate="exitPageByNavigate"}(Be||(Be={}));class je{constructor(){this.Xs=!1,this.te=t=>{try{switch(t.type){case"visibilitychange":if("hidden"===document.visibilityState)return this.se(Be.Hidden);break;case"pagehide":return"hidden"===document.visibilityState?this.se(Be.PagehideHidden):this.se(Be.PagehideVisible);case"blur":return this.se(Be.Blur);case"navigate":return this.ee(t)?this.se(Be.ExitPageByNavigate):void 0;default:return}}catch{}}}start(){this.Xs||(this.Xs=!0,this.ie(),this.ne(),this.re(),Vt()&&this.oe())}stop(){this.Xs&&(this.Xs=!1,this.he(),this.ce(),this.ae(),Vt()&&this.ue())}onEvent(t){this.se=t}oe(){window.navigation.addEventListener("navigate",this.te)}ue(){window.navigation.removeEventListener("navigate",this.te)}ie(){document.addEventListener("visibilitychange",this.te)}he(){document.removeEventListener("visibilitychange",this.te)}ne(){window.addEventListener("pagehide",this.te)}ce(){window.removeEventListener("pagehide",this.te)}re(){window.addEventListener("blur",this.te)}ae(){window.removeEventListener("blur",this.te)}ee(t){return t instanceof NavigateEvent!=!1&&(!t.hashChange&&!t.downloadRequest&&!t.formData)}}let ze="null",Ge=null;const Ze=[];function We(t){null==Ge||Ge.postMessage(t)}!!(null===(He=document.body)||void 0===He?void 0:He.getAttribute("data-cs-tag-extension"))&&(window._uxa?_uxa.push(["debugEvents",!0]):window._uxa=[["debugEvents",!0]],Ge=new BroadcastChannel("cs-tag"),document.addEventListener("cs.tracking.recordingEvent",(t=>{We({type:"UXA_EVENT",event:t.detail})})),Ge.addEventListener("message",(t=>{if("CONNECT"===t.data.type){if(t.data.sessionId===ze)return;ze=t.data.sessionId,csArray.prototype.forEach.call(Ze,(t=>t())),null==Ge||Ge.postMessage({type:"CONNECTED",sessionId:ze})}})));class Je{constructor(t,s=""){this.name=t,this.format=s}}class Qe extends Je{constructor(t){super(t,"Value: {count}"),this.count=0}increase(t=1){this.count+=t}decrease(){this.count>0&&this.count--}clear(){this.count=0}getData(){return{count:this.count}}}class Ye extends Je{constructor(t,s){super(t,"Value: {count}"),this.le=s}getData(){return{count:this.le()}}}class Ke extends Je{constructor(t){super(t,"Living intances: {instances}<br/>Added: {added}<br/>Removed: {removed}"),this.added=0,this.removed=0}get value(){return this.added-this.removed}increase(){this.added++}decrease(){this.removed++}getData(){return{added:this.added,removed:this.removed,instances:this.added-this.removed}}}class Xe extends Je{constructor(t){super(t,"Count: {count}<br/>Average: {average}ms<br/>Total: {total}ms"),this.total=0,this.count=0}get average(){return this.count?this.total/this.count:0}measure(t){const s=It.now();t(),this.count++,this.total+=It.now()-s}asyncMeasure(){const t=csDate.now();return()=>{this.count++,this.total+=csDate.now()-t}}getData(){return{total:this.total,count:this.count,average:this.average}}}let ti=0;const si={general:{category:"General",nbEvents:new Qe("Nb of Events"),pendingTasks:new Qe("Pending Tasks"),pendingEvents:new Qe("Pending Tasks"),nbOfMutationObservers:new Ke("Nb of Mutation Observers"),push(t){this["perf"+ti++]=t}},mutations:{category:"Mutations",initialDOM:new Xe("Initial DOM"),pendingMutations:new Qe("Nb of Mutations scheduled"),serializedMutations:new Xe("Serialized Mutations"),count:new Qe("Mutation Count"),elementMutationObserved:new Ke("Nb of Elements Observed by MutationObserver"),unobserveGarbageCollection:new Xe("Unobserve GC")},visibilityObserver:{category:"Visibility Observer",hiddenElements:new Qe("Nb of Hidden Elements "),nbElements:new Qe("Nb of Elements")}};var ei,ii;ei=()=>{const t=t=>Object.keys(t),s=csArray.prototype.map.call(t(si),(t=>si[t])),e=csArray.prototype.map.call(s,(s=>csArray.prototype.filter.call(csArray.prototype.map.call(t(s),(t=>s[t])),(t=>t instanceof Je)))),i=csArray.prototype.map.call(s,((t,s)=>({category:t.category,performanceCounters:csArray.prototype.map.call(e[s],(t=>({name:t.name,format:t.format})))})));We({type:"UXA_PERFORMANCE_COUNTER_SCHEMA",event:i}),setInterval((()=>{const t=ks(Os(e,(t=>Os(t,(t=>t.getData())))),(t=>t));We({type:"UXA_PERFORMANCE_COUNTER",event:t})}),1e3)},null!==ze&&ei(),csArray.prototype.push.call(Ze,ei),function(t){t[t.Active=0]="Active",t[t.Paused=1]="Paused",t[t.Stopped=2]="Stopped"}(ii||(ii={}));class ni{constructor(t,s,e=[]){this.de=t,this.fe=s,this.pe=e,this.ve=null,this.ge=ii.Active,this.we=[]}reset(){this.ve=null,this.we=[],this.ge=ii.Active}disconnect(){this.ge=ii.Stopped}ye(){this.fe(ii.Paused),this.ge=ii.Paused,csSetTimeout((()=>{this.ge===ii.Paused&&this.Ee()}),ni.STOP_TIMEOUT)}Ae(){this.fe(ii.Active),this.ge=ii.Active,xs(this.we,this.de),this.we=[]}Ee(){this.we=[],this.fe(ii.Stopped),this.ge=ii.Stopped}pushEvent(t,s){if(s.isUserEvent&&(this.ve=t.date,this.ge!==ii.Active))return this.Ae(),void this.de(t);if(this._e(t))this.de(t);else switch(this.ge){case ii.Active:if(this.Re(t,s))return this.ye(),void csArray.prototype.push.call(this.we,t);this.de(t);break;case ii.Paused:csArray.prototype.push.call(this.we,t);case ii.Stopped:}}Re(t,s){return!s.isUserEvent&&null!==this.ve&&t.date-this.ve>ni.INACTIVITY_TIMEOUT}_e(t){return csArray.prototype.indexOf.call(this.pe,t.type)>-1}}ni.INACTIVITY_TIMEOUT=5e3,ni.STOP_TIMEOUT=5e3;let ri=(oi="queueMicrotask",hi=csSetTimeout,void 0!==Ut[oi]?Ut[oi]:hi);var oi,hi;"object"==typeof window&&Rt(window.csQueueMicrotask)&&(ri=window.csQueueMicrotask);const ci=new hs,ai=new hs;let ui=1;function li(t,s="high"){const e=ui;ci.isEmpty&&ai.isEmpty&&di((()=>{if(ui!==e)return;const t=ms((()=>{for(;!ai.isEmpty;){ai.pop()()}for(;!ci.isEmpty;){ci.pop()()}ai.isEmpty||t()}),"groupMicrotask.run");t()}));const i=ns(`groupMicrotask:${s}:${t.name||t.toString()}`,t);"high"===s?ai.push(i):ci.push(i)}function di(t,s=10){ri(0===s?t:()=>di(t,s-1))}async function fi(t=1){for(let s=0;s<t;s++)await new Promise((t=>li(t)))}function pi(){const t=new Set;return{add(s){t.add(s),1===t.size&&csSetTimeout((()=>{t.clear()}))},has:s=>t.has(s),del(s){t.delete(s)},clear(){t.clear()},values:()=>Us(t),get count(){return t.size}}}function vi(t,s=!1){const e=pi();return{push(i){if(0===e.count){(s?li:csSetTimeout)((()=>{t(e.values()),e.clear()}))}e.add(i)}}}var mi;const gi={childList:!0,subtree:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,attributeOldValue:!0};class wi{static setShadowRootFilter(t){csArray.prototype.push.call(mi.shadowRootFilters,t)}static Se(t){if(mi.shadowRootFilters.length>0&&S(t))for(let s=0;s<mi.shadowRootFilters.length;s++){if((0,mi.shadowRootFilters[s])(t))return}this.observedTargets.add(t),this.mutationObserver.observe(t,gi)}static disconnectShadowRoot(t){if(!this.observedTargets.has(t))return;this.observedTargets.delete(t);const s=this.mutationObserver.takeRecords();mi.mutationCallback(s),this.mutationObserver.disconnect(),this.observedTargets.forEach((t=>{this.mutationObserver.observe(t,gi)}))}static observe(t,s){csArray.prototype.push.call(this.callbacks,t),s&&csArray.prototype.push.call(this.shadowRootCallbacks,s),this.started?s&&csArray.prototype.forEach.call(ee.getAllShadowHosts(document),(t=>s(csElementshadowRoot.apply(t),"initial"))):(this.mutationObserver=new csMutationObserver(this.mutationCallback),this.Se(document),this.shadowRootObserver=new ne(this.onShadowRoot),this.shadowRootObserver.observe(),this.started=!0,xs(this.shadowRootObserver.shadowRoots,(t=>{this.Se(t)})))}static disconnect(t,s){var e,i;this.callbacks=csArray.prototype.filter.call(this.callbacks,(s=>s!==t)),s&&(this.shadowRootCallbacks=csArray.prototype.filter.call(this.shadowRootCallbacks,(t=>t!==s))),0===this.callbacks.length&&(this.callbacks=[],this.shadowRootCallbacks=[],mi.shadowRootFilters=[],null===(e=this.shadowRootObserver)||void 0===e||e.disconnect(),null===(i=this.mutationObserver)||void 0===i||i.disconnect(),this.observedTargets.clear(),this.started=!1)}constructor(t,s){this.Ss=t,this.Te=s;const e=vi((s=>t(s,this)),!0);this.Ss=ns("DocumentMutationObserver:callback",(t=>{xs(t,(t=>e.push(t)))}))}get shadowRoots(){var t,s;return null!==(s=null===(t=mi.shadowRootObserver)||void 0===t?void 0:t.shadowRoots)&&void 0!==s?s:[]}takeRecords(){var t;const s=null===(t=mi.mutationObserver)||void 0===t?void 0:t.takeRecords(),e=mi.shadowRootObserver.takeRecords();return(null==s?void 0:s.length)&&e.length?function(t,s,e){const i=t.length+s.length+((null==e?void 0:e.length)||0),n=new csArray(i);let r=0;for(let s=0;s<t.length;s++)n[r++]=t[s];for(let t=0;t<s.length;t++)n[r++]=s[t];if(!e)return n;for(let t=0;t<e.length;t++)n[r++]=e[t];return n}(s,e):null!=s?s:e}observe(){mi.observe(this.Ss,this.Te)}disconnect(){mi.disconnect(this.Ss,this.Te)}}mi=wi,wi.callbacks=[],wi.shadowRootCallbacks=[],wi.started=!1,wi.observedTargets=new Set,wi.shadowRootFilters=[],wi.mutationCallback=t=>{si.mutations.count.increase(t.length),csArray.prototype.forEach.call(mi.callbacks,(s=>s(t,mi.mutationObserver)))},wi.onShadowRoot=(t,s)=>{xs(mi.shadowRootCallbacks,(e=>e(t,s))),"removed"!==s?mi.Se(t):mi.disconnectShadowRoot(t)},Hs([is()],wi.prototype,"observe",null),Hs([is()],wi.prototype,"disconnect",null);class yi{get selectors(){return""===this.Ie?null:this.Ie}constructor(t,s={closest:!1}){this.Ss=t,this.Pe=s,this.Ie="",this.be=pi(),this.Ve=ms((t=>{if(""===this.Ie)return;const s=[];for(const e of ks(t,(t=>t.addedNodes))){if(!(_(e)||this.Pe.closest&&d(e)))continue;Ms(this.Pe.closest?this.Ce(e,this.Ie):this.findMatchingElements(e,this.Ie),s)}s.length&&this.Ss(s,"added")}),"SelectorObserver.processMutations"),this.Ne=new wi(this.Ve)}observe(t){""===this.Ie?this.Ne.observe():this.Ie+=",",this.Ie+=t;const s=this.findMatchingElements(document,t);s.length&&(xs(s,(t=>{this.be.add(t)})),this.Ss(s,"initial"))}processPendingMutations(){this.Ve(this.Ne.takeRecords())}disconnect(){this.Ne.disconnect(),this.be.clear(),this.Ie=""}Ce(t,s){const e=[];if(d(t)){if(t.parentElement){const i=Ce(t.parentElement,s);i&&csArray.prototype.push.call(e,i)}return csArray.prototype.filter.call(e,(t=>!1===this.be.has(t)))}if(St(t)){const i=Ce(t,s);if(i)return csArray.prototype.push.call(e,i),csArray.prototype.filter.call(e,(t=>!1===this.be.has(t)))}return this.findMatchingElements(t,s)}findMatchingElements(t,s){const e=ks(ee.getAllShadowHosts(t),(t=>window.csquerySelectorAll[t.shadowRoot.nodeType].call(t.shadowRoot,s)));return Ms(window.csquerySelectorAll[t.nodeType].call(t,s),e),l(t)&&Ie.call(t,s)&&csArray.prototype.push.call(e,t),csArray.prototype.filter.call(e,(t=>!1===this.be.has(t)))}}var Ei;Hs([is()],yi.prototype,"observe",null),Hs([is()],yi.prototype,"disconnect",null),Hs([gs("SelectorObserver.findMatchingElements")],yi.prototype,"findMatchingElements",null),function(t){let s,e;t.ANONYMIZATION_STATUS_PROP="anonymizationStatus",t.CS_CAPTURE_ATTRIBUTE="data-cs-capture",t.ANONYMIZATION_WHITELISTED_STATUS="whitelisted",t.start=function(){s||(s=new yi((s=>function(s){xs(s,(s=>{Gs(s).visitAll((s=>function(s){Ee.setProperty(s,t.ANONYMIZATION_STATUS_PROP,t.ANONYMIZATION_WHITELISTED_STATUS)}(s)))}))}(s))));const i=e?`[${t.CS_CAPTURE_ATTRIBUTE}], ${e}`:`[${t.CS_CAPTURE_ATTRIBUTE}]`;s.observe(i)},t.stop=function(){s&&s.disconnect()},t.setWhitelistedElementsSelector=function(t){e=t},t.getWhitelistedElementsSelector=function(){return e},t.isWhitelisted=function(s){return Ee.getProperty(s,t.ANONYMIZATION_STATUS_PROP)===t.ANONYMIZATION_WHITELISTED_STATUS}}(Ei||(Ei={}));function Ai(t,s,e,i){var n,r=arguments.length,o=r<3?s:null===i?i=Object.getOwnPropertyDescriptor(s,e):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,s,e,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(s,e,o):n(s,e))||o);return r>3&&o&&Object.defineProperty(s,e,o),o}Object.create;Object.create;function _i(t){return Ct(t,"data:")}function Ri(t){return Ct(t,"#")}function Si(t){const s=csString.prototype.trim.call(t);if(""===t)return[];let[e,i]=(n=s,csString.prototype.split.call(n,/\s(.+)/));var n;return i?(Nt(e,",")||(i=function(t){return csString.prototype.split.call(t,/,(.+)/)[1]||""}(i)),[Ti(e),...Si(i)]):[Ti(e)]}function Ti(t){return csString.prototype.split.call(t,/,$/)[0]}const Ii=/(@import\s*("([^"]+)"|'([^']+)'))|(url\s*\(\s*((("([^"\]]+)"|'([^'\]]+)')\s*)|([^)\]]+))\))/g;function Pi(t,s){const e=csString.prototype.replace.call(t,Ii,((...t)=>{const e=t[3]||t[4],i=t[9]||t[10]||t[11],n=function(t){const s=/(\\)*\\(?:([a-fA-F0-9]{1,6})|(.))[\n\t\x20]?/g;return csString.prototype.replace.call(t,s,((t,s,e,i)=>{if("\\"===s)return csString.prototype.slice.call(t,1);if(i)return i;const n=parseInt(e,16);return 55296<=n&&n<=57343||0===n||n>1114111?"�":csString.fromCodePoint(n)}))}((e||i).trim());return`${e?"@import ":""}url(${function(t){if(-1===csString.prototype.indexOf.call(t,'"'))return`"${t}"`;if(-1===csString.prototype.indexOf.call(t,"'"))return`'${t}'`;return t}(s(n)||n)})`}));return e}function bi(t){const s=new Set;return Pi(t,(t=>{var e,i;return s.add(null!==(i=null===(e=csString.prototype.match.call(t,/^["|'](.*)?["|']$/))||void 0===e?void 0:e[1])&&void 0!==i?i:t),t})),Us(s)}const Vi=new Map,Ci=!Mt&&document.implementation.createHTMLDocument("");function Ni(t){if(!m(t))return null;const s=Oi(t);if(null===s||0===s.length)return null;let e="";if(function(t){const s=t.length;for(let e=0;e<s;e++)switch(csString.prototype.charCodeAt.call(t,e)){case 9:case 10:case 11:case 12:case 13:case 32:case 160:continue;default:return!1}return!0}(t.textContent))xs(s,(t=>e+=t.cssText));else{const i=function(t){if(!Ci)return 0;let s=Vi.get(t.textContent);if(s)return s;const e=t.cloneNode(!0);e.textContent=t.textContent,Ci.head.appendChild(e);const i=Oi(e);return s=i?i.length:0,Vi.set(t.textContent,s),Ci.head.removeChild(e),s}(t);if(i===s.length)return null;const n=new csArray(s.length-i);for(let t=i,e=0;t<s.length;t+=1,e+=1)n[e]=s[t];xs(n,(t=>e+=t.cssText))}return e}function Oi(t){try{if(t.disabled)return null;const s=t.sheet;return s?s.cssRules||s.rules:null}catch(t){if("SecurityError"!==t.name&&"InvalidAccessError"!==t.name)throw t;return null}}const ki=t=>t instanceof HTMLFormElement?"form":t.localName;class xi{constructor(t){this.csId=Re(t),this.props=ye.getStore(t)}}class $i extends xi{constructor(t){super(t),this.nodeType=3,this.data=t.data}}class Li extends xi{constructor(t){var s;super(t),this.attributes=[],this.nodeType=1,this.localName=ki(t),this.namespaceURI=null!==(s=t.namespaceURI)&&void 0!==s?s:void 0,this.children=[];const e=Ni(t);if(e){this.children=new csArray(csNodechildNodes.apply(t).length);const s=document.createTextNode(e),i=new $i(s);csArray.prototype.push.call(this.children,i)}E(t)&&Ee.setProperty(this,"SVG",!0)}static isElement(t){return 1===t.nodeType}static getAttribute(t,s){return $s(t.attributes,(t=>t.name===s))}static getAttributeValue(t,s){var e;return null===(e=this.getAttribute(t,s))||void 0===e?void 0:e.value}}class Di{constructor(t){this.type="asyncEvent",this.Oe=!1,t&&t((t=>this.resolve(t)))}resolve(t){if(this.Oe)throw new Error("AsyncEvent already resolve.");null==t.timestamp&&(t={...t,timestamp:this.timestamp}),this.ke=t,this.Oe=!0,this.Ss&&this.Ss(this.ke)}complete(t){this.Oe&&t(this.ke),this.Ss=t}wait(){return new Promise((t=>this.complete(t)))}}var Mi,Ui;!function(t){function s(){const t=[i()];return document.documentElement&&csArray.prototype.push.call(t,document.documentElement.scrollHeight,document.documentElement.offsetHeight,document.documentElement.clientHeight),document.body&&csArray.prototype.push.call(t,document.body.scrollHeight,document.body.offsetHeight),Math.max(...t)}function e(){return document.documentElement.scrollWidth}function i(){return window.innerHeight}function n(){return window.innerWidth}function r(){const t=window.csScreen.width;return wt(t)&&t>0?t:window.screen.width}function o(){const t=window.csScreen.height;return wt(t)&&t>0?t:window.screen.height}t.documentHeight=s,t.documentWidth=e,t.windowHeight=i,t.windowWidth=n,t.screenWidth=r,t.screenHeight=o,t.windowOffsetX=function(){return window.pageXOffset},t.windowOffsetY=function(){return window.pageYOffset},t.getRequestParameters=function(){return{dw:`${e()}`,dh:`${s()}`,ww:`${n()}`,wh:`${i()}`,sw:`${r()}`,sh:`${o()}`}}}(Mi||(Mi={}));const Fi=null!==(Ui=Ut.Node)&&void 0!==Ui?Ui:Object;var qi;!function(t){const s="isConnected"in Fi.prototype?t=>t.isConnected:t=>!(t.ownerDocument&&t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED);t.forEachChild=function(t,s){for(let e=t;e;e=csNodenextSibling.apply(e))s(t)},t.isConnected=function(t){return s(t)},t.getAncestors=function(t,s){const e=[];for(const n of i(t,s))csArray.prototype.push.call(e,n);return e};const e=(t,s)=>{var e;return null!==(e=csNodeparentNode.apply(t))&&void 0!==e?e:s&&S(t)?t.host:null};function*i(t,s=!1){let i=t;for(;i;){yield i;const t=e(i,s);if(!t||t===i)break;i=t}}function n(s){var e;return s.parentElement?s.parentElement:t.getRootNode(s)?null===(e=t.getRootNode(s))||void 0===e?void 0:e.host:null}function r(t){var s,e;if(!1===(null===(s=t.checkVisibility)||void 0===s?void 0:s.call(t,{checkOpacity:!0,checkVisibilityCSS:!0})))return!0;if(!t.offsetParent){if(!t.getBoundingClientRect)return es.warn(`SUP-11432: Element doesn't have getBoundingClientRect. Node: ${t instanceof Fi} Ctor: ${null===(e=null==t?void 0:t.constructor)||void 0===e?void 0:e.name}`),!1;const s=t.getBoundingClientRect();if(0==s.width&&0==s.height)return!0}const i=window.getComputedStyle(t);if(!i)return!0;var n;return"none"===i.display||"hidden"===i.visibility||"collapse"===i.visibility||"0"===i.opacity||"opacity(0)"===i.filter||"0px"===i.width&&"0px"===i.height||("transparent"===(n=i.color)||/^(rgba|hsla)\(\d+, \d+%?, \d+%?, 0\)$/.test(n))}function o(t){const s=t.getBoundingClientRect(),e=s.left+.5*s.width,i=s.top+.5*s.height;return h(document,e,i)}function h(s,e,i){const n=s.elementFromPoint(e,i);if(!n)return null;const r=ee.getShadowRoot(n);return r&&r!=t.getRootNode(document.body)&&r!==s?h(r,e,i):n}function c(t){const s=o(t);return null!==s&&(t===s||t.contains(s))}t.findAncestor=function(t,s,i=!1){let n=t;for(;n;){if(s(n))return n;const t=e(n,i);if(!t||t===n)break;n=t}return null},t.walkUp=i,t.isDescendantOf=function s(e,i){if(e===i||i.contains(e))return!0;const n=t.getParentElement(e);return!(!n||n===e)&&s(n,i)},t.getParentElement=n,t.findAllElements=function(t,s=document){const e=Ns(window.csquerySelectorAll[s.nodeType].call(s,t)),i=ee.getAllShadowHosts(s);for(const s of i){const i=ee.getShadowRoot(s);if(!i)continue;const n=Ns(window.csquerySelectorAll[i.nodeType].call(i,t));csArray.prototype.push.call(e,...n)}return e},t.getRootNode=(()=>{if("getRootNode"in Fi.prototype)return(t,s)=>t.getRootNode(s);function t(e){const i=s(e);return S(i)?t(i.host):i}function s(t){return null!=csNodeparentNode.apply(t)?s(csNodeparentNode.apply(t)):t}return(e,i)=>"object"==typeof i&&Boolean(i.composed)?t(e):s(e)})(),t.isHiddenByCSS=r,t.areAncestorsHiddenByCSS=function t(s){if(r(s))return!0;const e=n(s);return null!=e&&t(e)},t.getTopAncestorHiddenByCSS=function(t){let s=null,e=t;do{if(!r(e))break;s=e}while(e=n(e));return s},t.getTopElement=o,t.getElementOnTop=function(s){if(!s.getBoundingClientRect)return null;const e=s.getBoundingClientRect(),i=e.x+e.width/2,n=e.y+e.height/2;return t.getTopElementFromPoint(document,i,n)},t.getTopElementFromPoint=h,t.isVisibleInDocument=function(t){return!function(t){const s=t.getBoundingClientRect();return s.right+Mi.windowOffsetX()<0||s.bottom+Mi.windowOffsetY()<0}(t)&&!r(t)&&!function(t){const s=o(t);return null!==s&&!t.contains(s)}(t)},t.isVisibleInViewportInForeground=function(t){return!r(t)&&c(t)},t.isInViewPort=c,t.getAttributeNS=function(t,s,e){const i=t.getAttributeNS(s,e);return""===i?t.hasAttributeNS(s,e)?i:null:i},t.isElementFocusable=function(t){return!!t.hasAttribute("tabIndex")||("true"===t.getAttribute("contentEditable")||(!(!p(t)||!t.hasAttribute("href"))||(!(!(A(t)||w(t)||g(t)||(s=t,l(s)&&"button"===s.localName))||t.hasAttribute("disabled"))||!(!function(t){return l(t)&&"details"===t.localName}(t)&&!function(t){return l(t)&&"summary"===t.localName}(t)))));var s}}(qi||(qi={}));const Bi=csSymbol();class Hi{constructor(t){var s,e,i,n,r,o,h,c;this.Ss=t,this.xe=null,this.$e=null,this.Le=null,this.De=null,this.Me=vi((t=>this.processUpdateRulesInATick(t))),this.Ss=s=>li((()=>t(s))),"function"==typeof(null===(e=null===(s=window.CSSStyleSheet)||void 0===s?void 0:s.prototype)||void 0===e?void 0:e.insertRule)&&(this.xe=te({target:window.CSSStyleSheet.prototype,methodName:"insertRule",hook:({context:t,args:s})=>{this.processInsertRule(t,s)}})),"function"==typeof(null===(n=null===(i=window.CSSStyleSheet)||void 0===i?void 0:i.prototype)||void 0===n?void 0:n.deleteRule)&&(this.$e=te({target:window.CSSStyleSheet.prototype,methodName:"deleteRule",hook:({context:t,args:s})=>{this.processDeleteRule(t,s)}})),"function"==typeof(null===(o=null===(r=window.CSSGroupingRule)||void 0===r?void 0:r.prototype)||void 0===o?void 0:o.insertRule)&&(this.Le=te({target:window.CSSGroupingRule.prototype,methodName:"insertRule",hook:({context:t})=>this.processUpdateRule(t)})),"function"==typeof(null===(c=null===(h=window.CSSGroupingRule)||void 0===h?void 0:h.prototype)||void 0===c?void 0:c.deleteRule)&&(this.De=te({target:window.CSSGroupingRule.prototype,methodName:"deleteRule",hook:({context:t})=>this.processUpdateRule(t)}))}observe(){var t,s,e,i;null===(t=this.xe)||void 0===t||t.activate(),null===(s=this.$e)||void 0===s||s.activate(),null===(e=this.Le)||void 0===e||e.activate(),null===(i=this.De)||void 0===i||i.activate()}disconnect(){var t,s,e,i;null===(t=this.xe)||void 0===t||t.deactivate(),null===(s=this.$e)||void 0===s||s.deactivate(),null===(e=this.Le)||void 0===e||e.deactivate(),null===(i=this.De)||void 0===i||i.deactivate()}processInsertRule(t,[s,e]){if(null==t[Bi]&&!t.ownerNode)return;const i={type:"cssRuleInserted",sheet:t,rule:s,index:e};this.Ss(i)}processUpdateRule(t){let s=t;for(;null!==s.parentRule;)s=s.parentRule;null!==s.parentStyleSheet&&this.Me.push(s)}processUpdateRulesInATick(t){for(const s of t){if(null===s.parentStyleSheet)return;const t=s.parentStyleSheet,e=csArray.prototype.indexOf.call(Ns(t.cssRules),s);if(-1===e)return;const i={type:"cssRuleUpdated",sheet:t,rule:s.cssText,index:e};this.Ss(i)}}processDeleteRule(t,[s]){if(null==t[Bi]&&!t.ownerNode)return;const e={type:"cssRuleDeleted",sheet:t,index:s};this.Ss(e)}}Hs([is()],Hi.prototype,"observe",null),Hs([is()],Hi.prototype,"disconnect",null),Hs([is()],Hi.prototype,"processInsertRule",null),Hs([is()],Hi.prototype,"processUpdateRule",null),Hs([is()],Hi.prototype,"processUpdateRulesInATick",null),Hs([is()],Hi.prototype,"processDeleteRule",null);class ji{constructor(t){this.Ue=1,this.Fe=new Set,this.qe=null,this.Be=null,this.He=(t,s)=>{"initial"!==s&&"added"!==s||this.setStyleSheets(t,t.adoptedStyleSheets)},this.je=t=>{const s=t.sheet;if(this.Fe.has(s))if("cssRuleInserted"===t.type){const e={type:"adoptedStyleSheetRuleInserted",sheetId:s[Bi],rule:t.rule,index:t.index};this.Ss(e)}else if("cssRuleDeleted"===t.type){const e={type:"adoptedStyleSheetRuleDeleted",sheetId:s[Bi],index:t.index};this.Ss(e)}else if("cssRuleUpdated"===t.type){const e={type:"adoptedStyleSheetRuleUpdated",sheetId:s[Bi],rule:t.rule,index:t.index};this.Ss(e)}},this.Ss=s=>li((async()=>{await fi(2),t(s)})),this.Os=new ne(this.He),"adoptedStyleSheets"in Document.prototype&&(this.qe=se(window.Document.prototype,"adoptedStyleSheets",((t,s)=>{this.setStyleSheets(t,s)}))),"ShadowRoot"in window&&"adoptedStyleSheets"in window.ShadowRoot.prototype&&(this.Be=se(window.ShadowRoot.prototype,"adoptedStyleSheets",((t,s)=>{this.setStyleSheets(t,s)}))),this.ze=new Hi(this.je)}observe(){var t,s;this.setStyleSheets(document,document.adoptedStyleSheets),this.Os.observe(),null===(t=this.qe)||void 0===t||t.activate(),null===(s=this.Be)||void 0===s||s.activate(),this.ze.observe()}disconnect(){var t,s;this.Fe.clear(),this.Os.disconnect(),null===(t=this.qe)||void 0===t||t.deactivate(),null===(s=this.Be)||void 0===s||s.deactivate(),this.ze.disconnect()}setStyleSheets(t,s){if(!s.length)return;this.Ge(s);const e={type:"adoptedStyleSheetsSet",target:t,sheetsIds:Os(s,(t=>t[Bi]))};this.Ss(e)}Ge(t){xs(t,(t=>{if(this.Fe.has(t))return;const s=this.Ue++;t[Bi]=s,this.Fe.add(t);const e={type:"adoptedStyleSheetRegistered",sheetId:s,cssRules:this.Ze(t)};this.Ss(e)}))}Ze(t){let s=[];try{s=Os(t.cssRules,(t=>t.cssText))}catch{}return s}}Hs([is()],ji.prototype,"observe",null),Hs([is()],ji.prototype,"disconnect",null),Hs([is()],ji.prototype,"setStyleSheets",null);const zi=ms((function(t){const s=[],e=function(t){const s=new Map,e=t=>{let e=s.get(t);return e||s.set(t,e=[]),e},i=(t,s)=>{const i=e(t);i.length&&"insert"!==i[0].operation&&"remove"!==i[0].operation&&(i.length=0),csArray.prototype.push.call(i,s)};for(const s of t)switch(s.type){case"attributes":{const t=e(s.target);if(t.length&&"attribute"!==t[0].operation)continue;const i=csArray.prototype.findIndex.call(t,(t=>"attributes"===t.mutation.type&&t.mutation.attributeName===s.attributeName)),n={operation:"attribute",mutation:s};i>=0?t[i]=n:csArray.prototype.push.call(t,n)}break;case"characterData":{const t=e(s.target);if(t.length&&"characterData"!==t[0].operation)continue;t[0]={operation:"characterData",mutation:s}}break;case"childList":xs(s.removedNodes,(t=>i(t,{operation:"remove",mutation:s}))),xs(s.addedNodes,(t=>i(t,{operation:"insert",mutation:s})))}return s}(t=function(t){const s=t=>{switch(t.type){case"attributes":return t.target.getAttribute(t.attributeName);case"characterData":return t.target.data}throw new Error("not supported type")},e=csSymbol(),i=csSymbol(),n=t=>{let s;for(const n of qi.walkUp(t)){if(n[e]||n[i])return n;s=t}return s},r=[];for(const o of t){if("childList"===o.type){xs(o.addedNodes,(t=>t[e]=!0)),csArray.prototype.push.call(r,o);continue}if(s(o)===o.oldValue)continue;const t=n(o.target);(null==t?void 0:t[e])||(csNodeparentNode.apply(o.target)&&(csNodeparentNode.apply(o.target)[i]=!0),csArray.prototype.push.call(r,o))}return r}(t));for(const i of t)switch(i.type){case"attributes":case"characterData":csArray.prototype.push.call(s,i);break;case"childList":csArray.prototype.push.call(s,...Zi(i,e))}return Os(Ds(s,(t=>!function(t,s){if("attributes"===t.type||"characterData"===t.type){return!Ls(s.get(t.target),(s=>s.mutation===t))}if(t.addedNodes.length){if(t.target===document.body)return!1;const e=t=>{var e;return"insert"===(null===(e=s.get(t))||void 0===e?void 0:e[0].operation)};if(e(t.target))return!0;return null!==qi.findAncestor(t.target,e,!0)}return!1}(t,e))),(t=>"childList"===t.type&&1===t.addedNodes.length?{nextSibling:csNodenextSibling.apply(t.addedNodes[0]),previousSibling:t.previousSibling,target:t.target,type:"childList",addedNodes:t.addedNodes,removedNodes:t.removedNodes}:t))}),"optimizeMutations");var Gi;function Zi(t,s){var e,i;if(t.addedNodes.length&&!t.removedNodes.length&&!Ls(t.addedNodes,qi.isConnected))return[];if(!(t=>Ls(t.addedNodes,(t=>s.get(t).length>1))||Ls(t.removedNodes,(t=>s.get(t).length>1)))(t)){const s=Ji(t),e=Qi(t);if(s||e){const i=[];return csArray.prototype.push.call(i,{nextSibling:s,previousSibling:e,target:t.target,type:"childList",addedNodes:t.addedNodes,removedNodes:t.removedNodes}),i}return[t]}const n=function(t,s){return Ds(t.addedNodes,(e=>{const i=Yi(e,s),n=Ds(s.get(e),(t=>"insert"===t.operation));switch(i){case Gi.Insert:return t===n[n.length-1].mutation;case Gi.None:return!0;case Gi.Move:case Gi.Remove:case Gi.NoOp:return!1}}))}(t,s),r=function(t,s){return Ds(t.removedNodes,(e=>{const i=Yi(e,s),n=Ds(s.get(e),(t=>"remove"===t.operation));switch(i){case Gi.Remove:return t===n[n.length-1].mutation;case Gi.None:return!0;case Gi.Move:case Gi.Insert:case Gi.NoOp:return!1}}))}(t,s),o=function(t,s){return Ds(t.addedNodes,(e=>{const i=Ds(s.get(e),(t=>"insert"===t.operation));return Yi(e,s)===Gi.Move&&t===i[i.length-1].mutation}))}(t,s),h=Wi(n),c=Wi(o),a=[];if(h.length>1||c.length>1){const s=function(t,s,e,i){const n=[];let r=!0;return xs(t,(t=>{0!==t.length&&(csArray.prototype.push.call(n,{nextSibling:csNodenextSibling.apply(t[t.length-1]),previousSibling:t[0].previousSibling,target:e.target,type:"childList",addedNodes:t,removedNodes:r?i:[]}),r=!1)})),xs(s,(t=>{0!==t.length&&csArray.prototype.push.call(n,{nextSibling:csNodenextSibling.apply(t[t.length-1]),previousSibling:t[0].previousSibling,target:e.target,movedNodes:t,addedNodes:[],removedNodes:[],type:"childList"})})),function(t,s){const e=t=>{var s;return(null===(s=t.movedNodes)||void 0===s?void 0:s.length)?t.movedNodes[0]:t.addedNodes[0]},i=s=>function(t,s){const e=t.length;for(let i=0;i<e;i++)if(s(t[i],i))return i;return-1}(t.addedNodes,(t=>t===e(s)));csArray.prototype.sort.call(s,((t,s)=>i(t)-i(s)))}(e,n),n}(h,c,t,r);return csArray.prototype.push.call(a,...s),a}return(n.length>0||r.length>0)&&csArray.prototype.push.call(a,{nextSibling:null!==(e=Ji(t))&&void 0!==e?e:t.nextSibling,previousSibling:null!==(i=Qi(t))&&void 0!==i?i:t.previousSibling,target:t.target,type:"childList",addedNodes:n,removedNodes:r}),o.length&&csArray.prototype.push.call(a,{nextSibling:csNodenextSibling.apply(o[0]),previousSibling:o[0].previousSibling,target:t.target,movedNodes:o,addedNodes:[],removedNodes:[],type:"childList"}),a}function Wi(t){if(t.length<=1)return[t];const s=[];let e=0;for(let i=0;i<t.length-1;i+=1)csNodenextSibling.apply(t[i])!==t[i+1]&&(csArray.prototype.push.call(s,csArray.prototype.slice.call(t,e,i+1)),e=i+1);return e>0&&csArray.prototype.push.call(s,csArray.prototype.slice.call(t,e,t.length)),s}function Ji(t){if(t.nextSibling&&!qi.isConnected(t.nextSibling)){if(t.addedNodes.length)return csNodenextSibling.apply(t.addedNodes[t.addedNodes.length-1]);if(t.removedNodes.length)return csNodenextSibling.apply(t.removedNodes[t.removedNodes.length-1])}return t.nextSibling}function Qi(t){if(t.previousSibling&&!qi.isConnected(t.previousSibling)){if(t.addedNodes.length)return t.addedNodes[0].previousSibling;if(t.removedNodes.length)return t.removedNodes[0].previousSibling}return null}function Yi(t,s){var e,i;const n=s.get(t);return!n||n.length<=1?Gi.None:`${null===(e=n[0])||void 0===e?void 0:e.operation}-${null===(i=n[n.length-1])||void 0===i?void 0:i.operation}`}!function(t){t.Move="remove-insert",t.Remove="remove-remove",t.NoOp="insert-remove",t.Insert="insert-insert",t.None="none"}(Gi||(Gi={}));class Ki{constructor(t){this.Ss=t,this.We=t=>{t.sheet.ownerNode&&("cssRuleInserted"===t.type?this.Ss({type:t.type,target:t.sheet.ownerNode,rule:t.rule,index:t.index}):"cssRuleDeleted"===t.type?this.Ss({type:t.type,target:t.sheet.ownerNode,index:t.index}):"cssRuleUpdated"===t.type&&this.Ss({type:t.type,target:t.sheet.ownerNode,rule:t.rule,index:t.index}))},this.Ss=s=>li((()=>t(s))),this.Je=new Hi((t=>li((async()=>{await fi(),this.We(t)})))),"adoptedStyleSheets"in Document.prototype&&(this.Qe=new ji(t))}observe(){var t;this.ys=new wi((t=>this.Ye(t)),((t,s)=>{"added"===s&&this.Ke(t)})),this.ys.observe(),this.Je.observe(),null===(t=this.Qe)||void 0===t||t.observe()}disconnect(){var t,s;null===(t=this.ys)||void 0===t||t.disconnect(),this.Je.disconnect(),null===(s=this.Qe)||void 0===s||s.disconnect()}Ye(t){const s=zi(t);for(let t=0;t<s.length;t++){const e=s[t];if(e)switch(e.type){case"attributes":this.processAttributeChanged(e);break;case"characterData":this.processCharacterDataChanged(e);break;case"childList":this.processChildListChanged(e);break;default:es.error(`processRawMutations: unknown record type '${e.type}'`)}else es.error("processRawMutations: empty record")}}processAttributeChanged(t){const s={type:"attributeChanged",target:t.target,attribute:t.attributeName,namespace:t.attributeNamespace,oldValue:t.oldValue,newValue:qi.getAttributeNS(t.target,t.attributeNamespace,t.attributeName)};this.Ss(s)}processCharacterDataChanged(t){const s={type:"characterDataChanged",target:t.target,oldValue:t.oldValue,newValue:t.target.data};this.Ss(s)}processChildListChanged(t){var s,e,i;if(null===(s=t.removedNodes)||void 0===s?void 0:s.length){const s={type:"nodesRemoved",target:t.target,nodes:Os(t.removedNodes,(t=>t))};this.Ss(s)}if(null===(e=t.movedNodes)||void 0===e?void 0:e.length){const s={type:"nodesMoved",target:t.target,nodes:t.movedNodes,previousSibling:t.movedNodes[0].previousSibling||void 0,nextSibling:csNodenextSibling.apply(t.movedNodes[t.movedNodes.length-1])||void 0};this.Ss(s)}if(null===(i=t.addedNodes)||void 0===i?void 0:i.length){const s=[];if(xs(t.addedNodes,(t=>{csArray.prototype.push.call(s,t)})),0===s.length)return;const e={type:"nodesAdded",target:t.target,previousSibling:t.previousSibling,nextSibling:t.nextSibling,nodes:s};this.Ss(e)}}Ke(t){const s={type:"shadowRootAttached",target:t.host,shadowRoot:t};this.Ss(s)}}Hs([is()],Ki.prototype,"processAttributeChanged",null),Hs([is()],Ki.prototype,"processCharacterDataChanged",null),Hs([is()],Ki.prototype,"processChildListChanged",null);class Xi extends xi{constructor(t){super(t),this.nodeType=4,this.data=t.data}}class tn extends xi{constructor(t){super(t),this.nodeType=8,this.data=t.data}}class sn extends xi{constructor(t){super(t),this.nodeType=10,this.name=t.name,this.publicId=t.publicId,this.systemId=t.systemId}}class en extends xi{constructor(t){super(t),this.nodeType=9,this.baseURI=en.getBaseURI(t),this.children=[]}static getBaseURI(t){let s=t.baseURI;if(null==s){const e=t.getElementsByTagName("base");s=0!==e.length?e[0].href:t.URL}return s}}class nn extends xi{constructor(t){super(t),this.nodeType=11,this.mode=t.mode,this.children=[]}}class rn{constructor(t,s,e){var i;"string"==typeof t?(this.name=t,this.value=s,this.namespaceURI=null!=e?e:""):(this.name=t.name,this.value=t.value,this.namespaceURI=null!==(i=t.namespaceURI)&&void 0!==i?i:"")}static create(t){var s,e;const i=t.attributes,n=new csArray(i.length);for(let r=0;r<n.length;r++){const o=i[r];n[r]=new rn(o.name,o.value,o.namespaceURI),"href"===o.name&&v(t)&&(n[r].value=null!==(e=null===(s=t.sheet)||void 0===s?void 0:s.href)&&void 0!==e?e:o.value)}return n}}const on={workTime:40,async:!0,initialDOM:!0};cn();let hn=csSymbol("InitialDom");function cn(t=on){return function(s,e){var i;null!==(i=t.workTime)&&void 0!==i||(t.workTime=on.workTime);const n=ns("serialize:callback",(t=>e(t))),r=new hs,o=(s,e)=>{s.hasChildNodes()&&r.push({node:s,serializedNode:e});const i=s instanceof Element&&csElementshadowRoot.apply(s);if(i){const s=e.shadowRoot=un(i);t.async&&t.initialDOM&&Ee.setProperty(i,hn,!0),o(i,s)}};let h,c=!0,a=8;const u=ns("work",(()=>{var i;if(c)h=un(s),t.async&&t.initialDOM&&Ee.setProperty(s,hn,!0),o(s,h),c=!1;else if(r.isEmpty)return;const l=function(t){if(t<1)throw new Error("Precision should be >= 1");let s=0,e=performance.now();return{started:e,elapsed(){return++s%t==0&&(e=performance.now()),e-this.started}}}(100);for(;!r.isEmpty;){if(t.async&&l.elapsed()>=t.workTime)return void(--a<=0&&csSetTimeout(u));const{node:s,serializedNode:e}=r.pop(),n=null!==(i=e.children)&&void 0!==i?i:[];if(y(s))continue;let h=0;for(let e=csNodefirstChild.apply(s);e;e=csNodenextSibling.apply(e)){const s=un(e);t.async&&t.initialDOM&&Ee.setProperty(e,hn,!0),n[h++]=s,o(e,s)}}t.async?csSetTimeout((()=>n(h))):e(h)}));if(t.async)for(let t=0;t<a;t++)csSetTimeout(u,1);else t.workTime=1/0,u()}}const an=ms((function(t){const s=un(t),e=s;let i=0;for(let s=csNodefirstChild.apply(t);s;s=csNodenextSibling.apply(s))e.children[i++]=an(s);const n=t.shadowRoot;return n&&(e.shadowRoot=an(n)),s}),"serializeSync");function un(t){let s,e;switch(t.nodeType){case 1:e=s=new Li(t),s.attributes=function(t){if(y(t))return[];return rn.create(t)}(t);break;case 3:e=new $i(t);break;case 4:e=new Xi(t);break;case 8:e=new tn(t);break;case 10:e=new sn(t);break;case 9:e=new en(t);break;case 11:e=new nn(t);break;default:throw new Error("Node type not supported: "+t.nodeType)}return e}class ln{constructor(){this.Xe=[],this.isStarted=!1}produceEvent(t){this.isStarted&&(t.timestamp=It.now(),csArray.prototype.forEach.call(this.Xe,(s=>s(t))))}onStop(){}start(){this.isStarted||(this.isStarted=!0,this.onStart())}stop(){this.isStarted&&(this.isStarted=!1,this.onStop(),this.Xe=[])}subscribe(t){return csArray.prototype.push.call(this.Xe,t),()=>{const s=csArray.prototype.indexOf.call(this.Xe,t);csArray.prototype.splice.call(this.Xe,s,1)}}}const dn=cn();class fn extends ln{constructor(){super(...arguments),this.ti=!1}onStart(){this.ti=!0,this.Ss=function(t,s){let e=!1;const i=function(){if(!e)return t.apply(s,arguments)};return i.cancel=()=>e=!0,i}(this.si,this),this.Ne=new Ki(this.Ss),this.Ne.observe();const t=()=>{this.ti=!1,hn=csSymbol("InitialDom");si.mutations.initialDOM.asyncMeasure()()};this.produceEvent(new Di((s=>dn(document,(e=>{t(),s({type:"DomEvent",domEvent:"initialDOM",initialDOM:e})})))))}stopForInactivity(){this.isStarted&&(this.isStarted=!1,this.onStop())}onStop(){var t,s;this.ti=!1,null===(t=this.Ss)||void 0===t||t.cancel(),null===(s=this.Ne)||void 0===s||s.disconnect()}ei(t,s){const e={type:"DomEvent",domEvent:s.type,target:0,targetProps:{}};return"target"in s&&(e.target=Re(s.target),e.targetProps=Ee.getProperties(s.target)),[s,e]}si(t){if(!this.ii(t))switch(t.type){case"attributeChanged":{const[s,e]=this.ei(t.type,t);e.attribute=s.attribute,e.isSvg=E(s.target),e.namespace=s.namespace,e.newValue=s.newValue,e.oldValue=s.oldValue,e.localName=ki(s.target),e.linkRel=f(s.target)?s.target.rel:null,e.parentLocalName=s.target.parentElement?ki(s.target.parentElement):void 0,"input"===e.localName&&(e.inputType=s.target.getAttribute("type")),this.produceEvent(e)}break;case"characterDataChanged":{const[s,e]=this.ei(t.type,t);e.newValue=s.newValue,e.oldValue=s.oldValue,e.targetNodeType=s.target.nodeType,e.parentLocalName=s.target.parentElement?ki(s.target.parentElement):null,e.parentProps=s.target.parentElement?Ee.getProperties(s.target.parentElement):void 0,this.produceEvent(e)}break;case"nodesAdded":{const[s,e]=this.ei(t.type,t);e.targetLocalName=l(s.target)?ki(s.target):null,e.nextSibling=s.nextSibling?Re(s.nextSibling):null,e.previousSibling=s.previousSibling?Re(s.previousSibling):null,si.mutations.serializedMutations.measure((()=>{e.nodes=Os(s.nodes,an)})),this.produceEvent(e);break}case"nodesMoved":{const[s,e]=this.ei(t.type,t);e.previousSibling=s.previousSibling?Re(s.previousSibling):null,e.nextSibling=s.nextSibling?Re(s.nextSibling):null,e.nodesIds=Os(s.nodes,Re),this.produceEvent(e);break}case"nodesRemoved":{const[s,e]=this.ei(t.type,t);e.nodesIds=Os(s.nodes,Re),this.produceEvent(e);break}case"shadowRootAttached":{const[s,e]=this.ei(t.type,t);e.shadowRoot=un(s.shadowRoot),this.produceEvent(e);break}case"cssRuleInserted":{const[s,e]=this.ei(t.type,t);e.index=s.index,e.rule=s.rule,this.produceEvent(e);break}case"cssRuleDeleted":{const[s,e]=this.ei(t.type,t);e.index=s.index,this.produceEvent(e);break}case"cssRuleUpdated":{const[s,e]=this.ei(t.type,t);e.rule=s.rule,e.index=s.index,this.produceEvent(e);break}case"adoptedStyleSheetRegistered":{const[s,e]=this.ei(t.type,t);e.sheetId=s.sheetId,e.cssRules=s.cssRules,this.produceEvent(e);break}case"adoptedStyleSheetsSet":{const[s,e]=this.ei(t.type,t);e.sheetsIds=s.sheetsIds,this.produceEvent(e);break}case"adoptedStyleSheetRuleInserted":{const[s,e]=this.ei(t.type,t);e.sheetId=s.sheetId,e.rule=s.rule,e.index=s.index,this.produceEvent(e);break}case"adoptedStyleSheetRuleDeleted":{const[s,e]=this.ei(t.type,t);e.sheetId=s.sheetId,e.index=s.index,this.produceEvent(e);break}case"adoptedStyleSheetRuleUpdated":{const[s,e]=this.ei(t.type,t);e.sheetId=s.sheetId,e.rule=s.rule,e.index=s.index,this.produceEvent(e);break}}}ni(t){return this.ti&&!Ee.getProperty(t,hn)}ii(t){switch(t.type){case"nodesAdded":case"nodesMoved":case"nodesRemoved":case"shadowRootAttached":return this.ni(t.target)||Ne.isSensitive(t.target)||Ne.isSensitiveChild(t.target);case"characterDataChanged":{const s=t.target.parentElement;return null!==s&&(this.ni(s)||Ne.isSensitive(s)||Ne.isSensitiveChild(s))}case"attributeChanged":return this.ni(t.target)||Ne.isSensitiveChild(t.target)||Ne.isSensitiveAttribute(t.target,t.attribute);case"cssRuleInserted":case"cssRuleDeleted":case"cssRuleUpdated":return this.ni(t.target)||Ne.isSensitiveChild(t.target);default:return!1}}}var pn,vn;!function(t){t.isDOMEvent=function(t){return"DomEvent"===t.type}}(pn||(pn={}));class mn{constructor(){this.Xe=[]}start(){}stop(){this.Xe.length=0,this.Xe=[]}pushEvent(t){if(mn.pendingEvents++,this.isListening(t)){const s=this.Xe;csSetTimeout((()=>{const e=ns("Processor:processEvent",(t=>this.processEvent(t))),i=e(t);null!=i&&csArray.prototype.forEach.call(s,(t=>t(i))),mn.pendingEvents--}))}else csSetTimeout((()=>{csArray.prototype.forEach.call(this.Xe,(s=>s(t)))}))}subscribe(t){return csArray.prototype.push.call(this.Xe,t),()=>{this.Xe=csArray.prototype.filter.call(this.Xe,(s=>s!==t))}}emitEvent(t){li((()=>csArray.prototype.forEach.call(this.Xe,(s=>s(t)))))}}function gn(t){const s=new ArrayBuffer(t.length),e=new Uint8Array(s);for(let s=0,i=t.length;s<i;s+=1)e[s]=csString.prototype.charCodeAt.call(t,s);return s}function wn(t){const s=new Uint8Array(t);let e="";for(let t=0;t<s.byteLength;t+=1)e+=csString.fromCodePoint(s[t]);return e}function yn(t){return gn(self.atob(t))}function En(t){const s=csArray.from(new Uint8Array(t));return csArray.prototype.join.call(csArray.prototype.map.call(s,(t=>csString.prototype.padStart.call(t.toString(16),2,"0"))),"")}function An(t){const s=-1!==csString.prototype.indexOf.call(t,";base64,"),e=csString.prototype.indexOf.call(t,","),i=s?[csString.prototype.substring.call(t,0,e-7),csString.prototype.substring.call(t,e+1)]:[csString.prototype.substring.call(t,0,e),csString.prototype.substring.call(t,e+1)];if(!s&&/^%3Csvg/i.test(i[1]))try{i[1]=decodeURIComponent(i[1])}catch(t){es.warn(`${t}, calling decodeURIComponent on: ${i[1]}`)}const n=s?yn(i[1]):gn(i[1]);return new Blob([n],{type:csString.prototype.replace.call(i[0],"data:","")})}mn.pendingEvents=0,function(t){const s="replaceAll"in csString.prototype;t.ELLIPSIS="…",t.stringReplaceAll=function(t,e,i){if(s)return csString.prototype.replaceAll.call(t,e,i);const n=new RegExp((r=e,csString.prototype.replace.call(r,/[.*+?^${}()|[\]\\]/g,"\\$&")),"g");var r;return csString.prototype.replace.call(t,n,i)},t.truncate=function(t,s,e=""){return t.length<=s?t:csString.prototype.slice.call(t,0,s-e.length)+e}}(vn||(vn={}));class _n{static async toStaticResourceEvent(t,s,e){const i=await _n.oi(t);if(!i)return null;const n=await _n.hi(i),r=_i(t)?void 0:t,o={type:"StaticResourceManagerEvent",timestamp:e,resourceId:s,resource:{hash:n,data:i}};return r&&(o.originalResourceName=r),o}static async toCSSStaticResourceEvent(t,s,e,i){const n=await _n.ci(t,i),r=Bt(t),o=n.get(r);if(!o)return null;const h={type:"StaticResourceManagerEvent",timestamp:e,resourceId:s,resource:{hash:o.hash,data:o.data}};return n.delete(r),n.size&&(h.nestedResources=[],n.forEach((t=>{t&&csArray.prototype.push.call(h.nestedResources,{hash:t.hash,data:t.data})}))),h}static async hi(t){const s=await t.arrayBuffer();return En(await crypto.subtle.digest(this.ai,s))}static async oi(t){let s;if(_i(t)){const e=An(t);if(!e)return null;s=e}else{const e=await window.fetch(t);s=await e.blob()}return s}static async ci(t,s){const e=new Map,i=[{resourceRawPath:t,resourceAbsolutePath:Bt(t)}];for(;i.length>0;){const t=csArray.prototype.pop.call(i);if(!s&&null!==t.resourceAbsolutePath&&!_i(t.resourceAbsolutePath))e.set(t.resourceAbsolutePath,null);else if(void 0===e.get(t.resourceAbsolutePath))try{if(null===t.resourceRawPath||csString.prototype.indexOf.call(t.resourceRawPath,".css")>0){if(!t.data){const s=await fetch(t.resourceAbsolutePath);t.data=await s.text()}t.nestedResources||(t.nestedResources=bi(t.data));let s=!1,o=!1;for(const h of t.nestedResources){const c=_i(h)?h:t.resourceAbsolutePath?(n=h,r=t.resourceAbsolutePath,new csURL(n,r).href):Bt(h),a=e.get(c);if(void 0!==a){if(null!==a){const s=_n.ui(a,h);t.data=vn.stringReplaceAll(t.data,h,s)}continue}const u=void 0!==$s(i,(t=>t.resourceAbsolutePath===c));u||(s=!0,o||(csArray.prototype.push.call(i,t),o=!0),csArray.prototype.push.call(i,{resourceRawPath:h,resourceAbsolutePath:c}))}if(!s){const s=await _n.li(t.data);e.set(t.resourceAbsolutePath,{hash:s.hash,data:s.data})}}else{let s;if(_i(t.resourceAbsolutePath)){const i=An(t.resourceAbsolutePath);if(!i){e.set(t.resourceAbsolutePath,null);continue}s=i}else{const e=await fetch(t.resourceAbsolutePath);s=await e.blob()}const i=await _n.hi(s);e.set(t.resourceAbsolutePath,{hash:i,data:s})}}catch{e.set(t.resourceAbsolutePath,null)}}var n,r;return e}static ui(t,s){let e=`cs://resources/${t.hash}`;return _i(s)||(e+=`?${_n.fi}=${s}`),e}static async li(t){const s=new Blob([t],{type:"text/css"}),e=await s.arrayBuffer();return{data:s,hash:En(await crypto.subtle.digest(_n.ai,e))}}}_n.ai="SHA-256",_n.fi="original-resource-name";class Rn extends mn{constructor(){super(),this.pi="cssrm://",this.mi=0,this.gi=!1}isListening(t){return!!Rn.isSupported()&&(!!pn.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent))}processEvent(t){switch(t.domEvent){case"initialDOM":case"nodesAdded":this.wi(t);break;case"attributeChanged":this.yi(t);break;case"characterDataChanged":this.Ei(t)}return t}disableOnlineAssets(){this.gi=!1}enableOnlineAssets(){this.gi=!0}isOnlineAssetsActivated(){return this.gi}wi(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of s)Ee.traverse(t,((t,s)=>{if(3===t.nodeType&&s)return void this.Ai(t,s.localName);if(!Li.isElement(t))return;const e=$s(t.attributes,(t=>"style"===t.name));if(e&&(e.value=this._i(e.value)),this.Ri(t)||this.Si(t,s)){const s=$s(t.attributes,(t=>"src"===t.name));s&&s.value&&(s.value=this.Ti(s.value));const e=$s(t.attributes,(t=>"srcset"===t.name));if(e)return void(e.value=this.Ii(e.value))}if(this.Pi(t)&&this.gi){const s=$s(t.attributes,(t=>"href"===t.name));if(!s||!s.value)return;this.mi++,this.bi(Bt(s.value),this.mi,!0),this.Vi(t,s,this.mi)}}))}Vi(t,s,e){csArray.prototype.push.call(t.attributes,{name:"data-cs-original-href",namespaceURI:"",value:s.value}),s.value=this.pi+e}Ai(t,s){if(!t||"style"!==s)return;const e=this._i(t.data);null!==e&&(t.data=e)}Ei(t){if("style"!==t.parentLocalName||!t.newValue)return;const s=this._i(t.newValue);null!==s&&(t.newValue=s)}yi(t){if(!t.newValue||t.newValue===t.oldValue)return;const s="src"===t.attribute,e="srcset"===t.attribute;if("style"===t.attribute)return void(t.newValue=this._i(t.newValue));if(!s&&!e)return;const i="img"===t.localName,n="source"===t.localName&&t.parentLocalName&&"picture"===t.parentLocalName;(i||n)&&(s&&(t.newValue=this.Ti(t.newValue)),e&&(t.newValue=this.Ii(t.newValue)))}Ti(t){return _i(t)||this.gi?(this.mi++,this.bi(t,this.mi,!1,It.now()),this.pi+this.mi):t}Ii(t){if(!this.gi)return t;let s=t;const e=Si(t),i=It.now();for(const t of e)this.mi++,this.bi(Bt(t),this.mi,!1,i),s=csString.prototype.replace.call(s,t,this.pi+this.mi);return s}_i(t){const s=bi(t);let e=t;const i=It.now();for(const t of s){const s=_i(t);if(!s&&!this.gi)continue;if(this.Ci(t))continue;this.mi++,e=csString.prototype.replace.call(e,t,this.pi+this.mi);const r=!!(n=t)&&Nt(n,".css");s?this.bi(t,this.mi,!1,i):this.gi&&(r?this.bi(t,this.mi,!0,i):this.bi(Bt(t),this.mi,!1,i))}var n;return e}bi(t,s,e,i=It.now()){const n=e?_n.toCSSStaticResourceEvent:_n.toStaticResourceEvent,r=new Di((async e=>{try{const r=await n(t,s,i,this.gi);e(r||{type:"warning",message:`Failed to process static resource: ${t}`})}catch(t){e({type:"warning",message:t})}}));this.emitEvent(r)}Ri(t){return"img"===t.localName}Si(t,s){return"source"===t.localName&&!!s&&"picture"===s.localName}Pi(t){return"link"===t.localName&&csArray.prototype.some.call(t.attributes,(t=>"rel"===t.name&&"stylesheet"===t.value))}static isSupported(){return bt()&&function(){var t;return"undefined"!=typeof crypto&&Rt(null===(t=crypto.subtle)||void 0===t?void 0:t.digest)}()&&!!csArray.from}Ci(t){return 0===csString.prototype.replace.call(t,/['"]+/g,"").length}}Ai([gs("StaticResourceManagerProcessor.processEvent")],Rn.prototype,"processEvent",null);class Sn extends Me{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,v,m,g=[],w,y,E,A,_){super(),this.L=t,this.Ni=s,this.Oi=e,this.ki=i,this.xi=n,this.$i=r,this.J=o,this.Li=h,this.Di=c,this.Mi=a,this.Ui=u,this.Fi=l,this.qi=d,this.Bi=f,this.Hi=p,this.ji=v,this.zi=m,this.Gi=g,this.Zi=w,this.Wi=y,this.Ji=E,this.Qi=A,this.Yi=_,this.Ki=0,this.Xi=new De,this.tn={allowFromQuotaService:!0,allowFromSerialization:!0},this.en=ce((()=>{this.Ni.eventsCount()>0&&this.nn()}),2e3),this.rn=t=>this.processBrowserEvent(t),this.hn=t=>this.cn(t),this.an=0,this.un=0,this.ln=new je,this.dn=!1,this.fn=51200,this.vn=!1,this.mn=!1,this.gn=[],this.wn=new ni((t=>this.yn(t)),(t=>{switch(t){case ii.Active:this.Zi.start();break;case ii.Stopped:this.Zi.stopForInactivity()}}),[ae.RESOURCE_HASHES]),this.En=t=>{this.qi.removeBatchInProgress(`${t.params.sn}.${t.params.pn}.${t.params.ri}`)}}init(){this.An(),this.Fi.onLoad(this.En),this.Fi.onError(this.En)}An(){var t,s,e;this.ji.onEvent(this.rn,this.hn),this.xi.onEvent(this.hn),null===(t=this.Ui)||void 0===t||t.onInputNodeToEncrypt(this.hn),null===(s=this.Ui)||void 0===s||s.onApiErrorToEncrypt((t=>{this._n(t)})),null===(e=this.Ui)||void 0===e||e.onUserIdentifierToEncrypt(this.rn),this.ln.onEvent((t=>t===Be.Blur?this.Rn():this.dn?void 0:(this.dn=!0,csSetTimeout((()=>{this.dn=!1})),t===Be.Hidden?this.Rn():this.Sn())))}isRecording(){return this.J.hasValidSession()&&this.isStarted}Rn(){if(!this.canSendEvents())return;this.ji.flush(),this.qi.saveBatchesInProgress(),xs(this.Gi,(t=>{var s,e;return xs(null!==(e=null===(s=t.getPendingEvents)||void 0===s?void 0:s.call(t))&&void 0!==e?e:[],(t=>this.Ni.addEvent(t)))}));const t=this.Ni.getEvents();if(0===t.length)return;this.Ni.addEvent({date:It.now(),type:ae.RECORDING_INFO_EVENT,args:["pendingEvents",this.ji.pendingEvents]});const s=this.Fi.getQueryParams();s.rst=this.getRecordingStartTimestamp(),s.let=this.getRecordingLastEventTimestamp();const e=this.ki.getCurrentIndex();s.ri=e.toString(),this.Hi.removeQueryParams(),this.Hi.setQueryParams(s),this.un=t[t.length-1].date;const i=this.Ni.stringifyEvents();if(i.length>this.fn){const t=this.Tn();if(t.length>0){const e=W(t);this.Hi.send(e)||this.qi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:e}),this.ki.increment()}if(this.Ni.eventsCount()>0){s.ri=this.ki.getCurrentIndex().toString();const t=this.Ni.stringifyEvents();this.qi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:t}),this.ki.increment()}}else{this.Hi.send(i)||this.qi.save({key:`${s.sn}.${s.pn}.${s.ri}.last`,metadata:{...s,datatype:"json"},events:i}),this.ki.increment()}this.Hi.removeQueryParams(),this.Ni.clearEvents()}Sn(){if(!this.canSendEvents())return;this.ji.flush();const t=this.Fi.getQueryParams();this.qi.saveBatchesInProgress(),t.rst=this.getRecordingStartTimestamp(),delete t.ri,t.hlm="true",this.Hi.removeQueryParams(),xs(this.Gi,(t=>{var s,e;return xs(null!==(e=null===(s=t.getPendingEvents)||void 0===s?void 0:s.call(t))&&void 0!==e?e:[],(t=>this.Ni.addEvent(t)))}));const s=this.Ni.getEvents();if(0===s.length)return delete t.let,delete t.rst,this.Hi.setQueryParams(t),this.Hi.send(),void this.Hi.removeQueryParams();this.Ni.addEvent({date:It.now(),type:ae.RECORDING_INFO_EVENT,args:["pendingEvents",this.ji.pendingEvents]}),this.un=s[s.length-1].date,t.let=this.getRecordingLastEventTimestamp(),this.Hi.setQueryParams(t);const e=this.Ni.stringifyEvents();if(e.length>this.fn){const s=this.Tn();if(s.length>0){const e=W(s);this.Hi.send(e)||this.qi.save({key:`${t.sn}.${t.pn}.last`,metadata:{...t,datatype:"json"},events:e})}else delete t.let,delete t.rst,delete t.ri,this.Hi.removeQueryParams(),this.Hi.setQueryParams(t),this.Hi.send(),this.Hi.removeQueryParams();if(this.Ni.eventsCount()>0){t.rst=this.getRecordingStartTimestamp(),t.let=this.getRecordingLastEventTimestamp();const s=this.ki.getCurrentIndex();t.ri=s.toString();const e=this.Ni.stringifyEvents();this.qi.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:e}),this.ki.increment()}}else{this.Hi.send(e)||(this.qi.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:e}),this.ki.increment())}this.Hi.removeQueryParams(),this.Ni.clearEvents()}blockSendingEventsFromQuotaService(){this.tn.allowFromQuotaService=!1}allowSendingEventsFromQuotaService(){this.tn.allowFromQuotaService=!0}blockSendingEventsFromSerialization(){this.tn.allowFromSerialization=!1}allowSendingEventsFromSerialization(){this.tn.allowFromSerialization=!0}canSendEvents(){return this.tn.allowFromQuotaService&&this.tn.allowFromSerialization}onIframeJavascriptError(t){var s;if(this.Li&&this.Qi){null===(s=this.Li)||void 0===s||s.anonymize(t);const e=this.Qi.translate({message:t.message,colno:t.colno,lineno:t.lineno,filename:t.filename,timestamp:It.now(),type:"JSError"});e&&this.rn(e)}}onIframeCustomError(t){if(this.Yi){const s=this.Yi.translate({...t,timestamp:It.now(),type:"CustomError"});s&&this.rn(s)}}onIframeDetailedApiError(t){this.In(t)}onIframeRecordingUserEvent(t){for(const s of t)this.cn(s)}onIframeRecordingBrowserEvent(t){if(this.isStarted)for(const s of t)this.processBrowserEvent(s)}processBrowserEvent(t){this.$i.isCurrentPageviewValid()&&this.wn.pushEvent(t,{isUserEvent:!1})}cn(t){this.$i.refreshSession(),this.$i.isSessionValid()&&this.wn.pushEvent(t,{isUserEvent:!0})}yn(t){si.general.nbEvents.increase(),this.Ni.addEvent(t);this.Ni.isThresholdReached()?this.pushEvents():this.Ni.isFull()&&this.en(),this.Pn(t)}Pn(t){this.L.emitDebugEvents&&this.Xi.emit("recordingEvent",{...t,typeName:ae[t.type]})}onStart(){this.wn.reset(),Ei.start(),this.ln.start(),this.initStates(),this.zi.setSensitiveSettings(this.Bi.getSensitiveSettings()),this.ji.start(),this.Di&&this.Mi&&this.Di.subscribe(Sn.bn,(t=>this.In(t)),{detailedEvent:!0}),this.L.emitDebugEvents&&this.Xi.emit("replayRecordingStarted"),csArray.prototype.forEach.call(this.gn,(t=>this.Vn(t))),this.gn=[]}onStop(){var t;this.wn.disconnect(),Ei.stop(),this.ln.stop(),this.xi.stop(),this.Di&&this.Di.unsubscribe(Sn.bn),this.ji.stop(),this.mn=!1,null===(t=this.Wi)||void 0===t||t.disableOnlineAssets()}clearStates(){this.ji.flush(),this.en.cancel(),this.pushEvents(),this.Fi.removeQueryParams()}initStates(){this.an=It.now(),this.ki.reset(),this.Ki=0,this.Fi.setQueryParams(this.Oi.getRequestParameters())}pushEvents(){xs(this.Gi,(t=>{var s;return null===(s=t.flushEvents)||void 0===s?void 0:s.call(t)})),this.Ni.eventsCount()>0&&(this.isStarted?this.nn():this.Ni.clearEvents())}nn(){if(!this.canSendEvents())return;const t=this.Ni.getEvents();this.un=t[t.length-1].date;const s=this.ki.getCurrentIndex();this.Fi.setQueryParams({ri:s.toString(),rst:this.getRecordingStartTimestamp(),let:this.getRecordingLastEventTimestamp()});const e=this.Fi.getQueryParams();this.qi.addBatchInProgress(`${e.sn}.${e.pn}.${s}`,this.Fi.getQueryParams(),t),this.Fi.send(t),this.ki.increment(),this.Ni.clearEvents(),this.Cn&&this.Cn()}addInitialDom(t){this.Ni.addEventByTimestamp(t),this.Pn(t)}In(t){if(this.Ji&&(t.plainCustomRequestHeaders||t.plainCustomResponseHeaders||t.requestBodyAttributes||t.responseBodyAttributes||t.customRequestHeaders||t.customResponseHeaders||t.queryParameters||t.requestBody||t.responseBody)){if(this.Ji.truncate(t),this.Ui)return void this.Ui.registerApiErrorToEncrypt(t);t.customRequestHeaders="",t.customResponseHeaders="",t.requestBodyAttributes="",t.responseBodyAttributes="",t.queryParameters="",t.requestBody="",t.responseBody=""}this._n(t)}_n(t){if(this.Ki<Sn.Nn){const s={type:ae.API_ERROR,date:It.now(),args:[this.Mi.anonymize(t)]};this.rn(s),this.Ki=this.Ki+1}}On(t){t===qe.ETR_SESSION?this.Fi.setQueryParams({[Sn.kn]:Sn.xn}):t===qe.ETR_PAGE&&this.Fi.setQueryParams({[Sn.$n]:Sn.xn})}clearEvents(){this.Ni.clearEvents()}onCustomJavaScriptErrorEvent(t){var s;const e=null===(s=this.Qi)||void 0===s?void 0:s.translate({type:"JSError",timestamp:It.now(),message:t.message,colno:t.colno,lineno:t.lineno,filename:t.filename});e&&this.rn(e)}onCustomErrorEvent(t){var s;const e=null===(s=this.Yi)||void 0===s?void 0:s.translate({type:"CustomError",timestamp:It.now(),message:t.message,attributes:t.attributes});e&&this.rn(e)}onPageEvent(t){this.Ln(t)}onUserIdentifierEvent(t){var s;const e={userIdentifier:t,date:It.now(),keyId:this.L.encryptionPublicKeyId};null===(s=this.Ui)||void 0===s||s.registerUserIdentifierToEncrypt(e)}onEventTriggerRecording(t,s){this.isStarted?this.Vn({eventName:t,eventType:s}):csArray.prototype.push.call(this.gn,{eventName:t,eventType:s})}Vn(t){this.On(t.eventType),this.Ln(t.eventName),this.pushEvents()}Ln(t){const s={type:ae.PAGE_EVENT,date:It.now(),args:[{eventName:csString.prototype.slice.call(t,0,Sn.Dn)}]};this.Ni.addEvent(s)}triggerUnanonymizationConsentGranted(){const t={date:It.now(),type:ae.UNANONYMIZED_CONSENT_GRANTED};this.Ni.addEvent(t)}triggerUnanonymizationConsentWithdrawn(){const t={date:It.now(),type:ae.UNANONYMIZED_CONSENT_WITHDRAWN};this.Ni.addEvent(t)}triggerRecordingForSessionGranted(){const t={date:It.now(),type:ae.RECORDING_INFO_EVENT,args:[ue.RECORDING_CONSENT_FOR_SESSION_GRANTED]};this.Ni.addEvent(t)}triggerRecordingForSessionWithdrawn(){const t={date:It.now(),type:ae.RECORDING_INFO_EVENT,args:[ue.RECORDING_CONSENT_FOR_SESSION_WITHDRAWN]};this.Ni.addEvent(t)}activateOnlineAssetsOnNextPageview(){this.vn=!0,this.mn=!0}getStaticResourceManagerStatus(){return this.Wi?{isStarted:this.L.useStaticResourceManager&&Rn.isSupported(),onlineAssets:{activated:this.Wi.isOnlineAssetsActivated(),enabledOnNextPageview:this.vn,enabledForChildrenOnNextStart:this.mn}}:null}updateStaticResourceManagerOnlineAssets(){this.Wi&&this.vn&&(this.Wi.enableOnlineAssets(),this.mn=!0,this.vn=!1)}onRecordingRequestSent(t){this.Cn=t}getRecordingStartTimestamp(){return this.an.toString()}getRecordingLastEventTimestamp(){return this.un.toString()}onOptOut(){xs(this.Gi,(t=>{var s;return null===(s=t.releaseResources)||void 0===s?void 0:s.call(t)}))}Tn(){return this.Ni.extractEvents(ae.API_ERROR,ae.JAVASCRIPT_ERROR,ae.CUSTOM_ERROR,ae.TEXT_VISIBILITY,ae.POINTER_DOWN)}}Sn.bn="RecordingService",Sn.Dn=255,Sn.Nn=20,Sn.$n="etrp",Sn.kn="etrs",Sn.xn="1",ws([gs("addInitialDom")],Sn.prototype,"addInitialDom",null);class Tn extends Me{constructor(t,s,e){super(),this.Kt=t,this.Hi=s,this.Fi=e,this.Mn=!1,this.Un={},this.Fn=t=>{if(0!==t.length)for(const s of t){const{metadata:t,events:e}=s;this.qn(t.rt)&&this.Fi.send(e,t)}},window.addEventListener("focus",(()=>{this.recover()}))}onStart(){this.Un={}}onStop(){}recover(){this.Kt.recover(this.Fn)}addBatchInProgress(t,s,e){this.Un[t]={metadata:{...s},events:e}}removeBatchInProgress(t){delete this.Un[t]}blockSendingLastMessage(){this.Mn=!1}allowSendingLastMessage(){this.Mn=!0}sendLastMessageBeacon(){if(this.Mn){const{ri:t,rst:s,let:e,...i}=this.Fi.getQueryParams();i.hlm="true",this.Hi.setQueryParams(i),this.Hi.send()}}qn(t){return!!t&&-1===csString.prototype.indexOf.call(t,Ue.TEMPORARILY)}saveBatchesInProgress(){csArray.prototype.forEach.call(Object.keys(this.Un),(t=>{const{metadata:s,events:e}=this.Un[t];this.Kt.save({key:`${s.sn}.${s.pn}.${s.ri}`,metadata:{...s,datatype:"json"},events:csJSON.stringify(e)})}))}save(t){this.Kt.save(t)}}ws([is("RecordingRecovery")],Tn.prototype,"recover",null);class In{constructor(...t){this.Bn=t}addProvider(t){csArray.prototype.push.call(this.Bn,t)}getRequestParameters(){return csArray.prototype.reduce.call(this.Bn,((t,s)=>({...s.getRequestParameters(),...t})),{})}}class Pn{constructor(t,s){this.Hn=t,this.D=s,this.jn=[{boundElement:window,type:"hashchange",listener:()=>this.hashChangeListener()},{boundElement:document,type:"visibilitychange",listener:()=>this.visibilityChangeListener()}]}onEvent(t){this.zn=t}start(){this.ks(),this.triggerInitialEvents()}stop(){this.xs()}ks(){csArray.prototype.forEach.call(this.jn,(t=>re(t)))}xs(){csArray.prototype.forEach.call(this.jn,(t=>oe(t)))}triggerInitialEvents(){this.hashChangeListener()}hashChangeListener(){const t={type:ae.HASH_CHANGE,args:[this.D.anonymizePII(this.Hn.href)],date:It.now()};this.zn(t)}visibilityChangeListener(){const t={type:ae.VISIBILITY_CHANGE,args:[document.visibilityState],date:It.now()};this.zn(t)}}ws([is("hashChange")],Pn.prototype,"hashChangeListener",null),ws([is("visibilityChange")],Pn.prototype,"visibilityChangeListener",null);var bn,Vn;class Cn{constructor(t){this.Ss=t}observe(){if(this.Gn=bn.Zn.subscribe((t=>this.Ss(t))),!bn.Wn){bn.Wn=!0,bn.Jn.observe();Gs(document,NodeFilter.SHOW_ELEMENT).visitAll((t=>{bn.Qn.add(t),bn.Zn.next(t)}))}}disconnect(){bn.Wn&&(this.Gn(),bn.Zn.hasObservers()||(bn.Wn=!1,bn.Jn.disconnect(),bn.Zn.clear(),bn.Qn.clear()))}}bn=Cn,Cn.Qn=pi(),Cn.Zn=new class{constructor(t=Number.POSITIVE_INFINITY){this.Yn=[],this.we=[],this.Kn=t}next(t){this.we.length===this.Kn&&csArray.prototype.shift.call(this.we),csArray.prototype.push.call(this.we,t),1===this.we.length&&csSetTimeout((()=>this.clear()));for(const s of this.Yn)s(t)}subscribe(t){if($s(this.Yn,(s=>t===s)))return()=>{this.Yn=csArray.prototype.filter.call(this.Yn,(s=>s!==t))};csArray.prototype.push.call(this.Yn,t);for(const s of this.we)t(s);return()=>{this.Yn=csArray.prototype.filter.call(this.Yn,(s=>s!==t))}}clear(){this.we=[]}hasObservers(){return this.Yn.length>0}},Cn.Xn=ms((t=>{li((()=>{for(const s of t)"childList"===s.type&&xs(s.addedNodes,(t=>{Gs(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{bn.Qn.has(t)||(bn.Qn.add(t),bn.Zn.next(t))}))}))}))}),"ElementObserver.findAllElements"),Cn.Wn=!1,Cn.Jn=new wi(bn.Xn),Hs([is()],Cn.prototype,"observe",null),Hs([is()],Cn.prototype,"disconnect",null);class Nn{constructor(){this.ws=!1,this.tr=new Hi((t=>"cssRuleInserted"===t.type&&this.onStyleSheetChange(t))),this.er=new Cn((t=>this.ir(t))),this.ys=new wi((t=>this.Ve(t)))}onStyleSheetChange(t){t.rule&&this.ws&&this.nr(t.rule)}start(){this.ws||(this.ws=!0,this.tr.observe(),this.er.observe(),this.ys.observe())}stop(){this.ws&&(this.tr.disconnect(),this.er.disconnect(),this.ys.disconnect(),this.ws=!1)}onEvent(t){this.zn=t}onAsset(t){this.rr=t}onStyleSheetFound(t){this.hr=t}cr(t){d(t)&&csNodeparentNode.apply(t)&&m(csNodeparentNode.apply(t))&&this.nr(t.data)}nr(t){this.ar(bi(t))}ir(t){this.ws&&Ne.getSensitiveDetails(t).state===Ne.SensitiveState.NotSensitive&&this.ur(t)}ur(t,s){Ne.getSensitiveDetails(t).state!==Ne.SensitiveState.NotSensitive||s&&Ne.isSensitiveAttribute(t,s)||(m(t)?this.lr(t):this.pr(t,s)||(this.vr(t,s),this.mr(t,s),this.gr(t,s)))}pr(t,s){var e,i,n;if(v(t)&&(!s||"href"===s)&&t.href){const s=(null===(e=t.sheet)||void 0===e?void 0:e.href)||t.href,r={assetId:s,assetBasePath:window.location.href,assetRawPath:t.getAttribute("href")};return null===(i=this.hr)||void 0===i||i.call(this,r),null===(n=this.rr)||void 0===n||n.call(this,r),this.wr(s),!0}return!1}lr(t){var s;const e=new Set;for(let s=0;s<csNodechildNodes.apply(t).length;s++){const i=csNodechildNodes.apply(t)[s];if(3===i.nodeType)for(const t of bi(i.data))e.add(t)}let i;try{i=null===(s=t.sheet)||void 0===s?void 0:s.cssRules}catch(t){"SecurityError"===t.name||"InvalidAccessError"===t.name||ss.error(t.message)}if(i)for(let t=0;t<i.length;t++){const s=i.item(t).cssText;for(const t of bi(s))e.add(t)}this.ar(Us(e))}yr(t){return!this.Er(t)&&!_i(t)&&!Ri(t)}vr(t,s){var e,i;if(l(i=t)&&"img"===i.localName){if(!s||"src"===s){const s=t.getAttribute("src");s&&this.yr(s)&&(this.wr(t.src),null===(e=this.rr)||void 0===e||e.call(this,{assetId:t.src,assetRawPath:s,assetBasePath:window.location.href}))}s&&"srcset"!==s||!t.srcset||this.Ar(t.srcset)}}mr(t,s){if(1===t.nodeType){if(t.hasAttribute&&(!s||"style"===s)&&t.hasAttribute("style")){const s=t.getAttribute("style");if("string"!=typeof s)throw new Error("Unexpected style: "+t.outerHTML);this.nr(s)}}else es.warn(`StaticResourceUrlTracker: Wrong element nodeType: ${null==t?void 0:t.nodeName}/${t.nodeType}`)}Ar(t){this.ar(Si(t))}gr(t,s){var e,i;if((E(i=t)&&"image"===i.localName||function(t){return E(t)&&"use"===t.localName}(t)||function(t){return E(t)&&"feImage"===t.localName}(t))&&(!s||"href"===s||"xlink:href"===s)){const s=t.getAttribute("href")||t.getAttribute("xlink:href");if(s&&this.yr(s)){const t=Bt(s);this.wr(t),null===(e=this.rr)||void 0===e||e.call(this,{assetId:t,assetRawPath:s,assetBasePath:window.location.href})}}}ar(t){return csArray.prototype.forEach.call(csArray.prototype.map.call(csArray.prototype.filter.call(csArray.prototype.filter.call(csArray.prototype.filter.call(t,(t=>!this.Er(t))),(t=>!_i(t))),(t=>!Ri(t))),(t=>({rawUrl:t,absoluteUrl:Bt(t)}))),(t=>{var s;this.zn&&this.wr(t.absoluteUrl),null===(s=this.rr)||void 0===s||s.call(this,{assetId:t.absoluteUrl,assetBasePath:window.location.href,assetRawPath:t.rawUrl})}))}Ve(t){for(const s of t)switch(s.type){case"attributes":this.ur(s.target,s.attributeName);break;case"characterData":this.cr(s.target)}}wr(t){var s;const e={date:It.now(),type:ae.STATIC_RESOURCE_URL,args:[t]};null===(s=this.zn)||void 0===s||s.call(this,e)}Er(t){return/^https:\/\/\w+:\w+@/.test(t)}}class On{constructor(t){this._r=[],this.Rr=[],this.jt={},this.zt=t}setQueryParams(t){csArray.prototype.forEach.call(Object.keys(t),(s=>{this.jt[s]=t[s]}))}removeQueryParams(t){t?csArray.prototype.forEach.call(t,(t=>{delete this.jt[t]})):this.jt={}}onBeaconSuccess(t){csArray.prototype.push.call(this._r,t)}onBeaconFailure(t){csArray.prototype.push.call(this.Rr,t)}send(t){const s=K.toQuery({...this.jt,ct:Vs.UNCOMPRESSED}),e=this.Sr(s,t);return e?csArray.prototype.forEach.call(this._r,(t=>t())):csArray.prototype.forEach.call(this.Rr,(t=>t(this.jt))),e}Sr(t,s){try{if("function"!=typeof csNavigatorsendBeacon)return!1;const e=csNavigatorsendBeacon(`${this.zt}?${t}`,s||"");if(e)return e}catch{}return"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(`${this.zt}?${t}`,s||"")}}class kn{constructor(t){this.Tr={},this.Ir=new xe(t)}save({key:t,metadata:s,events:e}){this.Ir.isThresholdReached()||(this.Ir.addString(t),"string"==typeof e?this.Ir.addString(e):this.Ir.addArrayBuffer(e),this.Ir.isThresholdReached()||(this.Tr[t]={metadata:s,events:e}))}recover(t){const s=[];csArray.prototype.forEach.call(this.Pr(),(t=>{const e=this.Tr[t];void 0!==e&&(delete e.metadata.datatype,csArray.prototype.push.call(s,e),this.br(t))})),0!==s.length&&(t(s),this.Ir.reset())}Pr(){return Object.keys(this.Tr)}br(t){delete this.Tr[t]}}!function(t){t[t.NOT_STARTED=0]="NOT_STARTED",t[t.OPEN_IN_PROGRESS=1]="OPEN_IN_PROGRESS",t[t.OPEN_FAILED=2]="OPEN_FAILED",t[t.READY=3]="READY"}(Vn||(Vn={}));class xn{constructor(t,s,e){this.Vr=t,this.Cr=e,this.Nr=Vn.NOT_STARTED,this.Or=[],this.kr=0,this.$r=self.origin,this.Lr="object"==typeof window?"":"worker-",this.Ir=new xe(s),this.Dr()}async Dr(){await this.Mr(),this.Nr===Vn.READY?this.Ur():this.Cr(this.Or)}Ur(){csArray.prototype.forEach.call(this.Or,(t=>{this.save(t)})),this.Or=[]}async save(t){try{if(this.Nr===Vn.OPEN_IN_PROGRESS)return void csArray.prototype.push.call(this.Or,t);if(this.Nr!==Vn.READY)return;if(this.Ir.isThresholdReached())return;const{key:s,metadata:e,events:i}=t;if(this.Ir.addString(s),"string"==typeof i?this.Ir.addString(i):this.Ir.addArrayBuffer(i),this.Ir.isThresholdReached())return;await this.Fr.put(`${this.$r}/${s}`,new Response(i,{headers:e}))}catch{}}async recover(t){(this.Fr||(await this.Mr(),this.Nr===Vn.READY))&&this.qr(t)}async Mr(){try{this.Nr=Vn.OPEN_IN_PROGRESS,this.Fr=await self.caches.open(`${this.Lr}${this.Vr}`),this.Nr=Vn.READY}catch{this.Nr=Vn.OPEN_FAILED}}async qr(t){try{if(this.kr++,this.kr>1)return;const s=await this.Fr.keys();if(0===s.length)return;const e=await this.Fr.matchAll(),i=csArray.prototype.map.call(e,(t=>{const s={};t.headers.forEach(((t,e)=>{s[e]=t})),delete s["content-type"];const e=s.datatype;return delete s.datatype,"json"===e||"base64"===e?t.text().then((t=>({metadata:s,events:t}))):t.arrayBuffer().then((t=>({metadata:s,events:t})))})),n=await Promise.all(i);await Promise.all(csArray.prototype.map.call(s,(t=>this.Fr.delete(t)))),t(n),this.Ir.reset()}catch{}finally{this.kr--}}}class $n{constructor(t){try{this.Br(t)}catch(t){this.Hr()}}Br(t){self.caches?this.jr(t):this.Hr()}save(t){this.zr.save(t)}recover(t){this.zr.recover(t)}jr(t){this.zr=new xn(t,$n.Gr,(t=>{this.Hr(t)}))}Hr(t){this.zr=new kn($n.Gr),t&&csArray.prototype.forEach.call(t,(t=>{this.zr.save(t)}))}}$n.Gr=16777216;class Ln extends mn{isListening(t){return pn.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent)}processEvent(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const e of s){if(e instanceof Li){const t=Ne.getAttributeSensitiveDetails(e);e.attributes=this.Zr(e,t)}if(Ne.getSensitiveDetails(e).state!==Ne.SensitiveState.Child)Ee.traverse(e,(t=>{if(t instanceof Li){const s=Ne.getAttributeSensitiveDetails(t);t.attributes=this.Zr(t,s);const e=Ne.getSensitiveDetails(t);e.state===Ne.SensitiveState.Parent&&this.Wr(t,e)}}));else{if("initialDOM"===t.domEvent)return null;t.nodes=csArray.prototype.filter.call(t.nodes,(t=>t!==e))}}return t}Zr(t,s){return 0===s.attributes.length?t.attributes:csArray.prototype.filter.call(t.attributes,(t=>-1===csArray.prototype.indexOf.call(s.attributes,t.name)))}Wr(t,s){const e=`width: ${s.width}px !important; height: ${s.height}px !important;`;t.children=[],csArray.prototype.push.call(t.attributes,{name:"style",value:e,namespaceURI:""}),Li.getAttribute(t,"data-cs-mask")||csArray.prototype.push.call(t.attributes,{name:"data-cs-mask",value:"",namespaceURI:""})}}Ai([gs("SensitiveProcessor.processEvent")],Ln.prototype,"processEvent",null);const Dn=/[\u4E00-\u9FFF]|[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]/g,Mn=/[^a\s]/g;function Un(t){const s=csString.prototype.replace.call(t,Dn,"a");return csString.prototype.replace.call(s,Mn,"a")}csArray.prototype.reduce.call(["a","e","i","o","mi","id","ex","ut","eu","ac","in","et","sit","vel","sed","leo","amet","elit","orci","erat","quam","odio","eget","lorem","ipsum","dolor","nulla","vitae","purus","proin","neque","porta","augue","velit","lacus","justo","magna","mollis","nullam","turpis","tortor","lectus","luctus","dictum","integer","aliquam","viverra","rhoncus","posuere","egestas","laoreet","vivamus","euismod","sagittis","molestie","faucibus","pulvinar","ultrices","volutpat","ultricies","venenatis","vulputate","convallis","phasellus","adipiscing","vestibulum","consectetur","ullamcorper","sollicitudin"],((t,s)=>{var e;return t.set(s.length,[...null!==(e=t.get(s.length))&&void 0!==e?e:[],s]),t}),new Map);class Fn extends mn{constructor(t,s,e){super(),this.Jr=t,this.Qr=s,this.Yr=e}setAnonymization(t){this.Jr=t}isListening(t){return pn.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent)}processEvent(t){switch(t.domEvent){case"initialDOM":case"nodesAdded":this.Kr(t);break;case"attributeChanged":this.Xr(t);break;case"characterDataChanged":this.so(t)}return t}Kr(t){const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of s)Ee.traverse(t,((t,s)=>{if(t.anonymized=this.Jr,3===t.nodeType){let e=this.Jr;return s&&("style"===s.localName||Ei.isWhitelisted(s))&&(e=!1),t.anonymized=e,void(t.data=this.eo(e,t.data,null==s?void 0:s.localName,s?Ee.getProperties(s):void 0))}if(Li.isElement(t))return this.io(t);4!==t.nodeType||(t.data=this.Jr?Un(t.data):this.Yr(t.data))}))}io(t){if(Ee.getProperty(t,"SVG"))return;const s=csArray.prototype.some.call(t.attributes,(t=>"type"===t.name&&("submit"===t.value||"button"===t.value)));t.attributes=csArray.prototype.map.call(t.attributes,(e=>(e.anonymized=this.Jr,e.value=this.no(t.localName,this.Jr,e.name,e.value,s),e)))}Xr(t){if(t.isSvg)return;const s="submit"===t.inputType||"button"===t.inputType;t.newValue=this.no(t.localName,this.Jr,t.attribute,t.newValue,s)}no(t,s,e,i,n){return this.ro(e)&&!this.oo(e,i)||"svg"===t||"slot"===t?i:"value"===e&&"input"===t&&s&&n?Un(i):s?"":this.Yr(i)}ro(t){return this.Qr.allWhitelistedAttributes.has(t)}oo(t,s){return!(!this.Qr.attributesCheckers||!Rt(this.Qr.attributesCheckers[t]))&&this.Qr.attributesCheckers[t](s)}so(t){t.newValue=this.eo(this.Jr,t.newValue,t.parentLocalName,t.parentProps)}eo(t,s,e,i){if(e){if("style"===e)return s;if(t&&i&&i[Ei.ANONYMIZATION_STATUS_PROP]===Ei.ANONYMIZATION_WHITELISTED_STATUS)return this.Yr(s)}return t?Un(s):this.Yr(s)}}Ai([gs("AnonymizationProcessor.processEvent")],Fn.prototype,"processEvent",null);const qn="textarea";class Bn extends mn{isListening(t){return pn.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"characterDataChanged"===t.domEvent)}processEvent(t){switch(t.domEvent){case"initialDOM":this.ho(t);break;case"nodesAdded":this.co(t);break;case"characterDataChanged":this.ao(t)}return t}ho(t){Ee.traverse(t.initialDOM,((t,s)=>{this.uo(t,s)&&(t.data=this.lo(t.data))}))}co(t){for(const s of t.nodes)Ee.traverse(s,((s,e)=>{this.do(s,e,t)&&(s.data=this.lo(s.data))}))}ao(t){t.parentLocalName===qn&&(t.newValue=this.lo(t.newValue))}lo(t){return csString.prototype.replace.call(t,/\S/g,"•")}do(t,s,e){return this.fo(t,e)||this.uo(t,s)}fo(t,s){return 3===t.nodeType&&s.targetLocalName===qn}uo(t,s){return 3===t.nodeType&&At(s)&&s.localName===qn}}Ai([gs("TextAreaAnonymizationProcessor.processEvent")],Bn.prototype,"processEvent",null);class Hn extends ln{constructor(t){super(),this.po=t}onStart(){this.produceEvent({type:"Debug",key:"debugInfo",value:this.po})}}class jn{constructor(t){this.Ss=t,this.vo={boundElement:window,type:"resize",listener:()=>this.resizeListener()},this.Ss=t}observe(){re(this.vo),this.Us()}Us(){this.resizeListener()}disconnect(){oe(this.vo)}resizeListener(){const t={width:Mi.windowWidth(),height:Mi.windowHeight()};this.Ss(t)}}var zn,Gn,Zn,Wn,Jn,Qn,Yn;Hs([is("resize")],jn.prototype,"resizeListener",null),function(t){t.PORTRAIT="Portrait",t.LANDSCAPE="Landscape"}(zn||(zn={})),function(t){t.PORTRAIT_PRIMARY="portrait-primary",t.PORTRAIT_SECONDARY="portrait-secondary",t.LANDSCAPE_PRIMARY="landscape-primary",t.LANDSCAPE_SECONDARY="landscape-secondary"}(Gn||(Gn={})),function(t){t[t.PORTRAIT=0]="PORTRAIT",t[t.PORTRAIT_REVERSE=180]="PORTRAIT_REVERSE",t[t.LANDSCAPE=-90]="LANDSCAPE",t[t.LANDSCAPE_REVERSE=90]="LANDSCAPE_REVERSE"}(Zn||(Zn={})),function(t){function s(){return"orientation"in window.csScreen}function e(){return"orientation"in window}t.isScreenOrientationApiSupported=s,t.isDeprecatedScreenOrientationApiSupported=e;const i=s()?function(){switch(window.csScreen.orientation.type){case Gn.PORTRAIT_PRIMARY:case Gn.PORTRAIT_SECONDARY:return zn.PORTRAIT;case Gn.LANDSCAPE_PRIMARY:case Gn.LANDSCAPE_SECONDARY:return zn.LANDSCAPE;default:return zn.PORTRAIT}}:e()?function(){switch(window.orientation){case Zn.PORTRAIT:case Zn.PORTRAIT_REVERSE:return zn.PORTRAIT;case Zn.LANDSCAPE:case Zn.LANDSCAPE_REVERSE:return zn.LANDSCAPE;default:return zn.PORTRAIT}}:function(){return zn.LANDSCAPE};t.getCurrentOrientation=function(){return i()}}(Wn||(Wn={}));class Kn extends ln{constructor(){super(...arguments),this.mo=null,this.wo=null,this.yo=new jn((t=>{this.produceEvent({...t,type:"viewportResize"}),this.onScreenPotentiallyChanged()}))}onScreenPotentiallyChanged(){const t=Wn.getCurrentOrientation(),{screenWidth:s,screenHeight:e}=this.Eo(t);if(s!==this.mo||e!==this.wo){this.mo=s,this.wo=e;const t={type:"screenResize",width:s,height:e};this.produceEvent(t)}}Eo(t){let s,e;const i=Mi.screenWidth(),n=Mi.screenHeight();return t===zn.PORTRAIT?(s=i,e=n):(s=Math.max(i,n),e=Math.min(i,n)),{screenWidth:s,screenHeight:e}}onStart(){this.yo.observe()}onStop(){this.mo=null,this.wo=null,this.yo.disconnect()}}class Xn extends ln{constructor(){super(),this.Ao="object"==typeof window.customElements&&"function"==typeof window.customElements.whenDefined&&"function"==typeof window.Promise,this._o=ns("CustomElementRegistrationProducer:onElementsFound",(t=>{for(const e of t)Ne.isSensitive(e)||Ne.isSensitiveChild(e)||l(s=e)&&csString.prototype.indexOf.call(s.tagName,"-")>0&&-1===csString.prototype.indexOf.call(s.tagName,":")&&-1===csString.prototype.indexOf.call(s.tagName,'"')&&-1===csString.prototype.indexOf.call(s.tagName,",")&&csArray.prototype.indexOf.call(I,csString.prototype.toLocaleLowerCase.call(s.tagName))<0&&this.register(csString.prototype.toLowerCase.call(e.tagName));var s}));const t=vi(this._o);this.er=new Cn((s=>t.push(s))),this.Ro=new Set}onStart(){this.Ao&&this.er.observe()}onStop(){this.Ro.clear(),this.er.disconnect()}async register(t){this.Ro.has(t)||(this.Ro.add(t),await window.customElements.whenDefined(t),this.produceEvent({type:"CustomElementRegistration",tagName:csString.prototype.toLowerCase.call(t)}))}}Ai([is()],Xn.prototype,"register",null),function(t){t.isNavigationTimingObserverSupported=function(){var t,s;return(null==(null===(t=window.PerformanceObserver)||void 0===t?void 0:t.supportedEntryTypes)?void 0:csArray.prototype.indexOf.call(null===(s=window.PerformanceObserver)||void 0===s?void 0:s.supportedEntryTypes,"navigation"))>=0},t.getTimeOrigin=function(){return window.performance.timeOrigin}}(Jn||(Jn={}));class tr{static So(){return new window.PerformanceObserver((t=>tr.To(t)))}static To(t){const s=t.getEntriesByType("navigation")[0];s&&(this.Io=s,tr.Po(s))}static vs(t){tr.bo(t),tr.Io&&t(tr.Io),tr.Vo||tr.Co()}static bo(t){tr.Oo.add(t)}static ko(t){tr.Oo.delete(t)}static Co(){if(!tr.xo)return tr.Io||(tr.Io={requestStart:window.performance.timing.requestStart,domInteractive:window.performance.timing.domInteractive}),void tr.Po(tr.Io);tr.xo.observe({type:"navigation",buffered:!0}),tr.Vo=!0}static Po(t){tr.Oo.forEach((s=>{s(t)}))}static Rs(t){tr.ko(t),0===tr.Oo.size&&tr.$o()}static $o(){var t;tr.Vo&&(null===(t=tr.xo)||void 0===t||t.disconnect(),tr.Vo=!1,tr.Io=null,tr.xo=this.So())}constructor(t){this.Ss=t}observe(){tr.vs(this.Ss)}disconnect(){tr.Rs(this.Ss)}}tr.xo=Jn.isNavigationTimingObserverSupported()?tr.So():null,tr.Vo=!1,tr.Oo=new Set,tr.Io=null;class sr extends ln{constructor(){super(...arguments),this.Lo=null,this.Do=new tr((t=>{if(this.Lo)return;const s=this.Mo(t);s&&(this.Lo=s,this.produceEvent(s))}))}onStart(){this.Lo?this.produceEvent(this.Lo):this.Do.observe()}onStop(){this.Do.disconnect()}Mo(t){const s=Jn.getTimeOrigin();return{type:"PerformanceTiming",timings:{timeOrigin:s,requestStart:Math.floor(s+t.requestStart),domInteractive:Math.floor(s+t.domInteractive)},timestamp:It.now()}}}!function(t){t[t.TAP=0]="TAP",t[t.LONG_PRESS=1]="LONG_PRESS",t[t.DRAG=2]="DRAG",t[t.FLICK=3]="FLICK",t[t.PINCH_IN=4]="PINCH_IN",t[t.PINCH_OUT=5]="PINCH_OUT"}(Qn||(Qn={})),function(t){t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t[t.LEFT=3]="LEFT",t[t.RIGHT=4]="RIGHT"}(Yn||(Yn={}));class er{compute(t,s){const e=this.Uo(s.x)-this.Uo(t.x),i=this.Uo(s.y)-this.Uo(t.y),n=s.time-t.time;return{duration:n,distance:this.Fo(e,i),direction:this.qo(e,i),velocity:this.Bo(e,i,n)}}computePinchMetrics(t,s){const e=this.Uo(s.x)-this.Uo(t.x),i=this.Uo(s.y)-this.Uo(t.y);return{duration:s.time-t.time,distance:this.Fo(e,i)}}getScale(t,s){return Math.abs(s/t-1)}Uo(t){return t/window.devicePixelRatio}Fo(t,s){return Math.round(Math.sqrt(t*t+s*s))}Bo(t,s,e){const i=e/1e3,n=t/i,r=s/i;return Math.round(Math.abs(n)+Math.abs(r))}qo(t,s){return Math.abs(t)>Math.abs(s)?t>0?Yn.RIGHT:Yn.LEFT:s>0?Yn.DOWN:Yn.UP}}class ir{constructor(){this.Ho={},this.jo=()=>{},this.zo=new er,this.Go()}static isGestureDetectionSupported(){return void 0!==window.devicePixelRatio}onGesture(t){this.jo=t}isValidTouchEvent(t){return"touches"in t&&"changedTouches"in t}processActionDown(t){if(!this.Zo(t))return;this.Wo(t)&&this.Go();const s={x:t.touches[0].clientX,y:t.touches[0].clientY,time:It.now()};if(1===t.touches.length)this.Ho.startPinchTime=s.time,this.Ho.firstTouch=s;else if(2===t.touches.length&&(this.Ho.secondTouch={x:t.touches[1].clientX,y:t.touches[1].clientY,time:It.now()},this.Ho.firstTouch&&this.Ho.secondTouch)){const t=this.zo.computePinchMetrics(this.Ho.firstTouch,this.Ho.secondTouch);this.Jo=t.distance}csArray.prototype.push.call(this.Qo,s),this.Yo=ve(t)}processActionMove(){this.Ko=!0}processActionUp(t){if(this.Xo(t)){if(csArray.prototype.push.call(this.Qo,{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:It.now()}),this.th(t)&&this.Ho.startPinchTime){const s={x:t.touches[0].clientX,y:t.touches[0].clientY,time:this.Ho.startPinchTime},e={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:It.now()};this.Ho.firstTouch&&(this.Ho.firstTouch=s,this.Ho.secondTouch=e),this.eh(t)}this.Jo||this.ih()&&this.nh(t)}}Go(){this.Qo=[],this.Yo=null,this.Ko=!1,this.Jo=null,this.rh=!0}nh(t){const s=this.zo.compute(this.Qo[0],this.Qo[1]);this.rh=t.isTrusted;const e=this.Ko?this.oh(s):this.hh(s);if(this.ah(e.type,t.changedTouches)){const s=t.changedTouches[0];e.pageX=he(s.pageX,1),e.pageY=he(s.pageY,1)}this.jo(e,t)}eh(t){if(!this.Ho.firstTouch||!this.Ho.secondTouch)return;const s=this.zo.computePinchMetrics(this.Ho.firstTouch,this.Ho.secondTouch);this.rh=t.isTrusted;const e=this.uh(s);e&&this.jo(e,t)}uh(t){if(!this.Jo)return;if(this.zo.getScale(this.Jo,t.distance)<.1)return;return{type:this.Jo>t.distance?Qn.PINCH_IN:Qn.PINCH_OUT,target:this.Yo,distance:t.distance,isTrusted:this.rh}}oh(t){return{type:t.velocity<100?Qn.DRAG:Qn.FLICK,target:this.Yo,velocity:t.velocity,distance:t.distance,direction:t.direction,isTrusted:this.rh}}hh(t){return{type:t.duration<1e3?Qn.TAP:Qn.LONG_PRESS,target:this.Yo,isTrusted:this.rh}}ah(t,s){return t===Qn.TAP&&s&&1===s.length}Wo(t){return 1===t.touches.length}ih(){return 2===this.Qo.length}Zo(t){return t.touches.length>0}Xo(t){return t.changedTouches.length>0}th(t){return this.Ko&&!!this.Jo&&1===t.changedTouches.length&&1===t.touches.length}}class nr{constructor(t){this.Ss=t}observe(){nr.fh&&nr.ph(this.Ss)}disconnect(){nr.fh&&nr.mh(this.Ss)}static gh(t,s){nr.Oo.forEach((e=>e(t,s)))}static ph(t){nr.Oo.has(t)||(nr.Oo.add(t),1===nr.Oo.size&&(nr.yh.onGesture(nr.gh),csArray.prototype.forEach.call(nr.jn,(t=>re(t)))))}static mh(t){nr.Oo.delete(t),0===nr.Oo.size&&csArray.prototype.forEach.call(nr.jn,(t=>oe(t)))}static Eh(t){if(nr.yh.isValidTouchEvent(t))switch(t.type){case"touchstart":nr.yh.processActionDown(t);break;case"touchmove":nr.yh.processActionMove();break;case"touchend":nr.yh.processActionUp(t)}}}nr.jn=[{boundElement:document,type:"touchstart",listener:t=>nr.Eh(t)},{boundElement:document,type:"touchmove",listener:t=>nr.Eh(t)},{boundElement:document,type:"touchend",listener:t=>nr.Eh(t)}],nr.fh=ir.isGestureDetectionSupported(),nr.Oo=new Set,nr.yh=new ir;class rr extends ln{constructor(){super(),this.Ah=new nr(this._h.bind(this))}onStart(){this.Ah.observe()}onStop(){this.Ah.disconnect()}_h(t){const s=this.Rh(t);s&&this.produceEvent(s)}Rh(t){if(!this.Sh(t))return null;const s=(e=t.target,Ee.getProperty(e,_e));var e;return s?{type:"Gesture",targetId:s,data:{type:t.type,direction:t.direction,distance:t.distance,velocity:t.velocity,pageX:t.pageX,pageY:t.pageY}}:null}Sh(t){return null!==t.target&&!(l(t.target)&&Ne.isSensitiveChild(t.target))}}function or(t){return"INPUT"===t.nodeName}function hr(t){return or(t)&&"number"===t.type}function cr(t){return or(t)&&("checkbox"===t.type||"radio"===t.type)}class ar extends ln{constructor(t){super(),this.Ui=t,this.Th=pi(),this.Ih=t=>this.inputHandler(t),this.Ph=[],this.bh(),this.Vh(),this.Ch=new yi((t=>{for(const s of t)this.Nh(s)&&li((()=>{this.Oh(s,Re(s))}))})),this.Os=new ne(((t,s)=>{switch(s){case"initial":case"added":re({type:"change",listener:this.Ih,boundElement:t});break;case"removed":oe({type:"change",boundElement:t,listener:this.Ih})}}))}onStart(){re({type:"keyup",boundElement:document,listener:this.Ih}),re({type:"change",boundElement:document,listener:this.Ih}),xs(this.Ph,(t=>t.activate())),this.Ch.observe(csArray.prototype.join.call(ar.kh,",")),this.Os.observe()}onStop(){oe({type:"keyup",boundElement:document,listener:this.Ih}),oe({type:"change",boundElement:document,listener:this.Ih}),xs(this.Ph,(t=>t.deactivate())),this.Ch.disconnect(),this.Os.disconnect(),this.Th.clear()}Oh(t,s){var e,i,n;if(this.Th.has(t))return;if(this.Th.add(t),function(t){return"SELECT"===t.nodeName}(t)){const s={type:"InputEvent",inputType:"select",target:Re(t),selectedIndex:t.selectedIndex,timestamp:It.now()};return void this.produceEvent(s)}if(cr(t)){const s={type:"InputEvent",inputType:"checkable",target:Re(t),checked:t.checked,timestamp:It.now()};return void this.produceEvent(s)}const r=function(t){return"TEXTAREA"===t.nodeName||or(t)&&!hr(t)&&!cr(t)}(t),o=hr(t);if(r||o){const r=null!==(e=t.value)&&void 0!==e?e:"";if(null===(i=this.Ui)||void 0===i?void 0:i.shouldEncrypt(t))return void(null===(n=this.Ui)||void 0===n||n.registerInputNodeToEncrypt({targetId:s,targetValue:r,date:It.now()}));const h=o?"0":"•",c={type:"InputEvent",inputType:"text",target:Re(t),value:csString.prototype.replace.call(r,/\S/g,h),timestamp:It.now()};this.produceEvent(c)}}inputHandler(t){if(!this.isStarted)return;const s=ve(t),e=Re(s);e&&this.Nh(s)&&qi.isConnected(s)&&li((()=>{this.Oh(s,e)}))}bh(){this.trackChanges(HTMLInputElement,"checked"),this.trackChanges(HTMLInputElement,"value"),this.trackChanges(HTMLTextAreaElement,"value")}Vh(){this.trackChanges(HTMLSelectElement,"selectedIndex"),this.trackChanges(HTMLSelectElement,"value"),this.trackChanges(HTMLOptionElement,"selected",!0)}trackChanges(t,s,e=!1){const i=se(t.prototype,s,((t,s,i)=>{if(i!==s&&qi.isConnected(t)){const s=e?t.parentElement:t;this.xh(s)}}));i&&csArray.prototype.push.call(this.Ph,i)}Nh(t){return!Ne.isSensitive(t)&&!Ne.isSensitiveChild(t)&&(g(t)||A(t)||w(t))}xh(t){if(this.isStarted&&qi.isConnected(t)){const s=Re(t);s&&this.Nh(t)&&li((()=>{this.Oh(t,s)}))}}}ar.kh=["textarea","input:not([type])",'input[type="text"]','input[type="email"]','input[type="search"]','input[type="tel"]','input[type="url"]','input[type="password"]','input[type="number"]','input[type="checkbox"]','input[type="radio"]',"select"],Ai([os()],ar.prototype,"inputHandler",null),Ai([is()],ar.prototype,"trackChanges",null);class ur{constructor(t){this.Ss=t,this.$h=!1,this.vo={boundElement:window,type:"error",listener:t=>this.Lh(t)}}observe(){re(this.vo,this.$h)}disconnect(){oe(this.vo,this.$h)}Lh(t){this.Ss(t)}}class lr extends ln{constructor(){super(...arguments),this.Dh=new ur((t=>this.Mh(t)))}Mh({message:t,filename:s,lineno:e,colno:i}){t=null!=t?t:"[NO ERROR MESSAGE]",this.produceEvent({type:"JSError",message:t,filename:s,lineno:e,colno:i})}onStart(){this.Dh.observe()}onStop(){this.Dh.disconnect()}}class dr extends mn{constructor(t){super(),this.Uh=t,this.Fh=1024}isListening(t){return"JSError"===t.type}processEvent(t){return t.message=vn.truncate(t.message,this.Fh,vn.ELLIPSIS),this.Uh(t)}}let fr=[],pr=!1;const vr=ms((function(){const t=csDate.now();for(let s=0;s<fr.length;s++)if(fr[s](),csDate.now()-t>=35)return fr=csArray.prototype.slice.call(fr,s+1),void csSetTimeout(vr);fr=[],pr=!1}),"executeTasks");var mr;!function(t){t[t.Started=0]="Started",t[t.Stopped=1]="Stopped",t[t.Processing=2]="Processing",t[t.Completed=3]="Completed"}(mr||(mr={}));class gr{constructor(){this.qh=new hs,this.ge=mr.Stopped,this.Ss=null,this.Bh=t=>{this.ge!==mr.Stopped&&t&&(this.Ss(t),this.Hh())}}get queueLength(){return this.qh.length}start(t){if(this.Ss)throw new Error("callback already set");this.ge=mr.Started,this.Ss=t}push(t){this.qh.push(t),this.jh()}stop(){this.Ss=null,this.ge=mr.Stopped,this.qh.clear()}static pipe(t,s){let e=t;const i=new csArray;for(const t of s){const s=new gr;s.start((s=>{t.pushEvent(s)})),csArray.prototype.push.call(i,s),xs(e,(t=>t.subscribe((t=>s.push(t))))),e=[t]}const n=new wr(i);return xs(e,(t=>t.subscribe((t=>n.push(t))))),n}zh(){return this.ge===mr.Stopped}Gh(){return this.ge===mr.Processing}Hh(){this.zh()||(this.qh.isEmpty?this.ge=mr.Completed:(this.ge=mr.Processing,function(t){if(csArray.prototype.push.call(fr,t),!pr){for(let t=0;t<3;t++)csSetTimeout(vr);pr=!0}}((()=>{const t=this.qh.pop();t instanceof Di?t.complete(this.Bh):this.Bh(t)}))))}jh(){this.zh()||this.Gh()||this.Hh()}}class wr extends gr{constructor(t){super(),this.Zh=t}get queueLength(){return csArray.prototype.reduce.call(this.Zh,((t,s)=>t+s.queueLength),0)}stop(){super.stop(),xs(this.Zh,(t=>t.stop()))}}class yr{constructor(t,s=[]){this.producers=t,this.processors=s,this.ws=!1,this.Oo=[]}get pendingEvents(){return this.qh.queueLength}start(){if(this.ws)throw new Error("Recording is already started.");const t=this.Oo;this.qh=gr.pipe(this.producers,this.processors),this.qh.start((s=>csArray.prototype.forEach.call(t,(t=>t(s))))),xs(this.producers,(t=>t.start())),xs(this.processors,(t=>t.start())),this.ws=!0}stop(){this.qh.stop(),this.Oo.length=0;for(const t of this.producers)t.stop();for(const t of this.processors)t.stop();this.ws=!1,this.Oo=[]}subscribe(t){if(this.ws)throw new Error("Recording is already started.");return csArray.prototype.push.call(this.Oo,t),()=>this.Oo=csArray.prototype.filter.call(this.Oo,(s=>s!==t))}}class Er extends ln{constructor(t){super(),this.Gi=t}subscribe(t){return super.subscribe(t)}onStart(){xs(this.Gi,(t=>{t.onEvent((t=>this.de(t)))})),xs(this.Gi,(t=>{var s;null===(s=t.start)||void 0===s||s.call(t)}))}onStop(){xs(this.Gi,(t=>{var s;return null===(s=t.stop)||void 0===s?void 0:s.call(t)}))}de(t){this.produceEvent({timestamp:It.now(),type:"Legacy",originalEvent:t})}}function Ar(t){const s=function(t){const s={type:_r(t.type)};for(const e in t){const i=t[e];void 0!==i&&"type"!==e&&(s[e]=i)}return s}(t.data);return{type:ae.GESTURE_RECOGNITION,args:[t.targetId,s],date:t.timestamp}}function _r(t){switch(t){case Qn.DRAG:case Qn.FLICK:return de.SWIPE;case Qn.LONG_PRESS:return de.LONG_PRESS;case Qn.TAP:return de.TAP;case Qn.PINCH_IN:return de.PINCH_IN;case Qn.PINCH_OUT:return de.PINCH_OUT}}function Rr(t){return function(t,s){let e=[];return{push(t){csArray.prototype.push.call(e,t),e.length===s.batchSize&&this.flush()},flush(){if(!e.length)return;const s=e;e=[],t(s)}}}((s=>{const e={visibleInViewPort:s},i={type:ae.TEXT_VISIBILITY,date:It.now(),args:[e]};t(i)}),{batchSize:20})}var Sr;!function(t){t.REQUEST_START="requestStart",t.DOM_INTERACTIVE="domInteractive",t.TIME_ORIGIN="timeOrigin"}(Sr||(Sr={}));let Tr=0;class Ir{get pendingEvents(){return this.Wh.pendingEvents}constructor(t,s,e,i,n){this.Wh=t,this.Jh=s,this.Qh=e,this.Qi=i,this.Yi=n,this.Yh=()=>{},this.Kh=()=>{},this.Xh=Rr((t=>this.Yh(t)))}start(){var t,s;this.tc={processEvent(t,s){if(t.originalEvent.type===ae.PERFORMANCE_RESOURCE_TIMING)return Tr>=500?null:(Tr+=1,s({...t.originalEvent,date:t.timestamp}));s(t.originalEvent)},reset(){Tr=0}},this.Wh.subscribe((t=>{var s,e,i,n,r;const o=t,{timestamp:h}=o;switch(o.type){case"Legacy":this.tc.processEvent(o,this.Yh);break;case"CustomElementRegistration":this.Yh({type:ae.CUSTOM_ELEMENT_REGISTRATION,date:h,args:[o.tagName]});break;case"DomEvent":!function(t,s,e){const{timestamp:i}=t;switch(t.domEvent){case"initialDOM":{const{initialDOM:s}=t,n={type:ae.INITIAL_DOM,date:i,args:[s]};e.emitInitialDomDone(n);break}case"nodesAdded":csArray.prototype.forEach.call(t.nodes,(e=>{s({type:ae.MUTATION_INSERT,date:i,args:[t.target,t.nextSibling,e]})}));break;case"nodesMoved":for(const e of t.nodesIds)s({type:ae.MUTATION_MOVE,date:i,args:[e,t.nextSibling,t.target]});break;case"nodesRemoved":csArray.prototype.forEach.call(t.nodesIds,(t=>{s({type:ae.MUTATION_REMOVE,date:i,args:[t]})}));break;case"attributeChanged":{const{target:e,namespace:n,attribute:r,newValue:o}=t;s({type:ae.MUTATION_ATTRIBUTE,date:i,args:[e,n,r,o]});break}case"characterDataChanged":{const{target:e,newValue:n}=t;s({type:ae.MUTATION_CHARACTER_DATA,date:i,args:[e,n]});break}case"cssRuleInserted":{const{target:e,rule:n,index:r}=t,o=At(r)?[e,n,r]:[e,n];s({type:ae.STYLESHEET_RULE_INSERT,date:i,args:o});break}case"cssRuleDeleted":{const{target:e,index:n}=t;s({type:ae.STYLESHEET_RULE_DELETE,date:i,args:[e,n]});break}case"cssRuleUpdated":{const{target:e,rule:n,index:r}=t;s({type:ae.STYLESHEET_RULE_UPDATE,date:i,args:[e,n,r]});break}case"shadowRootAttached":{const{target:e,shadowRoot:n}=t;s({type:ae.ATTACH_SHADOW,date:i,args:[e,n]});break}case"adoptedStyleSheetRegistered":{const{sheetId:e,cssRules:n}=t;s({type:ae.REGISTER_ADOPTED_STYLE_SHEET,date:i,args:[e,{cssRules:n}]});break}case"adoptedStyleSheetsSet":{const{target:e,sheetsIds:n}=t;s({type:ae.SET_ADOPTED_STYLE_SHEETS,date:i,args:[e,n]});break}case"adoptedStyleSheetRuleInserted":{const{sheetId:e,rule:n,index:r}=t,o=At(r)?[e,n,r]:[e,n];s({type:ae.ADOPTED_STYLESHEET_RULE_INSERT,date:i,args:o});break}case"adoptedStyleSheetRuleDeleted":{const{sheetId:e,index:n}=t;s({type:ae.ADOPTED_STYLESHEET_RULE_DELETE,date:i,args:[e,n]});break}case"adoptedStyleSheetRuleUpdated":{const{sheetId:e,rule:n,index:r}=t,o=[e,n,r];s({type:ae.ADOPTED_STYLESHEET_RULE_UPDATE,date:i,args:o});break}default:ss.error("translateDOMEvent: DOMEvent not supported")}}(o,this.Yh,this.Jh);break;case"InputEvent":{const t=function(t){switch(t.inputType){case"text":return{type:ae.INPUT_TEXT,args:[t.target,t.value],date:t.timestamp};case"select":return{type:ae.INPUT_SELECT,args:[t.target,t.selectedIndex],date:t.timestamp};case"checkable":return{type:ae.INPUT_CHECKABLE,args:[t.target,t.checked],date:t.timestamp}}}(o);null===(s=this.Kh)||void 0===s||s.call(this,t);break}case"encryptedCharacterDataChanged":{const{target:t,rawData:s,encryptedData:e,encryptionMetadata:i}=o;this.Yh({type:ae.MUTATION_ENCRYPTED_CHARACTER_DATA,date:h,args:[t,s,e,i]});break}case"StaticResource":{const{url:t}=o;this.Yh({type:ae.STATIC_RESOURCE_URL,date:h,args:[t]});break}case"ResizeSensitiveElement":{const{target:t,width:s,height:e}=o;this.Yh({type:ae.MUTATION_ATTRIBUTE,date:h,args:[t,"","style",`width:${s}px !important;height:${e}px !important;`]});break}case"Gesture":{const s=Ar(t);null===(e=this.Kh)||void 0===e||e.call(this,s);break}case"TextVisibility":this.Xh.push(o.text);break;case"StaticResourceManagerEvent":null===(i=this.Qh)||void 0===i||i.processEvent(o);break;case"screenResize":{const{width:t,height:s}=o,e={type:ae.SCREEN_RESIZE,date:h,args:[t,s]};this.Yh(e);break}case"viewportResize":{const{width:t,height:s}=o,e={type:ae.RESIZE,date:h,args:[t,s]};this.Yh(e);break}case"PerformanceTiming":this.Yh(function(t){return{type:ae.PERFORMANCE_TIMINGS,args:[{performanceTiming:Sr.REQUEST_START,timestamp:t.timings.requestStart},{performanceTiming:Sr.DOM_INTERACTIVE,timestamp:t.timings.domInteractive},{performanceTiming:Sr.TIME_ORIGIN,timestamp:t.timings.timeOrigin}],date:t.timestamp}}(o));break;case"CustomError":{const t=null===(n=this.Yi)||void 0===n?void 0:n.translate(o);t&&this.Yh(t);break}case"JSError":{const t=null===(r=this.Qi)||void 0===r?void 0:r.translate(o);t&&this.Yh(t);break}case"Debug":this.Yh({type:ae.DEBUG,date:h,args:[o.key,o.value]});break;case"warning":ss.warn(o.message);break;default:ss.error(`WebRecorderEventTranslator: Event not supported (${o.type})`)}})),this.Jh.emitInitialDomStart(),null===(t=this.Qi)||void 0===t||t.start(),null===(s=this.Yi)||void 0===s||s.start(),this.Wh.start()}stop(){var t,s,e;this.reset(),this.flush(),this.Wh.stop(),null===(t=this.Qh)||void 0===t||t.flushEvents(),null===(s=this.Qi)||void 0===s||s.stop(),null===(e=this.Yi)||void 0===e||e.stop()}flush(){this.Xh.flush()}onEvent(t,s){var e;this.Yh=t,this.Kh=s,null===(e=this.Qh)||void 0===e||e.onEvent((t=>this.Yh(t)))}reset(){this.tc.reset()}}class Pr{constructor(t=100){this.sc=t,this.ec={},this.nc=null,this.fi="original-resource-name"}onEvent(t){this.rc=t}processEvent(t){this.oc(t.resourceId,t.resource.hash,t.originalResourceName),this.hc(t)}flushEvents(){this.nc&&csClearTimeout(this.nc),this.cc()}onSendStaticResource(t){this.hc=t}cc(){if(!Object.keys(this.ec).length)return;const t={type:ae.RESOURCE_HASHES,date:It.now(),args:[this.ec]};this.nc=null,this.ec={},this.rc(t)}oc(t,s,e){let i=s;e&&(i+=`?${this.fi}=${e}`),this.ec[t]=i,this.nc||(this.nc=window.csSetTimeout((()=>this.cc()),this.sc))}}function br(t,s){let e,i,n,r,o=null;const h=c=>{const a=It.now();if(!c&&null!==o){const t=s-(a-o);if(t>0)return void(i=window.csSetTimeout(h,t))}const u=a-n;i=null,o=null,n=null,r=t(u,...e)},c=(...t)=>{if(e=[...t],!n)return n=It.now(),i=window.csSetTimeout(h,s),r;o=It.now()};return c.flushPending=()=>{i&&(window.csClearTimeout(i),h(!0))},c.cancel=()=>{o=null,n=null,i&&(window.csClearTimeout(i),i=null)},c}function Vr(t=0){return(s,e,i)=>{const n=i.value;let r=!1;i.value=function(...s){r||(r=!0,csSetTimeout((()=>{r=!1,n.apply(this,s)}),t))}}}var Cr;!function(t){t[t.NOT_EXIST=2]="NOT_EXIST"}(Cr||(Cr={}));class Nr extends Me{constructor(t,s,e){super(),this.Qh=t,this.ac=s,this.lc=e,this.fc={},this.vc=new Set,this.Gh=!1}initState(){bt()&&(this.mc=this.lc.getRequestParameters(),this.gc=`${this.ac}/exist?${K.toQuery(this.mc)}`,this.wc=`${this.ac}/putTag?${K.toQuery(this.mc)}`,this.yc=br((async()=>{if(this.Gh)this.yc();else{this.Gh=!0;try{await this.Ec()}finally{this.Gh=!1}}}),300),this.Qh.onSendStaticResource((t=>{this.Ac(t)})))}onStart(){}onStop(){}onIframeStaticResource(t){this.Ac(t)}Ac(t){this._c(t.resource.hash,t.resource.data),t.nestedResources&&t.nestedResources.length>0&&csArray.prototype.forEach.call(t.nestedResources,(t=>{this._c(t.hash,t.data)}))}_c(t,s){this.vc.has(t)||(this.vc.add(t),this.fc[t]=s,this.yc())}async Ec(){const t=this.fc;this.fc={};const s=await this.Rc(t);if(!s.length)return;const e=this.Sc(s);await Promise.all(csArray.prototype.map.call(e,(t=>window.fetch(this.wc,{method:"POST",body:t}))))}async Tc(t){try{const s=Object.keys(t);if(!s.length)return[];const e={projectId:this.mc.pid,filter:Cr.NOT_EXIST,hashes:s,touch:!0},i=await window.fetch(this.gc,{method:"POST",body:csJSON.stringify(e)});return await i.json()}catch(t){return[]}}async Rc(t){const s=[],e=await this.Tc(t);return csArray.prototype.forEach.call(e,(e=>{const i=t[e];i?csArray.prototype.push.call(s,{hash:e,data:i}):ss.warn("SRM: received unknown hash: "+e)})),s}Sc(t){let s=0;const e=[new FormData];for(const i of t){const{data:t,hash:n}=i,r=e.length-1;if(s+=t.size,s<8388608)e[r].append("",t,n);else{const i=new FormData;i.append("",t,n),s=t.size,csArray.prototype.push.call(e,i)}}return e}}class Or{constructor(t){this.Ic=t,this.Pc=20,this.bc=0,this.Xs=!1}translate(t){if(this.bc>=this.Pc)return this.Ic.stop(),null;this.bc+=1;const{filename:s,message:e,lineno:i,colno:n,timestamp:r}=t;return{type:ae.JAVASCRIPT_ERROR,date:r,args:[{errorType:"jsError",message:e,filename:s,lineno:i,colno:n}]}}start(){this.Xs||(this.bc=0,this.Xs=!0)}stop(){this.Xs=!1}}class kr{constructor(){this.Pc=20,this.Vc=0,this.Xs=!1}translate(t){if(this.Vc>=this.Pc)return null;this.Vc+=1;const{message:s,attributes:e,timestamp:i}=t;return{type:ae.CUSTOM_ERROR,date:i,args:[{errorType:"customError",message:s,attributes:e}]}}start(){this.Xs||(this.Vc=0,this.Xs=!0)}stop(){this.Xs=!1}}const xr=["id","class","style","src","srcset","sizes","href","rel","type","width","height","media","align","dir","bgcolor","color","border","colspan","rowspan","cols","rows","size","start","slot",k],$r=t=>!_i(t),Lr="v2/recording",Dr=["setCapturedElementsSelector"],Mr=["isRecording"],Ur=["replay:resourceManager:enableForOnlineResource:nextPageviewOnly","cssrm:onlineAssets:activateForNextPageview"],Fr=["replay:resourceManager:getStatus","cssrm:getStatus"];class qr{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,v,m,g,w,y){this.Cc=t,this.J=s,this.L=e,this.mc=i,this.Nc=n,this.D=r,this.$i=o,this.Bi=h,this.zi=c,this.Li=a,this.Di=u,this.Mi=l,this.Jh=d,this.Oc=f,this.kc=p,this.xc=v,this.$c=m,this.Lc=g,this.Ji=w,this.Dc=y}init(){var t;const s=[],e=[];csArray.prototype.push.call(e,new Ln),this.Mc=new Fn(this.Dc.shouldUseAnonymization(),(t=>{const s=new Set;csArray.prototype.forEach.call(xr,(t=>{s.add(t)})),csArray.prototype.forEach.call(t.whitelistedAttributes,(t=>{s.add(t)}));const e=t.isSMB?{href:$r}:void 0;return{allWhitelistedAttributes:s,attributesCheckers:e}})(this.L),(t=>this.D.checkAndAnonymizePII(t,this.L.anonymizeDigits,this.L.anonymizeEmails))),this.Uc();const i=new $n("csPersisted");this.Fc(i);const n=new Le;this.Ni=new $e;const r=new Nn;csArray.prototype.push.call(s,r),this.L.useStaticResourceManager&&Rn.isSupported()&&(this.Wi=new Rn,this.Qh=new Pr,this.qc=new Nr(this.Qh,this.L.getStaticResourceManagerUri(),this.mc),this.kc.addListener(this.qc),csArray.prototype.push.call(e,this.Wi));const o=new In(n,this.mc,{getRequestParameters:()=>({let:this.recordingService.getRecordingLastEventTimestamp()})},{getRequestParameters:()=>({rst:this.recordingService.getRecordingStartTimestamp()})},{getRequestParameters:()=>({rt:csArray.prototype.join.call(this.J.getRecordingStates(),",")})}),h=new On(`${this.L.getRecordingUri()}/${Lr}`);csArray.prototype.push.call(e,this.Mc),csArray.prototype.push.call(e,new Bn),this.xi=new Oe,this.xi.init(),this.qi=new Tn(i,h,this.Fi),csArray.prototype.push.call(s,new Pn(window.location,this.D));const c=new fn,a=[new Hn({version:"15.19.3",visibilityState:document.visibilityState}),this.zi,c,new Er(csArray.prototype.filter.call(s,(t=>t))),new Kn,new Xn,new sr,new rr,new ar(this.Ui)];this.L.jsErrorsEnabled&&(this.Ic=new lr,this.Bc=new dr((t=>this.Li.anonymize(t))),this.Qi=new Or(this.Ic),csArray.prototype.push.call(a,this.Ic),csArray.prototype.push.call(e,this.Bc)),(null===(t=this.L.customErrors)||void 0===t?void 0:t.enabled)&&(this.Yi=new kr);const u=new yr(a,e);si.general.push(new Ye("Pending Events",(()=>u.pendingEvents)));const l=new Ir(u,this.Jh,this.Qh,this.Qi,this.Yi);this.recordingService=new Sn(this.L,this.Ni,o,n,this.xi,this.$i,this.J,this.Li,this.Di,this.Mi,this.Ui,this.Fi,this.qi,this.Bi,h,l,this.zi,s,c,this.Wi,this.Ji,this.Qi,this.Yi),this.Oc.addListener(this.recordingService),this.kc.addListener(this.recordingService),this.recordingService.init(),this.Nc.register(Mr,(()=>this.J.isReplayRecorded()&&!this.xc.isUrlExcludedForSessionReplay())),this.Nc.register(Dr,(t=>{Ei.setWhitelistedElementsSelector(t),this.Jh.emitRecordingStatusChange()})),this.Nc.register(Ur,(()=>{this.recordingService.activateOnlineAssetsOnNextPageview(),this.Jh.emitRecordingStatusChange()})),this.Nc.register(Fr,(()=>this.recordingService.getStaticResourceManagerStatus())),this.Cc.enableRecordingStatus(this.recordingService,this.Bi,this.Dc,this.J,this.Ui)}onAfterNaturalPageView(){var t;null===(t=this.qc)||void 0===t||t.initState()}onStartTracking(){this.qi.recover(),this.Uc(),this.J.isReplayRecorded()&&!this.xc.isUrlExcludedForSessionReplay()&&(this.J.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Hc())}onArtificialPageViewEnd(){!this.J.isReplayRecorded()||this.xc.isUrlExcludedForSessionReplay()||this.J.isTemporarilyRecorded()||this.qi.sendLastMessageBeacon(),this.recordingService.clearStates()}onAfterArtificialPageView(){this.Uc(),this.J.isReplayRecorded()&&!this.xc.isUrlExcludedForSessionReplay()?(this.J.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.jc()):this.zc()}onBeforeSessionRenewal(){this.recordingService.clearStates(),this.zc()}onOptout(){this.zc(),this.recordingService.onOptOut()}onReplayUnanonymizationConsentGranted(){this.Uc(),this.recordingService.triggerUnanonymizationConsentGranted(),this.Jh.emitRecordingStatusChange()}onReplayUnanonymizationConsentWithdrawn(){this.Uc(),this.recordingService.triggerUnanonymizationConsentWithdrawn(),this.Jh.emitRecordingStatusChange()}onCollectStateChange(t,s){t===Ue.ANALYTICS_ONLY&&s===Fe.ETR_OFF?(this.recordingService.clearEvents(),this.zc()):(this.Fi.setQueryParams({rt:csArray.prototype.join.call(this.J.getRecordingStates(),",")}),this.recordingService.allowSendingEventsFromQuotaService(),this.recordingService.pushEvents())}onInitialDomStart(){this.recordingService.blockSendingEventsFromSerialization(),this.qi.blockSendingLastMessage()}onInitialDomDone(t){this.recordingService.allowSendingEventsFromSerialization(),this.recordingService.addInitialDom(t),this.qi.allowSendingLastMessage(),this.xi.start(),this.recordingService.pushEvents()}onAfterReplayRecordingConsentGranted(){this.J.isReplayRecorded()&&!this.xc.isUrlExcludedForSessionReplay()&&(this.J.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Hc(),this.recordingService.triggerRecordingForSessionGranted())}onAfterReplayRecordingConsentWithdrawn(){this.recordingService.isRecording()&&(this.recordingService.triggerRecordingForSessionWithdrawn(),this.recordingService.clearStates(),this.zc())}Gc(){var t,s,e,i;if(null===(s=null===(t=this.L.experimental.sessionReplay)||void 0===t?void 0:t.shadowRoot)||void 0===s?void 0:s.filterByHostSelector){xs(null===(i=null===(e=this.L.experimental.sessionReplay)||void 0===e?void 0:e.shadowRoot)||void 0===i?void 0:i.filterByHostSelector,(t=>{Ve(t)&&wi.setShadowRootFilter((s=>{try{return Ie.call(s.host,t)}catch{return!1}}))}))}}Hc(){this.Gc(),this.recordingService.updateStaticResourceManagerOnlineAssets(),this.recordingService.start(),this.qi.start(),this.Jh.emitRecordingStatusChange()}zc(){!function(t=!1){t&&(Ae=1),_e=csSymbol("nodeIdentifier")}(),this.recordingService.stop(),this.qi.stop(),this.Jh.emitRecordingStatusChange()}jc(){this.zc(),this.Hc()}Fc(t){this.Fi=this.$c.create(`${this.L.getRecordingUri()}/${Lr}`,!0,"byteArray",t,["rt","v","pid","pn","sn","uu"])}Uc(){var t;const s=this.Dc.shouldUseAnonymization();this.Mc.setAnonymization(s),null===(t=this.Zc)||void 0===t||t.setAnonymization(s)}}var Br,Hr;ws([gs("Recording.onStartTracking")],qr.prototype,"onStartTracking",null),ws([gs("onInitialDomDone")],qr.prototype,"onInitialDomDone",null),function(t){t[t.NOT_NEEDED=1]="NOT_NEEDED",t[t.NOT_EXPRESSED=2]="NOT_EXPRESSED",t[t.WITHDRAWN=3]="WITHDRAWN",t[t.GRANTED=4]="GRANTED"}(Br||(Br={})),function(t){t.isReplayConsentNeeded=function(t){return t.replayConsentRequiredForSession},t.isRecordingBlockedByConsent=function(t){return t.collectState===Ue.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED||t.collectState===Ue.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN},t.isRecordingWithDrawn=function(t){return t.collectState===Ue.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN}}(Hr||(Hr={}));class jr{constructor(t,s,e,i){this.W=t,this.J=s,this.L=e,this.Wc=i,this.Jc=!1}isNaturalPageViewSent(){return this.Jc}setNaturalPageViewSent(t){this.Jc=t}getTrackingContext(){const t=this.J.getSession();if(!t)return null;const s=this.getSessionKey();if(!s)return null;const e=this.L.projectId,i=this.L.uxaDomain;return{projectId:e,sessionKey:s,pageNumber:t.pageNumber,pageViewType:this.Wc.getPageViewType(),isRecording:this.J.isReplayRecorded(),uxaDomain:i,recordingConsentState:this.Qc(t),...this.L.smbConf}}getSessionKey(){const t=this.W.getVisitor();return t?`${t.id}.${t.visitsCount}`:null}Qc(t){return Hr.isReplayConsentNeeded(this.L)?t.collectState===Ue.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED?Br.NOT_EXPRESSED:t.collectState===Ue.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN?Br.WITHDRAWN:Br.GRANTED:Br.NOT_NEEDED}}class zr{constructor(t){this.Yc=t,this.Kc=[]}handleCommand(t){if(Rt(t)&&(this.Xc(t),this.Yc.isNaturalPageViewSent())){const s=this.Yc.getTrackingContext();null!==s&&this.ta(t,s)}}Xc(t){csArray.prototype.push.call(this.Kc,t)}executeRegisteredCallbacks(){const t=this.Yc.getTrackingContext();null!==t&&csArray.prototype.map.call(this.Kc,(s=>this.ta(s,t)))}ta(t,s){csSetTimeout((()=>{t(s)}))}}class Gr{constructor(t){this.Yc=t,this.sa=[]}handleCommand(t){return this.Yc.isNaturalPageViewSent()?this.ea(t):void this.ia(t)}ea(t){const s=this.Yc.getSessionKey();return this.na(t)&&null!==s&&this.ta(t.callback,s),s}ia(t){this.na(t)&&csArray.prototype.push.call(this.sa,t.callback)}flushPendingCallbacks(){const t=this.Yc.getSessionKey();null!==t&&csArray.prototype.forEach.call(this.sa,(s=>{this.ta(s,t)})),this.sa=[]}na(t){return t&&"function"==typeof t.callback}ta(t,s){csSetTimeout((()=>{t(s)}))}}class Zr{constructor(t,s){this.ra=t,this.Yc=s}onTrackingContextRequestCallback(t){const s=this.Yc.getTrackingContext();null!==s&&this.ra.sendToChildren(Qt.TrackingContextResultMessage,{...t,trackingContext:s})}onIframeIntegrationCallback(t){if(!this.Yc.isNaturalPageViewSent())return;const s=this.Yc.getTrackingContext();null!==s&&(t.trackingContext=s,this.ra.sendToChildren(Qt.IntegrationCallback,t))}sendAfterPageViewCallbackToChildren(){const t=this.Yc.getTrackingContext();if(null===t)return;const s={trackingContext:t,initiator:Wt.AfterPageView};this.ra.sendToChildren(Qt.IntegrationCallback,s)}}class Wr{constructor(t){this.Yc=t}handleCommand(t,s){Et(t)&&Rt(s)&&this.ta(t,s)}ta(t,s){csSetTimeout((()=>{const e=this.Yc.getTrackingContext();if(e){const i=function(t,s){const{isRecording:e,pageNumber:i,projectId:n,siteId:r,uxaDomain:o,csLiteDomain:h}=t,c=/^(.+)\.(\d+)$/.exec(t.sessionKey);let a;if(e&&c){const[,t,e]=c;a=r?`${h}/sites/${r}/player?uu=${t}&sn=${e}&pn=${i}&`:`${o}/quick-playback/index.html?pid=${n}&uu=${t}&sn=${e}&pvid=${i}&recordingType=cs`,s.withTimestamp&&(a+="&t="+(It.now()-s.recordingStartTimestamp))}return{replayLink:a,isRecording:e}}(e,t);s(i)}}))}}class Jr{constructor(){this.Kc=new Set}handleCommand(t,s){return Rt(t)?this.Kc.has(t)?null:(this.Kc.add(t),s&&(this.Lr=s,this.oa(t,s)),()=>this.Kc.delete(t)):null}executeCallbacks(t){this.ha(t)&&(this.Lr=t,this.Kc.forEach((s=>this.oa(s,t))))}oa(t,s){csSetTimeout((()=>{try{t(s)}catch(t){}}))}ha(t){const{isRecording:s,recordingStartTimestamp:e,etrState:i}=t;return this.Lr&&(this.Lr.isRecording!==s||this.Lr.recordingStartTimestamp!==e||this.Lr.etrState!==i)}}const Qr=["afterPageView"],Yr=["getSessionKey"],Kr=["onRecordingStateChange"],Xr=["replay:link:generate"];class to{constructor(t,s,e,i,n,r,o,h){this.W=t,this.J=s,this.Nc=e,this.ca=i,this.ra=n,this.L=r,this.Wc=o,this.Cc=h}init(){this.Yc=new jr(this.W,this.J,this.L,this.Wc),this.aa=new zr(this.Yc),this.ua=new Gr(this.Yc),this.da=new Jr,this.fa=new Wr(this.Yc),this.pa=new Zr(this.ra,this.Yc),this.ca.addListener(this.pa),this.Nc.register(Yr,(t=>this.ua.handleCommand(t))),this.Nc.register(Qr,(t=>this.aa.handleCommand(t))),this.Nc.register(Kr,(t=>{this.da.handleCommand(t,this.Cc.getRecordingStatus())})),this.Nc.register(Xr,((t,s)=>{this.va&&this.fa.handleCommand({...t,recordingStartTimestamp:this.Cc.getRecordingStatus().recordingStartTimestamp},s)}))}onAfterNaturalPageView(){this.Yc.setNaturalPageViewSent(!0),this.ua.flushPendingCallbacks(),this.aa.executeRegisteredCallbacks(),this.pa.sendAfterPageViewCallbackToChildren()}onAfterArtificialPageView(){this.aa.executeRegisteredCallbacks(),this.pa.sendAfterPageViewCallbackToChildren()}onCollectStateChange(){this.da.executeCallbacks(this.Cc.getRecordingStatus())}onRecordingStatusChange(){this.da.executeCallbacks(this.Cc.getRecordingStatus())}setRecordingService(t){this.va=t}}ws([Vr()],to.prototype,"onCollectStateChange",null),ws([Vr()],to.prototype,"onRecordingStatusChange",null);class so{constructor(t,s){this.key=csString.prototype.slice.call(t,0,512),this.value=yt(s)?csString.prototype.slice.call(s,0,255):s}static isValid(t,s){return yt(t)&&(yt(s)||wt(s))}}class eo extends Me{constructor(t,s){super(),this.ma=t,this.D=s,this.ga=[]}onStart(){csArray.prototype.forEach.call(this.ga,(t=>this.trackDynamicVariable(t.key,t.value))),this.ga=[]}onStop(){}trackDynamicVariable(t,s){this.isStarted?so.isValid(t,s)&&this.ma.add(new so(this.D.anonymizePII(t),this.D.anonymizePII(s))):csArray.prototype.push.call(this.ga,{key:t,value:s})}}class io{constructor(t){this.wa=t,this.ma=[]}add(t){csArray.prototype.push.call(this.ma,t),this.setBatchReadyCall()}clear(){this.ma=[]}onBatchReady(t){this.ya=t}getRequestParameters(){const t={};for(const s of this.ma)t[s.key]=s.value;return{dv:this.wa.compressSync(csJSON.stringify(t),"base64"),ct:this.wa.algorithm}}setBatchReadyCall(){this.ya()}}ws([Vr(),is("dynamicVariablesBatchReady")],io.prototype,"setBatchReadyCall",null);const no=["trackDynamicVariable"];class ro{constructor(t,s,e,i,n,r){this.Nc=t,this.J=s,this.L=e,this.mc=i,this.wa=n,this.D=r,this.N=new tt(this.L.getTrackerUri(),"dvar"),this.ma=new io(this.wa),this.Ea=new eo(this.ma,this.D)}init(){this.N.setRequestParametersProviders(this.mc,this.ma),this.J.setDynamicVariablesService(this.Ea),this.ma.onBatchReady((()=>this.N.send())),this.N.after((()=>this.ma.clear())),this.Nc.register(no,(({key:t,value:s}={})=>{this.Ea.trackDynamicVariable(t,s)}))}onStartTracking(){this.Ea.start()}}class oo{constructor(t,s){this.id=t,this.revenue=s}static from(t){const s=new oo(t.id,parseFloat(t.revenue));return isNaN(parseFloat(t.tax))||(s.tax=parseFloat(t.tax)),isNaN(parseFloat(t.shipping))||(s.shipping=parseFloat(t.shipping)),yt(t.currency)&&t.currency.length<=10&&(s.currency=t.currency),s}hasValidRevenue(){return!isNaN(this.revenue)&&this.revenue>=0}static isValid(t){return _t(t)&>(t.revenue)&&yt(t.currency)&&t.currency.length<=10&&(!_t(t.id)||yt(t.id))}}class ho{constructor(t,s,e,i){this.id=t,this.name=s,this.price=e,this.quantity=i}static from(t){if(!ho.Aa(t))return null;const s=new ho(t.id,t.name,parseFloat(t.price),parseInt(t.quantity,10));return At(t.sku)&&(s.sku=t.sku),At(t.category)&&(s.category=t.category),At(t.merchant)&&t.merchant.length>0&&(s.merchant=t.merchant.slice(0,100)),s}static Aa(t){return _t(t)&&yt(t.id)&&yt(t.name)&>(parseFloat(t.price))&&wt(parseInt(t.quantity,10))&&(!At(t.sku)||yt(t.sku))&&(!At(t.category)||yt(t.category))&&(!At(t.merchant)||yt(t.merchant))}}class co{constructor(t,s,e){this.D=t,this._a=s,this.$i=e,this.clear()}addTransaction(t){const s=this.D.anonymizeFields(t,["id"]);this.Ra=oo.from(s)}getTransaction(){return this.Ra}sendTransaction(){null!==this._a&&null!==this.$i&&(this.$i.refreshSession(),this.$i.isSessionValid()&&(this.Ra.hasValidRevenue()?this._a.send():ss.warn("Transaction Service: unable to send transaction with invalid parameters")))}addItem(t){if(Rt(t))return;const s=this.D.anonymizeFields(t,["id","name","sku","category"]),e=ho.from(s);null!==e&&csArray.prototype.push.call(this.Sa,e)}getItems(){return this.Sa}clear(){this.Ra=oo.from({revenue:NaN}),this.Sa=[]}getRequestParameters(){const t={id:this.Ra.id?`${this.Ra.id}`:"",revenue:`${this.Ra.revenue}`};return At(this.Ra.tax)&&(t.tax=`${this.Ra.tax}`),At(this.Ra.shipping)&&(t.shipping=`${this.Ra.shipping}`),At(this.Ra.currency)&&(t.cu=`${this.Ra.currency}`),t.items=window.csJSON.stringify(this.Sa),t}}class ao{constructor(t,s){this.Ta=t,this.$i=s,this.Ia=null}addToCart(t){const s={};yt(t.sku)&&(s.sku=csString.prototype.slice.call(t.sku,0,100)),yt(t.merchant)&&(s.merchant=csString.prototype.slice.call(t.merchant,0,100)),(s.sku||s.merchant)&&(this.Ia=s,this.sendCartItem())}getCartItem(){return this.Ia}sendCartItem(){this.$i.refreshSession(),this.$i.isSessionValid()&&this.Ta.send()}clear(){this.Ia=null}getRequestParameters(){if(!this.Ia)return{};const t={};return yt(this.Ia.sku)&&this.Ia.sku.length>0&&(t.sku=this.Ia.sku),yt(this.Ia.merchant)&&this.Ia.merchant.length>0&&(t.me=this.Ia.merchant),t}}const uo=["ecommerce:addToCart","ec:cart:add"],lo=["ecommerce:addTransaction","ec:transaction:create"],fo=["ecommerce:addItem","ec:transaction:items:add"],po=["ecommerce:send","ec:transaction:send"];class vo{constructor(t,s,e,i,n,r,o){this.L=t,this.lc=s,this.W=e,this.Nc=i,this.D=n,this.$i=r,this.it=o}init(){const t=new tt(this.L.getTrackerUri(),"transaction"),s=new tt(this.L.getTrackerUri(),"addtocart"),e=new co(this.D,t,this.$i),i=new ao(s,this.$i),n=new In(this.lc,this.W,this.it,e);t.setRequestParametersProviders(n),t.after((()=>{e.clear()}));const r=new In(this.lc,this.W,this.it,i);s.setRequestParametersProviders(r),s.after((()=>{i.clear()})),this.Nc.register(lo,(t=>{e.addTransaction(t)})),this.Nc.register(fo,(t=>e.addItem(t))),this.Nc.register(po,(()=>e.sendTransaction())),this.Nc.register(uo,(t=>{i.addToCart(t)}))}}class mo{constructor(t){this.Pa=t.performance}getRequestParameters(){if(this.ba())return{};const t=this.Va();return{str:t.startRender,di:t.domInteractive,dc:t.domComplete,fl:t.fullyLoaded}}Va(){const t=this.Pa.timing;return{startRender:""+(t.domLoading-t.requestStart),domInteractive:""+(t.domInteractive-t.requestStart),domComplete:""+(t.domComplete-t.requestStart),fullyLoaded:""+(t.loadEventEnd-t.requestStart)}}ba(){return!(this.Pa&&this.Pa.timing&&this.Pa.timing.loadEventEnd>0)}}var go,wo;function yo(t){return void 0!==t.tgt}!function(t){t[t.RESIZE=0]="RESIZE",t[t.SCROLL=1]="SCROLL",t[t.MOUSEMOVE=2]="MOUSEMOVE",t[t.MOUSEDOWN=3]="MOUSEDOWN",t[t.MOUSEUP=4]="MOUSEUP",t[t.CLICK=5]="CLICK",t[t.MOUSEOVER=6]="MOUSEOVER",t[t.MOUSEOUT=7]="MOUSEOUT",t[t.CHANGE=10]="CHANGE",t[t.FOCUSIN=11]="FOCUSIN",t[t.FOCUSOUT=12]="FOCUSOUT",t[t.TAP=14]="TAP",t[t.KEYDOWN=15]="KEYDOWN",t[t.KEYUP=16]="KEYUP",t[t.COMMAND=17]="COMMAND",t[t.SUBMIT=18]="SUBMIT",t[t.PERFORMANCE=19]="PERFORMANCE",t[t.DRAG=20]="DRAG",t[t.FLICK=21]="FLICK",t[t.KEYBOARD_NAVIGATION=22]="KEYBOARD_NAVIGATION",t[t.ZOOM=23]="ZOOM",t[t.VIEWPORT_SCALE=24]="VIEWPORT_SCALE",t[t.TEXT_HIGHLIGHT=25]="TEXT_HIGHLIGHT",t[t.DEAD_CLICK=30]="DEAD_CLICK",t[t.DEAD_ZOOM=31]="DEAD_ZOOM",t[t.PAGE_RELOAD=32]="PAGE_RELOAD",t[t.THRASHED_CURSOR=33]="THRASHED_CURSOR",t[t.BLANK_PAGE=34]="BLANK_PAGE",t[t.EXTERNAL_EVENT=35]="EXTERNAL_EVENT"}(go||(go={})),function(t){t.SUCCESS="success",t.FAILURE="failure",t.ATTEMPT="attempt"}(wo||(wo={}));class Eo{static build(t,s,e){return csArray.prototype.reduce.call(e,((s,e)=>e.enhanceAnalysisEvent(t,s)),s)}}class Ao{constructor(t,s,e){this.Ca=t,this.Na=s,this.Pe=e}processGesture(t,s){switch(t.type){case Qn.TAP:this.Oa(s);break;case Qn.FLICK:this.ka(t,s);break;case Qn.DRAG:this.xa(t,s)}}Oa(t){const s={type:go.TAP,ts:0,x:0,y:0,tgt:""},e=Eo.build(t,s,this.Ca);e.tgt!==q.INVALID_ELEMENT&&this.zn(e)}xa(t,s){var e,i;const n={type:go.DRAG,ts:0,fd:t.direction,tgt:""};(null===(e=this.Pe)||void 0===e?void 0:e.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.Pe)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=Eo.build(s,n,this.Ca);r.tgt!==q.INVALID_ELEMENT&&this.zn(r)}ka(t,s){var e,i;const n={type:go.FLICK,ts:0,fd:t.direction,tgt:""};(null===(e=this.Pe)||void 0===e?void 0:e.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.Pe)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=Eo.build(s,n,this.Ca);r.tgt!==q.INVALID_ELEMENT&&this.zn(r)}onEvent(t){this.zn=t}start(){this.Na.subscribe(Ao.$a,((t,s)=>this.processGesture(t,s)))}stop(){this.Na.unsubscribe(Ao.$a)}}Ao.$a="AnalysisGestureTracker",ws([os()],Ao.prototype,"processGesture",null);class _o{constructor(t,s,e){this.Ca=t,this.La=s,this.Da=e,this.Ma="select, select *, input, textarea",this.Ua="select, select *, input, textarea",this.Fa="a, a *, button, button *, select, select *, input, textarea",this.qa="input, select, textarea",this.Ba=150,this.Ha=400,this.ja=!1,this.za=br(((t,s)=>this.scrollListener(t,s)),this.Ba),this.Ga=br((t=>this.resizeListener(t)),this.Ba),this.Za=ce((t=>this.mouseMoveListener(t)),this.Ha),this.Wa=[{boundElement:window,type:"resize",listener:()=>this.Ga()},{boundElement:document,type:"scroll",listener:t=>this.za(t)},{boundElement:window,type:"mousemove",listener:t=>{this.Za(function(t){return t.composedPath&&Object.defineProperty(t,"__csOriginalTarget",{value:t.composedPath()[0],writable:!1,enumerable:!1}),t}(t))}},{boundElement:document,type:"mousedown",listener:t=>this.mouseDownListener(t)},{boundElement:document,type:"mouseup",listener:t=>this.mouseUpListener(t)},{boundElement:document,type:"click",listener:t=>this.clickListener(t)}],this.Ja=[{type:"change",listener:this.Da.on(this.Ua,(t=>this.changeListener(t)))}],this.Qa=[{boundElement:document,type:"mouseover",listener:this.Da.on(this.Fa,(t=>this.mouseOverListener(t)))},{boundElement:document,type:"mouseout",listener:this.Da.on(this.Fa,(t=>this.mouseOutListener(t)))},{boundElement:document,type:"focusin",listener:this.Da.on(this.Ma,(t=>this.focusInListener(t)))},{boundElement:document,type:"focusout",listener:this.Da.on(this.Ma,(t=>this.focusOutListener(t)))},{boundElement:document,type:"keyup",listener:this.Da.on(this.qa,(t=>this.keyUpListener(t)))},{boundElement:document,type:"keydown",listener:this.Da.on(this.qa,(t=>this.keyDownListener(t)))},{boundElement:document,type:"copy",listener:this.Da.on(this.qa,(t=>this.copyListener(t)))},{boundElement:document,type:"cut",listener:this.Da.on(this.qa,(t=>this.cutListener(t)))},{boundElement:document,type:"paste",listener:this.Da.on(this.qa,(t=>this.pasteListener(t)))},...csArray.prototype.map.call(this.Ja,(t=>({...t,boundElement:document})))],this.js={},this.He=(t,s)=>{switch(s){case"initial":case"added":this.ks(t);break;case"removed":this.xs(t)}},this.Os=new ne(this.He),this.Ds()}ks(t){if(R(t)){const t=this.Ya();csArray.prototype.forEach.call(t,(t=>re(t)))}else{const s=this.Ka();csArray.prototype.forEach.call(s,(s=>{re({...s,boundElement:t})}))}}xs(t){if(R(t)){const t=this.Ya();csArray.prototype.forEach.call(t,(t=>oe(t)))}else{const s=this.Ka();csArray.prototype.forEach.call(s,(s=>{oe({...s,boundElement:t})}))}}onEvent(t){this.zn=t}start(){this.Os.observe(),this.ks(document),this.resizeListener()}stop(){this.xs(document),this.Os.disconnect()}flushPendingDebouncedListeners(){this.za.flushPending(),this.Ga.flushPending()}Ka(){return this.Da.isMatchesSelectorSupported()?this.Ja:(ss.warn("Element.matches is not implemented yet"),[])}Ya(){return this.Da.isMatchesSelectorSupported()?[...this.Wa,...this.Qa]:(ss.warn("Element.matches is not implemented yet"),this.Wa)}resizeListener(t){const s=we.getScrollContainer(),e=St(s);e&&(this.ja=!0);const i={type:go.RESIZE,ts:0,x:e?s.clientWidth:Mi.windowWidth(),y:e?s.clientHeight:Mi.windowHeight()};void 0!==t&&(i.d=t),this.zn(i)}scrollListener(t,s){const e=we.isEventOnScrollContainer(s);!this.ja&&e&&this.resizeListener();const i={type:go.SCROLL,ts:0,x:e?csEventtarget.apply(s).scrollLeft:Mi.windowOffsetX(),y:e?csEventtarget.apply(s).scrollTop:Mi.windowOffsetY(),d:t},n=Eo.build(s,i,this.Ca);this.zn(n)}mouseMoveListener(t){const s={type:go.MOUSEMOVE,ts:0,x:t.pageX,y:t.pageY},e=Eo.build(t,s,this.Ca);this.zn(e)}mouseDownListener(t){const s={type:go.MOUSEDOWN,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Eo.build(t,s,this.Ca);this.Xa(e)}mouseUpListener(t){const s={type:go.MOUSEUP,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Eo.build(t,s,this.Ca);this.Xa(e)}clickListener(t){const s={type:go.CLICK,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Eo.build(t,s,this.Ca);this.Xa(e)}mouseOverListener(t){const s={type:go.MOUSEOVER,ts:0,x:t.pageX,y:t.pageY,tgt:""},e=Eo.build(t,s,this.Ca);this.Xa(e)}mouseOutListener(t){const s={type:go.MOUSEOUT,ts:0,x:t.pageX,y:t.pageY,tgt:this.La.getEventTargetPath(t)},e=Eo.build(t,s,this.Ca);this.Xa(e)}focusInListener(t){const s={type:go.FOCUSIN,ts:0,tgt:this.La.getEventTargetPath(t)},e=Eo.build(t,s,this.Ca);this.Xa(e)}focusOutListener(t){const s={type:go.FOCUSOUT,ts:0,tgt:this.La.getEventTargetPath(t)},e=Eo.build(t,s,this.Ca);this.Xa(e)}changeListener(t){const s={type:go.CHANGE,ts:0,tgt:this.La.getEventTargetPath(t)},e=Eo.build(t,s,this.Ca);this.Xa(e)}copyListener(t){const s={type:go.COMMAND,ts:0,tgt:this.La.getEventTargetPath(t),key:pe.COPY};this.Xa(s)}cutListener(t){const s={type:go.COMMAND,ts:0,tgt:this.La.getEventTargetPath(t),key:pe.CUT};this.Xa(s)}pasteListener(t){const s={type:go.COMMAND,ts:0,tgt:this.La.getEventTargetPath(t),key:pe.PASTE};this.Xa(s)}keyUpListener(t){const s={type:go.KEYUP,ts:0,tgt:this.La.getEventTargetPath(t),key:this.tu(t)};this.Xa(s)}keyDownListener(t){const s={type:go.KEYDOWN,ts:0,tgt:this.La.getEventTargetPath(t),key:this.tu(t)};this.Xa(s)}tu(t){const s=this.js[t.key];return void 0===s?fe.ALPHANUMERICAL:s}Xa(t){yo(t)&&t.tgt!==q.INVALID_ELEMENT&&this.zn(t)}Ds(){this.js[" "]=fe.SPACE,this.js.Spacebar=fe.SPACE,this.js.Enter=fe.ENTER,this.js.Backspace=fe.BACKSPACE,this.js.Delete=fe.DELETE,this.js.ArrowUp=fe.ARROWUP,this.js.ArrowDown=fe.ARROWDOWN,this.js.ArrowLeft=fe.ARROWLEFT,this.js.ArrowRight=fe.ARROWRIGHT,this.js.Up=fe.ARROWUP,this.js.Down=fe.ARROWDOWN,this.js.Left=fe.ARROWLEFT,this.js.Right=fe.ARROWRIGHT,this.js.CapsLock=fe.CAPSLOCK,this.js.Shift=fe.SHIFT,this.js.Tab=fe.TAB}}ws([is("Event handler type: resize")],_o.prototype,"resizeListener",null),ws([is("Event handler type: scroll")],_o.prototype,"scrollListener",null),ws([is("Event handler type: mouseMove"),os()],_o.prototype,"mouseMoveListener",null),ws([is("Event handler type: mouseDown"),os()],_o.prototype,"mouseDownListener",null),ws([is("Event handler type: mouseUp"),os()],_o.prototype,"mouseUpListener",null),ws([is("Event handler type: click"),os()],_o.prototype,"clickListener",null),ws([is("Event handler type: mouseOver"),os()],_o.prototype,"mouseOverListener",null),ws([is("Event handler type: mouseOut"),os()],_o.prototype,"mouseOutListener",null),ws([is("Event handler type: focusIn")],_o.prototype,"focusInListener",null),ws([is("Event handler type: focusOut")],_o.prototype,"focusOutListener",null),ws([is("Event handler type: change")],_o.prototype,"changeListener",null),ws([is("Event handler type: copy")],_o.prototype,"copyListener",null),ws([is("Event handler type: cut")],_o.prototype,"cutListener",null),ws([is("Event handler type: paste")],_o.prototype,"pasteListener",null),ws([is("Event handler type: keyup")],_o.prototype,"keyUpListener",null),ws([is("Event handler type: keydown")],_o.prototype,"keyDownListener",null);class Ro{constructor(){this.su=100,this.eu=0,this.iu=Mi.documentHeight(),this.nu={boundElement:document,type:"scroll",listener:t=>this.maxScrollRateListener(t)},this.eu=this.ru(we.getScrollContainer()).maxScrollRate}onEvent(t){this.zn=t}start(){re(this.nu)}stop(){oe(this.nu)}reset(){const t=we.getScrollContainer(),{maxScrollRate:s,maxDocumentHeight:e}=this.ru(t);this.iu=e,this.eu=s,this.zn()}ru(t){let s=0,e=0;if(null===t)e=Mi.documentHeight(),s=this.ou(e);else{const i=this.hu(t);e=this.au(t,i),s=this.lu(t,i)}return{maxScrollRate:s,maxDocumentHeight:e}}maxScrollRateListener(t){let s=null;we.isEventOnScrollContainer(t)&&(s=csEventtarget.apply(t));const{maxScrollRate:e,maxDocumentHeight:i}=this.ru(s);(e>this.eu||i>this.iu)&&(this.eu=e,i>this.iu&&(this.iu=i),this.zn())}ou(t){const s=Math.round(this.du()/t*100);return Math.min(s,this.su)}du(){const t=Mi.windowHeight();return Mi.windowOffsetY()+t}lu(t,s){const e=t.scrollTop+t.clientHeight+t.getBoundingClientRect().top+s,i=this.au(t,s),n=Math.round(e/i*100);return Math.min(n,this.su)}hu(t){const s=window.getComputedStyle(t).paddingTop||"0px";return parseInt(s,10)}au(t,s){return t.scrollHeight+t.getBoundingClientRect().top+s}getRequestParameters(){return{sr:`${this.eu}`,mdh:`${this.iu}`}}}ws([is("MaxScrollRate handler")],Ro.prototype,"maxScrollRateListener",null);class So{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,v,m,g,w,y,E){this.L=t,this.fu=s,this.Na=e,this.pu=i,this.vu=n,this.mu=r,this.gu=o,this.wu=h,this.$i=c,this.Kt=a,this.yu=u,this.Eu=l,this.ln=d,this.Fi=f,this.Au=p,this._u=v,this.Ru=m,this.Su=g,this.Tu=w,this.Iu=y,this.Pu=E,this.Xi=new De,this.bu=!1}init(){var t,s,e,i,n,r,o;this.fu.onEvent((t=>this.cn(t))),this.Na.onEvent((t=>this.cn(t))),this.pu.onEvent((()=>{const t=this.pu.getRequestParameters();this.Fi.setQueryParams(t),this.gu.setQueryParams(t)})),this.Eu.onEvent((t=>this.Vu(t))),this.Cu(),null===(t=this.Au)||void 0===t||t.onEvent((t=>this.cn(t))),null===(s=this.Tu)||void 0===s||s.onEvent((t=>this.cn(t))),null===(e=this._u)||void 0===e||e.onEvent((t=>this.cn(t))),null===(i=this.Ru)||void 0===i||i.onEvent((t=>this.cn(t))),this.Nu(),null===(n=this.Su)||void 0===n||n.onEvent((t=>this.Vu(t))),null===(r=this.Iu)||void 0===r||r.onEvent((t=>this.Vu(t))),null===(o=this.Pu)||void 0===o||o.onEvent((t=>this.Vu(t)))}Nu(){this.gu.onBeaconSuccess((()=>{this.mu.clearEvents()})),this.gu.onBeaconFailure((t=>{this.Ou(t)}))}initStates(){const t=this.wu.getRequestParameters(),s=this.vu.getRequestParameters(),e=this.pu.getRequestParameters();this.Fi.setQueryParams(t),this.Fi.setQueryParams(s),this.Fi.setQueryParams(e),this.gu.setQueryParams(t),this.gu.setQueryParams(s),this.gu.setQueryParams(e),this.ku()}clearStates(t){var s,e;this.fu.flushPendingDebouncedListeners(),null===(s=this._u)||void 0===s||s.flushPendingKeyboardNavigationEvent(),null===(e=this.Ru)||void 0===e||e.flushPendingTextHighlightEvent(),t?(this.xu(),this.sendLastMessageBeacon()):this.sendEvents(),this.pu.reset(),this.Eu.stop(),this.Fi.removeQueryParams()}start(t){var s,e,i,n,r,o,h;t||null===(s=this.Su)||void 0===s||s.start(),this.ln.start(),this.fu.start(),this.pu.start(),this.Na.start(),null===(e=this.Au)||void 0===e||e.start(),null===(i=this.Ru)||void 0===i||i.start(),t||this.Eu.start(),null===(n=this._u)||void 0===n||n.start(),null===(r=this.Tu)||void 0===r||r.start(),null===(o=this.Iu)||void 0===o||o.start(),null===(h=this.Pu)||void 0===h||h.start()}collectInitialEvents(){var t;null===(t=this.Au)||void 0===t||t.collectInitialEvents()}onIframeAnalysisBrowserEvent(t){this.Vu(t)}onIframeAnalysisUserEvent(t){this.cn(t)}onExternalEvent(t){this.yn(t)}Vu(t){this.$i.isCurrentPageviewValid()&&this.yn(t)}cn(t){this.$i.refreshSession(),this.$i.isSessionValid()&&this.yn(t)}yn(t){this.mu.addEvent(this.$u(t)),this.mu.isFull()&&this.sendEvents(),this.L.emitDebugEvents&&this.Xi.emit("analysisEvent",{...t,typeName:go[t.type]})}$u(t){return t.ts=this.Lu(),t}xu(){this.gu.setQueryParams({hlm:"true"}),this.bu=!0}sendLastMessageBeacon(){this.gu.setQueryParams(this.vu.getRequestParameters()),this.gu.send(this.mu.stringifyEvents()),this.gu.removeQueryParams(["hlm"]),this.bu=!1}sendEvents(){this.mu.isEmpty()||(this.Fi.setQueryParams(this.wu.getRequestParameters()),this.Fi.setQueryParams(this.vu.getRequestParameters()),this.Fi.send(this.mu.getEvents()),this.mu.clearEvents())}stop(){var t,s,e,i,n,r,o;this.ln.stop(),this.fu.stop(),this.pu.stop(),this.Na.stop(),this.Eu.stop(),null===(t=this.Au)||void 0===t||t.stop(),null===(s=this._u)||void 0===s||s.stop(),null===(e=this.Ru)||void 0===e||e.stop(),null===(i=this.Tu)||void 0===i||i.stop(),this.mu.empty(),null===(n=this.Su)||void 0===n||n.stop(),null===(r=this.Iu)||void 0===r||r.stop(),null===(o=this.Pu)||void 0===o||o.stop()}ku(){this.Du=It.now()}Lu(){return It.now()-this.Du}Cu(){this.ln.onEvent((t=>{var s,e;null===(s=this._u)||void 0===s||s.flushPendingKeyboardNavigationEvent(),null===(e=this.Ru)||void 0===e||e.flushPendingTextHighlightEvent(),t===Be.PagehideVisible?this.xu():t===Be.PagehideHidden?(this.xu(),this.sendLastMessageBeacon()):this.mu.isEmpty()&&!this.bu||this.sendLastMessageBeacon()}))}Ou(t){try{this.mu.isEmpty()&&!this.bu||this.Kt.save({requestParameters:t,events:this.mu.getEvents()})}catch{}}pushSubmitEvent(t,s){if(!function(t){return t===wo.SUCCESS||t===wo.FAILURE||t===wo.ATTEMPT}(t))return void ss.warn(`AnalysisEvents Service: invalid submit status: ${t}`);if(!St(s))return void ss.warn(`AnalysisEvents Service: invalid element: ${s}`);const e={status:t,type:go.SUBMIT,ts:0,tgt:this.yu.getElementPath(s)};e.tgt!==q.INVALID_ELEMENT&&this.Vu(e)}}class To{constructor(t,s){this.Kt=t,this.Fi=s,this.Mu=()=>{"visible"===document.visibilityState&&this.Uu()}}start(){this.Uu(),this.ie()}stop(){this.he()}getRecoveryStorage(){return this.Kt}Uu(){const t=this.Kt.recover();if(null!==t){const{requestParameters:s,events:e}=t;this.Fi.send(e,s)}}ie(){document.addEventListener("visibilitychange",this.Mu)}he(){document.removeEventListener("visibilitychange",this.Mu)}}class Io{constructor(t){this.Vr=t}save(t){localStorage.setItem(this.Vr,csJSON.stringify(t))}clear(){localStorage.removeItem(this.Vr)}recover(){const t=localStorage.getItem(this.Vr);if(null===t)return null;let s=null;try{s=csJSON.parse(t)}catch{ss.error(`Invalid item in localStorage.\n (key:${this.Vr}; value:${t})`)}finally{this.clear()}return s}}class Po{constructor(t){this.Fu=t,this.qu=t=>this.processMetric(t),this.Xs=!1}onEvent(t){this.zn=t}start(){this.Xs||(this.Xs=!0,this.Fu.onFCP(this.qu),this.Fu.onCLS(this.qu),this.Fu.onFID(this.qu),this.Fu.onLCP(this.qu),this.Fu.onTTFB(this.qu),this.Fu.onINP(this.qu))}stop(){this.Xs=!1}processMetric(t){if(!this.Xs)return;const s={type:go.PERFORMANCE,name:t.name,val:t.value,ts:0};this.zn(s)}}ws([is("Performance metric handler")],Po.prototype,"processMetric",null);var bo,Vo,Co,No,Oo,ko=-1,xo=function(t){addEventListener("pageshow",(function(s){s.persisted&&(ko=s.timeStamp,t(s))}),!0)},$o=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Lo=function(){var t=$o();return t&&t.activationStart||0},Do=function(t,s){var e=$o(),i="navigate";return ko>=0?i="back-forward-cache":e&&(document.prerendering||Lo()>0?i="prerender":document.wasDiscarded?i="restore":e.type&&(i=e.type.replace(/_/g,"-"))),{name:t,value:void 0===s?-1:s,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},Mo=function(t,s,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var i=new PerformanceObserver((function(t){Promise.resolve().then((function(){s(t.getEntries())}))}));return i.observe(Object.assign({type:t,buffered:!0},e||{})),i}}catch(t){}},Uo=function(t,s,e,i){var n,r;return function(o){s.value>=0&&(o||i)&&((r=s.value-(n||0))||void 0===n)&&(n=s.value,s.delta=r,s.rating=function(t,s){return t>s[1]?"poor":t>s[0]?"needs-improvement":"good"}(s.value,e),t(s))}},Fo=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},qo=function(t){var s=function(s){"pagehide"!==s.type&&"hidden"!==document.visibilityState||t(s)};addEventListener("visibilitychange",s,!0),addEventListener("pagehide",s,!0)},Bo=function(t){var s=!1;return function(e){s||(t(e),s=!0)}},Ho=-1,jo=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},zo=function(t){"hidden"===document.visibilityState&&Ho>-1&&(Ho="visibilitychange"===t.type?t.timeStamp:0,Zo())},Go=function(){addEventListener("visibilitychange",zo,!0),addEventListener("prerenderingchange",zo,!0)},Zo=function(){removeEventListener("visibilitychange",zo,!0),removeEventListener("prerenderingchange",zo,!0)},Wo=function(){return Ho<0&&(Ho=jo(),Go(),xo((function(){setTimeout((function(){Ho=jo(),Go()}),0)}))),{get firstHiddenTime(){return Ho}}},Jo=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Qo=[1800,3e3],Yo=function(t,s){s=s||{},Jo((function(){var e,i=Wo(),n=Do("FCP"),r=Mo("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(r.disconnect(),t.startTime<i.firstHiddenTime&&(n.value=Math.max(t.startTime-Lo(),0),n.entries.push(t),e(!0)))}))}));r&&(e=Uo(t,n,Qo,s.reportAllChanges),xo((function(i){n=Do("FCP"),e=Uo(t,n,Qo,s.reportAllChanges),Fo((function(){n.value=performance.now()-i.timeStamp,e(!0)}))})))}))},Ko=[.1,.25],Xo={passive:!0,capture:!0},th=new Date,sh=function(t,s){bo||(bo=s,Vo=t,Co=new Date,nh(removeEventListener),eh())},eh=function(){if(Vo>=0&&Vo<Co-th){var t={entryType:"first-input",name:bo.type,target:bo.target,cancelable:bo.cancelable,startTime:bo.timeStamp,processingStart:bo.timeStamp+Vo};No.forEach((function(s){s(t)})),No=[]}},ih=function(t){if(t.cancelable){var s=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,s){var e=function(){sh(t,s),n()},i=function(){n()},n=function(){removeEventListener("pointerup",e,Xo),removeEventListener("pointercancel",i,Xo)};addEventListener("pointerup",e,Xo),addEventListener("pointercancel",i,Xo)}(s,t):sh(s,t)}},nh=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(s){return t(s,ih,Xo)}))},rh=[100,300],oh=0,hh=1/0,ch=0,ah=function(t){t.forEach((function(t){t.interactionId&&(hh=Math.min(hh,t.interactionId),ch=Math.max(ch,t.interactionId),oh=ch?(ch-hh)/7+1:0)}))},uh=function(){return Oo?oh:performance.interactionCount||0},lh=function(){"interactionCount"in performance||Oo||(Oo=Mo("event",ah,{type:"event",buffered:!0,durationThreshold:0}))},dh=[200,500],fh=0,ph=function(){return uh()-fh},vh=[],mh={},gh=function(t){var s=vh[vh.length-1],e=mh[t.interactionId];if(e||vh.length<10||t.duration>s.latency){if(e)e.entries.push(t),e.latency=Math.max(e.latency,t.duration);else{var i={id:t.interactionId,latency:t.duration,entries:[t]};mh[i.id]=i,vh.push(i)}vh.sort((function(t,s){return s.latency-t.latency})),vh.splice(10).forEach((function(t){delete mh[t.id]}))}},wh=[2500,4e3],yh={},Eh=[800,1800],Ah=function t(s){document.prerendering?Jo((function(){return t(s)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(s)}),!0):setTimeout(s,0)},_h=function(t,s){s=s||{};var e=Do("TTFB"),i=Uo(t,e,Eh,s.reportAllChanges);Ah((function(){var n=$o();if(n){var r=n.responseStart;if(r<=0||r>performance.now())return;e.value=Math.max(r-Lo(),0),e.entries=[n],i(!0),xo((function(){e=Do("TTFB",0),(i=Uo(t,e,Eh,s.reportAllChanges))(!0)}))}}))};class Rh{onFCP(t){Yo(t,{reportAllChanges:!0})}onCLS(t){!function(t,s){s=s||{},Yo(Bo((function(){var e,i=Do("CLS",0),n=0,r=[],o=function(t){t.forEach((function(t){if(!t.hadRecentInput){var s=r[0],e=r[r.length-1];n&&t.startTime-e.startTime<1e3&&t.startTime-s.startTime<5e3?(n+=t.value,r.push(t)):(n=t.value,r=[t])}})),n>i.value&&(i.value=n,i.entries=r,e())},h=Mo("layout-shift",o);h&&(e=Uo(t,i,Ko,s.reportAllChanges),qo((function(){o(h.takeRecords()),e(!0)})),xo((function(){n=0,i=Do("CLS",0),e=Uo(t,i,Ko,s.reportAllChanges),Fo((function(){return e()}))})),setTimeout(e,0))})))}(t,{reportAllChanges:!0})}onFID(t){!function(t,s){s=s||{},Jo((function(){var e,i=Wo(),n=Do("FID"),r=function(t){t.startTime<i.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),e(!0))},o=function(t){t.forEach(r)},h=Mo("first-input",o);e=Uo(t,n,rh,s.reportAllChanges),h&&qo(Bo((function(){o(h.takeRecords()),h.disconnect()}))),h&&xo((function(){var i;n=Do("FID"),e=Uo(t,n,rh,s.reportAllChanges),No=[],Vo=-1,bo=null,nh(addEventListener),i=r,No.push(i),eh()}))}))}(t,{reportAllChanges:!0})}onLCP(t){!function(t,s){s=s||{},Jo((function(){var e,i=Wo(),n=Do("LCP"),r=function(t){var s=t[t.length-1];s&&s.startTime<i.firstHiddenTime&&(n.value=Math.max(s.startTime-Lo(),0),n.entries=[s],e())},o=Mo("largest-contentful-paint",r);if(o){e=Uo(t,n,wh,s.reportAllChanges);var h=Bo((function(){yh[n.id]||(r(o.takeRecords()),o.disconnect(),yh[n.id]=!0,e(!0))}));["keydown","click"].forEach((function(t){addEventListener(t,(function(){return setTimeout(h,0)}),!0)})),qo(h),xo((function(i){n=Do("LCP"),e=Uo(t,n,wh,s.reportAllChanges),Fo((function(){n.value=performance.now()-i.timeStamp,yh[n.id]=!0,e(!0)}))}))}}))}(t,{reportAllChanges:!0})}onTTFB(t){_h(t,{reportAllChanges:!0})}onINP(t){!function(t,s){s=s||{},Jo((function(){var e;lh();var i,n=Do("INP"),r=function(t){t.forEach((function(t){t.interactionId&&gh(t),"first-input"===t.entryType&&!vh.some((function(s){return s.entries.some((function(s){return t.duration===s.duration&&t.startTime===s.startTime}))}))&&gh(t)}));var s,e=(s=Math.min(vh.length-1,Math.floor(ph()/50)),vh[s]);e&&e.latency!==n.value&&(n.value=e.latency,n.entries=e.entries,i())},o=Mo("event",r,{durationThreshold:null!==(e=s.durationThreshold)&&void 0!==e?e:40});i=Uo(t,n,dh,s.reportAllChanges),o&&("PerformanceEventTiming"in window&&"interactionId"in PerformanceEventTiming.prototype&&o.observe({type:"first-input",buffered:!0}),qo((function(){r(o.takeRecords()),n.value<0&&ph()>0&&(n.value=0,n.entries=[]),i(!0)})),xo((function(){vh=[],fh=uh(),n=Do("INP"),i=Uo(t,n,dh,s.reportAllChanges)})))}))}(t,{reportAllChanges:!0})}}class Sh{constructor(t=[]){this.Zs=t}stringifyEvents(){return csJSON.stringify(this.Zs)}addEvent(t){csArray.prototype.push.call(this.Zs,t)}eventsCount(){return this.Zs.length}clearEvents(){this.Zs=[]}empty(){this.clearEvents()}isFull(){return this.eventsCount()>=50}isEmpty(){return 0===this.Zs.length}getEvents(){return this.Zs}}class Th{isEventTypeSupported(t){return-1!==csArray.prototype.indexOf.call(this.supportedEventTypes,t)}enhanceAnalysisEvent(t,s){return this.isEventTypeSupported(s.type)?this.baseEnhanceAnalysisEvent(t,s):s}}class Ih extends Th{constructor(){super(...arguments),this.supportedEventTypes=[go.CHANGE],this.Bu=["text","email","number","search","tel","url","password"]}baseEnhanceAnalysisEvent(t,s){const e=ve(t);return g(e)&&csArray.prototype.indexOf.call(this.Bu,e.type)>=0&&(s.isBlank=""===e.value),s}}class Ph extends Th{constructor(t){super(),this.La=t,this.supportedEventTypes=[go.MOUSEDOWN,go.MOUSEUP,go.CLICK,go.MOUSEOVER,go.TAP,go.DRAG,go.FLICK]}baseEnhanceAnalysisEvent(t,s){return s.tgt||(s.tgt=this.La.getEventTargetPath(t)),s}}var bh;!function(t){t.getRelativePosition=function(t){const s=ve(t);if(!(s&&l(s)&&Rt(s.getBoundingClientRect)&&_t(t.pageX)&&_t(t.pageY)))return{xRel:-1,yRel:-1,valid:!1};const e=s.getBoundingClientRect();let i=t.pageX-e.left-Mi.windowOffsetX(),n=t.pageY-e.top-Mi.windowOffsetY();s!==document.documentElement&&(i+=s.scrollLeft,n+=s.scrollTop);const r=Math.max(s.scrollWidth,e.width),o=Math.max(s.scrollHeight,e.height);return{xRel:Math.round(i/r*65535),yRel:Math.round(n/o*65535),valid:!0}}}(bh||(bh={}));class Vh extends Th{constructor(t,s){super(),this.V=t,this.La=s,this.supportedEventTypes=[go.MOUSEMOVE,go.CLICK],this.Hu=""}baseEnhanceAnalysisEvent(t,s){const{valid:e,xRel:i,yRel:n}=bh.getRelativePosition(t);if(e){const e=this.La.getEventTargetPath(t);e!==q.INVALID_ELEMENT&&(s.xRel=i,s.yRel=n,s.type===go.MOUSEMOVE&&(e!==this.Hu||this.V.iframesTracking?(this.Hu=e,s.tgtHM=e):s.tgtHM=""))}else s.type===go.MOUSEMOVE&&(this.Hu="");return s}}const Ch="v2/events",Nh=["submit"];class Oh{constructor(t,s,e,i,n,r,o,h,c,a,u){this.L=t,this.lc=s,this.W=e,this.yu=i,this.Da=n,this.Nc=r,this.$i=o,this.Na=h,this.ca=c,this.$c=a,this.Oc=u}init(){const t=new Sh,s=this.$c.create(`${this.L.getTrackerUri()}/${Ch}`,!0,"base64");this.ju=this.zu(s),this.Gu=this.Zu(t,this.ju.getRecoveryStorage(),s),this.Gu.init(),this.Oc.addListener(this.Gu),this.ca.addListener(this.Gu),this.Nc.register(Nh,((t,s)=>{this.Gu.pushSubmitEvent(t,s)}))}onStartTracking(t){this.ju.start(),this.Gu.start(t)}onAfterNaturalPageView(){this.Gu.initStates()}onAfterArtificialPageView(){this.Gu.initStates(),this.Gu.collectInitialEvents()}onArtificialPageViewEnd(){this.Gu.clearStates(!0)}onBeforeSessionRenewal(){this.Gu.clearStates(),this.Gu.stop(),this.ju.stop()}onOptout(){this.Gu.stop(),this.ju.stop()}Zu(t,s,e){const i=new mo(window),n=new Ro,r=function(t,s){const e=[];return t.mouseMoveHeatmapEnabled&&csArray.prototype.push.call(e,new Vh(t,s)),csArray.prototype.push.call(e,new Ih,new Ph(s)),e}(this.L,this.yu),o=new _o(r,this.yu,this.Da),h=function(t,s){const e=[];return csArray.prototype.push.call(e,new Ph(s)),e}(this.L,this.yu),c=new Ao(h,this.Na),a=new Po(new Rh),u=new je;const l=new On(`${this.L.getTrackerUri()}/${Ch}`),d=new In(this.lc,this.W);return new So(this.L,o,c,n,i,t,l,d,this.$i,s,this.yu,a,u,e,undefined,undefined,undefined,undefined,undefined,undefined,undefined)}zu(t){return new To(new Io("csAnalysisEventsPersisted"),t)}}var kh;!function(t){t.Artificial="a",t.Renewal="r",t.Natural="n"}(kh||(kh={}));class xh extends Me{constructor(t,s,e,i){super(),this.Jh=t,this.Wu=s,this.it=e,this.Wc=i}init(){this.Ju()}onStart(t){t?this.Qu():this.Yu()}onStop(){}triggerArtificialPageView(t,s){this.isStarted?this.Ku(t,s):_t(t)&&this.it.overridePath(t,s)}Yu(){this.Wc.setPageViewType(kh.Natural),this.Jh.emitBeforeNaturalPageView(),this.Wu.send(),this.it.cleanupOverrideLifespan(),this.Jh.emitAfterNaturalPageView()}Qu(){this.Wc.setPageViewType(kh.Renewal),this.Jh.emitBeforeNaturalPageView(),this.Wu.send(),this.Jh.emitAfterNaturalPageView()}Ku(t,s){this.Wc.setPageViewType(kh.Artificial),this.Jh.emitArtificialPageViewEnd(),_t(t)&&this.it.overridePath(t,s),this.Jh.emitBeforeArtificialPageView(),this.Wu.send(),this.it.cleanupOverrideLifespan(),this.Jh.emitAfterArtificialPageView()}Ju(){window.addEventListener("pageshow",(t=>{this.isStarted&&t.persisted&&this.Ku()}))}}const $h=window.navigator.language||window.navigator.userLanguage||window.navigator.browserLanguage||window.navigator.systemLanguage||"unknown";function Lh(){return{la:$h}}class Dh{constructor(t){this.Lc=t,this.Xu=[],this.tl=!1}getRequestParameters(){return{dr:this.sl()}}addUrlMaskingPattern(t){const s=this.Lc.getUrlMaskingPattern(t);csArray.prototype.push.call(this.Xu,s)}enableRemoveQueryString(){this.tl=!0}disableRemoveQueryString(){this.tl=!1}sl(){const t=this.tl?this.Lc.removeQueryString(this.el()):this.el();return this.Lc.anonymizeUrl(t,this.Xu)}el(){let t="";try{t=window.top.document.referrer}catch(s){if(window.parent)try{t=window.parent.document.referrer}catch{t=""}}return""===t&&(t=document.referrer),"string"!=typeof t&&(t=""),t}}class Mh{constructor(t){this.J=t,this.il=this.nl()&&"currentScript"in document}rl(){const t=window.CSCurrentScript;if(!t)return null;const s=window.performance.getEntriesByName(t.src,"resource")[0];return!s||this.ol(s)?null:Math.round(s.responseEnd-s.fetchStart)}ol(t){const s=t.transferSize;return void 0!==s?0===s||300===s||s<t.encodedBodySize:t.connectStart===t.domainLookupEnd}getRequestParameters(){if(!this.il||1!==this.hl())return{};const t=this.rl();return null===t?{}:{dt:`${Math.min(t,99999)}`}}hl(){var t;return(null===(t=this.J.getSession())||void 0===t?void 0:t.pageNumber)||null}nl(){return"object"==typeof window.performance&&"function"==typeof window.performance.getEntriesByName}}const Uh=["trackPageview"],Fh=["setPath"],qh=["setQuery"],Bh=["referrer:maskUrl"],Hh=["referrer:removeQueryString"],jh=["referrer:keepQueryString"];class zh{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d){this.L=t,this.Nc=s,this.Jh=e,this.mc=i,this.W=n,this.J=r,this.cl=o,this.ds=h,this.Lc=c,this.it=a,this.xc=u,this.Wc=l,this.al=d}init(){var t;const e=new tt(this.L.getTrackerUri(),"pageview");this.ul=new xh(this.Jh,e,this.it,this.Wc);const i=new Dh(this.Lc);this.ul.init();const n=new In(this.mc,this.W,Mi,i,this.it,this.cl,s,this.ds,this.Wc,new Mh(this.J),this.xc);if(this.al){n.addProvider(this.al);const s=null===(t=this.L.heapEnvironment)||void 0===t?void 0:t.env_id;n.addProvider({getRequestParameters(){const t={cw:"1"};return s&&(t.happid=s),t}})}e.setRequestParametersProviders(n),this.Nc.register(Uh,((t,s)=>{yt(t)?this.ll(s)?this.ul.triggerArtificialPageView(t,s):this.ul.triggerArtificialPageView(t):this.ul.triggerArtificialPageView()})),this.Nc.register(Fh,((t,s)=>{yt(t)&&(this.ll(s)?this.it.overridePath(t,s):this.it.overridePath(t))})),this.Nc.register(qh,((t,s)=>{yt(t)&&(this.ll(s)?this.it.overrideQuery(t,s):this.it.overrideQuery(t))})),this.Nc.register(Bh,(t=>i.addUrlMaskingPattern(t))),this.Nc.register(Hh,(()=>i.enableRemoveQueryString())),this.Nc.register(jh,(()=>i.disableRemoveQueryString()))}start(t){this.ul.start(t)}onBeforeSessionRenewal(){this.ul.stop()}ll(t){return Et(t)&&null!==t}}class Gh{constructor(t){this.La=t}on(t,s){return e=>{this.La.hasValidEventTarget(e)&&this.dl(e,t)&&s(e)}}dl(t,s){const e=ve(t);return C.call(e,s)}isMatchesSelectorSupported(){return!!C}}class Zh{constructor(){}onLoad(t){this.es=t}onLoadCallbackExecute(){this.es()}start(){const t=this.onLoadCallbackExecute.bind(this);this.pl(t)}pl(t){function s(){document.removeEventListener("DOMContentLoaded",s),window.removeEventListener("load",s),t()}"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?csSetTimeout(t):(document.addEventListener("DOMContentLoaded",s),window.addEventListener("load",s))}}ws([is("onLoad")],Zh.prototype,"onLoadCallbackExecute",null);class Wh{constructor(t,s,e){this.L=t,this.W=s,this.J=e,this.Du=It.now()}resetStartTime(){this.Du=It.now()}getSessionData(){const{projectId:t}=this.L,s=this.W.getVisitor();null==s&&ss.warn("Visitor is null. This happens when a snippet tries to get Session Data before the tag was initialized.");const{id:e,visitsCount:i}=null!=s?s:{},n=this.J.getSession();null===n&&ss.warn("Session is null. This happens when a snippet tries to get Session Data before the tag was initialized.");const{pageNumber:r}=null!=n?n:{};return{projectId:t,userId:e,sessionNumber:i,pageNumber:r,relativeTimestamp:It.now()-this.Du}}}const Jh=["clearSession"],Qh=["extendSession"],Yh=["getSessionData"],Kh=["session:start:newVisitor"],Xh=["session:clear:visitor"];class tc{constructor(t,s,e,i){this.L=t,this.W=s,this.J=e,this.Nc=i}init(){this.vl=new Wh(this.L,this.W,this.J),this.Nc.register(Jh,(()=>this.J.removeSession())),this.Nc.register(Qh,(()=>this.J.extendSessionPeriodically()),{disableApplyPending:!0}),this.Nc.register(Yh,(()=>this.vl.getSessionData()),{disableApplyPending:!0}),this.Nc.register(Kh,(()=>this.W.renewVisitor())),this.Nc.register(Xh,(()=>{this.W.resetVisitor()}),{disableApplyImmediate:!0})}onBeforeNaturalPageView(){this.W.createOrUpdateVisitor(),this.J.createOrUpdateSession()}onBeforeArtificialPageView(){this.J.abortQuotaServiceRequest(),this.W.createOrUpdateVisitor(),this.J.createOrUpdateSession()}onAfterNaturalPageView(){this.vl.resetStartTime()}onAfterArtificialPageView(){this.vl.resetStartTime()}onOptout(){this.W.removeVisitor(),this.J.removeSession()}onCollectStateChange(t,s){this.J.updateCollectState(t,s)}}class sc{constructor(t,s){this.J=t,this.W=s,this.ml=!1,this.gl=ce((()=>this.J.refreshSession()),3e4)}onSessionExpired(t){this.wl=t}isSessionValid(){return!!this.ml||!!this.J.hasValidSession()&&(!this.J.pollCacheRefreshEvent()||!this.W.isSessionRenewed())}isCurrentPageviewValid(){const t=this.J.hasValidSession();return this.J.pollCacheRefreshEvent(!1)?!this.W.isSessionRenewed():t}refreshSession(){this.isSessionValid()?this.gl():this.yl()&&(this.El=It.now(),this.renewSession())}renewSession(){this.ml=!0,this.wl(),this.ml=!1}yl(){return!At(this.El)||It.now()-this.El>6e4}}var ec,ic;function nc(t){return t.tagDeploymentMode===ec.DualCollectionReview||t.tagDeploymentMode===ec.DualCollection}!function(t){t.ContentSquare="CONTENTSQUARE",t.LoadedByClicktale="LOADED_BY_CLICKTALE",t.LoadClicktalePtc="LOAD_CLICKTALE_PTC",t.DualCollectionReview="DUAL_COLLECTION_REVIEW",t.DualCollection="DUAL_COLLECTION",t.ContentSquareTagClickTaleEndpoints="CONTENTSQUARE_TAG_CLICKTALE_ENDPOINTS"}(ec||(ec={})),function(t){t.isRecording=function(){return window.ClickTaleIsRecording&&window.ClickTaleIsRecording()},t.stopRecording=function(){window.ClickTaleStop&&window.ClickTaleStop()},t.triggerLogicalPageView=function(t){window.ClickTaleLogicalWithUploadPage&&window.ClickTaleLogicalWithUploadPage(t)},t.sendPageEvent=function(t){window.ClickTaleEvent&&window.ClickTaleEvent(t)},t.sendEventTriggerRecording=function(t){window.ClickTaleEventTrigger&&window.ClickTaleEventTrigger(t)}}(ic||(ic={}));const rc="RSA-OAEP",oc="AES-CTR";var hc;!function(t){var s;let e,i=!1,n=null;const r=window.TextEncoder?new window.TextEncoder:null;let o;function h(){var t,s;return null!=(null===(s=null===(t=window.self.crypto)||void 0===t?void 0:t.subtle)||void 0===s?void 0:s.encrypt)&&null!=window.self.CryptoKey}async function c(s){if(!h()||i)return null;await e;let r=gn(s);r.byteLength>190&&(r=r.slice(0,190));try{return wn(await t.crypto.encrypt({name:rc},n,r))}catch{return null}}t.crypto=null===(s=window.crypto)||void 0===s?void 0:s.subtle,t.prop="toEncrypt",t.MAX_DIGEST_INPUT_SIZE=100,t.isKeyImported=function(){return!i},t.getCryptoKey=function(){return n},t.isSupported=h,t.importKey=async function(s){e=t.crypto.importKey("spki",yn(s),{name:rc,hash:"SHA-256"},!1,["encrypt"]).catch((()=>(i=!0,null))),n=await e,e=void 0,n||es.warn(`Fail to import public key '${s}'`)},t.asymmetricEncrypt=c,t.symmetricEncrypt=async function(s,e){if(!h()||i)return null;const n={counter:e.initializationVector,name:oc,length:64},o=r.encode(s);try{return wn(await t.crypto.encrypt(n,e.cryptoKey,o))}catch{return null}},t.encryptSecret=async function(s){const e=await async function(s){var e;if(!h())return null;try{return null!==(e=(await t.crypto.exportKey("jwk",s)).k)&&void 0!==e?e:null}catch{return null}}(s);if(!e)throw new Error("Export secret failed");const i=await c(e);if(!i)throw new Error("Encrypt secret failed");return i},t.generateSymmetricKey=async function(){if(!h()||i)return null;try{return{cryptoKey:await t.crypto.generateKey({name:oc,length:128},!0,["encrypt","decrypt"]),initializationVector:window.crypto.getRandomValues(new Uint8Array(16))}}catch{return null}},t.setDigestSalt=function(t){o=t},t.digest=async function(s){s=csString.prototype.toLocaleLowerCase.call(csString.prototype.trim.call(s)),o&&(s=`${s}:${o}`);const e=r.encode(s);try{return En(await t.crypto.digest("SHA-1",e))}catch{return null}},t.generateKeyPair=function(){return window.crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"])}}(hc||(hc={}));const cc="@user-identifier@";class ac extends Me{constructor(t,s,e,i){super(),this.L=t,this.Al=s,this.wa=e,this._l=i,this.Rl=[],this.gn=[]}onStart(){csArray.prototype.forEach.call(this.Rl,(t=>this.trackPageEvent(t))),this.Rl=[],csArray.prototype.forEach.call(this.gn,(t=>this.trackEventTriggerRecording(t))),this.gn=[]}onStop(){}trackPageEvent(t){this.isStarted?ac.Sl(t)&&(this.Tl(t)?hc.isSupported()&&this.Il(t):this.Pl(t)):csArray.prototype.push.call(this.Rl,t)}Tl(t){return j(t,cc)}async Il(t){if(!this.L.customHashIdEnabled)return;const s=csString.prototype.slice.call(t,17);if(s.length>hc.MAX_DIGEST_INPUT_SIZE)return void ss.warn("UserIdentifier event: invalid user identifier");const e=await hc.digest(s);e?(this.bl={eventName:e,isETR:!1,isCustomHashId:!0},this.Vl()):ss.warn("Page event: unable to compute customHashId"),this.L.encryptionEnabled&&this._l.emitUserIdentifierEvent(s)}Pl(t){this._l.emitPageEvent(t),this.bl={eventName:t,isETR:!1,isCustomHashId:!1},this.Vl(),this.L.tagDeploymentMode===ec.LoadClicktalePtc&&ic.sendPageEvent(t)}trackEventTriggerRecording(t){this.isStarted?ac.Sl(t)&&(this.L.malkaEtrEnabled?this.Cl(t):this.Nl(t)):csArray.prototype.push.call(this.gn,t)}Cl(t){j(t,"@ETP@")?this._l.emitEventTriggerRecording(t,qe.ETR_PAGE):this._l.emitEventTriggerRecording(t,qe.ETR_SESSION),this.bl={eventName:t,isETR:!0,isCustomHashId:!1},this.Vl()}Nl(t){var s;(nc(s=this.L)||s.tagDeploymentMode===ec.LoadClicktalePtc)&&(this._l.emitEventTriggerRecording(t,qe.ETR_LEGACY),this.bl={eventName:t,isETR:!0,isCustomHashId:!1},this.Vl(),this.L.tagDeploymentMode===ec.LoadClicktalePtc&&ic.sendEventTriggerRecording(t))}getRequestParameters(){return{value:this.wa.compressSync(this.bl.eventName,"base64"),ct:this.wa.algorithm,isETR:`${this.bl.isETR}`,isCustomHashId:`${this.bl.isCustomHashId}`}}Vl(){this.Al.send()}static Sl(t){return yt(t)&&!!csString.prototype.trim.call(t)}}const uc=["trackPageEvent"],lc=["trackEventTriggerRecording"];class dc{constructor(t,s,e,i,n){this.L=t,this.Nc=s,this.wa=e,this.mc=i,this._l=n}init(){const t=new tt(this.L.getTrackerUri(),"pageEvent");this.Ol=new ac(this.L,t,this.wa,this._l),t.setRequestParametersProviders(this.Ol,this.mc),this.Nc.register(uc,(t=>{this.Ol.trackPageEvent(t)})),this.Nc.register(lc,(t=>{this.Ol.trackEventTriggerRecording(t)}))}onStartTracking(){this.Ol.start()}}class fc{constructor(){this.subscriptions={}}subscribe(t,s){this.subscriptions[t]=s,1===Object.keys(this.subscriptions).length&&this.onStartTracking()}unsubscribe(t){delete this.subscriptions[t],0===Object.keys(this.subscriptions).length&&this.onStopTracking()}}class pc extends fc{constructor(){super(),this.Ne=new ur((t=>this.errorListener(t)))}onStartTracking(){this.Ne.observe()}onStopTracking(){this.Ne.disconnect()}errorListener(t){const s=this.kl(t);for(const t in this.subscriptions){(0,this.subscriptions[t])(s)}}xl(t){return t=null!=t?t:"[NO ERROR MESSAGE]",vn.truncate(t,pc.Fh,vn.ELLIPSIS)}kl(t){return{errorType:"jsError",message:this.xl(t.message),filename:t.filename,lineno:t.lineno,colno:t.colno}}}pc.Fh=1024,ws([is("Event handler type: error")],pc.prototype,"errorListener",null);const vc=["[data-cs-mask]","#c1_card_info_id"];class mc{constructor(t){this.L=t,this.$l=[...vc],this.Ll=[{selector:"input:not([type=button]):not([type=submit])",attrName:"value"}],this.Dl={PIISelectors:[".ctHidden,textarea",...vc],Attributes:[{selector:".ctHidden,input:not([type=button]):not([type=submit])",attrName:"value"}]},this.Ml={elementSelector:"",attrSelector:"",attrSelectors:[]};const s={PIISelectors:[],Attributes:[]};nc(this.L)||(csArray.prototype.push.call(s.PIISelectors,...this.$l),csArray.prototype.push.call(s.Attributes,...this.Ll)),this.Ml=Ne.getComputedSelectorSettings(s,this.Ml)}setSensitiveSettingsFromCommand(t){t=Ne.sanitizeSelectorUserInput(t),Ne.isSelectorUserInput(t)&&this.Ul(t)}setSensitiveSettingsFromParent(t){const s={PIISelectors:csString.prototype.split.call(t.elementSelector,","),Attributes:t.attrSelectors};this.Ul(s)}getSensitiveSettings(){return this.Ml}initCTPII(){var t,s,e,i,n,r;const o=this.Dl;(null===(e=null===(s=null===(t=null===window||void 0===window?void 0:window.ClickTaleSettings)||void 0===t?void 0:t.DOM)||void 0===s?void 0:s.PII)||void 0===e?void 0:e.Text)instanceof Array&&o.PIISelectors.push(...window.ClickTaleSettings.DOM.PII.Text),(null===(r=null===(n=null===(i=null===window||void 0===window?void 0:window.ClickTaleSettings)||void 0===i?void 0:i.DOM)||void 0===n?void 0:n.PII)||void 0===r?void 0:r.Attributes)instanceof Array&&window.ClickTaleSettings.DOM.PII.Attributes.forEach((t=>{yt(t.attr)&&yt(t.rule)&&o.Attributes.push({selector:t.rule,attrName:t.attr})})),this.Ul(o)}Ul(t){this.Ml=Ne.getComputedSelectorSettings(t,this.Ml)}}class gc{constructor(t){this.Nc=t}init(){this.Fl(gc.ql,xt),this.Fl(gc.Bl,kt)}Fl(t,s){this.Nc.register([t],((t,e)=>{yt(t)&&(yt(e)||Tt(e))&&ss.error(e,`${s}${t}`)}))}}gc.Bl="logSnippetError",gc.ql="logImplementationSnippetError";class wc{constructor(t,s,e,i){this.L=t,this.ra=s,this.Cc=e,this.ca=i}init(){this.ra.onChildMessage(((t,s,e)=>this.ca.emitIframeEvent(t,s,e))),this.ra.setRecordingStatusCallback((()=>this.Cc.getRecordingStatus()))}onStartTracking(){this.L.iframesTracking&&this.ra.start()}onOptout(){this.L.iframesTracking&&this.ra.stop()}onRecordingStatusChange(){this.L.iframesTracking&&this.ra.onRecordingStatusChange(this.Cc.getRecordingStatus())}}class yc extends Me{constructor(t){super(),this.L=t,this.Hl=0,this.jl=new Map,this.zl={boundElement:window,type:"message",listener:t=>this.Gl(t)}}onChildMessage(t){this.Zl=t}setRecordingStatusCallback(t){this.Wl=t}onRecordingStatusChange(t){const s=Yt.buildBaseMessage(Qt.RecordingStatus,Jt.Parent,this.L.projectId);s.content=t,this.jl.forEach((t=>{!this.Jl(t)&&t.port&&Yt.sendChannelMessage(t.port,s)}))}sendToChildren(t,s){const e=Yt.buildBaseMessage(t,Jt.Parent,this.L.projectId);e.content=s,this.Ql(e)}onStart(){re(this.zl,!1),this.Yl()}onStop(){this.Kl(),oe(this.zl,!1),this.Xl()}Yl(){const t=this.td();this.sd(t),csArray.prototype.forEach.call(t,(t=>{if(null===this.nd(t)){const s={iframe:t};this.jl.set(this.Hl,s),this.Hl+=1}})),this.rd()}td(){return csArray.prototype.filter.call(qi.findAllElements("iframe"),(t=>this.od(t)))}sd(t){this.jl.forEach(((s,e)=>{s.iframe&&-1===csArray.prototype.indexOf.call(t,s.iframe)&&this.ad(e,s)}))}ad(t,s){s.port&&Yt.closeChannelPort(s.port),this.jl.delete(t)}Xl(){this.jl.forEach((t=>{t.port&&Yt.closeChannelPort(t.port)})),this.jl.clear()}nd(t){let s=null;return this.jl.forEach(((e,i)=>{null===s&&e.iframe===t&&(s=i)})),s}od(t){return t.id!==i&&(!t.src||jt(Ht(t.src),this.L.hostnames))}Ql(t){this.jl.forEach((s=>{s.port&&Yt.sendChannelMessage(s.port,t)}))}rd(){this.jl.forEach(((t,s)=>{if(t.iframe.contentWindow){const e=this.ud(s);Yt.sendPostMessage(t.iframe.contentWindow,"*",e)}}))}Kl(){const t=this.ld();this.jl.forEach((s=>{s.port?Yt.sendChannelMessage(s.port,t):s.iframe.contentWindow&&Yt.sendPostMessage(s.iframe.contentWindow,"*",t)}))}ud(t){return Yt.buildBaseMessage(Qt.Discovery,Jt.Parent,this.L.projectId,t)}ld(){return Yt.buildBaseMessage(Qt.Stop,Jt.Parent,this.L.projectId)}dd(t,s){const e=this.jl.get(t);void 0!==e?(e.port=s,e.port.onmessage=t=>{this.pd(t,e)}):ss.error(`Parent received channel messaging initialization from unknow child id : ${t} (${this.Hl})`)}vd(t){if(!t.port)return;const s=Yt.buildBaseMessage(Qt.RecordingStatus,Jt.Parent,this.L.projectId),e=this.Wl();this.Jl(t)&&(e.isRecording=!1,e.isMutationTrackerStarted=!1),s.content=e,Yt.sendChannelMessage(t.port,s)}pd(t,s){if(void 0===s)return void ss.error(`Parent received channelMessage from unknown child : ${csJSON.stringify(t.data)}`);const e=t.data.type,i=t.data.content;e===Qt.EndOfBufferedMessages?this.vd(s):this.Zl(s.iframe,e,i)}Gl(t){if(Yt.isMessageValid(t,Jt.Child,this.L.projectId,this.L.hostnames))switch(t.data.type){case Qt.Discovery:if(void 0===t.data.id)return void this.Yl();if(t.ports&&1===t.ports.length&&this.jl.has(t.data.id))return void this.dd(t.data.id,t.ports[0]);ss.error(`Parent received wrong channelMessage initialization : (${t.origin}) : ${csJSON.stringify(t.data)}`);break;case Qt.ChildLogMessage:this.Zl(null,Qt.ChildLogMessage,t.data.content);break;default:ss.warn(`Parent received unexpected postMessage type from child (${t.origin}) : ${csJSON.stringify(t.data)}`)}}Jl(t){return Ne.isSensitive(t.iframe)||Ne.isSensitiveChild(t.iframe)}}class Ec{constructor(t){this.md=t}buildApiErrors(t,s){const e=this.md.collectDataPoints(t,s);if(null===e)return null;const i=this.gd(t,e);if(s){return{apiError:i,detailedApiError:this.wd(t,e)}}return{apiError:i}}wd(t,s){const e=this.yd(t);return s.collectQueryParam&&t.queryParameters&&(e.queryParameters=t.queryParameters),s.collectRequestBody&&t.requestBody&&(e.requestBody=t.requestBody),s.collectResponseBody&&t.requestBody&&(e.responseBody=t.responseBody),Object.keys(s.standardRequestHeaders).length>0&&(e.standardRequestHeaders=s.standardRequestHeaders),Object.keys(s.standardResponseHeaders).length>0&&(e.standardResponseHeaders=s.standardResponseHeaders),Object.keys(s.customRequestHeaders).length>0&&(e.customRequestHeaders=csJSON.stringify(s.customRequestHeaders)),Object.keys(s.customResponseHeaders).length>0&&(e.customResponseHeaders=csJSON.stringify(s.customResponseHeaders)),Object.keys(s.plainCustomRequestHeaders).length>0&&(e.plainCustomRequestHeaders=s.plainCustomRequestHeaders),Object.keys(s.plainCustomResponseHeaders).length>0&&(e.plainCustomResponseHeaders=s.plainCustomResponseHeaders),s.plainResponseBodyAttributes&&Object.keys(s.plainResponseBodyAttributes).length>0&&(e.plainResponseBodyAttributes=s.plainResponseBodyAttributes),s.plainRequestBodyAttributes&&Object.keys(s.plainRequestBodyAttributes).length>0&&(e.plainRequestBodyAttributes=s.plainRequestBodyAttributes),Object.keys(s.responseBodyAttributes).length>0&&(e.responseBodyAttributes=csJSON.stringify(s.responseBodyAttributes)),Object.keys(s.requestBodyAttributes).length>0&&(e.requestBodyAttributes=csJSON.stringify(s.requestBodyAttributes)),e}yd(t){return{errorType:"apiError",url:t.url,method:t.method,requestTime:t.requestTime,responseTime:t.responseTime,statusCode:t.statusCode,library:t.library}}gd(t,s){const e=this.yd(t);return s.matchingBodyContents.length>0&&(e.matchingBodyContents=s.matchingBodyContents),Object.keys(s.plainResponseBodyAttributes).length>0&&(e.plainBodyResponseAttributes=s.plainResponseBodyAttributes),e}}class Ac extends fc{constructor(t,s,e){super(),this.Ed=t,this.Ad=s,this._d=e,this.Rd=0,this.Sd=new Ec(e)}subscribe(t,s,e){(null==e?void 0:e.detailedEvent)&&(Object.defineProperty(s,"detailedEvent",{value:e.detailedEvent}),this.Rd++),super.subscribe(t,s)}unsubscribe(t){var s;(null===(s=this.subscriptions[t])||void 0===s?void 0:s.hasOwnProperty("detailedEvent"))&&this.Rd--,super.unsubscribe(t)}init(){const t=this._d.computeApiErrorCollectionOptions();this.Ed.setCollectionOptions(t),this.Ed.onEvent((t=>this.Td(t))),this.Ad.setCollectionOptions(t),this.Ad.onEvent((t=>this.Td(t)))}onStartTracking(){this.Ed.start(),this.Ad.start()}onStopTracking(){this.Ed.stop(),this.Ad.stop()}Td(t){const s=this.Sd.buildApiErrors(t,0!==this.Rd);if(s)for(const t in this.subscriptions){const e=this.subscriptions[t];e.hasOwnProperty("detailedEvent")?s.detailedApiError&&e(s.detailedApiError):e(s.apiError)}}}class _c{constructor(t){this.Lc=t,this.Xu=[]}addUrlMaskingPattern(t){const s=this.Lc.getUrlMaskingPattern(t);csArray.prototype.push.call(this.Xu,s)}getUrlMaskingPatterns(){return this.Xu}anonymize(t){const s=this.Lc.removeQueryString(t.url);return{...t,url:this.Lc.anonymizeUrl(s,this.Xu),library:t.library?this.Lc.anonymizeUrl(t.library,this.Xu):void 0}}}class Rc{constructor(t,s){this.D=t,this.it=s}anonymize(t){return yt(t.message)&&(t.message=this.Id(t.message),t.message=this.D.anonymizePII(t.message)),yt(t.filename)&&(t.filename=this.it.computeOverriddenUrl(t.filename)),t}Id(t){return csString.prototype.replace.call(t,/(value\s*=\s*".*"|value\s*=\s*'.*')/,"value='CS_ANONYMIZED_VALUE'")}}class Sc extends fc{constructor(t){super(),this.Pd=t,this.jn=[{boundElement:document,type:"touchstart",listener:t=>this.yn(t)},{boundElement:document,type:"touchmove",listener:t=>this.yn(t)},{boundElement:document,type:"touchend",listener:t=>this.yn(t)}],this.bd=new ir,this.bd.onGesture(((t,s)=>this._h(t,s)))}_h(t,s){for(const e in this.subscriptions){(0,this.subscriptions[e])(t,s)}}onStartTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.jn,(t=>re(t)))}onStopTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.jn,(t=>oe(t)))}canDetectGesture(){return void 0!==window.devicePixelRatio}yn(t){this.Pd.tryToExecute("process gesture event",(()=>{if(this.bd.isValidTouchEvent(t))switch(t.type){case"touchstart":this.bd.processActionDown(t);break;case"touchmove":this.bd.processActionMove();break;case"touchend":this.bd.processActionUp(t)}}))()}static isSwipe(t){return t.type===Qn.FLICK||t.type===Qn.DRAG}}class Tc extends Me{constructor(t,s){super(),this.Fi=t,this.Vd=s,this.Cd=0}onStart(){ss.isPerfLoggingActive()&&(this.Nd=window.setInterval((()=>this.Od()),Tc.kd))}onStop(){ss.isPerfLoggingActive()&&(this.Od(),clearInterval(this.Nd))}Od(){if(ls.isEmpty||this.Cd>=Tc.xd)return;this.Cd++;const t={a:Tc.$d,l:Tc.Ld,...this.Vd.getRequestParameters()},s=[];ls.forEach((e=>{csArray.prototype.forEach.call(e,(e=>{csArray.prototype.push.call(s,{...e,...t})}))})),this.Fi.send(s),ls.clear()}}Tc.$d="uxa",Tc.Ld="perf",Tc.kd=5e3,Tc.xd=5;class Ic{constructor(t,s,e){this.L=t,this.Vd=s,this.$c=e}init(){this.Dd=new Tc(this.$c.create(this.L.getLoggerUri(),!0),this.Vd)}onStartTracking(){this.Dd.start()}onOptout(){this.Dd.stop()}}class Pc{constructor(){this.Md=!1}enableRecordingStatus(t,s,e,i,n){this.Md=!0,this.va=t,this.Bi=s,this.Dc=e,this.J=i,this.Ui=n}getRecordingStatus(){var t,s,e,i;return this.Md?{isRecording:this.va.isRecording(),isMutationTrackerStarted:this.va.isStarted,sensitiveSettings:this.Bi.getSensitiveSettings(),capturedElementSelector:Ei.getWhitelistedElementsSelector(),useAnonymization:this.Dc.shouldUseAnonymization(),encryptionSelectors:null===(t=this.Ui)||void 0===t?void 0:t.getEncryptionSelectors(),activateOnlineAssetsOnNextStart:null===(s=this.va.getStaticResourceManagerStatus())||void 0===s?void 0:s.onlineAssets.enabledForChildrenOnNextStart,recordingStartTimestamp:parseInt(this.va.getRecordingStartTimestamp(),10),etrState:null!==(i=null===(e=this.J.getSession())||void 0===e?void 0:e.etrState)&&void 0!==i?i:Fe.ETR_OFF}:{isRecording:!1,recordingStartTimestamp:0,etrState:Fe.ETR_OFF}}}class bc{static isRecordingSupported(){return"MutationObserver"in window&&"visibilityState"in document}static isAsyncSerializationSupported(){return"Promise"in window&&"findIndex"in csArray.prototype}}class Vc extends Me{constructor(t,s,e,i){super(),this.Di=t,this.Ud=s,this.lc=e,this.Mi=i,this.Fd=[],this.Ki=0}init(){this.Di.init()}initStates(){this.qd(),this.Fd=[],this.Ki=0,this.ku()}ku(){this.Du=It.now()}Lu(){return It.now()-this.Du}onStart(){this.Di.subscribe(Vc.bn,(t=>this.yn(t)))}onStop(){this.Di.unsubscribe(Vc.bn)}onIframeApiError(t){this.yn(t)}yn(t){this.isStarted&&this.Ki<Vc.Pc&&(t.relativeTime=this.Lu(),csArray.prototype.push.call(this.Fd,this.Mi.anonymize(t)),this.Bd())}qd(){this.Ud.removeQueryParams(),this.Ud.setQueryParams(this.lc.getRequestParameters())}Bd(){this.Ud.send({errors:this.Fd}),this.Fd=[],this.Ki+=1}}Vc.bn="ApiErrorsService",Vc.Pc=20;const Cc=["api-errors:maskUrl"];class Nc{constructor(t,s,e,i,n,r,o){this.Di=t,this.Mi=s,this.L=e,this.lc=i,this.ca=n,this.Nc=r,this.$c=o}init(){const t=this.$c.create(`${this.L.getTrackerUri()}/api-errors`,!0);this.Hd=new Vc(this.Di,t,this.lc,this.Mi),this.Hd.init(),this.ca.addListener(this.Hd),this.jd()}jd(){this.Nc.register(Cc,(t=>this.Mi.addUrlMaskingPattern(t)))}onStartTracking(){this.Hd.start()}onAfterNaturalPageView(){this.Hd.initStates()}onAfterArtificialPageView(){this.Hd.initStates()}onBeforeSessionRenewal(){this.Hd.stop()}onOptout(){this.Hd.stop()}}class Oc extends Me{constructor(t,s,e,i,n,r){super(),this.zd=t,this.Gd=s,this.lc=e,this.Li=i,this.Oc=n,this.it=r,this.Zd=[],this.bc=0,this.Wd=[]}initStates(){this.Du=It.now(),this.Gd.removeQueryParams(),this.Gd.setQueryParams(this.lc.getRequestParameters()),this.Zd=[],this.bc=0}onStart(){this.zd.subscribe(Oc.bn,(t=>this.yn(t))),this.Jd()}onStop(){this.zd.unsubscribe(Oc.bn)}onIframeJavascriptError(t){this.yn(t)}trackCustomError(t){const s={errorType:"jsError",message:`Custom Error: ${t}`,lineno:1,colno:1,filename:"https://cserror.com/texterror.js"};this.Qd(s)}Qd(t){if(this.isStarted){const s=this.yn(t);s&&this.Oc.emitCustomJavaScriptErrorEvent(s)}else csArray.prototype.push.call(this.Wd,t)}Jd(){this.isStarted&&(csArray.prototype.forEach.call(this.Wd,(t=>this.Qd(t))),this.Wd=[])}yn(t){if(this.isStarted&&this.bc<20){const s={...t,pageUrl:this.it.getAnonymizedUrl(),rt:this.Lu()};return this.Li.anonymize(s),csArray.prototype.push.call(this.Zd,s),this.Bd(),s}return null}Lu(){return It.now()-this.Du}Bd(){this.Gd.send({errors:this.Zd}),this.Zd=[],this.bc+=1}}Oc.bn="JavaScriptErrorsService";const kc=["trackError"];class xc{constructor(t,s,e,i,n,r,o,h,c){this.zd=t,this.Li=s,this.L=e,this.lc=i,this.ca=n,this.Nc=r,this.Oc=o,this.it=h,this.$c=c}init(){const t=this.$c.create(`${this.L.getTrackerUri()}/errors`,!0);this.Yd=new Oc(this.zd,t,this.lc,this.Li,this.Oc,this.it),this.ca.addListener(this.Yd),this.jd()}jd(){this.L.jsCustomErrorsEnabled&&!this.L.customErrors.enabled&&this.Nc.register(kc,(t=>{this.Yd.trackCustomError(t)}))}onStartTracking(){this.Yd.start()}onAfterNaturalPageView(){this.Yd.initStates()}onAfterArtificialPageView(){this.Yd.initStates()}onBeforeSessionRenewal(){this.Yd.stop()}onOptout(){this.Yd.stop()}}var $c;!function(t){t.buildCustomErrorEvent=function(t,s,e=!1){const i={message:vn.truncate(t,300,vn.ELLIPSIS),errorType:"customError"};return(e||function(t){const s=Object.keys(t).length;return s>0&&s<=5}(s))&&(!function(t){for(const s in t){let e=t[s];if(t[s].length>30&&(e=vn.truncate(t[s],30,vn.ELLIPSIS),t[s]=e),s.length>30){const i=vn.truncate(s,30,vn.ELLIPSIS);delete t[s],t[i]=e}}}(s),i.attributes=s),i}}($c||($c={}));class Lc extends Me{constructor(t,s,e,i,n){super(),this.Kd=t,this.lc=s,this.Xd=e,this._l=i,this.tf=n,this.sf=[],this.Vc=0,this.Wd=[]}initStates(){var t;this.qd(),this.Du=It.now(),this.sf=[],this.Vc=0,null===(t=this.tf)||void 0===t||t.onEvent((t=>this.yn(t)))}trackCustomError(t,s={}){if(!yt(t)||!Et(s))return;const e=$c.buildCustomErrorEvent(t,s);this.Qd(e)}onIframeCustomError(t){this.yn(t)}onStart(){var t;this.Jd(),null===(t=this.tf)||void 0===t||t.start()}onStop(){var t;null===(t=this.tf)||void 0===t||t.stop()}Jd(){this.isStarted&&(csArray.prototype.forEach.call(this.Wd,(t=>this.Qd(t))),this.Wd=[])}Qd(t){if(this.isStarted){const s=this.yn(t);s&&this._l.emitCustomErrorEvent(s)}else csArray.prototype.push.call(this.Wd,t)}yn(t){if(this.isStarted&&this.Vc<20){const s=this.ef(t);return csArray.prototype.push.call(this.sf,s),this.Bd(),s}return null}ef(t){const s={...t,rt:this.Lu()};return s.message=this.Xd.anonymizePII(t.message),s}qd(){this.Kd.removeQueryParams(),this.Kd.setQueryParams(this.lc.getRequestParameters())}Lu(){return It.now()-this.Du}Bd(){this.Kd.send({errors:this.sf}),this.sf=[],this.Vc+=1}}class Dc{constructor(t,s,e,i,n,r,o,h){this.Xd=t,this.L=s,this.lc=e,this.Nc=i,this.Oc=n,this.$c=r,this.ca=o,this.tf=h}init(){const t=this.$c.create(`${this.L.getTrackerUri()}/custom-errors`,!0);this.if=new Lc(t,this.lc,this.Xd,this.Oc,this.tf),this.ca.addListener(this.if),this.jd()}jd(){this.Nc.register(kc,((t,s)=>{this.if.trackCustomError(t,s)}))}onStartTracking(){this.if.start()}onAfterNaturalPageView(){this.if.initStates()}onAfterArtificialPageView(){this.if.initStates()}onBeforeSessionRenewal(){this.if.stop()}onOptout(){this.if.stop()}}class Mc{constructor(){this.nf=kh.Natural}setPageViewType(t){this.nf=t}getPageViewType(){return this.nf}getRequestParameters(){return{pvt:this.nf}}}class Uc{constructor(t){this.$i=t}onAfterVisitorRenewal(){this.$i.renewSession()}}var Fc,qc;!function(t){t.replayRecordingUnmaskedUrlRegex="replayRecordingUnmaskedUrlRegex",t.replayRecordingMaskedUrlRegex="replayRecordingMaskedUrlRegex",t.replayRecordingUnmaskedUrlRegexRules="replayRecordingUnmaskedUrlRegexRules",t.replayRecordingMaskedUrlRegexRules="replayRecordingMaskedUrlRegexRules"}(Fc||(Fc={})),function(t){t.START="start",t.NOT_START="not-start",t.END="end",t.NOT_END="not-end",t.CONTAIN="contain",t.NOT_CONTAIN="not-contain",t.EXACT="exact",t.NOT_EXACT="not-exact"}(qc||(qc={}));class Bc{constructor(t,s,e,i){this.cl=t,this.L=s,this.it=e,this.rf=i}init(){this.hf()}shouldUseAnonymization(){if(this.cl.isReplayUnanonymizedAllowedByConsent()){switch(this.L.anonymisationMethod){case null:case Fc.replayRecordingMaskedUrlRegex:return!(!this.L.replayRecordingMaskedUrlRegex||!this.L.replayRecordingMaskedUrlRegex.test(this.it.getAnonymizedUrl()));case Fc.replayRecordingMaskedUrlRegexRules:return this.rf.evaluateUrl(this.it.getAnonymizedUrl())}return!1}switch(this.L.anonymisationMethod){case null:case Fc.replayRecordingUnmaskedUrlRegex:return!(this.L.replayRecordingUnmaskedUrlRegex&&this.L.replayRecordingUnmaskedUrlRegex.test(this.it.getAnonymizedUrl()));case Fc.replayRecordingUnmaskedUrlRegexRules:return!this.rf.evaluateUrl(this.it.getAnonymizedUrl())}return!0}hf(){this.L.anonymisationMethod===Fc.replayRecordingMaskedUrlRegexRules&&this.L.replayRecordingMaskedUrlRegexRules?this.rf.setRegexRules(this.L.replayRecordingMaskedUrlRegexRules):this.L.anonymisationMethod===Fc.replayRecordingUnmaskedUrlRegexRules&&this.L.replayRecordingUnmaskedUrlRegexRules&&this.rf.setRegexRules(this.L.replayRecordingUnmaskedUrlRegexRules)}}class Hc{constructor(){this.cf=[]}setRegexRules(t){this.cf=csArray.prototype.map.call(t,(t=>this.af(t)))}evaluateUrl(t){return csArray.prototype.some.call(this.cf,(s=>{var e,i;const n=this.uf(t,s);return(null==s?void 0:s.notOperator)?!(null===(e=s.regex)||void 0===e?void 0:e.test(n)):null===(i=s.regex)||void 0===i?void 0:i.test(n)}))}uf(t,s){const e=Gt(t);return e?s.ignoreQueryParams&&s.ignoreURIFragments?`${e.origin}${e.pathname}`:s.ignoreQueryParams?`${e.origin}${e.pathname}${e.hash}`:s.ignoreURIFragments?`${e.origin}${e.pathname}${e.search}`:t:t}lf(t){return t.ignoreCaseSensitivity?"i":""}af(t){switch(t.operator){case qc.NOT_START:t.notOperator=!0;case qc.START:t.regex=new RegExp(`^${t.value}`,this.lf(t));break;case qc.NOT_END:t.notOperator=!0;case qc.END:t.regex=new RegExp(`${t.value}$`,this.lf(t));break;case qc.NOT_CONTAIN:t.notOperator=!0;case qc.CONTAIN:t.regex=new RegExp(`${t.value}`,this.lf(t));break;case qc.NOT_EXACT:t.notOperator=!0;case qc.EXACT:t.regex=new RegExp(`^${t.value}$`,this.lf(t));break;default:ss.warn(`buildRegexWithRule, unknown type: ${t.operator}`)}return t}}class jc{constructor(){this.df=["application/json","application/graphql","application/xml","text/plain","text/csv","text/html","text/xml","text/javascript"]}setCollectionOptions(t){this.ff=t}isValidBodyType(t){const s=t["content-type"];if(!s)return!1;const e=csString.prototype.toLocaleLowerCase.call(s);return Ls(this.df,(t=>j(e,t)))}canCollect(t,s){return this.pf(t,s)&&this.vf(s)}pf(t,s){return t>=400||t>=200&&t<300&&this.ff.statusCodes.has(t)&&this.mf(s)}mf(t){return Ls(this.ff.urls,(s=>-1!==csString.prototype.indexOf.call(t,s)))}vf(t){return function(t,s){const e=t.length;for(let i=0;i<e;i++)if(!s(t[i],i))return!1;return!0}(this.ff.excludedDomains,(s=>-1===csString.prototype.indexOf.call(t,s)))}}class zc extends jc{constructor(){super(),this.gf=csSymbol("ApiCall"),this.Xs=!1,this.wf=null,this.yf=null,this.Ef=null,this.Af=({context:t,args:s,callerName:e})=>this.interceptOpen(t,s,e),this._f=({context:t,args:s})=>this.interceptSetRequestHeader(t,s),this.Rf=({context:t,args:s})=>this.interceptSend(t,s)}onEvent(t){this.zn=t}start(){this.Xs||(this.Sf(),this.wf&&this.wf.activate(),this.yf&&this.yf.activate(),this.Ef&&this.Ef.activate(),this.Xs=!0)}stop(){this.Xs&&(this.wf&&this.wf.deactivate(),this.yf&&this.yf.deactivate(),this.Xs=!1)}Sf(){this.wf||(this.wf=te({target:XMLHttpRequest.prototype,methodName:"open",hook:this.Af,options:{withCallerName:!0}})),this.yf||(this.yf=te({target:XMLHttpRequest.prototype,methodName:"setRequestHeader",hook:this._f})),this.Ef||(this.Ef=te({target:XMLHttpRequest.prototype,methodName:"send",hook:this.Rf}))}interceptOpen(t,s,e){if(!s[1]||!yt(s[1]))return;const[i,n]=csString.prototype.split.call(s[1],"?");t[this.gf]={library:e,requestTime:It.now(),method:s[0],url:Bt(i),queryParameters:n,statusCode:0,responseHeaders:{},requestHeaders:{},responseBody:"",requestBody:""},t.addEventListener("readystatechange",(()=>this.readyStateChangeListener(t)))}readyStateChangeListener(t){t[this.gf]&&t.readyState===XMLHttpRequest.DONE&&this.canCollect(t.status,t[this.gf].url)&&(t[this.gf].responseTime=It.now(),t[this.gf].statusCode=t.status,t[this.gf].responseHeaders=this.Tf(t.getAllResponseHeaders()),!super.isValidBodyType(t[this.gf].responseHeaders)||""!==t.responseType&&"text"!==t.responseType||(t[this.gf].responseBody=t.responseText),this.zn(t[this.gf]))}interceptSetRequestHeader(t,s){if(!t[this.gf])return;let e=s[0],i=csString.prototype.valueOf.call(new csString(s[1]));"string"==typeof e&&0!==i.length&&(e=csString.prototype.toLowerCase.call(csString.prototype.trim.call(e)),i=csString.prototype.trim.call(i),t[this.gf].requestHeaders[e]?t[this.gf].requestHeaders[e]+=`, ${i}`:t[this.gf].requestHeaders[e]=i)}interceptSend(t,s){t[this.gf]&&super.isValidBodyType(t[this.gf].requestHeaders)&&"string"==typeof s[0]&&(t[this.gf].requestBody=s[0])}Tf(t){const s={};return csArray.prototype.forEach.call(csString.prototype.split.call(t,/[\r\n]+/),(t=>{const[e,i]=csString.prototype.split.call(t,/:\s*/);i&&(s[csString.prototype.toLowerCase.call(e)]=csString.prototype.trim.call(i))})),s}}ws([is("XhrRequestTracker.interceptOpen")],zc.prototype,"interceptOpen",null),ws([is("XhrRequestTracker.readyStateChangeListener")],zc.prototype,"readyStateChangeListener",null),ws([is("XhrRequestTracker.interceptSetRequestHeader")],zc.prototype,"interceptSetRequestHeader",null),ws([is("XhrRequestTracker.interceptSend")],zc.prototype,"interceptSend",null);class Gc extends jc{constructor(){super(),this.Xs=!1,this.If=null,this.Pf=({result:t,args:s,callerName:e})=>{this.interceptFetch(t,s,e)}}onEvent(t){this.zn=t}start(){this.Xs||this.bf()&&(this.Vf(),this.If&&this.If.activate(),this.Xs=!0)}stop(){this.Xs&&(this.If&&this.If.deactivate(),this.Xs=!1)}bf(){return!!window.fetch&&"function"==typeof window.fetch}Cf(t){if(t[0]&&"function"==typeof t[0].clone){const s=Ns(t);return s[0]=t[0].clone(),s}return t}Vf(){this.If||(this.If=te({target:window,methodName:"fetch",hook:this.Pf,hookPrepareArgs:this.Cf,options:{withCallerName:!0}}))}async interceptFetch(t,s,e){const i=s[0],n=s[1],r=new Request(i,n);if(!yt(r.url))return;const o=It.now();let h;try{h=await t}catch(t){if(this.Nf(t)||this.Of(t)||this.kf(t))return;throw t}const[c,a]=csString.prototype.split.call(r.url,"?"),u=Bt(c);if(super.canCollect(h.status,u)){const t={library:e,method:r.method,url:u,queryParameters:a,requestTime:o,responseTime:It.now(),statusCode:h.status,requestBody:"",responseBody:"",requestHeaders:this.xf(r.headers),responseHeaders:this.xf(h.headers)};!h.bodyUsed&&super.isValidBodyType(t.responseHeaders)&&(t.responseBody=await h.clone().text()),super.isValidBodyType(t.requestHeaders)&&(t.requestBody=await r.text()),this.zn(t)}}Nf(t){return t instanceof TypeError}Of(t){return t instanceof DOMException&&"AbortError"===t.name}kf(t){return t instanceof DOMException&&csArray.prototype.some.call(Gc.$f,(s=>s===t.name))}xf(t){const s={};return t.forEach(((t,e)=>{t&&(s[csString.prototype.toLowerCase.call(e)]=csString.prototype.trim.call(t))})),s}}Gc.$f=["NoModificationAllowedError","InvalidStateError","OperationError"],ws([is("FetchRequestTracker.interceptFetch")],Gc.prototype,"interceptFetch",null);class Zc{constructor(){this.Lf=64e3,this.Df=5e3,this.Mf=2e3,this.Uf=8e3,this.Ao=!!self.TextEncoder,this.Ao&&(this.Ff=new TextEncoder)}qf(t){return this.Ff.encode(t).byteLength}Bf(t,s,e){let i=0;t[s]&&(i+=this.qf(t[s]),i>this.Uf&&(i=0,t[s]=vn.ELLIPSIS)),t[e]&&(i+=this.qf(csJSON.stringify(t[e])),i>this.Uf&&(t[e]=Zc.truncatedObjectMarker))}Hf(t){t.queryParameters&&this.qf(t.queryParameters)>this.Mf&&(t.queryParameters=vn.ELLIPSIS)}jf(t){t.requestBody&&this.qf(t.requestBody)>this.Lf&&(t.requestBody=vn.ELLIPSIS),t.responseBody&&this.qf(t.responseBody)>this.Df&&(t.responseBody=vn.ELLIPSIS)}truncate(t){this.Ao?(this.Hf(t),this.jf(t),this.Bf(t,"customResponseHeaders","plainCustomResponseHeaders"),this.Bf(t,"customRequestHeaders","plainCustomRequestHeaders")):(t.queryParameters="",t.requestBody="",t.responseBody="",t.customResponseHeaders="",t.customRequestHeaders="",t.plainCustomResponseHeaders={},t.plainCustomRequestHeaders={})}}var Wc,Jc;Zc.truncatedObjectMarker={[vn.ELLIPSIS]:vn.ELLIPSIS},function(t){t.isValidJSONPath=function(t){if(!t)return!0;if(!function(t){const s=[];for(let e=0;e<t.length;++e)if("["===t[e])csArray.prototype.push.call(s,t[e]);else if("]"===t[e]){if(!(csString.prototype.indexOf.call(t,"[")>-1))return!1;csArray.prototype.pop.call(s)}return 0===s.length}(t))return!1;const s=csString.prototype.split.call(t,/[\[\]]/);return csArray.prototype.every.call(s,(t=>{const s=t[0],e=t[t.length-1];if(("'"===s||'"'===s)&&s!==e)return!1;const i=csString.prototype.split.call(t,".");return 0===i[0].length&&csArray.prototype.shift.call(i),csArray.prototype.every.call(i,(t=>{const s=/^\-?\d+$/.exec(t);return s?parseInt(s[0],10)>=0:"$"===t||/\w+/.test(t)}))}))},t.getJSONPathValue=function(t,s){if(!t)return;const e=csString.prototype.split.call(t,/[\$\[\]]/),i=[];csArray.prototype.forEach.call(e,(t=>{"'"!==t[0]&&'"'!==t[0]?csArray.prototype.push.call(i,...csArray.prototype.filter.call(csString.prototype.split.call(t,"."),(t=>t.length>0))):csArray.prototype.push.call(i,csString.prototype.substring.call(t,1,t.length-1))})),"$"===i[0]&&csArray.prototype.shift.call(i);let n=s;for(const t of i){if(void 0===n[t])return;n=n[t]}return n}}(Wc||(Wc={}));class Qc{constructor(){this.zf=new Set(["age","cache-control","clear-site-data","expires","pragma","warning","downlink","ect","rtt","last-modified","connection","keep-alive","accept","accept-encoding","accept-language","expect","access-control-allow-origin","access-control-allow-credentials","access-control-allow-headers","access-control-allow-methods","access-control-expose-headers","access-control-max-age","access-control-request-headers","access-control-request-method","origin","timing-allow-origin","content-length","content-type","content-encoding","content-language","via","host","referrer-policy","user-agent","allow","server","accept-ranges","range","if-range","content-range","cross-origin-embedder-policy","cross-origin-opener-policy","cross-origin-resource-policy","content-security-policy","content-security-policy-report-only","expect-ct","feature-policy","strict-transport-security","upgrade-insecure-requests","x-content-type-options","x-download-options","x-frame-options","x-permitted-cross-domain-policies","x-powered-by","x-xss-protection","sec-fetch-site","sec-fetch-mode","sec-fetch-user","sec-fetch-dest"])}isValidStandardHeader(t){return this.zf.has(t)}}class Yc{constructor(){this.Gf=64e3,this.Zf=100,this.Wf={collectQueryParam:!1,collectRequestBody:!1,collectResponseBody:!1,matchingBodyContents:[],plainResponseBodyAttributes:{},plainRequestBodyAttributes:{},requestBodyAttributes:{},responseBodyAttributes:{},standardRequestHeaders:{},standardResponseHeaders:{},customRequestHeaders:{},customResponseHeaders:{},plainCustomRequestHeaders:{},plainCustomResponseHeaders:{}},this.Jf=new Qc}Qf(t){return t.length<=this.Gf}Yf(t){const s=t["content-type"];return void 0!==s&&(Ct(s,"application/json")||Ct(s,"application/graphql"))}Kf(t,s){return t&&this.Qf(t)&&this.Yf(s)}Xf(t,s,e,i){let n="request"===i?this.tp:this.sp;if(void 0!==n||this.Kf(s,e)){if(void 0===n)try{n=csJSON.parse(s),"request"===i?this.tp=n:this.sp=n}catch{return}const e=Wc.getJSONPathValue(t,n);if(void 0!==e&&(null===e||!Et(e))){const t=yt(e)?e:csJSON.stringify(e);return vn.truncate(t,this.Zf,vn.ELLIPSIS)}}}isBodyAttributeValueFound(t,s){let e,i;return"request-response"!==s.type&&"response"!==s.type||(e=this.Xf(s.path,t.responseBody,t.responseHeaders,"response")),"request-response"!==s.type&&"request"!==s.type||(i=this.Xf(s.path,t.requestBody,t.requestHeaders,"request")),At(e)||At(i)}collectBodyAttribute(t,s,e){let i;"request-response"!==s.type&&"response"!==s.type||(i=this.Xf(s.path,t.responseBody,t.responseHeaders,"response"),i&&(s.encrypted?this.Wf.responseBodyAttributes[s.path]=i:(i=e(i),this.Wf.plainResponseBodyAttributes[s.path]=i))),"request-response"!==s.type&&"request"!==s.type||(i=this.Xf(s.path,t.requestBody,t.requestHeaders,"request"),i&&(s.encrypted?i&&(this.Wf.requestBodyAttributes[s.path]=i):(i=e(i),this.Wf.plainRequestBodyAttributes[s.path]=i)))}isBodyContentMatching(t,s){if(!t.responseBody)return!1;return!!new RegExp(s,"i").test(t.responseBody)}collectBodyContent(t){-1===csArray.prototype.indexOf.call(this.Wf.matchingBodyContents,t)&&csArray.prototype.push.call(this.Wf.matchingBodyContents,t)}collectCustomHeaders(t,s,e){const i=csString.prototype.toLocaleLowerCase.call(s.headerName);!t.responseHeaders[i]||"request-response"!==s.type&&"response"!==s.type||(s.encrypted?this.Wf.customResponseHeaders[i]=t.responseHeaders[i]:this.Wf.plainCustomResponseHeaders[i]=e(t.responseHeaders[i])),!t.requestHeaders[i]||"request-response"!==s.type&&"request"!==s.type||(s.encrypted?this.Wf.customRequestHeaders[i]=t.requestHeaders[i]:this.Wf.plainCustomRequestHeaders[i]=e(t.requestHeaders[i]))}collectStandardHeaders(t){if(!(Object.keys(this.Wf.standardRequestHeaders).length>0||Object.keys(this.Wf.standardResponseHeaders).length>0)){for(const[s,e]of Object.entries(t.requestHeaders))this.Jf.isValidStandardHeader(s)&&(this.Wf.standardRequestHeaders[s]=e);for(const[s,e]of Object.entries(t.responseHeaders))this.Jf.isValidStandardHeader(s)&&(this.Wf.standardResponseHeaders[s]=e)}}setCollectQueryParam(t){t&&(this.Wf.collectQueryParam=!0)}setCollectResponseBody(t){t&&(this.Wf.collectResponseBody=!0)}setCollectRequestBody(t){t&&(this.Wf.collectRequestBody=!0)}getCollectedDataPoints(){return this.Wf}}!function(t){t.CONTENTSQUARE="contentsquare.net",t.CLICKTALE="clicktale.net",t.FAKE_TRACKER="fake-tracker.content-square.fr"}(Jc||(Jc={}));class Kc{computeApiErrorCollectionOptions(){const t=new Set,s=[];if(this.rules)for(const e of this.rules)void 0!==e.statusCode&&t.add(e.statusCode),void 0!==e.url&&-1===csArray.prototype.indexOf.call(s,e.url)&&csArray.prototype.push.call(s,e.url);const e=[Jc.CONTENTSQUARE,Jc.CLICKTALE];return csArray.prototype.push.call(e,Jc.FAKE_TRACKER),{statusCodes:t,urls:s,excludedDomains:e}}}class Xc extends Kc{constructor(t,s){super(),this.ep=t,this.D=s,this.rules=t.collectionRules}collectDataPoints(t,s){this.Wf=new Yc;let e=!1;if(this.ep.collectionRules)for(const i of this.ep.collectionRules)this.ip(i,t)&&this.np(i,t)&&this.rp(i,t)&&(e=!0,this.op(t,i,s));return e||(e=this.hp(t)),e&&s&&this.ep.collectStandardHeaders&&this.Wf.collectStandardHeaders(t),e?this.Wf.getCollectedDataPoints():null}computeApiErrorCollectionOptions(){const t=this.ep.collectionRules||[],s=new Set,e=[];for(const i of t)void 0!==i.statusCode&&s.add(i.statusCode),void 0!==i.url&&-1===csArray.prototype.indexOf.call(e,i.url)&&csArray.prototype.push.call(e,i.url);const i=[Jc.CONTENTSQUARE,Jc.CLICKTALE];return csArray.prototype.push.call(i,Jc.FAKE_TRACKER),{statusCodes:s,urls:e,excludedDomains:i}}ip(t,s){return(!t.statusCode&&s.statusCode>=400||void 0!==t.statusCode&&t.statusCode===s.statusCode)&&(!t.url||-1!==csString.prototype.indexOf.call(s.url,t.url))}np(t,s){return!t.bodyContent||this.Wf.isBodyContentMatching(s,t.bodyContent)}rp(t,s){const e=csArray.prototype.find.call(t.bodyAttributePaths,(t=>t.primary));return void 0===e||this.Wf.isBodyAttributeValueFound(s,e)}hp(t){return t.statusCode>=400}op(t,s,e){s.bodyContent&&this.Wf.collectBodyContent(s.bodyContent);const i=$s(s.bodyAttributePaths,(t=>1===t.primary));if(i&&this.Wf.collectBodyAttribute(t,i,(t=>this.D.anonymizePII(t))),e){this.Wf.setCollectQueryParam(s.collectQueryParam),this.Wf.setCollectResponseBody(s.collectResponseBody),this.Wf.setCollectRequestBody(s.collectRequestBody);for(const e of s.customHeaders)this.Wf.collectCustomHeaders(t,e,(t=>this.D.anonymizePII(t)));const e=Ds(s.bodyAttributePaths,(t=>!t.primary));for(const s of e)this.Wf.collectBodyAttribute(t,s,(t=>this.D.anonymizePII(t)))}}}class ta extends Kc{constructor(t,s){super(),this.ep=t,this.D=s,this.rules=t.configurableApiErrorRules}collectDataPoints(t,s){this.Wf=new Yc;const e=this.cp(t,this.ep.configurableApiErrorRules);return e.isMatching?(e.matchingBodyContents.length>0&&this.Wf.collectBodyContent(e.matchingBodyContents[0]),s&&this.ap(t),this.Wf.getCollectedDataPoints()):null}computeApiErrorCollectionOptions(){const t=this.ep.configurableApiErrorRules||[],s=new Set,e=[];for(const i of t)void 0!==i.statusCode&&s.add(i.statusCode),void 0!==i.url&&-1===csArray.prototype.indexOf.call(e,i.url)&&csArray.prototype.push.call(e,i.url);const i=[Jc.CONTENTSQUARE,Jc.CLICKTALE];return csArray.prototype.push.call(i,Jc.FAKE_TRACKER),{statusCodes:s,urls:e,excludedDomains:i}}cp(t,s){if(t.statusCode>=400)return{isMatching:!0,matchingBodyContents:[]};if(s)for(const e of s)if(this.up(t,e))return{isMatching:!0,matchingBodyContents:e.bodyContent?[e.bodyContent]:[]};return{isMatching:!1,matchingBodyContents:[]}}up(t,s){return!(t.statusCode!==s.statusCode||-1===csString.prototype.indexOf.call(t.url,s.url)||s.bodyContent&&!this.Wf.isBodyContentMatching(t,s.bodyContent))}ap(t){this.ep.collectStandardHeaders&&this.Wf.collectStandardHeaders(t),this.ep.validCustomHeaders&&this.lp(t,this.ep.validCustomHeaders,Number(!0)),this.ep.plainCustomHeaders&&this.lp(t,this.ep.plainCustomHeaders,Number(!1)),this.mf(t.url,this.ep.validUrls)&&(this.ep.collectQueryParam&&this.Wf.setCollectQueryParam(Number(this.ep.collectQueryParam)),this.ep.collectResponseBody&&this.Wf.setCollectResponseBody(Number(this.ep.collectResponseBody)),this.ep.collectRequestBody&&this.Wf.setCollectRequestBody(Number(this.ep.collectRequestBody)))}lp(t,s,e){for(const i of s)this.Wf.collectCustomHeaders(t,{headerName:i,encrypted:e,type:"request-response"},(t=>this.D.anonymizePII(t)))}mf(t,s){return!!s&&csArray.prototype.some.call(s,(s=>-1!==csString.prototype.indexOf.call(t,s)))}}class sa extends ln{constructor(t){super(),this.Ch=null,this.dp=null,this.ys=null,this.yo=null,this.fp=0,this.pp=["value","checked","src","data","alt"],this.vp={state:Ne.SensitiveState.Child},this.mp=t=>{for(const s of t){if(Ne.isSensitive(s.target)||Ne.isSensitiveChild(s.target))for(let t=0;t<s.addedNodes.length;t+=1){const e=s.addedNodes[t];Ne.isSensitive(e)||Ne.isSensitiveChild(e)||l(e)&&this.gp(e)}for(let t=0;t<s.removedNodes.length;t+=1){const e=s.removedNodes[t];qi.isConnected(e)||this.wp(e)}}},this.yp=t}setSensitiveSettings(t){this.Ml=t}start(){this.fp++,this.isStarted||(this.isStarted=!0,this.onStart())}stop(){this.isStarted&&(this.fp--,0===this.fp&&(this.isStarted=!1,this.onStop()))}onStart(){var t,s,e,i;const{elementSelector:n,attrSelector:r,attrSelectors:o}=this.Ml;null!==(t=this.yo)&&void 0!==t||(this.yo=this.Ep()),0!==n.length&&(null!==(s=this.Ch)&&void 0!==s||(this.Ch=this.Ap()),this.Ch.observe(n)),0!==r.length&&(null!==(e=this.dp)&&void 0!==e||(this.dp=this._p(o)),this.dp.observe(r)),null!==(i=this.ys)&&void 0!==i||(this.ys=new wi(this.mp,((t,s)=>"added"===s&&this.Rp(t)))),this.ys.observe(),csSetTimeout(this.yp)}onStop(){var t,s,e;this.Ch&&(this.wp(document),this.Ch.disconnect()),null===(t=this.dp)||void 0===t||t.disconnect(),null===(s=this.ys)||void 0===s||s.disconnect(),null===(e=this.yo)||void 0===e||e.disconnect()}Ep(){return window.ResizeObserver?new ResizeObserver((t=>{csArray.prototype.forEach.call(t,(t=>{this.resizeObserverCallback(t)}))})):null}Ap(){return new yi((t=>{csArray.prototype.forEach.call(t,(t=>{this.Sp(t)?this.gp(t):(this.Tp(t),this.Ip(t))}))}))}_p(t){return new yi((s=>{csArray.prototype.forEach.call(s,(s=>this.Pp(s,t)))}))}resizeObserverCallback(t){const s=t.target.getBoundingClientRect(),e=Ne.getSensitiveDetails(t.target);if(e.state!==Ne.SensitiveState.Parent)return;if(s.width===e.width&&s.height===e.height)return;const i={state:Ne.SensitiveState.Parent,width:s.width,height:s.height};Ne.setSensitiveProperty(t.target,i),this.produceEvent({type:"ResizeSensitiveElement",target:Re(t.target),width:s.width,height:s.height})}Ip(t){this.yo&&l(t)&&!y(t)&&this.yo.observe(t)}Sp(t){const s=csNodeparentNode.apply(t);return s?Ne.isSensitive(s)||Ne.isSensitiveChild(s):!!S(t)&&(Ne.isSensitive(t.host)||Ne.isSensitiveChild(t.host))}Rp(t){(Ne.isSensitive(t.host)||Ne.isSensitiveChild(t.host))&&Ne.setSensitiveProperty(t,this.vp)}wp(t){Gs(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{Ne.unsetSensitiveProperty(t)}))}Tp(t){const s=t.getBoundingClientRect(),e={state:Ne.SensitiveState.Parent,width:s.width,height:s.height};Ne.setSensitiveProperty(t,e),this.bp(t),Gs(t).visitAll((s=>s!=t&&Ne.setSensitiveProperty(s,this.vp)))}gp(t){Ne.setSensitiveProperty(t,this.vp),Gs(t).visitAll((s=>s!=t&&Ne.setSensitiveProperty(s,this.vp)))}bp(t){var s;const e=null!==(s=Ee.getProperty(t,Ne.sensitiveAttributeProp))&&void 0!==s?s:{attributes:[]};for(let t=0;t<this.pp.length;t+=1){const s=this.pp[t];-1===csArray.prototype.indexOf.call(e.attributes,s)&&csArray.prototype.push.call(e.attributes,s)}0!==e.attributes.length&&Ne.setSensitiveAttributeProperty(t,e)}Pp(t,s){var e;const i=null!==(e=Ee.getProperty(t,Ne.sensitiveAttributeProp))&&void 0!==e?e:{attributes:[]};for(let e=0;e<t.attributes.length;e+=1){const n=t.attributes[e].name;-1===csArray.prototype.indexOf.call(i.attributes,n)&&csArray.prototype.some.call(s,(s=>csString.prototype.indexOf.call(s.attrName,n)>-1&&Ie.call(t,s.selector)))&&csArray.prototype.push.call(i.attributes,n)}0!==i.attributes.length&&Ne.setSensitiveAttributeProperty(t,i)}}Ai([is()],sa.prototype,"resizeObserverCallback",null);const ea=["setPIISelectors"];class ia{constructor(t,s,e,i){this.Nc=t,this.Vp=s,this.Jh=e,this.Bi=i}init(){this.Nc.register(ea,(t=>{this.Bi.setSensitiveSettingsFromCommand(t),this.Jh.emitRecordingStatusChange()}))}onStartTracking(){this.Vp.start()}}class na{constructor(t,s){this.zi=t,this.Bi=s}start(){this.zi.setSensitiveSettings(this.Bi.getSensitiveSettings())}}class ra{constructor(t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,v,m,g,w,y,E,A,_,R,S,T,I){this.lc=t,this.wa=s,this.W=e,this.J=i,this.Jh=n,this.Nc=r,this.Cp=o,this.L=h,this.Np=c,this.Op=a,this.kp=u,this.cl=l,this.D=d,this.yu=f,this.Lc=p,this.it=v,this.xp=m,this._l=g,this.ca=w,this.ds=y,this.$p=E,this.xc=A,this.Lp=_,this.Dp=R,this.$c=S,this.Mp=T,this.Fp=I,this.qp=(t=!1)=>{this.Bp.start(t),this.Hp.start()}}start(){if(this.Np.init(),this.Op.init(),this.Op.isActive())return;let t,s,e,i,n,r,o,h,c,a,u,l,d,f,p;this.Dp.schedule((()=>{l=new sc(this.J,this.W),p=new Uc(l),u=new Gh(this.yu),t=new Oh(this.L,this.lc,this.W,this.yu,u,this.Nc,l,new Sc(ss),this.ca,this.$c,this._l),s=new ro(this.Nc,this.J,this.L,this.lc,this.wa,this.D),d=new mc(this.L),f=new sa((()=>{})),a=new Pc;const v=new yc(this.L);c=new wc(this.L,v,a,this.ca),c.init();const m=new Mc;e=new to(this.W,this.J,this.Nc,this.ca,v,this.L,m,a),i=new vo(this.L,this.lc,this.W,this.Nc,this.D,l,this.it),this.Bp=new zh(this.L,this.Nc,this.Jh,this.lc,this.W,this.J,this.cl,this.ds,this.Lc,this.it,this.xc,m,this.al),n=new tc(this.L,this.W,this.J,this.Nc),r=new dc(this.L,this.Nc,this.wa,this.lc,this._l),o=new gc(this.Nc),h=new Ic(this.L,new Ot(this.L,this.D),this.$c),this.Hp=new Zh})),this.L.apiErrors.enabled&&this.Dp.schedule((()=>{var t;let s;s=(null===(t=this.L.apiErrors.collectionRules)||void 0===t?void 0:t.length)?new Xc(this.L.apiErrors,this.D):new ta(this.L.apiErrors,this.D),this.Di=new Ac(new zc,new Gc,s),this.Mi=new _c(this.Lc),this.Ji=new Zc;const e=new Nc(this.Di,this.Mi,this.L,this.lc,this.ca,this.Nc,this.$c);e.init(),this.Jh.addListener(e)})),this.L.customErrors.enabled&&this.Dp.schedule((()=>{const t=new Dc(this.D,this.L,this.lc,this.Nc,this._l,this.$c,this.ca,undefined);t.init(),this.Jh.addListener(t)})),this.L.jsErrorsEnabled&&this.Dp.schedule((()=>{this.zd=new pc,this.Li=new Rc(this.D,this.it);const t=new xc(this.zd,this.Li,this.L,this.lc,this.ca,this.Nc,this._l,this.it,this.$c);t.init(),this.Jh.addListener(t)})),this.Dp.schedule((()=>{this.kp.init()})),this.Dp.schedule((()=>{e.init()})),this.Dp.schedule((()=>{s.init()})),this.Dp.schedule((()=>{i.init()})),this.Dp.schedule((()=>{this.$p.init()})),this.Dp.schedule((()=>{this.Bp.init()})),this.Dp.schedule((()=>{n.init()})),this.Dp.schedule((()=>{r.init()})),this.Dp.schedule((()=>{this.xp.init()})),this.Dp.schedule((()=>{o.init()})),this.Dp.schedule((()=>{h.init()})),this.Dp.schedule((()=>{this.Lp.init()})),this.Dp.schedule((()=>{this.Jh.addListener(n),this.Jh.addListener(this.Cp),this.Jh.addListener(t),this.Jh.addListener(this.kp),this.Jh.addListener(e),this.Jh.addListener(this.$p),this.Jh.addListener(this.Bp),this.Jh.addListener(r),this.Jh.addListener(s),this.Jh.addListener(c),this.Jh.addListener(h),this.Jh.addListener(p)})),this.Dp.schedule((()=>{const t=new na(f,d),s=new ia(this.Nc,t,this.Jh,d);s.init(),this.Jh.addListener(s)})),bc.isRecordingSupported()&&this.Dp.schedule((()=>{const t=new qr(a,this.J,this.L,this.lc,this.Nc,this.D,l,d,f,this.Li,this.Di,this.Mi,this.Jh,this._l,this.ca,this.xc,this.$c,this.Lc,this.Ji,this.jp());t.init(),this.Jh.addListener(t),e.setRecordingService(t.recordingService)})),this.Dp.schedule((()=>{t.init()})),this.Dp.schedule((()=>{l.onSessionExpired((()=>{this.Jh.emitBeforeSessionRenewal(),this.zp(!0),this.Jh.emitAfterSessionRenewal()})),this.zp()}))}zp(t=!1){this.Nc.start(),this.Hp.onLoad((()=>{this.Jh.emitStartTracking(t)})),nc(this.L)&&!t||this.qp(t)}jp(){if(this.Dc)return this.Dc;const t=new Hc;return this.Dc=new Bc(this.cl,this.L,this.it,t),this.Dc.init(),this.Dc}}class oa{constructor(t,s,e,i,n,r,o,h){this.L=t,this.W=s,this.ls=e,this.Gp=i,this.Zp=n,this.Wp=r,this.Jp=o,this.Qp=h}compute(t){var s,e;this.L.crossDomainTracking&&!this.L.cookielessTrackingEnabled?this.L.crossDomainSingleIframeTracking?null===(s=this.Jp)||void 0===s||s.start((()=>this.Yp(t))):null===(e=this.Wp)||void 0===e||e.applyUpToDate((()=>this.Yp(t))):this.Yp(t)}Yp(t){this.Zp.handle(),this.Gp.clear(),this.Kp()?(this.Gp.restoreClearedVisitor(),t(!0)):(this.ls.exclude(this.L),t(!1))}Kp(){const t=G.boolean(this.L.sampleRate);return this.Qp.isForceIncluded()||!this.ls.isExcluded()&&this.W.doesVisitorExist()||!this.ls.isExcluded()&&t}}var ha;!function(t){t.generate=function(){const t=navigator.userAgent+navigator.language+navigator.platform,s=csString.prototype.slice.call(function(t){let s=0;for(let e=0;e<t.length;e+=1)s=csString.prototype.charCodeAt.call(t,e)+(s<<6)+(s<<16)-s;return Math.abs(s)}(t).toString(16),-4);let e=(new csDate).getTime();const i="xxxxxxxx-hhhh-axxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(t=>{const s=(e+16*Math.random())%16|0;return e=Math.floor(e/16),("x"===t?s:7&s|8).toString(16)}));return csString.prototype.replace.call(i,"hhhh",s)}}(ha||(ha={}));class ca{constructor(t,s,e,i){this.L=t,this.Xp=s,this.J=e,this.Jh=i,this.tv=1e4}createOrUpdateVisitor(){let t=this.getVisitor();null===t&&(t=this.sv(),this.J.removeSession()),this.ev(t),this.setVisitor(t)}sv(){return{id:ha.generate(),visitsCount:0,appliedTrackingDraw:this.L.lastTrackingDraw,creationTimestamp:Pt(),lastVisitTimestamp:0,hitTimestamp:0,expires:It.now()+this.L.visitorCookieTimeout,allowSubdomains:this.L.allowSubdomains}}ev(t){const s=Pt();this.J.doesSessionExist()||(t.visitsCount+=1,t.lastVisitTimestamp=s),t.hitTimestamp=s,t.appliedTrackingDraw=this.L.lastTrackingDraw,this.iv=t.visitsCount}getRequestParameters(){const t=this.getVisitor();return t?{uu:t.id,sn:`${t.visitsCount}`,hd:`${t.hitTimestamp}`}:{}}getVisitor(){return this.Xp.get()}setVisitor(t){this.Xp.set(t)}doesVisitorExist(){return null!==this.Xp.get()}resetVisitor(){this.nv(),this.Jh.emitAfterVisitorCleared()}removeVisitor(){this.Xp.remove()}hasAllowSubdomainsChanged(){const t=this.getVisitor();if(!t)return!1;return t.allowSubdomains!==this.L.allowSubdomains}handleSubdomainChange(){this.Xp.handleSubdomainChange()}isSessionRenewed(){const t=this.getVisitor();return null!==t&&void 0!==this.iv&&t.visitsCount!==this.iv}rv(){return!At(this.ov)||It.now()-this.ov>this.tv}renewVisitor(){this.rv()?(this.ov=It.now(),this.nv(),this.Jh.emitAfterVisitorRenewal()):ss.warn("session:start:newVisitor is trying to renew visitor under time limit")}nv(){this.Jh.emitBeforeVisitorRenewal(),this.removeVisitor()}}const aa="_cs_s",ua=18e5,la=/^(\d+\.[0135678TBW](\.[01])?)(\.\d+)?$/,da=".";var fa;!function(t){t[t.NOT_FOUND=0]="NOT_FOUND",t[t.EXPIRED=1]="EXPIRED",t[t.FOUND=2]="FOUND"}(fa||(fa={}));class pa{constructor(t,s,e){this.L=t,this.Mp=s,this.hv=e,this.Fr=null,this.cv=!1}get(t){const s=this.getRawSession(t);return this.isValid(s)?pa.fromString(s):null}getRawSession(t){if(t){const t=this.av();return pa.uv(t)}const{sessionString:s,status:e}=this.lv(),i=pa.uv(s);if(e!==fa.EXPIRED)return i;if(this.L.cookielessTrackingEnabled)return null;const n=this.av();if(!n)return null;const r=csString.prototype.split.call(n,da);if(!pa.fv(r))return n;const o=r[r.length-1],h=parseInt(o,10);return isNaN(h)||this.pv(h),i}onCookieToSet(t){this.vv=t}onCookieToRemove(t){this.mv=t}set(t,s=18e5){var e;const i=It.now()+s;let n=this.toString(t);n+=`${da}${i}`,this.gv(n,i),this.L.cookielessTrackingEnabled?this.hv.setItem(aa,n):(this.Mp.set(aa,n,s),null===(e=this.vv)||void 0===e||e.call(this,aa,n,s))}remove(){var t;this.L.cookielessTrackingEnabled?this.hv.removeItem(aa):(this.Mp.delete(aa),null===(t=this.mv)||void 0===t||t.call(this,aa)),this.wv()}handleSubdomainChange(){if(this.L.cookielessTrackingEnabled)return;const t=this.get(!0);t&&(this.L.allowSubdomains?this.Mp.delete(aa,Rs.CURRENT_DOMAIN):this.Mp.delete(aa,this.Mp.getRootDomain()),this.set(t))}isValid(t){return null!==t&&pa.isValidSessionString(t)}toString(t){return csArray.prototype.join.call([t.pageNumber,t.collectState,t.etrState],da)}gv(t,s){this.Fr={sessionString:t,expires:s}}lv(){return this.Fr?this.Fr&&It.now()<=this.Fr.expires?{sessionString:this.Fr.sessionString,status:fa.FOUND}:{sessionString:this.Fr.sessionString,status:fa.EXPIRED}:{sessionString:this.av(),status:fa.NOT_FOUND}}wv(){this.Fr=null}pv(t){this.Fr&&(this.Fr.expires=t,this.cv=!0)}isCacheRefreshed(){return this.cv}resetCacheRefreshed(){this.cv=!1}av(){if(this.L.cookielessTrackingEnabled){const t=this.hv.getItem(aa);return!t||this.yv(t)?null:t}const t=this.Mp.get(aa);return!t||this.yv(t)?null:t}yv(t){const s=csString.prototype.split.call(t,da);if(!pa.fv(s))return!1;const e=parseInt(s[s.length-1],10);return!isNaN(e)&&It.now()>e}static fv(t){return 13===t[t.length-1].length}static uv(t){var s;if(!t)return null;const e=null===(s=csString.prototype.match.call(t,la))||void 0===s?void 0:s[1];return null!=e?e:null}static fromRawString(t){const s=pa.uv(t);return null!==s?pa.fromString(s):null}static fromString(t){var s;const[e,i,n]=csString.prototype.split.call(t,da);return{collectState:i,etrState:null!==(s=n)&&void 0!==s?s:Fe.ETR_OFF,pageNumber:parseInt(e,10)}}static isValidSessionString(t){return la.test(t)}}var va;!function(t){t[t.NO=0]="NO",t[t.WITHDRAWN=1]="WITHDRAWN",t[t.GRANTED=2]="GRANTED"}(va||(va={}));class ma{constructor(t,s){this.Ev=t,this.Av=s,this._v=null,this.Rv=0,this.Sv=va.NO}setDynamicVariablesService(t){this.Tv=t}createOrUpdateSession(){this.Iv(),this.Pv=It.now(),this.Rv=0;let t=this.bv();null===t?(t=this.Vv(),this.Cv(t),this.Nv(t)):(t=this.Av.sanitizeSessionCollectState(t),this.Cv(t),t.collectState=this.Av.updateCollectState(t)),this.setSession(t)}grantReplayRecording(t){t.collectState=this.Av.getInitialCollectState(),t.collectState=this.Av.computeInitialCollectStateFromRecordingConsentGranted(t),this.setSession(t)}grantReplayRecordingBeforeSessionStart(){this.Sv=va.GRANTED}withdrawnReplayRecording(t){t.collectState=this.Av.getRecordingConsentWithdrawn(),this.setSession(t)}withdrawnReplayRecordingBeforeSessionStart(){this.Sv=va.WITHDRAWN}Nv(t){this.Sv===va.WITHDRAWN?(t.collectState=this.Av.getRecordingConsentWithdrawn(),this.setSession(t)):this.Sv===va.GRANTED?t.collectState=this.Av.computeInitialCollectStateFromRecordingConsentGranted(t):t.collectState=this.Av.computeInitialCollectState(t),this.Sv=va.NO}Vv(){return{pageNumber:0,collectState:this.Av.getInitialCollectState(),etrState:Fe.ETR_OFF}}Cv(t){t.pageNumber+=1}isReplayRecorded(){const t=this.getSession();return!!t&&this.Av.isReplayRecorded(t)}isTemporarilyRecorded(){const t=this.getSession();return(null==t?void 0:t.collectState)===Ue.TEMPORARILY}abortQuotaServiceRequest(){this.Av.abortQuotaServiceRequest()}getRequestParameters(){const t={},s=this.getSession();return null!==s&&(t.pn=`${s.pageNumber}`),t}getSession(){return this.Ev.get()}bv(){return this.Ev.get(!0)}doesSessionExist(){return null!==this.Ev.get()}setSession(t){this.Ev.set(t)}refreshSession(){const t=this.bv();t&&this.setSession(t)}removeSession(){this.Ev.remove()}getRecordingStates(){const t=this.getSession(),s=[];return t&&(t.collectState!==Ue.ANALYTICS_ONLY&&csArray.prototype.push.call(s,t.collectState),t.etrState===Fe.ETR_ON&&csArray.prototype.push.call(s,Ue.RECORDING_ETR_SAMPLING)),s}updateCollectState(t,s){const e=this.getSession();null!==e&&(e.collectState=t,e.etrState=s,this.setSession(e))}hasValidSession(){const t=this.Ev.getRawSession();return this.Ev.isValid(t)}handleSubdomainChange(){this.Ev.handleSubdomainChange()}pollCacheRefreshEvent(t=!0){const s=this.Ev.isCacheRefreshed();return s&&t&&this.Ev.resetCacheRefreshed(),s}extendSessionPeriodically(){this._v||this.Ov()}extendSession(){const t=this.getSession();return null===t?(ss.warn("extendSession is trying to extend an expired session"),this.Iv(),!1):(this.Ev.set(t,ua),!0)}Ov(){if(this.kv())return void this.Iv();this.extendSession()&&(this.xv(),this.$v())}$v(){this._v=window.csSetTimeout((()=>{this.Ov()}),174e4)}kv(){return 1434e4-(It.now()+ua-this.Pv)<0}Iv(){this._v&&(window.csClearTimeout(this._v),this._v=null)}xv(){this.Rv+=1,this.Tv.trackDynamicVariable("session_expiry_update",this.Rv)}}class ga{constructor(t,s,e){this.L=t,this.W=s,this.ls=e}clear(){this.Lv()&&(this.Dv=this.W.getVisitor(),this.W.removeVisitor()),this.Mv()&&this.ls.removeExclusion()}Lv(){return this.W.doesVisitorExist()&&this.W.getVisitor().appliedTrackingDraw!==this.L.lastTrackingDraw}Mv(){return this.ls.getAppliedTrackingDraw()!==this.L.lastTrackingDraw}restoreClearedVisitor(){this.Dv&&this.W.setVisitor(this.Dv)}}class wa{constructor(t,s,e){this.W=t,this.J=s,this.Uv=e}handle(){this.W.hasAllowSubdomainsChanged()&&(this.W.handleSubdomainChange(),this.J.handleSubdomainChange(),this.Uv.handleSubdomainChange())}}class ya{constructor(){this.listeners=[]}addListener(t){csArray.prototype.push.call(this.listeners,t)}}class Ea extends ya{constructor(t){super(),this.Dp=t}emitBeforeNaturalPageView(){for(const t of this.listeners)t.onBeforeNaturalPageView&&t.onBeforeNaturalPageView()}emitAfterNaturalPageView(){for(const t of this.listeners)t.onAfterNaturalPageView&&t.onAfterNaturalPageView()}emitInitTracking(){for(const t of this.listeners)t.onInitTracking&&t.onInitTracking()}emitStartTracking(t){for(const s of this.listeners)s.onStartTracking&&this.Dp.schedule((()=>s.onStartTracking(t)))}emitArtificialPageViewEnd(){for(const t of this.listeners)if(t.onArtificialPageViewEnd)try{t.onArtificialPageViewEnd()}catch(t){ss.error(t)}}emitBeforeArtificialPageView(){for(const t of this.listeners)t.onBeforeArtificialPageView&&t.onBeforeArtificialPageView()}emitAfterArtificialPageView(){for(const t of this.listeners)t.onAfterArtificialPageView&&t.onAfterArtificialPageView()}emitBeforeSessionRenewal(){for(const t of this.listeners)t.onBeforeSessionRenewal&&t.onBeforeSessionRenewal()}emitAfterSessionRenewal(){for(const t of this.listeners)t.onAfterSessionRenewal&&t.onAfterSessionRenewal()}emitOptout(){for(const t of this.listeners)t.onOptout&&t.onOptout()}emitReplayUnanonymizationConsentGranted(){for(const t of this.listeners)t.onReplayUnanonymizationConsentGranted&&t.onReplayUnanonymizationConsentGranted()}emitReplayUnanonymizationConsentWithdrawn(){for(const t of this.listeners)t.onReplayUnanonymizationConsentWithdrawn&&t.onReplayUnanonymizationConsentWithdrawn()}emitAfterReplayRecordingConsentGranted(){for(const t of this.listeners)t.onAfterReplayRecordingConsentGranted&&t.onAfterReplayRecordingConsentGranted()}emitAfterReplayRecordingConsentWithdrawn(){for(const t of this.listeners)t.onAfterReplayRecordingConsentWithdrawn&&t.onAfterReplayRecordingConsentWithdrawn()}emitCollectStateChange(t,s){for(const e of this.listeners)e.onCollectStateChange&&e.onCollectStateChange(t,s)}emitInitialDomStart(){for(const t of this.listeners)t.onInitialDomStart&&t.onInitialDomStart()}emitInitialDomDone(t){for(const s of this.listeners)s.onInitialDomDone&&s.onInitialDomDone(t)}emitRecordingStatusChange(){for(const t of this.listeners)t.onRecordingStatusChange&&t.onRecordingStatusChange()}emitBeforeVisitorRenewal(){for(const t of this.listeners)t.onBeforeVisitorRenewal&&t.onBeforeVisitorRenewal()}emitAfterVisitorCleared(){for(const t of this.listeners)t.onAfterVisitorCleared&&t.onAfterVisitorCleared()}emitAfterVisitorRenewal(){for(const t of this.listeners)t.onAfterVisitorRenewal&&t.onAfterVisitorRenewal()}}ws([gs("emitStartTracking")],Ea.prototype,"emitStartTracking",null);const Aa="_cs_c";var _a;!function(t){t[t.NOT_REQUIRED=0]="NOT_REQUIRED",t[t.NOT_EXPRESSED=1]="NOT_EXPRESSED",t[t.GRANTED=2]="GRANTED",t[t.WITHDRAWN=3]="WITHDRAWN"}(_a||(_a={}));class Ra{constructor(t,s,e){this.L=t,this.Mp=s,this.Fp=e}get(){let t;return t=this.L.cookielessTrackingEnabled?this.Fp.getItem(Aa):this.Mp.get(Aa),null===t?t:Number(t)}set(t){this.L.cookielessTrackingEnabled?this.Fp.setItem(Aa,csString(t)):this.Mp.set(Aa,csString(t),z)}remove(){this.L.cookielessTrackingEnabled?this.Fp.removeItem(Aa):this.Mp.delete(Aa)}handleSubdomainChange(){this.L.cookielessTrackingEnabled||(this.L.allowSubdomains?this.Mp.delete(Aa,Rs.CURRENT_DOMAIN):this.Mp.delete(Aa,this.Mp.getRootDomain()))}}class Sa{constructor(t,s,e){this.L=t,this.J=s,this.Jh=e}grantReplayConsent(){if(!Hr.isReplayConsentNeeded(this.L))return;const t=this.J.getSession();t?Hr.isRecordingBlockedByConsent(t)&&(this.J.grantReplayRecording(t),this.Jh.emitAfterReplayRecordingConsentGranted()):this.J.grantReplayRecordingBeforeSessionStart()}withdrawReplayConsent(){if(!Hr.isReplayConsentNeeded(this.L))return;const t=this.J.getSession();t?Hr.isRecordingWithDrawn(t)||(this.J.withdrawnReplayRecording(t),this.Jh.emitAfterReplayRecordingConsentWithdrawn()):this.J.withdrawnReplayRecordingBeforeSessionStart()}}const Ta=["replay:consent:unanonymized:granted","trackConsentGranted"],Ia=["replay:consent:unanonymized:withdrawn","trackConsentWithdrawn"],Pa=["replay:consent:startForSession:granted"],ba=["replay:consent:startForSession:withdrawn"];class Va{constructor(t,s,e,i,n){this.L=t,this.Nc=s,this.cl=e,this.J=i,this.Jh=n}init(){this.Fv=new Sa(this.L,this.J,this.Jh),this.cl.setInitialConsent(),this.jd()}jd(){this.Nc.register(Ta,(()=>{this.cl.grantReplayAnonymizationConsent()})),this.Nc.register(Ia,(()=>{this.cl.withdrawReplayAnonymizationConsent()})),this.Nc.register(Pa,(()=>{this.Fv.grantReplayConsent()})),this.Nc.register(ba,(()=>{this.Fv.withdrawReplayConsent()}))}onOptout(){this.cl.removeAllConsents()}onBeforeVisitorRenewal(){this.cl.removeAllConsents()}onAfterVisitorRenewal(){this.cl.setInitialConsent()}onAfterVisitorCleared(){this.cl.setInitialConsent()}}class Ca{constructor(t,s,e){this.L=t,this.Xp=s,this.Jh=e}setInitialConsent(){const t=this.Xp.get();(null===t||this.hasConsentRequiredChanged(t))&&this.setDefaultReplayAnonymization()}hasConsentRequiredChanged(t){const s=this.L.consentRequired;return s&&t===_a.NOT_REQUIRED||!s&&t!==_a.NOT_REQUIRED}handleSubdomainChange(){this.Xp.handleSubdomainChange()}setDefaultReplayAnonymization(){const t=this.L.consentRequired?_a.NOT_EXPRESSED:_a.NOT_REQUIRED;this.Xp.set(t)}grantReplayAnonymizationConsent(){this.L.consentRequired&&(this.Xp.set(_a.GRANTED),this.Jh.emitReplayUnanonymizationConsentGranted())}withdrawReplayAnonymizationConsent(){this.L.consentRequired&&(this.Xp.set(_a.WITHDRAWN),this.Jh.emitReplayUnanonymizationConsentWithdrawn())}removeAllConsents(){this.Xp.remove()}isReplayUnanonymizedAllowedByConsent(){return!this.L.consentRequired||this.Xp.get()===_a.GRANTED}getRequestParameters(){return{uc:`${this.Xp.get()}`}}}class Na{constructor(t,s,e,i,n,r,o){this.Jh=t,this.Nc=s,this.Cp=e,this.Np=i,this.Op=n,this.qv=r,this.kp=o}start(){this.Jh.addListener(this.qv),this.Jh.addListener(this.kp),this.Jh.addListener(this.Cp),this.kp.init(),this.Np.init(),this.Op.init(),this.Op.isActive()||this.Nc.start()}}const Oa="_cs_ex",ka=2592e6,xa=/^[0-9]+$/;class $a{constructor(t,s,e){this.L=t,this.Mp=s,this.hv=e}onCookieToSet(t){this.vv=t}onCookieToRemove(t){this.mv=t}get(){return this.L.cookielessTrackingEnabled?Number(this.hv.getItem(Oa)):Number(this.Mp.get(Oa))}set(t){var s;this.L.cookielessTrackingEnabled?this.hv.setItem(Oa,t):(this.Mp.set(Oa,t,ka),null===(s=this.vv)||void 0===s||s.call(this,Oa,t,ka))}remove(){var t;this.L.cookielessTrackingEnabled?this.hv.removeItem(Oa):(this.Mp.delete(Oa),null===(t=this.mv)||void 0===t||t.call(this,Oa))}static isValidExclusionString(t){return xa.test(t)}}class La{constructor(t,s){this.Hn=t,this.Xp=s}exclude(t){this.Xp.set(csString(t.lastTrackingDraw))}removeExclusion(){this.Xp.remove()}isExcluded(){return this.Bv()||this.Hv()}Bv(){return 0!==this.getAppliedTrackingDraw()}getAppliedTrackingDraw(){return this.Xp.get()}Hv(){return csString.prototype.indexOf.call(this.Hn.href,Oa)>0}}class Da{constructor(t){this.Ea=t}onOptout(){this.Ea.removeExclusion()}}var Ma;!function(t){t.SessionReplay="SR",t.None=""}(Ma||(Ma={}));class Ua{constructor(t){this.it=t,this.jv=new RegExp(".^")}setExcludeUrlForSessionReplay(t){this.jv=new RegExp(t)}zv(){return this.jv.test(this.it.getAnonymizedUrl())?Ma.SessionReplay:Ma.None}isUrlExcludedForSessionReplay(){return this.zv()===Ma.SessionReplay}getRequestParameters(){return{ex:this.zv()}}}const Fa=["excludeURLforReplay"];class qa{constructor(t,s){this.Ea=t,this.Nc=s}init(){this.Nc.register(Fa,(t=>{yt(t)&&this.Ea.setExcludeUrlForSessionReplay(t)}))}}const Ba="_cs_inc";class Ha{constructor(t,s){this.Hn=t,this.Mp=s}isForceIncluded(){return this.Gv()||this.Zv()}isForceReplayRecorded(){return this.Wv(Ue.RECORDING_GLOBAL_SAMPLING)}Gv(){return null!==this.Mp.get(Ba)}Wv(t){return this.Mp.get(Ba)===t}Zv(){return csString.prototype.indexOf.call(this.Hn.href,Ba)>0}}const ja="_cs_optout";class za{constructor(t,s,e){this.L=t,this.Mp=s,this.Fp=e}get(){return this.L.cookielessTrackingEnabled?this.Fp.getItem(ja):this.Mp.get(ja)}set(t){this.L.cookielessTrackingEnabled?this.Fp.setItem(ja,t):this.Mp.set(ja,t,z)}}class Ga{constructor(t,s,e){this.Jh=t,this.Hn=s,this.Xp=e}init(){!this.isActive()&&this.Jv()&&this.activate()}isActive(){return"1"===this.Xp.get()}activate(){this.Jh.emitOptout(),this.Xp.set("1")}Jv(){return csString.prototype.indexOf.call(this.Hn.href,ja)>0}}const Za=["optout"];class Wa{constructor(t,s){this.Nc=t,this.Op=s}init(){this.Nc.register(Za,(()=>{this.Op.activate()}))}}class Ja{constructor(t,s){this.Nc=t,this.ca=s}init(){this.ca.addListener(this.Nc)}onOptout(){this.Nc.stop()}onBeforeSessionRenewal(){this.Nc.stop()}}var Qa,Ya;!function(t){t.UXA="_uxa",t.WVT="cs_wvt"}(Qa||(Qa={}));class Ka extends Me{constructor(t){super(),this.Qv=t,this.Yv={}}register(t,s,e){for(const i of t)this.Yv[i]={callback:s,configuration:e},this.Yv}onStart(){this.Kv(),this.Xv()}onStop(){for(const t of this.Qv)window[t]=[]}applyFromIntegration(t,s,e){this.tm(t,s,`Commands.apply.from.integration: ${e}`)}applyFromImplementation(t,s,e){this.tm(t,s,`Commands.apply.from.implementation: ${e}`)}onIframeCommands(t){for(const s of t.commands)this.sm(s.name,s.params,t.iframePath)}tm(t,s,e){this.isStarted?ss.tryToExecute(e,(()=>{if(this.Yv[t])return this.Yv[t].callback(...s)}))():window._uxa.push([t,...s])}sm(t,s,e){ss.tryToExecute(`Commands.apply.from.iframe: ${e}`,(()=>{if(this.Yv[t])return this.Yv[t].callback(...s)}))()}Kv(){for(const t of this.Qv)window[t].forEach((([t,...s])=>this.im(t,s,!1)))}Xv(){for(const t of this.Qv)window[t]={push:([t,...s])=>this.im(t,s,!0)}}im(t,s,e){var i,n;if(this.Yv[t]){if((null===(i=this.Yv[t].configuration)||void 0===i?void 0:i.disableApplyPending)&&!e||(null===(n=this.Yv[t].configuration)||void 0===n?void 0:n.disableApplyImmediate)&&e)return;try{return this.Yv[t].callback(...s)}catch(e){ss.error(`Command ${t} failed - params: ${csJSON.stringify(s)}`,e)}}}}class Xa{constructor(t,s,e,i){this.L=t,this.W=s,this.J=e,this.nm=i}getRequestParameters(){var t,s,e,i,n;const r={...mt(),...this.L.getRequestParameters()},o=this.J.getSession();o&&(r.pn=`${o.pageNumber}`);const h=this.W.getVisitor();if(h&&(r.sn=`${h.visitsCount}`,r.uu=`${h.id}`),(null===(t=this.nm)||void 0===t?void 0:t.hasSubProjectId())&&(r.subProjectID=`${this.nm.getSubProjectId()}`),window.heap)try{r.happid=window.heap.appid,r.hsid=null===(e=(s=window.heap).getSessionId)||void 0===e?void 0:e.call(s),r.huu=(null===(n=(i=window.heap).getUserId)||void 0===n?void 0:n.call(i))||window.heap.userId}catch{delete r.happid,delete r.hsid,delete r.huu}return r}}class tu{constructor(t,s){this.Nc=t,this.V=s}init(){this.Nc.register(["debugEvents"],(t=>{"boolean"==typeof t&&this.V.updateDynamicFields("emitDebugEvents",t)}))}}function su(t,s,e){if(!At(s)&&!At(e))return t.href;const i=At(s)?eu(s):t.pathname,n=At(e)?function(t){return j(t,"?")||""===t?t:`?${t}`}(e):t.search;return`${t.protocol}//${t.host}${i}${n}`}function eu(t){return j(t,"/")?t:`/${t}`}!function(t){t[t.page=1]="page",t[t.onNextPageviewOnly=2]="onNextPageviewOnly"}(Ya||(Ya={}));class iu{constructor(t,s){this.Hn=t,this.Lc=s,this.rm=10}overridePath(t,s){if(""===t)return void(this.om=void 0);const e=this.hm(s);e&&(this.am=e),this.om=s?this.um(t,s):t}overrideQuery(t,s){const e=this.hm(s);e&&(this.lm=e),this.dm=s?this.um(t,s):t}computeOverriddenUrl(t){return this.fm(t)?this.getAnonymizedUrl():t}pm(t){return("string"==typeof t||"number"==typeof t)&&t in Ya}fm(t){const s=this.vm(this.Hn.href);return this.vm(t)===s}vm(t){return s=t,e="/",-1!==csString.prototype.indexOf.call(s,e,s.length-e.length)?csString.prototype.slice.call(t,0,-1):t;var s,e}hm(t){return At(null==t?void 0:t.lifespan)&&this.pm(null==t?void 0:t.lifespan)?null==t?void 0:t.lifespan:null}gm(){return this.am&&this.am in Ya}wm(){return this.lm&&this.lm in Ya}cleanupOverrideLifespan(){this.gm()&&(this.om=void 0,this.am=void 0),this.wm()&&(this.dm=void 0,this.lm=void 0)}getAnonymizedUrl(){const t=su(this.Hn,this.om,this.dm);return this.Lc.anonymizeUrl(t,[])}getAnonymizedPath(){const t=At(this.om)?eu(this.om):location.pathname;return this.Lc.anonymizeUrl(t,[])}getUrlProtocol(){return this.Hn.protocol}getRequestParameters(){return{url:this.getAnonymizedUrl()}}um(t,s){return this.ym(s)?this.Em(t):this.Am(s)?this._m(t):t}Am(t){return Boolean(t.decodeURI)}_m(t){return this.Rm(t,1,!1)}ym(t){return Boolean(t.decodeURIDeep)}Em(t){return this.Rm(t,this.rm,!0)}Rm(t,s,e){let i=t;for(let t=0;t<s;t++)try{const t=window.decodeURI(i);if(t===i)return i;i=t}catch{return i}return e&&ss.warn(`decodeURIDeep limit reached: ${i}`),i}}class nu extends ya{emitPageEvent(t){for(const s of this.listeners)s.onPageEvent&&s.onPageEvent(t)}emitEventTriggerRecording(t,s){for(const e of this.listeners)e.onEventTriggerRecording&&e.onEventTriggerRecording(t,s)}emitCustomJavaScriptErrorEvent(t){for(const s of this.listeners)s.onCustomJavaScriptErrorEvent&&s.onCustomJavaScriptErrorEvent(t)}emitCustomErrorEvent(t){for(const s of this.listeners)s.onCustomErrorEvent&&s.onCustomErrorEvent(t)}emitUserIdentifierEvent(t){for(const s of this.listeners)s.onUserIdentifierEvent&&s.onUserIdentifierEvent(t)}emitExternalEvent(t){for(const s of this.listeners)s.onExternalEvent&&s.onExternalEvent({type:go.EXTERNAL_EVENT,name:t,ts:0})}}class ru{constructor(t,s,e,i,n){this.configuration=t,this.Sm=s,this.Jh=e,this.Qp=i,this.it=n,this.Tm=[]}init(){this.Im()}sanitizeSessionCollectState(t){return t.collectState===Ue.TEMPORARILY&&(t.collectState=Ue.ANALYTICS_ONLY),t}computeInitialCollectState(t){return Hr.isReplayConsentNeeded(this.configuration)?Ue.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED:this.Nv(t)}computeInitialCollectStateFromRecordingConsentGranted(t){return this.Nv(t)}Nv(t){return bc.isRecordingSupported()?(this.Tm=[],G.percentage()<this.configuration.replayRecordingRate||this.Qp.isForceReplayRecorded()?csArray.prototype.push.call(this.Tm,Ue.RECORDING_GLOBAL_SAMPLING):this.configuration.malkaUrlEnabled&&csArray.prototype.push.call(this.Tm,Ue.RECORDING_URL_SAMPLING),this.configuration.malkaEtrEnabled&&csArray.prototype.push.call(this.Tm,Ue.RECORDING_ETR_SAMPLING),this.Tm.length>0?(this.Pm(t),Ue.TEMPORARILY):Ue.ANALYTICS_ONLY):Ue.ANALYTICS_ONLY}updateCollectState(t){return bc.isRecordingSupported()?Hr.isRecordingBlockedByConsent(t)?t.collectState===Ue.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN?Ue.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN:Ue.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED:t.collectState===Ue.RECORDING_GLOBAL_SAMPLING?Ue.RECORDING_GLOBAL_SAMPLING:(this.Tm=[],this.configuration.malkaUrlEnabled&&(csArray.prototype.push.call(this.Tm,Ue.RECORDING_URL_SAMPLING),this.configuration.malkaEtrEnabled&&csArray.prototype.push.call(this.Tm,Ue.RECORDING_ETR_SAMPLING)),this.Tm.length>0?(this.Pm(t),Ue.TEMPORARILY):Ue.ANALYTICS_ONLY):Ue.ANALYTICS_ONLY}Pm(t){var s;const e=null===(s=this.W)||void 0===s?void 0:s.getVisitor();this.Sm.send({recordingTypes:csArray.prototype.map.call(this.Tm,Number),url:this.it.getAnonymizedUrl(),projectId:this.configuration.projectId,uu:(null==e?void 0:e.id)||"",sn:(null==e?void 0:e.visitsCount)||"",pn:(null==t?void 0:t.pageNumber)||""})}abortQuotaServiceRequest(){this.Sm.abort()}isReplayRecorded(t){return!Hr.isRecordingBlockedByConsent(t)&&(t.collectState===Ue.TEMPORARILY||t.collectState===Ue.RECORDING_GLOBAL_SAMPLING||t.collectState===Ue.RECORDING_URL_SAMPLING||t.etrState===Fe.ETR_ON)}Im(){this.Sm.onError((()=>this.quotaServiceErrorHandler("NetworkError"))),this.Sm.onTimeout((()=>this.quotaServiceTimeoutHandler()),3e3),this.Sm.onLoad((t=>this.quotaServiceLoadHandler(t)))}quotaServiceErrorHandler(t){this.bm(`error - ${t}`)}quotaServiceTimeoutHandler(){this.bm("timeout")}bm(t){let s=Ue.ANALYTICS_ONLY;this.Vm(this.Tm)?(s=Ue.RECORDING_GLOBAL_SAMPLING,ss.warn(`Quota Service: request ${t} - bypassed by GLOBAL_SAMPLING`)):ss.warn(`Quota Service: request ${t}`),this.Jh.emitCollectStateChange(s,Fe.ETR_OFF)}quotaServiceLoadHandler(t){if(200!==t.status)return void this.quotaServiceErrorHandler(`Status code: ${t.status}`);let s;try{s=csJSON.parse(t.responseText)}catch(s){return void this.quotaServiceErrorHandler(`Unable to parse the quota service response: ${t.responseText}`)}const e=null==s.allowedRecordingTypes?void 0:csArray.prototype.map.call(s.allowedRecordingTypes,csString);if(!e)return void this.quotaServiceErrorHandler("recording types missing from quota service response");let i=Fe.ETR_OFF,n=Ue.ANALYTICS_ONLY;this.Vm(e)?n=Ue.RECORDING_GLOBAL_SAMPLING:this.Cm(e)&&(n=Ue.RECORDING_URL_SAMPLING),this.Nm(e)&&(i=Fe.ETR_ON),this.Jh.emitCollectStateChange(n,i)}Vm(t){return csArray.prototype.some.call(t,(t=>t===Ue.RECORDING_GLOBAL_SAMPLING))}Cm(t){return csArray.prototype.some.call(t,(t=>t===Ue.RECORDING_URL_SAMPLING))}Nm(t){return csArray.prototype.some.call(t,(t=>t===Ue.RECORDING_ETR_SAMPLING))}setVisitorService(t){this.W=t}getInitialCollectState(){return Ue.ANALYTICS_ONLY}getRecordingConsentWithdrawn(){return Ue.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN}}ws([is("Quota Service: onerror")],ru.prototype,"quotaServiceErrorHandler",null),ws([is("Quota Service: ontimeout")],ru.prototype,"quotaServiceTimeoutHandler",null),ws([is("Quota Service: onload")],ru.prototype,"quotaServiceLoadHandler",null);const ou="|iframe|";class hu extends ya{constructor(t,s,e,i){super(),this.Om=t,this.km=s,this.xm=e,this.$m=i}emitIframeEvent(t,s,e){if(this.Lm(s)&&null===t)ss.error(`iframeEventEmitter received event ${s} with null iframe, content:${csJSON.stringify(e)}`);else switch(s){case Qt.ChildLogMessage:this.Dm(e);break;case Qt.AnalysisEvent:{const s=e,i=this.Om.transformEvent(t,s);i.isUserEvent?this.Mm(i.event):this.Um(i.event);break}case Qt.RecordingEvent:{const s=e,i=this.$m.transformEvents(t,s);if(0===i.events.length)return;i.containsUserEvent?this.Fm(i.events):this.qm(i.events);break}case Qt.JavascriptError:this.Bm(e);break;case Qt.ApiError:this.Hm(e);break;case Qt.DetailedApiError:this.jm(e);break;case Qt.CustomError:this.zm(e);break;case Qt.EmerchandisingMessage:{const s=this.xm.transformEvent(t,e);this.Gm(s);break}case Qt.Commands:{const s=this.km.transformEvent(t,e);this.Zm(s);break}case Qt.IntegrationCallback:this.Wm(e);break;case Qt.StaticResource:this.Jm(e);break;case Qt.TrackingContextRequestMessage:this.Qm(e);break;default:ss.error(`Parent received unknown data type from iframe : ${csJSON.stringify(e)}`)}}Lm(t){const s=[Qt.AnalysisEvent,Qt.RecordingEvent,Qt.EmerchandisingMessage,Qt.Commands];return-1!==csArray.prototype.indexOf.call(s,t)}Dm(t){const{message:s,errorCode:e,level:i}=t;switch(i){case Y.debug:ss.debug(s,e);break;case Y.warn:ss.warn(s,e);break;case Y.error:ss.error(s,e);break;case Y.critical:ss.critical(s,e)}}Mm(t){for(const s of this.listeners)s.onIframeAnalysisUserEvent&&s.onIframeAnalysisUserEvent(t)}Um(t){for(const s of this.listeners)s.onIframeAnalysisBrowserEvent&&s.onIframeAnalysisBrowserEvent(t)}Fm(t){for(const s of this.listeners)s.onIframeRecordingUserEvent&&s.onIframeRecordingUserEvent(t)}qm(t){for(const s of this.listeners)s.onIframeRecordingBrowserEvent&&s.onIframeRecordingBrowserEvent(t)}Bm(t){for(const s of this.listeners)s.onIframeJavascriptError&&s.onIframeJavascriptError(t)}Hm(t){for(const s of this.listeners)s.onIframeApiError&&s.onIframeApiError(t)}jm(t){for(const s of this.listeners)s.onIframeDetailedApiError&&s.onIframeDetailedApiError(t)}Gm(t){for(const s of this.listeners)s.onIframeEmerchandisingMessage&&s.onIframeEmerchandisingMessage(t)}Zm(t){for(const s of this.listeners)s.onIframeCommands&&s.onIframeCommands(t)}Wm(t){for(const s of this.listeners)s.onIframeIntegrationCallback&&s.onIframeIntegrationCallback(t)}Jm(t){for(const s of this.listeners)s.onIframeStaticResource&&s.onIframeStaticResource(t)}Qm(t){for(const s of this.listeners)s.onTrackingContextRequestCallback&&s.onTrackingContextRequestCallback(t)}zm(t){for(const s of this.listeners)s.onIframeCustomError&&s.onIframeCustomError(t)}}var cu;!function(t){t.COMPRESSION_DISABLED="compressionDisabled"}(cu||(cu={}));class au{constructor(){}static init(t){this.Ym&&void 0===t||this.initFlags(t)}static initFlags(t=document.cookie){var s;const e=null===(s=/_cs_debug=((\w|\.|\:|=)+)/g.exec(t))||void 0===s?void 0:s[1];if(this.Ym=new Map,e){const t=csString.prototype.split.call(e,".");for(let s=0;s<t.length;s++){const[e,i]=csString.prototype.split.call(t[s],"=");this.Ym.set(e,i||"true")}}}static getBoolean(t){const s=this.getString(t);return null!=s&&"false"!==s&&0!==parseInt(s)}static getString(t){var s;return this.init(),null===(s=this.Ym)||void 0===s?void 0:s.get(t)}static isCompressionEnabled(){return!this.getBoolean(cu.COMPRESSION_DISABLED)}static Log(t){return(s,e,i)=>{var n;const r=e.toString(),o=`${null===(n=s.constructor)||void 0===n?void 0:n.name}.${r}`,h=i.value;(function(t,s){var e;if(null==t)return!1;return t===s||!!(null===(e=csString.prototype.match.call(t,new RegExp("(^|,)("+s+")(,|$)")))||void 0===e?void 0:e.length)})(au.getString("debugLog"),t)&&(i.value=function(...t){return console.log(o,...t),h.bind(this)(...t)})}}}function uu(){function t(t){let s=t.length;for(;--s>=0;)t[s]=0}const s=256,e=286,i=30,n=15,r=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]),o=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]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),c=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),a=new Array(576);t(a);const u=new Array(60);t(u);const l=new Array(512);t(l);const d=new Array(256);t(d);const f=new Array(29);t(f);const p=new Array(i);function v(t,s,e,i,n){this.static_tree=t,this.extra_bits=s,this.extra_base=e,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let m,g,w;function y(t,s){this.dyn_tree=t,this.max_code=0,this.stat_desc=s}t(p);const E=t=>t<256?l[t]:l[256+(t>>>7)],A=(t,s)=>{t.pending_buf[t.pending++]=255&s,t.pending_buf[t.pending++]=s>>>8&255},_=(t,s,e)=>{t.bi_valid>16-e?(t.bi_buf|=s<<t.bi_valid&65535,A(t,t.bi_buf),t.bi_buf=s>>16-t.bi_valid,t.bi_valid+=e-16):(t.bi_buf|=s<<t.bi_valid&65535,t.bi_valid+=e)},R=(t,s,e)=>{_(t,e[2*s],e[2*s+1])},S=(t,s)=>{let e=0;do{e|=1&t,t>>>=1,e<<=1}while(--s>0);return e>>>1},T=(t,s,e)=>{const i=new Array(16);let r,o,h=0;for(r=1;r<=n;r++)i[r]=h=h+e[r-1]<<1;for(o=0;o<=s;o++){let s=t[2*o+1];0!==s&&(t[2*o]=S(i[s]++,s))}},I=t=>{let s;for(s=0;s<e;s++)t.dyn_ltree[2*s]=0;for(s=0;s<i;s++)t.dyn_dtree[2*s]=0;for(s=0;s<19;s++)t.bl_tree[2*s]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},P=t=>{t.bi_valid>8?A(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},b=(t,s,e,i)=>{const n=2*s,r=2*e;return t[n]<t[r]||t[n]===t[r]&&i[s]<=i[e]},V=(t,s,e)=>{const i=t.heap[e];let n=e<<1;for(;n<=t.heap_len&&(n<t.heap_len&&b(s,t.heap[n+1],t.heap[n],t.depth)&&n++,!b(s,i,t.heap[n],t.depth));)t.heap[e]=t.heap[n],e=n,n<<=1;t.heap[e]=i},C=(t,e,i)=>{let n,h,c,a,u=0;if(0!==t.last_lit)do{n=t.pending_buf[t.d_buf+2*u]<<8|t.pending_buf[t.d_buf+2*u+1],h=t.pending_buf[t.l_buf+u],u++,0===n?R(t,h,e):(c=d[h],R(t,c+s+1,e),a=r[c],0!==a&&(h-=f[c],_(t,h,a)),n--,c=E(n),R(t,c,i),a=o[c],0!==a&&(n-=p[c],_(t,n,a)))}while(u<t.last_lit);R(t,256,e)},N=(t,s)=>{const e=s.dyn_tree,i=s.stat_desc.static_tree,r=s.stat_desc.has_stree,o=s.stat_desc.elems;let h,c,a,u=-1;for(t.heap_len=0,t.heap_max=573,h=0;h<o;h++)0!==e[2*h]?(t.heap[++t.heap_len]=u=h,t.depth[h]=0):e[2*h+1]=0;for(;t.heap_len<2;)a=t.heap[++t.heap_len]=u<2?++u:0,e[2*a]=1,t.depth[a]=0,t.opt_len--,r&&(t.static_len-=i[2*a+1]);for(s.max_code=u,h=t.heap_len>>1;h>=1;h--)V(t,e,h);a=o;do{h=t.heap[1],t.heap[1]=t.heap[t.heap_len--],V(t,e,1),c=t.heap[1],t.heap[--t.heap_max]=h,t.heap[--t.heap_max]=c,e[2*a]=e[2*h]+e[2*c],t.depth[a]=(t.depth[h]>=t.depth[c]?t.depth[h]:t.depth[c])+1,e[2*h+1]=e[2*c+1]=a,t.heap[1]=a++,V(t,e,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,s)=>{const e=s.dyn_tree,i=s.max_code,r=s.stat_desc.static_tree,o=s.stat_desc.has_stree,h=s.stat_desc.extra_bits,c=s.stat_desc.extra_base,a=s.stat_desc.max_length;let u,l,d,f,p,v,m=0;for(f=0;f<=n;f++)t.bl_count[f]=0;for(e[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],f=e[2*e[2*l+1]+1]+1,f>a&&(f=a,m++),e[2*l+1]=f,l>i||(t.bl_count[f]++,p=0,l>=c&&(p=h[l-c]),v=e[2*l],t.opt_len+=v*(f+p),o&&(t.static_len+=v*(r[2*l+1]+p)));if(0!==m){do{for(f=a-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[a]--,m-=2}while(m>0);for(f=a;0!==f;f--)for(l=t.bl_count[f];0!==l;)d=t.heap[--u],d>i||(e[2*d+1]!==f&&(t.opt_len+=(f-e[2*d+1])*e[2*d],e[2*d+1]=f),l--)}})(t,s),T(e,u,t.bl_count)},O=(t,s,e)=>{let i,n,r=-1,o=s[1],h=0,c=7,a=4;for(0===o&&(c=138,a=3),s[2*(e+1)+1]=65535,i=0;i<=e;i++)n=o,o=s[2*(i+1)+1],++h<c&&n===o||(h<a?t.bl_tree[2*n]+=h:0!==n?(n!==r&&t.bl_tree[2*n]++,t.bl_tree[32]++):h<=10?t.bl_tree[34]++:t.bl_tree[36]++,h=0,r=n,0===o?(c=138,a=3):n===o?(c=6,a=3):(c=7,a=4))},k=(t,s,e)=>{let i,n,r=-1,o=s[1],h=0,c=7,a=4;for(0===o&&(c=138,a=3),i=0;i<=e;i++)if(n=o,o=s[2*(i+1)+1],!(++h<c&&n===o)){if(h<a)do{R(t,n,t.bl_tree)}while(0!=--h);else 0!==n?(n!==r&&(R(t,n,t.bl_tree),h--),R(t,16,t.bl_tree),_(t,h-3,2)):h<=10?(R(t,17,t.bl_tree),_(t,h-3,3)):(R(t,18,t.bl_tree),_(t,h-11,7));h=0,r=n,0===o?(c=138,a=3):n===o?(c=6,a=3):(c=7,a=4)}};let x=!1;const $=(t,s,e,i)=>{_(t,0+(i?1:0),3),((t,s,e,i)=>{P(t),i&&(A(t,e),A(t,~e)),t.pending_buf.set(t.window.subarray(s,s+e),t.pending),t.pending+=e})(t,s,e,!0)};var L=t=>{x||((()=>{let t,s,c,y,E;const A=new Array(16);for(c=0,y=0;y<28;y++)for(f[y]=c,t=0;t<1<<r[y];t++)d[c++]=y;for(d[c-1]=y,E=0,y=0;y<16;y++)for(p[y]=E,t=0;t<1<<o[y];t++)l[E++]=y;for(E>>=7;y<i;y++)for(p[y]=E<<7,t=0;t<1<<o[y]-7;t++)l[256+E++]=y;for(s=0;s<=n;s++)A[s]=0;for(t=0;t<=143;)a[2*t+1]=8,t++,A[8]++;for(;t<=255;)a[2*t+1]=9,t++,A[9]++;for(;t<=279;)a[2*t+1]=7,t++,A[7]++;for(;t<=287;)a[2*t+1]=8,t++,A[8]++;for(T(a,287,A),t=0;t<i;t++)u[2*t+1]=5,u[2*t]=S(t,5);m=new v(a,r,257,e,n),g=new v(u,o,0,i,n),w=new v(new Array(0),h,0,19,7)})(),x=!0),t.l_desc=new y(t.dyn_ltree,m),t.d_desc=new y(t.dyn_dtree,g),t.bl_desc=new y(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,I(t)},D=(t,e,i,n)=>{let r,o,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,i=4093624447;for(e=0;e<=31;e++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<s;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),N(t,t.l_desc),N(t,t.d_desc),h=(t=>{let s;for(O(t,t.dyn_ltree,t.l_desc.max_code),O(t,t.dyn_dtree,t.d_desc.max_code),N(t,t.bl_desc),s=18;s>=3&&0===t.bl_tree[2*c[s]+1];s--);return t.opt_len+=3*(s+1)+5+5+4,s})(t),r=t.opt_len+3+7>>>3,o=t.static_len+3+7>>>3,o<=r&&(r=o)):r=o=i+5,i+4<=r&&-1!==e?$(t,e,i,n):4===t.strategy||o===r?(_(t,2+(n?1:0),3),C(t,a,u)):(_(t,4+(n?1:0),3),((t,s,e,i)=>{let n;for(_(t,s-257,5),_(t,e-1,5),_(t,i-4,4),n=0;n<i;n++)_(t,t.bl_tree[2*c[n]+1],3);k(t,t.dyn_ltree,s-1),k(t,t.dyn_dtree,e-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),C(t,t.dyn_ltree,t.dyn_dtree)),I(t),n&&P(t)},M=(t,e,i)=>(t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===e?t.dyn_ltree[2*i]++:(t.matches++,e--,t.dyn_ltree[2*(d[i]+s+1)]++,t.dyn_dtree[2*E(e)]++),t.last_lit===t.lit_bufsize-1),U=t=>{_(t,2,3),R(t,256,a),(t=>{16===t.bi_valid?(A(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)},F={_tr_init:L,_tr_stored_block:$,_tr_flush_block:D,_tr_tally:M,_tr_align:U};var q=(t,s,e,i)=>{let n=65535&t,r=t>>>16&65535,o=0;for(;0!==e;){o=e>2e3?2e3:e,e-=o;do{n=n+s[i++]|0,r=r+n|0}while(--o);n%=65521,r%=65521}return n|r<<16};const B=new Uint32Array((()=>{let t,s=[];for(var e=0;e<256;e++){t=e;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;s[e]=t}return s})());var H=(t,s,e,i)=>{const n=B,r=i+e;t^=-1;for(let e=i;e<r;e++)t=t>>>8^n[255&(t^s[e])];return~t},j={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"},z={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};const{_tr_init:G,_tr_stored_block:Z,_tr_flush_block:W,_tr_tally:J,_tr_align:Q}=F,{Z_NO_FLUSH:Y,Z_PARTIAL_FLUSH:K,Z_FULL_FLUSH:X,Z_FINISH:tt,Z_BLOCK:st,Z_OK:et,Z_STREAM_END:it,Z_STREAM_ERROR:nt,Z_DATA_ERROR:rt,Z_BUF_ERROR:ot,Z_DEFAULT_COMPRESSION:ht,Z_FILTERED:ct,Z_HUFFMAN_ONLY:at,Z_RLE:ut,Z_FIXED:lt,Z_DEFAULT_STRATEGY:dt,Z_UNKNOWN:ft,Z_DEFLATED:pt}=z,vt=258,mt=262,gt=103,wt=113,yt=666,Et=(t,s)=>(t.msg=j[s],s),At=t=>(t<<1)-(t>4?9:0),_t=t=>{let s=t.length;for(;--s>=0;)t[s]=0};let Rt=(t,s,e)=>(s<<t.hash_shift^e)&t.hash_mask;const St=t=>{const s=t.state;let e=s.pending;e>t.avail_out&&(e=t.avail_out),0!==e&&(t.output.set(s.pending_buf.subarray(s.pending_out,s.pending_out+e),t.next_out),t.next_out+=e,s.pending_out+=e,t.total_out+=e,t.avail_out-=e,s.pending-=e,0===s.pending&&(s.pending_out=0))},Tt=(t,s)=>{W(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,s),t.block_start=t.strstart,St(t.strm)},It=(t,s)=>{t.pending_buf[t.pending++]=s},Pt=(t,s)=>{t.pending_buf[t.pending++]=s>>>8&255,t.pending_buf[t.pending++]=255&s},bt=(t,s,e,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,s.set(t.input.subarray(t.next_in,t.next_in+n),e),1===t.state.wrap?t.adler=q(t.adler,s,n,e):2===t.state.wrap&&(t.adler=H(t.adler,s,n,e)),t.next_in+=n,t.total_in+=n,n)},Vt=(t,s)=>{let e,i,n=t.max_chain_length,r=t.strstart,o=t.prev_length,h=t.nice_match;const c=t.strstart>t.w_size-mt?t.strstart-(t.w_size-mt):0,a=t.window,u=t.w_mask,l=t.prev,d=t.strstart+vt;let f=a[r+o-1],p=a[r+o];t.prev_length>=t.good_match&&(n>>=2),h>t.lookahead&&(h=t.lookahead);do{if(e=s,a[e+o]===p&&a[e+o-1]===f&&a[e]===a[r]&&a[++e]===a[r+1]){r+=2,e++;do{}while(a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&a[++r]===a[++e]&&r<d);if(i=vt-(d-r),r=d-vt,i>o){if(t.match_start=s,o=i,i>=h)break;f=a[r+o-1],p=a[r+o]}}}while((s=l[s&u])>c&&0!=--n);return o<=t.lookahead?o:t.lookahead},Ct=t=>{const s=t.w_size;let e,i,n,r,o;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=s+(s-mt)){t.window.set(t.window.subarray(s,s+s),0),t.match_start-=s,t.strstart-=s,t.block_start-=s,i=t.hash_size,e=i;do{n=t.head[--e],t.head[e]=n>=s?n-s:0}while(--i);i=s,e=i;do{n=t.prev[--e],t.prev[e]=n>=s?n-s:0}while(--i);r+=s}if(0===t.strm.avail_in)break;if(i=bt(t.strm,t.window,t.strstart+t.lookahead,r),t.lookahead+=i,t.lookahead+t.insert>=3)for(o=t.strstart-t.insert,t.ins_h=t.window[o],t.ins_h=Rt(t,t.ins_h,t.window[o+1]);t.insert&&(t.ins_h=Rt(t,t.ins_h,t.window[o+3-1]),t.prev[o&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=o,o++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<mt&&0!==t.strm.avail_in)},Nt=(t,s)=>{let e,i;for(;;){if(t.lookahead<mt){if(Ct(t),t.lookahead<mt&&s===Y)return 1;if(0===t.lookahead)break}if(e=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==e&&t.strstart-e<=t.w_size-mt&&(t.match_length=Vt(t,e)),t.match_length>=3)if(i=J(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+1]);else i=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2},Ot=(t,s)=>{let e,i,n;for(;;){if(t.lookahead<mt){if(Ct(t),t.lookahead<mt&&s===Y)return 1;if(0===t.lookahead)break}if(e=0,t.lookahead>=3&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==e&&t.prev_length<t.max_lazy_match&&t.strstart-e<=t.w_size-mt&&(t.match_length=Vt(t,e),t.match_length<=5&&(t.strategy===ct||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=J(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=Rt(t,t.ins_h,t.window[t.strstart+3-1]),e=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(Tt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=J(t,0,t.window[t.strstart-1]),i&&Tt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=J(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2};function kt(t,s,e,i,n){this.good_length=t,this.max_lazy=s,this.nice_length=e,this.max_chain=i,this.func=n}const xt=[new kt(0,0,0,0,((t,s)=>{let e=65535;for(e>t.pending_buf_size-5&&(e=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ct(t),0===t.lookahead&&s===Y)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+e;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,Tt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-mt&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(Tt(t,!1),t.strm.avail_out),1)})),new kt(4,4,8,4,Nt),new kt(4,5,16,8,Nt),new kt(4,6,32,32,Nt),new kt(4,4,16,16,Ot),new kt(8,16,32,32,Ot),new kt(8,16,128,128,Ot),new kt(8,32,128,256,Ot),new kt(32,128,258,1024,Ot),new kt(32,258,258,4096,Ot)];function $t(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=pt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),_t(this.dyn_ltree),_t(this.dyn_dtree),_t(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),_t(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),_t(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Lt=t=>{if(!t||!t.state)return Et(t,nt);t.total_in=t.total_out=0,t.data_type=ft;const s=t.state;return s.pending=0,s.pending_out=0,s.wrap<0&&(s.wrap=-s.wrap),s.status=s.wrap?42:wt,t.adler=2===s.wrap?0:1,s.last_flush=Y,G(s),et},Dt=t=>{const s=Lt(t);return s===et&&(t=>{t.window_size=2*t.w_size,_t(t.head),t.max_lazy_match=xt[t.level].max_lazy,t.good_match=xt[t.level].good_length,t.nice_match=xt[t.level].nice_length,t.max_chain_length=xt[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=2,t.match_available=0,t.ins_h=0})(t.state),s},Mt=(t,s,e,i,n,r)=>{if(!t)return nt;let o=1;if(s===ht&&(s=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>9||e!==pt||i<8||i>15||s<0||s>9||r<0||r>lt)return Et(t,nt);8===i&&(i=9);const h=new $t;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<<h.w_bits,h.w_mask=h.w_size-1,h.hash_bits=n+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<<n+6,h.pending_buf_size=4*h.lit_bufsize,h.pending_buf=new Uint8Array(h.pending_buf_size),h.d_buf=1*h.lit_bufsize,h.l_buf=3*h.lit_bufsize,h.level=s,h.strategy=r,h.method=e,Dt(t)};var Ut=(t,s)=>{let e,i;if(!t||!t.state||s>st||s<0)return t?Et(t,nt):nt;const n=t.state;if(!t.output||!t.input&&0!==t.avail_in||n.status===yt&&s!==tt)return Et(t,0===t.avail_out?ot:nt);n.strm=t;const r=n.last_flush;if(n.last_flush=s,42===n.status)if(2===n.wrap)t.adler=0,It(n,31),It(n,139),It(n,8),n.gzhead?(It(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)),It(n,255&n.gzhead.time),It(n,n.gzhead.time>>8&255),It(n,n.gzhead.time>>16&255),It(n,n.gzhead.time>>24&255),It(n,9===n.level?2:n.strategy>=at||n.level<2?4:0),It(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(It(n,255&n.gzhead.extra.length),It(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=H(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(It(n,0),It(n,0),It(n,0),It(n,0),It(n,0),It(n,9===n.level?2:n.strategy>=at||n.level<2?4:0),It(n,3),n.status=wt);else{let s=pt+(n.w_bits-8<<4)<<8,e=-1;e=n.strategy>=at||n.level<2?0:n.level<6?1:6===n.level?2:3,s|=e<<6,0!==n.strstart&&(s|=32),s+=31-s%31,n.status=wt,Pt(n,s),0!==n.strstart&&(Pt(n,t.adler>>>16),Pt(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(e=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),St(t),e=n.pending,n.pending!==n.pending_buf_size));)It(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){e=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),St(t),e=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.name.length?255&n.gzhead.name.charCodeAt(n.gzindex++):0,It(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){e=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),St(t),e=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindex<n.gzhead.comment.length?255&n.gzhead.comment.charCodeAt(n.gzindex++):0,It(n,i)}while(0!==i);n.gzhead.hcrc&&n.pending>e&&(t.adler=H(t.adler,n.pending_buf,n.pending-e,e)),0===i&&(n.status=gt)}else n.status=gt;if(n.status===gt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&St(t),n.pending+2<=n.pending_buf_size&&(It(n,255&t.adler),It(n,t.adler>>8&255),t.adler=0,n.status=wt)):n.status=wt),0!==n.pending){if(St(t),0===t.avail_out)return n.last_flush=-1,et}else if(0===t.avail_in&&At(s)<=At(r)&&s!==tt)return Et(t,ot);if(n.status===yt&&0!==t.avail_in)return Et(t,ot);if(0!==t.avail_in||0!==n.lookahead||s!==Y&&n.status!==yt){let e=n.strategy===at?((t,s)=>{let e;for(;;){if(0===t.lookahead&&(Ct(t),0===t.lookahead)){if(s===Y)return 1;break}if(t.match_length=0,e=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,e&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2})(n,s):n.strategy===ut?((t,s)=>{let e,i,n,r;const o=t.window;for(;;){if(t.lookahead<=vt){if(Ct(t),t.lookahead<=vt&&s===Y)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=o[n],i===o[++n]&&i===o[++n]&&i===o[++n])){r=t.strstart+vt;do{}while(i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&i===o[++n]&&n<r);t.match_length=vt-(r-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(e=J(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(e=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),e&&(Tt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,s===tt?(Tt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(Tt(t,!1),0===t.strm.avail_out)?1:2})(n,s):xt[n.level].func(n,s);if(3!==e&&4!==e||(n.status=yt),1===e||3===e)return 0===t.avail_out&&(n.last_flush=-1),et;if(2===e&&(s===K?Q(n):s!==st&&(Z(n,0,0,!1),s===X&&(_t(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),St(t),0===t.avail_out))return n.last_flush=-1,et}return s!==tt?et:n.wrap<=0?it:(2===n.wrap?(It(n,255&t.adler),It(n,t.adler>>8&255),It(n,t.adler>>16&255),It(n,t.adler>>24&255),It(n,255&t.total_in),It(n,t.total_in>>8&255),It(n,t.total_in>>16&255),It(n,t.total_in>>24&255)):(Pt(n,t.adler>>>16),Pt(n,65535&t.adler)),St(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?et:it)},Ft=(t,s)=>{let e=s.length;if(!t||!t.state)return nt;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return nt;if(1===n&&(t.adler=q(t.adler,s,e,0)),i.wrap=0,e>=i.w_size){0===n&&(_t(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(s.subarray(e-i.w_size,e),0),s=t,e=i.w_size}const r=t.avail_in,o=t.next_in,h=t.input;for(t.avail_in=e,t.next_in=0,t.input=s,Ct(i);i.lookahead>=3;){let t=i.strstart,s=i.lookahead-2;do{i.ins_h=Rt(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(--s);i.strstart=t,i.lookahead=2,Ct(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,t.next_in=o,t.input=h,t.avail_in=r,i.wrap=n,et},qt={deflateInit:(t,s)=>Mt(t,s,pt,15,8,dt),deflateInit2:Mt,deflateReset:Dt,deflateResetKeep:Lt,deflateSetHeader:(t,s)=>t&&t.state?2!==t.state.wrap?nt:(t.state.gzhead=s,et):nt,deflate:Ut,deflateEnd:t=>{if(!t||!t.state)return nt;const s=t.state.status;return 42!==s&&69!==s&&73!==s&&91!==s&&s!==gt&&s!==wt&&s!==yt?Et(t,nt):(t.state=null,s===wt?Et(t,rt):et)},deflateSetDictionary:Ft,deflateInfo:"pako deflate (from Nodeca project)"};const Bt=(t,s)=>Object.prototype.hasOwnProperty.call(t,s);var Ht=function(t){const s=Array.prototype.slice.call(arguments,1);for(;s.length;){const e=s.shift();if(e){if("object"!=typeof e)throw new TypeError(e+"must be non-object");for(const s in e)Bt(e,s)&&(t[s]=e[s])}}return t},jt=t=>{let s=0;for(let e=0,i=t.length;e<i;e++)s+=t[e].length;const e=new Uint8Array(s);for(let s=0,i=0,n=t.length;s<n;s++){let n=t[s];e.set(n,i),i+=n.length}return e};let zt=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){zt=!1}const Gt=new Uint8Array(256);for(let t=0;t<256;t++)Gt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Gt[254]=Gt[254]=1;const Zt=(t,s=t.length)=>{if(s<65534&&t.subarray&&zt)return String.fromCharCode.apply(null,t.length===s?t:t.subarray(0,s));let e="";for(let i=0;i<s;i++)e+=String.fromCharCode(t[i]);return e};var Wt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let s,e,i,n,r,o=t.length,h=0;for(n=0;n<o;n++)e=t.charCodeAt(n),55296==(64512&e)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(e=65536+(e-55296<<10)+(i-56320),n++)),h+=e<128?1:e<2048?2:e<65536?3:4;for(s=new Uint8Array(h),r=0,n=0;r<h;n++)e=t.charCodeAt(n),55296==(64512&e)&&n+1<o&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(e=65536+(e-55296<<10)+(i-56320),n++)),e<128?s[r++]=e:e<2048?(s[r++]=192|e>>>6,s[r++]=128|63&e):e<65536?(s[r++]=224|e>>>12,s[r++]=128|e>>>6&63,s[r++]=128|63&e):(s[r++]=240|e>>>18,s[r++]=128|e>>>12&63,s[r++]=128|e>>>6&63,s[r++]=128|63&e);return s};var Jt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Qt=Object.prototype.toString,{Z_NO_FLUSH:Yt,Z_SYNC_FLUSH:Kt,Z_FULL_FLUSH:Xt,Z_FINISH:ts,Z_OK:ss,Z_STREAM_END:es,Z_DEFAULT_COMPRESSION:is,Z_DEFAULT_STRATEGY:ns,Z_DEFLATED:rs}=z;function os(t){this.options=Ht({level:is,method:rs,chunkSize:16384,windowBits:15,memLevel:8,strategy:ns},t||{});let s=this.options;s.raw&&s.windowBits>0?s.windowBits=-s.windowBits:s.gzip&&s.windowBits>0&&s.windowBits<16&&(s.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jt,this.strm.avail_out=0;let e=qt.deflateInit2(this.strm,s.level,s.method,s.windowBits,s.memLevel,s.strategy);if(e!==ss)throw new Error(j[e]);if(s.header&&qt.deflateSetHeader(this.strm,s.header),s.dictionary){let t;if(t="string"==typeof s.dictionary?Wt(s.dictionary):"[object ArrayBuffer]"===Qt.call(s.dictionary)?new Uint8Array(s.dictionary):s.dictionary,e=qt.deflateSetDictionary(this.strm,t),e!==ss)throw new Error(j[e]);this._dict_set=!0}}function hs(t,s){return(s=s||{}).gzip=!0,function(t,s){const e=new os(s=s||{});if(e.push(t,!0),e.err)throw e.msg||j[e.err];return e.result}(t,s)}return os.prototype.push=function(t,s){const e=this.strm,i=this.options.chunkSize;let n,r;if(this.ended)return!1;for(r=s===~~s?s:!0===s?ts:Yt,"string"==typeof t?e.input=Wt(t):"[object ArrayBuffer]"===Qt.call(t)?e.input=new Uint8Array(t):e.input=t,e.next_in=0,e.avail_in=e.input.length;;)if(0===e.avail_out&&(e.output=new Uint8Array(i),e.next_out=0,e.avail_out=i),(r===Kt||r===Xt)&&e.avail_out<=6)this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;else{if(n=qt.deflate(e,r),n===es)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),n=qt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===ss;if(0!==e.avail_out){if(r>0&&e.next_out>0)this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;else if(0===e.avail_in)break}else this.onData(e.output)}return!0},os.prototype.onData=function(t){this.chunks.push(t)},os.prototype.onEnd=function(t){t===ss&&(this.result=jt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},(t,s,e)=>{let i=hs(t);return i="base64"===s?btoa(Zt(i)):i.buffer,e&&e(i),i}}class lu extends Cs{constructor(t){super(t),this.algorithm=Vs.GZIP,this.Km=uu(),this.Xm=(t,s,e)=>{e(this.Km(t,s))},this.compress=du();"undefined"!=typeof CompressionStream&&me||(this.compress=this.Xm,this.getCompressorSourceCode=()=>uu.toString())}compressSync(t,s){return this.Km(t,s)}getCompressorSourceCode(){return du.toString()}}function du(){return(t,s,e)=>{const i=new Response(t).body.pipeThrough(new CompressionStream("gzip")),n=new Response(i).arrayBuffer();"base64"!==s?n.then((t=>e(t))):n.then((t=>{return s=t,new Promise((t=>{const e=new FileReader;e.onload=s=>t(s.target.result.split(",")[1]),e.readAsDataURL(new Blob([s]))}));var s})).then((t=>e(t)))}}class fu extends Cs{constructor(){super(...arguments),this.algorithm=Vs.UNCOMPRESSED}compress(t,s,e){e(this.compressSync(t,s))}compressSync(t,s){return t}getCompressorSourceCode(){return function(){return(t,s,e)=>e(t)}.toString()}}class pu{static create(t,s=!0){return this.instance?this.instance:s&&!au.isCompressionEnabled()?new fu(t):this.instance=new lu(t)}}class vu{setItem(t,s){window.sessionStorage.setItem(t,s)}getItem(t){return window.sessionStorage.getItem(t)}removeItem(t){window.sessionStorage.removeItem(t)}}class mu{setItem(t,s){window.localStorage.setItem(t,s)}getItem(t){return window.localStorage.getItem(t)}removeItem(t){window.localStorage.removeItem(t)}}const gu="_cs_cvars";class wu{constructor(t,s,e){this.L=t,this.Mp=s,this.hv=e}onCookieToSet(t){this.vv=t}onCookieToRemove(t){this.mv=t}get(){return this.L.cookielessTrackingEnabled?this.hv.getItem(gu):this.Mp.get(gu)}set(t){var s;this.L.cookielessTrackingEnabled?this.hv.setItem(gu,t):(this.Mp.set(gu,t),null===(s=this.vv)||void 0===s||s.call(this,gu,t))}remove(){var t;this.L.cookielessTrackingEnabled?this.hv.removeItem(gu):(this.Mp.delete(gu),null===(t=this.mv)||void 0===t||t.call(this,gu))}static isValidCustomVarString(t){return"string"==typeof t}}const yu=["visit",2],Eu=["page",3],Au=["nextPageOnly",4];class _u{constructor(t,s){this.D=t,this.Xp=s,this.tg={},this.sg={}}set(t,s,e,i){let n,r;if(t>0&&_t(s)&&_t(e)&&!Rt(s)&&!Rt(e)){const o=this.D.anonymizePII(csString(s)),h=this.D.anonymizePII(csString(e));if(n=[csString.prototype.slice.call(o,0,512),csString.prototype.slice.call(h,0,255)],r=""!==e,!At(i)||csArray.prototype.indexOf.call(yu,i)>=0){const s=this.getCustomVariablesSession();r?s[t]=n:delete s[t],this.setCustomVariableSession(s)}(!At(i)||csArray.prototype.indexOf.call(Eu,i)>=0)&&(r?this.tg[t]=n:delete this.tg[t]),At(i)&&csArray.prototype.indexOf.call(Au,i)>=0&&(r?this.sg[t]=n:delete this.sg[t])}}getCustomVariablesSession(){const t=this.Xp.get();if(!t)return{};const s=window.csJSON.parse(t);return null!==s&&Et(s)?s:{}}setCustomVariableSession(t){this.Xp.set(window.csJSON.stringify(t))}removeCustomVariablesSession(){this.Xp.remove()}removeCustomVariablesPage(){this.tg={}}getRequestParameters(){const t=this.getCustomVariablesSession();for(const t in this.sg)this.sg.hasOwnProperty(t)&&(this.tg[t]=this.sg[t]);for(const s in this.tg)this.tg.hasOwnProperty(s)&&(t[s]=this.tg[s]);if(window.csJSON.stringify(t).length<=2)return{};const s={cvars:this.eg(t)};return this.tg&&window.csJSON.stringify(this.tg).length>2&&(s.cvarp=this.eg(this.tg)),s}deleteNextPageOnlyCustomVariables(){if(Object.keys(this.sg).length>0)for(const t in this.sg)this.sg[t]===this.tg[t]&&(delete this.tg[t],delete this.sg[t])}ig(t){for(const n in t)if(t.hasOwnProperty(n)){const r=parseInt(n,10),o=t[n],h=o[0],c=o[1];e=1,i=20,(!(wt(s=r)&&s>=e&&s<=i)||h.length>512||c.length>255)&&delete t[n]}var s,e,i}eg(t){this.ig(t);const s=function(t){let s;for(s in t)return!1;return!0}(t)?[]:t;return window.csJSON.stringify(s)}getAllValidCustomVars(){const t=this.getCustomVariablesSession();for(const t in this.sg)this.sg.hasOwnProperty(t)&&(this.tg[t]=this.sg[t]);for(const s in this.tg)this.tg.hasOwnProperty(s)&&(t[s]=this.tg[s]);return this.ig(t),t}}const Ru=["setCustomVariable"];class Su{constructor(t,s){this.Nc=t,this.ds=s}init(){this.Nc.register(Ru,((t,s,e,i)=>{this.ds.set(t,s,e,i)}))}onAfterArtificialPageView(){this.ds.deleteNextPageOnlyCustomVariables()}onAfterNaturalPageView(){this.ds.deleteNextPageOnlyCustomVariables()}onOptout(){this.ds.removeCustomVariablesSession()}onBeforeVisitorRenewal(){this.ds.removeCustomVariablesSession(),this.ds.removeCustomVariablesPage()}}const Tu="_cs_id",Iu=/^(([a-z0-9\-])+(\.[0-9]+){6})(\.(None|Lax|X)\.(0|1))?(\.[0-1])?$/;class Pu{constructor(t,s,e){this.L=t,this.Mp=s,this.hv=e}onCookieToSet(t){this.vv=t}onCookieToRemove(t){this.mv=t}get(){let t;return t=this.L.cookielessTrackingEnabled?this.hv.getItem(Tu):this.Mp.get(Tu),t?Pu.fromString(t):null}set(t){var s;const e=Pu.toString(t);if(this.L.cookielessTrackingEnabled)this.hv.setItem(Tu,e);else{const i=new csDate(t.expires);this.Mp.set(Tu,e,i),null===(s=this.vv)||void 0===s||s.call(this,Tu,e,i)}}remove(){var t;this.L.cookielessTrackingEnabled?this.hv.removeItem(Tu):(this.Mp.delete(Tu),null===(t=this.mv)||void 0===t||t.call(this,Tu))}handleSubdomainChange(){if(this.L.cookielessTrackingEnabled)return;const t=this.get();t&&(t.allowSubdomains=this.L.allowSubdomains,this.L.allowSubdomains?this.Mp.delete(Tu,Rs.CURRENT_DOMAIN):this.Mp.delete(Tu,this.Mp.getRootDomain()),this.set(t))}static fromString(t){const[s,e,i,n,r,o,h,c]=csString.prototype.split.call(t,".");return{id:s,creationTimestamp:Number(e),visitsCount:Number(i),hitTimestamp:Number(n),lastVisitTimestamp:Number(r),appliedTrackingDraw:Number(o),expires:Number(h),allowSubdomains:void 0===c?void 0:!!Number(c)}}static toString(t){return csArray.prototype.join.call([t.id,t.creationTimestamp,t.visitsCount,t.hitTimestamp,t.lastVisitTimestamp,t.appliedTrackingDraw,t.expires,t.allowSubdomains?1:0],".")}static isValidVisitorString(t){return Iu.test(t)}}class bu{constructor(t){this.D=t}getUrlMaskingPattern(t){const s=[],e=csString.prototype.split.call(t,"/");for(const t of e)j(t,bu.ng)?csArray.prototype.push.call(s,{key:t,value:`CS_ANONYMIZED_${csString.prototype.toUpperCase.call(csString.prototype.slice.call(t,1))}`}):csArray.prototype.push.call(s,{key:t,value:null});return s}anonymizeUrl(t,s){let e=this.D.anonymizePII(t);return e=this.D.anonymizeJwt(e),s.length>0?this.rg(e,s):e}removeQueryString(t){const{path:s,queryString:e}=this.og(t);return""!==e?`${s}?`:s}og(t){const s=csString.prototype.indexOf.call(t,"?");let e="",i="";return-1!==s?(e=csString.prototype.slice.call(t,0,s),i=csString.prototype.slice.call(t,s,t.length)):e=t,{path:e,queryString:i}}rg(t,s){const{path:e,queryString:i}=this.og(t),n=csString.prototype.split.call(e,"/");for(const t of s){const s=this.hg(n,t);if(null!==s)return`${s}${i}`}return t}hg(t,s){if(t.length<s.length)return null;let e="";for(let i=0;i<t.length;i+=1)if(i>=s.length)e+=`${t[i]}/`;else if(j(s[i].key,bu.ng))e+=`${s[i].value}/`;else{if(t[i]!==s[i].key)return null;e+=`${t[i]}/`}return csString.prototype.slice.call(e,0,-1)}}bu.ng=":";class Vu{constructor(t,s){this.La=t,this.L=s}getEventTargetPath(t){const s=ve(t);return this.La.getElementPath(s,{dynamicIdRegex:this.L.dynamicIdRegex,...this.L.pathComputationRules})}getEventTargetPathAndTargetLink(t){const s=ve(t),{path:e,firstAnchorParent:i}=this.La.getElementPathAndFirstAnchorParent(s,{dynamicIdRegex:this.L.dynamicIdRegex,...this.L.pathComputationRules});return{path:e,targetLink:this.cg(i)?i.href:""}}hasValidEventTarget(t){const s=ve(t);return this.La.isValidElement(s)}getElementPath(t){return this.La.getElementPath(t,{dynamicIdRegex:this.L.dynamicIdRegex,...this.L.pathComputationRules})}cg(t){var s;return null!==t&&t.hasAttribute("href")&&!j(null!==(s=t.getAttribute("href"))&&void 0!==s?s:"","#")}}class Cu{constructor(t){this.yu=t}transformEvent(t,s){this.ag(t,s.event);const e=this.yu.getElementPath(t);return this.ug(e,s.event),s}ag(t,s){if(function(t){return void 0!==t.x&&void 0!==t.y}(s)){const e=t.getBoundingClientRect();s.x=Math.round(e.left+s.x+Mi.windowOffsetX()),s.y=Math.round(e.top+s.y+Mi.windowOffsetY())}}ug(t,s){yo(s)&&(s.tgt=`${t}${ou}${s.tgt}`),function(t){return void 0!==t.tgtHM}(s)&&(s.tgtHM=`${t}${ou}${s.tgtHM}`),function(t){return void 0!==t.tgtLk}(s)&&(s.tgtLk=`${t}${ou}${s.tgtLk}`)}}class Nu{constructor(t){this.yu=t}transformEvent(t,s){const e=this.yu.getElementPath(t);return{iframePath:s.iframePath?`${e}${ou}${s.iframePath}`:e,commands:s.commands}}}class Ou{constructor(t){this.yu=t}transformEvent(t,s){if(0===s.products.length)return s;const e=this.yu.getElementPath(t),i=csArray.prototype.map.call(s.products,(t=>({...t,targetPath:`${e}${ou}${t.targetPath}`})));return{...s,products:i}}}class ku{constructor(){this.lg={clientX:2,clientY:3},this.dg={clientX:1,clientY:2},this.fg=[ae.POINTER_DOWN,ae.POINTER_MOVE,ae.POINTER_UP],this.pg=[ae.TOUCH_START,ae.TOUCH_MOVE,ae.TOUCH_END]}transformEvents(t,s){if(!qi.isConnected(t))return s.events=csArray.prototype.filter.call(s.events,(t=>t.type!==ae.VISIBILITY_CHANGE)),0===s.events.length||(ss.warn(`IframeRecordingEventsTransformer received event ${Qt.RecordingEvent}\n from disconnected iframe, content:${csJSON.stringify(s.events)}`),s.events=[]),s;const e=Re(t);let i=null;csArray.prototype.some.call(s.events,(t=>this.vg(t)||this.mg(t)))&&(i=t.getBoundingClientRect());for(const t of s.events)this.vg(t)?this.gg(i,t):this.mg(t)&&this.wg(i,t),t.context=t.context&&t.context.length>0?`${e}/${t.context}`:`${e}`;return s}wg(t,s){this.yg(this.dg,t,s)}gg(t,s){this.yg(this.lg,t,s)}yg(t,s,e){e.args&&(e.args[t.clientX]=Math.round(s.left+e.args[t.clientX]),e.args[t.clientY]=Math.round(s.top+e.args[t.clientY]))}vg(t){return-1!==csArray.prototype.indexOf.call(this.fg,t.type)}mg(t){return-1!==csArray.prototype.indexOf.call(this.pg,t.type)}}class xu{constructor(t){this.Eg=t}start(){this.Eg.onEvent((t=>this.yn(t))),this.Eg.start()}stop(){this.Eg.stop()}yn(t){const s=`Content Security Policy error. Violated directive: ${t.violatedDirective} - Source file: ${t.sourceFile}`;ss.warn(s)}}class $u{constructor(){this.vo={boundElement:document,type:"securitypolicyviolation",listener:t=>this.securityPolicyViolationListener(t)}}start(){re(this.vo)}stop(){oe(this.vo)}onEvent(t){this.zn=t}Ag(t){if(!t)return!1;const s=t.disposition;return yt(t.sourceFile)&&csArray.prototype.some.call($u._g,(s=>csString.prototype.indexOf.call(t.sourceFile,s)>0))&&"report"!==s}securityPolicyViolationListener(t){this.Ag(t)&&this.zn({violatedDirective:t.violatedDirective,sourceFile:t.sourceFile})}}$u._g=["contentsquare","cdnssl.clicktale.net"],ws([is("Event handler type: securitypolicyviolation")],$u.prototype,"securityPolicyViolationListener",null);class Lu{init(){this.Rg=new xu(new $u),this.Rg.start()}onOptout(){this.Rg.stop()}}class Du{constructor(t,s,e,i){this.L=t,this.nt=s,this.M=e,this.Dp=i}init(){let t,s,e,i,n,r,o,h,c,a,u,l,d,f,p,v,m,g,w,y,E,A,_,R,S,T,I,P,b,V,C,N,O;hc.isSupported()&&hc.setDigestSalt(this.L.projectId.toString()),this.Dp.schedule((()=>{t=new Ea(this.Dp),s=new pt,e=new bu(s),n=new iu(window.location,e),i=new Rs(this.L,n,this.nt),i.init()})),this.Dp.schedule((()=>{r=new vu,o=new mu,g=new Ha(window.location,i);(new Lu).init(),w=pu.create(ss.warn),m=new qs(w);const s=m.create(`${this.L.getQuotaServiceUri()}/quota`,!0);a=new ru(this.L,s,t,g,n),a.init()})),this.Dp.schedule((()=>{h=new pa(this.L,i,r),c=new ma(h,a)})),this.Dp.schedule((()=>{u=new Pu(this.L,i,r),l=new ca(this.L,u,c,t),this.M.setContext(l,c),a.setVisitorService(l)})),this.Dp.schedule((()=>{O=new Ca(this.L,new Ra(this.L,i,o),t),d=new wa(l,c,O),f=new $a(this.L,i,r),p=new La(window.location,f),v=new Da(p),y=new ga(this.L,l,p),C=new Vu(q,this.L),T=new Cu(C),I=new Nu(C),P=new Ou(C),b=new ku,V=new hu(T,I,P,b),S=new Ka([Qa.UXA]),E=new Ja(S,V),A=new Ua(n),_=new qa(A,S);const e=new wu(this.L,i,r);N=new _u(s,e),R=new Su(S,N);new Bs(l,c,p,N,this.L)})),this.Dp.schedule((()=>{new oa(this.L,l,p,y,d,undefined,undefined,g).compute((r=>{this.Dp.schedule((()=>{E.init();const h=new nu,a=new Va(this.L,S,O,c,t),u=new za(this.L,i,o),d=new Ga(t,window.location,u),f=new Wa(S,d),p=new tu(S,this.L);const g=new Xa(this.L,l,c,undefined);if(r){t.emitInitTracking();new ra(g,w,l,c,t,S,E,this.L,f,d,a,O,s,C,e,n,p,h,V,N,R,A,_,this.Dp,m,i,o).start()}else{new Na(t,S,E,f,d,v,a).start()}}))}))}))}}var Mu,Uu;!function(t){let s;const e={loadBundle(t){const r=t.source,o=t.data;if(i(o)){const i=()=>{const s=function(t,s){return csString.prototype.replace.call(csString.prototype.replace.call(csString.prototype.replace.call(t,"{version}",s.version),"{token}",s.token),"{domain}",s.domain)}("{domain}/tag/tag.bundle.js?v={version}",o);!function(t,s){const e=document.createElement("script");e.type="text/javascript",e.async=!0,e.src=t,e.onload=s,e.charset="utf-8",document.head.appendChild(e)}(s,(()=>r.postMessage("csBundleLoaded",t.origin)))};s=o.token,c(e.loadBundle),n(t.origin)&&i()}}};function i(t){return t&&"csBundleInjection"===t.type&&n(t.domain)&&o(t.version)&&r(t.token)}function n(s){return/^https?:\/\/[a-zA-Z0-9\.\-]+\.(content-square\.fr|contentsquare\.com|csq\.io)$/.test(s)||t.hjDomainRegex.test(s)}function r(t){return/^[a-zA-Z0-9]+$/.test(t)}function o(t){return/^[a-zA-Z0-9\.]+$/.test(t)}function h(t){window.addEventListener("message",t,!1)}function c(t){window.removeEventListener("message",t,!1)}t.getToken=function(){return s},t.isAuthorizedIncomingMessage=i,t.hjDomainRegex=/^https?:\/\/[a-zA-Z0-9\.\-]+\.hotjar\.com$/,t.isAuthorizedDomain=n,t.isAuthorizedToken=r,t.isAuthorizedTagVersion=o,t.isActivable=function(){const t=window.opener||window.parent;return window!==t&&window.addEventListener},t.waitForBundleInjection=function(){h(e.loadBundle)},t.listen=h,t.removeListener=c}(Mu||(Mu={})),function(t){const s=window.opener||window.parent,e=[/^https:\/\/app\.contentsquare\.com$/,/^https:\/\/dev-app\.contentsquare\.com$/,/^https:\/\/staging-app\.contentsquare\.com$/,/^https:\/\/.*\.test\.contentsquare\.com$/,/^https:\/\/app\.[a-z0-9-]+\.csiab\.[a-z0-9-]+\.csq\.io$/,Mu.hjDomainRegex];let i,n;const r={ping(t){if("ping"===t.data&&o(t.origin)){const s=Mu.hjDomainRegex.test(t.origin);i=s?"https://app.contentsquare.com":t.origin,n=s?t.origin:void 0,a(r.ping),c(r.insertMessageScript),h(`${"utils.js"}?cb=${(new csDate).getTime()}`)}},insertMessageScript:u((t=>{const s=t.data;"string"==typeof s&&"ping"!==s&&(a(r.insertMessageScript),h(s))}))};function o(t){return csArray.prototype.some.call(e,(s=>s.test(t)))}function h(t,s){const e=document.createElement("script");e.type="text/javascript",e.async=!0;const n=csString.prototype.replace.call(i,/^https?:/,"");e.src=`${n}/tag/${t}`,e.onload=s,e.charset="utf-8",document.getElementsByTagName("head")[0].appendChild(e),function(t){csString.prototype.includes.call(t,"&mode=")&&sessionStorage.setItem("_hjRetakerMode",csString.prototype.split.call(t,"&mode=")[1])}(t)}function c(t){window.addEventListener("message",t,!1)}function a(t){window.removeEventListener("message",t,!1)}function u(t){return function(s){(s.origin===i||n)&&t(s)}}t.getToken=function(){return Mu.getToken()},t.isActivable=function(){return window!==s&&window.addEventListener},t.isAuthorizedDomain=o,t.waitForConnection=function(){c(r.ping),Mu.waitForBundleInjection()},t.listen=c,t.removeListener=a,t.secureListener=u,t.post=function(t){n?s.postMessage(t,n):i&&s.postMessage(t,i)}}(Uu||(Uu={}));const Fu=window.CSFrameCommunication||Uu;class qu{constructor(t,s=30,e=0){this.Sg=t,this.Tg=s,this.Ig=e,this.Pg=new hs,this.K=!1,this.bg=0,this.Vg=()=>{for(this.bg=0;this.Pg.length;){if(this.bg>=this.Tg)return void csSetTimeout(this.Vg,this.Ig);const t=It.now(),s=this.Pg.pop();if(!s)break;this.runTask(s);const e=It.now()-t;this.bg+=e}this.K=!1}}schedule(t,s=!1){this.Sg&&!s?(si.general.pendingTasks.increase(),this.Pg.push(t),this.Cg()):t()}Cg(){this.K||(this.K=!0,csSetTimeout((()=>{this.Vg()})))}runTask(t){si.general.pendingTasks.decrease(),t()}runPendingTasks(){this.Pg.forEach((t=>{this.runTask(t)})),this.Pg.clear()}clearQueue(){si.general.pendingTasks.clear(),si.mutations.pendingMutations.clear(),this.Pg.clear()}isEmpty(){return 0===this.Pg.length}}ws([is("TaskScheduler"),gs("runTask")],qu.prototype,"runTask",null),ws([gs("runPendingTasks")],qu.prototype,"runPendingTasks",null);class Bu{constructor(t,s,e){this.L=t,this.At=s,this.M=e}start(){var t,s,e,i,n;if(window.UXAnalytics)return;window.UXAnalytics={},window.CSCurrentScript=document.currentScript;const r=new qu(!!(null===(t=this.L.taskSchedulerOptions)||void 0===t?void 0:t.enabled),null===(s=this.L.taskSchedulerOptions)||void 0===s?void 0:s.maxProcessingTime,null===(e=this.L.taskSchedulerOptions)||void 0===e?void 0:e.waitDuration),o=new Ts(this.At,this.L);o.init();const h=new Is(this.L,o);if(this.At.isTopWindowTracker()&&h.canTrack()){if((null===(i=window.CSProtectnativeFunctionsLogs)||void 0===i?void 0:i.Warning)&&ss.warn(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Warning}`),null===(n=window.CSProtectnativeFunctionsLogs)||void 0===n?void 0:n.Critical)return void ss.error(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Critical}`);new Du(this.L,o,this.M,r).init()}else 0;window.UXAnalytics={Sensitive:{isNodeSensitive:t=>Ne.isSensitive(t)||Ne.isSensitiveChild(t),isAttributeSensitive:(t,s)=>Ne.isSensitiveAttribute(t,s),getSensitiveAttributes:t=>Ds(t.attributes,(s=>Ne.isSensitiveAttribute(t,s.name)))}},!window.CSFrameCommunication&&Fu.isActivable()&&(window.CSFrameCommunication=Fu,Fu.waitForConnection())}}ws([gs("main.start"),is("main.start")],Bu.prototype,"start",null);var Hu;!function(t){t.isCSJavascriptBridgeDefined=function(){return"object"==typeof window.CSJavascriptBridge&&"function"==typeof window.CSJavascriptBridge.optIn&&"function"==typeof window.CSJavascriptBridge.optOut&&"function"==typeof window.CSJavascriptBridge.sendEvent&&"function"==typeof window.CSJavascriptBridge.sendDynamicVar&&"function"==typeof window.CSJavascriptBridge.sendTransaction},t.getBridgeVersion=function(){if("function"==typeof window.CSJavascriptBridge.getVersion)try{const t=window.CSJavascriptBridge.getVersion();if(gt(t))return t}catch(t){ss.warn("an error occurred when calling getVersion")}return null},t.notifyIsReadyForTracking=function(){"function"==typeof window.CSJavascriptBridge.onWebviewTrackingReady&&window.CSJavascriptBridge.onWebviewTrackingReady()},t.sendAnalysisEvent=function(t){window.CSJavascriptBridge.sendEvent(csJSON.stringify(t))},t.sendSREvent=function(t){if(window.CSJavascriptBridge.sendSREvent)for(const s of t.events)window.CSJavascriptBridge.sendSREvent(csJSON.stringify(s))},t.sendLog=function(t){window.CSJavascriptBridge&&window.CSJavascriptBridge.sendLog&&window.CSJavascriptBridge.sendLog(csJSON.stringify(t))},t.sendOptIn=function(){window.CSJavascriptBridge.optIn()},t.sendOptOut=function(){window.CSJavascriptBridge.optOut()},t.sendDynamicVariable=function(t,s){window.CSJavascriptBridge.sendDynamicVar(t,s)},t.sendTransaction=function(t,s,e){window.CSJavascriptBridge.sendTransaction(t,s,e)},t.sendAssets=function(t,s){if(window.CSJavascriptBridge.sendAssets){const e=csJSON.stringify(t);window.CSJavascriptBridge.sendAssets(e,s||null)}else window.CSJavascriptBridge.sendSRAssets&&window.CSJavascriptBridge.sendSRAssets(csArray.prototype.map.call(t,(t=>t.assetId)))},t.sendNativeSREvent=function(t){window.CSJavascriptBridge&&window.CSJavascriptBridge.sendNativeSREvent&&window.CSJavascriptBridge.sendNativeSREvent(csJSON.stringify(t))}}(Hu||(Hu={}));class ju{constructor(){}send(t,s,e=Y.warn){const i={message:t,errorCode:s,level:e};Hu.sendLog(i)}}try{const t=new J(window.CS_CONF);window._uxa=window._uxa||[],t.processOptionOverrides(window._uxa);const s=new Q(window,t);s.init();const e=new Xt;if(es=ss,rs=!0,ss.computeIsActive(t.validationRate),s.isTopWindowTracker()){const s=new Dt(t,e);ss.setStrategy(s)}else if(s.isInIframeContext()){const s=new Kt(t);ss.setStrategy(s)}else if(s.isInWebViewContext()){const t=new ju;ss.setStrategy(t)}!function(t=50,s=.1){us=es.isPerfLoggingActive()&&function(){var t;if(!(null===(t=window.performance)||void 0===t?void 0:t.mark))return!1;const s="isPerformanceMeasureSupported",e=`${s}_a`;return performance.mark(e),void 0!==performance.measure(s,e)}(),us&&(cs=t,as=s)}();new Bu(t,s,e).start()}catch{}})();