news.google.com
Open in
urlscan Pro
2a00:1450:4001:827::200e
Public Scan
URL:
https://news.google.com/swg/js/v1/swg.js
Submission: On November 21 via api from LU — Scanned from DE
Submission: On November 21 via api from LU — Scanned from DE
Form analysis
0 forms found in the DOMText Content
(() => { var _a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,_p,_q,_r,_s,_t,_u,_v,__freeze=Object.freeze,__defProp=Object.defineProperty,__template=(t,e)=>__freeze(__defProp(t,"raw",{value:__freeze(e||t.slice())}));!function(){"use strict";function t(t,e){for(var n=0;n<e.length;n++){const i=e[n];if("string"!=typeof i&&!Array.isArray(i))for(const e in i)if("default"!==e&&!(e in t)){const n=Object.getOwnPropertyDescriptor(i,e);n&&Object.defineProperty(t,e,n.get?n:{enumerable:!0,get:()=>i[e]})}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}const e="https://news.google.com",n="1.0.90",i="https://news.google.com/swg/js/v1";class s{constructor(){}resized(){}}async function r(t,e,n,i){const s=await t.acceptResult();if(s.origin!=e||n&&!s.originVerified||i&&!s.secureChannel)throw new Error("channel mismatch");return s.data}function o(t,e,n,i){const s=t.createElement(e);return function(t,e={}){for(const[n,i]of Object.entries(e))t.setAttribute(n,i)}(s,n),s}function a(t){t.parentElement&&t.parentElement.removeChild(t)}function h(t,e){var n;const i=o(t.getWin().document,"style",{type:"text/css"});return i.textContent=e,null==(n=t.getHead())||n.appendChild(i),i}function l(t){let e=t;do{if(e.nextSibling)return!0}while(e=e.parentNode);return!1}function u(t){return"AbortError"===(null==t?void 0:t.name)}function c(t){const e=new Error("AbortError: "+t);return e.name="AbortError",e}class d{static throwAsync(t){setTimeout((()=>{throw t}))}}const p={frameborder:"0",scrolling:"no"};class g extends s{constructor(t,e,n,i,s=!1,r=!1,a=!0){super(),this.t=t,this.o=e,this.h=n,this.l=i,this.u=s,this.p=r,this.g=a,this.m=null,this._=this.t.document,this.T=o(this._,"iframe",p),this.I=new Promise((t=>{this.S=t}))}getElement(){return this.T}async init(t){const e=await this.o.openIframe(this.T,this.h,this.l);return this.O(e,t)}shouldFadeBody(){return this.u}hasLoadingIndicator(){return this.p}O(t,e){return this.m=t,this.S(t),this.m.onResizeRequest((t=>{e.resizeView(this,t)})),this.m.whenReady()}N(){return this.I}async on(t,e){(await this.N()).on(t,e)}async execute(t){(await this.N()).execute(t)}async acceptResult(){return(await this.N()).acceptResult()}async acceptResultAndVerify(t,e,n){return r(await this.N(),t,e,n)}async whenComplete(){await this.acceptResult()}async onCancel(t){try{await this.acceptResult()}catch(e){throw u(e)&&t(),e}}resized(){this.m&&this.m.resized()}shouldAnimateFade(){return this.g}}var m=(t=>(t[t.UNKNOWN=0]="UNKNOWN",t[t.IMPRESSION_PAYWALL=1]="IMPRESSION_PAYWALL",t[t.IMPRESSION_AD=2]="IMPRESSION_AD",t[t.IMPRESSION_OFFERS=3]="IMPRESSION_OFFERS",t[t.IMPRESSION_SUBSCRIBE_BUTTON=4]="IMPRESSION_SUBSCRIBE_BUTTON",t[t.IMPRESSION_SMARTBOX=5]="IMPRESSION_SMARTBOX",t[t.IMPRESSION_SWG_BUTTON=6]="IMPRESSION_SWG_BUTTON",t[t.IMPRESSION_CLICK_TO_SHOW_OFFERS=7]="IMPRESSION_CLICK_TO_SHOW_OFFERS",t[t.IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED=8]="IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED",t[t.IMPRESSION_SUBSCRIPTION_COMPLETE=9]="IMPRESSION_SUBSCRIPTION_COMPLETE",t[t.IMPRESSION_ACCOUNT_CHANGED=10]="IMPRESSION_ACCOUNT_CHANGED",t[t.IMPRESSION_PAGE_LOAD=11]="IMPRESSION_PAGE_LOAD",t[t.IMPRESSION_LINK=12]="IMPRESSION_LINK",t[t.IMPRESSION_SAVE_SUBSCR_TO_GOOGLE=13]="IMPRESSION_SAVE_SUBSCR_TO_GOOGLE",t[t.IMPRESSION_GOOGLE_UPDATED=14]="IMPRESSION_GOOGLE_UPDATED",t[t.IMPRESSION_SHOW_OFFERS_SMARTBOX=15]="IMPRESSION_SHOW_OFFERS_SMARTBOX",t[t.IMPRESSION_SHOW_OFFERS_SWG_BUTTON=16]="IMPRESSION_SHOW_OFFERS_SWG_BUTTON",t[t.IMPRESSION_SELECT_OFFER_SMARTBOX=17]="IMPRESSION_SELECT_OFFER_SMARTBOX",t[t.IMPRESSION_SELECT_OFFER_SWG_BUTTON=18]="IMPRESSION_SELECT_OFFER_SWG_BUTTON",t[t.IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON=19]="IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON",t[t.IMPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON=20]="IMPRESSION_SELECT_CONTRIBUTION_SWG_BUTTON",t[t.IMPRESSION_METER_TOAST=21]="IMPRESSION_METER_TOAST",t[t.IMPRESSION_REGWALL=22]="IMPRESSION_REGWALL",t[t.IMPRESSION_SHOWCASE_REGWALL=23]="IMPRESSION_SHOWCASE_REGWALL",t[t.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT=24]="IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT",t[t.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT=25]="IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT",t[t.IMPRESSION_CONTRIBUTION_OFFERS=26]="IMPRESSION_CONTRIBUTION_OFFERS",t[t.IMPRESSION_TWG_COUNTER=27]="IMPRESSION_TWG_COUNTER",t[t.IMPRESSION_TWG_SITE_SUPPORTER_WALL=28]="IMPRESSION_TWG_SITE_SUPPORTER_WALL",t[t.IMPRESSION_TWG_PUBLICATION=29]="IMPRESSION_TWG_PUBLICATION",t[t.IMPRESSION_TWG_STATIC_BUTTON=30]="IMPRESSION_TWG_STATIC_BUTTON",t[t.IMPRESSION_TWG_DYNAMIC_BUTTON=31]="IMPRESSION_TWG_DYNAMIC_BUTTON",t[t.IMPRESSION_TWG_STICKER_SELECTION_SCREEN=32]="IMPRESSION_TWG_STICKER_SELECTION_SCREEN",t[t.IMPRESSION_TWG_PUBLICATION_NOT_SET_UP=33]="IMPRESSION_TWG_PUBLICATION_NOT_SET_UP",t[t.IMPRESSION_REGWALL_OPT_IN=34]="IMPRESSION_REGWALL_OPT_IN",t[t.IMPRESSION_NEWSLETTER_OPT_IN=35]="IMPRESSION_NEWSLETTER_OPT_IN",t[t.IMPRESSION_SUBSCRIPTION_OFFERS_ERROR=36]="IMPRESSION_SUBSCRIPTION_OFFERS_ERROR",t[t.IMPRESSION_CONTRIBUTION_OFFERS_ERROR=37]="IMPRESSION_CONTRIBUTION_OFFERS_ERROR",t[t.IMPRESSION_TWG_SHORTENED_STICKER_FLOW=38]="IMPRESSION_TWG_SHORTENED_STICKER_FLOW",t[t.IMPRESSION_SUBSCRIPTION_LINKING_LOADING=39]="IMPRESSION_SUBSCRIPTION_LINKING_LOADING",t[t.IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE=40]="IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE",t[t.IMPRESSION_SUBSCRIPTION_LINKING_ERROR=41]="IMPRESSION_SUBSCRIPTION_LINKING_ERROR",t[t.IMPRESSION_SURVEY=42]="IMPRESSION_SURVEY",t[t.IMPRESSION_REGWALL_ERROR=43]="IMPRESSION_REGWALL_ERROR",t[t.IMPRESSION_NEWSLETTER_ERROR=44]="IMPRESSION_NEWSLETTER_ERROR",t[t.IMPRESSION_SURVEY_ERROR=45]="IMPRESSION_SURVEY_ERROR",t[t.IMPRESSION_METER_TOAST_ERROR=46]="IMPRESSION_METER_TOAST_ERROR",t[t.IMPRESSION_MINI_PROMPT=47]="IMPRESSION_MINI_PROMPT",t[t.IMPRESSION_MINI_PROMPT_ERROR=48]="IMPRESSION_MINI_PROMPT_ERROR",t[t.IMPRESSION_REWARDED_AD=49]="IMPRESSION_REWARDED_AD",t[t.IMPRESSION_BYOP_NEWSLETTER_OPT_IN=50]="IMPRESSION_BYOP_NEWSLETTER_OPT_IN",t[t.IMPRESSION_REWARDED_AD_ERROR=51]="IMPRESSION_REWARDED_AD_ERROR",t[t.IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS=52]="IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS",t[t.IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS=53]="IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS",t[t.IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS_ERROR=54]="IMPRESSION_HOSTED_PAGE_SUBSCRIPTION_OFFERS_ERROR",t[t.IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS_ERROR=55]="IMPRESSION_HOSTED_PAGE_CONTRIBUTION_OFFERS_ERROR",t[t.IMPRESSION_BYO_CTA=56]="IMPRESSION_BYO_CTA",t[t.IMPRESSION_BYO_CTA_ERROR=57]="IMPRESSION_BYO_CTA_ERROR",t[t.ACTION_SUBSCRIBE=1e3]="ACTION_SUBSCRIBE",t[t.ACTION_PAYMENT_COMPLETE=1001]="ACTION_PAYMENT_COMPLETE",t[t.ACTION_ACCOUNT_CREATED=1002]="ACTION_ACCOUNT_CREATED",t[t.ACTION_ACCOUNT_ACKNOWLEDGED=1003]="ACTION_ACCOUNT_ACKNOWLEDGED",t[t.ACTION_SUBSCRIPTIONS_LANDING_PAGE=1004]="ACTION_SUBSCRIPTIONS_LANDING_PAGE",t[t.ACTION_PAYMENT_FLOW_STARTED=1005]="ACTION_PAYMENT_FLOW_STARTED",t[t.ACTION_OFFER_SELECTED=1006]="ACTION_OFFER_SELECTED",t[t.ACTION_SWG_BUTTON_CLICK=1007]="ACTION_SWG_BUTTON_CLICK",t[t.ACTION_VIEW_OFFERS=1008]="ACTION_VIEW_OFFERS",t[t.ACTION_ALREADY_SUBSCRIBED=1009]="ACTION_ALREADY_SUBSCRIBED",t[t.ACTION_NEW_DEFERRED_ACCOUNT=1010]="ACTION_NEW_DEFERRED_ACCOUNT",t[t.ACTION_LINK_CONTINUE=1011]="ACTION_LINK_CONTINUE",t[t.ACTION_LINK_CANCEL=1012]="ACTION_LINK_CANCEL",t[t.ACTION_GOOGLE_UPDATED_CLOSE=1013]="ACTION_GOOGLE_UPDATED_CLOSE",t[t.ACTION_USER_CANCELED_PAYFLOW=1014]="ACTION_USER_CANCELED_PAYFLOW",t[t.ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE=1015]="ACTION_SAVE_SUBSCR_TO_GOOGLE_CONTINUE",t[t.ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL=1016]="ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL",t[t.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK=1017]="ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK",t[t.ACTION_SWG_BUTTON_SELECT_OFFER_CLICK=1018]="ACTION_SWG_BUTTON_SELECT_OFFER_CLICK",t[t.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK=1019]="ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK",t[t.ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK=1020]="ACTION_SWG_BUTTON_SELECT_CONTRIBUTION_CLICK",t[t.ACTION_USER_CONSENT_DEFERRED_ACCOUNT=1021]="ACTION_USER_CONSENT_DEFERRED_ACCOUNT",t[t.ACTION_USER_DENY_DEFERRED_ACCOUNT=1022]="ACTION_USER_DENY_DEFERRED_ACCOUNT",t[t.ACTION_DEFERRED_ACCOUNT_REDIRECT=1023]="ACTION_DEFERRED_ACCOUNT_REDIRECT",t[t.ACTION_GET_ENTITLEMENTS=1024]="ACTION_GET_ENTITLEMENTS",t[t.ACTION_METER_TOAST_SUBSCRIBE_CLICK=1025]="ACTION_METER_TOAST_SUBSCRIBE_CLICK",t[t.ACTION_METER_TOAST_EXPANDED=1026]="ACTION_METER_TOAST_EXPANDED",t[t.ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION=1027]="ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION",t[t.ACTION_METER_TOAST_CLOSED_BY_SWIPE_DOWN=1028]="ACTION_METER_TOAST_CLOSED_BY_SWIPE_DOWN",t[t.ACTION_METER_TOAST_CLOSED_BY_X_CLICKED=1029]="ACTION_METER_TOAST_CLOSED_BY_X_CLICKED",t[t.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK=1030]="ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK",t[t.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK=1031]="ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK",t[t.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE=1032]="ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLOSE",t[t.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE=1033]="ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLOSE",t[t.ACTION_CONTRIBUTION_OFFER_SELECTED=1034]="ACTION_CONTRIBUTION_OFFER_SELECTED",t[t.ACTION_SHOWCASE_REGWALL_GSI_CLICK=1035]="ACTION_SHOWCASE_REGWALL_GSI_CLICK",t[t.ACTION_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK=1036]="ACTION_SHOWCASE_REGWALL_EXISTING_ACCOUNT_CLICK",t[t.ACTION_SUBSCRIPTION_OFFERS_CLOSED=1037]="ACTION_SUBSCRIPTION_OFFERS_CLOSED",t[t.ACTION_CONTRIBUTION_OFFERS_CLOSED=1038]="ACTION_CONTRIBUTION_OFFERS_CLOSED",t[t.ACTION_TWG_STATIC_CTA_CLICK=1039]="ACTION_TWG_STATIC_CTA_CLICK",t[t.ACTION_TWG_DYNAMIC_CTA_CLICK=1040]="ACTION_TWG_DYNAMIC_CTA_CLICK",t[t.ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK=1041]="ACTION_TWG_SITE_LEVEL_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_TWG_DIALOG_SUPPORTER_WALL_CTA_CLICK=1042]="ACTION_TWG_DIALOG_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_TWG_COUNTER_CLICK=1043]="ACTION_TWG_COUNTER_CLICK",t[t.ACTION_TWG_SITE_SUPPORTER_WALL_ALL_THANKS_CLICK=1044]="ACTION_TWG_SITE_SUPPORTER_WALL_ALL_THANKS_CLICK",t[t.ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLOSE_CLICK=1045]="ACTION_TWG_PAID_STICKER_SELECTED_SCREEN_CLOSE_CLICK",t[t.ACTION_TWG_PAID_STICKER_SELECTION_CLICK=1046]="ACTION_TWG_PAID_STICKER_SELECTION_CLICK",t[t.ACTION_TWG_FREE_STICKER_SELECTION_CLICK=1047]="ACTION_TWG_FREE_STICKER_SELECTION_CLICK",t[t.ACTION_TWG_MINI_SUPPORTER_WALL_CLICK=1048]="ACTION_TWG_MINI_SUPPORTER_WALL_CLICK",t[t.ACTION_TWG_CREATOR_BENEFIT_CLICK=1049]="ACTION_TWG_CREATOR_BENEFIT_CLICK",t[t.ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK=1050]="ACTION_TWG_FREE_TRANSACTION_START_NEXT_BUTTON_CLICK",t[t.ACTION_TWG_PAID_TRANSACTION_START_NEXT_BUTTON_CLICK=1051]="ACTION_TWG_PAID_TRANSACTION_START_NEXT_BUTTON_CLICK",t[t.ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK=1052]="ACTION_TWG_STICKER_SELECTION_SCREEN_CLOSE_CLICK",t[t.ACTION_TWG_ARTICLE_LEVEL_SUPPORTER_WALL_CTA_CLICK=1053]="ACTION_TWG_ARTICLE_LEVEL_SUPPORTER_WALL_CTA_CLICK",t[t.ACTION_REGWALL_OPT_IN_BUTTON_CLICK=1054]="ACTION_REGWALL_OPT_IN_BUTTON_CLICK",t[t.ACTION_REGWALL_ALREADY_OPTED_IN_CLICK=1055]="ACTION_REGWALL_ALREADY_OPTED_IN_CLICK",t[t.ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK=1056]="ACTION_NEWSLETTER_OPT_IN_BUTTON_CLICK",t[t.ACTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK=1057]="ACTION_NEWSLETTER_ALREADY_OPTED_IN_CLICK",t[t.ACTION_REGWALL_OPT_IN_CLOSE=1058]="ACTION_REGWALL_OPT_IN_CLOSE",t[t.ACTION_NEWSLETTER_OPT_IN_CLOSE=1059]="ACTION_NEWSLETTER_OPT_IN_CLOSE",t[t.ACTION_SHOWCASE_REGWALL_SIWG_CLICK=1060]="ACTION_SHOWCASE_REGWALL_SIWG_CLICK",t[t.ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK=1061]="ACTION_TWG_CHROME_APP_MENU_ENTRY_POINT_CLICK",t[t.ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK=1062]="ACTION_TWG_DISCOVER_FEED_MENU_ENTRY_POINT_CLICK",t[t.ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK=1063]="ACTION_SHOWCASE_REGWALL_3P_BUTTON_CLICK",t[t.ACTION_SUBSCRIPTION_OFFERS_RETRY=1064]="ACTION_SUBSCRIPTION_OFFERS_RETRY",t[t.ACTION_CONTRIBUTION_OFFERS_RETRY=1065]="ACTION_CONTRIBUTION_OFFERS_RETRY",t[t.ACTION_TWG_SHORTENED_STICKER_FLOW_STICKER_SELECTION_CLICK=1066]="ACTION_TWG_SHORTENED_STICKER_FLOW_STICKER_SELECTION_CLICK",t[t.ACTION_INITIATE_UPDATED_SUBSCRIPTION_LINKING=1067]="ACTION_INITIATE_UPDATED_SUBSCRIPTION_LINKING",t[t.ACTION_SURVEY_SUBMIT_CLICK=1068]="ACTION_SURVEY_SUBMIT_CLICK",t[t.ACTION_SURVEY_CLOSED=1069]="ACTION_SURVEY_CLOSED",t[t.ACTION_SURVEY_DATA_TRANSFER=1070]="ACTION_SURVEY_DATA_TRANSFER",t[t.ACTION_REGWALL_PAGE_REFRESH=1071]="ACTION_REGWALL_PAGE_REFRESH",t[t.ACTION_NEWSLETTER_PAGE_REFRESH=1072]="ACTION_NEWSLETTER_PAGE_REFRESH",t[t.ACTION_SURVEY_PAGE_REFRESH=1073]="ACTION_SURVEY_PAGE_REFRESH",t[t.ACTION_METER_TOAST_PAGE_REFRESH=1074]="ACTION_METER_TOAST_PAGE_REFRESH",t[t.ACTION_MINI_PROMPT_INTERACTION=1075]="ACTION_MINI_PROMPT_INTERACTION",t[t.ACTION_SURVEY_PREVIOUS_BUTTON_CLICK=1076]="ACTION_SURVEY_PREVIOUS_BUTTON_CLICK",t[t.ACTION_SURVEY_NEXT_BUTTON_CLICK=1077]="ACTION_SURVEY_NEXT_BUTTON_CLICK",t[t.ACTION_REWARDED_AD_VIEW=1078]="ACTION_REWARDED_AD_VIEW",t[t.ACTION_REWARDED_AD_CLOSE=1079]="ACTION_REWARDED_AD_CLOSE",t[t.ACTION_REWARDED_AD_CLOSE_AD=1080]="ACTION_REWARDED_AD_CLOSE_AD",t[t.ACTION_REWARDED_AD_SIGN_IN=1081]="ACTION_REWARDED_AD_SIGN_IN",t[t.ACTION_REWARDED_AD_SUPPORT=1082]="ACTION_REWARDED_AD_SUPPORT",t[t.ACTION_BACK_TO_HOMEPAGE=1083]="ACTION_BACK_TO_HOMEPAGE",t[t.ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE=1084]="ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE",t[t.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT=1085]="ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT",t[t.ACTION_SUBSCRIPTION_LINKING_CLOSE=1086]="ACTION_SUBSCRIPTION_LINKING_CLOSE",t[t.ACTION_BYO_CTA_CLOSE=1087]="ACTION_BYO_CTA_CLOSE",t[t.ACTION_BYO_CTA_BUTTON_CLICK=1088]="ACTION_BYO_CTA_BUTTON_CLICK",t[t.EVENT_PAYMENT_FAILED=2e3]="EVENT_PAYMENT_FAILED",t[t.EVENT_REGWALL_OPT_IN_FAILED=2001]="EVENT_REGWALL_OPT_IN_FAILED",t[t.EVENT_NEWSLETTER_OPT_IN_FAILED=2002]="EVENT_NEWSLETTER_OPT_IN_FAILED",t[t.EVENT_REGWALL_ALREADY_OPT_IN=2003]="EVENT_REGWALL_ALREADY_OPT_IN",t[t.EVENT_NEWSLETTER_ALREADY_OPT_IN=2004]="EVENT_NEWSLETTER_ALREADY_OPT_IN",t[t.EVENT_SUBSCRIPTION_LINKING_FAILED=2005]="EVENT_SUBSCRIPTION_LINKING_FAILED",t[t.EVENT_SURVEY_ALREADY_SUBMITTED=2006]="EVENT_SURVEY_ALREADY_SUBMITTED",t[t.EVENT_SURVEY_COMPLETION_RECORD_FAILED=2007]="EVENT_SURVEY_COMPLETION_RECORD_FAILED",t[t.EVENT_SURVEY_DATA_TRANSFER_FAILED=2008]="EVENT_SURVEY_DATA_TRANSFER_FAILED",t[t.EVENT_BYO_CTA_COMPLETION_RECORD_FAILED=2009]="EVENT_BYO_CTA_COMPLETION_RECORD_FAILED",t[t.EVENT_CUSTOM=3e3]="EVENT_CUSTOM",t[t.EVENT_CONFIRM_TX_ID=3001]="EVENT_CONFIRM_TX_ID",t[t.EVENT_CHANGED_TX_ID=3002]="EVENT_CHANGED_TX_ID",t[t.EVENT_GPAY_NO_TX_ID=3003]="EVENT_GPAY_NO_TX_ID",t[t.EVENT_GPAY_CANNOT_CONFIRM_TX_ID=3004]="EVENT_GPAY_CANNOT_CONFIRM_TX_ID",t[t.EVENT_GOOGLE_UPDATED=3005]="EVENT_GOOGLE_UPDATED",t[t.EVENT_NEW_TX_ID=3006]="EVENT_NEW_TX_ID",t[t.EVENT_UNLOCKED_BY_SUBSCRIPTION=3007]="EVENT_UNLOCKED_BY_SUBSCRIPTION",t[t.EVENT_UNLOCKED_BY_METER=3008]="EVENT_UNLOCKED_BY_METER",t[t.EVENT_NO_ENTITLEMENTS=3009]="EVENT_NO_ENTITLEMENTS",t[t.EVENT_HAS_METERING_ENTITLEMENTS=3010]="EVENT_HAS_METERING_ENTITLEMENTS",t[t.EVENT_OFFERED_METER=3011]="EVENT_OFFERED_METER",t[t.EVENT_UNLOCKED_FREE_PAGE=3012]="EVENT_UNLOCKED_FREE_PAGE",t[t.EVENT_INELIGIBLE_PAYWALL=3013]="EVENT_INELIGIBLE_PAYWALL",t[t.EVENT_UNLOCKED_FOR_CRAWLER=3014]="EVENT_UNLOCKED_FOR_CRAWLER",t[t.EVENT_TWG_COUNTER_VIEW=3015]="EVENT_TWG_COUNTER_VIEW",t[t.EVENT_TWG_SITE_SUPPORTER_WALL_VIEW=3016]="EVENT_TWG_SITE_SUPPORTER_WALL_VIEW",t[t.EVENT_TWG_STATIC_BUTTON_VIEW=3017]="EVENT_TWG_STATIC_BUTTON_VIEW",t[t.EVENT_TWG_DYNAMIC_BUTTON_VIEW=3018]="EVENT_TWG_DYNAMIC_BUTTON_VIEW",t[t.EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVATE=3019]="EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PRIVATE",t[t.EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE=3020]="EVENT_TWG_POST_TRANSACTION_SETTING_PRIVATE",t[t.EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PUBLIC=3021]="EVENT_TWG_PRE_TRANSACTION_PRIVACY_SETTING_PUBLIC",t[t.EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC=3022]="EVENT_TWG_POST_TRANSACTION_SETTING_PUBLIC",t[t.EVENT_REGWALL_OPTED_IN=3023]="EVENT_REGWALL_OPTED_IN",t[t.EVENT_NEWSLETTER_OPTED_IN=3024]="EVENT_NEWSLETTER_OPTED_IN",t[t.EVENT_SHOWCASE_METERING_INIT=3025]="EVENT_SHOWCASE_METERING_INIT",t[t.EVENT_DISABLE_MINIPROMPT_DESKTOP=3026]="EVENT_DISABLE_MINIPROMPT_DESKTOP",t[t.EVENT_SUBSCRIPTION_LINKING_SUCCESS=3027]="EVENT_SUBSCRIPTION_LINKING_SUCCESS",t[t.EVENT_SURVEY_SUBMITTED=3028]="EVENT_SURVEY_SUBMITTED",t[t.EVENT_LINK_ACCOUNT_SUCCESS=3029]="EVENT_LINK_ACCOUNT_SUCCESS",t[t.EVENT_SAVE_SUBSCRIPTION_SUCCESS=3030]="EVENT_SAVE_SUBSCRIPTION_SUCCESS",t[t.EVENT_SURVEY_DATA_TRANSFER_COMPLETE=3031]="EVENT_SURVEY_DATA_TRANSFER_COMPLETE",t[t.EVENT_RUNTIME_IS_READY=3032]="EVENT_RUNTIME_IS_READY",t[t.EVENT_START_API=3033]="EVENT_START_API",t[t.EVENT_SHOW_OFFERS_API=3034]="EVENT_SHOW_OFFERS_API",t[t.EVENT_SHOW_CONTRIBUTION_OPTIONS_API=3035]="EVENT_SHOW_CONTRIBUTION_OPTIONS_API",t[t.EVENT_REWARDED_AD_FLOW_INIT=3048]="EVENT_REWARDED_AD_FLOW_INIT",t[t.EVENT_REWARDED_AD_READY=3036]="EVENT_REWARDED_AD_READY",t[t.EVENT_REWARDED_AD_GPT_MISSING_ERROR=3037]="EVENT_REWARDED_AD_GPT_MISSING_ERROR",t[t.EVENT_REWARDED_AD_CONFIG_ERROR=3038]="EVENT_REWARDED_AD_CONFIG_ERROR",t[t.EVENT_REWARDED_AD_PAGE_ERROR=3039]="EVENT_REWARDED_AD_PAGE_ERROR",t[t.EVENT_REWARDED_AD_GPT_ERROR=3040]="EVENT_REWARDED_AD_GPT_ERROR",t[t.EVENT_REWARDED_AD_GRANTED=3041]="EVENT_REWARDED_AD_GRANTED",t[t.EVENT_REWARDED_AD_NOT_FILLED=3049]="EVENT_REWARDED_AD_NOT_FILLED",t[t.EVENT_GLOBAL_FREQUENCY_CAP_MET=3042]="EVENT_GLOBAL_FREQUENCY_CAP_MET",t[t.EVENT_PROMPT_FREQUENCY_CAP_MET=3043]="EVENT_PROMPT_FREQUENCY_CAP_MET",t[t.EVENT_ACTION_IMPRESSIONS_STORAGE_KEY_NOT_FOUND_ERROR=3044]="EVENT_ACTION_IMPRESSIONS_STORAGE_KEY_NOT_FOUND_ERROR",t[t.EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR=3052]="EVENT_LOCAL_STORAGE_TIMESTAMPS_PARSING_ERROR",t[t.EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR=3045]="EVENT_FREQUENCY_CAP_CONFIG_NOT_FOUND_ERROR",t[t.EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND=3053]="EVENT_PROMPT_FREQUENCY_CONFIG_NOT_FOUND",t[t.EVENT_BYOP_NEWSLETTER_OPT_IN_CONFIG_ERROR=3046]="EVENT_BYOP_NEWSLETTER_OPT_IN_CONFIG_ERROR",t[t.EVENT_BYOP_NEWSLETTER_OPT_IN_CODE_SNIPPET_ERROR=3047]="EVENT_BYOP_NEWSLETTER_OPT_IN_CODE_SNIPPET_ERROR",t[t.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE=3050]="EVENT_SUBSCRIPTION_PAYMENT_COMPLETE",t[t.EVENT_CONTRIBUTION_PAYMENT_COMPLETE=3051]="EVENT_CONTRIBUTION_PAYMENT_COMPLETE",t[t.EVENT_HOSTED_PAGE_SUBSCRIPTION_PAYMENT_COMPLETE=3054]="EVENT_HOSTED_PAGE_SUBSCRIPTION_PAYMENT_COMPLETE",t[t.EVENT_HOSTED_PAGE_CONTRIBUTION_PAYMENT_COMPLETE=3055]="EVENT_HOSTED_PAGE_CONTRIBUTION_PAYMENT_COMPLETE",t[t.EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR=3056]="EVENT_COMPLETION_COUNT_FOR_REPEATABLE_ACTION_MISSING_ERROR",t[t.EVENT_SUBSCRIPTION_STATE=4e3]="EVENT_SUBSCRIPTION_STATE",t))(m||{}),_=(t=>(t[t.UNKNOWN_ENTITLEMENT_RESULT=0]="UNKNOWN_ENTITLEMENT_RESULT",t[t.UNLOCKED_SUBSCRIBER=1001]="UNLOCKED_SUBSCRIBER",t[t.UNLOCKED_FREE=1002]="UNLOCKED_FREE",t[t.UNLOCKED_METER=1003]="UNLOCKED_METER",t[t.LOCKED_REGWALL=2001]="LOCKED_REGWALL",t[t.LOCKED_PAYWALL=2002]="LOCKED_PAYWALL",t[t.INELIGIBLE_PAYWALL=2003]="INELIGIBLE_PAYWALL",t))(_||{}),f=(t=>(t[t.UNKNOWN_ENTITLEMENT_SOURCE=0]="UNKNOWN_ENTITLEMENT_SOURCE",t[t.GOOGLE_SUBSCRIBER_ENTITLEMENT=1001]="GOOGLE_SUBSCRIBER_ENTITLEMENT",t[t.GOOGLE_SHOWCASE_METERING_SERVICE=2001]="GOOGLE_SHOWCASE_METERING_SERVICE",t[t.SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE=2002]="SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE",t[t.PUBLISHER_ENTITLEMENT=3001]="PUBLISHER_ENTITLEMENT",t))(f||{}),w=(t=>(t[t.UNKNOWN_CLIENT=0]="UNKNOWN_CLIENT",t[t.SWG_CLIENT=1]="SWG_CLIENT",t[t.AMP_CLIENT=2]="AMP_CLIENT",t[t.PROPENSITY_CLIENT=3]="PROPENSITY_CLIENT",t[t.SWG_SERVER=4]="SWG_SERVER",t[t.PUBLISHER_CLIENT=5]="PUBLISHER_CLIENT",t[t.SHOWCASE_CLIENT=6]="SHOWCASE_CLIENT",t))(w||{});class E{constructor(t=[],e=!0){const n=e?1:0;this.C=null==t[n]?null:t[n]}getComplete(){return this.C}setComplete(t){this.C=t}toArray(t=!0){const e=[this.C];return t&&e.unshift(this.label()),e}label(){return"AccountCreationRequest"}}class b{constructor(t=[],e=!0){const n=e?1:0;this.R=null==t[n]?null:t[n],this.A=null==t[1+n]?null:t[1+n]}getSubscriberOrMember(){return this.R}setSubscriberOrMember(t){this.R=t}getLinkRequested(){return this.A}setLinkRequested(t){this.A=t}toArray(t=!0){const e=[this.R,this.A];return t&&e.unshift(this.label()),e}label(){return"AlreadySubscribedResponse"}}class T{constructor(t=[],e=!0){const n=e?1:0;this.v=null==t[n]?null:t[n],this.P=null==t[1+n]?null:t[1+n],this.L=null==t[2+n]?null:t[2+n],this.M=null==t[3+n]?null:t[3+n],this.k=null==t[4+n]?null:t[4+n],this.D=null==t[5+n]?null:t[5+n],this.U=null==t[6+n]?null:t[6+n],this.G=null==t[7+n]?null:t[7+n],this.j=t[8+n]||[],this.F=null==t[9+n]?null:t[9+n],this.B=null==t[10+n]?null:t[10+n],this.W=null==t[11+n]?null:new z(t[11+n],e),this.V=null==t[12+n]?null:t[12+n],this.Y=null==t[13+n]?null:t[13+n],this.K=null==t[14+n]?null:new z(t[14+n],e),this.q=null==t[15+n]?null:new O(t[15+n],e),this.H=null==t[16+n]?null:new z(t[16+n],e),this.$=null==t[17+n]?null:t[17+n],this.J=null==t[18+n]?null:t[18+n]}getEmbedderOrigin(){return this.v}setEmbedderOrigin(t){this.v=t}getTransactionId(){return this.P}setTransactionId(t){this.P=t}getReferringOrigin(){return this.L}setReferringOrigin(t){this.L=t}getUtmSource(){return this.M}setUtmSource(t){this.M=t}getUtmCampaign(){return this.k}setUtmCampaign(t){this.k=t}getUtmMedium(){return this.D}setUtmMedium(t){this.D=t}getSku(){return this.U}setSku(t){this.U=t}getReadyToPay(){return this.G}setReadyToPay(t){this.G=t}getLabelList(){return this.j}setLabelList(t){this.j=t}getClientVersion(){return this.F}setClientVersion(t){this.F=t}getUrl(){return this.B}setUrl(t){this.B=t}getClientTimestamp(){return this.W}setClientTimestamp(t){this.W=t}getReaderSurfaceType(){return this.V}setReaderSurfaceType(t){this.V=t}getIntegrationVersion(){return this.Y}setIntegrationVersion(t){this.Y=t}getPageLoadBeginTimestamp(){return this.K}setPageLoadBeginTimestamp(t){this.K=t}getLoadEventStartDelay(){return this.q}setLoadEventStartDelay(t){this.q=t}getRuntimeCreationTimestamp(){return this.H}setRuntimeCreationTimestamp(t){this.H=t}getIsLockedContent(){return this.$}setIsLockedContent(t){this.$=t}getUrlFromMarkup(){return this.J}setUrlFromMarkup(t){this.J=t}toArray(t=!0){const e=[this.v,this.P,this.L,this.M,this.k,this.D,this.U,this.G,this.j,this.F,this.B,this.W?this.W.toArray(t):[],this.V,this.Y,this.K?this.K.toArray(t):[],this.q?this.q.toArray(t):[],this.H?this.H.toArray(t):[],this.$,this.J];return t&&e.unshift(this.label()),e}label(){return"AnalyticsContext"}}class I{constructor(t=[],e=!0){const n=e?1:0;this.X=null==t[n]?null:t[n],this.Z=null==t[1+n]?null:t[1+n],this.tt=null==t[2+n]?null:t[2+n]}getEventOriginator(){return this.X}setEventOriginator(t){this.X=t}getIsFromUserAction(){return this.Z}setIsFromUserAction(t){this.Z=t}getConfigurationId(){return this.tt}setConfigurationId(t){this.tt=t}toArray(t=!0){const e=[this.X,this.Z,this.tt];return t&&e.unshift(this.label()),e}label(){return"AnalyticsEventMeta"}}class y{constructor(t=[],e=!0){const n=e?1:0;this.et=null==t[n]?null:new T(t[n],e),this.nt=null==t[1+n]?null:t[1+n],this.st=null==t[2+n]?null:new I(t[2+n],e),this.rt=null==t[3+n]?null:new A(t[3+n],e)}getContext(){return this.et}setContext(t){this.et=t}getEvent(){return this.nt}setEvent(t){this.nt=t}getMeta(){return this.st}setMeta(t){this.st=t}getParams(){return this.rt}setParams(t){this.rt=t}toArray(t=!0){const e=[this.et?this.et.toArray(t):[],this.nt,this.st?this.st.toArray(t):[],this.rt?this.rt.toArray(t):[]];return t&&e.unshift(this.label()),e}label(){return"AnalyticsRequest"}}class S{constructor(t=[],e=!0){const n=e?1:0;this.ot=null==t[n]?null:t[n],this.ht=null==t[1+n]?null:t[1+n],this.lt=null==t[2+n]?null:t[2+n],this.ut=null==t[3+n]?null:t[3+n],this.ct=null==t[4+n]?null:t[4+n],this.dt=null==t[5+n]?null:t[5+n],this.gt=null==t[6+n]?null:t[6+n]}getSwgUserToken(){return this.ot}setSwgUserToken(t){this.ot=t}getActionCompleted(){return this.ht}setActionCompleted(t){this.ht=t}getUserEmail(){return this.lt}setUserEmail(t){this.lt=t}getAlreadyCompleted(){return this.ut}setAlreadyCompleted(t){this.ut=t}getDisplayName(){return this.ct}setDisplayName(t){this.ct=t}getGivenName(){return this.dt}setGivenName(t){this.dt=t}getFamilyName(){return this.gt}setFamilyName(t){this.gt=t}toArray(t=!0){const e=[this.ot,this.ht,this.lt,this.ut,this.ct,this.dt,this.gt];return t&&e.unshift(this.label()),e}label(){return"CompleteAudienceActionResponse"}}let O=class{constructor(t=[],e=!0){const n=e?1:0;this.seconds_=null==t[n]?null:t[n],this.nanos_=null==t[1+n]?null:t[1+n]}getSeconds(){return this.seconds_}setSeconds(t){this.seconds_=t}getNanos(){return this.nanos_}setNanos(t){this.nanos_=t}toArray(t=!0){const e=[this.seconds_,this.nanos_];return t&&e.unshift(this.label()),e}label(){return"Duration"}};class N{constructor(t=[],e=!0){const n=e?1:0;this._t=null==t[n]?null:t[n],this.ft=null==t[1+n]?null:t[1+n]}getJwt(){return this._t}setJwt(t){this._t=t}getSource(){return this.ft}setSource(t){this.ft=t}toArray(t=!0){const e=[this._t,this.ft];return t&&e.unshift(this.label()),e}label(){return"EntitlementJwt"}}class C{constructor(t=[],e=!0){const n=e?1:0;this.wt=null==t[n]?null:new N(t[n],e),this.Et=null==t[1+n]?null:new z(t[1+n],e),this.bt=null==t[2+n]?null:t[2+n],this.Tt=null==t[3+n]?null:t[3+n],this.It=null==t[4+n]?null:t[4+n],this.yt=null==t[5+n]?null:t[5+n],this.St=null==t[6+n]?null:new z(t[6+n],e)}getUsedEntitlement(){return this.wt}setUsedEntitlement(t){this.wt=t}getClientEventTime(){return this.Et}setClientEventTime(t){this.Et=t}getEntitlementSource(){return this.bt}setEntitlementSource(t){this.bt=t}getEntitlementResult(){return this.Tt}setEntitlementResult(t){this.Tt=t}getToken(){return this.It}setToken(t){this.It=t}getIsUserRegistered(){return this.yt}setIsUserRegistered(t){this.yt=t}getSubscriptionTimestamp(){return this.St}setSubscriptionTimestamp(t){this.St=t}toArray(t=!0){const e=[this.wt?this.wt.toArray(t):[],this.Et?this.Et.toArray(t):[],this.bt,this.Tt,this.It,this.yt,this.St?this.St.toArray(t):[]];return t&&e.unshift(this.label()),e}label(){return"EntitlementsRequest"}}class R{constructor(t=[],e=!0){const n=e?1:0;this._t=null==t[n]?null:t[n],this.ot=null==t[1+n]?null:t[1+n]}getJwt(){return this._t}setJwt(t){this._t=t}getSwgUserToken(){return this.ot}setSwgUserToken(t){this.ot=t}toArray(t=!0){const e=[this._t,this.ot];return t&&e.unshift(this.label()),e}label(){return"EntitlementsResponse"}}class A{constructor(t=[],e=!0){const n=e?1:0;this.Ot=null==t[n]?null:t[n],this.Nt=null==t[1+n]?null:t[1+n],this.Ct=null==t[2+n]?null:t[2+n],this.U=null==t[3+n]?null:t[3+n],this.Rt=null==t[4+n]?null:t[4+n],this.yt=null==t[5+n]?null:t[5+n],this.At=null==t[6+n]?null:t[6+n],this.St=null==t[7+n]?null:new z(t[7+n],e)}getSmartboxMessage(){return this.Ot}setSmartboxMessage(t){this.Ot=t}getGpayTransactionId(){return this.Nt}setGpayTransactionId(t){this.Nt=t}getHadLogged(){return this.Ct}setHadLogged(t){this.Ct=t}getSku(){return this.U}setSku(t){this.U=t}getOldTransactionId(){return this.Rt}setOldTransactionId(t){this.Rt=t}getIsUserRegistered(){return this.yt}setIsUserRegistered(t){this.yt=t}getSubscriptionFlow(){return this.At}setSubscriptionFlow(t){this.At=t}getSubscriptionTimestamp(){return this.St}setSubscriptionTimestamp(t){this.St=t}toArray(t=!0){const e=[this.Ot,this.Nt,this.Ct,this.U,this.Rt,this.yt,this.At,this.St?this.St.toArray(t):[]];return t&&e.unshift(this.label()),e}label(){return"EventParams"}}class v{constructor(t=[],e=!0){const n=e?1:0;this.C=null==t[n]?null:t[n],this.vt=null==t[1+n]?null:t[1+n]}getComplete(){return this.C}setComplete(t){this.C=t}getError(){return this.vt}setError(t){this.vt=t}toArray(t=!0){const e=[this.C,this.vt];return t&&e.unshift(this.label()),e}label(){return"FinishedLoggingResponse"}}class P{constructor(t=[],e=!0){const n=e?1:0;this.Pt=null==t[n]?null:t[n],this.It=null==t[1+n]?null:t[1+n]}getAuthCode(){return this.Pt}setAuthCode(t){this.Pt=t}getToken(){return this.It}setToken(t){this.It=t}toArray(t=!0){const e=[this.Pt,this.It];return t&&e.unshift(this.label()),e}label(){return"LinkSaveTokenRequest"}}class x{constructor(t=[],e=!0){const n=e?1:0;this.xt=null==t[n]?null:t[n]}getRequested(){return this.xt}setRequested(t){this.xt=t}toArray(t=!0){const e=[this.xt];return t&&e.unshift(this.label()),e}label(){return"LinkingInfoResponse"}}class L{constructor(t=[],e=!0){const n=e?1:0;this.U=null==t[n]?null:t[n],this.Lt=null==t[1+n]?null:t[1+n],this.Mt=null==t[2+n]?null:t[2+n],this.kt=null==t[3+n]?null:t[3+n],this.Dt=null==t[4+n]?null:t[4+n],this.Ut=null==t[5+n]?null:t[5+n],this.Gt=null==t[6+n]?null:t[6+n],this.jt=null==t[7+n]?null:t[7+n]}getSku(){return this.U}setSku(t){this.U=t}getOldSku(){return this.Lt}setOldSku(t){this.Lt=t}getOneTime(){return this.Mt}setOneTime(t){this.Mt=t}getPlayOffer(){return this.kt}setPlayOffer(t){this.kt=t}getOldPlayOffer(){return this.Dt}setOldPlayOffer(t){this.Dt=t}getCustomMessage(){return this.Ut}setCustomMessage(t){this.Ut=t}getAnonymous(){return this.Gt}setAnonymous(t){this.Gt=t}getSharingPolicyEnabled(){return this.jt}setSharingPolicyEnabled(t){this.jt=t}toArray(t=!0){const e=[this.U,this.Lt,this.Mt,this.kt,this.Dt,this.Ut,this.Gt,this.jt];return t&&e.unshift(this.label()),e}label(){return"SkuSelectedResponse"}}class M{constructor(t=[],e=!0){const n=e?1:0;this.Ft=null==t[n]?null:t[n]}getIsClicked(){return this.Ft}setIsClicked(t){this.Ft=t}toArray(t=!0){const e=[this.Ft];return t&&e.unshift(this.label()),e}label(){return"SmartBoxMessage"}}let k=class{constructor(t=[],e=!0){const n=e?1:0;this.zt=null==t[n]?null:t[n]}getSubscribe(){return this.zt}setSubscribe(t){this.zt=t}toArray(t=!0){const e=[this.zt];return t&&e.unshift(this.label()),e}label(){return"SubscribeResponse"}};class D{constructor(t=[],e=!0){const n=e?1:0;this.Bt=null==t[n]?null:t[n],this.Wt=null==t[1+n]?null:t[1+n]}getPublisherProvidedId(){return this.Bt}setPublisherProvidedId(t){this.Bt=t}getSuccess(){return this.Wt}setSuccess(t){this.Wt=t}toArray(t=!0){const e=[this.Bt,this.Wt];return t&&e.unshift(this.label()),e}label(){return"SubscriptionLinkingCompleteResponse"}}class U{constructor(t=[],e=!0){const n=e?1:0;this.Vt=null==t[n]?null:t[n],this.Yt=null==t[1+n]?null:t[1+n],this.Kt=null==t[2+n]?null:t[2+n],this.qt=null==t[3+n]?null:t[3+n]}getAnswerId(){return this.Vt}setAnswerId(t){this.Vt=t}getAnswerText(){return this.Yt}setAnswerText(t){this.Yt=t}getAnswerCategory(){return this.Kt}setAnswerCategory(t){this.Kt=t}getPpsValue(){return this.qt}setPpsValue(t){this.qt=t}toArray(t=!0){const e=[this.Vt,this.Yt,this.Kt,this.qt];return t&&e.unshift(this.label()),e}label(){return"SurveyAnswer"}}class G{constructor(t=[],e=!0){const n=e?1:0;this.Ht=(t[n]||[]).map((t=>new F(t,e))),this.$t=null==t[1+n]?null:t[1+n]}getSurveyQuestionsList(){return this.Ht}setSurveyQuestionsList(t){this.Ht=t}getStorePpsInLocalStorage(){return this.$t}setStorePpsInLocalStorage(t){this.$t=t}toArray(t=!0){const e=[this.Ht?this.Ht.map((e=>e.toArray(t))):[],this.$t];return t&&e.unshift(this.label()),e}label(){return"SurveyDataTransferRequest"}}class j{constructor(t=[],e=!0){const n=e?1:0;this.Wt=null==t[n]?null:t[n]}getSuccess(){return this.Wt}setSuccess(t){this.Wt=t}toArray(t=!0){const e=[this.Wt];return t&&e.unshift(this.label()),e}label(){return"SurveyDataTransferResponse"}}class F{constructor(t=[],e=!0){const n=e?1:0;this.Jt=null==t[n]?null:t[n],this.Qt=null==t[1+n]?null:t[1+n],this.Xt=null==t[2+n]?null:t[2+n],this.Zt=(t[3+n]||[]).map((t=>new U(t,e)))}getQuestionId(){return this.Jt}setQuestionId(t){this.Jt=t}getQuestionText(){return this.Qt}setQuestionText(t){this.Qt=t}getQuestionCategory(){return this.Xt}setQuestionCategory(t){this.Xt=t}getSurveyAnswersList(){return this.Zt}setSurveyAnswersList(t){this.Zt=t}toArray(t=!0){const e=[this.Jt,this.Qt,this.Xt,this.Zt?this.Zt.map((e=>e.toArray(t))):[]];return t&&e.unshift(this.label()),e}label(){return"SurveyQuestion"}}class z{constructor(t=[],e=!0){const n=e?1:0;this.seconds_=null==t[n]?null:t[n],this.nanos_=null==t[1+n]?null:t[1+n]}getSeconds(){return this.seconds_}setSeconds(t){this.seconds_=t}getNanos(){return this.nanos_}setNanos(t){this.nanos_=t}toArray(t=!0){const e=[this.seconds_,this.nanos_];return t&&e.unshift(this.label()),e}label(){return"Timestamp"}}class B{constructor(t=[],e=!0){const n=e?1:0;this.te=null==t[n]?null:t[n]}getClose(){return this.te}setClose(t){this.te=t}toArray(t=!0){const e=[this.te];return t&&e.unshift(this.label()),e}label(){return"ToastCloseRequest"}}class W{constructor(t=[],e=!0){const n=e?1:0;this.ee=null==t[n]?null:t[n]}getNative(){return this.ee}setNative(t){this.ee=t}toArray(t=!0){const e=[this.ee];return t&&e.unshift(this.label()),e}label(){return"ViewSubscriptionsResponse"}}const V={AccountCreationRequest:E,ActionRequest:class{constructor(t=[],e=!0){const n=e?1:0;this.ne=null==t[n]?null:t[n]}getAction(){return this.ne}setAction(t){this.ne=t}toArray(t=!0){const e=[this.ne];return t&&e.unshift(this.label()),e}label(){return"ActionRequest"}},AlreadySubscribedResponse:b,AnalyticsContext:T,AnalyticsEventMeta:I,AnalyticsRequest:y,AudienceActivityClientLogsRequest:class{constructor(t=[],e=!0){const n=e?1:0;this.nt=null==t[n]?null:t[n]}getEvent(){return this.nt}setEvent(t){this.nt=t}toArray(t=!0){const e=[this.nt];return t&&e.unshift(this.label()),e}label(){return"AudienceActivityClientLogsRequest"}},CompleteAudienceActionResponse:S,Duration:O,EntitlementJwt:N,EntitlementsRequest:C,EntitlementsResponse:R,EventParams:A,FinishedLoggingResponse:v,LinkSaveTokenRequest:P,LinkingInfoResponse:x,OpenDialogRequest:class{constructor(t=[],e=!0){const n=e?1:0;this.ie=null==t[n]?null:t[n]}getUrlPath(){return this.ie}setUrlPath(t){this.ie=t}toArray(t=!0){const e=[this.ie];return t&&e.unshift(this.label()),e}label(){return"OpenDialogRequest"}},SkuSelectedResponse:L,SmartBoxMessage:M,SubscribeResponse:k,SubscriptionLinkingCompleteResponse:D,SubscriptionLinkingResponse:class{constructor(t=[],e=!0){const n=e?1:0;this.Bt=null==t[n]?null:t[n]}getPublisherProvidedId(){return this.Bt}setPublisherProvidedId(t){this.Bt=t}toArray(t=!0){const e=[this.Bt];return t&&e.unshift(this.label()),e}label(){return"SubscriptionLinkingResponse"}},SurveyAnswer:U,SurveyDataTransferRequest:G,SurveyDataTransferResponse:j,SurveyQuestion:F,Timestamp:z,ToastCloseRequest:B,ViewSubscriptionsResponse:W};var Y=(t=>(t.EVENT_SHOWCASE_METER_OFFERED="EVENT_SHOWCASE_METER_OFFERED",t.EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION="EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION",t.EVENT_SHOWCASE_UNLOCKED_BY_METER="EVENT_SHOWCASE_UNLOCKED_BY_METER",t.EVENT_SHOWCASE_UNLOCKED_FREE_PAGE="EVENT_SHOWCASE_UNLOCKED_FREE_PAGE",t.EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL="EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL",t.EVENT_SHOWCASE_INELIGIBLE_PAYWALL="EVENT_SHOWCASE_INELIGIBLE_PAYWALL",t.EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL="EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL",t))(Y||{}),K=(t=>(t.SHOW_OFFERS="showOffers",t.SHOW_SUBSCRIBE_OPTION="showSubscribeOption",t.SHOW_ABBRV_OFFER="showAbbrvOffer",t.SHOW_CONTRIBUTION_OPTIONS="showContributionOptions",t.SUBSCRIBE="subscribe",t.CONTRIBUTE="contribute",t.COMPLETE_DEFERRED_ACCOUNT_CREATION="completeDeferredAccountCreation",t.LINK_ACCOUNT="linkAccount",t.SHOW_LOGIN_PROMPT="showLoginPrompt",t.SHOW_LOGIN_NOTIFICATION="showLoginNotification",t.SHOW_METER_TOAST="showMeterToast",t))(K||{}),q=(t=>(t[t.DEFAULT=0]="DEFAULT",t[t.IMPRESSIONS=1]="IMPRESSIONS",t))(q||{}),H=(t=>(t.AUTO="auto",t.REDIRECT="redirect",t))(H||{}),$=(t=>(t.SUBSCRIPTION="SUBSCRIPTION",t.UI_CONTRIBUTION="UI_CONTRIBUTION",t))($||{}),J=(t=>(t.LIGHT="light",t.DARK="dark",t))(J||{});function Q(...t){/swg.debug=1/.test(self.location.hash)&&(t.unshift("[Subscriptions]"),X(...t))}function X(...t){console.log(...t)}function Z(...t){console.warn(...t)}function tt(t,e="Assertion failed",...n){if(t)return;const i=e.split("%s");let s=i.shift();for(const r of n){const t=i.shift();s+=et(r)+t}throw new Error(s)}function et(t){const e=t;return 1==(null==e?void 0:e.nodeType)?e.tagName.toLowerCase()+(e.id?"#"+e.id:""):String(t)}function nt(t){const e=new Uint8Array(t.length);for(let n=0;n<t.length;n++){const i=t.charCodeAt(n);tt(i<=255,"Characters must be in range [0,255]"),e[n]=i}return e}function it(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=String.fromCharCode(t[n]);return e.join("")}function st(t){if("undefined"!=typeof TextDecoder)return new TextDecoder("utf-8").decode(t);const e=it(new Uint8Array(t));return decodeURIComponent(escape(e))}function rt(t){return"undefined"!=typeof TextEncoder?(new TextEncoder).encode(t):nt(unescape(encodeURIComponent(t)))}function ot(t){return nt(atob(t.replaceAll("-","+").replaceAll("_","/")))}function at(t){const e=it(t);return btoa(e).replaceAll("+","-").replaceAll("/","_").replaceAll("=","")}function ht(t,e){try{return JSON.parse(t)}catch(n){return void(e&&e(n))}}function lt(t,e){const n=ht(t);return null==n?void 0:n[e]}class ut{constructor(){}decode(t){return this.se(t).payload}se(t){function e(){throw new Error('Invalid token: "'.concat(t,'"'))}const n=t.split(".");3!=n.length&&e();const i=ot(n[0]),s=ot(n[1]);return{header:ht(st(i),e),payload:ht(st(s),e),verifiable:"".concat(n[0],".").concat(n[1]),sig:n[2]}}}class ct{constructor(t,e,n,i,s,r,o=null,a=null,h=null,l=null){this.raw=t,this.purchaseData=e,this.userData=n,this.entitlements=i,this.productType=s,this.re=r,this.oldSku=o,this.swgUserToken=a,this.paymentRecurrence=h,this.requestMetadata=l}clone(){return new ct(this.raw,this.purchaseData,this.userData,this.entitlements,this.productType,this.re,this.oldSku,this.swgUserToken)}json(){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}}complete(){return this.re()}}class dt{constructor(t,e){this.raw=t,this.signature=e,this.data=t}clone(){return new dt(this.raw,this.signature)}json(){return{data:this.raw,signature:this.signature}}}const pt="USER_TOKEN",gt="READ_TIME",mt="ents",ft="isreadytopay",wt="subscribe.google.com:rk",Et="toast",bt={PPS_TAXONOMIES:"ppstaxonomies"};class Tt{constructor(t,e){this.idToken=t,this.data=e,this.id=e.sub,this.email=e.email,this.emailVerified=e.email_verified,this.name=e.name,this.givenName=e.given_name,this.familyName=e.family_name,this.pictureUrl=e.picture}clone(){return new Tt(this.idToken,this.data)}json(){return{id:this.id,email:this.email,emailVerified:this.emailVerified,name:this.name,givenName:this.givenName,familyName:this.familyName,pictureUrl:this.pictureUrl}}}const It=self.document.createElement("a"),yt={};function St(t){const e=yt[t];if(e)return e;const n=function(t,e){t.href=e;const n={href:t.href,protocol:t.protocol,host:t.host,hostname:t.hostname,port:"0"==t.port?"":t.port,pathname:t.pathname,search:t.search,hash:t.hash,origin:t.protocol+"//"+t.host};return t.origin&&"null"!==t.origin?n.origin=t.origin:"data:"!==n.protocol&&n.host||(n.origin=n.href),n}(It,t);return yt[t]=n}function Ot(t){return t?(/^[?#]/.test(t)?t.slice(1):t).split("&").reduce(((t,e)=>{const n=e.split("=");try{const e=decodeURIComponent(n[0]||""),i=decodeURIComponent(n[1]||"");e&&(t[e]=i)}catch(i){Z("SwG could not parse a URL query param: ".concat(n[0]))}return t}),{}):{}}function Nt(t,e,n){const i=t.indexOf("?"),s=t.indexOf("#");let r="";return-1!=s&&(r=t.substring(s),t=t.substring(0,s)),-1==i?t+="?":i<t.length-1&&(t+="&"),(t+=encodeURIComponent(e)+"="+encodeURIComponent(n))+r}function Ct(t){return JSON.stringify(t.toArray(!1))}function Rt(t){const e=t.getRootNode().querySelector("link[rel='canonical']");return null==e?void 0:e.href}function At(t){const e=t.getRootNode();return Rt(t)||e.location.origin+e.location.pathname}const vt=St(self.window.location.href);St(self.document.referrer);const Pt={zero:"0",nocache:"1",hr1:"3600000",hr12:"43200000"},xt={default:{frontEnd:e,payEnv:"PRODUCTION",playEnv:"PROD",feCache:"nocache"},prod:{frontEnd:"https://news.google.com",payEnv:"PRODUCTION",playEnv:"PROD",feCache:"nocache"},autopush:{frontEnd:"https://subscribe-autopush.sandbox.google.com",payEnv:"PRODUCTION",playEnv:"AUTOPUSH",feCache:"nocache"},qual:{frontEnd:"https://subscribe-qual.sandbox.google.com",payEnv:"SANDBOX",playEnv:"STAGING",feCache:"nocache"}};function Lt(){const t=Ot(self.location.hash)["swg.mode"];return t&&xt[t]?xt[t]:xt.default}function Mt(){return St(Lt().frontEnd).origin}function kt(t){const e=Ot(self.location.hash)["swg.experiments"];return void 0!==e&&(t=Nt(t,"e",e)),"".concat(Lt().frontEnd,"/swg/_/api/v1")+t}function Dt(t){return"https://pubads.g.doubleclick.net"+t}function Ut(t,e={},n=""){const i=n?"swg/".concat(n):"swg";t=function(t){return Nt(t,"_",function(t){const e=Number(Pt[t]||1);if(0===e)return"_";const n=Date.now();return String(e<=1?n:Math.floor(n/e))}(Lt().feCache))}("".concat(Lt().frontEnd,"/").concat(i,"/ui/v1").concat(t));const s=Ot(self.location.hash),r=s["swg.boqjsmode"];void 0!==r&&(t=Nt(t,"jsmode",r));const o=s["swg.experiments"];void 0!==o&&(t=Nt(t,"e",o));for(const a in e)t=Nt(t,a,e[a]);return t}function Gt(t){return Object.assign(t,{_client:"SwG ".concat(n)})}const jt={IMMEDIATE_WITH_TIME_PRORATION:1};function Ft(t,e=null){return new A([,,,,t,,,e])}class zt{constructor(t,e,n=$.SUBSCRIPTION){this.oe=t,this.ae=e,this.he=n,this.le=t.payClient(),this.ue=t.pageConfig(),this.ce=t.analytics(),this.pe=t.eventManager(),this.ge=t.clientConfigManager()}async start(){const t=await this.ge.getClientConfig();this.me(t.paySwgVersion)}me(t){const e={skuId:this.ae.skuId,publicationId:this.ue.getPublicationId()};if(t&&(e.swgVersion=t),this.ae.oldSku){e.oldSku=this.ae.oldSku;const t=this.ae.replaceSkuProrationMode;e.replaceSkuProrationMode=t?jt[t]:jt.IMMEDIATE_WITH_TIME_PRORATION,this.ce.setSku(e.oldSku)}this.ae.oneTime&&(e.paymentRecurrence=2),this.ae.metadata&&(e.metadata=this.ae.metadata);const n=this.he==$.UI_CONTRIBUTION?K.CONTRIBUTE:K.SUBSCRIBE;this.oe.callbacks().triggerFlowStarted(n,this.ae),this.pe.logSwgEvent(m.ACTION_PAYMENT_FLOW_STARTED,!0,Ft(e.skuId)),Wt.waitingForPayClient=!0,this.le.start({apiVersion:1,allowedPaymentMethods:["CARD"],environment:Lt().payEnv,playEnvironment:Lt().playEnv,swg:e,i:{startTimeMs:Date.now(),productType:this.he}},{forceRedirect:this.oe.config().windowOpenMode==H.REDIRECT,forceDisableNative:"2"==t})}}const Bt=class t{constructor(t){this.oe=t,this._e=null,this.fe=null,this.U=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this.pe=t.eventManager(),this.ge=t.clientConfigManager()}static configurePending(e){const n=e.eventManager();e.payClient().onResponse((async i=>{e.entitlementsManager().blockNextNotification();const s=new t(e),r=async function(t,e,n){const i=!Wt.waitingForPayClient;Wt.waitingForPayClient=!1;const s=await e;let r,o=m.UNKNOWN;if("object"==typeof s&&s.googleTransactionId){const e=t.analytics().getTransactionId(),n=s.googleTransactionId;i?(t.analytics().setTransactionId(n),o=m.EVENT_GPAY_CANNOT_CONFIRM_TX_ID):e===n?o=m.EVENT_CONFIRM_TX_ID:(r=new A,r.setGpayTransactionId(n),o=m.EVENT_CHANGED_TX_ID)}else r=new A,r.setHadLogged(!i),o=m.EVENT_GPAY_NO_TX_ID;return t.eventManager().logSwgEvent(o,!0,r),function(t,e,n){var i;let s=null,r=null,o=$.SUBSCRIPTION,a=null,h=null,l=null;if(e)if("string"==typeof e)r=e;else{const t=e;if(t.swgCallbackData?s=t.swgCallbackData:t.integratorClientCallbackData&&(r=t.integratorClientCallbackData),e.paymentRequest){const t=e.paymentRequest.swg||{};a=t.oldSku,h=t.paymentRecurrence,l=t.metadata,o=(null==(i=e.paymentRequest.i)?void 0:i.productType)||$.SUBSCRIPTION}else e.productType&&(o=e.productType)}if(r&&!s&&(r=atob(r),r)&&(s=JSON.parse(r).swgCallbackData),!s)throw new Error("unexpected payment response");return r=JSON.stringify(s),new ct(r,function(t){const e=t.purchaseData,n=t.purchaseDataSignature;return new dt(e,n)}(s),function(t){const e=t.idToken;if(!e)return null;const n=(new ut).decode(e);return new Tt(e,n)}(s),function(t,e){return e.signedEntitlements?t.entitlementsManager().parseEntitlements(e):null}(t,s),o,n,a,s.swgUserToken,h,l)}(t,s,n)}(e,i,s.complete.bind(s));e.callbacks().triggerPaymentResponse(r);try{const t=await r,i=Vt(t.purchaseData);e.analytics().setSku(i||""),n.logSwgEvent(m.ACTION_PAYMENT_COMPLETE,!0,Ft(i||"",t.productType==$.UI_CONTRIBUTION?K.CONTRIBUTE:K.SUBSCRIBE)),t.productType==$.UI_CONTRIBUTION?n.logSwgEvent(m.EVENT_CONTRIBUTION_PAYMENT_COMPLETE,!0,Ft(i||"",K.CONTRIBUTE)):t.productType==$.SUBSCRIPTION&&n.logSwgEvent(m.EVENT_SUBSCRIPTION_PAYMENT_COMPLETE,!0,Ft(i||"",K.SUBSCRIBE)),s.start(t)}catch(o){const t=o;if(!u(t))throw e.eventManager().logSwgEvent(m.EVENT_PAYMENT_FAILED,!1),e.jserror().error("Pay failed",t),t;{const n=t.productType==$.UI_CONTRIBUTION?K.CONTRIBUTE:K.SUBSCRIBE;e.callbacks().triggerFlowCanceled(n),e.eventManager().logSwgEvent(m.ACTION_USER_CANCELED_PAYFLOW,!0)}}}))}async start(t){var e;this.U=Vt(t.purchaseData),this.pe.logSwgEvent(m.IMPRESSION_ACCOUNT_CHANGED,!0,Ft(this.U||"")),this.oe.entitlementsManager().reset(!0);const n={publicationId:this.oe.pageConfig().getPublicationId(),productType:t.productType,isSubscriptionUpdate:!!t.oldSku,isOneTime:!!t.paymentRecurrence};t.userData&&t.entitlements?(n.idToken=t.userData.idToken,this.oe.entitlementsManager().pushNextEntitlements(t.entitlements.raw),t.swgUserToken&&this.oe.storage().set(pt,t.swgUserToken,!0)):n.loginHint=null==(e=t.userData)?void 0:e.email;const i={};this.ge.shouldForceLangInIframes()&&(i.hl=this.ge.getLanguage());const s=Ut("/payconfirmiframe",i),r=await this.ge.getClientConfig();n.useUpdatedConfirmUi=r.useUpdatedOfferFlows,n.skipAccountCreationScreen=r.skipAccountCreationScreen,this._e=new g(this.t,this.o,s,Gt(n),!0),this._e.on(R,this.Ee.bind(this)),this._e.acceptResult().then((()=>{this.we.completeView(this._e)})),this.fe=this.we.openView(this._e),this.fe.then((()=>{this.oe.callbacks().triggerPayConfirmOpened(this._e)}))}Ee(t){const e=t.getJwt();e&&this.oe.entitlementsManager().pushNextEntitlements(e)}async complete(){this.pe.logSwgEvent(m.ACTION_ACCOUNT_CREATED,!0,Ft(this.U||""));const t=Date.now().toString();this.oe.storage().set(gt,t,!1),this.oe.entitlementsManager().unblockNextNotification();const e=await this.ge.getClientConfig();if(await this.fe,!e.skipAccountCreationScreen){const t=new E;t.setComplete(!0),this._e.execute(t)}try{await this._e.acceptResult()}catch(n){}e.skipAccountCreationScreen||this.pe.logSwgEvent(m.ACTION_ACCOUNT_ACKNOWLEDGED,!0,Ft(this.U||"")),this.oe.entitlementsManager().setToastShown(!0)}};Bt.waitingForPayClient=!1;let Wt=Bt;function Vt(t){return lt(t.raw,"productId")||null}class Yt{constructor(t,e){var n;this.oe=t,this._e=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this.pe=t.eventManager(),this.ge=t.clientConfigManager(),this.g=void 0===(null==e?void 0:e.shouldAnimateFade)||(null==e?void 0:e.shouldAnimateFade),this.be=null!=(n=null==e?void 0:e.isClosable)&&n;const i=t.activities().addDefaultArguments({showNative:t.callbacks().hasSubscribeRequestCallback(),productType:$.SUBSCRIPTION,list:(null==e?void 0:e.list)||"default",skus:(null==e?void 0:e.skus)||null,isClosable:this.be});if(null==e?void 0:e.oldSku){i.oldSku=e.oldSku,tt(i.skus,"Need a sku list if old sku is provided!");let t=i.skus;const n=i.oldSku;t=t.filter((t=>t!==n)),tt(t.length>0,"Sku list only contained offer user already has"),i.skus=t}if(i.skus&&1===i.skus.length){const t=i.skus[0],e=i.oldSku;if(e){const n=new L;return n.setSku(t),n.setOldSku(e),void this.Te(n)}}this.Ie=i.skus||["*"],this.ye=this.ge.getClientConfig(),this.Se=this.Oe(i)}async Oe(t){const e=await this.ye;return new g(this.t,this.o,this.Ne(e,this.oe.pageConfig()),t,!0,!1,this.g)}Te(t){const e=t.getSku();if(e){const n={skuId:e},i=t.getOldSku();i&&(n.oldSku=i,this.oe.analytics().setSku(i)),this.pe.logSwgEvent(m.ACTION_OFFER_SELECTED,!0,function(t){return new A([,,,,t])}(e)),new zt(this.oe,n).start()}}Ce(t){t.getSubscriberOrMember()&&(this.pe.logSwgEvent(m.ACTION_ALREADY_SUBSCRIBED,!0),this.oe.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()}))}Re(t){t.getNative()&&this.oe.callbacks().triggerSubscribeRequest()}async start(){if(this._e=await this.Se,!this._e)return;this.oe.callbacks().triggerFlowStarted(K.SHOW_OFFERS,{skus:this.Ie,source:"SwG"}),this._e.onCancel((()=>{this.oe.callbacks().triggerFlowCanceled(K.SHOW_OFFERS)})),this._e.on(L,this.Te.bind(this)),this._e.on(b,this.Ce.bind(this)),this._e.on(W,this.Re.bind(this));const t=await this.ye;return this.we.openView(this._e,!1,this.Ae(t,this.ge.shouldAllowScroll()))}Ae(t,e){return t.useUpdatedOfferFlows?{desktopConfig:{isCenterPositioned:!0,supportsWideScreen:!0},shouldDisableBodyScrolling:!e,closeOnBackgroundClick:this.be}:{}}Ne(t,e){var n;if(!t.useUpdatedOfferFlows){const t=Ot(this.t.location.hash)["swg.newoffercard"];return Ut("/offersiframe",t?{useNewOfferCard:t}:{})}const i={publicationId:e.getPublicationId()};return this.ge.shouldForceLangInIframes()&&(i.hl=this.ge.getLanguage()),(null==(n=t.uiPredicates)?void 0:n.purchaseUnavailableRegion)&&(i.purchaseUnavailableRegion="true"),Ut("/subscriptionoffersiframe",i)}showNoEntitlementFoundToast(){this._e&&this._e.execute(new R)}}class Kt{constructor(t,e){this.oe=t,this.ve=e,this.o=t.activities(),this.we=t.dialogManager(),this.pe=t.eventManager(),this._e=new g(t.win(),this.o,Ut("/optionsiframe"),Gt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),list:(null==e?void 0:e.list)||"default",skus:(null==e?void 0:e.skus)||null,isClosable:!0}),!1)}start(){return this.oe.callbacks().triggerFlowStarted(K.SHOW_SUBSCRIBE_OPTION),this._e.onCancel((()=>{this.oe.callbacks().triggerFlowCanceled(K.SHOW_SUBSCRIBE_OPTION)})),this._e.on(k,this.Pe.bind(this)),this._e.acceptResult().then((t=>{const e=t.data,n=new k;e.subscribe&&n.setSubscribe(!0),this.Pe(n)}),(t=>{throw this.we.completeView(this._e),t})),this.pe.logSwgEvent(m.IMPRESSION_CLICK_TO_SHOW_OFFERS),this.we.openView(this._e)}Pe(t){if(t.getSubscribe()){const t=this.ve||{};null==t.isClosable&&(t.isClosable=!0),this.pe.logSwgEvent(m.ACTION_VIEW_OFFERS,!0),new Yt(this.oe,t).start()}}}class qt{constructor(t,e={}){this.oe=t,this.ve=e,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this.pe=t.eventManager(),this._e=new g(this.t,this.o,Ut("/abbrvofferiframe"),Gt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),showNative:t.callbacks().hasSubscribeRequestCallback(),list:e.list||"default",skus:e.skus||null,isClosable:!0}),!1)}Ce(t){t.getSubscriberOrMember()&&(this.pe.logSwgEvent(m.ACTION_ALREADY_SUBSCRIBED,!0),this.oe.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()}))}start(){return this.oe.callbacks().triggerFlowStarted(K.SHOW_ABBRV_OFFER),this._e.onCancel((()=>{this.oe.callbacks().triggerFlowCanceled(K.SHOW_ABBRV_OFFER)})),this._e.on(b,this.Ce.bind(this)),this._e.acceptResult().then((t=>{const e=t.data;return e.viewOffers?(null==this.ve.isClosable&&(this.ve.isClosable=!0),this.pe.logSwgEvent(m.ACTION_VIEW_OFFERS,!0),void new Yt(this.oe,this.ve).start()):e.native?(this.oe.callbacks().triggerSubscribeRequest(),void this.we.completeView(this._e)):void 0})),this.pe.logSwgEvent(m.IMPRESSION_CLICK_TO_SHOW_OFFERS_OR_ALREADY_SUBSCRIBED),this.we.openView(this._e)}}function Ht(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function $t(t){if(t.__esModule)return t;var e=t.default;if("function"==typeof e){var n=function t(){return this instanceof t?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach((function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})})),n} /** * @license * 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. */const Jt={IFRAME:"iframe",POPUP:"popup",REDIRECT:"redirect"},Qt={OK:"ok",CANCELED:"canceled",FAILED:"failed"};class Xt{constructor(t,e,n,i,s,r){this.code=t,this.data=t==Qt.OK?e:null,this.mode=n,this.origin=i,this.originVerified=s,this.secureChannel=r,this.ok=t==Qt.OK,this.error=t==Qt.FAILED?new Error(String(e)||""):null}}const Zt="AbortError",te=20;let ee;function ne(t){return function(t){if(t.origin)return t.origin;const e=t.protocol;let n=t.host;return"https:"==e&&n.indexOf(":443")==n.length-4?n=n.replace(":443",""):"http:"==e&&n.indexOf(":80")==n.length-3&&(n=n.replace(":80","")),e+"//"+n}(function(t){return ee||(ee=document.createElement("a")),ee.href=t,ee}(t))}function ie(t,e){const n="AbortError"+(e?": "+e:"");let i=null;if("function"==typeof t.DOMException){const e=t.DOMException;try{i=new e(n,Zt)}catch(s){}}return i||(i=new Error(n),i.name=Zt,i.code=te),i}function se(t,e,n){if(e.ok)n(e);else{const i=e.error||ie(t);i.activityResult=e,n(Promise.reject(i))}}function re(t){const e=t.navigator;return/Trident|MSIE|IEMobile/i.test(e&&e.userAgent)}function oe(t){const e=t.navigator;return/Edge/i.test(e&&e.userAgent)}const ae="__ACTIVITIES__";class he{constructor(t,e,n,i){this.t=t,this.xe=e,this.Le=n,this.Me=i,this.ke=null,this.De=!1,this.m=null,this.Ue=null,this.Ge=null,this.je=null,this.Fe=this.ze.bind(this)}connect(t){if(this.Ue)throw new Error("already connected");this.Ue=t,this.t.addEventListener("message",this.Fe)}disconnect(){if(this.Ue&&(this.Ue=null,this.m&&(le(this.m),this.m=null),this.t.removeEventListener("message",this.Fe),this.je)){for(const t in this.je){const e=this.je[t];e.port1&&le(e.port1),e.port2&&le(e.port2)}this.je=null}}isConnected(){return null!=this.Le}getTarget(){const t=this.Be();if(!t)throw new Error("not connected");return t}Be(){return this.Ue&&!this.ke&&("function"==typeof this.xe?this.ke=this.xe():this.ke=this.xe),this.ke}getTargetOrigin(){if(null==this.Le)throw new Error("not connected");return this.Le}sendConnectCommand(){const t=re(this.t)||oe(this.t);this.sendCommand("connect",{acceptsChannel:t})}sendStartCommand(t){let e=null;this.De&&"function"==typeof this.t.MessageChannel&&(e=new this.t.MessageChannel),e?(this.sendCommand("start",t,[e.port2]),this.We(e.port1)):this.sendCommand("start",t)}sendCommand(t,e,n){const i={sentinel:ae,cmd:t,payload:e||null};if(this.m)this.m.postMessage(i,n||void 0);else{const e=this.getTarget(),s="connect"==t?null!=this.Le?this.Le:"*":this.getTargetOrigin();e.postMessage(i,s,n||void 0)}}customMessage(t){this.sendCommand("msg",t)}onCustomMessage(t){this.Ge=t}startChannel(t){const e=t||"",n=this.Ve(e);if(!n.port1){const t=new this.t.MessageChannel;n.port1=t.port1,n.port2=t.port2,n.resolver(n.port1)}return n.port2&&(this.sendCommand("cnset",{name:e},[n.port2]),n.port2=null),n.promise}askChannel(t){const e=t||"",n=this.Ve(e);return n.port1||this.sendCommand("cnget",{name:e}),n.promise}Ye(t,e){const n=this.Ve(t);n.port1=e,n.resolver(e)}Ve(t){this.je||(this.je={});let e=this.je[t];if(!e){let n;const i=new Promise((t=>{n=t}));e={port1:null,port2:null,resolver:n,promise:i},this.je[t]=e}return e}We(t){this.m&&le(this.m),this.m=t,this.m.onmessage=t=>{const e=t.data,n=e&&e.cmd,i=e&&e.payload||null;n&&this.Ke(n,i,t)}}ze(t){if(this.Me&&this.Be()!=t.source)return;const e=t.data;if(!e||e.sentinel!=ae)return;const n=e.cmd;if(this.m&&"connect"!=n&&"start"!=n)return;const i=t.origin,s=e.payload||null;null==this.Le&&"start"==n&&(this.Le=i),null==this.Le&&t.source&&this.Be()==t.source&&(this.Le=i),i==this.Le&&this.Ke(n,s,t)}Ke(t,e,n){if("connect"==t)this.m&&(le(this.m),this.m=null),this.De=e&&e.acceptsChannel||!1,this.Ue(t,e);else if("start"==t){const i=n.ports&&n.ports[0];i&&this.We(i),this.Ue(t,e)}else if("msg"==t)null!=this.Ge&&null!=e&&this.Ge(e);else if("cnget"==t){const t=e.name;this.startChannel(t)}else if("cnset"==t){const t=e.name,i=n.ports[0];this.Ye(t,i)}else this.Ue(t,e)}}function le(t){try{t.close()}catch(e){}}let ue=class{constructor(t,e,n){this.T=t,this.B=e,this.l=n||null,this.t=this.T.ownerDocument.defaultView,this.Le=ne(e),this.qe=!1,this.He=null,this.$e=new Promise((t=>{this.He=t})),this.Je=null,this.fe=new Promise((t=>{this.Je=t})),this.Qe=null,this.Xe=new Promise((t=>{this.Qe=t})),this.Ze=null,this.nn=null,this.sn=new he(this.t,(()=>this.T.contentWindow),this.Le,!0)}getMode(){return Jt.IFRAME}connect(){if(!function(t){if("isConnected"in t)return t.isConnected;const e=t.ownerDocument&&t.ownerDocument.documentElement;return e&&e.contains(t)||!1}(this.T))throw new Error("iframe must be in DOM");return this.sn.connect(this.Ke.bind(this)),this.T.src=this.B,this.$e}disconnect(){this.qe=!1,this.sn.disconnect()}acceptResult(){return this.Xe}getTargetWin(){return this.T.contentWindow||null}message(t){this.sn.customMessage(t)}onMessage(t){this.sn.onCustomMessage(t)}messageChannel(t){return this.sn.askChannel(t)}whenReady(){return this.fe}onResizeRequest(t){this.Ze=t,Promise.resolve().then((()=>{null!=this.nn&&t(this.nn)}))}resized(){if(!this.qe)return;const t=this.T.offsetHeight;this.sn.sendCommand("resized",{height:t})}Ke(t,e){if("connect"==t)this.qe=!0,this.sn.sendStartCommand(this.l),this.He();else if("result"==t){if(this.Qe){const t=e.code,n=t==Qt.FAILED?new Error(e.data||""):e.data,i=new Xt(t,n,Jt.IFRAME,this.sn.getTargetOrigin(),!0,!0);se(this.t,i,this.Qe),this.Qe=null,this.sn.sendCommand("close"),this.disconnect()}}else"ready"==t?this.Je&&(this.Je(),this.Je=null):"resize"==t&&(this.nn=e.height,this.Ze&&this.Ze(this.nn))}};class ce{constructor(t,e,n,i,s,r){if(!i||"_blank"!=i&&"_top"!=i&&"_"==i[0])throw new Error('The only allowed targets are "_blank", "_top" and name targets');this.t=t,this.rn=e,this.B=n,this.an=i,this.l=s||null,this.ve=r||{},this.He=null,this.$e=new Promise((t=>{this.He=t})),this.Qe=null,this.Xe=new Promise((t=>{this.Qe=t})),this.hn=null,this.ln=null,this.sn=null}getMode(){return"_top"==this.an?Jt.REDIRECT:Jt.POPUP}open(){return this.un()}whenConnected(){return this.$e}disconnect(){if(this.ln&&(this.t.clearInterval(this.ln),this.ln=null),this.sn&&(this.sn.disconnect(),this.sn=null),this.hn){try{this.hn.close()}catch(t){}this.hn=null}this.Qe=null}getTargetWin(){return this.hn}acceptResult(){return this.Xe}message(t){this.sn.customMessage(t)}onMessage(t){this.sn.onCustomMessage(t)}messageChannel(t){return this.sn.askChannel(t)}un(){const t=this.cn();let e,n=this.B;if(!this.ve.skipRequestInUrl){const t=this.ve.returnUrl||function(t){const e=t.indexOf("#");return-1==e?t:t.substring(0,e)}(this.t.location.href);n=function(t,e,n){return t+(-1==t.indexOf("#")?"#":"&")+encodeURIComponent("__WA__")+"="+encodeURIComponent(n)}(n,0,function(t){const e={requestId:t.requestId,returnUrl:t.returnUrl,args:t.args};return void 0!==t.origin&&(e.origin=t.origin),void 0!==t.originVerified&&(e.originVerified=t.originVerified),JSON.stringify(e)}({requestId:this.rn,returnUrl:t,args:this.l}))}let i=this.an;"_top"!=i&&re(this.t)&&(i="_top");try{e=this.t.open(n,i,t)}catch(s){}if(!e&&"_top"!=i&&!this.ve.disableRedirectFallback){i="_top";try{e=this.t.open(n,i)}catch(s){}}return e?(this.hn=e,"_top"!=i&&this.dn()):this.gn(new Error("failed to open window")),this.Xe.catch((()=>{}))}cn(){const t=this.t.screen,e=t.availWidth||t.width,n=t.availHeight||t.height,i=this.mn(),s=oe(this.t),r=i&&this.t.outerWidth>this.t.innerWidth?Math.min(100,this.t.outerWidth-this.t.innerWidth):s?100:0,o=i&&this.t.outerHeight>this.t.innerHeight?Math.min(100,this.t.outerHeight-this.t.innerHeight):s?100:0,a=Math.max(e-r,.5*e),h=Math.max(n-o,.5*n);let l=Math.floor(Math.min(600,.9*a)),u=Math.floor(Math.min(600,.9*h));this.ve.width&&(l=Math.min(this.ve.width,a)),this.ve.height&&(u=Math.min(this.ve.height,h));const c=Math.floor((t.width-l)/2),d=Math.floor((t.height-u)/2),p={height:u,width:l,resizable:"yes",scrollbars:"yes"};s||(p.left=c,p.top=d);let g="";for(const m in p)g&&(g+=","),g+="".concat(m,"=").concat(p[m]);return g}mn(){return this.t==this.t.top}dn(){this.ln=this.t.setInterval((()=>{this._n(!0)}),500),this.sn=new he(this.t,this.hn,null,!0),this.sn.connect(this.Ke.bind(this))}_n(t){this.hn&&!this.hn.closed||(this.ln&&(this.t.clearInterval(this.ln),this.ln=null),this.t.setTimeout((()=>{try{this.fn(Qt.CANCELED,null)}catch(t){this.gn(t)}}),t?3e3:0))}gn(t){this.Qe&&this.Qe(Promise.reject(t)),this.disconnect()}fn(t,e){if(this.Qe){const n=this.sn.isConnected(),i=new Xt(t,e,Jt.POPUP,n?this.sn.getTargetOrigin():ne(this.B),n,n);se(this.t,i,this.Qe),this.Qe=null}this.sn&&this.sn.sendCommand("close"),this.disconnect()}Ke(t,e){if("connect"==t)this.sn.sendStartCommand(this.l),this.He();else if("result"==t){const t=e.code,n=t==Qt.FAILED?new Error(e.data||""):e.data;this.fn(t,n)}else"check"==t&&this.t.setTimeout((()=>this._n()),200)}}class de{constructor(t,e,n,i,s){this.t=t,this.wn=e,this.En=n,this.Le=i,this.bn=s}getMode(){return Jt.REDIRECT}acceptResult(){const t=new Xt(this.wn,this.En,Jt.REDIRECT,this.Le,this.bn,!1);return new Promise((e=>{se(this.t,t,e)}))}}var pe={ActivityPorts:class{constructor(t){this.version="1.24",this.t=t,this.Tn=t.location.hash,this.In={},this.yn={},this.Sn=null,this.On=new Promise((t=>{this.Sn=t}))}openIframe(t,e,n){const i=new ue(t,e,n);return i.connect().then((()=>i))}open(t,e,n,i,s){return{targetWin:this.Nn(t,e,n,i,s).getTargetWin()}}openWithMessaging(t,e,n,i,s){const r=this.Nn(t,e,n,i,s);return r.whenConnected().then((()=>r))}onResult(t,e){let n=this.In[t];n||(n=[],this.In[t]=n),n.push(e);const i=this.Cn(t);i&&this.Rn(i,e)}onRedirectError(t){this.On.then(t)}Nn(t,e,n,i,s){const r=new ce(this.t,t,e,n,i,s);return r.open().then((()=>{this.An(t,r)})),r}Cn(t){let e=this.yn[t];if(!e&&this.Tn){try{e=function(t,e,n){const i="__WA_RES__",s=(r=i,(o=e,o?(/^[?#]/.test(o)?o.slice(1):o).split("&").reduce(((t,e)=>{const n=e.split("="),i=decodeURIComponent(n[0]||""),s=decodeURIComponent(n[1]||"");return i&&(t[i]=s),t}),{}):{})[r]);var r,o;if(!s)return null;const a=JSON.parse(s);if(!a||a.requestId!=n)return null;const h=function(t,e){if(!t)return t;const n=encodeURIComponent(e)+"=";let i=-1;do{if(i=t.indexOf(n,i),-1!=i){const e=i>0?t.substring(i-1,i):"";if(""==e||"?"==e||"#"==e||"&"==e){let e=t.indexOf("&",i+1);-1==e&&(e=t.length),t=t.substring(0,i)+t.substring(e+1)}else i++}}while(-1!=i&&i<t.length);return t}(t.location.hash,i)||"";if(h!=t.location.hash&&t.history&&t.history.replaceState)try{t.history.replaceState(t.history.state,"",h)}catch(p){}const l=a.code,u=a.data,c=a.origin,d=t.document.referrer&&ne(t.document.referrer);return new de(t,l,u,c,c==d)}(this.t,this.Tn,t)}catch(n){!function(t){setTimeout((()=>{throw t}))}(n),this.Sn(n)}e&&(this.yn[t]=e)}return e}Rn(t,e){Promise.resolve().then((()=>{e(t)}))}An(t,e){const n=this.In[t];n&&n.forEach((t=>{this.Rn(e,t)})),this.yn[t]=e}},ActivityIframePort:ue,ActivityMessagingPort:class{getTargetWin(){}message(t){}onMessage(t){}messageChannel(t){}},ActivityMode:Jt,ActivityOpenOptions:void 0,ActivityPort:class{getMode(){}acceptResult(){}},ActivityRequest:void 0,ActivityResult:Xt,ActivityResultCode:Qt,ActivityWindowPort:ce,createAbortError:ie,isAbortError:function(t){return!(!t||"object"!=typeof t)&&t.name===Zt}};const ge=t({__proto__:null,default:Ht(pe)},[pe]);class me{constructor(t){this.m=t}acceptResult(){return this.m.acceptResult()}}var fe=(t=>(t[t.PROCESS_EVENT=0]="PROCESS_EVENT",t[t.CANCEL_EVENT=1]="CANCEL_EVENT",t))(fe||{});function we(t){return"[object Object]"===Object.prototype.toString.call(t)}function Ee(t,e){return Object.values(t).includes(e)}function be(t){return"function"==typeof t}function Te(t){return"boolean"==typeof t}function Ie(t,e){return"Event has an invalid "+t+"("+e+")"}class ye{constructor(t){this.vn=t,this.Pn=[],this.xn=[],this.lastAction=null}static isPublisherEvent(t){return t.eventOriginator===w.PROPENSITY_CLIENT||t.eventOriginator===w.PUBLISHER_CLIENT}registerEventListener(t){if(!be(t))throw new Error("Event manager listeners must be a function");this.Pn.push(t)}registerEventFilterer(t){if(!be(t))throw new Error("Event manager filterers must be a function");this.xn.push(t)}logEvent(t,e,n){!function(t){if(!we(t))throw new Error("Event must be a valid object");if(!Ee(m,t.eventType))throw new Error(Ie("eventType",t.eventType));if(!Ee(w,t.eventOriginator))throw new Error(Ie("eventOriginator",t.eventOriginator));if(!we(t.additionalParameters)&&null!=t.additionalParameters)throw new Error(Ie("additionalParameters",t.additionalParameters));if(null!=t.isFromUserAction&&!Te(t.isFromUserAction))throw new Error(Ie("isFromUserAction",t.isFromUserAction))}(t),t.timestamp=null!=n?n:Date.now(),this.lastAction=this.ze(t,e)}async ze(t,e){await this.vn;for(const i of this.xn)try{if(i(t)===fe.CANCEL_EVENT)return}catch(n){X(n)}for(const i of this.Pn)try{i(t,e)}catch(n){X(n)}}logSwgEvent(t,e=!1,n=null,i,s=null){this.logEvent({eventType:t,eventOriginator:w.SWG_CLIENT,isFromUserAction:e,additionalParameters:n,configurationId:s},void 0,i)}getReadyPromise(){return this.vn}}let Se="enable-pub-id-suffix-for-storage-key",Oe=null;function Ne(t){if(!Oe){Oe={};let n=Se;try{const e=Ot(t.location.hash)["swg.experiments"];e&&(n+=","+e)}catch(e){d.throwAsync(e)}for(let i of n.split(","))if(i=i.trim(),i)try{Ce(t,Oe,i)}catch(e){d.throwAsync(e)}}return Oe}function Ce(t,e,n){let i,s,r=!1;const o=n.indexOf(":");if(-1==o?(i=n,s=100,r=!1):(i=n.substring(0,o).trim(),"c"==(n=n.substring(o+1)).substring(n.length-1)&&(r=!0,n=n.substring(0,n.length-1)),s=parseInt(n,10)),isNaN(s))throw new Error("invalid fraction");let a;if(s>99)a=!0;else if(s<1)a=!1;else if(t.sessionStorage){r=r&&s<=20;try{const e="subscribe.google.com:e:"+i+":"+s+(r?"c":"");let n="e"==(h=t.sessionStorage.getItem(e))?"e":"c"==h?"c":null;!n&&100*Math.random()<=s*(r?2:1)&&(n=!r||Math.random()<=.5?"e":"c",t.sessionStorage.setItem(e,n)),a=!!n,"c"==n&&(i="c-"+i)}catch(l){a=!1,d.throwAsync(l)}}else a=!1;var h;e[i]=a}function Re(t,e){return Ne(t)[e]||!1}function Ae(t){const e=Ne(t),n=[];for(const i in e)e[i]&&n.push(i);return n}const ve="0123456789ABCDEF",Pe={"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 xe(t,e){for(const[n,i]of Object.entries(e))t.style.setProperty(n,i.toString(),"important")}function Le(t,e,n){t.style.setProperty(e,n)}function Me(t){return new z([Math.floor(t/1e3),t%1e3*1e6],!1)}const ke={opacity:"0",position:"absolute",top:"-10px",left:"-10px",height:"1px",width:"1px"},De="AnalyticsService timed out waiting for a response";function Ue(t){const e=new v;return e.setComplete(!1),e.setError(t),e}class Ge{constructor(t){var e;this.oe=t,this.et=new T,this.Ln=!1,this.Mn=!1,this.kn=null,this.Dn=[],this.I=null,this.Un=null,this.Gn=!1,this.jn=null,this.Fn=0,this.lastAction=null,this.H=Me(t.creationTimestamp()),this._=t.doc(),this.o=t.activities(),this.T=o(this._.getWin().document,"iframe",{}),xe(this.T,ke),null==(e=this._.getBody())||e.appendChild(this.getElement()),this.zn(),this.pe=t.eventManager(),this.pe.registerEventListener(this.Bn.bind(this))}setReadyForLogging(){this.Gn=!0;for(const t of this.Dn)this.Bn(t)}setTransactionId(t){const e=this.et.getTransactionId();if(this.et.setTransactionId(t),null!=e&&e!=t){const t=m.EVENT_NEW_TX_ID,n=new A;n.setOldTransactionId(e),this.pe.logSwgEvent(t,!0,n)}}getTransactionId(){return this.et.getTransactionId()}getSku(){return this.et.getSku()}setSku(t){this.et.setSku(t)}setUrl(t){this.et.setUrl(t)}addLabels(t){if(t&&t.length>0){const e=[].concat(this.et.getLabelList());for(const n of t)-1==e.indexOf(n)&&e.push(n);this.et.setLabelList(e)}}getElement(){return this.T}Wn(){return this._.getWin().location.search}Vn(){return this._.getWin().document.referrer}Yn(){const t=this.Kn();if(t&&t.length){const e=t[0],n=e.loadEventStart-e.unloadEventEnd;if(n>0)return n}return 0}Kn(){return performance.getEntriesByType("navigation")}zn(){const t=this.et;t.setTransactionId(function(){let t=function(){const t=Date.now().toString(16);return t.substring(t.length-8).toUpperCase()}()+"-",e=0;const n=function(t,e){const n=new Uint8Array(23);self.crypto.getRandomValues(n);for(let i=n.length-1;i>-1;i--)n[i]=n[i]%16;return n}();for(let s=9;s<36;s++)switch(s){case 13:case 18:case 23:t+="-";break;case 14:t+="4";break;case 19:t+=(i=n[e++],ve[3&i|8]);break;default:t+=ve[n[e++]]}var i;return t}()+".swg"),t.setReferringOrigin(St(this.Vn()).origin),t.setClientVersion("SwG ".concat(n)),t.setUrl(At(this._)),t.setIsLockedContent(this.oe.pageConfig().isLocked()),t.setUrlFromMarkup(Rt(this._)||"");const e=Ot(this.Wn()),i=e.utm_campaign,s=e.utm_medium,r=e.utm_source;i&&t.setUtmCampaign(i),s&&t.setUtmMedium(s),r&&t.setUtmSource(r)}start(){return this.I||(this.addLabels(Ae(this._.getWin())),this.I=this.preparePort()),this.I}async preparePort(){let t;try{t=await this.o.openIframe(this.T,Ut("/serviceiframe"),null,!0)}catch(e){return this.Mn=!0,this.qn(Ue("Could not connect ["+e+"]")),null}return t.on(v,this.qn.bind(this)),await t.whenReady(),this.addLabels(Ae(this._.getWin())),t}setReadyToPay(t){this.et.setReadyToPay(t)}close(){var t;null==(t=this._.getBody())||t.removeChild(this.getElement())}getContext(){return this.et}Hn(t){const e=new I;e.setEventOriginator(t.eventOriginator),e.setIsFromUserAction(!!t.isFromUserAction),t.configurationId&&e.setConfigurationId(t.configurationId),this.et.setClientTimestamp(Me(t.timestamp));const n=this.Yn();var i;n>0&&this.et.setLoadEventStartDelay((i=n,new O([Math.floor(i/1e3),i%1e3*1e6],!1))),this.et.setRuntimeCreationTimestamp(this.H);const s=new y;return s.setEvent(t.eventType),s.setContext(this.et),s.setMeta(e),t.additionalParameters instanceof A&&s.setParams(t.additionalParameters),s}$n(){return!0===this.oe.config().enableSwgAnalytics}Bn(t){t.eventType!==m.EVENT_SUBSCRIPTION_STATE&&t.eventOriginator!==w.SHOWCASE_CLIENT&&(ye.isPublisherEvent(t)&&!this.$n()||(this.Gn?(this.Fn++,this.lastAction=this.Jn(t)):this.Dn.push(t)))}async Jn(t){const e=await this.start(),n=this.Hn(t);null==e||e.execute(n)}qn(t){const e=(null==t?void 0:t.getComplete())||!1,n=(null==t?void 0:t.getError())||"Unknown logging Error",i=n===De;e||X("Error when logging: "+n),this.Fn--,i||(this.Ln=!0),null!==this.kn&&(0===this.Fn||this.Mn||i)&&(null!==this.jn&&(clearTimeout(this.jn),this.jn=null),this.kn(e),this.Un=null,this.kn=null)}getLoggingPromise(){return 0===this.Fn||this.Mn?Promise.resolve(!0):(null===this.Un&&(this.Un=new Promise((t=>{this.kn=t})),this.jn=self.setTimeout((()=>{this.jn=null,this.qn(Ue(De))}),this.Ln?200:500)),this.Un)}}var je=(t=>(t.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY="enable-pub-id-suffix-for-storage-key",t))(je||{}),Fe=(t=>(t.BACKGROUND_CLICK_BEHAVIOR_EXPERIMENT="background_click_behavior_experiment",t.ACTION_ORCHESTRATION_EXPERIMENT="action_orchestration_experiment",t))(Fe||{});const ze={en:"Subscribe with Google",ar:"Google اشترك مع",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Ãbete con Google","es-419":"SuscrÃbete con Google","es-latam":"SuscrÃbete con Google","es-latn":"SuscrÃbete con Google",fr:"S'abonner avec Google","fr-ca":"S'abonner avec Google",hi:"Google के ज़रिये सदसà¥à¤¯à¤¤à¤¾",id:"Berlangganan dengan Google",it:"Abbonati con Google",ja:"Google ã§è³¼èª",ko:"Google ì„ í†µí•œêµ¬ë…",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:"Подпиcка через Google",sv:"Prenumerera med Google",th:"สมัครฟาน Google",tr:"Google ile Abone Ol",uk:"ПідпиÑатиÑÑ Ñ‡ÐµÑ€ÐµÐ· Google","zh-cn":"通过 Google 订阅","zh-hk":"é€éŽ Google 訂閱","zh-tw":"é€éŽ Google 訂閱"},Be={en:"Contribute with Google",ar:"المساهمة باستخدام 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 खाते की मदद से योगदान करें",id:"Berkontribusi dengan Google",it:"Contribuisci con Google",ja:"Google ã§å¯„付",ko:"Googleì„ í†µí•´ 참여하기",ms:"Sumbangkan dengan Google",nl:"Bijdragen met Google",no:"Bidra med Google",pl:"Wesprzyj publikacjÄ™ przez Google",pt:"Contribuir utilizando o Google","pt-br":"Contribua usando o Google",ru:"ВнеÑти ÑредÑтва через Google",sv:"Bidra med Google",th:"มีส่วนร่วมผ่าน Google",tr:"Google ile Katkıda Bulun",uk:"Зробити внеÑок через Google","zh-cn":"通过 Google æèµ ","zh-hk":"é€éŽ Google æ供內容","zh-tw":"é€éŽ Google æ款"},We={en:"You have signed up before.",ar:"سبق أن اشتركت ÙÙŠ النشرة الإخبارية.",de:"Du hast dich bereits angemeldet.","en-au":"You have signed up before.","en-ca":"You have signed up before.","en-gb":"You have signed up before.","en-us":"You have signed up before.",es:"Ya te has registrado anteriormente.","es-419":"Ya te registraste antes.",fr:"Vous vous êtes déjà inscrit.","fr-ca":"Vous vous êtes inscrit auparavant.",hi:"नà¥à¤¯à¥‚ज़लेटर के लिठपहले ही साइन अप किया जा चà¥à¤•à¤¾ है.",id:"Anda telah mendaftar sebelumnya.",it:"Hai già effettuato l'iscrizione.",ja:"ã™ã§ã«ç™»éŒ²ã•ã‚Œã¦ã„ã¾ã™ã€‚",ko:"ì´ì „ì— ê°€ìž…í•œ 사용ìžìž…니다.",ms:"Anda sudah mendaftar sebelum ini.",nl:"Je hebt je al eerder aangemeld.",no:"Du er allerede registrert.",pl:"Już wczeÅ›niej siÄ™ zarejestrowaÅ‚eÅ›(-aÅ›).",pt:"Já se inscreveu anteriormente.","pt-br":"Você se inscreveu anteriormente.",ru:"Ð’Ñ‹ уже зарегиÑтрированы.",sv:"Du har redan registrerat dig.",th:"คุณสมัครรับข้à¸à¸¡à¸¹à¸¥à¸¡à¸²à¸à¹ˆà¸à¸™à¹à¸¥à¹‰à¸§",tr:"Daha önce kaydolmuÅŸtunuz.",uk:"Ви вже зареєÑтрувалиÑÑ.","zh-cn":"您之å‰å·²æ³¨å†Œã€‚","zh-hk":"您之å‰å·²è¨‚閱。","zh-tw":"ä½ å·²ç¶“è¨‚é–±äº†ã€‚"},Ve={en:"Registration failed. Try registering again.",ar:"تعذَّرت عملية التسجيل. ÙŠÙرجى إعادة المØاولة.",de:"Registrierung fehlgeschlagen. Versuche es noch einmal.","en-au":"Registration failed. Try registering again.","en-ca":"Registration failed. Try registering again.","en-gb":"Registration failed. Try registering again.","en-us":"Registration failed. Try registering again.",es:"No se ha podido completar el registro. Prueba a registrarte de nuevo.","es-419":"No se pudo completar el registro. Vuelve a intentarlo.",fr:"Échec de l'enregistrement. Réessayez.","fr-ca":"Échec de l'inscription. Essayez de vous inscrire à nouveau.",hi:"रजिसà¥à¤Ÿà¥à¤°à¥‡à¤¶à¤¨ नहीं हो सका. फिर से रजिसà¥à¤Ÿà¤° करने की कोशिश करें.",id:"Pendaftaran gagal. Coba daftar lagi.",it:"Registrazione non riuscita. Prova a registrarti di nuovo.",ja:"登録ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。",ko:"등ë¡ì— 실패했습니다. 다시 등ë¡í•´ 보세요.",ms:"Pendaftaran gagal. Cuba mendaftar lagi.",nl:"Registratie mislukt. Probeer opnieuw te registreren.",no:"Registreringen mislyktes. Prøv Ã¥ registrere deg pÃ¥ nytt.",pl:"Rejestracja siÄ™ nie udaÅ‚a. Spróbuj jeszcze raz siÄ™ zarejestrować.",pt:"Falha no registo. Tente registar-se novamente.","pt-br":"Não foi possÃvel fazer o registro. Tente novamente.",ru:"Ошибка региÑтрации. Повторите попытку.",sv:"Registreringen misslyckades. Försök att registrera dig igen.",th:"ลงทะเบียนไม่สำเร็จ ลà¸à¸‡à¸¥à¸‡à¸—ะเบียนà¸à¸µà¸à¸„รั้ง",tr:"Kayıt iÅŸlemi baÅŸarısız oldu. Tekrar kaydolmayı deneyin.",uk:"Помилка реєÑтрації. Повторіть Ñпробу.","zh-cn":"注册失败。请å°è¯•é‡æ–°æ³¨å†Œã€‚","zh-hk":"註冊失敗。請嘗試é‡æ–°è¨»å†Šã€‚","zh-tw":"註冊失敗,請å†è©¦ä¸€æ¬¡ã€‚"},Ye={en:"Signup failed. Try signing up again.",ar:"تعذَّرت عملية الاشتراك. ÙŠÙرجى إعادة المØاولة.",de:"Anmeldung fehlgeschlagen. Versuche es noch einmal.","en-au":"Sign-up failed. Try signing up again.","en-ca":"Sign-up failed. Try signing up again.","en-gb":"Sign-up failed. Try signing up again.","en-us":"Sign-up failed. Try signing up again.",es:"No se ha podido completar la suscripción. Prueba a suscribirte de nuevo.","es-419":"Se produjo un error de registro. Vuelve a intentarlo.",fr:"Échec de l'inscription. Réessayez.","fr-ca":"Échec de l'inscription. Essayez de vous inscrire à nouveau.",hi:"साइन अप नहीं किया जा सका. फिर से साइन अप करने की कोशिश करें.",id:"Pendaftaran gagal. Coba daftar lagi.",it:"Iscrizione non riuscita. Prova a iscriverti di nuovo.",ja:"登録ã§ãã¾ã›ã‚“ã§ã—ãŸã€‚ã‚‚ã†ä¸€åº¦ãŠè©¦ã—ãã ã•ã„。",ko:"ê°€ìž…ì— ì‹¤íŒ¨í–ˆìŠµë‹ˆë‹¤. 다시 가입해 보세요.",ms:"Daftar gagal. Cuba daftar lagi.",nl:"Aanmelding mislukt. Probeer opnieuw aan te melden.",no:"Registreringen mislyktes. Prøv Ã¥ registrere deg pÃ¥ nytt.",pl:"Rejestracja siÄ™ nie udaÅ‚a. Spróbuj jeszcze raz siÄ™ zarejestrować.",pt:"Falha na inscrição. Tente inscrever-se novamente.","pt-br":"Não foi possÃvel se inscrever. Tente novamente.",ru:"Ðе удалоÑÑŒ зарегиÑтрироватьÑÑ. Повторите попытку.",sv:"Registreringen misslyckades. Försök att registrera dig igen.",th:"ลงชื่à¸à¸ªà¸¡à¸±à¸„รใช้ไม่สำเร็จ ลà¸à¸‡à¸¥à¸‡à¸Šà¸·à¹ˆà¸à¸ªà¸¡à¸±à¸„รใช้à¸à¸µà¸à¸„รั้ง",tr:"Kaydolma iÅŸlemi baÅŸarısız oldu. Tekrar kaydolmayı deneyin.",uk:"Помилка реєÑтрації. Повторіть Ñпробу.","zh-cn":"注册失败。请å°è¯•é‡æ–°æ³¨å†Œã€‚","zh-hk":"申請失敗。請嘗試é‡æ–°ç”³è«‹ã€‚","zh-tw":"訂閱失敗,請å†è©¦ä¸€æ¬¡ã€‚"},Ke={en:'Created an account with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',ar:'تم إنشاء Øساب باستخدام <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>.',de:'Konto bei <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> wurde erstellt',"en-au":'Created an account with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"en-ca":'Created an account with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"en-gb":'Created an account with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"en-us":'Created an account with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',es:'Has creado una cuenta con <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"es-419":'Se creó una cuenta con <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',fr:'A créé un compte avec <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"fr-ca":'Un compte a été créé avec l\'adresse <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',hi:'<ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> का इसà¥à¤¤à¥‡à¤®à¤¾à¤² करके, à¤à¤• खाता बनाया गया',id:'Membuat akun dengan <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',it:'È stato creato un account con l\'indirizzo <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',ja:'<ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> ã§ã‚¢ã‚«ã‚¦ãƒ³ãƒˆã‚’作æˆã—ã¾ã—ãŸ',ko:'<ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>(으)ë¡œ ê³„ì •ì„ ë§Œë“¤ì—ˆìŠµë‹ˆë‹¤.',ms:'Membuat akaun dengan <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',nl:'Account gemaakt met <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',no:'Du har opprettet en konto med <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',pl:'Utworzono konto za pomocÄ… adresu <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',pt:'Criou uma conta com <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"pt-br":'Conta criada com o e-mail <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',ru:'Ð’Ñ‹ зарегиÑтрировали аккаунт на Ð°Ð´Ñ€ÐµÑ <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>.',sv:'Du skapade ett konto med <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',th:'สร้างบัà¸à¸Šà¸µà¸”้วย <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',tr:'<ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> ile bir hesap oluÅŸturun',uk:'Обліковий Ð·Ð°Ð¿Ð¸Ñ Ñтворено за допомогою електронної адреÑи <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"zh-cn":'已使用 <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> 创建å¸å·',"zh-hk":'已使用 <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> 建立帳戶',"zh-tw":'已使用 <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> 建立帳戶'},qe={en:'Signed up with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> for the newsletter',ar:'تم الاشتراك ÙÙŠ النشرة الإخبارية باستخدام <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>.',de:'Du hast dich für den Newsletter von <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> angemeldet',"en-au":'Signed up with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> for the newsletter',"en-ca":'Signed up with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> for the newsletter',"en-gb":'Signed up with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> for the newsletter',"en-us":'Signed up with <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> for the newsletter',es:'Te has suscrito a la newsletter con <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"es-419":'Te registraste con <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> para recibir el boletÃn informativo',fr:'S\'est abonné à la newsletter avec <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"fr-ca":"Vous êtes inscrit au bulletin d'information avec l'adresse <ph name=\"EMAIL\"><ex>user@gmail.com</ex>%s</ph>",hi:'नà¥à¤¯à¥‚ज़लेटर पाने के लिà¤, <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> से साइन अप किया गया',id:'Mendaftar dengan <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> untuk mendapatkan newsletter',it:'Iscrizione alla newsletter con l\'indirizzo <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> effettuata',ja:'<ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> ã§ãƒ‹ãƒ¥ãƒ¼ã‚¹ãƒ¬ã‚¿ãƒ¼ã‚’登録ã—ã¾ã—ãŸ',ko:'<ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>(으)ë¡œ ë‰´ìŠ¤ë ˆí„°ì— ê°€ìž…í–ˆìŠµë‹ˆë‹¤.',ms:'Mendaftar dengan <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> untuk surat berita',nl:'Aangemeld met <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> voor de nieuwsbrief',no:'Du har registrert deg for nyhetsbrevet med <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',pl:'Zapisano siÄ™ na newsletter za pomocÄ… adresu <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',pt:'Inscreveu-se com <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> no boletim informativo',"pt-br":'Inscrição na newsletter feita com o e-mail <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',ru:'Ð’Ñ‹ подпиÑалиÑÑŒ на новоÑтную раÑÑылку, иÑÐ¿Ð¾Ð»ÑŒÐ·ÑƒÑ Ð°ÐºÐºÐ°ÑƒÐ½Ñ‚ <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>.',sv:'Du registrerade dig för nyhetsbrevet med <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',th:'ลงชื่à¸à¹€à¸‚้าใช้ด้วย <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> สำหรับจดหมายข่าว',tr:'Bülten için <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> ile kaydoldunuz',uk:'Ви підпиÑалиÑÑ Ð½Ð° інформаційні лиÑти на електронну адреÑу <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph>',"zh-cn":'已使用 <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> 订阅简报',"zh-hk":'已使用 <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> 註冊通訊',"zh-tw":'已使用 <ph name="EMAIL"><ex>user@gmail.com</ex>%s</ph> 訂閱電åå ±'},He={en:"No membership found",ar:"لم يتم العثور على أي اشتراك.",de:"Keine Mitgliedschaftsdaten gefunden","en-au":"No membership found","en-ca":"No membership found","en-gb":"No membership found","en-us":"No membership found",es:"No se han encontrado suscripciones","es-419":"No se encontró ninguna membresÃa",fr:"Aucun abonnement trouvé","fr-ca":"Aucun abonnement trouvé",hi:"पैसे चà¥à¤•à¤¾à¤•à¤° ली जाने वाली कोई सदसà¥à¤¯à¤¤à¤¾ नहीं मिली",id:"Langganan tidak ditemukan",it:"Nessun abbonamento trovato",ja:"メンãƒãƒ¼ã‚·ãƒƒãƒ—ãŒè¦‹ã¤ã‹ã‚Šã¾ã›ã‚“",ko:"ë©¤ë²„ì‹ ì •ë³´ë¥¼ ì°¾ì„ ìˆ˜ 없습니다.",ms:"Tiada keahlian ditemukan",nl:"Geen lidmaatschap gevonden",no:"Fant ingen abonnementer",pl:"Nie znaleziono subskrypcji",pt:"Nenhuma subscrição encontrada","pt-br":"Nenhuma assinatura foi encontrada",ru:"ПодпиÑка не найдена.",sv:"Inget medlemskap hittades",th:"ไม่พบà¸à¸²à¸£à¹€à¸›à¹‡à¸™à¸ªà¸¡à¸²à¸Šà¸´à¸",tr:"Ãœyelik bulunamadı",uk:"Ðемає підпиÑок","zh-cn":"未找到会员资料","zh-hk":"找ä¸åˆ°æœƒç±","zh-tw":"找ä¸åˆ°æœƒå“¡è³‡æ–™"},$e={en:"Close dialog",ar:"إغلاق مربّع الØوار",de:"Dialogfeld schließen","en-au":"Close dialog","en-ca":"Close dialog","en-gb":"Close dialog","en-us":"Close dialog",es:"Cerrar cuadro de diálogo","es-419":"Cerrar diálogo",fr:"Fermer la boîte de dialogue","fr-ca":"Fermer la boîte de dialogue",hi:"डायलॉग बॉकà¥à¤¸ बंद करें",id:"Tutup dialog",it:"Chiudi la finestra di dialogo",ja:"ダイアãƒã‚°ã‚’é–‰ã˜ã‚‹",ko:"대화ìƒìž 닫기",ms:"Tutup dialog",nl:"Dialoogvenster sluiten",no:"Lukk dialogboksen",pl:"Zamknij okno",pt:"Fechar caixa de diálogo","pt-br":"Fechar caixa de diálogo",ru:"Закрыть диалоговое окно",sv:"Stäng dialogrutan",th:"ปิดà¸à¸¥à¹ˆà¸à¸‡à¹‚ต้ตà¸à¸š",tr:"Ä°letiÅŸim kutusunu kapat",uk:"Закрити вікно","zh-cn":"å…³é—对è¯æ¡†","zh-hk":"é–‚å°è©±æ¡†","zh-tw":"關閉å°è©±æ–¹å¡Š"},Je={en:"Contribute",ar:"مساهمة",de:"Beitragen","en-au":"Contribute","en-ca":"Contribute","en-gb":"Contribute","en-us":"Contribute",es:"Contribuir","es-419":"Contribuir",fr:"Contribuer","fr-ca":"Faire une contribution",hi:"योगदान दें",id:"Beri kontribusi",it:"Contribuisci",ja:"寄付",ko:"후ì›",ms:"Sumbang",nl:"Bijdragen",no:"Bidra",pl:"Przekaż darowiznÄ™",pt:"Contribuir","pt-br":"Contribuir",ru:"Сделать взноÑ",sv:"Bidra",th:"สนับสนุน",tr:"Katkıda bulun",uk:"Зробити внеÑок","zh-cn":"æèµ ","zh-hk":"資助","zh-tw":"æ款"},Qe={en:"Subscribe",ar:"اشتراك",de:"Abonnieren","en-au":"Subscribe","en-ca":"Subscribe","en-gb":"Subscribe","en-us":"Subscribe",es:"Suscribirme","es-419":"Suscribirse",fr:"S'abonner","fr-ca":"S'abonner",hi:"सदसà¥à¤¯à¤¤à¤¾ लें",id:"Langganan",it:"Iscriviti",ja:"è³¼èª",ko:"구ë…",ms:"Langgan",nl:"Abonneren",no:"Abonner",pl:"Subskrybuj",pt:"Subscrever","pt-br":"Fazer inscrição",ru:"ПодпиÑатьÑÑ",sv:"Prenumerera",th:"สมัครสมาชิà¸",tr:"Abone ol",uk:"ПідпиÑатиÑÑ","zh-cn":"订阅","zh-hk":"訂閱","zh-tw":"訂閱"},Xe={en:"Already a contributor?",ar:"هل أنت مساهم Øالي؟",de:"Du bist schon Beitragende/r?","en-au":"Already a contributor?","en-ca":"Already a contributor?","en-gb":"Already a contributor?","en-us":"Already a contributor?",es:"¿Ya has contribuido?","es-419":"¿Ya contribuyes?",fr:"Déjà contributeur ?","fr-ca":"Vous êtes déjà contributeur?",hi:"कà¥à¤¯à¤¾ आपने पहले योगदान दिया है?",id:"Sudah menjadi kontributor?",it:"Hai già dato contributi?",ja:"ã™ã§ã«å¯„付ã—ã¦ã„ã¾ã™ã‹ï¼Ÿ",ko:"ì´ë¯¸ 후ì›í•˜ê³ ê³„ì‹ ê°€ìš”?",ms:"Sudah menjadi penyumbang?",nl:"Ben je al een bijdrager?",no:"Har du allerede bidratt?",pl:"Już przekazujesz darowizny?",pt:"Já contribui?","pt-br":"Já faz contribuições?",ru:"Уже делаете взноÑÑ‹?",sv:"Är du redan en bidragsgivare?",th:"หาà¸à¹€à¸›à¹‡à¸™à¸œà¸¹à¹‰à¸ªà¸™à¸±à¸šà¸ªà¸™à¸¸à¸™à¸à¸¢à¸¹à¹ˆà¹à¸¥à¹‰à¸§",tr:"Halihazırda katkıda bulunuyor musunuz?",uk:"Уже робите внеÑки?","zh-cn":"已是æèµ è€…ï¼Ÿ","zh-hk":"已是資助者?","zh-tw":"已經是æ款者了嗎?"},Ze={en:"Already a subscriber?",ar:"هل أنت مشترك Øالي؟",de:"Du bist bereits Abonnent/in?","en-au":"Already a subscriber?","en-ca":"Already a subscriber?","en-gb":"Already a subscriber?","en-us":"Already a subscriber?",es:"¿Ya te has suscrito?","es-419":"¿Ya te suscribiste?",fr:"Déjà abonné ?","fr-ca":"Vous êtes déjà abonné?",hi:"कà¥à¤¯à¤¾ आपने पहले ही सदसà¥à¤¯à¤¤à¤¾ ले ली है?",id:"Sudah berlangganan?",it:"Hai già l'abbonamento?",ja:"è³¼èªæ¸ˆã¿ã§ã™ã‹ï¼Ÿ",ko:"ì´ë¯¸ êµ¬ë… ì¤‘ì´ì‹ 가요?",ms:"Sudah menjadi pelanggan?",nl:"Ben je al abonnee?",no:"Er du allerede abonnent?",pl:"Już subskrybujesz?",pt:"Já subscreve?","pt-br":"Já é assinante?",ru:"Уже подпиÑаны?",sv:"Prenumererar du redan?",th:"หาà¸à¹€à¸›à¹‡à¸™à¸ªà¸¡à¸²à¸Šà¸´à¸à¸à¸¢à¸¹à¹ˆà¹à¸¥à¹‰à¸§",tr:"Halihazırda abone misiniz?",uk:"Уже підпиÑалиÑÑ?","zh-cn":"已订阅?","zh-hk":"已經是訂閱者?","zh-tw":"已經是訂閱者了嗎?"},tn={en:"Thanks for viewing this ad",ar:"نشكرك على مشاهدة هذا الإعلان.",de:"Vielen Dank, dass du dir diese Anzeige angesehen hast","en-au":"Thanks for viewing this ad","en-ca":"Thanks for viewing this ad","en-gb":"Thanks for viewing this ad","en-us":"Thanks for viewing this ad",es:"Gracias por ver este anuncio","es-419":"Gracias por ver este anuncio",fr:"Merci d'avoir regardé cette annonce","fr-ca":"Merci d'avoir regardé cette annonce",hi:"यह विजà¥à¤žà¤¾à¤ªà¤¨ देखने के लिठधनà¥à¤¯à¤µà¤¾à¤¦",id:"Terima kasih telah melihat iklan ini",it:"Grazie per aver visualizzato questo annuncio",ja:"ã“ã®åºƒå‘Šã‚’ã”覧ã„ãŸã ãã‚ã‚ŠãŒã¨ã†ã”ã–ã„ã¾ã™",ko:"ì´ ê´‘ê³ ë¥¼ ì‹œì²í•´ 주셔서 ê°ì‚¬í•©ë‹ˆë‹¤.",ms:"Terima kasih kerana menonton iklan ini",nl:"Bedankt dat je deze advertentie hebt bekeken",no:"Takk for at du sÃ¥ pÃ¥ denne annonsen",pl:"DziÄ™kujemy za obejrzenie tej reklamy",pt:"Obrigado por ver este anúncio","pt-br":"Agradecemos por assistir este anúncio",ru:"СпаÑибо, что поÑмотрели Ñту рекламу!",sv:"Tack för att du tittade pÃ¥ den här annonsen",th:"ขà¸à¸šà¸„ุณที่ดูโฆษณานี้",tr:"Bu reklamı görüntülediÄŸiniz için teÅŸekkür ederiz",uk:"ДÑкуємо, що переглÑнули це оголошеннÑ","zh-cn":"感谢观看æ¤å¹¿å‘Š","zh-hk":"æ„Ÿè¬è§€çœ‹æ¤å»£å‘Š","zh-tw":"æ„Ÿè¬è§€çœ‹é€™å‰‡å»£å‘Š"},en={en:"View an ad",ar:"عرض إعلان",de:"Anzeige ansehen","en-au":"View an ad","en-ca":"View an ad","en-gb":"View an ad","en-us":"View an ad",es:"Ver un anuncio","es-419":"Ver un anuncio",fr:"Visionner une annonce","fr-ca":"Afficher une annonce",hi:"कोई विजà¥à¤žà¤¾à¤ªà¤¨ देखें",id:"Lihat iklan",it:"Visualizza un annuncio",ja:"広告を表示",ko:"ê´‘ê³ ë³´ê¸°",ms:"Lihat iklan",nl:"Een advertentie bekijken",no:"Se en annonsv",pl:"Obejrzyj reklamÄ™",pt:"Mostrar um anúncio","pt-br":"Ver anúncio",ru:"ПоÑмотреть рекламу",sv:"Se en annons",th:"ดูโฆษณา",tr:"Reklam izle",uk:"ПереглÑнути оголошеннÑ","zh-cn":"观看广告","zh-hk":"觀看廣告","zh-tw":"觀看廣告"},nn={en:"Back to homepage",ar:"الرجوع إلى الصÙØØ© الرئيسية",de:"Zurück zur Startseite","en-au":"Back to homepage","en-ca":"Back to homepage","en-gb":"Back to homepage","en-us":"Back to homepage",es:"Volver a la página principal","es-419":"Volver a la página principal",fr:"Retourner à la page d'accueil","fr-ca":"Retour à la page d'accueil",hi:"होम पेज पर वापस जाà¤à¤‚",id:"Kembali ke halaman beranda",it:"Torna alla home page",ja:"ホームページã«æˆ»ã‚‹",ko:"홈페ì´ì§€ë¡œ ëŒì•„가기",ms:"Kembali kepada halaman utama",nl:"Terug naar homepage",no:"Tilbake til startsiden",pl:"Powrót do strony głównej",pt:"Volte à página inicial","pt-br":"Voltar à página inicial",ru:"ВернутьÑÑ Ð½Ð° главную Ñтраницу",sv:"Tillbaka till startsidan",th:"à¸à¸¥à¸±à¸šà¹„ปที่หน้าà¹à¸£à¸",tr:"Ana sayfaya geri dön",uk:"Ðазад на головну Ñторінку","zh-cn":"返回首页","zh-hk":"返回首é ","zh-tw":"返回首é "},sn={frameborder:"0",scrolling:"no"};var rn=(t=>(t.LIGHT="light",t.DARK="dark",t))(rn||{});class on{constructor(t,e,n,i){this.oe=t,this.Qn=e,this.ve=n,this.Xn=i,this.h=Ut("/smartboxiframe"),this.o=t.activities(),this.T=o(t.win().document,"iframe",sn);const s={publicationId:this.oe.pageConfig().getPublicationId(),theme:this.ve&&this.ve.theme||"light",lang:this.ve&&this.ve.lang||"en"},r=this.ve&&this.ve.messageTextColor;r&&(s.messageTextColor=r),this.l=Gt(s)}Zn(t){var e;t&&t.getIsClicked()&&(null==(e=this.Xn)||e.call(this))}start(){xe(this.T,{opacity:"1",position:"absolute",top:"0",bottom:"0",left:"0",height:"100%",right:"0",width:"100%"}),this.Qn.appendChild(this.T);const t=this.o.addDefaultArguments(this.l);return this.o.openIframe(this.T,this.h,t).then((t=>{t.on(M,this.Zn.bind(this))})),this.T}}const an="en";function hn(t,e){const n=t[an];if("object"!=typeof t||!e)return n;let i="string"==typeof e?e:ln(e);i=i.toLowerCase(),i=i.replace(/_/g,"-");const s=i.split("-");for(;s.length;){const e=s.join("-");if(e in t)return t[e];s.pop()}return n}function ln(t){var e,n;return t.lang?t.lang:(null==(n=null==(e=null==t?void 0:t.ownerDocument)?void 0:e.documentElement)?void 0:n.lang)?t.ownerDocument.documentElement.lang:an}const un='<div class="swg-button-v2-icon-$theme$"></div>$textContent$';class cn{constructor(t,e){this._=t,this.ti=e}init(){const t=this._.getHead();if(!t)return;const e="".concat(i,"/swg-button.css");t.querySelector('link[href="'.concat(e,'"]'))||t.appendChild(o(this._.getWin().document,"link",{rel:"stylesheet",type:"text/css",href:e}))}create(t,e){const n=o(this._.getWin().document,"button",{});return this.attach(n,t,e)}attach(t,e,n){const i=this.ei(t,m.ACTION_SWG_BUTTON_CLICK,e,n).options,s=i.theme;return t.classList.add("swg-button-".concat(s)),t.setAttribute("role","button"),i.lang&&t.setAttribute("lang",i.lang),t.setAttribute("title",hn(ze,t)),this.ni(m.IMPRESSION_SWG_BUTTON),t}attachSubscribeButton(t,e,n){const i=this.ei(t,m.ACTION_SWG_BUTTON_SHOW_OFFERS_CLICK,e,n).options,s=i.theme;return t.classList.add("swg-button-v2-".concat(s)),t.setAttribute("role","button"),i.lang&&t.setAttribute("lang",i.lang),i.enable||t.setAttribute("disabled","disabled"),t.innerHTML=un.replace("$theme$",s).replace("$textContent$",hn(ze,t)),this.ni(m.IMPRESSION_SHOW_OFFERS_SWG_BUTTON),t}attachContributeButton(t,e,n){const i=this.ei(t,m.ACTION_SWG_BUTTON_SHOW_CONTRIBUTIONS_CLICK,e,n).options,s=i.theme;return t.classList.add("swg-button-v2-".concat(s)),t.setAttribute("role","button"),i.lang&&t.setAttribute("lang",i.lang),i.enable||t.setAttribute("disabled","disabled"),t.innerHTML=un.replace("$theme$",s).replace("$textContent$",hn(Be,t)),this.ni(m.IMPRESSION_SHOW_CONTRIBUTIONS_SWG_BUTTON),t}attachButtonsWithAttribute(t,e,n,i){for(const s of e){const e=Array.from(this._.getRootNode().querySelectorAll("[".concat(t,'="').concat(s,'"]')));for(const t of e)"subscription"===s?this.attachSubscribeButton(t,n,i[s]):"contribution"===s&&this.attachContributeButton(t,n,i[s])}}async ni(t,e){(await this.ti).eventManager().logSwgEvent(t,e)}ii(t){const e=t&&"function"!=typeof t?t:{theme:rn.LIGHT},n=e.theme;return n!==rn.LIGHT&&n!==rn.DARK&&(e.theme=rn.LIGHT),e}si(t,e){return("function"==typeof t?t:null)||e}ei(t,e,n,i){const s=this.ii(n),r=this.si(n,i),o=t=>{this.ni(e,!0),"function"==typeof r&&r(t)};return t.addEventListener("click",o),{options:s,clickFun:o}}attachSmartButton(t,e,n,i){const s=this.ei(e,m.ACTION_SWG_BUTTON_CLICK,n,i);return e.classList.add("swg-smart-button"),new on(t,e,s.options,s.clickFun).start()}}class dn{constructor(){this.ri={},this.yn={},this.oi=null}setOnEntitlementsResponse(t){this.ai(1,t)}triggerEntitlementsResponse(t){return this.li(1,t.then((t=>t.clone())))}hasEntitlementsResponsePending(){return!!this.yn[1]}setOnLoginRequest(t){this.ai(4,t)}triggerLoginRequest(t){return this.li(4,t)}setOnLinkProgress(t){this.ai(5,t)}triggerLinkProgress(){return this.li(5,!0)}resetLinkProgress(){this.ui(5)}setOnLinkComplete(t){this.ai(6,t)}triggerLinkComplete(){return this.li(6,!0)}hasLinkCompletePending(){return!!this.yn[6]}setOnPayConfirmOpened(t){this.ai(9,t)}triggerPayConfirmOpened(t){return this.li(9,t)}setOnSubscribeRequest(t){this.ai(2,t)}triggerSubscribeRequest(){return this.li(2,!0)}hasSubscribeRequestCallback(){return!!this.ri[2]}setOnOffersFlowRequest(t){this.ai(10,t)}triggerOffersFlowRequest(){return this.li(10,!0)}hasOffersFlowRequestCallback(){return!!this.ri[10]}setOnSubscribeResponse(t){Z("[swg.js:setOnSubscribeResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'"),this.ai(3,t)}setOnContributionResponse(t){Z("[swg.js:setOnContributionResponse]: This method has been deprecated, please switch usages to 'setOnPaymentResponse'"),this.ai(3,t)}setOnPaymentResponse(t){this.ai(3,t)}triggerPaymentResponse(t){return this.oi=t.then((t=>{this.li(3,Promise.resolve(t.clone()))}),(t=>{if(!u(t))throw t})),!!this.ri[3]}hasPaymentResponsePending(){return!!this.yn[3]}setOnFlowStarted(t){this.ai(7,t)}triggerFlowStarted(t,e={}){return this.li(7,{flow:t,data:e})}setOnFlowCanceled(t){this.ai(8,t)}triggerFlowCanceled(t,e={}){return this.li(8,{flow:t,data:e})}ai(t,e){this.ri[t]&&Z("[swg.js]: You have registered multiple callbacks for the same response."),this.ri[t]=e,t in this.yn&&this.ci(t,e,this.yn[t])}li(t,e){this.yn[t]=e;const n=this.ri[t];return n&&this.ci(t,n,e),!!n}ui(t){t in this.yn&&delete this.yn[t]}async ci(t,e,n){await 0,e(n),this.ui(t)}}class pn{constructor(t,e){this.displayName=t,this.avatarUrl=e}}class gn{constructor({displayDelaySeconds:t,numImpressionsBetweenPrompts:e,dismissalBackOffSeconds:n,maxDismissalsPerWeek:i,maxDismissalsResultingHideSeconds:s,impressionBackOffSeconds:r,maxImpressions:o,maxImpressionsResultingHideSeconds:a,globalFrequencyCapDurationSeconds:h,globalFrequencyCapDurationNano:l,promptFrequencyCaps:u,anyPromptFrequencyCapDurationSeconds:c,anyPromptFrequencyCapDurationNano:d}){this.clientDisplayTrigger=new mn(t,e),this.explicitDismissalConfig=new fn(n,i,s),this.impressionConfig=new wn(r,o,a),this.frequencyCapConfig=new En(new bn(new yn(h,l)),null==u?void 0:u.map((t=>{var e,n;return new Tn(t.audienceActionType,new yn(null==(e=t.frequencyCapDuration)?void 0:e.seconds,null==(n=t.frequencyCapDuration)?void 0:n.nano))})),new In(new yn(c,d)))}}class mn{constructor(t,e){this.displayDelaySeconds=t,this.numImpressionsBetweenPrompts=e}}class fn{constructor(t,e,n){this.backOffSeconds=t,this.maxDismissalsPerWeek=e,this.maxDismissalsResultingHideSeconds=n}}class wn{constructor(t,e,n){this.backOffSeconds=t,this.maxImpressions=e,this.maxImpressionsResultingHideSeconds=n}}class En{constructor(t,e,n){this.globalFrequencyCap=t,this.promptFrequencyCaps=e,this.anyPromptFrequencyCap=n}}class bn{constructor(t){this.frequencyCapDuration=t}}class Tn{constructor(t,e){this.audienceActionType=t,this.frequencyCapDuration=e}}class In{constructor(t){this.frequencyCapDuration=t}}class yn{constructor(t,e){this.seconds=t,this.nanos=e}}class Sn{constructor({attributionParams:t,autoPromptConfig:e,paySwgVersion:n,uiPredicates:i,useUpdatedOfferFlows:s,skipAccountCreationScreen:r}){this.autoPromptConfig=e,this.paySwgVersion=n,this.useUpdatedOfferFlows=s||!1,this.skipAccountCreationScreen=r||!1,this.uiPredicates=i,this.attributionParams=t}}class On{constructor(t,e,n){this.canDisplayAutoPrompt=t,this.canDisplayButton=e,this.purchaseUnavailableRegion=n}}class Nn{constructor(t,e,n,i={}){this.oe=t,this.di=e,this.pi=n,this.gi=i,this.mi=null}fetchClientConfig(t){if(!this.di)throw new Error("fetchClientConfig requires publicationId");return this.mi||(t=t||Promise.resolve(),this.mi=t.then((()=>this._i()))),this.mi}getClientConfig(){return this.mi||this.fi()}async fi(){return new Sn({paySwgVersion:this.oe.config().paySwgVersion,skipAccountCreationScreen:this.gi.skipAccountCreationScreen,useUpdatedOfferFlows:!!this.oe.config().paySwgVersion||void 0})}async getAutoPromptConfig(){this.mi||this.fetchClientConfig();const t=await this.mi;return null==t?void 0:t.autoPromptConfig}getLanguage(){return this.gi.lang||"en"}getTheme(){const t=self.matchMedia("(prefers-color-scheme: dark)").matches?J.DARK:J.LIGHT;return this.gi.theme||t}shouldAllowScroll(){return!!this.gi.allowScroll}shouldForceLangInIframes(){return!!this.gi.forceLangInIframes&&!!this.gi.lang}async shouldEnableButton(){var t;if(this.gi.disableButton)return Promise.resolve(!1);this.mi||this.fetchClientConfig();const e=await this.mi;return null==(t=null==e?void 0:e.uiPredicates)?void 0:t.canDisplayButton}async _i(){const t=await this.oe.entitlementsManager().getArticle();if(t)return this.wi(t.clientConfig);const e=kt("/publication/"+encodeURIComponent(this.di)+"/clientconfiguration"),n=await this.pi.fetchCredentialedJson(e);return this.wi(n)}wi(t){var e,n,i,s,r,o,a,h,l,u,c,d,p,g,m,_,f,w,E,b;const T=t.autoPromptConfig;let I;T&&(I=new gn({displayDelaySeconds:null==(e=T.clientDisplayTrigger)?void 0:e.displayDelaySeconds,dismissalBackOffSeconds:null==(n=T.explicitDismissalConfig)?void 0:n.backOffSeconds,maxDismissalsPerWeek:null==(i=T.explicitDismissalConfig)?void 0:i.maxDismissalsPerWeek,maxDismissalsResultingHideSeconds:null==(s=T.explicitDismissalConfig)?void 0:s.maxDismissalsResultingHideSeconds,impressionBackOffSeconds:null==(r=T.impressionConfig)?void 0:r.backOffSeconds,maxImpressions:null==(o=T.impressionConfig)?void 0:o.maxImpressions,maxImpressionsResultingHideSeconds:null==(a=T.impressionConfig)?void 0:a.maxImpressionsResultingHideSeconds,globalFrequencyCapDurationSeconds:null==(u=null==(l=null==(h=T.frequencyCapConfig)?void 0:h.globalFrequencyCap)?void 0:l.frequencyCapDuration)?void 0:u.seconds,globalFrequencyCapDurationNano:null==(p=null==(d=null==(c=T.frequencyCapConfig)?void 0:c.globalFrequencyCap)?void 0:d.frequencyCapDuration)?void 0:p.nano,promptFrequencyCaps:null==(g=T.frequencyCapConfig)?void 0:g.promptFrequencyCaps,anyPromptFrequencyCapDurationSeconds:null==(f=null==(_=null==(m=T.frequencyCapConfig)?void 0:m.anyPromptFrequencyCap)?void 0:_.frequencyCapDuration)?void 0:f.seconds,anyPromptFrequencyCapDurationNano:null==(b=null==(E=null==(w=T.frequencyCapConfig)?void 0:w.anyPromptFrequencyCap)?void 0:E.frequencyCapDuration)?void 0:b.nano}));const y=t.uiPredicates;let S;y&&(S=new On(y.canDisplayAutoPrompt,y.canDisplayButton,y.purchaseUnavailableRegion));const O=t.attributionParams;let N;O&&(N=new pn(O.displayName,O.avatarUrl));const C=this.oe.config().paySwgVersion||t.paySwgVersion,R=!!this.oe.config().paySwgVersion||t.useUpdatedOfferFlows;return new Sn({autoPromptConfig:I,paySwgVersion:C,useUpdatedOfferFlows:R,skipAccountCreationScreen:this.gi.skipAccountCreationScreen,uiPredicates:S,attributionParams:N})}}class Cn{constructor(t,e){var n,i,s,r;this.oe=t,this.ve=e,this.t=t.win(),this.ge=t.clientConfigManager(),this.o=t.activities(),this.we=t.dialogManager(),this.be=null==(i=null==(n=this.ve)?void 0:n.isClosable)||i,this.Se=this.Ei(),this.g=void 0===(null==(s=this.ve)?void 0:s.shouldAnimateFade)||(null==(r=this.ve)?void 0:r.shouldAnimateFade)}async Ei(){var t,e;const n=await this.ge.getClientConfig();return new g(this.t,this.o,this.Ne(n,this.oe.pageConfig()),Gt({productId:this.oe.pageConfig().getProductId(),publicationId:this.oe.pageConfig().getPublicationId(),productType:$.UI_CONTRIBUTION,list:(null==(t=this.ve)?void 0:t.list)||"default",skus:(null==(e=this.ve)?void 0:e.skus)||null,isClosable:this.be,supportsEventManager:!0}),!0,!1,this.g)}Ce(t){t.getSubscriberOrMember()&&this.oe.callbacks().triggerLoginRequest({linkRequested:!!t.getLinkRequested()})}Te(t){const e=t.getSku(),n=t.getOneTime();if(e){const t={skuId:e};n&&(t.oneTime=n),new zt(this.oe,t,$.UI_CONTRIBUTION).start()}}async start(){const t=await this.Se;this.oe.callbacks().triggerFlowStarted(K.SHOW_CONTRIBUTION_OPTIONS),t.onCancel((()=>{this.oe.callbacks().triggerFlowCanceled(K.SHOW_CONTRIBUTION_OPTIONS)})),t.on(b,this.Ce.bind(this)),t.on(L,this.Te.bind(this));const e=await this.ge.getClientConfig();return this.we.openView(t,!1,this.Ae(e,this.ge.shouldAllowScroll()))}Ae(t,e){return t.useUpdatedOfferFlows&&!e?{shouldDisableBodyScrolling:!0,closeOnBackgroundClick:this.be}:{}}Ne(t,e){return t.useUpdatedOfferFlows?this.ge.shouldForceLangInIframes()?Ut("/contributionoffersiframe",{hl:this.ge.getLanguage(),publicationId:e.getPublicationId()}):Ut("/contributionoffersiframe",{publicationId:e.getPublicationId()}):Ut("/contributionsiframe")}async showNoEntitlementFoundToast(){(await this.Se).execute(new R)}}const Rn=String.raw,An=Rn(_a||(_a=__template(["\n body {\n padding: 0;\n margin: 0;\n }\n\n swg-container,\n swg-loading,\n swg-loading-animate,\n swg-loading-image {\n display: block;\n }\n\n swg-loading-container {\n width: 100% !important;\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n min-height: 148px !important;\n height: 100% !important;\n bottom: 0 !important;\n margin-top: 5px !important;\n z-index: 2147483647 !important;\n }\n\n /**\n * Since the desktop view has the parent iframe (.swg-dialog) transparent,\n * this style adds the background with borders to the loading indicator.\n */\n @media (min-width: 630px), (min-height: 630px) {\n swg-loading-container {\n width: 560px !important;\n margin-left: auto !important;\n margin-right: auto !important;\n border-top-left-radius: 8px !important;\n border-top-right-radius: 8px !important;\n background-color: rgba(255, 255, 255, 1) !important;\n box-shadow: rgba(60, 64, 67, 0.3) 0 1px 1px,\n rgba(60, 64, 67, 0.15) 0 1px 4px 1px !important;\n }\n\n swg-loading-container.centered-on-desktop {\n height: 120px !important;\n min-height: 120px !important;\n border-radius: 8px !important;\n }\n }\n\n swg-loading {\n z-index: 2147483647 !important;\n width: 36px;\n height: 36px;\n overflow: hidden;\n animation: mspin-rotate 1568.63ms infinite linear;\n }\n\n swg-loading-animate {\n animation: mspin-revrot 5332ms infinite steps(4);\n }\n\n swg-loading-image {\n background-image: url('","/loader.svg');\n background-size: 100%;\n width: 11664px;\n height: 36px;\n animation: swg-loading-film 5332ms infinite steps(324);\n }\n\n @keyframes swg-loading-film {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(-11664px);\n }\n }\n\n @keyframes mspin-rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n @keyframes mspin-revrot {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(-360deg);\n }\n }\n"])),i),vn=Rn(_b||(_b=__template(["\n /** Common styles across all window sizes. */\n .swg-dialog,\n .swg-toast {\n box-sizing: border-box;\n background-color: rgba(255, 255, 255, 1) !important;\n }\n\n .swg-toast {\n position: fixed !important;\n bottom: 0 !important;\n max-height: 46px !important;\n z-index: 2147483647 !important;\n border: none !important;\n }\n\n /**\n * Wide desktop screen support, when width is >= 871px and height is >= 641px.\n */\n @media (min-width: 871px) and (min-height: 641px) {\n .swg-dialog.swg-wide-dialog {\n width: 870px !important;\n left: -435px !important;\n }\n }\n\n /** Tablet/Medium screen support, when width OR height is <= 640px. */\n @media (max-width: 640px), (max-height: 640px) {\n .swg-dialog,\n .swg-toast {\n width: 480px !important;\n left: -240px !important;\n margin-inline-start: calc(100vw - 100vw / 2) !important;\n border-top-left-radius: 8px !important;\n border-top-right-radius: 8px !important;\n box-shadow: rgba(60, 64, 67, 0.3) 0 1px 1px,\n rgba(60, 64, 67, 0.15) 0 1px 4px 1px !important;\n }\n\n [dir='rtl'] .swg-dialog,\n [dir='rtl'] .swg-toast {\n margin-inline-start: calc(100vw - 100vw / 2 - 240px) !important;\n }\n }\n\n /** Desktop/Large screen support, when width AND height are >= 641px. */\n @media (min-width: 641px) and (min-height: 641px) {\n .swg-dialog {\n width: 630px !important;\n left: -315px !important;\n margin-inline-start: calc(100vw - 100vw / 2) !important;\n background-color: transparent !important;\n border: none !important;\n }\n\n [dir='rtl'] .swg-dialog {\n margin-inline-start: calc(100vw - 100vw / 2 - 315px) !important;\n }\n\n .swg-toast {\n border-radius: 4px !important;\n bottom: 8px !important;\n box-shadow: 0 3px 1px -2px rgb(0 0 0 / 20%), 0 2px 2px 0 rgb(0 0 0 / 14%),\n 0 1px 5px 0 rgb(0 0 0 / 12%) !important;\n left: 8px !important;\n }\n }\n\n /** Phone/Small screen support, when width is <= 480px. */\n @media (max-width: 480px) {\n .swg-dialog,\n .swg-toast {\n width: 100% !important;\n left: 0 !important;\n right: 0 !important;\n margin-inline-start: 0 !important;\n }\n }\n\n /**\n * Class applied to content page to disable scrolling.\n */\n html > body.swg-disable-scroll,\n html > body.swg-disable-scroll * {\n overflow: hidden !important;\n }\n"])));class Pn{constructor(t,e,n,i){this.entitlements=t,this.userData=e,this.purchaseDataList=n,this.re=i,this.purchaseData=n[0]}clone(){return new Pn(this.entitlements,this.userData,this.purchaseDataList,this.re)}json(){return{entitlements:this.entitlements.json(),userData:this.userData.json(),purchaseDataList:this.purchaseDataList.map((t=>t.json())),purchaseData:this.purchaseData.json()}}complete(){return this.re()}}class xn{constructor(t,e){this.oe=t,this._e=null,this.openPromise=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this.ve=Object.assign({entitlements:null,consent:!0},e||{})}async start(){const t=this.ve.entitlements;if(!t||!t.getEntitlementForSource("google"))throw new Error('No entitlements with "google" source');this.oe.callbacks().triggerFlowStarted(K.COMPLETE_DEFERRED_ACCOUNT_CREATION),this._e=new g(this.t,this.o,Ut("/recoveriframe"),Gt({publicationId:this.oe.pageConfig().getPublicationId(),productId:this.oe.pageConfig().getProductId(),entitlements:t.raw||null,consent:this.ve.consent}),!0),this.openPromise=this.we.openView(this._e);try{const t=await this._e.acceptResult();return this.bi(t.data)}catch(e){throw u(e)?this.oe.callbacks().triggerFlowCanceled(K.COMPLETE_DEFERRED_ACCOUNT_CREATION):this.we.completeView(this._e),e}}bi(t){this.oe.entitlementsManager().blockNextNotification();const e=t.entitlements,n=t.idToken,i=t.productType,s=this.oe.entitlementsManager().parseEntitlements({signedEntitlements:e}),r=new Tt(n,(new ut).decode(n)),o=t.purchaseDataList?t.purchaseDataList.map((t=>new dt(t.data,t.signature))):[new dt(t.purchaseData.data,t.purchaseData.signature)],a=new Wt(this.oe),h=a.complete.bind(a),l=new Pn(s,r,o,h);this.oe.eventManager().logSwgEvent(m.ACTION_NEW_DEFERRED_ACCOUNT,!0);const u=Promise.resolve.bind(Promise);return a.start(new ct("",o[0],r,s,i,u)),l}}function Ln(t){const e=function(t){return t.readyState}(t);return"loading"!==e&&"uninitialized"!==e}class Mn{constructor(t){const e="document"in t;this.t=e?t:t.defaultView,this._=e?t.document:t}getWin(){return this.t}getRootNode(){return this._}getRootElement(){return this._.documentElement}getHead(){return this._.head}getBody(){return this._.body}isReady(){return Ln(this._)}async whenReady(){var t;await(t=this._,new Promise((e=>{!function(t,e){!function(t,e,n){if(e(t))return void n(t);let i=!1;const s=()=>{e(t)&&!i&&(n(t),i=!0,t.removeEventListener("readystatechange",s))};t.addEventListener("readystatechange",s)}(t,Ln,e)}(t,e)})))}}function kn(t){return"nodeType"in t||"document"in t?new Mn(t):t}const Dn={frameborder:"0",scrolling:"no",src:"about:blank"};class Un{constructor(t,e){const n=Object.assign({},Dn,e);this.T=o(t,"iframe",n),xe(this.T,Pe),this.Ti=new Promise((t=>{this.T.onload=()=>{t()}}))}whenReady(){return this.Ti}getElement(){return this.T}getDocument(){var t;const e=this.getElement().contentDocument||(null==(t=this.getElement().contentWindow)?void 0:t.document);if(!e)throw new Error("not loaded");return e}getBody(){return this.getDocument().body}isConnected(){return this.getElement().isConnected}}async function Gn(t,e,n,i){const s=t.ownerDocument.defaultView,r=t.style.transition||"";await new Promise((r=>{s.setTimeout((()=>{s.setTimeout(r,n);const o="".concat(n,"ms ").concat(i);xe(t,Object.assign({transition:"transform ".concat(o,", opacity ").concat(o)},e))}))})),xe(t,{transition:r})}let jn=class{constructor(t,e){this._=t,this.Ii=this._.getWin().document.createElement("swg-popup-background"),this.Ii.setAttribute("role","button"),xe(this.Ii,{"z-index":e.toString(),display:"none",position:"fixed",top:"0",right:"0",bottom:"0",left:"0","background-color":"rgba(32, 33, 36, .6)"})}getElement(){return this.Ii}isAttached(){return!!this.Ii.parentNode}attach(){var t;null==(t=this._.getBody())||t.appendChild(this.Ii)}destroy(){var t;null==(t=this._.getBody())||t.removeChild(this.Ii)}show(t){if(xe(this.Ii,{display:"block",opacity:t?"0":"1"}),t)return Gn(this.Ii,{opacity:"1"},300,"ease-out")}async hide(t=!0){t&&await Gn(this.Ii,{opacity:"0"},300,"ease-out"),xe(this.Ii,{display:"none"})}};class Fn{constructor(t,e={}){if(this._=t,this.yi=o(this._,"swg-loading-container",{}),e.additionalClasses)for(const n of e.additionalClasses)this.yi.classList.add(n);this.Si=o(this._,"swg-loading",{}),this.yi.appendChild(this.Si),this.yi.style.setProperty("display","none","important"),this.Oi()}getElement(){return this.yi}show(){this.yi.style.removeProperty("display")}hide(){this.yi.style.setProperty("display","none","important")}Oi(){const t=this.Si,e=o(this._,"swg-loading-animate",{});t.appendChild(e);const n=o(this._,"swg-loading-image",{});e.appendChild(n)}}const zn=2147483647,Bn={"min-height":"50px",border:"none",display:"block",position:"fixed","z-index":zn,"box-sizing":"border-box"},Wn={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"};class Vn{constructor(t,e={},n={},i={},s=!1){this._=t;const r=i.desktopConfig||{},o=!!r.supportsWideScreen,a="swg-dialog ".concat(o?"swg-wide-dialog":""),h=i.iframeCssClassOverride||a;this.T=new Un(t.getWin().document,{class:h}),this.Ni=new jn(t,zn-1),this.Ci=i.closeOnBackgroundClick,this.Ri=s;const l=Object.assign({},Bn,e);xe(this.T.getElement(),l),function(t,e){for(const[n,i]of Object.entries(e))Le(t,n,i)}(this.T.getElement(),n),this.Ai=null,this.vi=null,this.Pi=null,this.xi=null,this.Li=0,this.Mi=!1,this.ki=null,this.Di=void 0!==i.maxAllowedHeightRatio?i.maxAllowedHeightRatio:.9,this.Ui=!!r.isCenterPositioned,this.Gi=!!i.shouldDisableBodyScrolling,this.ji=this._.getWin().matchMedia("(min-width: 641px)"),this.Fi=null}async open(t=!1){var e;this.Ri&&void 0!==this.Ci&&this.Ni.getElement().addEventListener("click",this.zi.bind(this));const n=this.T;if(n.isConnected())throw new Error("already opened");return null==(e=this._.getBody())||e.appendChild(n.getElement()),this.Ni.attach(),t?(xe(n.getElement(),{visibility:"hidden",opacity:"0"}),this.Mi=t):this.Bi(),await n.whenReady(),this.Wi(),this}Wi(){const t=this.T.getBody(),e=this.T.getDocument();h(kn(e),An);const n=[];this.isPositionCenterOnDesktop()&&n.push("centered-on-desktop"),this.Ai=new Fn(e,{additionalClasses:n}),t.appendChild(this.Ai.getElement()),this.vi=o(e,"swg-container",{}),t.appendChild(this.vi),this.Vi(),this.Ui&&(this.Fi=()=>{this.Vi()},this.ji.addListener(this.Fi))}async close(t=!0){var e,n;let i;if(t){const t=this.Yi()?{opacity:"0"}:{transform:"translateY(100%)"};i=this.Ki((()=>(this.Ni.hide(!0),Gn(this.getElement(),t,300,"ease-out"))))}else i=Promise.resolve();null==(e=this._.getBody())||e.classList.remove("swg-disable-scroll"),await i;const s=this.T.getElement();null==(n=s.parentNode)||n.removeChild(s),this.qi(),this.Ni.destroy(),this.Fi&&this.ji.removeListener(this.Fi)}getContainer(){if(!this.vi)throw new Error("not opened yet");return this.vi}getIframe(){return this.T}getElement(){return this.T.getElement()}getLoadingView(){return this.Ai}getMaxAllowedHeightRatio(){return this.Di}isPositionCenterOnDesktop(){return this.Ui}Hi(){var t;this.Pi&&this.Pi.hasLoadingIndicator()?this.ki=this.Pi:(this.getContainer().textContent="",null==(t=this.Ai)||t.show())}$i(){var t;this.ki?(a(this.ki.getElement()),this.ki=null):null==(t=this.Ai)||t.hide()}getCurrentView(){return this.Pi}async openView(t){var e;xe(t.getElement(),Wn),this.Hi(),this.Pi=t,this.getContainer().appendChild(t.getElement()),this.Gi&&(null==(e=this._.getBody())||e.classList.add("swg-disable-scroll")),t.shouldFadeBody()&&!this.Mi&&this.Ni.show(t.shouldAnimateFade()),await t.init(this),xe(t.getElement(),{opacity:"1"}),this.Mi&&(t.shouldFadeBody()&&this.Ni.show(t.shouldAnimateFade()),this.Bi()),this.$i()}Bi(){this.Ki((async()=>{xe(this.getElement(),{transform:"translateY(100%)",opactiy:"1",visibility:"visible"}),await Gn(this.getElement(),{transform:this.Ji(),opacity:"1",visibility:"visible"},300,"ease-out"),this.getElement().focus()})),this.Mi=!1}zi(t){if(t.stopPropagation(),this.Ci){const t=this.Pi.getElement(),e=t.contentWindow;if(e){const n=t.src?new URL(t.src).origin:"*";e.postMessage("close",n)}}return!1}async resizeView(t,e,n=!0){if(this.Pi!=t)return null;const i=this.Qi(e),s=++this.Li,r=()=>s!==this.Li;let o;if(n){const t=this.getElement().offsetHeight;o=i>=t?this.Ki((()=>{if(r())return Promise.resolve();const e={height:"".concat(i,"px")};return this.Yi()||(e.transform="translateY(".concat(i-t,"px)")),xe(this.getElement(),e),requestAnimationFrame((()=>{Gn(this.getElement(),{transform:this.Ji()},300,"ease-out")})),Promise.resolve()})):this.Ki((async()=>{const e=r()?Promise.resolve():Gn(this.getElement(),{transform:this.Yi()?this.Ji():"translateY(".concat(t-i,"px)")},300,"ease-out");await e,r()||xe(this.getElement(),{height:"".concat(i,"px"),transform:this.Ji()})}))}else xe(this.getElement(),{height:"".concat(i,"px")}),o=Promise.resolve();await o,r()||(this.Xi(e),t.resized())}async Ki(t){await this.xi;try{await t()}catch(e){}this.xi=null}Qi(t){return Math.min(t,this._.getWin().innerHeight*this.Di)}Xi(t){if(this.Yi())return void this.qi();const e=t+20;xe(this._.getRootElement(),{"padding-bottom":"".concat(e,"px")})}qi(){this._.getRootElement().style.removeProperty("padding-bottom")}Vi(){xe(this.getElement(),this.Zi())}Yi(){return this.Ui&&this.ji.matches}Zi(){return this.Yi()?{top:"50%",bottom:"0",transform:this.Ji()}:{top:"auto",bottom:"0",transform:this.Ji()}}Ji(){return this.Yi()?"translateY(-50%)":"translateY(0px)"}}class Yn{constructor(t){this.Ri=!1,this._=t,this.ts=null,this.ns=null,this.ss=new jn(t,2147483647),this.rs=null,this.ss.getElement().addEventListener("click",(()=>{if(this.rs)try{this.rs.focus()}catch(t){}}))}setEnableBackgroundClickExperiment(t){this.Ri=t}openDialog(t=!1,e={}){return this.ns||(this.ts=new Vn(this._,{},{},e,this.Ri),this.ns=this.ts.open(t)),this.ns}async openView(t,e=!1,n={}){return this.handleCancellations(t),(await this.openDialog(e,n)).openView(t)}async handleCancellations(t){try{await t.whenComplete()}catch(e){throw u(e)&&this.completeView(t),e}}completeView(t){setTimeout((()=>{this.ts&&this.ts.getCurrentView()===t&&this.te()}),100)}completeAll(){this.ts&&this.te(),this.ss.isAttached()&&this.ss.destroy()}getDialog(){return this.ts}te(){var t;null==(t=this.ts)||t.close(),this.ts=null,this.ns=null}popupOpened(t){this.rs=t||null,this.ss.isAttached()||this.ss.attach(),this.ss.show(!0)}popupClosed(){this.rs=null;try{this.ss.hide()}catch(t){}}}var Kn=(t=>(t.NONE="none",t.CONTRIBUTION="contribution",t.CONTRIBUTION_LARGE="contribution_large",t.SUBSCRIPTION="subscription",t.SUBSCRIPTION_LARGE="subscription_large",t))(Kn||{}),qn=(t=>(t.OPEN="OPEN",t.CLOSED="CLOSED",t))(qn||{}),Hn=(t=>(t.UNKNOWN="unknown",t.NON_SUBSCRIBER="non_subscriber",t.SUBSCRIBER="subscriber",t.PAST_SUBSCRIBER="past_subscriber",t))(Hn||{}),$n=(t=>(t.IMPRESSION_PAYWALL="paywall",t.IMPRESSION_AD="ad_shown",t.IMPRESSION_OFFERS="offers_shown",t.ACTION_SUBSCRIPTIONS_LANDING_PAGE="subscriptions_landing_page",t.ACTION_OFFER_SELECTED="offer_selected",t.ACTION_PAYMENT_FLOW_STARTED="payment_flow_start",t.ACTION_PAYMENT_COMPLETED="payment_complete",t.EVENT_CUSTOM="custom",t))($n||{});const Jn={[$n.IMPRESSION_PAYWALL]:m.IMPRESSION_PAYWALL,[$n.IMPRESSION_AD]:m.IMPRESSION_AD,[$n.IMPRESSION_OFFERS]:m.IMPRESSION_OFFERS,[$n.ACTION_SUBSCRIPTIONS_LANDING_PAGE]:m.ACTION_SUBSCRIPTIONS_LANDING_PAGE,[$n.ACTION_OFFER_SELECTED]:m.ACTION_OFFER_SELECTED,[$n.ACTION_PAYMENT_FLOW_STARTED]:m.ACTION_PAYMENT_FLOW_STARTED,[$n.ACTION_PAYMENT_COMPLETED]:m.ACTION_PAYMENT_COMPLETE,[$n.EVENT_CUSTOM]:m.EVENT_CUSTOM},Qn={[m.UNKNOWN]:null,[m.IMPRESSION_PAYWALL]:$n.IMPRESSION_PAYWALL,[m.IMPRESSION_AD]:$n.IMPRESSION_AD,[m.IMPRESSION_OFFERS]:$n.IMPRESSION_OFFERS,[m.IMPRESSION_SUBSCRIBE_BUTTON]:null,[m.IMPRESSION_SMARTBOX]:null,[m.ACTION_SUBSCRIBE]:null,[m.ACTION_PAYMENT_COMPLETE]:$n.ACTION_PAYMENT_COMPLETED,[m.ACTION_ACCOUNT_CREATED]:null,[m.ACTION_ACCOUNT_ACKNOWLEDGED]:null,[m.ACTION_SUBSCRIPTIONS_LANDING_PAGE]:$n.ACTION_SUBSCRIPTIONS_LANDING_PAGE,[m.ACTION_PAYMENT_FLOW_STARTED]:$n.ACTION_PAYMENT_FLOW_STARTED,[m.ACTION_OFFER_SELECTED]:$n.ACTION_OFFER_SELECTED,[m.EVENT_PAYMENT_FAILED]:null,[m.EVENT_CUSTOM]:$n.EVENT_CUSTOM},Xn={[Y.EVENT_SHOWCASE_METER_OFFERED]:[m.EVENT_HAS_METERING_ENTITLEMENTS,m.EVENT_OFFERED_METER],[Y.EVENT_SHOWCASE_UNLOCKED_BY_SUBSCRIPTION]:[m.EVENT_UNLOCKED_BY_SUBSCRIPTION],[Y.EVENT_SHOWCASE_UNLOCKED_BY_METER]:[m.EVENT_HAS_METERING_ENTITLEMENTS,m.EVENT_UNLOCKED_BY_METER],[Y.EVENT_SHOWCASE_UNLOCKED_FREE_PAGE]:[m.EVENT_UNLOCKED_FREE_PAGE],[Y.EVENT_SHOWCASE_NO_ENTITLEMENTS_REGWALL]:[m.EVENT_NO_ENTITLEMENTS,m.IMPRESSION_REGWALL,m.IMPRESSION_SHOWCASE_REGWALL],[Y.EVENT_SHOWCASE_NO_ENTITLEMENTS_PAYWALL]:[m.EVENT_NO_ENTITLEMENTS,m.IMPRESSION_PAYWALL],[Y.EVENT_SHOWCASE_INELIGIBLE_PAYWALL]:[m.EVENT_INELIGIBLE_PAYWALL,m.EVENT_NO_ENTITLEMENTS]},Zn={[m.IMPRESSION_REGWALL]:_.LOCKED_REGWALL,[m.EVENT_UNLOCKED_BY_METER]:_.UNLOCKED_METER,[m.EVENT_UNLOCKED_BY_SUBSCRIPTION]:_.UNLOCKED_SUBSCRIBER,[m.EVENT_UNLOCKED_FREE_PAGE]:_.UNLOCKED_FREE,[m.IMPRESSION_PAYWALL]:_.LOCKED_PAYWALL,[m.EVENT_INELIGIBLE_PAYWALL]:_.INELIGIBLE_PAYWALL};function ti(t,e,n,i){return{eventCategory:t,eventAction:e,eventLabel:n,nonInteraction:i}}const ei={[m.IMPRESSION_OFFERS]:ti("NTG paywall","paywall modal impression","",!0),[m.IMPRESSION_CONTRIBUTION_OFFERS]:ti("NTG membership","offer impressions","",!0),[m.ACTION_OFFER_SELECTED]:ti("NTG paywall","click","",!1),[m.ACTION_SWG_SUBSCRIPTION_MINI_PROMPT_CLICK]:ti("NTG subscription","marketing modal click","",!1),[m.IMPRESSION_SWG_SUBSCRIPTION_MINI_PROMPT]:ti("NTG subscription","marketing modal impression","",!0),[m.ACTION_SWG_CONTRIBUTION_MINI_PROMPT_CLICK]:ti("NTG membership","marketing modal click","",!1),[m.IMPRESSION_SWG_CONTRIBUTION_MINI_PROMPT]:ti("NTG membership","membership modal impression","",!0),[m.IMPRESSION_NEWSLETTER_OPT_IN]:ti("NTG newsletter","newsletter modal impression","",!0),[m.EVENT_NEWSLETTER_OPTED_IN]:ti("NTG newsletter","newsletter signup","success",!1),[m.IMPRESSION_BYOP_NEWSLETTER_OPT_IN]:ti("NTG newsletter","newsletter modal impression","",!0),[m.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT]:ti("NTG newsletter","newsletter signup","success",!1),[m.IMPRESSION_REGWALL_OPT_IN]:ti("NTG account","registration modal impression","",!0),[m.EVENT_REGWALL_OPTED_IN]:ti("NTG account","registration","success",!1),[m.ACTION_SURVEY_DATA_TRANSFER]:ti("","survey submission","",!1),[m.IMPRESSION_BYO_CTA]:ti("","custom cta modal impression","",!0),[m.ACTION_BYO_CTA_BUTTON_CLICK]:ti("","custom cta click","",!1)},ni={[m.ACTION_PAYMENT_COMPLETE]:ti("NTG subscription","submit","success",!1)},ii={[m.ACTION_PAYMENT_COMPLETE]:ti("NTG membership","submit","success",!1)};function si(t){return Jn[t]}class ri{constructor(t){this.oe=t,this.pe=t.eventManager()}start(){this.pe.registerEventListener(this.Bn.bind(this))}Bn(t,e){var n,i,s;const r=ri.isGaEligible(this.oe),o=ri.isGtagEligible(this.oe),a=ri.isGtmEligible(this.oe);if(!(r||o||a))return;const{ga:h,gtag:l,dataLayer:u}=this.oe.win(),c=(null==(n=t.additionalParameters)?void 0:n.subscriptionFlow)||(null==(s=null==(i=t.additionalParameters)?void 0:i.getSubscriptionFlow)?void 0:s.call(i))||"";let d=function(t,e){if(!t)return;let n;return e===K.SUBSCRIBE?n=ni[t]:e===K.CONTRIBUTE&&(n=ii[t]),n||ei[t]}(t.eventType,c);if(!d)return;const p=(null==e?void 0:e.googleAnalyticsParameters)||{};if(d={...d,eventCategory:p.event_category||d.eventCategory,eventLabel:p.event_label||d.eventLabel},r&&h("send","event",d),o){const t={event_category:d.eventCategory,event_label:d.eventLabel,non_interaction:d.nonInteraction,...p};l("event",d.eventAction,t)}a&&u.push({event:d.eventAction,event_category:d.eventCategory,event_label:d.eventLabel,non_interaction:d.nonInteraction,configurationId:t.configurationId||"",...p})}static isGaEligible(t){return be(t.win().ga)}static isGtagEligible(t){return be(t.win().gtag)}static isGtmEligible(t){var e;return be(null==(e=t.win().dataLayer)?void 0:e.push)}}const oi={height:"0"},ai={frameborder:"0",scrolling:"no",class:"swg-toast"};class hi{constructor(t,e,n={}){this.h=e,this.l=n,this.xi=null,this._=t.doc(),this.o=t.activities(),this.T=o(this._.getWin().document,"iframe",ai),xe(this.T,oi)}getElement(){return this.T}open(){var t;return null==(t=this._.getBody())||t.appendChild(this.T),this.os()}async os(){const t=await this.o.openIframe(this.T,this.h,this.l);await t.whenReady(),function(t,e){for(const n of["height"])Le(t,n,"")}(this.T),this.xi=this.Ki({callback:()=>(xe(this.T,{transform:"translateY(100%)",opacity:"1",visibility:"visible"}),Gn(this.T,{transform:"translateY(0)",opacity:"1",visibility:"visible"},400,"ease-out"))}),this._.getWin().setTimeout((()=>{this.close()}),8e3)}async Ki({callback:t}){await this.xi;try{await t()}catch(e){}}close(){return this.xi=this.Ki({callback:()=>(this._.getWin().setTimeout((()=>{var t;null==(t=this._.getBody())||t.removeChild(this.T)}),500),Gn(this.T,{transform:"translateY(100%)",opacity:"1",visibility:"visible"},400,"ease-out"))}),this.xi}}const li={TYPE_REGISTRATION_WALL:"/regwalliframe",TYPE_NEWSLETTER_SIGNUP:"/newsletteriframe",TYPE_REWARDED_SURVEY:"/surveyiframe",TYPE_BYO_CTA:"/byoctaiframe"},ui={[Kn.SUBSCRIPTION]:$.SUBSCRIPTION,[Kn.SUBSCRIPTION_LARGE]:$.SUBSCRIPTION,[Kn.CONTRIBUTION]:$.UI_CONTRIBUTION,[Kn.CONTRIBUTION_LARGE]:$.UI_CONTRIBUTION},ci=$.SUBSCRIPTION,di=/<ph name="EMAIL".+?\/ph>/g;class pi{constructor(t,e){this.oe=t,this.rt=e,this.he=e.autoPromptType?ui[e.autoPromptType]:ci,this.we=t.dialogManager(),this.hs=t.entitlementsManager(),this.ge=t.clientConfigManager(),this.ls=t.storage();const n={origin:St(t.win().location.href).origin,configurationId:this.rt.configurationId||"",isClosable:(!!e.isClosable).toString(),calledManually:e.calledManually.toString(),previewEnabled:(!!e.shouldRenderPreview).toString()};this.ge.shouldForceLangInIframes()&&(n.hl=this.ge.getLanguage()),this._e=new g(t.win(),t.activities(),Ut(li[e.action],n),Gt({supportsEventManager:!0,productType:this.he,windowHeight:t.win().innerHeight}),!0),e.shouldRenderPreview&&"TYPE_BYO_CTA"!==e.action&&xe(this._e.getElement(),{"pointer-events":"none"})}start(){this._e.on(S,(t=>this.us(t))),this._e.on(G,(t=>this.ds(t))),this._e.on(b,this.Ce.bind(this));const{onCancel:t}=this.rt;return t&&this._e.onCancel(t),this.we.openView(this._e,!1,{shouldDisableBodyScrolling:!0,closeOnBackgroundClick:!!this.rt.isClosable})}us(t){var e;const{onResult:n,configurationId:i}=this.rt;this.we.completeView(this._e),this.hs.clear();const s=t.getSwgUserToken();s&&this.oe.storage().set(pt,s,!0),this.isOptIn(this.rt.action)&&n&&n({configurationId:i,data:{email:t.getUserEmail(),displayName:t.getDisplayName(),givenName:t.getGivenName(),familyName:t.getFamilyName()}}),this.rt.suppressToast||(t.getActionCompleted()?this.ps(null!=(e=t.getUserEmail())?e:""):t.getAlreadyCompleted()?this.gs():this._s());const r=Date.now().toString();this.oe.storage().set(gt,r,!1),this.hs.getEntitlements()}ps(t){const e=this.ge.getLanguage();let n="";switch(this.rt.action){case"TYPE_REGISTRATION_WALL":n=hn(Ke,e).replace(di,t);break;case"TYPE_NEWSLETTER_SIGNUP":n=hn(qe,e).replace(di,t);break;default:return}new hi(this.oe,Ut("/toastiframe",{flavor:"custom",customText:n})).open()}isOptIn(t){return"TYPE_NEWSLETTER_SIGNUP"===t||"TYPE_REGISTRATION_WALL"===t}gs(){let t;switch(this.rt.action){case"TYPE_REGISTRATION_WALL":t={flavor:"basic"};break;case"TYPE_NEWSLETTER_SIGNUP":const e=this.ge.getLanguage();t={flavor:"custom",customText:hn(We,e)};break;default:return}new hi(this.oe,Ut("/toastiframe",t)).open()}_s(){const t=this.ge.getLanguage();let e="";switch(this.rt.action){case"TYPE_REGISTRATION_WALL":e=hn(Ve,t);break;case"TYPE_NEWSLETTER_SIGNUP":e=hn(Ye,t);break;default:return}new hi(this.oe,Ut("/toastiframe",{flavor:"custom",customText:e})).open()}Ce(t){t.getSubscriberOrMember()&&this.oe.callbacks().triggerLoginRequest({linkRequested:!1})}async ds(t){const e=await this.attemptSurveyDataTransfer(t);e?this.oe.eventManager().logSwgEvent(m.EVENT_SURVEY_DATA_TRANSFER_COMPLETE,!0):this.oe.eventManager().logSwgEvent(m.EVENT_SURVEY_DATA_TRANSFER_FAILED,!1);const n=new j;t.getStorePpsInLocalStorage()&&await this.storePpsValuesFromSurveyAnswers(t),n.setSuccess(e),this._e.execute(n)}async attemptSurveyDataTransfer(t){const{onResult:e}=this.rt;if(e)try{return await e({configurationId:this.rt.configurationId,data:t})}catch(n){return Z("[swg.js] Exception in publisher provided logging callback: ".concat(n)),!1}return this.logSurveyDataToGoogleAnalytics(t)}async storePpsValuesFromSurveyAnswers(t){var e,n;const i=bt.PPS_TAXONOMIES,s=t.getSurveyQuestionsList().flatMap((t=>t.getSurveyAnswersList())).map((t=>null==t?void 0:t.getPpsValue())).filter((t=>null!==t)),r=await this.ls.get(i,!0);let o=[];try{const t=null==(n=null==(e=JSON.parse(r))?void 0:e[1])?void 0:n.values;o=Array.isArray(t)?t:[]}catch(h){}const a={[1]:{values:Array.from(new Set(s.concat(o)))}};await Promise.resolve(this.ls.set(i,JSON.stringify(a),!0))}logSurveyDataToGoogleAnalytics(t){var e;return!!(ri.isGaEligible(this.oe)||ri.isGtagEligible(this.oe)||ri.isGtmEligible(this.oe))&&(null==(e=t.getSurveyQuestionsList())||e.map((t=>{const e=t.getSurveyAnswersList()[0],n={eventType:m.ACTION_SURVEY_DATA_TRANSFER,eventOriginator:w.SWG_CLIENT,isFromUserAction:!0,additionalParameters:null},i={googleAnalyticsParameters:{survey_question:t.getQuestionText()||"",survey_question_category:t.getQuestionCategory()||"",survey_answer:e.getAnswerText()||"",survey_answer_category:e.getAnswerCategory()||"",content_id:t.getQuestionCategory()||"",content_group:t.getQuestionText()||"",content_type:e.getAnswerText()||"",event_category:t.getQuestionCategory()||"",event_label:e.getAnswerText()||""}};this.oe.eventManager().logEvent(n,i)})),!0)}showNoEntitlementFoundToast(){this._e.execute(new R)}}const gi=String.raw,mi=String.raw,fi=mi(_c||(_c=__template(["\n @keyframes slideUp {\n from {\n transform: translate(0, 200px);\n }\n to {\n transform: translate(0, 0);\n }\n }\n"]))),wi=mi(_d||(_d=__template(["\n .exit-container {\n width: 100%;\n display: flex;\n flex-direction: row-reverse;\n }\n"]))),Ei=mi(_e||(_e=__template(["\n .back-to-home-button {\n border-radius: 4px;\n text-decoration: none;\n font-size: 14px;\n color: #1a73e8;\n padding: 17px;\n outline-offset: 4px;\n outline-color: #145ab5;\n }\n\n .back-to-home-button:focus,\n .back-to-home-button:hover {\n background-color: #f2f8ff;\n }\n"]))),bi=gi(_f||(_f=__template(['\n <a class="back-to-home-button" href="$BACK_TO_HOME_LINK$">\n $BACK_TO_HOME_TEXT$\n </a>\n']))),Ti=mi(_g||(_g=__template(["\n ","\n\n .rewarded-ad-prompt {\n animation: 0.5s slideUp;\n margin-left: auto !important;\n margin-right: auto !important;\n margin-top: auto !important;\n border-top-left-radius: 20px !important;\n border-top-right-radius: 20px !important;\n pointer-events: auto !important;\n background: white !important;\n max-height: 90%;\n overflow: auto;\n outline: none;\n font-family: 'Google Sans', 'Roboto-Regular', sans-serif, arial;\n width: 100%;\n }\n\n @media (min-width: 450px) {\n .rewarded-ad-prompt {\n width: 375px !important;\n }\n }\n"])),fi),Ii=mi(_h||(_h=__template(["\n button {\n background: none;\n color: inherit;\n border: none;\n padding: 0;\n font: inherit;\n cursor: pointer;\n outline-offset: 4px; // 0.25rem;\n outline-color: #145ab5;\n }\n"]))),yi=mi(_i||(_i=__template(["\n .rewarded-ad-close-button {\n margin: 8px 8px 0px 0px;\n padding: 12px;\n height: 48px;\n width: 48px;\n grid-column: 3;\n grid-row: 1;\n border-radius: 4px;\n }\n .rewarded-ad-close-img {\n border-radius: 20px;\n height: 24px;\n width: 24px;\n background: #5f6368;\n -webkit-mask: url(https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/close/default/24px.svg)\n center/contain no-repeat;\n }\n\n .rewarded-ad-close-button:hover,\n .rewarded-ad-close-button:focus {\n background-color: #f2f8ff;\n }\n"]))),Si=gi(_j||(_j=__template([' <button\n aria-label="$CLOSE_BUTTON_DESCRIPTION$"\n class="rewarded-ad-close-button"\n>\n <div class="rewarded-ad-close-img"></div>\n</button>']))),Oi=mi(_k||(_k=__template(["\n .opt-in-close-button-container {\n text-align: end !important;\n }\n\n .opt-in-close-button {\n background: none;\n border: none;\n border-radius: 4px;\n height: 48px;\n padding: 12px;\n width: 48px;\n }\n\n .opt-in-close-img {\n border-radius: 20px;\n height: 24px;\n width: 24px;\n }\n\n .opt-in-close-button:hover,\n .opt-in-close-button:focus {\n background-color: #f2f8ff;\n }\n\n @media (forced-colors: active) {\n .opt-in-close-img {\n background: buttonText;\n }\n }\n"]))),Ni=gi(_l||(_l=__template(["<style>\n ",'\n </style>\n <div class="opt-in-close-button-container">\n <button aria-label="$CLOSE_BUTTON_DESCRIPTION$" class="opt-in-close-button">\n <img\n class="opt-in-close-img"\n src="https://fonts.gstatic.com/s/i/short-term/release/googlesymbols/close/default/24px.svg"\n alt="Close button"\n />\n </button>\n </div>'])),Oi),Ci=mi(_m||(_m=__template(["\n ","\n"])),Ti),Ri=gi(_n||(_n=__template(["\n <style>\n ",' .rewarded-ad-prompt {\n height: 120px;\n width: 100%;\n align-items: center;\n justify-items: center;\n display: grid;\n }\n </style>\n <div class="rewarded-ad-prompt">Something went wrong.</div>\n'])),Ci),Ai=mi(_o||(_o=__template(["\n swg-container,\n swg-loading,\n swg-loading-animate,\n swg-loading-image {\n display: block;\n }\n\n swg-loading-container {\n margin-left: auto !important;\n margin-right: auto !important;\n margin-top: auto !important;\n\n border-top-left-radius: 8px !important;\n border-top-right-radius: 8px !important;\n\n height: 148px !important;\n width: 100% !important;\n\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n\n bottom: 0 !important;\n z-index: 2147483647 !important;\n\n background-color: rgba(255, 255, 255, 1) !important;\n box-shadow: rgba(60, 64, 67, 0.3) 0 1px 1px,\n rgba(60, 64, 67, 0.15) 0 1px 4px 1px !important;\n }\n\n swg-loading-container.centered-on-desktop {\n height: 120px !important;\n min-height: 120px !important;\n border-radius: 8px !important;\n }\n\n swg-loading {\n z-index: 2147483647 !important;\n width: 36px;\n height: 36px;\n overflow: hidden;\n animation: mspin-rotate 1568.63ms infinite linear;\n }\n\n swg-loading-animate {\n animation: mspin-revrot 5332ms infinite steps(4);\n }\n\n swg-loading-image {\n background-image: url('","/loader.svg');\n background-size: 100%;\n width: 11664px;\n height: 36px;\n animation: swg-loading-film 5332ms infinite steps(324);\n }\n\n @keyframes swg-loading-film {\n from {\n transform: translateX(0);\n }\n to {\n transform: translateX(-11664px);\n }\n }\n\n @keyframes mspin-rotate {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n }\n\n @keyframes mspin-revrot {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(-360deg);\n }\n }\n\n @media (min-width: 450px) {\n swg-loading-container {\n width: 375px !important;\n }\n }\n"])),i),vi=gi(_p||(_p=__template(["\n <style>\n ","\n </style>\n <swg-loading-container>\n <swg-loading>\n <swg-loading-animate>\n <swg-loading-image></swg-loading-image>\n </swg-loading-animate>\n </swg-loading>\n </swg-loading-container>\n"])),Ai),Pi=mi(_q||(_q=__template(["\n ","\n ","\n ","\n ","\n ","\n\n .rewarded-ad-container {\n margin: 0px;\n text-align: center;\n }\n\n .rewarded-ad-header {\n display: grid !important;\n grid-template-columns: 56px 1fr 56px;\n }\n\n .rewarded-ad-title {\n font-size: 28px; //1.75rem;\n line-height: 36px; // 2.25rem;\n font-weight: 400;\n letter-spacing: 0em;\n color: #202124;\n grid-column: 2;\n grid-row: 1;\n line-break: auto;\n }\n\n .rewarded-ad-message {\n margin-top: 8px;\n padding: 0px 11px 0px 11px;\n font-size: 16px; // 1rem;\n font-weight: 500;\n line-height: 24px; // 1.5rem;\n letter-spacing: 0.25px;\n color: #202124;\n }\n\n .rewarded-ad-cta {\n margin: 20px 14px 0px 14px;\n }\n\n .rewarded-ad-cta-button {\n padding: 6px; // 0.375rem;\n width: 100%;\n outline-offset: -2px; // 0.125rem;\n }\n\n .rewarded-ad-cta-button-inner {\n width: 100%;\n height: 36px; // 2.25rem;\n border-radius: 4px; // 0.25rem;\n font-size: 14px; // 0.875rem;\n font-weight: 500;\n letter-spacing: 0.25px;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n\n .rewarded-ad-view-ad-button-inner {\n background-color: #1a73e8;\n color: white;\n }\n\n .rewarded-ad-cta-button:focus .rewarded-ad-view-ad-button-inner,\n .rewarded-ad-cta-button:hover .rewarded-ad-view-ad-button-inner {\n background-color: #145ab5;\n }\n\n .rewarded-ad-view-ad-button:disabled .rewarded-ad-view-ad-button-inner {\n background-color: darkgrey;\n color: lightgrey;\n }\n\n .rewarded-ad-support-button-inner {\n border: 1px solid #dadce0;\n border-radius: 4px; // 0.25rem;\n color: #1a73e8;\n }\n\n .rewarded-ad-cta-button:focus .rewarded-ad-support-button-inner,\n .rewarded-ad-cta-button:hover .rewarded-ad-support-button-inner {\n background-color: #e6e6e6;\n }\n\n .rewarded-ad-google-logo {\n float: left;\n height: 24px;\n margin: 20px 0px 20px 0px;\n }\n\n .rewarded-ad-sign-in-button {\n float: right;\n font-size: 14px; // 0.875rem;\n font-weight: 500;\n line-height: 20px; // 1.25rem;\n letter-spacing: 0.25px;\n text-align: right;\n color: #1a73e8;\n height: 48px;\n border-radius: 4px;\n margin: 8px 0px 8px 0px;\n padding: 0px 7px 0px 7px;\n }\n\n .rewarded-ad-sign-in-button:focus,\n .rewarded-ad-sign-in-button:hover {\n background-color: #f2f8ff;\n }\n\n .rewarded-ad-footer {\n margin-left: 20px;\n margin-right: 20px;\n }\n"])),Ii,yi,Ti,Ei,wi),xi=gi(_r||(_r=__template(['<button\n class="rewarded-ad-support-button rewarded-ad-cta-button"\n>\n <div class="rewarded-ad-support-button-inner rewarded-ad-cta-button-inner">\n $SUPPORT_MESSAGE$\n </div>\n</button>']))),Li=gi(_s||(_s=__template(['<button\n class="rewarded-ad-sign-in-button"\n>\n $SIGN_IN_MESSAGE$\n</button>']))),Mi=gi(_t||(_t=__template(["\n <style>\n ",'\n </style>\n <div\n class="rewarded-ad-prompt"\n tabindex="-1"\n role="dialog"\n aria-labelledby="title-id"\n aria-describedby="message-id"\n aria-modal="true"\n >\n <div class="rewarded-ad-container">\n <div class="exit-container">$EXIT$</div>\n <div class="rewarded-ad-header">\n <div class="rewarded-ad-title" id="title-id">$TITLE$</div>\n </div>\n <div class="rewarded-ad-message" id="message-id">$MESSAGE$</div>\n <div class="rewarded-ad-cta">\n <button class="rewarded-ad-view-ad-button rewarded-ad-cta-button">\n <div\n class="rewarded-ad-view-ad-button-inner rewarded-ad-cta-button-inner"\n >\n $VIEW_AN_AD$\n </div>\n </button>\n $SUPPORT_BUTTON$\n </div>\n <div class="rewarded-ad-footer">\n <img\n alt="Google"\n class="rewarded-ad-google-logo"\n src="','"\n />\n $SIGN_IN_BUTTON$\n </div>\n </div>\n </div>\n'])),Pi,"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI3NCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDc0IDI0Ij48cGF0aCBmaWxsPSIjNDI4NUY0IiBkPSJNOS4yNCA4LjE5djIuNDZoNS44OGMtLjE4IDEuMzgtLjY0IDIuMzktMS4zNCAzLjEtLjg2Ljg2LTIuMiAxLjgtNC41NCAxLjgtMy42MiAwLTYuNDUtMi45Mi02LjQ1LTYuNTRzMi44My02LjU0IDYuNDUtNi41NGMxLjk1IDAgMy4zOC43NyA0LjQzIDEuNzZMMTUuNCAyLjVDMTMuOTQgMS4wOCAxMS45OCAwIDkuMjQgMCA0LjI4IDAgLjExIDQuMDQuMTEgOXM0LjE3IDkgOS4xMyA5YzIuNjggMCA0LjctLjg4IDYuMjgtMi41MiAxLjYyLTEuNjIgMi4xMy0zLjkxIDIuMTMtNS43NSAwLS41Ny0uMDQtMS4xLS4xMy0xLjU0SDkuMjR6Ii8+PHBhdGggZmlsbD0iI0VBNDMzNSIgZD0iTTI1IDYuMTljLTMuMjEgMC01LjgzIDIuNDQtNS44MyA1LjgxIDAgMy4zNCAyLjYyIDUuODEgNS44MyA1LjgxczUuODMtMi40NiA1LjgzLTUuODFjMC0zLjM3LTIuNjItNS44MS01LjgzLTUuODF6bTAgOS4zM2MtMS43NiAwLTMuMjgtMS40NS0zLjI4LTMuNTIgMC0yLjA5IDEuNTItMy41MiAzLjI4LTMuNTJzMy4yOCAxLjQzIDMuMjggMy41MmMwIDIuMDctMS41MiAzLjUyLTMuMjggMy41MnoiLz48cGF0aCBmaWxsPSIjNDI4NUY0IiBkPSJNNTMuNTggNy40OWgtLjA5Yy0uNTctLjY4LTEuNjctMS4zLTMuMDYtMS4zQzQ3LjUzIDYuMTkgNDUgOC43MiA0NSAxMmMwIDMuMjYgMi41MyA1LjgxIDUuNDMgNS44MSAxLjM5IDAgMi40OS0uNjIgMy4wNi0xLjMyaC4wOXYuODFjMCAyLjIyLTEuMTkgMy40MS0zLjEgMy40MS0xLjU2IDAtMi41My0xLjEyLTIuOTMtMi4wN2wtMi4yMi45MmMuNjQgMS41NCAyLjMzIDMuNDMgNS4xNSAzLjQzIDIuOTkgMCA1LjUyLTEuNzYgNS41Mi02LjA1VjYuNDloLTIuNDJ2MXptLTIuOTMgOC4wM2MtMS43NiAwLTMuMS0xLjUtMy4xLTMuNTIgMC0yLjA1IDEuMzQtMy41MiAzLjEtMy41MiAxLjc0IDAgMy4xIDEuNSAzLjEgMy41NC4wMSAyLjAzLTEuMzYgMy41LTMuMSAzLjV6Ii8+PHBhdGggZmlsbD0iI0ZCQkMwNSIgZD0iTTM4IDYuMTljLTMuMjEgMC01LjgzIDIuNDQtNS44MyA1LjgxIDAgMy4zNCAyLjYyIDUuODEgNS44MyA1LjgxczUuODMtMi40NiA1LjgzLTUuODFjMC0zLjM3LTIuNjItNS44MS01LjgzLTUuODF6bTAgOS4zM2MtMS43NiAwLTMuMjgtMS40NS0zLjI4LTMuNTIgMC0yLjA5IDEuNTItMy41MiAzLjI4LTMuNTJzMy4yOCAxLjQzIDMuMjggMy41MmMwIDIuMDctMS41MiAzLjUyLTMuMjggMy41MnoiLz48cGF0aCBmaWxsPSIjMzRBODUzIiBkPSJNNTggLjI0aDIuNTF2MTcuNTdINTh6Ii8+PHBhdGggZmlsbD0iI0VBNDMzNSIgZD0iTTY4LjI2IDE1LjUyYy0xLjMgMC0yLjIyLS41OS0yLjgyLTEuNzZsNy43Ny0zLjIxLS4yNi0uNjZjLS40OC0xLjMtMS45Ni0zLjctNC45Ny0zLjctMi45OSAwLTUuNDggMi4zNS01LjQ4IDUuODEgMCAzLjI2IDIuNDYgNS44MSA1Ljc2IDUuODEgMi42NiAwIDQuMi0xLjYzIDQuODQtMi41N2wtMS45OC0xLjMyYy0uNjYuOTYtMS41NiAxLjYtMi44NiAxLjZ6bS0uMTgtNy4xNWMxLjAzIDAgMS45MS41MyAyLjIgMS4yOGwtNS4yNSAyLjE3YzAtMi40NCAxLjczLTMuNDUgMy4wNS0zLjQ1eiIvPjwvc3ZnPg=="),ki=mi(_u||(_u=__template(["\n ","\n ","\n ","\n ","\n\n .rewarded-ad-prompt {\n width: 100%;\n }\n\n .rewarded-ad-thanks-message {\n font-size: 22px; // 1.375rem;\n font-weight: 400;\n line-height: 28px; // 1.75rem;\n letter-spacing: 0px;\n text-align: center;\n color: #202124;\n margin-block-end: 48px; // 3rem;\n }\n"])),Ii,yi,Ti,wi),Di=gi(_v||(_v=__template(["\n <style>\n ",'\n </style>\n <div\n class="rewarded-ad-prompt"\n tabindex="-1"\n role="dialog"\n aria-labelledby="thanks-id"\n aria-modal="true"\n >\n <div class="exit-container">','</div>\n <div class="rewarded-ad-thanks-message" id="thanks-id">\n $THANKS_FOR_VIEWING_THIS_AD$\n </div>\n </div>\n'])),ki,Si);var Ui=(t=>(t.TYPE_REGISTRATION_WALL="TYPE_REGISTRATION_WALL",t.TYPE_NEWSLETTER_SIGNUP="TYPE_NEWSLETTER_SIGNUP",t.TYPE_REWARDED_SURVEY="TYPE_REWARDED_SURVEY",t.TYPE_REWARDED_AD="TYPE_REWARDED_AD",t.TYPE_CONTRIBUTION="TYPE_CONTRIBUTION",t.TYPE_SUBSCRIPTION="TYPE_SUBSCRIPTION",t.TYPE_BYO_CTA="TYPE_BYO_CTA",t))(Ui||{});const Gi=/^(\)\]\}'\n)/;class ji{constructor(t){this.t=t}async fetchCredentialedJson(t){const e=await this.fetch(t,{method:"GET",headers:{Accept:"text/plain, application/json"},credentials:"include"}),n=(await e.text()).replace(Gi,"");return JSON.parse(n)}async sendPost(t,e){const n={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded;charset=UTF-8"},credentials:"include",body:"f.req="+Ct(e)},i=await this.fetch(t,n);if(!i)return{};const s=await i.text();try{const t=s.replace(Gi,"");return JSON.parse(t)}catch(r){return d.throwAsync(r),{}}}async fetch(t,e){try{return await this.t.fetch(t,e)}catch(n){const e=St(t).origin;throw new Error("XHR Failed fetching (".concat(e,"/...): (Note: a CORS error above may indicate that this publisher or domain is not configured in Publisher Center. The CORS error happens because 4xx responses do not set CORS headers.)\n\n")+n)}}sendBeacon(t,e){const n=new Blob(["f.req="+Ct(e)],{type:"application/x-www-form-urlencoded;charset=UTF-8"});navigator.sendBeacon(t,n)}} /** * @license * SPDX-License-Identifier: Apache-2.0 */const Fi={}; /** * @license * SPDX-License-Identifier: Apache-2.0 */let zi;function Bi(){var t;return null!==(t=function(){if("undefined"!=typeof window)return window.trustedTypes}())&&void 0!==t?t:null} /** * @license * SPDX-License-Identifier: Apache-2.0 */ class Wi{constructor(t,e){this.privateDoNotAccessOrElseWrappedHtml=t}toString(){return this.privateDoNotAccessOrElseWrappedHtml.toString()}} /** * @license * SPDX-License-Identifier: Apache-2.0 */ function Vi(t,e={}){if(function(t){var e;return(null===(e=Bi())||void 0===e?void 0:e.isHTML(t))||t instanceof Wi}(t))return t;let n=String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");return e.preserveSpaces&&(n=n.replace(/(^|[\r\n\t ]) /g,"$1 ")),e.preserveNewlines&&(n=n.replace(/(\r\n|\n|\r)/g,"<br>")),e.preserveTabs&&(n=n.replace(/(\t+)/g,'<span style="white-space:pre">$1</span>')),function(t){var e;const n=t;return function(t,e){return null!=e?e:new Wi(t,Fi)}(n,null===(e=function(){var t,e;if(void 0===zi)try{zi=null!==(e=null===(t=Bi())||void 0===t?void 0:t.createPolicy("google#safe",{createHTML:t=>t,createScript:t=>t,createScriptURL:t=>t}))&&void 0!==e?e:null}catch(n){zi=null}return zi}())||void 0===e?void 0:e.createHTML(n))}(n)}class Yi{constructor(t,e,n=1e4,i=3e3){this.oe=t,this.rt=e,this.fs=n,this.ws=i,this.ge=t.clientConfigManager(),this._=t.doc().getRootNode(),this.Es=this.bs(),this.Ts=this.Is(),this.pi=new ji(t.win()),this.pe=t.eventManager(),this.hs=t.entitlementsManager(),this.rewardedSlotReadyHandler=this.ys.bind(this),this.rewardedSlotClosedHandler=this.Ss.bind(this),this.rewardedSlotGrantedHandler=this.Os.bind(this),this.slotRenderEndedHandler=this.Ns.bind(this)}Is(){const t=o(this._,"div",{class:"audience-action-local-wrapper"});xe(t,{all:"unset","background-color":"rgba(32, 33, 36, 0.6)",border:"none",bottom:"0",height:"100%",left:"0",opacity:"0","pointer-events":"auto",position:"fixed",right:"0",transition:"opacity 0.5s",top:"0",width:"100%","z-index":"2147483646"}),this.rt.isClosable&&(t.onclick=this.close.bind(this));const e=t.attachShadow({mode:"open"}),n=o(this._,"audience-action-top-sentinal",{tabindex:"0"});return n.addEventListener("focus",this.Cs.bind(this)),this.Rs=o(this._,"audience-action-bottom-sentinal",{tabindex:"0"}),this.Rs.addEventListener("focus",this.As.bind(this)),e.appendChild(n),e.appendChild(this.Es),e.appendChild(this.Rs),t}bs(){const t=o(this._,"div",{});return xe(t,{height:"100%",display:"flex","display-flex-direction":"column","pointer-events":"none"}),t.onclick=t=>{t.stopPropagation()},t}vs(){this.Es.innerHTML=Ri}Ps(){var t,e,n,i;this.rt.isClosable||this.rt.monetizationFunction||this.pe.logSwgEvent(m.IMPRESSION_REWARDED_AD_ERROR),this.cleanUpGoogletag(),null==(e=(t=this.rt).onCancel)||e.call(t),null==(i=(n=this.rt).monetizationFunction)||i.call(n),this.triggerRewardedAdOnResultCallback(!1,!1)}xs(){this.Es.innerHTML=vi}async Ls(){var t,e;this.rt.action===Ui.TYPE_REWARDED_AD?await this.Ms():this.rt.action===Ui.TYPE_NEWSLETTER_SIGNUP?await this.ks():(null==(e=(t=this.rt).onCancel)||e.call(t),this.rt.isClosable||(this.vs(),this.Ds()))}async ks(){var t,e;this.xs(),this.Ds(),this.pe.logSwgEvent(m.IMPRESSION_BYOP_NEWSLETTER_OPT_IN);const n=await this.Us(),i=null==(t=null==n?void 0:n.optInParameters)?void 0:t.rawCodeSnippet;i&&"PREFERENCE_PUBLISHER_PROVIDED_PROMPT"===(null==(e=null==n?void 0:n.optInParameters)?void 0:e.promptPreference)?this.Gs(i):(this.pe.logSwgEvent(m.EVENT_BYOP_NEWSLETTER_OPT_IN_CONFIG_ERROR),this.vs())}Gs(t){var e,n,i;const s=o(this._,"div",{}),r=this.js(Ni);s.innerHTML=r.concat(t);const a=s.querySelector("form");a&&this.Ts?(xe(s,{"background-color":"white",border:"none","border-top-left-radius":"20px","border-top-right-radius":"20px",bottom:"0",left:"50%","max-height":"90%","max-width":"100%","pointer-events":"auto",position:"fixed",overflow:"auto","text-align":"center",transform:"translate(-50%, 0)","z-index":"2147483646"}),s.onclick=t=>{t.stopPropagation()},null==(e=this.Ts.shadowRoot)||e.removeChild(this.Es),null==(n=this.Ts.shadowRoot)||n.appendChild(s),this.Fs(),null==(i=s.querySelector(".opt-in-close-button"))||i.addEventListener("click",this.zs.bind(this)),a.addEventListener("submit",this.Bs.bind(this))):(this.pe.logSwgEvent(m.EVENT_BYOP_NEWSLETTER_OPT_IN_CODE_SNIPPET_ERROR),this.vs())}Fs(){var t;null==(t=this.Ts.shadowRoot)||t.appendChild(this.Rs),this.Ws().length>0&&this.Ws()[0].focus()}async Bs(){xe(this.Ts,{opacity:"0"}),this.pe.logSwgEvent(m.ACTION_BYOP_NEWSLETTER_OPT_IN_SUBMIT),await this.C(),await this.Vs(1e3),this.Ys()}async Vs(t){return new Promise((e=>this.oe.win().setTimeout(e,t)))}zs(){var t,e;this.pe.logSwgEvent(m.ACTION_BYOP_NEWSLETTER_OPT_IN_CLOSE),this.rt.isClosable&&(this.Ys(),null==(e=(t=this.rt).onCancel)||e.call(t))}isSubscription(){var t,e,n;return this.rt.autoPromptType===Kn.SUBSCRIPTION||this.rt.autoPromptType===Kn.SUBSCRIPTION_LARGE||!this.rt.autoPromptType&&!!(null==(n=null==(e=null==(t=this.config)?void 0:t.publication)?void 0:e.revenueModel)?void 0:n.subscriptions)}isContribution(){var t,e,n;return this.rt.autoPromptType===Kn.CONTRIBUTION||this.rt.autoPromptType===Kn.CONTRIBUTION_LARGE||!this.rt.autoPromptType&&!!(null==(n=null==(e=null==(t=this.config)?void 0:t.publication)?void 0:e.revenueModel)?void 0:n.contributions)}async Ks(){var t,e;const n=this.oe.win();return!((null==(t=n.googletag)?void 0:t.apiReady)&&!(null==(e=n.googletag)?void 0:e.getVersion()))&&new Promise((t=>{const e=setTimeout((()=>t(!1)),this.fs);n.googletag=n.googletag||{cmd:[]},n.googletag.cmd.push((()=>{clearTimeout(e),t(!0)}))}))}async Ms(){var t,e,n;this.pe.logSwgEvent(m.EVENT_REWARDED_AD_FLOW_INIT);const[i,s]=await Promise.all([this.Us(),this.Ks()]);return s?(null==(t=null==i?void 0:i.rewardedAdParameters)?void 0:t.adunit)&&(null==(e=null==i?void 0:i.rewardedAdParameters)?void 0:e.customMessage)&&(null==(n=null==i?void 0:i.publication)?void 0:n.name)?(this.config=i,this.oe.win().googletag.cmd.push(this.qs.bind(this)),void(this.Hs=setTimeout((()=>{this.pe.logSwgEvent(m.EVENT_REWARDED_AD_GPT_ERROR),this.Ps()}),this.fs))):(this.pe.logSwgEvent(m.EVENT_REWARDED_AD_CONFIG_ERROR),void this.Ps()):(this.pe.logSwgEvent(m.EVENT_REWARDED_AD_GPT_MISSING_ERROR),void this.Ps())}qs(){const t=this.oe.win().googletag;if(this.$s=t.defineOutOfPageSlot(this.config.rewardedAdParameters.adunit,t.enums.OutOfPageFormat.REWARDED),!this.$s)return this.pe.logSwgEvent(m.EVENT_REWARDED_AD_PAGE_ERROR),void this.Ps();this.$s.addService(t.pubads()),t.pubads().addEventListener("rewardedSlotReady",this.rewardedSlotReadyHandler),t.pubads().addEventListener("rewardedSlotClosed",this.rewardedSlotClosedHandler),t.pubads().addEventListener("rewardedSlotGranted",this.rewardedSlotGrantedHandler),t.pubads().addEventListener("slotRenderEnded",this.slotRenderEndedHandler),t.enableServices(),t.display(this.$s),t.pubads().refresh([this.$s])}Ns(t){t.slot===this.$s&&t.isEmpty&&(clearTimeout(this.Hs),this.pe.logSwgEvent(m.EVENT_REWARDED_AD_NOT_FILLED),Z("Rewarded ad slot could not be filled"),this.Ps())}ys(t){var e,n,i,s;clearTimeout(this.Hs),this.Js=t.makeRewardedVisible;const r=!this.isContribution()&&!this.isSubscription(),o=this.ge.getLanguage(),a=Vi(this.config.publication.name).toString(),h=this.js(Si),l=Vi(this.config.rewardedAdParameters.customMessage).toString(),u=hn(en,o),c=this.isSubscription()||this.rt.onAlternateAction?hn(Qe,o):hn(Je,o),d=!this.rt.onAlternateAction&&r?"":xi.replace("$SUPPORT_MESSAGE$",c),p=this.isSubscription()||this.rt.onSignIn?hn(Ze,o):hn(Xe,o),g=!this.rt.onSignIn&&r?"":Li.replace("$SIGN_IN_MESSAGE$",p);this.Es.innerHTML=Mi.replace("$TITLE$",a).replace("$EXIT$",h).replace("$MESSAGE$",l).replace("$VIEW_AN_AD$",u).replace("$SUPPORT_BUTTON$",d).replace("$SIGN_IN_BUTTON$",g),null==(e=this.Es.querySelector(".rewarded-ad-support-button"))||e.addEventListener("click",this.Qs.bind(this)),null==(n=this.Es.querySelector(".rewarded-ad-view-ad-button"))||n.addEventListener("click",this.Xs.bind(this)),null==(i=this.Es.querySelector(".rewarded-ad-close-button"))||i.addEventListener("click",this.Zs.bind(this)),null==(s=this.Es.querySelector(".rewarded-ad-sign-in-button"))||s.addEventListener("click",this.er.bind(this)),this.Ds(),this.nr(),this.pe.logSwgEvent(m.EVENT_REWARDED_AD_READY),this.pe.logSwgEvent(m.IMPRESSION_REWARDED_AD)}Ss(){var t,e;this.cleanUpGoogletag(),this.rt.isClosable&&(this.Ys(),null==(e=(t=this.rt).onCancel)||e.call(t)),this.pe.logSwgEvent(m.ACTION_REWARDED_AD_CLOSE_AD,!0),this.triggerRewardedAdOnResultCallback(!0,!1)}async Os(t){var e,n,i;const s=this.ge.getLanguage(),r=hn($e,s),o=hn(tn,s);this.Es.innerHTML=Di.replace("$CLOSE_BUTTON_DESCRIPTION$",r).replace("$THANKS_FOR_VIEWING_THIS_AD$",o);const a=this.Es.getElementsByClassName("rewarded-ad-close-button"),h=setTimeout(this.Ys.bind(this),this.ws);null==(e=a.item(0))||e.addEventListener("click",(()=>{clearTimeout(h),this.Ys()})),this.cleanUpGoogletag(),this.pe.logSwgEvent(m.EVENT_REWARDED_AD_GRANTED),this.nr(),this.triggerRewardedAdOnResultCallback(!0,!0,null==(n=null==t?void 0:t.payload)?void 0:n.amount,null==(i=null==t?void 0:t.payload)?void 0:i.type),await this.C()}Zs(){var t,e;this.cleanUpGoogletag(),this.Ys(),null==(e=(t=this.rt).onCancel)||e.call(t),this.pe.logSwgEvent(m.ACTION_REWARDED_AD_CLOSE,!0),this.triggerRewardedAdOnResultCallback(!0,!1)}Qs(){var t,e;this.pe.logSwgEvent(m.ACTION_REWARDED_AD_SUPPORT,!0),null==(e=(t=this.rt).onCancel)||e.call(t),this.Ys(),this.cleanUpGoogletag(),this.rt.onAlternateAction?this.rt.onAlternateAction():this.rt.monetizationFunction()}Xs(){var t;null==(t=this.Es.getElementsByClassName("rewarded-ad-view-ad-button").item(0))||t.setAttribute("disabled","true"),this.pe.logSwgEvent(m.ACTION_REWARDED_AD_VIEW,!0),this.Js()}er(){var t,e;this.pe.logSwgEvent(m.ACTION_REWARDED_AD_SIGN_IN,!0),this.rt.onSignIn?(null==(e=(t=this.rt).onCancel)||e.call(t),this.Ys(),this.cleanUpGoogletag(),this.rt.onSignIn()):this.oe.callbacks().triggerLoginRequest({linkRequested:!1})}ir(t,e){const n=this.oe.pageConfig().getPublicationId(),i="/publication/".concat(encodeURIComponent(n),"/").concat(t);return e.reduce(((t,[e,n])=>Nt(t,e,n)),kt(i))}async Us(){const t=[["publicationId",this.oe.pageConfig().getPublicationId()],["configurationId",this.rt.configurationId],["origin",St(this.oe.win().location.href).origin],["previewEnabled",(!!this.rt.shouldRenderPreview).toString()]],e=this.ir("getactionconfigurationui",t);return await this.pi.fetchCredentialedJson(e)}async C(){if(this.rt.shouldRenderPreview)return;const t=[["sut",await this.oe.storage().get(pt,!0)],["configurationId",this.rt.configurationId],["audienceActionType",this.rt.action]],e=this.ir("completeaudienceaction",t),n={toArray:()=>[],label:String},i=await this.pi.sendPost(e,n);if(i.updated){this.hs.clear(),i.swgUserToken&&await this.oe.storage().set(pt,i.swgUserToken,!0);const t=Date.now().toString();await this.oe.storage().set(gt,t,!1),await this.hs.getEntitlements()}}Ds(){this._.documentElement.appendChild(this.Ts),Le(this._.body,"overflow","hidden"),this.Ts.offsetHeight,xe(this.Ts,{opacity:"1.0"})}Ys(){a(this.Ts),Le(this._.body,"overflow","")}nr(){this.Es.querySelector(".rewarded-ad-prompt").focus()}As(){this.rr()[1].focus()}Cs(){const t=this.rr();t[t.length-2].focus()}rr(){return this.Ts.shadowRoot.querySelectorAll('a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])')}Ws(){return this.Ts.shadowRoot.querySelectorAll("input, textarea")}async start(){await this.Ls()}js(t){const e=this.ge.getLanguage();if(this.rt.isClosable){const n=hn($e,e);return t.replace("$CLOSE_BUTTON_DESCRIPTION$",n)}{if(this.rt.action===Ui.TYPE_NEWSLETTER_SIGNUP)return"";const t=hn(nn,e);return bi.replace("$BACK_TO_HOME_TEXT$",t).replace("$BACK_TO_HOME_LINK$",St(this.oe.win().location.href).origin)}}showNoEntitlementFoundToast(){const t=this.ge.getLanguage(),e=hn(He,t);new hi(this.oe,Ut("/toastiframe",{flavor:"custom",customText:e})).open()}close(){this.rt.action===Ui.TYPE_REWARDED_AD?this.Zs():this.rt.action===Ui.TYPE_NEWSLETTER_SIGNUP&&this.zs()}cleanUpGoogletag(){var t,e,n,i,s,r;const o=this.oe.win().googletag;this.$s&&(null==(t=null==o?void 0:o.destroySlots)||t.call(o,[this.$s]));const a=null==(e=null==o?void 0:o.pubads)?void 0:e.call(o);null==(n=null==a?void 0:a.removeEventListener)||n.call(a,"rewardedSlotReady",this.rewardedSlotReadyHandler),null==(i=null==a?void 0:a.removeEventListener)||i.call(a,"rewardedSlotClosed",this.rewardedSlotClosedHandler),null==(s=null==a?void 0:a.removeEventListener)||s.call(a,"rewardedSlotGranted",this.rewardedSlotGrantedHandler),null==(r=null==a?void 0:a.removeEventListener)||r.call(a,"slotRenderEnded",this.slotRenderEndedHandler)}triggerRewardedAdOnResultCallback(t,e,n,i){var s,r;null==(r=(s=this.rt).onResult)||r.call(s,{configurationId:this.rt.configurationId,data:{rendered:t,rewardGranted:e,reward:n,type:i}})}}class Ki{constructor(t,e){this.intervention=t,this.oe=e,this.type=t.type,this.configurationId=t.configurationId}async show(t){if(this.intervention.type==Ui.TYPE_NEWSLETTER_SIGNUP||this.intervention.type==Ui.TYPE_REWARDED_SURVEY||this.intervention.type==Ui.TYPE_BYO_CTA)return new pi(this.oe,{action:this.intervention.type,configurationId:this.intervention.configurationId,onResult:t.onResult,isClosable:t.isClosable,calledManually:!0,suppressToast:t.suppressToast}).start();if(this.intervention.type==Ui.TYPE_REWARDED_AD)return new Yi(this.oe,{action:this.intervention.type,configurationId:this.intervention.configurationId,onResult:t.onResult,isClosable:t.isClosable,calledManually:!0,onAlternateAction:t.onAlternateAction,onSignIn:t.onSignIn}).start();throw Error("Can't show ".concat(this.type))}}const qi="google:metering";class Hi{constructor(t,e,n,i,s,r,o=!1,a=null){this.service=t,this.raw=e,this.entitlements=n,this.lr=i,this.ur=s,this.cr=r,this.decryptedDocumentKey=a,this.isReadyToPay=!!o}clone(){return new Hi(this.service,this.raw,this.entitlements.map((t=>t.clone())),this.lr,this.ur,this.cr,this.isReadyToPay,this.decryptedDocumentKey)}json(){return{service:this.service,entitlements:this.entitlements.map((t=>t.json())),isReadyToPay:this.isReadyToPay}}enablesThisWithCacheableEntitlements(){return!!this.getEntitlementForThis()&&!this.enablesThisWithGoogleMetering()&&!this.enablesThisWithGoogleDevMode()}enablesThisWithGoogleMetering(){const t=this.getEntitlementForThis();return!!t&&t.source===qi}enablesThisWithGoogleDevMode(){const t=this.getEntitlementForThis();if(!t)return!1;const e="google"===t.source&&-1!==t.subscriptionToken.indexOf("GOOGLE_DEV_MODE_ORDER"),n="GOOGLE_DEV_MODE_TOKEN"===t.subscriptionToken;return e||n}enablesThis(t){return this.enables(this.lr,t)}enablesAny(t){for(let e=0;e<this.entitlements.length;e++)if(this.entitlements[e].products.length>0&&(!t||t==this.entitlements[e].source))return!0;return!1}enables(t,e){return!!t&&!!this.getEntitlementFor(t,e)}getEntitlementForThis(t){return this.getEntitlementFor(this.lr,t)}getEntitlementFor(t,e){if(!t)return Z("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;const n=this.entitlements.filter((n=>n.enables(t)&&(!e||e===n.source))),i=n.find((({source:t})=>t!==qi)),s=n.find((({source:t})=>t===qi));return i||s||null}getEntitlementForSource(t){if(this.entitlements.length>0)for(let e=0;e<this.entitlements.length;e++)if(this.entitlements[e].subscriptionToken&&t==this.entitlements[e].source)return this.entitlements[e];return null}ack(){this.ur(this)}consume(t){this.cr(this,t)}}class $i{constructor(t,e,n,i,s,r){this.source=t,this.products=e,this.subscriptionToken=n,this.subscriptionTokenContents=i,this.subscriptionTimestamp=s,this.readerId=r}clone(){return new $i(this.source,this.products.slice(0),this.subscriptionToken,this.subscriptionTokenContents,this.subscriptionTimestamp,this.readerId)}json(){return{source:this.source,products:this.products,subscriptionToken:this.subscriptionToken,readerId:this.readerId}}enables(t){if(!t)return!1;const e=t.indexOf(":");if(-1!=e){const n=t.substring(0,e+1);if(n+"*"==t&&this.products.filter((t=>t.substring(0,e+1)==n)).length>=1)return Q("enabled with wildcard productId"),!0;if(this.products.includes(n+"*"))return Q("enabled with wildcard entitlement"),!0}return this.products.includes(t)}static parseFromJson(t,e){t||(t={});const n=t.source||"",i=t.products||[],s=t.subscriptionToken||"",r=t.readerId;let o;try{o=s?e.decode(s):null}catch(l){o=null}const a=t.subscriptionTimestamp;let h;try{const t=a.seconds_,e=a.nanos_;h=new z([t,e],!1)}catch(l){h=null}return new $i(n,i,s,o,h,r)}static parseListFromJson(t,e){return(Array.isArray(t)?t:[t]).map((t=>$i.parseFromJson(t,e)))}getSku(){if("google"!==this.source)return null;const t=lt(this.subscriptionToken,"productId")||null;return t||Z("Unable to retrieve SKU from SwG subscription token"),t}}var Ji=(t=>(t[t.LICENSED_BY_GOOGLE=1]="LICENSED_BY_GOOGLE",t[t.METERED_BY_GOOGLE=2]="METERED_BY_GOOGLE",t))(Ji||{});const Qi="rgba(60, 64, 67, 0.3) 0px -2px 5px, rgba(60, 64, 67, 0.15) 0px -5px 5px",Xi="anonymous_user",Zi={[Ji.LICENSED_BY_GOOGLE]:"/metertoastiframe",[Ji.METERED_BY_GOOGLE]:"/meteriframe"};class ts{constructor(t,{meterClientType:e=Ji.LICENSED_BY_GOOGLE,meterClientUserAttribute:n=Xi}={}){this.oe=t,this.dr=null,this.pr=!1,this.gr=null,this.mr=()=>{},this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this._r=e,this.wr=n}async start(){const t={isClosable:!0,hasSubscriptionCallback:this.oe.callbacks().hasSubscribeRequestCallback()};this._r===Ji.METERED_BY_GOOGLE&&(t.meterType=this.wr===Xi?"UNKNOWN":"KNOWN");const e=this.o.addDefaultArguments(t),n=Zi[this._r],i={origin:St(this.t.location.href).origin};this.oe.clientConfigManager().shouldForceLangInIframes()&&(i.hl=this.oe.clientConfigManager().getLanguage());const s=new g(this.t,this.o,Ut(n,i),e,!1);this.mr=()=>{const t=new B;t.setClose(!0),s.execute(t),this.removeCloseEventListener(),this.oe.eventManager().logSwgEvent(m.ACTION_METER_TOAST_CLOSED_BY_ARTICLE_INTERACTION,!0),this.dr&&!this.pr&&(this.pr=!0,this.dr())},this.oe.callbacks().triggerFlowStarted(K.SHOW_METER_TOAST),s.on(W,this.Er.bind(this)),this.oe.callbacks().hasSubscribeRequestCallback()||this.oe.callbacks().hasOffersFlowRequestCallback()||Z("[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.we.handleCancellations(s).catch((t=>{if(this.dr&&!this.pr&&(this.pr=!0,this.dr()),!u(t))throw console.error("[swg.js]: Error occurred during meter toast handling: "+t),t}));const r=await this.we.openDialog();if(this.br(),this.Tr(),await r.openView(s),this.t.addEventListener("click",this.mr),this.t.addEventListener("touchstart",this.mr),this.t.addEventListener("mousedown",this.mr),this.Ir())Le(this.t.document.body,"overflow","hidden");else{let t,e;this.gr=()=>{t=t||this.t.pageYOffset,this.t.clearTimeout(e),e=this.t.setTimeout((()=>{Math.abs(this.t.pageYOffset-t)>100&&this.mr()}),100)},this.t.addEventListener("scroll",this.gr)}this.oe.eventManager().logSwgEvent(m.IMPRESSION_METER_TOAST),this.oe.eventManager().logSwgEvent(m.EVENT_OFFERED_METER)}setOnConsumeCallback(t){this.dr=t}removeCloseEventListener(){this.t.removeEventListener("click",this.mr),this.t.removeEventListener("touchstart",this.mr),this.t.removeEventListener("mousedown",this.mr),this.Ir()?Le(this.t.document.body,"overflow","visible"):this.gr&&this.t.removeEventListener("scroll",this.gr)}br(){const t=this.t.matchMedia("(max-width: 640px), (max-height: 640px)"),e=this.we.getDialog().getElement();t.matches&&xe(e,{"box-shadow":Qi}),t.addListener((t=>{t.matches?xe(e,{"box-shadow":Qi}):xe(e,{"box-shadow":""})}))}Tr(){this.t.matchMedia("(min-width: 640px) and (min-height: 640px)").matches&&xe(this.we.getDialog().getLoadingView().getElement(),{width:"420px",margin:"auto"})}Er(t){this.removeCloseEventListener(),this.pr=!0,t.getNative()?this.oe.callbacks().triggerSubscribeRequest():this.oe.callbacks().triggerOffersFlowRequest()}Ir(){return!!this.t.navigator.userAgent.match(/Android|iPhone|iPad|iPod|BlackBerry|IEMobile/i)}}function es(t,e=!1){const n=Ot(t);return!(!(n.gaa_at&&n.gaa_n&&n.gaa_sig&&n.gaa_ts)||!e&&"na"===n.gaa_at||parseInt(n.gaa_ts,16)<Date.now()/1e3)}const ns=new Set([Ui.TYPE_NEWSLETTER_SIGNUP,Ui.TYPE_REWARDED_SURVEY,Ui.TYPE_REWARDED_AD,Ui.TYPE_BYO_CTA]);class is{constructor(t,e,n,i,s){this.t=t,this.ue=e,this.pi=n,this.oe=i,this.yr=s,this.Sr=null,this.Or=!1,this.Nr=!1,this.Cr=!1,this.Rr=null,this.Ar=0,this.mi=null,this.entitlementsPostPromise=null,this.di=this.ue.getPublicationId(),this.vr=new ut,this.ls=i.storage(),this.ce=i.analytics(),this.Pr=i.config(),this.oe.eventManager().registerEventListener(this.Lr.bind(this))}reset(t=!1){this.mi=null,this.Ar=Math.max(this.Ar,t?3:0),t&&(this.ls.remove(mt),this.ls.remove(ft))}clear(){this.mi=null,this.Ar=0,this.unblockNextNotification(),this.ls.remove(mt),this.ls.remove(Et),this.ls.remove(ft)}async getEntitlements(t){"string"==typeof t&&(Date.now()>1600289016959&&Z("[swg.js:getEntitlements]: If present, the first param of getEntitlements() should be an object of type GetEntitlementsParamsExternalDef."),t={encryption:{encryptedDocumentKey:t}}),this.mi||(this.mi=this.Mr(t));const e=await this.mi;return null!=e.isReadyToPay&&this.ce.setReadyToPay(e.isReadyToPay),e}pushNextEntitlements(t,e){const n=this.kr(t,!0,e);return!(!n||!n.enablesThis()||(this.ls.set(mt,t),0))}Dr(){return Ot(this.t.location.search).gaa_n}Ur(t){var e;if(!t||t.source!==qi)return;let n,i;if((null==(e=t.subscriptionTokenContents)?void 0:e.metering.clientType)===Ji.METERED_BY_GOOGLE)i=f.SUBSCRIBE_WITH_GOOGLE_METERING_SERVICE;else{if(!es(this.t.location.search))return;i=f.GOOGLE_SHOWCASE_METERING_SERVICE,n=this.Dr()}this.oe.eventManager().logSwgEvent(m.EVENT_UNLOCKED_BY_METER,!1);const s=new N;s.setSource(t.source),s.setJwt(t.subscriptionToken),this.entitlementsPostPromise=this.Gr(s,_.UNLOCKED_METER,i,n)}Lr(t){var e,n,i,s;if(!es(this.t.location.search,!0))return;const r=function(t){return Zn[t]}(t.eventType);if(!r)return;let o=null;switch(t.eventOriginator){case w.SHOWCASE_CLIENT:o=f.PUBLISHER_ENTITLEMENT;break;case w.SWG_CLIENT:if(r==_.UNLOCKED_METER)return;o=f.GOOGLE_SUBSCRIBER_ENTITLEMENT;break;default:return}const a=this.Dr(),h=null==(n=null==(e=null==t?void 0:t.additionalParameters)?void 0:e.getIsUserRegistered)?void 0:n.call(e),l=null==(s=null==(i=null==t?void 0:t.additionalParameters)?void 0:i.getSubscriptionTimestamp)?void 0:s.call(i);this.entitlementsPostPromise=this.Gr(new N,r,o,a,h,l)}async Gr(t,e,n,i="",s=null,r=null){const o=new C;o.setUsedEntitlement(t),o.setClientEventTime(Me(Date.now())),o.setEntitlementResult(e),o.setEntitlementSource(n),o.setToken(i),"boolean"==typeof s&&o.setIsUserRegistered(s),r&&o.setSubscriptionTimestamp(r);let a="/publication/".concat(encodeURIComponent(this.di),"/article");if(a=ss(this.t.location,a),!this.Rr){const t={metering:{resource:{hashedCanonicalUrl:await this.jr()}}};this.Rr=at(rt(JSON.stringify(t)))}const h=await this.ls.get(pt,!0);h&&(a=Nt(a,"sut",h)),a=Nt(a,"encodedEntitlementsParams",this.Rr),await this.pi.sendPost(kt(a),o)}async jr(){return async function(t){var e;const n=null==(e=self.crypto)?void 0:e.subtle;if(!n){const t="Swgjs only works on secure (HTTPS or localhost) pages.";return Z(t),Promise.reject(t)}return function(t){const e=[],n=new DataView(t);for(let i=0;i<n.byteLength;i+=4){const t=n.getUint32(i).toString(16);e.push(("00000000"+t).slice(-8))}return e.join("")}(await n.digest("SHA-512",rt(t)))}(At(this.oe.doc()))}async Mr(t){const e=await this.Fr(t);return this.zr(e),e}async Fr(t){const e=await this.ls.get(mt),n=await this.ls.get(ft),i=!(!t||!t.encryption);if(e&&!i){const t=this.kr(e,!0,function(t){switch(t){case"true":return!0;case"false":return!1;default:return}}(n));if(t&&t.enablesThis())return this.Ar=0,t}const s=await this.Br(t);return s&&s.enablesThisWithCacheableEntitlements()&&s.raw&&this.ls.set(mt,s.raw),s}async getArticle(){return this.mi?(await this.mi,this.Sr):null}async getExperimentConfigFlags(){const t=await this.getArticle();return this.parseArticleExperimentConfigFlags(t)}parseArticleExperimentConfigFlags(t){if(t){const e=t.experimentConfig;if(null!=e){const t=e.experimentFlags;if(null!=t)return t}}return[]}Br(t){let e=this.Ar;this.Ar=0;const n=async()=>{e--;const i=await this._i(t);return i.enablesThis()||e<=0?i:new Promise((t=>{this.t.setTimeout((()=>{t(n())}),550)}))};return n()}setToastShown(t){this.ls.set(Et,t?"1":"0")}blockNextNotification(){this.Or=!0}blockNextToast(){this.Nr=!0}unblockNextNotification(){this.Or=!1}enableMeteredByGoogle(){this.Cr=!0}parseEntitlements(t){const e=t.isReadyToPay;null==e?this.ls.remove(ft):this.ls.set(ft,String(e));const n=t.signedEntitlements,i=t.decryptedDocumentKey,s=t.swgUserToken;if(s&&this.Wr(s),n){const t=this.kr(n,!1,e,i);if(t)return t}else{const n=t.entitlements;if(n)return this.Vr("",n,e,i)}return this.Vr("",[],e)}Wr(t){t&&this.ls.set(pt,t,!0)}kr(t,e,n,i){try{const s=this.vr.decode(t);if(e){const t=Date.now(),e=s.exp;if(1e3*parseFloat(e)<t)return null}const r=s.entitlements;return r&&this.Vr(t,r,n,i)||null}catch(s){this.t.setTimeout((()=>{throw s}))}return null}Vr(t,e,n,i){return new Hi("subscribe.google.com",t,$i.parseListFromJson(e,this.vr),this.ue.getProductId(),this.Yr.bind(this),this.Kr.bind(this),n,i)}zr(t){const e=this.Or;this.Or=!1;const n=this.Nr;if(this.Nr=!1,e)return;this.oe.callbacks().triggerEntitlementsResponse(Promise.resolve(t)),this.yr&&t.enablesThisWithGoogleMetering()&&t.consume();const i=t.getEntitlementForThis();i?n||this.qr(i):this.oe.eventManager().logSwgEvent(m.EVENT_NO_ENTITLEMENTS,!1)}async qr(t){if(t.source===qi)return this.oe.eventManager().logSwgEvent(m.EVENT_HAS_METERING_ENTITLEMENTS,!1),Promise.resolve();const e=new A;e.setIsUserRegistered(!0),t.subscriptionTimestamp&&e.setSubscriptionTimestamp(t.subscriptionTimestamp);const n="privileged"===t.source?m.EVENT_UNLOCKED_FOR_CRAWLER:m.EVENT_UNLOCKED_BY_SUBSCRIPTION;if(this.oe.eventManager().logSwgEvent(n,!1,e),"1"===await this.ls.get(Et))return;const i=t.source||qi;return new hi(this.oe,Ut("/toastiframe"),Gt({publicationId:this.di,source:i})).open()}Yr(t){t.getEntitlementForThis()&&this.setToastShown(!0)}Kr(t,e){var n;if(t.enablesThisWithGoogleMetering()){const i=t.getEntitlementForThis(),s=()=>{e&&e(),this.Ur(i)},r=i.subscriptionTokenContents;if(!r)return s();if(!0===(null==(n=r.metering)?void 0:n.showToast)){const t=new ts(this.oe,{meterClientType:r.metering.clientType,meterClientUserAttribute:r.metering.clientUserAttribute});return t.setOnConsumeCallback(s),t.start()}return s()}}async _i(t){var e;const n=await this.ls.get(pt,!0),i=await this.ls.get(gt,!1);let s="/publication/".concat(encodeURIComponent(this.di),"/article");if(s=ss(this.t.location,s),s=function(t,e){const n=Ot(t.hash).rrmPromptRequested;return void 0===n?e:Nt(e,"previewConfigId",n)}(this.t.location,s),s=function(t,e){const n=Ot(t.hash).rrmPreviewKey;return void 0===n?e:Nt(e,"previewKey",n)}(this.t.location,s),(null==t?void 0:t.encryption)&&(s=Nt(s,"crypt",t.encryption.encryptedDocumentKey)),n&&(s=Nt(s,"sut",n)),this.Pr.publisherProvidedId?s=Nt(s,"ppid",this.Pr.publisherProvidedId):(null==t?void 0:t.publisherProvidedId)&&"string"==typeof t.publisherProvidedId&&t.publisherProvidedId.length>0&&(s=Nt(s,"ppid",t.publisherProvidedId)),i){const t=parseInt(i,10);if(t){const e=Math.floor((Date.now()-t)/1e3);e>=0&&(s=Nt(s,"interaction_age",e.toString()))}}s=Nt(s,"locked",String(this.ue.isLocked())),s=Nt(s,"contentType",this.ue.isLocked()?qn.CLOSED.toString():qn.OPEN.toString());const r=await this.jr();let o=this.Cr?{metering:{clientTypes:[Ji.METERED_BY_GOOGLE],owner:this.di,resource:{hashedCanonicalUrl:r}}}:void 0;if(this.di&&(null==(e=null==t?void 0:t.metering)?void 0:e.state)&&es(this.t.location.search)){const e=t.metering.state.id;if("string"==typeof e&&e.length>0){let n=function({attributes:t,category:e}){if(!t)return;const n=Object.keys(t);for(const i of n){const n="".concat(e,"_").concat(i),s=Number(t[i].timestamp),r=s>Date.now()/1e3*2;s&&!r||Z('SwG Entitlements: Please specify a Unix timestamp, in seconds, for the "'.concat(i,'" ').concat(e," attribute. The timestamp you passed (").concat(t[i].timestamp,") looks invalid.")),o.metering.state.attributes.push({name:n,timestamp:s})}};o={metering:{clientTypes:[Ji.LICENSED_BY_GOOGLE],owner:this.di,resource:{hashedCanonicalUrl:r},state:{id:e,attributes:[]},token:this.Dr()}},n({attributes:t.metering.state.standardAttributes,category:"standard"}),n({attributes:t.metering.state.customAttributes,category:"custom"})}else Z("SwG Entitlements: Please specify a metering state ID string, ideally a hash to avoid PII.")}o&&(this.Rr=at(rt(JSON.stringify(o))),s=Nt(s,"encodedEntitlementsParams",this.Rr)),s=kt(s),this.oe.eventManager().logSwgEvent(m.ACTION_GET_ENTITLEMENTS,!1);const a=await this.pi.fetchCredentialedJson(s);this.Sr=a;const h=this.Sr.entitlements||{},l=a.errorMessages;if(Number(null==l?void 0:l.length)>0)for(const u of l)Z("SwG Entitlements: "+u);return this.parseEntitlements(h)}async getAvailableInterventions(){var t,e;const n=await this.getArticle();return n?(null==(e=null==(t=n.audienceActions)?void 0:t.actions)?void 0:e.filter((t=>ns.has(t.type))).map((t=>new Ki(t,this.oe))))||[]:(Z("[swg.js:getAvailableInterventions] Article is null."),null)}}function ss(t,e){const n=Ot(t.hash)["swg.deventitlement"];return void 0===n?e:Nt(e,"devEnt",n)}class rs{constructor(t){this._=t}async error(...t){await 0;const n=function(t){let e=null,n="";for(const i of t)i instanceof Error&&!e?e=os(i):(n&&(n+=" "),n+=i);return e?n&&(e.message=n+": "+e.message):e=new Error(n),e}(t);n.reported||(this._.getWin().document.createElement("img").src="".concat(e,"/swg/_/SubscribewithgoogleClientUi/jserror?error=")+encodeURIComponent(String(n))+"&script="+encodeURIComponent("".concat(e,"/swg/js/v1/swg.js"))+"&line="+(n.lineNumber||1)+"&trace="+encodeURIComponent(n.stack||""),n.reported=!0)}}function os(t){const e=Object.getOwnPropertyDescriptor(t,"message");if(e&&e.writable)return t;const{lineNumber:n,message:i,reported:s,stack:r}=t,o=new Error(i);return o.lineNumber=n,o.stack=r,o.reported=s,o}const as="swg-link";class hs{constructor(t){this.oe=t,this.o=t.activities(),this.ue=t.pageConfig(),this.we=t.dialogManager()}start(t={}){this.oe.callbacks().triggerFlowStarted(K.LINK_ACCOUNT);const e=this.oe.config().windowOpenMode==H.REDIRECT,n=t.ampReaderId?Gt({publicationId:this.ue.getPublicationId(),ampReaderId:t.ampReaderId}):Gt({publicationId:this.ue.getPublicationId()}),i=this.o.open(as,Ut("/linkbackstart"),e?"_top":"_blank",n,{});return this.oe.eventManager().logSwgEvent(m.IMPRESSION_LINK),this.we.popupOpened(i&&i.targetWin),Promise.resolve()}}class ls{constructor(t,e){this.oe=t,this.Hr=e,this._e=null,this.$r=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this.hs=t.entitlementsManager(),this.ri=t.callbacks(),this.Hr||(this.Hr={}),this.Jr=new Promise((t=>{this.$r=t}))}static configurePending(t){t.activities().onResult(as,(async function(e){t.entitlementsManager().blockNextNotification(),t.callbacks().triggerLinkProgress(),t.dialogManager().popupClosed();try{const n=await r(e,Mt(),!1,!1);t.eventManager().logSwgEvent(m.ACTION_LINK_CONTINUE,!0),t.eventManager().logSwgEvent(m.EVENT_LINK_ACCOUNT_SUCCESS),new ls(t,n).start()}catch(n){t.entitlementsManager().unblockNextNotification(),u(n)?(t.eventManager().logSwgEvent(m.ACTION_LINK_CANCEL,!0),t.callbacks().triggerFlowCanceled(K.LINK_ACCOUNT)):t.eventManager().logSwgEvent(m.ACTION_LINK_CONTINUE,!0)}}))}async start(){if(this.Hr.saveAndRefresh)return this.C(this.Hr,!!this.Hr.linked),Promise.resolve();const t=this.Hr.index||"0";return this._e=new g(this.t,this.o,Ut("/linkconfirmiframe",{},"u/"+t),Gt({productId:this.oe.pageConfig().getProductId(),publicationId:this.oe.pageConfig().getPublicationId()}),!0),this.Qr(),this.oe.eventManager().logSwgEvent(m.EVENT_GOOGLE_UPDATED,!0),this.oe.eventManager().logSwgEvent(m.IMPRESSION_GOOGLE_UPDATED,!0),this.we.openView(this._e)}async Qr(){try{const t=await this._e.acceptResultAndVerify(Mt(),!0,!0);this.C(t,!!t.success)}catch(t){this.t.setTimeout((()=>{throw t}))}this.we.completeView(this._e)}C(t,e){this.oe.eventManager().logSwgEvent(m.ACTION_GOOGLE_UPDATED_CLOSE,!0);const n=t.swgUserToken;n&&this.oe.storage().set(pt,n,!0),this.ri.triggerLinkComplete(),this.ri.resetLinkProgress(),this.hs.setToastShown(!0),this.hs.unblockNextNotification(),this.hs.reset(e),this.$r()}whenComplete(){return this.Jr}}class us{constructor(t,e){this.oe=t,this.Xn=e,this.Xr=null,this._e=null,this.openPromise=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager()}getRequestPromise(){return this.Xr}C(){this.we.completeView(this._e)}async Zr(t){if(this.C(),!t.linked)throw c("not linked");this.we.popupClosed(),this.oe.callbacks().triggerFlowStarted(K.LINK_ACCOUNT),this.oe.eventManager().logSwgEvent(m.EVENT_SAVE_SUBSCRIPTION_SUCCESS);const e=new ls(this.oe,t);return await e.start(),this.oe.callbacks().triggerLinkProgress(),await e.whenComplete(),!0}async eo(t){if(t&&t.getRequested())try{const t=await this.Xn(),e=new P;if(null==t?void 0:t.token){if(t.authCode)throw new Error("Both authCode and token are available");e.setToken(t.token)}else{if(!(null==t?void 0:t.authCode))throw new Error("Neither token or authCode is available");e.setAuthCode(t.authCode)}return this._e.execute(e),t}catch(e){throw this.C(),e}}async start(){const t=this.o.addDefaultArguments({isClosable:!0});this._e=new g(this.t,this.o,Ut("/linksaveiframe"),t,!1,!0),this._e.on(x,(t=>{this.Xr=this.eo(t)})),this.openPromise=this.we.openView(this._e,!0),this.oe.eventManager().logSwgEvent(m.IMPRESSION_SAVE_SUBSCR_TO_GOOGLE);try{const t=await this._e.acceptResultAndVerify(Mt(),!0,!0);return await this.Zr(t)}catch(e){if(this.C(),u(e))return this.oe.eventManager().logSwgEvent(m.ACTION_SAVE_SUBSCR_TO_GOOGLE_CANCEL,!0),this.oe.callbacks().triggerFlowCanceled(K.LINK_ACCOUNT),!1;throw e}}}class cs{constructor(t){this.pe=t.eventManager()}sendSubscriptionState(t,e){if(!Ee(Hn,t))throw new Error("Invalid subscription state provided");if((Hn.SUBSCRIBER==t||Hn.PAST_SUBSCRIBER==t)&&!e)throw new Error("Entitlements must be provided for users with active or expired subscriptions");if(e&&!we(e))throw new Error("Entitlements must be an Object");let n=null;e&&(n=JSON.stringify(e)),this.pe.logEvent({eventType:m.EVENT_SUBSCRIPTION_STATE,eventOriginator:w.PUBLISHER_CLIENT,isFromUserAction:null,additionalParameters:{state:t,productsOrSkus:n}})}sendEvent(t){let e=null;if(!Ee($n,t.name)||!si(t.name))throw new Error("Invalid user event provided("+t.name+")");if(t.data){if(!we(t.data))throw new Error("Event data must be an Object("+t.data+")");e=Object.assign({},e,t.data)}if(Te(t.active))e||(e={}),Object.assign(e,{is_active:t.active});else if(null!=t.active)throw new Error("Event active must be a boolean");this.pe.logEvent({eventType:si(t.name),eventOriginator:w.PUBLISHER_CLIENT,isFromUserAction:t.active,additionalParameters:e})}}class ds{constructor(t){this.oe=t,this.openViewPromise=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this._e=new g(this.t,this.o,Ut("/loginiframe"),Gt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),userConsent:!1}),!0)}async start(){this.oe.callbacks().triggerFlowStarted(K.SHOW_LOGIN_NOTIFICATION),this.openViewPromise=this.we.openView(this._e);try{await this._e.acceptResult()}catch(t){throw this.we.completeView(this._e),t}this.we.completeView(this._e)}}class ps{constructor(t){this.oe=t,this.openViewPromise=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this._e=new g(this.t,this.o,Ut("/loginiframe"),Gt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId(),userConsent:!0}),!0)}async start(){this.oe.callbacks().triggerFlowStarted(K.SHOW_LOGIN_PROMPT),this.openViewPromise=this.we.openView(this._e);try{await this._e.acceptResult()}catch(t){throw u(t)?this.oe.callbacks().triggerFlowCanceled(K.SHOW_LOGIN_PROMPT):this.we.completeView(this._e),t}this.we.completeView(this._e)}}class gs{constructor(t,e){this.Pr=t,this.pi=e}getOffers(t=this.Pr.getProductId()){if(!t)throw new Error("getOffers requires productId in config or arguments");return this._i(t)}async _i(t){const e=kt("/publication/"+encodeURIComponent(this.Pr.getPublicationId())+"/offers?label="+encodeURIComponent(t));return(await this.pi.fetchCredentialedJson(e)).offers||[]}}class ms{constructor(t,e){let n,i,s;const r=t.indexOf(":");-1!=r?(i=t,n=i.substring(0,r),s=i.substring(r+1)):(n=t,i=null,s=null),this.di=n,this.io=i,this.j=s,this.so=e}getPublicationId(){return this.di}getProductId(){return this.io}getLabel(){return this.j}isLocked(){return this.so}}const fs="__SWG-SEEN__",ws="subscriptions-control",Es=["CreativeWork","Article","NewsArticle","Blog","Comment","Course","HowTo","Message","Review","WebPage"],bs=new RegExp(Es.join("|"));class Ts{constructor(t){this.ro=null,this.oo=null,this._=kn(t),this.ao=new Promise(((t,e)=>{this.ro=t,this.oo=e})),this.ho=new ys(this._),this.lo=new Ss(this._),this.uo=new Os(this._)}resolveConfig(){return Promise.resolve().then(this.check.bind(this)),this._.whenReady().then(this.check.bind(this)),this.ao}check(){if(!this.ro||!this.oo)return null;const t=this.ho.check()||this.lo.check()||this.uo.check();return t?(this.ro(t),this.ro=null,this.oo=null):this._.isReady()&&(this.oo("No config could be discovered in the page"),this.ro=null,this.oo=null),Q(t),t}}class Is{checkValue(t,e){return!("string"!=typeof t&&!Array.isArray(t))&&this.co(this.do(t),e)}checkSpaceDelimitedList(t,e){const n=t.split(/\s+/);return this.co(n,e)}co(t,e){for(let n of t)if(n=n.replace(/^http:\/\/schema.org\//i,""),e.includes(n))return!0;return!1}do(t){return Array.isArray(t)?t:[t]}}class ys{constructor(t){this._=t}check(){if(!this._.getBody())return null;const t=Ns(this._.getRootNode(),"subscriptions-product-id");if(!t)return null;const e=Ns(this._.getRootNode(),"subscriptions-accessible-for-free"),n=!(!e||"false"!==e.toLowerCase());return new ms(t,n)}}class Ss{constructor(t){this._=t,this.po=new Is}check(){if(!this._.getBody())return null;const t=this._.isReady(),e=Array.from(this._.getRootNode().querySelectorAll('script[type="application/ld+json"]'));for(let n=0;n<e.length;n++){const i=e[n];if(i[fs]||!i.textContent||!t&&!l(i))continue;if(i[fs]=!0,!bs.test(i.textContent))continue;const s=this.mo(i);if(s)return s}return null}mo(t){let e=ht(t.textContent);if(!e)return null;Array.isArray(e)||(e=[e]);let n=e;for(let i=0;i<n.length;i++){const t=n[i];if(t["@graph"]&&Array.isArray(t["@graph"])&&(n=n.concat(t["@graph"])),!this.po.checkValue(t["@type"],Es))continue;let e=null;const s=this._o(t,"isPartOf");if(s)for(let n=0;n<s.length&&(e=this.fo(s[n]),!e);n++);if(!e)continue;const r=this.wo(this.Eo(t,"isAccessibleForFree"),!0);return new ms(e,!r)}return null}wo(t,e){if("boolean"==typeof t)return t;if("string"==typeof t){const e=t.toLowerCase();if("false"===e)return!1;if("true"===e)return!0}return e}fo(t){return this.po.checkValue(t["@type"],["Product"])?this.Eo(t,"productID"):null}_o(t,e){const n=t[e];return null==n||""===n?null:Array.isArray(n)?n:[n]}Eo(t,e){const n=this._o(t,e),i=n&&n[0];return null==i||""===i?null:i}}class Os{constructor(t){this._=t,this.bo=null,this.io=null,this.po=new Is}To(t){const e=t.querySelectorAll("[itemprop='isAccessibleForFree']");for(let n=0;e[n];n++){const t=e[n],i=t.getAttribute("content")||t.textContent;if(i&&this.Io(t,"alreadySeenForAccessInfo")){let t=null;return"true"===i.toLowerCase()?t=!0:"false"===i.toLowerCase()&&(t=!1),t}}return null}Io(t,e){for(let n=t;n&&!n[e];n=n.parentNode)if(n[e]=!0,n.hasAttribute&&n.hasAttribute("itemscope")&&n.hasAttribute("itemtype")){const t=n.getAttribute("itemtype");return this.po.checkSpaceDelimitedList(t,Es)}return!1}fo(t){const e=t.querySelectorAll('[itemprop="productID"]');for(let n=0;e[n];n++){const t=e[n],i=t.getAttribute("content")||t.textContent,s=t.closest("[itemtype][itemscope]");if(!(s.getAttribute("itemtype").indexOf("http://schema.org/Product")<=-1)&&this.Io(s.parentElement,"alreadySeenForProductInfo"))return i}return null}yo(){let t=null;return null!=this.bo?t=!this.bo:this._.isReady()&&(t=!1),null!=this.io&&null!=t?new ms(this.io,t):null}mo(){const t=Array.prototype.slice.call(this._.getRootNode().querySelectorAll("[itemscope][itemtype]")).filter((t=>this.po.checkSpaceDelimitedList(t.getAttribute("itemtype"),Es)));for(const e of t){null==this.bo&&(this.bo=this.To(e)),this.io||(this.io=this.fo(e));const t=this.yo();if(t)return t}return null}check(){return this._.getBody()?this.mo():null}}function Ns(t,e){const n=t.querySelector('meta[name="'.concat(e,'"]'));return n?n.getAttribute("content"):null}const Cs=$t(ge),Rs=2147483647,As={Environment:{LOCAL:"LOCAL",PREPROD:"PREPROD",PRODUCTION:"PRODUCTION",SANDBOX:"SANDBOX",TEST:"TEST",TIN:"TIN"},PaymentMethod:{CARD:"CARD",TOKENIZED_CARD:"TOKENIZED_CARD",UPI:"UPI"},AuthMethod:{CRYPTOGRAM_3DS:"CRYPTOGRAM_3DS",PAN_ONLY:"PAN_ONLY"},ResponseStatus:{CANCELED:"CANCELED",DEVELOPER_ERROR:"DEVELOPER_ERROR"},TotalPriceStatus:{ESTIMATED:"ESTIMATED",FINAL:"FINAL",NOT_CURRENTLY_KNOWN:"NOT_CURRENTLY_KNOWN"},ButtonType:{SHORT:"short",LONG:"long"},ButtonColor:{DEFAULT:"default",BLACK:"black",WHITE:"white"},Id:{POPUP_WINDOW_CONTAINER:"popup-window-container"},STORAGE_KEY_PREFIX:"google.payments.api.storage"}; /** * @license * 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. */As.IS_READY_TO_PAY_RESULT_KEY=As.STORAGE_KEY_PREFIX+".isreadytopay.result",As.UPI_CAN_MAKE_PAYMENT_CACHE_KEY=As.STORAGE_KEY_PREFIX+".upi.canMakePaymentCache",As.CLASS_PREFIX="google-payments-",As.IFRAME_ACTIVE_CONTAINER_CLASS="".concat(As.CLASS_PREFIX,"activeContainer"),As.IFRAME_CONTAINER_CLASS="".concat(As.CLASS_PREFIX,"dialogContainer"),As.IFRAME_STYLE_CENTER_CLASS="".concat(As.CLASS_PREFIX,"dialogCenter"),As.IFRAME_STYLE_CLASS="".concat(As.CLASS_PREFIX,"dialog"),As.IFRAME_STYLE="\n.".concat(As.IFRAME_STYLE_CLASS," {\n animation: none 0s ease 0s 1 normal none running;\n background: none 0 0 / auto repeat scroll padding-box border-box #fff;\n background-blend-mode: normal;\n border: 0 none #333;\n border-radius: 8px 8px 0 0;\n border-collapse: separate;\n bottom: 0;\n box-shadow: #808080 0 3px 0 0, #808080 0 0 22px;\n box-sizing: border-box;\n letter-spacing: normal;\n max-height: 100%;\n overflow: visible;\n position: fixed;\n width: 100%;\n z-index: ").concat(Rs,";\n -webkit-appearance: none;\n left: 0;\n}\n@media (min-width: 480px) {\n .").concat(As.IFRAME_STYLE_CLASS," {\n width: 480px !important;\n left: -240px !important;\n margin-left: calc(100vw - 100vw / 2) !important;\n }\n}\n.").concat(As.IFRAME_CONTAINER_CLASS," {\n background-color: rgba(0,0,0,0.26);\n bottom: 0;\n height: 100%;\n left: 0;\n position: absolute;\n right: 0;\n}\n.iframeContainer {\n -webkit-overflow-scrolling: touch;\n}\n"),As.IFRAME_STYLE_CENTER="\n.".concat(As.IFRAME_STYLE_CENTER_CLASS," {\n animation: none 0s ease 0s 1 normal none running;\n background-blend-mode: normal;\n background: none 0 0 / auto repeat scroll padding-box border-box #fff;\n border-collapse: separate;\n border-radius: 8px;\n border: 0px none #333;\n bottom: auto;\n box-shadow: #808080 0 0 22px;\n box-sizing: border-box;\n left: -240px;\n letter-spacing: normal;\n margin-left: calc(100vw - 100vw / 2) !important;\n max-height: 90%;\n overflow: visible;\n position: absolute;\n top: 100%;\n transform: scale(0.8);\n width: 480px;\n z-index: ").concat(Rs,";\n -webkit-appearance: none;\n}\n@media (min-height: 667px) {\n .").concat(As.IFRAME_STYLE_CENTER_CLASS," {\n max-height: 600px;\n }\n}\n.").concat(As.IFRAME_ACTIVE_CONTAINER_CLASS," {\n top: 50%;\n transform: scale(1.0) translateY(-50%);\n}\n"),As.GPAY_BUTTON_WITH_CARD_INFO_IMAGE="background-image: url(https://pay.google.com/gp/p/generate_gpay_btn_img);",As.BUTTON_LOCALE_TO_MIN_WIDTH={en:152,bg:163,cs:192,de:183,es:183,fr:183,hr:157,id:186,ja:148,ko:137,ms:186,nl:167,pl:182,pt:193,ru:206,sk:157,sl:211,sr:146,tr:161,uk:207,zh:156},As.GPAY_GRAYPANE="gpay-graypane",As.GPAY_BUTTON_CLASS="gpay-button",As.BUTTON_STYLE="\n.".concat(As.GPAY_BUTTON_CLASS," {\n background-origin: content-box;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: contain;\n border: 0px;\n border-radius: 4px;\n box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 1px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;\n cursor: pointer;\n height: 40px;\n min-height: 40px;\n padding: 11px 24px;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".black {\n background-color: #000;\n box-shadow: none;\n padding: 12px 24px 10px;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".white {\n background-color: #fff;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".short {\n min-width: 90px;\n width: 160px;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".black.short {\n background-image: url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg);\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".white.short {\n background-image: url(https://www.gstatic.com/instantbuy/svg/light_gpay.svg);\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".black.active {\n background-color: #5f6368;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".black.hover {\n background-color: #3c4043;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".white.active {\n background-color: #fff;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".white.focus {\n box-shadow: #e8e8e8 0 1px 1px 0, #e8e8e8 0 1px 3px;\n}\n\n.").concat(As.GPAY_BUTTON_CLASS,".white.hover {\n background-color: #f8f8f8;\n}\n"),As.GPAY_BUTTON_WITH_OFFER_ICON_ADDITIONAL_STYLE="position: relative;",As.GPAY_OFFER_ICON_CLASS="gpay-offer-icon",As.GPAY_OFFER_ICON_SVG='<svg width="20px" height="20px" viewBox="0 0 20 20" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" class="gpay-offer-icon"><defs><path d="M19.41,9.58 L10.41,0.58 C10.05,0.22 9.55,0 9,0 L2,0 C0.9,0 0,0.9 0,2 L0,9 C0,9.55 0.22,10.05 0.59,10.42 L9.59,19.42 C9.95,19.78 10.45,20 11,20 C11.55,20 12.05,19.78 12.41,19.41 L19.41,12.41 C19.78,12.05 20,11.55 20,11 C20,10.45 19.77,9.94 19.41,9.58 Z" id="path-1"></path></defs><g id="buttons_10.05" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Artboard" transform="translate(-40.000000, -43.000000)"><g id="Group-3" transform="translate(40.000000, 43.000000)"><g id="Group-2-Copy-2"><g id="Group-Copy"><g id="ic_loyalty_24px"><mask id="mask-2" fill="white"><use xlink:href="#path-1"></use></mask><use id="gpay-Shape" fill="#FF6100" fill-rule="nonzero" xlink:href="#path-1"></use><path d="M3.5,5 C2.67,5 2,4.33 2,3.5 C2,2.67 2.67,2 3.5,2 C4.33,2 5,2.67 5,3.5 C5,4.33 4.33,5 3.5,5 Z" id="Path" fill="#FFFFFF" fill-rule="nonzero" mask="url(#mask-2)"></path></g></g></g><g id="Group-13-Copy-7" transform="translate(6.000000, 6.000000)" fill="#FFFFFF" fill-rule="nonzero"><g id="Group-13-Copy-2"><path d="M2.15217391,4.55172414 C0.963561082,4.55172414 1.99840144e-14,3.53278598 1.99840144e-14,2.27586207 C1.99840144e-14,1.01893816 0.963561082,6.30606678e-14 2.15217391,6.30606678e-14 C3.34078674,6.30606678e-14 4.30434783,1.01893816 4.30434783,2.27586207 C4.30434783,3.53278598 3.34078674,4.55172414 2.15217391,4.55172414 Z M2.15217391,3.31034483 C2.69245247,3.31034483 3.13043478,2.84719112 3.13043478,2.27586207 C3.13043478,1.70453302 2.69245247,1.24137931 2.15217391,1.24137931 C1.61189535,1.24137931 1.17391304,1.70453302 1.17391304,2.27586207 C1.17391304,2.84719112 1.61189535,3.31034483 2.15217391,3.31034483 Z" id="Combined-Shape"></path><path d="M6.84782609,9 C5.65921326,9 4.69565217,7.98106184 4.69565217,6.72413793 C4.69565217,5.46721402 5.65921326,4.44827586 6.84782609,4.44827586 C8.03643892,4.44827586 9,5.46721402 9,6.72413793 C9,7.98106184 8.03643892,9 6.84782609,9 Z M6.84782609,7.75862069 C7.38810465,7.75862069 7.82608696,7.29546698 7.82608696,6.72413793 C7.82608696,6.15280888 7.38810465,5.68965517 6.84782609,5.68965517 C6.30754753,5.68965517 5.86956522,6.15280888 5.86956522,6.72413793 C5.86956522,7.29546698 6.30754753,7.75862069 6.84782609,7.75862069 Z" id="Combined-Shape"></path><polygon id="Rectangle" transform="translate(4.497720, 4.541938) rotate(34.000000) translate(-4.497720, -4.541938) " points="3.77901778 -0.202295978 4.9740273 -0.171019161 5.21642263 9.28617278 4.02141311 9.25489596"></polygon></g></g></g></g></g></svg>',As.GPAY_OFFER_ICON_STYLE="\n.".concat(As.GPAY_OFFER_ICON_CLASS," {\n position: absolute;\n right: -5px;\n top: -5px;\n}\n\n#ic_loyalty_24px use.hover {\n fill: #FC853B;\n}\n"),As.GPAY_OFFER_DESCRIPTION_CLASS="gpay-offer-description",As.GPAY_OFFER_DESCRIPTION_STYLE="\n@import url(//fonts.googleapis.com/css?family=Google+Sans:500);\n.".concat(As.GPAY_OFFER_DESCRIPTION_CLASS," {\n text-align: center;\n font: 10px 'Google Sans';\n margin-top: 2px;\n margin-bottom: 0px;\n}\n\n.").concat(As.GPAY_OFFER_DESCRIPTION_CLASS,".gpay-btn-clicked {\n color: #3C4043;\n}\n\n.").concat(As.GPAY_OFFER_DESCRIPTION_CLASS,".short {\n min-width: 90px;\n width: 160px;\n}\n\n.").concat(As.GPAY_OFFER_DESCRIPTION_CLASS,".long {\n min-width: 152px;\n width: 240px;\n}\n"),As.GPAY_BUTTON_CARD_INFO_CLASS="gpay-card-info-btn",As.GPAY_BUTTON_CARD_INFO_BUTTON_STYLE="\n .".concat(As.GPAY_BUTTON_CARD_INFO_CLASS," {\n background-origin: content-box;\n background-position: center center;\n background-repeat: no-repeat;\n background-size: contain;\n border: 0px;\n border-radius: 4px;\n box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 1px 0px, rgba(60, 64, 67, 0.15) 0px 1px 3px 1px;\n cursor: pointer;\n height: 40px;\n min-height: 40px;\n padding: 11px 24px;\n background-color: #000;\n box-shadow: none;\n padding: 9px 24px 10px;\n min-width: 190px;\n width: 240px;\n }\n\n .").concat(As.GPAY_BUTTON_CARD_INFO_CLASS,".active {\n background-color: #5f6368;\n }\n\n .").concat(As.GPAY_BUTTON_CARD_INFO_CLASS,".hover {\n background-color: #3c4043;\n }\n "),As.TRUSTED_DOMAIN=".google.com"; /** * @license * 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. */ class vs{constructor(t){this.So=t}postMessage(t,e){this.So.postMessage(t,e)}} /** * @license * 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. */let Ps=null,xs=null,Ls=null,Ms=null,ks=Date.now(),Ds=null,Us=!1,Gs=[];class js{static load(){if(Ps)return;const t=window.gpayInitParams||{};Ls=t.environment||As.Environment.PRODUCTION,Ps=document.createElement("iframe"),Ps.src=js.Oo(window.location.origin,t.merchantInfo&&t.merchantInfo.merchantId),js.postMessage({eventType:15,clientLatencyStartMs:Date.now()}),Ps.height="0",Ps.width="0",Ps.style.display="none",Ps.style.visibility="hidden",Ps.onload=function(){js.postMessage({eventType:17,clientLatencyStartMs:Date.now()}),js.iframeLoaded()},document.body?js.No():document.addEventListener("DOMContentLoaded",(()=>js.No()))}static No(){document.body.appendChild(Ps),xs=new vs(Ps.contentWindow)}static sendAndWaitForResponse(t,e,n,i){js.Co((function t(e){e.data[n]&&(i(e),js.Ro(t))}));const s=Object.assign({eventType:e},t);js.postMessage(s)}static Co(t){window.addEventListener("message",t)}static Ro(t){window.removeEventListener("message",t)}static postMessage(t){if(!Us)return void Gs.push(t);const e=Object.assign({buyFlowActivityMode:Ds,googleTransactionId:Ms,originTimeMs:ks},t);xs.postMessage(e,js.Ao())}static setBuyFlowActivityMode(t){Ds=t}static setGoogleTransactionId(t){Ms=t}static setOriginTimeMs(t){ks=t}static setPostMessageService(t){xs=t}static reset(){Ps=null,Gs.length=0,Us=!1,Ds=null}static setIframeLoaded(t){Us=t}static iframeLoaded(){Us=!0,Gs.forEach((function(t){js.postMessage(t)})),Gs.length=0}static getBuffer(){return Gs}static injectIframeForTesting(){js.reset(),Ps=document.createElement("p"),js.iframeLoaded()}static Ao(){let t="https://pay";return Ls==As.Environment.SANDBOX?t+=".sandbox":Ls==As.Environment.PREPROD&&(t+="-preprod.sandbox"),t+".google.com"}static Oo(t,e){return"https://pay".concat(Ls==As.Environment.PREPROD?"-preprod.sandbox":Ls==As.Environment.SANDBOX?".sandbox":"",".google.com/gp/p/ui/payframe?origin=").concat(t,"&mid=%{merchantId}")}} /** * @license * 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. */class Fs{constructor(t){this.vo=t,this.Xn=null}onResult(t){this.Xn=t}isReadyToPay(t){const e=this.Po(t);return new Promise(((n,i)=>{e.canMakePayment().then((e=>{window.sessionStorage.setItem(As.IS_READY_TO_PAY_RESULT_KEY,e.toString());const i={result:e};t.apiVersion>=2&&t.existingPaymentMethodRequired&&(i.paymentMethodPresent=e),n(i)})).catch((function(t){window.sessionStorage.getItem(As.IS_READY_TO_PAY_RESULT_KEY)?n({result:"true"==window.sessionStorage.getItem(As.IS_READY_TO_PAY_RESULT_KEY)}):n({result:!1})}))}))}prefetchPaymentData(t){this.Po(t,this.vo,t.transactionInfo.currencyCode,t.transactionInfo.totalPrice)}loadPaymentData(t){this.xo(t)}Po(t,e,n,i){let s={};return t&&(s=JSON.parse(JSON.stringify(t))),s.apiVersion||(s.apiVersion=1),s.swg&&(s.allowedPaymentMethods=[As.PaymentMethod.CARD]),e&&e==As.Environment.TEST&&(s.environment=e),new PaymentRequest([{supportedMethods:["https://google.com/pay"],data:s}],{total:{label:"Estimated Total Price",amount:{currency:n||"USD",value:i||"0"}}})}xo(t){const e=t.transactionInfo&&t.transactionInfo.currencyCode||void 0,n=t.transactionInfo&&t.transactionInfo.totalPrice||void 0,i=this.Po(t,this.vo,e,n);this.Xn(i.show().then((t=>(t.complete("success"),t.details))).catch((function(t){throw t.statusCode=As.ResponseStatus.CANCELED,t})))}} /** * @license * 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. */class zs{constructor(t){this._=t,this.Lo=t.createElement(As.GPAY_GRAYPANE),Bs(this.Lo,{"z-index":2147483647,display:"none",position:"fixed",top:0,right:0,bottom:0,left:0,"background-color":"rgba(32, 33, 36, .6)"}),this.Mo=null,this.Lo.addEventListener("click",(()=>{if(this.Mo)try{this.Mo.focus()}catch(t){}}))}show(t){return this.Mo=t||null,this._.body.appendChild(this.Lo),Bs(this.Lo,{display:"block",opacity:0}),Ws(this.Lo,{opacity:1},300,"ease-out")}hide(){if(this.Mo=null,this.Lo.parentElement)return Ws(this.Lo,{opacity:0},300,"ease-out").then((()=>{Bs(this.Lo,{display:"none"}),this._.body.removeChild(this.Lo)}))}}function Bs(t,e){for(const n in e)t.style.setProperty(n,e[n].toString(),"important")}function Ws(t,e,n,i){const s=t.ownerDocument.defaultView,r=t.style.transition||"";return new Promise((r=>{s.setTimeout((()=>{s.setTimeout(r,n);const o="".concat(n,"ms ").concat(i);Bs(t,Object.assign({transition:"transform ".concat(o,", opacity ").concat(o)},e))}))})).then((()=>{Bs(t,Object.assign({transition:r},e))}))} /** * @license * 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. */function Vs(){if(-1!=window.navigator.userAgent.indexOf("OPR/"))return!1;const t=window.navigator.userAgent.match(/Android/i),e=window.navigator.userAgent.match(/Chrome\/([0-9]+)\./i);return null!=t&&"PaymentRequest"in window&&"Google Inc."==window.navigator.vendor&&null!=e&&Number(e[1])>=59}function Ys(t){if(t.apiVersion>=2){const e=Xs(t);if(e&&1==e.length&&e[0]==As.AuthMethod.CRYPTOGRAM_3DS)return!0}return 1==t.allowedPaymentMethods.length&&t.allowedPaymentMethods[0]==As.PaymentMethod.TOKENIZED_CARD}function Ks(t,e){if(t.apiVersion>=2){const n=Xs(t);return!(!n||!n.includes(e))}return!1}function qs(){return window.location.hostname.endsWith(As.TRUSTED_DOMAIN)||void 0===window.isSecureContext||window.isSecureContext?null:"Google Pay APIs should be called in secure context!"}function Hs(t){return Object.values(As.PaymentMethod).includes(t)}function $s(t){return Object.values(As.AuthMethod).includes(t)}function Js(t){if(!t)return"paymentDataRequest must be set!";if(t.swg)return(e=t.swg)?e.skuId&&e.publicationId?null:"Both skuId and publicationId must be provided":"Swg parameters must be provided";var e;if(!t.transactionInfo)return"transactionInfo must be set!";if(!t.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set!";if(!t.transactionInfo.totalPriceStatus||!Object.values(As.TotalPriceStatus).includes(t.transactionInfo.totalPriceStatus))return"totalPriceStatus in transactionInfo must be set to one of NOT_CURRENTLY_KNOWN, ESTIMATED or FINAL!";if("NOT_CURRENTLY_KNOWN"!==t.transactionInfo.totalPriceStatus&&!t.transactionInfo.totalPrice)return"totalPrice in transactionInfo must be set when totalPriceStatus is ESTIMATED or FINAL!";const n=Qs(t);if(n){if(!n.parameters)return"parameters must be set in allowedPaymentMethod!";var i=n.parameters;if(!i.payeeVpa)return"payeeVpa in allowedPaymentMethod parameters must be set!";if(!i.payeeName)return"payeeName in allowedPaymentMethod parameters must be set!";if(!i.referenceUrl)return"referenceUrl in allowedPaymentMethod parameters must be set!";if(!i.mcc)return"mcc in allowedPaymentMethod parameters must be set!";if(!i.transactionReferenceId)return"transactionReferenceId in allowedPaymentMethod parameters must be set!";if("INR"!==t.transactionInfo.currencyCode)return"currencyCode in transactionInfo must be set to INR!";if("FINAL"!==t.transactionInfo.totalPriceStatus)return"totalPriceStatus in transactionInfo must be set to FINAL!";if(!t.transactionInfo.transactionNote)return"transactionNote in transactionInfo must be set!"}return null}function Qs(t){return!Vs()||t.apiVersion<2||!t.allowedPaymentMethods?null:Zs(t,As.PaymentMethod.UPI)}function Xs(t){if(t.allowedPaymentMethods){const e=Zs(t,As.PaymentMethod.CARD);if(e&&e.parameters)return e.parameters.allowedAuthMethods}return null}function Zs(t,e){for(var n=0;n<t.allowedPaymentMethods.length;n++){const i=t.allowedPaymentMethods[n];if(i.type==e)return i}return null} /** * @license * 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. */ /** * @license * 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. */ const{ActivityPort:tr,ActivityPorts:er,ActivityIframePort:nr}=Cs,ir="GPAY",sr="height ".concat(250,"ms"),rr="Safari";class or{constructor(t,e,n,i,s){this.vo=t,this.activities=i||new er(window),this.Ni=new zs(window.document),this.Xn=null,this.Do=null,this.Uo=!1,this.m=null,this.Go=null,this.jo=e,this.Fo=s||null,this.zo=null}onResult(t){this.Xn||(this.Xn=t,this.activities.onResult(ir,this.Bo.bind(this)))}Bo(t){this.Ni.hide(),this.Xn(t.acceptResult().then((t=>{if(t.origin!=this.Wo())throw new Error("channel mismatch");const e=t.data;if(e.redirectEncryptedCallbackData)return js.setBuyFlowActivityMode(3),this.Vo(e.redirectEncryptedCallbackData).then((t=>{const n=Object.assign({},e);return delete n.redirectEncryptedCallbackData,Object.assign(n,t)}));if(!t.originVerified||!t.secureChannel)throw new Error("channel mismatch");return e}),(t=>{const e=t.message;let n=t.message;try{n=JSON.parse(e.substring(7))}catch(i){}return n.statusCode&&-1==["DEVELOPER_ERROR","MERCHANT_ACCOUNT_ERROR"].indexOf(n.statusCode)&&(n={statusCode:"CANCELED"}),"AbortError"==n&&(n={statusCode:"CANCELED"}),Promise.reject(n)})))}Vo(t){return new Promise(((e,n)=>{const i=this.Yo(),s=new XMLHttpRequest;s.open("POST",i,!0),"withCredentials"in s&&(s.withCredentials=!0),s.onreadystatechange=()=>{if(!(s.readyState<2)){if(s.status<100||s.status>599)return s.onreadystatechange=null,void n(new Error("Unknown HTTP status ".concat(s.status)));if(4==s.readyState)try{e(JSON.parse(s.responseText))}catch(t){n(t)}}},s.onerror=()=>{n(new Error("Network failure"))},s.onabort=()=>{n(new Error("Request aborted"))},s.send(t)}))}isReadyToPay(t){return new Promise(((e,n)=>{if(Ys(t))return void e({result:!1});const i=window.navigator.userAgent;if(i.indexOf("GSA/")>0&&i.indexOf(rr)>0)return void e({result:!1});if(i.indexOf("FxiOS")>0)return void e({result:!1});const s=i.indexOf("Chrome")>0||i.indexOf("Firefox")>0||i.indexOf(rr)>0;s&&t.apiVersion>=2&&t.existingPaymentMethodRequired?(t.environment=this.vo,js.sendAndWaitForResponse(t,6,"isReadyToPayResponse",(n=>{const i={result:s};t.existingPaymentMethodRequired&&(i.paymentMethodPresent="READY_TO_PAY"==n.data.isReadyToPayResponse),e(i)}))):e({result:s})}))}prefetchPaymentData(t){}loadPaymentData(t){t.swg||t.apiVersion||(t.apiVersion=1),t.environment=this.vo,js.setBuyFlowActivityMode(t.forceRedirect?3:2);const e=this.activities.open(ir,this.Ko(),this.qo(t),t,{width:600,height:600});this.Ni.show(e&&e.targetWin)}qo(t){return t.forceRedirect?"_top":"gp-js-popup"}Wo(){if(this.vo==As.Environment.LOCAL)return"";let t;return t=this.vo==As.Environment.PREPROD?"pay-preprod.sandbox":this.vo==As.Environment.SANDBOX?"pay.sandbox":"pay","https://"+t+".google.com"}Ho(){return this.Wo()+"/gp/p"}Yo(){let t=this.Ho()+"/apis/buyflow/process";return this.Fo&&(t+="?rk="+encodeURIComponent(this.Fo)),t}Ko(){return this.vo==As.Environment.TIN?"/ui/pay":this.Ho()+"/ui/pay?swg=true"}getIframeUrl(t,e){let n="https://pay.google.com/gp/p/ui/pay?origin=".concat(e,"&swg=true");return t!=As.Environment.SANDBOX&&t!=As.Environment.PREPROD||(n="https://pay'+ (environment == Constants.Environment.PREPROD ? '-preprod' : '')+ '.sandbox.google.com/gp/p/ui/pay?origin=".concat(e,"&swg=true")),n}$o(t,e){this.Jo(e,"all 250ms ease 0s"),e.height="0px",setTimeout((()=>{t.parentNode&&t.parentNode.removeChild(t)}),250)}Qo(t){const e=function(t){const e=document.createElement("div");e.classList.add(As.IFRAME_CONTAINER_CLASS);const n=document.createElement("div");n.classList.add("iframeContainer");const i=document.createElement("iframe");return i.classList.add(t),i.setAttribute("frameborder","0"),i.setAttribute("scrolling","no"),n.appendChild(i),e.appendChild(n),document.body.appendChild(e),{container:e,iframe:i}}(this.Xo(t)?As.IFRAME_STYLE_CENTER_CLASS:As.IFRAME_STYLE_CLASS),n=e.iframe,i=e.container;return i.addEventListener("click",this.Zo.bind(this,e)),i.style.display="none",n.style.display="none",n.height="0px",this.Jo(n,"all 250ms ease 0s"),this.Uo=!1,e}ta(t){this.ea(t)}Zo(t){t.container.parentNode&&history.back()}ea(t){t.container.parentNode&&(this.Go(Promise.reject({errorCode:"CANCELED"})),this.$o(t.container,t.iframe),this.m&&this.m.disconnect())}Xo(t){return null}na(t,e,n){t.style.display="block",e.style.display="block",setTimeout((()=>{e.height="280px",this.Xo(n)&&e.classList.add(As.IFRAME_ACTIVE_CONTAINER_CLASS),setTimeout((()=>{this.Uo=!0,this.zo&&(this.Jo(e,this.zo.transition),e.height=this.zo.height,this.zo=null)}),250)}),1)}Jo(t,e){t.style.setProperty("transition",e),t.style.setProperty("-webkit-transition",e)}ia(t,e,n){let i;n.swg||n.apiVersion||(n.apiVersion=1),n.environment=this.vo;const s=this.getIframeUrl(this.vo,window.location.origin);return this.activities.openIframe(e,s,n).then((t=>(this.m=t,t.onMessage((t=>{"resize"===t.type&&this.Uo?(i||(i=Date.now()),Date.now()<i+250?this.Jo(e,t.transition+", "+sr):this.Jo(e,t.transition),e.height=t.height):this.zo={height:t.height,transition:t.transition}})),t.acceptResult()))).then((n=>(this.$o(t,e),history.back(),n.data)),(n=>(this.$o(t,e),history.back(),Promise.reject(n))))}} /** * @license * 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. */class ar{constructor(){}isUpiRequest(t){return!!Qs(t)}isReadyToPay(t){if(Qs(t))return t.existingPaymentMethodRequired?Promise.resolve({result:!0,paymentMethodPresent:!0}):Promise.resolve({result:!0});throw new Error("No Upi payment method found in handler")}loadPaymentData(t,e,n){const i=e.parameters,s=t.transactionInfo,r=[{supportedMethods:["https://tez.google.com/pay"],data:{pa:i.payeeVpa,pn:i.payeeName,tr:i.transactionReferenceId,url:i.referenceUrl,mc:i.mcc,tn:s.transactionNote}}];i.transactionId&&(r[0].data.tid=i.transactionId);const o={total:{label:"Total",amount:{currency:s.currencyCode,value:s.totalPrice}},displayItems:[{label:"Original Amount",amount:{currency:s.currencyCode,value:s.totalPrice}}]};let a=new PaymentRequest(r,o);n(this.sa(a).then((t=>t?this.ra(a):this.oa())).then((n=>this.aa(n,t,e))).catch((t=>(t.statusCode=As.ResponseStatus.CANCELED,Promise.reject(t)))))}ra(t){return t.show().then((t=>(t.complete("success"),t.details)))}sa(t){const e=window.sessionStorage.getItem(As.UPI_CAN_MAKE_PAYMENT_CACHE_KEY);return e?Promise.resolve("true"===e):t.canMakePayment?t.canMakePayment().then((t=>(t&&window.sessionStorage.setItem(As.UPI_CAN_MAKE_PAYMENT_CACHE_KEY,t.toString()),t))):Promise.resolve(!0)}oa(){return window.location.replace("https://play.google.com/store/apps/details?id=com.google.android.apps.nbu.paisa.user"),Promise.reject({errorMessage:"Cannot redirect to Tez page in Google Play."})}aa(t,e,n){const i=JSON.parse(t.tezResponse);if("FAILURE"===i.Status){let t;switch(i.responseCode){case"ZM":t={errorCode:3,errorMessage:"Payment failure due to invalid MPIN."};break;case"Z9":t={errorCode:3,errorMessage:"Payment failure due to insufficient funds."};break;case"91":t={errorCode:1,errorMessage:"Payment failure due to transaction timeout or connection issue."};break;default:t={errorMessage:"Payment cancelled."}}return Promise.reject(t)}const s={paymentMethodType:"UPI",payeeVpa:n.parameters.payeeVpa,status:i.Status,transactionReferenceId:n.parameters.transactionReferenceId,transactionId:n.parameters.transactionId?n.parameters.transactionId:i.txnId,transactionInfo:e.transactionInfo};let r={apiVersion:e.apiVersion,apiVersionMinor:e.apiVersionMinor,paymentMethodData:{type:n.type,tokenizationData:{type:"DIRECT",token:{protocolVersion:"ECv1",signature:"",signedMessage:s}}}};return Promise.resolve(r)}} /** @license 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. */class hr{}var lr="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split("");hr.uuid=function(t,e){var n,i,s=lr,r=[];if(e=e||s.length,t)for(n=0;n<t;n++)r[n]=s[0|Math.random()*e];else for(r[8]=r[13]=r[18]=r[23]="-",r[14]="4",n=0;n<36;n++)r[n]||(i=0|16*Math.random(),r[n]=s[19==n?3&i|8:i]);return r.join("")},hr.uuidFast=function(){for(var t,e=lr,n=new Array(36),i=0,s=0;s<36;s++)8==s||13==s||18==s||23==s?n[s]="-":14==s?n[s]="4":(i<=2&&(i=33554432+16777216*Math.random()|0),t=15&i,i>>=4,n[s]=e[19==s?3&t|8:t]);return n.join("")},hr.uuidCompact=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(t){var e=16*Math.random()|0;return("x"==t?e:3&e|8).toString(16)}))}; /** * @license * 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. */ const ur=["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"];class cr{constructor(t,e,n,i){ /** * @license * 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 s;this.ha=e,function(t){if(t.environment&&!Object.values(As.Environment).includes(t.environment))throw new Error("Parameter environment in PaymentOptions can optionally be set to PRODUCTION, otherwise it defaults to TEST. "+t.environment)}(t),this.la=null,this.vo=t.environment||As.Environment.TEST,cr.jo||(cr.jo=this.ua()&&t.i&&t.i.googleTransactionId?t.i.googleTransactionId:(s=this.vo,hr.uuidFast()+"."+s)),this.ca=t,this.da=new or(this.vo,cr.jo,n,i,t.i&&t.i.redirectKey),this.ma=5;const r=Vs();this._a=r&&!n?new Fs(this.vo):this.da,this.fa=new ar,this.da.onResult(this.wa.bind(this)),this._a.onResult(this.wa.bind(this)),js.load(),r&&js.setBuyFlowActivityMode(4),js.setGoogleTransactionId(cr.jo),js.postMessage({eventType:9,clientLatencyStartMs:Date.now()}),window.addEventListener("message",(t=>this.Ea(t)))}isReadyToPay(t){t&&(t=Object.assign({},this.ca,t));const e=Date.now(),n=qs()||function(t){if(!t)return"isReadyToPayRequest must be set!";if(t.apiVersion>=2){if(!("apiVersionMinor"in t))return"apiVersionMinor must be set!";if(!t.allowedPaymentMethods||!Array.isArray(t.allowedPaymentMethods)||0==t.allowedPaymentMethods.length)return"for v2 allowedPaymentMethods must be set to an array containing a list of accepted payment methods";for(var e=0;e<t.allowedPaymentMethods.length;e++){let s=t.allowedPaymentMethods[e];if(s.type==As.PaymentMethod.CARD){if(!s.parameters)return"Field parameters must be setup in each allowedPaymentMethod";var n=s.parameters.allowedCardNetworks;if(!n||!Array.isArray(n)||0==n.length)return"allowedCardNetworks must be setup in parameters for type CARD";var i=s.parameters.allowedAuthMethods;if(!i||!Array.isArray(i)||0==i.length||!i.every($s))return"allowedAuthMethods must be setup in parameters for type 'CARD' and must contain 'CRYPTOGRAM_3DS' and/or 'PAN_ONLY'"}}return null}return t.allowedPaymentMethods&&Array.isArray(t.allowedPaymentMethods)&&0!=t.allowedPaymentMethods.length&&t.allowedPaymentMethods.every(Hs)?null:"allowedPaymentMethods must be set to an array containing 'CARD' and/or 'TOKENIZED_CARD'!"}(t);if(n)return new Promise(((t,e)=>{cr.ba("isReadyToPay",n),js.postMessage({eventType:0,error:2}),e({statusCode:As.ResponseStatus.DEVELOPER_ERROR,statusMessage:n})}));const i=this.Ta(t);return i.then((t=>(js.postMessage({eventType:0,clientLatencyStartMs:e,isReadyToPayApiResponse:t}),t))),i}Ta(t){if(this.fa.isUpiRequest(t))return this.fa.isReadyToPay(t);if(Vs()&&!dr(t)){if(t.apiVersion>=2)return this.Ia(t);{const e=this.da.isReadyToPay(t),n=this._a.isReadyToPay(t);return Ys(t)?n:n.then((()=>e))}}return this.da.isReadyToPay(t)}Ia(t){let e=Promise.resolve({result:!1});t.existingPaymentMethodRequired&&(e=Promise.resolve({result:!1,paymentMethodPresent:!1}));let n=e;if(Ks(t,As.AuthMethod.CRYPTOGRAM_3DS)){const e=JSON.parse(JSON.stringify(t));for(let t=0;t<e.allowedPaymentMethods.length;t++)e.allowedPaymentMethods[t].type==As.PaymentMethod.CARD&&(e.allowedPaymentMethods[t].parameters.allowedAuthMethods=[As.AuthMethod.CRYPTOGRAM_3DS]);n=this._a.isReadyToPay(e)}let i=e;return Ks(t,As.AuthMethod.PAN_ONLY)&&(i=this.da.isReadyToPay(t)),n.then((t=>1==(t&&t.result)?t:i))}prefetchPaymentData(t){const e=qs()||Js(t);e?cr.ba("prefetchPaymentData",e):(this.ya(t),Vs()&&!dr(t)?this._a.prefetchPaymentData(t):this.da.prefetchPaymentData(t))}loadPaymentData(t){js.postMessage({eventType:5});const e=qs()||Js(t);if(this.ma=t&&t.swg?6:5,e)return void this.ha(new Promise(((t,n)=>{js.postMessage({eventType:1,error:2,buyFlowMode:this.ma}),cr.ba("loadPaymentData",e),n({statusCode:As.ResponseStatus.DEVELOPER_ERROR,statusMessage:e})})));const n=Qs(t);n?this.fa.loadPaymentData(t,n,this.wa.bind(this)):(this.la=Date.now(),this.ya(t),dr(t)?this.da.loadPaymentData(t):this._a.loadPaymentData(t))}static ba(t,e){console.error("DEVELOPER_ERROR in "+t+" : "+e)}createButton(t={}){const e=Date.now();return js.postMessage({eventType:2,clientLatencyStartMs:e}),null}Ea(t){this.ua()&&"logPaymentData"===t.data.name&&js.postMessage(t.data.data)}ua(){return-1!=ur.indexOf(window.location.hostname)}wa(t){t.then((t=>{js.postMessage({eventType:1,clientLatencyStartMs:this.la,buyFlowMode:this.ma})})).catch((t=>{t.errorCode?js.postMessage({eventType:1,error:t.errorCode,buyFlowMode:this.ma}):js.postMessage({eventType:1,error:6,buyFlowMode:this.ma})})),this.ha(t)}ya(t){const e={startTimeMs:Date.now(),googleTransactionId:cr.jo};return t.i=t.i?Object.assign(e,t.i):e,t}}function dr(t){return!0===(t.i&&t.i.disableNative)}class pr{constructor(t){this._=t}preconnect(t){this.Sa(t,"preconnect")}prefetch(t){this.Sa(t,"preconnect prefetch")}Sa(t,e){const n=o(this._,"link",{rel:e,href:t});this._.head.appendChild(n)}}class gr{constructor(t){this.Oa=null,this.Hr=null,this.Na=null,this.Ca=null,this.t=t.win(),this.o=t.activities(),this.Ra=t.analytics(),this.Aa=new mr(this.t),this.va=new pr(this.t.document),this.Pa()&&(this.preconnect(this.va),this.xa()),this.Aa.prepare(),this.pe=t.eventManager()}La(t,e,n){return cr.jo=e,new cr(t,n,!1,this.o.getOriginalWebActivityPorts())}preconnect(t){t.prefetch("https://payments.google.com/payments/v4/js/integrator.js?ss=md"),t.prefetch("https://clients2.google.com/gr/gr_full_2.0.6.js")}xa(){this.Oa=this.La({environment:Lt().payEnv,i:{redirectKey:this.Aa.restoreKey()}},this.Ra.getTransactionId(),this.Ma.bind(this))}Pa(){const t=this.t.location.hash,e=/redirectEncryptedCallbackData/.test(t),n=/swgRequest/.test(t);return e&&n}getType(){return"PAYJS"}start(t,e={}){let n;this.Ca=t,this.Oa||(this.preconnect(this.va),this.xa()),e.forceRedirect&&(t.forceRedirect=!0),fr(t,"disableNative",!0),fr(t,"disableNgbf",!0);const i=new Promise((t=>{n=t}));return this.Aa.useVerifier((async i=>{i&&fr(t,"redirectVerifier",i),e.forceRedirect&&(await this.pe.getReadyPromise(),await this.Ra.getLoggingPromise()),this.Oa.loadPaymentData(t),n(!0)})),i}async onResponse(t){this.Na=t,this.Hr&&(await 0,t(this.ka(this.Hr,this.Ca)))}Ma(t){this.Hr=t,this.Na&&this.Na(this.ka(this.Hr,this.Ca))}async ka(t,e){try{const n=await t;return e&&(n.paymentRequest=e),n}catch(n){const t=n;if("object"==typeof t&&"CANCELED"===t.statusCode){const t=c("Cancelled");throw t.productType=e?e.i.productType:null,t}throw t}}}class mr{constructor(t){this.t=t,this.Da=null,this.Ua=null}prepare(){return this.Ga((()=>{}))}useVerifier(t){this.Ga((e=>{if(e)try{this.t.localStorage.setItem(wt,e.key)}catch(n){e=null}t(e&&e.verifier||null)}))}restoreKey(){try{return this.t.localStorage&&this.t.localStorage.getItem(wt)||null}catch(t){return null}}async Ga(t){this.Da||(this.Fa()?(this.Da=this.za(),this.Ua=await this.Da):(this.Da=Promise.resolve(null),this.Ua=null)),t(this.Ua)}Fa(){let t;try{t=!!this.t.localStorage}catch(n){return!1}const e=this.t.crypto;return!!(t&&e&&e.subtle&&e.subtle.digest)}async za(){const t=this.t.crypto;try{const e=new Uint8Array(16);t.getRandomValues(e);const n=btoa(it(e)),i=await t.subtle.digest({name:"SHA-384"},nt(n));return{key:n,verifier:btoa(it(new Uint8Array(i)))}}catch(e){return null}}}function fr(t,e,n){t.i=Object.assign(t.i||{},{[e]:n})}var wr=(t=>(t.GENERAL="general",t.PAYWALL="paywall",t))(wr||{});class Er{constructor(t,e,n){this.t=t,this.oe=e,this.pi=n,this.Ba=null,this.Wa=1,this.di=this.oe.pageConfig().getPublicationId(),this.oe.eventManager().registerEventListener(this.Bn.bind(this))}Va(){return this.t.document.cookie}Ya(){if(!this.Ba){const t=this.Va().match("(^|;)\\s*__gads\\s*=\\s*([^;]+)");this.Ba=t&&encodeURIComponent(t.pop())}return this.Ba}Ka(t){t=Nt(t,"u_tz","240"),t=Nt(t,"v",String(this.Wa));const e=this.Ya();return e&&(t=Nt(t,"cookie",e)),Nt(t,"cdm",this.t.location.hostname)}sendSubscriptionState(t,e){let n=Dt("/subopt/data");return n=Nt(n,"states",this.di+":"+t),e&&(n=Nt(n,"extrainfo",e)),this.pi.fetch(this.Ka(n),{method:"GET",credentials:"include"})}qa(t,e){let n=Dt("/subopt/data");return n=Nt(n,"events",this.di+":"+t),e&&(n=Nt(n,"extrainfo",e)),this.pi.fetch(this.Ka(n),{method:"GET",credentials:"include"})}Bn(t){if(t.eventOriginator===w.SHOWCASE_CLIENT)return;if(!this.oe.config().enablePropensity&&t.eventOriginator!==w.PROPENSITY_CLIENT)return;let e=t.additionalParameters;if(t.eventType===m.EVENT_SUBSCRIPTION_STATE)return void this.sendSubscriptionState(e.state,e.productsOrSkus);const n=(i=t.eventType)&&Qn[i]||null;var i;null!=n&&(e instanceof A&&(e=void 0),Te(t.isFromUserAction)&&(we(e)||(e={}),e.is_active=t.isFromUserAction),this.qa(n,JSON.stringify(e)))}Ha(t){if(!t.header)return{header:{ok:!1},body:{error:"No valid response"}};if(t.header.ok){let e=null;const n=t.scores,i=[];for(let t=0;t<n.length;t++){const s=n[t];let r;if(s.score){const t={value:s.score,bucketed:2==s.score_type};r={product:s.product,score:t}}else r={product:s.product,error:s.error_message};i.push(r),e={header:{ok:!0},body:{scores:i}}}return e}return{header:{ok:!1},body:{error:t.error}}}async getPropensity(t,e){const n=Dt("/subopt/pts?products=")+this.di+"&type="+e+"&ref="+t,i=await this.pi.fetch(this.Ka(n),{method:"GET",credentials:"include"}),s=await i.json();return this.Ha(s)}}class br{constructor(t,e,n){this.t=t,this.$a=new Er(t,e,n),this.pe=e.eventManager()}sendSubscriptionState(t,e){if(!Object.values(Hn).includes(t))throw new Error("Invalid subscription state provided");if((Hn.SUBSCRIBER==t||Hn.PAST_SUBSCRIBER==t)&&!e)throw new Error("Entitlements must be provided for users with active or expired subscriptions");if(e&&!we(e))throw new Error("Entitlements must be an Object");let n=null;e&&(n=JSON.stringify(e)),this.$a.sendSubscriptionState(t,n)}getPropensity(t){if(t&&!Object.values(wr).includes(t))throw new Error("Invalid propensity type requested");return t||(t=wr.GENERAL),this.$a.getPropensity(this.t.document.referrer,t)}sendEvent(t){const e=si(t.name);let n=null;if(!Ee($n,t.name)||!e)throw new Error("Invalid user event provided("+t.name+")");if(t.data){if(!we(t.data))throw new Error("Event data must be an Object("+t.data+")");n={},Object.assign(n,t.data)}if(Te(t.active))n||(n={}),Object.assign(n,{is_active:t.active});else if(null!=t.active)throw new Error("Event active must be a boolean");this.pe.logEvent({eventType:e,eventOriginator:w.PROPENSITY_CLIENT,isFromUserAction:t.active,additionalParameters:n})}}const Tr="subscribe.google.com";class Ir{constructor(t,e){this.t=t,this.ue=e,this.Ja={}}async get(t,e=!1){const n=this.Qa(t),i=this.Xa(t),s=await this.Za(i,e);return null!==s?s:this.Za(n,e)}Za(t,e){return this.Ja[t]||(this.Ja[t]=new Promise((n=>{const i=e?this.t.localStorage:this.t.sessionStorage;if(i)try{n(i.getItem(t))}catch(s){n(null)}else n(null)}))),this.Ja[t]}async set(t,e,n=!1){const i=this.Qa(t),s=this.Xa(t);return null!==await this.Za(s,n)||Re(this.t,je.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY)?(await this.eh(i,n),this.nh(s,e,n)):this.nh(i,e,n)}nh(t,e,n){return this.Ja[t]=Promise.resolve(e),new Promise((i=>{const s=n?this.t.localStorage:this.t.sessionStorage;if(s)try{s.setItem(t,e)}catch(r){}i()}))}async remove(t,e=!1){const n=this.Qa(t),i=this.Xa(t);return null!==await this.Za(i,e)||Re(this.t,je.ENABLE_PUBLICATION_ID_SUFFIX_FOR_STORAGE_KEY)?this.eh(i,e):this.eh(n,e)}eh(t,e){return delete this.Ja[t],new Promise((n=>{const i=e?this.t.localStorage:this.t.sessionStorage;if(i)try{i.removeItem(t)}catch(s){}n()}))}Qa(t){return Tr+":"+t}Xa(t){if(Object.values(bt).includes(t))return this.Qa(t);const e=this.ue.getPublicationId();return Tr+":"+t+":"+e}}class yr{constructor(t){this.oe=t,this.ih=()=>{},this.o=t.activities(),this.t=t.win(),this.ue=t.pageConfig(),this.we=t.dialogManager()}async start(t){const{publisherProvidedId:e}=t;if(!e)throw new Error("Missing required field: publisherProvidedId");const n=Gt({publicationId:this.ue.getPublicationId()}),i=new g(this.t,this.o,Ut("/linksaveiframe",{subscriptionLinking:"true",ppid:e}),n,!1);i.onCancel((()=>{const t=m.ACTION_SUBSCRIPTION_LINKING_CLOSE;this.oe.eventManager().logSwgEvent(t,!0),this.ih({publisherProvidedId:e,success:!1})})),i.on(D,(t=>{var e;const n=t.getSuccess()?m.EVENT_SUBSCRIPTION_LINKING_SUCCESS:m.EVENT_SUBSCRIPTION_LINKING_FAILED;this.oe.eventManager().logSwgEvent(n),this.ih({publisherProvidedId:t.getPublisherProvidedId(),success:null!=(e=t.getSuccess())&&e})}));const s=new Promise((t=>{this.ih=t}));try{return this.oe.eventManager().logSwgEvent(m.IMPRESSION_SUBSCRIPTION_LINKING_LOADING),await this.we.openView(i,!1,{desktopConfig:{isCenterPositioned:!1}}),this.oe.eventManager().logSwgEvent(m.IMPRESSION_SUBSCRIPTION_LINKING_COMPLETE),s}catch(r){throw this.oe.eventManager().logSwgEvent(m.IMPRESSION_SUBSCRIPTION_LINKING_ERROR),r}}}class Sr{constructor(t,e){this.sh=e,this.openViewPromise=null,this.t=t.win(),this.o=t.activities(),this.we=t.dialogManager(),this.sh||(this.sh=Promise.reject("No account promise provided")),this._e=new g(this.t,this.o,Ut("/waitforsubscriptionlookupiframe"),Gt({publicationId:t.pageConfig().getPublicationId(),productId:t.pageConfig().getProductId()}),!0,!0)}async start(){this.openViewPromise=this.we.openView(this._e);try{const t=await this.sh;return this.we.completeView(this._e),t}catch(t){throw this.we.completeView(this._e),t}}}const Or="SWG",Nr="SUBSCRIPTIONS";class Cr{constructor(t){this.t=t,this.rh=null,this.oh=!1,this.ah=null,this.hh=null,this.Pr={},this.lh=Date.now(),this._=kn(t),this.ti=new Promise((t=>{this.ah=t})),this.uh=new cn(this._,this.ti),this.uh.init()}async dh(t){if(!t)return this.ti;if(this.oh)return this.hh&&this.hh.check(),this.ti;this.oh=!0;const e=await this.ph(),n=new Rr(this._,e,{configPromise:this.ti.then()},this.Pr,{lang:ln(this._.getRootElement()),forceLangInIframes:!0},this.lh);return this.ah(n),n}async ph(){if(this.rh)return new ms(this.rh,!1);this.hh=new Ts(this._);try{const t=await this.hh.resolveConfig();return this.hh=null,t}catch(t){throw this.hh=null,t}}startSubscriptionsFlowIfNeeded(){const t=function(t){const e=Ns(t,ws);if(e)return e;const n=t.querySelector("script[".concat(ws,"]"));return n?n.getAttribute(ws):null}(this.t.document);return Q(t,"mode"),"manual"==t?null:this.start()}init(t){if(this.oh){const t=new Error("already configured");throw this.dh(!1).then((e=>{e.jserror().error(t)})),t}this.rh=t,this.dh(!0).then((t=>{t.analytics().setReadyForLogging(),t.analytics().start()}))}async configure(t){return Object.assign(this.Pr,t),(await this.dh(!1)).configure(t)}async start(){return this.gh(),(await this.dh(!0)).start()}async reset(){return(await this.dh(!0)).reset()}async clear(){return(await this.dh(!0)).clear()}async getEntitlements(t){return(await this.dh(!0)).getEntitlements(t)}async setOnEntitlementsResponse(t){return(await this.dh(!1)).setOnEntitlementsResponse(t)}async getOffers(t){return(await this.dh(!0)).getOffers(t)}async showOffers(t){return this.mh(),(await this.dh(!0)).showOffers(t)}async showUpdateOffers(t){return(await this.dh(!0)).showUpdateOffers(t)}async showSubscribeOption(t){return(await this.dh(!0)).showSubscribeOption(t)}async showAbbrvOffer(t){return(await this.dh(!0)).showAbbrvOffer(t)}async showContributionOptions(t){return this._h(),(await this.dh(!0)).showContributionOptions(t)}async waitForSubscriptionLookup(t){return(await this.dh(!0)).waitForSubscriptionLookup(t)}async setOnNativeSubscribeRequest(t){return(await this.dh(!1)).setOnNativeSubscribeRequest(t)}async setOnSubscribeResponse(t){return(await this.dh(!1)).setOnSubscribeResponse(t)}async subscribe(t){return(await this.dh(!0)).subscribe(t)}async updateSubscription(t){return(await this.dh(!0)).updateSubscription(t)}async setOnContributionResponse(t){return(await this.dh(!1)).setOnContributionResponse(t)}async setOnPaymentResponse(t){return(await this.dh(!1)).setOnPaymentResponse(t)}async contribute(t){return(await this.dh(!0)).contribute(t)}async completeDeferredAccountCreation(t){return(await this.dh(!0)).completeDeferredAccountCreation(t)}async setOnLoginRequest(t){return(await this.dh(!1)).setOnLoginRequest(t)}async triggerLoginRequest(t){return(await this.dh(!1)).triggerLoginRequest(t)}async setOnLinkComplete(t){return(await this.dh(!1)).setOnLinkComplete(t)}async linkAccount(t){return(await this.dh(!0)).linkAccount(t)}async setOnFlowStarted(t){return(await this.dh(!1)).setOnFlowStarted(t)}async setOnFlowCanceled(t){return(await this.dh(!1)).setOnFlowCanceled(t)}async saveSubscription(t){return(await this.dh(!0)).saveSubscription(t)}async showLoginPrompt(){return(await this.dh(!0)).showLoginPrompt()}async showLoginNotification(){return(await this.dh(!0)).showLoginNotification()}createButton(t,e){return this.uh.create(t,e)}async attachSmartButton(t,e,n){return(await this.dh(!0)).attachSmartButton(t,e,n)}attachButton(t,e,n){this.uh.attach(t,e,n)}async getPropensityModule(){return(await this.dh(!0)).getPropensityModule()}async getLogger(){return(await this.dh(!0)).getLogger()}async getEventManager(){return(await this.dh(!0)).getEventManager()}async ni(t){const e=Date.now(),n=await this.dh(!0);(await n.getEventManager()).logSwgEvent(t,!1,null,e)}gh(){return this.ni(m.EVENT_START_API)}mh(){return this.ni(m.EVENT_SHOW_OFFERS_API)}_h(){return this.ni(m.EVENT_SHOW_CONTRIBUTION_OPTIONS_API)}async setShowcaseEntitlement(t){return(await this.dh(!0)).setShowcaseEntitlement(t)}async consumeShowcaseEntitlementJwt(t,e){return(await this.dh(!0)).consumeShowcaseEntitlementJwt(t,e)}showBestAudienceAction(){Z("Not implemented yet")}async setPublisherProvidedId(t){return(await this.dh(!0)).setPublisherProvidedId(t)}async linkSubscription(t){return(await this.dh(!0)).linkSubscription(t)}async getAvailableInterventions(){return(await this.dh(!0)).getAvailableInterventions()}}class Rr{constructor(t,e,s,r,o,a=0){this.lh=a,this.fh=null,this.wh=null,(s=s||{}).configPromise||(s.configPromise=Promise.resolve()),this.pe=new ye(s.configPromise),this._=kn(t),this.t=this._.getWin(),this.Pr={windowOpenMode:"auto",analyticsMode:0,enableSwgAnalytics:!1,enablePropensity:!1},r&&this.Eh(r),this.ue=e,this.bh=this._.whenReady(),this.Th=new rs(this._),this.pi=s.fetcher||new ji(this.t),this.ls=new Ir(this.t,this.ue),this.ri=new dn,s.enableGoogleAnalytics&&(this.Ih=new ri(this),this.Ih.start()),this.o=new class{constructor(t){this.oe=t,this.o=new pe.ActivityPorts(t.win())}addDefaultArguments(t){const e=this.oe,i=e.pageConfig(),s=e.analytics().getContext();return Object.assign({analyticsContext:s.toArray(),publicationId:i.getPublicationId(),productId:i.getProductId(),_client:"SwG ".concat(n),supportsEventManager:!0},t||{})}async yh(t,e,n){const i=new class{constructor(t,e,n,i){this.oe=n,this.Sh=new pe.ActivityIframePort(t,e,i),this.Oh={}}whenReady(){return this.Sh.whenReady()}async connect(){await this.Sh.connect(),this.Sh.onMessage((t=>{const e=null==t?void 0:t.RESPONSE;if(!e)return;const n=this.Oh[e[0]];if(n){const t=function(t){const e=t?t[0]:null;if(e){const n=V[e];if(n)return new n(t)}throw new Error("Deserialization failed for ".concat(t))}(e);n(t)}})),this.oe&&this.oe.eventManager()&&this.on(y,(t=>{var e,n;this.oe.eventManager().logEvent({eventType:t.getEvent(),eventOriginator:w.SWG_SERVER,isFromUserAction:null==(e=t.getMeta())?void 0:e.getIsFromUserAction(),additionalParameters:t.getParams(),configurationId:null==(n=t.getMeta())?void 0:n.getConfigurationId()})}))}disconnect(){this.Sh.disconnect()}getMode(){return this.Sh.getMode()}acceptResult(){return this.Sh.acceptResult()}onResizeRequest(t){return this.Sh.onResizeRequest(t)}execute(t){this.Sh.message({REQUEST:t.toArray()})}on(t,e){let n=null;try{n=t.prototype.label()}catch(i){n=null}if(!n)throw new Error("Invalid data type");if(this.Oh[n])throw new Error("Invalid type or duplicate callback for "+n);this.Oh[n]=e}resized(){this.Sh.resized()}}(t,e,this.oe,n);return await i.connect(),i}async openIframe(t,e,n,i=!1){i&&(n=this.addDefaultArguments(n));const s=await this.oe.storage().get(pt,!0),r=new URL(e).searchParams;s&&!r.has("sut")&&(e=Nt(e,"sut",s));const o=this.oe.pageConfig().getPublicationId();return o&&!r.has("publicationId")&&(e=Nt(e,"publicationId",o)),this.yh(t,e,n)}open(t,e,n,i,s,r=!1){return r&&(i=this.addDefaultArguments(i)),this.o.open(t,e,n,i,s)}onResult(t,e){this.o.onResult(t,(t=>{e(new me(t))}))}onRedirectError(t){this.o.onRedirectError(t)}getOriginalWebActivityPorts(){return this.o}}(this),this.ce=new Ge(this),this.le=new gr(this),this.Nh=new cs(this),this.hs=new is(this.t,this.ue,this.pi,this,s.enableDefaultMeteringHandler||!1),this.we=new Yn(this._),this.ge=new Nn(this,e.getPublicationId(),this.pi,o),this.Ch=new br(this.t,this,this.pi),this.pe.logSwgEvent(m.IMPRESSION_PAGE_LOAD,!1),this.Rh=new gs(this.ue,this.pi),this.uh=new cn(this._,Promise.resolve(this));const l=new pr(this.t.document);l.prefetch("".concat(i,"/loader.svg")),l.preconnect("https://www.gstatic.com/"),l.preconnect("https://www.google.com/"),ls.configurePending(this),Wt.configurePending(this),h(this._,vn),this.o.onRedirectError((t=>{this.ce.addLabels(["redirect"]),this.pe.logSwgEvent(m.EVENT_PAYMENT_FAILED,!1),this.Th.error("Redirect error",t)}))}creationTimestamp(){return this.lh}doc(){return this._}win(){return this.t}pageConfig(){return this.ue}jserror(){return this.Th}activities(){return this.o}payClient(){return this.le}dialogManager(){return this.we}entitlementsManager(){return this.hs}callbacks(){return this.ri}storage(){return this.ls}clientConfigManager(){return this.ge}analytics(){return this.ce}init(){}configure(t){this.Eh(t)}Eh(t){let e="";for(const i in t){const s=t[i];switch(i){case"windowOpenMode":s!=H.AUTO&&s!=H.REDIRECT&&(e="Unknown windowOpenMode: "+s);break;case"experiments":for(const t of s)n=t,Ne(this.t)[n]=!0;this.analytics()&&this.analytics().addLabels(s);break;case"analyticsMode":s!=q.DEFAULT&&s!=q.IMPRESSIONS&&(e="Unknown analytics mode: "+s);break;case"enableSwgAnalytics":Te(s)||(e="enableSwgAnalytics must be a boolean, type: "+typeof s);break;case"enablePropensity":Te(s)||(e="enablePropensity must be a boolean, type: "+typeof s);break;case"skipAccountCreationScreen":Te(s)||(e="skipAccountCreationScreen must be a boolean, type: "+typeof s);break;case"publisherProvidedId":null==s||"string"==typeof s&&""!=s||(e="publisherProvidedId must be a string, value: "+s);break;case"paySwgVersion":if("string"!=typeof s){e="paySwgVersion must be a string, type: "+typeof s;break}break;default:e="Unknown config property: "+i}}var n;tt(!e,e||void 0),Object.assign(this.Pr,t)}config(){return this.Pr}reset(){this.hs.reset(),this.closeDialog()}clear(){this.hs.clear(),this.closeDialog()}closeDialog(){this.we.completeAll()}start(){if(!this.ue.getProductId()||!this.ue.isLocked())return Promise.resolve();this.getEntitlements()}async getEntitlements(t){(null==t?void 0:t.publisherProvidedId)&&(t.publisherProvidedId=this.Bt);const e=this.hs.getEntitlements(t);this.clientConfigManager().fetchClientConfig(e);const n=await e;if(this.ce.setReadyForLogging(),this.ce.start(),n)try{const t=n.entitlements.map((t=>t.getSku()||"unknown subscriptionToken"));t.length>0&&this.ce.setSku(t.join(","))}catch(s){}const i=await this.hs.getExperimentConfigFlags().then((t=>t.includes(Fe.BACKGROUND_CLICK_BEHAVIOR_EXPERIMENT)));return this.we.setEnableBackgroundClickExperiment(i),n.clone()}setOnEntitlementsResponse(t){this.ri.setOnEntitlementsResponse(t)}getOffers(t){return this.Rh.getOffers(t&&t.productId)}async showOffers(t){return await this.bh,tt(!t||!t.oldSku,"The showOffers() method cannot be used to update a subscription. Use the showUpdateOffers() method instead."),this.fh=new Yt(this,t),this.fh.start()}async showUpdateOffers(t){return await this.bh,tt(!!t&&!!t.oldSku,"The showUpdateOffers() method cannot be used for new subscribers. Use the showOffers() method instead."),new Yt(this,t).start()}async showSubscribeOption(t){return await this.bh,new Kt(this,t).start()}async showAbbrvOffer(t){return await this.bh,new qt(this,t).start()}async showContributionOptions(t){return await this.bh,this.wh=new Cn(this,t),this.wh.start()}getLastContributionsFlow(){return this.wh}async waitForSubscriptionLookup(t){return await this.bh,new Sr(this,t).start()}setOnLoginRequest(t){this.ri.setOnLoginRequest(t)}triggerLoginRequest(t){this.ri.triggerLoginRequest(t)}setOnLinkComplete(t){this.ri.setOnLinkComplete(t)}async linkAccount(t){return await this.bh,new hs(this).start(t)}async saveSubscription(t){return await this.bh,await new us(this,t).start()}async showLoginPrompt(){return await this.bh,new ps(this).start()}async showLoginNotification(){return await this.bh,new ds(this).start()}setOnNativeSubscribeRequest(t){this.ri.setOnSubscribeRequest(t)}setOnSubscribeResponse(t){this.ri.setOnSubscribeResponse(t)}setOnPaymentResponse(t){this.ri.setOnPaymentResponse(t)}async subscribe(t){return tt("string"==typeof t,"The subscribe() method can only take a sku as its parameter; for subscription updates please use the updateSubscription() method"),await this.bh,new zt(this,{skuId:t}).start()}async updateSubscription(t){return tt(null==t?void 0:t.oldSku,"The updateSubscription() method should be used for subscription updates; for new subscriptions please use the subscribe() method"),await this.bh,new zt(this,t).start()}setOnContributionResponse(t){this.ri.setOnContributionResponse(t)}async contribute(t){const e="string"==typeof t?{skuId:t}:t;return await this.bh,new zt(this,e,$.UI_CONTRIBUTION).start()}async completeDeferredAccountCreation(t=null){return await this.bh,new xn(this,t).start()}setOnFlowStarted(t){this.ri.setOnFlowStarted(t)}setOnFlowCanceled(t){this.ri.setOnFlowCanceled(t)}createButton(t,e){return this.uh.create(t,e)}attachButton(t,e,n){this.uh.attach(t,e,n)}attachSmartButton(t,e,n){this.uh.attachSmartButton(this,t,e,n)}getPropensityModule(){return Promise.resolve(this.Ch)}eventManager(){return this.pe}getLastOffersFlow(){return this.fh}getEventManager(){return Promise.resolve(this.pe)}getLogger(){return Promise.resolve(this.Nh)}setShowcaseEntitlement(t){if(!t||!function(t=vt){return"https"===t.protocol||"https:"===t.protocol}(this.win().location)||!es(this.win().location.search,!0))return Promise.resolve();const e=(n=t.entitlement,Xn[n]||[]);var n;const i=new A;i.setIsUserRegistered(t.isUserRegistered),t.subscriptionTimestamp&&i.setSubscriptionTimestamp(Me(function(t){let e;return e=t>=1e14||t<=-1e14?Math.floor(t/1e3):t>=1e11||t<=-3e10?t:Math.floor(1e3*t),e}(t.subscriptionTimestamp)));for(let s=0;s<e.length;s++)this.eventManager().logEvent({eventType:e[s],eventOriginator:w.SHOWCASE_CLIENT,isFromUserAction:!1,additionalParameters:i});return Promise.resolve()}consumeShowcaseEntitlementJwt(t,e){this.entitlementsManager().parseEntitlements({signedEntitlements:t}).consume(e)}showBestAudienceAction(){Z("Not implemented yet")}setPublisherProvidedId(t){this.Bt=t}async linkSubscription(t){return await this.bh,new yr(this).start(t)}async getAvailableInterventions(){return await this.getEntitlements(),this.entitlementsManager().getAvailableInterventions()}}X("Subscriptions Runtime: ".concat(n)),function(t){if(t[Or]&&!Array.isArray(t[Or]))return;const e=new Cr(t),n=function(t){return{init:t.init.bind(t),configure:t.configure.bind(t),start:t.start.bind(t),reset:t.reset.bind(t),clear:t.clear.bind(t),getEntitlements:t.getEntitlements.bind(t),linkAccount:t.linkAccount.bind(t),showLoginPrompt:t.showLoginPrompt.bind(t),showLoginNotification:t.showLoginNotification.bind(t),getOffers:t.getOffers.bind(t),showOffers:t.showOffers.bind(t),showUpdateOffers:t.showUpdateOffers.bind(t),showAbbrvOffer:t.showAbbrvOffer.bind(t),showSubscribeOption:t.showSubscribeOption.bind(t),showContributionOptions:t.showContributionOptions.bind(t),waitForSubscriptionLookup:t.waitForSubscriptionLookup.bind(t),subscribe:t.subscribe.bind(t),updateSubscription:t.updateSubscription.bind(t),contribute:t.contribute.bind(t),completeDeferredAccountCreation:t.completeDeferredAccountCreation.bind(t),setOnEntitlementsResponse:t.setOnEntitlementsResponse.bind(t),setOnLoginRequest:t.setOnLoginRequest.bind(t),triggerLoginRequest:t.triggerLoginRequest.bind(t),setOnLinkComplete:t.setOnLinkComplete.bind(t),setOnNativeSubscribeRequest:t.setOnNativeSubscribeRequest.bind(t),setOnPaymentResponse:t.setOnPaymentResponse.bind(t),setOnSubscribeResponse:t.setOnSubscribeResponse.bind(t),setOnContributionResponse:t.setOnContributionResponse.bind(t),setOnFlowStarted:t.setOnFlowStarted.bind(t),setOnFlowCanceled:t.setOnFlowCanceled.bind(t),saveSubscription:t.saveSubscription.bind(t),createButton:t.createButton.bind(t),attachButton:t.attachButton.bind(t),attachSmartButton:t.attachSmartButton.bind(t),getPropensityModule:t.getPropensityModule.bind(t),getLogger:t.getLogger.bind(t),getEventManager:t.getEventManager.bind(t),setShowcaseEntitlement:t.setShowcaseEntitlement.bind(t),consumeShowcaseEntitlementJwt:t.consumeShowcaseEntitlementJwt.bind(t),showBestAudienceAction:t.showBestAudienceAction.bind(t),setPublisherProvidedId:t.setPublisherProvidedId.bind(t),linkSubscription:t.linkSubscription.bind(t),getAvailableInterventions:t.getAvailableInterventions.bind(t)}}(e);async function i(t){t&&(await 0,t(n))}const s=[].concat(t[Or],t[Nr]);for(const r of s)i(r);t[Or]=t[Nr]={push:i},e.startSubscriptionsFlowIfNeeded()}(self)}(); //# sourceMappingURL=swg.js.map })();