/*! For license information please see Advice.js.LICENSE.txt */
(()=>{var e={189:(e,t,n)=>{var i="Expected a function",r=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,a=/^0o[0-7]+$/i,c=parseInt,l="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g,u="object"==typeof self&&self&&self.Object===Object&&self,d=l||u||Function("return this")(),h=Object.prototype.toString,p=Math.max,f=Math.min,m=function(){return d.Date.now()};function g(e,t,n){var r,o,s,a,c,l,u=0,d=!1,h=!1,g=!0;if("function"!=typeof e)throw new TypeError(i);function b(t){var n=r,i=o;return r=o=void 0,u=t,a=e.apply(i,n)}function E(e){return u=e,c=setTimeout(_,t),d?b(e):a}function w(e){var n=e-l;return void 0===l||n>=t||n<0||h&&e-u>=s}function _(){var e=m();if(w(e))return S(e);c=setTimeout(_,function(e){var n=t-(e-l);return h?f(n,s-(e-u)):n}(e))}function S(e){return c=void 0,g&&r?b(e):(r=o=void 0,a)}function T(){var e=m(),n=w(e);if(r=arguments,o=this,l=e,n){if(void 0===c)return E(l);if(h)return c=setTimeout(_,t),b(l)}return void 0===c&&(c=setTimeout(_,t)),a}return t=y(t)||0,v(n)&&(d=!!n.leading,s=(h="maxWait"in n)?p(y(n.maxWait)||0,t):s,g="trailing"in n?!!n.trailing:g),T.cancel=function(){void 0!==c&&clearTimeout(c),u=0,r=l=o=c=void 0},T.flush=function(){return void 0===c?a:S(m())},T}function v(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function y(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&"[object Symbol]"==h.call(e)}(e))return NaN;if(v(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=v(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(r,"");var n=s.test(e);return n||a.test(e)?c(e.slice(2),n?2:8):o.test(e)?NaN:+e}e.exports=function(e,t,n){var r=!0,o=!0;if("function"!=typeof e)throw new TypeError(i);return v(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),g(e,t,{leading:r,maxWait:t,trailing:o})}}},t={};function n(i){var r=t[i];if(void 0!==r)return r.exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function t(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var i,r,o,s,a={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},c="GUEST",l="MEMBER",u=0,d=1,h=2,p=(t(i={},c,"li_gc"),t(i,l,"li_mc"),i),f="liap",m=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(var s in e(this,t),n=n||{},this.consentAvailable=!1,this.issuedAt=i,this.userMode=r,this.optedInConsentMap={},a)n[s]=n[s]||u,n[s]!==u&&(this.consentAvailable=!0),this.optedInConsentMap[s]=n[s]===d||n[s]===u&&o===d},g=(r=[a.ADVERTISING,a.ANALYTICS_AND_RESEARCH,a.FUNCTIONAL],o=[u,d,h,u],s=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";")),{parseConsentBody:function(e,t){var n=e.match(s);if(!n)return{error:"Invalid consent body encoding",consent:new m};for(var i=parseInt(n[1],10),a={},c=0;c<r.length;c++)a[r[c]]=o[i>>2*c&3];var l=new Date(1e3*parseInt(n[2],10)),d=parseInt(n[3],10),h=u;return d>=0&&d<=3&&(h=o[d]),{error:null,consent:new m(a,l,t,h)}}}),v=new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";")),y=function(e,t){var n=t.match(new RegExp("(?:^|; *)".concat(e,"=([^;]*)")));return n&&n.length>1?n[1]:null},b=function(e,t){var n=y(p[e],t);return n?w(n,e):y(p[c],t)||y(p[l],t)?E(h):E(d)},E=function(e){var t={};for(var n in a)t[n]=e;return{error:null,consent:new m(t,null,null,e)}};var w=function(e,t){e&&e.length>1&&'"'==e.charAt(0)&&'"'==e.charAt(e.length-1)&&(e=e.substring(1,e.length-1));var n,i=null;try{i=(n=e,"undefined"==typeof atob&&"undefined"!=typeof Buffer?Buffer.from(n,"base64").toString("binary"):atob(n)).match(v)}catch(e){}if(!i)return{error:"Invalid consent encoding",consent:new m};var r=parseInt(i[1],10),o=i[2];return 1===r?g.parseConsentBody(o,t):{error:"Invalid encoded consent version ".concat(r),consent:new m}},_=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.cookie;return e||(e=y(f,t)?y(p[l],t)?l:c:y(p[c],t)?c:l),b(e,t)};window.encodeURIComponent;function S(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 T(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{setTimeout(e)}))}class C{constructor(){this._unloadCallbacks=[],this._initEventListener()}_initEventListener(){window.addEventListener("beforeunload",(e=>{for(let t=0;t<this._unloadCallbacks.length;t++){if(!1===this._unloadCallbacks[t].call(null,e))break}}))}addUnloadCallback(e){e instanceof Function&&this._unloadCallbacks.push(e)}}const k=function(){let e;return{getInstance:function(){return e||(e=new C),e}}}();class I{constructor(){this._pagehideCallbacks=[],this._initEventListener()}_initEventListener(){window.addEventListener("pagehide",(e=>{for(let t=0;t<this._pagehideCallbacks.length;t++)this._pagehideCallbacks[t].call(null,e)}))}addPagehideCallback(e){e instanceof Function&&this._pagehideCallbacks.push(e)}}const A=function(){let e;return{getInstance:function(){return e||(e=new I),e}}}();function L(e){return null==e||"object"!=typeof e?[]:Array.prototype.slice.call(e)}function O(e){const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,r=t.top<=n&&t.top+t.height>=0,o=t.left<=i&&t.left+t.width>=0;return r&&o}function R(){let{scrollTop:e=scrollY,clientHeight:t=window.innerHeight,scrollHeight:n=document.body.scrollHeight}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return r?e<=t*i:e>=n-(t+t*i)}function N(e,t,n){const i=new RegExp("([\\?&])".concat(n?t:encodeURIComponent(t),"=([^&#]*)")).exec(e);return i&&(n?i[2]:decodeURIComponent(i[2]))}function x(e,t){return P(e,"trk",t)}function P(e,t,n,i){if(!e||!t)throw new Error("Required param of addQueryParam missing: url = ".concat(e,",  key = ").concat(t));t=encodeURIComponent(t),n=encodeURIComponent(n);const r=N(e,t,!0);if(r)return i?e.replace(r,n):e;{const i=e.indexOf("?");let[r,o]=e.split("#"),s="&";return i<0?s="?":i===e.length-1&&(s=""),o&&(o="#".concat(o)),"".concat(r).concat(s).concat(t,"=").concat(n).concat(o||"")}}function M(e,t,n){var i=this;if("function"!=typeof e)throw new TypeError("Expected a function.");let r;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];const c=()=>{r=null,n||e.apply(i,s)},l=n&&!r;clearTimeout(r),r=setTimeout(c,t),l&&e.apply(i,s)}}function D(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]}function U(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=document.createEvent("CustomEvent");i.initCustomEvent(t,!0,!0,n),e.dispatchEvent(i)}function B(){let e,t;const n=new Promise(((n,i)=>{e=n,t=i}));return n.resolve=e,n.reject=t,n}function q(e){return void 0!==e.msHidden?e.msHidden:void 0!==e.hidden?e.hidden:void 0}function F(e){return"string"!=typeof e?null:e.split("?")[0]}var H=Object.freeze({__proto__:null,closest:S,onload:T,UnloadHandler:k,PagehideHandler:A,makeArray:L,outerWidth:function(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=(parseInt(n.marginLeft,10)||0)+(parseInt(n.marginRight,10)||0),t},elementInViewport:O,hasElementScrolledToThreshold:R,getQueryParam:N,addTrackingCode:x,addQueryParam:P,debounce:M,getCookie:D,dispatchCustomEvent:U,getDeferredPromise:B,isDocumentHidden:q,stripQueryParams:F});function G(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.querySelector('meta[name="pageKey"]'),i=e.getElementById("config"),r=i&&"true"===i.dataset.disableJsbeaconPagekeySuffix;return n&&n.content?"".concat(n.content).concat(r||t.skipSuffix?"":"_jsbeacon"):""}function j(e){let t=e.querySelector('meta[name="linkedin:pageTag"]');return t&&t.content||""}function z(){var e,t;const n=null===(e=window.atob(D("li_gp")))||void 0===e||null===(t=e.split(";")[2])||void 0===t?void 0:t[0];return!!n&&!parseInt(n)}function W(e){let t=e.querySelector('meta[name="locale"]');return t&&t.content||""}function K(e){let t=e.domain;return t?t.split(".").slice(-2).join("."):""}function V(e){return e&&'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)?e.slice(1,-1):e}var Y=Object.freeze({__proto__:null,getPageKey:G,getPageTag:j,getLiSugrCookie:function(){return D("li_sugr")},getGuestRetargetingOptOut:z,getLocale:W,getDomain:K,trimDoubleQuotes:V});const Q={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",ESCAPE:"Escape",ENTER:"Enter",SPACEBAR:" ",TAB:"Tab"},J={Down:Q.ARROW_DOWN,Right:Q.ARROW_RIGHT,Left:Q.ARROW_LEFT,Up:Q.ARROW_UP,Esc:Q.ESCAPE,Spacebar:Q.SPACEBAR,Tab:Q.TAB};function X(e){return J[e]||e}const Z="click",$="keydown",ee="focusEl";class te{constructor(e,t,n){let{mainButton:i,closeButton:r}=n,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)throw Error("An element must be provided to Collapsible");if(!t)throw Error("An expandable element must be provided to Collapsible");if(!i)throw Error("A main button element must be provided to Collapsible");this.el=e,this.expandableEl=t,this._isList=["UL","OL","DL"].includes(this.expandableEl.tagName);const{isOpen:s=!1}=o;this.isOpen=s,this.mainButton=i,this.closeButton=r,this.buttons=[i],this._isList&&this.el.addEventListener("keyup",(e=>this._onKeyUp(e))),this.expandableEl.addEventListener($,(e=>this._onKeyDown(e))),this.mainButton.addEventListener(Z,(e=>this.closeButton?this._open(e):this._toggle(e))),this.mainButton.addEventListener($,(e=>this._onButtonKeyDown(e))),this.closeButton&&(this.closeButton.addEventListener(Z,(()=>this.close())),this.closeButton.addEventListener($,(e=>this._onButtonKeyDown(e))),this.buttons.push(this.closeButton))}get isList(){return this._isList}_toggle(e){this.isOpen?this.close():this._open(e)}_onButtonKeyDown(e){switch(X(e.key)){case Q.ENTER:case Q.SPACEBAR:e.preventDefault(),this.isOpen?this.close():this._open(e);break;case Q.ARROW_UP:this.isOpen||this._open(e);break;case Q.ARROW_DOWN:this.isOpen&&this.close()}}_onKeyUp(e){X(e.key)===Q.SPACEBAR&&e.preventDefault()}_onKeyDown(e){const t=X(e.key);if(t===Q.ESCAPE&&this.isOpen)this.close();else if(this._isList){let n;switch(t){case Q.SPACEBAR:U(e.target,Z);break;case Q.ARROW_LEFT:case Q.ARROW_UP:n=S(e.target,"li");let t=n.previousElementSibling;t&&U(t,ee);break;case Q.ARROW_RIGHT:case Q.ARROW_DOWN:n=S(e.target,"li");let i=n.nextElementSibling;i&&U(i,ee)}}}_open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isOpen){const{key:t}=e;this.isOpen=!0,this.buttons.forEach((e=>e.setAttribute("aria-expanded",this.isOpen))),U(this.el,"open",{key:t})}}close(){let{shouldReturnFocusToTrigger:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isOpen&&(this.isOpen=!1,this.buttons.forEach((e=>e.setAttribute("aria-expanded",this.isOpen))),U(this.el,"close"),e&&this.mainButton.focus())}}let ne,ie;const re=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([disabled]):not([tabindex^="-"]):not([type="hidden"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])'],oe=[...re,'[tabindex]:not([tabindex^="-"]):not([disabled])'].join(",");[...re,"[tabindex]:not([disabled])"].join(",");function se(e){const t=window.getComputedStyle(e);return"hidden"===t.visibility||"none"===t.display}function ae(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement,i=arguments.length>2?arguments[2]:void 0;return e===n?!se(e):i&&i.get(e)?i.get(e):(se(e)?t=!1:e.parentNode&&(t=ae(e.parentNode,n,i)),i&&i.set(e,t),t)}const ce={POLITE:"polite",ASSERTIVE:"assertive"};function le(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ce.POLITE;ne&&(ne.removeAttribute("aria-hidden"),ne.setAttribute("aria-live",ce.POLITE),ne.textContent="",ne.textContent=e,ne.setAttribute("aria-live",t),clearTimeout(ie),ie=setTimeout((()=>{ne.removeAttribute("aria-live"),ne.setAttribute("aria-hidden","true")}),1e4))}class ue{constructor(e){if(!e)throw new Error("An element must be passed in to Disable Background Navigation");this._container=e,this._hiddenElements=[]}disableBackground(){let e=this._container;for(;e&&e!==document.body&&e.parentElement;)this._hiddenElements=this._hiddenElements.concat([...e.parentElement.children].filter((t=>t!==e&&"true"!==t.getAttribute("aria-hidden")&&(t.setAttribute("aria-hidden",!0),!0)))),e=e.parentElement}enableBackground(){this._hiddenElements.forEach((e=>{e.removeAttribute("aria-hidden")})),this._hiddenElements=[]}}const de=["class","disabled","style","tabindex","type"];class he{constructor(e){if(!e)throw new Error("FocusTrap: No focus trap container passed in");this._container=e,this._observer=new MutationObserver((()=>this._setFirstAndLastFocusableEls(this._container))),this._handleKeyDown=this._focusTrap.bind(this),this._backgroundNavigationDisabler=new ue(this._container)}init(){this._observer.observe(this._container,{attributeFilter:de,attributes:!0,childList:!0,subtree:!0}),this._setFirstAndLastFocusableEls(this._container),this._container.addEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.disableBackground()}tearDown(){this._observer.disconnect(),this._container.removeEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.enableBackground()}_focusTrap(e){const{key:t,target:n}=e,i=X(t),r=i===Q.TAB&&e.shiftKey;!r&&i===Q.TAB&&n===this.lastFocusableEl?(this.firstFocusableEl.focus(),e.preventDefault()):r&&n===this.firstFocusableEl&&(this.lastFocusableEl.focus(),e.preventDefault())}_setFirstAndLastFocusableEls(e){const[t,n]=this._getFirstAndLastFocusableEls(e);this.firstFocusableEl=t,this.lastFocusableEl=n,setTimeout((()=>{this._hasFocusBeenDropped()&&("-1"===e.getAttribute("tabindex")?e.focus():this.firstFocusableEl.focus())}),100)}_hasFocusBeenDropped(){const e=document.activeElement;return!e||e===document.body}_getFirstAndLastFocusableEls(e){const t=[...e.querySelectorAll(oe)],n=new Map;let i,r,o=0,s=t.length-1;for(;(!i||!r)&&o<=s;){if(!i){const r=t[o];i=ae(r,e,n)&&r,o++}if(!r){const i=t[s];r=ae(i,e,n)&&i,s--}}return r=r||i,[i,r]}}const pe=/.*(iPad|iPod|iPhone|Android|BB10|BlackBerry|IEMobile).*/;function fe(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:navigator.userAgent;return!!e&&pe.test(e)}const me="collapsible-dropdown",ge=".".concat(me,"__list"),ve=".".concat(me,"__button"),ye=".".concat(me,"__close-button"),be="no-focus-ring";class Ee{constructor(e){let{getFocusItemFromListItem:t=(e=>e.querySelector(oe)),elementToFocus:n,dropdownTriggerEl:i,dropdownContentEl:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw Error("An element must be provided to CollapsibleDropdown");this.el=e,this.dropdownContentEl=r||this.el.querySelector(ge),this._closeButton=this.el.querySelector(ye),this._isMobile=fe();const o=this.dropdownContentEl.closest(".".concat(me));if(this._isMobile&&o&&(this._focusTrap=new he(o)),!n){const e=this.dropdownContentEl===this.dropdownContentEl.parentElement.querySelector(oe),t="-1"===this.dropdownContentEl.getAttribute("tabIndex");e||t||console.warn('elementToFocus not provided and the dropdown container is not focusable. Consider adding tabindex="-1" to:',this.dropdownContentEl)}this.elementToFocus=n||this.dropdownContentEl,this.dropdownTriggerEl=i||this.el.querySelector(ve),this.hideClass="hidden",this.collapsible=new te(e,this.dropdownContentEl,{mainButton:this.dropdownTriggerEl}),this._handleBodyClick=this._handleBodyClick.bind(this),this._focusOutsideDropdown=this._focusOutsideDropdown.bind(this),this._leaveWindow=this._leaveWindow.bind(this),this._attachEventListeners(),this.collapsible.isList&&(this._getFocusItemFromListItem=t)}_attachEventListeners(){var e;this.el.addEventListener("open",(e=>this._showDropdownList(e))),this.el.addEventListener("close",(()=>this._hideDropdownList())),this.collapsible.isList&&this.dropdownContentEl.addEventListener("focusEl",(e=>this._manageFocus(e))),null===(e=this._closeButton)||void 0===e||e.addEventListener("click",(e=>this._handleCloseButtonClick(e)))}_manageFocus(e){const{target:t}=e;if(t&&this._getFocusItemFromListItem){const e=this._getFocusItemFromListItem(t);e&&e.focus()}}_handleBodyClick(e){this.el.contains(e.target)||this.collapsible.close({shouldReturnFocusToTrigger:!1})}_handleCloseButtonClick(e){var t;null===(t=e.stopPropagation)||void 0===t||t.call(e),this.collapsible.close({shouldReturnFocusToTrigger:!0})}_showDropdownList(e){window.addEventListener("blur",this._leaveWindow),this.dropdownContentEl.classList.remove(this.hideClass),this.elementToFocus.focus();const{key:t}=e&&e.detail;var n;(t?this.elementToFocus.classList.remove(be):this.elementToFocus.classList.add(be),document.addEventListener("mousedown",this._handleBodyClick),this._isMobile)?null===(n=this._focusTrap)||void 0===n||n.init():this.el.addEventListener("focusout",this._focusOutsideDropdown)}_hideDropdownList(){var e;this._isMobile?null===(e=this._focusTrap)||void 0===e||e.tearDown():this.el.removeEventListener("focusout",this._focusOutsideDropdown);document.removeEventListener("mousedown",this._handleBodyClick),window.removeEventListener("blur",this._leaveWindow),this.dropdownContentEl.classList.add(this.hideClass)}_focusOutsideDropdown(e){e.relatedTarget&&!this.el.contains(e.relatedTarget)&&this.collapsible.isOpen&&this.collapsible.close({shouldReturnFocusToTrigger:this._shouldReturnFocusToTrigger})}_leaveWindow(){this.collapsible.isOpen&&this.collapsible.close({shouldReturnFocusToTrigger:this._shouldReturnFocusToTrigger})}shouldReturnFocusToTrigger(e){this._shouldReturnFocusToTrigger=e}close(){this.collapsible.close({shouldReturnFocusToTrigger:this._shouldReturnFocusToTrigger})}}function we(e){let{method:t="GET",headers:n={},sendCookies:i=!0,skipCsrfToken:r=!1,postData:o,isPemEnabled:s=!1,pemDegradationTrackingMetadata:a=[],pemEntityIds:c=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=new Promise(((s,a)=>{const c=new XMLHttpRequest;if(c.addEventListener("load",(function(){if(c.status>=200&&c.status<300||304===c.status)s({status:c.status,responseText:c.responseText});else{const n=new Error("".concat(t," request for ").concat(e," has failed with status code ").concat(c.status));n.response={status:c.status,responseText:c.responseText};const i=c.getAllResponseHeaders();i&&(n.response.rawHeaders=i),a(n)}})),c.addEventListener("error",(function(e){a(e)})),c.open(t,e,!0),c.withCredentials=i,Object.keys(n).forEach((e=>{c.setRequestHeader(e,n[e])})),!r){const e=D("JSESSIONID");e&&c.setRequestHeader("Csrf-Token",V(e))}c.send(o)}));return s&&(a.length?_e(l,e,c,a):console.warn("Please set the value for the option pemDegradationTrackingMetadata when PEM is enabled.")),l}function _e(e,t,n,i){try{const r=e.then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e,{status:e.status})})).catch((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e.response,{status:e.response?e.response.status:500,headers:e.response&&e.response.rawHeaders?Se(e.response.rawHeaders):new Headers})}));window.tracking.then((e=>{window.pemTracking.then((o=>{o.trackFeatureDegradationsForFetch(t,n,i,r,e.state.currentPageInstance)}))}))}catch(e){}}function Se(e){const t=new Headers;return e&&e.trim().split(/[\r\n]+/).forEach((e=>{const n=e.trim().split(": "),i=n.shift();if(i){const e=n.join(": ");t.set(i.toLocaleLowerCase(),e)}})),t}class Te{constructor(e){if(!e)throw Error("An element must be provided to LanguageSelector");this._el=e,this.listEl=this._el.querySelector(".collapsible-dropdown__list"),this.dropdownTriggerEl=this._el.querySelector(".language-selector__button"),this.currentListItem=this.listEl.querySelector(".language-selector__link--selected"),this.collapsibleDropdown=new Ee(e,{dropdownTriggerEl:this.dropdownTriggerEl,elementToFocus:this.currentListItem}),this._attachCustomEventListeners()}_attachCustomEventListeners(){this.listEl.addEventListener("click",this._handleLocaleButtonClick.bind(this))}_handleLocaleButtonClick(e){return function(e){const t=V(D("bcookie")||""),n=function(e){let t="";return e.indexOf("linkedin.cn")>-1?t="https://www.linkedin.cn":e.indexOf("linkedin-ei.cn")>-1?t="https://www.linkedin-ei.cn":e.indexOf("linkedin-ei.com")>-1?t="https://www.linkedin-ei.com":e.indexOf("linkedin.com")>-1&&(t="https://www.linkedin.com"),t}(K(document));return we("".concat(n,"/psettings/update-language/cors?csrfToken=").concat(encodeURIComponent(t)),{method:"POST",headers:{"Content-Type":"application/json"},postData:JSON.stringify({locale:e}),skipCsrfToken:!0})}(e.target.getAttribute("data-locale")).then((()=>{location.reload()}))}}var Ce="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},ke=(parseInt,"object"==typeof Ce&&Ce&&Ce.Object===Object&&Ce),Ie="object"==typeof self&&self&&self.Object===Object&&self;ke||Ie||Function("return this")(),Object.prototype.toString,Math.max,Math.min;function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function Le(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){Oe(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Oe(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Re(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const Ne="light",xe="dark";function Pe(){const e=document.getElementById("config");let t;return e&&e.dataset&&(t=e.dataset.theme),t?document.documentElement.classList.contains("dark")?xe:Ne:void 0}var Me;function De(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 i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||je(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 Ue(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=je(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Be(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function qe(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function Fe(e,t,n){return t&&qe(e.prototype,t),n&&qe(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function He(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ge(e){return function(e){if(Array.isArray(e))return ze(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||je(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 je(e,t){if(e){if("string"==typeof e)return ze(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)?ze(e,t):void 0}}function ze(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function We(e){return(We="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,Ve=new Uint8Array(16);function Ye(){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(Ve)}var Qe=/^(?:[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 Je(e){return"string"==typeof e&&Qe.test(e)}for(var Xe=[],Ze=0;Ze<256;++Ze)Xe.push((Ze+256).toString(16).substr(1));function $e(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Xe[e[t+0]]+Xe[e[t+1]]+Xe[e[t+2]]+Xe[e[t+3]]+"-"+Xe[e[t+4]]+Xe[e[t+5]]+"-"+Xe[e[t+6]]+Xe[e[t+7]]+"-"+Xe[e[t+8]]+Xe[e[t+9]]+"-"+Xe[e[t+10]]+Xe[e[t+11]]+Xe[e[t+12]]+Xe[e[t+13]]+Xe[e[t+14]]+Xe[e[t+15]]).toLowerCase();if(!Je(n))throw TypeError("Stringified UUID is invalid");return n}function et(e){if(!Je(e))throw TypeError("Invalid UUID");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function tt(e,t,n){function i(e,i,r,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 i&&(i=et(i)),16!==i.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(i),s.set(e,i.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,r){o=o||0;for(var a=0;a<16;++a)r[o+a]=s[a];return r}return $e(s)}try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}function nt(e){return 14+(e+64>>>9<<4)+1}function it(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function rt(e,t,n,i,r,o){return it((s=it(it(t,e),it(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function ot(e,t,n,i,r,o,s){return rt(t&n|~t&i,e,t,r,o,s)}function st(e,t,n,i,r,o,s){return rt(t&i|n&~i,e,t,r,o,s)}function at(e,t,n,i,r,o,s){return rt(t^n^i,e,t,r,o,s)}function ct(e,t,n,i,r,o,s){return rt(n^(t|~i),e,t,r,o,s)}function lt(e,t,n){var i=(e=e||{}).random||(e.rng||Ye)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return $e(i)}function ut(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:case 3:return t^n^i;case 2:return t&n^t&i^n&i}}function dt(e,t){return e<<t|e>>>32-t}tt("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,i="0123456789abcdef",r=0;r<n;r+=8){var o=e[r>>5]>>>r%32&255,s=parseInt(i.charAt(o>>>4&15)+i.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[nt(t)-1]=t;for(var n=1732584193,i=-271733879,r=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,c=i,l=r,u=o;n=ot(n,i,r,o,e[s],7,-680876936),o=ot(o,n,i,r,e[s+1],12,-389564586),r=ot(r,o,n,i,e[s+2],17,606105819),i=ot(i,r,o,n,e[s+3],22,-1044525330),n=ot(n,i,r,o,e[s+4],7,-176418897),o=ot(o,n,i,r,e[s+5],12,1200080426),r=ot(r,o,n,i,e[s+6],17,-1473231341),i=ot(i,r,o,n,e[s+7],22,-45705983),n=ot(n,i,r,o,e[s+8],7,1770035416),o=ot(o,n,i,r,e[s+9],12,-1958414417),r=ot(r,o,n,i,e[s+10],17,-42063),i=ot(i,r,o,n,e[s+11],22,-1990404162),n=ot(n,i,r,o,e[s+12],7,1804603682),o=ot(o,n,i,r,e[s+13],12,-40341101),r=ot(r,o,n,i,e[s+14],17,-1502002290),n=st(n,i=ot(i,r,o,n,e[s+15],22,1236535329),r,o,e[s+1],5,-165796510),o=st(o,n,i,r,e[s+6],9,-1069501632),r=st(r,o,n,i,e[s+11],14,643717713),i=st(i,r,o,n,e[s],20,-373897302),n=st(n,i,r,o,e[s+5],5,-701558691),o=st(o,n,i,r,e[s+10],9,38016083),r=st(r,o,n,i,e[s+15],14,-660478335),i=st(i,r,o,n,e[s+4],20,-405537848),n=st(n,i,r,o,e[s+9],5,568446438),o=st(o,n,i,r,e[s+14],9,-1019803690),r=st(r,o,n,i,e[s+3],14,-187363961),i=st(i,r,o,n,e[s+8],20,1163531501),n=st(n,i,r,o,e[s+13],5,-1444681467),o=st(o,n,i,r,e[s+2],9,-51403784),r=st(r,o,n,i,e[s+7],14,1735328473),n=at(n,i=st(i,r,o,n,e[s+12],20,-1926607734),r,o,e[s+5],4,-378558),o=at(o,n,i,r,e[s+8],11,-2022574463),r=at(r,o,n,i,e[s+11],16,1839030562),i=at(i,r,o,n,e[s+14],23,-35309556),n=at(n,i,r,o,e[s+1],4,-1530992060),o=at(o,n,i,r,e[s+4],11,1272893353),r=at(r,o,n,i,e[s+7],16,-155497632),i=at(i,r,o,n,e[s+10],23,-1094730640),n=at(n,i,r,o,e[s+13],4,681279174),o=at(o,n,i,r,e[s],11,-358537222),r=at(r,o,n,i,e[s+3],16,-722521979),i=at(i,r,o,n,e[s+6],23,76029189),n=at(n,i,r,o,e[s+9],4,-640364487),o=at(o,n,i,r,e[s+12],11,-421815835),r=at(r,o,n,i,e[s+15],16,530742520),n=ct(n,i=at(i,r,o,n,e[s+2],23,-995338651),r,o,e[s],6,-198630844),o=ct(o,n,i,r,e[s+7],10,1126891415),r=ct(r,o,n,i,e[s+14],15,-1416354905),i=ct(i,r,o,n,e[s+5],21,-57434055),n=ct(n,i,r,o,e[s+12],6,1700485571),o=ct(o,n,i,r,e[s+3],10,-1894986606),r=ct(r,o,n,i,e[s+10],15,-1051523),i=ct(i,r,o,n,e[s+1],21,-2054922799),n=ct(n,i,r,o,e[s+8],6,1873313359),o=ct(o,n,i,r,e[s+15],10,-30611744),r=ct(r,o,n,i,e[s+6],15,-1560198380),i=ct(i,r,o,n,e[s+13],21,1309151649),n=ct(n,i,r,o,e[s+4],6,-145523070),o=ct(o,n,i,r,e[s+11],10,-1120210379),r=ct(r,o,n,i,e[s+2],15,718787259),i=ct(i,r,o,n,e[s+9],21,-343485551),n=it(n,a),i=it(i,c),r=it(r,l),o=it(o,u)}return[n,i,r,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(nt(t)),i=0;i<t;i+=8)n[i>>5]|=(255&e[i/8])<<i%32;return n}(e),8*e.length))})),tt("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r<i.length;++r)e.push(i.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),c=0;c<s;++c){for(var l=new Uint32Array(16),u=0;u<16;++u)l[u]=e[64*c+4*u]<<24|e[64*c+4*u+1]<<16|e[64*c+4*u+2]<<8|e[64*c+4*u+3];a[c]=l}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<s;++d){for(var h=new Uint32Array(80),p=0;p<16;++p)h[p]=a[d][p];for(var f=16;f<80;++f)h[f]=dt(h[f-3]^h[f-8]^h[f-14]^h[f-16],1);for(var m=n[0],g=n[1],v=n[2],y=n[3],b=n[4],E=0;E<80;++E){var w=Math.floor(E/20),_=dt(m,5)+ut(w,g,v,y)+b+t[w]+h[E]>>>0;b=y,y=v,v=dt(g,30)>>>0,g=m,m=_}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+v>>>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 ht=null;if("undefined"==typeof crypto||!crypto.getRandomValues){var pt=("undefined"!=typeof FastBoot?FastBoot.require:require)("crypto");if(pt){var ft=new Uint8Array(256),mt=ft.length;ht={rng:function(){return mt>ft.length-16&&(pt.randomFillSync(ft),mt=0),ft.slice(mt,mt+=16)}}}}"object"===("undefined"==typeof crypto?"undefined":We(crypto))&&crypto.randomUUID;function gt(){return lt(ht,new Array(16),0)}function vt(e){return Ge(e).map((function(e){return String.fromCharCode(e)})).join("")}function yt(){return vt(gt())}var bt=/^[a-zA-Z0-9/+]+[=]+$/;function Et(e,t){return{pageUrn:_t(e),trackingId:t||function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],r=0,o=e.length,s=o%3,a=o-s;r<a;)t=e[r]<<16,t|=e[r+1]<<8,t|=e[r+2],i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push(n.charAt(63&t)),r+=3;switch(s){case 2:t=e[r]<<16,t|=e[r+1]<<8,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push("=");break;case 1:t=e[r]<<16,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push("="),i.push("=")}return i.join("")}(gt())}}function wt(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function _t(e){return"urn:li:page:".concat(e)}function St(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,i=function(e){n.delete(e),0===n.size&&t()};0===e.length?t():e.map((function(e){return e.then((function(){return i(e)})).catch((function(){return i(e)}))}))}))}(e)}function Ct(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",i=window.indexedDB.open(n);return new Promise((function(r,o){i.onupgradeneeded=function(){var e=i.result;e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},i.onsuccess=function(){var s=i.result,a=s.transaction(n,"readwrite"),c=a.objectStore(n),l=c.get(1);l.onsuccess=function(){var n=l.result;if(n){var i,s=null!==(i=n.sequenceNumber)&&void 0!==i?i:0;if("read"===e)return r(s);if(!("update"===e&&void 0!==t&&t>s))return r(null);var a=c.put({sequenceNumber:t},1);a.onsuccess=function(){return r(null)},a.onerror=function(){o(a.error)}}else{var u=c.add({sequenceNumber:0});u.onsuccess=function(){return r(0)},u.onerror=function(){o(u.error)}}},l.onerror=function(){return s.close(),o(new Error("Error: get sequence number from indexedDB ".concat(String(l.error))))},a.oncomplete=function(){return s.close()}},i.onerror=function(){return r(null)}}))}return Promise.resolve(null)}function It(e,t,n){var i=e.get(t);i&&i.push(n)||e.set(t,[n])}function At(e,t,n){var i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)}var Lt,Ot,Rt=(Lt=new Map,Ot=new Map,{on:function(e,t){It(Lt,e,t)},before:function(e,t){It(Ot,e,t)},off:function(e,t){At(Lt,e,t)},offBefore:function(e,t){At(Ot,e,t)},emit:function(e,t){(Ot.get(e)||[]).concat(Lt.get(e)||[]).slice().map((function(e){e(t)}))},clear:function(){Ot.clear(),Lt.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var Nt=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||Rt.emit("internal:hide",e)};document.addEventListener("visibilitychange",Nt),window.addEventListener("pagehide",Nt)}var xt=Uint8Array,Pt=Uint16Array,Mt=Uint32Array,Dt=new xt([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 xt([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]),Bt=new xt([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),qt=function(e,t){for(var n=new Pt(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];var r=new Mt(n[30]);for(i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return[n,r]},Ft=qt(Dt,2),Ht=Ft[0],Gt=Ft[1];Ht[28]=258,Gt[258]=28;for(var jt=qt(Ut,0)[1],zt=new Pt(32768),Wt=0;Wt<32768;++Wt){var Kt=(43690&Wt)>>>1|(21845&Wt)<<1;Kt=(61680&(Kt=(52428&Kt)>>>2|(13107&Kt)<<2))>>>4|(3855&Kt)<<4,zt[Wt]=((65280&Kt)>>>8|(255&Kt)<<8)>>>1}var Vt=function(e,t,n){for(var i=e.length,r=0,o=new Pt(t);r<i;++r)e[r]&&++o[e[r]-1];var s,a=new Pt(t);for(r=0;r<t;++r)a[r]=a[r-1]+o[r-1]<<1;if(n){s=new Pt(1<<t);var c=15-t;for(r=0;r<i;++r)if(e[r])for(var l=r<<4|e[r],u=t-e[r],d=a[e[r]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)s[zt[d]>>>c]=l}else for(s=new Pt(i),r=0;r<i;++r)e[r]&&(s[r]=zt[a[e[r]-1]++]>>>15-e[r]);return s},Yt=new xt(288);for(Wt=0;Wt<144;++Wt)Yt[Wt]=8;for(Wt=144;Wt<256;++Wt)Yt[Wt]=9;for(Wt=256;Wt<280;++Wt)Yt[Wt]=7;for(Wt=280;Wt<288;++Wt)Yt[Wt]=8;var Qt=new xt(32);for(Wt=0;Wt<32;++Wt)Qt[Wt]=5;var Jt=Vt(Yt,9,0),Xt=Vt(Qt,5,0),Zt=function(e){return(e+7)/8|0},$t=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},en=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},tn=function(e,t){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var r=n.length,o=n.slice();if(!r)return[ln,0];if(1==r){var s=new xt(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=r-1;)a=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};var h=o[0].s;for(i=1;i<r;++i)o[i].s>h&&(h=o[i].s);var p=new Pt(h+1),f=nn(n[u-1],p,0);if(f>t){i=0;var m=0,g=f-t,v=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));i<r;++i){var y=o[i].s;if(!(p[y]>t))break;m+=v-(1<<f-p[y]),p[y]=t}for(m>>>=g;m>0;){var b=o[i].s;p[b]<t?m-=1<<t-p[b]++-1:++i}for(;i>=0&&m;--i){var E=o[i].s;p[E]==t&&(--p[E],++m)}f=t}return[new xt(p),f]},nn=function e(t,n,i){return-1==t.s?Math.max(e(t.l,n,i+1),e(t.r,n,i+1)):n[t.s]=i},rn=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new Pt(++t),i=0,r=e[0],o=1,s=function(e){n[i++]=e},a=1;a<=t;++a)if(e[a]==r&&a!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(r),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(r);o=1,r=e[a]}return[n.subarray(0,i),t]},on=function(e,t){for(var n=0,i=0;i<t.length;++i)n+=e[i]*t[i];return n},sn=function(e,t,n){var i=n.length,r=Zt(t+2);e[r]=255&i,e[r+1]=i>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var o=0;o<i;++o)e[r+o+4]=n[o];return 8*(r+4+i)},an=function(e,t,n,i,r,o,s,a,c,l,u){$t(t,u++,n),++r[256];for(var d=tn(r,15),h=d[0],p=d[1],f=tn(o,15),m=f[0],g=f[1],v=rn(h),y=v[0],b=v[1],E=rn(m),w=E[0],_=E[1],S=new Pt(19),T=0;T<y.length;++T)S[31&y[T]]++;for(T=0;T<w.length;++T)S[31&w[T]]++;for(var C=tn(S,7),k=C[0],I=C[1],A=19;A>4&&!k[Bt[A-1]];--A);var L,O,R,N,x=l+5<<3,P=on(r,Yt)+on(o,Qt)+s,M=on(r,h)+on(o,m)+s+14+3*A+on(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(x<=P&&x<=M)return sn(t,u,e.subarray(c,c+l));if($t(t,u,1+(M<P)),u+=2,M<P){L=Vt(h,p,0),O=h,R=Vt(m,g,0),N=m;var D=Vt(k,I,0);for($t(t,u,b-257),$t(t,u+5,_-1),$t(t,u+10,A-4),u+=14,T=0;T<A;++T)$t(t,u+3*T,k[Bt[T]]);u+=3*A;for(var U=[y,w],B=0;B<2;++B){var q=U[B];for(T=0;T<q.length;++T){var F=31&q[T];$t(t,u,D[F]),u+=k[F],F>15&&($t(t,u,q[T]>>>5&127),u+=q[T]>>>12)}}}else L=Jt,O=Yt,R=Xt,N=Qt;for(T=0;T<a;++T)if(i[T]>255){F=i[T]>>>18&31,en(t,u,L[F+257]),u+=O[F+257],F>7&&($t(t,u,i[T]>>>23&31),u+=Dt[F]);var H=31&i[T];en(t,u,R[H]),u+=N[H],H>3&&(en(t,u,i[T]>>>5&8191),u+=Ut[H])}else en(t,u,L[i[T]]),u+=O[i[T]];return en(t,u,L[256]),u+O[256]},cn=new Mt([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),ln=new xt(0),un=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,i=9;--i;)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,i=0;i<t.length;++i)n=un[255&n^t[i]]^n>>>8;e=n},d:function(){return~e}}}(),i=e.length;n.p(e);var r,o,s,a=(r=e,o=t,s=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8,function(e,t,n,i,r,o){var s=e.length,a=new xt(i+s+5*(1+Math.ceil(s/7e3))+r),c=a.subarray(i,a.length-r),l=0;if(!t||s<8)for(var u=0;u<=s;u+=65535){var d=u+65535;d>=s&&(c[l>>3]=o),l=sn(c,l+1,e.subarray(u,d))}else{for(var h=cn[t-1],p=h>>>13,f=8191&h,m=(1<<n)-1,g=new Pt(32768),v=new Pt(m+1),y=Math.ceil(n/3),b=2*y,E=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&m},w=new Mt(25e3),_=new Pt(288),S=new Pt(32),T=0,C=0,k=(u=0,0),I=0,A=0;u<s;++u){var L=E(u),O=32767&u,R=v[L];if(g[O]=R,v[L]=O,I<=u){var N=s-u;if((T>7e3||k>24576)&&N>423){l=an(e,c,0,w,_,S,C,k,A,u-A,l),k=T=C=0,A=u;for(var x=0;x<286;++x)_[x]=0;for(x=0;x<30;++x)S[x]=0}var P=2,M=0,D=f,U=O-R&32767;if(N>2&&L==E(u-U))for(var B=Math.min(p,N)-1,q=Math.min(32767,u),F=Math.min(258,N);U<=q&&--D&&O!=R;){if(e[u+P]==e[u+P-U]){for(var H=0;H<F&&e[u+H]==e[u+H-U];++H);if(H>P){if(P=H,M=U,H>B)break;var G=Math.min(U,H-2),j=0;for(x=0;x<G;++x){var z=u-U+x+32768&32767,W=z-g[z]+32768&32767;W>j&&(j=W,R=z)}}}U+=(O=R)-(R=g[O])+32768&32767}if(M){w[k++]=268435456|Gt[P]<<18|jt[M];var K=31&Gt[P],V=31&jt[M];C+=Dt[K]+Ut[V],++_[257+K],++S[V],I=u+P,++T}else w[k++]=e[u],++_[e[u]]}}l=an(e,c,o,w,_,S,C,k,A,u-A,l),!o&&7&l&&(l=sn(c,l+1,ln))}return function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var i=new(2==e.BYTES_PER_ELEMENT?Pt:4==e.BYTES_PER_ELEMENT?Mt:xt)(n-t);return i.set(e.subarray(t,n)),i}(a,0,i+Zt(l)+r)}(r,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+o.mem,s,8,!0)),c=a.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 i=0;i<=n.length;++i)e[i+10]=n.charCodeAt(i)}}(a,t),dn(a,c-8,n.d()),dn(a,c-4,i),a}var pn="undefined"!=typeof TextDecoder&&new TextDecoder;try{pn.decode(ln,{stream:!0})}catch(ir){}function fn(){return"undefined"!=typeof window&&"function"==typeof window.fetch}function mn(){try{return fn()&&"keepalive"in new Request("")}catch(e){return!1}}function gn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("undefined"!=typeof window&&void 0!==window.XMLHttpRequest){var i=new XMLHttpRequest;if(i.open("POST",e,!0),i.withCredentials=!0,n.headers)for(var r=0,o=Object.keys(n.headers);r<o.length;r++){var s=o[r];i.setRequestHeader(s,n.headers[s])}i.send(t)}}function vn(e){var t=e.body,n=e.keepalive,i=e.headers,r=e.compress;i["content-type"]||(i["content-type"]="text/plain;charset=UTF-8");var o=t;if(r&&"undefined"!=typeof TextEncoder)try{o=hn((new TextEncoder).encode(t)),i["content-encoding"]="gzip"}catch(e){}return{body:o,keepalive:n,credentials:"include",headers:i,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=mn()?function(e,t,n,i){return new Promise((function(r){fetch(e,vn({body:t,keepalive:!0,headers:n,compress:i})).catch((function(){return fetch(e,vn({body:t,keepalive:!1,headers:n,compress:i}))})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:e.status}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:yn(e)})}))}))}:function(e,t,n,i){return new Promise((function(r){if(En){var o=!1;try{o=navigator.sendBeacon(e,t)}catch(e){}if(o)return void r({type:"unknown",drop:!1})}fetch(e,vn({body:t,keepalive:!1,headers:n,compress:i})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:200}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:yn(e)})}))}))};function _n(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 Sn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",i=arguments.length>3?arguments[3]:void 0,r=indexedDB.open(e);r.onupgradeneeded=function(){try{r.result.createObjectStore(t,{keyPath:n})}catch(e){null==i||i.onError(e)}};var o=new Promise((function(e,t){r.onsuccess=function(){var t=r.result;t.onversionchange=function(){return t.close()},e(t),null==i||i.onSuccess()},r.onerror=function(){t(r.error),null==i||i.onError(r.error)}}));return function(e,n){return o.then((function(i){return n(i.transaction(t,e).objectStore(t))}))}}function Tn(){return bn||(bn=Sn("idb-queue","default")),bn}function Cn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=0,i=null;return e.openKeyCursor().onsuccess=function(){var r=this.result;r&&n++<t.batchEvictionNumber?(i=r.key,r.continue()):null!=i&&e.delete(IDBKeyRange.upperBound(i))},_n(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 Cn(t,e)}))}var In=!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),_n(n.count()).then((function(e){if(!(e<=t.maxNumber))return Cn(n,t)}))})).catch((function(e){if(e&&"QuotaExceededError"===e.name)return kn(t,n)}))}function Ln(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 In?Promise.resolve():An(e,t,n)}function On(e,t,n){return t("readwrite",(function(t){var i=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(i.push(t.value),t.delete(),(e<0||i.length<e)&&t.continue())},_n(t.transaction).then((function(){return i}))}))}function Rn(e,t,n){return t("readonly",(function(t){var i=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(i.push(t.value),(e<0||i.length<e)&&t.continue())},_n(t.transaction).then((function(){return i}))}))}function Nn(){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")}function xn(){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,"prev")}function Pn(){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,i=arguments.length>3?arguments[3]:void 0;return!t||n<1||(e[t]=JSON.stringify({attempt:n,errorCode:i})),e}function Mn(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function Dn(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(i){i.timeRemaining()>t.timeRemaining||i.didTimeout?e():n()}),{timeout:t.timeout})};n()}}function Bn(e,t){var n=0;return{throttledFn:function(){var i=Date.now();i-n>t&&(Mn((function(){return"[throttle] Run fn() at "+String(i)})),e(),n=i)},resetThrottle:function(){n=0}}}var qn=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Be(this,e),He(this,"config",void 0),He(this,"compress",void 0),He(this,"throttleControl",void 0),He(this,"withStore",void 0),He(this,"disablePersistence",!1),this.config=t,this.compress=i;var r=t.measureIDB;r&&performance.mark(r.createStartMark),this.withStore=Sn(t.idbName,"beacons","timestamp",{onSuccess:function(){r&&performance.measure(r.createSuccessMeasure,r.createStartMark)},onError:function(){r&&performance.measure(r.createFailMeasure,r.createStartMark),n.disablePersistence=!0}}),this.throttleControl=Bn(this.replayEntries.bind(this),t.throttleWait)}return Fe(e,[{key:"onNotify",value:function(){this.disablePersistence||this.throttleControl.throttledFn()}},{key:"push",value:function(e){var t=this;if(!this.disablePersistence){var n=function(){Mn((function(){return"Persisting to DB "+e.url})),Ln(e,t.config,t.withStore).then((function(){t.throttleControl.resetThrottle(),Mn((function(){return"push completed"}))})).catch((function(){t.disablePersistence=!0,Dn((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 In=!0,e("readwrite",(function(e){return e.clear(),_n(e.transaction).finally((function(){return In=!1}))}))}(this.withStore).catch((function(){e.disablePersistence=!0,Dn((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([]):Nn(t,this.withStore).catch((function(){return e.disablePersistence=!0,Dn((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([]):xn(t,this.withStore).catch((function(){return e.disablePersistence=!0,Dn((function(){return"peekBack failed"})),[]}))}},{key:"replayEntries",value:function(){var e=this;if(!this.disablePersistence){var t=function(){Mn((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 On(e,t,"next")}(1,e.withStore).then((function(t){if(t.length>0){var n,i,r=t[0],o=r.url,s=r.body,a=r.headers,c=r.timestamp,l=r.statusCode,u=r.attemptCount;return Mn((function(){return"header: ".concat(String(e.config.headerName),"; attemptCount: ").concat(u)})),null===(n=(i=e.config).onBeforeRetry)||void 0===n||n.call(i,s),wn(o,s,Pn(a,e.config.headerName,u,l),e.compress).then((function(t){if("unknown"===t.type||"success"===t.type){var n,i;null===(n=(i=e.config).onResult)||void 0===n||n.call(i,t,s),e.replayEntries()}else{var r,a,d,h,p,f;if(u+1>e.config.attemptLimit)return Mn((function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),t.drop=!0,void(null===(r=(a=e.config).onResult)||void 0===r||r.call(a,t,s));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,s),Mn((function(){return"Replaying the entry failed, pushing back to IDB: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),Ln({url:o,body:s,timestamp:c,statusCode:l,attemptCount:u+1},e.config,e.withStore);t.drop=!0,null===(p=(f=e.config).onResult)||void 0===p||p.call(f,t,s)}}))}})).catch((function(t){e.disablePersistence=!0,t&&t.message&&Dn((function(){return"Replay entry failed: ".concat(t.message)}))}))};this.config.useIdle?Un(t):t()}}}]),e}(),Fn=function(){function e(){Be(this,e)}return Fe(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}(),Hn=function(){function e(t,n){Be(this,e),He(this,"queue",void 0),He(this,"beaconListeners",new Set),this.queue=e.hasSupport&&!n.disablePersistenceRetry?new qn(t,n.compress):new Fn}return Fe(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}();He(Hn,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var Gn=[502,504],jn=[429,503],zn=function(){function e(t,n,i,r){var o=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Be(this,e),He(this,"url",void 0),He(this,"body",void 0),He(this,"config",void 0),He(this,"persistenceConfig",void 0),He(this,"compress",void 0),He(this,"timestamp",void 0),He(this,"isClearQueuePending",!1),He(this,"onClearCallback",void 0),this.url=t,this.body=n,this.config=i,this.persistenceConfig=r,this.compress=s,this.timestamp=Date.now(),this.onClearCallback=function(){return o.isClearQueuePending=!0}}return Fe(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(){Mn((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,i){var r=this,o=this.getAttemptCount(t)-1;return e(Pn(n,this.config.headerName,o,i)).then((function(i){var o,s,a,c;if(i.drop=!1,"unknown"===i.type||"success"===i.type)r.isClearQueuePending||r.persistenceConfig.disabled||r.persistenceConfig.db.notifyQueue(),a=i;else if(Mn((function(){return"retry rejected "+JSON.stringify(i)})),r.shouldPersist(t,i))r.persistenceConfig.db.pushToQueue({url:r.url,body:r.body,headers:n,statusCode:i.statusCode,timestamp:r.timestamp,attemptCount:r.getAttemptCount(t)}),a={type:"persisted",drop:!1,statusCode:i.statusCode};else{if(t>0&&r.isRetryableError(i)){var l,u;null===(l=(u=r.config).onIntermediateResult)||void 0===l||l.call(u,i,r.body);var d=r.config.calculateRetryDelay(r.getAttemptCount(t),t);return Mn((function(){return"in memory retry in ".concat(d,"ms")})),(c=d,new Promise((function(e){return setTimeout(e,c)}))).then((function(){return r.retry(e,t-1,n,i.statusCode)}))}(a=i).drop=!0}return null===(o=(s=r.config).onIntermediateResult)||void 0===o||o.call(s,a,r.body),a}))}},{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 Wn(e,t,n,i,r){"control"!==i&&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&&mn()&&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 s,a,c=null!==(s=e.retryConfig.inMemory)&&void 0!==s?s:{attemptLimit:4,statusCodes:[502,504]},l=null!==(a=e.retryConfig.persist)&&void 0!==a?a:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},u={compress:n,inMemoryRetry:{onIntermediateResult:null==r?void 0:r.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==r?void 0:r.onBeforeRetry,onResult:null==r?void 0:r.onResult,idbName:"beacons",attemptLimit:l.attemptLimit,statusCodes:l.statusCodes,maxNumber:l.maxNumber,batchEvictionNumber:l.batchEvictionNumber,throttleWait:l.throttleWait,useIdle:!0,measureIDB:{createStartMark:"idb_open_start",createSuccessMeasure:"idb_open_success_phase",createFailMeasure:"idb_open_fail_phase"}}},d=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Boolean(t.compress),i=Object.assign({attemptLimit:0,statusCodes:Gn,calculateRetryDelay:function(e,t){return 2e3*t}},t.inMemoryRetry);if(t.retryDB)e=t.retryDB;else{var r=Object.assign({idbName:"beacon-transporter",attemptLimit:3,statusCodes:jn,maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},t.persistenceRetry);r.headerName=r.headerName||i.headerName,e=new Hn(r,{compress:t.compress,disablePersistenceRetry:t.disablePersistenceRetry})}return{beacon:function(r,o,s){var a;return fn()?new zn(r,o,i,{db:e,disabled:Boolean(t.disablePersistenceRetry),statusCodes:(null===(a=t.persistenceRetry)||void 0===a?void 0:a.statusCodes)||jn},n).send(s):Promise.resolve({type:"unknown",drop:!0})},database:e}}(u),h=d.beacon,p=d.database;return e.retryBeacon={shouldRetry:!0,beacon:h,database:p},"enabled"===i?(e.retryBeacon.shouldRetry=!1,!u.disablePersistenceRetry&&t.shouldAnonymizeMemberId()?p.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 p.clearQueue()}}),(function(){return p.clearQueue()})).then((function(){e.retryBeacon.shouldRetry=!0})).catch((function(e){Rt.emit("internal:error",{tags:["core-web-tracking:retry:idb"],reason:e})})):(e.retryBeacon.shouldRetry=!0,Promise.resolve())):void 0})).catch((function(e){Rt.emit("internal:error",{tags:["core-web-tracking:retry:setup"],reason:e})}))}var Kn=function(){function e(t){Be(this,e),He(this,"host",void 0),this.host=t}return Fe(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&&Wn(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){Rt.emit("internal:error",{tags:["core-web-tracking:retry:logout"],reason:e})}))}},{key:"sendPayload",value:function(e,t,n,i){var r,o=this.getRetryTreatment();mn()&&"control"!==o&&null!==(r=this.host.retryBeacon)&&void 0!==r&&r.shouldRetry?this.sendPayloadWithRetry(e,t,n):this.sendPayloadFireForget(e,t,n,i)}},{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){Rt.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]:{},i=arguments.length>3?arguments[3]:void 0;if(!Array.isArray(t)||t.length>0){var r="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1;r||!fn()||"undefined"==typeof Promise?gn(e,JSON.stringify(t),{headers:n}):wn(e,JSON.stringify(t),n,this.shouldCompressPayload()).then((function(e){null==i||i.onResult(e,t)}),(function(){}))}}},{key:"getRetryTreatment",value:function(){var e,t,n;if(!this.host.retryConfig)return"control";var i=this.host.retryConfig.lixKey;return i?null!==(e=null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,i))&&void 0!==e?e:"control":"enabled"}},{key:"shouldCompressPayload",value:function(){return!0!==this.host.disableCompression}}]),e}(),Vn="undefined"!=typeof window&&"undefined"!=typeof document,Yn=/JSESSIONID="?([^";]+)"?/,Qn="",Jn=0;function Xn(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheLifeSpan,n=void 0===t?1e4:t,i=e.regex,r=void 0===i?Yn:i;if(!Qn||Date.now()-Jn>n){var o=Vn&&document.cookie.match(r);Qn=o&&o[1]||"",Jn=Date.now()}return Qn}var Zn=function(){function e(t){Be(this,e),He(this,"networkTransporter",void 0),He(this,"inactive",void 0),He(this,"mpName",void 0),He(this,"endpoint",void 0),He(this,"debug",void 0),this.networkTransporter=new Kn(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=ei;break;case"https://www.linkedin-ei.com/li/track/validate":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 Fe(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":Xn(),"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",ei="https://www.linkedin.com/trackingMonitoring/?action=saveClientFragment";function ti(e){return"string"==typeof e}function ni(e){return ti(e)?e:e.topicName||e.eventName}function ii(e){return ti(e)?e:e.eventName}var ri,oi,si=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Be(this,e),He(this,"host",void 0),He(this,"cmoTransporter",void 0),He(this,"clientMonitoringInstanceId",yt()),He(this,"currentContext",li()),He(this,"appState",{}),He(this,"estimatedFragmentSize",0),He(this,"fragmentSizeLimit",void 0),He(this,"activeFragmentEvent",void 0),He(this,"debounceTimer",void 0),this.host=t,this.cmoTransporter=i.cmoTransporter||new Zn(t),this.fragmentSizeLimit=(null===(n=t.clientMonitoringConfig)||void 0===n?void 0:n.fragmentSizeLimit)||10240,this.activeFragmentEvent=ci(this.clientMonitoringInstanceId,0,0,!1,this.getEventHeaders())}return Fe(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,i=Ue(this.activeFragmentEvent.stats.previousInstanceEventStats);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.instanceId===e)return void t(r)}}catch(e){i.e(e)}finally{i.f()}var o=this.getEventHeaders(),s=o.header,a=o.requestHeader,c={header:Object.assign(s,{memberId:-1}),requestHeader:a,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,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getCurrentInstanceId(),o=this.getEventHeaders(),s=o.header,a=o.requestHeader,c={header:Object.assign(s,{memberId:-1}),requestHeader:a,instanceId:r,instanceEventNumber:i,reason:e,rawError:n,eventName:ii(t),eventTopic:ni(t)};this.estimatedFragmentSize+=JSON.stringify(c).length,r===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.failures.push(c):this.findPreviousInstanceStat(r,(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,i=t.requestHeader,r=this.activeFragmentEvent;r.header=n,r.requestHeader=i,this.cmoTransporter.fireFragment(r),this.estimatedFragmentSize=0,this.activeFragmentEvent=ci(this.clientMonitoringInstanceId,r.fragmentNumber+1,r.firstEventNumber+r.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=ui(e.trackingId));var t=this.currentContext.pageInstance;return t.trackingId=ui(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 ai(e){return ri||(ri=new si(e)),{getCurrentInstanceId:function(){return ri.getCurrentInstanceId()},logEventGenerated:function(e){return ri.logEventGenerated(e)},logEventReadyToSend:function(e){ri.logEventReadyToSend(e)},logEventSent:function(e){ri.logEventSent(e)},logPersistedEventSent:function(e,t){ri.logEventSent(t,e)},logNetworkResponseCode:function(e){ri.logNetworkResponseCode(e)},logPersistedNetworkResponseCode:function(e,t){var n;null===(n=ri)||void 0===n||n.logNetworkResponseCode(t,e)},logFailedEvent:function(e,t,n,i){ri.logFailedEvent(e,t,n,i)},logPersistedFailedEvent:function(e,t,n,i,r){ri.logFailedEvent(t,n,i,r,e)},flush:function(){ri.flush()},destroy:function(){ri=void 0},isDestroyed:function(){return void 0===ri},setCurrentContext:function(e){ri.setCurrentContext(e)},updateAppState:function(e){ri.updateAppState(e)}}}function ci(e,t,n,i,r){return{fragmentNumber:t,firstEventNumber:n,isLastFragment:i,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:r.requestHeader,header:r.header}}function li(){return{pageKey:"unknown",pageInstance:Et("unknown")}}function ui(e){return Array.isArray(e)?vt(e):16===e.length?e:function(e){return"string"==typeof e&&!!e.match(bt)}(e)?atob(e):vt(function(e){return et(e)}(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"}(oi||(oi={}));var di="PageViewEvent",hi=function(){function e(t){var n=this;Be(this,e),He(this,"host",void 0),He(this,"queue",void 0),He(this,"preContextQueue",void 0),He(this,"debounceTimer",void 0),He(this,"unloadHandlers",void 0),He(this,"maxQueueSize",void 0),He(this,"flushDebounceTime",void 0),He(this,"trackingEventListeners",[]),He(this,"onHideHandler",(function(){n.forceFlush()})),He(this,"networkTransporter",void 0),He(this,"clientMonitoringConn",void 0),He(this,"clientSequenceNumberCounter",void 0),He(this,"isTimerRunning",void 0),He(this,"enableSequenceNumberLix",void 0),this.host=t,this.queue=[],this.preContextQueue=[],this.unloadHandlers=[];var i=t.batching;this.maxQueueSize=i&&i.maxSize||1,this.flushDebounceTime=i&&i.debounceTime||0,Rt.on("internal:hide",this.onHideHandler),this.networkTransporter=new Kn(t),this.isLixEnabled("pemberly.tracking.monitoring")&&t.clientMonitoringConfig&&!t.inactive&&(this.clientMonitoringConn=ai(t)),this.enableSequenceNumberLix=this.isLixEnabled("tracking.data-loss-web.sequence-number"),this.enableSequenceNumberLix&&(this.getSequenceNumberFromIDB(),this.updateSequenceNumberOnExit(),this.isTimerRunning=!1)}return Fe(e,[{key:"checkAndEnablePersistentRetry",value:function(e){var t,n=(t=this.clientMonitoringConn,{onIntermediateResult:function(e,n){var i;if(t&&!t.isDestroyed())try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length)return;e.statusCode&&t.logNetworkResponseCode(e.statusCode),!0===e.drop&&i.forEach((function(n){var i,r=n.eventInfo.eventName,o=n.eventInfo.topicName||r,s="rawError"in e?e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(s)].join(", ");t.logFailedEvent(oi.UNKNOWN_EXECUTION_ERROR,{eventName:r,topicName:o},a,null!==(i=n.eventBody.header.clientMonitoringInstanceEventNumber)&&void 0!==i?i:-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 i=n[0].eventBody.header.clientMonitoringInstanceId,r=n.length;t.logPersistedEventSent(i,r)}catch(e){}},onResult:function(e,n){var i;if(t)try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length||!i[0].eventBody.header.clientMonitoringInstanceId)return;var r=i[0].eventBody.header.clientMonitoringInstanceId;e.statusCode&&t.logPersistedNetworkResponseCode(r,e.statusCode),!0===e.drop&&i.forEach((function(n){var i=n.eventInfo.eventName,o=n.eventInfo.topicName||i,s="rawError"in e?e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(s)].join(", ");t.logPersistedFailedEvent(r,oi.UNKNOWN_EXECUTION_ERROR,{eventName:i,topicName:o},a,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(ni(e.id)));var n,i=this.host,r=i.api.Promise,o=i.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(),r.resolve(!0)):(this.flush(!0),r.resolve(!0))):(this.preContextQueue.push(t),r.resolve(!0))}},{key:"callOnDestroy",value:function(e){this.unloadHandlers.push(e)}},{key:"destroy",value:function(){this.unloadHandlers.forEach((function(e){return e()})),this.forceFlush(),this.trackingEventListeners=[],this.clientMonitoringConn=void 0,Rt.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){Rt.emit("internal:error",{tags:["core-web-tracking:sequence-number:idb-read"],reason:e})}))}},{key:"updateSequenceNumberToIDB",value:function(){kt("update",this.clientSequenceNumberCounter).catch((function(e){Rt.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=St(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 i=this.host,r=i.appId,o=i.api,s={eventBody:t,eventInfo:"string"==typeof e?{appId:r,eventName:e,topicName:e}:o.assign({appId:r},e)};return n.length>0&&this.host.api.assign(s,{clientBreadcrumbs:n}),s}},{key:"getBreadcrumbs",value:function(e){return e.clientBreadcrumbs||[]}},{key:"getGenericEventBody",value:function(e){var t,n=this.host,i=n.appVersion,r=n.locale,o=n.api,s=o.location,a=o.document,c=o.assign,l=e.meta.context,u=l.pageKey,d=l.pageInstance,h=function(e){return"string"==typeof e?e===di:e.eventName===di}(e.id)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||u,p=null;"string"!=typeof r&&null!==this.host.locale||(p=r);var f={interfaceLocale:p,pageKey:h,path:s.pathname+s.search,referer:a.referrer},m={pageInstance:d,time:e.meta.time,version:i};"number"==typeof this.clientSequenceNumberCounter&&c(m,{clientGlobalSequenceNumber:this.clientSequenceNumberCounter});var g={header:c(m,e.meta.header||{}),requestHeader:c(f,e.meta.requestHeader||{})},v=e.meta.clientMonitoringInstanceId,y=e.meta.clientMonitoringInstanceEventNumber;return v&&c(g.header,{clientMonitoringInstanceId:v,clientMonitoringInstanceEventNumber:y}),c(e.body,g)}},{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,i,r=[],o=[];t.forEach((function(t){var n=e.getGenericEventBody(t),i=e.getBreadcrumbs(t),s=e.envelop(t.id,n,i);e.trigger(s,t.meta);var a=s.eventInfo.eventName;"LixTreatmentsEvent"===a||"JavaScriptErrorEvent"===a?r.push(s):o.push(s),e.enableSequenceNumberLix&&"number"==typeof e.clientSequenceNumberCounter&&e.clientSequenceNumberCounter++})),this.host.inactive||(this.clientMonitoringConn&&(this.clientMonitoringConn.logEventSent(r.length+o.length),i=this.clientMonitoringConn,n={onResult:function(e,t){i&&!i.isDestroyed()&&(e.statusCode&&i.logNetworkResponseCode(e.statusCode),!0===e.drop&&t.forEach((function(t){var n=t.eventInfo.eventName,r=t.eventInfo.topicName||n,o="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(o)].join(", ");null==i||i.logFailedEvent(oi.UNKNOWN_EXECUTION_ERROR,{eventName:n,topicName:r},s,t.eventBody.header.clientMonitoringInstanceEventNumber||-1)})))}}),this.networkTransporter.sendPayloadFireForget(this.host.endpoint,r,void 0,n),this.networkTransporter.sendPayload(this.host.endpoint,o,void 0,n))}}}]),e}();var pi,fi=function(){function e(t,n){Be(this,e),this.clientBreadcrumbType=t,this.id=n}return Fe(e,[{key:"builder",get:function(){return function(){var e={},t=new Proxy({},{get:function(n,i){return"build"===i?function(){return e}:function(n){return e[i.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 mi(e){if(!e)return{};var t=e.trk,n=!1,i=e.licu&&decodeURIComponent(e.licu);e.external_control&&(i="urn:li:externalControl:".concat(decodeURIComponent(e.external_control)),n=!0);var r=e.lipi&&function(e){var t=decodeURIComponent(e).split(";");if(t.length>1)return{pageUrn:t[0],trackingId:t[1]}}(e.lipi),o=r&&{pageInstance:r,pageKey:t}||t&&{pageKey:t};if(e.external_page&&e.external_page_instance){var s=decodeURIComponent(e.external_page);o={pageInstance:{pageUrn:"urn:li:externalPage:".concat(s),trackingId:e.external_page_instance},pageKey:s},n=!0}var a=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 a&&((o=o||{}).applicationInstance=a),{fromExternalApp:n||!!a,previousApplicationInstance:a,previousContext:o,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:i}}function gi(e){return"retryConfig"in e.host}!function(e){e.UNKNOWN="UNKNOWN",e.ME_NOTIFICATION="ME_NOTIFICATION",e.ME_NOTIFICATION_ACTION="ME_NOTIFICATION_ACTION"}(pi||(pi={}));var vi,yi,bi,Ei=function(){function e(t,n){var i,r;if(Be(this,e),He(this,"transporter",void 0),He(this,"delegate",void 0),He(this,"currentContext",void 0),He(this,"appState",void 0),He(this,"previousAppContext",void 0),He(this,"customTransporters",void 0),He(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 s=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[o]=new hi(this.transporter.host.api.assign(s,n.customTransporterHosts[o]))}"enabled"===(null===(i=(r=t.host).__getLixTreatment)||void 0===i?void 0:i.call(r,"pemberly.tracking.monitoring"))&&t.host.clientMonitoringConfig&&!t.host.inactive&&"location"in t.host.api&&(this.clientMonitoringConn=ai(t.host))}return Fe(e,[{key:"host",get:function(){return this.transporter.host}},{key:"checkAndEnablePersistentRetry",value:function(){gi(this.transporter)&&this.transporter.checkAndEnablePersistentRetry(this.delegate)}},{key:"flushAndClearPersistedEventsOnLogout",value:function(){this.forceFlush();var e=gi(this.transporter)?this.transporter.clearPersistedEventsOnLogout():null;return null!=e?e:this.host.api.Promise.resolve()}},{key:"getCurrentContext",value:function(){if(this.currentContext)return St(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]:{},i=this.navMetaFromSeed(e,mi(t));if(this.setCurrentContext(i.to),!n.suppressEventsFiring)return this.fireNavEvents(i)}},{key:"setCurrentContext",value:function(e){var t;this.currentContext=St(e,this.host.api),null===(t=this.clientMonitoringConn)||void 0===t||t.setCurrentContext(St(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,i,r){return this.fireEvent("ControlInteractionEvent",(function(n){var o=wt(n.pageKey,e),s={controlTrackingId:i,controlUrn:o,interactionType:t};return r&&r(o),s}),{context:n})}},{key:"fireEvent",value:function(e,t,n,i){if(!t){var r=ni(e),o=void 0===t?"undefined":null===t?"null":We(t),s='Firing tracking event "'.concat(r,'" with invalid body, you fired "').concat(o,'"');if(this.clientMonitoringConn){var a=this.clientMonitoringConn.logEventGenerated(r);this.clientMonitoringConn.logFailedEvent(oi.MISSING_REQUIRED_PROPERTIES,e,s,a)}throw new Error(s)}var c=i||[];if(c.length>0){var l=c.map((function(e){return fi.toPointer(e)}));this.host.api.assign(t,{clientBreadcrumbPointers:l})}var u=c.length>0?this.generateEnvelopeWithBreadcrumbs(e,t,n,c):this.generateEnvelope(e,t,n);return this.fireEnvelope(u)}},{key:"generateEnvelopeWithBreadcrumbs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=this.generateEnvelope(e,t,n),o=i.length>0?this.addBreadcrumbsToEnvelope(r,i):r;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(ti(e.id)){var i=e.id;e.id={eventName:i,topicName:i,shouldAnonymizeMemberId:!0}}else e.id.shouldAnonymizeMemberId=!0;var r=this.delegate&&this.delegate.preTransporter?this.delegate.preTransporter(e):e;if(r){var o=r.meta.transporterKey,s=o?this.customTransporters[o]:this.transporter;if(!s&&o){var a=ni(r.id),c="Could not find custom transporter: ".concat(o);if(this.clientMonitoringConn){var l=this.clientMonitoringConn.logEventGenerated(a);this.clientMonitoringConn.logFailedEvent(oi.UNKNOWN_EXECUTION_ERROR,r.id,c,l)}throw new Error(c)}return s.fireEvent(r)}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 i={pageType:"full",totalTime:0,trackingCode:this.getTrackingCode(),trackingInfo:{}},r=this.host.api.assign(i,t),o=this.generateEnvelope("PageViewEvent",r,{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),Rt.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,i){var r={controlTrackingId:i,controlUrn:e,interactionType:t};return{beacon:this.fireEvent("ControlInteractionEvent",r,{context:n}),controlUrn:e}}},{key:"generateNavigationEvent",value:function(e){var t=e.triggerId,n=e.triggerUrn,i=e.from;return{previousPageInstance:i&&i.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 i=t.fromExternalApp?{eventName:n,topicName:"InboundNavigationEvent"}:n;return{from:t.previousContext,navEventId:i,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,i=e.from,r=e.navEventId,o=this.generateEnvelope(r,t);o.meta.requestHeader.pageKey=n.pageKey;var s=i&&i.applicationInstance;return s&&(o.meta.header.clientApplicationInstance=s),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]:{},i={directive:n.directive,transporterKey:n.transporterKey,context:n.context||this.currentContext&&St(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:i}}}]),e}();function wi(e){return e.split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0)}!function(){function e(t,n){var i,r=this;Be(this,e),He(this,"core",void 0),He(this,"protocol",void 0),He(this,"throttleKeySet",new Set),He(this,"config",void 0),He(this,"reportTransporterError",(function(e){e.reason instanceof Error||(e.reason=new Error(e.reason||"An error occurred in the transporter")),r.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!==(i=null==n?void 0:n.throttleTime)&&void 0!==i?i:100},Rt.on("internal:error",this.reportTransporterError)}Fe(e,[{key:"reportError",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.callTreeId,s=void 0===o?"":o,a=r.responseHeaders,c=void 0===a?{}:a,l=e.message,u=e.name,d=e.stack,h=void 0===d?"":d,p=e.fileName,f=void 0===p?"":p,m=e.lineNumber,g=void 0===m?0:m,v=e.columnNumber,y=void 0===v?0:v,b=this.core.host,E=b.appId,w=b.appVersion,_=b.service,S=b.serviceInstance,T=b.treeID,C=void 0===T?"":T,k=b.api,I=k.Promise,A=k.location,L=A.host,O=A.pathname,R=A.search,N=A.hash,x=void 0===N?"":N;if(c){t={};var P=new Map;Object.keys(c).forEach((function(e){P.set(e.toLowerCase(),c[e])})),t.callTreeId=P.get("x-li-uuid"),t.microsoftEdgeReference=P.get("x-msedge-ref"),t.pointOfPresenceId=P.get("x-li-pop"),t.fabric=P.get("x-li-fabric")}var M=function(){return n.core.fireEvent("JavaScriptErrorEvent",(function(e){return{appId:E,e:{c:y,l:g,m:l,s:h,t:u,u:f},h:x,l:n.protocol,o:L,p:O,pageKey:e.pageKey,q:R,service:_,serviceInstance:S,serviceVersion:w,t:i,trackingID:e.pageInstance.trackingId,treeID:C,callTreeId:s,responseTraceHeaders:t}}))};if(this.config.throttleTime<0)return M();var D=wi(u+l+h+i.join("")+s);return this.throttleKeySet.has(D)?I.resolve(!1):(this.throttleKeySet.add(D),setTimeout((function(){return n.throttleKeySet.delete(D)}),this.config.throttleTime),M())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),Rt.off("internal:error",this.reportTransporterError)}}])}();var _i=function(){function e(){Be(this,e),He(this,"userTimingEntries",[]),He(this,"longTasks",[]),He(this,"resourceTimingEntries",[]),He(this,"cdnData",void 0)}return Fe(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(Ti),cdnData:this.cdnData}}}]),e}(),Si=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function Ti(e){return Si.reduce((function(t,n){var i=e[n];return void 0!==i&&(t[n]=i),t}),{})}function Ci(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};yi=Object.assign(Object.assign({},n),t),bi=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}(yi.root,n);var i=ki(e,vi.All,(function(){return ki(e,vi.Two,(function(){return ki(e,vi.One)}))}));if(i){var r=Di(Ui(i,e));return r.length>0&&(i=r[0]),Ai(i)}throw new Error("Selector was not found.")}function ki(e,t,n){for(var i=null,r=[],o=e,s=0,a=function(){var e=xi(function(e){var t=e.getAttribute("id");return t&&yi.idName(t)?{name:"#"+zi(t,{isIdentifier:!0}),penalty:0}:null}(o))||xi.apply(void 0,Ge(function(e){return Array.from(e.attributes).filter((function(e){return yi.attr(e.name,e.value)})).map((function(e){return{name:"["+zi(e.name,{isIdentifier:!0})+'="'+zi(e.value)+'"]',penalty:.5}}))}(o)))||xi.apply(void 0,Ge(function(e){return Array.from(e.classList).filter(yi.className).map((function(e){return{name:"."+zi(e,{isIdentifier:!0}),penalty:1}}))}(o)))||xi(function(e){var t=e.tagName.toLowerCase();return yi.tagName(t)?{name:t,penalty:2}:null}(o))||[{name:"*",penalty:3}],a=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var i=0;n&&(n.nodeType===Node.ELEMENT_NODE&&i++,n!==e);)n=n.nextSibling;return i}(o);if(t===vi.All)a&&(e=e.concat(e.filter(Ni).map((function(e){return Ri(e,a)}))));else if(t===vi.Two)e=e.slice(0,1),a&&(e=e.concat(e.filter(Ni).map((function(e){return Ri(e,a)}))));else if(t===vi.One){var c=De(e=e.slice(0,1),1)[0];a&&Ni(c)&&(e=[Ri(c,a)])}var l,u=Ue(e);try{for(u.s();!(l=u.n()).done;)l.value.level=s}catch(e){u.e(e)}finally{u.f()}if(r.push(e),r.length>=yi.seedMinLength&&(i=Ii(r,n)))return"break";o=o.parentElement,s++};o&&o!==yi.root.parentElement&&"break"!==a(););return i||(i=Ii(r,n)),i}function Ii(e,t){var n=Di(Mi(e));if(n.length>yi.threshold)return t?t():null;var i,r=Ue(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(Oi(o))return o}}catch(e){r.e(e)}finally{r.f()}return null}function Ai(e){for(var t=e[0],n=t.name,i=1;i<e.length;i++){var r=e[i].level||0;n=t.level===r-1?"".concat(e[i].name," > ").concat(n):"".concat(e[i].name," ").concat(n),t=e[i]}return n}function Li(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function Oi(e){switch(bi.querySelectorAll(Ai(e)).length){case 0:throw new Error("Can't select any node with this selector: ".concat(Ai(e)));case 1:return!0;default:return!1}}function Ri(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function Ni(e){return"html"!==e.name&&!e.name.startsWith("#")}function xi(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.filter(Pi);return i.length>0?i:null}function Pi(e){return null!=e}function Mi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length>0){var n,i=[],r=Ue(e[0]);try{for(r.s();!(n=r.n()).done;){var o=n.value;i=i.concat(Mi(e.slice(1,e.length),t.concat(o)))}}catch(e){r.e(e)}finally{r.f()}return i}return[t]}function Di(e){return Array.from(e).sort((function(e,t){return Li(e)-Li(t)}))}function Ui(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{counter:0,visited:new Map},i=[];if(e.length>2&&e.length>yi.optimizedMinLength)for(var r=1;r<e.length-1;r++){if(n.counter>yi.maxNumberOfTries)return i;n.counter+=1;var o=Ge(e);o.splice(r,1);var s=Ai(o);if(n.visited.has(s))return i;Oi(o)&&Bi(o,t)&&(i.push(o),n.visited.set(s,!0),i=i.concat(Ui(o,t,n)))}return i}function Bi(e,t){return bi.querySelector(Ai(e))===t}!function(e){e[e.All=0]="All",e[e.Two=1]="Two",e[e.One=2]="One"}(vi||(vi={}));var qi,Fi=/[ -,\.\/:-@\[-\^`\{-~]/,Hi=/[ -,\.\/:-@\[\]\^`\{-~]/,Gi=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,ji={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function zi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},ji),t);"single"!=n.quotes&&"double"!=n.quotes&&(n.quotes="single");for(var i="double"==n.quotes?'"':"'",r=n.isIdentifier,o=e.charAt(0),s="",a=0,c=e.length;a<c;){var l=e.charAt(a++),u=l.charCodeAt(0),d=void 0;if(u<32||u>126){if(u>=55296&&u<=56319&&a<c){var h=e.charCodeAt(a++);56320==(64512&h)?u=((1023&u)<<10)+(1023&h)+65536:a--}d="\\"+u.toString(16).toUpperCase()+" "}else d=n.escapeEverything?Fi.test(l)?"\\"+l:"\\"+u.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?"\\"+u.toString(16).toUpperCase()+" ":"\\"==l||!r&&('"'==l&&i==l||"'"==l&&i==l)||r&&Hi.test(l)?"\\"+l:l;s+=d}return r&&(/^-[-\d]/.test(s)?s="\\-"+s.slice(1):/\d/.test(o)&&(s="\\3"+o+" "+s.slice(1))),s=s.replace(Gi,(function(e,t,n){return t&&t.length%2?e:(t||"")+n})),!r&&n.wrap?i+s+i:s}function Wi(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&"function"==typeof e.now&&(e.timeOrigin||e.timing)){var n,i=e.now();return n=!e.timing&&t?Math.floor(e.timeOrigin):e.timing.navigationStart,Math.round(i+n)}return Date.now()}function Ki(e){var t=e||performance;return Math.round(t.now())}function Vi(e){if(!e)return"null";if(e.nodeType===Node.ELEMENT_NODE)try{return Ci(e,{idName:function(e){return 0!==e.indexOf("ember")}})}catch(e){return"serialization_error"}var t=Vi(e.parentElement||void 0);return"".concat(t," > nodeType(").concat(e.nodeType,")")}function Yi(e,t,n){var i=[];return e&&"function"==typeof e.getEntriesByType&&(t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach((function(e){i.push({entryType:"MEASURE",name:e.name,startTime:e.startTime,duration:e.duration})})),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach((function(e){i.push({entryType:"MARK",name:e.name,startTime:e.startTime,duration:e.duration})})),n&&(e.clearMeasures(),e.clearMarks())),i}function Qi(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var Ji,Xi=function(){function e(t){Be(this,e),He(this,"hostApis",void 0),He(this,"hostnameProperties",void 0),He(this,"usedHostnames",void 0),He(this,"abortController",void 0),He(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 Fe(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return Ct(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,i=n.AbortController,r=n.Promise,o=Tt(Ct(this.pendingPromises),r),s=setTimeout((function(){t.abortController.abort(),t.abortController=new i}),e);return o.then((function(){return clearTimeout(s),t.getPresentData()}))}},{key:"inspectEntryForCdnData",value:function(e){var t=this;if(!(e.name.indexOf(".licdn.")<0)){var n,i,r=this.hostApis.assign,o=(n=e.name,i=this.hostApis.document,(qi=qi||i.createElement("a")).href=n,qi.hostname);if(this.usedHostnames.add(o),!this.hostnameProperties[o]&&!this.isResourcePossiblyFromCache(e)){var s=this.fetchCdnFromUrl(e.name).then((function(e){var n=r({hostname:o},e);return t.hostnameProperties[o]||(t.hostnameProperties[o]=n),t.pendingPromises.delete(s),n}));this.pendingPromises.add(s)}}}},{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}(),Zi=function(){function e(t,n,i,r){Be(this,e),He(this,"hostApis",void 0),He(this,"statics",void 0),He(this,"options",void 0),He(this,"allowTimingOrigin",void 0),He(this,"collectResourceTimings",void 0),He(this,"collectCdnData",void 0),He(this,"perfObserver",void 0),He(this,"renderTimings",new Map),He(this,"urlToTreeId",new Map),He(this,"cdnDataProvider",void 0),He(this,"observables",new _i),this.hostApis=t,this.statics=n,this.options=i,this.allowTimingOrigin=r,this.collectResourceTimings=i["enable-rs-timing"],this.collectCdnData=i["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new Xi(t))}return Fe(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e,t){return(qi=qi||t.createElement("a")).href=e,qi.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:Wi(this.hostApis.performance,this.allowTimingOrigin)})}},{key:"recordRenderEnd",value:function(e){var t=this.renderTimings.get(e);t&&(t.renderEnd=t.renderEnd||Wi(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,i=e.immediate,r=this.collectSynchronousData(n);if(i)return r;var o=this.collectAsynchronousData();return"then"in o?o.then((function(e){return(0,t.hostApis.assign)(r,e),r})):r}},{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,i=t.PerformanceObserver,r=Object.create(null);return this.statics.pageLoadMode=e?"INITIAL":"PARTIAL",i||(this.observables.userTimingEntries=Yi(this.hostApis.performance,this.options,!0),this.collectResourceTimings&&this.processNewResourceTimings()),this.observables.attachTreeIds(this.urlToTreeId),this.urlToTreeId.clear(),n(r,this.observables.getData(),this.snapshot,this.statics),e&&n(r,function(e){if(!e)return{navigationTimingApi:!1};var t=Object.create({});if("function"==typeof e.getEntriesByType){var n=e.getEntriesByType("navigation")[0];n&&(["fetchStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"].every((function(e){return"number"==typeof n[e]}))&&(t.htmlMetrics={htmlFetchStart:n.fetchStart,htmlResponseEnd:n.responseEnd,htmlDecodedBodySize:n.decodedBodySize,htmlEncodedBodySize:n.encodedBodySize,htmlTransferSize:n.transferSize}),t.workerStart=n.workerStart)}var i=e.timing,r=e.navigation;return i&&r?(t.navigationTimingApi=!0,$i.forEach((function(e){e in i&&(t[e]=i[e])})),t.navigationType=r.type,t.redirectCount=r.redirectCount):t.navigationTimingApi=!1,t}(this.hostApis.performance)),n(r,this.collectAsynchronousData(!0)),r}},{key:"collectAsynchronousData",value:function(e){var t=this,n={cdnData:[],usedCDN:this.extractUsedCDN([])};if(e){if(this.collectCdnData){var i=this.cdnDataProvider.getPresentData();n.cdnData=i,n.usedCDN=this.extractUsedCDN(i)}return n}var r=[];return this.collectCdnData&&r.push(this.cdnDataProvider.getDataWhenReady(this.options["async-plugins-timeout"]).then((function(e){n.cdnData=e,n.usedCDN=t.extractUsedCDN(e)}))),r.length>0?Tt(r,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,i=e.name,r=e.startTime,o=e.duration;"resource"===n?t.processSingleResourceTiming(e):"mark"===n?t.observables.userTimingEntries.push({entryType:"MARK",name:i,startTime:r,duration:o}):"measure"===n?t.observables.userTimingEntries.push({entryType:"MEASURE",name:i,startTime:r,duration:o}):"longtask"===n&&t.observables.longTasks.push({duration:o,name:i,startTime:r})}))})),this.observables.userTimingEntries=Yi(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:Qi(this.renderTimings),networkInformationMetrics:er(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}(),$i=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"];function er(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"}(Ji||(Ji={}));var tr=(He(Me={},"web-ui-framework","EMBER"),He(Me,"app-id","linkedin.rum.tracking"),He(Me,"app-version","unknown"),He(Me,"is-single-page-app",!0),He(Me,"user-timing-mark-enabled",!1),He(Me,"user-timing-measure-enabled",!0),He(Me,"beacon-source","apps"),He(Me,"enable-rs-timing",!0),He(Me,"enable-cdn-tracking",!1),He(Me,"async-plugins-timeout",5e3),He(Me,"beacon-timeout",3e4),He(Me,"enable-memory-measurement",!1),He(Me,"pageKeyPrefix",""),Me),nr=function(){function e(t,n,i){Be(this,e),He(this,"featureName",void 0),He(this,"trackingCore",void 0),He(this,"rumConfig",void 0),He(this,"observing",!1),He(this,"basePageTreeId",void 0),He(this,"startPageInstance",void 0),He(this,"startMemory",void 0),He(this,"reportTimeouts",[]),this.featureName=t,this.trackingCore=n,this.rumConfig=i}return Fe(e,[{key:"startObserving",value:function(){var t,n=this,i=this.getMemory();i&&!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=i,this.reportTimeouts=e.checkpoints.map((function(e){return setTimeout((function(){return n.reportMemory(e)}),60*e*1e3)})))}},{key:"stopObserving",value:function(){this.reportTimeouts.forEach((function(e){return clearTimeout(e)})),this.observing=!1}},{key:"reportMemory",value:function(e){var t={name:this.featureName,basePageTreeId:this.basePageTreeId,startTime:Ki(this.trackingCore.host.api.performance),duration:0,startPageInstance:this.startPageInstance,marks:this.createMemoryMarks("-".concat(e,"min")),spans:[]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"FeaturePerformanceMeasurementEvent"},t)}},{key:"createMemoryMarks",value:function(e){var t=this.getMemory(),n=["jsHeapSizeLimit","totalJSHeapSize","usedJSHeapSize"].map((function(n){return{name:n+e,startTime:t[n]}})),i=t.usedJSHeapSize-this.startMemory.usedJSHeapSize;return n.push({name:(i<0?"usedJSHeapSizeDecrease":"usedJSHeapSizeIncrease")+e,startTime:Math.abs(i)},{name:"utilization"+e,startTime:Math.round(t.usedJSHeapSize/t.totalJSHeapSize*100)}),n}},{key:"getMemory",value:function(){return this.trackingCore.host.api.performance.memory}}]),e}();He(nr,"checkpoints",[1,3,10,30,90,180,300]);var ir,rr,or,sr,ar,cr=Fe((function e(t,n,i){Be(this,e),He(this,"webUIFramework",void 0),He(this,"timeSource",void 0),He(this,"isSinglePageApp",void 0),He(this,"appRenderMode",void 0),He(this,"isAppRenderFailed",void 0),He(this,"pageLoadMode","INITIAL"),He(this,"isSSL",void 0),He(this,"treeId",void 0),He(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:"===i.api.location.protocol?1:0,this.treeId=i.treeID,this.isFromServiceWorker=i.isFromServiceWorker})),lr=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)}},ur=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){}},dr=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},hr=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},pr=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},fr=-1,mr=function(){return"hidden"===document.visibilityState?0:1/0},gr=function(){dr((function(e){var t=e.timeStamp;fr=t}),!0)},vr=function(){return fr<0&&(fr=mr(),gr(),hr((function(){setTimeout((function(){fr=mr(),gr()}),0)}))),{get firstHiddenTime(){return fr}}},yr=!1,br=-1,Er=function(e,t){yr||(function(e,t){var n,i=vr(),r=lr("FCP"),o=function(e){"first-contentful-paint"===e.name&&(a&&a.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},s=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],a=s?null:ur("paint",o);(s||a)&&(n=pr(e,r,t),s&&o(s),hr((function(i){r=lr("FCP"),n=pr(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,n(!0)}))}))})))}((function(e){br=e.value})),yr=!0);var n,i=function(t){br>-1&&e(t)},r=lr("CLS",0),o=0,s=[],a=function(e){if(!e.hadRecentInput){var t=s[0],i=s[s.length-1];o&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,s.push(e)):(o=e.value,s=[e]),o>r.value&&(r.value=o,r.entries=s,n())}},c=ur("layout-shift",a);c&&(n=pr(i,r,t),dr((function(){c.takeRecords().map(a),n(!0)})),hr((function(){o=0,br=-1,r=lr("CLS",0),n=pr(i,r,t)})))},wr={passive:!0,capture:!0},_r=new Date,Sr=function(e,t){ir||(ir=t,rr=e,or=new Date,kr(removeEventListener),Tr())},Tr=function(){if(rr>=0&&rr<or-_r){var e={entryType:"first-input",name:ir.type,target:ir.target,cancelable:ir.cancelable,startTime:ir.timeStamp,processingStart:ir.timeStamp+rr};sr.forEach((function(t){t(e)})),sr=[]}},Cr=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(){Sr(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,wr),removeEventListener("pointercancel",i,wr)};addEventListener("pointerup",n,wr),addEventListener("pointercancel",i,wr)}(t,e):Sr(t,e)}},kr=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,Cr,wr)}))},Ir=function(e,t){var n,i=vr(),r=lr("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),n(!0))},s=ur("first-input",o);n=pr(e,r,t),s&&dr((function(){s.takeRecords().map(o),s.disconnect()}),!0),s&&hr((function(){var i;r=lr("FID"),n=pr(e,r,t),sr=[],rr=-1,ir=null,kr(addEventListener),i=o,sr.push(i),Tr()}))},Ar={},Lr=function(e,t){var n,i=vr(),r=lr("LCP"),o=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e)),n()},s=ur("largest-contentful-paint",o);if(s){n=pr(e,r,t);var a=function(){Ar[r.id]||(s.takeRecords().map(o),s.disconnect(),Ar[r.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,a,{once:!0,capture:!0})})),dr(a,!0),hr((function(i){r=lr("LCP"),n=pr(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,Ar[r.id]=!0,n(!0)}))}))}))}},Or=["LCP","FID","CLS"],Rr={LCP:"LargestContentfulPaint",FID:"FirstInputDelay",CLS:"CumulativeLayoutShift"},Nr={},xr=function(){var e;if(!Vn)return"";var t=window.performance,n=void 0;if("function"==typeof(null==t?void 0:t.getEntriesByType)){var i,r=null===(i=window.performance)||void 0===i?void 0:i.getEntriesByType("navigation");(null==r?void 0:r.length)>0&&(n=r[0])}return(null===(e=n)||void 0===e?void 0:e.name)||window.location.href}(),Pr=!1,Mr=[],Dr={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"};function Ur(){var e=!0===window.__test__resetWebVitalsState;if(!Pr||e){e&&(Mr=[]),Or.forEach(Br);var t=Symbol();ar=t,[Lr,Ir,Er].forEach((function(e){return e(qr.bind(null,t),!0)})),[Lr,Ir,Er].forEach((function(e){return e(Fr.bind(null,t))})),Pr=!0}}function Br(e){Nr[e]={name:e,value:-1,updateHistory:[]};var t=Dr[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||(Nr[e].value=-2)}function qr(e,t){if(e===ar){var n=Nr[t.name],i=Ki();n&&(n.updateHistory.push({time:i,data:t}),n.value=t.value),Mr.forEach((function(e){return e(t,i,!1)}))}}function Fr(e,t){e===ar&&Mr.forEach((function(e){return e(t,Ki(),!0)}))}var Hr=function(){function e(t,n){Be(this,e),He(this,"basePageTreeId",void 0),He(this,"basePageKey",void 0),He(this,"observing",!1),He(this,"appContextMap",new Map),He(this,"rumConfig",void 0),He(this,"trackingCore",void 0),this.trackingCore=t,this.rumConfig=n}return Fe(e,[{key:"startObserving",value:function(){var e,t,n=this;Ur(),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",Or.forEach((function(e){var t;-2===(null===(t=Nr[e])||void 0===t?void 0:t.value)&&n.reportMetric(e)})),t=this.onMetricUpdate.bind(this),Mr.push(t))}},{key:"stopObserving",value:function(){this.observing=!1}},{key:"onMetricUpdate",value:function(e,t,n){var i;this.observing&&(n?this.reportMetric(e.name):this.appContextMap.set(t,{time:t,url:location.href,pageKey:null===(i=this.trackingCore.getCurrentContext())||void 0===i?void 0:i.pageKey}))}},{key:"reportMetric",value:function(e){var t=Nr[e],n={name:Rr[e]||e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value);var i=Nr[e];if(i){var r=function(e,t,n,i,r){var o={basePageTreeId:e,basePageKey:t,basePageUrl:xr},s=null;switch(n.name){case"LCP":s=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1],s={pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",element:Vi(o.element),renderTime:Math.round(o.renderTime),loadTime:Math.round(o.loadTime),size:Math.round(o.size)};return o.url&&(s.url=o.url),s}(n,i);break;case"FID":s=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1];return{pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",processingStart:Math.round(o.processingStart),processingEnd:Math.round(o.processingEnd),target:Vi(o.target)}}(n,i);break;case"CLS":s=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 i=n.reduce((function(e,t){return e&&e.value>t.value?e:t})),r=e.updateHistory.find((function(e){return e.data.entries.includes(i)})),o=null;i&&i.sources&&i.sources.length&&(o=i.sources.reduce((function(e,t){return e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t})));var s,a=t.get(r.time);return o&&a?{shiftCount:n.length,"largestShift.value":i.value,"largestShift.hadRecentInput":i.hadRecentInput,"largestShift.largestSource.node":Vi(null===(s=o)||void 0===s?void 0:s.node),"largestShift.pageKey":a.pageKey||"_unknown","largestShift.url":a.url,"largestShift.startTime":Math.round(i.startTime)}:null}(n,i)}if(s){var a={};return r(a,o,s),a}return o}(this.basePageTreeId,this.basePageKey,i,this.appContextMap,this.trackingCore.host.api.assign);n.metadata=function(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];t[n]="string"==typeof i?i:JSON.stringify(i)})),t}(r)}var o={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},o)}}]),e}();!function(){function e(t,n,i){var r,o;Be(this,e),He(this,"core",void 0),He(this,"config",void 0),He(this,"collector",void 0),He(this,"boomerangStart",-1),He(this,"webVitalsObserver",void 0),He(this,"appMemoryObserver",void 0),He(this,"pageMemoryObserver",void 0),He(this,"liveTokens",new Set),He(this,"stateWM",new WeakMap),He(this,"activeToken",void 0),He(this,"isInitial",void 0),He(this,"beforeHideHandlerBound",this.beforeHideHandler.bind(this)),this.core=i,this.config=function(e,t){for(var n in e)void 0!==t[n]&&(e[n]=t[n]);return e}(i.host.api.assign({},tr),n);var s="enabled"===(null===(r=(o=this.core.host).__getLixTreatment)||void 0===r?void 0:r.call(o,"pemberly.tracking.time-origin-epoch-time"));this.collector=new Zi(i.host.api,new cr(t,this.config,i.host),this.config,s),this.collector.startObserving(),Rt.before("internal:hide",this.beforeHideHandlerBound)}Fe(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,i;this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(),this.isInitial=void 0===this.isInitial,this.isInitial||this.collector.reset();var r,o=Object.create(null),s="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:Wi(this.core.host.api.performance,s)}),(this.config["enable-memory-measurement"]||"enabled"===(null===(n=(i=this.core.host).__getLixTreatment)||void 0===n?void 0:n.call(i,"pemberly.tracking.rum-memory-measurement")))&&(null===(r=this.pageMemoryObserver)||void 0===r||r.stopObserving(),this.pageMemoryObserver=new nr("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new nr("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),o}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new Hr(this.core,this.config),this.webVitalsObserver.startObserving())}},{key:"end",value:function(e){var t,n,i=this,r=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 s=this.stateWM.get(e),a="enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time")),c=Wi(this.core.host.api.performance,a);s.endProps={renderCompleteTime:c,isImpactedByHiddenWindow:r,rumKey:o};var l=this.activeToken;s.fireRumEventTimeout=setTimeout((function(){var e=i.collector.collect({isInitial:s.isInitial});"then"in e?e.then((function(e){i.fireRumEvent(e,l)})):i.fireRumEvent(e,l)}),this.config["beacon-timeout"]),this.activeToken=void 0}else Rt.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;Rt.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 i=e.collector.collect({isInitial:n.isInitial,immediate:!0});e.fireRumEvent(i,t)}}))}},{key:"fireRumEvent",value:function(e,t){if(this.stateWM.get(t)){var n=this.core.host.api.assign,i=this.stateWM.get(t),r=i.startTime,o=i.endProps;if(o){var s=o.renderCompleteTime,a=o.isImpactedByHiddenWindow,c=o.rumKey,l=this.boomerangStart=e.navigationStart||this.boomerangStart,u=e.navigationStart||r,d=s-u,h=this.config["app-version"];this.core.fireEvent({appId:this.config["app-id"],eventName:"RealUserMonitoringEvent"},(function(t){return n({pageKey:c||t.pageKey,isImpactedByHiddenWindow:a,appVersion:h,timeDone:d,navigationStart:u,boomerangStart:l,renderCompleteTime:s},e)})),i.fireRumEventTimeout&&clearTimeout(i.fireRumEventTimeout),this.liveTokens.delete(t),this.stateWM.delete(t)}else this.abort(t)}}},{key:"beforeHideHandler",value:function(){this.flushEndedSessions()}}])}();var Gr="undefined"!=typeof window&&"undefined"!=typeof performance,jr="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG");function zr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax",n=arguments.length>2?arguments[2]:void 0;e.fireTrackingEvent("PageViewEvent",Wr(n,t))}function Wr(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax";const n=j(document),i=W(document),r=Pe();let o={};return r&&(o.theme=r.toUpperCase()),i&&(o.interfaceLocale=i),e&&(o.pageKey=e),{header:{},requestHeader:o,pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:n}}}function Kr(e,t){const n=W(document),i={};n&&(i.interfaceLocale=n);const r={header:{},requestHeader:i,moduleNames:t};e.fireTrackingEvent("ViewModuleImpressionEvent",r)}function Vr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.state&&e.state.currentPageInstance||{};let{trackingId:n}=t;return n&&!Yr(n)&&e.convertUuidTrackingIdToBase64&&(n=e.convertUuidTrackingIdToBase64(n)),"".concat(t.pageUrn,";").concat(n)}function Yr(e){return"string"==typeof e&&"=="===e.slice(-2)}function Qr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Le({},e),n=N(window.location.href,"originalReferer")||N(window.location.href,"original_referer");return n&&(t.requestHeader=Le(Le({},t.requestHeader),{},{referer:n})),Jr(t)}function Jr(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=Le({},e),n=Pe();return n&&(t.requestHeader=Le(Le({},t.requestHeader),{},{theme:n.toUpperCase()})),t}!function(){function e(t,n){Be(this,e),He(this,"featureKey",void 0),He(this,"productName",void 0),He(this,"endPageInstance",void 0),He(this,"startPageInstance",void 0),He(this,"isCanceled",!1),He(this,"featureIdentifier",void 0),He(this,"name",void 0),He(this,"startTime",void 0),He(this,"duration",void 0),He(this,"marks",[]),He(this,"spanStarts",new Map),He(this,"spans",[]),He(this,"isSpanContainer",!1),He(this,"basePageTreeId",void 0),He(this,"isClosed",!1),this.featureKey=t,this.productName=n;var i=n?"::".concat(n):"";this.featureIdentifier="".concat(t).concat(i),this.name=t}Fe(e,[{key:"start",value:function(e){this.startPageInstance=e,Gr&&(this.startTime=Ki(),jr&&performance.mark("LI:".concat(this.featureIdentifier,"-start")))}},{key:"mark",value:function(e){Gr&&(this.marks.push({name:e,startTime:Ki()}),jr&&(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){Gr&&(this.spanStarts.set(e,Ki()),jr&&performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(Gr&&this.spanStarts.has(e)){var n=this.spanStarts.get(e);this.spans.push({name:t||e,startTime:n,duration:Ki()-n}),jr&&(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,Gr&&(this.duration=Ki()-this.startTime,jr&&!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(Gr){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(Gr){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{ENTER:Xr,ESCAPE:Zr}=Q,$r="modal",eo="modal__overlay--visible",to="no-scroll",no="top-level-modal-container";class io{constructor(e){let{enablePageViewTracking:t=!1,shouldHideModal:n=(()=>!1),triggerByOutletEl:i=!0,shouldMoveToTopContainer:r=!0,events:o={},focusElement:s,pageKey:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No modal element passed in");this._el=e,this._parentNode=this._el.parentNode,r&&(this._topLevelContainer=this._getTopLevelContainer()),this._wrapperEl=this._el.querySelector(".".concat("modal__wrapper")),this._overlayEl=this._el.querySelector(".".concat("modal__overlay")),o&&(this._events=o),i&&(this._outletEls=this._getOutletEls()),this._exitButtonEl=this._el.querySelector(".".concat("modal__dismiss")),this._onKeyDownEvent=e=>this._onKeyDown(e),this._enablePageViewTracking=t,this._pageKey=a,this._shouldHideModal=n,this._shouldMoveToTopContainer=r;this._el.querySelector("[id='".concat("modalNoDismiss","']"))&&(this._isModalNonDismissible=!0),this._focusElement=s,i&&this._outletEls.forEach((e=>{e.addEventListener("click",(()=>this.open()))})),this._isModalNonDismissible||(this._exitButtonEl&&this._exitButtonEl.addEventListener("click",(()=>this.close())),this._overlayEl.addEventListener("click",this._handleOverlayClick.bind(this))),this._focusTrap=new he(this._wrapperEl)}_getOutletEls(){const e=this._el.dataset.outlet,t=[...("default-outlet"===e?this._parentNode:document).querySelectorAll('[data-modal="'.concat(e,'"]'))];if(!t.length)throw new Error("No outlet was found with a data-modal attribute equal to the provided dataCustomOutlet param ".concat(e));return t}_getTopLevelContainer(){const e=document.querySelector(".".concat(no));if(!e){const e=document.createElement("div");return e.className=no,document.body.appendChild(e)}return e}_handleOverlayClick(e){e.target===this._wrapperEl||this._wrapperEl.contains(e.target)||this.close()}_onKeyDown(e){const t=X(e.key),n=t===Xr&&document.activeElement===this._exitButtonEl;(t===Zr||n)&&(this._isModalNonDismissible||this.close(),e.preventDefault())}open(){let{focusElement:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._shouldHideModal())return this._focusElement=e||this._focusElement,this._previouslyFocusedEl=document.activeElement,this._overlayEl.classList.add(eo),this._shouldMoveToTopContainer&&this._topLevelContainer.appendChild(this._el),this.noScroll(),document.addEventListener("keydown",this._onKeyDownEvent),U(this._el,"open"),this._wrapperEl&&this._wrapperEl.focus(),this._focusTrap.init(),this._enablePageViewTracking&&window.tracking?window.tracking.then((e=>{zr(e,"ajax",this._pageKey||"".concat(this._el.id))})):(U(this._wrapperEl,"afterOpen"),Promise.resolve());U(this._el,"didNotOpen")}async close(){var e,t;this._events.onBeforeClose&&await(null===(e=this._events)||void 0===e||null===(t=e.onBeforeClose)||void 0===t?void 0:t.call(e,this._wrapperEl));this._overlayEl.classList.remove(eo),this._shouldMoveToTopContainer&&this._parentNode.appendChild(this._el),this.removeNoScroll(),document.removeEventListener("keydown",this._onKeyDownEvent),U(this._el,"close"),setTimeout((()=>{var e;(null===(e=this._focusElement)||void 0===e?void 0:e.focus())||this._previouslyFocusedEl.focus()}),50),this._focusTrap.tearDown()}noScroll(){document.body.classList.add(to)}removeNoScroll(){document.body.classList.remove(to)}}class ro{constructor(e){if(!e)throw Error("An element must be provided to SidePanel");this.el=e,this.modalEl=this.el.querySelector(".modal"),this.modal=new io(this.modalEl,{events:this._events()}),this._onAfterOpen()}_onAfterOpen(){this.modalEl.addEventListener("afterOpen",(e=>{e.target.classList.remove("translate-x-full")}))}_events(){return{onBeforeClose:e=>new Promise((t=>{e.classList.add("translate-x-full"),setTimeout((()=>{t()}),330)}))}}}const oo="member-nav-header__search--focused";class so{constructor(){const e=document.querySelector(".member-nav-menu");if(!e)throw Error("The member header should have a dropdown element");const t=document.querySelector('[data-id="member-nav-header__link-item-me"]');this.collapsibleDropdown=new Ee(e,{dropdownTriggerEl:t}),this.searchEl=document.querySelector('[data-id="member-nav-header__search"]'),this.searchEl&&(this.searchEl.addEventListener("focusin",(()=>this.searchEl.classList.add(oo))),this.searchEl.addEventListener("focusout",(()=>this.searchEl.classList.remove(oo)))),this.sidePanelEl=document.querySelector(".sidepanel-menu"),this.sidePanelEl&&(this.sidePanel=new ro(this.sidePanelEl))}}function ao(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 co=/ /g,lo=/[\s\u0000<>"]|%00/,uo=/\\/,ho=/([.]|%2e){2}/i;let po=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 fo(e){let t,n="invalid://";if("string"!=typeof e)return ao("jSecure Warning: url must be a string","error"),n;if(t=e.trim(),t.indexOf(" ")>-1&&(ao("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(co,"+")),!po.test(t))return ao("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(lo.test(t))return ao("jSecure Error: not valid url character found in url: "+e,"error"),n;let i,r=t.split("?")[0],o=!1;try{i=decodeURI(r)}catch(e){o=!0}return o?(ao("jSecure Error: malformed url path detected: "+r),n):uo.test(r)||ho.test(r)||ho.test(i)?(ao("jSecure Error: malicious data found in url path: "+r,"error"),n):e}const mo={redirect(e){window&&(window.location.href=e)}};const go={className:"class"},vo="A path to the asset must be provided";function yo(e){return(new DOMParser).parseFromString(e,"image/svg+xml").firstChild}function bo(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Object.keys(t).map((n=>{const i=go[n]||n;e.setAttribute(i,t[n])})),e}function Eo(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(vo));const n=Le({focusable:"false"},t);return we(e,{sendCookies:!1,skipCsrfToken:!0}).then((e=>yo(e.responseText))).then((e=>bo(e,n)))}(t,n?{className:n}:{}).then((t=>(e.appendChild(t),e.setAttribute("aria-hidden","true"),t)))}const wo=["IMG","IFRAME","VIDEO","SCRIPT"],_o="SCRIPT";class So{constructor(){let{delayedUrlAttributeName:e="data-delayed-url",delayedPosterAttributeName:t="data-delayed-poster",delayedBackground:n="data-delayed-background",embeddedSrcAttributeName:i="data-li-src",ghostClassesAttributeName:r="data-ghost-classes",ghostUrlAttributeName:o="data-ghost-url",lazyloadClassName:s="lazy-load",lazyloadedClassName:a="lazy-loaded",onLoadClassName:c="onload",onErrorClassName:l="onerror",disableElementInViewportCondition:u=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.elementCache=[],this.onLoadClassName=c,this.onErrorClassName=l,this.delayedUrlAttributeName=e,this.delayedPosterAttributeName=t,this.delayedBackground=n,this.embeddedSrcAttributeName=i,this.lazyloadClassName=s,this.lazyloadedClassName=a,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=r,this.disableElementInViewportCondition=u,T((()=>this.refreshLoader()))}getLazyLoadedJavascriptModule(e){return this.scriptLoadPromises[e]=this.scriptLoadPromises[e]||B(),this.scriptLoadPromises[e]}refreshLoader(){this.elementCache=L(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===_o){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",fo(n));const t=e.getAttribute(this.ghostClassesAttributeName);t&&t.length&&t.split(" ").forEach((t=>{e.classList.add(t)})),this.updateBusyState(e)}if(e.tagName===_o){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===_o||t.classList.contains(this.onLoadClassName)||this.disableElementInViewportCondition||O(t)){const n=t.hasAttribute(this.embeddedSrcAttributeName)&&this._dropHttp(t.getAttribute(this.embeddedSrcAttributeName))||t.getAttribute(this.delayedUrlAttributeName);n&&"ICON"===t.tagName?Eo(t,n).then((e=>{this.lazyloadElOnload(e),this.lazyloadElOnload(t)})).catch((()=>this.lazyloadOnerror(t))):n&&-1!==wo.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=fo(n)):n&&t.hasAttribute(this.delayedBackground)?(t.style.backgroundImage='url("'.concat(fo(n),'")'),this.lazyloadElOnload(t)):this.lazyloadOnerror(t),"VIDEO"===t.tagName&&(t.poster=fo(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!==_o&&(null==e||e.setAttribute("aria-busy",t))}}let To=null;function Co(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return To=To||new So(e),To}function ko(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window;return e.innerWidth<=769}function Io(e){return e.scrollHeight>e.offsetHeight}const Ao="hidden",Lo="aria-hidden";function Oo(e,t){const n=L(e);for(let e=0;e<n.length;e++)n[e]&&1===n[e].nodeType&&t(n[e])}function Ro(e){xo([e])}function No(e){Po([e])}function xo(e){Oo(e,(e=>{e.classList.add(Ao),e.setAttribute(Lo,"true")}))}function Po(e){Oo(e,(e=>{e.classList.remove(Ao),e.setAttribute(Lo,"false")}))}function Mo(e){null==e||e.setAttribute("disabled","disabled"),null==e||e.setAttribute("aria-disabled","true")}function Do(e){null==e||e.removeAttribute("disabled"),null==e||e.removeAttribute("aria-disabled")}function Uo(){return document.documentElement.classList.contains("safari")}function Bo(){return document.documentElement.classList.contains("ios")}function qo(){const e=document.querySelector('meta[name="pillar"]');return e?e.getAttribute("content"):""}function Fo(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const i=null==n?void 0:n.querySelector(".".concat(e));if(i&&Io(i)){const r=n.querySelector(t);null==r||r.classList.remove("invisible"),null==r||r.addEventListener("click",(()=>{i.classList.remove(e),r.classList.add("invisible")}))}}const Ho="prev",Go="next",jo="slide-list__list--dragging",zo="slide-list__indicator-button-container",Wo="slide-list__indicator--selected";class Ko{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(!e)throw new Error("No element passed in");this._el=e,this._previousButton=e.querySelector(".".concat('slide-list__nav-button[data-direction="prev"]')),this._nextButton=e.querySelector(".".concat('slide-list__nav-button[data-direction="next"]')),this._listEl=e.querySelector(".slide-list__list"),this._dragLimit=this._listEl.offsetWidth,this._items=[...this._listEl.children],this._lock={},this._currentPage=t,this._isRtl="rtl"===document.body.dir,this._isMinimalNav=e.querySelector(".".concat("slide-list__header-nav--minimal")),this._prevTabIndexMap=new Map,this._boundFireScrollEvent=this._fireScrollEvent.bind(this),this._indicatorElement=e.querySelector(".".concat(zo)),this._indicatorClickHandler=this._handleIndicatorClick.bind(this),this._noMorePreviousContentAlert=this._el.querySelector(".previous-slide-list__a11y-notification"),this._noMoreNextContentAlert=this._el.querySelector(".next-slide-list__a11y-notification"),this._initCalc(),window.addEventListener("resize",this._handleWindowResize.bind(this)),"ontouchstart"in window&&(this._el.addEventListener("touchstart",this._handleTouchStart.bind(this)),this._el.addEventListener("touchmove",this._handleTouchMove.bind(this)),this._el.addEventListener("touchend",this._handleTouchEnd.bind(this))),e.querySelector(".slide-list__nav")&&this._el.addEventListener("click",this._handleScrollAction.bind(this))}next(e){return e=e||1,this._currentPage+e<=this._pageTranslates.length-1&&(this._currentPage+=e,this._updateSlideButtons(),this._updateListPosition(),this._updateFocusableElements(),this._dispatchPageChangeEvent()),this._currentPage}prev(e){return e=e||1,this._currentPage-e>=0&&(this._currentPage-=e,this._updateSlideButtons(),this._updateListPosition(),this._updateFocusableElements(),this._dispatchPageChangeEvent()),this._currentPage}goToItem(e){const t=Number(e)-this._currentPage;if(0===t)return this._currentPage;t<0?this.prev(Math.abs(t)):this.next(t)}_handleIndicatorClick(e){const t=e.target.closest("[data-position]");t&&this.goToItem(t.dataset.position)}_handleWindowResize(){this._isResizing||(this._isResizing=!0,window.requestAnimationFrame(this._initCalc.bind(this)))}_updateIndicator(){this._indicatorElement&&(this._pageItems.length===this._items.length?(No(this._indicatorElement),this._indicatorElement.isActive=!0,this._indicatorElement.addEventListener("click",this._indicatorClickHandler)):(Ro(this._indicatorElement),this._indicatorElement.isActive=!1,this._indicatorElement.removeEventListener("click",this._indicatorClickHandler)))}_initCalc(){this._pageTranslates=this._getPageTranslates(),this._pageTranslates[this._currentPage]||(this._currentPage=0),this._updateIndicator(),this._updateSlideButtons(!0),this._updateListPosition(),this._isResizing=!1,this._updateFocusableElements()}_getPageTranslates(){const e=this._listEl.offsetWidth,t=this._listEl.scrollWidth,n=this._isRtl?e-this._items[0].offsetLeft-this._items[0].offsetWidth:this._items[0].offsetLeft,i=t-e;let r=[0];const o=[new Set],s=[];let a=0;for(let t=0;t<this._items.length;t+=1){const c=r[r.length-1],l=o[r.length-1],u=this._items[t].offsetLeft,d=this._items[t].offsetWidth;let h=Math.abs(this._isRtl?u+d:u),p=Math.abs(this._isRtl?u:u+d);if(s.push(h),this._isRtl&&u>=0)l.add(this._items[t]);else if(0===h&&0===n||0===a)a=p,l.add(this._items[t]);else{if(p>c+e){if(h>=i){o.push(new Set(this._items.slice(t)));break}r.push((this._isRtl?a:h)-n),o.push(new Set([this._items[t]]))}else l.add(this._items[t]);a=p}}return r.push(i),s.forEach(((e,t)=>{e>=i&&o[o.length-1].add(this._items[t])})),this._pageItems=o,r}_updateFocusableElements(){const e=this._pageItems[this._currentPage],t=this._items.filter((t=>!e.has(t)));for(const e of this._items)e.removeAttribute("aria-hidden");for(const[e,t]of this._prevTabIndexMap)null===t?e.removeAttribute("tabindex"):e.setAttribute("tabindex",t);for(const e of t){e.setAttribute("aria-hidden","true");e.querySelectorAll(oe).forEach((e=>{const t=e.getAttribute("tabindex");this._prevTabIndexMap.set(e,t),e.setAttribute("tabindex","-1")}))}}_handleScrollAction(e){const t=S(e.target,".slide-list__nav-button"),n=t&&t.dataset.direction;n&&(this._listEl.addEventListener("transitionend",this._boundFireScrollEvent),n===Ho?this.prev():n===Go&&this.next())}_fireScrollEvent(){U(window,"scroll"),this._listEl.removeEventListener("transitionend",this._boundFireScrollEvent)}_updateListPosition(){this._updateTranslateXY(this._isRtl?this._pageTranslates[this._currentPage]:-this._pageTranslates[this._currentPage],0)}_updateIndicatorButtons(){if(this._indicatorElement&&this._indicatorElement.isActive){const e=this._el.querySelector(".slide-list__indicator-button-container > .slide-list__indicator--selected");e&&(e.classList.remove(Wo),e.setAttribute("aria-current",!1));const t=this._el.querySelector(".".concat(zo," > :nth-child(").concat(this._currentPage+1,")"));t.classList.add(Wo),t.setAttribute("aria-current",!0)}}_updateSlideButtons(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(this._previousButton&&this._nextButton){if(this._previousButton.disabled=!1,this._nextButton.disabled=!1,!this._pageTranslates[1]||this._pageTranslates[1]<0)return this._previousButton.disabled=!0,void(this._nextButton.disabled=!0);0===this._currentPage&&(this._previousButton.disabled=!0,this._setNoMoreContentAlert(this._noMorePreviousContentAlert,e)),this._currentPage!==this._pageTranslates.length-1&&0!==this._pageTranslates.length||(this._nextButton.disabled=!0,this._setNoMoreContentAlert(this._noMoreNextContentAlert,e))}this._updateIndicatorButtons()}_setNoMoreContentAlert(e){!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&e&&(e.classList.remove("hidden"),setTimeout((()=>{e.classList.add("hidden")}),1e3))}_resetTouchEvents(){this._dragging=!1,this._dragCanceled=!1,this._listEl.classList.remove(jo),this._lock.left=this._isRtl?this._currentPage===this._pageTranslates.length-1:0===this._currentPage,this._lock.right=this._isRtl?0===this._currentPage:this._currentPage===this._pageTranslates.length-1,this._dragThresholdMet=!1,this._t={current:{x:0,y:0}}}_handleTouchStart(e){this._resetTouchEvents(),this._t.start=this._getEventPosition(e),this._dragging=!0,this._listEl.classList.add(jo)}_handleTouchMove(e){if(!this._dragging||this._dragCanceled)return;let t=this._getEventPosition(e);this._t.current={x:this._t.start.x-t.x,y:this._t.start.y-t.y},this._canDrag()?(this._dragThresholdMet=!0,e.preventDefault(),this._lock.left&&this._t.current.x<0?this._t.current.x=this._t.current.x*-this._dragLimit/(this._t.current.x-this._dragLimit):this._lock.right&&this._t.current.x>0&&(this._t.current.x=this._t.current.x*this._dragLimit/(this._t.current.x+this._dragLimit)),this._updateTranslateXY((this._isRtl?this._pageTranslates[this._currentPage]:-this._pageTranslates[this._currentPage])-this._t.current.x)):this._isVerticalScrolling()&&(this._dragCanceled=!0)}_handleTouchEnd(){this._dragging&&(!this._dragCanceled&&Math.abs(this._t.current.x)>20&&(this._t.current.x>0&&!this._lock.right?this._isRtl?this._currentPage--:this._currentPage++:this._t.current.x<0&&!this._lock.left&&(this._isRtl?this._currentPage++:this._currentPage--),this._dispatchPageChangeEvent()),this._resetTouchEvents(),this._updateSlideButtons(),this._updateListPosition())}_getEventPosition(e){return{x:e.touches[0].clientX,y:e.touches[0].clientY}}_isVerticalScrolling(){return Math.abs(this._t.current.x)<Math.abs(this._t.current.y)&&Math.abs(this._t.current.y)>10}_canDrag(){return this._dragThresholdMet||Math.abs(this._t.current.x)>Math.abs(this._t.current.y)&&Math.abs(this._t.current.x)>10}_updateTranslateXY(e,t){this._listEl.style.transform="translate3d(".concat(e||0,"px, ").concat(t||0,"px, 0px)")}_dispatchPageChangeEvent(){U(this._el,"pagechange",{pageNumber:this._currentPage})}}var Vo=Object.hasOwnProperty,Yo=Object.setPrototypeOf,Qo=Object.isFrozen,Jo=Object.getPrototypeOf,Xo=Object.getOwnPropertyDescriptor,Zo=Object.freeze,$o=Object.seal,es=Object.create,ts="undefined"!=typeof Reflect&&Reflect,ns=ts.apply,is=ts.construct;ns||(ns=function(e,t,n){return e.apply(t,n)}),Zo||(Zo=function(e){return e}),$o||($o=function(e){return e}),is||(is=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var rs,os=ms(Array.prototype.forEach),ss=ms(Array.prototype.pop),as=ms(Array.prototype.push),cs=ms(String.prototype.toLowerCase),ls=ms(String.prototype.match),us=ms(String.prototype.replace),ds=ms(String.prototype.indexOf),hs=ms(String.prototype.trim),ps=ms(RegExp.prototype.test),fs=(rs=TypeError,function(){for(var e=arguments.length,t=Array(e),n=0;n<e;n++)t[n]=arguments[n];return is(rs,t)});function ms(e){return function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return ns(e,t,i)}}function gs(e,t){Yo&&Yo(e,null);for(var n=t.length;n--;){var i=t[n];if("string"==typeof i){var r=cs(i);r!==i&&(Qo(t)||(t[n]=r),i=r)}e[i]=!0}return e}function vs(e){var t=es(null),n=void 0;for(n in e)ns(Vo,e,[n])&&(t[n]=e[n]);return t}function ys(e,t){for(;null!==e;){var n=Xo(e,t);if(n){if(n.get)return ms(n.get);if("function"==typeof n.value)return ms(n.value)}e=Jo(e)}return function(e){return console.warn("fallback value for",e),null}}var bs=Zo(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Es=Zo(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ws=Zo(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),_s=Zo(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ss=Zo(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Ts=Zo(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Cs=Zo(["#text"]),ks=Zo(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Is=Zo(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),As=Zo(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ls=Zo(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Os=$o(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Rs=$o(/<%[\s\S]*|[\s\S]*%>/gm),Ns=$o(/^data-[\-\w.\u00B7-\uFFFF]/),xs=$o(/^aria-[\-\w]+$/),Ps=$o(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ms=$o(/^(?:\w+script|data):/i),Ds=$o(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Us="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};function Bs(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var qs=function(){return"undefined"==typeof window?null:window},Fs=function(e,t){if("object"!==(void 0===e?"undefined":Us(e))||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var Hs=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:qs(),n=function(t){return e(t)};if(n.version="2.3.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var i=t.document,r=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,c=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.HTMLFormElement,p=t.DOMParser,f=t.trustedTypes,m=c.prototype,g=ys(m,"cloneNode"),v=ys(m,"nextSibling"),y=ys(m,"childNodes"),b=ys(m,"parentNode");if("function"==typeof s){var E=r.createElement("template");E.content&&E.content.ownerDocument&&(r=E.content.ownerDocument)}var w=Fs(f,i),_=w?w.createHTML(""):"",S=r,T=S.implementation,C=S.createNodeIterator,k=S.createDocumentFragment,I=S.getElementsByTagName,A=i.importNode,L={};try{L=vs(r).documentMode?r.documentMode:{}}catch(e){}var O={};n.isSupported="function"==typeof b&&T&&void 0!==T.createHTMLDocument&&9!==L;var R=Os,N=Rs,x=Ns,P=xs,M=Ms,D=Ds,U=Ps,B=null,q=gs({},[].concat(Bs(bs),Bs(Es),Bs(ws),Bs(Ss),Bs(Cs))),F=null,H=gs({},[].concat(Bs(ks),Bs(Is),Bs(As),Bs(Ls))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,z=null,W=!0,K=!0,V=!1,Y=!1,Q=!1,J=!1,X=!1,Z=!1,$=!1,ee=!1,te=!0,ne=!0,ie=!1,re={},oe=null,se=gs({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ae=null,ce=gs({},["audio","video","img","source","image","track"]),le=null,ue=gs({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",fe=pe,me=!1,ge=void 0,ve=["application/xhtml+xml","text/html"],ye="text/html",be=void 0,Ee=null,we=r.createElement("form"),_e=function(e){return e instanceof RegExp||e instanceof Function},Se=function(e){Ee&&Ee===e||(e&&"object"===(void 0===e?"undefined":Us(e))||(e={}),e=vs(e),B="ALLOWED_TAGS"in e?gs({},e.ALLOWED_TAGS):q,F="ALLOWED_ATTR"in e?gs({},e.ALLOWED_ATTR):H,le="ADD_URI_SAFE_ATTR"in e?gs(vs(ue),e.ADD_URI_SAFE_ATTR):ue,ae="ADD_DATA_URI_TAGS"in e?gs(vs(ce),e.ADD_DATA_URI_TAGS):ce,oe="FORBID_CONTENTS"in e?gs({},e.FORBID_CONTENTS):se,j="FORBID_TAGS"in e?gs({},e.FORBID_TAGS):{},z="FORBID_ATTR"in e?gs({},e.FORBID_ATTR):{},re="USE_PROFILES"in e&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,Q=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,$=e.RETURN_DOM_FRAGMENT||!1,ee=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,U=e.ALLOWED_URI_REGEXP||U,fe=e.NAMESPACE||pe,e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ge=ge=-1===ve.indexOf(e.PARSER_MEDIA_TYPE)?ye:e.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===ge?function(e){return e}:cs,Y&&(K=!1),$&&(Z=!0),re&&(B=gs({},[].concat(Bs(Cs))),F=[],!0===re.html&&(gs(B,bs),gs(F,ks)),!0===re.svg&&(gs(B,Es),gs(F,Is),gs(F,Ls)),!0===re.svgFilters&&(gs(B,ws),gs(F,Is),gs(F,Ls)),!0===re.mathMl&&(gs(B,Ss),gs(F,As),gs(F,Ls))),e.ADD_TAGS&&(B===q&&(B=vs(B)),gs(B,e.ADD_TAGS)),e.ADD_ATTR&&(F===H&&(F=vs(F)),gs(F,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&gs(le,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(oe===se&&(oe=vs(oe)),gs(oe,e.FORBID_CONTENTS)),ne&&(B["#text"]=!0),Q&&gs(B,["html","head","body"]),B.table&&(gs(B,["tbody"]),delete j.tbody),Zo&&Zo(e),Ee=e)},Te=gs({},["mi","mo","mn","ms","mtext"]),Ce=gs({},["foreignobject","desc","title","annotation-xml"]),ke=gs({},Es);gs(ke,ws),gs(ke,_s);var Ie=gs({},Ss);gs(Ie,Ts);var Ae=function(e){var t=b(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=cs(e.tagName),i=cs(t.tagName);if(e.namespaceURI===he)return t.namespaceURI===pe?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===i||Te[i]):Boolean(ke[n]);if(e.namespaceURI===de)return t.namespaceURI===pe?"math"===n:t.namespaceURI===he?"math"===n&&Ce[i]:Boolean(Ie[n]);if(e.namespaceURI===pe){if(t.namespaceURI===he&&!Ce[i])return!1;if(t.namespaceURI===de&&!Te[i])return!1;var r=gs({},["title","style","font","a","script"]);return!Ie[n]&&(r[n]||!ke[n])}return!1},Le=function(e){as(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=_}catch(t){e.remove()}}},Oe=function(e,t){try{as(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){as(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!F[e])if(Z||$)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){var t=void 0,n=void 0;if(X)e="<remove></remove>"+e;else{var i=ls(e,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=w?w.createHTML(e):e;if(fe===pe)try{t=(new p).parseFromString(o,ge)}catch(e){}if(!t||!t.documentElement){t=T.createDocument(fe,"template",null);try{t.documentElement.innerHTML=me?"":o}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),fe===pe?I.call(t,Q?"html":"body")[0]:Q?t.documentElement:s},Ne=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},xe=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},Pe=function(e){return"object"===(void 0===a?"undefined":Us(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":Us(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Me=function(e,t,i){O[e]&&os(O[e],(function(e){e.call(n,t,i,Ee)}))},De=function(e){var t=void 0;if(Me("beforeSanitizeElements",e,null),xe(e))return Le(e),!0;if(ls(e.nodeName,/[\u0080-\uFFFF]/))return Le(e),!0;var i=be(e.nodeName);if(Me("uponSanitizeElement",e,{tagName:i,allowedTags:B}),!Pe(e.firstElementChild)&&(!Pe(e.content)||!Pe(e.content.firstElementChild))&&ps(/<[/\w]/g,e.innerHTML)&&ps(/<[/\w]/g,e.textContent))return Le(e),!0;if("select"===i&&ps(/<template/i,e.innerHTML))return Le(e),!0;if(!B[i]||j[i]){if(ne&&!oe[i]){var r=b(e)||e.parentNode,o=y(e)||e.childNodes;if(o&&r)for(var s=o.length-1;s>=0;--s)r.insertBefore(g(o[s],!0),v(e))}if(!j[i]&&Be(i)){if(G.tagNameCheck instanceof RegExp&&ps(G.tagNameCheck,i))return!1;if(G.tagNameCheck instanceof Function&&G.tagNameCheck(i))return!1}return Le(e),!0}return e instanceof c&&!Ae(e)?(Le(e),!0):"noscript"!==i&&"noembed"!==i||!ps(/<\/no(script|embed)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=us(t,R," "),t=us(t,N," "),e.textContent!==t&&(as(n.removed,{element:e.cloneNode()}),e.textContent=t)),Me("afterSanitizeElements",e,null),!1):(Le(e),!0)},Ue=function(e,t,n){if(te&&("id"===t||"name"===t)&&(n in r||n in we))return!1;if(K&&!z[t]&&ps(x,t));else if(W&&ps(P,t));else if(!F[t]||z[t]){if(!(Be(e)&&(G.tagNameCheck instanceof RegExp&&ps(G.tagNameCheck,e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(e))&&(G.attributeNameCheck instanceof RegExp&&ps(G.attributeNameCheck,t)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(t))||"is"===t&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&ps(G.tagNameCheck,n)||G.tagNameCheck instanceof Function&&G.tagNameCheck(n))))return!1}else if(le[t]);else if(ps(U,us(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ds(n,"data:")||!ae[e]){if(V&&!ps(M,us(n,D,"")));else if(n)return!1}else;return!0},Be=function(e){return e.indexOf("-")>0},qe=function(e){var t=void 0,i=void 0,r=void 0,o=void 0;Me("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F};for(o=s.length;o--;){var c=t=s[o],l=c.name,u=c.namespaceURI;if(i=hs(t.value),r=be(l),a.attrName=r,a.attrValue=i,a.keepAttr=!0,a.forceKeepAttr=void 0,Me("uponSanitizeAttribute",e,a),i=a.attrValue,!a.forceKeepAttr&&(Oe(l,e),a.keepAttr))if(ps(/\/>/i,i))Oe(l,e);else{Y&&(i=us(i,R," "),i=us(i,N," "));var d=be(e.nodeName);if(Ue(d,r,i))try{u?e.setAttributeNS(u,l,i):e.setAttribute(l,i),ss(n.removed)}catch(e){}}}Me("afterSanitizeAttributes",e,null)}},Fe=function e(t){var n=void 0,i=Ne(t);for(Me("beforeSanitizeShadowDOM",t,null);n=i.nextNode();)Me("uponSanitizeShadowNode",n,null),De(n)||(n.content instanceof o&&e(n.content),qe(n));Me("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var s=void 0,c=void 0,l=void 0,u=void 0,d=void 0;if((me=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Pe(e)){if("function"!=typeof e.toString)throw fs("toString is not a function");if("string"!=typeof(e=e.toString()))throw fs("dirty is not a string, aborting")}if(!n.isSupported){if("object"===Us(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Pe(e))return t.toStaticHTML(e.outerHTML)}return e}if(J||Se(r),n.removed=[],"string"==typeof e&&(ie=!1),ie){if(e.nodeName){var h=be(e.nodeName);if(!B[h]||j[h])throw fs("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)1===(c=(s=Re("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?s=c:s.appendChild(c);else{if(!Z&&!Y&&!Q&&-1===e.indexOf("<"))return w&&ee?w.createHTML(e):e;if(!(s=Re(e)))return Z?null:ee?_:""}s&&X&&Le(s.firstChild);for(var p=Ne(ie?e:s);l=p.nextNode();)3===l.nodeType&&l===u||De(l)||(l.content instanceof o&&Fe(l.content),qe(l),u=l);if(u=null,ie)return e;if(Z){if($)for(d=k.call(s.ownerDocument);s.firstChild;)d.appendChild(s.firstChild);else d=s;return F.shadowroot&&(d=A.call(i,d,!0)),d}var f=Q?s.outerHTML:s.innerHTML;return Y&&(f=us(f,R," "),f=us(f,N," ")),w&&ee?w.createHTML(f):f},n.setConfig=function(e){Se(e),J=!0},n.clearConfig=function(){Ee=null,J=!1},n.isValidAttribute=function(e,t,n){Ee||Se({});var i=be(e),r=be(t);return Ue(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&(O[e]=O[e]||[],as(O[e],t))},n.removeHook=function(e){O[e]&&ss(O[e])},n.removeHooks=function(e){O[e]&&(O[e]=[])},n.removeAllHooks=function(){O={}},n}(),Gs=Hs;const js={ADD_TAGS:["#comment","li-icon","icon","iframe"],ADD_ATTR:["target"],FORCE_BODY:!0,RETURN_DOM:!0};function zs(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Ws(null,e,t);return n.innerHTML}function Ws(e,t){let{ADD_TAGS:n=[],ADD_ATTR:i=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=Le({},js);r.ADD_TAGS=[...r.ADD_TAGS,...n],r.ADD_ATTR=[...r.ADD_ATTR,...i];const o=Gs.sanitize(t,r);return e&&e.nodeType===Node.ELEMENT_NODE&&(e.innerHTML="",e.append(...o.childNodes)),o}var Ks=Object.freeze({__proto__:null,sanitizedMarkupOptions:js,getSanitizedMarkup:zs,setSanitizedMarkup:Ws}),Vs="aria-[a-z0-9_\\-]+|class|data-[a-z0-9_\\-]+|dir|id|role|tabindex",Ys=function(){if("undefined"==typeof document)return!0;return"textContent"in document.createElement("div")}()?"textContent":"innerText",Qs=["b","del","em","i","s","strong","sub","sup"],Js=Qs.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"]),Xs=[Vs,"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 Zs(){}var $s,ea,ta=(ea=/[&<>"'\u0000\\=]/g,$s={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","\0":"�","\\":"&#92;","=":"&#61;"},function(e){return null==e?null:e.toString().replace(ea,(function(e){return $s[e]}))}),na=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 i={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(r){return null==r?null:(r+"").replace(n,(function(n,r,o,s){return r?(a=r,i.hasOwnProperty(a)?i[a]:(e.innerHTML="&"+a+";",c=e[Ys],i[a]=c,c)):o||s?t(parseInt(o||s,o?16:10)||65533):"�";var a,c}))}}();var ia=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function ra(e){return/[<&]/.test(e)}var oa,sa=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t)}:function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},aa="[ \t\r\n]*";function ca(e){e=ia(e)?e:[e];var t,n,i,r=0,o="<(?!/?";return o+="(?:",sa(e,(function(e,s){t=e.tags||Js,n=e.attrs||Xs,i=e.checkUrlAttrs||!1,0!==s&&(o+="|"),o+="(?:"+t.join("|")+")",o+="(?:",o+=aa,o+="|[ \t\r\n]+",o+="(?:(?:",o+="(?:"+n+")(?:=([\"'])[^'\"<>]*\\"+ ++r+")?",i&&(o+="|(?:href|src)=([\"'])(?:(?:https?|ftp|mailto|invalid)(?::|&#(?:58|x3a);)|(?:data:image/(?:gif|jpg|jpeg|png);base64,)|[/.#?]|&#(?:35|4[67]|63|x(?:2[3ef]|3f));)[^'\"<>]*\\"+ ++r),o+=")[ \t\r\n]*)+",o+=")"})),o+=")",o+="/?>)",new RegExp(o,"i")}function la(e){return ca({tags:e=e||Js,checkUrlAttrs:!0})}function ua(e,t){var n=(t=t||{}).allowTags,i=!1!==t.hasCustomElementMarkup;return n?!la(n).test(e):i?!ua.R_UNSAFE_CUSTOM_ELEMENT.test(e):!ua.R_UNSAFE_HTML.test(e)}function da(e){return e.replace(/<[^>]*>|[<>'"&\\]/g,"")}function ha(e,t,n){if(null==e)return null;e=e.toString();var i=t?function(e,t){var n={};return e.replace(/\{([^}]+)\}/g,(function(e,i){var r,o=e;if(n.hasOwnProperty(i))return n[i];if(t.hasOwnProperty(i)){if(!((r="string"==typeof(o=t[i]))||o instanceof Zs||"number"==typeof o))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");o=r?ta(o):o.toString()}return n[i]=o,o}))}(e,t):e,r=e;return ra(i)&&!ua(i,n)&&(i=da(i),ao("Content contains non-whitelisted tags or attributes:\nContent: "+r,"error")),i}function pa(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e}ua.R_UNSAFE_HTML=la(),ua.R_UNSAFE_CUSTOM_ELEMENT=ca([{tags:Js,checkUrlAttrs:!0},{tags:[(oa={tag:"li-icon",attrs:"active|a11y-text|animate|color|size|type"}).tag],attrs:[Vs,oa.attrs].join("|"),checkUrlAttrs:!1}]);var fa={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,"",""]};fa.optgroup=fa.option,fa.tbody=fa.tfoot=fa.colgroup=fa.caption=fa.thead,fa.th=fa.td;var ma=/<([\w:]+)/;function ga(e,t){var n,i,r,o,s,a,c,l=t.createDocumentFragment(),u=[];for(s=0,c=e.length;s<c;s++)if((o=e[s])||0===o)if("string"==typeof o){for(r=r||l.appendChild(t.createElement("div")),n=(ma.exec(o)||["",""])[1].toLowerCase(),ba(r,(i=fa[n]||fa._default)[1]+o+i[2]),a=i[0];a--;)r.lastChild&&r.lastChild.nodeType===Node.ELEMENT_NODE&&(r=r.lastChild);pa(u,r.childNodes),(r=l.firstChild).textContent=""}else pa(u,o.nodeType?[o]:o);for(l.textContent="",o=u[s=0];o;)l.appendChild(o),o=u[++s];return l}var va=ha,ya=ha;function ba(e,t,n){var i=ha(t,n);return ra(i)?e.innerHTML=i:e[Ys]=i,i}function Ea(e,t){if(!(this instanceof Ea))return new Ea(e,t);(t=t||{}).allowTags=t.allowTags?t.allowTags.reduce((function(e,t){return e.concat(t)}),[]):null,this._string=e,this._options=t}Ea.prototype=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(new Zs,{toString:function(){var e=this._string,t=this._stringVal,n=e;return void 0!==t?t:(ua(e,this._options)||(n=e,e=da(e),ao("UnsafeString contains non-whitelisted tags or attributes.\nString: "+n,"error")),this._stringVal=e,e)}});var wa={ALLOWED_TAGS:Js,FORMATTING_TAGS:Qs,htmlEncode:ta,htmlUnencode:na,log:ao,mk:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let r,o="",s=n.length;return e&&e.forEach((function(e,t){o+=e,t<s&&(r=n[t],o+=r instanceof Ea?r:ta(r))})),ya(o)},parseHTML:function(e,t){var n;if(t=t||document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument(""):document,"string"==typeof e)n=ga([e],t);else{if(!ia(e))return e;n=ga(e,t)}return pa([],n.childNodes)},parseSelector:function(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e},processTemplate:va,reEncode:function(e){return ta(na(e))},_redirector:mo,redirect:function(e){const t=fo(e);t===e&&mo.redirect(t)},sanitizeHTML:ya,sanitizeUrl:fo,setElementContent:ba,text:function(e){return ao("jSecure.text() is deprecated. Please use jSecure.htmlEncode().","warn"),ta(e)},unsafe:function(e){return e},UnsafeString:Ea};function _a(e){if(e instanceof HTMLElement)if(document.documentElement.classList.contains("ios")){const t=10,n=10;e.blur();let i=0;const r=window.setInterval((function(){e.focus(),i>=n&&window.clearInterval(r),i++}),t)}else e.focus()}const Sa="toast--hidden",Ta=".toast",Ca=".toast__message",ka=Object.freeze({CAUTION:"caution",ERROR:"error",GDPR:"gdpr",NOTIFY:"notify",SUCCESS:"success"});class Ia{constructor(){let{removeToastCallback:e=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=document.getElementById("toasts");if(!t)throw new Error("No toasts element");this._el=t,this._position=t.getAttribute("type"),this.removeToastCallback=e,this.bindEvents()}trigger(e,t,n,i){if(!e||!Object.values(ka).includes(e))throw new Error("Valid type not specified: type must be caution, error, gdpr, notify or success");if(!t)throw new Error("No message specified");const r=n?"".concat(n,"_toast-").concat(e):"toast-".concat(e),o=this._createToastEl(e,t,r,i);return this._addToast(o)}clearAllToasts(){let e=this._el.querySelectorAll(Ta);Array.from(e).forEach((e=>{this._removeToast(e)}))}bindEvents(){this._el.addEventListener("click",(e=>{const t=S(e.target,".toast__dismiss-btn");if(t){const e=S(t,Ta);e&&this._removeToast(e)}}))}_isValidCtaMetadata(e){return["url","trk","text"].every((t=>e.hasOwnProperty(t)))}_createToastEl(e,t,n,i){const r=document.querySelector("#toast-template").content.firstElementChild.cloneNode(!0),o=document.querySelector("#toast-icon-".concat(e)).content.firstElementChild.cloneNode(!0);if(!r||!o)throw new Error("Toast templates are missing");r.classList.add("toast--".concat(e)),r.setAttribute("type",e);const s=r.querySelector(Ca);s.insertBefore(o,s.firstElementChild);r.querySelector(".toast__dismiss-btn").setAttribute("data-tracking-control-name","".concat(n,"_dismiss"));const a=r.querySelector(".toast__message-content");let c="text-color-text-neutral";if(e===ka.CAUTION?c="text-color-text-caution":e===ka.ERROR?c="text-color-text-negative":e===ka.SUCCESS&&(c="text-color-text-positive"),a.classList.add(c),Ws(a,t),i&&this._isValidCtaMetadata(i)){const e=r.querySelector(".toast__message-content-container"),t=document.querySelector("#toast-cta").content.firstElementChild.cloneNode(!0),n=i.target||"_blank";t.setAttribute("href",wa.sanitizeUrl(x(i.url,i.trk))),t.setAttribute("target",n),t.textContent=i.text,e.classList.add(c),e.append(t)}return r}_addToast(e){this._el.appendChild(e);const t=this._el.querySelector(Ca);return this._hasToast()&&this._el.classList.remove("invisible"),this._refreshLazyLoader(),setTimeout((function(){e.classList.remove(Sa),_a(t)}),500),e}_removeToast(e){let t=this._el;e.classList.add(Sa),setTimeout((()=>{e.remove(),this._hasToast()||t.classList.add("invisible"),this.removeToastCallback()}),500)}_hasToast(){return[...this._el.children].some((e=>"template"!==e.tagName.toLowerCase()))}_refreshLazyLoader(){var e,t;null===(e=window.lazyloader)||void 0===e||null===(t=e.then)||void 0===t||t.call(e,(e=>{e.refreshLoader()}))}}Oe(Ia,"TOAST_TYPES",ka);const Aa={};function La(e){const t=document.getElementById(e);if(!t&&void 0!==Aa[e])return Aa[e];if(!t)return console.warn("Element with id: ".concat(e," not found")),Aa[e]=null,Aa[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):(Aa[e]=n,t.parentNode.removeChild(t),Aa[e])}function Oa(e,t){const n=document.getElementById(e),i=document.createComment(JSON.stringify(t));if(n)n.textContent="",n.appendChild(i);else{const t=document.createElement("code");t.setAttribute("id",e),t.style.display="none",t.appendChild(i),document.body.appendChild(t)}}const Ra="session_redirect",Na={COPY:"copy",LINKEDIN:"linkedin",TWITTER:"twitter",FACEBOOK:"facebook"},xa=Object.keys(Na).map((e=>Na[e]));class Pa{constructor(e){let{globalNavigator:t=navigator,globalWindow:n=window,globalDocument:i=document,shareTriggerElement:r}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No element passed in");this.navigator=t,this.window=n,this.document=i,this.shareTriggerElement=r,this.el=e,this._encodedShareMessage=this.window.encodeURIComponent(this.el.getAttribute("data-share-message"))||"",this._nonEncodedShareUrl=this.el.getAttribute("data-share-url")||this.window.location.href,this._encodedShareUrl=this._nonEncodedShareUrl&&this.window.encodeURIComponent(this._nonEncodedShareUrl)}init(e,t){e.addEventListener("click",(e=>{let{target:n}=e;const i=n.classList.contains(t)?n:S(n,".".concat(t));i&&this.share(i.dataset.shareService)}))}_getServiceUrl(e){this.checkAndUpdateUtm(e);const t={linkedin:"https://www.".concat(K(this.document),"/shareArticle?mini=true&url=").concat(this._encodedShareUrl,"&title=").concat(this._encodedShareMessage),twitter:"https://twitter.com/intent/tweet?url=".concat(this._encodedShareUrl,"&text=").concat(this._encodedShareMessage),facebook:"https://www.facebook.com/sharer/sharer.php?u=".concat(this._encodedShareUrl)};return La("disableLinkedinShareRedirectLink")&&"linkedin"===e?La("isGuest")?(this.window.location.href=this._updateSignInUrlWithParams(La("signInUrl")),""):"":t[e]||""}_updateSignInUrlWithParams(e){const t=new URL(e),n=t.searchParams,i=P(n.get(Ra),"openShareModal",!0);return n.set(Ra,i),t.toString()}share(e){if(xa.includes(e)){const r=this._nonEncodedShareUrl||this.window.location.href;if("copy"===e)try{this.navigator.clipboard?(this.checkAndUpdateUtm(e),this.navigator.clipboard.writeText(this._nonEncodedShareUrl),this.displayToast({url:r})):this.displayToast({showError:!0})}catch(e){this.displayToast({showError:!0})}finally{var t,n,i;null===(t=this.collapsibleDropdown)||void 0===t||null===(n=t.dropdownContentEl)||void 0===n||null===(i=n.classList)||void 0===i||i.add("hidden")}else{const t=this._getServiceUrl(e,r);if(!t)return;this.window.open(t,e,"height=600,width=1000")}}}displayToast(e){let{showError:t,url:n}=e;if(this.document.getElementById("toasts")){this.collapsibleDropdown.shouldReturnFocusToTrigger(!1),this.collapsibleDropdown.close();const e="social-share",i=new Ia({removeToastCallback:this.removeToastCallback.bind(this)});i.clearAllToasts();const r=t?"error":"success";i.trigger(r,La("i18n_copy_cta_message_".concat(r)),e,{text:"View",url:n||this.window.location.href,trk:e})}}checkAndUpdateUtm(e){if(this._nonEncodedShareUrl.includes("utm_campaign")||"linkedin"===e)return;["utm_source","utm_content","utm_medium"].some((e=>this._nonEncodedShareUrl.includes(e)))&&(this._nonEncodedShareUrl="".concat(this._nonEncodedShareUrl,"&utm_campaign=").concat(e),this._encodedShareUrl=this.window.encodeURIComponent(this._nonEncodedShareUrl))}removeToastCallback(){var e;this.collapsibleDropdown.shouldReturnFocusToTrigger(),null===(e=this.shareTriggerElement)||void 0===e||e.focus()}}class Ma extends Pa{constructor(e){let{globalNavigator:t=navigator,globalWindow:n=window,globalDocument:i=document}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No element passed in");const r=e.querySelector(".social-share__button");super(e,{globalNavigator:t,globalWindow:n,globalDocument:i,shareTriggerElement:r}),this.socialShareButton=r,this.dropdown=this.el.querySelector(".collapsible-dropdown__list"),this.itemClassName="".concat("social-share","__item"),this.collapsibleDropdown=new Ee(e,{dropdownTriggerEl:this.socialShareButton}),super.init(this.dropdown,this.itemClassName)}}const Da=["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("|");new RegExp(Da,"i");class Ua{constructor(e){let{scrollThreshold:t=50,hideOnScrollBack:n=!1,hideOnScrollDown:i=!1,isBottom:r=!0,exposeStickyState:o=!1,marginApplied:s=!1,debounceDelay:a=100}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&i)throw new Error("hideOnScrollBack & hideOnScrollDown cannot both be true at the same time");this.el=e,this.scrollThreshold=t,this.hideOnScrollBack=n,this.hideOnScrollDown=i,this.isBottom=r,this.exposeStickyState=o,this._scrollListener=M(this._onScroll.bind(this),a),this.marginApplied=s,this.previousScrollPosition=window.pageYOffset,this._setSpacingBound=this._setSpacing.bind(this),this._setupResizeListener(),T((()=>{this.originalMarginTop=parseInt(window.getComputedStyle(document.body).marginTop)||0,this.originalMarginBottom=parseInt(window.getComputedStyle(document.body).marginBottom)||0,this._setSpacing(!0),this._doesPageHaveEnoughScroll()?window.addEventListener("scroll",this._scrollListener):this.hideOnScrollBack||this.show()}))}reactivate(){this._setupResizeListener(),this._setSpacing()}deactivate(){this._removeResizeListener(),this._resetSpacing()}_setupResizeListener(){fe()||window.addEventListener("resize",this._setSpacingBound)}_removeResizeListener(){window.removeEventListener("resize",this._setSpacingBound)}_doesPageHaveEnoughScroll(){return document.body.scrollHeight>window.innerHeight+this.scrollThreshold}_setSpacing(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isBottom?this._setBottomSpacing():this.hideOnScrollBack||this.hideOnScrollDown||(this._setTopSpacing(),e&&this.show())}_resetSpacing(){this.marginApplied?(document.body.style.marginTop="0px",document.body.style.marginBottom="0px"):(document.body.style.marginTop="".concat(this.originalMarginTop,"px"),document.body.style.marginBottom="".concat(this.originalMarginBottom,"px"))}_setBottomSpacing(){let e=this.el.clientHeight;document.body.style.marginBottom&&!this.marginApplied&&(e+=this.originalMarginBottom),document.body.style.marginBottom="".concat(e,"px")}_setTopSpacing(){let e=this.el.clientHeight;document.body.style.marginTop&&!this.marginApplied&&(e+=this.originalMarginTop),document.body.style.marginTop="".concat(e,"px")}show(){this.el.classList.add("show"),U(this.el,"show")}hide(){this.el.classList.remove("show"),U(this.el,"hide")}_onScroll(){const e=window.pageYOffset;e>this.scrollThreshold?(this.hideOnScrollBack||this.hideOnScrollDown||this.exposeStickyState||window.removeEventListener("scroll",this._scrollListener),this.hideOnScrollDown?this.hide():this.show(),this.exposeStickyState&&this.el.classList.add("stuck")):(this.hideOnScrollBack&&this.hide(),this.exposeStickyState&&this.el.classList.remove("stuck")),this.previousScrollPosition>e&&this.hideOnScrollDown&&this.show(),this.previousScrollPosition=e}}new Uint8Array(16);const Ba=[];for(let e=0;e<256;++e)Ba.push((e+256).toString(16).slice(1));"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const qa="tooltip__popup";"".concat(qa,"--show");const Fa="loader--absolute",Ha="loader--show",Ga="loader--full-screen",ja="no-scroll",za="loader-wrapper";class Wa{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(Fa),window.addEventListener("pagehide",(e=>{let{persisted:t}=e;t&&this.hide()}))}show(){this.el.classList.add(Ha),this.el.classList.contains(Ga)&&document.body.classList.add(ja),this.isAbsoluteVariant&&this.wrapperEl.classList.add(za)}hide(){this.el.classList.remove(Ha),document.body.classList.remove(ja),this.isAbsoluteVariant&&this.wrapperEl.classList.remove(za)}}const Ka="dismissable-input",Va="dismissable-input--focus",Ya="dismissable-input__button",Qa="dismissable-input__button--show",Ja="dismissable-input__input";class Xa{constructor(e){this.el=e,this._input=this.el.querySelector(".".concat(Ja)),this._dismissButtonEl=this.el.querySelector(".".concat(Ya)),this._isDismissable=!!this._dismissButtonEl,this._attachEventListeners()}_attachEventListeners(){this._input.addEventListener("focus",this._onInputFocus.bind(this)),this._input.addEventListener("input",this._updateDismissButton.bind(this)),this._input.addEventListener("blur",this._onInputBlur.bind(this)),this._isDismissable&&(this._dismissButtonEl.addEventListener("click",this.clear.bind(this)),this._updateDismissButton())}_onInputFocus(){this.el.classList.add(Va),this._updateDismissButton(),U(this._input,"dismissableInputFocused")}_updateDismissButton(){this._isDismissable&&(this._input.value.length?(this._showDismissButton(),this._dismissButtonEl.disabled=!1):(this._hideDismissButton(),this._dismissButtonEl.disabled=!0))}_hideDismissButton(){this._dismissButtonEl.classList.remove(Qa)}_showDismissButton(){this._dismissButtonEl.classList.add(Qa)}_onInputBlur(){this.el.classList.remove(Va)}clear(){this._input.value="",this._updateDismissButton(""),this._input.focus(),U(this.el,"clear")}}const Za={block:"typeahead-input",showList:"typeahead-input__dropdown--show",dropdown:"typeahead-input__dropdown",dropdownList:"typeahead-input__dropdown-list",dropdownText:"typeahead-input__dropdown-text",listItemFocus:"typeahead-input__dropdown-item--highlighted",listItem:"typeahead-input__dropdown-item",liveText:"typeahead-live-text",template:"typeahead-item-template"},$a="i18n_aria_live_text_no-suggestions",ec="i18n_aria_live_text_one-suggestion",tc="i18n_aria_live_text_multiple-suggestions",nc=500;class ic{constructor(e,t){let{createDismissableInput:n,elementClasses:i=Za,generateApiUrl:r,liveTextEl:o,liveTextClearTime:s=nc,onSelect:a,onInput:c=(()=>{}),inputEl:l,dropdownContainerEl:u,dropdownListEl:d,isFullPageTypeahead:h,closeOnEscape:p=!1}=t;this.el=e,this._liveTextClearTime=s,this._elementClasses=i,this._closeOnEscape=p,this._input=l||this.el.querySelector(".".concat(Ja)),this._dropdownContainerEl=u||this.el.querySelector(".".concat(this._elementClasses.dropdown)),this._dropdownListEl=d||this.el.querySelector(".".concat(this._elementClasses.dropdownList)),this._listId=this._dropdownListEl.id,this._generateApiUrl=r,this._onSelect=a,this._onInput=c,this._typeaheadItemTemplate=this.el.querySelector(".".concat(this._elementClasses.template)),this._boundClickOutsideToCloseHandler=this._clickOutsideToCloseHandler.bind(this),this._liveTextEl=o||this.el.querySelector(".".concat(this._elementClasses.liveText)),n&&(this.dismissableInput=new Xa(this.el)),this.isFullPageTypeahead=h,this._getLiveTextOptions(),this._resetState(),this._attachEventListeners(),this._requestHandler=M(this._getAndApplyResults.bind(this),500)}_resetState(){this._dropdownListItemEls=[],this._setHighlightedEl(null),this._setExpandedState(!1)}_attachEventListeners(){this.checkForListItemSelectHandler=this._checkForListItemSelect.bind(this),this.hideListHandler=this._hideList.bind(this),this.onKeyDownHandler=this._onKeyDown.bind(this),this.onUserInputHandler=this._onUserInput.bind(this),this.onClearHandler=this._onClear.bind(this),this._input.addEventListener("keydown",this.onKeyDownHandler),this._input.addEventListener("input",this.onUserInputHandler),this._input.addEventListener("focus",this.onUserInputHandler),!this.isFullPageTypeahead&&this._input.addEventListener("blur",this.hideListHandler),this._dropdownListEl.addEventListener("mousedown",this.checkForListItemSelectHandler),this._isDismissable&&this.el.addEventListener("clear",this.onClearHandler)}_removeEventListeners(){this._input.removeEventListener("keydown",this.onKeyDownHandler),this._input.removeEventListener("input",this.onUserInputHandler),this._input.removeEventListener("focus",this.onUserInputHandler),!this.isFullPageTypeahead&&this._input.removeEventListener("blur",this.hideListHandler),this._dropdownListEl.addEventListener("mousedown",this.checkForListItemSelectHandler)}_isListActive(){return this._input.getAttribute("aria-owns")===this._listId&&Boolean(this._input.getAttribute("aria-expanded"))}_clickOutsideToCloseHandler(e){e.target!==this._input&&this._hideList()}_onKeyDown(e){if(!this._isListActive())return;switch(X(e.key)){case Q.ARROW_DOWN:e.preventDefault(),this._moveToResult(1);break;case Q.ARROW_UP:e.preventDefault(),this._moveToResult(-1);break;case Q.ESCAPE:this._closeOnEscape&&this._hideList();break;case Q.ENTER:this._checkForListItemSelect(e)}}_moveToResult(e){if(0===this._dropdownListItemEls.length)return;const t=-1===e?-1:0;let n=null===this._highlighted.index?t:this._highlighted.index+e;n<0&&(n=this._dropdownListItemEls.length-1),n>=this._dropdownListItemEls.length&&(n=0),this._setHighlightedEl(n)}_setHighlightedEl(e){this._highlighted&&this._highlighted.el&&(this._highlighted.el.classList.remove(this._elementClasses.listItemFocus),this._highlighted.el.setAttribute("aria-selected",!1)),null===e?(this._highlighted={el:null,index:null},this._input.removeAttribute("aria-activedescendant")):(this._highlighted.el=this._dropdownListItemEls[e],this._highlighted.index=e,this._highlighted.el.setAttribute("aria-selected",!0),this._highlighted.el.classList.add(this._elementClasses.listItemFocus),this._input.setAttribute("aria-activedescendant",this._highlighted.el.id))}_isInputValid(){return this._input.value.length>0}_onUserInput(e){this._onInput(e),this._isInputValid()?this._requestHandler():this._hideList()}_getAndApplyResults(){if(this._isInputValid()){const e=this._input.value;this._makeTypeaheadRequest(e).then((e=>this._appendResults(e))).then((()=>this._showList()))}}_makeTypeaheadRequest(e){return we(this._generateApiUrl(e),{sendCookies:!1}).then((e=>e&&JSON.parse(e.responseText)||[]))}_getItemEl(){return document.importNode(this._typeaheadItemTemplate.content,!0)}_appendResults(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this._hideList(),e.forEach(((e,t)=>{const n=this._getItemEl(),i=n.querySelector(".".concat(this._elementClasses.listItem)),r=i.querySelector(".".concat(this._elementClasses.dropdownText));i.id="".concat(this._input.name,"-").concat(t+1),r.textContent=e.displayName,r.dataset.id=e.id,this._dropdownListEl.appendChild(n)})),this._dropdownListItemEls=L(this._dropdownListEl.children)}_shouldShowList(){return this._dropdownListItemEls.length>0&&this._isInputValid()}_showList(){this._shouldShowList()?(this._dropdownContainerEl.classList.add(this._elementClasses.showList),document.body.addEventListener("click",this._boundClickOutsideToCloseHandler),this._setExpandedState(!0)):(this._hideList(),this._setExpandedState(!1)),this._setLiveText()}_hideList(){if(this._isListActive()){for(;this._dropdownListEl.firstChild;)this._dropdownListEl.removeChild(this._dropdownListEl.firstChild);this._resetState(),this._dropdownContainerEl.classList.remove(this._elementClasses.showList),document.body.removeEventListener("click",this._boundClickOutsideToCloseHandler)}}_onClear(){this.hideListHandler()}_checkForListItemSelect(e){if(!this._isListActive())return;const t="mousedown"===e.type?e.target:this._highlighted.el;if(!t)return;e.preventDefault();const n=t.classList.contains(this._elementClasses.dropdownText)?t:t.querySelector(".".concat(this._elementClasses.dropdownText))||t.closest(".".concat(this._elementClasses.dropdownText));n&&this.el.contains(n)&&this._updateInputTo(n,e)}_updateInputTo(e,t){this._input.value=e.textContent.trim(),this._input.focus(),"function"==typeof this._onSelect&&this._onSelect(e,t),this._hideList()}_getLiveTextOptions(){this._liveTextNoSuggestions=La($a),this._liveTextOneSuggestion=La(ec),this._liveTextMultipleSuggestions=La(tc)}_getLiveText(){let e;switch((this._dropdownListItemEls||[]).length){case 0:e=this._liveTextNoSuggestions;break;case 1:e=this._liveTextOneSuggestion;break;default:e=this._liveTextMultipleSuggestions}return e}_setLiveText(){const e=this._getLiveText(),t=document.createElement("p");t.textContent=e,this._liveTextEl.children.length&&(this._liveTextEl.removeChild(this._liveTextEl.firstChild),clearTimeout(this._liveTextTimeout)),this._liveTextEl.appendChild(t),this._liveTextTimeout=setTimeout((()=>{this._liveTextEl.firstChild&&this._liveTextEl.removeChild(this._liveTextEl.firstChild)}),this._liveTextClearTime)}_setExpandedState(e){this._input.setAttribute("aria-expanded",e),e&&(this._input.setAttribute("aria-owns",this._listId),this._input.setAttribute("aria-controls",this._listId))}}const rc="no-scroll",oc="fixed",sc="show-on-mobile",ac="hide-on-mobile",cc="isExpanded";class lc{constructor(e,t,n){let{onCloseExpandedSearch:i=(e=>e),isMobileDevice:r=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(this.el=e,this.expandedEl=t,this.placeholderEl=n,this.isMobileDevice=r,!this.el)throw new Error("No element passed in to BaseSearchBar");this.isExpanded=!1,this.type=this.el.getAttribute("data-searchbar-type"),this.firstInput=this.el.querySelector("input:first-of-type"),this.isIOSDevice="iPhone"===navigator.platform||"iPad"===navigator.platform||"iPod"===navigator.platform,this.onCloseExpandedSearch=i,r&&(this.focusTrap=new he(this.expandedEl))}showExpandedSearch(){this.isExpanded=!0,this.isMobileDevice&&(this.focusTrap.init(),this.placeholderEl.classList.add("hidden")),this.placeholderEl.classList.remove(sc),this.placeholderEl.classList.add(ac),this.expandedEl.classList.add(cc),document.body.classList.add(rc),this.isIOSDevice&&(document.body.classList.add(oc),this.expandedEl.addEventListener("touchstart",this._onIOSTouchStartEvent)),document.addEventListener("keyup",this._onKeyUpEvent.bind(this)),this.firstInput.focus()}hideExpandedSearch(){this.firstInput.blur(),this.isExpanded=!1,this.isMobileDevice&&(this.focusTrap.tearDown(),this.placeholderEl.classList.remove("hidden")),this.expandedEl.classList.remove(cc),this.placeholderEl.classList.remove(ac),this.placeholderEl.classList.add(sc),document.body.classList.remove(rc),this.isIOSDevice&&(document.body.classList.remove(oc),this.expandedEl.removeEventListener("touchstart",this._onIOSTouchStartEvent)),document.removeEventListener("keyup",this._onKeyUpEvent),this.placeholderEl.focus(),this.onCloseExpandedSearch()}_onKeyUpEvent(e){const{key:t,target:n}=e,i="Escape"===t,r="INPUT"===n.tagName;i&&!r?(e.preventDefault(),this.hideExpandedSearch()):"Tab"===t&&this._userIsTabbedOut()&&this.hideExpandedSearch()}_onIOSTouchStartEvent(e){const{target:t}=e;S(t,".".concat(Za.block))||document.activeElement.blur()}_userIsTabbedOut(){if(this.expandedEl.classList.contains(cc)&&ko()){return!this.expandedEl.contains(document.activeElement)}return!1}}class uc extends ic{constructor(e,t){let{generateApiUrl:n,liveTextEl:i,onSelect:r,onInput:o,isFullPageTypeahead:s}=t;super(e,{createDismissableInput:!0,generateApiUrl:n,liveTextEl:i,onSelect:r,onInput:o,isFullPageTypeahead:s})}}const dc={clearButton:"recent-searches__clear-btn",dropdown:"recent-searches",dropdownList:"recent-searches__list",listItem:"recent-searches__item",listItemClearButton:"recent-searches__item--clear",listItemLink:"recent-searches__item-link",listItemFocus:"recent-searches__item--highlighted",showList:"recent-searches--show"},hc="i18n_aria_live_text_recent-searches-one-suggestion",pc="i18n_aria_live_text_recent-searches-multiple-suggestions",fc="i18n_aria_live_text_recent-searches-cleared";class mc extends ic{constructor(e,t){let{liveTextEl:n,clearRecentSearchApiBaseUrl:i}=t;if(super(e,{liveTextEl:n,elementClasses:dc,liveTextClearTime:1e3,closeOnEscape:!0}),!e)throw Error("An element must be provided to RecentSearches");if(this.dropdownContainerEl=e.querySelector(".".concat(dc.dropdown)),!this.dropdownContainerEl)throw Error("A RecentSearches container element must be in the RecentSearches parent element");this._clearRecentSearchApiBaseUrl=i,this._dropdownListItemEls=L(this.dropdownContainerEl.querySelectorAll(".".concat(dc.listItem))),this._clearBtnItem=e.querySelector(".".concat(dc.listItemClearButton)),this._dropdownListItemEls.push(this._clearBtnItem),this._dismissButtonEl=e.querySelector(".".concat(Ya))}_attachEventListeners(){this._clearBtn=this.el.querySelector(".".concat(dc.clearButton)),this._clearRecentSearchesHandler=this._clearRecentSearches.bind(this),this._clearBtn.addEventListener("mousedown",this._clearRecentSearchesHandler),super._attachEventListeners()}_removeEventListeners(){this._clearBtn.removeEventListener("mousedown",this._clearRecentSearchesHandler),super._removeEventListeners()}_onUserInput(){this._shouldShowList()?this._showList():this._hideList()}_redirect(e){e.click()}_clickOutsideToCloseHandler(e){e.target===this._input||this._dismissButtonEl.contains(e.target)||this._hideList()}_checkForListItemSelect(e){if(!this._isListActive())return;const t="mousedown"===e.type?e.target:this._highlighted.el;if(!t)return;e.preventDefault();const n=t.querySelector(".".concat(dc.listItemLink));n?this._redirect(n):t.classList.contains(dc.listItemLink)?this._redirect(t):t===this._clearBtnItem&&this._clearRecentSearches()}_shouldShowList(){return this._dropdownListItemEls.length>1&&0===this._input.value.length}_onClear(){this.onUserInputHandler()}_hideList(){this._isListActive()&&(this.dropdownContainerEl.classList.remove(dc.showList),document.body.removeEventListener("click",this._boundClickOutsideToCloseHandler),this._setExpandedState(!1),this._setHighlightedEl(null))}_getLiveTextOptions(){this._liveTextOneSuggestion=La(hc),this._liveTextMultipleSuggestions=La(pc),this._liveTextClearedSuggestions=La(fc)}_getLiveText(){let e;switch(this._informUserThatSearchesAreCleared?0:this._dropdownListItemEls.length){case 0:e=this._liveTextClearedSuggestions,this._informUserThatSearchesAreCleared=!1;break;case 2:e=this._liveTextOneSuggestion;break;default:e=this._liveTextMultipleSuggestions}return e}_clearRecentSearches(){we(this._clearRecentSearchApiBaseUrl,{method:"DELETE"}).then((()=>{this._removeEventListeners(),this._informUserThatSearchesAreCleared=!0,super._hideList(),super._setLiveText()})).catch((e=>{throw e}))}}const gc="tab-selected",vc="hidden",yc="switcher-tabs__button",bc="switcher-tabs__tab";class Ec{constructor(e,t,n){this.el=e,this.mobileTriggerEl=n,this.baseSearchBarsMap=t,this.currentType=this.el.getAttribute("data-current-search-type"),this.switcherTriggerAndTabs=this.el.querySelector(".".concat("switcher-tabs__trigger-and-tabs")),this.switcherTabs=this.el.querySelector(".".concat("switcher-tabs")),this.dropdownList=this.el.querySelector(".".concat("switcher-tabs__list")),this.dropdownTrigger=this.el.querySelector(".".concat("switcher-tabs__placeholder")),this.dropdownPlaceholderText=this.el.querySelector(".".concat("switcher-tabs__placeholder-text")),this._handleSwitcherClick=this._handleSwitcherClick.bind(this),this._initMobileExpandedSwitcher(),this._initCollapsibleSwitcher()}_initMobileExpandedSwitcher(){this.el.addEventListener("click",this._handleSwitcherClick),this.mobileTriggerEl.addEventListener("click",(e=>{e.preventDefault(),this.baseSearchBarsMap[this.currentType].showExpandedSearch()})),this.cancelBtn=this.el.querySelector(".".concat("switcher-tabs__cancel-btn")),this.cancelBtn.addEventListener("click",(e=>{e.preventDefault(),this.baseSearchBarsMap[this.currentType].hideExpandedSearch()}))}_initCollapsibleSwitcher(){this.collapsibleSwitcher=new Ee(this.switcherTriggerAndTabs,{dropdownContentEl:this.dropdownList,dropdownTriggerEl:this.dropdownTrigger}),this.switcherTriggerAndTabs.addEventListener("open",(()=>this._openSwitcher())),this.switcherTriggerAndTabs.addEventListener("close",(()=>this._closeSwitcher())),this._updatePlaceholderText()}_openSwitcher(){this.dropdownList.addEventListener("click",this._handleSwitcherClick),this.switcherTabs.classList.remove(vc),this.dropdownList.querySelector("button").focus()}_closeSwitcher(){this.dropdownList.removeEventListener("click",this._handleSwitcherClick),this.switcherTabs.classList.add(vc)}_handleSwitcherClick(e){if(!e.target.classList.contains(yc)&&!e.target.classList.contains(bc))return;const t=S(e.target,".".concat(bc)),n=t.querySelector(".".concat(yc)).getAttribute("data-switcher-type");n&&t&&this.currentType!==n?(this.collapsibleSwitcher.collapsible.currentListItem=t,this._switchTo(n,t)):this.collapsibleSwitcher.collapsible.close()}_switchTo(e,t){this._updateActiveTab(t),this._updatePlaceholderText(),this.el.setAttribute("data-current-search-type",e),this.collapsibleSwitcher.collapsible.close(),this.baseSearchBarsMap[this.currentType].isExpanded?this.baseSearchBarsMap[e].showExpandedSearch():this.baseSearchBarsMap[e].hideExpandedSearch(),this.currentType=e}_updateActiveTab(e){const t=this.el.querySelector(".".concat(gc));if(S(t,".".concat(bc))&&(t.setAttribute("aria-selected","false"),t.classList.remove(gc)),e.classList.contains(bc)){const t=e.querySelector(".".concat(yc));t.classList.add(gc),t.setAttribute("aria-selected","true")}}_updatePlaceholderText(){let e=this.el.querySelector(".".concat(gc));e&&(this.dropdownPlaceholderText.textContent=e.textContent)}}class wc{constructor(e){let{typeaheadApiBaseUrl:t,clearRecentSearchApiBaseUrl:n,shouldSearchOnSelect:i=!0,onCloseExpandedSearch:r,includeSwitcher:o=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.el=e,!this.el)throw new Error("No element passed into SearchBar");this.typeaheadApiBaseUrl=t;const s=this.el.querySelector(".".concat("search-bar__live-text"));this.shouldSearchOnSelect=i,this.placeholderEl=this.el.querySelector(".".concat("search-bar__placeholder"));const a=!!this.el.querySelector(".".concat("search-bar__mobile-wrapper"));if(this.baseSearchBarsMap=L(this.el.querySelectorAll(".".concat("base-search-bar"))).reduce(((e,t)=>{const n=new lc(t,this.el,this.placeholderEl,{onCloseExpandedSearch:r,isMobileDevice:a});return e[n.type]=n,e}),{}),t){this.baseSearchBarFormEl=this.baseSearchBarsMap.JOBS.el.querySelector(".base-search-bar__form"),this.geoIdInputEl=this.el.querySelector('input[name="geoId"]');const e=this.el.querySelector(".keywords-typeahead-input");new uc(e,{generateApiUrl:this._generateKeywordsTypeaheadApiUrl.bind(this),liveTextEl:s,onSelect:this._onKeywordsTypeaheadSelect.bind(this)});e.querySelector(".".concat(dc.dropdown))&&new mc(e,{clearRecentSearchApiBaseUrl:n,liveTextEl:s}),new uc(this.el.querySelector(".location-typeahead-input"),{generateApiUrl:this._generateLocationTypeaheadApiUrl.bind(this),liveTextEl:s,onSelect:this._onLocationTypeaheadSelect.bind(this),onInput:this._onLocationTypeaheadInput.bind(this)}),Array.from(this.el.querySelectorAll(".".concat(Ka,".search-input"))).forEach((e=>{new Xa(e);e.querySelector(".".concat(dc.dropdown))&&new mc(e,{clearRecentSearchApiBaseUrl:n,liveTextEl:s})})),this._addCustomErrorStateHandler()}else Array.from(this.el.querySelectorAll(".".concat(Ka))).forEach((e=>new Xa(e)));o&&(this.switcher=new Ec(e,this.baseSearchBarsMap,this.placeholderEl)),this.setupSearchInputFocusTracking()}_generateKeywordsTypeaheadApiUrl(e){return"".concat(this.typeaheadApiBaseUrl,"?query=").concat(window.encodeURIComponent(e))}_generateLocationTypeaheadApiUrl(e){return"".concat(this.typeaheadApiBaseUrl,"?query=").concat(window.encodeURIComponent(e),"&typeaheadType=GEO&geoTypes=POPULATED_PLACE,ADMIN_DIVISION_2,MARKET_AREA,COUNTRY_REGION")}_onKeywordsTypeaheadSelect(){this.shouldSearchOnSelect&&this._submitForm()}_onLocationTypeaheadSelect(e){this.geoIdInputEl&&(this.geoIdInputEl.value=e.dataset.id),this.shouldSearchOnSelect&&this._submitForm()}_onLocationTypeaheadInput(){this.geoIdInputEl&&(this.geoIdInputEl.value="")}_submitForm(){const e=this.el.querySelector(".keywords-typeahead-input input");null!=e&&e.validity.valueMissing?e.reportValidity():this.baseSearchBarFormEl&&this.baseSearchBarFormEl.submit()}_addCustomErrorStateHandler(){const e=this.el.querySelector(".keywords-typeahead-input input"),t=this.el.querySelector(".keywords-typeahead-input-helper");null==e||e.addEventListener("invalid",(n=>{n.preventDefault(),this.baseSearchBarFormEl.classList.add("input-error"),null==t||t.classList.remove("hidden"),e.focus()}))}setupSearchInputFocusTracking(){this.el.addEventListener("dismissableInputFocused",(e=>{const t=e.target.getAttribute("data-tracking-control-name");t&&window.tracking&&window.tracking.then((e=>{e.fireTrackingEvent("SearchInputFocusEvent",{header:{},controlUrn:"urn:li:control:".concat(G(document),"-").concat(t)})}))}))}}const _c="/mwlite/badge-counts";const Sc="overlay_";class Tc extends io{constructor(e){let{enablePageViewTracking:t=!1,shouldHideModal:n=(()=>!1),triggerByOutletEl:i=!0,pushState:r=!0,shouldMoveToTopContainer:o=!0,focusElement:s,pageKey:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No element passed into mobile web modal");super(e,{enablePageViewTracking:t,shouldHideModal:n,triggerByOutletEl:i,shouldMoveToTopContainer:o,focusElement:s,pageKey:a}),this.pushState=r,this.hashChangeHandlerRef=this._hashChangeHandler.bind(this)}historyBackClickHandler(){this.close({enableHistoryBack:!1})}_hashChangeHandler(e){const t=e.oldURL&&e.oldURL.split("#")[1];t&&t==="".concat(Sc).concat(this._el.id)&&this.historyBackClickHandler()}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.open(e),this._shouldHideModal()||(this.pushState&&history.pushState(this._el.id,"show modal","#".concat(Sc).concat(this._el.id)),window.addEventListener("hashchange",this.hashChangeHandlerRef))}close(){let{enableHistoryBack:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.removeEventListener("hashchange",this.hashChangeHandlerRef),this.pushState&&e&&(window.history.replaceState({},document.title,window.location.href.split("#")[0]),history.back()),super.close()}}document.querySelector.bind(document);String.fromCharCode(32);G(document);String.fromCharCode(32);function Cc(){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!e||0===e.trim().length};return e.errorMessageSuffix="error_empty",e}function kc(e){const t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.length<e};return t.errorMessageSuffix="error_too_short",t}function Ic(e){const t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.length>e};return t.errorMessageSuffix="error_too_long",t}Cc(),kc(3),Ic(128),Cc(),kc(6),Ic(400);var Ac=window||n.g;const Lc=/^((?!\.(stg|corp)).)*\.linkedin\.(com|cn)$/,Oc="utag_data",Rc="tealium";function Nc(){const e=Ac.location?Ac.location.hostname:"";return Lc.test(e)}function xc(){return Nc()?Pc()?"platform.linkedin.cn":"platform.linkedin.com":Pc()?"platform.linkedin-ei.cn":"platform.linkedin-ei.com"}function Pc(){const e=Ac.location?Ac.location.hostname:"";return/\.cn$/.test(e)}function Mc(e,t,n){let i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if("function"!=typeof t||"function"!=typeof n)throw new TypeError("One of the specified callbacks is not a function.");const r=new Ac.XMLHttpRequest;r.withCredentials=i,r.open("GET",e,!0),r.onreadystatechange=function(){this.readyState===this.DONE&&(200===this.status&&"function"==typeof t?t(this.responseText):n(this))},r.send()}function Dc(e){return function(){let e=_();return!e||e.consent.optedInConsentMap.ADVERTISING}()&&function(e){return e["compliance.isGDPROptIn"]}(e)}function Uc(e){return function(){let e=_();return!e||e.consent.optedInConsentMap.ANALYTICS_AND_RESEARCH}()}function Bc(e){return function(){let e=_();return!e||e.consent.optedInConsentMap.FUNCTIONAL}()}function qc(e){for(let t=1;t<arguments.length;t++){const n=arguments[t];if(n){const t=Object.keys(n);for(let i=0;i<t.length;i++){const r=t[i];e[r]=n[r]}}}return e}function Fc(e){const t=new Ac.Date;t.setSeconds(0),t.setMilliseconds(0);const n=Math.floor(t.getMinutes()/e)*e;return t.setMinutes(n),t.getTime()}function Hc(){return/utagdb=[^;]+/.test(Ac.document.cookie)}let Gc;const jc={},zc={};function Wc(){return"https://".concat(Nc()?Pc()?"www.linkedin.cn":"www.linkedin.com":Pc()?"www.linkedin-ei.cn":"www.linkedin-ei.com").concat("/litms/api/metadata/user")}function Kc(){return function(e){let t=qc({},e);return t["compliance.isAdvertisingOptIn"]=Dc(t),t["compliance.isAnalyticsAndResearchOptIn"]=Uc(),t["compliance.isFunctionalOptIn"]=Bc(),t}(jc)}function Vc(e){if(!zc[e]){const t=function(e){return"https://".concat(xc(),"/litms/allowlist/").concat(encodeURIComponent(e))}(e),n=new Promise(((e,n)=>{Mc(t,(t=>{e(JSON.parse(t))}),(e=>{n(e)}),!1)}));zc[e]=n}return zc[e]}Ac[Oc]||(Ac[Oc]={});const Yc="undefined"!=typeof window&&window&&"node"!==window.appEnvironment;let Qc;function Jc(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:5,n=null;return"string"==typeof e&&(n="https://".concat(xc(),"/litms/utag/").concat(e,"/utag.js?cb=").concat(Fc(t))),n}function Xc(){return function(){if(void 0===Qc&&Yc){const e=Ac.document.cookie.match(/litms_utag_override=([^;]+)/);Qc=e?e[1]:""}return Qc}().length>0}function Zc(e,t,n,i){e.onLoadRulesRunOnce(n);let r=qc({},t,Kc());e.view(r),Hc()&&Ac.trackingEventDebugData.push({profileName:i,eventType:"PV",trackingData:r})}function $c(e,t,n,i){e.onLoadRulesRunOnce(n);let r=qc({},t,Kc());e.link(r),Hc()&&Ac.trackingEventDebugData.push({profileName:i,eventType:"CI",trackingData:r})}function el(e,t,n){if(function(e){Ac.utag=e}(e),t instanceof Array&&t.length>0){const i=t.length;for(let r=0;r<i;r++){const i=t.shift();i.isControlInteraction?$c(e,i.data,i.callback,n):Zc(e,i.data,i.callback,n)}}}function tl(e,t){!function(e){return"object"==typeof e&&"function"==typeof e.fireTrackingEvent}(e)?console.error("Unable to fire tracking event"):e.fireTrackingEvent(t.info.name,t.body)}function nl(e,t){return"urn:li:externalMarketingTag:(".concat(function(e){const t=e.data["ut.profile"],n=e.cfg.v;return"urn:li:tagManagementSystemProfile:(".concat(Rc,",").concat(t,",").concat(n,")")}(e),",").concat(parseInt(t),")")}function il(e){const t=function(e){return Object.keys(e.loader.cfg).filter((t=>1===e.loader.cfg[t].send&&0!==e.loader.cfg[t].load))}(e).map((t=>function(e,t){return{tagUrn:nl(e,t)}}(e,t)));if(0!==t.length)return{info:{name:"ExternalMarketingTagFireEvent"},body:{header:{},requestHeader:{},tags:t}}}Ac.utag_cfg_ovrd=Ac.utag_cfg_ovrd||{},Ac.trackingEventDebugData=Ac.trackingEventDebugData||[],Ac.utag_cfg_ovrd.noview=!0,Ac.utag_cfg_ovrd.nocookie=!0;const rl=Yc&&new RegExp("bot|google|aolbuild|baidu|bing|msn|duckduckgo|teoma|slurp|yandex|sogou|facebook|alexa","i").test(Ac.navigator.userAgent),ol={};let sl,al,cl,ll={};class ul{constructor(){let{profileName:e,tracking2Instance:t,enableAllowlisting:n=!1,cacheBusterInterval:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isInitialized=!1,this.isAllowlistingEnabled=!1,this._allowlistReadyPromise=Promise.resolve({}),this.isContainerTagLoaded=!1,this._queue=[],this.allowlist={pageKey:{},controlUrn:{}},this.tracking2Instance=t,this.profileName=e,this.enableAllowlisting=n,this.cacheBusterInterval=i}initialize(){return this._shouldInitialize()?this.isInitialized?(console.warn("Initialize should not be called more that once"),this.initializePromise.then()):(this.isInitialized=!0,this.initializePromise=new Promise(((e,t)=>{this.enableAllowlisting?(this.isAllowlistingEnabled=!0,this._onInitializeSuccessCallback=e,this._onInitializeFailureCallback=t,this._allowlistReadyPromise=Vc(this.profileName).then((e=>this._processAllowlistResult(e))).catch((e=>console.error("Unable to retrieve allowlists for profile : ".concat(this.profileName),e)))):this._loadContainerTag(e,t)})),this.profileName&&(ol[this.profileName]=this),this.initializePromise):Promise.resolve()}_processAllowlistResult(e){Object.keys(e).forEach((t=>this.addValuesToAllowlist(t,e[t])))}_loadContainerTag(e,t){void 0!==Ac.utag&&(Ac.utag=void 0),void 0!==Ac[Oc]&&(Ac[Oc]=void 0);const n=function(){if(!Gc){const e=Wc();Gc=new Promise(((t,n)=>{Mc(e,(e=>{try{t(JSON.parse(e))}catch(e){console.error("Invalid JSON format of userSettings"),n(e)}}),(e=>{n(e)}))}))}return Gc}().then((e=>{Object.keys(e).forEach((t=>{!function(e,t){const n="string"!=typeof t?"":"".concat(t,".");"object"==typeof e&&Object.keys(e).forEach((t=>{jc[n+t]=e[t]}))}(e[t],t)}))})).catch((e=>{console.error("Unable to get user settings while calling loading container tag",e)})),i=(r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"main",t=arguments.length>1?arguments[1]:void 0;return Xc()?Qc:Jc(e,t)}(this.profileName,this.cacheBusterInterval),new Promise((e=>{const t=Ac.document.createElement("script");t.type="text/javascript",t.src=r,t.async=!0,t.onload=e,Ac.document.getElementsByTagName("head")[0].appendChild(t)})));var r;Promise.all([n,i]).then((()=>{this.isContainerTagLoaded=!0,this._uTag=Ac.utag,function(e){const t=[];e.onLoadRulesRunOnce=function(e){t.push(e)};const n=e.loader.initcfg;e.loader.initcfg=function(){n.call(this,arguments),t.length>0&&t.shift()()}}(this._uTag),this._processQueuedEvents();const t={info:{name:"TagManagementSystemLoadEvent"},body:{header:{},requestHeader:{}}};"object"==typeof this.tracking2Instance&&tl(this.tracking2Instance,t),e(t)})).catch((e=>{console.error("Unable to complete loading container tag",e),t()}))}_shouldInitialize(){return!rl}_shouldProcessEvent(e){return rl?Promise.resolve(!1):this.isAllowlistingEnabled?new Promise((t=>{this._allowlistReadyPromise.then((()=>{t(this._isEventAllowlisted(e))}))})):Promise.resolve(!0)}_isEventAllowlisted(e){return void 0!==e.controlUrn?this._isEventAllowlistedByControlUrn(e):this._isEventAllowlistedByPageKey(e)}_isEventAllowlistedByPageKey(e){return void 0!==this.allowlist.pageKey[e.pageKey]}_isEventAllowlistedByControlUrn(e){return void 0!==this.allowlist.controlUrn[e.controlUrn]}addValuesToAllowlist(e,t){"string"==typeof e&&Array.isArray(t)&&void 0!==this.allowlist[e]&&t.forEach((t=>{this.allowlist[e][t]=!0}))}_processQueuedEvents(){this.isContainerTagLoaded?el(this._uTag,this._queue,this.profileName):this.isInitialized&&this.isAllowlistingEnabled&&this._loadContainerTag(this._onInitializeSuccessCallback,this._onInitializeFailureCallback)}_fireAuditEvent(){const e=il(this._uTag);return void 0!==this.tracking2Instance&&void 0!==e&&tl(this.tracking2Instance,e),e}_createCallbackForAuditEvent(e){const t=this;return function(){const n=t._fireAuditEvent();"function"==typeof e&&e(n)}}_checkForCookieConsent(){_().consent.consentAvailable&&!al?this._refireTracking():sl=setTimeout((()=>{this._checkForCookieConsent()}),2e3)}_refireTracking(){ll.payloads&&ll.payloads.forEach((e=>{const{data:t,callback:n}=e;t.cookieConsentGiven=!0,this.trackPageView(t,n)}))}_savePayloadForRefire(e,t){if(Yc){al=!1;const{payloads:n=[],url:i}=ll,r=location.href,o={data:e,callback:t},s=r!==i?[]:n;s.push(o),ll={url:r,payloads:s},sl||(sl=setTimeout((()=>{this._checkForCookieConsent()}),2e3))}}trackPageView(e,t){return _().consent.consentAvailable||this._savePayloadForRefire(e,t),this._shouldProcessEvent(e).then((n=>{n&&(this._queue.push({isControlInteraction:!1,data:e,callback:this._createCallbackForAuditEvent(t)}),this._processQueuedEvents())}))}trackControlInteraction(e,t){return this._shouldProcessEvent(e).then((n=>{n&&(this._queue.push({isControlInteraction:!0,data:e,callback:this._createCallbackForAuditEvent(t)}),this._processQueuedEvents())}))}}function dl(e){let{event:t,litmsInstance:n,pageKey:i}=e;const r=t.target.getAttribute("data-tracking-control-name"),o=t.target.hasAttribute("data-tracking-litms");r&&o&&n.trackControlInteraction({controlUrn:"urn:li:control:".concat(i,"-").concat(r)})}class hl{constructor(e){if(this.trackingInstance=e,this.pageKey=G(document),this.litmsProfileName=function(e){const t=e.querySelector('meta[name="litmsProfileName"]');return t?t.content:""}(document),!this.litmsProfileName)throw Error('Page missing "litmsProfileName" meta tag.');this.litmsInstance=new ul({tracking2Instance:this.trackingInstance,profileName:this.litmsProfileName}),this.litmsInstance.initialize(),this.clickEventListener=e=>dl({event:e,litmsInstance:this.litmsInstance,pageKey:this.pageKey}),this.keydownEventListener=e=>{"Enter"!==e.key&&" "!==e.key&&"Spacebar"!==e.key||dl({event:e,litmsInstance:this.litmsInstance,pageKey:this.pageKey})},document.body.addEventListener("click",this.clickEventListener,!0),document.body.addEventListener("keydown",this.keydownEventListener,!0)}trackPageView(){let{pageKey:e="",customParameters:t={}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!("string"==typeof e||e instanceof String))throw new Error("The pageKey is not a string!");if(!("object"==typeof t||t instanceof Object))throw new Error("CustomParamteres is expected to be an object.");const n=e||this.pageKey;this.litmsInstance&&this.litmsInstance.trackPageView(Le({pageKey:n},t))}}function pl(e){if(!cl){if(!e)throw new Error("No trackingInstance passed in!");cl=new hl(e)}return cl}!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(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}}(),function(){if("function"==typeof window.EventTarget)try{return!new e}catch(e){}const 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],i=0,r=n.length;i<r;i++)if(n[i]===t)return void n.splice(i,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,i=t.length;n<i;n++)t[n].call(this,e);return!e.defaultPrevented},window.EventTarget=e}();const fl={GOOGLE_ERROR:"googleError",GOOGLE_USER_FETCHED:"googleUserFetched",INITIALIZED:"initialized",PROMPT_MOMENT:"promptMomentNotification",TOKEN_FETCHED:"tokenFetched"},ml={INITIALIZATION:"initialization",AUTHENTICATION:"authentication"},{GOOGLE_ERROR:gl,GOOGLE_USER_FETCHED:vl,INITIALIZED:yl}=fl,{INITIALIZATION:bl,AUTHENTICATION:El}=ml;class wl extends EventTarget{constructor(e){let{libSrcPath:t,el:n,clientId:i=CLIENT_ID}=e;if(super(),!n)throw TypeError("DOM element for Sign In button is required");if(this.libSrcPath=t,this.el=n,this.clientId=i,window.gapi)this._initializeGoogleAuth();else{if(!t)throw TypeError("Google Sign In lib not already loaded on the page. libSrcPath is required to load the lib.");!function(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{e()}))}((()=>{!function(e,t){const n=document.createElement("script");n.src=e,t&&(n.onload=t),document.head.appendChild(n)}(t,this._initializeGoogleAuth.bind(this))}))}}_initializeGoogleAuth(){return gapi.auth2.init({client_id:this.clientId}).then((e=>{this.auth2=e,this._attachSignIn();const t=new CustomEvent(yl);this.dispatchEvent(t)})).catch((e=>{const t={type:bl,message:e.error},n=new CustomEvent(gl,{detail:t});this.dispatchEvent(n)}))}_attachSignIn(){this.auth2.attachClickHandler(this.el,{},(e=>{const t=new CustomEvent(vl,{detail:this._getGoogleUserInformation(e)});this.dispatchEvent(t)}),(e=>{const t={type:El,message:e.error},n=new CustomEvent(gl,{detail:t});this.dispatchEvent(n)}))}_getGoogleUserInformation(e){const 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()}}}var _l={exports:{}};function Sl(e){this.message=e}Sl.prototype=new Error,Sl.prototype.name="InvalidCharacterError";var Tl="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Sl("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(n=r%4?64*n+i:i,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};var Cl=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 function(e){return decodeURIComponent(Tl(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return Tl(t)}};function kl(e){this.message=e}kl.prototype=new Error,kl.prototype.name="InvalidTokenError",_l.exports=function(e,t){if("string"!=typeof e)throw new kl("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(Cl(e.split(".")[n]))}catch(e){throw new kl("Invalid token specified: "+e.message)}},_l.exports.InvalidTokenError=kl;const Il=fl,Al=ml;function Ll(){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 Ol="apfc",{GOOGLE_USER_FETCHED:Rl,GOOGLE_ERROR:Nl,INITIALIZED:xl}=Il,{INITIALIZATION:Pl}=Al;function Ml(e){var t=e.intersectionRect;return t.width>=0&&t.height>=0}function Dl(e){try{return e.getBoundingClientRect()}catch(e){if("object"==typeof e&&null!==e&&16389==(65535&e.number))return{top:0,bottom:0,left:0,width:0,height:0,right:0,x:0,y:0};throw e}}function Ul(e,t){return Math.round(e-t)}var Bl,ql=(Bl=function(e,t){return Bl=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},Bl(e,t)},function(e,t){function n(){this.constructor=e}Bl(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),Fl=function(){function e(){this.items=[]}return e.prototype.remove=function(e){for(var t=this.items.length,n=0;n<t;n++)this.removePredicate(e,this.items[n])&&(this.items.splice(n,1),n--,t--)},e.prototype.clear=function(){this.items=[]},e.prototype.push=function(e){this.items.push(e)},e.prototype.isEmpty=function(){return 0===this.items.length},e}(),Hl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ql(t,e),t.prototype.removePredicate=function(e,t){return"string"==typeof e?t.id===e:t.callback===e},t}(Fl),Gl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ql(t,e),t.prototype.removePredicate=function(e,t){return t===e},t}(Fl),jl=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return ql(t,e),t.prototype.removePredicate=function(e,t){return"string"==typeof e?t.id===e:"function"==typeof e?t.callback===e:t.el===e},t}(Fl),zl=function(){return 0},Wl=!("undefined"==typeof window||!window||"undefined"==typeof document||!document),Kl=Wl&&!!window.requestAnimationFrame,Vl={hasDOM:Wl,hasRAF:Kl,getScrollTop:zl,getScrollLeft:zl,getHeight:zl,getWidth:zl,rAF:Kl?window.requestAnimationFrame.bind(window):function(e){e()},meta:{width:0,height:0,scrollTop:0,scrollLeft:0,x:0,y:0,top:0,left:0},version:0,lastVersion:0,updateMeta:zl,get isDirty(){return Vl.version!==Vl.lastVersion},document:window.document,IntersectionObserver:Wl&&window.IntersectionObserver,performance:Wl&&window.performance};function Yl(){++Vl.version}function Ql(){var e=null!=document.scrollingElement;Vl.getScrollTop=e?function(){return document.scrollingElement.scrollTop}:function(){return window.scrollY},Vl.getScrollLeft=e?function(){return document.scrollingElement.scrollLeft}:function(){return window.scrollX}}Wl&&(Vl.getHeight=function(){return window.innerHeight},Vl.getWidth=function(){return window.innerWidth},Vl.updateMeta=function(){Vl.meta.height=Vl.getHeight(),Vl.meta.width=Vl.getWidth(),Vl.meta.scrollLeft=Vl.getScrollLeft(),Vl.meta.scrollTop=Vl.getScrollTop(),Vl.lastVersion=Vl.version},Vl.updateMeta(),"loading"!==document.readyState?Ql():document.addEventListener("DOMContentLoaded",Ql),window.addEventListener("resize",Yl,!1),window.addEventListener("scroll",Yl,!1));var Jl=function(){function e(){this.reads=[],this.work=[],this.running=!1}return e.prototype.scheduleRead=function(e){this.reads.unshift(e),this.run()},e.prototype.scheduleWork=function(e){this.work.unshift(e),this.run()},e.prototype.run=function(){var e=this;this.running||(this.running=!0,Vl.rAF((function(){e.running=!1;for(var t=0,n=e.reads.length;t<n;t++)e.reads.pop()();t=0;for(var i=e.work.length;t<i;t++)e.work.pop()();(e.work.length>0||e.reads.length>0)&&e.run()})))},e}(),Xl=null;var Zl=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),$l="xxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),eu=0,tu=function(){function e(e,t,n,i,r,o,s,a,c,l){this.dateNow=e,this.highResTime=t,this.scrollTop=n,this.scrollLeft=i,this.width=r,this.height=o,this.x=s,this.y=a,this.top=c,this.left=l}return e.generate=function(t){void 0===t&&(t=window);var n=this.revalidateRootMeta(t);return new e(Date.now(),performance.now(),n.scrollTop,n.scrollLeft,n.width,n.height,n.x,n.y,n.top,n.left)},e.revalidateRootMeta=function(e){void 0===e&&(e=document);var t,n={width:0,height:0,scrollTop:0,scrollLeft:0,x:0,y:0,top:0,left:0};return Vl.isDirty&&Vl.updateMeta(),e===window||e===document?(n.height=Vl.meta.height,n.width=Vl.meta.width,n.scrollLeft=Vl.meta.scrollLeft,n.scrollTop=Vl.meta.scrollTop,n):(t=Dl(e),n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,n.width=t.width,n.height=t.height,n.x=t.x,n.y=t.y,n.top=t.top,n.left=t.left,n)},e}();function nu(){return eu+++$l}var iu=function(){function e(e,t){this.isTicking=!1,this.toRemove=[],this.engine=e||(Xl||(Xl=new Jl)),this.root=t||window}return e.prototype.tick=function(){if(this.queue.isEmpty())this.isTicking=!1;else{if(this.toRemove.length>0){for(var e=0;e<this.toRemove.length;e++)this.queue.remove(this.toRemove[e]);this.toRemove=[]}this.applyQueue(tu.generate(this.root)),this.engine.scheduleRead(this.tick.bind(this))}},e.prototype.scheduleWork=function(e){this.engine.scheduleWork(e)},e.prototype.scheduleRead=function(e){this.engine.scheduleRead(e)},e.prototype.queryElement=function(e,t){var n,i,r=this;this.engine.scheduleRead((function(){n=Dl(e),i=tu.generate(r.root)})),this.engine.scheduleWork((function(){t(n,i)}))},e.prototype.unwatch=function(e){this.toRemove.push(e)},e.prototype.unwatchAll=function(){this.queue.clear()},e.prototype.startTicking=function(){this.isTicking||(this.isTicking=!0,this.engine.scheduleRead(this.tick.bind(this)))},e}(),ru=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.queue=new Hl,t}return Zl(t,e),t.prototype.applyQueue=function(e){for(var t=0;t<this.queue.items.length;t++){var n=this.queue.items[t],i=n.id;(0,n.callback)(e,i)}},t.prototype.watch=function(e){this.startTicking();var t=nu();return this.queue.push({callback:e,id:t}),t},t}(iu),ou=function(e){function t(t){var n=e.call(this,void 0,window)||this;return n.predicate=t,n}return Zl(t,e),t.prototype.applyQueue=function(t){this.predicate(t)&&e.prototype.applyQueue.call(this,t)},t}(ru),su=function(e){function t(t,n,i){void 0===i&&(i=!1);var r=e.call(this,t,n)||this;return r.lastVersion=Vl.version,r.queue=new jl,r.ALLOW_CACHED_SCHEDULER=i,r}return Zl(t,e),Object.defineProperty(t.prototype,"isDirty",{get:function(){return Vl.version!==this.lastVersion},enumerable:!1,configurable:!0}),t.prototype.applyQueue=function(e){for(var t=0;t<this.queue.items.length;t++){var n=this.queue.items[t],i=n.callback,r=n.el,o=n.id,s=n.clientRect;!this.isDirty&&s&&this.ALLOW_CACHED_SCHEDULER||(s=this.queue.items[t].clientRect=Dl(r)),i(e,o,s)}this.lastVersion=Vl.version},t.prototype.watch=function(e,t,n){this.startTicking(),n=n||nu();return this.queue.push({el:e,callback:t,id:n,clientRect:null}),n},t}(iu),au=null;var cu=function(){function e(){this.queue=new Gl}return e.prototype.listen=function(e){this.queue.push(e)},e.prototype.unlisten=function(e){this.queue.remove(e)},e.prototype.trigger=function(e){for(var t=0;t<this.queue.items.length;t++)this.queue.items[t](e)},e}(),lu=function(){function e(e){this.scheduler=new ou(e.bind(this))}return e.prototype.trigger=function(){},e.prototype.listen=function(e){this.state=tu.generate(),this.scheduler.watch(e)},e.prototype.unlisten=function(e){this.scheduler.unwatch(e)},e}(),uu=null;function du(e,t){var n=(uu||(uu={scroll:new lu((function(e){var t=this.state,n=t.scrollTop,i=t.scrollLeft;return this.state=e,n!==e.scrollTop||i!==e.scrollLeft})),resize:new lu((function(e){var t=this.state,n=t.width,i=t.height;return this.state=e,i!==e.height||n!==e.width})),destroy:new cu,beforeunload:new cu,hide:new cu,show:new cu}))[e];n&&n.listen(t)}function hu(e,t){if(uu){var n=uu[e];n&&n.unlisten(t)}}function pu(e,t){if(uu){var n=uu[e];n&&n.trigger(t)}}function fu(e){(au||(au=new ru)).scheduleWork(e)}function mu(e){var t=e.left,n=e.right,i=e.top,r=e.bottom;return{left:t,x:t,top:i,y:i,bottom:r,right:n,width:n-t,height:r-i}}Vl.hasDOM&&(window.addEventListener("beforeunload",(function(){pu("beforeunload"),pu("destroy")})),document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState?pu("show"):pu("hide")})));var gu=function(){function e(e,t){void 0===t&&(t={}),this.records={},this.callback=e,t.threshold=t.threshold||0,this.rootMarginObj=function(e){var t=e.split(" ").map((function(e){return parseInt(e,10)}));switch(t.length){case 2:return{top:t[0],left:t[1],bottom:t[0],right:t[1]};case 3:return{top:t[0],left:t[1],bottom:t[2],right:t[1]};case 4:return{top:t[0],left:t[1],bottom:t[2],right:t[3]};default:return{top:0,left:0,bottom:0,right:0}}}(t.rootMargin||"0px"),this.root=t.root||null,Array.isArray(t.threshold)?this.thresholds=t.threshold:this.thresholds=[t.threshold],this.scheduler=new su(void 0,this.root,t.ALLOW_CACHED_SCHEDULER)}return e.prototype.observe=function(e){var t=this,n=e,i=n.__spanielId=n.__spanielId||nu();return this.scheduler.watch(e,(function(e,i,r){t.onTick(e,i,r,n)}),n.__spanielId),i},e.prototype.onTick=function(e,t,n,i){var r=this,o=this.generateEntryEvent(e,n,i),s=o.numSatisfiedThresholds,a=o.entry,c=this.records[t]||(this.records[t]={entry:a,numSatisfiedThresholds:0});s===c.numSatisfiedThresholds&&a.isIntersecting===c.entry.isIntersecting||(c.numSatisfiedThresholds=s,c.entry=a,this.scheduler.scheduleWork((function(){r.callback([a])})))},e.prototype.unobserve=function(e){this.scheduler.unwatch(e.__spanielId),delete this.records[e.__spanielId]},e.prototype.disconnect=function(){this.scheduler.unwatchAll(),this.records={}},e.prototype.takeRecords=function(){return[]},e.prototype.generateEntryEvent=function(e,t,n){for(var i=0,r=function(e,t,n,i){if("none"===n.style.display)return{time:e.dateNow,highResTime:e.highResTime,boundingClientRect:vu(),intersectionRatio:0,intersectionRect:vu(),isIntersecting:!1,rootBounds:vu(),target:n};var r=t.bottom,o=t.right,s=e.left+i.left,a=e.top+i.top,c={left:s,top:a,bottom:i.bottom,right:i.right,width:e.width-(i.right+i.left),height:e.height-(i.bottom+i.top),y:a,x:s},l=Math.max(c.left,t.left),u=Math.max(c.top,t.top),d=Math.min(c.left+c.width,t.right)-l,h=Math.min(c.top+c.height,t.bottom)-u,p=d>=0?l:0,f=u>=0?u:0,m={left:p,top:f,x:p,y:f,width:d,height:h,right:o,bottom:r};return function(e){var t=e.unixTime,n=e.highResTime,i=e.rootBounds,r=e.boundingClientRect,o=e.intersectionRect,s=e.target,a=r.height*r.width,c=a>0?o.width*o.height/a:0;return{time:t,highResTime:n,rootBounds:i,boundingClientRect:r,intersectionRect:o,target:s,intersectionRatio:c,isIntersecting:Ml({intersectionRect:o})}}({unixTime:e.dateNow,highResTime:e.highResTime,rootBounds:c,target:n,boundingClientRect:mu(t),intersectionRect:m})}(e,t,n,this.rootMarginObj),o=0;o<this.thresholds.length;o++){var s=this.thresholds[o];r.intersectionRatio>=s&&i++}return{numSatisfiedThresholds:i,entry:r}},e}();function vu(){return{bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0}}var yu={x:0,y:0,width:0,height:0,bottom:0,left:0,top:0,right:0};var bu=function(){function e(e,t){var n=this;this.paused=!1,this.queuedEntries=[],this.recordStore={},this.callback=e;var i=t||{threshold:[]},r=i.root,o=i.rootMargin,s=i.threshold,a=i.ALLOW_CACHED_SCHEDULER,c=i.BACKGROUND_TAB_FIX,l=i.USE_NATIVE_IO,u="string"!=typeof(o=o||"0px")?function(e){return e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px"}(o):o;this.thresholds=s.sort((function(e){return e.ratio}));var d={root:r,rootMargin:u,threshold:this.thresholds.map((function(e){return e.ratio})),ALLOW_CACHED_SCHEDULER:a};this.usingNativeIo=!!l&&!!Vl.IntersectionObserver;var h=this.usingNativeIo?Vl.IntersectionObserver:gu;this.observer=new h((function(e){return n.internalCallback(e)}),d),this.onTabHidden=this._onTabHidden.bind(this),this.onWindowClosed=this._onWindowClosed.bind(this),this.onTabShown=this._onTabShown.bind(this),Vl.hasDOM&&(du("beforeunload",this.onWindowClosed),du("hide",this.onTabHidden),du("show",this.onTabShown),c&&(this.paused="visible"!==Vl.document.visibilityState))}return e.prototype._onWindowClosed=function(){this.onTabHidden()},e.prototype.setAllHidden=function(){for(var e=Object.keys(this.recordStore),t=0;t<e.length;t++)this.handleRecordExiting(this.recordStore[e[t]]);this.flushQueuedEntries()},e.prototype._onTabHidden=function(){this.paused=!0,this.setAllHidden()},e.prototype.generateObserverTimestamp=function(){return this.usingNativeIo?Math.floor(performance.now()):Date.now()},e.prototype._onTabShown=function(){this.paused=!1;for(var e=Object.keys(this.recordStore),t=performance.now(),n=this.generateObserverTimestamp(),i=0;i<e.length;i++){var r=this.recordStore[e[i]].lastSeenEntry;if(r){var o=r.intersectionRatio,s=r.boundingClientRect,a=r.rootBounds,c=r.intersectionRect,l=r.isIntersecting,u=r.target;this.handleObserverEntry({intersectionRatio:o,boundingClientRect:s,time:n,highResTime:t,isIntersecting:l,rootBounds:a,intersectionRect:c,target:u})}}},e.prototype.internalCallback=function(e){e.forEach(this.handleObserverEntry.bind(this))},e.prototype.flushQueuedEntries=function(){this.queuedEntries.length>0&&(this.callback(this.queuedEntries),this.queuedEntries=[])},e.prototype.generateSpanielEntry=function(e,t){var n=e.intersectionRatio,i=e.rootBounds,r=e.boundingClientRect,o=e.intersectionRect,s=e.isIntersecting,a=e.time,c=e.target,l=this.recordStore[c.__spanielId],u=this.usingNativeIo?Math.floor((Vl.performance.timeOrigin||Vl.performance.timing.navigationStart)+a):a,d=this.usingNativeIo?a:e.highResTime;if(!d)throw new Error("Missing intersection entry timestamp");return{intersectionRatio:n,isIntersecting:s,unixTime:u,time:u,highResTime:d,rootBounds:i,boundingClientRect:r,intersectionRect:o,target:c,duration:0,visibleTime:s?u:-1,entering:!1,payload:l.payload,label:t.threshold.label,threshold:t.threshold}},e.prototype.handleRecordExiting=function(e){var t=this,n=Date.now(),i=performance.now();e.thresholdStates.forEach((function(r){var o=e.lastSeenEntry&&e.lastSeenEntry.boundingClientRect;t.handleThresholdExiting({intersectionRatio:-1,isIntersecting:!1,unixTime:n,time:n,highResTime:i,payload:e.payload,label:r.threshold.label,threshold:r.threshold,entering:!1,rootBounds:yu,boundingClientRect:o||yu,intersectionRect:yu,visibleTime:r.lastVisible.unixTime,duration:Ul(i,r.lastVisible.highResTime),target:e.target},r),r.lastSatisfied=!1,r.visible=!1,r.lastEntry=null}))},e.prototype.handleThresholdExiting=function(e,t){var n=e.highResTime,i=!!t.threshold.time;t.lastSatisfied&&(!i||i&&t.visible)&&(e.duration=Ul(n,t.lastVisible.highResTime),e.visibleTime=t.lastVisible.unixTime,e.entering=!1,t.visible=!1,this.queuedEntries.push(e)),clearTimeout(t.timeoutId)},e.prototype.handleObserverEntry=function(e){var t=this,n=e.target,i=this.recordStore[n.__spanielId];i&&(i.lastSeenEntry=e,this.paused||(i.thresholdStates.forEach((function(n){var i=!!n.threshold.time,r=t.generateSpanielEntry(e,n),o=e.intersectionRatio>=n.threshold.ratio,s="boolean"==typeof r.isIntersecting?r.isIntersecting:Ml(e),a=o&&s;if(a!=n.lastSatisfied){if(a)if(r.entering=!0,n.lastVisible={highResTime:r.highResTime,unixTime:r.unixTime},i){var c=Number(setTimeout((function(){n.visible=!0,r.duration=Ul(performance.now(),n.lastVisible.highResTime),r.visibleTime=n.lastVisible.unixTime,t.callback([r])}),n.threshold.time));n.timeoutId=c}else n.visible=!0,r.duration=Date.now()-n.lastVisible.unixTime,t.queuedEntries.push(r);else t.handleThresholdExiting(r,n);n.lastEntry=e,n.lastSatisfied=a}})),this.flushQueuedEntries()))},e.prototype.disconnect=function(){this.setAllHidden(),this.observer.disconnect(),this.recordStore={}},e.prototype.destroy=function(){this.disconnect(),Vl.hasDOM&&(hu("beforeunload",this.onWindowClosed),hu("hide",this.onTabHidden),hu("show",this.onTabShown))},e.prototype.unobserve=function(e){var t=this,n=this.recordStore[e.__spanielId];n&&(delete this.recordStore[e.__spanielId],this.observer.unobserve(e),fu((function(){t.handleRecordExiting(n),t.flushQueuedEntries()})))},e.prototype.observe=function(e,t){var n=e,i=n.__spanielId=n.__spanielId||nu();return this.recordStore[i]={target:n,payload:t,lastSeenEntry:null,thresholdStates:this.thresholds.map((function(e){return{lastSatisfied:!1,lastEntry:null,threshold:e,visible:!1,lastVisible:{unixTime:0,highResTime:-1}}}))},this.observer.observe(n),i},e}();Vl.IntersectionObserver&&Vl.IntersectionObserver;class Eu{constructor(e){let{thresholds:t,root:n=null,rootMargin:i="0px",componentList:r=[],observeOnce:o=!1,trailingTrackingEnabled:s=!1,deferInitialTracking:a=!1,getElementPayload:c,onImpression:l=(()=>{}),onObservation:u=(()=>{}),onUnobservation:d=(()=>{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.root=n,this.thresholds=t||[{label:"impressed",time:1e3,ratio:.5}],this.rootMargin=i,this.trackingInstance=e,this.trailingTrackingEnabled=s,this._getElementPayload=c,this._onImpression=l,this._onObservation=u,this.observeOnce=o,this._onUnobservation=d;const h={root:this.root,rootMargin:this.rootMargin,threshold:this.thresholds};this.spanielObserverInstance=new bu(this._handleObservedNodes.bind(this),h),!a&&this.observeComponents(r)}observeComponents(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.spanielObserverInstance&&e.forEach((e=>{const t=this._getElementPayload?this._getElementPayload(e):{};this.spanielObserverInstance.observe(e,t),this._onObservation(e)}))}unobserveComponents(){(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{this.spanielObserverInstance.unobserve(e),this._onUnobservation(e)}))}_handleOnImpression(e){this._onImpression({trackingInstance:this.trackingInstance,visibleElements:e}),this.observeOnce&&this.unobserveComponents(e.map((e=>{let{target:t}=e;return t})))}_handleObservedNodes(e){if(this.spanielObserverInstance){const t=e.filter((e=>this.trailingTrackingEnabled?!e.entering:e.entering&&e.boundingClientRect.width>0&&e.boundingClientRect.height>0));t.length>0&&this._handleOnImpression(t)}}reset(){this.spanielObserverInstance.disconnect()}destroy(){this.spanielObserverInstance.destroy()}static fireImpressionEvent(e,t,n,i){let r=e.payload||{};r.visibleTime=e.time-e.duration,r.duration=e.duration,r.size={width:e.boundingClientRect.width,height:e.boundingClientRect.height},r=i?i(r):r,t.fireTrackingEvent(n,r)}}const wu="show-more-less";".".concat(wu,"__list"),".".concat(wu,"__more-button"),".".concat(wu,"__less-button"),"".concat(wu,"__list--hide-after"),"".concat(wu,"__button--hide");const _u="accordion-item__trigger";".".concat(_u);const Su=350,Tu="sticky-header--disabled",Cu="body--sticky-header-disabled";class ku{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.querySelector(".".concat("sticky-header")),{marginApplied:t=!0,disableUnderMinimumViewportHeight:n=!1,minimumViewportHeight:i=Su}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw Error("A header element is required to instantiate a StickyHeader");if(!e.querySelector("nav"))throw Error("The header must contain a 'nav' element in order to instantiate a StickyHeader");let r=8;if(ko()){const t=e.querySelector(".search-bar");t&&(r=t.getBoundingClientRect().height)}return this.stickyHeader=e,this.stickyElementOptions={exposeStickyState:!0,isBottom:!1,marginApplied:t,scrollThreshold:r},n&&i>0?this.setupDisableUnderMinimumViewportHeight(i):this.instantiateStickyElement(),this.stickyElement}instantiateStickyElement(){!0===La("isClsFixActive")||document.body.classList.add("body--sticky-header"),this.stickyElement=new Ua(this.stickyHeader,this.stickyElementOptions)}setupDisableUnderMinimumViewportHeight(e){const t="(min-height: ".concat(e,"px)"),n=window.matchMedia(t);n.addEventListener("change",this.handleMediaQueryChange.bind(this)),this.handleMediaQueryChange(n)}handleMediaQueryChange(e){var t;e.matches?(this.stickyHeader.classList.remove(Tu),document.body.classList.remove(Cu),this.stickyElement?this.stickyElement.reactivate():this.instantiateStickyElement()):(this.stickyHeader.classList.add(Tu),document.body.classList.add(Cu),null===(t=this.stickyElement)||void 0===t||t.deactivate())}}const Iu=["options","optionsV2"];function Au(e){return t=>t.type&&t.type.toLowerCase()===e.toLowerCase()}const Lu="BLOCK_PROFILE",Ou=Au("action"),Ru=Au("openpage"),Nu=Au("openlink"),xu=e=>Ou(e)&&e.action.actionType===Lu;function Pu(e){const t=function(e){const t=(e.type?e.type:e).toLowerCase().split("_"),n=[];n.push(t.splice(0,1));for(const e of t)n.push(e[0].toUpperCase()+e.slice(1));return n.join("")}(e),n=t.toLowerCase();return{[n]:Le({},e[t]),type:n}}class Mu{constructor(e){this.optionStack=[],this.semaphoreJson=e.constructor==={}.constructor?e:JSON.parse(e)}getNextStep(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=this.semaphoreJson,{options:n,optionsV2:i}=t,r=Re(t,Iu);if(n&&!(this.optionStack.length>=r.numberOfSteps)){if(e===Lu){let e=n.find((e=>Ou(e)&&e.action.type===Lu));if(!e)return;e=JSON.parse(JSON.stringify(e)),e.action.actionType=Lu;const t=[e];return this.optionStack.push(Le({options:t.map((e=>Pu(e))),heading:r.blockConfirmationScreen.heading},r)),this.optionStack[this.optionStack.length-1]}if(e){const t=this.optionStack.length;if(0===t)return;const n=this.optionStack[t-1].options.find((t=>t[t.type].title===e));if(!n)return;if(Ru(n))return Le(Le({},n),r);const i=Le({options:n[n.type].options.map((e=>Pu(e)))},r);n[n.type].heading&&(i.heading=n[n.type].heading),this.optionStack.push(i)}else n=[...n,...i],this.optionStack.push(Le({options:n.map((e=>Pu(e)))},r));return this.optionStack[this.optionStack.length-1]}}getPreviousStep(){if(this.optionStack.length>1)return this.optionStack.pop(),this.optionStack[this.optionStack.length-1]}hasPreviousStep(){return this.optionStack.length>1}getCurrentStep(){return this.optionStack[this.optionStack.length-1]}findAction(e){const t=this.optionStack[this.optionStack.length-1].options;if(!t)return;const n=t.find((t=>Ou(t)&&t[t.type].title===e));return n&&n.action}}const Du="hidden";class Uu extends io{constructor(e){super(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}),this.titleEl=this._el.querySelector(".semaphore-modal__title"),this.contentEl=this._el.querySelector(".semaphore-modal__content"),this.footer=this._el.querySelector(".modal__footer"),this.submitBtn=this.footer.querySelector('[data-semaphore-action="submit"]')}setTitle(e){this.titleEl.textContent=e}setContent(e){this.contentEl.appendChild(e)}hideFooter(){this.footer.classList.add(Du)}showFooter(){this.footer.classList.remove(Du)}enableSubmit(){this.submitBtn.disabled=!1}disableSubmit(){this.submitBtn.disabled=!0}hideSubmit(){this.disableSubmit(),this.submitBtn.classList.add(Du)}showSubmit(){this.enableSubmit(),this.submitBtn.classList.remove(Du)}querySelector(e){return this._el.querySelector(e)}clearContent(){for(this.disableSubmit();this.contentEl.firstChild;)this.contentEl.removeChild(this.contentEl.firstChild)}close(){this.clearContent(),super.close()}}class Bu{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'[data-item-type="semaphore"]',t=arguments.length>1?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},i=arguments.length>3?arguments[3]:void 0;this.semaphoreSelector=e,this.parentContainer=t||document;const r=this.parentContainer.querySelector(e);if(r){this.semaphoreTrackingPrefix=r.dataset.semaphoreTrackingPrefix;const e=this.parentContainer.querySelector("#semaphore-modal");this.semaphoreModal=new Uu(e,{focusElement:i}),this.submitActionCallBack=n,this.parentContainer?(this.parentContainer.addEventListener("click",this.semaphoreClickHandler.bind(this)),e.addEventListener("click",this.clickHandler.bind(this))):(document.body.removeEventListener("click",this.clickHandler),document.body.addEventListener("click",this.clickHandler.bind(this)))}}clickHandler(e){const t=S(e.target,"[data-semaphore-input]");if(t){if(t.href)return e.preventDefault(),void window.open(t.href,"_blank");"semaphore-action"===t.name&&(this.semaphoreModal.showFooter(),this.semaphoreModal.showSubmit())}if("back"===e.target.dataset.semaphoreAction){const e=this.semaphoreConfigParser.getPreviousStep();return void(e?(this.renderSemaphoreOptions(e),this.refreshLazyLoader(),this.semaphoreModal.open()):this.semaphoreModal.close())}if("submit"===e.target.dataset.semaphoreAction){let t=this.semaphoreModal.querySelector("[data-semaphore-input]:checked");if(t){const n=this.semaphoreConfigParser.findAction(t.value);n&&this.sendAction(n).finally((()=>{this.renderThanks(this.semaphoreConfigParser.getCurrentStep().resultScreen),this.submitActionCallBack(e)}))}}let n=S(e.target,"[data-semaphore-item]");if(n&&"action"!==n.dataset.semaphoreItem){const t=n.querySelector('[data-attr="title"]');if(t){const n=this.semaphoreConfigParser.getNextStep(t.textContent);n&&(Ru(n)?(this.renderThanks(n.resultScreen),this.submitActionCallBack(e)):this.renderSemaphoreOptions(n),this.refreshLazyLoader(),this.semaphoreModal.open())}}else{if(n&&n.dataset.semaphoreType===Lu){const e=this.semaphoreConfigParser.getNextStep(Lu);e&&this.renderSemaphoreOptions(e)}this.parentContainer||this.semaphoreClickHandler(e)}}semaphoreClickHandler(e){let t=S(e.target,this.semaphoreSelector);t&&t.dataset.semaphoreContentType&&t.dataset.semaphoreContentUrn&&"true"===t.dataset.isLoggedIn&&(e.preventDefault(),this.makeSemaphoreRequest(t.dataset.semaphoreContentUrn,t.dataset.semaphoreContentType,t.dataset.semaphoreAuthorProfileId,t.dataset.semaphoreAuthorUrn).then((e=>{this.semaphoreConfigParser=new Mu(e);const t=this.semaphoreConfigParser.getNextStep();if(t){this.renderSemaphoreOptions(t),this.refreshLazyLoader(),this.semaphoreModal.open();const e=document.querySelector(".top-level-modal-container .modal__dismiss");null==e||e.focus()}})))}renderSemaphoreOptions(e){this.semaphoreModal.clearContent();const t=this.parentContainer.querySelector("#semaphore-container-template").content.firstElementChild.cloneNode(!0);let n=!1,i=!1,r=!1;e.options.forEach((o=>{let s=o.type;Nu(o)&&!i&&(i=!0),Ou(o)&&(n||(n=!1===o[s].nonRadioOptionEnabled),s=xu(o)?"block":o[s].nonRadioOptionEnabled?s:"".concat(s,"-radio"));const a=this.parentContainer.querySelector("#semaphore-".concat(s,"-template")).content.firstElementChild.cloneNode(!0),c=o[o.type],l=a.querySelector('[data-attr="title"]');if(l&&(l.textContent=c.title),c.type&&(a.dataset.semaphoreType=c.type),Ou(o)){if(xu(o)){r=!0;const t="".concat(e.blockConfirmationScreen.firstLine," \n ").concat(e.blockConfirmationScreen.secondLine);a.querySelector('[data-attr="block-content"]').textContent=t}a.querySelector("[data-semaphore-input]").value=c.title}const u=a.querySelector('[data-attr="body"]');u&&(c.body?u.textContent=c.body:u.remove()),c.url&&(a.querySelector("[data-semaphore-input]").href=c.url),a.querySelector("[data-semaphore-input]").dataset.trackingControlName=c.trackingId,t.appendChild(a)})),this.semaphoreModal.setContent(t),this.semaphoreModal.setTitle(e.heading||e.headings.whyReportingThis),this.semaphoreConfigParser.hasPreviousStep()?(this.semaphoreModal.showFooter(),r&&this.semaphoreModal.showSubmit()):this.semaphoreModal.hideFooter(),i&&this.semaphoreModal.hideSubmit()}renderThanks(e){this.semaphoreModal.hideFooter(),this.semaphoreModal.clearContent(),this.semaphoreModal.setTitle(e.title);const t=this.parentContainer.querySelector("#semaphore-result-template").content.firstElementChild.cloneNode(!0);t.querySelector('[data-attr="thanks-text-body"]').textContent=e.messageBody.body;let n=t.querySelector('[data-attr="thanks-help-center-link"]');n.textContent=e.messageBody.helpCenterText,n.href=this.addTrackingCode(e.messageBody.helpCenterLink);const i=document.createElement("div");i.appendChild(t),this.semaphoreModal.setContent(i)}addTrackingCode(e){return x(e,this.semaphoreTrackingPrefix)}sendAction(e){return we(e.actionUrl,{method:e.actionUrlRequestType,postData:e.actionPostData})}makeSemaphoreRequest(e,t,n,i){let r=P("/psettings/flagging-menu","entityUrn",e);return r=P(r,"contentSource",t),n?r=P(r,"authorProfileId",n):i&&(r=P(r,"authorUrn",i)),we(r).then((e=>200===e.status?e.responseText:"{}")).catch((()=>"{}"))}refreshLazyLoader(){window.lazyloader&&window.lazyloader.then((e=>{e.refreshLoader()}))}}class qu{constructor(e){if(!e)throw new Error("EllipsisMenu el required");this._el=e,this.currentMenuItem=this._el.querySelector(".ellipsis-menu__item-button");const t=this._el.querySelector(".collapsible-dropdown");if(!t)throw new Error("A collapsible dropdown is required to instantiate an EllipsisMenu");this.collapsibleDropdown=new Ee(t,{elementToFocus:this.currentMenuItem});this._el.querySelector(".ellipsis-menu__semaphore")&&(this._semaphore=new Bu('[data-item-type="semaphore"]',t))}}var Fu;!function(e){e.ProductName="productName",e.UntrackedResponseCodes="untrackedResponseCodes",e.TrackedResponseCodes="trackedResponseCodes",e.ClientSensorGroupName="clientSensorGroupName"}(Fu||(Fu={}));new Set(Object.values(Fu));class Hu extends Error{constructor(e){super(e),Object.setPrototypeOf(this,Hu.prototype)}}var Gu;!function(e){e.ProductName="productName",e.CustomTrackingId="customTrackingId",e.ClientSensorGroupName="clientSensorGroupName",e.AdditionalDegradedResponseCodes="additionalDegradedResponseCodes",e.NonDegradedResponseCodes="nonDegradedResponseCodes",e.DegradationKeyOverrides="degradationKeyOverrides"}(Gu||(Gu={})),new Set(Object.values(Gu));var ju={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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}function r(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 i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(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){r(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 a(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&&l(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(){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=u()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&l(r,n.prototype),r},d.apply(null,arguments)}function h(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function p(e){var t="function"==typeof Map?new Map:void 0;return p=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}}),l(n,e)},p(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?f(e):t}function g(e){return function(){var t,n=c(e);if(u()){var i=c(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return m(this,t)}}function v(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,i){e=n,t=i}));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],i=0,r=n.length;i<r;i++)if(n[i]===t)return void n.splice(i,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,i=t.length;n<i;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"},_="https://accounts.google.com",S={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"},C={SIGN_IN:"signin",SIGN_UP:"signup",USE:"use"},k={DISPLAY:"display",SKIPPED:"skipped",DISMISSED:"dismissed"},I={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",L="https://www.linkedin.com/redirect",O="https://www.linkedin-ei.com/redirect",R={DISMISSED:"DISMISSED",INITIALIZED:"INITIALIZED",SNAPPLE_USER_FETCHED:"SNAPPLE_USER_FETCHED"},N={signin:{GOT:"signin",GSI_BUTTON:"signin_with"},signup:{GOT:"signup",GSI_BUTTON:"signup_with"},use:{GOT:"use",GSI_BUTTON:"continue_with"}},x=w.GOOGLE_ERROR,P=w.GOOGLE_USER_FETCHED,M=w.INITIALIZED,D=S.INITIALIZATION,U=S.AUTHENTICATION,B=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.libSrcPath,s=e.el,a=e.clientId,c=void 0===a?E:a;if(t(this,r),i=n.call(this),!s)throw TypeError("DOM element for Sign In button is required");if(i.libSrcPath=o,i.el=s,i.clientId=c,window.gapi)i._initializeGoogleAuth();else{if(!o)throw TypeError("Google Sign In lib not already loaded on the page. libSrcPath is required to load the lib.");v((function(){y(o,i._initializeGoogleAuth.bind(f(i)))}))}return i}return i(r,[{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(M);e.dispatchEvent(n)})).catch((function(t){var n={type:D,message:t.error},i=new CustomEvent(x,{detail:n});e.dispatchEvent(i)}))}},{key:"_attachSignIn",value:function(){var e=this;this.auth2.attachClickHandler(this.el,{},(function(t){var n=new CustomEvent(P,{detail:e._getGoogleUserInformation(t)});e.dispatchEvent(n)}),(function(t){var n={type:U,message:t.error},i=new CustomEvent(x,{detail:n});e.dispatchEvent(i)}))}},{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()}}}]),r}(p(EventTarget)),q=w.GOOGLE_USER_FETCHED,F=w.PROMPT_MOMENT,H=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.autoSelect,s=void 0!==o&&o,a=e.libSrcPath,c=e.containerId,l=e.context,u=e.clientId,d=void 0===u?E:u,h=e.cancelOnTapOutside,p=void 0===h||h;if(t(this,r),i=n.call(this),!l)throw TypeError("context param is required to determine the message to show in Google One Tap");if(i.autoSelect=s,i.libSrcPath=a,i.containerId=c,i.cancelOnTapOutside=p,i.clientId=d,i.context=l,window.google&&window.google.accounts&&window.google.accounts.id)i._onGoogleApiLoad();else{if(!a)throw TypeError("Google One Tap lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(a,i._onGoogleApiLoad.bind(f(i)))}))}return i}return i(r,[{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===C.SIGN_UP?this._getBasicProfile(t):{idToken:t};if(n){n.selectedBy=e.select_by;var i=new CustomEvent(q,{detail:n});this.dispatchEvent(i)}}},{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:I.SKIPPED.ISSUING_FAILED,type:k.SKIPPED},n=new CustomEvent(F,{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()},i=new CustomEvent(F,{detail:n});e.dispatchEvent(i),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")}}}]),r}(p(EventTarget)),G={exports:{}},j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function z(e){this.message=e}function W(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new z("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(n=r%4?64*n+i:i,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)i=j.indexOf(i);return s}z.prototype=new Error,z.prototype.name="InvalidCharacterError";var K="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||W;function V(e){return decodeURIComponent(K(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}var Y=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 V(t)}catch(e){return K(t)}};function Q(e){this.message=e}Q.prototype=new Error,Q.prototype.name="InvalidTokenError",G.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(Y(e.split(".")[n]))}catch(e){throw new Q("Invalid token specified: "+e.message)}},G.exports.InvalidTokenError=Q;var J=G.exports,X=w.GOOGLE_USER_FETCHED,Z=w.PROMPT_MOMENT,$=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.autoSelect,s=void 0!==o&&o,a=e.libSrcPath,c=e.clientId,l=void 0===c?E:c,u=e.showOneTap,d=void 0===u||u,h=e.promptParentId,p=e.buttonParentEl,m=e.gsiButtonConfig,g=void 0===m?{}:m,w=e.context,_=void 0===w?"signin":w,S=e.cancelOnTapOutside,T=void 0===S||S;if(t(this,r),(i=n.call(this)).autoSelect=s,i.libSrcPath=a,i.clientId=l,i.showOneTap=d,i.promptParentId=h,i.buttonParentEl=p,i.gsiButtonConfig=g,i.cancelOnTapOutside=T,i.context=_,i.isLibraryLoaded=b(),window.google&&window.google.accounts&&window.google.accounts.id)i._onGoogleApiLoad();else{if(!a)throw TypeError("GSI lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(a,i._onGoogleApiLoad.bind(f(i)))}))}return i}return i(r,[{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:N[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,i=t.logo_alignment,r=void 0===i?"center":i,o=t.shape,s=void 0===o?"pill":o,a=t.size,c=void 0===a?"large":a,l=t.text,u=t.theme,d=t.type,h=t.width,p=void 0===h?"400px":h;return this.isLibraryLoaded.then((function(){var t=l||N[n.context].GSI_BUTTON;window.google.accounts.id.renderButton(e,{logo_alignment:r,shape:s,size:c,text:t,theme:u,type:d,width:p})}))}},{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()},i=new CustomEvent(Z,{detail:n});e.dispatchEvent(i),e.checkIfDesktopAndApplyClass()}))}))}},{key:"_handleCredentialResponse",value:function(e){var t=e.credential,n=e.select_by,i=J(t),r=s({},this._getBasicProfile(i),{idToken:t,selectedBy:n});if(r){var o=new CustomEvent(X,{detail:r});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")}}}]),r}(p(EventTarget)),ee=R.DISMISSED,te=R.INITIALIZED,ne=R.SNAPPLE_USER_FETCHED,ie=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.libSrcPath,s=e.snappleCTA,a=e.clientId,c=void 0===a?A:a,l=e.redirectURI;if(t(this,r),i=n.call(this),!s)throw TypeError("snappleCTA is required. Please pass the correct CTA element to this Snapple Constructor");if(i.libSrcPath=o,i.clientId=c,i.redirectURI=i._getRedirectURL(l),i.snappleCTA=s,window.AppleID&&window.AppleID.auth&&window.AppleID.auth.init)i._onSnappleLibLoad();else{if(!o)throw TypeError("Snapple lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(o,i._onSnappleLibLoad.bind(f(i)))}))}return i}return i(r,[{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?L:O}}]),r}(p(EventTarget)),re={CLIENT_ID:E,EVENTS:w,GOOGLE_ACCOUNT_URL:_,GSI_ERROR_TYPES:S,GSI_ERROR_MESSAGES:T,GOT_CONTEXTS:C,GOT_PROMPT_MOMENT_REASONS:I,GOT_PROMPT_MOMENT_TYPES:k};e.GoogleGsi=$,e.GoogleOneTap=H,e.GoogleSignIn=B,e.GoogleSignInConstants=re,e.SnappleAuth=ie,e.SnappleEvents=R,Object.defineProperty(e,"__esModule",{value:!0})})(ju.exports);const{EVENTS:zu,GOT_CONTEXTS:Wu,GOT_PROMPT_MOMENT_REASONS:Ku,GOT_PROMPT_MOMENT_TYPES:Vu}=ju.exports.GoogleSignInConstants,{GOOGLE_USER_FETCHED:Yu,PROMPT_MOMENT:Qu}=zu,{SIGN_IN:Ju}=Wu,Xu=[Ku.NOT_DISPLAYED.BROWSER_NOT_SUPPORTED,Ku.NOT_DISPLAYED.OPT_OUT_OR_NO_SESSION,Ku.NOT_DISPLAYED.SUPPRESSED_BY_USER],Zu=[Ku.SKIPPED.AUTO_CANCEL,Ku.SKIPPED.TAP_OUTSIDE,Ku.SKIPPED.USER_CANCEL],$u=Object.freeze({ONE_TAP:"one_tap",ONE_TAP_AUTO_LOGIN:"one-tap-auto-login",BUTTON:"button"});class ed{constructor(e){var t;let{clientId:n,globalWindow:i=window,onNotDisplayed:r,onSkipped:o}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.buttons=Array.from(document.querySelectorAll(".google-auth-button__placeholder")),this.clientId=n,this.isLinkedInAppWebView=!0===La("isLinkedInAppWebView"),this.el=e,this.showOneTap=!(null===(t=this.el)||void 0===t||!t.querySelector("#google-one-tap__container")||this.isLinkedInAppWebView),(this.buttons.length||this.showOneTap&&this.el)&&(this.useAutoSelect=!0===La("enableGoogleAutoSelect")&&this._shouldAutologin(),this.window=i,this.onNotDisplayed=r,this.onSkipped=o,this.loader=new Wa(this.el.querySelector(".loader"),this.el),this._initGoogleAuth())}_initGoogleAuth(){return this.window.lazyloader.then((e=>e.getLazyLoadedJavascriptModule("google-gsi-lib"))).then((()=>{const e=La("googleAuthLibraryPath");if(e)return this.googleGsiInstance=new ju.exports.GoogleGsi({autoSelect:this.useAutoSelect,cancelOnTapOutside:!1,clientId:this.clientId,context:Ju,libSrcPath:wa.sanitizeUrl(e),promptParentid:this.showOneTap?"google-one-tap__container":void 0,showOneTap:this.showOneTap}),this._initButtons(),this.googleGsiInstance.addEventListener(Yu,(e=>{let{detail:t}=e;const{email:n,familyName:i,givenName:r,idToken:o,imageUrl:s,selectedBy:a}=t;this.loader.show();const c=this._getRequestType(a);this._addGoogleFieldToForm("googleGivenName",r),this._addGoogleFieldToForm("googleIdToken",o),this._addGoogleFieldToForm("googleFamilyName",i),this._addGoogleFieldToForm("googleImageUrl",s),this._addGoogleFieldToForm("googleEmail",n),this._addGoogleFieldToForm("soogleLoginRequestType",c),this._addGoogleFieldToForm(Ol,Ll());const l=c===$u.BUTTON?"google-sign-in--account-selected":"google-one-tap--account-selected";this._fireControlInteractionEvent(l),this.el.submit()})),this.googleGsiInstance.addEventListener(Qu,(e=>{let{detail:t}=e;const{reason:n,type:i}=t;let r="google-one-tap-moment--".concat(i);if(r=n?"".concat(r,"-").concat(n):r,this._fireControlInteractionEvent(r),n){if(this._fireCounterIngraphMetric(i,n),i===Vu.SKIPPED){if(n===Ku.SKIPPED.USER_CANCEL&&this._fireControlInteractionEvent("google-one-tap--user-dismissed"),this.onSkipped)this.onSkipped(t);else if(-1===Zu.indexOf(n))throw Error("GoogleOneTapError ".concat(i,": ").concat(n))}else if(i===Vu.DISPLAY)if(this.onNotDisplayed)this.onNotDisplayed(t);else if(-1===Xu.indexOf(n))throw Error("GoogleOneTapError ".concat(i,": ").concat(n))}else i===Vu.DISPLAY&&this._fireViewModuleImpressionEvent("google-one-tap")})),this.googleGsiInstance}))}_fireCounterIngraphMetric(e,t){let n="";e===Vu.DISPLAY&&t===Ku.NOT_DISPLAYED.OPT_OUT_OR_NO_SESSION?n="GoogleAuthDisabledOrNoSessionError":(Zu.indexOf(t)>=0||Xu.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=>{Kr(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 $u.ONE_TAP_AUTO_LOGIN;case e.indexOf("user")>-1:return $u.ONE_TAP;default:return $u.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!==D("li_g_recent_logout"))}}class td{constructor(){let{typeaheadApiBaseUrl:e,stickyHeaderOptions:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=document.querySelector(".search-bar");n&&(this.searchBar=new wc(n,{typeaheadApiBaseUrl:e}));const i=document.querySelector(".language-selector");i&&(this.languageSelector=new Te(i));document.querySelector(".sticky-header")&&new ku(void 0,t),document.querySelector(".member-nav-menu")&&new so}}const nd="filter-values-container__filter-value";".".concat(nd," input"),".".concat(nd," input[type=radio]:checked");class id{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},{enablePageViewTracking:i=!1,shouldHideModal:r=(()=>!1),triggerByOutletEl:o=!0,focusElement:s,pageKey:a}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)throw new Error("No element passed into to dialog modal");this.el=e,this.modalEl=this.el.querySelector(".".concat($r)),this.modal=new Tc(this.modalEl,{enablePageViewTracking:i,shouldHideModal:r,triggerByOutletEl:o,focusElement:s,pageKey:a}),this._onPrimaryActionClick=t,this.primaryActionBtn=this.el.querySelector(".primary-action"),this.secondaryActionBtn=this.el.querySelector(".secondary-action"),n&&(this._onSecondaryActionClick=n),this.el.querySelector(".dialog-actions").addEventListener("click",this._actionHandler.bind(this))}_actionHandler(e){const t=e.target;if(this.primaryActionBtn&&this.primaryActionBtn.contains(t)){if(this.primaryActionBtn.disabled)return;this._onPrimaryActionClick&&this._onPrimaryActionClick(e)}else this.secondaryActionBtn&&this.secondaryActionBtn.contains(t)&&this._onSecondaryActionClick&&this._onSecondaryActionClick(e);this.modal.close()}}const rd="bottom-sheet-open",od="aria-hidden";function sd(e,t){Ws(e,t,{ADD_TAGS:["link"]})}class ad{constructor(){let{bottomSheetEl:e,pushState:t=!0,enabledPageViewTracking:n,shouldHideModal:i}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.bottomSheetEl=e||document.querySelector("#bottom-sheet"),!this.bottomSheetEl)throw new Error("Cannot instantiate bottom sheet without container");this._headerEl=this.bottomSheetEl.querySelector(".header-section"),this._titleEl=this.bottomSheetEl.querySelector(".title"),this._contentEl=this.bottomSheetEl.querySelector(".content"),this._footerEl=this.bottomSheetEl.querySelector(".footer"),this.modalInstance=new Tc(this.bottomSheetEl,{enabledPageViewTracking:n,shouldHideModal:i,pushState:t,triggerByOutletEl:!1}),this._hideBottomSheet=this._hideBottomSheet.bind(this),this._attachEventListeners()}_hideBottomSheet(){Ro(this.bottomSheetEl),this.bottomSheetEl.removeEventListener("transitionend",this._hideBottomSheet)}_attachEventListeners(){this.bottomSheetEl.addEventListener("click",(e=>{const t=e.target.closest("[data-action]");"close-bottom-sheet"===(t&&t.dataset.action)&&this.close()})),this.bottomSheetEl.addEventListener("close",(()=>{this.isOpen()&&setTimeout((()=>{this.bottomSheetEl.setAttribute(od,!0),this.bottomSheetEl.addEventListener("transitionend",this._hideBottomSheet),this.bottomSheetEl.classList.remove(rd)}),0)})),this.bottomSheetEl.addEventListener("open",(()=>{this.bottomSheetEl.setAttribute(od,!1),No(this.bottomSheetEl),window.requestAnimationFrame((()=>this.bottomSheetEl.classList.add(rd)))})),k.getInstance().addUnloadCallback((()=>{this.close()}))}setHeader(e){this._headerEl&&sd(this._headerEl,e)}setTitle(e){this._titleEl&&(this._titleEl.textContent=e)}setContent(e){sd(this._contentEl,e)}setFooter(e){this._footerEl&&sd(this._footerEl,e)}isOpen(){return this.bottomSheetEl.classList.contains(rd)}open(){!this.isOpen()&&this.modalInstance.open()}close(){this.isOpen()&&this.modalInstance.close()}}const cd="badgesreceived";class ld{constructor(){let{badgeSel:e="[data-badge-without-count-source]",badgeCountSel:t="[data-badge-source]",cacheBustHrefSel:n='[data-update-cache-bust-url="true"]'}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._counts={},this.badgeCountEls=document.querySelectorAll(t),this.badgeWithoutCountEls=document.querySelectorAll(e),this.cacheBustHrefEls=document.querySelectorAll(n),this.feedLastUpdatedTimeInDom=La("feedLastUpdatedTime")}resetBadges(){xo(this.badgeCountEls),xo(this.badgeWithoutCountEls)}getBadges(){const e=this.feedLastUpdatedTimeInDom||"";return we(e?P(_c,"feedQueryAfterTime",e):_c).then((t=>{const n=JSON.parse(t.responseText);U(window,cd,{feedsCount:n.feedsCount}),this._counts=n;const i=qo();return"messaging"===i&&(this._counts.messagingCount=0),"feed"===i||e||(this._counts.feedsCount=2),this._counts.feedsCount=this._counts.feedsCount>=2?1:0,this._counts.lastUpdatedAt=(new Date).getTime(),this._updateCacheBustUrl(this._counts.feedsCount>0),this._renderBadges(),this})).catch((()=>{U(window,cd,{feedsCount:0})}))}_renderBadges(){this.badgeCountEls.forEach((e=>{this._setBadgeCount(e,this._counts[e.dataset.badgeSource])})),this.badgeWithoutCountEls.forEach((e=>{this._setBadge(e,this._counts[e.dataset.badgeWithoutCountSource])}))}_setBadgeCount(e,t){if(!e)return;const n=e.innerHTML;null==n&&t>0?(e.textContent=t,No(e)):t!==n&&(t>0?(e.textContent=t,No(e),e.classList.toggle("singular",t<=1)):Ro(e))}_setBadge(e,t){e&&(t>0?(No(e),e.classList.add("badge-with-no-count")):Ro(e))}_updateCacheBustUrl(e){La("isSWCacheEnabled")&&this.cacheBustHrefEls&&this.cacheBustHrefEls.forEach((t=>{t.href=zs(e?P(t.href,"pwa","noCache"):F(t.href))}))}}!function(){let e}();const ud="_lastUpdatedAt";class dd{constructor(e){this.storage=void 0===e?localStorage:e}read(e){const t=this.storage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){console.error(e)}return null}write(e,t){try{this.storage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}}remove(e){try{this.storage.removeItem(e)}catch(e){console.error(e)}}readWithExpiry(e,t){const n=this.read(e+ud);return n&&(new Date).getTime()-n<t?this.read(e):(this.removeWithExpiry(e),null)}writeWithExpiry(e,t){this.write(e,t),this.write(e+ud,(new Date).getTime())}removeWithExpiry(e){this.remove(e),this.remove(e+ud)}}dd.instance||(dd.instance=new dd(localStorage)),dd.instance,dd.sessionInstance||(dd.sessionInstance=new dd(sessionStorage)),dd.sessionInstance;let hd;const pd="_self";function fd(){return hd||(hd=new Ia),hd}let md;k.getInstance().addUnloadCallback((()=>{md&&md.close(),Ro(document.querySelector("#discard-post-modal")),Ro(document.querySelector("#visibility-settings-modal")),Ro(document.querySelector("#max-images-prompt-modal")),Ro(document.querySelector("#retry-upload-modal"))}));function gd(){var e,t;null===(e=window.lazyloader)||void 0===e||null===(t=e.then)||void 0===t||t.call(e,(e=>{e.refreshLoader()}))}const vd="selected";function yd(e){const t=e.target.value;e.target.classList.toggle(vd,t),e.target.focus()}function bd(e){if(e){const{id:t,labelText:n}=e.dataset;if(!t||!n)throw new Error("mandatory fields missing.");const i=e.querySelector("select");i&&(i.addEventListener("change",yd),i.value&&i.classList.add(vd))}else{document.querySelectorAll(".dropdown-container").forEach(bd)}gd()}const Ed="input",wd="change",_d="focus",Sd="input:cleared",Td="selected";function Cd(e){const t=e.currentTarget.parentElement.querySelector(Ed);t.value="",t.classList.remove(Td),t.focus(),U(t,Sd),U(t,wd)}function kd(e){const t=e.currentTarget.parentElement,n=t.dataset.placeholder,i=t.querySelector(Ed);n&&i.setAttribute("placeholder",n),i.removeEventListener(_d,kd)}function Id(e){const t=e.target.value;e.target.classList.toggle(Td,t)}function Ad(e){if(e){const{id:t,labelText:n}=e.dataset;if(!t||!n)throw new Error("mandatory fields missing.");const i=e.querySelector(Ed),r=e.querySelector(".right");i.addEventListener(wd,Id),i.addEventListener(_d,kd),r&&r.addEventListener("click",Cd)}else{document.querySelectorAll(".input-container").forEach(Ad)}gd()}const Ld="MinLength",Od="MaxLength",Rd="Regex",Nd="Required",xd="RegexAllow",Pd={SPECIAL_CHARS:{pattern:/([!@#$%^&*+=|<>?:;\\])/,errorCode:"SpecialChars"},URL_KEYWORDS:{pattern:/(https?(:\/\/)?|www\.)/i,errorCode:"UrlKeywords"},EMAIL:{pattern:new RegExp('^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$'),errorCode:"Email"},PHONE_NUMBER:{pattern:/(?:^((\+(?=[0-9]{1,4}))?))[0-9]{5,14}$/,errorCode:"PhoneNumber"}},Md="EMAIL_ADDRESS",Dd="PHONE_NUMBER",Ud="OTHER",Bd="consentUnchecked",qd={INPUT:"INPUT",SELECT:"SELECT"},Fd="text",Hd="checkbox";function Gd(e){return Object.keys(qd).includes(e.tagName)}function jd(e){const t=function(e){const t=[],{minLength:n,maxLength:i,inputType:r}=e.dataset;let o;switch(r){case Ud:n&&t.push({type:Ld,MinLength:n}),i&&t.push({type:Od,MaxLength:i});break;case Md:t.push({type:xd,RegexAllow:[Pd.EMAIL]});break;case Dd:o=e.value.replace(/ /g,""),t.push({type:xd,RegexAllow:[Pd.PHONE_NUMBER]})}return{value:o||e.value,ruleSet:t}}(e),n=t.value;return t.ruleSet.map((e=>((e,t)=>{const n=t.trim();if(e)switch(e.type){case Nd:if(0===n.length)return Nd;break;case Ld:if(n.length<e[Ld])return Ld;break;case Od:if(n.length>e[Od])return Od;break;case Rd:for(let t=0;t<e[Rd].length;t++)if(e[Rd][t].pattern.test(n))return Rd+e[Rd][t].errorCode;break;case xd:for(let t=0;t<e[xd].length;t++)if(!e[xd][t].pattern.test(n))return xd+e[xd][t].errorCode}})(e,n))).filter((e=>!!e))}function zd(e,t){return t&&!e?Bd:null}const Wd=(e,t)=>parseInt(t.split(e)[1]);function Kd(e,t){return document.querySelector("#".concat(e.id,"-strings")).dataset["str".concat(t)]}const Vd=(e,t)=>({questionId:e,textQuestionAnswer:{answer:t}}),Yd=(e,t)=>({questionId:e,multipleChoiceAnswer:{options:[{index:t}]}});function Qd(e){const t=e.id+"_",n=t+"q",i=t+"c";return new Promise(((t,r)=>{const o=[];let s,a;const{urn:c}=e.dataset;a=e.dataset.leadTrackingParams,a||(s=e.closest("[data-lead-tracking-params]"),a=s.dataset.leadTrackingParams);const l={formResponse:{adFormUrn:c,submittedAt:Date.now(),answers:[],consentResponses:[]},trackingUrl:a,trackingAction:"LEAD_FORM_CLICK"};return Array.from(e).filter(Gd).forEach((e=>{let t;if(e.tagName===qd.SELECT)t=((e,t)=>{const n=Wd(e,t.id),i=t.selectedIndex;return{response:Yd(n,i)}})(n,e),l.formResponse.answers.push(t.response);else if(e.type===Fd)if(t=((e,t)=>{const n=Wd(e,t.id),i=jd(t);return 0!==i.length?{errors:i}:{response:Vd(n,t.value)}})(n,e),t.response)l.formResponse.answers.push(t.response);else{const n=t.errors[0];o.push({element:e,errorType:n})}else e.type===Hd&&(t=((e,t,n,i)=>{const r=Wd(e,t),o=zd(n,i);return o?{errors:o}:{response:{consentId:r,accepted:n}}})(i,e.id,e.checked,e.required),t.response?l.formResponse.consentResponses.push(t.response):o.push({element:e,errorType:t.errors}))})),0===o.length?t(l):r(o)}))}const Jd=".lead-gen-input-container",Xd=".error-text",Zd="input-error",$d="aria-invalid",eh="role",th="click";class nh{constructor(e){let{isLivePreview:t=!1,triggerByOutletEl:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("containerEl is not present");Ad(),bd(),Fo("form-modal-description__content-truncated",".form-modal-description__btn-truncation",e),this.containerEl=e,this.formEl=e.querySelector("form");const i=e.querySelector(".lead-gen-modal");this.modal=new Tc(i,{triggerByOutletEl:n,shouldMoveToTopContainer:!1}),t?this.showForm():this._bindEvents()}showForm(){this.modal.open()}hideForm(){this.modal.close()}_clearFormErrors(){Array.from(this.formEl).filter(Gd).map((e=>this._hideError(e)))}_submitForm(){this._clearFormErrors(),Qd(this.formEl).then((e=>{U(this.containerEl,this.constructor.LEAD_GEN_SUBMIT_EVENT,e),this.hideForm()})).catch((e=>{e.forEach((e=>this._setAndShowError(e.element,e.errorType)));const t=e[0];if(t){t.element.focus();le(Kd(t.element,t.errorType),ce.ASSERTIVE)}}))}_hideError(e){if(e){const t=e.closest(Jd),n=t.querySelector(Xd);Ro(n),t.classList.remove(Zd),e.removeAttribute($d),n.removeAttribute(eh)}}_setAndShowError(e,t){if(e){const n=Kd(e,t),i=e.closest(Jd),r=i.querySelector(Xd);r.innerText=n,No(r),i.classList.add(Zd),r.setAttribute(eh,"alert"),e.setAttribute($d,"true")}}_handleInputError(e){let t;if(this._hideError(e),e.type===Hd)t=zd(e.checked,e.required);else if(e.type===Fd){const n=jd(e);n&&n.length&&(t=n[0])}t&&this._setAndShowError(e,t)}_bindEvents(){this.formEl.addEventListener(th,(e=>{e.target.classList.contains("checkbox-input")&&this._handleInputError(e.target)})),this.formEl.addEventListener(Sd,(e=>{this._handleInputError(e.target)})),this.formEl.addEventListener("keyup",(e=>{e.target.classList.contains("inputbox-input")&&this._handleInputError(e.target)})),this.formEl.querySelector(".submit-btn").addEventListener(th,(e=>{e.preventDefault(),e.stopPropagation(),this._submitForm()}))}}Oe(nh,"LEAD_GEN_SUBMIT_EVENT","FormModal:LeadGen:submit");function ih(e,t){return e&&t?"urn:li:control:".concat(t,"-").concat(e):null}const rh="[data-feed-control]",oh='[data-id="main-feed-card"]';function sh(e,t){const n=e.target.closest(rh),i=e.target.closest(oh),r=t||(null==i?void 0:i.dataset);if(!n||!r)return;const{feedControl:o,feedActionCategory:s,feedActionType:a}=n.dataset,{activityUrn:c,feedItemTrackingId:l}=r;window.tracking&&window.tracking.then((e=>{let t;const n=La("trackingModuleKey"),i=G(document),r=Wr(i);t=Le({actionCategory:(null==s?void 0:s.toUpperCase())||"",actionType:a,controlUrn:ih(o,i),updateUrn:c,trackingId:l||e.generateBase64UUID(),moduleKey:n||"lite-feed:phone",requestId:""},r);try{var u,d;(null===(u=t)||void 0===u?void 0:u.actionCategory)&&(null===(d=t)||void 0===d?void 0:d.actionType)&&e.fireTrackingEvent("FeedActionEvent",t)}catch(e){}}))}var ah=Object.freeze({__proto__:null,fireFeedActionEvent:sh});class ch{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,{onSelect:t=(()=>{}),onClipboardCopy:n=(()=>{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.onSelect=t,this.onClipboardCopy=n;const i=La("share-via-text"),r=La("share-via-url");if(this.shareData={url:r},i&&(this.shareData.text=i),this.shareViaActionEl=e.querySelector("[data-share-via-action]"),!this.shareViaActionEl)throw new Error('Element with "data-share-via-action" attribute cannot be found');this.shareViaModalEl=e.querySelector(".share-via-modal"),this.shareViaModalEl&&(this.shareViaModal=new io(this.shareViaModalEl)),this.bindEvents()}modalClickHandler(e){const t=S(e.target,"[data-action-copy-to-clipboard]");t?(this.onSelect(e,t),this.copyToClipboard.call(this,e)):this.onSelect(e,S(e.target,".share-via-action")),this.shareViaModal.close()}share(){navigator.canShare&&navigator.canShare(this.shareData)?navigator.share(this.shareData):this.shareViaModal&&this.shareViaModal.open()}copyToClipboard(){navigator.clipboard.writeText(this.shareData.url).then((()=>{this.onClipboardCopy(!0)})).catch((e=>{this.onClipboardCopy(!1,e)}))}bindEvents(){this.shareViaActionEl.addEventListener("click",this.share.bind(this)),this.shareViaModalEl&&this.shareViaModalEl.addEventListener("click",this.modalClickHandler.bind(this))}}const lh=["endpoint","headers","queryId","variables","pageKey"];function uh(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{endpoint:t,headers:n={"Content-Type":"application/json"},queryId:i,variables:r={},pageKey:o}=e,s=Re(e,lh);return we(t,Le({method:"POST",headers:n,postData:JSON.stringify({queryId:i,variables:r,pageKey:o})},s))}const dh="FOLLOW_ACTIVE",hh="UNFOLLOW";class ph{constructor(e){if(!e)throw Error("Missing FollowMutation endpoint");this.endpoint=e}execute(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{};return uh({endpoint:this.endpoint,queryId:ph.query,variables:{followState:e,to:t}}).then((e=>{const{responseText:t}=e;n(JSON.parse(t).graphQL)})).catch(i)}}Oe(ph,"query","cbed571fffd8cea15209aed8d44e6759");const fh=Object.freeze({APPRECIATION:"APPRECIATION",ASSENT:"ASSENT",CELEBRATION:"CELEBRATION",EMPATHY:"EMPATHY",ENTERTAINMENT:"ENTERTAINMENT",INSPIRATION:"INSPIRATION",INTEREST:"INTEREST",LIKE:"LIKE",MAYBE:"MAYBE",PRAISE:"PRAISE",UNKNOWN:"UNKNOWN",USEFULNESS:"USEFULNESS"});Object.values(fh);const mh="CREATE",gh="DELETE",vh="UPDATE";class yh{constructor(e){if(!e)throw Error("Missing ReactionMutation endpoint");this.endpoint=e}execute(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const o={endpoint:this.endpoint,queryId:yh.query,variables:{entityUrn:t,action:n}};return n!==mh&&n!==vh||(o.variables.reactionType=e),uh(o).then((e=>{const{responseText:t}=e;i(JSON.parse(t).graphQL)})).catch(r)}}Oe(yh,"query","070ee23fd6fb77f92ac08f964ae1df29");const bh="REACT",Eh="UNREACT",wh=".reactions-menu",_h='[data-id="reactions-menu"]',Sh="[data-reaction-type]",Th=".selected-reaction",Ch=".like-button-default",kh="aria-pressed",Ih="aria-expanded",Ah="hidden",Lh="w-0",Oh="overflow-hidden",Rh=["relative","w-full","h-screen","no-scroll"],Nh="pointer-events-none",xh="click",Ph="touchstart",Mh="touchend";class Dh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"".concat(wh,"__trigger"),t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,{endpoint:n,beforeReaction:i,onReaction:r,onReactionSuccess:o=(()=>{}),onReactionError:s=(()=>{}),shouldStopPropagation:a=!0,reactionsMenuPageViewEvent:c,fireLoggedInReactionTracking:l=!1}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.triggerSelector=e,this.a11yTriggerSelector="".concat(e,"--a11y"),this.reactionsMenu=t.querySelector("#reactions-menu"),this.parentContainerElement=t,this._mutationInstance=new yh(n),this.selectedReactionTemplate=t.querySelector("#selected-reaction"),!this.reactionsMenu)throw new Error("Cannot find ReactionsMenu template");this.beforeReaction=i,this.onReaction=r,this.onReactionSuccess=o,this.onReactionError=s,this.shouldStopPropagation=a,this.reactionsMenuPageViewEvent=c,this.triggers=t.querySelectorAll(this.triggerSelector),this.reactionsMenuClickHandler=this.handleReactionsClick.bind(this),this.isTouchActive=!1,this.isA11yTriggerActive=!1,this.fireLoggedInReactionTracking=l,this.bindEvents()}bindEvents(){fe()?(this.parentContainerElement.addEventListener(Ph,(e=>{e.target.closest(this.triggerSelector)&&(this.longPressTimer=setTimeout((()=>{e.preventDefault(),this.showReactions(e),this.handleFocusForReactionEl(this.getTouchEventTarget(e)),this.isA11yTriggerActive=!1}),334))})),this.parentContainerElement.addEventListener("touchmove",(e=>{e.target.closest(this.triggerSelector)&&clearTimeout(this.longPressTimer),this.isTouchActive=!0,this.handleFocusForReactionEl(this.getTouchEventTarget(e))})),this.parentContainerElement.addEventListener(Mh,(e=>{e.target.closest(this.triggerSelector)&&clearTimeout(this.longPressTimer),setTimeout((()=>{this.isReactionMenuVisible()&&!this.isA11yTriggerActive&&this.reactionsMenuClickHandler(e)}),100)}))):this.triggers.forEach((e=>{e.addEventListener("mouseenter",M(this.showReactions.bind(this),300)),e.addEventListener("mouseleave",M((()=>{!e.parentElement.matches(":hover")&&this.hideReactions.call(this)}),500))})),this.parentContainerElement.addEventListener(xh,(e=>{if(e.target.closest(this.triggerSelector)){var t,n;const i=this.getContainerElement(e.target);null===(t=this.beforeReaction)||void 0===t||t.call(this,e),this.fireLoggedInReactionTracking&&this.fireReactionTracking(e),this.toggleReaction(i);const r=this.getCurrentReactionType(i);null===(n=this.onReaction)||void 0===n||n.call(this,e,r,this.getParentUrn(i)),this._mutationInstance.execute(r,this.getParentUrn(i),r?mh:gh,(e=>{this.onReactionSuccess(e)}),(e=>{this.onReactionError(e)}))}else e.target.closest(this.a11yTriggerSelector)&&(e.stopPropagation(),this.isA11yTriggerActive=!0,this.isReactionMenuVisible()?this.hideReactions(!1):this.showReactions(e))})),this.parentContainerElement.querySelectorAll(this.a11yTriggerSelector).forEach((e=>{e.addEventListener("focus",(e=>{e.target.classList.remove(Lh)})),e.addEventListener("blur",(e=>{!this.getContainerElement(e.target).querySelector(_h)&&e.target.classList.add(Lh)}))})),this.parentContainerEl!==document.body&&document.addEventListener(xh,(e=>{e.target.closest(this.a11yTriggerSelector)||this.hideReactions()}))}handleFocusForReactionEl(e){e?(e.focus(),e.classList.add("outline-none")):document.activeElement.blur()}getTouchEventTarget(e){const t=e.changedTouches[0];return S(document.elementFromPoint(t.clientX,t.clientY),Sh)}showReactions(e){if(!this.reactionsMenuEl){var t,n;let i=e.target;if(!e.target.classList.contains("reaction-menu")&&(i=this.getContainerElement(e.target),!i))return;this.renderReactionsMenu(i.querySelector(this.triggerSelector)),this.reactionsMenuPageViewEvent&&(null===(t=window.tracking)||void 0===t||t.then((e=>{zr(e,"half",this.reactionsMenuPageViewEvent)}))),fe()&&(this.isTouchActive=!0,!this.isA11yTriggerActive&&document.body.classList.add(Oh,Nh),document.documentElement.classList.contains("ios")&&document.body.classList.add(...Rh)),null===(n=this.a11yTriggerElement())||void 0===n||n.setAttribute(Ih,"true")}}hideReactions(){var e;let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.reactionsMenuEl){var n,i;if(this.reactionsMenuEl.removeEventListener(xh,this.reactionsMenuClickHandler),t)null===(n=this.getContainerElement(this.reactionsMenuEl))||void 0===n||null===(i=n.querySelector(this.a11yTriggerSelector))||void 0===i||i.classList.add(Lh);this.reactionsMenuEl.parentElement.removeChild(this.reactionsMenuEl),this.reactionsMenuEl=null}fe()&&(this.isA11yTriggerActive=!1,document.body.classList.remove(Oh,Nh,...Rh),document.removeEventListener(Ph,this.documentTouchStartHandler.bind(this)),document.removeEventListener(Mh,this.documentTouchEndHandler.bind(this))),null===(e=this.a11yTriggerElement())||void 0===e||e.setAttribute(Ih,"false")}isReactionMenuVisible(){return Boolean(this.reactionsMenuEl)}getActionType(e,t){return e&&t?t!==e?vh:null:t?mh:gh}fireReactionTracking(e){let t=e.target;if("touchend"===e.type){const n={},i=e.changedTouches[0],r=document.elementFromPoint(i.clientX,i.clientY);t=null==r?void 0:r.closest("[data-reaction-type]"),n.target=t,sh(n)}else sh(e);e.stopPropagation()}handleReactionsClick(e){var t,n;let i;var r;e.type===Mh?i=this.getTouchEventTarget(e):i=null===(r=e.target)||void 0===r?void 0:r.closest(Sh);if(null===(t=i)||void 0===t||null===(n=t.dataset)||void 0===n||!n.reactionType)return;const o=this.getContainerElement(e.target),s=this.getCurrentReactionType(o),a=this.getParentUrn(o);let c,l;if(i){var u,d,h,p;if(null===(u=this.beforeReaction)||void 0===u||u.call(this,e),this.fireLoggedInReactionTracking&&this.fireReactionTracking(e),this.setReaction(i.dataset.reactionType,o),null===(d=this.getContainerElement(o))||void 0===d||null===(h=d.querySelector(this.triggerSelector))||void 0===h||h.focus(),c=this.getCurrentReactionType(o),l=this.getActionType(s,c),l)null===(p=this.onReaction)||void 0===p||p.call(this,e,c,a),this._mutationInstance.execute(c,this.getParentUrn(o),l,(e=>{this.onReactionSuccess(e)}),(e=>{this.onReactionError(e)}));this.shouldStopPropagation&&e.stopPropagation()}}documentTouchStartHandler(e){e.target.closest(_h)&&e.target.closest(this.triggerSelector)?this.isTouchActive=!0:this.isTouchActive=!1}documentTouchEndHandler(){!this.isTouchActive&&setTimeout((()=>this.isReactionMenuVisible()&&!this.isA11yTriggerActive&&this.hideReactions()),100)}renderReactionsMenu(e){const t=this.reactionsMenu.content.firstElementChild.cloneNode(!0);t&&e&&(this.reactionsMenuEl=this.getContainerElement(e).appendChild(t),this.reactionsMenuEl.addEventListener(xh,this.reactionsMenuClickHandler),fe()&&(document.addEventListener(Ph,this.documentTouchStartHandler.bind(this)),document.addEventListener(Mh,this.documentTouchEndHandler.bind(this))))}maybeHideReactions(e){S(e.target,Sh)||this.hideReactions()}setReaction(e,t){const n="".concat(Th,"--").concat(e),i=this.selectedReactionTemplate.content.querySelector(n).cloneNode(!0),r=t.querySelector(Th),o=t.querySelector(Ch);r?r.remove():o.classList.add(Ah),t.querySelector(this.triggerSelector).setAttribute(kh,"true"),i.classList.add("selected-reaction"),o.parentElement.insertBefore(i,o),this.postReactionChangeCallback(e,t)}toggleReaction(e){const t=e.querySelector(Th),n=e.querySelector(Ch);if(t)return t.remove(),e.querySelector(this.triggerSelector).setAttribute(kh,"false"),n.classList.remove(Ah),void this.postReactionChangeCallback("",e);this.setReaction(fh.LIKE,e)}postReactionChangeCallback(e,t){const n=(e?"un".concat(e):"".concat(fh.LIKE)).toLowerCase()+"Update";this.hideReactions(),t.querySelector(this.triggerSelector).setAttribute("data-social-reaction",e),t.querySelector(this.triggerSelector).setAttribute("data-feed-action-type",n),t.querySelector(this.triggerSelector).setAttribute("data-feed-action-category",e?Eh:bh)}getCurrentReactionType(e){return e.querySelector(this.triggerSelector).dataset.socialReaction}getParentUrn(e){return e.querySelector(this.triggerSelector).dataset.parentUrn}getContainerElement(e){return e.closest(wh)}getContainerElementFromParentUrn(e){const t=this.parentContainerElement.querySelector("".concat(this.triggerSelector,'[data-parent-urn="').concat(e,'"]'));return null==t?void 0:t.closest(wh)}a11yTriggerElement(){return this.parentContainerElement.querySelector(this.a11yTriggerSelector)}}class Uh{constructor(e){let{endpoint:t,errorCallback:n=(()=>{}),globalWindow:i=window,onFollowSuccess:r=(()=>{}),onUnfollowSuccess:o=(()=>{})}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No element passed in");this._el=e,this._errorCallback=n,this._successCallbackForFollow=r,this._successCallbackForUnfollow=o,this._window=i,this._followButtonEl=e.querySelector(".follow-button__follow"),this._followingButtonEl=e.querySelector(".follow-button__following"),this._mutationInstance=new ph(t),this._entityUrn=e.getAttribute("data-entity-urn"),this._initEventListeners()}_initEventListeners(){this._followButtonEl.addEventListener("click",(e=>{e.preventDefault(),this._showFollowingButton(),this._mutationInstance.execute(dh,this._entityUrn,(e=>{this._successCallbackForFollow(e)}),(e=>{this._hideFollowingButton(),this._errorCallback(e)}))})),this._followingButtonEl.addEventListener("click",(e=>{e.preventDefault(),this._hideFollowingButton(),this._mutationInstance.execute(hh,this._entityUrn,(e=>{this._successCallbackForUnfollow(e)}),(e=>{this._showFollowingButton(),this._errorCallback(e)}))}))}_showFollowingButton(){var e,t,n,i;null===(e=this._followButtonEl)||void 0===e||null===(t=e.classList)||void 0===t||t.add("hidden"),null===(n=this._followingButtonEl)||void 0===n||null===(i=n.classList)||void 0===i||i.remove("hidden"),this._followingButtonEl.focus()}_hideFollowingButton(){var e,t,n,i;null===(e=this._followingButtonEl)||void 0===e||null===(t=e.classList)||void 0===t||t.add("hidden"),null===(n=this._followButtonEl)||void 0===n||null===(i=n.classList)||void 0===i||i.remove("hidden"),this._followButtonEl.focus()}}const Bh=Object.freeze({NEW_COMMENT_CREATE_EVENT:"Comment:newComment:create",NEW_COMMENT_SUCCESS_EVENT:"Comment:newComment:success",NEW_COMMENT_FAIL_EVENT:"Comment:newComment:fail"});class qh{constructor(){let{commentContainerClass:e="comments__container",commentBoxClass:t="comments__comment-text",postCommentBtnClass:n="comments__post-btn",templateSelector:i="#comment-template",templateSelectors:r={message:".comment__message",commentText:".comments__comment-text",postButton:".comments__post-btn"}}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.commentContainerClass=e,this.commentContainers=document.querySelectorAll(".".concat(e)),this.commentBoxClass=t,this.commentTextBoxen=document.querySelectorAll(".".concat(e," .").concat(t)),this.postCommentBtnClass=n,this.templateSelector=i,this.templateSelectors=r,this.containerMap={},this.bindEvents()}bindEvents(){this.commentContainers.forEach((e=>{e.addEventListener("click",this.postComment.bind(this))})),this.commentTextBoxen&&this.commentTextBoxen.forEach((e=>{e.addEventListener("input",this.enableDisablePostButton.bind(this))})),document.body.addEventListener(Bh.NEW_COMMENT_SUCCESS_EVENT,this.renderNewComment.bind(this))}postComment(e){if(e.target.classList.contains(this.postCommentBtnClass)){const t=e.target.closest(".".concat(this.commentContainerClass));if(t){const n=t.querySelector(".".concat(this.commentBoxClass));if(n){const t=n.dataset.threadUrn;t in this.containerMap||(this.containerMap[t]=e.currentTarget),U(document.body,Bh.NEW_COMMENT_CREATE_EVENT,{comment:n.value,threadUrn:t})}}}}enableDisablePostButton(e){const t=e.target,n=t.value.trim().length>0;for(let e=t.nextElementSibling;e;e=e.nextElementSibling)e.classList.contains(this.postCommentBtnClass)&&e.classList.toggle("hidden",!n)}renderNewComment(e){const{entityUrn:t,graphqlResponse:n}=e.detail;if(this.containerMap[t]){const e=this.containerMap[t],i=document.querySelector(this.templateSelector).content.firstElementChild.cloneNode(!0);Ws(i.querySelector(this.templateSelectors.message),n.comment.message[0].text),e.parentElement.insertBefore(i,e.nextSibling),e.querySelector(this.templateSelectors.commentText).value="",e.querySelector(this.templateSelectors.postButton).classList.add("hidden"),this.refreshLazyLoader()}}refreshLazyLoader(){window.lazyloader&&window.lazyloader.then((e=>{e.refreshLoader()}))}}const Fh="Comment:newComment:success",Hh="Comment:deleteComment:success",Gh="Reaction:newReaction:success",jh="Reaction:deleteReaction:success";class zh{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'[data-id="social-actions__reactions"]',t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'[data-id="social-actions__comments"]';this.reactionsSelector=e,this.commentsSelector=t,this.bindEvents()}bindEvents(){this.commentCountEventHandler(Fh),this.commentCountEventHandler(Hh),this.reactionCountEventHandler(Gh),this.reactionCountEventHandler(jh)}commentCountEventHandler(e){document.body.addEventListener(e,(t=>{const{entityUrn:n}=t.detail;if(n){const t=document.querySelectorAll("".concat(this.commentsSelector,'[data-entity-urn="').concat(n,'"]'));null!=t&&t.length&&t.forEach((t=>{this.maybeInitPluralRules(t);let n=parseInt(t.dataset.numComments,10);e===Fh?n+=1:e===Hh&&n&&(n-=1);const i=this.plRules.select(n),r=this.plMap[i];t.dataset.numComments=n,t.textContent=n?r.replace("%numComments%",(new Intl.NumberFormat).format(n)):""}))}}))}reactionCountEventHandler(e){document.body.addEventListener(e,(t=>{const{entityUrn:n}=t.detail,{reactionType:i}=t.detail;if(n){const t=document.querySelectorAll("".concat(this.reactionsSelector,'[data-entity-urn="').concat(n,'"]'));null!=t&&t.length&&t.forEach((t=>{this.maybeInitPluralRules(t);let r=parseInt(t.dataset.numReactions,10);e!==Gh||t.dataset.isSelfReaction?e===jh&&r&&(r-=1,delete t.dataset.isSelfReaction):(r+=1,t.dataset.isSelfReaction="true");const o=this.plRules.select(r),s=this.plMap[o];t.dataset.numReactions=r,t.querySelector("span").textContent=r?s.replace("%numReactions%",(new Intl.NumberFormat).format(r)):"";const a=t.querySelectorAll("img");if(e===Gh&&a.length<3&&!t.querySelector('img[data-reaction-type="'.concat(i,'"]'))){const e=t.querySelector("span"),o=document.createElement("img");if(o.dataset.delayedUrl=La("social-actions__reaction-image-".concat(i)),o.dataset.reactionType=i,o.dataset.singleSelfReaction="true",e.parentElement.insertBefore(o,e),1===r){const e=t.parentElement.querySelector("".concat(this.commentsSelector,'[data-entity-urn="').concat(n,'"]'));null==e||e.classList.add("before:middot")}window.lazyloader.then((e=>e.refreshLoader()))}else if(e===jh){const e=t.querySelector("[data-single-self-reaction]");if(null==e||e.remove(),0===r){const e=t.parentElement.querySelector("".concat(this.commentsSelector,'[data-entity-urn="').concat(n,'"]'));null==e||e.classList.remove("before:middot")}}}))}}))}maybeInitPluralRules(e){this.plRules=new Intl.PluralRules,this.plMap={one:e.dataset.singular,other:e.dataset.plural}}}class Wh{constructor(e){if(!e)throw new Error("No element passed into to full lockout component");this.el=e,this.moreArticlesEl=e.querySelector(".more-articles__slide-list"),this.moreArticlesEl&&new Ko(this.moreArticlesEl)}}class Kh extends HTMLElement{connectedCallback(){this.update(),this.syncA11yCaption(),this.setAttribute("aria-hidden","true"),handleLargeIcon(this)}disconnectedCallback(){this.removeA11yCaption()}static get observedAttributes(){return["a11y-text","type","class"]}attributeChangedCallback(e){ATTRS_TRIGGERING_UPDATE.indexOf(e)>-1&&this.update(),"a11y-text"===e&&this.syncA11yCaption(),"type"!==e&&"class"!==e||handleLargeIcon(this)}update(){const e=this.getAttribute("type"),t=this.getAttribute("category")||"ui",n="true"===this.dataset.inlineSvg;(e||t)&&(n||setIcon(this,t,e))}installA11yCaption(){const{parentNode:e,a11yCaption:t}=this;e&&t&&!t.parentNode&&e.insertBefore(t,this)}removeA11yCaption(){const{a11yCaption:e}=this;e&&e.parentNode&&e.parentNode.removeChild(e),this.a11yCaption=null}syncA11yCaption(){const{a11yCaption:e}=this,t=this.getAttribute("a11y-text");t?e?e.textContent=t:(this.a11yCaption=(e=>{const t=document.createElement("span");return t.setAttribute("class","a11y-text"),t.textContent=e,t})(t),this.installA11yCaption()):this.removeA11yCaption()}}const Vh="light";Vh.toUpperCase();const Yh={PRIMARY_ACTION:"PRIMARY_ACTION",SECONDARY_ACTION:"SECONDARY_ACTION",SKIP:"SKIP",DISMISS:"DISMISS"},Qh={LEGO_PAGE_IMPRESSION_EVENT:"/mwlite/lego/sendPageImpressionEvent/",LEGO_WIDGET_IMPRESSION_EVENT:"/mwlite/lego/sendWidgetImpressionEvent/",LEGO_WIDGET_ACTION_EVENT:"/mwlite/lego/sendWidgetActionEvent/"};function Jh(e,t){we(e,{method:"POST",postData:JSON.stringify(t),headers:{"Content-Type":"application/json"}}).catch((()=>{}))}var Xh=Object.freeze({__proto__:null,ACTION_CATEGORY:Yh,LEGO_TRACKING_URLS:Qh,fireLegoEvent:Jh});const Zh="#share-modal .modal-content .reshare-section",$h="data-post-visibility",ep='input[name="share-with"]:checked',tp="share-modal",np="#share-modal",ip="close",rp="click",op="data-control-action",sp="keydown",ap=document.querySelector("#share-modal .textarea"),cp=document.querySelector(".image-preview-wrapper"),lp=document.querySelector(Zh),up=document.querySelector(".post-button"),dp=document.querySelector("#comments-enabled"),hp=document.querySelector("#share-with-public"),pp=document.querySelector(".post-settings-wrapper"),fp=document.querySelector(ep),mp=document.querySelector("#share-modal .close-button"),gp=document.querySelector("#visibility-settings-modal"),vp=document.querySelector("#visibility-header-back .close-button"),yp=document.querySelector("#visibility-settings-modal .settings-list-wrapper"),bp=document.querySelector("#discard-post-modal-wrapper"),Ep=document.querySelector(np),wp=document.querySelector(".modal-spinner"),_p=document.querySelector("#share-modal .textarea"),Sp=document.querySelector("#share-with-group"),Tp=document.querySelector("#share-with-network");class Cp extends Tc{updatePostButtonStatus(){var e;const t=null===(e=ap.innerText)||void 0===e?void 0:e.trim().length,n="loaded"===cp.getAttribute("data-image-load-state"),i=lp.children.length;t||n||i?Do(up):Mo(up)}clearModalContentBase(){lp&&(lp.textContent=""),ap&&(ap.textContent=""),dp&&(dp.checked=!0),hp&&(hp.checked=!0,pp.setAttribute($h,fp.value))}historyBackClickHandler(){window.history.state!==tp&&"typeahead"!==window.history.state&&(window.history.pushState(tp,"show-share-modal",np),mp.click())}bindVisibilityModalEvents(){function e(e){const t=e.target,n=t.closest("[".concat(op,"]"))||t.querySelector("[".concat(op,"]"));n&&window.tracking.then((e=>{e.fireControlInteractionEvent(n.getAttribute(op))}))}gp.addEventListener(ip,(()=>{pp.setAttribute($h,document.querySelector(ep).value)})),vp.addEventListener(rp,(()=>window.history.back())),yp.addEventListener(rp,(t=>e(t))),yp.addEventListener(sp,(t=>{if(13===t.keyCode){const n=t.target.querySelector("input[type=radio]");n&&(n.checked=!0,e(t))}}))}discardPostConfirmationModalPrimaryActionCallback(e){let{enableHistoryBack:t}=e;this.close({enableHistoryBack:t}),Uo()&&"discard-post-modal"===window.history.state&&setTimeout((()=>{window.history.back()}),100)}postSettingsClickHandler(){window.tracking.then((e=>{e.fireControlInteractionEvent("post-settings")})),this.visibilitySettingsModal.open()}}class kp extends Cp{constructor(e,t){let{endpoint:n="",enablePageViewTracking:i=!1,shouldHideModal:r=(()=>!1),triggerByOutletEl:o=!1,pushState:s=!1,historyUpdateUrl:a}=t;super(e,{enablePageViewTracking:i,shouldHideModal:r,triggerByOutletEl:o,pushState:s}),this.el=e,this.postData={},this.endpoint=n,this.historyUpdateUrl=a,this.postUrn=La("ugcPostUrn"),this.openShareModalByLink=this._checkIfOpenShareModalByLink(),this.bindPublishingShareEvents(),this.visibilitySettingsModal=new Tc(gp,{triggerByOutletEl:!1}),this.handleOpenByUrl()}bindPublishingShareEvents(){this.shareTextEvents(),this.bindShareModalEvents(),this.bindVisibilityModalEvents()}_checkIfOpenShareModalByLink(){const e=new URL(location.href);return!0===Boolean(e.searchParams.get("openShareModal"))}handleOpenByUrl(){this.openShareModalByLink&&this.open()}shareTextEvents(){const e=M(this.updatePostButtonStatus,300);_p.addEventListener("input",e)}bindShareModalEvents(){const e=new id(bp,this.discardPostConfirmationModalPrimaryActionCallback.bind(this,{enableHistoryBack:!this.openShareModalByLink}),(()=>{}),{enablePageViewTracking:!0,pageKey:"article_discard_confirmation",triggerByOutletEl:!1});Ep.addEventListener("open",(()=>{ap.focus()})),Ep.addEventListener(ip,(()=>{this.clearModalContentBase(),Ro(wp)})),up.addEventListener(rp,(()=>{this.processPostData()})),mp.addEventListener(rp,(()=>{up.disabled?this.close():e.modal.open()})),pp.addEventListener(rp,this.postSettingsClickHandler.bind(this)),pp.addEventListener(sp,(e=>{13===e.keyCode&&this.postSettingsClickHandler.apply(this)}))}open(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultText:n}=t;this.historyUpdateUrl&&window.history.replaceState({},document.title,this.historyUpdateUrl),super.open(),this._checkIfOpenShareModalByLink()&&this._removeShareParams(),this.renderShareArticleShareSection(),Bo()&&window.scrollTo(0,0),n&&(_p.textContent=n),this.shareData={},this.historyUpdateUrl&&window.history.replaceState({},document.title,this.historyUpdateUrl),this.isNewPost=!1,this.postUrn&&(this.shareData.reshareUrn=this.postUrn,this.shareData.attributedShareUrn=this.postUrn),null===(e=window.lazyloader)||void 0===e||e.then((e=>{e.refreshLoader()})),this.updatePostButtonStatus()}renderShareArticleShareSection(){const e=this.el.querySelector(Zh);e.children.length?this.shareArticleNodeChild=e.children[0].cloneNode(!0):e.appendChild(this.shareArticleNodeChild)}composePostData(){this.shareData.text=_p.textContent,this.shareData.visibility="PUBLIC",Sp&&(this.shareData.visibility="CONTAINER",this.shareData.containerEntity=Sp.value),Tp.checked&&(this.shareData.visibility="CONNECTIONS")}processPostData(){No(wp),this.composePostData(),uh({endpoint:this.endpoint,queryId:kp.query,variables:this.shareData}).then((e=>{var t,n;200!==e.status&&Promise.reject();const i=(null===(t=JSON.parse(null==e?void 0:e.responseText).graphQL)||void 0===t||null===(n=t.createPost)||void 0===n?void 0:n.activityUrn)||Promise.reject();window.tracking.then((e=>{zr(e,"ajax","post_success_page_key")})),fd().trigger("success",La("postSuccessMessage"),"post-success-toast-dismiss",{url:"/feed/update/"+i,trk:"share-post-success",text:La("postSuccessViewPost"),target:pd}),this.close()})).catch((()=>{window.tracking.then((e=>{zr(e,"ajax","post_failure_page_key")})),fd().trigger("error",La("postFailureMessage"),"post-error-toast-dismiss"),this.close()}))}close(){super.close({enableHistoryBack:!this.openShareModalByLink})}_removeShareParams(){var e;const t=new URL(window.location.href);null===(e=t.searchParams)||void 0===e||e.delete("openShareModal"),window.history.pushState({},document.title,t.toString())}}Oe(kp,"query","971e319c05beaf333e94125db8c4f942");const Ip={legoTrackingUtils:Xh,getPageInstance:Vr,getEventBody:Wr,firePageViewEvent:zr,fireViewModuleImpressionEvent:Kr,getTrackingInstance:function(){let{appId:e="seo",appVersion:t="0.0.0",locale:n,multiproduct:i="undefined-frontend-mpName",service:r="undefined-frontend-serviceName",callTreeId:o=null,endpoint:s="li/track",maxSize:a=10,debounceTime:c=50,disableCompression:l=!1,customDelegate:u={},retryConfig:d=null,isLoggedIn:h=!1,customTransporterHosts:p}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const f={appId:e,appVersion:t,locale:n,multiproduct:i,service:r,endpoint:s,disableCompression:l,retryConfig:d,api:{AbortController,location:window.location,document,performance,PerformanceObserver,Promise,assign:Object.assign,fetch,sendBeacon:navigator.sendBeacon.bind(navigator)},batching:{maxSize:a,debounceTime:c}};o&&(f.treeID=o);const m=new hi(f),g=new Ei(m,Le({customTransporterHosts:p,preTransporter:e=>Le(Le({},e),{},{meta:Qr(e.meta)}),shouldAnonymizeMemberId:()=>!!d&&!h},u));return g}},Ap="one_tap",Lp="one-tap-auto-login";function Op(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{e()}))}function Rp(e,t){const n=document.createElement("script");n.src=e,t&&(n.onload=t),document.head.appendChild(n)}!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(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}}(),function(){if("function"==typeof window.EventTarget)try{return!new e}catch(e){}const 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],i=0,r=n.length;i<r;i++)if(n[i]===t)return void n.splice(i,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,i=t.length;n<i;n++)t[n].call(this,e);return!e.defaultPrevented},window.EventTarget=e}();const Np="990339570472-k6nqn1tpmitg8pui82bfaun3jrpmiuhs.apps.googleusercontent.com",xp={GOOGLE_ERROR:"googleError",GOOGLE_USER_FETCHED:"googleUserFetched",INITIALIZED:"initialized",PROMPT_MOMENT:"promptMomentNotification",TOKEN_FETCHED:"tokenFetched"},Pp={INITIALIZATION:"initialization",AUTHENTICATION:"authentication"},Mp={SIGN_IN:"signin",SIGN_UP:"signup",USE:"use"},Dp={DISPLAY:"display",SKIPPED:"skipped",DISMISSED:"dismissed"},Up={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"}},{GOOGLE_ERROR:Bp,GOOGLE_USER_FETCHED:qp,INITIALIZED:Fp}=xp,{INITIALIZATION:Hp,AUTHENTICATION:Gp}=Pp;class jp extends EventTarget{constructor({libSrcPath:e,el:t,clientId:n=Np}){if(super(),!t)throw TypeError("DOM element for Sign In button is required");if(this.libSrcPath=e,this.el=t,this.clientId=n,window.gapi)this._initializeGoogleAuth();else{if(!e)throw TypeError("Google Sign In lib not already loaded on the page. libSrcPath is required to load the lib.");Op((()=>{Rp(e,this._initializeGoogleAuth.bind(this))}))}}_initializeGoogleAuth(){return gapi.auth2.init({client_id:this.clientId}).then((e=>{this.auth2=e,this._attachSignIn();const t=new CustomEvent(Fp);this.dispatchEvent(t)})).catch((e=>{const t={type:Hp,message:e.error},n=new CustomEvent(Bp,{detail:t});this.dispatchEvent(n)}))}_attachSignIn(){this.auth2.attachClickHandler(this.el,{},(e=>{const t=new CustomEvent(qp,{detail:this._getGoogleUserInformation(e)});this.dispatchEvent(t)}),(e=>{const t={type:Gp,message:e.error},n=new CustomEvent(Bp,{detail:t});this.dispatchEvent(n)}))}_getGoogleUserInformation(e){const 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()}}}const{GOOGLE_USER_FETCHED:zp,PROMPT_MOMENT:Wp}=xp;class Kp extends EventTarget{constructor({autoSelect:e=!1,libSrcPath:t,containerId:n,context:i,clientId:r=Np,cancelOnTapOutside:o=!0}){if(super(),!i)throw TypeError("context param is required to determine the message to show in Google One Tap");if(this.autoSelect=e,this.libSrcPath=t,this.containerId=n,this.cancelOnTapOutside=o,this.clientId=r,this.context=i,window.google&&window.google.accounts&&window.google.accounts.id)this._onGoogleApiLoad();else{if(!t)throw TypeError("Google One Tap lib is not already loaded on the page. libSrcPath is required to load the library");Op((()=>{Rp(t,this._onGoogleApiLoad.bind(this))}))}}_onGoogleApiLoad(){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((()=>this.promptOneTap()))}_handleCredentialResponse(e){const t=e.credential;let n=this.context===Mp.SIGN_UP?this._getBasicProfile(t):{idToken:t};if(n){n.selectedBy=e.select_by;const t=new CustomEvent(zp,{detail:n});this.dispatchEvent(t)}}_getBasicProfile(e){try{const 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}}_dispatchSkippedEvent(e){const t={message:e,reason:Up.SKIPPED.ISSUING_FAILED,type:Dp.SKIPPED},n=new CustomEvent(Wp,{detail:t});this.dispatchEvent(n)}promptOneTap(){google.accounts.id.prompt((e=>{const t={type:e.getMomentType(),reason:e.getNotDisplayedReason()||e.getSkippedReason()||e.getDismissedReason()},n=new CustomEvent(Wp,{detail:t});this.dispatchEvent(n),this.checkIfDesktopAndApplyClass()}))}hideOneTap(){google.accounts.id.cancel()}checkIfDesktopAndApplyClass(){if(!/.*(iPad|iPod|iPhone|Android|BlackBerry).*/.test(navigator.userAgent)){const e=document.getElementById("credential_picker_container");e&&e.classList.add("credential_picker_container--desktop")}}}var Vp={exports:{}};function Yp(e){this.message=e}Yp.prototype=new Error,Yp.prototype.name="InvalidCharacterError";var Qp="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new Yp("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(n=r%4?64*n+i:i,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};var Jp=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 function(e){return decodeURIComponent(Qp(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return Qp(t)}};function Xp(e){this.message=e}Xp.prototype=new Error,Xp.prototype.name="InvalidTokenError",Vp.exports=function(e,t){if("string"!=typeof e)throw new Xp("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(Jp(e.split(".")[n]))}catch(e){throw new Xp("Invalid token specified: "+e.message)}},Vp.exports.InvalidTokenError=Xp;Vp.exports;const{GOOGLE_USER_FETCHED:Zp,PROMPT_MOMENT:$p}=xp;class ef extends EventTarget{constructor({autoSelect:e=!1,libSrcPath:t,clientId:n=Np,showOneTap:i=!0,promptParentId:r,buttonParentEl:o,gsiButtonConfig:s={},context:a="signin",cancelOnTapOutside:c=!0}){if(super(),this.autoSelect=e,this.libSrcPath=t,this.clientId=n,this.showOneTap=i,this.promptParentId=r,this.buttonParentEl=o,this.gsiButtonConfig=s,this.cancelOnTapOutside=c,this.context=a,this.isLibraryLoaded=function(){let e,t;const n=new Promise(((e,t)=>{e,t}));return n.resolve=e,n.reject=t,n}(),window.google&&window.google.accounts&&window.google.accounts.id)this._onGoogleApiLoad();else{if(!t)throw TypeError("GSI lib is not already loaded on the page. libSrcPath is required to load the library");Op((()=>{Rp(t,this._onGoogleApiLoad.bind(this))}))}}_onGoogleApiLoad(){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:GSI_CONTEXT[this.context].GOT}),Promise.resolve().then((()=>this.showGsiUI()))}showGsiUI(){this.buttonParentEl&&this.renderGSIButton(this.buttonParentEl,this.gsiButtonConfig),this.showOneTap&&this.promptOneTap()}renderGSIButton(e,{logo_alignment:t="center",shape:n="pill",size:i="large",text:r,theme:o,type:s,width:a="400px"}){return this.isLibraryLoaded.then((()=>{const c=r||GSI_CONTEXT[this.context].GSI_BUTTON;window.google.accounts.id.renderButton(e,{logo_alignment:t,shape:n,size:i,text:c,theme:o,type:s,width:a})}))}promptOneTap(){return this.isLibraryLoaded.then((()=>{window.google.accounts.id.prompt((e=>{const t={type:e.getMomentType(),reason:e.getNotDisplayedReason()||e.getSkippedReason()||e.getDismissedReason()},n=new CustomEvent($p,{detail:t});this.dispatchEvent(n),this.checkIfDesktopAndApplyClass()}))}))}_handleCredentialResponse({credential:e,select_by:t}){const n=jwtDecode(e),i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?vanilla_ownKeys(Object(n),!0).forEach((function(t){vanilla_defineProperty(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):vanilla_ownKeys(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},this._getBasicProfile(n),{idToken:e,selectedBy:t});if(i){const e=new CustomEvent(Zp,{detail:i});this.dispatchEvent(e)}}_getBasicProfile(e){const{email:t,family_name:n,given_name:i,sub:r,picture:o}=e;return{email:t,familyName:n,givenName:i,id:r,imageUrl:o}}hideOneTap(){window.google.accounts.id.cancel()}checkIfDesktopAndApplyClass(){if(!/.*(iPad|iPod|iPhone|Android|BlackBerry).*/.test(navigator.userAgent)){const e=document.getElementById("credential_picker_container");e&&e.classList.add("credential_picker_container--desktop")}}}const tf={CLIENT_ID:Np,EVENTS:xp,GOOGLE_ACCOUNT_URL:"https://accounts.google.com",GSI_ERROR_TYPES:Pp,GSI_ERROR_MESSAGES:{INIT_FAILED:"idpiframe_initialization_failed",POPUP_CLOSED_BY_USER:"popup_closed_by_user",ACCESS_DENIED:"access_denied",IMMEDIATE_FAILED:"immediate_failed"},GOT_CONTEXTS:Mp,GOT_PROMPT_MOMENT_REASONS:Up,GOT_PROMPT_MOMENT_TYPES:Dp};function nf(e,t){const n=document.createElement("input");return n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),n}const rf=Y.getPageKey(document).replace("_jsbeacon","");function of(e,t,n){window.tracking&&window.tracking.then((i=>{if(t&&e.appendChild(function(e){return nf("controlId","".concat(rf,"-").concat(e.dataset.trackingControlName))}(t)),e.appendChild(function(e){const t=e.state&&e.state.currentPageInstance||{};return nf("pageInstance","".concat(t.pageUrn,";").concat(t.trackingId))}(i)),n){const e="".concat(rf,"_").concat(n);Ip.firePageViewEvent(i,"ajax",e),pl(i).trackPageView({pageKey:e})}}))}function sf(e){window.tracking&&window.tracking.then((t=>{t.fireControlInteractionEvent(e)}))}const{EVENTS:af,GOT_CONTEXTS:cf,GOT_PROMPT_MOMENT_REASONS:lf,GOT_PROMPT_MOMENT_TYPES:uf}=tf,{GOOGLE_USER_FETCHED:df,PROMPT_MOMENT:hf}=af,{SIGN_IN:pf}=cf,ff=[lf.NOT_DISPLAYED.BROWSER_NOT_SUPPORTED,lf.NOT_DISPLAYED.OPT_OUT_OR_NO_SESSION,lf.NOT_DISPLAYED.SUPPRESSED_BY_USER],mf=[lf.SKIPPED.AUTO_CANCEL,lf.SKIPPED.TAP_OUTSIDE,lf.SKIPPED.USER_CANCEL];class gf{constructor(e,{onNotDisplayed:t,onSkipped:n,isAutoSelectEnabled:i=!1}={}){if(!e)throw Error("Google one tap form element must be provided");this.el=e,this.onNotDisplayed="function"==typeof t&&t,this.onSkipped="function"==typeof n&&n,this.containerEl=this.el.querySelector(".google-one-tap__container"),this.loaderEl=this.el.querySelector(".loader"),this.loader=this.loaderEl&&new Wa(this.loaderEl),this.isAutoSelectEnabled=i,of(this.el,this.containerEl),this.googleOneTapPromise=this._createGoogleOneTap()}_createGoogleOneTap(){return window.lazyloader.then((e=>e.getLazyLoadedJavascriptModule("google-one-tap-lib"))).then((()=>(this.googleOneTapInstance=new Kp({autoSelect:this.isAutoSelectEnabled,cancelOnTapOutside:!1,context:pf}),this.googleOneTapInstance.addEventListener(df,(({detail:e})=>{sf("google-one-tap--account-selected");const{idToken:t,selectedBy:n}=e,i=this.googleOneTapInstance._getBasicProfile(t);this._submitWithGoogle(n,i)})),this.googleOneTapInstance.addEventListener(hf,(({detail:e})=>{const{reason:t,type:n}=e;let i="google-one-tap-moment--".concat(n);if(i=t?"".concat(i,"-").concat(t):i,sf(i),t)if(n===uf.SKIPPED){if(this.onSkipped)this.onSkipped(e);else if(-1===mf.indexOf(t))throw Error("GoogleOneTapError ".concat(n,": ").concat(t))}else if(n===uf.DISPLAY)if(this.onNotDisplayed)this.onNotDisplayed(e);else if(-1===ff.indexOf(t))throw Error("GoogleOneTapError ".concat(n,": ").concat(t))})),this.googleOneTapInstance)))}_submitWithGoogle(e,t={}){const{email:n,idToken:i,imageUrl:r,familyName:o,givenName:s}=t;this.googleIdTokenInput&&this.el.removeChild(this.googleIdTokenInput),this.googleIdTokenInput=nf("googleIdToken",i),this.el.appendChild(nf("googleGivenName",s)),this.el.appendChild(nf("googleFamilyName",o)),this.el.appendChild(nf("googleImageUrl",r)),this.el.appendChild(nf("googleEmail",n));const a="auto"===e?Lp:Ap;this.el.appendChild(nf("soogleLoginRequestType",a)),this.el.appendChild(this.googleIdTokenInput),this.loader&&this.loader.show(),this.el.submit()}}const{GOOGLE_USER_FETCHED:vf,GOOGLE_ERROR:yf,INITIALIZED:bf}=tf.EVENTS,{INITIALIZATION:Ef}=tf.GSI_ERROR_TYPES;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self&&self;function wf(e,t,n){return e(n={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&n.path)}},n.exports),n.exports}wf((function(e,t){e.exports=function(){var e="aria-[a-z0-9_\\-]+|class|data-[a-z0-9_\\-]+|dir|id|role|tabindex",t="alt|checked|colgroup|cols|colspan|disabled|height|hidden|maxlength|method|multiple|name|placeholder|readonly|rel|required|rows|rowspan|spellcheck|target|title|width",n="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",i=d()?"textContent":"innerText",r=["b","del","em","i","s","strong","sub","sup"],o=r.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"]),s=[e,t,n].join("|"),a="href|src",c="data:image/(?:gif|jpg|jpeg|png);base64,",l="https?|ftp|mailto|invalid";function u(){}function d(){return"undefined"==typeof document||"textContent"in document.createElement("div")}function h(e,t){if(t=t||"log",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)}var p=function(){var e,t=/[&<>"'\u0000\\=]/g;return e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","\0":"�","\\":"&#92;","=":"&#61;"},function(n){return null==n?null:n.toString().replace(t,(function(t){return e[t]}))}}(),f=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:'"'};function o(t){var n;return r.hasOwnProperty(t)?r[t]:(e.innerHTML="&"+t+";",n=e[i],r[t]=n,n)}return t="function"==typeof String.fromCodePoint?function(e){return String.fromCodePoint(e)}:function(e){return e<=65535?String.fromCharCode(e):"�"},function(e){return null==e?null:(e+"").replace(n,(function(e,n,i,r){return n?o(n):i||r?t(parseInt(i||r,i?16:10)||65533):"�"}))}}();function m(e){return p(f(e))}function g(e){return h("jSecure.text() is deprecated. Please use jSecure.htmlEncode().","warn"),p(e)}var v=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function y(e){return/[<&]/.test(e)}function b(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function E(e){return e.reduce((function(e,t){return e.concat(t)}),[])}var w=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t)}:function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},_="[ \t\r\n]*",S="[ \t\r\n]+";function T(e){e=v(e)?e:[e];var t,n,i,r=0,u="<(?!/?";return u+="(?:",w(e,(function(e,d){t=e.tags||o,n=e.attrs||s,i=e.checkUrlAttrs||!1,0!==d&&(u+="|"),u+="(?:"+t.join("|")+")",u+="(?:",u+=_,u+="|"+S,u+="(?:(?:",u+="(?:"+n+")(?:=([\"'])[^'\"<>]*\\"+ ++r+")?",i&&(u+="|(?:"+a+")=([\"'])(?:(?:"+l+")(?::|&#(?:58|x3a);)|(?:"+c+")|[/.#?]|&#(?:35|4[67]|63|x(?:2[3ef]|3f));)[^'\"<>]*\\"+ ++r),u+=")"+_+")+",u+=")"})),u+=")",u+="/?>)",new RegExp(u,"i")}function C(e){return T({tags:e=e||o,checkUrlAttrs:!0})}function k(){var t={tag:"li-icon",attrs:"active|a11y-text|animate|color|size|type"};return T([{tags:o,checkUrlAttrs:!0},{tags:[t.tag],attrs:[e,t.attrs].join("|"),checkUrlAttrs:!1}])}function I(e,t){var n=(t=t||{}).allowTags,i=!1!==t.hasCustomElementMarkup;return n?!C(n).test(e):i?!I.R_UNSAFE_CUSTOM_ELEMENT.test(e):!I.R_UNSAFE_HTML.test(e)}function A(e){return e.replace(/<[^>]*>|[<>'"&\\]/g,"")}function L(e,t,n){if(null==e)return null;e=e.toString();var i=t?O(e,t):e,r=e;return y(i)&&!I(i,n)&&(i=A(i),h("Content contains non-whitelisted tags or attributes:\nContent: "+r,"error")),i}function O(e,t){var n={};return e.replace(/\{([^}]+)\}/g,(function(e,i){var r,o=e;if(n.hasOwnProperty(i))return n[i];if(t.hasOwnProperty(i)){if(!((r="string"==typeof(o=t[i]))||o instanceof u||"number"==typeof o))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");o=r?p(o):o.toString()}return n[i]=o,o}))}function R(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e}I.R_UNSAFE_HTML=C(),I.R_UNSAFE_CUSTOM_ELEMENT=k();var N={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,"",""]};N.optgroup=N.option,N.tbody=N.tfoot=N.colgroup=N.caption=N.thead,N.th=N.td;var x=/<([\w:]+)/;function P(e,t){var n,i,r,o,s,a,c,l=t.createDocumentFragment(),u=[];for(s=0,c=e.length;s<c;s++)if((o=e[s])||0===o)if("string"==typeof o){for(r=r||l.appendChild(t.createElement("div")),n=(x.exec(o)||["",""])[1].toLowerCase(),B(r,(i=N[n]||N._default)[1]+o+i[2]),a=i[0];a--;)r.lastChild&&r.lastChild.nodeType===Node.ELEMENT_NODE&&(r=r.lastChild);R(u,r.childNodes),(r=l.firstChild).textContent=""}else R(u,o.nodeType?[o]:o);for(l.textContent="",o=u[s=0];o;)l.appendChild(o),o=u[++s];return l}function M(e,t){var n;if(t=t||document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument(""):document,"string"==typeof e)n=P([e],t);else{if(!v(e))return e;n=P(e,t)}return R([],n.childNodes)}var D=L,U=L;function B(e,t,n){var r=L(t,n);return y(r)?e.innerHTML=r:e[i]=r,r}function q(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e}function F(e){return e}function H(e,t){if(!(this instanceof H))return new H(e,t);(t=t||{}).allowTags=t.allowTags?E(t.allowTags):null,this._string=e,this._options=t}function G(e){for(var t=arguments.length,n=Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r="",o=void 0,s=n.length;return e&&e.forEach((function(e,t){r+=e,t<s&&(o=n[t],r+=o instanceof H?o:p(o))})),U(r)}H.prototype=b(new u,{toString:function(){var e=this._string,t=this._stringVal,n=e;return void 0!==t?t:(I(e,this._options)||(n=e,e=A(e),h("UnsafeString contains non-whitelisted tags or attributes.\nString: "+n,"error")),this._stringVal=e,e)}});var j=/ /g,z=/[\s\u0000<>"]|%00/,W=/\\/,K=/([.]|%2e){2}/i,V=new RegExp("^(?:https?|ftp|mailto|tel|sms|blob|voyager|android-app|linkedin|chrome-extension|invalid|data:(?:(?:image/(?:gif|jpe?g|png))|(?:application/x-font-woff)|(?:font/(?:opentype|ttf)))[;,]|[/.#?])");function Y(e){var t=void 0,n="invalid://";if("string"!=typeof e)return h("jSecure Warning: url must be a string","error"),n;if((t=e.trim()).indexOf(" ")>-1&&(h("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(j,"+")),!V.test(t))return h("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(z.test(t))return h("jSecure Error: not valid url character found in url: "+e,"error"),n;var i=t.split("?")[0];return W.test(i)||K.test(i)||K.test(decodeURI(i))?(h("jSecure Error: malicious data found in url path: "+i,"error"),n):e}var Q={redirect:function(e){window&&(window.location.href=e)}};function J(e){var t=Y(e);t===e&&Q.redirect(t)}return{ALLOWED_TAGS:o,FORMATTING_TAGS:r,htmlEncode:p,htmlUnencode:f,log:h,mk:G,parseHTML:M,parseSelector:q,processTemplate:D,reEncode:m,_redirector:Q,redirect:J,sanitizeHTML:U,sanitizeUrl:Y,setElementContent:B,text:g,unsafe:F,UnsafeString:H}}()}));const _f=/\!|\@|\#|\$|\%|\^|\&|\*|\+|\=|\||<|\>|\?|\:|\;/,Sf=/(.)\1{3}/,Tf=/linkedin/i,Cf=/\d\d/,kf=new RegExp("([a-zA-Z0-9]+://)?([a-zA-Z0-9_]+:[a-zA-Z0-9_]+@)?([a-zA-Z0-9.-]+\\.[A-Za-z]{2,4})(:[0-9]+)?(/.*)?"),If=/^(([^<>()\[\]\.,;:\s@\"]+(\.[^<>()\[\]\.,;:\s@\"]+)*)|(\".+\"))@(([^<>()[\]\.,;:\s@\"]+\.)+[^<>()[\]\.,;:\s@\"]{2,})$/i,Af=/^[\u4E00-\u9FFF|\u3400-\u4DBF|\uF900-\uFAFF]*$/,Lf=/^[ぁ-ゔゞ゛゜ー]*$/,Of=/^[+]?[\s./0-9]*[(]?[0-9]{1,4}[)]?[-\s./0-9]*$/,Rf="i18n_invalidFormat_",Nf=e=>{const t=(t="")=>t.length<=e;return t.errorMessagePrefix="i18n_tooLong_",t},xf=e=>{const t=(t="")=>t.length>=e;return t.errorMessagePrefix="i18n_tooShort_",t},Pf=(e="")=>!Cf.test(e);Pf.errorMessagePrefix="i18n_noConsecutiveDigits_";const Mf=(e="")=>!_f.test(e);Mf.errorMessagePrefix="i18n_noForbiddenCharacters_";const Df=(e="")=>!Sf.test(e);Df.errorMessagePrefix="i18n_noFourConsecutiveDuplicates_";const Uf=(e="")=>!Tf.test(e);Uf.errorMessagePrefix="i18n_noLinkedIn_";const Bf=(e="")=>!kf.test(e);Bf.errorMessagePrefix="i18n_noUrl_";const qf=(e="")=>Af.test(e);qf.errorMessagePrefix="i18n_onlyChinese_";const Ff=(e="")=>Lf.test(e);Ff.errorMessagePrefix="i18n_onlyPhonetic_";const Hf=(e="")=>""!==e.trim();Hf.errorMessagePrefix="i18n_required_";const Gf=(e="")=>If.test(e);Gf.errorMessagePrefix=Rf;const jf=(e="")=>Of.test(e);jf.errorMessagePrefix=Rf;const zf=(e="")=>If.test(e)||Of.test(e);zf.errorMessagePrefix=Rf;const Wf=[Nf(50),Mf,Pf,Df,Uf,Bf],Kf=[Hf].concat(Wf),Vf=[Ff,Nf(50),Df];Nf(4),xf(2),Nf(128),Nf(128),Nf(128),(e=>{const t=(t="")=>""===t||e(t);t.errorMessagePrefix=e.errorMessagePrefix})(Gf),xf(6),Nf(200);const{GOT_PROMPT_MOMENT_REASONS:Yf,GOT_PROMPT_MOMENT_TYPES:Qf}=tf;const{GOOGLE_ERROR:Jf,GOOGLE_USER_FETCHED:Xf,INITIALIZED:Zf}=tf.EVENTS;wf((function(e,t){!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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}function r(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 i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(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){r(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 a(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&&l(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(){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=u()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&l(r,n.prototype),r},d.apply(null,arguments)}function h(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function p(e){var t="function"==typeof Map?new Map:void 0;return p=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}}),l(n,e)},p(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?f(e):t}function g(e){return function(){var t,n=c(e);if(u()){var i=c(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return m(this,t)}}function v(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,i){e=n,t=i}));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],i=0,r=n.length;i<r;i++)if(n[i]===t)return void n.splice(i,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,i=t.length;n<i;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"},_="https://accounts.google.com",S={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"},C={SIGN_IN:"signin",SIGN_UP:"signup",USE:"use"},k={DISPLAY:"display",SKIPPED:"skipped",DISMISSED:"dismissed"},I={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",L="https://www.linkedin.com/redirect",O="https://www.linkedin-ei.com/redirect",R={DISMISSED:"DISMISSED",INITIALIZED:"INITIALIZED",SNAPPLE_USER_FETCHED:"SNAPPLE_USER_FETCHED"},N={signin:{GOT:"signin",GSI_BUTTON:"signin_with"},signup:{GOT:"signup",GSI_BUTTON:"signup_with"},use:{GOT:"use",GSI_BUTTON:"continue_with"}},x=w.GOOGLE_ERROR,P=w.GOOGLE_USER_FETCHED,M=w.INITIALIZED,D=S.INITIALIZATION,U=S.AUTHENTICATION,B=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.libSrcPath,s=e.el,a=e.clientId,c=void 0===a?E:a;if(t(this,r),i=n.call(this),!s)throw TypeError("DOM element for Sign In button is required");if(i.libSrcPath=o,i.el=s,i.clientId=c,window.gapi)i._initializeGoogleAuth();else{if(!o)throw TypeError("Google Sign In lib not already loaded on the page. libSrcPath is required to load the lib.");v((function(){y(o,i._initializeGoogleAuth.bind(f(i)))}))}return i}return i(r,[{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(M);e.dispatchEvent(n)})).catch((function(t){var n={type:D,message:t.error},i=new CustomEvent(x,{detail:n});e.dispatchEvent(i)}))}},{key:"_attachSignIn",value:function(){var e=this;this.auth2.attachClickHandler(this.el,{},(function(t){var n=new CustomEvent(P,{detail:e._getGoogleUserInformation(t)});e.dispatchEvent(n)}),(function(t){var n={type:U,message:t.error},i=new CustomEvent(x,{detail:n});e.dispatchEvent(i)}))}},{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()}}}]),r}(p(EventTarget)),q=w.GOOGLE_USER_FETCHED,F=w.PROMPT_MOMENT,H=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.autoSelect,s=void 0!==o&&o,a=e.libSrcPath,c=e.containerId,l=e.context,u=e.clientId,d=void 0===u?E:u,h=e.cancelOnTapOutside,p=void 0===h||h;if(t(this,r),i=n.call(this),!l)throw TypeError("context param is required to determine the message to show in Google One Tap");if(i.autoSelect=s,i.libSrcPath=a,i.containerId=c,i.cancelOnTapOutside=p,i.clientId=d,i.context=l,window.google&&window.google.accounts&&window.google.accounts.id)i._onGoogleApiLoad();else{if(!a)throw TypeError("Google One Tap lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(a,i._onGoogleApiLoad.bind(f(i)))}))}return i}return i(r,[{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===C.SIGN_UP?this._getBasicProfile(t):{idToken:t};if(n){n.selectedBy=e.select_by;var i=new CustomEvent(q,{detail:n});this.dispatchEvent(i)}}},{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:I.SKIPPED.ISSUING_FAILED,type:k.SKIPPED},n=new CustomEvent(F,{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()},i=new CustomEvent(F,{detail:n});e.dispatchEvent(i),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")}}}]),r}(p(EventTarget)),G={exports:{}},j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function z(e){this.message=e}function W(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new z("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(n=r%4?64*n+i:i,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)i=j.indexOf(i);return s}z.prototype=new Error,z.prototype.name="InvalidCharacterError";var K="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||W;function V(e){return decodeURIComponent(K(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}var Y=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 V(t)}catch(e){return K(t)}};function Q(e){this.message=e}Q.prototype=new Error,Q.prototype.name="InvalidTokenError",G.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(Y(e.split(".")[n]))}catch(e){throw new Q("Invalid token specified: "+e.message)}},G.exports.InvalidTokenError=Q;var J=G.exports,X=w.GOOGLE_USER_FETCHED,Z=w.PROMPT_MOMENT,$=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.autoSelect,s=void 0!==o&&o,a=e.libSrcPath,c=e.clientId,l=void 0===c?E:c,u=e.showOneTap,d=void 0===u||u,h=e.promptParentId,p=e.buttonParentEl,m=e.gsiButtonConfig,g=void 0===m?{}:m,w=e.context,_=void 0===w?"signin":w,S=e.cancelOnTapOutside,T=void 0===S||S;if(t(this,r),(i=n.call(this)).autoSelect=s,i.libSrcPath=a,i.clientId=l,i.showOneTap=d,i.promptParentId=h,i.buttonParentEl=p,i.gsiButtonConfig=g,i.cancelOnTapOutside=T,i.context=_,i.isLibraryLoaded=b(),window.google&&window.google.accounts&&window.google.accounts.id)i._onGoogleApiLoad();else{if(!a)throw TypeError("GSI lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(a,i._onGoogleApiLoad.bind(f(i)))}))}return i}return i(r,[{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:N[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,i=t.logo_alignment,r=void 0===i?"center":i,o=t.shape,s=void 0===o?"pill":o,a=t.size,c=void 0===a?"large":a,l=t.text,u=t.theme,d=t.type,h=t.width,p=void 0===h?"400px":h;return this.isLibraryLoaded.then((function(){var t=l||N[n.context].GSI_BUTTON;window.google.accounts.id.renderButton(e,{logo_alignment:r,shape:s,size:c,text:t,theme:u,type:d,width:p})}))}},{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()},i=new CustomEvent(Z,{detail:n});e.dispatchEvent(i),e.checkIfDesktopAndApplyClass()}))}))}},{key:"_handleCredentialResponse",value:function(e){var t=e.credential,n=e.select_by,i=J(t),r=s({},this._getBasicProfile(i),{idToken:t,selectedBy:n});if(r){var o=new CustomEvent(X,{detail:r});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")}}}]),r}(p(EventTarget)),ee=R.DISMISSED,te=R.INITIALIZED,ne=R.SNAPPLE_USER_FETCHED,ie=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.libSrcPath,s=e.snappleCTA,a=e.clientId,c=void 0===a?A:a,l=e.redirectURI;if(t(this,r),i=n.call(this),!s)throw TypeError("snappleCTA is required. Please pass the correct CTA element to this Snapple Constructor");if(i.libSrcPath=o,i.clientId=c,i.redirectURI=i._getRedirectURL(l),i.snappleCTA=s,window.AppleID&&window.AppleID.auth&&window.AppleID.auth.init)i._onSnappleLibLoad();else{if(!o)throw TypeError("Snapple lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(o,i._onSnappleLibLoad.bind(f(i)))}))}return i}return i(r,[{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?L:O}}]),r}(p(EventTarget)),re={CLIENT_ID:E,EVENTS:w,GOOGLE_ACCOUNT_URL:_,GSI_ERROR_TYPES:S,GSI_ERROR_MESSAGES:T,GOT_CONTEXTS:C,GOT_PROMPT_MOMENT_REASONS:I,GOT_PROMPT_MOMENT_TYPES:k};e.GoogleGsi=$,e.GoogleOneTap=H,e.GoogleSignIn=B,e.GoogleSignInConstants=re,e.SnappleAuth=ie,e.SnappleEvents=R,Object.defineProperty(e,"__esModule",{value:!0})}(t)}));new Set(["百里","淳于","第五","東方 ","东方","東閣 ","东阁","東郭 ","东郭","東門 ","东门","端木","獨孤 ","独孤","公孫 ","公孙","公羊","公冶","公西","毌丘","穀梁 ","谷梁","賀蘭 ","贺兰","赫連 ","赫连","賀若 ","贺若","皇甫","黄斯","呼延","兰向","令狐","甪里","閭丘 ","闾丘","万俟","慕容","納蘭 ","纳兰","南宮 ","南宫","歐陽 ","欧阳","沙吒","上官","申屠","司馬 ","司马","司徒","司空","司寇","太史","澹臺 ","澹台","拓跋","完顏 ","完颜","聞人 ","闻人","巫馬 ","巫马","夏侯","鮮于 ","鲜于","西門 ","西门","軒轅 ","轩辕","楊子 ","杨子","耶律","樂正 ","乐正","尉遲 ","尉迟","宇文","長孫 ","长孙","鍾離 ","钟离","諸葛 ","诸葛","祝融","子車 ","子车","左人"]);var $f;!function(e){e.ProductName="productName",e.UntrackedResponseCodes="untrackedResponseCodes",e.TrackedResponseCodes="trackedResponseCodes"}($f||($f={}));new Set(Object.values($f));class em extends Error{constructor(e){super(e),Object.setPrototypeOf(this,em.prototype)}}const{EVENTS:tm,GOT_CONTEXTS:nm,GOT_PROMPT_MOMENT_TYPES:im}=tf,{GOOGLE_USER_FETCHED:rm,PROMPT_MOMENT:om}=tm;var sm,am="open-share-to-linkedin";class cm extends Ma{setLinkedInServiceUrl(e){this.linkedinServiceUrl=e}_getServiceUrl(e){return"linkedin"===e&&this.linkedinServiceUrl?this.linkedinServiceUrl:super._getServiceUrl(e)}}function lm(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function um(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var dm={ADVERTISING:"ADVERTISING",ANALYTICS_AND_RESEARCH:"ANALYTICS_AND_RESEARCH",FUNCTIONAL:"FUNCTIONAL"},hm="GUEST",pm="MEMBER",fm=0,mm=1,gm=2,vm=(um(sm={},hm,"li_gc"),um(sm,pm,"li_mc"),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,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;for(var o in lm(this,e),t=t||{},this.consentAvailable=!1,this.issuedAt=n,this.userMode=i,this.optedInConsentMap={},dm)t[o]=t[o]||fm,t[o]!==fm&&(this.consentAvailable=!0),this.optedInConsentMap[o]=t[o]===mm||t[o]===fm&&r===mm});(function(){var e=[dm.ADVERTISING,dm.ANALYTICS_AND_RESEARCH,dm.FUNCTIONAL],t=[fm,mm,gm,fm],n=new RegExp(["^(\\d+)","(\\d+)","(\\d+)","((?:.|\\s)+)"].join(";"))})(),new RegExp(["^(\\d+)","((?:.|\\s)+)"].join(";"));window.encodeURIComponent;function ym(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 bm(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{setTimeout(e)}))}class Em{constructor(){this._unloadCallbacks=[],this._initEventListener()}_initEventListener(){window.addEventListener("beforeunload",(e=>{for(let t=0;t<this._unloadCallbacks.length;t++){if(!1===this._unloadCallbacks[t].call(null,e))break}}))}addUnloadCallback(e){e instanceof Function&&this._unloadCallbacks.push(e)}}const wm=function(){let e;return{getInstance:function(){return e||(e=new Em),e}}}();class _m{constructor(){this._pagehideCallbacks=[],this._initEventListener()}_initEventListener(){window.addEventListener("pagehide",(e=>{for(let t=0;t<this._pagehideCallbacks.length;t++)this._pagehideCallbacks[t].call(null,e)}))}addPagehideCallback(e){e instanceof Function&&this._pagehideCallbacks.push(e)}}const Sm=function(){let e;return{getInstance:function(){return e||(e=new _m),e}}}();function Tm(e){return null==e||"object"!=typeof e?[]:Array.prototype.slice.call(e)}function Cm(e){const t=e.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,i=window.innerWidth||document.documentElement.clientWidth,r=t.top<=n&&t.top+t.height>=0,o=t.left<=i&&t.left+t.width>=0;return r&&o}function km(){let{scrollTop:e=scrollY,clientHeight:t=window.innerHeight,scrollHeight:n=document.body.scrollHeight}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2?arguments[2]:void 0;return r?e<=t*i:e>=n-(t+t*i)}function Im(e,t,n){const i=new RegExp("([\\?&])".concat(n?t:encodeURIComponent(t),"=([^&#]*)")).exec(e);return i&&(n?i[2]:decodeURIComponent(i[2]))}function Am(e,t){return Lm(e,"trk",t)}function Lm(e,t,n,i){if(!e||!t)throw new Error("Required param of addQueryParam missing: url = ".concat(e,",  key = ").concat(t));t=encodeURIComponent(t),n=encodeURIComponent(n);const r=Im(e,t,!0);if(r)return i?e.replace(r,n):e;{const i=e.indexOf("?");let[r,o]=e.split("#"),s="&";return i<0?s="?":i===e.length-1&&(s=""),o&&(o="#".concat(o)),"".concat(r).concat(s).concat(t,"=").concat(n).concat(o||"")}}function Om(e,t,n){var i=this;if("function"!=typeof e)throw new TypeError("Expected a function.");let r;return function(){for(var o=arguments.length,s=new Array(o),a=0;a<o;a++)s[a]=arguments[a];const c=()=>{r=null,n||e.apply(i,s)},l=n&&!r;clearTimeout(r),r=setTimeout(c,t),l&&e.apply(i,s)}}function Rm(e){const t=document.cookie.match(new RegExp("(^| )"+e+"=([^;]+)"));return t&&t[2]}function Nm(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const i=document.createEvent("CustomEvent");i.initCustomEvent(t,!0,!0,n),e.dispatchEvent(i)}function xm(){let e,t;const n=new Promise(((n,i)=>{e=n,t=i}));return n.resolve=e,n.reject=t,n}function Pm(e){return void 0!==e.msHidden?e.msHidden:void 0!==e.hidden?e.hidden:void 0}function Mm(e){return"string"!=typeof e?null:e.split("?")[0]}var Dm=Object.freeze({__proto__:null,closest:ym,onload:bm,UnloadHandler:wm,PagehideHandler:Sm,makeArray:Tm,outerWidth:function(e){let t=e.offsetWidth,n=getComputedStyle(e);return t+=(parseInt(n.marginLeft,10)||0)+(parseInt(n.marginRight,10)||0),t},elementInViewport:Cm,hasElementScrolledToThreshold:km,getQueryParam:Im,addTrackingCode:Am,addQueryParam:Lm,debounce:Om,getCookie:Rm,dispatchCustomEvent:Nm,getDeferredPromise:xm,isDocumentHidden:Pm,stripQueryParams:Mm});function Um(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=e.querySelector('meta[name="pageKey"]'),i=e.getElementById("config"),r=i&&"true"===i.dataset.disableJsbeaconPagekeySuffix;return n&&n.content?"".concat(n.content).concat(r||t.skipSuffix?"":"_jsbeacon"):""}function Bm(e){let t=e.querySelector('meta[name="linkedin:pageTag"]');return t&&t.content||""}function qm(){var e,t;const n=null===(e=window.atob(Rm("li_gp")))||void 0===e||null===(t=e.split(";")[2])||void 0===t?void 0:t[0];return!!n&&!parseInt(n)}function Fm(e){let t=e.querySelector('meta[name="locale"]');return t&&t.content||""}function Hm(e){let t=e.domain;return t?t.split(".").slice(-2).join("."):""}function Gm(e){return e&&'"'===e.charAt(0)&&'"'===e.charAt(e.length-1)?e.slice(1,-1):e}var jm=Object.freeze({__proto__:null,getPageKey:Um,getPageTag:Bm,getLiSugrCookie:function(){return Rm("li_sugr")},getGuestRetargetingOptOut:qm,getLocale:Fm,getDomain:Hm,trimDoubleQuotes:Gm});const zm={ARROW_DOWN:"ArrowDown",ARROW_LEFT:"ArrowLeft",ARROW_RIGHT:"ArrowRight",ARROW_UP:"ArrowUp",ESCAPE:"Escape",ENTER:"Enter",SPACEBAR:" ",TAB:"Tab"},Wm={Down:zm.ARROW_DOWN,Right:zm.ARROW_RIGHT,Left:zm.ARROW_LEFT,Up:zm.ARROW_UP,Esc:zm.ESCAPE,Spacebar:zm.SPACEBAR,Tab:zm.TAB};function Km(e){return Wm[e]||e}let Vm,Ym;const Qm=['a[href]:not([tabindex^="-"])','area[href]:not([tabindex^="-"])','input:not([disabled]):not([tabindex^="-"]):not([type="hidden"])','select:not([disabled]):not([tabindex^="-"])','textarea:not([disabled]):not([tabindex^="-"])','button:not([disabled]):not([tabindex^="-"])'],Jm=[...Qm,'[tabindex]:not([tabindex^="-"]):not([disabled])'].join(",");[...Qm,"[tabindex]:not([disabled])"].join(",");function Xm(e){const t=window.getComputedStyle(e);return"hidden"===t.visibility||"none"===t.display}function Zm(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.documentElement,i=arguments.length>2?arguments[2]:void 0;return e===n?!Xm(e):i&&i.get(e)?i.get(e):(Xm(e)?t=!1:e.parentNode&&(t=Zm(e.parentNode,n,i)),i&&i.set(e,t),t)}const $m={POLITE:"polite",ASSERTIVE:"assertive"};function eg(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:$m.POLITE;Vm&&(Vm.removeAttribute("aria-hidden"),Vm.setAttribute("aria-live",$m.POLITE),Vm.textContent="",Vm.textContent=e,Vm.setAttribute("aria-live",t),clearTimeout(Ym),Ym=setTimeout((()=>{Vm.removeAttribute("aria-live"),Vm.setAttribute("aria-hidden","true")}),1e4))}class tg{constructor(e){if(!e)throw new Error("An element must be passed in to Disable Background Navigation");this._container=e,this._hiddenElements=[]}disableBackground(){let e=this._container;for(;e&&e!==document.body&&e.parentElement;)this._hiddenElements=this._hiddenElements.concat([...e.parentElement.children].filter((t=>t!==e&&"true"!==t.getAttribute("aria-hidden")&&(t.setAttribute("aria-hidden",!0),!0)))),e=e.parentElement}enableBackground(){this._hiddenElements.forEach((e=>{e.removeAttribute("aria-hidden")})),this._hiddenElements=[]}}const ng=["class","disabled","style","tabindex","type"];class ig{constructor(e){if(!e)throw new Error("FocusTrap: No focus trap container passed in");this._container=e,this._observer=new MutationObserver((()=>this._setFirstAndLastFocusableEls(this._container))),this._handleKeyDown=this._focusTrap.bind(this),this._backgroundNavigationDisabler=new tg(this._container)}init(){this._observer.observe(this._container,{attributeFilter:ng,attributes:!0,childList:!0,subtree:!0}),this._setFirstAndLastFocusableEls(this._container),this._container.addEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.disableBackground()}tearDown(){this._observer.disconnect(),this._container.removeEventListener("keydown",this._handleKeyDown),this._backgroundNavigationDisabler.enableBackground()}_focusTrap(e){const{key:t,target:n}=e,i=Km(t),r=i===zm.TAB&&e.shiftKey;!r&&i===zm.TAB&&n===this.lastFocusableEl?(this.firstFocusableEl.focus(),e.preventDefault()):r&&n===this.firstFocusableEl&&(this.lastFocusableEl.focus(),e.preventDefault())}_setFirstAndLastFocusableEls(e){const[t,n]=this._getFirstAndLastFocusableEls(e);this.firstFocusableEl=t,this.lastFocusableEl=n,setTimeout((()=>{this._hasFocusBeenDropped()&&("-1"===e.getAttribute("tabindex")?e.focus():this.firstFocusableEl.focus())}),100)}_hasFocusBeenDropped(){const e=document.activeElement;return!e||e===document.body}_getFirstAndLastFocusableEls(e){const t=[...e.querySelectorAll(Jm)],n=new Map;let i,r,o=0,s=t.length-1;for(;(!i||!r)&&o<=s;){if(!i){const r=t[o];i=Zm(r,e,n)&&r,o++}if(!r){const i=t[s];r=Zm(i,e,n)&&i,s--}}return r=r||i,[i,r]}}const rg="collapsible-dropdown";".".concat(rg,"__list"),".".concat(rg,"__button"),".".concat(rg,"__close-button");function og(e){let{method:t="GET",headers:n={},sendCookies:i=!0,skipCsrfToken:r=!1,postData:o,isPemEnabled:s=!1,pemDegradationTrackingMetadata:a=[],pemEntityIds:c=[]}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const l=new Promise(((s,a)=>{const c=new XMLHttpRequest;if(c.addEventListener("load",(function(){if(c.status>=200&&c.status<300||304===c.status)s({status:c.status,responseText:c.responseText});else{const n=new Error("".concat(t," request for ").concat(e," has failed with status code ").concat(c.status));n.response={status:c.status,responseText:c.responseText};const i=c.getAllResponseHeaders();i&&(n.response.rawHeaders=i),a(n)}})),c.addEventListener("error",(function(e){a(e)})),c.open(t,e,!0),c.withCredentials=i,Object.keys(n).forEach((e=>{c.setRequestHeader(e,n[e])})),!r){const e=Rm("JSESSIONID");e&&c.setRequestHeader("Csrf-Token",Gm(e))}c.send(o)}));return s&&(a.length?sg(l,e,c,a):console.warn("Please set the value for the option pemDegradationTrackingMetadata when PEM is enabled.")),l}function sg(e,t,n,i){try{const r=e.then((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e,{status:e.status})})).catch((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Response(e.response,{status:e.response?e.response.status:500,headers:e.response&&e.response.rawHeaders?ag(e.response.rawHeaders):new Headers})}));window.tracking.then((e=>{window.pemTracking.then((o=>{o.trackFeatureDegradationsForFetch(t,n,i,r,e.state.currentPageInstance)}))}))}catch(e){}}function ag(e){const t=new Headers;return e&&e.trim().split(/[\r\n]+/).forEach((e=>{const n=e.trim().split(": "),i=n.shift();if(i){const e=n.join(": ");t.set(i.toLocaleLowerCase(),e)}})),t}var cg="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},lg=(parseInt,"object"==typeof cg&&cg&&cg.Object===Object&&cg),ug="object"==typeof self&&self&&self.Object===Object&&self;lg||ug||Function("return this")(),Object.prototype.toString,Math.max,Math.min;function dg(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function hg(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?dg(Object(n),!0).forEach((function(t){pg(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):dg(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fg(e,t){if(null==e)return{};var n,i,r=function(e,t){if(null==e)return{};var n,i,r={},o=Object.keys(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(i=0;i<o.length;i++)n=o[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}const mg="light",gg="dark";function vg(){const e=document.getElementById("config");let t;return e&&e.dataset&&(t=e.dataset.theme),t?document.documentElement.classList.contains("dark")?gg:mg:void 0}var yg;function bg(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=Cg(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}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,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,o=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw o}}}}function Eg(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wg(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _g(e,t,n){return t&&wg(e.prototype,t),n&&wg(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sg(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Tg(e){return function(e){if(Array.isArray(e))return kg(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Cg(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 Cg(e,t){if(e){if("string"==typeof e)return kg(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)?kg(e,t):void 0}}function kg(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}function Ig(e){return(Ig="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 Ag,Lg=new Uint8Array(16);function Og(){if(!Ag&&!(Ag="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 Ag(Lg)}var Rg=/^(?:[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 Ng(e){return"string"==typeof e&&Rg.test(e)}for(var xg=[],Pg=0;Pg<256;++Pg)xg.push((Pg+256).toString(16).substr(1));function Mg(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(xg[e[t+0]]+xg[e[t+1]]+xg[e[t+2]]+xg[e[t+3]]+"-"+xg[e[t+4]]+xg[e[t+5]]+"-"+xg[e[t+6]]+xg[e[t+7]]+"-"+xg[e[t+8]]+xg[e[t+9]]+"-"+xg[e[t+10]]+xg[e[t+11]]+xg[e[t+12]]+xg[e[t+13]]+xg[e[t+14]]+xg[e[t+15]]).toLowerCase();if(!Ng(n))throw TypeError("Stringified UUID is invalid");return n}function Dg(e){if(!Ng(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 Ug(e,t,n){function i(e,i,r,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 i&&(i=Dg(i)),16!==i.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var s=new Uint8Array(16+e.length);if(s.set(i),s.set(e,i.length),(s=n(s))[6]=15&s[6]|t,s[8]=63&s[8]|128,r){o=o||0;for(var a=0;a<16;++a)r[o+a]=s[a];return r}return Mg(s)}try{i.name=e}catch(e){}return i.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",i.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",i}function Bg(e){return 14+(e+64>>>9<<4)+1}function qg(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function Fg(e,t,n,i,r,o){return qg((s=qg(qg(t,e),qg(i,o)))<<(a=r)|s>>>32-a,n);var s,a}function Hg(e,t,n,i,r,o,s){return Fg(t&n|~t&i,e,t,r,o,s)}function Gg(e,t,n,i,r,o,s){return Fg(t&i|n&~i,e,t,r,o,s)}function jg(e,t,n,i,r,o,s){return Fg(t^n^i,e,t,r,o,s)}function zg(e,t,n,i,r,o,s){return Fg(n^(t|~i),e,t,r,o,s)}function Wg(e,t,n){var i=(e=e||{}).random||(e.rng||Og)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){n=n||0;for(var r=0;r<16;++r)t[n+r]=i[r];return t}return Mg(i)}function Kg(e,t,n,i){switch(e){case 0:return t&n^~t&i;case 1:case 3:return t^n^i;case 2:return t&n^t&i^n&i}}function Vg(e,t){return e<<t|e>>>32-t}Ug("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,i="0123456789abcdef",r=0;r<n;r+=8){var o=e[r>>5]>>>r%32&255,s=parseInt(i.charAt(o>>>4&15)+i.charAt(15&o),16);t.push(s)}return t}(function(e,t){e[t>>5]|=128<<t%32,e[Bg(t)-1]=t;for(var n=1732584193,i=-271733879,r=-1732584194,o=271733878,s=0;s<e.length;s+=16){var a=n,c=i,l=r,u=o;n=Hg(n,i,r,o,e[s],7,-680876936),o=Hg(o,n,i,r,e[s+1],12,-389564586),r=Hg(r,o,n,i,e[s+2],17,606105819),i=Hg(i,r,o,n,e[s+3],22,-1044525330),n=Hg(n,i,r,o,e[s+4],7,-176418897),o=Hg(o,n,i,r,e[s+5],12,1200080426),r=Hg(r,o,n,i,e[s+6],17,-1473231341),i=Hg(i,r,o,n,e[s+7],22,-45705983),n=Hg(n,i,r,o,e[s+8],7,1770035416),o=Hg(o,n,i,r,e[s+9],12,-1958414417),r=Hg(r,o,n,i,e[s+10],17,-42063),i=Hg(i,r,o,n,e[s+11],22,-1990404162),n=Hg(n,i,r,o,e[s+12],7,1804603682),o=Hg(o,n,i,r,e[s+13],12,-40341101),r=Hg(r,o,n,i,e[s+14],17,-1502002290),n=Gg(n,i=Hg(i,r,o,n,e[s+15],22,1236535329),r,o,e[s+1],5,-165796510),o=Gg(o,n,i,r,e[s+6],9,-1069501632),r=Gg(r,o,n,i,e[s+11],14,643717713),i=Gg(i,r,o,n,e[s],20,-373897302),n=Gg(n,i,r,o,e[s+5],5,-701558691),o=Gg(o,n,i,r,e[s+10],9,38016083),r=Gg(r,o,n,i,e[s+15],14,-660478335),i=Gg(i,r,o,n,e[s+4],20,-405537848),n=Gg(n,i,r,o,e[s+9],5,568446438),o=Gg(o,n,i,r,e[s+14],9,-1019803690),r=Gg(r,o,n,i,e[s+3],14,-187363961),i=Gg(i,r,o,n,e[s+8],20,1163531501),n=Gg(n,i,r,o,e[s+13],5,-1444681467),o=Gg(o,n,i,r,e[s+2],9,-51403784),r=Gg(r,o,n,i,e[s+7],14,1735328473),n=jg(n,i=Gg(i,r,o,n,e[s+12],20,-1926607734),r,o,e[s+5],4,-378558),o=jg(o,n,i,r,e[s+8],11,-2022574463),r=jg(r,o,n,i,e[s+11],16,1839030562),i=jg(i,r,o,n,e[s+14],23,-35309556),n=jg(n,i,r,o,e[s+1],4,-1530992060),o=jg(o,n,i,r,e[s+4],11,1272893353),r=jg(r,o,n,i,e[s+7],16,-155497632),i=jg(i,r,o,n,e[s+10],23,-1094730640),n=jg(n,i,r,o,e[s+13],4,681279174),o=jg(o,n,i,r,e[s],11,-358537222),r=jg(r,o,n,i,e[s+3],16,-722521979),i=jg(i,r,o,n,e[s+6],23,76029189),n=jg(n,i,r,o,e[s+9],4,-640364487),o=jg(o,n,i,r,e[s+12],11,-421815835),r=jg(r,o,n,i,e[s+15],16,530742520),n=zg(n,i=jg(i,r,o,n,e[s+2],23,-995338651),r,o,e[s],6,-198630844),o=zg(o,n,i,r,e[s+7],10,1126891415),r=zg(r,o,n,i,e[s+14],15,-1416354905),i=zg(i,r,o,n,e[s+5],21,-57434055),n=zg(n,i,r,o,e[s+12],6,1700485571),o=zg(o,n,i,r,e[s+3],10,-1894986606),r=zg(r,o,n,i,e[s+10],15,-1051523),i=zg(i,r,o,n,e[s+1],21,-2054922799),n=zg(n,i,r,o,e[s+8],6,1873313359),o=zg(o,n,i,r,e[s+15],10,-30611744),r=zg(r,o,n,i,e[s+6],15,-1560198380),i=zg(i,r,o,n,e[s+13],21,1309151649),n=zg(n,i,r,o,e[s+4],6,-145523070),o=zg(o,n,i,r,e[s+11],10,-1120210379),r=zg(r,o,n,i,e[s+2],15,718787259),i=zg(i,r,o,n,e[s+9],21,-343485551),n=qg(n,a),i=qg(i,c),r=qg(r,l),o=qg(o,u)}return[n,i,r,o]}(function(e){if(0===e.length)return[];for(var t=8*e.length,n=new Uint32Array(Bg(t)),i=0;i<t;i+=8)n[i>>5]|=(255&e[i/8])<<i%32;return n}(e),8*e.length))})),Ug("v5",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var i=unescape(encodeURIComponent(e));e=[];for(var r=0;r<i.length;++r)e.push(i.charCodeAt(r))}else Array.isArray(e)||(e=Array.prototype.slice.call(e));e.push(128);for(var o=e.length/4+2,s=Math.ceil(o/16),a=new Array(s),c=0;c<s;++c){for(var l=new Uint32Array(16),u=0;u<16;++u)l[u]=e[64*c+4*u]<<24|e[64*c+4*u+1]<<16|e[64*c+4*u+2]<<8|e[64*c+4*u+3];a[c]=l}a[s-1][14]=8*(e.length-1)/Math.pow(2,32),a[s-1][14]=Math.floor(a[s-1][14]),a[s-1][15]=8*(e.length-1)&4294967295;for(var d=0;d<s;++d){for(var h=new Uint32Array(80),p=0;p<16;++p)h[p]=a[d][p];for(var f=16;f<80;++f)h[f]=Vg(h[f-3]^h[f-8]^h[f-14]^h[f-16],1);for(var m=n[0],g=n[1],v=n[2],y=n[3],b=n[4],E=0;E<80;++E){var w=Math.floor(E/20),_=Vg(m,5)+Kg(w,g,v,y)+b+t[w]+h[E]>>>0;b=y,y=v,v=Vg(g,30)>>>0,g=m,m=_}n[0]=n[0]+m>>>0,n[1]=n[1]+g>>>0,n[2]=n[2]+v>>>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 Yg=null;if("undefined"==typeof crypto||!crypto.getRandomValues){var Qg=("undefined"!=typeof FastBoot?FastBoot.require:require)("crypto");if(Qg){var Jg=new Uint8Array(256),Xg=Jg.length;Yg={rng:function(){return Xg>Jg.length-16&&(Qg.randomFillSync(Jg),Xg=0),Jg.slice(Xg,Xg+=16)}}}}"object"===("undefined"==typeof crypto?"undefined":Ig(crypto))&&crypto.randomUUID;function Zg(){return Wg(Yg,new Array(16),0)}function $g(e){return Tg(e).map((function(e){return String.fromCharCode(e)})).join("")}function ev(){return $g(Zg())}var tv=/^[a-zA-Z0-9/+]+[=]+$/;function nv(e,t){return{pageUrn:rv(e),trackingId:t||function(e){for(var t,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=[],r=0,o=e.length,s=o%3,a=o-s;r<a;)t=e[r]<<16,t|=e[r+1]<<8,t|=e[r+2],i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push(n.charAt(63&t)),r+=3;switch(s){case 2:t=e[r]<<16,t|=e[r+1]<<8,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push(n.charAt(t>>>6&63)),i.push("=");break;case 1:t=e[r]<<16,i.push(n.charAt(t>>>18&63)),i.push(n.charAt(t>>>12&63)),i.push("="),i.push("=")}return i.join("")}(Zg())}}function iv(e,t){return"urn:li:control:".concat(e,"-").concat(t)}function rv(e){return"urn:li:page:".concat(e)}function ov(e,t){return{pageInstance:t.assign({},e.pageInstance),pageKey:e.pageKey,applicationInstance:e.applicationInstance}}function sv(e,t){return void 0!==t.allSettled?t.allSettled(e):function(e){return new Promise((function(t){var n=new Set,i=function(e){n.delete(e),0===n.size&&t()};0===e.length?t():e.map((function(e){return e.then((function(){return i(e)})).catch((function(){return i(e)}))}))}))}(e)}function av(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}function cv(e,t){if("undefined"!=typeof window&&window.indexedDB){var n="sequenceNumber",i=window.indexedDB.open(n);return new Promise((function(r,o){i.onupgradeneeded=function(){var e=i.result;e.objectStoreNames.contains(n)||e.createObjectStore(n,{autoIncrement:!0})},i.onsuccess=function(){var s=i.result,a=s.transaction(n,"readwrite"),c=a.objectStore(n),l=c.get(1);l.onsuccess=function(){var n=l.result;if(n){var i,s=null!==(i=n.sequenceNumber)&&void 0!==i?i:0;if("read"===e)return r(s);if(!("update"===e&&void 0!==t&&t>s))return r(null);var a=c.put({sequenceNumber:t},1);a.onsuccess=function(){return r(null)},a.onerror=function(){o(a.error)}}else{var u=c.add({sequenceNumber:0});u.onsuccess=function(){return r(0)},u.onerror=function(){o(u.error)}}},l.onerror=function(){return s.close(),o(new Error("Error: get sequence number from indexedDB ".concat(String(l.error))))},a.oncomplete=function(){return s.close()}},i.onerror=function(){return r(null)}}))}return Promise.resolve(null)}function lv(e,t,n){var i=e.get(t);i&&i.push(n)||e.set(t,[n])}function uv(e,t,n){var i=e.get(t);i&&i.splice(i.indexOf(n)>>>0,1)}var dv,hv,pv=(dv=new Map,hv=new Map,{on:function(e,t){lv(dv,e,t)},before:function(e,t){lv(hv,e,t)},off:function(e,t){uv(dv,e,t)},offBefore:function(e,t){uv(hv,e,t)},emit:function(e,t){(hv.get(e)||[]).concat(dv.get(e)||[]).slice().map((function(e){e(t)}))},clear:function(){hv.clear(),dv.clear()}});if("undefined"!=typeof document&&"undefined"!=typeof window){var fv=function(e){"pagehide"!==e.type&&"hidden"!==document.visibilityState||pv.emit("internal:hide",e)};document.addEventListener("visibilitychange",fv),window.addEventListener("pagehide",fv)}var mv=Uint8Array,gv=Uint16Array,vv=Uint32Array,yv=new mv([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]),bv=new mv([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]),Ev=new mv([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),wv=function(e,t){for(var n=new gv(31),i=0;i<31;++i)n[i]=t+=1<<e[i-1];var r=new vv(n[30]);for(i=1;i<30;++i)for(var o=n[i];o<n[i+1];++o)r[o]=o-n[i]<<5|i;return[n,r]},_v=wv(yv,2),Sv=_v[0],Tv=_v[1];Sv[28]=258,Tv[258]=28;for(var Cv=wv(bv,0)[1],kv=new gv(32768),Iv=0;Iv<32768;++Iv){var Av=(43690&Iv)>>>1|(21845&Iv)<<1;Av=(61680&(Av=(52428&Av)>>>2|(13107&Av)<<2))>>>4|(3855&Av)<<4,kv[Iv]=((65280&Av)>>>8|(255&Av)<<8)>>>1}var Lv=function(e,t,n){for(var i=e.length,r=0,o=new gv(t);r<i;++r)e[r]&&++o[e[r]-1];var s,a=new gv(t);for(r=0;r<t;++r)a[r]=a[r-1]+o[r-1]<<1;if(n){s=new gv(1<<t);var c=15-t;for(r=0;r<i;++r)if(e[r])for(var l=r<<4|e[r],u=t-e[r],d=a[e[r]-1]++<<u,h=d|(1<<u)-1;d<=h;++d)s[kv[d]>>>c]=l}else for(s=new gv(i),r=0;r<i;++r)e[r]&&(s[r]=kv[a[e[r]-1]++]>>>15-e[r]);return s},Ov=new mv(288);for(Iv=0;Iv<144;++Iv)Ov[Iv]=8;for(Iv=144;Iv<256;++Iv)Ov[Iv]=9;for(Iv=256;Iv<280;++Iv)Ov[Iv]=7;for(Iv=280;Iv<288;++Iv)Ov[Iv]=8;var Rv=new mv(32);for(Iv=0;Iv<32;++Iv)Rv[Iv]=5;var Nv=Lv(Ov,9,0),xv=Lv(Rv,5,0),Pv=function(e){return(e+7)/8|0},Mv=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8},Dv=function(e,t,n){n<<=7&t;var i=t/8|0;e[i]|=n,e[i+1]|=n>>>8,e[i+2]|=n>>>16},Uv=function(e,t){for(var n=[],i=0;i<e.length;++i)e[i]&&n.push({s:i,f:e[i]});var r=n.length,o=n.slice();if(!r)return[zv,0];if(1==r){var s=new mv(n[0].s+1);return s[n[0].s]=1,[s,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var a=n[0],c=n[1],l=0,u=1,d=2;for(n[0]={s:-1,f:a.f+c.f,l:a,r:c};u!=r-1;)a=n[n[l].f<n[d].f?l++:d++],c=n[l!=u&&n[l].f<n[d].f?l++:d++],n[u++]={s:-1,f:a.f+c.f,l:a,r:c};var h=o[0].s;for(i=1;i<r;++i)o[i].s>h&&(h=o[i].s);var p=new gv(h+1),f=Bv(n[u-1],p,0);if(f>t){i=0;var m=0,g=f-t,v=1<<g;for(o.sort((function(e,t){return p[t.s]-p[e.s]||e.f-t.f}));i<r;++i){var y=o[i].s;if(!(p[y]>t))break;m+=v-(1<<f-p[y]),p[y]=t}for(m>>>=g;m>0;){var b=o[i].s;p[b]<t?m-=1<<t-p[b]++-1:++i}for(;i>=0&&m;--i){var E=o[i].s;p[E]==t&&(--p[E],++m)}f=t}return[new mv(p),f]},Bv=function e(t,n,i){return-1==t.s?Math.max(e(t.l,n,i+1),e(t.r,n,i+1)):n[t.s]=i},qv=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new gv(++t),i=0,r=e[0],o=1,s=function(e){n[i++]=e},a=1;a<=t;++a)if(e[a]==r&&a!=t)++o;else{if(!r&&o>2){for(;o>138;o-=138)s(32754);o>2&&(s(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(s(r),--o;o>6;o-=6)s(8304);o>2&&(s(o-3<<5|8208),o=0)}for(;o--;)s(r);o=1,r=e[a]}return[n.subarray(0,i),t]},Fv=function(e,t){for(var n=0,i=0;i<t.length;++i)n+=e[i]*t[i];return n},Hv=function(e,t,n){var i=n.length,r=Pv(t+2);e[r]=255&i,e[r+1]=i>>>8,e[r+2]=255^e[r],e[r+3]=255^e[r+1];for(var o=0;o<i;++o)e[r+o+4]=n[o];return 8*(r+4+i)},Gv=function(e,t,n,i,r,o,s,a,c,l,u){Mv(t,u++,n),++r[256];for(var d=Uv(r,15),h=d[0],p=d[1],f=Uv(o,15),m=f[0],g=f[1],v=qv(h),y=v[0],b=v[1],E=qv(m),w=E[0],_=E[1],S=new gv(19),T=0;T<y.length;++T)S[31&y[T]]++;for(T=0;T<w.length;++T)S[31&w[T]]++;for(var C=Uv(S,7),k=C[0],I=C[1],A=19;A>4&&!k[Ev[A-1]];--A);var L,O,R,N,x=l+5<<3,P=Fv(r,Ov)+Fv(o,Rv)+s,M=Fv(r,h)+Fv(o,m)+s+14+3*A+Fv(S,k)+(2*S[16]+3*S[17]+7*S[18]);if(x<=P&&x<=M)return Hv(t,u,e.subarray(c,c+l));if(Mv(t,u,1+(M<P)),u+=2,M<P){L=Lv(h,p,0),O=h,R=Lv(m,g,0),N=m;var D=Lv(k,I,0);for(Mv(t,u,b-257),Mv(t,u+5,_-1),Mv(t,u+10,A-4),u+=14,T=0;T<A;++T)Mv(t,u+3*T,k[Ev[T]]);u+=3*A;for(var U=[y,w],B=0;B<2;++B){var q=U[B];for(T=0;T<q.length;++T){var F=31&q[T];Mv(t,u,D[F]),u+=k[F],F>15&&(Mv(t,u,q[T]>>>5&127),u+=q[T]>>>12)}}}else L=Nv,O=Ov,R=xv,N=Rv;for(T=0;T<a;++T)if(i[T]>255){F=i[T]>>>18&31,Dv(t,u,L[F+257]),u+=O[F+257],F>7&&(Mv(t,u,i[T]>>>23&31),u+=yv[F]);var H=31&i[T];Dv(t,u,R[H]),u+=N[H],H>3&&(Dv(t,u,i[T]>>>5&8191),u+=bv[H])}else Dv(t,u,L[i[T]]),u+=O[i[T]];return Dv(t,u,L[256]),u+O[256]},jv=new vv([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),zv=new mv(0),Wv=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,i=9;--i;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),Kv=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function Vv(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,i=0;i<t.length;++i)n=Wv[255&n^t[i]]^n>>>8;e=n},d:function(){return~e}}}(),i=e.length;n.p(e);var r,o,s,a=(r=e,o=t,s=function(e){return 10+(e.filename&&e.filename.length+1||0)}(t),8,function(e,t,n,i,r,o){var s=e.length,a=new mv(i+s+5*(1+Math.ceil(s/7e3))+r),c=a.subarray(i,a.length-r),l=0;if(!t||s<8)for(var u=0;u<=s;u+=65535){var d=u+65535;d>=s&&(c[l>>3]=o),l=Hv(c,l+1,e.subarray(u,d))}else{for(var h=jv[t-1],p=h>>>13,f=8191&h,m=(1<<n)-1,g=new gv(32768),v=new gv(m+1),y=Math.ceil(n/3),b=2*y,E=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<b)&m},w=new vv(25e3),_=new gv(288),S=new gv(32),T=0,C=0,k=(u=0,0),I=0,A=0;u<s;++u){var L=E(u),O=32767&u,R=v[L];if(g[O]=R,v[L]=O,I<=u){var N=s-u;if((T>7e3||k>24576)&&N>423){l=Gv(e,c,0,w,_,S,C,k,A,u-A,l),k=T=C=0,A=u;for(var x=0;x<286;++x)_[x]=0;for(x=0;x<30;++x)S[x]=0}var P=2,M=0,D=f,U=O-R&32767;if(N>2&&L==E(u-U))for(var B=Math.min(p,N)-1,q=Math.min(32767,u),F=Math.min(258,N);U<=q&&--D&&O!=R;){if(e[u+P]==e[u+P-U]){for(var H=0;H<F&&e[u+H]==e[u+H-U];++H);if(H>P){if(P=H,M=U,H>B)break;var G=Math.min(U,H-2),j=0;for(x=0;x<G;++x){var z=u-U+x+32768&32767,W=z-g[z]+32768&32767;W>j&&(j=W,R=z)}}}U+=(O=R)-(R=g[O])+32768&32767}if(M){w[k++]=268435456|Tv[P]<<18|Cv[M];var K=31&Tv[P],V=31&Cv[M];C+=yv[K]+bv[V],++_[257+K],++S[V],I=u+P,++T}else w[k++]=e[u],++_[e[u]]}}l=Gv(e,c,o,w,_,S,C,k,A,u-A,l),!o&&7&l&&(l=Hv(c,l+1,zv))}return function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var i=new(2==e.BYTES_PER_ELEMENT?gv:4==e.BYTES_PER_ELEMENT?vv:mv)(n-t);return i.set(e.subarray(t,n)),i}(a,0,i+Pv(l)+r)}(r,null==o.level?6:o.level,null==o.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(r.length)))):12+o.mem,s,8,!0)),c=a.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&&Kv(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var i=0;i<=n.length;++i)e[i+10]=n.charCodeAt(i)}}(a,t),Kv(a,c-8,n.d()),Kv(a,c-4,i),a}var Yv="undefined"!=typeof TextDecoder&&new TextDecoder;try{Yv.decode(zv,{stream:!0})}catch(ir){}function Qv(){return"undefined"!=typeof window&&"function"==typeof window.fetch}function Jv(){try{return Qv()&&"keepalive"in new Request("")}catch(e){return!1}}function Xv(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("undefined"!=typeof window&&void 0!==window.XMLHttpRequest){var i=new XMLHttpRequest;if(i.open("POST",e,!0),i.withCredentials=!0,n.headers)for(var r=0,o=Object.keys(n.headers);r<o.length;r++){var s=o[r];i.setRequestHeader(s,n.headers[s])}i.send(t)}}function Zv(e){var t=e.body,n=e.keepalive,i=e.headers,r=e.compress;i["content-type"]||(i["content-type"]="text/plain;charset=UTF-8");var o=t;if(r&&"undefined"!=typeof TextEncoder)try{o=Vv((new TextEncoder).encode(t)),i["content-encoding"]="gzip"}catch(e){}return{body:o,keepalive:n,credentials:"include",headers:i,method:"POST",mode:"cors"}}function $v(e){return e&&"message"in e?e.message:"UNKNOWN_ERROR"}var ey,ty="undefined"!=typeof navigator&&"sendBeacon"in navigator,ny=Jv()?function(e,t,n,i){return new Promise((function(r){fetch(e,Zv({body:t,keepalive:!0,headers:n,compress:i})).catch((function(){return fetch(e,Zv({body:t,keepalive:!1,headers:n,compress:i}))})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:e.status}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:$v(e)})}))}))}:function(e,t,n,i){return new Promise((function(r){if(ty){var o=!1;try{o=navigator.sendBeacon(e,t)}catch(e){}if(o)return void r({type:"unknown",drop:!1})}fetch(e,Zv({body:t,keepalive:!1,headers:n,compress:i})).then((function(e){e.ok?r({type:"success",drop:!1,statusCode:200}):r({type:"response",drop:!0,statusCode:e.status,rawError:e.statusText})}),(function(e){return r({type:"network",drop:!0,rawError:$v(e)})}))}))};function iy(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 ry(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"key",i=arguments.length>3?arguments[3]:void 0,r=indexedDB.open(e);r.onupgradeneeded=function(){try{r.result.createObjectStore(t,{keyPath:n})}catch(e){null==i||i.onError(e)}};var o=new Promise((function(e,t){r.onsuccess=function(){var t=r.result;t.onversionchange=function(){return t.close()},e(t),null==i||i.onSuccess()},r.onerror=function(){t(r.error),null==i||i.onError(r.error)}}));return function(e,n){return o.then((function(i){return n(i.transaction(t,e).objectStore(t))}))}}function oy(){return ey||(ey=ry("idb-queue","default")),ey}function sy(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{maxNumber:1e3,batchEvictionNumber:300},n=0,i=null;return e.openKeyCursor().onsuccess=function(){var r=this.result;r&&n++<t.batchEvictionNumber?(i=r.key,r.continue()):null!=i&&e.delete(IDBKeyRange.upperBound(i))},iy(e.transaction)}function ay(){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]:oy();return t("readwrite",(function(t){return sy(t,e)}))}var cy=!1;function ly(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]:oy();return n("readwrite",(function(n){return n.put(e),iy(n.count()).then((function(e){if(!(e<=t.maxNumber))return sy(n,t)}))})).catch((function(e){if(e&&"QuotaExceededError"===e.name)return ay(t,n)}))}function uy(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]:oy();return cy?Promise.resolve():ly(e,t,n)}function dy(e,t,n){return t("readwrite",(function(t){var i=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(i.push(t.value),t.delete(),(e<0||i.length<e)&&t.continue())},iy(t.transaction).then((function(){return i}))}))}function hy(e,t,n){return t("readonly",(function(t){var i=[];return t.openCursor(null,n).onsuccess=function(){var t=this.result;t&&(i.push(t.value),(e<0||i.length<e)&&t.continue())},iy(t.transaction).then((function(){return i}))}))}function py(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oy();return hy(e,t,"next")}function fy(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:oy();return hy(e,t,"prev")}function my(){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,i=arguments.length>3?arguments[3]:void 0;return!t||n<1||(e[t]=JSON.stringify({attempt:n,errorCode:i})),e}function gy(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.debug("[beacon-transporter] ",e())}function vy(e){"undefined"!=typeof window&&window.__DEBUG_BEACON_TRANSPORTER&&console.error("[beacon-transporter] ",e())}function yy(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(i){i.timeRemaining()>t.timeRemaining||i.didTimeout?e():n()}),{timeout:t.timeout})};n()}}function by(e,t){var n=0;return{throttledFn:function(){var i=Date.now();i-n>t&&(gy((function(){return"[throttle] Run fn() at "+String(i)})),e(),n=i)},resetThrottle:function(){n=0}}}var Ey=function(){function e(t){var n=this,i=arguments.length>1&&void 0!==arguments[1]&&arguments[1];Eg(this,e),Sg(this,"config",void 0),Sg(this,"compress",void 0),Sg(this,"throttleControl",void 0),Sg(this,"withStore",void 0),Sg(this,"disablePersistence",!1),this.config=t,this.compress=i;var r=t.measureIDB;r&&performance.mark(r.createStartMark),this.withStore=ry(t.idbName,"beacons","timestamp",{onSuccess:function(){r&&performance.measure(r.createSuccessMeasure,r.createStartMark)},onError:function(){r&&performance.measure(r.createFailMeasure,r.createStartMark),n.disablePersistence=!0}}),this.throttleControl=by(this.replayEntries.bind(this),t.throttleWait)}return _g(e,[{key:"onNotify",value:function(){this.disablePersistence||this.throttleControl.throttledFn()}},{key:"push",value:function(e){var t=this;if(!this.disablePersistence){var n=function(){gy((function(){return"Persisting to DB "+e.url})),uy(e,t.config,t.withStore).then((function(){t.throttleControl.resetThrottle(),gy((function(){return"push completed"}))})).catch((function(){t.disablePersistence=!0,vy((function(){return"push failed"}))}))};this.config.useIdle?yy(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]:oy();return cy=!0,e("readwrite",(function(e){return e.clear(),iy(e.transaction).finally((function(){return cy=!1}))}))}(this.withStore).catch((function(){e.disablePersistence=!0,vy((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([]):py(t,this.withStore).catch((function(){return e.disablePersistence=!0,vy((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([]):fy(t,this.withStore).catch((function(){return e.disablePersistence=!0,vy((function(){return"peekBack failed"})),[]}))}},{key:"replayEntries",value:function(){var e=this;if(!this.disablePersistence){var t=function(){gy((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]:oy();return dy(e,t,"next")}(1,e.withStore).then((function(t){if(t.length>0){var n,i,r=t[0],o=r.url,s=r.body,a=r.headers,c=r.timestamp,l=r.statusCode,u=r.attemptCount;return gy((function(){return"header: ".concat(String(e.config.headerName),"; attemptCount: ").concat(u)})),null===(n=(i=e.config).onBeforeRetry)||void 0===n||n.call(i,s),ny(o,s,my(a,e.config.headerName,u,l),e.compress).then((function(t){if("unknown"===t.type||"success"===t.type){var n,i;null===(n=(i=e.config).onResult)||void 0===n||n.call(i,t,s),e.replayEntries()}else{var r,a,d,h,p,f;if(u+1>e.config.attemptLimit)return gy((function(){return"Exceeded attempt count, dropping the entry: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),t.drop=!0,void(null===(r=(a=e.config).onResult)||void 0===r||r.call(a,t,s));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,s),gy((function(){return"Replaying the entry failed, pushing back to IDB: "+JSON.stringify({url:o,timestamp:c,statusCode:l},null,2)})),uy({url:o,body:s,timestamp:c,statusCode:l,attemptCount:u+1},e.config,e.withStore);t.drop=!0,null===(p=(f=e.config).onResult)||void 0===p||p.call(f,t,s)}}))}})).catch((function(t){e.disablePersistence=!0,t&&t.message&&vy((function(){return"Replay entry failed: ".concat(t.message)}))}))};this.config.useIdle?yy(t):t()}}}]),e}(),wy=function(){function e(){Eg(this,e)}return _g(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}(),_y=function(){function e(t,n){Eg(this,e),Sg(this,"queue",void 0),Sg(this,"beaconListeners",new Set),this.queue=e.hasSupport&&!n.disablePersistenceRetry?new Ey(t,n.compress):new wy}return _g(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}();Sg(_y,"hasSupport","undefined"!=typeof globalThis&&!!globalThis.indexedDB);var Sy=[502,504],Ty=[429,503],Cy=function(){function e(t,n,i,r){var o=this,s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];Eg(this,e),Sg(this,"url",void 0),Sg(this,"body",void 0),Sg(this,"config",void 0),Sg(this,"persistenceConfig",void 0),Sg(this,"compress",void 0),Sg(this,"timestamp",void 0),Sg(this,"isClearQueuePending",!1),Sg(this,"onClearCallback",void 0),this.url=t,this.body=n,this.config=i,this.persistenceConfig=r,this.compress=s,this.timestamp=Date.now(),this.onClearCallback=function(){return o.isClearQueuePending=!0}}return _g(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 ny(e.url,e.body,t,e.compress)}),n,t).finally((function(){gy((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,i){var r=this,o=this.getAttemptCount(t)-1;return e(my(n,this.config.headerName,o,i)).then((function(i){var o,s,a,c;if(i.drop=!1,"unknown"===i.type||"success"===i.type)r.isClearQueuePending||r.persistenceConfig.disabled||r.persistenceConfig.db.notifyQueue(),a=i;else if(gy((function(){return"retry rejected "+JSON.stringify(i)})),r.shouldPersist(t,i))r.persistenceConfig.db.pushToQueue({url:r.url,body:r.body,headers:n,statusCode:i.statusCode,timestamp:r.timestamp,attemptCount:r.getAttemptCount(t)}),a={type:"persisted",drop:!1,statusCode:i.statusCode};else{if(t>0&&r.isRetryableError(i)){var l,u;null===(l=(u=r.config).onIntermediateResult)||void 0===l||l.call(u,i,r.body);var d=r.config.calculateRetryDelay(r.getAttemptCount(t),t);return gy((function(){return"in memory retry in ".concat(d,"ms")})),(c=d,new Promise((function(e){return setTimeout(e,c)}))).then((function(){return r.retry(e,t-1,n,i.statusCode)}))}(a=i).drop=!0}return null===(o=(s=r.config).onIntermediateResult)||void 0===o||o.call(s,a,r.body),a}))}},{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 ky(e,t,n,i,r){"control"!==i&&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&&Jv()&&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 s,a,c=null!==(s=e.retryConfig.inMemory)&&void 0!==s?s:{attemptLimit:4,statusCodes:[502,504]},l=null!==(a=e.retryConfig.persist)&&void 0!==a?a:{attemptLimit:3,statusCodes:[429,503],maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},u={compress:n,inMemoryRetry:{onIntermediateResult:null==r?void 0:r.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==r?void 0:r.onBeforeRetry,onResult:null==r?void 0:r.onResult,idbName:"beacons",attemptLimit:l.attemptLimit,statusCodes:l.statusCodes,maxNumber:l.maxNumber,batchEvictionNumber:l.batchEvictionNumber,throttleWait:l.throttleWait,useIdle:!0,measureIDB:{createStartMark:"idb_open_start",createSuccessMeasure:"idb_open_success_phase",createFailMeasure:"idb_open_fail_phase"}}},d=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=Boolean(t.compress),i=Object.assign({attemptLimit:0,statusCodes:Sy,calculateRetryDelay:function(e,t){return 2e3*t}},t.inMemoryRetry);if(t.retryDB)e=t.retryDB;else{var r=Object.assign({idbName:"beacon-transporter",attemptLimit:3,statusCodes:Ty,maxNumber:1e3,batchEvictionNumber:300,throttleWait:3e5},t.persistenceRetry);r.headerName=r.headerName||i.headerName,e=new _y(r,{compress:t.compress,disablePersistenceRetry:t.disablePersistenceRetry})}return{beacon:function(r,o,s){var a;return Qv()?new Cy(r,o,i,{db:e,disabled:Boolean(t.disablePersistenceRetry),statusCodes:(null===(a=t.persistenceRetry)||void 0===a?void 0:a.statusCodes)||Ty},n).send(s):Promise.resolve({type:"unknown",drop:!0})},database:e}}(u),h=d.beacon,p=d.database;return e.retryBeacon={shouldRetry:!0,beacon:h,database:p},"enabled"===i?(e.retryBeacon.shouldRetry=!1,!u.disablePersistenceRetry&&t.shouldAnonymizeMemberId()?p.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 p.clearQueue()}}),(function(){return p.clearQueue()})).then((function(){e.retryBeacon.shouldRetry=!0})).catch((function(e){pv.emit("internal:error",{tags:["core-web-tracking:retry:idb"],reason:e})})):(e.retryBeacon.shouldRetry=!0,Promise.resolve())):void 0})).catch((function(e){pv.emit("internal:error",{tags:["core-web-tracking:retry:setup"],reason:e})}))}var Iy=function(){function e(t){Eg(this,e),Sg(this,"host",void 0),this.host=t}return _g(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&&ky(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){pv.emit("internal:error",{tags:["core-web-tracking:retry:logout"],reason:e})}))}},{key:"sendPayload",value:function(e,t,n,i){var r,o=this.getRetryTreatment();Jv()&&"control"!==o&&null!==(r=this.host.retryBeacon)&&void 0!==r&&r.shouldRetry?this.sendPayloadWithRetry(e,t,n):this.sendPayloadFireForget(e,t,n,i)}},{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){pv.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]:{},i=arguments.length>3?arguments[3]:void 0;if(!Array.isArray(t)||t.length>0){var r="undefined"!=typeof navigator&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1;r||!Qv()||"undefined"==typeof Promise?Xv(e,JSON.stringify(t),{headers:n}):ny(e,JSON.stringify(t),n,this.shouldCompressPayload()).then((function(e){null==i||i.onResult(e,t)}),(function(){}))}}},{key:"getRetryTreatment",value:function(){var e,t,n;if(!this.host.retryConfig)return"control";var i=this.host.retryConfig.lixKey;return i?null!==(e=null===(t=(n=this.host).__getLixTreatment)||void 0===t?void 0:t.call(n,i))&&void 0!==e?e:"control":"enabled"}},{key:"shouldCompressPayload",value:function(){return!0!==this.host.disableCompression}}]),e}(),Ay="undefined"!=typeof window&&"undefined"!=typeof document,Ly=/JSESSIONID="?([^";]+)"?/,Oy="",Ry=0;function Ny(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.cacheLifeSpan,n=void 0===t?1e4:t,i=e.regex,r=void 0===i?Ly:i;if(!Oy||Date.now()-Ry>n){var o=Ay&&document.cookie.match(r);Oy=o&&o[1]||"",Ry=Date.now()}return Oy}var xy=function(){function e(t){Eg(this,e),Sg(this,"networkTransporter",void 0),Sg(this,"inactive",void 0),Sg(this,"mpName",void 0),Sg(this,"endpoint",void 0),Sg(this,"debug",void 0),this.networkTransporter=new Iy(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=My;break;case"https://www.linkedin-ei.com/li/track/validate":default:n=!0,t=Py;break;case"https://www.linkedin-ei.com/li/track":t=Py}return{endpoint:t,debug:n}}(t.endpoint);this.endpoint=n.endpoint,this.debug=n.debug}return _g(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":Ny(),"x-restli-protocol-version":"2.0.0"},n={fragmentEvent:e,debug:this.debug};this.networkTransporter.sendPayload(this.endpoint,n,t)}}}]),e}(),Py="https://www.linkedin-ei.com/trackingMonitoring/?action=saveClientFragment",My="https://www.linkedin.com/trackingMonitoring/?action=saveClientFragment";function Dy(e){return"string"==typeof e}function Uy(e){return Dy(e)?e:e.topicName||e.eventName}function By(e){return Dy(e)?e:e.eventName}var qy,Fy,Hy=function(){function e(t){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Eg(this,e),Sg(this,"host",void 0),Sg(this,"cmoTransporter",void 0),Sg(this,"clientMonitoringInstanceId",ev()),Sg(this,"currentContext",zy()),Sg(this,"appState",{}),Sg(this,"estimatedFragmentSize",0),Sg(this,"fragmentSizeLimit",void 0),Sg(this,"activeFragmentEvent",void 0),Sg(this,"debounceTimer",void 0),this.host=t,this.cmoTransporter=i.cmoTransporter||new xy(t),this.fragmentSizeLimit=(null===(n=t.clientMonitoringConfig)||void 0===n?void 0:n.fragmentSizeLimit)||10240,this.activeFragmentEvent=jy(this.clientMonitoringInstanceId,0,0,!1,this.getEventHeaders())}return _g(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,i=bg(this.activeFragmentEvent.stats.previousInstanceEventStats);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(r.instanceId===e)return void t(r)}}catch(e){i.e(e)}finally{i.f()}var o=this.getEventHeaders(),s=o.header,a=o.requestHeader,c={header:Object.assign(s,{memberId:-1}),requestHeader:a,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,i){var r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:this.getCurrentInstanceId(),o=this.getEventHeaders(),s=o.header,a=o.requestHeader,c={header:Object.assign(s,{memberId:-1}),requestHeader:a,instanceId:r,instanceEventNumber:i,reason:e,rawError:n,eventName:By(t),eventTopic:Uy(t)};this.estimatedFragmentSize+=JSON.stringify(c).length,r===this.getCurrentInstanceId()?this.activeFragmentEvent.stats.failures.push(c):this.findPreviousInstanceStat(r,(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,i=t.requestHeader,r=this.activeFragmentEvent;r.header=n,r.requestHeader=i,this.cmoTransporter.fireFragment(r),this.estimatedFragmentSize=0,this.activeFragmentEvent=jy(this.clientMonitoringInstanceId,r.fragmentNumber+1,r.firstEventNumber+r.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=Wy(e.trackingId));var t=this.currentContext.pageInstance;return t.trackingId=Wy(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 Gy(e){return qy||(qy=new Hy(e)),{getCurrentInstanceId:function(){return qy.getCurrentInstanceId()},logEventGenerated:function(e){return qy.logEventGenerated(e)},logEventReadyToSend:function(e){qy.logEventReadyToSend(e)},logEventSent:function(e){qy.logEventSent(e)},logPersistedEventSent:function(e,t){qy.logEventSent(t,e)},logNetworkResponseCode:function(e){qy.logNetworkResponseCode(e)},logPersistedNetworkResponseCode:function(e,t){var n;null===(n=qy)||void 0===n||n.logNetworkResponseCode(t,e)},logFailedEvent:function(e,t,n,i){qy.logFailedEvent(e,t,n,i)},logPersistedFailedEvent:function(e,t,n,i,r){qy.logFailedEvent(t,n,i,r,e)},flush:function(){qy.flush()},destroy:function(){qy=void 0},isDestroyed:function(){return void 0===qy},setCurrentContext:function(e){qy.setCurrentContext(e)},updateAppState:function(e){qy.updateAppState(e)}}}function jy(e,t,n,i,r){return{fragmentNumber:t,firstEventNumber:n,isLastFragment:i,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:r.requestHeader,header:r.header}}function zy(){return{pageKey:"unknown",pageInstance:nv("unknown")}}function Wy(e){return Array.isArray(e)?$g(e):16===e.length?e:function(e){return"string"==typeof e&&!!e.match(tv)}(e)?atob(e):$g(function(e){return Dg(e)}(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"}(Fy||(Fy={}));var Ky="PageViewEvent",Vy=function(){function e(t){var n=this;Eg(this,e),Sg(this,"host",void 0),Sg(this,"queue",void 0),Sg(this,"preContextQueue",void 0),Sg(this,"debounceTimer",void 0),Sg(this,"unloadHandlers",void 0),Sg(this,"maxQueueSize",void 0),Sg(this,"flushDebounceTime",void 0),Sg(this,"trackingEventListeners",[]),Sg(this,"onHideHandler",(function(){n.forceFlush()})),Sg(this,"networkTransporter",void 0),Sg(this,"clientMonitoringConn",void 0),Sg(this,"clientSequenceNumberCounter",void 0),Sg(this,"isTimerRunning",void 0),Sg(this,"enableSequenceNumberLix",void 0),this.host=t,this.queue=[],this.preContextQueue=[],this.unloadHandlers=[];var i=t.batching;this.maxQueueSize=i&&i.maxSize||1,this.flushDebounceTime=i&&i.debounceTime||0,pv.on("internal:hide",this.onHideHandler),this.networkTransporter=new Iy(t),this.isLixEnabled("pemberly.tracking.monitoring")&&t.clientMonitoringConfig&&!t.inactive&&(this.clientMonitoringConn=Gy(t)),this.enableSequenceNumberLix=this.isLixEnabled("tracking.data-loss-web.sequence-number"),this.enableSequenceNumberLix&&(this.getSequenceNumberFromIDB(),this.updateSequenceNumberOnExit(),this.isTimerRunning=!1)}return _g(e,[{key:"checkAndEnablePersistentRetry",value:function(e){var t,n=(t=this.clientMonitoringConn,{onIntermediateResult:function(e,n){var i;if(t&&!t.isDestroyed())try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length)return;e.statusCode&&t.logNetworkResponseCode(e.statusCode),!0===e.drop&&i.forEach((function(n){var i,r=n.eventInfo.eventName,o=n.eventInfo.topicName||r,s="rawError"in e?e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(s)].join(", ");t.logFailedEvent(Fy.UNKNOWN_EXECUTION_ERROR,{eventName:r,topicName:o},a,null!==(i=n.eventBody.header.clientMonitoringInstanceEventNumber)&&void 0!==i?i:-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 i=n[0].eventBody.header.clientMonitoringInstanceId,r=n.length;t.logPersistedEventSent(i,r)}catch(e){}},onResult:function(e,n){var i;if(t)try{if(i=JSON.parse(n),!Array.isArray(i)||0===i.length||!i[0].eventBody.header.clientMonitoringInstanceId)return;var r=i[0].eventBody.header.clientMonitoringInstanceId;e.statusCode&&t.logPersistedNetworkResponseCode(r,e.statusCode),!0===e.drop&&i.forEach((function(n){var i=n.eventInfo.eventName,o=n.eventInfo.topicName||i,s="rawError"in e?e.rawError:"null",a=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(s)].join(", ");t.logPersistedFailedEvent(r,Fy.UNKNOWN_EXECUTION_ERROR,{eventName:i,topicName:o},a,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(Uy(e.id)));var n,i=this.host,r=i.api.Promise,o=i.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(),r.resolve(!0)):(this.flush(!0),r.resolve(!0))):(this.preContextQueue.push(t),r.resolve(!0))}},{key:"callOnDestroy",value:function(e){this.unloadHandlers.push(e)}},{key:"destroy",value:function(){this.unloadHandlers.forEach((function(e){return e()})),this.forceFlush(),this.trackingEventListeners=[],this.clientMonitoringConn=void 0,pv.off("internal:hide",this.onHideHandler)}},{key:"forceFlush",value:function(){var e=this;this.populatePreContextQueue({pageInstance:nv("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;cv("read").then((function(t){e.clientSequenceNumberCounter=t||0})).catch((function(e){pv.emit("internal:error",{tags:["core-web-tracking:sequence-number:idb-read"],reason:e})}))}},{key:"updateSequenceNumberToIDB",value:function(){cv("update",this.clientSequenceNumberCounter).catch((function(e){pv.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=ov(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 i=this.host,r=i.appId,o=i.api,s={eventBody:t,eventInfo:"string"==typeof e?{appId:r,eventName:e,topicName:e}:o.assign({appId:r},e)};return n.length>0&&this.host.api.assign(s,{clientBreadcrumbs:n}),s}},{key:"getBreadcrumbs",value:function(e){return e.clientBreadcrumbs||[]}},{key:"getGenericEventBody",value:function(e){var t,n=this.host,i=n.appVersion,r=n.locale,o=n.api,s=o.location,a=o.document,c=o.assign,l=e.meta.context,u=l.pageKey,d=l.pageInstance,h=function(e){return"string"==typeof e?e===Ky:e.eventName===Ky}(e.id)&&(null===(t=e.body.requestHeader)||void 0===t?void 0:t.pageKey)||u,p=null;"string"!=typeof r&&null!==this.host.locale||(p=r);var f={interfaceLocale:p,pageKey:h,path:s.pathname+s.search,referer:a.referrer},m={pageInstance:d,time:e.meta.time,version:i};"number"==typeof this.clientSequenceNumberCounter&&c(m,{clientGlobalSequenceNumber:this.clientSequenceNumberCounter});var g={header:c(m,e.meta.header||{}),requestHeader:c(f,e.meta.requestHeader||{})},v=e.meta.clientMonitoringInstanceId,y=e.meta.clientMonitoringInstanceEventNumber;return v&&c(g.header,{clientMonitoringInstanceId:v,clientMonitoringInstanceEventNumber:y}),c(e.body,g)}},{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,i,r=[],o=[];t.forEach((function(t){var n=e.getGenericEventBody(t),i=e.getBreadcrumbs(t),s=e.envelop(t.id,n,i);e.trigger(s,t.meta);var a=s.eventInfo.eventName;"LixTreatmentsEvent"===a||"JavaScriptErrorEvent"===a?r.push(s):o.push(s),e.enableSequenceNumberLix&&"number"==typeof e.clientSequenceNumberCounter&&e.clientSequenceNumberCounter++})),this.host.inactive||(this.clientMonitoringConn&&(this.clientMonitoringConn.logEventSent(r.length+o.length),i=this.clientMonitoringConn,n={onResult:function(e,t){i&&!i.isDestroyed()&&(e.statusCode&&i.logNetworkResponseCode(e.statusCode),!0===e.drop&&t.forEach((function(t){var n=t.eventInfo.eventName,r=t.eventInfo.topicName||n,o="rawError"in e?e.rawError:"null",s=["type: ".concat(e.type),"statusCode: ".concat(e.statusCode||"null"),"drop: ".concat(String(e.drop)),"rawError: ".concat(o)].join(", ");null==i||i.logFailedEvent(Fy.UNKNOWN_EXECUTION_ERROR,{eventName:n,topicName:r},s,t.eventBody.header.clientMonitoringInstanceEventNumber||-1)})))}}),this.networkTransporter.sendPayloadFireForget(this.host.endpoint,r,void 0,n),this.networkTransporter.sendPayload(this.host.endpoint,o,void 0,n))}}}]),e}();var Yy,Qy=function(){function e(t,n){Eg(this,e),this.clientBreadcrumbType=t,this.id=n}return _g(e,[{key:"builder",get:function(){return function(){var e={},t=new Proxy({},{get:function(n,i){return"build"===i?function(){return e}:function(n){return e[i.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 Jy(e){if(!e)return{};var t=e.trk,n=!1,i=e.licu&&decodeURIComponent(e.licu);e.external_control&&(i="urn:li:externalControl:".concat(decodeURIComponent(e.external_control)),n=!0);var r=e.lipi&&function(e){var t=decodeURIComponent(e).split(";");if(t.length>1)return{pageUrn:t[0],trackingId:t[1]}}(e.lipi),o=r&&{pageInstance:r,pageKey:t}||t&&{pageKey:t};if(e.external_page&&e.external_page_instance){var s=decodeURIComponent(e.external_page);o={pageInstance:{pageUrn:"urn:li:externalPage:".concat(s),trackingId:e.external_page_instance},pageKey:s},n=!0}var a=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 a&&((o=o||{}).applicationInstance=a),{fromExternalApp:n||!!a,previousApplicationInstance:a,previousContext:o,previousControlId:e.lici&&decodeURIComponent(e.lici),previousControlUrn:i}}function Xy(e){return"retryConfig"in e.host}!function(e){e.UNKNOWN="UNKNOWN",e.ME_NOTIFICATION="ME_NOTIFICATION",e.ME_NOTIFICATION_ACTION="ME_NOTIFICATION_ACTION"}(Yy||(Yy={}));var Zy,$y,eb;!function(){function e(t,n){var i,r;if(Eg(this,e),Sg(this,"transporter",void 0),Sg(this,"delegate",void 0),Sg(this,"currentContext",void 0),Sg(this,"appState",void 0),Sg(this,"previousAppContext",void 0),Sg(this,"customTransporters",void 0),Sg(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 s=this.transporter.host.api.assign({},this.transporter.host);this.customTransporters[o]=new Vy(this.transporter.host.api.assign(s,n.customTransporterHosts[o]))}"enabled"===(null===(i=(r=t.host).__getLixTreatment)||void 0===i?void 0:i.call(r,"pemberly.tracking.monitoring"))&&t.host.clientMonitoringConfig&&!t.host.inactive&&"location"in t.host.api&&(this.clientMonitoringConn=Gy(t.host))}_g(e,[{key:"host",get:function(){return this.transporter.host}},{key:"checkAndEnablePersistentRetry",value:function(){Xy(this.transporter)&&this.transporter.checkAndEnablePersistentRetry(this.delegate)}},{key:"flushAndClearPersistedEventsOnLogout",value:function(){this.forceFlush();var e=Xy(this.transporter)?this.transporter.clearPersistedEventsOnLogout():null;return null!=e?e:this.host.api.Promise.resolve()}},{key:"getCurrentContext",value:function(){if(this.currentContext)return ov(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]:{},i=this.navMetaFromSeed(e,Jy(t));if(this.setCurrentContext(i.to),!n.suppressEventsFiring)return this.fireNavEvents(i)}},{key:"setCurrentContext",value:function(e){var t;this.currentContext=ov(e,this.host.api),null===(t=this.clientMonitoringConn)||void 0===t||t.setCurrentContext(ov(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,i,r){return this.fireEvent("ControlInteractionEvent",(function(n){var o=iv(n.pageKey,e),s={controlTrackingId:i,controlUrn:o,interactionType:t};return r&&r(o),s}),{context:n})}},{key:"fireEvent",value:function(e,t,n,i){if(!t){var r=Uy(e),o=void 0===t?"undefined":null===t?"null":Ig(t),s='Firing tracking event "'.concat(r,'" with invalid body, you fired "').concat(o,'"');if(this.clientMonitoringConn){var a=this.clientMonitoringConn.logEventGenerated(r);this.clientMonitoringConn.logFailedEvent(Fy.MISSING_REQUIRED_PROPERTIES,e,s,a)}throw new Error(s)}var c=i||[];if(c.length>0){var l=c.map((function(e){return Qy.toPointer(e)}));this.host.api.assign(t,{clientBreadcrumbPointers:l})}var u=c.length>0?this.generateEnvelopeWithBreadcrumbs(e,t,n,c):this.generateEnvelope(e,t,n);return this.fireEnvelope(u)}},{key:"generateEnvelopeWithBreadcrumbs",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],r=this.generateEnvelope(e,t,n),o=i.length>0?this.addBreadcrumbsToEnvelope(r,i):r;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(Dy(e.id)){var i=e.id;e.id={eventName:i,topicName:i,shouldAnonymizeMemberId:!0}}else e.id.shouldAnonymizeMemberId=!0;var r=this.delegate&&this.delegate.preTransporter?this.delegate.preTransporter(e):e;if(r){var o=r.meta.transporterKey,s=o?this.customTransporters[o]:this.transporter;if(!s&&o){var a=Uy(r.id),c="Could not find custom transporter: ".concat(o);if(this.clientMonitoringConn){var l=this.clientMonitoringConn.logEventGenerated(a);this.clientMonitoringConn.logFailedEvent(Fy.UNKNOWN_EXECUTION_ERROR,r.id,c,l)}throw new Error(c)}return s.fireEvent(r)}return this.host.api.Promise.resolve(!0)}},{key:"generatePageInstance",value:function(e,t){return nv(e,t)}},{key:"firePVE",value:function(e,t,n){var i={pageType:"full",totalTime:0,trackingCode:this.getTrackingCode(),trackingInfo:{}},r=this.host.api.assign(i,t),o=this.generateEnvelope("PageViewEvent",r,{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),pv.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 iv((t||this.currentContext||{pageKey:"unknown"}).pageKey,e)}},{key:"fireRawCIE",value:function(e,t,n,i){var r={controlTrackingId:i,controlUrn:e,interactionType:t};return{beacon:this.fireEvent("ControlInteractionEvent",r,{context:n}),controlUrn:e}}},{key:"generateNavigationEvent",value:function(e){var t=e.triggerId,n=e.triggerUrn,i=e.from;return{previousPageInstance:i&&i.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 i=t.fromExternalApp?{eventName:n,topicName:"InboundNavigationEvent"}:n;return{from:t.previousContext,navEventId:i,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,i=e.from,r=e.navEventId,o=this.generateEnvelope(r,t);o.meta.requestHeader.pageKey=n.pageKey;var s=i&&i.applicationInstance;return s&&(o.meta.header.clientApplicationInstance=s),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]:{},i={directive:n.directive,transporterKey:n.transporterKey,context:n.context||this.currentContext&&ov(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:i}}}])}();function tb(e){return e.split("").reduce((function(e,t){return(e<<5)-e+t.charCodeAt(0)|0}),0)}!function(){function e(t,n){var i,r=this;Eg(this,e),Sg(this,"core",void 0),Sg(this,"protocol",void 0),Sg(this,"throttleKeySet",new Set),Sg(this,"config",void 0),Sg(this,"reportTransporterError",(function(e){e.reason instanceof Error||(e.reason=new Error(e.reason||"An error occurred in the transporter")),r.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!==(i=null==n?void 0:n.throttleTime)&&void 0!==i?i:100},pv.on("internal:error",this.reportTransporterError)}_g(e,[{key:"reportError",value:function(e){var t,n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.callTreeId,s=void 0===o?"":o,a=r.responseHeaders,c=void 0===a?{}:a,l=e.message,u=e.name,d=e.stack,h=void 0===d?"":d,p=e.fileName,f=void 0===p?"":p,m=e.lineNumber,g=void 0===m?0:m,v=e.columnNumber,y=void 0===v?0:v,b=this.core.host,E=b.appId,w=b.appVersion,_=b.service,S=b.serviceInstance,T=b.treeID,C=void 0===T?"":T,k=b.api,I=k.Promise,A=k.location,L=A.host,O=A.pathname,R=A.search,N=A.hash,x=void 0===N?"":N;if(c){t={};var P=new Map;Object.keys(c).forEach((function(e){P.set(e.toLowerCase(),c[e])})),t.callTreeId=P.get("x-li-uuid"),t.microsoftEdgeReference=P.get("x-msedge-ref"),t.pointOfPresenceId=P.get("x-li-pop"),t.fabric=P.get("x-li-fabric")}var M=function(){return n.core.fireEvent("JavaScriptErrorEvent",(function(e){return{appId:E,e:{c:y,l:g,m:l,s:h,t:u,u:f},h:x,l:n.protocol,o:L,p:O,pageKey:e.pageKey,q:R,service:_,serviceInstance:S,serviceVersion:w,t:i,trackingID:e.pageInstance.trackingId,treeID:C,callTreeId:s,responseTraceHeaders:t}}))};if(this.config.throttleTime<0)return M();var D=tb(u+l+h+i.join("")+s);return this.throttleKeySet.has(D)?I.resolve(!1):(this.throttleKeySet.add(D),setTimeout((function(){return n.throttleKeySet.delete(D)}),this.config.throttleTime),M())}},{key:"flush",value:function(){this.core.forceFlush()}},{key:"destroy",value:function(){this.core.destroy(),pv.off("internal:error",this.reportTransporterError)}}])}();var nb=function(){function e(){Eg(this,e),Sg(this,"userTimingEntries",[]),Sg(this,"longTasks",[]),Sg(this,"resourceTimingEntries",[]),Sg(this,"cdnData",void 0)}return _g(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(rb),cdnData:this.cdnData}}}]),e}(),ib=["resourceTreeId","name","entryType","startTime","duration","initiatorType","nextHopProtocol","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","connectEnd","secureConnectionStart","requestStart","responseStart","responseEnd","transferSize","encodedBodySize","decodedBodySize","workerStart"];function rb(e){return ib.reduce((function(t,n){var i=e[n];return void 0!==i&&(t[n]=i),t}),{})}function ob(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};$y=Object.assign(Object.assign({},n),t),eb=function(e,t){return e.nodeType===Node.DOCUMENT_NODE?e:e===t.root?e.ownerDocument:e}($y.root,n);var i=sb(e,Zy.All,(function(){return sb(e,Zy.Two,(function(){return sb(e,Zy.One)}))}));if(i){var r=gb(vb(i,e));return r.length>0&&(i=r[0]),cb(i)}throw new Error("Selector was not found.")}function sb(e,t,n){for(var i=null,r=[],o=e,s=0,a=function(){var e=pb(function(e){var t=e.getAttribute("id");return t&&$y.idName(t)?{name:"#"+Tb(t,{isIdentifier:!0}),penalty:0}:null}(o))||pb.apply(void 0,Tg(function(e){return Array.from(e.attributes).filter((function(e){return $y.attr(e.name,e.value)})).map((function(e){return{name:"["+Tb(e.name,{isIdentifier:!0})+'="'+Tb(e.value)+'"]',penalty:.5}}))}(o)))||pb.apply(void 0,Tg(function(e){return Array.from(e.classList).filter($y.className).map((function(e){return{name:"."+Tb(e,{isIdentifier:!0}),penalty:1}}))}(o)))||pb(function(e){var t=e.tagName.toLowerCase();return $y.tagName(t)?{name:t,penalty:2}:null}(o))||[{name:"*",penalty:3}],a=function(e){var t=e.parentNode;if(!t)return null;var n=t.firstChild;if(!n)return null;for(var i=0;n&&(n.nodeType===Node.ELEMENT_NODE&&i++,n!==e);)n=n.nextSibling;return i}(o);if(t===Zy.All)a&&(e=e.concat(e.filter(hb).map((function(e){return db(e,a)}))));else if(t===Zy.Two)e=e.slice(0,1),a&&(e=e.concat(e.filter(hb).map((function(e){return db(e,a)}))));else if(t===Zy.One){var c=function(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 i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}}(e,t)||Cg(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.")}()}(e=e.slice(0,1),1)[0];a&&hb(c)&&(e=[db(c,a)])}var l,u=bg(e);try{for(u.s();!(l=u.n()).done;)l.value.level=s}catch(e){u.e(e)}finally{u.f()}if(r.push(e),r.length>=$y.seedMinLength&&(i=ab(r,n)))return"break";o=o.parentElement,s++};o&&o!==$y.root.parentElement&&"break"!==a(););return i||(i=ab(r,n)),i}function ab(e,t){var n=gb(mb(e));if(n.length>$y.threshold)return t?t():null;var i,r=bg(n);try{for(r.s();!(i=r.n()).done;){var o=i.value;if(ub(o))return o}}catch(e){r.e(e)}finally{r.f()}return null}function cb(e){for(var t=e[0],n=t.name,i=1;i<e.length;i++){var r=e[i].level||0;n=t.level===r-1?"".concat(e[i].name," > ").concat(n):"".concat(e[i].name," ").concat(n),t=e[i]}return n}function lb(e){return e.map((function(e){return e.penalty})).reduce((function(e,t){return e+t}),0)}function ub(e){switch(eb.querySelectorAll(cb(e)).length){case 0:throw new Error("Can't select any node with this selector: ".concat(cb(e)));case 1:return!0;default:return!1}}function db(e,t){return{name:e.name+":nth-child(".concat(t,")"),penalty:e.penalty+1}}function hb(e){return"html"!==e.name&&!e.name.startsWith("#")}function pb(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var i=t.filter(fb);return i.length>0?i:null}function fb(e){return null!=e}function mb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(e.length>0){var n,i=[],r=bg(e[0]);try{for(r.s();!(n=r.n()).done;){var o=n.value;i=i.concat(mb(e.slice(1,e.length),t.concat(o)))}}catch(e){r.e(e)}finally{r.f()}return i}return[t]}function gb(e){return Array.from(e).sort((function(e,t){return lb(e)-lb(t)}))}function vb(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{counter:0,visited:new Map},i=[];if(e.length>2&&e.length>$y.optimizedMinLength)for(var r=1;r<e.length-1;r++){if(n.counter>$y.maxNumberOfTries)return i;n.counter+=1;var o=Tg(e);o.splice(r,1);var s=cb(o);if(n.visited.has(s))return i;ub(o)&&yb(o,t)&&(i.push(o),n.visited.set(s,!0),i=i.concat(vb(o,t,n)))}return i}function yb(e,t){return eb.querySelector(cb(e))===t}!function(e){e[e.All=0]="All",e[e.Two=1]="Two",e[e.One=2]="One"}(Zy||(Zy={}));var bb,Eb=/[ -,\.\/:-@\[-\^`\{-~]/,wb=/[ -,\.\/:-@\[\]\^`\{-~]/,_b=/(^|\\+)?(\\[A-F0-9]{1,6})\x20(?![a-fA-F0-9\x20])/g,Sb={escapeEverything:!1,isIdentifier:!1,quotes:"single",wrap:!1};function Tb(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object.assign(Object.assign({},Sb),t);"single"!=n.quotes&&"double"!=n.quotes&&(n.quotes="single");for(var i="double"==n.quotes?'"':"'",r=n.isIdentifier,o=e.charAt(0),s="",a=0,c=e.length;a<c;){var l=e.charAt(a++),u=l.charCodeAt(0),d=void 0;if(u<32||u>126){if(u>=55296&&u<=56319&&a<c){var h=e.charCodeAt(a++);56320==(64512&h)?u=((1023&u)<<10)+(1023&h)+65536:a--}d="\\"+u.toString(16).toUpperCase()+" "}else d=n.escapeEverything?Eb.test(l)?"\\"+l:"\\"+u.toString(16).toUpperCase()+" ":/[\t\n\f\r\x0B]/.test(l)?"\\"+u.toString(16).toUpperCase()+" ":"\\"==l||!r&&('"'==l&&i==l||"'"==l&&i==l)||r&&wb.test(l)?"\\"+l:l;s+=d}return r&&(/^-[-\d]/.test(s)?s="\\-"+s.slice(1):/\d/.test(o)&&(s="\\3"+o+" "+s.slice(1))),s=s.replace(_b,(function(e,t,n){return t&&t.length%2?e:(t||"")+n})),!r&&n.wrap?i+s+i:s}function Cb(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e&&"function"==typeof e.now&&(e.timeOrigin||e.timing)){var n,i=e.now();return n=!e.timing&&t?Math.floor(e.timeOrigin):e.timing.navigationStart,Math.round(i+n)}return Date.now()}function kb(e){var t=e||performance;return Math.round(t.now())}function Ib(e){if(!e)return"null";if(e.nodeType===Node.ELEMENT_NODE)try{return ob(e,{idName:function(e){return 0!==e.indexOf("ember")}})}catch(e){return"serialization_error"}var t=Ib(e.parentElement||void 0);return"".concat(t," > nodeType(").concat(e.nodeType,")")}function Ab(e,t,n){var i=[];return e&&"function"==typeof e.getEntriesByType&&(t["user-timing-measure-enabled"]&&e.getEntriesByType("measure").forEach((function(e){i.push({entryType:"MEASURE",name:e.name,startTime:e.startTime,duration:e.duration})})),t["user-timing-mark-enabled"]&&e.getEntriesByType("mark").forEach((function(e){i.push({entryType:"MARK",name:e.name,startTime:e.startTime,duration:e.duration})})),n&&(e.clearMeasures(),e.clearMarks())),i}function Lb(e){var t=[];return e.forEach((function(e){return t.push(e)})),t}var Ob,Rb=function(){function e(t){Eg(this,e),Sg(this,"hostApis",void 0),Sg(this,"hostnameProperties",void 0),Sg(this,"usedHostnames",void 0),Sg(this,"abortController",void 0),Sg(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 _g(e,[{key:"clearUsedHostnames",value:function(){this.usedHostnames=new Set}},{key:"getPresentData",value:function(){var e=this;return av(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,i=n.AbortController,r=n.Promise,o=sv(av(this.pendingPromises),r),s=setTimeout((function(){t.abortController.abort(),t.abortController=new i}),e);return o.then((function(){return clearTimeout(s),t.getPresentData()}))}},{key:"inspectEntryForCdnData",value:function(e){var t=this;if(!(e.name.indexOf(".licdn.")<0)){var n,i,r=this.hostApis.assign,o=(n=e.name,i=this.hostApis.document,(bb=bb||i.createElement("a")).href=n,bb.hostname);if(this.usedHostnames.add(o),!this.hostnameProperties[o]&&!this.isResourcePossiblyFromCache(e)){var s=this.fetchCdnFromUrl(e.name).then((function(e){var n=r({hostname:o},e);return t.hostnameProperties[o]||(t.hostnameProperties[o]=n),t.pendingPromises.delete(s),n}));this.pendingPromises.add(s)}}}},{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}(),Nb=function(){function e(t,n,i,r){Eg(this,e),Sg(this,"hostApis",void 0),Sg(this,"statics",void 0),Sg(this,"options",void 0),Sg(this,"allowTimingOrigin",void 0),Sg(this,"collectResourceTimings",void 0),Sg(this,"collectCdnData",void 0),Sg(this,"perfObserver",void 0),Sg(this,"renderTimings",new Map),Sg(this,"urlToTreeId",new Map),Sg(this,"cdnDataProvider",void 0),Sg(this,"observables",new nb),this.hostApis=t,this.statics=n,this.options=i,this.allowTimingOrigin=r,this.collectResourceTimings=i["enable-rs-timing"],this.collectCdnData=i["enable-cdn-tracking"],this.collectCdnData&&(this.cdnDataProvider=new Rb(t))}return _g(e,[{key:"recordTreeId",value:function(e,t){this.collectResourceTimings&&this.urlToTreeId.set(function(e,t){return(bb=bb||t.createElement("a")).href=e,bb.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:Cb(this.hostApis.performance,this.allowTimingOrigin)})}},{key:"recordRenderEnd",value:function(e){var t=this.renderTimings.get(e);t&&(t.renderEnd=t.renderEnd||Cb(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,i=e.immediate,r=this.collectSynchronousData(n);if(i)return r;var o=this.collectAsynchronousData();return"then"in o?o.then((function(e){return(0,t.hostApis.assign)(r,e),r})):r}},{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,i=t.PerformanceObserver,r=Object.create(null);return this.statics.pageLoadMode=e?"INITIAL":"PARTIAL",i||(this.observables.userTimingEntries=Ab(this.hostApis.performance,this.options,!0),this.collectResourceTimings&&this.processNewResourceTimings()),this.observables.attachTreeIds(this.urlToTreeId),this.urlToTreeId.clear(),n(r,this.observables.getData(),this.snapshot,this.statics),e&&n(r,function(e){if(!e)return{navigationTimingApi:!1};var t=Object.create({});if("function"==typeof e.getEntriesByType){var n=e.getEntriesByType("navigation")[0];n&&(["fetchStart","responseEnd","decodedBodySize","encodedBodySize","transferSize"].every((function(e){return"number"==typeof n[e]}))&&(t.htmlMetrics={htmlFetchStart:n.fetchStart,htmlResponseEnd:n.responseEnd,htmlDecodedBodySize:n.decodedBodySize,htmlEncodedBodySize:n.encodedBodySize,htmlTransferSize:n.transferSize}),t.workerStart=n.workerStart)}var i=e.timing,r=e.navigation;return i&&r?(t.navigationTimingApi=!0,xb.forEach((function(e){e in i&&(t[e]=i[e])})),t.navigationType=r.type,t.redirectCount=r.redirectCount):t.navigationTimingApi=!1,t}(this.hostApis.performance)),n(r,this.collectAsynchronousData(!0)),r}},{key:"collectAsynchronousData",value:function(e){var t=this,n={cdnData:[],usedCDN:this.extractUsedCDN([])};if(e){if(this.collectCdnData){var i=this.cdnDataProvider.getPresentData();n.cdnData=i,n.usedCDN=this.extractUsedCDN(i)}return n}var r=[];return this.collectCdnData&&r.push(this.cdnDataProvider.getDataWhenReady(this.options["async-plugins-timeout"]).then((function(e){n.cdnData=e,n.usedCDN=t.extractUsedCDN(e)}))),r.length>0?sv(r,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,i=e.name,r=e.startTime,o=e.duration;"resource"===n?t.processSingleResourceTiming(e):"mark"===n?t.observables.userTimingEntries.push({entryType:"MARK",name:i,startTime:r,duration:o}):"measure"===n?t.observables.userTimingEntries.push({entryType:"MEASURE",name:i,startTime:r,duration:o}):"longtask"===n&&t.observables.longTasks.push({duration:o,name:i,startTime:r})}))})),this.observables.userTimingEntries=Ab(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:Lb(this.renderTimings),networkInformationMetrics:Pb(this.hostApis.connection)};return this.renderTimings.clear(),e}}]),e}(),xb=["loadEventEnd","loadEventStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","responseEnd","responseStart","requestStart","secureConnectionStart","connectEnd","connectStart","domainLookupEnd","domainLookupStart","fetchStart","redirectEnd","redirectStart","unloadEventEnd","unloadEventStart","navigationStart"];function Pb(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"}(Ob||(Ob={}));var Mb=(Sg(yg={},"web-ui-framework","EMBER"),Sg(yg,"app-id","linkedin.rum.tracking"),Sg(yg,"app-version","unknown"),Sg(yg,"is-single-page-app",!0),Sg(yg,"user-timing-mark-enabled",!1),Sg(yg,"user-timing-measure-enabled",!0),Sg(yg,"beacon-source","apps"),Sg(yg,"enable-rs-timing",!0),Sg(yg,"enable-cdn-tracking",!1),Sg(yg,"async-plugins-timeout",5e3),Sg(yg,"beacon-timeout",3e4),Sg(yg,"enable-memory-measurement",!1),Sg(yg,"pageKeyPrefix",""),yg),Db=function(){function e(t,n,i){Eg(this,e),Sg(this,"featureName",void 0),Sg(this,"trackingCore",void 0),Sg(this,"rumConfig",void 0),Sg(this,"observing",!1),Sg(this,"basePageTreeId",void 0),Sg(this,"startPageInstance",void 0),Sg(this,"startMemory",void 0),Sg(this,"reportTimeouts",[]),this.featureName=t,this.trackingCore=n,this.rumConfig=i}return _g(e,[{key:"startObserving",value:function(){var t,n=this,i=this.getMemory();i&&!this.observing&&(this.basePageTreeId=this.trackingCore.host.treeID||"",this.startPageInstance=(null===(t=this.trackingCore.getCurrentContext())||void 0===t?void 0:t.pageInstance)||nv("unknown"),this.startMemory=i,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:kb(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]}})),i=t.usedJSHeapSize-this.startMemory.usedJSHeapSize;return n.push({name:(i<0?"usedJSHeapSizeDecrease":"usedJSHeapSizeIncrease")+e,startTime:Math.abs(i)},{name:"utilization"+e,startTime:Math.round(t.usedJSHeapSize/t.totalJSHeapSize*100)}),n}},{key:"getMemory",value:function(){return this.trackingCore.host.api.performance.memory}}]),e}();Sg(Db,"checkpoints",[1,3,10,30,90,180,300]);var Ub,Bb,qb,Fb,Hb,Gb=_g((function e(t,n,i){Eg(this,e),Sg(this,"webUIFramework",void 0),Sg(this,"timeSource",void 0),Sg(this,"isSinglePageApp",void 0),Sg(this,"appRenderMode",void 0),Sg(this,"isAppRenderFailed",void 0),Sg(this,"pageLoadMode","INITIAL"),Sg(this,"isSSL",void 0),Sg(this,"treeId",void 0),Sg(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:"===i.api.location.protocol?1:0,this.treeId=i.treeID,this.isFromServiceWorker=i.isFromServiceWorker})),jb=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)}},zb=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){}},Wb=function(e,t){var n=function n(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),t&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)},Kb=function(e){addEventListener("pageshow",(function(t){t.persisted&&e(t)}),!0)},Vb=function(e,t,n){var i;return function(r){t.value>=0&&(r||n)&&(t.delta=t.value-(i||0),(t.delta||void 0===i)&&(i=t.value,e(t)))}},Yb=-1,Qb=function(){return"hidden"===document.visibilityState?0:1/0},Jb=function(){Wb((function(e){var t=e.timeStamp;Yb=t}),!0)},Xb=function(){return Yb<0&&(Yb=Qb(),Jb(),Kb((function(){setTimeout((function(){Yb=Qb(),Jb()}),0)}))),{get firstHiddenTime(){return Yb}}},Zb=!1,$b=-1,eE=function(e,t){Zb||(function(e,t){var n,i=Xb(),r=jb("FCP"),o=function(e){"first-contentful-paint"===e.name&&(a&&a.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),n(!0)))},s=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],a=s?null:zb("paint",o);(s||a)&&(n=Vb(e,r,t),s&&o(s),Kb((function(i){r=jb("FCP"),n=Vb(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,n(!0)}))}))})))}((function(e){$b=e.value})),Zb=!0);var n,i=function(t){$b>-1&&e(t)},r=jb("CLS",0),o=0,s=[],a=function(e){if(!e.hadRecentInput){var t=s[0],i=s[s.length-1];o&&e.startTime-i.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,s.push(e)):(o=e.value,s=[e]),o>r.value&&(r.value=o,r.entries=s,n())}},c=zb("layout-shift",a);c&&(n=Vb(i,r,t),Wb((function(){c.takeRecords().map(a),n(!0)})),Kb((function(){o=0,$b=-1,r=jb("CLS",0),n=Vb(i,r,t)})))},tE={passive:!0,capture:!0},nE=new Date,iE=function(e,t){Ub||(Ub=t,Bb=e,qb=new Date,sE(removeEventListener),rE())},rE=function(){if(Bb>=0&&Bb<qb-nE){var e={entryType:"first-input",name:Ub.type,target:Ub.target,cancelable:Ub.cancelable,startTime:Ub.timeStamp,processingStart:Ub.timeStamp+Bb};Fb.forEach((function(t){t(e)})),Fb=[]}},oE=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(){iE(e,t),r()},i=function(){r()},r=function(){removeEventListener("pointerup",n,tE),removeEventListener("pointercancel",i,tE)};addEventListener("pointerup",n,tE),addEventListener("pointercancel",i,tE)}(t,e):iE(t,e)}},sE=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,oE,tE)}))},aE=function(e,t){var n,i=Xb(),r=jb("FID"),o=function(e){e.startTime<i.firstHiddenTime&&(r.value=e.processingStart-e.startTime,r.entries.push(e),n(!0))},s=zb("first-input",o);n=Vb(e,r,t),s&&Wb((function(){s.takeRecords().map(o),s.disconnect()}),!0),s&&Kb((function(){var i;r=jb("FID"),n=Vb(e,r,t),Fb=[],Bb=-1,Ub=null,sE(addEventListener),i=o,Fb.push(i),rE()}))},cE={},lE=function(e,t){var n,i=Xb(),r=jb("LCP"),o=function(e){var t=e.startTime;t<i.firstHiddenTime&&(r.value=t,r.entries.push(e)),n()},s=zb("largest-contentful-paint",o);if(s){n=Vb(e,r,t);var a=function(){cE[r.id]||(s.takeRecords().map(o),s.disconnect(),cE[r.id]=!0,n(!0))};["keydown","click"].forEach((function(e){addEventListener(e,a,{once:!0,capture:!0})})),Wb(a,!0),Kb((function(i){r=jb("LCP"),n=Vb(e,r,t),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,cE[r.id]=!0,n(!0)}))}))}))}},uE=["LCP","FID","CLS"],dE={LCP:"LargestContentfulPaint",FID:"FirstInputDelay",CLS:"CumulativeLayoutShift"},hE={},pE=function(){var e;if(!Ay)return"";var t=window.performance,n=void 0;if("function"==typeof(null==t?void 0:t.getEntriesByType)){var i,r=null===(i=window.performance)||void 0===i?void 0:i.getEntriesByType("navigation");(null==r?void 0:r.length)>0&&(n=r[0])}return(null===(e=n)||void 0===e?void 0:e.name)||window.location.href}(),fE=!1,mE=[],gE={LCP:"largest-contentful-paint",FID:"first-input",CLS:"layout-shift"};function vE(){var e=!0===window.__test__resetWebVitalsState;if(!fE||e){e&&(mE=[]),uE.forEach(yE);var t=Symbol();Hb=t,[lE,aE,eE].forEach((function(e){return e(bE.bind(null,t),!0)})),[lE,aE,eE].forEach((function(e){return e(EE.bind(null,t))})),fE=!0}}function yE(e){hE[e]={name:e,value:-1,updateHistory:[]};var t=gE[e];"undefined"!=typeof PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&"string"==typeof t&&PerformanceObserver.supportedEntryTypes.indexOf(t)>-1||(hE[e].value=-2)}function bE(e,t){if(e===Hb){var n=hE[t.name],i=kb();n&&(n.updateHistory.push({time:i,data:t}),n.value=t.value),mE.forEach((function(e){return e(t,i,!1)}))}}function EE(e,t){e===Hb&&mE.forEach((function(e){return e(t,kb(),!0)}))}var wE=function(){function e(t,n){Eg(this,e),Sg(this,"basePageTreeId",void 0),Sg(this,"basePageKey",void 0),Sg(this,"observing",!1),Sg(this,"appContextMap",new Map),Sg(this,"rumConfig",void 0),Sg(this,"trackingCore",void 0),this.trackingCore=t,this.rumConfig=n}return _g(e,[{key:"startObserving",value:function(){var e,t,n=this;vE(),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",uE.forEach((function(e){var t;-2===(null===(t=hE[e])||void 0===t?void 0:t.value)&&n.reportMetric(e)})),t=this.onMetricUpdate.bind(this),mE.push(t))}},{key:"stopObserving",value:function(){this.observing=!1}},{key:"onMetricUpdate",value:function(e,t,n){var i;this.observing&&(n?this.reportMetric(e.name):this.appContextMap.set(t,{time:t,url:location.href,pageKey:null===(i=this.trackingCore.getCurrentContext())||void 0===i?void 0:i.pageKey}))}},{key:"reportMetric",value:function(e){var t=hE[e],n={name:dE[e]||e};"CLS"===e?n.doubleValue=t.value:n.longValue=Math.round(t.value);var i=hE[e];if(i){var r=function(e,t,n,i,r){var o={basePageTreeId:e,basePageKey:t,basePageUrl:pE},s=null;switch(n.name){case"LCP":s=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1],s={pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",element:Ib(o.element),renderTime:Math.round(o.renderTime),loadTime:Math.round(o.loadTime),size:Math.round(o.size)};return o.url&&(s.url=o.url),s}(n,i);break;case"FID":s=function(e,t){var n;if(0===e.updateHistory.length)return null;var i=e.updateHistory[e.updateHistory.length-1],r=i.data.entries,o=r[r.length-1];return{pageKey:(null===(n=t.get(i.time))||void 0===n?void 0:n.pageKey)||"_unknown",processingStart:Math.round(o.processingStart),processingEnd:Math.round(o.processingEnd),target:Ib(o.target)}}(n,i);break;case"CLS":s=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 i=n.reduce((function(e,t){return e&&e.value>t.value?e:t})),r=e.updateHistory.find((function(e){return e.data.entries.includes(i)})),o=null;i&&i.sources&&i.sources.length&&(o=i.sources.reduce((function(e,t){return e.node&&e.previousRect.width*e.previousRect.height>t.previousRect.width*t.previousRect.height?e:t})));var s,a=t.get(r.time);return o&&a?{shiftCount:n.length,"largestShift.value":i.value,"largestShift.hadRecentInput":i.hadRecentInput,"largestShift.largestSource.node":Ib(null===(s=o)||void 0===s?void 0:s.node),"largestShift.pageKey":a.pageKey||"_unknown","largestShift.url":a.url,"largestShift.startTime":Math.round(i.startTime)}:null}(n,i)}if(s){var a={};return r(a,o,s),a}return o}(this.basePageTreeId,this.basePageKey,i,this.appContextMap,this.trackingCore.host.api.assign);n.metadata=function(e){var t={};return Object.keys(e).forEach((function(n){var i=e[n];t[n]="string"==typeof i?i:JSON.stringify(i)})),t}(r)}var o={scope:{scopeType:"APPLICATION_INSTANCE",scopeKey:this.basePageTreeId},metrics:[n]};this.trackingCore.fireEvent({appId:this.rumConfig["app-id"],eventName:"ClientPerfMetricsEvent"},o)}}]),e}();!function(){function e(t,n,i){var r,o;Eg(this,e),Sg(this,"core",void 0),Sg(this,"config",void 0),Sg(this,"collector",void 0),Sg(this,"boomerangStart",-1),Sg(this,"webVitalsObserver",void 0),Sg(this,"appMemoryObserver",void 0),Sg(this,"pageMemoryObserver",void 0),Sg(this,"liveTokens",new Set),Sg(this,"stateWM",new WeakMap),Sg(this,"activeToken",void 0),Sg(this,"isInitial",void 0),Sg(this,"beforeHideHandlerBound",this.beforeHideHandler.bind(this)),this.core=i,this.config=function(e,t){for(var n in e)void 0!==t[n]&&(e[n]=t[n]);return e}(i.host.api.assign({},Mb),n);var s="enabled"===(null===(r=(o=this.core.host).__getLixTreatment)||void 0===r?void 0:r.call(o,"pemberly.tracking.time-origin-epoch-time"));this.collector=new Nb(i.host.api,new Gb(t,this.config,i.host),this.config,s),this.collector.startObserving(),pv.before("internal:hide",this.beforeHideHandlerBound)}_g(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,i;this.activeToken&&this.abort(this.activeToken),this.flushEndedSessions(),this.isInitial=void 0===this.isInitial,this.isInitial||this.collector.reset();var r,o=Object.create(null),s="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:Cb(this.core.host.api.performance,s)}),(this.config["enable-memory-measurement"]||"enabled"===(null===(n=(i=this.core.host).__getLixTreatment)||void 0===n?void 0:n.call(i,"pemberly.tracking.rum-memory-measurement")))&&(null===(r=this.pageMemoryObserver)||void 0===r||r.stopObserving(),this.pageMemoryObserver=new Db("page-memory",this.core,this.config),this.pageMemoryObserver.startObserving(),void 0===this.appMemoryObserver&&(this.appMemoryObserver=new Db("application-memory",this.core,this.config),this.appMemoryObserver.startObserving())),o}},{key:"observeWebVitals",value:function(){void 0===this.webVitalsObserver&&(this.webVitalsObserver=new wE(this.core,this.config),this.webVitalsObserver.startObserving())}},{key:"end",value:function(e){var t,n,i=this,r=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 s=this.stateWM.get(e),a="enabled"===(null===(t=(n=this.core.host).__getLixTreatment)||void 0===t?void 0:t.call(n,"pemberly.tracking.time-origin-epoch-time")),c=Cb(this.core.host.api.performance,a);s.endProps={renderCompleteTime:c,isImpactedByHiddenWindow:r,rumKey:o};var l=this.activeToken;s.fireRumEventTimeout=setTimeout((function(){var e=i.collector.collect({isInitial:s.isInitial});"then"in e?e.then((function(e){i.fireRumEvent(e,l)})):i.fireRumEvent(e,l)}),this.config["beacon-timeout"]),this.activeToken=void 0}else pv.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;pv.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 i=e.collector.collect({isInitial:n.isInitial,immediate:!0});e.fireRumEvent(i,t)}}))}},{key:"fireRumEvent",value:function(e,t){if(this.stateWM.get(t)){var n=this.core.host.api.assign,i=this.stateWM.get(t),r=i.startTime,o=i.endProps;if(o){var s=o.renderCompleteTime,a=o.isImpactedByHiddenWindow,c=o.rumKey,l=this.boomerangStart=e.navigationStart||this.boomerangStart,u=e.navigationStart||r,d=s-u,h=this.config["app-version"];this.core.fireEvent({appId:this.config["app-id"],eventName:"RealUserMonitoringEvent"},(function(t){return n({pageKey:c||t.pageKey,isImpactedByHiddenWindow:a,appVersion:h,timeDone:d,navigationStart:u,boomerangStart:l,renderCompleteTime:s},e)})),i.fireRumEventTimeout&&clearTimeout(i.fireRumEventTimeout),this.liveTokens.delete(t),this.stateWM.delete(t)}else this.abort(t)}}},{key:"beforeHideHandler",value:function(){this.flushEndedSessions()}}])}();var _E="undefined"!=typeof window&&"undefined"!=typeof performance,SE="undefined"!=typeof location&&-1!==location.search.indexOf("_LI_MEASURE_DEBUG");function TE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax",n=arguments.length>2?arguments[2]:void 0;e.fireTrackingEvent("PageViewEvent",CE(n,t))}function CE(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ajax";const n=Bm(document),i=Fm(document),r=vg();let o={};return r&&(o.theme=r.toUpperCase()),i&&(o.interfaceLocale=i),e&&(o.pageKey=e),{header:{},requestHeader:o,pageType:t,trackingInfo:{clientTimestamp:Date.now(),pageTag:n}}}!function(){function e(t,n){Eg(this,e),Sg(this,"featureKey",void 0),Sg(this,"productName",void 0),Sg(this,"endPageInstance",void 0),Sg(this,"startPageInstance",void 0),Sg(this,"isCanceled",!1),Sg(this,"featureIdentifier",void 0),Sg(this,"name",void 0),Sg(this,"startTime",void 0),Sg(this,"duration",void 0),Sg(this,"marks",[]),Sg(this,"spanStarts",new Map),Sg(this,"spans",[]),Sg(this,"isSpanContainer",!1),Sg(this,"basePageTreeId",void 0),Sg(this,"isClosed",!1),this.featureKey=t,this.productName=n;var i=n?"::".concat(n):"";this.featureIdentifier="".concat(t).concat(i),this.name=t}_g(e,[{key:"start",value:function(e){this.startPageInstance=e,_E&&(this.startTime=kb(),SE&&performance.mark("LI:".concat(this.featureIdentifier,"-start")))}},{key:"mark",value:function(e){_E&&(this.marks.push({name:e,startTime:kb()}),SE&&(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){_E&&(this.spanStarts.set(e,kb()),SE&&performance.mark("LI:".concat(this.featureIdentifier,"-span-").concat(e,"-start")))}},{key:"spanEnd",value:function(e,t){if(_E&&this.spanStarts.has(e)){var n=this.spanStarts.get(e);this.spans.push({name:t||e,startTime:n,duration:kb()-n}),SE&&(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,_E&&(this.duration=kb()-this.startTime,SE&&!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(_E){var e={name:this.featureKey,startTime:this.startTime,duration:this.isSpanContainer?-1:this.duration,basePageTreeId:this.basePageTreeId,startPageInstance:this.startPageInstance||nv("unknown"),marks:this.marks,spans:this.spans};return this.productName&&(e.productName=this.productName),e}}},{key:"check",value:function(){if(_E){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{ENTER:kE,ESCAPE:IE}=zm,AE="modal",LE="modal__overlay--visible",OE="no-scroll",RE="top-level-modal-container";class NE{constructor(e){let{enablePageViewTracking:t=!1,shouldHideModal:n=(()=>!1),triggerByOutletEl:i=!0,shouldMoveToTopContainer:r=!0,events:o={},focusElement:s,pageKey:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No modal element passed in");this._el=e,this._parentNode=this._el.parentNode,r&&(this._topLevelContainer=this._getTopLevelContainer()),this._wrapperEl=this._el.querySelector(".".concat("modal__wrapper")),this._overlayEl=this._el.querySelector(".".concat("modal__overlay")),o&&(this._events=o),i&&(this._outletEls=this._getOutletEls()),this._exitButtonEl=this._el.querySelector(".".concat("modal__dismiss")),this._onKeyDownEvent=e=>this._onKeyDown(e),this._enablePageViewTracking=t,this._pageKey=a,this._shouldHideModal=n,this._shouldMoveToTopContainer=r;this._el.querySelector("[id='".concat("modalNoDismiss","']"))&&(this._isModalNonDismissible=!0),this._focusElement=s,i&&this._outletEls.forEach((e=>{e.addEventListener("click",(()=>this.open()))})),this._isModalNonDismissible||(this._exitButtonEl&&this._exitButtonEl.addEventListener("click",(()=>this.close())),this._overlayEl.addEventListener("click",this._handleOverlayClick.bind(this))),this._focusTrap=new ig(this._wrapperEl)}_getOutletEls(){const e=this._el.dataset.outlet,t=[...("default-outlet"===e?this._parentNode:document).querySelectorAll('[data-modal="'.concat(e,'"]'))];if(!t.length)throw new Error("No outlet was found with a data-modal attribute equal to the provided dataCustomOutlet param ".concat(e));return t}_getTopLevelContainer(){const e=document.querySelector(".".concat(RE));if(!e){const e=document.createElement("div");return e.className=RE,document.body.appendChild(e)}return e}_handleOverlayClick(e){e.target===this._wrapperEl||this._wrapperEl.contains(e.target)||this.close()}_onKeyDown(e){const t=Km(e.key),n=t===kE&&document.activeElement===this._exitButtonEl;(t===IE||n)&&(this._isModalNonDismissible||this.close(),e.preventDefault())}open(){let{focusElement:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this._shouldHideModal())return this._focusElement=e||this._focusElement,this._previouslyFocusedEl=document.activeElement,this._overlayEl.classList.add(LE),this._shouldMoveToTopContainer&&this._topLevelContainer.appendChild(this._el),this.noScroll(),document.addEventListener("keydown",this._onKeyDownEvent),Nm(this._el,"open"),this._wrapperEl&&this._wrapperEl.focus(),this._focusTrap.init(),this._enablePageViewTracking&&window.tracking?window.tracking.then((e=>{TE(e,"ajax",this._pageKey||"".concat(this._el.id))})):(Nm(this._wrapperEl,"afterOpen"),Promise.resolve());Nm(this._el,"didNotOpen")}async close(){var e,t;this._events.onBeforeClose&&await(null===(e=this._events)||void 0===e||null===(t=e.onBeforeClose)||void 0===t?void 0:t.call(e,this._wrapperEl));this._overlayEl.classList.remove(LE),this._shouldMoveToTopContainer&&this._parentNode.appendChild(this._el),this.removeNoScroll(),document.removeEventListener("keydown",this._onKeyDownEvent),Nm(this._el,"close"),setTimeout((()=>{var e;(null===(e=this._focusElement)||void 0===e?void 0:e.focus())||this._previouslyFocusedEl.focus()}),50),this._focusTrap.tearDown()}noScroll(){document.body.classList.add(OE)}removeNoScroll(){document.body.classList.remove(OE)}}function xE(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 PE=/ /g,ME=/[\s\u0000<>"]|%00/,DE=/\\/,UE=/([.]|%2e){2}/i;let BE=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 qE(e){let t,n="invalid://";if("string"!=typeof e)return xE("jSecure Warning: url must be a string","error"),n;if(t=e.trim(),t.indexOf(" ")>-1&&(xE("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(PE,"+")),!BE.test(t))return xE("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(ME.test(t))return xE("jSecure Error: not valid url character found in url: "+e,"error"),n;let i,r=t.split("?")[0],o=!1;try{i=decodeURI(r)}catch(e){o=!0}return o?(xE("jSecure Error: malformed url path detected: "+r),n):DE.test(r)||UE.test(r)||UE.test(i)?(xE("jSecure Error: malicious data found in url path: "+r,"error"),n):e}const FE={redirect(e){window&&(window.location.href=e)}};function HE(e){return e.scrollHeight>e.offsetHeight}const GE="hidden",jE="aria-hidden";function zE(e,t){const n=Tm(e);for(let e=0;e<n.length;e++)n[e]&&1===n[e].nodeType&&t(n[e])}function WE(e){VE([e])}function KE(e){YE([e])}function VE(e){zE(e,(e=>{e.classList.add(GE),e.setAttribute(jE,"true")}))}function YE(e){zE(e,(e=>{e.classList.remove(GE),e.setAttribute(jE,"false")}))}function QE(e){null==e||e.setAttribute("disabled","disabled"),null==e||e.setAttribute("aria-disabled","true")}function JE(e){null==e||e.removeAttribute("disabled"),null==e||e.removeAttribute("aria-disabled")}function XE(){return document.documentElement.classList.contains("safari")}function ZE(){return document.documentElement.classList.contains("ios")}function $E(){const e=document.querySelector('meta[name="pillar"]');return e?e.getAttribute("content"):""}function ew(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;const i=null==n?void 0:n.querySelector(".".concat(e));if(i&&HE(i)){const r=n.querySelector(t);null==r||r.classList.remove("invisible"),null==r||r.addEventListener("click",(()=>{i.classList.remove(e),r.classList.add("invisible")}))}}var tw=Object.hasOwnProperty,nw=Object.setPrototypeOf,iw=Object.isFrozen,rw=Object.getPrototypeOf,ow=Object.getOwnPropertyDescriptor,sw=Object.freeze,aw=Object.seal,cw=Object.create,lw="undefined"!=typeof Reflect&&Reflect,uw=lw.apply,dw=lw.construct;uw||(uw=function(e,t,n){return e.apply(t,n)}),sw||(sw=function(e){return e}),aw||(aw=function(e){return e}),dw||(dw=function(e,t){return new(Function.prototype.bind.apply(e,[null].concat(function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}(t))))});var hw=_w(Array.prototype.forEach),pw=_w(Array.prototype.pop),fw=_w(Array.prototype.push),mw=_w(String.prototype.toLowerCase),gw=_w(String.prototype.match),vw=_w(String.prototype.replace),yw=_w(String.prototype.indexOf),bw=_w(String.prototype.trim),Ew=_w(RegExp.prototype.test),ww=function(e){return function(){for(var t=arguments.length,n=Array(t),i=0;i<t;i++)n[i]=arguments[i];return dw(e,n)}}(TypeError);function _w(e){return function(t){for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return uw(e,t,i)}}function Sw(e,t){nw&&nw(e,null);for(var n=t.length;n--;){var i=t[n];if("string"==typeof i){var r=mw(i);r!==i&&(iw(t)||(t[n]=r),i=r)}e[i]=!0}return e}function Tw(e){var t=cw(null),n=void 0;for(n in e)uw(tw,e,[n])&&(t[n]=e[n]);return t}function Cw(e,t){for(;null!==e;){var n=ow(e,t);if(n){if(n.get)return _w(n.get);if("function"==typeof n.value)return _w(n.value)}e=rw(e)}return function(e){return console.warn("fallback value for",e),null}}var kw=sw(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Iw=sw(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Aw=sw(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Lw=sw(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Ow=sw(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]),Rw=sw(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nw=sw(["#text"]),xw=sw(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),Pw=sw(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Mw=sw(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Dw=sw(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Uw=aw(/\{\{[\s\S]*|[\s\S]*\}\}/gm),Bw=aw(/<%[\s\S]*|[\s\S]*%>/gm),qw=aw(/^data-[\-\w.\u00B7-\uFFFF]/),Fw=aw(/^aria-[\-\w]+$/),Hw=aw(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Gw=aw(/^(?:\w+script|data):/i),jw=aw(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zw="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};function Ww(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var Kw=function(){return"undefined"==typeof window?null:window},Vw=function(e,t){if("object"!==(void 0===e?"undefined":zw(e))||"function"!=typeof e.createPolicy)return null;var n=null,i="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(i)&&(n=t.currentScript.getAttribute(i));var r="dompurify"+(n?"#"+n:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}};var Yw=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Kw(),n=function(t){return e(t)};if(n.version="2.3.5",n.removed=[],!t||!t.document||9!==t.document.nodeType)return n.isSupported=!1,n;var i=t.document,r=t.document,o=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,c=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,d=void 0===u?t.NamedNodeMap||t.MozNamedAttrMap:u,h=t.HTMLFormElement,p=t.DOMParser,f=t.trustedTypes,m=c.prototype,g=Cw(m,"cloneNode"),v=Cw(m,"nextSibling"),y=Cw(m,"childNodes"),b=Cw(m,"parentNode");if("function"==typeof s){var E=r.createElement("template");E.content&&E.content.ownerDocument&&(r=E.content.ownerDocument)}var w=Vw(f,i),_=w?w.createHTML(""):"",S=r,T=S.implementation,C=S.createNodeIterator,k=S.createDocumentFragment,I=S.getElementsByTagName,A=i.importNode,L={};try{L=Tw(r).documentMode?r.documentMode:{}}catch(e){}var O={};n.isSupported="function"==typeof b&&T&&void 0!==T.createHTMLDocument&&9!==L;var R=Uw,N=Bw,x=qw,P=Fw,M=Gw,D=jw,U=Hw,B=null,q=Sw({},[].concat(Ww(kw),Ww(Iw),Ww(Aw),Ww(Ow),Ww(Nw))),F=null,H=Sw({},[].concat(Ww(xw),Ww(Pw),Ww(Mw),Ww(Dw))),G=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,z=null,W=!0,K=!0,V=!1,Y=!1,Q=!1,J=!1,X=!1,Z=!1,$=!1,ee=!1,te=!0,ne=!0,ie=!1,re={},oe=null,se=Sw({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ae=null,ce=Sw({},["audio","video","img","source","image","track"]),le=null,ue=Sw({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),de="http://www.w3.org/1998/Math/MathML",he="http://www.w3.org/2000/svg",pe="http://www.w3.org/1999/xhtml",fe=pe,me=!1,ge=void 0,ve=["application/xhtml+xml","text/html"],ye="text/html",be=void 0,Ee=null,we=r.createElement("form"),_e=function(e){return e instanceof RegExp||e instanceof Function},Se=function(e){Ee&&Ee===e||(e&&"object"===(void 0===e?"undefined":zw(e))||(e={}),e=Tw(e),B="ALLOWED_TAGS"in e?Sw({},e.ALLOWED_TAGS):q,F="ALLOWED_ATTR"in e?Sw({},e.ALLOWED_ATTR):H,le="ADD_URI_SAFE_ATTR"in e?Sw(Tw(ue),e.ADD_URI_SAFE_ATTR):ue,ae="ADD_DATA_URI_TAGS"in e?Sw(Tw(ce),e.ADD_DATA_URI_TAGS):ce,oe="FORBID_CONTENTS"in e?Sw({},e.FORBID_CONTENTS):se,j="FORBID_TAGS"in e?Sw({},e.FORBID_TAGS):{},z="FORBID_ATTR"in e?Sw({},e.FORBID_ATTR):{},re="USE_PROFILES"in e&&e.USE_PROFILES,W=!1!==e.ALLOW_ARIA_ATTR,K=!1!==e.ALLOW_DATA_ATTR,V=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,Q=e.WHOLE_DOCUMENT||!1,Z=e.RETURN_DOM||!1,$=e.RETURN_DOM_FRAGMENT||!1,ee=e.RETURN_TRUSTED_TYPE||!1,X=e.FORCE_BODY||!1,te=!1!==e.SANITIZE_DOM,ne=!1!==e.KEEP_CONTENT,ie=e.IN_PLACE||!1,U=e.ALLOWED_URI_REGEXP||U,fe=e.NAMESPACE||pe,e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(G.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&_e(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(G.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(G.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),ge=ge=-1===ve.indexOf(e.PARSER_MEDIA_TYPE)?ye:e.PARSER_MEDIA_TYPE,be="application/xhtml+xml"===ge?function(e){return e}:mw,Y&&(K=!1),$&&(Z=!0),re&&(B=Sw({},[].concat(Ww(Nw))),F=[],!0===re.html&&(Sw(B,kw),Sw(F,xw)),!0===re.svg&&(Sw(B,Iw),Sw(F,Pw),Sw(F,Dw)),!0===re.svgFilters&&(Sw(B,Aw),Sw(F,Pw),Sw(F,Dw)),!0===re.mathMl&&(Sw(B,Ow),Sw(F,Mw),Sw(F,Dw))),e.ADD_TAGS&&(B===q&&(B=Tw(B)),Sw(B,e.ADD_TAGS)),e.ADD_ATTR&&(F===H&&(F=Tw(F)),Sw(F,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&Sw(le,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(oe===se&&(oe=Tw(oe)),Sw(oe,e.FORBID_CONTENTS)),ne&&(B["#text"]=!0),Q&&Sw(B,["html","head","body"]),B.table&&(Sw(B,["tbody"]),delete j.tbody),sw&&sw(e),Ee=e)},Te=Sw({},["mi","mo","mn","ms","mtext"]),Ce=Sw({},["foreignobject","desc","title","annotation-xml"]),ke=Sw({},Iw);Sw(ke,Aw),Sw(ke,Lw);var Ie=Sw({},Ow);Sw(Ie,Rw);var Ae=function(e){var t=b(e);t&&t.tagName||(t={namespaceURI:pe,tagName:"template"});var n=mw(e.tagName),i=mw(t.tagName);if(e.namespaceURI===he)return t.namespaceURI===pe?"svg"===n:t.namespaceURI===de?"svg"===n&&("annotation-xml"===i||Te[i]):Boolean(ke[n]);if(e.namespaceURI===de)return t.namespaceURI===pe?"math"===n:t.namespaceURI===he?"math"===n&&Ce[i]:Boolean(Ie[n]);if(e.namespaceURI===pe){if(t.namespaceURI===he&&!Ce[i])return!1;if(t.namespaceURI===de&&!Te[i])return!1;var r=Sw({},["title","style","font","a","script"]);return!Ie[n]&&(r[n]||!ke[n])}return!1},Le=function(e){fw(n.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=_}catch(t){e.remove()}}},Oe=function(e,t){try{fw(n.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){fw(n.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!F[e])if(Z||$)try{Le(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Re=function(e){var t=void 0,n=void 0;if(X)e="<remove></remove>"+e;else{var i=gw(e,/^[\r\n\t ]+/);n=i&&i[0]}"application/xhtml+xml"===ge&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var o=w?w.createHTML(e):e;if(fe===pe)try{t=(new p).parseFromString(o,ge)}catch(e){}if(!t||!t.documentElement){t=T.createDocument(fe,"template",null);try{t.documentElement.innerHTML=me?"":o}catch(e){}}var s=t.body||t.documentElement;return e&&n&&s.insertBefore(r.createTextNode(n),s.childNodes[0]||null),fe===pe?I.call(t,Q?"html":"body")[0]:Q?t.documentElement:s},Ne=function(e){return C.call(e.ownerDocument||e,e,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},xe=function(e){return e instanceof h&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof d)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore)},Pe=function(e){return"object"===(void 0===a?"undefined":zw(a))?e instanceof a:e&&"object"===(void 0===e?"undefined":zw(e))&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Me=function(e,t,i){O[e]&&hw(O[e],(function(e){e.call(n,t,i,Ee)}))},De=function(e){var t=void 0;if(Me("beforeSanitizeElements",e,null),xe(e))return Le(e),!0;if(gw(e.nodeName,/[\u0080-\uFFFF]/))return Le(e),!0;var i=be(e.nodeName);if(Me("uponSanitizeElement",e,{tagName:i,allowedTags:B}),!Pe(e.firstElementChild)&&(!Pe(e.content)||!Pe(e.content.firstElementChild))&&Ew(/<[/\w]/g,e.innerHTML)&&Ew(/<[/\w]/g,e.textContent))return Le(e),!0;if("select"===i&&Ew(/<template/i,e.innerHTML))return Le(e),!0;if(!B[i]||j[i]){if(ne&&!oe[i]){var r=b(e)||e.parentNode,o=y(e)||e.childNodes;if(o&&r)for(var s=o.length-1;s>=0;--s)r.insertBefore(g(o[s],!0),v(e))}if(!j[i]&&Be(i)){if(G.tagNameCheck instanceof RegExp&&Ew(G.tagNameCheck,i))return!1;if(G.tagNameCheck instanceof Function&&G.tagNameCheck(i))return!1}return Le(e),!0}return e instanceof c&&!Ae(e)?(Le(e),!0):"noscript"!==i&&"noembed"!==i||!Ew(/<\/no(script|embed)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=vw(t,R," "),t=vw(t,N," "),e.textContent!==t&&(fw(n.removed,{element:e.cloneNode()}),e.textContent=t)),Me("afterSanitizeElements",e,null),!1):(Le(e),!0)},Ue=function(e,t,n){if(te&&("id"===t||"name"===t)&&(n in r||n in we))return!1;if(K&&!z[t]&&Ew(x,t));else if(W&&Ew(P,t));else if(!F[t]||z[t]){if(!(Be(e)&&(G.tagNameCheck instanceof RegExp&&Ew(G.tagNameCheck,e)||G.tagNameCheck instanceof Function&&G.tagNameCheck(e))&&(G.attributeNameCheck instanceof RegExp&&Ew(G.attributeNameCheck,t)||G.attributeNameCheck instanceof Function&&G.attributeNameCheck(t))||"is"===t&&G.allowCustomizedBuiltInElements&&(G.tagNameCheck instanceof RegExp&&Ew(G.tagNameCheck,n)||G.tagNameCheck instanceof Function&&G.tagNameCheck(n))))return!1}else if(le[t]);else if(Ew(U,vw(n,D,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==yw(n,"data:")||!ae[e]){if(V&&!Ew(M,vw(n,D,"")));else if(n)return!1}else;return!0},Be=function(e){return e.indexOf("-")>0},qe=function(e){var t=void 0,i=void 0,r=void 0,o=void 0;Me("beforeSanitizeAttributes",e,null);var s=e.attributes;if(s){var a={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:F};for(o=s.length;o--;){var c=t=s[o],l=c.name,u=c.namespaceURI;if(i=bw(t.value),r=be(l),a.attrName=r,a.attrValue=i,a.keepAttr=!0,a.forceKeepAttr=void 0,Me("uponSanitizeAttribute",e,a),i=a.attrValue,!a.forceKeepAttr&&(Oe(l,e),a.keepAttr))if(Ew(/\/>/i,i))Oe(l,e);else{Y&&(i=vw(i,R," "),i=vw(i,N," "));var d=be(e.nodeName);if(Ue(d,r,i))try{u?e.setAttributeNS(u,l,i):e.setAttribute(l,i),pw(n.removed)}catch(e){}}}Me("afterSanitizeAttributes",e,null)}},Fe=function e(t){var n=void 0,i=Ne(t);for(Me("beforeSanitizeShadowDOM",t,null);n=i.nextNode();)Me("uponSanitizeShadowNode",n,null),De(n)||(n.content instanceof o&&e(n.content),qe(n));Me("afterSanitizeShadowDOM",t,null)};return n.sanitize=function(e,r){var s=void 0,c=void 0,l=void 0,u=void 0,d=void 0;if((me=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Pe(e)){if("function"!=typeof e.toString)throw ww("toString is not a function");if("string"!=typeof(e=e.toString()))throw ww("dirty is not a string, aborting")}if(!n.isSupported){if("object"===zw(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Pe(e))return t.toStaticHTML(e.outerHTML)}return e}if(J||Se(r),n.removed=[],"string"==typeof e&&(ie=!1),ie){if(e.nodeName){var h=be(e.nodeName);if(!B[h]||j[h])throw ww("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof a)1===(c=(s=Re("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===c.nodeName||"HTML"===c.nodeName?s=c:s.appendChild(c);else{if(!Z&&!Y&&!Q&&-1===e.indexOf("<"))return w&&ee?w.createHTML(e):e;if(!(s=Re(e)))return Z?null:ee?_:""}s&&X&&Le(s.firstChild);for(var p=Ne(ie?e:s);l=p.nextNode();)3===l.nodeType&&l===u||De(l)||(l.content instanceof o&&Fe(l.content),qe(l),u=l);if(u=null,ie)return e;if(Z){if($)for(d=k.call(s.ownerDocument);s.firstChild;)d.appendChild(s.firstChild);else d=s;return F.shadowroot&&(d=A.call(i,d,!0)),d}var f=Q?s.outerHTML:s.innerHTML;return Y&&(f=vw(f,R," "),f=vw(f,N," ")),w&&ee?w.createHTML(f):f},n.setConfig=function(e){Se(e),J=!0},n.clearConfig=function(){Ee=null,J=!1},n.isValidAttribute=function(e,t,n){Ee||Se({});var i=be(e),r=be(t);return Ue(i,r,n)},n.addHook=function(e,t){"function"==typeof t&&(O[e]=O[e]||[],fw(O[e],t))},n.removeHook=function(e){O[e]&&pw(O[e])},n.removeHooks=function(e){O[e]&&(O[e]=[])},n.removeAllHooks=function(){O={}},n}(),Qw=Yw;const Jw={ADD_TAGS:["#comment","li-icon","icon","iframe"],ADD_ATTR:["target"],FORCE_BODY:!0,RETURN_DOM:!0};function Xw(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Zw(null,e,t);return n.innerHTML}function Zw(e,t){let{ADD_TAGS:n=[],ADD_ATTR:i=[]}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const r=hg({},Jw);r.ADD_TAGS=[...r.ADD_TAGS,...n],r.ADD_ATTR=[...r.ADD_ATTR,...i];const o=Qw.sanitize(t,r);return e&&e.nodeType===Node.ELEMENT_NODE&&(e.innerHTML="",e.append(...o.childNodes)),o}var $w="aria-[a-z0-9_\\-]+|class|data-[a-z0-9_\\-]+|dir|id|role|tabindex",e_=function(){if("undefined"==typeof document)return!0;return"textContent"in document.createElement("div")}()?"textContent":"innerText",t_=["b","del","em","i","s","strong","sub","sup"],n_=t_.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"]),i_=[$w,"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 r_(){}var o_=function(){var e,t=/[&<>"'\u0000\\=]/g;return e={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","\0":"�","\\":"&#92;","=":"&#61;"},function(n){return null==n?null:n.toString().replace(t,(function(t){return e[t]}))}}(),s_=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 i={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(r){return null==r?null:(r+"").replace(n,(function(n,r,o,s){return r?(a=r,i.hasOwnProperty(a)?i[a]:(e.innerHTML="&"+a+";",c=e[e_],i[a]=c,c)):o||s?t(parseInt(o||s,o?16:10)||65533):"�";var a,c}))}}();var a_=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};function c_(e){return/[<&]/.test(e)}var l_=Array.prototype.forEach?function(e,t){Array.prototype.forEach.call(e,t)}:function(e,t){for(var n=0,i=e.length;n<i;n++)t(e[n],n)},u_="[ \t\r\n]*";function d_(e){e=a_(e)?e:[e];var t,n,i,r=0,o="<(?!/?";return o+="(?:",l_(e,(function(e,s){t=e.tags||n_,n=e.attrs||i_,i=e.checkUrlAttrs||!1,0!==s&&(o+="|"),o+="(?:"+t.join("|")+")",o+="(?:",o+=u_,o+="|[ \t\r\n]+",o+="(?:(?:",o+="(?:"+n+")(?:=([\"'])[^'\"<>]*\\"+ ++r+")?",i&&(o+="|(?:href|src)=([\"'])(?:(?:https?|ftp|mailto|invalid)(?::|&#(?:58|x3a);)|(?:data:image/(?:gif|jpg|jpeg|png);base64,)|[/.#?]|&#(?:35|4[67]|63|x(?:2[3ef]|3f));)[^'\"<>]*\\"+ ++r),o+=")[ \t\r\n]*)+",o+=")"})),o+=")",o+="/?>)",new RegExp(o,"i")}function h_(e){return d_({tags:e=e||n_,checkUrlAttrs:!0})}function p_(e,t){var n=(t=t||{}).allowTags,i=!1!==t.hasCustomElementMarkup;return n?!h_(n).test(e):i?!p_.R_UNSAFE_CUSTOM_ELEMENT.test(e):!p_.R_UNSAFE_HTML.test(e)}function f_(e){return e.replace(/<[^>]*>|[<>'"&\\]/g,"")}function m_(e,t,n){if(null==e)return null;e=e.toString();var i=t?function(e,t){var n={};return e.replace(/\{([^}]+)\}/g,(function(e,i){var r,o=e;if(n.hasOwnProperty(i))return n[i];if(t.hasOwnProperty(i)){if(!((r="string"==typeof(o=t[i]))||o instanceof r_||"number"==typeof o))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");o=r?o_(o):o.toString()}return n[i]=o,o}))}(e,t):e,r=e;return c_(i)&&!p_(i,n)&&(i=f_(i),xE("Content contains non-whitelisted tags or attributes:\nContent: "+r,"error")),i}function g_(e,t){for(var n=+t.length,i=0,r=e.length;i<n;i++)e[r++]=t[i];return e.length=r,e}p_.R_UNSAFE_HTML=h_(),p_.R_UNSAFE_CUSTOM_ELEMENT=function(){var e={tag:"li-icon",attrs:"active|a11y-text|animate|color|size|type"};return d_([{tags:n_,checkUrlAttrs:!0},{tags:[e.tag],attrs:[$w,e.attrs].join("|"),checkUrlAttrs:!1}])}();var v_={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,"",""]};v_.optgroup=v_.option,v_.tbody=v_.tfoot=v_.colgroup=v_.caption=v_.thead,v_.th=v_.td;var y_=/<([\w:]+)/;function b_(e,t){var n,i,r,o,s,a,c,l=t.createDocumentFragment(),u=[];for(s=0,c=e.length;s<c;s++)if((o=e[s])||0===o)if("string"==typeof o){for(r=r||l.appendChild(t.createElement("div")),n=(y_.exec(o)||["",""])[1].toLowerCase(),__(r,(i=v_[n]||v_._default)[1]+o+i[2]),a=i[0];a--;)r.lastChild&&r.lastChild.nodeType===Node.ELEMENT_NODE&&(r=r.lastChild);g_(u,r.childNodes),(r=l.firstChild).textContent=""}else g_(u,o.nodeType?[o]:o);for(l.textContent="",o=u[s=0];o;)l.appendChild(o),o=u[++s];return l}var E_=m_,w_=m_;function __(e,t,n){var i=m_(t,n);return c_(i)?e.innerHTML=i:e[e_]=i,i}function S_(e,t){if(!(this instanceof S_))return new S_(e,t);(t=t||{}).allowTags=t.allowTags?t.allowTags.reduce((function(e,t){return e.concat(t)}),[]):null,this._string=e,this._options=t}S_.prototype=function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}(new r_,{toString:function(){var e=this._string,t=this._stringVal,n=e;return void 0!==t?t:(p_(e,this._options)||(n=e,e=f_(e),xE("UnsafeString contains non-whitelisted tags or attributes.\nString: "+n,"error")),this._stringVal=e,e)}});var T_={ALLOWED_TAGS:n_,FORMATTING_TAGS:t_,htmlEncode:o_,htmlUnencode:s_,log:xE,mk:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];let r,o="",s=n.length;return e&&e.forEach((function(e,t){o+=e,t<s&&(r=n[t],o+=r instanceof S_?r:o_(r))})),w_(o)},parseHTML:function(e,t){var n;if(t=t||document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument(""):document,"string"==typeof e)n=b_([e],t);else{if(!a_(e))return e;n=b_(e,t)}return g_([],n.childNodes)},parseSelector:function(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e},processTemplate:E_,reEncode:function(e){return o_(s_(e))},_redirector:FE,redirect:function(e){const t=qE(e);t===e&&FE.redirect(t)},sanitizeHTML:w_,sanitizeUrl:qE,setElementContent:__,text:function(e){return xE("jSecure.text() is deprecated. Please use jSecure.htmlEncode().","warn"),o_(e)},unsafe:function(e){return e},UnsafeString:S_};function C_(e){if(e instanceof HTMLElement)if(document.documentElement.classList.contains("ios")){const t=10,n=10;e.blur();let i=0;const r=window.setInterval((function(){e.focus(),i>=n&&window.clearInterval(r),i++}),t)}else e.focus()}const k_="toast--hidden",I_=".toast",A_=".toast__message",L_=Object.freeze({CAUTION:"caution",ERROR:"error",GDPR:"gdpr",NOTIFY:"notify",SUCCESS:"success"});class O_{constructor(){let{removeToastCallback:e=(()=>{})}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=document.getElementById("toasts");if(!t)throw new Error("No toasts element");this._el=t,this._position=t.getAttribute("type"),this.removeToastCallback=e,this.bindEvents()}trigger(e,t,n,i){if(!e||!Object.values(L_).includes(e))throw new Error("Valid type not specified: type must be caution, error, gdpr, notify or success");if(!t)throw new Error("No message specified");const r=n?"".concat(n,"_toast-").concat(e):"toast-".concat(e),o=this._createToastEl(e,t,r,i);return this._addToast(o)}clearAllToasts(){let e=this._el.querySelectorAll(I_);Array.from(e).forEach((e=>{this._removeToast(e)}))}bindEvents(){this._el.addEventListener("click",(e=>{const t=ym(e.target,".toast__dismiss-btn");if(t){const e=ym(t,I_);e&&this._removeToast(e)}}))}_isValidCtaMetadata(e){return["url","trk","text"].every((t=>e.hasOwnProperty(t)))}_createToastEl(e,t,n,i){const r=document.querySelector("#toast-template").content.firstElementChild.cloneNode(!0),o=document.querySelector("#toast-icon-".concat(e)).content.firstElementChild.cloneNode(!0);if(!r||!o)throw new Error("Toast templates are missing");r.classList.add("toast--".concat(e)),r.setAttribute("type",e);const s=r.querySelector(A_);s.insertBefore(o,s.firstElementChild);r.querySelector(".toast__dismiss-btn").setAttribute("data-tracking-control-name","".concat(n,"_dismiss"));const a=r.querySelector(".toast__message-content");let c="text-color-text-neutral";if(e===L_.CAUTION?c="text-color-text-caution":e===L_.ERROR?c="text-color-text-negative":e===L_.SUCCESS&&(c="text-color-text-positive"),a.classList.add(c),Zw(a,t),i&&this._isValidCtaMetadata(i)){const e=r.querySelector(".toast__message-content-container"),t=document.querySelector("#toast-cta").content.firstElementChild.cloneNode(!0),n=i.target||"_blank";t.setAttribute("href",T_.sanitizeUrl(Am(i.url,i.trk))),t.setAttribute("target",n),t.textContent=i.text,e.classList.add(c),e.append(t)}return r}_addToast(e){this._el.appendChild(e);const t=this._el.querySelector(A_);return this._hasToast()&&this._el.classList.remove("invisible"),this._refreshLazyLoader(),setTimeout((function(){e.classList.remove(k_),C_(t)}),500),e}_removeToast(e){let t=this._el;e.classList.add(k_),setTimeout((()=>{e.remove(),this._hasToast()||t.classList.add("invisible"),this.removeToastCallback()}),500)}_hasToast(){return[...this._el.children].some((e=>"template"!==e.tagName.toLowerCase()))}_refreshLazyLoader(){var e,t;null===(e=window.lazyloader)||void 0===e||null===(t=e.then)||void 0===t||t.call(e,(e=>{e.refreshLoader()}))}}pg(O_,"TOAST_TYPES",L_);const R_={};function N_(e){const t=document.getElementById(e);if(!t&&void 0!==R_[e])return R_[e];if(!t)return console.warn("Element with id: ".concat(e," not found")),R_[e]=null,R_[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):(R_[e]=n,t.parentNode.removeChild(t),R_[e])}const x_={COPY:"copy",LINKEDIN:"linkedin",TWITTER:"twitter",FACEBOOK:"facebook"};Object.keys(x_).map((e=>x_[e]));const P_=["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("|");new RegExp(P_,"i");new Uint8Array(16);const M_=[];for(let e=0;e<256;++e)M_.push((e+256).toString(16).slice(1));"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);const D_="tooltip__popup";"".concat(D_,"--show");const U_="/mwlite/badge-counts";const B_="overlay_";class q_ extends NE{constructor(e){let{enablePageViewTracking:t=!1,shouldHideModal:n=(()=>!1),triggerByOutletEl:i=!0,pushState:r=!0,shouldMoveToTopContainer:o=!0,focusElement:s,pageKey:a}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("No element passed into mobile web modal");super(e,{enablePageViewTracking:t,shouldHideModal:n,triggerByOutletEl:i,shouldMoveToTopContainer:o,focusElement:s,pageKey:a}),this.pushState=r,this.hashChangeHandlerRef=this._hashChangeHandler.bind(this)}historyBackClickHandler(){this.close({enableHistoryBack:!1})}_hashChangeHandler(e){const t=e.oldURL&&e.oldURL.split("#")[1];t&&t==="".concat(B_).concat(this._el.id)&&this.historyBackClickHandler()}open(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super.open(e),this._shouldHideModal()||(this.pushState&&history.pushState(this._el.id,"show modal","#".concat(B_).concat(this._el.id)),window.addEventListener("hashchange",this.hashChangeHandlerRef))}close(){let{enableHistoryBack:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};window.removeEventListener("hashchange",this.hashChangeHandlerRef),this.pushState&&e&&(window.history.replaceState({},document.title,window.location.href.split("#")[0]),history.back()),super.close()}}document.querySelector.bind(document);String.fromCharCode(32);Um(document);String.fromCharCode(32);function F_(){const e=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return!e||0===e.trim().length};return e.errorMessageSuffix="error_empty",e}function H_(e){const t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.length<e};return t.errorMessageSuffix="error_too_short",t}function G_(e){const t=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.length>e};return t.errorMessageSuffix="error_too_long",t}F_(),H_(3),G_(128),F_(),H_(6),G_(400);var j_=window||n.g;j_.utag_data||(j_.utag_data={});const z_="undefined"!=typeof window&&window&&"node"!==window.appEnvironment;j_.utag_cfg_ovrd=j_.utag_cfg_ovrd||{},j_.trackingEventDebugData=j_.trackingEventDebugData||[],j_.utag_cfg_ovrd.noview=!0,j_.utag_cfg_ovrd.nocookie=!0;z_&&new RegExp("bot|google|aolbuild|baidu|bing|msn|duckduckgo|teoma|slurp|yandex|sogou|facebook|alexa","i").test(j_.navigator.userAgent);!function(){if("function"==typeof window.CustomEvent)return!1;window.CustomEvent=function(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}}(),function(){if("function"==typeof window.EventTarget)try{return!new e}catch(e){}const 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],i=0,r=n.length;i<r;i++)if(n[i]===t)return void n.splice(i,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,i=t.length;n<i;n++)t[n].call(this,e);return!e.defaultPrevented},window.EventTarget=e}();const W_={GOOGLE_ERROR:"googleError",GOOGLE_USER_FETCHED:"googleUserFetched",INITIALIZED:"initialized",PROMPT_MOMENT:"promptMomentNotification",TOKEN_FETCHED:"tokenFetched"},K_={INITIALIZATION:"initialization",AUTHENTICATION:"authentication"},{GOOGLE_ERROR:V_,GOOGLE_USER_FETCHED:Y_,INITIALIZED:Q_}=W_,{INITIALIZATION:J_,AUTHENTICATION:X_}=K_;class Z_ extends EventTarget{constructor(e){let{libSrcPath:t,el:n,clientId:i=ssr_ui_lib_es_CLIENT_ID}=e;if(super(),!n)throw TypeError("DOM element for Sign In button is required");if(this.libSrcPath=t,this.el=n,this.clientId=i,window.gapi)this._initializeGoogleAuth();else{if(!t)throw TypeError("Google Sign In lib not already loaded on the page. libSrcPath is required to load the lib.");!function(e){"complete"===document.readyState?e():window.addEventListener("load",(()=>{e()}))}((()=>{!function(e,t){const n=document.createElement("script");n.src=e,t&&(n.onload=t),document.head.appendChild(n)}(t,this._initializeGoogleAuth.bind(this))}))}}_initializeGoogleAuth(){return gapi.auth2.init({client_id:this.clientId}).then((e=>{this.auth2=e,this._attachSignIn();const t=new CustomEvent(Q_);this.dispatchEvent(t)})).catch((e=>{const t={type:J_,message:e.error},n=new CustomEvent(V_,{detail:t});this.dispatchEvent(n)}))}_attachSignIn(){this.auth2.attachClickHandler(this.el,{},(e=>{const t=new CustomEvent(Y_,{detail:this._getGoogleUserInformation(e)});this.dispatchEvent(t)}),(e=>{const t={type:X_,message:e.error},n=new CustomEvent(V_,{detail:t});this.dispatchEvent(n)}))}_getGoogleUserInformation(e){const 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()}}}var $_={exports:{}};function eS(e){this.message=e}eS.prototype=new Error,eS.prototype.name="InvalidCharacterError";var tS="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new eS("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(n=r%4?64*n+i:i,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};var nS=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 function(e){return decodeURIComponent(tS(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return tS(t)}};function iS(e){this.message=e}iS.prototype=new Error,iS.prototype.name="InvalidTokenError",$_.exports=function(e,t){if("string"!=typeof e)throw new iS("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(nS(e.split(".")[n]))}catch(e){throw new iS("Invalid token specified: "+e.message)}},$_.exports.InvalidTokenError=iS;const rS=W_,oS=K_;const{GOOGLE_USER_FETCHED:sS,GOOGLE_ERROR:aS,INITIALIZED:cS}=rS,{INITIALIZATION:lS}=oS;function uS(e){var t=e.intersectionRect;return t.width>=0&&t.height>=0}function dS(e){try{return e.getBoundingClientRect()}catch(e){if("object"==typeof e&&null!==e&&16389==(65535&e.number))return{top:0,bottom:0,left:0,width:0,height:0,right:0,x:0,y:0};throw e}}function hS(e,t){return Math.round(e-t)}var pS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),fS=function(){function e(){this.items=[]}return e.prototype.remove=function(e){for(var t=this.items.length,n=0;n<t;n++)this.removePredicate(e,this.items[n])&&(this.items.splice(n,1),n--,t--)},e.prototype.clear=function(){this.items=[]},e.prototype.push=function(e){this.items.push(e)},e.prototype.isEmpty=function(){return 0===this.items.length},e}(),mS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pS(t,e),t.prototype.removePredicate=function(e,t){return"string"==typeof e?t.id===e:t.callback===e},t}(fS),gS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pS(t,e),t.prototype.removePredicate=function(e,t){return t===e},t}(fS),vS=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return pS(t,e),t.prototype.removePredicate=function(e,t){return"string"==typeof e?t.id===e:"function"==typeof e?t.callback===e:t.el===e},t}(fS),yS=function(){return 0},bS=!("undefined"==typeof window||!window||"undefined"==typeof document||!document),ES=bS&&!!window.requestAnimationFrame,wS={hasDOM:bS,hasRAF:ES,getScrollTop:yS,getScrollLeft:yS,getHeight:yS,getWidth:yS,rAF:ES?window.requestAnimationFrame.bind(window):function(e){e()},meta:{width:0,height:0,scrollTop:0,scrollLeft:0,x:0,y:0,top:0,left:0},version:0,lastVersion:0,updateMeta:yS,get isDirty(){return wS.version!==wS.lastVersion},document:window.document,IntersectionObserver:bS&&window.IntersectionObserver,performance:bS&&window.performance};function _S(){++wS.version}function SS(){var e=null!=document.scrollingElement;wS.getScrollTop=e?function(){return document.scrollingElement.scrollTop}:function(){return window.scrollY},wS.getScrollLeft=e?function(){return document.scrollingElement.scrollLeft}:function(){return window.scrollX}}bS&&(wS.getHeight=function(){return window.innerHeight},wS.getWidth=function(){return window.innerWidth},wS.updateMeta=function(){wS.meta.height=wS.getHeight(),wS.meta.width=wS.getWidth(),wS.meta.scrollLeft=wS.getScrollLeft(),wS.meta.scrollTop=wS.getScrollTop(),wS.lastVersion=wS.version},wS.updateMeta(),"loading"!==document.readyState?SS():document.addEventListener("DOMContentLoaded",SS),window.addEventListener("resize",_S,!1),window.addEventListener("scroll",_S,!1));var TS=function(){function e(){this.reads=[],this.work=[],this.running=!1}return e.prototype.scheduleRead=function(e){this.reads.unshift(e),this.run()},e.prototype.scheduleWork=function(e){this.work.unshift(e),this.run()},e.prototype.run=function(){var e=this;this.running||(this.running=!0,wS.rAF((function(){e.running=!1;for(var t=0,n=e.reads.length;t<n;t++)e.reads.pop()();t=0;for(var i=e.work.length;t<i;t++)e.work.pop()();(e.work.length>0||e.reads.length>0)&&e.run()})))},e}(),CS=null;var kS=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),IS="xxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})),AS=0,LS=function(){function e(e,t,n,i,r,o,s,a,c,l){this.dateNow=e,this.highResTime=t,this.scrollTop=n,this.scrollLeft=i,this.width=r,this.height=o,this.x=s,this.y=a,this.top=c,this.left=l}return e.generate=function(t){void 0===t&&(t=window);var n=this.revalidateRootMeta(t);return new e(Date.now(),performance.now(),n.scrollTop,n.scrollLeft,n.width,n.height,n.x,n.y,n.top,n.left)},e.revalidateRootMeta=function(e){void 0===e&&(e=document);var t,n={width:0,height:0,scrollTop:0,scrollLeft:0,x:0,y:0,top:0,left:0};return wS.isDirty&&wS.updateMeta(),e===window||e===document?(n.height=wS.meta.height,n.width=wS.meta.width,n.scrollLeft=wS.meta.scrollLeft,n.scrollTop=wS.meta.scrollTop,n):(t=dS(e),n.scrollTop=e.scrollTop,n.scrollLeft=e.scrollLeft,n.width=t.width,n.height=t.height,n.x=t.x,n.y=t.y,n.top=t.top,n.left=t.left,n)},e}();function OS(){return AS+++IS}var RS=function(){function e(e,t){this.isTicking=!1,this.toRemove=[],this.engine=e||(CS||(CS=new TS)),this.root=t||window}return e.prototype.tick=function(){if(this.queue.isEmpty())this.isTicking=!1;else{if(this.toRemove.length>0){for(var e=0;e<this.toRemove.length;e++)this.queue.remove(this.toRemove[e]);this.toRemove=[]}this.applyQueue(LS.generate(this.root)),this.engine.scheduleRead(this.tick.bind(this))}},e.prototype.scheduleWork=function(e){this.engine.scheduleWork(e)},e.prototype.scheduleRead=function(e){this.engine.scheduleRead(e)},e.prototype.queryElement=function(e,t){var n,i,r=this;this.engine.scheduleRead((function(){n=dS(e),i=LS.generate(r.root)})),this.engine.scheduleWork((function(){t(n,i)}))},e.prototype.unwatch=function(e){this.toRemove.push(e)},e.prototype.unwatchAll=function(){this.queue.clear()},e.prototype.startTicking=function(){this.isTicking||(this.isTicking=!0,this.engine.scheduleRead(this.tick.bind(this)))},e}(),NS=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.queue=new mS,t}return kS(t,e),t.prototype.applyQueue=function(e){for(var t=0;t<this.queue.items.length;t++){var n=this.queue.items[t],i=n.id;(0,n.callback)(e,i)}},t.prototype.watch=function(e){this.startTicking();var t=OS();return this.queue.push({callback:e,id:t}),t},t}(RS),xS=function(e){function t(t){var n=e.call(this,void 0,window)||this;return n.predicate=t,n}return kS(t,e),t.prototype.applyQueue=function(t){this.predicate(t)&&e.prototype.applyQueue.call(this,t)},t}(NS),PS=function(e){function t(t,n,i){void 0===i&&(i=!1);var r=e.call(this,t,n)||this;return r.lastVersion=wS.version,r.queue=new vS,r.ALLOW_CACHED_SCHEDULER=i,r}return kS(t,e),Object.defineProperty(t.prototype,"isDirty",{get:function(){return wS.version!==this.lastVersion},enumerable:!1,configurable:!0}),t.prototype.applyQueue=function(e){for(var t=0;t<this.queue.items.length;t++){var n=this.queue.items[t],i=n.callback,r=n.el,o=n.id,s=n.clientRect;!this.isDirty&&s&&this.ALLOW_CACHED_SCHEDULER||(s=this.queue.items[t].clientRect=dS(r)),i(e,o,s)}this.lastVersion=wS.version},t.prototype.watch=function(e,t,n){this.startTicking(),n=n||OS();return this.queue.push({el:e,callback:t,id:n,clientRect:null}),n},t}(RS),MS=null;var DS=function(){function e(){this.queue=new gS}return e.prototype.listen=function(e){this.queue.push(e)},e.prototype.unlisten=function(e){this.queue.remove(e)},e.prototype.trigger=function(e){for(var t=0;t<this.queue.items.length;t++)this.queue.items[t](e)},e}(),US=function(){function e(e){this.scheduler=new xS(e.bind(this))}return e.prototype.trigger=function(){},e.prototype.listen=function(e){this.state=LS.generate(),this.scheduler.watch(e)},e.prototype.unlisten=function(e){this.scheduler.unwatch(e)},e}(),BS=null;function qS(e,t){var n=(BS||(BS={scroll:new US((function(e){var t=this.state,n=t.scrollTop,i=t.scrollLeft;return this.state=e,n!==e.scrollTop||i!==e.scrollLeft})),resize:new US((function(e){var t=this.state,n=t.width,i=t.height;return this.state=e,i!==e.height||n!==e.width})),destroy:new DS,beforeunload:new DS,hide:new DS,show:new DS}))[e];n&&n.listen(t)}function FS(e,t){if(BS){var n=BS[e];n&&n.unlisten(t)}}function HS(e,t){if(BS){var n=BS[e];n&&n.trigger(t)}}function GS(e){(MS||(MS=new NS)).scheduleWork(e)}function jS(e){var t=e.left,n=e.right,i=e.top,r=e.bottom;return{left:t,x:t,top:i,y:i,bottom:r,right:n,width:n-t,height:r-i}}wS.hasDOM&&(window.addEventListener("beforeunload",(function(){HS("beforeunload"),HS("destroy")})),document.addEventListener("visibilitychange",(function(){"visible"===document.visibilityState?HS("show"):HS("hide")})));var zS=function(){function e(e,t){void 0===t&&(t={}),this.records={},this.callback=e,t.threshold=t.threshold||0,this.rootMarginObj=function(e){var t=e.split(" ").map((function(e){return parseInt(e,10)}));switch(t.length){case 2:return{top:t[0],left:t[1],bottom:t[0],right:t[1]};case 3:return{top:t[0],left:t[1],bottom:t[2],right:t[1]};case 4:return{top:t[0],left:t[1],bottom:t[2],right:t[3]};default:return{top:0,left:0,bottom:0,right:0}}}(t.rootMargin||"0px"),this.root=t.root||null,Array.isArray(t.threshold)?this.thresholds=t.threshold:this.thresholds=[t.threshold],this.scheduler=new PS(void 0,this.root,t.ALLOW_CACHED_SCHEDULER)}return e.prototype.observe=function(e){var t=this,n=e,i=n.__spanielId=n.__spanielId||OS();return this.scheduler.watch(e,(function(e,i,r){t.onTick(e,i,r,n)}),n.__spanielId),i},e.prototype.onTick=function(e,t,n,i){var r=this,o=this.generateEntryEvent(e,n,i),s=o.numSatisfiedThresholds,a=o.entry,c=this.records[t]||(this.records[t]={entry:a,numSatisfiedThresholds:0});s===c.numSatisfiedThresholds&&a.isIntersecting===c.entry.isIntersecting||(c.numSatisfiedThresholds=s,c.entry=a,this.scheduler.scheduleWork((function(){r.callback([a])})))},e.prototype.unobserve=function(e){this.scheduler.unwatch(e.__spanielId),delete this.records[e.__spanielId]},e.prototype.disconnect=function(){this.scheduler.unwatchAll(),this.records={}},e.prototype.takeRecords=function(){return[]},e.prototype.generateEntryEvent=function(e,t,n){for(var i=0,r=function(e,t,n,i){if("none"===n.style.display)return{time:e.dateNow,highResTime:e.highResTime,boundingClientRect:WS(),intersectionRatio:0,intersectionRect:WS(),isIntersecting:!1,rootBounds:WS(),target:n};var r=t.bottom,o=t.right,s=e.left+i.left,a=e.top+i.top,c={left:s,top:a,bottom:i.bottom,right:i.right,width:e.width-(i.right+i.left),height:e.height-(i.bottom+i.top),y:a,x:s},l=Math.max(c.left,t.left),u=Math.max(c.top,t.top),d=Math.min(c.left+c.width,t.right)-l,h=Math.min(c.top+c.height,t.bottom)-u,p=d>=0?l:0,f=u>=0?u:0,m={left:p,top:f,x:p,y:f,width:d,height:h,right:o,bottom:r};return function(e){var t=e.unixTime,n=e.highResTime,i=e.rootBounds,r=e.boundingClientRect,o=e.intersectionRect,s=e.target,a=r.height*r.width,c=a>0?o.width*o.height/a:0;return{time:t,highResTime:n,rootBounds:i,boundingClientRect:r,intersectionRect:o,target:s,intersectionRatio:c,isIntersecting:uS({intersectionRect:o})}}({unixTime:e.dateNow,highResTime:e.highResTime,rootBounds:c,target:n,boundingClientRect:jS(t),intersectionRect:m})}(e,t,n,this.rootMarginObj),o=0;o<this.thresholds.length;o++){var s=this.thresholds[o];r.intersectionRatio>=s&&i++}return{numSatisfiedThresholds:i,entry:r}},e}();function WS(){return{bottom:0,height:0,left:0,right:0,top:0,width:0,x:0,y:0}}var KS={x:0,y:0,width:0,height:0,bottom:0,left:0,top:0,right:0};!function(){function e(e,t){var n=this;this.paused=!1,this.queuedEntries=[],this.recordStore={},this.callback=e;var i=t||{threshold:[]},r=i.root,o=i.rootMargin,s=i.threshold,a=i.ALLOW_CACHED_SCHEDULER,c=i.BACKGROUND_TAB_FIX,l=i.USE_NATIVE_IO,u="string"!=typeof(o=o||"0px")?function(e){return e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px"}(o):o;this.thresholds=s.sort((function(e){return e.ratio}));var d={root:r,rootMargin:u,threshold:this.thresholds.map((function(e){return e.ratio})),ALLOW_CACHED_SCHEDULER:a};this.usingNativeIo=!!l&&!!wS.IntersectionObserver;var h=this.usingNativeIo?wS.IntersectionObserver:zS;this.observer=new h((function(e){return n.internalCallback(e)}),d),this.onTabHidden=this._onTabHidden.bind(this),this.onWindowClosed=this._onWindowClosed.bind(this),this.onTabShown=this._onTabShown.bind(this),wS.hasDOM&&(qS("beforeunload",this.onWindowClosed),qS("hide",this.onTabHidden),qS("show",this.onTabShown),c&&(this.paused="visible"!==wS.document.visibilityState))}e.prototype._onWindowClosed=function(){this.onTabHidden()},e.prototype.setAllHidden=function(){for(var e=Object.keys(this.recordStore),t=0;t<e.length;t++)this.handleRecordExiting(this.recordStore[e[t]]);this.flushQueuedEntries()},e.prototype._onTabHidden=function(){this.paused=!0,this.setAllHidden()},e.prototype.generateObserverTimestamp=function(){return this.usingNativeIo?Math.floor(performance.now()):Date.now()},e.prototype._onTabShown=function(){this.paused=!1;for(var e=Object.keys(this.recordStore),t=performance.now(),n=this.generateObserverTimestamp(),i=0;i<e.length;i++){var r=this.recordStore[e[i]].lastSeenEntry;if(r){var o=r.intersectionRatio,s=r.boundingClientRect,a=r.rootBounds,c=r.intersectionRect,l=r.isIntersecting,u=r.target;this.handleObserverEntry({intersectionRatio:o,boundingClientRect:s,time:n,highResTime:t,isIntersecting:l,rootBounds:a,intersectionRect:c,target:u})}}},e.prototype.internalCallback=function(e){e.forEach(this.handleObserverEntry.bind(this))},e.prototype.flushQueuedEntries=function(){this.queuedEntries.length>0&&(this.callback(this.queuedEntries),this.queuedEntries=[])},e.prototype.generateSpanielEntry=function(e,t){var n=e.intersectionRatio,i=e.rootBounds,r=e.boundingClientRect,o=e.intersectionRect,s=e.isIntersecting,a=e.time,c=e.target,l=this.recordStore[c.__spanielId],u=this.usingNativeIo?Math.floor((wS.performance.timeOrigin||wS.performance.timing.navigationStart)+a):a,d=this.usingNativeIo?a:e.highResTime;if(!d)throw new Error("Missing intersection entry timestamp");return{intersectionRatio:n,isIntersecting:s,unixTime:u,time:u,highResTime:d,rootBounds:i,boundingClientRect:r,intersectionRect:o,target:c,duration:0,visibleTime:s?u:-1,entering:!1,payload:l.payload,label:t.threshold.label,threshold:t.threshold}},e.prototype.handleRecordExiting=function(e){var t=this,n=Date.now(),i=performance.now();e.thresholdStates.forEach((function(r){var o=e.lastSeenEntry&&e.lastSeenEntry.boundingClientRect;t.handleThresholdExiting({intersectionRatio:-1,isIntersecting:!1,unixTime:n,time:n,highResTime:i,payload:e.payload,label:r.threshold.label,threshold:r.threshold,entering:!1,rootBounds:KS,boundingClientRect:o||KS,intersectionRect:KS,visibleTime:r.lastVisible.unixTime,duration:hS(i,r.lastVisible.highResTime),target:e.target},r),r.lastSatisfied=!1,r.visible=!1,r.lastEntry=null}))},e.prototype.handleThresholdExiting=function(e,t){var n=e.highResTime,i=!!t.threshold.time;t.lastSatisfied&&(!i||i&&t.visible)&&(e.duration=hS(n,t.lastVisible.highResTime),e.visibleTime=t.lastVisible.unixTime,e.entering=!1,t.visible=!1,this.queuedEntries.push(e)),clearTimeout(t.timeoutId)},e.prototype.handleObserverEntry=function(e){var t=this,n=e.target,i=this.recordStore[n.__spanielId];i&&(i.lastSeenEntry=e,this.paused||(i.thresholdStates.forEach((function(n){var i=!!n.threshold.time,r=t.generateSpanielEntry(e,n),o=e.intersectionRatio>=n.threshold.ratio,s="boolean"==typeof r.isIntersecting?r.isIntersecting:uS(e),a=o&&s;if(a!=n.lastSatisfied){if(a)if(r.entering=!0,n.lastVisible={highResTime:r.highResTime,unixTime:r.unixTime},i){var c=Number(setTimeout((function(){n.visible=!0,r.duration=hS(performance.now(),n.lastVisible.highResTime),r.visibleTime=n.lastVisible.unixTime,t.callback([r])}),n.threshold.time));n.timeoutId=c}else n.visible=!0,r.duration=Date.now()-n.lastVisible.unixTime,t.queuedEntries.push(r);else t.handleThresholdExiting(r,n);n.lastEntry=e,n.lastSatisfied=a}})),this.flushQueuedEntries()))},e.prototype.disconnect=function(){this.setAllHidden(),this.observer.disconnect(),this.recordStore={}},e.prototype.destroy=function(){this.disconnect(),wS.hasDOM&&(FS("beforeunload",this.onWindowClosed),FS("hide",this.onTabHidden),FS("show",this.onTabShown))},e.prototype.unobserve=function(e){var t=this,n=this.recordStore[e.__spanielId];n&&(delete this.recordStore[e.__spanielId],this.observer.unobserve(e),GS((function(){t.handleRecordExiting(n),t.flushQueuedEntries()})))},e.prototype.observe=function(e,t){var n=e,i=n.__spanielId=n.__spanielId||OS();return this.recordStore[i]={target:n,payload:t,lastSeenEntry:null,thresholdStates:this.thresholds.map((function(e){return{lastSatisfied:!1,lastEntry:null,threshold:e,visible:!1,lastVisible:{unixTime:0,highResTime:-1}}}))},this.observer.observe(n),i}}();wS.IntersectionObserver&&wS.IntersectionObserver;const VS="show-more-less";".".concat(VS,"__list"),".".concat(VS,"__more-button"),".".concat(VS,"__less-button"),"".concat(VS,"__list--hide-after"),"".concat(VS,"__button--hide");const YS="accordion-item__trigger";".".concat(YS);function QS(e){return t=>t.type&&t.type.toLowerCase()===e.toLowerCase()}QS("action"),QS("openpage"),QS("openlink");var JS;!function(e){e.ProductName="productName",e.UntrackedResponseCodes="untrackedResponseCodes",e.TrackedResponseCodes="trackedResponseCodes",e.ClientSensorGroupName="clientSensorGroupName"}(JS||(JS={}));new Set(Object.values(JS));class XS extends Error{constructor(e){super(e),Object.setPrototypeOf(this,XS.prototype)}}var ZS;!function(e){e.ProductName="productName",e.CustomTrackingId="customTrackingId",e.ClientSensorGroupName="clientSensorGroupName",e.AdditionalDegradedResponseCodes="additionalDegradedResponseCodes",e.NonDegradedResponseCodes="nonDegradedResponseCodes",e.DegradationKeyOverrides="degradationKeyOverrides"}(ZS||(ZS={})),new Set(Object.values(ZS));var $S={exports:{}};!function(e,t){!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 i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}function r(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 i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(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){r(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 a(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&&l(e,t)}function c(e){return c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},c(e)}function l(e,t){return l=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},l(e,t)}function u(){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=u()?Reflect.construct:function(e,t,n){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(e,i));return n&&l(r,n.prototype),r},d.apply(null,arguments)}function h(e){return-1!==Function.toString.call(e).indexOf("[native code]")}function p(e){var t="function"==typeof Map?new Map:void 0;return p=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}}),l(n,e)},p(e)}function f(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function m(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?f(e):t}function g(e){return function(){var t,n=c(e);if(u()){var i=c(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return m(this,t)}}function v(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,i){e=n,t=i}));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],i=0,r=n.length;i<r;i++)if(n[i]===t)return void n.splice(i,1)},e.prototype.dispatchEvent=function(e){if(!(e.type in this.listeners))return!0;for(var t=this.listeners[e.type].slice(),n=0,i=t.length;n<i;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"},_="https://accounts.google.com",S={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"},C={SIGN_IN:"signin",SIGN_UP:"signup",USE:"use"},k={DISPLAY:"display",SKIPPED:"skipped",DISMISSED:"dismissed"},I={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",L="https://www.linkedin.com/redirect",O="https://www.linkedin-ei.com/redirect",R={DISMISSED:"DISMISSED",INITIALIZED:"INITIALIZED",SNAPPLE_USER_FETCHED:"SNAPPLE_USER_FETCHED"},N={signin:{GOT:"signin",GSI_BUTTON:"signin_with"},signup:{GOT:"signup",GSI_BUTTON:"signup_with"},use:{GOT:"use",GSI_BUTTON:"continue_with"}},x=w.GOOGLE_ERROR,P=w.GOOGLE_USER_FETCHED,M=w.INITIALIZED,D=S.INITIALIZATION,U=S.AUTHENTICATION,B=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.libSrcPath,s=e.el,a=e.clientId,c=void 0===a?E:a;if(t(this,r),i=n.call(this),!s)throw TypeError("DOM element for Sign In button is required");if(i.libSrcPath=o,i.el=s,i.clientId=c,window.gapi)i._initializeGoogleAuth();else{if(!o)throw TypeError("Google Sign In lib not already loaded on the page. libSrcPath is required to load the lib.");v((function(){y(o,i._initializeGoogleAuth.bind(f(i)))}))}return i}return i(r,[{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(M);e.dispatchEvent(n)})).catch((function(t){var n={type:D,message:t.error},i=new CustomEvent(x,{detail:n});e.dispatchEvent(i)}))}},{key:"_attachSignIn",value:function(){var e=this;this.auth2.attachClickHandler(this.el,{},(function(t){var n=new CustomEvent(P,{detail:e._getGoogleUserInformation(t)});e.dispatchEvent(n)}),(function(t){var n={type:U,message:t.error},i=new CustomEvent(x,{detail:n});e.dispatchEvent(i)}))}},{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()}}}]),r}(p(EventTarget)),q=w.GOOGLE_USER_FETCHED,F=w.PROMPT_MOMENT,H=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.autoSelect,s=void 0!==o&&o,a=e.libSrcPath,c=e.containerId,l=e.context,u=e.clientId,d=void 0===u?E:u,h=e.cancelOnTapOutside,p=void 0===h||h;if(t(this,r),i=n.call(this),!l)throw TypeError("context param is required to determine the message to show in Google One Tap");if(i.autoSelect=s,i.libSrcPath=a,i.containerId=c,i.cancelOnTapOutside=p,i.clientId=d,i.context=l,window.google&&window.google.accounts&&window.google.accounts.id)i._onGoogleApiLoad();else{if(!a)throw TypeError("Google One Tap lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(a,i._onGoogleApiLoad.bind(f(i)))}))}return i}return i(r,[{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===C.SIGN_UP?this._getBasicProfile(t):{idToken:t};if(n){n.selectedBy=e.select_by;var i=new CustomEvent(q,{detail:n});this.dispatchEvent(i)}}},{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:I.SKIPPED.ISSUING_FAILED,type:k.SKIPPED},n=new CustomEvent(F,{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()},i=new CustomEvent(F,{detail:n});e.dispatchEvent(i),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")}}}]),r}(p(EventTarget)),G={exports:{}},j="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";function z(e){this.message=e}function W(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new z("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(n=r%4?64*n+i:i,r++%4)?s+=String.fromCharCode(255&n>>(-2*r&6)):0)i=j.indexOf(i);return s}z.prototype=new Error,z.prototype.name="InvalidCharacterError";var K="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||W;function V(e){return decodeURIComponent(K(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}var Y=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 V(t)}catch(e){return K(t)}};function Q(e){this.message=e}Q.prototype=new Error,Q.prototype.name="InvalidTokenError",G.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(Y(e.split(".")[n]))}catch(e){throw new Q("Invalid token specified: "+e.message)}},G.exports.InvalidTokenError=Q;var J=G.exports,X=w.GOOGLE_USER_FETCHED,Z=w.PROMPT_MOMENT,$=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.autoSelect,s=void 0!==o&&o,a=e.libSrcPath,c=e.clientId,l=void 0===c?E:c,u=e.showOneTap,d=void 0===u||u,h=e.promptParentId,p=e.buttonParentEl,m=e.gsiButtonConfig,g=void 0===m?{}:m,w=e.context,_=void 0===w?"signin":w,S=e.cancelOnTapOutside,T=void 0===S||S;if(t(this,r),(i=n.call(this)).autoSelect=s,i.libSrcPath=a,i.clientId=l,i.showOneTap=d,i.promptParentId=h,i.buttonParentEl=p,i.gsiButtonConfig=g,i.cancelOnTapOutside=T,i.context=_,i.isLibraryLoaded=b(),window.google&&window.google.accounts&&window.google.accounts.id)i._onGoogleApiLoad();else{if(!a)throw TypeError("GSI lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(a,i._onGoogleApiLoad.bind(f(i)))}))}return i}return i(r,[{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:N[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,i=t.logo_alignment,r=void 0===i?"center":i,o=t.shape,s=void 0===o?"pill":o,a=t.size,c=void 0===a?"large":a,l=t.text,u=t.theme,d=t.type,h=t.width,p=void 0===h?"400px":h;return this.isLibraryLoaded.then((function(){var t=l||N[n.context].GSI_BUTTON;window.google.accounts.id.renderButton(e,{logo_alignment:r,shape:s,size:c,text:t,theme:u,type:d,width:p})}))}},{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()},i=new CustomEvent(Z,{detail:n});e.dispatchEvent(i),e.checkIfDesktopAndApplyClass()}))}))}},{key:"_handleCredentialResponse",value:function(e){var t=e.credential,n=e.select_by,i=J(t),r=s({},this._getBasicProfile(i),{idToken:t,selectedBy:n});if(r){var o=new CustomEvent(X,{detail:r});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")}}}]),r}(p(EventTarget)),ee=R.DISMISSED,te=R.INITIALIZED,ne=R.SNAPPLE_USER_FETCHED,ie=function(e){a(r,e);var n=g(r);function r(e){var i,o=e.libSrcPath,s=e.snappleCTA,a=e.clientId,c=void 0===a?A:a,l=e.redirectURI;if(t(this,r),i=n.call(this),!s)throw TypeError("snappleCTA is required. Please pass the correct CTA element to this Snapple Constructor");if(i.libSrcPath=o,i.clientId=c,i.redirectURI=i._getRedirectURL(l),i.snappleCTA=s,window.AppleID&&window.AppleID.auth&&window.AppleID.auth.init)i._onSnappleLibLoad();else{if(!o)throw TypeError("Snapple lib is not already loaded on the page. libSrcPath is required to load the library");v((function(){y(o,i._onSnappleLibLoad.bind(f(i)))}))}return i}return i(r,[{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?L:O}}]),r}(p(EventTarget)),re={CLIENT_ID:E,EVENTS:w,GOOGLE_ACCOUNT_URL:_,GSI_ERROR_TYPES:S,GSI_ERROR_MESSAGES:T,GOT_CONTEXTS:C,GOT_PROMPT_MOMENT_REASONS:I,GOT_PROMPT_MOMENT_TYPES:k};e.GoogleGsi=$,e.GoogleOneTap=H,e.GoogleSignIn=B,e.GoogleSignInConstants=re,e.SnappleAuth=ie,e.SnappleEvents=R,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,$S.exports);const{EVENTS:eT,GOT_CONTEXTS:tT,GOT_PROMPT_MOMENT_REASONS:nT,GOT_PROMPT_MOMENT_TYPES:iT}=$S.exports.GoogleSignInConstants,{GOOGLE_USER_FETCHED:rT,PROMPT_MOMENT:oT}=eT,{SIGN_IN:sT}=tT;nT.NOT_DISPLAYED.BROWSER_NOT_SUPPORTED,nT.NOT_DISPLAYED.OPT_OUT_OR_NO_SESSION,nT.NOT_DISPLAYED.SUPPRESSED_BY_USER,nT.SKIPPED.AUTO_CANCEL,nT.SKIPPED.TAP_OUTSIDE,nT.SKIPPED.USER_CANCEL;const aT="filter-values-container__filter-value";".".concat(aT," input"),".".concat(aT," input[type=radio]:checked");class cT{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},{enablePageViewTracking:i=!1,shouldHideModal:r=(()=>!1),triggerByOutletEl:o=!0,focusElement:s,pageKey:a}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};if(!e)throw new Error("No element passed into to dialog modal");this.el=e,this.modalEl=this.el.querySelector(".".concat(AE)),this.modal=new q_(this.modalEl,{enablePageViewTracking:i,shouldHideModal:r,triggerByOutletEl:o,focusElement:s,pageKey:a}),this._onPrimaryActionClick=t,this.primaryActionBtn=this.el.querySelector(".primary-action"),this.secondaryActionBtn=this.el.querySelector(".secondary-action"),n&&(this._onSecondaryActionClick=n),this.el.querySelector(".dialog-actions").addEventListener("click",this._actionHandler.bind(this))}_actionHandler(e){const t=e.target;if(this.primaryActionBtn&&this.primaryActionBtn.contains(t)){if(this.primaryActionBtn.disabled)return;this._onPrimaryActionClick&&this._onPrimaryActionClick(e)}else this.secondaryActionBtn&&this.secondaryActionBtn.contains(t)&&this._onSecondaryActionClick&&this._onSecondaryActionClick(e);this.modal.close()}}const lT="badgesreceived";class uT{constructor(){let{badgeSel:e="[data-badge-without-count-source]",badgeCountSel:t="[data-badge-source]",cacheBustHrefSel:n='[data-update-cache-bust-url="true"]'}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._counts={},this.badgeCountEls=document.querySelectorAll(t),this.badgeWithoutCountEls=document.querySelectorAll(e),this.cacheBustHrefEls=document.querySelectorAll(n),this.feedLastUpdatedTimeInDom=N_("feedLastUpdatedTime")}resetBadges(){VE(this.badgeCountEls),VE(this.badgeWithoutCountEls)}getBadges(){const e=this.feedLastUpdatedTimeInDom||"";return og(e?Lm(U_,"feedQueryAfterTime",e):U_).then((t=>{const n=JSON.parse(t.responseText);Nm(window,lT,{feedsCount:n.feedsCount}),this._counts=n;const i=$E();return"messaging"===i&&(this._counts.messagingCount=0),"feed"===i||e||(this._counts.feedsCount=2),this._counts.feedsCount=this._counts.feedsCount>=2?1:0,this._counts.lastUpdatedAt=(new Date).getTime(),this._updateCacheBustUrl(this._counts.feedsCount>0),this._renderBadges(),this})).catch((()=>{Nm(window,lT,{feedsCount:0})}))}_renderBadges(){this.badgeCountEls.forEach((e=>{this._setBadgeCount(e,this._counts[e.dataset.badgeSource])})),this.badgeWithoutCountEls.forEach((e=>{this._setBadge(e,this._counts[e.dataset.badgeWithoutCountSource])}))}_setBadgeCount(e,t){if(!e)return;const n=e.innerHTML;null==n&&t>0?(e.textContent=t,KE(e)):t!==n&&(t>0?(e.textContent=t,KE(e),e.classList.toggle("singular",t<=1)):WE(e))}_setBadge(e,t){e&&(t>0?(KE(e),e.classList.add("badge-with-no-count")):WE(e))}_updateCacheBustUrl(e){N_("isSWCacheEnabled")&&this.cacheBustHrefEls&&this.cacheBustHrefEls.forEach((t=>{t.href=Xw(e?Lm(t.href,"pwa","noCache"):Mm(t.href))}))}}!function(){let e}();const dT="_lastUpdatedAt";class hT{constructor(e){this.storage=void 0===e?localStorage:e}read(e){const t=this.storage.getItem(e);if(t)try{return JSON.parse(t)}catch(e){console.error(e)}return null}write(e,t){try{this.storage.setItem(e,JSON.stringify(t))}catch(e){console.error(e)}}remove(e){try{this.storage.removeItem(e)}catch(e){console.error(e)}}readWithExpiry(e,t){const n=this.read(e+dT);return n&&(new Date).getTime()-n<t?this.read(e):(this.removeWithExpiry(e),null)}writeWithExpiry(e,t){this.write(e,t),this.write(e+dT,(new Date).getTime())}removeWithExpiry(e){this.remove(e),this.remove(e+dT)}}hT.instance||(hT.instance=new hT(localStorage)),hT.instance,hT.sessionInstance||(hT.sessionInstance=new hT(sessionStorage)),hT.sessionInstance;let pT;const fT="_self";function mT(){return pT||(pT=new O_),pT}let gT;wm.getInstance().addUnloadCallback((()=>{gT&&gT.close(),WE(document.querySelector("#discard-post-modal")),WE(document.querySelector("#visibility-settings-modal")),WE(document.querySelector("#max-images-prompt-modal")),WE(document.querySelector("#retry-upload-modal"))}));function vT(){var e,t;null===(e=window.lazyloader)||void 0===e||null===(t=e.then)||void 0===t||t.call(e,(e=>{e.refreshLoader()}))}const yT="selected";function bT(e){const t=e.target.value;e.target.classList.toggle(yT,t),e.target.focus()}function ET(e){if(e){const{id:t,labelText:n}=e.dataset;if(!t||!n)throw new Error("mandatory fields missing.");const i=e.querySelector("select");i&&(i.addEventListener("change",bT),i.value&&i.classList.add(yT))}else{document.querySelectorAll(".dropdown-container").forEach(ET)}vT()}const wT="input",_T="change",ST="focus",TT="input:cleared",CT="selected";function kT(e){const t=e.currentTarget.parentElement.querySelector(wT);t.value="",t.classList.remove(CT),t.focus(),Nm(t,TT),Nm(t,_T)}function IT(e){const t=e.currentTarget.parentElement,n=t.dataset.placeholder,i=t.querySelector(wT);n&&i.setAttribute("placeholder",n),i.removeEventListener(ST,IT)}function AT(e){const t=e.target.value;e.target.classList.toggle(CT,t)}function LT(e){if(e){const{id:t,labelText:n}=e.dataset;if(!t||!n)throw new Error("mandatory fields missing.");const i=e.querySelector(wT),r=e.querySelector(".right");i.addEventListener(_T,AT),i.addEventListener(ST,IT),r&&r.addEventListener("click",kT)}else{document.querySelectorAll(".input-container").forEach(LT)}vT()}const OT="MinLength",RT="MaxLength",NT="Regex",xT="Required",PT="RegexAllow",MT={SPECIAL_CHARS:{pattern:/([!@#$%^&*+=|<>?:;\\])/,errorCode:"SpecialChars"},URL_KEYWORDS:{pattern:/(https?(:\/\/)?|www\.)/i,errorCode:"UrlKeywords"},EMAIL:{pattern:new RegExp('^(([^<>()\\[\\]\\\\.,;:\\s@"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@"]+)*)|(".+"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$'),errorCode:"Email"},PHONE_NUMBER:{pattern:/(?:^((\+(?=[0-9]{1,4}))?))[0-9]{5,14}$/,errorCode:"PhoneNumber"}},DT="EMAIL_ADDRESS",UT="PHONE_NUMBER",BT="OTHER",qT="consentUnchecked",FT={INPUT:"INPUT",SELECT:"SELECT"},HT="text",GT="checkbox";function jT(e){return Object.keys(FT).includes(e.tagName)}function zT(e){const t=function(e){const t=[],{minLength:n,maxLength:i,inputType:r}=e.dataset;let o;switch(r){case BT:n&&t.push({type:OT,MinLength:n}),i&&t.push({type:RT,MaxLength:i});break;case DT:t.push({type:PT,RegexAllow:[MT.EMAIL]});break;case UT:o=e.value.replace(/ /g,""),t.push({type:PT,RegexAllow:[MT.PHONE_NUMBER]})}return{value:o||e.value,ruleSet:t}}(e),n=t.value;return t.ruleSet.map((e=>((e,t)=>{const n=t.trim();if(e)switch(e.type){case xT:if(0===n.length)return xT;break;case OT:if(n.length<e[OT])return OT;break;case RT:if(n.length>e[RT])return RT;break;case NT:for(let t=0;t<e[NT].length;t++)if(e[NT][t].pattern.test(n))return NT+e[NT][t].errorCode;break;case PT:for(let t=0;t<e[PT].length;t++)if(!e[PT][t].pattern.test(n))return PT+e[PT][t].errorCode}})(e,n))).filter((e=>!!e))}function WT(e,t){return t&&!e?qT:null}const KT=(e,t)=>parseInt(t.split(e)[1]);function VT(e,t){return document.querySelector("#".concat(e.id,"-strings")).dataset["str".concat(t)]}const YT=(e,t)=>({questionId:e,textQuestionAnswer:{answer:t}}),QT=(e,t)=>({questionId:e,multipleChoiceAnswer:{options:[{index:t}]}});function JT(e){const t=e.id+"_",n=t+"q",i=t+"c";return new Promise(((t,r)=>{const o=[];let s,a;const{urn:c}=e.dataset;a=e.dataset.leadTrackingParams,a||(s=e.closest("[data-lead-tracking-params]"),a=s.dataset.leadTrackingParams);const l={formResponse:{adFormUrn:c,submittedAt:Date.now(),answers:[],consentResponses:[]},trackingUrl:a,trackingAction:"LEAD_FORM_CLICK"};return Array.from(e).filter(jT).forEach((e=>{let t;if(e.tagName===FT.SELECT)t=((e,t)=>{const n=KT(e,t.id),i=t.selectedIndex;return{response:QT(n,i)}})(n,e),l.formResponse.answers.push(t.response);else if(e.type===HT)if(t=((e,t)=>{const n=KT(e,t.id),i=zT(t);return 0!==i.length?{errors:i}:{response:YT(n,t.value)}})(n,e),t.response)l.formResponse.answers.push(t.response);else{const n=t.errors[0];o.push({element:e,errorType:n})}else e.type===GT&&(t=((e,t,n,i)=>{const r=KT(e,t),o=WT(n,i);return o?{errors:o}:{response:{consentId:r,accepted:n}}})(i,e.id,e.checked,e.required),t.response?l.formResponse.consentResponses.push(t.response):o.push({element:e,errorType:t.errors}))})),0===o.length?t(l):r(o)}))}const XT=".lead-gen-input-container",ZT=".error-text",$T="input-error",eC="aria-invalid",tC="role",nC="click";class iC{constructor(e){let{isLivePreview:t=!1,triggerByOutletEl:n=!0}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)throw new Error("containerEl is not present");LT(),ET(),ew("form-modal-description__content-truncated",".form-modal-description__btn-truncation",e),this.containerEl=e,this.formEl=e.querySelector("form");const i=e.querySelector(".lead-gen-modal");this.modal=new q_(i,{triggerByOutletEl:n,shouldMoveToTopContainer:!1}),t?this.showForm():this._bindEvents()}showForm(){this.modal.open()}hideForm(){this.modal.close()}_clearFormErrors(){Array.from(this.formEl).filter(jT).map((e=>this._hideError(e)))}_submitForm(){this._clearFormErrors(),JT(this.formEl).then((e=>{Nm(this.containerEl,this.constructor.LEAD_GEN_SUBMIT_EVENT,e),this.hideForm()})).catch((e=>{e.forEach((e=>this._setAndShowError(e.element,e.errorType)));const t=e[0];if(t){t.element.focus();eg(VT(t.element,t.errorType),$m.ASSERTIVE)}}))}_hideError(e){if(e){const t=e.closest(XT),n=t.querySelector(ZT);WE(n),t.classList.remove($T),e.removeAttribute(eC),n.removeAttribute(tC)}}_setAndShowError(e,t){if(e){const n=VT(e,t),i=e.closest(XT),r=i.querySelector(ZT);r.innerText=n,KE(r),i.classList.add($T),r.setAttribute(tC,"alert"),e.setAttribute(eC,"true")}}_handleInputError(e){let t;if(this._hideError(e),e.type===GT)t=WT(e.checked,e.required);else if(e.type===HT){const n=zT(e);n&&n.length&&(t=n[0])}t&&this._setAndShowError(e,t)}_bindEvents(){this.formEl.addEventListener(nC,(e=>{e.target.classList.contains("checkbox-input")&&this._handleInputError(e.target)})),this.formEl.addEventListener(TT,(e=>{this._handleInputError(e.target)})),this.formEl.addEventListener("keyup",(e=>{e.target.classList.contains("inputbox-input")&&this._handleInputError(e.target)})),this.formEl.querySelector(".submit-btn").addEventListener(nC,(e=>{e.preventDefault(),e.stopPropagation(),this._submitForm()}))}}pg(iC,"LEAD_GEN_SUBMIT_EVENT","FormModal:LeadGen:submit");const rC=["endpoint","headers","queryId","variables","pageKey"];function oC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{endpoint:t,headers:n={"Content-Type":"application/json"},queryId:i,variables:r={},pageKey:o}=e,s=fg(e,rC);return og(t,hg({method:"POST",headers:n,postData:JSON.stringify({queryId:i,variables:r,pageKey:o})},s))}class sC{constructor(e){if(!e)throw Error("Missing FollowMutation endpoint");this.endpoint=e}execute(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{},i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{};return oC({endpoint:this.endpoint,queryId:sC.query,variables:{followState:e,to:t}}).then((e=>{const{responseText:t}=e;n(JSON.parse(t).graphQL)})).catch(i)}}pg(sC,"query","cbed571fffd8cea15209aed8d44e6759");const aC=Object.freeze({APPRECIATION:"APPRECIATION",ASSENT:"ASSENT",CELEBRATION:"CELEBRATION",EMPATHY:"EMPATHY",ENTERTAINMENT:"ENTERTAINMENT",INSPIRATION:"INSPIRATION",INTEREST:"INTEREST",LIKE:"LIKE",MAYBE:"MAYBE",PRAISE:"PRAISE",UNKNOWN:"UNKNOWN",USEFULNESS:"USEFULNESS"});Object.values(aC);const cC="CREATE",lC="UPDATE";class uC{constructor(e){if(!e)throw Error("Missing ReactionMutation endpoint");this.endpoint=e}execute(e,t,n){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{},r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:()=>{};const o={endpoint:this.endpoint,queryId:uC.query,variables:{entityUrn:t,action:n}};return n!==cC&&n!==lC||(o.variables.reactionType=e),oC(o).then((e=>{const{responseText:t}=e;i(JSON.parse(t).graphQL)})).catch(r)}}pg(uC,"query","070ee23fd6fb77f92ac08f964ae1df29");class dC extends HTMLElement{connectedCallback(){this.update(),this.syncA11yCaption(),this.setAttribute("aria-hidden","true"),ssr_ui_lib_es_handleLargeIcon(this)}disconnectedCallback(){this.removeA11yCaption()}static get observedAttributes(){return["a11y-text","type","class"]}attributeChangedCallback(e){ssr_ui_lib_es_ATTRS_TRIGGERING_UPDATE.indexOf(e)>-1&&this.update(),"a11y-text"===e&&this.syncA11yCaption(),"type"!==e&&"class"!==e||ssr_ui_lib_es_handleLargeIcon(this)}update(){const e=this.getAttribute("type"),t=this.getAttribute("category")||"ui",n="true"===this.dataset.inlineSvg;(e||t)&&(n||ssr_ui_lib_es_setIcon(this,t,e))}installA11yCaption(){const{parentNode:e,a11yCaption:t}=this;e&&t&&!t.parentNode&&e.insertBefore(t,this)}removeA11yCaption(){const{a11yCaption:e}=this;e&&e.parentNode&&e.parentNode.removeChild(e),this.a11yCaption=null}syncA11yCaption(){const{a11yCaption:e}=this,t=this.getAttribute("a11y-text");t?e?e.textContent=t:(this.a11yCaption=(e=>{const t=document.createElement("span");return t.setAttribute("class","a11y-text"),t.textContent=e,t})(t),this.installA11yCaption()):this.removeA11yCaption()}}const hC="light";hC.toUpperCase();const pC="#share-modal .modal-content .reshare-section",fC="data-post-visibility",mC='input[name="share-with"]:checked',gC="share-modal",vC="#share-modal",yC="close",bC="click",EC="data-control-action",wC="keydown",_C=document.querySelector("#share-modal .textarea"),SC=document.querySelector(".image-preview-wrapper"),TC=document.querySelector(pC),CC=document.querySelector(".post-button"),kC=document.querySelector("#comments-enabled"),IC=document.querySelector("#share-with-public"),AC=document.querySelector(".post-settings-wrapper"),LC=document.querySelector(mC),OC=document.querySelector("#share-modal .close-button"),RC=document.querySelector("#visibility-settings-modal"),NC=document.querySelector("#visibility-header-back .close-button"),xC=document.querySelector("#visibility-settings-modal .settings-list-wrapper"),PC=document.querySelector("#discard-post-modal-wrapper"),MC=document.querySelector(vC),DC=document.querySelector(".modal-spinner"),UC=document.querySelector("#share-modal .textarea"),BC=document.querySelector("#share-with-group"),qC=document.querySelector("#share-with-network");class FC extends q_{updatePostButtonStatus(){var e;const t=null===(e=_C.innerText)||void 0===e?void 0:e.trim().length,n="loaded"===SC.getAttribute("data-image-load-state"),i=TC.children.length;t||n||i?JE(CC):QE(CC)}clearModalContentBase(){TC&&(TC.textContent=""),_C&&(_C.textContent=""),kC&&(kC.checked=!0),IC&&(IC.checked=!0,AC.setAttribute(fC,LC.value))}historyBackClickHandler(){window.history.state!==gC&&"typeahead"!==window.history.state&&(window.history.pushState(gC,"show-share-modal",vC),OC.click())}bindVisibilityModalEvents(){function e(e){const t=e.target,n=t.closest("[".concat(EC,"]"))||t.querySelector("[".concat(EC,"]"));n&&window.tracking.then((e=>{e.fireControlInteractionEvent(n.getAttribute(EC))}))}RC.addEventListener(yC,(()=>{AC.setAttribute(fC,document.querySelector(mC).value)})),NC.addEventListener(bC,(()=>window.history.back())),xC.addEventListener(bC,(t=>e(t))),xC.addEventListener(wC,(t=>{if(13===t.keyCode){const n=t.target.querySelector("input[type=radio]");n&&(n.checked=!0,e(t))}}))}discardPostConfirmationModalPrimaryActionCallback(e){let{enableHistoryBack:t}=e;this.close({enableHistoryBack:t}),XE()&&"discard-post-modal"===window.history.state&&setTimeout((()=>{window.history.back()}),100)}postSettingsClickHandler(){window.tracking.then((e=>{e.fireControlInteractionEvent("post-settings")})),this.visibilitySettingsModal.open()}}class HC extends FC{constructor(e,t){let{endpoint:n="",enablePageViewTracking:i=!1,shouldHideModal:r=(()=>!1),triggerByOutletEl:o=!1,pushState:s=!1,historyUpdateUrl:a}=t;super(e,{enablePageViewTracking:i,shouldHideModal:r,triggerByOutletEl:o,pushState:s}),this.el=e,this.postData={},this.endpoint=n,this.historyUpdateUrl=a,this.postUrn=N_("ugcPostUrn"),this.openShareModalByLink=this._checkIfOpenShareModalByLink(),this.bindPublishingShareEvents(),this.visibilitySettingsModal=new q_(RC,{triggerByOutletEl:!1}),this.handleOpenByUrl()}bindPublishingShareEvents(){this.shareTextEvents(),this.bindShareModalEvents(),this.bindVisibilityModalEvents()}_checkIfOpenShareModalByLink(){const e=new URL(location.href);return!0===Boolean(e.searchParams.get("openShareModal"))}handleOpenByUrl(){this.openShareModalByLink&&this.open()}shareTextEvents(){const e=Om(this.updatePostButtonStatus,300);UC.addEventListener("input",e)}bindShareModalEvents(){const e=new cT(PC,this.discardPostConfirmationModalPrimaryActionCallback.bind(this,{enableHistoryBack:!this.openShareModalByLink}),(()=>{}),{enablePageViewTracking:!0,pageKey:"article_discard_confirmation",triggerByOutletEl:!1});MC.addEventListener("open",(()=>{_C.focus()})),MC.addEventListener(yC,(()=>{this.clearModalContentBase(),WE(DC)})),CC.addEventListener(bC,(()=>{this.processPostData()})),OC.addEventListener(bC,(()=>{CC.disabled?this.close():e.modal.open()})),AC.addEventListener(bC,this.postSettingsClickHandler.bind(this)),AC.addEventListener(wC,(e=>{13===e.keyCode&&this.postSettingsClickHandler.apply(this)}))}open(){var e;let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{defaultText:n}=t;this.historyUpdateUrl&&window.history.replaceState({},document.title,this.historyUpdateUrl),super.open(),this._checkIfOpenShareModalByLink()&&this._removeShareParams(),this.renderShareArticleShareSection(),ZE()&&window.scrollTo(0,0),n&&(UC.textContent=n),this.shareData={},this.historyUpdateUrl&&window.history.replaceState({},document.title,this.historyUpdateUrl),this.isNewPost=!1,this.postUrn&&(this.shareData.reshareUrn=this.postUrn,this.shareData.attributedShareUrn=this.postUrn),null===(e=window.lazyloader)||void 0===e||e.then((e=>{e.refreshLoader()})),this.updatePostButtonStatus()}renderShareArticleShareSection(){const e=this.el.querySelector(pC);e.children.length?this.shareArticleNodeChild=e.children[0].cloneNode(!0):e.appendChild(this.shareArticleNodeChild)}composePostData(){this.shareData.text=UC.textContent,this.shareData.visibility="PUBLIC",BC&&(this.shareData.visibility="CONTAINER",this.shareData.containerEntity=BC.value),qC.checked&&(this.shareData.visibility="CONNECTIONS")}processPostData(){KE(DC),this.composePostData(),oC({endpoint:this.endpoint,queryId:HC.query,variables:this.shareData}).then((e=>{var t,n;200!==e.status&&Promise.reject();const i=(null===(t=JSON.parse(null==e?void 0:e.responseText).graphQL)||void 0===t||null===(n=t.createPost)||void 0===n?void 0:n.activityUrn)||Promise.reject();window.tracking.then((e=>{TE(e,"ajax","post_success_page_key")})),mT().trigger("success",N_("postSuccessMessage"),"post-success-toast-dismiss",{url:"/feed/update/"+i,trk:"share-post-success",text:N_("postSuccessViewPost"),target:fT}),this.close()})).catch((()=>{window.tracking.then((e=>{TE(e,"ajax","post_failure_page_key")})),mT().trigger("error",N_("postFailureMessage"),"post-error-toast-dismiss"),this.close()}))}close(){super.close({enableHistoryBack:!this.openShareModalByLink})}_removeShareParams(){var e;const t=new URL(window.location.href);null===(e=t.searchParams)||void 0===e||e.delete("openShareModal"),window.history.pushState({},document.title,t.toString())}}pg(HC,"query","971e319c05beaf333e94125db8c4f942");function GC(e,t,n,i){var r="";if(n){var o=new Date;o.setTime(o.getTime()+n),r="expires=".concat(o.toUTCString())}Dm.getCookie(e)&&function(e){e&&(document.cookie="".concat(e,"=; expires=Thu, 01-Jan-1970 00:00:01 GMT;"))}(e);var s="".concat(e,"=").concat(t,";").concat(r,";path=/;").concat(i?"domain=.".concat(i):""),a="".concat(s,";").concat("secure;samesite=none");document.cookie=a,Dm.getCookie(e)||(document.cookie=s)}var jC,zC="dark",WC="light",KC="system",VC="li_theme",YC=[WC,zC,KC],QC=WC.toUpperCase();function JC(e){document.documentElement.classList.toggle("dark",e),QC=(e?zC:WC).toUpperCase()}function XC(){if(window.matchMedia){JC(window.matchMedia("(prefers-color-scheme:dark)").matches);try{window.matchMedia("(prefers-color-scheme:dark)").addEventListener("change",(e=>JC(e.matches)))}catch(e){window.matchMedia("(prefers-color-scheme:dark)").addListener((e=>JC(e.matches)))}}}function ZC(e){localStorage.setItem("mobileWebTheme",e)}function $C(){var e=La("darkModeLixValue");if(e&&"control"!==e){var t=H.getQueryParam(window.location.href,VC);if(t)return JC(zC===t),void ZC(zC===t?zC:WC);var n="on"===e?KC:WC,i=(QC=H.getCookie(VC))&&YC.includes(QC)?QC:n;i===KC?XC():JC(i===zC),ZC(i),function(e,t){var n="li_theme_set",i="user",r=["app",i],o="app",s=H.getCookie(n);s&&r.includes(s)?o=s:("on"===e&&t!==KC||"enabled-light"===e&&t!==WC)&&(o=i),GC(n,o,15552e6)}(e,i)}}const ek=(tk=document.getElementById("toasts"),!jC&&tk&&(jC=new Ia),jC);var tk;function nk(){var e=new URLSearchParams(window.location.search);return{trackingCode:e.get("trk"),trackingId:e.get("trackingId"),updateUrn:e.get("updateUrn")}}function ik(e,t){return e&&t?"urn:li:control:".concat(t,"-").concat(e):null}function rk(e){var t,n,i=e.target.closest("[data-feed-control]"),r=e.target.closest(".article-segment"),o=e.target.closest(".contribution"),s=null!==(t=null==o?void 0:o.dataset)&&void 0!==t?t:{},a=s.contributionUrn,c=s.contributionTrackingId,l=La("trackingModuleKey"),u=i.dataset,d=u.feedControl,h=u.feedActionCategory,p=u.feedActionType,f=(null!==(n=null==r?void 0:r.dataset)&&void 0!==n?n:{}).threadUrn,m=nk(),g=m.trackingId,v=m.updateUrn;if(i&&f&&a){var y=jm.getPageKey(document);window.tracking.then((e=>{e.fireTrackingEvent("FeedCommentActionEvent",{actionCategory:(null==h?void 0:h.toUpperCase())||"",actionType:p,controlUrn:ik(d,y),threadUrn:f,trackableUpdateObject:{trackingId:g||c||e.generateBase64UUID(),objectUrn:v||a},trackableCommentObject:{trackingId:c,objectUrn:a},moduleKey:l})}))}}var ok,sk,ak,ck="Comment:newComment:success",lk="Comment:deleteComment:success",uk="Reaction:newReaction:success",dk="Reaction:deleteReaction:success",hk="/advice/api/runQuery";function pk(){var e,t=La("articleViewEventData");t&&(e=JSON.parse(t),window.tracking.then((t=>{var n,i;if(e&&e.linkedInArticleUrn&&e.articleUrn){var r=(null==t||null===(n=t.getCurrentContext())||void 0===n?void 0:n.pageInstance)||(null==t||null===(i=t.config)||void 0===i?void 0:i.initialPageInstance);if(r){var o={articleId:e.articleId,authorId:e.authorId,linkedInArticleUrn:e.linkedInArticleUrn,articleUrn:e.articleUrn,trackablePulseObject:{trackingId:r.trackingId,objectUrn:e.articleUrn},header:{pageInstance:r,time:Date.now()}};t.fireTrackingEvent("ArticleViewEvent",o)}else console.warn("Missing pageInstance - not firing ArticleViewEvent for ".concat(e.articleUrn))}else console.warn("Missing article view data, not firing ArticleViewEvent")})).catch((()=>{})))}function fk(){La("isMemberDesktop")&&function(){var e=H.getCookie(VC);e===KC?XC():JC(e===zC)}()}function mk(){var e;window.addEventListener("beforeunload",(e=Date.now(),function(){var t,n;t=Date.now()-e,n=La("articleUrn"),window.tracking.then((e=>{var i=e.getCurrentContext().pageInstance.trackingId;e.fireTrackingEvent("ArticleReadEvent",{dwellTime:t,articleUrn:n,articleTrackingId:i})}))}))}function gk(){var e,t,n,i,r;mk(),e=document.querySelector(".social-share"),t=new cm(e),document.addEventListener(am,(e=>{var n=La("disableLinkedinShareRedirectLink");Oa("disableLinkedinShareRedirectLink",!1),Oa("signin",!1),t.setLinkedInServiceUrl(e.detail),t.share("linkedin"),t.setLinkedInServiceUrl(null),Oa("disableLinkedinShareRedirectLink",n)})),new Bu,new zh,document.querySelectorAll(".ellipsis-menu").forEach((e=>{new qu(e)})),function(){var e=document.querySelector(".google-auth");if(e)return new ed(e);var t=document.querySelector(".google-one-tap");t&&new gf(t,{isAutoSelectEnabled:null===H.getCookie("li_g_recent_logout")})}(),pk(),document.body.querySelectorAll("img[data-li-src], iframe[data-li-src]").forEach((e=>{var t=e.getAttribute("data-li-src").replace(/^http:\/\//i,"//");e.classList.add("lazy-load"),e.setAttribute("data-delayed-url",t),e.removeAttribute("data-li-src")})),null===(n=window.lazyloader)||void 0===n||n.then((e=>e.refreshLoader())),fk(),i=document.querySelector(".more-articles"),r=document.querySelector(".slide-list"),i?new Wh(i):r&&new Ko(r),function(){if(La("disableLinkedinShareRedirectLink")){var e=document.querySelector("#share-modal"),t=document.querySelector('button[data-share-service="linkedin"]');if(e&&t){var n=new kp(e,{endpoint:hk});t.addEventListener("click",(()=>{n.open()}))}}}()}function vk(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return we(e,{method:"POST",headers:{"content-type":"application/json"},postData:JSON.stringify({queryId:t,variables:n})}).then((e=>{var t=e.status,n=e.responseText;return 200===t?JSON.parse(n).graphQL:Promise.reject(t)}))}function yk(){new td;var e=document.querySelector("[data-ellipsis-menu-trigger]");e&&new Ee(e,{elementToFocus:document.querySelector(".ellipsis-menu__item-button")})}class bk{constructor(){this.bindEvents(),new qh}bindEvents(){document.body.addEventListener(Bh.NEW_COMMENT_CREATE_EVENT,(e=>{var t=Date.now();vk("/pulse/api/runQuery",bk.query,{threadUrn:e.detail.threadUrn,text:e.detail.comment,createdAt:t}).then((e=>{var t,n;H.dispatchCustomEvent(document.body,Bh.NEW_COMMENT_SUCCESS_EVENT,{entityUrn:null==e||null===(t=e.postComment)||void 0===t||null===(n=t.comment)||void 0===n?void 0:n.threadUrn,graphqlResponse:null==e?void 0:e.postComment})})).catch((e=>{H.dispatchCustomEvent(document.body,Bh.NEW_COMMENT_FAIL_EVENT,e),ek.trigger("error",La("commentPostError"))}))}))}}function Ek(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function wk(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function _k(e,t,n){return t&&wk(e.prototype,t),n&&wk(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Sk(e){return Sk=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Sk(e)}function Tk(e,t){return Tk=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tk(e,t)}function Ck(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function kk(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,i=Sk(e);if(t){var r=Sk(this).constructor;n=Reflect.construct(i,arguments,r)}else n=i.apply(this,arguments);return Ck(this,n)}}function Ik(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)return;var i,r,o=[],s=!0,a=!1;try{for(n=n.call(e);!(s=(i=n.next()).done)&&(o.push(i.value),!t||o.length!==t);s=!0);}catch(e){a=!0,r=e}finally{try{s||null==n.return||n.return()}finally{if(a)throw r}}return o}(e,t)||Lk(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 Ak(e){return function(e){if(Array.isArray(e))return Ok(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Lk(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 Lk(e,t){if(e){if("string"==typeof e)return Ok(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)?Ok(e,t):void 0}}function Ok(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=new Array(t);n<t;n++)i[n]=e[n];return i}ak="88c1c5972e6aa9081d6c0885a442138b",(sk="query")in(ok=bk)?Object.defineProperty(ok,sk,{value:ak,enumerable:!0,configurable:!0,writable:!0}):ok[sk]=ak;var Rk="aria-[a-z0-9_\\-]+|class|data-[a-z0-9_\\-]+|dir|id|role|tabindex",Nk=function(){if("undefined"==typeof document)return!0;return"textContent"in document.createElement("div")}()?"textContent":"innerText",xk=["b","del","em","i","s","strong","sub","sup"],Pk=xk.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"]),Mk=[Rk,"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("|"),Dk=_k((function e(){Ek(this,e)}));function Uk(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Bk=function(){var e=/[&<>"'\u0000\\=]/g,t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","\0":"�","\\":"&#92;","=":"&#61;"};return function(n){return null==n?null:n.toString().replace(e,(function(e){return function(e){return e in t}(e)?t[e]:e}))}}(),qk=function(){var e,t="undefined"!=typeof document?document.createElement("div"):null,n=/&(?:([a-z0-9]+)|#x([\da-f]{1,6})|#(\d{1,8}));/gi,i={nbsp:" ",lt:"<",gt:">",amp:"&",quot:'"'};function r(e){if(function(e){return Uk(i,e)}(e))return i[e];if(!t)return e;t.innerHTML="&".concat(e,";");var n=t[Nk];return i[e]=n,n}return e="function"==typeof String.fromCodePoint?function(e){return String.fromCodePoint(e)}:function(e){return e<=65535?String.fromCharCode(e):"�"},function(t){return null==t?null:(t+"").replace(n,(function(t,n,i,o){return n?r(n):i||o?e(parseInt(i||o,i?16:10)||65533):"�"}))}}();function Fk(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"log",n="undefined"!=typeof window;if(n&&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)}function Hk(e){return/[<&]/.test(e)}var Gk="[ \t\r\n]*";function jk(e){e=Array.isArray(e)?e:[e];var t,n,i,r=0,o="<(?!/?";return o+="(?:",e.forEach((function(e,s){t=e.tags||Pk,n=e.attrs||Mk,i=e.checkUrlAttrs||!1,0!==s&&(o+="|"),o+="(?:"+t.join("|")+")",o+="(?:",o+=Gk,o+="|[ \t\r\n]+",o+="(?:(?:",o+="(?:".concat(n,")(?:=([\"'])[^'\"<>]*\\").concat(++r,")?"),i&&(o+="|(?:".concat("href|src",")=([\"'])(?:(?:").concat("https?|ftp|mailto|invalid",")(?::|&#(?:58|x3a);)|(?:").concat("data:image/(?:gif|jpg|jpeg|png);base64,",")|[/.#?]|&#(?:35|4[67]|63|x(?:2[3ef]|3f));)[^'\"<>]*\\").concat(++r)),o+=")[ \t\r\n]*)+",o+=")"})),o+=")",o+="/?>)",new RegExp(o,"i")}function zk(e){return jk({tags:e=e||Pk,checkUrlAttrs:!0})}function Wk(e,t){var n=(t=t||{}).allowTags,i=!1!==t.hasCustomElementMarkup;return n&&n.length>0?!zk(n).test(e):i?!Wk.R_UNSAFE_CUSTOM_ELEMENT.test(e):!Wk.R_UNSAFE_HTML.test(e)}function Kk(e){return e.replace(/<[^>]*>|[<>'"&\\]/g,"")}Wk.R_UNSAFE_HTML=zk(),Wk.R_UNSAFE_CUSTOM_ELEMENT=function(){var e={tag:"li-icon",attrs:"active|a11y-text|animate|color|size|type"};return jk([{tags:Pk,checkUrlAttrs:!0},{tags:[e.tag],attrs:[Rk,e.attrs].join("|"),checkUrlAttrs:!1}])}();var Vk={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,"",""]},Yk=/<([\w:]+)/;function Qk(e){return e in Vk}function Jk(e,t){var n,i,r,o,s,a=t.createDocumentFragment(),c=[];for(r=0,s=e.length;r<s;r++)if(i=e[r])if("string"==typeof i){n=n||a.appendChild(t.createElement("div"));var l=Ik(Yk.exec(i)||["",""],2)[1];if(void 0!==l){var u=l.toLowerCase(),d=Qk(u)&&Vk[u]||Vk._default;for(eI(n,d[1]+i+d[2]),o=d[0];o--;)n&&n.lastChild&&n.lastChild.nodeType===Node.ELEMENT_NODE&&(n=n.lastChild);c.push.apply(c,Ak(Array.from(n.childNodes))),(n=a.firstChild)&&(n.textContent="")}}else i instanceof Node&&c.push(i);for(a.textContent="",i=c[r=0];i;)a.appendChild(i),i=c[++r];return a}function Xk(e,t,n){e=e.toString();var i=t?function(e,t){var n={};return e.replace(/\{([^}]+)\}/g,(function(e,i){if(Uk(n,i))return n[i];if(Uk(t,i)){var r=t[i],o="string"==typeof r;if(!o&&!(r instanceof Dk)&&!("number"==typeof r))throw new Error("Only strings, numbers, and jSecure types are allowed as placeholder replacements.");return r?(r=o?"".concat(Bk(r)):r.toString(),n[i]=r,r):e}return e}))}(e,t):e,r=e;return Hk(i)&&!Wk(i,n)&&(i=Kk(i),Fk("Content contains tags or attributes that are not allowed:\nContent: "+r,"error")),i}var Zk=Xk,$k=Xk;function eI(e,t,n){var i=Xk(t,n);return i&&Hk(i)?e.innerHTML=i:i&&(e[Nk]=i),i}var tI=function(e){!function(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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tk(e,t)}(n,e);var t=kk(n);function n(e){var i,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Ek(this,n),(i=t.call(this)).options=r,i.tags=i.options.allowTags?i.options.allowTags.flat():[],i.str=e,i}return _k(n,[{key:"toString",value:function(){var e=this.str,t=this.strValue,n=e;return void 0!==t?t:(Wk(e,{allowTags:this.tags,hasCustomElementMarkup:this.options.hasCustomElementMarkup})||(n=e,e=Kk(e),Fk("UnsafeString contains tags or attributes that are not allowed.\nString: "+n,"error")),this.strValue=e,e)}}]),n}(Dk);var nI=/ /g,iI=/[\s\u0000<>"]|%00/,rI=/\\/,oI=/([.]|%2e){2}/i,sI=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 aI(e){var t,n="invalid://";if("string"!=typeof e)return Fk("jSecure Warning: url must be a string","error"),n;if((t=e.trim()).indexOf(" ")>-1&&(Fk("jSecure Warning: url should not contain spaces: "+e,"warn"),t=t.replace(nI,"+")),!sI.test(t))return Fk("jSecure Error: URL should be absolute with allowed schemas, relative, a hash fragment or query string. "+e,"error"),n;if(iI.test(t))return Fk("jSecure Error: not valid url character found in url: "+e,"error"),n;var i,r=t.split("?")[0],o=!1;if(r){try{if(i=decodeURI(r),oI.test(i))return Fk("jSecure Error: malicious data found in url path: "+r,"error"),n}catch(e){o=!0}if(o)return Fk("jSecure Error: malformed url path detected: "+r),n;if(rI.test(r)||oI.test(r))return Fk("jSecure Error: malicious data found in url path: "+r,"error"),n}return e}var cI={redirect:function(e){window&&(window.location.href=e)}};var lI={ALLOWED_TAGS:Pk,FORMATTING_TAGS:xk,htmlEncode:Bk,htmlUnencode:qk,log:Fk,mk:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r,o="",s=n.length;return e&&e.forEach((function(e,t){o+=e,t<s&&(r=n[t],o+=r instanceof tI?r:Bk(r))})),"".concat($k(o))},parseHTML:function(e,t){var n;if(t=t||document.implementation&&document.implementation.createHTMLDocument?document.implementation.createHTMLDocument(""):document,"string"==typeof e)n=Jk([e],t);else{if(!Array.isArray(e))return e;n=Jk(e,t)}return Array.from(n.childNodes)},parseSelector:function(e){return"string"==typeof e&&/^(?:\s*(<[\w\W]+>)[^>]*)$/.test(e)?[]:e},processTemplate:Zk,reEncode:function(e){return Bk(qk(e))},_redirector:cI,redirect:function(e){var t=aI(e);t===e&&cI.redirect(t)},sanitizeHTML:$k,sanitizeUrl:aI,setElementContent:eI,unsafe:function(e){return e},UnsafeString:function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this instanceof e||console.warn("Calling 'UnsafeString' without the 'new' keword is deprecated"),new tI(t,n)}};function uI(){var e=document.querySelector('[data-id="sticky-header__nav-backbtn"]');e&&e.addEventListener("click",(()=>{var e=sessionStorage.getItem("previousPage");e===location.href&&lI.redirect(location.origin);var t,n,i=function(e){try{return new URL(e).hostname}catch(e){return""}}(e);t=i,n=location.hostname,t&&t.indexOf(n.substring(n.indexOf(".")))>=0?history.back():lI.redirect(location.origin)}))}function dI(){dI=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,s=Object.create(o.prototype),a=new C(r||[]);return i(s,"_invoke",{value:w(e,n,a)}),s}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function p(){}function f(){}var m={};c(m,o,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(k([])));v&&v!==t&&n.call(v,o)&&(m=v);var y=f.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,o,s,a){var c=u(e[i],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function w(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return I()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=_(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=f,i(y,"constructor",{value:f,configurable:!0}),i(f,"constructor",{value:p,configurable:!0}),p.displayName=c(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(E.prototype),c(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new E(l(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},b(y),c(y,a,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function hI(e,t,n,i,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(i,r)}function pI(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){hI(o,i,r,s,a,"next",e)}function a(e){hI(o,i,r,s,a,"throw",e)}s(void 0)}))}}var fI,mI,gI,vI="click",yI="/mwlite/pulse/api/runQuery";function bI(){var e,t;null===(e=fI)||void 0===e||e.addEventListener(vI,_I),null===(t=mI)||void 0===t||t.addEventListener(vI,EI),gI&&new Uh(gI,{endpoint:yI})}function EI(e){return wI.apply(this,arguments)}function wI(){return wI=pI(dI().mark((function e(t){var n,i,r,o,s,a;return dI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.target.dataset,i=n.id,r=n.title,o=n.successMessage,s=n.errorMessage,a={text:r,url:SI(i)},e.prev=2,e.next=5,navigator.share(a);case 5:ek.trigger("success",o),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(2),ek.trigger("error",s);case 11:case"end":return e.stop()}}),e,null,[[2,8]])}))),wI.apply(this,arguments)}function _I(e){var t=e.target.dataset.id;lI.redirect(SI(t))}function SI(e){return e.indexOf("contentSeries")&&(e=e.split(":")[3]),new URL("".concat("/mwlite/feed/newsletter/").concat(e),window.location.origin).href}function TI(){!function(){var e=document.querySelector.bind(document);fI=e("#newsletter-see-all-editions"),mI=e("#share-newsletter"),gI=e(".newsletter-details__action")}(),bI()}function CI(e){ek.clearAllToasts(),e&&ek.trigger("notify",La("offlineText"))}function kI(e){if(e){var t="(".concat([/https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s)">]{2,}/,/www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[^\s)">]{2,}/,/https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[^\s)">]{2,}/,/www\.[a-zA-Z0-9]+\.[^\s)">]{2,}/].map((e=>e.source)).join("|"),")"),n=new RegExp(t,"g"),i=e.textContent.split(n);e.innerHTML="",i.filter((e=>!!e)).forEach((t=>{if(t.match(n)){var i=function(e){var t=document.createElement("a");return t.setAttribute("href",e),t.setAttribute("target","_blank"),t.setAttribute("data-tracking-control-name","view_link"),t.setAttribute("data-tracking-will-navigate","true"),t.textContent=e,t}(t),r=document.createElement("span");r.appendChild(i),e.appendChild(r)}else{var o=document.createElement("span");o.textContent=t,e.appendChild(o)}}))}}function II(e,t){if(e||Number.isSafeInteger(t)){var n=document.querySelector('.total-count[data-thread-urn="'.concat(e,'"]'));if(n){if(n.classList.contains("hidden"))return;t>=1&&(n.textContent="",n.appendChild(function(e){var t;return t=La(1===e?"contributionSingular":"contributionPlural"),document.createRange().createContextualFragment(t.trim())}(t)),n.querySelector(".total-count__count").textContent=t)}}}var AI,LI,OI=".contribution";function RI(e){var t=e.dataset,n=t.contributionListPosition,i=t.contributorUrn,r=t.contributionUrn,o=t.contributionTrackingId,s=e.closest(".article-segment"),a=e.querySelector(".insightful-reaction"),c=s.dataset.threadUrn,l=a.dataset.reactionsCount,u=nk();return{trackableUpdateObject:{trackingId:u.trackingId||o,objectUrn:u.updateUrn||r},trackableCommentObject:{trackingId:o,objectUrn:r},message:"",threadUrn:c,commenterUrn:i,totalReplies:0,totalLikes:parseInt(l,10),level:1,listPosition:{index:parseInt(n,10)}}}function NI(e){var t=[];return t.push(e),{comments:t}}function xI(e){var t=e.trackingInstance;e.visibleElements.forEach((e=>Eu.fireImpressionEvent(e,t,"FeedCommentImpressionEvent",NI)))}var PI=La("isMoreThan100ContributionsEnabled"),MI=La("isShowTopTwoContributionsEnabled")?4:3,DI=PI?300:100,UI=".contribution__text",BI="true"===La("isFCIEFCAEEnabled");class qI{constructor(){this.contributionStore={},this.paginationMetadataStore={},document.querySelectorAll(".article-segment").forEach((e=>{var t=e.dataset,n=t.totalCount,i=t.threadUrn;e.querySelectorAll(".contribution").forEach(((e,t)=>{var r,o=e.querySelector(UI);e.dataset.contributionListPosition=t+1,kI(o),null!==(r=this.contributionStore[i])&&void 0!==r&&r.contributions?this.contributionStore[i].contributions.push(e):this.contributionStore[i]={totalCount:parseInt(n)||0,contributions:[e]}}))})),document.addEventListener("animationend",(e=>{e.target.classList.contains("animate-show")&&e.target.classList.remove("animate-show")}))}getContributionsByThreadUrn(e){return e&&e in this.contributionStore?this.contributionStore[e].contributions:[]}getNextPageMetadata(e){var t=e&&this.paginationMetadataStore[e];return t||(t={threadUrn:e,start:0,count:MI},this.paginationMetadataStore[e]=t),t}updateNextPageMetadata(e,t){var n=e&&this.paginationMetadataStore[e];return n?n.start+n.count<DI&&(n.start=n.start+n.count,n.count=DI-n.start<5?DI-n.start:5):this.paginationMetadataStore[e]={threadUrn:e,start:0,count:MI},n.start+n.count>=DI||n.start>=t}addNewContribution(e,t){var n=this.getContributionsByThreadUrn(e),i=this._createNewContributionEl(t);i&&(this._renderNewContributions(e,[i],!0),n.length?this.contributionStore[e].contributions.unshift(i):this.contributionStore[e]={totalCount:0,contributions:[i]},this.contributionStore[e].totalCount++,II(e,this.contributionStore[e].totalCount))}loadMoreContributions(e){var t=this.getContributionsByThreadUrn(e),n=document.querySelector("#more-contributions").content.cloneNode(!0).querySelectorAll(".contribution"),i=this._dedupContributions(t,n);i.forEach((e=>{kI(e.querySelector(UI))})),this._renderNewContributions(e,i),t.length?this.contributionStore[e].contributions=t.concat(i):this.contributionStore[e].contributions=i}editContribution(e,t){var n,i,r,o=this.getContributionsByThreadUrn(e),s=(null==t||null===(n=t.updateComment)||void 0===n?void 0:n.comment)||{},a=null===(i=s.message)||void 0===i||null===(r=i[0])||void 0===r?void 0:r.text,c=s.urn,l=o.find((e=>e.dataset.contributionUrn===c)),u=null==l?void 0:l.querySelector(UI);u&&a&&(u.textContent=a,kI(u))}deleteContribution(e,t){var n,i=this.getContributionsByThreadUrn(e),r=i.findIndex((e=>{var n;return(null===(n=e.dataset)||void 0===n?void 0:n.contributionUrn)===t}));r>-1&&(null!==(n=i[r].nextElementSibling)&&void 0!==n&&n.hasAttribute("data-lego-segment-prompt")&&i[r].nextElementSibling.remove(),i[r].remove(),this.contributionStore[e].contributions.splice(r,1),this.contributionStore[e].totalCount--,II(e,this.contributionStore[e].totalCount))}_dedupContributions(e,t){var n=[];return t.forEach((t=>{e.find((e=>e.dataset.contributionUrn===t.dataset.contributionUrn))?t.remove():n.push(t)})),n}_createNewContributionEl(e){var t,n,i,r=null==e||null===(t=e.postComment)||void 0===t?void 0:t.comment;if(r){var o=r.urn,s=r.threadUrn,a=null===(n=r.message)||void 0===n||null===(i=n[0])||void 0===i?void 0:i.text,c=document.querySelector("#contribution-template").content.firstElementChild.cloneNode(!0),l=c.querySelector(UI),u=c.querySelector(".contribution-control-menu"),d=u.querySelector(".contribution-control-menu-item--copy"),h=c.querySelector(".insightful-reaction");return o&&(c.dataset.contributionUrn=o,u.querySelector(".contribution-control-menu-item--edit").dataset.commentUrn=o,u.querySelector(".contribution-control-menu-item--delete").dataset.commentUrn=o,d.dataset.commentUrn=o,h.dataset.entityUrn=o),s&&(d.dataset.commentThreadUrn=s),a&&(l.textContent=a),kI(l),c}}_renderNewContributions(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=document.querySelector('.article-segment[data-thread-urn="'.concat(e,'"] .contribution-list')),r=i.querySelectorAll(".contribution").length+1,o=new DocumentFragment;t.forEach((e=>{var t=e.querySelector(".ellipsis-menu");t&&new qu(t),e.dataset.contributionListPosition=r++,o.append(e)})),n?i.insertBefore(o,i.querySelector(".contribution")):i.appendChild(o),BI&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".contribution";AI&&(AI.reset(),AI.observeComponents(document.querySelectorAll(e)))}()}}function FI(){LI=LI||new qI}function HI(){return FI(),LI}function GI(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var jI="true"===La("isFCIEFCAEEnabled"),zI="CLOSED",WI="NEW_CONTRIBUTION",KI="EDITING",VI="aria-invalid",YI="aria-disabled",QI="disabled",JI="hidden",XI="showing",ZI="hiding",$I="text-color-signal-negative",eA="new-contribution",tA=new Map;class nA{constructor(e){document.querySelectorAll(".add-your-perspective-section").forEach((t=>{var n=t.getAttribute("data-segment-urn");tA.set(n,new iA(t,e))}))}}class iA{constructor(e,t,n,i){GI(this,"hasError",!1),this.section=e,this.addYourPerspectiveButton=e.querySelector(".add-your-perspective-button"),this.textareaSection=e.querySelector(".contribution-text-area-wrapper"),this.textarea=e.querySelector("textarea"),this.borderArea=e.querySelector(".contribution-text-area-border"),this.submitPerspectiveButton=e.querySelector(".submit-contribution-button"),this.cancelButton=e.querySelector(".contribution-cancel-button"),this.characterCount=e.querySelector(".contribution-character-count"),this.helperTextError=e.querySelector(".contribution-error-message"),this.loader=this.submitPerspectiveButton.querySelector(".loader"),this.submitPerspectiveButtonText=this.submitPerspectiveButton.querySelector(".submit-contribution-button-text"),this.editPerspectiveButtonText=this.submitPerspectiveButton.querySelector(".save-contribution-changes-button-text"),this.editorState=zI,this.apiRoute=t,this.onClose=i,n&&(this.setContributionUrn(n),this.editorState=KI),La("isGuest")||(this.textarea.value="",this._initMainInteractionHandlers(),this._loadInteractionStates(),this._loadPropertiesIntoMemory())}_initMainInteractionHandlers(){var e;null===(e=this.addYourPerspectiveButton)||void 0===e||e.addEventListener("click",(()=>{this.editorState=WI,this.enableEditing()})),this.cancelButton.addEventListener("click",(()=>{var e;this.disableEditing(),null===(e=this.onClose)||void 0===e||e.call(this)})),this.submitPerspectiveButton.addEventListener("click",(e=>{this.addContribution(),jI&&(e=>{rk(e)})(e)})),this.textarea.addEventListener("input",(()=>{this.onInput()}))}_loadInteractionStates(){this.borderArea.addEventListener("mouseenter",(()=>{this.borderArea.classList.add("bg-color-container-secondary-hover","shadow-border")})),this.borderArea.addEventListener("mouseleave",(()=>{this.borderArea.classList.remove("bg-color-container-secondary-hover","shadow-border")})),this.textarea.addEventListener("focus",(()=>{this.borderArea.classList.add("shadow-border"),this.borderArea.classList.remove("bg-color-container-secondary-hover")})),this.textarea.addEventListener("blur",(()=>{this.borderArea.classList.remove("shadow-border","bg-color-container-secondary-active")})),this.borderArea.addEventListener("mousedown",(()=>{this.borderArea.classList.add("bg-color-container-secondary-active")})),this.borderArea.addEventListener("mouseup",(()=>{this.borderArea.classList.remove("bg-color-container-secondary-active")}))}_loadPropertiesIntoMemory(){this.minTextAreaLength=parseInt(La("min_char_limit")),this.maxTextAreaLength=parseInt(La("max_char_limit")),this.charactersWord=La("i18n_characters"),this.charactersWordFraction=La("i18n_characters_fraction"),this.segmentUrn=this.textarea.getAttribute("data-segment-urn"),this.trackingPrefix=La("add_your_perspective_tracking_prefix")}enableEditing(){var e,t;this.section.classList.add("w-full"),this.updateHelperText(),this.showSubmitButtonText(),null===(e=this.addYourPerspectiveButton)||void 0===e||e.classList.add(JI),this.preloadLoadingSpinner(),null!==(t=this.textareaSection)&&void 0!==t&&t.classList.contains(JI)?(this.textareaSection.addEventListener("animationend",(()=>{this.textareaSection.classList.remove(XI),this.textarea.focus()}),{once:!0}),this.textareaSection.classList.remove(JI),this.textareaSection.classList.add(XI)):this.textarea.focus()}disableEditing(){var e,t,n;null===(e=this.textareaSection)||void 0===e||e.addEventListener("animationend",(()=>{this.textareaSection.classList.add(JI),this.textareaSection.classList.remove(ZI),this.addYourPerspectiveButton.classList.remove(JI),this.hideSubmitButtonText(),this.setText(""),this.section.classList.remove("w-full"),this.addYourPerspectiveButton.focus()}),{once:!0}),null===(t=this.textareaSection)||void 0===t||t.classList.remove(XI),null===(n=this.textareaSection)||void 0===n||n.classList.add(ZI),this.editorState=zI,this.hasError=!1}onInput(){this.hasError=!this.isInputLengthValid&&this.textAreaLength>this.maxTextAreaLength,this.updateHelperText(),this.updateButtonState()}get isInputLengthValid(){return this.textAreaLength<=this.maxTextAreaLength&&this.textAreaLength>=this.minTextAreaLength&&""!==this.textarea.value.trim()}get textAreaLength(){return this.textarea.value.trimEnd().length}get characterCountMessage(){var e="";return this.hasError&&this.textAreaLength<this.minTextAreaLength?e=this.charactersWord.replace(/\d+/g,this.textAreaLength):this.textAreaLength>0&&(e=this.charactersWordFraction.replace(/(\d+)\/(\d+)/g,(()=>"".concat(this.textAreaLength,"/").concat(this.maxTextAreaLength)))),e}addContribution(){var e=this.textarea.value.trimEnd();if(this.isInputLengthValid){this.setSubmitButtonLoadingState(!0);var t={threadUrn:this.segmentUrn,text:e,createdAt:Date.now()},n=iA.query;this.editorState===KI&&(n=iA.updateQuery,t={threadUrn:this.segmentUrn,text:e,commentUrn:this.contributionUrn}),vk(this.apiRoute,n,t).then((e=>{var t,n,i,r=HI();if(this.editorState===WI)r.addNewContribution(this.segmentUrn,e),null===(i=window.lazyloader)||void 0===i||i.then((e=>e.refreshLoader())),H.dispatchCustomEvent(document.body,ck,{entityUrn:La("ugcPost")});else if(this.editorState===KI){var o;r.editContribution(this.segmentUrn,e),null===(o=this.onClose)||void 0===o||o.call(this)}this.disableEditing();var s=La("i18n_contribution_post_success");ek.trigger(Ia.TOAST_TYPES.SUCCESS,s);var a=null==e||null===(t=e.postComment)||void 0===t||null===(n=t.comment)||void 0===n?void 0:n.urn;a&&this.emitNewPerspectiveEvent(a)})).catch((()=>{this.showErrorToast()})).finally((()=>{this.setSubmitButtonLoadingState(!1)}))}else this.hasError=!0,this.updateHelperText(),this.updateButtonState()}emitNewPerspectiveEvent(e){document.dispatchEvent(new CustomEvent(eA,{detail:{contributionUrn:e}}))}showErrorToast(){var e;this.editorState===WI?e=La("i18n_contribution_post_error"):this.editorState===KI&&(e=La("i18n_contribution_edit_post_error"));var t={text:La("i18n_try_refreshing_the_page"),url:window.location.href,trk:this.trackingPrefix,target:"_self"};ek.trigger(Ia.TOAST_TYPES.ERROR,e,void 0,t)}setText(e){this.textarea.value=e.trimEnd(),this.updateHelperText(),this.updateButtonState()}setContributionUrn(e){if(!e)throw Error("A contribution urn is required when editing a contribution");this.contributionUrn=e}updateHelperText(){this.characterCount.innerText=this.characterCountMessage,this.hasError?(this.characterCount.classList.add($I),this.textarea.setAttribute(VI,!0),this.textAreaLength<this.minTextAreaLength?this.helperTextError.classList.remove(JI):this.textAreaLength>this.maxTextAreaLength&&this.helperTextError.classList.add(JI)):(this.characterCount.classList.remove($I),this.helperTextError.classList.add(JI),this.textarea.removeAttribute(VI))}hideSubmitButtonText(){this.editPerspectiveButtonText.classList.add(JI),this.submitPerspectiveButtonText.classList.add(JI)}showSubmitButtonText(){this.editorState===KI?(this.submitPerspectiveButtonText.classList.add(JI),this.editPerspectiveButtonText.classList.remove(JI)):(this.editPerspectiveButtonText.classList.add(JI),this.submitPerspectiveButtonText.classList.remove(JI))}showLoader(){!(arguments.length>0&&void 0!==arguments[0])||arguments[0]?this.loader.classList.add("loader--show"):this.loader.classList.remove("loader--show")}preloadLoadingSpinner(){var e;null===(e=window.lazyloader)||void 0===e||e.then((e=>{this.showLoader(!0),e.refreshLoader(),this.showLoader(!1)}))}setSubmitButtonLoadingState(e){e?(this.submitPerspectiveButton.setAttribute(QI,"true"),this.showLoader(!0),this.hideSubmitButtonText()):(this.submitPerspectiveButton.removeAttribute(QI),this.showLoader(!1),this.showSubmitButtonText())}updateButtonState(){this.hasError||0===this.textAreaLength?(this.submitPerspectiveButton.setAttribute(QI,"true"),this.submitPerspectiveButton.setAttribute(YI,"true")):(this.submitPerspectiveButton.removeAttribute(QI),this.submitPerspectiveButton.removeAttribute(YI))}}GI(iA,"query","084ca6969d581c14aaf82b7f489a4474"),GI(iA,"updateQuery","f31910974afbcd13b88067c1a2d582ba");var rA=n(189),oA=n.n(rA);function sA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class aA{constructor(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document;aA.determineIfClamped(),this.bindEvents(e)}bindEvents(e){e.addEventListener("click",(e=>{var t=e.target;t.classList.contains(aA.seeMoreButtonClass)&&this.seeMore(t)})),window.addEventListener("resize",oA()(aA.determineIfClamped,300))}seeMore(e){var t=null==e?void 0:e.closest(".contribution__text-wrapper"),n=null==t?void 0:t.querySelector(".contribution__text");null==n||n.classList.remove(aA.lineClampingClass),null==e||e.remove()}static determineIfClamped(){document.querySelectorAll(".contribution__text").forEach((e=>{var t=e.parentElement.querySelector(".contribution__see-more-button");e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth?null==t||t.classList.remove("hidden"):(e.classList.remove(aA.lineClampingClass),null==t||t.remove())}))}}function cA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}sA(aA,"lineClampingClass","line-clamp-5"),sA(aA,"seeMoreButtonClass","contribution__see-more-button");var lA,uA="cancel",dA="delete";class hA{constructor(e){if(cA(this,"_onCancel",(()=>{this.modalManager.close(),this._clearSelectedEntities(),this._removeEventListenerOnDeleteModalCTA()})),cA(this,"_handleClickDeleteModalCTAList",(e=>{var t,n=null===(t=e.target.closest(".delete-contribution-cta").dataset)||void 0===t?void 0:t.actionType;n==uA?this._onCancel():n==dA&&(this._onDelete(),this._isLoading=!0,this._handleLoadingState())})),lA)return lA;this.apiRoute=e,this.contributionManager=HI(),this.modalManager=new io(document.getElementById("modal-delete-confirmation"),{triggerByOutletEl:!1}),this._selectedContributionEle,this._selectedCommentUrn,this._selectedThreadUrn,this._isLoading=!1,this._modalDeleteCTAListEle=document.getElementById("delete-modal-cta"),this._modalDismissBtnEle=document.querySelector(".delete-modal-dismiss-btn"),this._modalContentEle=document.querySelector(".delete-modal-content"),this._deleteCTABtn=document.querySelector(".delete-cta-btn"),this._loadingSpinner=this._deleteCTABtn.querySelector(".delete-cta-loader"),this._deleteCTAButtonText=this._deleteCTABtn.querySelector(".delete-cta-text"),this._authorContainerEle=document.querySelector(".delete-contribution-author")}bindEvents(e){var t=e.contributionUrn,n=e.segmentUrn,i=e.text,r=e.contributionContentEle;if(t&&n&&i&&r){if(this._selectedContributionEle=r,this._selectedCommentUrn=t,this._selectedThreadUrn=n,!La("isMobile")&&this._modalContentEle){var o;this._modalContentEle.textContent=i,this._authorContainerEle.textContent="";var s=null===(o=r.querySelector(".contribution-lockup"))||void 0===o?void 0:o.children;s&&this._appendContributionAuthorEle(s)}this._addEventListenerOnDeleteModalCTA(),this.modalManager.open({focusElement:this._selectedContributionEle.querySelector(".ellipsis-menu__trigger")})}}_onDelete(){this._isLoading||vk(this.apiRoute,hA.deleteQuery,{threadUrn:this._selectedThreadUrn,commentUrn:this._selectedCommentUrn}).then((()=>{this.contributionManager.deleteContribution(this._selectedThreadUrn,this._selectedCommentUrn),ek.trigger(Ia.TOAST_TYPES.SUCCESS,La("contributionDeleteSuccess")),H.dispatchCustomEvent(document.body,lk,{entityUrn:La("ugcPost")})})).catch((()=>{var e={text:La("contributionDeletePageRefresh"),url:window.location.href,target:"_self"};ek.trigger(Ia.TOAST_TYPES.ERROR,La("contributionDeleteError"),void 0,e)})).finally((()=>{this.modalManager.close(),this._isLoading=!1,this._clearSelectedEntities(),this._removeEventListenerOnDeleteModalCTA(),this._handleLoadingState()}))}_handleLoadingState(){this._deleteCTAButtonText.classList.toggle("hidden",this._isLoading),this._loadingSpinner.classList.toggle("loader--show",this._isLoading),this._isLoading?(this._deleteCTABtn.setAttribute("disabled","true"),this._deleteCTABtn.setAttribute("aria-disabled","true")):(this._deleteCTABtn.removeAttribute("disabled"),this._deleteCTABtn.removeAttribute("aria-disabled"))}_addEventListenerOnDeleteModalCTA(){this._modalDeleteCTAListEle.addEventListener("click",this._handleClickDeleteModalCTAList),La("isMobile")||this._modalDismissBtnEle.addEventListener("click",this._onCancel)}_removeEventListenerOnDeleteModalCTA(){this._modalDeleteCTAListEle.removeEventListener("click",this._handleClickDeleteModalCTAList),La("isMobile")||this._modalDismissBtnEle.removeEventListener("click",this._onCancel)}_clearSelectedEntities(){delete this._selectedContributionEle,delete this._selectedCommentUrn,delete this._selectedThreadUrn}_appendContributionAuthorEle(e){for(var t=new DocumentFragment,n=0;n<e.length;n++)t.appendChild(e[n].cloneNode(!0));this._authorContainerEle.appendChild(t)}}function pA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}cA(hA,"deleteQuery","2a40bfbb83526fa4342916a70534c0de");class fA{constructor(e){pA(this,"onClickMenuItem",(e=>{var t,n=e.parentNode,i=null===(t=n.dataset)||void 0===t?void 0:t.feedActionType;i&&this.actionTypes[i](n)})),pA(this,"_handleDeleteActionClickOnMenu",(e=>{var t;!function(e,t){(lA=new hA(t)).bindEvents(e)}(this._getTextCommentContributionEleInfo(e),this.apiRoute),null===(t=document.querySelector("#modal-delete-confirmation .modal__dismiss"))||void 0===t||t.focus()})),pA(this,"_handleEditActionClickOnMenu",(e=>{!function(e){var t,n=e.contributionContentEle,i=e.segmentUrn,r=e.contributionUrn,o=e.text,s=n.querySelector("textarea");if(null===(t=n.querySelector(".ellipsis-menu__trigger"))||void 0===t||t.click(),document.activeElement.blur(),s)s.focus();else{var a=tA.get(i).apiRoute,c=document.querySelector("#text-area-edit-template").content.firstElementChild.cloneNode(!0);c.querySelector("textarea").dataset.segmentUrn=i,c.querySelector(".contribution-error-message").setAttribute("id","error-".concat(i));var l=n.querySelector(".contribution__text");l.classList.add(JI),l.parentNode.insertBefore(c,l.nextSibling);var u=new iA(c,a,r,(()=>{l.classList.remove(JI),l.parentNode.removeChild(c)}));u.setText(o),u.enableEditing()}}(this._getTextCommentContributionEleInfo(e))})),pA(this,"_handleCopyActionClickOnMenu",(e=>{if(navigator.clipboard&&window.isSecureContext){var t=La("isGuest"),n=La("isLite"),i=this._getTextCommentContributionEleInfo(e),r=i.contributionUrn,o=i.segmentUrn,s=this._convertCommentUrnToDash(r),a=URL?new URL(location.href):new window.URL(location.href);a.searchParams.set("utm_source","share"),a.searchParams.set("utm_campaign","copy_contribution_link"),a.searchParams.set("utm_medium","".concat(t?"guest":"member","_").concat(n?"mobile":"desktop")),a.searchParams.set("contributionUrn",r),a.searchParams.set("articleSegmentUrn",o),a.searchParams.set("dashContributionUrn",s),navigator.clipboard.writeText(a.href).then((()=>{ek.trigger(Ia.TOAST_TYPES.SUCCESS,La("contributionCopyLink"))})).catch((()=>{ek.trigger(Ia.TOAST_TYPES.ERROR,La("contributionCopyFail"))}))}else ek.trigger(Ia.TOAST_TYPES.ERROR,La("contributionCopyUnsupported"))})),this.apiRoute=e}_convertCommentUrnToDash(e){var t=e.match(/(urn:li:comment):\((.*),(\d+)\)/);return"urn:li:fsd_comment:(".concat(t[3],",").concat(t[2],")")}_getTextCommentContributionEleInfo(e){if(e){var t=e.closest(".contribution"),n=e.closest(".article-segment");if(t&&n){var i,r,o=null===(i=e.dataset)||void 0===i?void 0:i.commentUrn,s=null===(r=n.dataset)||void 0===r?void 0:r.threadUrn;return o&&s?{contributionUrn:o,segmentUrn:s,text:t.querySelector(".contribution__text").textContent,contributionContentEle:t}:{}}}return{}}get actionTypes(){return{controlMenuEdit:this._handleEditActionClickOnMenu,controlMenuDelete:this._handleDeleteActionClickOnMenu,controlMenuCopy:this._handleCopyActionClickOnMenu}}}var mA="#x-article-feedback-content-initial-template",gA=".x-article-feedback__content",vA="hidden";class yA extends io{constructor(e){super(e),this.el=e,this.modalTitleEl=this.el.querySelector(".modal__title"),this.contentEl=this.el.querySelector(gA),this.cancelBtn=this.el.querySelector('[data-x-article-feedback-action="cancel"]'),this.submitBtn=this.el.querySelector('[data-x-article-feedback-action="submit"]'),this.doneBtn=this.el.querySelector('[data-x-article-feedback-action="done"]'),this.modalTitles={INITIAL:La("embed_x_article_feedback_title_initial"),CONFIRMATION:La("embed_x_article_feedback_title_confirmation")},this.renderPageInitial()}enableSubmit(){this.submitBtn.disabled=!1}disableSubmit(){this.submitBtn.disabled=!0}hideBtnEl(e){e&&e.classList.add(vA)}showBtnEl(e){e&&e.classList.remove(vA)}renderContentFromTemplate(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:mA,t=this.el.querySelector(e).content.firstElementChild.cloneNode(!0);this.contentEl.parentElement.replaceChild(t,this.contentEl),this.contentEl=this.el.querySelector(gA)}clearContent(){for(this.disableSubmit();this.contentEl.firstChild;)this.contentEl.removeChild(this.contentEl.firstChild)}renderPageInitial(){this.setModalTitle(this.modalTitles.INITIAL),this.renderContentFromTemplate(mA),this.showBtnEl(this.cancelBtn),this.showBtnEl(this.submitBtn),this.hideBtnEl(this.doneBtn)}renderPageConfirmation(){this.setModalTitle(this.modalTitles.CONFIRMATION),this.renderContentFromTemplate("#x-article-feedback-content-confirmation-template"),this.hideBtnEl(this.cancelBtn),this.hideBtnEl(this.submitBtn),this.showBtnEl(this.doneBtn)}setModalTitle(e){this.modalTitleEl.textContent=e}open(){this.el.querySelector(gA).childNodes.length||this.renderPageInitial(),super.open()}close(){this.clearContent(),super.close()}}class bA{constructor(e){if(!e)throw Error("An element must be provided to XArticleFeedback");this.modalEl=e,this.modal=new yA(this.modalEl),this.contentUrn=La("embed_x_content_urn"),document.body.addEventListener("click",this.clickHandler.bind(this))}clickHandler(e){var t=e.target.closest("[data-x-article-feedback-input]"),n=e.target.closest('[data-x-article-feedback-action="report_article"]'),i=e.target.closest('[data-x-article-feedback-action="report_article_confirmation"]');t&&(this.optionSelected(t),this.modal.enableSubmit()),(n||i||"cancel"===e.target.dataset.xArticleFeedbackAction||"done"===e.target.dataset.xArticleFeedbackAction)&&this.modal.close(),"submit"===e.target.dataset.xArticleFeedbackAction&&this.submitFeedback()}hideFeedbackEntries(){var e=document.querySelectorAll(".x-article-feedback-entry");e.length&&[...e].forEach((e=>{e.classList.add("hidden")}))}optionSelected(e){document.querySelector("#x-article-feedback-modal").querySelector('[data-x-article-feedback-action="submit"]').dataset.feedActionType=e.dataset.xArticleFeedbackInput}submitFeedback(){this.hideFeedbackEntries(),this.modal.renderPageConfirmation()}}var EA="hidden";class wA{constructor(){this.surveyEl=document.querySelector(".x-article-survey"),this.surveyEl&&(this.entryEl=this.surveyEl.querySelector(".x-article-survey-entry"),this.confirmationEl=this.surveyEl.querySelector(".x-article-survey-confirmation"),this.buttonGoodEl=this.surveyEl.querySelector(".x-article-survey-cta-good--member"),this.buttonNotGoodEl=this.surveyEl.querySelector(".x-article-survey-cta-not-good--member"),this._attachEventListeners())}_attachEventListeners(){this.buttonGoodEl&&this.buttonGoodEl.addEventListener("click",(()=>{this._showConfirmation()}))}_showConfirmation(){this.entryEl&&this._hideEl(this.entryEl),this.confirmationEl&&this._showEl(this.confirmationEl)}_hideEl(e){e.classList.add(EA)}_showEl(e){e.classList.remove(EA)}}var _A="CREATE",SA="DELETE",TA="contribution-reaction";class CA{constructor(e,t){var n="true"===e.dataset.isLoggedIn;this.apiRoute=t,n&&this.bindEvents(e)}bindEvents(e){e.addEventListener("click",(e=>{var t=e.target.closest(".insightful-reaction");if(t){var n=t.dataset.entityUrn,i="true"===t.dataset.viewerReacted;this.toggleViewerReacted(t),vk(this.apiRoute,CA.query,{action:i?SA:_A,entityUrn:n,reactionType:"INTEREST"})}}))}toggleViewerReacted(e){var t=parseInt(e.dataset.reactionsCount)||0;"true"===e.dataset.viewerReacted?(e.dataset.viewerReacted="false",e.dataset.feedActionCategory="UNREACT",e.dataset.feedActionType="unlikeContribution",t--):(e.dataset.viewerReacted="true",e.dataset.feedActionCategory="REACT",e.dataset.feedActionType="likeContribution",t++,document.dispatchEvent(new CustomEvent(TA,{detail:{contributionUrn:e.dataset.entityUrn}}))),e.dataset.reactionsCount=t,e.classList.toggle("viewer-reacted"),this.updateReactionsCount(e,t)}updateReactionsCount(e,t){e.querySelector(".insightful-reaction__count").textContent=this.getCopyText(t)}getCopyText(e){var t=La("reactionButtonCopyZeroState"),n=La("reactionButtonCopySingular"),i=La("reactionButtonCopyPlural"),r=t;return 1==e?r=n:e>1&&i&&(r=i.replace(/\d+/,e)),r}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(CA,"query","0182e59943976d1bc65149171328d89d");const kA=Array.prototype,IA=Object.prototype;kA.map,kA.some,IA.toString,IA.hasOwnProperty;function AA(e,t){if(!e)throw new Error(t)}function LA(){LA=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,s=Object.create(o.prototype),a=new C(r||[]);return i(s,"_invoke",{value:w(e,n,a)}),s}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function p(){}function f(){}var m={};c(m,o,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(k([])));v&&v!==t&&n.call(v,o)&&(m=v);var y=f.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,o,s,a){var c=u(e[i],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function w(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return I()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=_(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=f,i(y,"constructor",{value:f,configurable:!0}),i(f,"constructor",{value:p,configurable:!0}),p.displayName=c(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(E.prototype),c(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new E(l(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},b(y),c(y,a,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function OA(e,t,n,i,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(i,r)}function RA(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){OA(o,i,r,s,a,"next",e)}function a(e){OA(o,i,r,s,a,"throw",e)}s(void 0)}))}}function NA(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var xA=["x_article_contribution_prompt_invite_contributor","x_article_contribution_prompt_share_contribution"];class PA{constructor(e){NA(this,"trackingToken",void 0),this.memberUrn=La("memberUrn"),AA(this.memberUrn,"A memberUrn is required to fetch Lego information"),this.legoPageId=La("legoPageId"),AA(this.legoPageId,"A legoPageId is required to fetch Lego information"),this.legoSlotId=La("legoSlotId"),AA(this.legoSlotId,"A legoSlotId is required to fetch Lego information"),this.apiRoute=e,AA(this.apiRoute,"An apiRoute is required to fetch Lego information"),this.isContributor=La("isContributor"),this.init()}init(){var e=this;return RA(LA().mark((function t(){return LA().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.lazyloader=Co(),e.isContributor||document.addEventListener(TA,function(){var t=RA(LA().mark((function t(n){return LA().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.fetchAndRenderPrompt(n);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),e.isContributor&&document.addEventListener(eA,function(){var t=RA(LA().mark((function t(n){return LA().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.fetchAndRenderPrompt(n);case 1:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}());case 3:case"end":return t.stop()}}),t)})))()}fetchAndRenderPrompt(e){var t=this;return RA(LA().mark((function n(){var i;return LA().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.getPromptTemplate();case 2:(i=n.sent)&&t.renderPrompt({promptTemplate:i,contributionUrn:e.detail.contributionUrn});case 4:case"end":return n.stop()}}),n)})))()}getPromptTemplate(){var e=this;return RA(LA().mark((function t(){var n,i,r;return LA().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.fetchLegoWidgets();case 2:if(n=t.sent,!(i=n.widgetContents)){t.next=11;break}if(r=i.find((e=>xA.includes(e.id)))){t.next=8;break}return t.abrupt("return",null);case 8:return e.legoWidgetId=r.id,e.trackingToken=r.trackingToken,t.abrupt("return",document.getElementById("lego-template-for-widget-".concat(r.id)));case 11:return t.abrupt("return",null);case 12:case"end":return t.stop()}}),t)})))()}renderPrompt(e){var t,n=e.promptTemplate,i=e.contributionUrn,r=document.querySelector('[data-contribution-urn="'.concat(i,'"]'));if(null===(t=r.nextElementSibling)||void 0===t||!t.hasAttribute("data-lego-segment-prompt")){var o=n.content.firstElementChild.cloneNode(!0);r.after(o),this.sendLegoImpressionEvent(),this.lazyloader.refreshLoader();var s=r.parentElement.querySelector("[data-lego-segment-prompt-dismiss]"),a=null==s?void 0:s.addEventListener("click",(()=>{o.classList.add("hidden"),removeEventListener("click",a),this.sendLegoActionEvent(Ip.legoTrackingUtils.ACTION_CATEGORY.DISMISS)}));o.querySelector("[data-lego-segment-prompt-callback]").addEventListener("click",(()=>{this.widgetPrimaryActionHandler(this.legoWidgetId)}))}}sendLegoActionEvent(e){Ip.legoTrackingUtils.fireLegoEvent(Ip.legoTrackingUtils.LEGO_TRACKING_URLS.LEGO_WIDGET_ACTION_EVENT,{trackingToken:this.trackingToken,actionCategory:e})}sendLegoImpressionEvent(){Ip.legoTrackingUtils.fireLegoEvent(Ip.legoTrackingUtils.LEGO_TRACKING_URLS.LEGO_WIDGET_IMPRESSION_EVENT)}fetchLegoWidgets(){var e={pageId:this.legoPageId,memberUrn:this.memberUrn,filters:{slotId:this.legoSlotId}};return vk(this.apiRoute,PA.query,e).catch((e=>{H.dispatchCustomEvent(document.body,"LEGO_PROMPTS_REQUEST_FAILED",e)}))}widgetPrimaryActionHandler(e){switch(e){case"x_article_contribution_prompt_invite_contributor":this.inviteContributorWidgetPrimaryActionHandler();break;case"x_article_contribution_prompt_share_contribution":this.shareContributionWidgetPrimaryActionHandler()}}inviteContributorWidgetPrimaryActionHandler(){var e=La("legoSegmentPromptInviteContributorInShareUrlParam"),t=La("legoSegmentPromptInviteContributorInShareTextParam");document.dispatchEvent(new CustomEvent(am,{detail:"https://www.".concat(Y.getDomain(document),"/shareArticle?mini=true&view=message&url=").concat(encodeURIComponent(e),"&text=").concat(encodeURIComponent(t))}))}shareContributionWidgetPrimaryActionHandler(){var e=document.querySelector("#share-modal");new kp(e,{endpoint:hk}).open()}}NA(PA,"query","5b136618eb52bac70766afaae015283b");class MA{constructor(){window.document.querySelectorAll(".article-segment .load-more__cta--member").forEach((e=>function(e){null==e||e.addEventListener("click",(()=>{var t=e.dataset,n=t.contributionsCount,i=t.threadUrn,r=t.initialLoad;if(i){var o,s=document.querySelector('.total-count[data-thread-urn="'.concat(i,'"]')),a=e.closest(".article-segment"),c=a.querySelectorAll(".contribution-list .contribution"),l=null==c?void 0:c.length;if(La("isGuest")&&La("show3Contributions"))return r&&window.location.assign(La("loginUrl")),c.forEach((e=>{e.classList.remove("hidden")})),Number(n)<=l&&e.classList.add("hidden","hide"),void(e.dataset.initialLoad=!0);var u=document.querySelector('.load-more__loader[data-thread-urn="'.concat(i,'"]')),d=HI(),h=function(e){var t=e.threadUrn,n=e.start,i=e.count,r="/advice/api/getContributionsPagination";return r=H.addQueryParam(r,"threadUrn",t),r=H.addQueryParam(r,"start",n),r=H.addQueryParam(r,"count",i)}(d.getNextPageMetadata(i));e.classList.add("hidden","hide"),s.classList.add("hidden"),u.classList.add("loader--show"),we(h).then((t=>{var r;Ks.setSanitizedMarkup(document.querySelector("#more-contributions").content.querySelector(".more-contributions-container"),t.responseText),d.loadMoreContributions(i),d.updateNextPageMetadata(i,parseInt(n))||(e.classList.remove("hidden","hide"),s.classList.remove("hidden")),null===(r=window.lazyloader)||void 0===r||r.then((e=>e.refreshLoader()));var c=a.querySelectorAll(".contribution")[l];o=null==c?void 0:c.querySelector(".contribution-lockup"),aA.determineIfClamped()})).catch((()=>{var t={text:La("loadMoreErrorButton"),url:window.location.href,target:"_self"};ek.trigger(Ia.TOAST_TYPES.ERROR,La("loadMoreErrorText"),void 0,t),e.classList.remove("hidden","hide"),s.classList.remove("hidden"),o=e})).finally((()=>{var e;u.classList.remove("loader--show"),null===(e=o)||void 0===e||e.focus()}))}}))}(e)))}}function DA(){DA=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",s=r.asyncIterator||"@@asyncIterator",a=r.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function l(e,t,n,r){var o=t&&t.prototype instanceof h?t:h,s=Object.create(o.prototype),a=new C(r||[]);return i(s,"_invoke",{value:w(e,n,a)}),s}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=l;var d={};function h(){}function p(){}function f(){}var m={};c(m,o,(function(){return this}));var g=Object.getPrototypeOf,v=g&&g(g(k([])));v&&v!==t&&n.call(v,o)&&(m=v);var y=f.prototype=h.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function E(e,t){function r(i,o,s,a){var c=u(e[i],e,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,s,a)}),(function(e){r("throw",e,s,a)})):t.resolve(d).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,a)}))}a(c.arg)}var o;i(this,"_invoke",{value:function(e,n){function i(){return new t((function(t,i){r(e,n,t,i)}))}return o=o?o.then(i,i):i()}})}function w(e,t,n){var i="suspendedStart";return function(r,o){if("executing"===i)throw new Error("Generator is already running");if("completed"===i){if("throw"===r)throw o;return I()}for(n.method=r,n.arg=o;;){var s=n.delegate;if(s){var a=_(s,n);if(a){if(a===d)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===i)throw i="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i="executing";var c=u(e,t,n);if("normal"===c.type){if(i=n.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(i="completed",n.method="throw",n.arg=c.arg)}}}function _(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,_(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var i=u(n,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,d;var r=i.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function T(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,r=function t(){for(;++i<e.length;)if(n.call(e,i))return t.value=e[i],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:I}}function I(){return{value:void 0,done:!0}}return p.prototype=f,i(y,"constructor",{value:f,configurable:!0}),i(f,"constructor",{value:p,configurable:!0}),p.displayName=c(f,a,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,c(e,a,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},b(E.prototype),c(E.prototype,s,(function(){return this})),e.AsyncIterator=E,e.async=function(t,n,i,r,o){void 0===o&&(o=Promise);var s=new E(l(t,n,i,r),o);return e.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},b(y),c(y,a,"Generator"),c(y,o,(function(){return this})),c(y,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=Object(e),n=[];for(var i in t)n.push(i);return n.reverse(),function e(){for(;n.length;){var i=n.pop();if(i in t)return e.value=i,e.done=!1,e}return e.done=!0,e}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(T),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function i(n,i){return s.type="throw",s.arg=e,t.next=n,i&&(t.method="next",t.arg=void 0),!!i}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),c=n.call(o,"finallyLoc");if(a&&c){if(this.prev<o.catchLoc)return i(o.catchLoc,!0);if(this.prev<o.finallyLoc)return i(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return i(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return i(o.finallyLoc)}}}},abrupt:function(e,t){for(var i=this.tryEntries.length-1;i>=0;--i){var r=this.tryEntries[i];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=e,s.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var i=n.completion;if("throw"===i.type){var r=i.arg;T(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}function UA(e,t,n,i,r,o,s){try{var a=e[o](s),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(i,r)}var BA=Object.freeze({ELIGIBLE:"ELIGIBLE",PENDING:"PENDING",APPROVED:"APPROVED",UNKNOWN:"UNKNOWN"});class qA{constructor(e){var t,n;this.apiRoute=e,AA(this.apiRoute,"An apiRoute is required to send the request mutation"),this.isMobile=La("isMobile"),this.skillId=La("skillId"),this.readyToContributeButtons=document.querySelectorAll("[data-ready-to-contribute-btn]"),this.isMobile?this.initBottomSheetManager():this.initModalManager(),this.submitRequestButton=document.querySelector("[data-submit-request-to-contribute]"),this.submitRequestButtonText=document.querySelector("[data-submit-request-to-contribute-text]"),this.submitRequestButtonLoader=null===(t=this.submitRequestButton)||void 0===t?void 0:t.querySelector(".loader"),null===(n=this.submitRequestButton)||void 0===n||n.addEventListener("click",(()=>{this.submitRequestToContributeClickHandler()}))}initBottomSheetManager(){var e=document.getElementById("request-to-contribute-bottom-sheet");this.bottomSheetManager=e&&new ad({bottomSheetEl:e}),this.readyToContributeButtons.forEach((e=>{e.addEventListener("click",(()=>{this.bottomSheetManager.open()}))}))}initModalManager(){var e=document.getElementById("request-to-contribute-modal");this.modalManager=e&&new io(e)}submitRequestToContributeClickHandler(){return this.showLoader(!0),this.submitRequestToContribute().then((()=>{this.isMobile?this.bottomSheetManager.close():this.modalManager.close(),this.readyToContributeButtons.forEach((e=>{e.setAttribute("disabled",!0),e.querySelector("[data-ready-to-contribute-btn-text]").textContent=La("i18n_request_to_contribute_is_pending")})),ek.trigger(Ia.TOAST_TYPES.SUCCESS,La("i18n_request_to_contribute_success"))})).catch((()=>{ek.trigger(Ia.TOAST_TYPES.ERROR,La("i18n_request_to_contribute_error"))})).finally((()=>{this.showLoader(!1)}))}showLoader(e){this.submitRequestButtonLoader.classList.toggle("loader--show"),this.submitRequestButton.disabled=e}submitRequestToContribute(){var e=this;return function(e){return function(){var t=this,n=arguments;return new Promise((function(i,r){var o=e.apply(t,n);function s(e){UA(o,i,r,s,a,"next",e)}function a(e){UA(o,i,r,s,a,"throw",e)}s(void 0)}))}}(DA().mark((function t(){return DA().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",vk(e.apiRoute,qA.contributionRequestSkillMutation,{skillUrn:"urn:li:skill:".concat(e.skillId)}).then((e=>{var t=e.createContributionRequestSkill.contributionRequestSkillState;if(!t||t!==BA.PENDING)throw new Error("Invalid contributionRequestSkillState: ".concat(t));return e})));case 1:case"end":return t.stop()}}),t)})))()}}!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(qA,"contributionRequestSkillMutation","50a3054f54c73e873a7df84496fe1767");var FA=-60,HA=-85;var GA="true"===La("isFCIEFCAEEnabled");new class{constructor(){this.bindEvent()}bindEvent(){window.addEventListener("load",(()=>{var e;gk(),this.initFAETracking(),GA&&this.initFCAETracking(),function(){var e=La("highlightedContributionUrn");if(e){var t=document.querySelector('[data-contribution-urn="'.concat(e,'"]'));if(t){var n="true"===t.dataset.isLoggedIn?FA:HA;t.scrollIntoView(),window.scrollBy(0,n)}}}(),La("isGuest")||function(e){var t="created",n="deleted";document.querySelector(".reactions-menu")&&new Dh(".reactions-menu__trigger",document.body,{endpoint:e,onReactionSuccess:function(){var e="";this.reactionEvent===t&&(e=uk),this.reactionEvent===n&&(e=dk),H.dispatchCustomEvent(document.body,e,{entityUrn:La("ugcPost"),reactionType:this.previousReaction})},onReaction:function(e,i){""===i&&(this.reactionEvent=n),this.previousReaction||""===i||(this.reactionEvent=t),this.previousReaction=i},shouldStopPropagation:!1})}(hk),this.initMobileAndDesktopHandlers(),new nA(hk),this.setLoadMore(),this.setUpContributionControlMenu(),function(e){var t,n="newsletter-subscriber-button",i=null===(t=document.querySelector(".article-newsletter-card"))||void 0===t?void 0:t.querySelector(".follow-button"),r=document.getElementById("toasts");i&&r&&new Uh(i,{endpoint:e,onFollowSuccess:()=>{ek.trigger(Ia.TOAST_TYPES.SUCCESS,La("follow_success_toast"),n)},onUnfollowSuccess:()=>{ek.trigger(Ia.TOAST_TYPES.SUCCESS,La("unfollow_success_toast"),n)},errorCallback:()=>{ek.trigger(Ia.TOAST_TYPES.ERROR,La("follow_failure_toast"),n)}})}(hk),FI(),this.setInsightfulReaction(),(e=document.querySelector(".disclaimer__expand-btn"))&&e.addEventListener("click",(function(){var e=document.querySelector(".disclaimer").classList.toggle("expanded");this.setAttribute("aria-expanded",e)})),this.setFeedback(),function(e){var t,n=null===(t=document.querySelector(".publisher-author-card"))||void 0===t?void 0:t.querySelector(".follow-button");n&&new Uh(n,{endpoint:e})}(hk),this.initLoadMoreForRelevantReading(),this.initRequestToContribute(),this.setupSeeMoreContributionText(),this.initLegoSegmentPrompt()}))}initLegoSegmentPrompt(){"true"===La("isInviteToContributeEnabled")&&new PA(hk)}setLoadMore(){new MA}setFeedback(){if(!La("isGuest")){new wA;var e=document.querySelector("#x-article-feedback-modal");new bA(e)}}setInsightfulReaction(){document.querySelectorAll(".article-segment").forEach((e=>{new CA(e,hk)}))}initRequestToContribute(){La("userCanRequestToContribute")&&new qA(hk)}initMobileAndDesktopHandlers(){var e=La("isLite");GA&&function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.isLight,n=void 0!==t&&t,i=e.contributions,r=void 0===i?OI:i;H.onload((()=>AI||(window.tracking&&window.tracking.then((e=>{AI=new Eu(e,{componentList:document.querySelectorAll(r),thresholds:[{label:"impressed",time:n?300:0,ratio:.5}],getElementPayload:RI,onImpression:xI})})),AI)))}({isLite:e}),e?(new ku,uI(),new ch(document,{onClipboardCopy(e){var t=e?"success":"error";ek.trigger(t,La("i18n_copy_to_clipboard_".concat(t)))}}),window.addEventListener("offline",(()=>{CI(!0)})),window.addEventListener("online",(()=>{CI(!1)})),navigator.serviceWorker&&navigator.serviceWorker.addEventListener("message",(e=>{var t=e.data;"offline"in t&&CI(t.offline)})),La("newsletterLixEnabled")&&TI(),$C()):yk()}setUpContributionControlMenu(){var e=new fA(hk);document.querySelector(".article-main").addEventListener("click",(t=>{var n=t.target;n.classList.contains("contribution-control-menu-item")&&e.onClickMenuItem(n)}))}initFAETracking(){var e=La("contentUrn"),t=nk(),n=t.trackingId,i=t.updateUrn,r=t=>{ah.fireFeedActionEvent(t,{activityUrn:i||e,feedItemTrackingId:n})};document.body.addEventListener("click",r),document.body.addEventListener("focusin",(e=>{e.target.classList.contains("contribution-text-area")&&r(e)}))}initFCAETracking(){document.querySelectorAll(".contribution-control-menu-item--edit").forEach((e=>{e.addEventListener("click",(e=>{rk(e)}))}))}initLoadMoreForRelevantReading(){var e=document.querySelector(".articles-side-panel__load-more-btn");null==e||e.addEventListener("click",(()=>{var t=document.querySelectorAll(".articles-side-panel__list .x-article-card__link");Array.from(t).forEach((e=>e.classList.remove("hidden"))),e.classList.add("hidden")}))}setupSeeMoreContributionText(){var e=document.querySelector(".article-main");new aA(e)}}})()})();