!function(){"use strict";const e="See https://go/pem/degradation-tracking-user-guide for instrumentation instructions",t="x-li-pop",n="x-msedge-ref";class r extends class{constructor(e,t,n){this._collectedFeatureMetrics=e,this._fireEventCallback=t,n(this.produceMetricEvent.bind(this),6e4)}}{produceMetricEvent(){this._collectedFeatureMetrics.flushMetrics().forEach((e=>{const t=[];e.featureCallCounts.forEach((e=>{t.push({featureProductName:e.featureMetricIdentifier.productName,featureKey:e.featureMetricIdentifier.featureKey,degradedDownstreamCallCount:e.failedApiCallCount,totalDownstreamCallCount:e.successfulApiCallCount+e.failedApiCallCount,pointOfPresenceId:e.featureMetricIdentifier.pointOfPresenceId,responseErrorType:e.featureMetricIdentifier.responseErrorType})}));const n={header:{},requestHeader:{},time:Date.now(),metrics:t};this._fireEventCallback("FeatureDegradationMetricEvent",n,e.pageInstance)}))}}function i(e){return JSON.stringify(e,Object.keys(e).sort())}class o extends class{constructor(e){this._featureCallCounts=new Map,this._pageInstance=e}get pageInstance(){return this._pageInstance}get featureCallCounts(){return this._featureCallCounts}}{trackSuccessfulFeatureApiCall(e){this.trackMetric(e,(e=>e.successfulApiCallCount++))}trackFailedFeatureApiCall(e){this.trackMetric(e,(e=>e.failedApiCallCount++))}trackMetric(e,t){const n=i(e);if(this.featureCallCounts.has(n))t(this.featureCallCounts.get(n));else{const r=new a(e);t(r),this.featureCallCounts.set(n,r)}}}class a extends class{constructor(e){this.featureMetricIdentifier=e}}{constructor(){super(...arguments),this.successfulApiCallCount=0,this.failedApiCallCount=0}}class s extends class{flushMetrics(){const e=[...this.metrics.values()];return this.metrics=new Map,e}}{constructor(){super(...arguments),this.metrics=new Map}incrementSuccessfulFeatureApiCall(e,t){this.incrementMetric(t,(t=>t.trackSuccessfulFeatureApiCall(e)))}incrementFailedFeatureApiCall(e,t){this.incrementMetric(t,(t=>t.trackFailedFeatureApiCall(e)))}incrementMetric(e,t){const n=i(e);if(this.metrics.has(n))t(this.metrics.get(n));else{const r=new o(e);t(r),this.metrics.set(n,r)}}}function c(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}var u;!function(e){e.ProductName="productName",e.UntrackedResponseCodes="untrackedResponseCodes",e.TrackedResponseCodes="trackedResponseCodes",e.ClientSensorGroupName="clientSensorGroupName"}(u||(u={}));const l=new Set(Object.values(u));class d extends Error{constructor(e){super(e),Object.setPrototypeOf(this,d.prototype)}}function h(e){return 0===e.length||!e.trim()}function f(t){if("string"!=typeof t)throw new d("The product name must be a string. ".concat(e,"."));if(h(t))throw new d("No product name was specified. Please configure a defaultProductName or specify it per instrumented API "+"call. ".concat(e,"."));return t}function p(t){if("string"!=typeof t)throw new d("Keys must be strings. ".concat(e,"."));if(h(t))throw new d("Keys should not be blank. ".concat(e,"."));if(/[^a-z0-9-]/.test(t))throw new d("'".concat(t,"' can only contain lowercase alphanumeric characters and dashes (-). ").concat(e,"."));return t}class g{constructor(t,n,r){if(this._featureKey=p(t),this._degradationKey=p(n),!r)return this._untrackedResponseCodes=[],void(this._trackedResponseCodes=[]);if("object"!=typeof r)throw new d("DegradationTrackingMetadata options should be an object. ".concat(e,"."));const i=r.productName;i&&(this._productName=f(i));const o=r.untrackedResponseCodes,a=r.trackedResponseCodes;if(o&&a)throw new d("You may only specify one of the options: ".concat(u.UntrackedResponseCodes," or ")+"".concat(u.TrackedResponseCodes," to exclude or include response codes from counting ")+"as the degraded state. ".concat(e,"."));!function(t,n){const r=(t,n)=>{if(!c(t)||t<=0||t>999)throw new d("Please only specify positive integer response codes between 1 and 999 for the ".concat(n," option. ")+"".concat(t," was specified. ").concat(e,"."));if(429===t||999===t)throw new d("PEM does not consider 429 and 999 API responses indications of the real member experience because it represents LinkedIn throttling abusive requests. We drop 429s and 999s by default, so please remove them "+"from your ".concat(n," options."));if(n===u.UntrackedResponseCodes&&(t<500||t>=600))throw new d("For server responses that have a status code, PEM does not consider non-5xx as degradations by default "+"anymore. ".concat(t," is not considered a degradation unless you explicitly add it to the ")+"".concat(u.TrackedResponseCodes," option. Please remove ").concat(t," from the ")+"".concat(u.UntrackedResponseCodes," option. ").concat(e,"."))};if(void 0!==t&&!Array.isArray(t))throw new d("Please specify an array of positive integer response codes between 1 and 999 for the response codes that "+"shouldn't be counted as degraded for the ".concat(u.UntrackedResponseCodes," option. ")+"".concat(e,"."));if(void 0!==n&&!Array.isArray(n))throw new d("Please specify an array of positive integer response codes between 1 and 999 for the response codes that should only be considered as the degraded state(s) for the "+"".concat(u.TrackedResponseCodes," option. ").concat(e,"."));t&&t.forEach((e=>r(e,u.UntrackedResponseCodes)));n&&n.forEach((e=>r(e,u.TrackedResponseCodes)))}(o,a),this._untrackedResponseCodes=o||[],this._trackedResponseCodes=a||[],this._clientSensorGroupName=r.clientSensorGroupName,function(t){Object.keys(t).forEach((t=>{if(!l.has(t))throw new d("An unsupported degradation tracking option '".concat(t,"' was provided. Please fix or remove it. ")+"".concat(e))}))}(r)}static isDegradationTrackingMetadata(e){return null!=e&&Object.getOwnPropertyNames(g.prototype).every((t=>Object.hasOwnProperty.call(Object.getPrototypeOf(e),t)))}get featureKey(){return this._featureKey}get degradationKey(){return this._degradationKey}get productName(){return this._productName}get untrackedResponseCodes(){return this._untrackedResponseCodes}get trackedResponseCodes(){return this._trackedResponseCodes}get clientSensorGroupName(){return this._clientSensorGroupName}}function m(e,t){if(!e.includes("/"))return e;const n=function(e){const t=document.createElement("a");return t.href=e,t.pathname}(e),r=n.split("/").filter((e=>e.length));if(!t.length)return r.join("/");const i=[];for(let e=r.length-1;e>=0;e--){const n=r[e],o=t.indexOf(n);o>=0?t.splice(o,1):i.push(n)}return i.reverse().join("/")}function v(e,r){if(e instanceof Error){if("AbortError"===e.name)return"CLIENT_ABORTED";if(e instanceof TypeError&&(e.message.indexOf("Network request failed")>=0||e.message.indexOf("NetworkError when attempting to fetch resource")>=0||e.message.indexOf("Failed to fetch")>=0))return"NETWORK_ERROR"}else{if("timeout"===e.statusText)return"CLIENT_TIMEOUT";if(0===e.status&&"abort"===e.statusText)return"CLIENT_ABORTED";if((i=e.status)>=500&&i<600)return function(e){if(e){if(e.has("x-li-fabric"))return"SERVER_ERROR";if(e.has(t))return"TRAFFIC_L0_TO_L1_ERROR";if(e.has(n))return"TRAFFIC_AFD_TO_L0_ERROR"}return"SERVER_ERROR"}(r);if("readyState"in e&&0===e.readyState)return"NETWORK_ERROR"}var i;return"UNCLASSIFIED"}var y;!function(e){e.ProductName="productName",e.CustomTrackingId="customTrackingId",e.ClientSensorGroupName="clientSensorGroupName",e.AdditionalDegradedResponseCodes="additionalDegradedResponseCodes",e.NonDegradedResponseCodes="nonDegradedResponseCodes",e.DegradationKeyOverrides="degradationKeyOverrides"}(y||(y={}));const b=new Set(Object.values(y));class w{constructor(t,n,r){if(this._featureKey=p(t),this._defaultDegradationKey=p(n),!r)return this._nonDegradedResponseCodes=new Set,this._additionalDegradedResponseCodes=new Set,void(this._degradationKeyOverrides=[]);if("object"!=typeof r)throw new d("FailureTrackingMetadata options should be an object. ".concat(e,"."));const i=r.additionalDegradedResponseCodes,o=r.nonDegradedResponseCodes;this.validateResponseCodes(i,o),this._nonDegradedResponseCodes=new Set(o),this._additionalDegradedResponseCodes=new Set(i),this._degradationKeyOverrides=r.degradationKeyOverrides||[],this._clientSensorGroupName=r.clientSensorGroupName,this._customTrackingId=r.customTrackingId;const a=r.productName;a&&(this._productName=f(a)),function(t){Object.keys(t).forEach((t=>{if(!b.has(t))throw new d("An unsupported failure tracking option '".concat(t,"' was provided. Please fix or remove it. ")+"".concat(e))}))}(r)}static isFailureTrackingMetadata(e){return null!=e&&Object.getOwnPropertyNames(w.prototype).every((t=>Object.hasOwnProperty.call(Object.getPrototypeOf(e),t)))}get featureKey(){return this._featureKey}get defaultDegradationKey(){return this._defaultDegradationKey}get productName(){return this._productName}get nonDegradedResponseCodes(){return this._nonDegradedResponseCodes}get additionalDegradedResponseCodes(){return this._additionalDegradedResponseCodes}get degradationKeyOverrides(){return this._degradationKeyOverrides}get customTrackingId(){return this._customTrackingId}get clientSensorGroupName(){return this._clientSensorGroupName}validateResponseCodes(t,n){const r=(t,n)=>{if(!c(t)||t<=0||t>999)throw new d("Please only specify positive integer response codes between 1 and 999 for the ".concat(n," option. ")+"".concat(t," was specified. ").concat(e,"."));if(429===t||999===t)throw new d("PEM does not consider 429 and 999 API responses indications of the real member experience because it represents LinkedIn throttling abusive requests. We drop 429s and 999s by default, so please remove them "+"from your ".concat(n," options."));if(n===y.NonDegradedResponseCodes&&(t<500||t>=600))throw new d("For server responses that have a status code, PEM does not consider non-5xx as degradations by default "+"anymore. ".concat(t," is not considered a degradation unless you explicitly add it to the ")+"".concat(y.AdditionalDegradedResponseCodes," option. Please remove ").concat(t," from the ")+"".concat(y.NonDegradedResponseCodes," option. ").concat(e,"."))};if(void 0!==n&&!Array.isArray(n))throw new d("Please specify an array of positive integer response codes between 1 and 999 for the response codes that "+"shouldn't be counted as degraded for the ".concat(y.NonDegradedResponseCodes," option. ")+"".concat(e,"."));if(void 0!==t&&!Array.isArray(t))throw new d("Please specify an array of positive integer response codes between 1 and 999 for the response codes that should also be considered as the degraded state(s) for the "+"".concat(y.AdditionalDegradedResponseCodes," option. ").concat(e,"."));null==n||n.forEach((e=>r(e,y.NonDegradedResponseCodes))),null==t||t.forEach((e=>r(e,y.AdditionalDegradedResponseCodes)));const i=new Set(t),o=new Set(n);if([...i].some((e=>o.has(e))))throw new d("Response codes can't be both degraded and non-degraded. Please ensure that your additionalDegradedResponseCodes and nonDegradedResponseCodes "+"don't have any overlapping response codes. ".concat(e,"."))}}class E{constructor(t,n){if(this._additionalDegradedResponseCodes=new Set,this._degradationKeyByResponseCode=new Map,!g.isDegradationTrackingMetadata(t)&&!w.isFailureTrackingMetadata(t))throw new d("We encountered a bug where we forgot to provide the tracking metadata as an argument. Please report it to the #pem team.");if(!n)throw new d("We encountered a bug where we forgot to provide the product name as an argument. Please report it to the #pem team.");this._featureKey=t.featureKey,this._productName=n,this._clientSensorGroupName=t.clientSensorGroupName,g.isDegradationTrackingMetadata(t)?(this._nonDegradedResponseCodes=new Set(t.untrackedResponseCodes),this.processTrackedResponseCodes(t.trackedResponseCodes,t.degradationKey),t.trackedResponseCodes.length||(this._defaultDegradationKey=t.degradationKey)):(this._nonDegradedResponseCodes=t.nonDegradedResponseCodes,this._defaultDegradationKey=t.defaultDegradationKey,this._customTrackingId=t.customTrackingId,t.additionalDegradedResponseCodes.forEach((t=>{if(this._nonDegradedResponseCodes.has(t))throw new d("You attempted to specify ".concat(t," as an additional degraded response code for the '").concat(this.featureKey,"' feature, ")+"however it is also specified in the non-degraded response codes for that feature. Please decide whether "+"you want to consider ".concat(t," responses a degraded state or not. ").concat(e,"."));this._additionalDegradedResponseCodes.add(t)})),this.initializeDegradationKeyOverrides(t.degradationKeyOverrides))}mergeTrackingMetadata(t){const{untrackedResponseCodes:n,trackedResponseCodes:r,degradationKey:i,featureKey:o}=t;if(n.length){if(this._nonDegradedResponseCodes.size)throw new d("The ".concat(o," has multiple DegradationTrackingMetadata with the ")+"".concat(u.UntrackedResponseCodes," option. Please combine the degradation keys and ")+"the response codes into one tracking metadata instead. ".concat(e,"."));this._nonDegradedResponseCodes=new Set(n)}if(this.processTrackedResponseCodes(t.trackedResponseCodes,i),!r.length){if(this._defaultDegradationKey)throw new d("'".concat(this._defaultDegradationKey,"' has already been set as the degradation key for the '").concat(o,"' ")+"feature, so we can't use '".concat(i,"' as well. Please combine the two degradation tracking ")+"metadata objects together. ".concat(e,"."));this._defaultDegradationKey=i}}getDegradationKey(e){return this._degradationKeyByResponseCode.has(e)?this._degradationKeyByResponseCode.get(e):this._defaultDegradationKey}get featureKey(){return this._featureKey}get productName(){return this._productName}get customTrackingId(){return this._customTrackingId}get clientSensorGroupName(){return this._clientSensorGroupName}isCountedAgainstAvailability(e,t){return null!==e&&("CLIENT_ABORTED"!==e&&(null==t||this.isDegradedResponseCode(t)))}isDegradedResponseCode(e){if(this._degradationKeyByResponseCode.has(e))return!0;if(!this._defaultDegradationKey)return!1;if(this._additionalDegradedResponseCodes.has(e))return!0;const t=e>=500&&e<600,n=this._nonDegradedResponseCodes.has(e);return t&&!n}processTrackedResponseCodes(t,n){t.forEach((t=>{if(this._nonDegradedResponseCodes.has(t))throw new d("You attempted to specify ".concat(t," as a tracked response code for the '").concat(this.featureKey,"' feature, ")+"however it is also specified in the untracked response codes for that feature. Please decide whether "+"you want to consider ".concat(t," responses a degraded state or not. ").concat(e,"."));if(this._degradationKeyByResponseCode.has(t))throw new d("".concat(t," was specified multiple times in ").concat(this.featureKey,"'s ")+"".concat(u.TrackedResponseCodes,". Each tracked status code should only be ")+"specified once per degradation key. ".concat(e,"."));this._degradationKeyByResponseCode.set(t,n)}))}initializeDegradationKeyOverrides(t){t.forEach((t=>{if(!t.responseCodesToOverride||!t.degradationKey||!Array.isArray(t.responseCodesToOverride)||"string"!=typeof t.degradationKey)throw new d("Degradation key overrides must consist of an array of responseCodesToOverride "+"and a string degradationKey. ".concat(e,"."));new Set(t.responseCodesToOverride).forEach((e=>{if(!this.isDegradedResponseCode(e))throw new d("A degradation key override was specified for ".concat(e,", but that response code isn't considered degraded. ")+"Please add it to additionalDegradedResponseCodes if you want it to count against your availability.");this._degradationKeyByResponseCode.set(e,t.degradationKey)}))}))}}class k{constructor(e,t,n){this._featureMetricStore=new s,this._defaultProductName=e,this._fireEventCallback=t,this._jetErrorCallback=n;this._metricSender=new r(this._featureMetricStore,t,((e,t)=>{window.setInterval((()=>e()),t)})),window.addEventListener("beforeunload",(()=>this._metricSender.produceMetricEvent()))}trackFeatureDegradationsForFetch(e,t,n,r,i){let o,a=null;const s=new Map,c=this._createFailureProcessingMetadata(n);return t=this._getAndValidateUrlEntityIDs(t),r.then((e=>{a=e.status,!1===e.ok&&(e.headers.forEach(((e,t)=>s.set(t.toLowerCase(),e))),o=e)})).catch((e=>{throw o=e,e})).finally((()=>{this._trackResponse(e,a,t,c,i,s,o)}))}trackFeatureDegradationsForJQueryAjax(e,t,n,r,i,o){const a=t.status,s=t.getAllResponseHeaders(),c=new Map;s&&s.trim().split(/[\r\n]+/).forEach((e=>{const t=e.split(": "),n=t.shift();if(n){const e=t.join(": ");c.set(n.toLowerCase(),e)}}));const u=o?null:t,l=this._createFailureProcessingMetadata(r);n=this._getAndValidateUrlEntityIDs(n),this._trackResponse(e,a,n,l,i,c,u)}_trackResponse(e,r,i,o,a,s,c){if(429===r||999===r)return;const u=c?v(c,s):null,l=s.get(t)||null,d=s.get("x-li-uuid")||null,h=s.get(n)||null,f=new Set,p=new Set;if(o.forEach((e=>{f.add(e.productName),p.add(e.featureKey),e.isCountedAgainstAvailability(u,r)?this._featureMetricStore.incrementFailedFeatureApiCall({featureKey:e.featureKey,productName:e.productName,pointOfPresenceId:l,responseErrorType:u},a):this._featureMetricStore.incrementSuccessfulFeatureApiCall({featureKey:e.featureKey,productName:e.productName,pointOfPresenceId:l},a)})),c&&u){this._reportErrorIfUnclassified(c,u,r,f,p);const t=function(e,t,n,r,i,o,a,s){if(!(e&&e.trim()&&t&&Array.isArray(t)))return[];const c=m(e,o?o.map((e=>encodeURIComponent(e))):[]),u=[];return t.forEach((e=>{const t=e.getDegradationKey(r),o=e.isCountedAgainstAvailability(n,r),l={endpointPath:c,degradationKey:t,responseErrorType:n,isCountedAgainstAvailability:o};r&&(l.responseCode=r),i&&(l.responseCallTreeId=i),a&&(l.pointOfPresenceId=a),s&&(l.microsoftEdgeReference=s),u.push({header:{},requestHeader:{},productName:e.productName,featureKey:e.featureKey,failedDownstreamRequests:[l]})})),u}(e,o,u,r,d,i,l,h);t.forEach((e=>{this._fireEventCallback("FeatureDegradeEvent",e,a)}))}}_reportErrorIfUnclassified(e,t,n,r,i){var o;if((0===n||null==n)&&"UNCLASSIFIED"===t){const t=["noise","pem-unclassified-error"];let n;r.forEach((e=>t.push("pem-product-".concat(e)))),i.forEach((e=>t.push("pem-feature-".concat(e)))),n=e instanceof Error?e:new Error("Could not classify jQuery response: ".concat(JSON.stringify(e))),null===(o=this._jetErrorCallback)||void 0===o||o.call(this,n,t,!1)}}_createFailureProcessingMetadata(t){if(!t||!Array.isArray(t)||!t.length)throw new d("Please specify a non-empty array of degradation tracking metadata. ".concat(e,"."));const n=new Map;return t.forEach((t=>{if(!g.isDegradationTrackingMetadata(t))throw new d("Please use DegradationTrackingMetadata to specify the degradations. ".concat(e,"."));const r=f(t.productName||this._defaultProductName),i={productName:r,featureKey:t.featureKey},o=n.get(i);o?o.mergeTrackingMetadata(t):n.set(i,new E(t,r))})),[...n.values()]}_getAndValidateUrlEntityIDs(t){if(!Array.isArray(t))throw new d("Please specify the queried IDs to remove from the request URL, or use an empty array if there "+"are none. ".concat(e,"."));return t}}function C(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function I(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var T,S,_,P,A={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},R="GUEST",N="MEMBER",O=0,D=1,L=2,M=(I(T={},R,"li_gc"),I(T,N,"li_mc"),T),x="liap",U=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(var o in C(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=r,this.optedInConsentMap={},A)t[o]=t[o]||O,t[o]!==O&&(this.consentAvailable=!0),this.optedInConsentMap[o]=t[o]===D||t[o]===O&&i===D},H=(S=[A.ADVERTISING,A.ANALYTICS_AND_RESEARCH,A.FUNCTIONAL],_=[O,D,L,O],P=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),{parseConsentBody:function(e,t){var n=e.match(P);if(!n)return{error:"Invalid consent body encoding",consent:new U};for(var r=parseInt(n[1],10),i={},o=0;o<S.length;o++)i[S[o]]=_[r>>2*o&3];var a=new Date(1e3*parseInt(n[2],10)),s=parseInt(n[3],10),c=O;return s>=0&&s<=3&&(c=_[s]),{error:null,consent:new U(i,a,t,c)}}}),F=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),B=function(e,t){var n=t.match(new RegExp("(?:^|; *)".concat(e,"=([^;]*)")));return n&&n.length>1?n[1]:null},K=function(e,t){var n=B(M[e],t);return n?q(n,e):B(M[R],t)||B(M[N],t)?V(L):V(D)},V=function(e){var t={};for(var n in A)t[n]=e;return{error:null,consent:new U(t,null,null,e)}};var q=function(e,t){e&&e.length>1&&'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));var n,r=null;try{r=(n=e,"undefined"==typeof atob&&"undefined"!=typeof Buffer?Buffer.from(n,"base64").toString("binary"):atob(n)).match(F)}catch(e){}if(!r)return{error:"Invalid consent encoding",consent:new U};var i=parseInt(r[1],10),o=r[2];return 1===i?H.parseConsentBody(o,t):{error:"Invalid encoded consent version ".concat(i),consent:new U}};const j=window.encodeURIComponent;function z(){const e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.cookie;return e||(e=B(x,t)?B(M[N],t)?N:R:B(M[R],t)?R:N),K(e,t)}().consent.optedInConsentMap;if(e[A.ANALYTICS_AND_RESEARCH]){let e=["c1=2","c2=6402952","c3=","c4=","c5=","c6=","c15="];e.push("".concat("ns_","_t=").concat(Date.now())),e.push("".concat("ns_","c=").concat(document.characterSet||document.defaultCharset||"")),e.push("c8=".concat(j(document.title))),e.push("c7=".concat(j(document.URL)));const t=document.referrer&&document.referrer.split("?")[0]||"";e.push("c9=".concat(j(t)));const n="https://sb.scorecardresearch.com/b?"+e.join("&");let r=new Image;return r.src=n,r}}function W(e){let t=e.querySelector('meta[name="pageKey"]');return t?t.content+"_jsbeacon":""}function G(e){let t=e.querySelector('meta[name="linkedin:pageTag"]');return t&&t.content||""}function J(e){let t=e.querySelector('meta[name="locale"]');return t&&t.content||""}function Q(e){return e&&'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)?e.slice(1,-1):e}var Y="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function X(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}var $=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e,t){!function(e){function t(e,t){return e(t={exports:{}},t.exports),t.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==Y||"undefined"!=typeof self&&self;var n=t((function(e,t){!function(n,r){r(t,e)}(0,(function(e,t){var n="undefined"!=typeof window&&window&&"node"!==window.appEnvironment,r=n&&!!window.requestIdleCallback,i=8,o={AJAX_METHOD:"POST",DEFAULT_PAGE_TYPE:"ajax",globalTrackingUrl:null,globalTrackingAppId:"no.app.id",queue:[],paused:!1,maxQueueSize:1,queueTimeout:1e3,timeoutId:null,disableSendBeacon:!0,csrfToken:"",testId:"",testSegId:"",setProperty:function(e,t){void 0!==t&&(this[e]=t)},setTrackingUrl:function(e){this.setProperty("globalTrackingUrl",e)},setAppId:function(e){this.setProperty("globalTrackingAppId",e)},setCsrfToken:function(e){this.setProperty("csrfToken",e)},setTestId:function(e){this.setProperty("testId",e)},setTestSegId:function(e){this.setProperty("testSegId",e)},getCookieString:function(){return document.cookie},getCsrfToken:function(){for(var e="JSESSIONID=",t=this.getCookieString().split(";"),n=0;n<t.length;n++){for(var r=t[n];" "===r.charAt(0);)r=r.substring(1);if(-1!==r.indexOf(e)){var i=r.substring(e.length,r.length);return'"'===i[0]&&'"'===i[i.length-1]&&(i=i.substring(1,i.length-1)),i}}return""},createXmlHttpObject:function(){return n&&window.XMLHttpRequest?new XMLHttpRequest:null},beacon:function(e,t,r,i){this._beacon(e,t,r,i||this.globalTrackingUrl,this.disableSendBeacon?null:n&&navigator.sendBeacon&&navigator.sendBeacon.bind(navigator))},_beacon:function(e,t,n,r,i){if(i){var o=void 0;try{o=i(r,e)}catch(t){throw"object"==typeof t&&(t.message="Error sending ["+e+"] to "+r+" using sendBeacon:"+t.message,t.tags=["tracking"]),t}if(o)return void(t&&t(o))}this.ajax(e,t,n,r)},ajax:function(e,t,n,r){var i;r?(i=this.createXmlHttpObject())&&(i.open(this.AJAX_METHOD,r,!0),i.withCredentials=!0,i.setRequestHeader("Content-type","application/json"),this.csrfToken?i.setRequestHeader("Csrf-Token",this.csrfToken):i.setRequestHeader("Csrf-Token",this.getCsrfToken()),this.testId&&i.setRequestHeader("X-LinkedIn-traceDataContext-ENG_TEST_ID",this.testId),this.testSegId&&i.setRequestHeader("X-LinkedIn-traceDataContext-ENG_TEST_SEGMENT_ID",this.testSegId),i.onreadystatechange=function(){4===i.readyState&&(200===i.status||304===i.status?"function"==typeof t&&t(i):n&&n('Response is not "OK" or "Not Modified" for tracking request'))},4!==i.readyState&&i.send(e)):n&&n("Tracking url is not defined")},pause:function(){this.paused=!0},unpause:function(){this.paused=!1,this.queue.length>=this.maxQueueSize&&this.flush()},flush:function(){if(this.queue.length>0){var e=this;this.beacon(JSON.stringify(this.queue),null,e.logError),this.queue=[]}r?cancelIdleCallback(this.timeoutId):clearTimeout(this.timeoutId),this.timeoutId=null,this.paused=!1},idleFlush:function(e){var t=this,n=Date.now();return requestIdleCallback((function(r){r.timeRemaining()>i||r.didTimeout?t.flush():t.timeoutId=t.idleFlush(e-(Date.now()-n))}),{timeout:e})},addToQueue:function(e){if(this.queue.push(e),this.queue.length>=this.maxQueueSize&&!this.paused)return this.flush();if(!this.timeoutId){var t=this;r&&!this.paused?this.timeoutId=this.idleFlush(this.queueTimeout):this.timeoutId=setTimeout((function(){t.flush()}),this.queueTimeout)}},validateEvent:function(e,t,n){this.beacon(JSON.stringify([{eventInfo:this.populateEventInfo(e),eventBody:this.populateEventHeaders(t)}]),(function(e){return n(null,e)}),(function(e){return n(e)}),this.globalTrackingUrl+"/validate")},sendEvent:function(e,t){this.addToQueue({eventInfo:this.populateEventInfo(e),eventBody:this.populateEventHeaders(t)})},getTimestamp:function(){return Math.round((new Date).getTime()/1e3)},populateEventInfo:function(e){return"string"==typeof e&&(e={eventName:e}),e&&"object"==typeof e?(e.appId||(e.appId=this.globalTrackingAppId),e):(this.logError("Event info must be object"),{})},populateEventHeaders:function(e){return e&&"object"==typeof e?e:(this.logError("Event body must be object"),{})},logError:function(e){var t=window.console;t&&t.error&&t.error(e)},init:function(){this.setTrackingUrl(),this.setAppId(),this.onBeforeUnload=this.onBeforeUnload.bind(this),n&&window.addEventListener("beforeunload",this.onBeforeUnload)},destroy:function(){this.flush(),n&&window.removeEventListener("beforeunload",this.onBeforeUnload)},onBeforeUnload:function(){this.flush()}};t.exports=o}))}));function r(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),i=0;i<t.length;i++){var o=t[i];if(null!==o)for(var a in o)Object.prototype.hasOwnProperty.call(o,a)&&(r[a]=o[a])}return r}var i,o,a="li_trk_navigation",s="undefined";function c(){window.sessionStorage.removeItem(a)}function u(){if(typeof window!==s&&typeof window.sessionStorage!==s)try{return JSON.parse(window.sessionStorage.getItem(a))}catch(e){}}function l(e){if(typeof window!==s&&typeof window.sessionStorage!==s)try{window.sessionStorage.setItem(a,JSON.stringify(e))}catch(e){}}function d(){var e=window.location.pathname,t=e+window.location.search,n=window.location.href,r=u();if(!r)return null;for(var i=0;i<r.length;i++){var o=r[i].href;if(o===e||o===t||o===n){var a=r.splice(i,1)[0];return l(r),a}}return null}function h(e){var t=u()||[];t.push(e),l(t)}(function(e){e[e.FOCUS=0]="FOCUS",e[e.UNFOCUS=1]="UNFOCUS",e[e.KEYBOARD_SUBMIT=2]="KEYBOARD_SUBMIT",e[e.DRAG=3]="DRAG",e[e.PINCH_OPEN=4]="PINCH_OPEN",e[e.PINCH_CLOSE=5]="PINCH_CLOSE",e[e.DOUBLE_PRESS=6]="DOUBLE_PRESS",e[e.LONG_PRESS=7]="LONG_PRESS",e[e.SHORT_PRESS=8]="SHORT_PRESS",e[e.SWIPE_UP=9]="SWIPE_UP",e[e.SWIPE_DOWN=10]="SWIPE_DOWN",e[e.SWIPE_LEFT=11]="SWIPE_LEFT",e[e.SWIPE_RIGHT=12]="SWIPE_RIGHT",e[e.FLICK_UP=13]="FLICK_UP",e[e.FLICK_DOWN=14]="FLICK_DOWN",e[e.FLICK_LEFT=15]="FLICK_LEFT",e[e.FLICK_RIGHT=16]="FLICK_RIGHT",e[e.SHAKE=17]="SHAKE",e[e.KEYBOARD_NEXT=18]="KEYBOARD_NEXT",e[e.HOVER=19]="HOVER"})(e.ControlInteractionType||(e.ControlInteractionType={})),(o=e.PageViewPageType||(e.PageViewPageType={}))[o.FULL=1]="FULL",o[o.AJAX=2]="AJAX",o[o.IFRAME=3]="IFRAME",o[o.REDIRECT=4]="REDIRECT",o[o.API=5]="API",o[o.FORM=6]="FORM",o[o.ROUTER=7]="ROUTER",o[o.ERROR=8]="ERROR",function(e){e[e.PageViewEvent=0]="PageViewEvent",e[e.NavigationEvent=1]="NavigationEvent",e[e.ExternalNavigationEvent=2]="ExternalNavigationEvent",e[e.ControlInteractionEvent=3]="ControlInteractionEvent",e[e.PageVisibilityChangeEvent=4]="PageVisibilityChangeEvent"}(e.EventTypes||(e.EventTypes={}));var f="undefined"!=typeof window?window:null;function p(){var e=f.crypto||f.msCrypto;if(!i&&e&&e.getRandomValues){var t=new Uint8Array(16);(i=function(){return e.getRandomValues(t),t})()}if(!i){var n=new Uint8Array(16);i=function(){for(var e=0,t=void 0;e<16;e++)0==(3&e)&&(t=4294967296*Math.random()),n[e]=(t||0)>>>((3&e)<<3)&255;return n}}}f?p():i=function(){return new Uint8Array(16).fill(Math.floor(256*Math.random()))};for(var g=[],m=0;m<256;m++)g[m]=(m+256).toString(16).substr(1);function v(){var e=new Uint8Array(16),t=0,n=i();n[6]=15&n[6]|64,n[8]=63&n[8]|128;for(var r=0;r<16;r++)e[t+r]=n[r];return e}function y(){return b(v())}function b(e){for(var t=32768,n=[],r=0;r<e.length;r+=t)n.push(String.fromCharCode.apply(null,e.subarray(r,r+t)));return btoa(n.join(""))}function w(e){return e?"urn:li:page:"+e:null}function E(e,t){return e&&t?"urn:li:control:"+t+"-"+e:null}function k(e){return e?e.split(":").pop():null}function C(e,t){return e?{trackingId:t||y(),pageUrn:w(e)}:null}function I(e){return e?e.pageUrn+";"+e.trackingId:null}function T(e){if("string"!=typeof e)return null;var t=e.split(";");return 2===t.length?{pageUrn:t[0],trackingId:t[1]}:null}function S(e){return e&&e.referrer}function _(e){if(e&&e.URL){var t=e.URL.match(/trk=([^&]+)/);if(t&&2===t.length)return t[1]}return null}var P=10,A=10,R=Object.assign||r,N=function(){function t(e){void 0===e&&(e={appId:null,initialPageInstance:null}),this.config=e;var t=this.config.disableInitialAnchorPageViewEvent||!1;if(!this.config.appId)throw new Error("TrackingTwo requires an appId.");if(!this.config.initialPageInstance){var r=document.querySelector('meta[name="trk-pageinstance"]');if(r&&(this.config.initialPageInstance=T(r.getAttribute("content"))),!this.config.initialPageInstance)throw new Error("TrackingTwo requires an initialPageInstance");t=!0}this.config.eventHeaderProperties?this.config.eventHeaderProperties.pageInstance&&delete this.config.eventHeaderProperties.pageInstance:this.config.eventHeaderProperties={},this.config.userRequestHeaderProperties?this.config.userRequestHeaderProperties.pageKey&&delete this.config.userRequestHeaderProperties.pageKey:this.config.userRequestHeaderProperties={},this.config.validationMode=!!this.config.validationMode||!1,this.config.trackingUrl=this.config.trackingUrl||"/li/track";var i=d();i&&(e.previousPageInstance=i.prevInstance),Object.freeze(this.config.eventHeaderProperties),Object.freeze(this.config.userRequestHeaderProperties),Object.freeze(this.config),n.init(),n.setProperty("disableSendBeacon",!1),n.setTrackingUrl(this.config.trackingUrl),n.setProperty("maxQueueSize",this.config.requestBatchingMaxQueueSize||P),n.setProperty("queueTimeout",1e3*(this.config.requestBatchingMaxWaitSeconds||A)),this.state={currentPageInstance:e.initialPageInstance,previousPageInstance:e.previousPageInstance||null};var o=this.config.prevControlName||(i?i.controlName:null);this.fireNavigationEvent(this.state.previousPageInstance,o),t||this.firePageViewEvent(),this._boundDocumentClickHandler=this._handleDocumentClicks.bind(this),document&&document.body.addEventListener("click",this._boundDocumentClickHandler,!0),this._boundDocumentClickBubbleHandler=this._handleDocumentClicksBubble.bind(this),document&&document.body.addEventListener("click",this._boundDocumentClickBubbleHandler,!1),this._boundWindowBeforeUnloadHandler=this._handleWindowBeforeUnload.bind(this),window&&window.addEventListener("beforeunload",this._boundWindowBeforeUnloadHandler,!0),this._boundDocumentVisibilityChangeHandler=this._handleDocumentVisibilityChange.bind(this);var a="visibilitychange";document&&(void 0!==document.msHidden&&(a="msvisibilitychange"),document.addEventListener(a,this._boundDocumentVisibilityChangeHandler,!0))}return t.prototype._handleDocumentClicks=function(e){for(var t=e.target;t!==e.currentTarget&&!t.hasAttribute("data-tracking-control-name");)t=t.parentElement;if(t!==e.currentTarget){var n=t.getAttribute("data-tracking-control-name");!t.hasAttribute("data-tracking-no-cie")&&this.fireControlInteractionEvent(n)}},t.prototype._handleDocumentClicksBubble=function(e){for(var t=e.target;t!==e.currentTarget&&!t.hasAttribute("data-tracking-control-name");)t=t.parentElement;if(t!==e.currentTarget){var n=t.getAttribute("data-tracking-control-name"),r=t.hasAttribute("data-tracking-will-navigate"),i=t.getAttribute("data-tracking-href")||t.getAttribute("href");r&&!e.defaultPrevented&&this.saveStateForPageDeparture({controlName:n,href:i})}},t.prototype._handleWindowBeforeUnload=function(e){var t=e.target.activeElement,n=t,r=null,i=!1;if(t){for(;n!==e.currentTarget&&("function"!=typeof n.hasAttribute||!n.hasAttribute("data-tracking-control-name"))&&n.parentElement;)n=n.parentElement;n!==e.currentTarget&&("getAttribute"in n&&(r=n.getAttribute("data-tracking-control-name")),"hasAttribute"in n&&(i=n.hasAttribute("data-tracking-will-navigate")))}i||this.fireExternalNavigationEvent(r)},t.prototype._handleDocumentVisibilityChange=function(){var e=!1;if(void 0!==document.msHidden)e=document.msHidden;else{if(void 0===document.hidden)return;e=document.hidden}this.firePageVisibilityChangeEvent(e)},t.prototype.saveStateForPageDeparture=function(e){e&&h({controlName:e.controlName,href:e.href,prevInstance:this.state.currentPageInstance})},t.prototype.fireControlInteractionEvent=function(t,n,r){if(void 0===n&&(n=e.ControlInteractionType.SHORT_PRESS),void 0===r&&(r={}),!t)throw new Error("controlName is required.");var i=k(this.state.currentPageInstance.pageUrn),o=r.uiControlPageKey||i;this.fireTrackingEvent(e.EventTypes[e.EventTypes.ControlInteractionEvent],{requestHeader:{},header:{},controlUrn:E(t,o),interactionType:e.ControlInteractionType[n]},r)},t.prototype.fireNavigationEvent=function(t,n,r){void 0===r&&(r={});var i=t?k(t.pageUrn):null,o=r.uiControlPageKey||i;this.fireTrackingEvent(e.EventTypes[e.EventTypes.NavigationEvent],{requestHeader:{},header:{},previousPageInstance:t,triggerControlUrn:E(n,o)},r)},t.prototype.fireExternalNavigationEvent=function(t,n){void 0===n&&(n={});var r=n.uiControlPageKey||k(this.state.currentPageInstance.pageUrn);this.fireTrackingEvent(e.EventTypes[e.EventTypes.ExternalNavigationEvent],{requestHeader:{},header:{},triggerControlUrn:E(t,r)},n,!0)},t.prototype.firePageViewEvent=function(t,n){void 0===n&&(n={});var r=(n=R({},n)).pageViewPageType||e.PageViewPageType.AJAX,i=k(this.state.currentPageInstance.pageUrn),o=t||i;this.fireTrackingEvent(e.EventTypes[e.EventTypes.PageViewEvent],{requestHeader:{pageKey:o},header:{},pageType:e.PageViewPageType[r].toLowerCase(),trackingInfo:{clientTimestamp:Date.now().toString()}},n)},t.prototype.fireAnchorPageViewEvent=function(e,t,n){if(void 0===n&&(n={}),!e)throw new Error("newPageKey is required.");var r=R({},this.state.currentPageInstance),i=C(e);this.state.previousPageInstance=r,this.state.currentPageInstance=i,this.fireNavigationEvent(r,t,n),this.firePageViewEvent(e,n)},t.prototype.firePageVisibilityChangeEvent=function(t,n){void 0===n&&(n={}),this.fireTrackingEvent(e.EventTypes[e.EventTypes.PageVisibilityChangeEvent],{requestHeader:{},header:{},isVisible:!t},n)},t.prototype.fireTrackingEvent=function(e,t,r,i){if(void 0===r&&(r={}),void 0===i&&(i=!1),!e||!t)throw new Error("eventName and body are required.");t=R({},t),(r=R({},r)).topicName||(r.topicName=e),r.pageInstance||(r.pageInstance=this.state.currentPageInstance);var o=R({pageKey:k(r.pageInstance.pageUrn),path:window.location.href,referer:S(document),trackingCode:_(document)},this.config.userRequestHeaderProperties,t.requestHeader);delete t.requestHeader,delete t.header.pageInstance;var a=R({pageInstance:r.pageInstance,time:Date.now()},this.config.eventHeaderProperties,t.header);delete t.header;var s={requestHeader:o,header:a};this.config.mapHeaders&&(s=this.config.mapHeaders(s));var c=R(s,t),u={eventName:e,topicName:r.topicName,appId:this.config.appId};this.config.validationMode?n.validateEvent(u,c,(function(t){t&&console.error("Event "+e+" failed validation!")})):(n.sendEvent(u,c),i&&n.flush())},t.prototype.destroy=function(){n.destroy(),document.removeEventListener("click",this._boundDocumentClickHandler,!0)},t.createFromPageKey=function(e,n){return e.initialPageInstance=C(n),new t(e)},t}();e.AppTrackingInstance=N,e.clearNavStorage=c,e.derivePageInstanceFromString=T,e.derivePageKeyFromUrn=k,e.generateControlUrn=E,e.generatePageInstance=C,e.generatePageUrn=w,e.generateTrackingId=y,e.getReferrer=S,e.getTrackingCode=_,e.stringifyPageInstance=I,e.uuid=v,e.webTrackingTransport=n}(t)}));function Z(e,t){if(!e)return null;let n=e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector;for(;e&&!n.call(e,t);)e=e.parentElement;return e}function ee(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{setTimeout(e)}))}function te(e){return null==e||"object"!=typeof e?[]:Array.prototype.slice.call(e)}function ne(e){const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,r=window.innerWidth||document.documentElement.clientWidth,i=t.top<=n&&t.top+t.height>=0,o=t.left<=r&&t.left+t.width>=0;return i&&o}function re(e,t,n){const r=new RegExp("([\\?&])".concat(n?t:encodeURIComponent(t),"=([^&#]*)")).exec(e);return r&&(n?r[2]:decodeURIComponent(r[2]))}function ie(e,t,n,r){if(!e||!t)throw new Error("Required param of addQueryParam missing: url = ".concat(e,",  key = ").concat(t));t=encodeURIComponent(t),n=encodeURIComponent(n);const i=re(e,t,!0);if(i)return r?e.replace(i,n):e;{const r=e.indexOf("?");let[i,o]=e.split("#"),a="&";return r<0?a="?":r===e.length-1&&(a=""),o&&(o="#".concat(o)),"".concat(i).concat(a).concat(t,"=").concat(n).concat(o||"")}}function oe(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]}function ae(e){return void 0!==e.msHidden?e.msHidden:void 0!==e.hidden?e.hidden:void 0}let se=null;function ce(){let{appId:e="seo",trackingCode:t,applicationInstance:n=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r=W(document),i=re(window.location.href,"originalReferer"),o={appId:e,disableInitialAnchorPageViewEvent:!0,requestBatchingMaxWaitSeconds:.05,userRequestHeaderProperties:{},eventHeaderProperties:{}};return t&&(o.userRequestHeaderProperties.trackingCode=t),n&&n.applicationUrn&&n.version&&n.trackingId&&(o.eventHeaderProperties.clientApplicationInstance=n),i&&(o.userRequestHeaderProperties.referer=i),se||(se=$.AppTrackingInstance.createFromPageKey(o,r)),se.generateTrackingId=$.generateTrackingId,se}function ue(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax";const n=G(document),r=J(document);let i={};return r&&(i.interfaceLocale=r),e&&(i.pageKey=e),{header:{},requestHeader:i,pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:n}}}function le(e,t){t=t||"log";if("undefined"!=typeof window&&window&&window.jet&&"error"===t.toLowerCase())try{throw new Error(e)}catch(e){try{window.jet.error(e)}catch(e){}}"undefined"!=typeof console&&"function"==typeof console[t]&&console[t](e)}const de=/ /g,he=/[\s\u0000<>"]|%00/,fe=/\\/,pe=/([.]|%2e){2}/i;let ge=new RegExp("^(?:HTTPS?|https?|ftp|mailto|tel|sms|blob|voyager|android-app|linkedin|chrome-extension|invalid|data:(?:(?:image/(?:gif|jpe?g|png|webp|bmp|tiff))|(?:application/x-font-woff)|(?:font/(?:opentype|ttf)))[;,]|[/.#?])");function me(e){let t,n="invalid://";if("string"!=typeof e)return le("jSecure Warning: url must be a string","error"),n;if(t=e.trim(),t.indexOf(" ")>-1&&(le("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(de,"+")),!ge.test(t))return le("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(he.test(t))return le("jSecure Error: not valid url character found in url: "+e,"error"),n;let r,i=t.split("?")[0],o=!1;try{r=decodeURI(i)}catch(e){o=!0}return o?(le("jSecure Error: malformed url path detected: "+i),n):fe.test(i)||pe.test(i)||pe.test(r)?(le("jSecure Error: malicious data found in url path: "+i,"error"),n):e}function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ye(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){be(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function be(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function we(e){let{method:t="GET",headers:n={},sendCookies:r=!0,skipCsrfToken:i=!1,postData:o,isPemEnabled:a=!1,pemDegradationTrackingMetadata:s=[],pemEntityIds:c=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const u=new Promise(((a,s)=>{const c=new XMLHttpRequest;if(c.addEventListener("load",(function(){if(c.status>=200&&c.status<300||304===c.status)a({status:c.status,responseText:c.responseText});else{const n=new Error("".concat(t," request for ").concat(e," has failed with status code ").concat(c.status));n.response={status:c.status,responseText:c.responseText},c.response&&(n.response.rawHeaders=c.getAllResponseHeaders()),s(n)}})),c.addEventListener("error",(function(e){s(e)})),c.open(t,e,!0),c.withCredentials=r,Object.keys(n).forEach((e=>{c.setRequestHeader(e,n[e])})),!i){const e=oe("JSESSIONID");e&&c.setRequestHeader("Csrf-Token",Q(e))}c.send(o)}));return a&&(s.length?Ee(u,e,c,s):console.warn("Please set the value for the option pemDegradationTrackingMetadata when PEM is enabled.")),u}function Ee(e,t,n,r){try{const i=e.then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e,{status:e.status})})).catch((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e.response,{status:e.response?e.response.status:500,headers:e.response&&e.response.rawHeaders?ke(e.response.rawHeaders):new Headers})}));window.tracking.then((e=>{window.pemTracking.then((o=>{o.trackFeatureDegradationsForFetch(t,n,r,i,e.state.currentPageInstance)}))}))}catch(e){}}function ke(e){const t=new Headers;return e&&e.trim().split(/[\r\n]+/).forEach((e=>{const n=e.trim().split(": "),r=n.shift();if(r){const e=n.join(": ");t.set(r.toLocaleLowerCase(),e)}})),t}const Ce={className:"class"},Ie="A path to the asset must be provided";function Te(e){return(new DOMParser).parseFromString(e,"image/svg+xml").firstChild}function Se(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).map((n=>{const r=Ce[n]||n;e.setAttribute(r,t[n])})),e}function _e(e,t){if(!e)return Promise.reject(new Error("An icon tag must be provided to inlineIcon"));const n=e.getAttribute("data-svg-class-name");return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return Promise.reject(new Error(Ie));const n=ye({focusable:"false"},t);return we(e,{sendCookies:!1,skipCsrfToken:!0}).then((e=>Te(e.responseText))).then((e=>Se(e,n)))}(t,n?{className:n}:{}).then((t=>(e.appendChild(t),e.setAttribute("aria-hidden","true"),t)))}const Pe=["IMG","IFRAME","VIDEO","SCRIPT"],Ae="SCRIPT";class Re{constructor(){let{delayedUrlAttributeName:e="data-delayed-url",delayedPosterAttributeName:t="data-delayed-poster",delayedBackground:n="data-delayed-background",embeddedSrcAttributeName:r="data-li-src",ghostClassesAttributeName:i="data-ghost-classes",ghostUrlAttributeName:o="data-ghost-url",lazyloadClassName:a="lazy-load",lazyloadedClassName:s="lazy-loaded",onLoadClassName:c="onload",onErrorClassName:u="onerror"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.elementCache=[],this.onLoadClassName=c,this.onErrorClassName=u,this.delayedUrlAttributeName=e,this.delayedPosterAttributeName=t,this.delayedBackground=n,this.embeddedSrcAttributeName=r,this.lazyloadClassName=a,this.lazyloadedClassName=s,this.lazyloadElSelector="[".concat(this.delayedUrlAttributeName,"], [").concat(this.embeddedSrcAttributeName,"], .").concat(this.lazyloadClassName),this.boundLoadVisibleImages=this.loadVisibleImages.bind(this),this.boundEvents=!1,this.scriptLoadPromises={},this.ghostUrlAttributeName=o,this.ghostClassesAttributeName=i,ee((()=>this.refreshLoader()))}getLazyLoadedJavascriptModule(e){return this.scriptLoadPromises[e]=this.scriptLoadPromises[e]||function(){let e,t;const n=new Promise(((n,r)=>{e=n,t=r}));return n.resolve=e,n.reject=t,n}(),this.scriptLoadPromises[e]}refreshLoader(){this.elementCache=te(document.querySelectorAll(this.lazyloadElSelector)),this.loadVisibleImages(),this.elementCache.length&&!this.boundEvents&&this._attachEvents()}_attachEvents(){window.addEventListener("scroll",this.boundLoadVisibleImages,!0),window.addEventListener("touchmove",this.boundLoadVisibleImages,!0),window.addEventListener("resize",this.boundLoadVisibleImages,!0),this.boundEvents=!0}_detachEvents(){window.removeEventListener("scroll",this.boundLoadVisibleImages,!0),window.removeEventListener("touchmove",this.boundLoadVisibleImages,!0),window.removeEventListener("resize",this.boundLoadVisibleImages,!0),this.boundEvents=!1}_dropHttp(e){return e&&e.replace(/^http:\/\//i,"//")}lazyloadElOnload(e){if(e.classList.remove(this.lazyloadClassName),e.classList.add(this.lazyloadedClassName),e.tagName===Ae){const{moduleId:t}=e.dataset;this.getLazyLoadedJavascriptModule(t).resolve(window[t])}}lazyloadOnerror(e){const t=e.classList.contains(this.onErrorClassName),n=e.getAttribute(this.ghostUrlAttributeName);if(e.classList.remove(this.lazyloadClassName),e.classList.add(this.lazyloadedClassName),e.classList.add(this.onErrorClassName),n&&!t){e.setAttribute("src",me(n));const t=e.getAttribute(this.ghostClassesAttributeName);t&&t.length&&t.split(" ").forEach((t=>{e.classList.add(t)}))}if(e.tagName===Ae){const{moduleId:t}=e.dataset;this.getLazyLoadedJavascriptModule(t).reject(new Error("Could not lazy load JS with src ".concat(e.src)))}}loadVisibleImages(){let e=0;for(;e<this.elementCache.length;){let t=this.elementCache[e];if(t.tagName===Ae||t.classList.contains(this.onLoadClassName)||ne(t)){const n=t.hasAttribute(this.embeddedSrcAttributeName)&&this._dropHttp(t.getAttribute(this.embeddedSrcAttributeName))||t.getAttribute(this.delayedUrlAttributeName);n&&"ICON"===t.tagName?_e(t,n).then((e=>{this.lazyloadElOnload(e),this.lazyloadElOnload(t)})).catch((()=>this.lazyloadOnerror(t))):n&&-1!==Pe.indexOf(t.tagName)?(t.onerror=this.lazyloadOnerror.bind(this,t),t.onload=t.oncanplay=this.lazyloadElOnload.bind(this,t),t.src=me(n)):(n&&t.hasAttribute(this.delayedBackground)&&(t.style.backgroundImage='url("'.concat(me(n),'")')),this.lazyloadElOnload(t)),"VIDEO"===t.tagName&&(t.poster=me(t.getAttribute(this.delayedPosterAttributeName))),t.removeAttribute(this.delayedUrlAttributeName),t.removeAttribute(this.embeddedSrcAttributeName),this.elementCache.splice(e,1)}else e++}this.elementCache.length||this._detachEvents()}}let Ne=null;const Oe=["binlar","ask\\ jeeves","mozilla\\/4\\.0\\ \\(compatible\\;\\ msie\\ 6\\.0\\;\\ windows\\ nt\\ 5\\.1\\;1813\\)","companydatatree","genieo","microsoft\\+scheduled\\+cache\\+content\\+download\\+service","liferea","superfeedr","ez\\ publish\\ link\\ validator","htmlparser","argclrint","linkwalker","webtool","ask\\+jeeves","stackrambler","paros","^fdm\\+3\\.x","ms\\ search","indy\\+library","seznam","sitevigil","intergator","freedom(?!from)","google\\+page\\+speed\\+insights","znajdzfoto\\/image","riddler\\.io","^java\\/","twiceler","httpunit","ktxn","webcopier","mna\\+digital\\+circonus\\+check","stuff(?!nz)","updatepatrol","feedburner","hp\\+sitescope","crawler","gigablastopensource\\/","rpt\\-http","^fdm\\ 3\\.x","libwww\\-perl","((?=pital)|ca(?=pital))pita","bingpreview","oia\\.owa","^ahc\\/","thunderstone","microsoft\\ bits","alertsite","^python\\-requests\\/","dts\\ agent","tangjiutao","^inmon","linkscan","alexa\\ site\\ audit","webtrends(?!clientlibrary)","chkd","joedog","daumoa","typhoeus","loadimpactpageanalyzer","google\\ news","coldfusion","mna\\ digital\\ circonus\\ check","alexa\\+site\\+audit","getright","appengine","(?=crawler)crawl","ibot(?!ta)","jobo","python\\-httplib","powermarks","site24x7","proximic","yahoo\\+pipes","((?=aporter)|oper(?=aportable))aport","web\\+downloader","check\\_http","grabber","topsy\\.com\\/butterfly\\/","harvest","^inagist\\+url\\+resolver","fast","crescent(?!\\ build|\\+build)","sohu(?!ennews|video|news)","favorg","bloglines","fetch(?!tv)","wapt","microsoft\\+url\\+control","urchin","ning\\/1\\.0","pluck","google\\+news","spider","\\(compatible\\;\\+optimizer\\)","moreover\\/5\\.1","js\\-kit","server\\ density\\ external\\ llama","facebookexternalhit","ultraseek","catchpoint","yandex(?!\\ browser|\\+browser|mail)","echo(?!arena|fon|star)","^worldwatch\\/","combine(?!d)","winhttprequest","ez\\+publish\\+link\\+validator","jakarta","^webnotifier\\/","webmetrics","teoma","nerdbynature","ms\\+frontpage","nielsen","sucker","engagebdr","yahoofeedseeker","dts\\+agent","googleapps","holmes","plumtree","www\\-mechanize","google\\-hoteladsverifier","pingdom","drupal","sina\\_weibo","google\\ page\\ speed\\ insights","lisa","w3c\\_validator","^scan","yeti","snoopy","khte","trovit","atomz","httpcomponents","ms\\+search","google\\-http\\-java\\-client","spi\\_der","bubing","websitepulse","microsoft\\+bits","http\\_request2","ieautodiscovery","siteimprove","curl(?!ings)","go\\+1\\.1\\+package\\+http","^crowsnest\\/","email\\ exractor","utorrent","yahoocachesystem","shopwiki","justview","googlesecurityscanner","msnptc","rkg\\+url\\+verifier","monitor","bitvouseragent","((?=wormgame))worm","talktalk","help\\.coccoc\\.com","yahoo\\ pipes","heritrix","nutch","argus","kulturarw3","checkurl","universalsearch","amazon\\ route\\ 53\\ health\\ check\\ service","slurp","mozilla\\/5\\.0\\ \\(compatible\\;\\ msie\\ 5\\.0\\)","ezooms","kimengi\\/nineconnections\\.com","applesyndication","python\\-urllib","internal\\+zero\\-knowledge\\+agent","system\\+center\\+operations\\+manager","riverglassscanner","imgsizer","changedetection","nutscrape","feedzilla","contype","^lwp","\\(compatible\\;\\ optimizer\\)","infolink","outbrain","^prerender","admantx","^inagist\\ url\\ resolver","amazon\\+route\\+53\\+health\\+check\\+service","neustar","a6\\-indexer","comodo\\+ssl\\+checker","linkchecker","viglink","patric","newsnow","wasalive","scrapy","(?=gruber)grub","ruxitsynthetic","rkg\\ url\\ verifier","ocelli","webcapture","^kraken\\/","t\\-h\\-u\\-n\\-d\\-e\\-r\\-s\\-t\\-o\\-n\\-e","spider(?!solitaire)","isearch","hp\\ sitescope","maxamine","\\(simulated\\_by\\_webserver\\_stress\\_tool\\)","((?=obotics)|ther(?=obotfree))obot","yacy","twibble\\.io","google\\+wireless\\+transcoder","wget","internal\\ zero\\-knowledge\\ agent","google\\ wireless\\ transcoder","xenu","yahooseeker","advanced\\ email\\ extractor","feed43","ptst","reconnoiter","go\\ 1\\.1\\ package\\ http","advanced\\+email\\+extractor","linkdex","panscient\\.com","webcheck","linktiger","scooter","flipboard\\.com\\/browserproxy","evidon","twisted\\ pagegetter","cosmos","adbeat","sherlock","web\\ downloader","cookiereports","siteexplorer","miva","twisted\\+pagegetter","mfc\\_tear\\_sample","indy\\ library","b2w(?!tenisnew)","orangebot(?!swana)","lockss\\+cache","mozilla\\/4\\.0\\+\\(compatible\\;\\+msie\\+6\\.0\\;\\+windows\\+nt\\+5\\.1\\;1813\\)","yahooexternalcache","apache\\-httpclient\\/4\\.","archive\\.org","wesee\\:search","hiscan","ms\\ frontpage","tagscanner","google\\ web\\ preview","special\\_archiver","d24y\\-aegis","scoutjet","larbin","adsense\\-snapshot\\-google","keynote","skypeuripreview","clickajob","download\\+ninja","internet\\ ninja","^ltx71","ukonline","eventmachine\\ httpclient","nomad","mediapartners","twikle","microsoft\\ scheduled\\ cache\\ content\\ download\\ service","internet\\+ninja","scanalert","metauri","agentname","adr\\)","squider","isilo","teleport","automationtest","bordermanager","linklint","bot","templeton","rssreader","ichiro","(?=dialer\\-mobileapp)dialer","atomic\\_email\\_hunter","google\\+web\\+preview","longurl\\+api","longurl\\ api","internetseer","server\\+density\\+external\\+llama","topix","iopus","download\\ ninja","mozilla\\/5\\.0\\+\\(compatible\\;\\+msie\\+5\\.0\\)","europarchive","avantgo","flamingo\\_searchengine","lockss\\ cache","jobrapido","wesee\\:ads\\/","frontier","newspaper\\/0\\.0\\.","apachebench","flamingosearch","lydia","microsoft\\ url\\ control","phantomjs","system\\ center\\ operations\\ manager","^econtext\\/","akamai","cfschedule","searchme\\.com\\/support\\/","fortimail","comodo\\ ssl\\ checker","gomezagent","sitecon","webauto","golem","swcd","spundge\\/0\\.1","findlinks","^sjn","yandex","ia\\_archive","vagabondo","watchmouse","simplepie","1job","goldfire"].join("|"),De=new RegExp(Oe,"i");function Le(e){return De.test(e.trim())}var Me,xe,Ue=function(){return"".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)},He=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return{name:e,value:t,delta:0,entries:[],id:Ue(),isFinal:!1}},Fe=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},Be=!1,Ke=!1,Ve=function(e){Be=!e.persisted},qe=function(){addEventListener("pagehide",Ve),addEventListener("beforeunload",(function(){}))},je=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Ke||(qe(),Ke=!0),addEventListener("visibilitychange",(function(t){var n=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:n,isUnloading:Be})}),{capture:!0,once:t})},ze=function(e,t,n,r){var i;return function(){n&&t.isFinal&&n.disconnect(),t.value>=0&&(r||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||t.isFinal||void 0===i)&&(e(t),i=t.value))}},We=function(){return void 0===Me&&(Me="hidden"===document.visibilityState?0:1/0,je((function(e){var t=e.timeStamp;return Me=t}),!0)),{get timeStamp(){return Me}}},Ge=function(){return xe||(xe=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),xe};class Je{constructor(){let{gaugeMetricEndpoint:e,counterMetricEndpoint:t,pageKey:n,pageInstanceHeader:r=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.gaugeMetricEndpoint=e,this.counterMetricEndpoint=t,this.perfData=window.performance.timing,this.pageInstanceHeader=r,this.pageKey=n,!this.pageKey||!this.gaugeMetricEndpoint||!this.counterMetricEndpoint)throw new Error("Please pass a valid pageKey, counterMetricEndpoint & gaugeMetricEndpoint");window.gaugeEndpoint="guestGauge"}_getPageLoadTime(){return this.perfData.loadEventEnd-this.perfData.navigationStart}firePageLoadTimeMetric(){if(Le(navigator.userAgent)||this._pageLoadTimeMetricFired||!this.perfData)return;const e=this._getPageLoadTime();this.fireGaugeIngraphMetric({metricsType:"pageLoadTime",metricsValue:e}),this._pageLoadTimeMetricFired=!0}attachWebVitalsMetrics(){Le(navigator.userAgent)||this._webVitalsListenersAttached||(!function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=He("CLS",0),i=function(e){e.hadRecentInput||(r.value+=e.value,r.entries.push(e),t())},o=Fe("layout-shift",i);o&&(t=ze(e,r,o,n),je((function(e){var n=e.isUnloading;o.takeRecords().map(i),n&&(r.isFinal=!0),t()})))}(this._webVitalReportHandler.bind(this)),function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=He("LCP"),i=We(),o=function(e){var n=e.startTime;n<i.timeStamp?(r.value=n,r.entries.push(e)):r.isFinal=!0,t()},a=Fe("largest-contentful-paint",o);if(a){t=ze(e,r,a,n);var s=function(){r.isFinal||(a.takeRecords().map(o),r.isFinal=!0,t())};Ge().then(s),je(s,!0)}}(this._webVitalReportHandler.bind(this)),function(e){var t=He("FID"),n=We(),r=function(e){e.startTime<n.timeStamp&&(t.value=e.processingStart-e.startTime,t.entries.push(e),t.isFinal=!0,o())},i=Fe("first-input",r),o=ze(e,t,i);i?je((function(){i.takeRecords().map(r),i.disconnect()}),!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay((function(e,r){r.timeStamp<n.timeStamp&&(t.value=e,t.isFinal=!0,t.entries=[{entryType:"first-input",name:r.type,target:r.target,cancelable:r.cancelable,startTime:r.timeStamp,processingStart:r.timeStamp+e}],o())}))}(this._webVitalReportHandler.bind(this)),this._webVitalsListenersAttached=!0)}_webVitalReportHandler(e){this.fireGaugeIngraphMetric({metricsType:"".concat(e.name.toLowerCase(),"Time"),metricsValue:e.value,sendBeacon:!0})}_beacon(e,t){e=ie(e,"csrfToken",Q(oe("JSESSIONID")));const n=new Blob([t],{type:"application/json"});return navigator.sendBeacon(e,n)}fireGaugeIngraphMetric(){let{metricsType:e,metricsValue:t,sendBeacon:n=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const r="number"==typeof t&&!isNaN(t);if(!e||!r)throw new Error("valid metricsType & metricsValue are required");const i=JSON.stringify({pageKey:this.pageKey,metricsType:e,metricsValue:t});let o={"Content-Type":"application/json"};this.pageInstanceHeader&&this.pageInstanceHeader.pageUrn&&this.pageInstanceHeader.trackingId&&(o["x-li-pageInstance"]=this.pageInstanceHeader.pageUrn+";"+this.pageInstanceHeader.trackingId),n?this._beacon(this.gaugeMetricEndpoint,i):we(this.gaugeMetricEndpoint,{method:"POST",headers:o,postData:i})}fireSeoPageViewMetric(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;!this._seoPageViewMetricFired&&this._isSEOPageView(e)&&(this.fireCounterIngraphMetric({metricsType:"seoPageView"}),this._seoPageViewMetricFired=!0)}fireCounterIngraphMetric(){let{metricsType:e,sendBeacon:t=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!e)throw new Error("metricsType is required");const n=JSON.stringify({pageKey:this.pageKey,metricsType:e});t?this._beacon(this.counterMetricEndpoint,n):we(this.counterMetricEndpoint,{method:"POST",headers:{"Content-Type":"application/json"},postData:n})}_isSEOPageView(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).referrer||"",t=e.indexOf("mail.google.com")>-1,n=e.indexOf(".google.com")>-1,r=!t&&n;return!Le(navigator.userAgent)&&r}}const Qe={observeComponents:()=>{},unobserveComponents:()=>{},handleDynamicElements:()=>{}};class Ye{constructor(e,t){let{threshold:n=.9,root:r=null,rootMargin:i="0px",componentList:o=[],impressionEventCallback:a=(()=>{}),onImpression:s=(()=>{}),onObservation:c=(()=>{}),onUnobservation:u=(()=>{})}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("IntersectionObserver"in window))return Qe;this.root=r,this.threshold=n,this.rootMargin=i,this.trackingInstance=t,this.impressionEventCallback=a,this._onImpression=s,this._onObservation=c,this._onUnobservation=u;const l={root:this.root,rootMargin:this.rootMargin,threshold:this.threshold};this.intersectionObserverInstance=new e(this._handleObservedNodes.bind(this),l),this.observeComponents(o)}observeComponents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.intersectionObserverInstance&&e.forEach((e=>{this.intersectionObserverInstance.observe(e),this._onObservation(e)}))}unobserveComponents(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{this.intersectionObserverInstance.unobserve(e),this._onUnobservation(e)}))}_isNodeVisible(e){return e.intersectionRatio>=this.threshold}_handleObservedNodes(e){if(this.intersectionObserverInstance){const t=e.filter((e=>this._isNodeVisible(e))).map((e=>{let{target:t}=e;return t}));t.length>0&&(this._onImpression({trackingInstance:this.trackingInstance,visibleElements:t}),this.impressionEventCallback({trackingInstance:this.trackingInstance,queuedImpressions:t}),this.unobserveComponents(t))}}handleDynamicElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.intersectionObserverInstance&&e.length>0&&this.observeComponents(e)}}function Xe(e){let{trackingInstance:t,visibleElements:n}=e;const r=n.map((e=>e.getAttribute("data-impression-id"))).filter((e=>e));r.length>0&&function(e,t){const n=J(document),r={};n&&(r.interfaceLocale=n);const i={header:{},requestHeader:r,moduleNames:t};e.fireTrackingEvent("ViewModuleImpressionEvent",i)}(t,r)}function $e(e){e.removeAttribute("data-impression-id")}const Ze="timezoneOffset",et="screenWidth",tt="screenHeight",nt="devicePixelRatio",rt="currentContext",it="/transactional-routing/createguestdeferreddeeplink",ot="csrfToken",at=/iPad|iPhone|iPod/;function st(){var e;e=navigator.userAgent,at.test(e)&&te(document.querySelectorAll(".app-store-link")).forEach((e=>{e.href&&e.addEventListener("click",(e=>function(e){if(!e)throw Error("The given context is not valid");const t={[Ze]:(new Date).getTimezoneOffset(),[et]:window.screen.width,[tt]:window.screen.height,[nt]:window.devicePixelRatio,[rt]:e};try{navigator.sendBeacon(ie(it,ot,Q(oe("JSESSIONID"))),JSON.stringify(t))}catch(e){}}(e.currentTarget.pathname)))}))}function ct(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ut(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var lt,dt={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},ht="GUEST",ft="MEMBER",pt=0,gt=1,mt=2,vt=(ut(lt={},ht,"li_gc"),ut(lt,ft,"li_mc"),lt),yt="liap",bt=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(var o in ct(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=r,this.optedInConsentMap={},dt)t[o]=t[o]||pt,t[o]!==pt&&(this.consentAvailable=!0),this.optedInConsentMap[o]=t[o]===gt||t[o]===pt&&i===gt},wt=function(){var e=[dt.ADVERTISING,dt.ANALYTICS_AND_RESEARCH,dt.FUNCTIONAL],t=[pt,gt,mt,pt],n=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";"));return{parseConsentBody:function(r,i){var o=r.match(n);if(!o)return{error:"Invalid consent body encoding",consent:new bt};for(var a=parseInt(o[1],10),s={},c=0;c<e.length;c++){s[e[c]]=t[a>>2*c&3]}var u=new Date(1e3*parseInt(o[2],10)),l=parseInt(o[3],10),d=pt;return l>=0&&l<=3&&(d=t[l]),{error:null,consent:new bt(s,u,i,d)}}}}(),Et=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),kt=function(e,t){var n=t.match(new RegExp("(?:^|; *)".concat(e,"=([^;]*)")));return n&&n.length>1?n[1]:null},Ct=function(e,t){var n=kt(vt[e],t);return n?_t(n,e):kt(vt[ht],t)||kt(vt[ft],t)?It(mt):It(gt)},It=function(e){var t={};for(var n in dt)t[n]=e;return{error:null,consent:new bt(t,null,null,e)}},Tt=function(){var e=document.domain.match(/^(?:|.*\.)([^\.]+\.[^\.]+)$/);return e?e[1]:"linkedin-ei.com"},St=function(e){var t=e===ft?"settings/member-cookies":"mypreferences/g/guest-cookies";return"https://www.".concat(Tt(),"/").concat(t)};var _t=function(e,t){e&&e.length>1&&'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));var n,r=null;try{r=(n=e,"undefined"==typeof atob&&"undefined"!=typeof Buffer?Buffer.from(n,"base64").toString("binary"):atob(n)).match(Et)}catch(e){}if(!r)return{error:"Invalid consent encoding",consent:new bt};var i=parseInt(r[1],10),o=r[2];return 1===i?wt.parseConsentBody(o,t):{error:"Invalid encoded consent version ".concat(i),consent:new bt}},Pt=function(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.cookie;return e||(e=kt(yt,t)?kt(vt[ft],t)?ft:ht:kt(vt[ht],t)?ht:ft),Ct(e,t)}(e),n=t.consent,r=e||n.userMode||ht;return{showBanner:!t.error&&!n.consentAvailable,userMode:r,managePreferenceUrl:St(r)}},At=function(e,t){var n=e.optedInConsentMap,r=e.updateSettings,i=e.userMode;t=t||function(e,t){},e.optedInConsentMap||t("optedInConsentMap is a required option",null);var o=new XMLHttpRequest;o.open("POST","https://www.".concat(Tt(),"/cookie-consent/")),o.setRequestHeader("Content-Type","application/json"),o.withCredentials=!0,o.onload=function(){200!==o.status?t("Request failed with status ".concat(o.status),null):t(null,o)},o.onerror=function(){t("Request failed with an error",o)};var a={UPDATE_SETTINGS:r,USER_MODE:i,CATEGORIES:{}};for(var s in dt){var c=void 0;!0===n[s]?c=gt:!1===n[s]&&(c=mt),a.CATEGORIES[s]=c}o.send(JSON.stringify(a))};function Rt(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Nt(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ot(e,t,n){return t&&Nt(e.prototype,t),n&&Nt(e,n),e}function Dt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Mt(e,t)}function Lt(e){return Lt=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Lt(e)}function Mt(e,t){return Mt=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Mt(e,t)}function xt(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ut(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Lt(e);if(t){var i=Lt(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return xt(this,n)}}function Ht(e,t,n){return Ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Lt(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}},Ht(e,t,n||e)}function Ft(e){var t={header:{},requestHeader:{},alertUrn:e.getAlertId(),actionType:"DISMISS"};e.getTrackingOptions().trackingInstance.fireTrackingEvent("AlertActionEvent",t)}var Bt=100,Kt=Object.freeze({TERMS_AND_CONDITIONS:0,COOKIE_POLICY:1,COOKIE_USAGE:2,MAINTENANCE:3,EMAIL_STATUS:4,SUBSCRIPTION:5,IE_DEPRECATION_BANNER:6,UNKNOWN:7,COOKIE_CONSENT:8});Object.freeze({TERMS_AND_CONDITIONS:501,COOKIE_POLICY:500,COOKIE_USAGE:500,MAINTENANCE:Bt,EMAIL_STATUS:300,SUBSCRIPTION:400,IE_DEPRECATION_BANNER:99,UNKNOWN:200});var Vt=Object.freeze({alertType:"type",severity:"severity",alertId:"alert-id",actionType:"action-type",actionUrl:"action-url"}),qt="AlertActionClick";function jt(e,t){for(var n=e;null!=n;){if(n.classList&&n.classList.contains(t))return!0;n=n.parentNode}return!1}function zt(e){var t=document.cookie.match("(?:^|;)\\s*".concat(e,"\\s*=\\s*([^;]+)"));return t?t[1]:void 0}function Wt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"customEvent",t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var Gt=1,Jt=2,Qt=0,Yt="artdeco-global-alert__dismiss",Xt="artdeco-global-alert-action",$t="artdeco-global-alert__content";function Zt(e){var t=e.target,n=t instanceof Element&&t.parentNode,r="artdeco-global-alert__responsive-container--scrollable-effect";if(n instanceof Element&&t instanceof Element){var i=t.offsetHeight,o=t.scrollHeight,a=t.scrollTop;if(o>i){var s=a+i;n.classList.add("".concat(r)),n.classList.remove("".concat(r,"-only-top")),n.classList.remove("".concat(r,"-only-bottom")),s===i&&n.classList.add("".concat(r,"-only-bottom")),s===o&&n.classList.add("".concat(r,"-only-top"))}}}var en=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Rt(this,e),this._el=t,this._state=Qt,this._initialHeight=this._el.offsetHeight,this._alertType=this._el.getAttribute(Vt.alertType),this._id=this._el.getAttribute(Vt.alertId),this._elDismissBtn=this._el.querySelector(".".concat(Yt)),this._trackingOptions=n,this.init()}return Ot(e,[{key:"_makeAlertAccessible",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this._el.setAttribute("aria-hidden",!e),this._el.style.setProperty("visibility",e?"visible":"hidden")}},{key:"init",value:function(){var e=this;this._el.style.setProperty("height","0px"),this._makeAlertAccessible(!1),this._el.addEventListener("click",(function(t){var n=t.target;jt(n,Yt)?(e.dismissAction(),Ft(e)):jt(n,Xt)&&e.handleAlertAction(t)}))}},{key:"getTrackingOptions",value:function(){return this._trackingOptions}},{key:"getAlertNode",value:function(){return this._el}},{key:"setHeight",value:function(e){this._el.style.setProperty("height",e),this._el.style.setProperty("visibility","visible")}},{key:"getInitialHeight",value:function(){return this._initialHeight}},{key:"getAlertType",value:function(){return this._alertType}},{key:"getAlertId",value:function(){return this._id}},{key:"isInactive",value:function(){return!(this._state===Gt||this._state===Jt)}},{key:"visited",value:function(){this._state=Gt,this._makeAlertAccessible(!1)}},{key:"activate",value:function(){var e,t,n=this._trackingOptions,r=n.enableControlInteractionEvents,i=n.controlInteractionEventsPrefix;this._state=Jt,t={header:{},requestHeader:{},alertUrn:(e=this).getAlertId()},e.getTrackingOptions().trackingInstance.fireTrackingEvent("AlertImpressionEvent",t),this._makeAlertAccessible(!0),this._el.focus();var o,a,s,c=this._el.querySelector(".".concat($t));if(c instanceof Element){var u=(o=Zt,a=200,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(){clearTimeout(s),o.apply(void 0,t)};clearTimeout(s),s=setTimeout(r,a)});c.addEventListener("scroll",u)}c.dispatchEvent(Wt("scroll")),r&&this._el.querySelectorAll("button, a").forEach((function(e){var t=e.tagName,n="data-tracking-control-name",r=e.getAttribute(n);if(r)r=r.replace("urn:li:control:",""),e.setAttribute(n,r),e.setAttribute("data-control-name",r);else{var o="a"===t.toLowerCase()?"alert-link-cta":"alert-dismiss-btn-cta";e.setAttribute(n,"".concat(i,"-").concat(o))}}))}},{key:"dismissAction",value:function(){}},{key:"handleAlertAction",value:function(e){var t=e.target,n=t.getAttribute(Vt.actionType),r=t.getAttribute(Vt.actionUrl);r=r&&me(r);var i=Wt(qt);switch(n){case"LINK":r?window.location.assign(r):t.dispatchEvent(i);break;case"ACCEPT":r&&function(e){if(e){var t=document&&document.cookie.match(/(?:^|; *)JSESSIONID=([^;]*)(?:;|$)/),n=t?t[1]:null;if(n){var r=new XMLHttpRequest;r.open("POST",e),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Csrf-Token",n),r.withCredentials=!0,r.onload=function(){},r.send(JSON.stringify({action:"ACCEPT"}))}}}(r),t.dispatchEvent(i);break;case"DENY":this.dismissAction(),Ft(this),t.dispatchEvent(i)}}}]),e}();function tn(){try{var e=Pt();return e.isActive=!(!zt("li_gc")&&!zt("li_mc")),e}catch(e){return console.error("invalid domain",document.domain),{}}}function nn(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={},n=dt;return Object.keys(n).forEach((function(n){t[n]=e})),{optedInConsentMap:t}}var rn=function(e){Dt(n,e);var t=Ut(n);function n(){return Rt(this,n),t.apply(this,arguments)}return Ot(n,[{key:"init",value:function(){Ht(Lt(n.prototype),"init",this).call(this),tn().showBanner||this.visited()}},{key:"handleAlertAction",value:function(e){var t=e.target,n=t.getAttribute(Vt.actionType),r=tn().managePreferenceUrl,i=t.getAttribute(Vt.actionUrl);i=i&&me(i)||r;var o=Wt(qt);switch(n){case"LINK":i?At(nn(),(function(){window.location.assign(i)})):t.dispatchEvent(o);break;case"ACCEPT":At(nn(!0),(function(){})),t.dispatchEvent(o);break;case"DENY":At(nn(),(function(){})),Ft(this),t.dispatchEvent(o)}}}]),n}(en),on="li_alerts";function an(){var e=function(e){var t=document.cookie.match("(?:^|;)\\s*".concat(e,"\\s*=\\s*([^;]+)"));return t?t[1]:void 0}(on),t=e&&atob(e),n={};try{n=JSON.parse(t)}catch(e){}return n}function sn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=btoa(JSON.stringify(e)),n=new Date;n.setTime(n.getTime()+31536e6),document.cookie="".concat(on,"=").concat(t,";expires=").concat(n.toUTCString(),";path=/;secure;samesite=none")}function cn(e){if(!e)return 0;var t=e.toLowerCase(),n=an(),r=n&&n[t]||0;return r=parseInt(r,10)}function un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e&&t){var n=e.toLowerCase(),r=Math.min(cn(n)+t,3),i=an();i[n]=r,sn(i)}}var ln="LIcookiePolicyDisplays";function dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;try{window.localStorage.setItem(ln,e)}catch(e){}}var hn=function(e){Dt(n,e);var t=Ut(n);function n(){return Rt(this,n),t.apply(this,arguments)}return Ot(n,[{key:"init",value:function(){var e=tn();Ht(Lt(n.prototype),"init",this).call(this),function(e){var t=NaN;try{t=parseInt(window.localStorage.getItem(ln),10)}catch(e){}!isNaN(t)&&t>=0&&un(e,t)}(this._alertType),(e.isActive||cn(this._alertType)>=3)&&Ht(Lt(n.prototype),"visited",this).call(this)}},{key:"activate",value:function(){Ht(Lt(n.prototype),"activate",this).call(this),dn(cn(this._alertType)+1),un(this._alertType,1)}},{key:"dismissAction",value:function(){Ht(Lt(n.prototype),"dismissAction",this).call(this),dn(3),un(this._alertType,3-cn(this._alertType))}}]),n}(en);var fn=function(){function e(t){Rt(this,e),this._trackingOptions=t}return Ot(e,[{key:"getAlertInstance",value:function(e){switch(function(e){return Kt[e.getAttribute(Vt.alertType)]}(e)){case Kt.COOKIE_USAGE:return new hn(e,this._trackingOptions);case Kt.COOKIE_CONSENT:return new rn(e,this._trackingOptions);default:return new en(e,this._trackingOptions)}}}]),e}();"undefined"!=typeof window&&"undefined"!=typeof document&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||window;for(var n=0;n<this.length;n++)e.call(t,this[n],n,this)}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var pn,gn="artdeco-global-alert-container",mn="global-alert-offset",vn="artdeco-global-alert",yn="artdeco-global-alert__dismiss",bn="artdeco-global-alert-action",wn="artdeco-global-alerts-cls-offset",En="transition-in",kn="transition-out",Cn=function(){function e(t){var n=t.trackingInstance,r=t.enableControlInteractionEvents,i=void 0!==r&&r,o=t.controlInteractionEventsPrefix,a=void 0===o?"global-alerts":o;if(Rt(this,e),!n)throw new Error("Missing config - trackingInstance");if(this._el=document&&document.querySelector("#".concat(gn)),this._clsOffsetEl=document&&document.querySelector("#".concat(wn)),this._isSSR=!!this._clsOffsetEl,this._clsOffsetEl&&this._clsOffsetEl instanceof Element){var s=this._clsOffsetEl.offsetHeight;this._clsOffsetEl.style.setProperty("height",s),this._el.innerHTML=this._clsOffsetEl.innerHTML,this._clsOffsetEl.innerHTML=""}if(this._elOffsetList=document.querySelectorAll(".".concat(mn)),this._elAlertList=this._el&&this._el.querySelectorAll(".".concat(vn)),this._alertInstance=[],this._currentActiveAlert=void 0,this._alertFactoryInstance=new fn({trackingInstance:n,enableControlInteractionEvents:i,controlInteractionEventsPrefix:a}),this._initalBodyOffset=parseInt(document.body.style.getPropertyValue("padding-top"),10)||0,!this._el&&!this._elAlertList.length)return!1;this.init()}return Ot(e,[{key:"init",value:function(){var e=this;sn(an()),this._elAlertList.forEach((function(t){e._alertInstance.push(e._alertFactoryInstance.getAlertInstance(t))})),this._el.classList.add(En),document.body.classList.add(En),this._el.addEventListener("click",(function(t){var n=t.target;jt(n,yn)&&(e.dismissAlert(n),e.activateNextAlert())})),this._el.addEventListener(qt,(function(t){var n=t.target;jt(n,bn)&&(e.dismissAlert(n),e.activateNextAlert())})),this.activateNextAlert()}},{key:"activateNextAlert",value:function(){var e;this._alertInstance.some((function(t){return!!t.isInactive()&&(e=t,!0)})),this._currentActiveAlert&&this._currentActiveAlert.visited(),e&&e.activate(),this._currentActiveAlert=e,this._currentActiveAlert?this.updateBodyOffset():this.destroy()}},{key:"updateBodyOffset",value:function(){var e=this._currentActiveAlert.getInitialHeight();this._isSSR?this._clsOffsetEl.style.setProperty("height","".concat(e+this._initalBodyOffset,"px")):document.body.style.setProperty("padding-top","".concat(e+this._initalBodyOffset,"px")),this._elOffsetList.forEach((function(t){t.style.setProperty("top","".concat(e,"px"))})),this._el.style.setProperty("height","".concat(e,"px")),this._currentActiveAlert.setHeight("".concat(e,"px"))}},{key:"dismissAlert",value:function(e){var t=e.closest(".".concat(vn));t.classList.add(kn),t.style.setProperty("height","0px")}},{key:"destroy",value:function(){var e=this._el;this._el.classList.add(kn),document.body.classList.add(kn),this._isSSR?this._clsOffsetEl.remove():document.body.style.setProperty("padding-top","".concat(this._initalBodyOffset,"px")),this._elOffsetList.forEach((function(e){e.style.setProperty("top","0px")})),this._el.style.setProperty("height","0px"),this._alertInstance=[],this._el=void 0,setTimeout((function(){e.remove(),document.body.classList.remove(En),document.body.classList.remove(kn)}),500)}}]),e}();class In{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||"[object Function]"!=={}.toString.call(e))throw new Error("Please provide a valid tracking call back function");this.memberId=t,this.trackingCallback=e}getInstalledApps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return"getInstalledRelatedApps"in e?e.getInstalledRelatedApps().then((t=>(this._fireAppDetectionEvent(t,e),t))):Promise.resolve([])}_fireAppDetectionEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator;const n=e.map((e=>({appId:e.id.toUpperCase().replace(/\./g,"_"),appVersion:e.version,platform:e.platform}))),r={header:{memberId:this.memberId},requestHeader:{browserId:this._getBrowserId(),userAgent:t.userAgent||""},installedAppList:n},i=this._getQueryParam(window.location.href,"originalReferer");i&&(r.requestHeader.referer=i),this.trackingCallback("AppDetectionEvent",r)}_getBrowserId(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).cookie.match(/bcookie=([^;]*)/),t=e?e[1].replace(/^"(.*)"$/,"$1"):"";return t&&t.includes("&")&&t.split("&")[1]||""}_getQueryParam(e,t,n){const r=new RegExp("([\\?&])".concat(n?t:encodeURIComponent(t),"=([^&#]*)")).exec(e);return r&&(n?r[2]:decodeURIComponent(r[2]))}}function Tn(e){return(Tn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Sn(e){return function(e){if(Array.isArray(e))return _n(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return _n(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_n(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function _n(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Pn(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function An(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Rn(e,t,n){return t&&An(e.prototype,t),n&&An(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Nn(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var On=Uint8Array,Dn=Uint16Array,Ln=Uint32Array,Mn=new On([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,0,0,0]),xn=new On([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,0,0]),Un=new On([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Hn=function(e,t){for(var n=new Dn(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new Ln(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},Fn=Hn(Mn,2),Bn=Fn[0],Kn=Fn[1];Bn[28]=258,Kn[258]=28;for(var Vn=Hn(xn,0)[1],qn=new Dn(32768),jn=0;jn<32768;++jn){var zn=(43690&jn)>>>1|(21845&jn)<<1;zn=(61680&(zn=(52428&zn)>>>2|(13107&zn)<<2))>>>4|(3855&zn)<<4,qn[jn]=((65280&zn)>>>8|(255&zn)<<8)>>>1}var Wn=function(e,t,n){for(var r=e.length,i=0,o=new Dn(t);i<r;++i)++o[e[i]-1];var a,s=new Dn(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(n){a=new Dn(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],l=t-e[i],d=s[e[i]-1]++<<l,h=d|(1<<l)-1;d<=h;++d)a[qn[d]>>>c]=u}else for(a=new Dn(r),i=0;i<r;++i)e[i]&&(a[i]=qn[s[e[i]-1]++]>>>15-e[i]);return a},Gn=new On(288);for(jn=0;jn<144;++jn)Gn[jn]=8;for(jn=144;jn<256;++jn)Gn[jn]=9;for(jn=256;jn<280;++jn)Gn[jn]=7;for(jn=280;jn<288;++jn)Gn[jn]=8;var Jn=new On(32);for(jn=0;jn<32;++jn)Jn[jn]=5;var Qn=Wn(Gn,9,0),Yn=Wn(Jn,5,0),Xn=function(e){return(e+7)/8|0},$n=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},Zn=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},er=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[sr,0];if(1==i){var a=new On(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],u=0,l=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=i-1;)s=n[n[u].f<n[d].f?u++:d++],c=n[u!=l&&n[u].f<n[d].f?u++:d++],n[l++]={s:-1,f:s.f+c.f,l:s,r:c};var h=o[0].s;for(r=1;r<i;++r)o[r].s>h&&(h=o[r].s);var f=new Dn(h+1),p=tr(n[l-1],f,0);if(p>t){r=0;var g=0,m=p-t,v=1<<m;for(o.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(f[y]>t))break;g+=v-(1<<p-f[y]),f[y]=t}for(g>>>=m;g>0;){var b=o[r].s;f[b]<t?g-=1<<t-f[b]++-1:++r}for(;r>=0&&g;--r){var w=o[r].s;f[w]==t&&(--f[w],++g)}p=t}return[new On(f),p]},tr=function e(t,n,r){return-1==t.s?Math.max(e(t.l,n,r+1),e(t.r,n,r+1)):n[t.s]=r},nr=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Dn(++t),r=0,i=e[0],o=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return[n.subarray(0,r),t]},rr=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},ir=function(e,t,n){var r=n.length,i=Xn(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},or=function(e,t,n,r,i,o,a,s,c,u,l){$n(t,l++,n),++i[256];for(var d=er(i,15),h=d[0],f=d[1],p=er(o,15),g=p[0],m=p[1],v=nr(h),y=v[0],b=v[1],w=nr(g),E=w[0],k=w[1],C=new Dn(19),I=0;I<y.length;++I)C[31&y[I]]++;for(I=0;I<E.length;++I)C[31&E[I]]++;for(var T=er(C,7),S=T[0],_=T[1],P=19;P>4&&!S[Un[P-1]];--P);var A,R,N,O,D=u+5<<3,L=rr(i,Gn)+rr(o,Jn)+a,M=rr(i,h)+rr(o,g)+a+14+3*P+rr(C,S)+(2*C[16]+3*C[17]+7*C[18]);if(D<=L&&D<=M)return ir(t,l,e.subarray(c,c+u));if($n(t,l,1+(M<L)),l+=2,M<L){A=Wn(h,f,0),R=h,N=Wn(g,m,0),O=g;var x=Wn(S,_,0);for($n(t,l,b-257),$n(t,l+5,k-1),$n(t,l+10,P-4),l+=14,I=0;I<P;++I)$n(t,l+3*I,S[Un[I]]);l+=3*P;for(var U=[y,E],H=0;H<2;++H){var F=U[H];for(I=0;I<F.length;++I){var B=31&F[I];$n(t,l,x[B]),l+=S[B],B>15&&($n(t,l,F[I]>>>5&127),l+=F[I]>>>12)}}}else A=Qn,R=Gn,N=Yn,O=Jn;for(I=0;I<s;++I)if(r[I]>255){B=r[I]>>>18&31,Zn(t,l,A[B+257]),l+=R[B+257],B>7&&($n(t,l,r[I]>>>23&31),l+=Mn[B]);var K=31&r[I];Zn(t,l,N[K]),l+=O[K],K>3&&(Zn(t,l,r[I]>>>5&8191),l+=xn[K])}else Zn(t,l,A[r[I]]),l+=R[r[I]];return Zn(t,l,A[256]),l+R[256]},ar=new Ln([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),sr=new On(0),cr=function(e,t,n,r,i,o){var a=e.length,s=new On(r+a+5*(1+Math.ceil(a/7e3))+i),c=s.subarray(r,s.length-i),u=0;if(!t||a<8)for(var l=0;l<=a;l+=65535){var d=l+65535;d<a?u=ir(c,u,e.subarray(l,d)):(c[l]=o,u=ir(c,u,e.subarray(l,a)))}else{for(var h=ar[t-1],f=h>>>13,p=8191&h,g=(1<<n)-1,m=new Dn(32768),v=new Dn(g+1),y=Math.ceil(n/3),b=2*y,w=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&g},E=new Ln(25e3),k=new Dn(288),C=new Dn(32),I=0,T=0,S=(l=0,0),_=0,P=0;l<a;++l){var A=w(l),R=32767&l,N=v[A];if(m[R]=N,v[A]=R,_<=l){var O=a-l;if((I>7e3||S>24576)&&O>423){u=or(e,c,0,E,k,C,T,S,P,l-P,u),S=I=T=0,P=l;for(var D=0;D<286;++D)k[D]=0;for(D=0;D<30;++D)C[D]=0}var L=2,M=0,x=p,U=R-N&32767;if(O>2&&A==w(l-U))for(var H=Math.min(f,O)-1,F=Math.min(32767,l),B=Math.min(258,O);U<=F&&--x&&R!=N;){if(e[l+L]==e[l+L-U]){for(var K=0;K<B&&e[l+K]==e[l+K-U];++K);if(K>L){if(L=K,M=U,K>H)break;var V=Math.min(U,K-2),q=0;for(D=0;D<V;++D){var j=l-U+D+32768&32767,z=j-m[j]+32768&32767;z>q&&(q=z,N=j)}}}U+=(R=N)-(N=m[R])+32768&32767}if(M){E[S++]=268435456|Kn[L]<<18|Vn[M];var W=31&Kn[L],G=31&Vn[M];T+=Mn[W]+xn[G],++k[257+W],++C[G],_=l+L,++I}else E[S++]=e[l],++k[e[l]]}}u=or(e,c,o,E,k,C,T,S,P,l-P,u),!o&&7&u&&(u=ir(c,u+1,sr))}return function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(e instanceof Dn?Dn:e instanceof Ln?Ln:On)(n-t);return r.set(e.subarray(t,n)),r}(s,0,r+Xn(u)+i)},ur=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),lr=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function dr(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=ur[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}(),r=e.length;n.p(e);var i,o,a,s=(i=e,o=t,a=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8,cr(i,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+o.mem,a,8,!0)),c=s.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&lr(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(s,t),lr(s,c-8,n.d()),lr(s,c-4,r),s}var hr="undefined"!=typeof TextDecoder&&new TextDecoder;try{hr.decode(sr,{stream:!0})}catch(ro){}function fr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return!t||n<1||(e[t]=JSON.stringify({attempt:n,errorCode:r})),e}function pr(e){var t=e.body,n=e.keepalive,r=e.headers,i=e.compress,o=new Headers(r);o.get("content-type")||o.set("content-type","text/plain;charset=UTF-8");var a=t;return i&&"undefined"!=typeof TextEncoder&&(a=dr((new TextEncoder).encode(t)),o.set("content-encoding","gzip")),{body:a,keepalive:n,credentials:"same-origin",headers:o,method:"POST",mode:"cors"}}function gr(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function mr(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.error("[beacon-transporter] ",e())}function vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeRemaining:5,timeout:1e4};if("undefined"==typeof requestIdleCallback)setTimeout(e,t.fallbackTimeout||10);else{var n=function n(){requestIdleCallback((function(r){r.timeRemaining()>t.timeRemaining||r.didTimeout?e():n()}),{timeout:t.timeout})};n()}}function yr(e,t){var n=0;return{throttledFn:function(r){var i=Date.now();i-n>t&&(gr((function(){return"[throttle] Run fn() at "+String(i)})),e(r),n=i)},resetThrottle:function(){n=0}}}var br,wr="undefined"!=typeof globalThis&&"fetch"in globalThis,Er=wr&&"keepalive"in new Request(""),kr="undefined"!=typeof navigator&&"sendBeacon"in navigator,Cr=Er?function(e,t,n,r){return new Promise((function(i){fetch(e,pr({body:t,keepalive:!0,headers:n,compress:r})).catch((function(){return fetch(e,pr({body:t,keepalive:!1,headers:n,compress:r}))})).then((function(e){e.ok?i({type:"success",statusCode:200}):i({type:"response",statusCode:e.status})}),(function(){return i({type:"network",statusCode:void 0})}))}))}:function(e,t,n,r){return new Promise((function(i){if(kr){var o=!1;try{o=navigator.sendBeacon(e,t)}catch(e){}if(o)return void i(void 0)}fetch(e,pr({body:t,keepalive:!1,headers:n,compress:r})).then((function(e){e.ok?i({type:"success",statusCode:200}):i({type:"response",statusCode:e.status})}),(function(){return i({type:"network",statusCode:void 0})}))}))};function Ir(e){return new Promise((function(t,n){e.oncomplete=e.onsuccess=function(){return t(e.result)},e.onabort=e.onerror=function(){return n(e.error)}}))}function Tr(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",r=arguments.length>3?arguments[3]:void 0,i=indexedDB.open(e);i.onupgradeneeded=function(){try{i.result.createObjectStore(t,{keyPath:n})}catch(e){null==r||r.onError(e)}};var o=new Promise((function(e,t){i.onsuccess=function(){var t=i.result;t.onversionchange=function(){return t.close()},e(t),null==r||r.onSuccess()},i.onerror=function(){t(i.error),null==r||r.onError(i.error)}}));return function(e,n){return o.then((function(r){return n(r.transaction(t,e).objectStore(t))}))}}function Sr(){return br||(br=Tr("idb-queue","default")),br}function _r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=0,r=null;return e.openKeyCursor().onsuccess=function(){var i=this.result;i&&n++<t.batchEvictionNumber?(r=i.key,i.continue()):null!=r&&e.delete(IDBKeyRange.upperBound(r))},Ir(e.transaction)}function Pr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{maxNumber:1e3,batchEvictionNumber:300},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sr();return t("readwrite",(function(t){return _r(t,e)}))}var Ar=!1;function Rr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Sr();return n("readwrite",(function(n){return n.put(e),Ir(n.count()).then((function(e){if(!(e<=t.maxNumber))return _r(n,t)}))})).catch((function(e){if(e&&"QuotaExceededError"===e.name)return Pr(t,n)}))}function Nr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Sr();return Ar?Promise.resolve():Rr(e,t,n)}function Or(e,t,n){return t("readwrite",(function(t){var r=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(r.push(t.value),t.delete(),(e<0||r.length<e)&&t.continue())},Ir(t.transaction).then((function(){return r}))}))}function Dr(e,t,n){return t("readonly",(function(t){var r=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(r.push(t.value),(e<0||r.length<e)&&t.continue())},Ir(t.transaction).then((function(){return r}))}))}function Lr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sr();return Dr(e,t,"next")}function Mr(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sr();return Dr(e,t,"prev")}var xr=function(){function e(t){var n,r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pn(this,e),Nn(this,"config",void 0),Nn(this,"compress",void 0),Nn(this,"throttleControl",void 0),Nn(this,"withStore",void 0),Nn(this,"disablePersistence",!1),this.config=t,this.compress=i;var o=null===(n=t.measureIDB)||void 0===n?void 0:n.create;o&&performance.mark(o.createStartMark),this.withStore=Tr(t.dbName,"beacons","timestamp",{onSuccess:function(){o&&performance.measure(o.createSuccessMeasure,o.createStartMark)},onError:function(){o&&performance.measure(o.createFailMeasure,o.createStartMark),r.disablePersistence=!0}}),this.throttleControl=yr(this.replayEntries.bind(this),t.throttleWait)}return Rn(e,[{key:"onNotify",value:function(e){this.disablePersistence||this.throttleControl.throttledFn(e)}},{key:"push",value:function(e){var t,n,r,i=this;if(!this.disablePersistence){var o=function(){gr((function(){return"Persisting to DB "+e.url})),Nr(e,i.config,i.withStore).then((function(){i.throttleControl.resetThrottle(),gr((function(){return"push completed"}))})).catch((function(){i.disablePersistence=!0,mr((function(){return"push failed"}))}))};null!==(t=null===(n=(r=this.config).useIdle)||void 0===n?void 0:n.call(r))&&void 0!==t&&t?vr(o):o()}}},{key:"clear",value:function(){var e=this;return this.disablePersistence?Promise.resolve():function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Sr();return Ar=!0,e("readwrite",(function(e){return e.clear(),Ir(e.transaction).finally((function(){return Ar=!1}))}))}(this.withStore).catch((function(){e.disablePersistence=!0,mr((function(){return"clear failed"}))}))}},{key:"peek",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.disablePersistence?Promise.resolve([]):Lr(t,this.withStore).catch((function(){return e.disablePersistence=!0,mr((function(){return"peek failed"})),[]}))}},{key:"peekBack",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return this.disablePersistence?Promise.resolve([]):Mr(t,this.withStore).catch((function(){return e.disablePersistence=!0,mr((function(){return"peekBack failed"})),[]}))}},{key:"replayEntries",value:function(e){var t,n,r,i=this;if(!this.disablePersistence){var o=function(){gr((function(){return"Replaying entry: shift from store"})),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Sr();return Or(e,t,"next")}(1,i.withStore).then((function(t){if(t.length>0){var n=t[0],r=n.url,o=n.body,a=n.headers,s=n.timestamp,c=n.statusCode,u=n.attemptCount;return gr((function(){return"header: ".concat(String(i.config.headerName),"; attemptCount: ").concat(u)})),Cr(r,o,fr(a,i.config.headerName,u,c),i.compress).then((function(t){if(t&&"success"!==t.type){if(u+1>i.config.attemptLimit)return void gr((function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:r,timestamp:s,statusCode:c},null,2)}));if("network"===t.type||e.allowedPersistRetryStatusCodes.includes(t.statusCode))return gr((function(){return"Replaying the entry failed, pushing back to IDB: "+JSON.stringify({url:r,timestamp:s,statusCode:c},null,2)})),Nr({url:r,body:o,timestamp:s,statusCode:c,attemptCount:u+1},i.config,i.withStore)}else i.replayEntries(e)}))}})).catch((function(e){i.disablePersistence=!0,e&&e.message&&mr((function(){return"Replay entry failed: ".concat(e.message)}))}))};null!==(t=null===(n=(r=this.config).useIdle)||void 0===n?void 0:n.call(r))&&void 0!==t&&t?vr(o):o()}}}]),e}(),Ur=function(){function e(){Pn(this,e)}return Rn(e,[{key:"onNotify",value:function(){}},{key:"push",value:function(){}},{key:"clear",value:function(){return Promise.resolve()}},{key:"peek",value:function(){return Promise.resolve([])}},{key:"peekBack",value:function(){return Promise.resolve([])}}]),e}(),Hr=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Pn(this,e),Nn(this,"queue",void 0),Nn(this,"beaconListeners",new Set),this.queue=e.hasSupport?new xr(t,n):new Ur}return Rn(e,[{key:"pushToQueue",value:function(e){this.queue.push(e)}},{key:"notifyQueue",value:function(e){this.queue.onNotify(e)}},{key:"clearQueue",value:function(){return this.beaconListeners.forEach((function(e){return e()})),this.queue.clear()}},{key:"peekQueue",value:function(e){return this.queue.peek(e)}},{key:"peekBackQueue",value:function(e){return this.queue.peekBack(e)}},{key:"onClear",value:function(e){this.beaconListeners.add(e)}},{key:"removeOnClear",value:function(e){this.beaconListeners.delete(e)}}]),e}();Nn(Hr,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var Fr=[502,504],Br=[429,503],Kr=function(){function e(t,n,r,i){var o,a=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Pn(this,e),Nn(this,"url",void 0),Nn(this,"body",void 0),Nn(this,"config",void 0),Nn(this,"db",void 0),Nn(this,"compress",void 0),Nn(this,"timestamp",void 0),Nn(this,"persistRetryStatusCodes",void 0),Nn(this,"inMemoryRetryStatusCodes",void 0),Nn(this,"isClearQueuePending",!1),Nn(this,"onClearCallback",void 0),Nn(this,"calculateRetryDelay",void 0),this.url=t,this.body=n,this.config=r,this.db=i,this.compress=s,this.timestamp=Date.now(),this.persistRetryStatusCodes=r.retry.persistRetryStatusCodes||Br,this.inMemoryRetryStatusCodes=r.retry.inMemoryRetryStatusCodes||Fr,this.onClearCallback=function(){return a.isClearQueuePending=!0},this.calculateRetryDelay=null!==(o=r.retry.calculateRetryDelay)&&void 0!==o?o:function(e){return 2e3*a.getAttemptCount(e)}}return Rn(e,[{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.db.onClear(this.onClearCallback);var n=this.retryLimit;return this.retry((function(t){return Cr(e.url,e.body,t,e.compress)}),n,t).finally((function(){gr((function(){return"beacon finished"})),e.db.removeOnClear(e.onClearCallback)}))}},{key:"retryLimit",get:function(){return this.config.retry.limit}},{key:"getAttemptCount",value:function(e){return this.retryLimit-e+1}},{key:"retry",value:function(e,t,n,r){var i=this,o=this.getAttemptCount(t)-1;return e(fr(n,this.config.retry.headerName,o,r)).then((function(r){if(void 0===r||"success"===r.type)!i.isClearQueuePending&&i.config.retry.persist&&i.db.notifyQueue({allowedPersistRetryStatusCodes:i.persistRetryStatusCodes});else if(gr((function(){return"retry rejected "+JSON.stringify(r)})),i.shouldPersist(t,r))i.db.pushToQueue({url:i.url,body:i.body,headers:n,statusCode:r.statusCode,timestamp:i.timestamp,attemptCount:i.getAttemptCount(t)});else if(t>0&&i.isRetryableError(r)){var o=i.calculateRetryDelay(t);return gr((function(){return"in memory retry in ".concat(o,"ms")})),(a=o,new Promise((function(e){return setTimeout(e,a)}))).then((function(){return i.retry(e,t-1,n,r.statusCode)}))}var a;return r}))}},{key:"isRetryableError",value:function(e){return!("network"!==e.type&&!this.inMemoryRetryStatusCodes.includes(e.statusCode))}},{key:"shouldPersist",value:function(e,t){return!(this.isClearQueuePending||!this.config.retry.persist||navigator.onLine&&(0!==e||"network"!==t.type)&&("response"!==t.type||!this.persistRetryStatusCodes.includes(t.statusCode)))}}]),e}();function Vr(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.beaconConfig||{retry:{limit:0}},r=t.compress||!1;if("retryDB"in t)e=t.retryDB;else{var i=t.retryDBConfig||{dbName:"beacon-transporter",attemptLimit:3,maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},o=n.retry.headerName;o&&!i.headerName&&(i.headerName=o),e=new Hr(i,r)}var a=function(t,i,o){return wr?new Kr(t,i,n,e,r).send(o):Promise.resolve(void 0)};return{beacon:a,database:e}}var qr,jr=function(){try{var e="__webstorage-mutex__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}();function zr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{lockPrefix:"webstorage-mutex",repeatInterval:50,repeatTimeout:1e3,delayTime:50};if(!jr)return Promise.reject(new Error("localStorage is not supported"));var n=t.lockPrefix,r=t.repeatInterval,i=t.repeatTimeout,o=t.delayTime,a=Xr(),s="".concat(n,":X"),c="".concat(n,":Y"),u="".concat(n,":Z"),l=function(){$r((function(){return"[".concat(a,"] start critical section")}));var t=e();return $r((function(){return"[".concat(a,"] free Z")})),Yr(u),Jr(c)===a&&($r((function(){return"[".concat(a,"] free Y")})),Yr(c)),t},d=function e(){return $r((function(){return"[".concat(a,"] start, set X")})),Qr(s,a),Wr((function(){return!Jr(c)}),r,i).then((function(){return $r((function(){return"[".concat(a,"] lock Y")})),Qr(c,a),Jr(s)!==a?($r((function(){return"[".concat(a,"] X<>i")})),Gr(o).then((function(){return Jr(c)!==a?($r((function(){return"[".concat(a,"] Y<>i, goto start")})),e()):Wr((function(){return!Jr(u)}),r,i).then((function(){return l()}))}))):($r((function(){return"[".concat(a,"] set Z")})),Qr(u,"1"),Gr(1).then((function(){return l()})))})).catch((function(e){throw $r((function(){return"[".concat(a,"] timeout, clear Z and Y")})),Yr(u),Yr(c),e}))};return d()}function Wr(e,t,n){var r=Date.now();return new Promise((function(i,o){setTimeout((function a(){e()?i():Date.now()-r>n?o(new Error("mutex timeout")):setTimeout(a,Math.round(t*(.5+Math.random())))}),1)}))}function Gr(e){return new Promise((function(t){return setTimeout(t,e)}))}function Jr(e){return window.localStorage.getItem(e)}function Qr(e,t){window.localStorage.setItem(e,t)}function Yr(e){window.localStorage.removeItem(e)}function Xr(){return"".concat(String(Date.now()),"|").concat(Math.round(1e5*Math.random()))}function $r(e){"__DEBUG_WEBSTORAGE_MUTEX"in window&&console.debug(e())}function Zr(e){var t=e.keyName,n=e.maxNumber,r=e.throttleWait,i=e.headerName,o=e.attemptLimit,a=e.compressFetch,s=function(){try{var e="__test_local_storage_support__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}}(),c=new Set,u=yr((function(e){var n=e.allowedPersistRetryStatusCodes;vr((function(){zr((function(){var e=window.localStorage.getItem(t);return window.localStorage.removeItem(t),e})).then((function(e){var r=e?JSON.parse(e):[];return function e(){var s=r.shift();if(!s)return Promise.resolve();var c=s.url,u=s.body,l=s.headers,d=s.statusCode,h=s.attemptCount;return Cr(c,u,fr(l,i,h,d),a).then((function(i){return i&&"success"!==i.type?h+1>o?void 0:"network"===i.type||n.includes(i.statusCode)?(s.attemptCount++,zr((function(){var e=window.localStorage.getItem(t),n=e?JSON.parse(e):[];r.unshift(s),r.push.apply(r,Sn(n)),window.localStorage.setItem(t,JSON.stringify(r))})).catch((function(e){e&&e.message&&mr((function(){return e.message}))}))):void 0:e()}))}()})).catch((function(e){e&&e.message&&mr((function(){return"Replay entry failed: ".concat(e.message)}))}))}))}),r);return{pushToQueue:function(e){s&&vr((function(){zr((function(){var r=window.localStorage.getItem(t);try{var i=r?JSON.parse(r):[];Array.isArray(i)&&i.length+1<=n?(i.push(e),window.localStorage.setItem(t,JSON.stringify(i))):window.localStorage.removeItem(t)}catch(e){e instanceof Error&&mr((function(){return e.message})),window.localStorage.removeItem(t)}})).then((function(){return u.resetThrottle()})).catch((function(e){mr((function(){return null==e?void 0:e.message}))}))}))},notifyQueue:function(e){s&&u.throttledFn(e)},clearQueue:function(){c.forEach((function(e){return e()})),s&&window.localStorage.removeItem(t)},peekQueue:function(e){if(!s)return[];try{var n=window.localStorage.getItem(t);if(!n)return[];var r=JSON.parse(n);return Array.isArray(r)?r.slice(0,e):[]}catch(e){return e instanceof Error&&mr((function(){return e.message})),[]}},onClear:function(e){c.add(e)},removeOnClear:function(e){c.delete(e)}}}var ei=new Uint8Array(16);function ti(){if(!qr&&!(qr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return qr(ei)}var ni=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ri(e){return"string"==typeof e&&ni.test(e)}for(var ii=[],oi=0;oi<256;++oi)ii.push((oi+256).toString(16).substr(1));function ai(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(ii[e[t+0]]+ii[e[t+1]]+ii[e[t+2]]+ii[e[t+3]]+"-"+ii[e[t+4]]+ii[e[t+5]]+"-"+ii[e[t+6]]+ii[e[t+7]]+"-"+ii[e[t+8]]+ii[e[t+9]]+"-"+ii[e[t+10]]+ii[e[t+11]]+ii[e[t+12]]+ii[e[t+13]]+ii[e[t+14]]+ii[e[t+15]]).toLowerCase();if(!ri(n))throw TypeError("Stringified UUID is invalid");return n}function si(e,t,n){var r=(e=e||{}).random||(e.rng||ti)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return ai(r)}var ci=null;if("undefined"==typeof crypto||!crypto.getRandomValues){var ui=("undefined"!=typeof FastBoot?FastBoot.require:"function"==typeof __webpack_require__?__non_webpack_require__:X)("crypto");if(ui){var li=new Uint8Array(256),di=li.length;ci={rng:function(){return di>li.length-16&&(ui.randomFillSync(li),di=0),li.slice(di,di+=16)}}}}var hi="object"===("undefined"==typeof crypto?"undefined":Tn(crypto))&&"function"==typeof crypto.randomUUID?function(){return crypto.randomUUID()}:function(){return ai(si(ci,new Array(16),0))};function fi(){return hi()}function pi(e,t){return{pageUrn:mi(e),trackingId:t||fi()}}function gi(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function mi(e){return"urn:li:page:".concat(e)}function vi(e,t){return{pageInstance:t.assign({},e.pageInstance),pageKey:e.pageKey,applicationInstance:e.applicationInstance}}function yi(e,t){return void 0!==t.allSettled?t.allSettled(e):function(e){return new Promise((function(t){var n=new Set,r=function(e){n.delete(e),0===n.size&&t()};0===e.length?t():e.map((function(e){return e.then((function(){return r(e)})).catch((function(){return r(e)}))}))}))}(e)}function bi(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function wi(e,t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])}function Ei(e,t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)}var ki,Ci,Ii=(ki=new Map,Ci=new Map,{on:function(e,t){wi(ki,e,t)},before:function(e,t){wi(Ci,e,t)},off:function(e,t){Ei(ki,e,t)},offBefore:function(e,t){Ei(Ci,e,t)},emit:function(e,t){(Ci.get(e)||[]).concat(ki.get(e)||[]).slice().map((function(e){e(t)}))},clear:function(){Ci.clear(),ki.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var Ti=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||Ii.emit("hide",e)};document.addEventListener("visibilitychange",Ti),window.addEventListener("pagehide",Ti)}function Si(e,t){return 1e3*Math.pow(2,t-e+1)}function _i(e,t,n,r){navigator.storage.estimate().then((function(i){if(!((i.quota||0)-(i.usage||0)>52428800))return function(e){var t=window.indexedDB.deleteDatabase(e);return new Promise((function(e,n){t.onsuccess=function(){return e()},t.onerror=function(){return n(t.error)}}))}("beacons");var o,a,s=null!==(o=e.retryConfig.inMemory)&&void 0!==o?o:{attemptLimit:4,statusCodes:[502,504]},c=null!==(a=e.retryConfig.persist)&&void 0!==a?a:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},u=c.attemptLimit,l=c.maxNumber,d=c.batchEvictionNumber,h=c.throttleWait,f=Vr({beaconConfig:{retry:{limit:s.attemptLimit,headerName:"x-li-retry-context",inMemoryRetryStatusCodes:s.statusCodes,persist:Boolean(c),persistRetryStatusCodes:c.statusCodes,calculateRetryDelay:function(e){return Si(e,s.attemptLimit)}}},retryDBConfig:{dbName:"beacons",attemptLimit:u,maxNumber:l,batchEvictionNumber:d,throttleWait:h,useIdle:function(){return!0},measureIDB:{create:{createStartMark:"idb_open_start",createSuccessMeasure:"idb_open_success_phase",createFailMeasure:"idb_open_fail_phase"}}},compress:n}),p=f.beacon,g=f.database;return"enabled"===r?(e.retryBeacon={shouldRetry:!1,beacon:p,database:g},t.shouldAnonymizeMemberId()?g.peekQueue(1).then((function(e){if(Array.isArray(e)&&e[0]){var t=JSON.parse(e[0].body);if(Array.isArray(t)&&t.some((function(e){return!e.eventInfo.shouldAnonymizeMemberId})))return g.clearQueue()}}),(function(){return g.clearQueue()})).then((function(){e.retryBeacon.shouldRetry=!0})).catch((function(e){Ii.emit("retry:error",e)})):(e.retryBeacon.shouldRetry=!0,Promise.resolve())):void 0})).catch((function(e){Ii.emit("retry:error",e)}))}function Pi(){return"undefined"!=typeof window&&"function"==typeof window.fetch&&"keepalive"in new Request("")}function Ai(e,t,n){window.fetch(t,Ri({body:e,keepalive:!0,compress:n})).catch((function(){window.fetch(t,Ri({body:e,keepalive:!1,compress:n})).catch((function(){}))}))}function Ri(e){var t=e.body,n=e.keepalive,r=t,i={"content-type":"text/plain;charset=UTF-8"};if(e.compress)try{r=dr((new TextEncoder).encode(t)),i["content-encoding"]="gzip"}catch(e){Ni(e)||setTimeout((function(){Ii.emit("retry:error",e)}),10)}return{body:r,credentials:"same-origin",headers:i,keepalive:n,method:"POST",mode:"cors"}}function Ni(e){return e instanceof RangeError||e instanceof TypeError&&e.message.indexOf("Cannot read property")>-1}var Oi="PageViewEvent",Di=function(){function e(t){var n=this;Pn(this,e),Nn(this,"host",void 0),Nn(this,"queue",void 0),Nn(this,"preContextQueue",void 0),Nn(this,"debounceTimer",void 0),Nn(this,"unloadHandlers",void 0),Nn(this,"maxQueueSize",void 0),Nn(this,"flushDebounceTime",void 0),Nn(this,"trackingEventListeners",[]),Nn(this,"onHideHandler",(function(){n.forceFlush()})),this.host=t,this.queue=[],this.preContextQueue=[],this.unloadHandlers=[];var r=t.batching;this.maxQueueSize=r&&r.maxSize||1,this.flushDebounceTime=r&&r.debounceTime||0,Ii.on("hide",this.onHideHandler)}return Rn(e,[{key:"checkAndEnablePersistentRetry",value:function(e){if("function"==typeof(null==e?void 0:e.shouldAnonymizeMemberId)&&!this.host.retryBeacon){var t=this.getRetryTreatment(),n="enabled"===t||"enabled_open_only"===t;this.host.retryConfig&&Pi()&&(n&&function(){if("undefined"==typeof Promise||"undefined"==typeof navigator)return!1;var e=navigator.userAgent.indexOf("Chrome")>-1,t=navigator.cookieEnabled,n=navigator.storage;return e&&t&&n}()?_i(this.host,e,this.shouldCompressPayload(),t):"enabled_ls"===t&&function(e,t,n){var r,i,o=null!==(r=e.retryConfig.inMemory)&&void 0!==r?r:{attemptLimit:4,statusCodes:[502,504]},a=null!==(i=e.retryConfig.persist)&&void 0!==i?i:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},s=a.attemptLimit,c=Zr({keyName:"tracking-beacons",headerName:"x-li-retry-context",maxNumber:a.maxNumber,throttleWait:a.throttleWait,attemptLimit:s,compressFetch:n}),u=Vr({beaconConfig:{retry:{limit:o.attemptLimit,headerName:"x-li-retry-context",inMemoryRetryStatusCodes:o.statusCodes,persist:Boolean(a),persistRetryStatusCodes:a.statusCodes,calculateRetryDelay:function(e){return Si(e,o.attemptLimit)}}},retryDB:c,compress:n}).beacon;if(e.retryBeacon={shouldRetry:!1,beacon:u,localStorageDB:c},t.shouldAnonymizeMemberId()){var l=c.peekQueue();if(Array.isArray(l)&&l[0])try{var d=JSON.parse(l[0].body);Array.isArray(d)&&d.some((function(e){return!e.eventInfo.shouldAnonymizeMemberId}))&&c.clearQueue()}catch(e){c.clearQueue()}}e.retryBeacon.shouldRetry=!0}(this.host,e,this.shouldCompressPayload()))}}},{key:"clearPersistedEventsOnLogout",value:function(){var e=this.host.retryBeacon;if(e&&e.shouldRetry)return e.shouldRetry=!1,"database"in e?e.database.clearQueue().catch((function(e){Ii.emit("retry:error",e)})):void e.localStorageDB.clearQueue()}},{key:"on",value:function(e){this.trackingEventListeners.push(e)}},{key:"fireEvent",value:function(e){var t=function(e){return e.meta.time=Date.now(),e}(e),n=this.host,r=n.api.Promise,i=n.batching;return function(e){return!!e.meta.context}(t)?(this.prepareCompleteEnvelopeQueue(t),i?(this.batchFire(),r.resolve(!0)):(this.flush(!0),r.resolve(!0))):(this.preContextQueue.push(t),r.resolve(!0))}},{key:"callOnDestroy",value:function(e){this.unloadHandlers.push(e)}},{key:"destroy",value:function(){this.unloadHandlers.forEach((function(e){return e()})),this.forceFlush(),this.trackingEventListeners=[],Ii.off("hide",this.onHideHandler)}},{key:"forceFlush",value:function(){var e=this;this.populatePreContextQueue({pageInstance:pi("unknown"),pageKey:"unknown"}).forEach((function(t){return e.queue.push(t)})),this.flush(!0)}},{key:"prepareCompleteEnvelopeQueue",value:function(e){var t=this,n=e.meta.context=vi(e.meta.context,this.host.api);"function"==typeof e.body&&(e.body=e.body(n)),this.preContextQueue.length>0&&this.populatePreContextQueue(n).forEach((function(e){return t.queue.push(e)})),this.queue.push(e)}},{key:"envelop",value:function(e,t){var n=this.host,r=n.appId,i=n.api;return{eventBody:t,eventInfo:"string"==typeof e?{appId:r,eventName:e,topicName:e}:i.assign({appId:r},e)}}},{key:"getGenericEventBody",value:function(e){var t,n,r=this.host,i=r.appVersion,o=r.locale,a=r.api,s=a.location,c=a.document,u=a.assign,l=e.meta.context,d=l.pageKey,h=l.pageInstance,f=("string"==typeof(n=e.id)?n===Oi:n.eventName===Oi)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||d,p=null;"string"!=typeof o&&null!==this.host.locale||(p=o);var g={interfaceLocale:p,pageKey:f,path:s.pathname+s.search,referer:c.referrer},m={header:u({pageInstance:h,time:e.meta.time,version:i},e.meta.header||{}),requestHeader:u(g,e.meta.requestHeader||{})};return u(e.body,m)}},{key:"populatePreContextQueue",value:function(e){var t=this.preContextQueue;return this.preContextQueue=[],t.map((function(t){return t.meta.context=e,"function"==typeof t.body&&(t.body=t.body(e)),t}))}},{key:"trigger",value:function(e){this.trackingEventListeners.forEach((function(t){return t(e)}))}},{key:"requestFlush",value:function(e){var t=this;e((function(n){n.timeRemaining()>5||n.didTimeout?t.forceFlush():t.requestFlush(e)}),{timeout:1e4})}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.host.api.requestIdleCallback;e||!t?this.sendPayload():this.requestFlush(t)}},{key:"batchFire",value:function(){this.queue.length>this.maxQueueSize?this.flush():(this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout(this.flush.bind(this),this.flushDebounceTime))}},{key:"sendPayload",value:function(){var e=this,t=this.queue;if(0!==t.length){this.queue=[];var n=[],r=[];if(t.forEach((function(t){var i=e.getGenericEventBody(t),o=e.envelop(t.id,i);e.trigger(o),"LixTreatmentsEvent"===o.eventInfo.eventName?n.push(o):r.push(o)})),!this.host.inactive){var i=this.shouldCompressPayload(),o=this.getRetryTreatment();Pi()?(r.length>0&&(("enabled"===o||"enabled_ls"===o)&&this.host.retryBeacon&&this.host.retryBeacon.shouldRetry?this.sendPayloadWithRetry(r):Ai(JSON.stringify(r),this.host.endpoint,i)),n.length>0&&Ai(JSON.stringify(n),this.host.endpoint,i)):[r,n].forEach((function(t){t.length>0&&function(e,t,n,r){var i=n.sendBeacon,o=n.fetch;if(i){var a=!1;try{a=i(t,e)}catch(e){if("object"!==Tn(e)||"Failed to execute 'sendBeacon()' on 'Window': Invalid argument."!==e.message)throw e&&(e.tags=["tracking:sendbeacon"]),e}if(a)return}o(t,Ri({body:e,keepalive:!1,compress:r})).catch((function(){}))}(JSON.stringify(t),e.host.endpoint,e.host.api,i)}))}}}},{key:"sendPayloadWithRetry",value:function(e){var t=Nn({},"content-type","text/plain;charset=UTF-8");e.length>0&&this.host.retryBeacon.beacon(this.host.endpoint,JSON.stringify(e),t).catch((function(e){Ni(e)||Ii.emit("retry:error",e)}))}},{key:"getRetryTreatment",value:function(){var e,t,n;return null!==(e=null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.retry"))&&void 0!==e?e:"control"}},{key:"shouldCompressPayload",value:function(){return!0!==this.host.disableCompression&&"undefined"!=typeof TextEncoder}}]),e}();function Li(e){if(!e)return{};var t=e.trk,n=!1,r=e.licu&&decodeURIComponent(e.licu);e.external_control&&(r="urn:li:externalControl:".concat(decodeURIComponent(e.external_control)),n=!0);var i=function(e){var t=decodeURIComponent(e).split(";");if(t.length>1)return{pageUrn:t[0],trackingId:t[1]}}(e.lipi),o=i&&{pageInstance:i,pageKey:t}||t&&{pageKey:t};if(e.external_page&&e.external_page_instance){var a=decodeURIComponent(e.external_page);o={pageInstance:{pageUrn:"urn:li:externalPage:".concat(a),trackingId:e.external_page_instance},pageKey:a},n=!0}var s=e.external_app&&e.external_app_instance?{applicationUrn:"urn:li:externalApplication:".concat(decodeURIComponent(e.external_app)),trackingId:e.external_app_instance,version:""}:void 0;return s&&((o=o||{}).applicationInstance=s),{fromExternalApp:n||!!s,previousApplicationInstance:s,previousContext:o,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:r}}function Mi(e){return"retryConfig"in e.host}var xi=function(){function e(t,n){if(Pn(this,e),Nn(this,"transporter",void 0),Nn(this,"delegate",void 0),Nn(this,"currentContext",void 0),Nn(this,"appState",void 0),Nn(this,"previousAppContext",void 0),Nn(this,"initialPageInstanceId",void 0),Nn(this,"customTransporters",void 0),this.transporter=t,this.delegate=n,this.appState={},this.customTransporters={},n&&n.customTransporterHosts)for(var r in n.customTransporterHosts)if(Object.prototype.hasOwnProperty.call(n.customTransporterHosts,r)){var i=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[r]=new Di(this.transporter.host.api.assign(i,n.customTransporterHosts[r]))}}return Rn(e,[{key:"host",get:function(){return this.transporter.host}},{key:"checkAndEnablePersistentRetry",value:function(){Mi(this.transporter)&&this.transporter.checkAndEnablePersistentRetry(this.delegate)}},{key:"flushAndClearPersistedEventsOnLogout",value:function(){this.forceFlush();var e=Mi(this.transporter)?this.transporter.clearPersistedEventsOnLogout():null;return null!=e?e:this.host.api.Promise.resolve()}},{key:"getCurrentContext",value:function(){if(this.currentContext)return vi(this.currentContext,this.host.api)}},{key:"setInitialPageInstanceId",value:function(e){this.initialPageInstanceId=e}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.navMetaFromSeed(e,Li(t));if(this.setCurrentContext(r.to),!n.suppressEventsFiring)return this.fireNavEvents(r)}},{key:"setCurrentContext",value:function(e){this.currentContext=vi(e,this.host.api)}},{key:"updateAppState",value:function(e){this.host.api.assign(this.appState,e)}},{key:"fireCIE",value:function(e,t,n,r,i){return this.fireEvent("ControlInteractionEvent",(function(n){var o=gi(n.pageKey,e),a={controlTrackingId:r,controlUrn:o,interactionType:t};return i&&i(o),a}),{context:n})}},{key:"fireEvent",value:function(e,t,n){if(!t){var r="string"==typeof e?e:e&&e.eventName,i=void 0===t?"undefined":null===t?"null":Tn(t);throw new Error('Firing tracking event "'.concat(r,'" with invalid body, you fired "').concat(i,'"'))}return this.fireEnvelope(this.generateEnvelope(e,t,n))}},{key:"fireEnvelope",value:function(e){var t,n;if(null!==(t=this.delegate)&&void 0!==t&&null!==(n=t.shouldAnonymizeMemberId)&&void 0!==n&&n.call(t))if(function(e){return"string"==typeof e}(e.id)){var r=e.id;e.id={eventName:r,topicName:r,shouldAnonymizeMemberId:!0}}else e.id.shouldAnonymizeMemberId=!0;var i=this.delegate&&this.delegate.preTransporter?this.delegate.preTransporter(e):e;if(i){var o=i.meta.transporterKey,a=o?this.customTransporters[o]:this.transporter;if(!a&&o)throw new Error("Could not find custom transporter: ".concat(o));return a.fireEvent(i)}return this.host.api.Promise.resolve(!0)}},{key:"generatePageInstance",value:function(e,t){return{pageUrn:"urn:li:page:".concat(e),trackingId:t||fi()}}},{key:"firePVE",value:function(e,t,n){var r={pageType:"full",totalTime:0,trackingCode:this.getTrackingCode(),trackingInfo:{}},i=this.host.api.assign(r,t),o=this.generateEnvelope("PageViewEvent",i,{context:n});return o.meta.requestHeader.pageKey=e,this.fireEnvelope(o)}},{key:"destroy",value:function(){for(var e in this.transporter.destroy(),this.customTransporters)this.customTransporters[e].destroy();Ii.clear()}},{key:"forceFlush",value:function(){for(var e in this.transporter.forceFlush(),this.customTransporters)this.customTransporters[e].forceFlush()}},{key:"generateControlUrn",value:function(e,t){return gi((t||this.currentContext||{pageKey:"unknown"}).pageKey,e)}},{key:"fireRawCIE",value:function(e,t,n,r){var i={controlTrackingId:r,controlUrn:e,interactionType:t};return{beacon:this.fireEvent("ControlInteractionEvent",i,{context:n}),controlUrn:e}}},{key:"generateNavigationEvent",value:function(e){var t=e.triggerId,n=e.triggerUrn,r=e.from;return{previousPageInstance:r&&r.pageInstance,triggerControlTrackingId:t,triggerControlUrn:n}}},{key:"getTrackingCode",value:function(){return this.previousAppContext&&this.previousAppContext.pageKey}},{key:"navMetaFromSeed",value:function(e,t){var n="NavigationEvent";this.previousAppContext=t.previousContext;var r=t.fromExternalApp?{eventName:n,topicName:"InboundNavigationEvent"}:n;return{from:t.previousContext,navEventId:r,to:{applicationInstance:t.applicationInstance,pageInstance:this.generatePageInstance(e,t.pageTrackingId),pageKey:e},triggerId:t.previousControlId,triggerUrn:t.previousControlUrn}}},{key:"fireNavEvents",value:function(e){var t=this.generateNavigationEvent(e),n=e.to,r=e.from,i=e.navEventId,o=this.generateEnvelope(i,t);o.meta.requestHeader.pageKey=n.pageKey;var a=r&&r.applicationInstance;return a&&(o.meta.header.clientApplicationInstance=a),this.host.api.Promise.all([this.firePVE(n.pageKey),this.fireEnvelope(o)])}},{key:"generateEnvelope",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={directive:n.directive,transporterKey:n.transporterKey,context:n.context||this.currentContext&&vi(this.currentContext,this.host.api),requestHeader:this.host.api.assign({trackingCode:this.getTrackingCode()},n.requestHeader||{}),header:this.host.api.assign({applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:this.appState.clientApplicationInstance},n.header||{})};return{body:"function"==typeof t?t:function(){return t},id:e,meta:r}}}]),e}();function Ui(e){return e.split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0)}var Hi,Fi=function(){function e(t,n){var r,i=this;Pn(this,e),Nn(this,"core",void 0),Nn(this,"protocol",void 0),Nn(this,"throttleKeySet",new Set),Nn(this,"config",void 0),Nn(this,"reportTransporterError",(function(e){e instanceof Error||(e=new Error(e||"An error occurred in the transporter")),i.reportError(e,["core-web-tracking:retry-idb","info"]).catch((function(){}))})),this.core=t;var o=this.core.host.api.location.protocol;this.protocol=o.substring(0,o.length-1),this.config={throttleTime:null!==(r=null==n?void 0:n.throttleTime)&&void 0!==r?r:100},Ii.on("retry:error",this.reportTransporterError)}return Rn(e,[{key:"reportError",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.callTreeId,o=void 0===i?"":i,a=e.message,s=e.name,c=e.stack,u=void 0===c?"":c,l=e.fileName,d=void 0===l?"":l,h=e.lineNumber,f=void 0===h?0:h,p=e.columnNumber,g=void 0===p?0:p,m=this.core.host,v=m.appId,y=m.appVersion,b=m.service,w=m.serviceInstance,E=m.treeID,k=void 0===E?"":E,C=m.api,I=C.Promise,T=C.location,S=T.host,_=T.pathname,P=T.search,A=T.hash,R=void 0===A?"":A,N=function(){return t.core.fireEvent("JavaScriptErrorEvent",(function(e){return{appId:v,e:{c:g,l:f,m:a,s:u,t:s,u:d},h:R,l:t.protocol,o:S,p:_,pageKey:e.pageKey,q:P,service:b,serviceInstance:w,serviceVersion:y,t:n,trackingID:e.pageInstance.trackingId,treeID:k,callTreeId:o}}))};if(this.config.throttleTime<0)return N();var O=Ui(s+a+u+n.join("")+o);return this.throttleKeySet.has(O)?I.resolve(!1):(this.throttleKeySet.add(O),setTimeout((function(){return t.throttleKeySet.delete(O)}),this.config.throttleTime),N())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),Ii.off("retry:error",this.reportTransporterError)}}]),e}(),Bi=function(){function e(){Pn(this,e),Nn(this,"userTimingEntries",[]),Nn(this,"longTasks",[]),Nn(this,"resourceTimingEntries",[]),Nn(this,"cdnData",void 0)}return Rn(e,[{key:"reset",value:function(){this.userTimingEntries=[],this.longTasks=[],this.resourceTimingEntries=[]}},{key:"attachTreeIds",value:function(e){this.resourceTimingEntries.forEach((function(t){var n=e.get(t.name);n&&(t.resourceTreeId=n)}))}},{key:"getData",value:function(){return{userTimingEntries:this.userTimingEntries,longTasks:this.longTasks,resourceTimingEntries:this.resourceTimingEntries.map(Vi),cdnData:this.cdnData}}}]),e}(),Ki=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function Vi(e){return Ki.reduce((function(t,n){var r=e[n];return void 0!==r&&(t[n]=r),t}),{})}function qi(e){if(e&&"function"==typeof e.now&&(e.timeOrigin||e.timing)){var t=e.now(),n=e.timing.navigationStart;return Math.round(t+n)}return Date.now()}function ji(e){var t=e||performance;return Math.round(t.now())}function zi(e){return e&&e.nodeType===Node.ELEMENT_NODE?e.id:"undefined"}function Wi(e,t,n){var r=[];return e&&"function"==typeof e.getEntriesByType&&(t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach((function(e){r.push({entryType:"MEASURE",name:e.name,startTime:e.startTime,duration:e.duration})})),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach((function(e){r.push({entryType:"MARK",name:e.name,startTime:e.startTime,duration:e.duration})})),n&&(e.clearMeasures(),e.clearMarks())),r}function Gi(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var Ji,Qi=function(){function e(t){Pn(this,e),Nn(this,"hostApis",void 0),Nn(this,"hostnameProperties",void 0),Nn(this,"usedHostnames",void 0),Nn(this,"abortController",void 0),Nn(this,"pendingPromises",void 0),this.hostApis=t;var n=t.AbortController;this.hostnameProperties={},this.usedHostnames=new Set,this.abortController=new n,this.pendingPromises=new Set}return Rn(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return bi(this.usedHostnames).map((function(t){return e.hostnameProperties[t]||{hostname:t,provider:"",ipVersion:"",httpVersion:""}}))}},{key:"getDataWhenReady",value:function(e){var t=this,n=this.hostApis,r=n.AbortController,i=n.Promise,o=yi(bi(this.pendingPromises),i),a=setTimeout((function(){t.abortController.abort(),t.abortController=new r}),e);return o.then((function(){return clearTimeout(a),t.getPresentData()}))}},{key:"inspectEntryForCdnData",value:function(e){var t=this;if(!(e.name.indexOf(".licdn.")<0)){var n,r,i=this.hostApis.assign,o=(n=e.name,r=this.hostApis.document,(Hi=Hi||r.createElement("a")).href=n,Hi.hostname);if(this.usedHostnames.add(o),!this.hostnameProperties[o]&&!this.isResourcePossiblyFromCache(e)){var a=this.fetchCdnFromUrl(e.name).then((function(e){var n=i({hostname:o},e);return t.hostnameProperties[o]||(t.hostnameProperties[o]=n),t.pendingPromises.delete(a),n}));this.pendingPromises.add(a)}}}},{key:"fetchCdnFromUrl",value:function(e){return(0,this.hostApis.fetch)(e,{method:"HEAD",signal:this.abortController.signal}).then((function(e){return{provider:e.headers.get("X-CDN")||"",ipVersion:e.headers.get("X-CDN-CLIENT-IP-VERSION")||"",httpVersion:e.headers.get("X-CDN-Proto")||""}}))}},{key:"isResourcePossiblyFromCache",value:function(e){return void 0!==e.transferSize?0===e.transferSize:e.domainLookupStart===e.domainLookupEnd&&e.connectEnd===e.connectStart&&0===e.secureConnectionStart}}]),e}(),Yi=function(){function e(t,n,r){var i=this;Pn(this,e),Nn(this,"hostApis",void 0),Nn(this,"statics",void 0),Nn(this,"options",void 0),Nn(this,"collectResourceTimings",void 0),Nn(this,"collectCdnData",void 0),Nn(this,"perfObserver",void 0),Nn(this,"renderTimings",new Map),Nn(this,"urlToTreeId",new Map),Nn(this,"cdnDataProvider",void 0),Nn(this,"currentCollect",void 0),Nn(this,"currentTimer",void 0),Nn(this,"collectWhileWaitingForAsync",void 0),Nn(this,"onBeforeHideHandler",(function(){i.collectAndClearTimer(!0)})),Nn(this,"observables",new Bi),Nn(this,"isInitial",!0),this.hostApis=t,this.statics=n,this.options=r,this.collectResourceTimings=r["enable-rs-timing"],this.collectCdnData=r["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new Qi(t))}return Rn(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e,t){return(Hi=Hi||t.createElement("a")).href=e,Hi.href}(t,this.hostApis.document),e)}},{key:"recordRenderStart",value:function(e,t){this.renderTimings.has(e)||this.renderTimings.set(e,{renderName:t,viewId:e,renderStart:qi(this.hostApis.performance)})}},{key:"recordRenderEnd",value:function(e){var t=this.renderTimings.get(e);t&&(t.renderEnd=t.renderEnd||qi(this.hostApis.performance))}},{key:"startObserving",value:function(){var e=this.hostApis,t=e.PerformanceObserver,n=e.performance;this.stopObserving(),t?this.setupPerformanceObserver(t):this.collectResourceTimings&&this.emulateResourceTimingObserver(n),this.collectResourceTimings&&this.processNewResourceTimings()}},{key:"stopObserving",value:function(){var e;this.collectAndClearTimer(!0),null===(e=this.perfObserver)||void 0===e||e.disconnect(),this.reset()}},{key:"collectAndClearTimer",value:function(e){this.currentCollect?(this.currentCollect(e),clearTimeout(this.currentTimer),this.currentCollect=null,this.currentTimer=null):e&&this.collectWhileWaitingForAsync&&this.collectWhileWaitingForAsync()}},{key:"collect",value:function(e){var t=this,n=this.isInitial;this.isInitial=!1;var r=this.hostApis,i=r.assign,o=r.PerformanceObserver,a=r.Promise;this.currentCollect=function(r){Ii.offBefore("hide",t.onBeforeHideHandler);var s=function(){var r=Object.create(null);t.observables.cdnData=t.collectCdnData?t.cdnDataProvider.getPresentData():null,o||(t.observables.userTimingEntries=Wi(t.hostApis.performance,t.options,!0),t.collectResourceTimings&&t.processNewResourceTimings()),t.observables.attachTreeIds(t.urlToTreeId),t.urlToTreeId.clear();var a=t.observables.getData(),s=t.extractUsedCDN(a.cdnData||[]);i(t.statics,s),i(r,a,t.snapshot,t.statics),n&&(i(r,function(e){if(!e)return{navigationTimingApi:!1};var t=Object.create({});if("function"==typeof e.getEntriesByType){var n=e.getEntriesByType("navigation")[0];n&&(["fetchStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"].every((function(e){return"number"==typeof n[e]}))&&(t.htmlMetrics={htmlFetchStart:n.fetchStart,htmlResponseEnd:n.responseEnd,htmlDecodedBodySize:n.decodedBodySize,htmlEncodedBodySize:n.encodedBodySize,htmlTransferSize:n.transferSize}),t.workerStart=n.workerStart)}var r=e.timing,i=e.navigation;return r&&i?(t.navigationTimingApi=!0,Xi.forEach((function(e){e in r&&(t[e]=r[e])})),t.navigationType=i.type,t.redirectCount=i.redirectCount):t.navigationTimingApi=!1,t}(t.hostApis.performance)),t.statics.pageLoadMode="PARTIAL"),t.reset(),e(r)};if(r)s();else{t.collectWhileWaitingForAsync=s;var c=[];t.collectCdnData&&c.push(t.cdnDataProvider.getDataWhenReady(t.options["async-plugins-timeout"]).then((function(e){t.observables.cdnData=e}))),c.length>0?yi(c,a).then((function(){t.collectWhileWaitingForAsync=null,s()})):s()}},Ii.before("hide",this.onBeforeHideHandler),this.currentTimer=setTimeout((function(){t.currentCollect(!1),t.currentCollect=null,t.currentTimer=null}),this.options["beacon-timeout"])}},{key:"setupPerformanceObserver",value:function(e){var t=this;this.perfObserver=new e((function(e){e.getEntries().forEach((function(e){var n=e.entryType,r=e.name,i=e.startTime,o=e.duration;"resource"===n?t.processSingleResourceTiming(e):"mark"===n?t.observables.userTimingEntries.push({entryType:"MARK",name:r,startTime:i,duration:o}):"measure"===n?t.observables.userTimingEntries.push({entryType:"MEASURE",name:r,startTime:i,duration:o}):"longtask"===n&&t.observables.longTasks.push({duration:o,name:r,startTime:i})}))})),this.observables.userTimingEntries=Wi(this.hostApis.performance,this.options,!1);var n=["longtask"];(this.collectResourceTimings||this.collectCdnData)&&n.push("resource"),this.options["user-timing-mark-enabled"]&&n.push("mark"),this.options["user-timing-measure-enabled"]&&n.push("measure"),this.perfObserver.observe({entryTypes:n})}},{key:"emulateResourceTimingObserver",value:function(e){var t=this;e&&"function"==typeof e.setResourceTimingBufferSize&&"function"==typeof e.onresourcetimingbufferfull&&(e.setResourceTimingBufferSize(100),e.onresourcetimingbufferfull=function(){return t.processNewResourceTimings()})}},{key:"processNewResourceTimings",value:function(){var e=this,t=this.hostApis.performance;"function"==typeof t.getEntriesByType&&"function"==typeof t.clearResourceTimings&&(t.getEntriesByType("resource").forEach((function(t){return e.processSingleResourceTiming(t)})),t.clearResourceTimings())}},{key:"processSingleResourceTiming",value:function(e){this.collectResourceTimings&&this.observables.resourceTimingEntries.push(e),this.collectCdnData&&this.cdnDataProvider.inspectEntryForCdnData(e)}},{key:"extractUsedCDN",value:function(e){var t=e.filter((function(e){return e.hostname.indexOf("static")>=0})),n=t.length>0?t[0]:{hostname:"",provider:"",httpVersion:"",ipVersion:""};return{usedCDN:{static_domain:n.provider,http_version:n.httpVersion,ip_version:n.ipVersion}}}},{key:"reset",value:function(){var e;this.observables.reset(),null===(e=this.cdnDataProvider)||void 0===e||e.clearUsedHostnames()}},{key:"snapshot",get:function(){var e={detailedRenderTimingEntries:Gi(this.renderTimings),networkInformationMetrics:$i(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}(),Xi=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"];function $i(e){return e?{connectionType:e.type&&e.type.toUpperCase()||"UNKNOWN",effectiveType:function(e){switch(e){case"2g":return"TWO_G";case"3g":return"THREE_G";case"4g":return"FOUR_G";default:return"SLOW_2G"}}(e.effectiveType),roundTripTime:e.rtt||-1,downlinkBandwidth:e.downlink||-1,downlinkMaxBandwidth:void 0===e.downlinkMax?-1:e.downlinkMax===1/0?0:e.downlinkMax}:void 0}!function(e){e.RealUserMonitoringEvent="RealUserMonitoringEvent",e.FeaturePerformanceMeasurementEvent="FeaturePerformanceMeasurementEvent",e.ClientPerfMetricsEvent="ClientPerfMetricsEvent",e.WEB_UI_FRAMEWORK="web-ui-framework",e.APP_ID="app-id",e.APP_VERSION="app-version",e.IS_SINGLE_PAGE_APP="is-single-page-app",e.IS_APP_RENDER_FAILED="is-app-render-failed",e.APP_RENDER_MODE="app-render-mode",e.USER_TIMING_MARK_ENABLED="user-timing-mark-enabled",e.USER_TIMING_MEASURE_ENABLED="user-timing-measure-enabled",e.BEACON_SOURCE="beacon-source",e.BEACON_TIMEOUT="beacon-timeout",e.ENABLE_RS_TIMING="enable-rs-timing",e.ENABLE_CDN_TRACKING="enable-cdn-tracking",e.ASYNC_PLUGINS_TIMEOUT="async-plugins-timeout",e.ENABLE_MEMORY_MEASUREMENT="enable-memory-measurement"}(Ji||(Ji={}));var Zi,eo,to,no,ro,io,oo,ao,so=(Nn(pn={},"web-ui-framework","EMBER"),Nn(pn,"app-id","linkedin.rum.tracking"),Nn(pn,"app-version","unknown"),Nn(pn,"is-single-page-app",!0),Nn(pn,"user-timing-mark-enabled",!1),Nn(pn,"user-timing-measure-enabled",!0),Nn(pn,"beacon-source","apps"),Nn(pn,"enable-rs-timing",!0),Nn(pn,"enable-cdn-tracking",!1),Nn(pn,"async-plugins-timeout",5e3),Nn(pn,"beacon-timeout",3e4),Nn(pn,"enable-memory-measurement",!1),pn),co=Rn((function e(t,n,r){Pn(this,e),Nn(this,"webUIFramework",void 0),Nn(this,"timeSource",void 0),Nn(this,"isSinglePageApp",void 0),Nn(this,"appRenderMode",void 0),Nn(this,"isAppRenderFailed",void 0),Nn(this,"pageLoadMode","INITIAL"),Nn(this,"isSSL",void 0),Nn(this,"treeId",void 0),Nn(this,"isFromServiceWorker",void 0),Nn(this,"usedCDN",void 0),this.webUIFramework=n["web-ui-framework"],this.timeSource=n["beacon-source"],this.isSinglePageApp=n["is-single-page-app"],this.appRenderMode=t["app-render-mode"],this.isAppRenderFailed=t["is-app-render-failed"],this.isSSL="https:"===r.api.location.protocol?1:0,this.treeId=r.treeID,this.isFromServiceWorker=r.isFromServiceWorker})),uo=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v1-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},lo=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},ho=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},fo=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},po="function"==typeof WeakSet?new WeakSet:new Set,go=function(e,t,n){var r;return function(){t.value>=0&&(n||po.has(t)||"hidden"===document.visibilityState)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},mo=function(e,t){var n,r=uo("CLS",0),i=function(e){e.hadRecentInput||(r.value+=e.value,r.entries.push(e),n())},o=lo("layout-shift",i);o&&(n=go(e,r,t),ho((function(){o.takeRecords().map(i),n()})),fo((function(){r=uo("CLS",0),n=go(e,r,t)})))},vo=-1,yo=function(){return"hidden"===document.visibilityState?0:1/0},bo=function(){ho((function(e){var t=e.timeStamp;vo=t}),!0)},wo=function(){return vo<0&&(vo=yo(),bo(),fo((function(){setTimeout((function(){vo=yo(),bo()}),0)}))),{get timeStamp(){return vo}}},Eo={passive:!0,capture:!0},ko=new Date,Co=function(e,t){Zi||(Zi=t,eo=e,to=new Date,So(removeEventListener),Io())},Io=function(){if(eo>=0&&eo<to-ko){var e={entryType:"first-input",name:Zi.type,target:Zi.target,cancelable:Zi.cancelable,startTime:Zi.timeStamp,processingStart:Zi.timeStamp+eo};no.forEach((function(t){t(e)})),no=[]}},To=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Co(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,Eo),removeEventListener("pointercancel",r,Eo)};addEventListener("pointerup",n,Eo),addEventListener("pointercancel",r,Eo)}(t,e):Co(t,e)}},So=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,To,Eo)}))},_o=function(e,t){var n,r=wo(),i=uo("FID"),o=function(e){e.startTime<r.timeStamp&&(i.value=e.processingStart-e.startTime,i.entries.push(e),po.add(i),n())},a=lo("first-input",o);n=go(e,i,t),a&&ho((function(){a.takeRecords().map(o),a.disconnect()}),!0),a&&fo((function(){var r;i=uo("FID"),n=go(e,i,t),no=[],eo=-1,Zi=null,So(addEventListener),r=o,no.push(r),Io()}))},Po=function(e,t){var n,r=wo(),i=uo("LCP"),o=function(e){var t=e.startTime;t<r.timeStamp&&(i.value=t,i.entries.push(e)),n()},a=lo("largest-contentful-paint",o);if(a){n=go(e,i,t);var s=function(){po.has(i)||(a.takeRecords().map(o),a.disconnect(),po.add(i),n())};["keydown","click"].forEach((function(e){addEventListener(e,s,{once:!0,capture:!0})})),ho(s,!0),fo((function(r){i=uo("LCP"),n=go(e,i,t),requestAnimationFrame((function(){requestAnimationFrame((function(){i.value=performance.now()-r.timeStamp,po.add(i),n()}))}))}))}},Ao=function(e,t){return{name:e,value:void 0===t?-1:t,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},Ro=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},No=function(e,t){var n=function n(r){"pagehide"!==r.type&&"hidden"!==document.visibilityState||(e(r),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Oo=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},Do=function(e,t,n){var r;return function(i){t.value>=0&&(i||n)&&(t.delta=t.value-(r||0),(t.delta||void 0===r)&&(r=t.value,e(t)))}},Lo=-1,Mo=function(){return"hidden"===document.visibilityState?0:1/0},xo=function(){No((function(e){var t=e.timeStamp;Lo=t}),!0)},Uo=function(){return Lo<0&&(Lo=Mo(),xo(),Oo((function(){setTimeout((function(){Lo=Mo(),xo()}),0)}))),{get firstHiddenTime(){return Lo}}},Ho=!1,Fo=-1,Bo={passive:!0,capture:!0},Ko=new Date,Vo=function(e,t){ro||(ro=t,io=e,oo=new Date,zo(removeEventListener),qo())},qo=function(){if(io>=0&&io<oo-Ko){var e={entryType:"first-input",name:ro.type,target:ro.target,cancelable:ro.cancelable,startTime:ro.timeStamp,processingStart:ro.timeStamp+io};ao.forEach((function(t){t(e)})),ao=[]}},jo=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Vo(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,Bo),removeEventListener("pointercancel",r,Bo)};addEventListener("pointerup",n,Bo),addEventListener("pointercancel",r,Bo)}(t,e):Vo(t,e)}},zo=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,jo,Bo)}))},Wo={},Go=function(e,t){Ho||(function(e,t){var n,r=Uo(),i=Ao("FCP"),o=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=e.startTime,i.entries.push(e),n(!0)))},a=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=a?null:Ro("paint",o);(a||s)&&(n=Do(e,i,t),a&&o(a),Oo((function(r){i=Ao("FCP"),n=Do(e,i,t),requestAnimationFrame((function(){requestAnimationFrame((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))})))}((function(e){Fo=e.value})),Ho=!0);var n,r=function(t){Fo>-1&&e(t)},i=Ao("CLS",0),o=0,a=[],s=function(e){if(!e.hadRecentInput){var t=a[0],r=a[a.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,a.push(e)):(o=e.value,a=[e]),o>i.value&&(i.value=o,i.entries=a,n())}},c=Ro("layout-shift",s);c&&(n=Do(r,i,t),No((function(){c.takeRecords().map(s),n(!0)})),Oo((function(){o=0,Fo=-1,i=Ao("CLS",0),n=Do(r,i,t)})))},Jo=function(e,t){var n,r=Uo(),i=Ao("FID"),o=function(e){e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),n(!0))},a=Ro("first-input",o);n=Do(e,i,t),a&&No((function(){a.takeRecords().map(o),a.disconnect()}),!0),a&&Oo((function(){var r;i=Ao("FID"),n=Do(e,i,t),ao=[],io=-1,ro=null,zo(addEventListener),r=o,ao.push(r),qo()}))},Qo=function(e,t){var n,r=Uo(),i=Ao("LCP"),o=function(e){var t=e.startTime;t<r.firstHiddenTime&&(i.value=t,i.entries.push(e)),n()},a=Ro("largest-contentful-paint",o);if(a){n=Do(e,i,t);var s=function(){Wo[i.id]||(a.takeRecords().map(o),a.disconnect(),Wo[i.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,s,{once:!0,capture:!0})})),No(s,!0),Oo((function(r){i=Ao("LCP"),n=Do(e,i,t),requestAnimationFrame((function(){requestAnimationFrame((function(){i.value=performance.now()-r.timeStamp,Wo[i.id]=!0,n(!0)}))}))}))}},Yo=["LCP","FID","CLS"],Xo={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"},$o={},Zo=!1,ea=[];function ta(e){$o[e]={name:e,value:-1,time:-1};var t=Xo[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||($o[e].value=-2)}function na(e){var t=$o[e.name];t&&(t.value=e.value),ea.forEach((function(t){return t(e)}))}var ra=function(){function e(t,n){Pn(this,e),Nn(this,"basePageTreeId",void 0),Nn(this,"startPageInstance",void 0),Nn(this,"observing",!1),Nn(this,"reportingState",{}),Nn(this,"rumConfig",void 0),Nn(this,"trackingCore",void 0),Nn(this,"removeOnHiddenListener",(function(){})),this.trackingCore=t,this.rumConfig=n}return Rn(e,[{key:"startObserving",value:function(){var e,t,n,r=this;(function(e){var t=!0===window.__test__resetWebVitalsState;Zo&&!t||(t&&(ea=[]),Yo.forEach(ta),e?[Qo,Jo,Go].forEach((function(e){return e(na)})):[Po,_o,mo].forEach((function(e){return e(na)})),Zo=!0)})("enabled"===(null===(e=(t=this.trackingCore.host).__getLixTreatment)||void 0===e?void 0:e.call(t,"pemberly.tracking.web-vitals-v2"))),this.observing||(this.observing=!0,this.basePageTreeId=this.trackingCore.host.treeID||"",this.startPageInstance=(null===(n=this.trackingCore.getCurrentContext())||void 0===n?void 0:n.pageInstance)||pi("unknown"),Yo.forEach((function(e){var t;r.reportingState[e]=!1,-2===(null===(t=$o[e])||void 0===t?void 0:t.value)&&r.reportMetric(e)})),ea.push(this.handleMetricUpdate.bind(this)),this.removeOnHiddenListener=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=function n(r){"hidden"===document.visibilityState&&(e(r),t&&removeEventListener("visibilitychange",n,!0))};return addEventListener("visibilitychange",n,!0),function(){removeEventListener("visibilitychange",n,!0)}}(this.reportAllRemaining.bind(this)))}},{key:"stopObserving",value:function(){this.observing=!1,this.removeOnHiddenListener()}},{key:"handleMetricUpdate",value:function(e){var t,n,r,i=$o[e.name];if(this.observing&&i&&!1===this.reportingState[e.name]){switch(e.name){case"LCP":i.metadata=(t=e.entries).length>0?(r={element:zi((n=t[t.length-1]).element),renderTime:Math.round(n.renderTime),loadTime:Math.round(n.loadTime),size:Math.round(n.size)},n.url&&(r.url=n.url),r):null;break;case"FID":i.metadata=function(e){var t;return e.length>0?(t=e[e.length-1],{startTime:Math.round(t.startTime)}):null}(e.entries);break;case"CLS":i.metadata=function(e){var t;if(e.length>0){var n,r=void 0;return(t=e.reduce((function(e,t){return e&&e.value>t.value?e:t}))).sources&&t.sources.length&&(r=t.sources.reduce((function(e,t){return e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t}))),{shiftCount:e.length,"largestShift.value":t.value,"largestShift.hadRecentInput":t.hadRecentInput,"largestShift.largestSource.node":zi(null===(n=r)||void 0===n?void 0:n.node),"largestShift.sessionTime":Math.round(t.startTime)}}return null}(e.entries)}this.reportMetric(e.name)}}},{key:"reportMetric",value:function(e){var t,n;!1===this.reportingState[e]&&("enabled"===(null===(t=(n=this.trackingCore.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.web-vitals-pipeline-migration"))?this.reportViaClientPerfEvent(e):this.reportViaFpmEvent(e),this.reportingState[e]=!0)}},{key:"reportViaClientPerfEvent",value:function(e){var t=$o[e],n={name:e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value),t.metadata&&(n.metadata=this.formatMetadata(t.metadata));var r={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},r)}},{key:"reportViaFpmEvent",value:function(e){var t=$o[e],n={basePageTreeId:this.basePageTreeId,name:e,startTime:ji(this.trackingCore.host.api.performance),duration:this.formatValue(t.value,e),startPageInstance:this.startPageInstance,marks:[],spans:[]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"FeaturePerformanceMeasurementEvent"},n)}},{key:"reportAllRemaining",value:function(){var e=this;Yo.forEach((function(t){t in $o&&!1===e.reportingState[t]&&e.reportMetric(t)})),this.trackingCore.forceFlush()}},{key:"formatValue",value:function(e,t){var n=e;return-1===e||-2===e?n:("CLS"===t&&(n*=1e5),Math.round(n))}},{key:"formatMetadata",value:function(e){var t={};return Object.keys(e).forEach((function(n){t[n]="string"==typeof e[n]?e[n]:JSON.stringify(e[n])})),t}}]),e}(),ia=function(){function e(t,n,r){Pn(this,e),Nn(this,"featureName",void 0),Nn(this,"trackingCore",void 0),Nn(this,"rumConfig",void 0),Nn(this,"observing",!1),Nn(this,"basePageTreeId",void 0),Nn(this,"startPageInstance",void 0),Nn(this,"startMemory",void 0),Nn(this,"reportTimeouts",[]),this.featureName=t,this.trackingCore=n,this.rumConfig=r}return Rn(e,[{key:"startObserving",value:function(){var t,n=this,r=this.getMemory();r&&!this.observing&&(this.basePageTreeId=this.trackingCore.host.treeID||"",this.startPageInstance=(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance)||pi("unknown"),this.startMemory=r,this.reportTimeouts=e.checkpoints.map((function(e){return setTimeout(n.reportMemory.bind(n,e),60*e*1e3)})))}},{key:"stopObserving",value:function(){this.reportTimeouts.forEach((function(e){return clearTimeout(e)})),this.observing=!1}},{key:"reportMemory",value:function(e){var t={name:this.featureName,basePageTreeId:this.basePageTreeId,startTime:ji(this.trackingCore.host.api.performance),duration:0,startPageInstance:this.startPageInstance,marks:this.createMemoryMarks("-".concat(e,"min")),spans:[]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"FeaturePerformanceMeasurementEvent"},t)}},{key:"createMemoryMarks",value:function(e){var t=this.getMemory(),n=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"].map((function(n){return{name:n+e,startTime:t[n]}})),r=t.usedJSHeapSize-this.startMemory.usedJSHeapSize;return n.push({name:(r<0?"usedJSHeapSizeDecrease":"usedJSHeapSizeIncrease")+e,startTime:Math.abs(r)},{name:"utilization"+e,startTime:Math.round(t.usedJSHeapSize/t.totalJSHeapSize*100)}),n}},{key:"getMemory",value:function(){return this.trackingCore.host.api.performance.memory}}]),e}();Nn(ia,"checkpoints",[1,3,10,30,90,180,300]);var oa=function(){function e(t,n,r){Pn(this,e),Nn(this,"core",void 0),Nn(this,"config",void 0),Nn(this,"perfTimeWM",new WeakMap),Nn(this,"collector",void 0),Nn(this,"boomerangStart",-1),Nn(this,"webVitalsObserver",void 0),Nn(this,"appMemoryObserver",void 0),Nn(this,"pageMemoryObserver",void 0),this.core=r,this.config=function(e,t){for(var n in e)void 0!==t[n]&&(e[n]=t[n]);return e}(r.host.api.assign({},so),n),this.collector=new Yi(r.host.api,new co(t,this.config,r.host),this.config),this.collector.startObserving()}return Rn(e,[{key:"pingCDN",value:function(){}},{key:"recordTreeId",value:function(e,t){e&&this.collector.recordTreeId(e,t)}},{key:"recordRenderStart",value:function(e,t){this.collector.recordRenderStart(e,t||e)}},{key:"recordRenderEnd",value:function(e){this.collector.recordRenderEnd(e)}},{key:"start",value:function(){var e,t;this.collector.collectAndClearTimer(!1);var n,r=Object.create(null);return this.perfTimeWM.set(r,qi(this.core.host.api.performance)),(this.config["enable-memory-measurement"]||"enabled"===(null===(e=(t=this.core.host).__getLixTreatment)||void 0===e?void 0:e.call(t,"pemberly.tracking.rum-memory-measurement")))&&(null===(n=this.pageMemoryObserver)||void 0===n||n.stopObserving(),this.pageMemoryObserver=new ia("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new ia("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),r}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new ra(this.core,this.config),this.webVitalsObserver.startObserving())}},{key:"end",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2?arguments[2]:void 0,i=this.core.host.api,o=i.performance,a=i.assign,s=this.perfTimeWM.get(e);if(void 0===s)throw new Error("The rum token passed in is invalid");this.perfTimeWM.delete(e);var c=qi(o),u=this.config["app-version"];this.collector.collect((function(e){var i=t.boomerangStart=e.navigationStart||t.boomerangStart,o=e.navigationStart||s,l=c-o;t.core.fireEvent({appId:t.config["app-id"],eventName:"RealUserMonitoringEvent"},(function(t){return a({pageKey:r||t.pageKey,isImpactedByHiddenWindow:n,appVersion:u,timeDone:l,navigationStart:o,boomerangStart:i,renderCompleteTime:c},e)}))}))}},{key:"destroy",value:function(){var e,t,n;this.collector.stopObserving(),null===(e=this.webVitalsObserver)||void 0===e||e.stopObserving(),null===(t=this.appMemoryObserver)||void 0===t||t.stopObserving(),null===(n=this.pageMemoryObserver)||void 0===n||n.stopObserving(),this.core.destroy()}}]),e}(),aa="undefined"!=typeof window&&"undefined"!=typeof performance,sa="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG"),ca=new Set;!function(){function e(t){Pn(this,e),Nn(this,"name",void 0),Nn(this,"endPageInstance",void 0),Nn(this,"startPageInstance",void 0),Nn(this,"isCanceled",!1),Nn(this,"startTime",void 0),Nn(this,"duration",void 0),Nn(this,"marks",[]),Nn(this,"spanStarts",new Map),Nn(this,"spans",[]),Nn(this,"basePageTreeId",void 0),Nn(this,"isClosed",!1),Nn(this,"isOverlapping",void 0),this.name=t}Rn(e,[{key:"start",value:function(e){this.startPageInstance=e,aa&&(this.startTime=ji(),sa&&performance.mark("LI:".concat(this.name,"-start")),ca.has(this.name)?this.isOverlapping=!0:ca.add(this.name))}},{key:"mark",value:function(e){aa&&(this.marks.push({name:e,startTime:ji()}),sa&&(performance.mark("LI:".concat(this.name,"-mark-").concat(e)),performance.measure("LI:".concat(this.name,"-mark-").concat(e),"LI:".concat(this.name,"-start"),"LI:".concat(this.name,"-mark-").concat(e))))}},{key:"spanStart",value:function(e){aa&&(this.spanStarts.set(e,ji()),sa&&performance.mark("LI:".concat(this.name,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(aa&&this.spanStarts.has(e)){var n=this.spanStarts.get(e);this.spans.push({name:t||e,startTime:n,duration:ji()-n}),sa&&(performance.mark("LI:".concat(this.name,"-span-").concat(e,"-end")),performance.measure("LI:".concat(this.name,"-span-").concat(t||e),"LI:".concat(this.name,"-span-").concat(e,"-start"),"LI:".concat(this.name,"-span-").concat(e,"-end")))}}},{key:"end",value:function(e){if(!this.isClosed){if(this.isClosed=!0,this.isCanceled)throw new Error('[rum measurement] cannot end a canceled measurement "'.concat(this.name,'"'));this.endPageInstance=e,aa&&(this.duration=ji()-this.startTime,sa&&(performance.mark("LI:".concat(this.name,"-end")),performance.measure("LI:".concat(this.name),"LI:".concat(this.name,"-start"),"LI:".concat(this.name,"-end"))),this.isOverlapping||ca.delete(this.name),this.cleanUp())}}},{key:"cancel",value:function(){this.isCanceled||(this.isCanceled=!0,this.isOverlapping||ca.delete(this.name))}},{key:"setBasePageTreeId",value:function(e){this.basePageTreeId=e}},{key:"toEventBody",value:function(){if(aa)return{name:this.name,startTime:this.startTime,duration:this.duration,basePageTreeId:this.basePageTreeId,startPageInstance:this.startPageInstance||pi("unknown"),marks:this.marks,spans:this.spans}}},{key:"check",value:function(){if(aa){if(this.isCanceled)throw new Error('[rum measurement] "'.concat(this.name,'" has been canceled'));if(!this.isClosed)throw new Error('[rum measurement] "'.concat(this.name,'" is still open'));if(this.isOverlapping)throw new Error('[rum measurement] multiple "'.concat(this.name,'" found'));for(var e=0,t=["startTime","duration","basePageTreeId"];e<t.length;e++){var n=t[e];if(void 0===this[n])throw new Error('[rum measurement] "'.concat(this.name,'" is missing "').concat(n,'"'))}}}},{key:"cleanUp",value:function(){this.spanStarts.clear()}}])}();class ua{constructor(e){if(!e)throw new Error("JetCore missing required only parameter (`trackingCore`)");this.cwtJetCoreInstance=new Fi(e),this.seenErrors=new Set}bind(e,t){e||(e=[]),e.push("guest-seo"),window.addEventListener("error",(n=>{const r={message:n.error.message,stack:n.error.stack,fileName:n.filename,lineNumber:n.lineno,columnNumber:n.colno};this.reportError(r,e,t)})),window.addEventListener("unhandledrejection",(n=>{const r={message:n.reason};this.reportError(r,e,t)}))}reportError(e,t,n){if(!this.seenErrors.has(e.stack))return this.seenErrors.add(e.stack),this.cwtJetCoreInstance.reportError(e,t,{callTreeId:n})}}const la="data-tracking-control-name";class da{constructor(){let{ingraphs:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.ingraphs=e,!e)throw new Error("ControlInteractionTracking requires an Ingraphs instance");document.body.addEventListener("click",this._handleBodyClicks.bind(this),!0)}_handleBodyClicks(e){const{target:t}=e,n=Z(t,"[".concat(la,"]"));if(null===n)return;const r=n.getAttribute(la);n.hasAttribute("data-tracking-client-ingraph")&&this._fireClientIngraphMetric(r)}_fireClientIngraphMetric(e){this.ingraphs.fireCounterIngraphMetric({metricsType:"controlInteractionEvent-".concat(e),sendBeacon:!0})}}const ha="li_trk_navigation",fa="undefined";function pa(){if(typeof window!==fa&&typeof window.sessionStorage!==fa)try{return JSON.parse(window.sessionStorage.getItem(ha))}catch(e){}}function ga(e){if(typeof window!==fa&&typeof window.sessionStorage!==fa)try{window.sessionStorage.setItem(ha,JSON.stringify(e))}catch(e){}}const ma="ExternalNavigationEvent",va="ControlInteractionEvent",ya="PageVisibilityChangeEvent",ba="PageViewHeartbeatEvent",wa="LinksterImpressionEvent",Ea={FOCUS:"FOCUS",UNFOCUS:"UNFOCUS",KEYBOARD_SUBMIT:"KEYBOARD_SUBMIT",DRAG:"DRAG",PINCH_OPEN:"PINCH_OPEN",PINCH_CLOSE:"PINCH_CLOSE",DOUBLE_PRESS:"DOUBLE_PRESS",LONG_PRESS:"LONG_PRESS",SHORT_PRESS:"SHORT_PRESS",SWIPE_UP:"SWIPE_UP",SWIPE_DOWN:"SWIPE_DOWN",SWIPE_LEFT:"SWIPE_LEFT",SWIPE_RIGHT:"SWIPE_RIGHT",FLICK_UP:"FLICK_UP",FLICK_DOWN:"FLICK_DOWN",FLICK_LEFT:"FLICK_LEFT",FLICK_RIGHT:"FLICK_RIGHT",SHAKE:"SHAKE",KEYBOARD_NEXT:"KEYBOARD_NEXT",HOVER:"HOVER"};function ka(e){return e?e.split(":").pop():null}function Ca(e,t){return e&&t?"urn:li:control:".concat(t,"-").concat(e):null}class Ia{constructor(e){let{globalWindow:t=window,globalDocument:n=document}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.window=t,this.document=n,this._trackingCore=e,Object.defineProperty(this._trackingCore,"state",{get:function(){return{currentPageInstance:this.getCurrentContext().pageInstance,previousPageInstance:this.previousAppContext&&this.previousAppContext.pageInstance}}}),this.document){this.document.body.addEventListener("click",(e=>this._handleDocumentClicks(e)),!0),this.document.body.addEventListener("click",(e=>this._handleDocumentClicksBubble(e)),!1);let e="visibilitychange";void 0!==this.document.msHidden&&(e="msvisibilitychange"),this.document.addEventListener(e,(e=>this._handleDocumentVisibilityChange(e)),!0)}this.window&&this.window.addEventListener("beforeunload",(e=>this._handleWindowBeforeUnload(e)),!0)}getAppSeedQps(){let e={};const t=function(){const e=window.location.pathname,t=e+window.location.search,n=window.location.href;let r=pa();if(!r)return null;for(let i=0;i<r.length;i++){const o=r[i].href;if(o===e||o===t||o===n){const e=r.splice(i,1)[0];return ga(r),e}}return null}();if(t){const n=ka(t.prevInstance.pageUrn);e.lipi="".concat(t.prevInstance.pageUrn,";").concat(t.prevInstance.trackingId),e.licu=Ca(t.controlName,n)}if(this.window){const t=re(this.window.location.href,"trk",!1);t&&(e.trk=t)}return e}navigate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full";const n=G(this.document),r={pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:n}},i=this._trackingCore.navMetaFromSeed(e,Li(this.getAppSeedQps()));return this._trackingCore.setCurrentContext(i.to),this.fireNavEvents(i,r)}fireNavEvents(e,t){const n=this._trackingCore.generateNavigationEvent(e),{to:r,from:i,navEventId:o}=e,a=this._trackingCore.generateEnvelope(o,n);a.meta.requestHeader.pageKey=r.pageKey;const s=i&&i.applicationInstance;return s&&(a.meta.header.clientApplicationInstance=s),this._trackingCore.host.api.Promise.all([this.firePVE(r.pageKey,t),this._trackingCore.fireEnvelope(a)])}firePVE(e,t,n){return this._trackingCore.firePVE(e,t,n)}_handleWindowBeforeUnload(e){const t=e.target.activeElement;let n=t,r=null,i=!1;if(t){for(;n!==e.currentTarget&&("function"!=typeof n.hasAttribute||!n.hasAttribute("data-tracking-control-name"))&&n.parentElement;)n=n.parentElement;n!==e.currentTarget&&("getAttribute"in n&&(r=n.getAttribute("data-tracking-control-name")),"hasAttribute"in n&&(i=n.hasAttribute("data-tracking-will-navigate")))}i||this.fireExternalNavigationEvent(r)}_handleDocumentClicks(e){let t=Z(e.target,"[data-tracking-control-name]");if(!t)return;const n=t.getAttribute("data-tracking-control-name");!t.hasAttribute("data-tracking-no-cie")&&this.fireControlInteractionEvent(n)}_handleDocumentClicksBubble(e){let t=Z(e.target,"[data-tracking-control-name]");if(!t)return;const n=t.getAttribute("data-tracking-control-name"),r=t.hasAttribute("data-tracking-will-navigate"),i=t.getAttribute("data-tracking-href")||t.getAttribute("href");r&&!e.defaultPrevented&&this.saveStateForPageDeparture({controlName:n,href:i})}_handleDocumentVisibilityChange(){const e=ae(this.document);void 0!==e&&this.firePageVisibilityChangeEvent(e)}saveStateForPageDeparture(e){if(!e)return;!function(e){let t=pa()||[];t.push(e),ga(t)}({controlName:e.controlName,href:e.href,prevInstance:this._trackingCore.getCurrentContext().pageInstance})}firePageVisibilityChangeEvent(e){this._trackingCore.fireEvent(ya,{isVisible:!e})}fireControlInteractionEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ea.SHORT_PRESS,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!e)throw new Error("controlName is required in TrackingEvents.fireControlInteractionEvent");const r=ka(this._trackingCore.getCurrentContext().pageInstance.pageUrn),i=n.uiControlPageKey||r;this._trackingCore.fireEvent(va,{controlUrn:Ca(e,i),interactionType:Ea[t]},n)}fireExternalNavigationEvent(e){const t=ka(this._trackingCore.getCurrentContext().pageInstance.pageUrn);this._trackingCore.fireEvent(ma,{triggerControlUrn:Ca(e,t)},{},!0)}fireLinksterImpressionEvent(e,t,n){this._trackingCore.fireEvent(wa,{moduleName:e,sourceEntity:t,destinationEntities:n})}convertUuidTrackingIdToBase64(e){try{const t=function(e){return function(e){if(!ri(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}(e)}(e),n=String.fromCharCode.apply(null,t);return btoa(n)}catch(t){return e}}}const Ta=2e3;function Sa(e){const t=ae(e);return void 0!==t&&!t}class _a{constructor(e){let{globalDocument:t=document,globalWindow:n=window,heartbeatDuration:r=Ta}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t||!n)return;this.tracking=e,this.document=t,this.window=n,this.heartbeatDuration=r,this._firePageViewHeartbeatEvent=this._firePageViewHeartbeatEvent.bind(this);const i=void 0!==this.document.msHidden?"msvisibilitychange":"visibilitychange";this.document.addEventListener(i,(()=>this._documentVisibilityChangeHeartbeatHandler()),!0),this.window.addEventListener("beforeunload",(()=>{Sa(this.document)&&this._firePageViewHeartbeatEvent()}),!0),Sa(this.document)&&this._startPageViewHeartbeatInterval()}_startPageViewHeartbeatInterval(){this._pageViewHeartbeatStartTime=Date.now(),this._pageViewHeartbeat=this.window.setInterval(this._firePageViewHeartbeatEvent,this.heartbeatDuration)}_documentVisibilityChangeHeartbeatHandler(){const e=ae(this.document);void 0!==e&&(e?(this._firePageViewHeartbeatEvent(),clearInterval(this._pageViewHeartbeat)):this._startPageViewHeartbeatInterval())}_firePageViewHeartbeatEvent(){const e=Date.now();this.tracking.fireTrackingEvent(ba,{header:{},requestHeader:{},startTime:this._pageViewHeartbeatStartTime},{header:{time:e}}),this._pageViewHeartbeatStartTime=e}}const Pa=document.getElementById("config");let Aa,Ra,Na,Oa,Da,La,Ma,xa,Ua,Ha,Fa,Ba,Ka;function Va(e,t){window[e]&&window[e].resolve?window[e].resolve(t):window[e]=Promise.resolve(t)}Pa&&Pa.dataset&&(Aa=Pa.dataset.appId||"seo",Ra=Pa.dataset.appVersion||"0.0.0",Da=Pa.dataset.browserId,Na=Pa.dataset.callTreeId||null,Fa=void 0!==Pa.dataset.enablePageViewHeartbeatTracking,Ha=void 0!==Pa.dataset.enableCoreWebTracking,Ba=void 0!==Pa.dataset.disableComscoreTracking,Oa=Pa.dataset.customTrackingCode||void 0,La=Pa.dataset.trackingPageType||void 0,Ma="string"==typeof Pa.dataset.jetTags&&Pa.dataset.jetTags.split(",")||[],xa=Pa.dataset.multiproductName||"undefined-frontend-mpName",Ua=Pa.dataset.serviceName||"undefined-frontend-serviceName",Ka=Pa.dataset.pageInstance||void 0),Va("lazyloader",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Ne=Ne||new Re(e),Ne}()),ee((()=>{const e=W(document),t=document.querySelector('meta[name="locale"]').content;let n;if(Ka&&Ka.split(";").length>=2)n=Uint8Array.from(window.atob(Ka.split(";")[1]),(e=>e.charCodeAt(0))),n=Array.from(n);else{n=[];for(let e=0;e<16;e++){let t=Ua.charCodeAt(e);isNaN(t)&&(t=0),n.push(t)}}const r={appId:Aa,appVersion:Ra,locale:t,multiproduct:xa,service:Ua,endpoint:"/li/track",api:{AbortController:AbortController,location:window.location,document:document,performance:performance,PerformanceObserver:PerformanceObserver,Promise:Promise,assign:Object.assign,fetch:fetch,sendBeacon:navigator.sendBeacon.bind(navigator)},batching:{maxSize:10,debounceTime:50}};Na&&(r.treeID=Na);const i=new Di(r),o=new xi(i);o.fireTrackingEvent=o.fireEvent,o.generateTrackingId=fi;const a={applicationUrn:"urn:li:application:(".concat(xa,",").concat(Ua,")"),version:Ra,trackingId:n},s=Ha?o:ce({appId:Aa,trackingCode:Oa,applicationInstance:a});if(o.updateAppState({applicationViewerUrn:"urn:li:guest:".concat(Da),clientApplicationInstance:a}),Ha){const t=new Ia(o);o.fireControlInteractionEvent=t.fireControlInteractionEvent.bind(t),o.fireLinksterImpressionEvent=t.fireLinksterImpressionEvent.bind(t),o.convertUuidTrackingIdToBase64=t.convertUuidTrackingIdToBase64.bind(t),t.navigate(e,La)}else o.setCurrentContext({pageKey:e,pageInstance:pi(e,s.generateTrackingId())});const c=new Ye(window.IntersectionObserver,s,{componentList:[...document.querySelectorAll("[data-impression-id]")],onImpression:Xe,onUnobservation:$e});Fa&&new _a(s),Va("tracking",s),Va("impressionTracking",c),Va("pemTracking",new k("Default - PEM Tracking Instance",((t,n,r)=>{Ha?o.fireEvent(t,n,{context:{pageKey:e,pageInstance:r}}):s.fireTrackingEvent(t,n,{pageInstance:r})})));const u=new oa({"app-render-mode":"SSRSEO","is-app-render-failed":!1},{"is-single-page-app":!1,"navigation-timing-only":!0,"enable-rs-timing":!0,"enable-cdn-tracking":!0,"enable-pop-tracking":!0,"request-sampling-rate":1,"beacon-timeout":500,"web-ui-framework":"DUST"},o);u.end(u.start()),u.observeWebVitals();new ua(o).bind(Ma,Na),Ba||z(),Ha||function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax",n=arguments.length>2?arguments[2]:void 0;e.fireTrackingEvent("PageViewEvent",ue(n,t))}(s,La);const l=document.querySelector('meta[name="clientSideIngraphs"]');if(l){const{gaugeMetricEndpoint:t,counterMetricEndpoint:n}=l.dataset,r=Ha?o.getCurrentContext().pageInstance:s.state.currentPageInstance,i=new Je({counterMetricEndpoint:n,gaugeMetricEndpoint:t,pageKey:e,pageInstanceHeader:r});new da({ingraphs:i}),Va("ingraphTracking",i),i.firePageLoadTimeMetric(),i.fireSeoPageViewMetric(),i.attachWebVitalsMetrics()}if(st(),document.querySelector(".global-alert-banner")){new Cn({enableControlInteractionEvents:!0,trackingInstance:s||o})}if(!!document.head.querySelector('link[rel="manifest"]')){Va("appDetection",new In(((e,t)=>{s.fireTrackingEvent(e,t)})).getInstalledApps())}}))}();
