(function(){function e(e,t){try{const r=window.webkit;delete window["webkit"];window.webkit.messageHandlers[e].postMessage(t);window.webkit=r}catch(e){}}function t(){const e=new Uint32Array(4);window.crypto.getRandomValues(e);return e.reduce(((e="",t)=>e+t.toString(16).padStart(8,"0")),"")}class r{registeredApis={};frameId=t();registerApi(e,t){if(this.registeredApis[e]!==undefined){throw new Error(`API ${e} already registered.`)}this.registeredApis[e]=t}getRegisteredApi(e){return this.registeredApis[e]}getFrameId(){if(!this.frameId){this.frameId=t()}return this.frameId}registerFrame(){e("FrameBecameAvailable",{crwFrameId:this.getFrameId()})}}if(!window.__gCrWeb){window.__gCrWeb=new r}const i=window.__gCrWeb;const s=window.__gCrWeb;if(!i.fill){i.fill={};i["fill"]=i.fill}const o="__gChrome_uniqueID";const n=window.Symbol.for(o);const a="__gChrome_childFrameRemoteToken";i.fill.ID_SYMBOL=n;const d="FrameRegistrationMessage";const m="registerAsChildFrame";const c="registerAsChildFrameAck";const f=9;const g=f+1;const w=100;const l=50;const u=100;const F=new Map;function I(e,t){if(F.size>=u){return}F.set(e,t)}function _(t){e(d,{local_frame_id:s.getFrameId(),remote_frame_id:t})}function h(e){if(!i.autofill_form_features.isAutofillAcrossIframesEnabled()){return}const t=e.data?.command;if(t===m){const t=e.data?.remoteFrameId;if(typeof t==="string"){_(t);e.source?.postMessage({command:c,remoteFrameId:t})}}else if(t===c){const t=e.data?.remoteFrameId;if(typeof t==="string"){I(t,g)}}}function p(e){if(!i.hasOwnProperty("remoteFrameIdRegistrar")){i.remoteFrameIdRegistrar=new Map}if(i.remoteFrameIdRegistrar.has(e)){return i.remoteFrameIdRegistrar.get(e)}const r=t();i.remoteFrameIdRegistrar.set(e,r);return r}function A(e){const t=p(e);e.setAttribute(a,t);const r=i=>{if((F.get(t)??0)>=f||F.size>=u){return}if(e.contentWindow){I(t,(F.get(t)??0)+1);e.contentWindow.postMessage({command:m,remoteFrameId:t},"*");setTimeout((()=>r(i*2)),i)}};setTimeout((()=>r(l)),w);return t}i.remoteFrameRegistration={processChildFrameMessage:h,registerChildFrame:A,registerSelfWithRemoteToken:_}})();