/* Auto generated, hash = cys5teyoqzw6ex2zlk0f8x7di */ !function(){function e(){(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{23:function(e,t,n){n.d(t,"a",function(){return u});var r=n(25),o=n(0);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=e.title,r=e.text;if(!t)throw Error("url is mandatory");if("string"!=typeof t)throw Error("url should be of type string"); if(n&&"string"!=typeof n)throw Error("title should be of type string");if(r&&"string"!=typeof r)throw Error("text should be of type string");var o="url\x3d".concat(t);return n&&(o="".concat(o,"\x26title\x3d").concat(n)),r&&(o="".concat(o,"\x26text\x3d").concat(r)),"".concat("linkedinlite://share","?").concat(o)}(n))):ee?(r&&Object(s.b)(r),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.url,n=e.title,r=e.text;if(!t)throw Error("url is mandatory");if("string"!=typeof t)throw Error("url should be of type string"); if(n&&"string"!=typeof n)throw Error("title should be of type string");if(r&&"string"!=typeof r)throw Error("text should be of type string");ee?navigator.share({url:t,title:n,text:r}):Promise.reject("Native share not supported")}(n)):(o&&Object(s.b)(o),!z&&(e.preventDefault(),Object(A.b)(K.SOCIAL_SHARE_OVERLAY),document.body.classList.add(q),C=Object(d.f)({el:K.SOCIAL_SHARE_OVERLAY,focusElement:K.SOCIAL_SHARE_ANCHOR,escCallback:G})))},ae=function(e,t){var n;n=X&&!(ee||te),z&&!$&&!ee||n?Object(A.a)(e): e&&e.addEventListener("click",function(n){return ie(n,e,t)})};var ce=n(11),se="#semaphoreTemplate",de="#heading",le="#sectionContent",ue="#footerNestedAction",fe=function(e,t){var n=e.options,r=document.importNode(document.querySelector(se).content,!0),o=document.importNode(document.querySelector(ue).content,!0),i=document.createElement("div");r.querySelector(de).textContent=e.headings.helpUnderstandThis;var a=null;return n.find(function(e){if("ACTION"===e.type&&t===e.action.title){var n=e.action, i=n.confirmAction?n.confirmAction.messages:n.body,c=n.confirmAction?n.confirmAction.title:n.title;r.querySelector(de).textContent=c;var s=n.actionUrl,d=o.querySelector(".submit-button-semaphore");Object(ce.a)(d,{state:"default"}),o.querySelector('[data-action-title\x3d"submit-button"]').setAttribute("data-action-url",s),a=he(c,i)}else if("SECTION"===e.type&&t===e.section.title){var l=e.section.options.map(function(e){var t={},n=null;return"ACTION"===e.type?(n=e.action,t.actionUrl=n.actionUrl,t.type= "action"):(n=e.openLink,t.actionUrl=n.url,t.type="link"),t.title=n.title,t.body=n.body,t.trackingId=n.trackingId,t});a=l.map(function(e){return'\x3cli class\x3d"semaphore-list-item list-section"\x3e\n \x3cinput type\x3d"radio" id\x3d"'.concat(W.a.htmlEncode(e.trackingId),'-radio" name\x3d"action-selected" class\x3d"small" data-action-url\x3d"').concat(W.a.sanitizeUrl(e.actionUrl),'" \n data-action-title\x3d"radio-button" data-action-type\x3d"').concat(W.a.htmlEncode(e.type), '"/\x3e\n \x3clabel for\x3d"').concat(W.a.htmlEncode(e.trackingId),'-radio" class\x3d"body-medium"\x3e\n \x3cspan class\x3d"text-content"\x3e').concat(W.a.htmlEncode(e.title),'\x3c/span\x3e\n \x3cp class\x3d"body-small-light"\x3e').concat(e.body?W.a.htmlEncode(e.body):"","\x3c/p\x3e\n \x3c/label\x3e\x3c/li\x3e")}).join("")}}),r.querySelector(le).innerHTML=a,i.appendChild(r),i.appendChild(o),i.innerHTML};function pe(e,t){var n=document.importNode(document.querySelector(se).content, !0),o=document.importNode(document.querySelector(ue).content,!0),i=document.createElement("div");n.querySelector(de).textContent=e.headings.helpUnderstandThis;var a="",c=function e(t,n){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:_e,o=document.importNode(document.querySelector(Oe).content,!0),i=document.createElement("div"),a=e.options.map(function(e){var t={actionUrl:"INITIALIZE"};return"ACTION"===e.type?(t.title= e.action.title,t.trackingId=e.action.trackingId):(t.title=e.section.title,t.trackingId=e.section.trackingId),t}),c=ke(a);r.isHeadingsV2?(t=e.headingsV2[r.headingType],n=e.headingsV2[r.subHeadingType]):(t=e.headings[r.headingType],n=e.headings[r.subHeadingType]);return o.querySelector(we).textContent=t,n&&(o.querySelector("#semaphore-sub-heading").textContent=n),o.querySelector(Se).innerHTML=c,i.appendChild(o),i.innerHTML}(e,r);break;case "Additional-Actions":l=ge(e,0,n);break;case "Nested-Actions":l= o?pe(e,n):fe(e,n);break;case "sponsored":i=e,a=n,c=document.importNode(document.querySelector(Oe).content,!0),s=document.createElement("div"),d=ke(i),c.querySelector(we).textContent=a,c.querySelector(Se).innerHTML=d,s.appendChild(c),l=s.innerHTML}return l};function ke(e){return e.map(function(e){return'\x3cli class\x3d"semaphore-list-item body-medium"\n data-action-url\x3d"'.concat(e.actionUrl,'" data-action-title\x3d"').concat(W.a.htmlEncode(e.title),'"\x3e\n \x3cbutton class\x3d"content-wrapper"\x3e\n \x3cspan class\x3d"text-content body-medium"\x3e').concat(W.a.htmlEncode(e.title), '\x3c/span\x3e\n \x3cli-icon class\x3d"right-arrow" type\x3d"chevron-right-small" category\x3d"ui"\x3e\x3c/li-icon\x3e\n \x3c/button\x3e\n \x3c/li\x3e')}).join("")}var Ie=n(50),Ce=Object.freeze({EI:"https://platform.linkedin-ei.com/litms/vendor/qualtrics/v1.64.0/",PROD:"https://platform.linkedin.com/litms/vendor/qualtrics/v1.64.0/"});n(31);function Te(e){return(Te="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&& "function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function je(e,t){for(var n=0;n=this.sampleRate/100? 0:100),e=[this.sampleType,this.sampleRate,0],Object(r.K)(this.qsiId,e.join(":"),this.expiration,"")}var t=e[1];if(100==t)return!0;switch(e[0]){case "visitor":return!1;case "pageview":return t=e[2]%Math.floor(100/t),e[2]++,Object(r.K)(this.qsiId,e.join(":"),this.expiration,""),!t}return!0}},{key:"getIdString",value:function(e){e+="\x3d";for(var t=document.cookie.split(";"),n=0,r=t.length;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};if(null===(t=window.QSI)||void 0===t||!t.API)return Promise.resolve();var r=n.data,o=n.interceptId,i=n.onOpen,a=void 0===i?function(){}:i,c=n.onClose,s=void 0===c?function(){}:c;window.$qualtricsSurveyId=e,window.$qualtricsSurveyData=Ne({},r),window.QSI.API.unload();var d=Promise.resolve();return o&&(window.$qualtricsSurveyId=o,d=window.QSI.API.getIntercept(o).then(function(e){var t=e.onClose(function(){s(),t()})})),d.then(window.QSI.API.load).then(window.QSI.API.run).then(a).then(Ke)} var Fe=n(48),Be=n(6),Je=n(30);function Ge(e){return(Ge="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function");}function Qe(e,t){for(var n=0;n8&&void 0!==arguments[8]&&arguments[8],u=arguments.length>9?arguments[9]:void 0;Ve(this,e),Xe&&(this.semaphoreUrl=o?"/psettings/flagging-menu?entityUrn\x3d".concat(t,"\x26contentSource\x3d").concat(i,"\x26authorProfileId\x3d").concat(o):"/psettings/flagging-menu?entityUrn\x3d".concat(t,"\x26authorUrn\x3d").concat(n,"\x26contentSource\x3d").concat(i),this.actionsArray=[],this.callback=c,this.targetEl=a,this.entityUrn= t,this.vanityName=s,this.screen="INITIALIZE",this.initialModalHTML=null,this.sempahoreJSON=null,this.selected=null,this.prevSelectedTitles=[],this._boundHideHandler=this._hideSemaphoreList.bind(this),this.headingConfig=d,this.showRedesignSemaphoreUi=l,this.focusElement=u,this.isSubmit=!1,this.isQualtricsEnabled=Object(r.l)("isQualtricsEnabled"),this.isQualtricsEnabled&&Ue({zoneId:"ZN_6xkUDNpjYdBmEJM"}))}var t,n,o;return t=e,(n=[{key:"_renderInitialSemaphoreTemplate",value:function(e){this.sempahoreJSON= e,this.initialModalHTML=Ee(e,"INITIALIZE",null,this.headingConfig,this.showRedesignSemaphoreUi),Object(r.M)(et,this.initialModalHTML),this.selectedTitles=["INITIALIZE"],this._showSemaphoreList(),at(this._boundHideHandler)}},{key:"_renderNestedSemaphoreTemplate",value:function(){var e=Ee(this.sempahoreJSON,this.screen,this.selected,null,this.showRedesignSemaphoreUi);Object(r.M)(et,e),at(this._boundHideHandler)}},{key:"_showSemaphoreList",value:function(){var e=this;Xe&&(Xe.classList.remove("hidden"), et.setAttribute("role","dialog"),Ze=this.focusElement||document.activeElement,document.body.classList.add("lock-screen"),ze=this._handleOverlayActions.bind(this),$e=function(t){if(t.data&&t.data.content)return!1;e.isQualtricsEnabled&&e.isSubmit&&He("ZN_6xkUDNpjYdBmEJM",it),e._hideSemaphoreList()},et.addEventListener("click",ze),Xe.addEventListener("click",$e))}},{key:"_hideSemaphoreList",value:function(){this.screen="INITIALIZE",Object(r.M)(et,this.initialModalHTML),Xe&&(document.body.classList.remove("lock-screen"), Ye&&Ye(),Ze&&Ze.focus(),Xe.classList.add("hidden"),et.removeEventListener("click",ze),Xe.removeEventListener("click",$e))}},{key:"getSemaphoreList",value:function(e,t){var n=LI.fetchJSON(this.semaphoreUrl,{method:"GET"});t&&Object(Be.e)(this.semaphoreUrl,n,e),n.then(this._renderInitialSemaphoreTemplate.bind(this)).catch(function(e){throw new Error(e);})}},{key:"_getNestedSemaphore",value:function(e){var t=e.getAttribute("data-action-title");this.screen="Nested-Actions",this.selected=t,this.selectedTitles.push(this.selected), function(e){We=[].indexOf.call(e.parentNode.children,e)}(e),this._renderNestedSemaphoreTemplate()}},{key:"_getPreviousScreen",value:function(){var e=this.selectedTitles[this.selectedTitles.length-2];e?"INITIALIZE"===e?(this.screen="INITIALIZE",this.selectedTitles=["INITIALIZE"],Object(r.M)(et,this.initialModalHTML),at(this._boundHideHandler,ct())):(this.screen="Nested-Actions",this.selected=e,this.selectedTitles=this.selectedTitles.filter(function(t){return t!==e}),this._renderNestedSemaphoreTemplate()): (this.screen="INITIALIZE",this.selectedTitles=["INITIALIZE"],Object(r.M)(et,this.initialModalHTML),at(this._boundHideHandler,ct()))}},{key:"_getAdditionalActions",value:function(){this.screen="Additional-Actions",this._renderNestedSemaphoreTemplate()}},{key:"_handleOverlayActions",value:function(e){var t=this;e.data={content:!0};var n,o,i,a=e.target.closest("[data-action-title]"),c=a||e.target,s=c.getAttribute("data-action-title"),d=c.getAttribute("data-action-url");if("INITIALIZE"===d&&(s="INITIALIZE"), s)switch(s){case "INITIALIZE":this._getNestedSemaphore(c);break;case "back-button":this.showRedesignSemaphoreUi?this._getPreviousScreen():(this.screen="INITIALIZE",Object(r.M)(et,this.initialModalHTML),at(this._boundHideHandler,ct()));break;case "submit-button":d&&("link"===(i=c.getAttribute("data-action-type"))?(window.open(d,"_blank"),this._hideSemaphoreList()):LI.fetch(d,{method:"POST",headers:{"X-IsAJAXForm":1}}).then(function(){return t._getAdditionalActions(c)})),this.isSubmit=!0;break;case "radio-button":n= et.querySelector(".submit-button-semaphore"),Object(ce.a)(n,{state:"default"}),(o=n.closest('[data-action-title\x3d"submit-button"]'))&&(i=c.getAttribute("data-action-type"),o.setAttribute("data-action-url",d),o.setAttribute("data-action-type",i)),this.selected=c.getAttribute("id"),this.showRedesignSemaphoreUi&&this._showAdditionInfo(this.selected);break;case "remove-connection":LI.fetchForJSONRequest(tt,{method:"POST",body:{disconnectVanityName:this.vanityName}}).then(this._hideSemaphoreList()); break;case "block-profile":this.screen="INITIALIZE",LI.fetch(d,{method:"POST",headers:{"X-IsAJAXForm":1}}).then(this._hideSemaphoreList());break;case "done-button":this.callback&&this.callback(e),this.isQualtricsEnabled&&this.isSubmit&&He("ZN_6xkUDNpjYdBmEJM",it),this._hideSemaphoreList();break;case "cancel-button":this.isQualtricsEnabled&&this.isSubmit&&He("ZN_6xkUDNpjYdBmEJM",it),this._hideSemaphoreList();break;case "RECENT_ACTIVITIES":if(this.showRedesignSemaphoreUi){var l="".concat(window.location.pathname).concat(nt); Object(Fe.a)(l)}break;case "MESSAGING":this.showRedesignSemaphoreUi&&Object(Fe.a)(rt)}}},{key:"_showAdditionInfo",value:function(e){var t=et.querySelectorAll(".semaphore__additionalInfo");0!==t.length&&t.forEach(function(t){t.id==="".concat(e,"-additional-info")?Object(r.P)(t):Object(r.r)(t)})}}])&&Qe(t.prototype,n),o&&Qe(t,o),Object.defineProperty(t,"prototype",{writable:!1}),e}(),ht=n(53),yt=".job-description",mt="#company-logo",bt="#company-name",vt=".connections-container",gt="a.flex-entity-lockup", Ot='.connection-details-action li-icon[type^\x3d"messages-"]',wt=".apply-btn, .js-apply-btn",St="company_logo_click",_t="company_name_click",Et="js_connections_message_initiate",kt="jd_connections_profile_view",It="click",Ct="load",Tt=Object(r.l)("jobPostingActivityLog"),jt=Object(r.l)("isSponsored")||!1,At=Object(r.n)("eBP"),Rt=document.querySelector(".dropdown-content"),Pt=document.querySelector(".dropdown-trigger"),Nt=document.querySelector(".share-job-button-wrapper"),Lt=Object(r.l)("shareJobDescription"), Dt=Object(r.l)("shareJobTitle"),Mt=Object(r.l)("jobUrl"),xt=Object(r.l)("posterUrn")||"urn:li:member:0",Kt=Object(r.l)("posterProfileId")||"",qt="urn:li:jobPosting:".concat(Object(r.l)("jobId")),Ut="PREMIUM"===Object(r.l)("jobType")?"JOBS_PREMIUM":"JOBS_VIEW";(dt=(st=yt)instanceof HTMLElement?st:document.querySelector(st))&&dt.addEventListener("click",function(e){e.target.closest(".text-expand-collapse-button")&&function(e){var t=e.querySelector(".text-expand-collapse-button");e.querySelector(".description").classList.toggle("truncated"); var n="true"!==t.getAttribute("aria-expanded");t.setAttribute("aria-expanded",n)}(dt)}),function(){var e=document.querySelector("#job-apply");if(e){var t=e.getAttribute("data-jce-is-internal");t&&e.addEventListener("click",function(e){return function(e,t){var n=e.target.closest("#job-apply");n&&Object(i.a)(n.dataset.litmsTrackingControlName),LI.fetchJSON(o.a.JOBS_JOB_APPLY_CLICK,{method:"POST",body:{jobId:a,referenceId:c,isInternalApplyJob:t}}).catch(function(){})}(e,t)})}}(),(lt=document.querySelector("#save-unsave-btn"))&& lt.addEventListener("click",b),ut=document.querySelector("#easyApplyDeprecationContinueToAppLink"),ft=document.querySelector("#easyApplyDeprecationDownloadAppLink"),ut&&ut.addEventListener("click",v),ft&&ft.addEventListener("click",g),new w.a({selector:".job-item",deferInitialTracking:!1}),Object(O.a)(),window.addEventListener(Ct,function(){var e,t;window.dispatchEvent(Object(r.f)(r.a,{displayed:!1})),null!==Tt&&function(){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,o=Object(S.f)(),i=Object(S.e)(o),a="".concat(i.pageUrn,";").concat(i.trackingId),c={sponsored:t,originPageInstance:a,encryptedBiddingParameters:n||"NotAvailable",appId:k};(c=E()(c,e)).encryptedPricingParams&&c.jobPosting&&c.activityType&&LI.fetchDefault("/jobposting/api/jobPostingActivityLogs",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset\x3dUTF-8","csrf-token":Object(r.F)(),"X-RestLi-Protocol-Version":"2.0.0", "x-li-lang":document.documentElement.lang},body:JSON.stringify(c)})}(Tt,jt,At),(e=document.querySelector(vt))&&e.addEventListener(It,function(e){e.target.closest(Ot)?Object(s.b)(Et):e.target.closest(gt)&&Object(s.b)(kt)}),(t=document.querySelector(wt))&&t.addEventListener(It,function(){var e=event.target.closest(wt);if(e){var t=e.getAttribute("data-cie");t&&Object(s.b)(t)}}),function(){if(!Pt)return;ae(Nt,{url:Mt,title:Dt,text:Lt});var e=new pt(qt,xt,Kt,Ut,Pt);Pt.addEventListener("click",function(t){var n= t.target.closest("[data-action]"),r=n&&n.getAttribute("data-action");switch(r){case "toggle":if(Pt.dropdown)Pt.dropdown.toggle();else{var o=new T.a({container:Rt,hideOnClickInside:!0});o.render(),Pt.dropdown=o}break;case "report-job":Object(s.b)(r),e.getSemaphoreList()}})}()}),Object(i.c)(ht.a.JOBS,!0),document.querySelector(mt).addEventListener(It,function(){Object(s.b)(St)}),document.querySelector(bt).addEventListener(It,function(){Object(s.b)(_t)})},33:function(e,t,n){n.d(t,"a",function(){return _}); var r=n(28),o=n(4);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n999)throw new P("Please only specify positive integer response codes between 1 and 999 for the ".concat(t," option. ")+"".concat(e," was specified. ").concat(g,"."));if(429===e||999===e)throw new P("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===k.UntrackedResponseCodes&&(e<500||e>=600))throw new P("For server responses that have a status code, PEM does not consider non-5xx as degradations by default "+"anymore. ".concat(e," is not considered a degradation unless you explicitly add it to the ")+"".concat(k.TrackedResponseCodes," option. Please remove ").concat(e," from the ")+"".concat(k.UntrackedResponseCodes," option. ").concat(g,"."));};if(void 0!==e&&!Array.isArray(e))throw new P("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(k.UntrackedResponseCodes," option. ")+"".concat(g,"."));if(void 0!==t&&!Array.isArray(t))throw new P("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(k.TrackedResponseCodes," option. ").concat(g,"."));e&&e.forEach(function(e){return n(e,k.UntrackedResponseCodes)});t&&t.forEach(function(e){return n(e,k.TrackedResponseCodes)})}(a, c),this._untrackedResponseCodes=a||[],this._trackedResponseCodes=c||[],this._clientSensorGroupName=r.clientSensorGroupName,function(e){Object.keys(e).forEach(function(e){if(!R.has(e))throw new P("An unsupported degradation tracking option '".concat(e,"' was provided. Please fix or remove it. ")+"".concat(g));})}(r)}return b(e,[{key:"featureKey",get:function(){return this._featureKey}},{key:"degradationKey",get:function(){return this._degradationKey}},{key:"productName",get:function(){return this._productName}}, {key:"untrackedResponseCodes",get:function(){return this._untrackedResponseCodes}},{key:"trackedResponseCodes",get:function(){return this._trackedResponseCodes}},{key:"clientSensorGroupName",get:function(){return this._clientSensorGroupName}}],[{key:"isDegradationTrackingMetadata",value:function(t){return null!=t&&Object.getOwnPropertyNames(e.prototype).every(function(e){return Object.hasOwnProperty.call(Object.getPrototypeOf(t),e)})}}]),e}();function K(e,t){if(!e.includes("/"))return e;var n=function(e){var t= document.createElement("a");return t.href=e,t.pathname}(e).split("/").filter(function(e){return e.length});if(!t.length)return n.join("/");for(var r=[],o=n.length-1;o>=0;o--){var i=n[o],a=t.indexOf(i);a>=0?t.splice(a,1):r.push(i)}return r.reverse().join("/")}!function(e){e.ProductName="productName",e.CustomTrackingId="customTrackingId",e.ClientSensorGroupName="clientSensorGroupName",e.AdditionalDegradedResponseCodes="additionalDegradedResponseCodes",e.NonDegradedResponseCodes="nonDegradedResponseCodes", e.DegradationKeyOverrides="degradationKeyOverrides"}(M||(M={}));var q=new Set(Object.values(M)),U=function(){function e(t,n,r){if(v(this,e),this._featureKey=D(t),this._defaultDegradationKey=D(n),!r)return this._nonDegradedResponseCodes=new Set,this._additionalDegradedResponseCodes=new Set,void(this._degradationKeyOverrides=[]);if("object"!==o(r))throw new P("FailureTrackingMetadata options should be an object. ".concat(g,"."));var i=r.additionalDegradedResponseCodes,a=r.nonDegradedResponseCodes;this.validateResponseCodes(i, a),this._nonDegradedResponseCodes=new Set(a),this._additionalDegradedResponseCodes=new Set(i),this._degradationKeyOverrides=r.degradationKeyOverrides||[],this._clientSensorGroupName=r.clientSensorGroupName,this._customTrackingId=r.customTrackingId;var c=r.productName;c&&(this._productName=L(c)),function(e){Object.keys(e).forEach(function(e){if(!q.has(e))throw new P("An unsupported failure tracking option '".concat(e,"' was provided. Please fix or remove it. ")+"".concat(g));})}(r)}return b(e,[{key:"featureKey", get:function(){return this._featureKey}},{key:"defaultDegradationKey",get:function(){return this._defaultDegradationKey}},{key:"productName",get:function(){return this._productName}},{key:"nonDegradedResponseCodes",get:function(){return this._nonDegradedResponseCodes}},{key:"additionalDegradedResponseCodes",get:function(){return this._additionalDegradedResponseCodes}},{key:"degradationKeyOverrides",get:function(){return this._degradationKeyOverrides}},{key:"customTrackingId",get:function(){return this._customTrackingId}}, {key:"clientSensorGroupName",get:function(){return this._clientSensorGroupName}},{key:"validateResponseCodes",value:function(e,t){var n=function(e,t){if(!A(e)||e<=0||e>999)throw new P("Please only specify positive integer response codes between 1 and 999 for the ".concat(t," option. ")+"".concat(e," was specified. ").concat(g,"."));if(429===e||999===e)throw new P("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===M.NonDegradedResponseCodes&&(e<500||e>=600))throw new P("For server responses that have a status code, PEM does not consider non-5xx as degradations by default "+"anymore. ".concat(e," is not considered a degradation unless you explicitly add it to the ")+"".concat(M.AdditionalDegradedResponseCodes," option. Please remove ").concat(e," from the ")+"".concat(M.NonDegradedResponseCodes," option. ").concat(g,"."));};if(void 0!==t&&!Array.isArray(t))throw new P("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(M.NonDegradedResponseCodes," option. ")+"".concat(g,"."));if(void 0!==e&&!Array.isArray(e))throw new P("Please specify an array of positive integer response codes between 1 and 999 for the response codes that should also be considered as the degraded state(s) for the "+"".concat(M.AdditionalDegradedResponseCodes," option. ").concat(g,"."));null==t||t.forEach(function(e){return n(e,M.NonDegradedResponseCodes)}),null==e||e.forEach(function(e){return n(e, M.AdditionalDegradedResponseCodes)});var r=new Set(e),o=new Set(t);if(c(r).some(function(e){return o.has(e)}))throw new P("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(g,"."));}}],[{key:"isFailureTrackingMetadata",value:function(t){return null!=t&&Object.getOwnPropertyNames(e.prototype).every(function(e){return Object.hasOwnProperty.call(Object.getPrototypeOf(t), e)})}}]),e}();var H=function(){function e(t,n){var r=this;if(v(this,e),this._additionalDegradedResponseCodes=new Set,this._degradationKeyByResponseCode=new Map,!x.isDegradationTrackingMetadata(t)&&!U.isFailureTrackingMetadata(t))throw new P("We encountered a bug where we forgot to provide the tracking metadata as an argument. Please report it to the #pem team.");if(!n)throw new P("We encountered a bug where we forgot to provide the product name as an argument. Please report it to the #pem team."); this._featureKey=t.featureKey,this._productName=n,this._clientSensorGroupName=t.clientSensorGroupName,x.isDegradationTrackingMetadata(t)?(this._nonDegradedResponseCodes=new Set(t.untrackedResponseCodes),this.processTrackedResponseCodes(t.trackedResponseCodes,t.degradationKey),t.trackedResponseCodes.length||(this._defaultDegradationKey=t.degradationKey)):(this._nonDegradedResponseCodes=t.nonDegradedResponseCodes,this._defaultDegradationKey=t.defaultDegradationKey,this._customTrackingId=t.customTrackingId, t.additionalDegradedResponseCodes.forEach(function(e){if(r._nonDegradedResponseCodes.has(e))throw new P("You attempted to specify ".concat(e," as an additional degraded response code for the '").concat(r.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(g,"."));r._additionalDegradedResponseCodes.add(e)}),this.initializeDegradationKeyOverrides(t.degradationKeyOverrides))} return b(e,[{key:"mergeTrackingMetadata",value:function(e){var t=e.untrackedResponseCodes,n=e.trackedResponseCodes,r=e.degradationKey,o=e.featureKey;if(t.length){if(this._nonDegradedResponseCodes.size)throw new P("The ".concat(o," has multiple DegradationTrackingMetadata with the ")+"".concat(k.UntrackedResponseCodes," option. Please combine the degradation keys and ")+"the response codes into one tracking metadata instead. ".concat(g,"."));this._nonDegradedResponseCodes=new Set(t)}if(this.processTrackedResponseCodes(e.trackedResponseCodes, r),!n.length){if(this._defaultDegradationKey)throw new P("'".concat(this._defaultDegradationKey,"' has already been set as the degradation key for the '").concat(o,"' ")+"feature, so we can't use '".concat(r,"' as well. Please combine the two degradation tracking ")+"metadata objects together. ".concat(g,"."));this._defaultDegradationKey=r}}},{key:"getDegradationKey",value:function(e){return this._degradationKeyByResponseCode.has(e)?this._degradationKeyByResponseCode.get(e):this._defaultDegradationKey}}, {key:"featureKey",get:function(){return this._featureKey}},{key:"productName",get:function(){return this._productName}},{key:"customTrackingId",get:function(){return this._customTrackingId}},{key:"clientSensorGroupName",get:function(){return this._clientSensorGroupName}},{key:"isCountedAgainstAvailability",value:function(e,t){return null!==e&&("CLIENT_ABORTED"!==e&&(null==t||this.isDegradedResponseCode(t)))}},{key:"isDegradedResponseCode",value:function(e){if(this._degradationKeyByResponseCode.has(e))return!0; if(!this._defaultDegradationKey)return!1;if(this._additionalDegradedResponseCodes.has(e))return!0;var t=e>=500&&e<600,n=this._nonDegradedResponseCodes.has(e);return t&&!n}},{key:"processTrackedResponseCodes",value:function(e,t){var n=this;e.forEach(function(e){if(n._nonDegradedResponseCodes.has(e))throw new P("You attempted to specify ".concat(e," as a tracked response code for the '").concat(n.featureKey,"' feature, ")+"however it is also specified in the untracked response codes for that feature. Please decide whether "+ "you want to consider ".concat(e," responses a degraded state or not. ").concat(g,"."));if(n._degradationKeyByResponseCode.has(e))throw new P("".concat(e," was specified multiple times in ").concat(n.featureKey,"'s ")+"".concat(k.TrackedResponseCodes,". Each tracked status code should only be ")+"specified once per degradation key. ".concat(g,"."));n._degradationKeyByResponseCode.set(e,t)})}},{key:"initializeDegradationKeyOverrides",value:function(e){var t=this;e.forEach(function(e){if(!e.responseCodesToOverride|| !e.degradationKey||!Array.isArray(e.responseCodesToOverride)||"string"!=typeof e.degradationKey)throw new P("Degradation key overrides must consist of an array of responseCodesToOverride "+"and a string degradationKey. ".concat(g,"."));(new Set(e.responseCodesToOverride)).forEach(function(n){if(!t.isDegradedResponseCode(n))throw new P("A degradation key override was specified for ".concat(n,", but that response code isn't considered degraded. ")+"Please add it to additionalDegradedResponseCodes if you want it to count against your availability."); t._degradationKeyByResponseCode.set(n,e.degradationKey)})})}}]),e}(),F=function(){function e(t,n,r){var o=this;v(this,e),this._featureMetricStore=new j,this._defaultProductName=t,this._fireEventCallback=n,this._jetErrorCallback=r;this._metricSender=new w(this._featureMetricStore,n,function(e,t){window.setInterval(function(){return e()},t)}),window.addEventListener("beforeunload",function(){return o._metricSender.produceMetricEvent()})}return b(e,[{key:"trackFeatureDegradationsForFetch",value:function(e, t,n,r,o){var i,a=this,c=null,s=new Map,d=this._createFailureProcessingMetadata(n);return t=this._getAndValidateUrlEntityIDs(t),r.then(function(e){c=e.status,!1===e.ok&&(e.headers.forEach(function(e,t){return s.set(t.toLowerCase(),e)}),i=e)}).catch(function(e){throw i=e,e;}).finally(function(){a._trackResponse(e,c,t,d,o,s,i)})}},{key:"trackFeatureDegradationsForJQueryAjax",value:function(e,t,n,r,o,i){var a=t.status,c=t.getAllResponseHeaders(),s=new Map;c&&c.trim().split(/[\r\n]+/).forEach(function(e){var t= e.split(": "),n=t.shift();if(n){var r=t.join(": ");s.set(n.toLowerCase(),r)}});var d=i?null:t,l=this._createFailureProcessingMetadata(r);n=this._getAndValidateUrlEntityIDs(n),this._trackResponse(e,a,n,l,o,s,d)}},{key:"_trackResponse",value:function(e,t,n,r,o,i,a){var c=this;if(429!==t&&999!==t){var s=a?function(e,t){if(e instanceof Error){if("AbortError"===e.name)return"CLIENT_ABORTED";if(e instanceof TypeError&&(e.message.indexOf("Network request failed")>=0||e.message.indexOf("NetworkError when attempting to fetch resource")>= 0||e.message.indexOf("Failed to fetch")>=0))return"NETWORK_ERROR"}else{if("timeout"===e.statusText)return"CLIENT_TIMEOUT";if(0===e.status&&"abort"===e.statusText)return"CLIENT_ABORTED";if((n=e.status)>=500&&n<600)return function(e){if(e){if(e.has("x-li-fabric"))return"SERVER_ERROR";if(e.has("x-li-pop"))return"TRAFFIC_L0_TO_L1_ERROR";if(e.has("x-msedge-ref"))return"TRAFFIC_AFD_TO_L0_ERROR"}return"SERVER_ERROR"}(t);if("readyState"in e&&0===e.readyState)return"NETWORK_ERROR"}var n;return"UNCLASSIFIED"}(a, i):null,d=i.get("x-li-pop")||null,l=i.get("x-li-uuid")||null,u=i.get("x-msedge-ref")||null,f=new Set,p=new Set;if(r.forEach(function(e){f.add(e.productName),p.add(e.featureKey),e.isCountedAgainstAvailability(s,t)?c._featureMetricStore.incrementFailedFeatureApiCall({featureKey:e.featureKey,productName:e.productName,pointOfPresenceId:d,responseErrorType:s},o):c._featureMetricStore.incrementSuccessfulFeatureApiCall({featureKey:e.featureKey,productName:e.productName,pointOfPresenceId:d},o)}),a&&s)this._reportErrorIfUnclassified(a, s,t,f,p),function(e,t,n,r,o,i,a,c){if(!(e&&e.trim()&&t&&Array.isArray(t)))return[];var s=K(e,i?i.map(function(e){return encodeURIComponent(e)}):[]),d=[];return t.forEach(function(e){var t=e.getDegradationKey(r),i=e.isCountedAgainstAvailability(n,r),l={endpointPath:s,degradationKey:t,responseErrorType:n,isCountedAgainstAvailability:i};r&&(l.responseCode=r),o&&(l.responseCallTreeId=o),a&&(l.pointOfPresenceId=a),c&&(l.microsoftEdgeReference=c),d.push({header:{},requestHeader:{},productName:e.productName, featureKey:e.featureKey,failedDownstreamRequests:[l]})}),d}(e,r,s,t,l,n,d,u).forEach(function(e){c._fireEventCallback("FeatureDegradeEvent",e,o)})}}},{key:"_reportErrorIfUnclassified",value:function(e,t,n,r,o){var i;if((0===n||null==n)&&"UNCLASSIFIED"===t){var a,c=["noise","pem-unclassified-error"];r.forEach(function(e){return c.push("pem-product-".concat(e))}),o.forEach(function(e){return c.push("pem-feature-".concat(e))}),a=e instanceof Error?e:new Error("Could not classify jQuery response: ".concat(JSON.stringify(e))), null===(i=this._jetErrorCallback)||void 0===i||i.call(this,a,c,!1)}}},{key:"_createFailureProcessingMetadata",value:function(e){var t=this;if(!e||!Array.isArray(e)||!e.length)throw new P("Please specify a non-empty array of degradation tracking metadata. ".concat(g,"."));var n=new Map;return e.forEach(function(e){if(!x.isDegradationTrackingMetadata(e))throw new P("Please use DegradationTrackingMetadata to specify the degradations. ".concat(g,"."));var r=L(e.productName||t._defaultProductName),o={productName:r, featureKey:e.featureKey},i=n.get(o);i?i.mergeTrackingMetadata(e):n.set(o,new H(e,r))}),c(n.values())}},{key:"_getAndValidateUrlEntityIDs",value:function(e){if(!Array.isArray(e))throw new P("Please specify the queried IDs to remove from the request URL, or use an empty array if there "+"are none. ".concat(g,"."));return e}}]),e}();var B,J=n(2),G=n(8),V=n(5);function Q(e){return(Q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"== typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function 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;t3&&void 0!==arguments[3]?arguments[3]:[];try{var o=Object.keys(te),i=o.find(function(t){var n=t.replace(/\/$/,"");return e.startsWith(n)});if(!i||!AbortController)return;var a= ie(i,n);return ae(t,e,r,a)}catch(e){ne.error(e,"pem_tracking_failure")}}function ie(e,t){return te[e].map(function(e){return function(e,t){var n=t.degradationKey,r=t.trackedResponseCodes,o=t.untrackedResponseCodes,i=Object(V.f)(),a=function(e,t){return se(t)+"-"+e}(e,i),c={productName:ce(i)};r?c=Z(Z({},c),{},{trackedResponseCodes:r}):o&&(c=Z(Z({},c),{},{untrackedResponseCodes:o}));return new x(a,n,c)}(t,e)})}function ae(e,t,n,r){try{var o=e.then(function(){var e=arguments.length>0&&void 0!==arguments[0]? arguments[0]:{};return new Response(e,{status:e.status})}).catch(function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e.response,{status:e.status,headers:e.response&&e.response.headers?e.response.headers:new Headers})});return re.trackFeatureDegradationsForFetch(t,n,r,o,Object(V.e)())}catch(e){ne.error(err,"pem_tracking_failure")}}function ce(e){return"Lite-"+se(e).split("-")[0]}function se(e){return e.slice("p_mwlite_".length).replace(/_/g,"-")}}},[[235, 0]]])}"loading"!==document.readyState?e():document.addEventListener("DOMContentLoaded",e)}();