mirror of
https://github.com/aaPanel/aaPanel.git
synced 2026-09-27 20:04:50 +02:00
32 lines
15 KiB
JavaScript
32 lines
15 KiB
JavaScript
;(() => {
|
|
const stylesheetSelector = "link[rel=stylesheet]"
|
|
const loaded = new Set(Array.from(document.querySelectorAll(stylesheetSelector)).map(link => link.href))
|
|
const version = "1787646744133"
|
|
const findLoadedLink = href => Array.from(document.querySelectorAll(stylesheetSelector)).find(link => link.href === href)
|
|
const removeAfterLoad = (freshLink, staleLink) => {
|
|
const remove = () => staleLink.remove()
|
|
if (freshLink.sheet) {
|
|
requestAnimationFrame(remove)
|
|
return
|
|
}
|
|
freshLink.addEventListener("load", remove, { once: true })
|
|
}
|
|
for (const link of Array.from(document.querySelectorAll(stylesheetSelector))) {
|
|
const url = new URL(link.href, location.href)
|
|
if (url.origin !== location.origin || url.searchParams.get("v") === version) continue
|
|
url.searchParams.set("v", version)
|
|
if (loaded.has(url.href)) {
|
|
const freshLink = findLoadedLink(url.href)
|
|
if (freshLink && freshLink !== link) removeAfterLoad(freshLink, link)
|
|
continue
|
|
}
|
|
const freshLink = document.createElement("link")
|
|
freshLink.rel = "stylesheet"
|
|
freshLink.href = url.href
|
|
link.parentNode?.insertBefore(freshLink, link.nextSibling)
|
|
loaded.add(url.href)
|
|
removeAfterLoad(freshLink, link)
|
|
}
|
|
})();
|
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/feature-Pay.js?v=1787646744133","js/rolldown-runtime.js?v=1787646744133","js/vendor-utils.js?v=1787646744133","js/vendor-vue.js?v=1787646744133","js/vendor-naive.js?v=1787646744133","js/vendor.js?v=1787646744133","css/vendor.css?v=1787646744133","js/app.js?v=1787646744133","js/vendor-pdf.js?v=1787646744133","js/vendor-polyfills.js?v=1787646744133","js/app-icons.js?v=1787646744133","css/app.css?v=1787646744133","js/app-components.js?v=1787646744133","js/app-base.js?v=1787646744133","js/vendor-code-highlight.js?v=1787646744133","css/vendor-code-highlight.css?v=1787646744133","css/app-base.css?v=1787646744133","js/vendor-pay.js?v=1787646744133","css/app-components.css?v=1787646744133","js/app-shared.js?v=1787646744133","js/app-modal-ui.js?v=1787646744133","js/vendor-crypto.js?v=1787646744133","css/app-shared.css?v=1787646744133","js/domain-config.js?v=1787646744133","js/app-form.js?v=1787646744133","css/app-form.css?v=1787646744133","css/domain-config.css?v=1787646744133","css/feature-Pay.css?v=1787646744133"])))=>i.map(i=>d[i]);
|
|
import{Cn as e,Dn as t,En as n,Gn as r,Hn as i,In as a,Jn as o,Ln as s,On as c,Or as l,Qn as u,Sn as d,Xn as f,Yr as p,Zn as m,Zr as h,ar as g,bn as _,br as v,cr as y,ei as b,g as x,kn as S,mn as C,nn as w,rr as T,s as E,vr as D,vt as O,xn as k,yn as A}from"./vendor-utils.js?v=1787646744133";import{a as ee,l as j,o as M,p as N}from"./vendor-vue.js?v=1787646744133";import{B as P,L as F,Tt as I,b as L,gt as R,in as z,mt as te,rt as B,tt as ne,wt as V}from"./vendor-naive.js?v=1787646744133";import{Kf as re,Nf as ie,Oa as H,Pf as ae,Rf as oe,Tn as se,Wf as ce,_p as le,_s as ue,a as U,bs as W,gp as de,i as G,mn as K,n as fe,vs as pe,yp as q,zf as J}from"./app.js?v=1787646744133";import{Di as me,F as he,Ii as ge,ia as Y}from"./app-components.js?v=1787646744133";import{md as _e,wd as ve}from"./app-shared.js?v=1787646744133";import{n as ye,r as be}from"./vendor-pdf.js?v=1787646744133";w();var xe=S({__name:`index`,props:{padding:{type:[String,Number],default:`16px`}},setup(t){return(n,r)=>(o(),e(`div`,{style:h({padding:l(z)(t.padding)})},[m(n.$slots,`default`)],4))}});w();function X(e){return typeof e==`function`||Object.prototype.toString.call(e)===`[object Object]`&&!a(e)}var Se=S({__name:`time`,props:{endtime:{default:0}},emits:[`finish`],setup(e,{emit:r}){let i=e,a=r,s=A(()=>{let e=Date.now(),t=i.endtime*1e3;return Math.max(0,t-e)}),c=e=>e.toString().padStart(2,`0`),u=({hours:e,minutes:r,seconds:i})=>{let a,o,s,l,u=Math.floor(e/24);return e%=24,t(`div`,{class:`inline-flex items-center`},[u>0?t(V,{type:`error`,size:`small`,class:`px-2px h-20px`,bordered:!1},X(a=c(u))?a:{default:()=>[a]}):``,u>0?t(`span`,{class:`mx-4px`},[n(`:`)]):``,t(V,{type:`error`,size:`small`,class:`px-2px h-20px`,bordered:!1},X(o=c(e))?o:{default:()=>[o]}),t(`span`,{class:`mx-4px`},[n(`:`)]),t(V,{type:`error`,size:`small`,class:`px-2px h-20px`,bordered:!1},X(s=c(r))?s:{default:()=>[s]}),t(`span`,{class:`mx-4px`},[n(`:`)]),t(V,{type:`error`,size:`small`,class:`px-2px h-20px`,bordered:!1},X(l=c(i))?l:{default:()=>[l]})])},d=()=>{i.endtime>0&&a(`finish`)};return(e,t)=>{let n=B;return o(),k(n,{duration:l(s),render:u,"on-finish":d},null,8,[`duration`])}}});w(),be();var Ce={class:`text-pro`},we={key:0,class:`font-bold`},Te={key:1,class:`flex items-center`},Ee={class:`mr-6px`},Z=J(S({__name:`index`,props:{arrowPlacement:{type:String,default:`right`}},setup(n){let r=ue(),{showCoupon:i,receiveCoupon:a}=N(r),{width:s}=x(),u=v([]),f=A(()=>u.value.length),m=A(()=>f.value===0?0:u.value[f.value-1].deduct_amount),h=D({quota:0,total:0,received:0}),g=()=>{if(a.value.status===1){ae({width:400,bgColor:`transparent`,data:{obtainId:a.value.obtain_id,endTime:a.value.end_time,couponQuota:h,couponList:u.value,onReceive:()=>{U({source:176})}},component:c(()=>ye(()=>import(`./feature-Pay.js?v=1787646744133`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])))});return}else a.value.total>0&&U({source:176})};return(async()=>{let e=await r.getReceiveCoupon();q(e)&&(O(e.coupons,`deduct_amount`),u.value=e.coupons,e.package_quota&&(h.quota=e.package_quota.quota,h.total=e.package_quota.total,h.received=e.package_quota.total-e.package_quota.quota))})(),(r,c)=>l(i)?(o(),e(`div`,{key:0,class:p([`coupon-box`,n.arrowPlacement]),onClick:g},[c[0]||(c[0]=_(`div`,{class:`coupon-logo`},null,-1)),_(`div`,Ce,[l(a).status===1?(o(),e(`div`,we,b(l(s)>1500?r.$t(`Component.Coupon.index_11`,[l(m)]):r.$t(`Component.Coupon.index_12`,[l(f)])),1)):l(a).total>0?(o(),e(`div`,Te,[_(`span`,Ee,b(r.$t(`Component.Coupon.index_4`)),1),t(Se,{endtime:l(a).end_time},null,8,[`endtime`])])):d(``,!0)])],2)):d(``,!0)}}),[[`__scopeId`,`data-v-cebcd9fb`]]);w();var De=S({__name:`index`,props:s({multiple:{type:Boolean,default:!0}},{value:{},valueModifiers:{}}),emits:[`update:value`],setup(e){let{t:r}=j(),{loading:i,setLoading:a}=H(),s=T(e,`value`),c=v([]),u=v([{name:`mail`,title:r(`Config.Alarm.index_3`),ps:r(`Config.Alarm.index_36`),help:`https://www.bt.cn/bbs/thread-66183-1-1.html`,list:[]},{name:`dingding`,title:r(`Config.Alarm.index_5`),ps:r(`Config.Alarm.index_37`),help:`https://www.bt.cn/bbs/thread-108081-1-1.html`,list:[]},{name:`weixin`,title:r(`Config.Alarm.index_6`),ps:r(`Config.Alarm.index_38`),help:`https://www.bt.cn/bbs/thread-108116-1-1.html`,list:[]},{name:`feishu`,title:r(`Config.Alarm.index_4`),ps:r(`Config.Alarm.index_39`),help:`https://www.aapanel.com/forum/d/16942-aapanel-how-does-set-lark-or-feishu-notification`,list:[]},{name:`tg`,title:`Telegram`,ps:`Use Telegram to send and receive panel notifications`,help:`https://www.aapanel.com/docs/Function/Tutorial/telegram-alarm.html`,list:[]},{name:`discord`,title:`Discord`,ps:`Use Discord to send and receive panel notifications`,help:`https://www.aapanel.com/docs/Function/Tutorial/discord-alarm.html`,list:[]},{name:`webhook`,title:`Webhook`,ps:`Use Webhook to send and receive panel notifications`,help:`https://www.aapanel.com/docs/Function/Tutorial/webhook-alarm.html`,list:[]}]),d=async()=>{try{a(!0);let{message:e}=await _e({refresh:0});c.value=[],de(e)&&(u.value.forEach(t=>{t.list=e.filter(e=>e.sender_type===t.name)}),u.value.forEach(i=>{let a=e.filter(e=>e.used&&e.sender_type===i.name);a.length>0?a.forEach(e=>{c.value.push({label:`${e.data.title} (${i.title})`,value:e.id})}):c.value.push({label:()=>t(C,null,[i.title,n(`[`),t(`a`,{class:`bt-link`,onClick:()=>{ve({row:i,onRefresh:d})}},[r(`Public.Btn.Conf`)]),n(`]`)]),value:i.name,disabled:!0})}))}finally{a(!1)}};return d(),(t,n)=>{let r=ne;return o(),k(r,{value:s.value,"onUpdate:value":n[0]||(n[0]=e=>s.value=e),loading:l(i),options:l(c),multiple:e.multiple,"max-tag-count":`responsive`,placeholder:t.$t(`Config.Alarm.index_86`)},null,8,[`value`,`loading`,`options`,`multiple`,`placeholder`])}}});w();var Q=J(S({__name:`index`,props:{source:{type:Number,default:27}},setup(t){let{isPro:n}=N(G()),r=()=>{U({source:t.source})};return(t,i)=>(o(),e(`div`,{class:p([`pro-badge`,{pro:l(n)}]),onClick:r},[...i[0]||(i[0]=[_(`i`,{class:`i-common:pro text-14px color-white`},null,-1),_(`span`,{class:`text`},`PRO`,-1)])],2))}}),[[`__scopeId`,`data-v-2b0f127e`]]);w();var Oe={class:`flex items-center gap-10px`},ke={class:`text-default`},Ae={key:0},je={key:0},Me={class:`mr-4px`},Ne={class:`text-[#fc6d26] font-bold`},Pe=S({__name:`index`,setup(r){let{isFree:i,isPro:a,authExpired:s,versionType:c}=N(G()),u=window.panelVersion,f=()=>{U({source:80})},p=()=>{U({source:81})};return(r,m)=>{let h=R,g=K;return o(),e(`div`,Oe,[l(i)?(o(),e(C,{key:0},[t(Q,{source:80}),_(`div`,ke,b(r.$t(`Component.Auth.index_1`)),1),l(!0)?(o(),e(`span`,Ae,b(l(u))+` `+b(l(c)),1)):d(``,!0),t(h,{class:`h-24px px-8px`,type:`primary`,onClick:f},{default:y(()=>[n(b(r.$t(`Component.Auth.index_5`)),1)]),_:1})],64)):d(``,!0),l(a)?(o(),e(C,{key:1},[t(Q,{source:81}),l(!0)?(o(),e(`span`,je,b(l(u))+` `+b(l(c)),1)):d(``,!0),_(`div`,null,[_(`span`,Me,b(r.$t(`Component.Auth.index_4`)),1),_(`span`,Ne,b(l(s)),1)]),t(g,{class:`font-bold`,onClick:p},{default:y(()=>[n(b(r.$t(`Component.Auth.index_2`)),1)]),_:1})],64)):d(``,!0)])}}});w();var Fe={class:`p-16px`},Ie=[`onClick`],Le={class:`flex items-center gap-12px pr-16px`},Re=J(S({__name:`index`,props:{noRouter:{type:Boolean,default:!1}},emits:[`change`],setup(n,{emit:r}){let a=n,s=r,c=ee(),h=M(),x=G(),S=pe(),{userInfo:w,authExpired:T}=N(x),D=g(`menuListRef`),O=g(`menuContainerRef`),{width:j}=E(D),{width:P}=E(O),F=A(()=>P.value-j.value>460),I=A(()=>c.meta.hideNav!==!0),L=v([]),R=()=>{let e=c.meta.install,t=c.meta.activeMenu,n=+!!e;for(let e=0;e<W.length;e++){let{children:i}=W[e];if(!i)return;if(i[0].name===t){let{path:t}=W[e];if(i&&i.length>0){var r;L.value=((r=i[n].children)==null?void 0:r.map(e=>{var n;return{path:`${t}/${e.path}`,name:String(e.name),title:`${((n=e.meta)==null?void 0:n.title)||``}`,hidden:e.meta&&le(e.meta.hidden)?e.meta.hidden:!1}}))||[]}break}}},z=e=>{fe(`panel_fun_menu`,e.name),a.noRouter||(B(e),h.push(e.path)),s(`change`,e)},B=e=>{let t=c.matched[0].name,n=ce(`page-menu-new`,JSON.stringify({})),r=JSON.parse(n);t&&(r[String(t)]=e.name),re(`page-menu-new`,JSON.stringify(r))};return R(),i(()=>{S.generateRoutes()}),(n,r)=>{let i=Pe,a=te,s=u(`router-view`);return o(),e(`div`,Fe,[l(I)?(o(),k(a,{key:0,class:`mb-12px rounded-10px`},{default:y(()=>[_(`div`,{ref_key:`menuContainerRef`,ref:O,class:`flex items-center justify-between min-h-48px`},[_(`div`,{ref_key:`menuListRef`,ref:D,class:`menu-list`},[(o(!0),e(C,null,f(l(L),t=>(o(),e(C,{key:t.name},[t.hidden===!0?d(``,!0):(o(),e(`div`,{key:0,class:p([`menu-item`,{active:t.name===n.$route.name}]),onClick:e=>z(t)},b(t.title),11,Ie))],64))),128))],512),_(`div`,Le,[n.$slots.suffix?m(n.$slots,`suffix`,{key:0},void 0,!0):l(F)?(o(),e(C,{key:1},[l(w).status&&l(T)!==`Lifetime`?(o(),k(Z,{key:0})):d(``,!0),t(i)],64)):d(``,!0)])],512)]),_:3})):d(``,!0),m(n.$slots,`public-exam`,{},void 0,!0),t(s)])}}}),[[`__scopeId`,`data-v-aaa9b4a6`]]);w();var ze={key:0,class:`i-material-symbols:network-node color-primary text-16px`},Be={class:`m-2px`},Ve=J(S({__name:`index`,props:{softName:{default:``},openSoft:{default:``},isWebSite:{type:Boolean,default:!1}},setup(r){let i=r,{t:a}=j(),{multiService:s}=N(G()),c=v({status:!0,s_status:!0,msg:``,version:`0`,name:``,title:``,admin:!1,s_version:``}),u=A(()=>Y(c.value.name)+` `+c.value.version),{loading:f,setLoading:m}=H(),h=async()=>{try{m(!0);let{message:e}=await me({name:i.softName});q(e)&&(c.value=e)}finally{m(!1)}},g=(e,t)=>{ie({title:`${t} ${u.value}`,content:a(`Component.SoftState.index_1`,[t.toLowerCase(),Y(c.value.name)]),onConfirm:async()=>{await ge({name:c.value.s_version,type:e}),h()}})},x=()=>{se({name:i.openSoft?i.openSoft:i.softName,title:Y(c.value.name),admin:!0})};return h(),(i,m)=>{let h=L,v=oe,S=R,w=K,T=P,E=F,D=I;return o(),k(D,{trigger:`hover`},{trigger:y(()=>[l(f)?(o(),k(h,{key:0,width:120,height:32,sharp:!1})):(o(),k(S,{key:1,class:`min-w-120px soft-btn`,type:l(c).s_status?`default`:`error`,onClick:x},{default:y(()=>[r.isWebSite&&l(s)?(o(),e(`i`,ze)):(o(),k(v,{key:1,name:`soft-${r.softName}`,size:`20`},null,8,[`name`])),_(`span`,Be,b(l(u)),1),_(`span`,{class:p([`text-14px`,`${l(c).s_status?`i-mage:play-fill text-primary`:`i-mage:pause-fill text-error`}`])},null,2)]),_:1},8,[`type`]))]),default:y(()=>[t(E,{class:`items-center`,size:8},{default:y(()=>[t(w,{onClick:m[0]||(m[0]=e=>g(l(c).s_status?`stop`:`start`,l(c).s_status?i.$t(`Public.Status.Stop`):i.$t(`Public.Status.Start`)))},{default:y(()=>[n(b(l(c).s_status?i.$t(`Public.Status.Stop`):i.$t(`Public.Status.Start`)),1)]),_:1}),t(T,{class:`mx-0!`,vertical:``}),t(w,{onClick:m[1]||(m[1]=e=>g(`restart`,l(a)(`Public.Status.Restart`)))},{default:y(()=>[n(b(i.$t(`Public.Status.Restart`)),1)]),_:1}),t(T,{class:`mx-0!`,vertical:``}),t(w,{onClick:m[2]||(m[2]=e=>g(`reload`,l(a)(`Public.Status.Reload`)))},{default:y(()=>[n(b(i.$t(`Public.Status.Reload`)),1)]),_:1}),r.softName===`pgsql`?d(``,!0):(o(),e(C,{key:0},[t(T,{class:`mx-0!`,vertical:``}),t(w,{onClick:x},{default:y(()=>[n(b(i.$t(`Database.Mysql.index_26`)),1)]),_:1})],64))]),_:1})]),_:1})}}}),[[`__scopeId`,`data-v-e30fb08b`]]);w();var $={class:`relative h-full`},He={key:0,class:`install-box`},Ue={class:`install-desc`},We=J(S({__name:`index`,props:{active:{type:Boolean,default:!0}},setup(t){return(n,r)=>(o(),e(`div`,$,[m(n.$slots,`default`,{},void 0,!0),t.active?d(``,!0):(o(),e(`div`,He,[_(`div`,Ue,[m(n.$slots,`desc`,{},void 0,!0)])]))]))}}),[[`__scopeId`,`data-v-cbd3a0f8`]]);w();var Ge=[`src`],Ke=J(S({__name:`index`,props:{path:{default:``}},setup(t){let n=v(`/`+t.path),i=v(null),a=v(996),s=()=>{a.value=998,u()},c=()=>{a.value=998},u=()=>{var e;let t=(e=i.value)==null?void 0:e.contentWindow;t&&t.postMessage(`init`,`*`)},d=()=>{window.addEventListener(`message`,e=>{e.data===`showMainView`&&(a.value=996)})};return r(()=>{d()}),(t,r)=>(o(),e(`iframe`,{ref_key:`frameRef`,ref:i,class:`iframePage`,src:l(n),style:h({zIndex:l(a)}),onLoad:s,onMouseenter:c},null,44,Ge))}}),[[`__scopeId`,`data-v-c7344c42`]]);w();var qe=S({__name:`index`,props:{source:{type:Number,required:!0}},emits:[`init`],setup(e,{emit:r}){let i=r,{isPro:a}=N(G()),s=()=>{U({source:e.source})};return a.value&&i(`init`),(e,r)=>{let i=R,c=he;return o(),k(c,{install:l(a)},{desc:y(()=>[_(`span`,null,b(e.$t(`WP.Config.index_34`)),1),t(i,{class:`ml-8px`,onClick:s,type:`primary`,size:`small`},{default:y(()=>[n(b(e.$t(`Component.Auth.index_3`)),1)]),_:1})]),default:y(()=>[m(e.$slots,`default`)]),_:3},8,[`install`])}}});w();var Je={};function Ye(e,t){let n=V;return o(),k(n,{size:`small`,bordered:!1},{default:y(()=>[m(e.$slots,`default`,{},void 0,!0)]),_:3})}var Xe=J(Je,[[`render`,Ye],[`__scopeId`,`data-v-3eeccaf3`]]);export{Ve as a,De as c,We as i,Z as l,qe as n,Re as o,Ke as r,Q as s,Xe as t,xe as u}; |