!function(){"use strict";let e;const t=new Uint8Array(16);function n(){if(!e&&(e="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!e))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return e(t)}const r=[];for(let e=0;e<256;++e)r.push((e+256).toString(16).slice(1));var i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function o(e,t,o){if(i.randomUUID&&!t&&!e)return i.randomUUID();const a=(e=e||{}).random||(e.rng||n)();if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,t){o=o||0;for(let e=0;e<16;++e)t[o+e]=a[e];return t}return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return(r[e[t+0]]+r[e[t+1]]+r[e[t+2]]+r[e[t+3]]+"-"+r[e[t+4]]+r[e[t+5]]+"-"+r[e[t+6]]+r[e[t+7]]+"-"+r[e[t+8]]+r[e[t+9]]+"-"+r[e[t+10]]+r[e[t+11]]+r[e[t+12]]+r[e[t+13]]+r[e[t+14]]+r[e[t+15]]).toLowerCase()}(a)}const a="See https://go/pem/degradation-tracking-user-guide for instrumentation instructions",s="x-li-uuid",c="x-li-pop",l="x-msedge-ref",u="x-li-fabric",d="x-li-pem-resp-meta",h="content-type",f="x-cache";class p extends class{constructor(e,t){this._collectedFeatureMetrics=e,this._fireEventCallback=t}}{produceMetricEvent(e){this._collectedFeatureMetrics.flushMetrics().forEach((t=>{const n=[];t.featureCallCounts.forEach((e=>{n.push({featureProductName:e.featureMetricIdentifier.productName,featureKey:e.featureMetricIdentifier.featureKey,degradedDownstreamCallCount:0,totalDownstreamCallCount:e.totalApiCallCount,retriedDownstreamCallCount:e.retriedApiCallCount,retriedSuccessfulDownstreamCallsRatio:e.retriedSuccessfulCallsRatio,pointOfPresenceId:e.featureMetricIdentifier.pointOfPresenceId,responseErrorTypeV2:e.featureMetricIdentifier.responseErrorType,successfulDownstreamCallsRatio:e.successfulApiCallsRatio,metricKey:{featureProductName:e.featureMetricIdentifier.productName,featureKey:e.featureMetricIdentifier.featureKey,pointOfPresenceId:e.featureMetricIdentifier.pointOfPresenceId,responseErrorTypeV2:e.featureMetricIdentifier.responseErrorType,responseFabric:e.featureMetricIdentifier.responseFabric}})}));const r={header:{},requestHeader:{},time:Date.now(),metrics:n};this._fireEventCallback("FeatureDegradationMetricEvent",r,t.pageInstance,e)}))}}function v(e){return JSON.stringify(e,Object.keys(e).sort())}class g 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.successfulApiCallsRatio+=1,e.totalApiCallCount++}))}trackFailedFeatureApiCall(e,t){this.trackMetric(e,(e=>{e.successfulApiCallsRatio+=t,e.totalApiCallCount++}))}trackRetriedFeatureApiCall(e,t){this.trackMetric(e,(e=>{e.retriedApiCallCount++,e.retriedSuccessfulCallsRatio+=t}))}trackRetriedSuccessfulFeatureApiCall(e){this.trackMetric(e,(e=>{e.successfulApiCallsRatio++,e.totalApiCallCount++}))}changeRetriedMetricsToTotal(){this.featureCallCounts.forEach((e=>e.changeCallCountsFromRetriedToTotal()))}trackMetric(e,t){const n=v(e);if(this.featureCallCounts.has(n))t(this.featureCallCounts.get(n));else{const r=new m(e);t(r),this.featureCallCounts.set(n,r)}}}class m extends class{constructor(e){this.featureMetricIdentifier=e}}{constructor(){super(...arguments),this.successfulApiCallsRatio=0,this.totalApiCallCount=0,this.retriedApiCallCount=0,this.retriedSuccessfulCallsRatio=0}mergeCallCounts(e){return this.successfulApiCallsRatio+=e.successfulApiCallsRatio,this.totalApiCallCount+=e.totalApiCallCount,this.retriedApiCallCount+=e.retriedApiCallCount,this.retriedSuccessfulCallsRatio+=e.retriedSuccessfulCallsRatio,this}changeCallCountsFromRetriedToTotal(){this.totalApiCallCount+=this.retriedApiCallCount,this.successfulApiCallsRatio+=this.retriedSuccessfulCallsRatio,this.retriedApiCallCount=0,this.retriedSuccessfulCallsRatio=0}}class y 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){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.incrementMetric(t,(t=>t.trackFailedFeatureApiCall(e,n)))}incrementRetriedFeatureApiCall(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this.incrementMetric(t,(t=>t.trackRetriedFeatureApiCall(e,n)))}incrementRetriedSuccessfulApiCall(e,t){this.incrementMetric(t,(t=>t.trackRetriedSuccessfulFeatureApiCall(e)))}mergeMetricsFrom(e){e.metrics.forEach(((e,t)=>{const n=this.metrics.get(t);void 0!==n?e.featureCallCounts.forEach(((e,r)=>{var i;let o=n.featureCallCounts.get(r);void 0!==o?o=o.mergeCallCounts(e):null===(i=this.metrics.get(t))||void 0===i||i.featureCallCounts.set(t,e)})):this.metrics.set(t,e)}))}changeRetriedMetricsToTotal(){this.metrics.forEach((e=>e.changeRetriedMetricsToTotal()))}incrementMetric(e,t){const n=v(e);if(this.metrics.has(n))t(this.metrics.get(n));else{const r=new g(e);t(r),this.metrics.set(n,r)}}}var E;!function(e){e.ProductName="productName",e.AdditionalDegradedResponseCodes="additionalDegradedResponseCodes",e.NonDegradedResponseCodes="nonDegradedResponseCodes",e.DegradationKeyOverrides="degradationKeyOverrides",e.ClientSensorGroupName="clientSensorGroupName",e.EnablePerformanceMeasurement="enablePerformanceMeasurement",e.CustomTrackingId="customTrackingId",e.DisableAvailabilityCalculation="disableAvailabilityCalculation",e.EnableSessionRecording="enableSessionRecording"}(E||(E={}));const b=new Set(Object.values(E));class w extends Error{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}function T(e){return 0===e.length||!e.trim()}function C(e){if("string"!=typeof e)throw new w(`The product name must be a string. ${a}.`);if(T(e))throw new w(`No product name was specified. Please configure a defaultProductName or specify it per instrumented API call. ${a}.`);if(/[^a-zA-Z0-9-_ \\/]/.test(e))throw new w(`Product name '${e}' can only contain alphanumeric, underscores (_), spaces ( ), dashes (-) and forward slashes (/). ${a}.`);return e}function _(e){if("string"!=typeof e)throw new w(`Keys must be strings. ${a}.`);if(T(e))throw new w(`Keys should not be blank. ${a}.`);if(/[^a-z0-9-]/.test(e))throw new w(`'${e}' can only contain lowercase alphanumeric characters and dashes (-). ${a}.`);return e}class I{constructor(e,t,n){var r,i,o;if(this._shouldEnablePerformanceMeasurement=!1,this._shouldDisableAvailabilityCalculation=!1,this._shouldRecordSession=!1,this._featureKey=_(e),this._defaultDegradationKey=_(t),!n)return this._additionalDegradedResponseCodes=[],this._nonDegradedResponseCodes=[],void(this._degradationKeyOverrides=[]);if("object"!=typeof n)throw new w(`DegradationTrackingMetadata options should be an object. ${a}.`);const s=n.productName;s&&(this._productName=C(s));const c=n.additionalDegradedResponseCodes,l=n.nonDegradedResponseCodes;!function(e,t){const n=(e,t)=>{if("number"!=typeof(n=e)||!isFinite(n)||Math.floor(n)!==n||e<=0||e>999)throw new w(`Please only specify positive integer response codes between 1 and 999 for the ${t} option. ${e} was specified. ${a}.`);var n;if(429===e||999===e)throw new w(`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 ${t} options.`);if(t===E.NonDegradedResponseCodes&&e>=400&&e<500)throw new w(`For server responses that have a status code, PEM does not consider 4xx as degraded. ${e} is not considered a degradation unless you explicitly add it to the ${E.AdditionalDegradedResponseCodes} option. Please remove ${e} from the ${E.NonDegradedResponseCodes} option. ${a}.`)};if(void 0!==e&&!Array.isArray(e))throw new w(`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 ${E.NonDegradedResponseCodes} option. ${a}.`);if(void 0!==t&&!Array.isArray(t))throw new w(`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 ${E.AdditionalDegradedResponseCodes} option. ${a}.`);null==e||e.forEach((e=>n(e,E.NonDegradedResponseCodes))),null==t||t.forEach((e=>n(e,E.AdditionalDegradedResponseCodes)));const r=new Set(t),i=new Set(e);if([...r].some((e=>i.has(e))))throw new w(`Response codes can't be both degraded and non-degraded. Please ensure that your additionalDegradedResponseCodes and nonDegradedResponseCodes don't have any overlapping response codes. ${a}.`)}(l,c),this._nonDegradedResponseCodes=l||[],this._additionalDegradedResponseCodes=c||[],this._degradationKeyOverrides=n.degradationKeyOverrides||[],this._clientSensorGroupName=n.clientSensorGroupName,this._shouldEnablePerformanceMeasurement=null!==(r=n.enablePerformanceMeasurement)&&void 0!==r&&r,this._customTrackingId=n.customTrackingId,this._shouldDisableAvailabilityCalculation=null!==(i=n.disableAvailabilityCalculation)&&void 0!==i&&i,this._shouldRecordSession=null!==(o=n.enableSessionRecording)&&void 0!==o&&o,function(e){Object.keys(e).forEach((e=>{if(!b.has(e))throw new w(`An unsupported degradation tracking option '${e}' was provided. Please fix or remove it. ${a}`)}))}(n)}static isDegradationTrackingMetadata(e){return null!=e&&Object.getOwnPropertyNames(I.prototype).every((t=>Object.hasOwnProperty.call(Object.getPrototypeOf(e),t)))}get featureKey(){return this._featureKey}get defaultDegradationKey(){return this._defaultDegradationKey}get degradationKey(){return this._defaultDegradationKey}get productName(){return this._productName}get additionalDegradedResponseCodes(){return this._additionalDegradedResponseCodes}get nonDegradedResponseCodes(){return this._nonDegradedResponseCodes}get degradationKeyOverrides(){return this._degradationKeyOverrides}get clientSensorGroupName(){return this._clientSensorGroupName}get shouldEnablePerformanceMeasurement(){return this._shouldEnablePerformanceMeasurement}get customTrackingId(){return this._customTrackingId}get shouldDisableAvailabilityCalculation(){return this._shouldDisableAvailabilityCalculation}get shouldRecordSession(){return this._shouldRecordSession}}class S{constructor(e){this._degradationTrackingMetadata=e,this._featureMetricStore=new y,this._lastRequestMetricStore=new y,this._requestsMade=0,this._trackingId=o()}static isRetryableDegradationTrackingMetadata(e){return null!=e&&Object.getOwnPropertyNames(S.prototype).every((t=>Object.hasOwnProperty.call(Object.getPrototypeOf(e),t)))}get degradationTrackingMetadata(){return this._degradationTrackingMetadata}get featureMetricStore(){return this._featureMetricStore}get currentRequestSequenceId(){return this._requestsMade-1}get flowTrackingId(){return this._trackingId}get shouldDisableAvailabilityCalculation(){return this._degradationTrackingMetadata.shouldDisableAvailabilityCalculation}get featureKey(){return this._degradationTrackingMetadata.featureKey}get defaultDegradationKey(){return this._degradationTrackingMetadata.defaultDegradationKey}get productName(){return this._degradationTrackingMetadata.productName}get nonDegradedResponseCodes(){return new Set(this._degradationTrackingMetadata.nonDegradedResponseCodes)}get additionalDegradedResponseCodes(){return this._degradationTrackingMetadata.additionalDegradedResponseCodes}get degradationKeyOverrides(){return this._degradationTrackingMetadata.degradationKeyOverrides}get customTrackingId(){return this._degradationTrackingMetadata.customTrackingId}get clientSensorGroupName(){return this._degradationTrackingMetadata.clientSensorGroupName}get shouldEnablePerformanceMeasurement(){return this._degradationTrackingMetadata.shouldEnablePerformanceMeasurement}incrementRetriedFeatureApiCall(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;this._requestsMade++,this._featureMetricStore.mergeMetricsFrom(this._lastRequestMetricStore),this._lastRequestMetricStore.flushMetrics(),this._lastRequestMetricStore.incrementRetriedFeatureApiCall(e,t,n)}incrementRetriedSuccessfulApiCall(e,t){this._requestsMade++,this._featureMetricStore.mergeMetricsFrom(this._lastRequestMetricStore),this._lastRequestMetricStore.flushMetrics(),this._lastRequestMetricStore.incrementRetriedSuccessfulApiCall(e,t)}flushMetricStoreToServiceStore(e){this._lastRequestMetricStore.changeRetriedMetricsToTotal(),this._featureMetricStore.mergeMetricsFrom(this._lastRequestMetricStore),e.mergeMetricsFrom(this._featureMetricStore),this._featureMetricStore.flushMetrics(),this._lastRequestMetricStore.flushMetrics()}}function k(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("/")}class A extends I{static isFailureTrackingMetadata(e){return"object"==typeof e&&(null==e?void 0:e.constructor.name)===A.name}}class R{constructor(e,t){if(this._additionalDegradedResponseCodes=new Set,this._degradationKeyByResponseCode=new Map,this._shouldDisableAvailabilityCalculation=!1,this._shouldRecordSession=!1,this._retryableTrackingMetadata=null,!S.isRetryableDegradationTrackingMetadata(e)&&!I.isDegradationTrackingMetadata(e)&&!A.isFailureTrackingMetadata(e))throw new w("We encountered a bug where we forgot to provide the tracking metadata as an argument. Please report it to the #pem team.");if(!t)throw new w("We encountered a bug where we forgot to provide the product name as an argument. Please report it to the #pem team.");this._featureKey=e.featureKey,this._productName=t,this._clientSensorGroupName=e.clientSensorGroupName,this._defaultDegradationKey=e.defaultDegradationKey;let n=I.isDegradationTrackingMetadata(e)?e:void 0;S.isRetryableDegradationTrackingMetadata(e)&&(n=e.degradationTrackingMetadata,this._retryableTrackingMetadata=e),void 0!==n?(this._nonDegradedResponseCodes=new Set(n.nonDegradedResponseCodes),this._customTrackingId=n.customTrackingId,this._shouldDisableAvailabilityCalculation=n.shouldDisableAvailabilityCalculation,this._shouldRecordSession=n.shouldRecordSession,n.additionalDegradedResponseCodes.length&&(this.processAdditionalDegradedResponseCodes(e.additionalDegradedResponseCodes),this.initializeDegradationKeyOverrides(e.degradationKeyOverrides))):(this._nonDegradedResponseCodes=new Set(e.nonDegradedResponseCodes),this._customTrackingId=e.customTrackingId,this.processAdditionalDegradedResponseCodes(e.additionalDegradedResponseCodes),this.initializeDegradationKeyOverrides(e.degradationKeyOverrides))}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}get shouldDisableAvailabilityCalculation(){return this._shouldDisableAvailabilityCalculation}get shouldRecordSession(){return this._shouldRecordSession}get retryableTrackingMetadata(){return this._retryableTrackingMetadata}get retryMetricStore(){var e,t;return void 0!==(null===(e=this._retryableTrackingMetadata)||void 0===e?void 0:e.featureMetricStore)?null===(t=this._retryableTrackingMetadata)||void 0===t?void 0:t.featureMetricStore:null}isCountedAgainstAvailability(e,t){return null!==e&&(null==t||this.canResponseCodeCountAgainstAvailability(t))}canResponseCodeCountAgainstAvailability(e){if(this._degradationKeyByResponseCode.has(e))return!0;if(this._additionalDegradedResponseCodes.has(e))return!0;const t=e>=400&&e<500,n=e>=300&&e<400,r=this._nonDegradedResponseCodes.has(e);return!n&&!t&&!r}shouldImpactAvailability(e,t,n){return(!e||"CLIENT_ABORTED"!==e)&&("BLOCKED_BY_CLIENT_PROXY"!==e&&(!(!(null==n?void 0:n.hasAnyLinkedInHeaders())&&t&&t>=400&&t<600)&&"TOO_MANY_REQUESTS"!==e))}processAdditionalDegradedResponseCodes(e){e.forEach((e=>{if(this._nonDegradedResponseCodes.has(e))throw new w(`You attempted to specify ${e} as an additional degraded response code for the '${this.featureKey}' feature, however it is also specified in the non-degraded response codes for that feature. Please decide whether you want to consider ${e} responses a degraded state or not. ${a}.`);this._additionalDegradedResponseCodes.add(e)}))}initializeDegradationKeyOverrides(e){e.forEach((e=>{if(!e.responseCodesToOverride||!e.degradationKey||!Array.isArray(e.responseCodesToOverride)||"string"!=typeof e.degradationKey)throw new w(`Degradation key overrides must consist of an array of responseCodesToOverride and a string degradationKey. ${a}.`);new Set(e.responseCodesToOverride).forEach((t=>{if(!this.canResponseCodeCountAgainstAvailability(t))throw new w(`A degradation key override was specified for ${t}, 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(t,e.degradationKey)}))}))}}class O{constructor(e){const t=new Map;null==e||e.forEach(((e,n)=>{t.set(n.toLowerCase(),e)})),this._callTreeId=t.get(s)||null,this._pointOfPresenceId=t.get(c)||null,this._msEdgeRef=t.get(l)||null,this._fabric=t.get(u)||null,this._responseMetadata=t.get(d)||null,this._downstreamAvailability=function(e){if(null==e)return null;const t=e.split(",");for(const e of t){const t=e.split("=",2);if(2===t.length&&"availability"===t[0]){const e=parseFloat(t[1]);if(e>=0&&e<=1)return e}}return null}(this._responseMetadata)||1,this._contentType=t.get(h)||null,this._cdnCacheMetadata=t.get(f)||null}get callTreeId(){return this._callTreeId}get pointOfPresenceId(){return this._pointOfPresenceId}get microsoftEdgeReference(){return this._msEdgeRef}get fabric(){return this._fabric}get downstreamAvailability(){return this._downstreamAvailability}get contentType(){return this._contentType}get cdnCacheMetadata(){return this._cdnCacheMetadata}get responseMetadata(){return this._responseMetadata}hasAnyLinkedInHeaders(){return!!(this._fabric||this._pointOfPresenceId||this._msEdgeRef||this._callTreeId)}}class N{constructor(e,t,n,r){this._responseCode=e||null,this._parsedResponseHeaders=t?new O(t):new O,this._responseError=n||null,this._downstreamServiceErrorCode=r}get responseCode(){return this._responseCode}get parsedHeaders(){return this._parsedResponseHeaders}get responseError(){return this._responseError}set responseError(e){this._responseError=e}get downstreamServiceErrorCode(){return this._downstreamServiceErrorCode}set downstreamServiceErrorCode(e){this._downstreamServiceErrorCode=e}}const L="undefined"==typeof FastBoot;class D{constructor(e,t,n){this._featureMetricStore=new y,this._visibilityListener=()=>{"hidden"===document.visibilityState&&this._metricSender.produceMetricEvent(!0)},this._defaultProductName=e,this._fireEventCallback=t,this._jetErrorCallback=n,this._metricSender=new p(this._featureMetricStore,t),L&&(this._metricsInterval=window.setInterval((()=>this._metricSender.produceMetricEvent()),6e4),window.addEventListener("visibilitychange",this._visibilityListener))}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,e.headers.forEach(((e,t)=>s.set(t.toLowerCase(),e))),!1===e.ok&&(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 l=o?null:t,u=this._createFailureProcessingMetadata(r);n=this._getAndValidateUrlEntityIDs(n),this._trackResponse(e,a,n,u,i,c,l)}startRetryFlow(e){return D.startRetryFlow(e)}static startRetryFlow(e){return new S(e)}completeRetryFlow(e){if(!S.isRetryableDegradationTrackingMetadata(e))throw new w("retryFlowMetadata must be an instance of RetryableDegradationTrackingMetadata");e.flushMetricStoreToServiceStore(this._featureMetricStore)}_trackResponse(e,t,n,r,i,o,a){const s=new N(t,o,a),c=s.parsedHeaders,l=function(e){const t=e.responseError,n=e.parsedHeaders,r=e.responseCode;if(r){if(429===r||999===r)return"TOO_MANY_REQUESTS";if(n&&!n.hasAnyLinkedInHeaders()&&r&&r>=400&&r<600)return"BLOCKED_BY_CLIENT_PROXY";if((i=r)>=400&&i<500)return function(e){return 429===e?"TOO_MANY_REQUESTS":"CLIENT_ERROR"}(r);if(function(e){return e>=500&&e<600}(r))return function(e){if(e){if(e.fabric)return"SERVER_ERROR";if(e.pointOfPresenceId)return"TRAFFIC_LI_POP_TO_DC_ERROR";if(e.microsoftEdgeReference)return"TRAFFIC_AFD_TO_LI_POP_ERROR"}return"SERVER_ERROR"}(n);if(function(e,t){return!!(e>=200&&e<300&&t&&t.downstreamAvailability<1)}(r,n))return"DOWNSTREAM_GRACEFUL_DEGRADATION"}var i;if(!t)return null;if(t instanceof Error){if("AbortError"===t.name)return"CLIENT_ABORTED";if(t instanceof TypeError&&(t.message.indexOf("Network request failed")>=0||t.message.indexOf("NetworkError when attempting to fetch resource")>=0||t.message.indexOf("Failed to fetch")>=0))return"NETWORK_ERROR"}else{if("timeout"===t.statusText)return"CLIENT_TIMEOUT";if(0===t.status&&"abort"===t.statusText)return"CLIENT_ABORTED";if("readyState"in t&&0===t.readyState)return"NETWORK_ERROR"}return"UNCLASSIFIED"}(s),u=k(e,n),d=new Set,h=new Set;if(r.forEach((e=>{d.add(e.productName),h.add(e.featureKey);const n=null!==e.retryableTrackingMetadata&&null!==e.retryMetricStore;if(!e.shouldDisableAvailabilityCalculation&&e.shouldImpactAvailability(l))if(e.isCountedAgainstAvailability(l,t)){(n?e.retryableTrackingMetadata.incrementRetriedFeatureApiCall.bind(e.retryableTrackingMetadata):this._featureMetricStore.incrementFailedFeatureApiCall.bind(this._featureMetricStore))({featureKey:e.featureKey,productName:e.productName,pointOfPresenceId:c.pointOfPresenceId,responseErrorType:l,responseFabric:c.fabric},i,function(e,t){return"DOWNSTREAM_GRACEFUL_DEGRADATION"===e?t.downstreamAvailability:0}(l,c))}else{(n?e.retryableTrackingMetadata.incrementRetriedSuccessfulApiCall.bind(e.retryableTrackingMetadata):this._featureMetricStore.incrementSuccessfulFeatureApiCall.bind(this._featureMetricStore))({featureKey:e.featureKey,productName:e.productName,pointOfPresenceId:c.pointOfPresenceId,responseFabric:c.fabric},i)}})),l){this._reportErrorIfUnclassified(a,l,t,d,h);const e=function(e,t,n,r){if(!(null==e?void 0:e.trim())||!t||!Array.isArray(t))return[];const i=[],o=r.responseCode;return t.forEach((t=>{const a=t.getDegradationKey(o),s=t.shouldImpactAvailability(n)&&t.isCountedAgainstAvailability(n,o),c={endpointPath:e,degradationKey:a,responseErrorTypeV2:n,isCountedAgainstAvailability:s,downstreamServiceErrorCode:r.downstreamServiceErrorCode};o&&(c.responseCode=o);const l=r.parsedHeaders;l.callTreeId&&(c.responseCallTreeId=l.callTreeId),(null==l?void 0:l.pointOfPresenceId)&&(c.pointOfPresenceId=l.pointOfPresenceId),(null==l?void 0:l.microsoftEdgeReference)&&(c.microsoftEdgeReference=l.microsoftEdgeReference),(null==l?void 0:l.fabric)&&(c.fabric=l.fabric),S.isRetryableDegradationTrackingMetadata(t.retryableTrackingMetadata)&&(c.retryDetails={trackingId:t.retryableTrackingMetadata.flowTrackingId,sequenceId:t.retryableTrackingMetadata.currentRequestSequenceId}),i.push({header:{},requestHeader:{},productName:t.productName,featureKey:t.featureKey,failedDownstreamRequests:[c],customTrackingId:t.customTrackingId})})),i}(u,r,l,s);e.forEach((e=>{this._fireEventCallback("FeatureDegradeEvent",e,i)}))}}_reportErrorIfUnclassified(e,t,n,r,i){var o;if((0===n||null==n)&&"UNCLASSIFIED"===t){const t=["pem-unclassified-error"];let n;r.forEach((e=>t.push(`pem-product-${e}`))),i.forEach((e=>t.push(`pem-feature-${e}`))),n=e instanceof Error?e:new Error(`Could not classify jQuery response: ${JSON.stringify(e)}`),null===(o=this._jetErrorCallback)||void 0===o||o.call(this,n,t,!1)}}_createFailureProcessingMetadata(e){if(!e||!Array.isArray(e)||!e.length)throw new w(`Please specify a non-empty array of degradation tracking metadata. ${a}.`);const t=new Set;return e.map((e=>{if(!I.isDegradationTrackingMetadata(e)&&!S.isRetryableDegradationTrackingMetadata(e))throw new w(`Please use DegradationTrackingMetadata or RetryableDegradationTrackingMetadata to specify the degradations. ${a}.`);const n=C(e.productName||this._defaultProductName),r=`${n}!!${e.featureKey}`;if(t.has(r))throw new w("More than one degradation tracking metadata has the same productName/featureKey combination. Please merge them together");return t.add(r),new R(e,n)}))}_getAndValidateUrlEntityIDs(e){if(!Array.isArray(e))throw new w(`Please specify the queried IDs to remove from the request URL, or use an empty array if there are none. ${a}.`);return e}}function P(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 M(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{setTimeout(e)}))}function x(e){return null==e||"object"!=typeof e?[]:Array.prototype.slice.call(e)}function F(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 B(e,t,n){const r=new RegExp(`([\\?&])${n?t:encodeURIComponent(t)}=([^&#]*)`).exec(e);return r&&(n?r[2]:decodeURIComponent(r[2]))}function U(e,t,n,r){if(!e||!t)throw new Error(`Required param of addQueryParam missing: url = ${e}, key = ${t}`);t=encodeURIComponent(t),n=encodeURIComponent(n);const i=B(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=`#${o}`),`${i}${a}${t}=${n}${o||""}`}}function K(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]}function H(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=document.createEvent("CustomEvent");r.initCustomEvent(t,!0,!0,n),e.dispatchEvent(r)}function V(e){return void 0!==e.msHidden?e.msHidden:void 0!==e.hidden?e.hidden:void 0}function W(e){let t=e.querySelector('meta[name="linkedin:pageTag"]');return t&&t.content||""}function q(e){let t=e.querySelector('meta[name="locale"]');return t&&t.content||""}function j(e){return e&&'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)?e.slice(1,-1):e}function G(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 z=/ /g,X=/[\s\u0000<>"]|%00/,J=/\\/,$=/([.]|%2e){2}/i;let Q=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 Y(e){let t,n="invalid://";if("string"!=typeof e)return G("jSecure Warning: url must be a string","error"),n;if(t=e.trim(),t.indexOf(" ")>-1&&(G("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(z,"+")),!Q.test(t))return G("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(X.test(t))return G("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?(G("jSecure Error: malformed url path detected: "+i),n):J.test(i)||$.test(i)||$.test(r)?(G("jSecure Error: malicious data found in url path: "+i,"error"),n):e}const Z={redirect(e){window&&(window.location.href=e)}};function ee(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 l={method:t,headers:n,body:null};if(!i){const e=K("JSESSIONID");e&&(l.headers["Csrf-Token"]=j(e))}r&&(l.credentials="include"),"POST"!==l.method&&"PUT"!==l.method||(l.body=o);const u=fetch(e,l),d=u.then((n=>n.ok||304===n.status?n.text().then((e=>(n.responseText=e,n))):n.text().then((r=>{const i=new Error(`${t} request for ${e} has failed with status code ${n.status}`);return n.responseText=r,i.response=n,Promise.reject(i)}))));return a&&(s.length?te(u,e,c,s):console.warn("Please set the value for the option pemDegradationTrackingMetadata when PEM is enabled.")),d}function te(e,t,n,r){try{window.tracking.then((i=>{window.pemTracking.then((o=>{o.trackFeatureDegradationsForFetch(t,n,r,e,i.state.currentPageInstance)}))}))}catch(e){}}const ne={className:"class"},re="A path to the asset must be provided";function ie(e){return(new DOMParser).parseFromString(e,"image/svg+xml").firstChild}function oe(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).map((n=>{const r=ne[n]||n;e.setAttribute(r,t[n])})),e}function ae(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(re));const n={focusable:"false",...t};return ee(e,{sendCookies:!1,skipCsrfToken:!0}).then((e=>ie(e.responseText))).then((e=>oe(e,n)))}(t,n?{className:n}:{}).then((t=>(e.appendChild(t),e.setAttribute("aria-hidden","true"),t)))}const se=["IMG","IFRAME","VIDEO","SCRIPT"],ce="SCRIPT";class le{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:l="onerror",disableElementInViewportCondition:u=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.elementCache=[],this.onLoadClassName=c,this.onErrorClassName=l,this.delayedUrlAttributeName=e,this.delayedPosterAttributeName=t,this.delayedBackground=n,this.embeddedSrcAttributeName=r,this.lazyloadClassName=a,this.lazyloadedClassName=s,this.ghostUrlAttributeName=o,this.lazyloadElSelector=`[${this.delayedUrlAttributeName}], [${this.embeddedSrcAttributeName}], .${this.lazyloadClassName}`,this.boundLoadVisibleImages=this.loadVisibleImages.bind(this),this.boundEvents=!1,this.scriptLoadPromises={},this.ghostClassesAttributeName=i,this.disableElementInViewportCondition=u,M((()=>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=x(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.add(this.lazyloadedClassName),this.updateBusyState(e),e.tagName===ce){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.add(this.lazyloadedClassName),e.classList.add(this.onErrorClassName),n&&!t){e.setAttribute("src",Y(n));const t=e.getAttribute(this.ghostClassesAttributeName);t&&t.length&&t.split(" ").forEach((t=>{e.classList.add(t)})),this.updateBusyState(e)}if(e.tagName===ce){const{moduleId:t}=e.dataset;this.getLazyLoadedJavascriptModule(t).reject(new Error(`Could not lazy load JS with src ${e.src}`))}}loadVisibleImages(){let e=0;for(;e{this.lazyloadElOnload(e),this.lazyloadElOnload(t)})).catch((()=>this.lazyloadOnerror(t))):n&&-1!==se.indexOf(t.tagName)?(this.updateBusyState(t,!0),t.onerror=this.lazyloadOnerror.bind(this,t),t.onload=t.oncanplay=this.lazyloadElOnload.bind(this,t),t.src=Y(n)):n&&t.hasAttribute(this.delayedBackground)?(t.style.backgroundImage=`url("${Y(n)}")`,this.lazyloadElOnload(t)):this.lazyloadOnerror(t),"VIDEO"===t.tagName&&(t.poster=Y(t.getAttribute(this.delayedPosterAttributeName))),t.removeAttribute(this.delayedUrlAttributeName),t.removeAttribute(this.embeddedSrcAttributeName),t.classList.remove(this.lazyloadClassName),this.elementCache.splice(e,1)}else e++}this.elementCache.length||this._detachEvents()}updateBusyState(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];e.tagName!==ce&&(null==e||e.setAttribute("aria-busy",t))}}let ue=null;class de{constructor(){let{gaugeMetricEndpoint:e,counterMetricEndpoint:t,pageKey:n,pageInstanceHeader:r=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const i=document.getElementById("config");if(i&&i.dataset&&(this.isBot="true"===i.dataset.isBot),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(this.isBot||this._pageLoadTimeMetricFired||!this.perfData)return;const e=this._getPageLoadTime();this.fireGaugeIngraphMetric({metricsType:"pageLoadTime",metricsValue:e}),this._pageLoadTimeMetricFired=!0}_beacon(e,t){e=U(e,"csrfToken",j(K("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):ee(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):ee(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!this.isBot&&r}fireModuleImpressionMetric(e){e&&this.fireCounterIngraphMetric({metricsType:`moduleImpressionEvent-${e}`})}}const he="light",fe="dark";function pe(){const e=document.getElementById("config");let t;return e&&e.dataset&&(t=e.dataset.theme),t?document.documentElement.classList.contains("dark")?fe:he:void 0}var ve,ge=["transporterKeys"],me=["breadcrumb"],ye=["$type"],Ee=["requestStart"],be=["requestTime","viewNames","requestType","requestTag"],we=["requestStart"],Te=["requestStart"],Ce=["requestTime","viewNames","requestType"];function _e(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 Ie(e){for(var t=1;t=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Pe(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=xe(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Me(e){return function(e){if(Array.isArray(e))return Fe(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||xe(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 xe(e,t){if(e){if("string"==typeof e)return Fe(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)?Fe(e,t):void 0}}function Fe(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:0;return($e[e[t+0]]+$e[e[t+1]]+$e[e[t+2]]+$e[e[t+3]]+"-"+$e[e[t+4]]+$e[e[t+5]]+"-"+$e[e[t+6]]+$e[e[t+7]]+"-"+$e[e[t+8]]+$e[e[t+9]]+"-"+$e[e[t+10]]+$e[e[t+11]]+$e[e[t+12]]+$e[e[t+13]]+$e[e[t+14]]+$e[e[t+15]]).toLowerCase()}function Ze(e){if(!Je(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}function et(e,t,n){function r(e,r,i,o){var a;if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function nt(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function rt(e,t,n,r,i,o){return nt((a=nt(nt(t,e),nt(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function it(e,t,n,r,i,o,a){return rt(t&n|~t&r,e,t,i,o,a)}function ot(e,t,n,r,i,o,a){return rt(t&r|n&~r,e,t,i,o,a)}function at(e,t,n,r,i,o,a){return rt(t^n^r,e,t,i,o,a)}function st(e,t,n,r,i,o,a){return rt(n^(t|~r),e,t,i,o,a)}et("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>i%32&255,a=parseInt(r.charAt(o>>>4&15)+r.charAt(15&o),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<>>32-t}et("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var i=0;i>>0;E=y,y=m,m=dt(g,30)>>>0,g=v,v=T}n[0]=n[0]+v>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+E>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]}));var ht=Uint8Array,ft=Uint16Array,pt=Uint32Array,vt=new ht([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]),gt=new ht([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]),mt=new ht([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),yt=function(e,t){for(var n=new ft(31),r=0;r<31;++r)n[r]=t+=1<>>1|(21845&_t)<<1;It=(61680&(It=(52428&It)>>>2|(13107&It)<<2))>>>4|(3855&It)<<4,Ct[_t]=((65280&It)>>>8|(255&It)<<8)>>>1}var St=function(e,t,n){for(var r=e.length,i=0,o=new ft(t);i>>c]=l}else for(a=new ft(r),i=0;i>>15-e[i]);return a},kt=new ht(288);for(_t=0;_t<144;++_t)kt[_t]=8;for(_t=144;_t<256;++_t)kt[_t]=9;for(_t=256;_t<280;++_t)kt[_t]=7;for(_t=280;_t<288;++_t)kt[_t]=8;var At=new ht(32);for(_t=0;_t<32;++_t)At[_t]=5;var Rt=St(kt,9,0),Ot=St(At,5,0),Nt=function(e){return(e+7)/8|0},Lt=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},Dt=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},Pt=function(e,t){for(var n=[],r=0;rh&&(h=o[r].s);var f=new ft(h+1),p=Mt(n[u-1],f,0);if(p>t){r=0;var v=0,g=p-t,m=1<t))break;v+=m-(1<>>=g;v>0;){var E=o[r].s;f[E]=0&&v;--r){var b=o[r].s;f[b]==t&&(--f[b],++v)}p=t}return[new ht(f),p]},Mt=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},xt=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new ft(++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]},Ft=function(e,t){for(var n=0,r=0;r>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o4&&!S[mt[A-1]];--A);var R,O,N,L,D=l+5<<3,P=Ft(i,kt)+Ft(o,At)+a,M=Ft(i,h)+Ft(o,v)+a+14+3*A+Ft(C,S)+(2*C[16]+3*C[17]+7*C[18]);if(D<=P&&D<=M)return Bt(t,u,e.subarray(c,c+l));if(Lt(t,u,1+(M15&&(Lt(t,u,U[_]>>>5&127),u+=U[_]>>>12)}}}else R=Rt,O=kt,N=Ot,L=At;for(_=0;_255){K=r[_]>>>18&31,Dt(t,u,R[K+257]),u+=O[K+257],K>7&&(Lt(t,u,r[_]>>>23&31),u+=vt[K]);var H=31&r[_];Dt(t,u,N[H]),u+=L[H],H>3&&(Dt(t,u,r[_]>>>5&8191),u+=gt[H])}else Dt(t,u,R[r[_]]),u+=O[r[_]];return Dt(t,u,R[256]),u+O[256]},Kt=new pt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Ht=new ht(0),Vt=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}(),Wt=function(e,t,n,r,i){return function(e,t,n,r,i,o){var a=e.length,s=new ht(r+a+5*(1+Math.ceil(a/7e3))+i),c=s.subarray(r,s.length-i),l=0;if(!t||a<8)for(var u=0;u<=a;u+=65535){var d=u+65535;d>=a&&(c[l>>3]=o),l=Bt(c,l+1,e.subarray(u,d))}else{for(var h=Kt[t-1],f=h>>>13,p=8191&h,v=(1<7e3||S>24576)&&L>423){l=Ut(e,c,0,w,T,C,I,S,A,u-A,l),S=_=I=0,A=u;for(var D=0;D<286;++D)T[D]=0;for(D=0;D<30;++D)C[D]=0}var P=2,M=0,x=p,F=O-N&32767;if(L>2&&R==b(u-F))for(var B=Math.min(f,L)-1,U=Math.min(32767,u),K=Math.min(258,L);F<=U&&--x&&O!=N;){if(e[u+P]==e[u+P-F]){for(var H=0;HP){if(P=H,M=F,H>B)break;var V=Math.min(F,H-2),W=0;for(D=0;DW&&(W=j,N=q)}}}F+=(O=N)-(N=g[O])+32768&32767}if(M){w[S++]=268435456|wt[P]<<18|Tt[M];var G=31&wt[P],z=31&Tt[M];I+=vt[G]+gt[z],++T[257+G],++C[z],k=u+P,++_}else w[S++]=e[u],++T[e[u]]}}l=Ut(e,c,o,w,T,C,I,S,A,u-A,l),!o&&7&l&&(l=Bt(c,l+1,Ht))}return function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?ft:4==e.BYTES_PER_ELEMENT?pt:ht)(n-t);return r.set(e.subarray(t,n)),r}(s,0,r+Nt(l)+i)}(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!i)},qt=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},jt="undefined"!=typeof TextDecoder&&new TextDecoder;try{jt.decode(Ht,{stream:!0})}catch(Fi){}function Gt(){return"undefined"!=typeof window&&"function"==typeof window.fetch}function zt(){try{return Gt()&&"keepalive"in new Request("")}catch(e){return!1}}function Xt(e){var t=e.body,n=e.keepalive,r=e.headers,i=e.compress;r["content-type"]||(r["content-type"]="text/plain;charset=UTF-8");var o=t;if(i&&"undefined"!=typeof TextEncoder)try{o=function(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r>>8;e=n},d:function(){return~e}}}(),r=e.length;n.p(e);var i=Wt(e,t,function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8),o=i.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&&qt(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)}}(i,t),qt(i,o-8,n.d()),qt(i,o-4,r),i}((new TextEncoder).encode(t)),r["content-encoding"]="gzip"}catch(e){}return{body:o,keepalive:n,credentials:"include",headers:r,method:"POST",mode:"cors"}}function Jt(e){return e&&"message"in e?e.message:"UNKNOWN_ERROR"}var $t,Qt="undefined"!=typeof navigator&&"sendBeacon"in navigator,Yt=zt()?function(e,t,n,r){return new Promise((function(i){fetch(e,Xt({body:t,keepalive:!0,headers:n,compress:r})).catch((function(){return fetch(e,Xt({body:t,keepalive:!1,headers:n,compress:r}))})).then((function(e){e.ok?i({type:"success",drop:!1,statusCode:e.status}):i({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return i({type:"network",drop:!0,rawError:Jt(e)})}))}))}:function(e,t,n,r){return new Promise((function(i){if(Qt){var o=!1;try{o=navigator.sendBeacon(e,t)}catch(e){}if(o)return void i({type:"unknown",drop:!1})}fetch(e,Xt({body:t,keepalive:!1,headers:n,compress:r})).then((function(e){e.ok?i({type:"success",drop:!1,statusCode:200}):i({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return i({type:"network",drop:!0,rawError:Jt(e)})}))}))};function Zt(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 en(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 tn(){return $t||($t=en("idb-queue","default")),$t}function nn(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++1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:tn();return n("readwrite",(function(n){return n.put(e),Zt(n.count()).then((function(e){if(!(e<=t.maxNumber))return nn(n,t)}))})).catch((function(e){if(e&&"QuotaExceededError"===e.name)return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{maxNumber:1e3,batchEvictionNumber:300};return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:tn())("readwrite",(function(t){return nn(t,e)}))}(t,n)}))}function an(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]:tn();return rn?Promise.resolve():on(e,t,n)}function sn(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.length0&&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 ln(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function un(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.error("[beacon-transporter] ",e())}function dn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeRemaining:5,timeout:1e4};"undefined"==typeof requestIdleCallback?setTimeout(e,t.fallbackTimeout||10):function n(){requestIdleCallback((function(r){r.timeRemaining()>t.timeRemaining||r.didTimeout?e():n()}),{timeout:t.timeout})}()}var hn=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Ue(this,e),Ve(this,"config",void 0),Ve(this,"compress",void 0),Ve(this,"throttleControl",void 0),Ve(this,"withStore",void 0),Ve(this,"disablePersistence",!1),this.config=t,this.compress=r;var i,o,a,s=t.measureIDB;s&&performance.mark(s.createStartMark),this.withStore=en(t.idbName,"beacons","timestamp",{onSuccess:function(){s&&performance.measure(s.createSuccessMeasure,s.createStartMark)},onError:function(){s&&performance.measure(s.createFailMeasure,s.createStartMark),n.disablePersistence=!0}}),this.throttleControl=(i=this.replayEntries.bind(this),o=t.throttleWait,a=0,{throttledFn:function(){var e=Date.now();e-a>o&&(ln((function(){return"[throttle] Run fn() at "+String(e)})),i(),a=e)},resetThrottle:function(){a=0}})}return He(e,[{key:"onNotify",value:function(){this.disablePersistence||this.throttleControl.throttledFn()}},{key:"push",value:function(e){var t=this;if(!this.disablePersistence){var n=function(){ln((function(){return"Persisting to DB "+e.url})),an(e,t.config,t.withStore).then((function(){t.throttleControl.resetThrottle(),ln((function(){return"push completed"}))})).catch((function(){t.disablePersistence=!0,un((function(){return"push failed"}))}))};this.config.useIdle?dn(n):n()}}},{key:"clear",value:function(){var e=this;return this.disablePersistence?Promise.resolve():function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:tn();return rn=!0,e("readwrite",(function(e){return e.clear(),Zt(e.transaction).finally((function(){return rn=!1}))}))}(this.withStore).catch((function(){e.disablePersistence=!0,un((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([]):function(){return sn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:tn(),"next")}(t,this.withStore).catch((function(){return e.disablePersistence=!0,un((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([]):function(){return sn(arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:tn(),"prev")}(t,this.withStore).catch((function(){return e.disablePersistence=!0,un((function(){return"peekBack failed"})),[]}))}},{key:"replayEntries",value:function(){var e=this;if(!this.disablePersistence){var t=function(){ln((function(){return"Replaying entry: shift from store"})),function(){return function(e,t,n){return t("readwrite",(function(t){var n=[];return t.openCursor(null,"next").onsuccess=function(){var t=this.result;t&&(n.push(t.value),t.delete(),(e<0||n.length0&&void 0!==arguments[0]?arguments[0]:1,arguments.length>1&&void 0!==arguments[1]?arguments[1]:tn())}(1,e.withStore).then((function(t){if(t.length>0){var n,r,i=t[0],o=i.url,a=i.body,s=i.headers,c=i.timestamp,l=i.statusCode,u=i.attemptCount;return ln((function(){return"header: ".concat(String(e.config.headerName),"; attemptCount: ").concat(u)})),null===(n=(r=e.config).onBeforeRetry)||void 0===n||n.call(r,a),Yt(o,a,cn(s,e.config.headerName,u,l),e.compress).then((function(t){if("unknown"===t.type||"success"===t.type){var n,r;null===(n=(r=e.config).onResult)||void 0===n||n.call(r,t,a),e.replayEntries()}else{var i,s,d,h,f,p;if(u+1>e.config.attemptLimit)return ln((function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),t.drop=!0,void(null===(i=(s=e.config).onResult)||void 0===i||i.call(s,t,a));if("network"===t.type||e.config.statusCodes.includes(t.statusCode))return t.drop=!1,null===(d=(h=e.config).onResult)||void 0===d||d.call(h,t,a),ln((function(){return"Replaying the entry failed, pushing back to IDB: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),an({url:o,body:a,timestamp:c,statusCode:l,attemptCount:u+1},e.config,e.withStore);t.drop=!0,null===(f=(p=e.config).onResult)||void 0===f||f.call(p,t,a)}}))}})).catch((function(t){e.disablePersistence=!0,t&&t.message&&un((function(){return"Replay entry failed: ".concat(t.message)}))}))};this.config.useIdle?dn(t):t()}}}]),e}(),fn=function(){function e(){Ue(this,e)}return He(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}(),pn=function(){function e(t,n){Ue(this,e),Ve(this,"queue",void 0),Ve(this,"beaconListeners",new Set),this.queue=e.hasSupport&&!n.disablePersistenceRetry?new hn(t,n.compress):new fn}return He(e,[{key:"pushToQueue",value:function(e){this.queue.push(e)}},{key:"notifyQueue",value:function(){this.queue.onNotify()}},{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}();Ve(pn,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var vn=[502,504],gn=[429,503],mn=function(){function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Ue(this,e),Ve(this,"url",void 0),Ve(this,"body",void 0),Ve(this,"config",void 0),Ve(this,"persistenceConfig",void 0),Ve(this,"compress",void 0),Ve(this,"timestamp",void 0),Ve(this,"isClearQueuePending",!1),Ve(this,"onClearCallback",void 0),this.url=t,this.body=n,this.config=r,this.persistenceConfig=i,this.compress=a,this.timestamp=Date.now(),this.onClearCallback=function(){return o.isClearQueuePending=!0}}return He(e,[{key:"send",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.persistenceConfig.db.onClear(this.onClearCallback);var n=this.retryLimit;return this.retry((function(t){return Yt(e.url,e.body,t,e.compress)}),n,t).finally((function(){ln((function(){return"beacon finished"})),e.persistenceConfig.db.removeOnClear(e.onClearCallback)}))}},{key:"retryLimit",get:function(){return this.config.attemptLimit}},{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(cn(n,this.config.headerName,o,r)).then((function(r){var o,a,s,c;if(r.drop=!1,"unknown"===r.type||"success"===r.type)i.isClearQueuePending||i.persistenceConfig.disabled||i.persistenceConfig.db.notifyQueue(),s=r;else if(ln((function(){return"retry rejected "+JSON.stringify(r)})),i.shouldPersist(t,r))i.persistenceConfig.db.pushToQueue({url:i.url,body:i.body,headers:n,statusCode:r.statusCode,timestamp:i.timestamp,attemptCount:i.getAttemptCount(t)}),s={type:"persisted",drop:!1,statusCode:r.statusCode};else{if(t>0&&i.isRetryableError(r)){var l,u;null===(l=(u=i.config).onIntermediateResult)||void 0===l||l.call(u,r,i.body);var d=i.config.calculateRetryDelay(i.getAttemptCount(t),t);return ln((function(){return"in memory retry in ".concat(d,"ms")})),(c=d,new Promise((function(e){return setTimeout(e,c)}))).then((function(){return i.retry(e,t-1,n,r.statusCode)}))}(s=r).drop=!0}return null===(o=(a=i.config).onIntermediateResult)||void 0===o||o.call(a,s,i.body),s}))}},{key:"isRetryableError",value:function(e){return!("network"!==e.type&&!this.config.statusCodes.includes(e.statusCode))}},{key:"shouldPersist",value:function(e,t){return!(this.isClearQueuePending||this.persistenceConfig.disabled||navigator.onLine&&(0!==e||"network"!==t.type)&&("response"!==t.type||!this.persistenceConfig.statusCodes.includes(t.statusCode)))}}]),e}(),yn="internal:hide",En="internal:error";function bn(e,t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])}function wn(e,t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)}var Tn,Cn,_n=(Tn=new Map,Cn=new Map,{on:function(e,t){bn(Tn,e,t)},before:function(e,t){bn(Cn,e,t)},off:function(e,t){wn(Tn,e,t)},offBefore:function(e,t){wn(Cn,e,t)},emit:function(e,t){(Cn.get(e)||[]).concat(Tn.get(e)||[]).slice().map((function(e){e(t)}))},clear:function(){Cn.clear(),Tn.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var In=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||_n.emit(yn,e)};document.addEventListener("visibilitychange",In),window.addEventListener("pagehide",In)}var Sn=null;if(("undefined"==typeof crypto||!crypto.getRandomValues)&&"undefined"!=typeof require){var kn=("undefined"!=typeof FastBoot?FastBoot.require:"function"==typeof __webpack_require__?__non_webpack_require__:require)("crypto");if(kn){var An=new Uint8Array(256),Rn=An.length;Sn={rng:function(){return Rn>An.length-16&&(kn.randomFillSync(An),Rn=0),An.slice(Rn,Rn+=16)}}}}var On="object"===("undefined"==typeof crypto?"undefined":Be(crypto))&&"function"==typeof crypto.randomUUID?function(){return crypto.randomUUID()}:function(){return function(e){return function(e){var t=Ye(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0);if(!Je(t))throw TypeError("Stringified UUID is invalid");return t}(e)}(Nn())};function Nn(){return lt(Sn,new Array(16),0)}function Ln(e){return Me(e).map((function(e){return String.fromCharCode(e)})).join("")}function Dn(){return Ln(Nn())}var Pn=/^[a-zA-Z0-9/+]+[=]+$/;function Mn(){return function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=[],i=0,o=e.length,a=o%3,s=o-a;i>>18&63)),r.push(n.charAt(t>>>12&63)),r.push(n.charAt(t>>>6&63)),r.push(n.charAt(63&t)),i+=3;switch(a){case 2:t=e[i]<<16,t|=e[i+1]<<8,r.push(n.charAt(t>>>18&63)),r.push(n.charAt(t>>>12&63)),r.push(n.charAt(t>>>6&63)),r.push("=");break;case 1:t=e[i]<<16,r.push(n.charAt(t>>>18&63)),r.push(n.charAt(t>>>12&63)),r.push("="),r.push("=")}return r.join("")}(Nn())}function xn(){return On()}function Fn(e){return Ze(e)}function Bn(e,t){return{pageUrn:Kn(e),trackingId:t||Mn()}}function Un(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function Kn(e){return"urn:li:page:".concat(e)}function Hn(e,t){return{pageInstance:t.assign({},e.pageInstance),pageKey:e.pageKey,applicationInstance:e.applicationInstance}}function Vn(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 Wn(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function qn(e,t,n){if("undefined"!=typeof window&&window.indexedDB){var r,i="sequenceNumber";try{r=window.indexedDB.open(i)}catch(e){return Promise.resolve(null)}return new Promise((function(o,a){r.onupgradeneeded=function(){var e=r.result;e.objectStoreNames.contains(i)||e.createObjectStore(i,{autoIncrement:!0})},r.onsuccess=function(){var s=r.result,c=s.transaction(i,"readwrite"),l=c.objectStore(i),u=l.get(1);u.onsuccess=function(){var r=u.result;if(r){if("read"===e)return o(r);if("update"!==e)return o(null);var i,s=Object.assign({},r),c=!1,d=null!==(i=s.sequenceNumber)&&void 0!==i?i:0;if(void 0!==t&&t>d&&(s.sequenceNumber=t,c=!0),n&&Object.keys(n).forEach((function(e){var t,r=null!==(t=s[e])&&void 0!==t?t:0,i=n[e];i>r&&(s[e]=i,c=!0)})),c){var h=l.put(s,1);h.onsuccess=function(){return o(null)},h.onerror=function(){a(h.error)}}}else{var f={sequenceNumber:0};n&&Object.keys(n).forEach((function(e){f[e]=0}));var p=l.add(f);p.onsuccess=function(){return o(0)},p.onerror=function(){a(p.error)}}},u.onerror=function(){return s.close(),a(new Error("Error: get sequence number from indexedDB ".concat(String(u.error))))},c.oncomplete=function(){return s.close()}},r.onerror=function(){return o(null)}}))}return Promise.resolve(null)}function jn(){return"undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1||!Gt()||"undefined"==typeof Promise}function Gn(e,t,n,r){var i=["core-web-tracking:".concat(e)];null==r||r.forEach((function(e){return i.push(e)})),_n.emit(En,{tags:i,reason:t instanceof Error?t:new Error("".concat(e,": ").concat(t)),responseHeaders:n})}function zn(e){var t=window.structuredClone;return t?t(e):JSON.parse(JSON.stringify(e))}var Xn=function(){function e(t){Ue(this,e),Ve(this,"heap",void 0),Ve(this,"comparator",void 0),this.comparator=t,this.heap=[]}return He(e,[{key:"heapsize",value:function(){return this.heap.length}},{key:"peak",value:function(){return this.heap[0]}},{key:"heapArray",get:function(){return this.heap}},{key:"heapClear",value:function(){var e=Me(this.heap);return this.heap=[],e}},{key:"heappop",value:function(){var e=this.heap.length,t=[this.heap[e-1],this.heap[0]];this.heap[0]=t[0],this.heap[e-1]=t[1];for(var n=this.heap.pop(),r=0;2*r+10;){var n=Math.floor((t-1)/2);if(!this.comparator(this.heap[t],this.heap[n]))break;var r=[this.heap[n],this.heap[t]];this.heap[t]=r[0],this.heap[n]=r[1],t=n}}}]),e}();var Jn=function(e){if(!Qn(e))return[];for(var t=[],n=0,r=Object.keys(e);n0){var l,u=Pe(s);try{for(u.s();!(l=u.n()).done;){var d,h=l.value;t.includes(h)?(null!==(d=n[h])&&void 0!==d||(n[h]=[]),n[h].push(c)):r.push(c)}}catch(e){u.e(e)}finally{u.f()}}else r.push(c)}}catch(e){o.e(e)}finally{o.f()}return[n,r]};var Qn=function(e){return e&&void 0!==e&&Object.keys(e).length>0},Yn=function(e,t){return(e.endsWith("/")?e:"".concat(e,"/"))+(t.startsWith("/")?t.slice(1):t)},Zn="beacons";function er(){if("undefined"==typeof Promise||"undefined"==typeof navigator)return!1;var e=navigator.userAgent.indexOf("Chrome")>-1,t=navigator.cookieEnabled,n=navigator.storage;return e&&zt()&&t&&n}function tr(e,t,n,r,i){"control"!==r&&e.retryConfig&&er()&&navigator.storage.estimate().then((function(o){if(!((o.quota||0)-(o.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)}}))}(Zn);var a,s,c=null!==(a=e.retryConfig.inMemory)&&void 0!==a?a:{attemptLimit:4,statusCodes:[502,504]},l=null!==(s=e.retryConfig.persist)&&void 0!==s?s:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},u={compress:n,inMemoryRetry:{onIntermediateResult:null==i?void 0:i.onIntermediateResult,attemptLimit:c.attemptLimit,statusCodes:c.statusCodes,headerName:"x-li-retry-context",calculateRetryDelay:function(e){return function(e){return 1e3*Math.pow(2,e)}(e)}},disablePersistenceRetry:e.retryConfig.disablePersistence,persistenceRetry:{onBeforeRetry:null==i?void 0:i.onBeforeRetry,onResult:null==i?void 0:i.onResult,idbName:Zn,attemptLimit:l.attemptLimit,statusCodes:l.statusCodes,maxNumber:l.maxNumber,batchEvictionNumber:l.batchEvictionNumber,throttleWait:l.throttleWait,useIdle:!0,measureIDB:{createStartMark:"idb_open_start",createSuccessMeasure:"idb_open_success_phase",createFailMeasure:"idb_open_fail_phase"}}},d=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Boolean(t.compress),r=Object.assign({attemptLimit:0,statusCodes:vn,calculateRetryDelay:function(e,t){return 2e3*t}},t.inMemoryRetry);if(t.retryDB)e=t.retryDB;else{var i=Object.assign({idbName:"beacon-transporter",attemptLimit:3,statusCodes:gn,maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},t.persistenceRetry);i.headerName=i.headerName||r.headerName,e=new pn(i,{compress:t.compress,disablePersistenceRetry:t.disablePersistenceRetry})}return{beacon:function(i,o,a){var s;return Gt()?new mn(i,o,r,{db:e,disabled:Boolean(t.disablePersistenceRetry),statusCodes:(null===(s=t.persistenceRetry)||void 0===s?void 0:s.statusCodes)||gn},n).send(a):Promise.resolve({type:"unknown",drop:!0})},database:e}}(u),h=d.beacon,f=d.database;return e.retryBeacon={shouldRetry:!0,beacon:h,database:f},"enabled"===r?(e.retryBeacon.shouldRetry=!1,!u.disablePersistenceRetry&&t.shouldAnonymizeMemberId()?f.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 f.clearQueue()}}),(function(){return f.clearQueue()})).then((function(){e.retryBeacon.shouldRetry=!0})).catch((function(e){Gn("retry:idb",e)})):(e.retryBeacon.shouldRetry=!0,Promise.resolve())):void 0})).catch((function(e){Gn("retry:setup",e)}))}var nr=function(){function e(t){Ue(this,e),Ve(this,"host",void 0),this.host=t}return He(e,[{key:"checkAndEnablePersistentRetry",value:function(e,t){if("function"==typeof(null==e?void 0:e.shouldAnonymizeMemberId)&&!this.host.retryBeacon){var n=this.getRetryTreatment();this.host.retryConfig&&tr(this.host,e,this.shouldCompressPayload(),n,t)}}},{key:"clearPersistedEventsOnLogout",value:function(){var e=this.host.retryBeacon;if(e&&e.shouldRetry)return e.shouldRetry=!1,e.database.clearQueue().catch((function(e){Gn("retry:logout",e)}))}},{key:"sendPayload",value:function(e,t,n,r){var i,o=this.getRetryTreatment();zt()&&"control"!==o&&null!==(i=this.host.retryBeacon)&&void 0!==i&&i.shouldRetry?this.sendPayloadWithRetry(e,t,n):this.sendPayloadFireForget(e,t,n,r)}},{key:"sendPayloadWithRetry",value:function(e,t,n){(!Array.isArray(t)||t.length>0)&&this.host.retryBeacon.beacon(e,JSON.stringify(t),n).catch((function(e){Gn("retry:beacon",e)}))}},{key:"sendPayloadFireForget",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3?arguments[3]:void 0;(!Array.isArray(t)||t.length>0)&&(jn()?function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("undefined"!=typeof window&&void 0!==window.XMLHttpRequest){var r=new XMLHttpRequest;if(r.open("POST",e,!0),r.withCredentials=!0,n.headers)for(var i=0,o=Object.keys(n.headers);i0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheLifeSpan,n=void 0===t?1e4:t,r=e.regex,i=void 0===r?ir:r;if(!or||Date.now()-ar>n){var o=rr&&document.cookie.match(i);or=o&&o[1]||"",ar=Date.now()}return or}var cr={prod:{pattern:new RegExp(/https: \/\/www.linkedin.com\/.+|https:\/\/www.linkedin.com\/li\/track$/),monitorEndpoint:"https://www.linkedin.com/trackingMonitoring/?action=reportClientFailures"},ei:{pattern:new RegExp(/https: \/\/www.linkedin-ei.com\/.+|https:\/\/www.linkedin-ei.com\/li\/track$/),monitorEndpoint:"https://www.linkedin-ei.com/trackingMonitoring/?action=reportClientFailures"},eiValidate:{pattern:new RegExp(/https:\/\/www\.linkedin-ei\.com\/.+\/validate$/),monitorEndpoint:"https://www.linkedin-ei.com/trackingMonitoring/?action=reportClientFailures"}},lr=function(){function e(t){Ue(this,e),Ve(this,"networkTransporter",void 0),Ve(this,"inactive",void 0),Ve(this,"mpName",void 0),Ve(this,"endpoint",void 0),Ve(this,"debug",void 0),this.networkTransporter=new nr(t),this.mpName=t.appId,this.inactive=t.inactive;var n=function(e){var t,n=!1;return cr.prod.pattern.test(e)?t=cr.prod.monitorEndpoint:cr.eiValidate.pattern.test(e)?(n=!0,t=cr.eiValidate.monitorEndpoint):cr.ei.pattern.test(e)?t=cr.ei.monitorEndpoint:(t=cr.ei.monitorEndpoint,n=!0),{endpoint:t,debug:n}}(t.endpoint);this.endpoint=n.endpoint,this.debug=n.debug}return He(e,[{key:"fireFragment",value:function(e){var t;if(!this.inactive){var n={"content-type":"application/json; charset=UTF-8","x-li-track":JSON.stringify({mpName:this.mpName}),"csrf-token":sr(),"x-restli-protocol-version":"2.0.0"},r=[],i=null!==(t=null==e?void 0:e.stats)&&void 0!==t?t:{},o=i.failures,a=i.previousInstanceEventStats.reduce((function(e,t){return e.push.apply(e,Me(t.failures)),e}),[]);[].concat(Me(o),Me(a)).forEach((function(e){var t=e.reason,n=e.rawError,i=e.eventTopic,o=e.header,a=e.requestHeader;r.push({reason:t,rawError:n,failedTopicName:i,header:o,requestHeader:a})}));var s={clientTrackingFailures:r,debug:this.debug};this.networkTransporter.sendPayload(this.endpoint,s,n)}}}]),e}();function ur(e){return"string"==typeof e}function dr(e){return ur(e)?e:e.topicName||e.eventName}function hr(e){return ur(e)?e:e.eventName}var fr,pr,vr=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Ue(this,e),Ve(this,"host",void 0),Ve(this,"cmoTransporter",void 0),Ve(this,"clientMonitoringInstanceId",Dn()),Ve(this,"currentContext",{pageKey:je,pageInstance:Bn(je)}),Ve(this,"appState",{}),Ve(this,"estimatedFragmentSize",0),Ve(this,"fragmentSizeLimit",void 0),Ve(this,"activeFragmentEvent",void 0),Ve(this,"debounceTimer",void 0),this.host=t,this.cmoTransporter=r.cmoTransporter||new lr(t),this.fragmentSizeLimit=(null===(n=t.clientMonitoringConfig)||void 0===n?void 0:n.fragmentSizeLimit)||10240,this.activeFragmentEvent=mr(this.clientMonitoringInstanceId,0,0,!1,this.getEventHeaders())}return He(e,[{key:"getCurrentInstanceId",value:function(){return this.clientMonitoringInstanceId}},{key:"scheduleDebouncedFiring",value:function(){var e,t,n=this;void 0!==this.debounceTimer&&(clearTimeout(this.debounceTimer),this.debounceTimer=void 0),this.fragmentIsFull()&&this.fireFragmentEventIfFull(!0),this.debounceTimer=setTimeout((function(){n.fireFragmentEventIfFull()}),null!==(e=null===(t=this.host.batching)||void 0===t?void 0:t.debounceTime)&&void 0!==e?e:1)}},{key:"logEventGenerated",value:function(e){this.scheduleDebouncedFiring();var t=this.activeFragmentEvent.stats,n=this.activeFragmentEvent.firstEventNumber+t.eventsGenerated;return t.eventTopics.push(e),t.eventsGenerated++,this.estimatedFragmentSize+=e.length,n}},{key:"logEventReadyToSend",value:function(e){this.activeFragmentEvent.stats.eventsReadyToSend+=e}},{key:"logEventSent",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCurrentInstanceId();t===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.eventsSent+=e:this.findPreviousInstanceStat(t,(function(t){t.eventsSent+=e}))}},{key:"logNetworkResponseCode",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.getCurrentInstanceId(),n=this.activeFragmentEvent.stats.networkResponseStats;t!==this.getCurrentInstanceId()&&this.findPreviousInstanceStat(t,(function(e){n=e.networkResponseStats})),e>=200&&e<300?n.eventsWith2XXResponse++:400===e?n.eventsWith400Response++:408===e?n.eventsWith408Response++:429===e?n.eventsWith429Response++:e>400&&e<500?n.eventsWith4XXResponse++:500===e?n.eventsWith500Response++:502===e?n.eventsWith502Response++:503===e?n.eventsWith503Response++:504===e?n.eventsWith504Response++:e>500&&e<600&&n.eventsWith5XXResponse++}},{key:"findPreviousInstanceStat",value:function(e,t){var n,r=Pe(this.activeFragmentEvent.stats.previousInstanceEventStats);try{for(r.s();!(n=r.n()).done;){var i=n.value;if(i.instanceId===e)return void t(i)}}catch(e){r.e(e)}finally{r.f()}var o=this.getEventHeaders(),a=o.header,s=o.requestHeader,c={header:Object.assign(a,{memberId:-1}),requestHeader:s,instanceId:e,eventsSent:0,eventTopics:[],networkResponseStats:{eventsWith2XXResponse:0,eventsWith400Response:0,eventsWith408Response:0,eventsWith429Response:0,eventsWith4XXResponse:0,eventsWith500Response:0,eventsWith502Response:0,eventsWith503Response:0,eventsWith504Response:0,eventsWith5XXResponse:0},failures:[]};t(c),this.activeFragmentEvent.stats.previousInstanceEventStats.push(c)}},{key:"logFailedEvent",value:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getCurrentInstanceId(),o=this.getEventHeaders(),a=o.header,s=o.requestHeader,c={header:Object.assign(a,{memberId:-1}),requestHeader:s,instanceId:i,instanceEventNumber:r,reason:e,rawError:n,eventName:hr(t),eventTopic:dr(t)};this.estimatedFragmentSize+=JSON.stringify(c).length,i===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.failures.push(c):this.findPreviousInstanceStat(i,(function(e){e.failures.push(c)})),this.fireFragmentEventIfFull()}},{key:"flush",value:function(){this.activeFragmentEvent.isLastFragment=!0,this.fireFragmentEventIfFull(!0)}},{key:"fragmentIsFull",value:function(){return this.activeFragmentEvent.stats.eventsGenerated>=100||this.estimatedFragmentSize>=this.fragmentSizeLimit}},{key:"fireFragmentEventIfFull",value:function(){if(arguments.length>0&&void 0!==arguments[0]&&arguments[0]||this.fragmentIsFull()){this.debounceTimer=void 0;var e=this.getEventHeaders(),t=e.header,n=e.requestHeader,r=this.activeFragmentEvent;r.header=t,r.requestHeader=n,this.cmoTransporter.fireFragment(r),this.estimatedFragmentSize=0,this.activeFragmentEvent=mr(this.clientMonitoringInstanceId,r.fragmentNumber+1,r.firstEventNumber+r.stats.eventsGenerated,!1,e)}}},{key:"setCurrentContext",value:function(e){this.currentContext=e}},{key:"updateAppState",value:function(e){this.host.api.assign(this.appState,e)}},{key:"getEventHeaders",value:function(){var e=void 0;this.appState.clientApplicationInstance&&((e=this.appState.clientApplicationInstance).trackingId=yr(e.trackingId));var t=this.currentContext.pageInstance;return t.trackingId=yr(t.trackingId),{requestHeader:{interfaceLocale:this.host.locale,pageKey:this.currentContext.pageKey,path:this.host.api.location.pathname+this.host.api.location.search,referer:this.host.api.document.referrer},header:{applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:e,pageInstance:t,time:Date.now(),version:this.host.appVersion,server:"",service:"",guid:Dn(),memberId:0}}}}]),e}();function gr(e){return fr||(fr=new vr(e)),{getCurrentInstanceId:function(){return fr.getCurrentInstanceId()},logEventGenerated:function(e){return fr.logEventGenerated(e)},logEventReadyToSend:function(e){fr.logEventReadyToSend(e)},logEventSent:function(e){fr.logEventSent(e)},logPersistedEventSent:function(e,t){fr.logEventSent(t,e)},logNetworkResponseCode:function(e){fr.logNetworkResponseCode(e)},logPersistedNetworkResponseCode:function(e,t){var n;null===(n=fr)||void 0===n||n.logNetworkResponseCode(t,e)},logFailedEvent:function(e,t,n,r){fr.logFailedEvent(e,t,n,r)},logPersistedFailedEvent:function(e,t,n,r,i){fr.logFailedEvent(t,n,r,i,e)},flush:function(){fr.flush()},destroy:function(){fr=void 0},isDestroyed:function(){return void 0===fr},setCurrentContext:function(e){fr.setCurrentContext(e)},updateAppState:function(e){fr.updateAppState(e)}}}function mr(e,t,n,r,i){return{fragmentNumber:t,firstEventNumber:n,isLastFragment:r,stats:{instanceId:e,eventsGenerated:0,eventsReadyToSend:0,eventsSent:0,networkResponseStats:{eventsWith2XXResponse:0,eventsWith400Response:0,eventsWith408Response:0,eventsWith429Response:0,eventsWith4XXResponse:0,eventsWith500Response:0,eventsWith502Response:0,eventsWith503Response:0,eventsWith504Response:0,eventsWith5XXResponse:0},eventTopics:[],failures:[],previousInstanceEventStats:[]},requestHeader:i.requestHeader,header:i.header}}function yr(e){return Array.isArray(e)?Ln(e):16===e.length?e:function(e){return"string"==typeof e&&!!e.match(Pn)}(e)?atob(e):Ln(Fn(e))}!function(e){e.NONE="NONE",e.UNKNOWN_EXECUTION_ERROR="UNKNOWN_EXECUTION_ERROR",e.MISSING_REQUIRED_PROPERTIES="MISSING_REQUIRED_PROPERITES",e.STORAGE_WRITE_FAILURE="STORAGE_WRITE_FAILURE",e.RETRIES_EXCEEDED="RETRIES_EXCEEDED",e.EVENT_EVICTED_FROM_STORAGE="EVENT_EVICTED_FROM_STORAGE",e.STORAGE_UNAVAILABLE="STORAGE_UNAVAILABLE",e.SERIALIZATION_FAILURE="SERIALIZATION_FAILURE"}(pr||(pr={}));var Er=["PageViewEvent","SponsoredImpressionEvent","JobViewEvent"],br="PageViewEvent",wr=function(){function e(t){var n,r,i,o=this;Ue(this,e),Ve(this,"host",void 0),Ve(this,"queue",void 0),Ve(this,"preContextQueue",void 0),Ve(this,"debounceTimer",void 0),Ve(this,"unloadHandlers",void 0),Ve(this,"maxQueueSize",void 0),Ve(this,"flushDebounceTime",void 0),Ve(this,"trackingEventListeners",[]),Ve(this,"onHideHandler",(function(){o.forceFlush()})),Ve(this,"networkTransporter",void 0),Ve(this,"clientMonitoringConn",void 0),Ve(this,"clientGlobalSequenceNumberCounter",void 0),Ve(this,"clientTopicLocalSequenceNumberCountersMap",{}),Ve(this,"isTimerRunning",void 0),Ve(this,"trackingEndpoint",void 0),Ve(this,"isEvenBatchEnabled",void 0),this.host=t,this.queue=[],this.preContextQueue=[],this.unloadHandlers=[];var a=t.batching,s=null!==(n=null==a?void 0:a.evenBatchEnabled)&&void 0!==n&&n,c="development"===t.environment||(null===(r=t.api)||void 0===r||null===(r=r.location)||void 0===r||null===(r=r.host)||void 0===r?void 0:r.indexOf("-ei."))>-1?"https://www.linkedin-ei.com/li/track/validate":t.endpoint||"https://www.linkedin.com/li/track";this.trackingEndpoint=function(e,t){return/linkedin(?:-ei)?\.cn/.test(t)?e.replace(/\/\/(\S+?)\.linkedin(-ei)?\.com/,"//$1.linkedin$2.cn"):e}(c,null===(i=t.api)||void 0===i||null===(i=i.location)||void 0===i?void 0:i.host),this.maxQueueSize=a&&a.maxSize||1,this.flushDebounceTime=a&&a.debounceTime||0,_n.on(yn,this.onHideHandler),this.networkTransporter=new nr(t),this.isLixEnabled("pemberly.tracking.monitoring")&&t.clientMonitoringConfig&&!t.inactive&&(this.clientMonitoringConn=gr(t)),this.getSequenceNumberFromIDB(),this.updateSequenceNumberOnExit(),this.isTimerRunning=!1,this.isEvenBatchEnabled=this.isLixEnabled("pemberly.tracking.even-batch")||s}return He(e,[{key:"checkAndEnablePersistentRetry",value:function(e){var t,n=(t=this.clientMonitoringConn,{onIntermediateResult:function(e,n){var r;if(t&&!t.isDestroyed())try{if(r=JSON.parse(n),!Array.isArray(r)||0===r.length)return;e.statusCode&&t.logNetworkResponseCode(e.statusCode),!0===e.drop&&r.forEach((function(n){var r,i=n.eventInfo.eventName,o=n.eventInfo.topicName||i,a="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(a)].join(", ");t.logFailedEvent(pr.UNKNOWN_EXECUTION_ERROR,{eventName:i,topicName:o},s,null!==(r=n.eventBody.header.clientMonitoringInstanceEventNumber)&&void 0!==r?r:-1)}))}catch(e){}},onBeforeRetry:function(e){var n;if(t&&!t.isDestroyed())try{if(n=JSON.parse(e),!Array.isArray(n)||0===n.length||!n[0].eventBody.header.clientMonitoringInstanceId)return;var r=n[0].eventBody.header.clientMonitoringInstanceId,i=n.length;t.logPersistedEventSent(r,i)}catch(e){}},onResult:function(e,n){var r;if(t)try{if(r=JSON.parse(n),!Array.isArray(r)||0===r.length||!r[0].eventBody.header.clientMonitoringInstanceId)return;var i=r[0].eventBody.header.clientMonitoringInstanceId;e.statusCode&&t.logPersistedNetworkResponseCode(i,e.statusCode),!0===e.drop&&r.forEach((function(n){var r=n.eventInfo.eventName,o=n.eventInfo.topicName||r,a="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(a)].join(", ");t.logPersistedFailedEvent(i,pr.UNKNOWN_EXECUTION_ERROR,{eventName:r,topicName:o},s,n.eventBody.header.clientMonitoringInstanceEventNumber)}))}catch(e){}}});this.networkTransporter.checkAndEnablePersistentRetry(e,n)}},{key:"clearPersistedEventsOnLogout",value:function(){return this.networkTransporter.clearPersistedEventsOnLogout()}},{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);this.clientMonitoringConn&&(t.meta.clientMonitoringInstanceId=this.clientMonitoringConn.getCurrentInstanceId(),t.meta.clientMonitoringInstanceEventNumber=this.clientMonitoringConn.logEventGenerated(dr(e.id)));var n=this.host,r=n.api.Promise,i=n.batching;if(function(e){return!!e.meta.context}(t)){var o,a=this.prepareCompleteEnvelopeQueue(t);return null===(o=this.clientMonitoringConn)||void 0===o||o.logEventReadyToSend(1),this.queue.push(a),i?(this.batchFire(),r.resolve(!0)):(this.flush(!0),r.resolve(!0))}return this.preContextQueue.push(t),r.resolve(!0)}},{key:"callOnDestroy",value:function(e){this.unloadHandlers.push(e)}},{key:"destroy",value:function(){var e,t,n;this.unloadHandlers.forEach((function(e){return e()})),this.forceFlush(),this.trackingEventListeners=[],this.clientMonitoringConn=void 0,_n.off(yn,this.onHideHandler),null!==(e=this.host)&&void 0!==e&&e.__getLixTreatment&&(this.host.__getLixTreatment=void 0),null!==(t=this.host)&&void 0!==t&&null!==(t=t.api)&&void 0!==t&&t.location&&(this.host.api.location=null===(n=window)||void 0===n?void 0:n.location)}},{key:"forceFlush",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;this.populatePreContextQueue({pageInstance:Bn(je),pageKey:je}).forEach((function(t){e.queue.push(t)})),this.isEvenBatchEnabled?1===t?this.sendPayload(void 0,!0):this.sendPayload():this.flush(!0)}},{key:"isLixEnabled",value:function(e){var t,n;return"enabled"===(null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,e))}},{key:"getSequenceNumberFromIDB",value:function(){var e=this;qn("read").then((function(t){var n;e.clientGlobalSequenceNumberCounter=null!==(n=null==t?void 0:t.sequenceNumber)&&void 0!==n?n:0,Er.forEach((function(n){var r;e.clientTopicLocalSequenceNumberCountersMap[n]=null!==(r=null==t?void 0:t[n])&&void 0!==r?r:0}))})).catch((function(e){Gn("sequence-number:idb-read",e)}))}},{key:"updateSequenceNumberToIDB",value:function(){qn("update",this.clientGlobalSequenceNumberCounter,this.clientTopicLocalSequenceNumberCountersMap).catch((function(e){Gn("sequence-number:idb-update",e)}))}},{key:"updateSequenceNumberOnExit",value:function(){var e=this;"undefined"!=typeof window&&"undefined"!=typeof document&&window.addEventListener("beforeunload",(function t(){e.updateSequenceNumberToIDB(),window.removeEventListener("beforeunload",t)}))}},{key:"prepareCompleteEnvelopeQueue",value:function(e){var t=this,n=e.meta.context=Hn(e.meta.context,this.host.api);return"function"==typeof e.body&&(e.body=e.body(n)),this.preContextQueue.length>0&&this.populatePreContextQueue(n).forEach((function(e){return t.queue.push(e)})),e}},{key:"envelop",value:function(e,t,n){var r=this.host,i=r.appId,o=r.api,a={eventBody:t,eventInfo:"string"==typeof e?{appId:i,eventName:e,topicName:e}:o.assign({appId:i},e)};return n.length>0&&this.host.api.assign(a,{clientBreadcrumbs:n}),a}},{key:"getBreadcrumbs",value:function(e){return e.clientBreadcrumbs||[]}},{key:"getGenericEventBody",value:function(e){var t,n=this.host,r=n.appVersion,i=n.locale,o=n.api,a=o.location,s=o.document,c=o.assign,l=e.meta.context,u=l.pageKey,d=l.pageInstance,h=function(e){return"string"==typeof e?e===br:e.eventName===br}(e.id)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||u,f=e.meta.requestHeader||{referer:s.referrer,path:"".concat(a.pathname).concat(a.search)},p=f.referer,v=f.path,g=null;"string"!=typeof i&&null!==this.host.locale||(g=i);var m={interfaceLocale:g,pageKey:h,referer:p,path:v,isFlushOnCloseBrowserTabEnabled:!jn()&&(zt()||"undefined"!=typeof navigator&&"sendBeacon"in navigator),isBrowserPersistentRetryEnabled:this.networkTransporter.isBrowserPersistentRetryEnabled(),clientDeviceType:"DESKTOP",timeZoneOffsetMinutes:-1*(new Date).getTimezoneOffset()},y={pageInstance:d,time:e.meta.time,version:r,server:"",service:"",guid:Dn(),memberId:0};"number"==typeof this.clientGlobalSequenceNumberCounter&&c(y,{clientGlobalSequenceNumber:this.clientGlobalSequenceNumberCounter});var E=dr(e.id);if(Er.includes(E)){var b=this.clientTopicLocalSequenceNumberCountersMap[E];"number"==typeof b&&c(y,{clientTopicLocalSequenceNumber:b})}var w={header:c(y,e.meta.header||{}),requestHeader:c(m,e.meta.requestHeader||{})},T=e.meta.clientMonitoringInstanceId,C=e.meta.clientMonitoringInstanceEventNumber;return T&&c(w.header,{clientMonitoringInstanceId:T,clientMonitoringInstanceEventNumber:C}),c(e.body,w)}},{key:"populatePreContextQueue",value:function(e){var t,n=this.preContextQueue;return this.preContextQueue=[],null===(t=this.clientMonitoringConn)||void 0===t||t.logEventReadyToSend(n.length),n.map((function(t){return t.meta.context=e,"function"==typeof t.body&&(t.body=t.body(e)),t}))}},{key:"trigger",value:function(e,t){this.trackingEventListeners.forEach((function(n){return n(e,t)}))}},{key:"requestFlush",value:function(e){var t=this;e((function(){t.forceFlush(0)}),{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(void 0,!0):this.requestFlush(t)}},{key:"batchFire",value:function(){var e=this;this.queue.length>this.maxQueueSize?this.flush():(this.debounceTimer&&clearTimeout(this.debounceTimer),this.debounceTimer=setTimeout((function(){return e.flush()}),this.flushDebounceTime))}},{key:"sendPayload",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.isEvenBatchEnabled)if(Array.isArray(e)&&e.length>0)t=e;else{var i=this.maxQueueSize+1;this.queue.length>0&&(this.queue.length<=i||r)?(t=this.queue,this.queue=[]):t=this.queue.splice(0,i)}else Array.isArray(e)&&e.length>0?t=e:(t=this.queue,this.queue=[]);if(0!==t.length){"undefined"!=typeof window&&!1===this.isTimerRunning&&(this.isTimerRunning=!0,setInterval((function(){n.updateSequenceNumberToIDB()}),5e3));var o,a,s=[],c=[];t.forEach((function(e){var t=n.getGenericEventBody(e),r=n.getBreadcrumbs(e),i=n.envelop(e.id,t,r);n.trigger(i,e.meta);var o=i.eventInfo.eventName;"LixTreatmentsEvent"===o||"JavaScriptErrorEvent"===o?s.push(i):c.push(i),"number"==typeof n.clientGlobalSequenceNumberCounter&&n.clientGlobalSequenceNumberCounter++;var a=dr(e.id);Er.includes(a)&&"number"==typeof n.clientTopicLocalSequenceNumberCountersMap[a]&&n.clientTopicLocalSequenceNumberCountersMap[a]++})),this.host.inactive||(this.clientMonitoringConn&&(this.clientMonitoringConn.logEventSent(s.length+c.length),a=this.clientMonitoringConn,o={onResult:function(e,t){a&&!a.isDestroyed()&&(e.statusCode&&a.logNetworkResponseCode(e.statusCode),!0===e.drop&&t.forEach((function(t){var n=t.eventInfo.eventName,r=t.eventInfo.topicName||n,i="rawError"in e?e.rawError:"null",o=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(i)].join(", ");null==a||a.logFailedEvent(pr.UNKNOWN_EXECUTION_ERROR,{eventName:n,topicName:r},o,t.eventBody.header.clientMonitoringInstanceEventNumber||-1)})))}}),this.networkTransporter.sendPayloadFireForget(this.trackingEndpoint,s,void 0,o),this.networkTransporter.sendPayload(this.trackingEndpoint,c,void 0,o))}}},{key:"getTrackingEndpoint",value:function(){return this.trackingEndpoint}}]),e}();var Tr,Cr=function(){function e(t,n){Ue(this,e),this.clientBreadcrumbType=t,this.id=n}return He(e,[{key:"builder",get:function(){return function(){var e={},t=new Proxy({},{get:function(n,r){return"build"===r?function(){return e}:function(n){return e[r.toString()]=n,t}}});return t}().id(this.id).clientBreadcrumbType(this.clientBreadcrumbType)}}],[{key:"toPointer",value:function(e){return{id:e.id,type:e.clientBreadcrumbType}}}]),e}();!function(e){e.UNKNOWN="UNKNOWN",e.ME_NOTIFICATION="ME_NOTIFICATION",e.ME_NOTIFICATION_ACTION="ME_NOTIFICATION_ACTION",e.JOB_VIEW="JOB_VIEW",e.MEDIA="MEDIA",e.FEED_UPDATE_SERVED="FEED_UPDATE_SERVED",e.MESSAGE_SEND_CLIENT_SUCCESS="MESSAGE_SEND_CLIENT_SUCCESS",e.MESSAGE_SEND_CLIENT_FAILURE="MESSAGE_SEND_CLIENT_FAILURE",e.MESSAGE_SEND_FUNNEL="MESSAGE_SEND_FUNNEL",e.SPONSORED_UPDATE_SERVED="SPONSORED_UPDATE_SERVED",e.GUIDE_ENTRYPOINT="GUIDE_ENTRYPOINT",e.GUIDE_FEEDBACK="GUIDE_FEEDBACK"}(Tr||(Tr={}));var _r=function(e){function t(){return Ue(this,t),ke(this,t,[Tr.FEED_UPDATE_SERVED,Dn()])}return Ne(t,Cr),He(t)}(),Ir=function(e){function t(){var e;return Ue(this,t),Ve(Ae(e=ke(this,t,[Tr.UNKNOWN,Dn()])),"content",void 0),Ve(Ae(e),"featureBreadcrumbType",void 0),e}return Ne(t,Cr),He(t)}(),Sr=function(e){function t(){return Ue(this,t),ke(this,t,[Tr.SPONSORED_UPDATE_SERVED,Dn()])}return Ne(t,Cr),He(t)}();function kr(e,t){var n;switch(t){case"proto.sdui.breadcrumbs.feed.FeedUpdateServedBreadcrumb":n=(new _r).builder;break;case"proto.sdui.breadcrumbs.feed.SponsoredUpdateServedBreadcrumb":n=(new Sr).builder;break;case"proto.sdui.tracking.TrackingBreadcrumb":n=(new Ir).builder;var r,i=e;try{if(void 0!==i.content.type)r=(new TextDecoder).decode(new Uint8Array(i.content.data));else{if(!(i.content instanceof Uint8Array))throw new Error("Invalid breadcrumb content type");r=(new TextDecoder).decode(i.content)}for(var o=null==e?void 0:e.breadcrumbType,a={content:JSON.parse(r),breadcrumbType:o},s=0,c=Object.entries(a);s1)return{pageUrn:t[0],trackingId:t[1]}}(e.lipi);if(o?i={pageInstance:o,pageKey:t}:t&&(i={pageKey:t}),e.external_page&&e.external_page_instance){var a=decodeURIComponent(e.external_page);i={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&&((i=i||{}).applicationInstance=s),{fromExternalApp:n||!!s,previousApplicationInstance:s,previousContext:i,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:r}}var Nr=Object.freeze({__proto__:null,voyagerTransporterConfig:{sponsored:{endpoint:"li/tscp/sct",batching:!1,disableCompression:!1,retryConfig:{persist:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]},inMemory:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]}}},default:{endpoint:"li/track",batching:{evenBatchEnabled:!0,maxSize:29},disableCompression:!1,retryConfig:{persist:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]},inMemory:{attemptLimit:4,statusCodes:[429,431,401,403,404,500,405,501,406,502,407,503,408,504,409,505,506,507,508,413,509,510,511]}}}}});function Lr(e){return"retryConfig"in e.host}function Dr(e){return"location"in e.api}var Pr,Mr=function(){function e(t,n,r,i,o,a,s,c){var l,u,d,h;if(Ue(this,e),Ve(this,"transporter",void 0),Ve(this,"delegate",void 0),Ve(this,"viewSpecs",void 0),Ve(this,"transportConfig",void 0),Ve(this,"dynamicTransporterSupportLixKey",void 0),Ve(this,"domain",void 0),Ve(this,"trackingAppName",void 0),Ve(this,"dynamicTransporterSupportLixValue",void 0),Ve(this,"currentContext",void 0),Ve(this,"appState",void 0),Ve(this,"referrer",void 0),Ve(this,"previousAppContext",void 0),Ve(this,"customTransporters",void 0),Ve(this,"clientMonitoringConn",void 0),Ve(this,"dynamicTransporterSupportEnabled",void 0),this.transporter=t,this.delegate=n,this.viewSpecs=r,this.transportConfig=i,this.dynamicTransporterSupportLixKey=o,this.domain=a,this.trackingAppName=s,this.dynamicTransporterSupportLixValue=c,this.appState={},this.customTransporters={},this.transportConfig={},this.dynamicTransporterSupportEnabled=!1,o?this.dynamicTransporterSupportEnabled=function(e){return!(!e||"control"===e)}(null===(d=(h=t.host).__getLixTreatment)||void 0===d?void 0:d.call(h,o)):c&&(this.dynamicTransporterSupportEnabled=!!s&&c),this.dynamicTransporterSupportEnabled){var f=null==Nr?void 0:Nr["".concat(null==s?void 0:s.toLowerCase(),"TransporterConfig")];Qn(f)?this.transportConfig=f:this.transportConfig=i}if(n&&n.customTransporterHosts)for(var p in n.customTransporterHosts)if(Object.prototype.hasOwnProperty.call(n.customTransporterHosts,p)){var v=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[p]=new wr(this.transporter.host.api.assign(v,n.customTransporterHosts[p]))}if(this.dynamicTransporterSupportEnabled&&Qn(this.transportConfig))for(var g=0,m=Object.entries(this.transportConfig);g1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.navMetaFromSeed(e,Or(t),null==n?void 0:n.pageInstanceTrackingId);if(this.setCurrentContext(r.to),!n.suppressEventsFiring)return this.fireNavEvents(r)}},{key:"setCurrentContext",value:function(e){var t;this.currentContext=Hn(e,this.host.api),null===(t=this.clientMonitoringConn)||void 0===t||t.setCurrentContext(Hn(e,this.host.api))}},{key:"updateAppState",value:function(e){var t;this.host.api.assign(this.appState,e),null===(t=this.clientMonitoringConn)||void 0===t||t.updateAppState(e)}},{key:"fireCIE",value:function(e,t,n,r,i){return this.fireEvent("ControlInteractionEvent",(function(n){var o=Un(n.pageKey,e),a={controlTrackingId:r,controlUrn:o,interactionType:t};return i&&i(o),a}),{context:n})}},{key:"getViewHierarchy",value:function(e){for(var t=[],n=e;n instanceof Element&&"body"!==n.tagName.toLowerCase();){var r=n.closest("[data-view-name]");if(r){var i=r.getAttribute("data-view-name");i&&t.push(i)}n=null==r?void 0:r.parentElement}return t}},{key:"getViewTrackingScope",value:function(e){for(var t=[],n=e;n instanceof Element&&"body"!==n.tagName.toLowerCase();){var r=n.closest("[data-view-tracking-scope]");if(r){var i=r.getAttribute("data-view-tracking-scope");if(i)try{var o=JSON.parse(i);o&&o.length&&t.push.apply(t,Me(o))}catch(e){Gn("getViewTrackingScope","Error parsing trackingScope ".concat(i))}}n=null==r?void 0:r.parentElement}return t}},{key:"fireInteraction",value:function(e){var t,n=e.manualFireReason,r=e.interactionType,i=e.targetView,o=e.viewHierarchy,a=void 0===o?[]:o,s=e.viewTrackingScope,c=void 0===s?[]:s,l=e.verticalPosition,u=e.horizontalPosition,d=e.controlUrn,h=void 0===d?"":d,f=e.actionType,p=e.contentTrackingId,v=void 0===p?void 0:p,g=e.clientBreadcrumbs,m=void 0===g?[]:g,y=e.isShadowEvent,E=e.cooloffToken,b=e.testId,w=e.mediaStateInfo,T=i?this.getViewHierarchy(i):[],C=T.length>0?T:a;0!==C.length&&(!this.viewSpecs||null!==(t=this.viewSpecs)&&void 0!==t&&t.some((function(e){return e.viewName==C[0]})))||console.warn("No viewHierarchy provided or found from element.");var _=c.length>0?c:this.getViewTrackingScope(i);if(this.dynamicTransporterSupportEnabled){var I=Jn(this.transportConfig),S=Se($n(_,I),2),k=S[0],A=S[1],R="GenericActionEvent",O={verticalPosition:l,horizontalPosition:u,controlUrn:h,interactionType:r,actionType:f,contentTrackingId:""===v?void 0:v,manualFireReason:n,cooloffToken:E,mediaStateInfo:w};if(Qn(k)){for(var N=0,L=Object.entries(k);N0?k:a;0!==A.length&&(!this.viewSpecs||null!==(n=this.viewSpecs)&&void 0!==n&&n.some((function(e){return e.viewName==A[0]})))||console.warn("No viewHierarchy provided or found from element.");var R=c.length>0?c:this.getViewTrackingScope(i);if(this.dynamicTransporterSupportEnabled){var O=Jn(this.transportConfig),N=Se($n(R,O),2),L=N[0],D=N[1],P="GenericImpressionEvent",M={viewDurationInMilliseconds:u,contentViewFraction:h,width:p,height:g,verticalPosition:m,horizontalPosition:y,impressionTime:E,contentTrackingId:""===b?void 0:b,manualFireReason:r,cooloffToken:_,mediaStateInfo:S},x={header:{viewHierarchy:A,testId:I},context:null==t?void 0:t.context};if(Qn(L)){for(var F=0,B=Object.entries(L);F0){var d=(u=u.map((function(e){return o.transformBreadcrumb(e)}))).map((function(e){return Cr.toPointer(e)}));this.host.api.assign(t,{clientBreadcrumbPointers:d})}var h=u.length>0?this.generateEnvelopeWithBreadcrumbs(e,t,n,u,i):this.generateEnvelope(e,t,n,i);return this.fireEnvelope(h)}},{key:"generateEnvelopeWithBreadcrumbs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4&&void 0!==arguments[4]&&arguments[4],o=this.generateEnvelope(e,t,n,i);return r.length>0?this.addBreadcrumbsToEnvelope(o,r):o}},{key:"transformBreadcrumb",value:function(e){try{if(Qn(e.content))return Ie({id:e.id,clientBreadcrumbType:e.breadcrumbType},e.content)}catch(e){console.error("Error transforming breadcrumb:",e)}return e}},{key:"addBreadcrumbsToEnvelope",value:function(e,t){return this.host.api.assign(e,{clientBreadcrumbs:t}),e}},{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(ur(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){var s=dr(i.id),c="Could not find custom transporter: ".concat(o);if(this.clientMonitoringConn){var l=this.clientMonitoringConn.logEventGenerated(s);this.clientMonitoringConn.logFailedEvent(pr.UNKNOWN_EXECUTION_ERROR,i.id,c,l)}throw new Error(c)}return a.fireEvent(i)}return this.host.api.Promise.resolve(!0)}},{key:"generatePageInstance",value:function(e,t){return Bn(e,t)}},{key:"firePVE",value:function(e,t,n){return this._firePVE(e,t,n)}},{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();this.clientMonitoringConn&&(this.clientMonitoringConn.flush(),this.clientMonitoringConn.destroy(),this.clientMonitoringConn=void 0),_n.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 Un((t||this.currentContext||{pageKey:je}).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,n){var r="NavigationEvent";this.previousAppContext=t.previousContext;var i=t.fromExternalApp?{eventName:r,topicName:"InboundNavigationEvent"}:r;return t.fromExternalApp||(this.referrer="https://www.linkedin.com"),{from:t.previousContext,navEventId:i,to:{applicationInstance:t.applicationInstance,pageInstance:this.generatePageInstance(e,n||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,r,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=arguments.length>3&&void 0!==arguments[3]&&arguments[3],c={directive:a.directive,transporterKey:a.transporterKey,context:a.context||this.currentContext&&Hn(this.currentContext,this.host.api),requestHeader:this.host.api.assign({trackingCode:this.getTrackingCode()},a.requestHeader||{},Dr(this.host)?{path:"".concat(this.host.api.location.pathname).concat(this.host.api.location.search),referer:"enabled"===(null===(n=(r=this.host).__getLixTreatment)||void 0===n?void 0:n.call(r,"pai.referrer.fix.subsquent"))?this.referrer?this.referrer:null===(i=this.host.api.document)||void 0===i?void 0:i.referrer:null===(o=this.host.api.document)||void 0===o?void 0:o.referrer}:{}),header:this.host.api.assign({applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:this.appState.clientApplicationInstance,isShadowEvent:s},a.header||{})};return{body:"function"==typeof t?t:function(){return t},id:e,meta:c}}}]),e}();!function(e){e.INTERNAL_OTEL_JET_EVENT="internal:otel:jet",e.INTERNAL_OTEL_RESOURCE="internal:otel:resource",e.INTERNAL_OTEL_LARGEST_CONTENTFUL_PAINT="internal:otel:lcp",e.INTERNAL_OTEL_CUMULATIVE_LAYOUT_SHIFT="internal:otel:cls",e.INTERNAL_OTEL_FIRST_INPUT_DELAY="internal:otel:fid"}(Pr||(Pr={}));var xr,Fr,Br="otel-origin-jet-tag",Ur=function(){function e(t,n){var r,i,o=this;Ue(this,e),Ve(this,"core",void 0),Ve(this,"protocol",void 0),Ve(this,"throttleKeySet",new Set),Ve(this,"config",void 0),Ve(this,"reportTransporterError",(function(e){e.reason instanceof Error||(e.reason=new Error(e.reason||"An error occurred in the transporter")),o.reportError(e.reason,e.tags.concat(["info"]),{responseHeaders:e.responseHeaders}).catch((function(){}))})),this.core=t;var a=this.core.host.api.location.protocol;this.protocol=a.substring(0,a.length-1),this.config={throttleTime:null!==(r=null==n?void 0:n.throttleTime)&&void 0!==r?r:100,useOTel:null!==(i=null==n?void 0:n.useOTel)&&void 0!==i&&i},_n.on(En,this.reportTransporterError)}return He(e,[{key:"reportError",value:function(e){var t,n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.callTreeId,a=void 0===o?"":o,s=i.responseHeaders,c=void 0===s?{}:s,l=i.sduiScreenId,u=i.componentKey,d=e.message,h=e.name,f=e.stack,p=void 0===f?"":f,v=e.fileName,g=void 0===v?"":v,m=e.lineNumber,y=void 0===m?0:m,E=e.columnNumber,b=void 0===E?0:E,w=this.core.host,T=w.appId,C=w.appVersion,_=w.service,I=w.serviceInstance,S=w.treeID,k=void 0===S?"":S,A=w.api,R=A.Promise,O=A.location,N=O.host,L=O.pathname,D=O.search,P=O.hash,M=void 0===P?"":P;if(this.config.useOTel&&!r.includes(Br)&&_n.emit(Pr.INTERNAL_OTEL_JET_EVENT,{error:e,tags:r,callTreeId:a,responseHeaders:c}),c){t={};var x=new Map;Object.keys(c).forEach((function(e){x.set(e.toLowerCase(),c[e])})),t.callTreeId=x.get("x-li-uuid"),t.microsoftEdgeReference=x.get("x-msedge-ref"),t.pointOfPresenceId=x.get("x-li-pop"),t.fabric=x.get("x-li-fabric")}var F=function(){return n.core.fireEvent("JavaScriptErrorEvent",(function(e){return{appId:T,e:{c:b,l:y,m:d,s:p,t:h,u:g},h:M,l:n.protocol,o:N,p:L,pageKey:e.pageKey,q:D,service:_,serviceInstance:I,serviceVersion:C,t:r,trackingID:e.pageInstance.trackingId,treeID:k,callTreeId:a,responseTraceHeaders:t,sduiScreenId:l,componentKey:u}}))};if(this.config.throttleTime<0)return F();var B=(h+d+p+r.join("")+a).split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0);return this.throttleKeySet.has(B)?R.resolve(!1):(this.throttleKeySet.add(B),setTimeout((function(){return n.throttleKeySet.delete(B)}),this.config.throttleTime),F())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),_n.off(En,this.reportTransporterError)}}]),e}();!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",e.PAGE_KEY_PREFIX="pageKeyPrefix",e.ENABLE_T_3="enable-tracking-3",e.ENABLE_PEM_T_3="enable-pem-tracking-3",e.ENABLE_OTEL="enable-otel"}(xr||(xr={})),function(e){e.PageLoadStartEvent="PageLoadStartEvent",e.PageLoadEndEvent="PageLoadEndEvent",e.ResourceLoadEvent="ResourceLoadEvent",e.ViewLoadEvent="ViewLoadEvent",e.PEMTracer="PEMTracer"}(Fr||(Fr={}));var Kr,Hr,Vr,Wr,qr,jr,Gr,zr=(Ve(Ve(Ve(Ve(Ve(Ve(Ve(Ve(Ve(Ve(ve={},"web-ui-framework","EMBER"),"app-id","linkedin.rum.tracking"),"app-version","unknown"),"is-single-page-app",!0),"user-timing-mark-enabled",!1),"user-timing-measure-enabled",!0),"beacon-source","apps"),"enable-rs-timing",!0),"enable-cdn-tracking",!1),"async-plugins-timeout",5e3),Ve(Ve(Ve(Ve(Ve(Ve(ve,"beacon-timeout",3e4),"enable-memory-measurement",!1),"pageKeyPrefix",""),"enable-pem-tracking-3",!1),"enable-tracking-3",!1),"enable-otel",!1)),Xr=-1,Jr=-2,$r=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"],Qr={redirectStart:"REDIRECT_START",redirectEnd:"REDIRECT_END",fetchStart:"FETCH_START",domainLookupStart:"DOMAIN_LOOKUP_START",domainLookupEnd:"DOMAIN_LOOKUP_END",connectStart:"CONNECT_START",connectEnd:"CONNECT_END",secureConnectionStart:"SECURE_CONNECTION_START",requestStart:"REQUEST_START",responseStart:"RESPONSE_START",responseEnd:"RESPONSE_END",workerStart:"WORKER_START"},Yr={"http/0.9":"HTTP0_9","http/1.0":"HTTP1_0","http/1.1":"HTTP1_1",h2:"HTTP2"},Zr="pageLoadId does not exist",ei="rum token passed is invalid",ti=new RegExp(/batch-(\d+)$|enabled$/),ni=function(){function e(){Ue(this,e),Ve(this,"userTimingEntries",[]),Ve(this,"longTasks",[]),Ve(this,"resourceTimingEntries",[]),Ve(this,"cdnData",void 0)}return He(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(ii),cdnData:this.cdnData}}}]),e}(),ri=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function ii(e){return ri.reduce((function(t,n){var r=e[n];return void 0!==r&&(t[n]=r),t}),{})}function oi(e,t){if(e.nodeType!==Node.ELEMENT_NODE)throw new Error("Can't generate CSS selector for non-element node type.");if("html"===e.tagName.toLowerCase())return"html";var n={root:document.body,idName:function(e){return!0},className:function(e){return!0},tagName:function(e){return!0},attr:function(e,t){return!1},seedMinLength:1,optimizedMinLength:2,threshold:1e3,maxNumberOfTries:1e4};jr=Object.assign(Object.assign({},n),t),Gr=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}(jr.root,n);var r=ai(e,qr.All,(function(){return ai(e,qr.Two,(function(){return ai(e,qr.One)}))}));if(r){var i=gi(mi(r,e));return i.length>0&&(r=i[0]),ci(r)}throw new Error("Selector was not found.")}function ai(e,t,n){for(var r=null,i=[],o=e,a=0,s=function(){var e=fi(function(e){var t=e.getAttribute("id");return t&&jr.idName(t)?{name:"#"+Ci(t,{isIdentifier:!0}),penalty:0}:null}(o))||fi.apply(void 0,Me(function(e){return Array.from(e.attributes).filter((function(e){return jr.attr(e.name,e.value)})).map((function(e){return{name:"["+Ci(e.name,{isIdentifier:!0})+'="'+Ci(e.value)+'"]',penalty:.5}}))}(o)))||fi.apply(void 0,Me(function(e){return Array.from(e.classList).filter(jr.className).map((function(e){return{name:"."+Ci(e,{isIdentifier:!0}),penalty:1}}))}(o)))||fi(function(e){var t=e.tagName.toLowerCase();return jr.tagName(t)?{name:t,penalty:2}:null}(o))||[{name:"*",penalty:3}],s=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var r=0;n&&(n.nodeType===Node.ELEMENT_NODE&&r++,n!==e);)n=n.nextSibling;return r}(o);if(t===qr.All)s&&(e=e.concat(e.filter(hi).map((function(e){return di(e,s)}))));else if(t===qr.Two)e=e.slice(0,1),s&&(e=e.concat(e.filter(hi).map((function(e){return di(e,s)}))));else if(t===qr.One){var c=Se(e=e.slice(0,1),1)[0];s&&hi(c)&&(e=[di(c,s)])}var l,u=Pe(e);try{for(u.s();!(l=u.n()).done;)l.value.level=a}catch(e){u.e(e)}finally{u.f()}if(i.push(e),i.length>=jr.seedMinLength&&(r=si(i,n)))return 1;o=o.parentElement,a++};o&&o!==jr.root.parentElement&&!s(););return r||(r=si(i,n)),r}function si(e,t){var n=gi(vi(e));if(n.length>jr.threshold)return t?t():null;var r,i=Pe(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(ui(o))return o}}catch(e){i.e(e)}finally{i.f()}return null}function ci(e){for(var t=e[0],n=t.name,r=1;r ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n}function li(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function ui(e){switch(Gr.querySelectorAll(ci(e)).length){case 0:throw new Error("Can't select any node with this selector: ".concat(ci(e)));case 1:return!0;default:return!1}}function di(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function hi(e){return"html"!==e.name&&!e.name.startsWith("#")}function fi(){for(var e=arguments.length,t=new Array(e),n=0;n0?r:null}function pi(e){return null!=e}function vi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length>0){var n,r=[],i=Pe(e[0]);try{for(i.s();!(n=i.n()).done;){var o=n.value;r=r.concat(vi(e.slice(1,e.length),t.concat(o)))}}catch(e){i.e(e)}finally{i.f()}return r}return[t]}function gi(e){return Array.from(e).sort((function(e,t){return li(e)-li(t)}))}function mi(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{counter:0,visited:new Map},r=[];if(e.length>2&&e.length>jr.optimizedMinLength)for(var i=1;ijr.maxNumberOfTries)return r;n.counter+=1;var o=Me(e);o.splice(i,1);var a=ci(o);if(n.visited.has(a))return r;ui(o)&&yi(o,t)&&(r.push(o),n.visited.set(a,!0),r=r.concat(mi(o,t,n)))}return r}function yi(e,t){return Gr.querySelector(ci(e))===t}!function(e){e.HTTP0_9="HTTP0_9",e.HTTP1_0="HTTP1_0",e.HTTP1_1="HTTP1_1",e.HTTP2="HTTP2",e.UNKNOWN="UNKNOWN"}(Kr||(Kr={})),function(e){e.REDIRECT_START="REDIRECT_START",e.REDIRECT_END="REDIRECT_END",e.FETCH_START="FETCH_START",e.DOMAIN_LOOKUP_START="DOMAIN_LOOKUP_START",e.DOMAIN_LOOKUP_END="DOMAIN_LOOKUP_END",e.CONNECT_START="CONNECT_START",e.CONNECT_END="CONNECT_END",e.SECURE_CONNECTION_START="SECURE_CONNECTION_START",e.REQUEST_START="REQUEST_START",e.RESPONSE_START="RESPONSE_START",e.RESPONSE_END="RESPONSE_END",e.WORKER_START="WORKER_START"}(Hr||(Hr={})),function(e){e.redirectStart="redirectStart",e.redirectEnd="redirectEnd",e.fetchStart="fetchStart",e.domainLookupStart="domainLookupStart",e.domainLookupEnd="domainLookupEnd",e.connectStart="connectStart",e.connectEnd="connectEnd",e.secureConnectionStart="secureConnectionStart",e.requestStart="requestStart",e.responseStart="responseStart",e.responseEnd="responseEnd",e.workerStart="workerStart"}(Vr||(Vr={})),function(e){e.DEFAULT="DEFAULT",e.INITIAL="INITIAL",e.SUBSEQUENT="SUBSEQUENT",e.PAGINATED="PAGINATED"}(Wr||(Wr={})),function(e){e[e.All=0]="All",e[e.Two=1]="Two",e[e.One=2]="One"}(qr||(qr={}));var Ei=/[ -,\.\/:-@\[-\^`\{-~]/,bi=/[ -,\.\/:-@\[\]\^`\{-~]/,wi=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Ti={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Ci(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},Ti),t);"single"!=n.quotes&&"double"!=n.quotes&&(n.quotes="single");for(var r="double"==n.quotes?'"':"'",i=n.isIdentifier,o=e.charAt(0),a="",s=0,c=e.length;s126){if(u>=55296&&u<=56319&&s1&&void 0!==arguments[1]&&arguments[1];if(e&&"function"==typeof e.now&&(e.timeOrigin||e.timing)){var n,r=e.now();return n=!e.timing&&t?Math.floor(e.timeOrigin):e.timing.navigationStart,Math.round(r+n)}return Date.now()}function ki(e){var t=e||performance;return Math.round(t.now())}function Ai(e){if(!e)return"null";if(e.nodeType===Node.ELEMENT_NODE)try{return oi(e,{idName:function(e){return 0!==e.indexOf("ember")}})}catch(e){return"serialization_error"}var t=Ai(e.parentElement||void 0);return"".concat(t," > nodeType(").concat(e.nodeType,")")}function Ri(e,t,n){var r=[];return e&&"function"==typeof e.getEntriesByType&&(t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach((function(e){var t=e.name,n=e.startTime,i=e.duration;r.push({entryType:"MEASURE",name:t,startTime:n,duration:i})})),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach((function(e){var t=e.name,n=e.startTime,i=e.duration;r.push({entryType:"MARK",name:t,startTime:n,duration:i})})),n&&(e.clearMeasures(),e.clearMarks())),r}function Oi(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var Ni=function(){function e(t){Ue(this,e),Ve(this,"hostApis",void 0),Ve(this,"hostnameProperties",void 0),Ve(this,"usedHostnames",void 0),Ve(this,"abortController",void 0),Ve(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 He(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return Wn(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=Vn(Wn(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,(_i=_i||r.createElement("a")).href=n,_i.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}();!function(){var e=function(){function e(){Ue(this,e)}return He(e,null,[{key:"x64Add",value:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]+t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]+t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]+t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]+t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}},{key:"x64Multiply",value:function(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var n=[0,0,0,0];return n[3]+=e[3]*t[3],n[2]+=n[3]>>>16,n[3]&=65535,n[2]+=e[2]*t[3],n[1]+=n[2]>>>16,n[2]&=65535,n[2]+=e[3]*t[2],n[1]+=n[2]>>>16,n[2]&=65535,n[1]+=e[1]*t[3],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[2]*t[2],n[0]+=n[1]>>>16,n[1]&=65535,n[1]+=e[3]*t[1],n[0]+=n[1]>>>16,n[1]&=65535,n[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],n[0]&=65535,[n[0]<<16|n[1],n[2]<<16|n[3]]}},{key:"x64Rotl",value:function(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}},{key:"x64LeftShift",value:function(e,t){return 0==(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),t=e.x64Multiply(t,[4283543511,3981806797]),t=e.x64Xor(t,[0,t[0]>>>1]),t=e.x64Multiply(t,[3301882366,444984403]),e.x64Xor(t,[0,t[0]>>>1])}},{key:"x64hash128",value:function(t,n){n=n||0;var r,i=(t=t||"").length%16,o=t.length-i,a=[0,n],s=[0,n],c=[0,0],l=[0,0],u=[2277735313,289559509],d=[1291169091,658871167];for(r=0;r>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)+("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8)}}]),e}(),t=function(){function t(){Ue(this,t),this.components=[{key:"webrtc",getData:t.webRtcKey,shouldEnforceDataLimit:!0,dataLimit:1e3},{key:"enumerateDevices",getData:t.enumerateDevicesKey,shouldEnforceDataLimit:!0,dataLimit:22e3},{key:"appName",getData:t.appNameKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"tsSeed",getData:t.seedKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"appVersion",getData:t.appVersionKey,shouldEnforceDataLimit:!0,dataLimit:300},{key:"appCodeName",getData:t.appCodeNameKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"location",getData:t.locationKey,shouldEnforceDataLimit:!0,dataLimit:1500},{key:"javascripts",getData:t.javascriptsKey,shouldEnforceDataLimit:!0,dataLimit:2200},{key:"platform",getData:t.platformKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"product",getData:t.productKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"productSub",getData:t.productSubKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"cpuClass",getData:t.cpuClassKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"oscpu",getData:t.oscpuKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"hardwareConcurrency",getData:t.hardwareConcurrencyKey,alias:"numOfCores",shouldEnforceDataLimit:!0,dataLimit:100},{key:"deviceMemory",getData:t.deviceMemoryKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"vendor",getData:t.vendorKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"vendorSub",getData:t.vendorSubKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"language",getData:t.languageKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"timezoneOffset",getData:t.timezoneOffset,shouldEnforceDataLimit:!0,dataLimit:100},{key:"timezone",getData:t.timezone,shouldEnforceDataLimit:!0,dataLimit:100},{key:"userAgent",getData:t.UserAgent,shouldEnforceDataLimit:!0,dataLimit:1500},{key:"webdriver",getData:t.webdriver,shouldEnforceDataLimit:!0,dataLimit:100},{key:"doNotTrack",getData:t.doNotTrackKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"incognito",getData:t.incognitoKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"colorDepth",getData:t.colorDepthKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"pixelDepth",getData:t.pixelDepthKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"pixelRatio",getData:t.pixelRatioKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"screenResolution",getData:t.screenResolutionKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"screenOrientation",getData:t.screenOrientationKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"availableScreenResolution",getData:t.availableScreenResolutionKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"sessionStorage",getData:t.sessionStorageKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"localStorage",getData:t.localStorageKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"indexedDb",getData:t.indexedDbKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"addBehavior",getData:t.addBehaviorKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"openDatabase",getData:t.openDatabaseKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"canvas",getData:t.canvasKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"webgl",getData:t.webglKey,shouldEnforceDataLimit:!0,dataLimit:6e3},{key:"signals",getData:t.signalsKey,shouldEnforceDataLimit:!0,dataLimit:150},{key:"touchSupport",getData:t.touchSupportKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"networkInfo",getData:t.networkInfoKey,shouldEnforceDataLimit:!0,dataLimit:150},{key:"battery",getData:t.batteryKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"audio",getData:t.audioKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"automation",getData:t.automationKey,shouldEnforceDataLimit:!0,dataLimit:100},{key:"plugins",getData:t.pluginsComponent,shouldEnforceDataLimit:!0,dataLimit:17e3},{key:"mimetyps",getData:t.mimetypesComponent,shouldEnforceDataLimit:!0,dataLimit:27e3},{key:"fonts",getData:t.jsFontsKey,shouldEnforceDataLimit:!0,dataLimit:1500},{key:"fontsFlash",getData:t.flashFontsKey,shouldEnforceDataLimit:!0,dataLimit:100}]}return He(t,[{key:"getFeatures",value:function(e,t){if("function"==typeof e){if(!t)return e({error:"Options not provided"});var n={data:{latency:{acq_time:{}},errors:{}}},r=Date.now(),i={},o=0,a=0;this.components.forEach((function(s){if(!t.excludes[s.key]){var c=s.key;void 0!==s.alias&&null!==s.alias&&s.alias.length>0&&(c=s.alias),o++;var l=function(){i[c]=Date.now();try{s.getData((function(t){if(!1!==s.shouldEnforceDataLimit){var l=s.hasOwnProperty("dataLimit")&&"number"==typeof s.dataLimit?s.dataLimit:1e3,u=JSON.stringify(t).length;u>l&&(n.data.errors[c]="Exceeded current data limit:"+l+" Data length for:"+c+" was found to be:"+u,t={})}n.data[c]=t,n.data.latency.acq_time[c]=Date.now()-i[c],++a>=o&&(n.data.latency.acq_time.allFeatures=Date.now()-r,n.data.allFeaturesCollectionAt=Date.now(),e(n.data,!0))}),t)}catch(e){n.data.errors[c]=String(e)}};"function"==typeof window.requestIdleCallback&&!1!==t.useRequestIdleCallBack?window.requestIdleCallback(l):l()}})),n.data.latency.acq_time.allFeatures=Date.now()-r,e(n.data,!1)}}}],[{key:"each",value:function(e,t){if(Array.prototype.forEach&&e.forEach===Array.prototype.forEach)e.forEach(t);else if(e.length===+e.length)for(var n=0,r=e.length;n0&&t.pluginsShouldBeSorted(e)&&(n=n.sort((function(e,t){return e.name>t.name?1:e.name=0?"Windows Phone":t.indexOf("win")>=0?"Windows":t.indexOf("android")>=0?"Android":t.indexOf("linux")>=0||t.indexOf("cros")>=0?"Linux":t.indexOf("iphone")>=0||t.indexOf("ipad")>=0?"iOS":t.indexOf("mac")>=0?"Mac":"Other",("ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0)&&"Windows Phone"!==e&&"Android"!==e&&"iOS"!==e&&"Other"!==e)return!0;if(void 0!==n){if((n=n.toLowerCase()).indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e)return!0;if(n.indexOf("linux")>=0&&"Linux"!==e&&"Android"!==e)return!0;if(n.indexOf("mac")>=0&&"Mac"!==e&&"iOS"!==e)return!0;if((-1===n.indexOf("win")&&-1===n.indexOf("linux")&&-1===n.indexOf("mac"))!=("Other"===e))return!0}return r.indexOf("win")>=0&&"Windows"!==e&&"Windows Phone"!==e||(r.indexOf("linux")>=0||r.indexOf("android")>=0||r.indexOf("pike")>=0)&&"Linux"!==e&&"Android"!==e||(r.indexOf("mac")>=0||r.indexOf("ipad")>=0||r.indexOf("ipod")>=0||r.indexOf("iphone")>=0)&&"Mac"!==e&&"iOS"!==e||(r.indexOf("win")<0&&r.indexOf("linux")<0&&r.indexOf("mac")<0&&r.indexOf("iphone")<0&&r.indexOf("ipad")<0)!=("Other"===e)||void 0===navigator.plugins&&"Windows"!==e&&"Windows Phone"!==e}},{key:"getHasLiedBrowser",value:function(){var e,t=navigator.userAgent.toLowerCase(),n=navigator.productSub;if(("Chrome"==(e=t.indexOf("firefox")>=0?"Firefox":t.indexOf("opera")>=0||t.indexOf("opr")>=0?"Opera":t.indexOf("chrome")>=0?"Chrome":t.indexOf("safari")>=0?"Safari":t.indexOf("trident")>=0?"Internet Explorer":"Other")||"Safari"===e||"Opera"===e)&&"20030107"!==n)return!0;var r,i=eval.toString().length;if(37===i&&"Safari"!==e&&"Firefox"!==e&&"Other"!==e)return!0;if(39===i&&"Internet Explorer"!==e&&"Other"!==e)return!0;if(33===i&&"Chrome"!==e&&"Opera"!==e&&"Other"!==e)return!0;try{throw"a"}catch(t){try{t.toSource(),r=!0}catch(t){r=!1}}return r&&"Firefox"!==e&&"Other"!==e}},{key:"isCanvasSupported",value:function(){var e=document.createElement("canvas");return!(!e.getContext||!e.getContext("2d"))}},{key:"isWebGlSupported",value:function(){if(!t.isCanvasSupported())return!1;var e=t.getWebglCanvas();return!!window.WebGLRenderingContext&&!!e}},{key:"isIE",value:function(){return"Microsoft Internet Explorer"===navigator.appName||!("Netscape"!==navigator.appName||!/Trident/.test(navigator.userAgent))}},{key:"hasSwfObjectLoaded",value:function(){return void 0!==window.swfobject}},{key:"hasMinFlashInstalled",value:function(){return window.swfobject.hasFlashPlayerVersion("9.0.0")}},{key:"addFlashDivNode",value:function(e){var t=document.createElement("div");t.setAttribute("id",e.fonts.swfContainerId),document.body.appendChild(t)}},{key:"loadSwfAndDetectFonts",value:function(e,n){window.___fp_swf_loaded=function(t){e(t)};var r=n.fonts.swfContainerId;t.addFlashDivNode(),window.swfobject.embedSWF(n.fonts.swfPath,r,"1","1","9.0.0",!1,{onReady:"___fp_swf_loaded"},{allowScriptAccess:"always",menu:"false"},{})}},{key:"getWebglCanvas",value:function(){var e=document.createElement("canvas"),t=null;try{t=e.getContext("webgl")||e.getContext("experimental-webgl")}catch(e){}return t||(t=null),t}}]),t}(),n={getItem:function(e){var t=this.getCookieString().match(this._cookieRegEx(e));return t?t[1].replace(/^"(.*)"$/,"$1"):""},getBcookie:function(){try{for(var e=document.cookie.split(/\s*;\s*/),t=0;t1&&"bcookie"===n[0]){var r=n[n.length-1];return r.substring(2,r.length-1)}}}catch(e){return""}return""},setItem:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:this.getDomain(),i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"/";if(n){var o=["".concat(e,"=").concat(t,"; path=").concat(i,"; secure=true")];"string"==typeof r&&r.length>0&&o.push("domain="+r),o.push("expires="+(n instanceof Date?n.toUTCString():n)),document.cookie=o.join("; ")}},deleteItem:function(e){this.setItem(e,"",new Date(0)),this.setItem(e,"",new Date(0),"");var t=this.getDomain().split(".");t.length>2&&(t=t.slice(t.length-2));var n=t.join(".");this.setItem(e,"",new Date(0),n)},_cookieRegEx:function(e){return new RegExp(e+"=([^;]*)")},getCookieString:function(){return document.cookie},getDomain:function(){return window.location?window.location.hostname:""}},r="HUMAN",i="DFP_WEB";function o(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2?arguments[2]:void 0,r=n?n.querySelector("#"+e):document.getElementById(e);if(r){var i=r.firstChild.nodeValue;if(t&&r.parentNode.removeChild(r),i)try{return JSON.parse(i)}catch(e){return}}}function a(e,t,n){var r=new XMLHttpRequest,i=n?"https://www.linkedin.com":"https://www.linkedin-ei.com";i+=String(t),r.open("POST",i),r.setRequestHeader("Content-Type","application/json"),r.send(e)}function s(e){var t=document.getElementsByClassName(e);return void 0!==t&&t.length>=1}var c=function(){function e(){Ue(this,e)}return He(e,null,[{key:"str2ab",value:function(e){for(var t=new ArrayBuffer(e.length),n=new Uint8Array(t),r=0,i=e.length;r>e/4).toString(16)}))}},{key:"generateSha256HashOrDefault",value:function(e){var t=(new TextEncoder).encode(e);return crypto.subtle.digest("SHA-256",t).then((function(e){return Array.from(new Uint8Array(e)).map((function(e){return("00"+e.toString(16)).slice(-2)})).join("")})).catch((function(){return""}))}}]),e}(),l=function(){var e={compressToBase64:function(t){if(null==t)return"";var n=e._compress(t,6,(function(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".charAt(e)}));switch(n.length%4){default:return n;case 1:return n+"===";case 2:return n+"==";case 3:return n+"="}},_compress:function(e,t,n){if(null==e)return"";var r,i,o,a={},s={},c="",l="",u="",d=2,h=3,f=2,p=[],v=0,g=0;for(o=0;o>=1}else{for(i=1,r=0;r>=1}0==--d&&(d=Math.pow(2,f),f++),delete s[u]}else for(i=a[u],r=0;r>=1;0==--d&&(d=Math.pow(2,f),f++),a[l]=h++,u=String(c)}if(""!==u){if(Object.prototype.hasOwnProperty.call(s,u)){if(u.charCodeAt(0)<256){for(r=0;r>=1}else{for(i=1,r=0;r>=1}0==--d&&(d=Math.pow(2,f),f++),delete s[u]}else for(i=a[u],r=0;r>=1;0==--d&&(d=Math.pow(2,f),f++)}for(i=2,r=0;r>=1;for(;;){if(v<<=1,g==t-1){p.push(n(v));break}g++}return p.join("")}};return e}(),u={apfcTypes:1,collectionType:2,trackingId:3},d={protocol:1,hostname:2,port:3,origin:4,host:5,href:6,hash:7,pathname:8},h={saveData:1,effectiveType:2,rtt:3,downlink:4,downlinkMax:5,type:6},f={liedOS:1,liedBrowser:2,liedResolution:3,adBlockInstalled:4,liedLanguages:5},p={type:1,description:2,suffixes:3},v={canvasHash:1,canvasWinding:2},g={label:1,gid:2,id:3,kind:4},m={lists:1,fontsHash:2},y={Orientation:1,Enabled:2},E={charging:1,dischargingTime:2,level:3,chargingTime:4},b={touchStart:1,touchEvent:2,maxTouchPoints:3},w={"webgl stencil bits":1,"webgl vertex shader high float precision rangeMax":2,"webgl antialiasing":3,"webgl max vertex texture image units":4,"webgl fragment shader medium int precision rangeMax":5,"webgl fragment shader low int precision rangeMin":6,"webgl max vertex uniform vectors":7,"webgl renderer":8,"webgl vertex shader high float precision":9,"webgl green bits":10,"webgl fragment shader medium int precision rangeMin":11,"webgl fragment shader low int precision rangeMax":12,"webgl fragment shader medium int precision":13,"webgl blue bits":14,"webgl max viewport dims":15,"webgl unmasked vendor":16,"webgl vertex shader medium float precision":17,"webgl fragment shader low int precision":18,"webgl vertex shader high int precision":19,"webgl vertex shader medium int precision rangeMax":20,"webgl unmasked renderer":21,"webgl fragment shader high int precision":22,"webgl aliased point size range":23,"webgl vertex shader medium float precision rangeMax":24,"webgl vertex shader low int precision rangeMax":25,"webgl fragment shader low float precision":26,"webgl fragment shader high int precision rangeMin":27,"webgl vertex shader high float precision rangeMin":28,"webgl red bits":29,vendorAndRenderer:30,"webgl vertex shader medium int precision rangeMin":31,"webgl vertex shader low float precision":32,"webgl vertex shader medium int precision":33,"webgl fragment shader medium float precision rangeMax":34,"webgl max texture image units":35,"webgl vertex shader medium float precision rangeMin":36,"webgl fragment shader high float precision rangeMin":37,"webgl fragment shader high int precision rangeMax":38,"webgl vertex shader high int precision rangeMax":39,webglHash:40,"webgl max varying vectors":41,"webgl fragment shader medium float precision rangeMin":42,"webgl vertex shader low int precision":43,"webgl fragment shader low float precision rangeMin":44,"webgl aliased line width range":45,"webgl max combined texture image units":46,"webgl shading language version":47,"webgl vertex shader high int precision rangeMin":48,"webgl max anisotropy":49,"webgl max render buffer size":50,"webgl vendor":51,"webgl vertex shader low int precision rangeMin":52,"webgl max fragment uniform vectors":53,"webgl fragment shader high float precision rangeMax":54,"webgl version":55,"webgl fragment shader high float precision":56,"webgl max texture size":57,"webgl max cube map texture size":58,"webgl fragment shader medium float precision":59,"webgl vertex shader low float precision rangeMin":60,"webgl max vertex attribs":61,"webgl alpha bits":62,"webgl vertex shader low float precision rangeMax":63,"webgl fragment shader low float precision rangeMax":64,"webgl depth bits":65,extensions:66},T={ANGLE_instanced_arrays:67,EXT_blend_minmax:68,EXT_clip_control:69,EXT_color_buffer_float:70,EXT_color_buffer_half_float:71,EXT_conservative_depth:72,EXT_depth_clamp:73,EXT_disjoint_timer_query:74,EXT_disjoint_timer_query_webgl2:75,EXT_float_blend:76,EXT_frag_depth:77,EXT_polygon_offset_clamp:78,EXT_render_snorm:79,EXT_shader_texture_lod:80,EXT_texture_compression_bptc:81,EXT_texture_compression_rgtc:82,EXT_texture_filter_anisotropic:83,EXT_texture_mirror_clamp_to_edge:84,EXT_texture_norm16:85,EXT_sRGB:86,KHR_parallel_shader_compile:87,NV_shader_noperspective_interpolation:88,OES_draw_buffers_indexed:89,OES_element_index_uint:90,OES_fbo_render_mipmap:91,OES_sample_variables:92,OES_shader_multisample_interpolation:93,OVR_multiview2:94,OES_standard_derivatives:95,OES_texture_float:96,OES_texture_float_linear:97,OES_texture_half_float:98,OES_texture_half_float_linear:99,OES_vertex_array_object:100,WEBGL_blend_func_extended:101,WEBGL_clip_cull_distance:102,WEBGL_color_buffer_float:103,WEBGL_compressed_texture_astc:104,WEBGL_compressed_texture_etc:105,WEBGL_compressed_texture_etc1:106,WEBGL_compressed_texture_pvrtc:107,WEBGL_compressed_texture_s3tc:108,WEBGL_compressed_texture_s3tc_srgb:109,WEBGL_debug_renderer_info:110,WEBGL_debug_shaders:111,WEBGL_depth_texture:112,WEBGL_draw_buffers:113,WEBGL_lose_context:114,WEBGL_multi_draw:115,WEBGL_polygon_mode:116,WEBGL_provoking_vertex:117,WEBGL_render_shared_exponent:118,WEBGL_stencil_texturing:119},C={"American Typewriter":1,"Andale Mono":2,Arial:3,"Arial Black":4,"Arial Hebrew":5,"Arial Narrow":6,"Arial Rounded MT Bold":7,"Arial Unicode MS":8,Avenir:9,"Avenir Next":10,"Avenir Next Condensed":11,Bahnschrift:12,Baskerville:13,"Big Caslon":14,"Bodoni 72":15,"Bodoni 72 Oldstyle":16,"Bodoni 72 Smallcaps":17,"Bradley Hand":18,"Brush Script MT":19,Calibri:20,Cambria:21,"Cambria Math":22,Candara:23,Chalkboard:24,"Chalkboard SE":25,Chalkduster:26,Charter:27,Cochin:28,"Comic Sans MS":29,Consolas:30,Constantia:31,Corbel:32,Copperplate:33,Courier:34,"Courier New":35,Didot:36,"DIN Alternate":37,"DIN Condensed":38,Ebrima:39,"Franklin Gothic Medium":40,Futura:41,Gabriola:42,Gadugi:43,Geneva:44,Georgia:45,"Gill Sans":46,Helvetica:47,"Helvetica Neue":48,Herculanum:49,"Hoefler Text":50,"HoloLens MDL2 Assets":51,Impact:52,"Ink Free":53,"Javanese Text":54,"Leelawadee UI":55,"Lucida Console":56,"LUCIDA GRANDE":57,"Lucida Grande":58,"Lucida Sans Unicode":59,Luminari:60,"Malgun Gothic":61,"Marker Felt":62,Marlett:63,Menlo:64,"Microsoft Himalaya":65,"Microsoft JhengHei":66,"Microsoft New Tai Lue":67,"Microsoft PhagsPa":68,"Microsoft Sans Serif":69,"Microsoft Tai Le":70,"Microsoft YaHei":71,"Microsoft Yi Baiti":72,"MingLiU-ExtB":73,Monaco:74,"Mongolian Baiti":75,"MS Gothic":76,"MV Boli":77,"Myanmar Text":78,"Nirmala UI":79,Noteworthy:80,Optima:81,Palatino:82,"Palatino Linotype":83,Papyrus:84,Phosphate:85,Rockwell:86,"Savoye LET":87,"Segoe MDL2 Assets":88,"Segoe Print":89,"Segoe Script":90,"Segoe UI":91,"Segoe UI Historic":92,"Segoe UI Emoji":93,"Segoe UI Symbol":94,SignPainter:95,SimSun:96,Sitka:97,Skia:98,"Snell Roundhand":99,Sylfaen:100,Symbol:101,Tahoma:102,Times:103,"Times New Roman":104,Trattatello:105,"Trebuchet MS":106,Verdana:107,Webdings:108,Wingdings:109,"Wingdings 2":110,"Wingdings 3":111,"Yu Gothic":112,Zapfino:113},_={appVersion:1,numOfCores:2,webrtc:3,touchSupport:4,webgl:5,timezone:6,plugins:7,localStorage:8,incognito:9,language:10,appCodeName:11,battery:12,platform:13,javascripts:14,automation:15,pixelDepth:16,screenOrientation:17,availableScreenResolution:18,timezoneOffset:19,oscpu:20,fonts:21,vendor:22,sessionStorage:23,webdriver:24,audio:25,openDatabase:26,screenResolution:27,vendorSub:28,enumerateDevices:29,product:30,canvas:31,appName:32,mimetyps:33,cpuClass:34,indexedDb:35,userAgent:36,deviceMemory:37,productSub:38,addBehavior:39,signals:40,networkInfo:41,location:42,colorDepth:43,FPDataCookie:44,tsSeed:45,errors:46,pixelRatio:47};function I(e){var t={};return function(e){var t=e.webgl,n={};if(void 0!==t&&void 0!==t.extensions&&null!==t&&null!==t.extensions){for(var r=t.extensions,i=[],o=0;oe.length)&&(t=e.length);for(var n=0,r=new Array(t);n1?n[1]:null},M={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},x="GUEST",F="MEMBER",B="ENTERPRISE_UNBOUND",U=(S(O={},x,"li_gc"),S(O,F,"li_mc"),S(O,B,"li_ec"),O);S(N={},x,"mypreferences/g/guest-cookies"),S(N,F,"settings/member-cookies"),S(N,B,"mypreferences/e/enterprise-cookies");var K,H,V,W,q=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 function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=r,this.optedInConsentMap={},M)t[o]=t[o]||0,0!==t[o]&&(this.consentAvailable=!0),this.optedInConsentMap[o]=1===t[o]||0===t[o]&&1===i},j=(K=[M.ADVERTISING,M.ANALYTICS_AND_RESEARCH,M.FUNCTIONAL],H=[0,1,2,0],V=function(e){for(var t={},n=0;n>2*n&3];return t},W=function(e){var t=0;return e>=0&&e<=3&&(t=H[e]),t},{parseConsentBody:function(e,t){var n=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),r=e.match(n);if(!r)return{error:"Invalid consent body encoding",consent:new q};var i=V(parseInt(r[1],10)),o=new Date(1e3*parseInt(r[2],10)),a=W(parseInt(r[3],10));return{error:null,consent:new q(i,o,t,a)}},parseConsentBodyEnterpriseUnbound:function(e,t,n){var r=function(e){try{var t=D(e);if(t&&t.enterpriseProfile&&t.enterpriseProfile.length>=2&&t.enterpriseProfile[0].enterpriseAccount)return{enterpriseAccountId:parseInt(t.enterpriseProfile[0].enterpriseAccount,10),enterpriseProfileId:parseInt(t.enterpriseProfile[1],10)}}catch(e){return null}return null}(t);if(!r)return{error:"Invalid enterprise profile urn provided",consent:new q};var i=r.enterpriseAccountId,o=r.enterpriseProfileId,a=new RegExp(["^((?:\\d+,\\d+,\\d+,\\d+,\\d+)(?:\\|(?:\\d+,\\d+,\\d+,\\d+,\\d+))*)","(\\d+)","(\\d+)","(?:(?:.|\\s)+)$"].join(";")),s=e.match(a);if(!s)return{error:"Invalid consent body encoding",consent:new q};var c=s[1].split("|").map((function(e){return e.split(",").map((function(e){return parseInt(e,10)}))})).filter((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),4!==n.length);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}(e)||function(e,t){if(e){if("string"==typeof e)return k(e,4);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)?k(e,4):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e),r=t[1],a=t[2],s=t[3];return r===i&&a===o&&s===n}))[0];if(!c)return{error:null,consent:new q};var l=V(c[0]),u=new Date(1e3*parseInt(s[2],10)),d=W(parseInt(s[3],10));return{error:null,consent:new q(l,u,B,d)}}}),G=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),z=function(e){var t={};for(var n in M)t[n]=e;return{error:null,consent:new q(t,null,null,e)}},X=function(e,t,n,r){e&&e.length>1&&'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));var i,o=null;try{o=(i=e,"undefined"==typeof atob&&"undefined"!=typeof Buffer?Buffer.from(i,"base64").toString("binary"):atob(i)).match(G)}catch(e){}if(!o)return{error:"Invalid consent encoding",consent:new q};var a=parseInt(o[1],10),s=o[2];return 1===a?t===B?j.parseConsentBodyEnterpriseUnbound(s,n,r):j.parseConsentBody(s,t):{error:"Invalid encoded consent version ".concat(a),consent:new q}},J={preprocessor:null,audio:{timeout:1e3,excludeIOS11:!0},fonts:{swfContainerId:"apfcDf",swfPath:"flash/compiled/FontList.swf",userDefinedFonts:[],extendedJsFonts:void 0,hashOnly:!1},screen:{detectScreenOrientation:!0},plugins:{sortPluginsFor:[/palemoon/i],excludeIE:!1},webgl:{hashOnly:!1},telemetryCollectPath:"/platform-telemetry/li/apfcDf",gloablIntegrationDataCollectionPath:"/apfc/collect",extraComponents:[],excludes:{pixelRatio:!0,doNotTrack:!0,fontsFlash:!0},debug:!1,NOT_AVAILABLE:"n/a",ERROR:"err",EXCLUDED:"excluded",useRequestIdleCallBack:!0};try{var $=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.enterpriseProfileUrn,i=n.enterpriseAppInstanceId;if("string"!=typeof t){if("undefined"==typeof document)return{error:"cookie string must be provided in SSR mode",consent:new q};t=document.cookie}if(r&&!i||!r&&i)return{error:"enterpriseProfileUrn and enterpriseAppInstanceId must both be provided if at least one is provided",consent:new q};if(!(e!==B||r&&i))return{error:"enterpriseProfileUrn and enterpriseAppInstanceId are required for unbound userMode",consent:new q};if(!e){var o=P(U[B],t);if(o&&r&&i){var a=X(o,B,r,i);if(a.consent.userMode===B||a.error)return a}e=P("liap",t)?P(U[F],t)?F:x:P(U[x],t)?x:F}return function(e,t,n,r){var i=P(U[e],t);return i?X(i,e,n,r):P(U[x],t)||P(U[F],t)||P(U[B],t)?z(2):z(1)}(e,t,r,i)}().consent.optedInConsentMap;$[M.FUNCTIONAL],function(e){throw new TypeError('"re" is read-only')}()}catch(e){}var Q=function(){function e(t,n,r){var i=this;if(Ue(this,e),void 0!==n&&void 0!==t&&"enabled"===t.globalIntegration)"complete"===document.readyState?this.checkConfigAndInitializeAllIntegration(n,r):window.addEventListener("load",(function(){i.checkConfigAndInitializeAllIntegration(n,r)}));else if(void 0!==t){var o=JSON.parse(JSON.stringify(J));s("settings-iframe")||s("setting-headline")||(o.useRequestIdleCallBack=!1),this.initialize(o,t)}else{var a=JSON.parse(JSON.stringify(J));s("settings-iframe")||s("setting-headline")||(a.useRequestIdleCallBack=!1),"complete"===document.readyState?this.initialize(a):window.addEventListener("load",(function(){i.initialize(a)}))}}return He(e,[{key:"isDfCollectionRequired",value:function(e){return"number"!=typeof e.samplingTimeWindowInMillis||e.samplingTimeWindowInMillis<=0||""===n.getItem("df_ts")}},{key:"checkConfigAndInitializeAllIntegration",value:function(e,t){!0!==globalThis.pauseApfc&&(globalThis.pauseApfc=!0,setTimeout((function(){globalThis.pauseApfc=!1}),3e4),!0===t.enableOnDemandMode?(this.checkConfigAndInitializeGlobalIntegration(e,t),this.checkConfigAndInitializeThirdPartyIntegration(e,t)):(this.deleteDfCookieIfRequired(t),this.isDfCollectionRequired(t)&&(this.checkConfigAndInitializeGlobalIntegration(e,t),this.checkConfigAndInitializeThirdPartyIntegration(e,t),this.addDfCookieIfRequired(t))))}},{key:"checkConfigAndInitializeGlobalIntegration",value:function(e,t){(!0===t.enableOnDemandMode&&t.fpDataCookie.apfcTypes.includes("DNA")||!0===t.dnaIntegrationEnabled&&!0!==globalThis.dnaIntegrationCompleted)&&this.intializeGlobalIntegration(J,e,t)}},{key:"checkConfigAndInitializeThirdPartyIntegration",value:function(e,t){(!0===t.enableOnDemandMode&&t.fpDataCookie.apfcTypes.includes(r)||!0===t.humanIntegrationEnabled&&!0!==globalThis.humanIntegrationCompleted)&&this.initializeHumanIntegration(e,t),(!0===t.enableOnDemandMode&&t.fpDataCookie.apfcTypes.includes(i)||!0===t.dfpIntegrationEnabled&&!0!==globalThis.dfpIntegrationCompleted)&&this.intializeDfpIntegration(e,t)}},{key:"deleteDfCookieIfRequired",value:function(e){"number"!=typeof e.samplingTimeWindowInMillis||e.samplingTimeWindowInMillis,""!==n.getItem("df_ts")&&(Number(n.getItem("df_ts")),n.deleteItem("df_ts"))}},{key:"addDfCookieIfRequired",value:function(e){}},{key:"initialize",value:function(e,n){if(null!=n||null!=o("apfcDfPK")){var r=this.reqid,i=this.pageInstance,s=this.isProd();return(new t).getFeatures((function(t,o){t.reqid=r,t.pageInstance=i,t.fullFeatureCollection=o,c.encryptWithKeyFromDifferentSources(JSON.stringify(t),"apfcDfPK","apfcDfPKV",n,s).then((function(t){globalThis.apfcDf=t,!0===o&&a(JSON.stringify(t),e.telemetryCollectPath,s)}))}),e)}globalThis.triggerApfc=this.reentry}},{key:"intializeGlobalIntegration",value:function(r,i,o){var s=this.isProd();return(new t).getFeatures((function(t,u){if(!0===u){if(e.prototype.populateFpDataCookie(t,o),!0===o.isSyncEnabledWithHeaders){var d=JSON.stringify(I(t));globalThis.apfcDfH=(h=d,l.compressToBase64(h))}c.encryptWithKeyIds(JSON.stringify(t),"apfcDfPK","apfcDfPKV").then((function(e){if(globalThis.apfcDf=e,!0===o.isSyncEnabledWithHeaders||!0===o.isSyncEnabledWithCb){var t=function(e){var t={};t[btoa("DNA_ENCRYPTED")]=e;var r={};return r.payload=t,r.browserId=n.getBcookie(),r}(e);a(JSON.stringify(t),r.gloablIntegrationDataCollectionPath,s)}i("DNA",JSON.stringify(e))})),globalThis.dnaIntegrationCompleted=!0}var h}),r)}},{key:"intializeDfpIntegration",value:function(t,r){var o=n.getBcookie(),a=this.isProd()?"fb6bbd47-fa7c-4264-b4e9-b25948407586":"ee078acd-0704-4344-9e5b-6b84b480c30a";try{if(RegExp("^[\\w-]*$").test(o)){var s="https://merchantpool1.linkedin.com/mdt.js?session_id=".concat(o,"&instanceId=").concat(a),c=document.createElement("script");c.setAttribute("src",s),c.setAttribute("id","dfpIframeScript"),c.addEventListener("load",(function(){return window.dfp.doFpt(document)})),document.getElementsByTagName("head")[0].appendChild(c);var l={sessionId:o,instanceId:a};e.prototype.populateFpDataCookie(l,r),t(i,JSON.stringify(l))}else{var u={error:"Invalid session_id: "+o};t(i,JSON.stringify(u))}}catch(r){var d={error:r};t(i,JSON.stringify(d))}globalThis.dfpIntegrationCompleted=!0}},{key:"initializeHumanIntegration",value:function(t,i){var o=i.treeId,a=Date.now(),s=this.isProd()?"PXdOjV695v":"PXgoH0hfKu",l=n.getBcookie(),u="https://li.protechts.net/index.html?ts="+a+"&r_id="+encodeURIComponent(o)+"&app_id="+s+"&uc=scraping";c.generateSha256HashOrDefault(l).then((function(n){""!==(l=n)&&(u+="&d_id="+l);try{var c=document.createElement("iframe");c.setAttribute("id","humanThirdPartyIframe"),c.setAttribute("src",u),c.setAttribute("sandbox","allow-same-origin allow-scripts"),c.setAttribute("aria-hidden","true"),c.style.height="0px",c.style.width="0px",c.style.border="none",c.style.position="absolute",c.style.left="-9999px",document.body.appendChild(c);var d={app_id:s,ts:a,d_id:l,r_id:o,uc:"scraping"};e.prototype.populateFpDataCookie(d,i),t(r,JSON.stringify(d))}catch(e){var h={error:e};t(r,JSON.stringify(h))}})),globalThis.humanIntegrationCompleted=!0}}]),e}();Q.prototype.reentry=function(e){globalThis.triggerApfc=null,new Q(e)},Q.prototype.reentryGlobalIntegration=function(e,t){globalThis.triggerDnaApfcEvent=null,new Q({globalIntegration:"enabled"},e,t)},Q.prototype.reentryGlobalIntegrationOnDemand=function(e,t){if(void 0!==t&&void 0!==e){var n=Q.prototype.extractDataCookie();!0===t.onlyOnDemandFlow&&null===n||(t.fpDataCookie=n,null!==n&&(t.enableOnDemandMode=!0),Q.prototype.reentryGlobalIntegration(e,t))}},Q.prototype.extractDataCookie=function(){var e=n.getItem("li_apfcdc");if(n.deleteItem("li_apfcdc"),!e||""===e)return null;var t=(e=atob(e)).split(":::");if(t.length<5)return null;var r={};return r.trackingId=t[0],r.memberId=t[1],r.sessionUrn=t[2],r.collectionType=t[3],r.apfcTypes=t[4].split(","),r},Q.prototype.populateFpDataCookie=function(e,t){"object"==Be(e)&&"object"==Be(t)&&(e.FPDataCookie=t.fpDataCookie)},Q.prototype.isProd=function(){var e=location&&location.host;return e&&e.indexOf(".linkedin.com")>-1&&!e.startsWith("pemberly")},Q.prototype.isEmpty=function(e){return e&&0===Object.keys(e).length},"undefined"!=typeof globalThis&&"undefined"!=typeof document&&"undefined"!=typeof window&&(void 0===globalThis.triggerDnaApfcEvent&&(globalThis.triggerDnaApfcEvent=Q.prototype.reentryGlobalIntegration),void 0===globalThis.triggerDnaApfcEventOnDemand&&(globalThis.triggerDnaApfcEventOnDemand=Q.prototype.reentryGlobalIntegrationOnDemand),new Q)}();var Li=function(){function e(){Ue(this,e)}return He(e,null,[{key:"collectFeatures",value:function(e,t){try{"undefined"!=typeof globalThis&&"undefined"!=typeof document&&"undefined"!=typeof window&&"undefined"!==globalThis.triggerDnaApfcEventOnDemand&&globalThis.triggerDnaApfcEventOnDemand(t,e)}catch(e){}}}]),e}(),Di=function(){function e(t,n,r,i,o,a,s,c,l,u){Ue(this,e),Ve(this,"hostApis",void 0),Ve(this,"statics",void 0),Ve(this,"options",void 0),Ve(this,"allowTimingOrigin",void 0),Ve(this,"fireResourceLoadEvent",void 0),Ve(this,"isTracerEnabled",void 0),Ve(this,"responseRleCache",void 0),Ve(this,"fireApfcEvent",void 0),Ve(this,"abuseDeviceSignalCollectionConfig",void 0),Ve(this,"trackingEndpoint",void 0),Ve(this,"collectResourceTimings",void 0),Ve(this,"collectCdnData",void 0),Ve(this,"perfObserver",void 0),Ve(this,"renderTimings",new Map),Ve(this,"urlToTreeId",new Map),Ve(this,"cdnDataProvider",void 0),Ve(this,"observables",new ni),Ve(this,"trackingEndpointPattern",void 0),this.hostApis=t,this.statics=n,this.options=r,this.allowTimingOrigin=i,this.fireResourceLoadEvent=o,this.isTracerEnabled=a,this.responseRleCache=s,this.fireApfcEvent=c,this.abuseDeviceSignalCollectionConfig=l,this.trackingEndpoint=u,this.collectResourceTimings=r["enable-rs-timing"],this.collectCdnData=r["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new Ni(t)),this.trackingEndpointPattern=function(e){if(!e)return"/li/track";try{return new URL(e).pathname}catch(t){return e}}(this.trackingEndpoint)}return He(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e,t){return(_i=_i||t.createElement("a")).href=e,_i.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:Si(this.hostApis.performance,this.allowTimingOrigin)})}},{key:"recordRenderEnd",value:function(e,t,n){var r=this.renderTimings.get(e);if(r&&(r.renderEnd=r.renderEnd||Si(this.hostApis.performance,this.allowTimingOrigin),t))return n?this.collectViewLoadEventData(r,n):void Gn("ViewLoadEvent",Zr)}},{key:"collectViewLoadEventData",value:function(e,t){var n=e.renderName,r=e.renderEnd,i=void 0===r?-1:r,o=e.renderStart,a=void 0===o?-1:o,s=[];return s.push({viewProgressType:"RENDER_START",timestamp:a}),s.push({viewProgressType:"RENDER_END",timestamp:i}),{parentPageLoadId:t,viewHierarchy:[n],viewProgressStates:s}}},{key:"startObserving",value:function(){var e=this.hostApis,t=e.PerformanceObserver,n=e.performance;this.stopObserving(),t?this.setupPerformanceObserver(t,n.timeOrigin):this.collectResourceTimings&&this.emulateResourceTimingObserver(n),this.collectResourceTimings&&this.processNewResourceTimings()}},{key:"stopObserving",value:function(){var e;null===(e=this.perfObserver)||void 0===e||e.disconnect(),this.reset()}},{key:"collect",value:function(e){var t=this,n=e.isInitial,r=e.immediate,i=this.collectSynchronousData(n);if(r)return i;var o=this.collectAsynchronousData();return"then"in o?o.then((function(e){return(0,t.hostApis.assign)(i,e),i})):i}},{key:"collectPageLoadStartData",value:function(e){var t=e.isInitial,n=e.rumKey,r=Object.create(null);r.pageKey=n,r.pageLoadType=t?"INITIAL_LOAD":"SUBSEQUENT_LOAD",r.networkInformationMetrics=this.snapshot.networkInformationMetrics;var i=this.statics,o=i.webUIFramework,a=i.timeSource,s=i.isSinglePageApp,c=i.appRenderMode,l=i.isAppRenderFailed,u=i.isFromServiceWorker,d=i.treeId;return r.treeId=d,r.browserPageLoadStartContext={webUIFramework:o,timeSource:a,isSinglePageApp:s,appRenderMode:c,isAppRenderFailed:l,isFromServiceWorker:u},r}},{key:"collectPageLoadEndData",value:function(e){var t=Object.create(null),n=Object.create(null);t.cdnData=[],t.browserPageLoadEndContext={},t.navigationTiming=Object.create(null);var r=e.isInitial,i=e.immediate,o=this.hostApis.assign;if(r){var a=Mi(this.hostApis.performance),s=a.htmlMetrics,c=a.redirectCount,l=a.navigationType,u=a.workerStart;s&&(t.browserPageLoadEndContext.htmlMetrics=Object.create(null),o(t.browserPageLoadEndContext.htmlMetrics,s)),Object.prototype.hasOwnProperty.call(a,"redirectCount")&&(n.redirectCount=c),Object.prototype.hasOwnProperty.call(a,"navigationType")&&(n.navigationType=l),n.workerStart=null!=u?u:0,$r.forEach((function(e){Object.prototype.hasOwnProperty.call(a,e)&&(n[e]=a[e])})),o(t.navigationTiming,n)}if(!i){var d=this.collectAsynchronousData();if("then"in d)return d.then((function(e){return o(t.cdnData,e.cdnData),t}))}var h=this.collectAsynchronousData(!0);return o(t.cdnData,h.cdnData),t}},{key:"collectResourceLoadEvent",value:function(e,t){var n=e.name,r=e.transferSize,i=e.initiatorType,o=e.nextHopProtocol,a=e.encodedBodySize,s=e.decodedBodySize,c=e.requestStart,l={};l.resourceKey=n,l.isNetwork=!!r&&0!==r,l.loadType=i||"unknown",l.timeOrigin=t;var u=[];Object.keys(Qr).forEach((function(t){var n;t in Vr&&void 0!==e[t]&&u.push({resourceProgressType:Qr[t],duration:null!==(n=e[t])&&void 0!==n?n:-1})})),l.resourceProgressStates=u;var d={},h=Yr[o];d.nextHopProtocol=null!=h?h:"UNKNOWN",d.transferSize=r,d.encodedBodySize=a,d.decodedBodySize=s,l.resourceNetworkContext=d,l.requestStart=c;try{var f,p,v=new URL(n),g=v.pathname+v.search+v.hash;return null===(f=this.responseRleCache)||void 0===f||f.offerResourceLoadEvent(g,l),null===(p=this.responseRleCache)||void 0===p?void 0:p.flushCacheByUrl(g)}catch(e){var m,y="".concat("Invalid url from ResourceLoadEvent"," request url ").concat(n);return e instanceof Error?(e.message="".concat(y," ").concat(e.message),Gn("ResourceLoadEvent",e)):Gn("ResourceLoadEvent",y),null===(m=this.responseRleCache)||void 0===m?void 0:m.flushCacheByUrl()}}},{key:"reset",value:function(){var e;this.observables.reset(),null===(e=this.cdnDataProvider)||void 0===e||e.clearUsedHostnames()}},{key:"collectSynchronousData",value:function(e){var t=this.hostApis,n=t.assign,r=t.PerformanceObserver,i=Object.create(null);return this.statics.pageLoadMode=e?"INITIAL":"PARTIAL",r||(this.observables.userTimingEntries=Ri(this.hostApis.performance,this.options,!0),this.collectResourceTimings&&this.processNewResourceTimings()),this.observables.attachTreeIds(this.urlToTreeId),this.urlToTreeId.clear(),n(i,this.observables.getData(),this.snapshot,this.statics),e&&n(i,Mi(this.hostApis.performance)),n(i,this.collectAsynchronousData(!0)),i}},{key:"collectAsynchronousData",value:function(e){var t=this,n={cdnData:[],usedCDN:this.extractUsedCDN([])};if(e){if(this.collectCdnData){var r=this.cdnDataProvider.getPresentData();n.cdnData=r,n.usedCDN=this.extractUsedCDN(r)}return n}var i=[];return this.collectCdnData&&i.push(this.cdnDataProvider.getDataWhenReady(this.options["async-plugins-timeout"]).then((function(e){n.cdnData=e,n.usedCDN=t.extractUsedCDN(e)}))),i.length>0?Vn(i,Promise).then((function(){return n})):n}},{key:"triggerDeviceSignalCollection",value:function(e){var t=e.onlyTriggerOnDemandFlow;try{var n=this.abuseDeviceSignalCollectionConfig||{},r=n.isDnaIntegrationLixEnabled,i=n.isHumanIntegrationLixEnabled,o=n.isDfpIntegrationLixEnabled,a=n.samplingTimeWindowInMillis,s=n.isOnDemandFingerprintingEnabled,c=n.isSyncFingerprintingWithHeadersLixEnabled,l=n.isSyncFingerprintingWithCbLixEnabled;if(i||o||r||c||l){var u,d,h={treeId:null!==(u=null===(d=this.statics.treeId)||void 0===d?void 0:d.toString())&&void 0!==u?u:"",humanIntegrationEnabled:i,dfpIntegrationEnabled:o,dnaIntegrationEnabled:r,samplingTimeWindowInMillis:a,onlyOnDemandFlow:t,isSyncEnabledWithHeaders:c,isSyncEnabledWithCb:l};(!t||t&&s||c||l)&&Li.collectFeatures(h,this.fireApfcEvent)}}catch(e){}}},{key:"setupPerformanceObserver",value:function(e,t){var n=this;this.perfObserver=new e((function(e){var r=(n.abuseDeviceSignalCollectionConfig||{}).disablePerfMarkerOptimization;r&&n.triggerDeviceSignalCollection({onlyTriggerOnDemandFlow:!1}),e.getEntries().forEach((function(e){var i=e.entryType,o=e.name,a=e.startTime,s=e.duration;"resource"===i?n.processSingleResourceTiming(e,t):"mark"===i?(n.observables.userTimingEntries.push({entryType:"MARK",name:o,startTime:a,duration:s}),"mark_meaningful_paint_end"!==o||r||n.triggerDeviceSignalCollection({onlyTriggerOnDemandFlow:!1})):"measure"===i?n.observables.userTimingEntries.push({entryType:"MEASURE",name:o,startTime:a,duration:s}):"longtask"===i&&n.observables.longTasks.push({duration:s,name:o,startTime:a})}))})),this.observables.userTimingEntries=Ri(this.hostApis.performance,this.options,!1);var r=["longtask"];(this.collectResourceTimings||this.collectCdnData)&&r.push("resource"),this.options["user-timing-mark-enabled"]&&r.push("mark"),this.options["user-timing-measure-enabled"]&&r.push("measure"),this.perfObserver.observe({entryTypes:r})}},{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(n){return e.processSingleResourceTiming(n,t.timeOrigin)})),t.clearResourceTimings())}},{key:"processSingleResourceTiming",value:function(e,t){var n=this;if(this.collectResourceTimings){this.options["enable-otel"]&&_n.emit(Pr.INTERNAL_OTEL_RESOURCE,{resourceTiming:e}),this.observables.resourceTimingEntries.push(e);var r=-1!==e.name.indexOf(this.trackingEndpointPattern);if(this.isTracerEnabled&&!r&&!function(e){for(var t=0,n=Ii;t=0})),n=t.length>0?t[0]:{hostname:"",provider:"",httpVersion:"",ipVersion:""};return{static_domain:n.provider,http_version:n.httpVersion,ip_version:n.ipVersion}}},{key:"snapshot",get:function(){var e={detailedRenderTimingEntries:Oi(this.renderTimings),networkInformationMetrics:Pi(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}();function Pi(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 Mi(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,$r.forEach((function(e){e in r&&(t[e]=r[e])})),t.navigationType=i.type,t.redirectCount=i.redirectCount):t.navigationTimingApi=!1,t}var xi=function(){function e(t,n,r){Ue(this,e),Ve(this,"featureName",void 0),Ve(this,"trackingCore",void 0),Ve(this,"rumConfig",void 0),Ve(this,"observing",!1),Ve(this,"basePageTreeId",void 0),Ve(this,"startPageInstance",void 0),Ve(this,"startMemory",void 0),Ve(this,"reportTimeouts",[]),this.featureName=t,this.trackingCore=n,this.rumConfig=r}return He(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)||Bn(je),this.startMemory=r,this.reportTimeouts=e.checkpoints.map((function(e){return setTimeout((function(){return n.reportMemory(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:ki(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}();Ve(xi,"checkpoints",[1,3,10,30,90,180,300]);var Fi,Bi,Ui,Ki,Hi,Vi=He((function e(t,n,r){Ue(this,e),Ve(this,"webUIFramework",void 0),Ve(this,"timeSource",void 0),Ve(this,"isSinglePageApp",void 0),Ve(this,"appRenderMode",void 0),Ve(this,"isAppRenderFailed",void 0),Ve(this,"pageLoadMode","INITIAL"),Ve(this,"isSSL",void 0),Ve(this,"treeId",void 0),Ve(this,"isFromServiceWorker",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})),Wi=function(){function e(t){Ue(this,e),Ve(this,"isPEMTracerEnabled",void 0),Ve(this,"responseContextMap",new Map),Ve(this,"resourceLoadEventsMap",new Map),this.isPEMTracerEnabled=t}return He(e,[{key:"offerResponseContext",value:function(e,t){if(this.isPEMTracerEnabled)if(this.responseContextMap.has(e)){var n;null===(n=this.responseContextMap.get(e))||void 0===n||n.heapPush(t)}else{var r=new Xn((function(e,t){return e.requestTime0&&n.heapsize()===t.heapsize()}},{key:"clear",value:function(){this.resourceLoadEventsMap.clear(),this.responseContextMap.clear()}},{key:"flushCache",value:function(){var e=this.responseContextMap.keys(),t=[];if(e){var n,r=Pe(e);try{for(r.s();!(n=r.n()).done;){var i=n.value;t=[].concat(Me(t),Me(this.flushCacheByUrl(i)))}}catch(e){r.e(e)}finally{r.f()}}var o=this.resourceLoadEventsMap.keys();if(o){var a,s=Pe(o);try{for(s.s();!(a=s.n()).done;){var c,l=a.value,u=null===(c=this.resourceLoadEventsMap.get(l))||void 0===c?void 0:c.heapClear();u&&(t=[].concat(Me(t),Me(u.map((function(e){return e.requestStart,zn(De(e,we))})))))}}catch(e){s.e(e)}finally{s.f()}}return t}},{key:"flushCacheByUrl",value:function(e){var t,n=[];if(!e)return n;if(!this.isPEMTracerEnabled)return(null===(t=this.resourceLoadEventsMap)||void 0===t||null===(t=t.get(e))||void 0===t||null===(t=t.heapClear())||void 0===t?void 0:t.map((function(e){return e.requestStart,zn(De(e,Te))})))||n;if(this.canFlush(e)){for(var r=this.responseContextMap.get(e);r&&r.heapsize()>0;){var i=this.mergeAndConsume(e);i&&n.push(i)}this.deleteEntryByRequestUrl(e)}return n}}]),e}(),qi=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)}},ji=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){}},Gi=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)},zi=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},Xi=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)))}},Ji=-1,$i=function(){return"hidden"===document.visibilityState?0:1/0},Qi=function(){Gi((function(e){var t=e.timeStamp;Ji=t}),!0)},Yi=function(){return Ji<0&&(Ji=$i(),Qi(),zi((function(){setTimeout((function(){Ji=$i(),Qi()}),0)}))),{get firstHiddenTime(){return Ji}}},Zi=!1,eo=-1,to=function(e,t){Zi||(function(e,t){var n,r=Yi(),i=qi("FCP"),o=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime-1&&e(t)},i=qi("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=ji("layout-shift",s);c&&(n=Xi(r,i,t),Gi((function(){c.takeRecords().map(s),n(!0)})),zi((function(){o=0,eo=-1,i=qi("CLS",0),n=Xi(r,i,t)})))},no={passive:!0,capture:!0},ro=new Date,io=function(e,t){Fi||(Fi=t,Bi=e,Ui=new Date,so(removeEventListener),oo())},oo=function(){if(Bi>=0&&Bi1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){io(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,no),removeEventListener("pointercancel",r,no)};addEventListener("pointerup",n,no),addEventListener("pointercancel",r,no)}(t,e):io(t,e)}},so=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ao,no)}))},co=function(e,t){var n,r=Yi(),i=qi("FID"),o=function(e){e.startTime0&&(n=i[0])}return(null===(e=n)||void 0===e?void 0:e.name)||window.location.href}(),go=!1,mo=new Set,yo={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"};function Eo(){var e=!0===window.__test__resetWebVitalsState;if(!go||e){e&&(mo=new Set),ho.forEach(bo);var t=Symbol();Hi=t,[uo,co,to].forEach((function(e){return e(wo.bind(null,t),!0)})),[uo,co,to].forEach((function(e){return e(To.bind(null,t))})),go=!0}}function bo(e){po[e]={name:e,verboseName:fo[e]||e,value:Xr,updateHistory:[]};var t=yo[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||(po[e].value=Jr)}function wo(e,t){if(e===Hi){var n=po[t.name],r=ki();n&&(n.updateHistory.push({time:r,data:t}),n.value=t.value),mo.forEach((function(e){return e(t,r,!1)}))}}function To(e,t){e===Hi&&mo.forEach((function(e){return e(t,ki(),!0)}))}var Co,_o=function(){function e(t,n){var r=this;Ue(this,e),Ve(this,"basePageTreeId",void 0),Ve(this,"basePageKey",void 0),Ve(this,"observing",!1),Ve(this,"appContextMap",new Map),Ve(this,"rumConfig",void 0),Ve(this,"trackingCore",void 0),Ve(this,"onMetricUpdate",(function(e,t,n){var i;r.observing&&(n?r.reportMetric(e.name):r.appContextMap.set(t,{time:t,url:location.href,pageKey:null===(i=r.trackingCore.getCurrentContext())||void 0===i?void 0:i.pageKey}))})),this.trackingCore=t,this.rumConfig=n}return He(e,[{key:"startObserving",value:function(){var e,t,n=this;Eo(),this.observing||(this.observing=!0,this.basePageTreeId=this.trackingCore.host.treeID||"_unknown",this.basePageKey=(null===(e=this.trackingCore.getCurrentContext())||void 0===e?void 0:e.pageKey)||"_unknown",ho.forEach((function(e){var t;(null===(t=po[e])||void 0===t?void 0:t.value)===Jr&&n.reportMetric(e)})),t=this.onMetricUpdate,mo.add(t))}},{key:"stopObserving",value:function(){var e;this.observing=!1,e=this.onMetricUpdate,mo.delete(e)}},{key:"reportMetric",value:function(e){var t=po[e];if(t){var n={name:fo[e]||e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value);var r=function(e,t,n,r,i){var o={basePageTreeId:e,basePageKey:t,basePageUrl:vo},a=null;switch(n.name){case"LCP":a=function(e,t){var n;if(0===e.updateHistory.length)return null;var r=e.updateHistory[e.updateHistory.length-1],i=r.data.entries,o=i[i.length-1],a={pageKey:(null===(n=t.get(r.time))||void 0===n?void 0:n.pageKey)||"_unknown",element:Ai(o.element),renderTime:Math.round(o.renderTime),loadTime:Math.round(o.loadTime),size:Math.round(o.size)};return o.url&&(a.url=o.url),a}(n,r);break;case"FID":a=function(e,t){var n;if(0===e.updateHistory.length)return null;var r=e.updateHistory[e.updateHistory.length-1],i=r.data.entries,o=i[i.length-1];return{pageKey:(null===(n=t.get(r.time))||void 0===n?void 0:n.pageKey)||"_unknown",processingStart:Math.round(o.processingStart),processingEnd:Math.round(o.processingEnd),target:Ai(o.target)}}(n,r);break;case"CLS":a=function(e,t){if(0===e.updateHistory.length)return null;var n=e.updateHistory.map((function(e){return e.data.entries})).flat();if(0===n.length)return null;var r=n.reduce((function(e,t){return e&&e.value>t.value?e:t})),i=e.updateHistory.find((function(e){return e.data.entries.includes(r)})),o=null;r&&r.sources&&r.sources.length&&(o=r.sources.reduce((function(e,t){return e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t})));var a,s=t.get(i.time);return o&&s?{shiftCount:n.length,"largestShift.value":r.value,"largestShift.hadRecentInput":r.hadRecentInput,"largestShift.largestSource.node":Ai(null===(a=o)||void 0===a?void 0:a.node),"largestShift.pageKey":s.pageKey||"_unknown","largestShift.url":s.url,"largestShift.startTime":Math.round(r.startTime)}:null}(n,r)}if(a){var s={};return i(s,o,a),s}return o}(this.basePageTreeId,this.basePageKey,t,this.appContextMap,this.trackingCore.host.api.assign);n.metadata=function(e){var t={};return Object.keys(e).forEach((function(n){var r=e[n];t[n]="string"==typeof r?r:JSON.stringify(r)})),t}(r);var i={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};if(this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},i),this.rumConfig["enable-otel"])if("LCP"===e){var o={value:n.longValue,metadata:r};_n.emit(Pr.INTERNAL_OTEL_LARGEST_CONTENTFUL_PAINT,o)}else if("CLS"===e){var a={value:n.doubleValue,metadata:r};_n.emit(Pr.INTERNAL_OTEL_CUMULATIVE_LAYOUT_SHIFT,a)}else if("FID"===e){var s={value:n.longValue,metadata:r};_n.emit(Pr.INTERNAL_OTEL_FIRST_INPUT_DELAY,s)}}}}]),e}(),Io="x-li-uuid",So="x-li-pop",ko="x-msedge-ref",Ao="x-li-fabric",Ro="x-li-pem-resp-meta",Oo="content-type",No="x-cache",Lo=function(){function e(t){Ue(this,e),Ve(this,"_callTreeId",void 0),Ve(this,"_fabric",void 0),Ve(this,"_msEdgeRef",void 0),Ve(this,"_pointOfPresenceId",void 0),Ve(this,"_responseMetadata",void 0),Ve(this,"_contentType",void 0),Ve(this,"_cdnCacheMetadata",void 0),Ve(this,"_downstreamAvailability",void 0);var n=new Map;null==t||t.forEach((function(e,t){n.set(t.toLowerCase(),e)})),this._callTreeId=n.get(Io)||null,this._pointOfPresenceId=n.get(So)||null,this._msEdgeRef=n.get(ko)||null,this._fabric=n.get(Ao)||null,this._responseMetadata=n.get(Ro)||null,this._contentType=n.get(Oo)||null,this._cdnCacheMetadata=n.get(No)||null,this._downstreamAvailability=function(e){if(null==e)return 1;var t,n=Pe(e.split(","));try{for(n.s();!(t=n.n()).done;){var r=t.value.split("=",2);if(2===r.length&&"availability"===r[0]){var i=parseFloat(r[1]);if(i>=0&&i<=1)return i}}}catch(e){n.e(e)}finally{n.f()}return 1}(this._responseMetadata)}return He(e,[{key:"callTreeId",get:function(){return this._callTreeId}},{key:"pointOfPresenceId",get:function(){return this._pointOfPresenceId}},{key:"microsoftEdgeReference",get:function(){return this._msEdgeRef}},{key:"fabric",get:function(){return this._fabric}},{key:"contentType",get:function(){return this._contentType}},{key:"cdnCacheMetadata",get:function(){return this._cdnCacheMetadata}},{key:"responseMetadata",get:function(){return this._responseMetadata}},{key:"downstreamAvailability",get:function(){return this._downstreamAvailability}},{key:"hasAnyLinkedInHeaders",value:function(){return!!(this._fabric||this._pointOfPresenceId||this._msEdgeRef||this._callTreeId)}}]),e}();!function(e){e.CLIENT_TIMEOUT="CLIENT_TIMEOUT",e.CLIENT_ABORTED="CLIENT_ABORTED",e.SERVER_ERROR="SERVER_ERROR",e.NETWORK_ERROR="NETWORK_ERROR",e.UNCLASSIFIED="UNCLASSIFIED",e.TOO_MANY_REQUESTS="TOO_MANY_REQUESTS",e.CLIENT_ERROR="CLIENT_ERROR",e.GRAPHQL_FULL_FAILURE="GRAPHQL_FULL_FAILURE",e.BLOCKED_BY_CLIENT_PROXY="BLOCKED_BY_CLIENT_PROXY",e.DOWNSTREAM_GRACEFUL_DEGRADATION="DOWNSTREAM_GRACEFUL_DEGRADATION",e.TRAFFIC_AFD_TO_LI_POP_ERROR="TRAFFIC_AFD_TO_LI_POP_ERROR",e.TRAFFIC_LI_POP_TO_DC_ERROR="TRAFFIC_LI_POP_TO_DC_ERROR"}(Co||(Co={}));function Do(e,t,n,r,i){var o=new Lo(r),a=function(e,t,n){if(t){if(429===t||999===t)return Co.TOO_MANY_REQUESTS;if(e&&!e.hasAnyLinkedInHeaders()&&t&&t>=400&&t<600)return Co.BLOCKED_BY_CLIENT_PROXY;if((r=t)>=400&&r<500)return Co.CLIENT_ERROR;if(function(e){return e>=500&&e<600}(t))return function(e){if(e){if(e.fabric)return Co.SERVER_ERROR;if(e.pointOfPresenceId)return Co.TRAFFIC_LI_POP_TO_DC_ERROR;if(e.microsoftEdgeReference)return Co.TRAFFIC_AFD_TO_LI_POP_ERROR}return Co.SERVER_ERROR}(e);if(function(e,t){return!!(e>=200&&e<300&&t&&t.downstreamAvailability<1)}(t,e))return Co.DOWNSTREAM_GRACEFUL_DEGRADATION;if(!n)return null}var r;if(n instanceof Error){if("AbortError"===n.name)return Co.CLIENT_ABORTED;if(n instanceof TypeError&&(n.message.indexOf("Network request failed")>=0||n.message.indexOf("NetworkError when attempting to fetch resource")>=0||n.message.indexOf("Failed to fetch")>=0))return Co.NETWORK_ERROR}else if(function(e){return!!e&&("string"==typeof e.statusText||"number"==typeof e.status||"number"==typeof e.readyState)}(n)){if("timeout"===n.statusText)return Co.CLIENT_TIMEOUT;if(0===n.status&&"abort"===n.statusText)return Co.CLIENT_ABORTED;if("readyState"in n&&0===n.readyState)return Co.NETWORK_ERROR}return Co.UNCLASSIFIED}(o,n,i),s=null;return a&&(s={errorType:a},a===Co.UNCLASSIFIED&&i&&(s.errorMessage=i.message,function(e,t,n){var r=["tracer-unclassified-error"];null==n||n.forEach((function(e){return r.push("target-view-name-".concat(e))})),Gn("resource-load-tracer",e instanceof Error||"string"==typeof e?e:JSON.stringify(e),Object.fromEntries(t||[]),r)}(i,r,t))),{cdnCache:o.cdnCacheMetadata||void 0,contentType:o.contentType||void 0,fabric:o.fabric||void 0,msEdgeReference:o.microsoftEdgeReference||void 0,pointOfPresenceId:o.pointOfPresenceId||void 0,resourceTreeId:o.callTreeId?o.callTreeId:void 0,responseStatusCode:n||void 0,networkResourceError:s||void 0,viewNames:t||[],requestTime:e,responseMetadata:o.responseMetadata||void 0}}var Po,Mo=function(){function e(t,n,r){var i,o,a,s,c,l,u,d,h,f,p,v,g,m,y,E,b,w,T,C,_,I,S,k,A,R,O,N,L,D=this;Ue(this,e),Ve(this,"core",void 0),Ve(this,"config",void 0),Ve(this,"collector",void 0),Ve(this,"boomerangStart",-1),Ve(this,"webVitalsObserver",void 0),Ve(this,"appMemoryObserver",void 0),Ve(this,"pageMemoryObserver",void 0),Ve(this,"liveTokens",new Set),Ve(this,"stateWM",new WeakMap),Ve(this,"activeToken",void 0),Ve(this,"isInitial",void 0),Ve(this,"pageLoadId",void 0),Ve(this,"initialResourcesEvents",[]),Ve(this,"responseRleCache",void 0),Ve(this,"beforeHideHandlerBound",this.beforeHideHandler.bind(this)),Ve(this,"fireApfcEventBound",this.fireApfcEvent.bind(this)),Ve(this,"isTracerEnabled",void 0),Ve(this,"isPEMTracerEnabled",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({},zr),n);var P="enabled"===(null===(i=(o=r.host).__getLixTreatment)||void 0===i?void 0:i.call(o,"pemberly.tracking.time-origin-epoch-time")),M={isDnaIntegrationLixEnabled:"enabled"===(null===(a=(s=r.host).__getLixTreatment)||void 0===a?void 0:a.call(s,"pemberly.tracking.fireApfcEvent"))||"enabled"===(null===(c=r.host.abuseDeviceSignalCollectionConfig)||void 0===c?void 0:c.webviewDnaMemberLixTreatment)||"enabled"===(null===(l=r.host.abuseDeviceSignalCollectionConfig)||void 0===l?void 0:l.dnaMemberLixTreatment),isHumanIntegrationLixEnabled:"enabled"===(null===(u=(d=r.host).__getLixTreatment)||void 0===u?void 0:u.call(d,"pemberly.tracking.human.integration"))||"enabled"===(null===(h=r.host.abuseDeviceSignalCollectionConfig)||void 0===h?void 0:h.webviewHumanMemberLixTreatment)||"enabled"===(null===(f=r.host.abuseDeviceSignalCollectionConfig)||void 0===f?void 0:f.humanMemberLixTreatment),isDfpIntegrationLixEnabled:"enabled"===(null===(p=(v=r.host).__getLixTreatment)||void 0===p?void 0:p.call(v,"pemberly.tracking.dfp.integration"))||"enabled"===(null===(g=r.host.abuseDeviceSignalCollectionConfig)||void 0===g?void 0:g.webviewDfpMemberLixTreatment)||"enabled"===(null===(m=r.host.abuseDeviceSignalCollectionConfig)||void 0===m?void 0:m.dfpMemberLixTreatment),disablePerfMarkerOptimization:r.host.abuseDeviceSignalCollectionConfig&&r.host.abuseDeviceSignalCollectionConfig.disablePerfMarkerOptimization||"enabled"===(null===(y=(E=r.host).__getLixTreatment)||void 0===y?void 0:y.call(E,"fingerprinting.collection.skip.performance.marker.check")),samplingTimeWindowInMillis:null===(b=r.host.abuseDeviceSignalCollectionConfig)||void 0===b?void 0:b.samplingTimeWindowInMillis,isOnDemandFingerprintingEnabled:"enabled"===(null===(w=(T=r.host).__getLixTreatment)||void 0===w?void 0:w.call(T,"pemberly.web.ondemand")),isSyncFingerprintingWithHeadersLixEnabled:"enabled"===(null===(C=(_=r.host).__getLixTreatment)||void 0===C?void 0:C.call(_,"sync.apfc.headers"))||"enabled"===(null===(I=r.host.abuseDeviceSignalCollectionConfig)||void 0===I?void 0:I.syncFingerprintingEnabledWithHeadersLixTreatment),isSyncFingerprintingWithCbLixEnabled:"enabled"===(null===(S=(k=r.host).__getLixTreatment)||void 0===S?void 0:S.call(k,"sync.apfc.couchbase"))||"enabled"===(null===(A=r.host.abuseDeviceSignalCollectionConfig)||void 0===A?void 0:A.syncFingerprintingEnabledWithCbLixTreatment)},x=null===(R=(O=r.host).__getLixTreatment)||void 0===R?void 0:R.call(O,"pemberly.tracking.generic-tracers"),F=!!x&&ti.test(x);this.isTracerEnabled=F||this.config["enable-tracking-3"];var B="enabled"===(null===(N=(L=r.host).__getLixTreatment)||void 0===N?void 0:N.call(L,"pemberly.tracking.pem-tracers"));this.isPEMTracerEnabled=B||this.config["enable-pem-tracking-3"],this.responseRleCache=new Wi(this.isPEMTracerEnabled),this.collector=new Di(r.host.api,new Vi(t,this.config,r.host),this.config,P,(function(e){return D.fireResourceLoadEvent(e,D.activeToken)}),this.isTracerEnabled,this.responseRleCache,this.fireApfcEventBound,M,r.host.endpoint),this.collector.startObserving(),_n.before(yn,this.beforeHideHandlerBound)}return He(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){var t,n=null!==(t=this.getPageLoadIdFromState())&&void 0!==t?t:this.pageLoadId,r=this.collector.recordRenderEnd(e,this.isTracerEnabled,n);r&&this.isTracerEnabled&&this.core.fireEvent({appId:this.config["app-id"],eventName:"ViewLoadEvent"},r)}},{key:"provisionNetworkResponse",value:function(e,t){var n,r,i=this;null===(n=this.responseRleCache)||void 0===n||n.offerResponseContext(e,t);var o=null===(r=this.responseRleCache)||void 0===r?void 0:r.flushCacheByUrl(e);null==o||o.forEach((function(e){i.fireResourceLoadEvent(e,i.activeToken)}))}},{key:"start",value:function(e){var t,n;!this.isTracerEnabled&&this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(),this.isInitial=void 0===this.isInitial,this.isInitial||this.collector.reset();var r,i=Object.create(null),o="enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time"));return this.activeToken=i,this.liveTokens.add(i),this.isTracerEnabled?(this.stateWM.set(i,{isInitial:this.isInitial,startTime:Si(this.core.host.api.performance,o),pageKey:e}),this.firePageLoadStartEvent(i)):this.stateWM.set(i,{isInitial:this.isInitial,startTime:Si(this.core.host.api.performance,o)}),this.config["enable-memory-measurement"]&&(null===(r=this.pageMemoryObserver)||void 0===r||r.stopObserving(),this.pageMemoryObserver=new xi("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new xi("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),i}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new _o(this.core,this.config),this.webVitalsObserver.startObserving())}},{key:"end",value:function(e){var t,n,r=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2?arguments[2]:void 0;if(e&&this.activeToken&&this.activeToken===e){var a=this.stateWM.get(e),s="enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time")),c=Si(this.core.host.api.performance,s);a.endProps={renderCompleteTime:c,isImpactedByHiddenWindow:i,rumKey:o},this.isTracerEnabled&&o&&(a.pageKey=o);var l=this.activeToken,u=this.isTracerEnabled?5e3:this.config["beacon-timeout"];a.fireRumEventTimeout=setTimeout((function(){if(r.isTracerEnabled){r.flushResourceLoadEvents(l);var e=r.collector.collectPageLoadEndData({isInitial:a.isInitial});"then"in e?e.then((function(e){r.firePageLoadEndEvent(e,l)})):r.firePageLoadEndEvent(e,l)}var t=r.collector.collect({isInitial:a.isInitial});"then"in t?t.then((function(e){r.fireRumEvent(e,l)})):r.fireRumEvent(t,l)}),u),this.activeToken=void 0}else Gn("rum-end",ei)}},{key:"onDataResponse",value:function(e,t,n,r,i,o,a){var s=Do(t,n,r,i,o);if(null!=a&&a.serverSideResponse){var c=this.generateResourceLoadEventFromResponseContext(e,Ie({nextHopProtocol:Kr.UNKNOWN},s));this.fireResourceLoadEvent(c,this.activeToken)}else this.provisionNetworkResponse(e,s)}},{key:"onOopsPage",value:function(e,t){Gn("rum-oops",e,Object.fromEntries(t||[]),["oops-page"])}},{key:"firePageLoadStartEvent",value:function(e){if(e&&this.activeToken&&this.activeToken===e){var t=this.stateWM.get(e);this.pageLoadId=Dn(),t.pageLoadId=this.pageLoadId;var n=this.collector.collectPageLoadStartData({isInitial:t.isInitial,rumKey:t.pageKey});n.pageLoadId=t.pageLoadId,this.core.fireEvent({appId:this.config["app-id"],eventName:"PageLoadStartEvent"},n)}else Gn("PageLoadStartEvent",ei)}},{key:"destroy",value:function(){var e,t,n;_n.offBefore(yn,this.beforeHideHandlerBound),this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(),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.responseRleCache=void 0,this.core.destroy()}},{key:"getPageLoadIdFromState",value:function(e){var t,n=null!=e?e:this.activeToken;return n&&(t=this.stateWM.get(n).pageLoadId),t}},{key:"abort",value:function(e){var t;if(!e||this.activeToken!==e)throw new Error("RUM abort: rum token passed is invalid");if(null!==(t=this.stateWM.get(e))&&void 0!==t&&t.endProps)throw new Error("RUM abort: Can't abort a session that was already ended");this.activeToken=void 0,this.stateWM.delete(e),this.liveTokens.delete(e)}},{key:"flushEndedSessions",value:function(){var e=this;this.liveTokens.forEach((function(t){var n=e.stateWM.get(t);if(n.endProps){if(e.isTracerEnabled){var r=e.collector.collectPageLoadEndData({isInitial:n.isInitial,immediate:!0});e.firePageLoadEndEvent(r,t),e.flushResourceLoadEvents(t)}var i=e.collector.collect({isInitial:n.isInitial,immediate:!0});e.fireRumEvent(i,t)}}))}},{key:"flushResourceLoadEvents",value:function(e){var t,n,r=this,i=null===(t=this.responseRleCache)||void 0===t?void 0:t.flushCache();null==i||i.map((function(t){r.fireResourceLoadEvent(t,e)})),null===(n=this.responseRleCache)||void 0===n||n.clear()}},{key:"firePageLoadEndEvent",value:function(e,t){if(this.stateWM.get(t)){var n=this.core.host.api.assign,r=this.stateWM.get(t),i=r.startTime,o=r.endProps,a=r.pageLoadId,s=r.pageKey;if(o){var c=o.renderCompleteTime,l=o.isImpactedByHiddenWindow;if(a?e.pageLoadId=a:Gn("PageLoadEndEvent",Zr),e.browserPageLoadEndContext&&(e.browserPageLoadEndContext.isImpactedByHiddenWindow=l),e.navigationTiming){var u,d=null===(u=e.navigationTiming)||void 0===u?void 0:u.navigationStart,h=this.boomerangStart=d||this.boomerangStart,f=d||i,p=c-f;e.navigationTiming.boomerangStart=h,e.navigationTiming.timeDone=p,e.navigationTiming.navigationStart=f,void 0===e.navigationTiming.workerStart&&(e.navigationTiming.workerStart=0)}this.core.fireEvent({appId:this.config["app-id"],eventName:"PageLoadEndEvent"},(function(t){return n({pageKey:s||t.pageKey},e)}))}else this.abort(t)}}},{key:"fireResourceLoadEvent",value:function(e,t){var n=this;if(this.isTracerEnabled){var r,i=null!==(r=this.getPageLoadIdFromState(t))&&void 0!==r?r:this.pageLoadId;if(!i)return void this.initialResourcesEvents.push(e);this.initialResourcesEvents.length>0&&(this.initialResourcesEvents.forEach((function(e){e.parentPageLoadId=i,n.core.fireEvent({appId:n.config["app-id"],eventName:"ResourceLoadEvent"},e)})),this.initialResourcesEvents=[]),e.parentPageLoadId=i,this.core.fireEvent({appId:this.config["app-id"],eventName:"ResourceLoadEvent"},e)}}},{key:"fireRumEvent",value:function(e,t){if(this.stateWM.get(t)){var n=this.core.host.api.assign,r=this.stateWM.get(t),i=r.startTime,o=r.endProps;if(o){var a=o.renderCompleteTime,s=o.isImpactedByHiddenWindow,c=o.rumKey,l=this.boomerangStart=e.navigationStart||this.boomerangStart,u=e.navigationStart||i,d=a-u,h=this.config["app-version"];this.core.fireEvent({appId:this.config["app-id"],eventName:"RealUserMonitoringEvent"},(function(t){return n({pageKey:c||t.pageKey,isImpactedByHiddenWindow:s,appVersion:h,timeDone:d,navigationStart:u,boomerangStart:l,renderCompleteTime:a},e)})),r.fireRumEventTimeout&&clearTimeout(r.fireRumEventTimeout),this.liveTokens.delete(t),this.stateWM.delete(t)}else this.abort(t)}}},{key:"beforeHideHandler",value:function(){this.flushEndedSessions()}},{key:"fireApfcEvent",value:function(e,t){var n,r=null===(n=document)||void 0===n||null===(n=n.cookie)||void 0===n?void 0:n.split(";"),i={issueTime:0,browserId:""};try{i=function(e){var t,n={issueTime:0,browserId:""},r=Pe(e);try{for(r.s();!(t=r.n()).done;){var i=t.value.split("=");if(i.length>1&&"bscookie"===i[0]){var o=decodeURIComponent(i[1]),a=Number(o.substring(4,18)),s=isNaN(a)?0:a,c=o.substring(18,50);return n.browserId=c,n.issueTime=s,n}}}catch(e){r.e(e)}finally{r.f()}return n}(r)}catch(e){}var o={type:e,bsCookieInfo:i,payload:t};this.core.fireEvent({appId:this.config["app-id"],eventName:"ApfcEvent"},o)}},{key:"generateResourceLoadEventFromResponseContext",value:function(e,t){var n=t.requestTime,r=t.viewNames,i=t.requestType,o={resourceKey:e,isNetwork:!0,targetViewNames:r||[],loadType:"serversideresponse",resourceNetworkContext:Ie({},De(t,Ce)),resourceProgressStates:[],timeOrigin:n};return i&&(o.loadType=i),o}},{key:"triggerDeviceSignalCollection",value:function(e){var t=e.onlyTriggerOnDemandFlow;this.collector.triggerDeviceSignalCollection({onlyTriggerOnDemandFlow:t})}}]),e}(),xo="undefined"!=typeof window&&"undefined"!=typeof performance,Fo="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG");function Bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax";const n=W(document),r=q(document),i=pe();let o={};return i&&(o.theme=i.toUpperCase()),r&&(o.interfaceLocale=r),e&&(o.pageKey=e),{header:{},requestHeader:o,pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:n}}}function Uo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!e||null==t||!t.length)throw new Error("Invalid input to fireViewModuleImpressionEvent");const n=q(document),r={};n&&(r.interfaceLocale=n);const i={header:{},requestHeader:r,moduleNames:t};e.fireTrackingEvent("ViewModuleImpressionEvent",i)}function Ko(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={...e},n=B(window.location.href,"originalReferer")||B(window.location.href,"original_referer");return n&&(t.requestHeader={...t.requestHeader,referer:n}),Ho(t)}function Ho(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t={...e},n=pe();return n&&(t.requestHeader={...t.requestHeader,theme:n.toUpperCase()}),t}function Vo(e){let{browserId:t,memberId:n,isLoggedIn:r=!1}=e;return r?`urn:li:member:${n}`:`urn:li:guest:${t}`}!function(){function e(t,n){Ue(this,e),Ve(this,"trackingCore",void 0),Ve(this,"endPageInstance",void 0),Ve(this,"startPageInstance",void 0),Ve(this,"featureIdentifier",void 0),Ve(this,"marks",[]),Ve(this,"spans",[]),Ve(this,"spanStarts",new Map),Ve(this,"started",!1),Ve(this,"ended",!1),Ve(this,"featureKey",void 0),Ve(this,"productName",void 0),Ve(this,"flushOnEnd",void 0),Ve(this,"basePageTreeId",void 0),Ve(this,"debounceFlush",void 0),Ve(this,"disableAutoFlush",void 0),Ve(this,"isCanceled",!1),Ve(this,"isClosed",!1),this.trackingCore=t;var r=n.featureKey,i=n.productName,o=n.flushDebounceMilliseconds,a=n.flushOnEnd;this.featureKey=r,this.productName=i,this.flushOnEnd=a;var s=i?"::".concat(i):"";this.featureIdentifier="".concat(r).concat(s);var c=void 0!==o?o:3e3;c>0&&(this.debounceFlush=function(e,t,n){var r,i,o;void 0===t&&(t=50),void 0===n&&(n={});var a=null!=(r=n.isImmediate)&&r,s=null!=(i=n.callback)&&i,c=n.maxWait,l=Date.now(),u=[];function d(){if(void 0!==c){var e=Date.now()-l;if(e+t>=c)return c-e}return t}var h=function(){var t=[].slice.call(arguments),n=this;return new Promise((function(r,i){var c=a&&void 0===o;if(void 0!==o&&clearTimeout(o),o=setTimeout((function(){if(o=void 0,l=Date.now(),!a){var r=e.apply(n,t);s&&s(r),u.forEach((function(e){return(0,e.resolve)(r)})),u=[]}}),d()),c){var h=e.apply(n,t);return s&&s(h),r(h)}u.push({resolve:r,reject:i})}))};return h.cancel=function(e){void 0!==o&&clearTimeout(o),u.forEach((function(t){return(0,t.reject)(e)})),u=[]},h}(this.flush.bind(this),c)),this.disableAutoFlush=c<0}He(e,[{key:"start",value:function(e){var t;if(xo){if(this.started)throw new Error("Same PerfMeasurement (".concat(this.featureIdentifier,") cannot be started twice"));this.startPageInstance=e||(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance),this.spanStart("load"),this.started=!0}}},{key:"end",value:function(e){var t;if(!this.isClosed){if(this.isClosed=!0,this.isCanceled)throw new Error('[rum measurement] cannot end a canceled measurement "'.concat(this.featureIdentifier,'"'));if(xo){if(this.ended)throw new Error("Same PerfMeasurement (".concat(this.featureIdentifier,") should not be ended twice"));this.endPageInstance=e||(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance),this.spanEnd("load"),this.ended=!0,this.flushOnEnd&&this.flush()}}}},{key:"mark",value:function(e){xo&&(this.marks.push({name:e,startTime:ki()}),Fo&&(performance.mark("LI:".concat(this.featureIdentifier,"-mark-").concat(e)),performance.measure("LI:".concat(this.featureIdentifier,"-mark-").concat(e),"LI:".concat(this.featureIdentifier,"-start"),"LI:".concat(this.featureIdentifier,"-mark-").concat(e))),this.handleNewData())}},{key:"spanStart",value:function(e){xo&&(this.spanStarts.set(e,ki()),Fo&&performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(xo&&this.spanStarts.has(e)){var n=this.spanStarts.get(e),r=t||e;this.spans.push({name:r,startTime:n,duration:ki()-n}),Fo&&(performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-end")),performance.measure("LI:".concat(this.featureIdentifier,"-span-").concat(t||e),"LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start"),"LI:".concat(this.featureIdentifier,"-span-").concat(e,"-end"))),this.handleNewData()}}},{key:"clearSpan",value:function(e){xo&&this.spanStarts.has(e)&&this.spanStarts.delete(e)}},{key:"addSpan",value:function(e){this.spans.push(e),this.handleNewData()}},{key:"setBasePageTreeId",value:function(e){this.basePageTreeId=e}},{key:"getTimestamp",value:function(){return ki()}},{key:"flush",value:function(){0===this.marks.length&&0===this.spans.length||(this.fireEvent(),this.marks=[],this.spans=[],this.debounceFlush&&this.debounceFlush.cancel())}},{key:"handleNewData",value:function(){this.debounceFlush?this.debounceFlush().catch((function(e){})):this.disableAutoFlush||this.flush()}},{key:"fireEvent",value:function(){var e=this,t=this.endPageInstance&&{header:{pageInstance:this.endPageInstance}};this.trackingCore.fireEvent("FeaturePerformanceMeasurementEvent",(function(t){var n=e.startPageInstance||t.pageInstance||Bn(je),r={name:e.featureKey,startTime:-1,duration:-1,startPageInstance:n,marks:e.marks,spans:e.spans};return e.productName&&(r.productName=e.productName),e.basePageTreeId&&(r.basePageTreeId=e.basePageTreeId),r}),t)}},{key:"cancel",value:function(){this.isCanceled=!0}},{key:"check",value:function(){if(xo){if(this.isCanceled)throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" has been canceled'));if(!this.isClosed)throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" is still open'))}}}])}(),function(e){e[e.BATCH=0]="BATCH",e[e.FLUSH_ALL=1]="FLUSH_ALL"}(Po||(Po={}));const Wo={observeComponents:()=>{},unobserveComponents:()=>{},handleDynamicElements:()=>{}};class qo{constructor(e,t){let{threshold:n=.9,root:r=null,rootMargin:i="0px",componentList:o=[],impressionEventCallback:a=(()=>{}),onImpression:s=(()=>{}),onObservation:c=(()=>{}),onUnobservation:l=(()=>{})}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("IntersectionObserver"in window))return Wo;this.root=r,this.threshold=n,this.rootMargin=i,this.trackingInstance=t,this.impressionEventCallback=a,this._onImpression=s,this._onObservation=c,this._onUnobservation=l;const u={root:this.root,rootMargin:this.rootMargin,threshold:this.threshold};this.intersectionObserverInstance=new e(this._handleObservedNodes.bind(this),u),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 jo(e){let{trackingInstance:t,visibleElements:n}=e;const r=n.map((e=>e.getAttribute("data-impression-id"))).filter((e=>e));r.length>0&&Uo(t,r)}function Go(e){e.removeAttribute("data-impression-id")}const zo="timezoneOffset",Xo="screenWidth",Jo="screenHeight",$o="devicePixelRatio",Qo="currentContext",Yo="/transactional-routing/createguestdeferreddeeplink",Zo="csrfToken",ea=/iPad|iPhone|iPod/;function ta(){var e;e=navigator.userAgent,ea.test(e)&&x(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={[zo]:(new Date).getTimezoneOffset(),[Xo]:window.screen.width,[Jo]:window.screen.height,[$o]:window.devicePixelRatio,[Qo]:e};try{navigator.sendBeacon(U(Yo,Zo,j(K("JSESSIONID"))),JSON.stringify(t))}catch(e){}}(e.currentTarget.pathname)))}))}function na(e,t,n){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return n}function ra(e,t){!function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(e,t),t.add(e)}const ia={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",ESCAPE:"Escape",ENTER:"Enter",SPACEBAR:" ",TAB:"Tab"},oa={Down:ia.ARROW_DOWN,Right:ia.ARROW_RIGHT,Left:ia.ARROW_LEFT,Up:ia.ARROW_UP,Esc:ia.ESCAPE,Spacebar:ia.SPACEBAR,Tab:ia.TAB};function aa(e){return oa[e]||e}const sa=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([disabled]):not([tabindex^="-"]):not([type="hidden"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])','[tabindex]:not([tabindex^="-"]):not([disabled])'].join(",");function ca(e){const t=window.getComputedStyle(e);return"hidden"===t.visibility||"none"===t.display}function la(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement,r=arguments.length>2?arguments[2]:void 0;return e===n?!ca(e):r&&r.get(e)?r.get(e):(ca(e)?t=!1:e.parentNode&&(t=la(e.parentNode,n,r)),r&&r.set(e,t),t)}class ua{constructor(e){if(!e)throw new Error("An element must be passed in to Disable Background Navigation");this._container=e,this._hiddenElements=[]}disableBackground(){let e=this._container;for(;e&&e!==document.body&&e.parentElement;)this._hiddenElements=this._hiddenElements.concat([...e.parentElement.children].filter((t=>t!==e&&"true"!==t.getAttribute("aria-hidden")&&!t.classList.contains("top-level-modal-container")&&(t.setAttribute("aria-hidden",!0),!0)))),e=e.parentElement}enableBackground(){this._hiddenElements.forEach((e=>{e.removeAttribute("aria-hidden")})),this._hiddenElements=[]}}const da=["class","disabled","style","tabindex","type"];class ha{constructor(e){if(!e)throw new Error("FocusTrap: No focus trap container passed in");this._container=e,this._observer=new MutationObserver((()=>this._setFirstAndLastFocusableEls(this._container))),this._handleKeyDown=this._focusTrap.bind(this),this._backgroundNavigationDisabler=new ua(this._container)}init(){this._observer.observe(this._container,{attributeFilter:da,attributes:!0,childList:!0,subtree:!0}),this._setFirstAndLastFocusableEls(this._container),this._container.addEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.disableBackground()}tearDown(){this._observer.disconnect(),this._container.removeEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.enableBackground()}_focusTrap(e){const{key:t,target:n}=e,r=aa(t),i=r===ia.TAB&&e.shiftKey;!i&&r===ia.TAB&&n===this.lastFocusableEl?(this.firstFocusableEl.focus(),e.preventDefault()):i&&n===this.firstFocusableEl&&(this.lastFocusableEl.focus(),e.preventDefault())}_setFirstAndLastFocusableEls(e){const[t,n]=this._getFirstAndLastFocusableEls(e);this.firstFocusableEl=t,this.lastFocusableEl=n,setTimeout((()=>{this._hasFocusBeenDropped()&&("-1"===e.getAttribute("tabindex")?e.focus():this.firstFocusableEl.focus())}),100)}_hasFocusBeenDropped(){const e=document.activeElement;return!e||e===document.body}_getFirstAndLastFocusableEls(e){const t=[...e.querySelectorAll(sa)],n=new Map;let r,i,o=0,a=t.length-1;for(;(!r||!i)&&o<=a;){if(!r){const i=t[o];r=la(i,e,n)&&i,o++}if(!i){const r=t[a];i=la(r,e,n)&&r,a--}}return i=i||r,[r,i]}}const{ENTER:fa,ESCAPE:pa}=ia,va="modal__overlay--visible",ga="overflow-hidden",ma="top-level-modal-container";class ya{constructor(e){let{enablePageViewTracking:t=!1,shouldHideModal:n=(()=>!1),triggerByOutletEl:r=!0,shouldMoveToTopContainer:i=!0,events:o={},focusElement:a,pageKey:s,onClose:c}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No modal element passed in");this._el=e,this._parentNode=this._el.parentNode,i&&(this._topLevelContainer=this._getTopLevelContainer()),this._wrapperEl=this._el.querySelector(".modal__wrapper"),this._overlayEl=this._el.querySelector(".modal__overlay"),o&&(this._events=o),r&&(this._outletEls=this._getOutletEls()),this._exitButtonEl=this._el.querySelector(".modal__dismiss"),this._onKeyDownEvent=e=>this._onKeyDown(e),this._enablePageViewTracking=t,this._pageKey=s,this._shouldHideModal=n,this._shouldMoveToTopContainer=i,this.onClose=c;this._el.querySelector("[id='modalNoDismiss']")&&(this._isModalNonDismissible=!0),this._focusElement=a,r&&this._outletEls.forEach((e=>{e.addEventListener("click",(e=>{var t;const n=null===(t=e.target)||void 0===t?void 0:t.getAttribute("data-no-cool-off");this.open({noCoolOff:n})}))})),this._isModalNonDismissible||(this._exitButtonEl&&this._exitButtonEl.addEventListener("click",(()=>this.close())),this._overlayEl.addEventListener("click",this._handleOverlayClick.bind(this))),this._focusTrap=new ha(this._wrapperEl)}_getOutletEls(){const e=this._el.dataset.outlet,t=[...("default-outlet"===e?this._parentNode:document).querySelectorAll(`[data-modal="${e}"]`)];return t.length||console.warn(`No outlet was found with a data-modal attribute equal to the provided dataCustomOutlet param ${e}`),t}_getTopLevelContainer(){const e=document.querySelector(".top-level-modal-container");if(!e){const e=document.createElement("div");return e.className=ma,document.body.appendChild(e)}return e}_handleOverlayClick(e){e.target===this._wrapperEl||this._wrapperEl.contains(e.target)||this.close()}_onKeyDown(e){const t=aa(e.key),n=t===fa&&document.activeElement===this._exitButtonEl;(t===pa||n)&&(this._isModalNonDismissible||this.close(),e.preventDefault())}open(){let{focusElement:e,noCoolOff:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(t||!this._shouldHideModal())return this._focusElement=e||this._focusElement,this._previouslyFocusedEl=document.activeElement,this._overlayEl.classList.add(va),this._overlayEl.setAttribute("aria-hidden","false"),this._shouldMoveToTopContainer&&this._topLevelContainer.appendChild(this._el),this.noScroll(),document.addEventListener("keydown",this._onKeyDownEvent),H(this._el,"open"),this._wrapperEl&&this._wrapperEl.focus(),this._focusTrap.init(),this._enablePageViewTracking&&window.tracking?window.tracking.then((e=>{!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",Bo(n,t))}(e,"ajax",this._pageKey||`${this._el.id}`)})):(H(this._wrapperEl,"afterOpen"),Promise.resolve());H(this._el,"didNotOpen")}async close(){var e,t,n,r,i;this._events.onBeforeClose&&await(null===(n=this._events)||void 0===n||null===(r=n.onBeforeClose)||void 0===r?void 0:r.call(n,this._wrapperEl));this.isOpen&&(null===(i=this.onClose)||void 0===i||i.call(this));this._overlayEl.classList.remove(va),this._overlayEl.setAttribute("aria-hidden","true"),this._shouldMoveToTopContainer&&(this.setFocus(),this._parentNode.appendChild(this._el)),this.removeNoScroll(),document.removeEventListener("keydown",this._onKeyDownEvent),H(this._el,"close"),null!==(e=this._focusElement)&&void 0!==e&&null!==(t=e.classList)&&void 0!==t&&t.contains("ellipsis-menu__trigger")?(this.setFocus(),this._focusTrap.tearDown()):setTimeout((()=>{this.setFocus(),this._focusTrap.tearDown()}),150)}setFocus(){const e=this._focusElement||this._previouslyFocusedEl;null==e||e.focus()}noScroll(){document.body.classList.add(ga)}removeNoScroll(){document.body.classList.remove(ga)}get isOpen(){return this._overlayEl.classList.contains(va)}}class Ea{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10;if(!e)throw new Error('"propName" is a required param for CooloffManager');this.propName=e,this.coolOffTime=60*t*1e3}isCooled(){try{const e=localStorage.getItem(this.propName);if(e){return!(Date.now()-e0&&void 0!==arguments[0]?arguments[0]:null,{globalWindow:n=window}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ra(this,Pa),ra(this,Da),ra(this,La),ra(this,Na),ra(this,Oa),ra(this,Ra),ra(this,Aa),ra(this,ka),ra(this,Sa),ra(this,Ia),this.el=t||document.querySelector(".full-screen-redirect"),this.globalWindow=n,!this.el)throw new Error("No element passed into to full screen redirect component");if(this.isMember="true"===this.el.dataset.isMember,this.impressionTrackingName=this.isMember?"member_full_screen_redirect_modal":"guest_full_screen_redirect_modal",this.sourceTrk=this.el.dataset.sourceTrk||"",this.trafficType=this.el.dataset.type,this.enableForceDestTypeForUrl="true"===this.el.dataset.enableForceDestTypeForUrl,this.isIos="true"===this.el.dataset.isIos,this.trafficType===ba?this.redirectUrl=na(this,Oa,Ha).call(this):this.redirectUrl=na(this,Aa,Ua).call(this,this.trafficType===Ta),!this.redirectUrl)return;this.cooloffPropName=this.el.dataset.cooloffName;const r=this.el.dataset.cooloffInMinutes||60;null!==(e=this.cooloffPropName)&&void 0!==e&&e.length&&(this.redirectCooloffManager=new Ea(this.cooloffPropName,r)),this.init()}init(){if(this.isCooled()){if(this.isIos)return void na(this,Ia,xa).call(this);na(this,Sa,Fa).call(this)}}isCooled(){var e;return!this.redirectCooloffManager||(null===(e=this.redirectCooloffManager)||void 0===e?void 0:e.isCooled())}startCooling(){var e;null===(e=this.redirectCooloffManager)||void 0===e||e.setCooloff()}cancel(){na(this,La,Wa).call(this),this.startCooling(),this.modal.close()}}function xa(){na(this,ka,Ba).call(this)}function Fa(){var e;null===(e=this.globalWindow.appDetection)||void 0===e||e.then((e=>{if(null!=e&&e.length){e.find((e=>"com.linkedin.android"===(null==e?void 0:e.id)))&&na(this,ka,Ba).call(this)}}))}function Ba(){var e,t;null===(e=this.el.querySelector(".full-screen-redirect__cancel-button"))||void 0===e||e.addEventListener("click",(()=>{this.cancel()})),null===(t=this.el.querySelector(".full-screen-redirect__open-btn"))||void 0===t||t.addEventListener("click",(()=>{na(this,Da,qa).call(this)})),this.modal=new ya(this.el),this.modal.open(),na(this,Na,Va).call(this),na(this,Pa,ja).call(this)}function Ua(e){const t=na(this,Ra,Ka).call(this,e);return this.baseUrl.search=t.toString(),this.baseUrl.toString()}function Ka(e){var t;const n=(null===(t=this.globalWindow.location)||void 0===t?void 0:t.pathname)||"";this.baseUrl=new URL("https://www.linkedinmobileapp.com"+n);const r=`appupsell_${this.isMember?"m":"g"}_autoredirect_instant${this.sourceTrk}`,i=new URLSearchParams(this.baseUrl.search);if(i.append("appType","FLAGSHIP"),i.append("trk",r),e){const e=new URLSearchParams(this.globalWindow.location.search);e.delete("trk");for(const[t,n]of e.entries())i.append(t,n)}return(this.isIos||this.enableForceDestTypeForUrl)&&i.append("destType","forced_app"),i}function Ha(){const e=new URLSearchParams(this.globalWindow.location.search),t=e.get("session_redirect"),n=t?new URLSearchParams(new URL(t).search):e,r=e.get(Ca)||n.get(Ca);if(!(!!r||!!n.get("trkEmail")))return;e.delete("trk");const i=na(this,Ra,Ka).call(this);r&&!e.get(Ca)&&i.append("midToken",r);for(const[t,n]of e.entries())i.append(t,n);return this.baseUrl.search=i.toString(),this.baseUrl.toString()}function Va(){this.trafficType!==wa&&(this.redirectTimeout=setTimeout((()=>{na(this,Da,qa).call(this),this.isIos&&this.modal.close()}),3e3))}function Wa(){this.redirectTimeout&&clearTimeout(this.redirectTimeout)}function qa(){this.startCooling(),this.globalWindow.open(this.redirectUrl,"_self")}function ja(){var e;null===(e=this.globalWindow.tracking)||void 0===e||e.then((e=>{Uo(e,[this.impressionTrackingName])}))}function Ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function za(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Xa,Ja,$a,Qa={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},Ya="GUEST",Za="MEMBER",es=0,ts=1,ns=2,rs=(za(_a={},Ya,"li_gc"),za(_a,Za,"li_mc"),_a),is="liap",os=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 Ga(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=r,this.optedInConsentMap={},Qa)t[o]=t[o]||es,t[o]!==es&&(this.consentAvailable=!0),this.optedInConsentMap[o]=t[o]===ts||t[o]===es&&i===ts},as=(Xa=[Qa.ADVERTISING,Qa.ANALYTICS_AND_RESEARCH,Qa.FUNCTIONAL],Ja=[es,ts,ns,es],$a=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),{parseConsentBody:function(e,t){var n=e.match($a);if(!n)return{error:"Invalid consent body encoding",consent:new os};for(var r=parseInt(n[1],10),i={},o=0;o>2*o&3];var a=new Date(1e3*parseInt(n[2],10)),s=parseInt(n[3],10),c=es;return s>=0&&s<=3&&(c=Ja[s]),{error:null,consent:new os(i,a,t,c)}}}),ss=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),cs=function(e,t){var n=t.match(new RegExp("(?:^|; *)".concat(e,"=([^;]*)")));return n&&n.length>1?n[1]:null},ls=function(e,t){var n=cs(rs[e],t);return n?fs(n,e):cs(rs[Ya],t)||cs(rs[Za],t)?us(ns):us(ts)},us=function(e){var t={};for(var n in Qa)t[n]=e;return{error:null,consent:new os(t,null,null,e)}},ds=function(){var e=document.domain.match(/^(?:|.*\.)([^\.]+\.[^\.]+)$/);return e?e[1]:"linkedin-ei.com"},hs=function(e){var t=e===Za?"settings/member-cookies":"mypreferences/g/guest-cookies";return"https://www.".concat(ds(),"/").concat(t)};var fs=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(ss)}catch(e){}if(!r)return{error:"Invalid consent encoding",consent:new os};var i=parseInt(r[1],10),o=r[2];return 1===i?as.parseConsentBody(o,t):{error:"Invalid encoded consent version ".concat(i),consent:new os}},ps=function(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.cookie;return e||(e=cs(is,t)?cs(rs[Za],t)?Za:Ya:cs(rs[Ya],t)?Ya:Za),ls(e,t)}(e),n=t.consent,r=e||n.userMode||Ya;return{showBanner:!t.error&&!n.consentAvailable,userMode:r,managePreferenceUrl:hs(r)}},vs=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(ds(),"/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 Qa){var c=void 0;!0===n[s]?c=ts:!1===n[s]&&(c=ns),a.CATEGORIES[s]=c}o.send(JSON.stringify(a))};function gs(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ms(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"customEvent",t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var Ds=1,Ps=2,Ms=0,xs="artdeco-global-alert__dismiss",Fs="artdeco-global-alert-action",Bs="artdeco-global-alert__content";function Us(e){var t=e.target,n=t instanceof Element&&t.parentNode,r="artdeco-global-alert__responsive-content-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 Ks=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};gs(this,e),this._el=t,this._state=Ms,this._initialHeight=this._el.offsetHeight,this._alertType=this._el.getAttribute(As.alertType),this._id=this._el.getAttribute(As.alertId),this._elDismissBtn=this._el.querySelector(".".concat(xs)),this._trackingOptions=n,this.init()}return ys(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;Os(n,xs)?(e.dismissAction(),Is(e)):Os(n,Fs)&&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===Ds||this._state===Ps)}},{key:"visited",value:function(){this._state=Ds,this._makeAlertAccessible(!1)}},{key:"activate",value:function(){var e,t,n=this._trackingOptions,r=n.enableControlInteractionEvents,i=n.controlInteractionEventsPrefix;this._state=Ps,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(Bs));if(c instanceof Element){var l=(o=Us,a=200,function(){for(var e=arguments.length,t=new Array(e),n=0;n0&&void 0!==arguments[0]&&arguments[0],t={},n=Qa;return Object.keys(n).forEach((function(n){t[n]=e})),{optedInConsentMap:t}}var Ws=function(e){Es(n,e);var t=Cs(n);function n(){return gs(this,n),t.apply(this,arguments)}return ys(n,[{key:"init",value:function(){_s(bs(n.prototype),"init",this).call(this),Hs().showBanner||this.visited()}},{key:"handleAlertAction",value:function(e){var t=e.target,n=t.getAttribute(As.actionType),r=Hs().managePreferenceUrl,i=t.getAttribute(As.actionUrl);i=i&&Y(i)||r;var o=Ls(Rs);switch(n){case"LINK":i?vs(Vs(),(function(){window.location.assign(i)})):t.dispatchEvent(o);break;case"ACCEPT":vs(Vs(!0),(function(){})),t.dispatchEvent(o);break;case"DENY":vs(Vs(),(function(){})),Is(this),t.dispatchEvent(o)}}}]),n}(Ks),qs="li_alerts";function js(){var e=function(e){var t=document.cookie.match("(?:^|;)\\s*".concat(e,"\\s*=\\s*([^;]+)"));return t?t[1]:void 0}(qs),t=e&&atob(e),n={};try{n=JSON.parse(t)}catch(e){}return n}function Gs(){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(qs,"=").concat(t,";expires=").concat(n.toUTCString(),";path=/;secure;samesite=none")}function zs(e){if(!e)return 0;var t=e.toLowerCase(),n=js(),r=n&&n[t]||0;return r=parseInt(r,10)}function Xs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e&&t){var n=e.toLowerCase(),r=Math.min(zs(n)+t,3),i=js();i[n]=r,Gs(i)}}var Js="LIcookiePolicyDisplays";function $s(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;try{window.localStorage.setItem(Js,e)}catch(e){}}var Qs=function(e){Es(n,e);var t=Cs(n);function n(){return gs(this,n),t.apply(this,arguments)}return ys(n,[{key:"init",value:function(){var e=Hs();_s(bs(n.prototype),"init",this).call(this),function(e){var t=NaN;try{t=parseInt(window.localStorage.getItem(Js),10)}catch(e){}!isNaN(t)&&t>=0&&Xs(e,t)}(this._alertType),(e.isActive||zs(this._alertType)>=3)&&_s(bs(n.prototype),"visited",this).call(this)}},{key:"activate",value:function(){_s(bs(n.prototype),"activate",this).call(this),$s(zs(this._alertType)+1),Xs(this._alertType,1)}},{key:"dismissAction",value:function(){_s(bs(n.prototype),"dismissAction",this).call(this),$s(3),Xs(this._alertType,3-zs(this._alertType))}}]),n}(Ks);var Ys=function(){function e(t){gs(this,e),this._trackingOptions=t}return ys(e,[{key:"getAlertInstance",value:function(e){switch(function(e){return ks[e.getAttribute(As.alertType)]}(e)){case ks.COOKIE_USAGE:return new Qs(e,this._trackingOptions);case ks.COOKIE_CONSENT:return new Ws(e,this._trackingOptions);default:return new Ks(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;n0&&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:this._formatAppId(e.id),appVersion:this._formatAppVersion(e.id,e.version),platform:e.platform}))),r={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(`([\\?&])${n?t:encodeURIComponent(t)}=([^&#]*)`).exec(e);return r&&(n?r[2]:decodeURIComponent(r[2]))}_formatAppVersion(e,t){return e===cc?"3.*":t}_formatAppId(e){return e===cc?"COM_LINKEDIN_WINDOWS_NEPTUNE":e.toUpperCase().replace(/\./g,"_")}}class uc{constructor(e){if(!e)throw new Error("JetCore missing required only parameter (`trackingCore`)");this.cwtJetCoreInstance=new Ur(e),this.seenErrors=new Set}bind(e,t){e||(e=[]),e.push("guest-seo"),window.addEventListener("error",(n=>{const r={name:n.error.name,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={name:n.type,message:n.reason.message,stack:n.reason.stack};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 dc="data-tracking-control-name";class hc{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=P(t,"[data-tracking-control-name]");if(null===n)return;const r=n.getAttribute(dc);n.hasAttribute("data-tracking-client-ingraph")&&this._fireClientIngraphMetric(r)}_fireClientIngraphMetric(e){this.ingraphs.fireCounterIngraphMetric({metricsType:`controlInteractionEvent-${e}`,sendBeacon:!0})}}const fc="li_trk_navigation",pc="undefined";function vc(){try{if(typeof window!==pc&&typeof window.sessionStorage!==pc)return JSON.parse(window.sessionStorage.getItem(fc))}catch(e){}}function gc(e){try{typeof window!==pc&&typeof window.sessionStorage!==pc&&window.sessionStorage.setItem(fc,JSON.stringify(e))}catch(e){}}const mc="ExternalNavigationEvent",yc="ControlInteractionEvent",Ec="PageVisibilityChangeEvent",bc="PageViewHeartbeatEvent",wc="LinksterImpressionEvent",Tc={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 Cc(e){return(t=e)?t.split(":").pop():null;var t}function _c(e,t){return e&&t?`urn:li:control:${t}-${e}`:null}class Ic{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=vc();if(!r)return null;for(let i=0;i1&&void 0!==arguments[1]?arguments[1]:"full",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=W(this.document),o={pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:i}};n&&(o.trackingInfo.liSugr=(this.document,K("li_sugr")));const a=this._trackingCore.navMetaFromSeed(e,Or(this.getAppSeedQps()));return this._trackingCore.setCurrentContext(a.to),this.fireNavEvents(a,o,r)}fireNavEvents(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=this._trackingCore.generateNavigationEvent(e),{to:i,from:o,navEventId:a}=e,s=this._trackingCore.generateEnvelope(a,r);s.meta.requestHeader.pageKey=i.pageKey;const c=o&&o.applicationInstance;let l;return c&&(s.meta.header.clientApplicationInstance=c),l=n?this.firePveWithUrlAsPath(i.pageKey,t):this.firePVE(i.pageKey,t),this._trackingCore.host.api.Promise.all([l,this._trackingCore.fireEnvelope(s)])}firePVE(e,t,n){return this._trackingCore.firePVE(e,t,n)}firePveWithUrlAsPath(e,t,n){const r={pageType:"full",totalTime:0,trackingCode:this._trackingCore.getTrackingCode(),trackingInfo:{}},i=this._trackingCore.host.api.assign(r,t),o=this._trackingCore.generateEnvelope("PageViewEvent",i,{context:n});return o.meta.requestHeader.pageKey=e,o.meta.requestHeader.path=this.window.location.href,this._trackingCore.fireEnvelope(o)}_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=P(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=P(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=V(this.document);void 0!==e&&this.firePageVisibilityChangeEvent(e)}saveStateForPageDeparture(e){if(!e)return;!function(e){let t=vc()||[];t.push(e),gc(t)}({controlName:e.controlName,href:e.href,prevInstance:this._trackingCore.getCurrentContext().pageInstance})}firePageVisibilityChangeEvent(e){this._trackingCore.fireEvent(Ec,{isVisible:!e})}fireControlInteractionEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tc.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=Cc(this._trackingCore.getCurrentContext().pageInstance.pageUrn),i=n.uiControlPageKey||r;this._trackingCore.fireEvent(yc,{controlUrn:_c(e,i),interactionType:Tc[t]},n)}fireExternalNavigationEvent(e){const t=Cc(this._trackingCore.getCurrentContext().pageInstance.pageUrn);this._trackingCore.fireEvent(mc,{triggerControlUrn:_c(e,t)},{},!0)}fireLinksterImpressionEvent(e,t,n){this._trackingCore.fireEvent(wc,{moduleName:e,sourceEntity:t,destinationEntities:n})}convertUuidTrackingIdToBase64(e){try{const t=Fn(e),n=String.fromCharCode.apply(null,t);return btoa(n)}catch(t){return e}}}const Sc=2e3;function kc(e){const t=V(e);return void 0!==t&&!t}class Ac{constructor(e){let{globalDocument:t=document,globalWindow:n=window,heartbeatDuration:r=Sc}=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",(()=>{kc(this.document)&&this._firePageViewHeartbeatEvent()}),!0),kc(this.document)&&this._startPageViewHeartbeatInterval()}_startPageViewHeartbeatInterval(){this._pageViewHeartbeatStartTime=Date.now(),this._pageViewHeartbeat=this.window.setInterval(this._firePageViewHeartbeatEvent,this.heartbeatDuration)}_documentVisibilityChangeHeartbeatHandler(){const e=V(this.document);void 0!==e&&(e?(this._firePageViewHeartbeatEvent(),clearInterval(this._pageViewHeartbeat)):this._startPageViewHeartbeatInterval())}_firePageViewHeartbeatEvent(){const e=Date.now();this.tracking.fireTrackingEvent(bc,{header:{},requestHeader:{},startTime:this._pageViewHeartbeatStartTime},{header:{time:e}}),this._pageViewHeartbeatStartTime=e}}const Rc="LOGOUT";let Oc;function Nc(){var e;(e="feed-sort")&&(document.cookie=`${e}=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/;`)}function Lc(e){const t=U(e,"csrfToken",j(K("JSESSIONID")));window.tracking.then((e=>{null==e||e.flushAndClearPersistedEventsOnLogout(),function(e){const t=Y(e);t===e&&Z.redirect(t)}(t)}))}const Dc={endpoint:"/li/tscp/sct",retryConfig:{}},Pc=document.getElementById("config");let Mc,xc,Fc,Bc,Uc,Kc,Hc,Vc,Wc,qc,jc,Gc,zc,Xc,Jc,$c,Qc,Yc,Zc,el,tl,nl,rl,il,ol,al;function sl(e,t){window[e]&&window[e].resolve?window[e].resolve(t):window[e]=Promise.resolve(t)}Pc&&Pc.dataset&&(Mc=Pc.dataset.appId||"seo",xc=Pc.dataset.appVersion||"0.0.0",Bc=Pc.dataset.browserId,Fc=Pc.dataset.callTreeId||null,Wc=void 0!==Pc.dataset.enablePageViewHeartbeatTracking,Uc=Pc.dataset.trackingPageType||void 0,Kc="string"==typeof Pc.dataset.jetTags&&Pc.dataset.jetTags.split(",")||[],Hc=Pc.dataset.multiproductName||"undefined-frontend-mpName",Vc=Pc.dataset.serviceName||"undefined-frontend-serviceName",qc=Pc.dataset.pageInstance||void 0,jc=Pc.dataset.memberId,Qc=void 0!==Pc.dataset.isLoggedIn,Gc=Pc.dataset.logoutUrl,zc=void 0!==Pc.dataset.isTrackingRetryEnabled,Xc=void 0!==Pc.dataset.disableElementInViewportConditionForLazyload,Jc=void 0!==Pc.dataset.isLiSugrTrackingEnabled,$c="true"===Pc.dataset.shouldUseFullUrlInPvePath,Yc=Pc.dataset.dnaMemberLixTreatment,Zc=Pc.dataset.humanMemberLixTreatment,el=Pc.dataset.dfpMemberLixTreatment,tl=Pc.dataset.webviewDnaMemberLixTreatment,nl=Pc.dataset.webviewHumanMemberLixTreatment,rl=Pc.dataset.webviewDfpMemberLixTreatment,il=!isNaN(parseInt(Pc.dataset.samplingTimeWindowInMillis))&&parseInt(Pc.dataset.samplingTimeWindowInMillis),ol=Pc.dataset.syncApfcHeadersLixTreatment,al=Pc.dataset.syncApfcCbLixTreatment);const cl={};Xc&&(cl.disableElementInViewportCondition=Xc),sl("lazyloader",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return ue=ue||new le(e),ue}(cl)),M((()=>{const e=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.querySelector('meta[name="pageKey"]'),r=e.getElementById("config"),i=r&&"true"===r.dataset.disableJsbeaconPagekeySuffix;return n&&n.content?`${n.content}${i||t.skipSuffix?"":"_jsbeacon"}`:""}(document),t=document.querySelector('meta[name="locale"]').content;let n;if(qc&&qc.split(";").length>=2)n=Uint8Array.from(window.atob(qc.split(";")[1]),(e=>e.charCodeAt(0))),n=Array.from(n);else{n=[];for(let e=0;e<16;e++){let t=Vc.charCodeAt(e);isNaN(t)&&(t=0),n.push(t)}}const r=function(){let{appId:e="seo",appVersion:t="0.0.0",locale:n,multiproduct:r="undefined-frontend-mpName",service:i="undefined-frontend-serviceName",callTreeId:o=null,endpoint:a="li/track",maxSize:s=10,debounceTime:c=50,disableCompression:l=!1,customDelegate:u={},retryConfig:d=null,isLoggedIn:h=!1,abuseDeviceSignalCollectionConfig:f={},customTransporterHosts:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const v={appId:e,appVersion:t,locale:n,multiproduct:r,service:i,endpoint:a,disableCompression:l,abuseDeviceSignalCollectionConfig:f,retryConfig:d,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:s,debounceTime:c}};v.abuseDeviceSignalCollectionConfig.disablePerfMarkerOptimization=!0,o&&(v.treeID=o);const g=new wr(v);return new Mr(g,{customTransporterHosts:p,preTransporter:e=>({...e,meta:Ko(e.meta)}),shouldAnonymizeMemberId:()=>!!d&&!h,...u})}({appId:Mc,appVersion:xc,locale:t,multiproduct:Hc,service:Vc,callTreeId:Fc,retryConfig:zc?{}:null,endpoint:"/li/track",abuseDeviceSignalCollectionConfig:{dnaMemberLixTreatment:Yc,humanMemberLixTreatment:Zc,dfpMemberLixTreatment:el,webviewDnaMemberLixTreatment:tl,webviewHumanMemberLixTreatment:nl,webviewDfpMemberLixTreatment:rl,samplingTimeWindowInMillis:il,syncFingerprintingEnabledWithHeadersLixTreatment:ol,syncFingerprintingEnabledWithCbLixTreatment:al},isLoggedIn:Qc,disableCompression:!1,customTransporterHosts:{sponsoredTransporter:Dc}});r.fireTrackingEvent=r.fireEvent,r.generateTrackingId=xn,r.generateBase64UUID=Mn,r.generateByteUUID=Dn;const i={applicationUrn:`urn:li:application:(${Hc},${Vc})`,version:xc,trackingId:n};r.updateAppState({applicationViewerUrn:Vo({browserId:Bc,isLoggedIn:Qc,memberId:jc}),clientApplicationInstance:i});const o=new Ic(r);r.fireControlInteractionEvent=o.fireControlInteractionEvent.bind(o),r.fireLinksterImpressionEvent=o.fireLinksterImpressionEvent.bind(o),r.convertUuidTrackingIdToBase64=o.convertUuidTrackingIdToBase64.bind(o),zc&&r.checkAndEnablePersistentRetry(),o.navigate(e,Uc,Jc,$c);const a=new qo(window.IntersectionObserver,r,{componentList:[...document.querySelectorAll("[data-impression-id]")],onImpression:jo,onUnobservation:Go});Wc&&new Ac(r),sl("tracking",r),sl("impressionTracking",a),sl("pemTracking",new D("Default - PEM Tracking Instance",((t,n,i)=>{r.fireEvent(t,n,{context:{pageKey:e,pageInstance:i}})})));const s=new Mo({"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"},r);s.end(s.start()),s.observeWebVitals();new uc(r).bind(Kc,Fc);const c=document.querySelector('meta[name="clientSideIngraphs"]');if(c){const{gaugeMetricEndpoint:t,counterMetricEndpoint:n}=c.dataset,i=r.getCurrentContext().pageInstance,o=new de({counterMetricEndpoint:n,gaugeMetricEndpoint:t,pageKey:e,pageInstanceHeader:i});new hc({ingraphs:o}),sl("ingraphTracking",o),o.firePageLoadTimeMetric(),o.fireSeoPageViewMetric()}if(ta(),document.querySelector(".global-alert-banner")){new sc({enableControlInteractionEvents:!0,trackingInstance:r})}if(!!document.head.querySelector('link[rel="manifest"]')){sl("appDetection",new lc(((e,t)=>{r.fireTrackingEvent(e,t)})).getInstalledApps())}!function(){const e=document.head,t=document.getElementById("config"),n=t&&t.getAttribute("data-msafdf-lib");if(n){const t=document.createElement("script");t.setAttribute("type","text/javascript"),t.setAttribute("src",Y(n)),t.setAttribute("data-test-id","msafdf"),t.onload=()=>{window.mouselog.init()},e.appendChild(t)}}(),Qc&&Gc&&function(e){BroadcastChannel&&(Oc=new BroadcastChannel("LI_LOGOUT"),window.BROADCAST_CHANNEL=Oc,Oc.addEventListener("message",(t=>{var n,r,i;!t||(null===(n=t.data)||void 0===n?void 0:n.message)!==Rc&&(null===(r=t.data)||void 0===r||null===(i=r.data)||void 0===i?void 0:i.message)!==Rc||(Nc(),Lc(e))})))}(Gc);const l=document.querySelector(".full-screen-redirect");l&&new Ma(l)}))}();