(()=>{"use strict";var e,t,r,n,o,s,a={626:(e,t,r)=>{function n(e){!function(e,t){{let e="Assertion failed";t&&(e=e+": "+t);const r=new Error(e);throw function(){const e=this||self;return e.traceAssertionsForTesting,e}().traceAssertionsForTesting&&console.warn(r.stack),r}}(0,e||"Unreachable code hit")}r.d(t,{Aw:()=>f});var o=class{constructor(){this.resolve_,this.reject_,this.isFulfilled_=!1,this.promise_=new Promise(((e,t)=>{this.resolve_=t=>{e(t),this.isFulfilled_=!0},this.reject_=e=>{t(e),this.isFulfilled_=!0}}))}get isFulfilled(){return this.isFulfilled_}set isFulfilled(e){n()}get promise(){return this.promise_}set promise(e){n()}get resolve(){return this.resolve_}set resolve(e){n()}get reject(){return this.reject_}set reject(e){n()}};let s=1;function a(){return s++}const i={};function c(e,t){const r=Array.prototype.slice.call(arguments,1),n=new o,s=e+"_"+a();return i[s]=n,chrome.send(e,[s].concat(r)),n.promise}const l={};window.cr=window.cr||{},window.cr.webUIResponse=function(e,t,r){const n=i[e];delete i[e],t?n.resolve(r):n.reject(r)},window.cr.webUIListenerCallback=function(e,t){const r=l[e];if(!r)return;const n=Array.prototype.slice.call(arguments,1);for(const e in r)r[e].apply(null,n)},window.loadTimeData;const u=window.chrome;let d,h;!function(e){e.AAD="aad",e.AAD_DEGRADED="aad_degraded",e.MSA="msa",e.MSA_DEGRADED="msa_degraded",e.ON_PREMISES="on_premises",e.NONE="none"}(d||(d={})),d.NONE,function(e){e.NONE="none",e.GOOGLE="google"}(h||(h={}));class f{static getActiveProfileInfo(){return c("getProfileInfo")}static getInactiveProfileInfo(){return c("getNonActiveProfiles")}static openSettingsForProfile(e){u.send("launchProfileSettings",[e])}static dismissProfilePreviousSignIn(){u.send("dismissPreviousSignIn")}static handleChangeProfilePictureLinkClicked(){u.send("handleChangePictureLinkClicked")}static openExtensionsForProfile(e){u.send("launchProfileExtensions",[e])}static openSystemSettingsForProfile(e){u.send("launchProfileSystemSettings",[e])}static openEdgeBarSettingsForProfile(e){u.send("launchProfileEdgeBarSettings",[e])}}},607:(e,t,r)=>{r.a(e,(async(e,t)=>{try{var n,o,s=r(914),a=r(626),i=e([s]);let c;function l(e){c.contentWindow.postMessage(e,"*")}function u(e){switch(e.name){case n.InitializePane:{const t=JSON.parse(e.details.stringValue);a.Aw.getActiveProfileInfo().then((e=>{const r={...t.userInfo,pictureUrl:e.iconUrl};l({message:o.InitializePane,publisherData:t.publisherInfo,userData:r,localCards:t.localCards})}));break}case n.CheckoutInProgress:"AutofillStart"===e.details.stringValue?l({message:o.AutofillStart}):"PaymentStart"===e.details.stringValue&&l({message:o.PaymentStart});break;case n.CheckoutSucceeded:l({message:o.CheckoutSucceeded});break;case n.CheckoutFailed:l({message:o.CheckoutFailed,reason:e.details.stringValue})}}function d(){const e=new s.s;e.updateLoadTimeData.addListener(u),s.h.getRemote().registerPage(e.$.bindNewPipeAndPassRemote())}function h(){if(s.h&&s.s){const e=document.getElementsByTagName("iframe");e&&e.length>0&&(c=e[0],window.onmessage=e=>{switch(e.data.message){case o.ReadyToProcess:s.h.getRemote().initializePane();break;case o.StartCheckout:s.h.getRemote().startCheckout(e.data.params);break;case o.UIEvent:s.h.getRemote().recordUIEvents(e.data.params.event)}},d())}}s=(i.then?(await i)():i)[0],function(e){e.InitializePane="InitializePane",e.CheckoutInProgress="CheckoutInProgress",e.CheckoutFailed="CheckoutFailed",e.CheckoutSucceeded="CheckoutSucceeded"}(n||(n={})),function(e){e.InitializePane="InitializePane",e.CheckoutFailed="CheckoutFailed",e.CheckoutSucceeded="CheckoutSucceeded",e.ReadyToProcess="ReadyToProcess",e.StartCheckout="StartCheckout",e.AutofillStart="AutofillStart",e.PaymentStart="PaymentStart",e.UIEvent="UIEvent"}(o||(o={})),h(),t()}catch(f){t(f)}}))},914:(e,t,r)=>{r.a(e,(async(e,n)=>{try{r.d(t,{h:()=>e,s:()=>o});const{PageHandler:e,PageCallbackRouter:o}=await import("./wallet-buynow.mojom-webui.js");n()}catch(e){n(e)}}),1)}},i={};function c(e){var t=i[e];if(void 0!==t)return t.exports;var r=i[e]={exports:{}};return a[e](r,r.exports,c),r.exports}e="function"==typeof Symbol?Symbol("webpack then"):"__webpack_then__",t="function"==typeof Symbol?Symbol("webpack exports"):"__webpack_exports__",r="function"==typeof Symbol?Symbol("webpack error"):"__webpack_error__",n=e=>{e&&(e.forEach((e=>e.r--)),e.forEach((e=>e.r--?e.r++:e())))},o=e=>!--e.r&&e(),s=(e,t)=>e?e.push(t):o(t),c.a=(a,i,c)=>{var l,u,d,h=c&&[],f=a.exports,g=!0,m=!1,p=(t,r,n)=>{m||(m=!0,r.r+=t.length,t.map(((t,o)=>t[e](r,n))),m=!1)},P=new Promise(((e,t)=>{d=t,u=()=>(e(f),n(h),h=0)}));P[t]=f,P[e]=(e,t)=>{if(g)return o(e);l&&p(l,e,t),s(h,e),P.catch(t)},a.exports=P,i((a=>{var i;l=(a=>a.map((a=>{if(null!==a&&"object"==typeof a){if(a[e])return a;if(a.then){var i=[];a.then((e=>{c[t]=e,n(i),i=0}),(e=>{c[r]=e,n(i),i=0}));var c={};return c[e]=(e,t)=>(s(i,e),a.catch(t)),c}}var l={};return l[e]=e=>o(e),l[t]=a,l})))(a);var c=()=>l.map((e=>{if(e[r])throw e[r];return e[t]})),u=new Promise(((e,t)=>{(i=()=>e(c)).r=0,p(l,i,t)}));return i.r?u:c()}),(e=>(e&&d(P[r]=e),u()))),g=!1},c.d=(e,t)=>{for(var r in t)c.o(t,r)&&!c.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},c.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),c(607)})();