1 |
- import{J as n,B as e}from"./index.1713442796762.js";import{a as i}from"./dialog.1713442796762.js";const t={"tab://setting":()=>{n.emit("openController")},"tab://addSearchEngine":(e={})=>{e.size={width:window.innerWidth<500?"380px":"600px",height:"400px",top:window.innerHeight>700?"260px":"15vh"},e.component="addSearchEngine",n.emit("openPlugin",e)},"tab://addicon":(e={})=>{e.full=!1,e.size={width:window.innerWidth<500?"calc(100% - 15px)":"1000px",height:window.innerWidth>500?"550px":window.innerHeight-200+"px"},e.component="addicon",n.emit("openPlugin",e)},"tab://editAll":(n={})=>{setTimeout((()=>{e.state.editStatus=!0}),100)},"tab://background":(e={})=>{e.full=!1,e.size={width:window.innerWidth<500?"calc(100% - 15px)":"1000px",height:window.innerWidth>500?"550px":window.innerHeight-200+"px"},e.component="background",n.emit("openPlugin",e)}};window.openCard=function(n){let{width:e=null,height:t=null,minHeight:o=null,minWidth:d=null,custom:r={},origin:a={}}=n;r||(r={});const{width:l=(window.innerWidth<1250?850:1200),height:s=(window.innerHeight<750?550:700)}=r;new i({width:null==e?l:e,height:null==t?s:t,title:n.name,ico:n.src,url:n.url,minHeight:o,minWidth:d,custom:r,origin:a}).open()};const o=n=>{e.state.moveStatus=!1,window.openCard({name:n.name,src:n.src,url:n.window})},d=(n,i=0)=>{const t=e.getters.find(n);if(t){const{app:n=0,custom:e={}}=t;if(1===n){let n="";n=(/^http/.test(t.url),t.url),window.openCard({name:t.name,src:t.src,url:n,origin:t,custom:e})}else a(t.url)}},r=n=>{let e=document.createElement("a");e.href=n,e.target="_blank",e.click(),e.remove()},a=(n,i=!1)=>{if(t[n])t[n]();else if(i)r(n);else if(e.state.config.openType.linkOpen)r(n);else{let e=document.createElement("a");e.href=n,e.click(),e.remove()}};n.on("openCard",(n=>{openCard(n)}));export{t as C,a,o as b,r as o,d as r};
|