!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",u="x-msedge-ref",l="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 g(e){return JSON.stringify(e,Object.keys(e).sort())}class v 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=g(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=g(e);if(this.metrics.has(n))t(this.metrics.get(n));else{const r=new v(e);t(r),this.metrics.set(n,r)}}}var b;!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"}(b||(b={}));const E=new Set(Object.values(b));class w extends Error{constructor(e){super(e),Object.setPrototypeOf(this,w.prototype)}}function I(e){return 0===e.length||!e.trim()}function C(e){if("string"!=typeof e)throw new w("The product name must be a string. ".concat(a,"."));if(I(e))throw new w("No product name was specified. Please configure a defaultProductName or specify it per instrumented API "+"call. ".concat(a,"."));if(/[^a-zA-Z0-9-_ \\/]/.test(e))throw new w("Product name '".concat(e,"' can only contain alphanumeric, underscores (_), spaces ( ), dashes (-) and forward slashes (/). ").concat(a,"."));return e}function T(e){if("string"!=typeof e)throw new w("Keys must be strings. ".concat(a,"."));if(I(e))throw new w("Keys should not be blank. ".concat(a,"."));if(/[^a-z0-9-]/.test(e))throw new w("'".concat(e,"' can only contain lowercase alphanumeric characters and dashes (-). ").concat(a,"."));return e}class _{constructor(e,t,n){var r,i,o;if(this._shouldEnablePerformanceMeasurement=!1,this._shouldDisableAvailabilityCalculation=!1,this._shouldRecordSession=!1,this._featureKey=T(e),this._defaultDegradationKey=T(t),!n)return this._additionalDegradedResponseCodes=[],this._nonDegradedResponseCodes=[],void(this._degradationKeyOverrides=[]);if("object"!=typeof n)throw new w("DegradationTrackingMetadata options should be an object. ".concat(a,"."));const s=n.productName;s&&(this._productName=C(s));const c=n.additionalDegradedResponseCodes,u=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 ".concat(t," option. ")+"".concat(e," was specified. ").concat(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 ".concat(t," options."));if(t===b.NonDegradedResponseCodes&&e>=400&&e<500)throw new w("For server responses that have a status code, PEM does not consider 4xx as degraded. ".concat(e," is not ")+"considered a degradation unless you explicitly add it to the ".concat(b.AdditionalDegradedResponseCodes," option")+". Please remove ".concat(e," from the ").concat(b.NonDegradedResponseCodes," option. ")+"".concat(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 ".concat(b.NonDegradedResponseCodes," option. ")+"".concat(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 "+"".concat(b.AdditionalDegradedResponseCodes," option. ").concat(a,"."));null==e||e.forEach((e=>n(e,b.NonDegradedResponseCodes))),null==t||t.forEach((e=>n(e,b.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. ".concat(a,"."))}(u,c),this._nonDegradedResponseCodes=u||[],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(!E.has(e))throw new w("An unsupported degradation tracking option '".concat(e,"' was provided. Please fix or remove it. ")+"".concat(a))}))}(n)}static isDegradationTrackingMetadata(e){return null!=e&&Object.getOwnPropertyNames(_.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 k{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(k.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 S(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 _{static isFailureTrackingMetadata(e){return"object"==typeof e&&(null==e?void 0:e.constructor.name)===A.name}}class O{constructor(e,t){if(this._additionalDegradedResponseCodes=new Set,this._degradationKeyByResponseCode=new Map,this._shouldDisableAvailabilityCalculation=!1,this._shouldRecordSession=!1,this._retryableTrackingMetadata=null,!k.isRetryableDegradationTrackingMetadata(e)&&!_.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=_.isDegradationTrackingMetadata(e)?e:void 0;k.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 ".concat(e," as an additional degraded response code for the '").concat(this.featureKey,"' feature, ")+"however it is also specified in the non-degraded response codes for that feature. Please decide whether "+"you want to consider ".concat(e," responses a degraded state or not. ").concat(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. ".concat(a,"."));new Set(e.responseCodesToOverride).forEach((t=>{if(!this.canResponseCodeCountAgainstAvailability(t))throw new w("A degradation key override was specified for ".concat(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 R{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(u)||null,this._fabric=t.get(l)||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 R(t):new R,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 P="undefined"==typeof FastBoot;class M{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),P&&(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 u=o?null:t,l=this._createFailureProcessingMetadata(r);n=this._getAndValidateUrlEntityIDs(n),this._trackResponse(e,a,n,l,i,c,u)}startRetryFlow(e){return M.startRetryFlow(e)}static startRetryFlow(e){return new k(e)}completeRetryFlow(e){if(!k.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,u=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),l=S(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(u))if(e.isCountedAgainstAvailability(u,t)){(n?e.retryableTrackingMetadata.incrementRetriedFeatureApiCall.bind(e.retryableTrackingMetadata):this._featureMetricStore.incrementFailedFeatureApiCall.bind(this._featureMetricStore))({featureKey:e.featureKey,productName:e.productName,pointOfPresenceId:c.pointOfPresenceId,responseErrorType:u,responseFabric:c.fabric},i,function(e,t){return"DOWNSTREAM_GRACEFUL_DEGRADATION"===e?t.downstreamAvailability:0}(u,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)}})),u){this._reportErrorIfUnclassified(a,u,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 u=r.parsedHeaders;u.callTreeId&&(c.responseCallTreeId=u.callTreeId),(null==u?void 0:u.pointOfPresenceId)&&(c.pointOfPresenceId=u.pointOfPresenceId),(null==u?void 0:u.microsoftEdgeReference)&&(c.microsoftEdgeReference=u.microsoftEdgeReference),(null==u?void 0:u.fabric)&&(c.fabric=u.fabric),k.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}(l,r,u,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-".concat(e)))),i.forEach((e=>t.push("pem-feature-".concat(e)))),n=e instanceof Error?e:new Error("Could not classify jQuery response: ".concat(JSON.stringify(e))),null===(o=this._jetErrorCallback)||void 0===o||o.call(this,n,t,!1)}}_createFailureProcessingMetadata(e){if(!e||!Array.isArray(e)||!e.length)throw new w("Please specify a non-empty array of degradation tracking metadata. ".concat(a,"."));const t=new Set;return e.map((e=>{if(!_.isDegradationTrackingMetadata(e)&&!k.isRetryableDegradationTrackingMetadata(e))throw new w("Please use DegradationTrackingMetadata or RetryableDegradationTrackingMetadata to specify the degradations. ".concat(a,"."));const n=C(e.productName||this._defaultProductName),r="".concat(n,"!!").concat(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 O(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. ".concat(a,"."));return e}}function D(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 L(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 U(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 F(e,t,n){const r=new RegExp("([\\?&])".concat(n?t:encodeURIComponent(t),"=([^&#]*)")).exec(e);return r&&(n?r[2]:decodeURIComponent(r[2]))}function B(e,t,n,r){if(!e||!t)throw new Error("Required param of addQueryParam missing: url = ".concat(e,",  key = ").concat(t));t=encodeURIComponent(t),n=encodeURIComponent(n);const i=F(e,t,!0);if(i)return r?e.replace(i,n):e;{const r=e.indexOf("?");let[i,o]=e.split("#"),a="&";return r<0?a="?":r===e.length-1&&(a=""),o&&(o="#".concat(o)),"".concat(i).concat(a).concat(t,"=").concat(n).concat(o||"")}}function H(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]}function q(e){return void 0!==e.msHidden?e.msHidden:void 0!==e.hidden?e.hidden:void 0}function K(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 j=/ /g,V=/[\s\u0000<>"]|%00/,z=/\\/,W=/([.]|%2e){2}/i;let J=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 Q(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(j,"+")),!J.test(t))return G("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(V.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):z.test(i)||W.test(i)||W.test(r)?(G("jSecure Error: malicious data found in url path: "+i,"error"),n):e}const X={redirect(e){window&&(window.location.href=e)}};function Y(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 Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Y(Object(n),!0).forEach((function(t){$(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,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 u={method:t,headers:n,body:null};if(!i){const e=H("JSESSIONID");e&&(u.headers["Csrf-Token"]=K(e))}r&&(u.credentials="include"),"POST"!==u.method&&"PUT"!==u.method||(u.body=o);const l=fetch(e,u),d=l.then((n=>n.ok||304===n.status?n.text().then((e=>(n.responseText=e,n))):n.text().then((r=>{const i=new Error("".concat(t," request for ").concat(e," has failed with status code ").concat(n.status));return n.responseText=r,i.response=n,Promise.reject(i)}))));return a&&(s.length?te(l,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=Z({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 ue{constructor(){let{delayedUrlAttributeName:e="data-delayed-url",delayedPosterAttributeName:t="data-delayed-poster",delayedBackground:n="data-delayed-background",embeddedSrcAttributeName:r="data-li-src",ghostClassesAttributeName:i="data-ghost-classes",ghostUrlAttributeName:o="data-ghost-url",lazyloadClassName:a="lazy-load",lazyloadedClassName:s="lazy-loaded",onLoadClassName:c="onload",onErrorClassName:u="onerror",disableElementInViewportCondition:l=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.elementCache=[],this.onLoadClassName=c,this.onErrorClassName=u,this.delayedUrlAttributeName=e,this.delayedPosterAttributeName=t,this.delayedBackground=n,this.embeddedSrcAttributeName=r,this.lazyloadClassName=a,this.lazyloadedClassName=s,this.ghostUrlAttributeName=o,this.lazyloadElSelector="[".concat(this.delayedUrlAttributeName,"], [").concat(this.embeddedSrcAttributeName,"], .").concat(this.lazyloadClassName),this.boundLoadVisibleImages=this.loadVisibleImages.bind(this),this.boundEvents=!1,this.scriptLoadPromises={},this.ghostClassesAttributeName=i,this.disableElementInViewportCondition=l,L((()=>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",Q(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 ".concat(e.src)))}}loadVisibleImages(){let e=0;for(;e<this.elementCache.length;){let t=this.elementCache[e];if(t.tagName===ce||t.classList.contains(this.onLoadClassName)||this.disableElementInViewportCondition||U(t)){const n=t.hasAttribute(this.embeddedSrcAttributeName)&&this._dropHttp(t.getAttribute(this.embeddedSrcAttributeName))||t.getAttribute(this.delayedUrlAttributeName);n&&"ICON"===t.tagName?ae(t,n).then((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=Q(n)):n&&t.hasAttribute(this.delayedBackground)?(t.style.backgroundImage='url("'.concat(Q(n),'")'),this.lazyloadElOnload(t)):this.lazyloadOnerror(t),"VIDEO"===t.tagName&&(t.poster=Q(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 le=null;const de=["binlar","ask\\ jeeves","mozilla\\/4\\.0\\ \\(compatible\\;\\ msie\\ 6\\.0\\;\\ windows\\ nt\\ 5\\.1\\;1813\\)","companydatatree","genieo","microsoft\\+scheduled\\+cache\\+content\\+download\\+service","liferea","superfeedr","ez\\ publish\\ link\\ validator","htmlparser","argclrint","linkwalker","webtool","ask\\+jeeves","stackrambler","paros","^fdm\\+3\\.x","ms\\ search","indy\\+library","seznam","sitevigil","intergator","freedom(?!from)","google\\+page\\+speed\\+insights","znajdzfoto\\/image","riddler\\.io","^java\\/","twiceler","httpunit","ktxn","webcopier","mna\\+digital\\+circonus\\+check","stuff(?!nz)","updatepatrol","feedburner","hp\\+sitescope","crawler","gigablastopensource\\/","rpt\\-http","^fdm\\ 3\\.x","libwww\\-perl","((?=pital)|ca(?=pital))pita","bingpreview","oia\\.owa","^ahc\\/","thunderstone","microsoft\\ bits","alertsite","^python\\-requests\\/","dts\\ agent","tangjiutao","^inmon","linkscan","alexa\\ site\\ audit","webtrends(?!clientlibrary)","chkd","joedog","daumoa","typhoeus","loadimpactpageanalyzer","google\\ news","coldfusion","mna\\ digital\\ circonus\\ check","alexa\\+site\\+audit","getright","appengine","(?=crawler)crawl","ibot(?!ta)","jobo","python\\-httplib","powermarks","site24x7","proximic","yahoo\\+pipes","((?=aporter)|oper(?=aportable))aport","web\\+downloader","check\\_http","grabber","topsy\\.com\\/butterfly\\/","harvest","^inagist\\+url\\+resolver","fast","crescent(?!\\ build|\\+build)","sohu(?!ennews|video|news)","favorg","bloglines","fetch(?!tv)","wapt","microsoft\\+url\\+control","urchin","ning\\/1\\.0","pluck","google\\+news","spider","\\(compatible\\;\\+optimizer\\)","moreover\\/5\\.1","js\\-kit","server\\ density\\ external\\ llama","facebookexternalhit","ultraseek","catchpoint","yandex(?!\\ browser|\\+browser|mail)","echo(?!arena|fon|star)","^worldwatch\\/","combine(?!d)","winhttprequest","ez\\+publish\\+link\\+validator","jakarta","^webnotifier\\/","webmetrics","teoma","nerdbynature","ms\\+frontpage","nielsen","sucker","engagebdr","yahoofeedseeker","dts\\+agent","googleapps","holmes","plumtree","www\\-mechanize","google\\-hoteladsverifier","pingdom","drupal","sina\\_weibo","google\\ page\\ speed\\ insights","lisa","w3c\\_validator","^scan","yeti","snoopy","khte","trovit","atomz","httpcomponents","ms\\+search","google\\-http\\-java\\-client","spi\\_der","bubing","websitepulse","microsoft\\+bits","http\\_request2","ieautodiscovery","siteimprove","curl(?!ings)","go\\+1\\.1\\+package\\+http","^crowsnest\\/","email\\ exractor","utorrent","yahoocachesystem","shopwiki","justview","googlesecurityscanner","msnptc","rkg\\+url\\+verifier","monitor","bitvouseragent","((?=wormgame))worm","talktalk","help\\.coccoc\\.com","yahoo\\ pipes","heritrix","nutch","argus","kulturarw3","checkurl","universalsearch","amazon\\ route\\ 53\\ health\\ check\\ service","slurp","mozilla\\/5\\.0\\ \\(compatible\\;\\ msie\\ 5\\.0\\)","ezooms","kimengi\\/nineconnections\\.com","applesyndication","python\\-urllib","internal\\+zero\\-knowledge\\+agent","system\\+center\\+operations\\+manager","riverglassscanner","imgsizer","changedetection","nutscrape","feedzilla","contype","^lwp","\\(compatible\\;\\ optimizer\\)","infolink","outbrain","^prerender","admantx","^inagist\\ url\\ resolver","amazon\\+route\\+53\\+health\\+check\\+service","neustar","a6\\-indexer","comodo\\+ssl\\+checker","linkchecker","viglink","patric","newsnow","wasalive","scrapy","(?=gruber)grub","ruxitsynthetic","rkg\\ url\\ verifier","ocelli","webcapture","^kraken\\/","t\\-h\\-u\\-n\\-d\\-e\\-r\\-s\\-t\\-o\\-n\\-e","spider(?!solitaire)","isearch","hp\\ sitescope","maxamine","\\(simulated\\_by\\_webserver\\_stress\\_tool\\)","((?=obotics)|ther(?=obotfree))obot","yacy","twibble\\.io","google\\+wireless\\+transcoder","wget","internal\\ zero\\-knowledge\\ agent","google\\ wireless\\ transcoder","xenu","yahooseeker","advanced\\ email\\ extractor","feed43","ptst","reconnoiter","go\\ 1\\.1\\ package\\ http","advanced\\+email\\+extractor","linkdex","panscient\\.com","webcheck","linktiger","scooter","flipboard\\.com\\/browserproxy","evidon","twisted\\ pagegetter","cosmos","adbeat","sherlock","web\\ downloader","cookiereports","siteexplorer","miva","twisted\\+pagegetter","mfc\\_tear\\_sample","indy\\ library","b2w(?!tenisnew)","orangebot(?!swana)","lockss\\+cache","mozilla\\/4\\.0\\+\\(compatible\\;\\+msie\\+6\\.0\\;\\+windows\\+nt\\+5\\.1\\;1813\\)","yahooexternalcache","apache\\-httpclient\\/4\\.","archive\\.org","wesee\\:search","hiscan","ms\\ frontpage","tagscanner","google\\ web\\ preview","special\\_archiver","d24y\\-aegis","scoutjet","larbin","adsense\\-snapshot\\-google","keynote","skypeuripreview","clickajob","download\\+ninja","internet\\ ninja","^ltx71","ukonline","eventmachine\\ httpclient","nomad","mediapartners","twikle","microsoft\\ scheduled\\ cache\\ content\\ download\\ service","internet\\+ninja","scanalert","metauri","agentname","adr\\)","squider","isilo","teleport","automationtest","bordermanager","linklint","bot","templeton","rssreader","ichiro","(?=dialer\\-mobileapp)dialer","atomic\\_email\\_hunter","google\\+web\\+preview","longurl\\+api","longurl\\ api","internetseer","server\\+density\\+external\\+llama","topix","iopus","download\\ ninja","mozilla\\/5\\.0\\+\\(compatible\\;\\+msie\\+5\\.0\\)","europarchive","avantgo","flamingo\\_searchengine","lockss\\ cache","jobrapido","wesee\\:ads\\/","frontier","newspaper\\/0\\.0\\.","apachebench","flamingosearch","lydia","microsoft\\ url\\ control","phantomjs","system\\ center\\ operations\\ manager","^econtext\\/","akamai","cfschedule","searchme\\.com\\/support\\/","fortimail","comodo\\ ssl\\ checker","gomezagent","sitecon","webauto","golem","swcd","spundge\\/0\\.1","findlinks","^sjn","yandex","ia\\_archive","vagabondo","watchmouse","simplepie","1job","goldfire"].join("|"),he=new RegExp(de,"i");function fe(e){return he.test(e.trim())}var pe,ge,ve=function(){return"".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)},me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;return{name:e,value:t,delta:0,entries:[],id:ve(),isFinal:!1}},ye=function(e,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver((function(e){return e.getEntries().map(t)}));return n.observe({type:e,buffered:!0}),n}}catch(e){}},be=!1,Ee=!1,we=function(e){be=!e.persisted},Ie=function(){addEventListener("pagehide",we),addEventListener("beforeunload",(function(){}))},Ce=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Ee||(Ie(),Ee=!0),addEventListener("visibilitychange",(function(t){var n=t.timeStamp;"hidden"===document.visibilityState&&e({timeStamp:n,isUnloading:be})}),{capture:!0,once:t})},Te=function(e,t,n,r){var i;return function(){n&&t.isFinal&&n.disconnect(),t.value>=0&&(r||t.isFinal||"hidden"===document.visibilityState)&&(t.delta=t.value-(i||0),(t.delta||t.isFinal||void 0===i)&&(e(t),i=t.value))}},_e=function(){return void 0===pe&&(pe="hidden"===document.visibilityState?0:1/0,Ce((function(e){var t=e.timeStamp;return pe=t}),!0)),{get timeStamp(){return pe}}},ke=function(){return ge||(ge=new Promise((function(e){return["scroll","keydown","pointerdown"].map((function(t){addEventListener(t,e,{once:!0,passive:!0,capture:!0})}))}))),ge};class Se{constructor(){let{gaugeMetricEndpoint:e,counterMetricEndpoint:t,pageKey:n,pageInstanceHeader:r=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.gaugeMetricEndpoint=e,this.counterMetricEndpoint=t,this.perfData=window.performance.timing,this.pageInstanceHeader=r,this.pageKey=n,!this.pageKey||!this.gaugeMetricEndpoint||!this.counterMetricEndpoint)throw new Error("Please pass a valid pageKey, counterMetricEndpoint & gaugeMetricEndpoint");window.gaugeEndpoint="guestGauge"}_getPageLoadTime(){return this.perfData.loadEventEnd-this.perfData.navigationStart}firePageLoadTimeMetric(){if(fe(navigator.userAgent)||this._pageLoadTimeMetricFired||!this.perfData)return;const e=this._getPageLoadTime();this.fireGaugeIngraphMetric({metricsType:"pageLoadTime",metricsValue:e}),this._pageLoadTimeMetricFired=!0}attachWebVitalsMetrics(){fe(navigator.userAgent)||this._webVitalsListenersAttached||(!function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=me("CLS",0),i=function(e){e.hadRecentInput||(r.value+=e.value,r.entries.push(e),t())},o=ye("layout-shift",i);o&&(t=Te(e,r,o,n),Ce((function(e){var n=e.isUnloading;o.takeRecords().map(i),n&&(r.isFinal=!0),t()})))}(this._webVitalReportHandler.bind(this)),function(e){var t,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=me("LCP"),i=_e(),o=function(e){var n=e.startTime;n<i.timeStamp?(r.value=n,r.entries.push(e)):r.isFinal=!0,t()},a=ye("largest-contentful-paint",o);if(a){t=Te(e,r,a,n);var s=function(){r.isFinal||(a.takeRecords().map(o),r.isFinal=!0,t())};ke().then(s),Ce(s,!0)}}(this._webVitalReportHandler.bind(this)),function(e){var t=me("FID"),n=_e(),r=function(e){e.startTime<n.timeStamp&&(t.value=e.processingStart-e.startTime,t.entries.push(e),t.isFinal=!0,o())},i=ye("first-input",r),o=Te(e,t,i);i?Ce((function(){i.takeRecords().map(r),i.disconnect()}),!0):window.perfMetrics&&window.perfMetrics.onFirstInputDelay&&window.perfMetrics.onFirstInputDelay((function(e,r){r.timeStamp<n.timeStamp&&(t.value=e,t.isFinal=!0,t.entries=[{entryType:"first-input",name:r.type,target:r.target,cancelable:r.cancelable,startTime:r.timeStamp,processingStart:r.timeStamp+e}],o())}))}(this._webVitalReportHandler.bind(this)),this._webVitalsListenersAttached=!0)}_webVitalReportHandler(e){this.fireGaugeIngraphMetric({metricsType:"".concat(e.name.toLowerCase(),"Time"),metricsValue:e.value,sendBeacon:!0})}_beacon(e,t){e=B(e,"csrfToken",K(H("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!fe(navigator.userAgent)&&r}}const Ae="light",Oe="dark";function Re(){const e=document.getElementById("config");let t;return e&&e.dataset&&(t=e.dataset.theme),t?document.documentElement.classList.contains("dark")?Oe:Ae:void 0}var Ne;function Pe(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw i}}return o}}(e,t)||Be(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Me(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Be(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 De(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Le(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function xe(e,t,n){return t&&Le(e.prototype,t),n&&Le(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ue(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fe(e){return function(e){if(Array.isArray(e))return He(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Be(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 Be(e,t){if(e){if("string"==typeof e)return He(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)?He(e,t):void 0}}function He(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function qe(e){return(qe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Ke,Ge=new Uint8Array(16);function je(){if(!Ke&&!(Ke="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Ke(Ge)}var Ve=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ze(e){return"string"==typeof e&&Ve.test(e)}for(var We=[],Je=0;Je<256;++Je)We.push((Je+256).toString(16).substr(1));function Qe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(We[e[t+0]]+We[e[t+1]]+We[e[t+2]]+We[e[t+3]]+"-"+We[e[t+4]]+We[e[t+5]]+"-"+We[e[t+6]]+We[e[t+7]]+"-"+We[e[t+8]]+We[e[t+9]]+"-"+We[e[t+10]]+We[e[t+11]]+We[e[t+12]]+We[e[t+13]]+We[e[t+14]]+We[e[t+15]]).toLowerCase();if(!ze(n))throw TypeError("Stringified UUID is invalid");return n}function Xe(e){if(!ze(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 Ye(e,t,n){function r(e,r,i,o){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n<e.length;++n)t.push(e.charCodeAt(n));return t}(e)),"string"==typeof r&&(r=Xe(r)),16!==r.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var a=new Uint8Array(16+e.length);if(a.set(r),a.set(e,r.length),(a=n(a))[6]=15&a[6]|t,a[8]=63&a[8]|128,i){o=o||0;for(var s=0;s<16;++s)i[o+s]=a[s];return i}return Qe(a)}try{r.name=e}catch(e){}return r.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",r.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",r}function Ze(e){return 14+(e+64>>>9<<4)+1}function $e(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function et(e,t,n,r,i,o){return $e((a=$e($e(t,e),$e(r,o)))<<(s=i)|a>>>32-s,n);var a,s}function tt(e,t,n,r,i,o,a){return et(t&n|~t&r,e,t,i,o,a)}function nt(e,t,n,r,i,o,a){return et(t&r|n&~r,e,t,i,o,a)}function rt(e,t,n,r,i,o,a){return et(t^n^r,e,t,i,o,a)}function it(e,t,n,r,i,o,a){return et(n^(t|~r),e,t,i,o,a)}function ot(e,t,n){var r=(e=e||{}).random||(e.rng||je)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return Qe(r)}function at(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function st(e,t){return e<<t|e>>>32-t}Ye("v3",48,(function(e){if("string"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n<t.length;++n)e[n]=t.charCodeAt(n)}return function(e){for(var t=[],n=32*e.length,r="0123456789abcdef",i=0;i<n;i+=8){var o=e[i>>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<<t%32,e[Ze(t)-1]=t;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,a=0;a<e.length;a+=16){var s=n,c=r,u=i,l=o;n=tt(n,r,i,o,e[a],7,-680876936),o=tt(o,n,r,i,e[a+1],12,-389564586),i=tt(i,o,n,r,e[a+2],17,606105819),r=tt(r,i,o,n,e[a+3],22,-1044525330),n=tt(n,r,i,o,e[a+4],7,-176418897),o=tt(o,n,r,i,e[a+5],12,1200080426),i=tt(i,o,n,r,e[a+6],17,-1473231341),r=tt(r,i,o,n,e[a+7],22,-45705983),n=tt(n,r,i,o,e[a+8],7,1770035416),o=tt(o,n,r,i,e[a+9],12,-1958414417),i=tt(i,o,n,r,e[a+10],17,-42063),r=tt(r,i,o,n,e[a+11],22,-1990404162),n=tt(n,r,i,o,e[a+12],7,1804603682),o=tt(o,n,r,i,e[a+13],12,-40341101),i=tt(i,o,n,r,e[a+14],17,-1502002290),n=nt(n,r=tt(r,i,o,n,e[a+15],22,1236535329),i,o,e[a+1],5,-165796510),o=nt(o,n,r,i,e[a+6],9,-1069501632),i=nt(i,o,n,r,e[a+11],14,643717713),r=nt(r,i,o,n,e[a],20,-373897302),n=nt(n,r,i,o,e[a+5],5,-701558691),o=nt(o,n,r,i,e[a+10],9,38016083),i=nt(i,o,n,r,e[a+15],14,-660478335),r=nt(r,i,o,n,e[a+4],20,-405537848),n=nt(n,r,i,o,e[a+9],5,568446438),o=nt(o,n,r,i,e[a+14],9,-1019803690),i=nt(i,o,n,r,e[a+3],14,-187363961),r=nt(r,i,o,n,e[a+8],20,1163531501),n=nt(n,r,i,o,e[a+13],5,-1444681467),o=nt(o,n,r,i,e[a+2],9,-51403784),i=nt(i,o,n,r,e[a+7],14,1735328473),n=rt(n,r=nt(r,i,o,n,e[a+12],20,-1926607734),i,o,e[a+5],4,-378558),o=rt(o,n,r,i,e[a+8],11,-2022574463),i=rt(i,o,n,r,e[a+11],16,1839030562),r=rt(r,i,o,n,e[a+14],23,-35309556),n=rt(n,r,i,o,e[a+1],4,-1530992060),o=rt(o,n,r,i,e[a+4],11,1272893353),i=rt(i,o,n,r,e[a+7],16,-155497632),r=rt(r,i,o,n,e[a+10],23,-1094730640),n=rt(n,r,i,o,e[a+13],4,681279174),o=rt(o,n,r,i,e[a],11,-358537222),i=rt(i,o,n,r,e[a+3],16,-722521979),r=rt(r,i,o,n,e[a+6],23,76029189),n=rt(n,r,i,o,e[a+9],4,-640364487),o=rt(o,n,r,i,e[a+12],11,-421815835),i=rt(i,o,n,r,e[a+15],16,530742520),n=it(n,r=rt(r,i,o,n,e[a+2],23,-995338651),i,o,e[a],6,-198630844),o=it(o,n,r,i,e[a+7],10,1126891415),i=it(i,o,n,r,e[a+14],15,-1416354905),r=it(r,i,o,n,e[a+5],21,-57434055),n=it(n,r,i,o,e[a+12],6,1700485571),o=it(o,n,r,i,e[a+3],10,-1894986606),i=it(i,o,n,r,e[a+10],15,-1051523),r=it(r,i,o,n,e[a+1],21,-2054922799),n=it(n,r,i,o,e[a+8],6,1873313359),o=it(o,n,r,i,e[a+15],10,-30611744),i=it(i,o,n,r,e[a+6],15,-1560198380),r=it(r,i,o,n,e[a+13],21,1309151649),n=it(n,r,i,o,e[a+4],6,-145523070),o=it(o,n,r,i,e[a+11],10,-1120210379),i=it(i,o,n,r,e[a+2],15,718787259),r=it(r,i,o,n,e[a+9],21,-343485551),n=$e(n,s),r=$e(r,c),i=$e(i,u),o=$e(o,l)}return[n,r,i,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Ze(t)),r=0;r<t;r+=8)n[r>>5]|=(255&e[r/8])<<r%32;return n}(e),8*e.length))})),Ye("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<r.length;++i)e.push(r.charCodeAt(i))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,a=Math.ceil(o/16),s=new Array(a),c=0;c<a;++c){for(var u=new Uint32Array(16),l=0;l<16;++l)u[l]=e[64*c+4*l]<<24|e[64*c+4*l+1]<<16|e[64*c+4*l+2]<<8|e[64*c+4*l+3];s[c]=u}s[a-1][14]=8*(e.length-1)/Math.pow(2,32),s[a-1][14]=Math.floor(s[a-1][14]),s[a-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<a;++d){for(var h=new Uint32Array(80),f=0;f<16;++f)h[f]=s[d][f];for(var p=16;p<80;++p)h[p]=st(h[p-3]^h[p-8]^h[p-14]^h[p-16],1);for(var g=n[0],v=n[1],m=n[2],y=n[3],b=n[4],E=0;E<80;++E){var w=Math.floor(E/20),I=st(g,5)+at(w,v,m,y)+b+t[w]+h[E]>>>0;b=y,y=m,m=st(v,30)>>>0,v=g,g=I}n[0]=n[0]+g>>>0,n[1]=n[1]+v>>>0,n[2]=n[2]+m>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+b>>>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 ct=null;if(("undefined"==typeof crypto||!crypto.getRandomValues)&&"undefined"!=typeof require){var ut=("undefined"!=typeof FastBoot?FastBoot.require:"function"==typeof __webpack_require__?__non_webpack_require__:require)("crypto");if(ut){var lt=new Uint8Array(256),dt=lt.length;ct={rng:function(){return dt>lt.length-16&&(ut.randomFillSync(lt),dt=0),lt.slice(dt,dt+=16)}}}}var ht="object"===("undefined"==typeof crypto?"undefined":qe(crypto))&&"function"==typeof crypto.randomUUID?function(){return crypto.randomUUID()}:function(){return function(e){return Qe(e)}(ft())};function ft(){return ot(ct,new Array(16),0)}function pt(e){return Fe(e).map((function(e){return String.fromCharCode(e)})).join("")}function gt(){return pt(ft())}var vt=/^[a-zA-Z0-9/+]+[=]+$/;function mt(){return function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=[],i=0,o=e.length,a=o%3,s=o-a;i<s;)t=e[i]<<16,t|=e[i+1]<<8,t|=e[i+2],r.push(n.charAt(t>>>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("")}(ft())}function yt(){return ht()}function bt(e){return Xe(e)}function Et(e,t){return{pageUrn:It(e),trackingId:t||mt()}}function wt(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function It(e){return"urn:li:page:".concat(e)}function Ct(e,t){return{pageInstance:t.assign({},e.pageInstance),pageKey:e.pageKey,applicationInstance:e.applicationInstance}}function Tt(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 _t(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function kt(e,t){if("undefined"!=typeof window&&window.indexedDB){var n="sequenceNumber",r=window.indexedDB.open(n);return new Promise((function(i,o){r.onupgradeneeded=function(){var e=r.result;e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},r.onsuccess=function(){var a=r.result,s=a.transaction(n,"readwrite"),c=s.objectStore(n),u=c.get(1);u.onsuccess=function(){var n=u.result;if(n){var r,a=null!==(r=n.sequenceNumber)&&void 0!==r?r:0;if("read"===e)return i(a);if(!("update"===e&&void 0!==t&&t>a))return i(null);var s=c.put({sequenceNumber:t},1);s.onsuccess=function(){return i(null)},s.onerror=function(){o(s.error)}}else{var l=c.add({sequenceNumber:0});l.onsuccess=function(){return i(0)},l.onerror=function(){o(l.error)}}},u.onerror=function(){return a.close(),o(new Error("Error: get sequence number from indexedDB ".concat(String(u.error))))},s.oncomplete=function(){return a.close()}},r.onerror=function(){return i(null)}}))}return Promise.resolve(null)}function St(e,t,n){var r=e.get(t);r&&r.push(n)||e.set(t,[n])}function At(e,t,n){var r=e.get(t);r&&r.splice(r.indexOf(n)>>>0,1)}var Ot,Rt,Nt=(Ot=new Map,Rt=new Map,{on:function(e,t){St(Ot,e,t)},before:function(e,t){St(Rt,e,t)},off:function(e,t){At(Ot,e,t)},offBefore:function(e,t){At(Rt,e,t)},emit:function(e,t){(Rt.get(e)||[]).concat(Ot.get(e)||[]).slice().map((function(e){e(t)}))},clear:function(){Rt.clear(),Ot.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var Pt=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||Nt.emit("internal:hide",e)};document.addEventListener("visibilitychange",Pt),window.addEventListener("pagehide",Pt)}var Mt=Uint8Array,Dt=Uint16Array,Lt=Uint32Array,xt=new Mt([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]),Ut=new Mt([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]),Ft=new Mt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Bt=function(e,t){for(var n=new Dt(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var i=new Lt(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)i[o]=o-n[r]<<5|r;return[n,i]},Ht=Bt(xt,2),qt=Ht[0],Kt=Ht[1];qt[28]=258,Kt[258]=28;for(var Gt=Bt(Ut,0)[1],jt=new Dt(32768),Vt=0;Vt<32768;++Vt){var zt=(43690&Vt)>>>1|(21845&Vt)<<1;zt=(61680&(zt=(52428&zt)>>>2|(13107&zt)<<2))>>>4|(3855&zt)<<4,jt[Vt]=((65280&zt)>>>8|(255&zt)<<8)>>>1}var Wt=function(e,t,n){for(var r=e.length,i=0,o=new Dt(t);i<r;++i)e[i]&&++o[e[i]-1];var a,s=new Dt(t);for(i=0;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(n){a=new Dt(1<<t);var c=15-t;for(i=0;i<r;++i)if(e[i])for(var u=i<<4|e[i],l=t-e[i],d=s[e[i]-1]++<<l,h=d|(1<<l)-1;d<=h;++d)a[jt[d]>>>c]=u}else for(a=new Dt(r),i=0;i<r;++i)e[i]&&(a[i]=jt[s[e[i]-1]++]>>>15-e[i]);return a},Jt=new Mt(288);for(Vt=0;Vt<144;++Vt)Jt[Vt]=8;for(Vt=144;Vt<256;++Vt)Jt[Vt]=9;for(Vt=256;Vt<280;++Vt)Jt[Vt]=7;for(Vt=280;Vt<288;++Vt)Jt[Vt]=8;var Qt=new Mt(32);for(Vt=0;Vt<32;++Vt)Qt[Vt]=5;var Xt=Wt(Jt,9,0),Yt=Wt(Qt,5,0),Zt=function(e){return(e+7)/8|0},$t=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},en=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},tn=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var i=n.length,o=n.slice();if(!i)return[un,0];if(1==i){var a=new Mt(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],u=0,l=1,d=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=i-1;)s=n[n[u].f<n[d].f?u++:d++],c=n[u!=l&&n[u].f<n[d].f?u++:d++],n[l++]={s:-1,f:s.f+c.f,l:s,r:c};var h=o[0].s;for(r=1;r<i;++r)o[r].s>h&&(h=o[r].s);var f=new Dt(h+1),p=nn(n[l-1],f,0);if(p>t){r=0;var g=0,v=p-t,m=1<<v;for(o.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<i;++r){var y=o[r].s;if(!(f[y]>t))break;g+=m-(1<<p-f[y]),f[y]=t}for(g>>>=v;g>0;){var b=o[r].s;f[b]<t?g-=1<<t-f[b]++-1:++r}for(;r>=0&&g;--r){var E=o[r].s;f[E]==t&&(--f[E],++g)}p=t}return[new Mt(f),p]},nn=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},rn=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Dt(++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]},on=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},an=function(e,t,n){var r=n.length,i=Zt(t+2);e[i]=255&r,e[i+1]=r>>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<r;++o)e[i+o+4]=n[o];return 8*(i+4+r)},sn=function(e,t,n,r,i,o,a,s,c,u,l){$t(t,l++,n),++i[256];for(var d=tn(i,15),h=d[0],f=d[1],p=tn(o,15),g=p[0],v=p[1],m=rn(h),y=m[0],b=m[1],E=rn(g),w=E[0],I=E[1],C=new Dt(19),T=0;T<y.length;++T)C[31&y[T]]++;for(T=0;T<w.length;++T)C[31&w[T]]++;for(var _=tn(C,7),k=_[0],S=_[1],A=19;A>4&&!k[Ft[A-1]];--A);var O,R,N,P,M=u+5<<3,D=on(i,Jt)+on(o,Qt)+a,L=on(i,h)+on(o,g)+a+14+3*A+on(C,k)+(2*C[16]+3*C[17]+7*C[18]);if(M<=D&&M<=L)return an(t,l,e.subarray(c,c+u));if($t(t,l,1+(L<D)),l+=2,L<D){O=Wt(h,f,0),R=h,N=Wt(g,v,0),P=g;var x=Wt(k,S,0);for($t(t,l,b-257),$t(t,l+5,I-1),$t(t,l+10,A-4),l+=14,T=0;T<A;++T)$t(t,l+3*T,k[Ft[T]]);l+=3*A;for(var U=[y,w],F=0;F<2;++F){var B=U[F];for(T=0;T<B.length;++T){var H=31&B[T];$t(t,l,x[H]),l+=k[H],H>15&&($t(t,l,B[T]>>>5&127),l+=B[T]>>>12)}}}else O=Xt,R=Jt,N=Yt,P=Qt;for(T=0;T<s;++T)if(r[T]>255){H=r[T]>>>18&31,en(t,l,O[H+257]),l+=R[H+257],H>7&&($t(t,l,r[T]>>>23&31),l+=xt[H]);var q=31&r[T];en(t,l,N[q]),l+=P[q],q>3&&(en(t,l,r[T]>>>5&8191),l+=Ut[q])}else en(t,l,O[r[T]]),l+=R[r[T]];return en(t,l,O[256]),l+R[256]},cn=new Lt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),un=new Mt(0),ln=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}(),dn=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function hn(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=ln[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}(),r=e.length;n.p(e);var i,o,a,s=(i=e,o=t,a=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8,function(e,t,n,r,i,o){var a=e.length,s=new Mt(r+a+5*(1+Math.ceil(a/7e3))+i),c=s.subarray(r,s.length-i),u=0;if(!t||a<8)for(var l=0;l<=a;l+=65535){var d=l+65535;d>=a&&(c[u>>3]=o),u=an(c,u+1,e.subarray(l,d))}else{for(var h=cn[t-1],f=h>>>13,p=8191&h,g=(1<<n)-1,v=new Dt(32768),m=new Dt(g+1),y=Math.ceil(n/3),b=2*y,E=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&g},w=new Lt(25e3),I=new Dt(288),C=new Dt(32),T=0,_=0,k=(l=0,0),S=0,A=0;l<a;++l){var O=E(l),R=32767&l,N=m[O];if(v[R]=N,m[O]=R,S<=l){var P=a-l;if((T>7e3||k>24576)&&P>423){u=sn(e,c,0,w,I,C,_,k,A,l-A,u),k=T=_=0,A=l;for(var M=0;M<286;++M)I[M]=0;for(M=0;M<30;++M)C[M]=0}var D=2,L=0,x=p,U=R-N&32767;if(P>2&&O==E(l-U))for(var F=Math.min(f,P)-1,B=Math.min(32767,l),H=Math.min(258,P);U<=B&&--x&&R!=N;){if(e[l+D]==e[l+D-U]){for(var q=0;q<H&&e[l+q]==e[l+q-U];++q);if(q>D){if(D=q,L=U,q>F)break;var K=Math.min(U,q-2),G=0;for(M=0;M<K;++M){var j=l-U+M+32768&32767,V=j-v[j]+32768&32767;V>G&&(G=V,N=j)}}}U+=(R=N)-(N=v[R])+32768&32767}if(L){w[k++]=268435456|Kt[D]<<18|Gt[L];var z=31&Kt[D],W=31&Gt[L];_+=xt[z]+Ut[W],++I[257+z],++C[W],S=l+D,++T}else w[k++]=e[l],++I[e[l]]}}u=sn(e,c,o,w,I,C,_,k,A,l-A,u),!o&&7&u&&(u=an(c,u+1,un))}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?Dt:4==e.BYTES_PER_ELEMENT?Lt:Mt)(n-t);return r.set(e.subarray(t,n)),r}(s,0,r+Zt(u)+i)}(i,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(i.length)))):12+o.mem,a,8,!0)),c=s.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&dn(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(s,t),dn(s,c-8,n.d()),dn(s,c-4,r),s}var fn="undefined"!=typeof TextDecoder&&new TextDecoder;try{fn.decode(un,{stream:!0})}catch(ii){}function pn(){return"undefined"!=typeof window&&"function"==typeof window.fetch}function gn(){try{return pn()&&"keepalive"in new Request("")}catch(e){return!1}}function vn(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);i<o.length;i++){var a=o[i];r.setRequestHeader(a,n.headers[a])}r.send(t)}}function mn(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=hn((new TextEncoder).encode(t)),r["content-encoding"]="gzip"}catch(e){}return{body:o,keepalive:n,credentials:"include",headers:r,method:"POST",mode:"cors"}}function yn(e){return e&&"message"in e?e.message:"UNKNOWN_ERROR"}var bn,En="undefined"!=typeof navigator&&"sendBeacon"in navigator,wn=gn()?function(e,t,n,r){return new Promise((function(i){fetch(e,mn({body:t,keepalive:!0,headers:n,compress:r})).catch((function(){return fetch(e,mn({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:yn(e)})}))}))}:function(e,t,n,r){return new Promise((function(i){if(En){var o=!1;try{o=navigator.sendBeacon(e,t)}catch(e){}if(o)return void i({type:"unknown",drop:!1})}fetch(e,mn({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:yn(e)})}))}))};function In(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 Cn(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 bn||(bn=Cn("idb-queue","default")),bn}function _n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=0,r=null;return e.openKeyCursor().onsuccess=function(){var i=this.result;i&&n++<t.batchEvictionNumber?(r=i.key,i.continue()):null!=r&&e.delete(IDBKeyRange.upperBound(r))},In(e.transaction)}function kn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{maxNumber:1e3,batchEvictionNumber:300},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tn();return t("readwrite",(function(t){return _n(t,e)}))}var Sn=!1;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 n("readwrite",(function(n){return n.put(e),In(n.count()).then((function(e){if(!(e<=t.maxNumber))return _n(n,t)}))})).catch((function(e){if(e&&"QuotaExceededError"===e.name)return kn(t,n)}))}function On(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 Sn?Promise.resolve():An(e,t,n)}function Rn(e,t,n){return t("readwrite",(function(t){var r=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(r.push(t.value),t.delete(),(e<0||r.length<e)&&t.continue())},In(t.transaction).then((function(){return r}))}))}function Nn(e,t,n){return t("readonly",(function(t){var r=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(r.push(t.value),(e<0||r.length<e)&&t.continue())},In(t.transaction).then((function(){return r}))}))}function Pn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tn();return Nn(e,t,"next")}function Mn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tn();return Nn(e,t,"prev")}function Dn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,r=arguments.length>3?arguments[3]:void 0;return!t||n<1||(e[t]=JSON.stringify({attempt:n,errorCode:r})),e}function Ln(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function xn(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.error("[beacon-transporter] ",e())}function Un(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{timeRemaining:5,timeout:1e4};if("undefined"==typeof requestIdleCallback)setTimeout(e,t.fallbackTimeout||10);else{var n=function n(){requestIdleCallback((function(r){r.timeRemaining()>t.timeRemaining||r.didTimeout?e():n()}),{timeout:t.timeout})};n()}}function Fn(e,t){var n=0;return{throttledFn:function(){var r=Date.now();r-n>t&&(Ln((function(){return"[throttle] Run fn() at "+String(r)})),e(),n=r)},resetThrottle:function(){n=0}}}var Bn=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];De(this,e),Ue(this,"config",void 0),Ue(this,"compress",void 0),Ue(this,"throttleControl",void 0),Ue(this,"withStore",void 0),Ue(this,"disablePersistence",!1),this.config=t,this.compress=r;var i=t.measureIDB;i&&performance.mark(i.createStartMark),this.withStore=Cn(t.idbName,"beacons","timestamp",{onSuccess:function(){i&&performance.measure(i.createSuccessMeasure,i.createStartMark)},onError:function(){i&&performance.measure(i.createFailMeasure,i.createStartMark),n.disablePersistence=!0}}),this.throttleControl=Fn(this.replayEntries.bind(this),t.throttleWait)}return xe(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})),On(e,t.config,t.withStore).then((function(){t.throttleControl.resetThrottle(),Ln((function(){return"push completed"}))})).catch((function(){t.disablePersistence=!0,xn((function(){return"push failed"}))}))};this.config.useIdle?Un(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 Sn=!0,e("readwrite",(function(e){return e.clear(),In(e.transaction).finally((function(){return Sn=!1}))}))}(this.withStore).catch((function(){e.disablePersistence=!0,xn((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([]):Pn(t,this.withStore).catch((function(){return e.disablePersistence=!0,xn((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([]):Mn(t,this.withStore).catch((function(){return e.disablePersistence=!0,xn((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(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tn();return Rn(e,t,"next")}(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,u=i.statusCode,l=i.attemptCount;return Ln((function(){return"header: ".concat(String(e.config.headerName),"; attemptCount: ").concat(l)})),null===(n=(r=e.config).onBeforeRetry)||void 0===n||n.call(r,a),wn(o,a,Dn(s,e.config.headerName,l,u),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(l+1>e.config.attemptLimit)return Ln((function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:o,timestamp:c,statusCode:u},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:u},null,2)})),On({url:o,body:a,timestamp:c,statusCode:u,attemptCount:l+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&&xn((function(){return"Replay entry failed: ".concat(t.message)}))}))};this.config.useIdle?Un(t):t()}}}]),e}(),Hn=function(){function e(){De(this,e)}return xe(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}(),qn=function(){function e(t,n){De(this,e),Ue(this,"queue",void 0),Ue(this,"beaconListeners",new Set),this.queue=e.hasSupport&&!n.disablePersistenceRetry?new Bn(t,n.compress):new Hn}return xe(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}();Ue(qn,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var Kn=[502,504],Gn=[429,503],jn=function(){function e(t,n,r,i){var o=this,a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];De(this,e),Ue(this,"url",void 0),Ue(this,"body",void 0),Ue(this,"config",void 0),Ue(this,"persistenceConfig",void 0),Ue(this,"compress",void 0),Ue(this,"timestamp",void 0),Ue(this,"isClearQueuePending",!1),Ue(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 xe(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 wn(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(Dn(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 u,l;null===(u=(l=i.config).onIntermediateResult)||void 0===u||u.call(l,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}();function Vn(e,t,n,r,i){"control"!==r&&e.retryConfig&&function(){if("undefined"==typeof Promise||"undefined"==typeof navigator)return!1;var e=navigator.userAgent.indexOf("Chrome")>-1,t=navigator.cookieEnabled,n=navigator.storage;return e&&gn()&&t&&n}()&&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)}}))}("beacons");var a,s,c=null!==(a=e.retryConfig.inMemory)&&void 0!==a?a:{attemptLimit:4,statusCodes:[502,504]},u=null!==(s=e.retryConfig.persist)&&void 0!==s?s:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},l={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:"beacons",attemptLimit:u.attemptLimit,statusCodes:u.statusCodes,maxNumber:u.maxNumber,batchEvictionNumber:u.batchEvictionNumber,throttleWait:u.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:Kn,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 qn(i,{compress:t.compress,disablePersistenceRetry:t.disablePersistenceRetry})}return{beacon:function(i,o,a){var s;return pn()?new jn(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}}(l),h=d.beacon,f=d.database;return e.retryBeacon={shouldRetry:!0,beacon:h,database:f},"enabled"===r?(e.retryBeacon.shouldRetry=!1,!l.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){Nt.emit("internal:error",{tags:["core-web-tracking:retry:idb"],reason:e})})):(e.retryBeacon.shouldRetry=!0,Promise.resolve())):void 0})).catch((function(e){Nt.emit("internal:error",{tags:["core-web-tracking:retry:setup"],reason:e})}))}var zn=function(){function e(t){De(this,e),Ue(this,"host",void 0),this.host=t}return xe(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&&Vn(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){Nt.emit("internal:error",{tags:["core-web-tracking:retry:logout"],reason:e})}))}},{key:"sendPayload",value:function(e,t,n,r){var i,o=this.getRetryTreatment();gn()&&"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){Nt.emit("internal:error",{tags:["core-web-tracking:retry:beacon"],reason: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;if(!Array.isArray(t)||t.length>0){var i="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1;i||!pn()||"undefined"==typeof Promise?vn(e,JSON.stringify(t),{headers:n}):wn(e,JSON.stringify(t),n,this.shouldCompressPayload()).then((function(e){null==r||r.onResult(e,t)}),(function(){}))}}},{key:"getRetryTreatment",value:function(){var e,t,n;if(!this.host.retryConfig)return"control";var r=this.host.retryConfig.lixKey;return r?null!==(e=null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,r))&&void 0!==e?e:"control":"enabled"}},{key:"shouldCompressPayload",value:function(){return!0!==this.host.disableCompression}}]),e}(),Wn="undefined"!=typeof window&&"undefined"!=typeof document,Jn=/JSESSIONID="?([^";]+)"?/,Qn="",Xn=0;function Yn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheLifeSpan,n=void 0===t?1e4:t,r=e.regex,i=void 0===r?Jn:r;if(!Qn||Date.now()-Xn>n){var o=Wn&&document.cookie.match(i);Qn=o&&o[1]||"",Xn=Date.now()}return Qn}var Zn=function(){function e(t){De(this,e),Ue(this,"networkTransporter",void 0),Ue(this,"inactive",void 0),Ue(this,"mpName",void 0),Ue(this,"endpoint",void 0),Ue(this,"debug",void 0),this.networkTransporter=new zn(t),this.mpName=t.appId,this.inactive=t.inactive;var n=function(e){var t,n=!1;switch(e){case"https://www.linkedin.com/li/track":t=er;break;default:n=!0,t=$n;break;case"https://www.linkedin-ei.com/li/track":t=$n}return{endpoint:t,debug:n}}(t.endpoint);this.endpoint=n.endpoint,this.debug=n.debug}return xe(e,[{key:"fireFragment",value:function(e){if(!this.inactive){var t={"content-type":"application/json; charset=UTF-8","x-li-track":JSON.stringify({mpName:this.mpName}),"csrf-token":Yn(),"x-restli-protocol-version":"2.0.0"},n={fragmentEvent:e,debug:this.debug};this.networkTransporter.sendPayload(this.endpoint,n,t)}}}]),e}(),$n="https://www.linkedin-ei.com/trackingMonitoring/?action=saveClientFragment",er="https://www.linkedin.com/trackingMonitoring/?action=saveClientFragment";function tr(e){return"string"==typeof e}function nr(e){return tr(e)?e:e.topicName||e.eventName}function rr(e){return tr(e)?e:e.eventName}var ir,or,ar=function(){function e(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};De(this,e),Ue(this,"host",void 0),Ue(this,"cmoTransporter",void 0),Ue(this,"clientMonitoringInstanceId",gt()),Ue(this,"currentContext",ur()),Ue(this,"appState",{}),Ue(this,"estimatedFragmentSize",0),Ue(this,"fragmentSizeLimit",void 0),Ue(this,"activeFragmentEvent",void 0),Ue(this,"debounceTimer",void 0),this.host=t,this.cmoTransporter=r.cmoTransporter||new Zn(t),this.fragmentSizeLimit=(null===(n=t.clientMonitoringConfig)||void 0===n?void 0:n.fragmentSizeLimit)||10240,this.activeFragmentEvent=cr(this.clientMonitoringInstanceId,0,0,!1,this.getEventHeaders())}return xe(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=Me(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:rr(t),eventTopic:nr(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(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e||this.fragmentIsFull()){this.debounceTimer=void 0;var t=this.getEventHeaders(),n=t.header,r=t.requestHeader,i=this.activeFragmentEvent;i.header=n,i.requestHeader=r,this.cmoTransporter.fireFragment(i),this.estimatedFragmentSize=0,this.activeFragmentEvent=cr(this.clientMonitoringInstanceId,i.fragmentNumber+1,i.firstEventNumber+i.stats.eventsGenerated,!1,t)}}},{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=lr(e.trackingId));var t=this.currentContext.pageInstance;return t.trackingId=lr(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:"0000000000000000"}}}}]),e}();function sr(e){return ir||(ir=new ar(e)),{getCurrentInstanceId:function(){return ir.getCurrentInstanceId()},logEventGenerated:function(e){return ir.logEventGenerated(e)},logEventReadyToSend:function(e){ir.logEventReadyToSend(e)},logEventSent:function(e){ir.logEventSent(e)},logPersistedEventSent:function(e,t){ir.logEventSent(t,e)},logNetworkResponseCode:function(e){ir.logNetworkResponseCode(e)},logPersistedNetworkResponseCode:function(e,t){var n;null===(n=ir)||void 0===n||n.logNetworkResponseCode(t,e)},logFailedEvent:function(e,t,n,r){ir.logFailedEvent(e,t,n,r)},logPersistedFailedEvent:function(e,t,n,r,i){ir.logFailedEvent(t,n,r,i,e)},flush:function(){ir.flush()},destroy:function(){ir=void 0},isDestroyed:function(){return void 0===ir},setCurrentContext:function(e){ir.setCurrentContext(e)},updateAppState:function(e){ir.updateAppState(e)}}}function cr(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 ur(){return{pageKey:"unknown",pageInstance:Et("unknown")}}function lr(e){return Array.isArray(e)?pt(e):16===e.length?e:function(e){return"string"==typeof e&&!!e.match(vt)}(e)?atob(e):pt(bt(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"}(or||(or={}));var dr="PageViewEvent",hr=function(){function e(t){var n=this;De(this,e),Ue(this,"host",void 0),Ue(this,"queue",void 0),Ue(this,"preContextQueue",void 0),Ue(this,"debounceTimer",void 0),Ue(this,"unloadHandlers",void 0),Ue(this,"maxQueueSize",void 0),Ue(this,"flushDebounceTime",void 0),Ue(this,"trackingEventListeners",[]),Ue(this,"onHideHandler",(function(){n.forceFlush()})),Ue(this,"networkTransporter",void 0),Ue(this,"clientMonitoringConn",void 0),Ue(this,"clientSequenceNumberCounter",void 0),Ue(this,"isTimerRunning",void 0),Ue(this,"enableSequenceNumberLix",void 0),this.host=t,this.queue=[],this.preContextQueue=[],this.unloadHandlers=[];var r=t.batching;this.maxQueueSize=r&&r.maxSize||1,this.flushDebounceTime=r&&r.debounceTime||0,Nt.on("internal:hide",this.onHideHandler),this.networkTransporter=new zn(t),this.isLixEnabled("pemberly.tracking.monitoring")&&t.clientMonitoringConfig&&!t.inactive&&(this.clientMonitoringConn=sr(t)),this.enableSequenceNumberLix=this.isLixEnabled("tracking.data-loss-web.sequence-number"),this.enableSequenceNumberLix&&(this.getSequenceNumberFromIDB(),this.updateSequenceNumberOnExit(),this.isTimerRunning=!1)}return xe(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(or.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,or.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(nr(e.id)));var n,r=this.host,i=r.api.Promise,o=r.batching;return function(e){return!!e.meta.context}(t)?(this.prepareCompleteEnvelopeQueue(t),null===(n=this.clientMonitoringConn)||void 0===n||n.logEventReadyToSend(1),o?(this.batchFire(),i.resolve(!0)):(this.flush(!0),i.resolve(!0))):(this.preContextQueue.push(t),i.resolve(!0))}},{key:"callOnDestroy",value:function(e){this.unloadHandlers.push(e)}},{key:"destroy",value:function(){this.unloadHandlers.forEach((function(e){return e()})),this.forceFlush(),this.trackingEventListeners=[],this.clientMonitoringConn=void 0,Nt.off("internal:hide",this.onHideHandler)}},{key:"forceFlush",value:function(){var e=this;this.populatePreContextQueue({pageInstance:Et("unknown"),pageKey:"unknown"}).forEach((function(t){return e.queue.push(t)})),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;kt("read").then((function(t){e.clientSequenceNumberCounter=t||0})).catch((function(e){Nt.emit("internal:error",{tags:["core-web-tracking:sequence-number:idb-read"],reason:e})}))}},{key:"updateSequenceNumberToIDB",value:function(){kt("update",this.clientSequenceNumberCounter).catch((function(e){Nt.emit("internal:error",{tags:["core-web-tracking:sequence-number:idb-update"],reason: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=Ct(e.meta.context,this.host.api);"function"==typeof e.body&&(e.body=e.body(n)),this.preContextQueue.length>0&&this.populatePreContextQueue(n).forEach((function(e){return t.queue.push(e)})),this.queue.push(e)}},{key:"envelop",value:function(e,t,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,u=e.meta.context,l=u.pageKey,d=u.pageInstance,h=function(e){return"string"==typeof e?e===dr:e.eventName===dr}(e.id)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||l,f=null;"string"!=typeof i&&null!==this.host.locale||(f=i);var p={interfaceLocale:f,pageKey:h,path:a.pathname+a.search,referer:s.referrer},g={pageInstance:d,time:e.meta.time,version:r};"number"==typeof this.clientSequenceNumberCounter&&c(g,{clientGlobalSequenceNumber:this.clientSequenceNumberCounter});var v={header:c(g,e.meta.header||{}),requestHeader:c(p,e.meta.requestHeader||{})},m=e.meta.clientMonitoringInstanceId,y=e.meta.clientMonitoringInstanceEventNumber;return m&&c(v.header,{clientMonitoringInstanceId:m,clientMonitoringInstanceEventNumber:y}),c(e.body,v)}},{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()}),{timeout:1e4})}},{key:"flush",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=this.host.api.requestIdleCallback;e||!t?this.sendPayload():this.requestFlush(t)}},{key:"batchFire",value:function(){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(){var e=this,t=this.queue;if(0!==t.length){this.enableSequenceNumberLix&&"undefined"!=typeof window&&!1===this.isTimerRunning&&(this.isTimerRunning=!0,setInterval((function(){e.updateSequenceNumberToIDB()}),5e3)),this.queue=[];var n,r,i=[],o=[];t.forEach((function(t){var n=e.getGenericEventBody(t),r=e.getBreadcrumbs(t),a=e.envelop(t.id,n,r);e.trigger(a,t.meta);var s=a.eventInfo.eventName;"LixTreatmentsEvent"===s||"JavaScriptErrorEvent"===s?i.push(a):o.push(a),e.enableSequenceNumberLix&&"number"==typeof e.clientSequenceNumberCounter&&e.clientSequenceNumberCounter++})),this.host.inactive||(this.clientMonitoringConn&&(this.clientMonitoringConn.logEventSent(i.length+o.length),r=this.clientMonitoringConn,n={onResult:function(e,t){r&&!r.isDestroyed()&&(e.statusCode&&r.logNetworkResponseCode(e.statusCode),!0===e.drop&&t.forEach((function(t){var n=t.eventInfo.eventName,i=t.eventInfo.topicName||n,o="rawError"in e?e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(o)].join(", ");null==r||r.logFailedEvent(or.UNKNOWN_EXECUTION_ERROR,{eventName:n,topicName:i},a,t.eventBody.header.clientMonitoringInstanceEventNumber||-1)})))}}),this.networkTransporter.sendPayloadFireForget(this.host.endpoint,i,void 0,n),this.networkTransporter.sendPayload(this.host.endpoint,o,void 0,n))}}}]),e}();var fr,pr=function(){function e(t,n){De(this,e),this.clientBreadcrumbType=t,this.id=n}return xe(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 gr(e){if(!e)return{};var t=e.trk,n=!1,r=e.licu&&decodeURIComponent(e.licu);e.external_control&&(r="urn:li:externalControl:".concat(decodeURIComponent(e.external_control)),n=!0);var i=e.lipi&&function(e){var t=decodeURIComponent(e).split(";");if(t.length>1)return{pageUrn:t[0],trackingId:t[1]}}(e.lipi),o=i&&{pageInstance:i,pageKey:t}||t&&{pageKey:t};if(e.external_page&&e.external_page_instance){var a=decodeURIComponent(e.external_page);o={pageInstance:{pageUrn:"urn:li:externalPage:".concat(a),trackingId:e.external_page_instance},pageKey:a},n=!0}var s=e.external_app&&e.external_app_instance?{applicationUrn:"urn:li:externalApplication:".concat(decodeURIComponent(e.external_app)),trackingId:e.external_app_instance,version:""}:void 0;return s&&((o=o||{}).applicationInstance=s),{fromExternalApp:n||!!s,previousApplicationInstance:s,previousContext:o,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:r}}function vr(e){return"retryConfig"in e.host}!function(e){e.UNKNOWN="UNKNOWN",e.ME_NOTIFICATION="ME_NOTIFICATION",e.ME_NOTIFICATION_ACTION="ME_NOTIFICATION_ACTION"}(fr||(fr={}));var mr=function(){function e(t,n){var r,i;if(De(this,e),Ue(this,"transporter",void 0),Ue(this,"delegate",void 0),Ue(this,"currentContext",void 0),Ue(this,"appState",void 0),Ue(this,"previousAppContext",void 0),Ue(this,"customTransporters",void 0),Ue(this,"clientMonitoringConn",void 0),this.transporter=t,this.delegate=n,this.appState={},this.customTransporters={},n&&n.customTransporterHosts)for(var o in n.customTransporterHosts)if(Object.prototype.hasOwnProperty.call(n.customTransporterHosts,o)){var a=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[o]=new hr(this.transporter.host.api.assign(a,n.customTransporterHosts[o]))}"enabled"===(null===(r=(i=t.host).__getLixTreatment)||void 0===r?void 0:r.call(i,"pemberly.tracking.monitoring"))&&t.host.clientMonitoringConfig&&!t.host.inactive&&"location"in t.host.api&&(this.clientMonitoringConn=sr(t.host))}return xe(e,[{key:"host",get:function(){return this.transporter.host}},{key:"checkAndEnablePersistentRetry",value:function(){vr(this.transporter)&&this.transporter.checkAndEnablePersistentRetry(this.delegate)}},{key:"flushAndClearPersistedEventsOnLogout",value:function(){this.forceFlush();var e=vr(this.transporter)?this.transporter.clearPersistedEventsOnLogout():null;return null!=e?e:this.host.api.Promise.resolve()}},{key:"getCurrentContext",value:function(){if(this.currentContext)return Ct(this.currentContext,this.host.api)}},{key:"navigate",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.navMetaFromSeed(e,gr(t));if(this.setCurrentContext(r.to),!n.suppressEventsFiring)return this.fireNavEvents(r)}},{key:"setCurrentContext",value:function(e){var t;this.currentContext=Ct(e,this.host.api),null===(t=this.clientMonitoringConn)||void 0===t||t.setCurrentContext(Ct(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=wt(n.pageKey,e),a={controlTrackingId:r,controlUrn:o,interactionType:t};return i&&i(o),a}),{context:n})}},{key:"fireEvent",value:function(e,t,n,r){if(!t){var i=nr(e),o=void 0===t?"undefined":null===t?"null":qe(t),a='Firing tracking event "'.concat(i,'" with invalid body, you fired "').concat(o,'"');if(this.clientMonitoringConn){var s=this.clientMonitoringConn.logEventGenerated(i);this.clientMonitoringConn.logFailedEvent(or.MISSING_REQUIRED_PROPERTIES,e,a,s)}throw new Error(a)}var c=r||[];if(c.length>0){var u=c.map((function(e){return pr.toPointer(e)}));this.host.api.assign(t,{clientBreadcrumbPointers:u})}var l=c.length>0?this.generateEnvelopeWithBreadcrumbs(e,t,n,c):this.generateEnvelope(e,t,n);return this.fireEnvelope(l)}},{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=this.generateEnvelope(e,t,n),o=r.length>0?this.addBreadcrumbsToEnvelope(i,r):i;return o}},{key:"addBreadcrumbsToEnvelope",value:function(e,t){var n=t.map((function(e){var t=e;return delete t.clientBreadcrumbType,t}));return this.host.api.assign(e,{clientBreadcrumbs:n}),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(tr(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=nr(i.id),c="Could not find custom transporter: ".concat(o);if(this.clientMonitoringConn){var u=this.clientMonitoringConn.logEventGenerated(s);this.clientMonitoringConn.logFailedEvent(or.UNKNOWN_EXECUTION_ERROR,i.id,c,u)}throw new Error(c)}return a.fireEvent(i)}return this.host.api.Promise.resolve(!0)}},{key:"generatePageInstance",value:function(e,t){return Et(e,t)}},{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),Nt.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 wt((t||this.currentContext||{pageKey:"unknown"}).pageKey,e)}},{key:"fireRawCIE",value:function(e,t,n,r){var i={controlTrackingId:r,controlUrn:e,interactionType:t};return{beacon:this.fireEvent("ControlInteractionEvent",i,{context:n}),controlUrn:e}}},{key:"generateNavigationEvent",value:function(e){var t=e.triggerId,n=e.triggerUrn,r=e.from;return{previousPageInstance:r&&r.pageInstance,triggerControlTrackingId:t,triggerControlUrn:n}}},{key:"getTrackingCode",value:function(){return this.previousAppContext&&this.previousAppContext.pageKey}},{key:"navMetaFromSeed",value:function(e,t){var n="NavigationEvent";this.previousAppContext=t.previousContext;var r=t.fromExternalApp?{eventName:n,topicName:"InboundNavigationEvent"}:n;return{from:t.previousContext,navEventId:r,to:{applicationInstance:t.applicationInstance,pageInstance:this.generatePageInstance(e,t.pageTrackingId),pageKey:e},triggerId:t.previousControlId,triggerUrn:t.previousControlUrn}}},{key:"fireNavEvents",value:function(e){var t=this.generateNavigationEvent(e),n=e.to,r=e.from,i=e.navEventId,o=this.generateEnvelope(i,t);o.meta.requestHeader.pageKey=n.pageKey;var a=r&&r.applicationInstance;return a&&(o.meta.header.clientApplicationInstance=a),this.host.api.Promise.all([this.firePVE(n.pageKey),this.fireEnvelope(o)])}},{key:"generateEnvelope",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={directive:n.directive,transporterKey:n.transporterKey,context:n.context||this.currentContext&&Ct(this.currentContext,this.host.api),requestHeader:this.host.api.assign({trackingCode:this.getTrackingCode()},n.requestHeader||{}),header:this.host.api.assign({applicationViewerUrn:this.appState.applicationViewerUrn,clientApplicationInstance:this.appState.clientApplicationInstance},n.header||{})};return{body:"function"==typeof t?t:function(){return t},id:e,meta:r}}}]),e}();function yr(e){return e.split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0)}var br,Er,wr,Ir=function(){function e(t,n){var r,i=this;De(this,e),Ue(this,"core",void 0),Ue(this,"protocol",void 0),Ue(this,"throttleKeySet",new Set),Ue(this,"config",void 0),Ue(this,"reportTransporterError",(function(e){e.reason instanceof Error||(e.reason=new Error(e.reason||"An error occurred in the transporter")),i.reportError(e.reason,e.tags.concat(["info"])).catch((function(){}))})),this.core=t;var o=this.core.host.api.location.protocol;this.protocol=o.substring(0,o.length-1),this.config={throttleTime:null!==(r=null==n?void 0:n.throttleTime)&&void 0!==r?r:100},Nt.on("internal:error",this.reportTransporterError)}return xe(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,u=e.message,l=e.name,d=e.stack,h=void 0===d?"":d,f=e.fileName,p=void 0===f?"":f,g=e.lineNumber,v=void 0===g?0:g,m=e.columnNumber,y=void 0===m?0:m,b=this.core.host,E=b.appId,w=b.appVersion,I=b.service,C=b.serviceInstance,T=b.treeID,_=void 0===T?"":T,k=b.api,S=k.Promise,A=k.location,O=A.host,R=A.pathname,N=A.search,P=A.hash,M=void 0===P?"":P;if(c){t={};var D=new Map;Object.keys(c).forEach((function(e){D.set(e.toLowerCase(),c[e])})),t.callTreeId=D.get("x-li-uuid"),t.microsoftEdgeReference=D.get("x-msedge-ref"),t.pointOfPresenceId=D.get("x-li-pop"),t.fabric=D.get("x-li-fabric")}var L=function(){return n.core.fireEvent("JavaScriptErrorEvent",(function(e){return{appId:E,e:{c:y,l:v,m:u,s:h,t:l,u:p},h:M,l:n.protocol,o:O,p:R,pageKey:e.pageKey,q:N,service:I,serviceInstance:C,serviceVersion:w,t:r,trackingID:e.pageInstance.trackingId,treeID:_,callTreeId:a,responseTraceHeaders:t}}))};if(this.config.throttleTime<0)return L();var x=yr(l+u+h+r.join("")+a);return this.throttleKeySet.has(x)?S.resolve(!1):(this.throttleKeySet.add(x),setTimeout((function(){return n.throttleKeySet.delete(x)}),this.config.throttleTime),L())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),Nt.off("internal:error",this.reportTransporterError)}}]),e}(),Cr=function(){function e(){De(this,e),Ue(this,"userTimingEntries",[]),Ue(this,"longTasks",[]),Ue(this,"resourceTimingEntries",[]),Ue(this,"cdnData",void 0)}return xe(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(_r),cdnData:this.cdnData}}}]),e}(),Tr=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function _r(e){return Tr.reduce((function(t,n){var r=e[n];return void 0!==r&&(t[n]=r),t}),{})}function kr(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};Er=Object.assign(Object.assign({},n),t),wr=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}(Er.root,n);var r=Sr(e,br.All,(function(){return Sr(e,br.Two,(function(){return Sr(e,br.One)}))}));if(r){var i=Ur(Fr(r,e));return i.length>0&&(r=i[0]),Or(r)}throw new Error("Selector was not found.")}function Sr(e,t,n){for(var r=null,i=[],o=e,a=0,s=function(){var e=Dr(function(e){var t=e.getAttribute("id");return t&&Er.idName(t)?{name:"#"+Vr(t,{isIdentifier:!0}),penalty:0}:null}(o))||Dr.apply(void 0,Fe(function(e){return Array.from(e.attributes).filter((function(e){return Er.attr(e.name,e.value)})).map((function(e){return{name:"["+Vr(e.name,{isIdentifier:!0})+'="'+Vr(e.value)+'"]',penalty:.5}}))}(o)))||Dr.apply(void 0,Fe(function(e){return Array.from(e.classList).filter(Er.className).map((function(e){return{name:"."+Vr(e,{isIdentifier:!0}),penalty:1}}))}(o)))||Dr(function(e){var t=e.tagName.toLowerCase();return Er.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===br.All)s&&(e=e.concat(e.filter(Mr).map((function(e){return Pr(e,s)}))));else if(t===br.Two)e=e.slice(0,1),s&&(e=e.concat(e.filter(Mr).map((function(e){return Pr(e,s)}))));else if(t===br.One){var c=Pe(e=e.slice(0,1),1)[0];s&&Mr(c)&&(e=[Pr(c,s)])}var u,l=Me(e);try{for(l.s();!(u=l.n()).done;)u.value.level=a}catch(e){l.e(e)}finally{l.f()}if(i.push(e),i.length>=Er.seedMinLength&&(r=Ar(i,n)))return"break";o=o.parentElement,a++};o&&o!==Er.root.parentElement&&"break"!==s(););return r||(r=Ar(i,n)),r}function Ar(e,t){var n=Ur(xr(e));if(n.length>Er.threshold)return t?t():null;var r,i=Me(n);try{for(i.s();!(r=i.n()).done;){var o=r.value;if(Nr(o))return o}}catch(e){i.e(e)}finally{i.f()}return null}function Or(e){for(var t=e[0],n=t.name,r=1;r<e.length;r++){var i=e[r].level||0;n=t.level===i-1?"".concat(e[r].name," > ").concat(n):"".concat(e[r].name," ").concat(n),t=e[r]}return n}function Rr(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function Nr(e){switch(wr.querySelectorAll(Or(e)).length){case 0:throw new Error("Can't select any node with this selector: ".concat(Or(e)));case 1:return!0;default:return!1}}function Pr(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function Mr(e){return"html"!==e.name&&!e.name.startsWith("#")}function Dr(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=t.filter(Lr);return r.length>0?r:null}function Lr(e){return null!=e}function xr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length>0){var n,r=[],i=Me(e[0]);try{for(i.s();!(n=i.n()).done;){var o=n.value;r=r.concat(xr(e.slice(1,e.length),t.concat(o)))}}catch(e){i.e(e)}finally{i.f()}return r}return[t]}function Ur(e){return Array.from(e).sort((function(e,t){return Rr(e)-Rr(t)}))}function Fr(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>Er.optimizedMinLength)for(var i=1;i<e.length-1;i++){if(n.counter>Er.maxNumberOfTries)return r;n.counter+=1;var o=Fe(e);o.splice(i,1);var a=Or(o);if(n.visited.has(a))return r;Nr(o)&&Br(o,t)&&(r.push(o),n.visited.set(a,!0),r=r.concat(Fr(o,t,n)))}return r}function Br(e,t){return wr.querySelector(Or(e))===t}!function(e){e[e.All=0]="All",e[e.Two=1]="Two",e[e.One=2]="One"}(br||(br={}));var Hr,qr=/[ -,\.\/:-@\[-\^`\{-~]/,Kr=/[ -,\.\/:-@\[\]\^`\{-~]/,Gr=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,jr={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Vr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},jr),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;s<c;){var u=e.charAt(s++),l=u.charCodeAt(0),d=void 0;if(l<32||l>126){if(l>=55296&&l<=56319&&s<c){var h=e.charCodeAt(s++);56320==(64512&h)?l=((1023&l)<<10)+(1023&h)+65536:s--}d="\\"+l.toString(16).toUpperCase()+" "}else d=n.escapeEverything?qr.test(u)?"\\"+u:"\\"+l.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(u)?"\\"+l.toString(16).toUpperCase()+" ":"\\"==u||!i&&('"'==u&&r==u||"'"==u&&r==u)||i&&Kr.test(u)?"\\"+u:u;a+=d}return i&&(/^-[-\d]/.test(a)?a="\\-"+a.slice(1):/\d/.test(o)&&(a="\\3"+o+" "+a.slice(1))),a=a.replace(Gr,(function(e,t,n){return t&&t.length%2?e:(t||"")+n})),!i&&n.wrap?r+a+r:a}function zr(e){var t=arguments.length>1&&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 Wr(e){var t=e||performance;return Math.round(t.now())}function Jr(e){if(!e)return"null";if(e.nodeType===Node.ELEMENT_NODE)try{return kr(e,{idName:function(e){return 0!==e.indexOf("ember")}})}catch(e){return"serialization_error"}var t=Jr(e.parentElement||void 0);return"".concat(t," > nodeType(").concat(e.nodeType,")")}function Qr(e,t,n){var r=[];return e&&"function"==typeof e.getEntriesByType&&(t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach((function(e){r.push({entryType:"MEASURE",name:e.name,startTime:e.startTime,duration:e.duration})})),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach((function(e){r.push({entryType:"MARK",name:e.name,startTime:e.startTime,duration:e.duration})})),n&&(e.clearMeasures(),e.clearMarks())),r}function Xr(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var Yr,Zr=function(){function e(t){De(this,e),Ue(this,"hostApis",void 0),Ue(this,"hostnameProperties",void 0),Ue(this,"usedHostnames",void 0),Ue(this,"abortController",void 0),Ue(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 xe(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return _t(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=Tt(_t(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,(Hr=Hr||r.createElement("a")).href=n,Hr.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}(),$r=function(){function e(t,n,r,i){De(this,e),Ue(this,"hostApis",void 0),Ue(this,"statics",void 0),Ue(this,"options",void 0),Ue(this,"allowTimingOrigin",void 0),Ue(this,"collectResourceTimings",void 0),Ue(this,"collectCdnData",void 0),Ue(this,"perfObserver",void 0),Ue(this,"renderTimings",new Map),Ue(this,"urlToTreeId",new Map),Ue(this,"cdnDataProvider",void 0),Ue(this,"observables",new Cr),this.hostApis=t,this.statics=n,this.options=r,this.allowTimingOrigin=i,this.collectResourceTimings=r["enable-rs-timing"],this.collectCdnData=r["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new Zr(t))}return xe(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e,t){return(Hr=Hr||t.createElement("a")).href=e,Hr.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:zr(this.hostApis.performance,this.allowTimingOrigin)})}},{key:"recordRenderEnd",value:function(e){var t=this.renderTimings.get(e);t&&(t.renderEnd=t.renderEnd||zr(this.hostApis.performance,this.allowTimingOrigin))}},{key:"startObserving",value:function(){var e=this.hostApis,t=e.PerformanceObserver,n=e.performance;this.stopObserving(),t?this.setupPerformanceObserver(t):this.collectResourceTimings&&this.emulateResourceTimingObserver(n),this.collectResourceTimings&&this.processNewResourceTimings()}},{key:"stopObserving",value:function(){var e;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:"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=Qr(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,function(e){if(!e)return{navigationTimingApi:!1};var t=Object.create({});if("function"==typeof e.getEntriesByType){var n=e.getEntriesByType("navigation")[0];n&&(["fetchStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"].every((function(e){return"number"==typeof n[e]}))&&(t.htmlMetrics={htmlFetchStart:n.fetchStart,htmlResponseEnd:n.responseEnd,htmlDecodedBodySize:n.decodedBodySize,htmlEncodedBodySize:n.encodedBodySize,htmlTransferSize:n.transferSize}),t.workerStart=n.workerStart)}var r=e.timing,i=e.navigation;return r&&i?(t.navigationTimingApi=!0,ei.forEach((function(e){e in r&&(t[e]=r[e])})),t.navigationType=i.type,t.redirectCount=i.redirectCount):t.navigationTimingApi=!1,t}(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?Tt(i,Promise).then((function(){return n})):n}},{key:"setupPerformanceObserver",value:function(e){var t=this;this.perfObserver=new e((function(e){e.getEntries().forEach((function(e){var n=e.entryType,r=e.name,i=e.startTime,o=e.duration;"resource"===n?t.processSingleResourceTiming(e):"mark"===n?t.observables.userTimingEntries.push({entryType:"MARK",name:r,startTime:i,duration:o}):"measure"===n?t.observables.userTimingEntries.push({entryType:"MEASURE",name:r,startTime:i,duration:o}):"longtask"===n&&t.observables.longTasks.push({duration:o,name:r,startTime:i})}))})),this.observables.userTimingEntries=Qr(this.hostApis.performance,this.options,!1);var n=["longtask"];(this.collectResourceTimings||this.collectCdnData)&&n.push("resource"),this.options["user-timing-mark-enabled"]&&n.push("mark"),this.options["user-timing-measure-enabled"]&&n.push("measure"),this.perfObserver.observe({entryTypes:n})}},{key:"emulateResourceTimingObserver",value:function(e){var t=this;e&&"function"==typeof e.setResourceTimingBufferSize&&"function"==typeof e.onresourcetimingbufferfull&&(e.setResourceTimingBufferSize(100),e.onresourcetimingbufferfull=function(){return t.processNewResourceTimings()})}},{key:"processNewResourceTimings",value:function(){var e=this,t=this.hostApis.performance;"function"==typeof t.getEntriesByType&&"function"==typeof t.clearResourceTimings&&(t.getEntriesByType("resource").forEach((function(t){return e.processSingleResourceTiming(t)})),t.clearResourceTimings())}},{key:"processSingleResourceTiming",value:function(e){this.collectResourceTimings&&this.observables.resourceTimingEntries.push(e),this.collectCdnData&&this.cdnDataProvider.inspectEntryForCdnData(e)}},{key:"extractUsedCDN",value:function(e){var t=e.filter((function(e){return e.hostname.indexOf("static")>=0})),n=t.length>0?t[0]:{hostname:"",provider:"",httpVersion:"",ipVersion:""};return{static_domain:n.provider,http_version:n.httpVersion,ip_version:n.ipVersion}}},{key:"snapshot",get:function(){var e={detailedRenderTimingEntries:Xr(this.renderTimings),networkInformationMetrics:ti(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}(),ei=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"];function ti(e){return e?{connectionType:e.type&&e.type.toUpperCase()||"UNKNOWN",effectiveType:function(e){switch(e){case"2g":return"TWO_G";case"3g":return"THREE_G";case"4g":return"FOUR_G";default:return"SLOW_2G"}}(e.effectiveType),roundTripTime:e.rtt||-1,downlinkBandwidth:e.downlink||-1,downlinkMaxBandwidth:void 0===e.downlinkMax?-1:e.downlinkMax===1/0?0:e.downlinkMax}:void 0}!function(e){e.RealUserMonitoringEvent="RealUserMonitoringEvent",e.FeaturePerformanceMeasurementEvent="FeaturePerformanceMeasurementEvent",e.ClientPerfMetricsEvent="ClientPerfMetricsEvent",e.WEB_UI_FRAMEWORK="web-ui-framework",e.APP_ID="app-id",e.APP_VERSION="app-version",e.IS_SINGLE_PAGE_APP="is-single-page-app",e.IS_APP_RENDER_FAILED="is-app-render-failed",e.APP_RENDER_MODE="app-render-mode",e.USER_TIMING_MARK_ENABLED="user-timing-mark-enabled",e.USER_TIMING_MEASURE_ENABLED="user-timing-measure-enabled",e.BEACON_SOURCE="beacon-source",e.BEACON_TIMEOUT="beacon-timeout",e.ENABLE_RS_TIMING="enable-rs-timing",e.ENABLE_CDN_TRACKING="enable-cdn-tracking",e.ASYNC_PLUGINS_TIMEOUT="async-plugins-timeout",e.ENABLE_MEMORY_MEASUREMENT="enable-memory-measurement",e.PAGE_KEY_PREFIX="pageKeyPrefix"}(Yr||(Yr={}));var ni=(Ue(Ne={},"web-ui-framework","EMBER"),Ue(Ne,"app-id","linkedin.rum.tracking"),Ue(Ne,"app-version","unknown"),Ue(Ne,"is-single-page-app",!0),Ue(Ne,"user-timing-mark-enabled",!1),Ue(Ne,"user-timing-measure-enabled",!0),Ue(Ne,"beacon-source","apps"),Ue(Ne,"enable-rs-timing",!0),Ue(Ne,"enable-cdn-tracking",!1),Ue(Ne,"async-plugins-timeout",5e3),Ue(Ne,"beacon-timeout",3e4),Ue(Ne,"enable-memory-measurement",!1),Ue(Ne,"pageKeyPrefix",""),Ne),ri=function(){function e(t,n,r){De(this,e),Ue(this,"featureName",void 0),Ue(this,"trackingCore",void 0),Ue(this,"rumConfig",void 0),Ue(this,"observing",!1),Ue(this,"basePageTreeId",void 0),Ue(this,"startPageInstance",void 0),Ue(this,"startMemory",void 0),Ue(this,"reportTimeouts",[]),this.featureName=t,this.trackingCore=n,this.rumConfig=r}return xe(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)||Et("unknown"),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:Wr(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}();Ue(ri,"checkpoints",[1,3,10,30,90,180,300]);var ii,oi,ai,si,ci,ui=xe((function e(t,n,r){De(this,e),Ue(this,"webUIFramework",void 0),Ue(this,"timeSource",void 0),Ue(this,"isSinglePageApp",void 0),Ue(this,"appRenderMode",void 0),Ue(this,"isAppRenderFailed",void 0),Ue(this,"pageLoadMode","INITIAL"),Ue(this,"isSSL",void 0),Ue(this,"treeId",void 0),Ue(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})),li=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)}},di=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){}},hi=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)},fi=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},pi=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)))}},gi=-1,vi=function(){return"hidden"===document.visibilityState?0:1/0},mi=function(){hi((function(e){var t=e.timeStamp;gi=t}),!0)},yi=function(){return gi<0&&(gi=vi(),mi(),fi((function(){setTimeout((function(){gi=vi(),mi()}),0)}))),{get firstHiddenTime(){return gi}}},bi=!1,Ei=-1,wi=function(e,t){bi||(function(e,t){var n,r=yi(),i=li("FCP"),o=function(e){"first-contentful-paint"===e.name&&(s&&s.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=e.startTime,i.entries.push(e),n(!0)))},a=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],s=a?null:di("paint",o);(a||s)&&(n=pi(e,i,t),a&&o(a),fi((function(r){i=li("FCP"),n=pi(e,i,t),requestAnimationFrame((function(){requestAnimationFrame((function(){i.value=performance.now()-r.timeStamp,n(!0)}))}))})))}((function(e){Ei=e.value})),bi=!0);var n,r=function(t){Ei>-1&&e(t)},i=li("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=di("layout-shift",s);c&&(n=pi(r,i,t),hi((function(){c.takeRecords().map(s),n(!0)})),fi((function(){o=0,Ei=-1,i=li("CLS",0),n=pi(r,i,t)})))},Ii={passive:!0,capture:!0},Ci=new Date,Ti=function(e,t){ii||(ii=t,oi=e,ai=new Date,Si(removeEventListener),_i())},_i=function(){if(oi>=0&&oi<ai-Ci){var e={entryType:"first-input",name:ii.type,target:ii.target,cancelable:ii.cancelable,startTime:ii.timeStamp,processingStart:ii.timeStamp+oi};si.forEach((function(t){t(e)})),si=[]}},ki=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){Ti(e,t),i()},r=function(){i()},i=function(){removeEventListener("pointerup",n,Ii),removeEventListener("pointercancel",r,Ii)};addEventListener("pointerup",n,Ii),addEventListener("pointercancel",r,Ii)}(t,e):Ti(t,e)}},Si=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,ki,Ii)}))},Ai=function(e,t){var n,r=yi(),i=li("FID"),o=function(e){e.startTime<r.firstHiddenTime&&(i.value=e.processingStart-e.startTime,i.entries.push(e),n(!0))},a=di("first-input",o);n=pi(e,i,t),a&&hi((function(){a.takeRecords().map(o),a.disconnect()}),!0),a&&fi((function(){var r;i=li("FID"),n=pi(e,i,t),si=[],oi=-1,ii=null,Si(addEventListener),r=o,si.push(r),_i()}))},Oi={},Ri=function(e,t){var n,r=yi(),i=li("LCP"),o=function(e){var t=e.startTime;t<r.firstHiddenTime&&(i.value=t,i.entries.push(e)),n()},a=di("largest-contentful-paint",o);if(a){n=pi(e,i,t);var s=function(){Oi[i.id]||(a.takeRecords().map(o),a.disconnect(),Oi[i.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,s,{once:!0,capture:!0})})),hi(s,!0),fi((function(r){i=li("LCP"),n=pi(e,i,t),requestAnimationFrame((function(){requestAnimationFrame((function(){i.value=performance.now()-r.timeStamp,Oi[i.id]=!0,n(!0)}))}))}))}},Ni=["LCP","FID","CLS"],Pi={LCP:"LargestContentfulPaint",FID:"FirstInputDelay",CLS:"CumulativeLayoutShift"},Mi={},Di=function(){var e;if(!Wn)return"";var t=window.performance,n=void 0;if("function"==typeof(null==t?void 0:t.getEntriesByType)){var r,i=null===(r=window.performance)||void 0===r?void 0:r.getEntriesByType("navigation");(null==i?void 0:i.length)>0&&(n=i[0])}return(null===(e=n)||void 0===e?void 0:e.name)||window.location.href}(),Li=!1,xi=[],Ui={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"};function Fi(){var e=!0===window.__test__resetWebVitalsState;if(!Li||e){e&&(xi=[]),Ni.forEach(Bi);var t=Symbol();ci=t,[Ri,Ai,wi].forEach((function(e){return e(Hi.bind(null,t),!0)})),[Ri,Ai,wi].forEach((function(e){return e(qi.bind(null,t))})),Li=!0}}function Bi(e){Mi[e]={name:e,value:-1,updateHistory:[]};var t=Ui[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||(Mi[e].value=-2)}function Hi(e,t){if(e===ci){var n=Mi[t.name],r=Wr();n&&(n.updateHistory.push({time:r,data:t}),n.value=t.value),xi.forEach((function(e){return e(t,r,!1)}))}}function qi(e,t){e===ci&&xi.forEach((function(e){return e(t,Wr(),!0)}))}var Ki=function(){function e(t,n){De(this,e),Ue(this,"basePageTreeId",void 0),Ue(this,"basePageKey",void 0),Ue(this,"observing",!1),Ue(this,"appContextMap",new Map),Ue(this,"rumConfig",void 0),Ue(this,"trackingCore",void 0),this.trackingCore=t,this.rumConfig=n}return xe(e,[{key:"startObserving",value:function(){var e,t,n=this;Fi(),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",Ni.forEach((function(e){var t;-2===(null===(t=Mi[e])||void 0===t?void 0:t.value)&&n.reportMetric(e)})),t=this.onMetricUpdate.bind(this),xi.push(t))}},{key:"stopObserving",value:function(){this.observing=!1}},{key:"onMetricUpdate",value:function(e,t,n){var r;this.observing&&(n?this.reportMetric(e.name):this.appContextMap.set(t,{time:t,url:location.href,pageKey:null===(r=this.trackingCore.getCurrentContext())||void 0===r?void 0:r.pageKey}))}},{key:"reportMetric",value:function(e){var t=Mi[e],n={name:Pi[e]||e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value);var r=Mi[e];if(r){var i=function(e,t,n,r,i){var o={basePageTreeId:e,basePageKey:t,basePageUrl:Di},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:Jr(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:Jr(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":Jr(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,r,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}(i)}var o={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},o)}}]),e}(),Gi=function(){function e(t,n,r){var i,o;De(this,e),Ue(this,"core",void 0),Ue(this,"config",void 0),Ue(this,"collector",void 0),Ue(this,"boomerangStart",-1),Ue(this,"webVitalsObserver",void 0),Ue(this,"appMemoryObserver",void 0),Ue(this,"pageMemoryObserver",void 0),Ue(this,"liveTokens",new Set),Ue(this,"stateWM",new WeakMap),Ue(this,"activeToken",void 0),Ue(this,"isInitial",void 0),Ue(this,"beforeHideHandlerBound",this.beforeHideHandler.bind(this)),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({},ni),n);var a="enabled"===(null===(i=(o=this.core.host).__getLixTreatment)||void 0===i?void 0:i.call(o,"pemberly.tracking.time-origin-epoch-time"));this.collector=new $r(r.host.api,new ui(t,this.config,r.host),this.config,a),this.collector.startObserving(),Nt.before("internal:hide",this.beforeHideHandlerBound)}return xe(e,[{key:"pingCDN",value:function(){}},{key:"recordTreeId",value:function(e,t){e&&this.collector.recordTreeId(e,t)}},{key:"recordRenderStart",value:function(e,t){this.collector.recordRenderStart(e,t||e)}},{key:"recordRenderEnd",value:function(e){this.collector.recordRenderEnd(e)}},{key:"start",value:function(){var e,t,n,r;this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(),this.isInitial=void 0===this.isInitial,this.isInitial||this.collector.reset();var i,o=Object.create(null),a="enabled"===(null===(e=(t=this.core.host).__getLixTreatment)||void 0===e?void 0:e.call(t,"pemberly.tracking.time-origin-epoch-time"));return this.activeToken=o,this.liveTokens.add(o),this.stateWM.set(o,{isInitial:this.isInitial,startTime:zr(this.core.host.api.performance,a)}),(this.config["enable-memory-measurement"]||"enabled"===(null===(n=(r=this.core.host).__getLixTreatment)||void 0===n?void 0:n.call(r,"pemberly.tracking.rum-memory-measurement")))&&(null===(i=this.pageMemoryObserver)||void 0===i||i.stopObserving(),this.pageMemoryObserver=new ri("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new ri("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),o}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new Ki(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=zr(this.core.host.api.performance,s);a.endProps={renderCompleteTime:c,isImpactedByHiddenWindow:i,rumKey:o};var u=this.activeToken;a.fireRumEventTimeout=setTimeout((function(){var e=r.collector.collect({isInitial:a.isInitial});"then"in e?e.then((function(e){r.fireRumEvent(e,u)})):r.fireRumEvent(e,u)}),this.config["beacon-timeout"]),this.activeToken=void 0}else Nt.emit("internal:error",{tags:["core-web-tracking:rum:end"],reason:new Error("RUM end: rum token passed is invalid")})}},{key:"destroy",value:function(){var e,t,n;Nt.offBefore("internal:hide",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.core.destroy()}},{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){var r=e.collector.collect({isInitial:n.isInitial,immediate:!0});e.fireRumEvent(r,t)}}))}},{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,u=this.boomerangStart=e.navigationStart||this.boomerangStart,l=e.navigationStart||i,d=a-l,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:l,boomerangStart:u,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()}}]),e}(),ji="undefined"!=typeof window&&"undefined"!=typeof performance,Vi="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG");function zi(e,t){const n=function(e){let t=e.querySelector('meta[name="locale"]');return t&&t.content||""}(document),r={};n&&(r.interfaceLocale=n);const i={header:{},requestHeader:r,moduleNames:t};e.fireTrackingEvent("ViewModuleImpressionEvent",i)}function Wi(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Z({},e),n=F(window.location.href,"originalReferer")||F(window.location.href,"original_referer");return n&&(t.requestHeader=Z(Z({},t.requestHeader),{},{referer:n})),Ji(t)}function Ji(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Z({},e),n=Re();return n&&(t.requestHeader=Z(Z({},t.requestHeader),{},{theme:n.toUpperCase()})),t}function Qi(e){let{browserId:t,memberId:n,isLoggedIn:r=!1}=e;return r?"urn:li:member:".concat(n):"urn:li:guest:".concat(t)}!function(){function e(t,n){De(this,e),Ue(this,"featureKey",void 0),Ue(this,"productName",void 0),Ue(this,"endPageInstance",void 0),Ue(this,"startPageInstance",void 0),Ue(this,"isCanceled",!1),Ue(this,"featureIdentifier",void 0),Ue(this,"name",void 0),Ue(this,"startTime",void 0),Ue(this,"duration",void 0),Ue(this,"marks",[]),Ue(this,"spanStarts",new Map),Ue(this,"spans",[]),Ue(this,"isSpanContainer",!1),Ue(this,"basePageTreeId",void 0),Ue(this,"isClosed",!1),this.featureKey=t,this.productName=n;var r=n?"::".concat(n):"";this.featureIdentifier="".concat(t).concat(r),this.name=t}xe(e,[{key:"start",value:function(e){this.startPageInstance=e,ji&&(this.startTime=Wr(),Vi&&performance.mark("LI:".concat(this.featureIdentifier,"-start")))}},{key:"mark",value:function(e){ji&&(this.marks.push({name:e,startTime:Wr()}),Vi&&(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))))}},{key:"spanStart",value:function(e){ji&&(this.spanStarts.set(e,Wr()),Vi&&performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(ji&&this.spanStarts.has(e)){var n=this.spanStarts.get(e);this.spans.push({name:t||e,startTime:n,duration:Wr()-n}),Vi&&(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")))}}},{key:"deleteSpan",value:function(e){if(this.isClosed)throw new Error("[rum measurement] spans can only be deleted before the feature performance measurement ends.");for(var t=this.spans.length-1;t>=0;t--)if(this.spans[t].name===e)return void this.spans.splice(t,1)}},{key:"end",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(!this.isClosed){if(this.isSpanContainer=t,this.isClosed=!0,this.isCanceled)throw new Error('[rum measurement] cannot end a canceled measurement "'.concat(this.featureIdentifier,'"'));this.endPageInstance=e,ji&&(this.duration=Wr()-this.startTime,Vi&&!this.isSpanContainer&&(performance.mark("LI:".concat(this.featureIdentifier,"-end")),performance.measure("LI:".concat(this.featureIdentifier),"LI:".concat(this.featureIdentifier,"-start"),"LI:".concat(this.featureIdentifier,"-end"))),this.cleanUp())}}},{key:"cancel",value:function(){this.isCanceled||(this.isCanceled=!0)}},{key:"setBasePageTreeId",value:function(e){this.basePageTreeId=e}},{key:"toEventBody",value:function(){if(ji){var e={name:this.featureKey,startTime:this.startTime,duration:this.isSpanContainer?-1:this.duration,basePageTreeId:this.basePageTreeId,startPageInstance:this.startPageInstance||Et("unknown"),marks:this.marks,spans:this.spans};return this.productName&&(e.productName=this.productName),e}}},{key:"check",value:function(){if(ji){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'));if(this.isSpanContainer&&0===this.spans.length)throw new Error("The span container should have at least one span");for(var e=0,t=["startTime","duration","basePageTreeId"];e<t.length;e++){var n=t[e];if(void 0===this[n])throw new Error('[rum measurement] "'.concat(this.featureIdentifier,'" is missing "').concat(n,'"'))}}}},{key:"cleanUp",value:function(){this.spanStarts.clear()}}])}();const Xi={observeComponents:()=>{},unobserveComponents:()=>{},handleDynamicElements:()=>{}};class Yi{constructor(e,t){let{threshold:n=.9,root:r=null,rootMargin:i="0px",componentList:o=[],impressionEventCallback:a=(()=>{}),onImpression:s=(()=>{}),onObservation:c=(()=>{}),onUnobservation:u=(()=>{})}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!("IntersectionObserver"in window))return Xi;this.root=r,this.threshold=n,this.rootMargin=i,this.trackingInstance=t,this.impressionEventCallback=a,this._onImpression=s,this._onObservation=c,this._onUnobservation=u;const l={root:this.root,rootMargin:this.rootMargin,threshold:this.threshold};this.intersectionObserverInstance=new e(this._handleObservedNodes.bind(this),l),this.observeComponents(o)}observeComponents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.intersectionObserverInstance&&e.forEach((e=>{this.intersectionObserverInstance.observe(e),this._onObservation(e)}))}unobserveComponents(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{this.intersectionObserverInstance.unobserve(e),this._onUnobservation(e)}))}_isNodeVisible(e){return e.intersectionRatio>=this.threshold}_handleObservedNodes(e){if(this.intersectionObserverInstance){const t=e.filter((e=>this._isNodeVisible(e))).map((e=>{let{target:t}=e;return t}));t.length>0&&(this._onImpression({trackingInstance:this.trackingInstance,visibleElements:t}),this.impressionEventCallback({trackingInstance:this.trackingInstance,queuedImpressions:t}),this.unobserveComponents(t))}}handleDynamicElements(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.intersectionObserverInstance&&e.length>0&&this.observeComponents(e)}}function Zi(e){let{trackingInstance:t,visibleElements:n}=e;const r=n.map((e=>e.getAttribute("data-impression-id"))).filter((e=>e));r.length>0&&zi(t,r)}function $i(e){e.removeAttribute("data-impression-id")}const eo="timezoneOffset",to="screenWidth",no="screenHeight",ro="devicePixelRatio",io="currentContext",oo="/transactional-routing/createguestdeferreddeeplink",ao="csrfToken",so=/iPad|iPhone|iPod/;function co(){var e;e=navigator.userAgent,so.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={[eo]:(new Date).getTimezoneOffset(),[to]:window.screen.width,[no]:window.screen.height,[ro]:window.devicePixelRatio,[io]:e};try{navigator.sendBeacon(B(oo,ao,K(H("JSESSIONID"))),JSON.stringify(t))}catch(e){}}(e.currentTarget.pathname)))}))}function uo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function lo(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var ho,fo,po,go,vo={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},mo="GUEST",yo="MEMBER",bo=0,Eo=1,wo=2,Io=(lo(ho={},mo,"li_gc"),lo(ho,yo,"li_mc"),ho),Co="liap",To=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 uo(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=r,this.optedInConsentMap={},vo)t[o]=t[o]||bo,t[o]!==bo&&(this.consentAvailable=!0),this.optedInConsentMap[o]=t[o]===Eo||t[o]===bo&&i===Eo},_o=(fo=[vo.ADVERTISING,vo.ANALYTICS_AND_RESEARCH,vo.FUNCTIONAL],po=[bo,Eo,wo,bo],go=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),{parseConsentBody:function(e,t){var n=e.match(go);if(!n)return{error:"Invalid consent body encoding",consent:new To};for(var r=parseInt(n[1],10),i={},o=0;o<fo.length;o++)i[fo[o]]=po[r>>2*o&3];var a=new Date(1e3*parseInt(n[2],10)),s=parseInt(n[3],10),c=bo;return s>=0&&s<=3&&(c=po[s]),{error:null,consent:new To(i,a,t,c)}}}),ko=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),So=function(e,t){var n=t.match(new RegExp("(?:^|; *)".concat(e,"=([^;]*)")));return n&&n.length>1?n[1]:null},Ao=function(e,t){var n=So(Io[e],t);return n?Po(n,e):So(Io[mo],t)||So(Io[yo],t)?Oo(wo):Oo(Eo)},Oo=function(e){var t={};for(var n in vo)t[n]=e;return{error:null,consent:new To(t,null,null,e)}},Ro=function(){var e=document.domain.match(/^(?:|.*\.)([^\.]+\.[^\.]+)$/);return e?e[1]:"linkedin-ei.com"},No=function(e){var t=e===yo?"settings/member-cookies":"mypreferences/g/guest-cookies";return"https://www.".concat(Ro(),"/").concat(t)};var Po=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(ko)}catch(e){}if(!r)return{error:"Invalid consent encoding",consent:new To};var i=parseInt(r[1],10),o=r[2];return 1===i?_o.parseConsentBody(o,t):{error:"Invalid encoded consent version ".concat(i),consent:new To}},Mo=function(e){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.cookie;return e||(e=So(Co,t)?So(Io[yo],t)?yo:mo:So(Io[mo],t)?mo:yo),Ao(e,t)}(e),n=t.consent,r=e||n.userMode||mo;return{showBanner:!t.error&&!n.consentAvailable,userMode:r,managePreferenceUrl:No(r)}},Do=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(Ro(),"/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 vo){var c=void 0;!0===n[s]?c=Eo:!1===n[s]&&(c=wo),a.CATEGORIES[s]=c}o.send(JSON.stringify(a))};function Lo(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function xo(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Uo(e,t,n){return t&&xo(e.prototype,t),n&&xo(e,n),e}function Fo(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&Ho(e,t)}function Bo(e){return Bo=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},Bo(e)}function Ho(e,t){return Ho=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},Ho(e,t)}function qo(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function Ko(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Bo(e);if(t){var i=Bo(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return qo(this,n)}}function Go(e,t,n){return Go="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Bo(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(n):i.value}},Go(e,t,n||e)}function jo(e){var t={header:{},requestHeader:{},alertUrn:e.getAlertId(),actionType:"DISMISS"};e.getTrackingOptions().trackingInstance.fireTrackingEvent("AlertActionEvent",t)}var Vo=100,zo=Object.freeze({TERMS_AND_CONDITIONS:0,COOKIE_POLICY:1,COOKIE_USAGE:2,MAINTENANCE:3,EMAIL_STATUS:4,SUBSCRIPTION:5,IE_DEPRECATION_BANNER:6,UNKNOWN:7,COOKIE_CONSENT:8});Object.freeze({TERMS_AND_CONDITIONS:501,COOKIE_POLICY:500,COOKIE_USAGE:500,MAINTENANCE:Vo,EMAIL_STATUS:300,SUBSCRIPTION:400,IE_DEPRECATION_BANNER:99,UNKNOWN:200});var Wo=Object.freeze({alertType:"type",severity:"severity",alertId:"alert-id",actionType:"action-type",actionUrl:"action-url"}),Jo="AlertActionClick";function Qo(e,t){for(var n=e;null!=n;){if(n.classList&&n.classList.contains(t))return!0;n=n.parentNode}return!1}function Xo(e){var t=document.cookie.match("(?:^|;)\\s*".concat(e,"\\s*=\\s*([^;]+)"));return t?t[1]:void 0}function Yo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"customEvent",t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}var Zo=1,$o=2,ea=0,ta="artdeco-global-alert__dismiss",na="artdeco-global-alert-action",ra="artdeco-global-alert__content";function ia(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 oa=function(){function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Lo(this,e),this._el=t,this._state=ea,this._initialHeight=this._el.offsetHeight,this._alertType=this._el.getAttribute(Wo.alertType),this._id=this._el.getAttribute(Wo.alertId),this._elDismissBtn=this._el.querySelector(".".concat(ta)),this._trackingOptions=n,this.init()}return Uo(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;Qo(n,ta)?(e.dismissAction(),jo(e)):Qo(n,na)&&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===Zo||this._state===$o)}},{key:"visited",value:function(){this._state=Zo,this._makeAlertAccessible(!1)}},{key:"activate",value:function(){var e,t,n=this._trackingOptions,r=n.enableControlInteractionEvents,i=n.controlInteractionEventsPrefix;this._state=$o,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(ra));if(c instanceof Element){var u=(o=ia,a=200,function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=function(){clearTimeout(s),o.apply(void 0,t)};clearTimeout(s),s=setTimeout(r,a)});c.addEventListener("scroll",u)}c.dispatchEvent(Yo("scroll")),r&&this._el.querySelectorAll("button, a").forEach((function(e){var t=e.tagName,n="data-tracking-control-name",r=e.getAttribute(n);if(r)r=r.replace("urn:li:control:",""),e.setAttribute(n,r),e.setAttribute("data-control-name",r);else{var o="a"===t.toLowerCase()?"alert-link-cta":"alert-dismiss-btn-cta";e.setAttribute(n,"".concat(i,"-").concat(o))}}))}},{key:"dismissAction",value:function(){}},{key:"handleAlertAction",value:function(e){var t=e.target,n=t.getAttribute(Wo.actionType),r=t.getAttribute(Wo.actionUrl);r=r&&Q(r);var i=Yo(Jo);switch(n){case"LINK":r?window.location.assign(r):t.dispatchEvent(i);break;case"ACCEPT":r&&function(e){if(e){var t=document&&document.cookie.match(/(?:^|; *)JSESSIONID=([^;]*)(?:;|$)/),n=t?t[1]:null;if(n){var r=new XMLHttpRequest;r.open("POST",e),r.setRequestHeader("Content-Type","application/json"),r.setRequestHeader("Csrf-Token",n),r.withCredentials=!0,r.onload=function(){},r.send(JSON.stringify({action:"ACCEPT"}))}}}(r),t.dispatchEvent(i);break;case"DENY":this.dismissAction(),jo(this),t.dispatchEvent(i)}}}]),e}();function aa(){try{var e=Mo();return e.isActive=!(!Xo("li_gc")&&!Xo("li_mc")),e}catch(e){return console.error("invalid domain",document.domain),{}}}function sa(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t={},n=vo;return Object.keys(n).forEach((function(n){t[n]=e})),{optedInConsentMap:t}}var ca=function(e){Fo(n,e);var t=Ko(n);function n(){return Lo(this,n),t.apply(this,arguments)}return Uo(n,[{key:"init",value:function(){Go(Bo(n.prototype),"init",this).call(this),aa().showBanner||this.visited()}},{key:"handleAlertAction",value:function(e){var t=e.target,n=t.getAttribute(Wo.actionType),r=aa().managePreferenceUrl,i=t.getAttribute(Wo.actionUrl);i=i&&Q(i)||r;var o=Yo(Jo);switch(n){case"LINK":i?Do(sa(),(function(){window.location.assign(i)})):t.dispatchEvent(o);break;case"ACCEPT":Do(sa(!0),(function(){})),t.dispatchEvent(o);break;case"DENY":Do(sa(),(function(){})),jo(this),t.dispatchEvent(o)}}}]),n}(oa),ua="li_alerts";function la(){var e=function(e){var t=document.cookie.match("(?:^|;)\\s*".concat(e,"\\s*=\\s*([^;]+)"));return t?t[1]:void 0}(ua),t=e&&atob(e),n={};try{n=JSON.parse(t)}catch(e){}return n}function da(){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(ua,"=").concat(t,";expires=").concat(n.toUTCString(),";path=/;secure;samesite=none")}function ha(e){if(!e)return 0;var t=e.toLowerCase(),n=la(),r=n&&n[t]||0;return r=parseInt(r,10)}function fa(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(e&&t){var n=e.toLowerCase(),r=Math.min(ha(n)+t,3),i=la();i[n]=r,da(i)}}var pa="LIcookiePolicyDisplays";function ga(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;try{window.localStorage.setItem(pa,e)}catch(e){}}var va=function(e){Fo(n,e);var t=Ko(n);function n(){return Lo(this,n),t.apply(this,arguments)}return Uo(n,[{key:"init",value:function(){var e=aa();Go(Bo(n.prototype),"init",this).call(this),function(e){var t=NaN;try{t=parseInt(window.localStorage.getItem(pa),10)}catch(e){}!isNaN(t)&&t>=0&&fa(e,t)}(this._alertType),(e.isActive||ha(this._alertType)>=3)&&Go(Bo(n.prototype),"visited",this).call(this)}},{key:"activate",value:function(){Go(Bo(n.prototype),"activate",this).call(this),ga(ha(this._alertType)+1),fa(this._alertType,1)}},{key:"dismissAction",value:function(){Go(Bo(n.prototype),"dismissAction",this).call(this),ga(3),fa(this._alertType,3-ha(this._alertType))}}]),n}(oa);var ma=function(){function e(t){Lo(this,e),this._trackingOptions=t}return Uo(e,[{key:"getAlertInstance",value:function(e){switch(function(e){return zo[e.getAttribute(Wo.alertType)]}(e)){case zo.COOKIE_USAGE:return new va(e,this._trackingOptions);case zo.COOKIE_CONSENT:return new ca(e,this._trackingOptions);default:return new oa(e,this._trackingOptions)}}}]),e}();"undefined"!=typeof window&&"undefined"!=typeof document&&window.NodeList&&!NodeList.prototype.forEach&&(NodeList.prototype.forEach=function(e,t){t=t||window;for(var n=0;n<this.length;n++)e.call(t,this[n],n,this)}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null});var ya="artdeco-global-alert-container",ba="global-alert-offset",Ea="artdeco-global-alert",wa="artdeco-global-alert__dismiss",Ia="artdeco-global-alert-action",Ca="artdeco-global-alerts-cls-offset",Ta="transition-in",_a="transition-out",ka=function(){function e(t){var n=t.trackingInstance,r=t.enableControlInteractionEvents,i=void 0!==r&&r,o=t.controlInteractionEventsPrefix,a=void 0===o?"global-alerts":o;if(Lo(this,e),!n)throw new Error("Missing config - trackingInstance");if(this._el=document&&document.querySelector("#".concat(ya)),this._clsOffsetEl=document&&document.querySelector("#".concat(Ca)),this._isSSR=!!this._clsOffsetEl,this._clsOffsetEl&&this._clsOffsetEl instanceof Element){var s=this._clsOffsetEl.offsetHeight;this._clsOffsetEl.style.setProperty("height",s),this._el.innerHTML=this._clsOffsetEl.innerHTML,this._clsOffsetEl.innerHTML=""}if(this._elOffsetList=document.querySelectorAll(".".concat(ba)),this._elAlertList=this._el&&this._el.querySelectorAll(".".concat(Ea)),this._alertInstance=[],this._currentActiveAlert=void 0,this._alertFactoryInstance=new ma({trackingInstance:n,enableControlInteractionEvents:i,controlInteractionEventsPrefix:a}),this._initalBodyOffset=parseInt(document.body.style.getPropertyValue("padding-top"),10)||0,!this._el&&!this._elAlertList.length)return!1;this.init()}return Uo(e,[{key:"init",value:function(){var e=this;da(la()),this._elAlertList.forEach((function(t){e._alertInstance.push(e._alertFactoryInstance.getAlertInstance(t))})),this._el.classList.add(Ta),document.body.classList.add(Ta),this._el.addEventListener("click",(function(t){var n=t.target;Qo(n,wa)&&(e.dismissAlert(n),e.activateNextAlert())})),this._el.addEventListener(Jo,(function(t){var n=t.target;Qo(n,Ia)&&(e.dismissAlert(n),e.activateNextAlert())})),this.activateNextAlert()}},{key:"activateNextAlert",value:function(){var e;this._alertInstance.some((function(t){return!!t.isInactive()&&(e=t,!0)})),this._currentActiveAlert&&this._currentActiveAlert.visited(),e&&e.activate(),this._currentActiveAlert=e,this._currentActiveAlert?this.updateBodyOffset():this.destroy()}},{key:"updateBodyOffset",value:function(){var e=this._currentActiveAlert.getInitialHeight();this._isSSR?this._clsOffsetEl.style.setProperty("height","".concat(e+this._initalBodyOffset,"px")):document.body.style.setProperty("padding-top","".concat(e+this._initalBodyOffset,"px")),this._elOffsetList.forEach((function(t){t.style.setProperty("top","".concat(e,"px"))})),this._el.style.setProperty("height","".concat(e,"px")),this._currentActiveAlert.setHeight("".concat(e,"px"))}},{key:"dismissAlert",value:function(e){var t=e.closest(".".concat(Ea));t.classList.add(_a),t.style.setProperty("height","0px")}},{key:"destroy",value:function(){var e=this._el;this._el.classList.add(_a),document.body.classList.add(_a),this._isSSR?this._clsOffsetEl.remove():document.body.style.setProperty("padding-top","".concat(this._initalBodyOffset,"px")),this._elOffsetList.forEach((function(e){e.style.setProperty("top","0px")})),this._el.style.setProperty("height","0px"),this._alertInstance=[],this._el=void 0,setTimeout((function(){e.remove(),document.body.classList.remove(Ta),document.body.classList.remove(_a)}),500)}}]),e}();class Sa{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e||"[object Function]"!=={}.toString.call(e))throw new Error("Please provide a valid tracking call back function");this.memberId=t,this.trackingCallback=e}getInstalledApps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator;return"getInstalledRelatedApps"in e?e.getInstalledRelatedApps().then((t=>(this._fireAppDetectionEvent(t,e),t))):Promise.resolve([])}_fireAppDetectionEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:navigator;const n=e.map((e=>({appId:e.id.toUpperCase().replace(/\./g,"_"),appVersion:e.version,platform:e.platform}))),r={header:{memberId:this.memberId},requestHeader:{browserId:this._getBrowserId(),userAgent:t.userAgent||""},installedAppList:n},i=this._getQueryParam(window.location.href,"originalReferer");i&&(r.requestHeader.referer=i),this.trackingCallback("AppDetectionEvent",r)}_getBrowserId(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:document).cookie.match(/bcookie=([^;]*)/),t=e?e[1].replace(/^"(.*)"$/,"$1"):"";return t&&t.includes("&")&&t.split("&")[1]||""}_getQueryParam(e,t,n){const r=new RegExp("([\\?&])".concat(n?t:encodeURIComponent(t),"=([^&#]*)")).exec(e);return r&&(n?r[2]:decodeURIComponent(r[2]))}}class Aa{constructor(e){if(!e)throw new Error("JetCore missing required only parameter (`trackingCore`)");this.cwtJetCoreInstance=new Ir(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 Oa="data-tracking-control-name";class Ra{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=D(t,"[".concat(Oa,"]"));if(null===n)return;const r=n.getAttribute(Oa);n.hasAttribute("data-tracking-client-ingraph")&&this._fireClientIngraphMetric(r)}_fireClientIngraphMetric(e){this.ingraphs.fireCounterIngraphMetric({metricsType:"controlInteractionEvent-".concat(e),sendBeacon:!0})}}const Na="li_trk_navigation",Pa="undefined";function Ma(){try{if(typeof window!==Pa&&typeof window.sessionStorage!==Pa)return JSON.parse(window.sessionStorage.getItem(Na))}catch(e){}}function Da(e){try{typeof window!==Pa&&typeof window.sessionStorage!==Pa&&window.sessionStorage.setItem(Na,JSON.stringify(e))}catch(e){}}const La="ExternalNavigationEvent",xa="ControlInteractionEvent",Ua="PageVisibilityChangeEvent",Fa="PageViewHeartbeatEvent",Ba="LinksterImpressionEvent",Ha={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 qa(e){return(t=e)?t.split(":").pop():null;var t}function Ka(e,t){return e&&t?"urn:li:control:".concat(t,"-").concat(e):null}class Ga{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=Ma();if(!r)return null;for(let i=0;i<r.length;i++){const o=r[i].href;if(o===e||o===t||o===n){const e=r.splice(i,1)[0];return Da(r),e}}return null}();if(t){const n=qa(t.prevInstance.pageUrn);e.lipi="".concat(t.prevInstance.pageUrn,";").concat(t.prevInstance.trackingId),e.licu=Ka(t.controlName,n)}if(this.window){const t=F(this.window.location.href,"trk",!1);t&&(e.trk=t)}return e}navigate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"full",n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=function(e){let t=e.querySelector('meta[name="linkedin:pageTag"]');return t&&t.content||""}(this.document),i={pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:r}};n&&(i.trackingInfo.liSugr=(this.document,H("li_sugr")));const o=this._trackingCore.navMetaFromSeed(e,gr(this.getAppSeedQps()));return this._trackingCore.setCurrentContext(o.to),this.fireNavEvents(o,i)}fireNavEvents(e,t){const n=this._trackingCore.generateNavigationEvent(e),{to:r,from:i,navEventId:o}=e,a=this._trackingCore.generateEnvelope(o,n);a.meta.requestHeader.pageKey=r.pageKey;const s=i&&i.applicationInstance;return s&&(a.meta.header.clientApplicationInstance=s),this._trackingCore.host.api.Promise.all([this.firePVE(r.pageKey,t),this._trackingCore.fireEnvelope(a)])}firePVE(e,t,n){return this._trackingCore.firePVE(e,t,n)}_handleWindowBeforeUnload(e){const t=e.target.activeElement;let n=t,r=null,i=!1;if(t){for(;n!==e.currentTarget&&("function"!=typeof n.hasAttribute||!n.hasAttribute("data-tracking-control-name"))&&n.parentElement;)n=n.parentElement;n!==e.currentTarget&&("getAttribute"in n&&(r=n.getAttribute("data-tracking-control-name")),"hasAttribute"in n&&(i=n.hasAttribute("data-tracking-will-navigate")))}i||this.fireExternalNavigationEvent(r)}_handleDocumentClicks(e){let t=D(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=D(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=q(this.document);void 0!==e&&this.firePageVisibilityChangeEvent(e)}saveStateForPageDeparture(e){if(!e)return;!function(e){let t=Ma()||[];t.push(e),Da(t)}({controlName:e.controlName,href:e.href,prevInstance:this._trackingCore.getCurrentContext().pageInstance})}firePageVisibilityChangeEvent(e){this._trackingCore.fireEvent(Ua,{isVisible:!e})}fireControlInteractionEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ha.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=qa(this._trackingCore.getCurrentContext().pageInstance.pageUrn),i=n.uiControlPageKey||r;this._trackingCore.fireEvent(xa,{controlUrn:Ka(e,i),interactionType:Ha[t]},n)}fireExternalNavigationEvent(e){const t=qa(this._trackingCore.getCurrentContext().pageInstance.pageUrn);this._trackingCore.fireEvent(La,{triggerControlUrn:Ka(e,t)},{},!0)}fireLinksterImpressionEvent(e,t,n){this._trackingCore.fireEvent(Ba,{moduleName:e,sourceEntity:t,destinationEntities:n})}convertUuidTrackingIdToBase64(e){try{const t=bt(e),n=String.fromCharCode.apply(null,t);return btoa(n)}catch(t){return e}}}const ja=2e3;function Va(e){const t=q(e);return void 0!==t&&!t}class za{constructor(e){let{globalDocument:t=document,globalWindow:n=window,heartbeatDuration:r=ja}=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",(()=>{Va(this.document)&&this._firePageViewHeartbeatEvent()}),!0),Va(this.document)&&this._startPageViewHeartbeatInterval()}_startPageViewHeartbeatInterval(){this._pageViewHeartbeatStartTime=Date.now(),this._pageViewHeartbeat=this.window.setInterval(this._firePageViewHeartbeatEvent,this.heartbeatDuration)}_documentVisibilityChangeHeartbeatHandler(){const e=q(this.document);void 0!==e&&(e?(this._firePageViewHeartbeatEvent(),clearInterval(this._pageViewHeartbeat)):this._startPageViewHeartbeatInterval())}_firePageViewHeartbeatEvent(){const e=Date.now();this.tracking.fireTrackingEvent(Fa,{header:{},requestHeader:{},startTime:this._pageViewHeartbeatStartTime},{header:{time:e}}),this._pageViewHeartbeatStartTime=e}}var Wa="aria-[a-z0-9_\\-]+|class|data-[a-z0-9_\\-]+|dir|id|role|tabindex",Ja=function(){if("undefined"==typeof document)return!0;return"textContent"in document.createElement("div")}()?"textContent":"innerText",Qa=["b","del","em","i","s","strong","sub","sup"],Xa=Qa.concat(["a","abbr","address","area","article","aside","audio","bdi","bdo","big","blockquote","br","button","center","cite","code","datalist","dd","details","dfn","div","dl","dt","fieldset","figcaption","figure","font","footer","h1","h2","h3","h4","h5","h6","header","hgroup","hr","img","ins","kbd","label","legend","li","map","mark","marquee","nav","nobr","ol","p","pre","q","rp","rt","ruby","samp","section","small","source","span","strike","table","tbody","td","tfoot","th","thead","time","tr","u","ul","var","video","wbr"]),Ya=[Wa,"alt|checked|selected|colgroup|cols|colspan|disabled|height|hidden|maxlength|method|multiple|name|placeholder|readonly|rel|required|rows|rowspan|spellcheck|target|title|width","border|caption|color|controls|coords|hreflang|label|lang|loop|marginheight|marginwidth|preload|reversed|type|usemap|clear|headers|ismap|start|datetime|accept|max|min|size|step|style|cellspacing|cellpadding"].join("|");function Za(){}var $a,es,ts=(es=/[&<>"'\u0000\\=]/g,$a={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","\0":"�","\\":"&#92;","=":"&#61;"},function(e){return null==e?null:e.toString().replace(es,(function(e){return $a[e]}))}),ns=function(){var e,t,n=/&(?:([a-z0-9]+)|#x([\da-f]{1,6})|#(\d{1,8}));/gi;if("undefined"==typeof document)return function(){throw new Error("document is undefined (i.e. you are probably in Node.js)")};e=document.createElement("div");var r={nbsp:" ",lt:"<",gt:">",amp:"&",quot:'"'};return t="function"==typeof String.fromCodePoint?function(e){return String.fromCodePoint(e)}:function(e){return e<=65535?String.fromCharCode(e):"�"},function(i){return null==i?null:(i+"").replace(n,(function(n,i,o,a){return i?(s=i,r.hasOwnProperty(s)?r[s]:(e.innerHTML="&"+s+";",c=e[Ja],r[s]=c,c)):o||a?t(parseInt(o||a,o?16:10)||65533):"�";var s,c}))}}();var rs=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function is(e){return/[<&]/.test(e)}var os,as=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t)}:function(e,t){for(var n=0,r=e.length;n<r;n++)t(e[n],n)},ss="[ \t\r\n]*";function cs(e){e=rs(e)?e:[e];var t,n,r,i=0,o="<(?!/?";return o+="(?:",as(e,(function(e,a){t=e.tags||Xa,n=e.attrs||Ya,r=e.checkUrlAttrs||!1,0!==a&&(o+="|"),o+="(?:"+t.join("|")+")",o+="(?:",o+=ss,o+="|[ \t\r\n]+",o+="(?:(?:",o+="(?:"+n+")(?:=([\"'])[^'\"<>]*\\"+ ++i+")?",r&&(o+="|(?:href|src)=([\"'])(?:(?:https?|ftp|mailto|invalid)(?::|&#(?:58|x3a);)|(?:data:image/(?:gif|jpg|jpeg|png);base64,)|[/.#?]|&#(?:35|4[67]|63|x(?:2[3ef]|3f));)[^'\"<>]*\\"+ ++i),o+=")[ \t\r\n]*)+",o+=")"})),o+=")",o+="/?>)",new RegExp(o,"i")}function us(e){return cs({tags:e=e||Xa,checkUrlAttrs:!0})}function ls(e,t){var n=(t=t||{}).allowTags,r=!1!==t.hasCustomElementMarkup;return n?!us(n).test(e):r?!ls.R_UNSAFE_CUSTOM_ELEMENT.test(e):!ls.R_UNSAFE_HTML.test(e)}function ds(e){return e.replace(/<[^>]*>|[<>'"&\\]/g,"")}function hs(e,t,n){if(null==e)return null;e=e.toString();var r=t?function(e,t){var n={};return e.replace(/\{([^}]+)\}/g,(function(e,r){var i,o=e;if(n.hasOwnProperty(r))return n[r];if(t.hasOwnProperty(r)){if(!((i="string"==typeof(o=t[r]))||o instanceof Za||"number"==typeof o))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");o=i?ts(o):o.toString()}return n[r]=o,o}))}(e,t):e,i=e;return is(r)&&!ls(r,n)&&(r=ds(r),G("Content contains non-whitelisted tags or attributes:\nContent: "+i,"error")),r}function fs(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e}ls.R_UNSAFE_HTML=us(),ls.R_UNSAFE_CUSTOM_ELEMENT=cs([{tags:Xa,checkUrlAttrs:!0},{tags:[(os={tag:"li-icon",attrs:"active|a11y-text|animate|color|size|type"}).tag],attrs:[Wa,os.attrs].join("|"),checkUrlAttrs:!1}]);var ps={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ps.optgroup=ps.option,ps.tbody=ps.tfoot=ps.colgroup=ps.caption=ps.thead,ps.th=ps.td;var gs=/<([\w:]+)/;function vs(e,t){var n,r,i,o,a,s,c,u=t.createDocumentFragment(),l=[];for(a=0,c=e.length;a<c;a++)if((o=e[a])||0===o)if("string"==typeof o){for(i=i||u.appendChild(t.createElement("div")),n=(gs.exec(o)||["",""])[1].toLowerCase(),bs(i,(r=ps[n]||ps._default)[1]+o+r[2]),s=r[0];s--;)i.lastChild&&i.lastChild.nodeType===Node.ELEMENT_NODE&&(i=i.lastChild);fs(l,i.childNodes),(i=u.firstChild).textContent=""}else fs(l,o.nodeType?[o]:o);for(u.textContent="",o=l[a=0];o;)u.appendChild(o),o=l[++a];return u}var ms=hs,ys=hs;function bs(e,t,n){var r=hs(t,n);return is(r)?e.innerHTML=r:e[Ja]=r,r}function Es(e,t){if(!(this instanceof Es))return new Es(e,t);(t=t||{}).allowTags=t.allowTags?t.allowTags.reduce((function(e,t){return e.concat(t)}),[]):null,this._string=e,this._options=t}Es.prototype=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(new Za,{toString:function(){var e=this._string,t=this._stringVal,n=e;return void 0!==t?t:(ls(e,this._options)||(n=e,e=ds(e),G("UnsafeString contains non-whitelisted tags or attributes.\nString: "+n,"error")),this._stringVal=e,e)}});var ws={ALLOWED_TAGS:Xa,FORMATTING_TAGS:Qa,htmlEncode:ts,htmlUnencode:ns,log:G,mk:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];let i,o="",a=n.length;return e&&e.forEach((function(e,t){o+=e,t<a&&(i=n[t],o+=i instanceof Es?i:ts(i))})),ys(o)},parseHTML:function(e,t){var n;if(t=t||document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument(""):document,"string"==typeof e)n=vs([e],t);else{if(!rs(e))return e;n=vs(e,t)}return fs([],n.childNodes)},parseSelector:function(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e},processTemplate:ms,reEncode:function(e){return ts(ns(e))},_redirector:X,redirect:function(e){const t=Q(e);t===e&&X.redirect(t)},sanitizeHTML:ys,sanitizeUrl:Q,setElementContent:bs,text:function(e){return G("jSecure.text() is deprecated. Please use jSecure.htmlEncode().","warn"),ts(e)},unsafe:function(e){return e},UnsafeString:Es};let Is;function Cs(){var e;(e="feed-sort")&&(document.cookie="".concat(e,"=; expires=Thu, 01-Jan-1970 00:00:01 GMT; path=/;"))}function Ts(e){BroadcastChannel&&(Is=new BroadcastChannel("LI_LOGOUT"),window.BROADCAST_CHANNEL=Is,Is.addEventListener("message",(t=>{t&&"LOGOUT"===t.data.message&&(Cs(),function(e){const t=B(e,"csrfToken",K(H("JSESSIONID")));window.tracking.then((e=>{null==e||e.flushAndClearPersistedEventsOnLogout(),ws.redirect(t)}))}(e))})))}class _s{constructor(e){this.el=e,this.init()}init(){const e=document.head.querySelector("title"),t=document.head.querySelector('meta[name="description"]'),n=document.body.querySelector("span[data-chameleon-id]");if(n){const r=n.getAttributeNames();r.push(">"),e&&(this.el.querySelector(".meta-title-chameleon-display").innerHTML="Title: ".concat(this.encodeChameleonAttributes(e.textContent,r))),t&&(this.el.querySelector(".meta-description-chameleon-display").innerHTML="Description: ".concat(this.encodeChameleonAttributes(t.content,r)))}}encodeChameleonAttributes(e,t){for(var n=0;n<t.length-1;n++){const r=new RegExp("(?<=".concat(t[n],'=").*(?="\\n\\s+').concat(t[n+1],")")),i=e.match(r)?e.match(r)[0]:null;i&&(e=e.replace(i,ws.htmlEncode(i)))}return e}}const ks={endpoint:"/li/tscp/sct",retryConfig:{}},Ss={};function As(e){const t=document.getElementById(e);if(!t&&void 0!==Ss[e])return Ss[e];if(!t)return console.warn("Element with id: ".concat(e," not found")),Ss[e]=null,Ss[e];let n;for(const e of t.childNodes)try{if(e.nodeType===Node.COMMENT_NODE){n=JSON.parse(e.nodeValue);break}}catch(e){}return void 0===n?(console.warn("Error retrieving content with id: ".concat(e,". Use embedJson helper to embed this content")),null):(Ss[e]=n,t.parentNode.removeChild(t),Ss[e])}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self;var Os={exports:{}};(function(e){function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(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 a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}function d(e,t,n){return d=l()?Reflect.construct:function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&u(i,n.prototype),i},d.apply(null,arguments)}function h(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function f(e){var t="function"==typeof Map?new Map:void 0;return f=function(e){if(null===e||!h(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return d(e,arguments,c(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},f(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function g(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?p(e):t}function v(e){return function(){var t,n=c(e);if(l()){var r=c(this).constructor;t=Reflect.construct(n,arguments,r)}else t=n.apply(this,arguments);return g(this,t)}}function m(e){"complete"===document.readyState?e():window.addEventListener("load",(function(){e()}))}function y(e,t){var n=document.createElement("script");n.src=e,t&&(n.onload=t),document.head.appendChild(n)}function b(){var e,t,n=new Promise((function(n,r){e=n,t=r}));return n.resolve=e,n.reject=t,n}(function(){if("function"==typeof window.CustomEvent)return!1;function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:null};var n=document.createEvent("CustomEvent");return n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),n}window.CustomEvent=e})(),function(){if("function"==typeof window.EventTarget)try{return!new e}catch(e){}var e=function(){this.listeners={}};e.prototype.listeners=null,e.prototype.addEventListener=function(e,t){e in this.listeners||(this.listeners[e]=[]),this.listeners[e].push(t)},e.prototype.removeEventListener=function(e,t){if(e in this.listeners)for(var n=this.listeners[e],r=0,i=n.length;r<i;r++)if(n[r]===t)return void n.splice(r,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,r=t.length;n<r;n++)t[n].call(this,e);return!e.defaultPrevented},window.EventTarget=e}();var E="990339570472-k6nqn1tpmitg8pui82bfaun3jrpmiuhs.apps.googleusercontent.com",w={GOOGLE_ERROR:"googleError",GOOGLE_USER_FETCHED:"googleUserFetched",INITIALIZED:"initialized",PROMPT_MOMENT:"promptMomentNotification",TOKEN_FETCHED:"tokenFetched"},I="https://accounts.google.com",C={INITIALIZATION:"initialization",AUTHENTICATION:"authentication"},T={INIT_FAILED:"idpiframe_initialization_failed",POPUP_CLOSED_BY_USER:"popup_closed_by_user",ACCESS_DENIED:"access_denied",IMMEDIATE_FAILED:"immediate_failed"},_={SIGN_IN:"signin",SIGN_UP:"signup",USE:"use"},k={DISPLAY:"display",SKIPPED:"skipped",DISMISSED:"dismissed"},S={NOT_DISPLAYED:{BROWSER_NOT_SUPPORTED:"browser_not_supported",INVALID_CLIENT:"invalid_client",MISSING_CLIENT_ID:"missing_client_id",OPT_OUT_OR_NO_SESSION:"opt_out_or_no_session",SECURE_HTTP_REQUIRED:"secure_http_required",SUPPRESSED_BY_USER:"suppressed_by_user",UNREGISTERED_ORIGIN:"unregistered_origin",UNKNOWN_REASON:"unknown_reason"},SKIPPED:{AUTO_CANCEL:"auto_cancel",USER_CANCEL:"user_cancel",TAP_OUTSIDE:"tap_outside",ISSUING_FAILED:"issuing_failed"},DISMISSED:{CREDENTIAL_RETURNED:"credential_returned",CANCEL_CALLED:"cancel_called",FLOW_RESTARTED:"flow_restarted"}},A="com.linkedin.LinkedIn.service",O="https://www.linkedin.com/redirect",R="https://www.linkedin-ei.com/redirect",N={DISMISSED:"DISMISSED",INITIALIZED:"INITIALIZED",SNAPPLE_USER_FETCHED:"SNAPPLE_USER_FETCHED"},P={signin:{GOT:"signin",GSI_BUTTON:"signin_with"},signup:{GOT:"signup",GSI_BUTTON:"signup_with"},use:{GOT:"use",GSI_BUTTON:"continue_with"}},M=w.GOOGLE_ERROR,D=w.GOOGLE_USER_FETCHED,L=w.INITIALIZED,x=C.INITIALIZATION,U=C.AUTHENTICATION,F=function(e){s(i,e);var n=v(i);function i(e){var r,o=e.libSrcPath,a=e.el,s=e.clientId,c=void 0===s?E:s;if(t(this,i),r=n.call(this),!a)throw TypeError("DOM element for Sign In button is required");if(r.libSrcPath=o,r.el=a,r.clientId=c,window.gapi)r._initializeGoogleAuth();else{if(!o)throw TypeError("Google Sign In lib not already loaded on the page. libSrcPath is required to load the lib.");m((function(){y(o,r._initializeGoogleAuth.bind(p(r)))}))}return r}return r(i,[{key:"_initializeGoogleAuth",value:function(){var e=this;return gapi.auth2.init({client_id:this.clientId}).then((function(t){e.auth2=t,e._attachSignIn();var n=new CustomEvent(L);e.dispatchEvent(n)})).catch((function(t){var n={type:x,message:t.error},r=new CustomEvent(M,{detail:n});e.dispatchEvent(r)}))}},{key:"_attachSignIn",value:function(){var e=this;this.auth2.attachClickHandler(this.el,{},(function(t){var n=new CustomEvent(D,{detail:e._getGoogleUserInformation(t)});e.dispatchEvent(n)}),(function(t){var n={type:U,message:t.error},r=new CustomEvent(M,{detail:n});e.dispatchEvent(r)}))}},{key:"_getGoogleUserInformation",value:function(e){var t=e.getBasicProfile(),n=e.getAuthResponse().id_token;return{email:t.getEmail(),familyName:t.getFamilyName(),givenName:t.getGivenName(),id:t.getId(),idToken:n,imageUrl:t.getImageUrl()}}}]),i}(f(EventTarget)),B=w.GOOGLE_USER_FETCHED,H=w.PROMPT_MOMENT,q=function(e){s(i,e);var n=v(i);function i(e){var r,o=e.autoSelect,a=void 0!==o&&o,s=e.libSrcPath,c=e.containerId,u=e.context,l=e.clientId,d=void 0===l?E:l,h=e.cancelOnTapOutside,f=void 0===h||h;if(t(this,i),r=n.call(this),!u)throw TypeError("context param is required to determine the message to show in Google One Tap");if(r.autoSelect=a,r.libSrcPath=s,r.containerId=c,r.cancelOnTapOutside=f,r.clientId=d,r.context=u,window.google&&window.google.accounts&&window.google.accounts.id)r._onGoogleApiLoad();else{if(!s)throw TypeError("Google One Tap lib is not already loaded on the page. libSrcPath is required to load the library");m((function(){y(s,r._onGoogleApiLoad.bind(p(r)))}))}return r}return r(i,[{key:"_onGoogleApiLoad",value:function(){var e=this;return google.accounts.id.initialize({auto_select:this.autoSelect,client_id:this.clientId,prompt_parent_id:this.containerId,callback:this._handleCredentialResponse.bind(this),cancel_on_tap_outside:this.cancelOnTapOutside,context:this.context}),Promise.resolve().then((function(){return e.promptOneTap()}))}},{key:"_handleCredentialResponse",value:function(e){var t=e.credential,n=this.context===_.SIGN_UP?this._getBasicProfile(t):{idToken:t};if(n){n.selectedBy=e.select_by;var r=new CustomEvent(B,{detail:n});this.dispatchEvent(r)}}},{key:"_getBasicProfile",value:function(e){try{var t=new gapi.auth2.BasicProfile({id_token:e});return{email:t.getEmail(),familyName:t.getFamilyName(),givenName:t.getGivenName(),id:t.getId(),idToken:e,imageUrl:t.getImageUrl()}}catch(e){return this._dispatchSkippedEvent(e.message),null}}},{key:"_dispatchSkippedEvent",value:function(e){var t={message:e,reason:S.SKIPPED.ISSUING_FAILED,type:k.SKIPPED},n=new CustomEvent(H,{detail:t});this.dispatchEvent(n)}},{key:"promptOneTap",value:function(){var e=this;google.accounts.id.prompt((function(t){var n={type:t.getMomentType(),reason:t.getNotDisplayedReason()||t.getSkippedReason()||t.getDismissedReason()},r=new CustomEvent(H,{detail:n});e.dispatchEvent(r),e.checkIfDesktopAndApplyClass()}))}},{key:"hideOneTap",value:function(){google.accounts.id.cancel()}},{key:"checkIfDesktopAndApplyClass",value:function(){if(!/.*(iPad|iPod|iPhone|Android|BlackBerry).*/.test(navigator.userAgent)){var e=document.getElementById("credential_picker_container");e&&e.classList.add("credential_picker_container--desktop")}}}]),i}(f(EventTarget)),K={exports:{}},G="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function j(e){this.message=e}function V(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new j("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,r,i=0,o=0,a="";r=t.charAt(o++);~r&&(n=i%4?64*n+r:r,i++%4)?a+=String.fromCharCode(255&n>>(-2*i&6)):0)r=G.indexOf(r);return a}j.prototype=new Error,j.prototype.name="InvalidCharacterError";var z="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||V;function W(e){return decodeURIComponent(z(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}var J=function(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return W(t)}catch(e){return z(t)}};function Q(e){this.message=e}Q.prototype=new Error,Q.prototype.name="InvalidTokenError",K.exports=function(e,t){if("string"!=typeof e)throw new Q("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(J(e.split(".")[n]))}catch(e){throw new Q("Invalid token specified: "+e.message)}},K.exports.InvalidTokenError=Q;var X=K.exports,Y=w.GOOGLE_USER_FETCHED,Z=w.PROMPT_MOMENT,$=function(e){s(i,e);var n=v(i);function i(e){var r,o=e.autoSelect,a=void 0!==o&&o,s=e.buttonParentEl,c=e.cancelOnTapOutside,u=void 0===c||c,l=e.clientId,d=void 0===l?E:l,h=e.context,f=void 0===h?"signin":h,g=e.gsiButtonConfig,v=void 0===g?{}:g,w=e.libSrcPath,I=e.hasContentAbove,C=void 0!==I&&I,T=e.promptParentId,_=e.showOneTap,k=void 0===_||_;if(t(this,i),(r=n.call(this)).autoSelect=a,r.buttonParentEl=s,r.cancelOnTapOutside=u,r.clientId=d,r.context=f,r.gsiButtonConfig=v,r.isLibraryLoaded=b(),r.libSrcPath=w,r.hasContentAbove=C,r.promptParentId=T,r.showOneTap=k,window.google&&window.google.accounts&&window.google.accounts.id)r._onGoogleApiLoad();else{if(!w)throw TypeError("GSI lib is not already loaded on the page. libSrcPath is required to load the library");m((function(){y(w,r._onGoogleApiLoad.bind(p(r)))}))}return r}return r(i,[{key:"_onGoogleApiLoad",value:function(){var e=this;return this.isLibraryLoaded.resolve(),window.google.accounts.id.initialize({auto_select:this.autoSelect,client_id:this.clientId,prompt_parent_id:this.promptParentId,callback:this._handleCredentialResponse.bind(this),cancel_on_tap_outside:this.cancelOnTapOutside,context:P[this.context].GOT}),Promise.resolve().then((function(){return e.showGsiUI()}))}},{key:"showGsiUI",value:function(){this.buttonParentEl&&this.renderGSIButton(this.buttonParentEl,this.gsiButtonConfig),this.showOneTap&&this.promptOneTap()}},{key:"renderGSIButton",value:function(e,t){var n=this,r=t.locale,i=void 0===r?"en_US":r,o=t.logo_alignment,a=void 0===o?"center":o,s=t.shape,c=void 0===s?"pill":s,u=t.size,l=void 0===u?"large":u,d=t.text,h=t.theme,f=t.type,p=t.width,g=void 0===p?"400px":p;return this.isLibraryLoaded.then((function(){var t=d||P[n.context].GSI_BUTTON;window.google.accounts.id.renderButton(e,{locale:i,logo_alignment:a,shape:c,size:l,text:t,theme:h,type:f,width:g})}))}},{key:"promptOneTap",value:function(){var e=this;return this.isLibraryLoaded.then((function(){window.google.accounts.id.prompt((function(t){var n={type:t.getMomentType(),reason:t.getNotDisplayedReason()||t.getSkippedReason()||t.getDismissedReason()},r=new CustomEvent(Z,{detail:n});e.dispatchEvent(r),e.hasContentAbove||e.checkIfDesktopAndApplyClass()}))}))}},{key:"_handleCredentialResponse",value:function(e){var t=e.credential,n=e.select_by,r=X(t),i=a({},this._getBasicProfile(r),{idToken:t,selectedBy:n});if(i){var o=new CustomEvent(Y,{detail:i});this.dispatchEvent(o)}}},{key:"_getBasicProfile",value:function(e){return{email:e.email,familyName:e.family_name,givenName:e.given_name,id:e.sub,imageUrl:e.picture}}},{key:"hideOneTap",value:function(){window.google.accounts.id.cancel()}},{key:"checkIfDesktopAndApplyClass",value:function(){if(!/.*(iPad|iPod|iPhone|Android|BlackBerry).*/.test(navigator.userAgent)){var e=document.getElementById("credential_picker_container");e&&e.classList.add("credential_picker_container--desktop")}}}]),i}(f(EventTarget)),ee=N.DISMISSED,te=N.INITIALIZED,ne=N.SNAPPLE_USER_FETCHED,re=function(e){s(i,e);var n=v(i);function i(e){var r,o=e.libSrcPath,a=e.snappleCTA,s=e.clientId,c=void 0===s?A:s,u=e.redirectURI;if(t(this,i),r=n.call(this),!a)throw TypeError("snappleCTA is required. Please pass the correct CTA element to this Snapple Constructor");if(r.libSrcPath=o,r.clientId=c,r.redirectURI=r._getRedirectURL(u),r.snappleCTA=a,window.AppleID&&window.AppleID.auth&&window.AppleID.auth.init)r._onSnappleLibLoad();else{if(!o)throw TypeError("Snapple lib is not already loaded on the page. libSrcPath is required to load the library");m((function(){y(o,r._onSnappleLibLoad.bind(p(r)))}))}return r}return r(i,[{key:"_onSnappleLibLoad",value:function(){window.AppleID.auth.init({clientId:this.clientId,scope:"name email",redirectURI:this.redirectURI,usePopup:!0});var e=new CustomEvent(te);return this.dispatchEvent(e),Promise.resolve(this._attachEvents())}},{key:"_attachEvents",value:function(){var e=this;this.snappleCTA.addEventListener("click",(function(){return window.AppleID.auth.signIn().then((function(t){var n=new CustomEvent(ne,{detail:t});e.dispatchEvent(n)})).catch((function(t){var n=new CustomEvent(ee,{detail:{type:ee,message:t}});e.dispatchEvent(n)}))}))}},{key:"_getRedirectURL",value:function(e){var t=window.location.host.indexOf("linkedin.com")>-1;return this.redirectURI?e:t?O:R}}]),i}(f(EventTarget)),ie={CLIENT_ID:E,EVENTS:w,GOOGLE_ACCOUNT_URL:I,GSI_ERROR_TYPES:C,GSI_ERROR_MESSAGES:T,GOT_CONTEXTS:_,GOT_PROMPT_MOMENT_REASONS:S,GOT_PROMPT_MOMENT_TYPES:k};e.GoogleGsi=$,e.GoogleOneTap=q,e.GoogleSignIn=F,e.GoogleSignInConstants=ie,e.SnappleAuth=re,e.SnappleEvents=N,Object.defineProperty(e,"__esModule",{value:!0})})(Os.exports);const Rs="loader--absolute",Ns="loader--show",Ps="loader--full-screen",Ms="no-scroll",Ds="loader-wrapper";class Ls{constructor(e){let{wrapperEl:t}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("Loader el required");if(t&&!t.contains(e))throw new Error("Wrapper element is not a parent of the Loader el");this.el=e,this.wrapperEl=t,this.isAbsoluteVariant=this.wrapperEl&&this.el.classList.contains(Rs),window.addEventListener("pagehide",(e=>{let{persisted:t}=e;t&&this.hide()}))}show(){this.el.classList.add(Ns),this.el.classList.contains(Ps)&&document.body.classList.add(Ms),this.isAbsoluteVariant&&this.wrapperEl.classList.add(Ds)}hide(){this.el.classList.remove(Ns),document.body.classList.remove(Ms),this.isAbsoluteVariant&&this.wrapperEl.classList.remove(Ds)}}const xs=/.*(iPad|iPod|iPhone|Android|BB10|BlackBerry|IEMobile).*/;const{EVENTS:Us,GOT_CONTEXTS:Fs,GOT_PROMPT_MOMENT_REASONS:Bs,GOT_PROMPT_MOMENT_TYPES:Hs}=Os.exports.GoogleSignInConstants,{GOOGLE_USER_FETCHED:qs,PROMPT_MOMENT:Ks}=Us,{SIGN_IN:Gs}=Fs,js=[Bs.NOT_DISPLAYED.BROWSER_NOT_SUPPORTED,Bs.NOT_DISPLAYED.OPT_OUT_OR_NO_SESSION,Bs.NOT_DISPLAYED.SUPPRESSED_BY_USER],Vs=[Bs.SKIPPED.AUTO_CANCEL,Bs.SKIPPED.TAP_OUTSIDE,Bs.SKIPPED.USER_CANCEL],zs=Object.freeze({ONE_TAP:"one_tap",ONE_TAP_AUTO_LOGIN:"one-tap-auto-login",BUTTON:"button"});class Ws{constructor(e){let{clientId:t,globalWindow:n=window,onNotDisplayed:r,onSkipped:i}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.buttons=Array.from(document.querySelectorAll(".google-auth-button__placeholder")),this.clientId=t,this.isLinkedInAppWebView=!0===As("isLinkedInAppWebView"),this.el=e,this.showOneTap=!this.isLinkedInAppWebView,(this.buttons.length||this.showOneTap&&this.el)&&(this.useAutoSelect=this._shouldAutologin(),this.isTermsAndConditionsSkipEnabledOneTap=As("isTermsAndConditionsSkipEnabledOneTap"),this.isTermsAndConditionsSkipEnabledAuthButton=As("isTermsAndConditionsSkipEnabledAuthButton"),this.window=n,this.onNotDisplayed=r,this.onSkipped=i,this.loader=new Ls(this.el.querySelector(".loader"),this.el),this._initGoogleAuth(),this._isMobile=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return!!e&&xs.test(e)}())}_initGoogleAuth(){return this.window.lazyloader.then((e=>e.getLazyLoadedJavascriptModule("google-gsi-lib"))).then((()=>{const e=As("googleAuthLibraryPath");if(e)return this.googleGsiInstance=new Os.exports.GoogleGsi({autoSelect:this.useAutoSelect,cancelOnTapOutside:!1,clientId:this.clientId,context:Gs,hasContentAbove:this.isTermsAndConditionsSkipEnabledOneTap,libSrcPath:ws.sanitizeUrl(e),promptParentId:this.isTermsAndConditionsSkipEnabledOneTap?"google-one-tap__container":void 0,showOneTap:this.showOneTap}),this._initButtons(),this.googleGsiInstance.addEventListener(qs,(e=>{let{detail:t}=e;const{email:n,familyName:r,givenName:i,idToken:o,imageUrl:a,selectedBy:s}=t;this.loader.show();const c=this._getRequestType(s);this._addGoogleFieldToForm("googleGivenName",i),this._addGoogleFieldToForm("googleIdToken",o),this._addGoogleFieldToForm("googleFamilyName",r),this._addGoogleFieldToForm("googleImageUrl",a),this._addGoogleFieldToForm("googleEmail",n),this._addGoogleFieldToForm("soogleLoginRequestType",c),this._addGoogleFieldToForm("apfc",function(){try{const e={};return void 0!==window.globalThis.apfcDf&&(e.df=window.globalThis.apfcDf),JSON.stringify(e)}catch(e){return JSON.stringify({error:e.message})}}());const u=c===zs.BUTTON?"google-sign-in--account-selected":"google-one-tap--account-selected";this._fireControlInteractionEvent(u),this._conditionalIncludeTermsAndConditionsSkip(u),this.el.submit()})),this.googleGsiInstance.addEventListener(Ks,(e=>{let{detail:t}=e;const{reason:n,type:r}=t;let i="google-one-tap-moment--".concat(r);i=n?"".concat(i,"-").concat(n):i,this._fireControlInteractionEvent(i);const o=this.el.querySelector(".google-one-tap__module");if(n){if(this._fireCounterIngraphMetric(r,n),r===Hs.SKIPPED){if(n===Bs.SKIPPED.USER_CANCEL&&(null==o||o.classList.add("hidden"),this._fireControlInteractionEvent("google-one-tap--user-dismissed")),this.onSkipped)this.onSkipped(t);else if(-1===Vs.indexOf(n))throw Error("GoogleOneTapError ".concat(r,": ").concat(n))}else if(r===Hs.DISPLAY)if(this.onNotDisplayed)this.onNotDisplayed(t);else if(-1===js.indexOf(n))throw Error("GoogleOneTapError ".concat(r,": ").concat(n))}else if(r===Hs.DISPLAY){if(this._isMobile){const e=document.querySelector("#credential_picker_iframe");if(e){new ResizeObserver((e=>{for(let t of e)o&&(0===t.contentRect.height?o.classList.add("hidden"):(o.classList.remove("hidden"),o.style.bottom="".concat(t.contentRect.height,"px")))})).observe(e)}}else null==o||o.classList.remove("hidden");this._fireViewModuleImpressionEvent("google-one-tap")}})),this.googleGsiInstance}))}_fireCounterIngraphMetric(e,t){let n="";e===Hs.DISPLAY&&t===Bs.NOT_DISPLAYED.OPT_OUT_OR_NO_SESSION?n="GoogleAuthDisabledOrNoSessionError":(Vs.indexOf(t)>=0||js.indexOf(t)>=0)&&(n="GoogleAuthMiscError"),n&&this.window.ingraphTracking.then((e=>{e.fireCounterIngraphMetric({metricsType:n})}))}_fireViewModuleImpressionEvent(e){this.window.tracking&&this.window.tracking.then((t=>{zi(t,[e])}))}_fireControlInteractionEvent(e){this.window.tracking&&this.window.tracking.then((t=>{t.fireControlInteractionEvent(e)}))}_initButtons(){var e,t;null!==(e=this.buttons)&&void 0!==e&&e.length&&(this._fireViewModuleImpressionEvent("google-button-view"),null===(t=this.buttons)||void 0===t||t.forEach((e=>{this.googleGsiInstance.renderGSIButton(e,this._getButtonConfig(e))})))}_getButtonConfig(e){if(e){const t=e.parentElement.offsetWidth-2;return{text:e.dataset.text||"continue_with",width:t}}return{}}_getRequestType(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";switch(!0){case"auto"===e:return zs.ONE_TAP_AUTO_LOGIN;case e.indexOf("user")>-1:return zs.ONE_TAP;default:return zs.BUTTON}}_addGoogleFieldToForm(e,t){const n=document.createElement("input");n.type="hidden",n.name=e,n.id=e,n.value=t,this.el.appendChild(n)}_shouldAutologin(){return!(null!==H("li_g_recent_logout"))}_conditionalIncludeTermsAndConditionsSkip(e){"google-one-tap--account-selected"===e?As("termsAndConditionsRendered")&&this._addGoogleFieldToForm("termsAndConditionsSkip",!0):"google-sign-in--account-selected"===e&&this.isTermsAndConditionsSkipEnabledAuthButton&&this._addGoogleFieldToForm("termsAndConditionsSkip",!0)}}const Js=document.getElementById("config");let Qs,Xs,Ys,Zs,$s,ec,tc,nc,rc,ic,oc,ac,sc,cc,uc,lc;function dc(e,t){window[e]&&window[e].resolve?window[e].resolve(t):window[e]=Promise.resolve(t)}Js&&Js.dataset&&(Qs=Js.dataset.appId||"seo",Xs=Js.dataset.appVersion||"0.0.0",Zs=Js.dataset.browserId,Ys=Js.dataset.callTreeId||null,rc=void 0!==Js.dataset.enablePageViewHeartbeatTracking,$s=Js.dataset.trackingPageType||void 0,ec="string"==typeof Js.dataset.jetTags&&Js.dataset.jetTags.split(",")||[],tc=Js.dataset.multiproductName||"undefined-frontend-mpName",nc=Js.dataset.serviceName||"undefined-frontend-serviceName",ic=Js.dataset.pageInstance||void 0,oc=Js.dataset.memberId,lc=void 0!==Js.dataset.isLoggedIn,ac=Js.dataset.logoutUrl,sc=void 0!==Js.dataset.isTrackingRetryEnabled,cc=void 0!==Js.dataset.disableElementInViewportConditionForLazyload,uc=void 0!==Js.dataset.isLiSugrTrackingEnabled);const hc={};cc&&(hc.disableElementInViewportCondition=cc),dc("lazyloader",function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return le=le||new ue(e),le}(hc)),L((()=>{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?"".concat(n.content).concat(i||t.skipSuffix?"":"_jsbeacon"):""}(document),t=document.querySelector('meta[name="locale"]').content;let n;if(ic&&ic.split(";").length>=2)n=Uint8Array.from(window.atob(ic.split(";")[1]),(e=>e.charCodeAt(0))),n=Array.from(n);else{n=[];for(let e=0;e<16;e++){let t=nc.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:u=!1,customDelegate:l={},retryConfig:d=null,isLoggedIn:h=!1,customTransporterHosts:f}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const p={appId:e,appVersion:t,locale:n,multiproduct:r,service:i,endpoint:a,disableCompression:u,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}};o&&(p.treeID=o);const g=new hr(p);return new mr(g,Z({customTransporterHosts:f,preTransporter:e=>Z(Z({},e),{},{meta:Wi(e.meta)}),shouldAnonymizeMemberId:()=>!!d&&!h},l))}({appId:Qs,appVersion:Xs,locale:t,multiproduct:tc,service:nc,callTreeId:Ys,retryConfig:sc?{}:null,endpoint:"/li/track",isLoggedIn:lc,disableCompression:!1,customTransporterHosts:{sponsoredTransporter:ks}});r.fireTrackingEvent=r.fireEvent,r.generateTrackingId=yt,r.generateBase64UUID=mt,r.generateByteUUID=gt;const i={applicationUrn:"urn:li:application:(".concat(tc,",").concat(nc,")"),version:Xs,trackingId:n};r.updateAppState({applicationViewerUrn:Qi({browserId:Zs,isLoggedIn:lc,memberId:oc}),clientApplicationInstance:i});const o=new Ga(r);r.fireControlInteractionEvent=o.fireControlInteractionEvent.bind(o),r.fireLinksterImpressionEvent=o.fireLinksterImpressionEvent.bind(o),r.convertUuidTrackingIdToBase64=o.convertUuidTrackingIdToBase64.bind(o),sc&&r.checkAndEnablePersistentRetry(),o.navigate(e,$s,uc);const a=new Yi(window.IntersectionObserver,r,{componentList:[...document.querySelectorAll("[data-impression-id]")],onImpression:Zi,onUnobservation:$i});rc&&new za(r),dc("tracking",r),dc("impressionTracking",a),dc("pemTracking",new M("Default - PEM Tracking Instance",((t,n,i)=>{r.fireEvent(t,n,{context:{pageKey:e,pageInstance:i}})})));const s=new Gi({"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 Aa(r).bind(ec,Ys);const c=document.querySelector('meta[name="clientSideIngraphs"]');if(c){const{gaugeMetricEndpoint:t,counterMetricEndpoint:n}=c.dataset,i=r.getCurrentContext().pageInstance,o=new Se({counterMetricEndpoint:n,gaugeMetricEndpoint:t,pageKey:e,pageInstanceHeader:i});new Ra({ingraphs:o}),dc("ingraphTracking",o),o.firePageLoadTimeMetric(),o.fireSeoPageViewMetric(),o.attachWebVitalsMetrics()}if(co(),document.querySelector(".global-alert-banner")){new ka({enableControlInteractionEvents:!0,trackingInstance:r})}if(!!document.head.querySelector('link[rel="manifest"]')){dc("appDetection",new Sa(((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",Q(n)),t.setAttribute("data-test-id","msafdf"),t.onload=()=>{window.mouselog.init()},e.appendChild(t)}}(),lc&&ac&&Ts(ac);const u=document.querySelector(".meta-tags-for-chameleon-display");u&&new _s(u);const l=document.querySelector(".google-auth");l&&new Ws(l)}))}();
