(function(){var e,aa="function"==typeof Object.create?Object.create:function(a){function b(){}b.prototype=a;return new b};function ba(a){for(var b=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global],c=0;c<b.length;++c){var d=b[c];if(d&&d.Math==Math)return}(function(){throw Error("Cannot find global object");})()}ba(this);"function"===typeof Symbol&&Symbol("x");var ca; if("function"==typeof Object.setPrototypeOf)ca=Object.setPrototypeOf;else{var da;a:{var ea={a:!0},fa={};try{fa.__proto__=ea;da=fa.a;break a}catch(a){}da=!1}ca=da?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}var ha=ca;function ia(a,b){b=void 0===b?0:b;for(var c=this.length,d=0<=b?b:Math.max(c+b,0);d<c;d++){var f=this[d];if(f===a||a!==a&&f!==f)return!0}return!1};function ja(a,b){if(void 0===b?this.contains(a):!b)return this.remove(a),!1;this.add(a);return!0};function ka(a){return a==this||this.documentElement.contains(a)};function la(a){return(a=Number(a))?0<a?1:-1:a};var ma=Object.prototype.hasOwnProperty;function na(a,b){if(null==a)throw new TypeError("Cannot convert undefined or null to object");for(var c=Object(a),d=1;d<arguments.length;d++){var f=arguments[d];if(null!=f)for(var g in f)ma.call(f,g)&&(c[g]=f[g])}return c};var oa=Object.prototype.hasOwnProperty;function pa(a){if(null==a)throw new TypeError("Cannot convert undefined or null to object");var b=[],c;for(c in a)oa.call(a,c)&&b.push(a[c]);return b};function n(a){if(!(this instanceof n))throw new TypeError("Constructor Promise requires `new`");if(!qa(a))throw new TypeError("Must pass resolver function");this._state=ra;this._value=[];this._isChainEnd=!0;ta(this,ua(this,va),ua(this,wa),{then:a})}n.prototype.then=function(a,b){a=qa(a)?a:void 0;b=qa(b)?b:void 0;if(a||b)this._isChainEnd=!1;return this._state(this._value,a,b)};n.prototype.catch=function(a){return this.then(void 0,a)}; function xa(a){return a===Object(a)&&a instanceof this?a:new this(function(b){b(a)})}function ya(a){return new this(function(b,c){c(a)})}function za(a){var b=this;return new b(function(c,d){var f=a.length,g=Array(f);if(0===f)return c(g);Aa(a,function(h,k){b.resolve(h).then(function(l){g[k]=l;0===--f&&c(g)},d)})})}function Ba(a){var b=this;return new b(function(c,d){for(var f=0;f<a.length;f++)b.resolve(a[f]).then(c,d)})} function va(a,b,c,d){if(!b){if(b=d)b=b.promise,b._state=va,b._value=a;return this}d||(d=new Ca(this.constructor));Da(Ea(d,b,a));return d.promise}function wa(a,b,c,d){if(!c)return d&&(b=d.promise,b._state=wa,b._value=a),this;d||(d=new Ca(this.constructor));Da(Ea(d,c,a));return d.promise}function ra(a,b,c,d){if(!d){if(!b&&!c)return this;d=new Ca(this.constructor)}a.push({deferred:d,onFulfilled:b||d.resolve,onRejected:c||d.reject});return d.promise} function Ca(a){var b=this;this.promise=new a(function(c,d){b.resolve=c;b.reject=d});return b}function Fa(a,b,c,d){var f=a._value;a._state=b;a._value=c;d&&b===ra&&d._state(c,void 0,void 0,{promise:a,resolve:void 0,reject:void 0});for(var g=0;g<f.length;g++){var h=f[g];a._state(c,h.onFulfilled,h.onRejected,h.deferred)}f.length=0;d&&(d._isChainEnd=!1);b===wa&&a._isChainEnd&&setTimeout(function(){if(a._isChainEnd)throw c;},0)}function ua(a,b){return function(c){Fa(a,b,c)}}function Ga(){} function qa(a){return"function"===typeof a}function Aa(a,b){for(var c=0;c<a.length;c++)b(a[c],c)}function Ea(a,b,c){var d=a.promise,f=a.resolve,g=a.reject;return function(){try{var h=b(c);ta(d,f,g,h,h)}catch(k){g(k)}}} var Da=function(){function a(){for(var f=0;f<d;f++){var g=c[f];c[f]=null;g()}d=0}if("undefined"!==typeof window&&window.postMessage){window.addEventListener("message",a);var b=function(){window.postMessage("macro-task","*")}}else b=function(){setTimeout(a,0)};var c=Array(16),d=0;return function(f){0===d&&b();c[d++]=f}}(); function ta(a,b,c,d,f){var g=c,h;try{if(d===a)throw new TypeError("Cannot fulfill promise with itself");var k=d===Object(d);if(k&&d instanceof a.constructor)Fa(a,d._state,d._value,d);else if(k&&(h=d.then)&&qa(h)){var l=function(m){l=g=Ga;ta(a,b,c,m,m)};g=function(m){l=g=Ga;c(m)};h.call(f,function(m){l(m)},function(m){g(m)})}else b(d)}catch(m){g(m)}};(function(a){/Trident|MSIE|IEMobile/i.test(a.navigator.userAgent)&&a.DOMTokenList&&a.Object.defineProperty(a.DOMTokenList.prototype,"toggle",{enumerable:!1,configurable:!0,writable:!0,value:ja})})(self);(function(a){a.Math.sign||a.Object.defineProperty(a.Math,"sign",{enumerable:!1,configurable:!0,writable:!0,value:la})})(self);(function(a){a.Object.assign||a.Object.defineProperty(a.Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:na})})(self); (function(a){a.Object.values||a.Object.defineProperty(a.Object,"values",{enumerable:!1,configurable:!0,writable:!0,value:pa})})(self);(function(a){a.Promise||(a.Promise=n,n.default&&(a.Promise=n.default),a.Promise.resolve=xa,a.Promise.reject=ya,a.Promise.all=za,a.Promise.race=Ba)})(self);(function(a){a.HTMLDocument.prototype.contains||a.Object.defineProperty(a.HTMLDocument.prototype,"contains",{enumerable:!1,configurable:!0,writable:!0,value:ka})})(self); (function(a){a.Array.prototype.includes||a.Object.defineProperty(Array.prototype,"includes",{enumerable:!1,configurable:!0,writable:!0,value:ia})})(self);function q(){}e=q.prototype;e.getElement=function(){};e.init=function(){};e.resized=function(){};e.whenComplete=function(){};e.shouldFadeBody=function(){};e.hasLoadingIndicator=function(){};function Ha(a,b,c,d){return a.acceptResult().then(function(f){if(f.origin!=b||c&&!f.originVerified||d&&!f.secureChannel)throw Error("channel mismatch");return f.data})};function Ia(a){if(/swg.debug=1/.test(self.location.hash)){var b=Array.prototype.slice.call(arguments,0);b.unshift("[Subscriptions]");Ja.apply(Ja,b)}}function Ja(a){console.log.apply(console,arguments)}function t(a){console.warn.apply(console,arguments)} function u(a,b,c){var d;if(!a){var f=(b||"Assertion failed").split("%s"),g=f.shift(),h=g,k=[];""!=g&&k.push(g);for(g=2;g<arguments.length;g++){var l=arguments[g];l&&l.tagName&&(d=l);var m=f.shift();k.push(l);var p=m.trim();""!=p&&k.push(p);p=h;var r=(r=l)&&1==r.nodeType?r.tagName.toLowerCase()+(r.id?"#"+r.id:""):r;h=p+(r+m)}g=Error(h);g.fromAssert=!0;g.associatedElement=d;g.messageArray=k;throw g;}};function Ka(a,b){if(!a)return null;var c=a.length||0;if(0<c)for(var d=0;d<c;d++){var f=a[d];if(b(f,d,a))return f}return null};var La={"-":"+",_:"/"},Ma={"+":"-","/":"_","=":""};function Na(a){for(var b=new Uint8Array(a.length),c=0;c<a.length;c++){var d=a.charCodeAt(c);u(255>=d,"Characters must be in range [0,255]");b[c]=d}return b}function Oa(a){for(var b=Array(a.length),c=0;c<a.length;c++)b[c]=String.fromCharCode(a[c]);return b.join("")}function Pa(a){if("undefined"!==typeof TextDecoder)return(new TextDecoder("utf-8")).decode(a);var b=Oa(new Uint8Array(a));return decodeURIComponent(escape(b))} function Qa(a){return"undefined"!==typeof TextEncoder?(new TextEncoder("utf-8")).encode(a):Na(unescape(encodeURIComponent(a)))}function Ra(a){var b=atob(a.replace(/[-_]/g,function(c){return La[c]}));return Na(b)}function Sa(a){a=Oa(a);return btoa(a).replace(/[+/=]/g,function(b){return Ma[b]})};function Ta(){var a=Date.now().toString(16),b=a.substring(a.length-8).toUpperCase()+"-",c=0;a=new Uint8Array(23);var d=self.msCrypto?self.msCrypto:self.crypto;if(d&&d.getRandomValues)for(d.getRandomValues(a),d=a.length-1;-1<d;d--)a[d]%=16;else for(d=a.length-1;-1<d;d--)a[d]=Math.floor(16*Math.random());for(d=9;36>d;d++)switch(d){case 13:case 18:case 23:b+="-";break;case 14:b+="4";break;case 19:b+="0123456789ABCDEF"[a[c++]&3|8];break;default:b+="0123456789ABCDEF"[a[c++]]}return b} function Ua(a){var b,c=null==(b=self.crypto||self.msCrypto)?void 0:b.subtle;return c?c.digest("SHA-512",Qa(a)).then(function(d){for(var f=[],g=new DataView(d),h=0;h<g.byteLength;h+=4){var k=g.getUint32(h).toString(16);f.push(("00000000"+k).slice(-8))}return f.join("")}):(t("Swgjs only works on secure (HTTPS or localhost) pages."),Promise.reject("Swgjs only works on secure (HTTPS or localhost) pages."))};var Va,Wa="Webkit webkit Moz moz ms O o".split(" "),Xa={"align-content":"normal",animation:"none","align-items":"normal","align-self":"auto","alignment-baseline":"auto","backface-visibility":"hidden","background-clip":"border-box","background-image":"none","baseline-shift":"0","block-size":"auto",border:"none","border-collapse":"separate",bottom:"0","box-sizing":"border-box","break-after":"auto","break-before":"auto","break-inside":"auto","buffered-rendering":"auto","caption-side":"top","caret-color":"rgb(51, 51, 51)", clear:"none",color:"rgb(51, 51, 51)","color-rendering":"auto","column-count":"auto","column-fill":"balance","column-gap":"normal","column-rule-color":"rgb(51, 51, 51)","column-rule-style":"none","column-rule-width":"0","column-span":"none","column-width":"auto",contain:"none","counter-increment":"none","counter-reset":"none",cursor:"auto",direction:"inherit",display:"block","empty-cells":"show",filter:"none",flex:"none","flex-flow":"row nowrap","float":"none","flood-color":"rgb(0, 0, 0)","flood-opacity":"1", font:"none","font-size":"medium","font-family":"",height:"auto",hyphens:"manual","image-rendering":"auto","inline-size":"",isolation:"auto","justify-content":"normal","justify-items":"normal","justify-self":"auto","letter-spacing":"normal","lighting-color":"rgb(255, 255, 255)","line-break":"auto","line-height":"normal","margin-bottom":"0",mask:"none","max-block-size":"none","max-height":"none","max-inline-size":"none","max-width":"none","min-block-size":"none","min-height":"0","min-inline-size":"0", "min-width":"0","mix-blend-mode":"normal","object-fit":"fill","offset-distance":"none","offset-path":"none","offset-rotate":"auto 0deg",opacity:"1",order:"0",orphans:"2",outline:"none","overflow-anchor":"auto","overflow-wrap":"normal",overflow:"visible",padding:"0",page:"",perspective:"none","pointer-events":"auto",position:"static",quotes:"",resize:"none",right:"0","scroll-behavior":"auto","tab-size":"8","table-layout":"auto","text-align":"start","text-align-last":"auto","text-anchor":"start","text-combine-upright":"none", "text-decoration":"none","text-indent":"0","text-orientation":"mixed","text-overflow":"clip","text-rendering":"auto","text-shadow":"none","text-size-adjust":"auto","text-transform":"none","text-underline-position":"auto",top:"auto","touch-action":"auto",transform:"none",transition:"none 0s ease 0s","unicode-bidi":"normal","user-select":"auto","vector-effect":"none","vertical-align":"baseline",visibility:"visible","white-space":"normal",widows:"2","word-break":"normal","word-spacing":"0","word-wrap":"normal", "writing-mode":"horizontal-tb",zoom:"1","z-index":"auto"};function Ya(a,b,c){if(2>b.length?0:0==b.lastIndexOf("--",0))return b;Va||(Va=Object.create(null));var d=Va[b];if(!d||c){d=b;if(void 0===a[b]){var f=b.charAt(0).toUpperCase()+b.slice(1);a:{for(var g=0;g<Wa.length;g++){var h=Wa[g]+f;if(void 0!==a[h]){f=h;break a}}f=""}var k=f;void 0!==a[k]&&(d=k)}c||(Va[b]=d)}return d}function v(a,b){for(var c in b)a.style.setProperty(Ya(b,c),b[c].toString(),"important")} function Za(a,b,c){(b=Ya(a.style,b,void 0))&&(a.style[b]=c)}function $a(a,b){for(var c in b)Za(a,c,b[c])}function ab(a){var b={};["height"].forEach(function(c){b[c]=null});$a(a,b)};function w(a,b,c){b=a.createElement(b);for(var d in c)"style"==d?$a(b,c[d]):b.setAttribute(d,c[d]);return b}function bb(a,b){var c=w(a.getWin().document,"style",{type:"text/css"});c.textContent=b;a.getHead().appendChild(c)}function cb(a){var b=a.navigator;return/Edge/i.test(b&&b.userAgent)};/* Copyright 2017 The Web Activities Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ function x(a){return a&&"object"==typeof a?"AbortError"===a.name:!1}function db(a,b){b="AbortError"+(b?": "+b:"");var c=null;if("function"==typeof a.DOMException){var d=a.DOMException;try{c=new d(b,"AbortError")}catch(f){}}c||(c=Error(b),c.name="AbortError",c.code=20);return c}function eb(a,b,c,d,f,g){this.code=a;this.data="ok"==a?b:null;this.mode=c;this.origin=d;this.originVerified=f;this.secureChannel=g;this.ok="ok"==a;this.error="failed"==a?Error(String(b)||""):null}var fb; function gb(a){fb||(fb=document.createElement("a"));fb.href=a;return fb}function hb(a){if(a.origin)return a.origin;var b=a.protocol,c=a.host;"https:"==b&&c.indexOf(":443")==c.length-4?c=c.replace(":443",""):"http:"==b&&c.indexOf(":80")==c.length-3&&(c=c.replace(":80",""));return b+"//"+c}function ib(a){var b=a.indexOf("#");return-1==b?a:a.substring(0,b)} function jb(a){return a?(/^[?#]/.test(a)?a.slice(1):a).split("&").reduce(function(b,c){var d=c.split("=");c=decodeURIComponent(d[0]||"");d=decodeURIComponent(d[1]||"");c&&(b[c]=d);return b},{}):{}}function kb(a){var b={requestId:a.requestId,returnUrl:a.returnUrl,args:a.args};void 0!==a.origin&&(b.origin=a.origin);void 0!==a.originVerified&&(b.originVerified=a.originVerified);return JSON.stringify(b)}function lb(a,b,c){b.ok?c(b):(a=b.error||db(a),a.activityResult=b,c(Promise.reject(a)))} function mb(a){a=a.navigator;return/Trident|MSIE|IEMobile/i.test(a&&a.userAgent)}function nb(a){a=a.navigator;return/Edge/i.test(a&&a.userAgent)}function ob(a){setTimeout(function(){throw a;})}function pb(a,b,c){this.g=a;this.Qc=b;this.O=c;this.fe=!0;this.Rc=null;this.Zc=!1;this.ba=this.lc=this.ea=this.v=null;this.cd=this.Nd.bind(this)}e=pb.prototype;e.connect=function(a){if(this.ea)throw Error("already connected");this.ea=a;this.g.addEventListener("message",this.cd)}; e.disconnect=function(){if(this.ea&&(this.ea=null,this.v&&(qb(this.v),this.v=null),this.g.removeEventListener("message",this.cd),this.ba)){for(var a in this.ba){var b=this.ba[a];b.port1&&qb(b.port1);b.port2&&qb(b.port2)}this.ba=null}};e.isConnected=function(){return null!=this.O};e.getTarget=function(){var a=rb(this);if(!a)throw Error("not connected");return a};function rb(a){a.ea&&!a.Rc&&(a.Rc="function"==typeof a.Qc?a.Qc():a.Qc);return a.Rc} e.getTargetOrigin=function(){if(null==this.O)throw Error("not connected");return this.O};e.sendConnectCommand=function(){var a=mb(this.g)||nb(this.g);this.sendCommand("connect",{acceptsChannel:a})};e.sendStartCommand=function(a){var b=null;this.Zc&&"function"==typeof this.g.MessageChannel&&(b=new this.g.MessageChannel);b?(this.sendCommand("start",a,[b.port2]),sb(this,b.port1)):this.sendCommand("start",a)}; e.sendCommand=function(a,b,c){var d={sentinel:"__ACTIVITIES__",cmd:a,payload:b||null};if(this.v)this.v.postMessage(d,c||void 0);else{var f=this.getTarget(),g="connect"==a?null!=this.O?this.O:"*":this.getTargetOrigin();f.postMessage(d,g,c||void 0)}};e.customMessage=function(a){this.sendCommand("msg",a)};e.onCustomMessage=function(a){this.lc=a}; e.startChannel=function(a){a=a||"";var b=tb(this,a);if(!b.port1){var c=new this.g.MessageChannel;b.port1=c.port1;b.port2=c.port2;b.resolver(b.port1)}b.port2&&(this.sendCommand("cnset",{name:a},[b.port2]),b.port2=null);return b.promise};e.askChannel=function(a){a=a||"";var b=tb(this,a);b.port1||this.sendCommand("cnget",{name:a});return b.promise}; function tb(a,b){a.ba||(a.ba={});var c=a.ba[b];if(!c){var d;c=new Promise(function(f){d=f});c={port1:null,port2:null,resolver:d,promise:c};a.ba[b]=c}return c}function sb(a,b){a.v&&qb(a.v);a.v=b;a.v.onmessage=function(c){var d=c.data,f=d&&d.cmd;d=d&&d.payload||null;f&&a.za(f,d,c)}} e.Nd=function(a){if(!this.fe||rb(this)==a.source){var b=a.data;if(b&&"__ACTIVITIES__"==b.sentinel){var c=b.cmd;if(!this.v||"connect"==c||"start"==c){var d=a.origin;b=b.payload||null;null==this.O&&"start"==c&&(this.O=d);null==this.O&&a.source&&rb(this)==a.source&&(this.O=d);d==this.O&&this.za(c,b,a)}}}}; e.za=function(a,b,c){"connect"==a?(this.v&&(qb(this.v),this.v=null),this.Zc=b&&b.acceptsChannel||!1,this.ea(a,b)):"start"==a?((c=c.ports&&c.ports[0])&&sb(this,c),this.ea(a,b)):"msg"==a?null!=this.lc&&null!=b&&this.lc(b):"cnget"==a?this.startChannel(b.name):"cnset"==a?(a=c.ports[0],b=tb(this,b.name),b.port1=a,b.resolver(a)):this.ea(a,b)};function qb(a){try{a.close()}catch(b){}} function ub(a,b,c){var d=this;this.s=a;this.ja=b;this.U=c||null;this.g=this.s.ownerDocument.defaultView;this.O=hb(gb(b));this.Kb=!1;this.Ja=null;this.Jb=new Promise(function(f){d.Ja=f});this.rb=null;this.qb=new Promise(function(f){d.rb=f});this.S=null;this.ub=new Promise(function(f){d.S=f});this.tb=this.nc=null;this.A=new pb(this.g,function(){return d.s.contentWindow},this.O)}e=ub.prototype;e.getMode=function(){return"iframe"}; e.connect=function(){var a=this.s;if("isConnected"in a)a=a.isConnected;else{var b=a.ownerDocument&&a.ownerDocument.documentElement;a=b&&b.contains(a)||!1}if(!a)throw Error("iframe must be in DOM");this.A.connect(this.za.bind(this));this.s.src=this.ja;return this.Jb};e.disconnect=function(){this.Kb=!1;this.A.disconnect()};e.acceptResult=function(){return this.ub};e.getTargetWin=function(){return this.s.contentWindow||null};e.message=function(a){this.A.customMessage(a)};e.onMessage=function(a){this.A.onCustomMessage(a)}; e.messageChannel=function(a){return this.A.askChannel(a)};e.whenReady=function(){return this.qb};e.onResizeRequest=function(a){var b=this;this.nc=a;Promise.resolve().then(function(){null!=b.tb&&a(b.tb)})};e.resized=function(){this.Kb&&this.A.sendCommand("resized",{height:this.s.offsetHeight})}; e.za=function(a,b){"connect"==a?(this.Kb=!0,this.A.sendStartCommand(this.U),this.Ja()):"result"==a?this.S&&(a=b.code,b=new eb(a,"failed"==a?Error(b.data||""):b.data,"iframe",this.A.getTargetOrigin(),!0,!0),lb(this.g,b,this.S),this.S=null,this.A.sendCommand("close"),this.disconnect()):"ready"==a?this.rb&&(this.rb(),this.rb=null):"resize"==a&&(this.tb=b.height,this.nc&&this.nc(this.tb))}; function vb(a,b,c,d,f,g){var h=this;if(!d||"_blank"!=d&&"_top"!=d&&"_"==d[0])throw Error('The only allowed targets are "_blank", "_top" and name targets');this.g=a;this.ee=b;this.ja=c;this.rd=d;this.U=f||null;this.B=g||{};this.Ja=null;this.Jb=new Promise(function(k){h.Ja=k});this.S=null;this.ub=new Promise(function(k){h.S=k});this.A=this.qa=this.ia=null}e=vb.prototype;e.getMode=function(){return"_top"==this.rd?"redirect":"popup"};e.open=function(){return wb(this)};e.whenConnected=function(){return this.Jb}; e.disconnect=function(){this.qa&&(this.g.clearInterval(this.qa),this.qa=null);this.A&&(this.A.disconnect(),this.A=null);if(this.ia){try{this.ia.close()}catch(a){}this.ia=null}this.S=null};e.getTargetWin=function(){return this.ia};e.acceptResult=function(){return this.ub};e.message=function(a){this.A.customMessage(a)};e.onMessage=function(a){this.A.onCustomMessage(a)};e.messageChannel=function(a){return this.A.askChannel(a)}; function wb(a){var b=xb(a),c=a.ja;if(!a.B.skipRequestInUrl){var d=a.B.returnUrl||ib(a.g.location.href),f=kb({requestId:a.ee,returnUrl:d,args:a.U});c=c+(-1==c.indexOf("#")?"#":"&")+encodeURIComponent("__WA__")+"="+encodeURIComponent(f)}var g=a.rd;"_top"!=g&&mb(a.g)&&(g="_top");try{var h=a.g.open(c,g,b)}catch(k){}if(!h&&"_top"!=g&&!a.B.disableRedirectFallback){g="_top";try{h=a.g.open(c,g)}catch(k){}}h?(a.ia=h,"_top"!=g&&yb(a)):zb(a,Error("failed to open window"));return a.ub.catch(function(){})} function xb(a){var b=a.g.screen,c=b.availWidth||b.width,d=b.availHeight||b.height,f=a.g==a.g.top,g=nb(a.g),h=Math.max(c-(f&&a.g.outerWidth>a.g.innerWidth?Math.min(100,a.g.outerWidth-a.g.innerWidth):g?100:0),.5*c),k=Math.max(d-(f&&a.g.outerHeight>a.g.innerHeight?Math.min(100,a.g.outerHeight-a.g.innerHeight):g?100:0),.5*d),l=Math.floor(Math.min(600,.9*h)),m=Math.floor(Math.min(600,.9*k));a.B.width&&(l=Math.min(a.B.width,h));a.B.height&&(m=Math.min(a.B.height,k));a=Math.floor((b.width-l)/2);b=Math.floor((b.height- m)/2);l={height:m,width:l,resizable:"yes",scrollbars:"yes"};g||(l.left=a,l.top=b);m="";for(var p in l)m&&(m+=","),m+=p+"="+l[p];return m}function yb(a){a.qa=a.g.setInterval(function(){Ab(a,!0)},500);a.A=new pb(a.g,a.ia,null);a.A.connect(a.za.bind(a))}function Ab(a,b){if(!a.ia||a.ia.closed)a.qa&&(a.g.clearInterval(a.qa),a.qa=null),a.g.setTimeout(function(){try{Bb(a,"canceled",null)}catch(c){zb(a,c)}},b?3E3:0)}function zb(a,b){a.S&&a.S(Promise.reject(b));a.disconnect()} function Bb(a,b,c){if(a.S){var d=a.A.isConnected();b=new eb(b,c,"popup",d?a.A.getTargetOrigin():hb(gb(a.ja)),d,d);lb(a.g,b,a.S);a.S=null}a.A&&a.A.sendCommand("close");a.disconnect()}e.za=function(a,b){var c=this;"connect"==a?(this.A.sendStartCommand(this.U),this.Ja()):"result"==a?(a=b.code,Bb(this,a,"failed"==a?Error(b.data||""):b.data)):"check"==a&&this.g.setTimeout(function(){return Ab(c)},200)};function Cb(a,b,c,d,f){this.g=a;this.Dd=b;this.Id=c;this.O=d;this.je=f}Cb.prototype.getMode=function(){return"redirect"}; Cb.prototype.acceptResult=function(){var a=this,b=new eb(this.Dd,this.Id,"redirect",this.O,this.je,!1);return new Promise(function(c){lb(a.g,b,c)})};function Db(a){var b=this;this.version="1.24";this.g=a;this.hd=a.location.hash;this.zc={};this.N={};this.wd=null;this.ce=new Promise(function(c){b.wd=c})}e=Db.prototype;e.openIframe=function(a,b,c){var d=new ub(a,b,c);return d.connect().then(function(){return d})};e.open=function(a,b,c,d,f){return{targetWin:Eb(this,a,b,c,d,f).getTargetWin()}}; e.openWithMessaging=function(a,b,c,d,f){var g=Eb(this,a,b,c,d,f);return g.whenConnected().then(function(){return g})}; e.onResult=function(a,b){var c=this.zc[a];c||(c=[],this.zc[a]=c);c.push(b);var d=this.N[a];if(!d&&this.hd){try{var f=this.g,g=jb(this.hd).__WA_RES__;if(g){var h=JSON.parse(g);if(h&&h.requestId==a){var k=f.location.hash;if(k){var l=encodeURIComponent("__WA_RES__")+"=";g=-1;do if(g=k.indexOf(l,g),-1!=g){var m=0<g?k.substring(g-1,g):"";if(""==m||"?"==m||"#"==m||"&"==m){var p=k.indexOf("&",g+1);-1==p&&(p=k.length);k=k.substring(0,g)+k.substring(p+1)}else g++}while(-1!=g&&g<k.length)}var r=k;r=r||"";if(r!= f.location.hash&&f.history&&f.history.replaceState)try{f.history.replaceState(f.history.state,"",r)}catch(sa){}var F=h.code,K=h.data,D=h.origin,B=f.document.referrer&&hb(gb(f.document.referrer));d=new Cb(f,F,K,D,D==B)}else d=null}else d=null}catch(sa){ob(sa),this.wd(sa)}d&&(this.N[a]=d)}(a=d)&&Fb(a,b)};e.onRedirectError=function(a){this.ce.then(a)};function Eb(a,b,c,d,f,g){var h=new vb(a.g,b,c,d,f,g);h.open().then(function(){Gb(a,b,h)});return h} function Fb(a,b){Promise.resolve().then(function(){b(a)})}function Gb(a,b,c){var d=a.zc[b];d&&d.forEach(function(f){Fb(c,f)});a.N[b]=c};function Hb(a){setTimeout(function(){throw a;})};var Ib={frameborder:"0",scrolling:"no"};function y(a,b,c,d,f,g){f=void 0===f?!1:f;g=void 0===g?!1:g;var h=this;this.g=a;this.j=this.g.document;this.s=w(this.j,"iframe",Ib);this.m=b;this.Wa=c;this.U=d||{};this.he=f;this.Qd=g;this.sd=this.v=null;this.nb=new Promise(function(k){h.sd=k})}y.prototype=aa(q.prototype);y.prototype.constructor=y; if(ha)ha(y,q);else for(var Jb in q)if("prototype"!=Jb)if(Object.defineProperties){var Kb=Object.getOwnPropertyDescriptor(q,Jb);Kb&&Object.defineProperty(y,Jb,Kb)}else y[Jb]=q[Jb];y.te=q.prototype;e=y.prototype;e.getElement=function(){return this.s};e.init=function(a){var b=this;return this.m.openIframe(this.s,this.Wa,this.U).then(function(c){return Lb(b,c,a)})};e.shouldFadeBody=function(){return this.he};e.hasLoadingIndicator=function(){return this.Qd}; function Lb(a,b,c){a.v=b;a.sd(b);a.v.onResizeRequest(function(d){c.resizeView(a,d)});return a.v.whenReady()}e.on=function(a,b){this.nb.then(function(c){c.on(a,b)})};e.execute=function(a){this.nb.then(function(b){b.execute(a)})};e.acceptResult=function(){return this.nb.then(function(a){return a.acceptResult()})};e.acceptResultAndVerify=function(a,b,c){return this.nb.then(function(d){return Ha(d,a,b,c)})};e.whenComplete=function(){return this.acceptResult()}; e.onCancel=function(a){this.acceptResult().catch(function(b){x(b)&&a();throw b;})};e.resized=function(){this.v&&this.v.resized()};var Mb={UNKNOWN:0,IMPRESSION_PAYWALL:1,IMPRESSION_AD:2,IMPRESSION_OFFERS:3,IMPRESSION_SUBSCRIBE_BUTTON:4,IMPRESSION_SMARTBOX:5,IMPRESSION_SWG_BUTTON:6,IMPRESSION_CLICK_TO_SHOW_OFFERS:7,IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED:8,IMPRESSION_SUBSCRIPTION_COMPLETE:9,IMPRESSION_ACCOUNT_CHANGED:10,IMPRESSION_PAGE_LOAD:11,IMPRESSION_LINK:12,IMPRESSION_SAVE_SUBSCR_TO_GOOGLE:13,IMPRESSION_GOOGLE_UPDATED:14,IMPRESSION_SHOW_OFFERS_SMARTBOX:15,IMPRESSION_SHOW_OFFERS_SWG_BUTTON:16,IMPRESSION_SELECT_OFFER_SMARTBOX:17, IMPRESSION_SELECT_OFFER_SWG_BUTTON:18,IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON:19,IMPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON:20,IMPRESSION_METER_TOAST:21,IMPRESSION_REGWALL:22,IMPRESSION_SHOWCASE_REGWALL:23,IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT:24,IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT:25,IMPRESSION_CONTRIBUTION_OFFERS:26,IMPRESSION_TWG_COUNTER:27,IMPRESSION_TWG_SITE_SUPPORTER_WALL:28,IMPRESSION_TWG_PUBLICATION:29,IMPRESSION_TWG_STATIC_BUTTON:30,IMPRESSION_TWG_DYNAMIC_BUTTON:31,IMPRESSION_TWG_STICKER_SELECTION_SCREEN:32, ACTION_SUBSCRIBE:1E3,ACTION_PAYMENT_COMPLETE:1001,ACTION_ACCOUNT_CREATED:1002,ACTION_ACCOUNT_ACKNOWLEDGED:1003,ACTION_SUBSCRIPTIONS_LANDING_PAGE:1004,ACTION_PAYMENT_FLOW_STARTED:1005,ACTION_OFFER_SELECTED:1006,ACTION_SWG_BUTTON_CLICK:1007,ACTION_VIEW_OFFERS:1008,ACTION_ALREADY_SUBSCRIBED:1009,ACTION_NEW_DEFERRED_ACCOUNT:1010,ACTION_LINK_CONTINUE:1011,ACTION_LINK_CANCEL:1012,ACTION_GOOGLE_UPDATED_CLOSE:1013,ACTION_USER_CANCELED_PAYFLOW:1014,ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE:1015,ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL:1016, ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK:1017,ACTION_SWG_BUTTON_SELECT_OFFER_CLICK:1018,ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK:1019,ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK:1020,ACTION_USER_CONSENT_DEFERRED_ACCOUNT:1021,ACTION_USER_DENY_DEFERRED_ACCOUNT:1022,ACTION_DEFERRED_ACCOUNT_REDIRECT:1023,ACTION_GET_ENTITLEMENTS:1024,ACTION_METER_TOAST_SUBSCRIBE_CLICK:1025,ACTION_METER_TOAST_EXPANDED:1026,ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION:1027,ACTION_METER_TOAST_CLOSED_BY_SWIPE_DOWN:1028,ACTION_METER_TOAST_CLOSED_BY_X_CLICKED:1029, ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK:1030,ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK:1031,ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE:1032,ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE:1033,ACTION_CONTRIBUTION_OFFER_SELECTED:1034,ACTION_SHOWCASE_REGWALL_GSI_CLICK:1035,ACTION_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK:1036,ACTION_SUBSCRIPTION_OFFERS_CLOSED:1037,ACTION_CONTRIBUTION_OFFERS_CLOSED:1038,ACTION_TWG_STATIC_CTA_CLICK:1039,ACTION_TWG_DYNAMIC_CTA_CLICK:1040,ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK:1041, ACTION_TWG_DIALOG_SUPPORTER_WALL_CTA_CLICK:1042,ACTION_TWG_COUNTER_CLICK:1043,ACTION_TWG_SITE_SUPPORTER_WALL_ALL_THANKS_CLICK:1044,ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLOSE_CLICK:1045,ACTION_TWG_PAID_STICKER_SELECTION_CLICK:1046,ACTION_TWG_FREE_STICKER_SELECTION_CLICK:1047,ACTION_TWG_MINI_SUPPORTER_WALL_CLICK:1048,ACTION_TWG_CREATOR_BENEFIT_CLICK:1049,ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK:1050,ACTION_TWG_PAID_TRANSACTION_START_NEXT_BUTTON_CLICK:1051,ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK:1052, EVENT_PAYMENT_FAILED:2E3,EVENT_CUSTOM:3E3,EVENT_CONFIRM_TX_ID:3001,EVENT_CHANGED_TX_ID:3002,EVENT_GPAY_NO_TX_ID:3003,EVENT_GPAY_CANNOT_CONFIRM_TX_ID:3004,EVENT_GOOGLE_UPDATED:3005,EVENT_NEW_TX_ID:3006,EVENT_UNLOCKED_BY_SUBSCRIPTION:3007,EVENT_UNLOCKED_BY_METER:3008,EVENT_NO_ENTITLEMENTS:3009,EVENT_HAS_METERING_ENTITLEMENTS:3010,EVENT_OFFERED_METER:3011,EVENT_UNLOCKED_FREE_PAGE:3012,EVENT_INELIGIBLE_PAYWALL:3013,EVENT_UNLOCKED_FOR_CRAWLER:3014,EVENT_TWG_COUNTER_VIEW:3015,EVENT_TWG_SITE_SUPPORTER_WALL_VIEW:3016, EVENT_TWG_STATIC_BUTTON_VIEW:3017,EVENT_TWG_DYNAMIC_BUTTON_VIEW:3018,EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVATE:3019,EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE:3020,EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PUBLIC:3021,EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC:3022,EVENT_SUBSCRIPTION_STATE:4E3},Nb={UNKNOWN_CLIENT:0,SWG_CLIENT:1,AMP_CLIENT:2,PROPENSITY_CLIENT:3,SWG_SERVER:4,PUBLISHER_CLIENT:5,SHOWCASE_CLIENT:6}; function Ob(a,b){a=void 0===a?[]:a;var c=(b=void 0===b?!0:b)?1:0;this.P=null==a[c]?null:a[c]}Ob.prototype.getComplete=function(){return this.P};Ob.prototype.setComplete=function(a){this.P=a};Ob.prototype.toArray=function(a){a=void 0===a?!0:a;var b=[this.P];a&&b.unshift(this.label());return b};Ob.prototype.label=function(){return"AccountCreationRequest"};function Pb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.zb=null==a[b]?null:a[b]}Pb.prototype.getAction=function(){return this.zb}; Pb.prototype.setAction=function(a){this.zb=a};Pb.prototype.toArray=function(a){var b=[this.zb];(void 0===a||a)&&b.unshift(this.label());return b};Pb.prototype.label=function(){return"ActionRequest"};function Qb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Nc=null==a[b]?null:a[b];this.cc=null==a[1+b]?null:a[1+b]}e=Qb.prototype;e.getSubscriberOrMember=function(){return this.Nc};e.setSubscriberOrMember=function(a){this.Nc=a};e.getLinkRequested=function(){return this.cc}; e.setLinkRequested=function(a){this.cc=a};e.toArray=function(a){var b=[this.Nc,this.cc];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"AlreadySubscribedResponse"}; function Rb(a,b){a=void 0===a?[]:a;var c=(b=void 0===b?!0:b)?1:0;this.Ob=null==a[c]?null:a[c];this.Sc=null==a[1+c]?null:a[1+c];this.yc=null==a[2+c]?null:a[2+c];this.Yc=null==a[3+c]?null:a[3+c];this.Wc=null==a[4+c]?null:a[4+c];this.Xc=null==a[5+c]?null:a[5+c];this.I=null==a[6+c]?null:a[6+c];this.wc=null==a[7+c]?null:a[7+c];this.Oa=a[8+c]||[];this.Gb=null==a[9+c]?null:a[9+c];this.ja=null==a[10+c]?null:a[10+c];this.bb=null==a[11+c]||void 0==a[11+c]?null:new Sb(a[11+c],b)}e=Rb.prototype; e.getEmbedderOrigin=function(){return this.Ob};e.setEmbedderOrigin=function(a){this.Ob=a};e.getTransactionId=function(){return this.Sc};e.setTransactionId=function(a){this.Sc=a};e.getReferringOrigin=function(){return this.yc};e.setReferringOrigin=function(a){this.yc=a};e.getUtmSource=function(){return this.Yc};e.setUtmSource=function(a){this.Yc=a};e.getUtmCampaign=function(){return this.Wc};e.setUtmCampaign=function(a){this.Wc=a};e.getUtmMedium=function(){return this.Xc}; e.setUtmMedium=function(a){this.Xc=a};e.getSku=function(){return this.I};e.setSku=function(a){this.I=a};e.getReadyToPay=function(){return this.wc};e.setReadyToPay=function(a){this.wc=a};e.getLabelList=function(){return this.Oa};e.setLabelList=function(a){this.Oa=a};e.getClientVersion=function(){return this.Gb};e.setClientVersion=function(a){this.Gb=a};e.getUrl=function(){return this.ja};e.setUrl=function(a){this.ja=a};e.getClientTimestamp=function(){return this.bb}; e.setClientTimestamp=function(a){this.bb=a};e.toArray=function(a){a=void 0===a?!0:a;var b=[this.Ob,this.Sc,this.yc,this.Yc,this.Wc,this.Xc,this.I,this.wc,this.Oa,this.Gb,this.ja,this.bb?this.bb.toArray(a):[]];a&&b.unshift(this.label());return b};e.label=function(){return"AnalyticsContext"};function Tb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Sb=null==a[b]?null:a[b];this.Zb=null==a[1+b]?null:a[1+b]}e=Tb.prototype;e.getEventOriginator=function(){return this.Sb}; e.setEventOriginator=function(a){this.Sb=a};e.getIsFromUserAction=function(){return this.Zb};e.setIsFromUserAction=function(a){this.Zb=a};e.toArray=function(a){var b=[this.Sb,this.Zb];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"AnalyticsEventMeta"}; function Ub(a,b){a=void 0===a?[]:a;var c=(b=void 0===b?!0:b)?1:0;this.D=null==a[c]||void 0==a[c]?null:new Rb(a[c],b);this.Tb=null==a[1+c]?null:a[1+c];this.ib=null==a[2+c]||void 0==a[2+c]?null:new Tb(a[2+c],b);this.kb=null==a[3+c]||void 0==a[3+c]?null:new z(a[3+c],b)}e=Ub.prototype;e.getContext=function(){return this.D};e.setContext=function(a){this.D=a};e.getEvent=function(){return this.Tb};e.setEvent=function(a){this.Tb=a};e.getMeta=function(){return this.ib};e.setMeta=function(a){this.ib=a}; e.getParams=function(){return this.kb};e.setParams=function(a){this.kb=a};e.toArray=function(a){a=void 0===a?!0:a;var b=[this.D?this.D.toArray(a):[],this.Tb,this.ib?this.ib.toArray(a):[],this.kb?this.kb.toArray(a):[]];a&&b.unshift(this.label());return b};e.label=function(){return"AnalyticsRequest"};function Vb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.sa=null==a[b]?null:a[b];this.Kc=null==a[1+b]?null:a[1+b]}e=Vb.prototype;e.getJwt=function(){return this.sa};e.setJwt=function(a){this.sa=a}; e.getSource=function(){return this.Kc};e.setSource=function(a){this.Kc=a};e.toArray=function(a){var b=[this.sa,this.Kc];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"EntitlementJwt"}; function Wb(a,b){a=void 0===a?[]:a;var c=(b=void 0===b?!0:b)?1:0;this.yb=null==a[c]||void 0==a[c]?null:new Vb(a[c],b);this.ab=null==a[1+c]||void 0==a[1+c]?null:new Sb(a[1+c],b);this.Qb=null==a[2+c]?null:a[2+c];this.Pb=null==a[3+c]?null:a[3+c];this.va=null==a[4+c]?null:a[4+c];this.ra=null==a[5+c]?null:a[5+c]}e=Wb.prototype;e.getUsedEntitlement=function(){return this.yb};e.setUsedEntitlement=function(a){this.yb=a};e.getClientEventTime=function(){return this.ab}; e.setClientEventTime=function(a){this.ab=a};e.getEntitlementSource=function(){return this.Qb};e.setEntitlementSource=function(a){this.Qb=a};e.getEntitlementResult=function(){return this.Pb};e.setEntitlementResult=function(a){this.Pb=a};e.getToken=function(){return this.va};e.setToken=function(a){this.va=a};e.getIsUserRegistered=function(){return this.ra};e.setIsUserRegistered=function(a){this.ra=a}; e.toArray=function(a){a=void 0===a?!0:a;var b=[this.yb?this.yb.toArray(a):[],this.ab?this.ab.toArray(a):[],this.Qb,this.Pb,this.va,this.ra];a&&b.unshift(this.label());return b};e.label=function(){return"EntitlementsRequest"};function Xb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.sa=null==a[b]?null:a[b];this.Pc=null==a[1+b]?null:a[1+b]}e=Xb.prototype;e.getJwt=function(){return this.sa};e.setJwt=function(a){this.sa=a};e.getSwgUserToken=function(){return this.Pc}; e.setSwgUserToken=function(a){this.Pc=a};e.toArray=function(a){var b=[this.sa,this.Pc];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"EntitlementsResponse"};function z(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Jc=null==a[b]?null:a[b];this.Wb=null==a[1+b]?null:a[1+b];this.Xb=null==a[2+b]?null:a[2+b];this.I=null==a[3+b]?null:a[3+b];this.kc=null==a[4+b]?null:a[4+b];this.ra=null==a[5+b]?null:a[5+b];this.Oc=null==a[6+b]?null:a[6+b]}e=z.prototype; e.getSmartboxMessage=function(){return this.Jc};e.setSmartboxMessage=function(a){this.Jc=a};e.getGpayTransactionId=function(){return this.Wb};e.setGpayTransactionId=function(a){this.Wb=a};e.getHadLogged=function(){return this.Xb};e.setHadLogged=function(a){this.Xb=a};e.getSku=function(){return this.I};e.setSku=function(a){this.I=a};e.getOldTransactionId=function(){return this.kc};e.setOldTransactionId=function(a){this.kc=a};e.getIsUserRegistered=function(){return this.ra}; e.setIsUserRegistered=function(a){this.ra=a};e.getSubscriptionFlow=function(){return this.Oc};e.setSubscriptionFlow=function(a){this.Oc=a};e.toArray=function(a){var b=[this.Jc,this.Wb,this.Xb,this.I,this.kc,this.ra,this.Oc];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"EventParams"};function Yb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.P=null==a[b]?null:a[b];this.Rb=null==a[1+b]?null:a[1+b]}e=Yb.prototype;e.getComplete=function(){return this.P}; e.setComplete=function(a){this.P=a};e.getError=function(){return this.Rb};e.setError=function(a){this.Rb=a};e.toArray=function(a){var b=[this.P,this.Rb];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"FinishedLoggingResponse"};function Zb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Cb=null==a[b]?null:a[b];this.va=null==a[1+b]?null:a[1+b]}e=Zb.prototype;e.getAuthCode=function(){return this.Cb};e.setAuthCode=function(a){this.Cb=a};e.getToken=function(){return this.va}; e.setToken=function(a){this.va=a};e.toArray=function(a){var b=[this.Cb,this.va];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"LinkSaveTokenRequest"};function $b(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Bc=null==a[b]?null:a[b]}$b.prototype.getRequested=function(){return this.Bc};$b.prototype.setRequested=function(a){this.Bc=a};$b.prototype.toArray=function(a){var b=[this.Bc];(void 0===a||a)&&b.unshift(this.label());return b};$b.prototype.label=function(){return"LinkingInfoResponse"}; function ac(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Vc=null==a[b]?null:a[b]}ac.prototype.getUrlPath=function(){return this.Vc};ac.prototype.setUrlPath=function(a){this.Vc=a};ac.prototype.toArray=function(a){var b=[this.Vc];(void 0===a||a)&&b.unshift(this.label());return b};ac.prototype.label=function(){return"OpenDialogRequest"}; function bc(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.I=null==a[b]?null:a[b];this.jc=null==a[1+b]?null:a[1+b];this.pc=null==a[2+b]?null:a[2+b];this.sc=null==a[3+b]?null:a[3+b];this.ic=null==a[4+b]?null:a[4+b];this.Lb=null==a[5+b]?null:a[5+b];this.Bb=null==a[6+b]?null:a[6+b]}e=bc.prototype;e.getSku=function(){return this.I};e.setSku=function(a){this.I=a};e.getOldSku=function(){return this.jc};e.setOldSku=function(a){this.jc=a};e.getOneTime=function(){return this.pc}; e.setOneTime=function(a){this.pc=a};e.getPlayOffer=function(){return this.sc};e.setPlayOffer=function(a){this.sc=a};e.getOldPlayOffer=function(){return this.ic};e.setOldPlayOffer=function(a){this.ic=a};e.getCustomMessage=function(){return this.Lb};e.setCustomMessage=function(a){this.Lb=a};e.getAnonymous=function(){return this.Bb};e.setAnonymous=function(a){this.Bb=a};e.toArray=function(a){var b=[this.I,this.jc,this.pc,this.sc,this.ic,this.Lb,this.Bb];(void 0===a||a)&&b.unshift(this.label());return b}; e.label=function(){return"SkuSelectedResponse"};function cc(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Yb=null==a[b]?null:a[b]}cc.prototype.getIsClicked=function(){return this.Yb};cc.prototype.setIsClicked=function(a){this.Yb=a};cc.prototype.toArray=function(a){var b=[this.Yb];(void 0===a||a)&&b.unshift(this.label());return b};cc.prototype.label=function(){return"SmartBoxMessage"};function A(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Mc=null==a[b]?null:a[b]}A.prototype.getSubscribe=function(){return this.Mc}; A.prototype.setSubscribe=function(a){this.Mc=a};A.prototype.toArray=function(a){var b=[this.Mc];(void 0===a||a)&&b.unshift(this.label());return b};A.prototype.label=function(){return"SubscribeResponse"};function Sb(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.Fc=null==a[b]?null:a[b];this.fc=null==a[1+b]?null:a[1+b]}e=Sb.prototype;e.getSeconds=function(){return this.Fc};e.setSeconds=function(a){this.Fc=a};e.getNanos=function(){return this.fc};e.setNanos=function(a){this.fc=a}; e.toArray=function(a){var b=[this.Fc,this.fc];(void 0===a||a)&&b.unshift(this.label());return b};e.label=function(){return"Timestamp"};function dc(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.xa=null==a[b]?null:a[b]}dc.prototype.getClose=function(){return this.xa};dc.prototype.setClose=function(a){this.xa=a};dc.prototype.toArray=function(a){var b=[this.xa];(void 0===a||a)&&b.unshift(this.label());return b};dc.prototype.label=function(){return"ToastCloseRequest"}; function C(a,b){a=void 0===a?[]:a;b=void 0===b||b?1:0;this.hc=null==a[b]?null:a[b]}C.prototype.getNative=function(){return this.hc};C.prototype.setNative=function(a){this.hc=a};C.prototype.toArray=function(a){var b=[this.hc];(void 0===a||a)&&b.unshift(this.label());return b};C.prototype.label=function(){return"ViewSubscriptionsResponse"}; var ec={AccountCreationRequest:Ob,ActionRequest:Pb,AlreadySubscribedResponse:Qb,AnalyticsContext:Rb,AnalyticsEventMeta:Tb,AnalyticsRequest:Ub,EntitlementJwt:Vb,EntitlementsRequest:Wb,EntitlementsResponse:Xb,EventParams:z,FinishedLoggingResponse:Yb,LinkSaveTokenRequest:Zb,LinkingInfoResponse:$b,OpenDialogRequest:ac,SkuSelectedResponse:bc,SmartBoxMessage:cc,SubscribeResponse:A,Timestamp:Sb,ToastCloseRequest:dc,ViewSubscriptionsResponse:C};function fc(a){return JSON.parse(a)}function gc(a,b){try{return fc(a)}catch(c){b&&b(c)}}function hc(a,b){var c=gc(a);return c&&c[b]||null};function ic(){}ic.prototype.decode=function(a){return jc(a).payload};function jc(a){function b(){throw Error('Invalid token: "'+a+'"');}var c=a.split(".");3!=c.length&&b();var d=Ra(c[0]),f=Ra(c[1]);return{header:gc(Pa(d),b),payload:gc(Pa(f),b),verifiable:c[0]+"."+c[1],sig:c[2]}};function kc(a,b,c,d,f,g,h,k){this.service=a;this.raw=b;this.entitlements=c;this.isReadyToPay=h||!1;this.decryptedDocumentKey=k||null;this.vc=d;this.$c=f;this.fd=g}e=kc.prototype;e.clone=function(){return new kc(this.service,this.raw,this.entitlements.map(function(a){return a.clone()}),this.vc,this.$c,this.fd,this.isReadyToPay,this.decryptedDocumentKey)};e.json=function(){return{service:this.service,entitlements:this.entitlements.map(function(a){return a.json()}),isReadyToPay:this.isReadyToPay}}; e.enablesThisWithCacheableEntitlements=function(){var a=this.getEntitlementForThis();return!!a&&"google:metering"!==a.source&&"GOOGLE_DEV_MODE_TOKEN"!==a.subscriptionToken};e.enablesThisWithGoogleMetering=function(){var a=this.getEntitlementForThis();return!!a&&"google:metering"===a.source};e.enablesThis=function(a){return this.enables(this.vc,a)}; e.enablesAny=function(a){for(var b=0;b<this.entitlements.length;b++)if(0<this.entitlements[b].products.length&&(!a||a==this.entitlements[b].source))return!0;return!1};e.enables=function(a,b){return a?!!this.getEntitlementFor(a,b):!1};e.getEntitlementForThis=function(a){return this.getEntitlementFor(this.vc,a)}; e.getEntitlementFor=function(a,b){if(!a)return t("SwG needs this article to define a product ID (e.g. example.com:premium). Articles can define a product ID using JSON+LD. SwG can check entitlements after this article defines a product ID."),null;var c=this.entitlements.filter(function(g){return g.enables(a)&&(!b||b===g.source)}),d=Ka(c,function(g){return"google:metering"!==g.source}),f=Ka(c,function(g){return"google:metering"===g.source});return d||f||null}; e.getEntitlementForSource=function(a){if(0<this.entitlements.length)for(var b=0;b<this.entitlements.length;b++)if(this.entitlements[b].subscriptionToken&&a==this.entitlements[b].source)return this.entitlements[b];return null};e.ack=function(){this.$c(this)};e.consume=function(a){this.fd(this,a)};function lc(a,b,c){this.source=a;this.products=b;this.subscriptionToken=c}lc.prototype.clone=function(){return new lc(this.source,this.products.slice(0),this.subscriptionToken)}; lc.prototype.json=function(){return{source:this.source,products:this.products,subscriptionToken:this.subscriptionToken}};lc.prototype.enables=function(a){if(!a)return!1;var b=a.indexOf(":");if(-1!=b){var c=a.substring(0,b+1);if(c+"*"==a&&1<=this.products.filter(function(d){return d.substring(0,b+1)==c}).length)return Ia("enabled with wildcard productId"),!0;if(this.products.includes(c+"*"))return Ia("enabled with wildcard entitlement"),!0}return this.products.includes(a)}; function mc(a){return(Array.isArray(a)?a:[a]).map(function(b){b||(b={});return new lc(b.source||"",b.products||[],b.subscriptionToken)})}lc.prototype.getSku=function(){if("google"!==this.source)return null;var a=hc(this.subscriptionToken,"productId")||null;a||t("Unable to retrieve SKU from SwG subscription token");return a};function oc(a,b){this.idToken=a;this.data=b;this.id=b.sub;this.email=b.email;this.emailVerified=b.email_verified;this.name=b.name;this.givenName=b.given_name;this.familyName=b.family_name;this.pictureUrl=b.picture}oc.prototype.clone=function(){return new oc(this.idToken,this.data)};oc.prototype.json=function(){return{id:this.id,email:this.email,emailVerified:this.emailVerified,name:this.name,givenName:this.givenName,familyName:this.familyName,pictureUrl:this.pictureUrl}};function pc(a,b,c,d,f,g,h,k,l,m){h=void 0===h?null:h;k=void 0===k?null:k;l=void 0===l?null:l;m=void 0===m?null:m;this.raw=a;this.purchaseData=b;this.userData=c;this.entitlements=d;this.productType=f;this.Ha=g;this.oldSku=h;this.swgUserToken=k;this.paymentRecurrence=l;this.requestMetadata=m}pc.prototype.clone=function(){return new pc(this.raw,this.purchaseData,this.userData,this.entitlements,this.productType,this.Ha,this.oldSku,this.swgUserToken)}; pc.prototype.json=function(){return{purchaseData:this.purchaseData.json(),userData:this.userData?this.userData.json():null,entitlements:this.entitlements?this.entitlements.json():null,oldSku:this.oldSku,productType:this.productType,swgUserToken:this.swgUserToken}};pc.prototype.complete=function(){return this.Ha()};function qc(a,b){this.data=this.raw=a;this.signature=b}qc.prototype.clone=function(){return new qc(this.raw,this.signature)};qc.prototype.json=function(){return{data:this.raw,signature:this.signature}};function rc(a,b,c,d){this.entitlements=a;this.userData=b;this.purchaseDataList=c;this.purchaseData=c[0];this.Ha=d}rc.prototype.clone=function(){return new rc(this.entitlements,this.userData,this.purchaseDataList,this.Ha)};rc.prototype.json=function(){return{entitlements:this.entitlements.json(),userData:this.userData.json(),purchaseDataList:this.purchaseDataList.map(function(a){return a.json()}),purchaseData:this.purchaseData.json()}};rc.prototype.complete=function(){return this.Ha()};var sc={UNKNOWN:"unknown",NON_SUBSCRIBER:"non_subscriber",SUBSCRIBER:"subscriber",PAST_SUBSCRIBER:"past_subscriber"},tc={IMPRESSION_PAYWALL:"paywall",IMPRESSION_AD:"ad_shown",IMPRESSION_OFFERS:"offers_shown",ACTION_SUBSCRIPTIONS_LANDING_PAGE:"subscriptions_landing_page",ACTION_OFFER_SELECTED:"offer_selected",ACTION_PAYMENT_FLOW_STARTED:"payment_flow_start",ACTION_PAYMENT_COMPLETED:"payment_complete",EVENT_CUSTOM:"custom"};var uc={GENERAL:"general",PAYWALL:"paywall"};var vc=/(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/,wc,xc; function E(a){wc||(wc=self.document.createElement("a"),xc=self.UrlCache||(self.UrlCache=Object.create(null)));var b=xc[a];if(b)return b;var c=wc;c.href=a;c.protocol||(c.href=c.href);var d={href:c.href,protocol:c.protocol,host:c.host,hostname:c.hostname,port:"0"==c.port?"":c.port,pathname:c.pathname,search:c.search,hash:c.hash,origin:""};"/"!==d.pathname[0]&&(d.pathname="/"+d.pathname);if("http:"==d.protocol&&80==d.port||"https:"==d.protocol&&443==d.port)d.port="",d.host=d.hostname;d.origin=c.origin&& "null"!=c.origin?c.origin:"data:"!=d.protocol&&d.host?d.protocol+"//"+d.host:d.href;return xc[a]=d}function G(a){return a?(/^[?#]/.test(a)?a.slice(1):a).split("&").reduce(function(b,c){c=c.split("=");try{var d=decodeURIComponent(c[0]||""),f=decodeURIComponent(c[1]||"");d&&(b[d]=f)}catch(g){t("SwG could not parse a URL query param: "+c[0])}return b},{}):{}} function H(a,b,c){var d=a.indexOf("?"),f=a.indexOf("#"),g="";-1!=f&&(g=a.substring(f),a=a.substring(0,f));-1==d?a+="?":d<a.length-1&&(a+="&");a+=encodeURIComponent(b)+"="+encodeURIComponent(c);return a+g}function yc(a){return(a=a.getRootNode().querySelector("link[rel='canonical']"))&&a.href||""}var zc=E(self.window.location.href),Ac=E(self.document.referrer);function Bc(a){a=a||zc;return"https"===a.protocol||"https:"===a.protocol};var Cc={zero:0,nocache:1,hr1:36E5,hr12:432E5},Dc={"default":{frontEnd:"https://news.google.com",payEnv:"PRODUCTION",playEnv:"PROD",feCache:"hr1"},prod:{frontEnd:"https://news.google.com",payEnv:"PRODUCTION",playEnv:"PROD",feCache:Cc.hr1},autopush:{frontEnd:"https://subscribe-autopush.sandbox.google.com",payEnv:"PRODUCTION",playEnv:"AUTOPUSH",feCache:Cc.nocache},qual:{frontEnd:"https://subscribe-qual.sandbox.google.com",payEnv:"SANDBOX",playEnv:"STAGING",feCache:Cc.hr1}}; function I(){var a=G(self.location.hash)["swg.mode"];return a&&Dc[a]?Dc[a]:Dc["default"]}function Ec(a){return I().frontEnd+"/swg/_/api/v1"+a}function J(a,b,c,d){b=void 0===b?{}:b;c=void 0===c?!1:c;var f=(d=void 0===d?"":d)?c?"swg/"+d:d+"/swg":"swg";a=H(I().frontEnd+"/"+f+"/_/ui/v1"+a,"_",Fc());var g=G(self.location.hash)["swg.boqjsmode"];void 0!==g&&(a=H(a,"jsmode",g));for(var h in b)a=H(a,h,b[h]);return a}function L(a){return Object.assign(a,{_client:"SwG 0.1.22.194"})} function Fc(){var a=I().feCache,b=Cc[a];null==b&&(b=1);if(0===b)return"_";var c=Date.now();return String(1>=b?c:Math.floor(c/b))};var Gc={IMMEDIATE_WITH_TIME_PRORATION:1},Hc={AUTO:1,ONE_TIME:2};function Ic(a,b){b=void 0===b?null:b;return new z([,,,,a,,,b])}function Jc(a,b,c){c=void 0===c?"SUBSCRIPTION":c;this.h=a;this.rc=a.payClient();this.R=a.pageConfig();this.o=a.dialogManager();this.ha=b;this.ud=c;this.Y=a.analytics();this.u=a.eventManager();this.H=a.clientConfigManager()} Jc.prototype.start=function(){var a=this;return this.H.getClientConfig().then(function(b){var c=b.paySwgVersion,d={skuId:a.ha.skuId,publicationId:a.R.getPublicationId()};c&&(d.swgVersion=c);if(a.ha.oldSku){d.oldSku=a.ha.oldSku;var f=a.ha.replaceSkuProrationMode;d.replaceSkuProrationMode=f?Gc[f]:Gc.IMMEDIATE_WITH_TIME_PRORATION;a.Y.setSku(d.oldSku)}a.ha.oneTime&&(d.paymentRecurrence=Hc.ONE_TIME);a.ha.metadata&&(d.metadata=a.ha.metadata);f="UI_CONTRIBUTION"==a.ud?"contribute":"subscribe";a.h.callbacks().triggerFlowStarted(f, a.ha);a.u.logSwgEvent(1005,!0,Ic(d.skuId));Kc=!0;a.rc.start({apiVersion:1,allowedPaymentMethods:["CARD"],environment:I().payEnv,playEnvironment:I().playEnv,swg:d,i:{startTimeMs:Date.now(),productType:a.ud}},{forceRedirect:"redirect"==a.h.config().windowOpenMode,forceDisableNative:"2"==c});Promise.resolve()})}; function Lc(a){this.g=a.win();this.h=a;this.m=a.activities();this.o=a.dialogManager();this.qb=this.X=null;this.Y=a.analytics();this.u=a.eventManager();this.H=a.clientConfigManager();this.I=null} function Mc(a){var b=a.eventManager();a.payClient().onResponse(function(c){a.entitlementsManager().blockNextNotification();var d=new Lc(a),f=Nc(a,c,d.complete.bind(d));a.callbacks().triggerPaymentResponse(f);return f.then(function(g){var h=hc(g.purchaseData.raw,"productId")||null;a.analytics().setSku(h||"");b.logSwgEvent(1001,!0,Ic(h||"","UI_CONTRIBUTION"==g.productType?"contribute":"subscribe"));d.start(g)},function(g){if(x(g))g="UI_CONTRIBUTION"==g.productType?"contribute":"subscribe",a.callbacks().triggerFlowCanceled(g), a.eventManager().logSwgEvent(1014,!0);else throw a.eventManager().logSwgEvent(2E3,!1),a.jserror().error("Pay failed",g),g;})})} Lc.prototype.start=function(a){var b=this;this.I=hc(a.purchaseData.raw,"productId")||null;this.u.logSwgEvent(10,!0,Ic(this.I||""));this.h.entitlementsManager().reset(!0);var c={publicationId:this.h.pageConfig().getPublicationId(),productType:a.productType,isSubscriptionUpdate:!!a.oldSku,isOneTime:!!a.paymentRecurrence};a.userData&&a.entitlements?(c.idToken=a.userData.idToken,this.h.entitlementsManager().pushNextEntitlements(a.entitlements.raw),a.swgUserToken&&this.h.storage().set("USER_TOKEN",a.swgUserToken, !0)):c.loginHint=a.userData&&a.userData.email;var d={};if("VIRTUAL_GIFT"===c.productType){Object.assign(d,{productType:c.productType,publicationId:c.publicationId,offerId:this.I,origin:E(this.g.location.href).origin});a.requestMetadata&&(d.canonicalUrl=a.requestMetadata.contentId,d.isAnonymous=a.requestMetadata.anonymous);a.swgUserToken&&(c.swgUserToken=a.swgUserToken);var f=hc(a.purchaseData.raw,"orderId")||null;f&&(c.orderId=f)}this.H.shouldForceLangInIframes()&&(d.hl=this.H.getLanguage());var g= J("/payconfirmiframe",d);return this.X=this.H.getClientConfig().then(function(h){c.useUpdatedConfirmUi=h.useUpdatedOfferFlows;return new y(b.g,b.m,g,L(c),!0)}).then(function(h){h.on(Xb,b.Md.bind(b));h.acceptResult().then(function(){b.o.completeView(h)});b.qb=b.o.openView(h);return h})};Lc.prototype.Md=function(a){var b=a.getJwt();b&&this.h.entitlementsManager().pushNextEntitlements(b)}; Lc.prototype.complete=function(){var a=this;this.u.logSwgEvent(1002,!0,Ic(this.I||""));this.h.entitlementsManager().unblockNextNotification();return Promise.all([this.X,this.qb]).then(function(b){b=b[0];var c=new Ob;c.setComplete(!0);b.execute(c);return b.acceptResult().catch(function(){}).then(function(){a.u.logSwgEvent(1003,!0,Ic(a.I||""));a.h.entitlementsManager().setToastShown(!0)})})};var Kc=!1; function Nc(a,b,c){var d=!Kc;Kc=!1;return b.then(function(f){var g=void 0;if("object"===typeof f&&f.googleTransactionId){var h=a.analytics().getTransactionId(),k=f.googleTransactionId;if(d){a.analytics().setTransactionId(k);var l=3004}else h===k?l=3001:(g=new z,g.setGpayTransactionId(k),l=3002)}else g=new z,g.setHadLogged(!d),l=3003;a.eventManager().logSwgEvent(l,!0,g);var m=l=null,p="SUBSCRIPTION",r=null,F=null,K=null;f&&("string"==typeof f?m=f:("swgCallbackData"in f?l=f.swgCallbackData:"integratorClientCallbackData"in f&&(m=f.integratorClientCallbackData),"paymentRequest"in f&&(p=f.paymentRequest.swg||{},r=p.oldSku,F=p.paymentRecurrence,K=p.metadata,p=(f.paymentRequest.i||{}).productType||"SUBSCRIPTION")));m&&!l&&(m=atob(m))&&(l=fc(m).swgCallbackData);if(!l)throw Error("unexpected payment response");f=m=JSON.stringify(l);m=new qc(l.purchaseData,l.purchaseDataSignature);var D;if(D=l.idToken){var B=(new ic).decode(D);D=new oc(D,B)}else D=null;B=l;B=B.signedEntitlements?a.entitlementsManager().parseEntitlements(B): null;return new pc(f,m,D,B,p,c,r,l.swgUserToken,F,K)})};function Oc(a,b){var c=this;this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.u=a.eventManager();this.H=a.clientConfigManager();this.l=null;var d,f=null!=(d=null==b?void 0:b.isClosable)?d:!1,g=a.activities().addDefaultArguments({showNative:a.callbacks().hasSubscribeRequestCallback(),productType:"SUBSCRIPTION",list:b&&b.list||"default",skus:b&&b.skus||null,isClosable:f});if(b&&b.oldSku){g.oldSku=b.oldSku;u(g.skus,"Need a sku list if old sku is provided!");var h=g.skus,k=g.oldSku; h=h.filter(function(m){return m!==k});u(0<h.length,"Sku list only contained offer user already has");g.skus=h}if(g.skus&&1===g.skus.length&&(a=g.skus[0],b=g.oldSku)){var l=new bc;l.setSku(a);l.setOldSku(b);this.vb(l);return}this.ie=g.skus||["*"];this.dd=this.H.getClientConfig();this.X=this.dd.then(function(m){return c.Ic(m)?new y(c.g,c.m,c.Vb(m),g,!0):null})}e=Oc.prototype; e.vb=function(a){var b=a.getSku();if(b){var c={skuId:b};if(a=a.getOldSku())c.oldSku=a,this.h.analytics().setSku(a);this.u.logSwgEvent(1006,!0,new z([,,,,b]));(new Jc(this.h,c)).start()}};e.Na=function(a){a.getSubscriberOrMember()&&(this.u.logSwgEvent(1009,!0),this.h.callbacks().triggerLoginRequest({linkRequested:!!a.getLinkRequested()}))};e.Lc=function(a){a.getNative()&&this.h.callbacks().triggerSubscribeRequest()}; e.start=function(){var a=this;return this.X?this.X.then(function(b){if(!b)return Promise.resolve();a.h.callbacks().triggerFlowStarted("showOffers",{skus:a.ie,source:"SwG"});b.onCancel(function(){a.h.callbacks().triggerFlowCanceled("showOffers")});b.on(bc,a.vb.bind(a));b.on(Qb,a.Na.bind(a));b.on(C,a.Lc.bind(a));a.l=b;return a.dd.then(function(c){if(a.l)return a.o.openView(a.l,!1,c.useUpdatedOfferFlows?{desktopConfig:{isCenterPositioned:!0,supportsWideScreen:!0}}:{})})}):Promise.resolve()}; e.Ic=function(a){var b;return!1!==(null==(b=a.uiPredicates)?void 0:b.canDisplayAutoPrompt)};e.Vb=function(a){return a.useUpdatedOfferFlows?this.H.shouldForceLangInIframes()?J("/subscriptionoffersiframe",{hl:this.H.getLanguage()}):J("/subscriptionoffersiframe"):J("/offersiframe")};e.showNoEntitlementFoundToast=function(){this.l&&this.l.execute(new Xb)}; function Pc(a,b){this.h=a;this.B=b;this.m=a.activities();this.o=a.dialogManager();this.u=a.eventManager();this.l=new y(a.win(),this.m,J("/optionsiframe"),L({publicationId:a.pageConfig().getPublicationId(),productId:a.pageConfig().getProductId(),list:b&&b.list||"default",skus:b&&b.skus||null,isClosable:!0}),!1)} Pc.prototype.start=function(){var a=this;this.h.callbacks().triggerFlowStarted("showSubscribeOption");this.l.onCancel(function(){a.h.callbacks().triggerFlowCanceled("showSubscribeOption")});this.l.on(A,this.pd.bind(this));this.l.acceptResult().then(function(b){b=b.data;var c=new A;b.subscribe&&c.setSubscribe(!0);a.pd(c)},function(b){a.o.completeView(a.l);throw b;});this.u.logSwgEvent(7);return this.o.openView(this.l)}; Pc.prototype.pd=function(a){a.getSubscribe()&&(a=this.B||{},void 0==a.isClosable&&(a.isClosable=!0),this.u.logSwgEvent(1008,!0),(new Oc(this.h,a)).start())}; function Qc(a,b){b=void 0===b?{}:b;this.h=a;this.B=b;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.u=a.eventManager();this.l=new y(this.g,this.m,J("/abbrvofferiframe"),L({publicationId:a.pageConfig().getPublicationId(),productId:a.pageConfig().getProductId(),showNative:a.callbacks().hasSubscribeRequestCallback(),list:b&&b.list||"default",skus:b&&b.skus||null,isClosable:!0}),!1)}Qc.prototype.Na=function(a){a.getSubscriberOrMember()&&(this.u.logSwgEvent(1009,!0),this.h.callbacks().triggerLoginRequest({linkRequested:!!a.getLinkRequested()}))}; Qc.prototype.start=function(){var a=this;this.h.callbacks().triggerFlowStarted("showAbbrvOffer");this.l.onCancel(function(){a.h.callbacks().triggerFlowCanceled("showAbbrvOffer")});this.l.on(Qb,this.Na.bind(this));this.l.acceptResult().then(function(b){b.data.viewOffers?(b=a.B||{},void 0==b.isClosable&&(b.isClosable=!0),a.u.logSwgEvent(1008,!0),(new Oc(a.h,b)).start()):b.data["native"]&&(a.h.callbacks().triggerSubscribeRequest(),a.o.completeView(a.l))});this.u.logSwgEvent(8);return this.o.openView(this.l)};function Rc(a){this.v=a}Rc.prototype.acceptResult=function(){return this.v.acceptResult()};function Sc(a,b,c,d){this.aa=new ub(a,b,d);this.Eb={};this.h=c}e=Sc.prototype;e.whenReady=function(){return this.aa.whenReady()}; e.connect=function(){var a=this;return this.aa.connect().then(function(){a.aa.onMessage(function(b){if(b=b&&b.RESPONSE){var c=a.Eb[b[0]];if(c){a:{var d=b?b[0]:null;if(d&&(d=ec[d])){b=new d(b);break a}throw Error("Deserialization failed for "+b);}c(b)}}});if(a.h&&a.h.eventManager())a.on(Ub,function(b){a.h.eventManager().logEvent({eventType:b.getEvent(),eventOriginator:4,isFromUserAction:b.getMeta().getIsFromUserAction(),additionalParameters:b.getParams()})})})};e.disconnect=function(){this.aa.disconnect()}; e.getMode=function(){return this.aa.getMode()};e.acceptResult=function(){return this.aa.acceptResult()};e.onResizeRequest=function(a){return this.aa.onResizeRequest(a)};e.execute=function(a){this.aa.message({REQUEST:a.toArray()})};e.on=function(a,b){var c=null;try{c=(new a).label()}catch(d){c=null}if(!c)throw Error("Invalid data type");if(this.Eb[c])throw Error("Invalid type or duplicate callback for ",c);this.Eb[c]=b};e.resized=function(){this.aa.resized()}; function Tc(a){this.h=a;this.m=new Db(a.win())}e=Tc.prototype;e.addDefaultArguments=function(a){var b=this.h,c=b.pageConfig();b=b.analytics().getContext();return Object.assign({analyticsContext:b.toArray(),publicationId:c.getPublicationId(),productId:c.getProductId(),_client:"SwG 0.1.22.194",supportsEventManager:!0},a||{})};function Uc(a,b,c,d){var f=new Sc(b,c,a.h,d);return f.connect().then(function(){return f})} e.openIframe=function(a,b,c,d){(d=void 0===d?!1:d)&&(c=this.addDefaultArguments(c));return Uc(this,a,b,c)};e.open=function(a,b,c,d,f,g){(void 0===g?0:g)&&(d=this.addDefaultArguments(d));return this.m.open(a,b,c,d,f)};e.onResult=function(a,b){this.m.onResult(a,function(c){b(new Rc(c))})};e.onRedirectError=function(a){this.m.onRedirectError(a)};e.getOriginalWebActivityPorts=function(){return this.m};function M(a){return"[object Object]"===Object.prototype.toString.call(a)}function Vc(a,b){for(var c in a)if(a[c]===b)return!0;return!1}function Wc(a){return"boolean"===typeof a};function Xc(a,b){return"Event has an invalid "+a+"("+b+")"} function Yc(a){if(!M(a))throw Error("Event must be a valid object");if(!Vc(Mb,a.eventType))throw Error(Xc("eventType",a.eventType));if(!Vc(Nb,a.eventOriginator))throw Error(Xc("eventOriginator",a.eventOriginator));if(!M(a.additionalParameters)&&null!=a.additionalParameters)throw Error(Xc("additionalParameters",a.additionalParameters));if(null!=a.isFromUserAction&&!Wc(a.isFromUserAction))throw Error(Xc("isFromUserAction",a.isFromUserAction));} function Zc(a){this.dc=[];this.Ub=[];this.$b=null;this.jd=a}e=Zc.prototype;e.registerEventListener=function(a){if("function"!==typeof a)throw Error("Event manager listeners must be a function");this.dc.push(a)};e.registerEventFilterer=function(a){if("function"!==typeof a)throw Error("Event manager filterers must be a function");this.Ub.push(a)}; e.logEvent=function(a){var b=this;Yc(a);this.$b=this.jd.then(function(){for(var c=0;c<b.Ub.length;c++)try{if(1===b.Ub[c](a))return Promise.resolve()}catch(d){Ja(d)}for(c=0;c<b.dc.length;c++)try{b.dc[c](a)}catch(d){Ja(d)}return Promise.resolve()})};e.logSwgEvent=function(a,b,c){b=void 0===b?!1:b;this.logEvent({eventType:a,eventOriginator:1,isFromUserAction:b,additionalParameters:void 0===c?null:c})};e.getReadyPromise=function(){return this.jd};var $c=null; function ad(a){if(!$c){$c={};var b="replace-subscription,update-google-transaction-id,smartbox,pay-client-redirect";try{var c=G(a.location.hash)["swg.experiments"];c&&(b+=","+c)}catch(d){Hb(d)}b.split(",").forEach(function(d){if(d=d.trim())try{var f=d;d=$c;var g=!1,h=f.indexOf(":");if(-1==h){var k=f;var l=100;g=!1}else k=f.substring(0,h).trim(),f=f.substring(h+1),"c"==f.substring(f.length-1)&&(g=!0,f=f.substring(0,f.length-1)),l=parseInt(f,10);if(isNaN(l))throw Error("invalid fraction");if(99<l)var m=!0;else if(1>l)m=!1;else if(a.sessionStorage){g=g&&20>=l;try{h= "subscribe.google.com:e:"+k+":"+l+(g?"c":"");var p=a.sessionStorage.getItem(h);var r="e"==p?"e":"c"==p?"c":null;!r&&100*a.Math.random()<=l*(g?2:1)&&(r=(g?.5>=a.Math.random():1)?"e":"c",a.sessionStorage.setItem(h,r));m=!!r;"c"==r&&(k="c-"+k)}catch(F){m=!1,Hb(F)}}else m=!1;d[k]=m}catch(F){Hb(F)}})}return $c}function bd(a,b){return ad(a)[b]||!1}function cd(a){a=ad(a);var b=[],c;for(c in a)a[c]&&b.push(c);return b};function dd(){var a=Date.now();return new Sb([Math.floor(a/1E3),a%1E3*1E6],!1)};var ed={opacity:"0",position:"absolute",top:"-10px",left:"-10px",height:"1px",width:"1px"};function fd(a){var b=new Yb;b.setComplete(!1);b.setError(a);return b} function gd(a,b){this.F=b;this.j=a.doc();this.h=a;this.m=a.activities();this.s=w(this.j.getWin().document,"iframe",{});v(this.s,ed);this.j.getBody().appendChild(this.getElement());this.gd=!1;this.D=new Rb;hd(this);this.$b=this.Gc=null;this.u=a.eventManager();this.u.registerEventListener(this.Ma.bind(this));this.xb=0;this.pb=this.hb=null;this.ec=!1;this.Xa=null;this.Kd=function(){return dd()}}e=gd.prototype; e.setTransactionId=function(a){var b=this.D.getTransactionId();this.D.setTransactionId(a);if(null!=b&&b!=a){var c=new z;c.setOldTransactionId(b);this.u.logSwgEvent(3006,!0,c)}};e.getTransactionId=function(){return this.D.getTransactionId()};e.getSku=function(){return this.D.getSku()};e.setSku=function(a){this.D.setSku(a)};e.setUrl=function(a){this.D.setUrl(a)};e.addLabels=function(a){if(a&&0<a.length){var b=[].concat(this.D.getLabelList());a.forEach(function(c){-1==b.indexOf(c)&&b.push(c)});this.D.setLabelList(b)}}; e.getElement=function(){return this.s};function hd(a){var b=a.D;bd(a.j.getWin(),"update-google-transaction-id")?b.setTransactionId(Ta()+".swg"):b.setTransactionId(Ta());b.setReferringOrigin(E(a.j.getWin().document.referrer).origin);b.setClientVersion("SwG 0.1.22.194");b.setUrl(yc(a.j));var c=G(a.j.getWin().location.search),d=c.utm_campaign,f=c.utm_medium;a=c.utm_source;d&&b.setUtmCampaign(d);f&&b.setUtmMedium(f);a&&b.setUtmSource(a)} e.start=function(){var a=this;this.Gc||(this.addLabels(cd(this.j.getWin())),this.Gc=this.m.openIframe(this.s,J("/serviceiframe"),null,!0).then(function(b){b.on(Yb,a.Ab.bind(a));return b.whenReady().then(function(){a.addLabels(cd(a.j.getWin()));return b})},function(b){a.ec=!0;a.Ab(fd("Could not connect ["+b+"]"))}));return this.Gc};e.setReadyToPay=function(a){this.D.setReadyToPay(a)};e.close=function(){this.j.getBody().removeChild(this.getElement())};e.getContext=function(){return this.D}; e.Ma=function(a){var b=this;4E3!==a.eventType&&6!==a.eventOriginator&&(3!==a.eventOriginator&&5!==a.eventOriginator&&2!==a.eventOriginator||!0===this.h.config().enableSwgAnalytics||11===a.eventType&&2===a.eventOriginator)&&(this.xb++,this.$b=this.start().then(function(c){var d=new Tb;d.setEventOriginator(a.eventOriginator);d.setIsFromUserAction(!!a.isFromUserAction);b.D.setClientTimestamp(b.Kd());var f=new Ub;f.setEvent(a.eventType);f.setContext(b.D);f.setMeta(d);a.additionalParameters instanceof z&&f.setParams(a.additionalParameters);c.execute(f);bd(b.j.getWin(),"logging-beacon")&&(c=encodeURIComponent(b.h.pageConfig().getPublicationId()),c=Ec("/publication/"+c+"/clientlogs"),b.F.sendBeacon(c,f))}))}; e.Ab=function(a){var b=a&&a.getComplete()||!1;a=a&&a.getError()||"Unknown logging Error";var c="AnalyticsService timed out waiting for a response"===a;b||Ja("Error when logging: "+a);this.xb--;c||(this.gd=!0);null!==this.hb&&(0===this.xb||this.ec||c)&&(null!==this.Xa&&(clearTimeout(this.Xa),this.Xa=null),this.hb(b),this.hb=this.pb=null)}; e.getLoggingPromise=function(){var a=this;if(0===this.xb||this.ec)return Promise.resolve(!0);if(null===this.pb){this.pb=new Promise(function(c){a.hb=c});var b=this.Ab.bind(this);this.Xa=setTimeout(function(){a.Xa=null;b(fd("AnalyticsService timed out waiting for a response"))},this.gd?200:500)}return this.pb};var id={en:"Subscribe with Google",ar:"Google \u0627\u0634\u062a\u0631\u0643\u00a0\u0645\u0639",de:"Abonnieren mit Google","en-au":"Subscribe with Google","en-ca":"Subscribe with Google","en-gb":"Subscribe with Google","en-us":"Subscribe with Google",es:"Suscr\u00edbete con Google","es-419":"Suscr\u00edbete con Google","es-latam":"Suscr\u00edbete con Google","es-latn":"Suscr\u00edbete con Google",fr:"S'abonner avec Google","fr-ca":"S'abonner avec Google",hi:"Google \u0915\u0947 \u095b\u0930\u093f\u092f\u0947 \u0938\u0926\u0938\u094d\u092f\u0924\u093e", id:"Berlangganan dengan Google",it:"Abbonati con Google",jp:"Google \u3067\u8cfc\u8aad",ko:"Google \uc744 \ud1b5\ud55c\uad6c\ub3c5",ms:"Langgan dengan Google",nl:"Abonneren via Google",no:"Abonner med Google",pl:"Subskrybuj z Google",pt:"Subscrever com o Google","pt-br":"Assine com o Google",ru:"\u041f\u043e\u0434\u043f\u0438c\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 Google",se:"Prenumerera med Google",th:"\u0e2a\u0e21\u0e31\u0e04\u0e23\u0e1f\u0e32\u0e19 Google",tr:"Google ile Abone Ol",uk:"\u041f\u0456\u0434\u043f\u0438\u0441\u0430\u0442\u0438\u0441\u044f \u0447\u0435\u0440\u0435\u0437 Google", "zh-tw":"\u900f\u904e Google \u8a02\u95b1"},jd={en:"Contribute with Google",ar:"\u0627\u0644\u0645\u0633\u0627\u0647\u0645\u0629 \u0628\u0627\u0633\u062a\u062e\u062f\u0627\u0645 Google",de:"Mit Google beitragen","en-au":"Contribute with Google","en-ca":"Contribute with Google","en-gb":"Contribute with Google","en-us":"Contribute with Google",es:"\tContribuye con Google","es-419":"Contribuir con Google","es-latam":"Contribuir con Google","es-latn":"Contribuye con Google",fr:"Contribuer avec Google", "fr-ca":"Contribuer avec Google",hi:"Google \u0916\u093e\u0924\u0947 \u0915\u0940 \u092e\u0926\u0926 \u0938\u0947 \u092f\u094b\u0917\u0926\u093e\u0928 \u0915\u0930\u0947\u0902",id:"Berkontribusi dengan Google",it:"Contribuisci con Google",jp:"Google \u3067\u5bc4\u4ed8",ko:"Google\uc744 \ud1b5\ud574 \ucc38\uc5ec\ud558\uae30",ms:"Sumbangkan dengan Google",nl:"Bijdragen met Google",no:"Bidra med Google",pl:"Wesprzyj publikacj\u0119 przez Google",pt:"Contribuir com o Google","pt-br":"Contribua com o Google", ru:"\u0412\u043d\u0435\u0441\u0442\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430 \u0447\u0435\u0440\u0435\u0437 Google",se:"Bidra med Google",th:"\u0e21\u0e35\u0e2a\u0e48\u0e27\u0e19\u0e23\u0e48\u0e27\u0e21\u0e1c\u0e48\u0e32\u0e19 Google",tr:"Google ile Katk\u0131da Bulun",uk:"\u0417\u0440\u043e\u0431\u0438\u0442\u0438 \u0432\u043d\u0435\u0441\u043e\u043a \u0447\u0435\u0440\u0435\u0437 Google","zh-tw":"\u900f\u904e Google \u6350\u6b3e"};var kd={frameborder:"0",scrolling:"no"};function ld(a,b,c,d){this.h=a;this.g=a.win();this.j=this.g.document;this.m=a.activities();this.s=w(this.j,"iframe",kd);this.Bd=b;this.B=c;this.T=d;this.Wa=J("/smartboxiframe");var f={productId:this.h.pageConfig().getProductId(),publicationId:this.h.pageConfig().getPublicationId(),theme:this.B&&this.B.theme||"light",lang:this.B&&this.B.lang||"en"},g=this.B&&this.B.messageTextColor;g&&(f.messageTextColor=g);this.U=L(f)} ld.prototype.Pd=function(a){if(a&&a.getIsClicked()){if(!this.T)throw Error("No callback!");this.T()}};ld.prototype.start=function(){var a=this;v(this.s,{opacity:1,position:"absolute",top:0,bottom:0,left:0,height:"100%",right:0,width:"100%"});this.Bd.appendChild(this.s);var b=this.m.addDefaultArguments(this.U);this.m.openIframe(this.s,this.Wa,b).then(function(c){c.on(cc,a.Pd.bind(a))});return this.s};function md(a,b){var c=a.en;if("object"!==typeof a||!b)return c;var d="string"===typeof b?b:b.lang?b.lang:b.ownerDocument&&b.ownerDocument.documentElement.lang?b.ownerDocument.documentElement.lang:"en";d=d.toLowerCase();d=d.replace(/_/g,"-");for(var f=d.split("-");f.length;){var g=f.join("-");if(g in a)return a[g];f.pop()}return c};function nd(a,b){this.j=a;this.Gd=b}e=nd.prototype;e.init=function(){var a=this.j.getHead();a&&(a.querySelector('link[href="https://news.google.com/swg/js/v1/swg-button.css"]')||a.appendChild(w(this.j.getWin().document,"link",{rel:"stylesheet",type:"text/css",href:"https://news.google.com/swg/js/v1/swg-button.css"})))};e.create=function(a,b){var c=w(this.j.getWin().document,"button",{});return this.attach(c,a,b)}; e.attach=function(a,b,c){b=od(this,a,1007,b,c).options;a.classList.add("swg-button-"+b.theme);a.setAttribute("role","button");b.lang&&a.setAttribute("lang",b.lang);a.setAttribute("title",md(id,a)||"");pd(this,6);return a}; e.attachSubscribeButton=function(a,b,c){b=od(this,a,1017,b,c).options;c=b.theme;a.classList.add("swg-button-v2-"+c);a.setAttribute("role","button");b.lang&&a.setAttribute("lang",b.lang);b.enable||a.setAttribute("disabled","disabled");a.innerHTML='<div class="swg-button-v2-icon-$theme$"></div>$textContent$'.replace("$theme$",c).replace("$textContent$",md(id,a)||"");pd(this,16);return a}; e.attachContributeButton=function(a,b,c){b=od(this,a,1019,b,c).options;c=b.theme;a.classList.add("swg-button-v2-"+c);a.setAttribute("role","button");b.lang&&a.setAttribute("lang",b.lang);b.enable||a.setAttribute("disabled","disabled");a.innerHTML='<div class="swg-button-v2-icon-$theme$"></div>$textContent$'.replace("$theme$",c).replace("$textContent$",md(jd,a)||"");pd(this,19);return a}; e.attachButtonsWithAttribute=function(a,b,c,d){var f=this;b.forEach(function(g){for(var h=f.j.getRootNode().querySelectorAll("["+a+'="'+g+'"]'),k=0;k<h.length;k++)"subscription"===g?f.attachSubscribeButton(h[k],c,d[g]):"contribution"===g&&f.attachContributeButton(h[k],c,d[g])})};function pd(a,b,c){a.Gd.then(function(d){d.eventManager().logSwgEvent(b,c)})}function qd(a){a=a&&"function"!=typeof a?a:{theme:"light"};var b=a.theme;"light"!==b&&"dark"!==b&&(a.theme="light");return a} function od(a,b,c,d,f){function g(l){pd(a,c,!0);"function"===typeof k&&k(l)}var h=qd(d),k=("function"==typeof d?d:null)||f;b.addEventListener("click",g);return{options:h,clickFun:g}}e.attachSmartButton=function(a,b,c,d){c=od(this,b,1007,c,d);b.classList.add("swg-smart-button");return(new ld(a,b,c.options,c.clickFun)).start()};function rd(){this.C={};this.N={};this.$d=null}e=rd.prototype;e.setOnEntitlementsResponse=function(a){N(this,1,a)};e.triggerEntitlementsResponse=function(a){return O(this,1,a.then(function(b){return b.clone()}))};e.hasEntitlementsResponsePending=function(){return!!this.N[1]};e.setOnLoginRequest=function(a){N(this,4,a)};e.triggerLoginRequest=function(a){return O(this,4,a)};e.setOnLinkProgress=function(a){N(this,5,a)};e.triggerLinkProgress=function(){return O(this,5,!0)}; e.resetLinkProgress=function(){5 in this.N&&delete this.N[5]};e.setOnLinkComplete=function(a){N(this,6,a)};e.triggerLinkComplete=function(){return O(this,6,!0)};e.hasLinkCompletePending=function(){return!!this.N[6]};e.setOnSubscribeRequest=function(a){N(this,2,a)};e.triggerSubscribeRequest=function(){return O(this,2,!0)};e.hasSubscribeRequestCallback=function(){return!!this.C[2]}; e.setOnSubscribeResponse=function(a){t("[swg.js:setOnSubscribeResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'");N(this,3,a)};e.setOnContributionResponse=function(a){t("[swg.js:setOnContributionResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'");N(this,3,a)};e.setOnPaymentResponse=function(a){N(this,3,a)}; e.triggerPaymentResponse=function(a){var b=this;this.$d=a.then(function(c){O(b,3,Promise.resolve(c.clone()))},function(c){if(!x(c))throw c;});return!!this.C[3]};e.hasPaymentResponsePending=function(){return!!this.N[3]};e.setOnFlowStarted=function(a){N(this,7,a)};e.triggerFlowStarted=function(a,b){b=void 0===b?{}:b;return O(this,7,{flow:a,data:b})};e.setOnFlowCanceled=function(a){N(this,8,a)};e.triggerFlowCanceled=function(a,b){b=void 0===b?{}:b;return O(this,8,{flow:a,data:b})}; function N(a,b,c){a.C[b]&&t("[swg.js]: You have registered multiple callbacks for the same response.");a.C[b]=c;b in a.N&&sd(a,b,c,a.N[b])}function O(a,b,c){a.N[b]=c;var d=a.C[b];d&&sd(a,b,d,c);return!!d}function sd(a,b,c,d){Promise.resolve().then(function(){c(d);b in a.N&&delete a.N[b]})};function td(a,b){this.displayName=a;this.avatarUrl=b};function ud(a,b,c,d,f){this.maxImpressionsPerWeek=a;this.clientDisplayTrigger=new vd(b);this.explicitDismissalConfig=new wd(c,d,f)}function vd(a){this.displayDelaySeconds=a}function wd(a,b,c){this.backoffSeconds=a;this.maxDismissalsPerWeek=b;this.maxDismissalsResultingHideSeconds=c}function xd(a,b){this.canDisplayAutoPrompt=a;this.canDisplayButton=b};function yd(a){a=void 0===a?{}:a;var b=a.attributionParams,c=a.paySwgVersion,d=a.uiPredicates,f=a.usePrefixedHostPath,g=a.useUpdatedOfferFlows;this.autoPromptConfig=a.autoPromptConfig;this.paySwgVersion=c;this.usePrefixedHostPath=f||!1;this.useUpdatedOfferFlows=g||!1;this.uiPredicates=d;this.attributionParams=b};function zd(a,b){this.Ga={};this.L=a;this.F=b;this.M=null}e=zd.prototype;e.fetchClientConfig=function(){if(!this.L)throw Error("fetchClientConfig requires publicationId");this.M||(this.M=this.oa());return this.M};e.getClientConfig=function(){return this.M||Promise.resolve(new yd)};e.getAutoPromptConfig=function(){this.M||this.fetchClientConfig();return this.M.then(function(a){return a.autoPromptConfig})};e.getLanguage=function(){return this.Ga.lang||"en"}; e.getTheme=function(){return this.Ga.theme||"light"};e.shouldForceLangInIframes=function(){return!!this.Ga.forceLangInIframes&&!!this.Ga.lang};e.shouldEnableButton=function(){if(this.Ga.disableButton)return Promise.resolve(!1);this.M||this.fetchClientConfig();return this.M.then(function(a){var b;return(null==(b=a.uiPredicates)?0:b.canDisplayButton)?!0:!1})}; e.oa=function(){var a=Ec("/publication/"+encodeURIComponent(this.L)+"/clientconfiguration");return this.F.fetchCredentialedJson(a).then(function(b){b.errorMessages&&0<b.errorMessages.length&&b.errorMessages.forEach(function(c){t("SwG ClientConfigManager: "+c)});return Ad(b)})}; function Ad(a){var b=a.paySwgVersion,c=a.autoPromptConfig,d=void 0;if(c){var f,g,h,k;d=new ud(c.maxImpressionsPerWeek,null==(f=c.clientDisplayTrigger)?void 0:f.displayDelaySeconds,null==(g=c.explicitDismissalConfig)?void 0:g.backoffSeconds,null==(h=c.explicitDismissalConfig)?void 0:h.maxDismissalsPerWeek,null==(k=c.explicitDismissalConfig)?void 0:k.maxDismissalsResultingHideSeconds)}var l=a.uiPredicates;f=void 0;l&&(f=new xd(l.canDisplayAutoPrompt,l.canDisplayButton));var m=a.attributionParams,p; m&&(p=new td(m.displayName,m.avatarUrl));return new yd({autoPromptConfig:d,paySwgVersion:b,usePrefixedHostPath:a.usePrefixedHostPath,useUpdatedOfferFlows:a.useUpdatedOfferFlows,uiPredicates:f,attributionParams:p})};function Bd(a,b){var c=this;this.h=a;this.B=b;this.g=a.win();this.H=a.clientConfigManager();this.m=a.activities();this.o=a.dialogManager();this.l=null;var d,f=null!=(d=null==b?void 0:b.isClosable)?d:!0;this.X=this.H.getClientConfig().then(function(g){return c.Ic(g)?new y(c.g,c.m,c.Vb(g),L({productId:a.pageConfig().getProductId(),publicationId:a.pageConfig().getPublicationId(),productType:"UI_CONTRIBUTION",list:b&&b.list||"default",skus:b&&b.skus||null,isClosable:f,supportsEventManager:!0}),!0):null})} e=Bd.prototype;e.Na=function(a){a.getSubscriberOrMember()&&this.h.callbacks().triggerLoginRequest({linkRequested:!!a.getLinkRequested()})};e.vb=function(a){var b=a.getSku(),c=a.getOneTime();if(b){var d={skuId:b};c&&(d.oneTime=c);(new Jc(this.h,d,"UI_CONTRIBUTION")).start()}}; e.start=function(){var a=this;return this.X.then(function(b){if(!b)return Promise.resolve();a.h.callbacks().triggerFlowStarted("showContributionOptions");b.onCancel(function(){a.h.callbacks().triggerFlowCanceled("showContributionOptions")});b.on(Qb,a.Na.bind(a));b.on(bc,a.vb.bind(a));a.l=b;return a.o.openView(a.l)})};e.Ic=function(a){var b;return!1!==(null==(b=a.uiPredicates)?void 0:b.canDisplayAutoPrompt)}; e.Vb=function(a){return a.useUpdatedOfferFlows?this.H.shouldForceLangInIframes()?J("/contributionoffersiframe",{hl:this.H.getLanguage()}):J("/contributionoffersiframe"):J("/contributionsiframe")};e.showNoEntitlementFoundToast=function(){this.l&&this.l.execute(new Xb)};function Cd(a,b){this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.fa=this.l=null;this.B=Object.assign({entitlements:null,consent:!0},b||{})} Cd.prototype.start=function(){var a=this,b=this.B.entitlements;if(!b||!b.getEntitlementForSource("google"))throw Error('No entitlements with "google" source');this.h.callbacks().triggerFlowStarted("completeDeferredAccountCreation");this.l=new y(this.g,this.m,J("/recoveriframe"),L({publicationId:this.h.pageConfig().getPublicationId(),productId:this.h.pageConfig().getProductId(),entitlements:b&&b.raw||null,consent:this.B.consent}),!0);this.fa=this.o.openView(this.l);return this.l.acceptResult().then(function(c){return Dd(a, c.data)},function(c){x(c)?a.h.callbacks().triggerFlowCanceled("completeDeferredAccountCreation"):a.o.completeView(a.l);throw c;})}; function Dd(a,b){a.h.entitlementsManager().blockNextNotification();var c=b.entitlements,d=b.idToken,f=b.productType,g=a.h.entitlementsManager().parseEntitlements({signedEntitlements:c});d=new oc(d,(new ic).decode(d));b=b.purchaseDataList?b.purchaseDataList.map(function(l){return new qc(l.data,l.signature)}):[new qc(b.purchaseData.data,b.purchaseData.signature)];var h=new Lc(a.h),k=h.complete.bind(h);k=new rc(g,d,b,k);a.h.eventManager().logSwgEvent(1010,!0);h.start(new pc("",b[0],d,g,f,function(){return Promise.resolve()})); return k};var Ed={frameborder:0,scrolling:"no",src:"about:blank"};function Fd(a,b){var c=this;b=void 0===b?{}:b;var d=Object.assign({},Ed,b);this.s=w(a,"iframe",d);v(this.s,Xa);this.sb=new Promise(function(f){c.s.onload=f})}e=Fd.prototype;e.whenReady=function(){return this.sb};e.getElement=function(){return this.s};e.getDocument=function(){var a=this.getElement().contentDocument||this.getElement().contentWindow&&this.getElement().contentWindow.document;if(!a)throw Error("not loaded");return a};e.getBody=function(){return this.getDocument().body}; e.isConnected=function(){var a=this.getElement();if("isConnected"in a)a=a.isConnected;else{var b=a.ownerDocument&&a.ownerDocument.documentElement;a=b&&b.contains(a)||!1}return a};function P(a,b,c){var d=a.ownerDocument.defaultView,f=a.style.transition||"";return(new Promise(function(g){d.setTimeout(function(){d.setTimeout(g,c);var h=c+"ms ease-out";v(a,Object.assign({transition:"transform "+h+", opacity "+h},b))})})).then(function(){v(a,{transition:f})})};function Gd(a,b){this.j=a;this.W=this.j.getWin().document.createElement("swg-popup-background");v(this.W,{"z-index":b,display:"none","pointer-events":"none",position:"fixed",top:0,right:0,bottom:0,left:0,"background-color":"rgba(32, 33, 36, .6)"})}e=Gd.prototype;e.getElement=function(){return this.W};e.isAttached=function(){return!!this.W.parentNode};e.attach=function(){this.j.getBody().appendChild(this.W)};e.destroy=function(){this.j.getBody().removeChild(this.W)}; e.show=function(a){a=void 0===a?!0:a;v(this.W,{display:"block",opacity:a?0:1});if(a)return P(this.W,{opacity:1},300)};e.hide=function(a){var b=this;if(void 0===a||a)return P(this.W,{opacity:0},300).then(function(){v(b.W,{display:"none"})});v(this.W,{display:"none"})};function Hd(a,b){var c=this;b=void 0===b?{}:b;this.j=a;this.Aa=w(this.j,"swg-loading-container",{});b.additionalClasses&&b.additionalClasses.forEach(function(d){c.Aa.classList.add(d)});this.nd=w(this.j,"swg-loading",{});this.Aa.appendChild(this.nd);this.Aa.style.setProperty("display","none","important");Id(this)}Hd.prototype.getElement=function(){return this.Aa};Hd.prototype.show=function(){this.Aa.style.removeProperty("display")}; Hd.prototype.hide=function(){this.Aa.style.setProperty("display","none","important")};function Id(a){var b=a.nd,c=w(a.j,"swg-loading-animate",{});b.appendChild(c);var d=w(a.j,"swg-loading-image",{});c.appendChild(d)};function Jd(a){var b=a.readyState;return"loading"!=b&&"uninitialized"!=b}function Kd(a,b){if(Jd(a))b(a);else{var c=!1,d=function(){Jd(a)&&!c&&(b(a),c=!0,a.removeEventListener("readystatechange",d))};a.addEventListener("readystatechange",d)}}function Ld(a){return new Promise(function(b){Kd(a,b)})};function Md(a){var b=!!a.document;this.g=b?a:a.defaultView;this.j=b?a.document:a}e=Md.prototype;e.getWin=function(){return this.g};e.getRootNode=function(){return this.j};e.getRootElement=function(){return this.j.documentElement};e.getHead=function(){return this.j.head};e.getBody=function(){return this.j.body};e.isReady=function(){return Jd(this.j)};e.whenReady=function(){return Ld(this.j)};e.addToFixedLayer=function(){return Promise.resolve()}; function Nd(a){return 9===a.nodeType||a.document?new Md(a):a};var Od={"min-height":"50px",border:"none",display:"block",position:"fixed","z-index":2147483647,"box-sizing":"border-box"},Pd={position:"absolute",top:"0",left:"0",right:"0",bottom:"0",opacity:0,height:0,"max-height":"100%","max-width":"100%","min-height":"100%","min-width":"100%",width:0}; function Qd(a,b){var c={},d={};c=void 0===c?{}:c;d=void 0===d?{}:d;b=void 0===b?{}:b;this.j=a;var f=b.desktopConfig||{},g="swg-dialog "+(f.supportsWideScreen?"swg-wide-dialog":""),h=b.iframeCssClassOverride||g;this.s=new Fd(a.getWin().document,{"class":h});this.da=new Gd(a,2147483646);var k=Object.assign({},Od,c);v(this.s.getElement(),k);$a(this.s.getElement(),d);this.ma=this.Da=this.eb=this.Pa=null;this.bd=0;this.gb=!1;this.ob=null;this.od=void 0!==b.maxAllowedHeightRatio?b.maxAllowedHeightRatio: .9;this.tc=!!f.isCenterPositioned;this.Mb=this.j.getWin().matchMedia("(min-width: 641px)");this.fb=null}e=Qd.prototype;e.open=function(a){var b=this;a=void 0===a?!1:a;var c=this.s;if(c.isConnected())throw Error("already opened");this.j.getBody().appendChild(c.getElement());this.da.attach();a?(v(c.getElement(),{visibility:"hidden",opacity:0}),this.gb=a):Rd(this);return c.whenReady().then(function(){Sd(b);return b})}; e.openInContainer=function(a){var b=this,c=this.s;if(c.isConnected())throw Error("already opened");a.appendChild(c.getElement());return c.whenReady().then(function(){Sd(b);return b})}; function Sd(a){var b=a.s.getBody(),c=a.s.getDocument();bb(Nd(c),"body{margin:0;padding:0}swg-container,swg-loading,swg-loading-animate,swg-loading-image{display:block}swg-loading-container{-ms-flex-align:center!important;-ms-flex-pack:center!important;align-items:center!important;bottom:0!important;display:-ms-flexbox!important;display:flex!important;height:100%!important;justify-content:center!important;margin-top:5px!important;min-height:148px!important;width:100%!important;z-index:2147483647!important}@media (min-height:630px),(min-width:630px){swg-loading-container{background-color:#fff!important;border-top-left-radius:8px!important;border-top-right-radius:8px!important;box-shadow:0 1px 1px rgba(60,64,67,.3),0 1px 4px 1px rgba(60,64,67,.15)!important;margin-left:auto!important;margin-right:auto!important;width:560px!important}swg-loading-container.centered-on-desktop{border-radius:8px!important;height:120px!important;min-height:120px!important}}swg-loading{animation:mspin-rotate 1568.63ms linear infinite;height:36px;overflow:hidden;width:36px;z-index:2147483647!important}swg-loading-animate{animation:mspin-revrot 5332ms steps(4) infinite}swg-loading-image{animation:swg-loading-film 5332ms steps(324) infinite;background-image:url(https://news.google.com/swg/js/v1/loader.svg);background-size:100%;height:36px;width:11664px}@keyframes swg-loading-film{0%{transform:translateX(0)}to{transform:translateX(-11664px)}}@keyframes mspin-rotate{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes mspin-revrot{0%{transform:rotate(0deg)}to{transform:rotate(-1turn)}}\n/*# sourceURL=/./src/ui/ui.css*/");var d= [];a.isPositionCenterOnDesktop()&&d.push("centered-on-desktop");a.Pa=new Hd(c,{additionalClasses:d});b.appendChild(a.Pa.getElement());a.eb=w(c,"swg-container",{});b.appendChild(a.eb);Td(a);a.tc&&(a.fb=function(){Td(a)},a.Mb.addListener(a.fb))} e.close=function(a){var b=this;return(void 0===a||a?this.la(function(){b.da.hide(!0);return P(b.getElement(),{transform:"translateY(100%)"},300)}):Promise.resolve()).then(function(){var c=b.s.getElement();c.parentNode.removeChild(c);Ud(b);b.da.destroy();b.fb&&b.Mb.removeListener(b.fb)})};e.getContainer=function(){if(!this.eb)throw Error("not opened yet");return this.eb};e.getIframe=function(){return this.s};e.getElement=function(){return this.s.getElement()};e.getLoadingView=function(){return this.Pa}; e.getMaxAllowedHeightRatio=function(){return this.od};e.isPositionCenterOnDesktop=function(){return this.tc};e.getCurrentView=function(){return this.Da}; e.openView=function(a){var b=this;v(a.getElement(),Pd);this.Da&&this.Da.hasLoadingIndicator()?this.ob=this.Da:(this.getContainer().textContent="",this.Pa.show());this.Da=a;this.getContainer().appendChild(a.getElement());a.shouldFadeBody()&&!this.gb&&this.da.show(!0);return a.init(this).then(function(){v(a.getElement(),{opacity:1});b.gb&&(a.shouldFadeBody()&&b.da.show(!0),Rd(b));if(b.ob){var c=b.ob.getElement();c.parentElement&&c.parentElement.removeChild(c);b.ob=null}else b.Pa.hide()})}; function Rd(a){a.la(function(){v(a.getElement(),{transform:"translateY(100%)",opactiy:1,visibility:"visible"});return P(a.getElement(),{transform:Vd(a),opacity:1,visibility:"visible"},300).then(function(){a.getElement().focus()})});a.gb=!1} e.resizeView=function(a,b,c){function d(){return h!==f.bd}var f=this;c=void 0===c?!0:c;if(this.Da!=a)return null;var g=Math.min(b,this.j.getWin().innerHeight*this.od),h=++this.bd;if(c){var k=this.getElement().offsetHeight;c=g>=k?this.la(function(){if(d())return Promise.resolve();var l={height:g+"px"};Wd(f)||(l.transform="translateY("+(g-k)+"px)");v(f.getElement(),l);return P(f.getElement(),{transform:Vd(f)},300)}):this.la(function(){return(d()?Promise.resolve():P(f.getElement(),{transform:Wd(f)?Vd(f): "translateY("+(k-g)+"px)"},300)).then(function(){d()||v(f.getElement(),{height:g+"px",transform:Vd(f)})})})}else v(this.getElement(),{height:g+"px"}),c=Promise.resolve();return c.then(function(){if(!d()){if(Wd(f))Ud(f);else{var l=b+20,m=f.j.getRootElement();v(m,{"padding-bottom":l+"px"})}a.resized()}})};e.la=function(a){var b=this;return this.ma=(this.ma||Promise.resolve()).then(function(){return a()},function(){}).then(function(){b.ma=null})}; function Ud(a){a.j.getRootElement().style.removeProperty("padding-bottom")}function Td(a){var b=a.getElement();a=Wd(a)?{top:"50%",bottom:0,transform:Vd(a)}:{top:"auto",bottom:0,transform:Vd(a)};v(b,a)}function Wd(a){return a.tc&&a.Mb.matches}function Vd(a){return Wd(a)?"translateY(-50%)":"translateY(0px)"};function Xd(a){var b=this;this.j=a;this.fa=this.ca=null;this.ta=new Gd(a,2147483647);this.lb=null;this.ta.getElement().addEventListener("click",function(){if(b.lb)try{b.lb.focus()}catch(c){}})}e=Xd.prototype;e.openDialog=function(a,b){a=void 0===a?!1:a;b=void 0===b?{}:b;this.fa||(this.ca=new Qd(this.j,b),this.fa=this.ca.open(a));return this.fa};e.openView=function(a,b,c){b=void 0===b?!1:b;c=void 0===c?{}:c;this.handleCancellations(a);return this.openDialog(b,c).then(function(d){return d.openView(a)})}; e.handleCancellations=function(a){var b=this;return a.whenComplete().catch(function(c){x(c)&&b.completeView(a);throw c;})};e.completeView=function(a){var b=this;setTimeout(function(){b.ca&&b.ca.getCurrentView()==a&&b.xa()},100)};e.completeAll=function(){this.ca&&this.xa();this.ta.isAttached()&&this.ta.destroy()};e.getDialog=function(){return this.ca};e.xa=function(){this.ca.close();this.fa=this.ca=null};e.popupOpened=function(a){this.lb=a||null;this.ta.isAttached()||this.ta.attach();this.ta.show()}; e.popupClosed=function(){this.lb=null;try{this.ta.hide()}catch(a){}};function Yd(a){var b=this;this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();var c=this.m.addDefaultArguments({isClosable:!0,hasSubscriptionCallback:a.callbacks().hasSubscribeRequestCallback()});this.l=new y(this.g,this.m,J("/metertoastiframe"),c,!1);this.Ra=null;this.Qa=!1;this.ua=function(){var d=new dc;d.setClose(!0);b.l.execute(d);b.removeCloseEventListener();b.h.eventManager().logSwgEvent(1027,!0);b.Ra&&!b.Qa&&(b.Qa=!0,b.Ra())};this.Ec=null} Yd.prototype.start=function(){var a=this;this.h.callbacks().triggerFlowStarted("showMeterToast");this.l.on(C,this.Lc.bind(this));this.h.callbacks().hasSubscribeRequestCallback()||t("[swg.js]: `setOnNativeSubscribeRequest` has not been set before starting the metering flow, so users will not be able to subscribe from the metering dialog directly. Please call `setOnNativeSubscribeRequest` with a subscription flow callback before starting metering.");this.o.handleCancellations(this.l).catch(function(b){a.Ra&& !a.Qa&&(a.Qa=!0,a.Ra());if(!x(b))throw console.error("[swg.js]: Error occurred during meter toast handling: "+b),b;});return this.o.openDialog().then(function(b){Zd(a);$d(a);return b.openView(a.l).then(function(){a.g.addEventListener("click",a.ua);a.g.addEventListener("touchstart",a.ua);a.g.addEventListener("mousedown",a.ua);if(ae(a))Za(a.g.document.body,"overflow","hidden");else{var c,d;a.Ec=function(){c=c||a.g.pageYOffset;a.g.clearTimeout(d);d=a.g.setTimeout(function(){100<Math.abs(a.g.pageYOffset- c)&&a.ua()},100)};a.g.addEventListener("scroll",a.Ec)}a.h.eventManager().logSwgEvent(21);a.h.eventManager().logSwgEvent(3011)})})};Yd.prototype.setOnConsumeCallback=function(a){this.Ra=a};Yd.prototype.removeCloseEventListener=function(){this.g.removeEventListener("click",this.ua);this.g.removeEventListener("touchstart",this.ua);this.g.removeEventListener("mousedown",this.ua);ae(this)?Za(this.g.document.body,"overflow","visible"):this.g.removeEventListener("scroll",this.Ec)}; function Zd(a){var b=a.g.matchMedia("(max-width: 640px), (max-height: 640px)"),c=a.o.getDialog().getElement();b.matches&&v(c,{"box-shadow":"rgba(60, 64, 67, 0.3) 0px -2px 5px, rgba(60, 64, 67, 0.15) 0px -5px 5px"});b.addListener(function(d){d.matches?v(c,{"box-shadow":"rgba(60, 64, 67, 0.3) 0px -2px 5px, rgba(60, 64, 67, 0.15) 0px -5px 5px"}):v(c,{"box-shadow":""})})} function $d(a){a.g.matchMedia("(min-width: 640px) and (min-height: 640px)").matches&&(a=a.o.getDialog().getLoadingView().getElement(),v(a,{width:"420px",margin:"auto"}))}Yd.prototype.Lc=function(a){a.getNative()&&(this.removeCloseEventListener(),this.Qa=!0,this.h.callbacks().triggerSubscribeRequest())};function ae(a){return!!a.g.navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i)};var be={height:0},ce={frameborder:"0",scrolling:"no","class":"swg-toast"};function de(a,b,c){var d=this;this.j=a.doc();this.m=a.activities();this.Wa=b;this.U=c||{};this.ma=null;this.s=w(this.j.getWin().document,"iframe",ce);v(this.s,be);this.sb=new Promise(function(f){d.s.onload=f})}de.prototype.getElement=function(){return this.s};de.prototype.open=function(){this.j.getBody().appendChild(this.s);return ee(this)}; function ee(a){return a.m.openIframe(a.s,a.Wa,a.U).then(function(b){return b.whenReady()}).then(function(){ab(a.s);a.la(function(){v(a.s,{transform:"translateY(100%)",opactiy:1,visibility:"visible"});return P(a.s,{transform:"translateY(0)",opacity:1,visibility:"visible"},400)});a.j.getWin().setTimeout(function(){a.close()},8E3)})}de.prototype.la=function(a){var b=this;return this.ma=(this.ma||Promise.resolve()).then(function(){return a()}).catch(function(){}).then(function(){b.ma=null})}; de.prototype.close=function(){var a=this;return this.la(function(){a.j.getWin().setTimeout(function(){a.j.getBody().removeChild(a.s);return Promise.resolve()},500);return P(a.s,{transform:"translateY(100%)",opacity:1,visibility:"visible"},400)})};var Q={},fe=(Q.paywall=1,Q.ad_shown=2,Q.offers_shown=3,Q.subscriptions_landing_page=1004,Q.offer_selected=1006,Q.payment_flow_start=1005,Q.payment_complete=1001,Q.custom=3E3,Q),R={},ge=(R[0]=null,R[1]="paywall",R[2]="ad_shown",R[3]="offers_shown",R[4]=null,R[5]=null,R[1E3]=null,R[1001]="payment_complete",R[1002]=null,R[1003]=null,R[1004]="subscriptions_landing_page",R[1005]="payment_flow_start",R[1006]="offer_selected",R[2E3]=null,R[3E3]="custom",R),S={},he=(S.EVENT_SHOWCASE_METER_OFFERED=[3010,3011], S.EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION=[3007],S.EVENT_SHOWCASE_UNLOCKED_BY_METER=[3010,3008],S.EVENT_SHOWCASE_UNLOCKED_FREE_PAGE=[3012],S.EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL=[3009,22,23],S.EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL=[3009,1],S.EVENT_SHOWCASE_INELIGIBLE_PAYWALL=[3013,3009],S),T={},ie=(T[22]=2001,T[3008]=1003,T[3007]=1001,T[3012]=1002,T[1]=2002,T[3013]=2003,T);function U(a,b,c,d){return{eventCategory:a,eventAction:b,eventLabel:c,nonInteraction:d}} var V={},je=(V[3]=U("NTG paywall","paywall modal impression","",!0),V[26]=U("NTG membership","offer impressions","",!0),V[1006]=U("NTG paywall","click","",!1),V[1030]=U("NTG subscription","marketing modal click","",!1),V[24]=U("NTG subscription","marketing modal impression","",!0),V[1031]=U("NTG membership","marketing modal click","",!1),V[25]=U("NTG membership","membership modal impression","",!0),V),ke={},le=(ke[1001]=U("NTG subscription","submit","success",!1),ke),me={},ne=(me[1001]=U("NTG membership", "submit","success",!1),me);function oe(a,b){b=void 0===b?!1:b;a=G(a);if(!(a.gaa_at&&a.gaa_n&&a.gaa_sig&&a.gaa_ts)||!b&&"na"===a.gaa_at)return!1;var c=parseInt(a.gaa_ts,16),d=Date.now()/1E3;return c<d?!1:!0};function pe(a,b,c,d){this.g=a;this.R=b;this.L=this.R.getPublicationId();this.F=c;this.h=d;this.ld=new ic;this.M=null;this.Ba=0;this.Db=this.$a=!1;this.La=null;this.G=d.storage();this.Y=d.analytics();this.V=d.config();this.entitlementsPostPromise=null;this.h.eventManager().registerEventListener(this.ae.bind(this))}e=pe.prototype;e.reset=function(a){this.M=null;this.Ba=Math.max(this.Ba,a?3:0);a&&(this.G.remove("ents"),this.G.remove("isreadytopay"))}; e.clear=function(){this.M=null;this.Ba=0;this.unblockNextNotification();this.G.remove("ents");this.G.remove("toast");this.G.remove("isreadytopay")}; e.getEntitlements=function(a){var b=this;"string"===typeof a&&(1600289016959<Date.now()&&t("[swg.js:getEntitlements]: If present, the first param of getEntitlements() should be an object of type GetEntitlementsParamsExternalDef."),a={encryption:{encryptedDocumentKey:a}});this.M||(this.M=qe(this,a));return this.M.then(function(c){null!=c.isReadyToPay&&b.Y.setReadyToPay(c.isReadyToPay);return c})}; e.pushNextEntitlements=function(a,b){return(b=re(this,a,!0,b))&&b.enablesThis()?(this.G.set("ents",a),!0):!1};function se(a){return G(a.g.location.search).gaa_n}e.ae=function(a){if(oe(this.g.location.search,!0)){var b=ie[a.eventType];if(b){switch(a.eventOriginator){case 6:var c=3001;break;case 1:if(1003==b)return;c=1001;break;default:return}var d=se(this),f,g,h=null==a?void 0:null==(f=a.additionalParameters)?void 0:null==(g=f.getIsUserRegistered)?void 0:g.call(f);te(this,new Vb,b,c,d,h)}}}; function te(a,b,c,d,f,g){f=void 0===f?"":f;g=void 0===g?null:g;var h=new Wb;h.setUsedEntitlement(b);h.setClientEventTime(dd());h.setEntitlementResult(c);h.setEntitlementSource(d);h.setToken(f);"boolean"===typeof g&&h.setIsUserRegistered(g);var k="/publication/"+encodeURIComponent(a.L)+"/entitlements";k=ue(a.g.location,k);a.entitlementsPostPromise=(a.La?Promise.resolve():Ua(yc(a.h.doc())).then(function(l){a.La=Sa(Qa(JSON.stringify({metering:{resource:{hashedCanonicalUrl:l}}})))})).then(function(){k= H(k,"encodedParams",a.La);return a.F.sendPost(Ec(k),h)})}function qe(a,b){return ve(a,b).then(function(c){var d=a.$a;a.$a=!1;var f=a.Db;a.Db=!1;d||(a.h.callbacks().triggerEntitlementsResponse(Promise.resolve(c)),(d=c.getEntitlementForThis())?f||we(a,d):a.h.eventManager().logSwgEvent(3009,!1));return c})} function ve(a,b){return Promise.all([a.G.get("ents"),a.G.get("isreadytopay")]).then(function(c){var d=c[0],f=c[1],g=!(!b||!b.encryption);if(d&&!g){var h=re;a:{switch(f){case "true":var k=!0;break a;case "false":k=!1;break a}k=void 0}var l=h(a,d,!0,k);if(l&&l.enablesThis())return a.Ba=0,l}return xe(a,b).then(function(m){m&&m.enablesThisWithCacheableEntitlements()&&m.raw&&a.G.set("ents",m.raw);return m})})} function xe(a,b){function c(){d--;return a.oa(b).then(function(f){return f.enablesThis()||0>=d?f:new Promise(function(g){a.g.setTimeout(function(){g(c())},550)})})}var d=a.Ba;a.Ba=0;return c()}e.setToastShown=function(a){this.G.set("toast",a?"1":"0")};e.blockNextNotification=function(){this.$a=!0};e.blockNextToast=function(){this.Db=!0};e.unblockNextNotification=function(){this.$a=!1}; e.parseEntitlements=function(a){var b=a.isReadyToPay;null==b?this.G.remove("isreadytopay"):this.G.set("isreadytopay",String(b));var c=a.signedEntitlements,d=a.decryptedDocumentKey,f=a.swgUserToken;if(c){if(a=re(this,c,!1,b,d))return f&&this.G.set("USER_TOKEN",f,!0),a}else{var g=a.entitlements;if(g)return f&&this.G.set("USER_TOKEN",f,!0),ye(this,"",g,b,d)}return ye(this,"",[],b)}; function re(a,b,c,d,f){try{var g=a.ld.decode(b);if(c){var h=Date.now();if(1E3*parseFloat(g.exp)<h)return null}var k=g.entitlements;return k&&ye(a,b,k,d,f)||null}catch(l){a.g.setTimeout(function(){throw l;})}return null}function ye(a,b,c,d,f){return new kc("subscribe.google.com",b,mc(c),a.R.getProductId(),a.Ad.bind(a),a.Hd.bind(a),d,f)} function we(a,b){if("google:metering"===b.source)a.h.eventManager().logSwgEvent(3010,!1),Promise.resolve();else{var c=new z;c.setIsUserRegistered(!0);var d="privileged"===b.source?3014:3007;a.h.eventManager().logSwgEvent(d,!1,c);a.G.get("toast").then(function(f){if("1"!==f)return f=b.source||"google:metering",(new de(a.h,J("/toastiframe"),L({publicationId:a.L,source:f}))).open()})}}e.Ad=function(a){a.getEntitlementForThis()&&this.setToastShown(!0)}; e.Hd=function(a,b){var c=this;if(a.enablesThisWithGoogleMetering()){var d=function(){b&&b();var g=a.getEntitlementForThis();if(g&&"google:metering"===g.source&&oe(c.g.location.search)){c.h.eventManager().logSwgEvent(3008,!1);var h=se(c),k=new Vb;k.setSource(g.source);k.setJwt(g.subscriptionToken);te(c,k,1003,2001,h)}};if(!1===ze(this,a))return d();var f=new Yd(this.h);f.setOnConsumeCallback(d);return f.start()}}; function ze(a,b){if((b=b.getEntitlementForThis())&&"google:metering"===b.source)try{var c=a.ld.decode(b.subscriptionToken);return c.metering&&c.metering.showToast}catch(d){}} e.oa=function(a){var b=this,c,d=null==a?void 0:null==(c=a.encryption)?void 0:c.swgUserToken,f=d?Promise.resolve(d):this.G.get("USER_TOKEN",!0),g="/publication/"+encodeURIComponent(this.L)+"/entitlements";return Promise.all([Ua(yc(this.h.doc())),f]).then(function(h){var k=h[0];h=h[1];g=ue(b.g.location,g);if(null==a?0:a.encryption)g=H(g,"crypt",a.encryption.encryptedDocumentKey);h&&(g=H(g,"sut",h));var l;if(b.L&&(null==a?0:null==(l=a.metering)?0:l.state)&&oe(b.g.location.search)){var m=a.metering.state.id; if("string"===typeof m&&0<m.length){var p=function(F){var K=F.attributes,D=F.category;K&&Object.keys(K).forEach(function(B){var sa=D+"_"+B,nc=Number(K[B].timestamp),$f=nc>Date.now()/1E3*2;nc&&!$f||t('SwG Entitlements: Please specify a Unix timestamp, in seconds, for the "'+B+'" '+D+" attribute. The timestamp you passed ("+K[B].timestamp+") looks invalid.");r.metering.state.attributes.push({name:sa,timestamp:nc})})},r={metering:{clientTypes:[1],owner:b.L,resource:{hashedCanonicalUrl:k},state:{id:m, attributes:[]},token:se(b)}};p({attributes:a.metering.state.standardAttributes,category:"standard"});p({attributes:a.metering.state.customAttributes,category:"custom"});b.La=Sa(Qa(JSON.stringify(r)));g=H(g,"encodedParams",b.La)}else t("SwG Entitlements: Please specify a metering state ID string, ideally a hash to avoid PII.")}return Ec(g)}).then(function(h){b.h.eventManager().logSwgEvent(1024,!1);return b.F.fetchCredentialedJson(h)}).then(function(h){h.errorMessages&&0<h.errorMessages.length&&h.errorMessages.forEach(function(k){t("SwG Entitlements: "+ k)});return b.parseEntitlements(h)})};function ue(a,b){var c=G(a.hash)["swg.deventitlement"];return void 0===c?b:H(b,"devEnt",c)};var Ae=["GET","POST"],Be={document:1,text:2};function Ce(a){this.win=a}Ce.prototype.oa=function(a,b){u("string"==typeof a,"Only URL supported: %s",a);var c=b.credentials;u(void 0===c||"include"==c||"omit"==c,"Only credentials=include|omit support: %s",c);return"document"==b.responseType?De(a,b):(this.win.fetch||De).apply(null,arguments)}; Ce.prototype.fetch=function(a,b){b=Ee(b);return this.oa(a,b).catch(function(c){var d=E(a).origin;throw Error("XHR Failed fetching ("+d+"/...): (Note: a CORS error above may indicate that this domain is not configured for Subscribe with Google)",c&&c.message);}).then(function(c){return Fe(c)})}; function Ee(a){var b=a=a||{};var c=a.method;void 0===c?c="GET":(c=c.toUpperCase(),u(Ae.includes(c),"Only one of %s is currently allowed. Got %s",Ae.join(", "),c));b.method=c;a.headers=a.headers||{};return a} function De(a,b){return new Promise(function(c,d){var f=Ge(b.method||"GET",a);"include"==b.credentials&&(f.withCredentials=!0);b.responseType in Be&&(f.responseType=b.responseType);b.headers&&Object.keys(b.headers).forEach(function(g){f.setRequestHeader(g,b.headers[g])});f.onreadystatechange=function(){2>f.readyState||(100>f.status||599<f.status?(f.onreadystatechange=null,d(Error("Unknown HTTP status "+f.status))):4==f.readyState&&c(new He(f)))};f.onerror=function(){d(Error("Network failure"))};f.onabort= function(){d(Error("Request aborted"))};"POST"==b.method?f.send(b.body):f.send()})}function Ge(a,b){var c=new XMLHttpRequest;if("withCredentials"in c)c.open(a,b,!0);else throw Error("CORS is not supported");return c}function Fe(a){return new Promise(function(b){if(a.ok)return b(a);b=a.status;var c=Error("HTTP error "+b);c.retriable=415==b||500<=b&&600>b;c.response=a;throw c;})} function He(a){this.ka=a;this.status=this.ka.status;this.ok=200<=this.status&&300>this.status;this.headers=new Ie(a);this.bodyUsed=!1;this.body=null}He.prototype.clone=function(){u(!this.bodyUsed,"Body already used");return new He(this.ka)};function Je(a){u(!a.bodyUsed,"Body already used");a.bodyUsed=!0;return Promise.resolve(a.ka.responseText)}He.prototype.text=function(){return Je(this)};He.prototype.json=function(){return Je(this).then(fc)};He.prototype.arrayBuffer=function(){return Je(this).then(Qa)}; function Ie(a){this.ka=a}Ie.prototype.get=function(a){return this.ka.getResponseHeader(a)};Ie.prototype.has=function(a){return null!=this.ka.getResponseHeader(a)};function Ke(a){this.ka=new Ce(a)}Ke.prototype.fetchCredentialedJson=function(a){return this.fetch(a,{method:"GET",headers:{Accept:"text/plain, application/json"},credentials:"include"}).then(function(b){return b.text().then(function(c){var d=c.replace(/^(\)\]\}'\n)/,"");return fc(d)})})}; Ke.prototype.sendPost=function(a,b){b={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},credentials:"include",body:"f.req="+JSON.stringify(b.toArray(!1))};return this.fetch(a,b).then(function(c){return c&&c.json()||{}})};Ke.prototype.fetch=function(a,b){return this.ka.fetch(a,b)}; Ke.prototype.sendBeacon=function(a,b){navigator.sendBeacon?(b=new Blob(["f.req="+JSON.stringify(b.toArray(!1))],{type:"application/x-www-form-urlencoded;charset=UTF-8"}),navigator.sendBeacon(a,b)):this.sendPost(a,b)};function Le(a){this.g=a.win();this.u=a.eventManager()}Le.prototype.start=function(){this.u.registerEventListener(this.Ma.bind(this))};Le.prototype.Ma=function(a){if("function"==typeof this.g.ga){var b="";a.additionalParameters&&(b=a.additionalParameters.subscriptionFlow||a.additionalParameters.getSubscriptionFlow());a=a.eventType;var c=null;b&&("subscribe"==b?c=le[a]:"contribute"==b&&(c=ne[a]));(b=c||je[a])&&this.g.ga("send","event",b)}};function Me(a){this.j=a;this.Vd=Promise.resolve()}Me.prototype.error=function(a){var b=this,c=Array.prototype.slice.call(arguments,0);return this.Vd.then(function(){var d=Ne.apply(null,c);d.reported||(b.j.getWin().document.createElement("img").src="https://news.google.com/_/SubscribewithgoogleClientUi/jserror?error="+encodeURIComponent(String(d))+"&script="+encodeURIComponent("https://news.google.com/swg/js/v1/swg.js")+"&line="+(d.lineNumber||1)+"&trace="+encodeURIComponent(d.stack),d.reported=!0)})}; function Ne(a){for(var b=null,c="",d=0;d<arguments.length;d++){var f=arguments[d];if(f instanceof Error&&!b){b=void 0;var g=Object.getOwnPropertyDescriptor(f,"message");if(g&&g.writable)b=f;else{g=f.stack;var h=Error(f.message);for(b in f)h[b]=f[b];h.stack=g;b=h}}else c&&(c+=" "),c+=f}b?c&&(b.message=c+": "+b.message):b=Error(c);return b};function Oe(a){this.h=a;this.m=a.activities();this.R=a.pageConfig();this.o=a.dialogManager()} Oe.prototype.start=function(a){a=void 0===a?{}:a;this.h.callbacks().triggerFlowStarted("linkAccount");var b="redirect"==this.h.config().windowOpenMode;a=a.ampReaderId?L({publicationId:this.R.getPublicationId(),ampReaderId:a.ampReaderId}):L({publicationId:this.R.getPublicationId()});var c=this.m.open("swg-link",J("/linkbackstart"),b?"_top":"_blank",a,{});this.h.eventManager().logSwgEvent(12);this.o.popupOpened(c&&c.targetWin);return Promise.resolve()}; function Pe(a,b){var c=this;this.h=a;this.g=a.win();this.H=a.clientConfigManager();this.m=a.activities();this.o=a.dialogManager();this.$=a.entitlementsManager();this.C=a.callbacks();var d=b&&b.index||"0";this.l=null;this.X=this.H.getClientConfig().then(function(f){return new y(c.g,c.m,J("/linkconfirmiframe",{},f.usePrefixedHostPath,"u/"+d),L({productId:a.pageConfig().getProductId(),publicationId:a.pageConfig().getPublicationId()}),!0)});this.ed=null;this.Ed=new Promise(function(f){c.ed=f})} function Qe(a){a.activities().onResult("swg-link",function(b){a.entitlementsManager().blockNextNotification();a.callbacks().triggerLinkProgress();a.dialogManager().popupClosed();return Ha(b,E(I().frontEnd).origin,!1,!1).then(function(c){a.eventManager().logSwgEvent(1011,!0);(new Pe(a,c)).start()},function(c){x(c)?(a.eventManager().logSwgEvent(1012,!0),a.callbacks().triggerFlowCanceled("linkAccount")):a.eventManager().logSwgEvent(1011,!0)})})} Pe.prototype.start=function(){var a=this;return this.X.then(function(b){a.l=b;a.l.acceptResultAndVerify(E(I().frontEnd).origin,!0,!0).then(function(c){a.P(c)}).catch(function(c){setTimeout(function(){throw c;})}).then(function(){a.o.completeView(a.l)});a.h.eventManager().logSwgEvent(3005,!0);a.h.eventManager().logSwgEvent(14,!0);return a.o.openView(a.l)})}; Pe.prototype.P=function(a){this.h.eventManager().logSwgEvent(1013,!0);this.C.triggerLinkComplete();this.C.resetLinkProgress();this.$.setToastShown(!0);this.$.unblockNextNotification();this.$.reset(a&&a.success||!1);a&&a.entitlements&&this.$.pushNextEntitlements(a.entitlements);this.ed()};Pe.prototype.whenComplete=function(){return this.Ed};function Re(a,b){this.g=a.win();this.h=a;this.m=a.activities();this.o=a.dialogManager();this.T=b;this.l=this.fa=this.yd=null}Re.prototype.getRequestPromise=function(){return this.yd}; Re.prototype.P=function(){this.o.completeView(this.l)};function Se(a,b){a.P();var c=null;if(b.linked){a.o.popupClosed();a.h.callbacks().triggerFlowStarted("linkAccount");c=new Pe(a.h,b);var d=c.start()}else d=Promise.reject(db(a.g,"not linked"));return d.then(function(){a.h.callbacks().triggerLinkProgress();return c.whenComplete()}).then(function(){return!0})} Re.prototype.ge=function(a){var b=this;a&&a.getRequested()&&(this.yd=(new Promise(function(c){return c(b.T())})).then(function(c){var d=new Zb;if(c&&c.token){if(c.authCode)throw Error("Both authCode and token are available");d.setToken(c.token)}else if(c&&c.authCode)d.setAuthCode(c.authCode);else throw Error("Neither token or authCode is available");b.l.execute(d);return c}).catch(function(c){b.P();throw c;}))}; Re.prototype.start=function(){var a=this,b=this.m.addDefaultArguments({isClosable:!0});this.l=new y(this.g,this.m,J("/linksaveiframe"),b,!1,!0);this.l.on($b,this.ge.bind(this));this.fa=this.o.openView(this.l,!0);this.h.eventManager().logSwgEvent(13);return this.l.acceptResultAndVerify(E(I().frontEnd).origin,!0,!0).then(function(c){return Se(a,c)}).catch(function(c){a.P();if(x(c))return a.h.eventManager().logSwgEvent(1016,!0),a.h.callbacks().triggerFlowCanceled("linkAccount"),!1;throw c;})};function Te(a){this.u=a.eventManager()}Te.prototype.sendSubscriptionState=function(a,b){if(!Vc(sc,a))throw Error("Invalid subscription state provided");if(("subscriber"==a||"past_subscriber"==a)&&!b)throw Error("Entitlements must be provided for users with active or expired subscriptions");if(b&&!M(b))throw Error("Entitlements must be an Object");var c=null;b&&(c=JSON.stringify(b));this.u.logEvent({eventType:4E3,eventOriginator:5,isFromUserAction:null,additionalParameters:{state:a,productsOrSkus:c}})}; Te.prototype.sendEvent=function(a){var b=null;if(!Vc(tc,a.name)||!fe[a.name])throw Error("Invalid user event provided("+a.name+")");if(a.data)if(M(a.data))b=Object.assign({},b,a.data);else throw Error("Event data must be an Object("+a.data+")");if(Wc(a.active))b||(b={}),Object.assign(b,{is_active:a.active});else if(null!=a.active)throw Error("Event active must be a boolean");this.u.logEvent({eventType:fe[a.name],eventOriginator:5,isFromUserAction:a.active,additionalParameters:b})};function Ue(a){this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.Sa=null;this.l=new y(this.g,this.m,J("/loginiframe"),L({publicationId:a.pageConfig().getPublicationId(),productId:a.pageConfig().getProductId(),userConsent:!1}),!0)} Ue.prototype.start=function(){var a=this;this.h.callbacks().triggerFlowStarted("showLoginNotification");this.Sa=this.o.openView(this.l);return this.l.acceptResult().then(function(){a.o.completeView(a.l)},function(b){a.o.completeView(a.l);throw b;})};function Ve(a){this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.Sa=null;this.l=new y(this.g,this.m,J("/loginiframe"),L({publicationId:a.pageConfig().getPublicationId(),productId:a.pageConfig().getProductId(),userConsent:!0}),!0)} Ve.prototype.start=function(){var a=this;this.h.callbacks().triggerFlowStarted("showLoginPrompt");this.Sa=this.o.openView(this.l);return this.l.acceptResult().then(function(){a.o.completeView(a.l)},function(b){x(b)?a.h.callbacks().triggerFlowCanceled("showLoginPrompt"):a.o.completeView(a.l);throw b;})};function We(a,b){this.V=a;this.F=b}We.prototype.getOffers=function(a){a=void 0===a?this.V.getProductId():a;if(!a)throw Error("getOffers requires productId in config or arguments");return this.oa(a)};We.prototype.oa=function(a){a=Ec("/publication/"+encodeURIComponent(this.V.getPublicationId())+"/offers?label="+encodeURIComponent(a));return this.F.fetchCredentialedJson(a).then(function(b){return b.offers||[]})};function W(a,b){var c=a.indexOf(":");if(-1!=c){var d=a;a=d.substring(0,c);var f=d.substring(c+1)}else f=d=null;this.L=a;this.Ca=d;this.Oa=f;this.Sd=b}W.prototype.getPublicationId=function(){return this.L};W.prototype.getProductId=function(){return this.Ca};W.prototype.getLabel=function(){return this.Oa};W.prototype.isLocked=function(){return this.Sd};function Xe(a){for(var b=null,c="",d=0;d<arguments.length;d++){var f=arguments[d];if(f instanceof Error&&!b){b=void 0;var g=Object.getOwnPropertyDescriptor(f,"message");if(g&&g.writable)b=f;else{g=f.stack;var h=Error(f.message);for(b in f)h[b]=f[b];h.stack=g;b=h}}else c&&(c+=" "),c+=f}b?c&&(b.message=c+": "+b.message):b=Error(c);return b}function Ye(a){this.wb=a=void 0===a?"":a}function Ze(a,b){a.wb&&(b.message?-1===b.message.indexOf(a.wb)&&(b.message=a.wb):b.message=a.wb)} Ye.prototype.createError=function(a){var b=Xe.apply(null,Array.prototype.slice.call(arguments));Ze(this,b);return b};Ye.prototype.createExpectedError=function(a){var b=Xe.apply(null,Array.prototype.slice.call(arguments));Ze(this,b);b.expected=!0;return b};Ye.prototype.error=function(a){throw this.createError.apply(this,arguments);};Ye.prototype.expectedError=function(a){throw this.createExpectedError.apply(this,arguments);};var $e=new Ye(self.__AMP_TOP?"\u200b\u200b\u200b":"");new Ye;var af="CreativeWork Article NewsArticle Blog Comment Course HowTo Message Review WebPage".split(" "),bf=new RegExp(af.join("|"));function cf(a){var b=this;this.j=Nd(a);this.ya=null;this.Fd=new Promise(function(c){b.ya=c});this.Ud=new df(this.j);this.Rd=new ef(this.j);this.Wd=new ff(this.j)}cf.prototype.resolveConfig=function(){Promise.resolve().then(this.check.bind(this));this.j.whenReady().then(this.check.bind(this));return this.Fd}; cf.prototype.check=function(){if(!this.ya)return null;var a=this.Ud.check();a||(a=this.Rd.check());a||(a=this.Wd.check());a?(this.ya(a),this.ya=null):this.j.isReady()&&(this.ya(Promise.reject($e.createError("No config could be discovered in the page"))),this.ya=null);Ia(a);return a};function gf(){}gf.prototype.checkValue=function(a,b){if(a){var c=this.checkArray;a=Array.isArray(a)?a:[a];c=c.call(this,a,b)}else c=!1;return c}; gf.prototype.checkString=function(a,b){return a?this.checkArray(a.split(/\s+/),b):!1};gf.prototype.checkArray=function(a,b){var c=!1;a.forEach(function(d){c=c||b.includes(d.replace(/^http:\/\/schema.org\//i,""))});return c};function df(a){this.j=a} df.prototype.check=function(){if(!this.j.getBody())return null;var a=hf(this.j.getRootNode(),"subscriptions-product-id");if(!a)return null;var b=hf(this.j.getRootNode(),"subscriptions-accessible-for-free"),c=!(!b||"false"!==b.toLowerCase());return new W(a,c)};function ef(a){this.j=a;this.Fa=new gf} ef.prototype.check=function(){if(!this.j.getBody())return null;for(var a=this.j.isReady(),b=this.j.getRootNode().querySelectorAll('script[type="application/ld+json"]'),c=0;c<b.length;c++){var d=b[c],f;if((f=!d["__SWG-SEEN__"]&&d.textContent)&&!(f=a))a:{f=d;do if(f.nextSibling){f=!0;break a}while((f=f.parentNode)&&void 0!=f);f=!1}if(f&&(d["__SWG-SEEN__"]=!0,bf.test(d.textContent))){var g=this.Tc(d);if(g)return g}}return null}; ef.prototype.Tc=function(a){var b=gc(a.textContent);if(!b)return null;Array.isArray(b)||(b=[b]);for(var c=b,d=0;d<c.length;d++){var f=c[d];f["@graph"]&&Array.isArray(f["@graph"])&&(c=c.concat(f["@graph"]));if(this.Fa.checkValue(f["@type"],af)){a=null;var g=jf(f,"isPartOf");if(g)for(var h=0;h<g.length&&!(a=this.Nb(g[h]));h++);if(a)return d=kf(f,"isAccessibleForFree"),d=null==d||""===d?!0:"boolean"==typeof d?d:"string"==typeof d&&"false"==d.toLowerCase()?!1:!0,new W(a,!d)}}return null}; ef.prototype.Nb=function(a){return this.Fa.checkValue(a["@type"],["Product"])?kf(a,"productID"):null};function jf(a,b){a=a[b];return null==a||""===a?null:Array.isArray(a)?a:[a]}function kf(a,b){var c=jf(a,b);a=c&&c[0];return null==a||""===a?null:a}function ff(a){this.j=a;this.Ca=this.Za=null;this.Fa=new gf} function lf(a,b){var c=b.querySelectorAll("[itemprop='isAccessibleForFree']");for(b=0;c[b];b++){var d=c[b],f=d.getAttribute("content")||d.textContent;if(f&&mf(a,d,"alreadySeenForAccessInfo")){var g=null;"true"==f.toLowerCase()?g=!0:"false"==f.toLowerCase()&&(g=!1);return g}}return null}function mf(a,b,c){for(var d=b;d&&!d[c];d=d.parentNode)if(d[c]=!0,d.hasAttribute&&d.hasAttribute("itemscope"))return d=d.getAttribute("itemtype"),a.Fa.checkString(d,af);return!1} ff.prototype.Nb=function(a){a=a.querySelectorAll('[itemprop="productID"]');for(var b=0;a[b];b++){var c=a[b],d=c.getAttribute("content")||c.textContent;c=c.closest("[itemtype][itemscope]");if(!(-1>=c.getAttribute("itemtype").indexOf("http://schema.org/Product"))&&mf(this,c.parentElement,"alreadySeenForProductInfo"))return d}return null};function nf(a){var b=null;null!=a.Za?b=!a.Za:a.j.isReady()&&(b=!1);return null!=a.Ca&&null!=b?new W(a.Ca,b):null} ff.prototype.Tc=function(){var a=this,b=nf(this);if(b)return b;for(var c=Array.prototype.slice.call(this.j.getRootNode().querySelectorAll("[itemscope][itemtype]")).filter(function(f){return a.Fa.checkString(f.getAttribute("itemtype"),af)}),d=0;c[d]&&null==b;d++)b=c[d],null==this.Za&&(this.Za=lf(this,b)),this.Ca||(this.Ca=this.Nb(b)),b=nf(this);return b};ff.prototype.check=function(){return this.j.getBody()?this.Tc():null}; function hf(a,b){return(a=a.querySelector('meta[name="'+b+'"]'))?a.getAttribute("content"):null};/* Copyright 2018 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ var of={LOCAL:"LOCAL",PREPROD:"PREPROD",PRODUCTION:"PRODUCTION",SANDBOX:"SANDBOX",TEST:"TEST",TIN:"TIN"},pf={CARD:"CARD",TOKENIZED_CARD:"TOKENIZED_CARD",UPI:"UPI"},qf={CRYPTOGRAM_3DS:"CRYPTOGRAM_3DS",PAN_ONLY:"PAN_ONLY"},rf={ESTIMATED:"ESTIMATED",FINAL:"FINAL",NOT_CURRENTLY_KNOWN:"NOT_CURRENTLY_KNOWN"};function sf(){this.le=X.contentWindow}sf.prototype.postMessage=function(a,b){this.le.postMessage(a,b)};var X=null,tf=null,uf=null,vf=null,wf=Date.now(),xf=null,yf=!1,zf=[]; function Af(){X||(uf=(window.gpayInitParams||{}).environment||"PRODUCTION",X=document.createElement("iframe"),X.src="https://pay"+("PREPROD"==uf?"-preprod.sandbox":"SANDBOX"==uf?".sandbox":"")+".google.com/gp/p/ui/payframe?origin="+window.location.origin+"&mid=%{merchantId}",Y({eventType:15,clientLatencyStartMs:Date.now()}),X.height="0",X.width="0",X.style.display="none",X.style.visibility="hidden",X.onload=function(){Y({eventType:17,clientLatencyStartMs:Date.now()});Bf()},document.body?(document.body.appendChild(X), tf=new sf):document.addEventListener("DOMContentLoaded",function(){document.body.appendChild(X);tf=new sf}))}function Cf(a,b){function c(f){f.data.isReadyToPayResponse&&(b(f),window.removeEventListener("message",c))}window.addEventListener("message",c);var d=Object.assign({eventType:6},a);Y(d)} function Y(a){if(yf){a=Object.assign({buyFlowActivityMode:xf,googleTransactionId:vf,originTimeMs:wf},a);var b=tf,c=b.postMessage,d="https://pay";"SANDBOX"==uf?d+=".sandbox":"PREPROD"==uf&&(d+="-preprod.sandbox");c.call(b,a,d+".google.com")}else zf.push(a)}function Bf(){yf=!0;zf.forEach(function(a){Y(a)});zf.length=0};function Df(a){this.J=a;this.T=null}Df.prototype.onResult=function(a){this.T=a}; Df.prototype.isReadyToPay=function(a){var b=Ef(a);return new Promise(function(c){b.canMakePayment().then(function(d){window.sessionStorage.setItem("google.payments.api.storage.isreadytopay.result",d.toString());var f={result:d};2<=a.apiVersion&&a.existingPaymentMethodRequired&&(f.paymentMethodPresent=d);c(f)}).catch(function(){window.sessionStorage.getItem("google.payments.api.storage.isreadytopay.result")?c({result:"true"==window.sessionStorage.getItem("google.payments.api.storage.isreadytopay.result")}): c({result:!1})})})};Df.prototype.prefetchPaymentData=function(a){Ef(a,this.J,a.transactionInfo.currencyCode,a.transactionInfo.totalPrice)};Df.prototype.loadPaymentData=function(a){Ff(this,a)}; function Ef(a,b,c,d){var f={};a&&(f=JSON.parse(JSON.stringify(a)));f.apiVersion||(f.apiVersion=1);f.swg&&(f.allowedPaymentMethods=["CARD"]);b&&"TEST"==b&&(f.environment=b);return new PaymentRequest([{supportedMethods:["https://google.com/pay"],data:f}],{total:{label:"Estimated Total Price",amount:{currency:c||"USD",value:d||"0"}}})} function Ff(a,b){b=Ef(b,a.J,b.transactionInfo&&b.transactionInfo.currencyCode||void 0,b.transactionInfo&&b.transactionInfo.totalPrice||void 0);a.T(b.show().then(function(c){c.complete("success");return c.details}).catch(function(c){c.statusCode="CANCELED";throw c;}))};function Gf(){var a=window.document,b=this;this.j=a;this.Z=a.createElement("gpay-graypane");Hf(this.Z,{"z-index":2147483647,display:"none",position:"fixed",top:0,right:0,bottom:0,left:0,"background-color":"rgba(32, 33, 36, .6)"});this.mb=null;this.Z.addEventListener("click",function(){if(b.mb)try{b.mb.focus()}catch(c){}})}Gf.prototype.show=function(a){this.mb=a||null;this.j.body.appendChild(this.Z);Hf(this.Z,{display:"block",opacity:0});return If(this.Z,{opacity:1})}; Gf.prototype.hide=function(){var a=this;this.mb=null;if(this.Z.parentElement)return If(this.Z,{opacity:0}).then(function(){Hf(a.Z,{display:"none"});a.j.body.removeChild(a.Z)})};function Hf(a,b){for(var c in b)a.style.setProperty(c,b[c].toString(),"important")} function If(a,b){var c=a.ownerDocument.defaultView,d=a.style.transition||"";return(new Promise(function(f){c.setTimeout(function(){c.setTimeout(f,300);Hf(a,Object.assign({transition:"transform 300ms ease-out, opacity 300ms ease-out"},b))})})).then(function(){Hf(a,Object.assign({transition:d},b))})};function Jf(){if(-1!=window.navigator.userAgent.indexOf("OPR/"))return!1;var a=window.navigator.userAgent.match(/Android/i),b=window.navigator.userAgent.match(/Chrome\/([0-9]+)\./i);return null!=a&&"PaymentRequest"in window&&"Google Inc."==window.navigator.vendor&&null!=b&&59<=Number(b[1])}function Kf(a){if(2<=a.apiVersion){var b=Lf(a);if(b&&1==b.length&&"CRYPTOGRAM_3DS"==b[0])return!0}return 1==a.allowedPaymentMethods.length&&"TOKENIZED_CARD"==a.allowedPaymentMethods[0]} function Mf(a,b){return 2<=a.apiVersion&&(a=Lf(a))&&a.includes(b)?!0:!1}function Nf(){return window.location.hostname.endsWith(".google.com")||void 0===window.isSecureContext?null:window.isSecureContext?null:"Google Pay APIs should be called in secure context!"}function Of(a){if(a.environment&&!Object.values(of).includes(a.environment))throw Error("Parameter environment in PaymentOptions can optionally be set to PRODUCTION, otherwise it defaults to TEST. "+a.environment);} function Pf(a){if(!a)return"isReadyToPayRequest must be set!";if(2<=a.apiVersion){if(!("apiVersionMinor"in a))return"apiVersionMinor must be set!";if(!a.allowedPaymentMethods||!Array.isArray(a.allowedPaymentMethods)||0==a.allowedPaymentMethods.length)return"for v2 allowedPaymentMethods must be set to an array containing a list of accepted payment methods";for(var b=0;b<a.allowedPaymentMethods.length;b++){var c=a.allowedPaymentMethods[b];if("CARD"==c.type){if(!c.parameters)return"Field parameters must be setup in each allowedPaymentMethod"; var d=c.parameters.allowedCardNetworks;if(!d||!Array.isArray(d)||0==d.length)return"allowedCardNetworks must be setup in parameters for type CARD";var f=c.parameters.allowedAuthMethods;if(!f||!Array.isArray(f)||0==f.length||!f.every(Qf))return"allowedAuthMethods must be setup in parameters for type 'CARD' and must contain 'CRYPTOGRAM_3DS' and/or 'PAN_ONLY'"}}}else if(!a.allowedPaymentMethods||!Array.isArray(a.allowedPaymentMethods)||0==a.allowedPaymentMethods.length||!a.allowedPaymentMethods.every(Rf))return"allowedPaymentMethods must be set to an array containing 'CARD' and/or 'TOKENIZED_CARD'!"; return null}function Rf(a){return Object.values(pf).includes(a)}function Qf(a){return Object.values(qf).includes(a)} function Sf(a){if(!a)return"paymentDataRequest must be set!";if(a.swg)return(a=a.swg)?a.skuId&&a.publicationId?null:"Both skuId and publicationId must be provided":"Swg parameters must be provided";if(a.transactionInfo)if(a.transactionInfo.currencyCode){if(!a.transactionInfo.totalPriceStatus||!Object.values(rf).includes(a.transactionInfo.totalPriceStatus))return"totalPriceStatus in transactionInfo must be set to one of NOT_CURRENTLY_KNOWN, ESTIMATED or FINAL!";if("NOT_CURRENTLY_KNOWN"!==a.transactionInfo.totalPriceStatus&& !a.transactionInfo.totalPrice)return"totalPrice in transactionInfo must be set when totalPriceStatus is ESTIMATED or FINAL!"}else return"currencyCode in transactionInfo must be set!";else return"transactionInfo must be set!";var b=Tf(a);if(b){if(!b.parameters)return"parameters must be set in allowedPaymentMethod!";b=b.parameters;if(b.payeeVpa)if(b.payeeName)if(b.referenceUrl){if(!b.mcc)return"mcc in allowedPaymentMethod parameters must be set!";if(!b.transactionReferenceId)return"transactionReferenceId in allowedPaymentMethod parameters must be set!"}else return"referenceUrl in allowedPaymentMethod parameters must be set!"; else return"payeeName in allowedPaymentMethod parameters must be set!";else return"payeeVpa in allowedPaymentMethod parameters must be set!";if("INR"!==a.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set to INR!";if("FINAL"!==a.transactionInfo.totalPriceStatus)return"totalPriceStatus in transactionInfo must be set to FINAL!";if(!a.transactionInfo.transactionNote)return"transactionNote in transactionInfo must be set!"}return null} function Tf(a){return!Jf()||2>a.apiVersion||!a.allowedPaymentMethods?null:Uf(a,"UPI")}function Lf(a){return a.allowedPaymentMethods&&(a=Uf(a,"CARD"))&&a.parameters?a.parameters.allowedAuthMethods:null}function Uf(a,b){for(var c=0;c<a.allowedPaymentMethods.length;c++){var d=a.allowedPaymentMethods[c];if(d.type==b)return d}return null};function Vf(a,b,c){var d=Wf;this.J=a;this.activities=b||new Db(window);this.da=new Gf;this.qe=this.T=null;this.Hc=!1;this.Jd=this.v=null;this.ne=d;this.xd=c||null;this.Va=null}e=Vf.prototype;e.onResult=function(a){this.T||(this.T=a,this.activities.onResult("GPAY",this.Yd.bind(this)))}; e.Yd=function(a){var b=this;this.da.hide();this.T(a.acceptResult().then(function(c){if(c.origin!=Xf(b))throw Error("channel mismatch");var d=c.data;if(d.redirectEncryptedCallbackData)return xf=3,Yf(b,d.redirectEncryptedCallbackData).then(function(f){var g=Object.assign({},d);delete g.redirectEncryptedCallbackData;return Object.assign(g,f)});if(!c.originVerified||!c.secureChannel)throw Error("channel mismatch");return d},function(c){var d=c.message,f=c.message;try{f=JSON.parse(d.substring(7))}catch(g){}f.statusCode&& -1==["DEVELOPER_ERROR","MERCHANT_ACCOUNT_ERROR"].indexOf(f.statusCode)&&(f={statusCode:"CANCELED"});"AbortError"==f&&(f={statusCode:"CANCELED"});return Promise.reject(f)}))}; function Yf(a,b){return new Promise(function(c,d){var f=Zf(a),g=new XMLHttpRequest;g.open("POST",f,!0);"withCredentials"in g&&(g.withCredentials=!0);g.onreadystatechange=function(){if(!(2>g.readyState))if(100>g.status||599<g.status)g.onreadystatechange=null,d(Error("Unknown HTTP status "+g.status));else if(4==g.readyState)try{c(JSON.parse(g.responseText))}catch(h){d(h)}};g.onerror=function(){d(Error("Network failure"))};g.onabort=function(){d(Error("Request aborted"))};g.send(b)})} e.isReadyToPay=function(a){var b=this;return new Promise(function(c){if(Kf(a))c({result:!1});else{var d=window.navigator.userAgent;if(0<d.indexOf("GSA/")&&0<d.indexOf("Safari"))c({result:!1});else if(0<d.indexOf("FxiOS"))c({result:!1});else{var f=0<d.indexOf("Chrome")||0<d.indexOf("Firefox")||0<d.indexOf("Safari");f&&2<=a.apiVersion&&a.existingPaymentMethodRequired?(a.environment=b.J,Cf(a,function(g){var h={result:f};a.existingPaymentMethodRequired&&(h.paymentMethodPresent="READY_TO_PAY"==g.data.isReadyToPayResponse); c(h)})):c({result:f})}}})};e.prefetchPaymentData=function(){};e.loadPaymentData=function(a){a.swg||a.apiVersion||(a.apiVersion=1);a.environment=this.J;xf=a.forceRedirect?3:2;a=this.activities.open("GPAY","TIN"==this.J?"/ui/pay":Xf(this)+"/gp/p/ui/pay",a.forceRedirect?"_top":"gp-js-popup",a,{width:600,height:600});this.da.show(a&&a.targetWin)};function Xf(a){return"LOCAL"==a.J?"":"https://"+("PREPROD"==a.J?"pay-preprod.sandbox":"SANDBOX"==a.J?"pay.sandbox":"pay")+".google.com"} function Zf(a){var b=Xf(a)+"/gp/p/apis/buyflow/process";a.xd&&(b+="?rk="+encodeURIComponent(a.xd));return b}e.getIframeUrl=function(a,b){var c="https://pay.google.com/gp/p/ui/pay?origin="+b;if("SANDBOX"==a||"PREPROD"==a)c="https://pay'+ (environment == Constants.Environment.PREPROD ? '-preprod' : '')+ '.sandbox.google.com/gp/p/ui/pay?origin="+b;return c};function ag(a,b){bg(b,"all 250ms ease 0s");b.height="0px";setTimeout(function(){a.parentNode&&a.parentNode.removeChild(a)},250)} e.oe=function(){var a=document.createElement("div");a.classList.add("google-payments-dialogContainer");var b=document.createElement("div");b.classList.add("iframeContainer");var c=document.createElement("iframe");c.classList.add("google-payments-dialog");c.setAttribute("frameborder","0");c.setAttribute("scrolling","no");b.appendChild(c);a.appendChild(b);document.body.appendChild(a);a={container:a,iframe:c};b=a.iframe;c=a.container;c.addEventListener("click",this.Cd.bind(this,a));c.style.display="none"; b.style.display="none";b.height="0px";bg(b,"all 250ms ease 0s");this.Hc=!1;return a};e.me=function(a){a.container.parentNode&&(this.Jd(Promise.reject({errorCode:"CANCELED"})),ag(a.container,a.iframe),this.v&&this.v.disconnect())};e.Cd=function(a){a.container.parentNode&&history.back()}; e.re=function(a,b){var c=this;a.style.display="block";b.style.display="block";setTimeout(function(){b.height="280px";setTimeout(function(){c.Hc=!0;c.Va&&(bg(b,c.Va.transition),b.height=c.Va.height,c.Va=null)},250)},1)};function bg(a,b){a.style.setProperty("transition",b);a.style.setProperty("-webkit-transition",b)} e.pe=function(a,b,c){var d=this;c.swg||c.apiVersion||(c.apiVersion=1);c.environment=this.J;var f,g=this.getIframeUrl(this.J,window.location.origin);return this.activities.openIframe(b,g,c).then(function(h){d.v=h;h.onMessage(function(k){"resize"===k.type&&d.Hc?(f||(f=Date.now()),Date.now()<f+250?bg(b,k.transition+", height 250ms"):bg(b,k.transition),b.height=k.height):d.Va={height:k.height,transition:k.transition}});return h.acceptResult()}).then(function(h){ag(a,b);history.back();return h.data},function(h){ag(a, b);history.back();return Promise.reject(h)})};function cg(){}cg.prototype.isUpiRequest=function(a){return!!Tf(a)};cg.prototype.isReadyToPay=function(a){if(Tf(a))return a.existingPaymentMethodRequired?Promise.resolve({result:!0,paymentMethodPresent:!0}):Promise.resolve({result:!0});throw Error("No Upi payment method found in handler");}; cg.prototype.loadPaymentData=function(a,b,c){var d=b.parameters,f=a.transactionInfo,g=[{supportedMethods:["https://tez.google.com/pay"],data:{pa:d.payeeVpa,pn:d.payeeName,tr:d.transactionReferenceId,url:d.referenceUrl,mc:d.mcc,tn:f.transactionNote}}];d.transactionId&&(g[0].data.tid=d.transactionId);var h=new PaymentRequest(g,{total:{label:"Total",amount:{currency:f.currencyCode,value:f.totalPrice}},displayItems:[{label:"Original Amount",amount:{currency:f.currencyCode,value:f.totalPrice}}]});c(dg(h).then(function(k){k? k=eg(h):(window.location.replace("https://play.google.com/store/apps/details?id=com.google.android.apps.nbu.paisa.user"),k=Promise.reject({errorMessage:"Cannot redirect to Tez page in Google Play."}));return k}).then(function(k){var l=JSON.parse(k.tezResponse);if("FAILURE"===l.Status){switch(l.responseCode){case "ZM":l={errorCode:3,errorMessage:"Payment failure due to invalid MPIN."};break;case "Z9":l={errorCode:3,errorMessage:"Payment failure due to insufficient funds."};break;case "91":l={errorCode:1, errorMessage:"Payment failure due to transaction timeout or connection issue."};break;default:l={errorMessage:"Payment cancelled."}}l=Promise.reject(l)}else l=Promise.resolve({apiVersion:a.apiVersion,apiVersionMinor:a.apiVersionMinor,paymentMethodData:{type:b.type,tokenizationData:{type:"DIRECT",token:{protocolVersion:"ECv1",signature:"",signedMessage:{paymentMethodType:"UPI",payeeVpa:b.parameters.payeeVpa,status:l.Status,transactionReferenceId:b.parameters.transactionReferenceId,transactionId:b.parameters.transactionId? b.parameters.transactionId:l.txnId,transactionInfo:a.transactionInfo}}}}});return l}).catch(function(k){k.statusCode="CANCELED";return Promise.reject(k)}))};function eg(a){return a.show().then(function(b){b.complete("success");return b.details})} function dg(a){var b=window.sessionStorage.getItem("google.payments.api.storage.upi.canMakePaymentCache");return b?Promise.resolve("true"===b):a.canMakePayment?a.canMakePayment().then(function(c){c&&window.sessionStorage.setItem("google.payments.api.storage.upi.canMakePaymentCache",c.toString());return c}):Promise.resolve(!0)};/* Math.uuid.js (v1.4) http://www.broofa.com mailto:robert@broofa.com Copyright (c) 2010 Robert Kieffer Dual licensed under the MIT and GPL licenses. */ var fg="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");function gg(a){for(var b=Array(36),c=0,d,f=0;36>f;f++)8==f||13==f||18==f||23==f?b[f]="-":14==f?b[f]="4":(2>=c&&(c=33554432+16777216*Math.random()|0),d=c&15,c>>=4,b[f]=fg[19==f?d&3|8:d]);return b.join("")+"."+a};var hg="actions.google.com amp-actions.sandbox.google.com amp-actions-staging.sandbox.google.com amp-actions-autopush.sandbox.google.com payments.developers.google.com payments.google.com".split(" "); function ig(a,b,c){this.qd=b;Of(a);this.md=null;this.J=a.environment||"TEST";Wf||(Wf=-1!=hg.indexOf(window.location.hostname)&&a.i&&a.i.googleTransactionId?a.i.googleTransactionId:gg(this.J));this.Zd=a;this.wa=new Vf(this.J,c,a.i&&a.i.redirectKey);this.Ea=5;var d=Jf();this.Ka=d?new Df(this.J):this.wa;this.Uc=new cg;this.wa.onResult(this.oc.bind(this));this.Ka.onResult(this.oc.bind(this));Af();d&&(xf=4);vf=Wf;Y({eventType:9,clientLatencyStartMs:Date.now()});window.addEventListener("message",function(f){-1!= hg.indexOf(window.location.hostname)&&"logPaymentData"===f.data.name&&Y(f.data.data)})}var Wf;e=ig.prototype;e.isReadyToPay=function(a){a&&(a=Object.assign({},this.Zd,a));var b=Date.now(),c=Nf()||Pf(a);if(c)return new Promise(function(f,g){jg("isReadyToPay",c);Y({eventType:0,error:2});g({statusCode:"DEVELOPER_ERROR",statusMessage:c})});var d=kg(this,a);d.then(function(f){Y({eventType:0,clientLatencyStartMs:b,isReadyToPayApiResponse:f});return f});return d}; function kg(a,b){if(a.Uc.isUpiRequest(b))return a.Uc.isReadyToPay(b);if(Jf()&&!lg(b)){if(2<=b.apiVersion)return mg(a,b);var c=a.wa.isReadyToPay(b),d=a.Ka.isReadyToPay(b);return Kf(b)?d:d.then(function(){return c})}return a.wa.isReadyToPay(b)} function mg(a,b){var c=Promise.resolve({result:!1});b.existingPaymentMethodRequired&&(c=Promise.resolve({result:!1,paymentMethodPresent:!1}));var d=c;if(Mf(b,"CRYPTOGRAM_3DS")){var f=JSON.parse(JSON.stringify(b));for(d=0;d<f.allowedPaymentMethods.length;d++)"CARD"==f.allowedPaymentMethods[d].type&&(f.allowedPaymentMethods[d].parameters.allowedAuthMethods=["CRYPTOGRAM_3DS"]);d=a.Ka.isReadyToPay(f)}var g=c;Mf(b,"PAN_ONLY")&&(g=a.wa.isReadyToPay(b));return d.then(function(h){return 1==(h&&h.result)? h:g})}e.prefetchPaymentData=function(a){var b=Nf()||Sf(a);b?jg("prefetchPaymentData",b):(ng(a),Jf()&&!lg(a)?this.Ka.prefetchPaymentData(a):this.wa.prefetchPaymentData(a))}; e.loadPaymentData=function(a){var b=this;Y({eventType:5});var c=Nf()||Sf(a);this.Ea=a&&a.swg?6:5;if(c)this.qd(new Promise(function(f,g){Y({eventType:1,error:2,buyFlowMode:b.Ea});jg("loadPaymentData",c);g({statusCode:"DEVELOPER_ERROR",statusMessage:c})}));else{var d=Tf(a);d?this.Uc.loadPaymentData(a,d,this.oc.bind(this)):(this.md=Date.now(),ng(a),lg(a)?this.wa.loadPaymentData(a):this.Ka.loadPaymentData(a))}};function jg(a,b){console.error("DEVELOPER_ERROR in "+a+" : "+b)} e.createButton=function(){var a=Date.now();Y({eventType:2,clientLatencyStartMs:a});return null};e.oc=function(a){var b=this;a.then(function(){Y({eventType:1,clientLatencyStartMs:b.md,buyFlowMode:b.Ea})}).catch(function(c){c.errorCode?Y({eventType:1,error:c.errorCode,buyFlowMode:b.Ea}):Y({eventType:1,error:6,buyFlowMode:b.Ea})});this.qd(a)};function ng(a){var b={startTimeMs:Date.now(),googleTransactionId:Wf};a.i=a.i?Object.assign(b,a.i):b}function lg(a){return!0===(a.i&&a.i.disableNative)};function og(a){this.j=a}og.prototype.preconnect=function(a){pg(this,a,"preconnect")};og.prototype.dnsPrefetch=function(a){pg(this,a,"dns-prefetch")};og.prototype.prefetch=function(a){pg(this,a,"preconnect prefetch")};og.prototype.preload=function(a,b){pg(this,a,"preconnect preload",b)};function pg(a,b,c,d){var f=w(a.j,"link",{rel:c,href:b});d&&f.setAttribute("as",d);a.j.head.appendChild(f)};var qg={PRODUCTION:"https://pay.google.com",SANDBOX:"https://pay.sandbox.google.com"};function rg(a){this.g=a.win();this.m=a.activities();this.Dc=this.Ac=this.Cc=null;this.ad=a.analytics();this.xc=new sg(this.g);this.cb=null;this.td=new og(this.g.document);var b;if(b=bd(this.g,"pay-client-redirect")){var c=this.g.location.hash;b=/redirectEncryptedCallbackData/.test(c);c=/swgRequest/.test(c);b=b&&c}b&&(this.preconnect(this.td),tg(this));this.xc.prepare();this.u=a.eventManager()}e=rg.prototype; e.preconnect=function(a){a.prefetch(H(qg[I().payEnv]+"/gp/p/ui/pay","_",Fc()));a.prefetch("https://payments.google.com/payments/v4/js/integrator.js?ss=md");a.prefetch("https://clients2.google.com/gr/gr_full_2.0.6.js")};function tg(a){var b={environment:I().payEnv,i:{redirectKey:a.xc.restoreKey()}};var c=a.ad.getTransactionId(),d=a.Od.bind(a);Wf=c;b=new ig(b,d,a.m.getOriginalWebActivityPorts());a.cb=b}e.getType=function(){return"PAYJS"}; e.start=function(a,b){var c=this;b=void 0===b?{}:b;this.Ac=a;this.cb||(this.preconnect(this.td),tg(this));b.forceRedirect&&(a=Object.assign(a,{forceRedirect:b.forceRedirect||!1}));ug(a,"disableNative",b.forceDisableNative||this.g!=this.g.top);var d=null,f=new Promise(function(g){return d=g});this.xc.useVerifier(function(g){g&&ug(a,"redirectVerifier",g);if(b.forceRedirect){var h=c.cb;c.u.getReadyPromise().then(function(){c.ad.getLoggingPromise().then(function(){h.loadPaymentData(a);d(!0)})})}else c.cb.loadPaymentData(a), d(!0)});return f};e.onResponse=function(a){var b=this;this.Cc=a;var c=this.Dc;c&&Promise.resolve().then(function(){c&&a(vg(b,c,b.Ac))})};e.Od=function(a){this.Dc=a;this.Cc&&this.Cc(vg(this,this.Dc,this.Ac))};function vg(a,b,c){return b.then(function(d){c&&(d.paymentRequest=c);return d}).catch(function(d){return"object"==typeof d&&"CANCELED"==d.statusCode?(d=db(a.g,void 0),d.productType=c?c.i.productType:null,Promise.reject(d)):Promise.reject(d)})} function sg(a){this.g=a;this.jb=!1;this.Ua=this.qc=null}sg.prototype.prepare=function(){return wg(this,function(){})};sg.prototype.useVerifier=function(a){var b=this;wg(this,function(c){if(c)try{b.g.localStorage.setItem("subscribe.google.com:rk",c.key)}catch(d){c=null}a(c&&c.verifier||null)})};sg.prototype.restoreKey=function(){try{return this.g.localStorage&&this.g.localStorage.getItem("subscribe.google.com:rk")||null}catch(a){return null}}; function wg(a,b){xg(a);a.jb?b(a.qc):a.Ua&&a.Ua.then(function(c){return b(c)});return a.Ua} function xg(a){if(!a.jb&&!a.Ua){try{var b=!!a.g.localStorage}catch(d){b=!1}var c=a.g.crypto;b&&c&&c.getRandomValues&&c.subtle&&c.subtle.digest?a.Ua=(new Promise(function(d,f){var g=new Uint8Array(16);c.getRandomValues(g);var h=btoa(Oa(g));c.subtle.digest({name:"SHA-384"},Na(h)).then(function(k){k=btoa(Oa(new Uint8Array(k)));d({key:h,verifier:k})},function(k){f(k)})})).catch(function(){return null}).then(function(d){a.jb=!0;return a.qc=d}):(a.jb=!0,a.qc=null)}} function ug(a,b,c){var d={};a.i=Object.assign(a.i||{},(d[b]=c,d))};function yg(a,b,c){this.g=a;this.h=b;this.L=this.h.pageConfig().getPublicationId();this.Fb=null;this.F=c;this.ke=1;this.h.eventManager().registerEventListener(this.Ma.bind(this))}function zg(a,b){b=H(b,"u_tz","240");b=H(b,"v",String(a.ke));if(!a.Fb){var c=a.g.document.cookie.match("(^|;)\\s*__gads\\s*=\\s*([^;]+)");a.Fb=c&&encodeURIComponent(c.pop())}(c=a.Fb)&&(b=H(b,"cookie",c));return b=H(b,"cdm",a.g.location.hostname)} yg.prototype.sendSubscriptionState=function(a,b){a=H("https://pubads.g.doubleclick.net/subopt/data","states",this.L+":"+a);b&&(a=H(a,"extrainfo",b));return this.F.fetch(zg(this,a),{method:"GET",credentials:"include"})}; yg.prototype.Ma=function(a){if(6!==a.eventOriginator&&(this.h.config().enablePropensity||3===a.eventOriginator))if(4E3===a.eventType)this.sendSubscriptionState(a.additionalParameters.state,a.additionalParameters.productsOrSkus);else{var b=ge[a.eventType];if(null!=b){var c=a.additionalParameters;c instanceof z&&(c=void 0);Wc(a.isFromUserAction)&&(M(c)||(c={}),c.is_active=a.isFromUserAction);a=JSON.stringify(c);var d=H("https://pubads.g.doubleclick.net/subopt/data","events",this.L+":"+b);a&&(d=H(d,"extrainfo",a));this.F.fetch(zg(this, d),{method:"GET",credentials:"include"})}}}; yg.prototype.getPropensity=function(a,b){return this.F.fetch(zg(this,"https://pubads.g.doubleclick.net/subopt/pts?products="+this.L+"&type="+b+"&ref="+a),{method:"GET",credentials:"include"}).then(function(c){return c.json()}).then(function(c){var d={};if(c.header)if(c.header.ok){var f=c.scores;c=[];for(var g=0;g<f.length;g++){var h=f[g];c.push(h.score?{product:h.product,score:{value:h.score,bucketed:2==h.score_type}}:{product:h.product,error:h.error_message})}c&&(d={header:{ok:!0},body:{scores:c}})}else d={header:{ok:!1}, body:{error:c.error}};else d={header:{ok:!1},body:{error:"No valid response"}};return d})};function Ag(a,b,c){this.g=a;this.vd=new yg(a,b,c);this.u=b.eventManager()}Ag.prototype.sendSubscriptionState=function(a,b){if(!Object.values(sc).includes(a))throw Error("Invalid subscription state provided");if(("subscriber"==a||"past_subscriber"==a)&&!b)throw Error("Entitlements must be provided for users with active or expired subscriptions");if(b&&!M(b))throw Error("Entitlements must be an Object");var c=null;b&&(c=JSON.stringify(b));this.vd.sendSubscriptionState(a,c)}; Ag.prototype.getPropensity=function(a){if(a&&!Object.values(uc).includes(a))throw Error("Invalid propensity type requested");a||(a="general");return this.vd.getPropensity(this.g.document.referrer,a)}; Ag.prototype.sendEvent=function(a){var b=fe[a.name],c=null;if(!Vc(tc,a.name)||!b)throw Error("Invalid user event provided("+a.name+")");if(a.data)if(M(a.data))c={},Object.assign(c,a.data);else throw Error("Event data must be an Object("+a.data+")");if(Wc(a.active))c||(c={}),Object.assign(c,{is_active:a.active});else if(null!=a.active)throw Error("Event active must be a boolean");this.u.logEvent({eventType:b,eventOriginator:3,isFromUserAction:a.active,additionalParameters:c})};function Bg(a){this.g=a;this.Ya={}}Bg.prototype.get=function(a,b){var c=this;b=void 0===b?!1:b;this.Ya[a]||(this.Ya[a]=new Promise(function(d){var f=b?c.g.localStorage:c.g.sessionStorage;if(f)try{d(f.getItem(Cg(a)))}catch(g){d(null)}else d(null)}));return this.Ya[a]};Bg.prototype.set=function(a,b,c){var d=this;c=void 0===c?!1:c;this.Ya[a]=Promise.resolve(b);return new Promise(function(f){var g=c?d.g.localStorage:d.g.sessionStorage;if(g)try{g.setItem(Cg(a),b)}catch(h){}f()})}; Bg.prototype.remove=function(a,b){var c=this;b=void 0===b?!1:b;delete this.Ya[a];return new Promise(function(d){var f=b?c.g.localStorage:c.g.sessionStorage;if(f)try{f.removeItem(Cg(a))}catch(g){}d()})};function Cg(a){return"subscribe.google.com:"+a};function Dg(a,b){this.h=a;this.g=a.win();this.m=a.activities();this.o=a.dialogManager();this.Sa=null;this.zd=b||Promise.reject("No account promise provided");this.l=new y(this.g,this.m,J("/waitforsubscriptionlookupiframe"),L({publicationId:a.pageConfig().getPublicationId(),productId:a.pageConfig().getProductId()}),!0,!0)} Dg.prototype.start=function(){var a=this;this.Sa=this.o.openView(this.l);return this.zd.then(function(b){a.o.completeView(a.l);return b},function(b){a.o.completeView(a.l);throw b;})};function Eg(a){var b=this;this.g=a;this.j=Nd(a);this.sb=Promise.resolve();this.uc=null;this.V={};this.Hb=!1;this.Ia=null;this.Ib=new Promise(function(c){b.Ia=c});this.Ta=null;this.na=new nd(this.j,this.Ib);this.na.init()}e=Eg.prototype;e.whenReady=function(){return this.sb}; function Z(a,b){if(!a.Hb&&b){a.Hb=!0;if(a.uc)var c=Promise.resolve(new W(a.uc,!1));else a.Ta=new cf(a.j),c=a.Ta.resolveConfig().then(function(d){a.Ta=null;return d});c.then(function(d){a.Ia(new Fg(a.j,d,{configPromise:a.Ib},a.V));a.Ia=null},function(d){a.Ia(Promise.reject(d));a.Ia=null})}else b&&a.Ta&&a.Ta.check();return a.Ib} e.startSubscriptionsFlowIfNeeded=function(){var a=this.g.document;var b=hf(a,"subscriptions-control");a=b?b:(a=a.querySelector("script[subscriptions-control]"))?a.getAttribute("subscriptions-control"):null;Ia(a,"mode");return"manual"==a?null:this.start()};e.init=function(a){u(!this.Hb,"already configured");this.uc=a;Z(this,!0)};e.configure=function(a){Object.assign(this.V,a);return Z(this,!1).then(function(b){return b.configure(a)})};e.start=function(){return Z(this,!0).then(function(a){return a.start()})}; e.reset=function(){return Z(this,!0).then(function(a){return a.reset()})};e.clear=function(){return Z(this,!0).then(function(a){return a.clear()})};e.getEntitlements=function(a){return Z(this,!0).then(function(b){return b.getEntitlements(a)})};e.setOnEntitlementsResponse=function(a){return Z(this,!1).then(function(b){return b.setOnEntitlementsResponse(a)})};e.getOffers=function(a){return Z(this,!0).then(function(b){return b.getOffers(a)})};e.showOffers=function(a){return Z(this,!0).then(function(b){return b.showOffers(a)})}; e.showUpdateOffers=function(a){return Z(this,!0).then(function(b){return b.showUpdateOffers(a)})};e.showSubscribeOption=function(a){return Z(this,!0).then(function(b){return b.showSubscribeOption(a)})};e.showAbbrvOffer=function(a){return Z(this,!0).then(function(b){return b.showAbbrvOffer(a)})};e.showContributionOptions=function(a){return Z(this,!0).then(function(b){return b.showContributionOptions(a)})};e.waitForSubscriptionLookup=function(a){return Z(this,!0).then(function(b){return b.waitForSubscriptionLookup(a)})}; e.setOnNativeSubscribeRequest=function(a){return Z(this,!1).then(function(b){return b.setOnNativeSubscribeRequest(a)})};e.setOnSubscribeResponse=function(a){return Z(this,!1).then(function(b){return b.setOnSubscribeResponse(a)})};e.subscribe=function(a){return Z(this,!0).then(function(b){return b.subscribe(a)})};e.updateSubscription=function(a){return Z(this,!0).then(function(b){return b.updateSubscription(a)})};e.setOnContributionResponse=function(a){return Z(this,!1).then(function(b){return b.setOnContributionResponse(a)})}; e.setOnPaymentResponse=function(a){return Z(this,!1).then(function(b){return b.setOnPaymentResponse(a)})};e.contribute=function(a){return Z(this,!0).then(function(b){return b.contribute(a)})};e.completeDeferredAccountCreation=function(a){return Z(this,!0).then(function(b){return b.completeDeferredAccountCreation(a)})};e.setOnLoginRequest=function(a){return Z(this,!1).then(function(b){return b.setOnLoginRequest(a)})};e.triggerLoginRequest=function(a){return Z(this,!1).then(function(b){return b.triggerLoginRequest(a)})}; e.setOnLinkComplete=function(a){return Z(this,!1).then(function(b){return b.setOnLinkComplete(a)})};e.linkAccount=function(a){a=void 0===a?{}:a;return Z(this,!0).then(function(b){return b.linkAccount(a)})};e.setOnFlowStarted=function(a){return Z(this,!1).then(function(b){return b.setOnFlowStarted(a)})};e.setOnFlowCanceled=function(a){return Z(this,!1).then(function(b){return b.setOnFlowCanceled(a)})};e.saveSubscription=function(a){return Z(this,!0).then(function(b){return b.saveSubscription(a)})}; e.showLoginPrompt=function(){return Z(this,!0).then(function(a){return a.showLoginPrompt()})};e.showLoginNotification=function(){return Z(this,!0).then(function(a){return a.showLoginNotification()})};e.createButton=function(a,b){return this.na.create(a,b)};e.attachSmartButton=function(a,b,c){return Z(this,!0).then(function(d){return d.attachSmartButton(a,b,c)})};e.attachButton=function(a,b,c){return this.na.attach(a,b,c)};e.getPropensityModule=function(){return Z(this,!0).then(function(a){return a.getPropensityModule()})}; e.getLogger=function(){return Z(this,!0).then(function(a){return a.getLogger()})};e.getEventManager=function(){return Z(this,!0).then(function(a){return a.getEventManager()})};e.setShowcaseEntitlement=function(a){return Z(this,!0).then(function(b){return b.setShowcaseEntitlement(a)})};e.consumeShowcaseEntitlementJwt=function(a,b){return Z(this,!0).then(function(c){return c.consumeShowcaseEntitlementJwt(a,b)})};e.showBestAudienceAction=function(){t("Not implemented yet")}; function Fg(a,b,c,d){var f=this;c=c||{};c.configPromise=c.configPromise||Promise.resolve();this.u=new Zc(c.configPromise);this.j=Nd(a);this.g=this.j.getWin();this.V={windowOpenMode:"auto",analyticsMode:0,enableSwgAnalytics:!1,enablePropensity:!1};cb(this.g)&&(this.V.windowOpenMode="redirect");d&&Gg(this,d);this.R=b;this.K=this.j.whenReady();this.kd=new Me(this.j);this.F=c.fetcher||new Ke(this.g);this.G=new Bg(this.g);this.o=new Xd(this.j);this.C=new rd;this.ac=this.bc=null;c.enableGoogleAnalytics&& (this.Ld=new Le(this),this.Ld.start());this.m=new Tc(this);this.Y=new gd(this,this.F);this.Y.start();this.rc=new rg(this);this.Td=new Te(this);this.$=new pe(this.g,this.R,this.F,this);this.H=new zd(b.getPublicationId(),this.F);this.be=new Ag(this.g,this,this.F);this.u.logSwgEvent(11,!1);this.Xd=new We(this.R,this.F);this.na=new nd(this.j,Promise.resolve(this));var g=new og(this.g.document);g.prefetch("https://news.google.com/swg/js/v1/loader.svg");g.preconnect("https://www.gstatic.com/");g.preconnect("https://fonts.googleapis.com/"); g.preconnect("https://www.google.com/");Qe(this);Mc(this);bb(this.j,".swg-dialog,.swg-toast{background-color:#fff!important;box-sizing:border-box}.swg-toast{border:none!important;bottom:0!important;max-height:46px!important;position:fixed!important;z-index:2147483647!important}@media (min-width:871px) and (min-height:641px){.swg-dialog.swg-wide-dialog{left:-435px!important;width:870px!important}}@media (max-height:640px),(max-width:640px){.swg-dialog,.swg-toast{border-top-left-radius:8px!important;border-top-right-radius:8px!important;box-shadow:0 1px 1px rgba(60,64,67,.3),0 1px 4px 1px rgba(60,64,67,.15)!important;left:-240px!important;margin-left:50vw!important;width:480px!important}}@media (min-width:641px) and (min-height:641px){.swg-dialog{background-color:transparent!important;border:none!important;left:-315px!important;margin-left:50vw!important;width:630px!important}.swg-toast{border-radius:4px!important;bottom:8px!important;box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12)!important;left:8px!important}}@media (max-width:480px){.swg-dialog,.swg-toast{left:0!important;margin-left:0!important;right:0!important;width:100%!important}}\n/*# sourceURL=/./src/components/dialog.css*/"); this.m.onRedirectError(function(h){f.Y.addLabels(["redirect"]);f.u.logSwgEvent(2E3,!1);f.kd.error("Redirect error",h)})}e=Fg.prototype;e.doc=function(){return this.j};e.win=function(){return this.g};e.pageConfig=function(){return this.R};e.jserror=function(){return this.kd};e.activities=function(){return this.m};e.payClient=function(){return this.rc};e.dialogManager=function(){return this.o};e.entitlementsManager=function(){return this.$};e.callbacks=function(){return this.C};e.storage=function(){return this.G}; e.clientConfigManager=function(){return this.H};e.analytics=function(){return this.Y};e.init=function(){};e.configure=function(a){Gg(this,a)}; function Gg(a,b){var c="",d;for(d in b){var f=b[d];switch(d){case "windowOpenMode":"auto"!=f&&"redirect"!=f&&(c="Unknown windowOpenMode: "+f);break;case "experiments":f.forEach(function(g){ad(a.g)[g]=!0});a.analytics()&&a.analytics().addLabels(f);break;case "analyticsMode":0!=f&&1!=f&&(c="Unknown analytics mode: "+f);break;case "enableSwgAnalytics":Wc(f)||(c="Unknown enableSwgAnalytics value: "+f);break;case "enablePropensity":Wc(f)||(c="Unknown enablePropensity value: "+f);break;default:c="Unknown config property: "+ d}}u(!c,c||void 0);Object.assign(a.V,b)}e.config=function(){return this.V};e.reset=function(){this.$.reset();this.closeDialog()};e.clear=function(){this.$.clear();this.closeDialog()};e.closeDialog=function(){this.o.completeAll()};e.start=function(){if(!this.R.getProductId()||!this.R.isLocked())return Promise.resolve();this.getEntitlements()}; e.getEntitlements=function(a){var b=this;return this.$.getEntitlements(a).then(function(c){if(c)try{var d=c.entitlements.map(function(f){return f.getSku()||"unknown subscriptionToken"});0<d.length&&b.Y.setSku(d.join(","))}catch(f){}return c.clone()})};e.setOnEntitlementsResponse=function(a){this.C.setOnEntitlementsResponse(a)};e.getOffers=function(a){return this.Xd.getOffers(a&&a.productId)}; e.showOffers=function(a){var b=this;return this.K.then(function(){u(a?!a.oldSku:!0,"The showOffers() method cannot be used to update a subscription. Use the showUpdateOffers() method instead.");b.bc=new Oc(b,a);return b.bc.start()})}; e.showUpdateOffers=function(a){var b=this;u(bd(this.g,"replace-subscription"),"Not yet launched!");return this.K.then(function(){u(a?!!a.oldSku:!1,"The showUpdateOffers() method cannot be used for new subscribers. Use the showOffers() method instead.");return(new Oc(b,a)).start()})};e.showSubscribeOption=function(a){var b=this;return this.K.then(function(){return(new Pc(b,a)).start()})};e.showAbbrvOffer=function(a){var b=this;return this.K.then(function(){return(new Qc(b,a)).start()})}; e.showContributionOptions=function(a){var b=this;return this.K.then(function(){b.ac=new Bd(b,a);return b.ac.start()})};e.getLastContributionsFlow=function(){return this.ac};e.waitForSubscriptionLookup=function(a){var b=this;return this.K.then(function(){return(new Dg(b,a)).start()})};e.setOnLoginRequest=function(a){this.C.setOnLoginRequest(a)};e.triggerLoginRequest=function(a){this.C.triggerLoginRequest(a)};e.setOnLinkComplete=function(a){this.C.setOnLinkComplete(a)}; e.linkAccount=function(a){var b=this;a=void 0===a?{}:a;return this.K.then(function(){return(new Oe(b)).start(a)})};e.saveSubscription=function(a){var b=this;return this.K.then(function(){return(new Re(b,a)).start()})};e.showLoginPrompt=function(){var a=this;return this.K.then(function(){return(new Ve(a)).start()})};e.showLoginNotification=function(){var a=this;return this.K.then(function(){return(new Ue(a)).start()})};e.setOnNativeSubscribeRequest=function(a){this.C.setOnSubscribeRequest(a)}; e.setOnSubscribeResponse=function(a){this.C.setOnSubscribeResponse(a)};e.setOnPaymentResponse=function(a){this.C.setOnPaymentResponse(a)};e.subscribe=function(a){var b=this;u("string"===typeof a,"The subscribe() method can only take a sku as its parameter; for subscription updates please use the updateSubscription() method");return this.K.then(function(){return(new Jc(b,{skuId:a})).start()})}; e.updateSubscription=function(a){var b=this;u(bd(this.g,"replace-subscription"),"Not yet launched!");u(a?a.oldSku:!1,"The updateSubscription() method should be used for subscription updates; for new subscriptions please use the subscribe() method");return this.K.then(function(){return(new Jc(b,a)).start()})};e.setOnContributionResponse=function(a){this.C.setOnContributionResponse(a)}; e.contribute=function(a){var b=this,c="string"==typeof a?{skuId:a}:a;return this.K.then(function(){return(new Jc(b,c,"UI_CONTRIBUTION")).start()})};e.completeDeferredAccountCreation=function(a){var b=this;return this.K.then(function(){return(new Cd(b,a||null)).start()})};e.setOnFlowStarted=function(a){this.C.setOnFlowStarted(a)};e.setOnFlowCanceled=function(a){this.C.setOnFlowCanceled(a)};e.createButton=function(a,b){return this.na.create(a,b)};e.attachButton=function(a,b,c){this.na.attach(a,b,c)}; e.attachSmartButton=function(a,b,c){u(bd(this.g,"smartbox"),"Not yet launched!");this.na.attachSmartButton(this,a,b,c)};e.getPropensityModule=function(){return Promise.resolve(this.be)};e.eventManager=function(){return this.u};e.getLastOffersFlow=function(){return this.bc};e.getEventManager=function(){return Promise.resolve(this.u)};e.getLogger=function(){return Promise.resolve(this.Td)}; e.setShowcaseEntitlement=function(a){var b;if(b=a&&Bc(this.win().location)){b=(b=E(this.win().document.referrer))||Ac;var c;if(c=Bc(b))b=b||zc,c=vc.test(b.hostname);b=c}if(!b||!oe(this.win().location.search,!0))return Promise.resolve();var d=he[a.entitlement]||[];b=new z;b.setIsUserRegistered(a.isUserRegistered);for(a=0;a<d.length;a++)this.eventManager().logEvent({eventType:d[a],eventOriginator:6,isFromUserAction:!1,additionalParameters:b});return Promise.resolve()}; e.consumeShowcaseEntitlementJwt=function(a,b){this.entitlementsManager().parseEntitlements({signedEntitlements:a}).consume(b)};e.showBestAudienceAction=function(){t("Not implemented yet")}; function Hg(a){return{init:a.init.bind(a),configure:a.configure.bind(a),start:a.start.bind(a),reset:a.reset.bind(a),clear:a.clear.bind(a),getEntitlements:a.getEntitlements.bind(a),linkAccount:a.linkAccount.bind(a),showLoginPrompt:a.showLoginPrompt.bind(a),showLoginNotification:a.showLoginNotification.bind(a),getOffers:a.getOffers.bind(a),showOffers:a.showOffers.bind(a),showUpdateOffers:a.showUpdateOffers.bind(a),showAbbrvOffer:a.showAbbrvOffer.bind(a),showSubscribeOption:a.showSubscribeOption.bind(a), showContributionOptions:a.showContributionOptions.bind(a),waitForSubscriptionLookup:a.waitForSubscriptionLookup.bind(a),subscribe:a.subscribe.bind(a),updateSubscription:a.updateSubscription.bind(a),contribute:a.contribute.bind(a),completeDeferredAccountCreation:a.completeDeferredAccountCreation.bind(a),setOnEntitlementsResponse:a.setOnEntitlementsResponse.bind(a),setOnLoginRequest:a.setOnLoginRequest.bind(a),triggerLoginRequest:a.triggerLoginRequest.bind(a),setOnLinkComplete:a.setOnLinkComplete.bind(a), setOnNativeSubscribeRequest:a.setOnNativeSubscribeRequest.bind(a),setOnPaymentResponse:a.setOnPaymentResponse.bind(a),setOnSubscribeResponse:a.setOnSubscribeResponse.bind(a),setOnContributionResponse:a.setOnContributionResponse.bind(a),setOnFlowStarted:a.setOnFlowStarted.bind(a),setOnFlowCanceled:a.setOnFlowCanceled.bind(a),saveSubscription:a.saveSubscription.bind(a),createButton:a.createButton.bind(a),attachButton:a.attachButton.bind(a),attachSmartButton:a.attachSmartButton.bind(a),getPropensityModule:a.getPropensityModule.bind(a), getLogger:a.getLogger.bind(a),getEventManager:a.getEventManager.bind(a),setShowcaseEntitlement:a.setShowcaseEntitlement.bind(a),consumeShowcaseEntitlementJwt:a.consumeShowcaseEntitlementJwt.bind(a),showBestAudienceAction:a.showBestAudienceAction.bind(a)}};Ja("Subscriptions Runtime: 0.1.22.194");(function(a){function b(f){f&&c.whenReady().then(function(){f(d)})}if(!a.SWG||Array.isArray(a.SWG)){/MSIE|Trident/.test(self.navigator.userAgent)&&t("IE Support is being deprecated, in September 2021 IE will no longer be supported.");var c=new Eg(a),d=Hg(c);[].concat(a.SWG,a.SUBSCRIPTIONS).forEach(b);a.SWG=a.SUBSCRIPTIONS={push:b};c.startSubscriptionsFlowIfNeeded()}})(self);}).call(this); //# sourceMappingURL=swg.js.map