dootask/public/js/build/index.9160b772.js
2025-11-12 16:46:33 +08:00

2 lines
20 KiB
JavaScript
Vendored

import{V as A}from"./vue.fd9b772e.js";import{m as w}from"./vuex.cc7cb26e.js";import{i as _}from"./view-design-hi.75f80746.js";import{m as r}from"./@micro-zoe.f728a9f4.js";import{D as C}from"./DialogWrapper.484e7fa4.js";import{n as c,d as f,U as p,e as l,f as d,g as y,l as $}from"./app.ccb8a946.js";import{R as v}from"./index.867a6d9a.js";var M=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{directives:[{name:"transfer-dom",rawName:"v-transfer-dom"}],attrs:{"data-transfer":!0}},[t("div",{class:e.className},[t("transition",{attrs:{name:e.transitions[0]}},[e.shouldRenderInDom?t("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],staticClass:"micro-modal-mask",style:e.maskStyle}):e._e()]),t("transition",{attrs:{name:e.transitions[1]}},[e.shouldRenderInDom?t("div",{directives:[{name:"show",rawName:"v-show",value:e.open,expression:"open"}],staticClass:"micro-modal-content",style:e.contentStyle},[e.capsuleMenuShow?t("div",{staticClass:"micro-modal-cmask"}):e._e(),t("div",{staticClass:"micro-modal-capsule",style:e.capsuleStyle},[t("div",{staticClass:"micro-modal-capsule-item",on:{click:e.onCapsuleMore}},[t("svg",{attrs:{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M2 11C3.10457 11 4 10.1046 4 9C4 7.89543 3.10457 7 2 7C0.895431 7 0 7.89543 0 9C0 10.1046 0.895431 11 2 11Z",fill:"currentColor"}}),t("path",{attrs:{d:"M9 12C10.6569 12 12 10.6569 12 9C12 7.34315 10.6569 6 9 6C7.34315 6 6 7.34315 6 9C6 10.6569 7.34315 12 9 12Z",fill:"currentColor"}}),t("path",{attrs:{d:"M16 11C17.1046 11 18 10.1046 18 9C18 7.89543 17.1046 7 16 7C14.8954 7 14 7.89543 14 9C14 10.1046 14.8954 11 16 11Z",fill:"currentColor"}})])]),t("div",{staticClass:"micro-modal-capsule-line"}),t("div",{staticClass:"micro-modal-capsule-item",on:{click:e.attemptClose}},[t("svg",{attrs:{width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"}},[t("path",{attrs:{d:"M9 16C12.866 16 16 12.866 16 9C16 5.13401 12.866 2 9 2C5.13401 2 2 5.13401 2 9C2 12.866 5.13401 16 9 16Z",stroke:"currentColor","stroke-width":"1.5","stroke-linecap":"round","stroke-linejoin":"round"}}),t("path",{attrs:{d:"M9 12C10.6569 12 12 10.6569 12 9C12 7.34315 10.6569 6 9 6C7.34315 6 6 7.34315 6 9C6 10.6569 7.34315 12 9 12Z",fill:"currentColor"}})])])]),t("ResizeLine",{staticClass:"micro-modal-resize",attrs:{placement:"right",min:e.minSize,max:0,reverse:!0,beforeResize:e.beforeResize},on:{"on-change":e.onChangeResize},model:{value:e.dynamicSize,callback:function(i){e.dynamicSize=i},expression:"dynamicSize"}}),t("div",{ref:"body",staticClass:"micro-modal-body",style:e.bodyStyle},[e._t("default")],2)],1):e._e()])],1)])},g=[];const b={name:"MicroModal",components:{ResizeLine:v},directives:{TransferDom:f},props:{open:{type:Boolean,default:!1},size:{type:Number,default:300},minSize:{type:Number,default:300},options:{type:Object,default:()=>({})},windowType:{type:String,default:"embed"},beforeClose:Function},data(){return{dynamicSize:0,zIndex:1e3,capsuleMenuShow:!1}},computed:{shouldRenderInDom(){return this.open||!!this.options.keep_alive},className(){return{"micro-modal":!0,"micro-modal-hidden":!this.open,"no-dark-content":!this.options.auto_dark_theme,"transparent-mode":!!this.options.transparent,[`${this.windowType}-window`]:!0}},transitions(){return this.options.transparent?["",""]:["micro-modal-fade","micro-modal-slide"]},bodyStyle(){const e={};if(this.options.background){const s=`${this.options.background}|`.split("|");e.background=(this.themeName==="dark"?s[1]:null)||s[0]}return e},maskStyle({zIndex:e}){return{zIndex:e}},contentStyle({dynamicSize:e,zIndex:s}){return{width:e<=100?`${e}%`:`${e}px`,zIndex:s}},capsuleStyle(){const e={zIndex:this.zIndex+1e3},{capsule:s}=this.options;return $A.isJson(s)&&(s.visible===!1&&(e.display="none"),typeof s.top=="number"&&(e.top=`${s.top}px`),typeof s.right=="number"&&(e.right=`${s.right}px`)),e}},watch:{open:{handler(e){e&&(this.zIndex=typeof window.modalTransferIndex=="number"?window.modalTransferIndex++:1e3)},immediate:!0},size:{handler(e){this.dynamicSize=parseInt(e)},immediate:!0}},methods:{beforeResize(){return new Promise(e=>{this.dynamicSize<=100&&this.updateSize(),e()})},onChangeResize({event:e}){e==="up"&&this.updateSize()},updateSize(){this.$refs.body&&(this.dynamicSize=this.$refs.body.clientWidth)},onCapsuleMore(e){const s=[],{capsule:t}=this.options;$A.isJson(t)&&$A.isArray(t.more_menus)&&t.more_menus.forEach(n=>{n.label&&n.value&&s.push(n)});const i=[{label:this.$L("\u91CD\u542F\u5E94\u7528"),value:"restart"},{label:this.$L("\u5173\u95ED\u5E94\u7528"),value:"destroy"}];$A.isMainElectron&&i.unshift({label:this.$L("\u65B0\u7A97\u53E3\u6253\u5F00"),value:"popout"}),s.length>0&&(i[0].divided=!0),this.$store.commit("menu/operation",{event:e,list:[...s,...i],size:"large",onVisibleChange:n=>{this.capsuleMenuShow=n},onUpdate:n=>{this.$emit("on-capsule-more",this.options.name,n)}})},attemptClose(){if(!this.beforeClose)return this.handleClose();const e=this.beforeClose(this.options.name);e&&e.then?e.then(()=>{this.handleClose()}):this.handleClose()},handleClose(){this.$emit("on-confirm-close",this.options.name)}}},u={};var S=c(b,M,g,!1,O,null,null,null);function O(e){for(let s in u)this[s]=u[s]}var E=function(){return S.exports}(),k=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",{staticClass:"micro-app-iframe"},[t("iframe",{ref:"iframe",staticClass:"micro-app-iframe-container",class:{"iframe-immersive":e.immersive},attrs:{src:e.src,sandbox:"allow-scripts allow-forms allow-same-origin allow-popups allow-popups-to-escape-sandbox allow-modals allow-orientation-lock allow-pointer-lock allow-presentation allow-storage-access-by-user-activation allow-downloads",allow:"microphone; camera; speaker-selection; geolocation; accelerometer; gyroscope; magnetometer; fullscreen; picture-in-picture; clipboard-read; clipboard-write"}})])},I=[];const T={name:"MicroIFrame",props:{name:{type:String,default:""},url:{type:String,default:""},data:{type:Object,default:null},immersive:{type:Boolean,default:!1}},data(){return{src:this.url,isReady:!1,hasMounted:!1,hearTbeatLastTime:0}},mounted(){this.pendingBeforeCloses=new Map,this.pendingFunctionCalls=new Map,this.boundHandleMessage=this.handleMessage.bind(this),this.boundHandleLoad=this.handleLoad.bind(this),this.boundHandleError=this.handleError.bind(this),window.addEventListener("message",this.boundHandleMessage),this.$refs.iframe.addEventListener("load",this.boundHandleLoad),this.$refs.iframe.addEventListener("error",this.boundHandleError),this.injectMicroApp()},beforeDestroy(){this.boundHandleMessage&&window.removeEventListener("message",this.boundHandleMessage),this.boundHandleLoad&&this.$refs.iframe.removeEventListener("load",this.boundHandleLoad),this.boundHandleError&&this.$refs.iframe.removeEventListener("error",this.boundHandleError),this.pendingFunctionCalls&&(this.pendingFunctionCalls.forEach(e=>{clearTimeout(e.timeout),e.reject(new Error("Component destroyed"))}),this.pendingFunctionCalls.clear()),this.pendingBeforeCloses&&(this.pendingBeforeCloses.forEach(e=>{e(!1)}),this.pendingBeforeCloses.clear())},methods:{handleLoad(){this.injectMicroApp(),this.hasMounted||(this.hasMounted=!0,this.$emit("mounted",{detail:{name:this.name}}))},handleError(e){this.$emit("error",{detail:{name:this.name,error:e}})},handleMessage(e){if(!this.isFromCurrentIframe(e))return;const s=e.data.type,t=this.handleMessageEnsureJson(e.data.message);switch(s){case"MICRO_APP_READY":this.handleMessageOfReady(t);break;case"MICRO_APP_HEARTBEAT":this.handleMessageOfHeartbeat(t);break;case"MICRO_APP_METHOD":this.handleMessageOfMethod(t);break;case"MICRO_APP_FUNCTION_RESULT":this.handleMessageOfFunctionResult(t);break;case"MICRO_APP_BEFORE_CLOSE":this.handleMessageOfBeforeClose(t);break;case"MICRO_APP_BEFORE_UNLOAD":this.handleMessageOfBeforeUnload(t);break}},handleMessageEnsureJson(e){return $A.isJson(e)?e:{}},handleMessageOfReady({supportBeforeClose:e}){this.handleLoad(),this.isReady=!0,e&&this.$store.commit("microApps/update",{name:this.name,data:{postMessage:s=>{!this.$refs.iframe||!this.$refs.iframe.contentWindow||this.$refs.iframe.contentWindow.postMessage(s,"*")},onBeforeClose:()=>this.hearTbeatLastTime&&Date.now()-this.hearTbeatLastTime>5e3||!this.$refs.iframe||!this.$refs.iframe.contentWindow?!0:new Promise(s=>{const t={id:$A.randomString(16),name:this.name};this.$refs.iframe.contentWindow.postMessage({type:"MICRO_APP_BEFORE_CLOSE",message:t},"*"),this.pendingBeforeCloses.set(t.id,s)})}})},handleMessageOfHeartbeat(){this.hearTbeatLastTime=Date.now()},handleMessageOfMethod({id:e,method:s,args:t}){if(!this.data||!this.data.methods||!this.data.methods[s])return;const i=o=>{this.$refs.iframe.contentWindow.postMessage({type:"MICRO_APP_METHOD_RESULT",message:{id:e,result:$A.cloneJSON(o)}},"*")},n=o=>{this.$refs.iframe.contentWindow.postMessage({type:"MICRO_APP_METHOD_RESULT",message:{id:e,result:null,error:(o==null?void 0:o.message)||o}},"*")};try{const o=this.deserializeFunctions(t),a=this.data.methods[s](...o);a&&a.then?a.then(i).catch(n):i(a)}catch(o){n(o)}},handleMessageOfFunctionResult({callId:e,result:s,error:t}){const i=this.pendingFunctionCalls.get(e);!i||(this.pendingFunctionCalls.delete(e),clearTimeout(i.timeout),t?i.reject(new Error(t)):i.resolve(s))},handleMessageOfBeforeClose({id:e}){!this.pendingBeforeCloses.has(e)||(this.pendingBeforeCloses.get(e)(),this.pendingBeforeCloses.delete(e))},handleMessageOfBeforeUnload(){this.isReady=!1,this.$store.commit("microApps/update",{name:this.name,data:{onBeforeClose:()=>!0}})},isFromCurrentIframe(e){try{const{source:s}=e;return this.$refs.iframe&&s===this.$refs.iframe.contentWindow}catch{return!1}},deserializeFunctions(e){if(e&&typeof e=="object"&&e.__func)return(...s)=>new Promise((t,i)=>{const n=`call_${Date.now()}_${Math.random().toString(36).substring(2,9)}`,o=setTimeout(()=>{this.pendingFunctionCalls.delete(n),i(new Error("Function call timeout"))},5e3);if(this.pendingFunctionCalls.set(n,{resolve:t,reject:i,timeout:o}),!this.$refs.iframe||!this.$refs.iframe.contentWindow){i(new Error("Iframe not ready"));return}this.$refs.iframe.contentWindow.postMessage({type:"MICRO_APP_FUNCTION_CALL",message:{funcId:e.__func,callId:n,args:s}},"*")});if(Array.isArray(e))return e.map(s=>this.deserializeFunctions(s));if(e&&typeof e=="object"&&e.constructor===Object){const s={};for(const t in e)s[t]=this.deserializeFunctions(e[t]);return s}return e},injectMicroApp(){try{const e=this.$refs.iframe.contentWindow;if(e&&this.data)try{e.microApp={getData:()=>this.data}}catch{e.postMessage({type:"MICRO_APP_INJECT",message:{type:this.data.type,props:this.data.props}},"*")}}catch{}}}},h={};var R=c(T,k,I,!1,x,"a00d6704",null,null);function x(e){for(let s in h)this[s]=h[s]}var B=function(){return R.exports}(),P=function(){var e=this,s=e.$createElement,t=e._self._c||s;return t("div",[e._l(e.microApps,function(i,n){return t("MicroModal",{key:n,ref:`ref-${i.name}`,refInFor:!0,attrs:{open:i.isOpen,size:1200,options:i,windowType:e.windowType,beforeClose:e.onBeforeClose},on:{"on-capsule-more":e.onCapsuleMore,"on-popout-window":e.onPopoutWindow,"on-confirm-close":e.closeMicroApp}},[e.shouldRenderIFrame(i)?t("MicroIFrame",{attrs:{name:i.name,url:i.url,data:e.appData(i.name),immersive:i.immersive},on:{mounted:e.mounted,error:e.error}}):e.shouldRenderMicro(i)?t("micro-app",{attrs:{name:i.name,url:i.url,"keep-alive":i.keep_alive,"disable-scopecss":i.disable_scope_css,data:e.appData(i.name)},on:{mounted:e.mounted,error:e.error}}):e._e(),t("transition",{attrs:{name:"fade"}},[e.loadings.includes(i.name)?t("div",{staticClass:"micro-app-loader"},[t("Loading")],1):e._e()])],1)}),t("UserSelect",e._b({ref:"userSelect",attrs:{module:""},model:{value:e.userSelectOptions.value,callback:function(i){e.$set(e.userSelectOptions,"value",i)},expression:"userSelectOptions.value"}},"UserSelect",e.userSelectOptions.config,!1)),t("Modal",{attrs:{closable:!0,mask:!1,"mask-closable":!1,"footer-hide":!0,"transition-names":["",""],beforeClose:e.onAssistClose,"class-name":"micro-app-assist"},model:{value:e.assistShow,callback:function(i){e.assistShow=i},expression:"assistShow"}})],2)},F=[];const D={name:"MicroApps",directives:{TransferDom:f},components:{MicroModal:E,UserSelect:p,MicroIFrame:B},props:{windowType:{type:String,default:"embed"}},data(){return{assistShow:!1,userSelectOptions:{value:[],config:{}},backupConfigs:{},loadings:[],closings:[]}},created(){r.unmountAllApps({destroy:!0}),r.start({"router-mode":"state",iframe:!0,iframeSrc:window.location.origin+"/assets/empty.html"})},mounted(){l.on("observeMicroApp:open",this.onOpen),l.on("observeMicroApp:updatedOrUninstalled",this.onUpdatedOrUninstalled)},beforeDestroy(){l.off("observeMicroApp:open",this.onOpen),l.off("observeMicroApp:updatedOrUninstalled",this.onUpdatedOrUninstalled)},watch:{userToken(e){e||this.unmountAllMicroApp()},themeName(){this.unmountAllMicroApp()},assistShow(e){!e&&$A.isSubElectron&&$A.Electron.sendMessage("windowDestroy")},microApps:{handler(e){this.assistShow=!!e.find(s=>s.isOpen)},deep:!0}},computed:{...w(["userInfo","themeName","microApps","safeAreaSize"])},methods:{mounted(e){this.finish(e.detail.name)},error(e){this.finish(e.detail.name),$A.modalError({language:!1,title:this.$L("\u5E94\u7528\u52A0\u8F7D\u5931\u8D25"),content:e.detail.error,onOk:()=>{this.closeMicroApp(e.detail.name,!0)}})},finish(e){this.loadings=this.loadings.filter(s=>s!==e)},appData(e){const s=this.microApps.find(t=>t.name==e);return s?{type:"init",instance:{Vue:A,store:d,components:{DialogWrapper:C,UserSelect:p,DatePicker:_.exports.DatePicker}},props:{...s.props,name:s.name,url:s.url,urlType:s.url_type,userId:this.userId,userToken:this.userToken,userInfo:this.userInfo,baseUrl:$A.mainUrl(),systemInfo:window.systemInfo,windowType:this.windowType,isEEUIApp:$A.isEEUIApp,isElectron:$A.isElectron,isMainElectron:$A.isMainElectron,isSubElectron:$A.isSubElectron,languageList:y,languageName:$,themeName:this.themeName,safeArea:this.safeAreaSize},methods:{close:(t=!1)=>{this.closeMicroApp(e,t)},back:()=>{this.closeByName(e)},popoutWindow:async(t=null)=>{await this.onPopoutWindow(e,t)},openWindow:t=>{$A.isJson(t)||(t={path:t}),t.url&&(t.path=t.url,delete t.url),this.$store.dispatch("openChildWindow",t)},openTabWindow:t=>{this.$store.dispatch("openWebTabWindow",t)},openAppPage:t=>{$A.isJson(t)||(t={url:t}),this.$store.dispatch("openAppChildPage",{pageType:"app",pageTitle:t.title||" ",url:"web.js",params:{url:t.url,titleFixed:typeof t.titleFixed=="boolean"?t.titleFixed:!1}})},requestAPI:async t=>await d.dispatch("call",t),selectUsers:async t=>($A.isJson(t)||(t={value:t}),$A.isArray(t.value)||(t.value=t.value?[t.value]:[]),this.userSelectOptions.value=t.value,delete t.value,this.userSelectOptions.config=t,await new Promise((i,n)=>{this.$refs.userSelect.onSelection(o=>{i(o)},n)})),setCapsuleConfig:t=>{!$A.isJson(t)||(this.$store.commit("microApps/update",{name:e,data:{capsule:t}}),this.setCapsuleCache(e,t))},nextZIndex:()=>typeof window.modalTransferIndex=="number"?window.modalTransferIndex++:1e3,isFullScreen:()=>window.innerWidth<768||this.windowType==="popout",extraCallA:(...t)=>{if(t.length>0&&typeof t[0]=="string"){const i=t[0],n=t.slice(1);if(typeof $A[i]=="function")return $A[i](...n)}return null},extraCallStore:async(...t)=>{if(t.length>0&&typeof t[0]=="string"){const i=t[0],n=t.slice(1);await this.$store.dispatch(i,...n)}return null}}}:{}},async setCapsuleCache(e,s){const t=await $A.IDBJson("microAppsCapsuleCache");if($A.isTrue(s.no_cache)){if(typeof t[e]=="undefined")return;delete t[e]}else t[e]=s;await $A.IDBSet("microAppsCapsuleCache",t)},async removeCapsuleCache(e){const s=await $A.IDBJson("microAppsCapsuleCache");typeof s[e]!="undefined"&&(delete s[e],await $A.IDBSet("microAppsCapsuleCache",s))},async onOpen(e){this.backupConfigs[e.name]=$A.cloneJSON(e);const s=await $A.IDBJson("microAppsCapsuleCache");if($A.isJson(s[e.name])&&($A.isHave(e.capsule,!0)?Object.assign(e.capsule,s[e.name]):e.capsule=s[e.name]),/_blank$/i.test(e.url_type)){await this.inlineBlank(e);return}if(e.url_type==="external"){await this.externalWindow(e);return}const t=this.microApps.find(({name:i})=>i==e.name);t?(t.keepAliveBackup!==void 0&&(t.keep_alive=t.keepAliveBackup,delete t.keepAliveBackup),(t.url!=e.url||!t.keep_alive)&&(this.unmountMicroApp(t),this.loadings.push(t.name)),Object.assign(t,e),requestAnimationFrame(i=>{t.isOpen=!0,t.lastOpenAt=Date.now(),this.$store.commit("microApps/keepAlive",3)})):(e.isOpen=!1,e.postMessage=()=>{},e.onBeforeClose=()=>!0,this.$store.commit("microApps/push",e),this.loadings.push(e.name),requestAnimationFrame(i=>{e.isOpen=!0,e.lastOpenAt=Date.now(),this.$store.commit("microApps/keepAlive",3)}))},async inlineBlank(e,s=null){const t={...e,url_type:e.url_type.replace(/_blank$/,""),transparent:!0,keep_alive:!1};s!=null&&s.url&&(t.url=s.url,delete s.url);const i=`/single/apps/${t.name}`,n=(await $A.IDBArray("cacheMicroApps")).filter(o=>o.name!=t.name);n.length>50&&n.splice(0,10),n.push(t),await $A.IDBSet("cacheMicroApps",$A.cloneJSON(n)),this.$Electron?await this.$store.dispatch("openChildWindow",{name:`single-apps-${$A.randomString(6)}`,path:i,force:!1,config:Object.assign({title:" ",parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)},$A.isJson(s)?s:{})}):this.$isEEUIApp?await this.$store.dispatch("openAppChildPage",{pageType:"app",pageTitle:" ",url:"web.js",params:{url:$A.urlReplaceHash(i)}}):window.open($A.mainUrl(i.substring(1)))},async externalWindow(e){this.$Electron?await this.$store.dispatch("openChildWindow",{name:`external-apps-${$A.randomString(6)}`,path:e.url,force:!1,config:{title:" ",parent:null,width:Math.min(window.screen.availWidth,1440),height:Math.min(window.screen.availHeight,900)}}):this.$isEEUIApp?await this.$store.dispatch("openAppChildPage",{pageType:"app",pageTitle:" ",url:"web.js",params:{url:e.url}}):window.open(e.url)},closeAppState(e){this.closings.push(e.name),e.isOpen=!1,setTimeout(()=>{this.closings=this.closings.filter(s=>s!==e.name)},300)},closeByName(e){try{this.$refs[`ref-${e}`][0].attemptClose()}catch{this.closeMicroApp(e)}},closeMicroApp(e,s=!1){const t=this.microApps.find(i=>i.name==e);!t||(this.closeAppState(t),s===!0&&this.unmountMicroApp(t))},unmountMicroApp(e){e.keep_alive&&(e.keepAliveBackup=!0,e.keep_alive=!1),r.unmountApp(e.name,{destroy:!0})},unmountAllMicroApp(){this.microApps.forEach(e=>{this.closeAppState(e),this.unmountMicroApp(e)})},onBeforeClose(e){return new Promise(s=>{const t=()=>{$A.isSubElectron?$A.Electron.sendMessage("windowDestroy"):s()},i=this.microApps.find(n=>n.name==e);if(!i){t();return}if(this.isIframe(i.url_type)){const n=i.onBeforeClose();n&&n.then?n.then(()=>{t()}):t();return}r.forceSetData(e,{type:"beforeClose"},n=>{n!=null&&n.find(o=>o===!0)||($A.leftExists(e,"appstore")&&this.$store.dispatch("updateMicroAppsStatus"),t())})})},onAssistClose(){return new Promise(e=>{const s=this.microApps.findLast(t=>t.isOpen);s?this.closeByName(s.name):e()})},onCapsuleMore(e,s){switch(s){case"popout":this.onPopoutWindow(e);break;case"restart":this.removeCapsuleCache(e),this.onRestartApp(e);break;case"destroy":this.removeCapsuleCache(e),this.closeMicroApp(e,!0);break;default:const t=this.microApps.find(i=>i.name==e);if(!t)return;if(this.isIframe(t.url_type)){t.postMessage({type:"MICRO_APP_MENU_CLICK",message:s});return}r.forceSetData(e,{type:"menuClick",message:s});break}},async onRestartApp(e){this.closeMicroApp(e,!0),await new Promise(t=>setTimeout(t,300));const s=this.backupConfigs[e];if(!s){$A.modalError("\u5E94\u7528\u4E0D\u5B58\u5728");return}await this.onOpen(s)},async onPopoutWindow(e,s=null){const t=this.microApps.find(i=>i.name==e);if(!t){$A.modalError("\u5E94\u7528\u4E0D\u5B58\u5728");return}await this.inlineBlank(t,s),this.closeMicroApp(e,!0)},isIframe(e){return/^iframe/i.test(e)},shouldRenderIFrame(e){return e.url&&this.isIframe(e.url_type)&&(e.isOpen||e.keep_alive)},shouldRenderMicro(e){return e.url&&!this.isIframe(e.url_type)&&(e.isOpen||this.closings.includes(e.name))},onUpdatedOrUninstalled(e){const s=e.map(t=>t.id);s.length!==0&&this.microApps.forEach(t=>{s.includes(t.id)&&this.closeMicroApp(t.name,!0)})}}},m={};var L=c(D,P,F,!1,z,null,null,null);function z(e){for(let s in m)this[s]=m[s]}var q=function(){return L.exports}();export{q as M};