!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0ebe40f8-c8ed-5b25-aeff-d6d14370b353")}catch(e){}}(); (()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})}};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),t.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),t.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var e={};function s(t,e){let s;return window.Zone&&"function"==typeof window.Zone.__symbol__&&(s=t[window.Zone.__symbol__(e)]),s||(s=t[e]),s}t.r(e),t.d(e,{getRequestParameters:()=>Ca});const i="undefined"==typeof window;const n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==t.g?t.g:"undefined"!=typeof process?process:Function("return this")();const r="cs-native-frame",o={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",RegExp:"csRegExp"}};function h(t,e,s){const i=function(t,e){let s,i=t;for(;i&&!(s=Object.getOwnPropertyDescriptor(i,e));)i=Object.getPrototypeOf(i);return s}(t,e);if(!i)return function(){return this[e]};switch(s){case"get":return i.get;case"set":return i.set;case"value":return i.value}}function a(t){var e,i;Object.keys(o.constructors).forEach((e=>{window[o.constructors[e]]=t[e]instanceof Function&&null==t[e].prototype?t[e].bind(window):t[e]})),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=null!==(i=null!==(e=s(window,"MutationObserver"))&&void 0!==e?e:window.WebKitMutationObserver)&&void 0!==i?i:window.MutationObserver),c("csNode",o.nodeProperties,t.Node.prototype,"get"),c("csElement",o.elementProperties,t.Element.prototype,"get"),c("csElement",o.elementPropertiesValues,t.Element.prototype,"value",!1),c("csHTMLImageElement",o.imageProperties,t.HTMLImageElement.prototype,"set"),c("csEvent",o.eventProperties,t.Event.prototype,"get"),c("csNavigator",o.navigatorProperties,t.navigator,"value")}function c(t,e,s,i,n=!0){e.forEach((e=>{const r="string"!=typeof e&&"binding"in e,o=r?e.propertyName:e;(n||o in s)&&(window[`${t+o}`]=h(s,o,i),r&&(window[`${t+o}`]=window[`${t+o}`].bind(e.binding)))}))}function u(t,e){window.CSProtectnativeFunctionsLogs=window.CSProtectnativeFunctionsLogs||{},window.CSProtectnativeFunctionsLogs[t]=e}if(window.csSetTimeout=s(window,"setTimeout"),window.csQueueMicrotask=s(window,"queueMicrotask"),window.csClearTimeout=s(window,"clearTimeout"),window.csSetInterval=s(window,"setInterval"),window.csClearInterval=s(window,"clearInterval"),window.csFileReader=s(window,"FileReader"),(()=>{var t;let e=0;function s(t){return"cs$Symbol_"+t}function i(t){return s(t)+ ++e}i.for=s,window.csSymbol=null!==(t=window.Symbol)&&void 0!==t?t:i})(),!function(){try{const t=function(){const t=document.createElement("iframe");t.id=r,t.setAttribute("hidden",""),t.setAttribute("title","Intentionally blank"),t.setAttribute("sandbox","allow-same-origin");const e=document.createElement("cs-native-frame-holder");if(e.setAttribute("hidden",""),document.body.appendChild(e),Boolean(Element.prototype.attachShadow)){const s=e.attachShadow({mode:"closed"});return s.innerHTML=t.outerHTML,s.firstElementChild.contentWindow}return e.innerHTML=t.outerHTML,e.firstElementChild.contentWindow}();return!!t&&(window.CSPureWindow=t,a(window.CSPureWindow),!0)}catch(t){return u("Warning",`failed to copy references from pure iframe: ${t.message}`),!1}}())try{a(n)}catch(wh){u("Critical",`failed to copy references from window: ${wh.message}`)}function l(t){return d(csString.prototype.toLowerCase.call(t.localName))}function d(t){return csString.prototype.replace.call(t,/([#;&,.+*~':"!^$[\]()<=>|/%?@`{}\\ ])/g,"\\$1")}function f(t){return w(t)&&("number"==typeof t||t instanceof Number)&&!isNaN(t)}function v(t){return t===parseInt(t,10)}function g(t){return w(t)&&("string"==typeof t||t instanceof csString)}function m(t){return"boolean"==typeof t}function p(t){return"object"==typeof t}function w(t){return void 0!==t}function y(t){return w(t)&&null!==t}function E(t){return"object"==typeof t&&null!==t}function A(t){return"function"==typeof t}function _(t){return t instanceof Element}function S(t){return t instanceof Error}function R(t){const e=t.length;for(let s=0;sW.call(t,e)))}const Y=[/\d{4}/,/^ember\d+$/],Q="data-cs-override-id",K="data-cs-dynamic-id";function X(t,e,s,i){const n=i.dynamicIdRegex||null,r=i.dynamicElementNameRegex;let o=l(t);if(r){r.test(t.localName)&&(o=csString.prototype.replace.call(o,r,"$1@"))}if(function(t,e){const s=tt(t);return s&&csString.prototype.match.call(s,/^[\w-]+$/)&&et(Q,s,e)}(t,s)){const e=tt(t);return{hasUniqueIdentifier:!0,elementSelector:`${o}[${Q}="${e}"]`}}const h=function(t,e,s){if(!s.uniqueAttributes)return{success:!1};for(const i of s.uniqueAttributes){const s=t.getAttribute(i);if(null!==s){if(et(i,s,e))return{attributeName:i,attributeValue:s,success:!0}}}return{success:!1}}(t,s,i);if(h.success)return{hasUniqueIdentifier:!0,elementSelector:`${o}#UA[${h.attributeName}="${h.attributeValue}"]`};const a=function(t,e,s){if(!s.uniqueCssSelectors)return;for(const i of s.uniqueCssSelectors)if(W.call(t,i)&&st(i,e))return i;return}(t,s,i);if(a)return{hasUniqueIdentifier:!0,elementSelector:`${o}#UCS[${a}]`};const c=function(t){const e=t.getAttribute("id");return e?d(e):e}(t);if(function(t,e,s,i){return e&&!function(t){return null!==tt(t)}(t)&&!function(t,e,s){return t.hasAttribute(K)||function(t,e){let s=!1;t&&e&&(s=e.test(t));return t&&(csArray.prototype.some.call(Y,(e=>e.test(t)))||s)}(e,s)}(t,e,i)&&function(t,e){return t&&et("id",t,e)}(e,s)}(t,c,s,n))return{hasUniqueIdentifier:!0,elementSelector:`${o}#${c}`};const u=function(t,e){if(!e.reliableSelectors)return;for(const s of e.reliableSelectors)if(W.call(t,s))return s;return}(t,i);if(u){const s=function(t,e,s){if(t===F||9===t.nodeType)return 0;let i=0,n=e.previousElementSibling;for(;n;)W.call(n,s)&&(i+=1),n=n.previousElementSibling;return i}(e,t,u);return{hasUniqueIdentifier:!1,elementSelector:`${o}[${u}](${s})`}}const f=function(t,e,s){if(t===F||9===t.nodeType)return 0;const i=s.dynamicElementNameRegex,n=!!(null==i?void 0:i.test(e.localName)),r=l(e);let o=0,h=e.previousElementSibling;for(;h;)(l(h)===r||n&&(null==i?void 0:i.test(h.localName)))&&!J(h,s.reliableSelectors)&&(o+=1),h=h.previousElementSibling;return o}(e,t,i);return{hasUniqueIdentifier:!1,elementSelector:`${o}:eq(${f})`}}function tt(t){return t.getAttribute(Q)}function et(t,e,s){try{return 1===window.csquerySelectorAll[s.nodeType].call(s,`[${t}="${e}"]`).length}catch(t){if("SyntaxError"!==t.name)throw t}return!1}function st(t,e){try{return 1===window.csquerySelectorAll[e.nodeType].call(e,t).length}catch(t){if("SyntaxError"!==t.name)throw t}return!1}function it(t,e,s){const i=csArray.prototype.shift.call(t);if(0===t.length)return nt(i,s);const n=i,r=t[0],{elementSelector:o,hasUniqueIdentifier:h}=X(n,r,e,s);if(!s.fullPath&&h){return`${nt(t[t.length-1],s)}${o}`}const a=it(t,e,s);return`${a?`${a}>`:""}${o}`}function nt(t,e){if(t===F)return"|detached|";if(t.host){const{ancestors:s,selectionRoot:i}=H(t.host);return`${it(s,i,e)}|shadow-root|`}return 11===t.nodeType?"|fragment|":""}class rt{constructor(t){this.options=t,this.done=!1,this.path=null}getPath(){if(null===this.path)throw new Error("getPath was called before serializeElement");return this.path}isDone(){return this.done}}class ot extends rt{constructor(){super(...arguments),this.i=!1,this.h=!1,this.u=!1}A(t,e){return this.i&&!(null===e&&B(t))&&!(11===t.nodeType)&&!t.host}S(t){return!t.localName}serializeElement(t,e,s){var i;if(null!==(i=this.path)&&void 0!==i||(this.path=""),this.A(t,e))return;let n=!1;null===e&&B(t)&&(n=!0,this.done=!0);const r=this.h&&!this.options.fullPath?"":">",o=!!t.host;if(o&&this.path&&(this.path="|shadow-root|"+r+this.path,this.u=!0,this.i=!1,this.h=!1),!o&&null===e&&11===t.nodeType)return this.path="|fragment|"+r+this.path,void(this.done=!0);if(this.S(t))return;const h=null!=e?e:"detached",{elementSelector:a,hasUniqueIdentifier:c}=X(t,h,s,this.options);c&&(this.h=!0,this.i=!this.options.fullPath);const u=`${n?`|detached|${r}`:""}${this.i&&!c?"":a}`,l=!c&&this.h&&!this.options.fullPath?"":this.path&&!this.u?">":"";this.u=!1,this.path=`${u}${l}${this.path}`}}var ht,at;function ct(t,e=dt.SHOW_ALL){const s=e|dt.SHOW_ELEMENT,i=[document.createTreeWalker(t,s,null,!1)];let n=ut(t);n&&csArray.prototype.push.call(i,document.createTreeWalker(n,s,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=ut(t);if(e&dt.SHOW_DOCUMENT_FRAGMENT&&n&&(r=n),n&&csArray.prototype.push.call(i,document.createTreeWalker(n,s,null,!1)),ft[t.nodeType]&e)return t}return null},visitAll(s){ft[t.nodeType]&e&&s(t);let i=this.nextNode();for(;i;)ft[i.nodeType]&e?(s(i),i=this.nextNode()):i=this.nextNode()},collectAll(t){const e=[];return this.visitAll((s=>csArray.prototype.push.call(e,t?t(s):s))),e}}}function ut(t){return t&&D(t)?t.shadowRoot:null}const lt=null!==(ht=n.Node)&&void 0!==ht?ht:{},dt=null!==(at=n.NodeFilter)&&void 0!==at?at:{},ft={2:dt.SHOW_ATTRIBUTE,4:dt.SHOW_CDATA_SECTION,8:dt.SHOW_COMMENT,11:dt.SHOW_DOCUMENT_FRAGMENT,9:dt.SHOW_DOCUMENT,10:dt.SHOW_DOCUMENT_TYPE,1:dt.SHOW_ELEMENT,[lt.ENTITY_NODE]:dt.SHOW_ENTITY,[lt.ENTITY_REFERENCE_NODE]:dt.SHOW_ENTITY_REFERENCE,[lt.NOTATION_NODE]:dt.SHOW_NOTATION,7:dt.SHOW_PROCESSING_INSTRUCTION,3:dt.SHOW_TEXT};let vt={debug(...t){},warn(...t){},implementation(...t){},error(...t){},critical(...t){},isPerfLoggingActive:()=>!1};const gt=t=>(e,s,i)=>{const n=(null==s?void 0:s.toString())||"",r=t||`${e.constructor&&e.constructor.name}.${n}`;if(i){const t=i.value;i.value=function(...e){return mt(r,t.bind(this))(...e)}}};function mt(t,e){return(...s)=>{try{const i=e(...s);return w(window.Promise)&&i instanceof window.Promise?i.then((t=>t),(e=>vt.error(S(e)?e:new Error(e),t))):i}catch(e){try{vt.error(S(e)?e:new Error(e),t)}catch{}}}}class pt{constructor(){this.R=0}get length(){return this.R}get isEmpty(){return!this.T}pushAll(t){for(let e=0;e=yt&&csArray.prototype.push.call(Rt,{mName:t,mDuration:+s.toFixed(2)}),csArray.prototype.pop.call(St),0===St.length&&(s>wt&&At.push(Rt),Rt=[])}function It(t,e){return function(...s){if(!Et)return t.apply(this,s);bt(e);const i=t.apply(this,s);return Tt(e),i}}const Pt=function(t){return function(e,s,i){const n=i.value;i.value=function(){if(!Et)return i.value=n,n.apply(this,arguments);bt(t);const e=n.apply(this,arguments);return Tt(t),e}}};var Vt,Ct,jt;function kt(t){var e;const s=null!==(e=t.length)&&void 0!==e?e:0,i=new csArray(s);for(let e=0;ecsArray.prototype.push.call(s,t))),s}function xt(t,e){if(t.length>=0){const s=t.length;for(let i=0;icsArray.prototype.push.call(s,e?[i,t]:t))),s}!function(t){t.isSupported=function(){return!!Element.prototype.attachShadow},t.getShadowRoot=function(t){return t&&D(t)?t.shadowRoot:null},t.getAllShadowHosts=It((function(t){return ct(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).collectAll((t=>t.host))}),"getAllShadowHosts")}(Vt||(Vt={})),function(t){function e(){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 s(){return document.documentElement.scrollWidth}function i(){return window.innerHeight}function n(){return window.innerWidth}function r(){const t=window.csScreen.width;return v(t)&&t>0?t:window.screen.width}function o(){const t=window.csScreen.height;return v(t)&&t>0?t:window.screen.height}t.documentHeight=e,t.documentWidth=s,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:`${s()}`,dh:`${e()}`,ww:`${n()}`,wh:`${i()}`,sw:`${r()}`,sh:`${o()}`}}}(Ct||(Ct={}));const Ht=null!==(jt=n.Node)&&void 0!==jt?jt:Object;var Bt,zt;!function(t){const e="isConnected"in Ht.prototype?t=>t.isConnected:t=>!(t.ownerDocument&&t.ownerDocument.compareDocumentPosition(t)&t.DOCUMENT_POSITION_DISCONNECTED);t.forEachChild=function(t,e){for(let s=t;s;s=csNodenextSibling.apply(s))e(t)},t.isConnected=function(t){return e(t)},t.getAncestors=function(t,e){const s=[];for(const n of i(t,e))csArray.prototype.push.call(s,n);return s};const s=(t,e)=>{var s;return null!==(s=csNodeparentNode.apply(t))&&void 0!==s?s:e&&L(t)?t.host:null};function*i(t,e=!1){let i=t;for(;i;){yield i;const t=s(i,e);if(!t||t===i)break;i=t}}function n(e){var s;return e.parentElement?e.parentElement:t.getRootNode(e)?null===(s=t.getRootNode(e))||void 0===s?void 0:s.host:null}function r(t){var e,s;if(!1===(null===(e=t.checkVisibility)||void 0===e?void 0:e.call(t,{checkOpacity:!0,checkVisibilityCSS:!0})))return!0;if(!t.offsetParent){if(!t.getBoundingClientRect)return vt.warn(`SUP-11432: Element doesn't have getBoundingClientRect. Node: ${t instanceof Ht} Ctor: ${null===(s=null==t?void 0:t.constructor)||void 0===s?void 0:s.name}`),!1;const e=t.getBoundingClientRect();if(0==e.width&&0==e.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 e=t.getBoundingClientRect(),s=e.left+.5*e.width,i=e.top+.5*e.height;return h(document,s,i)}function h(e,s,i){const n=e.elementFromPoint(s,i);if(!n)return null;const r=Vt.getShadowRoot(n);return r&&r!=t.getRootNode(document.body)&&r!==e?h(r,s,i):n}function a(t){const e=o(t);return null!==e&&(t===e||(c(t)?""!==t.textContent&&e.contains(t):t.contains(e)))}function c(t){return"span"===t.localName||"a"===t.localName||"b"===t.localName||"i"===t.localName||"button"===t.localName||"input"===t.localName||"label"===t.localName||"cite"===t.localName||"small"===t.localName||"strong"===t.localName||"code"===t.localName||"abbr"===t.localName||"em"===t.localName||"dfn"===t.localName||"time"===t.localName||"output"===t.localName||"object"===t.localName||"sub"===t.localName}t.findAncestor=function(t,e,i=!1){let n=t;for(;n;){if(e(n))return n;const t=s(n,i);if(!t||t===n)break;n=t}return null},t.walkUp=i,t.isDescendantOf=function e(s,i){if(s===i||i.contains(s))return!0;const n=t.getParentElement(s);return!(!n||n===s)&&e(n,i)},t.getParentElement=n,t.findAllElements=function(t,e=document){const s=kt(window.csquerySelectorAll[e.nodeType].call(e,t)),i=Vt.getAllShadowHosts(e);for(const e of i){const i=Vt.getShadowRoot(e);if(!i)continue;const n=kt(window.csquerySelectorAll[i.nodeType].call(i,t));csArray.prototype.push.call(s,...n)}return s},t.getRootNode=(()=>{if("getRootNode"in Ht.prototype)return(t,e)=>t.getRootNode(e);function t(s){const i=e(s);return L(i)?t(i.host):i}function e(t){return null!=csNodeparentNode.apply(t)?e(csNodeparentNode.apply(t)):t}return(s,i)=>"object"==typeof i&&Boolean(i.composed)?t(s):e(s)})(),t.isHiddenByCSS=r,t.areAncestorsHiddenByCSS=function t(e){if(r(e))return!0;const s=n(e);return null!=s&&t(s)},t.getTopAncestorHiddenByCSS=function(t){let e=null,s=t;do{if(!r(s))break;e=s}while(s=n(s));return e},t.getTopElement=o,t.getElementOnTop=function(e){if(!e.getBoundingClientRect)return null;const s=e.getBoundingClientRect(),i=s.x+s.width/2,n=s.y+s.height/2;return t.getTopElementFromPoint(document,i,n)},t.getTopElementFromPoint=h,t.isVisibleInDocument=function(t){return!function(t){const e=t.getBoundingClientRect();return e.right+Ct.windowOffsetX()<0||e.bottom+Ct.windowOffsetY()<0}(t)&&!r(t)&&!function(t){const e=o(t);return null!==e&&!t.contains(e)&&!e.contains(t)}(t)},t.isVisibleInViewportInForeground=function(t){return!r(t)&&a(t)},t.isInViewPort=a,t.getAttributeNS=function(t,e,s){const i=t.getAttributeNS(e,s);return""===i?t.hasAttributeNS(e,s)?i:null:i},t.isElementFocusable=function(t){return!!t.hasAttribute("tabIndex")||("true"===t.getAttribute("contentEditable")||(!(!P(t)||!t.hasAttribute("href"))||(!(!(x(t)||k(t)||j(t)||(e=t,b(e)&&"button"===e.localName))||t.hasAttribute("disabled"))||!(!function(t){return b(t)&&"details"===t.localName}(t)&&!function(t){return b(t)&&"summary"===t.localName}(t)))));var e},t.isInlineElement=c}(Bt||(Bt={}));class qt{constructor(t){this.P=t}run(t){const e=[...this.P];let s=Bt.getAncestors(t,!1),i=s[s.length-1];for(;e.length>0&&s.length>0;){const t=csArray.prototype.shift.call(s),n=s[0]||null;if(this.V(e,t,n,i),this.C(e),0===e.length)break;0===s.length&&t.host&&(s=Bt.getAncestors(t.host,!1),i=s[s.length-1])}}V(t,e,s,i){for(const n of t)n.serializeElement(e,s,i)}C(t){for(let e=0;e0))return;let s=this.j(t);s+=s.length>0?"|":"",this.path.length+s.length>this.options.hierarchyMaxLength?this.done=!0:this.path=s+this.path}j(t){if(!t.localName)return"";let e=`@${t.localName};`;return e+=this.O(t.id),t.classList&&(e+=this.N(csArray.from(t.classList))),t.attributes&&(e+=this.M(t)),e}O(t){return t?`#${t};`:""}N(t){return t.length>0?`.${csArray.prototype.join.call(csArray.prototype.sort.call(t),";.")};`:""}L(t,e){var s,i;return(null===(i=(s=this.options).isAttributeSensitive)||void 0===i?void 0:i.call(s,t,e))||-1!==csArray.prototype.indexOf.call(this.options.attributeIgnoreTokens,e)||N(t)&&-1===csString.prototype.indexOf.call(e,"data-")&&"aria-label"!==e||j(t)&&"value"===e}D(t,e){return this.options.useAnonymization&&!this.options.allWhitelistedAttributes.has(t)||e.length>this.options.attrMaxLength}U(t){const e={};for(const s of csArray.from(t.attributes))this.L(t,s.name)||(e[s.name]=s.value);return e}M(t){var e,s;if(null===(s=(e=this.options).isNodeSensitive)||void 0===s?void 0:s.call(e,t))return"";const i=Object.entries(this.U(t));return csArray.prototype.join.call(csArray.prototype.sort.call(csArray.prototype.map.call(csArray.prototype.filter.call(i,(([t])=>t.lengththis.D(t,e)?`[${t}]`:`[${t}=${e}]`))),";")+(i.length>0?";":"")}}!function(t){function e(t){return!!t&&"localName"in t&&"getAttribute"in t&&"hasAttribute"in t&&"parentNode"in t}function s(t){return t&&"jquery"in t&&1===t.length?t[0]:t}t.INVALID_ELEMENT="INVALID_ELEMENT",t.isValidElement=e,t.getElementPathAndHierarchy=function(i,n,r={fullPath:!1,dynamicIdRegex:null}){const o=s(i);if(o===document)return{path:"",hierarchy:""};if(!e(o))return{path:t.INVALID_ELEMENT,hierarchy:t.INVALID_ELEMENT};const h=new ot(r),a=new Gt(n);return new qt([h,a]).run(o),{path:h.getPath(),hierarchy:a.getPath()}},t.getElementPath=function(i,n={fullPath:!1,dynamicIdRegex:null}){const r=s(i);if(r===document)return"";if(!e(r))return t.INVALID_ELEMENT;const{ancestors:o,selectionRoot:h}=H(r);return it(o,h,n)},t.getElementPathAndFirstAnchorParent=function(i,n={fullPath:!1,dynamicIdRegex:null}){const r=s(i);if(r===document)return{path:"",firstAnchorParent:null};if(!e(r))return{path:t.INVALID_ELEMENT,firstAnchorParent:null};const{firstAnchorParent:o,ancestors:h,selectionRoot:a}=function(t){let e=t;const s=[e];let i=null;for(;null!==csNodeparentNode.apply(e);)null===i&&P(e)&&(i=e),csArray.prototype.push.call(s,csNodeparentNode.apply(e)),e=csNodeparentNode.apply(e);return B(e)&&csArray.prototype.push.call(s,F),{firstAnchorParent:i,ancestors:s,selectionRoot:e}}(r);return{path:it(h,a,n),firstAnchorParent:o}}}(zt||(zt={})),window.CSPathComputation=window.CSPathComputation||zt;const Wt=Number.MAX_SAFE_INTEGER||9007199254740991;function Zt(){}function Jt(t,e){return 0===csString.prototype.lastIndexOf.call(t,e,0)}const Yt=34164e6,Qt={percentage:()=>Math.floor(1e4*Math.random())/100,boolean(t){return this.percentage()Math.floor(Math.random()*t)},Kt=csSymbol("cachedJson");const Xt=void 0!==window.Symbol?function(t){if(t[Kt])return t[Kt];if(csArray.isArray(t)){if(0===t.length)return"[]";let e="["+Xt(t[0]);for(let s=1;s{var e;if("string"==typeof t.filename&&csArray.prototype.some.call(ee,(e=>csString.prototype.indexOf.call(t.filename,e)>-1))&&!(csString.prototype.indexOf.call(t.filename,"blob")>-1&&(null==t.message?void 0:csString.prototype.indexOf.call(t.message,"importScripts"))>-1)){const s=new Error(t.message);s.stack=null===(e=t.error)||void 0===e?void 0:e.stack,se.critical(s)}}));class se{constructor(){}static whiteListFilename(t){csArray.prototype.push.call(ee,t)}static setStrategy(t){se.F=t}static computeIsActive(t){se.B=Qt.boolean(t),se.B?se.q=Qt.boolean(10):se.q=!1}static isLoggingActive(){return se.B}static getStrategy(){return se.F}static debug(t,e=""){se.B&&this.F.send(t,e,te.debug)}static warn(t,e=!0,s=""){var i;se.B&&e&&this.F.send(t,s,te.warn),null===(i=window.UXAnalytics.Console)||void 0===i||i.warn(t)}static implementation(t,e=""){se.B&&this.F.send(t,e,te.implementation)}static error(t,e=""){var s;se.B&&this.F.send(t,e,te.error),null===(s=window.UXAnalytics.Console)||void 0===s||s.error(t)}static critical(t,e=""){this.F.send(t,e,te.critical)}static tryToExecute(t,e){return(...s)=>{try{const i=e(...s);return w(window.Promise)&&i instanceof window.Promise?i.then((t=>t),(e=>this.error(S(e)?e:new Error(e),t))):i}catch(e){try{this.error(S(e)?e:new Error(e),t)}catch{}}}}static isPerfLoggingActive(){return se.q}}se.B=!1,se.q=!1;var ie={d:function(t,e){for(var s in e)ie.o(e,s)&&!ie.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)}},ne={};ie.d(ne,{H:function(){return re}});var re=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.tryCatch,s=t.exception,i=t.scriptDomain,n=t.hjHost,r=t.askUrl,o=t.surveysHost,h=t.surveyImagesHost,a=t.surveyImpressionsEndpoint;window.hj=window.hj||function(){(window.hj.q=window.hj.q||[]).push(arguments)},hj.q=window.hj.q||[],window._hjSettings=window._hjSettings||{},hj.isPreview=Boolean(_hjSettings.preview),hj.settings=hj.isPreview||!window.hjSiteSettings?{}:window.hjSiteSettings,hj.scriptDomain=window.hj.scriptDomain||i||"https://script.hotjar.com/",hj.defaults={environment:"live",host:"in.hotjar.com",insightsHost:"insights.hotjar.com",identifyEndpoint:"https://identify.hotjar.com",surveysHost:"surveys.hotjar.com",surveyImagesHost:"survey-images.hotjar.com",surveyImpressionsEndpoint:"https://surveystats.hotjar.io/hit",askUrl:"https://ask.hotjar.io/"},hj.environment=_hjSettings.environment||hj.defaults.environment,hj.host=n||_hjSettings.host||hj.defaults.host,hj.insightsHost=_hjSettings.insightsHost||hj.defaults.insightsHost,hj.surveysHost=o||_hjSettings.surveysHost||hj.defaults.surveysHost,hj.surveyImagesHost=h||hj.defaults.surveyImagesHost,hj.apiUrlBase="https://"+hj.host+"/api/v1",hj.insightsHost=_hjSettings.insightsHost||hj.defaults.insightsHost,hj.identifyEndpoint=_hjSettings.identifyEndpoint||hj.defaults.identifyEndpoint,hj.askUrl=_hjSettings.askUrl||r||hj.defaults.askUrl,hj.surveyImpressionsEndpoint=a||_hjSettings.surveyImpressionsEndpoint||hj.defaults.surveyImpressionsEndpoint,hj.userDeviceType=null,hj.tryCatch=e||window.hj.tryCatch;var c=s&&{log:s};hj.exceptions=c||window.hj.exceptions};(0,ne.H)({tryCatch:(t,e,...s)=>se.tryToExecute(e,t).bind(s),exception:t=>se.error(t),scriptDomain:"https://script.hj.contentsquare.net/",hjHost:"in.hj.contentsquare.net",askUrl:"https://ask.hj.contentsquare.net/",surveysHost:"surveystats.hj.contentsquare.net",surveyImagesHost:"survey-images.hj.contentsquare.net",surveyImpressionsEndpoint:"https://surveystats.hj.contentsquare.net/hit"});const oe=/^\d+\.\d+(?:\.\d+)?$/;class he{constructor(t){var e,s,i,n,r,o;this.isSMB=null!==(e=t.isSMB)&&void 0!==e&&e,this.trackerDomain=t.trackerDomain,this.dynamicConfDomain=t.dynamicConfDomain,this.tagDomain=t.tagDomain,this.loggerDomain=t.ed,this.minLogLevel=t.logLevel,this.projectId=t.projectId,this.smbConfig=t.smbConfig,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||Yt,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!==(i=t.customErrorsEnabled)&&void 0!==i?i:0,...t.customErrors},this.jsCustomErrorsEnabled=t.jsCustomErrorsEnabled,this.triggerSessionReplayEnabled=t.triggerSessionReplayEnabled,this.triggerSessionReplayRegex=this.G(t.triggerSessionReplayRegex),this.dynamicIdRegex=t.dynamicIdRegex?new csRegExp(t.dynamicIdRegex):null,this.whitelistedAttributes=t.whitelistedAttributes||[],this.replayRecordingUnmaskedUrlRegex=this.G(t.replayRecordingUnmaskedUrlRegex),this.replayRecordingMaskedUrlRegex=this.G(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 csRegExp(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.environment=(null===(n=t.uxaDomain)||void 0===n?void 0:n.indexOf("staging"))>-1?"staging":"production",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!==(r=t.anonymizeDigits)&&void 0!==r?r:null,this.isHeapPresent=void 0!==window.heap,this.clickedElementTextEnabled=!!t.clickedElementTextEnabled,this.recordTargetingRules=null!==(o=t.recordTargetingRules)&&void 0!==o?o:[],this.paProxyDomainUri=t.paProxyDomainUri||null,this.emitRecordInfoEvents=0!=t.emitRecordInfoEvents,this.collectHierarchy=!!t.collectHierarchy}getTrackerUri(){return`${this.W()}://${this.trackerDomain}`}getSentryFileUri(){return`${this.W()}://${this.tagDomain}/uxa/smb/errors.js`}getSentryDSNUri(){return`https://f553e78fb58e051e51fe8074c4c6e73e@${this.loggerDomain}/4508608369131520`}getRecordingUri(){return`${this.W()}://${this.malkaRecordingDomain}`}getLegacyQuotaUri(){return`${this.W()}://${this.malkaQuotaServiceDomain}`}getLoggerUri(){return`${this.W()}://${this.loggerDomain}`}getMetricsUri(){return`${this.W()}://${this.loggerDomain}/metrics`}getStaticResourceManagerUri(){return`${this.W()}://${this.staticResourceManagerDomain}`}getQuotaUri(){return`${this.W()}://${this.dynamicConfDomain}/${this.projectId}.json`}isQuotaEnabled(){return this.isSMB&&!!this.dynamicConfDomain}getPaProxyDomainUri(){return`${this.W()}://${this.paProxyDomainUri}`}W(){return this.useHttps?"https":"http"}isProjectActive(){return 1===this.status}processOptionOverrides(t){t&&t.forEach&&t.forEach((([t,...e])=>{if("setOption"===t){const[t,s]=e;this.Z(t,s)}}))}Z(t,e){"trackerDomain"===t&&(this.trackerDomain=e),"loggerDomain"===t&&(this.loggerDomain=e),"malkaRecordingDomain"===t&&(this.malkaRecordingDomain=e),"malkaQuotaServiceDomain"===t&&(this.malkaQuotaServiceDomain=e),"staticResourceManagerDomain"===t&&(this.staticResourceManagerDomain=e),"minLogLevel"===t&&(this.minLogLevel=e),"useHttps"===t&&(this.useHttps=!!e),"isWebView"===t&&(this.isWebView=e)}G(t){return t?this.J(t):null}getRequestParameters(){return{pid:`${this.projectId}`}}updateDynamicFields(t,e){"emitDebugEvents"===t&&(this.emitDebugEvents=e),"minLogLevel"===t&&(this.minLogLevel=e)}J(t){try{const e=/^\/(.*)\/([gim]*)$/.exec(t);if(e){const[,t,s]=e;return new csRegExp(`^${t}$`,s)}return new csRegExp(`^${t}$`)}catch(t){return null}}isHeaderCollectionActive(){var t,e;return this.apiErrors.collectStandardHeaders||!!(null===(t=this.apiErrors.validCustomHeaders)||void 0===t?void 0:t.length)||!!(null===(e=this.apiErrors.plainCustomHeaders)||void 0===e?void 0:e.length)}isCsSideloadingHeap(){var t;return"cs_sideloads_heap"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)&&!this.isHeapPresent}isHeapSideloadsCs(){var t;return"heap_sideloads_cs"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)}isHeapSideloadsCsV5(){var t;return"heap_sideloads_cs"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)&&this.Y()}isHeapSideloadsStartDataCollection(){if(this.isHeapSideloadsCs()){if(this.Y())return!0;const t=(t=>{if(!oe.test(t))return;const[e,s,i]=csArray.prototype.map.call(csString.prototype.split.call(t,"."),Number);return{major:e,minor:s,patch:!i||Number.isNaN(i)?0:i}})(this.getHeapVersion()||"");if(t&&4===t.major&&((t,e)=>((t,e)=>t.major!==e.major?t.major-e.major:t.minor!==e.minor?t.minor-e.minor:t.patch-e.patch)(t,e)>=0)(t,{major:4,minor:23,patch:5}))return!0}return!1}Y(){var t;return"function"==typeof(null===(t=window.heap)||void 0===t?void 0:t.getUserId)}getHeapVersion(){var t,e,s,i,n,r;return"function"==typeof(null===(t=window.heap)||void 0===t?void 0:t.getConfig)&&(null===(i=null===(s=null===(e=window.heap)||void 0===e?void 0:e.getConfig())||void 0===s?void 0:s.sdk)||void 0===i?void 0:i.version)||(null===(r=null===(n=window.heap)||void 0===n?void 0:n.version)||void 0===r?void 0:r.heapJsVersion)||void 0}isCsCrosswritingHeap(){var t;return"cs_crosswrites_heap"===(null===(t=this.heapEnvironment)||void 0===t?void 0:t.heap_tag_status)}isClickedElementTextEnabled(){return this.isSMB||this.clickedElementTextEnabled}isNetworkDetailsEnabled(){return!!this.performanceTimingOptions&&(this.performanceTimingOptions.withResource||this.performanceTimingOptions.withNavigation)}hasTargetingRules(){var t;return!!(null===(t=this.recordTargetingRules)||void 0===t?void 0:t.length)}}class ae{constructor(t,e){this.K=t,this.X=e}init(){this.tt=this.K!==this.K.top,this.et=this.X.isWebView&&this.K===this.K.top,this.X.iframesTracking&&this.tt||this.et?this.st=!1:this.st=!0}isInIframeContext(){return this.tt}isTopWindowTracker(){return this.st}isInWebViewContext(){return this.et}}var ce;!function(t){t.toQuery=function(t){return csArray.prototype.join.call(csArray.prototype.map.call(Object.keys(t),(e=>`${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`)),"&")}}(ce||(ce={}));class ue{constructor(t,e){this.domainUri=t,this.path=e,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,e)=>({...t,...e}))):{}}}class le extends ue{constructor(t,e){super(t,e)}send(){csArray.prototype.forEach.call(this.beforeRequestCallbacks,(t=>t()));const t=this.retrieveParameters();this.it(t);const e=ce.toQuery(t);this.nt(e),csArray.prototype.forEach.call(this.afterRequestCallbacks,(t=>t()))}nt(t){const e=new window.Image(1,1);e.onload=Zt,e.onerror=Zt,csHTMLImageElementsrc.call(e,`${this.domainUri}${this.path?`/${this.path}`:""}?${t}`)}it(t){t.r=csString.prototype.slice.call(`${Math.random()}`,2,8)}}class de{constructor(t,e){this.ot=t,this.ht=e}init(){this.ut=new le(this.ot.getLoggerUri()),this.ut.setRequestParametersProviders(this,this.ht)}send(t){this.lt=t,this.ut.send()}getRequestParameters(){return{a:this.lt.app,l:this.lt.level,m:this.lt.message,s:this.lt.stacktrace}}}function fe(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(e,s,o):n(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;class ve{static setGlobalService(t){ve.globalService=t}constructor(t){this.name=t}_get(){return this._values}_reset(){this._values={}}aggregate(){if(!ve.globalService)return;const t=this._get(),e=Object.keys(t);e.length&&(ve.globalService.push(csArray.prototype.map.call(e,(e=>({name:this.name,parameter:e,value:t[e]})))),this._reset())}}ve.globalService=null,fe([gt("Metric.aggregate")],ve.prototype,"aggregate",null);class ge extends ve{constructor(t,e=100){super(t),this.ft=e,this.vt=null,this._values={}}count(t,e=1){this._values[t]=(this._values[t]||0)+e,this._debounce()}_debounce(){ve.globalService&&(this.vt&&window.csClearTimeout(this.vt),this.vt=window.csSetTimeout((()=>{this.aggregate(),this.vt=null}),this.ft))}}const me={counters:{commandsFromIntegrations:new ge("commands-from-integrations"),commandsFromCSTC:new ge("commands-from-cstc"),commandsFromIframe:new ge("commands-from-iframe"),commandApplied:new ge("command-applied"),commandError:new ge("command-error"),commandMisuse:new ge("command-misuse"),CSTCSnippetUsed:new ge("cstc-snippet-used"),redactedPII:new ge("redacted-pii"),pageAnonymisation:new ge("page-anonymisation"),patchedNativeFunctions:new ge("patched-native-functions"),pureWindowState:new ge("pure-window-state"),sensitiveElements:new ge("sensitive-elements"),cspErrors:new ge("csp-errors"),networkRequests:new ge("network-requests")},setService(t){ve.setGlobalService(t)}},pe=/[a-zA-Z0-9._%+-]+(?:@|%40|%2540)[a-zA-Z0-9.%-_]+((?:\.|%2[eE])[a-zA-Z0-9-]+)+/g,we=/[a-zA-Z0-9+_-](?:@|%40|%2540)/,ye="([-A-Za-z0-9+/=_]|=[^=]|={3,})+",Ee=new csRegExp(`(ey${ye}\\.ey${ye}\\.${ye})`,"g"),Ae=/[0-9]{4}/,_e=/(^|[^a-zA-Z0-9*.,-])([45*][0-9*]{3}([ -]?)[0-9*]{4}\3[0-9*]{4}\3[0-9*]{4})($|[^a-zA-Z0-9*.,-])/g,Se=/\d/g,Re=/([+(]{0,2}\d[-_ ()/]{0,4}){9,}/,be=/(?:\d{1,3}\.){3}\d{1,3}/,Te=/(?:[A-F0-9]{1,4}:){7}[A-F0-9]{1,4}/;var Ie;!function(t){t.replaceEmail=function(t){return csString.prototype.replace.call(t,pe,"CS_ANONYMIZED_EMAIL")},t.replaceJWT=function(t){return csString.prototype.replace.call(t,Ee,"CS_ANONYMIZED_JWT")},t.replaceCreditCardNumber=function(t,e){return csString.prototype.replace.call(t,_e,e)},t.replaceDigits=function(t){return csString.prototype.replace.call(t,Se,"•")},t.mayHaveIPAddress=function(t){return be.test(t)||Te.test(t)},t.mayHaveNumberSequence=function(t){return Re.test(t)},t.mayHaveCreditCardNumber=function(t){return Ae.test(t)},t.mayHaveEmail=function(t){return we.test(t)}}(Ie||(Ie={}));class Pe{constructor(){this.gt={}}getLogs(){const{fullCreditCard:t,partialCreditCard:e}=this.gt,s=[];return t&&csArray.prototype.push.call(s,`Full cc found and anonymized (${t})`),e&&csArray.prototype.push.call(s,`Partial cc found and anonymized (${e})`),s}hasPII(t,e){return t!==this.checkAndAnonymizePII(t,e)}checkAndAnonymizePII(t,e=null){this.wt();let s=this.yt(this.Et(t));return!0===e?s=this.At(s):!1===e&&(s=this._t(s)),s}anonymizePII(t){return this.wt(),this.Et(t)}anonymizeJwt(t){return this.wt(),Ie.replaceJWT(t)}anonymizeFields(t,e){return this.wt(),csArray.prototype.forEach.call(e,(e=>{t[e]=this.Et(t[e])})),t}wt(){this.gt={}}Et(t){if(Ie.mayHaveEmail(t)){const e=Ie.replaceEmail(t);return e!==t&&me.counters.redactedPII.count("email"),e}return t}At(t){return Ie.replaceDigits(t)}_t(t){return Ie.mayHaveNumberSequence(t)?Ie.replaceDigits(t):t}yt(t){return Ie.mayHaveCreditCardNumber(t)?Ie.replaceCreditCardNumber(t,((t,e,s,i,n)=>{if(-1===csString.prototype.indexOf.call(s,"*")){const e=i.length?csArray.prototype.join.call(csString.prototype.split.call(s,i),""):s;if(!this.St(e))return t;me.counters.redactedPII.count("cc"),this.gt.fullCreditCard=(this.gt.fullCreditCard||0)+1}else me.counters.redactedPII.count("cc-partial"),this.gt.partialCreditCard=(this.gt.partialCreditCard||0)+1;return`${e}CS_ANONYMIZED_PII${n}`})):t}St(t){const e=parseInt(t[t.length-1]);let s=0;for(let e=t.length-2;e>=0;e--){let i=parseInt(t[e]);e%2==0&&(i*=2),s+=Math.floor(i/10)+i%10}return 10-s%10===e}}const Ve="15.92.1";function Ce(){return{v:Ve}}var je;const ke="undefined"!=typeof performance&&!!performance.now,Oe=ke?()=>performance.now():csDate.now,Ne=ke?null===(je=performance.timing)||void 0===je?void 0:je.navigationStart:0,xe={now:()=>Math.round(Oe()+Ne),elapsed:()=>Oe()};function $e(){return Math.floor(xe.now()/1e3)}function Me(){var t,e;return"function"==typeof(null===(t=window.navigation)||void 0===t?void 0:t.addEventListener)&&"function"==typeof(null===(e=window.navigation)||void 0===e?void 0:e.removeEventListener)}function Le(t,e){return 0===csString.prototype.lastIndexOf.call(t,e,0)}function De(t,e){return-1!==csString.prototype.indexOf.call(t,e,t.length-e.length)}class Ue{constructor(t,e){this.Rt=t,this.bt=e}getRequestParameters(){return{d:`${xe.now()}`,p:this.bt.anonymizePII(window.location.href),...this.Rt.getRequestParameters(),...Ce()}}}const Fe="snippet-",He="implementation-snippet-";var Be;!function(t){t.IMPLEMENTATION="implementation",t.DYNAMIC="dynamic"}(Be||(Be={}));const ze={[te.debug]:0,[te.warn]:1,[te.implementation]:1,[te.error]:2,[te.critical]:3};class qe{constructor(t,e,s){this.Tt=e,this.bt=new Pe,this.It=ze[te.warn],this.It=ze[t.minLogLevel||te.warn],this.ut=s||new de(t,new Ue(t,this.bt)),this.Pt={[te.debug]:[],[te.warn]:[],[te.implementation]:[],[te.error]:[],[te.critical]:[]},this.Vt={implementation:{},dynamic:{}},this.ut.init()}send(t,e="",s=te.warn){if(!this.Ct(s,e))return;csArray.prototype.push.call(this.Pt[s],e||"");const i={message:this.jt(t,e),stacktrace:this.kt(t),app:"uxa",level:s};this.ut.send(i)}jt(t,e){let s=S(t)?this.bt.anonymizePII(t.message||t.toString()):t;return e&&(s+=` ErrorCode: ${e}`),s}kt(t){return S(t)?`${t.stack||"No stacktrace"} ${this.Ot()}`:this.Ot()}Ot(){const t=this.Tt.getVisitorService(),e=null==t?void 0:t.getVisitor();if(!e)return"No context";const s=this.Tt.getSessionService(),i=s&&s.getSession(),n={userId:e.id,sessionNumber:e.visitsCount,pageNumber:i&&i.pageNumber};return csJSON.stringify(n)}Ct(t,e){if(ze[t]=5)&&(!e||!csArray.prototype.some.call(s,(t=>t===e)))}Nt(t,e){return t in this.Vt[e]?!(this.Vt[e][t]>=5)&&(this.Vt[e][t]+=1,!0):(this.Vt[e][t]=1,!0)}}const Ge=!i&&document.createElement("a"),We=/(:443|:80)$/;function Ze(t){return Ge?(Ge.href=t,Ge.href):""}function Je(t,e){return new csURL(t,e).href}function Ye(t){const e=Xe(t);return null===e?"":decodeURIComponent(e.hostname)}function Qe(t,e){return csArray.prototype.some.call(e,(e=>De(t,`.${e}`)||t===e||""===e))}function Ke(t){return csString.prototype.replace.call(t,We,"")}function Xe(t){return Ge&&(Le(t,"http://")||Le(t,"https://"))?(Ge.href=t,{hash:Ge.hash,host:Ke(Ge.host),hostname:Ge.hostname,href:Ge.href,origin:Ge.origin?Ge.origin:Ke(`${Ge.protocol}//${Ge.host}`),pathname:(e=Ge.pathname,"/"===e[0]?e:`/${e}`),port:Ge.port,protocol:Ge.protocol,search:Ge.search}):null;var e}const ts="CS_IFRAME_MESSAGE";var es,ss,is,ns;!function(t){t.AfterPageView="afterPageView",t.GetSessionKey="getSessionKey"}(es||(es={})),function(t){t.Parent="parent",t.Child="child"}(ss||(ss={})),function(t){t.Discovery="discovery",t.Stop="stop",t.RecordingContext="recordingContext",t.SensitiveStatus="sensitiveStatus",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"}(is||(is={})),function(t){t.buildBaseMessage=function(t,e,s,i){const n={type:t,from:e,pid:s,signature:ts};return void 0!==i&&i>=0&&(n.id=i),n},t.isMessageValid=function(t,e,s,i){const n=Ye(t.origin);return!!t.data&&!!t.data.type&&t.data.signature===ts&&t.data.from===e&&t.data.pid===s&&Qe(n,i)},t.sendPostMessage=function(t,e,s,i){i?t.postMessage(s,e,i):t.postMessage(s,e)},t.getNewChannelMessage=function(){return new MessageChannel},t.sendChannelMessage=function(t,e){t.postMessage(e)},t.closeChannelPort=function(t){t.close()}}(ns||(ns={}));class rs{constructor(t){this.Rt=t}send(t,e="",s=te.warn){const i={message:t,errorCode:e,level:s},n=ns.buildBaseMessage(is.ChildLogMessage,ss.Child,this.Rt.projectId);n.content=i,ns.sendPostMessage(window.parent,"*",n)}}class os{setContext(t,e){this.xt=t,this.$t=e}getVisitorService(){return this.xt}getSessionService(){return this.$t}}let hs=!1;function as(){return(t,e,s)=>{if(s){const t=s.value;s.value=function(e,s){!1===(null==e?void 0:e.isTrusted)&&hs||t.call(this,e,s)}}else{const s=t[e];if("function"!=typeof s)return;t[e]=function(t,...e){!1===(null==t?void 0:t.isTrusted)&&hs||s.call(this,t,e)}}}}function cs(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(e,s,o):n(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o}Object.create;Object.create;"function"==typeof SuppressedError&&SuppressedError;function us(t){return"function"==typeof t&&-1!==t.toString().indexOf("[native code]")}function ls(){try{window.CSPureWindow&&function(){const t=new MutationObserver((e=>{e.forEach((e=>{e.removedNodes.forEach((e=>{e instanceof HTMLElement&&"CS-NATIVE-FRAME-HOLDER"===e.tagName&&(me.counters.pureWindowState.count("iframe-deletion"),vt.warn(" deleted"),t.disconnect())}))}))}));t.observe(document.body,{childList:!0})}(),us(MutationObserver)&&us(MutationObserver.prototype.observe)||me.counters.patchedNativeFunctions.count("MutationObserver")}catch{}}var ds,fs,vs,gs;!function(t){function e(t){const e=new csRegExp(`(^|;)[ ]*${t}=([^;]*)`).exec(document.cookie);return e?decodeURIComponent(e[2]):null}function s(e,s,n,r,o,h){const a=encodeURIComponent(`${s}`),c=n===t.CURRENT_DOMAIN?void 0:n,u=i(r);let l=`${e}=${a}${u?`;expires=${u.toUTCString()}`:""};path=/${y(c)?`;domain=${c}`:""}`;return w(o)&&o!==vs.NotSet&&(l=`${l};SameSite=${o}`),w(h)&&h===gs.Yes&&(l=`${l};Secure`),document.cookie=l,!0}function i(t){return f(t)?new csDate(xe.now()+t):t}function n(t,i){e(t)&&s(t,"",i,new csDate(0)),e(t)&&s(t,"",i,new csDate(0),vs.None,gs.Yes)}t.CURRENT_DOMAIN="CURRENT_DOMAIN",t.get=e,t.set=s,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=e(r);if(null!==o&&"1"!==o)return o;const h=csString.prototype.split.call(window.location.hostname,".");let a=csArray.prototype.pop.call(h);for(;h.length&&(null===o||"1"===o);)a=csArray.prototype.join.call([csArray.prototype.pop.call(h),a],"."),s(r,a,a,void 0,t,i),o=e(r);return n(r,a),a}}(ds||(ds={})),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}}(fs||(fs={})),function(t){t.None="None",t.Lax="Lax",t.NotSet="X"}(vs||(vs={})),function(t){t[t.Yes=1]="Yes",t[t.No=0]="No"}(gs||(gs={}));class ms{constructor(t,e,s){this.Rt=t,this.Mt=e,this.Lt=s,this.Dt=!1,this.Ut=vs.NotSet,this.Ft=gs.No}getSameSiteFlag(){return this.Ut}getSecureFlag(){return this.Ft}getDomain(){return this.Ht}getRootDomain(){return this.Bt}init(){if(this.Rt.cookielessTrackingEnabled)return;const t=this.zt(),e=this.qt();this.Dt=this.Gt(t,e),this.Dt?(this.Ut=t,this.Ft=e):this.Rt.secureCookiesEnabled&&"https:"===this.Mt.getUrlProtocol()&&(this.Ft=gs.Yes),this.Bt=this.Wt(),this.Ht=this.Zt(this.Bt)}Gt(t,e){return!fs.browserIsSafariV12()&&(ds.set(ms.COOKIE_TEST_FOR_SAME_SITE,"Test same site",ms.CURRENT_DOMAIN,void 0,t,e),!!ds.get(ms.COOKIE_TEST_FOR_SAME_SITE)&&(ds.remove(ms.COOKIE_TEST_FOR_SAME_SITE,ms.CURRENT_DOMAIN),!0))}zt(){return"http:"===this.Mt.getUrlProtocol()?vs.Lax:this.Lt.isSameSiteNoneSecureNeeded()||this.Rt.crossDomainTracking?vs.None:vs.Lax}qt(){return"http:"===this.Mt.getUrlProtocol()?gs.No:this.Rt.secureCookiesEnabled||this.Rt.crossDomainTracking||this.Lt.isSameSiteNoneSecureNeeded()?gs.Yes:gs.No}isSameSiteSupported(){return this.Dt}set(t,e,s){const i=ds.toExpireDate(s);ds.set(t,e,this.Ht,i,this.getSameSiteFlag(),this.getSecureFlag())}get(t){const e=new csRegExp(`(^|;)[ ]*${t}=([^;]*)`).exec(document.cookie);return e?decodeURIComponent(e[2]):null}delete(t,e){const s=e||this.Ht;ds.remove(t,s)}Wt(){const t=this.Lt.isSameSiteNoneSecureNeeded()&&this.isSameSiteSupported(),e=t?vs.None:void 0,s=t?gs.Yes:void 0;return ds.getRootDomain(e,s)}Zt(t){return this.Rt.allowSubdomains?t:ds.CURRENT_DOMAIN}}ms.CURRENT_DOMAIN="CURRENT_DOMAIN",ms.COOKIE_TEST_FOR_SAME_SITE="_cs_same_site";const ps="_cs_t";class ws{constructor(t,e){this.Jt=t,this.Rt=e,this.Yt=!1,this.Qt=!1}init(){if(!this.Rt.cookielessTrackingEnabled&&this.Jt.isTopWindowTracker()&&"cookie"in document){if(!this.Jt.isInIframeContext()&&ds.isCookiePresent())return this.Yt=!0,void(this.Qt=!1);if(ds.set(ps,"1",ds.CURRENT_DOMAIN),null!==ds.get(ps))return this.Yt=!0,this.Qt=!1,void ds.remove(ps,ds.CURRENT_DOMAIN);ds.set(ps,"1",ds.CURRENT_DOMAIN,void 0,vs.None,gs.Yes),null!==ds.get(ps)&&(this.Yt=!0,this.Qt=!0,ds.remove(ps,ds.CURRENT_DOMAIN))}}areCookiesEnabled(){return this.Yt}isSameSiteNoneSecureNeeded(){return this.Qt}}class ys{constructor(t,e){this.Rt=t,this.Lt=e}canTrack(){return this.Rt.isProjectActive()&&this.Kt()&&this.Xt()&&this.te()}canTrackInChild(){return this.Rt.isProjectActive()&&this.ee()&&(this.Xt()||this.se())}te(){return this.Rt.cookielessTrackingEnabled?function(){const t="CSSessionStorageTest";try{return sessionStorage.setItem(t,t),sessionStorage.getItem(t)===t&&(sessionStorage.removeItem(t),!0)}catch{return!1}}():this.Lt.areCookiesEnabled()}Xt(){return Qe(window.location.hostname,this.Rt.hostnames)}Kt(){return!this.ie()&&this.ne()}ee(){return!this.ie()&&this.re()}se(){return"about:"===window.location.protocol&&""===window.location.hostname}ie(){return"visibilityState"in document&&"prerender"===document.visibilityState}ne(){return this.oe()&&this.he()}re(){return this.oe()}he(){try{return!!window.localStorage}catch{return!1}}oe(){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 Es{constructor(t,e){this.ae=!1,this.ce=new Map,this.ue=new Map,this.le=new Map,this.de="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){},implementation(...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;rnull==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.fe=this.ve(e||s),this.ae=!0,Es.isTransferableStreamSupported()&&(this.ge=new ReadableStream({start:t=>{this.pe=t},cancel:()=>{this.pe=null}}),this.fe.postMessage(this.ge,[this.ge]))}catch(t){"SecurityError"===t.name&&me.counters.cspErrors.count("network-worker"),this.ae=!1}}postMessage(t){t.WORKER_SIGNATURE=this.de,this.pe?this.pe.enqueue(t):this.fe.postMessage(t)}ve(t){const e=window.csURL||window.webkitURL,s=window.Blob,i=window.Worker,n=new s([t],{type:"application/javascript"}),r=e.createObjectURL(n);se.whiteListFilename(r);const o=new i(r);return o.onmessage=t=>{const{type:e,endpoint:s,WORKER_SIGNATURE:i}=t.data;if(i===this.de)if("onLoad"===e){const{response:e}=t.data,i=this.ce.get(s);i&&i(e)}else if("onError"===e){const{response:e}=t.data,i=this.ue.get(s);i&&i(e)}else if("onTimeout"===e){const t=this.le.get(s);t&&t()}},o}registerOnLoadCallback(t,e){this.ce.set(t,e)}registerOnErrorCallback(t,e){this.ue.set(t,e)}registerOnTimeoutCallback(t,e){this.le.set(t,e)}isSupported(){return this.ae}static isTransferableStreamSupported(){try{const t=new ReadableStream;return structuredClone(t,{transfer:[t]}),!0}catch{return!1}}}class As{constructor(t){var e;this.we={},this.ye=t.endpoint,this.Ee=t.networkWorker,this.Ae=t.compressionOutputType,this._e=t.useRetry,this.Ee.postMessage({type:"CreatePostRequest",endpoint:this.ye,compressionOutputType:this.Ae,useRetry:this._e,mandatoryParameters:null!==(e=t.mandatoryParameters)&&void 0!==e?e:[]})}setQueryParams(t){this.Ee.postMessage({type:"SetQueryParams",endpoint:this.ye,queryParams:t}),csArray.prototype.forEach.call(Object.keys(t),(e=>{this.we[e]=t[e]}))}getQueryParams(){return this.we}removeQueryParams(t){this.Ee.postMessage({type:"RemoveQueryParams",endpoint:this.ye,queryParams:t}),t&&csArray.prototype.forEach.call(t,(t=>{delete this.we[t]}))}send(t,e){this.Ee.postMessage({type:"Send",endpoint:this.ye,payload:t,queryParams:e})}abort(){this.Ee.postMessage({type:"Abort",endpoint:this.ye})}onLoad(t){this.Ee.registerOnLoadCallback(this.ye,t)}onError(t){this.Ee.registerOnErrorCallback(this.ye,t)}setRequestHeader(t,e){this.Ee.postMessage({type:"SetHeader",endpoint:this.ye,headerName:t,headerValue:e})}onTimeout(t,e){this.Ee.registerOnTimeoutCallback(this.ye,t),this.Ee.postMessage({type:"SetTimeout",endpoint:this.ye,timeout:e})}}var _s;!function(t){t.UNCOMPRESSED="0",t.GZIP="2"}(_s||(_s={}));class Ss{constructor(t){this.onError=t}}class Rs{constructor(t){var e;this.we={},this.Se={},this.Re=t=>{for(const e of t){const{metadata:t,events:s}=e;this.send(s,t)}},this.ye=t.endpoint,this.be=t.compressionOpts,this.Te=t.recoveryStorage,this.mandatoryParameters=null!==(e=t.mandatoryParameters)&&void 0!==e?e:[],this.worker=!!t.worker,this.Te&&this.Te.recover(this.Re)}setQueryParams(t){Object.keys(t).forEach((e=>{this.we[e]=t[e]}))}removeQueryParams(t){t?t.forEach((t=>{delete this.we[t]})):this.we={}}send(t,e){const s=e||{...this.we},i=!("ct"in s),n="string"!=typeof t&&!this.Ie(t);"ct"in s||(this.be&&i?s.ct=this.be.compressionType:s.ct=_s.UNCOMPRESSED);const r=n?JSON.stringify(t):t,o=Object.keys(s).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(s[t])}`)).join("&"),h=`${this.ye}?${o}`;Mt(this.mandatoryParameters,(t=>null==s[t]))?vt.warn(`[${this.worker?"WORKER":"MAIN"}] All mandatory parameters are not present on ${h}`):this.be&&i&&"string"==typeof r?this.be.compressor(r,this.be.compressionOutputType,(t=>this.Pe(h,s,t))):this.Pe(h,s,r)}onLoad(t){this.Ve=t}onError(t){this.Ce=t}onTimeout(t,e){this.je=t,this.ke=e}abort(){this.Oe&&this.Oe()}setRequestHeader(t,e){this.Se[t]=e}getQueryParams(){return this.we}Ie(t){return t&&void 0!==t.byteLength}Pe(t,e,s){const i=new XMLHttpRequest,n=Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");i.open("POST",t),i.onload=()=>{if(this.Te&&this.Te.recover(this.Re),this.Ve){const t={params:e,responseText:i.responseText,status:i.status};this.Ve(t)}},i.onerror=()=>{this.Te&&this.Te.save({key:n,metadata:e,events:s}),this.Ce&&this.Ce({params:e})},this.ke&&this.je&&(i.timeout=this.ke,i.ontimeout=()=>{this.je()}),this.Oe=()=>i.abort(),Object.keys(this.Se).forEach((t=>{i.setRequestHeader(t,this.Se[t])})),i.send(s)}}class bs{constructor(t){this.Ne=t,this.Ee=new Es(this.Ne)}create(t,e,s,i,n=[]){if(this.Ee.isSupported()&&e)return new As({networkWorker:this.Ee,endpoint:t,compressionOutputType:s,useRetry:!!i,mandatoryParameters:n});{const e=s?{compressor:this.Ne.compress,compressionOutputType:s,compressionType:this.Ne.algorithm}:void 0;return new Rs({endpoint:t,compressionOpts:e,recoveryStorage:i})}}}class Ts{constructor(t,e,s,i,n){this.xt=t,this.$t=e,this.xe=s,this.$e=i,this.Rt=n}get(){return{exclusion:this.xe.getAppliedTrackingDraw(),visitor:this.xt.getVisitor(),session:this.$t.getSession(),cvars:this.$e.getCustomVariablesSession()}}apply(t){t&&(t.exclusion?this.exclude():this.include(t))}exclude(){this.xe.exclude(this.Rt),this.xt.removeVisitor(),this.$t.removeSession(),this.$e.removeCustomVariablesSession()}include(t){this.xe.removeExclusion(),this.xt.setVisitor(t.visitor),t.session?this.$t.setSession(t.session):this.$t.removeSession(),t.cvars?this.$e.setCustomVariableSession(t.cvars):this.$e.removeCustomVariablesSession()}}function Is(){const t=new Error;let e=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]")&&-1===csString.prototype.indexOf.call(t,"()"))):[];if(0===e.length)return"";const s=function(t){return t.length>0?Ps(t[0]):""}(e);return""===s?"":(e=function(t,e){return csArray.prototype.filter.call(t,(t=>-1===csString.prototype.indexOf.call(t,e)))}(e,s),0===e.length?"":Ps(e[0]))}function Ps(t){let e,s="";var i;i=t,e=-1!==csString.prototype.indexOf.call(i,"@")?new csRegExp("@(.+):(\\d+):(\\d+)$"):new csRegExp("\\((.+):(\\d+):(\\d+)\\)");const n=e.exec(t);return n&&(s=n[1]),s}const Vs=t=>t;function Cs(t,e){const s=csSymbol.for(e);if(t[s]){return t[s]}const i=Object.getOwnPropertyDescriptor(t,e);if(!(null==i?void 0:i.writable)&&!(null==i?void 0:i.set))return vt.warn(`Cannot intercept read only function '${csString(e)}' of object '${t}'`),null;const n=new Set;t[s]=n;const r=t[e];if("function"==typeof r){const s=function(){const t=arguments;let e=[];try{e=csArray.prototype.map.call(Ft(n),(e=>e(t)))}catch(t){vt.error(t)}const s=r.apply(this,t);try{for(let i=0;ih.toString()}),t[e]=s}var o,h;return n}function js({target:t,methodName:e,hook:s,hookPrepareArgs:i=Vs,options:n}){const r=Cs(t,e);if(!r)return null;const o=t=>{const e=i(t),r=(null==n?void 0:n.withCallerName)?{callerName:Is()}:{};return t=>s({...t,...r,args:e})};return{activate:()=>{r.add(o)},deactivate:()=>{r.delete(o)}}}function ks(t,e,s){const i=function(t,e){const s=csSymbol.for(e);if(t[s])return t[s];const i=new Set,n=Object.getOwnPropertyDescriptor(t,e);return n?n.configurable?(t[s]=i,Object.defineProperty(t,e,{set(){var t;const s=arguments,r=this[e],o=null===(t=n.set)||void 0===t?void 0:t.apply(this,s);try{i.forEach((t=>t(this,s[0],r)))}catch(t){vt.error(t)}return o}}),i):(vt.warn(`Cannot intercept read only property '${csString(e)}' of object '${t}'`),null):i}(t,e);if(!i)return null;const n=(t,e,i)=>s(t,e,i);return{activate:()=>{i.add(n)},deactivate:()=>{i.delete(n)}}}var Os;class Ns{static Me(t){this.Le.forEach((e=>{t(e,"initial")}))}static De(t){if(this.Ue||(this.Ue=new csMutationObserver((t=>{for(const e of t)e.target.isConnected&&xt(e.addedNodes,this.Fe),xt(e.removedNodes,this.He)}))),csArray.prototype.push.call(this.Be,t),!this.ze){this.ze=!0,this.Ue.observe(document,this.qe);for(const t of Vt.getAllShadowHosts(document)){const e=csElementshadowRoot.apply(t);this.Le.add(e),this.Ue.observe(e,this.qe)}this.Ge||(this.Ge=js({target:Element.prototype,methodName:"attachShadow",hook:t=>t.result.isConnected&&this.We(t.result)})),this.Ge.activate()}this.Me(t)}static Ze(t){var e,s;this.Be=csArray.prototype.filter.call(this.Be,(e=>e!==t)),0===this.Be.length&&(this.Be=[],this.ze=!1,null===(e=this.Ue)||void 0===e||e.disconnect(),null===(s=this.Ge)||void 0===s||s.deactivate(),this.Le.clear())}constructor(t){this.Je=t,this.Je=mt("DocumentShadowRootObserver:callback",((e,s)=>t(e,s)))}get shadowRoots(){return Ft(Os.Le)}takeRecords(){var t,e;return null!==(e=null===(t=Os.Ue)||void 0===t?void 0:t.takeRecords())&&void 0!==e?e:[]}observe(){Vt.isSupported()&&Os.De(this.Je)}disconnect(){Vt.isSupported()&&Os.Ze(this.Je)}}Os=Ns,Ns.Be=[],Ns.Le=new Set,Ns.ze=!1,Ns.qe={childList:!0,subtree:!0},Ns.We=t=>{Os.Le.has(t)||(Os.Ue.observe(t,Os.qe),Os.Le.add(t),xt(Os.Be,(e=>e(t,"added"))))},Ns.Fe=t=>{ct(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll(Os.We)},Ns.He=t=>{t.isConnected||ct(t,NodeFilter.SHOW_DOCUMENT_FRAGMENT).visitAll((t=>{Os.Le.has(t)&&(Os.Le.delete(t),xt(Os.Be,(e=>e(t,"removed"))))}))},fe([gt()],Ns.prototype,"observe",null),fe([gt()],Ns.prototype,"disconnect",null);function xs(t,e=true){t.boundElement.addEventListener(t.type,t.listener,e)}function $s(t,e=true){t.boundElement.removeEventListener(t.type,t.listener,e)}function Ms(t,e=0){const s=Math.pow(10,e);return Math.round(t*s)/s}function Ls(t,e){"number"==typeof e&&(e={wait:e});const s=e.wait;if(e.ignoreThrottledCalls){let e=0;return function(...i){const n=xe.now();if(n-e>s)return e=n,t.apply(this,i)}}let i,n,r=[],o=null,h=0;const a=()=>{h=xe.now(),o=null,n=t.apply(i,r)},c=function(...e){const c=xe.now(),u=s-(c-h);return i=null!=this?this:window,r=[...e],u<=0||u>s?(h=c,n=t.apply(i,r),o?(window.csClearTimeout(o),o=null):r=[]):o||(o=window.csSetTimeout(a,u)),n};return c.cancel=()=>{o&&(window.csClearTimeout(o),h=0,o=null,r=[])},c.flushPending=()=>{o&&(window.csClearTimeout(o),a())},c}const Ds=t=>(e,s,i)=>{i.value=Ls(i.value,t)};var Us,Fs,Hs,Bs,zs;function qs(t){const e=csEventtarget.apply(t);return e&&1===e.nodeType&&csElementshadowRoot.apply(e)&&t.composedPath?t.__csOriginalTarget||t.composedPath()[0]:e}!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.VIDEO_PLAY=78]="VIDEO_PLAY",t[t.VIDEO_PAUSE=79]="VIDEO_PAUSE",t[t.VIDEO_SEEK=80]="VIDEO_SEEK",t[t.DEBUG=999]="DEBUG"}(Us||(Us={})),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"}(Fs||(Fs={})),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"}(Hs||(Hs={})),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"}(Bs||(Bs={})),function(t){t[t.COPY=0]="COPY",t[t.CUT=1]="CUT",t[t.PASTE=2]="PASTE"}(zs||(zs={}));const Gs=!!window.chrome,Ws="data-cs-scroll-container";var Zs;!function(t){t.isEventOnScrollContainer=function(t){return!!(y(t)&&function(t){try{if(y(csEventtarget.apply(t)))return!0}catch{}return!1}(t)&&_(csEventtarget.apply(t))&&null!==csEventtarget.apply(t).getAttribute(Ws))},t.getScrollContainer=function(){return window.csquerySelector[document.nodeType].call(document,`[${Ws}]`)}}(Zs||(Zs={}));const Js=function(){const t=csSymbol.for("propStore");return{getStore:e=>e[t],get(e,s){const i=e[t];return null==i?void 0:i[s]},set(e,s,i){let n=e[t];n||(n={},e[t]=n),n[s]=i}}}();var Ys;!function(t){function e(t,e){s(t,void 0,e)}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,e,s){var i;t instanceof Node?Js.set(t,e,s):(null!==(i=t.props)&&void 0!==i||(t.props={}),t.props[e]=s)},t.getProperty=function(t,e){var s;return t instanceof Node?Js.get(t,e):null===(s=t.props)||void 0===s?void 0:s[e]},t.getProperties=function(t){return t instanceof Node?Js.getStore(t):t.props},t.findDescendant=function(t,s){let i=null;return e(t,((t,e,n)=>s(t)&&(i=t)&&!!n())),i},t.traverse=e}(Ys||(Ys={}));let Qs=1,Ks=csSymbol("nodeIdentifier");function Xs(t){const e=Ys.getProperty(t,Ks);return null!=e?e:(Ys.setProperty(t,Ks,Qs++),Ys.getProperty(t,Ks))}let ti;function ei(t){ti||(ti=document.createElement("div"));if(!(!!t&&g(t)))return vt.warn(`isValidSelector: invalid selector provided '${t}'`),!1;try{return W.call(ti,t),!0}catch{return vt.warn(`isValidSelector: invalid selector provided '${t}'`),!1}}function si(t,e){if(Z)return Z.call(t,e);let s=t;do{if(W.call(s,e))return s;s=null==s?void 0:s.parentElement}while(null!==s&&1===s.nodeType);return null}var ii;!function(t){let e;!function(t){t[t.NotMasked=0]="NotMasked",t[t.Parent=1]="Parent",t[t.Child=2]="Child"}(e=t.MaskedElementState||(t.MaskedElementState={})),t.maskedProp="masked",t.maskedAttributeProp="maskedAttribute",t.isSelectorUserInput=function(t){return!!(p(t)&&"Attributes"in t&&"PIISelectors"in t)&&(t.Attributes instanceof Array&&t.PIISelectors instanceof Array)},t.sanitizeSelectorUserInput=function(t){if(!p(t)||null===t)throw new Error("Command misuse: setPIISelectors");return"Attributes"in t||(t.Attributes=[]),"PIISelectors"in t||(t.PIISelectors=[]),t},t.getMaskedElementDetails=function(s){var i;return null!==(i=Ys.getProperty(s,t.maskedProp))&&void 0!==i?i:{state:e.NotMasked}},t.getMaskedAttributeDetails=function(e){var s;return null!==(s=Ys.getProperty(e,t.maskedAttributeProp))&&void 0!==s?s:{attributes:[]}},t.isMaskedElement=function(s){const i=Ys.getProperty(s,t.maskedProp);return(null==i?void 0:i.state)===e.Parent},t.isMaskedElementChild=function(s){const i=Ys.getProperty(s,t.maskedProp);return(null==i?void 0:i.state)===e.Child},t.isMaskedAttribute=function(e,s){const i=Ys.getProperty(e,t.maskedAttributeProp);return(null==(null==i?void 0:i.attributes)?void 0:csArray.prototype.indexOf.call(null==i?void 0:i.attributes,s))>-1},t.setMaskedElementProperty=function(e,s){Ys.setProperty(e,t.maskedProp,s)},t.unsetMaskedElementProperty=function(e){Ys.setProperty(e,t.maskedProp,void 0)},t.setMaskedAttributeProperty=function(e,s){Ys.setProperty(e,t.maskedAttributeProp,s)},t.getComputedSelectorSettings=function(t,e){const s=csArray.prototype.filter.call(t.PIISelectors,(t=>ei(t)));e.elementSelector.length>0&&csArray.prototype.push.call(s,...csString.prototype.split.call(e.elementSelector,","));const i=function(t){if(t.length<=1)return t;const e=[];for(const s of t){const t=csString.prototype.split.call(s,",");for(const s of t)-1===csArray.prototype.indexOf.call(e,s)&&csArray.prototype.push.call(e,s)}return e}([...s]),n={elementSelector:csArray.prototype.join.call(i,","),attrSelector:e.attrSelector,attrSelectors:e.attrSelectors};return csArray.prototype.forEach.call(t.Attributes,(t=>{(null==t?void 0:t.attrName)&&(null==t?void 0:t.selector)&&ei(t.selector)&&!function(t,e){return csArray.prototype.some.call(t,(t=>t.selector===e.selector&&t.attrName===e.attrName))}(n.attrSelectors,t)&&csArray.prototype.push.call(n.attrSelectors,t)})),n.attrSelector=function(t){let e="";return csArray.prototype.forEach.call(t,(t=>{const s=csString.prototype.split.call(t.selector,",");csArray.prototype.forEach.call(s,(t=>{ei(t)&&(e&&(e+=","),e+=t)}))})),e}(n.attrSelectors),n}}(ii||(ii={}));class ni{constructor(){this.eventType="user",this.Ye=[],this.Qe=[{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.Ke=[{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.Xe=[{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.es=[{type:"scroll",listener:t=>this.scrollListener(csEventtarget.apply(t))}];const t=function(t){if(!g(t))return null;const e=/iP(ad|hone|od).+Version\/(\d+)\..*Safari/i.exec(t);return e?Number(e[2]):null}(window.navigator.userAgent);(null===t||t&&t>=16)&&csArray.prototype.push.call(this.es,{type:"mouseover",listener:t=>this.mouseOverListener(t)}),this.ss=new Ns(((t,e)=>{switch(e){case"initial":case"added":this.ns(t);break;case"removed":this.rs(t)}}))}init(){this.hs(),this.cs(),this.us()}onEvent(t){csArray.prototype.push.call(this.Ye,t)}ls(t,e=!1){csArray.prototype.forEach.call(this.Ye,(s=>s(t,e)))}start(){this.ds(),this.ns(document),this.ss.observe()}stop(){this.rs(document),this.ss.disconnect()}cs(){this.fs()&&csArray.prototype.push.call(this.Xe,...this.Qe)}hs(){this.vs()&&csArray.prototype.push.call(this.Xe,...this.Ke)}ns(t){M(t)?csArray.prototype.forEach.call(this.Xe,(t=>xs(t))):csArray.prototype.forEach.call(this.es,(e=>{xs({type:e.type,listener:e.listener,boundElement:t})}))}rs(t){M(t)?csArray.prototype.forEach.call(this.Xe,(t=>$s(t))):csArray.prototype.forEach.call(this.es,(e=>{$s({type:e.type,listener:e.listener,boundElement:t})}))}fs(){return"PointerEvent"in window&&"function"==typeof window.PointerEvent}vs(){return"TouchEvent"in window&&"function"==typeof window.TouchEvent}ds(){this.gs()}gs(){const t=Zs.getScrollContainer()||document,e=Xs(t),s=this.ps(t);if(0!==s.top||0!==s.left){const t={type:Us.SCROLL,args:[e,s.left,s.top],date:xe.now()};this.ls(t,!0)}}ps(t){return t===document?{top:window.pageYOffset,left:window.pageXOffset}:{top:t.scrollTop,left:t.scrollLeft}}scrollListener(t){if(ii.isMaskedElement(t)||ii.isMaskedElementChild(t))return;const e=Xs(t),s=this.ps(t),i={type:Us.SCROLL,args:[e,s.left,s.top],date:xe.now()};this.ls(i)}mouseOverListener(t){if(ii.isMaskedElementChild(t.target))return;const e=Xs(t.target),s={type:Us.MOUSE_OVER,args:[e],date:xe.now()};this.ls(s)}clickListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i={type:Us.CLICK,args:[s],date:xe.now()};this.ls(i)}keyUpListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i=this.ws[t.key];if(void 0===i)return;const n={type:Us.KEY_UP,args:[s,i],date:xe.now()};this.ls(n)}keyDownListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i=this.ws[t.key];if(void 0===i)return;const n={type:Us.KEY_DOWN,args:[s,i],date:xe.now()};this.ls(n)}copyListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i={type:Us.CLIPBOARD_COMMAND,args:[s,zs.COPY],date:xe.now()};this.ls(i)}cutListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i={type:Us.CLIPBOARD_COMMAND,args:[s,zs.CUT],date:xe.now()};this.ls(i)}pasteListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i={type:Us.CLIPBOARD_COMMAND,args:[s,zs.PASTE],date:xe.now()};this.ls(i)}pointerUpListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i={type:Us.POINTER_UP,args:[t.pointerId,t.pointerType,Ms(t.clientX,1),Ms(t.clientY,1),s,t.button],date:xe.now()};this.ls(i)}pointerMoveListener(t){const e={type:Us.POINTER_MOVE,args:[t.pointerId,t.pointerType,Ms(t.clientX,1),Ms(t.clientY,1)],date:xe.now()};this.ls(e)}pointerDownListener(t){const e=qs(t);if(ii.isMaskedElementChild(e))return;const s=Xs(e),i={type:Us.POINTER_DOWN,args:[t.pointerId,t.pointerType,Ms(t.clientX,1),Ms(t.clientY,1),s,t.button,{pageX:Ms(t.pageX,1),pageY:Ms(t.pageY,1)}],date:xe.now()};this.ls(i)}touchStartListener(t){if(!t.changedTouches)return;const{changedTouches:e}=t;for(let t=0;t{const i=s.value;return i&&(s.value=function(t){if(qs(t)===csEventtarget.apply(t))return i.call(this,t)}),s}],ni.prototype,"mouseOverListener",null),cs([gt("click"),as()],ni.prototype,"clickListener",null),cs([gt("Event handler type: keyup")],ni.prototype,"keyUpListener",null),cs([gt("Event handler type: keydown")],ni.prototype,"keyDownListener",null),cs([gt("Event handler type: copy")],ni.prototype,"copyListener",null),cs([gt("Event handler type: cut")],ni.prototype,"cutListener",null),cs([gt("Event handler type: paste")],ni.prototype,"pasteListener",null),cs([gt("Event handler type: pointerup"),as()],ni.prototype,"pointerUpListener",null),cs([gt("Event handler type: pointermove"),as(),Ds({wait:33,ignoreThrottledCalls:!1})],ni.prototype,"pointerMoveListener",null),cs([gt("Event handler type: pointerdown"),as()],ni.prototype,"pointerDownListener",null),cs([gt("Event handler type: touchstart"),as()],ni.prototype,"touchStartListener",null),cs([gt("Event handler type: touchmove"),as()],ni.prototype,"touchMoveListener",null),cs([gt("Event handler type: touchend-cancel"),as()],ni.prototype,"touchEndCancelListener",null);class ri{constructor(t){this.ys=t,this.Es=0}addString(t){this.Es+=2*t.length}addArrayBuffer(t){this.Es+=t.byteLength}isThresholdReached(){return this.Es>this.ys}reset(){this.Es=0}}class oi{constructor(t=[],e=2048e3){this.As=t,this._s=new ri(e)}addEvent(t){this._s.addString(Xt(t)),csArray.prototype.push.call(this.As,t)}addEventByTimestamp(t){let e=0;for(;e=t.date)break}csArray.prototype.splice.call(this.As,e,0,t)}eventsCount(){return this.As.length}clearEvents(){this._s.reset(),this.As=[]}isFull(){return this.eventsCount()>=200}isThresholdReached(){return this._s.isThresholdReached()}getEvents(){return this.As}extractEvents(...t){const e=[],s=[];return csArray.prototype.forEach.call(this.As,(i=>{-1!==csArray.prototype.indexOf.call(t,i.type)?csArray.prototype.push.call(e,i):csArray.prototype.push.call(s,i)})),this.As=s,e}stringifyEvents(){return Xt(this.As)}Ss(t){t.type===Us.INITIAL_DOM&&(window.CSDomSerialized=window.CSDomSerialized?window.CSDomSerialized+1:1)}}cs([Pt("RecordingBatch.addEvent")],oi.prototype,"addEvent",null);class hi{constructor(){this.Rs=1}getCurrentIndex(){return this.Rs}increment(){this.Rs+=1}reset(){this.Rs=1}getRequestParameters(){return{ri:`${this.Rs}`}}}class ai{emit(t,e,s,i=document){const n=`${void 0!==s?`${s}`:`${ai.bs}`}${t}`,r=ai.createEvent(n,{detail:e});null!==r&&i.dispatchEvent(r)}static createEvent(t,e={}){if("function"==typeof CustomEvent)return new CustomEvent(t,e);const s=this.Ts();if(null===s)return null;const{bubbles:i=!1,cancelable:n=!1,detail:r}=e;return s.initCustomEvent(t,i,n,r),s}static Ts(){try{return document.createEvent("CustomEvent")}catch{return null}}}ai.bs="cs.tracking.";class ci{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()}}let ui="null",li=null;const di=[];function fi(t){null==li||li.postMessage(t)}!i&&(()=>{var t;return i||!!(null===(t=document.body)||void 0===t?void 0:t.getAttribute("data-cs-tag-extension"))})()&&(window._uxa?_uxa.push(["debugEvents",!0]):window._uxa=[["debugEvents",!0]],li=new BroadcastChannel("cs-tag"),document.addEventListener("cs.tracking.recordingEvent",(t=>{fi({type:"UXA_EVENT",event:t.detail})})),li.addEventListener("message",(t=>{if("CONNECT"===t.data.type){if(t.data.sessionId===ui)return;ui=t.data.sessionId,csArray.prototype.forEach.call(di,(t=>t())),null==li||li.postMessage({type:"CONNECTED",sessionId:ui})}})));class vi{constructor(t,e=""){this.name=t,this.format=e}}class gi extends vi{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 mi extends vi{constructor(t){super(t,"Living intances: {instances}
Added: {added}
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 pi extends vi{constructor(t){super(t,"Count: {count}
Average: {average}ms
Total: {total}ms"),this.total=0,this.count=0}get average(){return this.count?this.total/this.count:0}measure(t){const e=xe.elapsed();t(),this.count++,this.total+=xe.elapsed()-e}asyncMeasure(){const t=xe.elapsed();return()=>{this.count++,this.total+=xe.elapsed()-t}}getData(){return{total:this.total,count:this.count,average:this.average}}}const wi={general:{category:"General",nbEvents:new gi("Nb of Events"),pendingTasks:new gi("Pending Tasks"),pendingEvents:new gi("Pending Tasks"),nbOfMutationObservers:new mi("Nb of Mutation Observers")},mutations:{category:"Mutations",initialDOM:new pi("Initial DOM"),pendingMutations:new gi("Nb of Mutations scheduled"),serializedMutations:new pi("Serialized Mutations"),count:new gi("Mutation Count"),elementMutationObserved:new mi("Nb of Elements Observed by MutationObserver"),unobserveGarbageCollection:new pi("Unobserve GC")},visibilityObserver:{category:"Visibility Observer",hiddenElements:new gi("Nb of Hidden Elements "),nbElements:new gi("Nb of Elements")}};let yi=null;var Ei,Ai,_i,Si,Ri;Ei=()=>{const t=t=>Object.keys(t),e=csArray.prototype.map.call(t(wi),(t=>wi[t])),s=csArray.prototype.map.call(e,(e=>csArray.prototype.filter.call(csArray.prototype.map.call(t(e),(t=>e[t])),(t=>t instanceof vi)))),i=csArray.prototype.map.call(e,((t,e)=>({category:t.category,performanceCounters:csArray.prototype.map.call(s[e],(t=>({name:t.name,format:t.format})))})));fi({type:"UXA_PERFORMANCE_COUNTER_SCHEMA",event:i}),yi||(yi=csSetInterval((()=>{const t=Nt(Ot(s,(t=>Ot(t,(t=>t.getData())))),(t=>t));fi({type:"UXA_PERFORMANCE_COUNTER",event:t})}),1e3))},i||(null!==ui&&csSetTimeout(Ei),csSetTimeout((()=>csArray.prototype.push.call(di,Ei)))),function(t){t.QUOTA_REACHED="X",t.RECORDING_RULES_TARGETING="8",t.ANALYTICS_ONLY_RULES_TARGETING="9",t.ANALYTICS_ONLY="0",t.RECORDING_GLOBAL_SAMPLING="5",t.RECORDING_TEMPORARILY="T",t.RECORDING_URL_SAMPLING="6",t.RECORDING_ETR_SAMPLING="7",t.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED="B",t.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN="W"}(Ai||(Ai={})),function(t){t.ETR_OFF="0",t.ETR_ON="1"}(_i||(_i={})),function(t){t.ETR_LEGACY="0",t.ETR_SESSION="1",t.ETR_PAGE="2"}(Si||(Si={})),function(t){t.ETR_DISABLED="0",t.ETR_PENDING="1",t.ETR_SAVED_PAGE="2",t.ETR_SAVED_SESSION="3",t.ETR_NOT_SAVED_SESSION="9"}(Ri||(Ri={}));function bi(t,e,s,i){var n,r=arguments.length,o=r<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,s):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(t,e,s,i);else for(var h=t.length-1;h>=0;h--)(n=t[h])&&(o=(r<3?n(o):r>3?n(e,s,o):n(e,s))||o);return r>3&&o&&Object.defineProperty(e,s,o),o}Object.create;Object.create;function Ti(t){return Le(t,"data:")}function Ii(t){return Le(t,"#")}function Pi(t){return!!t&&De(t,".css")}function Vi(t){const e=csString.prototype.trim.call(t);if(""===t)return[];let[s,i]=(n=e,csString.prototype.split.call(n,/\s(.+)/));var n;return i?(De(s,",")||(i=function(t){return csString.prototype.split.call(t,/,(.+)/)[1]||""}(i)),[Ci(s),...Vi(i)]):[Ci(s)]}function Ci(t){return csString.prototype.split.call(t,/,$/)[0]}const ji=/(@import\s*("([^"]+)"|'([^']+)'))|(url\s*\(\s*((("([^"\]]+)"|'([^'\]]+)')\s*)|([^)\]]+))\))/g;function ki(t,e){const s=csString.prototype.replace.call(t,ji,((...t)=>{const s=t[3]||t[4],i=t[9]||t[10]||t[11],n=function(t){const e=/(\\)*\\(?:([a-fA-F0-9]{1,6})|(.))[\n\t\x20]?/g;return csString.prototype.replace.call(t,e,((t,e,s,i)=>{if("\\"===e)return csString.prototype.slice.call(t,1);if(i)return i;const n=parseInt(s,16);return 55296<=n&&n<=57343||0===n||n>1114111?"�":csString.fromCodePoint(n)}))}((s||i).trim());return`${s?"@import ":""}url(${function(t){if(-1===csString.prototype.indexOf.call(t,'"'))return`"${t}"`;if(-1===csString.prototype.indexOf.call(t,"'"))return`'${t}'`;return t}(e(n)||n)})`}));return s}function Oi(t){const e=new Set;return ki(t,(t=>{var s,i;return e.add(null!==(i=null===(s=csString.prototype.match.call(t,/^["|'](.*)?["|']$/))||void 0===s?void 0:s[1])&&void 0!==i?i:t),t})),Ft(e)}const Ni=new Map,xi=!i&&document.implementation.createHTMLDocument("");function $i(t){if(!C(t))return null;const e=Mi(t);if(null===e||0===e.length)return null;let s="";if(R(t.textContent))xt(e,(t=>s+=t.cssText));else{const i=function(t){if(!xi)return 0;let e=Ni.get(t.textContent);if(e)return e;const s=t.cloneNode(!0);s.textContent=t.textContent,xi.head.appendChild(s);const i=Mi(s);return e=i?i.length:0,Ni.set(t.textContent,e),xi.head.removeChild(s),e}(t);if(i===e.length)return null;if(i>e.length)return null;const n=new csArray(e.length-i);for(let t=i,s=0;ts+=t.cssText))}return s}function Mi(t){try{if(t.disabled)return null;const e=t.sheet;return e?e.cssRules||e.rules:null}catch(t){if("SecurityError"!==t.name&&"InvalidAccessError"!==t.name)throw t;return null}}const Li=t=>t instanceof HTMLFormElement?"form":t.localName;class Di{constructor(t){this.csId=Xs(t),this.props=Js.getStore(t)}}class Ui extends Di{constructor(t){super(t),this.nodeType=3,this.data=t.data}}class Fi extends Di{constructor(t){var e;super(t),this.attributes=[],this.nodeType=1,this.localName=Li(t),this.namespaceURI=null!==(e=t.namespaceURI)&&void 0!==e?e:void 0,this.children=[];const s=$i(t);if(s){this.children=new csArray(csNodechildNodes.apply(t).length);const e=document.createTextNode(s),i=new Ui(e);csArray.prototype.push.call(this.children,i)}N(t)&&Ys.setProperty(this,"SVG",!0)}static isElement(t){return 1===t.nodeType}static getAttribute(t,e){return $t(t.attributes,(t=>t.name===e))}static getAttributeValue(t,e){var s;return null===(s=this.getAttribute(t,e))||void 0===s?void 0:s.value}}class Hi{constructor(t){this.type="asyncEvent",this.Is=!1,t&&t((t=>this.resolve(t)))}resolve(t){if(this.Is)throw new Error("AsyncEvent already resolve.");null==t.timestamp&&(t={...t,timestamp:this.timestamp}),this.Ps=t,this.Is=!0,this.Je&&this.Je(this.Ps)}complete(t){this.Is&&t(this.Ps),this.Je=t}wait(){return new Promise((t=>this.complete(t)))}}let Bi=(zi="queueMicrotask",qi=csSetTimeout,void 0!==n[zi]?n[zi]:qi);var zi,qi;"object"==typeof window&&A(window.csQueueMicrotask)&&(Bi=window.csQueueMicrotask);const Gi=new pt,Wi=new pt;let Zi=1;function Ji(t,e="high"){const s=Zi;Gi.isEmpty&&Wi.isEmpty&&Yi((()=>{if(Zi!==s)return;const t=It((()=>{for(;!Wi.isEmpty;){Wi.pop()()}for(;!Gi.isEmpty;){Gi.pop()()}Wi.isEmpty||t()}),"groupMicrotask.run");t()}));const i=mt(`groupMicrotask:${e}:${t.name||t.toString()}`,t);"high"===e?Wi.push(i):Gi.push(i)}function Yi(t,e=10){Bi(0===e?t:()=>Yi(t,e-1))}async function Qi(t=1){for(let e=0;eJi(t)))}const Ki=(t,e=0)=>csSetTimeout(function(t){return function(){try{t.apply(window,arguments)}catch(t){vt.critical(t)}}}(t),e);function Xi(){const t=new Set;return{add(e){t.add(e),1===t.size&&csSetTimeout((()=>{t.clear()}))},has:e=>t.has(e),del(e){t.delete(e)},clear(){t.clear()},values:()=>Ft(t),get count(){return t.size}}}function tn(t,e=!1){const s=Xi();return{push(i){if(0===s.count){(e?Ji:csSetTimeout)((()=>{t(s.values()),s.clear()}))}s.add(i)}}}const en=csSymbol();class sn{constructor(t){var e,s,i,n,r,o,h,a;this.Je=t,this.Vs=null,this.Cs=null,this.js=null,this.ks=null,this.Os=tn((t=>this.processUpdateRulesInATick(t))),this.Je=e=>Ji((()=>t(e))),"function"==typeof(null===(s=null===(e=window.CSSStyleSheet)||void 0===e?void 0:e.prototype)||void 0===s?void 0:s.insertRule)&&(this.Vs=js({target:window.CSSStyleSheet.prototype,methodName:"insertRule",hook:({context:t,args:e})=>{this.processInsertRule(t,e)}})),"function"==typeof(null===(n=null===(i=window.CSSStyleSheet)||void 0===i?void 0:i.prototype)||void 0===n?void 0:n.deleteRule)&&(this.Cs=js({target:window.CSSStyleSheet.prototype,methodName:"deleteRule",hook:({context:t,args:e})=>{this.processDeleteRule(t,e)}})),"function"==typeof(null===(o=null===(r=window.CSSGroupingRule)||void 0===r?void 0:r.prototype)||void 0===o?void 0:o.insertRule)&&(this.js=js({target:window.CSSGroupingRule.prototype,methodName:"insertRule",hook:({context:t})=>this.processUpdateRule(t)})),"function"==typeof(null===(a=null===(h=window.CSSGroupingRule)||void 0===h?void 0:h.prototype)||void 0===a?void 0:a.deleteRule)&&(this.ks=js({target:window.CSSGroupingRule.prototype,methodName:"deleteRule",hook:({context:t})=>this.processUpdateRule(t)}))}observe(){var t,e,s,i;null===(t=this.Vs)||void 0===t||t.activate(),null===(e=this.Cs)||void 0===e||e.activate(),null===(s=this.js)||void 0===s||s.activate(),null===(i=this.ks)||void 0===i||i.activate()}disconnect(){var t,e,s,i;null===(t=this.Vs)||void 0===t||t.deactivate(),null===(e=this.Cs)||void 0===e||e.deactivate(),null===(s=this.js)||void 0===s||s.deactivate(),null===(i=this.ks)||void 0===i||i.deactivate()}processInsertRule(t,[e,s]){if(null==t[en]&&!t.ownerNode)return;const i={type:"cssRuleInserted",sheet:t,rule:e,index:s};this.Je(i)}processUpdateRule(t){let e=t;for(;null!==e.parentRule;)e=e.parentRule;null!==e.parentStyleSheet&&this.Os.push(e)}processUpdateRulesInATick(t){for(const e of t){if(null===e.parentStyleSheet)return;const t=e.parentStyleSheet,s=csArray.prototype.indexOf.call(kt(t.cssRules),e);if(-1===s)return;const i={type:"cssRuleUpdated",sheet:t,rule:e.cssText,index:s};this.Je(i)}}processDeleteRule(t,[e]){if(null==t[en]&&!t.ownerNode)return;const s={type:"cssRuleDeleted",sheet:t,index:e};this.Je(s)}}fe([gt()],sn.prototype,"observe",null),fe([gt()],sn.prototype,"disconnect",null),fe([gt()],sn.prototype,"processInsertRule",null),fe([gt()],sn.prototype,"processUpdateRule",null),fe([gt()],sn.prototype,"processUpdateRulesInATick",null),fe([gt()],sn.prototype,"processDeleteRule",null);class nn{constructor(t){this.Ns=1,this.xs=new Set,this.$s=null,this.Ms=null,this.Ls=(t,e)=>{"initial"!==e&&"added"!==e||this.setStyleSheets(t,t.adoptedStyleSheets)},this.Ds=t=>{const e=t.sheet;if(this.xs.has(e))if("cssRuleInserted"===t.type){const s={type:"adoptedStyleSheetRuleInserted",sheetId:e[en],rule:t.rule,index:t.index};this.Je(s)}else if("cssRuleDeleted"===t.type){const s={type:"adoptedStyleSheetRuleDeleted",sheetId:e[en],index:t.index};this.Je(s)}else if("cssRuleUpdated"===t.type){const s={type:"adoptedStyleSheetRuleUpdated",sheetId:e[en],rule:t.rule,index:t.index};this.Je(s)}},this.Je=e=>Ji((async()=>{await Qi(2),t(e)})),this.ss=new Ns(this.Ls),"adoptedStyleSheets"in Document.prototype&&(this.$s=ks(window.Document.prototype,"adoptedStyleSheets",((t,e)=>{this.setStyleSheets(t,e)}))),"ShadowRoot"in window&&"adoptedStyleSheets"in window.ShadowRoot.prototype&&(this.Ms=ks(window.ShadowRoot.prototype,"adoptedStyleSheets",((t,e)=>{this.setStyleSheets(t,e)}))),this.Us=new sn(this.Ds)}observe(){var t,e;this.setStyleSheets(document,document.adoptedStyleSheets),this.ss.observe(),null===(t=this.$s)||void 0===t||t.activate(),null===(e=this.Ms)||void 0===e||e.activate(),this.Us.observe()}disconnect(){var t,e;this.xs.clear(),this.ss.disconnect(),null===(t=this.$s)||void 0===t||t.deactivate(),null===(e=this.Ms)||void 0===e||e.deactivate(),this.Us.disconnect()}setStyleSheets(t,e){if(!e.length)return;this.Fs(e);const s={type:"adoptedStyleSheetsSet",target:t,sheetsIds:Ot(e,(t=>t[en]))};this.Je(s)}Fs(t){xt(t,(t=>{if(this.xs.has(t))return;const e=this.Ns++;t[en]=e,this.xs.add(t);const s={type:"adoptedStyleSheetRegistered",sheetId:e,cssRules:this.Hs(t)};this.Je(s)}))}Hs(t){let e=[];try{e=Ot(t.cssRules,(t=>t.cssText))}catch{}return e}}fe([gt()],nn.prototype,"observe",null),fe([gt()],nn.prototype,"disconnect",null),fe([gt()],nn.prototype,"setStyleSheets",null);const rn=It((function(t){const e=function(){const t=new Set,e=new Set,s=new Set,i=new Set,n=new Map,r=new Map,o=new Map,h=new Set,a=new Set,c=new Map,u=new Set;return{isMovedNode:e=>t.has(e),markAsMovedNode(e){u.delete(e),t.add(e)},isDetachedMove:t=>!!Bt.findAncestor(t,(t=>u.has(t)),!0),isAddedNode(s){const i=Bt.findAncestor(s,(s=>e.has(s)||a.has(s)||t.has(s)),!0);return!!i&&!t.has(i)},isMovedNodeIntoAddedNode:s=>t.has(s)&&!!Bt.findAncestor(s,(t=>e.has(t)||a.has(t)),!0),markAsAddedNode(t){u.delete(t),a.delete(t),e.add(t)},markAsPendingInsert(t){a.add(t)},isPendingInsert:t=>a.has(t),isRemovedNode:t=>!!Bt.findAncestor(t,(t=>s.has(t)),!0),markAsRemovedNode(t){s.add(t)},isUselessNode:t=>i.has(t),markAsUselessNode(t){i.add(t)},getPlaceholder(t,e){const s="previous"===e?r:n;return t&&s.has(t)?s.get(t)||null:t},getSiblings(t){const e=t.addedNodes.length,s=this.getPlaceholder(t.previousSibling,"previous"),i=this.getPlaceholder(t.nextSibling,"next");if(e){let o=s,h=i,a=t.previousSibling!==s,c=t.nextSibling!==i;for(let s=0;sc.get(t)===e,markAsFutureAddedNode(t){c.has(t)||u.add(t)},isTextMutated:t=>h.has(t),setTextMutated:t=>h.add(t)}}(),s=[];for(const s of t)"childList"===s.type&&hn(s,e);for(const i of t)switch(i.type){case"attributes":cn(i,e,s);break;case"characterData":an(i,e,s);break;case"childList":ln(i,e,s)}return s}),"optimizeMutations"),on=csSymbol.for("ignoreNextSerialization");function hn(t,e){for(let s=0;s{if(c){const{childListType:t,movedNodes:e,...i}=c;csArray.prototype.push.call(s,"added"===t?i:{...i,movedNodes:e}),c=null}},l=e=>e===(null==c?void 0:c.childListType)?c:(u(),{childListType:e,type:"childList",target:t.target,addedNodes:[],removedNodes:[],movedNodes:[],previousSibling:a,nextSibling:h});if(i){for(let s=0;s{if(Bt.isConnected(t)){if(!n&&!e.isPendingInsert(t)){if(e.isDetachedMove(t))return!0;e.markAsMovedNode(t),e.isMovedNodeIntoAddedNode(t)&&(t[on]=!0)}return!1}return!e.isUselessNode(t)&&(e.markAsRemovedNode(t),!0)}));return d.length&&csArray.prototype.push.call(s,{type:"childList",removedNodes:d,addedNodes:[],movedNodes:[],target:t.target,nextSibling:h,previousSibling:a}),s}var dn;const fn={childList:!0,subtree:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,attributeOldValue:!0};class vn{static setShadowRootFilter(t){csArray.prototype.push.call(dn.shadowRootFilters,t)}static Bs(t){if(dn.shadowRootFilters.length>0&&L(t))for(let e=0;e{this.isRefreshing=!1;const t=this.mutationObserver.takeRecords();t.length&&dn.mutationCallback(t),this.mutationObserver.disconnect(),this.observedTargets.forEach((t=>{this.mutationObserver.observe(t,fn)}))}))))}static observe(t,e){csArray.prototype.push.call(this.callbacks,t),e&&csArray.prototype.push.call(this.shadowRootCallbacks,e),this.started?e&&csArray.prototype.forEach.call(Vt.getAllShadowHosts(document),(t=>e(csElementshadowRoot.apply(t),"initial"))):(this.mutationObserver=new csMutationObserver(this.mutationCallback),this.Bs(document),this.shadowRootObserver=new Ns(this.onShadowRoot),this.shadowRootObserver.observe(),this.started=!0,xt(this.shadowRootObserver.shadowRoots,(t=>{this.Bs(t)})))}static disconnect(t,e){var s,i;this.callbacks=csArray.prototype.filter.call(this.callbacks,(e=>e!==t)),e&&(this.shadowRootCallbacks=csArray.prototype.filter.call(this.shadowRootCallbacks,(t=>t!==e))),0===this.callbacks.length&&(this.callbacks=[],this.shadowRootCallbacks=[],dn.shadowRootFilters=[],null===(s=this.shadowRootObserver)||void 0===s||s.disconnect(),null===(i=this.mutationObserver)||void 0===i||i.disconnect(),this.observedTargets.clear(),this.started=!1)}constructor(t,e){this.Je=t,this.zs=e;const s=tn((e=>t(e,this)),!0);this.Je=mt("DocumentMutationObserver:callback",(t=>{xt(t,(t=>s.push(t)))}))}get shadowRoots(){var t,e;return null!==(e=null===(t=dn.shadowRootObserver)||void 0===t?void 0:t.shadowRoots)&&void 0!==e?e:[]}takeRecords(){var t;const e=null===(t=dn.mutationObserver)||void 0===t?void 0:t.takeRecords(),s=dn.shadowRootObserver.takeRecords();return(null==e?void 0:e.length)&&s.length?function(t,e,s){const i=t.length+e.length+((null==s?void 0:s.length)||0),n=new csArray(i);let r=0;for(let e=0;e{wi.mutations.count.increase(t.length),csArray.prototype.forEach.call(dn.callbacks,(e=>e(t,dn.mutationObserver)))},vn.onShadowRoot=(t,e)=>{xt(dn.shadowRootCallbacks,(s=>s(t,e))),"removed"!==e?dn.Bs(t):dn.disconnectShadowRoot(t)},vn.isRefreshing=!1,fe([gt()],vn.prototype,"observe",null),fe([gt()],vn.prototype,"disconnect",null);class gn{constructor(t){this.Je=t,this.qs=t=>{t.sheet.ownerNode&&("cssRuleInserted"===t.type?this.Je({type:t.type,target:t.sheet.ownerNode,rule:t.rule,index:t.index}):"cssRuleDeleted"===t.type?this.Je({type:t.type,target:t.sheet.ownerNode,index:t.index}):"cssRuleUpdated"===t.type&&this.Je({type:t.type,target:t.sheet.ownerNode,rule:t.rule,index:t.index}))},this.Je=e=>Ji((()=>t(e))),this.Gs=new sn((t=>Ji((async()=>{await Qi(),this.qs(t)})))),"adoptedStyleSheets"in Document.prototype&&(this.Ws=new nn(t))}observe(){var t;this.Ue=new vn((t=>this.Zs(t)),((t,e)=>{"added"===e&&this.Js(t)})),this.Ue.observe(),this.Gs.observe(),null===(t=this.Ws)||void 0===t||t.observe()}disconnect(){var t,e;null===(t=this.Ue)||void 0===t||t.disconnect(),this.Gs.disconnect(),null===(e=this.Ws)||void 0===e||e.disconnect()}Zs(t){const e=rn(t);for(let t=0;tt))};this.Je(e)}}Js(t){const e={type:"shadowRootAttached",target:t.host,shadowRoot:t};this.Je(e)}}fe([gt()],gn.prototype,"processAttributeChanged",null),fe([gt()],gn.prototype,"processCharacterDataChanged",null),fe([gt()],gn.prototype,"processChildListChanged",null);class mn extends Di{constructor(t){super(t),this.nodeType=4,this.data=t.data}}class pn extends Di{constructor(t){super(t),this.nodeType=8,this.data=t.data}}class wn extends Di{constructor(t){super(t),this.nodeType=10,this.name=t.name,this.publicId=t.publicId,this.systemId=t.systemId}}class yn extends Di{constructor(t){super(t),this.nodeType=9,this.baseURI=yn.getBaseURI(t),this.children=[]}static getBaseURI(t){let e=t.baseURI;if(null==e){const s=t.getElementsByTagName("base");e=0!==s.length?s[0].href:t.URL}return e}}class En extends Di{constructor(t){super(t),this.nodeType=11,this.mode=t.mode,this.children=[]}}class An{constructor(t,e,s){var i;"string"==typeof t?(this.name=t,this.value=e,this.namespaceURI=null!=s?s:""):(this.name=t.name,this.value=t.value,this.namespaceURI=null!==(i=t.namespaceURI)&&void 0!==i?i:"")}static create(t){var e,s;const i=t.attributes,n=new csArray(i.length);for(let r=0;rs(t))),r=new pt,o=(e,s)=>{e.hasChildNodes()&&r.push({node:e,serializedNode:s});const i=e instanceof Element&&csElementshadowRoot.apply(e);if(i){const e=s.shadowRoot=Vn(i);t.async&&t.initialDOM&&Ys.setProperty(i,Rn,!0),o(i,e)}};let h,a=!0,c=8;const u=mt("work",(()=>{var i;if(a)h=Vn(e),t.async&&t.initialDOM&&Ys.setProperty(e,Rn,!0),o(e,h),a=!1;else if(r.isEmpty)return;const l=function(t){if(t<1)throw new Error("Precision should be >= 1");let e=0,s=performance.now();return{started:s,elapsed(){return++e%t==0&&(s=performance.now()),s-this.started}}}(100);for(;!r.isEmpty;){if(t.async&&l.elapsed()>=t.workTime)return void(--c<=0&&csSetTimeout(u));const{node:e,serializedNode:s}=r.pop(),n=null!==(i=s.children)&&void 0!==i?i:[];if(O(e))continue;let h=0;for(let s=csNodefirstChild.apply(e);s;s=csNodenextSibling.apply(s)){if(Tn(s))continue;const e=Vn(s);t.async&&t.initialDOM&&Ys.setProperty(s,Rn,!0),n[h++]=e,o(s,e)}}t.async?csSetTimeout((()=>n(h))):s(h)}));if(t.async)for(let t=0;te(t))))}onStop(){}start(){this.isStarted||(this.isStarted=!0,this.onStart())}stop(){this.isStarted&&(this.isStarted=!1,this.onStop(),this.Ys=[])}stopForInactivity(){this.isStarted&&(this.isStarted=!1,this.onStop())}subscribe(t){return csArray.prototype.push.call(this.Ys,t),()=>{const e=csArray.prototype.indexOf.call(this.Ys,t);csArray.prototype.splice.call(this.Ys,e,1)}}}const jn=In();class kn extends Cn{constructor(){super(...arguments),this.Qs=!1}onStart(){this.Qs=!0,this.Je=function(t,e){let s=!1;const i=function(){if(!s)return t.apply(e,arguments)};return i.cancel=()=>s=!0,i}(this.Ks,this),this.Xs=new gn(this.Je),this.Xs.observe();const t=wi.mutations.initialDOM.asyncMeasure(),e=()=>{this.Qs=!1,Rn=csSymbol("InitialDom"),t()};this.produceEvent(new Hi((t=>jn(document,(s=>{e(),t({type:"DomEvent",domEvent:"initialDOM",initialDOM:s})})))))}onStop(){var t,e;this.Qs=!1,null===(t=this.Je)||void 0===t||t.cancel(),null===(e=this.Xs)||void 0===e||e.disconnect()}ti(t,e){const s={type:"DomEvent",domEvent:e.type,target:0,targetProps:{}};return"target"in e&&(s.target=Xs(e.target),s.targetProps=Ys.getProperties(e.target)),[e,s]}Ks(t){if(!this.ei(t))switch(t.type){case"attributeChanged":{const[e,s]=this.ti(t.type,t);s.attribute=e.attribute,s.isSvg=N(e.target),s.namespace=e.namespace,s.newValue=e.newValue,s.oldValue=e.oldValue,s.localName=Li(e.target),s.linkRel=I(e.target)?e.target.rel:null,s.parentLocalName=e.target.parentElement?Li(e.target.parentElement):void 0,"input"===s.localName&&(s.inputType=e.target.getAttribute("type")),this.produceEvent(s)}break;case"characterDataChanged":{const[e,s]=this.ti(t.type,t);s.newValue=e.newValue,s.oldValue=e.oldValue,s.targetNodeType=e.target.nodeType,s.parentLocalName=e.target.parentElement?Li(e.target.parentElement):null,s.parentProps=e.target.parentElement?Ys.getProperties(e.target.parentElement):void 0,this.produceEvent(s)}break;case"nodesAdded":{const[e,s]=this.ti(t.type,t);s.targetLocalName=b(e.target)?Li(e.target):null,s.nextSibling=e.nextSibling?Xs(e.nextSibling):null,s.previousSibling=e.previousSibling?Xs(e.previousSibling):null,wi.mutations.serializedMutations.measure((()=>{s.nodes=Ot(e.nodes,Pn)})),this.produceEvent(s);break}case"nodesMoved":{const[e,s]=this.ti(t.type,t);s.previousSibling=e.previousSibling?Xs(e.previousSibling):null,s.nextSibling=e.nextSibling?Xs(e.nextSibling):null,s.nodesIds=Ot(e.nodes,Xs),this.produceEvent(s);break}case"nodesRemoved":{const[e,s]=this.ti(t.type,t);s.nodesIds=Ot(e.nodes,Xs),this.produceEvent(s);break}case"shadowRootAttached":{const[e,s]=this.ti(t.type,t);s.shadowRoot=Vn(e.shadowRoot),this.produceEvent(s);break}case"cssRuleInserted":{const[e,s]=this.ti(t.type,t);s.index=e.index,s.rule=e.rule,this.produceEvent(s);break}case"cssRuleDeleted":{const[e,s]=this.ti(t.type,t);s.index=e.index,this.produceEvent(s);break}case"cssRuleUpdated":{const[e,s]=this.ti(t.type,t);s.rule=e.rule,s.index=e.index,this.produceEvent(s);break}case"adoptedStyleSheetRegistered":{const[e,s]=this.ti(t.type,t);s.sheetId=e.sheetId,s.cssRules=e.cssRules,this.produceEvent(s);break}case"adoptedStyleSheetsSet":{const[e,s]=this.ti(t.type,t);s.sheetsIds=e.sheetsIds,this.produceEvent(s);break}case"adoptedStyleSheetRuleInserted":{const[e,s]=this.ti(t.type,t);s.sheetId=e.sheetId,s.rule=e.rule,s.index=e.index,this.produceEvent(s);break}case"adoptedStyleSheetRuleDeleted":{const[e,s]=this.ti(t.type,t);s.sheetId=e.sheetId,s.index=e.index,this.produceEvent(s);break}case"adoptedStyleSheetRuleUpdated":{const[e,s]=this.ti(t.type,t);s.sheetId=e.sheetId,s.rule=e.rule,s.index=e.index,this.produceEvent(s);break}}}si(t){return this.Qs&&!Ys.getProperty(t,Rn)}ei(t){switch(t.type){case"nodesAdded":case"nodesMoved":case"nodesRemoved":case"shadowRootAttached":return this.si(t.target)||ii.isMaskedElement(t.target)||ii.isMaskedElementChild(t.target);case"characterDataChanged":{const e=t.target.parentElement;return null!==e&&(this.si(e)||ii.isMaskedElement(e)||ii.isMaskedElementChild(e))}case"attributeChanged":return this.si(t.target)||ii.isMaskedElementChild(t.target)||ii.isMaskedAttribute(t.target,t.attribute);case"cssRuleInserted":case"cssRuleDeleted":case"cssRuleUpdated":return this.si(t.target)||ii.isMaskedElementChild(t.target);default:return!1}}}var On,Nn,xn,$n;!function(t){t.isDOMEvent=function(t){return"DomEvent"===t.type}}(On||(On={}));class Mn{constructor(){this.Ys=[]}start(){}stop(){this.Ys.length=0,this.Ys=[]}pushEvent(t){if(Mn.pendingEvents++,this.isListening(t)){const e=this.Ys;csSetTimeout((()=>{const s=mt("Processor:processEvent",(t=>this.processEvent(t))),i=s(t);null!=i&&csArray.prototype.forEach.call(e,(t=>t(i))),Mn.pendingEvents--}))}else csSetTimeout((()=>{csArray.prototype.forEach.call(this.Ys,(e=>e(t)))}))}subscribe(t){return csArray.prototype.push.call(this.Ys,t),()=>{this.Ys=csArray.prototype.filter.call(this.Ys,(e=>e!==t))}}emitEvent(t){Ji((()=>csArray.prototype.forEach.call(this.Ys,(e=>e(t)))))}}function Ln(t){const e=new ArrayBuffer(t.length),s=new Uint8Array(e);for(let e=0,i=t.length;ecsString.prototype.padStart.call(t.toString(16),2,"0"))),"")}function Hn(t){const e=-1!==csString.prototype.indexOf.call(t,";base64,"),s=csString.prototype.indexOf.call(t,","),i=e?[csString.prototype.substring.call(t,0,s-7),csString.prototype.substring.call(t,s+1)]:[csString.prototype.substring.call(t,0,s),csString.prototype.substring.call(t,s+1)];if(!e&&/^%3Csvg/i.test(i[1]))try{i[1]=decodeURIComponent(i[1])}catch(t){vt.warn(`${t}, calling decodeURIComponent on: ${i[1]}`)}const n=e?Un(i[1]):Ln(i[1]);return new Blob([n],{type:csString.prototype.replace.call(i[0],"data:","")})}Mn.pendingEvents=0,function(t){t.ELLIPSIS="…",t.stringReplaceAll=function(t,e,s){if("replaceAll"in csString.prototype)return csString.prototype.replaceAll.call(t,e,s);const i=new csRegExp((n=e,csString.prototype.replace.call(n,/[.*+?^${}()|[\]\\]/g,"\\$&")),"g");var n;return csString.prototype.replace.call(t,i,s)},t.truncate=function(t,e,s=""){return t.length<=e?t:csString.prototype.slice.call(t,0,e-s.length)+s}}(Nn||(Nn={}));class Bn{static async toStaticResourceEvent(t,e,s){const i=await Bn.ii(t);if(!i)return null;const n=await Bn.ni(i),r=Ti(t)?void 0:t,o={type:"StaticResourceManagerEvent",timestamp:s,resourceId:e,resource:{hash:n,data:i}};return r&&(o.originalResourceName=r),o}static async toCSSStaticResourceEvent(t,e,s,i){const n=await Bn.oi(t,i),r=Ze(t),o=n.get(r);if(!o)return null;const h={type:"StaticResourceManagerEvent",timestamp:s,resourceId:e,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 ni(t){const e=await t.arrayBuffer();return Fn(await crypto.subtle.digest(this.hi,e))}static async ii(t){let e;if(Ti(t)){const s=Hn(t);if(!s)return null;e=s}else{const s=await window.fetch(t);e=await s.blob()}return e}static async oi(t,e){const s=new Map,i=[{resourceRawPath:t,resourceAbsolutePath:Ze(t)}];for(;i.length>0;){const t=csArray.prototype.pop.call(i);if(!e&&null!==t.resourceAbsolutePath&&!Ti(t.resourceAbsolutePath))s.set(t.resourceAbsolutePath,null);else if(void 0===s.get(t.resourceAbsolutePath))try{if(null===t.resourceRawPath||csString.prototype.indexOf.call(t.resourceRawPath,".css")>0){if(!t.data){const e=await fetch(t.resourceAbsolutePath);t.data=await e.text()}t.nestedResources||(t.nestedResources=Oi(t.data));let e=!1,n=!1;for(const r of t.nestedResources){const o=Ti(r)?r:t.resourceAbsolutePath?Je(r,t.resourceAbsolutePath):Ze(r),h=s.get(o);if(void 0!==h){if(null!==h){const e=Bn.ai(h,r);t.data=Nn.stringReplaceAll(t.data,r,e)}continue}const a=void 0!==$t(i,(t=>t.resourceAbsolutePath===o));a||(e=!0,n||(csArray.prototype.push.call(i,t),n=!0),csArray.prototype.push.call(i,{resourceRawPath:r,resourceAbsolutePath:o}))}if(!e){const e=await Bn.ci(t.data);s.set(t.resourceAbsolutePath,{hash:e.hash,data:e.data})}}else{let e;if(Ti(t.resourceAbsolutePath)){const i=Hn(t.resourceAbsolutePath);if(!i){s.set(t.resourceAbsolutePath,null);continue}e=i}else{const s=await fetch(t.resourceAbsolutePath);e=await s.blob()}const i=await Bn.ni(e);s.set(t.resourceAbsolutePath,{hash:i,data:e})}}catch{s.set(t.resourceAbsolutePath,null)}}return s}static ai(t,e){let s=`cs://resources/${t.hash}`;return Ti(e)||(s+=`?${Bn.ui}=${e}`),s}static async ci(t){const e=new Blob([t],{type:"text/css"}),s=await e.arrayBuffer();return{data:e,hash:Fn(await crypto.subtle.digest(Bn.hi,s))}}}Bn.hi="SHA-256",Bn.ui="original-resource-name";class zn extends Mn{constructor(){super(),this.li="cssrm://",this.fi=0,this.gi=!1}isListening(t){return!!zn.isSupported()&&(!!On.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent))}processEvent(t){switch(t.domEvent){case"initialDOM":case"nodesAdded":this.mi(t);break;case"attributeChanged":this.pi(t);break;case"characterDataChanged":this.wi(t)}return t}disableOnlineAssets(){this.gi=!1}enableOnlineAssets(){this.gi=!0}isOnlineAssetsActivated(){return this.gi}mi(t){const e="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of e)Ys.traverse(t,((t,e)=>{if(3===t.nodeType&&e)return void this.yi(t,e.localName);if(!Fi.isElement(t))return;const s=$t(t.attributes,(t=>"style"===t.name));if(s&&(s.value=this.Ei(s.value)),this.Ai(t)||this._i(t,e)){const e=$t(t.attributes,(t=>"src"===t.name));e&&e.value&&(e.value=this.Si(e.value));const s=$t(t.attributes,(t=>"srcset"===t.name));if(s)return void(s.value=this.Ri(s.value))}if(this.bi(t)&&this.gi){const e=$t(t.attributes,(t=>"href"===t.name));if(!e||!e.value)return;this.fi++,this.Ti(Ze(e.value),this.fi,!0),this.Ii(t,e,this.fi)}}))}Ii(t,e,s){csArray.prototype.push.call(t.attributes,{name:"data-cs-original-href",namespaceURI:"",value:e.value}),e.value=this.li+s}yi(t,e){if(!t||"style"!==e)return;const s=this.Ei(t.data);null!==s&&(t.data=s)}wi(t){if("style"!==t.parentLocalName||!t.newValue)return;const e=this.Ei(t.newValue);null!==e&&(t.newValue=e)}pi(t){if(!t.newValue||t.newValue===t.oldValue)return;const e="src"===t.attribute,s="srcset"===t.attribute;if("style"===t.attribute)return void(t.newValue=this.Ei(t.newValue));if(!e&&!s)return;const i="img"===t.localName,n="source"===t.localName&&t.parentLocalName&&"picture"===t.parentLocalName;(i||n)&&(e&&(t.newValue=this.Si(t.newValue)),s&&(t.newValue=this.Ri(t.newValue)))}Si(t){return Ti(t)||this.gi?(this.fi++,this.Ti(t,this.fi,!1,xe.now()),this.li+this.fi):t}Ri(t){if(!this.gi)return t;let e=t;const s=Vi(t),i=xe.now();for(const t of s)this.fi++,this.Ti(Ze(t),this.fi,!1,i),e=csString.prototype.replace.call(e,t,this.li+this.fi);return e}Ei(t){const e=Oi(t);let s=t;const i=xe.now();for(const t of e){const e=Ti(t);if(!e&&!this.gi)continue;if(this.Pi(t))continue;this.fi++,s=csString.prototype.replace.call(s,t,this.li+this.fi);const n=Pi(t);e?this.Ti(t,this.fi,!1,i):this.gi&&(n?this.Ti(t,this.fi,!0,i):this.Ti(Ze(t),this.fi,!1,i))}return s}Ti(t,e,s,i=xe.now()){const n=s?Bn.toCSSStaticResourceEvent:Bn.toStaticResourceEvent,r=new Hi((async s=>{try{const r=await n(t,e,i,this.gi);s(r||{type:"warning",message:`Failed to process static resource: ${t}`})}catch(t){s({type:"warning",message:t})}}));this.emitEvent(r)}Ai(t){return"img"===t.localName}_i(t,e){return"source"===t.localName&&!!e&&"picture"===e.localName}bi(t){return"link"===t.localName&&csArray.prototype.some.call(t.attributes,(t=>"rel"===t.name&&"stylesheet"===t.value))}static isSupported(){return"function"==typeof window.Promise&&function(){var t;return"undefined"!=typeof crypto&&A(null===(t=crypto.subtle)||void 0===t?void 0:t.digest)}()&&!!csArray.from}Pi(t){return 0===csString.prototype.replace.call(t,/['"]+/g,"").length}}bi([Pt("StaticResourceManagerProcessor.processEvent")],zn.prototype,"processEvent",null),function(t){t.Visible="visible",t.Hidden="hidden",t.Blur="blur",t.PagehideVisible="pagehideVisible",t.PagehideHidden="pagehideHidden",t.ExitPageByNavigate="exitPageByNavigate"}(xn||(xn={}));class qn{constructor(){this.Vi=!1,this.Ci=t=>{try{switch(t.type){case"visibilitychange":return"hidden"===document.visibilityState?this.ji(xn.Hidden):this.ji(xn.Visible);case"pagehide":return"hidden"===document.visibilityState?this.ji(xn.PagehideHidden):this.ji(xn.PagehideVisible);case"blur":return this.ji(xn.Blur);case"navigate":return this.ki(t)?this.ji(xn.ExitPageByNavigate):void 0;default:return}}catch{}}}start(){this.Vi||(this.Vi=!0,this.Oi(),this.Ni(),this.xi(),Me()&&this.$i())}stop(){this.Vi&&(this.Vi=!1,this.Mi(),this.Li(),this.Di(),Me()&&this.Ui())}onEvent(t){this.ji=t}$i(){window.navigation.addEventListener("navigate",this.Ci)}Ui(){window.navigation.removeEventListener("navigate",this.Ci)}Oi(){document.addEventListener("visibilitychange",this.Ci)}Mi(){document.removeEventListener("visibilitychange",this.Ci)}Ni(){window.addEventListener("pagehide",this.Ci)}Li(){window.removeEventListener("pagehide",this.Ci)}xi(){window.addEventListener("blur",this.Ci)}Di(){window.removeEventListener("blur",this.Ci)}ki(t){return t instanceof NavigateEvent!=!1&&(!t.hashChange&&!t.downloadRequest&&!t.formData)}}!function(t){t[t.Active=0]="Active",t[t.Paused=1]="Paused",t[t.Stopped=2]="Stopped"}($n||($n={}));class Gn{constructor(t,e,s=[]){this.Fi=t,this.Hi=e,this.Bi=s,this.zi=null,this.qi=$n.Active,this.Gi=[]}reset(){this.zi=null,this.Gi=[],this.qi=$n.Active}disconnect(){this.qi=$n.Stopped}Wi(){this.Hi($n.Paused),this.qi=$n.Paused,csSetTimeout((()=>{this.qi===$n.Paused&&this.Zi()}),Gn.STOP_TIMEOUT)}Ji(){this.Hi($n.Active),this.qi=$n.Active,xt(this.Gi,this.Fi),this.Gi=[]}Zi(){this.Gi=[],this.Hi($n.Stopped),this.qi=$n.Stopped}pushEvent(t,e){if(e.isUserEvent&&(this.zi=t.date,this.qi!==$n.Active))return this.Ji(),void this.Fi(t);if(this.Yi(t))this.Fi(t);else switch(this.qi){case $n.Active:if(this.Qi(t,e))return this.Wi(),void csArray.prototype.push.call(this.Gi,t);this.Fi(t);break;case $n.Paused:csArray.prototype.push.call(this.Gi,t);case $n.Stopped:}}Qi(t,e){return!e.isUserEvent&&null!==this.zi&&t.date-this.zi>Gn.INACTIVITY_TIMEOUT}Yi(t){return csArray.prototype.indexOf.call(this.Bi,t.type)>-1}}Gn.INACTIVITY_TIMEOUT=5e3,Gn.STOP_TIMEOUT=5e3;class Wn extends ci{constructor(t,e,s,i,n,r,o,h,a,c,u,l,d,f,v=[],g,m,p,w,y){super(),this.Rt=t,this.Ki=e,this.Xi=s,this.tn=i,this.en=n,this.$t=r,this.nn=o,this.rn=h,this.hn=a,this.an=c,this.cn=u,this.un=l,this.ln=d,this.dn=f,this.fn=v,this.vn=g,this.gn=m,this.mn=p,this.wn=w,this.yn=y,this.En=0,this.An=new ai,this._n={allowFromQuotaService:!0,allowFromSerialization:!0},this.Sn=Ls((()=>{this.Ki.eventsCount()>0&&this.Rn()}),2e3),this.bn=t=>this.processBrowserEvent(t),this.Tn=t=>this.In(t),this.Pn=0,this.Vn=0,this.Cn=new qn,this.jn=!1,this.kn=51200,this.On=!1,this.Nn=!1,this.xn=[],this.$n=new Gn((t=>this.Mn(t)),(t=>{switch(t){case $n.Active:this.Ln();break;case $n.Stopped:this.Dn()}}),[Us.RESOURCE_HASHES,Us.TEXT_VISIBILITY]),this.Un=t=>{this.un.removeBatchInProgress(`${t.params.sn}.${t.params.pn}.${t.params.ri}`)}}init(){this.Fn(),this.cn.onLoad(this.Un),this.cn.onError(this.Un)}Ln(){csArray.prototype.forEach.call(this.vn,(t=>t.start()))}Dn(){csArray.prototype.forEach.call(this.vn,(t=>t.stopForInactivity()))}Fn(){var t,e,s;this.dn.onEvent(this.bn,this.Tn),null===(t=this.an)||void 0===t||t.onInputNodeToEncrypt(this.Tn),null===(e=this.an)||void 0===e||e.onApiErrorToEncrypt((t=>{this.Hn(t)})),null===(s=this.an)||void 0===s||s.onUserIdentifierToEncrypt(this.bn),this.Cn.onEvent((t=>{if(csSetTimeout((()=>this.Bn("page-state",t))),t!==xn.Visible){if(t===xn.Blur)return this.zn();if(!this.jn)return this.jn=!0,csSetTimeout((()=>{this.jn=!1})),t===xn.Hidden?this.zn():this.qn()}}))}isRecording(){return this.$t.hasValidSession()&&this.isStarted}zn(){if(!this.canSendEvents())return;this.dn.flush(),this.un.saveBatchesInProgress(),xt(this.fn,(t=>{var e,s;return xt(null!==(s=null===(e=t.getPendingEvents)||void 0===e?void 0:e.call(t))&&void 0!==s?s:[],(t=>this.Ki.addEvent(t)))}));const t=this.Ki.getEvents();if(0===t.length)return;this.Bn("pending-events",this.dn.pendingEvents);const e=this.cn.getQueryParams();e.rst=this.getRecordingStartTimestamp(),e.let=this.getRecordingLastEventTimestamp();const s=this.tn.getCurrentIndex();e.ri=s.toString(),this.ln.removeQueryParams(),this.ln.setQueryParams(e),this.Vn=t[t.length-1].date;const i=this.Ki.stringifyEvents();if(i.length>this.kn){const t=this.Gn();if(t.length>0){const s=Xt(t);this.ln.send(s)||this.un.save({key:`${e.sn}.${e.pn}.${e.ri}.last`,metadata:{...e,datatype:"json"},events:s}),this.tn.increment()}if(this.Ki.eventsCount()>0){e.ri=this.tn.getCurrentIndex().toString();const t=this.Ki.stringifyEvents();this.un.save({key:`${e.sn}.${e.pn}.${e.ri}.last`,metadata:{...e,datatype:"json"},events:t}),this.tn.increment()}}else{this.ln.send(i)||this.un.save({key:`${e.sn}.${e.pn}.${e.ri}.last`,metadata:{...e,datatype:"json"},events:i}),this.tn.increment()}this.ln.removeQueryParams(),this.Ki.clearEvents()}qn(){if(!this.canSendEvents())return;this.dn.flush();const t=this.cn.getQueryParams();this.un.saveBatchesInProgress(),t.rst=this.getRecordingStartTimestamp(),delete t.ri,t.hlm="true",this.ln.removeQueryParams(),xt(this.fn,(t=>{var e,s;return xt(null!==(s=null===(e=t.getPendingEvents)||void 0===e?void 0:e.call(t))&&void 0!==s?s:[],(t=>this.Ki.addEvent(t)))}));const e=this.Ki.getEvents();if(0===e.length)return delete t.let,delete t.rst,this.ln.setQueryParams(t),this.ln.send(),void this.ln.removeQueryParams();this.Bn("pending-events",this.dn.pendingEvents),this.Vn=e[e.length-1].date,t.let=this.getRecordingLastEventTimestamp(),this.ln.setQueryParams(t);const s=this.Ki.stringifyEvents();if(s.length>this.kn){const e=this.Gn();if(e.length>0){const s=Xt(e);this.ln.send(s)||this.un.save({key:`${t.sn}.${t.pn}.last`,metadata:{...t,datatype:"json"},events:s})}else delete t.let,delete t.rst,delete t.ri,this.ln.removeQueryParams(),this.ln.setQueryParams(t),this.ln.send(),this.ln.removeQueryParams();if(this.Ki.eventsCount()>0){t.rst=this.getRecordingStartTimestamp(),t.let=this.getRecordingLastEventTimestamp();const e=this.tn.getCurrentIndex();t.ri=e.toString();const s=this.Ki.stringifyEvents();this.un.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:s}),this.tn.increment()}}else{this.ln.send(s)||(this.un.save({key:`${t.sn}.${t.pn}.${t.ri}.last`,metadata:{...t,datatype:"json"},events:s}),this.tn.increment())}this.ln.removeQueryParams(),this.Ki.clearEvents()}blockSendingEventsFromQuotaService(){this._n.allowFromQuotaService=!1}allowSendingEventsFromQuotaService(){this._n.allowFromQuotaService=!0}blockSendingEventsFromSerialization(){this._n.allowFromSerialization=!1}allowSendingEventsFromSerialization(){this._n.allowFromSerialization=!0}canSendEvents(){return this._n.allowFromQuotaService&&this._n.allowFromSerialization}onIframeJavascriptError(t){var e;if(this.nn&&this.wn){null===(e=this.nn)||void 0===e||e.anonymize(t);const s=this.wn.translate({message:t.message,colno:t.colno,lineno:t.lineno,filename:t.filename,timestamp:xe.now(),type:"JSError"});s&&this.bn(s)}}onIframeCustomError(t){if(this.yn){const e=this.yn.translate({...t,timestamp:xe.now(),type:"CustomError"});e&&this.bn(e)}}onIframeDetailedApiError(t){this.Wn(t)}onIframeRecordingUserEvent(t){for(const e of t)this.In(e)}onIframeRecordingBrowserEvent(t){if(this.isStarted)for(const e of t)this.processBrowserEvent(e)}processBrowserEvent(t){this.en.isCurrentPageviewValid()&&this.$n.pushEvent(t,{isUserEvent:!1})}In(t){this.en.refreshSession(),this.en.isSessionValid()&&this.$n.pushEvent(t,{isUserEvent:!0})}Mn(t){wi.general.nbEvents.increase(),this.Ki.addEvent(t);this.Ki.isThresholdReached()?this.pushEvents():this.Ki.isFull()&&this.Sn(),this.Zn(t)}Zn(t){this.Rt.emitDebugEvents&&this.An.emit("recordingEvent",{...t,typeName:Us[t.type]})}onStart(){var t;this.Bn("tag-version","15.92.1"),this.Bn("page-state",document.visibilityState),this.$n.reset(),this.Cn.start(),this.initStates(),this.dn.start(),this.rn&&this.hn&&this.rn.subscribe(Wn.Jn,(t=>this.Wn(t)),{detailedEvent:!0}),this.Rt.emitDebugEvents&&this.An.emit("replayRecordingStarted"),csArray.prototype.forEach.call(this.xn,(t=>this.Yn(t))),this.xn=[],this.On&&(null===(t=this.gn)||void 0===t||t.enableOnlineAssets(),this.On=!1)}onStop(){var t;this.Cn.stop(),this.rn&&this.rn.unsubscribe(Wn.Jn),this.dn.stop(),this.$n.disconnect(),null===(t=this.gn)||void 0===t||t.disableOnlineAssets()}clearStates(){this.dn.flush(),this.Sn.cancel(),this.pushEvents(),this.cn.removeQueryParams()}initStates(){this.Pn=xe.now(),this.tn.reset(),this.En=0,this.cn.setQueryParams(this.Xi.getRequestParameters())}pushEvents(){xt(this.fn,(t=>{var e;return null===(e=t.flushEvents)||void 0===e?void 0:e.call(t)})),this.Ki.eventsCount()>0&&(this.isStarted?this.Rn():this.Ki.clearEvents())}Rn(){if(!this.canSendEvents())return;const t=this.Ki.getEvents();this.Vn=t[t.length-1].date;const e=this.tn.getCurrentIndex();this.cn.setQueryParams({ri:e.toString(),rst:this.getRecordingStartTimestamp(),let:this.getRecordingLastEventTimestamp()});const s=this.cn.getQueryParams();this.un.addBatchInProgress(`${s.sn}.${s.pn}.${e}`,this.cn.getQueryParams(),t),this.cn.send(t),this.tn.increment(),this.Ki.clearEvents(),this.Qn&&this.Qn()}addInitialDom(t){this.Ki.addEventByTimestamp(t),this.Zn(t)}Wn(t){if(this.mn&&(t.plainCustomRequestHeaders||t.plainCustomResponseHeaders||t.requestBodyAttributes||t.responseBodyAttributes||t.customRequestHeaders||t.customResponseHeaders||t.queryParameters||t.requestBody||t.responseBody)){if(this.mn.truncate(t),this.an)return void this.an.registerApiErrorToEncrypt(t);t.customRequestHeaders="",t.customResponseHeaders="",t.requestBodyAttributes="",t.responseBodyAttributes="",t.queryParameters="",t.requestBody="",t.responseBody=""}this.Hn(t)}Hn(t){if(this.En{var e;return null===(e=t.releaseResources)||void 0===e?void 0:e.call(t)}))}Bn(t,e){if(!this.Rt.emitRecordInfoEvents)return;const s={date:xe.now(),type:Us.RECORDING_INFO_EVENT,args:null==e?[t]:[t,e]};this.Ki.addEvent(s)}Gn(){return this.Ki.extractEvents(Us.API_ERROR,Us.JAVASCRIPT_ERROR,Us.CUSTOM_ERROR,Us.TEXT_VISIBILITY,Us.POINTER_DOWN)}}Wn.Jn="RecordingService",Wn.rr=255,Wn.Kn=20,Wn.ir="etrp",Wn.tr="etrs",Wn.er="1",cs([Pt("addInitialDom")],Wn.prototype,"addInitialDom",null);class Zn extends ci{constructor(t,e,s){super(),this.Te=t,this.ln=e,this.cn=s,this.hr=!1,this.ar={},this.cr=t=>{if(0!==t.length)for(const e of t){const{metadata:t,events:s}=e;this.ur(t.rt)&&this.cn.send(s,t)}},window.addEventListener("focus",(()=>{this.recover()}))}onStart(){this.ar={}}onStop(){}recover(){this.Te.recover(this.cr)}addBatchInProgress(t,e,s){this.ar[t]={metadata:{...e},events:s}}removeBatchInProgress(t){delete this.ar[t]}blockSendingLastMessage(){this.hr=!1}allowSendingLastMessage(){this.hr=!0}sendLastMessageBeacon(){if(this.hr){const{ri:t,rst:e,let:s,...i}=this.cn.getQueryParams();i.hlm="true",this.ln.setQueryParams(i),this.ln.send()}}ur(t){return!!t&&-1===csString.prototype.indexOf.call(t,Ai.RECORDING_TEMPORARILY)}saveBatchesInProgress(){csArray.prototype.forEach.call(Object.keys(this.ar),(t=>{const{metadata:e,events:s}=this.ar[t];this.Te.save({key:`${e.sn}.${e.pn}.${e.ri}`,metadata:{...e,datatype:"json"},events:csJSON.stringify(s)})}))}save(t){this.Te.save(t)}}cs([gt("RecordingRecovery")],Zn.prototype,"recover",null);class Jn{constructor(...t){this.lr=t}addProvider(t){csArray.prototype.push.call(this.lr,t)}getRequestParameters(){return csArray.prototype.reduce.call(this.lr,((t,e)=>({...e.getRequestParameters(),...t})),{})}}class Yn{constructor(t,e){this.vr=t,this.bt=e,this.gr=[{boundElement:window,type:"hashchange",listener:()=>this.hashChangeListener()},{boundElement:document,type:"visibilitychange",listener:()=>this.visibilityChangeListener()}]}onEvent(t){this.mr=t}start(){this.ns(),this.triggerInitialEvents()}stop(){this.rs()}ns(){csArray.prototype.forEach.call(this.gr,(t=>xs(t)))}rs(){csArray.prototype.forEach.call(this.gr,(t=>$s(t)))}triggerInitialEvents(){this.hashChangeListener()}hashChangeListener(){const t={type:Us.HASH_CHANGE,args:[this.bt.anonymizePII(this.vr.href)],date:xe.now()};this.mr(t)}visibilityChangeListener(){const t={type:Us.VISIBILITY_CHANGE,args:[document.visibilityState],date:xe.now()};this.mr(t)}}cs([gt("hashChange")],Yn.prototype,"hashChangeListener",null),cs([gt("visibilityChange")],Yn.prototype,"visibilityChangeListener",null);class Qn{constructor(){}onScannedAsset(t){this.pr=t}scanCssString(t){this.wr(Oi(t))}scanElement(t,e){ii.getMaskedElementDetails(t).state!==ii.MaskedElementState.NotMasked||e&&ii.isMaskedAttribute(t,e)||(C(t)?this.yr(t):V(t)?this.Er(t,e):(this.Ar(t,e),this._r(t,e),this.Sr(t,e)))}Er(t,e){var s;if((!e||"href"===e)&&t.href){const e={assetId:(null===(s=t.sheet)||void 0===s?void 0:s.href)||t.href,assetBasePath:window.location.href,assetRawPath:t.getAttribute("href")};this.pr({type:"stylesheet",asset:e})}}yr(t){var e;const s=new Set;if(t.textContent)for(const e of Oi(t.textContent))s.add(e);let i;try{i=null===(e=t.sheet)||void 0===e?void 0:e.cssRules}catch(t){"SecurityError"===t.name||"InvalidAccessError"===t.name||se.error(t.message)}if(i)for(let t=0;tthis.Rr(t))),(t=>({rawUrl:t,absoluteUrl:Ze(t)}))),(t=>{const e={assetId:t.absoluteUrl,assetBasePath:window.location.href,assetRawPath:t.rawUrl};this.pr({type:"asset",asset:e})}))}br(t){return/^https:\/\/\w+:\w+@/.test(t)}}var Kn;class Xn{constructor(t){this.Je=t}observe(){if(this.Ir=Kn.Pr.subscribe((t=>this.Je(t))),!Kn.Vr){Kn.Vr=!0,Kn.Cr.observe();ct(document,NodeFilter.SHOW_ELEMENT).visitAll((t=>{Kn.jr.add(t),Kn.Pr.next(t)}))}}disconnect(){Kn.Vr&&(this.Ir(),Kn.Pr.hasObservers()||(Kn.Vr=!1,Kn.Cr.disconnect(),Kn.Pr.clear(),Kn.jr.clear()))}}Kn=Xn,Xn.jr=Xi(),Xn.Pr=new class{constructor(t=Number.POSITIVE_INFINITY){this.kr=[],this.Gi=[],this.Or=t}next(t){this.Gi.length===this.Or&&csArray.prototype.shift.call(this.Gi),csArray.prototype.push.call(this.Gi,t),1===this.Gi.length&&csSetTimeout((()=>this.clear()));for(const e of this.kr)e(t)}subscribe(t){if($t(this.kr,(e=>t===e)))return()=>{this.kr=csArray.prototype.filter.call(this.kr,(e=>e!==t))};csArray.prototype.push.call(this.kr,t);for(const e of this.Gi)t(e);return()=>{this.kr=csArray.prototype.filter.call(this.kr,(e=>e!==t))}}clear(){this.Gi=[]}hasObservers(){return this.kr.length>0}},Xn.Nr=It((t=>{Ji((()=>{for(const e of t)"childList"===e.type&&xt(e.addedNodes,(t=>{ct(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{Kn.jr.has(t)||(Kn.jr.add(t),Kn.Pr.next(t))}))}))}))}),"ElementObserver.findAllElements"),Xn.Vr=!1,Xn.Cr=new vn(Kn.Nr),fe([gt()],Xn.prototype,"observe",null),fe([gt()],Xn.prototype,"disconnect",null);class tr{constructor(t,e=30,s=0){this.$r=t,this.Mr=e,this.Lr=s,this.Dr=new pt,this.B=!1,this.Ur=0,this.Fr=()=>{for(this.Ur=0;this.Dr.length;){if(this.Ur>=this.Mr)return void csSetTimeout(this.Fr,this.Lr);const t=xe.elapsed(),e=this.Dr.pop();if(!e)break;this.runTask(e);const s=xe.elapsed()-t;this.Ur+=s}this.B=!1}}schedule(t,e=!1){this.$r&&!e?(wi.general.pendingTasks.increase(),this.Dr.push(t),this.Hr()):t()}Hr(){this.B||(this.B=!0,csSetTimeout((()=>{this.Fr()})))}runTask(t){wi.general.pendingTasks.decrease(),t()}runPendingTasks(){this.Dr.forEach((t=>{this.runTask(t)})),this.Dr.clear()}clearQueue(){wi.general.pendingTasks.clear(),wi.mutations.pendingMutations.clear(),this.Dr.clear()}isEmpty(){return 0===this.Dr.length}}cs([gt("TaskScheduler"),Pt("runTask")],tr.prototype,"runTask",null),cs([Pt("runPendingTasks")],tr.prototype,"runPendingTasks",null);class er{constructor(){this.ze=!1,this.Br=new sn((t=>"cssRuleInserted"===t.type&&this.zr(t))),this.qr=tn((t=>{this.ze&&t.length>0&&this.Gr.schedule((()=>xt(t,(t=>this.Wr.scanElement(t)))))})),this.Zr=({type:t,asset:e})=>{var s,i,n;"stylesheet"===t&&(null===(s=this.Jr)||void 0===s||s.call(this,e)),null===(i=this.Yr)||void 0===i||i.call(this,e);const r={date:xe.now(),type:Us.STATIC_RESOURCE_URL,args:[e.assetId]};null===(n=this.mr)||void 0===n||n.call(this,r)},this.Gr=new tr(!0,30,0),this.Qr=new Xn((t=>this.Kr(t))),this.Ue=new vn((t=>this.Xr(t))),this.Wr=new Qn,this.Wr.onScannedAsset(this.Zr)}onEvent(t){this.mr=t}onAsset(t){this.Yr=t}onStyleSheetFound(t){this.Jr=t}start(){this.ze||(this.ze=!0,this.Br.observe(),this.Qr.observe(),this.Ue.observe())}stop(){this.ze&&(this.Br.disconnect(),this.Qr.disconnect(),this.Ue.disconnect(),this.ze=!1)}zr(t){t.rule&&this.ze&&this.Wr.scanCssString(t.rule)}Kr(t){this.ze&&ii.getMaskedElementDetails(t).state===ii.MaskedElementState.NotMasked&&this.qr.push(t)}Xr(t){csSetTimeout((()=>{for(const e of t)switch(e.type){case"attributes":this.Wr.scanElement(e.target,e.attributeName);break;case"characterData":this.eo(e.target)}}))}eo(t){T(t)&&csNodeparentNode.apply(t)&&C(csNodeparentNode.apply(t))&&this.Wr.scanCssString(t.data)}}class sr{constructor(t){this.so=[],this.io=[],this.we={},this.ye=t}setQueryParams(t){csArray.prototype.forEach.call(Object.keys(t),(e=>{this.we[e]=t[e]}))}removeQueryParams(t){t?csArray.prototype.forEach.call(t,(t=>{delete this.we[t]})):this.we={}}onBeaconSuccess(t){csArray.prototype.push.call(this.so,t)}onBeaconFailure(t){csArray.prototype.push.call(this.io,t)}send(t){const e=ce.toQuery({...this.we,ct:_s.UNCOMPRESSED}),s=this.no(e,t);return s?csArray.prototype.forEach.call(this.so,(t=>t())):csArray.prototype.forEach.call(this.io,(t=>t(this.we))),s}no(t,e){try{if("function"!=typeof csNavigatorsendBeacon)return!1;const s=csNavigatorsendBeacon(`${this.ye}?${t}`,e||"");if(s)return s}catch{}return"function"==typeof navigator.sendBeacon&&navigator.sendBeacon(`${this.ye}?${t}`,e||"")}}class ir{constructor(t){this.ro={},this.oo=new ri(t)}save({key:t,metadata:e,events:s}){this.oo.isThresholdReached()||(this.oo.addString(t),"string"==typeof s?this.oo.addString(s):this.oo.addArrayBuffer(s),this.oo.isThresholdReached()||(this.ro[t]={metadata:e,events:s}))}recover(t){const e=[];csArray.prototype.forEach.call(this.ho(),(t=>{const s=this.ro[t];void 0!==s&&(delete s.metadata.datatype,csArray.prototype.push.call(e,s),this.ao(t))})),0!==e.length&&(t(e),this.oo.reset())}ho(){return Object.keys(this.ro)}ao(t){delete this.ro[t]}}var nr,rr;!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"}(nr||(nr={}));class or{constructor(t,e,s){this.co=t,this.uo=s,this.lo=nr.NOT_STARTED,this.do=[],this.fo=0,this.vo=self.origin,this.mo="object"==typeof window?"":"worker-",this.oo=new ri(e),this.po()}async po(){await this.wo(),this.lo===nr.READY?this.yo():this.uo(this.do)}yo(){csArray.prototype.forEach.call(this.do,(t=>{this.save(t)})),this.do=[]}async save(t){try{if(this.lo===nr.OPEN_IN_PROGRESS)return void csArray.prototype.push.call(this.do,t);if(this.lo!==nr.READY)return;if(this.oo.isThresholdReached())return;const{key:e,metadata:s,events:i}=t;if(this.oo.addString(e),"string"==typeof i?this.oo.addString(i):this.oo.addArrayBuffer(i),this.oo.isThresholdReached())return;await this.Eo.put(`${this.vo}/${e}`,new Response(i,{headers:s}))}catch{}}async recover(t){(this.Eo||(await this.wo(),this.lo===nr.READY))&&this.Ao(t)}async wo(){try{this.lo=nr.OPEN_IN_PROGRESS,this.Eo=await self.caches.open(`${this.mo}${this.co}`),this.lo=nr.READY}catch{this.lo=nr.OPEN_FAILED}}async Ao(t){try{if(this.fo++,this.fo>1)return;const e=await this.Eo.keys();if(0===e.length)return;const s=await this.Eo.matchAll(),i=csArray.prototype.map.call(s,(t=>{const e={};t.headers.forEach(((t,s)=>{e[s]=t})),delete e["content-type"];const s=e.datatype;return delete e.datatype,"json"===s||"base64"===s?t.text().then((t=>({metadata:e,events:t}))):t.arrayBuffer().then((t=>({metadata:e,events:t})))})),n=await Promise.all(i);await Promise.all(csArray.prototype.map.call(e,(t=>this.Eo.delete(t)))),t(n),this.oo.reset()}catch{}finally{this.fo--}}}class hr{constructor(t){try{this._o(t)}catch(t){this.So()}}_o(t){self.caches?this.Ro(t):this.So()}save(t){this.bo.save(t)}recover(t){this.bo.recover(t)}Ro(t){this.bo=new or(t,hr.To,(t=>{this.So(t)}))}So(t){this.bo=new ir(hr.To),t&&csArray.prototype.forEach.call(t,(t=>{this.bo.save(t)}))}}hr.To=16777216;class ar extends Mn{isListening(t){return On.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent)}processEvent(t){let e=0;const s="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const i of s){if(i instanceof Fi){const t=ii.getMaskedAttributeDetails(i);i.attributes=this.Io(i,t)}if(ii.getMaskedElementDetails(i).state!==ii.MaskedElementState.Child)Ys.traverse(i,(t=>{if(t instanceof Fi){const s=ii.getMaskedAttributeDetails(t);t.attributes=this.Io(t,s);const i=ii.getMaskedElementDetails(t);i.state===ii.MaskedElementState.Parent&&(this.Po(t,i),e++)}}));else{if("initialDOM"===t.domEvent)return null;t.nodes=csArray.prototype.filter.call(t.nodes,(t=>t!==i))}}return e>0&&me.counters.sensitiveElements.count("masked-elements",e),t}Io(t,e){return 0===e.attributes.length?t.attributes:csArray.prototype.filter.call(t.attributes,(t=>-1===csArray.prototype.indexOf.call(e.attributes,t.name)))}Po(t,e){const s=`width: ${e.width}px !important; height: ${e.height}px !important;`;t.children=[],t.shadowRoot=void 0,csArray.prototype.push.call(t.attributes,{name:"style",value:s,namespaceURI:""}),Fi.getAttribute(t,"data-cs-mask")||csArray.prototype.push.call(t.attributes,{name:"data-cs-mask",value:"",namespaceURI:""})}}bi([Pt("MaskedElementProcessor.processEvent")],ar.prototype,"processEvent",null),function(t){t.ANONYMIZED_TEXT_STATUS_PROP="anonymizationStatus",t.WHITELISTED_STATUS="whitelisted",t.isWhitelistedElement=function(e){return Ys.getProperty(e,t.ANONYMIZED_TEXT_STATUS_PROP)===t.WHITELISTED_STATUS},t.whitelistElement=function(e){Ys.setProperty(e,t.ANONYMIZED_TEXT_STATUS_PROP,t.WHITELISTED_STATUS)},t.removeWhitelistElement=function(e){Ys.setProperty(e,t.ANONYMIZED_TEXT_STATUS_PROP,void 0)}}(rr||(rr={}));const cr=/[\u4E00-\u9FFF]|[\u3000-\u303F]|[\u3040-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]/g,ur=/[^a\s]/g;function lr(t){const e=csString.prototype.replace.call(t,cr,"a");return csString.prototype.replace.call(e,ur,"a")}const dr=["id","class","style","srcset","sizes","rel","type","width","height","media","align","dir","bgcolor","color","border","colspan","rowspan","cols","rows","size","start","slot","data-cs-override-id"],fr=t=>{const e=new Set(dr);return csArray.prototype.forEach.call(t,(t=>{e.add(t)})),e},vr=["svg","slot"],gr={href:new Set(["a"]),src:new Set(["iframe"])};class mr{constructor(t,e,s,i=null,n=!1){this.Vo=t,this.Co=e,this.bt=s,this.jo=i,this.ko=n,this.Oo=fr(this.Co)}xo(t,e=null,s=!0){const i=this.bt.checkAndAnonymizePII(t,e);if(this.ko)for(const t of this.bt.getLogs())s?(me.counters.redactedPII.count("cc-in-text-nodes"),vt.implementation(`${t} - text-node`)):vt.implementation(`${t} - attribute`);return i}sanitize(t){return Ys.traverse(t,((t,e)=>{if(t.anonymized=this.Vo,3===t.nodeType){const{anonymizedValue:s,withAnonymization:i}=this.getAnonymizedValue(t.data,null==e?void 0:e.localName,e?Ys.getProperties(e):void 0);return t.anonymized=i,void(t.data=s)}if(Fi.isElement(t))return this.$o(t);4!==t.nodeType||(t.data=this.Vo?lr(t.data):this.xo(t.data,this.jo))})),t}setAnonymization(t){this.Vo=t}getAnonymizedValue(t,e,s){if("style"===e)return{anonymizedValue:t,withAnonymization:!1};const i=(null==s?void 0:s[rr.ANONYMIZED_TEXT_STATUS_PROP])===rr.WHITELISTED_STATUS;return this.Vo&&!i?{anonymizedValue:lr(t),withAnonymization:!0}:{anonymizedValue:this.xo(t,this.jo),withAnonymization:!1}}$o(t){if(Ys.getProperty(t,"SVG"))return;const e=$t(t.attributes,(t=>"type"===t.name)),s=null==e?void 0:e.value;t.attributes=csArray.prototype.map.call(t.attributes,(e=>(e.anonymized=this.Vo,e.value=this.getAnonymizedAttributeValue(t.localName,e.name,e.value,s),e)))}getAnonymizedAttributeValue(t,e,s,i){return this.Mo(t,e,i)?s:(t=>gr.hasOwnProperty(t))(e)?((t,e,s)=>{var i;return(null===(i=gr[e])||void 0===i?void 0:i.has(t))&&!Ti(s)})(t,e,s)?this.bt.anonymizePII(s):s:this.Vo&&((t,e,s)=>("submit"===s||"button"===s)&&"input"===t&&"value"===e)(t,e,i)?lr(s):this.Vo?"":this.xo(s,null,!1)}Mo(t,e,s){return((t,e,s)=>"radio"===s&&"input"===t&&"name"===e||csArray.prototype.indexOf.call(vr,t)>-1)(t,e,s)||this.Oo.has(e)}}class pr{static create(t,e){if(!pr.isSupported())throw new Error("IntersectionObserver is not supported");if(e&&e.delay&&e.delay<100)throw new Error("Visibility delay should be > 100ms");return(null==e?void 0:e.trackVisibility)&&(t=pr.Lo(t)),new IntersectionObserver(t,e)}static isSupported(){return!!window.IntersectionObserver&&!!window.IntersectionObserverEntry}static Lo(t){return(e,s)=>t(Ot(e,wr),s)}}function wr(t){return t.isVisible||!Bt.isVisibleInViewportInForeground(t.target)?t:{boundingClientRect:t.boundingClientRect,intersectionRatio:t.intersectionRatio,intersectionRect:t.intersectionRect,isIntersecting:t.isIntersecting,rootBounds:t.rootBounds,target:t.target,time:t.time,isVisible:!0}}var yr;const Er=()=>(t,e,s)=>{s.value=function(t){const e=csSymbol("oncePerTickSymbol");let s=null;const i={},n=function(){var n;const r=null!==(n=this)&&void 0!==n?n:i;if(s=arguments,r[e])return;r[e]=!0;Ar((()=>{r[e]=!1,t.apply(r,s)}))};return n.oncePerTickSymbol=e,n}(s.value)},Ar=null!==(yr=n.csQueueMicrotask)&&void 0!==yr?yr:csSetTimeout;Er.isScheduled=(t,e)=>t[e.oncePerTickSymbol];class _r{constructor(t){this.Je=t,this.Do=new Map,this.Uo=t=>{const e=t.target;if(this.Do.has(e))return!0;let s=!1;return this.Do.forEach(((t,i)=>{!s&&this.Do.get(i).subtree&&(s=i.contains(e))})),s},wi.general.nbOfMutationObservers.increase(),this.Ue=new csMutationObserver((e=>{Er.isScheduled(this,this.garbageCollect)&&(e=Dt(e,this.Uo)),e.length&&Ji((()=>t(e,this)))}))}disconnect(){wi.general.nbOfMutationObservers.decrease(),this.Ue.disconnect(),this.Do=new Map}takeRecords(){return this.Ue.takeRecords()}observe(t,e){return wi.mutations.elementMutationObserved.increase(),this.Do.set(t,e),this.Ue.observe(t,e)}unobserve(t){this.Do.has(t)&&(wi.mutations.elementMutationObserved.decrease(),this.Do.delete(t),this.garbageCollect())}garbageCollect(){wi.mutations.unobserveGarbageCollection.measure((()=>{const t=Dt(this.takeRecords(),this.Uo);t.length&&this.Je(t,this),this.Ue.disconnect(),this.Do.forEach(((t,e)=>this.Ue.observe(e,t)))}))}}fe([Er()],_r.prototype,"garbageCollect",null);class Sr{constructor(t){this.Je=t,this.Fo=new Set}onMutations(t){if(Mt(t,(t=>{var e;return!!(null===(e=t.removedNodes)||void 0===e?void 0:e.length)})))for(const t of this.Fo.values())Bt.isConnected(t)||(this.Fo.delete(t),this.Je(t))}observe(t){this.Xs||(this.Xs=new vn((t=>csSetTimeout((()=>this.onMutations(t))))),this.Xs.observe()),this.Fo.add(t)}disconnect(){var t;null===(t=this.Xs)||void 0===t||t.disconnect(),this.Fo.clear(),this.Xs=void 0}}fe([gt("NodeDisconnectedObserver.onMutations")],Sr.prototype,"onMutations",null);class Rr{constructor(t){this.Ho=new Set,this.Bo=new Sr((t=>this.zo(t))),this.ze=!1,this.qo=t?{...Tr,...t}:Tr}stop(){var t,e;this.ze=!1,null===(t=this.Go)||void 0===t||t.disconnect(),null===(e=this.Ue)||void 0===e||e.disconnect()}start(t){if(this.ze)throw new Error("VisibilityObserver is already started");this.Je=mt("VisibilityObserver:callback",((e,s)=>t(e,s)));const e={root:null,rootMargin:"0px",threshold:.5,trackVisibility:!0,delay:300};this.Go=pr.create((t=>this.handleIntersection(t)),e),this.Ue=new _r((t=>csSetTimeout((()=>{xt(t,(t=>this.zo(t.target)))})))),this.po(),this.ze=!0}observe(t){if(!this.ze)throw new Error("Observer is stopped.");!1===this.qo.reobserve&&t[this.Wo]||(wi.visibilityObserver.nbElements.increase(),t[this.Wo]=!0,this.watchIntersection(t))}po(){this.Zo=csSymbol("isVisible"),this.Wo=csSymbol("ObservedElement"),this.Jo=csSymbol("LinkedElement"),this.Yo=csSymbol("Tracked")}zo(t){this.Ho.add(t);for(const e of this.Qo(t))this.Ho.add(e);this.recheckCssVisibilityAll()}recheckCssVisibilityAll(){xt(this.Ho.keys(),(t=>{t.isConnected&&!Bt.areAncestorsHiddenByCSS(t)&&t[this.Wo]&&this.watchIntersection(t)})),this.Ho.clear()}watchIntersection(t){this.Ue.unobserve(t),this.Go.unobserve(t);const e=Bt.getTopAncestorHiddenByCSS(t);e?(e!==t&&(this.Ko(e,t),this.watchMutation(e)),this.watchMutation(t)):this.Go.observe(t)}watchMutation(t,e=!0){e&&delete t[this.Zo],this.Go.unobserve(t);this.Ue.observe(t,{attributeFilter:["style","class","hidden"]})}handleIntersection(t){for(const e of t){const t=e.target;if(!e.isVisible){Bt.isVisibleInDocument(t)||this.Xo(t);continue}const s=this.qo.allowSameMatch||!e.target[this.Zo];e.target[this.Zo]=!0,s&&!this.qo.delay&&this.onVisibilityChanged(e.target,br.VisibleInViewPort)}this.qo.delay&&csSetTimeout((()=>{for(const e of t){const t=e.isIntersecting&&e.isVisible;e.target[this.Zo]&&t&&this.onVisibilityChanged(e.target,br.VisibleInViewPort)}}),this.qo.delay)}Xo(t){wi.visibilityObserver.hiddenElements.increase();const e=Bt.getTopElement(t);this.watchMutation(t),e&&(this.Bo.observe(e),this.Ko(e,t),this.watchMutation(e,!1))}Ko(t,e){var s;(t[this.Jo]=null!==(s=t[this.Jo])&&void 0!==s?s:new Set).add(e)}Qo(t){var e,s;const i=[];return xt(null!==(s=null===(e=t[this.Jo])||void 0===e?void 0:e.values())&&void 0!==s?s:[],(t=>csArray.prototype.push.call(i,t))),i}onVisibilityChanged(t,e){if(e===br.VisibleInViewPort&&this.qo.trackOnce){if(this.Go.unobserve(t),this.Ue.unobserve(t),t[this.Yo])return;t[this.Yo]=!0}this.Je(t,e)}static isSupported(){return pr.isSupported()}}var br;fe([gt()],Rr.prototype,"observe",null),fe([Ds({wait:50}),gt(),Pt("recheckCssVisibilityAll")],Rr.prototype,"recheckCssVisibilityAll",null),fe([gt()],Rr.prototype,"watchIntersection",null),fe([gt()],Rr.prototype,"watchMutation",null),fe([gt(),Pt("VisibilityObserver.handleIntersection")],Rr.prototype,"handleIntersection",null),fe([gt()],Rr.prototype,"onVisibilityChanged",null),function(t){t.VisibleInViewPort="VisibleInViewPort",t.HiddenByAnother="HiddenByAnother",t.Hidden="Hidden"}(br||(br={}));const Tr={delay:1e3,trackOnce:!0,reobserve:!1};class Ir{constructor(t){this.Je=t,this.jr=Xi(),this.th=t=>{Ji((()=>{for(const e of t)"childList"===e.type&&xt(e.addedNodes,(t=>{ct(t,NodeFilter.SHOW_TEXT).visitAll((t=>{this.jr.has(t)||(this.jr.add(t),this.Je(t))}))}))}))},this.Cr=new vn(this.th)}observe(){this.Cr.observe();ct(document,NodeFilter.SHOW_TEXT).visitAll((t=>{this.jr.add(t),this.Je(t)}))}disconnect(){this.jr.clear(),this.Cr.disconnect()}}var Pr,Vr,Cr;!function(t){t.ENCRYPTED_NODE_PROP="toEncrypt",t.shouldEncrypt=function(e){return!0===Ys.getProperty(e,t.ENCRYPTED_NODE_PROP)},t.markEncryptedNode=function(e){Ys.setProperty(e,t.ENCRYPTED_NODE_PROP,!0)},t.unmarkEncryptedNode=function(e){Ys.setProperty(e,t.ENCRYPTED_NODE_PROP,void 0)}}(Pr||(Pr={})),function(t){t.EDITABLE_NODE_PROP="editableNode",t.isEditableNode=function(e){return!0===Ys.getProperty(e,t.EDITABLE_NODE_PROP)},t.markEditableNode=function(e){Ys.setProperty(e,t.EDITABLE_NODE_PROP,!0)},t.unmarkEditableNode=function(e){Ys.setProperty(e,t.EDITABLE_NODE_PROP,void 0)}}(Vr||(Vr={}));bi([gt()],class extends Cn{constructor(t){super(),this.eh=new Set,this.ih=new Set,this.nh=!1,this.rh=new Set,this.Vo=!1,this.oh=new Rr(t),this.hh=new Ir((t=>{const e=Bt.getParentElement(t);!e||!e.isConnected||ii.isMaskedElement(e)||ii.isMaskedElementChild(e)||Pr.shouldEncrypt(e)||Vr.isEditableNode(e)||C(e)||O(e)||k(e)||R(t.data)||(this.eh.add(e),this.ah())}))}onStart(){Rr.isSupported()&&(this.oh.start(((t,e)=>this.onVisibilityChanged(t,e))),this.hh.observe())}onStop(){Rr.isSupported()&&(this.oh.stop(),this.hh.disconnect(),this.eh.clear(),this.ih.clear(),this.rh.clear(),this.nh=!1)}setAnonymization(t){this.Vo=t}ah(){this.nh||(this.nh=!0,Ki((()=>{if(!this.isStarted)return;this.nh=!1;const t=this.eh;this.eh=new Set;for(const e of Ft(t))e.isConnected&&!this.ih.has(e)&&(this.ih.add(e),Mt(csNodechildNodes.apply(e),(t=>3===t.nodeType))&&this.oh.observe(e))}),1001))}onVisibilityChanged(t,e){e!==br.VisibleInViewPort||this.Vo&&!rr.isWhitelistedElement(t)||xt(csNodechildNodes.apply(t),(t=>{if(3!==t.nodeType)return;const s=t.data;this.rh.has(s)||(this.rh.add(s),this.produceEvent({type:"TextVisibility",text:s,state:e}))}))}}.prototype,"onVisibilityChanged",null),function(t){t.isTextVisibilityEvent=function(t){return"TextVisibility"===t.type}}(Cr||(Cr={}));class jr extends Mn{constructor(t,e,s,i=null){super(),this.bt=s,this.jo=i;this.uh=new mr(t,e,s,i,!0)}setAnonymization(t){this.uh.setAnonymization(t)}isListening(t){return Cr.isTextVisibilityEvent(t)||On.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"attributeChanged"===t.domEvent||"characterDataChanged"===t.domEvent)}processEvent(t){if(Cr.isTextVisibilityEvent(t))return t.text=this.bt.checkAndAnonymizePII(t.text,this.jo),t;switch(t.domEvent){case"initialDOM":case"nodesAdded":this.fh(t);break;case"attributeChanged":this.gh(t);break;case"characterDataChanged":this.mh(t)}return t}fh(t){const e="initialDOM"===t.domEvent?[t.initialDOM]:t.nodes;for(const t of e)this.uh.sanitize(t)}gh(t){t.isSvg||t.newValue&&(null!==t.localName?t.newValue=this.uh.getAnonymizedAttributeValue(t.localName,t.attribute,t.newValue,t.inputType):t.newValue="")}mh(t){t.newValue=this.uh.getAnonymizedValue(t.newValue,t.parentLocalName,t.parentProps).anonymizedValue}}bi([Pt("AnonymizedTextProcessor.processEvent")],jr.prototype,"processEvent",null);class kr extends Mn{constructor(t){super(),this.ph=t}isListening(t){return On.isDOMEvent(t)&&"initialDOM"===t.domEvent}processEvent(t){return"initialDOM"===t.domEvent&&(t.initialDOM.baseURI=this.ph.anonymizeUrl(t.initialDOM.baseURI)),t}}bi([Pt("UrlAnonymizationProcessor.processEvent")],kr.prototype,"processEvent",null);const Or="textarea";class Nr extends Mn{isListening(t){return On.isDOMEvent(t)&&("initialDOM"===t.domEvent||"nodesAdded"===t.domEvent||"characterDataChanged"===t.domEvent)}processEvent(t){switch(t.domEvent){case"initialDOM":this.yh(t);break;case"nodesAdded":this.Eh(t);break;case"characterDataChanged":this.Ah(t)}return t}yh(t){Ys.traverse(t.initialDOM,((t,e)=>{(this._h(t,e)||this.Sh(t))&&(t.data=this.Rh(t.data))}))}Eh(t){for(const e of t.nodes)Ys.traverse(e,((e,s)=>{(this.bh(e,s,t)||this.Sh(e))&&(e.data=this.Rh(e.data))}))}Ah(t){var e;(t.parentLocalName===Or||(null===(e=t.targetProps)||void 0===e?void 0:e.editableNode))&&(t.newValue=this.Rh(t.newValue))}Rh(t){return csString.prototype.replace.call(t,/\S/g,"•")}bh(t,e,s){return this.Th(t,s)||this._h(t,e)}Th(t,e){return 3===t.nodeType&&e.targetLocalName===Or}_h(t,e){return 3===t.nodeType&&w(e)&&e.localName===Or}Sh(t){return 3===t.nodeType&&Vr.isEditableNode(t)}}bi([Pt("AnonymizedEditableTextProcessor.processEvent")],Nr.prototype,"processEvent",null);class xr{constructor(t){this.Je=t,this.Ih={boundElement:window,type:"resize",listener:()=>this.resizeListener()},this.Je=t}observe(){xs(this.Ih),this.ds()}ds(){this.resizeListener()}disconnect(){$s(this.Ih)}resizeListener(){const t={width:Ct.windowWidth(),height:Ct.windowHeight()};this.Je(t)}}var $r,Mr,Lr,Dr,Ur,Fr,Hr;fe([gt("resize")],xr.prototype,"resizeListener",null),function(t){t.PORTRAIT="Portrait",t.LANDSCAPE="Landscape"}($r||($r={})),function(t){t.PORTRAIT_PRIMARY="portrait-primary",t.PORTRAIT_SECONDARY="portrait-secondary",t.LANDSCAPE_PRIMARY="landscape-primary",t.LANDSCAPE_SECONDARY="landscape-secondary"}(Mr||(Mr={})),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"}(Lr||(Lr={})),function(t){let e=null;t.isScreenOrientationApiSupported=()=>{var t;return null!=e?e:e=!!(null===(t=n.screen)||void 0===t?void 0:t.orientation)},t.isDeprecatedScreenOrientationApiSupported=()=>"orientation"in n,t.getCurrentOrientation=function(){return t.isScreenOrientationApiSupported()?function(){var t;switch(null===(t=n.screen.orientation)||void 0===t?void 0:t.type){case Mr.PORTRAIT_PRIMARY:case Mr.PORTRAIT_SECONDARY:return $r.PORTRAIT;case Mr.LANDSCAPE_PRIMARY:case Mr.LANDSCAPE_SECONDARY:return $r.LANDSCAPE;default:return $r.PORTRAIT}}():t.isDeprecatedScreenOrientationApiSupported()?function(){switch(window.orientation){case Lr.PORTRAIT:case Lr.PORTRAIT_REVERSE:return $r.PORTRAIT;case Lr.LANDSCAPE:case Lr.LANDSCAPE_REVERSE:return $r.LANDSCAPE;default:return $r.PORTRAIT}}():$r.LANDSCAPE}}(Dr||(Dr={}));class Br extends Cn{constructor(){super(...arguments),this.Ph=null,this.Vh=null,this.Ch=new xr((t=>{this.produceEvent({...t,type:"viewportResize"}),this.onScreenPotentiallyChanged()}))}onScreenPotentiallyChanged(){const t=Dr.getCurrentOrientation(),{screenWidth:e,screenHeight:s}=this.jh(t);if(e!==this.Ph||s!==this.Vh){this.Ph=e,this.Vh=s;const t={type:"screenResize",width:e,height:s};this.produceEvent(t)}}jh(t){let e,s;const i=Ct.screenWidth(),n=Ct.screenHeight();return t===$r.PORTRAIT?(e=i,s=n):(e=Math.max(i,n),s=Math.min(i,n)),{screenWidth:e,screenHeight:s}}onStart(){this.Ch.observe()}onStop(){this.Ph=null,this.Vh=null,this.Ch.disconnect()}}function zr(t){const e=csEventtarget.apply(t);return e&&b(e)&&csElementshadowRoot.apply(e)&&t.composedPath?t.__csOriginalTarget||t.composedPath()[0]:e}class qr{get selectors(){return""===this.kh?null:this.kh}constructor(t,e={closest:!1}){this.Je=t,this.qo=e,this.kh="",this.Oh=Xi(),this.Xr=It((t=>{if(""===this.kh)return;const e=[];for(const s of Nt(t,(t=>t.addedNodes))){if(!($(s)||this.qo.closest&&T(s)))continue;Ut(this.qo.closest?this.Nh(s,this.kh):this.findMatchingElements(s,this.kh),e)}e.length&&this.Je(e,"added")}),"SelectorObserver.processMutations"),this.xh=(t,e)=>{if(""===this.kh||"added"!==e)return;const s=this.findMatchingElements(t,this.kh);s.length&&this.Je(s,"added")},this.Xs=new vn(this.Xr,this.xh)}observe(t){""===this.kh?this.Xs.observe():this.kh+=",",this.kh+=t;const e=this.findMatchingElements(document,t);for(const s of this.Xs.shadowRoots){Ut(this.findMatchingElements(s,t),e)}e.length&&(xt(e,(t=>{this.Oh.add(t)})),this.Je(e,"initial"))}processPendingMutations(){this.Xr(this.Xs.takeRecords())}disconnect(){this.Xs.disconnect(),this.Oh.clear(),this.kh=""}Nh(t,e){const s=[];if(T(t)){if(t.parentElement){const i=si(t.parentElement,e);i&&csArray.prototype.push.call(s,i)}return csArray.prototype.filter.call(s,(t=>!1===this.Oh.has(t)))}if(_(t)){const i=si(t,e);if(i)return csArray.prototype.push.call(s,i),csArray.prototype.filter.call(s,(t=>!1===this.Oh.has(t)))}return this.findMatchingElements(t,e)}findMatchingElements(t,e){const s=kt(window.csquerySelectorAll[t.nodeType].call(t,e));return b(t)&&W.call(t,e)&&csArray.prototype.push.call(s,t),csArray.prototype.filter.call(s,(t=>!1===this.Oh.has(t)))}}fe([gt()],qr.prototype,"observe",null),fe([gt()],qr.prototype,"disconnect",null),fe([Pt("SelectorObserver.findMatchingElements")],qr.prototype,"findMatchingElements",null);class Gr extends Cn{constructor(){super(),this.$h=t=>{const e=zr(t);e&&this.Mh(e,t.type)},this.ss=new Ns(((t,e)=>{switch(e){case"initial":case"added":this.Lh(t);break;case"removed":this.Dh(t)}})),this.Uh=new qr(((t,e)=>{"initial"!==e&&"added"!==e||this.Fh(t)}))}static shouldProcessElement(t){return"VIDEO"===t.tagName&&Bt.isConnected(t)&&!ii.isMaskedElement(t)&&!ii.isMaskedElementChild(t)}static isPlaying(t){return!t.paused&&!t.ended}onStart(){this.Lh(document),this.ss.observe(),this.Uh.observe("video")}onStop(){this.Dh(document),this.ss.disconnect(),this.Uh.disconnect()}Mh(t,...e){if(this.isStarted&&Gr.shouldProcessElement(t))for(const s of e){const e={type:"VideoEvent",videoEventType:s,nodeId:Xs(t)};"seeked"===s&&(e.newTimePositionInSec=t.currentTime),Bi((()=>this.produceEvent(e)))}}Fh(t){for(const e of t)this.Mh(e,"seeked"),Gr.isPlaying(e)&&this.Mh(e,"play")}Lh(t){for(const e of["play","pause","seeked"])xs({type:e,listener:this.$h,boundElement:t})}Dh(t){for(const e of["play","pause","seeked"])$s({type:e,listener:this.$h,boundElement:t})}}function Wr(t){return"INPUT"===t.nodeName}function Zr(t){return Wr(t)&&"number"===t.type}function Jr(t){return Wr(t)&&("checkbox"===t.type||"radio"===t.type)}class Yr extends Cn{constructor(t){super(),this.an=t,this.Hh=Xi(),this.Bh=t=>this.inputHandler(t),this.zh=[],this.qh(),this.Gh(),this.Uh=new qr((t=>{for(const e of t)this.Wh(e)&&Ji((()=>{this.Zh(e,Xs(e))}),"low")})),this.ss=new Ns(((t,e)=>{switch(e){case"initial":case"added":xs({type:"change",listener:this.Bh,boundElement:t});break;case"removed":$s({type:"change",boundElement:t,listener:this.Bh})}}))}onStart(){xs({type:"keyup",boundElement:document,listener:this.Bh}),xs({type:"change",boundElement:document,listener:this.Bh}),xt(this.zh,(t=>t.activate())),this.Uh.observe(csArray.prototype.join.call(Yr.Jh,",")),this.ss.observe()}onStop(){$s({type:"keyup",boundElement:document,listener:this.Bh}),$s({type:"change",boundElement:document,listener:this.Bh}),xt(this.zh,(t=>t.deactivate())),this.Uh.disconnect(),this.ss.disconnect(),this.Hh.clear()}Zh(t,e){var s,i,n;if(this.Hh.has(t))return;if(this.Hh.add(t),function(t){return"SELECT"===t.nodeName}(t)){const e={type:"InputEvent",inputType:"select",target:Xs(t),selectedIndex:t.selectedIndex,timestamp:xe.now()};return void this.produceEvent(e)}if(Jr(t)){const e={type:"InputEvent",inputType:"checkable",target:Xs(t),checked:t.checked,timestamp:xe.now()};return void this.produceEvent(e)}const r=function(t){return"TEXTAREA"===t.nodeName||Wr(t)&&!Zr(t)&&!Jr(t)}(t),o=Zr(t);if(r||o){const r=null!==(s=t.value)&&void 0!==s?s:"";if(null===(i=this.an)||void 0===i?void 0:i.shouldEncrypt(t))return void(null===(n=this.an)||void 0===n||n.registerInputNodeToEncrypt({targetId:e,targetValue:r,date:xe.now()}));const h=o?"0":"•",a={type:"InputEvent",inputType:"text",target:Xs(t),value:csString.prototype.replace.call(r,/\S/g,h),timestamp:xe.now()};this.produceEvent(a)}}inputHandler(t){if(!this.isStarted)return;const e=qs(t),s=Xs(e);s&&this.Wh(e)&&Bt.isConnected(e)&&Ji((()=>{this.Zh(e,s)}),"low")}qh(){this.trackChanges(HTMLInputElement,"checked"),this.trackChanges(HTMLInputElement,"value"),this.trackChanges(HTMLTextAreaElement,"value")}Gh(){this.trackChanges(HTMLSelectElement,"selectedIndex"),this.trackChanges(HTMLSelectElement,"value"),this.trackChanges(HTMLOptionElement,"selected",!0)}trackChanges(t,e,s=!1){const i=ks(t.prototype,e,((t,e,i)=>{if(i!==e&&Bt.isConnected(t)){const e=s?t.parentElement:t;this.Yh(e)}}));i&&csArray.prototype.push.call(this.zh,i)}Wh(t){return!ii.isMaskedElement(t)&&!ii.isMaskedElementChild(t)&&(j(t)||x(t)||k(t))}Yh(t){if(this.isStarted&&Bt.isConnected(t)){const e=Xs(t);e&&this.Wh(t)&&Ji((()=>{this.Zh(t,e)}),"low")}}}Yr.Jh=["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"],bi([as()],Yr.prototype,"inputHandler",null),bi([gt()],Yr.prototype,"trackChanges",null);class Qr extends Cn{constructor(){super(),this.Qh="object"==typeof window.customElements&&"function"==typeof window.customElements.whenDefined&&"function"==typeof window.Promise,this.Kh=mt("CustomElementRegistrationProducer:onElementsFound",(t=>{for(const s of t)ii.isMaskedElement(s)||ii.isMaskedElementChild(s)||b(e=s)&&y(e.tagName)&&csString.prototype.indexOf.call(e.tagName,"-")>0&&-1===csString.prototype.indexOf.call(e.tagName,":")&&-1===csString.prototype.indexOf.call(e.tagName,'"')&&-1===csString.prototype.indexOf.call(e.tagName,",")&&csArray.prototype.indexOf.call(U,csString.prototype.toLocaleLowerCase.call(e.tagName))<0&&this.register(csString.prototype.toLowerCase.call(s.tagName));var e}));const t=tn(this.Kh);this.Qr=new Xn((e=>t.push(e))),this.eh=new Set}onStart(){this.Qh&&this.Qr.observe()}onStop(){this.eh.clear(),this.Qr.disconnect()}async register(t){this.eh.has(t)||(this.eh.add(t),await window.customElements.whenDefined(t),this.produceEvent({type:"CustomElementRegistration",tagName:csString.prototype.toLowerCase.call(t)}))}}bi([gt()],Qr.prototype,"register",null);class Kr{static isNavigationTimingObserverSupported(){var t,e;return(null==(null===(t=window.PerformanceObserver)||void 0===t?void 0:t.supportedEntryTypes)?void 0:csArray.prototype.indexOf.call(null===(e=window.PerformanceObserver)||void 0===e?void 0:e.supportedEntryTypes,"navigation"))>=0}static getTimeOrigin(){return window.performance.timeOrigin}static Xh(){if(this.isNavigationTimingObserverSupported())return new window.PerformanceObserver((t=>Kr.ta(t)))}static ta(t){const e=t.getEntriesByType("navigation")[0];e&&(this.sa=e,Kr.ia(e))}static De(t){this.na(t),this.sa&&t(this.sa),this.ra||this.oa()}static na(t){this.ha.add(t)}static aa(t){this.ha.delete(t)}static oa(){if(this.ca||(this.ca=this.Xh()),!this.ca)return this.sa||(this.sa={requestStart:window.performance.timing.requestStart,domInteractive:window.performance.timing.domInteractive}),void this.ia(this.sa);this.ca.observe({type:"navigation",buffered:!0}),this.ra=!0}static ia(t){this.ha.forEach((e=>e(t)))}static Ze(t){this.aa(t),0===this.ha.size&&this.ua()}static ua(){var t;this.ra&&(null===(t=this.ca)||void 0===t||t.disconnect(),this.ra=!1,this.sa=null,this.ca=this.Xh())}constructor(t){this.Je=t}observe(){Kr.De(this.Je)}disconnect(){Kr.Ze(this.Je)}}Kr.ra=!1,Kr.ha=new Set,Kr.sa=null;class Xr extends Cn{constructor(){super(...arguments),this.da=null,this.fa=new Kr((t=>{if(this.da)return;const e=this.va(t);e&&(this.da=e,this.produceEvent(e))}))}onStart(){this.da?this.produceEvent(this.da):this.fa.observe()}onStop(){this.fa.disconnect()}va(t){const e=Kr.getTimeOrigin();return{type:"PerformanceTiming",timings:{timeOrigin:e,requestStart:Math.floor(e+t.requestStart),domInteractive:Math.floor(e+t.domInteractive)},timestamp:xe.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"}(Ur||(Ur={})),function(t){t[t.UP=1]="UP",t[t.DOWN=2]="DOWN",t[t.LEFT=3]="LEFT",t[t.RIGHT=4]="RIGHT"}(Fr||(Fr={}));class to{compute(t,e){const s=this.ma(e.x)-this.ma(t.x),i=this.ma(e.y)-this.ma(t.y),n=e.time-t.time;return{duration:n,distance:this.pa(s,i),direction:this.wa(s,i),velocity:this.ya(s,i,n)}}computePinchMetrics(t,e){const s=this.ma(e.x)-this.ma(t.x),i=this.ma(e.y)-this.ma(t.y);return{duration:e.time-t.time,distance:this.pa(s,i)}}getScale(t,e){return Math.abs(e/t-1)}ma(t){return t/window.devicePixelRatio}pa(t,e){return Math.round(Math.sqrt(t*t+e*e))}ya(t,e,s){const i=s/1e3,n=t/i,r=e/i;return Math.round(Math.abs(n)+Math.abs(r))}wa(t,e){return Math.abs(t)>Math.abs(e)?t>0?Fr.RIGHT:Fr.LEFT:e>0?Fr.DOWN:Fr.UP}}const eo="undefined"!=typeof performance&&!!performance.now,so=eo?()=>performance.now():csDate.now,io=eo?null===(Hr=performance.timing)||void 0===Hr?void 0:Hr.navigationStart:0,no={now:()=>Math.round(so()+io),elapsed:()=>so()};function ro(t,e=0){const s=Math.pow(10,e);return Math.round(t*s)/s}class oo{constructor(){this.Ea={},this.Aa=()=>{},this._a=new to,this.Sa()}static isGestureDetectionSupported(){return"undefined"!=typeof devicePixelRatio}onGesture(t){this.Aa=t}isValidTouchEvent(t){return"touches"in t&&"changedTouches"in t}processActionDown(t){if(!this.Ra(t))return;this.ba(t)&&this.Sa();const e={x:t.touches[0].clientX,y:t.touches[0].clientY,time:no.now()};if(1===t.touches.length)this.Ea.startPinchTime=e.time,this.Ea.firstTouch=e;else if(2===t.touches.length&&(this.Ea.secondTouch={x:t.touches[1].clientX,y:t.touches[1].clientY,time:no.now()},this.Ea.firstTouch&&this.Ea.secondTouch)){const t=this._a.computePinchMetrics(this.Ea.firstTouch,this.Ea.secondTouch);this.Ta=t.distance}csArray.prototype.push.call(this.Ia,e),this.Pa=qs(t)}processActionMove(){this.Va=!0}processActionUp(t){if(this.Ca(t)){if(csArray.prototype.push.call(this.Ia,{x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:no.now()}),this.ja(t)&&this.Ea.startPinchTime){const e={x:t.touches[0].clientX,y:t.touches[0].clientY,time:this.Ea.startPinchTime},s={x:t.changedTouches[0].clientX,y:t.changedTouches[0].clientY,time:no.now()};this.Ea.firstTouch&&(this.Ea.firstTouch=e,this.Ea.secondTouch=s),this.ka(t)}this.Ta||this.Oa()&&this.Na(t)}}Sa(){this.Ia=[],this.Pa=null,this.Va=!1,this.Ta=null,this.xa=!0}Na(t){const e=this._a.compute(this.Ia[0],this.Ia[1]);this.xa=t.isTrusted;const s=this.Va?this.$a(e):this.Ma(e);if(this.La(s.type,t.changedTouches)){const e=t.changedTouches[0];s.pageX=ro(e.pageX,1),s.pageY=ro(e.pageY,1)}this.Aa(s,t)}ka(t){if(!this.Ea.firstTouch||!this.Ea.secondTouch)return;const e=this._a.computePinchMetrics(this.Ea.firstTouch,this.Ea.secondTouch);this.xa=t.isTrusted;const s=this.Da(e);s&&this.Aa(s,t)}Da(t){if(!this.Ta)return;if(this._a.getScale(this.Ta,t.distance)<.1)return;return{type:this.Ta>t.distance?Ur.PINCH_IN:Ur.PINCH_OUT,target:this.Pa,distance:t.distance,isTrusted:this.xa}}$a(t){return{type:t.velocity<100?Ur.DRAG:Ur.FLICK,target:this.Pa,velocity:t.velocity,distance:t.distance,direction:t.direction,isTrusted:this.xa}}Ma(t){return{type:t.duration<1e3?Ur.TAP:Ur.LONG_PRESS,target:this.Pa,isTrusted:this.xa}}La(t,e){return t===Ur.TAP&&e&&1===e.length}ba(t){return 1===t.touches.length}Oa(){return 2===this.Ia.length}Ra(t){return t.touches.length>0}Ca(t){return t.changedTouches.length>0}ja(t){return this.Va&&!!this.Ta&&1===t.changedTouches.length&&1===t.touches.length}}class ho{constructor(t){this.Je=t}observe(){ho.Ua&&ho.Fa(this.Je)}disconnect(){ho.Ua&&ho.Ha(this.Je)}static Ba(t,e){csArray.prototype.forEach.call(Ft(ho.ha),(s=>s(t,e)))}static Fa(t){ho.ha.has(t)||(ho.ha.add(t),1===ho.ha.size&&(ho.za.onGesture(ho.Ba),csArray.prototype.forEach.call(ho.gr,(t=>xs(t)))))}static Ha(t){ho.ha.delete(t),0===ho.ha.size&&csArray.prototype.forEach.call(ho.gr,(t=>$s(t)))}static qa(t){if(ho.za.isValidTouchEvent(t))switch(t.type){case"touchstart":ho.za.processActionDown(t);break;case"touchmove":ho.za.processActionMove();break;case"touchend":ho.za.processActionUp(t)}}}ho.gr=[{boundElement:n.document,type:"touchstart",listener:t=>ho.qa(t)},{boundElement:n.document,type:"touchmove",listener:t=>ho.qa(t)},{boundElement:n.document,type:"touchend",listener:t=>ho.qa(t)}],ho.Ua=oo.isGestureDetectionSupported(),ho.ha=new Set,ho.za=new oo;class ao extends Cn{constructor(){super(),this.Ga=new ho(this.Wa.bind(this))}onStart(){this.Ga.observe()}onStop(){this.Ga.disconnect()}Wa(t){const e=this.Za(t);e&&this.produceEvent(e)}Za(t){if(!this.Ja(t))return null;const e=(s=t.target,Ys.getProperty(s,Ks));var s;return e?{type:"Gesture",targetId:e,data:{type:t.type,direction:t.direction,distance:t.distance,velocity:t.velocity,pageX:t.pageX,pageY:t.pageY}}:null}Ja(t){return null!==t.target&&!(b(t.target)&&ii.isMaskedElementChild(t.target))}}let co=[],uo=!1;const lo=It((function(){const t=csDate.now();for(let e=0;e=35)return co=csArray.prototype.slice.call(co,e+1),void csSetTimeout(lo);co=[],uo=!1}),"executeTasks");var fo;!function(t){t[t.Started=0]="Started",t[t.Stopped=1]="Stopped",t[t.Processing=2]="Processing",t[t.Completed=3]="Completed"}(fo||(fo={}));class vo{constructor(){this.Ya=new pt,this.qi=fo.Stopped,this.Je=null,this.Qa=t=>{this.qi!==fo.Stopped&&t&&(this.Je(t),this.Ka())}}get queueLength(){return this.Ya.length}start(t){if(this.Je)throw new Error("callback already set");this.qi=fo.Started,this.Je=t}push(t){this.Ya.push(t),this.Xa()}stop(){this.Je=null,this.qi=fo.Stopped,this.Ya.clear()}static pipe(t,e){let s=t;const i=new csArray;for(const t of e){const e=new vo;e.start((e=>{t.pushEvent(e)})),csArray.prototype.push.call(i,e),xt(s,(t=>t.subscribe((t=>e.push(t))))),s=[t]}const n=new go(i);return xt(s,(t=>t.subscribe((t=>n.push(t))))),n}tc(){return this.qi===fo.Stopped}sc(){return this.qi===fo.Processing}Ka(){this.tc()||(this.Ya.isEmpty?this.qi=fo.Completed:(this.qi=fo.Processing,function(t){if(csArray.prototype.push.call(co,t),!uo){for(let t=0;t<3;t++)csSetTimeout(lo);uo=!0}}((()=>{const t=this.Ya.pop();t instanceof Hi?t.complete(this.Qa):this.Qa(t)}))))}Xa(){this.tc()||this.sc()||this.Ka()}}class go extends vo{constructor(t){super(),this.nc=t}get queueLength(){return csArray.prototype.reduce.call(this.nc,((t,e)=>t+e.queueLength),0)}stop(){super.stop(),xt(this.nc,(t=>t.stop()))}}class mo{constructor(t,e=[]){this.producers=t,this.processors=e,this.ze=!1,this.ha=[]}get pendingEvents(){var t,e;return null!==(e=null===(t=this.Ya)||void 0===t?void 0:t.queueLength)&&void 0!==e?e:0}start(){if(this.ze)throw new Error("Recording is already started.");const t=this.ha;this.Ya=vo.pipe(this.producers,this.processors),this.Ya.start((e=>csArray.prototype.forEach.call(t,(t=>t(e))))),xt(this.producers,(t=>t.start())),xt(this.processors,(t=>t.start())),this.ze=!0}stop(){this.Ya.stop(),this.ha.length=0;for(const t of this.producers)t.stop();for(const t of this.processors)t.stop();this.ze=!1,this.ha=[]}subscribe(t){if(this.ze)throw new Error("Recording is already started.");return csArray.prototype.push.call(this.ha,t),()=>this.ha=csArray.prototype.filter.call(this.ha,(e=>e!==t))}}class po extends Cn{constructor(t){super(),this.fn=t}subscribe(t){return super.subscribe(t)}onStart(){xt(this.fn,(t=>{t.onEvent((e=>{var s;return this.Fi(e,null!==(s=t.eventType)&&void 0!==s?s:"browser")}))})),xt(this.fn,(t=>{var e;null===(e=t.start)||void 0===e||e.call(t)}))}onStop(){xt(this.fn,(t=>{var e;return null===(e=t.stop)||void 0===e?void 0:e.call(t)}))}Fi(t,e){this.produceEvent({timestamp:xe.now(),type:"Legacy",originalEvent:t,eventType:e})}}function wo(t){const e=function(t){const e={type:yo(t.type)};for(const s in t){const i=t[s];void 0!==i&&"type"!==s&&(e[s]=i)}return e}(t.data);return{type:Us.GESTURE_RECOGNITION,args:[t.targetId,e],date:t.timestamp}}function yo(t){switch(t){case Ur.DRAG:case Ur.FLICK:return Hs.SWIPE;case Ur.LONG_PRESS:return Hs.LONG_PRESS;case Ur.TAP:return Hs.TAP;case Ur.PINCH_IN:return Hs.PINCH_IN;case Ur.PINCH_OUT:return Hs.PINCH_OUT}}function Eo(t){return function(t,e){let s=[],i=!1;return{push(t){csArray.prototype.push.call(s,t),s.length!==e.batchSize?e.autoFlushDelay&&e.autoFlushDelay>0&&!i&&(i=!0,csSetTimeout((()=>{i=!1,s.length>0&&this.flush()}),e.autoFlushDelay)):this.flush()},flush(){if(!s.length)return;const e=s;s=[],t(e)}}}((e=>{const s={visibleInViewPort:e},i={type:Us.TEXT_VISIBILITY,date:xe.now(),args:[s]};t(i)}),{batchSize:20,autoFlushDelay:1e3})}var Ao;!function(t){t.REQUEST_START="requestStart",t.DOM_INTERACTIVE="domInteractive",t.TIME_ORIGIN="timeOrigin"}(Ao||(Ao={}));let _o=0;class So{get pendingEvents(){return this.rc.pendingEvents}constructor(t,e,s,i,n){this.rc=t,this.oc=e,this.hc=s,this.wn=i,this.yn=n,this.ac=()=>{},this.cc=()=>{},this.lc=Eo((t=>this.ac(t)))}start(){var t,e;this.fc={processEvent(t,e){if(t.originalEvent.type===Us.PERFORMANCE_RESOURCE_TIMING)return _o>=500?null:(_o+=1,e({...t.originalEvent,date:t.timestamp}));e(t.originalEvent)},reset(){_o=0}},this.rc.subscribe((t=>{var e,s,i,n,r,o;const h=t,{timestamp:a}=h;switch(h.type){case"Legacy":{const t="user"===h.eventType?null!==(e=this.cc)&&void 0!==e?e:()=>{}:this.ac;this.fc.processEvent(h,t)}break;case"CustomElementRegistration":this.ac({type:Us.CUSTOM_ELEMENT_REGISTRATION,date:a,args:[h.tagName]});break;case"DomEvent":!function(t,e,s){const{timestamp:i}=t;switch(t.domEvent){case"initialDOM":{const{initialDOM:e}=t,n={type:Us.INITIAL_DOM,date:i,args:[e]};s.emitInitialDomDone(n);break}case"nodesAdded":csArray.prototype.forEach.call(t.nodes,(s=>{e({type:Us.MUTATION_INSERT,date:i,args:[t.target,t.nextSibling,s]})}));break;case"nodesMoved":for(const s of t.nodesIds)e({type:Us.MUTATION_MOVE,date:i,args:[s,t.nextSibling,t.target]});break;case"nodesRemoved":csArray.prototype.forEach.call(t.nodesIds,(t=>{e({type:Us.MUTATION_REMOVE,date:i,args:[t]})}));break;case"attributeChanged":{const{target:s,namespace:n,attribute:r,newValue:o}=t;e({type:Us.MUTATION_ATTRIBUTE,date:i,args:[s,n,r,o]});break}case"characterDataChanged":{const{target:s,newValue:n}=t;e({type:Us.MUTATION_CHARACTER_DATA,date:i,args:[s,n]});break}case"cssRuleInserted":{const{target:s,rule:n,index:r}=t,o=w(r)?[s,n,r]:[s,n];e({type:Us.STYLESHEET_RULE_INSERT,date:i,args:o});break}case"cssRuleDeleted":{const{target:s,index:n}=t;e({type:Us.STYLESHEET_RULE_DELETE,date:i,args:[s,n]});break}case"cssRuleUpdated":{const{target:s,rule:n,index:r}=t;e({type:Us.STYLESHEET_RULE_UPDATE,date:i,args:[s,n,r]});break}case"shadowRootAttached":{const{target:s,shadowRoot:n}=t;e({type:Us.ATTACH_SHADOW,date:i,args:[s,n]});break}case"adoptedStyleSheetRegistered":{const{sheetId:s,cssRules:n}=t;e({type:Us.REGISTER_ADOPTED_STYLE_SHEET,date:i,args:[s,{cssRules:n}]});break}case"adoptedStyleSheetsSet":{const{target:s,sheetsIds:n}=t;e({type:Us.SET_ADOPTED_STYLE_SHEETS,date:i,args:[s,n]});break}case"adoptedStyleSheetRuleInserted":{const{sheetId:s,rule:n,index:r}=t,o=w(r)?[s,n,r]:[s,n];e({type:Us.ADOPTED_STYLESHEET_RULE_INSERT,date:i,args:o});break}case"adoptedStyleSheetRuleDeleted":{const{sheetId:s,index:n}=t;e({type:Us.ADOPTED_STYLESHEET_RULE_DELETE,date:i,args:[s,n]});break}case"adoptedStyleSheetRuleUpdated":{const{sheetId:s,rule:n,index:r}=t,o=[s,n,r];e({type:Us.ADOPTED_STYLESHEET_RULE_UPDATE,date:i,args:o});break}default:se.error("translateDOMEvent: DOMEvent not supported")}}(h,this.ac,this.oc);break;case"InputEvent":{const t=function(t){switch(t.inputType){case"text":return{type:Us.INPUT_TEXT,args:[t.target,t.value],date:t.timestamp};case"select":return{type:Us.INPUT_SELECT,args:[t.target,t.selectedIndex],date:t.timestamp};case"checkable":return{type:Us.INPUT_CHECKABLE,args:[t.target,t.checked],date:t.timestamp}}}(h);null===(s=this.cc)||void 0===s||s.call(this,t);break}case"encryptedCharacterDataChanged":{const{target:t,rawData:e,encryptedData:s,encryptionMetadata:i}=h;this.ac({type:Us.MUTATION_ENCRYPTED_CHARACTER_DATA,date:a,args:[t,e,s,i]});break}case"StaticResource":{const{url:t}=h;this.ac({type:Us.STATIC_RESOURCE_URL,date:a,args:[t]});break}case"ResizeMaskedElement":{const{target:t,width:e,height:s}=h;this.ac({type:Us.MUTATION_ATTRIBUTE,date:a,args:[t,"","style",`width:${e}px !important;height:${s}px !important;`]});break}case"Gesture":{const e=wo(t);null===(i=this.cc)||void 0===i||i.call(this,e);break}case"TextVisibility":this.lc.push(h.text);break;case"StaticResourceManagerEvent":null===(n=this.hc)||void 0===n||n.processEvent(h);break;case"screenResize":{const{width:t,height:e}=h,s={type:Us.SCREEN_RESIZE,date:a,args:[t,e]};this.ac(s);break}case"viewportResize":{const{width:t,height:e}=h,s={type:Us.RESIZE,date:a,args:[t,e]};this.ac(s);break}case"PerformanceTiming":this.ac(function(t){return{type:Us.PERFORMANCE_TIMINGS,args:[{performanceTiming:Ao.REQUEST_START,timestamp:t.timings.requestStart},{performanceTiming:Ao.DOM_INTERACTIVE,timestamp:t.timings.domInteractive},{performanceTiming:Ao.TIME_ORIGIN,timestamp:t.timings.timeOrigin}],date:t.timestamp}}(h));break;case"CustomError":{const t=null===(r=this.yn)||void 0===r?void 0:r.translate(h);t&&this.ac(t);break}case"JSError":{const t=null===(o=this.wn)||void 0===o?void 0:o.translate(h);t&&this.ac(t);break}case"VideoEvent":{const t=function(t){switch(t.videoEventType){case"play":return{type:Us.VIDEO_PLAY,args:[t.nodeId],date:t.timestamp};case"pause":return{type:Us.VIDEO_PAUSE,args:[t.nodeId],date:t.timestamp};case"seeked":{const e=t;return{type:Us.VIDEO_SEEK,args:[e.nodeId,e.newTimePositionInSec],date:t.timestamp}}default:return null}}(h);t&&this.ac(t);break}case"warning":se.warn(h.message);break;default:se.error(`WebRecorderEventTranslator: Event not supported (${h.type})`)}})),this.oc.emitInitialDomStart(),null===(t=this.wn)||void 0===t||t.start(),null===(e=this.yn)||void 0===e||e.start(),this.rc.start()}stop(){var t,e,s;this.reset(),this.flush(),this.rc.stop(),null===(t=this.hc)||void 0===t||t.flushEvents(),null===(e=this.wn)||void 0===e||e.stop(),null===(s=this.yn)||void 0===s||s.stop()}flush(){this.lc.flush()}onEvent(t,e){var s;this.ac=t,this.cc=e,null===(s=this.hc)||void 0===s||s.onEvent((t=>this.ac(t)))}reset(){this.fc.reset()}}class Ro{constructor(t,e,s){this.oc=t,this.$t=e,this.vc=s,this.gc=Ri.ETR_DISABLED,this.mc=Ri.ETR_PENDING,this.wc=!0}getEtrStatus(t){void 0===t&&(t=this.$t.getSession());const e=null==t?void 0:t.etrStatus;return this.yc()&&e===Ri.ETR_SAVED_SESSION?e:this.gc}onEventTriggerRecording(t,e){switch(e){case Si.ETR_PAGE:this.Ec(Ri.ETR_SAVED_PAGE);break;case Si.ETR_LEGACY:case Si.ETR_SESSION:this.Ec(Ri.ETR_SAVED_SESSION)}}handleCollectStateChange(t){this.wc=!1,t?this.Ac(this.mc):this.Ac(Ri.ETR_DISABLED)}handleArtificialPageview(){this.vc?(this.wc=!0,this.Ac(Ri.ETR_DISABLED)):this.yc()&&this.Ac(Ri.ETR_PENDING)}handleSessionRenewal(){this.wc=!0,this.Ac(Ri.ETR_DISABLED)}Ac(t){this.gc=t,this.mc=Ri.ETR_PENDING,this._c(t),this.oc.emitRecordingContextChange()}Ec(t){this.wc?Number(t)>Number(this.mc)&&(this.mc=t):this.yc()&&Number(t)>Number(this.gc)&&(this.gc=t,this._c(t),this.oc.emitRecordingContextChange())}_c(t){const e=this.$t.getSession();null!==e&&e.etrStatus===Ri.ETR_NOT_SAVED_SESSION&&t===Ri.ETR_SAVED_SESSION&&(e.etrStatus=t,this.$t.setSession(e))}yc(){return this.gc!==Ri.ETR_DISABLED}}const bo="v2/recording",To=["isRecording"],Io=["replay:resourceManager:enableForOnlineResource:nextPageviewOnly","cssrm:onlineAssets:activateForNextPageview"],Po=["replay:resourceManager:getStatus","cssrm:getStatus"];class Vo{constructor(t,e,s,i,n,r,o,h,a,c,u,l,d,f,v,g,m,p,w,y,E,A){this.Sc=t,this.$t=e,this.Rt=s,this.Rc=i,this.bc=n,this.bt=r,this.en=o,this.Tc=h,this.nn=a,this.rn=c,this.hn=u,this.Ic=l,this.oc=d,this.Pc=f,this.Vc=v,this.Cc=g,this.jc=m,this.ph=p,this.mn=w,this.kc=y,this.Oc=E,this.an=A}init(){const t=[],e=[];csArray.prototype.push.call(e,new ar),this.Nc=new jr(this.kc.shouldUseAnonymization(),this.Rt.whitelistedAttributes,this.bt,this.Rt.anonymizeDigits),this.xc();const s=new hr("csPersisted");this.$c(s);const i=new hi;this.Ki=new oi;const n=new er;csArray.prototype.push.call(t,n);const r=new Jn(i,this.Rc,{getRequestParameters:()=>({let:this.recordingService.getRecordingLastEventTimestamp()})},{getRequestParameters:()=>({rst:this.recordingService.getRecordingStartTimestamp()})},{getRequestParameters:()=>({rt:csArray.prototype.join.call(this.$t.getCollectStates(),",")})}),o=new sr(`${this.Rt.getRecordingUri()}/${bo}`);csArray.prototype.push.call(e,this.Nc),csArray.prototype.push.call(e,new kr(this.ph)),csArray.prototype.push.call(e,new Nr),this.Mc=new ni,this.Mc.init(),csArray.prototype.push.call(t,this.Mc),this.un=new Zn(s,o,this.cn),csArray.prototype.push.call(t,new Yn(window.location,this.bt));const h=new kn,a=new Br,c=new Gr,u=new Yr(this.an),l=new Qr,d=[a,this.Tc,h,new po(csArray.prototype.filter.call(t,(t=>t))),l,new Xr,new ao,u,c];const f=new mo(d,e),v=new So(f,this.oc,this.hc,this.wn,this.yn),g=[h,a,c,u,l];this.recordingService=new Wn(this.Rt,this.Ki,r,i,this.en,this.$t,this.nn,this.rn,this.hn,this.an,this.cn,this.un,o,v,t,g,this.gn,this.mn,this.wn,this.yn),this.Pc.addListener(this.recordingService),this.Vc.addListener(this.recordingService),this.recordingService.init(),this.bc.register(To,(()=>this.$t.isReplayRecorded()&&!this.Cc.isUrlExcludedForSessionReplay())),this.bc.register(Io,(()=>{this.recordingService.activateOnlineAssetsOnNextPageview(),this.oc.emitRecordingContextChange()})),this.bc.register(Po,(()=>this.recordingService.getStaticResourceManagerStatus())),this.Lc=new Ro(this.oc,this.$t,this.Rt.malkaUrlEnabled),this.Pc.addListener(this.Lc),this.Sc.enableRecordingContext(this.recordingService,this.$t,this.Lc),this.Dc()}onAfterNaturalPageView(){var t;this.Cc.isUrlExcludedForSessionReplay()?this.recordingService.resetOnlineAssetsOnPageview():this.recordingService.updateOnlineAssetsOnPageview(),null===(t=this.Uc)||void 0===t||t.initState()}onStartTracking(){this.un.recover(),this.xc(),this.$t.isReplayRecorded()&&!this.Cc.isUrlExcludedForSessionReplay()&&(this.$t.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Fc())}onArtificialPageViewEnd(){!this.$t.isReplayRecorded()||this.Cc.isUrlExcludedForSessionReplay()||this.$t.isTemporarilyRecorded()||this.un.sendLastMessageBeacon(),this.recordingService.clearStates()}onBeforeArtificialPageView(){this.Lc.handleArtificialPageview()}onAfterArtificialPageView(){this.xc(),this.$t.isReplayRecorded()&&!this.Cc.isUrlExcludedForSessionReplay()?(this.$t.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.recordingService.updateOnlineAssetsOnPageview(),this.Hc()):(this.recordingService.resetOnlineAssetsOnPageview(),this.Bc())}onBeforeSessionRenewal(){this.Lc.handleSessionRenewal(),this.recordingService.clearStates(),this.Bc()}onOptout(){this.Bc(),this.recordingService.onOptOut()}onReplayUnanonymizationConsentGranted(){this.xc(),this.recordingService.triggerUnanonymizationConsentGranted(),this.oc.emitRecordingContextChange()}onReplayUnanonymizationConsentWithdrawn(){this.xc(),this.recordingService.triggerUnanonymizationConsentWithdrawn(),this.oc.emitRecordingContextChange()}onCollectStateChange(t,e){if(t===Ai.QUOTA_REACHED||t===Ai.ANALYTICS_ONLY&&e===_i.ETR_OFF)this.recordingService.clearEvents(),this.Bc();else{this.cn.setQueryParams({rt:csArray.prototype.join.call(this.$t.getCollectStates(),",")}),this.recordingService.allowSendingEventsFromQuotaService(),this.recordingService.pushEvents();const s=t===Ai.ANALYTICS_ONLY&&e===_i.ETR_ON;this.Lc.handleCollectStateChange(s)}}onInitialDomStart(){this.recordingService.blockSendingEventsFromSerialization(),this.un.blockSendingLastMessage()}onInitialDomDone(t){this.recordingService.allowSendingEventsFromSerialization(),this.recordingService.addInitialDom(t),this.un.allowSendingLastMessage(),this.Mc.start(),this.recordingService.pushEvents()}onAfterReplayRecordingConsentGranted(){this.$t.isReplayRecorded()&&!this.Cc.isUrlExcludedForSessionReplay()&&(this.$t.isTemporarilyRecorded()&&this.recordingService.blockSendingEventsFromQuotaService(),this.Fc(),this.recordingService.triggerRecordingForSessionGranted())}onAfterReplayRecordingConsentWithdrawn(){this.recordingService.isRecording()&&(this.recordingService.triggerRecordingForSessionWithdrawn(),this.recordingService.clearStates(),this.Bc())}Dc(){var t,e,s,i;if(null===(e=null===(t=this.Rt.experimental.sessionReplay)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.filterByHostSelector){xt(null===(i=null===(s=this.Rt.experimental.sessionReplay)||void 0===s?void 0:s.shadowRoot)||void 0===i?void 0:i.filterByHostSelector,(t=>{ei(t)&&vn.setShadowRootFilter((e=>{try{return W.call(e.host,t)}catch{return!1}}))}))}}Fc(){this.recordingService.start(),this.un.start(),this.oc.emitRecordingContextChange()}Bc(){!function(t=!1){t&&(Qs=1),Ks=csSymbol("nodeIdentifier")}(),this.recordingService.stop(),this.un.stop(),this.oc.emitRecordingContextChange()}Hc(){this.Bc(),this.Fc()}$c(t){this.cn=this.jc.create(`${this.Rt.getRecordingUri()}/${bo}`,!0,"byteArray",t,["rt","v","pid","pn","sn","uu"])}xc(){var t;const e=this.kc.shouldUseAnonymization();this.Nc.setAnonymization(e),null===(t=this.zc)||void 0===t||t.setAnonymization(e)}}var Co,jo;cs([Pt("Recording.onStartTracking")],Vo.prototype,"onStartTracking",null),cs([Pt("onInitialDomDone")],Vo.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"}(Co||(Co={})),function(t){t.isReplayConsentNeeded=function(t){return t.replayConsentRequiredForSession},t.isRecordingBlockedByConsent=function(t){return t.collectState===Ai.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED||t.collectState===Ai.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN},t.isRecordingWithDrawn=function(t){return t.collectState===Ai.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN}}(jo||(jo={}));class ko{constructor(t,e,s,i){this.xt=t,this.$t=e,this.Rt=s,this.qc=i,this.Gc=!1}isNaturalPageViewSent(){return this.Gc}setNaturalPageViewSent(t){this.Gc=t}getTrackingContext(){const t=this.$t.getSession();if(!t)return null;const e=this.getSessionKey();if(!e)return null;const s=this.Rt.projectId,i=this.Rt.uxaDomain;return{projectId:s,sessionKey:e,pageNumber:t.pageNumber,pageViewType:this.qc.getPageViewType(),isRecording:this.$t.isReplayRecorded(),uxaDomain:i,recordingConsentState:this.Wc(t),...this.Rt.smbConfig}}getSessionKey(){const t=this.xt.getVisitor();return t?`${t.id}.${t.visitsCount}`:null}Wc(t){return jo.isReplayConsentNeeded(this.Rt)?t.collectState===Ai.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED?Co.NOT_EXPRESSED:t.collectState===Ai.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN?Co.WITHDRAWN:Co.GRANTED:Co.NOT_NEEDED}}class Oo{constructor(t){this.Zc=t,this.Jc=[]}handleCommand(t){if(A(t)&&(this.Yc(t),this.Zc.isNaturalPageViewSent())){const e=this.Zc.getTrackingContext();null!==e&&this.Qc(t,e)}}Yc(t){csArray.prototype.push.call(this.Jc,t)}executeRegisteredCallbacks(){const t=this.Zc.getTrackingContext();null!==t&&csArray.prototype.map.call(this.Jc,(e=>this.Qc(e,t)))}Qc(t,e){csSetTimeout((()=>{t(e)}))}}class No{constructor(t){this.Zc=t,this.Kc=[]}handleCommand(t){return this.Zc.isNaturalPageViewSent()?this.Xc(t):void this.tu(t)}Xc(t){const e=this.Zc.getSessionKey();return this.eu(t)&&null!==e&&this.Qc(t.callback,e),e}tu(t){this.eu(t)&&csArray.prototype.push.call(this.Kc,t.callback)}flushPendingCallbacks(){const t=this.Zc.getSessionKey();null!==t&&csArray.prototype.forEach.call(this.Kc,(e=>{this.Qc(e,t)})),this.Kc=[]}eu(t){return t&&"function"==typeof t.callback}Qc(t,e){csSetTimeout((()=>{t(e)}))}}class xo{constructor(t,e){this.su=t,this.Zc=e}onTrackingContextRequestCallback(t){const e=this.Zc.getTrackingContext();null!==e&&this.su.sendToChildren(is.TrackingContextResultMessage,{...t,trackingContext:e})}onIframeIntegrationCallback(t){if(!this.Zc.isNaturalPageViewSent())return;const e=this.Zc.getTrackingContext();null!==e&&(t.trackingContext=e,this.su.sendToChildren(is.IntegrationCallback,t))}sendAfterPageViewCallbackToChildren(){const t=this.Zc.getTrackingContext();if(null===t)return;const e={trackingContext:t,initiator:es.AfterPageView};this.su.sendToChildren(is.IntegrationCallback,e)}}function $o(t,e){const{isRecording:s,pageNumber:i,projectId:n,siteId:r,uxaDomain:o,csLiteDomain:h}=t,a=/^(.+)\.(\d+)$/.exec(t.sessionKey);let c;if(s&&a){const[,t,s]=a;c=r?`${h}/sites/${r}/player?uu=${t}&sn=${s}&pn=${i}`:`${o}/quick-playback/index.html?pid=${n}&uu=${t}&sn=${s}&pvid=${i}&recordingType=cs`,e.withTimestamp&&(c+="&t="+(xe.now()-e.recordingStartTimestamp))}return{replayLink:c,isRecording:s}}class Mo{constructor(t){this.Zc=t}handleCommand(t,e){p(t)&&A(e)&&this.Qc(t,e)}Qc(t,e){csSetTimeout((()=>{const s=this.Zc.getTrackingContext();if(s){const i=$o(s,t);e(i)}}))}}function Lo(t,e){let s,i,n,r,o=null;const h=a=>{const c=xe.elapsed();if(!a&&null!==o){const t=e-(c-o);if(t>0)return void(i=window.csSetTimeout(h,t))}const u=c-n;i=null,o=null,n=null,r=t(u,...s)},a=(...t)=>{if(s=[...t],!n)return n=xe.elapsed(),i=window.csSetTimeout(h,e),r;o=xe.elapsed()};return a.flushPending=()=>{i&&(window.csClearTimeout(i),h(!0))},a.cancel=()=>{o=null,n=null,i&&(window.csClearTimeout(i),i=null)},a}function Do(t=0){return(e,s,i)=>{const n=i.value;let r=!1;i.value=function(...e){r||(r=!0,csSetTimeout((()=>{r=!1,n.apply(this,e)}),t))}}}class Uo{constructor(){this.Jc=new Set}handleCommand(t,e){return A(t)?this.Jc.has(t)?null:(this.Jc.add(t),e&&(this.mo=e,this.iu(t,e)),()=>this.Jc.delete(t)):null}executeCallbacks(t){this.nu(t)&&(this.mo=t,this.Jc.forEach((e=>this.iu(e,t))))}iu(t,e){csSetTimeout((()=>{try{t(e)}catch(t){}}))}nu(t){const{isRecording:e,recordingStartTimestamp:s,etrState:i,etrStatus:n,collectState:r}=t;return this.mo&&(this.mo.isRecording!==e||this.mo.recordingStartTimestamp!==s||this.mo.etrState!==i||this.mo.etrStatus!==n||this.mo.collectState!==r)}}const Fo=["afterPageView"],Ho=["getSessionKey"],Bo=["onRecordingContextChange","onRecordingStateChange"],zo=["replay:link:generate"];class qo{constructor(t,e,s,i,n,r,o,h){this.xt=t,this.$t=e,this.bc=s,this.ru=i,this.su=n,this.Rt=r,this.qc=o,this.Sc=h}init(){this.Zc=new ko(this.xt,this.$t,this.Rt,this.qc),this.ou=new Oo(this.Zc),this.hu=new No(this.Zc),this.au=new Uo,this.lu=new Mo(this.Zc),this.du=new xo(this.su,this.Zc),this.ru.addListener(this.du),this.bc.register(Ho,(t=>this.hu.handleCommand(t))),this.bc.register(Fo,(t=>this.ou.handleCommand(t))),this.bc.register(Bo,(t=>{this.au.handleCommand(t,this.Sc.getRecordingContext())})),this.bc.register(zo,((t,e)=>{this.fu&&this.lu.handleCommand({...t,recordingStartTimestamp:this.Sc.getRecordingContext().recordingStartTimestamp},e)}))}onAfterNaturalPageView(){this.Zc.setNaturalPageViewSent(!0),this.hu.flushPendingCallbacks(),this.ou.executeRegisteredCallbacks(),this.du.sendAfterPageViewCallbackToChildren()}onAfterArtificialPageView(){this.ou.executeRegisteredCallbacks(),this.du.sendAfterPageViewCallbackToChildren()}onCollectStateChange(){this.executeRecordingContextChangeCallbacks()}onRecordingContextChange(){this.executeRecordingContextChangeCallbacks()}executeRecordingContextChangeCallbacks(){this.au.executeCallbacks(this.Sc.getRecordingContext())}setRecordingService(t){this.fu=t}}cs([Do()],qo.prototype,"executeRecordingContextChangeCallbacks",null);class Go{constructor(t,e){this.key=csString.prototype.slice.call(t,0,512),this.value=g(e)?csString.prototype.slice.call(e,0,255):e}static isKeyValid(t){return g(t)}static isValueValid(t){return g(t)||v(t)}}class Wo extends ci{constructor(t,e){super(),this.vu=t,this.bt=e,this.gu=[]}onStart(){csArray.prototype.forEach.call(this.gu,(t=>this.mu(t.key,t.value))),this.gu=[]}onStop(){}mu(t,e){const s=this.bt.anonymizePII(t),i=v(e)?e:this.bt.anonymizePII(e);this.vu.add(new Go(s,i))}trackDynamicVariable(t,e){if(!Go.isKeyValid(t)||!Go.isValueValid(e))throw new Error(`Command misuse: ${Jo[0]}`);this.isStarted?this.mu(t,e):csArray.prototype.push.call(this.gu,{key:t,value:e})}}class Zo{constructor(t){this.pu=t,this.vu=[]}add(t){csArray.prototype.push.call(this.vu,t),this.setBatchReadyCall()}clear(){this.vu=[]}onBatchReady(t){this.wu=t}getRequestParameters(){const t={};for(const e of this.vu)t[e.key]=e.value;return{dv:this.pu.compressSync(csJSON.stringify(t),"base64"),ct:this.pu.algorithm}}setBatchReadyCall(){this.wu()}}cs([Do(),gt("dynamicVariablesBatchReady")],Zo.prototype,"setBatchReadyCall",null);const Jo=["trackDynamicVariable"];class Yo{constructor(t,e,s,i,n,r){this.bc=t,this.$t=e,this.Rt=s,this.Rc=i,this.pu=n,this.bt=r,this.ut=new le(this.Rt.getTrackerUri(),"dvar"),this.vu=new Zo(this.pu),this.yu=new Wo(this.vu,this.bt)}init(){this.ut.setRequestParametersProviders(this.Rc,this.vu),this.$t.setDynamicVariablesService(this.yu),this.vu.onBatchReady((()=>this.ut.send())),this.ut.after((()=>this.vu.clear())),this.bc.register(Jo,(({key:t,value:e}={})=>{this.yu.trackDynamicVariable(t,e)}))}onStartTracking(){this.yu.start()}}class Qo{constructor(t,e){this.id=t,this.revenue=e}static from(t){const e=new Qo(t.id,parseFloat(t.revenue));return isNaN(parseFloat(t.tax))||(e.tax=parseFloat(t.tax)),isNaN(parseFloat(t.shipping))||(e.shipping=parseFloat(t.shipping)),g(t.currency)&&t.currency.length<=10&&(e.currency=t.currency),e}hasValidRevenue(){return!isNaN(this.revenue)&&this.revenue>=0}static isValid(t){return y(t)&&f(t.revenue)&&g(t.currency)&&t.currency.length<=10&&(!y(t.id)||g(t.id))}}class Ko{constructor(t,e,s,i){this.id=t,this.name=e,this.price=s,this.quantity=i}static from(t){if(!Ko.Eu(t))return null;const e=new Ko(t.id,t.name,parseFloat(t.price),parseInt(t.quantity,10));return w(t.sku)&&(e.sku=t.sku),w(t.category)&&(e.category=t.category),w(t.merchant)&&t.merchant.length>0&&(e.merchant=t.merchant.slice(0,100)),e}static Eu(t){return y(t)&&g(t.id)&&g(t.name)&&f(parseFloat(t.price))&&v(parseInt(t.quantity,10))&&(!w(t.sku)||g(t.sku))&&(!w(t.category)||g(t.category))&&(!w(t.merchant)||g(t.merchant))}}class Xo extends ci{constructor(t,e,s){super(),this.bt=t,this.Au=e,this.en=s,this._u=[],this.clear()}onStart(){csArray.prototype.forEach.call(this._u,(t=>{this.Su=t.transaction,this.Ru=t.transactionItems,this.sendTransaction()})),this._u=[]}onStop(){}addTransaction(t){const e=this.bt.anonymizeFields(t,["id"]);this.Su=Qo.from(e)}getTransaction(){return this.Su}sendTransaction(){if(!this.isStarted)return csArray.prototype.push.call(this._u,{transaction:this.Su,transactionItems:[...this.Ru]}),void this.clear();null!==this.Au&&null!==this.en&&(this.en.refreshSession(),this.en.isSessionValid()&&(this.Su.hasValidRevenue()?this.Au.send():se.warn("Transaction Service: unable to send transaction with invalid parameters")))}addItem(t){if(A(t))throw new Error(`Command misuse: ${ih[1]}`);const e=this.bt.anonymizeFields(t,["id","name","sku","category"]),s=Ko.from(e);null!==s&&csArray.prototype.push.call(this.Ru,s)}getItems(){return this.Ru}clear(){this.Su=Qo.from({revenue:NaN}),this.Ru=[]}getRequestParameters(){const t={id:this.Su.id?`${this.Su.id}`:"",revenue:`${this.Su.revenue}`};return w(this.Su.tax)&&(t.tax=`${this.Su.tax}`),w(this.Su.shipping)&&(t.shipping=`${this.Su.shipping}`),w(this.Su.currency)&&(t.cu=`${this.Su.currency}`),t.items=window.csJSON.stringify(this.Ru),t}}class th extends ci{constructor(t,e){super(),this.bu=t,this.en=e,this.Tu=null,this.Iu=[]}onStart(){csArray.prototype.forEach.call(this.Iu,(t=>{this.Tu=t,this.Pu()})),this.Iu=[]}onStop(){}addToCart(t){const e={};g(t.sku)&&(e.sku=csString.prototype.slice.call(t.sku,0,100)),g(t.merchant)&&(e.merchant=csString.prototype.slice.call(t.merchant,0,100)),(e.sku||e.merchant)&&(this.Tu=e,this.Pu())}getCartItem(){return this.Tu}Pu(){if(!this.isStarted&&null!==this.Tu)return csArray.prototype.push.call(this.Iu,this.Tu),void this.clear();this.en.refreshSession(),this.en.isSessionValid()&&this.bu.send()}clear(){this.Tu=null}getRequestParameters(){if(!this.Tu)return{};const t={};return g(this.Tu.sku)&&this.Tu.sku.length>0&&(t.sku=this.Tu.sku),g(this.Tu.merchant)&&this.Tu.merchant.length>0&&(t.me=this.Tu.merchant),t}}const eh=["ecommerce:addToCart","ec:cart:add"],sh=["ecommerce:addTransaction","ec:transaction:create"],ih=["ecommerce:addItem","ec:transaction:items:add"],nh=["ecommerce:send","ec:transaction:send"];class rh{constructor(t,e,s,i,n,r,o){this.Rt=t,this.Vu=e,this.xt=s,this.bc=i,this.bt=n,this.en=r,this.Mt=o}init(){const t=new le(this.Rt.getTrackerUri(),"transaction"),e=new le(this.Rt.getTrackerUri(),"addtocart");this.Cu=new Xo(this.bt,t,this.en),this.ju=new th(e,this.en);const s=new Jn(this.Vu,this.xt,this.Mt,this.Cu);t.setRequestParametersProviders(s),t.after((()=>{this.Cu.clear()}));const i=new Jn(this.Vu,this.xt,this.Mt,this.ju);e.setRequestParametersProviders(i),e.after((()=>{this.ju.clear()})),this.bc.register(sh,(t=>{this.Cu.addTransaction(t)})),this.bc.register(ih,(t=>this.Cu.addItem(t))),this.bc.register(nh,(()=>this.Cu.sendTransaction())),this.bc.register(eh,(t=>{this.ju.addToCart(t)}))}onStartTracking(){this.Cu.start(),this.ju.start()}}class oh{constructor(t){this.ku=t.performance}getRequestParameters(){if(this.Ou())return{};const t=this.Nu();return{str:t.startRender,di:t.domInteractive,dc:t.domComplete,fl:t.fullyLoaded}}Nu(){const t=this.ku.timing;return{startRender:""+(t.domLoading-t.requestStart),domInteractive:""+(t.domInteractive-t.requestStart),domComplete:""+(t.domComplete-t.requestStart),fullyLoaded:""+(t.loadEventEnd-t.requestStart)}}Ou(){return!(this.ku&&this.ku.timing&&this.ku.timing.loadEventEnd>0)}}var hh,ah;function ch(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_COMMAND=18]="SUBMIT_COMMAND",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",t[t.SUBMIT=36]="SUBMIT"}(hh||(hh={})),function(t){t.SUCCESS="success",t.FAILURE="failure",t.ATTEMPT="attempt"}(ah||(ah={}));class uh{static build(t,e,s){return csArray.prototype.reduce.call(s,((e,s)=>s.enhanceAnalysisEvent(t,e)),e)}}class lh{constructor(t,e,s){this.xu=t,this.$u=e,this.qo=s}processGesture(t,e){switch(t.type){case Ur.TAP:this.Mu(e);break;case Ur.FLICK:this.Lu(t,e);break;case Ur.DRAG:this.Du(t,e)}}Mu(t){const e={type:hh.TAP,ts:0,x:0,y:0,tgt:""},s=uh.build(t,e,this.xu);s.tgt!==zt.INVALID_ELEMENT&&this.mr(s)}Du(t,e){var s,i;const n={type:hh.DRAG,ts:0,fd:t.direction,tgt:""};(null===(s=this.qo)||void 0===s?void 0:s.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.qo)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=uh.build(e,n,this.xu);r.tgt!==zt.INVALID_ELEMENT&&this.mr(r)}Lu(t,e){var s,i;const n={type:hh.FLICK,ts:0,fd:t.direction,tgt:""};(null===(s=this.qo)||void 0===s?void 0:s.collectGestureDistance)&&(n.distance=t.distance),(null===(i=this.qo)||void 0===i?void 0:i.collectGestureVelocity)&&(n.velocity=t.velocity);const r=uh.build(e,n,this.xu);r.tgt!==zt.INVALID_ELEMENT&&this.mr(r)}onEvent(t){this.mr=t}start(){this.$u.subscribe(lh.Uu,((t,e)=>this.processGesture(t,e)))}stop(){this.$u.unsubscribe(lh.Uu)}}lh.Uu="AnalysisGestureTracker",cs([as()],lh.prototype,"processGesture",null);class dh{constructor(t,e,s,i=["submit"]){this.xu=t,this.Fu=e,this.Hu=s,this.Bu=i,this.zu="select, select *, input, textarea",this.qu="select, select *, input, textarea",this.Gu="a, a *, button, button *, select, select *, input, textarea",this.Wu="input, select, textarea",this.Zu="form",this.Ju=150,this.Yu=400,this.Qu=!1,this.Ku=Lo(((t,e)=>this.scrollListener(t,e)),this.Ju),this.Xu=Lo((t=>this.resizeListener(t)),this.Ju),this.tl=Ls((t=>this.mouseMoveListener(t)),this.Yu),this.sl=[{boundElement:window,type:"resize",listener:()=>this.Xu()},{boundElement:document,type:"scroll",listener:t=>this.Ku(t)},{boundElement:window,type:"mousemove",listener:t=>{this.tl(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.il=[{type:"change",listener:this.Hu.on(this.qu,(t=>this.changeListener(t)))},{type:"submit",listener:this.Hu.on(this.Zu,(t=>this.submitListener(t)))}],this.nl=[{boundElement:document,type:"mouseover",listener:this.Hu.on(this.Gu,(t=>this.mouseOverListener(t)))},{boundElement:document,type:"mouseout",listener:this.Hu.on(this.Gu,(t=>this.mouseOutListener(t)))},{boundElement:document,type:"focusin",listener:this.Hu.on(this.zu,(t=>this.focusInListener(t)))},{boundElement:document,type:"focusout",listener:this.Hu.on(this.zu,(t=>this.focusOutListener(t)))},{boundElement:document,type:"keyup",listener:this.Hu.on(this.Wu,(t=>this.keyUpListener(t)))},{boundElement:document,type:"keydown",listener:this.Hu.on(this.Wu,(t=>this.keyDownListener(t)))},{boundElement:document,type:"copy",listener:this.Hu.on(this.Wu,(t=>this.copyListener(t)))},{boundElement:document,type:"cut",listener:this.Hu.on(this.Wu,(t=>this.cutListener(t)))},{boundElement:document,type:"paste",listener:this.Hu.on(this.Wu,(t=>this.pasteListener(t)))},...csArray.prototype.map.call(this.il,(t=>({...t,boundElement:document})))],this.ws={},this.Ls=(t,e)=>{switch(e){case"initial":case"added":this.ns(t);break;case"removed":this.rs(t)}},this.ss=new Ns(this.Ls),this.us()}ns(t){if(M(t)){const t=this.rl();csArray.prototype.forEach.call(t,(t=>xs(t)))}else{const e=this.ol();csArray.prototype.forEach.call(e,(e=>{xs({...e,boundElement:t})}))}}rs(t){if(M(t)){const t=this.rl();csArray.prototype.forEach.call(t,(t=>$s(t)))}else{const e=this.ol();csArray.prototype.forEach.call(e,(e=>{$s({...e,boundElement:t})}))}}onEvent(t){this.mr=t}start(){this.ss.observe(),this.ns(document),this.resizeListener()}stop(){this.rs(document),this.ss.disconnect()}flushPendingDebouncedListeners(){this.Ku.flushPending(),this.Xu.flushPending()}hl(t){return csArray.prototype.some.call(this.Bu,(e=>e===t))}ol(){return this.Hu.isMatchesSelectorSupported()?csArray.prototype.filter.call(this.il,(t=>!this.hl(t.type))):(se.warn("Element.matches is not implemented yet"),[])}rl(){const t=[];return csArray.prototype.push.call(t,...this.sl),this.Hu.isMatchesSelectorSupported()?csArray.prototype.push.call(t,...this.nl):se.warn("Element.matches is not implemented yet"),csArray.prototype.filter.call(t,(t=>!this.hl(t.type)))}resizeListener(t){const e=Zs.getScrollContainer(),s=_(e);s&&(this.Qu=!0);const i={type:hh.RESIZE,ts:0,x:s?e.clientWidth:Ct.windowWidth(),y:s?e.clientHeight:Ct.windowHeight()};void 0!==t&&(i.d=t),this.mr(i)}scrollListener(t,e){const s=Zs.isEventOnScrollContainer(e);!this.Qu&&s&&this.resizeListener();const i={type:hh.SCROLL,ts:0,x:s?csEventtarget.apply(e).scrollLeft:Ct.windowOffsetX(),y:s?csEventtarget.apply(e).scrollTop:Ct.windowOffsetY(),d:t},n=uh.build(e,i,this.xu);this.mr(n)}mouseMoveListener(t){const e={type:hh.MOUSEMOVE,ts:0,x:t.pageX,y:t.pageY},s=uh.build(t,e,this.xu);this.mr(s)}mouseDownListener(t){const e={type:hh.MOUSEDOWN,ts:0,x:t.pageX,y:t.pageY,tgt:""},s=uh.build(t,e,this.xu);this.al(s)}mouseUpListener(t){const e={type:hh.MOUSEUP,ts:0,x:t.pageX,y:t.pageY,tgt:""},s=uh.build(t,e,this.xu);this.al(s)}clickListener(t){const e={type:hh.CLICK,ts:0,x:t.pageX,y:t.pageY,tgt:""},s=uh.build(t,e,this.xu);this.al(s)}mouseOverListener(t){const e={type:hh.MOUSEOVER,ts:0,x:t.pageX,y:t.pageY,tgt:""},s=uh.build(t,e,this.xu);this.al(s)}mouseOutListener(t){const e={type:hh.MOUSEOUT,ts:0,x:t.pageX,y:t.pageY,tgt:this.Fu.getEventTargetPath(t)},s=uh.build(t,e,this.xu);this.al(s)}focusInListener(t){const e={type:hh.FOCUSIN,ts:0,tgt:this.Fu.getEventTargetPath(t)},s=uh.build(t,e,this.xu);this.al(s)}focusOutListener(t){const e={type:hh.FOCUSOUT,ts:0,tgt:this.Fu.getEventTargetPath(t)},s=uh.build(t,e,this.xu);this.al(s)}changeListener(t){const e={type:hh.CHANGE,ts:0,tgt:""},s=uh.build(t,e,this.xu);this.al(s)}submitListener(t){const e={type:hh.SUBMIT,ts:0,tgt:""},s=uh.build(t,e,this.xu);this.al(s)}copyListener(t){const e={type:hh.COMMAND,ts:0,tgt:this.Fu.getEventTargetPath(t),key:zs.COPY};this.al(e)}cutListener(t){const e={type:hh.COMMAND,ts:0,tgt:this.Fu.getEventTargetPath(t),key:zs.CUT};this.al(e)}pasteListener(t){const e={type:hh.COMMAND,ts:0,tgt:this.Fu.getEventTargetPath(t),key:zs.PASTE};this.al(e)}keyUpListener(t){const e={type:hh.KEYUP,ts:0,tgt:this.Fu.getEventTargetPath(t),key:this.cl(t)};this.al(e)}keyDownListener(t){const e={type:hh.KEYDOWN,ts:0,tgt:this.Fu.getEventTargetPath(t),key:this.cl(t)};this.al(e)}cl(t){const e=this.ws[t.key];return void 0===e?Bs.ALPHANUMERICAL:e}al(t){ch(t)&&t.tgt!==zt.INVALID_ELEMENT&&this.mr(t)}us(){this.ws[" "]=Bs.SPACE,this.ws.Spacebar=Bs.SPACE,this.ws.Enter=Bs.ENTER,this.ws.Backspace=Bs.BACKSPACE,this.ws.Delete=Bs.DELETE,this.ws.ArrowUp=Bs.ARROWUP,this.ws.ArrowDown=Bs.ARROWDOWN,this.ws.ArrowLeft=Bs.ARROWLEFT,this.ws.ArrowRight=Bs.ARROWRIGHT,this.ws.Up=Bs.ARROWUP,this.ws.Down=Bs.ARROWDOWN,this.ws.Left=Bs.ARROWLEFT,this.ws.Right=Bs.ARROWRIGHT,this.ws.CapsLock=Bs.CAPSLOCK,this.ws.Shift=Bs.SHIFT,this.ws.Tab=Bs.TAB}}cs([gt("Event handler type: resize")],dh.prototype,"resizeListener",null),cs([gt("Event handler type: scroll")],dh.prototype,"scrollListener",null),cs([gt("Event handler type: mouseMove"),as()],dh.prototype,"mouseMoveListener",null),cs([gt("Event handler type: mouseDown"),as()],dh.prototype,"mouseDownListener",null),cs([gt("Event handler type: mouseUp"),as()],dh.prototype,"mouseUpListener",null),cs([gt("Event handler type: click"),as()],dh.prototype,"clickListener",null),cs([gt("Event handler type: mouseOver"),as()],dh.prototype,"mouseOverListener",null),cs([gt("Event handler type: mouseOut"),as()],dh.prototype,"mouseOutListener",null),cs([gt("Event handler type: focusIn")],dh.prototype,"focusInListener",null),cs([gt("Event handler type: focusOut")],dh.prototype,"focusOutListener",null),cs([gt("Event handler type: change")],dh.prototype,"changeListener",null),cs([gt("Event handler type: submit"),as()],dh.prototype,"submitListener",null),cs([gt("Event handler type: copy")],dh.prototype,"copyListener",null),cs([gt("Event handler type: cut")],dh.prototype,"cutListener",null),cs([gt("Event handler type: paste")],dh.prototype,"pasteListener",null),cs([gt("Event handler type: keyup")],dh.prototype,"keyUpListener",null),cs([gt("Event handler type: keydown")],dh.prototype,"keyDownListener",null);class fh{constructor(){this.ul=100,this.ll=0,this.dl=Ct.documentHeight(),this.vl={boundElement:document,type:"scroll",listener:t=>this.maxScrollRateListener(t)},this.ll=this.gl(Zs.getScrollContainer()).maxScrollRate}onEvent(t){this.mr=t}start(){xs(this.vl)}stop(){$s(this.vl)}reset(){const t=Zs.getScrollContainer(),{maxScrollRate:e,maxDocumentHeight:s}=this.gl(t);this.dl=s,this.ll=e,this.mr()}gl(t){let e=0,s=0;if(null===t)s=Ct.documentHeight(),e=this.ml(s);else{const i=this.pl(t);s=this.wl(t,i),e=this.yl(t,i)}return{maxScrollRate:e,maxDocumentHeight:s}}maxScrollRateListener(t){let e=null;Zs.isEventOnScrollContainer(t)&&(e=csEventtarget.apply(t));const{maxScrollRate:s,maxDocumentHeight:i}=this.gl(e);(s>this.ll||i>this.dl)&&(this.ll=s,i>this.dl&&(this.dl=i),this.mr())}ml(t){const e=Math.round(this.El()/t*100);return Math.min(e,this.ul)}El(){const t=Ct.windowHeight();return Ct.windowOffsetY()+t}yl(t,e){const s=t.scrollTop+t.clientHeight+t.getBoundingClientRect().top+e,i=this.wl(t,e),n=Math.round(s/i*100);return Math.min(n,this.ul)}pl(t){const e=window.getComputedStyle(t).paddingTop||"0px";return parseInt(e,10)}wl(t,e){return t.scrollHeight+t.getBoundingClientRect().top+e}getRequestParameters(){return{sr:`${this.ll}`,mdh:`${this.dl}`}}}cs([gt("MaxScrollRate handler")],fh.prototype,"maxScrollRateListener",null);class vh{constructor(t,e,s,i,n,r,o,h,a,c,u,l,d,f,v,g,m,p,w,y,E){this.Rt=t,this.Al=e,this.$u=s,this._l=i,this.Sl=n,this.Rl=r,this.bl=o,this.Tl=h,this.en=a,this.Te=c,this.Il=u,this.Pl=l,this.Cn=d,this.cn=f,this.Vl=v,this.Cl=g,this.jl=m,this.kl=p,this.Ol=w,this.Nl=y,this.xl=E,this.An=new ai,this.$l=!1}init(){var t,e,s,i,n,r,o;this.Al.onEvent((t=>this.In(t))),this.$u.onEvent((t=>this.In(t))),this._l.onEvent((()=>{const t=this._l.getRequestParameters();this.cn.setQueryParams(t),this.bl.setQueryParams(t)})),this.Pl.onEvent((t=>this.Ml(t))),this.Ll(),null===(t=this.Vl)||void 0===t||t.onEvent((t=>this.In(t))),null===(e=this.Ol)||void 0===e||e.onEvent((t=>this.In(t))),null===(s=this.Cl)||void 0===s||s.onEvent((t=>this.In(t))),null===(i=this.jl)||void 0===i||i.onEvent((t=>this.In(t))),this.Dl(),null===(n=this.kl)||void 0===n||n.onEvent((t=>this.Ml(t))),null===(r=this.Nl)||void 0===r||r.onEvent((t=>this.Ml(t))),null===(o=this.xl)||void 0===o||o.onEvent((t=>this.Ml(t)))}Dl(){this.bl.onBeaconSuccess((()=>{this.Rl.clearEvents()})),this.bl.onBeaconFailure((t=>{this.Ul(t)}))}initStates(){const t=this.Tl.getRequestParameters(),e=this.Sl.getRequestParameters(),s=this._l.getRequestParameters();this.cn.setQueryParams(t),this.cn.setQueryParams(e),this.cn.setQueryParams(s),this.bl.setQueryParams(t),this.bl.setQueryParams(e),this.bl.setQueryParams(s),this.Fl()}clearStates(t){var e,s;this.Al.flushPendingDebouncedListeners(),null===(e=this.Cl)||void 0===e||e.flushPendingKeyboardNavigationEvent(),null===(s=this.jl)||void 0===s||s.flushPendingTextHighlightEvent(),t?(this.Hl(),this.sendLastMessageBeacon()):this.sendEvents(),this._l.reset(),this.cn.removeQueryParams()}start(t){var e,s,i,n,r,o,h;t||null===(e=this.kl)||void 0===e||e.start(),this.Cn.start(),this.Al.start(),this._l.start(),this.$u.start(),null===(s=this.Vl)||void 0===s||s.start(),null===(i=this.jl)||void 0===i||i.start(),t||this.Pl.start(),null===(n=this.Cl)||void 0===n||n.start(),null===(r=this.Ol)||void 0===r||r.start(),null===(o=this.Nl)||void 0===o||o.start(),null===(h=this.xl)||void 0===h||h.start()}collectInitialEvents(){var t;null===(t=this.Vl)||void 0===t||t.collectInitialEvents()}onIframeAnalysisBrowserEvent(t){this.Ml(t)}onIframeAnalysisUserEvent(t){this.In(t)}onExternalEvent(t){this.Mn(t)}Ml(t){this.en.isCurrentPageviewValid()&&this.Mn(t)}In(t){this.en.refreshSession(),this.en.isSessionValid()&&this.Mn(t)}Mn(t){this.Rl.addEvent(this.Bl(t)),this.Rl.isFull()&&this.sendEvents(),this.Rt.emitDebugEvents&&this.An.emit("analysisEvent",{...t,typeName:hh[t.type]})}Bl(t){return t.ts=this.zl(),t}Hl(){this.bl.setQueryParams({hlm:"true"}),this.$l=!0}sendLastMessageBeacon(){this.bl.setQueryParams(this.Sl.getRequestParameters()),this.bl.send(this.Rl.stringifyEvents()),this.bl.removeQueryParams(["hlm"]),this.$l=!1}sendEvents(){this.Rl.isEmpty()||(this.cn.setQueryParams(this.Tl.getRequestParameters()),this.cn.setQueryParams(this.Sl.getRequestParameters()),this.cn.send(this.Rl.getEvents()),this.Rl.clearEvents())}stop(){var t,e,s,i,n,r,o;this.Cn.stop(),this.Al.stop(),this._l.stop(),this.$u.stop(),this.Pl.stop(),null===(t=this.Vl)||void 0===t||t.stop(),null===(e=this.Cl)||void 0===e||e.stop(),null===(s=this.jl)||void 0===s||s.stop(),null===(i=this.Ol)||void 0===i||i.stop(),this.Rl.empty(),null===(n=this.kl)||void 0===n||n.stop(),null===(r=this.Nl)||void 0===r||r.stop(),null===(o=this.xl)||void 0===o||o.stop()}Fl(){this.ql=xe.now()}zl(){return xe.now()-this.ql}Ll(){this.Cn.onEvent((t=>{var e,s;t!==xn.Visible&&(null===(e=this.Cl)||void 0===e||e.flushPendingKeyboardNavigationEvent(),null===(s=this.jl)||void 0===s||s.flushPendingTextHighlightEvent(),t===xn.PagehideVisible?this.Hl():t===xn.PagehideHidden?(this.Hl(),this.sendLastMessageBeacon()):this.Rl.isEmpty()&&!this.$l||this.sendLastMessageBeacon())}))}Ul(t){try{this.Rl.isEmpty()&&!this.$l||this.Te.save({requestParameters:t,events:this.Rl.getEvents()})}catch{}}pushSubmitCommandEvent(t,e){if(!function(t){return t===ah.SUCCESS||t===ah.FAILURE||t===ah.ATTEMPT}(t)||!_(e))throw new Error(`Command misuse: ${ba}`);const s={status:t,type:hh.SUBMIT_COMMAND,ts:0,tgt:this.Il.getElementPath(e)};s.tgt!==zt.INVALID_ELEMENT&&this.Ml(s)}}class gh{constructor(t,e){this.Te=t,this.cn=e,this.Gl=()=>{"visible"===document.visibilityState&&this.Wl()}}start(){this.Wl(),this.Oi()}stop(){this.Mi()}getRecoveryStorage(){return this.Te}Wl(){const t=this.Te.recover();if(null!==t){const{requestParameters:e,events:s}=t;this.cn.send(s,e)}}Oi(){document.addEventListener("visibilitychange",this.Gl)}Mi(){document.removeEventListener("visibilitychange",this.Gl)}}class mh{constructor(t){this.co=t}save(t){localStorage.setItem(this.co,csJSON.stringify(t))}clear(){localStorage.removeItem(this.co)}recover(){const t=localStorage.getItem(this.co);if(null===t)return null;let e=null;try{e=csJSON.parse(t)}catch{se.error(`Invalid item in localStorage.\n (key:${this.co}; value:${t})`)}finally{this.clear()}return e}}class ph{constructor(t){this.Zl=t,this.Jl=t=>this.processMetric(t),this.Vi=!1}onEvent(t){this.mr=t}start(){this.Vi||(this.Vi=!0,this.Zl.onFCP(this.Jl),this.Zl.onCLS(this.Jl),this.Zl.onFID(this.Jl),this.Zl.onLCP(this.Jl),this.Zl.onTTFB(this.Jl),this.Zl.onINP(this.Jl))}stop(){this.Vi=!1}processMetric(t){if(!this.Vi)return;const e={type:hh.PERFORMANCE,name:t.name,val:t.value,ts:0};this.mr(e)}}cs([gt("Performance metric handler")],ph.prototype,"processMetric",null);var wh,yh,Eh,Ah,_h,Sh=-1,Rh=function(t){addEventListener("pageshow",(function(e){e.persisted&&(Sh=e.timeStamp,t(e))}),!0)},bh=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},Th=function(){var t=bh();return t&&t.activationStart||0},Ih=function(t,e){var s=bh(),i="navigate";return Sh>=0?i="back-forward-cache":s&&(document.prerendering||Th()>0?i="prerender":document.wasDiscarded?i="restore":s.type&&(i=s.type.replace(/_/g,"-"))),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:i}},Ph=function(t,e,s){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){var i=new PerformanceObserver((function(t){Promise.resolve().then((function(){e(t.getEntries())}))}));return i.observe(Object.assign({type:t,buffered:!0},s||{})),i}}catch(t){}},Vh=function(t,e,s,i){var n,r;return function(o){e.value>=0&&(o||i)&&((r=e.value-(n||0))||void 0===n)&&(n=e.value,e.delta=r,e.rating=function(t,e){return t>e[1]?"poor":t>e[0]?"needs-improvement":"good"}(e.value,s),t(e))}},Ch=function(t){requestAnimationFrame((function(){return requestAnimationFrame((function(){return t()}))}))},jh=function(t){var e=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||t(e)};addEventListener("visibilitychange",e,!0),addEventListener("pagehide",e,!0)},kh=function(t){var e=!1;return function(s){e||(t(s),e=!0)}},Oh=-1,Nh=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},xh=function(t){"hidden"===document.visibilityState&&Oh>-1&&(Oh="visibilitychange"===t.type?t.timeStamp:0,Mh())},$h=function(){addEventListener("visibilitychange",xh,!0),addEventListener("prerenderingchange",xh,!0)},Mh=function(){removeEventListener("visibilitychange",xh,!0),removeEventListener("prerenderingchange",xh,!0)},Lh=function(){return Oh<0&&(Oh=Nh(),$h(),Rh((function(){setTimeout((function(){Oh=Nh(),$h()}),0)}))),{get firstHiddenTime(){return Oh}}},Dh=function(t){document.prerendering?addEventListener("prerenderingchange",(function(){return t()}),!0):t()},Uh=[1800,3e3],Fh=function(t,e){e=e||{},Dh((function(){var s,i=Lh(),n=Ih("FCP"),r=Ph("paint",(function(t){t.forEach((function(t){"first-contentful-paint"===t.name&&(r.disconnect(),t.startTime=0&&yh1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,e){var s=function(){qh(t,e),n()},i=function(){n()},n=function(){removeEventListener("pointerup",s,Bh),removeEventListener("pointercancel",i,Bh)};addEventListener("pointerup",s,Bh),addEventListener("pointercancel",i,Bh)}(e,t):qh(e,t)}},Zh=function(t){["mousedown","keydown","touchstart","pointerdown"].forEach((function(e){return t(e,Wh,Bh)}))},Jh=[100,300],Yh=0,Qh=1/0,Kh=0,Xh=function(t){t.forEach((function(t){t.interactionId&&(Qh=Math.min(Qh,t.interactionId),Kh=Math.max(Kh,t.interactionId),Yh=Kh?(Kh-Qh)/7+1:0)}))},ta=function(){return _h?Yh:performance.interactionCount||0},ea=function(){"interactionCount"in performance||_h||(_h=Ph("event",Xh,{type:"event",buffered:!0,durationThreshold:0}))},sa=[200,500],ia=0,na=function(){return ta()-ia},ra=[],oa={},ha=function(t){var e=ra[ra.length-1],s=oa[t.interactionId];if(s||ra.length<10||t.duration>e.latency){if(s)s.entries.push(t),s.latency=Math.max(s.latency,t.duration);else{var i={id:t.interactionId,latency:t.duration,entries:[t]};oa[i.id]=i,ra.push(i)}ra.sort((function(t,e){return e.latency-t.latency})),ra.splice(10).forEach((function(t){delete oa[t.id]}))}},aa=[2500,4e3],ca={},ua=[800,1800],la=function t(e){document.prerendering?Dh((function(){return t(e)})):"complete"!==document.readyState?addEventListener("load",(function(){return t(e)}),!0):setTimeout(e,0)},da=function(t,e){e=e||{};var s=Ih("TTFB"),i=Vh(t,s,ua,e.reportAllChanges);la((function(){var n=bh();if(n){var r=n.responseStart;if(r<=0||r>performance.now())return;s.value=Math.max(r-Th(),0),s.entries=[n],i(!0),Rh((function(){s=Ih("TTFB",0),(i=Vh(t,s,ua,e.reportAllChanges))(!0)}))}}))};class fa{onFCP(t){Fh(t,{reportAllChanges:!0})}onCLS(t){!function(t,e){e=e||{},Fh(kh((function(){var s,i=Ih("CLS",0),n=0,r=[],o=function(t){t.forEach((function(t){if(!t.hadRecentInput){var e=r[0],s=r[r.length-1];n&&t.startTime-s.startTime<1e3&&t.startTime-e.startTime<5e3?(n+=t.value,r.push(t)):(n=t.value,r=[t])}})),n>i.value&&(i.value=n,i.entries=r,s())},h=Ph("layout-shift",o);h&&(s=Vh(t,i,Hh,e.reportAllChanges),jh((function(){o(h.takeRecords()),s(!0)})),Rh((function(){n=0,i=Ih("CLS",0),s=Vh(t,i,Hh,e.reportAllChanges),Ch((function(){return s()}))})),setTimeout(s,0))})))}(t,{reportAllChanges:!0})}onFID(t){!function(t,e){e=e||{},Dh((function(){var s,i=Lh(),n=Ih("FID"),r=function(t){t.startTime0&&(n.value=0,n.entries=[]),i(!0)})),Rh((function(){ra=[],ia=ta(),n=Ih("INP"),i=Vh(t,n,sa,e.reportAllChanges)})))}))}(t,{reportAllChanges:!0})}}class va{constructor(t=[]){this.As=t}stringifyEvents(){return csJSON.stringify(this.As)}addEvent(t){csArray.prototype.push.call(this.As,t)}eventsCount(){return this.As.length}clearEvents(){this.As=[]}empty(){this.clearEvents()}isFull(){return this.eventsCount()>=50}isEmpty(){return 0===this.As.length}getEvents(){return this.As}}class ga{isEventTypeSupported(t){return-1!==csArray.prototype.indexOf.call(this.supportedEventTypes,t)}enhanceAnalysisEvent(t,e){return this.isEventTypeSupported(e.type)?this.baseEnhanceAnalysisEvent(t,e):e}}class ma extends ga{constructor(){super(...arguments),this.supportedEventTypes=[hh.CHANGE],this.Yl=["text","email","number","search","tel","url","password"]}baseEnhanceAnalysisEvent(t,e){const s=qs(t);return j(s)&&csArray.prototype.indexOf.call(this.Yl,s.type)>=0&&(e.isBlank=""===s.value),e}}class pa extends ga{constructor(t){super(),this.Fu=t,this.supportedEventTypes=[hh.MOUSEDOWN,hh.MOUSEUP,hh.CLICK,hh.MOUSEOVER,hh.TAP,hh.DRAG,hh.FLICK,hh.SUBMIT,hh.CHANGE]}baseEnhanceAnalysisEvent(t,e){return e.tgt||(e.tgt=this.Fu.getEventTargetPath(t)),e}}var wa,ya;!function(t){t.getRelativePosition=function(t){const e=qs(t);if(!(e&&b(e)&&A(e.getBoundingClientRect)&&y(t.pageX)&&y(t.pageY)))return{xRel:-1,yRel:-1,valid:!1};const s=e.getBoundingClientRect();let i=t.pageX-s.left-Ct.windowOffsetX(),n=t.pageY-s.top-Ct.windowOffsetY();e!==document.documentElement&&(i+=e.scrollLeft,n+=e.scrollTop);const r=Math.max(e.scrollWidth,s.width),o=Math.max(e.scrollHeight,s.height);return{xRel:Math.round(i/r*65535),yRel:Math.round(n/o*65535),valid:!0}}}(wa||(wa={}));class Ea extends ga{constructor(t,e){super(),this.ot=t,this.Fu=e,this.supportedEventTypes=[hh.MOUSEMOVE,hh.CLICK],this.Ql=""}baseEnhanceAnalysisEvent(t,e){const{valid:s,xRel:i,yRel:n}=wa.getRelativePosition(t);if(s){const s=this.Fu.getEventTargetPath(t);s!==zt.INVALID_ELEMENT&&(e.xRel=i,e.yRel=n,e.type===hh.MOUSEMOVE&&(s!==this.Ql||this.ot.iframesTracking?(this.Ql=s,e.tgtHM=s):e.tgtHM=""))}else e.type===hh.MOUSEMOVE&&(this.Ql="");return e}}!function(t){t[t.ANONYMIZED=0]="ANONYMIZED",t[t.CAPTURED=1]="CAPTURED",t[t.MASKED=2]="MASKED",t[t.ENCRYPTED=3]="ENCRYPTED"}(ya||(ya={}));class Aa extends ga{constructor(t,e,s){super(),this.Rt=t,this.Kl=e,this.bt=s,this.supportedEventTypes=[hh.TAP,hh.CLICK]}Xl(t){let e="";const s=document.createTreeWalker(t,NodeFilter.SHOW_TEXT);let i=s.nextNode();for(;i;){if(e+=i.textContent,this.Kl.getElementSensitiveStatus(i.parentElement)!==ya.CAPTURED)return!0;if(csString.prototype.trim.call(e).length>=100)break;i=s.nextNode()}return!1}baseEnhanceAnalysisEvent(t,e){if(_(csEventtarget.apply(t))){const s=si(csEventtarget.apply(t),"button,a");if(s&&g(s.textContent)&&!this.Xl(s)&&!this.bt.hasPII(s.textContent,this.Rt.anonymizeDigits)){const t=Nn.truncate(csString.prototype.trim.call(s.textContent),100);t.length>0&&(e.text=t)}}return e}}function _a(t,e,s){const i=[];return t.mouseMoveHeatmapEnabled&&csArray.prototype.push.call(i,new Ea(t,e)),t.isClickedElementTextEnabled()&&csArray.prototype.push.call(i,new Aa(t,s,new Pe)),csArray.prototype.push.call(i,new ma,new pa(e)),i}function Sa(t,e,s){const i=[];return t.isClickedElementTextEnabled()&&csArray.prototype.push.call(i,new Aa(t,s,new Pe)),csArray.prototype.push.call(i,new pa(e)),i}const Ra="v2/events",ba=["submit"];class Ta{constructor(t,e,s,i,n,r,o,h,a,c,u,l){this.Rt=t,this.Vu=e,this.xt=s,this.Il=i,this.Hu=n,this.bc=r,this.en=o,this.$u=h,this.ru=a,this.jc=c,this.td=u,this.Kl=l}init(){const t=new va,e=this.jc.create(`${this.Rt.getTrackerUri()}/${Ra}`,!0,"base64");this.sd=this.nd(e),this.rd=this.od(t,this.sd.getRecoveryStorage(),e),this.rd.init(),this.td.addListener(this.rd),this.ru.addListener(this.rd),this.bc.register(ba,((t,e)=>{this.rd.pushSubmitCommandEvent(t,e)}))}onStartTracking(t){this.sd.start(),this.rd.start(t)}onAfterNaturalPageView(){this.rd.initStates()}onAfterArtificialPageView(){this.rd.initStates(),this.rd.collectInitialEvents()}onArtificialPageViewEnd(){this.rd.clearStates(!0)}onBeforeSessionRenewal(){this.rd.clearStates(),this.rd.stop(),this.sd.stop()}onOptout(){this.rd.stop(),this.sd.stop()}od(t,e,s){const i=new oh(window),n=new fh,r=_a(this.Rt,this.Il,this.Kl),o=[];this.Rt.collectHierarchy||csArray.prototype.push.call(o,"submit");const h=new dh(r,this.Il,this.Hu,o),a=Sa(this.Rt,this.Il,this.Kl),c=new lh(a,this.$u),u=new ph(new fa),l=new qn;const d=new sr(`${this.Rt.getTrackerUri()}/${Ra}`),f=new Jn(this.Vu,this.xt);return new vh(this.Rt,h,c,n,i,t,d,f,this.en,e,this.Il,u,l,s,undefined,undefined,undefined,undefined,undefined,undefined,undefined)}nd(t){return new gh(new mh("csAnalysisEventsPersisted"),t)}}var Ia;!function(t){t.Artificial="a",t.Renewal="r",t.Natural="n"}(Ia||(Ia={}));class Pa extends ci{constructor(t,e,s,i,n){super(),this.oc=t,this.td=e,this.ad=s,this.Mt=i,this.qc=n}init(){this.ud()}onStart(t){t?this.ld():this.dd()}onStop(){}triggerArtificialPageView(t,e){this.isStarted?this.vd(t,e):y(t)&&this.Mt.overridePath(t,e),this.isStarted||(this.td.emitTargetingRulesArtificialPageview(this.Mt.getUrl()),this.Mt.cleanupOverrideLifespan())}dd(){this.qc.setPageViewType(Ia.Natural),this.oc.emitBeforeNaturalPageView(),this.ad.send(),this.Mt.cleanupOverrideLifespan(),this.oc.emitAfterNaturalPageView()}ld(){this.qc.setPageViewType(Ia.Renewal),this.oc.emitBeforeNaturalPageView(),this.ad.send(),this.oc.emitAfterNaturalPageView()}vd(t,e){this.qc.setPageViewType(Ia.Artificial),this.oc.emitArtificialPageViewEnd(),y(t)&&this.Mt.overridePath(t,e),this.oc.emitBeforeArtificialPageView(),this.ad.send(),this.Mt.cleanupOverrideLifespan(),this.oc.emitAfterArtificialPageView()}ud(){window.addEventListener("pageshow",(t=>{this.isStarted&&t.persisted&&this.vd()}))}}const Va=window.navigator.language||window.navigator.userLanguage||window.navigator.browserLanguage||window.navigator.systemLanguage||"unknown";function Ca(){return{la:Va}}class ja{constructor(t,e){this.ph=t,this.Ic=e,this.gd=!1}getRequestParameters(){return{dr:this.md()}}addUrlMaskingPattern(t){this.Ic.addUrlMaskingPattern(t)}enableRemoveQueryString(){this.gd=!0}disableRemoveQueryString(){this.gd=!1}md(){const t=this.gd?this.ph.removeQueryString(this.pd()):this.pd();return this.ph.anonymizeUrl(t,this.Ic.getUrlMaskingPatterns())}pd(){let t="";try{t=window.top.document.referrer}catch(e){if(window.parent)try{t=window.parent.document.referrer}catch{t=""}}return""===t&&(t=document.referrer),"string"!=typeof t&&(t=""),t}}class ka{constructor(t){this.$t=t,this.wd=this.yd()&&window.CSCurrentScript}Ed(){const t=window.CSCurrentScript;if(!t)return null;const e=window.performance.getEntriesByName(t.src,"resource")[0];return!e||this.Ad(e)?null:Math.round(e.responseEnd-e.fetchStart)}Ad(t){const e=t.transferSize;return void 0!==e?0===e||300===e||e{g(t)?this.jd(e)?this.Cd.triggerArtificialPageView(t,e):this.Cd.triggerArtificialPageView(t):this.Cd.triggerArtificialPageView()})),this.bc.register($a,((t,e)=>{if(!g(t))throw new Error(`Command misuse: ${$a[0]}`);this.jd(e)?this.Mt.overridePath(t,e):this.Mt.overridePath(t)})),this.bc.register(Ma,((t,e)=>{if(!g(t))throw new Error(`Command misuse: ${Ma[0]}`);this.jd(e)?this.Mt.overrideQuery(t,e):this.Mt.overrideQuery(t)})),this.bc.register(La,(t=>{if(!g(t))throw new Error(`Command misuse: ${La[0]}`);i.addUrlMaskingPattern(t)})),this.bc.register(Da,(()=>i.enableRemoveQueryString())),this.bc.register(Ua,(()=>i.disableRemoveQueryString()))}start(t){this.Cd.start(t)}onBeforeSessionRenewal(){this.Cd.stop()}jd(t){return p(t)&&null!==t}}class Ha{constructor(t){this.Fu=t}on(t,e){return s=>{this.Fu.hasValidEventTarget(s)&&this.kd(s,t)&&e(s)}}kd(t,e){const s=qs(t);return W.call(s,e)}isMatchesSelectorSupported(){return!!W}}class Ba{constructor(){}onLoad(t){this.Ve=t}onLoadCallbackExecute(){this.Ve()}start(){const t=this.onLoadCallbackExecute.bind(this);this.Od(t)}Od(t){function e(){document.removeEventListener("DOMContentLoaded",e),window.removeEventListener("load",e),t()}"complete"===document.readyState||"loading"!==document.readyState&&!document.documentElement.doScroll?csSetTimeout(t):(document.addEventListener("DOMContentLoaded",e),window.addEventListener("load",e))}}cs([gt("onLoad")],Ba.prototype,"onLoadCallbackExecute",null);class za{constructor(t,e,s){this.Rt=t,this.xt=e,this.$t=s,this.ql=xe.now()}resetStartTime(){this.ql=xe.now()}getSessionData(){const{projectId:t}=this.Rt,e=this.xt.getVisitor();null==e&&se.warn("Visitor is null. This happens when a snippet tries to get Session Data before the tag was initialized.");const{id:s,visitsCount:i}=null!=e?e:{},n=this.$t.getSession();null===n&&se.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:s,sessionNumber:i,pageNumber:r,relativeTimestamp:xe.now()-this.ql}}}const qa=["clearSession"],Ga=["extendSession"],Wa=["getSessionData"],Za=["session:start:newVisitor"],Ja=["session:clear:visitor"];class Ya{constructor(t,e,s,i){this.Rt=t,this.xt=e,this.$t=s,this.bc=i}init(){this.Nd=new za(this.Rt,this.xt,this.$t),this.bc.register(qa,(()=>this.$t.removeSession())),this.bc.register(Ga,(()=>this.$t.extendSessionPeriodically()),{disableApplyPending:!0}),this.bc.register(Wa,(()=>this.Nd.getSessionData()),{disableApplyPending:!0}),this.bc.register(Za,(()=>this.xt.renewVisitor())),this.bc.register(Ja,(()=>{this.xt.resetVisitor()}),{disableApplyImmediate:!0})}onBeforeNaturalPageView(){this.xt.createOrUpdateVisitor(),this.$t.createOrUpdateSession()}onBeforeArtificialPageView(){this.$t.abortQuotaServiceRequest(),this.xt.createOrUpdateVisitor(),this.$t.createOrUpdateSession()}onAfterNaturalPageView(){this.Nd.resetStartTime()}onAfterArtificialPageView(){this.Nd.resetStartTime()}onOptout(){this.xt.removeVisitor(),this.$t.removeSession()}onCollectStateChange(t,e){this.$t.updateCollectState(t,e)}}class Qa{constructor(t,e){this.$t=t,this.xt=e,this.xd=!1,this.$d=Ls((()=>this.$t.refreshSession()),3e4)}onSessionExpired(t){this.Md=t}isSessionValid(){return!!this.xd||!!this.$t.hasValidSession()&&(!this.$t.pollCacheRefreshEvent()||!this.xt.isSessionRenewed())}isCurrentPageviewValid(){const t=this.$t.hasValidSession();return this.$t.pollCacheRefreshEvent(!1)?!this.xt.isSessionRenewed():t}refreshSession(){this.isSessionValid()?this.$d():this.Ld()&&(this.Dd=xe.now(),this.renewSession())}renewSession(){this.xd=!0,this.Md(),this.xd=!1}Ld(){return!w(this.Dd)||xe.now()-this.Dd>6e4}}var Ka,Xa;function tc(t){return t.tagDeploymentMode===Ka.DualCollectionReview||t.tagDeploymentMode===Ka.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"}(Ka||(Ka={})),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)}}(Xa||(Xa={}));const ec="RSA-OAEP",sc="AES-CTR";var ic;!function(t){var e;let s,i=!1,r=null;const o="undefined"!=typeof TextEncoder?new TextEncoder:null;let h;function a(){var t,e;return null!=(null===(e=null===(t=n.self.crypto)||void 0===t?void 0:t.subtle)||void 0===e?void 0:e.encrypt)&&null!=n.self.CryptoKey}async function c(e){if(!a()||i)return null;await s;let n=Ln(e);n.byteLength>190&&(n=n.slice(0,190));try{return Dn(await t.crypto.encrypt({name:ec},r,n))}catch{return null}}t.crypto=null===(e=n.crypto)||void 0===e?void 0:e.subtle,t.MAX_DIGEST_INPUT_SIZE=100,t.isKeyImported=function(){return!i},t.getCryptoKey=function(){return r},t.isSupported=a,t.importKey=async function(e){s=t.crypto.importKey("spki",Un(e),{name:ec,hash:"SHA-256"},!1,["encrypt"]).catch((()=>(i=!0,null))),r=await s,s=void 0,r||vt.warn(`Fail to import public key '${e}'`)},t.asymmetricEncrypt=c,t.symmetricEncrypt=async function(e,s){if(!a()||i)return null;const n={counter:s.initializationVector,name:sc,length:64},r=o.encode(e);try{return Dn(await t.crypto.encrypt(n,s.cryptoKey,r))}catch{return null}},t.encryptSecret=async function(e){const s=await async function(e){var s;if(!a())return null;try{return null!==(s=(await t.crypto.exportKey("jwk",e)).k)&&void 0!==s?s:null}catch{return null}}(e);if(!s)throw new Error("Export secret failed");const i=await c(s);if(!i)throw new Error("Encrypt secret failed");return i},t.generateSymmetricKey=async function(){if(!a()||i)return null;try{return{cryptoKey:await t.crypto.generateKey({name:sc,length:128},!0,["encrypt","decrypt"]),initializationVector:n.crypto.getRandomValues(new Uint8Array(16))}}catch{return null}},t.setDigestSalt=function(t){h=t},t.digest=async function(e){e=csString.prototype.toLocaleLowerCase.call(csString.prototype.trim.call(e)),h&&(e=`${e}:${h}`);const s=o.encode(e);try{return Fn(await t.crypto.digest("SHA-1",s))}catch{return null}},t.generateKeyPair=function(){return n.crypto.subtle.generateKey({name:"RSA-OAEP",modulusLength:2048,publicExponent:new Uint8Array([1,0,1]),hash:"SHA-256"},!0,["encrypt","decrypt"])}}(ic||(ic={}));const nc="@user-identifier@";class rc extends ci{constructor(t,e,s,i){super(),this.Rt=t,this.Ud=e,this.pu=s,this.td=i,this.Fd=[],this.xn=[]}onStart(){csArray.prototype.forEach.call(this.Fd,(t=>this.Hd(t))),this.Fd=[],csArray.prototype.forEach.call(this.xn,(t=>this.Bd(t))),this.xn=[]}onStop(){}Hd(t){this.zd(t)?ic.isSupported()&&this.qd(t):this.Gd(t)}trackPageEvent(t){if(!rc.Wd(t))throw new Error(`Command misuse: ${oc[0]}`);this.isStarted?this.Hd(t):csArray.prototype.push.call(this.Fd,t)}zd(t){return Jt(t,nc)}async qd(t){if(!this.Rt.customHashIdEnabled)return;const e=csString.prototype.slice.call(t,17);if(e.length>ic.MAX_DIGEST_INPUT_SIZE)return void se.warn("UserIdentifier event: invalid user identifier");const s=await ic.digest(e);s?(this.Zd={eventName:s,isETR:!1,isCustomHashId:!0},this.Jd()):se.warn("Page event: unable to compute customHashId"),this.Rt.encryptionEnabled&&this.td.emitUserIdentifierEvent(e)}Gd(t){this.td.emitPageEvent(t),this.Zd={eventName:t,isETR:!1,isCustomHashId:!1},this.Jd(),this.Rt.tagDeploymentMode===Ka.LoadClicktalePtc&&Xa.sendPageEvent(t)}Bd(t){this.Rt.malkaEtrEnabled?this.Yd(t):this.Qd(t)}trackEventTriggerRecording(t){if(!rc.Wd(t))throw new Error(`Command misuse: ${hc[0]}`);this.isStarted?this.Bd(t):csArray.prototype.push.call(this.xn,t)}Yd(t){Jt(t,"@ETP@")?this.td.emitEventTriggerRecording(t,Si.ETR_PAGE):this.td.emitEventTriggerRecording(t,Si.ETR_SESSION),this.Zd={eventName:t,isETR:!0,isCustomHashId:!1},this.Jd()}Qd(t){var e;(tc(e=this.Rt)||e.tagDeploymentMode===Ka.LoadClicktalePtc)&&(this.td.emitEventTriggerRecording(t,Si.ETR_LEGACY),this.Zd={eventName:t,isETR:!0,isCustomHashId:!1},this.Jd(),this.Rt.tagDeploymentMode===Ka.LoadClicktalePtc&&Xa.sendEventTriggerRecording(t))}getRequestParameters(){return{value:this.pu.compressSync(this.Zd.eventName,"base64"),ct:this.pu.algorithm,isETR:`${this.Zd.isETR}`,isCustomHashId:`${this.Zd.isCustomHashId}`}}Jd(){this.Ud.send()}static Wd(t){return g(t)&&!!csString.prototype.trim.call(t)}}const oc=["trackPageEvent"],hc=["trackEventTriggerRecording"];class ac{constructor(t,e,s,i,n){this.Rt=t,this.bc=e,this.pu=s,this.Rc=i,this.td=n}init(){const t=new le(this.Rt.getTrackerUri(),"pageEvent");this.Kd=new rc(this.Rt,t,this.pu,this.td),t.setRequestParametersProviders(this.Kd,this.Rc),this.bc.register(oc,(t=>{this.Kd.trackPageEvent(t)})),this.bc.register(hc,(t=>{this.Kd.trackEventTriggerRecording(t)}))}onStartTracking(){this.Kd.start()}}class cc{constructor(t){this.bc=t}init(){this.Xd(cc.tf,He),this.Xd(cc.ef,Fe)}Xd(t,e){this.bc.register([t],((t,s)=>{g(t)&&(g(s)||S(s))&&se.error(s,`${e}${t}`)}))}}cc.ef="logSnippetError",cc.tf="logImplementationSnippetError";class uc{constructor(t,e,s,i,n){this.Rt=t,this.su=e,this.Sc=s,this.Kl=i,this.ru=n}init(){this.su.onChildMessage(((t,e,s)=>this.ru.emitIframeEvent(t,e,s))),this.su.setSentiveStatusCallback((()=>this.Kl.getSensitiveStatus())),this.su.setRecordingContextCallback((()=>this.Sc.getRecordingContext()))}onStartTracking(){this.Rt.iframesTracking&&this.su.start()}onOptout(){this.Rt.iframesTracking&&this.su.stop()}onSensitiveStatusChange(){if(this.Rt.iframesTracking){const t=this.Kl.getSensitiveStatus();this.su.onSensitiveStatusChange(t)}}onRecordingContextChange(){if(this.Rt.iframesTracking){const t=this.Sc.getRecordingContext();this.su.onRecordingContextChange(t)}}}class lc extends ci{constructor(t){super(),this.Rt=t,this.sf=0,this.if=new Map,this.nf={boundElement:window,type:"message",listener:t=>this.rf(t)}}onChildMessage(t){this.hf=t}setRecordingContextCallback(t){this.af=t}setSentiveStatusCallback(t){this.cf=t}onSensitiveStatusChange(t){const e=ns.buildBaseMessage(is.SensitiveStatus,ss.Parent,this.Rt.projectId);e.content=t;const s=ns.buildBaseMessage(is.SensitiveStatus,ss.Parent,this.Rt.projectId);s.content={...t,started:!1,useAnonymization:!0,capturedElementSelector:""},this.if.forEach((t=>{if(t.port){const i=this.uf(t)?s:e;this.lf(t,i)}}))}onRecordingContextChange(t){const e=ns.buildBaseMessage(is.RecordingContext,ss.Parent,this.Rt.projectId);e.content=t,this.if.forEach((t=>{!this.uf(t)&&t.port&&this.lf(t,e)}))}sendToChildren(t,e){const s=ns.buildBaseMessage(t,ss.Parent,this.Rt.projectId);s.content=e,this.df(s)}onStart(){xs(this.nf,!1),this.ff()}onStop(){this.vf(),$s(this.nf,!1),this.gf()}ff(){const t=this.mf();this.pf(t),csArray.prototype.forEach.call(t,(t=>{if(null===this.wf(t)){const e={iframe:t};this.if.set(this.sf,e),this.sf+=1}})),this.yf()}mf(){return csArray.prototype.filter.call(Bt.findAllElements("iframe"),(t=>this.Ef(t)))}pf(t){this.if.forEach(((e,s)=>{e.iframe&&-1===csArray.prototype.indexOf.call(t,e.iframe)&&this.Af(s,e)}))}Af(t,e){e.port&&ns.closeChannelPort(e.port),this.if.delete(t)}gf(){this.if.forEach((t=>{t.port&&ns.closeChannelPort(t.port)})),this.if.clear()}wf(t){let e=null;return this.if.forEach(((s,i)=>{null===e&&s.iframe===t&&(e=i)})),e}Ef(t){return t.id!==r&&(!t.src||Le(t.src,"about:")||Qe(Ye(t.src),this.Rt.hostnames))}df(t){this.if.forEach((e=>{this.lf(e,t)}))}lf(t,e){const s=e.type===is.SensitiveStatus||e.type===is.RecordingContext;!t.port||s&&!t.initialStatusSent||ns.sendChannelMessage(t.port,e)}yf(){this.if.forEach(((t,e)=>{if(t.iframe.contentWindow){const s=this._f(e);ns.sendPostMessage(t.iframe.contentWindow,"*",s)}}))}vf(){const t=this.Sf();this.if.forEach((e=>{e.port?ns.sendChannelMessage(e.port,t):e.iframe.contentWindow&&ns.sendPostMessage(e.iframe.contentWindow,"*",t)}))}_f(t){return ns.buildBaseMessage(is.Discovery,ss.Parent,this.Rt.projectId,t)}Sf(){return ns.buildBaseMessage(is.Stop,ss.Parent,this.Rt.projectId)}Rf(t,e){const s=this.if.get(t);void 0!==s?(s.port=e,s.port.onmessage=t=>{this.bf(t,s)}):se.error(`Parent received channel messaging initialization from unknow child id : ${t} (${this.sf})`)}Tf(t){if(!t.port)return;const e=ns.buildBaseMessage(is.SensitiveStatus,ss.Parent,this.Rt.projectId),s=this.cf();this.uf(t)&&(s.started=!1,s.capturedElementSelector="",s.useAnonymization=!0),e.content=s,ns.sendChannelMessage(t.port,e)}If(t){if(!t.port)return;const e=ns.buildBaseMessage(is.RecordingContext,ss.Parent,this.Rt.projectId),s=this.af();this.uf(t)&&(s.isRecording=!1,s.isMutationTrackerStarted=!1),e.content=s,ns.sendChannelMessage(t.port,e)}bf(t,e){if(void 0===e)return void se.error(`Parent received channelMessage from unknown child : ${csJSON.stringify(t.data)}`);const s=t.data.type,i=t.data.content;s===is.EndOfBufferedMessages?(this.Tf(e),this.If(e),e.initialStatusSent=!0):this.hf(e.iframe,s,i)}rf(t){if(ns.isMessageValid(t,ss.Child,this.Rt.projectId,this.Rt.hostnames))switch(t.data.type){case is.Discovery:if(void 0===t.data.id)return void this.ff();if(t.ports&&1===t.ports.length&&this.if.has(t.data.id))return void this.Rf(t.data.id,t.ports[0]);se.error(`Parent received wrong channelMessage initialization : (${t.origin}) : ${csJSON.stringify(t.data)}`);break;case is.ChildLogMessage:this.hf(null,is.ChildLogMessage,t.data.content);break;default:se.warn(`Parent received unexpected postMessage type from child (${t.origin}) : ${csJSON.stringify(t.data)}`)}}uf(t){return ii.isMaskedElement(t.iframe)||ii.isMaskedElementChild(t.iframe)}}class dc{constructor(){this.subscriptions={}}subscribe(t,e){this.subscriptions[t]=e,1===Object.keys(this.subscriptions).length&&this.onStartTracking()}unsubscribe(t){delete this.subscriptions[t],0===Object.keys(this.subscriptions).length&&this.onStopTracking()}}class fc extends dc{constructor(t){super(),this.Pf=t,this.gr=[{boundElement:document,type:"touchstart",listener:t=>this.Mn(t)},{boundElement:document,type:"touchmove",listener:t=>this.Mn(t)},{boundElement:document,type:"touchend",listener:t=>this.Mn(t)}],this.Vf=new oo,this.Vf.onGesture(((t,e)=>this.Wa(t,e)))}Wa(t,e){for(const s in this.subscriptions){(0,this.subscriptions[s])(t,e)}}onStartTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.gr,(t=>xs(t)))}onStopTracking(){this.canDetectGesture()&&csArray.prototype.forEach.call(this.gr,(t=>$s(t)))}canDetectGesture(){return"undefined"!=typeof devicePixelRatio}Mn(t){this.Pf.tryToExecute("process gesture event",(()=>{if(this.Vf.isValidTouchEvent(t))switch(t.type){case"touchstart":this.Vf.processActionDown(t);break;case"touchmove":this.Vf.processActionMove();break;case"touchend":this.Vf.processActionUp(t)}}))()}static isSwipe(t){return t.type===Ur.FLICK||t.type===Ur.DRAG}}class vc extends ci{constructor(t,e){super(),this.cn=t,this.Cf=e,this.jf=0}onStart(){se.isPerfLoggingActive()&&(this.kf=window.csSetInterval((()=>this.Of()),vc.Nf))}onStop(){se.isPerfLoggingActive()&&(this.Of(),csClearInterval(this.kf))}Of(){if(At.isEmpty||this.jf>=vc.xf)return;this.jf++;const t={a:vc.$f,l:vc.Mf,...this.Cf.getRequestParameters()},e=[];At.forEach((s=>{csArray.prototype.forEach.call(s,(s=>{csArray.prototype.push.call(e,{...s,...t})}))})),this.cn.send(e),At.clear()}}vc.$f="uxa",vc.Mf="perf",vc.Nf=5e3,vc.xf=5;class gc{constructor(t,e,s){this.Rt=t,this.Cf=e,this.jc=s}init(){this.Lf=new vc(this.jc.create(this.Rt.getLoggerUri(),!0),this.Cf)}onStartTracking(){this.Lf.start()}onOptout(){this.Lf.stop()}}class mc{constructor(t){this.Kl=t,this.Df=!1}enableRecordingContext(t,e,s){this.Df=!0,this.fu=t,this.$t=e,this.Lc=s}getRecordingContext(){var t,e,s,i;if(!this.Df)return{isRecording:!1,recordingStartTimestamp:0,etrState:_i.ETR_OFF,etrStatus:Ri.ETR_DISABLED,collectState:Ai.ANALYTICS_ONLY};const n=this.$t.getSession();return{isRecording:this.fu.isRecording(),isMutationTrackerStarted:this.fu.isStarted,useAnonymization:this.Kl.getSensitiveStatus().useAnonymization,enableOnlineResources:null===(t=this.fu.getStaticResourceManagerStatus())||void 0===t?void 0:t.onlineAssets.activated,enableOnlineResourcesOnNextPageview:null===(e=this.fu.getStaticResourceManagerStatus())||void 0===e?void 0:e.onlineAssets.enabledOnNextPageview,recordingStartTimestamp:parseInt(this.fu.getRecordingStartTimestamp(),10),etrState:null!==(s=null==n?void 0:n.etrState)&&void 0!==s?s:_i.ETR_OFF,etrStatus:this.Lc.getEtrStatus(n),collectState:null!==(i=null==n?void 0:n.collectState)&&void 0!==i?i:Ai.ANALYTICS_ONLY}}}class pc{static isRecordingSupported(){return"MutationObserver"in window&&"visibilityState"in document}static isAsyncSerializationSupported(){return"Promise"in window&&"findIndex"in csArray.prototype}}class wc{constructor(){this.Uf=Ia.Natural}setPageViewType(t){this.Uf=t}getPageViewType(){return this.Uf}getRequestParameters(){return{pvt:this.Uf}}}class yc{constructor(t){this.en=t}onAfterVisitorRenewal(){this.en.renewSession()}}var Ec;!function(t){t.generate=function(){const t=navigator.userAgent+navigator.language+navigator.platform,e=csString.prototype.slice.call(function(t){let e=0;for(let s=0;s{const e=(s+16*Math.random())%16|0;return s=Math.floor(s/16),("x"===t?e:7&e|8).toString(16)}));return csString.prototype.replace.call(i,"hhhh",e)}}(Ec||(Ec={}));var Ac={d:function(t,e){for(var s in e)Ac.o(e,s)&&!Ac.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})}};Ac.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),Ac.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};var _c={};Ac.d(_c,{u6:function(){return Fu},b2:function(){return Uu},Vv:function(){return Ed},pF:function(){return Pl},XA:function(){return Qu},fd:function(){return Vl},ec:function(){return bd}});function Sc(t){return function(t){return t.replace(/%u[\dA-F]{4}|%[\dA-F]{2}/gi,(function(t){return t.startsWith("%u")?String.fromCharCode(parseInt(t.slice(2),16)):String.fromCharCode(parseInt(t.slice(1),16))}))}(encodeURIComponent(t))}function Rc(t){return btoa(Sc(t))}function bc(t){return function(t){return decodeURIComponent(function(t){return t.replace(/[^a-zA-Z0-9@*_+-./]/g,(function(t){var e=t.charCodeAt(0);return e<256?"%"+e.toString(16).padStart(2,"0").toUpperCase():"%u"+e.toString(16).padStart(4,"0").toUpperCase()}))}(t))}(atob(t))}var Tc={isOn:function(){var t;return void 0===_hjSettings.hjdebug&&(_hjSettings.hjdebug="true"===(null===(t=hj.bridge.storage.items.DEBUG_FLAG)||void 0===t?void 0:t.get())),_hjSettings.hjdebug},on:function(t){_hjSettings.hjdebug=!0,t&&hj.bridge.storage.items.DEBUG_FLAG.set(!0)},off:function(){_hjSettings.hjdebug=!1,hj.bridge.storage.items.DEBUG_FLAG.clear()},emit:function(t,e){"undefined"!=typeof _hjEmitters&&_hjEmitters.includes&&_hjEmitters.includes(t)&&window.postMessage({data:e,message:hj.bridge.storage.items.DEBUG_FLAG.getKey(),type:t},"*")}};function Ic(t){return Ic="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ic(t)}var Pc=!1,Vc="",Cc={autotag:"#ff0099",command:"#0079a4",cookies:"#5a2c22",data:"#009bd2",event:"#ff7000",events:"#ffc000",exception:"#e63946",heatmap:"#700000",init:"#6600cc",integration:"#2a9072",poll:"#00a000",property:"#ff33cc",recording:"#dd0000",rendering:"#bd00ea",sampling:"#efb0a1",survey:"#007000",targeting:"#00ee00",visitdata:"#00668a",websocket:"#0dc0ff"},jc={init:function(){void 0===window.console&&(window.console={debug:function(){},trace:function(){},log:function(){},info:function(){},warn:function(){},error:function(){}})},debug:function(t,e,s){var i=e&&Cc[e.toLowerCase()]||"#2a9d8f";Vc!=t&&Pc&&(console.groupEnd(),Pc=!1),Vc=t,void 0!==hj.debug&&hj.debug.isOn()&&("object"===Ic(t)?hj.hq.each(t,(function(t,s){hj.log.debug(t+": "+s,e,null)})):(t=e&&"string"==typeof t?e.toUpperCase()+": "+t:t,t="%c"+(new Date).toTimeString().replace(/.*(\d{2}:\d{2}:\d{2}).*/,"$1")+":%c "+t,s?(Pc||(console.groupCollapsed(t+":","color: #999;","color: "+i+";"),Pc=!0),console.log(s)):console.log(t,"color: #999;","color: "+i+";")))},info:function(t){console.log("%c"+t,"color: #006EFF")},warn:function(t){console.log("%c"+t,"color: #E8910C")},error:function(t){console.error("Hotjar error: "+t)},warnIfEmpty:function(t,e){if(Array.isArray(t)?0===t.length:hj.hq.isNullOrUndefined(t)){var s=null===t?"null":void 0===t?"undefined":"no value";hj.log.debug("WARNING: [".concat(e,"] a value was expected but ").concat(s," was found!"))}}},kc={},Oc={},Nc={};function xc(t,e,s){var i;t[e]||(t[e]=[]),null===(i=t[e])||void 0===i||i.push(s)}kc={listen:hj.tryCatch((function(t,e){xc(Oc,t,e),function(t){var e;Nc[t]&&(null===(e=Nc[t])||void 0===e||e.forEach((function(e){kc.signal(t,e)})),delete Nc[t])}(t)}),"hj.event.listen"),removeListener:hj.tryCatch((function(t,e){var s=Oc[t];if(s){var i=s.indexOf(e);-1!==i&&s.splice(i,1)}}),"hj.event.removeListener"),signal:hj.tryCatch((function(t,e,s){var i;Oc[t]?null===(i=Oc[t])||void 0===i||i.forEach((function(t){t(e)})):s?xc(Nc,t,e):Nc[t]=[e]}),"hj.event.signal"),clearAllListeners:hj.tryCatch((function(){Oc={},Nc={}}),"hj.event.clearAllListeners")};var $c,Mc,Lc=((Mc=function(){return $c()}).test=$c=function(){var t;if(!navigator)return"No User-Agent Provided";if(null!==(t=navigator.userAgentData)&&void 0!==t&&t.mobile)return"mobile";var e=function(t){return navigator.userAgent.match(t)};return e(/GoogleTV|SmartTV|Internet.TV|NetCast|NETTV|AppleTV|boxee|Kylo|Roku|DLNADOC|CE\-HTML/i)||e(/Xbox|PLAYSTATION.3|Wii/i)?"tv":e(/iPad/i)||e(/tablet/i)&&!e(/RX-34/i)||e(/FOLIO/i)||e(/Linux/i)&&e(/Android/i)&&!e(/Fennec|mobi|HTC.Magic|HTCX06HT|Nexus.One|SC-02B|fone.945|Chromebook/i)||e(/Kindle/i)||e(/Mac.OS/i)&&e(/Silk/i)||e(/GT-P10|SC-01C|SHW-M180S|SGH-T849|SCH-I800|SHW-M180L|SPH-P100|SGH-I987|zt180|HTC(.Flyer|\_Flyer)|Sprint.ATP51|ViewPad7|pandigital(sprnova|nova)|Ideos.S7|Dell.Streak.7|Advent.Vega|A101IT|A70BHT|MID7015|Next2|nook/i)||e(/MB511/i)&&e(/RUTEM/i)?"tablet":e(/BOLT|Fennec|Iris|Maemo|Minimo|Mobi|mowser|NetFront|Novarra|Prism|RX-34|Skyfire|Tear|XV6875|XV6975|Google.Wireless.Transcoder/i)||e(/Opera/i)&&e(/Windows.NT.5/i)&&e(/HTC|Xda|Mini|Vario|SAMSUNG\-GT\-i8000|SAMSUNG\-SGH\-i9/i)?"mobile":e(/Windows.(NT|XP|ME|9)/)&&!e(/Phone/i)||e(/Win(9|.9|NT)/i)||e(/Macintosh|PowerPC/i)&&!e(/Silk/i)||e(/Linux/i)&&e(/X11/i)||e(/Solaris|SunOS|BSD/i)||e(/Bot|Crawler|Spider|Yahoo|ia_archiver|Covario-IDS|findlinks|DataparkSearch|larbin|Mediapartners-Google|NG-Search|Snappy|Teoma|Jeeves|TinEye/i)&&!e(/Mobile/i)||e(/\b(CrOS|Chromebook)\b/i)?"desktop":"mobile"},Mc);function Dc(t){return Dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(t)}var Uc=hj.tryCatch((function(t){var e,s,i;for(e=t.length-1;e>0;e-=1)s=Math.floor(Math.random()*(e+1)),i=t[e],t[e]=t[s],t[s]=i;return t}),"utils.shuffle"),Fc=(hj.tryCatch((function(t){return/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)}),"utils.validateEmail"),hj.tryCatch((function(){return hj.userDeviceType||(hj.userDeviceType=Lc(),"mobile"===hj.userDeviceType&&(hj.userDeviceType="phone")),hj.userDeviceType}),"utils.deviceType")),Hc=hj.tryCatch((function(){var t=function(){try{return window.self!==window.top}catch(t){return!0}}(),e={width:!t&&window.screen?window.screen.width:document.body.clientWidth,height:!t&&window.screen?window.screen.height:document.body.clientHeight};return{width:window.innerWidth||document.documentElement.clientWidth||e.width,height:window.innerHeight||document.documentElement.clientHeight||e.height}}),"utils.getWindowSize"),Bc=function(t,e,s,i,n){var r=1;if(void 0!==n&&hj.log.debug("Retry iteration ".concat(r," of ").concat(n)),t())return e(!0);var o=setInterval((function(){return r++,t()?(clearInterval(o),e(!0)):r>=i?(clearInterval(o),e(!1)):void 0}),s)},zc=function(t,e){return function(s,i){hj.log.debug("[".concat(t,"] ").concat(s),e,i)}},qc=function(t){return t&&"string"==typeof t?t.replace(/[\W_]+/g,"-"):""};function Gc(t){try{return decodeURIComponent(t)}catch(e){return t}}function Wc(t){for(var e,s=[],i=new RegExp("[^?&]?"+t.replace(/\[/,"\\[").replace(/]/,"\\]")+"=([^&]+)","g");e=i.exec(location.search);)s.push(Gc(e[1]));switch(s.length){case 0:return"";case 1:return s[0];default:return s}}var Zc={},Jc={};function Yc(t,e){var s;if(!Zc.matchOperations[t.match_operation])return hj.exceptions.log(new Error('Targeting error - "'.concat(t.match_operation,'" match operation does not exist.')),"hj.targeting.matchPatternWithRule"),!1;t.rule_type=t.rule_type||t.component;var i=function(t,e){return!e||"date"!==t.rule_type||"less_than"!==t.match_operation&&"greater_than"!==t.match_operation?e:(new Date(e).valueOf()/1e3).toFixed(0)}(t,e);return(s=Zc.matchOperations[t.match_operation](t,i)).error?(hj.exceptions.log(new Error("Targeting error - ".concat(t.match_operation," - ").concat(s.error)),"hj.targeting.matchPatternWithRule"),!1):("url"!==t.component&&t.negate&&(s=!s),function(t,e,s){var i=s?"Match ":"No Match ";!s||"url"!==t.component&&"device"!==t.component||(i+=t.component+"|"+t.match_operation+"|"+t.pattern+(t.negate?" [NEGATE]":""),hj.log.debug(i,"targeting")),"attribute"!==t.component&&"event"!==t.component||(i+=t.component+"|"+t.name+" ("+t.rule_type+")|"+t.match_operation+"|"+t.pattern+"|compared with: "+e+(t.negate?" [NEGATE]":""),hj.log.debug(i,"targeting"))}(t,e,s),s)}function Qc(t){var e,s=Fc();return(e=0===t.length||3===t.length||t.some((function(t){return Yc(t,s)})))?hj.log.debug("Device match found","targeting"):hj.log.debug("No device match found","targeting"),e}var Kc=function(t){var e,s,i;return null==t||null===(e=t.toLowerCase())||void 0===e||null===(s=e.split("#")[0])||void 0===s||null===(i=s.split("?")[0])||void 0===i?void 0:i.replace("http://www.","").replace("https://www.","").replace("http://","").replace("https://","").replace(/\/$/,"")},Xc=function(t,e,s){return function(){return t.apply(null,arguments)?e.apply(null,arguments):s.apply(null,arguments)}},tu=function(t,e){return void 0!==t&&void 0!==e&&null!==t&&null!==e},eu=function(t,e){return!isNaN(t.pattern)&&!isNaN(e)&&""!==e&&"boolean"!=typeof e},su=function(t,e){if(!e||e.toString()===parseInt(e,10).toString())return!1;var s=new Date(e);return"Invalid Date"!==s&&!isNaN(s)},iu=function(t){return Xc(tu,t,(function(){return!1}))},nu=function(t){return iu(Xc(eu,t,(function(t,e){return{error:e?"Cannot compare non-numeric values (rule: { name: '".concat(t.name,"' },\n pattern: '").concat(e,"')."):void 0}})))},ru=function(t){return iu(Xc(su,t,(function(t,e){return{error:"Cannot compare dates. Given pattern is not a date (rule: { name: '".concat(t.name,"' }, pattern: '").concat(e,"').")}})))};Zc.matchUrl=function(t,e){var s,i=!1,n=!1,r=!1;if(0===t.length)return hj.log.debug("No URL targeting rules set","targeting"),!1;for(var o=0;oNumber(t.pattern)})),less_than:nu((function(t,e){return Number(e)=s}))};var ou={getFeatures:hj.tryCatch((function(){return hj.settings.features||[]}),"hj.features.getFeatures"),hasFeature:hj.tryCatch((function(t){var e;try{var s=window.localStorage.getItem("HJ_OVERRIDE_FEATURE:".concat(t));e="true"===s||"1"===s}catch(t){e=!1}return ou.getFeatures().indexOf(t)>-1||e}),"hj.features.hasFeature")};function hu(t){return hu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},hu(t)}var au=function(t){var e,s,i,n=window._hjDocument||document;if(cu.selector=t,cu.isWindow(t))return this[0]=window,this.length=1,this;if(cu.isDocument(t,n))return this[0]=n,this.length=1,this;if("object"===hu(t))return this[0]=t,this.length=1,this;if("string"==typeof t&&"<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3)return(e=n.createElement("div")).innerHTML=t,this[0]=e.childNodes[0],this.length=1,this;if("string"==typeof t){isNaN(t.charAt(1))||"."!==t.charAt(0)&&"#"!==t.charAt(0)||(t=t.charAt(0)+"\\3"+t.charAt(1)+" "+t.slice(2));try{s=n.querySelectorAll(t)}catch(t){return this.length=0,this}for(i=0;i0&&(this[0].value=t),void 0===this[0]?void 0:this[0]?this[0].value:""},au.prototype.each=function(t,e){Array.prototype.forEach.call(this,(function(t,s,i){e(s,t,i)}))},au.prototype.hasClass=function(t){return this[0].classList?this[0].classList.contains(t):new RegExp("(^| )"+t+"( |$)","gi").test(this[0].className)},au.prototype.remove=function(){var t;for(t=0;t-1&&s.call(c,t)}},Array.isArray(cu.eventHandlers[o])||(cu.eventHandlers[o]=[]),cu.eventHandlers[o].push(h),document.addEventListener(d[r].split(".")[0],h,!0)):("boolean"==typeof e&&!1===e&&(e=function(t){return t.preventDefault(),!1}),Array.isArray(cu.eventHandlers.document)||(cu.eventHandlers.document=[]),cu.eventHandlers.document.push(e),this[0].addEventListener(d[r].split(".")[0],e,i));else if(cu.isDocument(this[0]))for(r=0;r=200&&e.status<400?cu.isFunction(t.success)&&t.success(e.responseText&&JSON.parse(e.responseText),e):cu.isFunction(t.error)&&t.error(e)},e.onerror=function(){cu.isFunction(t.error)&&t.error(e)},e.ontimeout=function(){cu.isFunction(t.timeout)&&t.timeout(e)},cu.isFunction(t.requestAnnotator)&&t.requestAnnotator(e),"POST"!==t.type&&"PUT"!==t.type||!t.data?e.send():e.send(t.data)},cu.eventHandlers={},cu.selector="";var uu={get:function(t,e,s){e=e||cu.noop,s=s||cu.noop,cu.ajax({url:t,success:hj.tryCatch(e,"Data"),error:hj.tryCatch(s,"Data")})},post:function(t,e,s,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{contentType:"json"};s=s||cu.noop,i=i||cu.noop;var r=null!=n&&n.query?"".concat(t,"?").concat(n.query):t;return cu.ajax({url:r,type:"POST",data:"json"===(null==n?void 0:n.contentType)?cu.stringify(e):e,contentType:"text/plain; charset=UTF-8",success:hj.tryCatch(s,"Data"),error:hj.tryCatch(i,"Data")})},putAsJSON:function(t,e,s,i){s=s||cu.noop,i=i||cu.noop,cu.ajax({url:t,type:"PUT",data:cu.stringify(e),contentType:"text/plain; charset=UTF-8",success:hj.tryCatch(s,"Data"),error:hj.tryCatch(i,"Data")})},postAsJSON:function(t,e,s,i){return s=s||cu.noop,i=i||cu.noop,cu.ajax({url:t,type:"POST",data:cu.stringify(e),contentType:"application/json; charset=UTF-8",success:hj.tryCatch(s,"Data"),error:hj.tryCatch(i,"Data")})}},lu=[],du=[];function fu(t,e){hj.tryCatch(e,"Rendering")(t)}function vu(t,e){hj.widgetDelay.set((function(){hj.tryCatch(e,"Rendering")(t)}),1e3*t.display_delay)}function gu(t,e,s){var i=hj.hq(document),n=hj.hq(window),r=[];function o(){hj.tryCatch(e,"Rendering")(t),i.off("mousemove."+s),i.off("mouseout."+s)}lu.push(s),i.off("mousemove."+s),i.off("mouseout."+s),i.on("mousemove."+s,hj.tryCatch((function(t){var e,s,i,n;r.push({x:t.clientX,y:t.clientY}),r.length>2&&((null===(e=r[1])||void 0===e?void 0:e.x)===(null===(s=r[2])||void 0===s?void 0:s.x)&&(null===(i=r[1])||void 0===i?void 0:i.y)===(null===(n=r[2])||void 0===n?void 0:n.y)?r.pop():r.shift())}),"Rendering")),i.on("mouseout."+s,hj.tryCatch((function(t){var e=this;t.relatedTarget&&(!e||t.relatedTarget===e||e.compareDocumentPosition(t.relatedTarget)&Node.DOCUMENT_POSITION_CONTAINED_BY)||function(t){var e=r[1],s=r[0];if(t|=0,void 0!==e&&!(s&&e.y>=s.y||t>0))if(s&&s.x===e.x)o();else if(s){var i=s.y-e.y/s.x-e.x,h=-(s.y-i*s.x)/i;h>0&&h=.5&&(n.off("scroll."+s),e(t))}),"Rendering"))}var pu={clearAllAbandonEvents:hj.tryCatch((function(){lu.forEach((function(t){hj.log.debug("Removing abandon events for "+t,"rendering"),hj.hq(document).off("mousemove."+t),hj.hq(document).off("mouseout."+t)})),lu=[]}),"hj.rendering.clearAllAbandonEvents"),clearAllScrollEvents:hj.tryCatch((function(){du.forEach((function(t){hj.log.debug("Removing scroll events for "+t,"rendering"),hj.hq(window).off("scroll."+t)})),du=[]}),"hj.rendering.clearAllScrollEvents"),callAccordingToCondition:hj.tryCatch((function(t,e,s){var i={immediate:fu,delay:vu,abandon:gu,scroll:mu}["inline"===t.display_type?"immediate":t.display_condition];if(hj.log.debug("Calling active item ("+e+"): "+t.display_condition,"rendering"),!i)throw new Error('Unhandled display condition: "'+t.display_condition+'"');hj.tryCatch(i,"Rendering")(t,s,e)}),"hj.rendering.callAccordingToCondition")},wu=function(t,e){return t+e&4294967295};function yu(t,e){var s=Au(s=t[0],r=t[1],n=t[2],i=t[3],e[0],7,-680876936),i=Au(i,s,r,n,e[1],12,-389564586),n=Au(n,i,s,r,e[2],17,606105819),r=Au(r,n,i,s,e[3],22,-1044525330);s=Au(s,r,n,i,e[4],7,-176418897),i=Au(i,s,r,n,e[5],12,1200080426),n=Au(n,i,s,r,e[6],17,-1473231341),r=Au(r,n,i,s,e[7],22,-45705983),s=Au(s,r,n,i,e[8],7,1770035416),i=Au(i,s,r,n,e[9],12,-1958414417),n=Au(n,i,s,r,e[10],17,-42063),r=Au(r,n,i,s,e[11],22,-1990404162),s=Au(s,r,n,i,e[12],7,1804603682),i=Au(i,s,r,n,e[13],12,-40341101),n=Au(n,i,s,r,e[14],17,-1502002290),s=_u(s,r=Au(r,n,i,s,e[15],22,1236535329),n,i,e[1],5,-165796510),i=_u(i,s,r,n,e[6],9,-1069501632),n=_u(n,i,s,r,e[11],14,643717713),r=_u(r,n,i,s,e[0],20,-373897302),s=_u(s,r,n,i,e[5],5,-701558691),i=_u(i,s,r,n,e[10],9,38016083),n=_u(n,i,s,r,e[15],14,-660478335),r=_u(r,n,i,s,e[4],20,-405537848),s=_u(s,r,n,i,e[9],5,568446438),i=_u(i,s,r,n,e[14],9,-1019803690),n=_u(n,i,s,r,e[3],14,-187363961),r=_u(r,n,i,s,e[8],20,1163531501),s=_u(s,r,n,i,e[13],5,-1444681467),i=_u(i,s,r,n,e[2],9,-51403784),n=_u(n,i,s,r,e[7],14,1735328473),s=Su(s,r=_u(r,n,i,s,e[12],20,-1926607734),n,i,e[5],4,-378558),i=Su(i,s,r,n,e[8],11,-2022574463),n=Su(n,i,s,r,e[11],16,1839030562),r=Su(r,n,i,s,e[14],23,-35309556),s=Su(s,r,n,i,e[1],4,-1530992060),i=Su(i,s,r,n,e[4],11,1272893353),n=Su(n,i,s,r,e[7],16,-155497632),r=Su(r,n,i,s,e[10],23,-1094730640),s=Su(s,r,n,i,e[13],4,681279174),i=Su(i,s,r,n,e[0],11,-358537222),n=Su(n,i,s,r,e[3],16,-722521979),r=Su(r,n,i,s,e[6],23,76029189),s=Su(s,r,n,i,e[9],4,-640364487),i=Su(i,s,r,n,e[12],11,-421815835),n=Su(n,i,s,r,e[15],16,530742520),s=Ru(s,r=Su(r,n,i,s,e[2],23,-995338651),n,i,e[0],6,-198630844),i=Ru(i,s,r,n,e[7],10,1126891415),n=Ru(n,i,s,r,e[14],15,-1416354905),r=Ru(r,n,i,s,e[5],21,-57434055),s=Ru(s,r,n,i,e[12],6,1700485571),i=Ru(i,s,r,n,e[3],10,-1894986606),n=Ru(n,i,s,r,e[10],15,-1051523),r=Ru(r,n,i,s,e[1],21,-2054922799),s=Ru(s,r,n,i,e[8],6,1873313359),i=Ru(i,s,r,n,e[15],10,-30611744),n=Ru(n,i,s,r,e[6],15,-1560198380),r=Ru(r,n,i,s,e[13],21,1309151649),s=Ru(s,r,n,i,e[4],6,-145523070),i=Ru(i,s,r,n,e[11],10,-1120210379),n=Ru(n,i,s,r,e[2],15,718787259),r=Ru(r,n,i,s,e[9],21,-343485551),t[0]=wu(s,t[0]),t[1]=wu(r,t[1]),t[2]=wu(n,t[2]),t[3]=wu(i,t[3])}function Eu(t,e,s,i,n,r){return e=wu(wu(e,t),wu(i,r)),wu(e<>>32-n,s)}function Au(t,e,s,i,n,r,o){return Eu(e&s|~e&i,t,e,n,r,o)}function _u(t,e,s,i,n,r,o){return Eu(e&i|s&~i,t,e,n,r,o)}function Su(t,e,s,i,n,r,o){return Eu(e^s^i,t,e,n,r,o)}function Ru(t,e,s,i,n,r,o){return Eu(s^(e|~i),t,e,n,r,o)}function bu(t){var e,s=[];for(e=0;64>e;e+=4)s[e>>2]=t.charCodeAt(e)+(t.charCodeAt(e+1)<<8)+(t.charCodeAt(e+2)<<16)+(t.charCodeAt(e+3)<<24);return s}var Tu="0123456789abcdef".split("");function Iu(t){for(var e="",s=0;4>s;s++)e+=Tu[t>>8*s+4&15]+Tu[t>>8*s&15];return e}var Pu=function(t,e){var s="";try{s=function(t){for(var e=0;e>2]|=t.charCodeAt(e)<<(e%4<<3);if(n[e>>2]|=128<<(e%4<<3),55e;e++)n[e]=0;return n[14]=8*s,yu(i,n),i}(Sc(t)))}catch(t){e?s="":hj.exceptions.log(t,"md5")}return s};"5d41402abc4b2a76b9719d911017c592"!=Pu("hello")&&(wu=function(t,e){var s=(65535&t)+(65535&e);return(t>>16)+(e>>16)+(s>>16)<<16|65535&s});var Vu={id:void 0,attributes:{},init:hj.tryCatch((function(){if(hj.settings.user_attributes_enabled){var t=function(){var t="true"===hj.bridge.storage.items.HAS_CACHED_USER_ATTRIBUTES.get()?hj.bridge.storage.localStorage.USER_ATTRIBUTES.get():void 0;if(t)try{var e=function(t){try{var e=JSON.parse(t);if(e&&"object"===Dc(e))return!0}catch(t){}return!1}(t)?t:hj.b64DecodeUnicode(t);return JSON.parse(e)}catch(t){return}}();t&&(Vu.id=t.userId,Vu.attributes=t.attributes,delete Vu.attributes.contentsquare_replay_link)}}),"userAttributes.init"),reset:hj.tryCatch((function(){Vu.id=void 0,Vu.attributes={},hj.bridge.storage.items.HAS_CACHED_USER_ATTRIBUTES.clear(),hj.bridge.storage.localStorage.USER_ATTRIBUTES.clear()}),"userAttributes.reset"),set:hj.tryCatch((function(t,e){var s,i,n,r,o;e&&e.contentsquare_replay_link&&(hj.log.debug("Storing contentsquare_replay_link user attribute: ".concat(e.contentsquare_replay_link),"userAttributes"),Vu.attributes.contentsquare_replay_link=e.contentsquare_replay_link),hj.settings.user_attributes_enabled?(void 0!==Vu.id&&null!==Vu.id&&Vu.id!==t&&(hj.log.debug("User ID changed, resetting all attributes before continuing.","userAttributes"),Vu.reset()),Vu.id=t,Vu.attributes=(s=Vu.attributes,i={},n={},[s,e].forEach((function(t){if(t)for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&"length"!==e&&(i[e]=t[e])})),Object.keys(i).sort().forEach((function(t){n[t]=i[t]})),n),r={attributes:Vu.attributes,userId:Vu.id},o=hj.b64EncodeUnicode(JSON.stringify(r)),hj.bridge.storage.localStorage.USER_ATTRIBUTES.set(o),hj.bridge.storage.items.HAS_CACHED_USER_ATTRIBUTES.set("true",!0),hj.event.signal("user-attributes-set"),hj.bridge.isRecordingEnabled()?Vu.flush():hj.log.debug("No recording in progress. Not sending.","userAttributes")):hj.log.debug("User attributes not enabled. Doing nothing.","userAttributes")}),"userAttributes.set"),flush:hj.tryCatch((function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:hj.hq.noop;if(void 0!==Vu.id||Object.keys(Vu.attributes).length){var e=hj.bridge.storage.items.USER_ATTRIBUTES_HASH.get({resetExpiry:!0}),s=hj.md5(JSON.stringify({allAttributes:Vu.attributes,userId:Vu.id}));if(e===s)return t(null,Vu.id,Vu.attributes),void hj.log.debug("No changed user attributes. Not sending.","userAttributes");hj.bridge.storage.items.USER_ATTRIBUTES_HASH.set(s),hj.debug.isOn()&&function(t,e){hj.ajax.post("".concat(hj.identifyEndpoint,"/sites/").concat(hj.settings.site_id,"/users/").concat(hj.bridge.getSessionUserId(!0),"/validate"),{user_id:t,attributes:e},hj.tryCatch((function(t){t.errors&&Object.keys(t.errors).length>0?hj.log.debug("User validation API call PARTIALLY successful (some errors).","userAttributes",t):hj.log.debug("User validation API call successful.","userAttributes",t)}),"userAttributes"),hj.tryCatch((function(t){hj.log.debug("User Attributes validation API call failed.","userAttributes",t.responseText&&JSON.parse(t.responseText)||"unknown_failure")}),"userAttributes"))}(Vu.id,Vu.attributes),hj.bridge.flushUserAttributes(Vu.id,Vu.attributes),t(null,Vu.id,Vu.attributes)}else t(Error("no_user"))}),"userAttributes.flush"),get:hj.tryCatch((function(t){return"user_id"===t?Vu.id:t&&Vu.attributes[t]}),"userAttributes.get")},Cu={},ju={"user.id":void 0},ku={get:function(t){return ju[t]},set:function(t,e){ju[t]=e;var s=Cu[t];"function"==typeof s&&e&&(s(e),delete Cu[t])},on:function(t,e){Cu[t]=e;var s=ju[t];s&&(e(s),delete Cu[t])},reset:function(){Cu={},ju={"user.id":void 0}}},Ou=hj.tryCatch((function(){var t=function(){try{return window.self!==window.top}catch(t){return!0}}(),e={width:!t&&window.screen?window.screen.width:document.body.clientWidth,height:!t&&window.screen?window.screen.height:document.body.clientHeight};return{width:window.innerWidth||document.documentElement.clientWidth||e.width,height:window.innerHeight||document.documentElement.clientHeight||e.height}}),"common"),Nu=hj.tryCatch((function(){var t,e;if(document&&document.documentElement&&document.documentElement.clientWidth)t=document.documentElement.clientWidth,e=document.documentElement.clientHeight;else{var s=Ou();t=s.width,e=s.height}return{width:t,height:e}}),"common"),xu=hj.tryCatch((function(t){return t=t||window,{left:hj.hq(t).scrollLeft(),top:hj.hq(t).scrollTop()}}),"common"),$u=hj.tryCatch((function(){var t=parseInt(1e3*(hj.hq(window).scrollTop()+hj.ui.getWindowSize().height)/hj.hq(document).height(),10);return Math.min(1e3,t)}),"common"),Mu=hj.tryCatch((function(t){var e=hj.ui.getScrollPosition();hj.hq(document).on("scroll.hotjarDisable resize.hotjarDisable mousewheel.hotjarDisable DOMMouseScroll.hotjarDisable touchmove.hotjarDisable",hj.tryCatch((function(s){s.preventDefault(),window.scrollTo(e.left,e.top),t&&t()}),"common"))}),"common"),Lu=hj.tryCatch((function(){hj.hq(document).off("scroll.hotjarDisable"),hj.hq(document).off("resize.hotjarDisable"),hj.hq(document).off("mousewheel.hotjarDisable"),hj.hq(document).off("DOMMouseScroll.hotjarDisable"),hj.hq(document).off("touchmove.hotjarDisable")}),"common"),Du={getWindowSize:Ou,getDocumentSize:Nu,getScrollPosition:xu,getBottomAsPercentage:$u,disableScrolling:Mu,enableScrolling:Lu},Uu=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).uuid;hj.debug=Tc,hj.log=jc,hj.hq=cu,hj.ajax=uu,hj.uuid=t||window.hj.uuid,hj.encodeAsUtf8=Sc,hj.b64EncodeUnicode=Rc,hj.b64DecodeUnicode=bc,hj.md5=Pu,hj.event=kc,hj.userAttributes=Vu,hj.targeting=Zc,hj.features=ou,hj.rendering=pu,hj.ui=Du,hj.store={session:ku}},Fu=hj.tryCatch((function(){var t=Wc("hjDebug");t&&("1"===t||"true"===t?hj.debug.on(!0):hj.debug.off())}),"init"),Hu={storage:{},set:hj.tryCatch((function(t){Hu.storage.events=t}),"sessionEvents.set"),get:hj.tryCatch((function(){return Hu.storage.events}),"sessionEvents.get")};function Bu(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var s=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=s){var i,n,r,o,h=[],a=!0,c=!1;try{if(r=(s=s.call(t)).next,0===e){if(Object(s)!==s)return;a=!1}else for(;!(a=(i=r.call(s)).done)&&(h.push(i.value),h.length!==e);a=!0);}catch(t){c=!0,n=t}finally{try{if(!a&&null!=s.return&&(o=s.return(),Object(o)!==o))return}finally{if(c)throw n}}return h}}(t,e)||function(t,e){if(t){if("string"==typeof t)return zu(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);return"Object"===s&&t.constructor&&(s=t.constructor.name),"Map"===s||"Set"===s?Array.from(t):"Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s)?zu(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function zu(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,i=new Array(e);s0&&(hj.log.debug("Removing previously shown widget from DOM","widgets"),hj.hq(t).remove())}),"widgets"),e.emptyMatchingWidgets=function(){i=[],n=[],r.forEach((function(t){t.disconnect()})),r=[],h=!1},e.isPhoneOrTablet=hj.tryCatch((function(){return hj.widget.isVeryNarrowScreen()||"phone"===Fc()||"tablet"===Fc()}),"common"),e.isVeryNarrowScreen=hj.tryCatch((function(){return hj.hq(window).width()<=450}),"common"),e.removeActiveWidget=function(t){hj.widgetDelay.clear(),pu.clearAllAbandonEvents(),pu.clearAllScrollEvents(),t=t||function(){},e.activeWidget?(e.activeWidget.removeCallback&&e.activeWidget.removeCallback(t),delete e.activeWidget):t()},e.runLatestMatchingWidget=function(){var t,s;i.forEach((function(e){var i=function(t){return"incoming"===t.type||"button"===t.displayType||"bubble"===t.displayType?0:1}(e);(!t||i>s||i===s&&e.created>t.created)&&(t=e,s=i)})),t?e.setActiveWidget(t):e.removeActiveWidget(),h=!0},e.runInlineEmbeddedWidgets=function(){o=o.filter((function(t){var e=hj.targeting.matchUrl(t.targetingRules,location.href);return e||t.removeCallback(),e})),n.forEach((function(t){t.runCallback()}))},e.setActiveWidget=function(t){e.activeWidget&&t.type===e.activeWidget.type&&t.id===e.activeWidget.id||e.removeActiveWidget((function(){t.runCallback(),e.activeWidget=t}))},e.setLanguage=hj.tryCatch((function(e){var i=(e||"en").replace("-","_");if(!Ju.includes(i))throw new Error('Invalid language "'+e+'"');t=i,hj.widget.activeLanguageDirection=s.indexOf(i)>-1?"rtl":"ltr",hj.widget.isActiveLanguageDirectionRtl="rtl"===hj.widget.activeLanguageDirection}),"common"),e.registerObserverForInlineWidget=function(t){r.push(t)},e}(),hj.widgetDelay=function(){var t={},e=null;return t.clear=hj.tryCatch((function(){clearTimeout(e),e=null}),"hj.widgetDelay.clear"),t.set=hj.tryCatch((function(s,i){t.clear(),e=setTimeout(s,i)}),"hj.widgetDelay.set"),t}()}),"widgets"),Ku=Object.freeze({LIVE:"LIVE",REVIEW_WEBAPP:"REVIEW_WEBAPP",REVIEW:"REVIEW",STAGING:"STAGING",DEV:"DEV",DEV_OLD:"DEV_OLD"}),Xu=null===(qu=(Wu=document.location.host.match(/^(insights-webapp|surveys-webapp|insights|surveys)-(.*?)((?:\.[^.]+)?(?:\.hotjarians\.net)|(?:\.[^.]+)?(?:\.eks\.hotjar\.com))$/))&&{component:Wu[1],reviewId:Wu[2],domain:Wu[3],reviewUrlSuffix:Wu[2]+Wu[3]})||void 0===qu?void 0:qu.reviewUrlSuffix,tl=Object.freeze(((Gu={})[Ku.LIVE]={INSIGHTS:"insights.hotjar.com",SURVEYS:"surveys.hotjar.com"},Gu[Ku.REVIEW]={INSIGHTS:"insights-".concat(Xu),SURVEYS:"surveys-".concat(Xu)},Gu[Ku.REVIEW_WEBAPP]={INSIGHTS:"insights-webapp-".concat(Xu),SURVEYS:"surveys-webapp-".concat(Xu)},Gu[Ku.STAGING]={INSIGHTS:"insights-staging.hotjar.com",SURVEYS:"surveys-staging.hotjar.com"},Gu[Ku.DEV]={INSIGHTS:"local.hotjar.com:8443",SURVEYS:"surveys.local.hotjar.com:8443"},Gu[Ku.DEV_OLD]={INSIGHTS:"local.hotjar.com",SURVEYS:"surveys.local.hotjar.com"},Gu)),el=function(t){return function(e,s){return e===tl[t][s]}},sl=el(Ku.DEV),il=el(Ku.DEV_OLD),nl=el(Ku.LIVE),rl=el(Ku.REVIEW_WEBAPP),ol=el(Ku.REVIEW),hl=el(Ku.STAGING),al=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.location.href,e=[tl[Ku.LIVE].SURVEYS,tl[Ku.REVIEW_WEBAPP].SURVEYS,tl[Ku.REVIEW].SURVEYS,tl[Ku.STAGING].SURVEYS,tl[Ku.DEV].SURVEYS,tl[Ku.DEV_OLD].SURVEYS],s=document.createElement("a");return s.href=t,e.indexOf(s.hostname)>=0},cl=(Object.freeze({LAST_RECORDING_ACTIVITY_STORE_DEBOUNCE:5e3,MAX_TIME_SINCE_LAST_RECORDING_ACTIVITY_IN_SESSION:12e4}),window.hjLazyModules,"js"),ul=(Object.freeze({id:null,selector_version:2}),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:dl,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:fl,i=0,n=!1;function r(){0!=--i||n||e.bind(this)()}function o(){n=!0,s.bind(this)()}Object.keys(t).forEach((function(e){var s=t[e];"string"==typeof s&&(s=[s]),i+=s.length,s.forEach((function(t){ll(t,e,r,o)}))}))}),ll=function(t,e,s,i){var n;e===cl?(n=document.createElement("script")).src="".concat(hj.scriptDomain).concat(t):"css"===e&&((n=document.createElement("link")).href="".concat(hj.scriptDomain).concat(t),n.rel="stylesheet"),n.onload=s,n.onerror=i,document.getElementsByTagName("head")[0].appendChild(n)};function dl(){}function fl(){var t=this.src||this.href;hj.exceptions.log(new Error("Failed to load module: ".concat(t,".")),"loader")}var vl=function(t,e){var s,i,n,r,o=null===(s=window.CS_CONF)||void 0===s||null===(i=s.voc)||void 0===i?void 0:i.enabled;if(hj.isPreview||o&&"manual"===hj.settings.state_change_listen_mode)return!1;var h=(null===(n=t.targeting)||void 0===n?void 0:n.filter((function(t){return"url"===t.component})))||[],a=null===(r=t.targeting)||void 0===r?void 0:r.some((function(t){return"trigger"===t.component})),c=t.display_type===Yu.EXTERNAL||t.display_type===Yu.MOBILE_POPOVER,u=o?location.href:hj.currentUrl,l=a||c||!0===hj.targeting.matchUrl(h,u);return hj.tryCatch((function(){if(!l)throw new Error("Rendered survey out of URL targeting in ".concat(e," with ID: ").concat(t.id))}),"render-out-of-targeting")(),!l};function gl(t,e){for(var s=t.querySelectorAll(e),i=0;i0&&a?h.uuid===i&&(hj.log.debug("Offsite poll #"+h.id+" has matched with the embedded UUID "+i,"poll"),r=!0,e.addEmbedded(h,s)):!n&&c&&hj.targeting.matchRules({rules:h.targeting,userAttributeMatchLogic:h.targeting_user_attribute_match_logic},t,hj.tryCatch((function(){hj.log.debug("Poll #"+h.id+" has matched.","poll"),hj.bridge.storage.items.POLL_DONE.exists(h.id)&&"always"!==h.persist_condition?hj.log.debug("Poll was already submitted.","poll"):hj.widget.addMatchingWidget("poll",h.id,h.created_epoch_time,h.targeting_percentage,(function(){return e.add(h)}),(function(t){return e.remove(t,h.id)}),h.display_type,h.targeting)}),"polls.run.matchRules-callback"))})),n&&!r&&(hj.hq(document).trigger("hj-embedded-survey-mismatch"),hj.widgetDelay.clear(),hj.widget.emptyMatchingWidgets(),hj.log.debug("Could not match the embedded UUID.","poll"))}),"polls"),e.enablePreview=function(){window._hjPollReload=h},hj.isPreview&&e.enablePreview(),e}()}),"polls"),pl=Object.freeze({MODAL:"_hj-modal",FOOTER:"_hj-footer",SURVEY_INVITES:"_hj_survey_invite_container",HEATMAP_RETAKER:"_hj-heatmap-retaker",ADMIN_WIDGET:"_hj_admin_widget",NOTICATION:"_hj-notification"}),wl=(Object.freeze({RETAKER:"_hjRetakerTrsToken",TARGETING:"_hjRetakerTargeting"}),function(t){if(t){if(t.startsWith("data:image")||t.startsWith("blob:")||t.startsWith("http"))return t;var e="live"===hj.environment?hj.surveyImagesHost:"d23waydkwbngmu.cloudfront.net";return"https://".concat(e,"/").concat(t)}}),yl=function(){var t={},e=window.hjLazyModules;function s(t){return t.display_type===Yu.EXTERNAL?function(t,e){if(e)return"https://".concat(e,"/").concat(t);var s=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"INSIGHTS",e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.location.host;return nl(e,t)?Ku.LIVE:sl(e,t)?Ku.DEV:il(e,t)?Ku.DEV_OLD:rl(e,t)?Ku.REVIEW_WEBAPP:ol(e,t)?Ku.REVIEW:hl(e,t)?Ku.STAGING:Ku.LIVE}(),i=tl[s].SURVEYS;return"https://".concat(i,"/").concat(t)}(t.uuid,hj.surveysHost):t.public_url}return t.run=hj.tryCatch((function(i){if(!al(i)){var n=(hj.settings.polls||[]).filter((function(t){return t.invite_enabled&&t.display_type===Yu.EXTERNAL})),r=(hj.settings.surveys||[]).concat(n);hj.hq.each(r||[],(function(n,r){Zc.matchRules({rules:r.targeting,userAttributeMatchLogic:r.targeting_user_attribute_match_logic},i,hj.tryCatch((function(){hj.log.debug("Survey #"+r.id+" has matched.","survey"),hj.bridge.storage.items.SURVEY_INVITES_CLOSED.exists(r.id)?hj.log.debug("Survey was already viewed.","survey"):hj.widget.addMatchingWidget("survey",r.id,r.created_epoch_time,r.targeting_percentage,(function(){hj.survey.data=r,pu.callAccordingToCondition(hj.survey.data,"survey",hj.tryCatch((function(){var t;t=hj.survey.data,hj.widget.surveyInvitationData={id:t.id,title:t.invite.title,description:t.invite.description,button:t.invite.button,close:t.invite.close,url:s(t),logoUrl:wl(t.logo_path||t.logo_url)},ul(e.SURVEY_INVITATION)}),"polls"))}),t.remove)}),"surveys.run.matchRules-callback"))}))}}),"surveys"),t.remove=hj.tryCatch((function(t){hj.survey.data?(hj.hq(".".concat(pl.SURVEY_INVITES)).length>0&&hj.hq(".".concat(pl.SURVEY_INVITES)).remove(),delete hj.survey.data,t&&setTimeout((function(){t()}),1)):t&&t()})),t},El=hj.tryCatch((function(){hj.survey={invites:yl(),ctrl:void 0,data:void 0,model:{},activeLanguageDirection:"ltr"}}),"surveys");function Al(){return Al=Object.assign?Object.assign.bind():function(t){for(var e=1;et.length)&&(e=t.length);for(var s=0,i=new Array(e);s-1})).reduce((function(t,e){var s;return Ol(Ol({},t),{},((s={})[e[0]]=e[1],s))}),{});return e.t?{event:e.t,category:e.ec||"",action:e.ea||"",label:e.el||"",value:e.ev||""}:{}}(t.get("hitPayload"));"event"===s.event&&Ll("ga",s)}))})),Hl("gaClientSent")||(hj.metrics.count("ga-version",{tag:{version:"ga"}}),Bl("gaClientSent",!0)))}}),"ga.forward_events")},Wl=zc("ga.send_hjuid"),Zl=60,Jl=!0,Yl=!1,Ql=hj.tryCatch((function(){Yl||(Yl=!0,hj.store.session.on("user.id",(function(t){"string"!=typeof t||t.length<8?Wl("invalid userid: '".concat(t,"'")):(Wl("got userId"),Ul=t.substring(0,8),td())})),Kl())}),"integrations.googleAnalytics"),Kl=hj.tryCatch((function(){if(!Dl){if($l()){Hl("gaClientSent")||(hj.metrics.count("ga-version",{tag:{version:"ga"}}),Bl("gaClientSent",!0));var t=window[window.GoogleAnalyticsObject||"ga"];return Wl("`ga` variable is available, waiting for tracker."),void t((function(t){Xl(t,!0)}))}Zl<=0?Wl("given up looking for GA module"):(Zl-=1,setTimeout(Kl,500))}}),"integrations"),Xl=hj.tryCatch((function(t,e){t&&(Dl&&e||(Dl!==t&&(Wl("got fresh tracker"),Jl=!0),Dl=t,td()))}),"integrations"),td=hj.tryCatch((function(){Jl&&Ul&&Dl&&(Jl=!1,Dl.send("event","Hotjar","detect_user",Ul,{nonInteraction:1}),Wl("successfully sent detect_user event"))}),"integrations"),ed={setup:Ql,setTracker:hj.tryCatch((function(t){Xl(t,!1)}),"integrations.googleAnalytics")},sd=zc("ga.send_hjuid_gtag"),id=!1,nd=hj.tryCatch((function(){if(!id){id=!0;var t=window.dataLayer;void 0!==t?(Hl("datalayerSent")||(hj.metrics.count("ga-version",{tag:{version:"datalayer"}}),Bl("datalayerSent",!0)),Hl("gtagClientSent")||(hj.metrics.count("ga-version",{tag:{version:"gtag"}}),Bl("gtagClientSent",!0)),hj.store.session.on("user.id",(function(t){if(t&&"string"==typeof t&&!(t.length<8)){var s=t.substring(0,8);e("set","user_properties",{hjuid:s}),e("event","detect_user",{event_category:"Hotjar",event_label:s,non_interaction:!0})}}))):sd("`dataLayer` is undefined")}function e(){var e;sd("calling gtag(".concat((e=arguments,Array.from(e).map((function(t){return JSON.stringify(t)}))),")")),t.push(arguments)}}),"ga.send_hjuid_gtag"),rd={forwardEvents:Gl,sendHotjarUserId:ed,sendHotjarUserIdGtag:{setup:nd}},od=function(){return null!==hj.bridge.storage.items.HUBSPOT_UTK.get()},hd=zc("hubspot","integrations"),ad={setup:hj.tryCatch((function(){hd("HubSpot setup started"),Bc(od,(function(t){if(t){var e=hj.bridge.storage.items.HUBSPOT_UTK.get();hd("HubSpot UTK found: ".concat(e)),hj.event.signal("int.hubspot",{utk:e})}else hd("HubSpot UTK cookie not found")}),5e3,5)}),"hubspot.setup")},cd=zc("kissmetrics","integration"),ud=function(){return void 0!==window.KM&&void 0!==window.KM.i},ld={setup:hj.tryCatch((function(){Bc(ud,(function(t){if(t){var e=window.KM.i();cd("Kissmetrics User ID found: ".concat(e)),hj("identify",null,{kissmetrics_id:e})}}),5e3,5)}),"kissmetrics.setup")},dd=zc("mixpanel.send_events"),fd=function(){return void 0!==window.mixpanel&&void 0!==window.mixpanel.set_config},vd={setup:hj.tryCatch((function(){Bc(fd,(function(t){t?(dd("Registering mixpanel hook"),window.mixpanel.set_config({hooks:{before_send_events:function(t){var e=qc(t.event);return dd("sending mixpanel payload: ".concat(t.event)),hj("event","MP_".concat(e)),hj.event.signal("int.mp",{event:e}),t}}})):dd("mixpanel global object not found or set_config not ready")}),3e3,5)}),"mixpanel.setup")},gd=zc("optimizely","integration"),md=window.optimizely;function pd(){gd("looking for tags.");var t=md.get("state").getExperimentStates({isActive:!0});for(var e in t){var s=t[e],i=(s.isInExperimentHoldback?"HB_":"")+s.experimentName,n=s.variation.name||s.variation.id;hj.event.signal("exp.opt",{experimentId:i,variantId:n}),hj("event",i+"/"+n)}}var wd={setup:hj.tryCatch((function(){void 0!==md&&"function"==typeof md.push&&"function"==typeof md.get&&void 0!==md.get("state")&&void 0!==md.get("data")?(gd("listening for campaignDecided event."),(md=window.optimizely||[]).push({type:"addListener",filter:{name:"campaignDecided"},handler:function(t){"applied"===t.name&&(gd("campaign decided; ready to tag experiments."),pd())}}),pd()):gd("`window.optimizely` is not ready")}),"optimizely.setup")},yd={setup:hj.tryCatch((function(){void 0!==window.ub&&void 0!==window.ub.page&&void 0!==window.ub.page.variantId?(hj.log.debug("Unbounce experiment in page '".concat(window.ub.page.name,"' is on variant '").concat(window.ub.page.variantId,"'"),"integration",window.ub),hj.event.signal("exp.ub",{experimentId:window.ub.page.name,variantId:window.ub.page.variantId}),hj("event","".concat(qc(window.ub.page.name),"-variant-").concat(window.ub.page.variantId))):hj.log.debug("Unbounce experiment not found","integration")}),"unbounce.setup")},Ed=hj.tryCatch((function(){var t=hj.settings.integrations;if(t){var e=hj.bridge.getSessionUserId();hj.store.session.set("user.id",e),t.optimizely&&t.optimizely.tag_recordings&&wd.setup(),t.google_analytics&&(t.google_analytics.tag_sessions&&rd.forwardEvents.setup(),t.google_analytics.send_hotjar_id&&(rd.sendHotjarUserId.setup(),rd.sendHotjarUserIdGtag.setup())),t.unbounce&&t.unbounce.tag_recordings&&yd.setup(),t.mixpanel&&t.mixpanel.send_events&&vd.setup(),t.hubspot&&t.hubspot.enabled&&t.hubspot.send_recordings&&ad.setup(),t.abtasty&&t.abtasty.tag_recordings&&kl.setup(),t.kissmetrics&&t.kissmetrics.send_user_id&&ld.setup()}}),"integrations"),Ad=!1,_d=function(t){var e=t.title,s=t.message,i=t.status,n=window.hjLazyModules;Ad?hj.widget.renderNotificationWidget({title:e,message:s,status:i}):ul(n.NOTIFICATION,(function(){Ad=!0,hj.widget.renderNotificationWidget({title:e,message:s,status:i})}))};function Sd(){return Sd=Object.assign?Object.assign.bind():function(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:"Hotjar",s=Wc("hjVerifyInstall"),i=Wc("hjVerifyUUID"),n=function(){_d({title:"".concat(e," installation invalid"),message:"The tracking code you are trying to verify does not match the one installed on this page. Please make sure you install the correct tracking code provided for this site.",status:"bad"}),Rd._reportVerificationResults(i,"wrong_code",{expected:String(hj.verifyInstall),actual:String(hjSiteSettings.site_id)});var t="Passed Site ID: ".concat(hj.verifyInstall," != Configured Site ").concat(hj.settings.site_id);hj.exceptions.log(new Error(t),"init._verifyInstallation")};try{t=sessionStorage.getItem("hjVerifyInstall")}catch(t){}if(s||t){hj.verifyInstall=parseInt(s||t);try{sessionStorage.setItem("hjVerifyInstall",s||t)}catch(t){}if(window.hjBootstrapCalled&&window.hjBootstrapCalled.length>1){var r,o=window.hjBootstrapCalled.filter((function(t,e){return window.hjBootstrapCalled.indexOf(t)===e})),h="You have "+window.hjBootstrapCalled.length+" tracking scripts installed on your site. ",a=2===window.hjBootstrapCalled.length?"script as this":"scripts as these",c=!!window.dataLayer;o.length>1?(r=h+"Please remove the duplicate "+a+" will cause issues.",_d({title:"Multiple different ".concat(e," scripts detected"),message:r,status:"bad"}),Rd._reportVerificationResults(i,"multiple_codes",{expected:String(hj.verifyInstall),actual:o,gtm:!1})):c?(r=h+"If you've installed ".concat(e," through GTM - please remove the duplicate ")+a+" will cause issues.",Rd._reportVerificationResults(i,"multiple_codes",{expected:String(hj.verifyInstall),actual:o,gtm:!0}),_d({title:"Multiple ".concat(e," scripts detected"),message:r,status:"bad"})):hj.verifyInstall===hj.settings.site_id?(r=h+"This will not affect data collection, but we do suggest removing redundant scripts.",Rd._reportVerificationResults(i,"warning",{expected:String(hj.verifyInstall),reason:"multiple scripts"}),_d({title:"Multiple ".concat(e," scripts detected"),message:r,status:"warning"})):n();var u="Passed Site ID: "+hj.verifyInstall+" contains multiple scripts "+window.hjBootstrapCalled.join(", ");hj.exceptions.log(new Error(u),"init._verifyInstallation")}else hj.verifyInstall===hj.settings.site_id?(Rd._sendVerifyInstallation((function(t){t.success||hj.exceptions.log(new Error("Verify installation endpoint failed"),"init._verifyInstallation")})),_d({title:"".concat(e," installation verified"),message:"The ".concat(e," tracking code has been properly installed on this page. ")+"Browse your site in this window if you wish to verify installation on any other pages.",status:"good"}),Rd._reportVerificationResults(i,"ok")):n()}}}).verifyInstallation,Td=_c.u6,Id=_c.b2,Pd=_c.Vv,Vd=_c.pF,Cd=_c.XA,jd=_c.fd,kd=_c.ec;const Od=(t,e,s=31536e6)=>({add:i=>{const n=e.get(t),r=n?`${n},${i}`:i;e.set({key:t,value:r,duration:s})},exists:s=>{const i=(null==e.get(t)?void 0:csString.prototype.split.call(e.get(t),","))||[];for(let t=0;t{const n=(null==e.get(t)?void 0:csString.prototype.split.call(e.get(t),","))||[],r=csArray.prototype.join.call(csArray.prototype.filter.call(n,(t=>t!==csString(i))),",");e.set({key:t,value:r,duration:s})}}),Nd=(t,e,s=!1)=>({set:i=>e.set({key:t,value:i,useLocalStorage:s}),get:()=>e.get(t,s),clear:()=>e.clear(t,s)});class xd{constructor(t,e,s){this.Rt=t,this.Ff=e,this.Hf=s}get(t,e){return this.Rt.cookielessTrackingEnabled||e?this.Hf.getItem(t):this.Ff.get(t)||this.Hf.getItem(t)}set(t){this.Rt.cookielessTrackingEnabled||t.useLocalStorage?this.Hf.setItem(t.key,t.value):this.Ff.set(t.key,t.value,t.duration)}clear(t,e){this.Rt.cookielessTrackingEnabled||e?this.Hf.removeItem(t):this.Ff.delete(t)}}function $d(t){let e,s=!1;const i={},n=["event","trigger","identify"];function r(){const t=csArray.prototype.slice.call(csArray.prototype.shift.call(e)),s=i[t[0]],o=csArray.prototype.slice.call(t,1);hj.log.debug("Processing command: "+t[0]+" "+csArray.prototype.join.call(csArray.prototype.map.call(o,(function(t){return"object"!=typeof t&&"function"!=typeof t||null===t?t:csJSON.stringify(t)})),", ")),"function"!=typeof s?hj.log.debug('Unknown command: "'+t[0]+'"',"command"):!function(t){return!hj.optOut&&csArray.prototype.indexOf.call(n,t)>=0}(t[0])?hj.log.debug('Command "'+t[0]+'" blocked due to opt-out',"command"):se.tryToExecute("hj-command",s)(o),e.length>0&&se.tryToExecute("hj-queue-command",r)()}function o(t){t[0]&&hj.event.signal("trigger:"+t[0])}i.event=function(e){if(o(e),e&&e.length>0){const s=e[0];t.pushExternalEvents([s])}},i.identify=function(t){!function(t){const e=t[0];if(t[1]){let s;s=!e&&0!==e||"null"===e||"undefined"===e?null:csString(e),hj.userAttributes.set(s,t[1])}else null!=e&&"object"==typeof e&&hj.userAttributes.set(null,e)}(t)},i.trigger=function(t){o(t)};const h={activate:function(){!s&&hj&&(e=hj.q,s=!0,Object.defineProperty(e,"push",{writable:!0,value:function(){for(let t=0;t0&&r())},isActive:()=>s};return h}const Md="surveyInvitationDisplayed",Ld="surveyDisplayed",Dd="surveySubmitted",Ud="surveyCompleted",Fd="surveyResponseUrl",Hd={[Md]:"Survey Invitation Displayed",[Ld]:"Survey Displayed",[Dd]:"Survey Response Submitted",[Ud]:"Survey Completed",[Fd]:"Survey Response URL"},Bd={[Md]:"survey_invitation_displayed",[Ld]:"survey_displayed",[Dd]:"survey_response_submitted",[Ud]:"survey_completed"},zd="FB_HJ_";class qd{constructor(t){this.Bf=[],this.zf=t}qf(t,e,s,i,n,r){const o=window._uxa.push(["isRecording"]),h=`${t}-${s}`,a=zd+e,c=r?t:`Survey ID : ${s}`;window.location.pathname;csArray.prototype.includes.call(this.Bf,h)||(csArray.prototype.push.call(this.Bf,h),this.zf.pushDynamicVariable(a,c)),o&&n&&this.zf.pushEventTrigerRecording(a)}listen(){window.addEventListener("hotjar-survey-event",(t=>{if(t&&t.detail&&t.detail.event){const{event:e,surveyId:s,question:i,questionIndex:n,response:r,insightsUrl:o}=t.detail;if(s)switch(e){case Md:this.qf(e,Hd.surveyInvitationDisplayed,s,Bd.surveyInvitationDisplayed);break;case Ld:this.qf(e,Hd.surveyDisplayed,s,Bd.surveyDisplayed);break;case Ud:this.qf(e,Hd.surveyCompleted,s,Bd.surveyCompleted);break;case Dd:if(this.qf(e,Hd.surveySubmitted,s,Bd.surveySubmitted,!0),i){let t=r&&r[0]&&r[0].answer;"multiple-close-ended"!=i.type&&i.text&&void 0!==t&&(isNaN(t)||(t=parseInt(t)),this.zf.pushDynamicVariable(`${zd+s} : ${i.text}`,t),this.zf.pushDynamicVariable(`${zd+s} : Question ${n+1}`,t))}o&&this.qf(o,Hd.surveyResponseUrl,s,null,!1,!0)}}}))}}class Gd{constructor(t){this.td=t}pushEventTrigerRecording(t){window._uxa.push(["trackEventTriggerRecording","@ETS@"+t])}pushPageView(t){window._uxa.push(["trackPageview",t])}pushDynamicVariable(t,e){window._uxa.push(["trackDynamicVariable",{key:t,value:e}])}pushInternalEvents(t){csArray.prototype.forEach.call(t,(({key:t,val:e})=>this.pushDynamicVariable(t,e)))}pushExternalEvents(t){var e;if(!this.td)return;const s=this.Gf(t);for(let t=0;t-1&&Ie.mayHaveEmail(t)||e&&Ie.mayHaveIPAddress(t))}Gf(t){const e=/^[a-zA-Z0-9 _\-.:/]*$/;return t?csArray.prototype.filter.call(t,(t=>!!t&&(e.test(t.toString())?!this.Zf(t)||(hj.log.debug("Tag "+t+" has been removed due to possible PII information included"),!1):(hj.log.debug("Tag "+t+" has been removed due to having invalid characters"),!1)))):[]}Wf(t){return"string"==typeof t?csString.prototype.replace.call(t,/^\s+|\s+$/gm,""):""}}class Wd{constructor(t){this.zf=t}send(t){hj.log.debug(`Sending tags: ${csJSON.stringify(t)}`),this.zf.pushInternalEvents(t)}tag(t,e,s,i,n){const r=this;return function(o){if(o){const h=csArray.prototype.reduce.call(s,(function(s,r){let h=t,a="";const c=Object.keys(r);return csArray.prototype.forEach.call(c,(function(t){const s=r[t];let c=o[s];null==c&&(c=""),i&&(c=i(s,c)),s===e&&(a=c),s!==e||n?""!==c&&(h+=`.${t}:${c}`):h+=`.${t}`})),csArray.prototype.push.call(s,{key:h,val:a}),s}),[]);r.send(h)}}}setup({vocEnabled:t,integrationsEnabled:e}){const s=function(t,e){return"string"==typeof e?csString.prototype.replace.call(e,/\.|:/g,"_"):e},i=function(t,e){return csString.prototype.replace.call(csString.prototype.replace.call(csString.prototype.replace.call(csString.prototype.toString.call(e),".e:",".E:"),".v:",".V:"),".c:",".C:")},n={"poll.show":this.tag("poll.show","id",[{id:"id"}]),"poll.send":this.tag("poll.send","response_id",[{id:"id",r_id:"response_id"}]),"poll.question":this.tag("poll.q","answer",[{t:"type",a:"answer",id:"id",qid:"questionUuid"}],(function(t,e){if("answer"===t){const t=parseInt(e);return isNaN(t)?(se.warn(`Poll question answer should be a number type, received ${e} instead`),e):t}if("type"!==t)return e;return{"rating-scale-5":"rating5","rating-scale-7":"rating7","net-promoter-score":"nps","single-close-ended":"singleClose","multiple-close-ended":"multiClose","single-open-ended-multiple-line":"singleOpenMulti","single-open-ended-single-line":"singleOpenSingle"}[e]||e})),"feedback.show":this.tag("feedback.show","id",[{id:"id"}]),"feedback.send":this.tag("feedback.send","id",[{id:"id"}]),"feedback.sentiment":this.tag("feedback.sentiment","emotion",[{e:"emotion",id:"id",r_id:"response_id"}]),"survey.show":this.tag("survey.show","id",[{id:"id"}]),"survey.open":this.tag("survey.open","id",[{id:"id"}])},r={"exp.opt":this.tag("exp.opt","variantId",[{e:"experimentId",v:"variantId"}],i),"exp.ub":this.tag("exp.ub","variantId",[{e:"experimentId",v:"variantId"}],i),"exp.abt":this.tag("exp.abt","variantId",[{e:"experimentId",v:"variantId"}],i),"exp.go":this.tag("exp.go","variantId",[{e:"experimentId",v:"variantId",c:"containerId"}],i),"int.ga":this.tag("int.ga","action",[{a:"action"}],s,!0),"int.mp":this.tag("int.mp","event",[{event:"event"}],s,!0),"int.hubspot":this.tag("int.hubspot","utk",[{utk:"utk"}])};return Object.assign({},t?n:{},e?r:{})}listen(t){const e=this.setup(t);csArray.prototype.forEach.call(Object.keys(e),(function(t){hj.event.listen(t,e[t])}))}}const Zd=["start:hotjar"];class Jd{constructor(t,e,s,i,n,r,o,h,a){this.Rt=t,this.bc=e,this.Ff=s,this.Hf=i,this.xt=n,this.Mt=r,this.Jf=o,this.td=h,this.Yf=a,this.Qf=!1,this.Kf=!1,this.Xf=new xd(this.Rt,this.Ff,this.Hf),this.zf=new Gd(this.td)}init(){var t,e,s,i,n,r;this.Qf=this.Rt.isSMB,this.Kf=!(!(null===(t=this.Rt.voc)||void 0===t?void 0:t.enabled)||!(null===(e=this.Rt.voc)||void 0===e?void 0:e.siteId)),this.tv(),Id({uuid:Ec.generate}),i=this.Xf,n=this.xt,r=this.Jf,hj.bridge={storage:{items:{POLL_DONE:Od("_hjDonePolls",i),POLL_MINIMIZED:Od("_hjMinimizedPolls",i),SURVEY_INVITES_CLOSED:Od("_hjClosedSurveyInvites",i),DEBUG_FLAG:Nd("hjDebug",i),FEEDBACK_SHOW_MESSAGE:Nd("_hjShownFeedbackMessage",i),HUBSPOT_UTK:Nd("hubspotutk",i),HAS_CACHED_USER_ATTRIBUTES:Nd("_hjHasCachedUserAttributes",i),USER_ATTRIBUTES_HASH:Nd("_hjUserAttributesHash",i)},localStorage:{USER_ATTRIBUTES:Nd("_hjUserAttributes",i,!0)}},getSessionUserId:()=>{const t=n.getVisitor();return null==t?void 0:t.id},getSessionFirstSeen:()=>{},getPageContent:t=>null==r?void 0:r.getPageContent(t),isRecordingEnabled:()=>!1,flushUserAttributes:()=>null};$d(this.zf).activate(),null===(s=this.Yf)||void 0===s||s.start()}onAfterNaturalPageView(){this.startHotjar()}onAfterArtificialPageView(){this.Kf&&(Vd(),jd(this.Mt.getUrl()))}startHotjar(){var t;if(this.Qf&&window.hjSiteSettings&&window._uxa.push([Zd,window.hjSiteSettings]),!this.Qf&&this.Kf){const e=null===(t=this.Rt.voc)||void 0===t?void 0:t.siteId,s=window.document,i=s.head||s.getElementsByTagName("head")[0],n=s.createElement("script");n.async=!0,n.src=`https://static.hj.contentsquare.net/c/hotjar-${e}.js`,n.charset="utf-8",i.appendChild(n)}}tv(){this.bc.register(Zd,(t=>{if(t){hj.settings=t,Td();if(new Wd(this.zf).listen({vocEnabled:this.Kf,integrationsEnabled:this.Qf}),this.Qf&&(hj.scriptLoaded=!0,Pd(),Cd(),window.hjBootstrapCalled=csArray.prototype.concat.call(window.hjBootstrapCalled||[],t.site_id),kd("Contentsquare")),this.Kf){if(!this.Qf){new qd(this.zf).listen()}Vd(),window._uxa.push(["replay:link:generate",{},({isRecording:t,replayLink:e})=>{"function"==typeof hj&&t&&e&&hj("identify",null,{contentsquare_replay_link:`https://${e}&vd=hotjar`})}]),jd(this.Mt.getUrl())}}}))}}var Yd,Qd;!function(t){t.replayRecordingUnmaskedUrlRegex="replayRecordingUnmaskedUrlRegex",t.replayRecordingMaskedUrlRegex="replayRecordingMaskedUrlRegex",t.replayRecordingUnmaskedUrlRegexRules="replayRecordingUnmaskedUrlRegexRules",t.replayRecordingMaskedUrlRegexRules="replayRecordingMaskedUrlRegexRules"}(Yd||(Yd={})),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"}(Qd||(Qd={}));class Kd{constructor(t,e,s,i){this.Id=t,this.Rt=e,this.Mt=s,this.sv=i}init(){this.iv()}shouldMaskNonTextElements(){return this.Rt.isSMB&&this.Rt.anonymisationMethod===Yd.replayRecordingMaskedUrlRegexRules&&this.shouldUseAnonymization()}shouldUseAnonymization(){if(this.Id.isReplayUnanonymizedAllowedByConsent()){switch(this.Rt.anonymisationMethod){case null:case Yd.replayRecordingMaskedUrlRegex:return!(!this.Rt.replayRecordingMaskedUrlRegex||!this.Rt.replayRecordingMaskedUrlRegex.test(this.Mt.getAnonymizedUrl()));case Yd.replayRecordingMaskedUrlRegexRules:return this.sv.evaluateUrl(this.Mt.getAnonymizedUrl())}return!1}switch(this.Rt.anonymisationMethod){case null:case Yd.replayRecordingUnmaskedUrlRegex:return!(this.Rt.replayRecordingUnmaskedUrlRegex&&this.Rt.replayRecordingUnmaskedUrlRegex.test(this.Mt.getAnonymizedUrl()));case Yd.replayRecordingUnmaskedUrlRegexRules:return!this.sv.evaluateUrl(this.Mt.getAnonymizedUrl())}return!0}iv(){this.Rt.anonymisationMethod===Yd.replayRecordingMaskedUrlRegexRules&&this.Rt.replayRecordingMaskedUrlRegexRules?this.sv.setRegexRules(this.Rt.replayRecordingMaskedUrlRegexRules):this.Rt.anonymisationMethod===Yd.replayRecordingUnmaskedUrlRegexRules&&this.Rt.replayRecordingUnmaskedUrlRegexRules&&this.sv.setRegexRules(this.Rt.replayRecordingUnmaskedUrlRegexRules)}}class Xd{constructor(){this.nv=[]}setRegexRules(t){this.nv=csArray.prototype.map.call(t,(t=>this.rv(t)))}evaluateUrl(t){return csArray.prototype.some.call(this.nv,(e=>{var s,i;const n=this.ov(t,e);return(null==e?void 0:e.notOperator)?!(null===(s=e.regex)||void 0===s?void 0:s.test(n)):null===(i=e.regex)||void 0===i?void 0:i.test(n)}))}ov(t,e){const s=Xe(t);return s?e.ignoreQueryParams&&e.ignoreURIFragments?`${s.origin}${s.pathname}`:e.ignoreQueryParams?`${s.origin}${s.pathname}${s.hash}`:e.ignoreURIFragments?`${s.origin}${s.pathname}${s.search}`:t:t}hv(t){return t.ignoreCaseSensitivity?"i":""}rv(t){switch(t.operator){case Qd.NOT_START:t.notOperator=!0;case Qd.START:t.regex=new csRegExp(`^${t.value}`,this.hv(t));break;case Qd.NOT_END:t.notOperator=!0;case Qd.END:t.regex=new csRegExp(`${t.value}$`,this.hv(t));break;case Qd.NOT_CONTAIN:t.notOperator=!0;case Qd.CONTAIN:t.regex=new csRegExp(`${t.value}`,this.hv(t));break;case Qd.NOT_EXACT:t.notOperator=!0;case Qd.EXACT:t.regex=new csRegExp(`^${t.value}$`,this.hv(t));break;default:se.warn(`buildRegexWithRule, unknown type: ${t.operator}`)}return t}}function tf(t){return Ys.traverse(t,(t=>{if(11===t.nodeType){const e=Ys.getProperty(t,"styles");e&&(t.adoptedStyleSheets=e)}})),t}function ef(t){if(null==t?void 0:t.length)return Ot(t,(t=>function(t){let e=[];try{e=Ot(t.cssRules,(t=>t.cssText))}catch{}return{cssRules:e}}(t)))}function sf(){ct(document).visitAll((t=>{var e;if(L(t)&&(null===(e=t.adoptedStyleSheets)||void 0===e?void 0:e.length)>0){const e=ef(t.adoptedStyleSheets);Ys.setProperty(t,"styles",e)}}))}class nf{constructor(t,e,s,i,n){this.av=t,this.Rt=e,this.Tc=s,this.cv=i,this.uv=n}getPageContent(t){this.Tc.setMaskedElementSettings(this.cv.getMaskedElementSettings()),this.Tc.startIdentifier(),this.uv.start(),sf(),Sn.serialize(document,(e=>{const s=tf(e),i=csArray.prototype.reduce.call(this.av,((t,e)=>e.sanitize(t)),s);this.uv.stop(),t(csJSON.stringify(i),this.Rt.projectId)}))}}class rf extends Cn{constructor(t){super(),this.Uh=null,this.lv=null,this.Ue=null,this.Ch=null,this.fv=["value","checked","src","data","alt"],this.vv={state:ii.MaskedElementState.Child},this.gv=t=>{for(const e of t){if(ii.isMaskedElement(e.target)||ii.isMaskedElementChild(e.target))for(let t=0;t"added"===e&&this.Sv(t)))),this.Ue.observe(),csSetTimeout(this.wv)}onStop(){var t,e,s;this.Uh&&(this.pv(document),this.Uh.disconnect()),null===(t=this.lv)||void 0===t||t.disconnect(),null===(e=this.Ue)||void 0===e||e.disconnect(),null===(s=this.Ch)||void 0===s||s.disconnect()}Ev(){return window.ResizeObserver?new ResizeObserver((t=>{csArray.prototype.forEach.call(t,(t=>{this.resizeObserverCallback(t)}))})):null}Av(){return new qr((t=>{csArray.prototype.forEach.call(t,(t=>{this.Rv(t)?this.mv(t):(this.bv(t),this.Tv(t))}))}))}_v(t){return new qr((e=>{csArray.prototype.forEach.call(e,(e=>this.Iv(e,t)))}))}resizeObserverCallback(t){const e=t.target.getBoundingClientRect(),s=ii.getMaskedElementDetails(t.target);if(s.state!==ii.MaskedElementState.Parent)return;if(e.width===s.width&&e.height===s.height)return;const i={state:ii.MaskedElementState.Parent,width:e.width,height:e.height};ii.setMaskedElementProperty(t.target,i),this.produceEvent({type:"ResizeMaskedElement",target:Xs(t.target),width:e.width,height:e.height})}Tv(t){this.Ch&&b(t)&&!O(t)&&this.Ch.observe(t)}Rv(t){const e=csNodeparentNode.apply(t);return e?ii.isMaskedElement(e)||ii.isMaskedElementChild(e):!!L(t)&&(ii.isMaskedElement(t.host)||ii.isMaskedElementChild(t.host))}Sv(t){(ii.isMaskedElement(t.host)||ii.isMaskedElementChild(t.host))&&ii.setMaskedElementProperty(t,this.vv)}pv(t){ct(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{ii.unsetMaskedElementProperty(t)}))}bv(t){const e=t.getBoundingClientRect(),s={state:ii.MaskedElementState.Parent,width:e.width,height:e.height};ii.setMaskedElementProperty(t,s),this.Pv(t),ct(t).visitAll((e=>e!=t&&ii.setMaskedElementProperty(e,this.vv)))}mv(t){ii.setMaskedElementProperty(t,this.vv),ct(t).visitAll((e=>e!=t&&ii.setMaskedElementProperty(e,this.vv)))}Pv(t){var e;const s=null!==(e=Ys.getProperty(t,ii.maskedAttributeProp))&&void 0!==e?e:{attributes:[]};for(let t=0;tcsString.prototype.indexOf.call(e.attrName,n)>-1&&W.call(t,e.selector)))&&csArray.prototype.push.call(i.attributes,n)}0!==i.attributes.length&&ii.setMaskedAttributeProperty(t,i)}}bi([gt()],rf.prototype,"resizeObserverCallback",null);class of{constructor(){this.Cv=0,this.Vi=!1,this.jv="data-cs-capture",this.kv=t=>{for(const e of t){if(rr.isWhitelistedElement(e.target))for(let t=0;txt(t,(t=>this.Ov(t))))));const t=this.$v?`[${this.jv}], ${this.$v}`:`[${this.jv}]`;this.Uh.observe(t),this.Ue||(this.Ue=new vn(this.kv,((t,e)=>"added"===e&&this.Mv(t)))),this.Ue.observe()}stop(){this.Vi&&(this.Cv--,0===this.Cv&&(this.Vi=!1,this.Lv()))}Lv(){this.Uh&&(this.Nv(document),this.Uh.disconnect()),this.Ue&&this.Ue.disconnect()}setWhitelistedElementsSelector(t,e=!0){if(ei(t))this.$v=t;else if(e)throw new Error("Command misuse: setCapturedElementsSelector")}getWhitelistedElementsSelector(){return this.$v}Ov(t){ct(t).visitAll((t=>{rr.whitelistElement(t)}))}Mv(t){rr.isWhitelistedElement(t.host)&&rr.whitelistElement(t)}Nv(t){ct(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{rr.removeWhitelistElement(t)}))}}class hf{constructor(){this.Uh=null,this.Ue=null,this.Vi=!1,this.kv=t=>{for(const e of t)if(Vr.isEditableNode(e.target))for(let t=0;txt(t,(t=>{this.Dv(t)})))),this.Uh.observe("[contenteditable]"),this.Ue=new vn(this.kv,((t,e)=>"added"===e&&this.Uv(t))),this.Ue.observe())}stop(){var t,e;this.Vi&&(this.Vi=!1,null===(t=this.Uh)||void 0===t||t.disconnect(),this.Uh=null,null===(e=this.Ue)||void 0===e||e.disconnect(),this.Ue=null)}Dv(t){ct(t).visitAll((t=>{Vr.markEditableNode(t)}))}Uv(t){Vr.isEditableNode(t.host)&&Vr.markEditableNode(t)}}class af{constructor(){}sanitize(t){return Ys.traverse(t,(t=>{if(t instanceof Fi){const e=ii.getMaskedAttributeDetails(t);t.attributes=this.Io(t,e);const s=ii.getMaskedElementDetails(t);s.state===ii.MaskedElementState.Parent&&this.Po(t,s)}})),t}Io(t,e){return 0===e.attributes.length?t.attributes:csArray.prototype.filter.call(t.attributes,(t=>-1===csArray.prototype.indexOf.call(e.attributes,t.name)))}Po(t,e){const s=`width: ${e.width}px !important; height: ${e.height}px !important;`;t.children=[],t.shadowRoot=void 0,csArray.prototype.push.call(t.attributes,{name:"style",value:s,namespaceURI:""}),Fi.getAttribute(t,"data-cs-mask")||csArray.prototype.push.call(t.attributes,{name:"data-cs-mask",value:"",namespaceURI:""})}}class cf extends ci{constructor(){super(),this.Fv=[]}onStart(){csArray.prototype.forEach.call(this.Fv,(t=>this.triggerHotjarEvent(t))),this.Fv=[]}onStop(){}triggerHotjarEvent(t){this.isStarted?this.Eu(t)&&hj("event",t):csArray.prototype.push.call(this.Fv,t)}Eu(t){return g(t)}}const uf=["event"];class lf{constructor(t){this.bc=t,this.yu=new cf}init(){this.bc.register(uf,(t=>{this.yu.triggerHotjarEvent(t)}))}start(){this.yu.start()}}class df{constructor(t,e,s,i,n){this.kc=t,this.cv=e,this.Hv=s,this.uv=i,this.an=n}getSensitiveStatus(){var t,e;return{started:this.Hv.isStarted,useAnonymization:this.kc.shouldUseAnonymization(),capturedElementSelector:this.uv.getWhitelistedElementsSelector(),maskedElementSettings:this.cv.getMaskedElementSettings(null===(t=this.kc)||void 0===t?void 0:t.shouldMaskNonTextElements()),encryptionSelectors:null===(e=this.an)||void 0===e?void 0:e.getEncryptionSelectors()}}getElementSensitiveStatus(t){const e=this.Hv.isStarted,s=this.kc.shouldUseAnonymization();return e?ii.isMaskedElement(t)||ii.isMaskedElementChild(t)?ya.MASKED:Pr.shouldEncrypt(t)?ya.ENCRYPTED:Vr.isEditableNode(t)?ya.ANONYMIZED:s?rr.isWhitelistedElement(t)?ya.CAPTURED:ya.ANONYMIZED:ya.CAPTURED:ya.ANONYMIZED}}const ff=["setEncryptionSelectors"],vf=["setPIISelectors"],gf=["setCapturedElementsSelector"];class mf{constructor(t,e,s,i,n,r,o){this.oc=t,this.bc=e,this.cv=s,this.Hv=i,this.uv=n,this.an=r,this.Bv=o}init(){var t,e;this.Bv&&this.an&&(null===(t=this.Bv)||void 0===t||t.addSelector(null===(e=this.an)||void 0===e?void 0:e.getEncryptionSelectors())),this.tv()}onStartTracking(t){this.Hv.start(),this.oc.emitSensitiveStatusChange()}onBeforeArtificialPageView(){this.Hv.stop(),this.oc.emitSensitiveStatusChange()}onAfterArtificialPageView(){this.Hv.start(),this.oc.emitSensitiveStatusChange()}onBeforeSessionRenewal(){this.Hv.stop(),this.oc.emitSensitiveStatusChange()}onOptout(){this.Hv.stop(),this.oc.emitSensitiveStatusChange()}onReplayUnanonymizationConsentGranted(){this.oc.emitSensitiveStatusChange()}onReplayUnanonymizationConsentWithdrawn(){this.oc.emitSensitiveStatusChange()}tv(){this.bc.register(vf,(t=>{this.cv.setMaskedElementSettingsFromCommand(t),this.oc.emitSensitiveStatusChange()})),this.bc.register(gf,(t=>{this.uv.setWhitelistedElementsSelector(t),this.oc.emitSensitiveStatusChange()})),this.bc.register(ff,(t=>{var e,s;null===(e=this.an)||void 0===e||e.setEncryptionSelectors(t),null===(s=this.Bv)||void 0===s||s.addSelector(t)}))}}class pf extends ci{constructor(t,e,s,i,n,r){super(),this.Tc=t,this.cv=e,this.uv=s,this.Bv=i,this.zv=n,this.kc=r}onStart(){var t,e,s;this.uv.start(),this.Tc.setMaskedElementSettings(this.cv.getMaskedElementSettings(null===(t=this.kc)||void 0===t?void 0:t.shouldMaskNonTextElements())),this.Tc.startIdentifier(),null===(e=this.Bv)||void 0===e||e.start(),null===(s=this.zv)||void 0===s||s.start()}onStop(){var t,e;this.uv.stop(),this.Tc.stopIdentifier(),null===(t=this.Bv)||void 0===t||t.stop(),null===(e=this.zv)||void 0===e||e.stop()}}var wf;!function(t){function e(t,e){const n=function(t,e){"date"!==t.rule_type||"less_than"!==t.match_operation&&"greater_than"!==t.match_operation||(e=(new csDate(e).valueOf()/1e3).toFixed(0));switch(t.match_operation){case"exact":switch(t.rule_type){case"string":return!!g(t.pattern)&&csString.prototype.toLowerCase.call(e)===csString.prototype.toLowerCase.call(t.pattern);case"boolean":return e===t.pattern||e===csString(t.pattern);case"number":return!!y(e)&&Number(e)===Number(t.pattern);default:return e===t.pattern}case"starts_with":return!!g(t.pattern)&&0===csString.prototype.indexOf.call(e,t.pattern);case"ends_with":return!!g(t.pattern)&&De(e,t.pattern);case"contains":return!!g(t.pattern)&&-1!==csString.prototype.indexOf.call(e,t.pattern);case"regex":if(!g(t.pattern))return!1;try{return new csRegExp(t.pattern).test(e)}catch(t){return se.warn(`targeting.matchOperation.regex invalid ${null==t?void 0:t.message}`),!1}case"simple":return!!g(t.pattern)&&i(e)===i(t.pattern);case"greater_than":return Number(e)>Number(t.pattern);case"less_than":return Number(e)=r.getTime()}(t,e);case"unknown":return function(t){if(!y(t))return!0;if(g(t))return""===csString.prototype.trim.call(t);if(m(t))return!0===t;if(f(t))return 0!==t;return!1}(e);default:return se.warn(`targeting.matchOperation.regex not managed operation ${t.match_operation}`),!1}}(t,e);return t.negate?!n:n}function s(t,e){const s=new csDate,i=s.setDate(s.getDate()-Number(t.pattern)),n=new csDate(i);return new csDate(e).toDateString()===n.toDateString()}function i(t){const e=Xe(Le(t,"http://")||Le(t,"https://")?t:`https://${t}`);return null!==e?csString.prototype.replace.call(e.host,/^www./,""):t}t.isUrlMatching=function(t,s){for(const i of t)if(e(i,s))return!0;return!1},t.isMatching=function(t,s){if(g(s)){for(const i of t)if(e(i,s))return!0}else if(m(s))for(const i of t)if(e(i,csString(s)))return!0;return!1}}(wf||(wf={}));class yf{constructor(){this.qv=[],this.Gv=[]}setTargetingRules(t){for(const e of t)"url"===e.component?csArray.prototype.push.call(this.qv,e):"trigger"===e.component&&csArray.prototype.push.call(this.Gv,e)}matchUrl(t){return wf.isUrlMatching(this.qv,t)}matchTrigger(t){return wf.isMatching(this.Gv,t)}}class Ef extends ci{constructor(t,e,s){super(),this.Wv=t,this.Zv=e,this.Mt=s}init(){this.Jv=new yf,this.Wv&&this.Jv.setTargetingRules(this.Wv)}onStart(){}checkInitialUrlTargetingRules(){const t=this.Mt.getAnonymizedUrl();this.Yv(t,"url")&&this.Zv()}onStop(){}onTargetingRulesArtificialPageview(t){this.isStarted&&this.Yv(t,"url")&&this.Zv()}onExternalEvent(t){this.isStarted&&this.Yv(t.name,"trigger")&&this.Zv()}Yv(t,e){var s,i;return!("url"!==e||!g(t)||!(null===(s=this.Jv)||void 0===s?void 0:s.matchUrl(t)))||!("trigger"!==e||!(null===(i=this.Jv)||void 0===i?void 0:i.matchTrigger(t)))}}class Af{constructor(t,e,s,i,n,r){this.Wv=t,this.Qv=e,this.oc=s,this.Kv=i,this.td=n,this.Mt=r}init(){this.Xv=new Ef(this.Wv,this.Qv,this.Mt),this.td.addListener(this.Xv),this.Xv.init()}start(){this.Xv.start()}stop(){this.Xv.stop()}checkInitialUrlTargetingRules(){this.Xv.checkInitialUrlTargetingRules()}emitTargetingCollectState(){const t=this.Kv.getInitialCollectState();t===Ai.ANALYTICS_ONLY?this.oc.emitCollectStateChange(Ai.ANALYTICS_ONLY_RULES_TARGETING,_i.ETR_OFF):t===Ai.RECORDING_GLOBAL_SAMPLING&&this.oc.emitCollectStateChange(Ai.RECORDING_RULES_TARGETING,_i.ETR_OFF)}}class _f{constructor(t,e,s,i,n,r,o,h,a,c,u,l,d,f,v,g,m,p,w,y,E,A,_,S,R,b,T,I,P){this.Vu=t,this.pu=e,this.xt=s,this.$t=i,this.oc=n,this.bc=r,this.tg=o,this.Rt=h,this.eg=a,this.sg=c,this.ig=u,this.Id=l,this.bt=d,this.Il=f,this.ph=v,this.Mt=g,this.ng=m,this.td=p,this.ru=w,this.$e=y,this.rg=E,this.Cc=A,this.og=_,this.Gr=S,this.jc=R,this.Ff=b,this.Hf=T,this.Kv=I,this.cv=P,this.hg=(t=!1)=>{const e=this.$t.getSession();null===e?(this.ag=new Af(this.Rt.recordTargetingRules,this.cg,this.oc,this.Kv,this.td,this.Mt),this.ag.init(),this.ag.start()):e.collectState!==Ai.RECORDING_RULES_TARGETING&&e.collectState!==Ai.ANALYTICS_ONLY_RULES_TARGETING||this.cg(t)},this.cg=(t=!1)=>{this.ug.onLoad((()=>{var e,s;null===(e=this.ag)||void 0===e||e.emitTargetingCollectState(),null===(s=this.ag)||void 0===s||s.stop(),this.oc.emitStartTracking(t)})),this.lg(t)},this.lg=(t=!1)=>{this.sg.isActive()||(this.cv.init(),this.dg.start(t),this.ug.start())},this.fg=()=>{this.oc.emitBeforeSessionRenewal(),this.vg(!0),this.oc.emitAfterSessionRenewal()},this.gg=()=>{this.oc.emitBeforeSessionRenewal(),this.Kv.refreshQuota(),this.Kv.onQuotaReady((t=>{t!==Ai.QUOTA_REACHED&&(this.vg(!0),this.oc.emitAfterSessionRenewal())}))}}start(){var t;if(this.eg.init(),this.sg.init(),this.sg.isActive())return;let e,s,i,n,r,o,h,a,c,u,l,d,f,v,g,m,p,w;if(this.Gr.schedule((()=>{l=new Qa(this.$t,this.xt),v=new yc(l),u=new Ha(this.Il),d=new rf((()=>{})),g=new of,w=new hf;const t=new pf(d,this.cv,g,p,w,this.mg());f=new df(this.mg(),this.cv,t,g,m);const y=new mf(this.oc,this.bc,this.cv,t,g,m,p);y.init(),this.oc.addListener(y),e=new Ta(this.Rt,this.Vu,this.xt,this.Il,u,this.bc,l,new fc(se),this.ru,this.jc,this.td,f),s=new Yo(this.bc,this.$t,this.Rt,this.Vu,this.pu,this.bt),c=new mc(f);const E=new lc(this.Rt);a=new uc(this.Rt,E,c,f,this.ru),a.init();const A=new wc;i=new qo(this.xt,this.$t,this.bc,this.ru,E,this.Rt,A,c),n=new rh(this.Rt,this.Vu,this.xt,this.bc,this.bt,l,this.Mt),this.dg=new Fa(this.Rt,this.bc,this.oc,this.Vu,this.xt,this.$t,this.Id,this.$e,this.ph,this.Mt,this.Cc,A,this.td,this.Pd,undefined),this.pg=new Ya(this.Rt,this.xt,this.$t,this.bc),r=new ac(this.Rt,this.bc,this.pu,this.Vu,this.td),o=new cc(this.bc),h=new gc(this.Rt,new Ue(this.Rt,this.bt),this.jc),this.ug=new Ba})),this.Gr.schedule((()=>{this.ig.init()})),this.Gr.schedule((()=>{i.init()})),this.Gr.schedule((()=>{s.init()})),this.Gr.schedule((()=>{n.init()})),this.Gr.schedule((()=>{this.rg.init()})),this.Gr.schedule((()=>{this.dg.init()})),this.Gr.schedule((()=>{this.pg.init()})),this.Gr.schedule((()=>{r.init()})),this.Gr.schedule((()=>{this.ng.init()})),this.Gr.schedule((()=>{o.init()})),this.Gr.schedule((()=>{h.init()})),this.Gr.schedule((()=>{this.og.init()})),this.Gr.schedule((()=>{this.oc.addListener(this.pg),this.oc.addListener(this.tg),this.oc.addListener(e),this.oc.addListener(this.ig),this.oc.addListener(i),this.oc.addListener(n),this.oc.addListener(this.rg),this.oc.addListener(this.dg),this.oc.addListener(r),this.oc.addListener(s),this.oc.addListener(a),this.oc.addListener(h),this.oc.addListener(v)})),pc.isRecordingSupported()&&this.Gr.schedule((()=>{const t=new Vo(c,this.$t,this.Rt,this.Vu,this.bc,this.bt,l,d,this.nn,this.rn,this.hn,this.Ic,this.oc,this.td,this.ru,this.Cc,this.jc,this.ph,this.mn,this.mg(),this.wg,m);t.init(),this.oc.addListener(t),i.setRecordingService(t.recordingService)})),(null===(t=this.Rt.voc)||void 0===t?void 0:t.enabled)||this.Rt.eventsApiEnabled){let t;this.Gr.schedule((()=>{var e;if(null===(e=this.Rt.voc)||void 0===e?void 0:e.enabled){const e=this.mg().shouldUseAnonymization(),s=[],i=new af,n=new mr(e,this.Rt.whitelistedAttributes,this.bt,this.Rt.anonymizeDigits);csArray.prototype.push.call(s,i,n),t=new nf(s,this.Rt,d,this.cv,g)}const s=new lf(this.bc);s.init();const i=new Jd(this.Rt,this.bc,this.Ff,this.Hf,this.xt,this.Mt,t,this.td,s);i.init(),this.oc.addListener(i)}))}this.Gr.schedule((()=>{e.init()})),this.Gr.schedule((()=>{this.Rt.isQuotaEnabled()?l.onSessionExpired((()=>{this.gg()})):l.onSessionExpired((()=>{this.fg()})),this.vg()}))}vg(t=!1){if(this.Rt.hasTargetingRules())return this.hg(t),this.bc.start(),void(this.ag&&this.ag.checkInitialUrlTargetingRules());this.bc.start(),this.ug.onLoad((()=>{this.oc.emitStartTracking(t)})),tc(this.Rt)&&!t||this.lg(t)}mg(){if(this.kc)return this.kc;const t=new Xd;return this.kc=new Kd(this.Id,this.Rt,this.Mt,t),this.kc.init(),this.kc.shouldUseAnonymization()&&me.counters.pageAnonymisation.count("anonymized-on-start"),this.kc}}class Sf{constructor(t,e,s,i,n,r,o,h){this.Rt=t,this.xt=e,this.xe=s,this.yg=i,this.Eg=n,this.Ag=r,this._g=o,this.Sg=h}compute(t){var e,s;this.Rt.crossDomainTracking&&!this.Rt.cookielessTrackingEnabled?this.Rt.crossDomainSingleIframeTracking?null===(e=this._g)||void 0===e||e.start((()=>this.Rg(t))):null===(s=this.Ag)||void 0===s||s.applyUpToDate((()=>this.Rg(t))):this.Rg(t)}Rg(t){this.Eg.handle(),this.yg.clear(),this.bg()?(this.yg.restoreClearedVisitor(),t(!0)):(this.xe.exclude(this.Rt),t(!1))}bg(){const t=Qt.boolean(this.Rt.sampleRate);return this.Sg.isForceIncluded()||!this.xe.isExcluded()&&this.xt.doesVisitorExist()||!this.xe.isExcluded()&&t}}class Rf{constructor(t,e,s,i){this.Rt=t,this.Xf=e,this.oc=s,this.$t=i,this.Tg=1e4}createOrUpdateVisitor(){var t;let e=this.getVisitor();null===e&&(e=this.Ig(),null===(t=this.$t)||void 0===t||t.removeSession()),this.Pg(e),this.setVisitor(e)}Ig(){return{id:Ec.generate(),visitsCount:0,appliedTrackingDraw:this.Rt.lastTrackingDraw,creationTimestamp:$e(),lastVisitTimestamp:0,hitTimestamp:0,expires:xe.now()+this.Rt.visitorCookieTimeout,allowSubdomains:this.Rt.allowSubdomains,identityPrint:null}}Pg(t){const e=$e();this.$t&&!this.$t.doesSessionExist()&&(t.visitsCount+=1,t.lastVisitTimestamp=e),t.hitTimestamp=e,t.appliedTrackingDraw=this.Rt.lastTrackingDraw,this.Vg=t.visitsCount}getRequestParameters(){const t=this.getVisitor();return t?{uu:t.id,sn:`${t.visitsCount}`,hd:`${t.hitTimestamp}`}:{}}getVisitor(){return this.Xf.get()}setVisitor(t){this.Xf.set(t)}doesVisitorExist(){return null!==this.Xf.get()}resetVisitor(){this.Cg(),this.oc.emitAfterVisitorCleared()}removeVisitor(){this.Xf.remove()}hasAllowSubdomainsChanged(){const t=this.getVisitor();if(!t)return!1;return t.allowSubdomains!==this.Rt.allowSubdomains}handleSubdomainChange(){this.Xf.handleSubdomainChange()}isSessionRenewed(){const t=this.getVisitor();return null!==t&&void 0!==this.Vg&&t.visitsCount!==this.Vg}jg(){return!w(this.kg)||xe.now()-this.kg>this.Tg}renewVisitor(){this.jg()?(this.kg=xe.now(),this.Cg(),this.oc.emitAfterVisitorRenewal()):se.warn("session:start:newVisitor is trying to renew visitor under time limit")}Cg(){this.oc.emitBeforeVisitorRenewal(),this.removeVisitor()}}const bf="_cs_s",Tf=18e5,If=/^(\d+\.[01356789TBWX](\.[01UNWG])?(\.[39])?)(\.\d+)?$/,Pf=".";var Vf;!function(t){t[t.NOT_FOUND=0]="NOT_FOUND",t[t.EXPIRED=1]="EXPIRED",t[t.FOUND=2]="FOUND"}(Vf||(Vf={}));class Cf{constructor(t,e,s){this.Rt=t,this.Ff=e,this.Og=s,this.Eo=null,this.Ng=!1}get(t){const e=this.getRawSession(t);return this.isValid(e)?Cf.fromString(e):null}getRawSession(t){if(t){const t=this.xg();return Cf.$g(t)}const{sessionString:e,status:s}=this.Mg(),i=Cf.$g(e);if(s!==Vf.EXPIRED)return i;if(this.Rt.cookielessTrackingEnabled)return null;const n=this.xg();if(!n)return null;const r=csString.prototype.split.call(n,Pf);if(!Cf.Lg(r))return n;const o=r[r.length-1],h=parseInt(o,10);return isNaN(h)||this.Dg(h),i}onCookieToSet(t){this.Ug=t}onCookieToRemove(t){this.Fg=t}set(t,e=18e5){var s;const i=xe.now()+e;let n=this.toString(t);n+=`${Pf}${i}`,this.Hg(n,i),this.Rt.cookielessTrackingEnabled?this.Og.setItem(bf,n):(this.Ff.set(bf,n,e),null===(s=this.Ug)||void 0===s||s.call(this,bf,n,e))}remove(){var t;this.Rt.cookielessTrackingEnabled?this.Og.removeItem(bf):(this.Ff.delete(bf),null===(t=this.Fg)||void 0===t||t.call(this,bf)),this.Bg()}handleSubdomainChange(){if(this.Rt.cookielessTrackingEnabled)return;const t=this.get(!0);t&&(this.Rt.allowSubdomains?this.Ff.delete(bf,ms.CURRENT_DOMAIN):this.Ff.delete(bf,this.Ff.getRootDomain()),this.set(t))}isValid(t){return null!==t&&Cf.isValidSessionString(t)}toString(t){return csArray.prototype.join.call([t.pageNumber,t.collectState,t.etrState,t.etrStatus],Pf)}Hg(t,e){this.Eo={sessionString:t,expires:e}}Mg(){return this.Eo?this.Eo&&xe.now()<=this.Eo.expires?{sessionString:this.Eo.sessionString,status:Vf.FOUND}:{sessionString:this.Eo.sessionString,status:Vf.EXPIRED}:{sessionString:this.xg(),status:Vf.NOT_FOUND}}Bg(){this.Eo=null}Dg(t){this.Eo&&(this.Eo.expires=t,this.Ng=!0)}isCacheRefreshed(){return this.Ng}resetCacheRefreshed(){this.Ng=!1}xg(){if(this.Rt.cookielessTrackingEnabled){const t=this.Og.getItem(bf);return!t||this.zg(t)?null:t}const t=this.Ff.get(bf);return!t||this.zg(t)?null:t}zg(t){const e=csString.prototype.split.call(t,Pf);if(!Cf.Lg(e))return!1;const s=parseInt(e[e.length-1],10);return!isNaN(s)&&xe.now()>s}static Lg(t){return 13===t[t.length-1].length}static $g(t){var e;if(!t)return null;const s=null===(e=csString.prototype.match.call(t,If))||void 0===e?void 0:e[1];return null!=s?s:null}static fromRawString(t){const e=Cf.$g(t);return null!==e?Cf.fromString(e):null}static fromString(t){var e,s;const[i,n,r,o]=csString.prototype.split.call(t,Pf);return{collectState:n,etrState:null!==(e=r)&&void 0!==e?e:_i.ETR_OFF,etrStatus:null!==(s=o)&&void 0!==s?s:Ri.ETR_NOT_SAVED_SESSION,pageNumber:parseInt(i,10)}}static isValidSessionString(t){return If.test(t)}}var jf;!function(t){t[t.NO=0]="NO",t[t.WITHDRAWN=1]="WITHDRAWN",t[t.GRANTED=2]="GRANTED"}(jf||(jf={}));class kf{constructor(t,e){this.qg=t,this.Kv=e,this.Gg=null,this.Wg=0,this.Zg=jf.NO}setDynamicVariablesService(t){this.Jg=t}createOrUpdateSession(){this.Yg(),this.Qg=xe.now(),this.Wg=0;let t=this.Kg();null===t?(t=this.Xg(),this.tm(t),this.sm(t)):(t=this.Kv.sanitizeSessionCollectState(t),this.tm(t),t.collectState=this.Kv.getEligibleCollectState(t)),this.setSession(t)}grantReplayRecording(t){t.collectState=this.Kv.getInitialCollectState(),t.collectState=this.Kv.computeInitialCollectStateFromRecordingConsentGranted(t),this.setSession(t)}grantReplayRecordingBeforeSessionStart(){this.Zg=jf.GRANTED}withdrawnReplayRecording(t){t.collectState=this.Kv.getRecordingConsentWithdrawn(),this.setSession(t)}withdrawnReplayRecordingBeforeSessionStart(){this.Zg=jf.WITHDRAWN}sm(t){this.Zg===jf.WITHDRAWN?(t.collectState=this.Kv.getRecordingConsentWithdrawn(),this.setSession(t)):this.Zg===jf.GRANTED?t.collectState=this.Kv.computeInitialCollectStateFromRecordingConsentGranted(t):t.collectState=this.Kv.computeInitialCollectState(t),this.Zg=jf.NO}Xg(){return{pageNumber:0,collectState:this.Kv.getInitialCollectState(),etrState:_i.ETR_OFF,etrStatus:Ri.ETR_NOT_SAVED_SESSION}}tm(t){t.pageNumber+=1}isReplayRecorded(){const t=this.getSession();return!!t&&this.Kv.isReplayRecorded(t)}isTemporarilyRecorded(){const t=this.getSession();return(null==t?void 0:t.collectState)===Ai.RECORDING_TEMPORARILY}abortQuotaServiceRequest(){this.Kv.abortQuotaServiceRequest()}getRequestParameters(){const t={},e=this.getSession();return null!==e&&(t.pn=`${e.pageNumber}`),t}getSession(){return this.qg.get()}Kg(){return this.qg.get(!0)}doesSessionExist(){return null!==this.qg.get()}setSession(t){this.qg.set(t)}refreshSession(){const t=this.Kg();t&&this.setSession(t)}removeSession(){this.qg.remove()}getCollectStates(){const t=this.getSession(),e=[];return t&&(t.collectState!==Ai.ANALYTICS_ONLY&&csArray.prototype.push.call(e,t.collectState===Ai.RECORDING_RULES_TARGETING?Ai.RECORDING_GLOBAL_SAMPLING:t.collectState),t.etrState===_i.ETR_ON&&csArray.prototype.push.call(e,Ai.RECORDING_ETR_SAMPLING)),e}updateCollectState(t,e){const s=this.getSession();null!==s&&(s.collectState=t,s.etrState=e,this.setSession(s))}hasValidSession(){const t=this.qg.getRawSession();return this.qg.isValid(t)}handleSubdomainChange(){this.qg.handleSubdomainChange()}pollCacheRefreshEvent(t=!0){const e=this.qg.isCacheRefreshed();return e&&t&&this.qg.resetCacheRefreshed(),e}extendSessionPeriodically(){this.Gg||this.im()}extendSession(){const t=this.getSession();return null===t?(se.warn("extendSession is trying to extend an expired session"),this.Yg(),!1):(this.qg.set(t,Tf),!0)}im(){if(this.nm())return void this.Yg();this.extendSession()&&(this.rm(),this.om())}om(){this.Gg=window.csSetTimeout((()=>{this.im()}),174e4)}nm(){return 1434e4-(xe.now()+Tf-this.Qg)<0}Yg(){this.Gg&&(window.csClearTimeout(this.Gg),this.Gg=null)}rm(){this.Wg+=1,this.Jg.trackDynamicVariable("session_expiry_update",this.Wg)}}class Of{constructor(t,e,s){this.Rt=t,this.xt=e,this.xe=s}clear(){this.hm()&&(this.am=this.xt.getVisitor(),this.xt.removeVisitor()),this.um()&&this.xe.removeExclusion()}hm(){return this.xt.doesVisitorExist()&&this.xt.getVisitor().appliedTrackingDraw!==this.Rt.lastTrackingDraw}um(){return this.xe.getAppliedTrackingDraw()!==this.Rt.lastTrackingDraw}restoreClearedVisitor(){this.am&&this.xt.setVisitor(this.am)}}class Nf{constructor(t,e,s){this.xt=t,this.$t=e,this.lm=s}handle(){this.xt.hasAllowSubdomainsChanged()&&(this.xt.handleSubdomainChange(),this.$t.handleSubdomainChange(),this.lm.handleSubdomainChange())}}const xf="_cs_c";var $f;!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"}($f||($f={}));class Mf{constructor(t,e,s){this.Rt=t,this.Ff=e,this.Hf=s}get(){let t;return t=this.Rt.cookielessTrackingEnabled?this.Hf.getItem(xf):this.Ff.get(xf),null===t?t:Number(t)}set(t){this.Rt.cookielessTrackingEnabled?this.Hf.setItem(xf,csString(t)):this.Ff.set(xf,csString(t),Yt)}remove(){this.Rt.cookielessTrackingEnabled?this.Hf.removeItem(xf):this.Ff.delete(xf)}handleSubdomainChange(){this.Rt.cookielessTrackingEnabled||(this.Rt.allowSubdomains?this.Ff.delete(xf,ms.CURRENT_DOMAIN):this.Ff.delete(xf,this.Ff.getRootDomain()))}}class Lf{constructor(t,e,s){this.Rt=t,this.$t=e,this.oc=s}grantReplayConsent(){if(!jo.isReplayConsentNeeded(this.Rt))return;const t=this.$t.getSession();t?jo.isRecordingBlockedByConsent(t)&&(this.$t.grantReplayRecording(t),this.oc.emitAfterReplayRecordingConsentGranted()):this.$t.grantReplayRecordingBeforeSessionStart()}withdrawReplayConsent(){if(!jo.isReplayConsentNeeded(this.Rt))return;const t=this.$t.getSession();t?jo.isRecordingWithDrawn(t)||(this.$t.withdrawnReplayRecording(t),this.oc.emitAfterReplayRecordingConsentWithdrawn()):this.$t.withdrawnReplayRecordingBeforeSessionStart()}}const Df=["replay:consent:unanonymized:granted","trackConsentGranted"],Uf=["replay:consent:unanonymized:withdrawn","trackConsentWithdrawn"],Ff=["replay:consent:startForSession:granted"],Hf=["replay:consent:startForSession:withdrawn"];class Bf{constructor(t,e,s,i,n){this.Rt=t,this.bc=e,this.Id=s,this.$t=i,this.oc=n}init(){this.dm=new Lf(this.Rt,this.$t,this.oc),this.Id.setInitialConsent(),this.tv()}tv(){this.bc.register(Df,(()=>{this.Id.grantReplayAnonymizationConsent()})),this.bc.register(Uf,(()=>{this.Id.withdrawReplayAnonymizationConsent()})),this.bc.register(Ff,(()=>{this.dm.grantReplayConsent()})),this.bc.register(Hf,(()=>{this.dm.withdrawReplayConsent()}))}onOptout(){this.Id.removeAllConsents()}onBeforeVisitorRenewal(){this.Id.removeAllConsents()}onAfterVisitorRenewal(){this.Id.setInitialConsent()}onAfterVisitorCleared(){this.Id.setInitialConsent()}}class zf{constructor(t,e,s){this.Rt=t,this.Xf=e,this.oc=s}setInitialConsent(){const t=this.Xf.get();(null===t||this.hasConsentRequiredChanged(t))&&this.setDefaultReplayAnonymization()}hasConsentRequiredChanged(t){const e=this.Rt.consentRequired;return e&&t===$f.NOT_REQUIRED||!e&&t!==$f.NOT_REQUIRED}handleSubdomainChange(){this.Xf.handleSubdomainChange()}setDefaultReplayAnonymization(){const t=this.Rt.consentRequired?$f.NOT_EXPRESSED:$f.NOT_REQUIRED;this.Xf.set(t)}grantReplayAnonymizationConsent(){this.Rt.consentRequired&&(this.Xf.set($f.GRANTED),this.oc.emitReplayUnanonymizationConsentGranted())}withdrawReplayAnonymizationConsent(){this.Rt.consentRequired&&(this.Xf.set($f.WITHDRAWN),this.oc.emitReplayUnanonymizationConsentWithdrawn())}removeAllConsents(){this.Xf.remove()}isReplayUnanonymizedAllowedByConsent(){return!this.Rt.consentRequired||this.Xf.get()===$f.GRANTED}getRequestParameters(){return{uc:`${this.Xf.get()}`}}}class qf{constructor(t,e,s,i,n,r,o){this.oc=t,this.bc=e,this.tg=s,this.eg=i,this.sg=n,this.fm=r,this.ig=o}start(){this.oc.addListener(this.fm),this.oc.addListener(this.ig),this.oc.addListener(this.tg),this.ig.init(),this.eg.init(),this.sg.init(),this.sg.isActive()||this.bc.start()}}const Gf="_cs_ex",Wf=2592e6,Zf=/^[0-9]+$/;class Jf{constructor(t,e,s){this.Rt=t,this.Ff=e,this.Og=s}onCookieToSet(t){this.Ug=t}onCookieToRemove(t){this.Fg=t}get(){return this.Rt.cookielessTrackingEnabled?Number(this.Og.getItem(Gf)):Number(this.Ff.get(Gf))}set(t){var e;this.Rt.cookielessTrackingEnabled?this.Og.setItem(Gf,t):(this.Ff.set(Gf,t,Wf),null===(e=this.Ug)||void 0===e||e.call(this,Gf,t,Wf))}remove(){var t;this.Rt.cookielessTrackingEnabled?this.Og.removeItem(Gf):(this.Ff.delete(Gf),null===(t=this.Fg)||void 0===t||t.call(this,Gf))}static isValidExclusionString(t){return Zf.test(t)}}class Yf{constructor(t,e){this.vr=t,this.Xf=e}exclude(t){this.Xf.set(csString(t.lastTrackingDraw))}removeExclusion(){this.Xf.remove()}isExcluded(){return this.vm()||this.gm()}vm(){return 0!==this.getAppliedTrackingDraw()}getAppliedTrackingDraw(){return this.Xf.get()}gm(){return csString.prototype.indexOf.call(this.vr.href,Gf)>0}}class Qf{constructor(t){this.yu=t}onOptout(){this.yu.removeExclusion()}}var Kf;!function(t){t.SessionReplay="SR",t.None=""}(Kf||(Kf={}));class Xf{constructor(t){this.Mt=t,this.pm=new csRegExp(".^")}setExcludeUrlForSessionReplay(t){try{this.pm=new csRegExp(t)}catch{se.warn(`excludeURLforReplay - invalid regex '${t}'`),this.pm=new csRegExp(".*")}}wm(){return this.pm.test(this.Mt.getAnonymizedUrl())?Kf.SessionReplay:Kf.None}isUrlExcludedForSessionReplay(){return this.wm()===Kf.SessionReplay}getRequestParameters(){return{ex:this.wm()}}}const tv=["excludeURLforReplay"];class ev{constructor(t,e){this.yu=t,this.bc=e}init(){this.bc.register(tv,(t=>{if(!g(t))throw new Error("Command misuse: excludeURLforReplay");this.yu.setExcludeUrlForSessionReplay(t)}))}}const sv="_cs_inc";class iv{constructor(t,e){this.vr=t,this.Ff=e}isForceIncluded(){return this.ym()||this.Em()}isForceReplayRecorded(){return this.Am(Ai.RECORDING_GLOBAL_SAMPLING)}ym(){return null!==this.Ff.get(sv)}Am(t){return this.Ff.get(sv)===t}Em(){return csString.prototype.indexOf.call(this.vr.href,sv)>0}}const nv="_cs_optout";class rv{constructor(t,e,s){this.Rt=t,this.Ff=e,this.Hf=s}get(){return this.Rt.cookielessTrackingEnabled?this.Hf.getItem(nv):this.Ff.get(nv)}set(t){this.Rt.cookielessTrackingEnabled?this.Hf.setItem(nv,t):this.Ff.set(nv,t,Yt)}}class ov{constructor(t,e,s){this.oc=t,this.vr=e,this.Xf=s}init(){!this.isActive()&&this._m()&&this.activate()}isActive(){return"1"===this.Xf.get()}activate(){this.oc.emitOptout(),this.Xf.set("1")}_m(){return csString.prototype.indexOf.call(this.vr.href,nv)>0}}const hv=["optout"],av=["optin"];class cv{constructor(t,e){this.bc=t,this.sg=e}init(){this.bc.register(hv,(()=>{this.sg.activate()}))}}class uv{constructor(t,e){this.bc=t,this.ru=e}init(){this.ru.addListener(this.bc)}onOptout(){this.bc.stop()}onBeforeSessionRenewal(){this.bc.stop()}}var lv,dv;!function(t){t.UXA="_uxa",t.WVT="cs_wvt"}(lv||(lv={}));class fv extends ci{constructor(t){super(),this.Sm=t,this.Rm={}}register(t,e,s){for(const i of t){const t=(...t)=>{try{const s=e(...t);return me.counters.commandApplied.count(i),s}catch(e){me.counters.commandMisuse.count(i),se.warn(`Misused Command: ${i}; Args: ${csJSON.stringify(t)}; Error: ${S(e)?e.stack:e}`)}};this.Rm[i]={callback:t,configuration:s},this.Rm}}onStart(){this.bm(),this.Tm()}onStop(){for(const t of this.Sm)window[t]=[]}applyFromIntegration(t,e,s){this.Im(t,e,`Commands.apply.from.integration: ${s}`),me.counters.commandsFromIntegrations.count(t)}applyFromImplementation(t,e,s){this.Im(t,e,`Commands.apply.from.implementation: ${s}`),me.counters.commandsFromCSTC.count(t)}onIframeCommands(t){for(const e of t.commands)this.Pm(e.name,e.params,t.iframePath),me.counters.commandsFromIframe.count(e.name)}Im(t,e,s){this.isStarted?se.tryToExecute(s,(()=>{if(this.Rm[t])return this.Rm[t].callback(...e)}))():window._uxa.push([t,...e])}Pm(t,e,s){se.tryToExecute(`Commands.apply.from.iframe: ${s}`,(()=>{if(this.Rm[t])return this.Rm[t].callback(...e)}))()}bm(){for(const t of this.Sm)window[t].forEach((([t,...e])=>this.Vm(t,e,!1)))}Tm(){for(const t of this.Sm)window[t]={push:([t,...e])=>this.Vm(t,e,!0)}}Vm(t,e,s){var i,n;if(this.Rm[t]){if((null===(i=this.Rm[t].configuration)||void 0===i?void 0:i.disableApplyPending)&&!s||(null===(n=this.Rm[t].configuration)||void 0===n?void 0:n.disableApplyImmediate)&&s)return;try{return this.Rm[t].callback(...e)}catch(s){me.counters.commandError.count(t),se.error(`Command ${t} failed - params: ${csJSON.stringify(e)}`,s)}}}}class vv{constructor(t,e,s,i){this.Rt=t,this.xt=e,this.$t=s,this.Cm=i}getRequestParameters(){var t,e,s,i,n;const r={...Ce(),...this.Rt.getRequestParameters()},o=this.$t.getSession();o&&(r.pn=`${o.pageNumber}`);const h=this.xt.getVisitor();if(h&&(r.sn=`${h.visitsCount}`,r.uu=`${h.id}`),(null===(t=this.Cm)||void 0===t?void 0:t.hasSubProjectId())&&(r.subProjectID=`${this.Cm.getSubProjectId()}`),window.heap)try{r.happid=window.heap.appid,r.hsid=null===(s=(e=window.heap).getSessionId)||void 0===s?void 0:s.call(e),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 gv{constructor(t,e){this.bc=t,this.ot=e}init(){this.bc.register(["debugEvents"],(t=>{"boolean"==typeof t&&this.ot.updateDynamicFields("emitDebugEvents",t)}))}}function mv(t,e,s){if(!w(e)&&!w(s))return t.href;const i=w(e)?pv(e):t.pathname,n=w(s)?wv(s):t.search;return`${t.protocol}//${t.host}${i}${n}`}function pv(t){return Jt(t,"/")?t:`/${t}`}function wv(t){return Jt(t,"?")||""===t?t:`?${t}`}!function(t){t[t.page=1]="page",t[t.onNextPageviewOnly=2]="onNextPageviewOnly"}(dv||(dv={}));class yv{constructor(t,e){this.vr=t,this.ph=e,this.jm=10}overridePath(t,e){if(""===t)return void(this.km=void 0);const s=this.Om(e);s&&(this.Nm=s),this.km=e?this.xm(t,e):t}overrideQuery(t,e){const s=this.Om(e);s&&(this.$m=s),this.Mm=e?this.xm(t,e):t}computeOverriddenUrl(t){return this.Lm(t)?this.getAnonymizedUrl():t}Dm(t){return("string"==typeof t||"number"==typeof t)&&t in dv}Lm(t){const e=this.Um(this.vr.href);return this.Um(t)===e}Um(t){return e=t,s="/",-1!==csString.prototype.indexOf.call(e,s,e.length-s.length)?csString.prototype.slice.call(t,0,-1):t;var e,s}Om(t){return w(null==t?void 0:t.lifespan)&&this.Dm(null==t?void 0:t.lifespan)?null==t?void 0:t.lifespan:null}Fm(){return this.Nm&&this.Nm in dv}Hm(){return this.$m&&this.$m in dv}cleanupOverrideLifespan(){this.Fm()&&(this.km=void 0,this.Nm=void 0),this.Hm()&&(this.Mm=void 0,this.$m=void 0)}getAnonymizedUrl(){const t=mv(this.vr,this.km,this.Mm);return this.ph.anonymizeUrl(t)}getUrl(){return mv(this.vr,this.km,this.Mm)}getAnonymizedPathAndQuery(){const t=w(this.km)?pv(this.km):this.vr.pathname,e=w(this.Mm)?wv(this.Mm):this.vr.search;return this.ph.anonymizeUrl(t+e)}getUrlProtocol(){return this.vr.protocol}getRequestParameters(){return{url:this.getAnonymizedUrl()}}xm(t,e){return this.Bm(e)?this.zm(t):this.qm(e)?this.Gm(t):t}qm(t){return Boolean(t.decodeURI)}Gm(t){return this.Wm(t,1,!1)}Bm(t){return Boolean(t.decodeURIDeep)}zm(t){return this.Wm(t,this.jm,!0)}Wm(t,e,s){let i=t;for(let t=0;t{var n;const r=s.toString(),o=`${null===(n=e.constructor)||void 0===n?void 0:n.name}.${r}`,h=i.value;(function(t,e){var s;if(null==t)return!1;return t===e||!!(null===(s=csString.prototype.match.call(t,new csRegExp("(^|,)("+e+")(,|$)")))||void 0===s?void 0:s.length)})(bv.getString("debugLog"),t)&&(i.value=function(...t){return console.log(o,...t),h.bind(this)(...t)})}}}function Tv(){function t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=256,s=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]),a=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=new Array(576);t(c);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 v=new Array(i);function g(t,e,s,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=s,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let m,p,w;function y(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(v);const E=t=>t<256?l[t]:l[256+(t>>>7)],A=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},_=(t,e,s)=>{t.bi_valid>16-s?(t.bi_buf|=e<>16-t.bi_valid,t.bi_valid+=s-16):(t.bi_buf|=e<{_(t,s[2*e],s[2*e+1])},R=(t,e)=>{let s=0;do{s|=1&t,t>>>=1,s<<=1}while(--e>0);return s>>>1},b=(t,e,s)=>{const i=new Array(16);let r,o,h=0;for(r=1;r<=n;r++)i[r]=h=h+s[r-1]<<1;for(o=0;o<=e;o++){let e=t[2*o+1];0!==e&&(t[2*o]=R(i[e]++,e))}},T=t=>{let e;for(e=0;e{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},P=(t,e,s,i)=>{const n=2*e,r=2*s;return t[n]{const i=t.heap[s];let n=s<<1;for(;n<=t.heap_len&&(n{let n,h,a,c,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?S(t,h,s):(a=d[h],S(t,a+e+1,s),c=r[a],0!==c&&(h-=f[a],_(t,h,c)),n--,a=E(n),S(t,a,i),c=o[a],0!==c&&(n-=v[a],_(t,n,c)))}while(u{const s=e.dyn_tree,i=e.stat_desc.static_tree,r=e.stat_desc.has_stree,o=e.stat_desc.elems;let h,a,c,u=-1;for(t.heap_len=0,t.heap_max=573,h=0;h>1;h>=1;h--)V(t,s,h);c=o;do{h=t.heap[1],t.heap[1]=t.heap[t.heap_len--],V(t,s,1),a=t.heap[1],t.heap[--t.heap_max]=h,t.heap[--t.heap_max]=a,s[2*c]=s[2*h]+s[2*a],t.depth[c]=(t.depth[h]>=t.depth[a]?t.depth[h]:t.depth[a])+1,s[2*h+1]=s[2*a+1]=c,t.heap[1]=c++,V(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const s=e.dyn_tree,i=e.max_code,r=e.stat_desc.static_tree,o=e.stat_desc.has_stree,h=e.stat_desc.extra_bits,a=e.stat_desc.extra_base,c=e.stat_desc.max_length;let u,l,d,f,v,g,m=0;for(f=0;f<=n;f++)t.bl_count[f]=0;for(s[2*t.heap[t.heap_max]+1]=0,u=t.heap_max+1;u<573;u++)l=t.heap[u],f=s[2*s[2*l+1]+1]+1,f>c&&(f=c,m++),s[2*l+1]=f,l>i||(t.bl_count[f]++,v=0,l>=a&&(v=h[l-a]),g=s[2*l],t.opt_len+=g*(f+v),o&&(t.static_len+=g*(r[2*l+1]+v)));if(0!==m){do{for(f=c-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[c]--,m-=2}while(m>0);for(f=c;0!==f;f--)for(l=t.bl_count[f];0!==l;)d=t.heap[--u],d>i||(s[2*d+1]!==f&&(t.opt_len+=(f-s[2*d+1])*s[2*d],s[2*d+1]=f),l--)}})(t,e),b(s,u,t.bl_count)},k=(t,e,s)=>{let i,n,r=-1,o=e[1],h=0,a=7,c=4;for(0===o&&(a=138,c=3),e[2*(s+1)+1]=65535,i=0;i<=s;i++)n=o,o=e[2*(i+1)+1],++h{let i,n,r=-1,o=e[1],h=0,a=7,c=4;for(0===o&&(a=138,c=3),i=0;i<=s;i++)if(n=o,o=e[2*(i+1)+1],!(++h{_(t,0+(i?1:0),3),((t,e,s,i)=>{I(t),i&&(A(t,s),A(t,~s)),t.pending_buf.set(t.window.subarray(e,e+s),t.pending),t.pending+=s})(t,e,s,!0)};var $=t=>{N||((()=>{let t,e,a,y,E;const A=new Array(16);for(a=0,y=0;y<28;y++)for(f[y]=a,t=0;t<1<>=7;y{let r,o,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let s,i=4093624447;for(s=0;s<=31;s++,i>>>=1)if(1&i&&0!==t.dyn_ltree[2*s])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(s=32;s{let e;for(k(t,t.dyn_ltree,t.l_desc.max_code),k(t,t.dyn_dtree,t.d_desc.max_code),j(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*a[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(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!==s?x(t,s,i,n):4===t.strategy||o===r?(_(t,2+(n?1:0),3),C(t,c,u)):(_(t,4+(n?1:0),3),((t,e,s,i)=>{let n;for(_(t,e-257,5),_(t,s-1,5),_(t,i-4,4),n=0;n(t.pending_buf[t.d_buf+2*t.last_lit]=s>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&s,t.pending_buf[t.l_buf+t.last_lit]=255&i,t.last_lit++,0===s?t.dyn_ltree[2*i]++:(t.matches++,s--,t.dyn_ltree[2*(d[i]+e+1)]++,t.dyn_dtree[2*E(s)]++),t.last_lit===t.lit_bufsize-1),D=t=>{_(t,2,3),S(t,256,c),(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)},U={_tr_init:$,_tr_stored_block:x,_tr_flush_block:M,_tr_tally:L,_tr_align:D};var F=(t,e,s,i)=>{let n=65535&t,r=t>>>16&65535,o=0;for(;0!==s;){o=s>2e3?2e3:s,s-=o;do{n=n+e[i++]|0,r=r+n|0}while(--o);n%=65521,r%=65521}return n|r<<16};const H=new Uint32Array((()=>{let t,e=[];for(var s=0;s<256;s++){t=s;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[s]=t}return e})());var B=(t,e,s,i)=>{const n=H,r=i+s;t^=-1;for(let s=i;s>>8^n[255&(t^e[s])];return~t},z={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"},q={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:W,_tr_flush_block:Z,_tr_tally:J,_tr_align:Y}=U,{Z_NO_FLUSH:Q,Z_PARTIAL_FLUSH:K,Z_FULL_FLUSH:X,Z_FINISH:tt,Z_BLOCK:et,Z_OK:st,Z_STREAM_END:it,Z_STREAM_ERROR:nt,Z_DATA_ERROR:rt,Z_BUF_ERROR:ot,Z_DEFAULT_COMPRESSION:ht,Z_FILTERED:at,Z_HUFFMAN_ONLY:ct,Z_RLE:ut,Z_FIXED:lt,Z_DEFAULT_STRATEGY:dt,Z_UNKNOWN:ft,Z_DEFLATED:vt}=q,gt=258,mt=262,pt=103,wt=113,yt=666,Et=(t,e)=>(t.msg=z[e],e),At=t=>(t<<1)-(t>4?9:0),_t=t=>{let e=t.length;for(;--e>=0;)t[e]=0};let St=(t,e,s)=>(e<{const e=t.state;let s=e.pending;s>t.avail_out&&(s=t.avail_out),0!==s&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+s),t.next_out),t.next_out+=s,e.pending_out+=s,t.total_out+=s,t.avail_out-=s,e.pending-=s,0===e.pending&&(e.pending_out=0))},bt=(t,e)=>{Z(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,Rt(t.strm)},Tt=(t,e)=>{t.pending_buf[t.pending++]=e},It=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Pt=(t,e,s,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),s),1===t.state.wrap?t.adler=F(t.adler,e,n,s):2===t.state.wrap&&(t.adler=B(t.adler,e,n,s)),t.next_in+=n,t.total_in+=n,n)},Vt=(t,e)=>{let s,i,n=t.max_chain_length,r=t.strstart,o=t.prev_length,h=t.nice_match;const a=t.strstart>t.w_size-mt?t.strstart-(t.w_size-mt):0,c=t.window,u=t.w_mask,l=t.prev,d=t.strstart+gt;let f=c[r+o-1],v=c[r+o];t.prev_length>=t.good_match&&(n>>=2),h>t.lookahead&&(h=t.lookahead);do{if(s=e,c[s+o]===v&&c[s+o-1]===f&&c[s]===c[r]&&c[++s]===c[r+1]){r+=2,s++;do{}while(c[++r]===c[++s]&&c[++r]===c[++s]&&c[++r]===c[++s]&&c[++r]===c[++s]&&c[++r]===c[++s]&&c[++r]===c[++s]&&c[++r]===c[++s]&&c[++r]===c[++s]&&ro){if(t.match_start=e,o=i,i>=h)break;f=c[r+o-1],v=c[r+o]}}}while((e=l[e&u])>a&&0!=--n);return o<=t.lookahead?o:t.lookahead},Ct=t=>{const e=t.w_size;let s,i,n,r,o;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-mt)){t.window.set(t.window.subarray(e,e+e),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,i=t.hash_size,s=i;do{n=t.head[--s],t.head[s]=n>=e?n-e:0}while(--i);i=e,s=i;do{n=t.prev[--s],t.prev[s]=n>=e?n-e:0}while(--i);r+=e}if(0===t.strm.avail_in)break;if(i=Pt(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=St(t,t.ins_h,t.window[o+1]);t.insert&&(t.ins_h=St(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{let s,i;for(;;){if(t.lookahead=3&&(t.ins_h=St(t,t.ins_h,t.window[t.strstart+3-1]),s=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==s&&t.strstart-s<=t.w_size-mt&&(t.match_length=Vt(t,s)),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=St(t,t.ins_h,t.window[t.strstart+3-1]),s=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=St(t,t.ins_h,t.window[t.strstart+1]);else i=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(bt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===tt?(bt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bt(t,!1),0===t.strm.avail_out)?1:2},kt=(t,e)=>{let s,i,n;for(;;){if(t.lookahead=3&&(t.ins_h=St(t,t.ins_h,t.window[t.strstart+3-1]),s=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!==s&&t.prev_length4096)&&(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=St(t,t.ins_h,t.window[t.strstart+3-1]),s=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&&(bt(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&&bt(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,e===tt?(bt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bt(t,!1),0===t.strm.avail_out)?1:2};function Ot(t,e,s,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=s,this.max_chain=i,this.func=n}const Nt=[new Ot(0,0,0,0,((t,e)=>{let s=65535;for(s>t.pending_buf_size-5&&(s=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Ct(t),0===t.lookahead&&e===Q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;const i=t.block_start+s;if((0===t.strstart||t.strstart>=i)&&(t.lookahead=t.strstart-i,t.strstart=i,bt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-mt&&(bt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(bt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(bt(t,!1),t.strm.avail_out),1)})),new Ot(4,4,8,4,jt),new Ot(4,5,16,8,jt),new Ot(4,6,32,32,jt),new Ot(4,4,16,16,kt),new Ot(8,16,32,32,kt),new Ot(8,16,128,128,kt),new Ot(8,32,128,256,kt),new Ot(32,128,258,1024,kt),new Ot(32,258,258,4096,kt)];function xt(){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=vt,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 $t=t=>{if(!t||!t.state)return Et(t,nt);t.total_in=t.total_out=0,t.data_type=ft;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:wt,t.adler=2===e.wrap?0:1,e.last_flush=Q,G(e),st},Mt=t=>{const e=$t(t);return e===st&&(t=>{t.window_size=2*t.w_size,_t(t.head),t.max_lazy_match=Nt[t.level].max_lazy,t.good_match=Nt[t.level].good_length,t.nice_match=Nt[t.level].nice_length,t.max_chain_length=Nt[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),e},Lt=(t,e,s,i,n,r)=>{if(!t)return nt;let o=1;if(e===ht&&(e=6),i<0?(o=0,i=-i):i>15&&(o=2,i-=16),n<1||n>9||s!==vt||i<8||i>15||e<0||e>9||r<0||r>lt)return Et(t,nt);8===i&&(i=9);const h=new xt;return t.state=h,h.strm=t,h.wrap=o,h.gzhead=null,h.w_bits=i,h.w_size=1<{let s,i;if(!t||!t.state||e>et||e<0)return t?Et(t,nt):nt;const n=t.state;if(!t.output||!t.input&&0!==t.avail_in||n.status===yt&&e!==tt)return Et(t,0===t.avail_out?ot:nt);n.strm=t;const r=n.last_flush;if(n.last_flush=e,42===n.status)if(2===n.wrap)t.adler=0,Tt(n,31),Tt(n,139),Tt(n,8),n.gzhead?(Tt(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)),Tt(n,255&n.gzhead.time),Tt(n,n.gzhead.time>>8&255),Tt(n,n.gzhead.time>>16&255),Tt(n,n.gzhead.time>>24&255),Tt(n,9===n.level?2:n.strategy>=ct||n.level<2?4:0),Tt(n,255&n.gzhead.os),n.gzhead.extra&&n.gzhead.extra.length&&(Tt(n,255&n.gzhead.extra.length),Tt(n,n.gzhead.extra.length>>8&255)),n.gzhead.hcrc&&(t.adler=B(t.adler,n.pending_buf,n.pending,0)),n.gzindex=0,n.status=69):(Tt(n,0),Tt(n,0),Tt(n,0),Tt(n,0),Tt(n,0),Tt(n,9===n.level?2:n.strategy>=ct||n.level<2?4:0),Tt(n,3),n.status=wt);else{let e=vt+(n.w_bits-8<<4)<<8,s=-1;s=n.strategy>=ct||n.level<2?0:n.level<6?1:6===n.level?2:3,e|=s<<6,0!==n.strstart&&(e|=32),e+=31-e%31,n.status=wt,It(n,e),0!==n.strstart&&(It(n,t.adler>>>16),It(n,65535&t.adler)),t.adler=1}if(69===n.status)if(n.gzhead.extra){for(s=n.pending;n.gzindex<(65535&n.gzhead.extra.length)&&(n.pending!==n.pending_buf_size||(n.gzhead.hcrc&&n.pending>s&&(t.adler=B(t.adler,n.pending_buf,n.pending-s,s)),Rt(t),s=n.pending,n.pending!==n.pending_buf_size));)Tt(n,255&n.gzhead.extra[n.gzindex]),n.gzindex++;n.gzhead.hcrc&&n.pending>s&&(t.adler=B(t.adler,n.pending_buf,n.pending-s,s)),n.gzindex===n.gzhead.extra.length&&(n.gzindex=0,n.status=73)}else n.status=73;if(73===n.status)if(n.gzhead.name){s=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>s&&(t.adler=B(t.adler,n.pending_buf,n.pending-s,s)),Rt(t),s=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexs&&(t.adler=B(t.adler,n.pending_buf,n.pending-s,s)),0===i&&(n.gzindex=0,n.status=91)}else n.status=91;if(91===n.status)if(n.gzhead.comment){s=n.pending;do{if(n.pending===n.pending_buf_size&&(n.gzhead.hcrc&&n.pending>s&&(t.adler=B(t.adler,n.pending_buf,n.pending-s,s)),Rt(t),s=n.pending,n.pending===n.pending_buf_size)){i=1;break}i=n.gzindexs&&(t.adler=B(t.adler,n.pending_buf,n.pending-s,s)),0===i&&(n.status=pt)}else n.status=pt;if(n.status===pt&&(n.gzhead.hcrc?(n.pending+2>n.pending_buf_size&&Rt(t),n.pending+2<=n.pending_buf_size&&(Tt(n,255&t.adler),Tt(n,t.adler>>8&255),t.adler=0,n.status=wt)):n.status=wt),0!==n.pending){if(Rt(t),0===t.avail_out)return n.last_flush=-1,st}else if(0===t.avail_in&&At(e)<=At(r)&&e!==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||e!==Q&&n.status!==yt){let s=n.strategy===ct?((t,e)=>{let s;for(;;){if(0===t.lookahead&&(Ct(t),0===t.lookahead)){if(e===Q)return 1;break}if(t.match_length=0,s=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,s&&(bt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(bt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bt(t,!1),0===t.strm.avail_out)?1:2})(n,e):n.strategy===ut?((t,e)=>{let s,i,n,r;const o=t.window;for(;;){if(t.lookahead<=gt){if(Ct(t),t.lookahead<=gt&&e===Q)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+gt;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]&&nt.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(s=J(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(s=J(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),s&&(bt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===tt?(bt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(bt(t,!1),0===t.strm.avail_out)?1:2})(n,e):Nt[n.level].func(n,e);if(3!==s&&4!==s||(n.status=yt),1===s||3===s)return 0===t.avail_out&&(n.last_flush=-1),st;if(2===s&&(e===K?Y(n):e!==et&&(W(n,0,0,!1),e===X&&(_t(n.head),0===n.lookahead&&(n.strstart=0,n.block_start=0,n.insert=0))),Rt(t),0===t.avail_out))return n.last_flush=-1,st}return e!==tt?st:n.wrap<=0?it:(2===n.wrap?(Tt(n,255&t.adler),Tt(n,t.adler>>8&255),Tt(n,t.adler>>16&255),Tt(n,t.adler>>24&255),Tt(n,255&t.total_in),Tt(n,t.total_in>>8&255),Tt(n,t.total_in>>16&255),Tt(n,t.total_in>>24&255)):(It(n,t.adler>>>16),It(n,65535&t.adler)),Rt(t),n.wrap>0&&(n.wrap=-n.wrap),0!==n.pending?st:it)},Ut=(t,e)=>{let s=e.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=F(t.adler,e,s,0)),i.wrap=0,s>=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(e.subarray(s-i.w_size,s),0),e=t,s=i.w_size}const r=t.avail_in,o=t.next_in,h=t.input;for(t.avail_in=s,t.next_in=0,t.input=e,Ct(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=St(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(--e);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,st},Ft={deflateInit:(t,e)=>Lt(t,e,vt,15,8,dt),deflateInit2:Lt,deflateReset:Mt,deflateResetKeep:$t,deflateSetHeader:(t,e)=>t&&t.state?2!==t.state.wrap?nt:(t.state.gzhead=e,st):nt,deflate:Dt,deflateEnd:t=>{if(!t||!t.state)return nt;const e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==wt&&e!==yt?Et(t,nt):(t.state=null,e===wt?Et(t,rt):st)},deflateSetDictionary:Ut,deflateInfo:"pako deflate (from Nodeca project)"};const Ht=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Bt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const s=e.shift();if(s){if("object"!=typeof s)throw new TypeError(s+"must be non-object");for(const e in s)Ht(s,e)&&(t[e]=s[e])}}return t},zt=t=>{let e=0;for(let s=0,i=t.length;s=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Gt[254]=Gt[254]=1;const Wt=(t,e=t.length)=>{if(e<65534&&t.subarray&&qt)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let s="";for(let i=0;i{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,s,i,n,r,o=t.length,h=0;for(n=0;n>>6,e[r++]=128|63&s):s<65536?(e[r++]=224|s>>>12,e[r++]=128|s>>>6&63,e[r++]=128|63&s):(e[r++]=240|s>>>18,e[r++]=128|s>>>12&63,e[r++]=128|s>>>6&63,e[r++]=128|63&s);return e};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 Yt=Object.prototype.toString,{Z_NO_FLUSH:Qt,Z_SYNC_FLUSH:Kt,Z_FULL_FLUSH:Xt,Z_FINISH:te,Z_OK:ee,Z_STREAM_END:se,Z_DEFAULT_COMPRESSION:ie,Z_DEFAULT_STRATEGY:ne,Z_DEFLATED:re}=q;function oe(t){this.options=Bt({level:ie,method:re,chunkSize:16384,windowBits:15,memLevel:8,strategy:ne},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Jt,this.strm.avail_out=0;let s=Ft.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(s!==ee)throw new Error(z[s]);if(e.header&&Ft.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Zt(e.dictionary):"[object ArrayBuffer]"===Yt.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,s=Ft.deflateSetDictionary(this.strm,t),s!==ee)throw new Error(z[s]);this._dict_set=!0}}function he(t,e){return(e=e||{}).gzip=!0,function(t,e){const s=new oe(e=e||{});if(s.push(t,!0),s.err)throw s.msg||z[s.err];return s.result}(t,e)}return oe.prototype.push=function(t,e){const s=this.strm,i=this.options.chunkSize;let n,r;if(this.ended)return!1;for(r=e===~~e?e:!0===e?te:Qt,"string"==typeof t?s.input=Zt(t):"[object ArrayBuffer]"===Yt.call(t)?s.input=new Uint8Array(t):s.input=t,s.next_in=0,s.avail_in=s.input.length;;)if(0===s.avail_out&&(s.output=new Uint8Array(i),s.next_out=0,s.avail_out=i),(r===Kt||r===Xt)&&s.avail_out<=6)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else{if(n=Ft.deflate(s,r),n===se)return s.next_out>0&&this.onData(s.output.subarray(0,s.next_out)),n=Ft.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===ee;if(0!==s.avail_out){if(r>0&&s.next_out>0)this.onData(s.output.subarray(0,s.next_out)),s.avail_out=0;else if(0===s.avail_in)break}else this.onData(s.output)}return!0},oe.prototype.onData=function(t){this.chunks.push(t)},oe.prototype.onEnd=function(t){t===ee&&(this.result=zt(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},(t,e,s)=>{let i=he(t);return i="base64"===e?btoa(Wt(i)):i.buffer,s&&s(i),i}}class Iv extends Ss{constructor(t){super(t),this.algorithm=_s.GZIP,this.vp=Tv(),this.gp=(t,e,s)=>{s(this.vp(t,e))},this.compress=Pv();"undefined"!=typeof CompressionStream&&Gs||(this.compress=this.gp,this.getCompressorSourceCode=()=>Tv.toString())}compressSync(t,e){return this.vp(t,e)}getCompressorSourceCode(){return Pv.toString()}}function Pv(){return(t,e,s)=>{const i=new Response(t).body.pipeThrough(new CompressionStream("gzip")),n=new Response(i).arrayBuffer();"base64"!==e?n.then((t=>s(t))):n.then((t=>{return e=t,new Promise((t=>{const s=new FileReader;s.onload=e=>t(e.target.result.split(",")[1]),s.readAsDataURL(new Blob([e]))}));var e})).then((t=>s(t)))}}class Vv extends Ss{constructor(){super(...arguments),this.algorithm=_s.UNCOMPRESSED}compress(t,e,s){s(this.compressSync(t,e))}compressSync(t,e){return t}getCompressorSourceCode(){return function(){return(t,e,s)=>s(t)}.toString()}}class Cv{static create(t,e=!0){return this.instance?this.instance:e&&!bv.isCompressionEnabled()?new Vv(t):this.instance=new Iv(t)}}class jv{setItem(t,e){window.sessionStorage.setItem(t,e)}getItem(t){return window.sessionStorage.getItem(t)}removeItem(t){window.sessionStorage.removeItem(t)}}class kv{setItem(t,e){window.localStorage.setItem(t,e)}getItem(t){return window.localStorage.getItem(t)}removeItem(t){window.localStorage.removeItem(t)}}const Ov="_cs_cvars";class Nv{constructor(t,e,s){this.Rt=t,this.Ff=e,this.Og=s}onCookieToSet(t){this.Ug=t}onCookieToRemove(t){this.Fg=t}get(){return this.Rt.cookielessTrackingEnabled?this.Og.getItem(Ov):this.Ff.get(Ov)}set(t){var e;this.Rt.cookielessTrackingEnabled?this.Og.setItem(Ov,t):(this.Ff.set(Ov,t),null===(e=this.Ug)||void 0===e||e.call(this,Ov,t))}remove(){var t;this.Rt.cookielessTrackingEnabled?this.Og.removeItem(Ov):(this.Ff.delete(Ov),null===(t=this.Fg)||void 0===t||t.call(this,Ov))}static isValidCustomVarString(t){return"string"==typeof t}}const xv=["setCustomVariable"];class $v{constructor(t,e){this.bc=t,this.$e=e}init(){this.bc.register(xv,((t,e,s,i)=>{this.$e.set(t,e,s,i)}))}onAfterArtificialPageView(){this.$e.deleteNextPageOnlyCustomVariables()}onAfterNaturalPageView(){this.$e.deleteNextPageOnlyCustomVariables()}onOptout(){this.$e.removeCustomVariablesSession()}onBeforeVisitorRenewal(){this.$e.removeCustomVariablesSession(),this.$e.removeCustomVariablesPage()}}const Mv=["visit",2],Lv=["page",3],Dv=["nextPageOnly",4];class Uv{constructor(t,e){this.bt=t,this.Xf=e,this.mp={},this.pp={}}set(t,e,s,i){let n,r;if(!((f(t)||g(t))&&Number(t)>0&&y(e)&&y(s))||A(e)||A(s)||!this.wp(i))throw new Error(`Command misuse: ${xv[0]}`);{const o=this.bt.anonymizePII(csString(e)),h=this.bt.anonymizePII(csString(s));if(n=[csString.prototype.slice.call(o,0,512),csString.prototype.slice.call(h,0,255)],r=""!==s,!w(i)||csArray.prototype.indexOf.call(Mv,i)>=0){const e=this.getCustomVariablesSession();r?e[t]=n:delete e[t],this.setCustomVariableSession(e)}(!w(i)||csArray.prototype.indexOf.call(Lv,i)>=0)&&(r?this.mp[t]=n:delete this.mp[t]),w(i)&&csArray.prototype.indexOf.call(Dv,i)>=0&&(r?this.pp[t]=n:delete this.pp[t])}}getCustomVariablesSession(){const t=this.Xf.get();if(!t)return{};const e=window.csJSON.parse(t);return null!==e&&p(e)?e:{}}setCustomVariableSession(t){this.Xf.set(window.csJSON.stringify(t))}removeCustomVariablesSession(){this.Xf.remove()}removeCustomVariablesPage(){this.mp={}}getRequestParameters(){const t=this.getCustomVariablesSession();for(const t in this.pp)this.pp.hasOwnProperty(t)&&(this.mp[t]=this.pp[t]);for(const e in this.mp)this.mp.hasOwnProperty(e)&&(t[e]=this.mp[e]);if(window.csJSON.stringify(t).length<=2)return{};const e={cvars:this.yp(t)};return this.mp&&window.csJSON.stringify(this.mp).length>2&&(e.cvarp=this.yp(this.mp)),e}deleteNextPageOnlyCustomVariables(){if(Object.keys(this.pp).length>0)for(const t in this.pp)this.pp[t]===this.mp[t]&&(delete this.mp[t],delete this.pp[t])}Ep(t){for(const n in t)if(t.hasOwnProperty(n)){const r=parseInt(n,10),o=t[n],h=o[0],a=o[1];s=1,i=20,(!(v(e=r)&&e>=s&&e<=i)||h.length>512||a.length>255)&&delete t[n]}var e,s,i}yp(t){this.Ep(t);const e=function(t){let e;for(e in t)return!1;return!0}(t)?[]:t;return window.csJSON.stringify(e)}wp(t){return!w(t)||g(t)||f(t)}getAllValidCustomVars(){const t=this.getCustomVariablesSession();for(const t in this.pp)this.pp.hasOwnProperty(t)&&(this.mp[t]=this.pp[t]);for(const e in this.mp)this.mp.hasOwnProperty(e)&&(t[e]=this.mp[e]);return this.Ep(t),t}}const Fv="_cs_id",Hv=/^(([a-z0-9\-])+(\.[0-9]+){6})(\.(None|Lax|X)\.(0|1))?(\.[0-1])?(\.\b(x|[0-9a-fA-F]{12})\b)?$/;class Bv{constructor(t,e,s){this.Rt=t,this.Ff=e,this.Og=s}onCookieToSet(t){this.Ug=t}onCookieToRemove(t){this.Fg=t}get(){let t;return t=this.Rt.cookielessTrackingEnabled?this.Og.getItem(Fv):this.Ff.get(Fv),t?Bv.fromString(t):null}set(t){var e;const s=Bv.toString(t);if(this.Rt.cookielessTrackingEnabled)this.Og.setItem(Fv,s);else{const i=new csDate(t.expires);this.Ff.set(Fv,s,i),null===(e=this.Ug)||void 0===e||e.call(this,Fv,s,i)}}remove(){var t;this.Rt.cookielessTrackingEnabled?this.Og.removeItem(Fv):(this.Ff.delete(Fv),null===(t=this.Fg)||void 0===t||t.call(this,Fv))}handleSubdomainChange(){if(this.Rt.cookielessTrackingEnabled)return;const t=this.get();t&&(t.allowSubdomains=this.Rt.allowSubdomains,this.Rt.allowSubdomains?this.Ff.delete(Fv,ms.CURRENT_DOMAIN):this.Ff.delete(Fv,this.Ff.getRootDomain()),this.set(t))}static fromString(t){const[e,s,i,n,r,o,h,a,c]=csString.prototype.split.call(t,".");return{id:e,creationTimestamp:Number(s),visitsCount:Number(i),hitTimestamp:Number(n),lastVisitTimestamp:Number(r),appliedTrackingDraw:Number(o),expires:Number(h),allowSubdomains:void 0===a?void 0:!!Number(a),identityPrint:void 0===c||"x"===c?null:c}}static toString(t){var e;return csArray.prototype.join.call([t.id,t.creationTimestamp,t.visitsCount,t.hitTimestamp,t.lastVisitTimestamp,t.appliedTrackingDraw,t.expires,t.allowSubdomains?1:0,null!==(e=t.identityPrint)&&void 0!==e?e:"x"],".")}static isValidVisitorString(t){return Hv.test(t)}}class zv{constructor(t){this.bt=t}anonymizeUrl(t,e=[],s=[]){let i=this.bt.anonymizePII(t);i=this.bt.anonymizeJwt(i);const n=this.Ap(i,e);if(n!==i)return me.counters.redactedPII.count("url"),n;const r=this._p(i,s);return r!==i&&me.counters.redactedPII.count("url"),r}removeQueryString(t){const{path:e,queryString:s}=this.Sp(t);return""!==s?`${e}?`:e}Sp(t){const e=csString.prototype.indexOf.call(t,"?");let s,i="";return-1!==e?(s=csString.prototype.slice.call(t,0,e),i=csString.prototype.slice.call(t,e,t.length)):s=t,{path:s,queryString:i}}Ap(t,e){if(0===e.length)return t;const{path:s,queryString:i}=this.Sp(t),n=csString.prototype.split.call(s,"/");for(const t of e){const e=this.Rp(n,t);if(null!==e)return`${e}${i}`}return t}Rp(t,e){if(t.length=e.length){csArray.prototype.push.call(s,n);continue}const r=e[i].key;if(this.bp(r)){const t=e[i].value;csArray.prototype.push.call(s,t)}else{if(n!==r)return null;csArray.prototype.push.call(s,n)}}return csArray.prototype.join.call(s,"/")}_p(t,e){if(0===e.length)return t;const{path:s,queryString:i}=this.Sp(t);let n=csString.prototype.split.call(s,"/");for(const t of e)n=this.Tp(n,t);return`${csArray.prototype.join.call(n,"/")}${i}`}Tp(t,e){const s=[];let i=0;const n="http:"===t[0]||"https:"===t[0]?2:0;for(let r=0;r=n){const t=e[i].value;csArray.prototype.push.call(s,o.length>0?t:""),i++,i===e.length&&(i=0)}else if(o!==h){for(let e=0;eii.isMaskedElement(t)||ii.isMaskedElementChild(t),isAttributeSensitive:(t,e)=>ii.isMaskedAttribute(t,e),allWhitelistedAttributes:fr(this.Rt.whitelistedAttributes),attributeIgnoreTokens:qv,useAnonymization:e,attrMaxLength:1024,hierarchyMaxLength:1024};return this.Fu.getElementPathAndHierarchy(s,i,{dynamicIdRegex:this.Rt.dynamicIdRegex,...this.Rt.pathComputationRules})}getEventTargetPath(t){const e=qs(t);return this.Fu.getElementPath(e,{dynamicIdRegex:this.Rt.dynamicIdRegex,...this.Rt.pathComputationRules})}getEventTargetPathAndTargetLink(t){const e=qs(t),{path:s,firstAnchorParent:i}=this.Fu.getElementPathAndFirstAnchorParent(e,{dynamicIdRegex:this.Rt.dynamicIdRegex,...this.Rt.pathComputationRules});return{path:s,targetLink:this.Ip(i)?i.href:""}}hasValidEventTarget(t){const e=qs(t);return this.Fu.isValidElement(e)}getElementPath(t){return this.Fu.getElementPath(t,{dynamicIdRegex:this.Rt.dynamicIdRegex,...this.Rt.pathComputationRules})}Ip(t){var e;return null!==t&&t.hasAttribute("href")&&!Jt(null!==(e=t.getAttribute("href"))&&void 0!==e?e:"","#")}}class Wv{constructor(t){this.Il=t}transformEvent(t,e){this.Pp(t,e.event);const s=this.Il.getElementPath(t);return this.Vp(s,e.event),e}Pp(t,e){if(function(t){return void 0!==t.x&&void 0!==t.y}(e)){const s=t.getBoundingClientRect();e.x=Math.round(s.left+e.x+Ct.windowOffsetX()),e.y=Math.round(s.top+e.y+Ct.windowOffsetY())}}Vp(t,e){ch(e)&&(e.tgt=`${t}${_v}${e.tgt}`),function(t){return void 0!==t.tgtHM}(e)&&(e.tgtHM=`${t}${_v}${e.tgtHM}`),function(t){return void 0!==t.tgtLk}(e)&&(e.tgtLk=`${t}${_v}${e.tgtLk}`)}}class Zv{constructor(t){this.Il=t}transformEvent(t,e){const s=this.Il.getElementPath(t);return{iframePath:e.iframePath?`${s}${_v}${e.iframePath}`:s,commands:e.commands}}}class Jv{constructor(t){this.Il=t}transformEvent(t,e){if(0===e.products.length)return e;const s=this.Il.getElementPath(t),i=csArray.prototype.map.call(e.products,(t=>({...t,targetPath:`${s}${_v}${t.targetPath}`})));return{...e,products:i}}}class Yv{constructor(){this.Cp={clientX:2,clientY:3},this.jp={clientX:1,clientY:2},this.kp=[Us.POINTER_DOWN,Us.POINTER_MOVE,Us.POINTER_UP],this.Op=[Us.TOUCH_START,Us.TOUCH_MOVE,Us.TOUCH_END]}transformEvents(t,e){if(!Bt.isConnected(t))return e.events=csArray.prototype.filter.call(e.events,(t=>t.type!==Us.VISIBILITY_CHANGE)),0===e.events.length||(se.warn(`IframeRecordingEventsTransformer received event ${is.RecordingEvent}\n from disconnected iframe, content:${csJSON.stringify(e.events)}`),e.events=[]),e;const s=Xs(t);let i=null;csArray.prototype.some.call(e.events,(t=>this.Np(t)||this.xp(t)))&&(i=t.getBoundingClientRect());for(const t of e.events)this.Np(t)?this.$p(i,t):this.xp(t)&&this.Mp(i,t),t.context=t.context&&t.context.length>0?`${s}/${t.context}`:`${s}`;return e}Mp(t,e){this.Lp(this.jp,t,e)}$p(t,e){this.Lp(this.Cp,t,e)}Lp(t,e,s){s.args&&(s.args[t.clientX]=Math.round(e.left+s.args[t.clientX]),s.args[t.clientY]=Math.round(e.top+s.args[t.clientY]))}Np(t){return-1!==csArray.prototype.indexOf.call(this.kp,t.type)}xp(t){return-1!==csArray.prototype.indexOf.call(this.Op,t.type)}}class Qv{constructor(t){this.Dp=t}start(){this.Dp.onEvent((t=>this.Mn(t))),this.Dp.start()}stop(){this.Dp.stop()}Mn(t){const e=`Content Security Policy error. Violated directive: ${t.violatedDirective} - Source file: ${t.sourceFile}`;se.warn(e)}}class Kv{constructor(){this.Ih={boundElement:document,type:"securitypolicyviolation",listener:t=>this.securityPolicyViolationListener(t)}}start(){xs(this.Ih)}stop(){$s(this.Ih)}onEvent(t){this.mr=t}Fp(t){if(!t)return!1;const e=t.disposition;return g(t.sourceFile)&&csArray.prototype.some.call(Kv.Hp,(e=>csString.prototype.indexOf.call(t.sourceFile,e)>0))&&"report"!==e}securityPolicyViolationListener(t){this.Fp(t)&&this.mr({violatedDirective:t.violatedDirective,sourceFile:t.sourceFile})}}Kv.Hp=["contentsquare","cdnssl.clicktale.net"],cs([gt("Event handler type: securitypolicyviolation")],Kv.prototype,"securityPolicyViolationListener",null);class Xv{init(){this.Bp=new Qv(new Kv),this.Bp.start()}onOptout(){this.Bp.stop()}}const{toString:tg}=Object.prototype;const eg=t=>{return"symbol"==typeof t||"object"==typeof t&&null!=t&&"[object Symbol]"===(null==(e=t)?void 0===e?"[object Undefined]":"[object Null]":tg.call(e));var e};function sg(t){if("string"==typeof t||eg(t))return t;const e=`${t}`;return"number"==typeof t?"0"===e&&1/t==-1/0?"-0":e:t instanceof Number&&"0"===e&&1/t.valueOf()==-1/0?"-0":e}const ig=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ng=/^\w*$/;function rg(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const s=function(...i){const n=e?e.apply(this,i):i[0],{cache:r}=s;if(r.has(n))return r.get(n);const o=t.apply(this,i);return s.cache=r.set(n,o)||r,o};return s.cache=new(rg.Cache||Map),s}rg.Cache=Map;const og=".".charCodeAt(0),hg=/\\(\\)?/g,ag=csRegExp("[^.[\\]]+|\\[(?:([^\"'][^[]*)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))","g"),cg=function(t){const e=rg(t,(t=>{const{cache:s}=e;return 500===s.size&&s.clear(),t}));return e}((t=>{const e=[];return csString.prototype.charCodeAt.call(t,0)===og&&csArray.prototype.push.call(e,""),csString.prototype.replace.call(t,ag,((t,s,i,n)=>{let r=t;return i?r=csString.prototype.replace.call(n,hg,"$1"):s&&(r=csString.prototype.trim.call(s)),csArray.prototype.push.call(e,r),t})),e}));function ug(t,e){return csArray.isArray(t)?t:function(t,e){return!csArray.isArray(t)&&(!("number"!=typeof t&&"boolean"!=typeof t&&null!=t&&!eg(t))||ng.test(t)||!ig.test(t)||null!=e&&t in Object(e))}(t,e)?[t]:cg(t)}function lg(t){return!w(t.iterable)||(g(t.iterable)||null===t.iterable)}function dg(t,e,s){const i=null==t?void 0:function(t,e){const s=ug(e,t);let i=t,n=0;const{length:r}=s;for(;null!=i&&n"']/g,wg=csRegExp(pg.source),yg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Eg=/($^)/,Ag={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_g=/[()=,{}[\]/\s]/,Sg=/<%=([\s\S]+?)%>/g,{hasOwnProperty:Rg}=Object.prototype;function bg(t){return`\\${Ag[t]}`}const Tg={"&":"&","<":"<",">":">",'"':""","'":"'"},Ig={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:Sg,variable:"",imports:{_:{template:Pg,escape:t=>t&&wg.test(t)?csString.prototype.replace.call(t,pg,(t=>Tg[t])):null!=t?t:""}}};function Pg(t,e){const s={...Ig,...e},i=Object.keys(s.imports||{}),n=csArray.prototype.map.call(i,(t=>null==s?void 0:s.imports[t]));let r,o,h=0;const a=s.interpolate||Eg;let c="__p += '";const u=csRegExp(`${(s.escape||Eg).source}|${a.source}|${(a===Sg?yg:Eg).source}|${(s.evaluate||Eg).source}|$`,"g"),l=`//# sourceURL=${Rg.call(s,"sourceURL")?csString.prototype.replace.call(`${s.sourceURL}`,/\s/g," "):void 0}\n`;null==t||csString.prototype.replace.call(t,u,((e,s,i,n,a,u)=>{const l=i||n;return c+=csString.prototype.replace.call(csString.prototype.slice.call(t,h,u),mg,bg),s&&(r=!0,c+=`' +\n__e(${s}) +\n'`),a&&(o=!0,c+=`';\n${a};\n__p += '`),l&&(c+=`' +\n((__t = (${l})) == null ? '' : __t) +\n'`),h=u+e.length,e})),c+="';\n";const d=Rg.call(s,"variable")&&s.variable;if(d){if(_g.test(d))throw new Error("Invalid `variable` option passed into `_.template`")}else c=`with (obj) {\n${c}\n}\n`;let f;c=csString.prototype.replace.call(csString.prototype.replace.call(o?csString.prototype.replace.call(c,fg,""):c,vg,"$1"),gg,"$1;"),c=`function(${d||"obj"}) {\n${d?"":"obj || (obj = {});\n"}var __t, __p = ''${r?", __e = _.escape":""}${o?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n"}${c}return __p\n}`;try{f=Function(...i,`${l}return ${c}`)(...n)}catch(t){f=t}if(f.source=c,f instanceof Error)throw f;return f}const Vg=/^(\s*("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\s*,?)+$/,Cg=/^document\.querySelector\(("(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')\)\.(textContent|value)$/;function jg(t){if(!Vg.test(t))throw new Error("whitelisted function is wrongly used")}const kg={"window.location.hash.replace(":(t,e)=>(jg(csString.prototype.substring.call(t,29,t.length-1)),Pg(`\${${t}}`)(e)),"window.sessionStorage.getItem(":(t,e)=>(jg(csString.prototype.substring.call(t,30,t.length-1)),Pg(`\${${t}}`)(e)),"document.querySelector(":(t,e)=>{if(Cg.test(t))return Pg(`\${${t}}`)(e)},"new Date().getTime()":(t,e)=>(new csDate).getTime().toString()};const Og=/\$\{(.+?)\}/g,Ng=t=>(e,s,i)=>{let n="";return csArray.prototype.forEach.call(csString.prototype.split.call(s,"+"),(e=>{const s=csString.prototype.trim.call(e);let i=dg(t,s);if(void 0===i)if(Le(r=s,"'")&&De(r,"'"))i=csString.prototype.substring.call(s,1,s.length-1);else{const e=function(t){const e=$t(Object.keys(kg),(e=>Le(t,e)));if(e)return kg[e]}(s);if(e&&(i=e(s,t)),void 0===i)throw new Error("undefined not allowed")}var r;n+=i})),n};function xg(t,e){try{return csString.prototype.replace.call(t,Og,Ng(e))}catch{return null}}function $g(t,e){const s={};for(const i of Object.keys(t)){const n=t[i];if(g(n)){const t=xg(n,e);if(null===t)return null;s[i]=t}else s[i]=n}return s}function Mg(t,e){const s=csArray.prototype.join.call(csArray.prototype.filter.call(csArray.prototype.map.call(csString.prototype.split.call(t,","),(t=>xg(t,e))),(t=>null!==t&&ei(t))),",");return ei(s)?s:null}function Lg(t,e){try{const i=/^values\(([a-zA-Z0-9_$[\].]+)\)\[\?([a-zA-Z0-9_$]+)\]$/.exec(t);if(!i)return null;const n=i[1],r=i[2],o=dg(e,(s=n,csArray.isArray(s)?csArray.prototype.map.call(s,sg):eg(s)?[s]:csArray.from(cg(s))));if("object"!=typeof o||null===o)return null;const h=[];return csArray.prototype.forEach.call(Object.keys(o),(t=>{const e=o[t];"object"==typeof e&&null!==e&&!csArray.isArray(e)&&r in e&&csArray.prototype.push.call(h,e)})),h}catch{return null}var s}function Dg(t,e){const s=csString.prototype.split.call(t,"|");if(s.length>2)return null;const i=Lg(csString.prototype.trim.call(s[0]),e);return 2===s.length?null===i?null:function(t,e){const s=/^\[([0-9]+):([0-9+])\]$/.exec(t);if(!s)return null;const i=parseInt(s[1],10),n=parseInt(s[2],10);return n<=i||n>e.length?null:csArray.prototype.slice.call(e,i,n)}(csString.prototype.trim.call(s[1]),i):i}var Ug,Fg;function Hg(t,e){return function(t,e){switch(t){case Fg.EXIST:case Fg.NOT_EXIST:return function(t,e){const[s]=e;if(!ei(s))return!1;switch(t){case Fg.EXIST:return null!==window.csquerySelector[document.nodeType].call(document,s);case Fg.NOT_EXIST:return null===window.csquerySelector[document.nodeType].call(document,s);default:return!1}}(t,e);default:return function(t,e){const[s,i]=e,n=t in Ug;if(!(n||g(s)&&g(i)))return!1;switch(t){case Ug.AND:return!!csArray.prototype.reduce.call(e,((t,e)=>t&&e));case Ug.OR:return!!csArray.prototype.reduce.call(e,((t,e)=>t||e));case Fg.STARTS_WITH:return Le(s,i);case Fg.EQUALS:return s===i;case Fg.NOT_EQUALS:return s!==i;case Fg.CONTAINS:return csString.prototype.indexOf.call(s,i)>-1;case Fg.NOT_CONTAINS:return-1===csString.prototype.indexOf.call(s,i);case Fg.MATCHES:{const t=Bg(i);return null!==t&&t.test(s)}case Fg.NOT_MATCHES:{const t=Bg(i);return null!==t&&!t.test(s)}default:return!1}}(t,e)}}(t.operator,function(t,e){return csArray.prototype.map.call(t,(t=>function(t){return!!(t&&t.operator&&t.args)}(t)?Hg(t,e):g(t)?xg(t,e):t))}(t.args,e))}function Bg(t){const e=/^\/(.*)\/([gimy]*)$/.exec(t);let s=null;if(e){const[,t,i]=e;try{s=new csRegExp(t,i)}catch{}}else try{s=new csRegExp(t)}catch{}return s}function zg(t){switch(t){case"no decoding":default:return null;case"decode once":return{decodeURI:!0};case"decode multiple times":return{decodeURIDeep:!0}}}function qg(t){return"on next pageview only"===(null==t?void 0:t[0])?{lifespan:"onNextPageviewOnly"}:null}!function(t){t.AND="AND",t.OR="OR"}(Ug||(Ug={})),function(t){t.STARTS_WITH="startsWith",t.EQUALS="equals",t.NOT_EQUALS="notEquals",t.CONTAINS="contains",t.NOT_CONTAINS="notContains",t.MATCHES="matches",t.NOT_MATCHES="notMatches",t.EXIST="exist",t.NOT_EXIST="notExist"}(Fg||(Fg={}));class Gg{constructor(t,e){this.commandsService=t,this.args=e}}class Wg extends Gg{}class Zg extends Gg{validateArgs(t){if(E(t)){const e=!w(t.path)||g(t.path),s=!w(t.decodeURI)||g(t.decodeURI),i=!w(t.lifespan)||csArray.isArray(t.lifespan);return e&&s&&i}return!1}execute(t){if(t.path){const e=[t.path],s={...zg(t.decodeURI),...qg(t.lifespan)};Object.keys(s).length&&e.push(s),this.zp(e)}else this.zp([])}zp(t){this.commandsService.applyFromImplementation(xa[0],t,"ArtificialPageviewTemplate")}}const Jg=["trackError"];class Yg extends Wg{validateArgs(t){return!!E(t)&&(g(t.message)&&csArray.isArray(t.attributes))}execute(t,e){const s=xg(t.message,e);if(!s)return;const i={};for(const s of t.attributes){const t=xg(s.value,e);null!==t&&(i[s.key]=t)}this.commandsService.applyFromImplementation(Jg[0],[s,i],"CustomErrorTemplate")}}class Qg extends Gg{validateArgs(t){if(E(t)){const e=lg(t),s=!csArray.isArray(t.scope)||Lt(t.scope,(t=>g(t)));return e&&s&&f(t.index)&&g(t.name)&&g(t.value)}return!1}execute(t){this.commandsService.applyFromImplementation(xv[0],[t.index,t.name,t.value,t.scope[0]],"CustomVariableTemplate")}}class Kg extends Gg{validateArgs(t){return!!E(t)&&g(t.selector)}execute(t){this.commandsService.applyFromImplementation(ff[0],[t.selector],"DataCsEncryptTemplate")}}class Xg extends Gg{validateArgs(t){if(E(t)){const e=!y(t.value)||g(t.value);return g(t.selector)&&e}return!1}execute(t){var e;if(!ei(t.selector))return;const s=window.csquerySelector[document.nodeType].call(document,t.selector);s&&s.setAttribute("data-cs-override-id",null!==(e=t.value)&&void 0!==e?e:"")}}class tm extends Wg{validateArgs(t){if(E(t)){return lg(t)&&g(t.key)&&g(t.value)&&g(t.type)}return!1}execute(t,e){const s=$g(t,e);if(null!==s)this.zp(s);else{this.qp(t,e)()}}qp(t,e){return()=>{let s=0,i=window.csSetInterval((()=>{s+=1;const n=$g(t,e);if(null!==n)return window.csClearInterval(i),i=void 0,s=0,void this.zp(n);s>=20&&(window.csClearInterval(i),i=void 0,s=0)}),100)}}zp(t){let e=t.value;if("Integer"===t.type){const s=Number.parseInt(t.value,10);Number.isNaN(s)||(e=s)}this.commandsService.applyFromImplementation(Jo[0],[{key:t.key,value:e}],"DynamicVariableTemplate")}}class em extends Gg{validateArgs(t){return!!E(t)&&(g(t.transactionId)&&f(t.revenue)&&g(t.currency)&&g(t.name)&&g(t.sku)&&g(t.category)&&f(t.price)&&f(t.quantity))}execute(t){this.Gp({id:t.transactionId,revenue:t.revenue,currency:t.currency}),this.Wp({id:t.transactionId,name:t.name,sku:t.sku,category:t.category,price:t.price,quantity:t.quantity}),this.Zp()}Gp(t){this.commandsService.applyFromImplementation(sh[0],[t],"EcTransactionAllTemplate")}Wp(t){this.commandsService.applyFromImplementation(ih[0],[t],"EcTransactionAllTemplate")}Zp(){this.commandsService.applyFromImplementation(nh[0],[],"EcTransactionAllTemplate")}}class sm extends Gg{validateArgs(t){return!!E(t)&&(g(t.id)&&f(t.revenue)&&g(t.currency))}execute(t){this.commandsService.applyFromImplementation(sh[0],[t],"EcTransactionCreateTemplate")}}class im extends Gg{validateArgs(t){return!!E(t)&&(g(t.id)&&g(t.name)&&g(t.sku)&&g(t.category)&&f(t.price)&&f(t.quantity))}execute(t){this.commandsService.applyFromImplementation(ih[0],[t],"EcTransactionItemsAddTemplate")}}class nm extends Gg{validateArgs(t){return!!E(t)}execute(){this.commandsService.applyFromImplementation(nh[0],[],"EcTransactionSendTemplate")}}class rm extends Wg{validateArgs(t){return!!E(t)&&(y(t)&&g(t.selector))}execute(t,e){if(!y(t)||!g(null==t?void 0:t.selector))return;const s=Mg(t.selector,e);null!==s&&this.commandsService.applyFromImplementation(gf[0],[s],"ElementUnmaskingTemplate")}}class om extends Gg{validateArgs(t){return!!E(t)&&g(t.eventName)}execute(t){this.commandsService.applyFromImplementation(hc[0],[`@ETP@${t.eventName}`],"EventTriggerRecordingPageTemplate")}}class hm extends Gg{validateArgs(t){return!!E(t)&&g(t.eventName)}execute(t){this.commandsService.applyFromImplementation(hc[0],[`@ETS@${t.eventName}`],"EventTriggerRecordingSessionTemplate")}}class am extends Gg{validateArgs(t){return!!E(t)&&g(t.eventName)}execute(t){this.commandsService.applyFromImplementation(oc[0],[t.eventName],"PageEventTemplate")}}class cm extends Wg{validateArgs(t){if(E(t)){const e=csArray.isArray(t.cssSelectors),s=csArray.isArray(t.attributes);return e&&s}return!1}execute(t,e){const s={PIISelectors:[...csArray.prototype.filter.call(csArray.prototype.map.call(t.cssSelectors,(t=>Mg(t,e))),(t=>!!t))],Attributes:[...csArray.prototype.filter.call(csArray.prototype.map.call(t.attributes,(t=>({attrName:xg(t.attrName,e),selector:Mg(t.selector,e)}))),(t=>!!t.attrName&&!!t.selector))]};this.commandsService.applyFromImplementation(vf[0],[s],"PIIMaskingTemplate")}}class um extends Gg{validateArgs(t){return!!E(t)&&g(t.eventName)}execute(t){this.commandsService.applyFromImplementation(hc[0],[`${t.eventName}`],"RecordingEventTriggerTemplate")}}class lm extends Gg{validateArgs(t){return!!E(t)&&g(t.path)}execute(t){const e=[t.path],s={...zg(t.decodeURI),...qg(t.lifespan)};Object.keys(s).length&&e.push(s),this.commandsService.applyFromImplementation($a[0],e,"SetPathTemplate")}}class dm extends Gg{validateArgs(t){return!!E(t)&&g(t.query)}execute(t){const e=[t.query],s={...zg(t.decodeURI),...qg(t.lifespan)};Object.keys(s).length&&e.push(s),this.commandsService.applyFromImplementation(Ma[0],e,"SetQueryTemplate")}}class fm extends Gg{validateArgs(t){return!!E(t)}execute(){this.commandsService.applyFromImplementation(Io[0],[],"SrmOnlineAssetsTemplate")}}class vm extends Gg{validateArgs(t){return!!E(t)&&(g(t.status)&&g(t.selector))}execute(t){if(!ei(t.selector))return;const e=window.csquerySelector[document.nodeType].call(document,t.selector);e&&this.commandsService.applyFromImplementation(ba[0],[t.status,e],"SubmitTemplate")}}class gm{onEvent(t){this.onEventCallback=t}constructor(t,e,s){this.commandsService=t,this.condition=s,this.isStarted=!1,this.Jp=!1,this.args=e}start(){this.Jp||(this.onInit(),this.Jp=!0),this.isStarted||(this.onStart(),this.isStarted=!0)}stop(){this.isStarted&&(this.onStop(),this.isStarted=!1)}}cs([gt()],gm.prototype,"start",null),cs([gt()],gm.prototype,"stop",null);const mm="once per pageview";class pm extends gm{constructor(){super(...arguments),this.Yp=!0}validateArgs(t){if(E(t)){const e=g(t.selector),s=!t.frequency||(t.frequency===mm||"always"===t.frequency);return e&&s}return!1}onInit(){ei(this.args.selector)?(this.Qp=!this.args.frequency||this.args.frequency===mm,this.Xs=new qr(((t,e)=>this.Je(t,e)))):this.Yp=!1}onStart(){this.Yp&&this.Xs.observe(this.args.selector)}onStop(){this.Yp&&(this.Xs.processPendingMutations(),this.Xs.disconnect())}Je(t,e){"added"===e&&(this.Qp?(this.stop(),this.onEventCallback({element:t[0]})):new Set(t).forEach((t=>this.onEventCallback({element:t}))))}}class wm extends gm{constructor(){super(...arguments),this.Yp=!0,this.Kp=!1}validateArgs(t){return!!E(t)&&g(t.selector)}onInit(){ei(this.args.selector)?this.Xs=new qr(((t,e)=>{this.Je(t,e)})):this.Yp=!1}onStart(){this.Yp&&(this.Xs.observe(this.args.selector),this.Kp=!0)}onStop(){this.Yp&&(this.Xs.processPendingMutations(),this.Xs.disconnect())}Je(t,e){this.Kp?"added"===e&&new Set(t).forEach((t=>this.onEventCallback({element:t}))):this.onEventCallback({element:t[0]})}}class ym extends gm{constructor(){super(...arguments),this.Yp=!0}validateArgs(t){return!!E(t)&&g(t.selector)}onInit(){ei(this.args.selector)?(this.Uh=new qr((t=>this.Xp(t))),this.Ue=new vn((t=>this.tw(t)))):this.Yp=!1}onStart(){this.Yp&&(this.ew=csSymbol("MatchingElement"),this.Uh.observe(this.args.selector),this.Ue.observe())}onStop(){this.Yp&&(this.Uh.processPendingMutations(),this.Uh.disconnect(),this.Ue.disconnect())}Xp(t){new Set(t).forEach((t=>this.iw(t)))}tw(t){const e=Nt(t,(t=>t.removedNodes)),s=[];for(const t of e)csArray.prototype.push.call(s,...this.nw(t));new Set(s).forEach((t=>this.onEventCallback({element:t})))}iw(t){t[this.ew]=!0}nw(t){const e=[];return ct(t,NodeFilter.SHOW_ELEMENT).visitAll((t=>{t[this.ew]&&(Bt.isConnected(t)&&W.call(t,this.args.selector)||delete t[this.ew],csArray.prototype.push.call(e,t))})),e}}class Em{static readyStateChangeListener(t){csArray.prototype.forEach.call(Ft(Em.callbacks),(e=>e(t)))}static Fa(t){Em.callbacks.has(t)||(Em.callbacks.add(t),1===Em.callbacks.size&&xs(Em.eventHandler,!1))}static Ha(t){Em.callbacks.delete(t),0===Em.callbacks.size&&$s(Em.eventHandler,!1)}constructor(t){this.Je=t}observe(){Em.Fa(this.Je)}disconnect(){Em.Ha(this.Je)}}Em.callbacks=new Set,Em.eventHandler={boundElement:n.document,type:"readystatechange",listener:Em.readyStateChangeListener},fe([gt("readyStateChangeListener"),as()],Em,"readyStateChangeListener",null);class Am extends gm{constructor(){super(...arguments),this.rw={state:"Any"}}validateArgs(t){var e;return E(t)&&g(t.state)||(se.implementation(`PageStateTrigger has wrong argument: ${null===(e=this.args)||void 0===e?void 0:e.state}, fallback to default config.`),this.args=this.rw),!0}onInit(){this.qi=this.args.state.toLowerCase(),this.Xs=new Em((()=>{this.ow(this.qi,document.readyState)&&(this.onEventCallback(),this.Xs.disconnect())}))}onStart(){this.ow(this.qi,document.readyState)?this.onEventCallback():this.Xs.observe()}onStop(){this.Xs.disconnect()}ow(t,e){const s=Am.hw[e];return Am.hw[t]<=s}}Am.hw={complete:3,interactive:2,loading:1,any:0};class _m extends gm{validateArgs(t){return!!E(t)}aw(){this.isStarted&&this.onEventCallback()}onInit(){this.commandsService.applyFromImplementation(Fo[0],[()=>this.aw()],"AfterPageViewTrigger")}onStart(){}onStop(){}}class Sm extends gm{constructor(){super(...arguments),this.uw=!1,this.Yp=!0,this.lw=!0,this.fw={boundElement:document,type:"click",listener:t=>{this.uw?this.uw=!1:this.onClickOrTap(t)}},this.gw=(t,e)=>{t.type===Ur.TAP&&(this.uw=!0,this.onClickOrTap(e))}}validateArgs(t){return!!E(t)&&g(t.selector)}onClickOrTap({target:t}){if(y(t)&&_(t)){const e=si(t,this.args.selector);e&&this.onEventCallback({element:e})}}onInit(){ei(this.args.selector)?this.Ga=new ho(this.gw):this.Yp=!1}onStart(){var t;this.Yp&&(xs(this.fw,this.lw),null===(t=this.Ga)||void 0===t||t.observe())}onStop(){var t;this.Yp&&($s(this.fw,this.lw),null===(t=this.Ga)||void 0===t||t.disconnect())}}cs([gt("onClickOrTap"),as()],Sm.prototype,"onClickOrTap",null);class Rm{static mw(){var t,e,s,i;if("history"in window){const s=Object.getOwnPropertyDescriptors(history);if((null===(t=s.pushState)||void 0===t?void 0:t.writable)&&(null===(e=s.replaceState)||void 0===e?void 0:e.writable))return history}if(History.prototype){const t=Object.getOwnPropertyDescriptors(History.prototype);if((null===(s=t.pushState)||void 0===s?void 0:s.writable)&&(null===(i=t.replaceState)||void 0===i?void 0:i.writable))return History.prototype}vt.warn("Unable to override pushState, replaceState",!0,"HistoryChangeObserver")}static pw(){const t=Rm.mw();null===Rm.yw&&A(null==t?void 0:t.pushState)&&(Rm.yw=js({target:t,methodName:"pushState",hook:({args:t})=>{Rm.Ew("pushstate",t)}})),null===Rm.Aw&&A(null==t?void 0:t.replaceState)&&(Rm.Aw=js({target:t,methodName:"replaceState",hook:({args:t})=>{Rm.Ew("replacestate",t)}}))}static De(t){var e,s;Rm.Be.add(t),1===Rm.Be.size&&(null!==Rm.yw&&null!==Rm.Aw||Rm.pw(),null===(e=Rm.yw)||void 0===e||e.activate(),null===(s=Rm.Aw)||void 0===s||s.activate(),xs(Rm._w),xs(Rm.Sw))}static Ze(t){var e,s;Rm.Be.delete(t),0===Rm.Be.size&&(null===(e=Rm.yw)||void 0===e||e.deactivate(),null===(s=Rm.Aw)||void 0===s||s.deactivate(),$s(Rm._w),$s(Rm.Sw))}static Ew(t,e){const s={type:t,state:e[0]};g(e[2])&&(s.url=e[2]),Rm.ia(s)}static popstateListener(t){Rm.ia({type:"popstate",state:t.state})}static hashchangeListener(t){Rm.ia({type:"hashchange",state:null,url:t.newURL})}static ia(t){csArray.prototype.forEach.call(Ft(Rm.Be),(e=>{e(t)}))}constructor(t){this.Je=t}observe(){Rm.De(this.Je)}disconnect(){Rm.Ze(this.Je)}}Rm.yw=null,Rm.Aw=null,Rm._w={boundElement:n,type:"popstate",listener:t=>Rm.popstateListener(t)},Rm.Sw={boundElement:n,type:"hashchange",listener:t=>Rm.hashchangeListener(t)},Rm.Be=new Set,fe([gt("popstateListener"),as()],Rm,"popstateListener",null),fe([gt("hashchangeListener"),as()],Rm,"hashchangeListener",null);class bm extends gm{validateArgs(t){if(E(t)){const e=g(t.useDebounce),s="yes"!==t.useDebounce||f(null==t?void 0:t.window),i=g(t.listeners);return e&&s&&i}return!1}onInit(){"yes"===this.args.useDebounce?this.ji=Lo((()=>{this.onEventCallback()}),this.args.window):this.ji=this.onEventCallback,this.Xs=new Rm((t=>this.Rw(t)))}bw(){return window.location.href}Rw(t){const e="replacestate"===t.type&&-1===this.args.listeners.indexOf("replaceState"),s="hashchange"===t.type&&-1===this.args.listeners.indexOf("hashchange");if(e||s)return;const i=this.bw();this.Tw!==i&&(this.Tw=i,this.ji())}onStart(){this.Tw=this.bw(),this.Xs.observe()}onStop(){this.Xs.disconnect()}}class Tm extends gm{constructor(){super(...arguments),this.Yp=!0,this.lw=!0,this.fw={boundElement:document,type:"submit",listener:t=>this.submitListener(t)}}validateArgs(t){return!!E(t)&&g(t.selector)}submitListener({target:t}){y(t)&&_(t)&&W.call(t,this.args.selector)&&this.onEventCallback({element:t})}onInit(){ei(this.args.selector)||(this.Yp=!1)}onStart(){this.Yp&&xs(this.fw,this.lw)}onStop(){this.Yp&&$s(this.fw,this.lw)}}cs([gt("submitListener"),as()],Tm.prototype,"submitListener",null);class Im extends gm{constructor(){super(...arguments),this.Yp=!0,this.Iw={boundElement:document,type:"mouseover",listener:t=>this.mouseoverListener(t)},this.Pw={boundElement:document,type:"mouseleave",listener:t=>this.mouseleaveListener(t)}}validateArgs(t){return!!E(t)&&g(t.selector)}onInit(){ei(this.args.selector)||(this.Yp=!1)}mouseleaveListener({target:t}){y(t)&&_(t)&&t[this.Vw]&&delete t[this.Vw]}mouseoverListener({target:t}){if(y(t)&&_(t)){const e=si(t,this.args.selector);null===e||e[this.Vw]||(e[this.Vw]=!0,this.onEventCallback({element:e}))}}onStart(){this.Yp&&(this.Vw=csSymbol("Hovered"),xs(this.Pw,!0),xs(this.Iw,!0))}onStop(){this.Yp&&($s(this.Iw),$s(this.Pw))}}cs([gt("mouseleaveListener"),as()],Im.prototype,"mouseleaveListener",null),cs([gt("mouseoverListener"),as()],Im.prototype,"mouseoverListener",null);class Pm extends gm{constructor(){super(...arguments),this.fw={boundElement:window,type:"hashchange",listener:t=>this.hashChangedListener(t)}}validateArgs(t){return!!E(t)}hashChangedListener(t){t.newURL&&t.newURL===t.oldURL||this.onEventCallback()}onInit(){}onStart(){xs(this.fw)}onStop(){$s(this.fw)}}cs([gt("hashChangedListener"),as()],Pm.prototype,"hashChangedListener",null);class Vm extends gm{constructor(){super(...arguments),this.Cw=!0}validateArgs(t){return!!E(t)&&g(t.selector)}onInit(){ei(this.args.selector)&&Rr.isSupported()?(this.oh=new Rr({delay:0,trackOnce:!0,reobserve:!0}),this.Uh=new qr((t=>this.jw(t)),{closest:!0})):this.Cw=!1}jw(t){for(const e of t)this.oh.observe(e)}kw(t,e){if(this.isStarted&&e===br.VisibleInViewPort){const e=si(t,this.args.selector);e&&(this.onEventCallback({element:e}),this.stop(),this.Cw=!1)}}onStart(){this.Cw&&(this.oh.start(((t,e)=>this.kw(t,e))),this.Uh.observe(this.args.selector))}onStop(){this.Cw&&(this.oh.stop(),this.Uh.disconnect())}}const Cm=["api-errors:maskUrl"];class jm extends Gg{validateArgs(t){return!!E(t)&&g(t.url)}execute(t){this.commandsService.applyFromImplementation(Cm[0],[t.url],"ApiErrorsMaskUrlTemplate")}}const km=["networkRequest:maskUrls"],Om=["networkRequest:maskUrls:reset"];class Nm extends Gg{validateArgs(t){return!!E(t)&&g(t.maskingPattern)}execute(t){this.commandsService.applyFromImplementation(km[0],[t.maskingPattern],"NetworkRequestMaskUrlTemplate")}}const xm="once per pageview";class $m extends gm{constructor(){super(...arguments),this.Ow=!1,this.Nw=!1,this.Qp=!0}validateArgs(t){if(E(t)){const e=g(t.selector),s=!t.frequency||(t.frequency===xm||"always"===t.frequency);return e&&s}return!1}onInit(){Rr.isSupported()&&(this.Nw=!0,this.Qp=!this.args.frequency||this.args.frequency===xm,this.Uh=new qr(((t,e)=>{if("initial"===e)for(const e of t)Bt.isVisibleInViewportInForeground(e)&&(e[this.xw]=!0);this.jw(t)}),{closest:!0}),this.oh=new Rr({delay:0,trackOnce:!1,reobserve:!0,allowSameMatch:!0}))}onStart(){this.Nw&&!this.isStarted&&(this.xw=csSymbol("skipElement"),this.Ow=!1,this.oh.start(((t,e)=>this.kw(t,e))),this.Uh.observe(this.args.selector))}onStop(){this.Nw&&this.isStarted&&(this.Uh.disconnect(),this.oh.stop())}kw(t,e){if(this.isStarted&&e===br.VisibleInViewPort){const e=t.closest(this.args.selector);if(e){if(e[this.xw])return void delete e[this.xw];this.Qp&&this.stop(),this.Qp&&this.Ow||(this.Ow=!0,this.onEventCallback({element:e}))}}}jw(t){for(const e of t)this.oh.observe(e)}}class Mm extends gm{constructor(){super(...arguments),this.rw={pageviewTypes:["natural","artificial"]}}validateArgs(t){var e;if(E(t)){if(p(t)&&csArray.isArray(t.pageviewTypes)&&Lt(t.pageviewTypes,(t=>g(t))))return!0}return se.implementation(`BeforePageViewTrigger has wrong argument: ${null===(e=this.args)||void 0===e?void 0:e.pageviewTypes}, fallback to default config.`),this.args=this.rw,!0}onInit(){this.$w=this.args.pageviewTypes}onPageView(t){this.isStarted&&-1!==csArray.prototype.indexOf.call(this.$w,t)&&this.onEventCallback()}onStart(){}onStop(){}}class Lm extends Gg{constructor(){super(...arguments),this.Mw=!1}validateArgs(t){return E(t)&&g(t.type)&&g(t.urls)&&("allow"===t.type||"block"===t.type)&&csString.prototype.trim.call(t.urls).length>0?(this.Mw=!1,!0):(se.implementation(`BlockAllowListForSRTemplate has wrong argument: ${t}, fallback to default config.`),this.Mw=!0,!0)}execute(t){let e="";e=this.Mw?".*":this.Lw(t.urls,t.type),this.commandsService.applyFromImplementation(tv[0],[e],"BlockAllowListForSRTemplate")}Lw(t,e){let s="allow"===e?"?!":"";return s+=csArray.prototype.join.call(csArray.prototype.map.call(csString.prototype.split.call(t,","),(t=>`.*${csString.prototype.trim.call(t)}`)),"|"),`^(${s}).*?`}}class Dm{constructor(t){this.bc=t,this.Dw={ApiErrorsMaskUrl:jm,NetworkRequestMaskUrls:Nm,ArtificialPageview:Zg,BlockAllowListForSr:Lm,CustomError:Yg,CustomVariable:Qg,DataCsEncrypt:Kg,DataCsOverride:Xg,DynamicVariable:tm,EcTransactionAll:em,EcTransactionCreate:sm,EcTransactionItemsAdd:im,EcTransactionSend:nm,ElementUnmasking:rm,EventTriggerRecordingPage:om,EventTriggerRecordingSession:hm,PageEvent:am,PiiMasking:cm,RecordingEventTrigger:um,SetPath:lm,SetQuery:dm,SrmOnlineAssets:fm,Submit:vm},this.Uw={AfterPageView:_m,ElementAdded:pm,ElementBecomesVisible:$m,ElementExist:wm,ElementRemoved:ym,ElementVisibility:Vm,ElementClick:Sm,FormSubmit:Tm,HashChange:Pm,HistoryChange:bm,Mouseover:Im,PageState:Am,BeforePageView:Mm}}Fw(t){const e=this.Dw[t.name];return e?new e(this.bc,t.args):(se.error(`Implementations: template ${t.name} does not exist`),null)}Hw(t){const e=this.Uw[t.name];return e?new e(this.bc,t.args,t.condition):(se.error(`Implementations: trigger ${t.name} does not exist`),null)}parse(t){const e=[];for(const{triggers:s,template:i}of t){const t=this.Fw(i);if(!t)continue;if(t.validateArgs(t.args))for(const n of s){const s=this.Hw(n);if(!s)continue;s.validateArgs(s.args)?csArray.prototype.push.call(e,{name:`${n.name}_${i.name}`,trigger:s,template:t}):se.implementation(`${n.name} has wrong argument.`)}else se.implementation(`${i.name} has wrong argument.`)}return e}}class Um{constructor(t,e,s){this.Bw=t,this.Gr=s,this.mo={window,document,location,cookies:{}},this.Uw=new Set,this.zw=new Dm(e)}init(){Object.defineProperty(this.mo,"cookies",{get:()=>this.qw()});const t=this.zw.parse(this.Bw);for(const{name:e,trigger:s,template:i}of t)s instanceof Mm&&i instanceof Zg||(this.Uw.add(s),s.onEvent((t=>{this.onTriggerEvent(t,i),me.counters.CSTCSnippetUsed.count(e)})))}start(t=!1){this.Uw.forEach((e=>{if(e.condition){if(!Hg(e.condition,this.mo))return}t?this.Gr.schedule((()=>{e.start()})):e.start()}))}stop(){this.Uw.forEach((t=>{t.stop()}))}onBeforePageView(t){this.Uw.forEach((e=>{e instanceof Mm&&e.onPageView(t)}))}onTriggerEvent(t,e){const s=this.Gw(t),i={...this.mo,...s},n=[];if("iterable"in e.args&&g(e.args.iterable)&&e.args.iterable.length>0){const t=Dg(e.args.iterable,i);if(y(t)){const e=csArray.prototype.map.call(t,(t=>({...i,$:t})));csArray.prototype.push.call(n,...e)}}else csArray.prototype.push.call(n,i);if(e instanceof Wg)for(const t of n)e.execute(e.args,t);else for(const t of n){const s=$g(e.args,t);s&&e.execute(s)}}qw(){let t;try{t=document.cookie}catch(e){t=""}return csArray.prototype.reduce.call(csString.prototype.split.call(t,"; "),((t,e)=>{const[s,i]=csString.prototype.split.call(e,"=");return void 0!==i&&(t[s]=i),t}),{})}Gw(t){const e={...t};for(const t in e)b(e[t])&&(ii.isMaskedElement(e[t])||ii.isMaskedElementChild(e[t]))&&delete e[t];return e}}cs([Pt("implementationsService.start")],Um.prototype,"start",null),cs([gt()],Um.prototype,"onTriggerEvent",null);class Fm{constructor(t,e,s){this.Ww=new Um(t,e,s)}init(){this.Ww.init()}onInitTracking(){this.Ww.start(!0)}onOptout(){this.Ww.stop()}onBeforeSessionRenewal(){this.Ww.stop(),this.Ww.start()}onBeforeArtificialPageView(){this.Ww.stop(),this.Ww.start(),this.Ww.onBeforePageView("artificial")}onBeforeNaturalPageView(){this.Ww.onBeforePageView("natural")}}class Hm extends ue{constructor(t,e,s){super(t,e),this.Zw=null,this.Jw=(null==s?void 0:s.type)||"json",this.Yw=null==s?void 0:s.cacheMinutes,this.ke=null==s?void 0:s.timeout}onLoad(t){this.Ve=t}onError(t){this.Ce=t}onTimeout(t,e){this.je=t,this.ke=e}send(){csArray.prototype.forEach.call(this.beforeRequestCallbacks,(t=>t()));const t=this.retrieveParameters();this.it(t);const e=ce.toQuery(t),s=`${this.domainUri}${this.path?`/${this.path}`:""}?${e}`;this.md(s,this.Jw)}abort(){this.Zw&&(this.Zw.abort(),this.Zw=null)}isInProgress(){return null!==this.Zw}md(t,e){var s;const i=new XMLHttpRequest;i.open("GET",t,!0),i.responseType=e,i.onerror=()=>{var t;return null===(t=this.Ce)||void 0===t?void 0:t.call(this,i)},i.ontimeout=()=>{var t;return null===(t=this.je)||void 0===t?void 0:t.call(this,i)},i.onload=()=>{var t,s;i.status>=200&&i.status<400?(null===(t=this.Ve)||void 0===t||t.call(this,this.Qw(i,e)?i.response:i.responseText),csArray.prototype.forEach.call(this.afterRequestCallbacks,(t=>t()))):null===(s=this.Ce)||void 0===s||s.call(this,i)},i.onloadend=()=>{this.Zw=null},i.timeout=null!==(s=this.ke)&&void 0!==s?s:5e3,this.Zw=i,i.send()}Qw(t,e){const s=t.getResponseHeader("Content-Type");return null===s?"json"===e:csString.prototype.indexOf.call(csString.prototype.toLowerCase.call(s),"json")>0}it(t){let e;e=this.Yw?`${(t=>{const e=60*t*1e3;return`${Math.floor(csDate.now()/e)}`})(this.Yw)}`:csString.prototype.slice.call(`${Math.random()}`,2,8),t.r=e}}class Bm{constructor(t){this.configuration=t}}class zm extends Bm{constructor(t,e,s){super(t),this.configuration=t,this.Kw=e,this.oc=s,this.Xw=Ai.RECORDING_GLOBAL_SAMPLING}refreshQuota(){this.ty=void 0,this.ey()}onQuotaReady(t){this.sy=t}init(){this.iy()}sanitizeSessionCollectState(t){return t}canCollect(t){return null!==t&&t.collectState!==Ai.QUOTA_REACHED}computeInitialCollectState(t){return this.ty?(this.oc.emitCollectStateChange(this.ty,_i.ETR_OFF),this.ty):(se.warn("Quota file error computeInitialCollectState() called before quota answered"),Ai.QUOTA_REACHED)}getEligibleCollectState(t){return t.collectState===Ai.QUOTA_REACHED?Ai.QUOTA_REACHED:!pc.isRecordingSupported()&&this.isReplayRecorded(t)?Ai.ANALYTICS_ONLY:t.collectState===Ai.RECORDING_RULES_TARGETING?Ai.RECORDING_RULES_TARGETING:t.collectState===Ai.ANALYTICS_ONLY_RULES_TARGETING?Ai.ANALYTICS_ONLY_RULES_TARGETING:t.collectState===Ai.RECORDING_GLOBAL_SAMPLING?Ai.RECORDING_GLOBAL_SAMPLING:Ai.ANALYTICS_ONLY}abortQuotaServiceRequest(){}isReplayRecorded(t){return t.collectState===Ai.RECORDING_GLOBAL_SAMPLING||t.collectState===Ai.RECORDING_RULES_TARGETING}getInitialCollectState(){return this.ty||Ai.QUOTA_REACHED}setVisitorService(t){}computeInitialCollectStateFromRecordingConsentGranted(t){return Ai.ANALYTICS_ONLY}ny(t){this.ty=t,this.sy&&this.sy(t)}iy(){this.Kw.onError((t=>this.quotaServiceErrorHandler(`HTTP:${t.status} - fetching quota file for pid: ${this.configuration.projectId}`))),this.Kw.onTimeout((()=>this.quotaServiceErrorHandler("timeout"))),this.Kw.onLoad((t=>this.quotaFileHandler(t)))}ey(){this.Kw.isInProgress()||this.Kw.send()}quotaFileHandler(t){var e;(null===(e=null==t?void 0:t.quotas)||void 0===e?void 0:e.length)?this.oy(t):this.quotaServiceErrorHandler("Quota types missing from config file")}quotaServiceErrorHandler(t){const e=`Quota error - ${t}`;se.warn(e),this.ny(this.Xw)}oy(t){let e=!1,s=!1;for(const i of t.quotas)"ANALYTICS"===i.quotaType&&i.value?e=!0:"RECORDING"===i.quotaType&&i.value&&Qt.boolean(Math.round(100*i.value))&&(s=!0);!e&&s?this.quotaServiceErrorHandler(`Quota types impossible: replay without analytics - ${csJSON.stringify(t)}`):e&&s?pc.isRecordingSupported()?this.ny(Ai.RECORDING_GLOBAL_SAMPLING):this.ny(Ai.ANALYTICS_ONLY):e&&!s?this.ny(Ai.ANALYTICS_ONLY):this.ny(Ai.QUOTA_REACHED)}getRecordingConsentWithdrawn(){return Ai.ANALYTICS_ONLY}}cs([gt("Quota File: quotaFileHandler")],zm.prototype,"quotaFileHandler",null),cs([gt("Quota File: onerror")],zm.prototype,"quotaServiceErrorHandler",null);class qm extends Bm{constructor(t,e,s,i,n){super(t),this.configuration=t,this.hy=e,this.oc=s,this.Sg=i,this.Mt=n,this.uy=[]}refreshQuota(){}onQuotaReady(t){}canCollect(t){return!0}init(){this.ly()}sanitizeSessionCollectState(t){return t.collectState!==Ai.QUOTA_REACHED&&t.collectState!==Ai.RECORDING_RULES_TARGETING&&t.collectState!==Ai.RECORDING_TEMPORARILY||(t.collectState=Ai.ANALYTICS_ONLY),t}computeInitialCollectState(t){return jo.isReplayConsentNeeded(this.configuration)?Ai.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED:this.sm(t)}computeInitialCollectStateFromRecordingConsentGranted(t){return this.sm(t)}sm(t){return pc.isRecordingSupported()?(this.uy=[],Qt.percentage()0?(this.ey(t),Ai.RECORDING_TEMPORARILY):Ai.ANALYTICS_ONLY):Ai.ANALYTICS_ONLY}getEligibleCollectState(t){return pc.isRecordingSupported()?jo.isRecordingBlockedByConsent(t)?t.collectState===Ai.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN?Ai.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN:Ai.RECORDING_BLOCKED_BY_CONSENT_NOT_EXPRESSED:t.collectState===Ai.RECORDING_GLOBAL_SAMPLING?Ai.RECORDING_GLOBAL_SAMPLING:(this.uy=[],this.configuration.malkaUrlEnabled&&(csArray.prototype.push.call(this.uy,Ai.RECORDING_URL_SAMPLING),this.configuration.malkaEtrEnabled&&csArray.prototype.push.call(this.uy,Ai.RECORDING_ETR_SAMPLING)),this.uy.length>0?(this.ey(t),Ai.RECORDING_TEMPORARILY):(t.etrState===_i.ETR_ON&&this.oc.emitCollectStateChange(Ai.ANALYTICS_ONLY,_i.ETR_ON),Ai.ANALYTICS_ONLY)):Ai.ANALYTICS_ONLY}ey(t){var e;const s=null===(e=this.xt)||void 0===e?void 0:e.getVisitor();this.hy.send({recordingTypes:csArray.prototype.map.call(this.uy,Number),url:this.Mt.getAnonymizedUrl(),projectId:this.configuration.projectId,uu:(null==s?void 0:s.id)||"",sn:(null==s?void 0:s.visitsCount)||"",pn:(null==t?void 0:t.pageNumber)||""})}abortQuotaServiceRequest(){this.hy.abort()}isReplayRecorded(t){return!jo.isRecordingBlockedByConsent(t)&&(t.collectState===Ai.RECORDING_TEMPORARILY||t.collectState===Ai.RECORDING_GLOBAL_SAMPLING||t.collectState===Ai.RECORDING_URL_SAMPLING||t.etrState===_i.ETR_ON)}ly(){this.hy.onError((()=>this.quotaServiceErrorHandler("NetworkError"))),this.hy.onTimeout((()=>this.quotaServiceTimeoutHandler()),3e3),this.hy.onLoad((t=>this.quotaServiceLoadHandler(t)))}quotaServiceErrorHandler(t){this.vy(`error - ${t}`)}quotaServiceTimeoutHandler(){this.vy("timeout")}vy(t){let e=Ai.ANALYTICS_ONLY;this.gy(this.uy)?(e=Ai.RECORDING_GLOBAL_SAMPLING,se.warn(`Quota Service: request ${t} - bypassed by GLOBAL_SAMPLING`)):se.warn(`Quota Service: request ${t}`),this.oc.emitCollectStateChange(e,_i.ETR_OFF)}quotaServiceLoadHandler(t){if(200!==t.status)return void this.quotaServiceErrorHandler(`Status code: ${t.status}`);let e;try{e=csJSON.parse(t.responseText)}catch(e){return void this.quotaServiceErrorHandler(`Unable to parse the quota service response: ${t.responseText}`)}const s=null==e.allowedRecordingTypes?void 0:csArray.prototype.map.call(e.allowedRecordingTypes,csString);if(!s)return void this.quotaServiceErrorHandler("recording types missing from quota service response");let i=_i.ETR_OFF,n=Ai.ANALYTICS_ONLY;this.gy(s)?n=Ai.RECORDING_GLOBAL_SAMPLING:this.my(s)&&(n=Ai.RECORDING_URL_SAMPLING),this.py(s)&&(i=_i.ETR_ON),this.oc.emitCollectStateChange(n,i)}gy(t){return csArray.prototype.some.call(t,(t=>t===Ai.RECORDING_GLOBAL_SAMPLING))}my(t){return csArray.prototype.some.call(t,(t=>t===Ai.RECORDING_URL_SAMPLING))}py(t){return csArray.prototype.some.call(t,(t=>t===Ai.RECORDING_ETR_SAMPLING))}setVisitorService(t){this.xt=t}getInitialCollectState(){return Ai.ANALYTICS_ONLY}getRecordingConsentWithdrawn(){return Ai.RECORDING_BLOCKED_BY_CONSENT_WITHDRAWN}}cs([gt("Quota Service: onerror")],qm.prototype,"quotaServiceErrorHandler",null),cs([gt("Quota Service: ontimeout")],qm.prototype,"quotaServiceTimeoutHandler",null),cs([gt("Quota Service: onload")],qm.prototype,"quotaServiceLoadHandler",null);class Gm{constructor(){this.wy={PIISelectors:["picture","img","video","audio"],Attributes:[]},this.yv={elementSelector:"",attrSelector:"",attrSelectors:[]};const t={PIISelectors:["[data-cs-mask]","#c1_card_info_id",".ctHidden","[data-heap-redact-text]","[heap-ignore]","[data-heap-ignore]","[data-heap-redact-attributes]","[data-hj-suppress]",".data-hj-suppress","[data-hj-masked]"],Attributes:[{selector:".ctHidden,input:not([type=button]):not([type=submit])",attrName:"value"}]};this.yv=ii.getComputedSelectorSettings(t,this.yv)}init(){this.yy()}setMaskedElementSettingsFromCommand(t){if(t=ii.sanitizeSelectorUserInput(t),!ii.isSelectorUserInput(t))throw new Error(`Command misuse: ${vf[0]}`);this.Ey(t)}setMaskedElementSettingsFromParent(t){const e={PIISelectors:csString.prototype.split.call(t.elementSelector,","),Attributes:t.attrSelectors};this.Ey(e)}getMaskedElementSettings(t){return t?this.Ay(this.wy):this.yv}yy(){var t,e,s,i,n,r;const o={PIISelectors:[],Attributes:[]};(null===(s=null===(e=null===(t=null===window||void 0===window?void 0:window.ClickTaleSettings)||void 0===t?void 0:t.DOM)||void 0===e?void 0:e.PII)||void 0===s?void 0:s.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=>{g(t.attr)&&g(t.rule)&&o.Attributes.push({selector:t.rule,attrName:t.attr})})),this.Ey(o)}Ey(t){this.yv=this.Ay(t)}Ay(t){return ii.getComputedSelectorSettings(t,this.yv)}}class Wm{constructor(t,e,s,i,n,r,o,h,a,c,u){this.Rt=t,this.Tc=e,this.cv=s,this.uv=i,this.bc=n,this.Ff=r,this.Hf=o,this.bt=h,this.kc=a,this.xt=c,this.Mt=u}init(){var t,e;const s=[],i=new af,n=new mr(this.kc.shouldUseAnonymization(),this.Rt.whitelistedAttributes,this.bt,this.Rt.anonymizeDigits);csArray.prototype.push.call(s,i,n);const r=new nf(s,this.Rt,this.Tc,this.cv,this.uv),o=new Jd(this.Rt,this.bc,this.Ff,this.Hf,this.xt,this.Mt,r);this.xt.createOrUpdateVisitor(),this.bc.register(vf,(t=>{this.cv.setMaskedElementSettingsFromCommand(t)})),o.init(),this.bc.start(),o.startHotjar();const h=null!==(e=null===(t=window.hjSiteSettings)||void 0===t?void 0:t.state_change_listen_mode)&&void 0!==e?e:"manual";"manual"!==h&&(this._y=new Rm((t=>{"hashchange"===t.type&&"automatic_with_fragments"!==h||this.Rw()})),this._y.observe())}stop(){var t;null===(t=this._y)||void 0===t||t.disconnect()}Rw(){Vd(),jd(this.Mt.getUrl())}}const Zm=(t,e,s)=>{const i=new Pe,n=new zv(i),r=new yv(window.location,n),o=new ms(t,r,e);o.init();const h=new kv,a=new jv,c=new fv([lv.UXA]),u=new rf((()=>{})),l=new of,d=new Gm;d.init();const f=new Xd,v=new zf(t,new Mf(t,o,h),s),g=new Kd(v,t,r,f),m=new Bv(t,o,a),p=new Rf(t,m,s);new Wm(t,u,d,l,c,o,h,i,g,p,r).init()};class Jm{constructor(t,e,s,i,n){this.Rt=t,this.Lt=e,this.Tt=s,this.Gr=i,this.oc=n,this.Sy=()=>{var t;const e=ds.get(bf);null!==e&&Cf.isValidSessionString(e)?this.Kv.canCollect(Cf.fromRawString(e))?this.init():(null===(t=this.Rt.voc)||void 0===t?void 0:t.enabled)&&Zm(this.Rt,this.Lt,this.oc):(this.Kv.onQuotaReady((t=>{var e;t!==Ai.QUOTA_REACHED?this.init():(null===(e=this.Rt.voc)||void 0===e?void 0:e.enabled)&&Zm(this.Rt,this.Lt,this.oc)})),this.Kv.refreshQuota())}}initWithQuota(){var t,e;if(!1===(null===(t=this.Rt.smbConfig)||void 0===t?void 0:t.record))return void((null===(e=this.Rt.voc)||void 0===e?void 0:e.enabled)&&Zm(this.Rt,this.Lt,this.oc));const s=new Hm(this.Rt.getQuotaUri(),"",{type:"json",cacheMinutes:15});this.Kv=new zm(this.Rt,s,this.oc),this.Kv.init(),this.Sy()}init(){let t,e,s,i,n,r,o,h,a,c,u,l,d,f,v,g,m,p,w,y,E,A,_,S,R,b,T,I,P,V,C,j;ic.isSupported()&&ic.setDigestSalt(this.Rt.projectId.toString()),this.Gr.schedule((()=>{t=new Pe,e=new zv(t),i=new yv(window.location,e),s=new ms(this.Rt,i,this.Lt),s.init()})),this.Gr.schedule((()=>{n=new jv,r=new kv,g=new iv(window.location,s);(new Xv).init(),m=Cv.create(se.warn),v=new bs(m);const t=v.create(`${this.Rt.getLegacyQuotaUri()}/quota`,!0);void 0===this.Kv&&(this.Kv=new qm(this.Rt,t,this.oc,g,i),this.Kv.init())})),this.Gr.schedule((()=>{o=new Cf(this.Rt,s,n),h=new kf(o,this.Kv)})),this.Gr.schedule((()=>{a=new Bv(this.Rt,s,n),c=new Rf(this.Rt,a,this.oc,h),this.Tt.setContext(c,h),this.Kv.setVisitorService(c)})),this.Gr.schedule((()=>{C=new zf(this.Rt,new Mf(this.Rt,s,r),this.oc),u=new Nf(c,h,C),l=new Jf(this.Rt,s,n),d=new Yf(window.location,l),f=new Qf(d),p=new Of(this.Rt,c,d),P=new Gv(zt,this.Rt),S=new Wv(P),R=new Zv(P),b=new Jv(P),T=new Yv,I=new Sv(S,R,b,T),_=new fv([lv.UXA]),w=new uv(_,I),y=new Xf(i),E=new ev(y,_);const e=new Nv(this.Rt,s,n);V=new Uv(t,e),A=new $v(_,V);new Ts(c,h,d,V,this.Rt)})),this.Gr.schedule((()=>{const n=new Sf(this.Rt,c,d,p,u,undefined,undefined,g);this.Rt.implementations&&(j=new Fm(this.Rt.implementations,_,this.Gr),j.init(),this.oc.addListener(j)),n.compute((n=>{this.Gr.schedule((()=>{w.init();const o=new Av,a=new Bf(this.Rt,_,C,h,this.oc),u=new rv(this.Rt,s,r),l=new ov(this.oc,window.location,u),d=new cv(_,l),g=new gv(_,this.Rt);const p=new vv(this.Rt,c,h,undefined);if(n){this.oc.emitInitTracking();const n=new Gm;new _f(p,m,c,h,this.oc,_,w,this.Rt,d,l,a,C,t,P,e,i,g,o,I,V,A,y,E,this.Gr,v,s,r,this.Kv,n).start()}else{new qf(this.oc,_,w,d,l,f,a).start()}}))}))}))}}var Ym,Qm;!function(t){let e;const s={loadBundle(t){const r=t.source,o=t.data;if(i(o)){const i=()=>{const e=function(t,e){return csString.prototype.replace.call(csString.prototype.replace.call(csString.prototype.replace.call(t,"{version}",e.version),"{token}",e.token),"{domain}",e.domain)}("{domain}/tag/tag.bundle.js?v={version}",o);!function(t,e){const s=document.createElement("script");s.type="text/javascript",s.async=!0,s.src=t,s.onload=e,s.charset="utf-8",document.head.appendChild(s)}(e,(()=>r.postMessage("csBundleLoaded",t.origin)))};e=o.token,a(s.loadBundle),n(t.origin)&&i()}}};function i(t){return t&&"csBundleInjection"===t.type&&n(t.domain)&&o(t.version)&&r(t.token)}function n(e){return/^https?:\/\/[a-zA-Z0-9\.\-]+\.(content-square\.fr|contentsquare\.com|csq\.io)$/.test(e)||t.hjDomainRegex.test(e)}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 a(t){window.removeEventListener("message",t,!1)}t.getToken=function(){return e},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(s.loadBundle)},t.listen=h,t.removeListener=a}(Ym||(Ym={})),function(t){const e=window.opener||window.parent,s=[/^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$/,Ym.hjDomainRegex];let i,n;const r={ping(t){if("string"==typeof t.data&&"ping"===t.data&&o(t.origin)){n=t.origin;const e=Ym.hjDomainRegex.test(t.origin);i=e?"https://app.contentsquare.com":t.origin,c(r.ping),a(r.insertMessageScript),h(`${"utils.js"}?cb=${(new csDate).getTime()}`)}},insertMessageScript:u((t=>{"string"==typeof t.data&&"ping"!==t.data&&(c(r.insertMessageScript),h(t.data))}))};function o(t){return csArray.prototype.some.call(s,(e=>e.test(t)))}function h(t,e){const s=document.createElement("script");s.type="text/javascript",s.async=!0;const n=null==i?void 0:csString.prototype.replace.call(i,/^https?:/,"");s.src=`${n}/tag/${t}`,s.onload=e,s.charset="utf-8",document.getElementsByTagName("head")[0].appendChild(s),function(t){csString.prototype.includes.call(t,"&mode=")&&sessionStorage.setItem("_hjRetakerMode",csString.prototype.split.call(t,"&mode=")[1])}(t)}function a(t){window.addEventListener("message",t,!1)}function c(t){window.removeEventListener("message",t,!1)}function u(t){return function(e){e.origin===n&&t(e)}}t.getToken=function(){return Ym.getToken()},t.isActivable=function(){return window!==e&&window.addEventListener},t.isAuthorizedDomain=o,t.waitForConnection=function(){a(r.ping),Ym.waitForBundleInjection()},t.listen=a,t.removeListener=c,t.secureListener=u,t.post=function(t){n&&e.postMessage(t,n)}}(Qm||(Qm={}));const Km=window.CSFrameCommunication||Qm;class Xm extends Ev{emitTrackingContextResultMessage(t){for(const e of this.listeners)e.onTrackingContextResultCallback&&e.onTrackingContextResultCallback(t)}emitAfterPageViewCallback(t){for(const e of this.listeners)e.onAfterPageViewCallback&&e.onAfterPageViewCallback(t)}emitIntegrationSessionKeyCallback(t){for(const e of this.listeners)e.onIntegrationSessionKeyCallback&&e.onIntegrationSessionKeyCallback(t)}emitParentRecordingContextChange(t){for(const e of this.listeners)e.onParentRecordingContextChange&&e.onParentRecordingContextChange(t)}emitParentSensitiveStatusChange(t){for(const e of this.listeners)e.onParentSensitiveStatusChange&&e.onParentSensitiveStatusChange(t)}emitStartAnalytics(){for(const t of this.listeners)t.onStartAnalytics&&t.onStartAnalytics()}emitStopAnalytics(){for(const t of this.listeners)t.onStopAnalytics&&t.onStopAnalytics()}emitStartRecording(){for(const t of this.listeners)t.onStartRecording&&t.onStartRecording()}emitStopRecording(){for(const t of this.listeners)t.onStopRecording&&t.onStopRecording()}}class tp extends Ev{constructor(t){super(),this.Gr=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 e of this.listeners)e.onStartTracking&&this.Gr.schedule((()=>e.onStartTracking(t)))}emitArtificialPageViewEnd(){for(const t of this.listeners)if(t.onArtificialPageViewEnd)try{t.onArtificialPageViewEnd()}catch(t){se.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,e){for(const s of this.listeners)s.onCollectStateChange&&s.onCollectStateChange(t,e)}emitInitialDomStart(){for(const t of this.listeners)t.onInitialDomStart&&t.onInitialDomStart()}emitInitialDomDone(t){for(const e of this.listeners)e.onInitialDomDone&&e.onInitialDomDone(t)}emitRecordingContextChange(){for(const t of this.listeners)t.onRecordingContextChange&&t.onRecordingContextChange()}emitSensitiveStatusChange(){var t;for(const e of this.listeners)null===(t=e.onSensitiveStatusChange)||void 0===t||t.call(e)}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()}}cs([Pt("emitStartTracking")],tp.prototype,"emitStartTracking",null);const ep=["addUserProperties"];const sp=["identify"],ip=["getIdentity"],np=["resetIdentity"];const rp=["trackTransaction"];class op{constructor(t){this.Ry=t}init(){this.Ry.register(Jo),this.Ry.register(xv),this.Ry.register($a),this.Ry.register(Ma),this.Ry.register(xa),this.Ry.register(eh),this.Ry.register(sh),this.Ry.register(ih),this.Ry.register(nh),this.Ry.register(rp),this.Ry.register(qa),this.Ry.register(Ga),this.Ry.register(hv),this.Ry.register(av),this.Ry.register(Za),this.Ry.register(oc),this.Ry.register(hc),this.Ry.register(Io),this.Ry.register(Df),this.Ry.register(Uf),this.Ry.register(Ff),this.Ry.register(Hf),this.Ry.register(km),this.Ry.register(Om),this.Ry.register(ep),this.Ry.register(sp),this.Ry.register(ip),this.Ry.register(np)}onStartTracking(){this.Ry.start()}onOptout(){this.Ry.stop()}}class hp extends ci{constructor(t,e){super(),this.bc=t,this.by=e,this.vu=[]}onStart(){this.commandsBatchReady()}onStop(){this.vu=[]}register(t){for(const e of t)this.bc.register([e],((...t)=>this.send(e,t)))}send(t,e){csArray.prototype.push.call(this.vu,{name:t,params:e}),this.isStarted&&this.commandsBatchReady()}commandsBatchReady(){if(0===this.vu.length)return;const t={commands:this.vu};this.by.sendToParent(is.Commands,t),this.vu=[]}}cs([gt("Commands.iframe.commandsBatch.send")],hp.prototype,"send",null),cs([Do(),gt("send iframe commands batch")],hp.prototype,"commandsBatchReady",null);class ap{constructor(t=25){this.Ty=t,this.Iy=[]}reset(){this.Iy=[]}getMessages(){return this.Iy}addMessage(t){this.Iy.lengththis.rf(t)}}onStart(){xs(this.Oy,!1),this.Ny()}onStop(){$s(this.Oy,!1),this.ky&&(ns.closeChannelPort(this.ky),this.ky=null)}sendToParent(t,e){const s=this.buildChildBaseMessage(t,e);this.xy(s)}Ny(){const t=this.buildChildBaseMessage(is.Discovery);ns.sendPostMessage(window.parent,"*",t)}buildChildBaseMessage(t,e){const s=ns.buildBaseMessage(t,ss.Child,this.Rt.projectId);return e&&(s.content=e),s}xy(t){null!==this.ky?ns.sendChannelMessage(this.ky,t):this.buffer.addMessage(t)}$y(t,e){const s=ns.getNewChannelMessage();this.ky=s.port1,this.ky.onmessage=t=>{this.bf(t)};const i=this.buildChildBaseMessage(is.Discovery);i.id=e,ns.sendPostMessage(window.parent,t,i,[s.port2]),this.sendAllMessagesFromBuffer()}bf(t){switch(t.data.type){case is.TrackingContextResultMessage:this.jy.emitTrackingContextResultMessage(t.data.content);break;case is.IntegrationCallback:{const e=t.data.content;e.initiator===es.AfterPageView?this.jy.emitAfterPageViewCallback(e):e.initiator===es.GetSessionKey?this.jy.emitIntegrationSessionKeyCallback(e):se.warn(`Iframe child received unknown IntegrationCallback type from parent : ${csJSON.stringify(t.data)}`);break}case is.Stop:this.oc.emitOptout();break;case is.RecordingContext:{const e=t.data.content;this.Vy.setRecordingContext(e),this.jy.emitParentRecordingContextChange(e);break}case is.SensitiveStatus:{const e=t.data.content;this.Cy.setSensitiveStatus(e),this.jy.emitParentSensitiveStatusChange(e);break}default:se.warn(`Iframe child received unknown channelMessage type from parent : ${csJSON.stringify(t.data)}`)}}rf(t){if(null===this.ky&&ns.isMessageValid(t,ss.Parent,this.Rt.projectId,this.Rt.hostnames))switch(t.data.type){case is.Stop:this.oc.emitOptout();break;case is.Discovery:if(!v(t.data.id)||t.data.id<0)return void se.warn(`Iframe child received discovery without valid id from parent (${t.origin}) : ${csJSON.stringify(t.data)}`);this.$y(t.origin,t.data.id);break;default:se.warn(`Iframe child received unknown postMessage type from parent (${t.origin}) : ${csJSON.stringify(t.data)}`)}}sendAllMessagesFromBuffer(){if(null===this.ky)return;const t=this.buffer.getMessages();for(const e of t)ns.sendChannelMessage(this.ky,e);this.My(),this.buffer.reset()}My(){const t=ns.buildBaseMessage(is.EndOfBufferedMessages,ss.Child,this.Rt.projectId);ns.sendChannelMessage(this.ky,t)}}class lp{constructor(t){this.by=t}onStartTracking(){this.by.start()}onOptout(){this.by.stop()}}class dp{constructor(t,e,s,i,n){this.su=t,this.ru=e,this.by=s,this.Vy=i,this.Cy=n}init(){this.su.onChildMessage(((t,e,s)=>this.ru.emitIframeEvent(t,e,s))),this.su.setSentiveStatusCallback((()=>this.Cy.getSensitiveStatus())),this.su.setRecordingContextCallback((()=>this.Vy.getRecordingContext()))}onStartTracking(){this.su.start()}onOptout(){this.su.stop()}onIframeRecordingUserEvent(t){const e={events:t,containsUserEvent:!0};this.by.sendToParent(is.RecordingEvent,e)}onIframeRecordingBrowserEvent(t){const e={events:t,containsUserEvent:!1};this.by.sendToParent(is.RecordingEvent,e)}onIframeAnalysisUserEvent(t){const e={event:t,isUserEvent:!0};this.by.sendToParent(is.AnalysisEvent,e)}onIframeAnalysisBrowserEvent(t){const e={event:t,isUserEvent:!1};this.by.sendToParent(is.AnalysisEvent,e)}onIframeJavascriptError(t){this.by.sendToParent(is.JavascriptError,t)}onIframeApiError(t){this.by.sendToParent(is.ApiError,t)}onIframeDetailedApiError(t){this.by.sendToParent(is.DetailedApiError,t)}onIframeEmerchandisingMessage(t){this.by.sendToParent(is.EmerchandisingMessage,t)}onIframeCommands(t){this.by.sendToParent(is.Commands,t)}onIframeIntegrationCallback(t){this.by.sendToParent(is.IntegrationCallback,t)}onTrackingContextRequestCallback(t){this.by.sendToParent(is.TrackingContextRequestMessage,t)}onIframeStaticResource(t){this.by.sendToParent(is.StaticResource,t)}onIframeCustomError(t){this.by.sendToParent(is.CustomError,t)}onTrackingContextResultCallback(t){this.su.sendToChildren(is.TrackingContextResultMessage,t)}onAfterPageViewCallback(t){this.su.sendToChildren(is.IntegrationCallback,t)}onIntegrationSessionKeyCallback(t){this.su.sendToChildren(is.IntegrationCallback,t)}onParentRecordingContextChange(t){this.su.sendToChildren(is.RecordingContext,t)}onParentSensitiveStatusChange(t){this.su.sendToChildren(is.SensitiveStatus,t)}}class fp extends ci{constructor(t,e,s,i,n,r,o,h){super(),this.Al=t,this.$u=e,this.by=s,this.Cl=i,this.jl=n,this.Ol=r,this.Nl=o,this.xl=h}init(){var t,e,s,i,n;this.Al.onEvent((t=>this.In(t))),this.$u.onEvent((t=>this.In(t))),null===(t=this.Cl)||void 0===t||t.onEvent((t=>this.In(t))),null===(e=this.jl)||void 0===e||e.onEvent((t=>this.In(t))),null===(s=this.Ol)||void 0===s||s.onEvent((t=>this.In(t))),null===(i=this.Nl)||void 0===i||i.onEvent((t=>this.Ml(t))),null===(n=this.xl)||void 0===n||n.onEvent((t=>this.Ml(t)))}onStart(){var t,e,s,i,n;this.Al.start(),this.$u.start(),null===(t=this.Cl)||void 0===t||t.start(),null===(e=this.jl)||void 0===e||e.start(),null===(s=this.Ol)||void 0===s||s.start(),null===(i=this.Nl)||void 0===i||i.start(),null===(n=this.xl)||void 0===n||n.start()}onStop(){var t,e,s,i,n;this.Al.stop(),this.$u.stop(),null===(t=this.Cl)||void 0===t||t.stop(),null===(e=this.jl)||void 0===e||e.stop(),null===(s=this.Ol)||void 0===s||s.stop(),null===(i=this.Nl)||void 0===i||i.stop(),null===(n=this.xl)||void 0===n||n.stop()}In(t){const e={isUserEvent:!0,event:t};this.Mn(e)}Ml(t){const e={isUserEvent:!1,event:t};this.Mn(e)}Mn(t){this.isStarted&&t.event.type!==hh.RESIZE&&this.by.sendToParent(is.AnalysisEvent,t)}}const vp=["webview:analytics:start"],gp=["webview:analytics:stop"];class mp{constructor(t,e,s,i,n,r,o,h,a){this.Rt=t,this.Il=e,this.Hu=s,this.by=i,this.Jt=n,this.Ly=r,this.bc=o,this.$u=h,this.Kl=a}init(){const t=_a(this.Rt,this.Il,this.Kl),e=[];this.Rt.collectHierarchy||csArray.prototype.push.call(e,"submit");const s=new dh(t,this.Il,this.Hu,e),i=this.Jt.isInWebViewContext()?{collectGestureVelocity:!0,collectGestureDistance:!0}:{collectGestureVelocity:!1,collectGestureDistance:!1},n=Sa(this.Rt,this.Il,this.Kl),r=new lh(n,this.$u,i);this.Dy=new fp(s,r,this.by,undefined,undefined,undefined,undefined,undefined),this.Dy.init(),this.Jt.isInWebViewContext()&&this.Uy()}onStartTracking(){this.Dy.start()}onOptout(){this.Dy.stop()}onStartAnalytics(){this.Dy.start()}onStopAnalytics(){this.Dy.stop()}Uy(){this.bc.register(vp,(()=>this.Ly.emitStartAnalytics()),{disableApplyPending:!0}),this.bc.register(gp,(()=>{this.Ly.emitStopRecording(),this.Ly.emitStopAnalytics()}),{disableApplyPending:!0})}}class pp extends ci{constructor(t,e,s,i,n=[],r){super(),this.Rt=t,this.an=e,this.by=s,this.dn=i,this.fn=n,this.gn=r,this.Fy=!1,this.On=!1,this.An=new ai,this.Ki=[],this.Hy=!1,this.bn=t=>this.Ml(t),this.Tn=t=>this.In(t)}init(){this.Fn()}Fn(){var t;this.dn.onEvent(this.bn,this.Tn),null===(t=this.an)||void 0===t||t.onInputNodeToEncrypt(this.Tn)}setEnableOnlineAssets(t){this.Fy=null!=t&&t}setOnlineAssetsEnabledOnNextStart(t){this.On=t}getStaticResourceManagerStatus(){return this.gn?{supported:zn.isSupported(),onlineAssets:{activated:this.Fy,enableOnNextStart:this.On}}:null}Ml(t){this.By(t),this.zy()}In(t){this.qy(t),this.zy()}qy(t){csArray.prototype.push.call(this.Ki,t),this.Hy=!0}By(t){csArray.prototype.push.call(this.Ki,t)}zy(){xt(this.fn,(t=>{var e;return null===(e=t.flushEvents)||void 0===e?void 0:e.call(t)}));const t={containsUserEvent:this.Hy,events:this.Ki};this.by.sendToParent(is.RecordingEvent,t),this.Ki=[],this.Hy=!1}onStart(){this.gn&&this.Fy&&this.gn.enableOnlineAssets(),this.dn.start(),this.Rt.emitDebugEvents&&this.An.emit("replayRecordingStarted"),xt(this.fn,(t=>{t.start&&t.start()}))}onStop(){var t;this.dn.stop(),null===(t=this.gn)||void 0===t||t.disableOnlineAssets(),xt(this.fn,(t=>{t.stop&&t.stop()}))}addInitialDom(t){for(let e=0;e=t.date)return csArray.prototype.splice.call(this.Ki,e,0,t),this.Hy=!0,void this.zy()}this.qy(t),this.zy()}}class wp{constructor(t){this.Rt=t}isReplayUnanonymizedAllowedByConsent(){return!this.Rt.consentRequired}}class yp{static isWebViewLocalAssetsSupported(){return"URL"in window}}const Ep=["webview:replay:start"],Ap=["webview:replay:stop"];class _p{constructor(t,e,s,i,n,r,o,h){this.Rt=t,this.Ly=e,this.Gy=s,this.Wy=i,this.Zy=n,this.bc=r,this.Mt=o,this.Cy=h,this.Jy=!1}init(){const t=new wp(this.Rt),e=new Xd;this.Cc=new Xf(this.Mt);if(new ev(this.Cc,this.bc).init(),this.kc=new Kd(t,this.Rt,this.Mt,e),this.kc.init(),yp.isWebViewLocalAssetsSupported()){const t=t=>{this.Yy(t)},e=t=>se.error("An error occurred while fetching a styleSheet: "+t),s=new Set,i=t=>!s.has(t),n=t=>{s.add(t.assetId),this.Yy([t])};this.Gy.onAsset((t=>{this.Qy(t)})),this.Gy.onStyleSheetFound((s=>{this.Zy.getStyleSheetAssets(s.assetId,t,e,i,n)}))}this.Ky()}onStartRecording(){if(this.Jy=!0,!this.Cc.isUrlExcludedForSessionReplay()){const t=this.Cy.getSensitiveStatus();this.Ly.emitParentRecordingContextChange({isRecording:!0,isMutationTrackerStarted:!0,useAnonymization:t.useAnonymization})}}onStopRecording(){this.Jy=!1,this.Ly.emitParentRecordingContextChange({isRecording:!1,isMutationTrackerStarted:!1})}onArtificialPageViewEnd(){this.Ly.emitParentRecordingContextChange({isRecording:!1})}onAfterArtificialPageView(){this.Vi()&&!this.Cc.isUrlExcludedForSessionReplay()&&this.Ly.emitParentRecordingContextChange({isRecording:!0})}Vi(){return this.Jy}Ky(){this.bc.register(Ep,(()=>{this.Ly.emitStartAnalytics(),this.Ly.emitStartRecording()}),{disableApplyPending:!0}),this.bc.register(Ap,(()=>this.Ly.emitStopRecording()),{disableApplyPending:!0})}Qy(t){this.Wy.sendToParent(is.Assets,{assets:[t]})}Yy(t){0!==t.length&&this.Wy.sendToParent(is.Assets,{assets:t})}}var Sp,Rp,bp=/(@import\s*("([^"]+)"|'([^']+)'))|(url\s*\(\s*((("([^"\]]+)"|'([^'\]]+)')\s*)|([^)\]]+))\))/g;function Tp(t,e){var s=t.replace(bp,(function(){for(var t=[],s=0;s1114111?"�":String.fromCodePoint(n)}));return(i?"@import ":"")+"url("+function(t){if(-1===t.indexOf('"'))return'"'+t+'"';if(-1===t.indexOf("'"))return"'"+t+"'";return t}(e(r)||r)+")"}));return s}class Ip{constructor(t){this.Xy=t}getStyleSheetAssets(t,e,s,i,n){const r=[];if(!Pi(t))return;this.Xy.getResourceContentText(t,((t,o)=>{const h=this.tE(t,o);csArray.prototype.forEach.call(h,(t=>{csArray.prototype.push.call(r,t),Pi(t.assetId)&&i(t.assetId)&&(null==n||n(t),this.getStyleSheetAssets(t.assetId,e,s,i,n))})),e(r)}),(t=>s(t)))}tE(t,e){return this.eE(t,function(t){var e=[];return Tp(t,(function(t){return e.push(t),t})),e}(e))}eE(t,e){return csArray.prototype.map.call(csArray.prototype.filter.call(csArray.prototype.filter.call(e,(t=>!Ti(t))),(t=>!Ii(t))),(e=>({assetId:Je(e,t),assetBasePath:t,assetRawPath:e})))}}class Pp{getResourceContentText(t,e,s){const i=this.sE((s=>{e(t,s.responseText)}),s);i.open("GET",t),i.send()}sE(t,e){const s=new XMLHttpRequest;return s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&(200===s.status?t(s):e(s.statusText))},s}}class Vp{constructor(t,e,s,i,n,r,o,h,a,c,u,l,d){this.Rt=t,this.bt=e,this.Tc=s,this.oc=i,this.by=n,this.Vy=r,this.bc=o,this.jy=h,this.Jt=a,this.Mt=c,this.Cy=u,this.ph=l,this.an=d}init(){const t=[],e=this.Vy.getRecordingContext();this.Nc=new jr(!!e.useAnonymization,this.Rt.whitelistedAttributes,this.bt,this.Rt.anonymizeDigits);const s=[];csArray.prototype.push.call(s,new ar,this.Nc,new kr(this.ph)),csArray.prototype.push.call(s,new Nr);const i=new er;csArray.prototype.push.call(t,i),this.Jt.isInWebViewContext(),this.Mc=new ni,this.Mc.init(),csArray.prototype.push.call(t,this.Mc),csArray.prototype.push.call(t,new Yn(window.location,this.bt));const n=[this.Tc,new kn,new po(csArray.prototype.filter.call(t,(t=>t))),new Qr,new Xr,new ao,new Yr(this.an)];const r=new mo(n,s),o=new So(r,this.oc,this.hc);if(this.iE=new pp(this.Rt,this.an,this.by,o,t,this.gn),this.bc.register(To,(()=>this.Vy.getRecordingContext().isRecording)),this.bc.register(Po,(()=>this.iE.getStaticResourceManagerStatus())),this.iE.init(),this.Jt.isInWebViewContext()){const t=new Ip(new Pp);this.nE=new _p(this.Rt,this.jy,i,this.by,t,this.bc,this.Mt,this.Cy),this.jy.addListener(this.nE),this.oc.addListener(this.nE),this.nE.init()}}onParentRecordingContextChange(t){var e,s;void 0!==t.useAnonymization&&this.xc(t.useAnonymization),void 0!==t.enableOnlineResourcesOnNextPageview&&this.iE.setOnlineAssetsEnabledOnNextStart(t.enableOnlineResourcesOnNextPageview),t.isRecording?(this.Dc(),this.iE.setEnableOnlineAssets(t.enableOnlineResources),this.iE.start(),null===(e=this.rE)||void 0===e||e.start()):(this.iE.stop(),null===(s=this.rE)||void 0===s||s.stop())}onInitialDomStart(){}onInitialDomDone(t){this.Mc.start(),this.iE.addInitialDom(t)}xc(t){var e;this.Nc.setAnonymization(t),null===(e=this.zc)||void 0===e||e.setAnonymization(t)}onOptout(){this.iE.stop()}Dc(){var t,e,s,i;if(null===(e=null===(t=this.Rt.experimental.sessionReplay)||void 0===t?void 0:t.shadowRoot)||void 0===e?void 0:e.filterByHostSelector){xt(null===(i=null===(s=this.Rt.experimental.sessionReplay)||void 0===s?void 0:s.shadowRoot)||void 0===i?void 0:i.filterByHostSelector,(t=>{ei(t)&&vn.setShadowRootFilter((e=>{try{return W.call(e.host,t)}catch{return!1}}))}))}}}class Cp{constructor(t,e){this.Wy=t,this.oE=e}init(){this.Wy.onWebViewEvent(((t,e)=>{this.oE.emitWebviewEventToBridge(t,e)}))}onStartTracking(){this.Wy.start()}onOptout(){this.Wy.stop()}onStartAnalytics(){this.Wy.setAnalyticsStatus(!0)}onStopAnalytics(){this.Wy.setAnalyticsStatus(!1)}onParentRecordingContextChange(t){this.oE.setSessionReplayStatus(t.isRecording)}}!function(t){t[t.PAGE_VIEW=4]="PAGE_VIEW",t[t.TAP=6]="TAP",t[t.LONG_PRESS=8]="LONG_PRESS",t[t.DRAG=9]="DRAG",t[t.FLICK=10]="FLICK",t[t.DETAILED_API_ERROR=13]="DETAILED_API_ERROR",t[t.JAVASCRIPT_ERROR_SR=19]="JAVASCRIPT_ERROR_SR",t[t.CUSTOM_ERROR_SR=20]="CUSTOM_ERROR_SR",t[t.API_ERROR=21]="API_ERROR",t[t.CUSTOM_ERROR_AN=25]="CUSTOM_ERROR_AN",t[t.JAVASCRIPT_ERROR_AN=26]="JAVASCRIPT_ERROR_AN"}(Sp||(Sp={}));class jp{constructor(){this.hE=1}transformEvent(t){switch(t.type){case hh.TAP:return{version:this.hE,type:Sp.TAP,data:{path:t.tgt}};case hh.DRAG:{const e=t;return{version:this.hE,type:Sp.DRAG,data:{path:e.tgt,direction:e.fd,distance:e.distance,velocity:e.velocity}}}case hh.FLICK:{const e=t;return{version:this.hE,type:Sp.FLICK,data:{path:e.tgt,direction:e.fd,distance:e.distance,velocity:e.velocity}}}default:return null}}}class kp{constructor(t,e,s,i){this.Mt=t,this.nn=e,this.hn=s,this.wg=i,this.hE=1}transformEvent(t,e){switch(t){case is.ApiError:case is.DetailedApiError:{const t=this.hn.anonymize(e);return{version:this.hE,data:t}}case is.JavascriptError:{const t={...e,pageUrl:this.Mt.getAnonymizedUrl()},s=this.nn.anonymize(t);return{version:this.hE,data:{...s,date:xe.now()}}}case is.CustomError:{const t=e;return t.message=this.wg.anonymize(t.message),{version:this.hE,data:{...t,date:xe.now()}}}default:return null}}}!function(t){t.buildCustomErrorEvent=function(t,e,s=!1){const i={message:Nn.truncate(t,300,Nn.ELLIPSIS),errorType:"customError"};return(s||function(t){const e=Object.keys(t).length;return e>0&&e<=5}(e))&&(!function(t){for(const e in t){let s=t[e];if("string"==typeof s&&s.length>30&&(s=Nn.truncate(s,30,Nn.ELLIPSIS),t[e]=s),e.length>30){const i=Nn.truncate(e,30,Nn.ELLIPSIS);delete t[e],t[i]=s}}}(e),i.attributes=e),i}}(Rp||(Rp={}));var Op;!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(f(t))return t}catch(t){se.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 e of t.events)window.CSJavascriptBridge.sendSREvent(csJSON.stringify(e))},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,e){window.CSJavascriptBridge.sendDynamicVar(t,e)},t.sendTransaction=function(t,e,s){window.CSJavascriptBridge.sendTransaction(t,e,s)},t.sendAssets=function(t,e){if(window.CSJavascriptBridge.sendAssets){const s=csJSON.stringify(t);window.CSJavascriptBridge.sendAssets(s,e||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))}}(Op||(Op={}));class Np{constructor(t,e,s,i,n,r,o,h){this.aE=t,this.Cu=e,this.cE=s,this.uE=i,this.lE=n,this.oc=r,this.Mt=o,this.Ic=h,this.dE=!1}async emitWebviewEventToBridge(t,e){switch(t){case is.AnalysisEvent:{const t=this.cE.transformEvent(e.event);t&&Op.sendAnalysisEvent(t);break}case is.RecordingEvent:Op.sendSREvent(e);break;case is.ChildLogMessage:Op.sendLog(e);break;case is.Commands:se.tryToExecute(`SDKMessageUtils.sendMessage.sendCommandMessage: ${e}`,(()=>{this.fE(e)}))();break;case is.Assets:{const{assets:t,serializationId:s}=e,i=await this.lE.getTransformedAssets(t,s);Op.sendAssets(i,s);break}case is.JavascriptError:{const t=this.uE.transformEvent(is.JavascriptError,e);t&&(this.dE&&Op.sendNativeSREvent({...t,type:Sp.JAVASCRIPT_ERROR_SR}),Op.sendAnalysisEvent({...t,type:Sp.JAVASCRIPT_ERROR_AN}));break}case is.ApiError:{const t=this.uE.transformEvent(is.ApiError,e);t&&(Op.sendAnalysisEvent({...t,type:Sp.API_ERROR}),me.counters.networkRequests.count("collected"));break}case is.DetailedApiError:{const t=this.uE.transformEvent(is.DetailedApiError,e);t&&(Op.sendNativeSREvent({...t,type:Sp.DETAILED_API_ERROR}),me.counters.networkRequests.count("collected"));break}}}setSessionReplayStatus(t){this.dE=t}fE(t){const e=t.commands;for(const t of e)switch(!0){case csArray.prototype.indexOf.call(av,t.name)>=0:Op.sendOptIn();break;case csArray.prototype.indexOf.call(hv,t.name)>=0:this.oc.emitOptout(),Op.sendOptOut();break;case csArray.prototype.indexOf.call(Jo,t.name)>=0:this.vE(t);break;case csArray.prototype.indexOf.call(xa,t.name)>=0:this.gE(t);break;case csArray.prototype.indexOf.call(sh,t.name)>=0:this.mE(t);break;case csArray.prototype.indexOf.call(ih,t.name)>=0:break;case csArray.prototype.indexOf.call(nh,t.name)>=0:this.Zp();break;case csArray.prototype.indexOf.call(rp,t.name)>=0:this.mE(t),this.Zp();break;case csArray.prototype.indexOf.call(Cm,t.name)>=0:this.Ic.addUrlMaskingPattern(t.params[0]);break;case csArray.prototype.indexOf.call(km,t.name)>=0:this.Ic.addPartialUrlMaskingPattern(t.params[0]);break;case csArray.prototype.indexOf.call(Om,t.name)>=0:this.Ic.resetPartialUrlMaskingPatterns();break;case csArray.prototype.indexOf.call(Jg,t.name)>=0:this.pE(t);break;default:se.warn(`WebviewBridgeEventEmitter received an unknown command: ${csJSON.stringify(t)}`)}}vE(t){if(1!==t.params.length)return;const e=t.params[0];if(p(e)&&"key"in e&&"value"in e&&Go.isKeyValid(e.key)&&Go.isValueValid(e.value)){const t=this.aE.anonymizePII(e.key),s=v(e.value)?e.value:this.aE.anonymizePII(e.value);Op.sendDynamicVariable(t,s)}}gE(t){if(1!==t.params.length)return;const e=t.params[0];if(g(e)){const t={type:Sp.PAGE_VIEW,version:1,data:{url:e}};this.Mt.overridePath(e),this.oc.emitArtificialPageViewEnd(),Op.sendAnalysisEvent(t),this.oc.emitAfterArtificialPageView()}}mE(t){if(1!==t.params.length)return;const[e]=t.params;e.value&&(e.revenue=e.value),this.Cu.addTransaction(e)}Zp(){const t=this.Cu.getTransaction();Qo.isValid(t)&&(Op.sendTransaction(t.id?t.id:null,t.revenue,t.currency?t.currency:""),this.Cu.clear())}pE(t){if(t.params.length<1)return;const e=t.params[0],s=t.params[1]||{};if(!g(e)||!p(s))return;const i=Rp.buildCustomErrorEvent(e,s),n=this.uE.transformEvent(is.CustomError,i);n&&(this.dE&&Op.sendNativeSREvent({...n,type:Sp.CUSTOM_ERROR_SR}),Op.sendAnalysisEvent({...n,type:Sp.CUSTOM_ERROR_AN}))}}class xp{constructor(t,e){this.bt=t,this.Mt=e}anonymize(t){return g(t.message)&&(t.message=this.wE(t.message),t.message=this.bt.anonymizePII(t.message)),g(t.filename)&&(t.filename=this.Mt.computeOverriddenUrl(t.filename)),t}wE(t){return csString.prototype.replace.call(t,/(value\s*=\s*".*"|value\s*=\s*'.*')/,"value='CS_ANONYMIZED_VALUE'")}}const $p="LOCAL_ASSET",Mp="NONE",Lp="ONLY_LOCAL_ASSETS",Dp="ALL";class Up{constructor(t){var e,s;this.yE=t,this.EE=new Set,this.AE=Mp;try{const t=null===(s=null===(e=window.CSJavascriptBridge)||void 0===e?void 0:e.getAssetTransformerMode)||void 0===s?void 0:s.call(e);t!==Lp&&t!==Dp||(this.AE=t)}catch{}}setAssetProcessingMode(t){this.AE=t}async getTransformedAssets(t,e){if(this.AE===Mp)return t;const s=[];for(const i of t){const t=i.assetId,n=this._E(t);if(this.AE===Dp||n===$p){let n=t;if(this.SE(t,e)&&(n=this.RE(t,e)),this.EE.has(n)){csArray.prototype.push.call(s,i);continue}try{const e=await this.yE.getAssetContent(t);if(this.EE.has(n)){csArray.prototype.push.call(s,i);continue}csArray.prototype.push.call(s,{...i,retrievedAssetContent:e}),this.EE.add(i.assetId)}catch(t){se.error(`an error occurred while getting data for asset: ${n}: ${t}`),csArray.prototype.push.call(s,i)}}else csArray.prototype.push.call(s,i)}return s}_E(t){const e=window.WEBVIEW_SERVER_URL||null;try{const{protocol:s}=new csURL(t);return"file:"===s||e&&csString.prototype.startsWith.call(t,e)?$p:"REMOTE_ASSET"}catch(e){se.error(`Error constructing URL (${t}"): ${e.message}`)}return"UNKNOWN_ASSET_TYPE"}SE(t,e){return e&&csString.prototype.endsWith.call(t,".css")||!1}RE(t,e){return`${t}#${e}`}}class Fp{constructor(){this.bE=52428800,this.TE=31457280,this.IE=0,this.PE=!1,this.VE=new Map,this.Ya=[]}async getAssetContent(t){const e=this.VE.get(t);return e||new Promise(((e,s)=>{csArray.prototype.push.call(this.Ya,{assetUrl:t,successCallback:e,errorCallback:s}),this.PE||this.CE()}))}async CE(){for(this.PE=!0;this.Ya.length>0;){const{assetUrl:t,successCallback:e,errorCallback:s}=csArray.prototype.shift.call(this.Ya),i=this.VE.get(t);if(i)e(i);else try{const i=(await this.jE("GET",t,"blob")).target;if(200===i.status){const n=i.getResponseHeader("Content-Type"),r=Number(i.getResponseHeader("Content-Length"));if(r&&Number(r)>this.TE){s(`asset is too big, size = ${r} bytes`);continue}const o=new csFileReader;o.onload=()=>{const s={data:csString.prototype.split.call(o.result,"base64,")[1],mimeType:null!=n?n:""};this.IE+=r,this.IE>this.bE&&(this.IE=0,this.VE.clear()),this.VE.set(t,s),e(s)},o.onerror=()=>{s("Error converting XHR response to base64")},o.readAsDataURL(i.response)}else s(`error downloading ${t}: ${i.statusText}`)}catch(e){const i=`Error downloading resource ${t}: ${e.message}`;s(i)}}this.PE=!1}jE(t,e,s){return new Promise((function(i,n){const r=new XMLHttpRequest;r.open(t,e),r.responseType=s,r.onload=i,r.onerror=n,r.send()}))}}class Hp{constructor(t,e){this.Ic=t,this.ph=e}addUrlMaskingPattern(t){this.Ic.addUrlMaskingPattern(t)}anonymize(t){const e=this.ph.removeQueryString(t.url);return{...t,url:this.ph.anonymizeUrl(e,this.Ic.getUrlMaskingPatterns(),this.Ic.getPartialUrlMaskingPatterns()),library:t.library?this.ph.anonymizeUrl(t.library,this.Ic.getUrlMaskingPatterns(),this.Ic.getPartialUrlMaskingPatterns()):void 0}}}class Bp{constructor(t,e){this.by=t,this.Zy=e,this.kE=new Qn}OE(){const t=new Set;ct(document,NodeFilter.SHOW_ELEMENT).visitAll((e=>{t.has(e)||(this.kE.scanElement(e),t.add(e))}))}handleCommand(t){const e=t&&t.withAssets,s=[],i=new Set,n=new Set,r=[];e&&yp.isWebViewLocalAssetsSupported()?(this.kE.onScannedAsset((({type:t,asset:e})=>{"stylesheet"!==t||n.has(e.assetId)||(n.add(e.assetId),csArray.prototype.push.call(r,e)),i.has(e.assetId)||(i.add(e.assetId),csArray.prototype.push.call(s,e))})),this.OE()):yp.isWebViewLocalAssetsSupported()||se.warn("Local asset is not supported on this browser");const o=function(){sf();return tf(function(t,e){let s;return In({...e,async:!1})(t,(t=>s=t)),s}(document))}(),h=csJSON.stringify(o);if(e){const t=Ec.generate();return this.NE(s,r,t),csJSON.stringify({serializedDom:h,serializationId:t})}return h}NE(t,e,s){0===e.length?this.Yy(t,s):this.xE(t,e,s,((t,e)=>this.Yy(t,e)))}xE(t,e,s,i){let n=0,r=0;const o=new Set(csArray.prototype.map.call(t,(t=>t.assetId))),h=t=>!o.has(t),a=s=>{o.has(s.assetId)||(o.add(s.assetId),csArray.prototype.push.call(e,s),csArray.prototype.push.call(t,s))},c=h=>{for(const e of h)o.has(e.assetId)||(o.add(e.assetId),csArray.prototype.push.call(t,e));n++,n+r===e.length&&i(t,s)},u=o=>{r++,se.error("An error occurred while fetching a styleSheet: "+o),n+r===e.length&&i(t,s)};csArray.prototype.forEach.call(e,(t=>{this.Zy.getStyleSheetAssets(t.assetId,c,u,h,a)}))}Yy(t,e){this.by.sendToParent(is.Assets,{assets:t,serializationId:e})}}class zp{constructor(t){this.Rt=t,this.$E=null}isSdkTrackingContext(t){return y(t)&&p(t)&&g(t.sessionKey)&&v(t.pageNumber)&&g(t.pageViewType)&&m(t.isRecording)}update(t){if(!this.isSdkTrackingContext(t))return se.warn(`webViewTrackingContext.service received wrong sdkTrackingContext, content:${csJSON.stringify(t)}`),void(this.$E=null);this.$E={...t,recordingConsentState:Co.NOT_NEEDED,projectId:this.Rt.projectId,uxaDomain:this.Rt.uxaDomain,...this.Rt.smbConfig}}getTrackingContext(){return this.$E}}class qp{constructor(t){this.ME=t,this.Jc=[]}handleCommand(t){if(!A(t))return;this.Yc(t);const e=this.ME.getTrackingContext();null!==e&&this.Qc(t,e)}executeRegisteredCallbacks(t){const e=t.trackingContext;e&&csArray.prototype.map.call(this.Jc,(t=>this.Qc(t,e)))}Yc(t){csArray.prototype.push.call(this.Jc,t)}Qc(t,e){csSetTimeout((()=>{t(e)}))}}class Gp{constructor(t,e){this.su=t,this.ME=e}onIframeIntegrationCallback(t){const e=this.ME.getTrackingContext();null!==e&&(t.trackingContext=e,this.su.sendToChildren(is.IntegrationCallback,t))}}class Wp{constructor(t){this.commandsService=t,this.au=new Uo}registerChildCommands(){this.commandsService.register(Bo,(t=>this.au.handleCommand(t,this.LE)))}onParentRecordingContextChange(t){this.LE={isRecording:t.isRecording,recordingStartTimestamp:t.recordingStartTimestamp||0,etrState:t.etrState||_i.ETR_OFF},this.au.executeCallbacks(this.LE)}}cs([Do()],Wp.prototype,"onParentRecordingContextChange",null);const Zp=["serializeWebView","webview:serializeWebView"],Jp=["setAssetTransformerMode","webview:setAssetTransformerMode"],Yp=["webview:onAfterScreenView"];class Qp extends Wp{constructor(t,e,s,i,n,r,o){super(t),this.commandsService=t,this.by=e,this.su=s,this.lE=i,this.DE=n,this.ru=r,this.Rt=o}init(){this.ME=new zp(this.Rt),this.UE=new Gp(this.su,this.ME),this.ru.addListener(this.UE),this.FE=new qp(this.ME);const t=new Ip(new Pp);this.HE=new Bp(this.by,t),this.tv()}onAfterPageViewCallback(t){this.FE.executeRegisteredCallbacks(t)}tv(){super.registerChildCommands(),this.commandsService.register(Fo,(t=>{this.FE.handleCommand(t)})),this.commandsService.register(Yp,(t=>{this.ME.update(t);const e=this.ME.getTrackingContext();null!==e&&this.DE.emitAfterPageViewCallback({initiator:es.AfterPageView,trackingContext:e})})),this.commandsService.register(Zp,(t=>this.HE.handleCommand(t))),this.commandsService.register(Jp,(t=>{t!==Mp&&t!==Lp&&t!==Dp||this.lE.setAssetProcessingMode(t)}))}}class Kp{constructor(t){this.by=t,this.Jc={}}handleCommand(t){A(t)&&this.Yc(t)}executeRegisteredCallbacks(t){const e=t.trackingContext;if(e)if(t.callbackId){const s=this.Jc[t.callbackId];s&&this.Qc(s,e)}else for(const t in this.Jc)this.Qc(this.Jc[t],e)}Yc(t){const e=Qt.integer(),s={callbackId:e,initiator:es.AfterPageView};this.Jc[e]=t,this.by.sendToParent(is.IntegrationCallback,s)}Qc(t,e){csSetTimeout((()=>{t(e)}))}}class Xp{constructor(t){this.by=t,this.Kc={}}handleCommand(t){p(t)&&A(t.callback)&&this.tu(t.callback)}executePendingCallbacks(t){const{trackingContext:e,callbackId:s}=t;if(!s||!e)return;const i=this.Kc[s];i&&(delete this.Kc[s],this.Qc(i,e.sessionKey))}tu(t){const e=Qt.integer(),s={callbackId:e,initiator:es.GetSessionKey};this.Kc[e]=t,this.by.sendToParent(is.IntegrationCallback,s)}Qc(t,e){csSetTimeout((()=>{t(e)}))}}class tw{constructor(t,e){this.by=t,this.su=e,this.BE={}}handleCommand(t,e){p(t)&&A(e)&&this.tu(t,e)}executePendingCommand(t){const{trackingContext:e,callbackId:s}=t;if(s&&e)if(this.BE[s]){const[t,i]=this.BE[s];t&&(delete this.BE[s],this.Qc(e,t,i))}else this.su.sendToChildren(is.TrackingContextResultMessage,t)}tu(t,e){const s=Qt.integer();this.BE[s]=[t,e],this.by.sendToParent(is.TrackingContextRequestMessage,{callbackId:s})}Qc(t,e,s){csSetTimeout((()=>{const i=$o(t,e);s(i)}))}}class ew extends Wp{constructor(t,e,s){super(t),this.commandsService=t,this.by=e,this.su=s}init(){this.zE=new Kp(this.by),this.qE=new Xp(this.by),this.GE=new tw(this.by,this.su),this.tv()}onAfterPageViewCallback(t){this.zE.executeRegisteredCallbacks(t)}onIntegrationSessionKeyCallback(t){this.qE.executePendingCallbacks(t)}onTrackingContextResultCallback(t){this.GE.executePendingCommand(t)}tv(){super.registerChildCommands(),this.commandsService.register(Fo,(t=>{this.zE.handleCommand(t)})),this.commandsService.register(Ho,(t=>this.qE.handleCommand(t))),this.commandsService.register(zo,((t,e)=>{this.GE.handleCommand(t,e)}))}}class sw{constructor(t,e,s,i,n,r,o){this.bc=t,this.cv=e,this.Tc=s,this.uv=i,this.an=n,this.WE=r,this.zv=o}init(){var t,e;this.WE&&this.an&&(null===(t=this.WE)||void 0===t||t.addSelector(null===(e=this.an)||void 0===e?void 0:e.getEncryptionSelectors())),this.tv(),this.Hv=new pf(this.Tc,this.cv,this.uv,this.WE,this.zv)}ZE(){this.Hv.start()}Zi(){this.Hv.stop()}onParentSensitiveStatusChange(t){var e,s;t.maskedElementSettings&&this.cv.setMaskedElementSettingsFromParent(t.maskedElementSettings),t.capturedElementSelector&&this.uv.setWhitelistedElementsSelector(t.capturedElementSelector,!1),t.encryptionSelectors&&(null===(e=this.WE)||void 0===e||e.addSelector(t.encryptionSelectors),null===(s=this.an)||void 0===s||s.setEncryptionSelectors(t.encryptionSelectors,!1)),t.started?this.ZE():this.Zi()}tv(){this.bc.register(gf,(t=>{this.uv.setWhitelistedElementsSelector(t)})),this.bc.register(vf,(t=>{this.cv.setMaskedElementSettingsFromCommand(t)})),this.bc.register(ff,(t=>{var e,s;null===(e=this.an)||void 0===e||e.setEncryptionSelectors(t),null===(s=this.WE)||void 0===s||s.addSelector(t)}))}}class iw{constructor(t,e,s,i,n,r,o,h){this.oc=t,this.bc=e,this.cv=s,this.Tc=i,this.kc=n,this.uv=r,this.Cy=o,this.zv=h,this.Hv=new pf(this.Tc,this.cv,this.uv,void 0,this.zv,this.kc)}init(){this.kc.init(),this.tv()}onStartAnalytics(){this.vg()}onAfterArtificialPageView(){this.JE(),this.vg()}onStopAnalytics(){this.JE()}vg(){this.Hv.start(),this.Cy.setSensitiveStatus({started:!0,useAnonymization:this.kc.shouldUseAnonymization()}),this.oc.emitSensitiveStatusChange()}JE(){this.Hv.stop(),this.Cy.setSensitiveStatus({started:!1,useAnonymization:this.kc.shouldUseAnonymization()}),this.oc.emitSensitiveStatusChange()}tv(){this.bc.register(gf,(t=>{this.uv.setWhitelistedElementsSelector(t),this.oc.emitSensitiveStatusChange()})),this.bc.register(vf,(t=>{this.cv.setMaskedElementSettingsFromCommand(t),this.oc.emitSensitiveStatusChange()}))}}const nw=/(\b["']?key["']?\s*[=:]\s*["'](?:first|last|user|profile|primary|primary[ _-]?last)[ _-]?name["']\s*,?\s*["']?value["']?\s*[=:]\s*["'])(.+?)(["']|…$)|(\b["']?(?:first|last|user|profile|primary|primary[ _-]?last)[\s_-]?name["']?\s*[=:]\s*["'])(.+?)(["']|…$)/gi,rw=/(?:\(\d{3}\) \d{3}[- ]\d{4}\b)|(?:\b\d{3}([-\. ])\d{3}\1\d{4}\b)|(?:\b\d{2} \d{2} \d{2} \d{2} \d{2}\b)|(?:\b\d{4} \d{3} \d{3}\b)|(?:\b\d{2}([-\. ])\d{4}\2\d{4}\b)|(?:\b\d{3}([- ])\d{4}\3\d{4}\b)|(?:\+\d{1,3} \d{3} \d{3} \d{4}\b)|(?:\+\d{1,3} \(\d{3}\) \d{3}-\d{4}\b)|(?:\+\d{1,3}([- ])\d{4}\4\d{3}\4\d{3}\b)|(?:\+\d{1,3} \d \d{4} \d{4}\b)|(?:\+\d{1,3} \d \d{3} \d{3} \d{4}\b)|(?:\+\d{1,3} \d \d{2} \d{2} \d{2} \d{2}\b)|(?:\+\d{7,15}\b)|(?:\+\d{1,3} \d{6,12}\b)|(?:\+\d{1,3}([- ])\d{4}\5\d{3}\5\d{3}\b)/g;class ow{constructor(t){this.bt=t}anonymize(t){return t=this.bt.anonymizePII(t),t=this.YE(t),t=this.QE(t)}YE(t){return csString.prototype.replace.call(t,nw,"$1$4CS_ANONYMIZED_NAME$3$6")}QE(t){return csString.prototype.replace.call(t,rw,"CS_ANONYMIZED_PHONE")}}class hw{constructor(t,e,s,i,n,r,o,h,a){this.Ly=t,this.oc=e,this.Rt=s,this.by=i,this.Vy=n,this.bc=r,this.Jt=o,this.Gr=h,this.Cy=a,this.lg=()=>{this.bc.start(),this.ug.start()}}start(){let t,e,s,i,n,r,o,h,a,c,u,l,d,f;this.Gr.schedule((()=>{if(n=new Gm,r=new rf((()=>{})),l=new of,f=new hf,this.Jt.isInIframeContext()){const t=new sw(this.bc,n,r,l,d,undefined,f);t.init(),this.Ly.addListener(t)}if(s=new Pe,c=new zv(s),u=new yv(window.location,c),this.Jt.isInWebViewContext()){const t=new wp(this.Rt),e=new Xd,s=new Kd(t,this.Rt,u,e),i=new iw(this.oc,this.bc,n,r,s,l,this.Cy);i.init(),this.Ly.addListener(i)}})),this.Gr.schedule((()=>{t=new Gv(zt,this.Rt),e=new Ha(t),i=new mp(this.Rt,t,e,this.by,this.Jt,this.Ly,this.bc,new fc(se),this.Cy),this.Ly.addListener(i)})),pc.isRecordingSupported()&&this.Gr.schedule((()=>{const t=new Vp(this.Rt,s,r,this.oc,this.by,this.Vy,this.bc,this.Ly,this.Jt,u,this.Cy,c,d);this.oc.addListener(t),this.Ly.addListener(t),t.init()})),this.Gr.schedule((()=>{a=new lc(this.Rt);const e=new Wv(t),s=new Zv(t),i=new Jv(t),n=new Yv;h=new Sv(e,s,i,n),o=new dp(a,h,this.by,this.Vy,this.Cy)})),this.Gr.schedule((()=>{h.addListener(o),this.Ly.addListener(o),this.oc.addListener(o),this.oc.addListener(i)})),this.Gr.schedule((()=>{let t;if(this.Jt.isInWebViewContext()){const e=new Fp;this.lE=new Up(e),t=new Qp(this.bc,this.by,a,this.lE,this.Ly,h,this.Rt)}else t=new ew(this.bc,this.by,a);this.Ly.addListener(t),t.init()})),this.Gr.schedule((()=>{o.init(),i.init()})),this.Gr.schedule((()=>{if(this.Jt.isInWebViewContext()){const t=new jp,e=new xp(s,u),i=new Na,n=new Hp(i,c),r=new ow(s),o=new kp(u,e,n,r),h=new Np(s,new Xo(s,null,null),t,o,this.lE,this.oc,u,i),a=new Cp(this.by,h);a.init(),this.oc.addListener(a),this.Ly.addListener(a)}else{const t=new lp(this.by);this.oc.addListener(t)}})),this.ug=new Ba,this.Gr.schedule((()=>{this.ug.onLoad((()=>{this.oc.emitStartTracking()})),this.lg()}))}}class aw extends cp{constructor(t,e,s=500){super(2500),this.Ly=t,this.Rt=e,this.KE=s,this.XE=!1,this.tA=void 0,this.eA=!0}onStart(){this.sA()}onStop(){this.buffer.reset(),this.iA&&window.csClearInterval(this.iA)}sendToParent(t,e){var s;if(this.nA())null===(s=this.rA)||void 0===s||s.call(this,t,e);else if(this.oA(t)){const s=this.buildChildBaseMessage(t,e);this.buffer.addMessage(s)}}nA(){return this.XE&&this.eA}oA(t){return!this.XE||t===is.Commands}onWebViewEvent(t){this.rA=t}setAnalyticsStatus(t){this.eA=t,this.eA&&this.hA()}sendAllMessagesFromBuffer(){var t;const e=this.buffer.getMessages();for(const s of e)null===(t=this.rA)||void 0===t||t.call(this,s.type,s.content);this.buffer.reset()}hA(){var t;if(!this.XE)return;const e=this.buffer.getMessages();for(const s of e)s.type===is.Commands&&(null===(t=this.rA)||void 0===t||t.call(this,s.type,s.content));this.buffer.reset()}buildChildBaseMessage(t,e){return{type:t,content:e}}sA(){this.XE=Op.isCSJavascriptBridgeDefined(),this.XE?this.aA():this.iA=window.csSetInterval((()=>{this.XE=Op.isCSJavascriptBridgeDefined(),this.XE&&(this.aA(),window.csClearInterval(this.iA))}),this.KE)}aA(){this.cA(),this.tA=Op.getBridgeVersion(),null===this.tA?this.sendAllMessagesFromBuffer():this.tA>=2?(this.uA(),Op.notifyIsReadyForTracking()):se.warn(`bridge version ${this.tA} is not supported`)}cA(){const t={message:csJSON.stringify(this.Rt),errorCode:"TAG_CONFIGURATION",level:te.critical};Op.sendLog(t)}uA(){this.Ly.emitStopAnalytics()}}class cw{constructor(){this.LE=null}getRecordingContext(){return null===this.LE?{isRecording:!1}:this.LE}setRecordingContext(t){this.LE=t}}class uw{constructor(){this.lA={started:!1,useAnonymization:!0}}getSensitiveStatus(){return this.lA}setSensitiveStatus(t){this.lA=t}getElementSensitiveStatus(t){return this.lA.started?ii.isMaskedElement(t)||ii.isMaskedElementChild(t)?ya.MASKED:Pr.shouldEncrypt(t)?ya.ENCRYPTED:Vr.isEditableNode(t)?ya.ANONYMIZED:this.lA.useAnonymization?rr.isWhitelistedElement(t)?ya.CAPTURED:ya.ANONYMIZED:ya.CAPTURED:ya.ANONYMIZED}}class lw{constructor(t,e,s){this.Rt=t,this.Jt=e,this.Gr=s}init(){let t,e,s,i,n,r,o,h,a;ic.isSupported()&&ic.setDigestSalt(this.Rt.projectId.toString()),this.Gr.schedule((()=>{t=new tp(this.Gr),e=new Xm,s=new cw,i=new uw;const o=[lv.UXA];this.Jt.isInWebViewContext()?(window.cs_wvt=window.cs_wvt||[],csArray.prototype.push.call(o,lv.WVT),n=new aw(e,this.Rt)):n=new up(this.Rt,t,s,i,e),r=new fv(o)})),this.Gr.schedule((()=>{o=new hp(r,n),h=new op(o)})),this.Gr.schedule((()=>{h.init()})),this.Gr.schedule((()=>{this.Rt.implementations&&(a=new Fm(this.Rt.implementations,r,this.Gr),a.init(),t.addListener(a))})),this.Gr.schedule((()=>{})),this.Gr.schedule((()=>{t.addListener(h)})),this.Gr.schedule((()=>{t.emitInitTracking()})),this.Gr.schedule((()=>{new hw(e,t,this.Rt,n,s,r,this.Jt,this.Gr,i).start()}))}}class dw{constructor(t,e,s){this.Rt=t,this.Jt=e,this.Tt=s}start(){var t,e,s,i,n;if(window.UXAnalytics)return;window.UXAnalytics={};const r=new tr(!!(null===(t=this.Rt.taskSchedulerOptions)||void 0===t?void 0:t.enabled),null===(e=this.Rt.taskSchedulerOptions)||void 0===e?void 0:e.maxProcessingTime,null===(s=this.Rt.taskSchedulerOptions)||void 0===s?void 0:s.waitDuration),o=new ws(this.Jt,this.Rt);o.init();const h=new ys(this.Rt,o);if(this.Jt.isTopWindowTracker()&&h.canTrack()){if((null===(i=window.CSProtectnativeFunctionsLogs)||void 0===i?void 0:i.Warning)&&se.warn(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Warning}`),null===(n=window.CSProtectnativeFunctionsLogs)||void 0===n?void 0:n.Critical)return void se.error(`protectNativeFunctions failed: ${window.CSProtectnativeFunctionsLogs.Critical}`);ls();const t=new tp(r),e=new Jm(this.Rt,o,this.Tt,r,t);this.Rt.isQuotaEnabled()?e.initWithQuota():e.init()}else if(!this.Jt.isTopWindowTracker()&&h.canTrackInChild()){new lw(this.Rt,this.Jt,r).init()}const a=csString.prototype.indexOf.call(window.location.href,"csDebug=1")>-1;window.UXAnalytics={Sensitive:{isNodeSensitive:t=>ii.isMaskedElement(t)||ii.isMaskedElementChild(t),isAttributeSensitive:(t,e)=>ii.isMaskedAttribute(t,e),getSensitiveAttributes:t=>Dt(t.attributes,(e=>ii.isMaskedAttribute(t,e.name)))},Console:{warn(t){a&&console.warn("cs.tracking.warning",t)},error(t){a&&console.error("cs.tracking.error",t)}},Version:Ve},!window.CSFrameCommunication&&Km.isActivable()&&(window.CSFrameCommunication=Km,Km.waitForConnection())}}cs([Pt("main.start"),gt("main.start")],dw.prototype,"start",null);class fw{constructor(){}send(t,e,s=te.warn){const i={message:t,errorCode:e,level:s};Op.sendLog(i)}}class vw{constructor(t,e,s){this.dA=t,this.fA=e,this.vA=s,this.gA=!1,this.mA=!1,this.pA=[],this.push=t=>{try{if(!this.gA)return csArray.prototype.push.call(this.pA,t),this.wA();this.yA&&(this.yA.setLevel(t.level),this.yA.captureException(t.error))}catch{}},this.EA=()=>{try{this.gA=!0,this.AA(),this.yA=this.fA(),this.Xa()}catch{}},this._A=()=>{try{this.AA(),this.vA&&this.vA()}catch{}},this.AA=()=>{try{this.mA=!1,this.SA&&(this.SA.removeEventListener("abort",this.AA),this.SA.removeEventListener("error",this.AA))}catch{}},this.Xa=()=>{var t;for(let e=0;e{var t;this.gA||this.mA||(this.mA=!0,this.SA=document.createElement("script"),this.SA.src=this.dA,this.SA.crossOrigin="anonymous",this.SA.addEventListener("load",this.EA,{once:!0,passive:!0}),this.SA.addEventListener("abort",this._A),this.SA.addEventListener("error",this._A),null===(t=document.getElementsByTagName("head")[0])||void 0===t||t.appendChild(this.SA))}}}const gw={[te.debug]:"debug",[te.warn]:"warning",[te.implementation]:"log",[te.error]:"error",[te.critical]:"fatal"};class mw{constructor(t,e,s){this.Rt=t,this.Tt=e,this.RA=s,this.bt=new Pe,this.bA=0,this.fA=()=>{if(window.UXAnalytics.Sentry)try{const t=this.Rt.environment,e=window.UXAnalytics.Sentry.init({dsn:this.Rt.getSentryDSNUri(),environment:t,sampleRate:1,release:`csq-lite-tag-${Ve}${"production"===t?"":`-${t}`}`,dist:t,beforeSend:t=>({...t,message:this.bt.anonymizePII(t.message||"")})});return e.setContext("user",this.Ot()),e}catch(t){return void this.RA.send(`Error initializing Sentry: ${t}`,"",te.error)}},this.vA=()=>{this.RA.send("Sentry failed to load","",te.error)},this.TA=new vw(this.Rt.getSentryFileUri(),this.fA,this.vA)}Ot(){const t=this.Tt.getVisitorService(),e=null==t?void 0:t.getVisitor(),s=this.Tt.getSessionService(),i=null==s?void 0:s.getSession();return{projectId:this.Rt.projectId,visitorId:null==e?void 0:e.id,sessionNumber:null==e?void 0:e.visitsCount,pageNumber:null==i?void 0:i.pageNumber}}IA(t){return this.bA<5&&csArray.prototype.indexOf.call(["error","critical"],t)>-1}send(t,e="",s=te.warn){if(this.IA(s))return this.bA++,this.TA.push({error:"string"==typeof t?new Error(t):t,level:gw[s],code:e});this.RA.send(t,e,s)}}class pw{constructor(t,e,s){this.cn=t,this.bt=e,this.PA=s,this.Ya=[],this.vt=null,this.VA=Ce().v}CA(){0!==this.Ya.length&&(this.cn.send({m:csArray.prototype.map.call(this.Ya,(t=>({n:t.name,p:t.parameter,v:t.value}))),p:this.bt.anonymizePII(window.location.pathname),pid:this.PA,v:this.VA}),this.Ya=[])}push(t){csArray.prototype.push.call(this.Ya,...t),this.vt&&(csClearTimeout(this.vt),this.vt=null),this.Ya.length>=pw.MAX_QUEUE_SIZE?this.CA():this.vt=window.csSetTimeout((()=>{this.CA(),this.vt=null}),pw.DEBOUNCE_INTERVAL)}}function ww(){var t;const e=new he(window.CS_CONF);window._uxa=window._uxa||[],e.processOptionOverrides(window._uxa);const s=new ae(window,e);s.init();const i=new os;if(vt=se,hs=!0,se.computeIsActive(e.validationRate),s.isTopWindowTracker()){const s=new qe(e,i),n=(null===(t=e.smbConfig)||void 0===t?void 0:t.useSentry)?new mw(e,i,s):s;se.setStrategy(n)}else if(s.isInIframeContext()){const t=new rs(e);se.setStrategy(t)}else if(s.isInWebViewContext()){const t=new fw;se.setStrategy(t)}_t(),function(t,e){const s=t.validationRate/10,i=Qt.boolean(s);if(("staging"===t.environment||i)&&!e.isInWebViewContext())try{const s=Cv.create(se.warn,e.isTopWindowTracker()),i=new bs(s).create(t.getMetricsUri(),!0),n=new Pe,r=new pw(i,n,t.projectId);me.setService(r)}catch(t){se.warn(`Error initializing metrics: ${t.message}`)}}(e,s);new dw(e,s,i).start()}pw.DEBOUNCE_INTERVAL=5e3,pw.MAX_QUEUE_SIZE=100,window.CSCurrentScript=document.currentScript,csSetTimeout((()=>{try{t=ww,(null===document||void 0===document?void 0:document.prerendering)?document.addEventListener("prerenderingchange",t,{once:!0}):t()}catch{}var t}))})(); //# sourceMappingURL=/uxa/smb/tag.js.map //# debugId=0ebe40f8-c8ed-5b25-aeff-d6d14370b353 var CS_CONF={"isSMB":true,"status":1,"visitorCookieTimeout":33164000000,"sampleRate":100,"replayRecordingRate":100,"validationRate":10,"trackerDomain":"c.ba.contentsquare.net","recordingDomain":"r.contentsquare.net","useMalkaPipeline":1,"ed":"l.contentsquare.net/log/web","eMerchandisingEnabled":0,"mouseMoveHeatmapEnabled":1,"autoInsightsEnabled":0,"customHashIdEnabled":0,"recordingEncryptionEnabled":0,"recordingEncryptionPublicKey":null,"recordingEncryptionPublicKeyId":0,"secureCookiesEnabled":1,"triggerSessionReplayEnabled":0,"dynamicIdRegex":"","replayRecordingUnmaskedUrlRegex":"","replayRecordingMaskedUrlRegexRules":[],"replayRecordingMaskedUrlRegex":null,"tagDeploymentMode":"CONTENTSQUARE","iframesTracking":1,"textVisibilityEnabled":0,"cookielessTrackingEnabled":0,"malkaUrlEnabled":0,"malkaEtrEnabled":0,"pathComputationRules":{"reliableSelectors":[],"uniqueAttributes":[],"uniqueCssSelectors":[]},"asyncSerializerEnabled":1,"pendingInactivityTimeout":5000,"accessibilityEnabled":null,"uxaDomain":"app.contentsquare.com","webviewsTrackingEnabled":0,"useStaticResourceManager":0,"performanceTimingOptions":{"withResource":false,"withNavigation":false},"replayConsentRequiredForSession":0,"eventsApiEnabled":1,"smbConfig":{"useCSTC":true,"useSentry":true},"malkaQuotaServiceDomain":"q.ba.contentsquare.net","malkaRecordingDomain":"k.ba.contentsquare.net","voc":{"siteId":0,"enabled":1},"dynamicConfDomain":"t.contentsquare.net/settings","tagDomain":"t.contentsquare.net"}; if(window.CS_CONF_BASE) for(let p in CS_CONF_BASE) CS_CONF[p] = CS_CONF_BASE[p];