"use strict";(self.webpackChunkdami=self.webpackChunkdami||[]).push([[9437],{19437:(n,t,e)=>{e.r(t),e.d(t,{default:()=>a});var i=e(31791);const a=async function({data:n,id:t}){if(this.settings.debugMode){this.dialogParams={accept:n.accept,promptText:n.promptText};const t="Page.javascriptDialogOpening";this.engine.eventListeners[t]||this.engine.on(t,(()=>{(0,i.k)(this.activeTab.id,"Page.handleJavaScriptDialog",this.dialogParams)}))}else{if(!this.preloadScripts.some((({id:n})=>n===t))){const i={id:t,isBlock:!0,name:"javascript-code",data:{everyNewTab:!0,code:(e=n.accept,a=n.promptText,`\n  const realConfirm = window.confirm;\n  window.confirm = function() {\n    return ${e};\n  };\n\n  const realAlert = window.alert;\n  window.alert = function() {\n    return ${e};\n  };\n\n  const realPrompt = window.prompt;\n  window.prompt = function() {\n    return ${e} ? "${a}" : null;\n  }\n`)}};this.preloadScripts.push(i),await this._sendMessageToTab(i,{},!0)}}var e,a;return{data:"",nextBlockId:this.getBlockConnections(t)}}}}]);