"use strict";var readyEventArgs,whenReadyCallback,import_electron=require("electron"),disabledFeatures=["AvoidUnnecessaryBeforeUnloadCheckSync","BoundaryEventDispatchTracksNodeRemoval","DestroyProfileOnBrowserClose","DialMediaRouteProvider","GlobalMediaControls","HttpsUpgrades","LensOverlay","MediaRouter","PaintHolding","ThirdPartyStoragePartitioning","Translate","AutoDeElevate","RenderDocument","OptimizationHints","msForceBrowserSignIn","msEdgeUpdateLaunchServicesPreferredVersion"].filter(Boolean),chromiumSwitches=e=>["--disable-field-trial-config","--disable-background-networking","--disable-background-timer-throttling","--disable-backgrounding-occluded-windows","--disable-back-forward-cache","--disable-breakpad","--disable-client-side-phishing-detection","--disable-component-extensions-with-background-pages","--disable-component-update","--no-default-browser-check","--disable-default-apps","--disable-dev-shm-usage","--disable-edgeupdater","--disable-extensions","--disable-features="+disabledFeatures.join(","),process.env.PLAYWRIGHT_LEGACY_SCREENSHOT?"":"--enable-features=CDPScreenshotNewSurface","--allow-pre-commit-input","--disable-hang-monitor","--disable-ipc-flooding-protection","--disable-popup-blocking","--disable-prompt-on-repost","--disable-renderer-backgrounding","--force-color-profile=srgb","--metrics-recording-only","--no-first-run","--password-store=basic","--use-mock-keychain","--no-service-autorun","--export-tagged-pdf","--disable-search-engine-choice-screen","--unsafely-disable-devtools-self-xss-warnings","--edge-skip-compat-layer-relaunch","--disable-infobars","--disable-search-engine-choice-screen",e?.android?"":"--disable-sync"].filter(Boolean);for(let arg of(process.argv.splice(1,process.argv.indexOf("--remote-debugging-port=0")),chromiumSwitches())){let e=arg.match(/--([^=]*)=?(.*)/);import_electron.app.commandLine.appendSwitch(e[1],e[2])}var originalWhenReady=import_electron.app.whenReady(),originalEmit=import_electron.app.emit.bind(import_electron.app);import_electron.app.emit=(e,...a)=>"ready"===e?(readyEventArgs=a,import_electron.app.listenerCount("ready")>0):originalEmit(e,...a);var isReady=!1,whenReadyPromise=new Promise(e=>whenReadyCallback=e);import_electron.app.isReady=()=>isReady,import_electron.app.whenReady=()=>whenReadyPromise,globalThis.__playwright_run=async()=>{let e=await originalWhenReady;isReady=!0,whenReadyCallback(e),originalEmit("ready",...readyEventArgs)};