vendor: 23,081 bytes, lines 1-2
1/*! For license information please see mng-digisubs.articleShare.bundle.js.LICENSE.txt */ 2(()=>{var e={7526(e,t){"use strict";t.toByteArray=function(e){var t,n,i=s(e),a=i[0],c=i[1],u=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,c)),l=0,d=c>0?a-4:a;for(n=0;n<d;n+=4)t=r[e.charCodeAt(n)]<<18|r[e.charCodeAt(n+1)]<<12|r[e.charCodeAt(n+2)]<<6|r[e.charCodeAt(n+3)],u[l++]=t>>16&255,u[l++]=t>>8&255,u[l++]=255&t;2===c&&(t=r[e.charCodeAt(n)]<<2|r[e.charCodeAt(n+1)]>>4,u[l++]=255&t);1===c&&(t=r[e.charCodeAt(n)]<<10|r[e.charCodeAt(n+1)]<<4|r[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t);return u},t.fromByteArray=function(e){for(var t,r=e.length,o=r%3,i=[],a=16383,s=0,c=r-o;s<c;s+=a)i.push(u(e,s,s+a>c?c:s+a));1===o?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===o&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"="));return i.join("")};for(var n=[],r=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)n[a]=i[a],r[i.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function c(e){return n[e>>18&63]+n[e>>12&63]+n[e>>6&63]+n[63&e]}function u(e,t,n){for(var r,o=[],i=t;i<n;i+=3)r=(e[i]<<16&16711680)+(e[i+1]<<8&65280)+(255&e[i+2]),o.push(c(r));return o.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},8287(e,t,n){"use strict";const r=n(7526),o=n(251),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.hp=c,t.IS=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,c.prototype),t}function c(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return d(e)}return u(e,t,n)}function u(e,t,n){if("string"==typeof e)return function(e,t){"string"==typeof t&&""!==t||(t="utf8");if(!c.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const n=0|y(e,t);let r=s(n);const o=r.write(e,t);o!==n&&(r=r.slice(0,o));return r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(z(e,Uint8Array)){const t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(z(e,ArrayBuffer)||e&&z(e.buffer,ArrayBuffer))return f(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(z(e,SharedArrayBuffer)||e&&z(e.buffer,SharedArrayBuffer)))return f(e,t,n);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const r=e.valueOf&&e.valueOf();if(null!=r&&r!==e)return c.from(r,t,n);const o=function(e){if(c.isBuffer(e)){const t=0|p(e.length),n=s(t);return 0===n.length||e.copy(n,0,0,t),n}if(void 0!==e.length)return"number"!=typeof e.length||q(e.length)?s(0):h(e);if("Buffer"===e.type&&Array.isArray(e.data))return h(e.data)}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return c.from(e[Symbol.toPrimitive]("string"),t,n);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function d(e){return l(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),n=s(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function f(e,t,n){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(n||0))throw new RangeError('"length" is outside of buffer bounds');let r;return r=void 0===t&&void 0===n?new Uint8Array(e):void 0===n?new Uint8Array(e,t):new Uint8Array(e,t,n),Object.setPrototypeOf(r,c.prototype),r}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function y(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||z(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const n=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===n)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return J(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return V(e).length;default:if(o)return r?-1:J(e).length;t=(""+t).toLowerCase(),o=!0}}function g(e,t,n){let r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return C(this,t,n);case"utf8":case"utf-8":return R(this,t,n);case"ascii":return I(this,t,n);case"latin1":case"binary":return N(this,t,n);case"base64":return _(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function w(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),q(n=+n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:v(e,t,n,r,o);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):v(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function v(e,t,n,r,o){let i,a=1,s=e.length,c=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,c/=2,n/=2}function u(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(o){let r=-1;for(i=n;i<s;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*a}else-1!==r&&(i-=i-r),r=-1}else for(n+c>s&&(n=s-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function A(e,t,n,r){n=Number(n)||0;const o=e.length-n;r?(r=Number(r))>o&&(r=o):r=o;const i=t.length;let a;for(r>i/2&&(r=i/2),a=0;a<r;++a){const r=parseInt(t.substr(2*a,2),16);if(q(r))return a;e[n+a]=r}return a}function E(e,t,n,r){return Y(J(t,e.length-n),e,n,r)}function b(e,t,n,r){return Y(function(e){const t=[];for(let n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function S(e,t,n,r){return Y(V(t),e,n,r)}function T(e,t,n,r){return Y(function(e,t){let n,r,o;const i=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,o=n%256,i.push(o),i.push(r);return i}(t,e.length-n),e,n,r)}function _(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function R(e,t,n){n=Math.min(e.length,n);const r=[];let o=t;for(;o<n;){const t=e[o];let i=null,a=t>239?4:t>223?3:t>191?2:1;if(o+a<=n){let n,r,s,c;switch(a){case 1:t<128&&(i=t);break;case 2:n=e[o+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[o+1],r=e[o+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[o+1],r=e[o+2],s=e[o+3],128==(192&n)&&128==(192&r)&&128==(192&s)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&s,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,a=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),o+=a}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=O));return n}(r)}c.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),c.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(c.prototype,"parent",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.buffer}}),Object.defineProperty(c.prototype,"offset",{enumerable:!0,get:function(){if(c.isBuffer(this))return this.byteOffset}}),c.poolSize=8192,c.from=function(e,t,n){return u(e,t,n)},Object.setPrototypeOf(c.prototype,Uint8Array.prototype),Object.setPrototypeOf(c,Uint8Array),c.alloc=function(e,t,n){return function(e,t,n){return l(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},c.allocUnsafe=function(e){return d(e)},c.allocUnsafeSlow=function(e){return d(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),z(t,Uint8Array)&&(t=c.from(t,t.offset,t.byteLength)),!c.isBuffer(e)||!c.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let n=e.length,r=t.length;for(let o=0,i=Math.min(n,r);o<i;++o)if(e[o]!==t[o]){n=e[o],r=t[o];break}return n<r?-1:r<n?1:0},c.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},c.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return c.alloc(0);let n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;const r=c.allocUnsafe(t);let o=0;for(n=0;n<e.length;++n){let t=e[n];if(z(t,Uint8Array))o+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,o)):Uint8Array.prototype.set.call(r,t,o);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,o)}o+=t.length}return r},c.byteLength=y,c.prototype._isBuffer=!0,c.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)w(this,t,t+1);return this},c.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},c.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?R(this,0,e):g.apply(this,arguments)},c.prototype.toLocaleString=c.prototype.toString,c.prototype.equals=function(e){if(!c.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===c.compare(this,e)},c.prototype.inspect=function(){let e="";const n=t.IS;return e=this.toString("hex",0,n).replace(/(.{2})/g,"$1 ").trim(),this.length>n&&(e+=" ... "),"<Buffer "+e+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,o){if(z(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),!c.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(o>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0);const s=Math.min(i,a),u=this.slice(r,o),l=e.slice(t,n);for(let e=0;e<s;++e)if(u[e]!==l[e]){i=u[e],a=l[e];break}return i<a?-1:a<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},c.prototype.write=function(e,t,n,r){if(void 0===t)r="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===r&&(r="utf8")):(r=n,n=void 0)}const o=this.length-t;if((void 0===n||n>o)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return A(this,e,t,n);case"utf8":case"utf-8":return E(this,e,t,n);case"ascii":case"latin1":case"binary":return b(this,e,t,n);case"base64":return S(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function I(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(127&e[o]);return r}function N(e,t,n){let r="";n=Math.min(e.length,n);for(let o=t;o<n;++o)r+=String.fromCharCode(e[o]);return r}function C(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let o="";for(let r=t;r<n;++r)o+=Z[e[r]];return o}function k(e,t,n){const r=e.slice(t,n);let o="";for(let e=0;e<r.length-1;e+=2)o+=String.fromCharCode(r[e]+256*r[e+1]);return o}function L(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function P(e,t,n,r,o,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError("Index out of range")}function x(e,t,n,r,o){K(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,a>>=8,e[n++]=a,n}function M(e,t,n,r,o){K(t,r,o,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=a,a>>=8,e[n+2]=a,a>>=8,e[n+1]=a,a>>=8,e[n]=a,n+8}function U(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,4),o.write(e,t,n,r,23,4),n+4}function D(e,t,n,r,i){return t=+t,n>>>=0,i||U(e,0,n,8),o.write(e,t,n,r,52,8),n+8}c.prototype.slice=function(e,t){const n=this.length;(e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e);const r=this.subarray(e,t);return Object.setPrototypeOf(r,c.prototype),r},c.prototype.readUintLE=c.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e+--t],o=1;for(;t>0&&(o*=256);)r+=this[e+--t]*o;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||L(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},c.prototype.readUint32BE=c.prototype.readUInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Q(function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,o=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(o)<<BigInt(32))}),c.prototype.readBigUInt64BE=Q(function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],o=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(o)}),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=this[e],o=1,i=0;for(;++i<t&&(o*=256);)r+=this[e+i]*o;return o*=128,r>=o&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||L(e,t,this.length);let r=t,o=1,i=this[e+--r];for(;r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||L(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||L(e,2,this.length);const n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt16BE=function(e,t){e>>>=0,t||L(e,2,this.length);const n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},c.prototype.readInt32LE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},c.prototype.readInt32BE=function(e,t){return e>>>=0,t||L(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Q(function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=this[e+4]+256*this[e+5]+65536*this[e+6]+(n<<24);return(BigInt(r)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),c.prototype.readBigInt64BE=Q(function(e){F(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(r)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+n)}),c.prototype.readFloatLE=function(e,t){return e>>>=0,t||L(e,4,this.length),o.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||L(e,4,this.length),o.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||L(e,8,this.length),o.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||L(e,8,this.length),o.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){P(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=1,i=0;for(this[t]=255&e;++i<n&&(o*=256);)this[t+i]=e/o&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){if(e=+e,t>>>=0,n>>>=0,!r){P(this,e,t,n,Math.pow(2,8*n)-1,0)}let o=n-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,255,0),this[t]=255&e,t+1},c.prototype.writeUint16LE=c.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeUint16BE=c.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeUint32LE=c.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},c.prototype.writeUint32BE=c.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigUInt64LE=Q(function(e,t=0){return x(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeBigUInt64BE=Q(function(e,t=0){return M(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),c.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}let o=0,i=1,a=0;for(this[t]=255&e;++o<n&&(i*=256);)e<0&&0===a&&0!==this[t+o-1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},c.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t>>>=0,!r){const r=Math.pow(2,8*n-1);P(this,e,t,n,r-1,-r)}let o=n-1,i=1,a=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===a&&0!==this[t+o+1]&&(a=1),this[t+o]=(e/i|0)-a&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},c.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},c.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},c.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},c.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||P(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},c.prototype.writeBigInt64LE=Q(function(e,t=0){return x(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeBigInt64BE=Q(function(e,t=0){return M(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return D(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return D(this,e,t,!1,n)},c.prototype.copy=function(e,t,n,r){if(!c.isBuffer(e))throw new TypeError("argument should be a Buffer");if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);const o=r-n;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,n,r):Uint8Array.prototype.set.call(e,this.subarray(n,r),t),o},c.prototype.fill=function(e,t,n,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,n=this.length):"string"==typeof n&&(r=n,n=this.length),void 0!==r&&"string"!=typeof r)throw new TypeError("encoding must be a string");if("string"==typeof r&&!c.isEncoding(r))throw new TypeError("Unknown encoding: "+r);if(1===e.length){const t=e.charCodeAt(0);("utf8"===r&&t<128||"latin1"===r)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<n)throw new RangeError("Out of range index");if(n<=t)return this;let o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(o=t;o<n;++o)this[o]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),a=i.length;
vendor: 4,591 bytes, line 2
2if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<n-t;++o)this[o+t]=i[o%a]}return this};const H={};function G(e,t,n){H[e]=class extends n{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function W(e){let t="",n=e.length;const r="-"===e[0]?1:0;for(;n>=r+4;n-=3)t=`_${e.slice(n-3,n)}${t}`;return`${e.slice(0,n)}${t}`}function K(e,t,n,r,o,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let o;throw o=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new H.ERR_OUT_OF_RANGE("value",o,e)}!function(e,t,n){F(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||j(t,e.length-(n+1))}(r,o,i)}function F(e,t){if("number"!=typeof e)throw new H.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,n){if(Math.floor(e)!==e)throw F(e,n),new H.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new H.ERR_BUFFER_OUT_OF_BOUNDS;throw new H.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}G("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),G("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),G("ERR_OUT_OF_RANGE",function(e,t,n){let r=`The value of "${e}" is out of range.`,o=n;return Number.isInteger(n)&&Math.abs(n)>2**32?o=W(String(n)):"bigint"==typeof n&&(o=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(o=W(o)),o+="n"),r+=` It must be ${t}. Received ${o}`,r},RangeError);const X=/[^+/0-9A-Za-z-_]/g;function J(e,t){let n;t=t||1/0;const r=e.length;let o=null;const i=[];for(let a=0;a<r;++a){if(n=e.charCodeAt(a),n>55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function V(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(X,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function Y(e,t,n,r){let o;for(o=0;o<r&&!(o+n>=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function z(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let o=0;o<16;++o)t[r+o]=e[n]+e[o]}return t}();function Q(e){return"undefined"==typeof BigInt?$:e}function $(){throw new Error("BigInt not supported")}},251(e,t){t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,c=(1<<s)-1,u=c>>1,l=-7,d=n?o-1:0,h=n?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-l)-1,f>>=-l,l+=s;l>0;i=256*i+e[t+d],d+=h,l-=8);for(a=i&(1<<-l)-1,i>>=-l,l+=r;l>0;a=256*a+e[t+d],d+=h,l-=8);if(0===i)i=1-u;else{if(i===c)return a?NaN:1/0*(f?-1:1);a+=Math.pow(2,r),i-=u}return(f?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,c,u=8*i-o-1,l=(1<<u)-1,d=l>>1,h=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,f=r?0:i-1,p=r?1:-1,y=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-a))<1&&(a--,c*=2),(t+=a+d>=1?h/c:h*Math.pow(2,1-d))*c>=2&&(a++,c/=2),a+d>=l?(s=0,a=l):a+d>=1?(s=(t*c-1)*Math.pow(2,o),a+=d):(s=t*Math.pow(2,d-1)*Math.pow(2,o),a=0));o>=8;e[n+f]=255&s,f+=p,s/=256,o-=8);for(a=a<<o|s,u+=o;u>0;e[n+f]=255&a,f+=p,a/=256,u-=8);e[n+f-p]|=128*y}},5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},6993(e,t,n){var r=n(5546);function o(){var t,n,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function c(e,o,i,a){var s=o&&o.prototype instanceof l?o:l,c=Object.create(s.prototype);return r(c,"_invoke",function(e,r,o){var i,a,s,c=0,l=o||[],d=!1,h={p:0,n:0,v:t,a:f,f
vendor: 1,956 bytes, line 2
2:f.bind(t,4),d:function(e,n){return i=e,a=0,s=t,h.n=n,u}};function f(e,r){for(a=e,s=r,n=0;!d&&c&&!o&&n<l.length;n++){var o,i=l[n],f=h.p,p=i[2];e>3?(o=p===r)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=f&&((o=e<2&&f<i[1])?(a=0,h.v=r,h.n=i[1]):f<p&&(o=e<3||i[0]>r||r>p)&&(i[4]=e,i[5]=r,h.n=p,a=0))}if(o||e>1)return u;throw d=!0,r}return function(o,l,p){if(c>1)throw TypeError("Generator is already running");for(d&&1===l&&f(l,p),a=l,s=p;(n=a<2?t:s)||!d;){i||(a?a<3?(a>1&&(h.n=-1),f(a,s)):h.n=s:h.v=s);try{if(c=2,i){if(a||(o="next"),n=i[o]){if(!(n=n.call(i,s)))throw TypeError("iterator result is not an object");if(!n.done)return n;s=n.value,a<2&&(a=0)}else 1===a&&(n=i.return)&&n.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+o+"' method"),a=1);i=t}else if((n=(d=h.n<0)?s:e.call(r,h))!==u)break}catch(e){i=t,a=1,s=e}finally{c=1}}return{value:n,done:d}}}(e,i,a),!0),c}var u={};function l(){}function d(){}function h(){}n=Object.getPrototypeOf;var f=[][a]?n(n([][a]())):(r(n={},a,function(){return this}),n),p=h.prototype=l.prototype=Object.create(f);function y(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,r(e,s,"GeneratorFunction")),e.prototype=Object.create(p),e}return d.prototype=h,r(p,"constructor",h),r(h,"constructor",d),d.displayName="GeneratorFunction",r(h,s,"GeneratorFunction"),r(p),r(p,s,"Generator"),r(p,a,function(){return this}),r(p,"toString",function(){return"[object Generator]"}),(e.exports=o=function(){return{w:c,m:y}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=o,e.exports.__esModule=!0,e.exports.default=e.exports},5869(e,t,n){var r=n(887);e.exports=function(e,t,n,o,i){var a=r(e,t,n,o,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,n){var r=n(6993),o=n(1791);e.exports=function(e,t,n,i,a){return new o(r().w(e,t,n,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports}
2,1791(e,t,n){var r=n(5172),o=n(5546);e.exports=function e(t,n){function i(e,o,a,s){try{var c=t[e](o),u=c.value;return u instanceof r?n.resolve(u.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):n.resolve(u).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(o(e.prototype),o(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),o(this,"_invoke",function(e,t,r){function o(){return new n(function(t,n){i(e,r,t,n)})}return a=a?a.then(o,o):o()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},5546(e){function t(n,r,o,i){var a=Object.defineProperty;try{a({},"",{})}catch(n){a=0}e.exports=t=function(e,n,r,o){function i(n,r){t(e,n,function(e){return this._invoke(n,r,e)})}n?a?a(e,n,{value:r,enumerable:!o,configurable:!o,writable:!o}):e[n]=r:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r,o,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),n=[];for(var r in t)n.unshift(r);return function e(){for(;n.length;)if((r=n.pop())in t)return e.value=r,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,n){var r=n(5172),o=n(6993),i=n(5869),a=n(887),s=n(1791),c=n(4373),u=n(579);function l(){"use strict";var t=o(),n=t.m(l),d=(Object.getPrototypeOf?Object.getPrototypeOf(n):n.__proto__).constructor;function h(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))}var f={throw:1,return:2,break:3,continue:3};function p(e){var t,n;return function(r){t||(t={stop:function(){return n(r.a,2)},catch:function(){return r.v},abrupt:function(e,t){return n(r.a,f[e],t)},delegateYield:function(e,o,i){return t.resultName=o,n(r.d,u(e),i)},finish:function(e){return n(r.f,e)}},n=function(e,n,o){r.p=t.prev,r.n=t.next;try{return e(n,o)}finally{t.next=r.n}}),t.resultName&&(t[t.resultName]=r.v,t.resultName=void 0),t.sent=r.v,t.next=r.n;try{return e.call(this,t)}finally{r.p=t.prev,r.n=t.next}}}return(e.exports=l=function(){return{wrap:function(e,n,r,o){return t.w(p(e),n,r,o&&o.reverse())},isGeneratorFunction:h,mark:t.m,awrap:function(e,t){return new r(e,t)},AsyncIterator:s,async:function(e,t,n,r,o){return(h(t)?a:i)(p(e),t,n,r,o)},keys:c,values:u}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=l,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,n){var r=n(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(r(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(n){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,n){var r=n(4633)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},3612(e,t,n){"use strict";var r,o,i,a,s;window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const c={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,enableReaderDashboardv2:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardv2,enableDashboardCancel:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardCancel,enableDashboardBenefitHub:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardBenefitHub,enableEngageArticleGifting:"1"===(null===(r=window.authentication_config)||void 0===r?void 0:r.articleSharingEnabled)&&"1"===(null===(o=window.authentication_config)||void 0===o?void 0:o.isEngageArticleSharing),enableGiftedArticlesLink:"1"===(null===(i=window.authentication_config)||void 0===i?void 0:i.articleSharingEnabled)&&"1"!==(null===(a=window.authentication_config)||void 0===a?void 0:a.isEngageArticleSharing),enableSavedArticlesLink:"1"===(null===(s=window.authentication_config)||void 0===s?void 0:s.articleSavingEnabled),prosperstackClientid:window.authentication_config?window.authentication_config.prosperstackClientid:"",enableUpgradeSubscription:!!window.authentication_config&&"1"===window.authentication_config.enableUpgradeSubscription,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,forceLogoutOnExpiredIdToken:!!window.authentication_config&&"1"===window.authentication_config.forceLogoutOnExpiredIdToken,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.linaC
2heckOnArticles,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,updatePaymentEnabled:!!window.authentication_config&&"1"===window.authentication_config.enableUpdatePayment,enableSocialSigninModal:!!window.authentication_config&&"1"===window.authentication_config.enableSocialSigninModal,enableSocialAllPages:!!window.authentication_config&&"1"===window.authentication_config.enableSocialAllPages,enableSocialHomepage:!!window.authentication_config&&"1"===window.authentication_config.enableSocialHomepage,enableSocialArticle:!!window.authentication_config&&"1"===window.authentication_config.enableSocialArticle,enableSocialSection:!!window.authentication_config&&"1"===window.authentication_config.enableSocialSection};n.d(t,["A",0,c])}};const t={};function n(r){const o=t[r];if(void 0!==o)return o.exports;const i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.d=(e,t)=>{if(Array.isArray(t))for(var r=0;r<t.length;){var o=t[r++],i=t[r++],a=0===i?{enumerable:!0,value:t[r++]}:{enumerable:!0,get:i};n.o(e,o)||Object.defineProperty(e,o,a)}else for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";function e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function t(t){return function(t){if(Array.isArray(t))return e(t)}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(t,n){if(t){if("string"==typeof t)return e(t,n);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?e(t,n):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(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 o(e){return function(){var t=this,n=arguments;return new Promise(function(o,i){var a=e.apply(t,n);function s(e){r(a,o,i,s,c,"next",e)}function c(e){r(a,o,i,s,c,"throw",e)}s(void 0)})}}var i=n(4756),a=n(3612);const s={log:function(){if(a.A.debug){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).log.apply(e,["MNGDigisubs:"].concat(n))}},error:function(){if(a.A.debug){for(var e,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];(e=console).error.apply(e,["MNGDigisubs:"].concat(n))}}},c="__MNG_Session",u="articlesRemaining",l="user-profile";function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e){return h="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},h(e)}function f(e){var t=function(e,t){if("object"!=h(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!=h(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==h(t)?t:t+""}function p(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,f(r.key),r)}}function y(e,t,n){return t&&p(e.prototype,t),n&&p(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function g(e,t,n){return(t=f(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var w=function(){function e(){d(this,e),g(this,"pendingSets",new Map),g(this,"flushTimer",null),g(this,"hasFlushed",!1),g(this,"isPaused",!1)}return y(e,[{key:"pauseTargeting",value:function(t){if(!this.isPaused&&!this.hasFlushed)if(e.isAvailable())try{window.admiral("targeting","pause",t),this.isPaused=!0,s.log("AdmiralUtils | pauseTargeting | paused (".concat(t,"ms auto-resume)."))}catch(e){s.error("AdmiralUtils | pauseTargeting | failed",e)}else s.log("AdmiralUtils | pauseTargeting | window.admiral is not available, skipping pause.")}},{key:"queueSet",value:function(e,t){if(this.hasFlushed)s.log('AdmiralUtils | queueSet | already ready â skipping late set for "'.concat(e,'".'));else{var n=null==t?"":String(t);this.pendingSets.set(e,n)}}},{key:"flush",value:function(){if(!this.hasFlushed){if(this.flushTimer&&(clearTimeout(this.flushTimer),this.flushTimer=null),!e.isAvailable())return s.log("AdmiralUtils | flush | window.admiral is not available, skipping flush."),void this.pendingSets.clear();
2try{this.pendingSets.forEach(function(e,t){window.admiral("targeting","set",t,e),s.log('AdmiralUtils | flush | set "'.concat(t,'" = "').concat(e,'"'))}),window.admiral("targeting","ready"),this.hasFlushed=!0,this.isPaused=!1,this.pendingSets.clear(),s.log("AdmiralUtils | flush | targeting ready.")}catch(e){s.error("AdmiralUtils | flush | failed",e)}}}},{key:"scheduleReady",value:function(){var t=this;if(!this.hasFlushed)if(this.flushTimer)s.log("AdmiralUtils | scheduleReady | deadline already set â ignoring repeated call.");else{var n=e.DEFAULT_READY_DELAY_MS;this.flushTimer=setTimeout(function(){t.flushTimer=null,t.flush()},n),s.log("AdmiralUtils | scheduleReady | targeting ready scheduled in ".concat(n,"ms."))}}}],[{key:"isAvailable",value:function(){return"function"==typeof window.admiral}},{key:"getInstance",value:function(){return window.admiralUtils||(window.admiralUtils=new e),window.admiralUtils}}])}();g(w,"DEFAULT_READY_DELAY_MS",2e3);class m extends Error{}function v(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n}))}(t)}catch(e){return atob(t)}}function A(e,t){this.v=e,this.k=t}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function b(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function S(e){return new A(e,0)}function T(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function _(e,t){return e.get(b(e,t))}function R(e,t,n){T(e,t),t.set(e,n)}function O(e,t,n){return e.set(b(e,t),n),n}function I(e,t){T(e,t),t.add(e)}function N(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(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 k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){N(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function L(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],-1===t.indexOf(n)&&{}.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function P(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i,a,s=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=i.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(u)throw o}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return E(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?E(e,t):void 0}}
2(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function x(e){return function(){return new M(e.apply(this,arguments))}}function M(e){var t,n;function r(t,n){try{var i=e[t](n),a=i.value,s=a instanceof A;Promise.resolve(s?a.v:a).then(function(n){if(s){var c="return"===t&&a.k?t:"next";if(!a.k||n.done)return r(c,n);n=e[c](n).value}o(!!i.done,n)},function(e){r("throw",e)})}catch(e){o(2,e)}}function o(e,o){2===e?t.reject(o):t.resolve({value:o,done:e}),(t=t.next)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise(function(i,a){var s={key:e,arg:o,resolve:i,reject:a,next:null};n?n=n.next=s:(t=n=s,r(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}m.prototype.name="InvalidTokenError","function"==typeof SuppressedError&&SuppressedError,M.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},M.prototype.next=function(e){return this._invoke("next",e)},M.prototype.throw=function(e){return this._invoke("throw",e)},M.prototype.return=function(e){return this._invoke("return",e)};Error;var U="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==n.g?n.g:"undefined"!=typeof self?self:{},B={},D={};Object.defineProperty(D,"__esModule",{value:!0});var H=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,n){var r=e.locked.get(t);void 0===r?void 0===n?e.locked.set(t,[]):e.locked.set(t,[n]):void 0!==n&&(r.unshift(n),e.locked.set(t,r))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise(function(n,r){e.isLocked(t)?e.addToLocked(t,n):(e.addToLocked(t),n())})},this.unlock=function(t){var n=e.locked.get(t);if(void 0!==n&&0!==n.length){var r=n.pop();e.locked.set(t,n),void 0!==r&&setTimeout(r,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();D.default=function(){return H.getInstance()};var G=U&&U.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){e.done?o(e.value):new n(function(t){t(e.value)}).then(a,s)}c((r=r.apply(e,t||[])).next())})},W=U&&U.__generator||function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},K=U;Object.defineProperty(B,"__esModule",{value:!0});var F=D,j="browser-tabs-lock-key",X={key:function(e){return G(K,void 0,void 0,function(){return W(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return G(K,void 0,void 0,function(){return W(this,function(e){throw new Error("Unsupported")})})},clear:function(){return G(K,void 0,void 0,function(){return W(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return G(K,void 0,void 0,function(){return W(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return G(K,void 0,void 0,function(){return W(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function J(e){return new Promise(function(t){return setTimeout(t,e)})}function V(e){for(var t="",n=0;n<e;n++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var Y=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+V(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,n){return void 0===n&&(n=5e3),G(this,void 0,void 0,function(){var r,o,i,a,s,c,u;return W(this,function(l){switch(l.label){case 0:r=Date.now()+V(4),o=Date.now()+n,i=j+"-"+t,a=void 0===this.storageHandler?X:this.storageHandler,l.label=1;case 1:return Date.now()<o?[4,J(30)]:[3,8];case 2:return l.sent(),null!==a.getItemSync(i)?[3,5]:(s=this.id+"-"+t+"-"+r,[4,J(M
2ath.floor(25*Math.random()))]);case 3:return l.sent(),a.setItemSync(i,JSON.stringify({id:this.id,iat:r,timeoutKey:s,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,J(30)];case 4:return l.sent(),null!==(c=a.getItemSync(i))&&(u=JSON.parse(c)).id===this.id&&u.iat===r?(this.acquiredIatSet.add(r),this.refreshLockWhileAcquired(i,r),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?X:this.storageHandler),[4,this.waitForSomethingToChange(o)];case 6:l.sent(),l.label=7;case 7:return r=Date.now()+V(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return G(this,void 0,void 0,function(){var n=this;return W(this,function(r){return setTimeout(function(){return G(n,void 0,void 0,function(){var n,r,o;return W(this,function(i){switch(i.label){case 0:return[4,F.default().lock(t)];case 1:return i.sent(),this.acquiredIatSet.has(t)?(n=void 0===this.storageHandler?X:this.storageHandler,null===(r=n.getItemSync(e))?(F.default().unlock(t),[2]):((o=JSON.parse(r)).timeRefreshed=Date.now(),n.setItemSync(e,JSON.stringify(o)),F.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(F.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return G(this,void 0,void 0,function(){return W(this,function(n){switch(n.label){case 0:return[4,new Promise(function(n){var r=!1,o=Date.now(),i=!1;function a(){if(i||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),i=!0),!r){r=!0;var t=50-(Date.now()-o);t>0?setTimeout(n,t):n(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))})];case 1:return n.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEach(function(e){return e()})},e.prototype.releaseLock=function(e){return G(this,void 0,void 0,function(){return W(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return G(this,void 0,void 0,function(){var n,r,o,i;return W(this,function(a){switch(a.label){case 0:return n=void 0===this.storageHandler?X:this.storageHandler,r=j+"-"+t,null===(o=n.getItemSync(r))?[2]:(i=JSON.parse(o)).id!==this.id?[3,2]:[4,F.default().lock(i.iat)];case 1:a.sent(),this.acquiredIatSet.delete(i.iat),n.removeItemSync(r),F.default().unlock(i.iat),e.notifyWaiters(),a.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var n=Date.now()-5e3,r=t,o=[],i=0;;){var a=r.keySync(i);if(null===a)break;o.push(a),i++}for(var s=!1,c=0;c<o.length;c++){var u=o[c];if(u.includes(j)){var l=r.getItemSync(u);if(null!==l){var d=JSON.parse(l);(void 0===d.timeRefreshed&&d.timeAcquired<n||void 0!==d.timeRefreshed&&d.timeRefreshed<n)&&(r.removeItemSync(u),s=!0)}}}s&&e.notifyWaiters()},e.waiters=void 0,e}();B.default=Y;new TextEncoder,new TextDecoder;let z;if(Uint8Array.prototype.toBase64)z=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;z=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let r=0;r<t.byteLength;r+=e)n.push(String.fromCharCode.apply(null,t.subarray(r,r+e)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}Error;Error;var q=U&&U.__assign||function(){return q=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},q.apply(this,arguments)};var Z;!function(e){e.Code="code",e.ConnectCode="connect_code"}(Z||(Z={}));var Q;var ee;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(ee||(ee={}));Error;var te,ne;let re;if("undefined"==typeof navigator||null===(te=navigator.userAgent)||void 0===te||null===(ne=te.startsWith)||void 0===ne||!ne.call(te,"Mozilla/5.0 ")){const e="v3.8.6";re="".concat("oauth4webapi","/").concat(e)}function oe(e,t){if(null==e)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch(e){return!1}}const ie="ERR_INVALID_ARG_VALUE",ae="ERR_INVALID_ARG_TYPE";function se(e,t,n){const r=new TypeError(e,{cause:n});return Object.assign(r,{code:t}),r}const ce=Symbol(),ue=Symbol(),le=Symbol(),de=Symbol(),he=Symbol(),fe=Symbol(),pe=new TextEncoder,ye=new TextDecoder;function ge(e){return"string"==typeof e?pe.encode(e):ye.decode(e)}let we,me;if(Uint8Array.prototype.toBase64)we=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;we=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const n=[];for(let r=0;r<t.byteLength;r+=e)n.push(String.fromCharCode.apply(null,t.subarray(r,r+e)));return btoa(n.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function ve(e){return"string"==typeof e?me(e):we(e)}me=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw se("The input to be decoded is not correctly encoded.",ie,e)}
2}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}catch(e){throw se("The input to be decoded is not correctly encoded.",ie,e)}};class Ae extends Error{constructor(e,t){var n;super(e,t),N(this,"code",void 0),this.name=this.constructor.name,this.code=St,null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}class Ee extends Error{constructor(e,t){var n;super(e,t),N(this,"code",void 0),this.name=this.constructor.name,null!=t&&t.code&&(this.code=null==t?void 0:t.code),null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}function be(e,t,n){return new Ee(e,{code:t,cause:n})}function Se(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function Te(e){oe(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(re&&!t.has("user-agent")&&t.set("user-agent",re),t.has("authorization"))throw se('"options.headers" must not include the "authorization" header name',ie);return t}function _e(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw se('"options.signal" must return or be an instance of AbortSignal',ae);return t}}function Re(e){return e.includes("//")?e.replace("//","/"):e}function Oe(e,t,n,r,o){try{if("number"!=typeof e||!Number.isFinite(e))throw se("".concat(n," must be a number"),ae,o);if(e>0)return;if(t){if(0!==e)throw se("".concat(n," must be a non-negative number"),ie,o);return}throw se("".concat(n," must be a positive number"),ie,o)}catch(e){if(r)throw be(e.message,r,o);throw e}}function Ie(e,t,n,r){try{if("string"!=typeof e)throw se("".concat(t," must be a string"),ae,r);if(0===e.length)throw se("".concat(t," must not be empty"),ie,r)}catch(e){if(n)throw be(e.message,n,r);throw e}}function Ne(e){!function(e,t){if(nt(e)!==t)throw function(e){let t='"response" content-type must be ';for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];if(r.length>2){const e=r.pop();t+="".concat(r.join(", "),", or ").concat(e)}else 2===r.length?t+="".concat(r[0]," or ").concat(r[1]):t+=r[0];return be(t,It,e)}(e,t)}(e,"application/json")}function Ce(){return ve(crypto.getRandomValues(new Uint8Array(32)))}function ke(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new Ae("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"RSASSA-PKCS1-v1_5":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new Ae("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"ECDSA":return function(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new Ae("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new Ae("unsupported CryptoKey algorithm name",{cause:e})}}function Le(e){const t=null==e?void 0:e[ue];return"number"==typeof t&&Number.isFinite(t)?t:0}function Pe(e){const t=null==e?void 0:e[le];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function xe(){return Math.floor(Date.now()/1e3)}function Me(e){if("object"!=typeof e||null===e)throw se('"as" must be an object',ae);Ie(e.issuer,'"as.issuer"')}function Ue(e){if("object"!=typeof e||null===e)throw se('"client" must be an object',ae);Ie(e.client_id,'"client.client_id"')}function Be(e){return Ie(e,'"clientSecret"'),(t,n,r,o)=>{r.set("client_id",n.client_id),r.set("client_secret",e)}}function De(e,t){const n=e instanceof CryptoKey?{key:i}:(null==i?void 0:i.key)instanceof CryptoKey?(void 0!==i.kid&&Ie(i.kid,'"kid"'),{key:i.key,kid:i.kid}):{},r=n.key,o=n.kid;var i;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw se("".concat(t," must be a CryptoKey"),ae)}(e,t),"private"!==e.type)throw se("".concat(t," must be a private CryptoKey"),ie)}(r,'"clientPrivateKey.key"'),async(e,n,i,a)=>{var s;const c={alg:ke(r),kid:o},u=function(e,t){const n=xe()+Le(t);return{jti:Ce(),aud:e.issuer,exp:n+60,iat:n,nbf:n,iss:t.client_id,sub:t.client_id}}(e,n);null==t||null===t[he]||void 0===s||s.call(t,c,u),i.set("client_id",n.client_id),i.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),i.set("client_assertion",await async function(e,t,n){if(!n.usages.includes("sign"))throw se('CryptoKey instances used for signing assertions must include "sign" in their "usages"',ie);const r="".concat(ve(ge(JSON.stringify(e))),".").concat(ve(ge(JSON.stringify(t)))),o=ve(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:Gt(e)};case"RSA-PSS":switch(Ht(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new Ae("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return Ht(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new Ae("unsupported CryptoKey algorithm name",{cause:e})}(n),n,ge(r)));return"".concat(r,".").concat(o)}(c,u,r))}}const He=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function Ge(e,t){if(t&&"https:"!==e.protocol)throw be("only requests to HTTPS are allowed",Ct,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw be("only HTTP and HTTPS requests are allowed",kt,e)}function We(e,t,n,r){let o;if("string"!=typeof e||!(o=He(e)))throw be("authorization server metadata does not contain a valid ".concat(n?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?Mt:Ut,{attribute:n?"mtls_endpoint_aliases.".concat(t):t});return Ge(o,r),o}function Ke(e,t,n,r){return n&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?We(e.mtls_endpoint_aliases[t],t,n,r):We(e[t],t,n,r)}
2class Fe extends Error{constructor(e,t){var n;super(e,t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"error",void 0),N(this,"status",void 0),N(this,"error_description",void 0),N(this,"response",void 0),this.name=this.constructor.name,this.code=bt,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}class je extends Error{constructor(e,t){var n,r;super(e,t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"error",void 0),N(this,"error_description",void 0),this.name=this.constructor.name,this.code=Tt,this.cause=t.cause,this.error=t.cause.get("error"),this.error_description=null!==(n=t.cause.get("error_description"))&&void 0!==n?n:void 0,null===(r=Error.captureStackTrace)||void 0===r||r.call(Error,this,this.constructor)}}class Xe extends Error{constructor(e,t){var n;super(e,t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"response",void 0),N(this,"status",void 0),this.name=this.constructor.name,this.code=Et,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}const Je="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",Ve="("+Je+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',Ye="("+Je+")\\s*=\\s*("+Je+")",ze=new RegExp("^[,\\s]*("+Je+")"),qe=new RegExp("^[,\\s]*"+Ve+"[,\\s]*(.*)"),Ze=new RegExp("^[,\\s]*"+Ye+"[,\\s]*(.*)"),Qe=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function $e(e,t,n){if(e.status!==t){let t;var r;if(lt(e),t=await async function(e){if(e.status>399&&e.status<500){Dt(e),Ne(e);try{const t=await e.clone().json();if(Se(t)&&"string"==typeof t.error&&t.error.length)return t}catch(e){}}}(e))throw await(null===(r=e.body)||void 0===r?void 0:r.cancel()),new Fe("server responded with an error in the response body",{cause:t,response:e});throw be('"response" is not a conform '.concat(n," response (unexpected HTTP status code)"),Nt,e)}}function et(e){if(!yt.has(e))throw se('"options.DPoP" is not a valid DPoPHandle',ie)}const tt=Symbol();function nt(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function rt(e,t,n,r,o){if(Me(e),Ue(t),!oe(r,Response))throw se('"response" must be an instance of Response',ae);if(lt(r),200!==r.status)throw be('"response" is not a conform UserInfo Endpoint response (unexpected HTTP status code)',Nt,r);let i;if(Dt(r),"application/jwt"===nt(r)){const n=await Wt(await r.text(),Kt.bind(void 0,t.userinfo_signed_response_alg,e.userinfo_signing_alg_values_supported,void 0),Le(t),Pe(t),null==o?void 0:o[fe]).then(dt.bind(void 0,t.client_id)).then(ft.bind(void 0,e)),i=n.claims,a=n.jwt;st.set(r,a)}else{if(t.userinfo_signed_response_alg)throw be("JWT UserInfo Response expected",_t,r);await Jt(r)}if(Ie(i.sub,'"response" body "sub" property',Ot,{body:i}),n===tt);else if(Ie(n,'"expectedSubject"'),i.sub!==n)throw be('unexpected "response" body "sub" property value',xt,{expected:n,body:i,attribute:"sub"});return i}async function ot(e,t,n,r,o,i,a){return await n(e,t,o,i),i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((null==a?void 0:a[de])||fetch)(r.href,{body:o,headers:Object.fromEntries(i.entries()),method:"POST",redirect:"manual",signal:_e(r,null==a?void 0:a.signal)})}async function it(e,t,n,r,o,i){var a;const s=Ke(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==i?void 0:i[ce]));o.set("grant_type",r);const c=Te(null==i?void 0:i.headers);c.set("accept","application/json"),void 0!==(null==i?void 0:i.DPoP)&&(et(i.DPoP),await i.DPoP.addProof(s,c,"POST"));const u=await ot(e,t,n,s,o,c,i);return null==i||null===(a=i.DPoP)||void 0===a||a.cacheNonce(u,s),u}const at=new WeakMap,st=new WeakMap;function ct(e){if(!e.id_token)return;const t=at.get(e);if(!t)throw se('"ref" was already garbage collected or did not resolve from the proper sources',ie);return t}
2async function ut(e,t,n,r,o,i){if(Me(e),Ue(t),!oe(n,Response))throw se('"response" must be an instance of Response',ae);await $e(n,200,"Token Endpoint"),Dt(n);const a=await Jt(n);if(Ie(a.access_token,'"response" body "access_token" property',Ot,{body:a}),Ie(a.token_type,'"response" body "token_type" property',Ot,{body:a}),a.token_type=a.token_type.toLowerCase(),void 0!==a.expires_in){let e="number"!=typeof a.expires_in?parseFloat(a.expires_in):a.expires_in;Oe(e,!0,'"response" body "expires_in" property',Ot,{body:a}),a.expires_in=e}if(void 0!==a.refresh_token&&Ie(a.refresh_token,'"response" body "refresh_token" property',Ot,{body:a}),void 0!==a.scope&&"string"!=typeof a.scope)throw be('"response" body "scope" property must be a string',Ot,{body:a});if(void 0!==a.id_token){Ie(a.id_token,'"response" body "id_token" property',Ot,{body:a});const i=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&i.push("auth_time"),void 0!==t.default_max_age&&(Oe(t.default_max_age,!0,'"client.default_max_age"'),i.push("auth_time")),null!=r&&r.length&&i.push(...r);const s=await Wt(a.id_token,Kt.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),Le(t),Pe(t),o).then(mt.bind(void 0,i)).then(pt.bind(void 0,e)).then(ht.bind(void 0,t.client_id)),c=s.claims,u=s.jwt;if(Array.isArray(c.aud)&&1!==c.aud.length){if(void 0===c.azp)throw be('ID Token "aud" (audience) claim includes additional untrusted audiences',Pt,{claims:c,claim:"aud"});if(c.azp!==t.client_id)throw be('unexpected ID Token "azp" (authorized party) claim value',Pt,{expected:t.client_id,claims:c,claim:"azp"})}void 0!==c.auth_time&&Oe(c.auth_time,!0,'ID Token "auth_time" (authentication time)',Ot,{claims:c}),st.set(n,u),at.set(a,c)}if(void 0!==(null==i?void 0:i[a.token_type]))i[a.token_type](n,a);else if("dpop"!==a.token_type&&"bearer"!==a.token_type)throw new Ae("unsupported `token_type` value",{cause:{body:a}});return a}function lt(e){let t;if(t=function(e){if(!oe(e,Response))throw se('"response" must be an instance of Response',ae);const t=e.headers.get("www-authenticate");if(null===t)return;const n=[];let r=t;for(;r;){var o;let t=r.match(ze);const c=null===(o=t)||void 0===o?void 0:o[1].toLowerCase();if(!c)return;const u=r.substring(t[0].length);if(u&&!u.match(/^[\s,]/))return;const l=u.match(/^\s+(.*)$/),d=!!l;r=l?l[1]:void 0;const h={};let f;if(d)for(;r;){let n,o;if(t=r.match(qe)){var i=P(t,4);if(n=i[1],o=i[2],r=i[3],o.includes("\\"))try{o=JSON.parse('"'.concat(o,'"'))}catch(e){}h[n.toLowerCase()]=o}else{if(!(t=r.match(Ze))){if(t=r.match(Qe)){if(Object.keys(h).length)break;var a=P(t,3);f=a[1],r=a[2];break}return}var s=P(t,4);n=s[1],o=s[2],r=s[3],h[n.toLowerCase()]=o}}else r=u||void 0;const p={scheme:c,parameters:h};f&&(p.token68=f),n.push(p)}return n.length?n:void 0}(e))throw new Xe("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}function dt(e,t){return void 0!==t.claims.aud?ht(e,t):t}function ht(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw be('unexpected JWT "aud" (audience) claim value',Pt,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw be('unexpected JWT "aud" (audience) claim value',Pt,{expected:e,claims:t.claims,claim:"aud"});return t}function ft(e,t){return void 0!==t.claims.iss?pt(e,t):t}function pt(e,t){var n,r;const o=null!==(n=null===(r=e[Yt])||void 0===r?void 0:r.call(e,t))&&void 0!==n?n:e.issuer;if(t.claims.iss!==o)throw be('unexpected JWT "iss" (issuer) claim value',Pt,{expected:o,claims:t.claims,claim:"iss"});return t}const yt=new WeakSet,gt=Symbol(),wt={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function mt(e,t){for(const n of e)if(void 0===t.claims[n])throw be('JWT "'.concat(n,'" (').concat(wt[n],") claim missing"),Ot,{claims:t.claims});return t}const vt=Symbol(),At=Symbol();const Et="OAUTH_WWW_AUTHENTICATE_CHALLENGE",bt="OAUTH_RESPONSE_BODY_ERROR",St="OAUTH_UNSUPPORTED_OPERATION",Tt="OAUTH_AUTHORIZATION_RESPONSE_E
2RROR",_t="OAUTH_JWT_USERINFO_EXPECTED",Rt="OAUTH_PARSE_ERROR",Ot="OAUTH_INVALID_RESPONSE",It="OAUTH_RESPONSE_IS_NOT_JSON",Nt="OAUTH_RESPONSE_IS_NOT_CONFORM",Ct="OAUTH_HTTP_REQUEST_FORBIDDEN",kt="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",Lt="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",Pt="OAUTH_JWT_CLAIM_COMPARISON_FAILED",xt="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",Mt="OAUTH_MISSING_SERVER_METADATA",Ut="OAUTH_INVALID_SERVER_METADATA";async function Bt(e){if(!oe(e,Response))throw se('"response" must be an instance of Response',ae);await $e(e,200,"Revocation Endpoint")}function Dt(e){if(e.bodyUsed)throw se('"response" body has been used already',ie)}function Ht(e){const t=e.algorithm;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new Ae("unsupported ".concat(t.name," modulusLength"),{cause:e})}function Gt(e){switch(e.algorithm.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new Ae("unsupported ECDSA namedCurve",{cause:e})}}async function Wt(e,t,n,r,o){let i,a,s=e.split("."),c=s[0],u=s[1],l=s.length;if(5===l){if(void 0===o)throw new Ae("JWE decryption is not configured",{cause:e});var d=(e=await o(e)).split(".");c=d[0],u=d[1],l=d.length}if(3!==l)throw be("Invalid JWT",Ot,e);try{i=JSON.parse(ge(ve(c)))}catch(e){throw be("failed to parse JWT Header body as base64url encoded JSON",Rt,e)}if(!Se(i))throw be("JWT Header must be a top level object",Ot,e);if(t(i),void 0!==i.crit)throw new Ae('no JWT "crit" header parameter extensions are supported',{cause:{header:i}});try{a=JSON.parse(ge(ve(u)))}catch(e){throw be("failed to parse JWT Payload body as base64url encoded JSON",Rt,e)}if(!Se(a))throw be("JWT Payload must be a top level object",Ot,e);const h=xe()+n;if(void 0!==a.exp){if("number"!=typeof a.exp)throw be('unexpected JWT "exp" (expiration time) claim type',Ot,{claims:a});if(a.exp<=h-r)throw be('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',Lt,{claims:a,now:h,tolerance:r,claim:"exp"})}if(void 0!==a.iat&&"number"!=typeof a.iat)throw be('unexpected JWT "iat" (issued at) claim type',Ot,{claims:a});if(void 0!==a.iss&&"string"!=typeof a.iss)throw be('unexpected JWT "iss" (issuer) claim type',Ot,{claims:a});if(void 0!==a.nbf){if("number"!=typeof a.nbf)throw be('unexpected JWT "nbf" (not before) claim type',Ot,{claims:a});if(a.nbf>h+r)throw be('unexpected JWT "nbf" (not before) claim value',Lt,{claims:a,now:h,tolerance:r,claim:"nbf"})}if(void 0!==a.aud&&"string"!=typeof a.aud&&!Array.isArray(a.aud))throw be('unexpected JWT "aud" (audience) claim type',Ot,{claims:a});return{header:i,claims:a,jwt:e}}function Kt(e,t,n,r){if(void 0===e)if(Array.isArray(t)){if(!t.includes(r.alg))throw be('unexpected JWT "alg" header parameter',Ot,{header:r,expected:t,reason:"authorization server metadata"})}else{if(void 0===n)throw be('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:n});if("string"==typeof n?r.alg!==n:"function"==typeof n?!n(r.alg):!n.includes(r.alg))throw be('unexpected JWT "alg" header parameter',Ot,{header:r,expected:n,reason:"default value"})}else if("string"==typeof e?r.alg!==e:!e.includes(r.alg))throw be('unexpected JWT "alg" header parameter',Ot,{header:r,expected:e,reason:"client configuration"})}function Ft(e,t){const n=e.getAll(t),r=n[0];if(n.length>1)throw be('"'.concat(t,'" parameter must be provided only once'),Ot);return r}const jt=Symbol(),Xt=Symbol();async function Jt(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ne;try{t=await e.json()}catch(t){throw n(e),be('failed to parse "response" body as JSON',Rt,t)}if(!Se(t))throw be('"response" body must be a top level object',Ot,{body:t});return t}const Vt=Symbol(),Yt=Symbol(),zt=new TextEncoder,qt=new TextDecoder,Zt=new TextDecoder("utf-8",{fatal:!0});function Qt(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];const r=t.reduce((e,t)=>e+t.length,0),o=new Uint8Array(r);let i=0;for(const e of t)o.set(e,i),i+=e.length;return o}function $t(e){const t=new Uint8Array(e.length);for(let n=0;n<e.length;n++){const r=e.charCodeAt(n);if(r>127)throw new TypeError("non-ASCII string encountered in encode()");t[n]=r}return t}const en=function(e){return new TypeError("CryptoKey does not support this operation, its ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"," must be ").concat(e))};const tn=function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return function(e,t){for(var n=arguments.length,r=new Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];if(r.length>2){const t=r.pop();e+="one of type ".concat(r.join(", "),", or ").concat(t,".")}else 2===r.length?e+="one of type ".concat(r[0]," or ").concat(r[1],"."):e+="of type ".concat(r[0],".");if(null==t)e+=" Received ".concat(t);else if("function"==typeof t&&t.name)e+=" Received function ".concat(t.name);else if("object"==typeof t&&null!=t){var i;null!==(i=t.constructor)&&void 0!==i&&i.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}("Key for the ".concat(e," algorithm must be "),t,...r)};
2class nn extends Error{constructor(e,t){var n;super(e,t),N(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}N(nn,"code","ERR_JOSE_GENERIC");class rn extends nn{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:n,reason:r,payload:t}}),N(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),N(this,"claim",void 0),N(this,"reason",void 0),N(this,"payload",void 0),this.claim=n,this.reason=r,this.payload=t}}N(rn,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class on extends nn{constructor(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:n,reason:r,payload:t}}),N(this,"code","ERR_JWT_EXPIRED"),N(this,"claim",void 0),N(this,"reason",void 0),N(this,"payload",void 0),this.claim=n,this.reason=r,this.payload=t}}N(on,"code","ERR_JWT_EXPIRED");class an extends nn{constructor(){super(...arguments),N(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}N(an,"code","ERR_JOSE_ALG_NOT_ALLOWED");class sn extends nn{constructor(){super(...arguments),N(this,"code","ERR_JOSE_NOT_SUPPORTED")}}N(sn,"code","ERR_JOSE_NOT_SUPPORTED"),N(class extends nn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),N(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),N(class extends nn{constructor(){super(...arguments),N(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class cn extends nn{constructor(){super(...arguments),N(this,"code","ERR_JWS_INVALID")}}N(cn,"code","ERR_JWS_INVALID");class un extends nn{constructor(){super(...arguments),N(this,"code","ERR_JWT_INVALID")}}N(un,"code","ERR_JWT_INVALID"),N(class extends nn{constructor(){super(...arguments),N(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class ln extends nn{constructor(){super(...arguments),N(this,"code","ERR_JWKS_INVALID")}}N(ln,"code","ERR_JWKS_INVALID");class dn extends nn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),N(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}N(dn,"code","ERR_JWKS_NO_MATCHING_KEY");class hn extends nn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),N(this,Symbol.asyncIterator,x(function*(){})),N(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}N(hn,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class fn extends nn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),N(this,"code","ERR_JWKS_TIMEOUT")}}N(fn,"code","ERR_JWKS_TIMEOUT");class pn extends nn{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),N(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}N(pn,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const yn=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}};function gn(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}const wn="The input to be decoded is not correctly encoded.";function mn(e){if(Uint8Array.fromBase64)try{return Uint8Array.fromBase64("string"==typeof e?e:qt.decode(e),{alphabet:"base64url"})}catch(e){throw new TypeError(wn,{cause:e})}let t=e;if(t instanceof Uint8Array&&(t=qt.decode(t)),t.includes("+")||t.includes("/"))throw new TypeError(wn);t=t.replace(/-/g,"+").replace(/_/g,"/");try{return gn(t)}catch(e){throw new TypeError(wn)}}function vn(e){let t=e;return"string"==typeof t&&(t=zt.encode(t)),Uint8Array.prototype.toBase64?t.toBase64({alphabet:"base64url",omitPadding:!0}):function(e){if(Uint8Array.prototype.toBase64)return e.toBase64();const t=[];for(let n=0;n<e.length;n+=32768)t.push(String.fromCharCode.apply(null,e.subarray(n,n+32768)));return btoa(t.join(""))}(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function An(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function En(e){return An(e)&&Array.isArray(e.keys)&&Array.from(e.keys).every(An)}function bn(e,t,n){try{return mn(e)}catch(e){throw new n("Failed to base64url decode the ".concat(t))}}async function Sn(e,t){var n,r,o,i;if("RSA"===t.kty&&"oth"in t&&void 0!==t.oth)throw new sn('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');if(!e.kty.includes(t.kty))throw new sn('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');const a=null!==(n=null===(r=e.resolve)||void 0===r?void 0:r.call(e,{kty:t.kty,crv:t.crv}))&&void 0!==n?n:e.subtle,s=!(!t.d&&!t.priv),c=k({},t);return"AKP"!==c.kty&&delete c.alg,delete c.use,crypto.subtle.importKey("jwk",c,a,null!==(o=t.ext)&&void 0!==o?o:!s,null!==(i=t.key_ops)&&void 0!==i?i:e.usages[s?1:0])}function Tn(e){return k({__proto__:null},e)}const _n=e=>e[Symbol.toStringTag];function Rn(e,t,n){const r=e.alg,o=e.secret,i="decrypt"===n||"sign"===n;if(o&&t instanceof Uint8Array)return[On,t];if(An(t)){const a=function(e){const t=Tn(e);if(void 0!==t.ext&&"boolean"!=typeof t.ext)throw new TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==t.key_ops){const e=t.key_ops,n=Array.isArray(e)?[...e]:void 0;if(!n||n.some(e=>"string"!=typeof e)||new Set(n).size!==n.length)throw new TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=n}return t}(t);if("string"!=typeof a.kty)throw new TypeError(o?tn(r,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"):tn(r,t,"CryptoKey","KeyObject","JSON Web Key"));if(!(o?"oct"===a.kty&&"string"==typeof a.k:"oct"!==a.kty&&(i?"AKP"===a.kty&&"string"==typeof a.priv||"string"==typeof a.d:void 0===a.d&&void 0===a.priv)))throw new TypeError(o?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':"JSON Web Key for this operation must be a ".concat(i?"private":"public"," JWK"));return((e,t,n)=>{const r=e.alg;if(void 0!==t.use){const e="sign"===n||"verify"===n?"sig":"enc";if(t.use!==e)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(e,'" when present'))}if(void 0!==t.alg&&t.alg!==r)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(r,'" when present'));if(Array.isArray(t.key_ops)){var o;const r="encrypt"===n||"decrypt"===n?null===(o=e.ops)||void 0===o?void 0:o["encrypt"===n?0:1]:n;if(r&&!t.key_ops.includes(r))throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(r,'" when present'))}})(e,a,n),[Cn,t,a]}if(!(e=>yn(e)||(e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]))(e))(t))throw new TypeError(o?tn(r,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"):tn(r,t,"CryptoKey","KeyObject","JSON Web Key"));if(o){if("secret"!==t.type)throw new TypeError("".concat(_n(t),' instances for symmetric algorithms must be of type "secret"'))}else{if("secret"===t.type)throw new TypeError("".concat(_n(t),' instances for asymmetric algorithms must not be of type "secret"'));const e=i?"private":"public";if(("public"===t.type||"private"===t.type)&&t.type!==e){const r="sign"===n?"signing":"verify"===n?"verifying":"".concat(n.slice(0,-1),"tion");throw new TypeError("".concat(_n(t)," instances for asymmetric algorithm ").concat(r,' must be of type "').concat(e,'"'))}}return yn(t)?[In,t]:[Nn,t]}
2const On=0,In=1,Nn=2,Cn=3;let kn;const Ln={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function Pn(e,t,n){kn||(kn=new WeakMap);const r=kn.get(e);return n&&(r?r[t]=n:kn.set(e,{[t]:n})),null!=n?n:null==r?void 0:r[t]}const xn=async(e,t,n)=>{var r;return null!==(r=Pn(e,n.alg))&&void 0!==r?r:Pn(e,n.alg,await Sn(n,k(k({},t),{},{alg:n.alg})))};async function Mn(e,t,n){const r=Rn(e,t,n);switch(r[0]){case On:case In:return r[1];case Cn:{const t=r[1],n=r[2];if("oct"===n.kty)return mn(n.k);if(!Object.isFrozen(t)){const e=t.key_ops;Array.isArray(e)&&Object.freeze(e),Object.freeze(t)}return xn(t,n,e)}case Nn:{const t=r[1];return"secret"===t.type?t.export():"toCryptoKey"in t&&"function"==typeof t.toCryptoKey?((e,t)=>{var n,r,o;const i=Pn(e,t.alg);if(i)return i;const a="public"===e.type,s=t.usages[a?0:1],c=e.asymmetricKeyType,u=Ln[null===(n=e.asymmetricKeyDetails)||void 0===n?void 0:n.namedCurve],l=null!==(r=null===(o=t.resolve)||void 0===o?void 0:o.call(t,{crv:u,asymmetricKeyType:c}))&&void 0!==r?r:t.subtle;return Pn(e,t.alg,e.toCryptoKey(l,a,s))})(t,e):xn(t,t.export({format:"jwk"}),e)}}}function Un(e){const t={__proto__:null};for(const n in e)t[n]=k(k({},e[n]),{},{alg:n});return t}const Bn=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],Dn=[[],["deriveBits"]],Hn=[[],[]];function Gn(e){return{kty:["RSA"],subtle:{name:"RSA-OAEP",hash:"SHA-".concat(e)},usages:Bn,ops:["wrapKey","unwrapKey"]}}function Wn(){return{kty:["EC","OKP"],subtle:{name:"ECDH"},resolve:e=>{let t=e.kty,n=e.crv,r=e.asymmetricKeyType;if("X25519"===n||"x25519"===r)return{name:"X25519"};if("OKP"===t)throw new sn('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:n}},usages:Dn,ops:[void 0,"deriveBits"]}}function Kn(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{kty:["oct"],secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:Hn,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function Fn(){return{kty:["oct"],secret:!0,subtle:{name:"PBKDF2"},usages:Hn,ops:["deriveBits","deriveBits"]}}const jn=Un({dir:{kty:["oct"],secret:!0,subtle:{name:"AES-GCM"},usages:Hn,ops:["encrypt","decrypt"]},"RSA-OAEP":Gn(1),"RSA-OAEP-256":Gn(256),"RSA-OAEP-384":Gn(384),"RSA-OAEP-512":Gn(512),"ECDH-ES":Wn(),"ECDH-ES+A128KW":Wn(),"ECDH-ES+A192KW":Wn(),"ECDH-ES+A256KW":Wn(),A128KW:Kn(128),A192KW:Kn(192),A256KW:Kn(256),A128GCMKW:Kn(128,!0),A192GCMKW:Kn(192,!0),A256GCMKW:Kn(256,!0),"PBES2-HS256+A128KW":Fn(),"PBES2-HS384+A192KW":Fn(),"PBES2-HS512+A256KW":Fn()}),Xn=["encrypt","decrypt"];function Jn(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:Hn,ops:Xn,cekBits:e,ivBits:t?128:96,cbc:t}}Un({A128GCM:Jn(128),A192GCM:Jn(192),A256GCM:Jn(256),"A128CBC-HS256":Jn(256,!0),"A192CBC-HS384":Jn(384,!0),"A256CBC-HS512":Jn(512,!0)});const Vn={__proto__:null,b64:!0};function Yn(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError('"'.concat(e,'" option must be an array of strings'));if(t)return new Set(t)}function zn(e,t,n,r,o){if(void 0!==o.crit&&void 0===(null==r?void 0:r.crit))throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return[];if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');const i=void 0===n?t:k(k({__proto__:null},n),t);for(const t of r.crit){if(!(t in i))throw new sn('Extension Header Parameter "'.concat(t,'" is not recognized'));if(!Object.hasOwn(o,t)||void 0===o[t])throw new e('Extension Header Parameter "'.concat(t,'" is missing'));if(i[t]&&(!Object.hasOwn(r,t)||void 0===r[t]))throw new e('Extension Header Parameter "'.concat(t,'" MUST be integrity protected'))}return r.crit}function qn(e,t){if(t.includes("b64")){const t=e.b64;if("boolean"!=typeof t)throw new cn('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return t}return!0}var Zn,Qn;let $n,er;if("undefined"==typeof navigator||null===(Zn=navigator.userAgent)||void 0===Zn||null===(Qn=Zn.startsWith)||void 0===Qn||!Qn.call(Zn,"Mozilla/5.0 ")){const e="v6.8.4";
2er="".concat("openid-client","/").concat(e),$n={"user-agent":er}}const tr=e=>nr.get(e);let nr,rr;function or(e){return void 0!==e?Be(e):(rr||(rr=new WeakMap),(e,t,n,r)=>{let o;return(o=rr.get(t))||(function(e,t){if("string"!=typeof e)throw ur("".concat(t," must be a string"),cr);if(0===e.length)throw ur("".concat(t," must not be empty"),sr)}(t.client_secret,'"metadata.client_secret"'),o=Be(t.client_secret),rr.set(t,o)),o(e,t,n,r)})}const ir=tt,ar=de,sr="ERR_INVALID_ARG_VALUE",cr="ERR_INVALID_ARG_TYPE";function ur(e,t,n){const r=new TypeError(e,{cause:n});return Object.assign(r,{code:t}),r}class lr extends Error{constructor(e,t){var n;super(e,t),N(this,"code",void 0),this.name=this.constructor.name,this.code=null==t?void 0:t.code,null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}function dr(e,t,n){return new lr(e,{cause:t,code:n})}function hr(e){if(e instanceof TypeError||e instanceof lr||e instanceof Fe||e instanceof je||e instanceof Xe)throw e;if(e instanceof Ee)switch(e.code){case Ct:throw dr("only requests to HTTPS are allowed",e,e.code);case kt:throw dr("only requests to HTTP or HTTPS are allowed",e,e.code);case Nt:throw dr("unexpected HTTP response status code",e.cause,e.code);case It:throw dr("unexpected response content-type",e.cause,e.code);case Rt:throw dr("parsing error occured",e,e.code);case Ot:throw dr("invalid response encountered",e,e.code);case Pt:throw dr("unexpected JWT claim value encountered",e,e.code);case xt:throw dr("unexpected JSON attribute value encountered",e,e.code);case Lt:throw dr("JWT timestamp claim value failed validation",e,e.code);default:throw dr(e.message,e,e.code)}if(e instanceof Ae)throw dr("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw dr("runtime operation error",e,St);case"NotSupportedError":throw dr("runtime unsupported operation",e,St);case"TimeoutError":throw dr("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw dr("operation aborted",e,"OAUTH_ABORT")}throw new lr("something went wrong",{cause:e})}async function fr(e,t,n,r,o){const i=await async function(e,t){var n,r;if(!(e instanceof URL))throw ur('"server" must be an instance of URL',cr);const o=!e.href.includes("/.well-known/"),i=null!==(null==t?void 0:t.timeout)&&void 0!==n?n:30,a=AbortSignal.timeout(1e3*i),s=await(o?async function(e,t){return async function(e,t,n,r){if(!(e instanceof URL))throw se('"'.concat("issuerIdentifier",'" must be an instance of URL'),ae);Ge(e,!0!==(null==r?void 0:r[ce]));const o=n(new URL(e.href)),i=Te(null==r?void 0:r.headers);return i.set("accept","application/json"),((null==r?void 0:r[de])||fetch)(o.href,{body:void 0,headers:Object.fromEntries(i.entries()),method:"GET",redirect:"manual",signal:_e(o,null==r?void 0:r.signal)}
2)}(e,0,e=>{switch(null==t?void 0:t.algorithm){case void 0:case"oidc":!function(e){e.pathname=Re("".concat(e.pathname,"/").concat(".well-known/openid-configuration"))}(e);break;case"oauth2":!function(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"/"===e.pathname?e.pathname=t:e.pathname=Re("".concat(t,"/").concat(n?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw se('"options.algorithm" must be "oidc" (default), or "oauth2"',ie)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[de]:null==t?void 0:t[ar],[ce]:null==t||null===t.execute||void 0===r?void 0:r.includes(Er),signal:a,headers:new Headers($n)}):((null==t?void 0:t[ar])||fetch)((Ge(e,null==t||null===t.execute||void 0===c||!c.includes(Er)),e.href),{headers:Object.fromEntries(new Headers(k({accept:"application/json"},$n)).entries()),body:void 0,method:"GET",redirect:"manual",signal:a})).then(e=>async function(e,t){const n=e;if(!(n instanceof URL)&&n!==Vt)throw se('"expectedIssuerIdentifier" must be an instance of URL',ae);if(!oe(t,Response))throw se('"response" must be an instance of Response',ae);if(200!==t.status)throw be('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',Nt,t);Dt(t);const r=await Jt(t);if(Ie(r.issuer,'"response" body "issuer" property',Ot,{body:r}),n!==Vt&&new URL(r.issuer).href!==n.href)throw be('"response" body "issuer" property does not match the expected value',xt,{expected:n.href,body:r,attribute:"issuer"});return r}(Vt,e)).catch(hr);var c;return o&&new URL(s.issuer).href!==e.href&&(function(e,t,n){return!("https://login.microsoftonline.com"!==e.origin||null!=n&&n.algorithm&&"oidc"!==n.algorithm||(t[pr]=!0,0))}(e,s,t)||function(e,t){return!(!e.hostname.endsWith(".b2clogin.com")||null!=t&&t.algorithm&&"oidc"!==t.algorithm)}(e,t)||(()=>{throw new lr("discovered metadata issuer does not match the expected issuer",{code:xt,cause:{expected:e.href,body:s,attribute:"issuer"}})})()),s}(e,o),a=new yr(i,t,n,r);let s=tr(a);if(null!=o&&o[ar]&&(s.fetch=o[ar]),null!=o&&o.timeout&&(s.timeout=o.timeout),null!=o&&o.execute)for(const e of o.execute)e(a);return a}new TextDecoder;const pr=Symbol();class yr{constructor(e,t,n,r){var o,i,a,s,c;if("string"!=typeof t||!t.length)throw ur('"clientId" must be a non-empty string',cr);if("string"==typeof n&&(n={client_secret:n}),void 0!==(null===(o=n)||void 0===o?void 0:o.client_id)&&t!==n.client_id)throw ur('"clientId" and "metadata.client_id" must be the same',sr);const u=k(k({},structuredClone(n)),{},{client_id:t});let l;u[ue]=null!==(i=null===(a=n)||void 0===a?void 0:a[ue])&&void 0!==i?i:0,u[le]=null!==(s=null===(c=n)||void 0===c?void 0:c[le])&&void 0!==s?s:30,l=r||("string"==typeof u.client_secret&&u.client_secret.length?or(u.client_secret):(e,t,n,r)=>{n.set("client_id",t.client_id)});let d=Object.freeze(u);const h=structuredClone(e);pr in e&&(h[Yt]=t=>{let n=t.claims.tid;return e.issuer.replace("{tenantid}",n)});let f=Object.freeze(h);nr||(nr=new WeakMap),nr.set(this,{__proto__:null,as:f,c:d,auth:l,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(tr(this).as);return function(e){Object.defineProperties(e,function(e){return{supportsPKCE:{__proto__:null,value(){var t;let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"S256";return!0===(null===(t=e.code_challenge_methods_supported)||void 0===t?void 0:t.includes(n))}}}}(e))}(e),e}clientMetadata(){return structuredClone(tr(this).c)}get timeout(){return tr(this).timeout}set timeout(e){tr(this).timeout=e}get[ar](){return tr(this).fetch}set[ar](e){tr(this).fetch=e}}function gr(e){Object.defineProperties(e,function(e){let t;if(void 0!==e.expires_in){const n=new Date;n.setSeconds(n.getSeconds()+e.expires_in),t=n.getTime()}
2return{expiresIn:{__proto__:null,value(){if(t){const e=Date.now();return t>e?Math.floor((t-e)/1e3):0}}},claims:{__proto__:null,value(){try{return ct(this)}catch(e){return}}}}}(e))}async function wr(e,t,n){var r;let o=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=null===e.headers.get("retry-after")||void 0===r?void 0:r.trim();if(void 0===i)return;let a;if(/^\d+$/.test(i))parseInt(i,10);else{const e=new Date(i);if(Number.isFinite(e.getTime())){const t=new Date,n=e.getTime()-t.getTime();n>0&&Math.ceil(n/1e3)}}if(o&&!Number.isFinite(a))throw new Ee("invalid Retry-After header value",{cause:e});a>t&&await mr(a-t,n)}function mr(e,t){return new Promise((n,r)=>{const o=e=>{try{t.throwIfAborted()}catch(e){return void r(e)}if(e<=0)return void n();const i=Math.min(e,5);setTimeout(()=>o(e-i),1e3*i)};o(e)})}async function vr(e,t){Or(e);const n=tr(e),r=n.as,o=n.c,i=n.auth,a=n.fetch,s=n.tlsOnly,c=n.timeout;return async function(e,t,n,r,o){Me(e),Ue(t);const i=Ke(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[ce])),a=new URLSearchParams(r);a.set("client_id",t.client_id);const s=Te(null==o?void 0:o.headers);return s.set("accept","application/json"),ot(e,t,n,i,a,s,o)}(r,o,i,t,{[de]:a,[ce]:!s,headers:new Headers($n),signal:Ir(c)}).then(e=>async function(e,t,n){if(Me(e),Ue(t),!oe(n,Response))throw se('"response" must be an instance of Response',ae);await $e(n,200,"Backchannel Authentication Endpoint"),Dt(n);const r=await Jt(n);Ie(r.auth_req_id,'"response" body "auth_req_id" property',Ot,{body:r});let o="number"!=typeof r.expires_in?parseFloat(r.expires_in):r.expires_in;return Oe(o,!0,'"response" body "expires_in" property',Ot,{body:r}),r.expires_in=o,void 0!==r.interval&&Oe(r.interval,!1,'"response" body "interval" property',Ot,{body:r}),r}(r,o,e)).catch(hr)}async function Ar(e,t,n,r){var o,i;Or(e),new URLSearchParams(n);let a=null!==t.interval&&void 0!==o?o:5;const s=null!==(null==r?void 0:r.signal)&&void 0!==i?i:AbortSignal.timeout(1e3*t.expires_in);try{await mr(a,s)}catch(e){hr(e)}const c=tr(e),u=c.as,l=c.c,d=c.auth,h=c.fetch,f=c.tlsOnly,p=c.nonRepudiation,y=c.timeout,g=c.decrypt,w=(o,i)=>Ar(e,k(k({},t),{},{interval:o}),n,k(k({},r),{},{signal:s,flag:i})),m=function(e,t){const n=Ir(t);if(!n)return{signal:e,cleanup(){}};const r=new AbortController,o=e=>{const t=e.target;r.abort(t.reason)};return e.aborted?r.abort(e.reason):n.aborted?r.abort(n.reason):(e.addEventListener("abort",o,{once:!0}),n.addEventListener("abort",o,{once:!0})),{signal:r.signal,cleanup(){e.removeEventListener("abort",o),n.removeEventListener("abort",o)}}}(s,y),v=await async function(e,t,n,r,o){Me(e),Ue(t),Ie(r,'"authReqId"');const i=new URLSearchParams(null==o?void 0:o.additionalParameters);return i.set("auth_req_id",r),it(e,t,n,"urn:openid:params:grant-type:ciba",i,o)}(u,l,d,t.auth_req_id,{[de]:h,[ce]:!f,additionalParameters:n,DPoP:null==r?void 0:r.DPoP,headers:new Headers($n),signal:m.signal}).catch(hr).finally(m.cleanup);var A;if(503===v.status&&v.headers.has("retry-after"))return await wr(v,a,s,!0),await(null===v.body||void 0===A?void 0:A.cancel()),w(a);const E=async function(e,t,n,r){return ut(e,t,n,void 0,null==r?void 0:r[fe],null==r?void 0:r.recognizedTokenTypes)}(u,l,v,{[fe]:g});let b;try{await E}catch(e){if(Cr(e,r))return w(a,kr);if(e instanceof Fe)switch(e.error){case"slow_down":0;case"authorization_pending":return await wr(e.response,a,s),w(a)}hr(e)}return b.id_token&&await(null==p?void 0:p(v)),gr(b),b}function Er(e){tr(e).tlsOnly=!1}async function br(e,t,n,r,o){if(Or(e),!((null==o?void 0:o.flag)===kr||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw ur('"currentUrl" must be an instance of URL, or Request',cr);let i,a;const s=tr(e),c=s.as,u=s.c,l=s.auth,d=s.fetch,h=s.tlsOnly,f=s.jarm,p=s.hybrid,y=s.nonRepudiation,g=s.timeout,w=s.decrypt,m=s.implicit;if((null==o?void 0:o.flag)===kr)o.authResponse,o.redirectUri;else{if(!(t instanceof URL)){const e=t;switch(new URL(t.url),e.method){case"GET":break;case"POST":const n=new URLSearchParams(await async function(e){if("POST"!==e.method)throw se("form_post responses are expected to use the POST method",ie,{cause:e});if("application/x-www-form-urlencoded"!==nt(e))throw se("form_post responses are expected to use the application/x-www-form-urlencoded content-type",ie,{cause:e});return async function(e){if(e.bodyUsed)throw se("form_post Request instances must contain a readable body",ie,{cause:e});return e.text()}(e)}(e));if(p)t.hash=n.toString();else for(const e of n.entries()){var v=P(e,2);const n=v[0],r=v[1];t.searchParams.append(n,r)}break;default:throw ur("unexpected Request HTTP method",sr)}}switch(function(e){return new URL(e).search="",e.hash="",e.href}(t),!0){case!!f:await f(t,null==n?void 0:n.expectedState);break;case!!p:await p(t,null==n?void 0:n.expectedNonce,null==n?void 0:n.expectedState,null==n?void 0:n.maxAge);break;case!!m:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{(function(e,t,n,r){if(Me(e),Ue(t),n instanceof URL&&n.searchParams,!(n instanceof URLSearchParams))throw se('"parameters" must be an instance of URLSearchParams, or URL',ae);if(Ft(n,"response"))throw be('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',Ot,{parameters:n});const o=Ft(n,"iss"),i=Ft(n,"state");if(!o&&e.authorization_response_iss_parameter_supported)throw be('response parameter "iss" (issuer) missing',Ot,{parameters:n});if(o&&o!==e.issuer)throw be('unexpected "iss" (issuer) response parameter value',Ot,{expected:e.issuer,parameters:n});switch(r){case void 0:case Xt:if(void 0!==i)throw be('unexpected "state" response parameter encountered',Ot,{expected:void 0,parameters:n});break;case jt:break;default:if(Ie(r,'"expectedState" argument'),i!==r)throw be(void 0===i?'response parameter "state" missing':'unexpected "state" response parameter value',Ot,{expected:r,parameters:n})}if(Ft(n,"error"))throw new je("authorization response from the server is an error",{cause:n});const a=Ft(n,"id_token"),s=Ft(n,"token");if(void 0!==a||void 0!==s)throw new Ae("implicit and hybrid flows are not supported");return new URLSearchParams(n),yt.add(c),c;var c})(c,u,t.searchParams,null==n?void 0:n.expectedState)}catch(e){hr(e)}}}const A=await async function(e,t,n,r,o,i,a){if(Me(e),Ue(t),!yt.has(r))throw se('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',ie);Ie(o,'"redirectUri"');const s=Ft(r,"code");if(!s)throw be('no authorization code in "callbackParameters"',Ot);const c=new URLSearchParams(null==a?void 0:a.additionalParameters);
2return c.set("redirect_uri",o),c.set("code",s),i!==gt&&(Ie(i,'"codeVerifier"'),c.set("code_verifier",i)),it(e,t,n,"authorization_code",c,a)}(c,u,l,i,a,(null==n?void 0:n.pkceCodeVerifier)||gt,{additionalParameters:r,[de]:d,[ce]:!h,DPoP:null==o?void 0:o.DPoP,headers:new Headers($n),signal:Ir(g)}).catch(hr);"string"!=typeof(null==n?void 0:n.expectedNonce)&&"number"!=typeof(null==n?void 0:n.maxAge)||(n.idTokenExpected=!0);const E=async function(e,t,n,r){return"string"==typeof(null==r?void 0:r.expectedNonce)||"number"==typeof(null==r?void 0:r.maxAge)||null!=r&&r.requireIdToken?async function(e,t,n,r,o,i,a){const s=[];switch(r){case void 0:0;break;case vt:break;default:Ie(r,'"expectedNonce" argument'),s.push("nonce")}switch(null!=o||t.default_max_age,o){case void 0:0;break;case At:break;default:Oe(o,!0,'"maxAge" argument'),s.push("auth_time")}const c=await ut(e,t,n,s,i,a);Ie(c.id_token,'"response" body "id_token" property',Ot,{body:c});const u=ct(c);if(o!==At){const e=xe()+Le(t),n=Pe(t);if(u.auth_time+o<e-n)throw be("too much time has elapsed since the last End-User authentication",Lt,{claims:u,now:e,tolerance:n,claim:"auth_time"})}if(r===vt){if(void 0!==u.nonce)throw be('unexpected ID Token "nonce" claim value',Pt,{expected:void 0,claims:u,claim:"nonce"})}else if(u.nonce!==r)throw be('unexpected ID Token "nonce" claim value',Pt,{expected:r,claims:u,claim:"nonce"});return c}(e,t,n,r.expectedNonce,r.maxAge,r[fe],r.recognizedTokenTypes):async function(e,t,n,r,o){const i=await ut(e,t,n,void 0,r,o),a=ct(i);if(a){if(void 0!==t.default_max_age){Oe(t.default_max_age,!0,'"client.default_max_age"');const e=xe()+Le(t),n=Pe(t);if(a.auth_time+t.default_max_age<e-n)throw be("too much time has elapsed since the last End-User authentication",Lt,{claims:a,now:e,tolerance:n,claim:"auth_time"})}if(void 0!==a.nonce)throw be('unexpected ID Token "nonce" claim value',Pt,{expected:void 0,claims:a,claim:"nonce"})}return i}(e,t,n,null==r?void 0:r[fe],null==r?void 0:r.recognizedTokenTypes)}(c,u,A,{expectedNonce:null==n?void 0:n.expectedNonce,maxAge:null==n?void 0:n.maxAge,requireIdToken:null==n?void 0:n.idTokenExpected,[fe]:w});let b;try{await E}catch(t){if(Cr(t,o))return br(e,void 0,n,r,k(k({},o),{},{flag:kr,authResponse:i,redirectUri:a}));hr(t)}return b.id_token&&await(null==y?void 0:y(A)),gr(b),b}async function Sr(e,t,n,r){Or(e),new URLSearchParams(n);const o=tr(e),i=o.as,a=o.c,s=o.auth,c=o.fetch,u=o.tlsOnly,l=o.nonRepudiation,d=o.timeout,h=o.decrypt,f=await async function(e,t,n,r,o){Me(e),Ue(t),Ie(r,'"refreshToken"');const i=new URLSearchParams(null==o?void 0:o.additionalParameters);return i.set("refresh_token",r),it(e,t,n,"refresh_token",i,o)}(i,a,s,t,{[de]:c,[ce]:!u,additionalParameters:n,DPoP:null==r?void 0:r.DPoP,headers:new Headers($n),signal:Ir(d)}).catch(hr),p=async function(e,t,n,r){return ut(e,t,n,void 0,null==r?void 0:r[fe],null==r?void 0:r.recognizedTokenTypes)}(i,a,f,{[fe]:h});let y;try{await p}catch(o){if(Cr(o,r))return Sr(e,t,n,k(k({},r),{},{flag:kr}));hr(o)}return y.id_token&&await(null==l?void 0:l(f)),gr(y),y}async function Tr(e,t,n){Or(e),new URLSearchParams(t);const r=tr(e),o=r.as,i=r.c,a=r.auth,s=r.fetch,c=r.tlsOnly,u=r.timeout,l=await async function(e,t,n,r,o){return Me(e),Ue(t),it(e,t,n,"client_credentials",new URLSearchParams(r),o)}(o,i,a,t,{[de]:s,[ce]:!c,DPoP:null==n?void 0:n.DPoP,headers:new Headers($n),signal:Ir(u)}).catch(hr),d=async function(e,t,n){return ut(e,t,n,void 0,void 0,void 0)}(o,i,l);let h;try{await d}catch(r){if(Cr(r,n))return Tr(e,t,k(k({},n),{},{flag:kr}));hr(r)}return gr(h),h}function _r(e,t){Or(e);const n=tr(e),r=n.as,o=n.c,i=n.tlsOnly,a=n.hybrid,s=n.jarm,c=n.implicit,u=Ke(r,"authorization_endpoint",!1,i);if(new URLSearchParams(t).has("client_id")||t.set("client_id",o.client_id),!t.has("request_uri")&&!t.has("request")){if(t.has("response_type")||t.set("response_type",a?"code id_token":c?"id_token":"code"),c&&!t.has("nonce"))throw ur("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",sr);s&&t.set("response_mode","jwt")}for(const e of t.entries()){var l=P(e,2);const t=l[0],n=l[1];u.searchParams.append(t,n)}return u}async function Rr(e,t,n){Or(e);const r=_r(e,t),o=tr(e),i=o.as,a=o.c,s=o.auth,c=o.fetch,u=o.tlsOnly,l=o.timeout,d=await async function(e,t,n,r,o){var i;Me(e),Ue(t);const a=Ke(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==o?void 0:o[ce])),s=new URLSearchParams(r);s.set("client_id",t.client_id);const c=Te(null==o?void 0:o.headers);c.set("accept","application/json"),void 0!==(null==o?void 0:o.DPoP)&&(et(o.DPoP),await o.DPoP.addProof(a,c,"POST"));const u=await ot(e,t,n,a,s,c,o);return null==o||null===o.DPoP||void 0===i||i.cacheNonce(u,a),u}(i,a,s,r.searchParams,{[de]:c,[ce]:!u,DPoP:null==n?void 0:n.DPoP,headers:new Headers($n),signal:Ir(l)}
2).catch(hr),h=async function(e,t,n){if(Me(e),Ue(t),!oe(n,Response))throw se('"response" must be an instance of Response',ae);await $e(n,201,"Pushed Authorization Request Endpoint"),Dt(n);const r=await Jt(n);Ie(r.request_uri,'"response" body "request_uri" property',Ot,{body:r});let o="number"!=typeof r.expires_in?parseFloat(r.expires_in):r.expires_in;return Oe(o,!0,'"response" body "expires_in" property',Ot,{body:r}),r.expires_in=o,r}(i,a,d);let f;try{await h}catch(r){if(Cr(r,n))return Rr(e,t,k(k({},n),{},{flag:kr}));hr(r)}return _r(e,{request_uri:f.request_uri})}function Or(e){if(!(e instanceof yr))throw ur('"config" must be an instance of Configuration',cr);if(Object.getPrototypeOf(e)!==yr.prototype)throw ur("subclassing Configuration is not allowed",sr)}function Ir(e){return e?AbortSignal.timeout(1e3*e):void 0}async function Nr(e,t,n,r){Or(e);const o=tr(e),i=o.as,a=o.c,s=o.fetch,c=o.tlsOnly,u=o.nonRepudiation,l=o.timeout,d=o.decrypt,h=await async function(e,t,n,r){Me(e),Ue(t);const o=Ke(e,"userinfo_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==r?void 0:r[ce])),i=Te(null==r?void 0:r.headers);return t.userinfo_signed_response_alg?i.set("accept","application/jwt"):(i.set("accept","application/json"),i.append("accept","application/jwt")),async function(e,t,n,r,o,i){var a;if(Ie(e,'"accessToken"'),!(n instanceof URL))throw se('"url" must be an instance of URL',ae);Ge(n,!0!==(null==i?void 0:i[ce])),Te(r),null!=i&&i.DPoP&&(et(i.DPoP),await i.DPoP.addProof(n,r,"GET".toUpperCase(),e)),r.set("authorization","".concat(r.has("dpop")?"DPoP":"Bearer"," ").concat(e));const s=await((null==i?void 0:i[de])||fetch)(n.href,{duplex:oe(null,ReadableStream)?"half":void 0,body:null,headers:Object.fromEntries(r.entries()),method:"GET",redirect:"manual",signal:_e(n,null==i?void 0:i.signal)});return null==i||null===i.DPoP||void 0===a||a.cacheNonce(s,n),s}(n,0,o,i,0,k(k({},r),{},{[ue]:Le(t)}))}(i,a,t,{[de]:s,[ce]:!c,DPoP:null==r?void 0:r.DPoP,headers:new Headers($n),signal:Ir(l)}).catch(hr);let f,p=rt(i,a,n,h,{[fe]:d});try{await p}catch(o){if(Cr(o,r))return Nr(e,t,n,k(k({},r),{},{flag:kr}));hr(o)}return"application/jwt"===nt(h)&&await(null==u?void 0:u(h)),f}function Cr(e,t){return!(null==t||!t.DPoP||t.flag===kr)&&function(e){if(e instanceof Xe){const t=e.cause,n=t[0];return 1===t.length&&"dpop"===n.scheme&&"use_dpop_nonce"===n.parameters.error}return e instanceof Fe&&"use_dpop_nonce"===e.error}(e)}Object.freeze(yr.prototype);const kr=Symbol();async function Lr(e,t,n,r){Or(e);const o=tr(e),i=o.as,a=o.c,s=o.auth,c=o.fetch,u=o.tlsOnly,l=o.timeout,d=o.decrypt,h=o.nonRepudiation,f=await async function(e,t,n,r,o,i){return Me(e),Ue(t),Ie(r,'"grantType"'),it(e,t,n,r,new URLSearchParams(o),i)}(i,a,s,t,new URLSearchParams(n),{[de]:c,[ce]:!u,DPoP:null==r?void 0:r.DPoP,headers:new Headers($n),signal:Ir(l)}).catch(hr);let p;"urn:ietf:params:oauth:grant-type:token-exchange"===t&&(p={n_a:()=>{}});const y=async function(e,t,n,r){return ut(e,t,n,void 0,null==r?void 0:r[fe],null==r?void 0:r.recognizedTokenTypes)}(i,a,f,{[fe]:d,recognizedTokenTypes:p});let g;try{g=await y}catch(o){if(Cr(o,r))return Lr(e,t,n,k(k({},r),{},{flag:kr}));hr(o)}return g.id_token&&await(null==h?void 0:h(f)),gr(g),g}async function Pr(e,t,n){return t instanceof Uint8Array?crypto.subtle.importKey("raw",t,e.subtle,!1,[n]):(function(e,t,n){var r;const o=e.algorithm;if(o.name!==t.name)throw en(t.name);if(t.hash&&(null===(r=o.hash)||void 0===r?void 0:r.name)!==t.hash)throw en(t.hash,"algorithm.hash");if(t.namedCurve&&o.namedCurve!==t.namedCurve)throw en(t.namedCurve,"algorithm.namedCurve");if(void 0!==t.length&&o.length!==t.length)throw en(t.length,"algorithm.length");!function(e,t){if(t&&!e.usages.includes(t))throw new TypeError("CryptoKey does not support this operation, its usages must include ".concat(t,"."))}(e,n)}(t,e.subtle,n),e.minRsaBits&&function(e,t){const n=t.algorithm.modulusLength;if("number"!=typeof n||n<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}(e.alg,t),t)}const xr=[["verify"],["sign"]];function Mr(e){const t={name:"HMAC",hash:"SHA-".concat(e)};return{kty:["oct"],secret:!0,subtle:t,signing:t,usages:xr}}function Ur(e,t){const n={name:t?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(e)};return{kty:["RSA"],subtle:n,signing:t?k(k({},n),{},{saltLength:t}):n,usages:xr,minRsaBits:2048}}function Br(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},signing:{name:"ECDSA",hash:"SHA-".concat(t)},usages:xr}}function Dr(){const e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,signing:e,usages:xr}}function Hr(e){const t={name:"ML-DSA-".concat(e)};return{kty:["AKP"],subtle:t,signing:t,usages:xr}}const Gr=Un({HS256:Mr(256),HS384:Mr(384),HS512:Mr(512),RS256:Ur(256),RS384:Ur(384),RS512:Ur(512),PS256:Ur(256,32),PS384:Ur(384,48),PS512:Ur(512,64),ES256:Br("P-256",256),ES384:Br("P-384",384),ES512:
2Br("P-521",512),EdDSA:Dr(),Ed25519:Dr(),"ML-DSA-44":Hr(44),"ML-DSA-65":Hr(65),"ML-DSA-87":Hr(87)});function Wr(e){const t="string"==typeof e?Gr[e]:void 0;if(!t)throw new sn("alg ".concat(e," is not supported either by JOSE or your javascript runtime"));return t}async function Kr(e,t,n){if(e instanceof Uint8Array&&qt.decode(e),"string"!=typeof e)throw new cn("Compact JWS must be a string or Uint8Array");const r=e.split("."),o=r[0],i=r[1],a=r[2];if(3!==r.length)throw new cn("Invalid Compact JWS");const s={payload:i,protected:o,signature:a},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0===e?{}:function(e,t,n){let r;try{JSON.parse(Zt.decode(mn(e)))}catch(e){throw new t(n)}if(!An(r))throw new t(n);return r}(e,cn,"JWS Protected Header is invalid");return t}(o),u=function(e,t,n){const r=qn(e,zn(cn,Vn,n[1],e,t)),o=t.alg;if("string"!=typeof o||!o)throw new cn('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(n[0]&&!n[0].has(o))throw new an('"alg" (Algorithm) Header Parameter value not allowed');return[r,o]}(c,c,t),l=P(u,2),d=l[0],h=l[1],f=d?i:function(e){try{return $t(e)}catch(e){throw new cn("JWS Compact Serialization payload must use only ASCII characters")}}(i);return async function(e,t,n,r,o,i,a){var s;let c=!1;"function"==typeof n&&(await n(o,e),!0);const u="string"==typeof a,l=Wr(i),d=Qt(void 0!==r?$t(r):new Uint8Array,$t("."),u?null!==t[2]&&void 0!==s?s:t[2]=function(e,t,n){try{return $t(e)}catch(e){throw new n("The ".concat("payload"," is not a valid base64url string"))}}(a,0,cn):a),h=bn(e.signature,"signature",cn),f=await Mn(l,n,"verify");if(!await async function(e,t,n,r){const o=await Pr(e,t,"verify");try{return await crypto.subtle.verify(e.signing,o,n,r)}catch(e){return!1}}(l,f,h,d))throw new pn;return[u?bn(a,"payload",cn):a,o,u,f,c]}(s,t,n,o,c,h,f)}const Fr=e=>Math.floor(e.getTime()/1e3),jr={s:1,m:60,h:3600,d:86400,w:604800,y:31557600},Xr=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,Jr="check_failed";function Vr(){throw new TypeError("Invalid time period format")}function Yr(e){"string"!=typeof e&&Vr();const t=Xr.exec(e);(!t||t[4]&&t[1])&&Vr();const n=parseFloat(t[2]),r=Math.round(n*jr[t[3][0].toLowerCase()]);return Number.isFinite(r)||Vr(),"-"===t[1]||"ago"===t[4]?-r:r}function zr(e,t){if(!Number.isFinite(t))throw new TypeError("Invalid ".concat(e," input"));return t}function qr(e,t){if("string"!=typeof t)throw new TypeError('"'.concat(e,'" claim must be a string'))}function Zr(e,t){return"number"==typeof e?zr(t,e):e instanceof Date?zr(t,Fr(e)):Fr(new Date)+Yr(e)}const Qr=e=>{const t=e.toLowerCase();return e.includes("/")?t:"application/".concat(t)};function $r(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=e[t];if(void 0!==r||n){if("number"!=typeof r)throw new rn('"'.concat(t,'" claim must be a number'),e,t,"invalid");return r}}function eo(e,t){throw new rn('unexpected "'.concat(t,'" claim value'),e,t,Jr)}function to(e,t){let n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{JSON.parse(Zt.decode(t))}catch(e){}if(!An(n))throw new un("JWT Claims Set must be a top-level JSON object");const o=r.typ;if(void 0!==o&&("string"!=typeof e.typ||Qr(e.typ)!==Qr(o)))throw new rn('unexpected "typ" JWT header value',n,"typ",Jr);const i=r.requiredClaims,a=void 0===i?[]:i,s=r.issuer,c=r.subject,u=r.audience,l=r.maxTokenAge,d=[...a];void 0!==l&&d.push("iat"),void 0!==u&&d.push("aud"),void 0!==c&&d.push("sub"),void 0!==s&&d.push("iss");for(const e of new Set(d.reverse()))if(!Object.hasOwn(n,e))throw new rn('missing required "'.concat(e,'" claim'),n,e,"missing");var h,f;void 0===s||(Array.isArray(s)?s:[s]).includes(n.iss)||eo(n,"iss"),void 0!==c&&n.sub!==c&&eo(n,"sub"),void 0===u||("string"==typeof n.aud?f.includes(h):Array.isArray(h)&&f.some(e=>h.includes(e)))||eo(n,"aud");const p=r.clockTolerance;let y=0;if("string"==typeof p)Yr(p);else if(void 0!==p){if("number"!=typeof p)throw new TypeError("Invalid clockTolerance option type");0}zr("clockTolerance option",y);const g=r.currentDate,w=zr("currentDate option",Fr(void 0===g?new Date:g)),m=$r(n,"iat",void 0!==l),v=$r(n,"nbf");if(void 0!==v&&v>w+y)throw new rn('"nbf" claim timestamp check failed',n,"nbf",Jr);const A=$r(n,"exp");if(void 0!==A&&A<=w-y)throw new on('"exp" claim timestamp check failed',n,"exp",Jr);if(void 0!==l){const e=w-m;if(e-y>zr("maxTokenAge option","number"==typeof l?l:Yr(l)))throw new on('"iat" claim timestamp check failed (too far in the past)',n,"iat",Jr);if(e<-y)throw new rn('"iat" claim timestamp check failed (it should be in the past)',n,"iat",Jr)}return n}let no;function ro(e){return no.get(e)}async function oo(e,t,n,r,o){const i=P(function(e){if(void 0===e)return[void 0,""];const t=function(e,t){let n,r;try{n=JSON.stringify(t),r=JSON.parse(n)}
2catch(t){throw new e("JOSE Header is not valid JSON",{cause:t})}if(!An(r))throw new e("JOSE Header is not a JSON object");return[r,n]}(cn,e);return[t[0],vn(t[1])]}(t),2),a=i[0],s=i[1];if(!a)throw new cn("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");(function(e,t,n){return function(e,t){const n=(null!=t?t:{}).crit;if(Array.isArray(n)&&new Set(n).size!==n.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}(cn,e),qn(e,zn(cn,Vn,n,e,t))})(a,a,n)||o();const c=function(e){const t=e.alg;if("string"!=typeof t||!t)throw new cn('JWS "alg" (Algorithm) Header Parameter missing or invalid');return Wr(t)}(a),u=vn(e),l=await async function(e,t,n,r){const o=Qt($t(e),$t("."),t),i=await Mn(n,r,"sign");return vn(await async function(e,t,n){const r=await Pr(e,t,"sign"),o=await crypto.subtle.sign(e.signing,r,n);return new Uint8Array(o)}(n,i,o))}(s,$t(u),c,r);return"".concat(s,".").concat(u,".").concat(l)}const io=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!An(e))throw new TypeError("JWT Claims Set MUST be an object");(no||(no=new WeakMap)).set(this,structuredClone(e))}setIssuer(e){return qr("iss",e),ro(this).iss=e,this}setSubject(e){return qr("sub",e),ro(this).sub=e,this}setAudience(e){return function(e){if("string"!=typeof e&&(!Array.isArray(e)||Array.from(e).some(e=>"string"!=typeof e)))throw new TypeError('"aud" claim must be a string or an array of strings')}(e),ro(this).aud=e,this}setJti(e){return qr("jti",e),ro(this).jti=e,this}setNotBefore(e){return ro(this).nbf=Zr(e,"setNotBefore"),this}setExpirationTime(e){return ro(this).exp=Zr(e,"setExpirationTime"),this}setIssuedAt(e){return ro(this).iat=void 0===e?Fr(new Date):"string"==typeof e?zr("setIssuedAt",Fr(new Date)+Yr(e)):Zr(e,"setIssuedAt"),this}};var ao=new WeakMap;class so extends io{constructor(){super(...arguments),R(this,ao,void 0)}setProtectedHeader(e){return function(e){if(void 0!==e)throw new TypeError("".concat("setProtectedHeader"," can only be called once"))}(_(ao,this)),O(ao,this,e),this}async sign(e,t){return oo(function(e){const t=ro(e);for(const e of["iat","nbf","exp"]){const n=t[e];if("number"==typeof n&&!Number.isFinite(n))throw new TypeError('"'.concat(e,'" claim must be a finite number'))}return zt.encode(JSON.stringify(t))}(this),_(ao,this),null==t?void 0:t.crit,e,()=>{throw new un("JWTs MUST NOT use unencoded payload")})}}const co='"alg" (Algorithm)';function uo(){throw new sn("Invalid or unsupported ".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:'JWK "alg" (Algorithm) Parameter'," value"))}const lo=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let n=0;n<e.byteLength;n++)if(e[n]!==t[n])return!1;return!0},ho=e=>{const t=e.data[e.pos++];if(void 0===t)throw new Error("Unexpected end of ASN.1 input");return t},fo=e=>{const t=ho(e);if(128&t){const n=127&t;let r=0;for(let t=0;t<n;t++)r=r<<8|ho(e);return r}return t},po=(e,t,n)=>{if(ho(e)!==t)throw new Error(n)},yo=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw new Error("Unexpected end of ASN.1 input");const n=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,n},go=e=>{const t=(e=>{po(e,6,"Expected algorithm OID");const t=fo(e);return yo(e,t)})(e);if(lo(t,[43,101,110]))return"X25519";if(!lo(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");po(e,6,"Expected curve OID");const n=fo(e),r=yo(e,n);if(lo(r,[42,134,72,206,61,3,1,7]))return"P-256";if(lo(r,[43,129,4,0,34]))return"P-384";if(lo(r,[43,129,4,0,35]))return"P-521";throw new Error("Unsupported named curve")},wo=(e,t,n)=>{const r=(e=>gn(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"")))(e);return(async(e,t,n,r)=>{const o=function(e){if(void 0!==e&&"boolean"!=typeof e)throw new TypeError('"extractable" option must be a boolean');return e}(null==r?void 0:r.extractable),i=function(e,t){var n,r;return null!==(n="string"==typeof e?null!==(r=Gr[e])&&void 0!==r?r:jn[e]:void 0)&&void 0!==n?n:uo(t)}(n,co);i.secret&&uo(co);const a="spki"===e;let s;if(i.resolve)try{const n={data:t,pos:0};!function(e,t){if(po(e,48,"Invalid ".concat("spki"===t?"SPKI":"PKCS#8"," structure")),fo(e),"pkcs8"===t){po(e,2,"Expected version field");const t=fo(e);e.pos+=t}po(e,48,"Expected algorithm identifier"),fo(e)}(n,e),s=i.resolve({crv:go(n)})}catch(e){throw new sn("Invalid or unsupported key format")}else s=i.subtle;return crypto.subtle.importKey(e,t,s,null!=o?o:a,i.usages[a?0:1])})("pkcs8",r,t,n)};async function mo(e,t,n){const r=e.get(t)||e.set(t,{}).get(t),o=n.alg;if(void 0===r[o]){const e=await Sn(n,k(k({},t),{},{alg:o,ext:!0}));if("public"!==e.type)throw new ln("JSON Web Key Set members must be public keys");r[o]=e}return r[o]}function vo(e){let t;try{structuredClone(e)}catch(e){}if(!En(t))throw new ln("JSON Web Key Set malformed");const n=new WeakMap;return Object.defineProperty(async(e,r)=>{const o=k(k({},e),null==r?void 0:r.header),i=o.alg,a=o.kid,s="string"==typeof i?Gr[i]:void 0;if(!s||s.secret)throw new sn('Unsupported "alg" value for a JSON Web Key Set');const c=t.keys.filter(e=>function(e,t,n,r){const o=Tn(e),i=o.kty,a=o.key_ops,s=o.ext,c=o.kid,u=o.alg,l=o.use,d=o.crv,h=Array.isArray(a)?[...a]:a;return(void 0===s||"boolean"==typeof s)&&(void 0===h||Array.isArray(h)&&h.every((e,t)=>"string"==typeof e&&h.indexOf(e)===t)&&h.includes("verify"))&&t.kty.includes(i)&&(void 0===r||"string"==typeof r&&r===c)&&(void 0===u?"AKP"!==i:n===u)&&(void 0===l||"sig"===l)&&(!t.crv||d===t.crv)}(e,s,i,a)),u=c[0],l=c.length;if(!l)throw new dn;if(1!==l){const e=new hn;throw e[Symbol.asyncIterator]=x(function*(){for(const e of c)try{yield yield S(mo(n,e,s))}catch(e){}}),e}return mo(n,u,s)},"jwks",{value:()=>structuredClone(t)})}var Ao,Eo;let bo;
2if("undefined"==typeof navigator||null===(Ao=navigator.userAgent)||void 0===Ao||null===(Eo=Ao.startsWith)||void 0===Eo||!Eo.call(Ao,"Mozilla/5.0 ")){const e="v6.2.10";bo="".concat("jose","/").concat(e)}const So=Symbol(),To=Symbol();function _o(e,t){return Number.isFinite(e)&&Date.now()<e+t}function Ro(e,t,n){if(Number.isNaN(e))throw new TypeError('"'.concat(n,'" option must not be NaN'));return"number"==typeof e?e:t}async function Oo(e,t,n){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return wo(e,t,n)}const Io=["mfaToken"],No=["mfaToken"];var Co,ko,Lo,Po,xo,Mo,Uo,Bo,Do,Ho,Go,Wo,Ko,Fo,jo,Xo,Jo,Vo,Yo,zo,qo,Zo,Qo,$o,ei,ti,ni,ri,oi,ii,ai,si,ci,ui,li,di,hi,fi,pi,yi,gi,wi,mi,vi,Ai,Ei,bi,Si,Ti,_i,Ri,Oi;function Ii(e){if("object"!=typeof e||null===e)return{};const t=e;return{statusCode:"number"==typeof t.statusCode?t.statusCode:void 0,headers:t.headers instanceof Headers?t.headers:void 0,body:"string"==typeof t.body?t.body:void 0}}function Ni(e){var t,n;if("object"!=typeof e||null===e)return{error:"unknown_error",error_description:String(e)};const r=e;let o;if(r.response instanceof Response)try{o=new Headers(r.response.headers),o.delete("set-cookie")}catch(e){o=void 0}const i={error:null!==(t=r.error)&&void 0!==t?t:"",error_description:null!==(n=r.error_description)&&void 0!==n?n:"",message:r.message,statusCode:"number"==typeof r.status?r.status:void 0,headers:o};if("mfa_required"===r.error&&r.cause){i.mfa_token="string"==typeof r.cause.mfa_token?r.cause.mfa_token:void 0;const e=r.cause.mfa_requirements;"object"==typeof e&&null!==e&&(i.mfa_requirements=e)}return i}var Ci=class extends Error{constructor(e,t){super(t),N(this,"code",void 0),this.name="NotSupportedError",this.code=e}},ki=class extends Error{constructor(e,t,n){super(t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"statusCode",void 0),N(this,"headers",void 0),N(this,"body",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message,mfa_token:n.mfa_token,mfa_requirements:n.mfa_requirements};const r=Ii(n);this.statusCode=r.statusCode,this.headers=r.headers,this.body=r.body}},Li=class extends ki{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},Pi=class extends ki{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},xi=class extends ki{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},Mi=class extends ki{constructor(e,t){super("token_by_password_error",e,t),this.name="TokenByPasswordError"}},Ui=class extends ki{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},Bi=class extends ki{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},Di=class extends ki{constructor(e,t){super("token_revocation_error",e,t),this.name="TokenRevocationError"}},Hi=class extends ki{constructor(e,t){super("user_info_error",e,t),this.name="UserInfoError"}},Gi=class extends Error{constructor(e){super(e),N(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},Wi=class extends ki{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),N(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},Ki=class extends ki{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},Fi=class extends ki{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},ji=class extends ki{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},Xi=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),N(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}}
2,Ji=class extends Error{constructor(e){super(e),N(this,"code","organization_validation_error"),this.name="OrganizationValidationError"}},Vi=class extends Error{constructor(e){super(e||"fullResponse: true requested but no HTTP Response was captured. This is a bug in CapturingFetch."),N(this,"code","missing_captured_response_error"),this.name="MissingCapturedResponseError"}};function Yi(e){try{const t=new Headers(e);return t.delete("set-cookie"),t}catch(e){return new Headers}}function zi(e,t,n){var r;const o="object"==typeof t&&null!==t?t:void 0,i=null!==(r=null==o?void 0:o.response)&&void 0!==r?r:n,a="number"==typeof(null==o?void 0:o.status)?o.status:null==i?void 0:i.status;"number"==typeof a&&(e.statusCode=a),null!=i&&i.headers&&(e.headers=Yi(i.headers))}function qi(e){return Object.entries(e).filter(e=>void 0!==P(e,2)[1]).reduce((e,t)=>k(k({},e),{},{[t[0]]:t[1]}),{})}function Zi(e){if(!e.trim())throw new Ji("organization must not be blank")}function Qi(e,t){if(!e)return;const n=t.trim();if(n.startsWith("org_")){const t=e.org_id;if("string"!=typeof t)throw new Ji("Organization Id (org_id) claim must be a string present in the ID token");if(t!==n)throw new Ji('Organization Id (org_id) claim value mismatch in the ID token; expected "'.concat(n,'", found "').concat(t,'"'))}else{const t=e.org_name;if("string"!=typeof t)throw new Ji("Organization Name (org_name) claim must be a string present in the ID token");if(t.toLowerCase()!==n.toLowerCase())throw new Ji('Organization Name (org_name) claim value mismatch in the ID token; expected "'.concat(n,'", found "').concat(t,'"'))}}var $i=class extends Error{constructor(e,t,n){super(t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"statusCode",void 0),N(this,"headers",void 0),N(this,"body",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message};const r=Ii(n);this.statusCode=r.statusCode,this.headers=r.headers,this.body=r.body}},ea=class extends $i{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},ta=class extends $i{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},na=class extends $i{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},ra=class extends $i{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}},oa=class extends $i{constructor(e,t){super("mfa_verify_error",e,t),this.name="MfaVerifyError"}};function ia(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var aa=class e{constructor(e,t,n,r,o,i,a){N(this,"accessToken",void 0),N(this,"idToken",void 0),N(this,"refreshToken",void 0),N(this,"expiresAt",void 0),N(this,"scope",void 0),N(this,"claims",void 0),N(this,"authorizationDetails",void 0),N(this,"tokenType",void 0),N(this,"issuedTokenType",void 0),N(this,"recoveryCode",void 0),N(this,"act",void 0),this.accessToken=e,this.idToken=n,this.refreshToken=r,this.expiresAt=t,this.scope=o,this.claims=i,this.authorizationDetails=a}static fromTokenEndpointResponse(t){const n=t.id_token?t.claims():void 0,r=new e(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,n,t.authorization_details);return r.tokenType=t.token_type,r.issuedTokenType=t.issued_token_type,r}};function sa(e,t){if(!1===t.enabled)return e;const n={name:t.name,version:t.version},r=btoa(JSON.stringify(n));return async(t,n)=>{const o=t instanceof Request?new Headers(t.headers):new Headers;return null!=n&&n.headers&&new Headers(n.headers).forEach((e,t)=>{o.set(t,e)}),o.set("Auth0-Client",r),e(t,k(k({},n),{},{headers:o}))}}function ca(e){var t,n;return!1===(null==e?void 0:e.enabled)?e:{enabled:!0,name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"@auth0/auth0-auth-js",version:null!==(n=null==e?void 0:e.version)&&void 0!==n?n:"1.15.0"}}function ua(e){let t;const n=async(n,r)=>{const o=await e(n,r);return t=o.clone(),o};return n.getCapturedResponse=()=>t,n}function la(e,t,n){if(!t)return e;const r=t.signal,o=t.headers,i=t.customFetch,a=i?sa(i,n):e;return r||o?async(e,t)=>{const n=o?new Headers(e instanceof Request?e.headers:void 0):void 0;
2if(n&&null!=t&&t.headers&&new Headers(t.headers).forEach((e,t)=>n.set(t,e)),o)for(const e of Object.entries(o)){var i=P(e,2);const t=i[0],r=i[1],o=t.toLowerCase();"authorization"!==o&&"auth0-client"!==o&&n.set(t,r)}const s=function(e,t){if(!e)return{signal:null!=t?t:void 0};if(!t)return{signal:e};if("undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.any)return{signal:AbortSignal.any([e,t])};const n=new AbortController,r=[e,t],o=r.find(e=>e.aborted);if(o)return n.abort(o.reason),{signal:n.signal};const i=[],a=()=>{r.forEach((e,t)=>{const n=i[t];n&&e.removeEventListener("abort",n)})};return r.forEach((e,t)=>{const r=()=>{a(),n.abort(e.reason)};i[t]=r,e.addEventListener("abort",r,{once:!0})}),{signal:n.signal,cleanup:a}}(r,null==t?void 0:t.signal);try{return await a(e,k(k(k({},t),n&&{headers:n}),{},{signal:s.signal}))}finally{var c;null===(c=s.cleanup)||void 0===c||c.call(s)}}:a}var da={otp:"http://auth0.com/oauth/grant-type/mfa-otp",oob:"http://auth0.com/oauth/grant-type/mfa-oob","recovery-code":"http://auth0.com/oauth/grant-type/mfa-rec
2overy-code"},ha=(Co=new WeakMap,ko=new WeakMap,Lo=new WeakMap,Po=new WeakMap,xo=new WeakMap,Mo=new WeakMap,Uo=new WeakMap,Bo=new WeakSet,class{constructor(e){var t,n;I(this,Bo),R(this,Co,void 0),R(this,ko,void 0),R(this,Lo,void 0),R(this,Po,void 0),R(this,xo,void 0),R(this,Mo,void 0),R(this,Uo,void 0),O(Co,this,"https://".concat(e.domain)),O(ko,this,e.clientId),O(Lo,this,e.clientSecret),O(Po,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),O(xo,this,null!==(n=e.telemetryConfig)&&void 0!==n?n:ca()),O(Mo,this,e.getConfiguration),O(Uo,this,e.createCaptureConfiguration)}async listAuthenticators(e,t){const n="".concat(_(Co,this),"/mfa/authenticators"),r=e.mfaToken,o=await b(Bo,this,fa).call(this,t)(n,{method:"GET",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}});if(!o.ok){const e=await o.clone().text(),t=o.status,n=Yi(o.headers);let i;try{i=JSON.parse(e)}catch(r){throw new ea("Failed to list authenticators",{error:"unknown_error",error_description:"Failed to list authenticators",statusCode:t,headers:n,body:e})}throw new ea(i.error_description||"Failed to list authenticators",k(k({},i),{},{statusCode:t,headers:n,body:e}))}return(await o.json()).map(ia)}async enrollAuthenticator(e,t){const n="".concat(_(Co,this),"/mfa/associate"),r=e.mfaToken,o=L(e,Io),i={authenticator_types:o.authenticatorTypes};"oobChannels"in o&&(i.oob_channels=o.oobChannels),"phoneNumber"in o&&o.phoneNumber&&(i.phone_number=o.phoneNumber),"email"in o&&o.email&&(i.email=o.email);const a=await b(Bo,this,fa).call(this,t)(n,{method:"POST",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"},body:JSON.stringify(i)});if(!a.ok){const e=await a.clone().text(),t=a.status,n=Yi(a.headers);let o;try{o=JSON.parse(e)}catch(r){throw new ta("Failed to enroll authenticator",{error:"unknown_error",error_description:"Failed to enroll authenticator",statusCode:t,headers:n,body:e})}throw new ta(o.error_description||"Failed to enroll authenticator",k(k({},o),{},{statusCode:t,headers:n,body:e}))}return function(e){if("otp"===e.authenticator_type)return{authenticatorType:"otp",secret:e.secret,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes,id:e.id};if("oob"===e.authenticator_type)return{authenticatorType:"oob",oobChannel:e.oob_channel,oobCode:e.oob_code,bindingMethod:e.binding_method,id:e.id,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await a.json())}async deleteAuthenticator(e,t){const n=e.authenticatorId,r=e.mfaToken,o="".concat(_(Co,this),"/mfa/authenticators/").concat(encodeURIComponent(n)),i=await b(Bo,this,fa).call(this,t)(o,{method:"DELETE",headers:{Authorization:"Bearer ".concat(r),"Content-Type":"application/json"}});if(!i.ok){const e=await i.clone().text(),t=i.status,n=Yi(i.headers);let o;try{o=JSON.parse(e)}catch(r){throw new na("Failed to delete authenticator",{error:"unknown_error",error_description:"Failed to delete authenticator",statusCode:t,headers:n,body:e})}throw new na(o.error_description||"Failed to delete authenticator",k(k({},o),{},{statusCode:t,headers:n,body:e}))}}async challengeAuthenticator(e,t){const n="".concat(_(Co,this),"/mfa/challenge"),r=e.mfaToken,o=L(e,No),i={mfa_token:r,client_id:_(ko,this),challenge_type:o.challengeType};_(Lo,this)&&(i.client_secret=_(Lo,this)),o.authenticatorId&&(i.authenticator_id=o.authenticatorId);const a=await b(Bo,this,fa).call(this,t)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!a.ok){const e=await a.clone().text(),t=a.status,n=Yi(a.headers);let o;try{o=JSON.parse(e)}catch(r){throw new ra("Failed to challenge authenticator",{error:"unknown_error",error_description:"Failed to challenge authenticator",statusCode:t,headers:n,body:e})}throw new ra(o.error_description||"Failed to challenge authenticator",k(k({},o),{},{statusCode:t,headers:n,body:e}))}return function(e){const t={challengeType:e.challenge_type};return void 0!==e.oob_code&&(t.oobCode=e.oob_code),void 0!==e.binding_method&&(t.bindingMethod=e.binding_method),t}(await a.json())}async verify(e,t){if(!_(Mo,this))throw new Error("MFA verify requires a configuration provider (getConfiguration was not set)");const n={mfa_token:e.mfaToken};if(e.audience&&(n.audience=e.audience),"otp"===e.factorType?n.otp=e.otp:"oob"===e.factorType?(n.oob_code=e.oobCode,e.bindingCode&&(n.binding_code=e.bindingCode)):"recovery-code"===e.factorType&&(n.recovery_code=e.recoveryCode),e.fullResponse){var r;if(!_(Uo,this))throw new Error("MFA verify fullResponse requires a capture-config factory (createCaptureConfiguration was not set)");const s=ua(null!==(r=(await _(Mo,this).call(this,t))[ar])&&void 0!==r?r:fetch),c=await _(Uo,this).call(this,s);
2try{const t=await Lr(c,da[e.factorType],n),r=aa.fromTokenEndpointResponse(t);t.recovery_code&&(r.recoveryCode=t.recovery_code);const o=s.getCapturedResponse();if(!o)throw new Vi;return{data:r,response:o}}catch(e){var o,i,a;if(e instanceof Vi)throw e;if(e instanceof oa)throw e;const t=e,n=new oa(t.error_description||t.message||"Failed to verify MFA challenge",{error:null!==(o=t.error)&&void 0!==o?o:"mfa_verify_error",error_description:null!==(i=null!==(a=t.error_description)&&void 0!==a?a:t.message)&&void 0!==i?i:"Failed to verify MFA challenge"});throw zi(n,e,s.getCapturedResponse()),n}}const s=await _(Mo,this).call(this,t);try{const t=await Lr(s,da[e.factorType],n),r=aa.fromTokenEndpointResponse(t);return t.recovery_code&&(r.recoveryCode=t.recovery_code),r}catch(e){var c,u,l;if(e instanceof oa)throw e;const t=e,n=new oa(t.error_description||t.message||"Failed to verify MFA challenge",{error:null!==(c=t.error)&&void 0!==c?c:"mfa_verify_error",error_description:null!==(u=null!==(l=t.error_description)&&void 0!==l?l:t.message)&&void 0!==u?u:"Failed to verify MFA challenge"});throw zi(n,e),n}}});function fa(e){return la(_(Po,this),e,_(xo,this))}var pa=class extends Error{constructor(e,t,n){super(t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"statusCode",void 0),N(this,"headers",void 0),N(this,"body",void 0),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message};const r=Ii(n);this.statusCode=r.statusCode,this.headers=r.headers,this.body=r.body}},ya=class extends pa{constructor(e,t){super("passkey_register_error",e,t),this.name="PasskeyRegisterError"}},ga=class extends pa{constructor(e,t){super("passkey_challenge_error",e,t),this.name="PasskeyChallengeError"}},wa=class extends pa{constructor(e,t){super("passkey_get_token_error",e,t),this.name="PasskeyGetTokenError",this.cause=t&&{error:t.error,error_description:t.error_description,message:t.message,mfa_token:t.mfa_token,mfa_requirements:t.mfa_requirements}}};function ma(e){return e.useMtls?{}:e.clientSecret?{client_secret:e.clientSecret}:{}}var va="urn:okta:params:oauth:grant-type:webauthn",Aa=(Do=new WeakMap,Ho=new WeakMap,Go=new WeakMap,Wo=new WeakMap,Ko=new WeakMap,Fo=new WeakMap,jo=new WeakSet,class{constructor(e){var t,n;I(this,jo),R(this,Do,void 0),R(this,Ho,void 0),R(this,Go,void 0),R(this,Wo,void 0),R(this,Ko,void 0),R(this,Fo,void 0),O(Do,this,"https://".concat(e.domain)),O(Ho,this,e.clientId),O(Go,this,{clientSecret:e.clientSecret,useMtls:e.useMtls}),O(Wo,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),O(Ko,this,null!==(n=e.telemetryConfig)&&void 0!==n?n:ca()),O(Fo,this,e.grantRequest)}async register(e,t){const n="".concat(_(Do,this),"/passkey/register"),r=k(k(k(k(k(k(k(k({},e.email&&{email:e.email}),e.name&&{name:e.name}),e.phoneNumber&&{phone_number:e.phoneNumber}),e.username&&{username:e.username}),e.givenName&&{given_name:e.givenName}),e.familyName&&{family_name:e.familyName}),e.nickname&&{nickname:e.nickname}),e.picture&&{picture:e.picture}),o=k(k({client_id:_(Ho,this)},ma(_(Go,this))),{},{user_profile:r});e.realm&&(o.realm=e.realm),e.organization&&(o.organization=e.organization),e.userMetadata&&(o.user_metadata=e.userMetadata);const i=await b(jo,this,Ea).call(this,t)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(o)});if(!i.ok){const e=await b(jo,this,ba).call(this,i),t=new ya(e.error_description||"Failed to request signup challenge",e);throw t.statusCode=i.status,t.headers=Yi(i.headers),t}return{authSession:(a=await i.json()).auth_session,authnParamsPublicKey:k({},a.authn_params_public_key)};var a}async challenge(e,t){const n="".concat(_(Do,this),"/passkey/challenge"),r=k({client_id:_(Ho,this)},ma(_(Go,this)));null!=e&&e.realm&&(r.realm=e.realm),null!=e&&e.organization&&(r.organization=e.organization);const o=await b(jo,this,Ea).call(this,t)(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!o.ok){const e=await b(jo,this,ba).call(this,o),t=new ga(e.error_description||"Failed to request login challenge",e);throw t.statusCode=o.status,t.headers=Yi(o.headers),t}return{authSession:(i=await o.json()).auth_session,authnParamsPublicKey:k({},i.authn_params_public_key)};var i}async getTokenByPasskey(e,t){void 0!==e.organization&&Zi(e.organization);const n=new URLSearchParams({auth_session:e.authSession,authn_response:JSON.stringify(e.credential)});let r;e.realm&&n.append("realm",e.realm),e.scope&&n.append("scope",e.scope),e.audience&&n.append("audience",e.audie
2nce),e.organization&&n.append("organization",e.organization);try{r=await _(Fo,this).call(this,va,n,t,e.fullResponse)}catch(e){if(e instanceof Vi)throw e;const t=Ni(e),n=new wa(t.error_description||"Failed to exchange passkey credential for tokens.",t);throw zi(n,e),n}if(e.fullResponse){const t=r;return e.organization&&Qi(t.data.claims,e.organization),t}const o=r;return e.organization&&Qi(o.claims,e.organization),o}});function Ea(e){return la(_(Wo,this),e,_(Ko,this))}async function ba(e){const t=await e.clone().text();try{return k(k({},JSON.parse(t)),{},{statusCode:e.status,headers:e.headers,body:t})}catch(n){return{error:"unknown_error",error_description:"HTTP ".concat(e.status," ").concat(e.statusText),statusCode:e.status,headers:e.headers,body:t}}}var Sa=class extends Error{constructor(e,t,n){super(t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"statusCode",void 0),N(this,"headers",void 0),N(this,"body",void 0),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.cause=n&&(n.error||n.error_description)?{error:n.error,error_description:n.error_description,message:n.message,mfa_token:n.mfa_token,mfa_requirements:n.mfa_requirements}:void 0;const r=Ii(n);this.statusCode=r.statusCode,this.headers=r.headers,this.body=r.body}},Ta=class extends Sa{constructor(e,t){super("passwordless_start_error",e,t),this.name="PasswordlessStartError"}},_a=class extends Sa{constructor(e,t){super("passwordless_verify_error",e,t),this.name="PasswordlessVerifyError"}},Ra=class extends Sa{constructor(e,t){super("passwordless_db_get_token_error",e,t),this.name="PasswordlessDbGetTokenError"}},Oa=class extends Sa{constructor(e,t,n,r,o){super("passwordless_challenge_error",e,n),N(this,"statusCode",void 0),N(this,"validationErrors",void 0),this.name="PasswordlessChallengeError",this.statusCode=t,this.validationErrors=r,this.headers=null!=o?o:this.headers}};function Ia(e){return/^\+[1-9]\d{1,14}$/.test(e)}async function Na(e,t,n){if(e.useMtls)return{};if(e.clientAssertionSigningKey){var r;const o=null!==(r=e.clientAssertionSigningAlg)&&void 0!==r?r:"RS256",i=e.clientAssertionSigningKey instanceof CryptoKey?e.clientAssertionSigningKey:await Oo(e.clientAssertionSigningKey,o);return{client_assertion:await new so({}).setProtectedHeader({alg:o}).setIssuer(t).setSubject(t).setAudience("https://".concat(n,"/")).setJti(crypto.randomUUID()).setIssuedAt().setExpirationTime("".concat(120,"s")).sign(i),client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}}if(e.clientSecret)return{client_secret:e.clientSecret};throw new Xi}var Ca=(Xo=new WeakMap,Jo=new WeakMap,Vo=new WeakMap,Yo=new WeakMap,zo=new WeakMap,qo=new WeakMap,Zo=new WeakMap,Qo=new WeakSet,class{constructor(e){var t,n;I(this,Qo),R(this,Xo,void 0),R(this,Jo,void 0),R(this,Vo,void 0),R(this,Yo,void 0),R(this,zo,void 0),R(this,qo,void 0),R(this,Zo,void 0),O(Jo,this,e.domain),O(Xo,this,"https://".concat(e.domain)),O(Vo,this,e.clientId),O(Yo,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),O(zo,this,null!==(n=e.telemetryConfig)&&void 0!==n?n:ca()),O(qo,this,{clientSecret:e.clientSecret,clientAssertionSigningKey:e.clientAssertionSigningKey,clientAssertionSigningAlg:e.clientAssertionSigningAlg,useMtls:e.useMtls}),O(Zo,this,e.grantRequest)}async sendEmail(e,t){const n=await b(Qo,this,La).call(this,function(e){var t;const n=null!==(t=e.send)&&void 0!==t?t:"code",r={email:e.email,connection:"email",send:n};return"link"===n&&e.authParams&&(r.authParams=e.authParams),r}(e),"Failed to send passwordless email",e.language,t);if(e.fullResponse)return{data:void 0,response:n}}async sendSms(e,t){if(!Ia(e.phoneNumber))throw new Ta("Phone number must be in E.164 format (e.g. +14155550100).");const n=await b(Qo,this,La).call(this,function(e){return{phone_number:e.phoneNumber,connection:"sms"}}(e),"Failed to send passwordless SMS",e.language,t);if(e.fullResponse)return{data:void 0,response:n}}async challengeWithEmail(e,t){const n=function(e){var t;return{email:e.email,connection:e.connection,allow_signup:null!==(t=e.allowSignup)&&void 0!==t&&t}}(e);return b(Qo,this,Pa).call(this,n,"Failed to request email OTP challenge",t)}async challengeWithPhoneNumber(e,t){if(!Ia(e.phoneNumber))throw new Oa("Phone number must be in E.164 format (e.g. +14155550100).",0,void 0,void 0);const n=function(e){var t;const n={phone_number:e.phoneNumber,connection:e.connection,allow_signup:null!==(t=e.allowSignup)&&void 0!==t&&t};return e.deliveryMethod&&(n.delivery_method=e.deliveryMethod),n}(e);return b(Qo,this,Pa).call(this,n,"Failed to request phone OTP challenge",t)}async getTokenByPasswordlessDbConnection(e,t){const n=new URLSearchParams({auth_session:e.authSession,otp:e.otp});if(e.scope&&n.append("scope",e.scope),e.audience&&n.append("audience",e.audie
2nce),!_(Zo,this))throw new Ra("Missing grant request delegate.",Ni(new Error("missing grantRequest")));try{return await _(Zo,this).call(this,"http://auth0.com/oauth/grant-type/passwordless/otp",n,t,e.fullResponse)}catch(e){if(e instanceof Vi)throw e;const t=new Ra("There was an error while trying to request a token.",Ni(e)),n=e;throw t.statusCode=n._statusCode,t.headers=n._headers,t}}});function ka(e){return la(_(Yo,this),e,_(zo,this))}async function La(e,t,n,r){var o;const i=await Na(_(qo,this),_(Vo,this),_(Jo,this)),a=k(k({client_id:_(Vo,this)},e),i);let s;try{s=await b(Qo,this,ka).call(this,r)("".concat(_(Xo,this),"/passwordless/start"),{method:"POST",headers:k({"Content-Type":"application/json"},n?{"x-request-language":n}:{}),body:JSON.stringify(a)})}catch(e){throw new Ta("".concat(t,": a network error occurred."))}if(s.ok)return s;const c=await s.clone().text();let u;if(204!==s.status)try{u=JSON.parse(c)}catch(e){u=void 0}const l=new Ta((null===(o=u)||void 0===o?void 0:o.error_description)||t,u);throw l.statusCode=s.status,l.headers=Yi(s.headers),l.body=c,l}async function Pa(e,t,n){var r,o;const i=await Na(_(qo,this),_(Vo,this),_(Jo,this)),a=k(k({client_id:_(Vo,this)},e),i);let s;try{s=await b(Qo,this,ka).call(this,n)("".concat(_(Xo,this),"/otp/challenge"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)})}catch(e){throw new Oa("challenge error: a network error occurred.",0,void 0,void 0)}if(s.ok){let n;try{n=await s.json()}catch(e){throw new Oa("".concat(t,": could not parse the response body."),s.status,void 0,void 0,Yi(s.headers))}return{authSession:n.auth_session}}const c=await s.clone().text();let u;try{u=JSON.parse(c)}catch(e){u=void 0}const l=u?k(k({},u),{},{statusCode:s.status,headers:s.headers,body:c}):{error:"",error_description:"",statusCode:s.status,headers:s.headers,body:c};throw new Oa((null===(r=u)||void 0===r?void 0:r.error_description)||t,s.status,l,null===(o=u)||void 0===o?void 0:o.validation_errors,Yi(s.headers))}var xa=class extends Error{constructor(e,t,n){super(t),N(this,"cause",void 0),N(this,"code",void 0),N(this,"statusCode",void 0),N(this,"headers",void 0),N(this,"body",void 0),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message};const r=Ii(n);this.statusCode=r.statusCode,this.headers=r.headers,this.body=r.body}},Ma=class extends xa{constructor(e,t){super("signup_error",e,t),this.name="SignUpError"}},Ua=class extends xa{constructor(e,t){super("change_password_error",e,t),this.name="ChangePasswordError"}};function Ba(e,t,n){for(const r of t)if(null===e[r]||void 0===e[r]||""===e[r])throw new n('Required parameter "'.concat(String(r),'" was null, undefined, or empty.'))}function Da(e){var t,n;return{id:null!==(t=null!==(n=e._id)&&void 0!==n?n:e.user_id)&&void 0!==t?t:e.id,email:"string"==typeof e.email?e.email:"",emailVerified:Boolean(e.email_verified),username:e.username,givenName:e.given_name,familyName:e.family_name,name:e.name,nickname:e.nickname,picture:e.picture,userMetadata:e.user_metadata}}var Ha=($o=new WeakMap,ei=new WeakMap,ti=new WeakMap,ni=new WeakMap,ri=new WeakSet,class{constructor(e){var t,n;I(this,ri),R(this,$o,void 0),R(this,ei,void 0),R(this,ti,void 0),R(this,ni,void 0),O($o,this,"https://".concat(e.domain)),O(ei,this,e.clientId),O(ti,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),O(ni,this,null!==(n=e.telemetryConfig)&&void 0!==n?n:ca())}async signUp(e,t){var n;Ba(e,["email","password","connection"],Ma);const r=k({client_id:null!==(n=e.clientId)&&void 0!==n?n:_(ei,this)},function(e){const t={email:e.email,password:e.password,connection:e.connection};return void 0!==e.username&&(t.username=e.username),void 0!==e.givenName&&(t.given_name=e.givenName),void 0!==e.familyName&&(t.family_name=e.familyName),void 0!==e.name&&(t.name=e.name),void 0!==e.nickname&&(t.nickname=e.nickname),void 0!==e.picture&&(t.picture=e.picture),void 0!==e.userMetadata&&(t.user_metadata=e.userMetadata),t}(e)),o=await b(ri,this,Ga).call(this,"/dbconnections/signup",r,Ma,"Failed to sign up",t);if(e.fullResponse){const e=o.clone();return{data:Da(await o.json()),response:e}}return Da(await o.json())}async changePassword(e,t){var n;if(Ba(e,["connection"],Ua),!e.email&&!e.username)throw new Ua('Either "email" or "username" is required.');const r=k({client_id:null!==(n=e.clientId)&&void 0!==n?n:_(ei,this)},function(e){const t={connection:e.connection};return void 0!==e.email&&(t.email=e.email),void 0!==e.username&&(t.username=e.username),void 0!==e.organization&&(t.organization=e.organization),t}(e)),o=await b(ri,this,Ga).call(this,"/dbconnections/change_password",r,Ua,"Failed to request a password change",t);if(e.fullResponse){const e=o.clone();return{data:await o.text(),response:e}}return o.text()}});async function Ga(e,t,n,r,o){const i=la(_(ti,this),o,_(ni,this));let a;try{a=await i("".concat(_($o,this)).concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}catch(e){throw new n("".concat(r,": a network error occurred."))}if(a.ok)return a;const s=await a.clone().text(),c=await async function(e){let t;try{t=await e.json()}catch(e){return}return"string"==typeof t.error?t:"string"==typeof t.code?{error:t.code,error_description:"string"==typeof t.description?t.description:""}:void 0}(a.clone()),u=new n((null==c?void 0:c.error_description)||r,null!=c?c:{error:"unknown_error",error_description:r});throw u.statusCode=a.status,u.headers=Yi(a.headers),u.body=s,u}
2var Wa=class extends Error{constructor(e,t,n){super(t),N(this,"code",void 0),N(this,"cause",void 0),this.name="AnonymousSessionError",this.code=e,this.cause=n&&{error:n.error,error_description:n.error_description,message:n.message}}},Ka=new Set(["session_expired","invalid_session_token"]);async function Fa(e){const t="Request failed with status ".concat(e.status);let n={};try{n=await e.json()}catch(e){}return{error:"string"==typeof n.error?n.error:"server_error",error_description:"string"==typeof n.error_description?n.error_description:t}}var ja=(oi=new WeakMap,ii=new WeakMap,ai=new WeakMap,si=new WeakMap,ci=new WeakMap,ui=new WeakMap,li=new WeakMap,di=new WeakMap,hi=new WeakSet,class{constructor(e){var t;I(this,hi),R(this,oi,void 0),R(this,ii,void 0),R(this,ai,void 0),R(this,si,void 0),R(this,ci,void 0),R(this,ui,void 0),R(this,li,void 0),R(this,di,void 0),O(oi,this,e.domain),O(ii,this,"https://".concat(e.domain)),O(ai,this,e.clientId),O(si,this,e.clientSecret),O(ci,this,e.clientAssertionSigningKey),O(ui,this,e.clientAssertionSigningAlg),O(li,this,e.useMtls),O(di,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async createSession(e){const t={client_id:_(ai,this)};null!=e&&e.audience&&(t.audience=e.audience),null!=e&&e.scope&&(t.scope=e.scope),null!=e&&e.metadata&&(t.metadata=e.metadata);const n=await b(hi,this,Ja).call(this,t);if(!n.sessionToken)throw new Wa("server_error","session_token missing from create session response");return{sessionToken:n.sessionToken,accessToken:n.accessToken,expiresAt:n.expiresAt,sessionTokenExpiresAt:n.sessionTokenExpiresAt,scope:n.scope}}async getAccessToken(e){if(null==e||!e.sessionToken)return this.createSession({audience:null==e?void 0:e.audience,scope:null==e?void 0:e.scope});try{return await b(hi,this,Xa).call(this,e.sessionToken,e)}catch(t){if(t instanceof Wa&&Ka.has(t.code))return k(k({},await this.createSession({audience:null==e?void 0:e.audience,scope:null==e?void 0:e.scope})),{},{sessionReplaced:!0});throw t}}async logout(){const e="".concat(_(ii,this),"/anonymous/logout"),t={client_id:_(ai,this)},n=await _(di,this).call(this,e,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",redirect:"error",body:JSON.stringify(t)});if(!n.ok){const e=await Fa(n);throw new Wa(e.error,e.error_description||"Failed to end anonymous session",e)}}});async function Xa(e,t){const n={client_id:_(ai,this),session_token:e};null!=t&&t.audience&&(n.audience=t.audience),null!=t&&t.scope&&(n.scope=t.scope);const r=await b(hi,this,Ja).call(this,n);return{sessionToken:e,accessToken:r.accessToken,expiresAt:r.expiresAt,sessionTokenExpiresAt:r.sessionTokenExpiresAt,scope:r.scope,sessionReplaced:!1}}async function Ja(e){const t="".concat(_(ii,this),"/anonymous/token"),n=await async function(e,t,n){if(e.useMtls)return{};if(e.clientAssertionSigningKey){var r;const o=null!==(r=e.clientAssertionSigningAlg)&&void 0!==r?r:"RS256",i=e.clientAssertionSigningKey instanceof CryptoKey?e.clientAssertionSigningKey:await Oo(e.clientAssertionSigningKey,o);return{client_assertion:await new so({}).setProtectedHeader({alg:o}).setIssuer(t).setSubject(t).setAudience("https://".concat(n,"/")).setJti(crypto.randomUUID()).setIssuedAt().setExpirationTime("".concat(120,"s")).sign(i),client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}}return e.clientSecret?{client_secret:e.clientSecret}:{}}({clientSecret:_(si,this),clientAssertionSigningKey:_(ci,this),clientAssertionSigningAlg:_(ui,this),useMtls:_(li,this)},_(ai,this),_(oi,this));Object.assign(e,n);const r=await _(di,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",redirect:"error",body:JSON.stringify(e)});if(!r.ok){const e=await Fa(r);throw new Wa(e.error,e.error_description||"Anonymous token request failed",e)}let o;try{o=await r.json()}catch(e){throw new Wa("server_error","Invalid response from anonymous token endpoint")}return function(e){const t=Math.floor(Date.now()/1e3);if("string"!=typeof e.access_token||!e.access_token)throw new Wa("server_error","access_token missing or invalid in anonymous token response");const n=e.expires_in;if("number"!=typeof n||!Number.isFinite(n))throw new Wa("server_error","expires_in missing or invalid in anonymous token response");return{accessToken:e.access_token,expiresAt:t+n,scope:e.scope,sessionToken:e.session_token,sessionTokenExpiresAt:"number"==typeof e.session_expires_in&&Number.isFinite(e.session_expires_in)?t+e.session_expires_in:void 0}}(o)}var Va=(fi=new WeakMap,pi=new WeakMap,yi=new WeakMap,class{constructor(e,t){R(this,fi,new Map),R(this,pi,void 0),R(this,yi,void 0),O(yi,this,Math.max(1,Math.floor(e))),O(pi,this,Math.max(0,Math.floor(t)))}get(e){const t=_(fi,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return _(fi,this).delete(e),_(fi,this).set(e,t),t.value;_(fi,this).delete(e)}}set(e,t,n){_(fi,this).has(e)&&_(fi,this).delete(e);const r=null!=n&&Number.isFinite(n)&&n>0?n:_(pi,this);for(_(fi,this).set(e,{value:t,expiresAt:Date.now()+r});_(fi,this).size>_(yi,this);){const e=_(fi,this).keys().next().value;if(void 0===e)break;_(fi,this).delete(e)}}}),Ya=new Map;function za(e){return{ttlMs:1e3*("number"==typeof(null==e?void 0:e.ttl)?e.ttl:600),maxEntries:"number"==typeof(null==e?void 0:e.maxEntries)&&e.maxEntries>0?e.maxEntries:100}}var qa=class{static createDiscoveryCache(e){const t=(n=e.maxEntries,r=e.ttlMs,"".concat(n,":").concat(r));var n,r;let o=(i=t,Ya.get(i));var i;return o||(o=new Va(e.maxEntries,e.ttlMs),Ya.set(t,o)),o}static createJwksCache(){return{}}},Za="openid profile email offline_access",Qa=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function $a(e){if(null==e)throw new Bi("subject_token is required");if("string"!=typeof e)throw new Bi("subject_token must be a string");if(0===e.trim().length)throw new Bi("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new Bi("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new Bi("subject_token must not include the 'Bearer ' prefix")}function es(e,t){if(t)for(const r of Object.entries(t)){var n=P(r,2);const t=n[0],o=n[1];if(!Qa.has(t))if(Array.isArray(o)){if(o.length>20)throw new Bi("Parameter '".concat(t,"' exceeds maximum array size of ").concat(20));o.forEach(n=>{e.append(t,n)})}
2else e.append(t,o)}}var ts="urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",ns="urn:ietf:params:oauth:grant-type:token-exchange",rs="urn:ietf:params:oauth:token-type:access_token";function os(e,t){return(n,r)=>{const o=null==r?void 0:r.body;if(t!==va||!(o instanceof URLSearchParams))return e(n,r);const i={};for(const e of o){var a=P(e,2);const t=a[0],n=a[1];i[t]="authn_response"===t?JSON.parse(n):n}const s=new Headers(null==r?void 0:r.headers);return s.set("Content-Type","application/json"),e(n,k(k({},r),{},{headers:s,body:JSON.stringify(i)}))}}gi=new WeakMap,wi=new WeakMap,mi=new WeakMap,vi=new WeakMap,Ai=new WeakMap,Ei=new WeakMap,bi=new WeakMap,Si=new WeakMap,Ti=new WeakMap,_i=new WeakMap,Ri=new WeakMap,Oi=new WeakSet;function is(){const e=_(Ai,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(_(Ai,this).useMtls?"1":"0")}async function as(e,t){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const r=await b(Oi,this,ys).call(this,n),o=new yr(e,_(Ai,this).clientId,{client_secret:_(Ai,this).clientSecret,use_mtls_endpoint_aliases:_(Ai,this).useMtls},r);return o[ar]=null!=t?t:_(Ei,this),o}function ss(e){return la(_(Ei,this),e,_(bi,this))}async function cs(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const n=await b(Oi,this,us).call(this,t),r=n.configuration,o=n.serverMetadata;if(!e)return{configuration:r,serverMetadata:o};const i=b(Oi,this,ss).call(this,e);return{configuration:await b(Oi,this,as).call(this,o,i,t),serverMetadata:o}}async function us(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=_(e?wi:gi,this);if(t&&_(mi,this))return{configuration:t,serverMetadata:_(mi,this)};const n=b(Oi,this,is).call(this);e||await b(Oi,this,ys).call(this,!1);const r=_(Ti,this).get(n);if(r)return b(Oi,this,ls).call(this,r.serverMetadata,e);const o=_(_i,this).get(n);if(o){const t=await o;return b(Oi,this,ls).call(this,t.serverMetadata,e)}const i=(async()=>{const e=(await fr(new URL("https://".concat(_(Ai,this).domain)),_(Ai,this).clientId,{use_mtls_endpoint_aliases:_(Ai,this).useMtls},(e,t,n,r)=>{n.set("client_id",t.client_id)},{[ar]:_(Ei,this)})).serverMetadata();return _(Ti,this).set(n,{serverMetadata:e}),{serverMetadata:e}})();i.catch(()=>{}),_(_i,this).set(n,i);try{const t=(await i).serverMetadata;return b(Oi,this,ls).call(this,t,e)}finally{_(_i,this).delete(n)}}async function ls(e,t){const n=await b(Oi,this,as).call(this,e,void 0,t);return O(mi,this,e),O(t?wi:gi,this,n),{configuration:n,serverMetadata:e}}async function ds(e,t,n){var r,o,i;const a=(await b(Oi,this,cs).call(this,t)).configuration;if("audience"in e||"resource"in e)throw new Bi("audience and resource parameters are not supported for Token Vault exchanges");$a(e.subjectToken);const s=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==e.subjectTokenType&&void 0!==r?r:rs,requested_token_type:null!==e.requestedTokenType&&void 0!==o?o:"http://auth0.com/oauth/token-type/federated-connection-access-token"});if(e.loginHint&&s.append("login_hint",e.loginHint),e.scope&&s.append("scope",e.scope),es(s,e.extra),n){var c;const t=ua(null!==a[ar]&&void 0!==c?c:_(Ei,this)),r=await b(Oi,this,as).call(this,a.serverMetadata(),t);try{const e=await Lr(r,ts,s),n=aa.fromTokenEndpointResponse(e),o=t.getCapturedResponse();if(!o)throw new Vi;return{data:n,response:o}}catch(n){if(n instanceof Vi)throw n;const r=new Bi("Failed to exchange token for connection '".concat(e.connection,"'."),Ni(n)),o=t.getCapturedResponse();throw r.statusCode=null==o?void 0:o.status,r.headers=o?Yi(o.headers):void 0,r}}const u=ua(null!==a[ar]&&void 0!==i?i:_(Ei,this)),l=await b(Oi,this,as).call(this,a.serverMetadata(),u);try{const e=await Lr(l,ts,s);return aa.fromTokenEndpointResponse(e)}catch(t){const n=new Bi("Failed to exchange token for connection '".concat(e.connection,"'."),Ni(t)),r=u.getCapturedResponse();throw n.statusCode=null==r?void 0:r.status,n.headers=r?Yi(r.headers):void 0,n}}function hs(e,t,n){var r;if(n.organization&&Qi(e.claims,n.organization),n.actorToken)if(null!==e.claims&&void 0!==r&&r.act)e.act=e.claims.act;else try{e.act=function(e){if("string"!=typeof e)throw new un("JWTs must use Compact JWS serialization, JWT must be a string");const t=e.split("."),n=t[1],r=t.length;
2if(5===r)throw new un("Only JWTs using Compact JWS serialization can be decoded");if(3!==r)throw new un("Invalid JWT");if(!n)throw new un("JWTs must contain a payload");let o,i;try{mn(n)}catch(e){throw new un("Failed to base64url decode the payload")}try{JSON.parse(Zt.decode(o))}catch(e){throw new un("Failed to parse the decoded payload as JSON")}if(!An(i))throw new un("Invalid JWT Claims Set");return i}(t.access_token).act}catch(e){}return e}async function fs(e,t,n){var r;const o=(await b(Oi,this,cs).call(this,t)).configuration;if($a(e.subjectToken),void 0!==e.organization&&Zi(e.organization),void 0!==e.actorToken&&void 0===e.actorTokenType)throw new Bi("actorTokenType is required when actorToken is provided");const i=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});if(e.audience&&i.append("audience",e.audience),e.scope&&i.append("scope",e.scope),e.requestedTokenType&&i.append("requested_token_type",e.requestedTokenType),e.organization&&i.append("organization",e.organization),e.actorToken&&i.append("actor_token",e.actorToken),e.actorTokenType&&i.append("actor_token_type",e.actorTokenType),es(i,e.extra),n){var a;const t=ua(null!==o[ar]&&void 0!==a?a:_(Ei,this)),r=await b(Oi,this,as).call(this,o.serverMetadata(),t);let s,c,u;try{if(await Lr(r,ns,i),aa.fromTokenEndpointResponse(c),t.getCapturedResponse(),!u)throw new Vi}catch(n){if(n instanceof Vi)throw n;const r=new Bi("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),Ni(n)),o=t.getCapturedResponse();throw r.statusCode=null==o?void 0:o.status,r.headers=o?Yi(o.headers):void 0,r}return b(Oi,this,hs).call(this,s,c,e),{data:s,response:u}}const s=ua(null!==o[ar]&&void 0!==r?r:_(Ei,this)),c=await b(Oi,this,as).call(this,o.serverMetadata(),s);let u,l;try{await Lr(c,ns,i),aa.fromTokenEndpointResponse(l)}catch(t){const n=new Bi("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),Ni(t)),r=s.getCapturedResponse();throw n.statusCode=null==r?void 0:r.status,n.headers=r?Yi(r.headers):void 0,n}return b(Oi,this,hs).call(this,u,l,e),u}async function ps(e,t,n){var r;const o=(await b(Oi,this,cs).call(this,t)).configuration;if(n){var i;const t=ua(null!==o[ar]&&void 0!==i?i:_(Ei,this)),n=await b(Oi,this,as).call(this,o.serverMetadata(),t);try{const r=await Lr(n,"http://auth0.com/oauth/grant-type/passwordless/otp",e),o=aa.fromTokenEndpointResponse(r),i=t.getCapturedResponse();if(!i)throw new Vi;return{data:o,response:i}}catch(e){if(e instanceof Vi)throw e;const n=new _a("There was an error while trying to request a token.",Ni(e)),r=t.getCapturedResponse();throw n.statusCode=null==r?void 0:r.status,n.headers=r?Yi(r.headers):void 0,n}}const a=ua(null!==o[ar]&&void 0!==r?r:_(Ei,this)),s=await b(Oi,this,as).call(this,o.serverMetadata(),a);try{const t=await Lr(s,"http://auth0.com/oauth/grant-type/passwordless/otp",e);return aa.fromTokenEndpointResponse(t)}catch(e){const t=new _a("There was an error while trying to request a token.",Ni(e)),n=a.getCapturedResponse();throw t.statusCode=null==n?void 0:n.status,t.headers=n?Yi(n.headers):void 0,t}}async function ys(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=!!_(Ai,this).clientSecret||!!_(Ai,this).clientAssertionSigningKey||!!_(Ai,this).useMtls;return e&&!t?(e,t,n,r)=>{n.set("client_id",t.client_id)}:(_(vi,this)||O(vi,this,(async()=>{if(!_(Ai,this).clientSecret&&!_(Ai,this).clientAssertionSigningKey&&!_(Ai,this).useMtls)throw new Xi;if(_(Ai,this).useMtls)return(e,t,n,r)=>{n.set("client_id",t.client_id)};let e=_(Ai,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||await Oo(e,_(Ai,this).clientAssertionSigningAlg||"RS256"),e?function(e){return De(e,void 0)}(e):or(_(Ai,this).clientSecret)})().catch(e=>{throw O(vi,this,void 0),e})),_(vi,this))}async function gs(e){const t=(await b(Oi,this,us).call(this)).configuration,n=Ce(),r=await function(e){return async function(e){return Ie(e,"codeVerifier"),ve(await crypto.subtle.digest("SHA-256",ge(e)))}(e)}(n),o=qi(k(k({},_(Ai,this).authorizationParams),null==e?void 0:e.authorizationParams)),i=new URLSearchParams(k(k({scope:Za},o),{},{client_id:_(Ai,this).clientId,code_challenge:r,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await Rr(t,i):await _r(t,i),codeVerifier:n}}new Va(1e3,6e4);Error;new WeakMap,new WeakMap;var ws=function(){function e(){d(this,e),g(this,"readyPromise",null),g(this,"readyResolved",!1),g(this,"readyValue",!1)}return y(e,[{key:"blueConicReady",value:function(){var t=this,n=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).timeout,r=Date.now();if(this.readyResolved&&!0===this.readyValue)return s.log("BlueConicUtils | blueConicReady | returning c
2ached value:",this.readyValue),Promise.resolve(!0);if(this.readyPromise)return s.log("BlueConicUtils | blueConicReady | returning existing promise"),this.readyPromise;var o=null!=n?n:e.DEFAULT_TIMEOUT;return s.log("BlueConicUtils | blueConicReady | checking BC readiness"),this.readyPromise=new Promise(function(e){var n,i=setTimeout(function(){t.readyResolved||(s.log("BlueConicUtils | blueConicReady | timeout at:",(Date.now()-r)/1e3,"s"),t.resolveReady(!1,e))},o);if(null!==(n=window.blueConicClient)&&void 0!==n&&n.profile)return s.log("BlueConicUtils | blueConicReady | BC already ready"),void t.resolveReady(!0,e);var a=function(){var n;if(!t.readyResolved)if(null!==(n=window.blueConicClient)&&void 0!==n&&n.event){s.log("BlueConicUtils | blueConicReady | BC client detected");var o=window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},function(){clearTimeout(i),s.log("BlueConicUtils | blueConicReady | onReady fired at:",(Date.now()-r)/1e3,"s"),null==o||o(),t.resolveReady(!0,e)})}else setTimeout(a,500)};a()}),this.readyPromise}},{key:"resolveReady",value:function(e,t){this.readyResolved||(s.log("BlueConicUtils | blueConicReady | resolved with:",e),this.readyResolved=!0,this.readyValue=e,t(e),!1===e&&(this.readyPromise=null,this.readyResolved=!1))}}])}();g(ws,"DEFAULT_TIMEOUT",3e3);new ws;var ms,vs;function As(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 Es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?As(Object(n),!0).forEach(function(t){g(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):As(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}window.addEventListener("mng-all-islands-ready",function(e){ms||(ms=e,vs&&(s.log("utils | Dispatching mng-auth-complete event (islands were not ready): ",vs),window.dispatchEvent(vs)))}),s.log("Waiting for islands ready");var bs=function(){var e=window.location.href;return new URL(e)},Ss=function(e){for(var t="".concat(e,"="),n=decodeURIComponent(document.cookie).split(";"),r=0;r<n.length;r+=1){var o=n[r].trimLeft();if(0===o.indexOf(t))return o.substring(t.length,o.length)}return!1},Ts=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=bs().hostname;if(e&&"string"==typeof e&&e.length>0&&(t=e,e.includes("vipdev.lndo.site")))return"".concat(e.split(".")[0],".com");var n=t.split(".");return"".concat(n[n.length-2],".").concat(n[n.length-1])},_s=function(){return bs().host.replace(/^(?:www\.|develop\.|staging\.|preprod\.)/,"").replace("vipdev.lndo.site","com")},Rs=function(e){return function(e,t){if("string"!=typeof e)throw new m("Invalid token specified: must be a string");t||(t={});const n=!0===t.header?0:1,r=e.split(".")[n];if("string"!=typeof r)throw new m(`Invalid token specified: missing part #${n+1}`);let o;try{o=v(r)}catch(e){throw new m(`Invalid token specified: invalid base64 for part #${n+1} (${e.message})`)}try{return JSON.parse(o)}catch(e){throw new m(`Invalid token specified: invalid json for part #${n+1} (${e.message})`)}}(e)},Os=function(){var e=Ts();return["mcall.com","courant.com","sun-sentinel.com","orlandosentinel.com","growthspotter.com","dailypress.com","pilotonline.com","nydailynews.com","baltimoresun.com","capitalgazette.com","chicagotribune.com","trbdevcloud.com"].includes(e)},Is=function(){return"complete"===document.readyState},Ns=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return new Promise(function(t){var n=!0;if(Is())t();else{s.log("UIHandler: ","Waiting for the body to load...");var r=setInterval(o(i.mark(function o(){return i.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:e&&(n=Is()),document.querySelector("body")&&n&&(clearInterval(r),t(!0));case 1:case"end":return o.stop()}},o)})),200)}})},Cs=function(){return new Promise(function(e){if(("interactive"===document.readyState||Is())&&window.dataLayer)s.log("Utils digisubsDataLayerLoaded: ","Document is in interactive state, resolving."),e();else{s.log("Utils digisubsDataLayerLoaded: ","Waiting for the dataLayer to load...");var t=setInterval(o(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:window.dataLayer&&window.dataLayer.length>2&&(clearInterval(t),e(!0));case 1:case"end":return n.stop()}},n)})),50)}})},ks=function(){return new Promise(function(e){if(Is())e();else{s.log("Utils digisubsMenuLoaded: ","Waiting for the digisubs dropdown to load...");var t=setInterval(o(i.mark(function n(){return i.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:document.getElementById("account-content")&&(clearInterval(t),e(!0));case 1:case"end":return n.stop()}},n)})),200)}})},Ls=function(){var e=o(i.mark(function e(t){var n,r,o;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Cs();case 1:return s.log("Utils getDataLayerObject: looking for this dataLayer object ",t),window.dataLayer=window.dataLayer||[],n="",s.log("Utils getDataLayerObject: here is dataLayer length ",window.dataLayer.length),r=function(e){return s.log("Utils dataLayerLoop: look for this element ",e),e[t]?(s.log("Utils dataLayerLoop: found ",e[t]),n=e[t],e[t]):(s.log("Utils dataLayerLoop: dataLayer search ",!1),!1)},o=window.dataLayer.some(r),e.abrupt("return",o?n:"");case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),Ps=function(){var e=o(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=1,Ls(t);case 1:return n=e.sent,s.log("utils | pageType: page type is ",n),e.abrupt("return",n);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),xs=function(){return new Promise(function(e,t){void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.authenticationReady?(s.log("utils | Authentication already ready: ",window.MNGAuthentication.authenticationReady),e(window.MNGAuthentication.authenticationReady)):(s.log("utils | Adding authenticationReady listener..."),window.addEventListener("authenticationReady",function(n){try{var r=n.detail||{};
2s.log("utils | Event: authentication ready: ",r),e(r)}catch(e){s.log(e),t(e)}},!1))})},Ms=function(){var e=o(i.mark(function e(){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,t){return a.A.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(s.log("Entitlements already present:",window.MNGAuthentication.entitlementsReady),void e(window.MNGAuthentication.entitlementsReady)):void window.addEventListener("entitlementsReady",function(n){try{var r=n.detail||{};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=r,s.log("Received entitlementsReady event:",r),e(r)}catch(e){s.error("Error handling entitlementsReady event:",e),t(e)}},{once:!0}):(s.log("Entitlements disabled in settings."),void e(!1))}));case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Us=function(e){s.log("starting simpleEmailValidation");if(!e)return{valid:!1,message:"Please enter an email."};if(!/^(([^<>()[\]\\.,;:\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.test(e))return{valid:!1,message:"Please enter a valid email."};var t=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),n=["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","MARS
2HALLS","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--9
2KRT00A","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(t);return s.log("simpleEmailValidation: ","TLD search ".concat(n)),!1===n?{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=Us;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var Bs=function(e){vs=new CustomEvent("mng-auth-check-complete",{detail:e}),ms?(s.log("utils | Dispatching mng-auth-complete event (islands were ready): ",e),window.dispatchEvent(vs)):s.log("Islands not ready")};window.addEventListener("authenticationReady",function(e){return Bs(e.detail)});var Ds=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)};var Hs=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return new Promise(function(t,n){var r={sspw:null,sophiClient:null,engagePaywall:null,engageStatus:null},a=function(){var a=o(i.mark(function o(){var a,c,u,l,d,h,f,p,y,g,w;return i.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(o.prev=0,"1"!==(null===(a=window.sophi_config)||void 0===a?void 0:a.enableSophiSSPW)){o.next=1;break}if(!document.getElementById("server-paywall")){o.next=1;break}return r.sspw=!0,o.abrupt("return",t({paywall:!0,details:Es({},r)}));case 1:return o.next=2,Ps();case 2:return u=o.sent,o.next=3,Ls("Paywall_Level");case 3:if(l=o.sent,"article"===u&&"free"!==l){o.next=4;break}return o.abrupt("return",t({paywall:!1,details:"article"!==u?"Page type is not an article":"Free article"}));case 4:return o.next=5,Ms();case 5:if(!(d=o.sent)||!d.isEntitled){o.next=6;break}return o.abrupt("return",t({paywall:!1,details:"Entitled User"}));case 6:if("premium"!==l){o.next=7;break}return o.abrupt("return",t({paywall:!0,details:"Premium article"}));case 7:if(h=null===(c=window.ConnextUtils)||void 0===c?void 0:c.runningSophi,s.log("checkPaywallStatus - Sophi is running: ",h),!h){o.next=8;break}window.ConnextUtils.connextAlreadyRan&&window.sophiWallConfig&&!window.sophiWallConfig.error&&"paywall"===window.sophiWallConfig.wallType?(r.sophiClient=!0,r.engageStatus=!0,r.engagePaywall=!0):window.addEventListener("onPaywallShown",function(){return"paywall"===window.sophiWallConfig.wallType&&(r.sophiClient=!0),t({paywall:!0,details:Es({},r)})},{once:!0}),o.next=12;break;case 8:if(h){o.next=12;break}return f=window.ConnextUtils.connextReady("onPaywallShown"),p=new Promise(function(t,n){return setTimeout(function(){return n(new Error("No Engage paywall within 10 seconds, resolving as no paywall."))},e)}),o.prev=9,o.next=10,Promise.race([f,p]);case 10:!0===(y=o.sent)?(r.engagePaywall=!0,r.engageStatus="Engage paywall detected"):(r.engagePaywall=!1,r.engageStatus="Engage response: ".concat(y)),o.next=12;break;case 11:o.prev=11,g=o.catch(9),r.engagePaywall=!1,r.engageStatus="Engage response: ".concat(g);case 12:return o.abrupt("return",t({paywall:Object.values(r).some(function(e){return e}),details:Es({},r)}));case 13:o.prev=13,w=o.catch(0),n(w);case 14:case"end":return o.stop()}},o,null,[[0,13],[9,11]])}));return function(){return a.apply(this,arguments)}}();a()})};"undefined"!=typeof window&&(window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.checkPaywallStatus=Hs);var Gs=function(e){try{window.dataLayer.push({event:e}),s.log("ANALYTICS: ".concat(e," event")),s.log("ANALYTICS: GA/ datalayer ",window.dataLayer)}catch(t){s.log("ANALYTICS: Failed to send ".concat(e," event: "),t)}};var Ws="#main .article-share ul",Ks=".dropdown-menu .account-settings",Fs=".nav-wrapper-secondary .article-share ul",js=function(){return document.querySelectorAll(Ws)},Xs=function(){return document.querySelector(Ks)},Js=function(){return document.querySelector(Fs)},Vs=n(8287).hp,Ys=function(e){return Vs.from(e,"base64").toString("utf8")},zs=function(){var e=window.localStorage.getItem(l),t=e&&Ys(e)&&JSON.parse(Ys(e),function(e,t){return e?function(e){try{var t=parseInt(e,10);return Number.isNaN(t)?e:t}catch(t){return e}}(JSON.parse(Ys(t))):t});return s.log("Got encoded object hash with a value of ".concat(JSON.stringify(t))),t},qs=function(e){var t=zs();return t&&t[e]},Zs=function(e,t){var n=zs()||{};n[e]=t,function(e){var t={};Object.keys(e).forEach(function(n){t[n]=Vs.from(JSON.stringify(e[n])).toString("base64")});var n=Vs.from(JSON.stringify(t)).toString("base64");window.localStorage.setItem("user-profile",n),s.log("Set encoded object hash for ".concat(e))}(n)};var Qs=function(e,t){var n=e,r=document.getElementById("article-share-copy-link-text".concat(t));"Link Copied"!==e&&"Link Updated"!==e&&(document.getElementById("article-share-copy-btn".concat(t)).disabled=!0);s.log("article sharing: user message inside share button: ",e,t),document.getElementById("articleCopyLinkSpinner".concat(t)).setAttribute("style","display:none"),document.getElementById("article-share-copy-btn".concat(t)).classList.remove("spinner-pad"),document.getElementById("articleCopyLinkSpinner".concat(t)).classList.remove("spring-spinner-mar"),document.getElementById("article-share-copy-link-text".concat(t)).setAttribute("style","display:flex;","align-items:center"),r.innerHTML="Link Copied"===e||"Link Updated"===e?'<svg width="18" height="18" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg" style="margin-right: 8px">\n\t<path d="M8.61162 13.1453L18.5625 2.72401L21.3087 5.6L8.25 19.276L0.691332 11.36L3.4375 8.48401L7.88838 13.1453L8.25 13.524L8.61162 13.1453Z" fill="#4FF21F" stroke="black"></path>\n\t</svg> '.concat(n):e},$s=function(){var e=o(i.mark(function e(){var t,n,r,o;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,xs();case 1:if(t=e.sent,!(n=t.idToken)){e.next=2;break}return r=Rs(n),o={uuid:r.sub},s.log("Article sharing: get user UUID",o.uuid),e.abrupt("return",o);case 2:return e.abrupt("return",!1);case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),ec=function(e){return s.log("Article sharing: updating article count everywhere with ",e),document.querySelectorAll(".article-share-count").forEach(function(t){s.log("article sharing: updated article count! ",t),t.innerHTML=e}),s.log("Article sharing: update finished, return true"),!0},tc=function(){s.log("Article sharing: User is being spoofed, retrieving uuid to check remaining articles");var e=JSON.parse(localStorage.getItem(c)).entitlementToken;s.log("Article sharing: spoofed jwtToken: ",e);var t=e?Rs(e):"";return s.log("Article sharing: UUID: ",t.uuid),t},nc=function(e){return new Promise(function(t){var n=a.A.entitlementsEndpoint,r=a.A.entitlementsApiKey,c="".concat(n,"articleSharing/checkRemaining");s.log("Article sharing: api data: ",r);var l=e.uuid;(s.log("Article sharing: callCheckRemainingEndpoint: check if user is spoofed"),window.localStorage.getItem("spoof-user"))&&(l=tc().uuid);var d,h,f={uid:l,entitlementsToken:Ss("mng-entitlements")};s.log("Article sharing: articles remaining api body: ",f),$.ajax({type:"POST",url:c,headers:{"X-Api-Key":a.A.entitlementsApiKey},data:JSON.stringify(f),success:(h=o(i.mark(function e(n){var r;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.log("Article sharing: checkRemaining response: successful: ",n.remaining),r="10",r="This user does not exists in the database. Return 10 for sharesRemaining."===n.remaining?"10":n.remaining,Zs(u,r),t(r);case 1:case"end":return e.stop()}},e)})),function(e){return h.apply(this,arguments)}),error:(d=o(i.mark(function e(n,r,o){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s.log("Article sharing: checkRemaining Failure: ",o),t(!1);case 1:case"end":return e.stop()}},e)})),function(e,t,n){return d.apply(this,arguments)})})})},rc=function(){var e=o(i.mark(function e(t){var n,r,o,a,s=arguments;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=s.length>1&&void 0!==s[1]&&s[1],r=qs(u),n||!r){e.next=1;break}return e.abrupt("return",r);case 1:return e.next=2,$s(t);case 2:return o=e.sent,e.next=3,nc(o);case 3:return a=e.sent,e.abrupt("return",a);case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),oc=function(){var e=o(i.mark(function e(t){var n,r,o,c,l,d,h,f,p,y,g,w,m,v;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(d=function(e){for(var t="",n=c.replace(/[^0-9a-zA-Z]+/gm,""),r=n.length,o=0;o<e;o+=1)t+=n.charAt(Math.floor(Math.random()*r));return t},s.log("Article sharing: generate copy link"),Gs("articleshare-createlink"),s.log("Article sharing: event details ",t),document.getElementById("articleCopyLinkSpinner".concat(t)).setAttribute("style","display:flex"),document.getElementById("articleCopyLinkSpinner".concat(t)).classList.add("spring-spinner-mar"),document.getElementById("article-share-copy-btn".concat(t)).classList.add("spinner-pad"),document.getElementById("article-share-copy-link-text".concat(t)).setAttribute("style","display:none;"),r="",s.log("Article sharing: generateArticleShareLink: check if user is spoofed"),!window.localStorage.getItem("spoof-user")){e.next=1;break}r=tc(),e.next=3;break;case 1:return e.next=2,$s(t);case 2:r=e.sent;case 3:return e.next=4,Ls("Content ID");case 4:return o=e.sent,e.next=5,Ls("URL");case 5:return c=e.sent,l=_s(),s.log("Article sharing: get article ID",o),s.log("Article sharing: publication: ",l),h=d(20),s.log("Article sharing: unique share code: ",h),f=a.A.entitlementsEndpoint,p=a.A.entitlementsApiKey,y="".concat(f,"articleSharing/checkArticleSharedLink"),g={uid:r.uuid,articleName:o,publication:l,code:h,entitlementsToken:Ss("mng-entitlements")},e.prev=6,e.next=7,$.ajax({type:"POST",url:y,headers:{"X-Api-Key":p},data:JSON.stringify(g)});case 7:return"Link Updated"!==(n=e.sent).status&&"number"==typeof(w=qs(u))&&(Zs(u,m=w-1),ec(m)),e.abrupt("return",n);case 8:return e.prev=8,v=e.catch(6),Qs("Network error, try again",t),s.log("Article sharing: generateArticleShareLink endpoint Failure: ",v),e.abrupt("return",new Error("Article sharing: check article endpoint failure"));case 9:case"end":return e.stop()}},e,null,[[6,8]])}));return function(t){return e.apply(this,arguments)}}(),ic=function(e){try{return new URL(e),!0}catch(e){return!1}},ac=function(){var e=o(i.mark(function e(){var t,n,r,o,a,c,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,rc(null,!0);case 1:return t=e.sent,s.log("Article sharing: start nav menu adds, remaining shares is ".concat(t)),e.next=2,ks();case 2:return n=e.sent,s.log("Article sharing: init: digisubs dropdown ready: ",n),r=Xs(),s.log("Article sharing: dropdown foun
2d",r),e.next=3,Ps();case 3:o=e.sent,s.log("Article sharing: pagetype for nav menus is ",o),s.log(),""!==(a=ic(window.article_config.article_sharing_faq)?window.article_config.article_sharing_faq:"")&&(c='<a id="article-share-help" target="_blank" href="'.concat(a,'">?</a>'),null==(u=document.querySelectorAll(".article-share-h6"))||u.forEach(function(e){e.insertAdjacentHTML("beforeend",c)}));case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),sc=function(e){var t,n=document.getElementById("share-icon-position".concat(e));"rgba(0, 0, 0, 0)"===window.getComputedStyle(document.querySelector("li.share-article")).backgroundColor?(n.classList.add("article-share-icon-invert"),t=window.getComputedStyle(document.getElementById("page")).getPropertyValue("--primary")):t="white";var r='<svg xmlns="http://www.w3.org/2000/svg" width="22" height="22" viewBox="0 0 22 22" fill="none">\n\t\t<path fill-rule="evenodd" clip-rule="evenodd" d="M15.4835 2.11615V0L21 3L19.8462 3.6289L18.1538 4.54674L15.4835 6V3.76487C15.2527 3.73938 15.011 3.73088 14.7692 3.73088C12.7253 3.73088 10.9451 4.50425 10 5.66856C10.2418 3.67989 12.6044 2.11615 15.4835 2.11615ZM14.5446 9.28271H16.2577H16.2691C16.6802 9.28271 17 9.61414 17 10.0141V13.6484C17 14.0599 16.6688 14.3799 16.2691 14.3799H15.5382V20.9284C15.5382 21.3399 15.207 21.6599 14.8073 21.6599H3.19272C2.78158 21.6599 2.46181 21.3284 2.46181 20.9284V14.3799H1.73091C1.31977 14.3799 1 14.0484 1 13.6484V10.0141C1 9.60271 1.33119 9.28271 1.73091 9.28271H3.44397C3.28408 8.95128 3.19272 8.57414 3.19272 8.19699C3.19272 7.52271 3.46681 6.88271 3.93505 6.40271C4.40328 5.92271 5.05425 5.65985 5.72805 5.65985C7.39543 5.65985 8.41185 6.87128 8.94861 7.85414C8.97145 7.88842 8.98287 7.91128 8.99429 7.94557C9 7.92842 9.00856 7.91414 9.01713 7.89985C9.0257 7.88557 9.03426 7.87128 9.03997 7.85414C9.57673 6.87128 10.5817 5.65985 12.2605 5.65985C12.9343 5.65985 13.5739 5.92271 14.0535 6.40271C14.5332 6.87128 14.7959 7.52271 14.7959 8.19699C14.7959 8.57414 14.7045 8.93985 14.5446 9.28271ZM12.2605 7.09985C11.3926 7.09985 10.7645 7.70556 10.3076 8.53985V8.52842C10.1706 8.77985 10.0564 9.04271 9.96502 9.27128H12.2605C12.5575 9.27128 12.8315 9.14557 13.0371 8.95128C13.2427 8.75699 13.3569 8.47128 13.3569 8.18556C13.3569 7.89985 13.2427 7.62557 13.0371 7.41985C12.8315 7.21414 12.546 7.09985 12.2605 7.09985ZM4.63169 8.19699C4.63169 8.48271 4.7459 8.75699 4.95146 8.96271V8.97414C5.14561 9.17985 5.43112 9.29414 5.71663 9.29414H8.01213C7.92077 9.05414 7.80657 8.80271 7.66952 8.55128C7.2127 7.71699 6.58458 7.11128 5.71663 7.11128C5.43112 7.11128 5.15703 7.22557 4.95146 7.43128C4.7459 7.62557 4.63169 7.91128 4.63169 8.19699ZM8.26338 10.7341H2.45039V12.917H8.26338V10.7341ZM8.26338 14.3684H3.91221V20.1856H8.26338V14.3684ZM9.71378 20.1856H14.0764V14.3684H9.71378V20.1856ZM9.7252 12.917H15.5268H15.5382V10.7341H9.7252V12.917Z" fill="'.concat(t,'"/>\n\t\t</svg>'),o=window.btoa(r),i="url(data:image/svg+xml;base64,".concat(o,")");return n.style.background=i,"url(data:image/svg+xml;base64,".concat(o,")")},cc=function(e){e.classList.contains("article-share-fixed")&&e.classList.remove("article-share-fixed")},uc=function(){var e=o(i.mark(function e(n){var r,a,c,u,l,d,h,f,p;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.log("Article sharing: build menu here"),e.next=1,Ns();case 1:if(s.log(" Article Sharing: Build sharing menuz!"),r="",a=function(){var e=o(i.mark(function e(t){var o,a,c,u,l;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Gs("articleshare-openui"),o=document.getElementById("share-box-position".concat(t)),s.log("Article Sharing: i clicked this ",o,t),a=document.getElementById(o.id),s.log("article sharing: look for this box: ",o),o.classList.contains("show-article-sharing")||(s.log("article sharing: box already open, do not show spinner"),document.getElementById("articleShareBtnSpinner".concat(t)).setAttribute("style","display:block"),document.getElementById("share-icon-position".concat(t)).setAttribute("style","display:none!important;")),c=!1,n&&!o.classList.contains("show-article-sharing")){e.next=1;break}c=!0,e.next=4;break;case 1:return e.prev=1,e.next=2,rc(t,!1);case 2:c=e.sent,ec(c),e.next=4;break;case 3:e.prev=3,e.catch(1),s.log("Article share article count api error");case 4:s.log("article sharing: api request done, show results ",c),document.getElementById("share-icon-position".concat(t)).setAttribute("style","background:".concat(r,"; display:block!important;")),document.getElementById("articleShareBtnSpinner".concat(t)).setAttribute("style","display:none"),o.classList.toggle("show-article-sharing"),a.classList.toggle("show"),0!==t&&(Ds(o)||o.classList.add("article-share-fixed")),u=document.querySelector("#article-share-position".concat(t," .article-share-link")),s.log("article sharing: accessible ",u),l=a.classList.contains("show"),s.log("article sharing: box isOpen ",l),l||(a.setAttribute("aria-expanded","fal
2se"),u.setAttribute("aria-press","false")),l&&(a.setAttribute("aria-expanded","true"),u.setAttribute("aria-press","true")),c<=0&&(s.log("article share: user out of free views ",c),Qs("No more shares left",t));case 5:case"end":return e.stop()}},e,null,[[1,3]])}));return function(t){return e.apply(this,arguments)}}(),c='\n\t<svg id="copy-icon-svg" width="18" height="18" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t<path d="M14.7895 2H4.68421C3.75789 2 3 2.73636 3 3.63636V15.0909H4.68421V3.63636H14.7895V2ZM17.3158 5.27273H8.05263C7.12632 5.27273 6.36842 6.00909 6.36842 6.90909V18.3636C6.36842 19.2636 7.12632 20 8.05263 20H17.3158C18.2421 20 19 19.2636 19 18.3636V6.90909C19 6.00909 18.2421 5.27273 17.3158 5.27273ZM17.3158 18.3636H8.05263V6.90909H17.3158V18.3636Z" fill="#ffffff"/>\n\t</svg>\n\tCopy The Shareable Link',u=function(e){var t=document.getElementById("share-box-position".concat(e)),r=document.getElementById("cancel-button-label".concat(e));if(r&&(r.childNodes[0].nodeValue="Cancel"),t&&t.classList.contains("show-article-sharing")){var o=document.getElementById("article-share-copy-link-text".concat(e));n&&o&&(o.innerHTML=c),a(e,"close"),0===e&&cc(t)}},l=function(e,t){t&&t.addEventListener("click",function(){u(e)})},window.addEventListener("click",function(e){var t=e.target,r=t.closest(".article-share-link");if(n){var o=t.closest("#share-box-position0");null===(o&&o.classList.contains("show-article-sharing"))&&null===r&&u(0)}var i=t.closest("#share-box-position1");null===(i&&i.classList.contains("show-article-sharing"))&&null===r&&u(1);var a=t.closest("#share-box-position2");null===(a&&a.classList.contains("show-article-sharing"))&&null===r&&u(2)}),d=function(){var e=o(i.mark(function e(t){var o;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Ls("Page Title");case 1:o=e.sent,t.map(function(e,t){s.log("Article sharing: create button for this: ",e,t);var i=document.createElement("li");i.className="share-article",i.id="article-share-position".concat(t),i.setAttribute("tabindex","0");var u=document.createElement("button");u.className="article-share-link",u.setAttribute("aria-pressed","false"),u.setAttribute("aria-controls","share-box-position".concat(t)),u.setAttribute("aria-label","Article Sharing Button"),u.setAttribute("tabindex","0"),i.append(u);var d=document.createElement("span");d.style.display="none",d.classList.add("spring-spinner"),d.id="articleShareBtnSpinner".concat(t),d.innerHTML='\n\t\t\t<div class="spring-spinner-part top">\n\t\t\t<div class="spring-spinner-rotator"></div>\n\t\t\t</div>\n\t\t\t<div class="spring-spinner-part bottom">\n\t\t\t<div class="spring-spinner-rotator"></div>\n\t\t\t</div>';var h=document.querySelector("li.share-facebook"),f=window.getComputedStyle(h),p=document.createElement("span");s.log("article sharing: share icon color: ",f.backgroundColor),"rgba(0, 0, 0, 0)"===f.backgroundColor&&d.classList.add("spring-spinner-invert"),u.append(d),p.id="share-icon-position".concat(t),p.className="article-share-icon";var y=document.createElement("span");y.className="sharing-screen-reader-text",y.innerHTML="Click to share a free article with a friend",i.append(y),e.appendChild(i),u.append(p),r=sc(t);var g=document.createElement("div");g.id="share-box-position".concat(t),g.className="article-share-box share-box-position".concat(t);var w,m="GIFT THIS ARTICLE",v='You have <span class="article-share-count">'.concat("10","</span> gift articles remaining this month");w=o,s.log(w),s.log("article sharing article title: ",w);var A=document.location.host;if(!1===n){g.classList.add("no-share");var E=A.replace("www.","").replace("develop.","").replace("preprod.",""),b=Os()?"https://subscription.".concat(E):"https://checkout.".concat(E);v='Subscibers get <span class="article-share-count">'.concat("10","</span> gift articles each month"),g.innerHTML='\n\t\t\t\t\t<div id=\'no-sub-article-share-container\'>\n\t\t\t\t\t<div id=\'title-and-info-container\'>\n\t\t\t\t\t<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" id=\'article-share-close'.concat(t,'\' class="article-share-close">\n\t\t\t\t\t<circle class="close-circle" cx="20" cy="20" r="17.5" fill="#9d9a98" stroke="#00000026"/>\n\t\t\t\t\t<path d="M16.5355 16.4645L20.0711 20M20.0711 20L23.6066 23.5355M20.0711 20L23.6066 16.4645M20.0711 20L16.5355 23.5355" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t<h6 id=\'no-sub-title-text\'>').concat(m,"</h6>\n\t\t\t\t\t<h6 id='article-share-copy-title'>What is article sharing?</h6>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id='benefits-text-container'>\n\t\t\t\t\t<p>Subscribers are entitled to 10 gift sharing articles each month. These can be shared with friends and family who are not subscribers.</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span id='article-share-line'></span>\n\t\t\t\t\t<div id='subscribe-or-login-container'>\n\t\t\t\t\t<p id='article-share-subscribe-link'> <a href=\"").concat(b,'" target="_blank" style="text-decoration: underline">Subscribe</a> now! or <a href="https://').concat(A,'/login" style="text-decoration: underline">Sign in</a> to your account.</p>\n\t\t\t\t\t<button style="display:none" disabled aria-disabled="true" id=\'article-share-copy-btn').concat(t,'\' class="article-share-copy-btn" >Share Button Disabled</button>\n\t\t\t\t\t<div class="article-login-buttons-container">\n\t\t\t\t\t<a href="').concat(b,'" target="_blank" class="article-user-button">Subscribe</a>\n\t\t\t\t\t<a href="https://').concat(A,'/login" class="article-user-button">Log in</a>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div id=\'cancel-button-container\'>\n\t\t\t\t\t<button class="cancel-button" id="cancel-button').concat(t,'">\n\t\t\t\t\t<span id="cancel-button-label').concat(t,'">Cancel<span>\n\t\t\t\t\t<svg style="vertical-align: bottom;" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n\t\t\t\t\t<path d="M6.75736 6.75736L11 11M11 11L15.2426 15.2426M11 11L15.2426 6.75736M11 11L6.75736 15.2426" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t\t</svg>\n\t\t\t\t\t</button>\n\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t')}else g.innerHTML='\n\t\t\t\t<div id=\'article-share-modal-container\'>\n\t\t\t\t<div id=\'article-share-title-container\'>\n\t\t\t\t<svg tabindex="0" width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg" id=\'article-share-close'.concat(t,'\' class="article-share-close">\n\t\t\t\t<circle class="close-circle" cx="20" cy="20" r="17.5" fill="#9d9a98" stroke="#00000026"/>\n\t\t\t\t<path d="M16.5355 16.4645L20.0711 20M20.0711 20L23.6066 23.5355M20.0711 20L23.6066 16.4645M20.0711 20L16.5355 23.5355" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t</svg>\n\t\t\t\t<div id=\'article-share-title\' style=\'padding-bottom:8px\'>').concat(m,"</div>\n\t\t\t\t<div id='article-share-remaining-text'>").concat(v,"</div>\n\t\t\t\t</div>\n\t\t\t\t<div id='article-share-article-title-container'>\n\t\t\t\t<h3 id='article-share-article-title'>").concat(w,"</h3>\n\t\t\t\t</div>\n\t\t\t\t<span id='article-share-line'></span>\n\t\t\t\t<div id='article-share-link-and-button-container'>\n\t\t\t\t<div id='article-share-link-container'>\n\t\t\t\t<h6 id='article-share-copy-title'>Copy the link</h6>\n\t\t\t\t<div id='copy-button-container'>\n\t\t\t\t<button id='article-share-copy-btn").concat(t,"' class=\"article-share-copy-btn\">\n\t\t\t\t<div id='copy-button-and-icon-container'>\n\t\t\t\t<p id='article-share-copy-link-text").concat(t,"'>\n\t\t\t\t").concat(c,"\n\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t\t<div id='articleCopyLinkSpinner").concat(t,"' style='display:none;' class='spring-spinner articleCopyLinkSpinner copy-link-spinner-revert'>\n\t\t\t\t<div class='spring-spinner-part top spinner-top").concat(t," spring-spinner-pad'>\n\t\t\t\t<div class='spring-spinner-rotator spring-spinner-invert'></div>\n\t\t\t\t</div>\n\t\t\t\t<div class='spring-spinner-part bottom spinner-bottom").concat(t," spring-spinner-pad'>\n\t\t\t\t<div class='spring-spinner-rotator spring-spinner-invert'></div>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div id='cancel-button-container'>\n\t\t\t\t<button class=\"cancel-button\" id=\"cancel-button").concat(t,'">\n\t\t\t\t<span id="cancel-button-label').concat(t,'">Cancel<span>\n\t\t\t\t<svg style="vertical-align: bottom;" xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">\n\t\t\t\t<path d="M6.75736 6.75736L11 11M11 11L15.2426 15.2426M11 11L15.2426 6.75736M11 11L6.75736 15.2426" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>\n\t\t\t\t</svg>\n\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t');e.appendChild(g);var S=document.getElementById("article-share-position".concat(t));S.addEventListener("click",function(){a(t,"open")}),S.addEventListener("keydown",function(e){"q"===e.key&&a(t,"open")});var T=document.getElementById("article-share-close".concat(t));l(t,T);var _=document.getElementById("cancel-button".concat(t));return l(t,_),document.getElementById("article-share-copy-btn".concat(t)).addEventListener("click",function(){lc(t)}),"done"});case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),h=[Js()].concat(t(js())),s.log("article sharing: target elements are ",h),h.filter(function(e){return null!==e}).length!==h.length){e.next=2;break}return e.next=2,d(h);case 2:if(s.log("Article Sharing: appending sticky nav too"),!n){e.next=4;break}return e.next=3,ac();case 3:(f=document.querySelectorAll("#article-share-dropdown-article-page"))&&f.forEach(function(e){e.addEventListener("click",function(){a(0,"open")})}),(p=document.querySelector(".border-container #push-account-content #article-share-dropdown-article-page"))&&p.addEventListener("click",function(){document.getElementById("digisubs-toggle").
2click()});case 4:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),lc=function(){var e=o(i.mark(function e(t){var n,r,o,a,c,u;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,oc(t);case 1:return n=e.sent,e.next=2,Ls("URL");case 2:if(r=e.sent,s.log("Article sharing: check article endpoint response: successful: ",n),n.sharedCode&&"null"!==n.sharedCode&&void 0!==n.sharedCode){e.next=3;break}Qs("Network error, try again",t),e.next=11;break;case 3:if("Link Updated"===n.status?Qs("Link Updated",t):Qs("Link Copied",t),o="".concat(r,"?share=").concat(n.sharedCode),!document.hasFocus()){e.next=8;break}return e.prev=4,e.next=5,navigator.clipboard.writeText(o);case 5:s.log("Article sharing: Link Copied"),"Link Updated"===n.status?Qs("Link Updated",t):Qs("Link Copied",t),e.next=7;break;case 6:e.prev=6,u=e.catch(4),s.error("Clipboard write failed:",u),Qs("Copy failed. Try again.",t);case 7:e.next=9;break;case 8:s.warn("Clipboard copy blocked: document not focused"),Qs("Copy failed. Try again.",t);case 9:if((a=document.getElementById("cancel-button-label".concat(t)))&&(a.childNodes[0].nodeValue="Close"),"Link Updated"===n.status){e.next=11;break}return e.next=10,rc(t);case 10:c=e.sent,ec(c);case 11:case"end":return e.stop()}},e,null,[[4,6]])}));return function(t){return e.apply(this,arguments)}}(),dc=function(){var e=o(i.mark(function e(){var t,n,r,c,u,l,d,h,f;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.articleShareConvo=!1,window.MNGAuthentication.articleShare="",s.log("article sharing: code check: checking free article code"),t=window.location.search,n=new URLSearchParams(t),e.next=1,Ls("Content ID");case 1:if(r=e.sent,c=_s(),s.log("article sharing: code check: url params array ",n.getAll("share")),0!==n.getAll("share").length){e.next=2;break}return s.log("No share search param"),e.abrupt("return",!1);case 2:return window.MNGAuthentication.articleShareConvo=!0,u=n.getAll("share"),Gs("articleshare-readingshare"),s.log("Article sharing: code check: check share code: ",u),l=a.A.entitlementsEndpoint,d=a.A.entitlementsApiKey,h="".concat(l,"articleSharing/checkArticleSharedLink"),f={articleName:r,publication:c,code:u[0]},e.abrupt("return",$.ajax({type:"POST",url:h,headers:{"X-Api-Key":d},data:JSON.stringify(f),success:function(e){if(s.log("Article sharing: code check: looking for valid share code: ",e),"nocodefound"===e)s.log("Article sharing: code check: code does not exist"),Gs("articleshare-readshare-codenotfound"),window.MNGAuthentication.articleShare="codenotfound";else{s.log("Article sharing: code check: time api timestamp response: ",e.sharedTimestamp);var t=new Date(e.sharedTimestamp),n=(t=t.setDate(t.getDate()+30))/1e3;s.log("Article sharing: code check: time api timestamp response expiration date ",n);var r=new Date;r=Math.floor(r.getTime()/1e3),s.log("Article sharing: code check: current unix time is, ",r),n<r?(s.log("Article sharing: code check: code expired"),Gs("articleshare-readshare-expired"),window.MNGAuthentication.articleShare="expired"):e.sharedCode&&"null"!==e.sharedCode&&void 0!==e.sharedCode?(s.log("Article sharing: code check: code valid, not expired"),Gs("articleshare-readshare-verified"),window.MNGAuthentication.articleShare="sharing",window.ConnextUtils.rerunConnextEntitlements()):(s.log("Article sharing: code check: network error"),window.MNGAuthentication.articleShare="networkerror")}},error:function(){var e=o(i.mark(function e(t,n,r){return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s.log("Article sharing: code check: network error: ",r),window.MNGAuthentication.articleShare="networkerror",e.abrupt("return",new Error("Article sharing: check article code failed"));case 1:case"end":return e.stop()}},e)}));return function(t,n,r){return e.apply(this,arguments)}}()}));case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),hc=function(){var e=o(i.mark(function e(){var n,r,o,a;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return document.addEventListener("scroll",function(){var e=t(document.querySelectorAll(".share-box-position1, .share-box-position2"));e.length>0&&e.forEach(function(e){if(e&&e.classList.contains("show-article-sharing")){var t=window.scrollY,n=document.getElementById("sharing-bottom"),r=document.getElementById("sharing-top");if(n&&e.classList.contains("share-box-position2"))t/n.offsetTop*100>=93?cc(e):e.classList.contains("article-share-fixed")||e.classList.add("article-share-fixed");
2if(r&&e.classList.contains("share-box-position1"))window.scrollY/(document.documentElement.scrollHeight-window.innerHeight)*100>=11.5?cc(e):e.classList.contains("article-share-fixed")||e.classList.add("article-share-fixed")}})}),e.next=1,xs();case 1:return n=e.sent,r=n.isAuthenticated,e.next=2,Ms();case 2:if(o=e.sent,!0!==r||void 0===window.MNGAuthentication||"function"!=typeof window.MNGAuthentication.isUserSubscriber||!o.isEntitled){e.next=7;break}return s.log("article sharing: subscriber, show sharing tool"),e.next=3,Ps();case 3:if(a=e.sent,s.log("article sharing: page type is ",a),"article"!==a){e.next=5;break}return e.next=4,uc(!0);case 4:e.next=6;break;case 5:return e.next=6,ac();case 6:e.next=9;break;case 7:return s.log("article sharing: not a logged in or a subscriber, show marketing message and check for share code"),e.next=8,dc();case 8:return e.next=9,uc(!1);case 9:window.addEventListener("updateArticlesRemainingUI",function(e){ec(e.detail)});case 10:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();hc()})()})(); 3//# sourceMappingURL=mng-digisubs.articleShare.bundle.js.map; 4/*! For license information please see mng-digisubs.articleSave.bundle.js.LICENSE.txt */ 5(()=>{var e={893(e,t,o){"use strict";function n(e,t){this.v=e,this.k=t}function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=Array(t);o<t;o++)n[o]=e[o];return n}function i(e,t,o){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:o;throw new TypeError("Private element is not present on this object")}function a(e){return new n(e,0)}function s(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function c(e,t){return e.get(i(e,t))}function l(e,t,o){s(e,t),t.set(e,o)}function d(e,t,o){return e.set(i(e,t),o),o}function u(e,t){s(e,t),t.add(e)}function p(e,t,o){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function m(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function h(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?m(Object(o),!0).forEach(function(t){p(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):m(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function f(e,t){if(null==e)return{};var o,n,r=function(e,t){if(null==e)return{};var o={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;o[n]=e[n]}return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)o=i[n],-1===t.indexOf(o)&&{}.propertyIsEnumerable.call(e,o)&&(r[o]=e[o])}return r}function g(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var o=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=o){var n,r,i,a,s=[],c=!0,l=!1;try{if(i=(o=o.call(e)).next,0===t){if(Object(o)!==o)return;c=!1}else for(;!(c=(n=i.call(o)).done)&&(s.push(n.value),s.length!==t);c=!0);}catch(e){l=!0,r=e}finally{try{if(!c&&null!=o.return&&(a=o.return(),Object(a)!==a))return}finally{if(l)throw r}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return r(e,t);var o={}.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?r(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e){return function(){return new v(e.apply(this,arguments))}}function v(e){var t,o;function r(t,o){try{var a=e[t](o),s=a.value,c=s instanceof n;
5Promise.resolve(c?s.v:s).then(function(o){if(c){var n="return"===t&&s.k?t:"next";if(!s.k||o.done)return r(n,o);o=e[n](o).value}i(!!a.done,o)},function(e){r("throw",e)})}catch(e){i(2,e)}}function i(e,n){2===e?t.reject(n):t.resolve({value:n,done:e}),(t=t.next)?r(t.key,t.arg):o=null}this._invoke=function(e,n){return new Promise(function(i,a){var s={key:e,arg:n,resolve:i,reject:a,next:null};o?o=o.next=s:(t=o=s,r(e,n))})},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof SuppressedError&&SuppressedError,v.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},v.prototype.next=function(e){return this._invoke("next",e)},v.prototype.throw=function(e){return this._invoke("throw",e)},v.prototype.return=function(e){return this._invoke("return",e)};Error;var A="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==o.g?o.g:"undefined"!=typeof self?self:{},w={},S={};Object.defineProperty(S,"__esModule",{value:!0});var b=function(){function e(){var e=this;this.locked=new Map,this.addToLocked=function(t,o){var n=e.locked.get(t);void 0===n?void 0===o?e.locked.set(t,[]):e.locked.set(t,[o]):void 0!==o&&(n.unshift(o),e.locked.set(t,n))},this.isLocked=function(t){return e.locked.has(t)},this.lock=function(t){return new Promise(function(o,n){e.isLocked(t)?e.addToLocked(t,o):(e.addToLocked(t),o())})},this.unlock=function(t){var o=e.locked.get(t);if(void 0!==o&&0!==o.length){var n=o.pop();e.locked.set(t,o),void 0!==n&&setTimeout(n,0)}else e.locked.delete(t)}}return e.getInstance=function(){return void 0===e.instance&&(e.instance=new e),e.instance},e}();S.default=function(){return b.getInstance()};var E=A&&A.__awaiter||function(e,t,o,n){return new(o||(o=Promise))(function(r,i){function a(e){try{c(n.next(e))}catch(e){i(e)}}function s(e){try{c(n.throw(e))}catch(e){i(e)}}function c(e){e.done?r(e.value):new o(function(t){t(e.value)}).then(a,s)}c((n=n.apply(e,t||[])).next())})},_=A&&A.__generator||function(e,t){var o,n,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(o)throw new TypeError("Generator is already executing.");for(;a;)try{if(o=1,n&&(r=2&i[0]?n.return:i[0]?n.throw||((r=n.return)&&r.call(n),0):n.next)&&!(r=r.call(n,i[1])).done)return r;switch(n=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&i[1]<r[3])){a.label=i[1];break}if(6===i[0]&&a.label<r[1]){a.label=r[1],r=i;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],n=0}finally{o=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},T=A;Object.defineProperty(w,"__esModule",{value:!0});var R=S,C="browser-tabs-lock-key",N={key:function(e){return E(T,void 0,void 0,function(){return _(this,function(e){throw new Error("Unsupported")})})},getItem:function(e){return E(T,void 0,void 0,function(){return _(this,function(e){throw new Error("Unsupported")})})},clear:function(){return E(T,void 0,void 0,function(){return _(this,function(e){return[2,window.localStorage.clear()]})})},removeItem:function(e){return E(T,void 0,void 0,function(){return _(this,function(e){throw new Error("Unsupported")})})},setItem:function(e,t){return E(T,void 0,void 0,function(){return _(this,function(e){throw new Error("Unsupported")})})},keySync:function(e){return window.localStorage.key(e)},getItemSync:function(e){return window.localStorage.getItem(e)},clearSync:function(){return window.localStorage.clear()},removeItemSync:function(e){return window.localStorage.removeItem(e)},setItemSync:function(e,t){return window.localStorage.setItem(e,t)}};function O(e){return new Promise(function(t){return setTimeout(t,e)})}function I(e){for(var t="",o=0;o<e;o++)t+="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz"[Math.floor(61*Math.random())];return t}var P=function(){function e(t){this.acquiredIatSet=new Set,this.storageHandler=void 0,this.id=Date.now().toString()+I(15),this.acquireLock=this.acquireLock.bind(this),this.releaseLock=this.releaseLock.bind(this),this.releaseLock__private__=this.releaseLock__private__.bind(this),this.waitForSomethingToChange=this.waitForSomethingToChange.bind(this),this.refreshLockWhileAcquired=this.refreshLockWhileAcquired.bind(this),this.storageHandler=t,void 0===e.waiters&&(e.waiters=[])}return e.prototype.acquireLock=function(t,o){return void 0===o&&(o=5e3),E(this,void 0,void 0,function(){var n,r,i,a,s,c,l;return _(this,function(d){switch(d.label){case 0:n=Date.now()+I(4),r=Date.now()+o,i=C+"-"+t,a=void 0===this.storageHandler?N:this.storageHandler,d.label=1;case 1:return Date.now()<r?[4,O(30)]:[3,8];case 2:return d.sent(),null!==a.getItemSync(i)?[3,5]:(s=this.id+"-"+t+"-"+n,[4,O(Math.floor(25*Math.random()))]);case 3:return d.sent(),a.setItemSync(i,JSON.stringify({id:this.id,iat:n,timeoutKey:s,timeAcquired:Date.now(),timeRefreshed:Date.now()})),[4,O(30)];case 4:return d.sent(),null!==(c=a.getItemSync(i))&&(l=JSON.parse(c)).id===this.id&&l.iat===n?(this.acquiredIatSet.add(n),this.refreshLockWhileAcquired(i,n),[2,!0]):[3,7];case 5:return e.lockCorrector(void 0===this.storageHandler?N:this.storageHandler),[4,this.waitForSomethingToChange(r)];case 6:d.sent(),d.label=7;case 7:return n=Date.now()+I(4),[3,1];case 8:return[2,!1]}})})},e.prototype.refreshLockWhileAcquired=function(e,t){return E(this,void 0,void 0,function(){var o=this;return _(this,function(n){return setTimeout(function(){return E(o,void 0,void 0,function(){var o,n,r;return _(this,function(i){switch(i.label){case 0:return[4,R.default().lock(t)];case 1:return i.sent(),this.acquiredIatSet.has(t)?(o=void 0===this.storageHandler?N:this.storageHandler,null===(n=o.getItemSync(e))?(R.default().unlock(t),[2]):((r=JSON.parse(n)).timeRefreshed=Date.now(),o.setItemSync(e,JSON.stringify(r)),R.default().unlock(t),this.refreshLockWhileAcquired(e,t),[2])):(R.default().unlock(t),[2])}})})},1e3),[2]})})},e.prototype.waitForSomethingToChange=function(t){return E(this,void 0,void 0,function(){return _(this,function(o){switch(o.label){case 0:return[4,new Promise(function(o){var n=!1,r=Date.now(),i=!1;function a(){if(i||(window.removeEventListener("storage",a),e.removeFromWaiting(a),clearTimeout(s),i=!0),!n){n=!0;var t=50-(Date.now()-r);t>0?setTimeout(o,t):o(null)}}window.addEventListener("storage",a),e.addToWaiting(a);var s=setTimeout(a,Math.max(0,t-Date.now()))})];case 1:return o.sent(),[2]}})})},e.addToWaiting=function(t){this.removeFromWaiting(t),void 0!==e.waiters&&e.waiters.push(t)},e.removeFromWaiting=function(t){void 0!==e.waiters&&(e.waiters=e.waiters.filter(function(e){return e!==t}))},e.notifyWaiters=function(){void 0!==e.waiters&&e.waiters.slice().forEac
5h(function(e){return e()})},e.prototype.releaseLock=function(e){return E(this,void 0,void 0,function(){return _(this,function(t){switch(t.label){case 0:return[4,this.releaseLock__private__(e)];case 1:return[2,t.sent()]}})})},e.prototype.releaseLock__private__=function(t){return E(this,void 0,void 0,function(){var o,n,r,i;return _(this,function(a){switch(a.label){case 0:return o=void 0===this.storageHandler?N:this.storageHandler,n=C+"-"+t,null===(r=o.getItemSync(n))?[2]:(i=JSON.parse(r)).id!==this.id?[3,2]:[4,R.default().lock(i.iat)];case 1:a.sent(),this.acquiredIatSet.delete(i.iat),o.removeItemSync(n),R.default().unlock(i.iat),e.notifyWaiters(),a.label=2;case 2:return[2]}})})},e.lockCorrector=function(t){for(var o=Date.now()-5e3,n=t,r=[],i=0;;){var a=n.keySync(i);if(null===a)break;r.push(a),i++}for(var s=!1,c=0;c<r.length;c++){var l=r[c];if(l.includes(C)){var d=n.getItemSync(l);if(null!==d){var u=JSON.parse(d);(void 0===u.timeRefreshed&&u.timeAcquired<o||void 0!==u.timeRefreshed&&u.timeRefreshed<o)&&(n.removeItemSync(l),s=!0)}}}s&&e.notifyWaiters()},e.waiters=void 0,e}();w.default=P;new TextEncoder,new TextDecoder;let k;if(Uint8Array.prototype.toBase64)k=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;k=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const o=[];for(let n=0;n<t.byteLength;n+=e)o.push(String.fromCharCode.apply(null,t.subarray(n,n+e)));return btoa(o.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}Error;Error;var D=A&&A.__assign||function(){return D=Object.assign||function(e){for(var t,o=1,n=arguments.length;o<n;o++)for(var r in t=arguments[o])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},D.apply(this,arguments)};var L;!function(e){e.Code="code",e.ConnectCode="connect_code"}(L||(L={}));var M;var x;!function(e){e.Bearer="Bearer",e.DPoP="DPoP"}(x||(x={}));Error;var H,B;let U;if("undefined"==typeof navigator||null===(H=navigator.userAgent)||void 0===H||null===(B=H.startsWith)||void 0===B||!B.call(H,"Mozilla/5.0 ")){const e="v3.8.6";U="".concat("oauth4webapi","/").concat(e)}function G(e,t){if(null==e)return!1;try{return e instanceof t||Object.getPrototypeOf(e)[Symbol.toStringTag]===t.prototype[Symbol.toStringTag]}catch(e){return!1}}const W="ERR_INVALID_ARG_VALUE",F="ERR_INVALID_ARG_TYPE";function K(e,t,o){const n=new TypeError(e,{cause:o});return Object.assign(n,{code:t}),n}const j=Symbol(),X=Symbol(),J=Symbol(),V=Symbol(),Y=Symbol(),z=Symbol(),Z=new TextEncoder,q=new TextDecoder;function Q(e){return"string"==typeof e?Z.encode(e):q.decode(e)}let $,ee;if(Uint8Array.prototype.toBase64)$=e=>(e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e.toBase64({alphabet:"base64url",omitPadding:!0}));else{const e=32768;$=t=>{t instanceof ArrayBuffer&&(t=new Uint8Array(t));const o=[];for(let n=0;n<t.byteLength;n+=e)o.push(String.fromCharCode.apply(null,t.subarray(n,n+e)));return btoa(o.join("")).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}}function te(e){return"string"==typeof e?ee(e):$(e)}ee=Uint8Array.fromBase64?e=>{try{return Uint8Array.fromBase64(e,{alphabet:"base64url"})}catch(e){throw K("The input to be decoded is not correctly encoded.",W,e)}}:e=>{try{const t=atob(e.replace(/-/g,"+").replace(/_/g,"/").replace(/\s/g,"")),o=new Uint8Array(t.length);for(let e=0;e<t.length;e++)o[e]=t.charCodeAt(e);return o}catch(e){throw K("The input to be decoded is not correctly encoded.",W,e)}};class oe extends Error{constructor(e,t){var o;super(e,t),p(this,"code",void 0),this.name=this.constructor.name,this.code=it,null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,this,this.constructor)}}class ne extends Error{constructor(e,t){var o;super(e,t),p(this,"code",void 0),this.name=this.constructor.name,null!=t&&t.code&&(this.code=null==t?void 0:t.code),null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,this,this.constructor)}}function re(e,t,o){return new ne(e,{code:t,cause:o})}function ie(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)}function ae(e){G(e,Headers)&&(e=Object.fromEntries(e.entries()));const t=new Headers(null!=e?e:{});if(U&&!t.has("user-agent")&&t.set("user-agent",U),t.has("authorization"))throw K('"options.headers" must not include the "authorization" header name',W);return t}function se(e,t){if(void 0!==t){if("function"==typeof t&&(t=t(e.href)),!(t instanceof AbortSignal))throw K('"options.signal" must return or be an instance of AbortSignal',F);return t}}function ce(e){return e.includes("//")?e.replace("//","/"):e}function le(e,t,o,n,r){try{if("number"!=typeof e||!Number.isFinite(e))throw K("".concat(o," must be a number"),F,r);if(e>0)return;if(t){if(0!==e)throw K("".concat(o," must be a non-negative number"),W,r);return}throw K("".concat(o," must be a positive number"),W,r)}catch(e){if(n)throw re(e.message,n,r);throw e}}function de(e,t,o,n){try{if("string"!=typeof e)throw K("".concat(t," must be a string"),F,n);if(0===e.length)throw K("".concat(t," must not be empty"),W,n)}catch(e){if(o)throw re(e.message,o,n);throw e}}function ue(e){!function(e,t){if(Be(e)!==t)throw function(e){let t='"response" content-type must be ';for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1;r<o;r++)n[r-1]=arguments[r];if(n.length>2){const e=n.pop();t+="".concat(n.join(", "),", or ").concat(e)}else 2===n.length?t+="".concat(n[0]," or ").concat(n[1]):t+=n[0];return re(t,dt,e)}(e,t)}(e,"application/json")}function pe(){return te(crypto.getRandomValues(new Uint8Array(32)))}function me(e){switch(e.algorithm.name){case"RSA-PSS":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"PS256";case"SHA-384":return"PS384";case"SHA-512":return"PS512";default:throw new oe("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"RSASSA-PKCS1-v1_5":return function(e){switch(e.algorithm.hash.name){case"SHA-256":return"RS256";case"SHA-384":return"RS384";case"SHA-512":return"RS512";default:throw new oe("unsupported RsaHashedKeyAlgorithm hash name",{cause:e})}}(e);case"ECDSA":return function(e){switch(e.algorithm.namedCurve){case"P-256":return"ES256";case"P-384":return"ES384";case"P-521":return"ES512";default:throw new oe("unsupported EcKeyAlgorithm namedCurve",{cause:e})}}(e);case"Ed25519":case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":return e.algorithm.name;case"EdDSA":return"Ed25519";default:throw new oe("unsupported CryptoKey algorithm name",{cause:e})}}function he(e){const t=null==e?void 0:e[X];return"number"==typeof t&&Number.isFinite(t)?t:0}function fe(e){const t=null==e?void 0:e[J];return"number"==typeof t&&Number.isFinite(t)&&-1!==Math.sign(t)?t:30}function ge(){return Math.floor(Date.now()/1e3)}function ye(e){if("object"!=typeof e||null===e)throw K('"as" must be an object',F);de(e.issuer,'"as.issuer"')}function ve(e){if("object"!=typeof e||null===e)throw K('"client" must be an object',F);de(e.client_id,'"client.client_id"')}function Ae(e){return de(e,'"clientSecret"'),(t,o,n,r)=>
5{n.set("client_id",o.client_id),n.set("client_secret",e)}}function we(e,t){const o=(i=e)instanceof CryptoKey?{key:i}:(null==i?void 0:i.key)instanceof CryptoKey?(void 0!==i.kid&&de(i.kid,'"kid"'),{key:i.key,kid:i.kid}):{},n=o.key,r=o.kid;var i;return function(e,t){if(function(e,t){if(!(e instanceof CryptoKey))throw K("".concat(t," must be a CryptoKey"),F)}(e,t),"private"!==e.type)throw K("".concat(t," must be a private CryptoKey"),W)}(n,'"clientPrivateKey.key"'),async(e,o,i,a)=>{var s;const c={alg:me(n),kid:r},l=function(e,t){const o=ge()+he(t);return{jti:pe(),aud:e.issuer,exp:o+60,iat:o,nbf:o,iss:t.client_id,sub:t.client_id}}(e,o);null==t||null===(s=t[Y])||void 0===s||s.call(t,c,l),i.set("client_id",o.client_id),i.set("client_assertion_type","urn:ietf:params:oauth:client-assertion-type:jwt-bearer"),i.set("client_assertion",await async function(e,t,o){if(!o.usages.includes("sign"))throw K('CryptoKey instances used for signing assertions must include "sign" in their "usages"',W);const n="".concat(te(Q(JSON.stringify(e))),".").concat(te(Q(JSON.stringify(t)))),r=te(await crypto.subtle.sign(function(e){switch(e.algorithm.name){case"ECDSA":return{name:e.algorithm.name,hash:bt(e)};case"RSA-PSS":switch(St(e),e.algorithm.hash.name){case"SHA-256":case"SHA-384":case"SHA-512":return{name:e.algorithm.name,saltLength:parseInt(e.algorithm.hash.name.slice(-3),10)>>3};default:throw new oe("unsupported RSA-PSS hash name",{cause:e})}case"RSASSA-PKCS1-v1_5":return St(e),e.algorithm.name;case"ML-DSA-44":case"ML-DSA-65":case"ML-DSA-87":case"Ed25519":return e.algorithm.name}throw new oe("unsupported CryptoKey algorithm name",{cause:e})}(o),o,Q(n)));return"".concat(n,".").concat(r)}(c,l,n))}}const Se=URL.parse?(e,t)=>URL.parse(e,t):(e,t)=>{try{return new URL(e,t)}catch(e){return null}};function be(e,t){if(t&&"https:"!==e.protocol)throw re("only requests to HTTPS are allowed",pt,e);if("https:"!==e.protocol&&"http:"!==e.protocol)throw re("only HTTP and HTTPS requests are allowed",mt,e)}function Ee(e,t,o,n){let r;if("string"!=typeof e||!(r=Se(e)))throw re("authorization server metadata does not contain a valid ".concat(o?'"as.mtls_endpoint_aliases.'.concat(t,'"'):'"as.'.concat(t,'"')),void 0===e?yt:vt,{attribute:o?"mtls_endpoint_aliases.".concat(t):t});return be(r,n),r}function _e(e,t,o,n){return o&&e.mtls_endpoint_aliases&&t in e.mtls_endpoint_aliases?Ee(e.mtls_endpoint_aliases[t],t,o,n):Ee(e[t],t,o,n)}class Te extends Error{constructor(e,t){var o;super(e,t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"error",void 0),p(this,"status",void 0),p(this,"error_description",void 0),p(this,"response",void 0),this.name=this.constructor.name,this.code=rt,this.cause=t.cause,this.error=t.cause.error,this.status=t.response.status,this.error_description=t.cause.error_description,Object.defineProperty(this,"response",{enumerable:!1,value:t.response}),null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,this,this.constructor)}}class Re extends Error{constructor(e,t){var o,n;super(e,t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"error",void 0),p(this,"error_description",void 0),this.name=this.constructor.name,this.code=at,this.cause=t.cause,this.error=t.cause.get("error"),this.error_description=null!==(o=t.cause.get("error_description"))&&void 0!==o?o:void 0,null===(n=Error.captureStackTrace)||void 0===n||n.call(Error,this,this.constructor)}}class Ce extends Error{constructor(e,t){var o;super(e,t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"response",void 0),p(this,"status",void 0),this.name=this.constructor.name,this.code=nt,this.cause=t.cause,this.status=t.response.status,this.response=t.response,Object.defineProperty(this,"response",{enumerable:!1}),null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,this,this.constructor)}}const Ne="[a-zA-Z0-9!#$%&\\'\\*\\+\\-\\.\\^_`\\|~]+",Oe="("+Ne+')\\s*=\\s*"((?:[^"\\\\]|\\\\[\\s\\S])*)"',Ie="("+Ne+")\\s*=\\s*("+Ne+")",Pe=new RegExp("^[,\\s]*("+Ne+")"),ke=new RegExp("^[,\\s]*"+Oe+"[,\\s]*(.*)"),De=new RegExp("^[,\\s]*"+Ie+"[,\\s]*(.*)"),Le=new RegExp("^([a-zA-Z0-9\\-\\._\\~\\+\\/]+={0,2})(?:$|[,\\s])(.*)");async function Me(e,t,o){if(e.status!==t){let t;var n;if(Je(e),t=await async function(e){if(e.status>399&&e.status<500){wt(e),ue(e);try{const t=await e.clone().json();if(ie(t)&&"string"==typeof t.error&&t.error.length)return t}catch(e){}}}(e))throw await(null===(n=e.body)||void 0===n?void 0:n.cancel()),new Te("server responded with an error in the response body",{cause:t,response:e});
5throw re('"response" is not a conform '.concat(o," response (unexpected HTTP status code)"),ut,e)}}function xe(e){if(!qe.has(e))throw K('"options.DPoP" is not a valid DPoPHandle',W)}const He=Symbol();function Be(e){var t;return null===(t=e.headers.get("content-type"))||void 0===t?void 0:t.split(";")[0]}async function Ue(e,t,o,n,r){if(ye(e),ve(t),!G(n,Response))throw K('"response" must be an instance of Response',F);if(Je(n),200!==n.status)throw re('"response" is not a conform UserInfo Endpoint response (unexpected HTTP status code)',ut,n);let i;if(wt(n),"application/jwt"===Be(n)){const o=await Et(await n.text(),_t.bind(void 0,t.userinfo_signed_response_alg,e.userinfo_signing_alg_values_supported,void 0),he(t),fe(t),null==r?void 0:r[z]).then(Ve.bind(void 0,t.client_id)).then(ze.bind(void 0,e)),a=o.claims,s=o.jwt;Ke.set(n,s),i=a}else{if(t.userinfo_signed_response_alg)throw re("JWT UserInfo Response expected",st,n);i=await Nt(n)}if(de(i.sub,'"response" body "sub" property',lt,{body:i}),o===He);else if(de(o,'"expectedSubject"'),i.sub!==o)throw re('unexpected "response" body "sub" property value',gt,{expected:o,body:i,attribute:"sub"});return i}async function Ge(e,t,o,n,r,i,a){return await o(e,t,r,i),i.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"),((null==a?void 0:a[V])||fetch)(n.href,{body:r,headers:Object.fromEntries(i.entries()),method:"POST",redirect:"manual",signal:se(n,null==a?void 0:a.signal)})}async function We(e,t,o,n,r,i){var a;const s=_e(e,"token_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==i?void 0:i[j]));r.set("grant_type",n);const c=ae(null==i?void 0:i.headers);c.set("accept","application/json"),void 0!==(null==i?void 0:i.DPoP)&&(xe(i.DPoP),await i.DPoP.addProof(s,c,"POST"));const l=await Ge(e,t,o,s,r,c,i);return null==i||null===(a=i.DPoP)||void 0===a||a.cacheNonce(l,s),l}const Fe=new WeakMap,Ke=new WeakMap;function je(e){if(!e.id_token)return;const t=Fe.get(e);if(!t)throw K('"ref" was already garbage collected or did not resolve from the proper sources',W);return t}async function Xe(e,t,o,n,r,i){if(ye(e),ve(t),!G(o,Response))throw K('"response" must be an instance of Response',F);await Me(o,200,"Token Endpoint"),wt(o);const a=await Nt(o);if(de(a.access_token,'"response" body "access_token" property',lt,{body:a}),de(a.token_type,'"response" body "token_type" property',lt,{body:a}),a.token_type=a.token_type.toLowerCase(),void 0!==a.expires_in){let e="number"!=typeof a.expires_in?parseFloat(a.expires_in):a.expires_in;le(e,!0,'"response" body "expires_in" property',lt,{body:a}),a.expires_in=e}if(void 0!==a.refresh_token&&de(a.refresh_token,'"response" body "refresh_token" property',lt,{body:a}),void 0!==a.scope&&"string"!=typeof a.scope)throw re('"response" body "scope" property must be a string',lt,{body:a});if(void 0!==a.id_token){de(a.id_token,'"response" body "id_token" property',lt,{body:a});const i=["aud","exp","iat","iss","sub"];!0===t.require_auth_time&&i.push("auth_time"),void 0!==t.default_max_age&&(le(t.default_max_age,!0,'"client.default_max_age"'),i.push("auth_time")),null!=n&&n.length&&i.push(...n);const s=await Et(a.id_token,_t.bind(void 0,t.id_token_signed_response_alg,e.id_token_signing_alg_values_supported,"RS256"),he(t),fe(t),r).then(et.bind(void 0,i)).then(Ze.bind(void 0,e)).then(Ye.bind(void 0,t.client_id)),c=s.claims,l=s.jwt;if(Array.isArray(c.aud)&&1!==c.aud.length){if(void 0===c.azp)throw re('ID Token "aud" (audience) claim includes additional untrusted audiences',ft,{claims:c,claim:"aud"});if(c.azp!==t.client_id)throw re('unexpected ID Token "azp" (authorized party) claim value',ft,{expected:t.client_id,claims:c,claim:"azp"})}void 0!==c.auth_time&&le(c.auth_time,!0,'ID Token "auth_time" (authentication time)',lt,{claims:c}),Ke.set(o,l),Fe.set(a,c)}if(void 0!==(null==i?void 0:i[a.token_type]))i[a.token_type](o,a);else if("dpop"!==a.token_type&&"bearer"!==a.token_type)throw new oe("unsupported `token_type` value",{cause:{body:a}});return a}function Je(e){let t;if(t=function(e){if(!G(e,Response))throw K('"response" must be an instance of Response',F);const t=e.headers.get("www-authenticate");if(null===t)return;const o=[];let n=t;for(;n;){var r;let t=n.match(Pe);const c=null===(r=t)||void 0===r?void 0:r[1].toLowerCase();if(!c)return;const l=n.substring(t[0].length);if(l&&!l.match(/^[\s,]/))return;const d=l.match(/^\s+(.*)$/),u=!!d;n=d?d[1]:void 0;const p={};let m;if(u)for(;n;){let o,r;if(t=n.match(ke)){var i=g(t,4);if(o=i[1],r=i[2],n=i[3],r.includes("\\"))try{r=JSON.parse('"'.concat(r,'"'))}catch(e){}p[o.toLowerCase()]=r}else{if(!(t=n.match(De))){if(t=n.match(Le)){if(Object.keys(p).length)break;var a=g(t,3);m=a[1],n=a[2];break}return}var s=g(t,4);o=s[1],r=s[2],n=s[3],p[o.toLowerCase()]=r}}else n=l||void 0;const h={scheme:c,parameters:p};m&&(h.token68=m),o.push(h)}return o.length?o:void 0}(e))throw new Ce("server responded with a challenge in the WWW-Authenticate HTTP Header",{cause:t,response:e})}function Ve(e,t){return void 0!==t.claims.aud?Ye(e,t):t}function Ye(e,t){if(Array.isArray(t.claims.aud)){if(!t.claims.aud.includes(e))throw re('unexpected JWT "aud" (audience) claim value',ft,{expected:e,claims:t.claims,claim:"aud"})}else if(t.claims.aud!==e)throw re('unexpected JWT "aud" (audience) claim value',ft,{expected:e,claims:t.claims,claim:"aud"});return t}function ze(e,t){return void 0!==t.claims.iss?Ze(e,t):t}function Ze(e,t){var o,n;const r=null!==(o=null===(n=e[It])||void 0===n?void 0:n.call(e,t))&&void 0!==o?o:e.issuer;if(t.claims.iss!==r)throw re('unexpected JWT "iss" (issuer) claim value',ft,{expected:r,claims:t.claims,claim:"iss"});return t}const qe=new WeakSet,Qe=Symbol(),$e={aud:"audience",c_hash:"code hash",client_id:"client id",exp:"expiration time",iat:"issued at",iss:"issuer",jti:"jwt id",nonce:"nonce",s_hash:"state hash",sub:"subject",ath:"access token hash",htm:"http method",htu:"http uri",cnf:"confirmation",auth_time:"authentication time"};function et(e,t){for(const o of e)if(void 0===t.claims[o])throw re('JWT "'.concat(o,'" (').concat($e[o],") claim missing"),lt,{claims:t.claims});return t}const tt=Symbol(),ot=Symbol();const nt="OAUTH_WWW_AUTHENTICATE_CHALLENGE",rt="OAUTH_RESPONSE_BODY_ERROR",it="OAUTH_UNSUPPORTED_OPERATION",at="OAUTH_AUTHORIZATION_RESPONSE_E
5RROR",st="OAUTH_JWT_USERINFO_EXPECTED",ct="OAUTH_PARSE_ERROR",lt="OAUTH_INVALID_RESPONSE",dt="OAUTH_RESPONSE_IS_NOT_JSON",ut="OAUTH_RESPONSE_IS_NOT_CONFORM",pt="OAUTH_HTTP_REQUEST_FORBIDDEN",mt="OAUTH_REQUEST_PROTOCOL_FORBIDDEN",ht="OAUTH_JWT_TIMESTAMP_CHECK_FAILED",ft="OAUTH_JWT_CLAIM_COMPARISON_FAILED",gt="OAUTH_JSON_ATTRIBUTE_COMPARISON_FAILED",yt="OAUTH_MISSING_SERVER_METADATA",vt="OAUTH_INVALID_SERVER_METADATA";async function At(e){if(!G(e,Response))throw K('"response" must be an instance of Response',F);await Me(e,200,"Revocation Endpoint")}function wt(e){if(e.bodyUsed)throw K('"response" body has been used already',W)}function St(e){const t=e.algorithm;if("number"!=typeof t.modulusLength||t.modulusLength<2048)throw new oe("unsupported ".concat(t.name," modulusLength"),{cause:e})}function bt(e){switch(e.algorithm.namedCurve){case"P-256":return"SHA-256";case"P-384":return"SHA-384";case"P-521":return"SHA-512";default:throw new oe("unsupported ECDSA namedCurve",{cause:e})}}async function Et(e,t,o,n,r){let i,a,s=e.split("."),c=s[0],l=s[1],d=s.length;if(5===d){if(void 0===r)throw new oe("JWE decryption is not configured",{cause:e});var u=(e=await r(e)).split(".");c=u[0],l=u[1],d=u.length}if(3!==d)throw re("Invalid JWT",lt,e);try{i=JSON.parse(Q(te(c)))}catch(e){throw re("failed to parse JWT Header body as base64url encoded JSON",ct,e)}if(!ie(i))throw re("JWT Header must be a top level object",lt,e);if(t(i),void 0!==i.crit)throw new oe('no JWT "crit" header parameter extensions are supported',{cause:{header:i}});try{a=JSON.parse(Q(te(l)))}catch(e){throw re("failed to parse JWT Payload body as base64url encoded JSON",ct,e)}if(!ie(a))throw re("JWT Payload must be a top level object",lt,e);const p=ge()+o;if(void 0!==a.exp){if("number"!=typeof a.exp)throw re('unexpected JWT "exp" (expiration time) claim type',lt,{claims:a});if(a.exp<=p-n)throw re('unexpected JWT "exp" (expiration time) claim value, expiration is past current timestamp',ht,{claims:a,now:p,tolerance:n,claim:"exp"})}if(void 0!==a.iat&&"number"!=typeof a.iat)throw re('unexpected JWT "iat" (issued at) claim type',lt,{claims:a});if(void 0!==a.iss&&"string"!=typeof a.iss)throw re('unexpected JWT "iss" (issuer) claim type',lt,{claims:a});if(void 0!==a.nbf){if("number"!=typeof a.nbf)throw re('unexpected JWT "nbf" (not before) claim type',lt,{claims:a});if(a.nbf>p+n)throw re('unexpected JWT "nbf" (not before) claim value',ht,{claims:a,now:p,tolerance:n,claim:"nbf"})}if(void 0!==a.aud&&"string"!=typeof a.aud&&!Array.isArray(a.aud))throw re('unexpected JWT "aud" (audience) claim type',lt,{claims:a});return{header:i,claims:a,jwt:e}}function _t(e,t,o,n){if(void 0===e)if(Array.isArray(t)){if(!t.includes(n.alg))throw re('unexpected JWT "alg" header parameter',lt,{header:n,expected:t,reason:"authorization server metadata"})}else{if(void 0===o)throw re('missing client or server configuration to verify used JWT "alg" header parameter',void 0,{client:e,issuer:t,fallback:o});if("string"==typeof o?n.alg!==o:"function"==typeof o?!o(n.alg):!o.includes(n.alg))throw re('unexpected JWT "alg" header parameter',lt,{header:n,expected:o,reason:"default value"})}else if("string"==typeof e?n.alg!==e:!e.includes(n.alg))throw re('unexpected JWT "alg" header parameter',lt,{header:n,expected:e,reason:"client configuration"})}function Tt(e,t){const o=e.getAll(t),n=o[0];if(o.length>1)throw re('"'.concat(t,'" parameter must be provided only once'),lt);return n}const Rt=Symbol(),Ct=Symbol();async function Nt(e){let t,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ue;try{t=await e.json()}catch(t){throw o(e),re('failed to parse "response" body as JSON',ct,t)}if(!ie(t))throw re('"response" body must be a top level object',lt,{body:t});return t}const Ot=Symbol(),It=Symbol(),Pt=new TextEncoder,kt=new TextDecoder,Dt=new TextDecoder("utf-8",{fatal:!0});function Lt(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];const n=t.reduce((e,t)=>e+t.length,0),r=new Uint8Array(n);let i=0;for(const e of t)r.set(e,i),i+=e.length;return r}function Mt(e){const t=new Uint8Array(e.length);for(let o=0;o<e.length;o++){const n=e.charCodeAt(o);if(n>127)throw new TypeError("non-ASCII string encountered in encode()");t[o]=n}return t}const xt=function(e){return new TypeError("CryptoKey does not support this operation, its ".concat(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"algorithm.name"," must be ").concat(e))};const Ht=function(e,t){for(var o=arguments.length,n=new Array(o>2?o-2:0),r=2;r<o;r++)n[r-2]=arguments[r];return function(e,t){for(var o=arguments.length,n=new Array(o>2?o-2:0),r=2;r<o;r++)n[r-2]=arguments[r];if(n.length>2){const t=n.pop();e+="one of type ".concat(n.join(", "),", or ").concat(t,".")}else 2===n.length?e+="one of type ".concat(n[0]," or ").concat(n[1],"."):e+="of type ".concat(n[0],".");if(null==t)e+=" Received ".concat(t);else if("function"==typeof t&&t.name)e+=" Received function ".concat(t.name);else if("object"==typeof t&&null!=t){var i;null!==(i=t.constructor)&&void 0!==i&&i.name&&(e+=" Received an instance of ".concat(t.constructor.name))}return e}("Key for the ".concat(e," algorithm must be "),t,...n)};
5class Bt extends Error{constructor(e,t){var o;super(e,t),p(this,"code","ERR_JOSE_GENERIC"),this.name=this.constructor.name,null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,this,this.constructor)}}p(Bt,"code","ERR_JOSE_GENERIC");class Ut extends Bt{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:o,reason:n,payload:t}}),p(this,"code","ERR_JWT_CLAIM_VALIDATION_FAILED"),p(this,"claim",void 0),p(this,"reason",void 0),p(this,"payload",void 0),this.claim=o,this.reason=n,this.payload=t}}p(Ut,"code","ERR_JWT_CLAIM_VALIDATION_FAILED");class Gt extends Bt{constructor(e,t){let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"unspecified",n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"unspecified";super(e,{cause:{claim:o,reason:n,payload:t}}),p(this,"code","ERR_JWT_EXPIRED"),p(this,"claim",void 0),p(this,"reason",void 0),p(this,"payload",void 0),this.claim=o,this.reason=n,this.payload=t}}p(Gt,"code","ERR_JWT_EXPIRED");class Wt extends Bt{constructor(){super(...arguments),p(this,"code","ERR_JOSE_ALG_NOT_ALLOWED")}}p(Wt,"code","ERR_JOSE_ALG_NOT_ALLOWED");class Ft extends Bt{constructor(){super(...arguments),p(this,"code","ERR_JOSE_NOT_SUPPORTED")}}p(Ft,"code","ERR_JOSE_NOT_SUPPORTED"),p(class extends Bt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"decryption operation failed",arguments.length>1?arguments[1]:void 0),p(this,"code","ERR_JWE_DECRYPTION_FAILED")}},"code","ERR_JWE_DECRYPTION_FAILED"),p(class extends Bt{constructor(){super(...arguments),p(this,"code","ERR_JWE_INVALID")}},"code","ERR_JWE_INVALID");class Kt extends Bt{constructor(){super(...arguments),p(this,"code","ERR_JWS_INVALID")}}p(Kt,"code","ERR_JWS_INVALID");class jt extends Bt{constructor(){super(...arguments),p(this,"code","ERR_JWT_INVALID")}}p(jt,"code","ERR_JWT_INVALID"),p(class extends Bt{constructor(){super(...arguments),p(this,"code","ERR_JWK_INVALID")}},"code","ERR_JWK_INVALID");class Xt extends Bt{constructor(){super(...arguments),p(this,"code","ERR_JWKS_INVALID")}}p(Xt,"code","ERR_JWKS_INVALID");class Jt extends Bt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"no applicable key found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),p(this,"code","ERR_JWKS_NO_MATCHING_KEY")}}p(Jt,"code","ERR_JWKS_NO_MATCHING_KEY");class Vt extends Bt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"multiple matching keys found in the JSON Web Key Set",arguments.length>1?arguments[1]:void 0),p(this,Symbol.asyncIterator,y(function*(){})),p(this,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS")}}p(Vt,"code","ERR_JWKS_MULTIPLE_MATCHING_KEYS");class Yt extends Bt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"request timed out",arguments.length>1?arguments[1]:void 0),p(this,"code","ERR_JWKS_TIMEOUT")}}p(Yt,"code","ERR_JWKS_TIMEOUT");class zt extends Bt{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"signature verification failed",arguments.length>1?arguments[1]:void 0),p(this,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED")}}p(zt,"code","ERR_JWS_SIGNATURE_VERIFICATION_FAILED");const Zt=e=>{if("CryptoKey"===(null==e?void 0:e[Symbol.toStringTag]))return!0;try{return e instanceof CryptoKey}catch(e){return!1}};function qt(e){if(Uint8Array.fromBase64)return Uint8Array.fromBase64(e);const t=atob(e),o=new Uint8Array(t.length);for(let e=0;e<t.length;e++)o[e]=t.charCodeAt(e);return o}const Qt="The input to be decoded is not correctly encoded.";function $t(e){if(Uint8Array.fromBase64)try{return Uint8Array.fromBase64("string"==typeof e?e:kt.decode(e),{alphabet:"base64url"})}catch(e){throw new TypeError(Qt,{cause:e})}let t=e;if(t instanceof Uint8Array&&(t=kt.decode(t)),t.includes("+")||t.includes("/"))throw new TypeError(Qt);t=t.replace(/-/g,"+").replace(/_/g,"/");try{return qt(t)}catch(e){throw new TypeError(Qt)}}function eo(e){let t=e;return"string"==typeof t&&(t=Pt.encode(t)),Uint8Array.prototype.toBase64?t.toBase64({alphabet:"base64url",omitPadding:!0}):function(e){if(Uint8Array.prototype.toBase64)return e.toBase64();const t=[];for(let o=0;o<e.length;o+=32768)t.push(String.fromCharCode.apply(null,e.subarray(o,o+32768)));return btoa(t.join(""))}(t).replace(/=/g,"").replace(/\+/g,"-").replace(/\//g,"_")}function to(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||null===Object.getPrototypeOf(t)}function oo(e){return to(e)&&Array.isArray(e.keys)&&Array.from(e.keys).every(to)}function no(e,t,o){try{return $t(e)}catch(e){throw new o("Failed to base64url decode the ".concat(t))}}async function ro(e,t){var o,n,r,i;if("RSA"===t.kty&&"oth"in t&&void 0!==t.oth)throw new Ft('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');if(!e.kty.includes(t.kty))throw new Ft('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');const a=null!==(o=null===(n=e.resolve)||void 0===n?void 0:n.call(e,{kty:t.kty,crv:t.crv}))&&void 0!==o?o:e.subtle,s=!(!t.d&&!t.priv),c=h({},t);return"AKP"!==c.kty&&delete c.alg,delete c.use,crypto.subtle.importKey("jwk",c,a,null!==(r=t.ext)&&void 0!==r?r:!s,null!==(i=t.key_ops)&&void 0!==i?i:e.usages[s?1:0])}function io(e){return h({__proto__:null},e)}const ao=e=>e[Symbol.toStringTag];function so(e,t,o){const n=e.alg,r=e.secret,i="decrypt"===o||"sign"===o;if(r&&t instanceof Uint8Array)return[co,t];if(to(t)){const a=function(e){const t=io(e);if(void 0!==t.ext&&"boolean"!=typeof t.ext)throw new TypeError('"ext" (Extractable) Parameter must be a boolean');if(void 0!==t.key_ops){const e=t.key_ops,o=Array.isArray(e)?[...e]:void 0;if(!o||o.some(e=>"string"!=typeof e)||new Set(o).size!==o.length)throw new TypeError('"key_ops" (Key Operations) Parameter must be an array of unique strings');t.key_ops=o}return t}(t);if("string"!=typeof a.kty)throw new TypeError(r?Ht(n,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"):Ht(n,t,"CryptoKey","KeyObject","JSON Web Key"));if(!(r?"oct"===a.kty&&"string"==typeof a.k:"oct"!==a.kty&&(i?"AKP"===a.kty&&"string"==typeof a.priv||"string"==typeof a.d:void 0===a.d&&void 0===a.priv)))throw new TypeError(r?'JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present':"JSON Web Key for this operation must be a ".concat(i?"private":"public"," JWK"));return((e,t,o)=>{const n=e.alg;if(void 0!==t.use){const e="sign"===o||"verify"===o?"sig":"enc";if(t.use!==e)throw new TypeError('Invalid key for this operation, its "use" must be "'.concat(e,'" when present'))}if(void 0!==t.alg&&t.alg!==n)throw new TypeError('Invalid key for this operation, its "alg" must be "'.concat(n,'" when present'));if(Array.isArray(t.key_ops)){var r;const n="encrypt"===o||"decrypt"===o?null===(r=e.ops)||void 0===r?void 0:r["encrypt"===o?0:1]:o;if(n&&!t.key_ops.includes(n))throw new TypeError('Invalid key for this operation, its "key_ops" must include "'.concat(n,'" when present'))}})(e,a,o),[po,t,a]}if(!(e=>Zt(e)||(e=>"KeyObject"===(null==e?void 0:e[Symbol.toStringTag]))(e))(t))throw new TypeError(r?Ht(n,t,"CryptoKey","KeyObject","JSON Web Key","Uint8Array"):Ht(n,t,"CryptoKey","KeyObject","JSON Web Key"));if(r){if("secret"!==t.type)throw new TypeError("".concat(ao(t),' instances for symmetric algorithms must be of type "secret"'))}else{if("secret"===t.type)throw new TypeError("".concat(ao(t),' instances for asymmetric algorithms must not be of type "secret"'));const e=i?"private":"public";if(("public"===t.type||"private"===t.type)&&t.type!==e){const n="sign"===o?"signing":"verify"===o?"verifying":"".concat(o.slice(0,-1),"tion");throw new TypeError("".concat(ao(t)," instances for asymmetric algorithm ").concat(n,' must be of type "').concat(e,'"'))}}return Zt(t)?[lo,t]:[uo,t]}const co=0,lo=1,uo=2,po=3;let mo;const ho={__proto__:null,prime256v1:"P-256",secp384r1:"P-384",secp521r1:"P-521"};function fo(e,t,o){mo||(mo=new WeakMap);const n=mo.get(e);return o&&(n?n[t]=o:mo.set(e,{[t]:o})),null!=o?o:null==n?void 0:n[t]}const go=async(e,t,o)=>{var n;return null!==(n=fo(e,o.alg))&&void 0!==n?n:fo(e,o.alg,await ro(o,h(h({},t),{},{alg:o.alg})))};async function yo(e,t,o){const n=so(e,t,o);switch(n[0]){case co:case lo:return n[1];case po:{const t=n[1],o=n[2];if("oct"===o.kty)return $t(o.k);if(!Object.isFrozen(t)){const e=t.key_ops;Array.isArray(e)&&Object.freeze(e),Object.freeze(t)}return go(t,o,e)}case uo:{const t=n[1];
5return"secret"===t.type?t.export():"toCryptoKey"in t&&"function"==typeof t.toCryptoKey?((e,t)=>{var o,n,r;const i=fo(e,t.alg);if(i)return i;const a="public"===e.type,s=t.usages[a?0:1],c=e.asymmetricKeyType,l=ho[null===(o=e.asymmetricKeyDetails)||void 0===o?void 0:o.namedCurve],d=null!==(n=null===(r=t.resolve)||void 0===r?void 0:r.call(t,{crv:l,asymmetricKeyType:c}))&&void 0!==n?n:t.subtle;return fo(e,t.alg,e.toCryptoKey(d,a,s))})(t,e):go(t,t.export({format:"jwk"}),e)}}}function vo(e){const t={__proto__:null};for(const o in e)t[o]=h(h({},e[o]),{},{alg:o});return t}const Ao=[["encrypt","wrapKey"],["decrypt","unwrapKey"]],wo=[[],["deriveBits"]],So=[[],[]];function bo(e){return{kty:["RSA"],subtle:{name:"RSA-OAEP",hash:"SHA-".concat(e)},usages:Ao,ops:["wrapKey","unwrapKey"]}}function Eo(){return{kty:["EC","OKP"],subtle:{name:"ECDH"},resolve:e=>{let t=e.kty,o=e.crv,n=e.asymmetricKeyType;if("X25519"===o||"x25519"===n)return{name:"X25519"};if("OKP"===t)throw new Ft('Invalid or unsupported JWK "alg" (Algorithm) Parameter value');return{name:"ECDH",namedCurve:o}},usages:wo,ops:[void 0,"deriveBits"]}}function _o(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{kty:["oct"],secret:!0,subtle:{name:t?"AES-GCM":"AES-KW",length:e},usages:So,ops:t?["encrypt","decrypt"]:["wrapKey","unwrapKey"]}}function To(){return{kty:["oct"],secret:!0,subtle:{name:"PBKDF2"},usages:So,ops:["deriveBits","deriveBits"]}}const Ro=vo({dir:{kty:["oct"],secret:!0,subtle:{name:"AES-GCM"},usages:So,ops:["encrypt","decrypt"]},"RSA-OAEP":bo(1),"RSA-OAEP-256":bo(256),"RSA-OAEP-384":bo(384),"RSA-OAEP-512":bo(512),"ECDH-ES":Eo(),"ECDH-ES+A128KW":Eo(),"ECDH-ES+A192KW":Eo(),"ECDH-ES+A256KW":Eo(),A128KW:_o(128),A192KW:_o(192),A256KW:_o(256),A128GCMKW:_o(128,!0),A192GCMKW:_o(192,!0),A256GCMKW:_o(256,!0),"PBES2-HS256+A128KW":To(),"PBES2-HS384+A192KW":To(),"PBES2-HS512+A256KW":To()}),Co=["encrypt","decrypt"];function No(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{kty:["oct"],secret:!0,subtle:{name:t?"AES-CBC":"AES-GCM",length:e},usages:So,ops:Co,cekBits:e,ivBits:t?128:96,cbc:t}}vo({A128GCM:No(128),A192GCM:No(192),A256GCM:No(256),"A128CBC-HS256":No(256,!0),"A192CBC-HS384":No(384,!0),"A256CBC-HS512":No(512,!0)});const Oo={__proto__:null,b64:!0};function Io(e,t){if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw new TypeError('"'.concat(e,'" option must be an array of strings'));if(t)return new Set(t)}function Po(e,t,o,n,r){if(void 0!==r.crit&&void 0===(null==n?void 0:n.crit))throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!n||void 0===n.crit)return[];if(!Array.isArray(n.crit)||0===n.crit.length||n.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');const i=void 0===o?t:h(h({__proto__:null},o),t);for(const t of n.crit){if(!(t in i))throw new Ft('Extension Header Parameter "'.concat(t,'" is not recognized'));if(!Object.hasOwn(r,t)||void 0===r[t])throw new e('Extension Header Parameter "'.concat(t,'" is missing'));if(i[t]&&(!Object.hasOwn(n,t)||void 0===n[t]))throw new e('Extension Header Parameter "'.concat(t,'" MUST be integrity protected'))}return n.crit}function ko(e,t){if(t.includes("b64")){const t=e.b64;if("boolean"!=typeof t)throw new Kt('The "b64" (base64url-encode payload) Header Parameter must be a boolean');return t}return!0}var Do,Lo;let Mo,xo;if("undefined"==typeof navigator||null===(Do=navigator.userAgent)||void 0===Do||null===(Lo=Do.startsWith)||void 0===Lo||!Lo.call(Do,"Mozilla/5.0 ")){const e="v6.8.4";xo="".concat("openid-client","/").concat(e),Mo={"user-agent":xo}}const Ho=e=>Bo.get(e);let Bo,Uo;function Go(e){return void 0!==e?Ae(e):(Uo||(Uo=new WeakMap),(e,t,o,n)=>{let r;return(r=Uo.get(t))||(function(e,t){if("string"!=typeof e)throw Xo("".concat(t," must be a string"),jo);if(0===e.length)throw Xo("".concat(t," must not be empty"),Ko)}(t.client_secret,'"metadata.client_secret"'),r=Ae(t.client_secret),Uo.set(t,r)),r(e,t,o,n)})}const Wo=He,Fo=V,Ko="ERR_INVALID_ARG_VALUE",jo="ERR_INVALID_ARG_TYPE";function Xo(e,t,o){const n=new TypeError(e,{cause:o});return Object.assign(n,{code:t}),n}
5class Jo extends Error{constructor(e,t){var o;super(e,t),p(this,"code",void 0),this.name=this.constructor.name,this.code=null==t?void 0:t.code,null===(o=Error.captureStackTrace)||void 0===o||o.call(Error,this,this.constructor)}}function Vo(e,t,o){return new Jo(e,{cause:t,code:o})}function Yo(e){if(e instanceof TypeError||e instanceof Jo||e instanceof Te||e instanceof Re||e instanceof Ce)throw e;if(e instanceof ne)switch(e.code){case pt:throw Vo("only requests to HTTPS are allowed",e,e.code);case mt:throw Vo("only requests to HTTP or HTTPS are allowed",e,e.code);case ut:throw Vo("unexpected HTTP response status code",e.cause,e.code);case dt:throw Vo("unexpected response content-type",e.cause,e.code);case ct:throw Vo("parsing error occured",e,e.code);case lt:throw Vo("invalid response encountered",e,e.code);case ft:throw Vo("unexpected JWT claim value encountered",e,e.code);case gt:throw Vo("unexpected JSON attribute value encountered",e,e.code);case ht:throw Vo("JWT timestamp claim value failed validation",e,e.code);default:throw Vo(e.message,e,e.code)}if(e instanceof oe)throw Vo("unsupported operation",e,e.code);if(e instanceof DOMException)switch(e.name){case"OperationError":throw Vo("runtime operation error",e,it);case"NotSupportedError":throw Vo("runtime unsupported operation",e,it);case"TimeoutError":throw Vo("operation timed out",e,"OAUTH_TIMEOUT");case"AbortError":throw Vo("operation aborted",e,"OAUTH_ABORT")}throw new Jo("something went wrong",{cause:e})}async function zo(e,t,o,n,r){const i=await async function(e,t){var o,n;if(!(e instanceof URL))throw Xo('"server" must be an instance of URL',jo);const r=!e.href.includes("/.well-known/"),i=null!==(o=null==t?void 0:t.timeout)&&void 0!==o?o:30,a=AbortSignal.timeout(1e3*i),s=await(r?async function(e,t){return async function(e,t,o,n){if(!(e instanceof URL))throw K('"'.concat("issuerIdentifier",'" must be an instance of URL'),F);be(e,!0!==(null==n?void 0:n[j]));const r=o(new URL(e.href)),i=ae(null==n?void 0:n.headers);return i.set("accept","application/json"),((null==n?void 0:n[V])||fetch)(r.href,{body:void 0,headers:Object.fromEntries(i.entries()),method:"GET",redirect:"manual",signal:se(r,null==n?void 0:n.signal)})}(e,0,e=>{switch(null==t?void 0:t.algorithm){case void 0:case"oidc":!function(e){e.pathname=ce("".concat(e.pathname,"/").concat(".well-known/openid-configuration"))}(e);break;case"oauth2":!function(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];"/"===e.pathname?e.pathname=t:e.pathname=ce("".concat(t,"/").concat(o?e.pathname:e.pathname.replace(/(\/)$/,"")))}(e,".well-known/oauth-authorization-server");break;default:throw K('"options.algorithm" must be "oidc" (default), or "oauth2"',W)}return e},t)}(e,{algorithm:null==t?void 0:t.algorithm,[V]:null==t?void 0:t[Fo],[j]:null==t||null===(n=t.execute)||void 0===n?void 0:n.includes(nn),signal:a,headers:new Headers(Mo)}):((null==t?void 0:t[Fo])||fetch)((be(e,null==t||null===(c=t.execute)||void 0===c||!c.includes(nn)),e.href),{headers:Object.fromEntries(new Headers(h({accept:"application/json"},Mo)).entries()),body:void 0,method:"GET",redirect:"manual",signal:a})).then(e=>async function(e,t){const o=e;if(!(o instanceof URL)&&o!==Ot)throw K('"expectedIssuerIdentifier" must be an instance of URL',F);if(!G(t,Response))throw K('"response" must be an instance of Response',F);if(200!==t.status)throw re('"response" is not a conform Authorization Server Metadata response (unexpected HTTP status code)',ut,t);wt(t);const n=await Nt(t);if(de(n.issuer,'"response" body "issuer" property',lt,{body:n}),o!==Ot&&new URL(n.issuer).href!==o.href)throw re('"response" body "issuer" property does not match the expected value',gt,{expected:o.href,body:n,attribute:"issuer"});return n}(Ot,e)).catch(Yo);var c;return r&&new URL(s.issuer).href!==e.href&&(function(e,t,o){return!("https://login.microsoftonline.com"!==e.origin||null!=o&&o.algorithm&&"oidc"!==o.algorithm||(t[Zo]=!0,0))}(e,s,t)||function(e,t){return!(!e.hostname.endsWith(".b2clogin.com")||null!=t&&t.algorithm&&"oidc"!==t.algorithm)}(e,t)||(()=>{throw new Jo("discovered metadata issuer does not match the expected issuer",{code:gt,cause:{expected:e.href,body:s,attribute:"issuer"}})})()),s}(e,r),a=new qo(i,t,o,n);let s=Ho(a);if(null!=r&&r[Fo]&&(s.fetch=r[Fo]),null!=r&&r.timeout&&(s.timeout=r.timeout),null!=r&&r.execute)for(const e of r.execute)e(a);return a}new TextDecoder;const Zo=Symbol();class qo{constructor(e,t,o,n){var r,i,a,s,c;if("string"!=typeof t||!t.length)throw Xo('"clientId" must be a non-empty string',jo);if("string"==typeof o&&(o={client_secret:o}),void 0!==(null===(r=o)||void 0===r?void 0:r.client_id)&&t!==o.client_id)throw Xo('"clientId" and "metadata.client_id" must be the same',Ko);const l=h(h({},structuredClone(o)),{},{client_id:t});let d;l[X]=null!==(i=null===(a=o)||void 0===a?void 0:a[X])&&void 0!==i?i:0,l[J]=null!==(s=null===(c=o)||void 0===c?void 0:c[J])&&void 0!==s?s:30,d=n||("string"==typeof l.client_secret&&l.client_secret.length?Go(l.client_secret):(e,t,o,n)=>{o.set("client_id",t.client_id)});let u=Object.freeze(l);const p=structuredClone(e);Zo in e&&(p[It]=t=>{let o=t.claims.tid;return e.issuer.replace("{tenantid}",o)});let m=Object.freeze(p);Bo||(Bo=new WeakMap),Bo.set(this,{__proto__:null,as:m,c:u,auth:d,tlsOnly:!0,jwksCache:{}})}serverMetadata(){const e=structuredClone(Ho(this).as);return function(e){Object.defineProperties(e,function(e){return{supportsPKCE:{__proto__:null,value(){var t;let o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"S256";return!0===(null===(t=e.code_challenge_methods_supported)||void 0===t?void 0:t.includes(o))}}}}(e))}(e),e}clientMetadata(){return structuredClone(Ho(this).c)}get timeout(){return Ho(this).timeout}set timeout(e){Ho(this).timeout=e}get[Fo](){return Ho(this).fetch}set[Fo](e){Ho(this).fetch=e}}function Qo(e){Object.defineProperties(e,function(e){let t;if(void 0!==e.expires_in){const o=new Date;o.setSeconds(o.getSeconds()+e.expires_in),t=o.getTime()}
5return{expiresIn:{__proto__:null,value(){if(t){const e=Date.now();return t>e?Math.floor((t-e)/1e3):0}}},claims:{__proto__:null,value(){try{return je(this)}catch(e){return}}}}}(e))}async function $o(e,t,o){var n;let r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=null===(n=e.headers.get("retry-after"))||void 0===n?void 0:n.trim();if(void 0===i)return;let a;if(/^\d+$/.test(i))a=parseInt(i,10);else{const e=new Date(i);if(Number.isFinite(e.getTime())){const t=new Date,o=e.getTime()-t.getTime();o>0&&(a=Math.ceil(o/1e3))}}if(r&&!Number.isFinite(a))throw new ne("invalid Retry-After header value",{cause:e});a>t&&await en(a-t,o)}function en(e,t){return new Promise((o,n)=>{const r=e=>{try{t.throwIfAborted()}catch(e){return void n(e)}if(e<=0)return void o();const i=Math.min(e,5);setTimeout(()=>r(e-i),1e3*i)};r(e)})}async function tn(e,t){dn(e);const o=Ho(e),n=o.as,r=o.c,i=o.auth,a=o.fetch,s=o.tlsOnly,c=o.timeout;return async function(e,t,o,n,r){ye(e),ve(t);const i=_e(e,"backchannel_authentication_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==r?void 0:r[j])),a=new URLSearchParams(n);a.set("client_id",t.client_id);const s=ae(null==r?void 0:r.headers);return s.set("accept","application/json"),Ge(e,t,o,i,a,s,r)}(n,r,i,t,{[V]:a,[j]:!s,headers:new Headers(Mo),signal:un(c)}).then(e=>async function(e,t,o){if(ye(e),ve(t),!G(o,Response))throw K('"response" must be an instance of Response',F);await Me(o,200,"Backchannel Authentication Endpoint"),wt(o);const n=await Nt(o);de(n.auth_req_id,'"response" body "auth_req_id" property',lt,{body:n});let r="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return le(r,!0,'"response" body "expires_in" property',lt,{body:n}),n.expires_in=r,void 0!==n.interval&&le(n.interval,!1,'"response" body "interval" property',lt,{body:n}),n}(n,r,e)).catch(Yo)}async function on(e,t,o,n){var r,i;dn(e),o=new URLSearchParams(o);let a=null!==(r=t.interval)&&void 0!==r?r:5;const s=null!==(i=null==n?void 0:n.signal)&&void 0!==i?i:AbortSignal.timeout(1e3*t.expires_in);try{await en(a,s)}catch(e){Yo(e)}const c=Ho(e),l=c.as,d=c.c,u=c.auth,p=c.fetch,m=c.tlsOnly,f=c.nonRepudiation,g=c.timeout,y=c.decrypt,v=(r,i)=>on(e,h(h({},t),{},{interval:r}),o,h(h({},n),{},{signal:s,flag:i})),A=function(e,t){const o=un(t);if(!o)return{signal:e,cleanup(){}};const n=new AbortController,r=e=>{const t=e.target;n.abort(t.reason)};return e.aborted?n.abort(e.reason):o.aborted?n.abort(o.reason):(e.addEventListener("abort",r,{once:!0}),o.addEventListener("abort",r,{once:!0})),{signal:n.signal,cleanup(){e.removeEventListener("abort",r),o.removeEventListener("abort",r)}}}(s,g),w=await async function(e,t,o,n,r){ye(e),ve(t),de(n,'"authReqId"');const i=new URLSearchParams(null==r?void 0:r.additionalParameters);return i.set("auth_req_id",n),We(e,t,o,"urn:openid:params:grant-type:ciba",i,r)}(l,d,u,t.auth_req_id,{[V]:p,[j]:!m,additionalParameters:o,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Mo),signal:A.signal}).catch(Yo).finally(A.cleanup);var S;if(503===w.status&&w.headers.has("retry-after"))return await $o(w,a,s,!0),await(null===(S=w.body)||void 0===S?void 0:S.cancel()),v(a);const b=async function(e,t,o,n){return Xe(e,t,o,void 0,null==n?void 0:n[z],null==n?void 0:n.recognizedTokenTypes)}(l,d,w,{[z]:y});let E;try{E=await b}catch(e){if(mn(e,n))return v(a,hn);if(e instanceof Te)switch(e.error){case"slow_down":a+=5;case"authorization_pending":return await $o(e.response,a,s),v(a)}Yo(e)}return E.id_token&&await(null==f?void 0:f(w)),Qo(E),E}function nn(e){Ho(e).tlsOnly=!1}async function rn(e,t,o,n,r){if(dn(e),!((null==r?void 0:r.flag)===
5hn||t instanceof URL||function(e){try{return"Request"===Object.getPrototypeOf(e)[Symbol.toStringTag]}catch(e){return!1}}(t)))throw Xo('"currentUrl" must be an instance of URL, or Request',jo);let i,a;const s=Ho(e),c=s.as,l=s.c,d=s.auth,u=s.fetch,p=s.tlsOnly,m=s.jarm,f=s.hybrid,y=s.nonRepudiation,v=s.timeout,A=s.decrypt,w=s.implicit;if((null==r?void 0:r.flag)===hn)i=r.authResponse,a=r.redirectUri;else{if(!(t instanceof URL)){const e=t;switch(t=new URL(t.url),e.method){case"GET":break;case"POST":const o=new URLSearchParams(await async function(e){if("POST"!==e.method)throw K("form_post responses are expected to use the POST method",W,{cause:e});if("application/x-www-form-urlencoded"!==Be(e))throw K("form_post responses are expected to use the application/x-www-form-urlencoded content-type",W,{cause:e});return async function(e){if(e.bodyUsed)throw K("form_post Request instances must contain a readable body",W,{cause:e});return e.text()}(e)}(e));if(f)t.hash=o.toString();else for(const e of o.entries()){var S=g(e,2);const o=S[0],n=S[1];t.searchParams.append(o,n)}break;default:throw Xo("unexpected Request HTTP method",Ko)}}switch(a=function(e){return(e=new URL(e)).search="",e.hash="",e.href}(t),!0){case!!m:i=await m(t,null==o?void 0:o.expectedState);break;case!!f:i=await f(t,null==o?void 0:o.expectedNonce,null==o?void 0:o.expectedState,null==o?void 0:o.maxAge);break;case!!w:throw new TypeError("authorizationCodeGrant() cannot be used by response_type=id_token clients");default:try{i=function(e,t,o,n){if(ye(e),ve(t),o instanceof URL&&(o=o.searchParams),!(o instanceof URLSearchParams))throw K('"parameters" must be an instance of URLSearchParams, or URL',F);if(Tt(o,"response"))throw re('"parameters" contains a JARM response, use validateJwtAuthResponse() instead of validateAuthResponse()',lt,{parameters:o});const r=Tt(o,"iss"),i=Tt(o,"state");if(!r&&e.authorization_response_iss_parameter_supported)throw re('response parameter "iss" (issuer) missing',lt,{parameters:o});if(r&&r!==e.issuer)throw re('unexpected "iss" (issuer) response parameter value',lt,{expected:e.issuer,parameters:o});switch(n){case void 0:case Ct:if(void 0!==i)throw re('unexpected "state" response parameter encountered',lt,{expected:void 0,parameters:o});break;case Rt:break;default:if(de(n,'"expectedState" argument'),i!==n)throw re(void 0===i?'response parameter "state" missing':'unexpected "state" response parameter value',lt,{expected:n,parameters:o})}if(Tt(o,"error"))throw new Re("authorization response from the server is an error",{cause:o});const a=Tt(o,"id_token"),s=Tt(o,"token");if(void 0!==a||void 0!==s)throw new oe("implicit and hybrid flows are not supported");return c=new URLSearchParams(o),qe.add(c),c;var c}(c,l,t.searchParams,null==o?void 0:o.expectedState)}catch(e){Yo(e)}}}const b=await async function(e,t,o,n,r,i,a){if(ye(e),ve(t),!qe.has(n))throw K('"callbackParameters" must be an instance of URLSearchParams obtained from "validateAuthResponse()", or "validateJwtAuthResponse()',W);de(r,'"redirectUri"');const s=Tt(n,"code");if(!s)throw re('no authorization code in "callbackParameters"',lt);const c=new URLSearchParams(null==a?void 0:a.additionalParameters);return c.set("redirect_uri",r),c.set("code",s),i!==Qe&&(de(i,'"codeVerifier"'),c.set("code_verifier",i)),We(e,t,o,"authorization_code",c,a)}(c,l,d,i,a,(null==o?void 0:o.pkceCodeVerifier)||Qe,{additionalParameters:n,[V]:u,[j]:!p,DPoP:null==r?void 0:r.DPoP,headers:new Headers(Mo),signal:un(v)}).catch(Yo);"string"!=typeof(null==o?void 0:o.expectedNonce)&&"number"!=typeof(null==o?void 0:o.maxAge)||(o.idTokenExpected=!0);const E=async function(e,t,o,n){return"string"==typeof(null==n?void 0:n.expectedNonce)||"number"==typeof(null==n?void 0:n.maxAge)||null!=n&&n.requireIdToken?async function(e,t,o,n,r,i,a){const s=[];
5switch(n){case void 0:n=tt;break;case tt:break;default:de(n,'"expectedNonce" argument'),s.push("nonce")}switch(null!=r||(r=t.default_max_age),r){case void 0:r=ot;break;case ot:break;default:le(r,!0,'"maxAge" argument'),s.push("auth_time")}const c=await Xe(e,t,o,s,i,a);de(c.id_token,'"response" body "id_token" property',lt,{body:c});const l=je(c);if(r!==ot){const e=ge()+he(t),o=fe(t);if(l.auth_time+r<e-o)throw re("too much time has elapsed since the last End-User authentication",ht,{claims:l,now:e,tolerance:o,claim:"auth_time"})}if(n===tt){if(void 0!==l.nonce)throw re('unexpected ID Token "nonce" claim value',ft,{expected:void 0,claims:l,claim:"nonce"})}else if(l.nonce!==n)throw re('unexpected ID Token "nonce" claim value',ft,{expected:n,claims:l,claim:"nonce"});return c}(e,t,o,n.expectedNonce,n.maxAge,n[z],n.recognizedTokenTypes):async function(e,t,o,n,r){const i=await Xe(e,t,o,void 0,n,r),a=je(i);if(a){if(void 0!==t.default_max_age){le(t.default_max_age,!0,'"client.default_max_age"');const e=ge()+he(t),o=fe(t);if(a.auth_time+t.default_max_age<e-o)throw re("too much time has elapsed since the last End-User authentication",ht,{claims:a,now:e,tolerance:o,claim:"auth_time"})}if(void 0!==a.nonce)throw re('unexpected ID Token "nonce" claim value',ft,{expected:void 0,claims:a,claim:"nonce"})}return i}(e,t,o,null==n?void 0:n[z],null==n?void 0:n.recognizedTokenTypes)}(c,l,b,{expectedNonce:null==o?void 0:o.expectedNonce,maxAge:null==o?void 0:o.maxAge,requireIdToken:null==o?void 0:o.idTokenExpected,[z]:A});let _;try{_=await E}catch(t){if(mn(t,r))return rn(e,void 0,o,n,h(h({},r),{},{flag:hn,authResponse:i,redirectUri:a}));Yo(t)}return _.id_token&&await(null==y?void 0:y(b)),Qo(_),_}async function an(e,t,o,n){dn(e),o=new URLSearchParams(o);const r=Ho(e),i=r.as,a=r.c,s=r.auth,c=r.fetch,l=r.tlsOnly,d=r.nonRepudiation,u=r.timeout,p=r.decrypt,m=await async function(e,t,o,n,r){ye(e),ve(t),de(n,'"refreshToken"');const i=new URLSearchParams(null==r?void 0:r.additionalParameters);return i.set("refresh_token",n),We(e,t,o,"refresh_token",i,r)}(i,a,s,t,{[V]:c,[j]:!l,additionalParameters:o,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Mo),signal:un(u)}).catch(Yo),f=async function(e,t,o,n){return Xe(e,t,o,void 0,null==n?void 0:n[z],null==n?void 0:n.recognizedTokenTypes)}(i,a,m,{[z]:p});let g;try{g=await f}catch(r){if(mn(r,n))return an(e,t,o,h(h({},n),{},{flag:hn}));Yo(r)}return g.id_token&&await(null==d?void 0:d(m)),Qo(g),g}async function sn(e,t,o){dn(e),t=new URLSearchParams(t);const n=Ho(e),r=n.as,i=n.c,a=n.auth,s=n.fetch,c=n.tlsOnly,l=n.timeout,d=await async function(e,t,o,n,r){return ye(e),ve(t),We(e,t,o,"client_credentials",new URLSearchParams(n),r)}(r,i,a,t,{[V]:s,[j]:!c,DPoP:null==o?void 0:o.DPoP,headers:new Headers(Mo),signal:un(l)}).catch(Yo),u=async function(e,t,o){return Xe(e,t,o,void 0,void 0,void 0)}(r,i,d);let p;try{p=await u}catch(n){if(mn(n,o))return sn(e,t,h(h({},o),{},{flag:hn}));Yo(n)}return Qo(p),p}function cn(e,t){dn(e);const o=Ho(e),n=o.as,r=o.c,i=o.tlsOnly,a=o.hybrid,s=o.jarm,c=o.implicit,l=_e(n,"authorization_endpoint",!1,i);if((t=new URLSearchParams(t)).has("client_id")||t.set("client_id",r.client_id),!t.has("request_uri")&&!t.has("request")){if(t.has("response_type")||t.set("response_type",a?"code id_token":c?"id_token":"code"),c&&!t.has("nonce"))throw Xo("response_type=id_token clients must provide a nonce parameter in their authorization request parameters",Ko);s&&t.set("response_mode","jwt")}for(const e of t.entries()){var d=g(e,2);const t=d[0],o=d[1];l.searchParams.append(t,o)}return l}async function ln(e,t,o){dn(e);const n=cn(e,t),r=Ho(e),i=r.as,a=r.c,s=r.auth,c=r.fetch,l=r.tlsOnly,d=r.timeout,u=await async function(e,t,o,n,r){var i;ye(e),ve(t);const a=_e(e,"pushed_authorization_request_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==r?void 0:r[j])),s=new URLSearchParams(n);s.set("client_id",t.client_id);const c=ae(null==r?void 0:r.headers);c.set("accept","application/json"),void 0!==(null==r?void 0:r.DPoP)&&(xe(r.DPoP),await r.DPoP.addProof(a,c,"POST"));const l=await Ge(e,t,o,a,s,c,r);return null==r||null===(i=r.DPoP)||void 0===i||i.cacheNonce(l,a),l}(i,a,s,n.searchParams,{[V]:c,[j]:!l,DPoP:null==o?void 0:o.DPoP,headers:new Headers(Mo),signal:un(d)}).catch(Yo),p=async function(e,t,o){if(ye(e),ve(t),!G(o,Response))throw K('"response" must be an instance of Response',F);await Me(o,201,"Pushed Authorization Request Endpoint"),wt(o);const n=await Nt(o);de(n.request_uri,'"response" body "request_uri" property',lt,{body:n});let r="number"!=typeof n.expires_in?parseFloat(n.expires_in):n.expires_in;return le(r,!0,'"response" body "expires_in" property',lt,{body:n}),n.expires_in=r,n}(i,a,u);let m;try{m=await p}catch(n){if(mn(n,o))return ln(e,t,h(h({},o),{},{flag:hn}));Yo(n)}return cn(e,{request_uri:m.request_uri})}function dn(e){if(!(e instanceof qo))throw Xo('"config" must be an instance of Configuration',jo);if(Object.getPrototypeOf(e)!==qo.prototype)throw Xo("subclassing Configuration is not allowed",Ko)}function un(e){return e?AbortSignal.timeout(1e3*e):void 0}async function pn(e,t,o,n){dn(e);const r=Ho(e),i=r.as,a=r.c,s=r.fetch,c=r.tlsOnly,l=r.nonRepudiation,d=r.timeout,u=r.decrypt,p=await async function(e,t,o,n){ye(e),ve(t);const r=_e(e,"userinfo_endpoint",t.use_mtls_endpoint_aliases,!0!==(null==n?void 0:n[j])),i=ae(null==n?void 0:n.headers);return t.userinfo_signed_response_alg?i.set("accept","application/jwt"):(i.set("accept","application/json"),i.append("accept","application/jwt")),async function(e,t,o,n,r,i){var a;if(de(e,'"accessToken"'),!(o instanceof URL))throw K('"url" must be an instance of URL',F);be(o,!0!==(null==i?void 0:i[j])),n=ae(n),null!=i&&i.DPoP&&(xe(i.DPoP),await i.DPoP.addProof(o,n,"GET".toUpperCase(),e)),n.set("authorization","".concat(n.has("dpop")?"DPoP":"Bearer"," ").concat(e));const s=await((null==i?void 0:i[V])||fetch)(o.href,{duplex:G(null,ReadableStream)?"half":void 0,body:null,headers:Object.fromEntries(n.entries()),method:"GET",redirect:"manual",signal:se(o,null==i?void 0:i.signal)}
5);return null==i||null===(a=i.DPoP)||void 0===a||a.cacheNonce(s,o),s}(o,0,r,i,0,h(h({},n),{},{[X]:he(t)}))}(i,a,t,{[V]:s,[j]:!c,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Mo),signal:un(d)}).catch(Yo);let m,f=Ue(i,a,o,p,{[z]:u});try{m=await f}catch(r){if(mn(r,n))return pn(e,t,o,h(h({},n),{},{flag:hn}));Yo(r)}return"application/jwt"===Be(p)&&await(null==l?void 0:l(p)),m}function mn(e,t){return!(null==t||!t.DPoP||t.flag===hn)&&function(e){if(e instanceof Ce){const t=e.cause,o=t[0];return 1===t.length&&"dpop"===o.scheme&&"use_dpop_nonce"===o.parameters.error}return e instanceof Te&&"use_dpop_nonce"===e.error}(e)}Object.freeze(qo.prototype);const hn=Symbol();async function fn(e,t,o,n){dn(e);const r=Ho(e),i=r.as,a=r.c,s=r.auth,c=r.fetch,l=r.tlsOnly,d=r.timeout,u=r.decrypt,p=r.nonRepudiation,m=await async function(e,t,o,n,r,i){return ye(e),ve(t),de(n,'"grantType"'),We(e,t,o,n,new URLSearchParams(r),i)}(i,a,s,t,new URLSearchParams(o),{[V]:c,[j]:!l,DPoP:null==n?void 0:n.DPoP,headers:new Headers(Mo),signal:un(d)}).catch(Yo);let f;"urn:ietf:params:oauth:grant-type:token-exchange"===t&&(f={n_a:()=>{}});const g=async function(e,t,o,n){return Xe(e,t,o,void 0,null==n?void 0:n[z],null==n?void 0:n.recognizedTokenTypes)}(i,a,m,{[z]:u,recognizedTokenTypes:f});let y;try{y=await g}catch(r){if(mn(r,n))return fn(e,t,o,h(h({},n),{},{flag:hn}));Yo(r)}return y.id_token&&await(null==p?void 0:p(m)),Qo(y),y}async function gn(e,t,o){return t instanceof Uint8Array?crypto.subtle.importKey("raw",t,e.subtle,!1,[o]):(function(e,t,o){var n;const r=e.algorithm;if(r.name!==t.name)throw xt(t.name);if(t.hash&&(null===(n=r.hash)||void 0===n?void 0:n.name)!==t.hash)throw xt(t.hash,"algorithm.hash");if(t.namedCurve&&r.namedCurve!==t.namedCurve)throw xt(t.namedCurve,"algorithm.namedCurve");if(void 0!==t.length&&r.length!==t.length)throw xt(t.length,"algorithm.length");!function(e,t){if(t&&!e.usages.includes(t))throw new TypeError("CryptoKey does not support this operation, its usages must include ".concat(t,"."))}(e,o)}(t,e.subtle,o),e.minRsaBits&&function(e,t){const o=t.algorithm.modulusLength;if("number"!=typeof o||o<2048)throw new TypeError("".concat(e," requires key modulusLength to be 2048 bits or larger"))}(e.alg,t),t)}const yn=[["verify"],["sign"]];function vn(e){const t={name:"HMAC",hash:"SHA-".concat(e)};return{kty:["oct"],secret:!0,subtle:t,signing:t,usages:yn}}function An(e,t){const o={name:t?"RSA-PSS":"RSASSA-PKCS1-v1_5",hash:"SHA-".concat(e)};return{kty:["RSA"],subtle:o,signing:t?h(h({},o),{},{saltLength:t}):o,usages:yn,minRsaBits:2048}}function wn(e,t){return{kty:["EC"],crv:e,subtle:{name:"ECDSA",namedCurve:e},signing:{name:"ECDSA",hash:"SHA-".concat(t)},usages:yn}}function Sn(){const e={name:"Ed25519"};return{kty:["OKP"],crv:"Ed25519",subtle:e,signing:e,usages:yn}}function bn(e){const t={name:"ML-DSA-".concat(e)};return{kty:["AKP"],subtle:t,signing:t,usages:yn}}const En=vo({HS256:vn(256),HS384:vn(384),HS512:vn(512),RS256:An(256),RS384:An(384),RS512:An(512),PS256:An(256,32),PS384:An(384,48),PS512:An(512,64),ES256:wn("P-256",256),ES384:wn("P-384",384),ES512:wn("P-521",512),EdDSA:Sn(),Ed25519:Sn(),"ML-DSA-44":bn(44),"ML-DSA-65":bn(65),"ML-DSA-87":bn(87)});function _n(e){const t="string"==typeof e?En[e]:void 0;if(!t)throw new Ft("alg ".concat(e," is not supported either by JOSE or your javascript runtime"));return t}async function Tn(e,t,o){if(e instanceof Uint8Array&&(e=kt.decode(e)),"string"!=typeof e)throw new Kt("Compact JWS must be a string or Uint8Array");const n=e.split("."),r=n[0],i=n[1],a=n[2];if(3!==n.length)throw new Kt("Invalid Compact JWS");const s={payload:i,protected:r,signature:a},c=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0===e?{}:function(e,t,o){let n;try{n=JSON.parse(Dt.decode($t(e)))}catch(e){throw new t(o)}if(!to(n))throw new t(o);return n}(e,Kt,"JWS Protected Header is invalid");return t}(r),l=function(e,t,o){const n=ko(e,Po(Kt,Oo,o[1],e,t)),r=t.alg;if("string"!=typeof r||!r)throw new Kt('JWS "alg" (Algorithm) Header Parameter missing or invalid');if(o[0]&&!o[0].has(r))throw new Wt('"alg" (Algorithm) Header Parameter value not allowed');return[n,r]}(c,c,t),d=g(l,2),u=d[0],p=d[1],m=u?i:function(e){try{return Mt(e)}catch(e){throw new Kt("JWS Compact Serialization payload must use only ASCII characters")}}(i);return async function(e,t,o,n,r,i,a){var s;let c=!1;"function"==typeof o&&(o=await o(r,e),c=!0);const l="string"==typeof a,d=_n(i),u=Lt(void 0!==n?Mt(n):new Uint8Array,Mt("."),l?null!==(s=t[2])&&void 0!==s?s:t[2]=function(e,t,o){try{return Mt(e)}catch(e){throw new o("The ".concat("payload"," is not a valid base64url string"))}}(a,0,Kt):a),p=no(e.signature,"signature",Kt),m=await yo(d,o,"verify");if(!await async function(e,t,o,n){const r=await gn(e,t,"verify");try{return await crypto.subtle.verify(e.signing,r,o,n)}catch(e){return!1}}(d,m,p,u))throw new zt;return[l?no(a,"payload",Kt):a,r,l,m,c]}(s,t,o,r,c,p,m)}const Rn=e=>Math.floor(e.getTime()/1e3),Cn={s:1,m:60,h:3600,d:86400,w:604800,y:31557600},Nn=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,On="check_failed";function In(){throw new TypeError("Invalid time period format")}function Pn(e){"string"!=typeof e&&In();const t=Nn.exec(e);(!t||t[4]&&t[1])&&In();const o=parseFloat(t[2]),n=Math.round(o*Cn[t[3][0].toLowerCase()]);return Number.isFinite(n)||In(),"-"===t[1]||"ago"===t[4]?-n:n}function kn(e,t){if(!Number.isFinite(t))throw new TypeError("Invalid ".concat(e," input"));return t}function Dn(e,t){if("string"!=typeof t)throw new TypeError('"'.concat(e,'" claim must be a string'))}function Ln(e,t){return"number"==typeof e?kn(t,e):e instanceof Date?kn(t,Rn(e)):Rn(new Date)+Pn(e)}const Mn=e=>{const t=e.toLowerCase();return e.includes("/")?t:"application/".concat(t)};function xn(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=e[t];if(void 0!==n||o){if("number"!=typeof n)throw new Ut('"'.concat(t,'" claim must be a number'),e,t,"invali
5d");return n}}function Hn(e,t){throw new Ut('unexpected "'.concat(t,'" claim value'),e,t,On)}function Bn(e,t){let o,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{o=JSON.parse(Dt.decode(t))}catch(e){}if(!to(o))throw new jt("JWT Claims Set must be a top-level JSON object");const r=n.typ;if(void 0!==r&&("string"!=typeof e.typ||Mn(e.typ)!==Mn(r)))throw new Ut('unexpected "typ" JWT header value',o,"typ",On);const i=n.requiredClaims,a=void 0===i?[]:i,s=n.issuer,c=n.subject,l=n.audience,d=n.maxTokenAge,u=[...a];void 0!==d&&u.push("iat"),void 0!==l&&u.push("aud"),void 0!==c&&u.push("sub"),void 0!==s&&u.push("iss");for(const e of new Set(u.reverse()))if(!Object.hasOwn(o,e))throw new Ut('missing required "'.concat(e,'" claim'),o,e,"missing");var p,m;void 0===s||(Array.isArray(s)?s:[s]).includes(o.iss)||Hn(o,"iss"),void 0!==c&&o.sub!==c&&Hn(o,"sub"),void 0===l||(m="string"==typeof l?[l]:l,"string"==typeof(p=o.aud)?m.includes(p):Array.isArray(p)&&m.some(e=>p.includes(e)))||Hn(o,"aud");const h=n.clockTolerance;let f=0;if("string"==typeof h)f=Pn(h);else if(void 0!==h){if("number"!=typeof h)throw new TypeError("Invalid clockTolerance option type");f=h}kn("clockTolerance option",f);const g=n.currentDate,y=kn("currentDate option",Rn(void 0===g?new Date:g)),v=xn(o,"iat",void 0!==d),A=xn(o,"nbf");if(void 0!==A&&A>y+f)throw new Ut('"nbf" claim timestamp check failed',o,"nbf",On);const w=xn(o,"exp");if(void 0!==w&&w<=y-f)throw new Gt('"exp" claim timestamp check failed',o,"exp",On);if(void 0!==d){const e=y-v;if(e-f>kn("maxTokenAge option","number"==typeof d?d:Pn(d)))throw new Gt('"iat" claim timestamp check failed (too far in the past)',o,"iat",On);if(e<-f)throw new Ut('"iat" claim timestamp check failed (it should be in the past)',o,"iat",On)}return o}let Un;function Gn(e){return Un.get(e)}async function Wn(e,t,o,n,r){const i=g(function(e){if(void 0===e)return[void 0,""];const t=function(e,t){let o,n;try{o=JSON.stringify(t),n=JSON.parse(o)}catch(t){throw new e("JOSE Header is not valid JSON",{cause:t})}if(!to(n))throw new e("JOSE Header is not a JSON object");return[n,o]}(Kt,e);return[t[0],eo(t[1])]}(t),2),a=i[0],s=i[1];if(!a)throw new Kt("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");(function(e,t,o){return function(e,t){const o=(null!=t?t:{}).crit;if(Array.isArray(o)&&new Set(o).size!==o.length)throw new e('"crit" (Critical) Header Parameter MUST NOT contain duplicate values')}(Kt,e),ko(e,Po(Kt,Oo,o,e,t))})(a,a,o)||r();const c=function(e){const t=e.alg;if("string"!=typeof t||!t)throw new Kt('JWS "alg" (Algorithm) Header Parameter missing or invalid');return _n(t)}(a),l=eo(e),d=await async function(e,t,o,n){const r=Lt(Mt(e),Mt("."),t),i=await yo(o,n,"sign");return eo(await async function(e,t,o){const n=await gn(e,t,"sign"),r=await crypto.subtle.sign(e.signing,n,o);return new Uint8Array(r)}(o,i,r))}(s,Mt(l),c,n);return"".concat(s,".").concat(l,".").concat(d)}const Fn=class{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!to(e))throw new TypeError("JWT Claims Set MUST be an object");(Un||(Un=new WeakMap)).set(this,structuredClone(e))}setIssuer(e){return Dn("iss",e),Gn(this).iss=e,this}setSubject(e){return Dn("sub",e),Gn(this).sub=e,this}setAudience(e){return function(e){if("string"!=typeof e&&(!Array.isArray(e)||Array.from(e).some(e=>"string"!=typeof e)))throw new TypeError('"aud" claim must be a string or an array of strings')}(e),Gn(this).aud=e,this}setJti(e){return Dn("jti",e),Gn(this).jti=e,this}setNotBefore(e){return Gn(this).nbf=Ln(e,"setNotBefore"),this}setExpirationTime(e){return Gn(this).exp=Ln(e,"setExpirationTime"),this}setIssuedAt(e){return Gn(this).iat=void 0===e?Rn(new Date):"string"==typeof e?kn("setIssuedAt",Rn(new Date)+Pn(e)):Ln(e,"setIssuedAt"),this}};var Kn=new WeakMap;class jn extends Fn{constructor(){super(...arguments),l(this,Kn,void 0)}setProtectedHeader(e){return function(e){if(void 0!==e)throw new TypeError("".concat("setProtectedHeader"," can only be called once"))}(c(Kn,this)),d(Kn,this,e),this}async sign(e,t){return Wn(function(e){const t=Gn(e);for(const e of["iat","nbf","exp"]){const o=t[e];if("number"==typeof o&&!Number.isFinite(o))throw new TypeError('"'.concat(e,'" claim must be a finite number'))}return Pt.encode(JSON.stringify(t))}(this),c(Kn,this),null==t?void 0:t.crit,e,()=>{throw new jt("JWTs MUST NOT use unencoded payload")})}}const Xn='"alg" (Algorithm)';function Jn(){throw new Ft("Invalid or unsupported ".concat(arguments.length>0&&void 0!==arguments[0]?arguments[0]:'JWK "alg" (Algorithm) Parameter'," value"))}const Vn=(e,t)=>{if(e.byteLength!==t.length)return!1;for(let o=0;o<e.byteLength;o++)if(e[o]!==t[o])return!1;return!0},Yn=e=>{const t=e.data[e.pos++];if(void 0===t)throw new Error("Unexpected end of ASN.1 input");return t},zn=e=>{const t=Yn(e);if(128&t){const o=127&t;let n=0;for(let t=0;t<o;t++)n=n<<8|Yn(e);return n}return t},Zn=(e,t,o)=>{if(Yn(e)!==t)throw new Error(o)},qn=(e,t)=>{if(t<0||e.pos+t>e.data.length)throw new Error("Unexpected end of ASN.1 input");const o=e.data.subarray(e.pos,e.pos+t);return e.pos+=t,o},Qn=e=>{const t=(e=>{Zn(e,6,"Expected algorithm OID");const t=zn(e);return qn(e,t)})(e);if(Vn(t,[43,101,110]))return"X25519";if(!Vn(t,[42,134,72,206,61,2,1]))throw new Error("Unsupported key algorithm");Zn(e,6,"Expected curve OID");const o=zn(e),n=qn(e,o);if(Vn(n,[42,134,72,206,61,3,1,7]))return"P-256";if(Vn(n,[43,129,4,0,34]))return"P-384";if(Vn(n,[43,129,4,0,35]))return"P-521";throw new Error("Unsupported named curve")},$n=(e,t,o)=>{const n=(e=>
5qt(e.replace(/(?:-----(?:BEGIN|END) PRIVATE KEY-----|\s)/g,"")))(e);return(async(e,t,o,n)=>{const r=function(e){if(void 0!==e&&"boolean"!=typeof e)throw new TypeError('"extractable" option must be a boolean');return e}(null==n?void 0:n.extractable),i=function(e,t){var o,n;return null!==(o="string"==typeof e?null!==(n=En[e])&&void 0!==n?n:Ro[e]:void 0)&&void 0!==o?o:Jn(t)}(o,Xn);i.secret&&Jn(Xn);const a="spki"===e;let s;if(i.resolve)try{const o={data:t,pos:0};!function(e,t){if(Zn(e,48,"Invalid ".concat("spki"===t?"SPKI":"PKCS#8"," structure")),zn(e),"pkcs8"===t){Zn(e,2,"Expected version field");const t=zn(e);e.pos+=t}Zn(e,48,"Expected algorithm identifier"),zn(e)}(o,e),s=i.resolve({crv:Qn(o)})}catch(e){throw new Ft("Invalid or unsupported key format")}else s=i.subtle;return crypto.subtle.importKey(e,t,s,null!=r?r:a,i.usages[a?0:1])})("pkcs8",n,t,o)};async function er(e,t,o){const n=e.get(t)||e.set(t,{}).get(t),r=o.alg;if(void 0===n[r]){const e=await ro(o,h(h({},t),{},{alg:r,ext:!0}));if("public"!==e.type)throw new Xt("JSON Web Key Set members must be public keys");n[r]=e}return n[r]}function tr(e){let t;try{t=structuredClone(e)}catch(e){}if(!oo(t))throw new Xt("JSON Web Key Set malformed");const o=new WeakMap;return Object.defineProperty(async(e,n)=>{const r=h(h({},e),null==n?void 0:n.header),i=r.alg,s=r.kid,c="string"==typeof i?En[i]:void 0;if(!c||c.secret)throw new Ft('Unsupported "alg" value for a JSON Web Key Set');const l=t.keys.filter(e=>function(e,t,o,n){const r=io(e),i=r.kty,a=r.key_ops,s=r.ext,c=r.kid,l=r.alg,d=r.use,u=r.crv,p=Array.isArray(a)?[...a]:a;return(void 0===s||"boolean"==typeof s)&&(void 0===p||Array.isArray(p)&&p.every((e,t)=>"string"==typeof e&&p.indexOf(e)===t)&&p.includes("verify"))&&t.kty.includes(i)&&(void 0===n||"string"==typeof n&&n===c)&&(void 0===l?"AKP"!==i:o===l)&&(void 0===d||"sig"===d)&&(!t.crv||u===t.crv)}(e,c,i,s)),d=l[0],u=l.length;if(!u)throw new Jt;if(1!==u){const e=new Vt;throw e[Symbol.asyncIterator]=y(function*(){for(const e of l)try{yield yield a(er(o,e,c))}catch(e){}}),e}return er(o,d,c)},"jwks",{value:()=>structuredClone(t)})}var or,nr;let rr;if("undefined"==typeof navigator||null===(or=navigator.userAgent)||void 0===or||null===(nr=or.startsWith)||void 0===nr||!nr.call(or,"Mozilla/5.0 ")){const e="v6.2.10";rr="".concat("jose","/").concat(e)}const ir=Symbol(),ar=Symbol();function sr(e,t){return Number.isFinite(e)&&Date.now()<e+t}function cr(e,t,o){if(Number.isNaN(e))throw new TypeError('"'.concat(o,'" option must not be NaN'));return"number"==typeof e?e:t}async function lr(e,t,o){if("string"!=typeof e||0!==e.indexOf("-----BEGIN PRIVATE KEY-----"))throw new TypeError('"pkcs8" must be PKCS#8 formatted string');return $n(e,t,o)}const dr=["mfaToken"],ur=["mfaToken"];var pr,mr,hr,fr,gr,yr,vr,Ar,wr,Sr,br,Er,_r,Tr,Rr,Cr,Nr,Or,Ir,Pr,kr,Dr,Lr,Mr,xr,Hr,Br,Ur,Gr,Wr,Fr,Kr,jr,Xr,Jr,Vr,Yr,zr,Zr,qr,Qr,$r,ei,ti,oi,ni,ri,ii,ai,si,ci,li;function di(e){if("object"!=typeof e||null===e)return{};const t=e;return{statusCode:"number"==typeof t.statusCode?t.statusCode:void 0,headers:t.headers instanceof Headers?t.headers:void 0,body:"string"==typeof t.body?t.body:void 0}}function ui(e){var t,o;if("object"!=typeof e||null===e)return{error:"unknown_error",error_description:String(e)};const n=e;let r;if(n.response instanceof Response)try{r=new Headers(n.response.headers),r.delete("set-cookie")}catch(e){r=void 0}const i={error:null!==(t=n.error)&&void 0!==t?t:"",error_description:null!==(o=n.error_description)&&void 0!==o?o:"",message:n.message,statusCode:"number"==typeof n.status?n.status:void 0,headers:r};if("mfa_required"===n.error&&n.cause){i.mfa_token="string"==typeof n.cause.mfa_token?n.cause.mfa_token:void 0;const e=n.cause.mfa_requirements;"object"==typeof e&&null!==e&&(i.mfa_requirements=e)}return i}var pi=class extends Error{constructor(e,t){super(t),p(this,"code",void 0),this.name="NotSupportedError",this.code=e}},mi=class extends Error{constructor(e,t,o){super(t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"statusCode",void 0),p(this,"headers",void 0),p(this,"body",void 0),this.code=e,this.cause=o&&{error:o.error,error_description:o.error_description,message:o.message,mfa_token:o.mfa_token,mfa_requirements:o.mfa_requirements};const n=di(o);this.statusCode=n.statusCode,this.headers=n.headers,this.body=n.body}},hi=class extends mi{constructor(e,t){super("token_by_code_error",e,t),this.name="TokenByCodeError"}},fi=class extends mi{constructor(e,t){super("token_by_client_credentials_error",e,t),this.name="TokenByClientCredentialsError"}},gi=class extends mi{constructor(e,t){super("token_by_refresh_token_error",e,t),this.name="TokenByRefreshTokenError"}},yi=class extends mi{constructor(e,t){super("token_by_password_error",e,t),this.name="TokenByPasswordError"}},vi=class extends mi{constructor(e,t){super("token_for_connection_error",e,t),this.name="TokenForConnectionErrorCode"}},Ai=class extends mi{constructor(e,t){super("token_exchange_error",e,t),this.name="TokenExchangeError"}},wi=class extends mi{constructor(e,t){super("token_revocation_error",e,t),this.name="TokenRevocationError"}},Si=class extends mi{constructor(e,t){super("user_info_error",e,t),this.name="UserInfoError"}}
5,bi=class extends Error{constructor(e){super(e),p(this,"code","verify_logout_token_error"),this.name="VerifyLogoutTokenError"}},Ei=class extends mi{constructor(e){super("backchannel_authentication_error","There was an error when trying to use Client-Initiated Backchannel Authentication.",e),p(this,"code","backchannel_authentication_error"),this.name="BackchannelAuthenticationError"}},_i=class extends mi{constructor(e){super("build_authorization_url_error","There was an error when trying to build the authorization URL.",e),this.name="BuildAuthorizationUrlError"}},Ti=class extends mi{constructor(e){super("build_link_user_url_error","There was an error when trying to build the Link User URL.",e),this.name="BuildLinkUserUrlError"}},Ri=class extends mi{constructor(e){super("build_unlink_user_url_error","There was an error when trying to build the Unlink User URL.",e),this.name="BuildUnlinkUserUrlError"}},Ci=class extends Error{constructor(){super("The client secret or client assertion signing key must be provided."),p(this,"code","missing_client_auth_error"),this.name="MissingClientAuthError"}},Ni=class extends Error{constructor(e){super(e),p(this,"code","organization_validation_error"),this.name="OrganizationValidationError"}},Oi=class extends Error{constructor(e){super(e||"fullResponse: true requested but no HTTP Response was captured. This is a bug in CapturingFetch."),p(this,"code","missing_captured_response_error"),this.name="MissingCapturedResponseError"}};function Ii(e){try{const t=new Headers(e);return t.delete("set-cookie"),t}catch(e){return new Headers}}function Pi(e,t,o){var n;const r="object"==typeof t&&null!==t?t:void 0,i=null!==(n=null==r?void 0:r.response)&&void 0!==n?n:o,a="number"==typeof(null==r?void 0:r.status)?r.status:null==i?void 0:i.status;"number"==typeof a&&(e.statusCode=a),null!=i&&i.headers&&(e.headers=Ii(i.headers))}function ki(e){return Object.entries(e).filter(e=>void 0!==g(e,2)[1]).reduce((e,t)=>h(h({},e),{},{[t[0]]:t[1]}),{})}function Di(e){if(!e.trim())throw new Ni("organization must not be blank")}function Li(e,t){if(!e)return;const o=t.trim();if(o.startsWith("org_")){const t=e.org_id;if("string"!=typeof t)throw new Ni("Organization Id (org_id) claim must be a string present in the ID token");if(t!==o)throw new Ni('Organization Id (org_id) claim value mismatch in the ID token; expected "'.concat(o,'", found "').concat(t,'"'))}else{const t=e.org_name;if("string"!=typeof t)throw new Ni("Organization Name (org_name) claim must be a string present in the ID token");if(t.toLowerCase()!==o.toLowerCase())throw new Ni('Organization Name (org_name) claim value mismatch in the ID token; expected "'.concat(o,'", found "').concat(t,'"'))}}var Mi=class extends Error{constructor(e,t,o){super(t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"statusCode",void 0),p(this,"headers",void 0),p(this,"body",void 0),this.code=e,this.cause=o&&{error:o.error,error_description:o.error_description,message:o.message};const n=di(o);this.statusCode=n.statusCode,this.headers=n.headers,this.body=n.body}},xi=class extends Mi{constructor(e,t){super("mfa_list_authenticators_error",e,t),this.name="MfaListAuthenticatorsError"}},Hi=class extends Mi{constructor(e,t){super("mfa_enrollment_error",e,t),this.name="MfaEnrollmentError"}},Bi=class extends Mi{constructor(e,t){super("mfa_delete_authenticator_error",e,t),this.name="MfaDeleteAuthenticatorError"}},Ui=class extends Mi{constructor(e,t){super("mfa_challenge_error",e,t),this.name="MfaChallengeError"}},Gi=class extends Mi{constructor(e,t){super("mfa_verify_error",e,t),this.name="MfaVerifyError"}};function Wi(e){return{id:e.id,authenticatorType:e.authenticator_type,active:e.active,name:e.name,oobChannels:e.oob_channels,type:e.type}}var Fi=class e{constructor(e,t,o,n,r,i,a){p(this,"accessToken",void 0),p(this,"idToken",void 0),p(this,"refreshToken",void 0),p(this,"expiresAt",void 0),p(this,"scope",void 0),p(this,"claims",void 0),p(this,"authorizationDetails",void 0),p(this,"tokenType",void 0),p(this,"issuedTokenType",void 0),p(this,"recoveryCode",void 0),p(this,"act",void 0),this.accessToken=e,this.idToken=o,this.refreshToken=n,this.expiresAt=t,this.scope=r,this.claims=i,this.authorizationDetail
5s=a}static fromTokenEndpointResponse(t){const o=t.id_token?t.claims():void 0,n=new e(t.access_token,Math.floor(Date.now()/1e3)+Number(t.expires_in),t.id_token,t.refresh_token,t.scope,o,t.authorization_details);return n.tokenType=t.token_type,n.issuedTokenType=t.issued_token_type,n}};function Ki(e,t){if(!1===t.enabled)return e;const o={name:t.name,version:t.version},n=btoa(JSON.stringify(o));return async(t,o)=>{const r=t instanceof Request?new Headers(t.headers):new Headers;return null!=o&&o.headers&&new Headers(o.headers).forEach((e,t)=>{r.set(t,e)}),r.set("Auth0-Client",n),e(t,h(h({},o),{},{headers:r}))}}function ji(e){var t,o;return!1===(null==e?void 0:e.enabled)?e:{enabled:!0,name:null!==(t=null==e?void 0:e.name)&&void 0!==t?t:"@auth0/auth0-auth-js",version:null!==(o=null==e?void 0:e.version)&&void 0!==o?o:"1.15.0"}}function Xi(e){let t;const o=async(o,n)=>{const r=await e(o,n);return t=r.clone(),r};return o.getCapturedResponse=()=>t,o}function Ji(e,t,o){if(!t)return e;const n=t.signal,r=t.headers,i=t.customFetch,a=i?Ki(i,o):e;return n||r?async(e,t)=>{const o=r?new Headers(e instanceof Request?e.headers:void 0):void 0;if(o&&null!=t&&t.headers&&new Headers(t.headers).forEach((e,t)=>o.set(t,e)),r)for(const e of Object.entries(r)){var i=g(e,2);const t=i[0],n=i[1],r=t.toLowerCase();"authorization"!==r&&"auth0-client"!==r&&o.set(t,n)}const s=function(e,t){if(!e)return{signal:null!=t?t:void 0};if(!t)return{signal:e};if("undefined"!=typeof AbortSignal&&"function"==typeof AbortSignal.any)return{signal:AbortSignal.any([e,t])};const o=new AbortController,n=[e,t],r=n.find(e=>e.aborted);if(r)return o.abort(r.reason),{signal:o.signal};const i=[],a=()=>{n.forEach((e,t)=>{const o=i[t];o&&e.removeEventListener("abort",o)})};return n.forEach((e,t)=>{const n=()=>{a(),o.abort(e.reason)};i[t]=n,e.addEventListener("abort",n,{once:!0})}),{signal:o.signal,cleanup:a}}(n,null==t?void 0:t.signal);try{return await a(e,h(h(h({},t),o&&{headers:o}),{},{signal:s.signal}))}finally{var c;null===(c=s.cleanup)||void 0===c||c.call(s)}}:a}var Vi={otp:"http://auth0.com/oauth/grant-type/mfa-otp",oob:"http://auth0.com/oauth/grant-type/mfa-oob","recovery-code":"http://auth0.com/oauth/grant-type/mfa-rec
5overy-code"},Yi=(pr=new WeakMap,mr=new WeakMap,hr=new WeakMap,fr=new WeakMap,gr=new WeakMap,yr=new WeakMap,vr=new WeakMap,Ar=new WeakSet,class{constructor(e){var t,o;u(this,Ar),l(this,pr,void 0),l(this,mr,void 0),l(this,hr,void 0),l(this,fr,void 0),l(this,gr,void 0),l(this,yr,void 0),l(this,vr,void 0),d(pr,this,"https://".concat(e.domain)),d(mr,this,e.clientId),d(hr,this,e.clientSecret),d(fr,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),d(gr,this,null!==(o=e.telemetryConfig)&&void 0!==o?o:ji()),d(yr,this,e.getConfiguration),d(vr,this,e.createCaptureConfiguration)}async listAuthenticators(e,t){const o="".concat(c(pr,this),"/mfa/authenticators"),n=e.mfaToken,r=await i(Ar,this,zi).call(this,t)(o,{method:"GET",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!r.ok){const e=await r.clone().text(),t=r.status,o=Ii(r.headers);let i;try{i=JSON.parse(e)}catch(n){throw new xi("Failed to list authenticators",{error:"unknown_error",error_description:"Failed to list authenticators",statusCode:t,headers:o,body:e})}throw new xi(i.error_description||"Failed to list authenticators",h(h({},i),{},{statusCode:t,headers:o,body:e}))}return(await r.json()).map(Wi)}async enrollAuthenticator(e,t){const o="".concat(c(pr,this),"/mfa/associate"),n=e.mfaToken,r=f(e,dr),a={authenticator_types:r.authenticatorTypes};"oobChannels"in r&&(a.oob_channels=r.oobChannels),"phoneNumber"in r&&r.phoneNumber&&(a.phone_number=r.phoneNumber),"email"in r&&r.email&&(a.email=r.email);const s=await i(Ar,this,zi).call(this,t)(o,{method:"POST",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok){const e=await s.clone().text(),t=s.status,o=Ii(s.headers);let r;try{r=JSON.parse(e)}catch(n){throw new Hi("Failed to enroll authenticator",{error:"unknown_error",error_description:"Failed to enroll authenticator",statusCode:t,headers:o,body:e})}throw new Hi(r.error_description||"Failed to enroll authenticator",h(h({},r),{},{statusCode:t,headers:o,body:e}))}return function(e){if("otp"===e.authenticator_type)return{authenticatorType:"otp",secret:e.secret,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes,id:e.id};if("oob"===e.authenticator_type)return{authenticatorType:"oob",oobChannel:e.oob_channel,oobCode:e.oob_code,bindingMethod:e.binding_method,id:e.id,barcodeUri:e.barcode_uri,recoveryCodes:e.recovery_codes};throw new Error("Unexpected authenticator type: ".concat(e.authenticator_type))}(await s.json())}async deleteAuthenticator(e,t){const o=e.authenticatorId,n=e.mfaToken,r="".concat(c(pr,this),"/mfa/authenticators/").concat(encodeURIComponent(o)),a=await i(Ar,this,zi).call(this,t)(r,{method:"DELETE",headers:{Authorization:"Bearer ".concat(n),"Content-Type":"application/json"}});if(!a.ok){const e=await a.clone().text(),t=a.status,o=Ii(a.headers);let r;try{r=JSON.parse(e)}catch(n){throw new Bi("Failed to delete authenticator",{error:"unknown_error",error_description:"Failed to delete authenticator",statusCode:t,headers:o,body:e})}throw new Bi(r.error_description||"Failed to delete authenticator",h(h({},r),{},{statusCode:t,headers:o,body:e}))}}async challengeAuthenticator(e,t){const o="".concat(c(pr,this),"/mfa/challenge"),n=e.mfaToken,r=f(e,ur),a={mfa_token:n,client_id:c(mr,this),challenge_type:r.challengeType};c(hr,this)&&(a.client_secret=c(hr,this)),r.authenticatorId&&(a.authenticator_id=r.authenticatorId);const s=await i(Ar,this,zi).call(this,t)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!s.ok){const e=await s.clone().text(),t=s.status,o=Ii(s.headers);let r;try{r=JSON.parse(e)}catch(n){throw new Ui("Failed to challenge authenticator",{error:"unknown_error",error_description:"Failed to challenge authenticator",statusCode:t,headers:o,body:e})}throw new Ui(r.error_description||"Failed to challenge authenticator",h(h({},r),{},{statusCode:t,headers:o,body:e}))}return function(e){const t={challengeType:e.challenge_type};return void 0!==e.oob_code&&(t.oobCode=e.oob_code),void 0!==e.binding_method&&(t.bindingMethod=e.binding_method),t}(await s.json())}async verify(e,t){if(!c(yr,this))throw new Error("MFA verify requires a configuration provider (getConfiguration was not set)");const o={mfa_token:e.mfaToken};if(e.audience&&(o.audience=e.audience),"otp"===e.factorType?o.otp=e.otp:"oob"===e.factorType?(o.oob_code=e.oobCode,e.bindingCode&&(o.binding_code=e.bindingCode)):"recovery-code"===e.factorType&&(o.recovery_code=e.recoveryCode),e.fullResponse){var n;if(!c(vr,this))throw new Error("MFA verify fullResponse requires a capture-config factory (createCaptureConfiguration was not set)");const s=Xi(null!==(n=(await c(yr,this).call(this,t))[Fo])&&void 0!==n?n:fetch),l=await c(vr,this).call(this,s);try{const t=await fn(l,Vi[e.factorType],o),n=Fi.fromTokenEndpointResponse(t);
5t.recovery_code&&(n.recoveryCode=t.recovery_code);const r=s.getCapturedResponse();if(!r)throw new Oi;return{data:n,response:r}}catch(e){var r,i,a;if(e instanceof Oi)throw e;if(e instanceof Gi)throw e;const t=e,o=new Gi(t.error_description||t.message||"Failed to verify MFA challenge",{error:null!==(r=t.error)&&void 0!==r?r:"mfa_verify_error",error_description:null!==(i=null!==(a=t.error_description)&&void 0!==a?a:t.message)&&void 0!==i?i:"Failed to verify MFA challenge"});throw Pi(o,e,s.getCapturedResponse()),o}}const s=await c(yr,this).call(this,t);try{const t=await fn(s,Vi[e.factorType],o),n=Fi.fromTokenEndpointResponse(t);return t.recovery_code&&(n.recoveryCode=t.recovery_code),n}catch(e){var l,d,u;if(e instanceof Gi)throw e;const t=e,o=new Gi(t.error_description||t.message||"Failed to verify MFA challenge",{error:null!==(l=t.error)&&void 0!==l?l:"mfa_verify_error",error_description:null!==(d=null!==(u=t.error_description)&&void 0!==u?u:t.message)&&void 0!==d?d:"Failed to verify MFA challenge"});throw Pi(o,e),o}}});function zi(e){return Ji(c(fr,this),e,c(gr,this))}var Zi=class extends Error{constructor(e,t,o){super(t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"statusCode",void 0),p(this,"headers",void 0),p(this,"body",void 0),this.code=e,this.cause=o&&{error:o.error,error_description:o.error_description,message:o.message};const n=di(o);this.statusCode=n.statusCode,this.headers=n.headers,this.body=n.body}},qi=class extends Zi{constructor(e,t){super("passkey_register_error",e,t),this.name="PasskeyRegisterError"}},Qi=class extends Zi{constructor(e,t){super("passkey_challenge_error",e,t),this.name="PasskeyChallengeError"}},$i=class extends Zi{constructor(e,t){super("passkey_get_token_error",e,t),this.name="PasskeyGetTokenError",this.cause=t&&{error:t.error,error_description:t.error_description,message:t.message,mfa_token:t.mfa_token,mfa_requirements:t.mfa_requirements}}};function ea(e){return e.useMtls?{}:e.clientSecret?{client_secret:e.clientSecret}:{}}var ta="urn:okta:params:oauth:grant-type:webauthn",oa=(wr=new WeakMap,Sr=new WeakMap,br=new WeakMap,Er=new WeakMap,_r=new WeakMap,Tr=new WeakMap,Rr=new WeakSet,class{constructor(e){var t,o;u(this,Rr),l(this,wr,void 0),l(this,Sr,void 0),l(this,br,void 0),l(this,Er,void 0),l(this,_r,void 0),l(this,Tr,void 0),d(wr,this,"https://".concat(e.domain)),d(Sr,this,e.clientId),d(br,this,{clientSecret:e.clientSecret,useMtls:e.useMtls}),d(Er,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),d(_r,this,null!==(o=e.telemetryConfig)&&void 0!==o?o:ji()),d(Tr,this,e.grantRequest)}async register(e,t){const o="".concat(c(wr,this),"/passkey/register"),n=h(h(h(h(h(h(h(h({},e.email&&{email:e.email}),e.name&&{name:e.name}),e.phoneNumber&&{phone_number:e.phoneNumber}),e.username&&{username:e.username}),e.givenName&&{given_name:e.givenName}),e.familyName&&{family_name:e.familyName}),e.nickname&&{nickname:e.nickname}),e.picture&&{picture:e.picture}),r=h(h({client_id:c(Sr,this)},ea(c(br,this))),{},{user_profile:n});e.realm&&(r.realm=e.realm),e.organization&&(r.organization=e.organization),e.userMetadata&&(r.user_metadata=e.userMetadata);const a=await i(Rr,this,na).call(this,t)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!a.ok){const e=await i(Rr,this,ra).call(this,a),t=new qi(e.error_description||"Failed to request signup challenge",e);throw t.statusCode=a.status,t.headers=Ii(a.headers),t}return{authSession:(s=await a.json()).auth_session,authnParamsPublicKey:h({},s.authn_params_public_key)};var s}async challenge(e,t){const o="".concat(c(wr,this),"/passkey/challenge"),n=h({client_id:c(Sr,this)},ea(c(br,this)));null!=e&&e.realm&&(n.realm=e.realm),null!=e&&e.organization&&(n.organization=e.organization);const r=await i(Rr,this,na).call(this,t)(o,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!r.ok){const e=await i(Rr,this,ra).call(this,r),t=new Qi(e.error_description||"Failed to request login challenge",e);throw t.statusCode=r.status,t.headers=Ii(r.headers),t}return{authSession:(a=await r.json()).auth_session,authnParamsPublicKey:h({},a.authn_params_public_key)};var a}async getTokenByPasskey(e,t){void 0!==e.organization&&Di(e.organization);const o=new URLSearchParams({auth_session:e.authSession,authn_response:JSON.stringify(e.credential)});let n;e.realm&&o.append("realm",e.realm),e.scope&&o.append("scope",e.scope),e.audience&&o.append("audience",e.audie
5nce),e.organization&&o.append("organization",e.organization);try{n=await c(Tr,this).call(this,ta,o,t,e.fullResponse)}catch(e){if(e instanceof Oi)throw e;const t=ui(e),o=new $i(t.error_description||"Failed to exchange passkey credential for tokens.",t);throw Pi(o,e),o}if(e.fullResponse){const t=n;return e.organization&&Li(t.data.claims,e.organization),t}const r=n;return e.organization&&Li(r.claims,e.organization),r}});function na(e){return Ji(c(Er,this),e,c(_r,this))}async function ra(e){const t=await e.clone().text();try{return h(h({},JSON.parse(t)),{},{statusCode:e.status,headers:e.headers,body:t})}catch(o){return{error:"unknown_error",error_description:"HTTP ".concat(e.status," ").concat(e.statusText),statusCode:e.status,headers:e.headers,body:t}}}var ia=class extends Error{constructor(e,t,o){super(t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"statusCode",void 0),p(this,"headers",void 0),p(this,"body",void 0),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.cause=o&&(o.error||o.error_description)?{error:o.error,error_description:o.error_description,message:o.message,mfa_token:o.mfa_token,mfa_requirements:o.mfa_requirements}:void 0;const n=di(o);this.statusCode=n.statusCode,this.headers=n.headers,this.body=n.body}},aa=class extends ia{constructor(e,t){super("passwordless_start_error",e,t),this.name="PasswordlessStartError"}},sa=class extends ia{constructor(e,t){super("passwordless_verify_error",e,t),this.name="PasswordlessVerifyError"}},ca=class extends ia{constructor(e,t){super("passwordless_db_get_token_error",e,t),this.name="PasswordlessDbGetTokenError"}},la=class extends ia{constructor(e,t,o,n,r){super("passwordless_challenge_error",e,o),p(this,"statusCode",void 0),p(this,"validationErrors",void 0),this.name="PasswordlessChallengeError",this.statusCode=t,this.validationErrors=n,this.headers=null!=r?r:this.headers}};function da(e){return/^\+[1-9]\d{1,14}$/.test(e)}async function ua(e,t,o){if(e.useMtls)return{};if(e.clientAssertionSigningKey){var n;const r=null!==(n=e.clientAssertionSigningAlg)&&void 0!==n?n:"RS256",i=e.clientAssertionSigningKey instanceof CryptoKey?e.clientAssertionSigningKey:await lr(e.clientAssertionSigningKey,r);return{client_assertion:await new jn({}).setProtectedHeader({alg:r}).setIssuer(t).setSubject(t).setAudience("https://".concat(o,"/")).setJti(crypto.randomUUID()).setIssuedAt().setExpirationTime("".concat(120,"s")).sign(i),client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}}if(e.clientSecret)return{client_secret:e.clientSecret};throw new Ci}var pa=(Cr=new WeakMap,Nr=new WeakMap,Or=new WeakMap,Ir=new WeakMap,Pr=new WeakMap,kr=new WeakMap,Dr=new WeakMap,Lr=new WeakSet,class{constructor(e){var t,o;u(this,Lr),l(this,Cr,void 0),l(this,Nr,void 0),l(this,Or,void 0),l(this,Ir,void 0),l(this,Pr,void 0),l(this,kr,void 0),l(this,Dr,void 0),d(Nr,this,e.domain),d(Cr,this,"https://".concat(e.domain)),d(Or,this,e.clientId),d(Ir,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),d(Pr,this,null!==(o=e.telemetryConfig)&&void 0!==o?o:ji()),d(kr,this,{clientSecret:e.clientSecret,clientAssertionSigningKey:e.clientAssertionSigningKey,clientAssertionSigningAlg:e.clientAssertionSigningAlg,useMtls:e.useMtls}),d(Dr,this,e.grantRequest)}async sendEmail(e,t){const o=await i(Lr,this,ha).call(this,function(e){var t;const o=null!==(t=e.send)&&void 0!==t?t:"code",n={email:e.email,connection:"email",send:o};return"link"===o&&e.authParams&&(n.authParams=e.authParams),n}(e),"Failed to send passwordless email",e.language,t);if(e.fullResponse)return{data:void 0,response:o}}async sendSms(e,t){if(!da(e.phoneNumber))throw new aa("Phone number must be in E.164 format (e.g. +14155550100).");const o=await i(Lr,this,ha).call(this,function(e){return{phone_number:e.phoneNumber,connection:"sms"}}(e),"Failed to send passwordless SMS",e.language,t);if(e.fullResponse)return{data:void 0,response:o}}async challengeWithEmail(e,t){const o=function(e){var t;return{email:e.email,connection:e.connection,allow_signup:null!==(t=e.allowSignup)&&void 0!==t&&t}}(e);return i(Lr,this,fa).call(this,o,"Failed to request email OTP challenge",t)}async challengeWithPhoneNumber(e,t){if(!da(e.phoneNumber))throw new la("Phone number must be in E.164 format (e.g. +14155550100).",0,void 0,void 0);const o=function(e){var t;const o={phone_number:e.phoneNumber,connection:e.connection,allow_signup:null!==(t=e.allowSignup)&&void 0!==t&&t};return e.deliveryMethod&&(o.delivery_method=e.deliveryMethod),o}(e);return i(Lr,this,fa).call(this,o,"Failed to request phone OTP challenge",t)}async getTokenByPasswordlessDbConnection(e,t){const o=new URLSearchParams({auth_session:e.authSession,otp:e.otp});if(e.scope&&o.append("scope",e.scope),e.audience&&o.append("audience",e.audie
5nce),!c(Dr,this))throw new ca("Missing grant request delegate.",ui(new Error("missing grantRequest")));try{return await c(Dr,this).call(this,"http://auth0.com/oauth/grant-type/passwordless/otp",o,t,e.fullResponse)}catch(e){if(e instanceof Oi)throw e;const t=new ca("There was an error while trying to request a token.",ui(e)),o=e;throw t.statusCode=o._statusCode,t.headers=o._headers,t}}});function ma(e){return Ji(c(Ir,this),e,c(Pr,this))}async function ha(e,t,o,n){var r;const a=await ua(c(kr,this),c(Or,this),c(Nr,this)),s=h(h({client_id:c(Or,this)},e),a);let l;try{l=await i(Lr,this,ma).call(this,n)("".concat(c(Cr,this),"/passwordless/start"),{method:"POST",headers:h({"Content-Type":"application/json"},o?{"x-request-language":o}:{}),body:JSON.stringify(s)})}catch(e){throw new aa("".concat(t,": a network error occurred."))}if(l.ok)return l;const d=await l.clone().text();let u;if(204!==l.status)try{u=JSON.parse(d)}catch(e){u=void 0}const p=new aa((null===(r=u)||void 0===r?void 0:r.error_description)||t,u);throw p.statusCode=l.status,p.headers=Ii(l.headers),p.body=d,p}async function fa(e,t,o){var n,r;const a=await ua(c(kr,this),c(Or,this),c(Nr,this)),s=h(h({client_id:c(Or,this)},e),a);let l;try{l=await i(Lr,this,ma).call(this,o)("".concat(c(Cr,this),"/otp/challenge"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)})}catch(e){throw new la("challenge error: a network error occurred.",0,void 0,void 0)}if(l.ok){let o;try{o=await l.json()}catch(e){throw new la("".concat(t,": could not parse the response body."),l.status,void 0,void 0,Ii(l.headers))}return{authSession:o.auth_session}}const d=await l.clone().text();let u;try{u=JSON.parse(d)}catch(e){u=void 0}const p=u?h(h({},u),{},{statusCode:l.status,headers:l.headers,body:d}):{error:"",error_description:"",statusCode:l.status,headers:l.headers,body:d};throw new la((null===(n=u)||void 0===n?void 0:n.error_description)||t,l.status,p,null===(r=u)||void 0===r?void 0:r.validation_errors,Ii(l.headers))}var ga=class extends Error{constructor(e,t,o){super(t),p(this,"cause",void 0),p(this,"code",void 0),p(this,"statusCode",void 0),p(this,"headers",void 0),p(this,"body",void 0),Object.setPrototypeOf(this,new.target.prototype),this.code=e,this.cause=o&&{error:o.error,error_description:o.error_description,message:o.message};const n=di(o);this.statusCode=n.statusCode,this.headers=n.headers,this.body=n.body}},ya=class extends ga{constructor(e,t){super("signup_error",e,t),this.name="SignUpError"}},va=class extends ga{constructor(e,t){super("change_password_error",e,t),this.name="ChangePasswordError"}};function Aa(e,t,o){for(const n of t)if(null===e[n]||void 0===e[n]||""===e[n])throw new o('Required parameter "'.concat(String(n),'" was null, undefined, or empty.'))}function wa(e){var t,o;return{id:null!==(t=null!==(o=e._id)&&void 0!==o?o:e.user_id)&&void 0!==t?t:e.id,email:"string"==typeof e.email?e.email:"",emailVerified:Boolean(e.email_verified),username:e.username,givenName:e.given_name,familyName:e.family_name,name:e.name,nickname:e.nickname,picture:e.picture,userMetadata:e.user_metadata}}var Sa=(Mr=new WeakMap,xr=new WeakMap,Hr=new WeakMap,Br=new WeakMap,Ur=new WeakSet,class{constructor(e){var t,o;u(this,Ur),l(this,Mr,void 0),l(this,xr,void 0),l(this,Hr,void 0),l(this,Br,void 0),d(Mr,this,"https://".concat(e.domain)),d(xr,this,e.clientId),d(Hr,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)}),d(Br,this,null!==(o=e.telemetryConfig)&&void 0!==o?o:ji())}async signUp(e,t){var o;Aa(e,["email","password","connection"],ya);const n=h({client_id:null!==(o=e.clientId)&&void 0!==o?o:c(xr,this)},function(e){const t={email:e.email,password:e.password,connection:e.connection};return void 0!==e.username&&(t.username=e.username),void 0!==e.givenName&&(t.given_name=e.givenName),void 0!==e.familyName&&(t.family_name=e.familyName),void 0!==e.name&&(t.name=e.name),void 0!==e.nickname&&(t.nickname=e.nickname),void 0!==e.picture&&(t.picture=e.picture),void 0!==e.userMetadata&&(t.user_metadata=e.userMetadata),t}(e)),r=await i(Ur,this,ba).call(this,"/dbconnections/signup",n,ya,"Failed to sign up",t);if(e.fullResponse){const e=r.clone();return{data:wa(await r.json()),response:e}}return wa(await r.json())}async changePassword(e,t){var o;if(Aa(e,["connection"],va),!e.email&&!e.username)throw new va('Either "email" or "username" is required.');const n=h({client_id:null!==(o=e.clientId)&&void 0!==o?o:c(xr,this)},function(e){const t={connection:e.connection};return void 0!==e.email&&(t.email=e.email),void 0!==e.username&&(t.username=e.username),void 0!==e.organization&&(t.organization=e.organization),t}(e)),r=await i(Ur,this,ba).call(this,"/dbconnections/change_password",n,va,"Failed to request a password change",t);if(e.fullResponse){const e=r.clone();return{data:await r.text(),response:e}}return r.text()}});async function ba(e,t,o,n,r){const i=Ji(c(Hr,this),r,c(Br,this));let a;try{a=await i("".concat(c(Mr,this)).concat(e),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}catch(e){throw new o("".concat(n,": a network error occurred."))}if(a.ok)return a;const s=await a.clone().text(),l=await async function(e){let t;try{t=await e.json()}catch(e){return}return"string"==typeof t.error?t:"string"==typeof t.code?{error:t.code,error_description:"string"==typeof t.description?t.description:""}:void 0}(a.clone()),d=new o((null==l?void 0:l.error_description)||n,null!=l?l:{error:"unknown_error",error_description:n});throw d.statusCode=a.status,d.headers=Ii(a.headers),d.body=s,d}
5var Ea=class extends Error{constructor(e,t,o){super(t),p(this,"code",void 0),p(this,"cause",void 0),this.name="AnonymousSessionError",this.code=e,this.cause=o&&{error:o.error,error_description:o.error_description,message:o.message}}},_a=new Set(["session_expired","invalid_session_token"]);async function Ta(e){const t="Request failed with status ".concat(e.status);let o={};try{o=await e.json()}catch(e){}return{error:"string"==typeof o.error?o.error:"server_error",error_description:"string"==typeof o.error_description?o.error_description:t}}var Ra=(Gr=new WeakMap,Wr=new WeakMap,Fr=new WeakMap,Kr=new WeakMap,jr=new WeakMap,Xr=new WeakMap,Jr=new WeakMap,Vr=new WeakMap,Yr=new WeakSet,class{constructor(e){var t;u(this,Yr),l(this,Gr,void 0),l(this,Wr,void 0),l(this,Fr,void 0),l(this,Kr,void 0),l(this,jr,void 0),l(this,Xr,void 0),l(this,Jr,void 0),l(this,Vr,void 0),d(Gr,this,e.domain),d(Wr,this,"https://".concat(e.domain)),d(Fr,this,e.clientId),d(Kr,this,e.clientSecret),d(jr,this,e.clientAssertionSigningKey),d(Xr,this,e.clientAssertionSigningAlg),d(Jr,this,e.useMtls),d(Vr,this,null!==(t=e.customFetch)&&void 0!==t?t:function(){return fetch(...arguments)})}async createSession(e){const t={client_id:c(Fr,this)};null!=e&&e.audience&&(t.audience=e.audience),null!=e&&e.scope&&(t.scope=e.scope),null!=e&&e.metadata&&(t.metadata=e.metadata);const o=await i(Yr,this,Na).call(this,t);if(!o.sessionToken)throw new Ea("server_error","session_token missing from create session response");return{sessionToken:o.sessionToken,accessToken:o.accessToken,expiresAt:o.expiresAt,sessionTokenExpiresAt:o.sessionTokenExpiresAt,scope:o.scope}}async getAccessToken(e){if(null==e||!e.sessionToken)return this.createSession({audience:null==e?void 0:e.audience,scope:null==e?void 0:e.scope});try{return await i(Yr,this,Ca).call(this,e.sessionToken,e)}catch(t){if(t instanceof Ea&&_a.has(t.code))return h(h({},await this.createSession({audience:null==e?void 0:e.audience,scope:null==e?void 0:e.scope})),{},{sessionReplaced:!0});throw t}}async logout(){const e="".concat(c(Wr,this),"/anonymous/logout"),t={client_id:c(Fr,this)},o=await c(Vr,this).call(this,e,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",redirect:"error",body:JSON.stringify(t)});if(!o.ok){const e=await Ta(o);throw new Ea(e.error,e.error_description||"Failed to end anonymous session",e)}}});async function Ca(e,t){const o={client_id:c(Fr,this),session_token:e};null!=t&&t.audience&&(o.audience=t.audience),null!=t&&t.scope&&(o.scope=t.scope);const n=await i(Yr,this,Na).call(this,o);return{sessionToken:e,accessToken:n.accessToken,expiresAt:n.expiresAt,sessionTokenExpiresAt:n.sessionTokenExpiresAt,scope:n.scope,sessionReplaced:!1}}async function Na(e){const t="".concat(c(Wr,this),"/anonymous/token"),o=await async function(e,t,o){if(e.useMtls)return{};if(e.clientAssertionSigningKey){var n;const r=null!==(n=e.clientAssertionSigningAlg)&&void 0!==n?n:"RS256",i=e.clientAssertionSigningKey instanceof CryptoKey?e.clientAssertionSigningKey:await lr(e.clientAssertionSigningKey,r);return{client_assertion:await new jn({}).setProtectedHeader({alg:r}).setIssuer(t).setSubject(t).setAudience("https://".concat(o,"/")).setJti(crypto.randomUUID()).setIssuedAt().setExpirationTime("".concat(120,"s")).sign(i),client_assertion_type:"urn:ietf:params:oauth:client-assertion-type:jwt-bearer"}}return e.clientSecret?{client_secret:e.clientSecret}:{}}({clientSecret:c(Kr,this),clientAssertionSigningKey:c(jr,this),clientAssertionSigningAlg:c(Xr,this),useMtls:c(Jr,this)},c(Fr,this),c(Gr,this));Object.assign(e,o);const n=await c(Vr,this).call(this,t,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",redirect:"error",body:JSON.stringify(e)});if(!n.ok){const e=await Ta(n);throw new Ea(e.error,e.error_description||"Anonymous token request failed",e)}let r;try{r=await n.json()}catch(e){throw new Ea("server_error","Invalid response from anonymous token endpoint")}return function(e){const t=Math.floor(Date.now()/1e3);if("string"!=typeof e.access_token||!e.access_token)throw new Ea("server_error","access_token missing or invalid in anonymous token response");const o=e.expires_in;if("number"!=typeof o||!Number.isFinite(o))throw new Ea("server_error","expires_in missing or invalid in anonymous token response");return{accessToken:e.access_token,expiresAt:t+o,scope:e.scope,sessionToken:e.session_token,sessionTokenExpiresAt:"number"==typeof e.session_expires_in&&Number.isFinite(e.session_expires_in)?t+e.session_expires_in:void 0}}(r)}
5var Oa=(zr=new WeakMap,Zr=new WeakMap,qr=new WeakMap,class{constructor(e,t){l(this,zr,new Map),l(this,Zr,void 0),l(this,qr,void 0),d(qr,this,Math.max(1,Math.floor(e))),d(Zr,this,Math.max(0,Math.floor(t)))}get(e){const t=c(zr,this).get(e);if(t){if(!(Date.now()>=t.expiresAt))return c(zr,this).delete(e),c(zr,this).set(e,t),t.value;c(zr,this).delete(e)}}set(e,t,o){c(zr,this).has(e)&&c(zr,this).delete(e);const n=null!=o&&Number.isFinite(o)&&o>0?o:c(Zr,this);for(c(zr,this).set(e,{value:t,expiresAt:Date.now()+n});c(zr,this).size>c(qr,this);){const e=c(zr,this).keys().next().value;if(void 0===e)break;c(zr,this).delete(e)}}}),Ia=new Map;function Pa(e){return{ttlMs:1e3*("number"==typeof(null==e?void 0:e.ttl)?e.ttl:600),maxEntries:"number"==typeof(null==e?void 0:e.maxEntries)&&e.maxEntries>0?e.maxEntries:100}}var ka=class{static createDiscoveryCache(e){const t=(o=e.maxEntries,n=e.ttlMs,"".concat(o,":").concat(n));var o,n;let r=(i=t,Ia.get(i));var i;return r||(r=new Oa(e.maxEntries,e.ttlMs),Ia.set(t,r)),r}static createJwksCache(){return{}}},Da="openid profile email offline_access",La=Object.freeze(new Set(["grant_type","client_id","client_secret","client_assertion","client_assertion_type","subject_token","subject_token_type","requested_token_type","actor_token","actor_token_type","audience","aud","resource","resources","resource_indicator","scope","connection","login_hint","organization","assertion"]));function Ma(e){if(null==e)throw new Ai("subject_token is required");if("string"!=typeof e)throw new Ai("subject_token must be a string");if(0===e.trim().length)throw new Ai("subject_token cannot be blank or whitespace");if(e!==e.trim())throw new Ai("subject_token must not include leading or trailing whitespace");if(/^bearer\s+/i.test(e))throw new Ai("subject_token must not include the 'Bearer ' prefix")}function xa(e,t){if(t)for(const n of Object.entries(t)){var o=g(n,2);const t=o[0],r=o[1];if(!La.has(t))if(Array.isArray(r)){if(r.length>20)throw new Ai("Parameter '".concat(t,"' exceeds maximum array size of ").concat(20));r.forEach(o=>{e.append(t,o)})}else e.append(t,r)}}var Ha="urn:auth0:params:oauth:grant-type:token-exchange:federated-connection-access-token",Ba="urn:ietf:params:oauth:grant-type:token-exchange",Ua="urn:ietf:params:oauth:token-type:access_token";function Ga(e,t){return(o,n)=>{const r=null==n?void 0:n.body;if(t!==ta||!(r instanceof URLSearchParams))return e(o,n);const i={};for(const e of r){var a=g(e,2);const t=a[0],o=a[1];i[t]="authn_response"===t?JSON.parse(o):o}const s=new Headers(null==n?void 0:n.headers);return s.set("Content-Type","application/json"),e(o,h(h({},n),{},{headers:s,body:JSON.stringify(i)}))}}Qr=new WeakMap,$r=new WeakMap,ei=new WeakMap,ti=new WeakMap,oi=new WeakMap,ni=new WeakMap,ri=new WeakMap,ii=new WeakMap,ai=new WeakMap,si=new WeakMap,ci=new WeakMap,li=new WeakSet;function Wa(){const e=c(oi,this).domain.toLowerCase();return"".concat(e,"|mtls:").concat(c(oi,this).useMtls?"1":"0")}async function Fa(e,t){let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=await i(li,this,qa).call(this,o),r=new qo(e,c(oi,this).clientId,{client_secret:c(oi,this).clientSecret,use_mtls_endpoint_aliases:c(oi,this).useMtls},n);return r[Fo]=null!=t?t:c(ni,this),r}function Ka(e){return Ji(c(ni,this),e,c(ri,this))}async function ja(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const o=await i(li,this,Xa).call(this,t),n=o.configuration,r=o.serverMetadata;if(!e)return{configuration:n,serverMetadata:r};const a=i(li,this,Ka).call(this,e);return{configuration:await i(li,this,Fa).call(this,r,a,t),serverMetadata:r}}async function Xa(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=c(e?$r:Qr,this);if(t&&c(ei,this))return{configuration:t,serverMetadata:c(ei,this)};const o=i(li,this,Wa).call(this);e||await i(li,this,qa).call(this,!1);const n=c(ai,this).get(o);if(n)return i(li,this,Ja).call(this,n.serverMetadata,e);const r=c(si,this).get(o);if(r){const t=await r;return i(li,this,Ja).call(this,t.serverMetadata,e)}const a=(async()=>{const e=(await zo(new URL("https://".concat(c(oi,this).domain)),c(oi,this).clientId,{use_mtls_endpoint_aliases:c(oi,this).useMtls},(e,t,o,n)=>{o.set("client_id",t.client_id)},{[Fo]:c(ni,this)})).serverMetadata();return c(ai,this).set(o,{serverMetadata:e}),{serverMetadata:e}})();a.catch(()=>{}),c(si,this).set(o,a);try{const t=(await a).serverMetadata;return i(li,this,Ja).call(this,t,e)}finally{c(si,this).delete(o)}}async function Ja(e,t){const o=await i(li,this,Fa).call(this,e,void 0,t);return d(ei,this,e),d(t?$r:Qr,this,o),{configuration:o,serverMetadata:e}}async function Va(e,t,o){var n,r,a;const s=(await i(li,this,ja).call(this,t)).configuration;if("audience"in e||"resource"in e)throw new Ai("audience and resource parameters are not supported for Token Vault exchanges");Ma(e.subjectToken);const l=new URLSearchParams({connection:e.connection,subject_token:e.subjectToken,subject_token_type:null!==(n=e.subjectTokenType)&&void 0!==n?n:Ua,requested_token_type:null!==(r=e.requestedTokenType)&&void 0!==r?r:"http://auth0.com/oauth/token-type/federated-connection-access-token"});if(e.loginHint&&l.append("login_hint",e.loginHint),e.scope&&l.append("scope",e.scope),xa(l,e.extra),o){var d;const t=Xi(null!==(d=s[Fo])&&void 0!==d?d:c(ni,this)),n=await i(li,this,Fa).call(this,s.serverMetadata(),t);try{const e=await fn(n,Ha,l),o=Fi.fromTokenEndpointResponse(e),r=t.getCapturedResponse();if(!r)throw new Oi;return{data:o,response:r}}catch(o){if(o instanceof Oi)throw o;const n=new Ai("Failed to exchange token for connection '".concat(e.connection,"'."),ui(o)),r=t.getCapturedResponse();throw n.statusCode=null==r?void 0:r.status,n.headers=r?Ii(r.headers):void 0,n}}const u=Xi(null!==(a=s[Fo])&&void 0!==a?a:c(ni,this)),p=await i(li,this,Fa).call(this,s.serverMetadata(),u);try{const e=await fn(p,Ha,l);return Fi.fromTokenEndpointResponse(e)}catch(t){const o=new Ai("Failed to exchange token for connection '".concat(e.connection,"'."),ui(t)),n=u.getCapturedResponse();throw o.statusCode=null==n?void 0:n.status,o.headers=n?Ii(n.headers):void 0,o}}function Ya(e,t,o){var n;if(o.organization&&Li(e.claims,o.organization),o.actorToken)if(null!==(n=e.claims)&&void 0!==n&&n.act)e.act=e.claims.act;else try{e.act=function(e){if("string"!=typeof e)throw new jt("JWTs must use Compact JWS serialization, JWT must be a string");const t=e.split("."),o=t[1],n=t.length;if(5===n)throw new jt("Only JWTs using Compact JWS serialization can be decoded");
5if(3!==n)throw new jt("Invalid JWT");if(!o)throw new jt("JWTs must contain a payload");let r,i;try{r=$t(o)}catch(e){throw new jt("Failed to base64url decode the payload")}try{i=JSON.parse(Dt.decode(r))}catch(e){throw new jt("Failed to parse the decoded payload as JSON")}if(!to(i))throw new jt("Invalid JWT Claims Set");return i}(t.access_token).act}catch(e){}return e}async function za(e,t,o){var n;const r=(await i(li,this,ja).call(this,t)).configuration;if(Ma(e.subjectToken),void 0!==e.organization&&Di(e.organization),void 0!==e.actorToken&&void 0===e.actorTokenType)throw new Ai("actorTokenType is required when actorToken is provided");const a=new URLSearchParams({subject_token_type:e.subjectTokenType,subject_token:e.subjectToken});if(e.audience&&a.append("audience",e.audience),e.scope&&a.append("scope",e.scope),e.requestedTokenType&&a.append("requested_token_type",e.requestedTokenType),e.organization&&a.append("organization",e.organization),e.actorToken&&a.append("actor_token",e.actorToken),e.actorTokenType&&a.append("actor_token_type",e.actorTokenType),xa(a,e.extra),o){var s;const t=Xi(null!==(s=r[Fo])&&void 0!==s?s:c(ni,this)),n=await i(li,this,Fa).call(this,r.serverMetadata(),t);let l,d,u;try{if(d=await fn(n,Ba,a),l=Fi.fromTokenEndpointResponse(d),u=t.getCapturedResponse(),!u)throw new Oi}catch(o){if(o instanceof Oi)throw o;const n=new Ai("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),ui(o)),r=t.getCapturedResponse();throw n.statusCode=null==r?void 0:r.status,n.headers=r?Ii(r.headers):void 0,n}return i(li,this,Ya).call(this,l,d,e),{data:l,response:u}}const l=Xi(null!==(n=r[Fo])&&void 0!==n?n:c(ni,this)),d=await i(li,this,Fa).call(this,r.serverMetadata(),l);let u,p;try{p=await fn(d,Ba,a),u=Fi.fromTokenEndpointResponse(p)}catch(t){const o=new Ai("Failed to exchange token of type '".concat(e.subjectTokenType,"'").concat(e.audience?" for audience '".concat(e.audience,"'"):"","."),ui(t)),n=l.getCapturedResponse();throw o.statusCode=null==n?void 0:n.status,o.headers=n?Ii(n.headers):void 0,o}return i(li,this,Ya).call(this,u,p,e),u}async function Za(e,t,o){var n;const r=(await i(li,this,ja).call(this,t)).configuration;if(o){var a;const t=Xi(null!==(a=r[Fo])&&void 0!==a?a:c(ni,this)),o=await i(li,this,Fa).call(this,r.serverMetadata(),t);try{const n=await fn(o,"http://auth0.com/oauth/grant-type/passwordless/otp",e),r=Fi.fromTokenEndpointResponse(n),i=t.getCapturedResponse();if(!i)throw new Oi;return{data:r,response:i}}catch(e){if(e instanceof Oi)throw e;const o=new sa("There was an error while trying to request a token.",ui(e)),n=t.getCapturedResponse();throw o.statusCode=null==n?void 0:n.status,o.headers=n?Ii(n.headers):void 0,o}}const s=Xi(null!==(n=r[Fo])&&void 0!==n?n:c(ni,this)),l=await i(li,this,Fa).call(this,r.serverMetadata(),s);try{const t=await fn(l,"http://auth0.com/oauth/grant-type/passwordless/otp",e);return Fi.fromTokenEndpointResponse(t)}catch(e){const t=new sa("There was an error while trying to request a token.",ui(e)),o=s.getCapturedResponse();throw t.statusCode=null==o?void 0:o.status,t.headers=o?Ii(o.headers):void 0,t}}async function qa(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];const t=!!c(oi,this).clientSecret||!!c(oi,this).clientAssertionSigningKey||!!c(oi,this).useMtls;return e&&!t?(e,t,o,n)=>{o.set("client_id",t.client_id)}:(c(ti,this)||d(ti,this,(async()=>{if(!c(oi,this).clientSecret&&!c(oi,this).clientAssertionSigningKey&&!c(oi,this).useMtls)throw new Ci;if(c(oi,this).useMtls)return(e,t,o,n)=>{o.set("client_id",t.client_id)};let e=c(oi,this).clientAssertionSigningKey;return!e||e instanceof CryptoKey||(e=await lr(e,c(oi,this).clientAssertionSigningAlg||"RS256")),e?function(e){return we(e,void 0)}(e):Go(c(oi,this).clientSecret)})().catch(e=>{throw d(ti,this,void 0),e})),c(ti,this))}async function Qa(e){const t=(await i(li,this,Xa).call(this)).configuration,o=pe(),n=await function(e){return async function(e){return de(e,"codeVerifier"),te(await crypto.subtle.digest("SHA-256",Q(e)))}(e)}(o),r=ki(h(h({},c(oi,this).authorizationParams),null==e?void 0:e.authorizationParams)),a=new URLSearchParams(h(h({scope:Da},r),{},{client_id:c(oi,this).clientId,code_challenge:n,code_challenge_method:"S256"}));return{authorizationUrl:null!=e&&e.pushedAuthorizationRequests?await ln(t,a):await cn(t,a),codeVerifier:o}}new Oa(1e3,6e4);Error;new WeakMap,new WeakMap},5172(e){e.exports=function(e,t){this.v=e,this.k=t},e.exports.__esModule=!0,e.exports.default=e.exports},6993(e,t,o){var n=o(5546);function r(){var t,o,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.toStringTag||"@@toStringTag";function c(e,r,i,a){var s=r&&r.prototype instanceof d?r:d,c=Object.create(s.prototype);return n(c,"_invoke",function(e,n,r){var i,a,s,c=0,d=r||[],u=!1,p={p:0,n:0,v:t,a:m,f:m.bind(t,4),d:function(e,o){return i=e,a=0,s=t,p.n=o,l}};function m(e,n){for(a=e,s=n,o=0;!u&&c&&!r&&o<d.length;o++){var r,i=d[o],m=p.p,h=i[2];e>3?(r=h===n)&&(s=i[(a=i[4])?5:(a=3,3)],i[4]=i[5]=t):i[0]<=m&&((r=e<2&&m<i[1])?(a=0,p.v=n,p.n=i[1]):m<h&&(r=e<3||i[0]>n||n>h)&&(i[4]=e,i[5]=n,p.n=h,a=0))}if(r||e>1)return l;throw u=!0,n}return function(r,d,h){if(c>1)throw TypeError("Generator is already running");for(u&&1===d&&m(d,h),a=d,s=h;(o=a<2?t:s)||!u;){i||(a?a<3?(a>1&&(p.n=-1),m(a,s)):p.n=s:p.v=s);try{if(c=2,i){if(a||(r="next"),o=i[r]){if(!(o=o.call(i,s)))throw TypeError("iterator result is not an object");
vendor: 4,545 bytes, line 5
5if(!o.done)return o;s=o.value,a<2&&(a=0)}else 1===a&&(o=i.return)&&o.call(i),a<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),a=1);i=t}else if((o=(u=p.n<0)?s:e.call(n,p))!==l)break}catch(e){i=t,a=1,s=e}finally{c=1}}return{value:o,done:u}}}(e,i,a),!0),c}var l={};function d(){}function u(){}function p(){}o=Object.getPrototypeOf;var m=[][a]?o(o([][a]())):(n(o={},a,function(){return this}),o),h=p.prototype=d.prototype=Object.create(m);function f(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,n(e,s,"GeneratorFunction")),e.prototype=Object.create(h),e}return u.prototype=p,n(h,"constructor",p),n(p,"constructor",u),u.displayName="GeneratorFunction",n(p,s,"GeneratorFunction"),n(h),n(h,s,"Generator"),n(h,a,function(){return this}),n(h,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:c,m:f}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},5869(e,t,o){var n=o(887);e.exports=function(e,t,o,r,i){var a=n(e,t,o,r,i);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports},887(e,t,o){var n=o(6993),r=o(1791);e.exports=function(e,t,o,i,a){return new r(n().w(e,t,o,i),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports},1791(e,t,o){var n=o(5172),r=o(5546);e.exports=function e(t,o){function i(e,r,a,s){try{var c=t[e](r),l=c.value;return l instanceof n?o.resolve(l.v).then(function(e){i("next",e,a,s)},function(e){i("throw",e,a,s)}):o.resolve(l).then(function(e){c.value=e,a(c)},function(e){return i("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(r(e.prototype),r(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(e,t,n){function r(){return new o(function(t,o){i(e,n,t,o)})}return a=a?a.then(r,r):r()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports},5546(e){function t(o,n,r,i){var a=Object.defineProperty;try{a({},"",{})}catch(o){a=0}e.exports=t=function(e,o,n,r){function i(o,n){t(e,o,function(e){return this._invoke(o,n,e)})}o?a?a(e,o,{value:n,enumerable:!r,configurable:!r,writable:!r}):e[o]=n:(i("next",0),i("throw",1),i("return",2))},e.exports.__esModule=!0,e.exports.default=e.exports,t(o,n,r,i)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4373(e){e.exports=function(e){var t=Object(e),o=[];for(var n in t)o.unshift(n);return function e(){for(;o.length;)if((n=o.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports},4633(e,t,o){var n=o(5172),r=o(6993),i=o(5869),a=o(887),s=o(1791),c=o(4373),l=o(579);function d(){"use strict";var t=r(),o=t.m(d),u=(Object.getPrototypeOf?Object.getPrototypeOf(o):o.__proto__).constructor;function p(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===u||"GeneratorFunction"===(t.displayName||t.name))}var m={throw:1,return:2,break:3,continue:3};function h(e){var t,o;return function(n){t||(t={stop:function(){return o(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return o(n.a,m[e],t)},delegateYield:function(e,r,i){return t.resultName=r,o(n.d,l(e),i)},finish:function(e){return o(n.f,e)}},o=function(e,o,r){n.p=t.prev,n.n=t.next;try{return e(o,r)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=d=function(){return{wrap:function(e,o,n,r){return t.w(h(e),o,n,r&&r.reverse())},isGeneratorFunction:p,mark:t.m,awrap:function(e,t){return new n(e,t)},AsyncIterator:s,async:function(e,t,o,n,r){return(p(t)?a:i)(h(e),t,o,n,r)},keys:c,values:l}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=d,e.exports.__esModule=!0,e.exports.default=e.exports},579(e,t,o){var n=o(3738).default;e.exports=function(e){if(null!=e){var t=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],o=0;if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}}}throw new TypeError(n(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports},3738(e){function t(o){return e.exports=t="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.exports.__esModule=!0,e.exports.default=e.exports,t(o)}
5e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4756(e,t,o){var n=o(4633)();e.exports=n;try{regeneratorRuntime=n}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},467(e,t,o){"use strict";function n(e,t,o,n,r,i,a){try{var s=e[i](a),c=s.value}catch(e){return void o(e)}s.done?t(c):Promise.resolve(c).then(n,r)}function r(e){return function(){var t=this,o=arguments;return new Promise(function(r,i){var a=e.apply(t,o);function s(e){n(a,r,i,s,c,"next",e)}function c(e){n(a,r,i,s,c,"throw",e)}s(void 0)})}}o.d(t,{A:()=>r})},3029(e,t,o){"use strict";function n(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}o.d(t,{A:()=>n})},2901(e,t,o){"use strict";o.d(t,{A:()=>i});var n=o(9922);function r(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(0,n.A)(r.key),r)}}function i(e,t,o){return t&&r(e.prototype,t),o&&r(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e}},4467(e,t,o){"use strict";o.d(t,{A:()=>r});var n=o(9922);function r(e,t,o){return(t=(0,n.A)(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}},2327(e,t,o){"use strict";o.d(t,{A:()=>r});var n=o(2284);function r(e,t){if("object"!=(0,n.A)(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,t||"default");if("object"!=(0,n.A)(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}},9922(e,t,o){"use strict";o.d(t,{A:()=>i});var n=o(2284),r=o(2327);function i(e){var t=(0,r.A)(e,"string");return"symbol"==(0,n.A)(t)?t:t+""}},2284(e,t,o){"use strict";function n(e){return n="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},n(e)}o.d(t,{A:()=>n})},8479(e,t,o){"use strict";var n=o(3029),r=o(2901),i=o(4467),a=o(3153),s=function(){function e(){(0,n.A)(this,e),(0,i.A)(this,"readyPromise",null),(0,i.A)(this,"readyResolved",!1),(0,i.A)(this,"readyValue",!1)}return(0,r.A)(e,[{key:"blueConicReady",value:function(){var t=this,o=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).timeout,n=Date.now();if(this.readyResolved&&!0===this.readyValue)return a.A.log("BlueConicUtils | blueConicReady | returning cached value:",this.readyValue),Promise.resolve(!0);if(this.readyPromise)return a.A.log("BlueConicUtils | blueConicReady | returning existing promise"),this.readyPromise;var r=null!=o?o:e.DEFAULT_TIMEOUT;return a.A.log("BlueConicUtils | blueConicReady | checking BC readiness"),this.readyPromise=new Promise(function(e){var o,i=setTimeout(function(){t.readyResolved||(a.A.log("BlueConicUtils | blueConicReady | timeout at:",(Date.now()-n)/1e3,"s"),t.resolveReady(!1,e))},r);if(null!==(o=window.blueConicClient)&&void 0!==o&&o.profile)return a.A.log("BlueConicUtils | blueConicReady | BC already ready"),void t.resolveReady(!0,e);var s=function(){var o;if(!t.readyResolved)if(null!==(o=window.blueConicClient)&&void 0!==o&&o.event){a.A.log("BlueConicUtils | blueConicReady | BC client detected");var r=window.blueConicClient.event.subscribe(window.blueConicClient.event.onReady,{},function(){clearTimeout(i),a.A.log("BlueConicUtils | blueConicReady | onReady fired at:",(Date.now()-n)/1e3,"s"),null==r||r(),t.resolveReady(!0,e)})}else setTimeout(s,500)};s()}),this.readyPromise}},{key:"resolveReady",value:function(e,t){this.readyResolved||(a.A.log("BlueConicUtils | blueConicReady | resolved with:",e),this.readyResolved=!0,this.readyValue=e,t(e),!1===e&&(this.readyPromise=null,this.readyResolved=!1))}}])}();(0,i.A)(s,"DEFAULT_TIMEOUT",3e3);new s},3153(e,t,o){"use strict";var n=o(3612);const r={log:function(){if(n.A.debug){for(var e,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];(e=console).log.apply(e,["MNGDigisubs:"].concat(o))}},error:function(){if(n.A.debug){for(var e,t=arguments.length,o=new Array(t),r=0;r<t;r++)o[r]=arguments[r];(e=console).error.apply(e,["MNGDigisubs:"].concat(o))}}};o.d(t,["A",0,r])},3612(e,t,o){"use strict";var n,r,i,a,s;window.authentication_config.sessionManagementEnabled="1"===window.authentication_config.sessionManagement;const c={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,enableReaderDashboardv2:!!window.authentication_config&&"1"===window.authentication_config.enableReaderDashboardv2,enableDashboardCancel:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardCancel,enableDashboardBenefitHub:!!window.authentication_config&&"1"===window.authentication_config.enableDashboardBenefitHub,enableEngageArticleGifting:"1"===(null===(n=window.authentication_config)||void 0===n?void 0:n.articleSharingEnabled)&&"1"===(null===(r=window.authentication_config)||void 0===r?void 0:r.isEngageArticleSharing),enableGiftedArticlesLink:"1"===(null===(i=window.authentication_config)||void 0===i?void 0:i.articleSharingEnabled)&&"1"!==(null===(a=window.authentication_config)||void 0===a?void 0:a.isEngageArticleSharing),enableSavedArticlesLink:"1"===(null===(s=window.authentication_config)||void 0===s?void 0:s.articleSavingEnabled),prosperstackClientid:window.authentication_config?window.authentication_config.prosperstackClientid:"",enableUpgradeSubscription:!!window.authentication_config&&"1"===window.authentication_config.enableUpgradeSubscription,oneTapEnabled:!!window.authentication_config&&"1"===window.authentication_config.oneTapEnabled,forceLogoutOnExpiredIdToken:!!window.authentication_config&&"1"===window.authentication_config.forceLogoutOnExpiredIdToken,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.linaC
5heckOnArticles,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,updatePaymentEnabled:!!window.authentication_config&&"1"===window.authentication_config.enableUpdatePayment,enableSocialSigninModal:!!window.authentication_config&&"1"===window.authentication_config.enableSocialSigninModal,enableSocialAllPages:!!window.authentication_config&&"1"===window.authentication_config.enableSocialAllPages,enableSocialHomepage:!!window.authentication_config&&"1"===window.authentication_config.enableSocialHomepage,enableSocialArticle:!!window.authentication_config&&"1"===window.authentication_config.enableSocialArticle,enableSocialSection:!!window.authentication_config&&"1"===window.authentication_config.enableSocialSection};o.d(t,["A",0,c])},9532(e,t,o){"use strict";o.d(t,{L4:()=>g,aG:()=>v,gQ:()=>y,mP:()=>S,oL:()=>m});var n,r,i=o(4467),a=o(467),s=o(4756),c=o(5537),l=(o(893),o(3153)),d=o(3612);o(8479);function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,n)}return o}function p(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach(function(t){(0,i.A)(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}window.addEventListener("mng-all-islands-ready",function(e){n||(n=e,r&&(l.A.log("utils | Dispatching mng-auth-complete event (islands were not ready): ",r),window.dispatchEvent(r)))}),l.A.log("Waiting for islands ready");var m=function(e){return(0,c.s)(e)},h=function(){return"complete"===document.readyState},f=function(){return new Promise(function(e){if(("interactive"===document.readyState||h())&&window.dataLayer)l.A.log("Utils digisubsDataLayerLoaded: ","Document is in interactive state, resolving."),e();else{l.A.log("Utils digisubsDataLayerLoaded: ","Waiting for the dataLayer to load...");var t=setInterval((0,a.A)(s.mark(function o(){return s.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:window.dataLayer&&window.dataLayer.length>2&&(clearInterval(t),e(!0));case 1:case"end":return o.stop()}},o)})),50)}})},g=function(){var e=(0,a.A)(s.mark(function e(t){var o,n,r;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,f();case 1:return l.A.log("Utils getDataLayerObject: looking for this dataLayer object ",t),window.dataLayer=window.dataLayer||[],o="",l.A.log("Utils getDataLayerObject: here is dataLayer length ",window.dataLayer.length),n=function(e){return l.A.log("Utils dataLayerLoop: look for this element ",e),e[t]?(l.A.log("Utils dataLayerLoop: found ",e[t]),o=e[t],e[t]):(l.A.log("Utils dataLayerLoop: dataLayer search ",!1),!1)},r=window.dataLayer.some(n),e.abrupt("return",r?o:"");case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),y=function(){var e=(0,a.A)(s.mark(function e(){var t,o,n=arguments;return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.length>0&&void 0!==n[0]?n[0]:"Page Type",e.next=1,g(t);case 1:return o=e.sent,l.A.log("utils | pageType: page type is ",o),e.abrupt("return",o);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),v=function(){var e=(0,a.A)(s.mark(function e(){return s.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,t){return d.A.entitlementsEnabled?void 0!==window.MNGAuthentication&&void 0!==window.MNGAuthentication.entitlementsReady?(l.A.log("Entitlements already present:",window.MNGAuthentication.entitlementsReady),void e(window.MNGAuthentication.entitlementsReady)):void window.addEventListener("entitlementsReady",function(o){try{var n=o.detail||{};window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.entitlementsReady=n,l.A.log("Received entitlementsReady event:",n),e(n)}catch(e){l.A.error("Error handling entitlementsReady event:",e),t(e)}},{once:!0}):(l.A.log("Entitlements disabled in settings."),void e(!1))}));case 1:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),A=function(e){l.A.log("starting simpleEmailValidation");if(!e)return{valid:!1,message:"Please enter an email."};if(!/^(([^<>()[\]\\.,;:\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.test(e))return{valid:!1,message:"Please enter a valid email."};var t=e.match(/\.([^.\n\s]*)$/)[1].toUpperCase(),o=["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","COMM
5BANK","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","SO
5CIAL","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(t);return l.A.log("simpleEmailValidation: ","TLD search ".concat(o)),!1===o?{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=A;window.validatePhoneNumber=function(e){return/^[0-9]([0-9 -])*[0-9]$/.test(e)};var w=function(e){r=new CustomEvent("mng-auth-check-complete",{detail:e}),n?(l.A.log("utils | Dispatching mng-auth-complete event (islands were ready): ",e),window.dispatchEvent(r)):l.A.log("Islands not ready")};window.addEventListener("authenticationReady",function(e){return w(e.detail)});var S=function(e){var t=e.text,o=e.boldText,n=void 0!==o&&o,r=e.title,i=e.legal,a=void 0===i?"":i,s=e.id,c=e.fullScreen,l=e.appendToId,d=e.closeConfirm,u=e.buttonText,p=e.autoDismiss,m=void 0===p||p,h=e.embedded,f=void 0!==h&&h,g=e.loginModal,y=void 0!==g&&g,v=e.homePage,A=e.canonicalURL,w=document.querySelector("#".concat(s)),S="";if(y){var E=encodeURIComponent(A);S='<div id="digisubs-modalContainer" '.concat(c?'class="digisubs-fullScreen"':"",'>\n <div id="digisubs-modal-wrap" tabindex="-1" ').concat(c?"":'class="digisubs-dropShadow"','>\n <div class="digisubs-modal-skin">\n <div class="digisubs-modal-outer">\n <div class="digisubs-modal-inner">\n <div class="digisubs-modalToasterTemplate">\n <h1 class="digisubs-modal-headline ').concat(r?"":"hidden",'">').concat(r||"",'</h1>\n <div id="digisubs-modalAdBody">\n <div class="digisubs-modal-bodycopy ').concat(t?"":"hidden"," ").concat(!0===n?"digisubs-modal-bold":"",'">\n\t\t\t\t\t\t\t\t\t').concat(t||"",'\n </div>\n\t\t\t\t\t\t\t\t<div class="digisubs-modal-fineprint ').concat(a?"":"hidden",'">\n\t\t\t\t\t\t\t\t\t').concat(a||"",'\n </div>\n </div>\n </div>\n\t\t\t\t\t\t<div class="digisubs-optional-button-container">\n\t\t\t\t\t\t\t<button type="button" id="digisubs-modal-login" role="button" aria-label="login" class="digisubs-text-buttons primary digisubs-modal-button">\n\t\t\t\t\t\t\t\t<a href="/login?returnUrl=').concat(E,'">Login</a>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<button type="button" id="digisubs-modal-cancel" role="button" aria-label="cancel" class="digisubs-text-buttons primary digisubs-modal-button">\n\t\t\t\t\t\t\t\t<a href=https://www.').concat(v,">Cancel</a>\n\t\t\t\t\t\t\t</button>\n \t</div>\n \t</div>\n \t</div>\n \t</div>\n \t</div>")}else S='<div id="digisubs-modalContainer" '.concat(c?'class="digisubs-fullScreen"':"",'>\n\t\t\t<div id="digisubs-modal-wrap" tabindex="-1" ').concat(c?"":'class="digisubs-dropShadow"','>\n\t\t\t\t<div class="digisubs-modal-skin">\n\t\t\t\t\t<div id="digisubs-modal-button-container">\n\t\t\t\t\t\t<button aria-label="Close" id="digisubs-modalClose" class="icon-close"></button>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="digisubs-modal-outer">\n\t\t\t\t\t\t<div class="digisubs-modal-inner">\n\t\t\t\t\t\t\t<div class="digisubs-modalToasterTemplate">\n\t\t\t\t\t\t\t\t<h1 class="digisubs-modal-headline ').concat(r?"":"hidden",'">').concat(r||"",'</h1>\n\t\t\t\t\t\t\t\t<div id="digisubs-modalAdBody">\n\t\t\t\t\t\t\t\t\t<div class="digisubs-modal-bodycopy ').concat(t?"":"hidden"," ").concat(!0===n?"digisubs-modal-bold":"",'">\n\t\t\t\t\t\t\t\t\t\t').concat(t||"",'\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class="digisubs-modal-fineprint ').concat(a?"":"hidden",'">\n\t\t\t\t\t\t\t\t\t\t').concat(a||"","\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t").concat(d?'<div class="digisubs-optional-button-container">\n\t\t\t\t\t\t\t\t<button class="digisubs-text-buttons primary digisubs-modal-button">'.concat(u,"</button><div>"):"","\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>");(w||((w=document.createElement("div")).id=s,w.classList="digisubs-mainModalWrapper"),w.innerHTML="",w.innerHTML=S,y)||w.querySelector("#digisubs-modal-button-container").addEventListener("click",function(){w.remove()});d&&w.querySelector(".digisubs-optional-button-container").addEventListener("click",function(){w.remove()});if(l){var _=document.querySelector("#".concat(l));if(_&&f){var T=document.getElementById("userProfileEntriesContainer").querySelectorAll(".user-profile-item-row");
5if(T.length>=2)T[1].parentNode.insertBefore(w,T[1].nextSibling)}else _.append(w)}var R=w.querySelector("#modalContainer");if(R&&R.addEventListener("click",b),m){var C=Math.min(Math.max(55*t.length,2500),7e3);C=C>2800?C:3500,setTimeout(function(){var e;(e=w).classList.add("fade-out"),setTimeout(function(){e.remove()},200)},C)}return w};function b(e){var t=document.getElementById("modalContainer"),o=document.getElementById("modal-wrap");t&&o&&e.target===t&&(t.classList.add("fade-out"),setTimeout(function(){t.style.display="none";var o=document.elementFromPoint(e.clientX,e.clientY);if(t.style.display="",t.remove(),o&&"A"===o.tagName)try{var n=new URL(o.href,window.location.origin);"http:"!==n.protocol&&"https:"!==n.protocol||window.location.assign(n.href)}catch(e){console.warn("URL no válida:",e)}},200))}var E=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1e4;return new Promise(function(t,o){var n={sspw:null,sophiClient:null,engagePaywall:null,engageStatus:null},r=function(){var r=(0,a.A)(s.mark(function r(){var i,a,c,d,u,m,h,f,A,w,S;return s.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(r.prev=0,"1"!==(null===(i=window.sophi_config)||void 0===i?void 0:i.enableSophiSSPW)){r.next=1;break}if(!document.getElementById("server-paywall")){r.next=1;break}return n.sspw=!0,r.abrupt("return",t({paywall:!0,details:p({},n)}));case 1:return r.next=2,y();case 2:return c=r.sent,r.next=3,g("Paywall_Level");case 3:if(d=r.sent,"article"===c&&"free"!==d){r.next=4;break}return r.abrupt("return",t({paywall:!1,details:"article"!==c?"Page type is not an article":"Free article"}));case 4:return r.next=5,v();case 5:if(!(u=r.sent)||!u.isEntitled){r.next=6;break}return r.abrupt("return",t({paywall:!1,details:"Entitled User"}));case 6:if("premium"!==d){r.next=7;break}return r.abrupt("return",t({paywall:!0,details:"Premium article"}));case 7:if(m=null===(a=window.ConnextUtils)||void 0===a?void 0:a.runningSophi,l.A.log("checkPaywallStatus - Sophi is running: ",m),!m){r.next=8;break}window.ConnextUtils.connextAlreadyRan&&window.sophiWallConfig&&!window.sophiWallConfig.error&&"paywall"===window.sophiWallConfig.wallType?(n.sophiClient=!0,n.engageStatus=!0,n.engagePaywall=!0):window.addEventListener("onPaywallShown",function(){return"paywall"===window.sophiWallConfig.wallType&&(n.sophiClient=!0),t({paywall:!0,details:p({},n)})},{once:!0}),r.next=12;break;case 8:if(m){r.next=12;break}return h=window.ConnextUtils.connextReady("onPaywallShown"),f=new Promise(function(t,o){return setTimeout(function(){return o(new Error("No Engage paywall within 10 seconds, resolving as no paywall."))},e)}),r.prev=9,r.next=10,Promise.race([h,f]);case 10:!0===(A=r.sent)?(n.engagePaywall=!0,n.engageStatus="Engage paywall detected"):(n.engagePaywall=!1,n.engageStatus="Engage response: ".concat(A)),r.next=12;break;case 11:r.prev=11,w=r.catch(9),n.engagePaywall=!1,n.engageStatus="Engage response: ".concat(w);case 12:return r.abrupt("return",t({paywall:Object.values(n).some(function(e){return e}),details:p({},n)}));case 13:r.prev=13,S=r.catch(0),o(S);case 14:case"end":return r.stop()}},r,null,[[0,13],[9,11]])}));return function(){return r.apply(this,arguments)}}();r()})};"undefined"!=typeof window&&(window.MNGAuthentication=window.MNGAuthentication||{},window.MNGAuthentication.checkPaywallStatus=E)},5537(e,t,o){"use strict";o.d(t,{s:()=>i});class n extends Error{}function r(e){let t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw new Error("base64 string is not of the correct length")}try{return function(e){return decodeURIComponent(atob(e).replace(/(.)/g,(e,t)=>{let o=t.charCodeAt(0).toString(16).toUpperCase();return o.length<2&&(o="0"+o),"%"+o}))}(t)}catch(e){return atob(t)}}function i(e,t){if("string"!=typeof e)throw new n("Invalid token specified: must be a string");t||(t={});const o=!0===t.header?0:1,i=e.split(".")[o];if("string"!=typeof i)throw new n(`Invalid token specified: missing part #${o+1}`);let a;try{a=r(i)}
5catch(e){throw new n(`Invalid token specified: invalid base64 for part #${o+1} (${e.message})`)}try{return JSON.parse(a)}catch(e){throw new n(`Invalid token specified: invalid json for part #${o+1} (${e.message})`)}}n.prototype.name="InvalidTokenError"},2450(e){"use strict";e.exports=JSON.parse('{"macombdaily.com":{"code":"MD","logo":"MD_Logo.png","title":"Macomb Daily","tribune":false,"cluster":["themorningsun.com","theoaklandpress.com"],"clusterName":"Michigan","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-977-3677","email":"[email protected]","address1":"6250 Metropolitan Parkway, Dock D","address2":"Sterling Heights, MI 48312","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. â 3 p.m. Sat. 7 a.m. â 10 a.m. Sun. 7 a.m. â 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/macomb-daily-for-iphone/id520209090?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.macombdaily"}]},"themorningsun.com":{"code":"MSUN","logo":"MS_Logo.png","title":"Mount Pleasant Morning","tribune":false,"cluster":["macombdaily.com","theoaklandpress.com"],"clusterName":"Michigan","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"989-779-6000","email":"[email protected]","address1":"","address2":"","timeZone":"Eastern","supportHours":" Mon.-Fri. 8:30 a.m. â 5:00 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-morning-sun-for-iphone/id520224707?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.morningsun"}]},"theoaklandpress.com":{"code":"OP","logo":"OP_Logo.png","title":"Daily Oakland","tribune":false,"cluster":["macombdaily.com","themorningsun.com"],"clusterName":"Michigan","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-977-3677","email":"[email protected]","address1":"6250 Metropolitan Parkway, Dock D","address2":"Sterling Heights, MI 48312","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. â 3 p.m. Sat. 7 a.m. â 10 a.m. Sun. 7 a.m. â 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-oakland-press-for-iphone/id520210301?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.oaklandpress"}]},"thenewsherald.com":{"code":"TNH","logo":"TNH_Logo.png","title":"The News-Herald","tribune":false,"cluster":[],"clusterName":"Michigan Weeklies","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-977-3677","email":"[email protected]","address1":"6250 Metropolitan Parkway, Dock D","address2":"Sterling Heights, MI 48312","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. â 3 p.m. Sat. 7 a.m. â 10 a.m. Sun. 7 a.m. â 12 p.m."},"apps":[{"app_store":"","play_store":""}]},"dailyfreeman.com":{"code":"KF","logo":"DF_Logo.png","title":"Kingston Daily Freeman","tribune":false,"cluster":["oneidadispatch.com","saratogian.com","troyrecord.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-699-7699","email":" [email protected]","address1":"P.O. Box 4470","address2":"Kingston, NY 12401","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. â 6 p.m. Sat. 6:30 a.m. â 11 a.m. Sun. 6:30 a.m. â 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/daily-freeman-for-iphone/id520227762?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.dailyfreeman"}]}
5,"oneidadispatch.com":{"code":"OD","logo":"OD_Logo.png","title":"Oneida Daily Dispatch","tribune":false,"cluster":["dailyfreeman.com","saratogian.com","troyrecord.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-699-7699","email":"[email protected]","address1":"P.O. Box 4470","address2":"Kingston, NY 12401","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. â 6 p.m. Sat. 6:30 a.m. â 11 a.m. Sun. 6:30 a.m. â 12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/oneida-dispatch-for-iphone/id520233872?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.oneidadispatch"}]},"saratogian.com":{"code":"SA","logo":"SRT_Logo.png","title":"The Saratogian","tribune":false,"cluster":["oneidadispatch.com","dailyfreeman.com","troyrecord.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-599-0499","email":"[email protected]","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday â Friday 7:30 a.m.â6 p.m. Saturday 6:30 a.m.â11 a.m. Sunday 6:30 a.m.-12 p.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/saratogian-for-iphone/id520229775?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.saratogian"}]},"troyrecord.com":{"code":"TR","logo":"TROY_Logo.png","title":"The Troy Record","tribune":false,"cluster":["oneidadispatch.com","dailyfreeman.com","saratogian.com"],"clusterName":"New York","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-599-0499","email":"[email protected]","address1":"P.O. Box 4470","address2":"Kingston, NY 12401","timeZone":"Eastern","supportHours":" Monday â Friday 7:30 a.m. â 6:00 p.m. \\\\n Saturday 6:30 a.m. â 11:00 a.m. \\\\n Sunday 6:30 a.m. â 12:00 noon"},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-record-for-iphone/id520232370?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.record"}]},"morningjournal.com":{"code":"MJ","logo":"MOJ_Logo.png","title":"Lorain Morning Journal","tribune":false,"cluster":["news-herald.com"],"clusterName":"Ohio","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-888-757-0727","email":"[email protected]","address1":"401 Broadway Ave., Suite B","address2":"Lorain, Ohio 44052","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. â 3 p.m. Sat. 6:30 a.m. â 10 a.m. Sun. 6:30 a.m. â 10 a.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/morning-journal-for-iphone/id520205939?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.morningjournal"}]},"news-herald.com":{"code":"NH","logo":"NH_Logo.png","title":"Lake County News-Herald","tribune":false,"cluster":["morningjournal.com"],"clusterName":"Ohio","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-787-0717","email":"[email protected]","address1":"36625 Vine St. Suite 4","address2":"Willoughby, Ohio 44094","timeZone":"Eastern","supportHours":" Mon.-Fri. 6 a.m. â 3 p.m. Sat. 6:30 a.m. â 10 a.m. Sun. 6:30 a.m. â 10 a.m."},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-news-herald-for-iphone/id520206415?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.newsherald"}
5]},"delcotimes.com":{"code":"DCDT","logo":"DEL_Logo.png","title":"Delaware County Times","tribune":false,"cluster":["readingeagle.com","thereporteronline.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com","mainlinemedianews.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-799-6299","email":"[email protected]","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/delaware-county-daily-times/id508962453?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.thedelawarecountydailytimes"}]},"readingeagle.com":{"code":"EAGLE","logo":"RE_Logo.png","title":"Reading Eagle","tribune":false,"cluster":["delcotimes.com","thereporteronline.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com","mainlinemedianews.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"610-371-5122","email":"[email protected]","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/reading-eagle/id950379194?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.readingeagle.eversify"}]},"thereporteronline.com":{"code":"LANS","logo":"TRO_Logo.png","title":"The Lansdale Reporter","tribune":false,"cluster":["delcotimes.com","readingeagle.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com","mainlinemedianews.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-955-0355","email":"[email protected]","address1":"307 Derstine Ave.","address2":"Lansdale, PA 19446","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-reporter-for-iphone/id525105540?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.reporter"}]},"timesherald.com":{"code":"NORR","logo":"TH_Logo.png","title":"Norristown Times Herald","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","pottsmerc.com","trentonian.com","dailylocal.com","mainlinemedianews.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-933-4233","email":"[email protected]","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-times-herald-for-iphone/id525130019?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.timesherald"}]},"pottsmerc.com":{"code":"PMERC","logo":"PM_Logo.png","title":"The Pottstown Mercury","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","timesherald.com","trentonian.com","dailylocal.com","mainlinemedianews.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-933-5133","email":"[email protected]","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-mercury-for-iphone/id525118208?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.mercury"}]}
5,"trentonian.com":{"code":"TREN","logo":"TRT_Logo.png","title":"The Trentonian","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","timesherald.com","pottsmerc.com","dailylocal.com","mainlinemedianews.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-489-8189","email":"[email protected]","address1":"127 Rte 206 South, Suite 27","address2":"Trenton, NJ 08610","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/the-trentonian-for-iphone/id503293221?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.trentonian"}]},"dailylocal.com":{"code":"WCDL","logo":"DL_Logo.png","title":"West Chester Daily Local","tribune":false,"cluster":["delcotimes.com","readingeagle.com","thereporteronline.com","timesherald.com","pottsmerc.com","trentonian.com","mainlinemedianews.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"888-744-2144","email":"[email protected]","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"http://itunes.apple.com/us/app/daily-local-for-iphone/id525116294?mt=8","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.dailylocalnews"}]},"marinij.com":{"code":"MIJ","logo":"MJ_Logo.png","title":"Marin Independent Journal","tribune":false,"cluster":["eastbaytimes.com","mercurynews.com"],"clusterName":"BANG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"415-937-7222","email":"[email protected]","address1":"103 Shoreline Parkway, Suite 201","address2":"San Rafael, CA 94901","timeZone":"Pacific","supportHours":" Monday through Friday: 6:30a.m. â 5:00 p.m. \\\\n Saturday: 7:00a.m. â 10:30a.m. \\\\n Sunday: 8:00a.m. â 10:30a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/marin-independent-journal-news/id499674553?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.marinindependentjournal"}]},"eastbaytimes.com":{"code":"EBT","logo":"EBT_Logo.png","title":"East Bay Times","tribune":false,"cluster":["marinij.com","mercurynews.com"],"clusterName":"BANG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"925-276-9254","email":"[email protected]","address1":"208 Lindbergh Avenue","address2":"Livermore, CA 94551-9512","timeZone":"Pacific","supportHours":" Monday through Friday: 6:30 a.m. â 5:00 p.m. \\\\n Saturday: 7:00 a.m. â 10:30 a.m. \\\\n Sunday: 8:00 a.m. â 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/east-bay-times-for-mobile/id479676946?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.contracostatimes"}]},"mercurynews.com":{"code":"MERC","logo":"SJMN_Logo.png","title":"The Mercury News","tribune":false,"cluster":["marinij.com","eastbaytimes.com"],"clusterName":"BANG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"408-508-5554","email":"[email protected]","address1":"75 E. Santa Clara Street, Suite 1100","address2":"San Jose, CA 95113","timeZone":"Pacific","supportHours":" Monday through Friday: 6:30 a.m. â 5:00 p.m. \\\\n Saturday: 7:00 a.m. â 10:30 a.m. \\\\n Sunday: 8:00 a.m. â 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-mercury-news-for-mobile/id4799551.9959?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.sanjosemercurynews"}]}
5,"bostonherald.com":{"code":"BH","logo":"BH_Logo.png","title":"Boston Herald","tribune":false,"cluster":["lowellsun.com","sentinelandenterprise.com"],"clusterName":"Boston","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"617-619-6265","email":"[email protected]","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday â Friday 7:30 a.m. â 6:00 p.m. \\\\n Saturday 6:30 a.m. â 11:00 a.m. \\\\n Sunday 6:30 a.m. â 12:00 12 p.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/boston-herald/id1471216824?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.doapps.android.mln.MLN_42b39fdb198522d2bfc6b1f64cd98365"}]},"lowellsun.com":{"code":"LS","logo":"LS_Logo.png","title":"Lowell Sun","tribune":false,"cluster":["bostonherald.com","sentinelandenterprise.com"],"clusterName":"Boston","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"978-459-1300","email":"[email protected]","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday â Friday 7:30 a.m. â 6 p.m. \\\\n Saturday 6:30 a.m. â 11 a.m. \\\\n Sunday 6:30 a.m. â 12 p.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/lowell-sun-news-for-mobile/id502959997?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.lowellsunnews"}]},"sentinelandenterprise.com":{"code":"SE","logo":"SE_Logo.png","title":"Sentinel & Enterprise","tribune":false,"cluster":["bostonherald.com","lowellsun.com"],"clusterName":"Boston","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"978-343-6911","email":"[email protected]","address1":"P.O. Box 4004","address2":"Westford, MA 01886","timeZone":"Eastern","supportHours":" Monday â Friday: 7:30 a.m. to 6 p.m. \\\\n Saturday â Sunday: 6:30 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/sentinel-and-enterprise/id507306870?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.sentinelenterprise"}]},"denverpost.com":{"code":"DP","logo":"DP_Logo.png","title":"The Denver Post","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com","mercurynews.com","ocregister.com","bostonherald.com","twincities.com","readingeagle.com"],"clusterName":"Denver","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"303-832-3232","email":"[email protected]","address1":"5990 Washington St.","address2":"Denver, CO 80216","timeZone":"Mountain","supportHours":" Monday - Friday: 6:30 a.m. - 5 p.m. \\\\n Saturday & holidays: 7 a.m. - 10 a.m. \\\\n Sunday: 8:30 a.m. - 11 a.m. "},"apps":[{"app_store":"https://apps.apple.com/us/app/denver-post/id375264133?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.ap.denverpost"}]},"dailycamera.com":{"code":"BDC","logo":"BDC_Logo.png","title":"Boulder Daily Camera","tribune":false,"cluster":["greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"303-444-3444","email":"[email protected]","address1":"PO Box 19199","address2":"Boulder CO, 80308","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/boulder-daily-camera/id405275092?mt=8","play_store":"https://market.android.com/detail
5s?id=com.spreedinc.providers.digitalfirstmedia.dailycamera"}]},"greeleytribune.com":{"code":"GRE","logo":"GRE_Logo.png","title":"Greeley Tribune","tribune":false,"cluster":["dailycamera.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-352-8089","email":"[email protected]","address1":"PO Box 337228","address2":"Greeley, CO 80633-7228","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"","play_store":""}]},"reporterherald.com":{"code":"LRH","logo":"LRH_Logo.png","title":"Loveland Reporter-Herald","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","timescall.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-635-3660","email":"[email protected]","address1":"P.O. Box 59","address2":"Loveland, CO 80539","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/loveland-reporter-herald-for/id514599798?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.lovelandreporterherald"}]},"timescall.com":{"code":"LTC","logo":"LTC_Logo.png","title":"Longmont Times Call","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","canoncitydailyrecord.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"303-684-5358","email":"[email protected]","address1":"P.O. Box 299","address2":"Longmont, CO 80502","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/longmont-times-call-for-mobile/id514597776?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.longmonttimescall"}]},"canoncitydailyrecord.com":{"code":"CDR","logo":"CDR_Logo.png","title":"Cañon City Daily Record","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","eptrail.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"719-275-7565","email":"","address1":"The Hive, 729 Main St.","address2":"Cañon City, CO. 81212","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/canon-city-daily-record/id514585870?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.canoncitydailyrecord"}]},"eptrail.com":{"code":"EP","logo":"EP_Logo.png","title":"Estes Park Trail-Gazette","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","fortmorgantimes.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-586-3356","email":"[email protected]","address1":"P.O. Box 1707","address2":"Estes Park, CO 80517","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"","play_store":""}]}
5,"fortmorgantimes.com":{"code":"FMT","logo":"FMT_Logo.png","title":"Fort Morgan Times","tribune":false,"cluster":["dailycamera.com","greeleytribune.com","reporterherald.com","timescall.com","canoncitydailyrecord.com","eptrail.com","journal-advocate.com"],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-867-5651","email":"","address1":"P.O. Box 495","address2":"Sterling, CO 80751","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/co/app/fort-morgan-times-for-mobile/id509595449?l=en&mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.fortmorgantimes"}]},"journal-advocate.com":{"code":"SJA","logo":"SJC_Logo.png","title":"Sterling Journal Advocate","tribune":false,"cluster":[],"clusterName":"PMP","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"970-522-1990","email":"","address1":"P.O. Box 495","address2":"Sterling, CO 80751","timeZone":"Mountain","supportHours":" Mon. â Fri. 6:30 a.m. â 3 p.m. \\\\n Sat. 7 a.m. â 10 a.m. \\\\n Sun. 8:30 a.m. â 11a.m. \\\\n Holidays 7 a.m. â 10 a.m."},"apps":[{"app_store":"https://itunes.apple.com/us/app/journal-advocate/id509598546?mt=8","play_store":"https://market.android.com/details?id=com.spreedinc.providers.digitalfirstmedia.journaladvocate"}]},"chicoer.com":{"code":"ER","logo":"EP_Logo.png","title":"Estes Park Trail-Gazette","tribune":false,"cluster":["orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-879-7888","email":"[email protected]","address1":"400 E. Park Ave.","address2":"Chico, CA 95928","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/chico-enterprise-record/id499663248?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.chicoenterpriserecord"}]},"orovillemr.com":{"code":"MR","logo":"ORO_Logo.png","title":"Oroville Mercury Register","tribune":false,"cluster":["chicoer.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-879-7888","email":"[email protected]","address1":"400 E. Park Ave.","address2":"Chico, CA 95928","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 5:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]},"redbluffdailynews.com":{"code":"RB","logo":"RBDN_Logo.png","title":"Red Bluff Daily News","tribune":false,"cluster":["chicoer.com","orovillemr.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-737-5047","email":"[email protected]","address1":"PO Box 885","address2":"Red Bluff, CA 96080","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]}
5,"record-bee.com":{"code":"BEE","logo":"RB_Logo.png","title":"Lake County Record-Bee","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-263-5636","email":"[email protected]","address1":"","address2":"","timeZone":"Pacific","supportHours":" Monday - Friday: 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]},"montereyherald.com":{"code":"HERALD","logo":"MH_Logo.png","title":"Monterey Herald","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"831-646-1808","email":"[email protected]","address1":"2555 Garden Road Suite D","address2":"Monterey, CA 93940","timeZone":"Pacific","supportHours":" Monday - Friday: 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/monterey-county-herald/id507305181?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.montereyherald"}]},"santacruzsentinel.com":{"code":"SCS","logo":"SCS_Logo.png","title":"Santa Cruz Sentinel","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"831-706-3201","email":"[email protected]","address1":"318 Encinal St.","address2":"Santa Cruz, CA 95060","timeZone":"Pacific","supportHours":" Monday - Friday: 7:00 a.m. to 5:00 p.m. \\\\n Saturday: Closed \\\\n Sunday & holidays: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/santa-cruz-sentinel-for-mobile/id499677382?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.santacruzsentinel"}]},"times-standard.com":{"code":"TS","logo":"TSTD_Logo.png","title":"Eureka Times-Standard","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-441-0550","email":"[email protected]","address1":"39 Fifth St.","address2":"Eureka, CA 95501","timeZone":"Pacific","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/eureka-times-standard/id499669816?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.eurekatimesstandard"}]},"ukiahdailyjournal.com":{"code":"UK","logo":"UK_Logo.png","title":"Ukiah Daily Journal","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","thereporter.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-468-3500","email":"[email protected]","address1":"415 Talmage Road Ste A","address2":"Ukiah, CA 95482","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/ukiah-daily-journal/id503016816?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.ukiahdailyjournal"}]}
5,"thereporter.com":{"code":"VR","logo":"TR_Logo.png","title":"Vacaville Reporter","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","timesheraldonline.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-448-8566","email":"[email protected]","address1":"57 Commerce Place, Ste. A","address2":"Vacaville, CA 95687","timeZone":"Pacific","supportHours":" Monday 8:00 a.m. to 4:00 p.m. \\\\n Tuesday through Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/vacaville-reporter/id499680399?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.californianewspaperpartnership.vacavillereporter"}]},"timesheraldonline.com":{"code":"VT","logo":"THO_Logo.png","title":"Vallejo Times-Herald","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","dailydemocrat.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"707-644-5478","email":"[email protected]","address1":"425A Virginia St.","address2":"Vallejo, CA 94590","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/vallejo-times-herald-news/id508566566?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.vallejotimesherald"}]},"dailydemocrat.com":{"code":"WD","logo":"DD_Logo.png","title":"Woodland Daily Democrat","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","paradisepost.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-406-6205","email":"[email protected]","address1":"725 Main Street, Suite 222","address2":"Woodland, CA 95695","timeZone":"Pacific","supportHours":" Monday 8:00 a.m. to 4:00 p.m. \\\\n Tuesday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/daily-democrat-for-mobile/id507295340?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.dailydemocrat"}]},"paradisepost.com":{"code":"PP","logo":"PP_Logo.png","title":"Paradise Post","tribune":false,"cluster":["chicoer.com","orovillemr.com","redbluffdailynews.com","record-bee.com","montereyherald.com","santacruzsentinel.com","times-standard.com","ukiahdailyjournal.com","thereporter.com","timesheraldonline.com","dailydemocrat.com"],"clusterName":"Norcal","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"530-879-7888","email":"","address1":"P.O. Box 9","address2":"Chico, CA 95927","timeZone":"Pacific","supportHours":" Monday - Friday 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday, 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"","play_store":""}]},"dailybulletin.com":{"code":"IVDB","logo":"DBU_Logo.png","title":"Inland Valley Daily Bulletin","tribune":false,"cluster":["dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"909-987-9900","email":"[email protected]","address1":"3200 Guasti Rd. Suite 100","address2":"Ontario, CA 91761","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/inland-valley-daily-bulletin/id503648014?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstemedia.inlandvalleydailybulletin"}]},"sandiegouniontribune.com":{"code":"SDUT","logo":"SDUT_Logo.png","t
5itle":"San Diego Union Tribune","tribune":false,"cluster":["dailybulletin.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","dailynews.com"],"clusterName":"SCNG","benefits":["e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(619) 299-4141","email":"[email protected]","address1":"600 B St","address2":"San Diego, CA 92101","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-san-diego-union-tribune/id1145952888","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.sdut&hl=en_US&pli=1"}]},"dailynews.com":{"code":"LADN","logo":"DN_Logo.png","title":"SDUT","tribune":false,"cluster":["dailybulletin.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"818-713-3000","email":"[email protected]","address1":"181 E. Huntington Drive, Suite 209","address2":"Monrovia, CA 91016","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/los-angeles-daily-news/id502957174?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.ladailynews"}]},"presstelegram.com":{"code":"LBPT","logo":"PT_Logo.png","title":"Long Beach Press-Telegram","tribune":false,"cluster":["dailybulletin.com","dailynews.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"562-435-1161","email":"[email protected]","address1":"5150 E. Pacific Coast Highway, Suite 200","address2":"Long Beach CA 90804","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/long-beach-press-telegram/id502958939?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.longbeachpresstelegram"}]},"ocregister.com":{"code":"OCR","logo":"OCR_Logo.png","title":"Orange County Register","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"714-796-7000","email":"[email protected]","address1":"1920 Main Street, Suite 225","address2":"Irvine, CA 92614","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/ocregister/id380372599?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.freedom.ocregister"}]}
5,"pressenterprise.com":{"code":"PE","logo":"PE_Logo.png","title":"Press Enterprise","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"951-368-9000","email":"[email protected]","address1":"3512 14th Street","address2":"Riverside, CA 92501","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-press-enterprise/id1218912043?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.doapps.android.mln.MLN_7c590f01490190db0ed02a5070e20f01"}]},"pasadenastarnews.com":{"code":"PSN","logo":"PSN_Logo.png","title":"Pasadena Star-News","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"626-578-6300","email":"[email protected]","address1":"177 E. Colorado Blvd.","address2":"Pasadena, CA 91105","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/ocregister/id380372599?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.pasadenastarnews"}]},"redlandsdailyfacts.com":{"code":"RDF","logo":"RDF_Logo.png","title":"Redlands Daily Facts","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","sbsun.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"909-353-1641","email":"[email protected]","address1":"1255 W. Colton Ave.","address2":"Redlands, CA 92374","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/redlands-daily-facts/id502960941?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.redlandsdailyfacts"}]},"sbsun.com":{"code":"SBS","logo":"SBS_Logo.png","title":"San Bernardino Sun","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sgvtribune.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"909-889-9666","email":"[email protected]","address1":"473 E. Carnegie Drive, Suite 250","address2":"San Bernardino, CA 92408","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/silicon-valley-for-mobile/id502964313?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.sanbernardinosu
5n"}]},"sgvtribune.com":{"code":"SGVT","logo":"SGV_Logo.png","title":"San Gabriel Valley Tribune","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","dailybreeze.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"626-598-8826","email":"[email protected]","address1":"181 W. Huntington Drive, Suite 209","address2":"Monrovia, CA 91016","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/san-gabriel-valley-tribune/id50302551.998?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.sangabrielvalleytribune"}]},"dailybreeze.com":{"code":"TODB","logo":"DBR_Logo.png","title":"Torrance Daily Breeze","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","whittierdailynews.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"310-540-5511","email":"[email protected]","address1":"2615 Pacific Coast Highway #329","address2":"Hermosa Beach CA 90254","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/daily-breeze/id503015160?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.torrancedailybreeze"}]},"whittierdailynews.com":{"code":"WDN","logo":"WDN_Logo.png","title":"Whittier Daily News","tribune":false,"cluster":["dailybulletin.com","dailynews.com","presstelegram.com","ocregister.com","pressenterprise.com","pasadenastarnews.com","redlandsdailyfacts.com","sbsun.com","sgvtribune.com","dailybreeze.com","sandiegouniontribune.com"],"clusterName":"SCNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Reader Rewards","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"626-962-8811","email":"[email protected]","address1":"181 W. Huntington Drive, Suite 209","address2":"Monrovia, CA 91016","timeZone":"Pacific","supportHours":" Monday through Friday: 7 a.m. to 4 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/whittier-daily-news/id503668140?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.whittierdailynews"}]},"twincities.com":{"code":"PPST","logo":"TC_Logo.png","title":"St. Paul Pioneer Press","tribune":false,"cluster":[],"clusterName":"St. Paul","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts","Events"],"customerService":{"phone":"651-717-7377","email":"[email protected]","address1":"1 West Water St., Suite 200","address2":"St. Paul, MN 55107","timeZone":"Central","supportHours":" Monday through Friday: 6:30 a.m. to 5 p.m. \\\\n Saturday and holidays: 7 a.m. to 10 a.m. \\\\n Sunday: 8:30 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/st-paul-pioneer-press/id603264610?ls=1","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.digitalfirstmedia.stpaulpioneerpress"}]}
5,"baltimoresun.com":{"code":"200","logo":"BS_Logo.png","title":"The Baltimore Sun","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"443-692-9011","email":"[email protected]","address1":"PO Box 1377","address2":"Baltimore, MD 21278","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id496681035?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.bs&hl=en_US&gl=US"}]},"capitalgazette.com":{"code":"247","logo":"CG_Logo.png","title":"Capital Gazette","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"410-268-4800","email":"[email protected]","address1":"PO Box 1377","address2":"Baltimore, MD 21278","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"","play_store":""}]},"chicagotribune.com":{"code":"3CHITRIB","logo":"CTR_Logo.png","title":"Chicago Tribune","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"312-546-7900","email":"[email protected]","address1":"1000 Albion Avenue","address2":"Schaumburg, IL 60193-4549","timeZone":"Central","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id383137151?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.ct"}]},"courant.com":{"code":"6HrtCrnt","logo":"HC_Logo.png","title":"Hartford Courant","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"860-525-5555","email":"[email protected]","address1":"PO Box 569","address2":"Hartford, CT 06141","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id391113483?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.hc&hl=en_US&gl=US"}]},"dailypress.com":{"code":"7DPress","logo":"","title":"Daily Press","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"757 247-4800","email":"[email protected]","address1":"P.O. Box 2820","address2":"Norfolk, VA 23501","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id397500600?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.hrdp"}]},"growthspotter.com":{"code":"5GrowSpt","logo":"","title":"","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"","email":"","address1":"P.O. Box 2833","address2":"Orlando, FL 32803","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"","play_store":""}]},"mcall.com":{"code":"800","logo":"MC_Logo.png","title":"The Morning Call","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"610-820-6601","email":"[email protected]","address1":"P.O. Box 1260","address2":"Allentown, PA 18105-1260","timeZone":"Eastern","supp
5ortHours":" Monday - Friday: 7:00 a.m. to 4:00 p.m. \\\\n Saturday: Closed \\\\n Sunday: 7:30 a.m. to 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id501096172?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.amc"}]},"nydailynews.com":{"code":"850","logo":"NYDN_Logo.png","title":"New York Daily News","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"201-521-2851","email":"[email protected]","address1":"PO Box 7180","address2":"New York, NY 10008","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id354730788?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.freerange360.mpp.NYDN"}]},"orlandosentinel.com":{"code":"5OrlSent","logo":"OOS_Logo.png","title":"Orlando Sentinel","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"407-420-5353","email":"[email protected]","address1":"PO Box 2833","address2":"Orlando, FL 32802","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id402223551?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.os"}]},"pilotonline.com":{"code":"7VAPilot","logo":"","title":"","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"757-446-9000","email":"[email protected]","address1":"PO Box 2833","address2":"Orlando, FL 32802","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"","play_store":""}]},"sun-sentinel.com":{"code":"4SunSent","logo":"SS_Logo.png","title":"Sun Sentinel","tribune":true,"cluster":[],"clusterName":"Tribune","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"954-375-2018","email":"[email protected]","address1":"333 SW 12th Ave.","address2":"Deerfield Beach, FL 33442","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/app/apple-store/id402230662?pt=30532&ct=our-app-email&mt=8","play_store":"https://play.google.com/store/apps/details?id=com.apptivateme.next.sfss"}]},"republicanherald.com":{"code":"PR","logo":"PR_Logo.png","title":"Republican Herald","tribune":false,"cluster":["standardspeaker.com","citizensvoice.com","thetimes-tribune.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"570-622-3456 | 1-800-622-1737","email":"[email protected]","address1":"23 S. Centre St., 2nd Floor","address2":"Pottsville, PA 17901","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/pottsville-republican-herald/id821007739","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.republicanherald&hl=en_US&pli=1"}]},"standardspeaker.com":{"code":"SS","logo":"SSK_Logo.png","title":"Standard-Speaker","tribune":false,"cluster":["republicanherald.com","citizensvoice.com","thetimes-tribune.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"570-455-3636 | 800-843-6680","email":"[email protected]","address1":"21 N. Wyoming St.","address2":"Hazleton, PA 18201","timeZone":"Eastern","supp
5ortHours":""},"apps":[{"app_store":"https://apps.apple.com/us/app/the-hazleton-standard-speaker/id821012052","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.standardspeaker&hl=en_US"}]},"citizensvoice.com":{"code":"CV","logo":"CV_Logo.png","title":"Citizens\' Voice","tribune":false,"cluster":["republicanherald.com","standardspeaker.com","thetimes-tribune.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":" (570) 821-2010","email":"[email protected]","address1":"75 N. Washington St.","address2":"Wilkes-Barre, PA 18701","timeZone":"Eastern","supportHours":"Monday through Friday, 7 a.m. to 4 p.m.Sunday, 7 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/citizens-voice/id859248069","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.citizensvoice&hl=en_US"}]},"thetimes-tribune.com":{"code":"ST","logo":"ST_Logo.png","title":"Scranton Times-Tribune","tribune":false,"cluster":["republicanherald.com","standardspeaker.com","citizensvoice.com","wcexaminer.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"1-800-228-4637","email":"[email protected]","address1":"305 Linden St.","address2":"Scranton, PA 18503","timeZone":"Eastern","supportHours":"Monday through Friday, 7 a.m. to 4 p.m.Sunday, 7 a.m. to 11 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/citizens-voice/id859248069","play_store":"https://play.google.com/store/apps/details?id=com.spreedinc.providers.timesshamrockcommunications.citizensvoice&hl=en_US"}]},"wcexaminer.com":{"code":"WCE","logo":"WCE_Logo.png","title":"Wyoming County Examiner","tribune":false,"cluster":["republicanherald.com","standardspeaker.com","thetimes-tribune.com","citizensvoice.com"],"clusterName":"NEPA","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(570) 836-2123","email":"[email protected]","address1":"16 East Tioga St.","address2":"Tunkhannock, PA 18657","timeZone":"Eastern","supportHours":"Monday through Friday, 7 a.m. to 4 p.m.Sunday, 7 a.m. to 11 a.m."},"apps":[]},"pressdemocrat.com":{"code":"PD","logo":"PD_Logo.png","title":"The Press Democrat","tribune":false,"cluster":["sonomanews.com","petalumanews.com"],"clusterName":"PDNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(707) 575-7500","email":"[email protected]","address1":"416 B Street","address2":"Santa Rosa, CA 95401","timeZone":"Pacific","supportHours":"Monday - Friday 7:00 a.m. - 5:00 p.m. \\\\n Saturday 7:00 a.m. - 10:30 a.m. \\\\n Sunday 7:30 a.m. - 10:30 a.m. \\\\n Holidays 7:30 a.m. - 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-press-democrat-eedition/id591168598","play_store":"https://play.google.com/store/apps/details?id=com.santarosapressdemocrat.android.prod"}]},"sonomanews.com":{"code":"SIT","logo":"SIT_Logo.png","title":"Sonoma Index-Tribune","tribune":false,"cluster":["pressdemocrat.com","petalumanews.com"],"clusterName":"PDNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(707) 575-7500","email":"[email protected]","address1":"416 B Street","address2":"Santa Rosa, CA 95401","timeZone":"Pacific","supportHours":"Monday - Friday 7:00 a.m. - 5:00 p.m. \\\\n Saturday 7:00 a.m. - 10:30 a.m. \\\\n Sunday 7:30 a.m. - 10:30 a.m. \\\\n Holidays 7:30 a.m. - 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/the-sonoma-index-tribune/id959583528","play_store":"https://play.google.com/store/apps/details?id=com.sonomaindextribune.android.prod"}]}
5,"petalumanews.com":{"code":"AC","logo":"AC_Logo.png","title":"Petaluma Argus Courier","tribune":false,"cluster":["pressdemocrat.com","sonomanews.com"],"clusterName":"PDNG","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"(707) 575-7500","email":"[email protected]","address1":"416 B Street","address2":"Santa Rosa, CA 95401","timeZone":"Pacific","supportHours":"Monday - Friday 7:00 a.m. - 5:00 p.m. \\\\n Saturday 7:00 a.m. - 10:30 a.m. \\\\n Sunday 7:30 a.m. - 10:30 a.m. \\\\n Holidays 7:30 a.m. - 10:30 a.m."},"apps":[{"app_store":"https://apps.apple.com/us/app/petaluma-argus-courier/id787425680","play_store":"https://play.google.com/store/apps/details?id=com.petalumaarguscourier.android.prod"}]},"mainlinemedianews.com":{"code":"MLTI","logo":"MLTI_Logo.png","title":"Mainline Media News","tribune":false,"cluster":["readingeagle.com","thereporteronline.com","timesherald.com","pottsmerc.com","trentonian.com","dailylocal.com","delcotimes.com"],"clusterName":"Pennsylvania","benefits":["e-Edition Archives","e-Edition","Account Sharing","Article Sharing","Ad-free Reading","Digital Access to 50+ Pubs","Home Delivery","Coupon & Inserts"],"customerService":{"phone":"610-371-5161","email":"[email protected]","address1":"390 Eagleview Blvd.","address2":"Exton, PA 19341","timeZone":"Eastern","supportHours":""},"apps":[{"app_store":"","play_store":""}]}}')}};const t={};function o(n){const r=t[n];if(void 0!==r)return r.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,o),i.exports}o.d=(e,t)=>{if(Array.isArray(t))for(var n=0;n<t.length;){var r=t[n++],i=t[n++],a=0===i?{enumerable:!0,value:t[n++]}:{enumerable:!0,get:i};o.o(e,r)||Object.defineProperty(e,r,a)}else for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e,t,n,r=o(467),i=o(4756),a=o(3153),s=o(3612),c=o(9532),l=o(2450),d={},u=window.location.hostname,p=l[u=u.replace("www.","").replace("preprod.","").replace("develop.","").replace("staging.","").replace("local","com").replace("vipdev.lndo.site","com")],m="https://ui-static-assets-prod.s3.us-west-1.amazonaws.com/img/",h=s.A.enableReaderDashboardv2?"/dashboard/support":"/user-tools/dashboard/#billing-payment-container",f='An error has occurred. Please try again. <br>\n\t<br>\n\tIf the issue persists,\n\tplease contact <a href="'.concat(h,'">customer service.</a>'),g=function(){var e=(0,r.A)(i.mark(function e(){var t,o,n,r,s;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,a.A.log("Article Saving | init"),e.next=1,(0,c.gQ)();case 1:if("page"!==(o=e.sent)){e.next=2;break}return a.A.log("Article Saving | page type is not home, section, article, exit"),e.abrupt("return");case 2:return e.next=3,(0,c.aG)();case 3:if((n=e.sent).token&&n.adfree){e.next=4;break}return a.A.log("Article Saving | not a premium subscriber, exit"),e.abrupt("return");case 4:return e.next=5,b(n);case 5:if(null!==(d=JSON.parse(sessionStorage.getItem("articleIds")))&&null!==(t=d)&&void 0!==t&&t.timestamp){e.next=7;break}return d={},e.next=6,y();case 6:e.next=8;break;case 7:E(d.timestamp);case 8:if(a.A.log("Article Saving | page type is ",o),"article"===o){e.next=9;break}return a.A.log("Article Saving | page type is not article, exit"),e.abrupt("return");case 9:return a.A.log("Article Saving | page type is ",o),r=R,e.next=10,A();case 10:r(e.sent),e.next=12;break;case 11:throw e.prev=11,s=e.catch(0),a.A.error("Error during Article Saving initialization:",s),new Error("Article Saving initialization failed");case 12:case"end":return e.stop()}},e,null,[[0,11]])}));return function(){return e.apply(this,arguments)}}(),y=function(){var t=(0,r.A)(i.mark(function t(){var o,n,r,l,d;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a.A.log("Article Saving | session data expired or missing - fetch articles ",e),e){t.next=1;break}return a.A.log("Article Saving | unable to get decodedUser - exit fetch"),t.abrupt("return");case 1:return t.next=2,(0,c.L4)("Publisher Domain");case 2:return o=t.sent,n=encodeURIComponent(e.uuid),r="".concat(s.A.entitlementsEndpoint,"savedArticles/?authId=").concat(n,"&domain=").concat(o),t.next=3,fetch(r,{method:"GET",headers:{"X-Api-Key":s.A.entitlementsApiKey}});case 3:if(200!==(l=t.sent).status){t.next=5;break}
5return t.next=4,l.json();case 4:d=t.sent,v(d.articles),t.next=6;break;case 5:a.A.log("Article Saving | error in fetch");case 6:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),v=function(e){var t=new Date;d.timestamp=t.getTime(),d.articles=e,a.A.log("Article Saving | set session data ",d),sessionStorage.setItem("articleIds",JSON.stringify(d))},A=function(){var e=(0,r.A)(i.mark(function e(){var o,r,s,l,u,p,m;return i.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a.A.log("Article Saving | create button"),o=document.querySelector(".articleSave"),r=!0,null===o&&(r=!1,o=document.createElement("span")),s=document.querySelector("#articleSaveContainer"),l=document.querySelector("#stickyArticleSaveContainer"),s?s.replaceChildren():(s=document.createElement("div")).setAttribute("id","articleSaveContainer"),l?l.replaceChildren():(l=document.createElement("div")).setAttribute("id","stickyArticleSaveContainer"),e.next=1,(0,c.L4)("Content ID");case 1:return t=e.sent,n=d.articles.find(function(e){return e.contentId===t}),a.A.log("Article Saving | check if article already saved ",d,n),n?(o.className="icon-bookmark2 removeSavedArticleButton articleSave",o.setAttribute("aria-pressed","true"),o.setAttribute("data-mng-click","remove-article-saved"),o.setAttribute("data-mng-category","saved-articles"),o.setAttribute("data-mng-action","remove-article-saved"),o.setAttribute("aria-label","This article is saved. Click again to remove from your saved list"),o.setAttribute("title","This article is saved. Click again to remove from your saved list."),u="deleteArticle"):(o.className="icon-bookmark3 saveArticleButton articleSave",o.setAttribute("aria-pressed","false"),o.setAttribute("data-mng-click","save-article"),o.setAttribute("data-mng-category","saved-articles"),o.setAttribute("data-mng-action","save-article"),o.setAttribute("aria-label","Save this article to read later."),o.setAttribute("title","Save this article to read later."),u="saveArticle"),o.setAttribute("tabindex","0"),r||(p=document.querySelector(".article-bottom-share .sd-sharing-enabled"),m=document.querySelector(".article-share .sd-sharing-enabled"),s.append(o.cloneNode(!0)),l.append(o),p&&p.insertBefore(s,p.firstChild),m&&m.insertBefore(l,m.firstChild)),e.abrupt("return",u);case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),w=function(){var o=(0,r.A)(i.mark(function o(){var n,r,l,u,h,g,y,S,b,E,C,N;return i.wrap(function(o){for(;;)switch(o.prev=o.next){case 0:if(a.A.log("Article Saving | begin article save"),n=Array.from(document.querySelectorAll(".saveArticleButton")),e){o.next=1;break}return a.A.log("Article Saving | unable to get decodedUser - exit save"),(0,c.mP)({title:"Please try logging in again.",text:"",id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"OK!"}),o.abrupt("return",!1);case 1:if(!d){o.next=2;break}if(10!==d.articles.length){o.next=2;break}return a.A.log("Article Saving | reached max articles"),r=s.A.enableReaderDashboardv2?"/dashboard/saved-articles":"/user-tools/dashboard/#subscriber-benefits-container/?openOnLoad=ArticleSection",(0,c.mP)({title:"Out of Space",text:'You are out of space in your Saved Articles List.<br>\n\t\t\t\t<br>\n\t\t\t\tPlease remove articles from your list on the <a href="'.concat(r,'">Reader Dashboard.</a>'),id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"I'll do this later.",autoDismiss:!1,closeButtonIcon:!0}),o.abrupt("return",!1);case 2:return n.forEach(function(e){e.removeEventListener("click",w)}),_(".icon-bookmark3.saveArticleButton"),l="".concat(s.A.entitlementsEndpoint,"savedArticles"),o.next=3,(0,c.L4)("Publisher Domain");case 3:return u=o.sent,h={userId:e.uuid,publication:u,contentId:t},a.A.log("Article saving | attempting save the request is",h,l),o.prev=4,o.next=5,fetch(l,{method:"POST",headers:{"X-Api-Key":s.A.entitlementsApiKey},body:JSON.stringify(h)});case 5:return g=o.sent,o.next=6,g.json();case 6:if(y=o.sent,200!==g.status){o.next=8;break}return d&&v(y.upDatedArticleList),o.next=7,A();case 7:return S=o.sent,Array.from(document.querySelectorAll(".articleSave")).forEac
5h(function(e){T(e,"article-save-click-success")}),R(S),a.A.log("Updated Saved Article list",y.upDatedArticleList.length),10===y.upDatedArticleList.length?(b=s.A.enableReaderDashboardv2?"/dashboard/saved-articles":"/user-tools/dashboard/#billing-payment-container?openOnLoad=ArticleSection",(0,c.mP)({title:"This article has been saved.",text:'This article has been saved. <br>\n\t\t\t\t\t<br>\n\t\t\t\t\tYou are now out of space in your\n\t\t\t\t\t<a href="'.concat(b,'">Saved Articles list</a>.\n\t\t\t\t\tYou will need to remove items from the list before you can add more.<br>\n\t\t\t\t\t<br>\n\t\t\t\t\tYou can save even more articles on our mobile app.\n\t\t\t\t\t<div class=\'modal-badge-containers\'>\n\t\t\t\t\t\t\t<a href=""></a>\n\t\t\t\t\t\t\t').concat(p.apps[0].play_store?"<a href=".concat(p.apps[0].play_store," target='_blank'>\n\t\t\t\t\t\t\t\t\t<img class='badge-h' src=","".concat(m,"google-play-store-badge.svg")," />\n\t\t\t\t\t\t\t\t</a>"):"","\n\t\t\t\t\t\t\t").concat(p.apps[0].app_store?"<a href=".concat(p.apps[0].app_store," target='_blank'>\n\t\t\t\t\t\t\t\t<img class='badge-h' id='app-store-badge' src=","".concat(m,"app-store-badge-US-UK.svg")," />\n\t\t\t\t\t\t\t</a>"):"","\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>"),id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"I'll do this later.",autoDismiss:!1,closeButtonIcon:!0})):(0,c.mP)({title:"",text:"This article has been saved.",boldText:!0,id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,autoDismiss:!0,buttonText:"OK!"}),a.A.log("Article saving | Success! The response is",y),o.abrupt("return",y);case 8:if(422!==g.status){o.next=10;break}return a.A.log("Article Saving |reached max articles"),E=s.A.enableReaderDashboardv2?"/dashboard/saved-articles":"/user-tools/dashboard/#billing-payment-container/?openOnLoad=ArticleSection",(0,c.mP)({title:"Out of Space",text:'You are out of space in your Saved Articles List. <br>\n\t\t\t\t\t<br>\n\t\t\t\t\tPlease remove articles from your list on the <a href="'.concat(E,"\">Reader Dashboard.</a><br>\n\t\t\t\t\t<br>\n\t\t\t\t\tYou can save even more articles on our mobile app.\n\t\t\t\t<div class='modal-badge-containers'>\n\t\t\t\t\t").concat(p.apps[0].play_store?"\t\t\t\t<a href=".concat(p.apps[0].play_store," target='_blank'>\n\t\t\t\t\t\t\t\t\t<img class='badge-h' src=","".concat(m,"google-play-store-badge.svg")," />\n\t\t\t\t\t\t\t</a>"):"","\n\t\t\t\t\t\t\t").concat(p.apps[0].app_store?"<a href=".concat(p.apps[0].app_store," target='_blank'>\n\t\t\t\t\t\t\t\t\t<img class='badge-h' id='app-store-badge' src=","".concat(m,"app-store-badge-US-UK.svg")," />\n\t\t\t\t\t\t\t\t</a>"):"","\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t"),id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"I'll do this later.",autoDismiss:!1,closeButtonIcon:!0}),n.forEach(function(e){e.addEventListener("click",w)}),o.next=9,A();case 9:return C=o.sent,Array.from(document.querySelectorAll(".articleSave")).forEac
5h(function(e){T(e,"article-save-422")}),R(C),o.abrupt("return",y);case 10:if(g.ok){o.next=11;break}return(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),Array.from(document.querySelectorAll(".articleSave")).forEach(function(e){e.setAttribute("data-mng-click","article-save-fail")}),n.forEach(function(e){e.addEventListener("click",w)}),a.A.log("Article saving | the response is",g.statusText),o.abrupt("return",y);case 11:return o.abrupt("return",!1);case 12:return o.prev=12,N=o.catch(4),(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),a.A.log("Article saving | save endpoint Failure: ",N),o.abrupt("return",new Error("Article saving | save article endpoint failure"));case 13:case"end":return o.stop()}},o,null,[[4,12]])}));return function(){return o.apply(this,arguments)}}(),S=function(){var t=(0,r.A)(i.mark(function t(){var o,r,l,u,p,m,h,g;return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(a.A.log("Article Saving | begin article delete"),document.querySelectorAll(".removeSavedArticleButton").forEach(function(e){e.removeEventListener("click",S)}),e){t.next=1;break}return a.A.log("Article Saving | unable to get decodedUser - exit save"),(0,c.mP)({title:"",text:"Please log in again.",boldText:!0,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),t.abrupt("return",!1);case 1:return o="".concat(s.A.entitlementsEndpoint,"savedArticles"),_(".icon-bookmark2.removeSavedArticleButton"),t.next=2,(0,c.L4)("Publisher Domain");case 2:return r=t.sent,l={userId:e.uuid,savedDate:n.savedDate,publication:r},a.A.log("Article saving | attempting delete the request is",l,o),t.prev=3,t.next=4,fetch(o,{method:"DELETE",headers:{"X-Api-Key":s.A.entitlementsApiKey},body:JSON.stringify(l)});case 4:return u=t.sent,t.next=5,u.json();case 5:if(p=t.sent,200!==u.status){t.next=7;break}return a.A.log("Article saving | delete success",p),d&&v(p.upDatedArticleList),m=R,t.next=6,A();case 6:return m(t.sent),(0,c.mP)({title:"",text:"This article has been removed from your Saved Articles list.",boldText:!0,id:"saveArticleModal",fullScreen:!1,appendToId:"page",closeConfirm:!0,buttonText:"OK!",autoDismiss:!0}),t.abrupt("return",p);case 7:if(u.ok){t.next=9;break}return(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),a.A.log("Article saving | delete ERROR the response is",u.statusText),h=R,t.next=8,A();case 8:return h(t.sent),t.abrupt("return",p);case 9:return t.abrupt("return",!1);case 10:return t.prev=10,g=t.catch(3),(0,c.mP)({title:"",text:f,id:"saveArticleModal",fullScreen:!1,appendToId:"page"}),a.A.log("Article saving | deleteArticle endpoint Failure: ",g),t.abrupt("return",new Error("Article saving | delete article endpoint failure"));case 11:case"end":return t.stop()}},t,null,[[3,10]])}));return function(){return t.apply(this,arguments)}}(),b=function(){var t=(0,r.A)(i.mark(function t(o){return i.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=1,(0,c.oL)(o.token);case 1:e=t.sent;case 2:case"end":return t.stop()}},t)}));return function(e){return t.apply(this,arguments)}}(),E=function(e){a.A.log("Article Saving | checking time stamp, ",e);var t=(new Date-new Date(e))/6e4;a.A.log("Article Saving | time difference is ",t),t>3&&(a.A.log("Article Saving | session outdated, fetching"),y())}
5,_=function(e){Array.from(document.querySelectorAll(e)).forEach(function(e){var t=document.createElement("div");t.classList.add("spring-spinner"),t.id="articleSaveSpinner",t.innerHTML='\n\t\t<div class="spring-spinner-part top">\n\t\t<div class="spring-spinner-rotator"></div>\n\t\t</div>\n\t\t<div class="spring-spinner-part bottom">\n\t\t<div class="spring-spinner-rotator"></div>\n\t\t</div>',e.parentNode.replaceChild(t,e)})},T=function(e,t){e.setAttribute("data-mng-click",t),e.click(),e.removeAttribute("data-mng-click")},R=function(e){Array.from(document.querySelectorAll(".articleSave")).forEach(function(t){"saveArticle"===e?t.addEventListener("click",w):"deleteArticle"===e&&t.addEventListener("click",S)})};document.addEventListener("DOMContentLoaded",g)})()})(); 6//# sourceMappingURL=mng-digisubs.articleSave.bundle.js.map;
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.