(()=>{var e={7757:(e,t,n)=>{e.exports=n(5666)},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),o=n(6026),a=n(4372),i=n(5327),s=n(4097),c=n(4109),u=n(7985),l=n(5061),d=n(5655),f=n(5263);e.exports=function(e){return new Promise((function(t,n){var p,A=e.data,h=e.headers,E=e.responseType;function N(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(A)&&delete h["Content-Type"];var S=new XMLHttpRequest;if(e.auth){var g=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(g+":"+w)}var T=s(e.baseURL,e.url);function m(){if(S){var r="getAllResponseHeaders"in S?c(S.getAllResponseHeaders()):null,a={data:E&&"text"!==E&&"json"!==E?S.response:S.responseText,status:S.status,statusText:S.statusText,headers:r,config:e,request:S};o((function(e){t(e),N()}),(function(e){n(e),N()}),a),S=null}}if(S.open(e.method.toUpperCase(),i(T,e.params,e.paramsSerializer),!0),S.timeout=e.timeout,"onloadend"in S?S.onloadend=m:S.onreadystatechange=function(){S&&4===S.readyState&&(0!==S.status||S.responseURL&&0===S.responseURL.indexOf("file:"))&&setTimeout(m)},S.onabort=function(){S&&(n(l("Request aborted",e,"ECONNABORTED",S)),S=null)},S.onerror=function(){n(l("Network Error",e,null,S)),S=null},S.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",S)),S=null},r.isStandardBrowserEnv()){var I=(e.withCredentials||u(T))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;I&&(h[e.xsrfHeaderName]=I)}"setRequestHeader"in S&&r.forEach(h,(function(e,t){void 0===A&&"content-type"===t.toLowerCase()?delete h[t]:S.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(S.withCredentials=!!e.withCredentials),E&&"json"!==E&&(S.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&S.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&S.upload&&S.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){S&&(n(!e||e&&e.type?new f("canceled"):e),S.abort(),S=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),A||(A=null),S.send(A)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),o=n(1849),a=n(321),i=n(7185);var s=function e(t){var n=new a(t),s=o(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(5655));s.Axios=a,s.Cancel=n(5263),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(6268),e.exports=s,e.exports.default=s},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),o=n(5327),a=n(782),i=n(3572),s=n(7185),c=n(4875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var l=[i,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{o=i(d)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{"use strict";var r=n(1793),o=n(7303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},3572:(e,t,n)=>{"use strict";var r=n(4867),o=n(8527),a=n(6502),i=n(5655),s=n(5263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),o=n(5655);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),o=n(6016),a=n(481),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,i){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},4867:(e,t,n)=>{"use strict";var r=n(1849),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.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 u(e,t,n,r){var o=t&&t.prototype instanceof E?t:E,a=Object.create(o.prototype),i=new L(r||[]);return a._invoke=function(e,t,n){var r=d;return function(o,a){if(r===p)throw new Error("Generator is already running");if(r===A){if("throw"===o)throw a;return y()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=C(i,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=A,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?A:f,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=A,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",A="completed",h={};function E(){}function N(){}function S(){}var g={};c(g,a,(function(){return this}));var w=Object.getPrototypeOf,T=w&&w(w(b([])));T&&T!==n&&r.call(T,a)&&(g=T);var m=S.prototype=E.prototype=Object.create(g);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function v(e,t){function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function C(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,C(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function R(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(R,this),this.reset(!0)}function b(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;O(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:b(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=t.apply(n,r);function s(t){e(i,o,a,s,c,"next",t)}function c(t){e(i,o,a,s,c,"throw",t)}s(void 0)}))}}var r=n(7757),o=n.n(r);window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const a={debug:!!window.authentication_config.debug,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,enableReaderDashboardLink:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardLink,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,useTribMainGoogle:!!window.authentication_config&&"1"===window.authentication_config.useTribMainGoogle,isAdfreeArticle:!!window.authentication_config&&"1"===window.authentication_config.isAdfreeArticle,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.authentication_config?window.authentication_config.entitlementsEndpoint:"",entitlementsApiKey:window.authentication_config?window.authentication_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,serverEntitlements:!!window.authentication_config&&window.authentication_config.serverEntitlements,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled,bcLowaSegements:!!window.authentication_config.bcLowaSegements&&"1"===window.authentication_config.bcLowaSegements,blueconicEnabled:!!window.authentication_config.blueconicEnabled&&"1"===window.authentication_config.blueconicEnabled,datadogEnabled:!!window.authentication_config.enableDatadog&&"1"===window.authentication_config.enableDatadog};const i=function(){if(a.debug){for(var e,t=arguments.length,n=new Array(t),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function A(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(p(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 p(t)}}function h(e){this.message=e}h.prototype=new Error,h.prototype.name="InvalidTokenError";const E=function(e,t){if("string"!=typeof e)throw new h("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(A(e.split(".")[n]))}catch(e){throw new h("Invalid token specified: "+e.message)}};var N=n(9669),S=n.n(N);const g="auth0_sub",w="mng-entitlements",T="__MNG_Session",m="regwallUserIsSubscribed",I="entitled";var v=function(){var e=window.location.href;return new URL(e)},C=function(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=v(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var o=r.split(".");return"".concat(o[o.length-2],".").concat(o[o.length-1])},O=function(){var e=R();return".".concat(e)},L=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(i("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=d(e,2),n=t[0],o=t[1];if("expires"===n){var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),r+="expires=".concat(a.toUTCString(),";")}else r+="".concat(n,"=").concat(o,";")}))):r+="path=/;",document.cookie=r},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),o=R(),a="www".concat(o),i=".www".concat(o),s=[o,a,i];n&&s.push(n),Object.entries(t).forEach((function(e){var t=d(e,2),n=t[0],o=t[1];r+="".concat(n,"=").concat(o,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},y=function(e){return E(e)},M=function(){var e=t(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=R().split(".")[0],e.prev=1,e.next=4,S()({method:"get",url:"".concat(a.entitlementsEndpoint,"apple/subscription-check/").concat(n),params:{access_token:t}});case 4:if(!(r=e.sent).data){e.next=8;break}return i("Apple Sub Check: Request successful: ",r.data),e.abrupt("return","subscribed"===r.data.status);case 8:return e.abrupt("return",!1);case 11:return e.prev=11,e.t0=e.catch(1),i("Apple Sub Check: Request Failure: ",e.t0),e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),G=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S()({method:"get",url:"".concat(a.entitlementsEndpoint,"auth0/users/").concat(encodeURIComponent(t)),headers:{"X-Api-Key":a.entitlementsApiKey}});case 2:return n=e.sent,e.abrupt("return",n.data.encryptedUuid);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),P=function(){return"complete"===document.readyState},x=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){var r=!0;if(P())n();else{i("UIHandler: ","Waiting for the body to load...");var a=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&(r=P()),document.querySelector("body")&&r&&(clearInterval(a),n(!0));case 2:case"end":return t.stop()}}),t)}))),200)}}))},B=function(){return new Promise((function(e){i("blueConicReady | Waiting for BC to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},(function(){i("blueConicReady | onReady fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),i("blueConicReady | onReady timeout, BC onReady unknown."),e(!1)}),3e3)}))},U=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){if(i("blueConicLoaded | waitTillBCReady is ".concat(e)),void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe)i("blueConicLoaded | BC object already loaded"),e&&n(B()),n();else{i('blueConicLoaded | BC not loaded, waiting for "onBlueConicLoaded" event'),window.addEventListener("onBlueConicLoaded",t(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i("blueConicLoaded | onBlueConicLoaded event fired."),!e){t.next=9;break}return i("blueConicLoaded | waiting for blueConicReady..."),t.next=5,B();case 5:r=t.sent,n(r),t.next=10;break;case 9:n();case 10:case"end":return t.stop()}}),t)}))),!1);var r=setTimeout((function(){clearTimeout(r),i("blueConicLoaded | onBlueConicLoaded timeout, resolving false for load status."),n(!1)}),1e4)}}))},D=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U(!0);case 2:if(!e.sent){e.next=10;break}return e.next=6,new Promise((function(e){i("blueConicProfileReady | Waiting for BC Profile to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onBeforeInteractions,{},(function(){i("blueConicProfileReady | onBeforeInteractions fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),i("blueConicProfileReady | onBeforeInteractions timeout, BC profile readiness unknown"),e(!1)}),3e3)}));case 6:if(e.sent){e.next=9;break}return e.abrupt("return",!1);case 9:return e.abrupt("return",blueConicClient.profile.getProfile().getValue("Auth0_ID"));case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),k=function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["MNG Subs","DENV/PMP Subscribers","SCNG Subs","BANG Subs"],e.next=3,U(!0);case 3:if(!e.sent){e.next=15;break}if(n=window.blueConicClient.getSegments(),i("bcLowaCheck | BC segments for users: ",n),!(n.filter((function(e){return t.includes(e.name)})).length>0)){e.next=15;break}return e.next=11,D();case 11:if(!(r=e.sent)){e.next=14;break}return e.abrupt("return",{isSub:!0,uuid:r});case 14:case 15:return e.abrupt("return",{isSub:!1});case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(i("utils.js | Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(i("utils.js | Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};i("utils.js | Event: authentication ready: ",r),e(r)}catch(e){i(e),t(e)}}),!1))}))},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"onFinish";return new Promise((function(t){var n=setTimeout((function(){"undefined"!=typeof Connext?(i("Connext actually did load..."),clearTimeout(n),t(!0)):(i("Connext did not load in time. Resolving false..."),clearTimeout(n),t(!1))}),6e3);"undefined"!=typeof Connext?(i("Connext already ready."),clearTimeout(n),t(!0)):(i("Listening for Connext Ready event..."),document.addEventListener("string"==typeof e?e:"onFinish",(function(){clearTimeout(n),i("Connext loaded!"),t(!0)})))}))},F=function(){b(g),function(){i("Clearing entitlements...");try{b(w,{path:"/"})}catch(e){i("Failed to delete legacy cookie: ",e)}try{b(w,{path:"/",domain:R(),expires:365,secure:!0})}catch(e){i("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(T)}catch(e){i("Failed to remove local storage: ",e)}}()},_=function(){var e=v();return!["local","develop","preprod","trbdev"].some((function(t){return e.origin.includes(t)}))},Y=function(e){i("Removing storageObject : ",e),void 0!==window.localStorage.getItem(e)&&(window.localStorage.removeItem(e),i("Storage Object removed : ",e))},K=function(e){i("starting simpleEmailValidation");var t=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,}))$/i);if(!e)return{valid:!1,message:"Please enter an email."};if(!t.test(e))return{valid:!1,message:"Please enter a valid email."};var n=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),r=["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CBS","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CITYEATS","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOKINGCHANNEL","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","ETISALAT","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIAT","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOODNETWORK","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTDOOR","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HGTV","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELES","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDER","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LANCIA","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINDE","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOFT","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MACYS","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MASERATI","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MUTUAL","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTHWESTERNMUTUAL","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLDNAVY","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PASSAGENS","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCHER","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCA","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SHOWTIME","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIFFANY","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELCHANNEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLKSWAGEN","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","VUELOS","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAKC7DVF","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"].includes(n);return i("simpleEmailValidation: ","TLD search ".concat(r)),!1===r?{valid:!1,message:"Please enter a valid email domain."}:-1===["zzz.pl"].findIndex((function(t){return t===e.split("@")[1]}))?{valid:!0,message:"Valid"}:{valid:!1,message:"Please enter a valid email."}};window.simpleEmailValidation=K;var W;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var V=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===W){e.next=2;break}return e.abrupt("return",W);case 2:return t=a.auth0Domain,n=a.auth0ClientId,e.next=5,createAuth0Client({domain:t,client_id:n,useRefreshTokens:!0,cacheLocation:"localstorage",audience:"access-extension"});case 5:return W=e.sent,e.abrupt("return",W);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),j=function(e){i("utils.js | auth event dispathed");var t=new CustomEvent("authenticationReady",{detail:e});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.authenticationReady=e,i("Utils.js | Dispatching authenticationReady Event: ",t),window.dispatchEvent(t),i("Utils.js | Dispatched authenticationReady event!")},J=function(e){if(void 0!==window.authentication_config){var t=window.authentication_config,n=Object.keys(t).filter((function(n){return n.includes(e)&&"1"===t[n]}));return i("checkOneTapOptions: enabled options",n),n.length>0}return!1},Z=function(e){return Number.isInteger(Number(e))},Q=function(e){a.datadogEnabled&&window.DD_RUM.addTiming(e)};var q=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return e.next=4,X();case 4:return e.abrupt("return",new Promise((function(e){i("ANALYTICS: inside BCregwall events");var t=v();t.searchParams.delete("regwall");var n=blueConicClient.profile.getProfile();localStorage.setItem("regwallSuccess","yes"),localStorage.setItem("regwallEvent","yes"),n.setValue("bang_reg_wall_status","Y"),n.setValue("regwall_newspaper",t.host),n.setValue("regwall_success_date",new Date),n.setValue("regwall_success","yes"),blueConicClient.profile.updateProfile(),e(!0)})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),z=function(){var e=t(o().mark((function e(t){var n,r,a,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{void 0!==(n=y(t))&&n&&(i("ANALYTICS: Partner Access: JWT found"),r=n.entitlement_entitled,a=n.entitlement_source,s=n.entitlement_organizationTrackingId,c=n.entitlement_organizationType,i("ANALYTICS: Partner Access Event: Entitled: ".concat(r," and source: ").concat(a)),r&&"partner-access"===a&&(i("ANALYTICS: GA event for partner access"),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"partnerAccess",partner:"".concat(s,"|").concat(c)})))}catch(e){i("ANALYTICS: Failed to send Partner Access event: ",e)}case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),$=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:try{"yes"===localStorage.getItem("regwallEvent")&&(window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"regwall_success"}),i("ANALYTICS: GA/ datalayer ",window.dataLayer),localStorage.removeItem("regwallEvent"))}catch(e){i("ANALYTICS: Failed to send Regwall Succuss Event: ",e)}case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ee=function(){var e=t(o().mark((function e(t,n){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n.entitlements&&(r=y(n.entitlements.token)),i("ANALYTICS: user state variables are: ",t,n.userState),a="known"===t&&n.userState?r&&r.entitlement_entitled?"comp"===r.entitlement_level||"freeTrial"===r.entitlement_level?"subscriber-".concat(r.entitlement_level):"".concat(n.userState).concat(r.entitlement_serviceCode?"-".concat(r.entitlement_serviceCode):""):n.userState:"known"!==t||n.userState?"unknown"===t||"unknown-default"===t||"unknown-fail"===t&&"noEntitlements"===n.userState?t:t&&n.userState?r&&r.entitlement_entitled?"".concat(n.userState).concat(r.entitlement_serviceCode?"-".concat(r.entitlement_serviceCode):""):n.userState:"noState":"known-entitlements-failed",i("ANALYTICS: user state is ",a),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"Auth0State_event",Auth0State:a});case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),te=function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,X();case 3:n=e.sent,r=n.isAuthenticated,e.t0=r,e.next=!0===e.t0?8:!1===e.t0?10:e.t0===I?12:14;break;case 8:return t="known",e.abrupt("break",16);case 10:return t="unknown",e.abrupt("break",16);case 12:return t=I,e.abrupt("break",16);case 14:return t="unknown-default",e.abrupt("break",16);case 16:return e.abrupt("return",t);case 19:return e.prev=19,e.t1=e.catch(0),i("ANALYTICS: Error during onAuthReadyAnalytics: ",e.t1),e.abrupt("return","unknown-fail");case 23:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(){return e.apply(this,arguments)}}(),ne=function(e){try{window.dataLayer.push({event:e}),i("ANALYTICS: ".concat(e," event")),i("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){i("ANALYTICS: Failed to send ".concat(e," event: "),t)}},re=function(e){try{var t={};Object.keys(e).forEach((function(n){t[n]=e[n]})),0!==Object.keys(t).length&&window.dataLayer.push(t),i("ANALYTICS: ".concat(e.event," event")),i("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){i("ANALYTICS: Failed to send ".concat(e.event," event: "),t)}},oe=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={event:"one_tap_login",gotGroup:t,gotExperiment:e};switch(e){case"placement":n.gotDisplayPosition=window.authentication_config["got".concat(t,"ModalPosition")];break;case"scrolling":n.gotScrollDepthPercentage=window.authentication_config["got".concat(t,"GroupDepth")],n.gotDisplayPosition=window.authentication_config["got".concat(t,"GroupDelayPosition")];break;case"delayTime":n.gotTimeUntilDisplay=Math.floor(Z(window.authentication_config["got".concat(t,"GroupTime")])?parseInt(window.authentication_config["got".concat(t,"GroupTime")],10):1);break;default:return n.event}return n},ae=function(e){try{var t={googleonetap:"one_tap_login",viafoura_signup:"viafoura_signup_success",viafoura_login:"viafoura_login_success"}[e];"one_tap_login"===t?(n=localStorage.getItem("abcdLocal"),r=localStorage.getItem("abcdeLocal"),o=J("GroupEnabled"),a=J("GroupDelayEnabled"),s=J("GroupTimeDelayEnabled"),c=J("got".concat(n,"GroupEnabled")),u=J("got".concat(r,"GroupDelayEnabled")),l=J("got".concat(n,"GroupTimeDelayEnabled")),d=/Windows|Macintosh|Mac OS X|Linux/.test(navigator.userAgent),n&&o&&c&&!a&&d&&!s?(i("ANALYTICS: Position event enabled"),re(oe("placement",n))):r&&!o&&a&&u&&!s?(i("ANALYTICS: Scroll delay enabled"),re(oe("scrolling",r))):n&&!o&&!a&&s&&l?(i("ANALYTICS: Time delay enabled"),re(oe("delayTime",n))):(i("ANALYTICS: No custom event detected"),ne(oe("default")))):ne(t)}catch(e){i("ANALYTICS: Event not setup",e)}var n,r,o,a,s,c,u,l,d},ie=function(){var e=t(o().mark((function e(){var n,r,s,c,u;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=!1,e.next=4,new Promise((function(e,n){a.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(i("Entitlements already ready: ",window.MNGAuthentication.entitlementsReady),e(window.MNGAuthentication.entitlementsReady)):(i("Adding entitlementsReady listener..."),window.addEventListener("entitlementsReady",function(){var r=t(o().mark((function t(r){var a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a=r.detail||{},i("Utils.js | Event: entitlements ready: ",a),e(a)}catch(e){i(e),n(e)}case 1:case"end":return t.stop()}}),t)})));return function(e){return r.apply(this,arguments)}}(),!1)):e(!1)}));case 4:if(!(r=e.sent)||!r.token){e.next=12;break}return s=r.token,c=r.isEntitled,u=r.adfree,i("ANALYTICS: entitlements options: ",c,u),!0===u&&i("ANALYTICS: user state: found ad free",u),!0===c?(i("ANALYTICS: user state: found subscriber"),n="subscriber"):(i("ANALYTICS: user state: LINA"),n="lina"),z(s),e.abrupt("return",{userState:n,entitlements:r});case 12:return e.abrupt("return","noEntitlements");case 15:return e.prev=15,e.t0=e.catch(0),i("ANALYTICS:",e.t0),e.abrupt("return","entitlementError");case 19:case"end":return e.stop()}}),e,null,[[0,15]])})));return function(){return e.apply(this,arguments)}}(),se=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();const ce={onLoadAnalytics:function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("ANALYTICS: Start Analytics"),$(),window.MNGAuthentication.postAuthEvents=[],window.MNGAuthentication.preAuthGTMEvents=[],window.MNGAuthentication.postAuthEvents.push(ae),!((t=v()).pathname.startsWith("/logout")||t.pathname.startsWith("/login")||t.pathname.startsWith("/callback"))){e.next=8;break}return e.abrupt("return");case 8:return se(),e.next=11,te();case 11:return n=e.sent,e.next=14,ie();case 14:r=e.sent,ee(n,r);case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),blueConicRegwallEvents:q,callPreparedGTMEvent:ne,callCustomGTMEvent:re};var ue=function(){try{var e=localStorage.getItem(T);return"string"==typeof e?e:"{}"}catch(e){i("Unable to get session from local storage: ",e)}return"{}"},le=function(e){try{i("Setting local storage session",e),localStorage.setItem(T,e)}catch(e){i("Unable to save session from local storage: ",e)}},de=function(e){try{L(w,e,{path:"/",domain:O(),expires:365,secure:!0})}catch(e){i("Unable to save session to cookie storage: ",e)}},fe=function(){var e=t(o().mark((function e(){var t,n,r,s,c,u,l,d,f,p,A,h,E,N,g,w,T;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(a.sessionServer,"/api/session"),i("Checking server session: ",t),e.next=5,S().get(t,{withCredentials:!0});case 5:if(!(n=e.sent).data){e.next=17;break}return d=n.data.entitlementTokenDecoded,f=n.data,p=f.accessToken,A=f.idToken,h=f.entitlementToken,E=null!==(r=null==d?void 0:d.entitlement_expiry)&&void 0!==r?r:null,N=null!==(s=null==d?void 0:d.entitlement_source)&&void 0!==s?s:null,g=null!==(c=null==d?void 0:d.entitlement_entitled)&&void 0!==c?c:null,w=null!==(u=null==d?void 0:d.entitlement_extras_adfree)&&void 0!==u?u:null,T=null!==(l=null==d?void 0:d.entitlement_level)&&void 0!==l?l:null,le(JSON.stringify({accessToken:p,idToken:A,entitlementToken:h,expiration:E,entitlementSource:N,isEntitled:g,adFree:w,entitlementLevel:T})),""!==h&&"string"==typeof h&&de(h),e.abrupt("return",{accessToken:p,idToken:A,entitlementToken:h,expiration:E,entitlementSource:N,isEntitled:g,adFree:w,entitlementLevel:T});case 17:return e.abrupt("return",{accessToken:null,idToken:null,entitlementToken:null,expiration:null,entitlementSource:null,isEntitled:null,adFree:null,entitlementLevel:null});case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),pe=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="".concat(a.sessionServer,"/api/session"),i("Updating server session: ",n),e.next=6,S().post(n,t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to update session server: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),Ae=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t="".concat(a.sessionServer,"/api/session"),i("Deleting server session: ",t),e.next=6,S().delete(t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to delete server session: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=t(o().mark((function e(){var t,n,r,a,s,c,u,l,d,f,p,A,h,E,N,S,g,w,T,m,I,v,C,R,O,L,b;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Inside getSession"),e.prev=1,d=ue(),i("Session: __MNG_Session = ",d),f=JSON.parse(d),p=f.accessToken,A=f.idToken,h=f.entitlementToken,E=f.expiration,N=f.entitlementSource,S=f.isEntitled,g=f.adFree,w=f.entitlementLevel,n=p,a=E,s=N,c=S,u=g,l=w,i("Session: check both tokens: ",t=A,r=h),void 0!==A&&void 0!==h&&null!==A&&null!==h){e.next=35;break}return i("Session: missing id or entitlements, try session server"),e.next=18,fe();case 18:T=e.sent,m=T.accessToken,I=T.idToken,v=T.entitlementToken,C=T.expiration,R=T.entitlementSource,O=T.isEntitled,L=T.adFree,b=T.entitlementLevel,n=m,t=I,r=v,a=C,s=R,c=O,u=L,l=b;case 35:e.next=40;break;case 37:e.prev=37,e.t0=e.catch(1),i("Failed to get session: ",e.t0);case 40:return i("Returning session: ",t,n,r),e.abrupt("return",{accessToken:n,idToken:t,entitlementToken:r,expiration:a,entitlementSource:s,isEntitled:c,adFree:u,entitlementLevel:l});case 42:case"end":return e.stop()}}),e,null,[[1,37]])})));return function(){return e.apply(this,arguments)}}(),Ee=function(){var e=t(o().mark((function e(t){var n,r,s,c,u,l,d,f,p,A,h,E,N,S,g,w,T,m,I,C,R,O,L,b,y,M,G,P,x;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=ue(),r=JSON.parse(n),s=r.accessToken,c=void 0===s?null:s,u=r.idToken,l=void 0===u?null:u,d=r.entitlementToken,f=void 0===d?null:d,p=r.expiration,A=void 0===p?null:p,h=r.entitlementSource,E=void 0===h?null:h,N=r.isEntitled,S=void 0===N?null:N,g=r.adFree,w=void 0===g?null:g,T=r.entitlementLevel,m=void 0===T?null:T,I=t.accessToken,C=t.idToken,R=t.entitlementToken,O=t.expiration,L=t.entitlementSource,b=t.isEntitled,y=t.adFree,M=t.entitlementLevel,G={accessToken:null==I?c:I,idToken:null==C?l:C,entitlementToken:null==R?f:R,expiration:null==O?A:O,entitlementSource:null==L?E:L,isEntitled:null==b?S:b,adFree:null==y?w:y,entitlementLevel:null==M?m:M},i("Current session data: ",r),i("New session data: ",t),i("Updated session data:",G),P=JSON.stringify(G),le(P),""!==G.entitlementToken&&"string"==typeof G.entitlementToken&&de(G.entitlementToken),n===P){e.next=17;break}return e.next=15,pe(G);case 15:x=v(),!a.serverEntitlements||!a.bcLowaSegements||x.pathname.startsWith("/callback")||x.pathname.startsWith("/user-tools")||f||(i("Finished updating sesssion, about to reload to refresh entitlement cookie for server."),window.location.reload());case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(0),i("Unable to save session: ",e.t0);case 22:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(t){return e.apply(this,arguments)}}(),Ne=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Ending session..."),F(),e.next=4,Ae();case 4:localStorage.removeItem(T);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Se=function(){return"logout"===(v().searchParams.get("state")||"").toLowerCase()};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.logoutCallbacks=[];var ge=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V();case 2:n=e.sent,i("Calling Auth0 logout..."),n.logout({returnTo:t});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),we=function(){i("Check for SS paywall Cookie");var e=window.location.hostname,t=document.cookie.split(";").find((function(e){return e.trim().startsWith("vip-go-seg=vc-v1__has_access")}));if(/^(?!:\/\/)([a-zA-Z0-9-_]{1,63}\.?)+[a-zA-Z]{2,6}$/.test(e)&&t){i("SS paywall Cookie found, removing it");var n=t.split("=")[0].trim();document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=").concat(e),document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}},Te=function(){var e=t(o().mark((function e(){var n,r,a,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Attempting to logout..."),we(),!window.authentication_config.sessionManagementEnabled){e.next=7;break}return e.next=5,Ne();case 5:e.next=8;break;case 7:F();case 8:return e.prev=8,i("Cycling through logout callbacks..."),n=window.MNGAuthentication.logoutCallbacks.map((function(e){return e()})),e.next=13,Promise.all(n);case 13:i("Finished cycling through logout callbacks."),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),i("Failed to cycle through logout callbacks: ",e.t0);case 19:Object.keys(localStorage).filter((function(e){return e.includes("auth0")})).forEach((function(e){localStorage.removeItem(e),i("Removed Auth0 storage object...")})),Y("hhsl"),Y("userNewsLetterData"),Y(m),r=v(),a=window.location.origin;try{r.searchParams.get("returnURL")&&(s=decodeURIComponent(r.searchParams.get("returnURL")),a=s)}catch(e){i(e),a=window.location.origin}return a=new URL(a),e.next=30,H();case 30:if(!e.sent){e.next=62;break}if(i("Auth | Silent mode enabled ",Connext.GetOptions().Silentmode),Connext.GetOptions().Silentmode&&(i("Auth | Run connext manually"),Connext.Run()),c=a,a.origin!==window.location.origin&&(c=new URL(window.location.origin)).searchParams.append("returnAfterLogout",a),window.history.replaceState({additionalInformation:"Updated the URL to prevent another login cycle"},"Home",c),!_()){e.next=43;break}return i("About to call Connext Logout..."),e.next=41,Connext.Logout();case 41:e.next=60;break;case 43:if("Logged In"!==("undefined"==typeof CnnXt?(i("Connext was not loaded."),!1):Connext.Storage.GetUserState())){e.next=57;break}if(i("Connext user state is logged in, setting timeout..."),setTimeout(t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Connext took too long to logout, calling auth0 logout..."),e.next=3,ge(a);case 3:case"end":return e.stop()}}),e)}))),8e3),"function"!=typeof Connext._logout){e.next=52;break}return i("About to call Connext _logout..."),e.next=50,Connext._logout();case 50:e.next=55;break;case 52:return i("About to call Connext Logout..."),e.next=55,Connext.Logout();case 55:e.next=60;break;case 57:return i("Connext user state is logged out, not calling it, going to auth0 logout."),e.next=60,ge(a);case 60:e.next=65;break;case 62:return i("Connext Logout was NOT called"),e.next=65,ge(a);case 65:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(){return e.apply(this,arguments)}}(),me=function(){var e=0;for(var t in localStorage){var n=2*localStorage[t].length/1024/1024;!Number.isNaN(n)&&localStorage.hasOwnProperty(t)&&(e+=n)}return e},Ie=function(){var e=t(o().mark((function e(t,n,r,a,s){var c,u,d,f,p,A,h,E,N,S,g,w,T;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Attempting to login..."),me()>4.5&&localStorage.clear(),window.MNGAuthentication.preAuthGTMEvents.forEach((function(e){return ne(e)})),i("Cycled through preauth GTM events."),a&&(c=[],u=window.localStorage.getItem("callbackEvents"),d=JSON.parse(u),c=d&&d.length>0?l(new Set([].concat(l(a),l(d)))):a,window.localStorage.setItem("callbackEvents",JSON.stringify(c))),f=null,e.next=7,V();case 7:if(p=e.sent,A=v(),h=A.origin,E=new URL("".concat(h,"/callback")),N={},A.searchParams.get("regwall")&&(A.searchParams.get("returnUrl")&&(S=A.searchParams.get("returnUrl")),A.searchParams.get("auth_redirect")&&(S=A.searchParams.get("auth_redirect"))),A.pathname.startsWith("/login")||A.pathname.startsWith("/callback")?A.searchParams.get("returnUrl")?E.searchParams.set("auth_redirect",A.searchParams.get("returnUrl")):s&&E.searchParams.set("auth_redirect",s):E.searchParams.set("auth_redirect",A.toString()),S&&"regwall"!==t&&E.searchParams.set("auth_redirect",S),"true"===A.searchParams.get("close-after-finish")&&E.searchParams.set("close-after-finish","true"),"true"!==A.searchParams.get("ssl")){e.next=23;break}if(!window.authentication_config.sessionManagementEnabled){e.next=22;break}return e.next=20,Ne();case 20:e.next=23;break;case 22:F();case 23:return null!==(f=A.searchParams.get("login-with"))?N.connection=f:n&&(N.connection=n),g="none",t&&"regwall"===t&&(E.searchParams.set("regwall","true"),g="signUp",i("Logging in with regwall")),t&&(E.searchParams.set("loginsource",t),i("Logging in with ".concat(t))),r&&(N.login_hint=r),N.redirect_uri=E.toString(),N.initialScreen=g,"googleonetap"!==t&&(N.prompt="select_account"),null!==(w=A.searchParams.get("ampRegiWall"))&&(T=window.location.hostname,N.ampRegiWall=w,N.sourceDomain=T.replace("www.","").replace("preprod.","").replace("develop.",""),N.initialScreen="signUp",N.preferenceId=A.searchParams.get("prefId")),e.next=36,p.loginWithRedirect(N);case 36:case"end":return e.stop()}}),e)})));return function(t,n,r,o,a){return e.apply(this,arguments)}}(),ve=function(){return new Promise((function(e){var t=setTimeout((function(){e()}),8e3);try{var n=window.localStorage.getItem("callbackEvents"),r=JSON.parse(n);r&&0!==r.length||e(),i("Adding listeners to events we need to wait for...");var o=r.map((function(e){return t=e,new Promise((function(e){i("Adding event to wait for: ",t),window.addEventListener(t,(function(n){try{var r=n.detail||{};i("Event: ".concat(t,"} ready: "),r),e(r)}catch(t){i(t),e()}}),!1)}));var t}));Promise.all(o).then((function(){clearTimeout(t),e()}))}catch(t){i("Failed to wait for callback events",t),e()}}))};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.oidcLoginCallbacks=[];var Ce=function(){var e=t(o().mark((function e(){var n,r,a,s,c,u,l,d,f,p,A,h,E,N,S,g,w,T,I;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(we(),n=v(),r=!1,a=n.searchParams.get("auth_redirect")||"https://".concat(window.location.host),s=n.searchParams.get("redirect_uri")||"",s.includes("applenews")?(i("This is Apple prelogin flow."),(c=new URL(s))?(c.searchParams.append("post-apple-login","true"),i("Post callback Apple redirect URL is ".concat(c)),Ie(!1,!1,!1,[],c)):Ie()):a.includes("post-apple-login")&&(i("This is Apple Callback flow."),r=!0,(u=new URL(decodeURIComponent(a))).searchParams.delete("post-apple-login"),a=u),i("Handling post login callback..."),!(l=n.searchParams.get("error_description"))){e.next=13;break}if("shouldAutoLogin"!==l){e.next=12;break}return e.abrupt("return",Ie(!1,!1,!1,!1,a));case 12:r&&alert("There was an error in logging you in, please try again.");case 13:return e.next=15,V();case 15:return d=e.sent,e.next=18,d.handleRedirectCallback();case 18:return e.next=20,d.getIdTokenClaims();case 20:return f=e.sent,e.next=23,d.getUser();case 23:return p=e.sent,i("Auth0 user profile: ",p),A=f.__raw,e.next=28,d.getTokenSilently();case 28:return h=e.sent,e.prev=29,i("Cycling through login callbacks..."),e.next=33,ve();case 33:return E=window.MNGAuthentication.oidcLoginCallbacks.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(A));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=36,Promise.all(E);case 36:i("Finished cycling through login callbacks."),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(29),i("Failed to cycle through login callbacks: ",e.t0);case 42:if(N={accessToken:h,userId:p.sub,email:p.email,picture:p.picture},S=!1,g="",!r){e.next=61;break}return e.prev=46,e.next=49,G(N.userId);case 49:return g=e.sent,i("Encrypted apple uuid is: ".concat(g)),e.next=53,M(g);case 53:S=e.sent,i("Apple sub status is: ".concat(S)),e.next=61;break;case 57:e.prev=57,e.t1=e.catch(46),i("Apple sub check error: ".concat(e.t1)),alert("There was an error in logging you in, please try again.");case 61:if(Y(m),!window.authentication_config.sessionManagementEnabled){e.next=66;break}return i("Saving idToken to session server"),e.next=66,Ee({idToken:A,accessToken:h});case 66:if(!n.searchParams.get("close-after-finish")){e.next=68;break}return e.abrupt("return",window.close());case 68:if(!n.search.includes("loginsource")){e.next=73;break}return w=n.searchParams.get("loginsource"),T=window.MNGAuthentication.postAuthEvents.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(w));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=73,Promise.all(T);case 73:return e.prev=73,I=new URL(a),r&&S&&I.searchParams.append("access_token",encodeURIComponent(g)),i("Apple redirect URL:",I),e.abrupt("return",window.location.assign(I));case 80:e.prev=80,e.t2=e.catch(73),i("Failed to redirect after authentication: ",e.t2);case 83:return window.location.assign(new URL(window.location.origin)),e.abrupt("return","Finished execution, please await result...");case 85:case"end":return e.stop()}}),e,null,[[29,39],[46,57],[73,80]])})));return function(){return e.apply(this,arguments)}}(),Re=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("ANALYTICS: fireBC events"),e.next=3,q();case 3:i("ANALYTICS: bc values should be filled");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=t(o().mark((function e(){var t,n,r,a,s,c,u,l,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:if(t=e.sent,n=t.idToken,r=t.isAuthenticated,""===n){e.next=17;break}return e.prev=6,a=y(n),s=a.email,c=a.picture,u=a.sub,(l=u.split("|")).pop(),d=l.join("|"),e.abrupt("return",{authenticated:r,email:s,picture:c,userId:u,connectionSource:d});case 14:e.prev=14,e.t0=e.catch(6),i("Unable to parse idToken: ",n," Error: ",e.t0);case 17:return e.abrupt("return",{authenticated:r});case 18:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.login=Ie,window.MNGAuthentication.logout=Te,window.MNGAuthentication.getUserInfo=Oe;var Le=function(){var e=t(o().mark((function e(){var n,r,c,u,l,d,f,p,A,h,E,N;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=v(),r=!1,c="",u=!1,l={},n.searchParams.get("returnAfterLogout")&&(d=decodeURIComponent(n.searchParams.get("returnAfterLogout")),window.location.assign(d)),n.searchParams.has("entitlement_jwt")&&(window.authentication_config.sessionManagementEnabled=!1),f=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,V();case 3:return t=e.sent,e.next=6,t.getIdTokenClaims();case 6:return l=e.sent,e.next=9,t.isAuthenticated();case 9:if(r=e.sent,c="object"===s(l)?l.__raw:"",n=C(w),r||!n){e.next=16;break}return e.next=15,t.getTokenSilently();case 15:u=e.sent;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i("Unable to verify user has active auth0 session: ",e.t0);case 21:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),!n.pathname.startsWith("/logout")){e.next=13;break}return i("Page is logout. Routing to logout function..."),e.next=12,Te();case 12:return e.abrupt("return");case 13:if(!window.authentication_config.sessionManagementEnabled){e.next=39;break}return e.next=16,f();case 16:if(""===c){e.next=25;break}if(p=null,A=JSON.parse(window.localStorage.getItem(T)),"{}"!==ue()){e.next=23;break}return A&&(p=A.jwt),e.next=23,Ee({idToken:c,entitlementToken:p});case 23:e.next=37;break;case 25:return e.prev=25,e.next=28,he();case 28:h=e.sent,c=h.idToken,(r="string"==typeof c)&&(l=y(c)),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(25),i("Unable to initialize session: ",e.t0);case 37:e.next=41;break;case 39:return e.next=41,f();case 41:if(r||u||!a.blueconicEnabled||!a.bcLowaSegements){e.next=46;break}return e.next=44,k();case 44:(E=e.sent).isSub&&(r=I,l={sub:E.uuid});case 46:if(j({isAuthenticated:r,idToken:c,accessToken:u,claims:l}),Q("authenticationReady"),!0===r?(i("User is authenticated."),n.searchParams.get("auth_redirect")&&(i("Auth Redirect is present, sending user to auth redirect..."),(N=n.searchParams.get("auth_redirect")).endsWith("#")&&(N=N.slice(0,N.length)),window.location.assign(N)),n.pathname.startsWith("/login")&&!Se()&&(i("Page is login. The user is already logged in and Connext Logout param is not present... Redirecting..."),window.location.assign(n.origin))):i("User is not authenticated."),n.pathname.startsWith("/login")&&!Se()?(i("Page is login. Attempting to log user in..."),Ie()):i("Page is not login or Connext state is present"),!n.pathname.startsWith("/callback")||!n.searchParams.get("regwall")){e.next=59;break}return i("Page is callback with regwall param. Routing to regwall receiver..."),e.next=55,Re();case 55:i("Now login from regwall"),Ie(),e.next=63;break;case 59:if(!n.pathname.startsWith("/callback")){e.next=63;break}return i("Page is callback without regwall param. Routing to callback receiver..."),e.next=63,Ce();case 63:case"end":return e.stop()}}),e,null,[[25,34]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.init=Le;const be={init:Le};var ye=function(e,t){return new Promise((function(n){try{"undefined"==typeof CnnXt&&(i("Connext was not loaded."),n(!1)),i("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(t," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:t,onSuccess:function(){i("Signed user up to newsletter: ",t),n(!0)},onError:function(e){i("subscribeToNewsletter error: ",e),n(!1)}})}catch(e){i("subscribeToNewsletter Error:",e),n(!1)}}))};var Me=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Google token ",t),n=y(t.credential),e.prev=2,ne("one_tap_click"),localStorage.setItem("regwallSuccess","yes"),!a.newsletterId){e.next=9;break}return i("About to call Connext's subscribeToNewsletter function"),e.next=9,ye(n.email,a.newsletterId);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),i("Error: ",e.t0);case 14:return i("About to login with onetap flow..."),e.next=17,window.MNGAuthentication.login("googleonetap",a.useTribMainGoogle?"Trib-Google":"google-oauth2",n.email);case 17:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),Ge=function(){var e=document.getElementById("credential_picker_container"),t=/Windows|Macintosh|Mac OS X|Linux/.test(navigator.userAgent);if(i("onetap container: ",e),e&&t){e.style.zIndex="2147483639";var n=document.createElement("div");n.id="disclosure-container",n.textContent="By logging in, you consent to receive emails from us. You may update your email preferences at any time.",e.appendChild(n),e.addEventListener("mouseover",(function(){setTimeout((function(){var e=document.getElementById("disclosure-container");e&&e.remove()}),500)}),{once:!0})}},Pe=function(){var e=document.getElementById("credential_picker_container"),t=window.authentication_config,n=/Windows|Macintosh|Mac OS X|Linux/.test(navigator.userAgent);""!==t.gotModalPosition&&n&&(e.classList=t.gotModalPosition)},xe=function(e){return window.dataLayer.filter((function(t){return t.event===e})).length>0},Be=function(){var e=t(o().mark((function e(){var t,n,r=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=r.length>0&&void 0!==r[0]&&r[0],google.accounts.id.initialize({client_id:a.googleClientId,callback:Me,auto_select:!1,cancel_on_tap_outside:!1}),i("Showing the onetap modal..."),n="1"===window.authentication_config.gotPositionEnabled,google.accounts.id.prompt((function(e){if(e.isDisplayed()){var r="one_tap_displayed",o=new Date;if(setTimeout((function(){return Ge()}),1e3),n){var a=(o-t)/1e3;i("OneTap: modified position onetap enabled");var s={event:r,gotTimeUntilDisplay:Math.floor(a),gotDisplayPosition:window.authentication_config.gotModalPosition};Pe(),xe(s.event)||re(s)}else ne(r)}else if(e.isSkippedMoment()){var c="one_tap_cancel";if(n){var u={event:c,gotDisplayPosition:window.authentication_config.gotModalPosition};xe(u.event)||re(u)}else ne(c)}else if(e.isNotDisplayed()&&"suppressed_by_user"===e.j){var l="one_tap_auto_hide";if(n){var d={event:l,gotDisplayPosition:window.authentication_config.gotModalPosition};xe(d.event)||re(d)}else ne(l)}}));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();const Ue={init:function(){var e=t(o().mark((function e(){var t,n,r,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a.oneTapEnabled){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,X();case 4:if(t=e.sent,n=t.isAuthenticated,r=v(),n!==I){e.next=15;break}return e.next=10,D();case 10:if(!(s=e.sent)||s.includes("google")){e.next=13;break}return e.abrupt("return");case 13:e.next=17;break;case 15:if(!(n||r.pathname.startsWith("/login")||r.pathname.startsWith("/logout")||r.pathname.startsWith("/callback"))){e.next=17;break}return e.abrupt("return");case 17:return e.next=19,x();case 19:return i("onetap loading..."),c=new Date,e.next=23,Be(c);case 23:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()};var De=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Settings: ",a),be.init(),ce.onLoadAnalytics(),e.next=5,Ue.init();case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();window.disableAuth0AuthFlow=!0,De()})()})(); //# sourceMappingURL=mng-digisubs.main.bundle.js.map; (()=>{var e={7757:(e,t,n)=>{e.exports=n(5666)},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),o=n(6026),i=n(4372),a=n(5327),s=n(4097),c=n(4109),u=n(7985),l=n(5061),f=n(5655),d=n(5263);e.exports=function(e){return new Promise((function(t,n){var A,p=e.data,h=e.headers,E=e.responseType;function N(){e.cancelToken&&e.cancelToken.unsubscribe(A),e.signal&&e.signal.removeEventListener("abort",A)}r.isFormData(p)&&delete h["Content-Type"];var S=new XMLHttpRequest;if(e.auth){var T=e.auth.username||"",g=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(T+":"+g)}var R=s(e.baseURL,e.url);function C(){if(S){var r="getAllResponseHeaders"in S?c(S.getAllResponseHeaders()):null,i={data:E&&"text"!==E&&"json"!==E?S.response:S.responseText,status:S.status,statusText:S.statusText,headers:r,config:e,request:S};o((function(e){t(e),N()}),(function(e){n(e),N()}),i),S=null}}if(S.open(e.method.toUpperCase(),a(R,e.params,e.paramsSerializer),!0),S.timeout=e.timeout,"onloadend"in S?S.onloadend=C:S.onreadystatechange=function(){S&&4===S.readyState&&(0!==S.status||S.responseURL&&0===S.responseURL.indexOf("file:"))&&setTimeout(C)},S.onabort=function(){S&&(n(l("Request aborted",e,"ECONNABORTED",S)),S=null)},S.onerror=function(){n(l("Network Error",e,null,S)),S=null},S.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||f.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",S)),S=null},r.isStandardBrowserEnv()){var I=(e.withCredentials||u(R))&&e.xsrfCookieName?i.read(e.xsrfCookieName):void 0;I&&(h[e.xsrfHeaderName]=I)}"setRequestHeader"in S&&r.forEach(h,(function(e,t){void 0===p&&"content-type"===t.toLowerCase()?delete h[t]:S.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(S.withCredentials=!!e.withCredentials),E&&"json"!==E&&(S.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&S.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&S.upload&&S.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(A=function(e){S&&(n(!e||e&&e.type?new d("canceled"):e),S.abort(),S=null)},e.cancelToken&&e.cancelToken.subscribe(A),e.signal&&(e.signal.aborted?A():e.signal.addEventListener("abort",A))),p||(p=null),S.send(p)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),o=n(1849),i=n(321),a=n(7185);var s=function e(t){var n=new i(t),s=o(i.prototype.request,n);return r.extend(s,i.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(5655));s.Axios=i,s.Cancel=n(5263),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(6268),e.exports=s,e.exports.default=s},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),o=n(5327),i=n(782),a=n(3572),s=n(7185),c=n(4875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new i,response:new i}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,i=[];if(this.interceptors.response.forEach((function(e){i.push(e.fulfilled,e.rejected)})),!r){var l=[a,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(i),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var f=e;n.length;){var d=n.shift(),A=n.shift();try{f=d(f)}catch(e){A(e);break}}try{o=a(f)}catch(e){return Promise.reject(e)}for(;i.length;)o=o.then(i.shift(),i.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{"use strict";var r=n(1793),o=n(7303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,i){var a=new Error(e);return r(a,t,n,o,i)}},3572:(e,t,n)=>{"use strict";var r=n(4867),o=n(8527),i=n(6502),a=n(5655),s=n(5263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return i(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function i(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||i,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),o=n(5655);e.exports=function(e,t,n){var i=this||o;return r.forEach(n,(function(n){e=n.call(i,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),o=n(6016),i=n(481),a={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,a=!n&&"json"===this.responseType;if(a||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if("SyntaxError"===e.name)throw i(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(a)})),e.exports=u},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var i;if(n)i=n(t);else if(r.isURLSearchParams(t))i=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(o(t)+"="+o(e))})))})),i=a.join("&")}if(i){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+i}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,i,a){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(i)&&s.push("domain="+i),!0===a&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,i,a={};return e?(r.forEach(e.split("\n"),(function(e){if(i=e.indexOf(":"),t=r.trim(e.substr(0,i)).toLowerCase(),n=r.trim(e.substr(i+1)),t){if(a[t]&&o.indexOf(t)>=0)return;a[t]="set-cookie"===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+", "+n:n}})),a):a}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var i={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,a){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!i[r]&&(i[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,a)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var i=r[o],a=t[i];if(a){var s=e[i],c=void 0===s||a(s,i,e);if(!0!==c)throw new TypeError("option "+i+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+i)}},validators:o}},4867:(e,t,n)=>{"use strict";var r=n(1849),o=Object.prototype.toString;function i(e){return"[object Array]"===o.call(e)}function a(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),i(e))for(var n=0,r=e.length;n{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",a=o.asyncIterator||"@@asyncIterator",s=o.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 u(e,t,n,r){var o=t&&t.prototype instanceof E?t:E,i=Object.create(o.prototype),a=new L(r||[]);return i._invoke=function(e,t,n){var r=f;return function(o,i){if(r===A)throw new Error("Generator is already running");if(r===p){if("throw"===o)throw i;return y()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=w(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=A;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?p:d,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=p,n.method="throw",n.arg=c.arg)}}}(e,n,a),i}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var f="suspendedStart",d="suspendedYield",A="executing",p="completed",h={};function E(){}function N(){}function S(){}var T={};c(T,i,(function(){return this}));var g=Object.getPrototypeOf,R=g&&g(g(b([])));R&&R!==n&&r.call(R,i)&&(T=R);var C=S.prototype=E.prototype=Object.create(T);function I(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function n(o,i,a,s){var c=l(e[o],e,i);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,a,s)}),(function(e){n("throw",e,a,s)})):t.resolve(f).then((function(e){u.value=e,a(u)}),(function(e){return n("throw",e,a,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function i(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(i,i):i()}}function w(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,w(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var i=o.arg;return i?i.done?(n[e.resultName]=i.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):i:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function m(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 v(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(m,this),this.reset(!0)}function b(e){if(e){var n=e[i];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,a=function n(){for(;++o=0;--i){var a=this.tryEntries[i],s=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=r.call(a,"catchLoc"),u=r.call(a,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),v(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;v(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:b(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,i,a){try{var s=e[i](a),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,i){var a=t.apply(n,r);function s(t){e(a,o,i,s,c,"next",t)}function c(t){e(a,o,i,s,c,"throw",t)}s(void 0)}))}}var r=n(7757),o=n.n(r);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return a};function f(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(l(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 l(t)}}function d(e){this.message=e}d.prototype=new Error,d.prototype.name="InvalidTokenError";const A=function(e,t){if("string"!=typeof e)throw new d("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(f(e.split(".")[n]))}catch(e){throw new d("Invalid token specified: "+e.message)}};var p=n(9669),h=n.n(p);window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const E={debug:!!window.authentication_config.debug,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,enableReaderDashboardLink:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardLink,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,useTribMainGoogle:!!window.authentication_config&&"1"===window.authentication_config.useTribMainGoogle,isAdfreeArticle:!!window.authentication_config&&"1"===window.authentication_config.isAdfreeArticle,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.authentication_config?window.authentication_config.entitlementsEndpoint:"",entitlementsApiKey:window.authentication_config?window.authentication_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,serverEntitlements:!!window.authentication_config&&window.authentication_config.serverEntitlements,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled,bcLowaSegements:!!window.authentication_config.bcLowaSegements&&"1"===window.authentication_config.bcLowaSegements,blueconicEnabled:!!window.authentication_config.blueconicEnabled&&"1"===window.authentication_config.blueconicEnabled,datadogEnabled:!!window.authentication_config.enableDatadog&&"1"===window.authentication_config.enableDatadog};const N=function(){if(E.debug){for(var e,t=arguments.length,n=new Array(t),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=I(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var o=r.split(".");return"".concat(o[o.length-2],".").concat(o[o.length-1])},m=function(){var e=w();return".".concat(e)},v=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(N("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=c(e,2),n=t[0],o=t[1];if("expires"===n){var i=new Date;i.setTime(i.getTime()+24*o*60*60*1e3),r+="expires=".concat(i.toUTCString(),";")}else r+="".concat(n,"=").concat(o,";")}))):r+="path=/;",document.cookie=r},L=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),o=w(),i="www".concat(o),a=".www".concat(o),s=[o,i,a];n&&s.push(n),Object.entries(t).forEach((function(e){var t=c(e,2),n=t[0],o=t[1];r+="".concat(n,"=").concat(o,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},b=function(e){return A(e)},y=function(){var e=t(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=w().split(".")[0],e.prev=1,e.next=4,h()({method:"get",url:"".concat(E.entitlementsEndpoint,"apple/subscription-check/").concat(n),params:{access_token:t}});case 4:if(!(r=e.sent).data){e.next=8;break}return N("Apple Sub Check: Request successful: ",r.data),e.abrupt("return","subscribed"===r.data.status);case 8:return e.abrupt("return",!1);case 11:return e.prev=11,e.t0=e.catch(1),N("Apple Sub Check: Request Failure: ",e.t0),e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h()({method:"get",url:"".concat(E.entitlementsEndpoint,"auth0/users/").concat(encodeURIComponent(t)),headers:{"X-Api-Key":E.entitlementsApiKey}});case 2:return n=e.sent,e.abrupt("return",n.data.encryptedUuid);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),M=function(){return"complete"===document.readyState},P=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){var r=!0;if(M())n();else{N("UIHandler: ","Waiting for the body to load...");var i=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&(r=M()),document.querySelector("body")&&r&&(clearInterval(i),n(!0));case 2:case"end":return t.stop()}}),t)}))),200)}}))},G=function(){return new Promise((function(e){N("blueConicReady | Waiting for BC to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},(function(){N("blueConicReady | onReady fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),N("blueConicReady | onReady timeout, BC onReady unknown."),e(!1)}),3e3)}))},U=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){if(N("blueConicLoaded | waitTillBCReady is ".concat(e)),void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe)N("blueConicLoaded | BC object already loaded"),e&&n(G()),n();else{N('blueConicLoaded | BC not loaded, waiting for "onBlueConicLoaded" event'),window.addEventListener("onBlueConicLoaded",t(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(N("blueConicLoaded | onBlueConicLoaded event fired."),!e){t.next=9;break}return N("blueConicLoaded | waiting for blueConicReady..."),t.next=5,G();case 5:r=t.sent,n(r),t.next=10;break;case 9:n();case 10:case"end":return t.stop()}}),t)}))),!1);var r=setTimeout((function(){clearTimeout(r),N("blueConicLoaded | onBlueConicLoaded timeout, resolving false for load status."),n(!1)}),1e4)}}))},x=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U(!0);case 2:if(!e.sent){e.next=10;break}return e.next=6,new Promise((function(e){N("blueConicProfileReady | Waiting for BC Profile to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onBeforeInteractions,{},(function(){N("blueConicProfileReady | onBeforeInteractions fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),N("blueConicProfileReady | onBeforeInteractions timeout, BC profile readiness unknown"),e(!1)}),3e3)}));case 6:if(e.sent){e.next=9;break}return e.abrupt("return",!1);case 9:return e.abrupt("return",blueConicClient.profile.getProfile().getValue("Auth0_ID"));case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),D=function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["MNG Subs","DENV/PMP Subscribers","SCNG Subs","BANG Subs"],e.next=3,U(!0);case 3:if(!e.sent){e.next=15;break}if(n=window.blueConicClient.getSegments(),N("bcLowaCheck | BC segments for users: ",n),!(n.filter((function(e){return t.includes(e.name)})).length>0)){e.next=15;break}return e.next=11,x();case 11:if(!(r=e.sent)){e.next=14;break}return e.abrupt("return",{isSub:!0,uuid:r});case 14:case 15:return e.abrupt("return",{isSub:!1});case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(N("utils.js | Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(N("utils.js | Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};N("utils.js | Event: authentication ready: ",r),e(r)}catch(e){N(e),t(e)}}),!1))}))},k=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"onFinish";return new Promise((function(t){var n=setTimeout((function(){"undefined"!=typeof Connext?(N("Connext actually did load..."),clearTimeout(n),t(!0)):(N("Connext did not load in time. Resolving false..."),clearTimeout(n),t(!1))}),6e3);"undefined"!=typeof Connext?(N("Connext already ready."),clearTimeout(n),t(!0)):(N("Listening for Connext Ready event..."),document.addEventListener("string"==typeof e?e:"onFinish",(function(){clearTimeout(n),N("Connext loaded!"),t(!0)})))}))},H=function(){L(S),function(){N("Clearing entitlements...");try{L(T,{path:"/"})}catch(e){N("Failed to delete legacy cookie: ",e)}try{L(T,{path:"/",domain:w(),expires:365,secure:!0})}catch(e){N("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(g)}catch(e){N("Failed to remove local storage: ",e)}}()},F=function(){var e=I();return!["local","develop","preprod","trbdev"].some((function(t){return e.origin.includes(t)}))},K=function(e){N("Removing storageObject : ",e),void 0!==window.localStorage.getItem(e)&&(window.localStorage.removeItem(e),N("Storage Object removed : ",e))},Y=function(e){N("starting simpleEmailValidation");var t=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,}))$/i);if(!e)return{valid:!1,message:"Please enter an email."};if(!t.test(e))return{valid:!1,message:"Please enter a valid email."};var n=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),r=["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CBS","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CITYEATS","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOKINGCHANNEL","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","ETISALAT","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIAT","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOODNETWORK","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTDOOR","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HGTV","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELES","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDER","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LANCIA","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINDE","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOFT","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MACYS","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MASERATI","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MUTUAL","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTHWESTERNMUTUAL","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLDNAVY","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PASSAGENS","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCHER","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCA","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SHOWTIME","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIFFANY","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELCHANNEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLKSWAGEN","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","VUELOS","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAKC7DVF","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"].includes(n);return N("simpleEmailValidation: ","TLD search ".concat(r)),!1===r?{valid:!1,message:"Please enter a valid email domain."}:-1===["zzz.pl"].findIndex((function(t){return t===e.split("@")[1]}))?{valid:!0,message:"Valid"}:{valid:!1,message:"Please enter a valid email."}};window.simpleEmailValidation=Y;var _;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var V=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===_){e.next=2;break}return e.abrupt("return",_);case 2:return t=E.auth0Domain,n=E.auth0ClientId,e.next=5,createAuth0Client({domain:t,client_id:n,useRefreshTokens:!0,cacheLocation:"localstorage",audience:"access-extension"});case 5:return _=e.sent,e.abrupt("return",_);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=function(e){N("utils.js | auth event dispathed");var t=new CustomEvent("authenticationReady",{detail:e});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.authenticationReady=e,N("Utils.js | Dispatching authenticationReady Event: ",t),window.dispatchEvent(t),N("Utils.js | Dispatched authenticationReady event!")},j=function(e){E.datadogEnabled&&window.DD_RUM.addTiming(e)};function J(e){return function(e){if(Array.isArray(e))return a(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||s(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.")}()}var Z=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U();case 2:return e.next=4,X();case 4:return e.abrupt("return",new Promise((function(e){N("ANALYTICS: inside BCregwall events");var t=I();t.searchParams.delete("regwall");var n=blueConicClient.profile.getProfile();localStorage.setItem("regwallSuccess","yes"),localStorage.setItem("regwallEvent","yes"),n.setValue("bang_reg_wall_status","Y"),n.setValue("regwall_newspaper",t.host),n.setValue("regwall_success_date",new Date),n.setValue("regwall_success","yes"),blueConicClient.profile.updateProfile(),e(!0)})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Q=function(e){try{window.dataLayer.push({event:e}),N("ANALYTICS: ".concat(e," event")),N("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){N("ANALYTICS: Failed to send ".concat(e," event: "),t)}};var q=function(){try{var e=localStorage.getItem(g);return"string"==typeof e?e:"{}"}catch(e){N("Unable to get session from local storage: ",e)}return"{}"},z=function(e){try{N("Setting local storage session",e),localStorage.setItem(g,e)}catch(e){N("Unable to save session from local storage: ",e)}},$=function(e){try{v(T,e,{path:"/",domain:m(),expires:365,secure:!0})}catch(e){N("Unable to save session to cookie storage: ",e)}},ee=function(){var e=t(o().mark((function e(){var t,n,r,i,a,s,c,u,l,f,d,A,p,S,T,g,R;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(E.sessionServer,"/api/session"),N("Checking server session: ",t),e.next=5,h().get(t,{withCredentials:!0});case 5:if(!(n=e.sent).data){e.next=17;break}return u=n.data.entitlementTokenDecoded,l=n.data,f=l.accessToken,d=l.idToken,A=l.entitlementToken,p=null!==(r=null==u?void 0:u.entitlement_expiry)&&void 0!==r?r:null,S=null!==(i=null==u?void 0:u.entitlement_source)&&void 0!==i?i:null,T=null!==(a=null==u?void 0:u.entitlement_entitled)&&void 0!==a?a:null,g=null!==(s=null==u?void 0:u.entitlement_extras_adfree)&&void 0!==s?s:null,R=null!==(c=null==u?void 0:u.entitlement_level)&&void 0!==c?c:null,z(JSON.stringify({accessToken:f,idToken:d,entitlementToken:A,expiration:p,entitlementSource:S,isEntitled:T,adFree:g,entitlementLevel:R})),""!==A&&"string"==typeof A&&$(A),e.abrupt("return",{accessToken:f,idToken:d,entitlementToken:A,expiration:p,entitlementSource:S,isEntitled:T,adFree:g,entitlementLevel:R});case 17:return e.abrupt("return",{accessToken:null,idToken:null,entitlementToken:null,expiration:null,entitlementSource:null,isEntitled:null,adFree:null,entitlementLevel:null});case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="".concat(E.sessionServer,"/api/session"),N("Updating server session: ",n),e.next=6,h().post(n,t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),N("Failed to update session server: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),ne=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t="".concat(E.sessionServer,"/api/session"),N("Deleting server session: ",t),e.next=6,h().delete(t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),N("Failed to delete server session: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),re=function(){var e=t(o().mark((function e(){var t,n,r,i,a,s,c,u,l,f,d,A,p,h,E,S,T,g,R,C,I,O,w,m,v,L,b;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N("Inside getSession"),e.prev=1,l=q(),N("Session: __MNG_Session = ",l),f=JSON.parse(l),d=f.accessToken,A=f.idToken,p=f.entitlementToken,h=f.expiration,E=f.entitlementSource,S=f.isEntitled,T=f.adFree,g=f.entitlementLevel,n=d,i=h,a=E,s=S,c=T,u=g,N("Session: check both tokens: ",t=A,r=p),void 0!==A&&void 0!==p&&null!==A&&null!==p){e.next=35;break}return N("Session: missing id or entitlements, try session server"),e.next=18,ee();case 18:R=e.sent,C=R.accessToken,I=R.idToken,O=R.entitlementToken,w=R.expiration,m=R.entitlementSource,v=R.isEntitled,L=R.adFree,b=R.entitlementLevel,n=C,t=I,r=O,i=w,a=m,s=v,c=L,u=b;case 35:e.next=40;break;case 37:e.prev=37,e.t0=e.catch(1),N("Failed to get session: ",e.t0);case 40:return N("Returning session: ",t,n,r),e.abrupt("return",{accessToken:n,idToken:t,entitlementToken:r,expiration:i,entitlementSource:a,isEntitled:s,adFree:c,entitlementLevel:u});case 42:case"end":return e.stop()}}),e,null,[[1,37]])})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=t(o().mark((function e(t){var n,r,i,a,s,c,u,l,f,d,A,p,h,S,T,g,R,C,O,w,m,v,L,b,y,B,M,P,G;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=q(),r=JSON.parse(n),i=r.accessToken,a=void 0===i?null:i,s=r.idToken,c=void 0===s?null:s,u=r.entitlementToken,l=void 0===u?null:u,f=r.expiration,d=void 0===f?null:f,A=r.entitlementSource,p=void 0===A?null:A,h=r.isEntitled,S=void 0===h?null:h,T=r.adFree,g=void 0===T?null:T,R=r.entitlementLevel,C=void 0===R?null:R,O=t.accessToken,w=t.idToken,m=t.entitlementToken,v=t.expiration,L=t.entitlementSource,b=t.isEntitled,y=t.adFree,B=t.entitlementLevel,M={accessToken:null==O?a:O,idToken:null==w?c:w,entitlementToken:null==m?l:m,expiration:null==v?d:v,entitlementSource:null==L?p:L,isEntitled:null==b?S:b,adFree:null==y?g:y,entitlementLevel:null==B?C:B},N("Current session data: ",r),N("New session data: ",t),N("Updated session data:",M),P=JSON.stringify(M),z(P),""!==M.entitlementToken&&"string"==typeof M.entitlementToken&&$(M.entitlementToken),n===P){e.next=17;break}return e.next=15,te(M);case 15:G=I(),!E.serverEntitlements||!E.bcLowaSegements||G.pathname.startsWith("/callback")||G.pathname.startsWith("/user-tools")||l||(N("Finished updating sesssion, about to reload to refresh entitlement cookie for server."),window.location.reload());case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(0),N("Unable to save session: ",e.t0);case 22:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(t){return e.apply(this,arguments)}}(),ie=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("Ending session..."),H(),e.next=4,ne();case 4:localStorage.removeItem(g);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){return"logout"===(I().searchParams.get("state")||"").toLowerCase()};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.logoutCallbacks=[];var se=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,V();case 2:n=e.sent,N("Calling Auth0 logout..."),n.logout({returnTo:t});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ce=function(){N("Check for SS paywall Cookie");var e=window.location.hostname,t=document.cookie.split(";").find((function(e){return e.trim().startsWith("vip-go-seg=vc-v1__has_access")}));if(/^(?!:\/\/)([a-zA-Z0-9-_]{1,63}\.?)+[a-zA-Z]{2,6}$/.test(e)&&t){N("SS paywall Cookie found, removing it");var n=t.split("=")[0].trim();document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=").concat(e),document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}},ue=function(){var e=t(o().mark((function e(){var n,r,i,a,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(N("Attempting to logout..."),ce(),!window.authentication_config.sessionManagementEnabled){e.next=7;break}return e.next=5,ie();case 5:e.next=8;break;case 7:H();case 8:return e.prev=8,N("Cycling through logout callbacks..."),n=window.MNGAuthentication.logoutCallbacks.map((function(e){return e()})),e.next=13,Promise.all(n);case 13:N("Finished cycling through logout callbacks."),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),N("Failed to cycle through logout callbacks: ",e.t0);case 19:Object.keys(localStorage).filter((function(e){return e.includes("auth0")})).forEach((function(e){localStorage.removeItem(e),N("Removed Auth0 storage object...")})),K("hhsl"),K("userNewsLetterData"),K(R),r=I(),i=window.location.origin;try{r.searchParams.get("returnURL")&&(a=decodeURIComponent(r.searchParams.get("returnURL")),i=a)}catch(e){N(e),i=window.location.origin}return i=new URL(i),e.next=30,k();case 30:if(!e.sent){e.next=62;break}if(N("Auth | Silent mode enabled ",Connext.GetOptions().Silentmode),Connext.GetOptions().Silentmode&&(N("Auth | Run connext manually"),Connext.Run()),s=i,i.origin!==window.location.origin&&(s=new URL(window.location.origin)).searchParams.append("returnAfterLogout",i),window.history.replaceState({additionalInformation:"Updated the URL to prevent another login cycle"},"Home",s),!F()){e.next=43;break}return N("About to call Connext Logout..."),e.next=41,Connext.Logout();case 41:e.next=60;break;case 43:if("Logged In"!==("undefined"==typeof CnnXt?(N("Connext was not loaded."),!1):Connext.Storage.GetUserState())){e.next=57;break}if(N("Connext user state is logged in, setting timeout..."),setTimeout(t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("Connext took too long to logout, calling auth0 logout..."),e.next=3,se(i);case 3:case"end":return e.stop()}}),e)}))),8e3),"function"!=typeof Connext._logout){e.next=52;break}return N("About to call Connext _logout..."),e.next=50,Connext._logout();case 50:e.next=55;break;case 52:return N("About to call Connext Logout..."),e.next=55,Connext.Logout();case 55:e.next=60;break;case 57:return N("Connext user state is logged out, not calling it, going to auth0 logout."),e.next=60,se(i);case 60:e.next=65;break;case 62:return N("Connext Logout was NOT called"),e.next=65,se(i);case 65:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=0;for(var t in localStorage){var n=2*localStorage[t].length/1024/1024;!Number.isNaN(n)&&localStorage.hasOwnProperty(t)&&(e+=n)}return e},fe=function(){var e=t(o().mark((function e(t,n,r,i,a){var s,c,u,l,f,d,A,p,h,E,S,T,g;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("Attempting to login..."),le()>4.5&&localStorage.clear(),window.MNGAuthentication.preAuthGTMEvents.forEach((function(e){return Q(e)})),N("Cycled through preauth GTM events."),i&&(s=[],c=window.localStorage.getItem("callbackEvents"),u=JSON.parse(c),s=u&&u.length>0?J(new Set([].concat(J(i),J(u)))):i,window.localStorage.setItem("callbackEvents",JSON.stringify(s))),l=null,e.next=7,V();case 7:if(f=e.sent,d=I(),A=d.origin,p=new URL("".concat(A,"/callback")),h={},d.searchParams.get("regwall")&&(d.searchParams.get("returnUrl")&&(E=d.searchParams.get("returnUrl")),d.searchParams.get("auth_redirect")&&(E=d.searchParams.get("auth_redirect"))),d.pathname.startsWith("/login")||d.pathname.startsWith("/callback")?d.searchParams.get("returnUrl")?p.searchParams.set("auth_redirect",d.searchParams.get("returnUrl")):a&&p.searchParams.set("auth_redirect",a):p.searchParams.set("auth_redirect",d.toString()),E&&"regwall"!==t&&p.searchParams.set("auth_redirect",E),"true"===d.searchParams.get("close-after-finish")&&p.searchParams.set("close-after-finish","true"),"true"!==d.searchParams.get("ssl")){e.next=23;break}if(!window.authentication_config.sessionManagementEnabled){e.next=22;break}return e.next=20,ie();case 20:e.next=23;break;case 22:H();case 23:return null!==(l=d.searchParams.get("login-with"))?h.connection=l:n&&(h.connection=n),S="none",t&&"regwall"===t&&(p.searchParams.set("regwall","true"),S="signUp",N("Logging in with regwall")),t&&(p.searchParams.set("loginsource",t),N("Logging in with ".concat(t))),r&&(h.login_hint=r),h.redirect_uri=p.toString(),h.initialScreen=S,"googleonetap"!==t&&(h.prompt="select_account"),null!==(T=d.searchParams.get("ampRegiWall"))&&(g=window.location.hostname,h.ampRegiWall=T,h.sourceDomain=g.replace("www.","").replace("preprod.","").replace("develop.",""),h.initialScreen="signUp",h.preferenceId=d.searchParams.get("prefId")),e.next=36,f.loginWithRedirect(h);case 36:case"end":return e.stop()}}),e)})));return function(t,n,r,o,i){return e.apply(this,arguments)}}(),de=function(){return new Promise((function(e){var t=setTimeout((function(){e()}),8e3);try{var n=window.localStorage.getItem("callbackEvents"),r=JSON.parse(n);r&&0!==r.length||e(),N("Adding listeners to events we need to wait for...");var o=r.map((function(e){return t=e,new Promise((function(e){N("Adding event to wait for: ",t),window.addEventListener(t,(function(n){try{var r=n.detail||{};N("Event: ".concat(t,"} ready: "),r),e(r)}catch(t){N(t),e()}}),!1)}));var t}));Promise.all(o).then((function(){clearTimeout(t),e()}))}catch(t){N("Failed to wait for callback events",t),e()}}))};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.oidcLoginCallbacks=[];var Ae=function(){var e=t(o().mark((function e(){var n,r,i,a,s,c,u,l,f,d,A,p,h,E,S,T,g,C,O;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(ce(),n=I(),r=!1,i=n.searchParams.get("auth_redirect")||"https://".concat(window.location.host),a=n.searchParams.get("redirect_uri")||"",a.includes("applenews")?(N("This is Apple prelogin flow."),(s=new URL(a))?(s.searchParams.append("post-apple-login","true"),N("Post callback Apple redirect URL is ".concat(s)),fe(!1,!1,!1,[],s)):fe()):i.includes("post-apple-login")&&(N("This is Apple Callback flow."),r=!0,(c=new URL(decodeURIComponent(i))).searchParams.delete("post-apple-login"),i=c),N("Handling post login callback..."),!(u=n.searchParams.get("error_description"))){e.next=13;break}if("shouldAutoLogin"!==u){e.next=12;break}return e.abrupt("return",fe(!1,!1,!1,!1,i));case 12:r&&alert("There was an error in logging you in, please try again.");case 13:return e.next=15,V();case 15:return l=e.sent,e.next=18,l.handleRedirectCallback();case 18:return e.next=20,l.getIdTokenClaims();case 20:return f=e.sent,e.next=23,l.getUser();case 23:return d=e.sent,N("Auth0 user profile: ",d),A=f.__raw,e.next=28,l.getTokenSilently();case 28:return p=e.sent,e.prev=29,N("Cycling through login callbacks..."),e.next=33,de();case 33:return h=window.MNGAuthentication.oidcLoginCallbacks.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(A));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=36,Promise.all(h);case 36:N("Finished cycling through login callbacks."),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(29),N("Failed to cycle through login callbacks: ",e.t0);case 42:if(E={accessToken:p,userId:d.sub,email:d.email,picture:d.picture},S=!1,T="",!r){e.next=61;break}return e.prev=46,e.next=49,B(E.userId);case 49:return T=e.sent,N("Encrypted apple uuid is: ".concat(T)),e.next=53,y(T);case 53:S=e.sent,N("Apple sub status is: ".concat(S)),e.next=61;break;case 57:e.prev=57,e.t1=e.catch(46),N("Apple sub check error: ".concat(e.t1)),alert("There was an error in logging you in, please try again.");case 61:if(K(R),!window.authentication_config.sessionManagementEnabled){e.next=66;break}return N("Saving idToken to session server"),e.next=66,oe({idToken:A,accessToken:p});case 66:if(!n.searchParams.get("close-after-finish")){e.next=68;break}return e.abrupt("return",window.close());case 68:if(!n.search.includes("loginsource")){e.next=73;break}return g=n.searchParams.get("loginsource"),C=window.MNGAuthentication.postAuthEvents.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(g));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=73,Promise.all(C);case 73:return e.prev=73,O=new URL(i),r&&S&&O.searchParams.append("access_token",encodeURIComponent(T)),N("Apple redirect URL:",O),e.abrupt("return",window.location.assign(O));case 80:e.prev=80,e.t2=e.catch(73),N("Failed to redirect after authentication: ",e.t2);case 83:return window.location.assign(new URL(window.location.origin)),e.abrupt("return","Finished execution, please await result...");case 85:case"end":return e.stop()}}),e,null,[[29,39],[46,57],[73,80]])})));return function(){return e.apply(this,arguments)}}(),pe=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N("ANALYTICS: fireBC events"),e.next=3,Z();case 3:N("ANALYTICS: bc values should be filled");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),he=function(){var e=t(o().mark((function e(){var t,n,r,i,a,s,c,u,l;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:if(t=e.sent,n=t.idToken,r=t.isAuthenticated,""===n){e.next=17;break}return e.prev=6,i=b(n),a=i.email,s=i.picture,c=i.sub,(u=c.split("|")).pop(),l=u.join("|"),e.abrupt("return",{authenticated:r,email:a,picture:s,userId:c,connectionSource:l});case 14:e.prev=14,e.t0=e.catch(6),N("Unable to parse idToken: ",n," Error: ",e.t0);case 17:return e.abrupt("return",{authenticated:r});case 18:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.login=fe,window.MNGAuthentication.logout=ue,window.MNGAuthentication.getUserInfo=he;var Ee=function(){var e=t(o().mark((function e(){var n,r,a,s,c,u,l,f,d,A,p,h;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=I(),r=!1,a="",s=!1,c={},n.searchParams.get("returnAfterLogout")&&(u=decodeURIComponent(n.searchParams.get("returnAfterLogout")),window.location.assign(u)),n.searchParams.has("entitlement_jwt")&&(window.authentication_config.sessionManagementEnabled=!1),l=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,V();case 3:return t=e.sent,e.next=6,t.getIdTokenClaims();case 6:return c=e.sent,e.next=9,t.isAuthenticated();case 9:if(r=e.sent,a="object"===i(c)?c.__raw:"",n=O(T),r||!n){e.next=16;break}return e.next=15,t.getTokenSilently();case 15:s=e.sent;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),N("Unable to verify user has active auth0 session: ",e.t0);case 21:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),!n.pathname.startsWith("/logout")){e.next=13;break}return N("Page is logout. Routing to logout function..."),e.next=12,ue();case 12:return e.abrupt("return");case 13:if(!window.authentication_config.sessionManagementEnabled){e.next=39;break}return e.next=16,l();case 16:if(""===a){e.next=25;break}if(f=null,d=JSON.parse(window.localStorage.getItem(g)),"{}"!==q()){e.next=23;break}return d&&(f=d.jwt),e.next=23,oe({idToken:a,entitlementToken:f});case 23:e.next=37;break;case 25:return e.prev=25,e.next=28,re();case 28:A=e.sent,a=A.idToken,(r="string"==typeof a)&&(c=b(a)),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(25),N("Unable to initialize session: ",e.t0);case 37:e.next=41;break;case 39:return e.next=41,l();case 41:if(r||s||!E.blueconicEnabled||!E.bcLowaSegements){e.next=46;break}return e.next=44,D();case 44:(p=e.sent).isSub&&(r=C,c={sub:p.uuid});case 46:if(W({isAuthenticated:r,idToken:a,accessToken:s,claims:c}),j("authenticationReady"),!0===r?(N("User is authenticated."),n.searchParams.get("auth_redirect")&&(N("Auth Redirect is present, sending user to auth redirect..."),(h=n.searchParams.get("auth_redirect")).endsWith("#")&&(h=h.slice(0,h.length)),window.location.assign(h)),n.pathname.startsWith("/login")&&!ae()&&(N("Page is login. The user is already logged in and Connext Logout param is not present... Redirecting..."),window.location.assign(n.origin))):N("User is not authenticated."),n.pathname.startsWith("/login")&&!ae()?(N("Page is login. Attempting to log user in..."),fe()):N("Page is not login or Connext state is present"),!n.pathname.startsWith("/callback")||!n.searchParams.get("regwall")){e.next=59;break}return N("Page is callback with regwall param. Routing to regwall receiver..."),e.next=55,pe();case 55:N("Now login from regwall"),fe(),e.next=63;break;case 59:if(!n.pathname.startsWith("/callback")){e.next=63;break}return N("Page is callback without regwall param. Routing to callback receiver..."),e.next=63,Ae();case 63:case"end":return e.stop()}}),e,null,[[25,34]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.init=Ee;var Ne=function(e,t){return new Promise((function(n){try{"undefined"==typeof CnnXt&&(N("Connext was not loaded."),n(!1)),N("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(t," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:t,onSuccess:function(){N("Signed user up to newsletter: ",t),n(!0)},onError:function(e){N("subscribeToNewsletter error: ",e),n(!1)}})}catch(e){N("subscribeToNewsletter Error:",e),n(!1)}}))},Se=function(e){try{"string"==typeof e&&v(S,e,{domain:m(),path:"/",expires:365,secure:!0})}catch(e){N("Failed to set auth0_sub cookie: ",e)}},Te=function(e){if(!O(S))try{var t=e.claims;if(null==t||"object"!==i(t)&&!Object.keys(t).includes("sub"))return;var n=t.sub;Se(n)}catch(e){N("Failed to set auth0_sub: ",e)}},ge=function(e){try{if("string"==typeof e){var t=b(e).sub;Se(t)}else N("Could not set auth0_sub on login, idToken was not available.")}catch(e){N("Failed to set auth0_sub on login: ",e)}},Re=function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){N("Waiting for Connext onFinish to happen."),document.addEventListener("onFinish",(function(){N("Connext onFinish successful."),e(!0)}))}));case 2:if(null===(t=window.localStorage.getItem("newsletter_to_subscribe"))){e.next=13;break}return e.next=6,he();case 6:return n=e.sent,r=n.email,N("CONNEXT: about to sign up ".concat(r," to ").concat(t)),e.next=11,Ne(r,t);case 11:window.localStorage.removeItem("newsletter_to_subscribe"),N("CONNEXT: newsletter_to_subscribe value removed from local storage.");case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();const Ce={init:function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return document.addEventListener("click",(function(e){if(e.target.classList.contains("connext-login")){var t=window.location.href,n=new URL(t),r=n.origin,o=new URL("".concat(r,"/login"));o.searchParams.set("returnUrl",n.toString()),window.location.assign(o)}})),F()||document.addEventListener("onInit",(function(){if("undefined"!=typeof Connext){var e,t,n,r=Connext;t="Logout",n=function(){return function(){alert("Warning! You called Connext.Logout() directly! Calling MNGAuthentication.logout() next."),window.MNGAuthentication.logout()}},(e=r)._logout=Connext.Logout,e[t]=n(e[t])}})),Re(),MNGAuthentication.oidcLoginCallbacks.push(ge),e.next=6,X();case 6:t=e.sent,Te(t);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()};(function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Ce.init(),e.next=3,P(!0);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()})()})(); //# sourceMappingURL=mng-digisubs.connext.bundle.js.map; (()=>{var e={7757:(e,t,n)=>{e.exports=n(5666)},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),i=n(6026),a=n(4372),o=n(5327),s=n(4097),c=n(4109),u=n(7985),l=n(5061),d=n(5655),f=n(5263);e.exports=function(e){return new Promise((function(t,n){var p,h=e.data,A=e.headers,E=e.responseType;function w(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener("abort",p)}r.isFormData(h)&&delete A["Content-Type"];var g=new XMLHttpRequest;if(e.auth){var m=e.auth.username||"",N=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";A.Authorization="Basic "+btoa(m+":"+N)}var S=s(e.baseURL,e.url);function v(){if(g){var r="getAllResponseHeaders"in g?c(g.getAllResponseHeaders()):null,a={data:E&&"text"!==E&&"json"!==E?g.response:g.responseText,status:g.status,statusText:g.statusText,headers:r,config:e,request:g};i((function(e){t(e),w()}),(function(e){n(e),w()}),a),g=null}}if(g.open(e.method.toUpperCase(),o(S,e.params,e.paramsSerializer),!0),g.timeout=e.timeout,"onloadend"in g?g.onloadend=v:g.onreadystatechange=function(){g&&4===g.readyState&&(0!==g.status||g.responseURL&&0===g.responseURL.indexOf("file:"))&&setTimeout(v)},g.onabort=function(){g&&(n(l("Request aborted",e,"ECONNABORTED",g)),g=null)},g.onerror=function(){n(l("Network Error",e,null,g)),g=null},g.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",g)),g=null},r.isStandardBrowserEnv()){var T=(e.withCredentials||u(S))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;T&&(A[e.xsrfHeaderName]=T)}"setRequestHeader"in g&&r.forEach(A,(function(e,t){void 0===h&&"content-type"===t.toLowerCase()?delete A[t]:g.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(g.withCredentials=!!e.withCredentials),E&&"json"!==E&&(g.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&g.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&g.upload&&g.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){g&&(n(!e||e&&e.type?new f("canceled"):e),g.abort(),g=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener("abort",p))),h||(h=null),g.send(h)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),i=n(1849),a=n(321),o=n(7185);var s=function e(t){var n=new a(t),s=i(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(o(t,n))},s}(n(5655));s.Axios=a,s.Cancel=n(5263),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(6268),e.exports=s,e.exports.default=s},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function i(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),i=n(5327),a=n(782),o=n(3572),s=n(7185),c=n(4875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var i,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var l=[o,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),i=Promise.resolve(e);l.length;)i=i.then(l.shift(),l.shift());return i}for(var d=e;n.length;){var f=n.shift(),p=n.shift();try{d=f(d)}catch(e){p(e);break}}try{i=o(d)}catch(e){return Promise.reject(e)}for(;a.length;)i=i.then(a.shift(),a.shift());return i},l.prototype.getUri=function(e){return e=s(this.defaults,e),i(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},4097:(e,t,n)=>{"use strict";var r=n(1793),i=n(7303);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,i,a){var o=new Error(e);return r(o,t,n,i,a)}},3572:(e,t,n)=>{"use strict";var r=n(4867),i=n(8527),a=n(6502),o=n(5655),s=n(5263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||o.adapter)(e).then((function(t){return c(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,i){return e.config=t,n&&(e.code=n),e.request=r,e.response=i,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function o(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function c(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var u={url:o,method:o,data:o,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,i=t(e);r.isUndefined(i)&&t!==c||(n[e]=i)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),i=n(5655);e.exports=function(e,t,n){var a=this||i;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),i=n(6016),a=n(481),o={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(e,t){return i(t,"Accept"),i(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,o=!n&&"json"===this.responseType;if(o||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(o){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(o)})),e.exports=u},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(4867);function i(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var o=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),o.push(i(t)+"="+i(e))})))})),a=o.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,a,o){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(i)&&s.push("path="+i),r.isString(a)&&s.push("domain="+a),!0===o&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function i(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),i=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,o={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(o[t]&&i.indexOf(t)>=0)return;o[t]="set-cookie"===t?(o[t]?o[t]:[]).concat([n]):o[t]?o[t]+", "+n:n}})),o):o}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,i={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){i[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};i.transitional=function(e,t,n){function i(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,o){if(!1===e)throw new Error(i(r," has been removed"+(t?" in "+t:"")));return t&&!a[r]&&(a[r]=!0,console.warn(i(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,o)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),i=r.length;i-- >0;){var a=r[i],o=t[a];if(o){var s=e[a],c=void 0===s||o(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:i}},4867:(e,t,n)=>{"use strict";var r=n(1849),i=Object.prototype.toString;function a(e){return"[object Array]"===i.call(e)}function o(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==i.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===i.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",o=i.asyncIterator||"@@asyncIterator",s=i.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 u(e,t,n,r){var i=t&&t.prototype instanceof E?t:E,a=Object.create(i.prototype),o=new b(r||[]);return a._invoke=function(e,t,n){var r=d;return function(i,a){if(r===p)throw new Error("Generator is already running");if(r===h){if("throw"===i)throw a;return y()}for(n.method=i,n.arg=a;;){var o=n.delegate;if(o){var s=I(o,n);if(s){if(s===A)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=p;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?h:f,c.arg===A)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=h,n.method="throw",n.arg=c.arg)}}}(e,n,o),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",f="suspendedYield",p="executing",h="completed",A={};function E(){}function w(){}function g(){}var m={};c(m,a,(function(){return this}));var N=Object.getPrototypeOf,S=N&&N(N(L([])));S&&S!==n&&r.call(S,a)&&(m=S);var v=g.prototype=E.prototype=Object.create(m);function T(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function R(e,t){function n(i,a,o,s){var c=l(e[i],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,o,s)}),(function(e){n("throw",e,o,s)})):t.resolve(d).then((function(e){u.value=e,o(u)}),(function(e){return n("throw",e,o,s)}))}s(c.arg)}var i;this._invoke=function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}}function I(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,I(e,n),"throw"===n.method))return A;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return A}var i=l(r,e.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,A;var a=i.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,A):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,A)}function C(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function b(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,o=function n(){for(;++i=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(c&&u){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&r.call(i,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),A}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;O(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:L(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),A}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,i,a,o){try{var s=e[a](o),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,i)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(i,a){var o=t.apply(n,r);function s(t){e(o,i,a,s,c,"next",t)}function c(t){e(o,i,a,s,c,"throw",t)}s(void 0)}))}}var r=n(7757),i=n.n(r);function a(e){return(a="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)}window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const o={debug:!!window.authentication_config.debug,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,enableReaderDashboardLink:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardLink,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,useTribMainGoogle:!!window.authentication_config&&"1"===window.authentication_config.useTribMainGoogle,isAdfreeArticle:!!window.authentication_config&&"1"===window.authentication_config.isAdfreeArticle,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.authentication_config?window.authentication_config.entitlementsEndpoint:"",entitlementsApiKey:window.authentication_config?window.authentication_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,serverEntitlements:!!window.authentication_config&&window.authentication_config.serverEntitlements,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled,bcLowaSegements:!!window.authentication_config.bcLowaSegements&&"1"===window.authentication_config.bcLowaSegements,blueconicEnabled:!!window.authentication_config.blueconicEnabled&&"1"===window.authentication_config.blueconicEnabled,datadogEnabled:!!window.authentication_config.enableDatadog&&"1"===window.authentication_config.enableDatadog};const s=function(){if(o.debug){for(var e,t=arguments.length,n=new Array(t),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*i&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return o};function p(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(f(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 f(t)}}function h(e){this.message=e}h.prototype=new Error,h.prototype.name="InvalidTokenError";const A=function(e,t){if("string"!=typeof e)throw new h("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(p(e.split(".")[n]))}catch(e){throw new h("Invalid token specified: "+e.message)}};var E=n(9669),w=n.n(E);const g="auth0_sub",m="mng-entitlements",N="__MNG_Session",S="regwallUserIsSubscribed",v="entitled";var T=function(){var e=window.location.href;return new URL(e)},R=function(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=T(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var i=r.split(".");return"".concat(i[i.length-2],".").concat(i[i.length-1])},C=function(){var e=I();return".".concat(e)},O=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(s("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=l(e,2),n=t[0],i=t[1];if("expires"===n){var a=new Date;a.setTime(a.getTime()+24*i*60*60*1e3),r+="expires=".concat(a.toUTCString(),";")}else r+="".concat(n,"=").concat(i,";")}))):r+="path=/;",document.cookie=r},b=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),i=I(),a="www".concat(i),o=".www".concat(i),s=[i,a,o];n&&s.push(n),Object.entries(t).forEach((function(e){var t=l(e,2),n=t[0],i=t[1];r+="".concat(n,"=").concat(i,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},L=function(e){return A(e)},y=function(){var e=t(i().mark((function e(t){var n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=I().split(".")[0],e.prev=1,e.next=4,w()({method:"get",url:"".concat(o.entitlementsEndpoint,"apple/subscription-check/").concat(n),params:{access_token:t}});case 4:if(!(r=e.sent).data){e.next=8;break}return s("Apple Sub Check: Request successful: ",r.data),e.abrupt("return","subscribed"===r.data.status);case 8:return e.abrupt("return",!1);case 11:return e.prev=11,e.t0=e.catch(1),s("Apple Sub Check: Request Failure: ",e.t0),e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=t(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w()({method:"get",url:"".concat(o.entitlementsEndpoint,"auth0/users/").concat(encodeURIComponent(t)),headers:{"X-Api-Key":o.entitlementsApiKey}});case 2:return n=e.sent,e.abrupt("return",n.data.encryptedUuid);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(e){var t={};if("string"==typeof e&&""!==e){var n=L(e);t={sub:n.sub,email_verified:n.email_verified}}return s("Utils: createTokenData: create entitlement token with these: ",t),t},P=function(){return"complete"===document.readyState},M=function(){var e=t(i().mark((function e(n){var r,a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){if(("interactive"===document.readyState||P())&&window.dataLayer)s("Utils digisubsDataLayerLoaded: ","Document is in interactive state, resolving."),e();else{s("Utils digisubsDataLayerLoaded: ","Waiting for the dataLayer to load...");var n=setInterval(t(i().mark((function t(){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.dataLayer&&window.dataLayer.length>2&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),50)}}));case 2:if(s("Utils getDataLayerObject: looking for this dataLayer object ",n),window.dataLayer=window.dataLayer||[],r="",s("Utils getDataLayerObject: here is dataLayer length ",dataLayer.length),a=function(e){return s("Utils dataLayerLoop: look for this element ",e),e[n]?(s("Utils dataLayerLoop: found ",e[n]),r=e[n],e[n]):(s("Utils dataLayerLoop: dataLayer search ",!1),!1)},!dataLayer.some(a)){e.next=10;break}return e.abrupt("return",r);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),B=function(){var e=t(i().mark((function e(){var t,n,r=arguments;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"Page Type",e.next=3,M(t);case 3:return n=e.sent,s("utils.js | pageType: page type is ",n),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),U=function(){return new Promise((function(e){s("blueConicReady | Waiting for BC to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},(function(){s("blueConicReady | onReady fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),s("blueConicReady | onReady timeout, BC onReady unknown."),e(!1)}),3e3)}))},G=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){if(s("blueConicLoaded | waitTillBCReady is ".concat(e)),void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe)s("blueConicLoaded | BC object already loaded"),e&&n(U()),n();else{s('blueConicLoaded | BC not loaded, waiting for "onBlueConicLoaded" event'),window.addEventListener("onBlueConicLoaded",t(i().mark((function t(){var r;return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s("blueConicLoaded | onBlueConicLoaded event fired."),!e){t.next=9;break}return s("blueConicLoaded | waiting for blueConicReady..."),t.next=5,U();case 5:r=t.sent,n(r),t.next=10;break;case 9:n();case 10:case"end":return t.stop()}}),t)}))),!1);var r=setTimeout((function(){clearTimeout(r),s("blueConicLoaded | onBlueConicLoaded timeout, resolving false for load status."),n(!1)}),1e4)}}))},D=function(){var e=t(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G(!0);case 2:if(!e.sent){e.next=10;break}return e.next=6,new Promise((function(e){s("blueConicProfileReady | Waiting for BC Profile to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onBeforeInteractions,{},(function(){s("blueConicProfileReady | onBeforeInteractions fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),s("blueConicProfileReady | onBeforeInteractions timeout, BC profile readiness unknown"),e(!1)}),3e3)}));case 6:if(e.sent){e.next=9;break}return e.abrupt("return",!1);case 9:return e.abrupt("return",blueConicClient.profile.getProfile().getValue("Auth0_ID"));case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){var e=t(i().mark((function e(){var t,n,r;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["MNG Subs","DENV/PMP Subscribers","SCNG Subs","BANG Subs"],e.next=3,G(!0);case 3:if(!e.sent){e.next=15;break}if(n=window.blueConicClient.getSegments(),s("bcLowaCheck | BC segments for users: ",n),!(n.filter((function(e){return t.includes(e.name)})).length>0)){e.next=15;break}return e.next=11,D();case 11:if(!(r=e.sent)){e.next=14;break}return e.abrupt("return",{isSub:!0,uuid:r});case 14:case 15:return e.abrupt("return",{isSub:!1});case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),F=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(s("utils.js | Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(s("utils.js | Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};s("utils.js | Event: authentication ready: ",r),e(r)}catch(e){s(e),t(e)}}),!1))}))},H=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"onFinish";return new Promise((function(t){var n=setTimeout((function(){"undefined"!=typeof Connext?(s("Connext actually did load..."),clearTimeout(n),t(!0)):(s("Connext did not load in time. Resolving false..."),clearTimeout(n),t(!1))}),6e3);"undefined"!=typeof Connext?(s("Connext already ready."),clearTimeout(n),t(!0)):(s("Listening for Connext Ready event..."),document.addEventListener("string"==typeof e?e:"onFinish",(function(){clearTimeout(n),s("Connext loaded!"),t(!0)})))}))},_=function(){s("Clearing entitlements...");try{b(m,{path:"/"})}catch(e){s("Failed to delete legacy cookie: ",e)}try{b(m,{path:"/",domain:I(),expires:365,secure:!0})}catch(e){s("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(N)}catch(e){s("Failed to remove local storage: ",e)}},K=function(){b(g),_()},Y=function(){var e=T();return!["local","develop","preprod","trbdev"].some((function(t){return e.origin.includes(t)}))},V=function(e){s("Removing storageObject : ",e),void 0!==window.localStorage.getItem(e)&&(window.localStorage.removeItem(e),s("Storage Object removed : ",e))},W=function(e){s("starting simpleEmailValidation");var t=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,}))$/i);if(!e)return{valid:!1,message:"Please enter an email."};if(!t.test(e))return{valid:!1,message:"Please enter a valid email."};var n=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),r=["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CBS","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CITYEATS","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOKINGCHANNEL","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","ETISALAT","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIAT","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOODNETWORK","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTDOOR","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HGTV","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELES","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDER","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LANCIA","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINDE","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOFT","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MACYS","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MASERATI","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MUTUAL","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTHWESTERNMUTUAL","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLDNAVY","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PASSAGENS","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCHER","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCA","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SHOWTIME","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIFFANY","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELCHANNEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLKSWAGEN","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","VUELOS","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAKC7DVF","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"].includes(n);return s("simpleEmailValidation: ","TLD search ".concat(r)),!1===r?{valid:!1,message:"Please enter a valid email domain."}:-1===["zzz.pl"].findIndex((function(t){return t===e.split("@")[1]}))?{valid:!0,message:"Valid"}:{valid:!1,message:"Please enter a valid email."}};window.simpleEmailValidation=W;var j;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var J=function(){var e=t(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===j){e.next=2;break}return e.abrupt("return",j);case 2:return t=o.auth0Domain,n=o.auth0ClientId,e.next=5,createAuth0Client({domain:t,client_id:n,useRefreshTokens:!0,cacheLocation:"localstorage",audience:"access-extension"});case 5:return j=e.sent,e.abrupt("return",j);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Z=function(e){s("utils.js | auth event dispathed");var t=new CustomEvent("authenticationReady",{detail:e});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.authenticationReady=e,s("Utils.js | Dispatching authenticationReady Event: ",t),window.dispatchEvent(t),s("Utils.js | Dispatched authenticationReady event!")},Q=function(e){return new Promise((function(t){document.querySelector(e)&&t(document.querySelector(e));var n=new MutationObserver((function(){return document.querySelector(e)&&(t(document.querySelector(e)),n.disconnect()),!0}));n.observe(document.body,{childList:!0,subtree:!0})}))},q=function(){var e=t(i().mark((function e(t,n,r){var a;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,s("subscribeElementToEvent","Waiting for ".concat(t," to exist...")),e.next=4,Q(t);case 4:return a=e.sent,s("subscribeElementToEvent","".concat(t," does exist, adding listener.")),a.addEventListener(n,r),e.abrupt("return",!0);case 10:return e.prev=10,e.t0=e.catch(0),s("subscribeElementToEvent: ","".concat(e.t0)),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(t,n,r){return e.apply(this,arguments)}}(),z=function(){"undefined"==typeof Connext?document.addEventListener("onInit",(function(){Connext.Run()})):Connext.Run()},ee=function(e){o.datadogEnabled&&window.DD_RUM.addTiming(e)};var te=function(){try{var e=localStorage.getItem(N);return"string"==typeof e?e:"{}"}catch(e){s("Unable to get session from local storage: ",e)}return"{}"},ne=function(e){try{s("Setting local storage session",e),localStorage.setItem(N,e)}catch(e){s("Unable to save session from local storage: ",e)}},re=function(e){try{O(m,e,{path:"/",domain:C(),expires:365,secure:!0})}catch(e){s("Unable to save session to cookie storage: ",e)}},ie=function(){var e=t(i().mark((function e(){var t,n,r,a,c,u,l,d,f,p,h,A,E,g,m,N,S;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(o.sessionServer,"/api/session"),s("Checking server session: ",t),e.next=5,w().get(t,{withCredentials:!0});case 5:if(!(n=e.sent).data){e.next=17;break}return d=n.data.entitlementTokenDecoded,f=n.data,p=f.accessToken,h=f.idToken,A=f.entitlementToken,E=null!==(r=null==d?void 0:d.entitlement_expiry)&&void 0!==r?r:null,g=null!==(a=null==d?void 0:d.entitlement_source)&&void 0!==a?a:null,m=null!==(c=null==d?void 0:d.entitlement_entitled)&&void 0!==c?c:null,N=null!==(u=null==d?void 0:d.entitlement_extras_adfree)&&void 0!==u?u:null,S=null!==(l=null==d?void 0:d.entitlement_level)&&void 0!==l?l:null,ne(JSON.stringify({accessToken:p,idToken:h,entitlementToken:A,expiration:E,entitlementSource:g,isEntitled:m,adFree:N,entitlementLevel:S})),""!==A&&"string"==typeof A&&re(A),e.abrupt("return",{accessToken:p,idToken:h,entitlementToken:A,expiration:E,entitlementSource:g,isEntitled:m,adFree:N,entitlementLevel:S});case 17:return e.abrupt("return",{accessToken:null,idToken:null,entitlementToken:null,expiration:null,entitlementSource:null,isEntitled:null,adFree:null,entitlementLevel:null});case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=t(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="".concat(o.sessionServer,"/api/session"),s("Updating server session: ",n),e.next=6,w().post(n,t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),s("Failed to update session server: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=t(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t="".concat(o.sessionServer,"/api/session"),s("Deleting server session: ",t),e.next=6,w().delete(t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),s("Failed to delete server session: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),se=function(){var e=t(i().mark((function e(){var t,n,r,a,o,c,u,l,d,f,p,h,A,E,w,g,m,N,S,v,T,R,I,C,O,b,L;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Inside getSession"),e.prev=1,d=te(),s("Session: __MNG_Session = ",d),f=JSON.parse(d),p=f.accessToken,h=f.idToken,A=f.entitlementToken,E=f.expiration,w=f.entitlementSource,g=f.isEntitled,m=f.adFree,N=f.entitlementLevel,n=p,a=E,o=w,c=g,u=m,l=N,s("Session: check both tokens: ",t=h,r=A),void 0!==h&&void 0!==A&&null!==h&&null!==A){e.next=35;break}return s("Session: missing id or entitlements, try session server"),e.next=18,ie();case 18:S=e.sent,v=S.accessToken,T=S.idToken,R=S.entitlementToken,I=S.expiration,C=S.entitlementSource,O=S.isEntitled,b=S.adFree,L=S.entitlementLevel,n=v,t=T,r=R,a=I,o=C,c=O,u=b,l=L;case 35:e.next=40;break;case 37:e.prev=37,e.t0=e.catch(1),s("Failed to get session: ",e.t0);case 40:return s("Returning session: ",t,n,r),e.abrupt("return",{accessToken:n,idToken:t,entitlementToken:r,expiration:a,entitlementSource:o,isEntitled:c,adFree:u,entitlementLevel:l});case 42:case"end":return e.stop()}}),e,null,[[1,37]])})));return function(){return e.apply(this,arguments)}}(),ce=function(){var e=t(i().mark((function e(t){var n,r,a,c,u,l,d,f,p,h,A,E,w,g,m,N,S,v,R,I,C,O,b,L,y,x,k,P,M;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=te(),r=JSON.parse(n),a=r.accessToken,c=void 0===a?null:a,u=r.idToken,l=void 0===u?null:u,d=r.entitlementToken,f=void 0===d?null:d,p=r.expiration,h=void 0===p?null:p,A=r.entitlementSource,E=void 0===A?null:A,w=r.isEntitled,g=void 0===w?null:w,m=r.adFree,N=void 0===m?null:m,S=r.entitlementLevel,v=void 0===S?null:S,R=t.accessToken,I=t.idToken,C=t.entitlementToken,O=t.expiration,b=t.entitlementSource,L=t.isEntitled,y=t.adFree,x=t.entitlementLevel,k={accessToken:null==R?c:R,idToken:null==I?l:I,entitlementToken:null==C?f:C,expiration:null==O?h:O,entitlementSource:null==b?E:b,isEntitled:null==L?g:L,adFree:null==y?N:y,entitlementLevel:null==x?v:x},s("Current session data: ",r),s("New session data: ",t),s("Updated session data:",k),P=JSON.stringify(k),ne(P),""!==k.entitlementToken&&"string"==typeof k.entitlementToken&&re(k.entitlementToken),n===P){e.next=17;break}return e.next=15,ae(k);case 15:M=T(),!o.serverEntitlements||!o.bcLowaSegements||M.pathname.startsWith("/callback")||M.pathname.startsWith("/user-tools")||f||(s("Finished updating sesssion, about to reload to refresh entitlement cookie for server."),window.location.reload());case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(0),s("Unable to save session: ",e.t0);case 22:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=t(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s("Ending session..."),K(),e.next=4,oe();case 4:localStorage.removeItem(N);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=window.localStorage.getItem(N);return JSON.parse(e)},de=function(){var e=t(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!window.authentication_config.sessionManagementEnabled){e.next=5;break}return e.next=3,se();case 3:return t=e.sent,e.abrupt("return",t);case 5:return n=le(),e.abrupt("return",n);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),fe=function(e){O(m,e,{path:"/",domain:C(),expires:365,secure:!0})},pe=function(){var e=t(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,fe(t),s("About to decode token before saving: ",t),n=L(t),!window.authentication_config.sessionManagementEnabled){e.next=9;break}return e.next=7,ce({entitlementToken:t,expiration:n.entitlement_expiry,entitlementSource:n.entitlement_source,isEntitled:n.entitlement_entitled,adFree:n.entitlement_extras_adfree||!1,entitlementLevel:n.entitlement_level});case 7:e.next=10;break;case 9:window.localStorage.setItem(N,JSON.stringify({entitlementToken:t,expiration:n.entitlement_expiry,entitlementSource:n.entitlement_source,isEntitled:n.entitlement_entitled,adFree:n.entitlement_extras_adfree||!1,entitlementLevel:n.entitlement_level}));case 10:e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),s("Entitlements: Failed to save token: ",e.t0);case 15:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t){return e.apply(this,arguments)}}(),he=function(){var e=t(i().mark((function e(n){var r,a,c,u,l,d,f;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=!1,!window.authentication_config.sessionManagementEnabled){e.next=8;break}return e.next=4,se();case 4:"string"==typeof(a=e.sent).idToken&&""!==a.idToken&&(c=L(a.idToken),r=void 0!==c&&c.email_verified),e.next=13;break;case 8:return e.next=10,F();case 10:u=e.sent,(l=u.idToken)&&""!==l&&(r=L(l).email_verified);case 13:if(s("Entitlements: refresh JWT start..."),n){e.next=16;break}return e.abrupt("return",new Error("No token to refresh"));case 16:return s("Entitlements refresh: entitlement token: ",n),s("Entitlements refresh: auth0 verified: ",r),d={jwt:n,verified:r},f="".concat(o.entitlementsEndpoint,"session/refresh"),e.abrupt("return",new Promise((function(e){var n,r;$.ajax({type:"POST",url:f,headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Api-Key":o.entitlementsApiKey},data:JSON.stringify(d),success:(r=t(i().mark((function t(n){return i().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("string"==typeof n.jwt){t.next=2;break}return t.abrupt("return",new Error("Entitlements API returned no JWT"));case 2:return s("Entitlements: Request successful: ",n),t.next=5,pe(n.jwt);case 5:return t.abrupt("return",e(n.jwt));case 6:case"end":return t.stop()}}),t)}))),function(e){return r.apply(this,arguments)}),error:(n=t(i().mark((function e(t,n,r){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Entitlements: Request Failure: ",r),_(),!window.authentication_config.sessionManagementEnabled){e.next=5;break}return e.next=5,ce({entitlementToken:null});case 5:return e.abrupt("return",new Error("Entitlements Refresh failure"));case 6:case"end":return e.stop()}}),e)}))),function(e,t,r){return n.apply(this,arguments)})})})));case 21:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ae=function(e){return new Promise((function(n,r){if(s("Entitlements: create token start..."),s("Entitlements: createToken payload with ",e),"object"!==a(e)&&"string"!=typeof e.sub)return r(new Error("No user info to create token"));var c,u=I();if(e.sub&&(c=e.sub),!c)throw new Error("No uuid provided.");var l,d={uuid:c,email:e.email,verified:e.email_verified,publication:u.replace(".local",".com"),requestSource:"website"},f="".concat(o.entitlementsEndpoint,"session/create");return s("Entitlements: create payload",d),$.ajax({type:"POST",url:f,headers:{Accept:"application/json","Content-Type":"application/json; charset=utf-8","X-Api-Key":o.entitlementsApiKey},data:JSON.stringify(d),success:(l=t(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("string"==typeof t.jwt){e.next=2;break}return e.abrupt("return",r(new Error("Entitlements | API returned no JWT")));case 2:return s("Entitlements: Token Created: ",t),e.next=5,pe(t.jwt);case 5:return e.abrupt("return",n(t.jwt));case 6:case"end":return e.stop()}}),e)}))),function(e){return l.apply(this,arguments)}),error:function(e,t,n){s("Entitlements: Create Token Failure: ",t,n),r(new Error("Entitlements: Create Token Failure"))}})}))},Ee=function(){var e=t(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,de();case 3:if((t=e.sent)&&t.entitlementToken){e.next=6;break}return e.abrupt("return",!1);case 6:if(!((n=Date.now()/1e3) ").concat(t.expiration)),e.abrupt("return",he(t.entitlementToken));case 13:return e.prev=13,e.t0=e.catch(0),s("Entitlements: Local Storage: Error processing token: ",e.t0.message),e.abrupt("return",!1);case 17:case"end":return e.stop()}}),e,null,[[0,13]])})));return function(){return e.apply(this,arguments)}}(),we=function(){var e=t(i().mark((function e(){var t;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=R(m)){e.next=4;break}return e.abrupt("return",!1);case 4:return s("checkCookiesForToken, Refreshing token, ".concat(t)),e.next=7,he(t);case 7:return e.abrupt("return",e.sent);case 10:return e.prev=10,e.t0=e.catch(0),s("Entitlements: Cookie: Error processing token: ",e.t0.message),e.abrupt("return",!1);case 14:case"end":return e.stop()}}),e,null,[[0,10]])})));return function(){return e.apply(this,arguments)}}(),ge=function(e){s("Attempting to broadcast entitlements ready...",e);try{var t={token:e};if(e){s("About to decode token before broadcasting: ",e);var n=L(e);t=Object.assign(t,{isEntitled:n.entitlement_entitled,adfree:n.entitlement_extras_adfree||!1,subscriptionLevel:n.entitlement_level})}var r=new CustomEvent("entitlementsReady",{detail:t});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=t,s("Dispatching entitlementsReady Event: ",r),window.dispatchEvent(r),s("Dispatched entitlementsReady event"),ee("entitlementsReady")}catch(e){var i={token:""};i=Object.assign(i,{isEntitled:"unknown",adfree:"unknown",subscriptionLevel:"unknown"});var a=new CustomEvent("entitlementsReady",{detail:i});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=i,s("Dispatching entitlementsReady EMPTY Event: ",a),window.dispatchEvent(a),s("Dispatched entitlementsReady EMPTY event"),s("Error: ",e)}},me=function(){var e=t(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n=k(t),e.next=4,Ae(n);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),s("Entitlements error during oidc login callback: ",e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),Ne=function(e){var t=e.searchParams.get("entitlement_jwt");s("Webview JWT param provided: ",t),fe(t);var n=L(t);window.localStorage.setItem(N,JSON.stringify({entitlementToken:t,expiration:n.entitlement_expiry,entitlementSource:n.entitlement_source,isEntitled:n.entitlement_entitled,adFree:n.entitlement_extras_adfree||!1,entitlementLevel:n.entitlement_level}))},Se=function(){var e=t(i().mark((function e(){var t,n,r,a,o,c,u,l;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,t=window.localStorage.getItem(S),n=R(g),r=T(),s("loggedOutNewSubscriberActions","Checking if this is a new regwall subscriber"),"false"!==t||!r.searchParams.has("newUser")||!n){e.next=18;break}return a=!1,o={sub:n,email_verified:!0},e.next=10,Ae(o);case 10:if((c=e.sent)&&""!==c&&(u=L(c),l=u.entitlement_entitled,a=l),s("loggedOutNewSubscriberActions","New regwall user is entitled: ".concat(a)),!a){e.next=17;break}return window.localStorage.setItem(S,"true"),z(),e.abrupt("return",!0);case 17:case 18:return e.abrupt("return",!1);case 21:return e.prev=21,e.t0=e.catch(0),s("loggedOutNewSubscriberActions error",e.t0),e.abrupt("return",!1);case 25:case"end":return e.stop()}}),e,null,[[0,21]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.isUserAdFree=function(){var e=JSON.parse(window.localStorage.getItem(N));return null!=e?(s("Ad Free Check: : ",e.adFree),e.idToken&&e.adFree||o.isAdfreeArticle):o.isAdfreeArticle},window.MNGAuthentication.isUserSubscriber=function(){var e=JSON.parse(window.localStorage.getItem(N));return null!=e&&(s("Subscriber Check: : ",e.isEntitled),e.isEntitled)};const ve={init:function(){var e=t(i().mark((function e(){var t,n,r,a,c,u,l,d,f,p,h,A,E,w,g,m,N,S;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!o.entitlementsEnabled){e.next=123;break}return e.next=3,Se();case 3:if(!e.sent){e.next=6;break}return e.abrupt("return",ge(!1));case 6:return t=window.location,n=new URL(t.href),e.next=10,F();case 10:if(r=e.sent,a=r.idToken,c=r.accessToken,u=r.isAuthenticated,l=r.claims,void 0!==window.MNGAuthentication&&Array.isArray(window.MNGAuthentication.oidcLoginCallbacks)&&window.MNGAuthentication.oidcLoginCallbacks.push(me),e.prev=16,!n.searchParams.has("newUser")){e.next=29;break}if("string"!=typeof a||""===a){e.next=28;break}return f=k(a),e.next=22,Ae(f);case 22:if(!(d=e.sent)){e.next=26;break}return s("Entitlements Init: Created new token for new subscriber"),e.abrupt("return",ge(d));case 26:e.next=29;break;case 28:s("New subscription, no idToken.");case 29:e.next=34;break;case 31:e.prev=31,e.t0=e.catch(16),s("Not a new subscriber.");case 34:try{n.searchParams.has("entitlement_jwt")&&Ne(n)}catch(e){s("Error during webview JWT retrieval: ",e)}return e.prev=35,e.next=38,Ee();case 38:if(!((p=e.sent)instanceof Error)){e.next=41;break}throw p;case 41:p&&(d=p,s("Entitlements Init: Local Storage Token exists")),e.next=47;break;case 44:e.prev=44,e.t1=e.catch(35),s("Error during Local Storage Token check: ",e.t1);case 47:if(e.prev=47,d){e.next=55;break}return e.next=51,we();case 51:if(!((h=e.sent)instanceof Error)){e.next=54;break}throw h;case 54:h&&(d=h,s("Entitlements Init: Cookie Token exists"));case 55:e.next=60;break;case 57:e.prev=57,e.t2=e.catch(47),s("Error during Cookie Token check: ",e.t2);case 60:if(!u&&d&&(s("Entitled-only flow: User is not authenticated but entitlement token exists."),L(d).entitlement_entitled?(s("PageSuite flow: User is not authenticated but is subscriber. Access token is ".concat(c)),c?MNGAuthentication.login():s("PageSuite flow: No Access token.")):s("Entitled-only flow: User is not entitled.")),u){e.next=64;break}return s("User is not logged in, skipping entitlement flow."),e.abrupt("return",ge(!1));case 64:if(!o.bcLowaSegements||"entitled"!==u||d){e.next=77;break}return e.prev=65,s("About to check entitlements based on BC"),A={sub:l.sub},e.next=70,Ae(A);case 70:d=e.sent,!window.authentication_config.sessionManagementEnabled&&o.serverEntitlements&&d&&(s("Entitlements fetched, about to reload to refresh entitlement cookie for server."),window.location.reload()),e.next=77;break;case 74:e.prev=74,e.t3=e.catch(65),s("BC sub segment check failed: ",e.t3);case 77:if(e.prev=77,!d){e.next=101;break}if(!o.linaCheckOnArticles){e.next=100;break}if(E=L(d),w=E.entitlement_entitled,g=E.iat,s("LINA check: isEntitled: ".concat(w,", token created at: ").concat(g)),!(o.linaCheckOnArticles&&!w&&Date.now()/1e3-new Date(g)>45)){e.next=100;break}if(s("Checking entitlements again for LINA user."),""===a){e.next=99;break}return m=k(a),e.next=89,Ae(m);case 89:if(!(N=e.sent)){e.next=97;break}return s("Entitlements Init: Created new token for LINA user"),e.next=94,B();case 94:return"article"===e.sent&&z(),e.abrupt("return",ge(N));case 97:e.next=100;break;case 99:s("LINA check, no idToken.");case 100:return e.abrupt("return",ge(d));case 101:e.next=106;break;case 103:e.prev=103,e.t4=e.catch(77),s("LINA check error: ",e.t4);case 106:if(e.prev=106,"string"!=typeof a||""===a){e.next=117;break}return S=k(a),e.next=111,Ae(S);case 111:if(!(d=e.sent)){e.next=115;break}return s("Entitlements Init: Created new token"),e.abrupt("return",ge(d));case 115:e.next=118;break;case 117:s("No OIDC ID Token. Not creating a new entitlements token.");case 118:e.next=123;break;case 120:e.prev=120,e.t5=e.catch(106),s("Unable to create token during initialize: ",e.t5);case 123:return e.abrupt("return",ge(!1));case 124:case"end":return e.stop()}}),e,null,[[16,31],[35,44],[47,57],[65,74],[77,103],[106,120]])})));return function(){return e.apply(this,arguments)}}()};function Te(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){return function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||u(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.")}()}var Ie=function(){var e=t(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G();case 2:return e.next=4,F();case 4:return e.abrupt("return",new Promise((function(e){s("ANALYTICS: inside BCregwall events");var t=T();t.searchParams.delete("regwall");var n=blueConicClient.profile.getProfile();localStorage.setItem("regwallSuccess","yes"),localStorage.setItem("regwallEvent","yes"),n.setValue("bang_reg_wall_status","Y"),n.setValue("regwall_newspaper",t.host),n.setValue("regwall_success_date",new Date),n.setValue("regwall_success","yes"),blueConicClient.profile.updateProfile(),e(!0)})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ce=function(e){try{window.dataLayer.push({event:e}),s("ANALYTICS: ".concat(e," event")),s("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){s("ANALYTICS: Failed to send ".concat(e," event: "),t)}};var Oe=function(){return"logout"===(T().searchParams.get("state")||"").toLowerCase()};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.logoutCallbacks=[];var be=function(){var e=t(i().mark((function e(t){var n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,J();case 2:n=e.sent,s("Calling Auth0 logout..."),n.logout({returnTo:t});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Le=function(){s("Check for SS paywall Cookie");var e=window.location.hostname,t=document.cookie.split(";").find((function(e){return e.trim().startsWith("vip-go-seg=vc-v1__has_access")}));if(/^(?!:\/\/)([a-zA-Z0-9-_]{1,63}\.?)+[a-zA-Z]{2,6}$/.test(e)&&t){s("SS paywall Cookie found, removing it");var n=t.split("=")[0].trim();document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=").concat(e),document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}},ye=function(){var e=t(i().mark((function e(){var n,r,a,o,c;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(s("Attempting to logout..."),Le(),!window.authentication_config.sessionManagementEnabled){e.next=7;break}return e.next=5,ue();case 5:e.next=8;break;case 7:K();case 8:return e.prev=8,s("Cycling through logout callbacks..."),n=window.MNGAuthentication.logoutCallbacks.map((function(e){return e()})),e.next=13,Promise.all(n);case 13:s("Finished cycling through logout callbacks."),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),s("Failed to cycle through logout callbacks: ",e.t0);case 19:Object.keys(localStorage).filter((function(e){return e.includes("auth0")})).forEach((function(e){localStorage.removeItem(e),s("Removed Auth0 storage object...")})),V("hhsl"),V("userNewsLetterData"),V(S),r=T(),a=window.location.origin;try{r.searchParams.get("returnURL")&&(o=decodeURIComponent(r.searchParams.get("returnURL")),a=o)}catch(e){s(e),a=window.location.origin}return a=new URL(a),e.next=30,H();case 30:if(!e.sent){e.next=62;break}if(s("Auth | Silent mode enabled ",Connext.GetOptions().Silentmode),Connext.GetOptions().Silentmode&&(s("Auth | Run connext manually"),Connext.Run()),c=a,a.origin!==window.location.origin&&(c=new URL(window.location.origin)).searchParams.append("returnAfterLogout",a),window.history.replaceState({additionalInformation:"Updated the URL to prevent another login cycle"},"Home",c),!Y()){e.next=43;break}return s("About to call Connext Logout..."),e.next=41,Connext.Logout();case 41:e.next=60;break;case 43:if("Logged In"!==("undefined"==typeof CnnXt?(s("Connext was not loaded."),!1):Connext.Storage.GetUserState())){e.next=57;break}if(s("Connext user state is logged in, setting timeout..."),setTimeout(t(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s("Connext took too long to logout, calling auth0 logout..."),e.next=3,be(a);case 3:case"end":return e.stop()}}),e)}))),8e3),"function"!=typeof Connext._logout){e.next=52;break}return s("About to call Connext _logout..."),e.next=50,Connext._logout();case 50:e.next=55;break;case 52:return s("About to call Connext Logout..."),e.next=55,Connext.Logout();case 55:e.next=60;break;case 57:return s("Connext user state is logged out, not calling it, going to auth0 logout."),e.next=60,be(a);case 60:e.next=65;break;case 62:return s("Connext Logout was NOT called"),e.next=65,be(a);case 65:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=0;for(var t in localStorage){var n=2*localStorage[t].length/1024/1024;!Number.isNaN(n)&&localStorage.hasOwnProperty(t)&&(e+=n)}return e},ke=function(){var e=t(i().mark((function e(t,n,r,a,o){var c,u,l,d,f,p,h,A,E,w,g,m,N;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s("Attempting to login..."),xe()>4.5&&localStorage.clear(),window.MNGAuthentication.preAuthGTMEvents.forEach((function(e){return Ce(e)})),s("Cycled through preauth GTM events."),a&&(c=[],u=window.localStorage.getItem("callbackEvents"),l=JSON.parse(u),c=l&&l.length>0?Re(new Set([].concat(Re(a),Re(l)))):a,window.localStorage.setItem("callbackEvents",JSON.stringify(c))),d=null,e.next=7,J();case 7:if(f=e.sent,p=T(),h=p.origin,A=new URL("".concat(h,"/callback")),E={},p.searchParams.get("regwall")&&(p.searchParams.get("returnUrl")&&(w=p.searchParams.get("returnUrl")),p.searchParams.get("auth_redirect")&&(w=p.searchParams.get("auth_redirect"))),p.pathname.startsWith("/login")||p.pathname.startsWith("/callback")?p.searchParams.get("returnUrl")?A.searchParams.set("auth_redirect",p.searchParams.get("returnUrl")):o&&A.searchParams.set("auth_redirect",o):A.searchParams.set("auth_redirect",p.toString()),w&&"regwall"!==t&&A.searchParams.set("auth_redirect",w),"true"===p.searchParams.get("close-after-finish")&&A.searchParams.set("close-after-finish","true"),"true"!==p.searchParams.get("ssl")){e.next=23;break}if(!window.authentication_config.sessionManagementEnabled){e.next=22;break}return e.next=20,ue();case 20:e.next=23;break;case 22:K();case 23:return null!==(d=p.searchParams.get("login-with"))?E.connection=d:n&&(E.connection=n),g="none",t&&"regwall"===t&&(A.searchParams.set("regwall","true"),g="signUp",s("Logging in with regwall")),t&&(A.searchParams.set("loginsource",t),s("Logging in with ".concat(t))),r&&(E.login_hint=r),E.redirect_uri=A.toString(),E.initialScreen=g,"googleonetap"!==t&&(E.prompt="select_account"),null!==(m=p.searchParams.get("ampRegiWall"))&&(N=window.location.hostname,E.ampRegiWall=m,E.sourceDomain=N.replace("www.","").replace("preprod.","").replace("develop.",""),E.initialScreen="signUp",E.preferenceId=p.searchParams.get("prefId")),e.next=36,f.loginWithRedirect(E);case 36:case"end":return e.stop()}}),e)})));return function(t,n,r,i,a){return e.apply(this,arguments)}}(),Pe=function(){return new Promise((function(e){var t=setTimeout((function(){e()}),8e3);try{var n=window.localStorage.getItem("callbackEvents"),r=JSON.parse(n);r&&0!==r.length||e(),s("Adding listeners to events we need to wait for...");var i=r.map((function(e){return t=e,new Promise((function(e){s("Adding event to wait for: ",t),window.addEventListener(t,(function(n){try{var r=n.detail||{};s("Event: ".concat(t,"} ready: "),r),e(r)}catch(t){s(t),e()}}),!1)}));var t}));Promise.all(i).then((function(){clearTimeout(t),e()}))}catch(t){s("Failed to wait for callback events",t),e()}}))};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.oidcLoginCallbacks=[];var Me=function(){var e=t(i().mark((function e(){var n,r,a,o,c,u,l,d,f,p,h,A,E,w,g,m,N,v,R;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Le(),n=T(),r=!1,a=n.searchParams.get("auth_redirect")||"https://".concat(window.location.host),o=n.searchParams.get("redirect_uri")||"",o.includes("applenews")?(s("This is Apple prelogin flow."),(c=new URL(o))?(c.searchParams.append("post-apple-login","true"),s("Post callback Apple redirect URL is ".concat(c)),ke(!1,!1,!1,[],c)):ke()):a.includes("post-apple-login")&&(s("This is Apple Callback flow."),r=!0,(u=new URL(decodeURIComponent(a))).searchParams.delete("post-apple-login"),a=u),s("Handling post login callback..."),!(l=n.searchParams.get("error_description"))){e.next=13;break}if("shouldAutoLogin"!==l){e.next=12;break}return e.abrupt("return",ke(!1,!1,!1,!1,a));case 12:r&&alert("There was an error in logging you in, please try again.");case 13:return e.next=15,J();case 15:return d=e.sent,e.next=18,d.handleRedirectCallback();case 18:return e.next=20,d.getIdTokenClaims();case 20:return f=e.sent,e.next=23,d.getUser();case 23:return p=e.sent,s("Auth0 user profile: ",p),h=f.__raw,e.next=28,d.getTokenSilently();case 28:return A=e.sent,e.prev=29,s("Cycling through login callbacks..."),e.next=33,Pe();case 33:return E=window.MNGAuthentication.oidcLoginCallbacks.map(function(){var e=t(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(h));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=36,Promise.all(E);case 36:s("Finished cycling through login callbacks."),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(29),s("Failed to cycle through login callbacks: ",e.t0);case 42:if(w={accessToken:A,userId:p.sub,email:p.email,picture:p.picture},g=!1,m="",!r){e.next=61;break}return e.prev=46,e.next=49,x(w.userId);case 49:return m=e.sent,s("Encrypted apple uuid is: ".concat(m)),e.next=53,y(m);case 53:g=e.sent,s("Apple sub status is: ".concat(g)),e.next=61;break;case 57:e.prev=57,e.t1=e.catch(46),s("Apple sub check error: ".concat(e.t1)),alert("There was an error in logging you in, please try again.");case 61:if(V(S),!window.authentication_config.sessionManagementEnabled){e.next=66;break}return s("Saving idToken to session server"),e.next=66,ce({idToken:h,accessToken:A});case 66:if(!n.searchParams.get("close-after-finish")){e.next=68;break}return e.abrupt("return",window.close());case 68:if(!n.search.includes("loginsource")){e.next=73;break}return N=n.searchParams.get("loginsource"),v=window.MNGAuthentication.postAuthEvents.map(function(){var e=t(i().mark((function e(t){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(N));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=73,Promise.all(v);case 73:return e.prev=73,R=new URL(a),r&&g&&R.searchParams.append("access_token",encodeURIComponent(m)),s("Apple redirect URL:",R),e.abrupt("return",window.location.assign(R));case 80:e.prev=80,e.t2=e.catch(73),s("Failed to redirect after authentication: ",e.t2);case 83:return window.location.assign(new URL(window.location.origin)),e.abrupt("return","Finished execution, please await result...");case 85:case"end":return e.stop()}}),e,null,[[29,39],[46,57],[73,80]])})));return function(){return e.apply(this,arguments)}}(),Be=function(){var e=t(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s("ANALYTICS: fireBC events"),e.next=3,Ie();case 3:s("ANALYTICS: bc values should be filled");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ue=function(){var e=t(i().mark((function e(){var t,n,r,a,o,c,u,l,d;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,F();case 2:if(t=e.sent,n=t.idToken,r=t.isAuthenticated,""===n){e.next=17;break}return e.prev=6,a=L(n),o=a.email,c=a.picture,u=a.sub,(l=u.split("|")).pop(),d=l.join("|"),e.abrupt("return",{authenticated:r,email:o,picture:c,userId:u,connectionSource:d});case 14:e.prev=14,e.t0=e.catch(6),s("Unable to parse idToken: ",n," Error: ",e.t0);case 17:return e.abrupt("return",{authenticated:r});case 18:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.login=ke,window.MNGAuthentication.logout=ye,window.MNGAuthentication.getUserInfo=Ue;var Ge=function(){var e=t(i().mark((function e(){var n,r,c,u,l,d,f,p,h,A,E,w;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=T(),r=!1,c="",u=!1,l={},n.searchParams.get("returnAfterLogout")&&(d=decodeURIComponent(n.searchParams.get("returnAfterLogout")),window.location.assign(d)),n.searchParams.has("entitlement_jwt")&&(window.authentication_config.sessionManagementEnabled=!1),f=function(){var e=t(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,J();case 3:return t=e.sent,e.next=6,t.getIdTokenClaims();case 6:return l=e.sent,e.next=9,t.isAuthenticated();case 9:if(r=e.sent,c="object"===a(l)?l.__raw:"",n=R(m),r||!n){e.next=16;break}return e.next=15,t.getTokenSilently();case 15:u=e.sent;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),s("Unable to verify user has active auth0 session: ",e.t0);case 21:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),!n.pathname.startsWith("/logout")){e.next=13;break}return s("Page is logout. Routing to logout function..."),e.next=12,ye();case 12:return e.abrupt("return");case 13:if(!window.authentication_config.sessionManagementEnabled){e.next=39;break}return e.next=16,f();case 16:if(""===c){e.next=25;break}if(p=null,h=JSON.parse(window.localStorage.getItem(N)),"{}"!==te()){e.next=23;break}return h&&(p=h.jwt),e.next=23,ce({idToken:c,entitlementToken:p});case 23:e.next=37;break;case 25:return e.prev=25,e.next=28,se();case 28:A=e.sent,c=A.idToken,(r="string"==typeof c)&&(l=L(c)),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(25),s("Unable to initialize session: ",e.t0);case 37:e.next=41;break;case 39:return e.next=41,f();case 41:if(r||u||!o.blueconicEnabled||!o.bcLowaSegements){e.next=46;break}return e.next=44,X();case 44:(E=e.sent).isSub&&(r=v,l={sub:E.uuid});case 46:if(Z({isAuthenticated:r,idToken:c,accessToken:u,claims:l}),ee("authenticationReady"),!0===r?(s("User is authenticated."),n.searchParams.get("auth_redirect")&&(s("Auth Redirect is present, sending user to auth redirect..."),(w=n.searchParams.get("auth_redirect")).endsWith("#")&&(w=w.slice(0,w.length)),window.location.assign(w)),n.pathname.startsWith("/login")&&!Oe()&&(s("Page is login. The user is already logged in and Connext Logout param is not present... Redirecting..."),window.location.assign(n.origin))):s("User is not authenticated."),n.pathname.startsWith("/login")&&!Oe()?(s("Page is login. Attempting to log user in..."),ke()):s("Page is not login or Connext state is present"),!n.pathname.startsWith("/callback")||!n.searchParams.get("regwall")){e.next=59;break}return s("Page is callback with regwall param. Routing to regwall receiver..."),e.next=55,Be();case 55:s("Now login from regwall"),ke(),e.next=63;break;case 59:if(!n.pathname.startsWith("/callback")){e.next=63;break}return s("Page is callback without regwall param. Routing to callback receiver..."),e.next=63,Me();case 63:case"end":return e.stop()}}),e,null,[[25,34]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.init=Ge;var De=function(e,t){return new Promise((function(n){try{"undefined"==typeof CnnXt&&(s("Connext was not loaded."),n(!1)),s("connext subscribeToNewsletter","about to call Cnnxt NewsletterSubscribe with pref id ".concat(t," and email ").concat(e)),CnnXt.API.NewsletterSubscribe({email:e,id:t,onSuccess:function(){s("Signed user up to newsletter: ",t),n(!0)},onError:function(e){s("subscribeToNewsletter error: ",e),n(!1)}})}catch(e){s("subscribeToNewsletter Error:",e),n(!1)}}))},Xe=function(e){try{"string"==typeof e&&O(g,e,{domain:C(),path:"/",expires:365,secure:!0})}catch(e){s("Failed to set auth0_sub cookie: ",e)}},Fe=function(e){if(!R(g))try{var t=e.claims;if(null==t||"object"!==a(t)&&!Object.keys(t).includes("sub"))return;var n=t.sub;Xe(n)}catch(e){s("Failed to set auth0_sub: ",e)}};function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _e(e){for(var t=1;t0&&!1===r.exist)){e.next=16;break}return s("Regwall Validate: ","validation good, success message"),e.next=12,De(r.email,n);case 12:e.sent?(s("Regwall Validate: ","newsletter subscription was successful."),je().sendEmail&&(window.localStorage.setItem(S,"false"),(a={claims:{}}).claims.sub=r.uuid,Fe(a),s("Regwall Validate: ","Set the ".concat(S," storage object."))),We(!0)):(s("Regwall Validate: ","newsletter subscription was a FAIL."),Ve({valid:!1,message:"Newsletter subscription failed."})),e.next=17;break;case 16:r.valid&&n.length>0&&!0===r.exist?(s("Regwall Validate: ","validation failed, email already exists"),We(!1),Ye("Email already exists, try again.",!0)):0===n.length&&(s("Regwall Validate: ","validation failed, no newsletter code"),Ye("Newsletter field is empty",!0));case 17:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function Qe(){Ve({valid:!0})}var qe=function(){var e=t(i().mark((function e(){var t,n;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return t=e.sent,s("Regwall Validate: ","Page type is ",t),e.next=6,MNGAuthentication.getUserInfo();case 6:if(n=e.sent,"article"===t&&!n.authenticated){e.next=10;break}return s("Regwall Validate: ","Returning, since page type was not article or user was logged in"),e.abrupt("return");case 10:s("Regwall Validate: ","Starting regwall validation code, adding listeners."),q("#tribRegiwallSubButtonId","click",Ze),q(".connext-trib-email-input","input",Qe),q("#regiwallSubButtonId","click",Ze),q(".connext-email-input","input",Qe),document.addEventListener("keyup",(function(e){"Enter"!==e.code||"tribRegiwallEmailId"!==document.activeElement.id&&"regiwallEmailId"!==document.activeElement.id||Ze(e)}));case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(function(){var e=t(i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return qe(),e.next=3,ve.init();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()})()})(); //# sourceMappingURL=mng-digisubs.entitlements.bundle.js.map; (()=>{var e={7757:(e,t,n)=>{e.exports=n(5666)},9669:(e,t,n)=>{e.exports=n(1609)},5448:(e,t,n)=>{"use strict";var r=n(4867),o=n(6026),a=n(4372),i=n(5327),s=n(4097),c=n(4109),u=n(7985),l=n(5061),d=n(5655),p=n(5263);e.exports=function(e){return new Promise((function(t,n){var f,m=e.data,h=e.headers,g=e.responseType;function E(){e.cancelToken&&e.cancelToken.unsubscribe(f),e.signal&&e.signal.removeEventListener("abort",f)}r.isFormData(m)&&delete h["Content-Type"];var A=new XMLHttpRequest;if(e.auth){var w=e.auth.username||"",v=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";h.Authorization="Basic "+btoa(w+":"+v)}var S=s(e.baseURL,e.url);function y(){if(A){var r="getAllResponseHeaders"in A?c(A.getAllResponseHeaders()):null,a={data:g&&"text"!==g&&"json"!==g?A.response:A.responseText,status:A.status,statusText:A.statusText,headers:r,config:e,request:A};o((function(e){t(e),E()}),(function(e){n(e),E()}),a),A=null}}if(A.open(e.method.toUpperCase(),i(S,e.params,e.paramsSerializer),!0),A.timeout=e.timeout,"onloadend"in A?A.onloadend=y:A.onreadystatechange=function(){A&&4===A.readyState&&(0!==A.status||A.responseURL&&0===A.responseURL.indexOf("file:"))&&setTimeout(y)},A.onabort=function(){A&&(n(l("Request aborted",e,"ECONNABORTED",A)),A=null)},A.onerror=function(){n(l("Network Error",e,null,A)),A=null},A.ontimeout=function(){var t=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",r=e.transitional||d.transitional;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(l(t,e,r.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",A)),A=null},r.isStandardBrowserEnv()){var N=(e.withCredentials||u(S))&&e.xsrfCookieName?a.read(e.xsrfCookieName):void 0;N&&(h[e.xsrfHeaderName]=N)}"setRequestHeader"in A&&r.forEach(h,(function(e,t){void 0===m&&"content-type"===t.toLowerCase()?delete h[t]:A.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(A.withCredentials=!!e.withCredentials),g&&"json"!==g&&(A.responseType=e.responseType),"function"==typeof e.onDownloadProgress&&A.addEventListener("progress",e.onDownloadProgress),"function"==typeof e.onUploadProgress&&A.upload&&A.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(f=function(e){A&&(n(!e||e&&e.type?new p("canceled"):e),A.abort(),A=null)},e.cancelToken&&e.cancelToken.subscribe(f),e.signal&&(e.signal.aborted?f():e.signal.addEventListener("abort",f))),m||(m=null),A.send(m)}))}},1609:(e,t,n)=>{"use strict";var r=n(4867),o=n(1849),a=n(321),i=n(7185);var s=function e(t){var n=new a(t),s=o(a.prototype.request,n);return r.extend(s,a.prototype,n),r.extend(s,n),s.create=function(n){return e(i(t,n))},s}(n(5655));s.Axios=a,s.Cancel=n(5263),s.CancelToken=n(4972),s.isCancel=n(6502),s.VERSION=n(7288).version,s.all=function(e){return Promise.all(e)},s.spread=n(8713),s.isAxiosError=n(6268),e.exports=s,e.exports.default=s},5263:e=>{"use strict";function t(e){this.message=e}t.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")},t.prototype.__CANCEL__=!0,e.exports=t},4972:(e,t,n)=>{"use strict";var r=n(5263);function o(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t{"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},321:(e,t,n)=>{"use strict";var r=n(4867),o=n(5327),a=n(782),i=n(3572),s=n(7185),c=n(4875),u=c.validators;function l(e){this.defaults=e,this.interceptors={request:new a,response:new a}}l.prototype.request=function(e){"string"==typeof e?(e=arguments[1]||{}).url=arguments[0]:e=e||{},(e=s(this.defaults,e)).method?e.method=e.method.toLowerCase():this.defaults.method?e.method=this.defaults.method.toLowerCase():e.method="get";var t=e.transitional;void 0!==t&&c.assertOptions(t,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var n=[],r=!0;this.interceptors.request.forEach((function(t){"function"==typeof t.runWhen&&!1===t.runWhen(e)||(r=r&&t.synchronous,n.unshift(t.fulfilled,t.rejected))}));var o,a=[];if(this.interceptors.response.forEach((function(e){a.push(e.fulfilled,e.rejected)})),!r){var l=[i,void 0];for(Array.prototype.unshift.apply(l,n),l=l.concat(a),o=Promise.resolve(e);l.length;)o=o.then(l.shift(),l.shift());return o}for(var d=e;n.length;){var p=n.shift(),f=n.shift();try{d=p(d)}catch(e){f(e);break}}try{o=i(d)}catch(e){return Promise.reject(e)}for(;a.length;)o=o.then(a.shift(),a.shift());return o},l.prototype.getUri=function(e){return e=s(this.defaults,e),o(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")},r.forEach(["delete","get","head","options"],(function(e){l.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(["post","put","patch"],(function(e){l.prototype[e]=function(t,n,r){return this.request(s(r||{},{method:e,url:t,data:n}))}})),e.exports=l},782:(e,t,n)=>{"use strict";var r=n(4867);function o(){this.handlers=[]}o.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},o.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},o.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=o},4097:(e,t,n)=>{"use strict";var r=n(1793),o=n(7303);e.exports=function(e,t){return e&&!r(t)?o(e,t):t}},5061:(e,t,n)=>{"use strict";var r=n(481);e.exports=function(e,t,n,o,a){var i=new Error(e);return r(i,t,n,o,a)}},3572:(e,t,n)=>{"use strict";var r=n(4867),o=n(8527),a=n(6502),i=n(5655),s=n(5263);function c(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s("canceled")}e.exports=function(e){return c(e),e.headers=e.headers||{},e.data=o.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(["delete","get","head","post","put","patch","common"],(function(t){delete e.headers[t]})),(e.adapter||i.adapter)(e).then((function(t){return c(e),t.data=o.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return a(t)||(c(e),t&&t.response&&(t.response.data=o.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},481:e=>{"use strict";e.exports=function(e,t,n,r,o){return e.config=t,n&&(e.code=n),e.request=r,e.response=o,e.isAxiosError=!0,e.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}},e}},7185:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){t=t||{};var n={};function o(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function a(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(e[n],t[n])}function i(e){if(!r.isUndefined(t[e]))return o(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:o(void 0,e[n]):o(void 0,t[n])}function c(n){return n in t?o(e[n],t[n]):n in e?o(void 0,e[n]):void 0}var u={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:c};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=u[e]||a,o=t(e);r.isUndefined(o)&&t!==c||(n[e]=o)})),n}},6026:(e,t,n)=>{"use strict";var r=n(5061);e.exports=function(e,t,n){var o=n.config.validateStatus;n.status&&o&&!o(n.status)?t(r("Request failed with status code "+n.status,n.config,null,n.request,n)):e(n)}},8527:(e,t,n)=>{"use strict";var r=n(4867),o=n(5655);e.exports=function(e,t,n){var a=this||o;return r.forEach(n,(function(n){e=n.call(a,e,t)})),e}},5655:(e,t,n)=>{"use strict";var r=n(4867),o=n(6016),a=n(481),i={"Content-Type":"application/x-www-form-urlencoded"};function s(e,t){!r.isUndefined(e)&&r.isUndefined(e["Content-Type"])&&(e["Content-Type"]=t)}var c,u={transitional:{silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},adapter:(("undefined"!=typeof XMLHttpRequest||"undefined"!=typeof process&&"[object process]"===Object.prototype.toString.call(process))&&(c=n(5448)),c),transformRequest:[function(e,t){return o(t,"Accept"),o(t,"Content-Type"),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e)?e:r.isArrayBufferView(e)?e.buffer:r.isURLSearchParams(e)?(s(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):r.isObject(e)||t&&"application/json"===t["Content-Type"]?(s(t,"application/json"),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||u.transitional,n=t&&t.silentJSONParsing,o=t&&t.forcedJSONParsing,i=!n&&"json"===this.responseType;if(i||o&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(i){if("SyntaxError"===e.name)throw a(e,this,"E_JSON_PARSE");throw e}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};r.forEach(["delete","get","head"],(function(e){u.headers[e]={}})),r.forEach(["post","put","patch"],(function(e){u.headers[e]=r.merge(i)})),e.exports=u},7288:e=>{e.exports={version:"0.24.0"}},1849:e=>{"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r{"use strict";var r=n(4867);function o(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}e.exports=function(e,t,n){if(!t)return e;var a;if(n)a=n(t);else if(r.isURLSearchParams(t))a=t.toString();else{var i=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+="[]":e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),i.push(o(t)+"="+o(e))})))})),a=i.join("&")}if(a){var s=e.indexOf("#");-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf("?")?"?":"&")+a}return e}},7303:e=>{"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}},4372:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,o,a,i){var s=[];s.push(e+"="+encodeURIComponent(t)),r.isNumber(n)&&s.push("expires="+new Date(n).toGMTString()),r.isString(o)&&s.push("path="+o),r.isString(a)&&s.push("domain="+a),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},1793:e=>{"use strict";e.exports=function(e){return/^([a-z][a-z\d\+\-\.]*:)?\/\//i.test(e)}},6268:e=>{"use strict";e.exports=function(e){return"object"==typeof e&&!0===e.isAxiosError}},7985:(e,t,n)=>{"use strict";var r=n(4867);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");function o(e){var r=e;return t&&(n.setAttribute("href",r),r=n.href),n.setAttribute("href",r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:"/"===n.pathname.charAt(0)?n.pathname:"/"+n.pathname}}return e=o(window.location.href),function(t){var n=r.isString(t)?o(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},6016:(e,t,n)=>{"use strict";var r=n(4867);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},4109:(e,t,n)=>{"use strict";var r=n(4867),o=["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"];e.exports=function(e){var t,n,a,i={};return e?(r.forEach(e.split("\n"),(function(e){if(a=e.indexOf(":"),t=r.trim(e.substr(0,a)).toLowerCase(),n=r.trim(e.substr(a+1)),t){if(i[t]&&o.indexOf(t)>=0)return;i[t]="set-cookie"===t?(i[t]?i[t]:[]).concat([n]):i[t]?i[t]+", "+n:n}})),i):i}},8713:e=>{"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},4875:(e,t,n)=>{"use strict";var r=n(7288).version,o={};["object","boolean","number","function","string","symbol"].forEach((function(e,t){o[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}}));var a={};o.transitional=function(e,t,n){function o(e,t){return"[Axios v"+r+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return function(n,r,i){if(!1===e)throw new Error(o(r," has been removed"+(t?" in "+t:"")));return t&&!a[r]&&(a[r]=!0,console.warn(o(r," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,r,i)}},e.exports={assertOptions:function(e,t,n){if("object"!=typeof e)throw new TypeError("options must be an object");for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],i=t[a];if(i){var s=e[a],c=void 0===s||i(s,a,e);if(!0!==c)throw new TypeError("option "+a+" must be "+c)}else if(!0!==n)throw Error("Unknown option "+a)}},validators:o}},4867:(e,t,n)=>{"use strict";var r=n(1849),o=Object.prototype.toString;function a(e){return"[object Array]"===o.call(e)}function i(e){return void 0===e}function s(e){return null!==e&&"object"==typeof e}function c(e){if("[object Object]"!==o.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function u(e){return"[object Function]"===o.call(e)}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),a(e))for(var n=0,r=e.length;n{var t=function(e){"use strict";var t,n=Object.prototype,r=n.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",i=o.asyncIterator||"@@asyncIterator",s=o.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 u(e,t,n,r){var o=t&&t.prototype instanceof g?t:g,a=Object.create(o.prototype),i=new L(r||[]);return a._invoke=function(e,t,n){var r=d;return function(o,a){if(r===f)throw new Error("Generator is already running");if(r===m){if("throw"===o)throw a;return O()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var s=I(i,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===d)throw r=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=f;var c=l(e,t,n);if("normal"===c.type){if(r=n.done?m:p,c.arg===h)continue;return{value:c.arg,done:n.done}}"throw"===c.type&&(r=m,n.method="throw",n.arg=c.arg)}}}(e,n,i),a}function l(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",m="completed",h={};function g(){}function E(){}function A(){}var w={};c(w,a,(function(){return this}));var v=Object.getPrototypeOf,S=v&&v(v(R([])));S&&S!==n&&r.call(S,a)&&(w=S);var y=A.prototype=g.prototype=Object.create(w);function N(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function b(e,t){function n(o,a,i,s){var c=l(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then((function(e){n("next",e,i,s)}),(function(e){n("throw",e,i,s)})):t.resolve(d).then((function(e){u.value=e,i(u)}),(function(e){return n("throw",e,i,s)}))}s(c.arg)}var o;this._invoke=function(e,r){function a(){return new t((function(t,o){n(e,r,t,o)}))}return o=o?o.then(a,a):a()}}function I(e,n){var r=e.iterator[n.method];if(r===t){if(n.delegate=null,"throw"===n.method){if(e.iterator.return&&(n.method="return",n.arg=t,I(e,n),"throw"===n.method))return h;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=l(r,e.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,h;var a=o.arg;return a?a.done?(n[e.resultName]=a.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,h):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,h)}function C(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 L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function R(e){if(e){var n=e[a];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function n(){for(;++o=0;--a){var i=this.tryEntries[a],s=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var c=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(c&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),T(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;T(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,n,r){return this.delegate={iterator:R(e),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=t),h}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.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 r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t,n,r,o,a,i){try{var s=e[a](i),c=s.value}catch(e){return void n(e)}s.done?t(c):Promise.resolve(c).then(r,o)}function t(t){return function(){var n=this,r=arguments;return new Promise((function(o,a){var i=t.apply(n,r);function s(t){e(i,o,a,s,c,"next",t)}function c(t){e(i,o,a,s,c,"throw",t)}s(void 0)}))}}var r=n(7757),o=n.n(r);window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const a={debug:!!window.authentication_config.debug,sessionServer:window.authentication_config?window.authentication_config.sessionServer:"",entitlementsEnabled:!!window.authentication_config&&"1"===window.authentication_config.entitlementsEnabled,dropdownEnabled:!!window.authentication_config&&"1"===window.authentication_config.dropdownEnabled,enableReaderDashboardLink:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardLink,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,useTribMainGoogle:!!window.authentication_config&&"1"===window.authentication_config.useTribMainGoogle,isAdfreeArticle:!!window.authentication_config&&"1"===window.authentication_config.isAdfreeArticle,auth0Domain:window.authentication_config?window.authentication_config.auth0Domain:"",auth0ClientId:window.authentication_config?window.authentication_config.auth0ClientId:"",entitlementsEndpoint:window.authentication_config?window.authentication_config.entitlementsEndpoint:"",entitlementsApiKey:window.authentication_config?window.authentication_config.entitlementsAPIKey:"",linaCheckOnArticles:!!window.authentication_config&&window.authentication_config.linaCheckOnArticles,serverEntitlements:!!window.authentication_config&&window.authentication_config.serverEntitlements,googleClientId:window.authentication_config?window.authentication_config.googleClientId:"",newsletterId:window.authentication_config?window.authentication_config.newsletterId:0,connextStorageKey:"",auth0SubKey:"auth0_sub",auth0Authenticated:"auth0.is.authenticated",secret:window.authentication_config?window.authentication_config.pluginSecret:"",newslettersEnabled:!!window.authentication_config&&"1"===window.authentication_config.newslettersEnabled,bcLowaSegements:!!window.authentication_config.bcLowaSegements&&"1"===window.authentication_config.bcLowaSegements,blueconicEnabled:!!window.authentication_config.blueconicEnabled&&"1"===window.authentication_config.blueconicEnabled,datadogEnabled:!!window.authentication_config.enableDatadog&&"1"===window.authentication_config.enableDatadog};const i=function(){if(a.debug){for(var e,t=arguments.length,n=new Array(t),r=0;re.length)&&(t=e.length);for(var n=0,r=new Array(t);n>(-2*o&6)):0)r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(r);return i};function p(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(d(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 d(t)}}function f(e){this.message=e}f.prototype=new Error,f.prototype.name="InvalidTokenError";const m=function(e,t){if("string"!=typeof e)throw new f("Invalid token specified");var n=!0===(t=t||{}).header?0:1;try{return JSON.parse(p(e.split(".")[n]))}catch(e){throw new f("Invalid token specified: "+e.message)}};var h=n(9669),g=n.n(h);const E="auth0_sub",A="mng-entitlements",w="__MNG_Session",v="regwallUserIsSubscribed",S="entitled";var y=function(){var e=window.location.href;return new URL(e)},N=function(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r0&&void 0!==arguments[0]&&arguments[0],t=y(),n=t.hostname,r=n;e&&"string"==typeof e&&(r=e);var o=r.split(".");return"".concat(o[o.length-2],".").concat(o[o.length-1])},I=function(){var e=b();return".".concat(e)},C=function(e,t,n){var r="".concat(e,"=").concat(t,";");void 0!==n?(i("Setting cookie with options: ",n),Object.entries(n).forEach((function(e){var t=u(e,2),n=t[0],o=t[1];if("expires"===n){var a=new Date;a.setTime(a.getTime()+24*o*60*60*1e3),r+="expires=".concat(a.toUTCString(),";")}else r+="".concat(n,"=").concat(o,";")}))):r+="path=/;",document.cookie=r},T=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"",r="".concat(e,"= ;expires= Thu, 01 Jan 1970 00:00:00 GMT;"),o=b(),a="www".concat(o),i=".www".concat(o),s=[o,a,i];n&&s.push(n),Object.entries(t).forEach((function(e){var t=u(e,2),n=t[0],o=t[1];r+="".concat(n,"=").concat(o,";")})),0===Object.keys(t).length&&(r+="path=/;"),document.cookie=r,s.forEach((function(e){document.cookie=r.concat("domain=",e,";")}))},L=function(){return y().host.replace("www.","").replace("develop.","").replace("preprod.","")},R=function(e){return m(e)},O=function(){var e=t(o().mark((function e(t){var n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=b().split(".")[0],e.prev=1,e.next=4,g()({method:"get",url:"".concat(a.entitlementsEndpoint,"apple/subscription-check/").concat(n),params:{access_token:t}});case 4:if(!(r=e.sent).data){e.next=8;break}return i("Apple Sub Check: Request successful: ",r.data),e.abrupt("return","subscribed"===r.data.status);case 8:return e.abrupt("return",!1);case 11:return e.prev=11,e.t0=e.catch(1),i("Apple Sub Check: Request Failure: ",e.t0),e.abrupt("return",!1);case 15:case"end":return e.stop()}}),e,null,[[1,11]])})));return function(t){return e.apply(this,arguments)}}(),x=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,g()({method:"get",url:"".concat(a.entitlementsEndpoint,"auth0/users/").concat(encodeURIComponent(t)),headers:{"X-Api-Key":a.entitlementsApiKey}});case 2:return n=e.sent,e.abrupt("return",n.data.encryptedUuid);case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),k=function(){return"complete"===document.readyState},B=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){var r=!0;if(k())n();else{i("UIHandler: ","Waiting for the body to load...");var a=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e&&(r=k()),document.querySelector("body")&&r&&(clearInterval(a),n(!0));case 2:case"end":return t.stop()}}),t)}))),200)}}))},M=function(){var e=t(o().mark((function e(n){var r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){if(("interactive"===document.readyState||k())&&window.dataLayer)i("Utils digisubsDataLayerLoaded: ","Document is in interactive state, resolving."),e();else{i("Utils digisubsDataLayerLoaded: ","Waiting for the dataLayer to load...");var n=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:window.dataLayer&&window.dataLayer.length>2&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),50)}}));case 2:if(i("Utils getDataLayerObject: looking for this dataLayer object ",n),window.dataLayer=window.dataLayer||[],r="",i("Utils getDataLayerObject: here is dataLayer length ",dataLayer.length),a=function(e){return i("Utils dataLayerLoop: look for this element ",e),e[n]?(i("Utils dataLayerLoop: found ",e[n]),r=e[n],e[n]):(i("Utils dataLayerLoop: dataLayer search ",!1),!1)},!dataLayer.some(a)){e.next=10;break}return e.abrupt("return",r);case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),U=function(){var e=t(o().mark((function e(){var t,n,r=arguments;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.length>0&&void 0!==r[0]?r[0]:"Page Type",e.next=3,M(t);case 3:return n=e.sent,i("utils.js | pageType: page type is ",n),e.abrupt("return",n);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),P=function(){return new Promise((function(e){i("blueConicReady | Waiting for BC to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},(function(){i("blueConicReady | onReady fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),i("blueConicReady | onReady timeout, BC onReady unknown."),e(!1)}),3e3)}))},G=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise((function(n){if(i("blueConicLoaded | waitTillBCReady is ".concat(e)),void 0!==window.blueConicClient&&void 0!==window.blueConicClient.event&&void 0!==window.blueConicClient.event.subscribe)i("blueConicLoaded | BC object already loaded"),e&&n(P()),n();else{i('blueConicLoaded | BC not loaded, waiting for "onBlueConicLoaded" event'),window.addEventListener("onBlueConicLoaded",t(o().mark((function t(){var r;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(i("blueConicLoaded | onBlueConicLoaded event fired."),!e){t.next=9;break}return i("blueConicLoaded | waiting for blueConicReady..."),t.next=5,P();case 5:r=t.sent,n(r),t.next=10;break;case 9:n();case 10:case"end":return t.stop()}}),t)}))),!1);var r=setTimeout((function(){clearTimeout(r),i("blueConicLoaded | onBlueConicLoaded timeout, resolving false for load status."),n(!1)}),1e4)}}))},D=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G(!0);case 2:if(!e.sent){e.next=10;break}return e.next=6,new Promise((function(e){i("blueConicProfileReady | Waiting for BC Profile to be ready."),window.blueConicClient.event.subscribe(window.blueConicClient.event.onBeforeInteractions,{},(function(){i("blueConicProfileReady | onBeforeInteractions fired, BC profile is ready."),e(!0)}));var t=setTimeout((function(){clearTimeout(t),i("blueConicProfileReady | onBeforeInteractions timeout, BC profile readiness unknown"),e(!1)}),3e3)}));case 6:if(e.sent){e.next=9;break}return e.abrupt("return",!1);case 9:return e.abrupt("return",blueConicClient.profile.getProfile().getValue("Auth0_ID"));case 10:return e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),H=function(){var e=t(o().mark((function e(){var t,n,r;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["MNG Subs","DENV/PMP Subscribers","SCNG Subs","BANG Subs"],e.next=3,G(!0);case 3:if(!e.sent){e.next=15;break}if(n=window.blueConicClient.getSegments(),i("bcLowaCheck | BC segments for users: ",n),!(n.filter((function(e){return t.includes(e.name)})).length>0)){e.next=15;break}return e.next=11,D();case 11:if(!(r=e.sent)){e.next=14;break}return e.abrupt("return",{isSub:!0,uuid:r});case 14:case 15:return e.abrupt("return",{isSub:!1});case 16:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),X=function(){return new Promise((function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(i("utils.js | Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(i("utils.js | Adding authenticationReady listener..."),window.addEventListener("authenticationReady",(function(n){try{var r=n.detail||{};i("utils.js | Event: authentication ready: ",r),e(r)}catch(e){i(e),t(e)}}),!1))}))},F=function(){return new Promise((function(e,n){a.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(i("Entitlements already ready: ",window.MNGAuthentication.entitlementsReady),e(window.MNGAuthentication.entitlementsReady)):(i("Adding entitlementsReady listener..."),window.addEventListener("entitlementsReady",function(){var r=t(o().mark((function t(r){var a;return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:try{a=r.detail||{},i("Utils.js | Event: entitlements ready: ",a),e(a)}catch(e){i(e),n(e)}case 1:case"end":return t.stop()}}),t)})));return function(e){return r.apply(this,arguments)}}(),!1)):e(!1)}))},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"onFinish";return new Promise((function(t){var n=setTimeout((function(){"undefined"!=typeof Connext?(i("Connext actually did load..."),clearTimeout(n),t(!0)):(i("Connext did not load in time. Resolving false..."),clearTimeout(n),t(!1))}),6e3);"undefined"!=typeof Connext?(i("Connext already ready."),clearTimeout(n),t(!0)):(i("Listening for Connext Ready event..."),document.addEventListener("string"==typeof e?e:"onFinish",(function(){clearTimeout(n),i("Connext loaded!"),t(!0)})))}))},K=function(){i("Clearing entitlements...");try{T(A,{path:"/"})}catch(e){i("Failed to delete legacy cookie: ",e)}try{T(A,{path:"/",domain:b(),expires:365,secure:!0})}catch(e){i("Failed to delete entitlements cookie: ",e)}try{window.localStorage.removeItem(w)}catch(e){i("Failed to remove local storage: ",e)}},Y=function(){T(E),K()},W=function(){var e=y();return!["local","develop","preprod","trbdev"].some((function(t){return e.origin.includes(t)}))},V=function(e){i("Removing storageObject : ",e),void 0!==window.localStorage.getItem(e)&&(window.localStorage.removeItem(e),i("Storage Object removed : ",e))},j=function(e){i("starting simpleEmailValidation");var t=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,}))$/i);if(!e)return{valid:!1,message:"Please enter an email."};if(!t.test(e))return{valid:!1,message:"Please enter a valid email."};var n=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),r=["AAA","AARP","ABARTH","ABB","ABBOTT","ABBVIE","ABC","ABLE","ABOGADO","ABUDHABI","AC","ACADEMY","ACCENTURE","ACCOUNTANT","ACCOUNTANTS","ACO","ACTOR","AD","ADS","ADULT","AE","AEG","AERO","AETNA","AF","AFL","AFRICA","AG","AGAKHAN","AGENCY","AI","AIG","AIRBUS","AIRFORCE","AIRTEL","AKDN","AL","ALFAROMEO","ALIBABA","ALIPAY","ALLFINANZ","ALLSTATE","ALLY","ALSACE","ALSTOM","AM","AMAZON","AMERICANEXPRESS","AMERICANFAMILY","AMEX","AMFAM","AMICA","AMSTERDAM","ANALYTICS","ANDROID","ANQUAN","ANZ","AO","AOL","APARTMENTS","APP","APPLE","AQ","AQUARELLE","AR","ARAB","ARAMCO","ARCHI","ARMY","ARPA","ART","ARTE","AS","ASDA","ASIA","ASSOCIATES","AT","ATHLETA","ATTORNEY","AU","AUCTION","AUDI","AUDIBLE","AUDIO","AUSPOST","AUTHOR","AUTO","AUTOS","AVIANCA","AW","AWS","AX","AXA","AZ","AZURE","BA","BABY","BAIDU","BANAMEX","BANANAREPUBLIC","BAND","BANK","BAR","BARCELONA","BARCLAYCARD","BARCLAYS","BAREFOOT","BARGAINS","BASEBALL","BASKETBALL","BAUHAUS","BAYERN","BB","BBC","BBT","BBVA","BCG","BCN","BD","BE","BEATS","BEAUTY","BEER","BENTLEY","BERLIN","BEST","BESTBUY","BET","BF","BG","BH","BHARTI","BI","BIBLE","BID","BIKE","BING","BINGO","BIO","BIZ","BJ","BLACK","BLACKFRIDAY","BLOCKBUSTER","BLOG","BLOOMBERG","BLUE","BM","BMS","BMW","BN","BNPPARIBAS","BO","BOATS","BOEHRINGER","BOFA","BOM","BOND","BOO","BOOK","BOOKING","BOSCH","BOSTIK","BOSTON","BOT","BOUTIQUE","BOX","BR","BRADESCO","BRIDGESTONE","BROADWAY","BROKER","BROTHER","BRUSSELS","BS","BT","BUILD","BUILDERS","BUSINESS","BUY","BUZZ","BV","BW","BY","BZ","BZH","CA","CAB","CAFE","CAL","CALL","CALVINKLEIN","CAM","CAMERA","CAMP","CANON","CAPETOWN","CAPITAL","CAPITALONE","CAR","CARAVAN","CARDS","CARE","CAREER","CAREERS","CARS","CASA","CASE","CASH","CASINO","CAT","CATERING","CATHOLIC","CBA","CBN","CBRE","CBS","CC","CD","CENTER","CEO","CERN","CF","CFA","CFD","CG","CH","CHANEL","CHANNEL","CHARITY","CHASE","CHAT","CHEAP","CHINTAI","CHRISTMAS","CHROME","CHURCH","CI","CIPRIANI","CIRCLE","CISCO","CITADEL","CITI","CITIC","CITY","CITYEATS","CK","CL","CLAIMS","CLEANING","CLICK","CLINIC","CLINIQUE","CLOTHING","CLOUD","CLUB","CLUBMED","CM","CN","CO","COACH","CODES","COFFEE","COLLEGE","COLOGNE","COM","COMCAST","COMMBANK","COMMUNITY","COMPANY","COMPARE","COMPUTER","COMSEC","CONDOS","CONSTRUCTION","CONSULTING","CONTACT","CONTRACTORS","COOKING","COOKINGCHANNEL","COOL","COOP","CORSICA","COUNTRY","COUPON","COUPONS","COURSES","CPA","CR","CREDIT","CREDITCARD","CREDITUNION","CRICKET","CROWN","CRS","CRUISE","CRUISES","CU","CUISINELLA","CV","CW","CX","CY","CYMRU","CYOU","CZ","DABUR","DAD","DANCE","DATA","DATE","DATING","DATSUN","DAY","DCLK","DDS","DE","DEAL","DEALER","DEALS","DEGREE","DELIVERY","DELL","DELOITTE","DELTA","DEMOCRAT","DENTAL","DENTIST","DESI","DESIGN","DEV","DHL","DIAMONDS","DIET","DIGITAL","DIRECT","DIRECTORY","DISCOUNT","DISCOVER","DISH","DIY","DJ","DK","DM","DNP","DO","DOCS","DOCTOR","DOG","DOMAINS","DOT","DOWNLOAD","DRIVE","DTV","DUBAI","DUNLOP","DUPONT","DURBAN","DVAG","DVR","DZ","EARTH","EAT","EC","ECO","EDEKA","EDU","EDUCATION","EE","EG","EMAIL","EMERCK","ENERGY","ENGINEER","ENGINEERING","ENTERPRISES","EPSON","EQUIPMENT","ER","ERICSSON","ERNI","ES","ESQ","ESTATE","ET","ETISALAT","EU","EUROVISION","EUS","EVENTS","EXCHANGE","EXPERT","EXPOSED","EXPRESS","EXTRASPACE","FAGE","FAIL","FAIRWINDS","FAITH","FAMILY","FAN","FANS","FARM","FARMERS","FASHION","FAST","FEDEX","FEEDBACK","FERRARI","FERRERO","FI","FIAT","FIDELITY","FIDO","FILM","FINAL","FINANCE","FINANCIAL","FIRE","FIRESTONE","FIRMDALE","FISH","FISHING","FIT","FITNESS","FJ","FK","FLICKR","FLIGHTS","FLIR","FLORIST","FLOWERS","FLY","FM","FO","FOO","FOOD","FOODNETWORK","FOOTBALL","FORD","FOREX","FORSALE","FORUM","FOUNDATION","FOX","FR","FREE","FRESENIUS","FRL","FROGANS","FRONTDOOR","FRONTIER","FTR","FUJITSU","FUN","FUND","FURNITURE","FUTBOL","FYI","GA","GAL","GALLERY","GALLO","GALLUP","GAME","GAMES","GAP","GARDEN","GAY","GB","GBIZ","GD","GDN","GE","GEA","GENT","GENTING","GEORGE","GF","GG","GGEE","GH","GI","GIFT","GIFTS","GIVES","GIVING","GL","GLASS","GLE","GLOBAL","GLOBO","GM","GMAIL","GMBH","GMO","GMX","GN","GODADDY","GOLD","GOLDPOINT","GOLF","GOO","GOODYEAR","GOOG","GOOGLE","GOP","GOT","GOV","GP","GQ","GR","GRAINGER","GRAPHICS","GRATIS","GREEN","GRIPE","GROCERY","GROUP","GS","GT","GU","GUARDIAN","GUCCI","GUGE","GUIDE","GUITARS","GURU","GW","GY","HAIR","HAMBURG","HANGOUT","HAUS","HBO","HDFC","HDFCBANK","HEALTH","HEALTHCARE","HELP","HELSINKI","HERE","HERMES","HGTV","HIPHOP","HISAMITSU","HITACHI","HIV","HK","HKT","HM","HN","HOCKEY","HOLDINGS","HOLIDAY","HOMEDEPOT","HOMEGOODS","HOMES","HOMESENSE","HONDA","HORSE","HOSPITAL","HOST","HOSTING","HOT","HOTELES","HOTELS","HOTMAIL","HOUSE","HOW","HR","HSBC","HT","HU","HUGHES","HYATT","HYUNDAI","IBM","ICBC","ICE","ICU","ID","IE","IEEE","IFM","IKANO","IL","IM","IMAMAT","IMDB","IMMO","IMMOBILIEN","IN","INC","INDUSTRIES","INFINITI","INFO","ING","INK","INSTITUTE","INSURANCE","INSURE","INT","INTERNATIONAL","INTUIT","INVESTMENTS","IO","IPIRANGA","IQ","IR","IRISH","IS","ISMAILI","IST","ISTANBUL","IT","ITAU","ITV","JAGUAR","JAVA","JCB","JE","JEEP","JETZT","JEWELRY","JIO","JLL","JM","JMP","JNJ","JO","JOBS","JOBURG","JOT","JOY","JP","JPMORGAN","JPRS","JUEGOS","JUNIPER","KAUFEN","KDDI","KE","KERRYHOTELS","KERRYLOGISTICS","KERRYPROPERTIES","KFH","KG","KH","KI","KIA","KIDS","KIM","KINDER","KINDLE","KITCHEN","KIWI","KM","KN","KOELN","KOMATSU","KOSHER","KP","KPMG","KPN","KR","KRD","KRED","KUOKGROUP","KW","KY","KYOTO","KZ","LA","LACAIXA","LAMBORGHINI","LAMER","LANCASTER","LANCIA","LAND","LANDROVER","LANXESS","LASALLE","LAT","LATINO","LATROBE","LAW","LAWYER","LB","LC","LDS","LEASE","LECLERC","LEFRAK","LEGAL","LEGO","LEXUS","LGBT","LI","LIDL","LIFE","LIFEINSURANCE","LIFESTYLE","LIGHTING","LIKE","LILLY","LIMITED","LIMO","LINCOLN","LINDE","LINK","LIPSY","LIVE","LIVING","LK","LLC","LLP","LOAN","LOANS","LOCKER","LOCUS","LOFT","LOL","LONDON","LOTTE","LOTTO","LOVE","LPL","LPLFINANCIAL","LR","LS","LT","LTD","LTDA","LU","LUNDBECK","LUXE","LUXURY","LV","LY","MA","MACYS","MADRID","MAIF","MAISON","MAKEUP","MAN","MANAGEMENT","MANGO","MAP","MARKET","MARKETING","MARKETS","MARRIOTT","MARSHALLS","MASERATI","MATTEL","MBA","MC","MCKINSEY","MD","ME","MED","MEDIA","MEET","MELBOURNE","MEME","MEMORIAL","MEN","MENU","MERCKMSD","MG","MH","MIAMI","MICROSOFT","MIL","MINI","MINT","MIT","MITSUBISHI","MK","ML","MLB","MLS","MM","MMA","MN","MO","MOBI","MOBILE","MODA","MOE","MOI","MOM","MONASH","MONEY","MONSTER","MORMON","MORTGAGE","MOSCOW","MOTO","MOTORCYCLES","MOV","MOVIE","MP","MQ","MR","MS","MSD","MT","MTN","MTR","MU","MUSEUM","MUSIC","MUTUAL","MV","MW","MX","MY","MZ","NA","NAB","NAGOYA","NAME","NATURA","NAVY","NBA","NC","NE","NEC","NET","NETBANK","NETFLIX","NETWORK","NEUSTAR","NEW","NEWS","NEXT","NEXTDIRECT","NEXUS","NF","NFL","NG","NGO","NHK","NI","NICO","NIKE","NIKON","NINJA","NISSAN","NISSAY","NL","NO","NOKIA","NORTHWESTERNMUTUAL","NORTON","NOW","NOWRUZ","NOWTV","NP","NR","NRA","NRW","NTT","NU","NYC","NZ","OBI","OBSERVER","OFFICE","OKINAWA","OLAYAN","OLAYANGROUP","OLDNAVY","OLLO","OM","OMEGA","ONE","ONG","ONL","ONLINE","OOO","OPEN","ORACLE","ORANGE","ORG","ORGANIC","ORIGINS","OSAKA","OTSUKA","OTT","OVH","PA","PAGE","PANASONIC","PARIS","PARS","PARTNERS","PARTS","PARTY","PASSAGENS","PAY","PCCW","PE","PET","PF","PFIZER","PG","PH","PHARMACY","PHD","PHILIPS","PHONE","PHOTO","PHOTOGRAPHY","PHOTOS","PHYSIO","PICS","PICTET","PICTURES","PID","PIN","PING","PINK","PIONEER","PIZZA","PK","PL","PLACE","PLAY","PLAYSTATION","PLUMBING","PLUS","PM","PN","PNC","POHL","POKER","POLITIE","PORN","POST","PR","PRAMERICA","PRAXI","PRESS","PRIME","PRO","PROD","PRODUCTIONS","PROF","PROGRESSIVE","PROMO","PROPERTIES","PROPERTY","PROTECTION","PRU","PRUDENTIAL","PS","PT","PUB","PW","PWC","PY","QA","QPON","QUEBEC","QUEST","RACING","RADIO","RE","READ","REALESTATE","REALTOR","REALTY","RECIPES","RED","REDSTONE","REDUMBRELLA","REHAB","REISE","REISEN","REIT","RELIANCE","REN","RENT","RENTALS","REPAIR","REPORT","REPUBLICAN","REST","RESTAURANT","REVIEW","REVIEWS","REXROTH","RICH","RICHARDLI","RICOH","RIL","RIO","RIP","RO","ROCHER","ROCKS","RODEO","ROGERS","ROOM","RS","RSVP","RU","RUGBY","RUHR","RUN","RW","RWE","RYUKYU","SA","SAARLAND","SAFE","SAFETY","SAKURA","SALE","SALON","SAMSCLUB","SAMSUNG","SANDVIK","SANDVIKCOROMANT","SANOFI","SAP","SARL","SAS","SAVE","SAXO","SB","SBI","SBS","SC","SCA","SCB","SCHAEFFLER","SCHMIDT","SCHOLARSHIPS","SCHOOL","SCHULE","SCHWARZ","SCIENCE","SCOT","SD","SE","SEARCH","SEAT","SECURE","SECURITY","SEEK","SELECT","SENER","SERVICES","SES","SEVEN","SEW","SEX","SEXY","SFR","SG","SH","SHANGRILA","SHARP","SHAW","SHELL","SHIA","SHIKSHA","SHOES","SHOP","SHOPPING","SHOUJI","SHOW","SHOWTIME","SI","SILK","SINA","SINGLES","SITE","SJ","SK","SKI","SKIN","SKY","SKYPE","SL","SLING","SM","SMART","SMILE","SN","SNCF","SO","SOCCER","SOCIAL","SOFTBANK","SOFTWARE","SOHU","SOLAR","SOLUTIONS","SONG","SONY","SOY","SPA","SPACE","SPORT","SPOT","SR","SRL","SS","ST","STADA","STAPLES","STAR","STATEBANK","STATEFARM","STC","STCGROUP","STOCKHOLM","STORAGE","STORE","STREAM","STUDIO","STUDY","STYLE","SU","SUCKS","SUPPLIES","SUPPLY","SUPPORT","SURF","SURGERY","SUZUKI","SV","SWATCH","SWISS","SX","SY","SYDNEY","SYSTEMS","SZ","TAB","TAIPEI","TALK","TAOBAO","TARGET","TATAMOTORS","TATAR","TATTOO","TAX","TAXI","TC","TCI","TD","TDK","TEAM","TECH","TECHNOLOGY","TEL","TEMASEK","TENNIS","TEVA","TF","TG","TH","THD","THEATER","THEATRE","TIAA","TICKETS","TIENDA","TIFFANY","TIPS","TIRES","TIROL","TJ","TJMAXX","TJX","TK","TKMAXX","TL","TM","TMALL","TN","TO","TODAY","TOKYO","TOOLS","TOP","TORAY","TOSHIBA","TOTAL","TOURS","TOWN","TOYOTA","TOYS","TR","TRADE","TRADING","TRAINING","TRAVEL","TRAVELCHANNEL","TRAVELERS","TRAVELERSINSURANCE","TRUST","TRV","TT","TUBE","TUI","TUNES","TUSHU","TV","TVS","TW","TZ","UA","UBANK","UBS","UG","UK","UNICOM","UNIVERSITY","UNO","UOL","UPS","US","UY","UZ","VA","VACATIONS","VANA","VANGUARD","VC","VE","VEGAS","VENTURES","VERISIGN","VERSICHERUNG","VET","VG","VI","VIAJES","VIDEO","VIG","VIKING","VILLAS","VIN","VIP","VIRGIN","VISA","VISION","VIVA","VIVO","VLAANDEREN","VN","VODKA","VOLKSWAGEN","VOLVO","VOTE","VOTING","VOTO","VOYAGE","VU","VUELOS","WALES","WALMART","WALTER","WANG","WANGGOU","WATCH","WATCHES","WEATHER","WEATHERCHANNEL","WEBCAM","WEBER","WEBSITE","WED","WEDDING","WEIBO","WEIR","WF","WHOSWHO","WIEN","WIKI","WILLIAMHILL","WIN","WINDOWS","WINE","WINNERS","WME","WOLTERSKLUWER","WOODSIDE","WORK","WORKS","WORLD","WOW","WS","WTC","WTF","XBOX","XEROX","XFINITY","XIHUAN","XIN","XN--11B4C3D","XN--1CK2E1B","XN--1QQW23A","XN--2SCRJ9C","XN--30RR7Y","XN--3BST00M","XN--3DS443G","XN--3E0B707E","XN--3HCRJ9C","XN--3PXU8K","XN--42C2D9A","XN--45BR5CYL","XN--45BRJ9C","XN--45Q11C","XN--4DBRK0CE","XN--4GBRIM","XN--54B7FTA0CC","XN--55QW42G","XN--55QX5D","XN--5SU34J936BGSG","XN--5TZM5G","XN--6FRZ82G","XN--6QQ986B3XL","XN--80ADXHKS","XN--80AO21A","XN--80AQECDR1A","XN--80ASEHDB","XN--80ASWG","XN--8Y0A063A","XN--90A3AC","XN--90AE","XN--90AIS","XN--9DBQ2A","XN--9ET52U","XN--9KRT00A","XN--B4W605FERD","XN--BCK1B9A5DRE4C","XN--C1AVG","XN--C2BR7G","XN--CCK2B3B","XN--CCKWCXETD","XN--CG4BKI","XN--CLCHC0EA0B2G2A9GCD","XN--CZR694B","XN--CZRS0T","XN--CZRU2D","XN--D1ACJ3B","XN--D1ALF","XN--E1A4C","XN--ECKVDTC9D","XN--EFVY88H","XN--FCT429K","XN--FHBEI","XN--FIQ228C5HS","XN--FIQ64B","XN--FIQS8S","XN--FIQZ9S","XN--FJQ720A","XN--FLW351E","XN--FPCRJ9C3D","XN--FZC2C9E2C","XN--FZYS8D69UVGM","XN--G2XX48C","XN--GCKR3F0F","XN--GECRJ9C","XN--GK3AT1E","XN--H2BREG3EVE","XN--H2BRJ9C","XN--H2BRJ9C8C","XN--HXT814E","XN--I1B6B1A6A2E","XN--IMR513N","XN--IO0A7I","XN--J1AEF","XN--J1AMH","XN--J6W193G","XN--JLQ480N2RG","XN--JVR189M","XN--KCRX77D1X4A","XN--KPRW13D","XN--KPRY57D","XN--KPUT3I","XN--L1ACC","XN--LGBBAT1AD8J","XN--MGB9AWBF","XN--MGBA3A3EJT","XN--MGBA3A4F16A","XN--MGBA7C0BBN0A","XN--MGBAAKC7DVF","XN--MGBAAM7A8H","XN--MGBAB2BD","XN--MGBAH1A3HJKRD","XN--MGBAI9AZGQP6J","XN--MGBAYH7GPA","XN--MGBBH1A","XN--MGBBH1A71E","XN--MGBC0A9AZCG","XN--MGBCA7DZDO","XN--MGBCPQ6GPA1A","XN--MGBERP4A5D4AR","XN--MGBGU82A","XN--MGBI4ECEXP","XN--MGBPL2FH","XN--MGBT3DHD","XN--MGBTX2B","XN--MGBX4CD0AB","XN--MIX891F","XN--MK1BU44C","XN--MXTQ1M","XN--NGBC5AZD","XN--NGBE9E0A","XN--NGBRX","XN--NODE","XN--NQV7F","XN--NQV7FS00EMA","XN--NYQY26A","XN--O3CW4H","XN--OGBPF8FL","XN--OTU796D","XN--P1ACF","XN--P1AI","XN--PGBS0DH","XN--PSSY2U","XN--Q7CE6A","XN--Q9JYB4C","XN--QCKA1PMC","XN--QXA6A","XN--QXAM","XN--RHQV96G","XN--ROVU88B","XN--RVC1E0AM3E","XN--S9BRJ9C","XN--SES554G","XN--T60B56A","XN--TCKWE","XN--TIQ49XQYJ","XN--UNUP4Y","XN--VERMGENSBERATER-CTB","XN--VERMGENSBERATUNG-PWB","XN--VHQUV","XN--VUQ861B","XN--W4R85EL8FHU5DNRA","XN--W4RS40L","XN--WGBH1C","XN--WGBL6A","XN--XHQ521B","XN--XKC2AL3HYE2A","XN--XKC2DL3A5EE0H","XN--Y9A3AQ","XN--YFRO4I67O","XN--YGBI2AMMX","XN--ZFR164B","XXX","XYZ","YACHTS","YAHOO","YAMAXUN","YANDEX","YE","YODOBASHI","YOGA","YOKOHAMA","YOU","YOUTUBE","YT","YUN","ZA","ZAPPOS","ZARA","ZERO","ZIP","ZM","ZONE","ZUERICH","ZW"].includes(n);return i("simpleEmailValidation: ","TLD search ".concat(r)),!1===r?{valid:!1,message:"Please enter a valid email domain."}:-1===["zzz.pl"].findIndex((function(t){return t===e.split("@")[1]}))?{valid:!0,message:"Valid"}:{valid:!1,message:"Please enter a valid email."}};window.simpleEmailValidation=j;var J;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var q=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0===J){e.next=2;break}return e.abrupt("return",J);case 2:return t=a.auth0Domain,n=a.auth0ClientId,e.next=5,createAuth0Client({domain:t,client_id:n,useRefreshTokens:!0,cacheLocation:"localstorage",audience:"access-extension"});case 5:return J=e.sent,e.abrupt("return",J);case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Z=function(e){i("utils.js | auth event dispathed");var t=new CustomEvent("authenticationReady",{detail:e});window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.authenticationReady=e,i("Utils.js | Dispatching authenticationReady Event: ",t),window.dispatchEvent(t),i("Utils.js | Dispatched authenticationReady event!")},Q=function(e){return new Promise((function(t){document.querySelector(e)&&t(document.querySelector(e));var n=new MutationObserver((function(){return document.querySelector(e)&&(t(document.querySelector(e)),n.disconnect()),!0}));n.observe(document.body,{childList:!0,subtree:!0})}))},z=function(e){var t=e.getBoundingClientRect();return t.top>=0&&t.left>=0&&t.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&t.right<=(window.innerWidth||document.documentElement.clientWidth)},ee=function(){var e=window.localStorage.getItem("__MNG_Session");if(e){var t=JSON.parse(e);if(t.idToken){var n=R(t.idToken);if(n.home_paper)return i("Util.js | home paper: Home paper is ",n.home_paper),n.home_paper.replace("www.","").replace("develop.","").replace("preprod.","")}}return i("Util.js | home paper: Home paper is not set ",L()),L()},te=function(e){a.datadogEnabled&&window.DD_RUM.addTiming(e)};var ne="#primary-menu",re="#pushnav",oe=".log-in-button",ae=".subscribe-visibility",ie=".log-out-button",se="dfm-digisubs-menu",ce="dfm-digisubs-push-menu",ue="mega-subscribe-button",le=function(){return document.querySelector(ne)},de=function(){return document.querySelector(re)},pe=function(){return document.getElementById(se)},fe=function(){return document.getElementById(ce)},me=function(){return pe()?pe().querySelector(oe):null},he=function(){return me()?me().querySelector("a"):null},ge=function(){return fe()?fe().querySelector(oe):null},Ee=function(){return de()?de().querySelector(oe):null},Ae=function(){return document.querySelectorAll(ae)};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)}function ve(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||c(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.")}()}var Se=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,G();case 2:return e.next=4,X();case 4:return e.abrupt("return",new Promise((function(e){i("ANALYTICS: inside BCregwall events");var t=y();t.searchParams.delete("regwall");var n=blueConicClient.profile.getProfile();localStorage.setItem("regwallSuccess","yes"),localStorage.setItem("regwallEvent","yes"),n.setValue("bang_reg_wall_status","Y"),n.setValue("regwall_newspaper",t.host),n.setValue("regwall_success_date",new Date),n.setValue("regwall_success","yes"),blueConicClient.profile.updateProfile(),e(!0)})));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ye=function(e){try{window.dataLayer.push({event:e}),i("ANALYTICS: ".concat(e," event")),i("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){i("ANALYTICS: Failed to send ".concat(e," event: "),t)}};var Ne=function(){try{var e=localStorage.getItem(w);return"string"==typeof e?e:"{}"}catch(e){i("Unable to get session from local storage: ",e)}return"{}"},be=function(e){try{i("Setting local storage session",e),localStorage.setItem(w,e)}catch(e){i("Unable to save session from local storage: ",e)}},Ie=function(e){try{C(A,e,{path:"/",domain:I(),expires:365,secure:!0})}catch(e){i("Unable to save session to cookie storage: ",e)}},Ce=function(){var e=t(o().mark((function e(){var t,n,r,s,c,u,l,d,p,f,m,h,E,A,w,v,S;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t="".concat(a.sessionServer,"/api/session"),i("Checking server session: ",t),e.next=5,g().get(t,{withCredentials:!0});case 5:if(!(n=e.sent).data){e.next=17;break}return d=n.data.entitlementTokenDecoded,p=n.data,f=p.accessToken,m=p.idToken,h=p.entitlementToken,E=null!==(r=null==d?void 0:d.entitlement_expiry)&&void 0!==r?r:null,A=null!==(s=null==d?void 0:d.entitlement_source)&&void 0!==s?s:null,w=null!==(c=null==d?void 0:d.entitlement_entitled)&&void 0!==c?c:null,v=null!==(u=null==d?void 0:d.entitlement_extras_adfree)&&void 0!==u?u:null,S=null!==(l=null==d?void 0:d.entitlement_level)&&void 0!==l?l:null,be(JSON.stringify({accessToken:f,idToken:m,entitlementToken:h,expiration:E,entitlementSource:A,isEntitled:w,adFree:v,entitlementLevel:S})),""!==h&&"string"==typeof h&&Ie(h),e.abrupt("return",{accessToken:f,idToken:m,entitlementToken:h,expiration:E,entitlementSource:A,isEntitled:w,adFree:v,entitlementLevel:S});case 17:return e.abrupt("return",{accessToken:null,idToken:null,entitlementToken:null,expiration:null,entitlementSource:null,isEntitled:null,adFree:null,entitlementLevel:null});case 18:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Te=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,n="".concat(a.sessionServer,"/api/session"),i("Updating server session: ",n),e.next=6,g().post(n,t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to update session server: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(t){return e.apply(this,arguments)}}(),Le=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,t="".concat(a.sessionServer,"/api/session"),i("Deleting server session: ",t),e.next=6,g().delete(t,{withCredentials:!0});case 6:e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),i("Failed to delete server session: ",e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})));return function(){return e.apply(this,arguments)}}(),Re=function(){var e=t(o().mark((function e(){var t,n,r,a,s,c,u,l,d,p,f,m,h,g,E,A,w,v,S,y,N,b,I,C,T,L,R;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Inside getSession"),e.prev=1,d=Ne(),i("Session: __MNG_Session = ",d),p=JSON.parse(d),f=p.accessToken,m=p.idToken,h=p.entitlementToken,g=p.expiration,E=p.entitlementSource,A=p.isEntitled,w=p.adFree,v=p.entitlementLevel,n=f,a=g,s=E,c=A,u=w,l=v,i("Session: check both tokens: ",t=m,r=h),void 0!==m&&void 0!==h&&null!==m&&null!==h){e.next=35;break}return i("Session: missing id or entitlements, try session server"),e.next=18,Ce();case 18:S=e.sent,y=S.accessToken,N=S.idToken,b=S.entitlementToken,I=S.expiration,C=S.entitlementSource,T=S.isEntitled,L=S.adFree,R=S.entitlementLevel,n=y,t=N,r=b,a=I,s=C,c=T,u=L,l=R;case 35:e.next=40;break;case 37:e.prev=37,e.t0=e.catch(1),i("Failed to get session: ",e.t0);case 40:return i("Returning session: ",t,n,r),e.abrupt("return",{accessToken:n,idToken:t,entitlementToken:r,expiration:a,entitlementSource:s,isEntitled:c,adFree:u,entitlementLevel:l});case 42:case"end":return e.stop()}}),e,null,[[1,37]])})));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e=t(o().mark((function e(t){var n,r,s,c,u,l,d,p,f,m,h,g,E,A,w,v,S,N,b,I,C,T,L,R,O,x,k,B,M;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,n=Ne(),r=JSON.parse(n),s=r.accessToken,c=void 0===s?null:s,u=r.idToken,l=void 0===u?null:u,d=r.entitlementToken,p=void 0===d?null:d,f=r.expiration,m=void 0===f?null:f,h=r.entitlementSource,g=void 0===h?null:h,E=r.isEntitled,A=void 0===E?null:E,w=r.adFree,v=void 0===w?null:w,S=r.entitlementLevel,N=void 0===S?null:S,b=t.accessToken,I=t.idToken,C=t.entitlementToken,T=t.expiration,L=t.entitlementSource,R=t.isEntitled,O=t.adFree,x=t.entitlementLevel,k={accessToken:null==b?c:b,idToken:null==I?l:I,entitlementToken:null==C?p:C,expiration:null==T?m:T,entitlementSource:null==L?g:L,isEntitled:null==R?A:R,adFree:null==O?v:O,entitlementLevel:null==x?N:x},i("Current session data: ",r),i("New session data: ",t),i("Updated session data:",k),B=JSON.stringify(k),be(B),""!==k.entitlementToken&&"string"==typeof k.entitlementToken&&Ie(k.entitlementToken),n===B){e.next=17;break}return e.next=15,Te(k);case 15:M=y(),!a.serverEntitlements||!a.bcLowaSegements||M.pathname.startsWith("/callback")||M.pathname.startsWith("/user-tools")||p||(i("Finished updating sesssion, about to reload to refresh entitlement cookie for server."),window.location.reload());case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(0),i("Unable to save session: ",e.t0);case 22:case"end":return e.stop()}}),e,null,[[0,19]])})));return function(t){return e.apply(this,arguments)}}(),xe=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Ending session..."),Y(),e.next=4,Le();case 4:localStorage.removeItem(w);case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ke=function(){return"logout"===(y().searchParams.get("state")||"").toLowerCase()};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.logoutCallbacks=[];var Be=function(){var e=t(o().mark((function e(t){var n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,q();case 2:n=e.sent,i("Calling Auth0 logout..."),n.logout({returnTo:t});case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Me=function(){i("Check for SS paywall Cookie");var e=window.location.hostname,t=document.cookie.split(";").find((function(e){return e.trim().startsWith("vip-go-seg=vc-v1__has_access")}));if(/^(?!:\/\/)([a-zA-Z0-9-_]{1,63}\.?)+[a-zA-Z]{2,6}$/.test(e)&&t){i("SS paywall Cookie found, removing it");var n=t.split("=")[0].trim();document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=").concat(e),document.cookie="".concat(n,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}},Ue=function(){var e=t(o().mark((function e(){var n,r,a,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Attempting to logout..."),Me(),!window.authentication_config.sessionManagementEnabled){e.next=7;break}return e.next=5,xe();case 5:e.next=8;break;case 7:Y();case 8:return e.prev=8,i("Cycling through logout callbacks..."),n=window.MNGAuthentication.logoutCallbacks.map((function(e){return e()})),e.next=13,Promise.all(n);case 13:i("Finished cycling through logout callbacks."),e.next=19;break;case 16:e.prev=16,e.t0=e.catch(8),i("Failed to cycle through logout callbacks: ",e.t0);case 19:Object.keys(localStorage).filter((function(e){return e.includes("auth0")})).forEach((function(e){localStorage.removeItem(e),i("Removed Auth0 storage object...")})),V("hhsl"),V("userNewsLetterData"),V(v),r=y(),a=window.location.origin;try{r.searchParams.get("returnURL")&&(s=decodeURIComponent(r.searchParams.get("returnURL")),a=s)}catch(e){i(e),a=window.location.origin}return a=new URL(a),e.next=30,_();case 30:if(!e.sent){e.next=62;break}if(i("Auth | Silent mode enabled ",Connext.GetOptions().Silentmode),Connext.GetOptions().Silentmode&&(i("Auth | Run connext manually"),Connext.Run()),c=a,a.origin!==window.location.origin&&(c=new URL(window.location.origin)).searchParams.append("returnAfterLogout",a),window.history.replaceState({additionalInformation:"Updated the URL to prevent another login cycle"},"Home",c),!W()){e.next=43;break}return i("About to call Connext Logout..."),e.next=41,Connext.Logout();case 41:e.next=60;break;case 43:if("Logged In"!==("undefined"==typeof CnnXt?(i("Connext was not loaded."),!1):Connext.Storage.GetUserState())){e.next=57;break}if(i("Connext user state is logged in, setting timeout..."),setTimeout(t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Connext took too long to logout, calling auth0 logout..."),e.next=3,Be(a);case 3:case"end":return e.stop()}}),e)}))),8e3),"function"!=typeof Connext._logout){e.next=52;break}return i("About to call Connext _logout..."),e.next=50,Connext._logout();case 50:e.next=55;break;case 52:return i("About to call Connext Logout..."),e.next=55,Connext.Logout();case 55:e.next=60;break;case 57:return i("Connext user state is logged out, not calling it, going to auth0 logout."),e.next=60,Be(a);case 60:e.next=65;break;case 62:return i("Connext Logout was NOT called"),e.next=65,Be(a);case 65:case"end":return e.stop()}}),e,null,[[8,16]])})));return function(){return e.apply(this,arguments)}}(),Pe=function(){var e=0;for(var t in localStorage){var n=2*localStorage[t].length/1024/1024;!Number.isNaN(n)&&localStorage.hasOwnProperty(t)&&(e+=n)}return e},Ge=function(){var e=t(o().mark((function e(t,n,r,a,s){var c,u,l,d,p,f,m,h,g,E,A,w,v;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("Attempting to login..."),Pe()>4.5&&localStorage.clear(),window.MNGAuthentication.preAuthGTMEvents.forEach((function(e){return ye(e)})),i("Cycled through preauth GTM events."),a&&(c=[],u=window.localStorage.getItem("callbackEvents"),l=JSON.parse(u),c=l&&l.length>0?ve(new Set([].concat(ve(a),ve(l)))):a,window.localStorage.setItem("callbackEvents",JSON.stringify(c))),d=null,e.next=7,q();case 7:if(p=e.sent,f=y(),m=f.origin,h=new URL("".concat(m,"/callback")),g={},f.searchParams.get("regwall")&&(f.searchParams.get("returnUrl")&&(E=f.searchParams.get("returnUrl")),f.searchParams.get("auth_redirect")&&(E=f.searchParams.get("auth_redirect"))),f.pathname.startsWith("/login")||f.pathname.startsWith("/callback")?f.searchParams.get("returnUrl")?h.searchParams.set("auth_redirect",f.searchParams.get("returnUrl")):s&&h.searchParams.set("auth_redirect",s):h.searchParams.set("auth_redirect",f.toString()),E&&"regwall"!==t&&h.searchParams.set("auth_redirect",E),"true"===f.searchParams.get("close-after-finish")&&h.searchParams.set("close-after-finish","true"),"true"!==f.searchParams.get("ssl")){e.next=23;break}if(!window.authentication_config.sessionManagementEnabled){e.next=22;break}return e.next=20,xe();case 20:e.next=23;break;case 22:Y();case 23:return null!==(d=f.searchParams.get("login-with"))?g.connection=d:n&&(g.connection=n),A="none",t&&"regwall"===t&&(h.searchParams.set("regwall","true"),A="signUp",i("Logging in with regwall")),t&&(h.searchParams.set("loginsource",t),i("Logging in with ".concat(t))),r&&(g.login_hint=r),g.redirect_uri=h.toString(),g.initialScreen=A,"googleonetap"!==t&&(g.prompt="select_account"),null!==(w=f.searchParams.get("ampRegiWall"))&&(v=window.location.hostname,g.ampRegiWall=w,g.sourceDomain=v.replace("www.","").replace("preprod.","").replace("develop.",""),g.initialScreen="signUp",g.preferenceId=f.searchParams.get("prefId")),e.next=36,p.loginWithRedirect(g);case 36:case"end":return e.stop()}}),e)})));return function(t,n,r,o,a){return e.apply(this,arguments)}}(),De=function(){return new Promise((function(e){var t=setTimeout((function(){e()}),8e3);try{var n=window.localStorage.getItem("callbackEvents"),r=JSON.parse(n);r&&0!==r.length||e(),i("Adding listeners to events we need to wait for...");var o=r.map((function(e){return t=e,new Promise((function(e){i("Adding event to wait for: ",t),window.addEventListener(t,(function(n){try{var r=n.detail||{};i("Event: ".concat(t,"} ready: "),r),e(r)}catch(t){i(t),e()}}),!1)}));var t}));Promise.all(o).then((function(){clearTimeout(t),e()}))}catch(t){i("Failed to wait for callback events",t),e()}}))};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.oidcLoginCallbacks=[];var He=function(){var e=t(o().mark((function e(){var n,r,a,s,c,u,l,d,p,f,m,h,g,E,A,w,S,N,b;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Me(),n=y(),r=!1,a=n.searchParams.get("auth_redirect")||"https://".concat(window.location.host),s=n.searchParams.get("redirect_uri")||"",s.includes("applenews")?(i("This is Apple prelogin flow."),(c=new URL(s))?(c.searchParams.append("post-apple-login","true"),i("Post callback Apple redirect URL is ".concat(c)),Ge(!1,!1,!1,[],c)):Ge()):a.includes("post-apple-login")&&(i("This is Apple Callback flow."),r=!0,(u=new URL(decodeURIComponent(a))).searchParams.delete("post-apple-login"),a=u),i("Handling post login callback..."),!(l=n.searchParams.get("error_description"))){e.next=13;break}if("shouldAutoLogin"!==l){e.next=12;break}return e.abrupt("return",Ge(!1,!1,!1,!1,a));case 12:r&&alert("There was an error in logging you in, please try again.");case 13:return e.next=15,q();case 15:return d=e.sent,e.next=18,d.handleRedirectCallback();case 18:return e.next=20,d.getIdTokenClaims();case 20:return p=e.sent,e.next=23,d.getUser();case 23:return f=e.sent,i("Auth0 user profile: ",f),m=p.__raw,e.next=28,d.getTokenSilently();case 28:return h=e.sent,e.prev=29,i("Cycling through login callbacks..."),e.next=33,De();case 33:return g=window.MNGAuthentication.oidcLoginCallbacks.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(m));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=36,Promise.all(g);case 36:i("Finished cycling through login callbacks."),e.next=42;break;case 39:e.prev=39,e.t0=e.catch(29),i("Failed to cycle through login callbacks: ",e.t0);case 42:if(E={accessToken:h,userId:f.sub,email:f.email,picture:f.picture},A=!1,w="",!r){e.next=61;break}return e.prev=46,e.next=49,x(E.userId);case 49:return w=e.sent,i("Encrypted apple uuid is: ".concat(w)),e.next=53,O(w);case 53:A=e.sent,i("Apple sub status is: ".concat(A)),e.next=61;break;case 57:e.prev=57,e.t1=e.catch(46),i("Apple sub check error: ".concat(e.t1)),alert("There was an error in logging you in, please try again.");case 61:if(V(v),!window.authentication_config.sessionManagementEnabled){e.next=66;break}return i("Saving idToken to session server"),e.next=66,Oe({idToken:m,accessToken:h});case 66:if(!n.searchParams.get("close-after-finish")){e.next=68;break}return e.abrupt("return",window.close());case 68:if(!n.search.includes("loginsource")){e.next=73;break}return S=n.searchParams.get("loginsource"),N=window.MNGAuthentication.postAuthEvents.map(function(){var e=t(o().mark((function e(t){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t(S));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),e.next=73,Promise.all(N);case 73:return e.prev=73,b=new URL(a),r&&A&&b.searchParams.append("access_token",encodeURIComponent(w)),i("Apple redirect URL:",b),e.abrupt("return",window.location.assign(b));case 80:e.prev=80,e.t2=e.catch(73),i("Failed to redirect after authentication: ",e.t2);case 83:return window.location.assign(new URL(window.location.origin)),e.abrupt("return","Finished execution, please await result...");case 85:case"end":return e.stop()}}),e,null,[[29,39],[46,57],[73,80]])})));return function(){return e.apply(this,arguments)}}(),Xe=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("ANALYTICS: fireBC events"),e.next=3,Se();case 3:i("ANALYTICS: bc values should be filled");case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Fe=function(){var e=t(o().mark((function e(){var t,n,r,a,s,c,u,l,d;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X();case 2:if(t=e.sent,n=t.idToken,r=t.isAuthenticated,""===n){e.next=17;break}return e.prev=6,a=R(n),s=a.email,c=a.picture,u=a.sub,(l=u.split("|")).pop(),d=l.join("|"),e.abrupt("return",{authenticated:r,email:s,picture:c,userId:u,connectionSource:d});case 14:e.prev=14,e.t0=e.catch(6),i("Unable to parse idToken: ",n," Error: ",e.t0);case 17:return e.abrupt("return",{authenticated:r});case 18:case"end":return e.stop()}}),e,null,[[6,14]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.login=Ge,window.MNGAuthentication.logout=Ue,window.MNGAuthentication.getUserInfo=Fe;var _e=function(){var e=t(o().mark((function e(){var n,r,s,c,u,l,d,p,f,m,h,g;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=y(),r=!1,s="",c=!1,u={},n.searchParams.get("returnAfterLogout")&&(l=decodeURIComponent(n.searchParams.get("returnAfterLogout")),window.location.assign(l)),n.searchParams.has("entitlement_jwt")&&(window.authentication_config.sessionManagementEnabled=!1),d=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,q();case 3:return t=e.sent,e.next=6,t.getIdTokenClaims();case 6:return u=e.sent,e.next=9,t.isAuthenticated();case 9:if(r=e.sent,s="object"===we(u)?u.__raw:"",n=N(A),r||!n){e.next=16;break}return e.next=15,t.getTokenSilently();case 15:c=e.sent;case 16:e.next=21;break;case 18:e.prev=18,e.t0=e.catch(0),i("Unable to verify user has active auth0 session: ",e.t0);case 21:case"end":return e.stop()}}),e,null,[[0,18]])})));return function(){return e.apply(this,arguments)}}(),!n.pathname.startsWith("/logout")){e.next=13;break}return i("Page is logout. Routing to logout function..."),e.next=12,Ue();case 12:return e.abrupt("return");case 13:if(!window.authentication_config.sessionManagementEnabled){e.next=39;break}return e.next=16,d();case 16:if(""===s){e.next=25;break}if(p=null,f=JSON.parse(window.localStorage.getItem(w)),"{}"!==Ne()){e.next=23;break}return f&&(p=f.jwt),e.next=23,Oe({idToken:s,entitlementToken:p});case 23:e.next=37;break;case 25:return e.prev=25,e.next=28,Re();case 28:m=e.sent,s=m.idToken,(r="string"==typeof s)&&(u=R(s)),e.next=37;break;case 34:e.prev=34,e.t0=e.catch(25),i("Unable to initialize session: ",e.t0);case 37:e.next=41;break;case 39:return e.next=41,d();case 41:if(r||c||!a.blueconicEnabled||!a.bcLowaSegements){e.next=46;break}return e.next=44,H();case 44:(h=e.sent).isSub&&(r=S,u={sub:h.uuid});case 46:if(Z({isAuthenticated:r,idToken:s,accessToken:c,claims:u}),te("authenticationReady"),!0===r?(i("User is authenticated."),n.searchParams.get("auth_redirect")&&(i("Auth Redirect is present, sending user to auth redirect..."),(g=n.searchParams.get("auth_redirect")).endsWith("#")&&(g=g.slice(0,g.length)),window.location.assign(g)),n.pathname.startsWith("/login")&&!ke()&&(i("Page is login. The user is already logged in and Connext Logout param is not present... Redirecting..."),window.location.assign(n.origin))):i("User is not authenticated."),n.pathname.startsWith("/login")&&!ke()?(i("Page is login. Attempting to log user in..."),Ge()):i("Page is not login or Connext state is present"),!n.pathname.startsWith("/callback")||!n.searchParams.get("regwall")){e.next=59;break}return i("Page is callback with regwall param. Routing to regwall receiver..."),e.next=55,Xe();case 55:i("Now login from regwall"),Ge(),e.next=63;break;case 59:if(!n.pathname.startsWith("/callback")){e.next=63;break}return i("Page is callback without regwall param. Routing to callback receiver..."),e.next=63,He();case 63:case"end":return e.stop()}}),e,null,[[25,34]])})));return function(){return e.apply(this,arguments)}}();window.MNGAuthentication.init=_e;function Ke(e,t){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"deeppink";i("employee tools: add spoof banner");var n=document.getElementById("page").querySelector("header");this.spoofBanner.style.backgroundColor=t,this.spoofBanner.id="spoof-banner",this.spoofContent.textContent=e,this.spoofBanner.append(this.spoofContent),n.prepend(this.spoofBanner)}},{key:"init",value:(s=t(o().mark((function n(){var r,a,s,c,u,l,d,p,f,m,h,g,E,A,w,v,S,y,N,b,I,C,T,L,O;return o().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(window.MNGAuthentication.logoutCallbacks.push(e.deleteLocalStorageSpoofUser),r=window.localStorage.getItem("spoof-user"),a=window.localStorage.getItem("manual-expiration"),s=je(this.source,this.email),i("employee tools: validate employee:",s),this.email&&this.employeeId&&(r||!this.source||s.employeeAccess&&"corporate"===s.accessGroup)&&(this.source||r)){n.next=7;break}return n.abrupt("return");case 7:(c=document.createElement("div")).id="employee-debugger",c.classList="employee-debugger-close",(u=document.createElement("div")).id="employee-debugger-button",u.innerHTML='\n\t\t\t\n\t\t',(l=document.createElement("div")).id="employee-debugger-content",l.innerHTML="\n\t\t\t

MNG Debugger

\n\t\t",(d=document.createElement("div")).id="employee-debugger-toggles",(p=document.createElement("div")).id="employee-spoof-wrapper",(f=document.createElement("label")).textContent="Spoof a user",this.userSpoofCheckbox=document.createElement("input"),this.userSpoofCheckbox.type="checkbox",this.userSpoofCheckbox.id="user-spoof-control",m="You are currently entitled as the user 🤫 ".concat(r," 🤫"),h=document.querySelectorAll(".logged-in-source"),(g=document.createElement("div")).id="employee-datepicker-wrapper",(E=document.createElement("label")).textContent="Set expiration",this.datePickerCheckbox=document.createElement("input"),this.datePickerCheckbox.type="checkbox",this.datePickerCheckbox.id="expiration-control",(A=document.createElement("div")).id="datepicker-wrapper",(w=document.createElement("input")).id="expiration-picker",w.type="datetime-local",(v=document.createElement("button")).id="apply-exp-btn",v.className="expiration-btn",(S=document.createElement("button")).id="reset-exp-btn",S.className="expiration-btn",(y=v.appendChild(document.createElement("span"))).className="tooltiptext",y.textContent="Apply date",(N=S.appendChild(document.createElement("span"))).className="tooltiptext",N.textContent="Reset to original",document.body.append(c),document.getElementById("employee-debugger").append(u,l),document.getElementById("employee-debugger-content").append(d),document.getElementById("employee-debugger-toggles").append(p,g),document.getElementById("employee-spoof-wrapper").append(f,this.userSpoofCheckbox),document.getElementById("employee-datepicker-wrapper").append(E,this.datePickerCheckbox,A),document.getElementById("datepicker-wrapper").append(w,v,S),document.getElementById("employee-debugger").append(u,l),b=JSON.parse(localStorage.getItem("__MNG_Session")),I=R(b.entitlementToken),C=new Date(1e3*b.expiration),T=new Date(1e3*I.session_exp),w.value=C.toISOString().replace(/.\d+Z$/g,""),(L=document.createElement("div")).style.padding="5px 0px 0px 10px",L.innerHTML='\n\t\t

Entitlements JWT

\n\t\t',Object.keys(I).forEach((function(e){var t=document.createElement("div");t.className="list-content";var n=document.createElement("p");n.className="collapsible-list",n.innerHTML="\n\t\t\t".concat(e,'\n\t\t\t+\n\t\t\t\n\t\t\t');var r=n.firstChild.nextElementSibling;r.style.display="inline";var o=n.lastChild.previousElementSibling,a=document.createElement("small");a.className="obj-value",a.innerHTML='⤷ ').concat(I[e],""),t.append(n,a),L.append(t),n.addEventListener("click",(function(){var e=n.nextElementSibling;"block"===e.style.display?(e.style.display="none",r.style.display="inline",o.style.display="none"):(e.style.display="block",o.style.display="inline",r.style.display="none")})),a.addEventListener("click",(function(){var t=document.getElementById("".concat(e,"_value")).innerHTML;navigator.clipboard&&navigator.clipboard.writeText(t)}))})),(O=document.createElement("div")).style.padding="5px 0px 0px 10px",O.innerHTML='\n\t\t\t\t

Connext answer

\n\t\t\t\t',document.addEventListener("onInit",t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("undefined"!=typeof Connext){e.next=7;break}(t=document.createElement("p")).className="connext-error-message",t.innerHTML="Something went wrong, reload may solve the issue.",O.append(t),e.next=11;break;case 7:return e.next=9,qe();case 9:n=e.sent,Object.keys(n).forEach((function(e){var t=document.createElement("div");t.className="list-content";var r=document.createElement("p");r.className="collapsible-list",r.innerHTML="\n\t\t\t\t".concat(e,'\n\t\t\t\t+\n\t\t\t\t\n\t\t\t\t');var o=r.firstChild.nextElementSibling;o.style.display="inline";var a=r.lastChild.previousElementSibling,i=document.createElement("small");i.className="obj-value",i.innerHTML='⤷ ').concat(n[e],""),t.append(r,i),O.append(t),r.addEventListener("click",(function(){var e=r.nextElementSibling;"block"===e.style.display?(e.style.display="none",o.style.display="inline",a.style.display="none"):(e.style.display="block",a.style.display="inline",o.style.display="none")})),i.addEventListener("click",(function(){var t=document.getElementById("".concat(e,"_value")).innerHTML;navigator.clipboard&&navigator.clipboard.writeText(t)}))}));case 11:case"end":return e.stop()}}),e)})))),document.getElementById("employee-debugger-content").append(d,L,O),document.getElementById("employee-debugger-toggles").append(p),document.getElementById("employee-spoof-wrapper").append(f,this.userSpoofCheckbox),document.getElementById("employee-debugger-button").addEventListener("click",(function(){console.log("clicked debugger");var e=document.getElementById("employee-debugger");e.classList.toggle("employee-debugger-close"),e.classList.contains("employee-debugger-close")?e.style.top="50%":e.style.top="20%"})),!r&&this.source&&this.source.toLowerCase().includes("employee")&&ve(h).forEach((function(e){var t=e;t.textContent="Subscriber - Employee",t.style.color="blue"})),r&&(this.addSpoofBannerToPage(m),this.userSpoofCheckbox.checked=!0,ve(h).forEach((function(e){var t=e;t.textContent="Subscriber - Employee (spoofing)",t.style.color="blue"}))),document.getElementById("apply-exp-btn").addEventListener("click",(function(){var t,n=null===(t=new Date(w.value))||void 0===t?void 0:t.getTime(),r=Math.floor(n/1e3);b.expiration=r,localStorage.setItem("__MNG_Session",JSON.stringify(b)),window.localStorage.setItem("manual-expiration",!0),e.interval&&clearInterval(e.interval),e.timeLeftPopUp(b.expiration)})),document.getElementById("reset-exp-btn").addEventListener("click",(function(){w.value=T.toISOString().replace(/.\d+Z$/g,"")})),this.addEventListeners(),a&&(this.datePickerCheckbox.click(),e.timeLeftPopUp(b.expiration));case 82:case"end":return n.stop()}}),n,this)}))),function(){return s.apply(this,arguments)})}],a=[{key:"deleteLocalStorageSpoofUser",value:function(){window.localStorage.removeItem("spoof-user"),localStorage.getItem("userNewsLetterData")&&window.localStorage.removeItem("userNewsLetterData"),i("Removed spoofed-user storage object.")}},{key:"timeLeftPopUp",value:function(e){var t=document.getElementById("expiration-pop-up");if(t)t.classList="",document.getElementById("time-left-text").textContent="Calculating time...";else{var n=document.createElement("div");n.id="expiration-pop-up";var r=n.appendChild(document.createElement("p"));r.id="time-left-text",r.textContent="Calculating time...",document.getElementById("employee-debugger").prepend(n)}var o=new Date(1e3*e).toLocaleString(),a=new Date(o).getTime();this.interval=setInterval((function(){var e=(new Date).getTime(),n=a-e,r=Math.floor(Math.abs(n/864e5))||0,o=Math.floor(Math.abs(n%864e5)/36e5)||0,i=Math.floor(Math.abs(n%36e5)/6e4)||0,s=Math.floor(Math.abs(n%6e4)/1e3);document.getElementById("time-left-text").textContent="Token expires in: ".concat(r,"d ").concat(o,"h ").concat(i,"m ").concat(s,"s 🕛"),n<0&&(document.getElementById("time-left-text").textContent="Token expired by: ".concat(r,"d ").concat(o,"h ").concat(i,"m ").concat(s,"s 🕛"),t.classList.contains("expiredToken")||(t.classList="expiredToken"))}),1e3)}},{key:"deleteLocalStorageManualExpiration",value:function(){window.localStorage.getItem("manual-expiration")&&(window.localStorage.removeItem("manual-expiration"),clearInterval(this.interval),document.getElementById("expiration-pop-up").remove())}}],r&&Ke(n.prototype,r),a&&Ke(n,a),e}(),Qe=function(){var e=t(o().mark((function e(n,r){var a,s,c;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i("Employee Tools: employeeAds: "),a=je(n,r),i("employee tools: validate employee:",a),"corporate"===a.accessGroup&&a.employeeAccess){e.next=5;break}return e.abrupt("return",!1);case 5:return e.next=7,new Promise((function(e){if(k())e();else{i("UIHandler: Employee Debugger: ","Waiting for the digisubs debugger toolbox to load...");var n=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:document.getElementById("employee-debugger-content")&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),200)}}));case 7:return(s=document.createElement("div")).id="employee-debugger-adfree",s.innerHTML='\n\t\t\n\t\t\n\t\t

(page will reload)

\n\t',document.getElementById("employee-debugger-toggles").append(s),(void 0!==(c=localStorage.getItem("hhsl"))&&"access"===c||"undefined"!=typeof MNGAuthentication&&"function"==typeof MNGAuthentication.isUserAdFree&&MNGAuthentication.isUserAdFree())&&(document.getElementById("employee-adfree-toggle").checked=!0,window.MNGAuthentication.isUserAdFree=!0),document.getElementById("employee-adfree-toggle").addEventListener("click",(function(e){i("employee tools: employee ad toggle clicked"),e.target.checked?(i("Employee tools: employee ads: turn off"),localStorage.setItem("hhsl","access"),window.MNGAuthentication.isUserAdFree=!0,setTimeout((function(){window.location.reload()}),500)):(i("Employee tools: employee ads: turn on"),localStorage.removeItem("hhsl"),setTimeout((function(){window.location.reload()}),500))})),e.abrupt("return",!0);case 15:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();var ze,$e,et,tt,nt,rt=[],ot=L(),at="".concat(a.entitlementsEndpoint,"newsletters"),it=function(e){var t=new Date,n=Math.round(t.getTime()/1e3)-86400;return new Date(e)>=new Date(1e3*n).getTime()},st=function(){var e=t(o().mark((function e(t){var n,r,s;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=at,"get"===t.method&&(n="".concat(n,"?email=").concat(t.dataToSend.email,"&domain=").concat(t.dataToSend.domain)),e.prev=2,e.next=5,g()({method:t.method,url:n,headers:{"X-Api-Key":a.entitlementsApiKey},data:t.dataToSend});case 5:r=e.sent,"get"===t.method&&((rt=r.data.responseData).sort((function(e,t){return e.title>t.title?1:-1})),"limited"===$e?(s=rt.filter((function(e){return!e.subscriberOnly})),localStorage.setItem("userNewsLetterData",JSON.stringify({expoDate:new Date,newsLetterData:s}))):localStorage.setItem("userNewsLetterData",JSON.stringify({expoDate:new Date,newsLetterData:rt})),pt()),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),i("newsletter: ",e.t0);case 12:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),ct=function(){var e,t,n=navigator.userAgent,r=/^((?!chrome|android).)*safari/i.test(n),o=/Chrome/.test(n);return r?"calc(100vh - 8.5rem)":o?"calc(100vh - ".concat((e=window.innerHeight,(t=(window.screen.height-e)/16)>0?t:0),"rem)"):"calc(100vh - 64px)"},ut=function(e){e.stopPropagation();var t={},n=e.target,r=e.target.classList.contains("dropDownNewsLetter")?".slideOutNewsLetter":".dropDownNewsLetter",o=parseInt(n.getAttribute("data-id"),10),a=n.checked;document.querySelector("".concat(r,'[data-id="').concat(o,'"]')).checked=a,rt.find((function(e){return e.id===o})).isSubscribed=a,t.method=a?"post":"delete",t.dataToSend={email:ze,domain:ot,preferenceId:o},dt(t)},lt=function(e){e.stopPropagation();var t=e.target;if(t.matches("span")||t.matches("label")){var n,r=t.closest("div"),o=r.querySelector(".newsletter-icon"),a="block"===(n=r.classList.contains("show-digisubs-push")?document.querySelector("#newsLetterItem-push"):document.querySelector("#newsLetterContent-dropdown")).style.display,i=document.querySelector(".wrapper-nav-subs.pushnav.pushnav-right"),s=/iPad|iPhone|iPod/.test(navigator.userAgent),c=/Android/i.test(navigator.userAgent);a?(o.classList.remove("icon-arrow-down"),o.classList.add("icon-arrow-right"),n.style.display="none",""!==i.style.height&&(i.style.height="")):(o.classList.remove("icon-arrow-right"),o.classList.add("icon-arrow-down"),n.style.display="block",s&&window.innerHeight\n\t\tinfo\n\t\t\n\t\t\n\t\t\n\t'),u="url(data:image/svg+xml;base64,".concat(c,")");s.style.background=u;var l=document.createElement("p"),d=document.createElement("a"),p=ee();d.setAttribute("href","https://myaccount.".concat(p)),d.setAttribute("id","myAccountLink"),d.textContent="MyAccount",l.appendChild(document.createTextNode("Manage your newsletters here or visit ")),l.appendChild(d),l.appendChild(document.createTextNode(" for more information")),i.append(s),i.append(l);var f=i.cloneNode(!0);o.append(i),a.append(f);var m,h,g,E=(m={},rt.forEach((function(e){var t=e.category[0].Title;e.isSubscribed&&"Media News Group"!==t&&"MediaNews Group"!==t?m["My Newsletters:"]?m["My Newsletters:"].push(e):m["My Newsletters:"]=[e]:m[t]?m[t].push(e):m[t]=[e]})),m),A=(h=E,"My Newsletters:"===(g=Object.keys(h).sort((function(e,t){return"My Newsletters:"===e?-1:"My Newsletters:"===t?1:e.localeCompare(t)})))[0]?g.splice(1,0,"".concat(nt," Newsletters:")):g=["".concat(nt," Newsletters:")].concat(ve(g)),g);E["".concat(nt," Newsletters:")]=[],A.forEach((function(e){if("Media News Group"!==e&&"MediaNews Group"!==e&&"MediaNewsGroup"!==e&&"Not Active"!==e){var t=document.createElement("li");t.classList.add("titleContainer");var n=document.createElement("li");n.classList.add("titleContainer");var r=document.createElement("label");r.classList.add("newsletterCategoryTitle"),r.textContent=e,"My Newsletters:"!==e&&e!=="".concat(nt," Newsletters:")||r.classList.add("newsLetterTitleBold");var i=r.cloneNode(!0);t.append(r),n.append(i),o.append(t),a.append(n),E[e].forEach((function(e){var t=document.createElement("li");t.classList.add("dropdown-item-newsletter");var n=document.createElement("li");n.classList.add("show-digisubs-push","newsLetter-container-push");var r=document.createElement("input");r.classList.add("newsLetterSubscriberToggle"),r.type="checkbox",r.name="newsLetter_".concat(e.title),r.setAttribute("data-id",e.id),r.checked=e.isSubscribed,r.style.cursor="pointer",r.addEventListener("click",ut),tt&&(r.disabled=!0);var i=document.createElement("label");i.textContent=e.title,i.setAttribute("for","newsLetter_".concat(e.title));var s=r.cloneNode(),c=i.cloneNode(!0);s.addEventListener("click",ut),r.classList.add("dropDownNewsLetter"),s.classList.add("slideOutNewsLetter"),t.append(r,i),n.append(s,c),o.append(t),a.append(n)}))}})),o.style.display="none",a.style.display="none"};const ft=function(e,t,n,r){if(ze=e,$e=t,nt=r,tt=n){V("userNewsLetterData");for(var o=document.getElementById("newsLetterContent-dropdown"),a=document.getElementById("newsLetterItem-push");o.firstChild;)o.firstChild.remove();for(;a.firstChild;)a.firstChild.remove()}if(i("host for newsletter prefs",ot),localStorage.getItem("userNewsLetterData")){var s=JSON.parse(localStorage.getItem("userNewsLetterData"));et=s.expoDate,it(et)?(rt=s.newsLetterData,pt()):st({method:"get",dataToSend:{email:ze,domain:ot}})}else st({method:"get",dataToSend:{email:ze,domain:ot}})};var mt=function(){var e=le()?le().querySelector(ie):null,t=le();null!==e&&t.removeChild(e)};const ht=function(){var e=t(o().mark((function e(n){var r,s,c,u,l,d,p,f,m,h,g,E,A,w,v,N,b,I,C,T,L,R,O,x,B,M,U,P,G,D,H,X,F,_,K,Y,W,V,j,J,q,Z,Q,$,te,ne,re,oe,ae,ie;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=n.authenticatedStatus,s=n.email,c=n.picture,u=n.connectionSource,l=n.entitlementSource,d=n.entitlementLevel,p=n.serviceCode,f=n.isEedition,m=n.accountHref,h=n.userId,g="",E=" | Logged in with ",A=[],w=s,void 0!==s&&"undefined"!==s||(w="Logged In"),e.prev=6,e.t0=u,e.next="google-oauth2"===e.t0?10:"facebook"===e.t0?12:"apple"===e.t0?14:16;break;case 10:return E+="Google",e.abrupt("break",18);case 12:return E+="Facebook",e.abrupt("break",18);case 14:return E+="Apple",e.abrupt("break",18);case 16:return E="",e.abrupt("break",18);case 18:e.t1=d,e.next="limited"===e.t1?21:"subscriber"===e.t1||"freeTrial"===e.t1?23:"premium"===e.t1?25:"comp"===e.t1?27:"partner-access"===e.t1?29:31;break;case 21:return g="Limited Access - Subscribe now for access",e.abrupt("break",33);case 23:return g="Standard Digital Access",e.abrupt("break",33);case 25:return g="Premium Ad-Free Access",e.abrupt("break",33);case 27:return g="Standard Digital Trial",e.abrupt("break",33);case 29:return g="Partner Access",e.abrupt("break",33);case 31:return g="Anonymous",e.abrupt("break",33);case 33:for(r===S&&(E="",g="Anonymous"),f&&p&&p.includes("P")&&(g="Limited Subscription - e-Edition access"),mt(),(N=me()).removeChild(N.firstChild),(b=document.createElement("a")).id="anchorProfileDropDown",b.className="nav-link dropdown-toggle",b.setAttribute("aria-label","Account menu dropdown"),b.style.cursor="pointer",b.setAttribute("tabindex","0"),b.setAttribute("aria-expanded","false"),I=document.createElement("img"),C=document.getElementById("pushnav-icon"),I.className="rounded-circle",I.alt="Profile image",C.className="rounded-circle",I.src=c,C.src=c,c||(I.src="https://ui-static-assets-prod.mng-digisubs-prod.com/img/no-icon.png",C.src="https://ui-static-assets-prod.mng-digisubs-prod.com/img/no-icon.png"),(T=document.createElement("span")).className="icon-arrow-down",T.id="icon-caret",T.setAttribute("aria-hidden","true"),(L=document.createElement("div")).id="account-content",L.className="dropdown-menu",N.append(b,L),R="",window.dataLayer.forEach((function(e){Object.prototype.hasOwnProperty.call(e,"SiteName")&&(R=e.SiteName)})),O=window,x=O.location,B=new URL(x),U=null,r!==S?((U=document.createElement("a")).className="dropdown-item dropdown-profile account-link",U.text=w):document.getElementById("push-email-link").style.display="none",r===S&&((P=document.createElement("li")).className="dropdown-item log-in-button subscribe-special custom-button",G=document.createElement("a"),D=y(),G.href="/login?returnUrl=".concat(D),G.text="Complete Log In",G.style.cursor="pointer",G.style.margin="0",G.style.width="auto",P.append(G)),(H=document.createElement("p")).className="dropdown-item logged-in-source",H.appendChild(document.createTextNode("".concat(g).concat(E))),(X=document.createElement("a")).className="dropdown-item account-link account-settings",X.text="Account Settings",X.target="_blank",X.setAttribute("data-mng-click","account-settings"),X.setAttribute("data-mng-category","account-link"),X.setAttribute("data-mng-action","account-settings"),a.enableReaderDashboardLink&&((M=document.createElement("a")).className="dropdown-item",M.id="reader-dashboard-link",M.text="Reader Dashboard",M.target="_blank",M.setAttribute("data-mng-click","reader-dashboard"),M.setAttribute("data-mng-category","account-link"),M.setAttribute("data-mng-action","reader-dashboard"),M.style.display="block",B.origin.includes(ee())?M.href="".concat(B.origin,"/re/dashboard"):M.href="https://".concat(ee(),"/re/dashboard")),(F=document.createElement("a")).className="dropdown-item",F.text="Contact Us",F.href="contact-us",F.setAttribute("data-mng-click","contact-us"),F.setAttribute("data-mng-category","account-link"),F.setAttribute("data-mng-action","contact-us"),(_=document.createElement("a")).className="dropdown-item log-out-button",_.text="Log out",_.setAttribute("data-mng-click","log-out"),_.setAttribute("data-mng-category","account-link"),_.setAttribute("data-mng-action","log-out"),(K=document.createElement("div")).id="marketing-content",K.className="dropdown-item marketing-slot-div",_.href="".concat(B.origin,"/logout"),(Y=document.createElement("ul")).className="newsLetterContent dropdown-item",Y.id="newsLetterContent-dropdown",N.id="profileDropDown",N.className="nav-item dropdown auth-visible show",b.append(I,T),U&&document.getElementById("account-content").append(U),P&&document.getElementById("account-content").append(P),W=[H,X].concat(ve(M?[M]:[]),[F,_,K,Y]),(v=document.getElementById("account-content")).append.apply(v,ve(W)),document.getElementById("push-auth-source").textContent="".concat(""!==R?"".concat(R," - "):"").concat(g).concat(E),document.getElementById("push-email-link").textContent=w,document.getElementById("push-account-content").style.display="block",document.getElementById("blank-icon-user").style.display="none",a.enableReaderDashboardLink&&((V=document.createElement("a")).className="show-digisubs-push dashboard-link",V.id="push-reader-dashboard",V.text="Reader Dashboard",V.href="".concat(B.origin,"/user-tools/dashboard"),document.querySelector("#push-account-link").after(V)),i("Employee tools: start tools here",l,s,h),!1===(j=l)&&(j="none"),(J=new Ze(j,s,h)).init(),Qe(j,s),a.newslettersEnabled&&d?(q=w,Z=!1,J.userSpoofCheckbox&&(Z=J.userSpoofCheckbox.checked),localStorage.getItem("spoof-user")&&(q=localStorage.getItem("spoof-user")),!0===r&&ft(q,d,Z,R)):Y.style.display="none",Q=function(){var e=document.getElementById("icon-caret"),t=e.classList.contains("icon-arrow-up");t||(e.className="icon-arrow-up",b.setAttribute("aria-expanded","true")),t&&(e.className="icon-arrow-down",b.setAttribute("aria-expanded","false"))},document.getElementById("profileDropDown").addEventListener("click",(function(){document.getElementById("account-content").classList.toggle("show"),Q()})),document.getElementById("anchorProfileDropDown").addEventListener("keydown",(function(e){"Enter"===e.key&&(document.getElementById("account-content").classList.toggle("show"),Q())})),document.addEventListener("click",(function(e){b.contains(e.target)||(document.getElementById("account-content").classList.remove("show"),b.setAttribute("aria-expanded","false"),T.className="icon-arrow-up")})),A=document.getElementsByClassName("account-link"),$=0;$0?new URL("https://membership.".concat(n)):new URL("https://myaccount.".concat(n))},wt=function(){var e=t(o().mark((function e(t){var n,r,a,i;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=t.entitlementSource,r=t.accountHref,a="My Account",void 0!==window.MNGPaywall&&"Piano"===n&&(a="Account"),(i=he()).textContent=a,i.setAttribute("href",r);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),vt=function(e){try{void 0!==window.MNGAuthentication&&("keydown"===e.type&&"Enter"===e.key||"click"===e.type)&&(e.preventDefault(),window.MNGAuthentication.logout())}catch(e){i(e)}},St=function(e){i("UIHandler: ","engage overrides showing block: ",e);var t=document.createElement("style"),n=".".concat(e,"{display:inline-block !important;}");t.textContent=".engageLogoutLink, .engageLoginLink {display:none !important;}"+n,document.getElementsByTagName("head")[0].appendChild(t)},yt=function(){i("UIHandler: ","show logout buttons"),St("engageLogoutLink"),document.querySelectorAll(ie).forEach((function(e){var t=e;t.style.visibility="visible",t.style.display="block",t.addEventListener("click",vt),t.addEventListener("keydown",vt)}))},Nt=function(){i("UIHandler: ","show login buttons"),St("engageLoginLink"),document.querySelectorAll(oe).forEach((function(e){var t=e;t.style.visibility="visible",t.style.display="block",t.querySelector("a").textContent="Log in";var n=new URL(t.querySelector("a").href),r=new URLSearchParams(n);r.append("returnUrl",y()),t.querySelector("a").setAttribute("href","".concat(n,"?").concat(r))}))},bt=function(){var e=t(o().mark((function e(){var t,n,r,s,c,u,l,d,p,f,m,h,g,E,A,w,v;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i("UIHandler: ","setup"),e.next=3,Fe();case 3:return t=e.sent,n=t.authenticated,r=t.email,s=t.picture,c=t.connectionSource,u=t.userId,e.next=11,gt();case 11:if(l=e.sent,d=l.userIsEntitled,p=l.entitlementSource,f=l.entitlementLevel,m=l.serviceCode,h=l.isEedition,g=l.tokenEmail,E=At({siteUrl:ee()}),!n){e.next=31;break}if(!a.dropdownEnabled){e.next=26;break}return n===S||r&&!r.includes("@example.com")||(r=g),e.next=24,ht({authenticatedStatus:n,email:r,picture:s,connectionSource:c,entitlementSource:p,entitlementLevel:f,serviceCode:m,isEedition:h,accountHref:E,userId:u});case 24:e.next=28;break;case 26:return e.next=28,wt({entitlementSource:p,siteUrl:L(),accountHref:E});case 28:yt(),e.next=32;break;case 31:Nt();case 32:A=document.getElementById(ue),d?(Ae().forEach((function(e){e.style.display="none"})),A&&(A.style.display="none")):(Ae().forEach((function(e){var t=e;t.style.display="block",Et(t)})),A&&(A.style.display="flex",w=y(),(v=new URL(A.getAttribute("href"))).searchParams.set("returnUrl",encodeURIComponent(w.href)),A.setAttribute("href",v.href)));case 34:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),It=function(){var e=me();e&&(e.style.display="block",e.style.visibility="visible");var t=he();t&&(t.textContent="Loading...")},Ct=function(){var e=t(o().mark((function e(){var t;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return e.next=4,U();case 4:if("article"===e.sent){e.next=9;break}i("StnHandler: Non-article page detected, leaving stnHandler function"),e.next=22;break;case 9:if(i("StnHandler: Article page detected, waiting for entitlements"),"undefined"!=typeof MNGAuthentication){e.next=13;break}return e.next=13,X();case 13:return e.next=15,F();case 15:if(!e.sent.adfree){e.next=22;break}return i("StnHandler: User is premium, Waiting for send to news player to exist"),e.next=20,Q("stn-player");case 20:(t=e.sent)&&(i("StnHandler: Send to news player found, removing it for adfree user",t),t.parentNode.style.display="none");case 22:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Tt=function(){var e=t(o().mark((function e(){var t,n,r,a;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("1"===window.authentication_config.serverEntitlements){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,B();case 4:return e.next=6,U();case 6:if("article"===e.sent){e.next=11;break}i("audioPlayerHandler: Non-article page, leaving audioPlayerHandler function"),e.next=21;break;case 11:if(i("audioPlayerHandler: Article page detected, waiting for entitlements"),"undefined"!=typeof MNGAuthentication){e.next=15;break}return e.next=15,X();case 15:return e.next=17,F();case 17:t=e.sent,n=window.dataLayer.find((function(e){return e.Paywall_Level})).Paywall_Level,r=!(!t||!t.isEntitled),"premium"!==n||r||(i("audioPlayerHandler: LINA user on premium article, initialize audio player removal"),(a=document.getElementsByClassName("wp-remixd-voice-wrapper")).length>0?(i("audioPlayerHandler: Audio player found, removing it from the DOM"),a[0].remove()):i("audioPlayerHandler: Audio player not found or removed already"));case 21:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Lt=function(){var e=t(o().mark((function e(){var t,n;return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,B();case 2:return e.next=4,U();case 4:if("article"===e.sent){e.next=7;break}return e.abrupt("return");case 7:return e.next=9,Q(".article-bottom-share");case 9:(t=e.sent)&&(i("articleBottomShareHandler: Bottom article share buttons found, updating styles",t),n=document.querySelector(".article-body"),t.style.width="".concat(n.clientWidth,"px"),t.style.margin="0 auto");case 11:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Rt=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return It(),e.next=3,bt();case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ot=function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,new Promise((function(e){if(k())e();else{i("UIHandler: ","Waiting for the log-in-button class to load...");var n=setInterval(t(o().mark((function t(){return o().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:document.getElementsByClassName("log-in-button").length>1&&(clearInterval(n),e(!0));case 1:case"end":return t.stop()}}),t)}))),200)}}));case 2:return e.next=4,Rt();case 4:Ct(),Tt(),Lt();case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(function(){var e=t(o().mark((function e(){return o().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Ot();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}})()()})()})(); //# sourceMappingURL=mng-digisubs.uiHandler.bundle.js.map;