From 69e3e4c45cf815f79424d9fb3f16f734cdd78489 Mon Sep 17 00:00:00 2001
From: yuyx <237899745@qq.com>
Date: Sat, 7 Feb 2026 09:54:11 +0800
Subject: [PATCH] feat(admin): compact mobile cards for report center
---
admin-frontend/src/pages/ReportPage.vue | 271 ++++++++++++++++++
static/admin/.vite/manifest.json | 66 ++---
...YHYxD.js => AnnouncementsPage-S4Vp-C2C.js} | 2 +-
static/admin/assets/EmailPage-BbHeWCVl.js | 1 -
static/admin/assets/EmailPage-QNoD0vM8.js | 1 +
static/admin/assets/FeedbacksPage-DHEEAjuM.js | 1 -
static/admin/assets/FeedbacksPage-c1mEklN7.js | 1 +
static/admin/assets/LogsPage-B8VOeIJO.js | 1 -
static/admin/assets/LogsPage-D81ZpiBx.js | 1 +
static/admin/assets/MetricGrid-CO_q83yh.js | 1 +
static/admin/assets/MetricGrid-DZUrF_Un.js | 1 -
static/admin/assets/ReportPage-C-_600qN.js | 1 -
static/admin/assets/ReportPage-Cgvv4cbM.js | 1 +
static/admin/assets/ReportPage-HC4elboH.css | 1 -
static/admin/assets/ReportPage-MS8zJmyZ.css | 1 +
...e-Ce7j6UO4.js => SecurityPage-BLF3zGyy.js} | 4 +-
static/admin/assets/SettingsPage-kou4GC5e.js | 1 +
static/admin/assets/SettingsPage-nj1AULlf.js | 1 -
...age-i6_qDLAX.js => SystemPage-DZnURk26.js} | 4 +-
...Page-BbP8F1bH.js => UsersPage-7SCtUJvO.js} | 2 +-
.../{email-CvVAilYN.js => email-DXFDTcFR.js} | 2 +-
.../{index-BTIe-LzI.js => index-CpTjoI5H.js} | 4 +-
...{system-VhyLCmjS.js => system-DoHHS63d.js} | 2 +-
.../{tasks-D7g7NShX.js => tasks-DZN3Iufx.js} | 2 +-
.../{users-BEod_y0N.js => users-COdHnepZ.js} | 2 +-
static/admin/index.html | 2 +-
26 files changed, 324 insertions(+), 53 deletions(-)
rename static/admin/assets/{AnnouncementsPage-BI2YHYxD.js => AnnouncementsPage-S4Vp-C2C.js} (75%)
delete mode 100644 static/admin/assets/EmailPage-BbHeWCVl.js
create mode 100644 static/admin/assets/EmailPage-QNoD0vM8.js
delete mode 100644 static/admin/assets/FeedbacksPage-DHEEAjuM.js
create mode 100644 static/admin/assets/FeedbacksPage-c1mEklN7.js
delete mode 100644 static/admin/assets/LogsPage-B8VOeIJO.js
create mode 100644 static/admin/assets/LogsPage-D81ZpiBx.js
create mode 100644 static/admin/assets/MetricGrid-CO_q83yh.js
delete mode 100644 static/admin/assets/MetricGrid-DZUrF_Un.js
delete mode 100644 static/admin/assets/ReportPage-C-_600qN.js
create mode 100644 static/admin/assets/ReportPage-Cgvv4cbM.js
delete mode 100644 static/admin/assets/ReportPage-HC4elboH.css
create mode 100644 static/admin/assets/ReportPage-MS8zJmyZ.css
rename static/admin/assets/{SecurityPage-Ce7j6UO4.js => SecurityPage-BLF3zGyy.js} (87%)
create mode 100644 static/admin/assets/SettingsPage-kou4GC5e.js
delete mode 100644 static/admin/assets/SettingsPage-nj1AULlf.js
rename static/admin/assets/{SystemPage-i6_qDLAX.js => SystemPage-DZnURk26.js} (80%)
rename static/admin/assets/{UsersPage-BbP8F1bH.js => UsersPage-7SCtUJvO.js} (83%)
rename static/admin/assets/{email-CvVAilYN.js => email-DXFDTcFR.js} (86%)
rename static/admin/assets/{index-BTIe-LzI.js => index-CpTjoI5H.js} (99%)
rename static/admin/assets/{system-VhyLCmjS.js => system-DoHHS63d.js} (68%)
rename static/admin/assets/{tasks-D7g7NShX.js => tasks-DZN3Iufx.js} (87%)
rename static/admin/assets/{users-BEod_y0N.js => users-COdHnepZ.js} (90%)
diff --git a/admin-frontend/src/pages/ReportPage.vue b/admin-frontend/src/pages/ReportPage.vue
index 8ab8e73..431528f 100644
--- a/admin-frontend/src/pages/ReportPage.vue
+++ b/admin-frontend/src/pages/ReportPage.vue
@@ -63,6 +63,10 @@ function parsePercent(value) {
return n
}
+function percentText(value) {
+ return `${Math.round(parsePercent(value))}%`
+}
+
function sourceLabel(source) {
const raw = String(source ?? '').trim()
if (!raw) return '手动'
@@ -227,6 +231,119 @@ const runningCountsLabel = computed(() => {
return `运行中 ${runningCount} / 排队 ${queuingCount} / 并发上限 ${maxGlobal || maxConcurrentGlobal.value || '-'}`
})
+const taskModuleItems = computed(() => [
+ { label: '今日总任务', value: normalizeCount(taskToday.value.total_tasks) },
+ { label: '今日成功', value: normalizeCount(taskToday.value.success_tasks) },
+ { label: '今日失败', value: normalizeCount(taskToday.value.failed_tasks) },
+ { label: '今日成功率', value: `${taskTodaySuccessRate.value}%` },
+ { label: '累计任务', value: normalizeCount(taskTotal.value.total_tasks) },
+ { label: '累计成功', value: normalizeCount(taskTotal.value.success_tasks) },
+])
+
+const queueModuleItems = computed(() => [
+ { label: '运行中', value: runningCount.value },
+ { label: '排队中', value: queuingCount.value },
+ { label: '并发上限', value: normalizeCount(runningTasks.value?.max_concurrent) || maxConcurrentGlobal.value || '-' },
+ { label: '排队首条来源', value: sourceLabel(queuingTaskList.value[0]?.source) },
+ { label: '排队首条状态', value: queuingTaskList.value[0]?.detail_status || queuingTaskList.value[0]?.status || '-' },
+ { label: '最长等待', value: queuingTaskList.value[0]?.elapsed_display || '-' },
+])
+
+const emailModuleItems = computed(() => [
+ { label: '总发送', value: normalizeCount(emailStats.value?.total_sent) },
+ { label: '成功', value: normalizeCount(emailStats.value?.total_success) },
+ { label: '失败', value: normalizeCount(emailStats.value?.total_failed) },
+ { label: '成功率', value: `${emailSuccessRate.value}%` },
+ { label: '注册验证', value: normalizeCount(emailStats.value?.register_sent) },
+ { label: '重置密码', value: normalizeCount(emailStats.value?.reset_sent) },
+])
+
+const feedbackModuleItems = computed(() => [
+ { label: '总反馈', value: normalizeCount(feedbackStats.value?.total) },
+ { label: '待处理', value: normalizeCount(feedbackStats.value?.pending) },
+ { label: '已回复', value: normalizeCount(feedbackStats.value?.replied) },
+])
+
+const resourceModuleItems = computed(() => [
+ { label: 'CPU', value: percentText(serverInfo.value?.cpu_percent) },
+ { label: '内存', value: percentText(serverInfo.value?.memory_percent) },
+ { label: '磁盘', value: percentText(serverInfo.value?.disk_percent) },
+ { label: '容器状态', value: dockerStats.value?.status || '-' },
+ { label: '容器名', value: dockerStats.value?.container_name || '-' },
+ { label: '容器运行', value: dockerStats.value?.uptime || '-' },
+])
+
+const workerModuleItems = computed(() => [
+ { label: '总 Worker', value: browserPoolTotalWorkers.value },
+ { label: '活跃 Worker', value: browserPoolActiveWorkers.value },
+ { label: '忙碌 Worker', value: browserPoolBusyWorkers.value },
+ { label: '空闲 Worker', value: browserPoolIdleWorkers.value },
+ { label: '任务队列', value: browserPoolQueueSize.value },
+])
+
+const configModuleItems = computed(() => [
+ { label: '定时任务', value: scheduleEnabled.value ? '启用' : '关闭' },
+ { label: '执行时间', value: scheduleTime.value || '-' },
+ { label: '浏览类型', value: scheduleBrowseType.value || '-' },
+ { label: '代理', value: proxyEnabled.value ? '启用' : '关闭' },
+ { label: '代理有效期', value: proxyExpireMinutes.value ? `${proxyExpireMinutes.value} 分钟` : '-' },
+ { label: '全局并发', value: maxConcurrentGlobal.value || '-' },
+ { label: '单账号并发', value: maxConcurrentPerAccount.value || '-' },
+ { label: '截图并发', value: maxScreenshotConcurrent.value || '-' },
+])
+
+const mobileModules = computed(() => [
+ {
+ key: 'task',
+ title: '任务概览',
+ desc: normalizeCount(taskToday.value.total_tasks) > 0 ? `今日成功率 ${taskTodaySuccessRate.value}%` : '今日暂无任务',
+ tone: 'purple',
+ items: taskModuleItems.value,
+ },
+ {
+ key: 'queue',
+ title: '队列监控',
+ desc: runningCountsLabel.value,
+ tone: 'blue',
+ items: queueModuleItems.value,
+ },
+ {
+ key: 'email',
+ title: '邮件报表',
+ desc: `成功率 ${emailSuccessRate.value}%`,
+ tone: 'cyan',
+ items: emailModuleItems.value,
+ },
+ {
+ key: 'feedback',
+ title: '反馈概览',
+ desc: `待处理 ${normalizeCount(feedbackStats.value?.pending)} 条`,
+ tone: 'orange',
+ items: feedbackModuleItems.value,
+ },
+ {
+ key: 'resource',
+ title: '系统资源',
+ desc: serverInfo.value?.uptime ? `运行 ${serverInfo.value.uptime}` : '运行状态获取中',
+ tone: 'green',
+ items: resourceModuleItems.value,
+ },
+ {
+ key: 'worker',
+ title: '截图线程池',
+ desc: `活跃 ${browserPoolActiveWorkers.value} · 忙碌 ${browserPoolBusyWorkers.value}`,
+ tone: 'cyan',
+ items: workerModuleItems.value,
+ },
+ {
+ key: 'config',
+ title: '配置概览',
+ desc: '并发 / 代理 / 定时任务',
+ tone: 'red',
+ items: configModuleItems.value,
+ },
+])
+
async function refreshAll(options = {}) {
const showLoading = options.showLoading ?? true
if (refreshing.value) return
@@ -307,6 +424,29 @@ onUnmounted(() => {
(_(),F(He,null,[J(wb,{move:l.value,ratio:c.value,size:r.value,always:v.always},null,8,["move","ratio","size","always"]),J(wb,{move:a.value,ratio:u.value,size:i.value,vertical:"",always:v.always},null,8,["move","ratio","size","always"])],64))}});var z6=Te(H6,[["__file","bar.vue"]]);const K6=Se({distance:{type:Number,default:0},height:{type:[String,Number],default:""},maxHeight:{type:[String,Number],default:""},native:Boolean,wrapStyle:{type:Q([String,Object,Array]),default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array,Object],default:""},noresize:Boolean,tag:{type:String,default:"div"},always:Boolean,minSize:{type:Number,default:20},tabindex:{type:[String,Number],default:void 0},id:String,role:String,...Pn(["ariaLabel","ariaOrientation"])}),YS={"end-reached":e=>["left","right","top","bottom"].includes(e),scroll:({scrollTop:e,scrollLeft:t})=>[e,t].every(je)},W6="ElScrollbar",j6=q({name:W6}),U6=q({...j6,props:K6,emits:YS,setup(e,{expose:t,emit:n}){const o=e,l=be("scrollbar");let a,r,i,u=0,c=0,d="";const f={bottom:!1,top:!1,right:!1,left:!1},v=L(),p=L(),m=L(),h=L(),g=S(()=>{const I={};return o.height&&(I.height=Qt(o.height)),o.maxHeight&&(I.maxHeight=Qt(o.maxHeight)),[o.wrapStyle,I]}),b=S(()=>[o.wrapClass,l.e("wrap"),{[l.em("wrap","hidden-default")]:!o.native}]),C=S(()=>[l.e("view"),o.viewClass]),y=I=>{var P;return(P=f[I])!=null?P:!1},w={top:"bottom",bottom:"top",left:"right",right:"left"},E=I=>{const P=w[d];if(!P)return;const K=I[d],B=I[P];K&&!f[d]&&(f[d]=!0),!B&&f[P]&&(f[P]=!1)},k=()=>{var I;if(p.value){(I=h.value)==null||I.handleScroll(p.value);const P=u,K=c;u=p.value.scrollTop,c=p.value.scrollLeft;const B={bottom:u+p.value.clientHeight>=p.value.scrollHeight-o.distance,top:u<=o.distance&&P!==0,right:c+p.value.clientWidth>=p.value.scrollWidth-o.distance&&K!==c,left:c<=o.distance&&K!==0};if(n("scroll",{scrollTop:u,scrollLeft:c}),P!==u&&(d=u>P?"bottom":"top"),K!==c&&(d=c>K?"right":"left"),o.distance>0){if(y(d))return;E(B)}B[d]&&n("end-reached",d)}};function T(I,P){et(I)?p.value.scrollTo(I):je(I)&&je(P)&&p.value.scrollTo(I,P)}const x=I=>{je(I)&&(p.value.scrollTop=I)},N=I=>{je(I)&&(p.value.scrollLeft=I)},O=()=>{var I;(I=h.value)==null||I.update(),f[d]=!1};return pe(()=>o.noresize,I=>{I?(a?.(),r?.(),i?.()):({stop:a}=qt(m,O),{stop:r}=qt(p,O),i=At("resize",O))},{immediate:!0}),pe(()=>[o.maxHeight,o.height],()=>{o.native||Le(()=>{var I;O(),p.value&&((I=h.value)==null||I.handleScroll(p.value))})}),ut(zh,_t({scrollbarElement:v,wrapElement:p})),Pd(()=>{p.value&&(p.value.scrollTop=u,p.value.scrollLeft=c)}),rt(()=>{o.native||Le(()=>{O()})}),el(()=>O()),t({wrapRef:p,update:O,scrollTo:T,setScrollTop:x,setScrollLeft:N,handleScroll:k}),(I,P)=>(_(),F("div",{ref_key:"scrollbarRef",ref:v,class:R(s(l).b())},[z("div",{ref_key:"wrapRef",ref:p,class:R(s(b)),style:We(s(g)),tabindex:I.tabindex,onScroll:k},[(_(),ie(at(I.tag),{id:I.id,ref_key:"resizeRef",ref:m,class:R(s(C)),style:We(I.viewStyle),role:I.role,"aria-label":I.ariaLabel,"aria-orientation":I.ariaOrientation},{default:ee(()=>[oe(I.$slots,"default")]),_:3},8,["id","class","style","role","aria-label","aria-orientation"]))],46,["tabindex"]),I.native?re("v-if",!0):(_(),ie(z6,{key:0,ref_key:"barRef",ref:h,always:I.always,"min-size":I.minSize},null,8,["always","min-size"]))],2))}});var q6=Te(U6,[["__file","scrollbar.vue"]]);const Go=Ze(q6),Kh=Symbol("popper"),GS=Symbol("popperContent"),XS=["dialog","grid","group","listbox","menu","navigation","tooltip","tree"],JS=Se({role:{type:String,values:XS,default:"tooltip"}}),Y6=q({name:"ElPopper",inheritAttrs:!1}),G6=q({...Y6,props:JS,setup(e,{expose:t}){const n=e,o=L(),l=L(),a=L(),r=L(),i=S(()=>n.role),u={triggerRef:o,popperInstanceRef:l,contentRef:a,referenceRef:r,role:i};return t(u),ut(Kh,u),(c,d)=>oe(c.$slots,"default")}});var X6=Te(G6,[["__file","popper.vue"]]);const J6=q({name:"ElPopperArrow",inheritAttrs:!1}),Z6=q({...J6,setup(e,{expose:t}){const n=be("popper"),{arrowRef:o,arrowStyle:l}=Pe(GS,void 0);return Rt(()=>{o.value=void 0}),t({arrowRef:o}),(a,r)=>(_(),F("span",{ref_key:"arrowRef",ref:o,class:R(s(n).e("arrow")),style:We(s(l)),"data-popper-arrow":""},null,6))}});var Q6=Te(Z6,[["__file","arrow.vue"]]);const ZS=Se({virtualRef:{type:Q(Object)},virtualTriggering:Boolean,onMouseenter:{type:Q(Function)},onMouseleave:{type:Q(Function)},onClick:{type:Q(Function)},onKeydown:{type:Q(Function)},onFocus:{type:Q(Function)},onBlur:{type:Q(Function)},onContextmenu:{type:Q(Function)},id:String,open:Boolean}),QS=Symbol("elForwardRef"),e8=e=>{ut(QS,{setForwardRef:n=>{e.value=n}})},t8=e=>({mounted(t){e(t)},updated(t){e(t)},unmounted(){e(null)}}),n8="ElOnlyChild",e2=q({name:n8,setup(e,{slots:t,attrs:n}){var o;const l=Pe(QS),a=t8((o=l?.setForwardRef)!=null?o:Nt);return()=>{var r;const i=(r=t.default)==null?void 0:r.call(t,n);if(!i)return null;const[u,c]=t2(i);return u?nt(Wl(u,n),[[a]]):null}}});function t2(e){if(!e)return[null,0];const t=e,n=t.filter(o=>o.type!==on).length;for(const o of t){if(et(o))switch(o.type){case on:continue;case Ts:case"svg":return[Cb(o),n];case He:return t2(o.children);default:return[o,n]}return[Cb(o),n]}return[null,0]}function Cb(e){const t=be("only-child");return J("span",{class:t.e("content")},[e])}const o8=q({name:"ElPopperTrigger",inheritAttrs:!1}),l8=q({...o8,props:ZS,setup(e,{expose:t}){const n=e,{role:o,triggerRef:l}=Pe(Kh,void 0);e8(l);const a=S(()=>i.value?n.id:void 0),r=S(()=>{if(o&&o.value==="tooltip")return n.open&&n.id?n.id:void 0}),i=S(()=>{if(o&&o.value!=="tooltip")return o.value}),u=S(()=>i.value?`${n.open}`:void 0);let c;const d=["onMouseenter","onMouseleave","onClick","onKeydown","onFocus","onBlur","onContextmenu"];return rt(()=>{pe(()=>n.virtualRef,f=>{f&&(l.value=hn(f))},{immediate:!0}),pe(l,(f,v)=>{c?.(),c=void 0,yo(f)&&(d.forEach(p=>{var m;const h=n[p];h&&(f.addEventListener(p.slice(2).toLowerCase(),h,["onFocus","onBlur"].includes(p)),(m=v?.removeEventListener)==null||m.call(v,p.slice(2).toLowerCase(),h,["onFocus","onBlur"].includes(p)))}),Bi(f)&&(c=pe([a,r,i,u],p=>{["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach((m,h)=>{rn(p[h])?f.removeAttribute(m):f.setAttribute(m,p[h])})},{immediate:!0}))),yo(v)&&Bi(v)&&["aria-controls","aria-describedby","aria-haspopup","aria-expanded"].forEach(p=>v.removeAttribute(p))},{immediate:!0})}),Rt(()=>{if(c?.(),c=void 0,l.value&&yo(l.value)){const f=l.value;d.forEach(v=>{const p=n[v];p&&f.removeEventListener(v.slice(2).toLowerCase(),p,["onFocus","onBlur"].includes(v))}),l.value=void 0}}),t({triggerRef:l}),(f,v)=>f.virtualTriggering?re("v-if",!0):(_(),ie(s(e2),ot({key:0},f.$attrs,{"aria-controls":s(a),"aria-describedby":s(r),"aria-expanded":s(u),"aria-haspopup":s(i)}),{default:ee(()=>[oe(f.$slots,"default")]),_:3},16,["aria-controls","aria-describedby","aria-expanded","aria-haspopup"]))}});var a8=Te(l8,[["__file","trigger.vue"]]);const jf="focus-trap.focus-after-trapped",Uf="focus-trap.focus-after-released",r8="focus-trap.focusout-prevented",Sb={cancelable:!0,bubbles:!1},s8={cancelable:!0,bubbles:!1},Eb="focusAfterTrapped",kb="focusAfterReleased",Wh=Symbol("elFocusTrap"),jh=L(),Qd=L(0),Uh=L(0);let ju=0;const n2=e=>{const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:o=>{const l=o.tagName==="INPUT"&&o.type==="hidden";return o.disabled||o.hidden||l?NodeFilter.FILTER_SKIP:o.tabIndex>=0||o===document.activeElement?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t},_b=(e,t)=>{for(const n of e)if(!i8(n,t))return n},i8=(e,t)=>{if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1},u8=e=>{const t=n2(e),n=_b(t,e),o=_b(t.reverse(),e);return[n,o]},c8=e=>e instanceof HTMLInputElement&&"select"in e,ua=(e,t)=>{if(e){const n=document.activeElement;mu(e,{preventScroll:!0}),Uh.value=window.performance.now(),e!==n&&c8(e)&&t&&e.select()}};function Tb(e,t){const n=[...e],o=e.indexOf(t);return o!==-1&&n.splice(o,1),n}const d8=()=>{let e=[];return{push:o=>{const l=e[0];l&&o!==l&&l.pause(),e=Tb(e,o),e.unshift(o)},remove:o=>{var l,a;e=Tb(e,o),(a=(l=e[0])==null?void 0:l.resume)==null||a.call(l)}}},f8=(e,t=!1)=>{const n=document.activeElement;for(const o of e)if(ua(o,t),document.activeElement!==n)return},Ob=d8(),p8=()=>Qd.value>Uh.value,Uu=()=>{jh.value="pointer",Qd.value=window.performance.now()},$b=()=>{jh.value="keyboard",Qd.value=window.performance.now()},v8=()=>(rt(()=>{ju===0&&(document.addEventListener("mousedown",Uu),document.addEventListener("touchstart",Uu),document.addEventListener("keydown",$b)),ju++}),Rt(()=>{ju--,ju<=0&&(document.removeEventListener("mousedown",Uu),document.removeEventListener("touchstart",Uu),document.removeEventListener("keydown",$b))}),{focusReason:jh,lastUserFocusTimestamp:Qd,lastAutomatedFocusTimestamp:Uh}),qu=e=>new CustomEvent(r8,{...s8,detail:e}),xe={tab:"Tab",enter:"Enter",space:"Space",left:"ArrowLeft",up:"ArrowUp",right:"ArrowRight",down:"ArrowDown",esc:"Escape",delete:"Delete",backspace:"Backspace",numpadEnter:"NumpadEnter",pageUp:"PageUp",pageDown:"PageDown",home:"Home",end:"End"};let Dr=[];const Rb=e=>{e.code===xe.esc&&Dr.forEach(t=>t(e))},h8=e=>{rt(()=>{Dr.length===0&&document.addEventListener("keydown",Rb),Et&&Dr.push(e)}),Rt(()=>{Dr=Dr.filter(t=>t!==e),Dr.length===0&&Et&&document.removeEventListener("keydown",Rb)})},m8=q({name:"ElFocusTrap",inheritAttrs:!1,props:{loop:Boolean,trapped:Boolean,focusTrapEl:Object,focusStartEl:{type:[Object,String],default:"first"}},emits:[Eb,kb,"focusin","focusout","focusout-prevented","release-requested"],setup(e,{emit:t}){const n=L();let o,l;const{focusReason:a}=v8();h8(m=>{e.trapped&&!r.paused&&t("release-requested",m)});const r={paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}},i=m=>{if(!e.loop&&!e.trapped||r.paused)return;const{code:h,altKey:g,ctrlKey:b,metaKey:C,currentTarget:y,shiftKey:w}=m,{loop:E}=e,k=h===xe.tab&&!g&&!b&&!C,T=document.activeElement;if(k&&T){const x=y,[N,O]=u8(x);if(N&&O){if(!w&&T===O){const P=qu({focusReason:a.value});t("focusout-prevented",P),P.defaultPrevented||(m.preventDefault(),E&&ua(N,!0))}else if(w&&[N,x].includes(T)){const P=qu({focusReason:a.value});t("focusout-prevented",P),P.defaultPrevented||(m.preventDefault(),E&&ua(O,!0))}}else if(T===x){const P=qu({focusReason:a.value});t("focusout-prevented",P),P.defaultPrevented||m.preventDefault()}}};ut(Wh,{focusTrapRef:n,onKeydown:i}),pe(()=>e.focusTrapEl,m=>{m&&(n.value=m)},{immediate:!0}),pe([n],([m],[h])=>{m&&(m.addEventListener("keydown",i),m.addEventListener("focusin",d),m.addEventListener("focusout",f)),h&&(h.removeEventListener("keydown",i),h.removeEventListener("focusin",d),h.removeEventListener("focusout",f))});const u=m=>{t(Eb,m)},c=m=>t(kb,m),d=m=>{const h=s(n);if(!h)return;const g=m.target,b=m.relatedTarget,C=g&&h.contains(g);e.trapped||b&&h.contains(b)||(o=b),C&&t("focusin",m),!r.paused&&e.trapped&&(C?l=g:ua(l,!0))},f=m=>{const h=s(n);if(!(r.paused||!h))if(e.trapped){const g=m.relatedTarget;!rn(g)&&!h.contains(g)&&setTimeout(()=>{if(!r.paused&&e.trapped){const b=qu({focusReason:a.value});t("focusout-prevented",b),b.defaultPrevented||ua(l,!0)}},0)}else{const g=m.target;g&&h.contains(g)||t("focusout",m)}};async function v(){await Le();const m=s(n);if(m){Ob.push(r);const h=m.contains(document.activeElement)?o:document.activeElement;if(o=h,!m.contains(h)){const b=new Event(jf,Sb);m.addEventListener(jf,u),m.dispatchEvent(b),b.defaultPrevented||Le(()=>{let C=e.focusStartEl;Fe(C)||(ua(C),document.activeElement!==C&&(C="first")),C==="first"&&f8(n2(m),!0),(document.activeElement===h||C==="container")&&ua(m)})}}}function p(){const m=s(n);if(m){m.removeEventListener(jf,u);const h=new CustomEvent(Uf,{...Sb,detail:{focusReason:a.value}});m.addEventListener(Uf,c),m.dispatchEvent(h),!h.defaultPrevented&&(a.value=="keyboard"||!p8()||m.contains(document.activeElement))&&ua(o??document.body),m.removeEventListener(Uf,c),Ob.remove(r),o=null,l=null}}return rt(()=>{e.trapped&&v(),pe(()=>e.trapped,m=>{m?v():p()})}),Rt(()=>{e.trapped&&p(),n.value&&(n.value.removeEventListener("keydown",i),n.value.removeEventListener("focusin",d),n.value.removeEventListener("focusout",f),n.value=void 0)}),{onKeydown:i}}});function g8(e,t,n,o,l,a){return oe(e.$slots,"default",{handleKeydown:e.onKeydown})}var Er=Te(m8,[["render",g8],["__file","focus-trap.vue"]]),so="top",Po="bottom",xo="right",io="left",qh="auto",bu=[so,Po,xo,io],ds="start",Fi="end",b8="clippingParents",o2="viewport",qs="popper",y8="reference",Nb=bu.reduce(function(e,t){return e.concat([t+"-"+ds,t+"-"+Fi])},[]),oa=[].concat(bu,[qh]).reduce(function(e,t){return e.concat([t,t+"-"+ds,t+"-"+Fi])},[]),w8="beforeRead",C8="read",S8="afterRead",E8="beforeMain",k8="main",_8="afterMain",T8="beforeWrite",O8="write",$8="afterWrite",R8=[w8,C8,S8,E8,k8,_8,T8,O8,$8];function wl(e){return e?(e.nodeName||"").toLowerCase():null}function ol(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function fs(e){var t=ol(e).Element;return e instanceof t||e instanceof Element}function Ro(e){var t=ol(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Yh(e){if(typeof ShadowRoot>"u")return!1;var t=ol(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function N8(e){var t=e.state;Object.keys(t.elements).forEach(function(n){var o=t.styles[n]||{},l=t.attributes[n]||{},a=t.elements[n];!Ro(a)||!wl(a)||(Object.assign(a.style,o),Object.keys(l).forEach(function(r){var i=l[r];i===!1?a.removeAttribute(r):a.setAttribute(r,i===!0?"":i)}))})}function I8(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(o){var l=t.elements[o],a=t.attributes[o]||{},r=Object.keys(t.styles.hasOwnProperty(o)?t.styles[o]:n[o]),i=r.reduce(function(u,c){return u[c]="",u},{});!Ro(l)||!wl(l)||(Object.assign(l.style,i),Object.keys(a).forEach(function(u){l.removeAttribute(u)}))})}}var l2={name:"applyStyles",enabled:!0,phase:"write",fn:N8,effect:I8,requires:["computeStyles"]};function hl(e){return e.split("-")[0]}var tr=Math.max,ed=Math.min,ps=Math.round;function vs(e,t){t===void 0&&(t=!1);var n=e.getBoundingClientRect(),o=1,l=1;if(Ro(e)&&t){var a=e.offsetHeight,r=e.offsetWidth;r>0&&(o=ps(n.width)/r||1),a>0&&(l=ps(n.height)/a||1)}return{width:n.width/o,height:n.height/l,top:n.top/l,right:n.right/o,bottom:n.bottom/l,left:n.left/o,x:n.left/o,y:n.top/l}}function Gh(e){var t=vs(e),n=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:o}}function a2(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&Yh(n)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}function Ul(e){return ol(e).getComputedStyle(e)}function P8(e){return["table","td","th"].indexOf(wl(e))>=0}function Ma(e){return((fs(e)?e.ownerDocument:e.document)||window.document).documentElement}function ef(e){return wl(e)==="html"?e:e.assignedSlot||e.parentNode||(Yh(e)?e.host:null)||Ma(e)}function Ib(e){return!Ro(e)||Ul(e).position==="fixed"?null:e.offsetParent}function x8(e){var t=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&Ro(e)){var o=Ul(e);if(o.position==="fixed")return null}var l=ef(e);for(Yh(l)&&(l=l.host);Ro(l)&&["html","body"].indexOf(wl(l))<0;){var a=Ul(l);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return l;l=l.parentNode}return null}function yu(e){for(var t=ol(e),n=Ib(e);n&&P8(n)&&Ul(n).position==="static";)n=Ib(n);return n&&(wl(n)==="html"||wl(n)==="body"&&Ul(n).position==="static")?t:n||x8(e)||t}function Xh(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function yi(e,t,n){return tr(e,ed(t,n))}function M8(e,t,n){var o=yi(e,t,n);return o>n?n:o}function r2(){return{top:0,right:0,bottom:0,left:0}}function s2(e){return Object.assign({},r2(),e)}function i2(e,t){return t.reduce(function(n,o){return n[o]=e,n},{})}var A8=function(e,t){return e=typeof e=="function"?e(Object.assign({},t.rects,{placement:t.placement})):e,s2(typeof e!="number"?e:i2(e,bu))};function L8(e){var t,n=e.state,o=e.name,l=e.options,a=n.elements.arrow,r=n.modifiersData.popperOffsets,i=hl(n.placement),u=Xh(i),c=[io,xo].indexOf(i)>=0,d=c?"height":"width";if(!(!a||!r)){var f=A8(l.padding,n),v=Gh(a),p=u==="y"?so:io,m=u==="y"?Po:xo,h=n.rects.reference[d]+n.rects.reference[u]-r[u]-n.rects.popper[d],g=r[u]-n.rects.reference[u],b=yu(a),C=b?u==="y"?b.clientHeight||0:b.clientWidth||0:0,y=h/2-g/2,w=f[p],E=C-v[d]-f[m],k=C/2-v[d]/2+y,T=yi(w,k,E),x=u;n.modifiersData[o]=(t={},t[x]=T,t.centerOffset=T-k,t)}}function D8(e){var t=e.state,n=e.options,o=n.element,l=o===void 0?"[data-popper-arrow]":o;l!=null&&(typeof l=="string"&&(l=t.elements.popper.querySelector(l),!l)||!a2(t.elements.popper,l)||(t.elements.arrow=l))}var B8={name:"arrow",enabled:!0,phase:"main",fn:L8,effect:D8,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function hs(e){return e.split("-")[1]}var F8={top:"auto",right:"auto",bottom:"auto",left:"auto"};function V8(e){var t=e.x,n=e.y,o=window,l=o.devicePixelRatio||1;return{x:ps(t*l)/l||0,y:ps(n*l)/l||0}}function Pb(e){var t,n=e.popper,o=e.popperRect,l=e.placement,a=e.variation,r=e.offsets,i=e.position,u=e.gpuAcceleration,c=e.adaptive,d=e.roundOffsets,f=e.isFixed,v=r.x,p=v===void 0?0:v,m=r.y,h=m===void 0?0:m,g=typeof d=="function"?d({x:p,y:h}):{x:p,y:h};p=g.x,h=g.y;var b=r.hasOwnProperty("x"),C=r.hasOwnProperty("y"),y=io,w=so,E=window;if(c){var k=yu(n),T="clientHeight",x="clientWidth";if(k===ol(n)&&(k=Ma(n),Ul(k).position!=="static"&&i==="absolute"&&(T="scrollHeight",x="scrollWidth")),k=k,l===so||(l===io||l===xo)&&a===Fi){w=Po;var N=f&&k===E&&E.visualViewport?E.visualViewport.height:k[T];h-=N-o.height,h*=u?1:-1}if(l===io||(l===so||l===Po)&&a===Fi){y=xo;var O=f&&k===E&&E.visualViewport?E.visualViewport.width:k[x];p-=O-o.width,p*=u?1:-1}}var I=Object.assign({position:i},c&&F8),P=d===!0?V8({x:p,y:h}):{x:p,y:h};if(p=P.x,h=P.y,u){var K;return Object.assign({},I,(K={},K[w]=C?"0":"",K[y]=b?"0":"",K.transform=(E.devicePixelRatio||1)<=1?"translate("+p+"px, "+h+"px)":"translate3d("+p+"px, "+h+"px, 0)",K))}return Object.assign({},I,(t={},t[w]=C?h+"px":"",t[y]=b?p+"px":"",t.transform="",t))}function H8(e){var t=e.state,n=e.options,o=n.gpuAcceleration,l=o===void 0?!0:o,a=n.adaptive,r=a===void 0?!0:a,i=n.roundOffsets,u=i===void 0?!0:i,c={placement:hl(t.placement),variation:hs(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:l,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,Pb(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:u})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,Pb(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var u2={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:H8,data:{}},Yu={passive:!0};function z8(e){var t=e.state,n=e.instance,o=e.options,l=o.scroll,a=l===void 0?!0:l,r=o.resize,i=r===void 0?!0:r,u=ol(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&c.forEach(function(d){d.addEventListener("scroll",n.update,Yu)}),i&&u.addEventListener("resize",n.update,Yu),function(){a&&c.forEach(function(d){d.removeEventListener("scroll",n.update,Yu)}),i&&u.removeEventListener("resize",n.update,Yu)}}var c2={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:z8,data:{}},K8={left:"right",right:"left",bottom:"top",top:"bottom"};function pc(e){return e.replace(/left|right|bottom|top/g,function(t){return K8[t]})}var W8={start:"end",end:"start"};function xb(e){return e.replace(/start|end/g,function(t){return W8[t]})}function Jh(e){var t=ol(e),n=t.pageXOffset,o=t.pageYOffset;return{scrollLeft:n,scrollTop:o}}function Zh(e){return vs(Ma(e)).left+Jh(e).scrollLeft}function j8(e){var t=ol(e),n=Ma(e),o=t.visualViewport,l=n.clientWidth,a=n.clientHeight,r=0,i=0;return o&&(l=o.width,a=o.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(r=o.offsetLeft,i=o.offsetTop)),{width:l,height:a,x:r+Zh(e),y:i}}function U8(e){var t,n=Ma(e),o=Jh(e),l=(t=e.ownerDocument)==null?void 0:t.body,a=tr(n.scrollWidth,n.clientWidth,l?l.scrollWidth:0,l?l.clientWidth:0),r=tr(n.scrollHeight,n.clientHeight,l?l.scrollHeight:0,l?l.clientHeight:0),i=-o.scrollLeft+Zh(e),u=-o.scrollTop;return Ul(l||n).direction==="rtl"&&(i+=tr(n.clientWidth,l?l.clientWidth:0)-a),{width:a,height:r,x:i,y:u}}function Qh(e){var t=Ul(e),n=t.overflow,o=t.overflowX,l=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+l+o)}function d2(e){return["html","body","#document"].indexOf(wl(e))>=0?e.ownerDocument.body:Ro(e)&&Qh(e)?e:d2(ef(e))}function wi(e,t){var n;t===void 0&&(t=[]);var o=d2(e),l=o===((n=e.ownerDocument)==null?void 0:n.body),a=ol(o),r=l?[a].concat(a.visualViewport||[],Qh(o)?o:[]):o,i=t.concat(r);return l?i:i.concat(wi(ef(r)))}function Kp(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function q8(e){var t=vs(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}function Mb(e,t){return t===o2?Kp(j8(e)):fs(t)?q8(t):Kp(U8(Ma(e)))}function Y8(e){var t=wi(ef(e)),n=["absolute","fixed"].indexOf(Ul(e).position)>=0,o=n&&Ro(e)?yu(e):e;return fs(o)?t.filter(function(l){return fs(l)&&a2(l,o)&&wl(l)!=="body"}):[]}function G8(e,t,n){var o=t==="clippingParents"?Y8(e):[].concat(t),l=[].concat(o,[n]),a=l[0],r=l.reduce(function(i,u){var c=Mb(e,u);return i.top=tr(c.top,i.top),i.right=ed(c.right,i.right),i.bottom=ed(c.bottom,i.bottom),i.left=tr(c.left,i.left),i},Mb(e,a));return r.width=r.right-r.left,r.height=r.bottom-r.top,r.x=r.left,r.y=r.top,r}function f2(e){var t=e.reference,n=e.element,o=e.placement,l=o?hl(o):null,a=o?hs(o):null,r=t.x+t.width/2-n.width/2,i=t.y+t.height/2-n.height/2,u;switch(l){case so:u={x:r,y:t.y-n.height};break;case Po:u={x:r,y:t.y+t.height};break;case xo:u={x:t.x+t.width,y:i};break;case io:u={x:t.x-n.width,y:i};break;default:u={x:t.x,y:t.y}}var c=l?Xh(l):null;if(c!=null){var d=c==="y"?"height":"width";switch(a){case ds:u[c]=u[c]-(t[d]/2-n[d]/2);break;case Fi:u[c]=u[c]+(t[d]/2-n[d]/2);break}}return u}function Vi(e,t){t===void 0&&(t={});var n=t,o=n.placement,l=o===void 0?e.placement:o,a=n.boundary,r=a===void 0?b8:a,i=n.rootBoundary,u=i===void 0?o2:i,c=n.elementContext,d=c===void 0?qs:c,f=n.altBoundary,v=f===void 0?!1:f,p=n.padding,m=p===void 0?0:p,h=s2(typeof m!="number"?m:i2(m,bu)),g=d===qs?y8:qs,b=e.rects.popper,C=e.elements[v?g:d],y=G8(fs(C)?C:C.contextElement||Ma(e.elements.popper),r,u),w=vs(e.elements.reference),E=f2({reference:w,element:b,placement:l}),k=Kp(Object.assign({},b,E)),T=d===qs?k:w,x={top:y.top-T.top+h.top,bottom:T.bottom-y.bottom+h.bottom,left:y.left-T.left+h.left,right:T.right-y.right+h.right},N=e.modifiersData.offset;if(d===qs&&N){var O=N[l];Object.keys(x).forEach(function(I){var P=[xo,Po].indexOf(I)>=0?1:-1,K=[so,Po].indexOf(I)>=0?"y":"x";x[I]+=O[K]*P})}return x}function X8(e,t){t===void 0&&(t={});var n=t,o=n.placement,l=n.boundary,a=n.rootBoundary,r=n.padding,i=n.flipVariations,u=n.allowedAutoPlacements,c=u===void 0?oa:u,d=hs(o),f=d?i?Nb:Nb.filter(function(m){return hs(m)===d}):bu,v=f.filter(function(m){return c.indexOf(m)>=0});v.length===0&&(v=f);var p=v.reduce(function(m,h){return m[h]=Vi(e,{placement:h,boundary:l,rootBoundary:a,padding:r})[hl(h)],m},{});return Object.keys(p).sort(function(m,h){return p[m]-p[h]})}function J8(e){if(hl(e)===qh)return[];var t=pc(e);return[xb(e),t,xb(t)]}function Z8(e){var t=e.state,n=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var l=n.mainAxis,a=l===void 0?!0:l,r=n.altAxis,i=r===void 0?!0:r,u=n.fallbackPlacements,c=n.padding,d=n.boundary,f=n.rootBoundary,v=n.altBoundary,p=n.flipVariations,m=p===void 0?!0:p,h=n.allowedAutoPlacements,g=t.options.placement,b=hl(g),C=b===g,y=u||(C||!m?[pc(g)]:J8(g)),w=[g].concat(y).reduce(function(te,le){return te.concat(hl(le)===qh?X8(t,{placement:le,boundary:d,rootBoundary:f,padding:c,flipVariations:m,allowedAutoPlacements:h}):le)},[]),E=t.rects.reference,k=t.rects.popper,T=new Map,x=!0,N=w[0],O=0;O[A.indicatorPosition!=="none"?(_(),F("ul",{key:0,class:R(s(B))},[(_(!0),F(He,null,mt(s(f),(D,V)=>nt((_(),F("li",{key:V,class:R([s(I).e("indicator"),s(I).em("indicator",A.direction),s(I).is("active",V===s(a))]),onMouseenter:H=>s(O)(V),onClick:qe(H=>s(g)(V),["stop"])},[z("button",{class:R(s(I).e("button")),"aria-label":s(P)("el.carousel.indicator",{index:V+1})},[s(u)?(_(),F("span",{key:0},ke(D.props.label),1)):re("v-if",!0)],10,["aria-label"])],42,["onMouseenter","onClick"])),[[kt,s(T)(V)]])),128))],2)):re("v-if",!0)]),_:1}),o.motionBlur?(_(),F("svg",{key:2,xmlns:"http://www.w3.org/2000/svg",version:"1.1",style:{display:"none"}},[z("defs",null,[z("filter",{id:"elCarouselHorizontal"},[z("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"12,0"})]),z("filter",{id:"elCarouselVertical"},[z("feGaussianBlur",{in:"SourceGraphic",stdDeviation:"0,10"})])])])):re("v-if",!0)],42,["onMouseenter","onMouseleave"]))}});var UB=Te(jB,[["__file","carousel.vue"]]);const qB=Se({name:{type:String,default:""},label:{type:[String,Number],default:""}}),YB=e=>{const t=Pe(I2),n=it(),o=L(),l=L(!1),a=L(0),r=L(1),i=L(!1),u=L(!1),c=L(!1),d=L(!1),{isCardType:f,isVertical:v,cardScale:p}=t;function m(w,E,k){const T=k-1,x=E-1,N=E+1,O=k/2;return E===0&&w===T?-1:E===T&&w===0?k:w