diff --git a/docs/changelog.md b/docs/changelog.md index 12984ac5..ac5c4df6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -6,21 +6,9 @@ 链接: [https://caiyun.139.com/m/i?135CeBMHACC6p](https://caiyun.139.com/m/i?135CeBMHACC6p) -[应用横屏布局] - -- 新增 结构大师(com.CDA.StructureMaster)的居中布局适配 - -- 新增 淘宝特价版(com.taobao.litetao)的全屏适配 - [Web UI] -- 新增 [应用横屏布局-应用规则感知-酷安],可以在高版本的Hyper OS 2使用精适配的酷安规则 - -- 新增 [应用横屏布局-应用规则感知-哔哩哔哩],可以在高版本的Hyper OS 2使用应用布局优化规则 - -- 新增 [应用横屏布局-应用不兼容感知-结构大师],修改结构大师适配规则时,会优先推荐使用对应的HD版本 - -- 扩充 [定制模式-应用白名单] 列表 +- 优化ZRAM Writeback的显示逻辑,增加回写块的显示 如果是处于测试版(Beta)的模块,可能存在较多的不稳定性以及异常BUG,如遇问题可反馈,反馈Q群:277757185 模块首页:[https://hyper-magic-window.sothx.com/](https://hyper-magic-window.sothx.com/) \ No newline at end of file diff --git a/docs/release/V8/changelog.md b/docs/release/V8/changelog.md index 12984ac5..ac5c4df6 100644 --- a/docs/release/V8/changelog.md +++ b/docs/release/V8/changelog.md @@ -6,21 +6,9 @@ 链接: [https://caiyun.139.com/m/i?135CeBMHACC6p](https://caiyun.139.com/m/i?135CeBMHACC6p) -[应用横屏布局] - -- 新增 结构大师(com.CDA.StructureMaster)的居中布局适配 - -- 新增 淘宝特价版(com.taobao.litetao)的全屏适配 - [Web UI] -- 新增 [应用横屏布局-应用规则感知-酷安],可以在高版本的Hyper OS 2使用精适配的酷安规则 - -- 新增 [应用横屏布局-应用规则感知-哔哩哔哩],可以在高版本的Hyper OS 2使用应用布局优化规则 - -- 新增 [应用横屏布局-应用不兼容感知-结构大师],修改结构大师适配规则时,会优先推荐使用对应的HD版本 - -- 扩充 [定制模式-应用白名单] 列表 +- 优化ZRAM Writeback的显示逻辑,增加回写块的显示 如果是处于测试版(Beta)的模块,可能存在较多的不稳定性以及异常BUG,如遇问题可反馈,反馈Q群:277757185 模块首页:[https://hyper-magic-window.sothx.com/](https://hyper-magic-window.sothx.com/) \ No newline at end of file diff --git a/docs/release/V9/changelog.md b/docs/release/V9/changelog.md index 12984ac5..ac5c4df6 100644 --- a/docs/release/V9/changelog.md +++ b/docs/release/V9/changelog.md @@ -6,21 +6,9 @@ 链接: [https://caiyun.139.com/m/i?135CeBMHACC6p](https://caiyun.139.com/m/i?135CeBMHACC6p) -[应用横屏布局] - -- 新增 结构大师(com.CDA.StructureMaster)的居中布局适配 - -- 新增 淘宝特价版(com.taobao.litetao)的全屏适配 - [Web UI] -- 新增 [应用横屏布局-应用规则感知-酷安],可以在高版本的Hyper OS 2使用精适配的酷安规则 - -- 新增 [应用横屏布局-应用规则感知-哔哩哔哩],可以在高版本的Hyper OS 2使用应用布局优化规则 - -- 新增 [应用横屏布局-应用不兼容感知-结构大师],修改结构大师适配规则时,会优先推荐使用对应的HD版本 - -- 扩充 [定制模式-应用白名单] 列表 +- 优化ZRAM Writeback的显示逻辑,增加回写块的显示 如果是处于测试版(Beta)的模块,可能存在较多的不稳定性以及异常BUG,如遇问题可反馈,反馈Q群:277757185 模块首页:[https://hyper-magic-window.sothx.com/](https://hyper-magic-window.sothx.com/) \ No newline at end of file diff --git a/module_src/webroot/assets/AppStore-myjg0Efs.js b/module_src/webroot/assets/AppStore-BuJDF3ID.js similarity index 99% rename from module_src/webroot/assets/AppStore-myjg0Efs.js rename to module_src/webroot/assets/AppStore-BuJDF3ID.js index 72fd53b7..6c3b6fb7 100644 --- a/module_src/webroot/assets/AppStore-myjg0Efs.js +++ b/module_src/webroot/assets/AppStore-BuJDF3ID.js @@ -1,4 +1,4 @@ -import{d as k,h as b,i as F,j as S,k as e,g as s,n as a,l as m,m as i,b as l,p as y,e as f,f as d,q as P,s as n,t as O,v as A,x as H,y as M,z as D}from"./index-DriQcjjf.js";const B="/images/apps/magisk.webp",C="/images/apps/mi_home.png",w="/images/apps/mi_note.png",I="/images/apps/mi_soundrecorder.webp",E="/images/apps/qq_music.jpg",T="/images/apps/starNote.webp",V="/images/apps/mi_music.png",W="/images/apps/samsung_browser.png",N="/images/apps/bodian.webp",Q="/images/apps/honor_music.png",X="/images/apps/pianoperfect.webp",R="/images/apps/flipaclip.png",U="/images/apps/habicat.webp",Z="/images/apps/gamecores.webp",z="/images/apps/youshi.webp",Y="/images/apps/sspai.png",$={class:"setting"},q={class:"mt-5"},L={class:"px-4 sm:px-0"},j={class:"mt-6 border-gray-100"},G={class:"divide-gray-100 mb-5"},J={class:"px-4 flex sm:grid sm:px-0"},K={key:0,class:"px-4 flex sm:grid sm:px-0 mt-5"},_={class:"px-4 flex sm:grid sm:px-0 mt-5"},c={key:1,class:"px-4 flex sm:grid sm:px-0 mt-5"},h={key:2,class:"px-4 flex sm:grid sm:px-0 mt-5"},tt={key:3,class:"px-4 flex sm:grid sm:px-0 mt-5"},st={class:"px-4 flex sm:grid sm:px-0 mt-5"},lt={class:"px-4 flex sm:grid sm:px-0 mt-5"},it={key:4,class:"px-4 flex sm:grid sm:px-0 mt-5"},nt={class:"px-4 flex sm:grid sm:px-0 mt-5"},ot={key:5,class:"px-4 flex sm:grid sm:px-0 mt-5"},pt={class:"px-4 flex sm:grid sm:px-0 mt-5"},rt={key:6,class:"px-4 flex sm:grid sm:px-0 mt-5"},ut={key:7,class:"px-4 flex sm:grid sm:px-0 mt-5"},mt={key:8,class:"px-4 flex sm:grid sm:px-0 mt-5"},et={class:"px-4 flex sm:grid sm:px-0 mt-5"},dt={key:9,class:"px-4 flex sm:grid sm:px-0 mt-5"},yt={class:"px-4 flex sm:grid sm:px-0 mt-5"},gt={class:"px-4 flex sm:grid sm:px-0 mt-5"},at={class:"px-4 flex sm:grid sm:px-0 mt-5"},ft={class:"px-4 flex sm:grid sm:px-0 mt-5"},bt=k({__name:"AppStore",setup(Ct){const u=b(),x=F(()=>({theme:u.isDarkMode?M:D})),{message:xt,modal:v,notification:vt}=S(["message","modal","notification"],{configProviderProps:x}),p=async(g,t,o)=>{v.create({title:`获取${g}`,type:"info",preset:"dialog",content:()=>i("div",null,[i("p",null,[n("确定要下载"),g,n("么?请注意核对部分应用的兼容性。"),o==="system"&&i("span",null,[n("(Tips: 系统应用无法通过小米自带的应用包管理器安装,请通过MT管理器安装!)")]),o==="revision"&&i("span",null,[n("(Tips: 修改版需搭配核心破解并通过MT管理器安装)")]),o==="magisk"&&i("span",null,[n("(Tips: Magisk模块请通过ROOT管理器进行安装)")])]),i("p",null,[n("下载地址:")]),i("p",null,[t])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${t}`)},onNegativeClick:()=>{}})};return(g,t)=>{const o=f("n-button"),r=f("n-alert");return d(),e("div",$,[s("div",q,[s("div",L,[t[21]||(t[21]=s("h3",{class:a("text-base font-semibold leading-7")},[s("span",{class:"animated-bg bg-clip-text font-semibold text-transparent",style:{"background-image":`linear-gradient(\r +import{d as k,h as b,i as F,j as S,k as e,g as s,n as a,l as m,m as i,b as l,p as y,e as f,f as d,q as P,s as n,t as O,v as A,x as H,y as M,z as D}from"./index-DylCICe-.js";const B="/images/apps/magisk.webp",C="/images/apps/mi_home.png",w="/images/apps/mi_note.png",I="/images/apps/mi_soundrecorder.webp",E="/images/apps/qq_music.jpg",T="/images/apps/starNote.webp",V="/images/apps/mi_music.png",W="/images/apps/samsung_browser.png",N="/images/apps/bodian.webp",Q="/images/apps/honor_music.png",X="/images/apps/pianoperfect.webp",R="/images/apps/flipaclip.png",U="/images/apps/habicat.webp",Z="/images/apps/gamecores.webp",z="/images/apps/youshi.webp",Y="/images/apps/sspai.png",$={class:"setting"},q={class:"mt-5"},L={class:"px-4 sm:px-0"},j={class:"mt-6 border-gray-100"},G={class:"divide-gray-100 mb-5"},J={class:"px-4 flex sm:grid sm:px-0"},K={key:0,class:"px-4 flex sm:grid sm:px-0 mt-5"},_={class:"px-4 flex sm:grid sm:px-0 mt-5"},c={key:1,class:"px-4 flex sm:grid sm:px-0 mt-5"},h={key:2,class:"px-4 flex sm:grid sm:px-0 mt-5"},tt={key:3,class:"px-4 flex sm:grid sm:px-0 mt-5"},st={class:"px-4 flex sm:grid sm:px-0 mt-5"},lt={class:"px-4 flex sm:grid sm:px-0 mt-5"},it={key:4,class:"px-4 flex sm:grid sm:px-0 mt-5"},nt={class:"px-4 flex sm:grid sm:px-0 mt-5"},ot={key:5,class:"px-4 flex sm:grid sm:px-0 mt-5"},pt={class:"px-4 flex sm:grid sm:px-0 mt-5"},rt={key:6,class:"px-4 flex sm:grid sm:px-0 mt-5"},ut={key:7,class:"px-4 flex sm:grid sm:px-0 mt-5"},mt={key:8,class:"px-4 flex sm:grid sm:px-0 mt-5"},et={class:"px-4 flex sm:grid sm:px-0 mt-5"},dt={key:9,class:"px-4 flex sm:grid sm:px-0 mt-5"},yt={class:"px-4 flex sm:grid sm:px-0 mt-5"},gt={class:"px-4 flex sm:grid sm:px-0 mt-5"},at={class:"px-4 flex sm:grid sm:px-0 mt-5"},ft={class:"px-4 flex sm:grid sm:px-0 mt-5"},bt=k({__name:"AppStore",setup(Ct){const u=b(),x=F(()=>({theme:u.isDarkMode?M:D})),{message:xt,modal:v,notification:vt}=S(["message","modal","notification"],{configProviderProps:x}),p=async(g,t,o)=>{v.create({title:`获取${g}`,type:"info",preset:"dialog",content:()=>i("div",null,[i("p",null,[n("确定要下载"),g,n("么?请注意核对部分应用的兼容性。"),o==="system"&&i("span",null,[n("(Tips: 系统应用无法通过小米自带的应用包管理器安装,请通过MT管理器安装!)")]),o==="revision"&&i("span",null,[n("(Tips: 修改版需搭配核心破解并通过MT管理器安装)")]),o==="magisk"&&i("span",null,[n("(Tips: Magisk模块请通过ROOT管理器进行安装)")])]),i("p",null,[n("下载地址:")]),i("p",null,[t])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${t}`)},onNegativeClick:()=>{}})};return(g,t)=>{const o=f("n-button"),r=f("n-alert");return d(),e("div",$,[s("div",q,[s("div",L,[t[21]||(t[21]=s("h3",{class:a("text-base font-semibold leading-7")},[s("span",{class:"animated-bg bg-clip-text font-semibold text-transparent",style:{"background-image":`linear-gradient(\r 101.22deg,\r rgb(255, 182, 133) -18.32%,\r rgb(255, 111, 29) 7.01%,\r diff --git a/module_src/webroot/assets/DotBlackListView-A_lq1lIC.js b/module_src/webroot/assets/DotBlackListView-DP7Lvogy.js similarity index 99% rename from module_src/webroot/assets/DotBlackListView-A_lq1lIC.js rename to module_src/webroot/assets/DotBlackListView-DP7Lvogy.js index 646f619b..db80d362 100644 --- a/module_src/webroot/assets/DotBlackListView-A_lq1lIC.js +++ b/module_src/webroot/assets/DotBlackListView-DP7Lvogy.js @@ -1,4 +1,4 @@ -import{f as S,k as V,g as f,d as lu,L as nu,r as k,h as ou,M as su,A as ru,i as iu,j as Fu,e as E,N as Eu,O as pu,P as Cu,m as u,b as o,s as e,ai as Du,l as a,R as Bu,y as cu,z as du,S as gu,aj as mu,W as fu,n as G,X as ku,u as Au,p as vu,Y as A,Z as m,$ as yu,a0 as bu,ak as wu,al as xu,am as uu,c as eu,an as Lu,ao as Mu,Q as Tu,a5 as _u,a6 as Ru,a7 as hu,q as $u,a8 as tu,a9 as Iu,aa as Su,ab as y,ap as H,aq as z,ar as Nu,as as J,at as Pu,au as Qu,av as au,aw as I,ax as Uu,ay as Hu,az as zu,C as Vu}from"./index-DriQcjjf.js";function Wu(W,N){return S(),V("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 8.25V18a2.25 2.25 0 0 0 2.25 2.25h13.5A2.25 2.25 0 0 0 21 18V8.25m-18 0V6a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6ZM7.5 6h.008v.008H7.5V6Zm2.25 0h.008v.008H9.75V6Z"})])}const Ou=lu({__name:"DotBlackListAppDrawer",props:{type:{},title:{}},emits:["submit"],setup(W,{expose:N,emit:X}){const n=nu();k(null),k(null);const T=W,w=k(!1),_=ou();su(),ru();const Y=iu(()=>({theme:_.isDarkMode?cu:du})),{message:s,modal:P}=Fu(["message","modal"],{configProviderProps:Y});let l,C;const R=k({openDrawer:L=>new Promise((F,x)=>{if(T.type==="update"&&!L){x(new Error("更新模式下必须传入初始化参数")),s.error("初始化参数不能为空");return}l=F,C=x,v.value="",w.value=!0}),closeDrawer:()=>{w.value=!1,C("Drawer closed without submission")}}),v=k(""),h=k(""),Q=async()=>{if(!v.value){P.create({title:"应用包名不能为空",type:"error",preset:"dialog",content:()=>u("p",null,[e("噫?应用包名不能为空(敲")])});return}if(n.allPackageName.has(v.value)){P.create({title:"应用包名已存在",type:"error",preset:"dialog",content:()=>u("p",null,[e("噫?这个应用包名已经存在列表中了(敲")])});return}p.value=!0;const L=()=>{p.value=!1,w.value=!1},F=()=>{p.value=!1},x={name:v.value,loadingCallback:F,closeCallback:L};P.create({title:"确认隐藏窗口控制器吗?",type:"warning",preset:"dialog",content:()=>u("p",null,[e("窗口控制器的隐藏受小米云控规则下发影响,如果隐藏窗口控制器失效,请重新操作")," ",u("span",{class:`font-bold ${_.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("热重载应用数据")])," ",e(",如后续需要恢复")," ",u("span",{class:`font-bold ${_.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("窗口控制器")])," ",e("的显示,则需要先清除自定义规则,确定要继续吗?")]),positiveText:"确定隐藏",negativeText:"我再想想",onPositiveClick:async()=>{l(x)},onNegativeClick(){F()},onMaskClick(){F()},onClose(){F()}})},p=k(!1);return N({openDrawer:R.value.openDrawer}),(L,F)=>{const x=E("n-input-group-label"),O=E("n-input"),K=E("n-input-group"),j=E("n-alert"),Z=E("n-button"),q=E("n-drawer-content"),$=E("n-drawer");return S(),V(Bu,null,[Eu(L.$slots,"default",pu(Cu({openDrawer:R.value.openDrawer}))),u($,{show:w.value,"onUpdate:show":F[3]||(F[3]=b=>w.value=b),width:a(_).windowWidth>=640?"450px":"100%",placement:"right"},{default:o(()=>[u(q,{"body-content-class":"auto-ui-drawer-content","scrollbar-props":{trigger:"none"},title:T.title,closable:""},{footer:o(()=>[u(Z,{type:"info",loading:p.value,"onUpdate:loading":F[1]||(F[1]=b=>p.value=b),onClick:F[2]||(F[2]=()=>Q())},{default:o(()=>F[6]||(F[6]=[e(" 提交 ")])),_:1},8,["loading"])]),default:o(()=>[u(K,null,{default:o(()=>[u(x,{size:"large"},{default:o(()=>F[4]||(F[4]=[e("应用包名")])),_:1}),u(O,{size:"large",status:h.value,value:v.value,"onUpdate:value":F[0]||(F[0]=b=>v.value=b),"allow-input":b=>Du(b),readonly:T.type==="update",placeholder:"请输入应用包名"},null,8,["status","value","allow-input","readonly"])]),_:1}),u(j,{"show-icon":!1,bordered:!1,title:"隐藏窗口控制器",type:"info",class:"mt-5"},{default:o(()=>F[5]||(F[5]=[e(" 添加后,应用上方的窗口控制器将被隐藏 ")])),_:1})]),_:1},8,["title"])]),_:1},8,["show","width"])],64)}}}),Ku={class:"autoui-view mb-10"},ju={class:"mt-3"},Zu={class:"mb-3 px-4 sm:px-0"},qu={key:0,class:"mb-3 flex flex-wrap"},Ju={class:"flex flex-wrap"},Xu={class:"flex flex-wrap"},Gu=lu({__name:"DotBlackListView",setup(W){const N=k(null),X=b(),n=ou(),T=su(),w=gu(),_=iu(()=>({theme:n.isDarkMode?cu:du})),{message:Y,modal:s,notification:P}=Fu(["message","modal","notification"],{configProviderProps:_}),l=nu(),C=k(!1),R=k(!1);mu();const v=k(null);ku(),ru(),Au();const h=k("");function Q(r){return()=>J(m,null,{default:()=>J(r)})}const p=async()=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}await n.getAndroidApplicationPackageNameList(),await l.initDefault()},L=async()=>{const[r,t]=await y(w.getList());r&&s.create({title:"获取失败",type:"warning",preset:"dialog",content:()=>u("p",null,[e("您的系统环境暂不支持该功能,获取失败~")]),negativeText:"确定"}),t&&s.create({title:"获取成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶OwO,已重新获取当前已安装的应用名称~")]),negativeText:"确定"})},F=()=>{l.filterInstalledApps=!l.filterInstalledApps},x=async()=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}R.value=!0,await p();const r=l.mergeDotBlackList.map(d=>d.name),[t,i]=await y(H({dotBlackList:r,sourceDotBlackList:l.sourceDotBlackList,customDotBlackList:l.customDotBlackList}));t&&(s.create({title:"热重载应用数据失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("热重载应用数据失败了QwQ,详情请查看错误日志~")]),negativeText:"确定"}),R.value=!1),i&&(s.create({title:"热重载应用数据成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶w,已经重新为你载入包括自定义规则在内的应用数据~实际生效还需要重启")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("系统界面")])," ",e("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){z().then(async d=>{await p(),s.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("已经成功为你重启系统界面的作用域,请查看是否生效,如不生效请手动重启平板再查看效果~")])})}).catch(d=>{s.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}),R.value=!1)},O=async()=>{const[r,t]=await y(new Promise((i,d)=>{s.create({title:"想重启设备吗?",type:"info",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("是否立即重启设备,以使规则生效?")])]),positiveText:"确认重启",negativeText:"取消",onPositiveClick:()=>{i("positiveClick")},onNegativeClick:()=>{d("negativeClick")}})}));if(t){const[i]=await y(Nu());if(i){s.create({title:"操作失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("无法重启设备,详情请查看日志记录~")]),negativeText:"确定"});return}}},K=async()=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}h.value="";const[,r]=await y(new Promise((t,i)=>{s.create({title:"请粘贴分享口令",preset:"dialog",style:"min-width:500px; width:50%;",content:()=>J(tu,{type:"textarea",value:h.value,"onUpdate:value":d=>{h.value=d},autosize:{minRows:8,maxRows:8},placeholder:"在此处粘贴分享规则口令"}),positiveText:"确定提交",negativeText:"取消导入",onPositiveClick(){t("positiveClick")}})}));if(r){C.value=!0;const t=h.value,i=Pu(t);if(!(i!=null&&i.length)){s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("导入分享规则失败了QwQ,解析")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("自定义规则")])," ",e("口令发生错误,无法正常解析。")]),negativeText:"确定"}),C.value=!1;return}try{const d=Qu(i),D=au.inflate(d,{to:"string"}),c=JSON.parse(D);if(c.type!=="dot_black_list"){s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("导入分享规则失败了QwQ,该")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("自定义规则")])," ",e("不适用于窗口控制器。")]),negativeText:"确定"}),C.value=!1;return}if(c.device==="pad"&&n.deviceCharacteristics!=="tablet"||c.device==="fold"&&n.deviceCharacteristics==="tablet"){s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("导入分享规则失败了QwQ,平板和折叠屏的适配规则不能混用哦~")]),negativeText:"确定"}),C.value=!1;return}if(l.allPackageName.has(c.name)){s.create({title:"应用包名已存在",type:"error",preset:"dialog",content:()=>u("p",null,[e("这个应用包名已经存在列表中了,导入分享规则失败了!(敲")])}),C.value=!1;return}l.customDotBlackList.push(c.name);const B=l.mergeDotBlackList.map(M=>M.name),[U,g]=await y(H({dotBlackList:B,sourceDotBlackList:l.sourceDotBlackList,customDotBlackList:l.customDotBlackList}));U?(s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,导入失败了QwQ,详细错误请查看错误日志~")])}),C.value=!1):(await p(),T.updateMergeRuleList(),C.value=!1,s.create({title:"导入分享规则成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶w,")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(c.name,n.installedAppNameList[c.name]||T.applicationName[c.name])])," ",e("的应用配置成功了OwO~实际生效还需要重启")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("系统界面")])," ",e("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){z().then(async M=>{await p(),s.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("已经成功为你重启系统界面的作用域,请查看是否生效,如不生效请手动重启平板再查看效果~")])})}).catch(M=>{s.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}))}catch(d){console.log(d,"error"),s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("解析分享规则失败了QwQ,请检查导入口令是否有误")]),negativeText:"确定"}),C.value=!1}}},j=async(r,t,i,d)=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}if(r==="cleanCustomRule"){const D=s.create({title:"想清除自定义规则吗?",type:"warning",preset:"dialog",content:()=>u("p",null,[e("清除自定义规则后,将恢复")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(i.name,i.applicationName)])," ",e("的窗口控制器显示效果。确定要继续吗?")]),positiveText:"确定清除",negativeText:"我再想想",onPositiveClick:async()=>{D.loading=!0,l.customDotBlackList=l.customDotBlackList.filter(g=>g!==i.name),l.sourceDotBlackList=l.sourceDotBlackList.map(g=>(g.dataList=g.dataList.filter(M=>M!==i.name),g));const c=l.mergeDotBlackList.map(g=>g.name),[B,U]=await y(H({dotBlackList:c,sourceDotBlackList:l.sourceDotBlackList,customDotBlackList:l.customDotBlackList}));B?(s.create({title:"清除自定义规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,清除失败了QwQ,详细错误请查看错误日志~")])}),D.loading=!1):(D.loading=!1,s.create({title:"清除自定义规则成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶w,清除自定义规则成功了OwO~实际生效还需要重启")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("系统界面")])," ",e("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){z().then(async g=>{await p(),s.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("已经成功为你重启系统界面的作用域,请查看是否生效,如不生效请手动重启平板再查看效果~")])})}).catch(g=>{s.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}),D.loading=!1,await p())}})}if(r==="shareCustomRule"){const D={name:i.name,cmpt:1,rules:{name:i.name},type:"dot_black_list",device:n.deviceCharacteristics==="tablet"?"pad":"fold"},c=JSON.stringify(D),B=au.deflate(c,{level:9,memLevel:9,windowBits:15}),U=new Uint8Array(B),g=zu(U),[M]=await y(navigator.clipboard.writeText(`我分享了一个[窗口控制器]的自定义规则,可以前往[完美横屏应用计划 For Web UI]导入: +import{f as S,k as V,g as f,d as lu,L as nu,r as k,h as ou,M as su,A as ru,i as iu,j as Fu,e as E,N as Eu,O as pu,P as Cu,m as u,b as o,s as e,ai as Du,l as a,R as Bu,y as cu,z as du,S as gu,aj as mu,W as fu,n as G,X as ku,u as Au,p as vu,Y as A,Z as m,$ as yu,a0 as bu,ak as wu,al as xu,am as uu,c as eu,an as Lu,ao as Mu,Q as Tu,a5 as _u,a6 as Ru,a7 as hu,q as $u,a8 as tu,a9 as Iu,aa as Su,ab as y,ap as H,aq as z,ar as Nu,as as J,at as Pu,au as Qu,av as au,aw as I,ax as Uu,ay as Hu,az as zu,C as Vu}from"./index-DylCICe-.js";function Wu(W,N){return S(),V("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[f("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3 8.25V18a2.25 2.25 0 0 0 2.25 2.25h13.5A2.25 2.25 0 0 0 21 18V8.25m-18 0V6a2.25 2.25 0 0 1 2.25-2.25h13.5A2.25 2.25 0 0 1 21 6v2.25m-18 0h18M5.25 6h.008v.008H5.25V6ZM7.5 6h.008v.008H7.5V6Zm2.25 0h.008v.008H9.75V6Z"})])}const Ou=lu({__name:"DotBlackListAppDrawer",props:{type:{},title:{}},emits:["submit"],setup(W,{expose:N,emit:X}){const n=nu();k(null),k(null);const T=W,w=k(!1),_=ou();su(),ru();const Y=iu(()=>({theme:_.isDarkMode?cu:du})),{message:s,modal:P}=Fu(["message","modal"],{configProviderProps:Y});let l,C;const R=k({openDrawer:L=>new Promise((F,x)=>{if(T.type==="update"&&!L){x(new Error("更新模式下必须传入初始化参数")),s.error("初始化参数不能为空");return}l=F,C=x,v.value="",w.value=!0}),closeDrawer:()=>{w.value=!1,C("Drawer closed without submission")}}),v=k(""),h=k(""),Q=async()=>{if(!v.value){P.create({title:"应用包名不能为空",type:"error",preset:"dialog",content:()=>u("p",null,[e("噫?应用包名不能为空(敲")])});return}if(n.allPackageName.has(v.value)){P.create({title:"应用包名已存在",type:"error",preset:"dialog",content:()=>u("p",null,[e("噫?这个应用包名已经存在列表中了(敲")])});return}p.value=!0;const L=()=>{p.value=!1,w.value=!1},F=()=>{p.value=!1},x={name:v.value,loadingCallback:F,closeCallback:L};P.create({title:"确认隐藏窗口控制器吗?",type:"warning",preset:"dialog",content:()=>u("p",null,[e("窗口控制器的隐藏受小米云控规则下发影响,如果隐藏窗口控制器失效,请重新操作")," ",u("span",{class:`font-bold ${_.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("热重载应用数据")])," ",e(",如后续需要恢复")," ",u("span",{class:`font-bold ${_.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("窗口控制器")])," ",e("的显示,则需要先清除自定义规则,确定要继续吗?")]),positiveText:"确定隐藏",negativeText:"我再想想",onPositiveClick:async()=>{l(x)},onNegativeClick(){F()},onMaskClick(){F()},onClose(){F()}})},p=k(!1);return N({openDrawer:R.value.openDrawer}),(L,F)=>{const x=E("n-input-group-label"),O=E("n-input"),K=E("n-input-group"),j=E("n-alert"),Z=E("n-button"),q=E("n-drawer-content"),$=E("n-drawer");return S(),V(Bu,null,[Eu(L.$slots,"default",pu(Cu({openDrawer:R.value.openDrawer}))),u($,{show:w.value,"onUpdate:show":F[3]||(F[3]=b=>w.value=b),width:a(_).windowWidth>=640?"450px":"100%",placement:"right"},{default:o(()=>[u(q,{"body-content-class":"auto-ui-drawer-content","scrollbar-props":{trigger:"none"},title:T.title,closable:""},{footer:o(()=>[u(Z,{type:"info",loading:p.value,"onUpdate:loading":F[1]||(F[1]=b=>p.value=b),onClick:F[2]||(F[2]=()=>Q())},{default:o(()=>F[6]||(F[6]=[e(" 提交 ")])),_:1},8,["loading"])]),default:o(()=>[u(K,null,{default:o(()=>[u(x,{size:"large"},{default:o(()=>F[4]||(F[4]=[e("应用包名")])),_:1}),u(O,{size:"large",status:h.value,value:v.value,"onUpdate:value":F[0]||(F[0]=b=>v.value=b),"allow-input":b=>Du(b),readonly:T.type==="update",placeholder:"请输入应用包名"},null,8,["status","value","allow-input","readonly"])]),_:1}),u(j,{"show-icon":!1,bordered:!1,title:"隐藏窗口控制器",type:"info",class:"mt-5"},{default:o(()=>F[5]||(F[5]=[e(" 添加后,应用上方的窗口控制器将被隐藏 ")])),_:1})]),_:1},8,["title"])]),_:1},8,["show","width"])],64)}}}),Ku={class:"autoui-view mb-10"},ju={class:"mt-3"},Zu={class:"mb-3 px-4 sm:px-0"},qu={key:0,class:"mb-3 flex flex-wrap"},Ju={class:"flex flex-wrap"},Xu={class:"flex flex-wrap"},Gu=lu({__name:"DotBlackListView",setup(W){const N=k(null),X=b(),n=ou(),T=su(),w=gu(),_=iu(()=>({theme:n.isDarkMode?cu:du})),{message:Y,modal:s,notification:P}=Fu(["message","modal","notification"],{configProviderProps:_}),l=nu(),C=k(!1),R=k(!1);mu();const v=k(null);ku(),ru(),Au();const h=k("");function Q(r){return()=>J(m,null,{default:()=>J(r)})}const p=async()=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}await n.getAndroidApplicationPackageNameList(),await l.initDefault()},L=async()=>{const[r,t]=await y(w.getList());r&&s.create({title:"获取失败",type:"warning",preset:"dialog",content:()=>u("p",null,[e("您的系统环境暂不支持该功能,获取失败~")]),negativeText:"确定"}),t&&s.create({title:"获取成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶OwO,已重新获取当前已安装的应用名称~")]),negativeText:"确定"})},F=()=>{l.filterInstalledApps=!l.filterInstalledApps},x=async()=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}R.value=!0,await p();const r=l.mergeDotBlackList.map(d=>d.name),[t,i]=await y(H({dotBlackList:r,sourceDotBlackList:l.sourceDotBlackList,customDotBlackList:l.customDotBlackList}));t&&(s.create({title:"热重载应用数据失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("热重载应用数据失败了QwQ,详情请查看错误日志~")]),negativeText:"确定"}),R.value=!1),i&&(s.create({title:"热重载应用数据成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶w,已经重新为你载入包括自定义规则在内的应用数据~实际生效还需要重启")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("系统界面")])," ",e("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){z().then(async d=>{await p(),s.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("已经成功为你重启系统界面的作用域,请查看是否生效,如不生效请手动重启平板再查看效果~")])})}).catch(d=>{s.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}),R.value=!1)},O=async()=>{const[r,t]=await y(new Promise((i,d)=>{s.create({title:"想重启设备吗?",type:"info",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("是否立即重启设备,以使规则生效?")])]),positiveText:"确认重启",negativeText:"取消",onPositiveClick:()=>{i("positiveClick")},onNegativeClick:()=>{d("negativeClick")}})}));if(t){const[i]=await y(Nu());if(i){s.create({title:"操作失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("无法重启设备,详情请查看日志记录~")]),negativeText:"确定"});return}}},K=async()=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}h.value="";const[,r]=await y(new Promise((t,i)=>{s.create({title:"请粘贴分享口令",preset:"dialog",style:"min-width:500px; width:50%;",content:()=>J(tu,{type:"textarea",value:h.value,"onUpdate:value":d=>{h.value=d},autosize:{minRows:8,maxRows:8},placeholder:"在此处粘贴分享规则口令"}),positiveText:"确定提交",negativeText:"取消导入",onPositiveClick(){t("positiveClick")}})}));if(r){C.value=!0;const t=h.value,i=Pu(t);if(!(i!=null&&i.length)){s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("导入分享规则失败了QwQ,解析")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("自定义规则")])," ",e("口令发生错误,无法正常解析。")]),negativeText:"确定"}),C.value=!1;return}try{const d=Qu(i),D=au.inflate(d,{to:"string"}),c=JSON.parse(D);if(c.type!=="dot_black_list"){s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("导入分享规则失败了QwQ,该")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("自定义规则")])," ",e("不适用于窗口控制器。")]),negativeText:"确定"}),C.value=!1;return}if(c.device==="pad"&&n.deviceCharacteristics!=="tablet"||c.device==="fold"&&n.deviceCharacteristics==="tablet"){s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("导入分享规则失败了QwQ,平板和折叠屏的适配规则不能混用哦~")]),negativeText:"确定"}),C.value=!1;return}if(l.allPackageName.has(c.name)){s.create({title:"应用包名已存在",type:"error",preset:"dialog",content:()=>u("p",null,[e("这个应用包名已经存在列表中了,导入分享规则失败了!(敲")])}),C.value=!1;return}l.customDotBlackList.push(c.name);const B=l.mergeDotBlackList.map(M=>M.name),[U,g]=await y(H({dotBlackList:B,sourceDotBlackList:l.sourceDotBlackList,customDotBlackList:l.customDotBlackList}));U?(s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,导入失败了QwQ,详细错误请查看错误日志~")])}),C.value=!1):(await p(),T.updateMergeRuleList(),C.value=!1,s.create({title:"导入分享规则成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶w,")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(c.name,n.installedAppNameList[c.name]||T.applicationName[c.name])])," ",e("的应用配置成功了OwO~实际生效还需要重启")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("系统界面")])," ",e("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){z().then(async M=>{await p(),s.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("已经成功为你重启系统界面的作用域,请查看是否生效,如不生效请手动重启平板再查看效果~")])})}).catch(M=>{s.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}))}catch(d){console.log(d,"error"),s.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("解析分享规则失败了QwQ,请检查导入口令是否有误")]),negativeText:"确定"}),C.value=!1}}},j=async(r,t,i,d)=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}if(r==="cleanCustomRule"){const D=s.create({title:"想清除自定义规则吗?",type:"warning",preset:"dialog",content:()=>u("p",null,[e("清除自定义规则后,将恢复")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(i.name,i.applicationName)])," ",e("的窗口控制器显示效果。确定要继续吗?")]),positiveText:"确定清除",negativeText:"我再想想",onPositiveClick:async()=>{D.loading=!0,l.customDotBlackList=l.customDotBlackList.filter(g=>g!==i.name),l.sourceDotBlackList=l.sourceDotBlackList.map(g=>(g.dataList=g.dataList.filter(M=>M!==i.name),g));const c=l.mergeDotBlackList.map(g=>g.name),[B,U]=await y(H({dotBlackList:c,sourceDotBlackList:l.sourceDotBlackList,customDotBlackList:l.customDotBlackList}));B?(s.create({title:"清除自定义规则失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,清除失败了QwQ,详细错误请查看错误日志~")])}),D.loading=!1):(D.loading=!1,s.create({title:"清除自定义规则成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶w,清除自定义规则成功了OwO~实际生效还需要重启")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("系统界面")])," ",e("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){z().then(async g=>{await p(),s.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("已经成功为你重启系统界面的作用域,请查看是否生效,如不生效请手动重启平板再查看效果~")])})}).catch(g=>{s.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}),D.loading=!1,await p())}})}if(r==="shareCustomRule"){const D={name:i.name,cmpt:1,rules:{name:i.name},type:"dot_black_list",device:n.deviceCharacteristics==="tablet"?"pad":"fold"},c=JSON.stringify(D),B=au.deflate(c,{level:9,memLevel:9,windowBits:15}),U=new Uint8Array(B),g=zu(U),[M]=await y(navigator.clipboard.writeText(`我分享了一个[窗口控制器]的自定义规则,可以前往[完美横屏应用计划 For Web UI]导入: ${g}`));if(M){s.create({title:"复制分享口令失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("复制")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(i.name,i.applicationName)])," ",e("的分享口令失败了QwQ,可能由于没有读取/写入剪切板的权限或")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("自定义规则")])," ",e("长度过大。")]),negativeText:"确定"});return}else s.create({title:"复制分享口令成功",type:"success",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("好耶w,复制")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(i.name,i.applicationName)])," ",e("分享口令成功了~")]),u("p",null,[e("如果没有复制成功,请确认是否给予了读取/写入剪切板的权限或")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("自定义规则")])," ",e("长度过大。")]),u("p",null,[e("分享口令导入入口位于")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("窗口控制器- 从分享口令导入")])," ",e("。")])]),positiveText:"确定"})}},Z=(r,t)=>{s.create({title:"系统规则说明",type:"warning",preset:"dialog",content:()=>u("p",null,[e("系统已对")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(r.name,r.applicationName)])," ",e("配置了窗口控制器的隐藏,且不可被移除,仅有自定义规则可以被移除哦~")])})},q=async()=>{if(!l.systemDotBlackList.length||!l.hasHTMLViewerCloudData){s.create({title:"获取云控失败",type:"error",preset:"dialog",content:()=>u("div",null,[u("p",null,[e("无法获取到HTML查看器的云控,请检查是否禁用云控或者清除HTML查看器的数据再重启平板尝试操作~")]),n.currentRootManager!=="Magisk"&&u("p",null,[e("部分"),n.currentRootManager,e("版本内置的Web UI存在异常,如仍然无法正常获取云控数据库,请单独安装模块网盘内提供的KsuWebUI。")])])});return}if(v.value){const[r,t]=await y(v.value.openDrawer());if(r)console.log("操作取消:",r);else{l.customDotBlackList.push(t.name);const i=l.mergeDotBlackList.map(c=>c.name),[d,D]=await y(H({dotBlackList:i,sourceDotBlackList:l.sourceDotBlackList,customDotBlackList:l.customDotBlackList}));d?(s.create({title:"应用添加失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,添加失败了QwQ,详细错误请查看错误日志~")])}),t.loadingCallback&&t.loadingCallback()):(s.create({title:"应用添加成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("好耶w,已经成功配置")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[I(t.name,n.installedAppNameList[t.name]||l.applicationName[t.name])])," ",e("的窗口控制器隐藏效果了OwO~实际生效还需要重启")," ",u("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[e("系统界面")])," ",e("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){z().then(async c=>{await p(),s.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>u("p",null,[e("已经成功为你重启系统界面的作用域,请查看是否生效,如不生效请手动重启平板再查看效果~")])})}).catch(c=>{s.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>u("p",null,[e("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}),await p(),t.loadingCallback&&t.loadingCallback(),t.closeCallback&&t.closeCallback())}}},$=fu({page:1,pageSize:10,simple:!0,showSizePicker:!0,onChange:r=>{$.page=r},onUpdatePageSize:r=>{$.pageSize=r,$.page=1}});function b(){return[{title:"应用名称",minWidth:250,key:"name",render(r,t){return u("div",null,[r.applicationName&&u("p",null,[r.applicationName]),r.name&&u("p",null,[u("span",{class:{hidden:!r.applicationName}},[e("(")]),r.name,u("span",{class:{hidden:!r.applicationName}},[e(")")])])])}},{title:"规则状态",width:150,key:"isOptimizeWebView",render(r,t){return r.status?u(E("n-tag"),{bordered:!1,dashed:!0,type:"success"},{default:()=>[e("已生效")]}):u(E("n-tag"),{bordered:!1,dashed:!0,type:"info"},{default:()=>[e("未生效")]})}},{title:"规则来源",width:150,key:"ruleMode",render(r,t){const i={icon:r.ruleMode==="custom"?Uu:Hu};if(r.ruleMode==="custom"){const d=[{label:"分享自定义规则",key:"shareCustomRule",icon:Q(uu)},{label:"清除自定义规则",key:"cleanCustomRule",icon:Q(Vu)}];return u(E("n-dropdown"),{onSelect:(D,c)=>j(D,c,r),size:"large",trigger:"click",options:d},{default:()=>[u(E("n-button"),{size:"small",dashed:!0,type:"info"},{default:()=>[e("自定义规则")],...i})]})}return u(E("n-button"),{size:"small",dashed:!0,type:"error",onClick:()=>Z(r)},{default:()=>[e("系统规则")],...i})}}]}return(r,t)=>{const i=E("n-alert"),d=E("n-input-group"),D=E("n-card"),c=E("n-data-table");return S(),V("main",Ku,[f("div",ju,[f("div",Zu,[t[10]||(t[10]=f("h3",{class:G("text-base font-semibold leading-7")},[f("span",{class:"animated-bg bg-clip-text font-semibold text-transparent",style:{"background-image":`linear-gradient(\r 101.22deg,\r rgb(255, 182, 133) -18.32%,\r diff --git a/module_src/webroot/assets/EmbeddedWebView-6WNxtfd7.js b/module_src/webroot/assets/EmbeddedWebView-CWXM9W6r.js similarity index 93% rename from module_src/webroot/assets/EmbeddedWebView-6WNxtfd7.js rename to module_src/webroot/assets/EmbeddedWebView-CWXM9W6r.js index e39341bb..e5a4c036 100644 --- a/module_src/webroot/assets/EmbeddedWebView-6WNxtfd7.js +++ b/module_src/webroot/assets/EmbeddedWebView-CWXM9W6r.js @@ -1 +1 @@ -import{d as f,r as a,o as _,w as m,a as v,c as w,b as p,u as h,e as b,f as g,g as l,_ as x}from"./index-DriQcjjf.js";const y={class:"webview-container"},B=["src"],E=f({__name:"EmbeddedWebView",setup(R){const r=h(),s=a(r.query.url),e=a(null),d=()=>{console.log("网页加载完成"),u.value=!1,c()},c=()=>{var o;if(e.value){const n=e.value.contentDocument||((o=e.value.contentWindow)==null?void 0:o.document);if(n){const t=n.body.scrollHeight;e.value.style.height=`${t}px`}}},i=()=>{c()};_(()=>{window.addEventListener("resize",i)}),m(()=>r.query.url,o=>{s.value=o,e.value&&(e.value.src=s.value)});const u=a(!0);return v(()=>{window.removeEventListener("resize",i)}),(o,n)=>{const t=b("n-spin");return g(),w(t,{show:u.value},{default:p(()=>[l("div",y,[l("iframe",{ref_key:"iframeRef",ref:e,src:s.value,frameborder:"0",class:"webview",onLoad:d},null,40,B)])]),_:1},8,["show"])}}}),z=x(E,[["__scopeId","data-v-f817c96f"]]);export{z as default}; +import{d as f,r as a,o as _,w as m,a as v,c as w,b as p,u as h,e as b,f as g,g as l,_ as x}from"./index-DylCICe-.js";const y={class:"webview-container"},B=["src"],E=f({__name:"EmbeddedWebView",setup(R){const r=h(),s=a(r.query.url),e=a(null),d=()=>{console.log("网页加载完成"),u.value=!1,c()},c=()=>{var o;if(e.value){const n=e.value.contentDocument||((o=e.value.contentWindow)==null?void 0:o.document);if(n){const t=n.body.scrollHeight;e.value.style.height=`${t}px`}}},i=()=>{c()};_(()=>{window.addEventListener("resize",i)}),m(()=>r.query.url,o=>{s.value=o,e.value&&(e.value.src=s.value)});const u=a(!0);return v(()=>{window.removeEventListener("resize",i)}),(o,n)=>{const t=b("n-spin");return g(),w(t,{show:u.value},{default:p(()=>[l("div",y,[l("iframe",{ref_key:"iframeRef",ref:e,src:s.value,frameborder:"0",class:"webview",onLoad:d},null,40,B)])]),_:1},8,["show"])}}}),z=x(E,[["__scopeId","data-v-f817c96f"]]);export{z as default}; diff --git a/module_src/webroot/assets/GameBooster-CCGqR_Io.js b/module_src/webroot/assets/GameBooster-BrGqqyKs.js similarity index 99% rename from module_src/webroot/assets/GameBooster-CCGqR_Io.js rename to module_src/webroot/assets/GameBooster-BrGqqyKs.js index 92b2267b..0f0b8363 100644 --- a/module_src/webroot/assets/GameBooster-CCGqR_Io.js +++ b/module_src/webroot/assets/GameBooster-BrGqqyKs.js @@ -1,4 +1,4 @@ -import{F as J,G as ce,H as ge,I as me,J as Fe,f as M,k as H,g as F,K as Ee,d as X,L as ve,r as C,h as ee,M as fe,A as ye,i as te,j as ue,e as c,N as Ce,O as Ae,P as Be,m as t,b as a,s as l,l as u,Q,c as Y,p as P,R as oe,y as ae,z as ne,S as _e,T as be,U as De,V as ke,W as Te,n as Z,X as we,Y as _,Z as k,$ as Re,a0 as Oe,a1 as Ge,a2 as xe,a3 as q,a4 as Ie,a5 as Me,a6 as Se,a7 as Ne,q as Ve,a8 as ze,a9 as Le,aa as Ue,ab as W,ac as $e,ad as he,ae as We,af as Ye}from"./index-DriQcjjf.js";function Pe(g,s,p,r){return J(g,function(E,v,G){s(r,p(E),v,G)}),r}function He(g,s){return function(p,r){return Pe(p,g,s(r),{})}}var Ke=Object.prototype,je=Ke.toString,le=He(function(g,s,p){s!=null&&typeof s.toString!="function"&&(s=je.call(s)),g[s]=p},ce(ge));function z(g,s){var p={};return s=me(s),J(g,function(r,E,v){Fe(p,s(r,E,v),r)}),p}function Qe(g,s){return M(),H("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[F("path",{"fill-rule":"evenodd",d:"M9.315 7.584C12.195 3.883 16.695 1.5 21.75 1.5a.75.75 0 0 1 .75.75c0 5.056-2.383 9.555-6.084 12.436A6.75 6.75 0 0 1 9.75 22.5a.75.75 0 0 1-.75-.75v-4.131A15.838 15.838 0 0 1 6.382 15H2.25a.75.75 0 0 1-.75-.75 6.75 6.75 0 0 1 7.815-6.666ZM15 6.75a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z","clip-rule":"evenodd"}),F("path",{d:"M5.26 17.242a.75.75 0 1 0-.897-1.203 5.243 5.243 0 0 0-2.05 5.022.75.75 0 0 0 .625.627 5.243 5.243 0 0 0 5.022-2.051.75.75 0 1 0-1.202-.897 3.744 3.744 0 0 1-3.008 1.51c0-1.23.592-2.323 1.51-3.008Z"})])}const Ze=le({RATIO_FULLSCREEN:"0.0",RATIO_16_TO_9:"1.7777778",RATIO_4_TO_3:"1.3333333",RATIO_21_TO_9:"2.3333333",RATIO_32_TO_9:"3.5555556"}),qe={RATIO_FULLSCREEN:{type:"info",name:"全屏",color:{}},RATIO_16_TO_9:{type:"error",name:"16:9",color:{}},RATIO_4_TO_3:{type:"success",name:"4:3",color:{}},RATIO_21_TO_9:{type:"warning",name:"21:9",color:{}},RATIO_32_TO_9:{type:"primary",name:"32:9",color:{color:"rgba(255, 105, 180, 0.1)",borderColor:"rgba(255, 105, 180, 0.3)",textColor:"#ff69b4"}}},re=g=>{console.log(g,"inputArr");const s=Ee(g);let p=Object.entries(Ze).map(([r,E])=>{const v=qe[E];return{label:v.name,value:r,type:v.type,color:v.color}});return s&&(p=[...p,...s]),p},Je=le({GRAVITY_CENTER:17,GRAVITY_TOP:48,GRAVITY_BOTTOM:80}),Xe={GRAVITY_CENTER:{color:"info",name:"居中显示"},GRAVITY_TOP:{color:"success",name:"居顶显示"},GRAVITY_BOTTOM:{color:"error",name:"居底显示"}},se=()=>Object.entries(Je).map(([g,s])=>{const p=Xe[s];return{label:p.name,value:g,color:p.color}}),et=X({__name:"GameBoosterAppDrawer",props:{type:{},title:{}},emits:["submit"],setup(g,{expose:s,emit:p}){ve(),C(null),C(null);const r=g,E=C(!1),v=re([{label:"自定义",value:"custom",type:"primary",color:{color:"rgba(155, 89, 182, 0.1)",borderColor:"rgba(155, 89, 182, 0.3)",textColor:"#9b59b6"}}]),G=z(v,e=>e.value),f=se(),K=z(f,e=>e.value),d=ee();fe(),ye();const L=te(()=>({theme:d.isDarkMode?ae:ne})),{message:U,modal:b}=ue(["message","modal"],{configProviderProps:L});let V,S;const N=C({openDrawer:e=>new Promise((o,i)=>{if(r.type==="update"&&!e){i(new Error("更新模式下必须传入初始化参数")),U.error("初始化参数不能为空");return}r.type==="update"&&(x.value=(e==null?void 0:e.packageName)||"",T.value=(e==null?void 0:e.appName)||"",e!=null&&e.gameGravity&&(D.value=K[e.gameGravity]),e!=null&&e.gameRatio&&(G[e.gameRatio]?(y.value=G[e.gameRatio],B.value=e.gameRatio):(y.value=G.custom,B.value=e.gameRatio))),V=o,S=i,E.value=!0}),closeDrawer:()=>{E.value=!1,S("Drawer closed without submission")}}),T=C(""),x=C(""),D=C(f[0]),y=C(v[0]),B=C(""),$=(e,o)=>{if(o.value==="custom"&&!d.ABTestInfo.GAME_BOOSTER_CUSTOM_RATIO){b.create({title:"无使用权限",type:"warning",preset:"dialog",content:()=>t("div",null,[t("p",null,[l("自定义游戏比例存在使用风险,如果配置了不恰当的自定义游戏比例,可能会触发部分游戏风控导致游戏账号被封!")]),t("p",null,[l("如仍然坚持使用自定义游戏比例,请前往模块设置导入激活口令激活自定义游戏比例:")]),t("p",null,[l("eNqrVnJ39HWNd/L3Dw5xDYp3Dg0O8feND3IM8fRXsiopKk2tBQC2Pwrm")])])});return}y.value=o,o.value==="custom"?B.value="":B.value=o.value},I=(e,o)=>{D.value=o},h=async()=>{if(!B.value){b.create({title:"游戏显示比例不能为空",type:"error",preset:"dialog",content:()=>t("p",null,[l("噫?游戏显示比例不能为空(敲")])});return}n.value=!0;const e=()=>{n.value=!1,E.value=!1},o=()=>{n.value=!1},i={appName:T.value,packageName:x.value,gameGravity:D.value.value,gameRatio:B.value,loadingCallback:o,closeCallback:e};b.create({title:"确认调整游戏显示布局吗?",type:"warning",preset:"dialog",content:()=>t("p",null,[l("调整后会改变游戏的显示比例,获得更大的游戏视野,但并非所有游戏都兼容游戏显示比例调整,且部分游戏可能会对游戏显示比例的修改作为风控管理,可能导致游戏账号被封禁,调整游戏显示布局前,即认可并了解这些须知。确定要继续吗?")]),positiveText:"确定调整",negativeText:"我再想想",onPositiveClick:async()=>{V(i),o(),e()},onNegativeClick(){o()},onMaskClick(){o()},onClose(){o()}})},n=C(!1);return s({openDrawer:N.value.openDrawer}),(e,o)=>{const i=c("n-input-group-label"),w=c("n-input"),R=c("n-input-group"),O=c("n-button"),A=c("n-dropdown"),ie=c("n-alert"),j=c("n-card"),de=c("n-drawer-content"),pe=c("n-drawer");return M(),H(oe,null,[Ce(e.$slots,"default",Ae(Be({openDrawer:N.value.openDrawer}))),t(pe,{show:E.value,"onUpdate:show":o[7]||(o[7]=m=>E.value=m),width:u(d).windowWidth>=640?"450px":"100%",placement:"right"},{default:a(()=>[t(de,{"body-content-class":"auto-ui-drawer-content","scrollbar-props":{trigger:"none"},title:r.title,closable:""},{footer:a(()=>[t(O,{type:"info",loading:n.value,"onUpdate:loading":o[5]||(o[5]=m=>n.value=m),onClick:o[6]||(o[6]=()=>h())},{default:a(()=>o[11]||(o[11]=[l(" 提交 ")])),_:1},8,["loading"])]),default:a(()=>[t(R,null,{default:a(()=>[t(i,{size:"large"},{default:a(()=>o[8]||(o[8]=[l("游戏名称")])),_:1}),t(w,{size:"large",value:T.value,"onUpdate:value":o[0]||(o[0]=m=>T.value=m),readonly:!0,placeholder:"请输入游戏名称"},null,8,["value"])]),_:1}),t(R,{class:"mt-5"},{default:a(()=>[t(i,{size:"large"},{default:a(()=>o[9]||(o[9]=[l("游戏包名")])),_:1}),t(w,{size:"large",value:x.value,"onUpdate:value":o[1]||(o[1]=m=>x.value=m),readonly:!0,placeholder:"请输入游戏包名"},null,8,["value"])]),_:1}),t(j,{bordered:!1,title:"游戏显示比例",size:"small"},{default:a(()=>[t(A,{value:y.value,"onUpdate:value":o[2]||(o[2]=m=>y.value=m),size:"large",trigger:"click",options:u(v),onSelect:$},{default:a(()=>{var m;return[t(O,{block:"",type:y.value.type,color:(m=y.value.color)==null?void 0:m.textColor,dashed:""},{default:a(()=>[l(Q(y.value.label),1)]),_:1},8,["type","color"])]}),_:1},8,["value","options"]),t(R,{class:"mt-5"},{default:a(()=>[t(w,{type:"number",ref:"currentCustomGameRatioRef",readonly:y.value.value!=="custom",value:B.value,"onUpdate:value":o[3]||(o[3]=m=>B.value=m),placeholder:"请输入游戏显示比例"},null,8,["readonly","value"])]),_:1}),y.value.value==="custom"?(M(),Y(ie,{key:0,class:"mt-5",type:"info","show-icon":!1,bordered:!1},{default:a(()=>o[10]||(o[10]=[F("p",null,"参考计算公式:21:9=21%9≈2.3333333",-1)])),_:1})):P("",!0)]),_:1}),t(j,{bordered:!1,title:"游戏显示位置",size:"small"},{default:a(()=>[t(A,{value:D.value,"onUpdate:value":o[4]||(o[4]=m=>D.value=m),size:"large",trigger:"click",options:u(f),onSelect:I},{default:a(()=>[t(O,{block:"",type:D.value.color,dashed:""},{default:a(()=>[l(Q(D.value.label),1)]),_:1},8,["type"])]),_:1},8,["value","options"])]),_:1})]),_:1},8,["title"])]),_:1},8,["show","width"])],64)}}}),tt={class:"autoui-view mb-10"},ut={class:"mt-3"},ot={class:"mb-3 px-4 sm:px-0"},at={class:"mb-3 flex flex-wrap"},nt={class:"flex flex-wrap"},lt={class:"flex flex-wrap"},st=X({__name:"GameBooster",setup(g){const s=C(null),p=h(),r=ee(),E=we();_e();const v=te(()=>({theme:r.isDarkMode?ae:ne})),{message:G,modal:f,notification:K}=ue(["message","modal","notification"],{configProviderProps:v}),d=be(),L=De(),U=re(),b=z(U,n=>n.value),V=se(),S=z(V,n=>n.value),N=ke(),T=C(null),x=async()=>{if(!N.isSupportGameMode.value){f.create({title:"未开启游戏显示布局",type:"warning",preset:"dialog",content:()=>t("p",null,[l("未开启游戏显示布局,请先前往模块设置进行开启~")]),positiveText:"立即前往",negativeText:"取消",onPositiveClick(){E.push({name:"settings",hash:"#gameModeSettings"}).then(()=>{const o=new MutationObserver(()=>{const i=document.getElementById("gameModeSettings");i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),o.disconnect())});o.observe(document.body,{childList:!0,subtree:!0})})}});return}const[n,e]=await W($e());n&&f.create({title:"操作失败",type:"error",preset:"dialog",content:()=>t("p",null,[l("发生异常错误,详细错误请查看日志~")])})},D=async()=>{f.create({title:"获取手机/平板管家",type:"info",preset:"dialog",content:()=>t("div",null,[t("p",null,[l("如果规则无法生效,还需要安装修改版的手机/平板管家才会生效,安装后如出现崩溃等异常,推荐清空管家数据并重启设备再尝试~")]),t("p",null,[l("(Tips:需搭配核心破解并通过MT管理器安装)")]),t("p",null,[l("下载地址:https://caiyun.139.com/m/i?135CeBMHACC6p")])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText("https://caiyun.139.com/m/i?135CeBMHACC6p")},onNegativeClick:()=>{}})},y=()=>{E.push({name:"settings",hash:"#displayModeSettings"}).then(()=>{const n=new MutationObserver(()=>{const e=document.getElementById("displayModeSettings");e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),n.disconnect())});n.observe(document.body,{childList:!0,subtree:!0})})},B=async(n,e)=>{if(!N.isSupportGameMode.value){f.create({title:"未开启游戏显示布局",type:"warning",preset:"dialog",content:()=>t("p",null,[l("未开启游戏显示布局,请先前往模块设置进行开启~")]),positiveText:"立即前往",negativeText:"取消",onPositiveClick(){E.push({name:"settings",hash:"#gameModeSettings"}).then(()=>{const o=new MutationObserver(()=>{const i=document.getElementById("gameModeSettings");i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),o.disconnect())});o.observe(document.body,{childList:!0,subtree:!0})})}});return}if(T.value){const[o,i]=await W(T.value.openDrawer({appName:n.app_name,packageName:n.package_name,gameRatio:n.game_ratio,gameGravity:n.game_gravity}));if(o)console.log("操作取消:",o);else if(i){d.loading=!0;const[w,R]=await W(he(i.packageName,i.gameRatio,i.gameGravity));w&&(f.create({title:"更新设置失败",type:"error",preset:"dialog",content:()=>t("p",null,[l("发生异常错误,更新失败了QwQ,详细错误请查看错误日志~")])}),d.loading=!1),R&&(d.loading=!1,f.create({title:"更新设置成功",type:"success",preset:"dialog",content:()=>t("p",null,[l("好耶w,已经成功配置")," ",t("span",{class:`font-bold ${r.isDarkMode?"text-teal-400":"text-gray-600"}`},[i.appName])," ",l("的游戏显示布局了OwO~实际生效还需要重启")," ",t("span",{class:`font-bold ${r.isDarkMode?"text-teal-400":"text-gray-600"}`},[i.appName])," ",l("和")," ",t("span",{class:`font-bold ${r.isDarkMode?"text-teal-400":"text-gray-600"}`},[l("平板/手机管家")])," ",l("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){We(n.package_name).then(async O=>{await d.initDefault(),f.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>t("p",null,[l("已经成功为你重启对应的作用域,请查看是否生效~")])})}).catch(O=>{f.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>t("p",null,[l("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}))}}},$=async()=>{await d.initDefault()},I=Te({page:1,pageSize:10,simple:!0,showSizePicker:!0,onChange:n=>{I.page=n},onUpdatePageSize:n=>{I.pageSize=n,I.page=1}});function h(){return[{title:"游戏名称",minWidth:250,key:"name",render(n,e){return t("div",null,[n.app_name&&t("p",null,[n.app_name]),n.app_name&&t("p",null,[t("span",{class:{hidden:!n.app_name}},[l("(")]),n.package_name,t("span",{class:{hidden:!n.app_name}},[l(")")])])])}},{title:"游戏显示比例",minWidth:150,key:"game_ratio",render(n,e){return b[n.game_ratio]&&b[n.game_ratio].label?t(c("n-tag"),{dashed:!0,type:b[n.game_ratio].type,color:b[n.game_ratio].color},{default:()=>[b[n.game_ratio].label]}):t(c("n-tag"),{dashed:!0,color:{color:"rgba(155, 89, 182, 0.1)",borderColor:"rgba(155, 89, 182, 0.3)",textColor:"#9b59b6"}},{default:()=>[l("自定义")]})}},{title:"游戏显示位置",minWidth:150,key:"game_gravity",render(n,e){return t(c("n-tag"),{dashed:!0,type:S[n.game_gravity].color},{default:()=>[S[n.game_gravity].label]})}},{title:"操作",minWidth:100,key:"setting",render(n,e){const o={icon:Ye};return t(c("n-button"),{onClick:()=>B(n),size:"small",strong:!0,dashed:!0,type:"info"},{default:()=>[l("管理")],...o})}}]}return(n,e)=>{const o=c("n-alert"),i=c("n-dropdown"),w=c("n-input-group"),R=c("n-card"),O=c("n-data-table");return M(),H(oe,null,[F("main",tt,[F("div",ut,[F("div",ot,[e[10]||(e[10]=F("h3",{class:Z("text-base font-semibold leading-7")},[F("span",{class:"animated-bg bg-clip-text font-semibold text-transparent",style:{"background-image":`linear-gradient(\r +import{F as J,G as ce,H as ge,I as me,J as Fe,f as M,k as H,g as F,K as Ee,d as X,L as ve,r as C,h as ee,M as fe,A as ye,i as te,j as ue,e as c,N as Ce,O as Ae,P as Be,m as t,b as a,s as l,l as u,Q,c as Y,p as P,R as oe,y as ae,z as ne,S as _e,T as be,U as De,V as ke,W as Te,n as Z,X as we,Y as _,Z as k,$ as Re,a0 as Oe,a1 as Ge,a2 as xe,a3 as q,a4 as Ie,a5 as Me,a6 as Se,a7 as Ne,q as Ve,a8 as ze,a9 as Le,aa as Ue,ab as W,ac as $e,ad as he,ae as We,af as Ye}from"./index-DylCICe-.js";function Pe(g,s,p,r){return J(g,function(E,v,G){s(r,p(E),v,G)}),r}function He(g,s){return function(p,r){return Pe(p,g,s(r),{})}}var Ke=Object.prototype,je=Ke.toString,le=He(function(g,s,p){s!=null&&typeof s.toString!="function"&&(s=je.call(s)),g[s]=p},ce(ge));function z(g,s){var p={};return s=me(s),J(g,function(r,E,v){Fe(p,s(r,E,v),r)}),p}function Qe(g,s){return M(),H("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[F("path",{"fill-rule":"evenodd",d:"M9.315 7.584C12.195 3.883 16.695 1.5 21.75 1.5a.75.75 0 0 1 .75.75c0 5.056-2.383 9.555-6.084 12.436A6.75 6.75 0 0 1 9.75 22.5a.75.75 0 0 1-.75-.75v-4.131A15.838 15.838 0 0 1 6.382 15H2.25a.75.75 0 0 1-.75-.75 6.75 6.75 0 0 1 7.815-6.666ZM15 6.75a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z","clip-rule":"evenodd"}),F("path",{d:"M5.26 17.242a.75.75 0 1 0-.897-1.203 5.243 5.243 0 0 0-2.05 5.022.75.75 0 0 0 .625.627 5.243 5.243 0 0 0 5.022-2.051.75.75 0 1 0-1.202-.897 3.744 3.744 0 0 1-3.008 1.51c0-1.23.592-2.323 1.51-3.008Z"})])}const Ze=le({RATIO_FULLSCREEN:"0.0",RATIO_16_TO_9:"1.7777778",RATIO_4_TO_3:"1.3333333",RATIO_21_TO_9:"2.3333333",RATIO_32_TO_9:"3.5555556"}),qe={RATIO_FULLSCREEN:{type:"info",name:"全屏",color:{}},RATIO_16_TO_9:{type:"error",name:"16:9",color:{}},RATIO_4_TO_3:{type:"success",name:"4:3",color:{}},RATIO_21_TO_9:{type:"warning",name:"21:9",color:{}},RATIO_32_TO_9:{type:"primary",name:"32:9",color:{color:"rgba(255, 105, 180, 0.1)",borderColor:"rgba(255, 105, 180, 0.3)",textColor:"#ff69b4"}}},re=g=>{console.log(g,"inputArr");const s=Ee(g);let p=Object.entries(Ze).map(([r,E])=>{const v=qe[E];return{label:v.name,value:r,type:v.type,color:v.color}});return s&&(p=[...p,...s]),p},Je=le({GRAVITY_CENTER:17,GRAVITY_TOP:48,GRAVITY_BOTTOM:80}),Xe={GRAVITY_CENTER:{color:"info",name:"居中显示"},GRAVITY_TOP:{color:"success",name:"居顶显示"},GRAVITY_BOTTOM:{color:"error",name:"居底显示"}},se=()=>Object.entries(Je).map(([g,s])=>{const p=Xe[s];return{label:p.name,value:g,color:p.color}}),et=X({__name:"GameBoosterAppDrawer",props:{type:{},title:{}},emits:["submit"],setup(g,{expose:s,emit:p}){ve(),C(null),C(null);const r=g,E=C(!1),v=re([{label:"自定义",value:"custom",type:"primary",color:{color:"rgba(155, 89, 182, 0.1)",borderColor:"rgba(155, 89, 182, 0.3)",textColor:"#9b59b6"}}]),G=z(v,e=>e.value),f=se(),K=z(f,e=>e.value),d=ee();fe(),ye();const L=te(()=>({theme:d.isDarkMode?ae:ne})),{message:U,modal:b}=ue(["message","modal"],{configProviderProps:L});let V,S;const N=C({openDrawer:e=>new Promise((o,i)=>{if(r.type==="update"&&!e){i(new Error("更新模式下必须传入初始化参数")),U.error("初始化参数不能为空");return}r.type==="update"&&(x.value=(e==null?void 0:e.packageName)||"",T.value=(e==null?void 0:e.appName)||"",e!=null&&e.gameGravity&&(D.value=K[e.gameGravity]),e!=null&&e.gameRatio&&(G[e.gameRatio]?(y.value=G[e.gameRatio],B.value=e.gameRatio):(y.value=G.custom,B.value=e.gameRatio))),V=o,S=i,E.value=!0}),closeDrawer:()=>{E.value=!1,S("Drawer closed without submission")}}),T=C(""),x=C(""),D=C(f[0]),y=C(v[0]),B=C(""),$=(e,o)=>{if(o.value==="custom"&&!d.ABTestInfo.GAME_BOOSTER_CUSTOM_RATIO){b.create({title:"无使用权限",type:"warning",preset:"dialog",content:()=>t("div",null,[t("p",null,[l("自定义游戏比例存在使用风险,如果配置了不恰当的自定义游戏比例,可能会触发部分游戏风控导致游戏账号被封!")]),t("p",null,[l("如仍然坚持使用自定义游戏比例,请前往模块设置导入激活口令激活自定义游戏比例:")]),t("p",null,[l("eNqrVnJ39HWNd/L3Dw5xDYp3Dg0O8feND3IM8fRXsiopKk2tBQC2Pwrm")])])});return}y.value=o,o.value==="custom"?B.value="":B.value=o.value},I=(e,o)=>{D.value=o},h=async()=>{if(!B.value){b.create({title:"游戏显示比例不能为空",type:"error",preset:"dialog",content:()=>t("p",null,[l("噫?游戏显示比例不能为空(敲")])});return}n.value=!0;const e=()=>{n.value=!1,E.value=!1},o=()=>{n.value=!1},i={appName:T.value,packageName:x.value,gameGravity:D.value.value,gameRatio:B.value,loadingCallback:o,closeCallback:e};b.create({title:"确认调整游戏显示布局吗?",type:"warning",preset:"dialog",content:()=>t("p",null,[l("调整后会改变游戏的显示比例,获得更大的游戏视野,但并非所有游戏都兼容游戏显示比例调整,且部分游戏可能会对游戏显示比例的修改作为风控管理,可能导致游戏账号被封禁,调整游戏显示布局前,即认可并了解这些须知。确定要继续吗?")]),positiveText:"确定调整",negativeText:"我再想想",onPositiveClick:async()=>{V(i),o(),e()},onNegativeClick(){o()},onMaskClick(){o()},onClose(){o()}})},n=C(!1);return s({openDrawer:N.value.openDrawer}),(e,o)=>{const i=c("n-input-group-label"),w=c("n-input"),R=c("n-input-group"),O=c("n-button"),A=c("n-dropdown"),ie=c("n-alert"),j=c("n-card"),de=c("n-drawer-content"),pe=c("n-drawer");return M(),H(oe,null,[Ce(e.$slots,"default",Ae(Be({openDrawer:N.value.openDrawer}))),t(pe,{show:E.value,"onUpdate:show":o[7]||(o[7]=m=>E.value=m),width:u(d).windowWidth>=640?"450px":"100%",placement:"right"},{default:a(()=>[t(de,{"body-content-class":"auto-ui-drawer-content","scrollbar-props":{trigger:"none"},title:r.title,closable:""},{footer:a(()=>[t(O,{type:"info",loading:n.value,"onUpdate:loading":o[5]||(o[5]=m=>n.value=m),onClick:o[6]||(o[6]=()=>h())},{default:a(()=>o[11]||(o[11]=[l(" 提交 ")])),_:1},8,["loading"])]),default:a(()=>[t(R,null,{default:a(()=>[t(i,{size:"large"},{default:a(()=>o[8]||(o[8]=[l("游戏名称")])),_:1}),t(w,{size:"large",value:T.value,"onUpdate:value":o[0]||(o[0]=m=>T.value=m),readonly:!0,placeholder:"请输入游戏名称"},null,8,["value"])]),_:1}),t(R,{class:"mt-5"},{default:a(()=>[t(i,{size:"large"},{default:a(()=>o[9]||(o[9]=[l("游戏包名")])),_:1}),t(w,{size:"large",value:x.value,"onUpdate:value":o[1]||(o[1]=m=>x.value=m),readonly:!0,placeholder:"请输入游戏包名"},null,8,["value"])]),_:1}),t(j,{bordered:!1,title:"游戏显示比例",size:"small"},{default:a(()=>[t(A,{value:y.value,"onUpdate:value":o[2]||(o[2]=m=>y.value=m),size:"large",trigger:"click",options:u(v),onSelect:$},{default:a(()=>{var m;return[t(O,{block:"",type:y.value.type,color:(m=y.value.color)==null?void 0:m.textColor,dashed:""},{default:a(()=>[l(Q(y.value.label),1)]),_:1},8,["type","color"])]}),_:1},8,["value","options"]),t(R,{class:"mt-5"},{default:a(()=>[t(w,{type:"number",ref:"currentCustomGameRatioRef",readonly:y.value.value!=="custom",value:B.value,"onUpdate:value":o[3]||(o[3]=m=>B.value=m),placeholder:"请输入游戏显示比例"},null,8,["readonly","value"])]),_:1}),y.value.value==="custom"?(M(),Y(ie,{key:0,class:"mt-5",type:"info","show-icon":!1,bordered:!1},{default:a(()=>o[10]||(o[10]=[F("p",null,"参考计算公式:21:9=21%9≈2.3333333",-1)])),_:1})):P("",!0)]),_:1}),t(j,{bordered:!1,title:"游戏显示位置",size:"small"},{default:a(()=>[t(A,{value:D.value,"onUpdate:value":o[4]||(o[4]=m=>D.value=m),size:"large",trigger:"click",options:u(f),onSelect:I},{default:a(()=>[t(O,{block:"",type:D.value.color,dashed:""},{default:a(()=>[l(Q(D.value.label),1)]),_:1},8,["type"])]),_:1},8,["value","options"])]),_:1})]),_:1},8,["title"])]),_:1},8,["show","width"])],64)}}}),tt={class:"autoui-view mb-10"},ut={class:"mt-3"},ot={class:"mb-3 px-4 sm:px-0"},at={class:"mb-3 flex flex-wrap"},nt={class:"flex flex-wrap"},lt={class:"flex flex-wrap"},st=X({__name:"GameBooster",setup(g){const s=C(null),p=h(),r=ee(),E=we();_e();const v=te(()=>({theme:r.isDarkMode?ae:ne})),{message:G,modal:f,notification:K}=ue(["message","modal","notification"],{configProviderProps:v}),d=be(),L=De(),U=re(),b=z(U,n=>n.value),V=se(),S=z(V,n=>n.value),N=ke(),T=C(null),x=async()=>{if(!N.isSupportGameMode.value){f.create({title:"未开启游戏显示布局",type:"warning",preset:"dialog",content:()=>t("p",null,[l("未开启游戏显示布局,请先前往模块设置进行开启~")]),positiveText:"立即前往",negativeText:"取消",onPositiveClick(){E.push({name:"settings",hash:"#gameModeSettings"}).then(()=>{const o=new MutationObserver(()=>{const i=document.getElementById("gameModeSettings");i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),o.disconnect())});o.observe(document.body,{childList:!0,subtree:!0})})}});return}const[n,e]=await W($e());n&&f.create({title:"操作失败",type:"error",preset:"dialog",content:()=>t("p",null,[l("发生异常错误,详细错误请查看日志~")])})},D=async()=>{f.create({title:"获取手机/平板管家",type:"info",preset:"dialog",content:()=>t("div",null,[t("p",null,[l("如果规则无法生效,还需要安装修改版的手机/平板管家才会生效,安装后如出现崩溃等异常,推荐清空管家数据并重启设备再尝试~")]),t("p",null,[l("(Tips:需搭配核心破解并通过MT管理器安装)")]),t("p",null,[l("下载地址:https://caiyun.139.com/m/i?135CeBMHACC6p")])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText("https://caiyun.139.com/m/i?135CeBMHACC6p")},onNegativeClick:()=>{}})},y=()=>{E.push({name:"settings",hash:"#displayModeSettings"}).then(()=>{const n=new MutationObserver(()=>{const e=document.getElementById("displayModeSettings");e&&(e.scrollIntoView({behavior:"smooth",block:"center"}),n.disconnect())});n.observe(document.body,{childList:!0,subtree:!0})})},B=async(n,e)=>{if(!N.isSupportGameMode.value){f.create({title:"未开启游戏显示布局",type:"warning",preset:"dialog",content:()=>t("p",null,[l("未开启游戏显示布局,请先前往模块设置进行开启~")]),positiveText:"立即前往",negativeText:"取消",onPositiveClick(){E.push({name:"settings",hash:"#gameModeSettings"}).then(()=>{const o=new MutationObserver(()=>{const i=document.getElementById("gameModeSettings");i&&(i.scrollIntoView({behavior:"smooth",block:"center"}),o.disconnect())});o.observe(document.body,{childList:!0,subtree:!0})})}});return}if(T.value){const[o,i]=await W(T.value.openDrawer({appName:n.app_name,packageName:n.package_name,gameRatio:n.game_ratio,gameGravity:n.game_gravity}));if(o)console.log("操作取消:",o);else if(i){d.loading=!0;const[w,R]=await W(he(i.packageName,i.gameRatio,i.gameGravity));w&&(f.create({title:"更新设置失败",type:"error",preset:"dialog",content:()=>t("p",null,[l("发生异常错误,更新失败了QwQ,详细错误请查看错误日志~")])}),d.loading=!1),R&&(d.loading=!1,f.create({title:"更新设置成功",type:"success",preset:"dialog",content:()=>t("p",null,[l("好耶w,已经成功配置")," ",t("span",{class:`font-bold ${r.isDarkMode?"text-teal-400":"text-gray-600"}`},[i.appName])," ",l("的游戏显示布局了OwO~实际生效还需要重启")," ",t("span",{class:`font-bold ${r.isDarkMode?"text-teal-400":"text-gray-600"}`},[i.appName])," ",l("和")," ",t("span",{class:`font-bold ${r.isDarkMode?"text-teal-400":"text-gray-600"}`},[l("平板/手机管家")])," ",l("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){We(n.package_name).then(async O=>{await d.initDefault(),f.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>t("p",null,[l("已经成功为你重启对应的作用域,请查看是否生效~")])})}).catch(O=>{f.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>t("p",null,[l("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}}))}}},$=async()=>{await d.initDefault()},I=Te({page:1,pageSize:10,simple:!0,showSizePicker:!0,onChange:n=>{I.page=n},onUpdatePageSize:n=>{I.pageSize=n,I.page=1}});function h(){return[{title:"游戏名称",minWidth:250,key:"name",render(n,e){return t("div",null,[n.app_name&&t("p",null,[n.app_name]),n.app_name&&t("p",null,[t("span",{class:{hidden:!n.app_name}},[l("(")]),n.package_name,t("span",{class:{hidden:!n.app_name}},[l(")")])])])}},{title:"游戏显示比例",minWidth:150,key:"game_ratio",render(n,e){return b[n.game_ratio]&&b[n.game_ratio].label?t(c("n-tag"),{dashed:!0,type:b[n.game_ratio].type,color:b[n.game_ratio].color},{default:()=>[b[n.game_ratio].label]}):t(c("n-tag"),{dashed:!0,color:{color:"rgba(155, 89, 182, 0.1)",borderColor:"rgba(155, 89, 182, 0.3)",textColor:"#9b59b6"}},{default:()=>[l("自定义")]})}},{title:"游戏显示位置",minWidth:150,key:"game_gravity",render(n,e){return t(c("n-tag"),{dashed:!0,type:S[n.game_gravity].color},{default:()=>[S[n.game_gravity].label]})}},{title:"操作",minWidth:100,key:"setting",render(n,e){const o={icon:Ye};return t(c("n-button"),{onClick:()=>B(n),size:"small",strong:!0,dashed:!0,type:"info"},{default:()=>[l("管理")],...o})}}]}return(n,e)=>{const o=c("n-alert"),i=c("n-dropdown"),w=c("n-input-group"),R=c("n-card"),O=c("n-data-table");return M(),H(oe,null,[F("main",tt,[F("div",ut,[F("div",ot,[e[10]||(e[10]=F("h3",{class:Z("text-base font-semibold leading-7")},[F("span",{class:"animated-bg bg-clip-text font-semibold text-transparent",style:{"background-image":`linear-gradient(\r 101.22deg,\r rgb(255, 182, 133) -18.32%,\r rgb(255, 111, 29) 7.01%,\r diff --git a/module_src/webroot/assets/GameTurboConfig-B12askhf.js b/module_src/webroot/assets/GameTurboConfig-CQo6LjY6.js similarity index 96% rename from module_src/webroot/assets/GameTurboConfig-B12askhf.js rename to module_src/webroot/assets/GameTurboConfig-CQo6LjY6.js index d8468eaf..51ede885 100644 --- a/module_src/webroot/assets/GameTurboConfig-B12askhf.js +++ b/module_src/webroot/assets/GameTurboConfig-CQo6LjY6.js @@ -1 +1 @@ -import{ag as _,ah as f,d as x,A as b,h,i as v,j as y,o as k,k as w,g as t,n as m,l as u,m as a,b as r,e as g,f as C,s as d,y as M,z as P}from"./index-DriQcjjf.js";async function D(n){return _(new Promise(async(o,i)=>{{const{errno:l,stdout:s,stderr:e}=await f(`/data/adb/modules/MIUI_MagicWindow+/common/utils/sq ${n}`);l?i(e):o(s)}}),`sq ${n}`)}const S={class:"game-turbo-config"},T={class:"mt-5"},$={class:"px-4 sm:px-0"},q={class:"flex"},B=x({__name:"GameTurboConfig",setup(n){b();const o=h(),i=v(()=>({theme:o.isDarkMode?M:P}));y(["message"],{configProviderProps:i});function l(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/'/g,"\\'")}return k(()=>{D(l('@teg_config | .rules | .rule_content | sort_by(.rule_version-) | where(.rule_module == "booster_config") | .[0]')).then(s=>{console.log(s,"res")},s=>{console.log(s,"err")})}),(s,e)=>{const c=g("n-button"),p=g("n-card");return C(),w("div",S,[t("div",T,[t("div",$,[t("h3",{class:m(`text-base font-semibold leading-7 ${u(o).isDarkMode?"text-white":"text-gray-900"}`)}," 游戏云控配置 ",2),t("p",{class:m(`mt-1 max-w-2xl text-sm leading-6 ${u(o).isDarkMode?"text-gray-300":"text-gray-500"}`)}," 在这里可以查看小米的部分云控节点配置 ",2)]),a(p,{bordered:!0,class:"mt-3",size:"small"},{default:r(()=>[t("div",q,[a(c,{class:"mr-3",type:"info"},{default:r(()=>e[0]||(e[0]=[d("测试按钮1")])),_:1}),a(c,{class:"mr-3",type:"error"},{default:r(()=>e[1]||(e[1]=[d("测试按钮2")])),_:1}),a(c,{class:"mr-3",type:"success"},{default:r(()=>e[2]||(e[2]=[d("测试按钮3")])),_:1})]),e[3]||(e[3]=t("div",null,null,-1))]),_:1})])])}}});export{B as default}; +import{ag as _,ah as f,d as x,A as b,h,i as v,j as y,o as k,k as w,g as t,n as m,l as u,m as a,b as r,e as g,f as C,s as d,y as M,z as P}from"./index-DylCICe-.js";async function D(n){return _(new Promise(async(o,i)=>{{const{errno:l,stdout:s,stderr:e}=await f(`/data/adb/modules/MIUI_MagicWindow+/common/utils/sq ${n}`);l?i(e):o(s)}}),`sq ${n}`)}const S={class:"game-turbo-config"},T={class:"mt-5"},$={class:"px-4 sm:px-0"},q={class:"flex"},B=x({__name:"GameTurboConfig",setup(n){b();const o=h(),i=v(()=>({theme:o.isDarkMode?M:P}));y(["message"],{configProviderProps:i});function l(s){return s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/'/g,"\\'")}return k(()=>{D(l('@teg_config | .rules | .rule_content | sort_by(.rule_version-) | where(.rule_module == "booster_config") | .[0]')).then(s=>{console.log(s,"res")},s=>{console.log(s,"err")})}),(s,e)=>{const c=g("n-button"),p=g("n-card");return C(),w("div",S,[t("div",T,[t("div",$,[t("h3",{class:m(`text-base font-semibold leading-7 ${u(o).isDarkMode?"text-white":"text-gray-900"}`)}," 游戏云控配置 ",2),t("p",{class:m(`mt-1 max-w-2xl text-sm leading-6 ${u(o).isDarkMode?"text-gray-300":"text-gray-500"}`)}," 在这里可以查看小米的部分云控节点配置 ",2)]),a(p,{bordered:!0,class:"mt-3",size:"small"},{default:r(()=>[t("div",q,[a(c,{class:"mr-3",type:"info"},{default:r(()=>e[0]||(e[0]=[d("测试按钮1")])),_:1}),a(c,{class:"mr-3",type:"error"},{default:r(()=>e[1]||(e[1]=[d("测试按钮2")])),_:1}),a(c,{class:"mr-3",type:"success"},{default:r(()=>e[2]||(e[2]=[d("测试按钮3")])),_:1})]),e[3]||(e[3]=t("div",null,null,-1))]),_:1})])])}}});export{B as default}; diff --git a/module_src/webroot/assets/HappyNewYearEgg-Cailm8tl.js b/module_src/webroot/assets/HappyNewYearEgg-BVtnqtKV.js similarity index 97% rename from module_src/webroot/assets/HappyNewYearEgg-Cailm8tl.js rename to module_src/webroot/assets/HappyNewYearEgg-BVtnqtKV.js index 0dec7ded..0055589f 100644 --- a/module_src/webroot/assets/HappyNewYearEgg-Cailm8tl.js +++ b/module_src/webroot/assets/HappyNewYearEgg-BVtnqtKV.js @@ -1 +1 @@ -import{d as p,h as e,i as n,j as o,k as l,aI as c,f as d,y as m,z as r}from"./index-DriQcjjf.js";const i="/images/happy_new_year_banner.jpg",f={class:"mt-5 bg-[#313569]"},E=p({__name:"HappyNewYearEgg",setup(x){const t=e(),a=n(()=>({theme:t.isDarkMode?m:r}));return o(["message","modal","notification"],{configProviderProps:a}),(b,s)=>(d(),l("div",f,s[0]||(s[0]=[c('
年从节换,新岁已至,转眼已经迎来了「2025」年。
「2024年3月31日」,我正式接手「完美横屏应用计划」
至今,新版「完美横屏应用计划」共陪伴了大家「246」天。
诞生了「2907」个提交和「683」个版本。
你们对「完美横屏应用计划」的认可,也是我维护下去的动力!
不管何时何地,「遇见你们都是我最美好的事」,感谢大家的一路相伴。
愿「新年胜旧年」,多喜乐,长安宁。
年年皆胜意,岁岁皆欢愉,祝大家「新年快乐」!
十分感谢所有给「完美横屏应用计划」打赏给予认可的酷友。
最后感谢「柚稚的孩纸」、「Kirara」和「御坂初琴」给我提供了不少的帮助!
「2025年1月1日」 By 做梦书 致辞
年从节换,新岁已至,转眼已经迎来了「2025」年。
「2024年3月31日」,我正式接手「完美横屏应用计划」
至今,新版「完美横屏应用计划」共陪伴了大家「246」天。
诞生了「2907」个提交和「683」个版本。
你们对「完美横屏应用计划」的认可,也是我维护下去的动力!
不管何时何地,「遇见你们都是我最美好的事」,感谢大家的一路相伴。
愿「新年胜旧年」,多喜乐,长安宁。
年年皆胜意,岁岁皆欢愉,祝大家「新年快乐」!
十分感谢所有给「完美横屏应用计划」打赏给予认可的酷友。
最后感谢「柚稚的孩纸」、「Kirara」和「御坂初琴」给我提供了不少的帮助!
「2025年1月1日」 By 做梦书 致辞
{y(st,ce.tmNode)}})]:null,_t.type==="selection"?Ie?null:_t.multiple===!1?m(cD,{key:M,rowKey:st,disabled:ce.tmNode.disabled,onUpdateChecked:()=>{oe(ce.tmNode)}}):m(dD,{key:M,rowKey:st,disabled:ce.tmNode.disabled,onUpdateChecked:(eo,io)=>{O(ce.tmNode,eo,io.shiftKey)}}):_t.type==="expand"?Ie?null:!_t.expandable||!((Ct=_t.expandable)===null||Ct===void 0)&&Ct.call(_t,Qe)?m(m4,{clsPrefix:o,rowData:Qe,expanded:mt,renderExpandIcon:this.renderExpandIcon,onClick:()=>{y(st,null)}}):null:m(uD,{clsPrefix:o,index:Ee,row:Qe,column:_t,isSummary:Ie,mergedTheme:k,renderCell:this.renderCell}))});return he&&Ce&&se&&me.splice(Ce,0,m("td",{colspan:b.length-Ce-se,style:{pointerEvents:"none",visibility:"hidden",height:0}})),m("tr",Object.assign({},Je,{onMouseenter:Ve=>{var Ue;this.hoverKey=st,(Ue=Je==null?void 0:Je.onMouseenter)===null||Ue===void 0||Ue.call(Je,Ve)},key:st,class:[`${o}-data-table-tr`,Ie&&`${o}-data-table-tr--summary`,$e&&`${o}-data-table-tr--striped`,mt&&`${o}-data-table-tr--expanded`,Ne,Je==null?void 0:Je.class],style:[Je==null?void 0:Je.style,he&&{height:ee}]}),me)};return n?m(F6,{ref:"virtualListRef",items:be,itemSize:this.minRowHeight,visibleItemsTag:hD,visibleItemsProps:{clsPrefix:o,id:G,cols:b,onMouseleave:L},showScrollbar:!1,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemsStyle:f,itemResizable:!le,columns:b,renderItemWithCols:le?({itemIndex:ce,item:Q,startColIndex:re,endColIndex:he,getLeft:ne})=>te({displayedRowIndex:ce,isVirtual:!0,isVirtualX:!0,rowInfo:Q,startColIndex:re,endColIndex:he,getLeft:ne}):void 0},{default:({item:ce,index:Q,renderedItemWithCols:re})=>re||te({rowInfo:ce,displayedRowIndex:Q,isVirtual:!0,isVirtualX:!1,startColIndex:0,endColIndex:0,getLeft(he){return 0}})}):m("table",{class:`${o}-data-table-table`,onMouseleave:L,style:{tableLayout:this.mergedTableLayout}},m("colgroup",null,b.map(ce=>m("col",{key:ce.key,style:ce.style}))),this.showHeader?m(eg,{discrete:!1}):null,this.empty?null:m("tbody",{"data-n-id":G,class:`${o}-data-table-tbody`},be.map((ce,Q)=>te({rowInfo:ce,displayedRowIndex:Q,isVirtual:!1,isVirtualX:!1,startColIndex:-1,endColIndex:-1,getLeft(re){return-1}}))))}});if(this.empty){const g=()=>m("div",{class:[`${o}-data-table-empty`,this.loading&&`${o}-data-table-empty--hide`],style:this.bodyStyle,ref:"emptyElRef"},So(this.dataTableSlots.empty,()=>[m(U6,{theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]));return this.shouldDisplaySomeTablePart?m(ft,null,p,g()):m(Rn,{onResize:this.onResize},{default:g})}return p}}),mD=ye({name:"MainTable",setup(){const{mergedClsPrefixRef:e,rightFixedColumnsRef:t,leftFixedColumnsRef:o,bodyWidthRef:n,maxHeightRef:r,minHeightRef:i,flexHeightRef:a,virtualScrollHeaderRef:l,syncScrollState:s}=He(Tn),u=A(null),d=A(null),c=A(null),h=A(!(o.value.length||t.value.length)),f=D(()=>({maxHeight:Fo(r.value),minHeight:Fo(i.value)}));function p(C){n.value=C.contentRect.width,s(),h.value||(h.value=!0)}function g(){var C;const{value:k}=u;return k?l.value?((C=k.virtualListRef)===null||C===void 0?void 0:C.listElRef)||null:k.$el:null}function v(){const{value:C}=d;return C?C.getScrollContainer():null}const b={getBodyElement:v,getHeaderElement:g,scrollTo(C,k){var w;(w=d.value)===null||w===void 0||w.scrollTo(C,k)}};return kt(()=>{const{value:C}=c;if(!C)return;const k=`${e.value}-data-table-base-table--transition-disabled`;h.value?setTimeout(()=>{C.classList.remove(k)},0):C.classList.add(k)}),Object.assign({maxHeight:r,mergedClsPrefix:e,selfElRef:c,headerInstRef:u,bodyInstRef:d,bodyStyle:f,flexHeight:a,handleBodyResize:p},b)},render(){const{mergedClsPrefix:e,maxHeight:t,flexHeight:o}=this,n=t===void 0&&!o;return m("div",{class:`${e}-data-table-base-table`,ref:"selfElRef"},n?null:m(eg,{ref:"headerInstRef"}),m(pD,{ref:"bodyInstRef",bodyStyle:this.bodyStyle,showHeader:n,flexHeight:o,onResize:this.handleBodyResize}))}});function gD(e,t){const{paginatedDataRef:o,treeMateRef:n,selectionColumnRef:r}=t,i=A(e.defaultCheckedRowKeys),a=D(()=>{var _;const{checkedRowKeys:M}=e,E=M===void 0?i.value:M;return((_=r.value)===null||_===void 0?void 0:_.multiple)===!1?{checkedKeys:E.slice(0,1),indeterminateKeys:[]}:n.value.getCheckedKeys(E,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})}),l=D(()=>a.value.checkedKeys),s=D(()=>a.value.indeterminateKeys),u=D(()=>new Set(l.value)),d=D(()=>new Set(s.value)),c=D(()=>{const{value:_}=u;return o.value.reduce((M,E)=>{const{key:P,disabled:z}=E;return M+(!z&&_.has(P)?1:0)},0)}),h=D(()=>o.value.filter(_=>_.disabled).length),f=D(()=>{const{length:_}=o.value,{value:M}=d;return c.value>0&&c.value<_-h.value||o.value.some(E=>M.has(E.key))}),p=D(()=>{const{length:_}=o.value;return c.value!==0&&c.value===_-h.value}),g=D(()=>o.value.length===0);function v(_,M,E){const{"onUpdate:checkedRowKeys":P,onUpdateCheckedRowKeys:z,onCheckedRowKeysChange:$}=e,G=[],{value:{getNode:H}}=n;_.forEach(q=>{var W;const L=(W=H(q))===null||W===void 0?void 0:W.rawNode;G.push(L)}),P&&Ae(P,_,G,{row:M,action:E}),z&&Ae(z,_,G,{row:M,action:E}),$&&Ae($,_,G,{row:M,action:E}),i.value=_}function b(_,M=!1,E){if(!e.loading){if(M){v(Array.isArray(_)?_.slice(0,1):[_],E,"check");return}v(n.value.check(_,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,E,"check")}}function C(_,M){e.loading||v(n.value.uncheck(_,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,M,"uncheck")}function k(_=!1){const{value:M}=r;if(!M||e.loading)return;const E=[];(_?n.value.treeNodes:o.value).forEach(P=>{P.disabled||E.push(P.key)}),v(n.value.check(E,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"checkAll")}function w(_=!1){const{value:M}=r;if(!M||e.loading)return;const E=[];(_?n.value.treeNodes:o.value).forEach(P=>{P.disabled||E.push(P.key)}),v(n.value.uncheck(E,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"uncheckAll")}return{mergedCheckedRowKeySetRef:u,mergedCheckedRowKeysRef:l,mergedInderminateRowKeySetRef:d,someRowsCheckedRef:f,allRowsCheckedRef:p,headerCheckboxDisabledRef:g,doUpdateCheckedRowKeys:v,doCheckAll:k,doUncheckAll:w,doCheck:b,doUncheck:C}}function xu(e){return typeof e=="object"&&typeof e.multiple=="number"?e.multiple:!1}function vD(e,t){return t&&(e===void 0||e==="default"||typeof e=="object"&&e.compare==="default")?bD(t):typeof e=="function"?e:e&&typeof e=="object"&&e.compare&&e.compare!=="default"?e.compare:!1}function bD(e){return(t,o)=>{const n=t[e],r=o[e];return n==null?r==null?0:-1:r==null?1:typeof n=="number"&&typeof r=="number"?n-r:typeof n=="string"&&typeof r=="string"?n.localeCompare(r):0}}function xD(e,{dataRelatedColsRef:t,filteredDataRef:o}){const n=[];t.value.forEach(f=>{var p;f.sorter!==void 0&&h(n,{columnKey:f.key,sorter:f.sorter,order:(p=f.defaultSortOrder)!==null&&p!==void 0?p:!1})});const r=A(n),i=D(()=>{const f=t.value.filter(v=>v.type!=="selection"&&v.sorter!==void 0&&(v.sortOrder==="ascend"||v.sortOrder==="descend"||v.sortOrder===!1)),p=f.filter(v=>v.sortOrder!==!1);if(p.length)return p.map(v=>({columnKey:v.key,order:v.sortOrder,sorter:v.sorter}));if(f.length)return[];const{value:g}=r;return Array.isArray(g)?g:g?[g]:[]}),a=D(()=>{const f=i.value.slice().sort((p,g)=>{const v=xu(p.sorter)||0;return(xu(g.sorter)||0)-v});return f.length?o.value.slice().sort((g,v)=>{let b=0;return f.some(C=>{const{columnKey:k,sorter:w,order:_}=C,M=vD(w,k);return M&&_&&(b=M(g.rawNode,v.rawNode),b!==0)?(b=b*D$(_),!0):!1}),b}):o.value});function l(f){let p=i.value.slice();return f&&xu(f.sorter)!==!1?(p=p.filter(g=>xu(g.sorter)!==!1),h(p,f),p):f||null}function s(f){const p=l(f);u(p)}function u(f){const{"onUpdate:sorter":p,onUpdateSorter:g,onSorterChange:v}=e;p&&Ae(p,f),g&&Ae(g,f),v&&Ae(v,f),r.value=f}function d(f,p="ascend"){if(!f)c();else{const g=t.value.find(b=>b.type!=="selection"&&b.type!=="expand"&&b.key===f);if(!(g!=null&&g.sorter))return;const v=g.sorter;s({columnKey:f,sorter:v,order:p})}}function c(){u(null)}function h(f,p){const g=f.findIndex(v=>(p==null?void 0:p.columnKey)&&v.columnKey===p.columnKey);g!==void 0&&g>=0?f[g]=p:f.push(p)}return{clearSorter:c,sort:d,sortedDataRef:a,mergedSortStateRef:i,deriveNextSorter:s}}function yD(e,{dataRelatedColsRef:t}){const o=D(()=>{const j=X=>{for(let le=0;le{const{childrenKey:j}=e;return Ud(e.data,{ignoreEmptyChildren:!0,getKey:e.rowKey,getChildren:X=>X[j],getDisabled:X=>{var le,ae;return!!(!((ae=(le=o.value)===null||le===void 0?void 0:le.disabled)===null||ae===void 0)&&ae.call(le,X))}})}),r=bt(()=>{const{columns:j}=e,{length:X}=j;let le=null;for(let ae=0;ae {const j=t.value.filter(ae=>ae.filterOptionValues!==void 0||ae.filterOptionValue!==void 0),X={};return j.forEach(ae=>{var Fe;ae.type==="selection"||ae.type==="expand"||(ae.filterOptionValues===void 0?X[ae.key]=(Fe=ae.filterOptionValue)!==null&&Fe!==void 0?Fe:null:X[ae.key]=ae.filterOptionValues)}),Object.assign(c4(i.value),X)}),d=D(()=>{const j=u.value,{columns:X}=e;function le(fe){return(ue,we)=>!!~String(we[fe]).indexOf(String(ue))}const{value:{treeNodes:ae}}=n,Fe=[];return X.forEach(fe=>{fe.type==="selection"||fe.type==="expand"||"children"in fe||Fe.push([fe.key,fe])}),ae?ae.filter(fe=>{const{rawNode:ue}=fe;for(const[we,ie]of Fe){let be=j[we];if(be==null||(Array.isArray(be)||(be=[be]),!be.length))continue;const ze=ie.filter==="default"?le(we):ie.filter;if(ie&&typeof ze=="function")if(ie.filterMode==="and"){if(be.some(pe=>!ze(pe,ue)))return!1}else{if(be.some(pe=>ze(pe,ue)))continue;return!1}}return!0}):[]}),{sortedDataRef:c,deriveNextSorter:h,mergedSortStateRef:f,sort:p,clearSorter:g}=xD(e,{dataRelatedColsRef:t,filteredDataRef:d});t.value.forEach(j=>{var X;if(j.filter){const le=j.defaultFilterOptionValues;j.filterMultiple?i.value[j.key]=le||[]:le!==void 0?i.value[j.key]=le===null?[]:le:i.value[j.key]=(X=j.defaultFilterOptionValue)!==null&&X!==void 0?X:null}});const v=D(()=>{const{pagination:j}=e;if(j!==!1)return j.page}),b=D(()=>{const{pagination:j}=e;if(j!==!1)return j.pageSize}),C=ro(v,l),k=ro(b,s),w=bt(()=>{const j=C.value;return e.remote?j:Math.max(1,Math.min(Math.ceil(d.value.length/k.value),j))}),_=D(()=>{const{pagination:j}=e;if(j){const{pageCount:X}=j;if(X!==void 0)return X}}),M=D(()=>{if(e.remote)return n.value.treeNodes;if(!e.pagination)return c.value;const j=k.value,X=(w.value-1)*j;return c.value.slice(X,X+j)}),E=D(()=>M.value.map(j=>j.rawNode));function P(j){const{pagination:X}=e;if(X){const{onChange:le,"onUpdate:page":ae,onUpdatePage:Fe}=X;le&&Ae(le,j),Fe&&Ae(Fe,j),ae&&Ae(ae,j),H(j)}}function z(j){const{pagination:X}=e;if(X){const{onPageSizeChange:le,"onUpdate:pageSize":ae,onUpdatePageSize:Fe}=X;le&&Ae(le,j),Fe&&Ae(Fe,j),ae&&Ae(ae,j),q(j)}}const $=D(()=>{if(e.remote){const{pagination:j}=e;if(j){const{itemCount:X}=j;if(X!==void 0)return X}return}return d.value.length}),G=D(()=>Object.assign(Object.assign({},e.pagination),{onChange:void 0,onUpdatePage:void 0,onUpdatePageSize:void 0,onPageSizeChange:void 0,"onUpdate:page":P,"onUpdate:pageSize":z,page:w.value,pageSize:k.value,pageCount:$.value===void 0?_.value:void 0,itemCount:$.value}));function H(j){const{"onUpdate:page":X,onPageChange:le,onUpdatePage:ae}=e;ae&&Ae(ae,j),X&&Ae(X,j),le&&Ae(le,j),l.value=j}function q(j){const{"onUpdate:pageSize":X,onPageSizeChange:le,onUpdatePageSize:ae}=e;le&&Ae(le,j),ae&&Ae(ae,j),X&&Ae(X,j),s.value=j}function W(j,X){const{onUpdateFilters:le,"onUpdate:filters":ae,onFiltersChange:Fe}=e;le&&Ae(le,j,X),ae&&Ae(ae,j,X),Fe&&Ae(Fe,j,X),i.value=j}function L(j,X,le,ae){var Fe;(Fe=e.onUnstableColumnResize)===null||Fe===void 0||Fe.call(e,j,X,le,ae)}function I(j){H(j)}function R(){O()}function O(){oe({})}function oe(j){y(j)}function y(j){j?j&&(i.value=c4(j)):i.value={}}return{treeMateRef:n,mergedCurrentPageRef:w,mergedPaginationRef:G,paginatedDataRef:M,rawPaginatedDataRef:E,mergedFilterStateRef:u,mergedSortStateRef:f,hoverKeyRef:A(null),selectionColumnRef:o,childTriggerColIndexRef:r,doUpdateFilters:W,deriveNextSorter:h,doUpdatePageSize:q,doUpdatePage:H,onUnstableColumnResize:L,filter:y,filters:oe,clearFilter:R,clearFilters:O,clearSorter:g,page:I,sort:p}}function CD(e,{mainTableInstRef:t,mergedCurrentPageRef:o,bodyWidthRef:n}){let r=0;const i=A(),a=A(null),l=A([]),s=A(null),u=A([]),d=D(()=>Fo(e.scrollX)),c=D(()=>e.columns.filter(z=>z.fixed==="left")),h=D(()=>e.columns.filter(z=>z.fixed==="right")),f=D(()=>{const z={};let $=0;function G(H){H.forEach(q=>{const W={start:$,end:0};z[En(q)]=W,"children"in q?(G(q.children),W.end=$):($+=d4(q)||0,W.end=$)})}return G(c.value),z}),p=D(()=>{const z={};let $=0;function G(H){for(let q=H.length-1;q>=0;--q){const W=H[q],L={start:$,end:0};z[En(W)]=L,"children"in W?(G(W.children),L.end=$):($+=d4(W)||0,L.end=$)}}return G(h.value),z});function g(){var z,$;const{value:G}=c;let H=0;const{value:q}=f;let W=null;for(let L=0;L (((z=q[I])===null||z===void 0?void 0:z.start)||0)-H)W=I,H=(($=q[I])===null||$===void 0?void 0:$.end)||0;else break}a.value=W}function v(){l.value=[];let z=e.columns.find($=>En($)===a.value);for(;z&&"children"in z;){const $=z.children.length;if($===0)break;const G=z.children[$-1];l.value.push(En(G)),z=G}}function b(){var z,$;const{value:G}=h,H=Number(e.scrollX),{value:q}=n;if(q===null)return;let W=0,L=null;const{value:I}=p;for(let R=G.length-1;R>=0;--R){const O=En(G[R]);if(Math.round(r+(((z=I[O])===null||z===void 0?void 0:z.start)||0)+q-W) En($)===s.value);for(;z&&"children"in z&&z.children.length;){const $=z.children[0];u.value.push(En($)),z=$}}function k(){const z=t.value?t.value.getHeaderElement():null,$=t.value?t.value.getBodyElement():null;return{header:z,body:$}}function w(){const{body:z}=k();z&&(z.scrollTop=0)}function _(){i.value!=="body"?os(E):i.value=void 0}function M(z){var $;($=e.onScroll)===null||$===void 0||$.call(e,z),i.value!=="head"?os(E):i.value=void 0}function E(){const{header:z,body:$}=k();if(!$)return;const{value:G}=n;if(G!==null){if(e.maxHeight||e.flexHeight){if(!z)return;const H=r-z.scrollLeft;i.value=H!==0?"head":"body",i.value==="head"?(r=z.scrollLeft,$.scrollLeft=r):(r=$.scrollLeft,z.scrollLeft=r)}else r=$.scrollLeft;g(),v(),b(),C()}}function P(z){const{header:$}=k();$&&($.scrollLeft=z,E())}return lt(o,()=>{w()}),{styleScrollXRef:d,fixedColumnLeftMapRef:f,fixedColumnRightMapRef:p,leftFixedColumnsRef:c,rightFixedColumnsRef:h,leftActiveFixedColKeyRef:a,leftActiveFixedChildrenColKeysRef:l,rightActiveFixedColKeyRef:s,rightActiveFixedChildrenColKeysRef:u,syncScrollState:E,handleTableBodyScroll:M,handleTableHeaderScroll:_,setHeaderScrollLeft:P}}function wD(){const e=A({});function t(r){return e.value[r]}function o(r,i){Wm(r)&&"key"in r&&(e.value[r.key]=i)}function n(){e.value={}}return{getResizableWidth:t,doUpdateResizableWidth:o,clearResizableWidth:n}}function SD(e,t){const o=[],n=[],r=[],i=new WeakMap;let a=-1,l=0,s=!1;function u(h,f){f>a&&(o[f]=[],a=f),h.forEach((p,g)=>{if("children"in p)u(p.children,f+1);else{const v="key"in p?p.key:void 0;n.push({key:En(p),style:I$(p,v!==void 0?Fo(t(v)):void 0),column:p,index:g,width:p.width===void 0?128:Number(p.width)}),l+=1,s||(s=!!p.ellipsis),r.push(p)}})}u(e,0);let d=0;function c(h,f){let p=0;h.forEach(g=>{var v;if("children"in g){const b=d,C={column:g,colIndex:d,colSpan:0,rowSpan:1,isLast:!1};c(g.children,f+1),g.children.forEach(k=>{var w,_;C.colSpan+=(_=(w=i.get(k))===null||w===void 0?void 0:w.colSpan)!==null&&_!==void 0?_:0}),b+C.colSpan===l&&(C.isLast=!0),i.set(g,C),o[f].push(C)}else{if(d 1&&(p=d+b);const C=d+b===l,k={column:g,colSpan:b,colIndex:d,rowSpan:a-f+1,isLast:C};i.set(g,k),o[f].push(k),d+=1}})}return c(e,0),{hasEllipsis:s,rows:o,cols:n,dataRelatedCols:r}}function FD(e,t){const o=D(()=>SD(e.columns,t));return{rowsRef:D(()=>o.value.rows),colsRef:D(()=>o.value.cols),hasEllipsisRef:D(()=>o.value.hasEllipsis),dataRelatedColsRef:D(()=>o.value.dataRelatedCols)}}function ED(e,t){const o=bt(()=>{for(const u of e.columns)if(u.type==="expand")return u.renderExpand}),n=bt(()=>{let u;for(const d of e.columns)if(d.type==="expand"){u=d.expandable;break}return u}),r=A(e.defaultExpandAll?o!=null&&o.value?(()=>{const u=[];return t.value.treeNodes.forEach(d=>{var c;!((c=n.value)===null||c===void 0)&&c.call(n,d.rawNode)&&u.push(d.key)}),u})():t.value.getNonLeafKeys():e.defaultExpandedRowKeys),i=Te(e,"expandedRowKeys"),a=Te(e,"stickyExpandedRows"),l=ro(i,r);function s(u){const{onUpdateExpandedRowKeys:d,"onUpdate:expandedRowKeys":c}=e;d&&Ae(d,u),c&&Ae(c,u),r.value=u}return{stickyExpandedRowsRef:a,mergedExpandedRowKeysRef:l,renderExpandRef:o,expandableRef:n,doUpdateExpandedRowKeys:s}}const g4=_D(),kD=V([B("data-table",` + `)])]),oD={animated:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},size:{type:String,default:"medium"},inverted:Boolean,placement:{type:String,default:"bottom"},onSelect:[Function,Array],options:{type:Array,default:()=>[]},menuProps:Function,showArrow:Boolean,renderLabel:Function,renderIcon:Function,renderOption:Function,nodeProps:Function,labelField:{type:String,default:"label"},keyField:{type:String,default:"key"},childrenField:{type:String,default:"children"},value:[String,Number]},nD=Object.keys(Ia),rD=Object.assign(Object.assign(Object.assign({},Ia),oD),Le.props),Ym=ye({name:"Dropdown",inheritAttrs:!1,props:rD,setup(e){const t=A(!1),o=ro(Te(e,"show"),t),n=D(()=>{const{keyField:H,childrenField:q}=e;return Ud(e.options,{getKey(W){return W[H]},getDisabled(W){return W.disabled===!0},getIgnored(W){return W.type==="divider"||W.type==="render"},getChildren(W){return W[q]}})}),r=D(()=>n.value.treeNodes),i=A(null),a=A(null),l=A(null),s=D(()=>{var H,q,W;return(W=(q=(H=i.value)!==null&&H!==void 0?H:a.value)!==null&&q!==void 0?q:l.value)!==null&&W!==void 0?W:null}),u=D(()=>n.value.getPath(s.value).keyPath),d=D(()=>n.value.getPath(e.value).keyPath),c=bt(()=>e.keyboard&&o.value);Cw({keydown:{ArrowUp:{prevent:!0,handler:_},ArrowRight:{prevent:!0,handler:w},ArrowDown:{prevent:!0,handler:M},ArrowLeft:{prevent:!0,handler:k},Enter:{prevent:!0,handler:E},Escape:C}},c);const{mergedClsPrefixRef:h,inlineThemeDisabled:f}=it(e),p=Le("Dropdown","-dropdown",tD,Qd,e,h);tt(Jd,{labelFieldRef:Te(e,"labelField"),childrenFieldRef:Te(e,"childrenField"),renderLabelRef:Te(e,"renderLabel"),renderIconRef:Te(e,"renderIcon"),hoverKeyRef:i,keyboardKeyRef:a,lastToggledSubmenuKeyRef:l,pendingKeyPathRef:u,activeKeyPathRef:d,animatedRef:Te(e,"animated"),mergedShowRef:o,nodePropsRef:Te(e,"nodeProps"),renderOptionRef:Te(e,"renderOption"),menuPropsRef:Te(e,"menuProps"),doSelect:g,doUpdateShow:v}),lt(o,H=>{!e.animated&&!H&&b()});function g(H,q){const{onSelect:W}=e;W&&Ae(W,H,q)}function v(H){const{"onUpdate:show":q,onUpdateShow:W}=e;q&&Ae(q,H),W&&Ae(W,H),t.value=H}function b(){i.value=null,a.value=null,l.value=null}function C(){v(!1)}function k(){z("left")}function w(){z("right")}function _(){z("up")}function M(){z("down")}function E(){const H=P();H!=null&&H.isLeaf&&o.value&&(g(H.key,H.rawNode),v(!1))}function P(){var H;const{value:q}=n,{value:W}=s;return!q||W===null?null:(H=q.getNode(W))!==null&&H!==void 0?H:null}function z(H){const{value:q}=s,{value:{getFirstAvailableNode:W}}=n;let L=null;if(q===null){const I=W();I!==null&&(L=I.key)}else{const I=P();if(I){let R;switch(H){case"down":R=I.getNext();break;case"up":R=I.getPrev();break;case"right":R=I.getChild();break;case"left":R=I.getParent();break}R&&(L=R.key)}}L!==null&&(i.value=null,a.value=L)}const $=D(()=>{const{size:H,inverted:q}=e,{common:{cubicBezierEaseInOut:W},self:L}=p.value,{padding:I,dividerColor:R,borderRadius:O,optionOpacityDisabled:oe,[_e("optionIconSuffixWidth",H)]:y,[_e("optionSuffixWidth",H)]:j,[_e("optionIconPrefixWidth",H)]:X,[_e("optionPrefixWidth",H)]:le,[_e("fontSize",H)]:ae,[_e("optionHeight",H)]:Fe,[_e("optionIconSize",H)]:fe}=L,ue={"--n-bezier":W,"--n-font-size":ae,"--n-padding":I,"--n-border-radius":O,"--n-option-height":Fe,"--n-option-prefix-width":le,"--n-option-icon-prefix-width":X,"--n-option-suffix-width":j,"--n-option-icon-suffix-width":y,"--n-option-icon-size":fe,"--n-divider-color":R,"--n-option-opacity-disabled":oe};return q?(ue["--n-color"]=L.colorInverted,ue["--n-option-color-hover"]=L.optionColorHoverInverted,ue["--n-option-color-active"]=L.optionColorActiveInverted,ue["--n-option-text-color"]=L.optionTextColorInverted,ue["--n-option-text-color-hover"]=L.optionTextColorHoverInverted,ue["--n-option-text-color-active"]=L.optionTextColorActiveInverted,ue["--n-option-text-color-child-active"]=L.optionTextColorChildActiveInverted,ue["--n-prefix-color"]=L.prefixColorInverted,ue["--n-suffix-color"]=L.suffixColorInverted,ue["--n-group-header-text-color"]=L.groupHeaderTextColorInverted):(ue["--n-color"]=L.color,ue["--n-option-color-hover"]=L.optionColorHover,ue["--n-option-color-active"]=L.optionColorActive,ue["--n-option-text-color"]=L.optionTextColor,ue["--n-option-text-color-hover"]=L.optionTextColorHover,ue["--n-option-text-color-active"]=L.optionTextColorActive,ue["--n-option-text-color-child-active"]=L.optionTextColorChildActive,ue["--n-prefix-color"]=L.prefixColor,ue["--n-suffix-color"]=L.suffixColor,ue["--n-group-header-text-color"]=L.groupHeaderTextColor),ue}),G=f?vt("dropdown",D(()=>`${e.size[0]}${e.inverted?"i":""}`),$,e):void 0;return{mergedClsPrefix:h,mergedTheme:p,tmNodes:r,mergedShow:o,handleAfterLeave:()=>{e.animated&&b()},doUpdateShow:v,cssVars:f?void 0:$,themeClass:G==null?void 0:G.themeClass,onRender:G==null?void 0:G.onRender}},render(){const e=(n,r,i,a,l)=>{var s;const{mergedClsPrefix:u,menuProps:d}=this;(s=this.onRender)===null||s===void 0||s.call(this);const c=(d==null?void 0:d(void 0,this.tmNodes.map(f=>f.rawNode)))||{},h={ref:Pp(r),class:[n,`${u}-dropdown`,this.themeClass],clsPrefix:u,tmNodes:this.tmNodes,style:[...i,this.cssVars],showArrow:this.showArrow,arrowStyle:this.arrowStyle,scrollable:this.scrollable,onMouseenter:a,onMouseleave:l};return m(Xm,mo(this.$attrs,h,c))},{mergedTheme:t}=this,o={show:this.mergedShow,theme:t.peers.Popover,themeOverrides:t.peerOverrides.Popover,internalOnAfterLeave:this.handleAfterLeave,internalRenderBody:e,onUpdateShow:this.doUpdateShow,"onUpdate:show":void 0};return m(Xa,Object.assign({},ti(this.$props,nD),o),{trigger:()=>{var n,r;return(r=(n=this.$slots).default)===null||r===void 0?void 0:r.call(n)}})}}),Qm="_n_all__",Jm="_n_none__";function iD(e,t,o,n){return e?r=>{for(const i of e)switch(r){case Qm:o(!0);return;case Jm:n(!0);return;default:if(typeof i=="object"&&i.key===r){i.onSelect(t.value);return}}}:()=>{}}function aD(e,t){return e?e.map(o=>{switch(o){case"all":return{label:t.checkTableAll,key:Qm};case"none":return{label:t.uncheckTableAll,key:Jm};default:return o}}):[]}const lD=ye({name:"DataTableSelectionMenu",props:{clsPrefix:{type:String,required:!0}},setup(e){const{props:t,localeRef:o,checkOptionsRef:n,rawPaginatedDataRef:r,doCheckAll:i,doUncheckAll:a}=He(Tn),l=D(()=>iD(n.value,r,i,a)),s=D(()=>aD(n.value,o.value));return()=>{var u,d,c,h;const{clsPrefix:f}=e;return m(Ym,{theme:(d=(u=t.theme)===null||u===void 0?void 0:u.peers)===null||d===void 0?void 0:d.Dropdown,themeOverrides:(h=(c=t.themeOverrides)===null||c===void 0?void 0:c.peers)===null||h===void 0?void 0:h.Dropdown,options:s.value,onSelect:l.value},{default:()=>m(Xt,{clsPrefix:f,class:`${f}-data-table-check-extra`},{default:()=>m(m7,null)})})}}});function a0(e){return typeof e.title=="function"?e.title(e):e.title}const sD=ye({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},width:String},render(){const{clsPrefix:e,id:t,cols:o,width:n}=this;return m("table",{style:{tableLayout:"fixed",width:n},class:`${e}-data-table-table`},m("colgroup",null,o.map(r=>m("col",{key:r.key,style:r.style}))),m("thead",{"data-n-id":t,class:`${e}-data-table-thead`},this.$slots))}}),eg=ye({name:"DataTableHeader",props:{discrete:{type:Boolean,default:!0}},setup(){const{mergedClsPrefixRef:e,scrollXRef:t,fixedColumnLeftMapRef:o,fixedColumnRightMapRef:n,mergedCurrentPageRef:r,allRowsCheckedRef:i,someRowsCheckedRef:a,rowsRef:l,colsRef:s,mergedThemeRef:u,checkOptionsRef:d,mergedSortStateRef:c,componentId:h,mergedTableLayoutRef:f,headerCheckboxDisabledRef:p,virtualScrollHeaderRef:g,headerHeightRef:v,onUnstableColumnResize:b,doUpdateResizableWidth:C,handleTableHeaderScroll:k,deriveNextSorter:w,doUncheckAll:_,doCheckAll:M}=He(Tn),E=A(),P=A({});function z(L){const I=P.value[L];return I==null?void 0:I.getBoundingClientRect().width}function $(){i.value?_():M()}function G(L,I){if(Ko(L,"dataTableFilter")||Ko(L,"dataTableResizable")||!i0(I))return;const R=c.value.find(oe=>oe.columnKey===I.key)||null,O=L$(I,R);w(O)}const H=new Map;function q(L){H.set(L.key,z(L.key))}function W(L,I){const R=H.get(L.key);if(R===void 0)return;const O=R+I,oe=T$(O,L.minWidth,L.maxWidth);b(O,oe,L,z),C(L,oe)}return{cellElsRef:P,componentId:h,mergedSortState:c,mergedClsPrefix:e,scrollX:t,fixedColumnLeftMap:o,fixedColumnRightMap:n,currentPage:r,allRowsChecked:i,someRowsChecked:a,rows:l,cols:s,mergedTheme:u,checkOptions:d,mergedTableLayout:f,headerCheckboxDisabled:p,headerHeight:v,virtualScrollHeader:g,virtualListRef:E,handleCheckboxUpdateChecked:$,handleColHeaderClick:G,handleTableHeaderScroll:k,handleColumnResizeStart:q,handleColumnResize:W}},render(){const{cellElsRef:e,mergedClsPrefix:t,fixedColumnLeftMap:o,fixedColumnRightMap:n,currentPage:r,allRowsChecked:i,someRowsChecked:a,rows:l,cols:s,mergedTheme:u,checkOptions:d,componentId:c,discrete:h,mergedTableLayout:f,headerCheckboxDisabled:p,mergedSortState:g,virtualScrollHeader:v,handleColHeaderClick:b,handleCheckboxUpdateChecked:C,handleColumnResizeStart:k,handleColumnResize:w}=this,_=(z,$,G)=>z.map(({column:H,colIndex:q,colSpan:W,rowSpan:L,isLast:I})=>{var R,O;const oe=En(H),{ellipsis:y}=H,j=()=>H.type==="selection"?H.multiple!==!1?m(ft,null,m(qd,{key:r,privateInsideTable:!0,checked:i,indeterminate:a,disabled:p,onUpdateChecked:C}),d?m(lD,{clsPrefix:t}):null):null:m(ft,null,m("div",{class:`${t}-data-table-th__title-wrapper`},m("div",{class:`${t}-data-table-th__title`},y===!0||y&&!y.tooltip?m("div",{class:`${t}-data-table-th__ellipsis`},a0(H)):y&&typeof y=="object"?m(i3,Object.assign({},y,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>a0(H)}):a0(H)),i0(H)?m(_$,{column:H}):null),f4(H)?m(U$,{column:H,options:H.filterOptions}):null,Wm(H)?m(K$,{onResizeStart:()=>{k(H)},onResize:Fe=>{w(H,Fe)}}):null),X=oe in o,le=oe in n,ae=$&&!H.fixed?"div":"th";return m(ae,{ref:Fe=>e[oe]=Fe,key:oe,style:[$&&!H.fixed?{position:"absolute",left:jt($(q)),top:0,bottom:0}:{left:jt((R=o[oe])===null||R===void 0?void 0:R.start),right:jt((O=n[oe])===null||O===void 0?void 0:O.start)},{width:jt(H.width),textAlign:H.titleAlign||H.align,height:G}],colspan:W,rowspan:L,"data-col-key":oe,class:[`${t}-data-table-th`,(X||le)&&`${t}-data-table-th--fixed-${X?"left":"right"}`,{[`${t}-data-table-th--sorting`]:jm(H,g),[`${t}-data-table-th--filterable`]:f4(H),[`${t}-data-table-th--sortable`]:i0(H),[`${t}-data-table-th--selection`]:H.type==="selection",[`${t}-data-table-th--last`]:I},H.className],onClick:H.type!=="selection"&&H.type!=="expand"&&!("children"in H)?Fe=>{b(Fe,H)}:void 0},j())});if(v){const{headerHeight:z}=this;let $=0,G=0;return s.forEach(H=>{H.column.fixed==="left"?$++:H.column.fixed==="right"&&G++}),m(F6,{ref:"virtualListRef",class:`${t}-data-table-base-table-header`,style:{height:jt(z)},onScroll:this.handleTableHeaderScroll,columns:s,itemSize:z,showScrollbar:!1,items:[{}],itemResizable:!1,visibleItemsTag:sD,visibleItemsProps:{clsPrefix:t,id:c,cols:s,width:Fo(this.scrollX)},renderItemWithCols:({startColIndex:H,endColIndex:q,getLeft:W})=>{const L=s.map((R,O)=>({column:R.column,isLast:O===s.length-1,colIndex:R.index,colSpan:1,rowSpan:1})).filter(({column:R},O)=>!!(H<=O&&O<=q||R.fixed)),I=_(L,W,jt(z));return I.splice($,0,m("th",{colspan:s.length-$-G,style:{pointerEvents:"none",visibility:"hidden",height:0}})),m("tr",{style:{position:"relative"}},I)}},{default:({renderedItemWithCols:H})=>H})}const M=m("thead",{class:`${t}-data-table-thead`,"data-n-id":c},l.map(z=>m("tr",{class:`${t}-data-table-tr`},_(z,null,void 0))));if(!h)return M;const{handleTableHeaderScroll:E,scrollX:P}=this;return m("div",{class:`${t}-data-table-base-table-header`,onScroll:E},m("table",{class:`${t}-data-table-table`,style:{minWidth:Fo(P),tableLayout:f}},m("colgroup",null,s.map(z=>m("col",{key:z.key,style:z.style}))),M))}}),uD=ye({name:"DataTableCell",props:{clsPrefix:{type:String,required:!0},row:{type:Object,required:!0},index:{type:Number,required:!0},column:{type:Object,required:!0},isSummary:Boolean,mergedTheme:{type:Object,required:!0},renderCell:Function},render(){var e;const{isSummary:t,column:o,row:n,renderCell:r}=this;let i;const{render:a,key:l,ellipsis:s}=o;if(a&&!t?i=a(n,this.index):t?i=(e=n[l])===null||e===void 0?void 0:e.value:i=r?r(d1(n,l),n,o):d1(n,l),s)if(typeof s=="object"){const{mergedTheme:u}=this;return o.ellipsisComponent==="performant-ellipsis"?m(F$,Object.assign({},s,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>i}):m(i3,Object.assign({},s,{theme:u.peers.Ellipsis,themeOverrides:u.peerOverrides.Ellipsis}),{default:()=>i})}else return m("span",{class:`${this.clsPrefix}-data-table-td__ellipsis`},i);return i}}),m4=ye({name:"DataTableExpandTrigger",props:{clsPrefix:{type:String,required:!0},expanded:Boolean,loading:Boolean,onClick:{type:Function,required:!0},renderExpandIcon:{type:Function},rowData:{type:Object,required:!0}},render(){const{clsPrefix:e}=this;return m("div",{class:[`${e}-data-table-expand-trigger`,this.expanded&&`${e}-data-table-expand-trigger--expanded`],onClick:this.onClick,onMousedown:t=>{t.preventDefault()}},m(Ji,null,{default:()=>this.loading?m(kr,{key:"loading",clsPrefix:this.clsPrefix,radius:85,strokeWidth:15,scale:.88}):this.renderExpandIcon?this.renderExpandIcon({expanded:this.expanded,rowData:this.rowData}):m(Xt,{clsPrefix:e,key:"base-icon"},{default:()=>m(W6,null)})}))}}),dD=ye({name:"DataTableBodyCheckbox",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:t,mergedInderminateRowKeySetRef:o}=He(Tn);return()=>{const{rowKey:n}=e;return m(qd,{privateInsideTable:!0,disabled:e.disabled,indeterminate:o.value.has(n),checked:t.value.has(n),onUpdateChecked:e.onUpdateChecked})}}}),cD=ye({name:"DataTableBodyRadio",props:{rowKey:{type:[String,Number],required:!0},disabled:{type:Boolean,required:!0},onUpdateChecked:{type:Function,required:!0}},setup(e){const{mergedCheckedRowKeySetRef:t,componentId:o}=He(Tn);return()=>{const{rowKey:n}=e;return m(Lm,{name:o,disabled:e.disabled,checked:t.value.has(n),onUpdateChecked:e.onUpdateChecked})}}});function fD(e,t){const o=[];function n(r,i){r.forEach(a=>{a.children&&t.has(a.key)?(o.push({tmNode:a,striped:!1,key:a.key,index:i}),n(a.children,i)):o.push({key:a.key,tmNode:a,striped:!1,index:i})})}return e.forEach(r=>{o.push(r);const{children:i}=r.tmNode;i&&t.has(r.key)&&n(i,r.index)}),o}const hD=ye({props:{clsPrefix:{type:String,required:!0},id:{type:String,required:!0},cols:{type:Array,required:!0},onMouseenter:Function,onMouseleave:Function},render(){const{clsPrefix:e,id:t,cols:o,onMouseenter:n,onMouseleave:r}=this;return m("table",{style:{tableLayout:"fixed"},class:`${e}-data-table-table`,onMouseenter:n,onMouseleave:r},m("colgroup",null,o.map(i=>m("col",{key:i.key,style:i.style}))),m("tbody",{"data-n-id":t,class:`${e}-data-table-tbody`},this.$slots))}}),pD=ye({name:"DataTableBody",props:{onResize:Function,showHeader:Boolean,flexHeight:Boolean,bodyStyle:Object},setup(e){const{slots:t,bodyWidthRef:o,mergedExpandedRowKeysRef:n,mergedClsPrefixRef:r,mergedThemeRef:i,scrollXRef:a,colsRef:l,paginatedDataRef:s,rawPaginatedDataRef:u,fixedColumnLeftMapRef:d,fixedColumnRightMapRef:c,mergedCurrentPageRef:h,rowClassNameRef:f,leftActiveFixedColKeyRef:p,leftActiveFixedChildrenColKeysRef:g,rightActiveFixedColKeyRef:v,rightActiveFixedChildrenColKeysRef:b,renderExpandRef:C,hoverKeyRef:k,summaryRef:w,mergedSortStateRef:_,virtualScrollRef:M,virtualScrollXRef:E,heightForRowRef:P,minRowHeightRef:z,componentId:$,mergedTableLayoutRef:G,childTriggerColIndexRef:H,indentRef:q,rowPropsRef:W,maxHeightRef:L,stripedRef:I,loadingRef:R,onLoadRef:O,loadingKeySetRef:oe,expandableRef:y,stickyExpandedRowsRef:j,renderExpandIconRef:X,summaryPlacementRef:le,treeMateRef:ae,scrollbarPropsRef:Fe,setHeaderScrollLeft:fe,doUpdateExpandedRowKeys:ue,handleTableBodyScroll:we,doCheck:ie,doUncheck:be,renderCell:ze}=He(Tn),pe=He(ln),U=A(null),N=A(null),ge=A(null),Ce=bt(()=>s.value.length===0),se=bt(()=>e.showHeader||!Ce.value),te=bt(()=>e.showHeader||Ce.value);let ce="";const Q=D(()=>new Set(n.value));function re(Ne){var ot;return(ot=ae.value.getNode(Ne))===null||ot===void 0?void 0:ot.rawNode}function he(Ne,ot,ee){const me=re(Ne.key);if(!me){xn("data-table",`fail to get row data with key ${Ne.key}`);return}if(ee){const Pe=s.value.findIndex(Ve=>Ve.key===ce);if(Pe!==-1){const Ve=s.value.findIndex(nt=>nt.key===Ne.key),Ue=Math.min(Pe,Ve),qe=Math.max(Pe,Ve),Ze=[];s.value.slice(Ue,qe+1).forEach(nt=>{nt.disabled||Ze.push(nt.key)}),ot?ie(Ze,!1,me):be(Ze,me),ce=Ne.key;return}}ot?ie(Ne.key,!1,me):be(Ne.key,me),ce=Ne.key}function ne(Ne){const ot=re(Ne.key);if(!ot){xn("data-table",`fail to get row data with key ${Ne.key}`);return}ie(Ne.key,!0,ot)}function Y(){if(!se.value){const{value:ot}=ge;return ot||null}if(M.value)return Ie();const{value:Ne}=U;return Ne?Ne.containerRef:null}function de(Ne,ot){var ee;if(oe.value.has(Ne))return;const{value:me}=n,Pe=me.indexOf(Ne),Ve=Array.from(me);~Pe?(Ve.splice(Pe,1),ue(Ve)):ot&&!ot.isLeaf&&!ot.shallowLoaded?(oe.value.add(Ne),(ee=O.value)===null||ee===void 0||ee.call(O,ot.rawNode).then(()=>{const{value:Ue}=n,qe=Array.from(Ue);~qe.indexOf(Ne)||qe.push(Ne),ue(qe)}).finally(()=>{oe.value.delete(Ne)})):(Ve.push(Ne),ue(Ve))}function Ee(){k.value=null}function Ie(){const{value:Ne}=N;return(Ne==null?void 0:Ne.listElRef)||null}function $e(){const{value:Ne}=N;return(Ne==null?void 0:Ne.itemsElRef)||null}function Qe(Ne){var ot;we(Ne),(ot=U.value)===null||ot===void 0||ot.sync()}function st(Ne){var ot;const{onResize:ee}=e;ee&&ee(Ne),(ot=U.value)===null||ot===void 0||ot.sync()}const Je={getScrollContainer:Y,scrollTo(Ne,ot){var ee,me;M.value?(ee=N.value)===null||ee===void 0||ee.scrollTo(Ne,ot):(me=U.value)===null||me===void 0||me.scrollTo(Ne,ot)}},mt=V([({props:Ne})=>{const ot=me=>me===null?null:V(`[data-n-id="${Ne.componentId}"] [data-col-key="${me}"]::after`,{boxShadow:"var(--n-box-shadow-after)"}),ee=me=>me===null?null:V(`[data-n-id="${Ne.componentId}"] [data-col-key="${me}"]::before`,{boxShadow:"var(--n-box-shadow-before)"});return V([ot(Ne.leftActiveFixedColKey),ee(Ne.rightActiveFixedColKey),Ne.leftActiveFixedChildrenColKeys.map(me=>ot(me)),Ne.rightActiveFixedChildrenColKeys.map(me=>ee(me))])}]);let et=!1;return kt(()=>{const{value:Ne}=p,{value:ot}=g,{value:ee}=v,{value:me}=b;if(!et&&Ne===null&&ee===null)return;const Pe={leftActiveFixedColKey:Ne,leftActiveFixedChildrenColKeys:ot,rightActiveFixedColKey:ee,rightActiveFixedChildrenColKeys:me,componentId:$};mt.mount({id:`n-${$}`,force:!0,props:Pe,anchorMetaName:Ta,parent:pe==null?void 0:pe.styleMountTarget}),et=!0}),Go(()=>{mt.unmount({id:`n-${$}`,parent:pe==null?void 0:pe.styleMountTarget})}),Object.assign({bodyWidth:o,summaryPlacement:le,dataTableSlots:t,componentId:$,scrollbarInstRef:U,virtualListRef:N,emptyElRef:ge,summary:w,mergedClsPrefix:r,mergedTheme:i,scrollX:a,cols:l,loading:R,bodyShowHeaderOnly:te,shouldDisplaySomeTablePart:se,empty:Ce,paginatedDataAndInfo:D(()=>{const{value:Ne}=I;let ot=!1;return{data:s.value.map(Ne?(me,Pe)=>(me.isLeaf||(ot=!0),{tmNode:me,key:me.key,striped:Pe%2===1,index:Pe}):(me,Pe)=>(me.isLeaf||(ot=!0),{tmNode:me,key:me.key,striped:!1,index:Pe})),hasChildren:ot}}),rawPaginatedData:u,fixedColumnLeftMap:d,fixedColumnRightMap:c,currentPage:h,rowClassName:f,renderExpand:C,mergedExpandedRowKeySet:Q,hoverKey:k,mergedSortState:_,virtualScroll:M,virtualScrollX:E,heightForRow:P,minRowHeight:z,mergedTableLayout:G,childTriggerColIndex:H,indent:q,rowProps:W,maxHeight:L,loadingKeySet:oe,expandable:y,stickyExpandedRows:j,renderExpandIcon:X,scrollbarProps:Fe,setHeaderScrollLeft:fe,handleVirtualListScroll:Qe,handleVirtualListResize:st,handleMouseleaveTable:Ee,virtualListContainer:Ie,virtualListContent:$e,handleTableBodyScroll:we,handleCheckboxUpdateChecked:he,handleRadioUpdateChecked:ne,handleUpdateExpanded:de,renderCell:ze},Je)},render(){const{mergedTheme:e,scrollX:t,mergedClsPrefix:o,virtualScroll:n,maxHeight:r,mergedTableLayout:i,flexHeight:a,loadingKeySet:l,onResize:s,setHeaderScrollLeft:u}=this,d=t!==void 0||r!==void 0||a,c=!d&&i==="auto",h=t!==void 0||c,f={minWidth:Fo(t)||"100%"};t&&(f.width="100%");const p=m(or,Object.assign({},this.scrollbarProps,{ref:"scrollbarInstRef",scrollable:d||c,class:`${o}-data-table-base-table-body`,style:this.empty?void 0:this.bodyStyle,theme:e.peers.Scrollbar,themeOverrides:e.peerOverrides.Scrollbar,contentStyle:f,container:n?this.virtualListContainer:void 0,content:n?this.virtualListContent:void 0,horizontalRailStyle:{zIndex:3},verticalRailStyle:{zIndex:3},xScrollable:h,onScroll:n?void 0:this.handleTableBodyScroll,internalOnUpdateScrollLeft:u,onResize:s}),{default:()=>{const g={},v={},{cols:b,paginatedDataAndInfo:C,mergedTheme:k,fixedColumnLeftMap:w,fixedColumnRightMap:_,currentPage:M,rowClassName:E,mergedSortState:P,mergedExpandedRowKeySet:z,stickyExpandedRows:$,componentId:G,childTriggerColIndex:H,expandable:q,rowProps:W,handleMouseleaveTable:L,renderExpand:I,summary:R,handleCheckboxUpdateChecked:O,handleRadioUpdateChecked:oe,handleUpdateExpanded:y,heightForRow:j,minRowHeight:X,virtualScrollX:le}=this,{length:ae}=b;let Fe;const{data:fe,hasChildren:ue}=C,we=ue?fD(fe,z):fe;if(R){const ce=R(this.rawPaginatedData);if(Array.isArray(ce)){const Q=ce.map((re,he)=>({isSummaryRow:!0,key:`__n_summary__${he}`,tmNode:{rawNode:re,disabled:!0},index:-1}));Fe=this.summaryPlacement==="top"?[...Q,...we]:[...we,...Q]}else{const Q={isSummaryRow:!0,key:"__n_summary__",tmNode:{rawNode:ce,disabled:!0},index:-1};Fe=this.summaryPlacement==="top"?[Q,...we]:[...we,Q]}}else Fe=we;const ie=ue?{width:jt(this.indent)}:void 0,be=[];Fe.forEach(ce=>{I&&z.has(ce.key)&&(!q||q(ce.tmNode.rawNode))?be.push(ce,{isExpandedRow:!0,key:`${ce.key}-expand`,tmNode:ce.tmNode,index:ce.index}):be.push(ce)});const{length:ze}=be,pe={};fe.forEach(({tmNode:ce},Q)=>{pe[Q]=ce.key});const U=$?this.bodyWidth:null,N=U===null?void 0:`${U}px`,ge=this.virtualScrollX?"div":"td";let Ce=0,se=0;le&&b.forEach(ce=>{ce.column.fixed==="left"?Ce++:ce.column.fixed==="right"&&se++});const te=({rowInfo:ce,displayedRowIndex:Q,isVirtual:re,isVirtualX:he,startColIndex:ne,endColIndex:Y,getLeft:de})=>{const{index:Ee}=ce;if("isExpandedRow"in ce){const{tmNode:{key:Ve,rawNode:Ue}}=ce;return m("tr",{class:`${o}-data-table-tr ${o}-data-table-tr--expanded`,key:`${Ve}__expand`},m("td",{class:[`${o}-data-table-td`,`${o}-data-table-td--last-col`,Q+1===ze&&`${o}-data-table-td--last-row`],colspan:ae},$?m("div",{class:`${o}-data-table-expand`,style:{width:N}},I(Ue,Ee)):I(Ue,Ee)))}const Ie="isSummaryRow"in ce,$e=!Ie&&ce.striped,{tmNode:Qe,key:st}=ce,{rawNode:Je}=Qe,mt=z.has(st),et=W?W(Je,Ee):void 0,Ne=typeof E=="string"?E:O$(Je,Ee,E),ot=he?b.filter((Ve,Ue)=>!!(ne<=Ue&&Ue<=Y||Ve.column.fixed)):b,ee=he?jt((j==null?void 0:j(Je,Ee))||X):void 0,me=ot.map(Ve=>{var Ue,qe,Ze,nt,Ct;const Ot=Ve.index;if(Q in g){const eo=g[Q],io=eo.indexOf(Ot);if(~io)return eo.splice(io,1),null}const{column:_t}=Ve,yo=En(Ve),{rowSpan:Po,colSpan:Bo}=_t,No=Ie?((Ue=ce.tmNode.rawNode[yo])===null||Ue===void 0?void 0:Ue.colSpan)||1:Bo?Bo(Je,Ee):1,Vo=Ie?((qe=ce.tmNode.rawNode[yo])===null||qe===void 0?void 0:qe.rowSpan)||1:Po?Po(Je,Ee):1,un=Ot+No===ae,dn=Q+Vo===ze,ve=Vo>1;if(ve&&(v[Q]={[Ot]:[]}),No>1||ve)for(let eo=Q;eo
{y(st,ce.tmNode)}})]:null,_t.type==="selection"?Ie?null:_t.multiple===!1?m(cD,{key:M,rowKey:st,disabled:ce.tmNode.disabled,onUpdateChecked:()=>{oe(ce.tmNode)}}):m(dD,{key:M,rowKey:st,disabled:ce.tmNode.disabled,onUpdateChecked:(eo,io)=>{O(ce.tmNode,eo,io.shiftKey)}}):_t.type==="expand"?Ie?null:!_t.expandable||!((Ct=_t.expandable)===null||Ct===void 0)&&Ct.call(_t,Je)?m(m4,{clsPrefix:o,rowData:Je,expanded:mt,renderExpandIcon:this.renderExpandIcon,onClick:()=>{y(st,null)}}):null:m(uD,{clsPrefix:o,index:Ee,row:Je,column:_t,isSummary:Ie,mergedTheme:k,renderCell:this.renderCell}))});return he&&Ce&&se&&me.splice(Ce,0,m("td",{colspan:b.length-Ce-se,style:{pointerEvents:"none",visibility:"hidden",height:0}})),m("tr",Object.assign({},et,{onMouseenter:Ve=>{var Ue;this.hoverKey=st,(Ue=et==null?void 0:et.onMouseenter)===null||Ue===void 0||Ue.call(et,Ve)},key:st,class:[`${o}-data-table-tr`,Ie&&`${o}-data-table-tr--summary`,$e&&`${o}-data-table-tr--striped`,mt&&`${o}-data-table-tr--expanded`,Ne,et==null?void 0:et.class],style:[et==null?void 0:et.style,he&&{height:ee}]}),me)};return n?m(F6,{ref:"virtualListRef",items:be,itemSize:this.minRowHeight,visibleItemsTag:hD,visibleItemsProps:{clsPrefix:o,id:G,cols:b,onMouseleave:L},showScrollbar:!1,onResize:this.handleVirtualListResize,onScroll:this.handleVirtualListScroll,itemsStyle:f,itemResizable:!le,columns:b,renderItemWithCols:le?({itemIndex:ce,item:Q,startColIndex:re,endColIndex:he,getLeft:ne})=>te({displayedRowIndex:ce,isVirtual:!0,isVirtualX:!0,rowInfo:Q,startColIndex:re,endColIndex:he,getLeft:ne}):void 0},{default:({item:ce,index:Q,renderedItemWithCols:re})=>re||te({rowInfo:ce,displayedRowIndex:Q,isVirtual:!0,isVirtualX:!1,startColIndex:0,endColIndex:0,getLeft(he){return 0}})}):m("table",{class:`${o}-data-table-table`,onMouseleave:L,style:{tableLayout:this.mergedTableLayout}},m("colgroup",null,b.map(ce=>m("col",{key:ce.key,style:ce.style}))),this.showHeader?m(eg,{discrete:!1}):null,this.empty?null:m("tbody",{"data-n-id":G,class:`${o}-data-table-tbody`},be.map((ce,Q)=>te({rowInfo:ce,displayedRowIndex:Q,isVirtual:!1,isVirtualX:!1,startColIndex:-1,endColIndex:-1,getLeft(re){return-1}}))))}});if(this.empty){const g=()=>m("div",{class:[`${o}-data-table-empty`,this.loading&&`${o}-data-table-empty--hide`],style:this.bodyStyle,ref:"emptyElRef"},So(this.dataTableSlots.empty,()=>[m(U6,{theme:this.mergedTheme.peers.Empty,themeOverrides:this.mergedTheme.peerOverrides.Empty})]));return this.shouldDisplaySomeTablePart?m(ft,null,p,g()):m(Rn,{onResize:this.onResize},{default:g})}return p}}),mD=ye({name:"MainTable",setup(){const{mergedClsPrefixRef:e,rightFixedColumnsRef:t,leftFixedColumnsRef:o,bodyWidthRef:n,maxHeightRef:r,minHeightRef:i,flexHeightRef:a,virtualScrollHeaderRef:l,syncScrollState:s}=He(Tn),u=A(null),d=A(null),c=A(null),h=A(!(o.value.length||t.value.length)),f=D(()=>({maxHeight:Fo(r.value),minHeight:Fo(i.value)}));function p(C){n.value=C.contentRect.width,s(),h.value||(h.value=!0)}function g(){var C;const{value:k}=u;return k?l.value?((C=k.virtualListRef)===null||C===void 0?void 0:C.listElRef)||null:k.$el:null}function v(){const{value:C}=d;return C?C.getScrollContainer():null}const b={getBodyElement:v,getHeaderElement:g,scrollTo(C,k){var w;(w=d.value)===null||w===void 0||w.scrollTo(C,k)}};return kt(()=>{const{value:C}=c;if(!C)return;const k=`${e.value}-data-table-base-table--transition-disabled`;h.value?setTimeout(()=>{C.classList.remove(k)},0):C.classList.add(k)}),Object.assign({maxHeight:r,mergedClsPrefix:e,selfElRef:c,headerInstRef:u,bodyInstRef:d,bodyStyle:f,flexHeight:a,handleBodyResize:p},b)},render(){const{mergedClsPrefix:e,maxHeight:t,flexHeight:o}=this,n=t===void 0&&!o;return m("div",{class:`${e}-data-table-base-table`,ref:"selfElRef"},n?null:m(eg,{ref:"headerInstRef"}),m(pD,{ref:"bodyInstRef",bodyStyle:this.bodyStyle,showHeader:n,flexHeight:o,onResize:this.handleBodyResize}))}});function gD(e,t){const{paginatedDataRef:o,treeMateRef:n,selectionColumnRef:r}=t,i=A(e.defaultCheckedRowKeys),a=D(()=>{var _;const{checkedRowKeys:M}=e,E=M===void 0?i.value:M;return((_=r.value)===null||_===void 0?void 0:_.multiple)===!1?{checkedKeys:E.slice(0,1),indeterminateKeys:[]}:n.value.getCheckedKeys(E,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded})}),l=D(()=>a.value.checkedKeys),s=D(()=>a.value.indeterminateKeys),u=D(()=>new Set(l.value)),d=D(()=>new Set(s.value)),c=D(()=>{const{value:_}=u;return o.value.reduce((M,E)=>{const{key:P,disabled:z}=E;return M+(!z&&_.has(P)?1:0)},0)}),h=D(()=>o.value.filter(_=>_.disabled).length),f=D(()=>{const{length:_}=o.value,{value:M}=d;return c.value>0&&c.value<_-h.value||o.value.some(E=>M.has(E.key))}),p=D(()=>{const{length:_}=o.value;return c.value!==0&&c.value===_-h.value}),g=D(()=>o.value.length===0);function v(_,M,E){const{"onUpdate:checkedRowKeys":P,onUpdateCheckedRowKeys:z,onCheckedRowKeysChange:$}=e,G=[],{value:{getNode:H}}=n;_.forEach(q=>{var W;const L=(W=H(q))===null||W===void 0?void 0:W.rawNode;G.push(L)}),P&&Ae(P,_,G,{row:M,action:E}),z&&Ae(z,_,G,{row:M,action:E}),$&&Ae($,_,G,{row:M,action:E}),i.value=_}function b(_,M=!1,E){if(!e.loading){if(M){v(Array.isArray(_)?_.slice(0,1):[_],E,"check");return}v(n.value.check(_,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,E,"check")}}function C(_,M){e.loading||v(n.value.uncheck(_,l.value,{cascade:e.cascade,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,M,"uncheck")}function k(_=!1){const{value:M}=r;if(!M||e.loading)return;const E=[];(_?n.value.treeNodes:o.value).forEach(P=>{P.disabled||E.push(P.key)}),v(n.value.check(E,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"checkAll")}function w(_=!1){const{value:M}=r;if(!M||e.loading)return;const E=[];(_?n.value.treeNodes:o.value).forEach(P=>{P.disabled||E.push(P.key)}),v(n.value.uncheck(E,l.value,{cascade:!0,allowNotLoaded:e.allowCheckingNotLoaded}).checkedKeys,void 0,"uncheckAll")}return{mergedCheckedRowKeySetRef:u,mergedCheckedRowKeysRef:l,mergedInderminateRowKeySetRef:d,someRowsCheckedRef:f,allRowsCheckedRef:p,headerCheckboxDisabledRef:g,doUpdateCheckedRowKeys:v,doCheckAll:k,doUncheckAll:w,doCheck:b,doUncheck:C}}function xu(e){return typeof e=="object"&&typeof e.multiple=="number"?e.multiple:!1}function vD(e,t){return t&&(e===void 0||e==="default"||typeof e=="object"&&e.compare==="default")?bD(t):typeof e=="function"?e:e&&typeof e=="object"&&e.compare&&e.compare!=="default"?e.compare:!1}function bD(e){return(t,o)=>{const n=t[e],r=o[e];return n==null?r==null?0:-1:r==null?1:typeof n=="number"&&typeof r=="number"?n-r:typeof n=="string"&&typeof r=="string"?n.localeCompare(r):0}}function xD(e,{dataRelatedColsRef:t,filteredDataRef:o}){const n=[];t.value.forEach(f=>{var p;f.sorter!==void 0&&h(n,{columnKey:f.key,sorter:f.sorter,order:(p=f.defaultSortOrder)!==null&&p!==void 0?p:!1})});const r=A(n),i=D(()=>{const f=t.value.filter(v=>v.type!=="selection"&&v.sorter!==void 0&&(v.sortOrder==="ascend"||v.sortOrder==="descend"||v.sortOrder===!1)),p=f.filter(v=>v.sortOrder!==!1);if(p.length)return p.map(v=>({columnKey:v.key,order:v.sortOrder,sorter:v.sorter}));if(f.length)return[];const{value:g}=r;return Array.isArray(g)?g:g?[g]:[]}),a=D(()=>{const f=i.value.slice().sort((p,g)=>{const v=xu(p.sorter)||0;return(xu(g.sorter)||0)-v});return f.length?o.value.slice().sort((g,v)=>{let b=0;return f.some(C=>{const{columnKey:k,sorter:w,order:_}=C,M=vD(w,k);return M&&_&&(b=M(g.rawNode,v.rawNode),b!==0)?(b=b*D$(_),!0):!1}),b}):o.value});function l(f){let p=i.value.slice();return f&&xu(f.sorter)!==!1?(p=p.filter(g=>xu(g.sorter)!==!1),h(p,f),p):f||null}function s(f){const p=l(f);u(p)}function u(f){const{"onUpdate:sorter":p,onUpdateSorter:g,onSorterChange:v}=e;p&&Ae(p,f),g&&Ae(g,f),v&&Ae(v,f),r.value=f}function d(f,p="ascend"){if(!f)c();else{const g=t.value.find(b=>b.type!=="selection"&&b.type!=="expand"&&b.key===f);if(!(g!=null&&g.sorter))return;const v=g.sorter;s({columnKey:f,sorter:v,order:p})}}function c(){u(null)}function h(f,p){const g=f.findIndex(v=>(p==null?void 0:p.columnKey)&&v.columnKey===p.columnKey);g!==void 0&&g>=0?f[g]=p:f.push(p)}return{clearSorter:c,sort:d,sortedDataRef:a,mergedSortStateRef:i,deriveNextSorter:s}}function yD(e,{dataRelatedColsRef:t}){const o=D(()=>{const j=X=>{for(let le=0;le{const{childrenKey:j}=e;return Ud(e.data,{ignoreEmptyChildren:!0,getKey:e.rowKey,getChildren:X=>X[j],getDisabled:X=>{var le,ae;return!!(!((ae=(le=o.value)===null||le===void 0?void 0:le.disabled)===null||ae===void 0)&&ae.call(le,X))}})}),r=bt(()=>{const{columns:j}=e,{length:X}=j;let le=null;for(let ae=0;ae {const j=t.value.filter(ae=>ae.filterOptionValues!==void 0||ae.filterOptionValue!==void 0),X={};return j.forEach(ae=>{var Fe;ae.type==="selection"||ae.type==="expand"||(ae.filterOptionValues===void 0?X[ae.key]=(Fe=ae.filterOptionValue)!==null&&Fe!==void 0?Fe:null:X[ae.key]=ae.filterOptionValues)}),Object.assign(c4(i.value),X)}),d=D(()=>{const j=u.value,{columns:X}=e;function le(fe){return(ue,we)=>!!~String(we[fe]).indexOf(String(ue))}const{value:{treeNodes:ae}}=n,Fe=[];return X.forEach(fe=>{fe.type==="selection"||fe.type==="expand"||"children"in fe||Fe.push([fe.key,fe])}),ae?ae.filter(fe=>{const{rawNode:ue}=fe;for(const[we,ie]of Fe){let be=j[we];if(be==null||(Array.isArray(be)||(be=[be]),!be.length))continue;const ze=ie.filter==="default"?le(we):ie.filter;if(ie&&typeof ze=="function")if(ie.filterMode==="and"){if(be.some(pe=>!ze(pe,ue)))return!1}else{if(be.some(pe=>ze(pe,ue)))continue;return!1}}return!0}):[]}),{sortedDataRef:c,deriveNextSorter:h,mergedSortStateRef:f,sort:p,clearSorter:g}=xD(e,{dataRelatedColsRef:t,filteredDataRef:d});t.value.forEach(j=>{var X;if(j.filter){const le=j.defaultFilterOptionValues;j.filterMultiple?i.value[j.key]=le||[]:le!==void 0?i.value[j.key]=le===null?[]:le:i.value[j.key]=(X=j.defaultFilterOptionValue)!==null&&X!==void 0?X:null}});const v=D(()=>{const{pagination:j}=e;if(j!==!1)return j.page}),b=D(()=>{const{pagination:j}=e;if(j!==!1)return j.pageSize}),C=ro(v,l),k=ro(b,s),w=bt(()=>{const j=C.value;return e.remote?j:Math.max(1,Math.min(Math.ceil(d.value.length/k.value),j))}),_=D(()=>{const{pagination:j}=e;if(j){const{pageCount:X}=j;if(X!==void 0)return X}}),M=D(()=>{if(e.remote)return n.value.treeNodes;if(!e.pagination)return c.value;const j=k.value,X=(w.value-1)*j;return c.value.slice(X,X+j)}),E=D(()=>M.value.map(j=>j.rawNode));function P(j){const{pagination:X}=e;if(X){const{onChange:le,"onUpdate:page":ae,onUpdatePage:Fe}=X;le&&Ae(le,j),Fe&&Ae(Fe,j),ae&&Ae(ae,j),H(j)}}function z(j){const{pagination:X}=e;if(X){const{onPageSizeChange:le,"onUpdate:pageSize":ae,onUpdatePageSize:Fe}=X;le&&Ae(le,j),Fe&&Ae(Fe,j),ae&&Ae(ae,j),q(j)}}const $=D(()=>{if(e.remote){const{pagination:j}=e;if(j){const{itemCount:X}=j;if(X!==void 0)return X}return}return d.value.length}),G=D(()=>Object.assign(Object.assign({},e.pagination),{onChange:void 0,onUpdatePage:void 0,onUpdatePageSize:void 0,onPageSizeChange:void 0,"onUpdate:page":P,"onUpdate:pageSize":z,page:w.value,pageSize:k.value,pageCount:$.value===void 0?_.value:void 0,itemCount:$.value}));function H(j){const{"onUpdate:page":X,onPageChange:le,onUpdatePage:ae}=e;ae&&Ae(ae,j),X&&Ae(X,j),le&&Ae(le,j),l.value=j}function q(j){const{"onUpdate:pageSize":X,onPageSizeChange:le,onUpdatePageSize:ae}=e;le&&Ae(le,j),ae&&Ae(ae,j),X&&Ae(X,j),s.value=j}function W(j,X){const{onUpdateFilters:le,"onUpdate:filters":ae,onFiltersChange:Fe}=e;le&&Ae(le,j,X),ae&&Ae(ae,j,X),Fe&&Ae(Fe,j,X),i.value=j}function L(j,X,le,ae){var Fe;(Fe=e.onUnstableColumnResize)===null||Fe===void 0||Fe.call(e,j,X,le,ae)}function I(j){H(j)}function R(){O()}function O(){oe({})}function oe(j){y(j)}function y(j){j?j&&(i.value=c4(j)):i.value={}}return{treeMateRef:n,mergedCurrentPageRef:w,mergedPaginationRef:G,paginatedDataRef:M,rawPaginatedDataRef:E,mergedFilterStateRef:u,mergedSortStateRef:f,hoverKeyRef:A(null),selectionColumnRef:o,childTriggerColIndexRef:r,doUpdateFilters:W,deriveNextSorter:h,doUpdatePageSize:q,doUpdatePage:H,onUnstableColumnResize:L,filter:y,filters:oe,clearFilter:R,clearFilters:O,clearSorter:g,page:I,sort:p}}function CD(e,{mainTableInstRef:t,mergedCurrentPageRef:o,bodyWidthRef:n}){let r=0;const i=A(),a=A(null),l=A([]),s=A(null),u=A([]),d=D(()=>Fo(e.scrollX)),c=D(()=>e.columns.filter(z=>z.fixed==="left")),h=D(()=>e.columns.filter(z=>z.fixed==="right")),f=D(()=>{const z={};let $=0;function G(H){H.forEach(q=>{const W={start:$,end:0};z[En(q)]=W,"children"in q?(G(q.children),W.end=$):($+=d4(q)||0,W.end=$)})}return G(c.value),z}),p=D(()=>{const z={};let $=0;function G(H){for(let q=H.length-1;q>=0;--q){const W=H[q],L={start:$,end:0};z[En(W)]=L,"children"in W?(G(W.children),L.end=$):($+=d4(W)||0,L.end=$)}}return G(h.value),z});function g(){var z,$;const{value:G}=c;let H=0;const{value:q}=f;let W=null;for(let L=0;L (((z=q[I])===null||z===void 0?void 0:z.start)||0)-H)W=I,H=(($=q[I])===null||$===void 0?void 0:$.end)||0;else break}a.value=W}function v(){l.value=[];let z=e.columns.find($=>En($)===a.value);for(;z&&"children"in z;){const $=z.children.length;if($===0)break;const G=z.children[$-1];l.value.push(En(G)),z=G}}function b(){var z,$;const{value:G}=h,H=Number(e.scrollX),{value:q}=n;if(q===null)return;let W=0,L=null;const{value:I}=p;for(let R=G.length-1;R>=0;--R){const O=En(G[R]);if(Math.round(r+(((z=I[O])===null||z===void 0?void 0:z.start)||0)+q-W) En($)===s.value);for(;z&&"children"in z&&z.children.length;){const $=z.children[0];u.value.push(En($)),z=$}}function k(){const z=t.value?t.value.getHeaderElement():null,$=t.value?t.value.getBodyElement():null;return{header:z,body:$}}function w(){const{body:z}=k();z&&(z.scrollTop=0)}function _(){i.value!=="body"?os(E):i.value=void 0}function M(z){var $;($=e.onScroll)===null||$===void 0||$.call(e,z),i.value!=="head"?os(E):i.value=void 0}function E(){const{header:z,body:$}=k();if(!$)return;const{value:G}=n;if(G!==null){if(e.maxHeight||e.flexHeight){if(!z)return;const H=r-z.scrollLeft;i.value=H!==0?"head":"body",i.value==="head"?(r=z.scrollLeft,$.scrollLeft=r):(r=$.scrollLeft,z.scrollLeft=r)}else r=$.scrollLeft;g(),v(),b(),C()}}function P(z){const{header:$}=k();$&&($.scrollLeft=z,E())}return lt(o,()=>{w()}),{styleScrollXRef:d,fixedColumnLeftMapRef:f,fixedColumnRightMapRef:p,leftFixedColumnsRef:c,rightFixedColumnsRef:h,leftActiveFixedColKeyRef:a,leftActiveFixedChildrenColKeysRef:l,rightActiveFixedColKeyRef:s,rightActiveFixedChildrenColKeysRef:u,syncScrollState:E,handleTableBodyScroll:M,handleTableHeaderScroll:_,setHeaderScrollLeft:P}}function wD(){const e=A({});function t(r){return e.value[r]}function o(r,i){Wm(r)&&"key"in r&&(e.value[r.key]=i)}function n(){e.value={}}return{getResizableWidth:t,doUpdateResizableWidth:o,clearResizableWidth:n}}function SD(e,t){const o=[],n=[],r=[],i=new WeakMap;let a=-1,l=0,s=!1;function u(h,f){f>a&&(o[f]=[],a=f),h.forEach((p,g)=>{if("children"in p)u(p.children,f+1);else{const v="key"in p?p.key:void 0;n.push({key:En(p),style:I$(p,v!==void 0?Fo(t(v)):void 0),column:p,index:g,width:p.width===void 0?128:Number(p.width)}),l+=1,s||(s=!!p.ellipsis),r.push(p)}})}u(e,0);let d=0;function c(h,f){let p=0;h.forEach(g=>{var v;if("children"in g){const b=d,C={column:g,colIndex:d,colSpan:0,rowSpan:1,isLast:!1};c(g.children,f+1),g.children.forEach(k=>{var w,_;C.colSpan+=(_=(w=i.get(k))===null||w===void 0?void 0:w.colSpan)!==null&&_!==void 0?_:0}),b+C.colSpan===l&&(C.isLast=!0),i.set(g,C),o[f].push(C)}else{if(d 1&&(p=d+b);const C=d+b===l,k={column:g,colSpan:b,colIndex:d,rowSpan:a-f+1,isLast:C};i.set(g,k),o[f].push(k),d+=1}})}return c(e,0),{hasEllipsis:s,rows:o,cols:n,dataRelatedCols:r}}function FD(e,t){const o=D(()=>SD(e.columns,t));return{rowsRef:D(()=>o.value.rows),colsRef:D(()=>o.value.cols),hasEllipsisRef:D(()=>o.value.hasEllipsis),dataRelatedColsRef:D(()=>o.value.dataRelatedCols)}}function ED(e,t){const o=bt(()=>{for(const u of e.columns)if(u.type==="expand")return u.renderExpand}),n=bt(()=>{let u;for(const d of e.columns)if(d.type==="expand"){u=d.expandable;break}return u}),r=A(e.defaultExpandAll?o!=null&&o.value?(()=>{const u=[];return t.value.treeNodes.forEach(d=>{var c;!((c=n.value)===null||c===void 0)&&c.call(n,d.rawNode)&&u.push(d.key)}),u})():t.value.getNonLeafKeys():e.defaultExpandedRowKeys),i=Te(e,"expandedRowKeys"),a=Te(e,"stickyExpandedRows"),l=ro(i,r);function s(u){const{onUpdateExpandedRowKeys:d,"onUpdate:expandedRowKeys":c}=e;d&&Ae(d,u),c&&Ae(c,u),r.value=u}return{stickyExpandedRowsRef:a,mergedExpandedRowKeysRef:l,renderExpandRef:o,expandableRef:n,doUpdateExpandedRowKeys:s}}const g4=_D(),kD=V([B("data-table",` width: 100%; font-size: var(--n-font-size); display: flex; @@ -2679,7 +2679,7 @@ ${t} bottom: -1px; transition: box-shadow .2s var(--n-bezier); left: -36px; - `)])]}const tg=ye({name:"DataTable",alias:["AdvancedTable"],props:E$,setup(e,{slots:t}){const{mergedBorderedRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=it(e),a=Kt("DataTable",i,n),l=D(()=>{const{bottomBordered:ee}=e;return o.value?!1:ee!==void 0?ee:!0}),s=Le("DataTable","-data-table",kD,Bm,e,n),u=A(null),d=A(null),{getResizableWidth:c,clearResizableWidth:h,doUpdateResizableWidth:f}=wD(),{rowsRef:p,colsRef:g,dataRelatedColsRef:v,hasEllipsisRef:b}=FD(e,c),{treeMateRef:C,mergedCurrentPageRef:k,paginatedDataRef:w,rawPaginatedDataRef:_,selectionColumnRef:M,hoverKeyRef:E,mergedPaginationRef:P,mergedFilterStateRef:z,mergedSortStateRef:$,childTriggerColIndexRef:G,doUpdatePage:H,doUpdateFilters:q,onUnstableColumnResize:W,deriveNextSorter:L,filter:I,filters:R,clearFilter:O,clearFilters:oe,clearSorter:y,page:j,sort:X}=yD(e,{dataRelatedColsRef:v}),le=ee=>{const{fileName:me="data.csv",keepOriginalData:Pe=!1}=ee||{},Ve=Pe?e.data:_.value,Ue=N$(e.columns,Ve),qe=new Blob([Ue],{type:"text/csv;charset=utf-8"}),Ze=URL.createObjectURL(qe);d8(Ze,me.endsWith(".csv")?me:`${me}.csv`),URL.revokeObjectURL(Ze)},{doCheckAll:ae,doUncheckAll:Fe,doCheck:fe,doUncheck:ue,headerCheckboxDisabledRef:we,someRowsCheckedRef:ie,allRowsCheckedRef:be,mergedCheckedRowKeySetRef:ze,mergedInderminateRowKeySetRef:pe}=gD(e,{selectionColumnRef:M,treeMateRef:C,paginatedDataRef:w}),{stickyExpandedRowsRef:U,mergedExpandedRowKeysRef:N,renderExpandRef:ge,expandableRef:Ce,doUpdateExpandedRowKeys:se}=ED(e,C),{handleTableBodyScroll:te,handleTableHeaderScroll:ce,syncScrollState:Q,setHeaderScrollLeft:re,leftActiveFixedColKeyRef:he,leftActiveFixedChildrenColKeysRef:ne,rightActiveFixedColKeyRef:Y,rightActiveFixedChildrenColKeysRef:de,leftFixedColumnsRef:Ee,rightFixedColumnsRef:Ie,fixedColumnLeftMapRef:$e,fixedColumnRightMapRef:Ye}=CD(e,{bodyWidthRef:u,mainTableInstRef:d,mergedCurrentPageRef:k}),{localeRef:st}=Fr("DataTable"),Qe=D(()=>e.virtualScroll||e.flexHeight||e.maxHeight!==void 0||b.value?"fixed":e.tableLayout);tt(Tn,{props:e,treeMateRef:C,renderExpandIconRef:Te(e,"renderExpandIcon"),loadingKeySetRef:A(new Set),slots:t,indentRef:Te(e,"indent"),childTriggerColIndexRef:G,bodyWidthRef:u,componentId:ai(),hoverKeyRef:E,mergedClsPrefixRef:n,mergedThemeRef:s,scrollXRef:D(()=>e.scrollX),rowsRef:p,colsRef:g,paginatedDataRef:w,leftActiveFixedColKeyRef:he,leftActiveFixedChildrenColKeysRef:ne,rightActiveFixedColKeyRef:Y,rightActiveFixedChildrenColKeysRef:de,leftFixedColumnsRef:Ee,rightFixedColumnsRef:Ie,fixedColumnLeftMapRef:$e,fixedColumnRightMapRef:Ye,mergedCurrentPageRef:k,someRowsCheckedRef:ie,allRowsCheckedRef:be,mergedSortStateRef:$,mergedFilterStateRef:z,loadingRef:Te(e,"loading"),rowClassNameRef:Te(e,"rowClassName"),mergedCheckedRowKeySetRef:ze,mergedExpandedRowKeysRef:N,mergedInderminateRowKeySetRef:pe,localeRef:st,expandableRef:Ce,stickyExpandedRowsRef:U,rowKeyRef:Te(e,"rowKey"),renderExpandRef:ge,summaryRef:Te(e,"summary"),virtualScrollRef:Te(e,"virtualScroll"),virtualScrollXRef:Te(e,"virtualScrollX"),heightForRowRef:Te(e,"heightForRow"),minRowHeightRef:Te(e,"minRowHeight"),virtualScrollHeaderRef:Te(e,"virtualScrollHeader"),headerHeightRef:Te(e,"headerHeight"),rowPropsRef:Te(e,"rowProps"),stripedRef:Te(e,"striped"),checkOptionsRef:D(()=>{const{value:ee}=M;return ee==null?void 0:ee.options}),rawPaginatedDataRef:_,filterMenuCssVarsRef:D(()=>{const{self:{actionDividerColor:ee,actionPadding:me,actionButtonMargin:Pe}}=s.value;return{"--n-action-padding":me,"--n-action-button-margin":Pe,"--n-action-divider-color":ee}}),onLoadRef:Te(e,"onLoad"),mergedTableLayoutRef:Qe,maxHeightRef:Te(e,"maxHeight"),minHeightRef:Te(e,"minHeight"),flexHeightRef:Te(e,"flexHeight"),headerCheckboxDisabledRef:we,paginationBehaviorOnFilterRef:Te(e,"paginationBehaviorOnFilter"),summaryPlacementRef:Te(e,"summaryPlacement"),filterIconPopoverPropsRef:Te(e,"filterIconPopoverProps"),scrollbarPropsRef:Te(e,"scrollbarProps"),syncScrollState:Q,doUpdatePage:H,doUpdateFilters:q,getResizableWidth:c,onUnstableColumnResize:W,clearResizableWidth:h,doUpdateResizableWidth:f,deriveNextSorter:L,doCheck:fe,doUncheck:ue,doCheckAll:ae,doUncheckAll:Fe,doUpdateExpandedRowKeys:se,handleTableHeaderScroll:ce,handleTableBodyScroll:te,setHeaderScrollLeft:re,renderCell:Te(e,"renderCell")});const mt={filter:I,filters:R,clearFilters:oe,clearSorter:y,page:j,sort:X,clearFilter:O,downloadCsv:le,scrollTo:(ee,me)=>{var Pe;(Pe=d.value)===null||Pe===void 0||Pe.scrollTo(ee,me)}},Je=D(()=>{const{size:ee}=e,{common:{cubicBezierEaseInOut:me},self:{borderColor:Pe,tdColorHover:Ve,tdColorSorting:Ue,tdColorSortingModal:qe,tdColorSortingPopover:Ze,thColorSorting:nt,thColorSortingModal:Ct,thColorSortingPopover:Ot,thColor:_t,thColorHover:yo,tdColor:Po,tdTextColor:Bo,thTextColor:No,thFontWeight:Vo,thButtonColorHover:un,thIconColor:dn,thIconColorActive:ve,filterSize:De,borderRadius:at,lineHeight:St,tdColorModal:Vt,thColorModal:$t,borderColorModal:eo,thColorHoverModal:io,tdColorHoverModal:Fn,borderColorPopover:nr,thColorPopover:rr,tdColorPopover:ci,tdColorHoverPopover:ol,thColorHoverPopover:nl,paginationMargin:rl,emptyPadding:il,boxShadowAfter:Mr,boxShadowBefore:Rr,sorterSize:dc,resizableContainerSize:cc,resizableSize:fc,loadingColor:hc,loadingSize:pc,opacityLoading:mc,tdColorStriped:gc,tdColorStripedModal:vc,tdColorStripedPopover:bc,[_e("fontSize",ee)]:xc,[_e("thPadding",ee)]:yc,[_e("tdPadding",ee)]:Cc}}=s.value;return{"--n-font-size":xc,"--n-th-padding":yc,"--n-td-padding":Cc,"--n-bezier":me,"--n-border-radius":at,"--n-line-height":St,"--n-border-color":Pe,"--n-border-color-modal":eo,"--n-border-color-popover":nr,"--n-th-color":_t,"--n-th-color-hover":yo,"--n-th-color-modal":$t,"--n-th-color-hover-modal":io,"--n-th-color-popover":rr,"--n-th-color-hover-popover":nl,"--n-td-color":Po,"--n-td-color-hover":Ve,"--n-td-color-modal":Vt,"--n-td-color-hover-modal":Fn,"--n-td-color-popover":ci,"--n-td-color-hover-popover":ol,"--n-th-text-color":No,"--n-td-text-color":Bo,"--n-th-font-weight":Vo,"--n-th-button-color-hover":un,"--n-th-icon-color":dn,"--n-th-icon-color-active":ve,"--n-filter-size":De,"--n-pagination-margin":rl,"--n-empty-padding":il,"--n-box-shadow-before":Rr,"--n-box-shadow-after":Mr,"--n-sorter-size":dc,"--n-resizable-container-size":cc,"--n-resizable-size":fc,"--n-loading-size":pc,"--n-loading-color":hc,"--n-opacity-loading":mc,"--n-td-color-striped":gc,"--n-td-color-striped-modal":vc,"--n-td-color-striped-popover":bc,"n-td-color-sorting":Ue,"n-td-color-sorting-modal":qe,"n-td-color-sorting-popover":Ze,"n-th-color-sorting":nt,"n-th-color-sorting-modal":Ct,"n-th-color-sorting-popover":Ot}}),Ne=r?vt("data-table",D(()=>e.size[0]),Je,e):void 0,ot=D(()=>{if(!e.pagination)return!1;if(e.paginateSinglePage)return!0;const ee=P.value,{pageCount:me}=ee;return me!==void 0?me>1:ee.itemCount&&ee.pageSize&&ee.itemCount>ee.pageSize});return Object.assign({mainTableInstRef:d,mergedClsPrefix:n,rtlEnabled:a,mergedTheme:s,paginatedData:w,mergedBordered:o,mergedBottomBordered:l,mergedPagination:P,mergedShowPagination:ot,cssVars:r?void 0:Je,themeClass:Ne==null?void 0:Ne.themeClass,onRender:Ne==null?void 0:Ne.onRender},mt)},render(){const{mergedClsPrefix:e,themeClass:t,onRender:o,$slots:n,spinProps:r}=this;return o==null||o(),m("div",{class:[`${e}-data-table`,this.rtlEnabled&&`${e}-data-table--rtl`,t,{[`${e}-data-table--bordered`]:this.mergedBordered,[`${e}-data-table--bottom-bordered`]:this.mergedBottomBordered,[`${e}-data-table--single-line`]:this.singleLine,[`${e}-data-table--single-column`]:this.singleColumn,[`${e}-data-table--loading`]:this.loading,[`${e}-data-table--flex-height`]:this.flexHeight}],style:this.cssVars},m("div",{class:`${e}-data-table-wrapper`},m(mD,{ref:"mainTableInstRef"})),this.mergedShowPagination?m("div",{class:`${e}-data-table__pagination`},m(g$,Object.assign({theme:this.mergedTheme.peers.Pagination,themeOverrides:this.mergedTheme.peerOverrides.Pagination,disabled:this.loading},this.mergedPagination))):null,m(go,{name:"fade-in-scale-up-transition"},{default:()=>this.loading?m("div",{class:`${e}-data-table-loading-wrapper`},So(n.loading,()=>[m(kr,Object.assign({clsPrefix:e,strokeWidth:20},r))])):null}))}}),MD={itemFontSize:"12px",itemHeight:"36px",itemWidth:"52px",panelActionPadding:"8px 0"};function og(e){const{popoverColor:t,textColor2:o,primaryColor:n,hoverColor:r,dividerColor:i,opacityDisabled:a,boxShadow2:l,borderRadius:s,iconColor:u,iconColorDisabled:d}=e;return Object.assign(Object.assign({},MD),{panelColor:t,panelBoxShadow:l,panelDividerColor:i,itemTextColor:o,itemTextColorActive:n,itemColorHover:r,itemOpacityDisabled:a,itemBorderRadius:s,borderRadius:s,iconColor:u,iconColorDisabled:d})}const ng={name:"TimePicker",common:je,peers:{Scrollbar:Lo,Button:Ho,Input:Xo},self:og},rg={name:"TimePicker",common:We,peers:{Scrollbar:Zo,Button:Yo,Input:Sn},self:og},RD={itemSize:"24px",itemCellWidth:"38px",itemCellHeight:"32px",scrollItemWidth:"80px",scrollItemHeight:"40px",panelExtraFooterPadding:"8px 12px",panelActionPadding:"8px 12px",calendarTitlePadding:"0",calendarTitleHeight:"28px",arrowSize:"14px",panelHeaderPadding:"8px 12px",calendarDaysHeight:"32px",calendarTitleGridTempateColumns:"28px 28px 1fr 28px 28px",calendarLeftPaddingDate:"6px 12px 4px 12px",calendarLeftPaddingDatetime:"4px 12px",calendarLeftPaddingDaterange:"6px 12px 4px 12px",calendarLeftPaddingDatetimerange:"4px 12px",calendarLeftPaddingMonth:"0",calendarLeftPaddingYear:"0",calendarLeftPaddingQuarter:"0",calendarLeftPaddingMonthrange:"0",calendarLeftPaddingQuarterrange:"0",calendarLeftPaddingYearrange:"0",calendarLeftPaddingWeek:"6px 12px 4px 12px",calendarRightPaddingDate:"6px 12px 4px 12px",calendarRightPaddingDatetime:"4px 12px",calendarRightPaddingDaterange:"6px 12px 4px 12px",calendarRightPaddingDatetimerange:"4px 12px",calendarRightPaddingMonth:"0",calendarRightPaddingYear:"0",calendarRightPaddingQuarter:"0",calendarRightPaddingMonthrange:"0",calendarRightPaddingQuarterrange:"0",calendarRightPaddingYearrange:"0",calendarRightPaddingWeek:"0"};function ig(e){const{hoverColor:t,fontSize:o,textColor2:n,textColorDisabled:r,popoverColor:i,primaryColor:a,borderRadiusSmall:l,iconColor:s,iconColorDisabled:u,textColor1:d,dividerColor:c,boxShadow2:h,borderRadius:f,fontWeightStrong:p}=e;return Object.assign(Object.assign({},RD),{itemFontSize:o,calendarDaysFontSize:o,calendarTitleFontSize:o,itemTextColor:n,itemTextColorDisabled:r,itemTextColorActive:i,itemTextColorCurrent:a,itemColorIncluded:Be(a,{alpha:.1}),itemColorHover:t,itemColorDisabled:t,itemColorActive:a,itemBorderRadius:l,panelColor:i,panelTextColor:n,arrowColor:s,calendarTitleTextColor:d,calendarTitleColorHover:t,calendarDaysTextColor:n,panelHeaderDividerColor:c,calendarDaysDividerColor:c,calendarDividerColor:c,panelActionDividerColor:c,panelBoxShadow:h,panelBorderRadius:f,calendarTitleFontWeight:p,scrollItemBorderRadius:f,iconColor:s,iconColorDisabled:u})}const zD={name:"DatePicker",common:je,peers:{Input:Xo,Button:Ho,TimePicker:ng,Scrollbar:Lo},self:ig},AD={name:"DatePicker",common:We,peers:{Input:Sn,Button:Yo,TimePicker:rg,Scrollbar:Zo},self(e){const{popoverColor:t,hoverColor:o,primaryColor:n}=e,r=ig(e);return r.itemColorDisabled=Ke(t,o),r.itemColorIncluded=Be(n,{alpha:.15}),r.itemColorHover=Ke(t,o),r}},PD={thPaddingBorderedSmall:"8px 12px",thPaddingBorderedMedium:"12px 16px",thPaddingBorderedLarge:"16px 24px",thPaddingSmall:"0",thPaddingMedium:"0",thPaddingLarge:"0",tdPaddingBorderedSmall:"8px 12px",tdPaddingBorderedMedium:"12px 16px",tdPaddingBorderedLarge:"16px 24px",tdPaddingSmall:"0 0 8px 0",tdPaddingMedium:"0 0 12px 0",tdPaddingLarge:"0 0 16px 0"};function ag(e){const{tableHeaderColor:t,textColor2:o,textColor1:n,cardColor:r,modalColor:i,popoverColor:a,dividerColor:l,borderRadius:s,fontWeightStrong:u,lineHeight:d,fontSizeSmall:c,fontSizeMedium:h,fontSizeLarge:f}=e;return Object.assign(Object.assign({},PD),{lineHeight:d,fontSizeSmall:c,fontSizeMedium:h,fontSizeLarge:f,titleTextColor:n,thColor:Ke(r,t),thColorModal:Ke(i,t),thColorPopover:Ke(a,t),thTextColor:n,thFontWeight:u,tdTextColor:o,tdColor:r,tdColorModal:i,tdColorPopover:a,borderColor:Ke(r,l),borderColorModal:Ke(i,l),borderColorPopover:Ke(a,l),borderRadius:s})}const BD={name:"Descriptions",common:je,self:ag},$D={name:"Descriptions",common:We,self:ag},DD={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"22px",closeIconSize:"18px",closeMargin:"20px 26px 0 0",closeMarginIconTop:"10px 16px 0 0"};function lg(e){const{textColor1:t,textColor2:o,modalColor:n,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,infoColor:u,successColor:d,warningColor:c,errorColor:h,primaryColor:f,dividerColor:p,borderRadius:g,fontWeightStrong:v,lineHeight:b,fontSize:C}=e;return Object.assign(Object.assign({},DD),{fontSize:C,lineHeight:b,border:`1px solid ${p}`,titleTextColor:t,textColor:o,color:n,closeColorHover:l,closeColorPressed:s,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:a,closeBorderRadius:g,iconColor:f,iconColorInfo:u,iconColorSuccess:d,iconColorWarning:c,iconColorError:h,borderRadius:g,titleFontWeight:v})}const l3={name:"Dialog",common:je,peers:{Button:Ho},self:lg},sg={name:"Dialog",common:We,peers:{Button:Yo},self:lg},ec={icon:Function,type:{type:String,default:"default"},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function},ug=Ms(ec),TD=V([B("dialog",` + `)])]}const tg=ye({name:"DataTable",alias:["AdvancedTable"],props:E$,setup(e,{slots:t}){const{mergedBorderedRef:o,mergedClsPrefixRef:n,inlineThemeDisabled:r,mergedRtlRef:i}=it(e),a=Kt("DataTable",i,n),l=D(()=>{const{bottomBordered:ee}=e;return o.value?!1:ee!==void 0?ee:!0}),s=Le("DataTable","-data-table",kD,Bm,e,n),u=A(null),d=A(null),{getResizableWidth:c,clearResizableWidth:h,doUpdateResizableWidth:f}=wD(),{rowsRef:p,colsRef:g,dataRelatedColsRef:v,hasEllipsisRef:b}=FD(e,c),{treeMateRef:C,mergedCurrentPageRef:k,paginatedDataRef:w,rawPaginatedDataRef:_,selectionColumnRef:M,hoverKeyRef:E,mergedPaginationRef:P,mergedFilterStateRef:z,mergedSortStateRef:$,childTriggerColIndexRef:G,doUpdatePage:H,doUpdateFilters:q,onUnstableColumnResize:W,deriveNextSorter:L,filter:I,filters:R,clearFilter:O,clearFilters:oe,clearSorter:y,page:j,sort:X}=yD(e,{dataRelatedColsRef:v}),le=ee=>{const{fileName:me="data.csv",keepOriginalData:Pe=!1}=ee||{},Ve=Pe?e.data:_.value,Ue=N$(e.columns,Ve),qe=new Blob([Ue],{type:"text/csv;charset=utf-8"}),Ze=URL.createObjectURL(qe);d8(Ze,me.endsWith(".csv")?me:`${me}.csv`),URL.revokeObjectURL(Ze)},{doCheckAll:ae,doUncheckAll:Fe,doCheck:fe,doUncheck:ue,headerCheckboxDisabledRef:we,someRowsCheckedRef:ie,allRowsCheckedRef:be,mergedCheckedRowKeySetRef:ze,mergedInderminateRowKeySetRef:pe}=gD(e,{selectionColumnRef:M,treeMateRef:C,paginatedDataRef:w}),{stickyExpandedRowsRef:U,mergedExpandedRowKeysRef:N,renderExpandRef:ge,expandableRef:Ce,doUpdateExpandedRowKeys:se}=ED(e,C),{handleTableBodyScroll:te,handleTableHeaderScroll:ce,syncScrollState:Q,setHeaderScrollLeft:re,leftActiveFixedColKeyRef:he,leftActiveFixedChildrenColKeysRef:ne,rightActiveFixedColKeyRef:Y,rightActiveFixedChildrenColKeysRef:de,leftFixedColumnsRef:Ee,rightFixedColumnsRef:Ie,fixedColumnLeftMapRef:$e,fixedColumnRightMapRef:Qe}=CD(e,{bodyWidthRef:u,mainTableInstRef:d,mergedCurrentPageRef:k}),{localeRef:st}=Fr("DataTable"),Je=D(()=>e.virtualScroll||e.flexHeight||e.maxHeight!==void 0||b.value?"fixed":e.tableLayout);tt(Tn,{props:e,treeMateRef:C,renderExpandIconRef:Te(e,"renderExpandIcon"),loadingKeySetRef:A(new Set),slots:t,indentRef:Te(e,"indent"),childTriggerColIndexRef:G,bodyWidthRef:u,componentId:ai(),hoverKeyRef:E,mergedClsPrefixRef:n,mergedThemeRef:s,scrollXRef:D(()=>e.scrollX),rowsRef:p,colsRef:g,paginatedDataRef:w,leftActiveFixedColKeyRef:he,leftActiveFixedChildrenColKeysRef:ne,rightActiveFixedColKeyRef:Y,rightActiveFixedChildrenColKeysRef:de,leftFixedColumnsRef:Ee,rightFixedColumnsRef:Ie,fixedColumnLeftMapRef:$e,fixedColumnRightMapRef:Qe,mergedCurrentPageRef:k,someRowsCheckedRef:ie,allRowsCheckedRef:be,mergedSortStateRef:$,mergedFilterStateRef:z,loadingRef:Te(e,"loading"),rowClassNameRef:Te(e,"rowClassName"),mergedCheckedRowKeySetRef:ze,mergedExpandedRowKeysRef:N,mergedInderminateRowKeySetRef:pe,localeRef:st,expandableRef:Ce,stickyExpandedRowsRef:U,rowKeyRef:Te(e,"rowKey"),renderExpandRef:ge,summaryRef:Te(e,"summary"),virtualScrollRef:Te(e,"virtualScroll"),virtualScrollXRef:Te(e,"virtualScrollX"),heightForRowRef:Te(e,"heightForRow"),minRowHeightRef:Te(e,"minRowHeight"),virtualScrollHeaderRef:Te(e,"virtualScrollHeader"),headerHeightRef:Te(e,"headerHeight"),rowPropsRef:Te(e,"rowProps"),stripedRef:Te(e,"striped"),checkOptionsRef:D(()=>{const{value:ee}=M;return ee==null?void 0:ee.options}),rawPaginatedDataRef:_,filterMenuCssVarsRef:D(()=>{const{self:{actionDividerColor:ee,actionPadding:me,actionButtonMargin:Pe}}=s.value;return{"--n-action-padding":me,"--n-action-button-margin":Pe,"--n-action-divider-color":ee}}),onLoadRef:Te(e,"onLoad"),mergedTableLayoutRef:Je,maxHeightRef:Te(e,"maxHeight"),minHeightRef:Te(e,"minHeight"),flexHeightRef:Te(e,"flexHeight"),headerCheckboxDisabledRef:we,paginationBehaviorOnFilterRef:Te(e,"paginationBehaviorOnFilter"),summaryPlacementRef:Te(e,"summaryPlacement"),filterIconPopoverPropsRef:Te(e,"filterIconPopoverProps"),scrollbarPropsRef:Te(e,"scrollbarProps"),syncScrollState:Q,doUpdatePage:H,doUpdateFilters:q,getResizableWidth:c,onUnstableColumnResize:W,clearResizableWidth:h,doUpdateResizableWidth:f,deriveNextSorter:L,doCheck:fe,doUncheck:ue,doCheckAll:ae,doUncheckAll:Fe,doUpdateExpandedRowKeys:se,handleTableHeaderScroll:ce,handleTableBodyScroll:te,setHeaderScrollLeft:re,renderCell:Te(e,"renderCell")});const mt={filter:I,filters:R,clearFilters:oe,clearSorter:y,page:j,sort:X,clearFilter:O,downloadCsv:le,scrollTo:(ee,me)=>{var Pe;(Pe=d.value)===null||Pe===void 0||Pe.scrollTo(ee,me)}},et=D(()=>{const{size:ee}=e,{common:{cubicBezierEaseInOut:me},self:{borderColor:Pe,tdColorHover:Ve,tdColorSorting:Ue,tdColorSortingModal:qe,tdColorSortingPopover:Ze,thColorSorting:nt,thColorSortingModal:Ct,thColorSortingPopover:Ot,thColor:_t,thColorHover:yo,tdColor:Po,tdTextColor:Bo,thTextColor:No,thFontWeight:Vo,thButtonColorHover:un,thIconColor:dn,thIconColorActive:ve,filterSize:De,borderRadius:at,lineHeight:St,tdColorModal:Vt,thColorModal:$t,borderColorModal:eo,thColorHoverModal:io,tdColorHoverModal:Fn,borderColorPopover:nr,thColorPopover:rr,tdColorPopover:ci,tdColorHoverPopover:ol,thColorHoverPopover:nl,paginationMargin:rl,emptyPadding:il,boxShadowAfter:Mr,boxShadowBefore:Rr,sorterSize:dc,resizableContainerSize:cc,resizableSize:fc,loadingColor:hc,loadingSize:pc,opacityLoading:mc,tdColorStriped:gc,tdColorStripedModal:vc,tdColorStripedPopover:bc,[_e("fontSize",ee)]:xc,[_e("thPadding",ee)]:yc,[_e("tdPadding",ee)]:Cc}}=s.value;return{"--n-font-size":xc,"--n-th-padding":yc,"--n-td-padding":Cc,"--n-bezier":me,"--n-border-radius":at,"--n-line-height":St,"--n-border-color":Pe,"--n-border-color-modal":eo,"--n-border-color-popover":nr,"--n-th-color":_t,"--n-th-color-hover":yo,"--n-th-color-modal":$t,"--n-th-color-hover-modal":io,"--n-th-color-popover":rr,"--n-th-color-hover-popover":nl,"--n-td-color":Po,"--n-td-color-hover":Ve,"--n-td-color-modal":Vt,"--n-td-color-hover-modal":Fn,"--n-td-color-popover":ci,"--n-td-color-hover-popover":ol,"--n-th-text-color":No,"--n-td-text-color":Bo,"--n-th-font-weight":Vo,"--n-th-button-color-hover":un,"--n-th-icon-color":dn,"--n-th-icon-color-active":ve,"--n-filter-size":De,"--n-pagination-margin":rl,"--n-empty-padding":il,"--n-box-shadow-before":Rr,"--n-box-shadow-after":Mr,"--n-sorter-size":dc,"--n-resizable-container-size":cc,"--n-resizable-size":fc,"--n-loading-size":pc,"--n-loading-color":hc,"--n-opacity-loading":mc,"--n-td-color-striped":gc,"--n-td-color-striped-modal":vc,"--n-td-color-striped-popover":bc,"n-td-color-sorting":Ue,"n-td-color-sorting-modal":qe,"n-td-color-sorting-popover":Ze,"n-th-color-sorting":nt,"n-th-color-sorting-modal":Ct,"n-th-color-sorting-popover":Ot}}),Ne=r?vt("data-table",D(()=>e.size[0]),et,e):void 0,ot=D(()=>{if(!e.pagination)return!1;if(e.paginateSinglePage)return!0;const ee=P.value,{pageCount:me}=ee;return me!==void 0?me>1:ee.itemCount&&ee.pageSize&&ee.itemCount>ee.pageSize});return Object.assign({mainTableInstRef:d,mergedClsPrefix:n,rtlEnabled:a,mergedTheme:s,paginatedData:w,mergedBordered:o,mergedBottomBordered:l,mergedPagination:P,mergedShowPagination:ot,cssVars:r?void 0:et,themeClass:Ne==null?void 0:Ne.themeClass,onRender:Ne==null?void 0:Ne.onRender},mt)},render(){const{mergedClsPrefix:e,themeClass:t,onRender:o,$slots:n,spinProps:r}=this;return o==null||o(),m("div",{class:[`${e}-data-table`,this.rtlEnabled&&`${e}-data-table--rtl`,t,{[`${e}-data-table--bordered`]:this.mergedBordered,[`${e}-data-table--bottom-bordered`]:this.mergedBottomBordered,[`${e}-data-table--single-line`]:this.singleLine,[`${e}-data-table--single-column`]:this.singleColumn,[`${e}-data-table--loading`]:this.loading,[`${e}-data-table--flex-height`]:this.flexHeight}],style:this.cssVars},m("div",{class:`${e}-data-table-wrapper`},m(mD,{ref:"mainTableInstRef"})),this.mergedShowPagination?m("div",{class:`${e}-data-table__pagination`},m(g$,Object.assign({theme:this.mergedTheme.peers.Pagination,themeOverrides:this.mergedTheme.peerOverrides.Pagination,disabled:this.loading},this.mergedPagination))):null,m(go,{name:"fade-in-scale-up-transition"},{default:()=>this.loading?m("div",{class:`${e}-data-table-loading-wrapper`},So(n.loading,()=>[m(kr,Object.assign({clsPrefix:e,strokeWidth:20},r))])):null}))}}),MD={itemFontSize:"12px",itemHeight:"36px",itemWidth:"52px",panelActionPadding:"8px 0"};function og(e){const{popoverColor:t,textColor2:o,primaryColor:n,hoverColor:r,dividerColor:i,opacityDisabled:a,boxShadow2:l,borderRadius:s,iconColor:u,iconColorDisabled:d}=e;return Object.assign(Object.assign({},MD),{panelColor:t,panelBoxShadow:l,panelDividerColor:i,itemTextColor:o,itemTextColorActive:n,itemColorHover:r,itemOpacityDisabled:a,itemBorderRadius:s,borderRadius:s,iconColor:u,iconColorDisabled:d})}const ng={name:"TimePicker",common:je,peers:{Scrollbar:Lo,Button:Ho,Input:Xo},self:og},rg={name:"TimePicker",common:We,peers:{Scrollbar:Zo,Button:Yo,Input:Sn},self:og},RD={itemSize:"24px",itemCellWidth:"38px",itemCellHeight:"32px",scrollItemWidth:"80px",scrollItemHeight:"40px",panelExtraFooterPadding:"8px 12px",panelActionPadding:"8px 12px",calendarTitlePadding:"0",calendarTitleHeight:"28px",arrowSize:"14px",panelHeaderPadding:"8px 12px",calendarDaysHeight:"32px",calendarTitleGridTempateColumns:"28px 28px 1fr 28px 28px",calendarLeftPaddingDate:"6px 12px 4px 12px",calendarLeftPaddingDatetime:"4px 12px",calendarLeftPaddingDaterange:"6px 12px 4px 12px",calendarLeftPaddingDatetimerange:"4px 12px",calendarLeftPaddingMonth:"0",calendarLeftPaddingYear:"0",calendarLeftPaddingQuarter:"0",calendarLeftPaddingMonthrange:"0",calendarLeftPaddingQuarterrange:"0",calendarLeftPaddingYearrange:"0",calendarLeftPaddingWeek:"6px 12px 4px 12px",calendarRightPaddingDate:"6px 12px 4px 12px",calendarRightPaddingDatetime:"4px 12px",calendarRightPaddingDaterange:"6px 12px 4px 12px",calendarRightPaddingDatetimerange:"4px 12px",calendarRightPaddingMonth:"0",calendarRightPaddingYear:"0",calendarRightPaddingQuarter:"0",calendarRightPaddingMonthrange:"0",calendarRightPaddingQuarterrange:"0",calendarRightPaddingYearrange:"0",calendarRightPaddingWeek:"0"};function ig(e){const{hoverColor:t,fontSize:o,textColor2:n,textColorDisabled:r,popoverColor:i,primaryColor:a,borderRadiusSmall:l,iconColor:s,iconColorDisabled:u,textColor1:d,dividerColor:c,boxShadow2:h,borderRadius:f,fontWeightStrong:p}=e;return Object.assign(Object.assign({},RD),{itemFontSize:o,calendarDaysFontSize:o,calendarTitleFontSize:o,itemTextColor:n,itemTextColorDisabled:r,itemTextColorActive:i,itemTextColorCurrent:a,itemColorIncluded:Be(a,{alpha:.1}),itemColorHover:t,itemColorDisabled:t,itemColorActive:a,itemBorderRadius:l,panelColor:i,panelTextColor:n,arrowColor:s,calendarTitleTextColor:d,calendarTitleColorHover:t,calendarDaysTextColor:n,panelHeaderDividerColor:c,calendarDaysDividerColor:c,calendarDividerColor:c,panelActionDividerColor:c,panelBoxShadow:h,panelBorderRadius:f,calendarTitleFontWeight:p,scrollItemBorderRadius:f,iconColor:s,iconColorDisabled:u})}const zD={name:"DatePicker",common:je,peers:{Input:Xo,Button:Ho,TimePicker:ng,Scrollbar:Lo},self:ig},AD={name:"DatePicker",common:We,peers:{Input:Sn,Button:Yo,TimePicker:rg,Scrollbar:Zo},self(e){const{popoverColor:t,hoverColor:o,primaryColor:n}=e,r=ig(e);return r.itemColorDisabled=Ke(t,o),r.itemColorIncluded=Be(n,{alpha:.15}),r.itemColorHover=Ke(t,o),r}},PD={thPaddingBorderedSmall:"8px 12px",thPaddingBorderedMedium:"12px 16px",thPaddingBorderedLarge:"16px 24px",thPaddingSmall:"0",thPaddingMedium:"0",thPaddingLarge:"0",tdPaddingBorderedSmall:"8px 12px",tdPaddingBorderedMedium:"12px 16px",tdPaddingBorderedLarge:"16px 24px",tdPaddingSmall:"0 0 8px 0",tdPaddingMedium:"0 0 12px 0",tdPaddingLarge:"0 0 16px 0"};function ag(e){const{tableHeaderColor:t,textColor2:o,textColor1:n,cardColor:r,modalColor:i,popoverColor:a,dividerColor:l,borderRadius:s,fontWeightStrong:u,lineHeight:d,fontSizeSmall:c,fontSizeMedium:h,fontSizeLarge:f}=e;return Object.assign(Object.assign({},PD),{lineHeight:d,fontSizeSmall:c,fontSizeMedium:h,fontSizeLarge:f,titleTextColor:n,thColor:Ke(r,t),thColorModal:Ke(i,t),thColorPopover:Ke(a,t),thTextColor:n,thFontWeight:u,tdTextColor:o,tdColor:r,tdColorModal:i,tdColorPopover:a,borderColor:Ke(r,l),borderColorModal:Ke(i,l),borderColorPopover:Ke(a,l),borderRadius:s})}const BD={name:"Descriptions",common:je,self:ag},$D={name:"Descriptions",common:We,self:ag},DD={titleFontSize:"18px",padding:"16px 28px 20px 28px",iconSize:"28px",actionSpace:"12px",contentMargin:"8px 0 16px 0",iconMargin:"0 4px 0 0",iconMarginIconTop:"4px 0 8px 0",closeSize:"22px",closeIconSize:"18px",closeMargin:"20px 26px 0 0",closeMarginIconTop:"10px 16px 0 0"};function lg(e){const{textColor1:t,textColor2:o,modalColor:n,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:a,closeColorHover:l,closeColorPressed:s,infoColor:u,successColor:d,warningColor:c,errorColor:h,primaryColor:f,dividerColor:p,borderRadius:g,fontWeightStrong:v,lineHeight:b,fontSize:C}=e;return Object.assign(Object.assign({},DD),{fontSize:C,lineHeight:b,border:`1px solid ${p}`,titleTextColor:t,textColor:o,color:n,closeColorHover:l,closeColorPressed:s,closeIconColor:r,closeIconColorHover:i,closeIconColorPressed:a,closeBorderRadius:g,iconColor:f,iconColorInfo:u,iconColorSuccess:d,iconColorWarning:c,iconColorError:h,borderRadius:g,titleFontWeight:v})}const l3={name:"Dialog",common:je,peers:{Button:Ho},self:lg},sg={name:"Dialog",common:We,peers:{Button:Yo},self:lg},ec={icon:Function,type:{type:String,default:"default"},title:[String,Function],closable:{type:Boolean,default:!0},negativeText:String,positiveText:String,positiveButtonProps:Object,negativeButtonProps:Object,content:[String,Function],action:Function,showIcon:{type:Boolean,default:!0},loading:Boolean,bordered:Boolean,iconPlacement:String,titleClass:[String,Array],titleStyle:[String,Object],contentClass:[String,Array],contentStyle:[String,Object],actionClass:[String,Array],actionStyle:[String,Object],onPositiveClick:Function,onNegativeClick:Function,onClose:Function},ug=Ms(ec),TD=V([B("dialog",` --n-icon-margin: var(--n-icon-margin-top) var(--n-icon-margin-right) var(--n-icon-margin-bottom) var(--n-icon-margin-left); word-break: break-word; line-height: var(--n-line-height); @@ -3516,7 +3516,7 @@ ${t} margin-top: 12px; `),J("left",` margin-right: 12px; - `),Pn()]),Zi(B("slider",[B("slider-dot","background-color: var(--n-dot-color-modal);")])),Wa(B("slider",[B("slider-dot","background-color: var(--n-dot-color-popover);")]))]),aL=0,lL=Object.assign(Object.assign({},Le.props),{to:Ao.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),sL=ye({name:"Slider",props:lL,setup(e){const{mergedClsPrefixRef:t,namespaceRef:o,inlineThemeDisabled:n}=it(e),r=Le("Slider","-slider",iL,Kg,e,t),i=A(null),[a,l]=S4(),[s,u]=S4(),d=A(new Set),c=$n(e),{mergedDisabledRef:h}=c,f=D(()=>{const{step:ne}=e;if(Number(ne)<=0||ne==="mark")return 0;const Y=ne.toString();let de=0;return Y.includes(".")&&(de=Y.length-Y.indexOf(".")-1),de}),p=A(e.defaultValue),g=Te(e,"value"),v=ro(g,p),b=D(()=>{const{value:ne}=v;return(e.range?ne:[ne]).map(X)}),C=D(()=>b.value.length>2),k=D(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),w=D(()=>{const{marks:ne}=e;return ne?Object.keys(ne).map(Number.parseFloat):null}),_=A(-1),M=A(-1),E=A(-1),P=A(!1),z=A(!1),$=D(()=>{const{vertical:ne,reverse:Y}=e;return ne?Y?"top":"bottom":Y?"right":"left"}),G=D(()=>{if(C.value)return;const ne=b.value,Y=le(e.range?Math.min(...ne):e.min),de=le(e.range?Math.max(...ne):ne[0]),{value:Ee}=$;return e.vertical?{[Ee]:`${Y}%`,height:`${de-Y}%`}:{[Ee]:`${Y}%`,width:`${de-Y}%`}}),H=D(()=>{const ne=[],{marks:Y}=e;if(Y){const de=b.value.slice();de.sort((st,Qe)=>st-Qe);const{value:Ee}=$,{value:Ie}=C,{range:$e}=e,Ye=Ie?()=>!1:st=>$e?st>=de[0]&&st<=de[de.length-1]:st<=de[0];for(const st of Object.keys(Y)){const Qe=Number(st);ne.push({active:Ye(Qe),key:Qe,label:Y[st],style:{[Ee]:`${le(Qe)}%`}})}}return ne});function q(ne,Y){const de=le(ne),{value:Ee}=$;return{[Ee]:`${de}%`,zIndex:Y===_.value?1:0}}function W(ne){return e.showTooltip||E.value===ne||_.value===ne&&P.value}function L(ne){return P.value?!(_.value===ne&&M.value===ne):!0}function I(ne){var Y;~ne&&(_.value=ne,(Y=a.get(ne))===null||Y===void 0||Y.focus())}function R(){s.forEach((ne,Y)=>{W(Y)&&ne.syncPosition()})}function O(ne){const{"onUpdate:value":Y,onUpdateValue:de}=e,{nTriggerFormInput:Ee,nTriggerFormChange:Ie}=c;de&&Ae(de,ne),Y&&Ae(Y,ne),p.value=ne,Ee(),Ie()}function oe(ne){const{range:Y}=e;if(Y){if(Array.isArray(ne)){const{value:de}=b;ne.join()!==de.join()&&O(ne)}}else Array.isArray(ne)||b.value[0]!==ne&&O(ne)}function y(ne,Y){if(e.range){const de=b.value.slice();de.splice(Y,1,ne),oe(de)}else oe(ne)}function j(ne,Y,de){const Ee=de!==void 0;de||(de=ne-Y>0?1:-1);const Ie=w.value||[],{step:$e}=e;if($e==="mark"){const Qe=fe(ne,Ie.concat(Y),Ee?de:void 0);return Qe?Qe.value:Y}if($e<=0)return Y;const{value:Ye}=f;let st;if(Ee){const Qe=Number((Y/$e).toFixed(Ye)),mt=Math.floor(Qe),Je=Qe>mt?mt:mt-1,Ne=Qe
0)&&(Ee===null||Ye 0?1:-1),Y)}function be(ne){var Y,de;if(h.value||!w4(ne)&&ne.button!==aL)return;const Ee=ue(ne);if(Ee===void 0)return;const Ie=b.value.slice(),$e=e.range?(de=(Y=fe(Ee,Ie))===null||Y===void 0?void 0:Y.index)!==null&&de!==void 0?de:-1:0;$e!==-1&&(ne.preventDefault(),I($e),ze(),y(j(Ee,b.value[$e]),$e))}function ze(){P.value||(P.value=!0,e.onDragstart&&Ae(e.onDragstart),wt("touchend",document,N),wt("mouseup",document,N),wt("touchmove",document,U),wt("mousemove",document,U))}function pe(){P.value&&(P.value=!1,e.onDragend&&Ae(e.onDragend),yt("touchend",document,N),yt("mouseup",document,N),yt("touchmove",document,U),yt("mousemove",document,U))}function U(ne){const{value:Y}=_;if(!P.value||Y===-1){pe();return}const de=ue(ne);de!==void 0&&y(j(de,b.value[Y]),Y)}function N(){pe()}function ge(ne){_.value=ne,h.value||(E.value=ne)}function Ce(ne){_.value===ne&&(_.value=-1,pe()),E.value===ne&&(E.value=-1)}function se(ne){E.value=ne}function te(ne){E.value===ne&&(E.value=-1)}lt(_,(ne,Y)=>void Rt(()=>M.value=Y)),lt(v,()=>{if(e.marks){if(z.value)return;z.value=!0,Rt(()=>{z.value=!1})}Rt(R)}),Jt(()=>{pe()});const ce=D(()=>{const{self:{markFontSize:ne,railColor:Y,railColorHover:de,fillColor:Ee,fillColorHover:Ie,handleColor:$e,opacityDisabled:Ye,dotColor:st,dotColorModal:Qe,handleBoxShadow:mt,handleBoxShadowHover:Je,handleBoxShadowActive:Ne,handleBoxShadowFocus:ot,dotBorder:ee,dotBoxShadow:me,railHeight:Pe,railWidthVertical:Ve,handleSize:Ue,dotHeight:qe,dotWidth:Ze,dotBorderRadius:nt,fontSize:Ct,dotBorderActive:Ot,dotColorPopover:_t},common:{cubicBezierEaseInOut:yo}}=r.value;return{"--n-bezier":yo,"--n-dot-border":ee,"--n-dot-border-active":Ot,"--n-dot-border-radius":nt,"--n-dot-box-shadow":me,"--n-dot-color":st,"--n-dot-color-modal":Qe,"--n-dot-color-popover":_t,"--n-dot-height":qe,"--n-dot-width":Ze,"--n-fill-color":Ee,"--n-fill-color-hover":Ie,"--n-font-size":Ct,"--n-handle-box-shadow":mt,"--n-handle-box-shadow-active":Ne,"--n-handle-box-shadow-focus":ot,"--n-handle-box-shadow-hover":Je,"--n-handle-color":$e,"--n-handle-size":Ue,"--n-opacity-disabled":Ye,"--n-rail-color":Y,"--n-rail-color-hover":de,"--n-rail-height":Pe,"--n-rail-width-vertical":Ve,"--n-mark-font-size":ne}}),Q=n?vt("slider",void 0,ce,e):void 0,re=D(()=>{const{self:{fontSize:ne,indicatorColor:Y,indicatorBoxShadow:de,indicatorTextColor:Ee,indicatorBorderRadius:Ie}}=r.value;return{"--n-font-size":ne,"--n-indicator-border-radius":Ie,"--n-indicator-box-shadow":de,"--n-indicator-color":Y,"--n-indicator-text-color":Ee}}),he=n?vt("slider-indicator",void 0,re,e):void 0;return{mergedClsPrefix:t,namespace:o,uncontrolledValue:p,mergedValue:v,mergedDisabled:h,mergedPlacement:k,isMounted:Cr(),adjustedTo:Ao(e),dotTransitionDisabled:z,markInfos:H,isShowTooltip:W,shouldKeepTooltipTransition:L,handleRailRef:i,setHandleRefs:l,setFollowerRefs:u,fillStyle:G,getHandleStyle:q,activeIndex:_,arrifiedValues:b,followerEnabledIndexSet:d,handleRailMouseDown:be,handleHandleFocus:ge,handleHandleBlur:Ce,handleHandleMouseEnter:se,handleHandleMouseLeave:te,handleRailKeyDown:we,indicatorCssVars:n?void 0:re,indicatorThemeClass:he==null?void 0:he.themeClass,indicatorOnRender:he==null?void 0:he.onRender,cssVars:n?void 0:ce,themeClass:Q==null?void 0:Q.themeClass,onRender:Q==null?void 0:Q.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:o,formatTooltip:n}=this;return(e=this.onRender)===null||e===void 0||e.call(this),m("div",{class:[`${t}-slider`,o,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},m("div",{class:`${t}-slider-rail`},m("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?m("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(r=>m("div",{key:r.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:r.active}],style:r.style}))):null,m("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((r,i)=>{const a=this.isShowTooltip(i);return m(As,null,{default:()=>[m(Ps,null,{default:()=>m("div",{ref:this.setHandleRefs(i),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":r,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(r,i),onFocus:()=>{this.handleHandleFocus(i)},onBlur:()=>{this.handleHandleBlur(i)},onMouseenter:()=>{this.handleHandleMouseEnter(i)},onMouseleave:()=>{this.handleHandleMouseLeave(i)}},So(this.$slots.thumb,()=>[m("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&m(Bs,{ref:this.setFollowerRefs(i),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(i),teleportDisabled:this.adjustedTo===Ao.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>m(go,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(i),onEnter:()=>{this.followerEnabledIndexSet.add(i)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(i)}},{default:()=>{var l;return a?((l=this.indicatorOnRender)===null||l===void 0||l.call(this),m("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof n=="function"?n(r):r)):null}})})]})})),this.marks?m("div",{class:`${t}-slider-marks`},this.markInfos.map(r=>m("div",{key:r.key,class:`${t}-slider-mark`,style:r.style},typeof r.label=="function"?r.label():r.label))):null))}}),uL=V([V("@keyframes spin-rotate",` + `),Pn()]),Zi(B("slider",[B("slider-dot","background-color: var(--n-dot-color-modal);")])),Wa(B("slider",[B("slider-dot","background-color: var(--n-dot-color-popover);")]))]),aL=0,lL=Object.assign(Object.assign({},Le.props),{to:Ao.propTo,defaultValue:{type:[Number,Array],default:0},marks:Object,disabled:{type:Boolean,default:void 0},formatTooltip:Function,keyboard:{type:Boolean,default:!0},min:{type:Number,default:0},max:{type:Number,default:100},step:{type:[Number,String],default:1},range:Boolean,value:[Number,Array],placement:String,showTooltip:{type:Boolean,default:void 0},tooltip:{type:Boolean,default:!0},vertical:Boolean,reverse:Boolean,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onDragstart:[Function],onDragend:[Function]}),sL=ye({name:"Slider",props:lL,setup(e){const{mergedClsPrefixRef:t,namespaceRef:o,inlineThemeDisabled:n}=it(e),r=Le("Slider","-slider",iL,Kg,e,t),i=A(null),[a,l]=S4(),[s,u]=S4(),d=A(new Set),c=$n(e),{mergedDisabledRef:h}=c,f=D(()=>{const{step:ne}=e;if(Number(ne)<=0||ne==="mark")return 0;const Y=ne.toString();let de=0;return Y.includes(".")&&(de=Y.length-Y.indexOf(".")-1),de}),p=A(e.defaultValue),g=Te(e,"value"),v=ro(g,p),b=D(()=>{const{value:ne}=v;return(e.range?ne:[ne]).map(X)}),C=D(()=>b.value.length>2),k=D(()=>e.placement===void 0?e.vertical?"right":"top":e.placement),w=D(()=>{const{marks:ne}=e;return ne?Object.keys(ne).map(Number.parseFloat):null}),_=A(-1),M=A(-1),E=A(-1),P=A(!1),z=A(!1),$=D(()=>{const{vertical:ne,reverse:Y}=e;return ne?Y?"top":"bottom":Y?"right":"left"}),G=D(()=>{if(C.value)return;const ne=b.value,Y=le(e.range?Math.min(...ne):e.min),de=le(e.range?Math.max(...ne):ne[0]),{value:Ee}=$;return e.vertical?{[Ee]:`${Y}%`,height:`${de-Y}%`}:{[Ee]:`${Y}%`,width:`${de-Y}%`}}),H=D(()=>{const ne=[],{marks:Y}=e;if(Y){const de=b.value.slice();de.sort((st,Je)=>st-Je);const{value:Ee}=$,{value:Ie}=C,{range:$e}=e,Qe=Ie?()=>!1:st=>$e?st>=de[0]&&st<=de[de.length-1]:st<=de[0];for(const st of Object.keys(Y)){const Je=Number(st);ne.push({active:Qe(Je),key:Je,label:Y[st],style:{[Ee]:`${le(Je)}%`}})}}return ne});function q(ne,Y){const de=le(ne),{value:Ee}=$;return{[Ee]:`${de}%`,zIndex:Y===_.value?1:0}}function W(ne){return e.showTooltip||E.value===ne||_.value===ne&&P.value}function L(ne){return P.value?!(_.value===ne&&M.value===ne):!0}function I(ne){var Y;~ne&&(_.value=ne,(Y=a.get(ne))===null||Y===void 0||Y.focus())}function R(){s.forEach((ne,Y)=>{W(Y)&&ne.syncPosition()})}function O(ne){const{"onUpdate:value":Y,onUpdateValue:de}=e,{nTriggerFormInput:Ee,nTriggerFormChange:Ie}=c;de&&Ae(de,ne),Y&&Ae(Y,ne),p.value=ne,Ee(),Ie()}function oe(ne){const{range:Y}=e;if(Y){if(Array.isArray(ne)){const{value:de}=b;ne.join()!==de.join()&&O(ne)}}else Array.isArray(ne)||b.value[0]!==ne&&O(ne)}function y(ne,Y){if(e.range){const de=b.value.slice();de.splice(Y,1,ne),oe(de)}else oe(ne)}function j(ne,Y,de){const Ee=de!==void 0;de||(de=ne-Y>0?1:-1);const Ie=w.value||[],{step:$e}=e;if($e==="mark"){const Je=fe(ne,Ie.concat(Y),Ee?de:void 0);return Je?Je.value:Y}if($e<=0)return Y;const{value:Qe}=f;let st;if(Ee){const Je=Number((Y/$e).toFixed(Qe)),mt=Math.floor(Je),et=Je>mt?mt:mt-1,Ne=Je 0)&&(Ee===null||Qe 0?1:-1),Y)}function be(ne){var Y,de;if(h.value||!w4(ne)&&ne.button!==aL)return;const Ee=ue(ne);if(Ee===void 0)return;const Ie=b.value.slice(),$e=e.range?(de=(Y=fe(Ee,Ie))===null||Y===void 0?void 0:Y.index)!==null&&de!==void 0?de:-1:0;$e!==-1&&(ne.preventDefault(),I($e),ze(),y(j(Ee,b.value[$e]),$e))}function ze(){P.value||(P.value=!0,e.onDragstart&&Ae(e.onDragstart),wt("touchend",document,N),wt("mouseup",document,N),wt("touchmove",document,U),wt("mousemove",document,U))}function pe(){P.value&&(P.value=!1,e.onDragend&&Ae(e.onDragend),yt("touchend",document,N),yt("mouseup",document,N),yt("touchmove",document,U),yt("mousemove",document,U))}function U(ne){const{value:Y}=_;if(!P.value||Y===-1){pe();return}const de=ue(ne);de!==void 0&&y(j(de,b.value[Y]),Y)}function N(){pe()}function ge(ne){_.value=ne,h.value||(E.value=ne)}function Ce(ne){_.value===ne&&(_.value=-1,pe()),E.value===ne&&(E.value=-1)}function se(ne){E.value=ne}function te(ne){E.value===ne&&(E.value=-1)}lt(_,(ne,Y)=>void Rt(()=>M.value=Y)),lt(v,()=>{if(e.marks){if(z.value)return;z.value=!0,Rt(()=>{z.value=!1})}Rt(R)}),Jt(()=>{pe()});const ce=D(()=>{const{self:{markFontSize:ne,railColor:Y,railColorHover:de,fillColor:Ee,fillColorHover:Ie,handleColor:$e,opacityDisabled:Qe,dotColor:st,dotColorModal:Je,handleBoxShadow:mt,handleBoxShadowHover:et,handleBoxShadowActive:Ne,handleBoxShadowFocus:ot,dotBorder:ee,dotBoxShadow:me,railHeight:Pe,railWidthVertical:Ve,handleSize:Ue,dotHeight:qe,dotWidth:Ze,dotBorderRadius:nt,fontSize:Ct,dotBorderActive:Ot,dotColorPopover:_t},common:{cubicBezierEaseInOut:yo}}=r.value;return{"--n-bezier":yo,"--n-dot-border":ee,"--n-dot-border-active":Ot,"--n-dot-border-radius":nt,"--n-dot-box-shadow":me,"--n-dot-color":st,"--n-dot-color-modal":Je,"--n-dot-color-popover":_t,"--n-dot-height":qe,"--n-dot-width":Ze,"--n-fill-color":Ee,"--n-fill-color-hover":Ie,"--n-font-size":Ct,"--n-handle-box-shadow":mt,"--n-handle-box-shadow-active":Ne,"--n-handle-box-shadow-focus":ot,"--n-handle-box-shadow-hover":et,"--n-handle-color":$e,"--n-handle-size":Ue,"--n-opacity-disabled":Qe,"--n-rail-color":Y,"--n-rail-color-hover":de,"--n-rail-height":Pe,"--n-rail-width-vertical":Ve,"--n-mark-font-size":ne}}),Q=n?vt("slider",void 0,ce,e):void 0,re=D(()=>{const{self:{fontSize:ne,indicatorColor:Y,indicatorBoxShadow:de,indicatorTextColor:Ee,indicatorBorderRadius:Ie}}=r.value;return{"--n-font-size":ne,"--n-indicator-border-radius":Ie,"--n-indicator-box-shadow":de,"--n-indicator-color":Y,"--n-indicator-text-color":Ee}}),he=n?vt("slider-indicator",void 0,re,e):void 0;return{mergedClsPrefix:t,namespace:o,uncontrolledValue:p,mergedValue:v,mergedDisabled:h,mergedPlacement:k,isMounted:Cr(),adjustedTo:Ao(e),dotTransitionDisabled:z,markInfos:H,isShowTooltip:W,shouldKeepTooltipTransition:L,handleRailRef:i,setHandleRefs:l,setFollowerRefs:u,fillStyle:G,getHandleStyle:q,activeIndex:_,arrifiedValues:b,followerEnabledIndexSet:d,handleRailMouseDown:be,handleHandleFocus:ge,handleHandleBlur:Ce,handleHandleMouseEnter:se,handleHandleMouseLeave:te,handleRailKeyDown:we,indicatorCssVars:n?void 0:re,indicatorThemeClass:he==null?void 0:he.themeClass,indicatorOnRender:he==null?void 0:he.onRender,cssVars:n?void 0:ce,themeClass:Q==null?void 0:Q.themeClass,onRender:Q==null?void 0:Q.onRender}},render(){var e;const{mergedClsPrefix:t,themeClass:o,formatTooltip:n}=this;return(e=this.onRender)===null||e===void 0||e.call(this),m("div",{class:[`${t}-slider`,o,{[`${t}-slider--disabled`]:this.mergedDisabled,[`${t}-slider--active`]:this.activeIndex!==-1,[`${t}-slider--with-mark`]:this.marks,[`${t}-slider--vertical`]:this.vertical,[`${t}-slider--reverse`]:this.reverse}],style:this.cssVars,onKeydown:this.handleRailKeyDown,onMousedown:this.handleRailMouseDown,onTouchstart:this.handleRailMouseDown},m("div",{class:`${t}-slider-rail`},m("div",{class:`${t}-slider-rail__fill`,style:this.fillStyle}),this.marks?m("div",{class:[`${t}-slider-dots`,this.dotTransitionDisabled&&`${t}-slider-dots--transition-disabled`]},this.markInfos.map(r=>m("div",{key:r.key,class:[`${t}-slider-dot`,{[`${t}-slider-dot--active`]:r.active}],style:r.style}))):null,m("div",{ref:"handleRailRef",class:`${t}-slider-handles`},this.arrifiedValues.map((r,i)=>{const a=this.isShowTooltip(i);return m(As,null,{default:()=>[m(Ps,null,{default:()=>m("div",{ref:this.setHandleRefs(i),class:`${t}-slider-handle-wrapper`,tabindex:this.mergedDisabled?-1:0,role:"slider","aria-valuenow":r,"aria-valuemin":this.min,"aria-valuemax":this.max,"aria-orientation":this.vertical?"vertical":"horizontal","aria-disabled":this.disabled,style:this.getHandleStyle(r,i),onFocus:()=>{this.handleHandleFocus(i)},onBlur:()=>{this.handleHandleBlur(i)},onMouseenter:()=>{this.handleHandleMouseEnter(i)},onMouseleave:()=>{this.handleHandleMouseLeave(i)}},So(this.$slots.thumb,()=>[m("div",{class:`${t}-slider-handle`})]))}),this.tooltip&&m(Bs,{ref:this.setFollowerRefs(i),show:a,to:this.adjustedTo,enabled:this.showTooltip&&!this.range||this.followerEnabledIndexSet.has(i),teleportDisabled:this.adjustedTo===Ao.tdkey,placement:this.mergedPlacement,containerClass:this.namespace},{default:()=>m(go,{name:"fade-in-scale-up-transition",appear:this.isMounted,css:this.shouldKeepTooltipTransition(i),onEnter:()=>{this.followerEnabledIndexSet.add(i)},onAfterLeave:()=>{this.followerEnabledIndexSet.delete(i)}},{default:()=>{var l;return a?((l=this.indicatorOnRender)===null||l===void 0||l.call(this),m("div",{class:[`${t}-slider-handle-indicator`,this.indicatorThemeClass,`${t}-slider-handle-indicator--${this.mergedPlacement}`],style:this.indicatorCssVars},typeof n=="function"?n(r):r)):null}})})]})})),this.marks?m("div",{class:`${t}-slider-marks`},this.markInfos.map(r=>m("div",{key:r.key,class:`${t}-slider-mark`,style:r.style},typeof r.label=="function"?r.label():r.label))):null))}}),uL=V([V("@keyframes spin-rotate",` from { transform: rotate(0); } @@ -4106,7 +4106,7 @@ ${t} border-top: 1px solid var(--n-tab-border-color); `),B("tabs-pad",` border-top: 1px solid var(--n-tab-border-color); - `)])])])]),ML=Object.assign(Object.assign({},Le.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),RL=ye({name:"Tabs",props:ML,setup(e,{slots:t}){var o,n,r,i;const{mergedClsPrefixRef:a,inlineThemeDisabled:l}=it(e),s=Le("Tabs","-tabs",_L,nv,e,a),u=A(null),d=A(null),c=A(null),h=A(null),f=A(null),p=A(null),g=A(!0),v=A(!0),b=is(e,["labelSize","size"]),C=is(e,["activeName","value"]),k=A((n=(o=C.value)!==null&&o!==void 0?o:e.defaultValue)!==null&&n!==void 0?n:t.default?(i=(r=vr(t.default())[0])===null||r===void 0?void 0:r.props)===null||i===void 0?void 0:i.name:null),w=ro(C,k),_={id:0},M=D(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});lt(w,()=>{_.id=0,G(),H()});function E(){var Q;const{value:re}=w;return re===null?null:(Q=u.value)===null||Q===void 0?void 0:Q.querySelector(`[data-name="${re}"]`)}function P(Q){if(e.type==="card")return;const{value:re}=d;if(!re)return;const he=re.style.opacity==="0";if(Q){const ne=`${a.value}-tabs-bar--disabled`,{barWidth:Y,placement:de}=e;if(Q.dataset.disabled==="true"?re.classList.add(ne):re.classList.remove(ne),["top","bottom"].includes(de)){if($(["top","maxHeight","height"]),typeof Y=="number"&&Q.offsetWidth>=Y){const Ee=Math.floor((Q.offsetWidth-Y)/2)+Q.offsetLeft;re.style.left=`${Ee}px`,re.style.maxWidth=`${Y}px`}else re.style.left=`${Q.offsetLeft}px`,re.style.maxWidth=`${Q.offsetWidth}px`;re.style.width="8192px",he&&(re.style.transition="none"),re.offsetWidth,he&&(re.style.transition="",re.style.opacity="1")}else{if($(["left","maxWidth","width"]),typeof Y=="number"&&Q.offsetHeight>=Y){const Ee=Math.floor((Q.offsetHeight-Y)/2)+Q.offsetTop;re.style.top=`${Ee}px`,re.style.maxHeight=`${Y}px`}else re.style.top=`${Q.offsetTop}px`,re.style.maxHeight=`${Q.offsetHeight}px`;re.style.height="8192px",he&&(re.style.transition="none"),re.offsetHeight,he&&(re.style.transition="",re.style.opacity="1")}}}function z(){if(e.type==="card")return;const{value:Q}=d;Q&&(Q.style.opacity="0")}function $(Q){const{value:re}=d;if(re)for(const he of Q)re.style[he]=""}function G(){if(e.type==="card")return;const Q=E();Q?P(Q):z()}function H(){var Q;const re=(Q=f.value)===null||Q===void 0?void 0:Q.$el;if(!re)return;const he=E();if(!he)return;const{scrollLeft:ne,offsetWidth:Y}=re,{offsetLeft:de,offsetWidth:Ee}=he;ne>de?re.scrollTo({top:0,left:de,behavior:"smooth"}):de+Ee>ne+Y&&re.scrollTo({top:0,left:de+Ee-Y,behavior:"smooth"})}const q=A(null);let W=0,L=null;function I(Q){const re=q.value;if(re){W=Q.getBoundingClientRect().height;const he=`${W}px`,ne=()=>{re.style.height=he,re.style.maxHeight=he};L?(ne(),L(),L=null):L=ne}}function R(Q){const re=q.value;if(re){const he=Q.getBoundingClientRect().height,ne=()=>{document.body.offsetHeight,re.style.maxHeight=`${he}px`,re.style.height=`${Math.max(W,he)}px`};L?(L(),L=null,ne()):L=ne}}function O(){const Q=q.value;if(Q){Q.style.maxHeight="",Q.style.height="";const{paneWrapperStyle:re}=e;if(typeof re=="string")Q.style.cssText=re;else if(re){const{maxHeight:he,height:ne}=re;he!==void 0&&(Q.style.maxHeight=he),ne!==void 0&&(Q.style.height=ne)}}}const oe={value:[]},y=A("next");function j(Q){const re=w.value;let he="next";for(const ne of oe.value){if(ne===re)break;if(ne===Q){he="prev";break}}y.value=he,X(Q)}function X(Q){const{onActiveNameChange:re,onUpdateValue:he,"onUpdate:value":ne}=e;re&&Ae(re,Q),he&&Ae(he,Q),ne&&Ae(ne,Q),k.value=Q}function le(Q){const{onClose:re}=e;re&&Ae(re,Q)}function ae(){const{value:Q}=d;if(!Q)return;const re="transition-disabled";Q.classList.add(re),G(),Q.classList.remove(re)}const Fe=A(null);function fe({transitionDisabled:Q}){const re=u.value;if(!re)return;Q&&re.classList.add("transition-disabled");const he=E();he&&Fe.value&&(Fe.value.style.width=`${he.offsetWidth}px`,Fe.value.style.height=`${he.offsetHeight}px`,Fe.value.style.transform=`translateX(${he.offsetLeft-uo(getComputedStyle(re).paddingLeft)}px)`,Q&&Fe.value.offsetWidth),Q&&re.classList.remove("transition-disabled")}lt([w],()=>{e.type==="segment"&&Rt(()=>{fe({transitionDisabled:!1})})}),ut(()=>{e.type==="segment"&&fe({transitionDisabled:!0})});let ue=0;function we(Q){var re;if(Q.contentRect.width===0&&Q.contentRect.height===0||ue===Q.contentRect.width)return;ue=Q.contentRect.width;const{type:he}=e;if((he==="line"||he==="bar")&&ae(),he!=="segment"){const{placement:ne}=e;N((ne==="top"||ne==="bottom"?(re=f.value)===null||re===void 0?void 0:re.$el:p.value)||null)}}const ie=Ou(we,64);lt([()=>e.justifyContent,()=>e.size],()=>{Rt(()=>{const{type:Q}=e;(Q==="line"||Q==="bar")&&ae()})});const be=A(!1);function ze(Q){var re;const{target:he,contentRect:{width:ne,height:Y}}=Q,de=he.parentElement.parentElement.offsetWidth,Ee=he.parentElement.parentElement.offsetHeight,{placement:Ie}=e;if(!be.value)Ie==="top"||Ie==="bottom"?de $e.$el.offsetWidth&&(be.value=!1):Ee-Y>$e.$el.offsetHeight&&(be.value=!1)}N(((re=f.value)===null||re===void 0?void 0:re.$el)||null)}const pe=Ou(ze,64);function U(){const{onAdd:Q}=e;Q&&Q(),Rt(()=>{const re=E(),{value:he}=f;!re||!he||he.scrollTo({left:re.offsetLeft,top:0,behavior:"smooth"})})}function N(Q){if(!Q)return;const{placement:re}=e;if(re==="top"||re==="bottom"){const{scrollLeft:he,scrollWidth:ne,offsetWidth:Y}=Q;g.value=he<=0,v.value=he+Y>=ne}else{const{scrollTop:he,scrollHeight:ne,offsetHeight:Y}=Q;g.value=he<=0,v.value=he+Y>=ne}}const ge=Ou(Q=>{N(Q.target)},64);tt(f3,{triggerRef:Te(e,"trigger"),tabStyleRef:Te(e,"tabStyle"),tabClassRef:Te(e,"tabClass"),addTabStyleRef:Te(e,"addTabStyle"),addTabClassRef:Te(e,"addTabClass"),paneClassRef:Te(e,"paneClass"),paneStyleRef:Te(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:Te(e,"type"),closableRef:Te(e,"closable"),valueRef:w,tabChangeIdRef:_,onBeforeLeaveRef:Te(e,"onBeforeLeave"),activateTab:j,handleClose:le,handleAdd:U}),x6(()=>{G(),H()}),kt(()=>{const{value:Q}=c;if(!Q)return;const{value:re}=a,he=`${re}-tabs-nav-scroll-wrapper--shadow-start`,ne=`${re}-tabs-nav-scroll-wrapper--shadow-end`;g.value?Q.classList.remove(he):Q.classList.add(he),v.value?Q.classList.remove(ne):Q.classList.add(ne)});const Ce={syncBarPosition:()=>{G()}},se=()=>{fe({transitionDisabled:!0})},te=D(()=>{const{value:Q}=b,{type:re}=e,he={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[re],ne=`${Q}${he}`,{self:{barColor:Y,closeIconColor:de,closeIconColorHover:Ee,closeIconColorPressed:Ie,tabColor:$e,tabBorderColor:Ye,paneTextColor:st,tabFontWeight:Qe,tabBorderRadius:mt,tabFontWeightActive:Je,colorSegment:Ne,fontWeightStrong:ot,tabColorSegment:ee,closeSize:me,closeIconSize:Pe,closeColorHover:Ve,closeColorPressed:Ue,closeBorderRadius:qe,[_e("panePadding",Q)]:Ze,[_e("tabPadding",ne)]:nt,[_e("tabPaddingVertical",ne)]:Ct,[_e("tabGap",ne)]:Ot,[_e("tabGap",`${ne}Vertical`)]:_t,[_e("tabTextColor",re)]:yo,[_e("tabTextColorActive",re)]:Po,[_e("tabTextColorHover",re)]:Bo,[_e("tabTextColorDisabled",re)]:No,[_e("tabFontSize",Q)]:Vo},common:{cubicBezierEaseInOut:un}}=s.value;return{"--n-bezier":un,"--n-color-segment":Ne,"--n-bar-color":Y,"--n-tab-font-size":Vo,"--n-tab-text-color":yo,"--n-tab-text-color-active":Po,"--n-tab-text-color-disabled":No,"--n-tab-text-color-hover":Bo,"--n-pane-text-color":st,"--n-tab-border-color":Ye,"--n-tab-border-radius":mt,"--n-close-size":me,"--n-close-icon-size":Pe,"--n-close-color-hover":Ve,"--n-close-color-pressed":Ue,"--n-close-border-radius":qe,"--n-close-icon-color":de,"--n-close-icon-color-hover":Ee,"--n-close-icon-color-pressed":Ie,"--n-tab-color":$e,"--n-tab-font-weight":Qe,"--n-tab-font-weight-active":Je,"--n-tab-padding":nt,"--n-tab-padding-vertical":Ct,"--n-tab-gap":Ot,"--n-tab-gap-vertical":_t,"--n-pane-padding-left":Mo(Ze,"left"),"--n-pane-padding-right":Mo(Ze,"right"),"--n-pane-padding-top":Mo(Ze,"top"),"--n-pane-padding-bottom":Mo(Ze,"bottom"),"--n-font-weight-strong":ot,"--n-tab-color-segment":ee}}),ce=l?vt("tabs",D(()=>`${b.value[0]}${e.type[0]}`),te,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:w,renderedNames:new Set,segmentCapsuleElRef:Fe,tabsPaneWrapperRef:q,tabsElRef:u,barElRef:d,addTabInstRef:h,xScrollInstRef:f,scrollWrapperElRef:c,addTabFixed:be,tabWrapperStyle:M,handleNavResize:ie,mergedSize:b,handleScroll:ge,handleTabsResize:pe,cssVars:l?void 0:te,themeClass:ce==null?void 0:ce.themeClass,animationDirection:y,renderNameListRef:oe,yScrollElRef:p,handleSegmentResize:se,onAnimationBeforeLeave:I,onAnimationEnter:R,onAnimationAfterEnter:O,onRender:ce==null?void 0:ce.onRender},Ce)},render(){const{mergedClsPrefix:e,type:t,placement:o,addTabFixed:n,addable:r,mergedSize:i,renderNameListRef:a,onRender:l,paneWrapperClass:s,paneWrapperStyle:u,$slots:{default:d,prefix:c,suffix:h}}=this;l==null||l();const f=d?vr(d()).filter(_=>_.type.__TAB_PANE__===!0):[],p=d?vr(d()).filter(_=>_.type.__TAB__===!0):[],g=!p.length,v=t==="card",b=t==="segment",C=!v&&!b&&this.justifyContent;a.value=[];const k=()=>{const _=m("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},C?null:m("div",{class:`${e}-tabs-scroll-padding`,style:o==="top"||o==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?f.map((M,E)=>(a.value.push(M.props.name),c0(m(ud,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:E!==0&&(!C||C==="center"||C==="start"||C==="end")}),M.children?{default:M.children.tab}:void 0)))):p.map((M,E)=>(a.value.push(M.props.name),c0(E!==0&&!C?k4(M):M))),!n&&r&&v?E4(r,(g?f.length:p.length)!==0):null,C?null:m("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return m("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},v&&r?m(Rn,{onResize:this.handleTabsResize},{default:()=>_}):_,v?m("div",{class:`${e}-tabs-pad`}):null,v?null:m("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},w=b?"top":o;return m("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${i}-size`,C&&`${e}-tabs--flex`,`${e}-tabs--${w}`],style:this.cssVars},m("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${w}`,`${e}-tabs-nav`]},xt(c,_=>_&&m("div",{class:`${e}-tabs-nav__prefix`},_)),b?m(Rn,{onResize:this.handleSegmentResize},{default:()=>m("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},m("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},m("div",{class:`${e}-tabs-wrapper`},m("div",{class:`${e}-tabs-tab`}))),g?f.map((_,M)=>(a.value.push(_.props.name),m(ud,Object.assign({},_.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),_.children?{default:_.children.tab}:void 0))):p.map((_,M)=>(a.value.push(_.props.name),M===0?_:k4(_))))}):m(Rn,{onResize:this.handleNavResize},{default:()=>m("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(w)?m(fS,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:k}):m("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},k()))}),n&&r&&v?E4(r,!0):null,xt(h,_=>_&&m("div",{class:`${e}-tabs-nav__suffix`},_))),g&&(this.animated&&(w==="top"||w==="bottom")?m("div",{ref:"tabsPaneWrapperRef",style:u,class:[`${e}-tabs-pane-wrapper`,s]},F4(f,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):F4(f,this.mergedValue,this.renderedNames)))}});function F4(e,t,o,n,r,i,a){const l=[];return e.forEach(s=>{const{name:u,displayDirective:d,"display-directive":c}=s.props,h=p=>d===p||c===p,f=t===u;if(s.key!==void 0&&(s.key=u),f||h("show")||h("show:lazy")&&o.has(u)){o.has(u)||o.add(u);const p=!h("if");l.push(p?zo(s,[[bn,f]]):s)}}),a?m(c6,{name:`${a}-transition`,onBeforeLeave:n,onEnter:r,onAfterEnter:i},{default:()=>l}):l}function E4(e,t){return m(ud,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function k4(e){const t=qo(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function c0(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}const zL=V([B("watermark-container",` + `)])])])]),ML=Object.assign(Object.assign({},Le.props),{value:[String,Number],defaultValue:[String,Number],trigger:{type:String,default:"click"},type:{type:String,default:"bar"},closable:Boolean,justifyContent:String,size:{type:String,default:"medium"},placement:{type:String,default:"top"},tabStyle:[String,Object],tabClass:String,addTabStyle:[String,Object],addTabClass:String,barWidth:Number,paneClass:String,paneStyle:[String,Object],paneWrapperClass:String,paneWrapperStyle:[String,Object],addable:[Boolean,Object],tabsPadding:{type:Number,default:0},animated:Boolean,onBeforeLeave:Function,onAdd:Function,"onUpdate:value":[Function,Array],onUpdateValue:[Function,Array],onClose:[Function,Array],labelSize:String,activeName:[String,Number],onActiveNameChange:[Function,Array]}),RL=ye({name:"Tabs",props:ML,setup(e,{slots:t}){var o,n,r,i;const{mergedClsPrefixRef:a,inlineThemeDisabled:l}=it(e),s=Le("Tabs","-tabs",_L,nv,e,a),u=A(null),d=A(null),c=A(null),h=A(null),f=A(null),p=A(null),g=A(!0),v=A(!0),b=is(e,["labelSize","size"]),C=is(e,["activeName","value"]),k=A((n=(o=C.value)!==null&&o!==void 0?o:e.defaultValue)!==null&&n!==void 0?n:t.default?(i=(r=vr(t.default())[0])===null||r===void 0?void 0:r.props)===null||i===void 0?void 0:i.name:null),w=ro(C,k),_={id:0},M=D(()=>{if(!(!e.justifyContent||e.type==="card"))return{display:"flex",justifyContent:e.justifyContent}});lt(w,()=>{_.id=0,G(),H()});function E(){var Q;const{value:re}=w;return re===null?null:(Q=u.value)===null||Q===void 0?void 0:Q.querySelector(`[data-name="${re}"]`)}function P(Q){if(e.type==="card")return;const{value:re}=d;if(!re)return;const he=re.style.opacity==="0";if(Q){const ne=`${a.value}-tabs-bar--disabled`,{barWidth:Y,placement:de}=e;if(Q.dataset.disabled==="true"?re.classList.add(ne):re.classList.remove(ne),["top","bottom"].includes(de)){if($(["top","maxHeight","height"]),typeof Y=="number"&&Q.offsetWidth>=Y){const Ee=Math.floor((Q.offsetWidth-Y)/2)+Q.offsetLeft;re.style.left=`${Ee}px`,re.style.maxWidth=`${Y}px`}else re.style.left=`${Q.offsetLeft}px`,re.style.maxWidth=`${Q.offsetWidth}px`;re.style.width="8192px",he&&(re.style.transition="none"),re.offsetWidth,he&&(re.style.transition="",re.style.opacity="1")}else{if($(["left","maxWidth","width"]),typeof Y=="number"&&Q.offsetHeight>=Y){const Ee=Math.floor((Q.offsetHeight-Y)/2)+Q.offsetTop;re.style.top=`${Ee}px`,re.style.maxHeight=`${Y}px`}else re.style.top=`${Q.offsetTop}px`,re.style.maxHeight=`${Q.offsetHeight}px`;re.style.height="8192px",he&&(re.style.transition="none"),re.offsetHeight,he&&(re.style.transition="",re.style.opacity="1")}}}function z(){if(e.type==="card")return;const{value:Q}=d;Q&&(Q.style.opacity="0")}function $(Q){const{value:re}=d;if(re)for(const he of Q)re.style[he]=""}function G(){if(e.type==="card")return;const Q=E();Q?P(Q):z()}function H(){var Q;const re=(Q=f.value)===null||Q===void 0?void 0:Q.$el;if(!re)return;const he=E();if(!he)return;const{scrollLeft:ne,offsetWidth:Y}=re,{offsetLeft:de,offsetWidth:Ee}=he;ne>de?re.scrollTo({top:0,left:de,behavior:"smooth"}):de+Ee>ne+Y&&re.scrollTo({top:0,left:de+Ee-Y,behavior:"smooth"})}const q=A(null);let W=0,L=null;function I(Q){const re=q.value;if(re){W=Q.getBoundingClientRect().height;const he=`${W}px`,ne=()=>{re.style.height=he,re.style.maxHeight=he};L?(ne(),L(),L=null):L=ne}}function R(Q){const re=q.value;if(re){const he=Q.getBoundingClientRect().height,ne=()=>{document.body.offsetHeight,re.style.maxHeight=`${he}px`,re.style.height=`${Math.max(W,he)}px`};L?(L(),L=null,ne()):L=ne}}function O(){const Q=q.value;if(Q){Q.style.maxHeight="",Q.style.height="";const{paneWrapperStyle:re}=e;if(typeof re=="string")Q.style.cssText=re;else if(re){const{maxHeight:he,height:ne}=re;he!==void 0&&(Q.style.maxHeight=he),ne!==void 0&&(Q.style.height=ne)}}}const oe={value:[]},y=A("next");function j(Q){const re=w.value;let he="next";for(const ne of oe.value){if(ne===re)break;if(ne===Q){he="prev";break}}y.value=he,X(Q)}function X(Q){const{onActiveNameChange:re,onUpdateValue:he,"onUpdate:value":ne}=e;re&&Ae(re,Q),he&&Ae(he,Q),ne&&Ae(ne,Q),k.value=Q}function le(Q){const{onClose:re}=e;re&&Ae(re,Q)}function ae(){const{value:Q}=d;if(!Q)return;const re="transition-disabled";Q.classList.add(re),G(),Q.classList.remove(re)}const Fe=A(null);function fe({transitionDisabled:Q}){const re=u.value;if(!re)return;Q&&re.classList.add("transition-disabled");const he=E();he&&Fe.value&&(Fe.value.style.width=`${he.offsetWidth}px`,Fe.value.style.height=`${he.offsetHeight}px`,Fe.value.style.transform=`translateX(${he.offsetLeft-uo(getComputedStyle(re).paddingLeft)}px)`,Q&&Fe.value.offsetWidth),Q&&re.classList.remove("transition-disabled")}lt([w],()=>{e.type==="segment"&&Rt(()=>{fe({transitionDisabled:!1})})}),ut(()=>{e.type==="segment"&&fe({transitionDisabled:!0})});let ue=0;function we(Q){var re;if(Q.contentRect.width===0&&Q.contentRect.height===0||ue===Q.contentRect.width)return;ue=Q.contentRect.width;const{type:he}=e;if((he==="line"||he==="bar")&&ae(),he!=="segment"){const{placement:ne}=e;N((ne==="top"||ne==="bottom"?(re=f.value)===null||re===void 0?void 0:re.$el:p.value)||null)}}const ie=Ou(we,64);lt([()=>e.justifyContent,()=>e.size],()=>{Rt(()=>{const{type:Q}=e;(Q==="line"||Q==="bar")&&ae()})});const be=A(!1);function ze(Q){var re;const{target:he,contentRect:{width:ne,height:Y}}=Q,de=he.parentElement.parentElement.offsetWidth,Ee=he.parentElement.parentElement.offsetHeight,{placement:Ie}=e;if(!be.value)Ie==="top"||Ie==="bottom"?de $e.$el.offsetWidth&&(be.value=!1):Ee-Y>$e.$el.offsetHeight&&(be.value=!1)}N(((re=f.value)===null||re===void 0?void 0:re.$el)||null)}const pe=Ou(ze,64);function U(){const{onAdd:Q}=e;Q&&Q(),Rt(()=>{const re=E(),{value:he}=f;!re||!he||he.scrollTo({left:re.offsetLeft,top:0,behavior:"smooth"})})}function N(Q){if(!Q)return;const{placement:re}=e;if(re==="top"||re==="bottom"){const{scrollLeft:he,scrollWidth:ne,offsetWidth:Y}=Q;g.value=he<=0,v.value=he+Y>=ne}else{const{scrollTop:he,scrollHeight:ne,offsetHeight:Y}=Q;g.value=he<=0,v.value=he+Y>=ne}}const ge=Ou(Q=>{N(Q.target)},64);tt(f3,{triggerRef:Te(e,"trigger"),tabStyleRef:Te(e,"tabStyle"),tabClassRef:Te(e,"tabClass"),addTabStyleRef:Te(e,"addTabStyle"),addTabClassRef:Te(e,"addTabClass"),paneClassRef:Te(e,"paneClass"),paneStyleRef:Te(e,"paneStyle"),mergedClsPrefixRef:a,typeRef:Te(e,"type"),closableRef:Te(e,"closable"),valueRef:w,tabChangeIdRef:_,onBeforeLeaveRef:Te(e,"onBeforeLeave"),activateTab:j,handleClose:le,handleAdd:U}),x6(()=>{G(),H()}),kt(()=>{const{value:Q}=c;if(!Q)return;const{value:re}=a,he=`${re}-tabs-nav-scroll-wrapper--shadow-start`,ne=`${re}-tabs-nav-scroll-wrapper--shadow-end`;g.value?Q.classList.remove(he):Q.classList.add(he),v.value?Q.classList.remove(ne):Q.classList.add(ne)});const Ce={syncBarPosition:()=>{G()}},se=()=>{fe({transitionDisabled:!0})},te=D(()=>{const{value:Q}=b,{type:re}=e,he={card:"Card",bar:"Bar",line:"Line",segment:"Segment"}[re],ne=`${Q}${he}`,{self:{barColor:Y,closeIconColor:de,closeIconColorHover:Ee,closeIconColorPressed:Ie,tabColor:$e,tabBorderColor:Qe,paneTextColor:st,tabFontWeight:Je,tabBorderRadius:mt,tabFontWeightActive:et,colorSegment:Ne,fontWeightStrong:ot,tabColorSegment:ee,closeSize:me,closeIconSize:Pe,closeColorHover:Ve,closeColorPressed:Ue,closeBorderRadius:qe,[_e("panePadding",Q)]:Ze,[_e("tabPadding",ne)]:nt,[_e("tabPaddingVertical",ne)]:Ct,[_e("tabGap",ne)]:Ot,[_e("tabGap",`${ne}Vertical`)]:_t,[_e("tabTextColor",re)]:yo,[_e("tabTextColorActive",re)]:Po,[_e("tabTextColorHover",re)]:Bo,[_e("tabTextColorDisabled",re)]:No,[_e("tabFontSize",Q)]:Vo},common:{cubicBezierEaseInOut:un}}=s.value;return{"--n-bezier":un,"--n-color-segment":Ne,"--n-bar-color":Y,"--n-tab-font-size":Vo,"--n-tab-text-color":yo,"--n-tab-text-color-active":Po,"--n-tab-text-color-disabled":No,"--n-tab-text-color-hover":Bo,"--n-pane-text-color":st,"--n-tab-border-color":Qe,"--n-tab-border-radius":mt,"--n-close-size":me,"--n-close-icon-size":Pe,"--n-close-color-hover":Ve,"--n-close-color-pressed":Ue,"--n-close-border-radius":qe,"--n-close-icon-color":de,"--n-close-icon-color-hover":Ee,"--n-close-icon-color-pressed":Ie,"--n-tab-color":$e,"--n-tab-font-weight":Je,"--n-tab-font-weight-active":et,"--n-tab-padding":nt,"--n-tab-padding-vertical":Ct,"--n-tab-gap":Ot,"--n-tab-gap-vertical":_t,"--n-pane-padding-left":Mo(Ze,"left"),"--n-pane-padding-right":Mo(Ze,"right"),"--n-pane-padding-top":Mo(Ze,"top"),"--n-pane-padding-bottom":Mo(Ze,"bottom"),"--n-font-weight-strong":ot,"--n-tab-color-segment":ee}}),ce=l?vt("tabs",D(()=>`${b.value[0]}${e.type[0]}`),te,e):void 0;return Object.assign({mergedClsPrefix:a,mergedValue:w,renderedNames:new Set,segmentCapsuleElRef:Fe,tabsPaneWrapperRef:q,tabsElRef:u,barElRef:d,addTabInstRef:h,xScrollInstRef:f,scrollWrapperElRef:c,addTabFixed:be,tabWrapperStyle:M,handleNavResize:ie,mergedSize:b,handleScroll:ge,handleTabsResize:pe,cssVars:l?void 0:te,themeClass:ce==null?void 0:ce.themeClass,animationDirection:y,renderNameListRef:oe,yScrollElRef:p,handleSegmentResize:se,onAnimationBeforeLeave:I,onAnimationEnter:R,onAnimationAfterEnter:O,onRender:ce==null?void 0:ce.onRender},Ce)},render(){const{mergedClsPrefix:e,type:t,placement:o,addTabFixed:n,addable:r,mergedSize:i,renderNameListRef:a,onRender:l,paneWrapperClass:s,paneWrapperStyle:u,$slots:{default:d,prefix:c,suffix:h}}=this;l==null||l();const f=d?vr(d()).filter(_=>_.type.__TAB_PANE__===!0):[],p=d?vr(d()).filter(_=>_.type.__TAB__===!0):[],g=!p.length,v=t==="card",b=t==="segment",C=!v&&!b&&this.justifyContent;a.value=[];const k=()=>{const _=m("div",{style:this.tabWrapperStyle,class:`${e}-tabs-wrapper`},C?null:m("div",{class:`${e}-tabs-scroll-padding`,style:o==="top"||o==="bottom"?{width:`${this.tabsPadding}px`}:{height:`${this.tabsPadding}px`}}),g?f.map((M,E)=>(a.value.push(M.props.name),c0(m(ud,Object.assign({},M.props,{internalCreatedByPane:!0,internalLeftPadded:E!==0&&(!C||C==="center"||C==="start"||C==="end")}),M.children?{default:M.children.tab}:void 0)))):p.map((M,E)=>(a.value.push(M.props.name),c0(E!==0&&!C?k4(M):M))),!n&&r&&v?E4(r,(g?f.length:p.length)!==0):null,C?null:m("div",{class:`${e}-tabs-scroll-padding`,style:{width:`${this.tabsPadding}px`}}));return m("div",{ref:"tabsElRef",class:`${e}-tabs-nav-scroll-content`},v&&r?m(Rn,{onResize:this.handleTabsResize},{default:()=>_}):_,v?m("div",{class:`${e}-tabs-pad`}):null,v?null:m("div",{ref:"barElRef",class:`${e}-tabs-bar`}))},w=b?"top":o;return m("div",{class:[`${e}-tabs`,this.themeClass,`${e}-tabs--${t}-type`,`${e}-tabs--${i}-size`,C&&`${e}-tabs--flex`,`${e}-tabs--${w}`],style:this.cssVars},m("div",{class:[`${e}-tabs-nav--${t}-type`,`${e}-tabs-nav--${w}`,`${e}-tabs-nav`]},xt(c,_=>_&&m("div",{class:`${e}-tabs-nav__prefix`},_)),b?m(Rn,{onResize:this.handleSegmentResize},{default:()=>m("div",{class:`${e}-tabs-rail`,ref:"tabsElRef"},m("div",{class:`${e}-tabs-capsule`,ref:"segmentCapsuleElRef"},m("div",{class:`${e}-tabs-wrapper`},m("div",{class:`${e}-tabs-tab`}))),g?f.map((_,M)=>(a.value.push(_.props.name),m(ud,Object.assign({},_.props,{internalCreatedByPane:!0,internalLeftPadded:M!==0}),_.children?{default:_.children.tab}:void 0))):p.map((_,M)=>(a.value.push(_.props.name),M===0?_:k4(_))))}):m(Rn,{onResize:this.handleNavResize},{default:()=>m("div",{class:`${e}-tabs-nav-scroll-wrapper`,ref:"scrollWrapperElRef"},["top","bottom"].includes(w)?m(fS,{ref:"xScrollInstRef",onScroll:this.handleScroll},{default:k}):m("div",{class:`${e}-tabs-nav-y-scroll`,onScroll:this.handleScroll,ref:"yScrollElRef"},k()))}),n&&r&&v?E4(r,!0):null,xt(h,_=>_&&m("div",{class:`${e}-tabs-nav__suffix`},_))),g&&(this.animated&&(w==="top"||w==="bottom")?m("div",{ref:"tabsPaneWrapperRef",style:u,class:[`${e}-tabs-pane-wrapper`,s]},F4(f,this.mergedValue,this.renderedNames,this.onAnimationBeforeLeave,this.onAnimationEnter,this.onAnimationAfterEnter,this.animationDirection)):F4(f,this.mergedValue,this.renderedNames)))}});function F4(e,t,o,n,r,i,a){const l=[];return e.forEach(s=>{const{name:u,displayDirective:d,"display-directive":c}=s.props,h=p=>d===p||c===p,f=t===u;if(s.key!==void 0&&(s.key=u),f||h("show")||h("show:lazy")&&o.has(u)){o.has(u)||o.add(u);const p=!h("if");l.push(p?zo(s,[[bn,f]]):s)}}),a?m(c6,{name:`${a}-transition`,onBeforeLeave:n,onEnter:r,onAfterEnter:i},{default:()=>l}):l}function E4(e,t){return m(ud,{ref:"addTabInstRef",key:"__addable",name:"__addable",internalCreatedByPane:!0,internalAddable:!0,internalLeftPadded:t,disabled:typeof e=="object"&&e.disabled})}function k4(e){const t=qo(e);return t.props?t.props.internalLeftPadded=!0:t.props={internalLeftPadded:!0},t}function c0(e){return Array.isArray(e.dynamicProps)?e.dynamicProps.includes("internalLeftPadded")||e.dynamicProps.push("internalLeftPadded"):e.dynamicProps=["internalLeftPadded"],e}const zL=V([B("watermark-container",` position: relative; `,[Mt("selectable",` user-select: none; @@ -4142,7 +4142,7 @@ ${t} */const Ca=typeof document<"u";function Rv(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function GL(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&Rv(e.default)}const Wt=Object.assign;function f0(e,t){const o={};for(const n in t){const r=t[n];o[n]=Bn(r)?r.map(e):e(r)}return o}const jl=()=>{},Bn=Array.isArray,zv=/#/g,qL=/&/g,ZL=/\//g,XL=/=/g,YL=/\?/g,Av=/\+/g,QL=/%5B/g,JL=/%5D/g,Pv=/%5E/g,eH=/%60/g,Bv=/%7B/g,tH=/%7C/g,$v=/%7D/g,oH=/%20/g;function h3(e){return encodeURI(""+e).replace(tH,"|").replace(QL,"[").replace(JL,"]")}function nH(e){return h3(e).replace(Bv,"{").replace($v,"}").replace(Pv,"^")}function F1(e){return h3(e).replace(Av,"%2B").replace(oH,"+").replace(zv,"%23").replace(qL,"%26").replace(eH,"`").replace(Bv,"{").replace($v,"}").replace(Pv,"^")}function rH(e){return F1(e).replace(XL,"%3D")}function iH(e){return h3(e).replace(zv,"%23").replace(YL,"%3F")}function aH(e){return e==null?"":iH(e).replace(ZL,"%2F")}function hs(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const lH=/\/$/,sH=e=>e.replace(lH,"");function h0(e,t,o="/"){let n,r={},i="",a="";const l=t.indexOf("#");let s=t.indexOf("?");return l =0&&(s=-1),s>-1&&(n=t.slice(0,s),i=t.slice(s+1,l>-1?l:t.length),r=e(i)),l>-1&&(n=n||t.slice(0,l),a=t.slice(l,t.length)),n=fH(n??t,o),{fullPath:n+(i&&"?")+i+a,path:n,query:r,hash:hs(a)}}function uH(e,t){const o=t.query?e(t.query):"";return t.path+(o&&"?")+o+(t.hash||"")}function _4(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function dH(e,t,o){const n=t.matched.length-1,r=o.matched.length-1;return n>-1&&n===r&&Oa(t.matched[n],o.matched[r])&&Dv(t.params,o.params)&&e(t.query)===e(o.query)&&t.hash===o.hash}function Oa(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function Dv(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const o in e)if(!cH(e[o],t[o]))return!1;return!0}function cH(e,t){return Bn(e)?M4(e,t):Bn(t)?M4(t,e):e===t}function M4(e,t){return Bn(t)?e.length===t.length&&e.every((o,n)=>o===t[n]):e.length===1&&e[0]===t}function fH(e,t){if(e.startsWith("/"))return e;if(!e)return t;const o=t.split("/"),n=e.split("/"),r=n[n.length-1];(r===".."||r===".")&&n.push("");let i=o.length-1,a,l;for(a=0;a1&&i--;else break;return o.slice(0,i).join("/")+"/"+n.slice(a).join("/")}const $r={path:"/",name:void 0,params:{},query:{},hash:"",fullPath:"/",matched:[],meta:{},redirectedFrom:void 0};var ps;(function(e){e.pop="pop",e.push="push"})(ps||(ps={}));var Ul;(function(e){e.back="back",e.forward="forward",e.unknown=""})(Ul||(Ul={}));function hH(e){if(!e)if(Ca){const t=document.querySelector("base");e=t&&t.getAttribute("href")||"/",e=e.replace(/^\w+:\/\/[^\/]+/,"")}else e="/";return e[0]!=="/"&&e[0]!=="#"&&(e="/"+e),sH(e)}const pH=/^[^#]+#/;function mH(e,t){return e.replace(pH,"#")+t}function gH(e,t){const o=document.documentElement.getBoundingClientRect(),n=e.getBoundingClientRect();return{behavior:t.behavior,left:n.left-o.left-(t.left||0),top:n.top-o.top-(t.top||0)}}const oc=()=>({left:window.scrollX,top:window.scrollY});function vH(e){let t;if("el"in e){const o=e.el,n=typeof o=="string"&&o.startsWith("#"),r=typeof o=="string"?n?document.getElementById(o.slice(1)):document.querySelector(o):o;if(!r)return;t=gH(r,e)}else t=e;"scrollBehavior"in document.documentElement.style?window.scrollTo(t):window.scrollTo(t.left!=null?t.left:window.scrollX,t.top!=null?t.top:window.scrollY)}function R4(e,t){return(history.state?history.state.position-t:-1)+e}const E1=new Map;function bH(e,t){E1.set(e,t)}function xH(e){const t=E1.get(e);return E1.delete(e),t}let yH=()=>location.protocol+"//"+location.host;function Tv(e,t){const{pathname:o,search:n,hash:r}=t,i=e.indexOf("#");if(i>-1){let l=r.includes(e.slice(i))?e.slice(i).length:1,s=r.slice(l);return s[0]!=="/"&&(s="/"+s),_4(s,"")}return _4(o,e)+n+r}function CH(e,t,o,n){let r=[],i=[],a=null;const l=({state:h})=>{const f=Tv(e,location),p=o.value,g=t.value;let v=0;if(h){if(o.value=f,t.value=h,a&&a===p){a=null;return}v=g?h.position-g.position:0}else n(f);r.forEach(b=>{b(o.value,p,{delta:v,type:ps.pop,direction:v?v>0?Ul.forward:Ul.back:Ul.unknown})})};function s(){a=o.value}function u(h){r.push(h);const f=()=>{const p=r.indexOf(h);p>-1&&r.splice(p,1)};return i.push(f),f}function d(){const{history:h}=window;h.state&&h.replaceState(Wt({},h.state,{scroll:oc()}),"")}function c(){for(const h of i)h();i=[],window.removeEventListener("popstate",l),window.removeEventListener("beforeunload",d)}return window.addEventListener("popstate",l),window.addEventListener("beforeunload",d,{passive:!0}),{pauseListeners:s,listen:u,destroy:c}}function z4(e,t,o,n=!1,r=!1){return{back:e,current:t,forward:o,replaced:n,position:window.history.length,scroll:r?oc():null}}function wH(e){const{history:t,location:o}=window,n={value:Tv(e,o)},r={value:t.state};r.value||i(n.value,{back:null,current:n.value,forward:null,position:t.length-1,replaced:!0,scroll:null},!0);function i(s,u,d){const c=e.indexOf("#"),h=c>-1?(o.host&&document.querySelector("base")?e:e.slice(c))+s:yH()+e+s;try{t[d?"replaceState":"pushState"](u,"",h),r.value=u}catch(f){console.error(f),o[d?"replace":"assign"](h)}}function a(s,u){const d=Wt({},t.state,z4(r.value.back,s,r.value.forward,!0),u,{position:r.value.position});i(s,d,!0),n.value=s}function l(s,u){const d=Wt({},r.value,t.state,{forward:s,scroll:oc()});i(d.current,d,!0);const c=Wt({},z4(n.value,s,null),{position:d.position+1},u);i(s,c,!1),n.value=s}return{location:n,state:r,push:l,replace:a}}function SH(e){e=hH(e);const t=wH(e),o=CH(e,t.state,t.location,t.replace);function n(i,a=!0){a||o.pauseListeners(),history.go(i)}const r=Wt({location:"",base:e,go:n,createHref:mH.bind(null,e)},t,o);return Object.defineProperty(r,"location",{enumerable:!0,get:()=>t.location.value}),Object.defineProperty(r,"state",{enumerable:!0,get:()=>t.state.value}),r}function FH(e){return e=location.host?e||location.pathname+location.search:"",e.includes("#")||(e+="#"),SH(e)}function EH(e){return typeof e=="string"||e&&typeof e=="object"}function Iv(e){return typeof e=="string"||typeof e=="symbol"}const Ov=Symbol("");var A4;(function(e){e[e.aborted=4]="aborted",e[e.cancelled=8]="cancelled",e[e.duplicated=16]="duplicated"})(A4||(A4={}));function La(e,t){return Wt(new Error,{type:e,[Ov]:!0},t)}function sr(e,t){return e instanceof Error&&Ov in e&&(t==null||!!(e.type&t))}const P4="[^/]+?",kH={sensitive:!1,strict:!1,start:!0,end:!0},_H=/[.+*?^${}()[\]/\\]/g;function MH(e,t){const o=Wt({},kH,t),n=[];let r=o.start?"^":"";const i=[];for(const u of e){const d=u.length?[]:[90];o.strict&&!u.length&&(r+="/");for(let c=0;c t.length?t.length===1&&t[0]===80?1:-1:0}function Lv(e,t){let o=0;const n=e.score,r=t.score;for(;o 0&&t[t.length-1]<0}const zH={type:0,value:""},AH=/[a-zA-Z0-9_]/;function PH(e){if(!e)return[[]];if(e==="/")return[[zH]];if(!e.startsWith("/"))throw new Error(`Invalid path "${e}"`);function t(f){throw new Error(`ERR (${o})/"${u}": ${f}`)}let o=0,n=o;const r=[];let i;function a(){i&&r.push(i),i=[]}let l=0,s,u="",d="";function c(){u&&(o===0?i.push({type:0,value:u}):o===1||o===2||o===3?(i.length>1&&(s==="*"||s==="+")&&t(`A repeatable param (${u}) must be alone in its segment. eg: '/:ids+.`),i.push({type:1,value:u,regexp:d,repeatable:s==="*"||s==="+",optional:s==="*"||s==="?"})):t("Invalid state to consume buffer"),u="")}function h(){u+=s}for(;l {a(k)}:jl}function a(c){if(Iv(c)){const h=n.get(c);h&&(n.delete(c),o.splice(o.indexOf(h),1),h.children.forEach(a),h.alias.forEach(a))}else{const h=o.indexOf(c);h>-1&&(o.splice(h,1),c.record.name&&n.delete(c.record.name),c.children.forEach(a),c.alias.forEach(a))}}function l(){return o}function s(c){const h=IH(c,o);o.splice(h,0,c),c.record.name&&!T4(c)&&n.set(c.record.name,c)}function u(c,h){let f,p={},g,v;if("name"in c&&c.name){if(f=n.get(c.name),!f)throw La(1,{location:c});v=f.record.name,p=Wt($4(h.params,f.keys.filter(k=>!k.optional).concat(f.parent?f.parent.keys.filter(k=>k.optional):[]).map(k=>k.name)),c.params&&$4(c.params,f.keys.map(k=>k.name))),g=f.stringify(p)}else if(c.path!=null)g=c.path,f=o.find(k=>k.re.test(g)),f&&(p=f.parse(g),v=f.record.name);else{if(f=h.name?n.get(h.name):o.find(k=>k.re.test(h.path)),!f)throw La(1,{location:c,currentLocation:h});v=f.record.name,p=Wt({},h.params,c.params),g=f.stringify(p)}const b=[];let C=f;for(;C;)b.unshift(C.record),C=C.parent;return{name:v,path:g,params:p,matched:b,meta:TH(b)}}e.forEach(c=>i(c));function d(){o.length=0,n.clear()}return{addRoute:i,resolve:u,removeRoute:a,clearRoutes:d,getRoutes:l,getRecordMatcher:r}}function $4(e,t){const o={};for(const n of t)n in e&&(o[n]=e[n]);return o}function D4(e){const t={path:e.path,redirect:e.redirect,name:e.name,meta:e.meta||{},aliasOf:e.aliasOf,beforeEnter:e.beforeEnter,props:DH(e),children:e.children||[],instances:{},leaveGuards:new Set,updateGuards:new Set,enterCallbacks:{},components:"components"in e?e.components||null:e.component&&{default:e.component}};return Object.defineProperty(t,"mods",{value:{}}),t}function DH(e){const t={},o=e.props||!1;if("component"in e)t.default=o;else for(const n in e.components)t[n]=typeof o=="object"?o[n]:o;return t}function T4(e){for(;e;){if(e.record.aliasOf)return!0;e=e.parent}return!1}function TH(e){return e.reduce((t,o)=>Wt(t,o.meta),{})}function I4(e,t){const o={};for(const n in e)o[n]=n in t?t[n]:e[n];return o}function IH(e,t){let o=0,n=t.length;for(;o!==n;){const i=o+n>>1;Lv(e,t[i])<0?n=i:o=i+1}const r=OH(e);return r&&(n=t.lastIndexOf(r,n-1)),n}function OH(e){let t=e;for(;t=t.parent;)if(Hv(t)&&Lv(e,t)===0)return t}function Hv({record:e}){return!!(e.name||e.components&&Object.keys(e.components).length||e.redirect)}function LH(e){const t={};if(e===""||e==="?")return t;const n=(e[0]==="?"?e.slice(1):e).split("&");for(let r=0;r i&&F1(i)):[n&&F1(n)]).forEach(i=>{i!==void 0&&(t+=(t.length?"&":"")+o,i!=null&&(t+="="+i))})}return t}function HH(e){const t={};for(const o in e){const n=e[o];n!==void 0&&(t[o]=Bn(n)?n.map(r=>r==null?null:""+r):n==null?n:""+n)}return t}const NH=Symbol(""),L4=Symbol(""),nc=Symbol(""),p3=Symbol(""),k1=Symbol("");function vl(){let e=[];function t(n){return e.push(n),()=>{const r=e.indexOf(n);r>-1&&e.splice(r,1)}}function o(){e=[]}return{add:t,list:()=>e.slice(),reset:o}}function Nr(e,t,o,n,r,i=a=>a()){const a=n&&(n.enterCallbacks[r]=n.enterCallbacks[r]||[]);return()=>new Promise((l,s)=>{const u=h=>{h===!1?s(La(4,{from:o,to:t})):h instanceof Error?s(h):EH(h)?s(La(2,{from:t,to:h})):(a&&n.enterCallbacks[r]===a&&typeof h=="function"&&a.push(h),l())},d=i(()=>e.call(n&&n.instances[r],t,o,u));let c=Promise.resolve(d);e.length<3&&(c=c.then(u)),c.catch(h=>s(h))})}function p0(e,t,o,n,r=i=>i()){const i=[];for(const a of e)for(const l in a.components){let s=a.components[l];if(!(t!=="beforeRouteEnter"&&!a.instances[l]))if(Rv(s)){const d=(s.__vccOpts||s)[t];d&&i.push(Nr(d,o,n,a,l,r))}else{let u=s();i.push(()=>u.then(d=>{if(!d)throw new Error(`Couldn't resolve component "${l}" at "${a.path}"`);const c=GL(d)?d.default:d;a.mods[l]=d,a.components[l]=c;const f=(c.__vccOpts||c)[t];return f&&Nr(f,o,n,a,l,r)()}))}}return i}function H4(e){const t=He(nc),o=He(p3),n=D(()=>{const s=S(e.to);return t.resolve(s)}),r=D(()=>{const{matched:s}=n.value,{length:u}=s,d=s[u-1],c=o.matched;if(!d||!c.length)return-1;const h=c.findIndex(Oa.bind(null,d));if(h>-1)return h;const f=N4(s[u-2]);return u>1&&N4(d)===f&&c[c.length-1].path!==f?c.findIndex(Oa.bind(null,s[u-2])):h}),i=D(()=>r.value>-1&&jH(o.params,n.value.params)),a=D(()=>r.value>-1&&r.value===o.matched.length-1&&Dv(o.params,n.value.params));function l(s={}){return WH(s)?t[S(e.replace)?"replace":"push"](S(e.to)).catch(jl):Promise.resolve()}return{route:n,href:D(()=>n.value.href),isActive:i,isExactActive:a,navigate:l}}const VH=ye({name:"RouterLink",compatConfig:{MODE:3},props:{to:{type:[String,Object],required:!0},replace:Boolean,activeClass:String,exactActiveClass:String,custom:Boolean,ariaCurrentValue:{type:String,default:"page"}},useLink:H4,setup(e,{slots:t}){const o=Nt(H4(e)),{options:n}=He(nc),r=D(()=>({[V4(e.activeClass,n.linkActiveClass,"router-link-active")]:o.isActive,[V4(e.exactActiveClass,n.linkExactActiveClass,"router-link-exact-active")]:o.isExactActive}));return()=>{const i=t.default&&t.default(o);return e.custom?i:m("a",{"aria-current":o.isExactActive?e.ariaCurrentValue:null,href:o.href,onClick:o.navigate,class:r.value},i)}}}),_l=VH;function WH(e){if(!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&!(e.button!==void 0&&e.button!==0)){if(e.currentTarget&&e.currentTarget.getAttribute){const t=e.currentTarget.getAttribute("target");if(/\b_blank\b/i.test(t))return}return e.preventDefault&&e.preventDefault(),!0}}function jH(e,t){for(const o in t){const n=t[o],r=e[o];if(typeof n=="string"){if(n!==r)return!1}else if(!Bn(r)||r.length!==n.length||n.some((i,a)=>i!==r[a]))return!1}return!0}function N4(e){return e?e.aliasOf?e.aliasOf.path:e.path:""}const V4=(e,t,o)=>e??t??o,UH=ye({name:"RouterView",inheritAttrs:!1,props:{name:{type:String,default:"default"},route:Object},compatConfig:{MODE:3},setup(e,{attrs:t,slots:o}){const n=He(k1),r=D(()=>e.route||n.value),i=He(L4,0),a=D(()=>{let u=S(i);const{matched:d}=r.value;let c;for(;(c=d[u])&&!c.components;)u++;return u}),l=D(()=>r.value.matched[a.value]);tt(L4,D(()=>a.value+1)),tt(NH,l),tt(k1,r);const s=A();return lt(()=>[s.value,l.value,e.name],([u,d,c],[h,f,p])=>{d&&(d.instances[c]=u,f&&f!==d&&u&&u===h&&(d.leaveGuards.size||(d.leaveGuards=f.leaveGuards),d.updateGuards.size||(d.updateGuards=f.updateGuards))),u&&d&&(!f||!Oa(d,f)||!h)&&(d.enterCallbacks[c]||[]).forEach(g=>g(u))},{flush:"post"}),()=>{const u=r.value,d=e.name,c=l.value,h=c&&c.components[d];if(!h)return W4(o.default,{Component:h,route:u});const f=c.props[d],p=f?f===!0?u.params:typeof f=="function"?f(u):f:null,v=m(h,Wt({},p,t,{onVnodeUnmounted:b=>{b.component.isUnmounted&&(c.instances[d]=null)},ref:s}));return W4(o.default,{Component:v,route:u})||v}}});function W4(e,t){if(!e)return null;const o=e(t);return o.length===1?o[0]:o}const Nv=UH;function KH(e){const t=$H(e.routes,e),o=e.parseQuery||LH,n=e.stringifyQuery||O4,r=e.history,i=vl(),a=vl(),l=vl(),s=Fd($r);let u=$r;Ca&&e.scrollBehavior&&"scrollRestoration"in history&&(history.scrollRestoration="manual");const d=f0.bind(null,ue=>""+ue),c=f0.bind(null,aH),h=f0.bind(null,hs);function f(ue,we){let ie,be;return Iv(ue)?(ie=t.getRecordMatcher(ue),be=we):be=ue,t.addRoute(be,ie)}function p(ue){const we=t.getRecordMatcher(ue);we&&t.removeRoute(we)}function g(){return t.getRoutes().map(ue=>ue.record)}function v(ue){return!!t.getRecordMatcher(ue)}function b(ue,we){if(we=Wt({},we||s.value),typeof ue=="string"){const N=h0(o,ue,we.path),ge=t.resolve({path:N.path},we),Ce=r.createHref(N.fullPath);return Wt(N,ge,{params:h(ge.params),hash:hs(N.hash),redirectedFrom:void 0,href:Ce})}let ie;if(ue.path!=null)ie=Wt({},ue,{path:h0(o,ue.path,we.path).path});else{const N=Wt({},ue.params);for(const ge in N)N[ge]==null&&delete N[ge];ie=Wt({},ue,{params:c(N)}),we.params=c(we.params)}const be=t.resolve(ie,we),ze=ue.hash||"";be.params=d(h(be.params));const pe=uH(n,Wt({},ue,{hash:nH(ze),path:be.path})),U=r.createHref(pe);return Wt({fullPath:pe,hash:ze,query:n===O4?HH(ue.query):ue.query||{}},be,{redirectedFrom:void 0,href:U})}function C(ue){return typeof ue=="string"?h0(o,ue,s.value.path):Wt({},ue)}function k(ue,we){if(u!==ue)return La(8,{from:we,to:ue})}function w(ue){return E(ue)}function _(ue){return w(Wt(C(ue),{replace:!0}))}function M(ue){const we=ue.matched[ue.matched.length-1];if(we&&we.redirect){const{redirect:ie}=we;let be=typeof ie=="function"?ie(ue):ie;return typeof be=="string"&&(be=be.includes("?")||be.includes("#")?be=C(be):{path:be},be.params={}),Wt({query:ue.query,hash:ue.hash,params:be.path!=null?{}:ue.params},be)}}function E(ue,we){const ie=u=b(ue),be=s.value,ze=ue.state,pe=ue.force,U=ue.replace===!0,N=M(ie);if(N)return E(Wt(C(N),{state:typeof N=="object"?Wt({},ze,N.state):ze,force:pe,replace:U}),we||ie);const ge=ie;ge.redirectedFrom=we;let Ce;return!pe&&dH(n,be,ie)&&(Ce=La(16,{to:ge,from:be}),j(be,be,!0,!1)),(Ce?Promise.resolve(Ce):$(ge,be)).catch(se=>sr(se)?sr(se,2)?se:y(se):O(se,ge,be)).then(se=>{if(se){if(sr(se,2))return E(Wt({replace:U},C(se.to),{state:typeof se.to=="object"?Wt({},ze,se.to.state):ze,force:pe}),we||ge)}else se=H(ge,be,!0,U,ze);return G(ge,be,se),se})}function P(ue,we){const ie=k(ue,we);return ie?Promise.reject(ie):Promise.resolve()}function z(ue){const we=ae.values().next().value;return we&&typeof we.runWithContext=="function"?we.runWithContext(ue):ue()}function $(ue,we){let ie;const[be,ze,pe]=GH(ue,we);ie=p0(be.reverse(),"beforeRouteLeave",ue,we);for(const N of be)N.leaveGuards.forEach(ge=>{ie.push(Nr(ge,ue,we))});const U=P.bind(null,ue,we);return ie.push(U),fe(ie).then(()=>{ie=[];for(const N of i.list())ie.push(Nr(N,ue,we));return ie.push(U),fe(ie)}).then(()=>{ie=p0(ze,"beforeRouteUpdate",ue,we);for(const N of ze)N.updateGuards.forEach(ge=>{ie.push(Nr(ge,ue,we))});return ie.push(U),fe(ie)}).then(()=>{ie=[];for(const N of pe)if(N.beforeEnter)if(Bn(N.beforeEnter))for(const ge of N.beforeEnter)ie.push(Nr(ge,ue,we));else ie.push(Nr(N.beforeEnter,ue,we));return ie.push(U),fe(ie)}).then(()=>(ue.matched.forEach(N=>N.enterCallbacks={}),ie=p0(pe,"beforeRouteEnter",ue,we,z),ie.push(U),fe(ie))).then(()=>{ie=[];for(const N of a.list())ie.push(Nr(N,ue,we));return ie.push(U),fe(ie)}).catch(N=>sr(N,8)?N:Promise.reject(N))}function G(ue,we,ie){l.list().forEach(be=>z(()=>be(ue,we,ie)))}function H(ue,we,ie,be,ze){const pe=k(ue,we);if(pe)return pe;const U=we===$r,N=Ca?history.state:{};ie&&(be||U?r.replace(ue.fullPath,Wt({scroll:U&&N&&N.scroll},ze)):r.push(ue.fullPath,ze)),s.value=ue,j(ue,we,ie,U),y()}let q;function W(){q||(q=r.listen((ue,we,ie)=>{if(!Fe.listening)return;const be=b(ue),ze=M(be);if(ze){E(Wt(ze,{replace:!0}),be).catch(jl);return}u=be;const pe=s.value;Ca&&bH(R4(pe.fullPath,ie.delta),oc()),$(be,pe).catch(U=>sr(U,12)?U:sr(U,2)?(E(U.to,be).then(N=>{sr(N,20)&&!ie.delta&&ie.type===ps.pop&&r.go(-1,!1)}).catch(jl),Promise.reject()):(ie.delta&&r.go(-ie.delta,!1),O(U,be,pe))).then(U=>{U=U||H(be,pe,!1),U&&(ie.delta&&!sr(U,8)?r.go(-ie.delta,!1):ie.type===ps.pop&&sr(U,20)&&r.go(-1,!1)),G(be,pe,U)}).catch(jl)}))}let L=vl(),I=vl(),R;function O(ue,we,ie){y(ue);const be=I.list();return be.length?be.forEach(ze=>ze(ue,we,ie)):console.error(ue),Promise.reject(ue)}function oe(){return R&&s.value!==$r?Promise.resolve():new Promise((ue,we)=>{L.add([ue,we])})}function y(ue){return R||(R=!ue,W(),L.list().forEach(([we,ie])=>ue?ie(ue):we()),L.reset()),ue}function j(ue,we,ie,be){const{scrollBehavior:ze}=e;if(!Ca||!ze)return Promise.resolve();const pe=!ie&&xH(R4(ue.fullPath,0))||(be||!ie)&&history.state&&history.state.scroll||null;return Rt().then(()=>ze(ue,we,pe)).then(U=>U&&vH(U)).catch(U=>O(U,ue,we))}const X=ue=>r.go(ue);let le;const ae=new Set,Fe={currentRoute:s,listening:!0,addRoute:f,removeRoute:p,clearRoutes:t.clearRoutes,hasRoute:v,getRoutes:g,resolve:b,options:e,push:w,replace:_,go:X,back:()=>X(-1),forward:()=>X(1),beforeEach:i.add,beforeResolve:a.add,afterEach:l.add,onError:I.add,isReady:oe,install(ue){const we=this;ue.component("RouterLink",_l),ue.component("RouterView",Nv),ue.config.globalProperties.$router=we,Object.defineProperty(ue.config.globalProperties,"$route",{enumerable:!0,get:()=>S(s)}),Ca&&!le&&s.value===$r&&(le=!0,w(r.location).catch(ze=>{}));const ie={};for(const ze in $r)Object.defineProperty(ie,ze,{get:()=>s.value[ze],enumerable:!0});ue.provide(nc,we),ue.provide(p3,Ch(ie)),ue.provide(k1,s);const be=ue.unmount;ae.add(ue),ue.unmount=function(){ae.delete(ue),ae.size<1&&(u=$r,q&&q(),q=null,s.value=$r,le=!1,R=!1),be()}}};function fe(ue){return ue.reduce((we,ie)=>we.then(()=>z(ie)),Promise.resolve())}return Fe}function GH(e,t){const o=[],n=[],r=[],i=Math.max(t.matched.length,e.matched.length);for(let a=0;aOa(u,l))?n.push(l):o.push(l));const s=e.matched[a];s&&(t.matched.find(u=>Oa(u,s))||r.push(s))}return[o,n,r]}function qH(){return He(nc)}function Vv(e){return He(p3)}function Me(e,t){return e.then(function(o){return[null,o]}).catch(function(o){return[o,void 0]})}let ZH=0;function XH(e){return`${e}_callback_${Date.now()}_${ZH++}`}function Se(e,t){return typeof t>"u"&&(t={}),new Promise((o,n)=>{const r=XH("exec");window[r]=(a,l,s)=>{o({errno:a,stdout:l,stderr:s}),i(r)};function i(a){delete window[a]}try{ksu.exec(e,JSON.stringify(t),r)}catch(a){n(a),i(r)}})}const di=Gi("logs",()=>{const e=A("");function t(r,i){e.value+=`[error] ${r}${i!==void 0?":"+i:""} `}function o(r,i){const a=`[info] ${r}${i!==void 0?":"+i:""} `;e.value+=a,console.log(a)}function n(r,i){e.value+=`[success] ${r}${i!==void 0?":"+i:""} -`}return{content:e,error:t,info:o,success:n}}),ke=(e,t="Uncaught")=>e.then(o=>(j4("Resolved",o,t),o)).catch(o=>{throw j4("Rejected",o,t),o}),j4=(e,t,o)=>{const n=di(),r=e==="Resolved"?"success":"error";typeof t=="string"?t.trim().startsWith("<")&&t.trim().endsWith(">")?n[r](`${e}:${o}`,"XML data detected."):n[r](`${e}:${o}`,t):typeof t=="object"?Array.isArray(t)?n[r](`${e}:${o}`,JSON.stringify(t,null,2)):t instanceof Error?n.error(`${e}::${o}`,t.message):n[r](`${e}:${o}`,JSON.stringify(t,null,2)):typeof t=="function"?n[r](`${e}:${o}`,`Function called ${t.name?t.name:"anonymous function"}`):n[r](`${e}:${o}`,t)},YH=()=>{const o=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/data/com.miui.securitycenter/databases/gamebooster.db "SELECT * FROM gamebooster_table WHERE package_name!='none';" -json)"`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);if(i&&r(l),a)try{const s=JSON.parse(a);n(s)}catch(s){r(s)}else r(i)}}),o)},VX=()=>{const e="am start -n com.miui.securitycenter/com.miui.gamebooster.ui.SelectGameLandActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},WX=(e,t,o)=>{const i=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/data/com.miui.securitycenter/databases/gamebooster.db "UPDATE gamebooster_table SET game_ratio='${t}', game_gravity='${o}' WHERE package_name='${e}'; SELECT changes();")"`;return ke(new Promise(async(a,l)=>{{const{errno:s,stdout:u,stderr:d}=await Se(i);s&&l(d),u&&a(u)}}),i)};function QH(){const e=ht(),t=D(()=>({theme:e.isDarkMode?Bt:Ft})),{message:o,modal:n}=It(["message","modal"],{configProviderProps:t}),r=A(0),i=A(0),a=A(0),l=A([{label:"关闭键盘",type:"error",key:0},{label:"连接键盘",type:"success",key:1},{label:"复位键盘",type:"warning",key:2}]),s=A({label:"关闭键盘",type:"error",key:0}),u=async()=>{n.create({title:"想启用该功能吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("该功能仅兼容")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("水龙(Amktiao)")])," ",F("的移植包,不兼容其他移植包作者,请确保当前使用的是水龙的移植包再启用该功能,确定要继续吗?")])]),positiveText:"确认启用",negativeText:"我再想想",onPositiveClick:()=>{e.showThirdPartySetting.amktiaoROMInterface=!0}})},d=async f=>{const[p,g]=await Me(new Promise((v,b)=>{f===1?n.create({title:"想切换为键盘链接模式吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("切换为")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("键盘连接状态")])," ",F("前,请确保设备先连接上键盘,否则会存在静电击穿 CPU 的风险,确定要继续吗?")])]),positiveText:"确定切换为键盘连接状态",negativeText:"我再想想",onPositiveClick:()=>{v("positiveClick")},onNegativeClick:()=>{b("negativeClick")}}):v("positiveClick")}));g&&fV(f).then(v=>{a.value=f,s.value=l.value[f]}).catch(v=>{n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"})})},c=async f=>{const[p,g]=await Me(rV(f?1:0));if(p)n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"});else if(f){const[v,b]=await Me(iV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):(n.create({title:"切换成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("切换手写笔驱动成功,关闭屏幕再点亮屏幕即可更新固件~")]),positiveText:"确定"}),r.value=1)}else{const[v,b]=await Me(aV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):(n.create({title:"切换成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("切换手写笔驱动成功,关闭屏幕再点亮屏幕即可更新固件~")]),positiveText:"确定"}),r.value=0)}},h=async f=>{const[p,g]=await Me(sV(f?1:0));if(p)n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"});else if(f){const[v,b]=await Me(uV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):i.value=1}else{const[v,b]=await Me(dV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):i.value=0}};return ut(async()=>{if(e.hasPenUpdateControl){const[,f]=await Me(nV());Number(f)&&(r.value=1)}if(e.hasPenEnableControl){const[,f]=await Me(lV());Number(f)&&(i.value=1)}if(e.hasKeyboardControl){const[,f]=await Me(cV());if(f){const p=Number(f);a.value=p,s.value=l.value[p]}}}),{currentPenUpdate:r,currentPenEnable:i,currentKeyboardMode:a,keyboardModeOptions:l,currentKeyboardModeSelect:s,changeKeyboardMode:d,changePenUpdateMode:c,changePenEnableMode:h,enableSetting:u}}const m3=e=>{const t=/([A-Za-z0-9+/=]{16,})/g,o=e.match(t);return o&&o.length>0?o[0]:null},Pt=(e,t)=>t?`${t}(${e})`:e,JH=e=>{const t={};return e.split(` +`}return{content:e,error:t,info:o,success:n}}),ke=(e,t="Uncaught")=>e.then(o=>(j4("Resolved",o,t),o)).catch(o=>{throw j4("Rejected",o,t),o}),j4=(e,t,o)=>{const n=di(),r=e==="Resolved"?"success":"error";typeof t=="string"?t.trim().startsWith("<")&&t.trim().endsWith(">")?n[r](`${e}:${o}`,"XML data detected."):n[r](`${e}:${o}`,t):typeof t=="object"?Array.isArray(t)?n[r](`${e}:${o}`,JSON.stringify(t,null,2)):t instanceof Error?n.error(`${e}::${o}`,t.message):n[r](`${e}:${o}`,JSON.stringify(t,null,2)):typeof t=="function"?n[r](`${e}:${o}`,`Function called ${t.name?t.name:"anonymous function"}`):n[r](`${e}:${o}`,t)},YH=()=>{const o=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/data/com.miui.securitycenter/databases/gamebooster.db "SELECT * FROM gamebooster_table WHERE package_name!='none';" -json)"`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);if(i&&r(l),a)try{const s=JSON.parse(a);n(s)}catch(s){r(s)}else r(i)}}),o)},UX=()=>{const e="am start -n com.miui.securitycenter/com.miui.gamebooster.ui.SelectGameLandActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},KX=(e,t,o)=>{const i=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/data/com.miui.securitycenter/databases/gamebooster.db "UPDATE gamebooster_table SET game_ratio='${t}', game_gravity='${o}' WHERE package_name='${e}'; SELECT changes();")"`;return ke(new Promise(async(a,l)=>{{const{errno:s,stdout:u,stderr:d}=await Se(i);s&&l(d),u&&a(u)}}),i)};function QH(){const e=ht(),t=D(()=>({theme:e.isDarkMode?Bt:Ft})),{message:o,modal:n}=It(["message","modal"],{configProviderProps:t}),r=A(0),i=A(0),a=A(0),l=A([{label:"关闭键盘",type:"error",key:0},{label:"连接键盘",type:"success",key:1},{label:"复位键盘",type:"warning",key:2}]),s=A({label:"关闭键盘",type:"error",key:0}),u=async()=>{n.create({title:"想启用该功能吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("该功能仅兼容")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("水龙(Amktiao)")])," ",F("的移植包,不兼容其他移植包作者,请确保当前使用的是水龙的移植包再启用该功能,确定要继续吗?")])]),positiveText:"确认启用",negativeText:"我再想想",onPositiveClick:()=>{e.showThirdPartySetting.amktiaoROMInterface=!0}})},d=async f=>{const[p,g]=await Me(new Promise((v,b)=>{f===1?n.create({title:"想切换为键盘链接模式吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("切换为")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("键盘连接状态")])," ",F("前,请确保设备先连接上键盘,否则会存在静电击穿 CPU 的风险,确定要继续吗?")])]),positiveText:"确定切换为键盘连接状态",negativeText:"我再想想",onPositiveClick:()=>{v("positiveClick")},onNegativeClick:()=>{b("negativeClick")}}):v("positiveClick")}));g&&fV(f).then(v=>{a.value=f,s.value=l.value[f]}).catch(v=>{n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"})})},c=async f=>{const[p,g]=await Me(rV(f?1:0));if(p)n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"});else if(f){const[v,b]=await Me(iV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):(n.create({title:"切换成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("切换手写笔驱动成功,关闭屏幕再点亮屏幕即可更新固件~")]),positiveText:"确定"}),r.value=1)}else{const[v,b]=await Me(aV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):(n.create({title:"切换成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("切换手写笔驱动成功,关闭屏幕再点亮屏幕即可更新固件~")]),positiveText:"确定"}),r.value=0)}},h=async f=>{const[p,g]=await Me(sV(f?1:0));if(p)n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"});else if(f){const[v,b]=await Me(uV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):i.value=1}else{const[v,b]=await Me(dV());v?n.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("修改失败,详情请查看日志记录~")]),negativeText:"确定"}):i.value=0}};return ut(async()=>{if(e.hasPenUpdateControl){const[,f]=await Me(nV());Number(f)&&(r.value=1)}if(e.hasPenEnableControl){const[,f]=await Me(lV());Number(f)&&(i.value=1)}if(e.hasKeyboardControl){const[,f]=await Me(cV());if(f){const p=Number(f);a.value=p,s.value=l.value[p]}}}),{currentPenUpdate:r,currentPenEnable:i,currentKeyboardMode:a,keyboardModeOptions:l,currentKeyboardModeSelect:s,changeKeyboardMode:d,changePenUpdateMode:c,changePenEnableMode:h,enableSetting:u}}const m3=e=>{const t=/([A-Za-z0-9+/=]{16,})/g,o=e.match(t);return o&&o.length>0?o[0]:null},Pt=(e,t)=>t?`${t}(${e})`:e,JH=e=>{const t={};return e.split(` `).forEach(o=>{if(o=o.trim(),o&&!o.startsWith("#")){const[n,r]=o.split("=");n&&r&&(t[n.trim()]=r.trim())}}),t},eN=e=>e?e==="*:0"?"VIEW_POLICY_DEFAULT":e==="*:1"?"VIEW_POLICY_STRETCH":e==="*:2"?"VIEW_POLICY_AUTO_COLUMNS":e==="*:6"?"VIEW_POLICY_FLOAT":"CUSTOM_VIEW_POLICY":"UNDEFINED_VIEW_POLICY",m0=(e,t,o)=>{var i;const n=t?(i=t.supportModes)==null?void 0:i.split(","):null,r={};return e&&!e.fullRule&&(r.embeddedEnable=o==="embedded"),t&&(n!=null&&n.includes("full")&&(r.ratio_fullScreenEnable=o==="fullScreen",e&&e.hasOwnProperty("fullRule")&&(r.fullScreenEnable=!0)),r.hasOwnProperty("fullScreen")||(r.fixedOrientationEnable=o==="fixedOrientation")),r},Wv=(e,t)=>{var i;const o=(i=t==null?void 0:t.supportModes)==null?void 0:i.split(","),n=t==null?void 0:t.defaultSettings;let r="disabled";return t&&(r="fixedOrientation"),t&&t.hasOwnProperty("disable")&&t.disable&&(r="disabled"),t&&t.hasOwnProperty("supportModes")&&(o!=null&&o.includes("full"))&&(!n||n==="full")&&(r="fullScreen"),e&&!e.hasOwnProperty("fullRule")&&(!n||n==="ae")&&(r="embedded"),r},Dr=e=>{if(e==="disabled")return 0;if(e==="embedded")return 1;if(e==="fixedOrientation")return 2;if(e==="fullScreen")return 3;throw new Error("wrong error AppModeCode!")},g0=e=>e.trim().split(` `).reduce((t,o)=>{const[n,r]=o.split(":");return t[n]=Number(r),t},{}),bl=e=>Object.entries(e).map(([t,o])=>`${t}:${o}`).join(` `),xl=e=>Object.entries(e).map(([t,o])=>`cmd miui_embedding_window set-appMode ${t} ${o}`).join(` @@ -4153,16 +4153,16 @@ ${t} ${t}>`.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g,"");i=r.parseFromString(u,"application/xml")}const a=i.getElementsByTagName(o),l={};return Array.from(a).forEach(s=>{const u=s.getAttribute("name");if(u){const d={};Array.from(s.attributes).forEach(c=>{d[c.name]=c.value}),l[u]={name:u,...jv(d)}}}),l},ct=(e,t,o)=>{const n=r=>{let i="";if(!Object.keys(e))return i;for(const a in r)if(r.hasOwnProperty(a)){i+=` <${t}`;for(const[l,s]of Object.entries(r[a]))i+=` ${l}="${String(s)}"`;i+=` /> `}return i};return o?` <${o}> -${n(e)}${o}>`:n(e)},Kl=e=>qR(e,"name"),U4=(e,t,o,n={},r={},i={})=>{const a=ht(),l=[];return new Set([...Object.keys(e),...Object.keys(t),...Object.keys(n),...Object.keys(r)]).forEach(u=>{var E;const d=n[u]??e[u],c=r[u]??t[u],h=i[u]??o[u],f=(E=c==null?void 0:c.supportModes)==null?void 0:E.split(",");c==null||c.defaultSettings;let p="disabled",g=d?!d.fullRule:!1,v=(f==null?void 0:f.includes("fo"))||c&&!c.hasOwnProperty("disable")||!1,b=(f==null?void 0:f.includes("full"))||!1,C=n[u]||r[u]||i[u]?"custom":"module";if(a.MIOSVersion&&a.MIOSVersion>=2)h?(p="disabled",h.fixedOrientationEnable&&(p="fixedOrientation"),h.ratio_fullScreenEnable&&(p="fullScreen"),h.embeddedEnable&&(p="embedded")):p=Wv(d,c);else if(h!=null&&h.hasOwnProperty("embeddedEnable"))h.embeddedEnable&&d?p=d.fullRule?"fullScreen":"embedded":c&&(!c.hasOwnProperty("disable")||!c.disable)&&(p="fixedOrientation");else if(c&&(!c.hasOwnProperty("disable")||!c.disable)&&(p="fixedOrientation"),d){const P=d.hasOwnProperty("defaultSettings")&&d.defaultSettings;(!d.hasOwnProperty("defaultSettings")||P)&&(p=d.fullRule?"fullScreen":"embedded")}const k=Kl(d),w=Kl(c),_=Kl(h),M={name:u,settingMode:p,isSupportEmbedded:g,isSupportFixedOrientation:v,isSupportFullScreen:b,ruleMode:C,embeddedRules:k||void 0,fixedOrientationRule:w||void 0,settingRule:_||void 0};l.push(M)}),l},K4=(e,t={},o={})=>{const n=[];return new Set([...Object.keys(e),...Object.keys(t)]).forEach(i=>{const a=t[i]?t[i]:e[i],l=o[i];let s="module";t[i]&&(s="custom");const u=Kl(l),d=Kl(a),c={name:i,ruleMode:s,settingMode:eN(a.activityRule||""),autoUIRule:d||void 0,settingRule:u||void 0};n.push(c)}),n},ht=Gi("device",()=>{const e=A(),t=A(),o=A(),n=Nt({socName:"",socModel:"",display0Panel:"",memoryInfo:""}),r=A(),i=A(!1),a=A(),l=A(!1),s=A(!1),u=A(!1),d=A(!1),c=A(window.innerWidth),h=A(!1),f=A(""),p=A([]),g=A({}),v=A(""),b=A(""),C=A("Magisk"),k=A(!1),w=Nt({installed:!1,mode:void 0}),_=Nt({KSU:!1,KSU_VER:"",KSU_VER_CODE:0,KSU_KERNEL_VER_CODE:0,APATCH:!1,APATCH_VER_CODE:0,APATCH_VER:0,MAGISK_VER:"",MAGISK_VER_CODE:""}),M=Nt({sohQcom:0,sohMTK:0,sohXMPower:0,chargeFullDesign:0,chargeFull:0,cycleCount:0}),E=Nt({OS2_PAD_EMBEDDED_APP_MANAGER:!0,Hyper_OS_DOT_BLACK_LIST_MANAGER:!0,GAME_BOOSTER_RADIO_MANAGER:!0,GAME_BOOSTER_CUSTOM_RATIO:!1}),P=A(),z=A(!1),$=A(!1),G=A(!1),H=A(!1),q=A("autoRhythm"),W=A(!0),L=Nt([]),I=Nt({GameMode:!1,MIUIContentExt:!1,lowWebViewVersion:!1,patchModeAlert:!1,needInstalledKsuWebUiApk:!1}),R=Nt({amktiaoROMInterface:!1}),O=D(()=>L.length>0);async function oe(){return new Promise(async(j,X)=>{const[le,ae]=await Me(WN());le?(L.push({type:"getAndroidApplicationPackageNameListErr",title:"获取用户已安装的应用包名",msg:le}),X(le)):(ae&&(p.value=ae==null?void 0:ae.split(",")),j(p.value))})}async function y(){const j=[Me(sN()),Me(vN()),Me(VN()),Me(YN()),Me(xN()),Me(MN()),Me(yN()),Me(CN()),Me(_N()),Me(wN()),Me(SN()),Me(FN()),Me(eV()),Me(tV()),Me(oV()),Me(hV()),Me(rN()),Me(iN()),Me(kV()),Me(EV())],X=await Promise.all(j),[[,le],[,ae],[,Fe],[,fe],[,ue],[,we],[,ie],[,be],[,ze],[,pe],[,U],[,N],[,ge],[,Ce],[,se],[,te],[,ce],[,Q],[,re],[,he]]=X;if(le!=null&&le.length||L.push({type:"moduleInfo",title:"模块信息",msg:"获取模块信息失败"}),le!=null&&le.length){const Je=jv({...JH(le),dir:"/data/adb/modules/MIUI_MagicWindow+"});Je.versionCode&&(r.value?r.value {const e="getprop ro.build.characteristics";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},oN=()=>{const e="getprop ro.build.version.sdk";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(Number(r))}}),e)},nN=()=>{const e="getprop ro.mi.os.version.code";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(Number(r))}}),e)},rN=()=>{const e="getprop ro.vendor.qti.soc_name";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},iN=()=>{const e="getprop ro.vendor.qti.soc_model";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},aN=()=>{const e="getprop ro.config.miui_compat_enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},lN=()=>{const e="getprop ro.config.miui_appcompat_enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},sN=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/module.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},uN=()=>{const e=`grep -q '^is_patch_mode=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_patch_mode=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},dN=()=>{const e=`sed -i '/^is_patch_mode=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_patch_mode successfully." || echo "Remove is_patch_mode failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},cN=()=>{const e="grep 'is_patch_mode=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},fN=()=>{const e=`grep -q '^is_disabled_os2_system_app_optimize=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_disabled_os2_system_app_optimize=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},hN=()=>{const e=`sed -i '/^is_disabled_os2_system_app_optimize=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_disabled_os2_system_app_optimize successfully." || echo "Remove is_disabled_os2_system_app_optimize failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},pN=()=>{const e="grep 'is_disabled_os2_system_app_optimize=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},mN=()=>{const e=`sed -i '/^# 开启游戏显示布局/d; /^ro.config.miui_compat_enable=/d; /^ro.config.miui_appcompat_enable=/d' /data/adb/modules/MIUI_MagicWindow+/system.prop && echo "Command executed successfully." || echo "Command failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},gN=()=>{const e=`grep -qxF "# 开启游戏显示布局" system.prop || echo -e " +${n(e)}${o}>`:n(e)},Kl=e=>qR(e,"name"),U4=(e,t,o,n={},r={},i={})=>{const a=ht(),l=[];return new Set([...Object.keys(e),...Object.keys(t),...Object.keys(n),...Object.keys(r)]).forEach(u=>{var E;const d=n[u]??e[u],c=r[u]??t[u],h=i[u]??o[u],f=(E=c==null?void 0:c.supportModes)==null?void 0:E.split(",");c==null||c.defaultSettings;let p="disabled",g=d?!d.fullRule:!1,v=(f==null?void 0:f.includes("fo"))||c&&!c.hasOwnProperty("disable")||!1,b=(f==null?void 0:f.includes("full"))||!1,C=n[u]||r[u]||i[u]?"custom":"module";if(a.MIOSVersion&&a.MIOSVersion>=2)h?(p="disabled",h.fixedOrientationEnable&&(p="fixedOrientation"),h.ratio_fullScreenEnable&&(p="fullScreen"),h.embeddedEnable&&(p="embedded")):p=Wv(d,c);else if(h!=null&&h.hasOwnProperty("embeddedEnable"))h.embeddedEnable&&d?p=d.fullRule?"fullScreen":"embedded":c&&(!c.hasOwnProperty("disable")||!c.disable)&&(p="fixedOrientation");else if(c&&(!c.hasOwnProperty("disable")||!c.disable)&&(p="fixedOrientation"),d){const P=d.hasOwnProperty("defaultSettings")&&d.defaultSettings;(!d.hasOwnProperty("defaultSettings")||P)&&(p=d.fullRule?"fullScreen":"embedded")}const k=Kl(d),w=Kl(c),_=Kl(h),M={name:u,settingMode:p,isSupportEmbedded:g,isSupportFixedOrientation:v,isSupportFullScreen:b,ruleMode:C,embeddedRules:k||void 0,fixedOrientationRule:w||void 0,settingRule:_||void 0};l.push(M)}),l},K4=(e,t={},o={})=>{const n=[];return new Set([...Object.keys(e),...Object.keys(t)]).forEach(i=>{const a=t[i]?t[i]:e[i],l=o[i];let s="module";t[i]&&(s="custom");const u=Kl(l),d=Kl(a),c={name:i,ruleMode:s,settingMode:eN(a.activityRule||""),autoUIRule:d||void 0,settingRule:u||void 0};n.push(c)}),n},ht=Gi("device",()=>{const e=A(),t=A(),o=A(),n=Nt({socName:"",socModel:"",display0Panel:"",memoryInfo:""}),r=A(),i=A(!1),a=A(),l=A(!1),s=A(!1),u=A(!1),d=A(!1),c=A(window.innerWidth),h=A(!1),f=A(""),p=A([]),g=A({}),v=A(""),b=A(""),C=A("Magisk"),k=A(!1),w=Nt({installed:!1,mode:void 0}),_=Nt({KSU:!1,KSU_VER:"",KSU_VER_CODE:0,KSU_KERNEL_VER_CODE:0,APATCH:!1,APATCH_VER_CODE:0,APATCH_VER:0,MAGISK_VER:"",MAGISK_VER_CODE:""}),M=Nt({sohQcom:0,sohMTK:0,sohXMPower:0,chargeFullDesign:0,chargeFull:0,cycleCount:0}),E=Nt({OS2_PAD_EMBEDDED_APP_MANAGER:!0,Hyper_OS_DOT_BLACK_LIST_MANAGER:!0,GAME_BOOSTER_RADIO_MANAGER:!0,GAME_BOOSTER_CUSTOM_RATIO:!1}),P=A(),z=A(!1),$=A(!1),G=A(!1),H=A(!1),q=A("autoRhythm"),W=A(!0),L=Nt([]),I=Nt({GameMode:!1,MIUIContentExt:!1,lowWebViewVersion:!1,patchModeAlert:!1,needInstalledKsuWebUiApk:!1}),R=Nt({amktiaoROMInterface:!1}),O=D(()=>L.length>0);async function oe(){return new Promise(async(j,X)=>{const[le,ae]=await Me(WN());le?(L.push({type:"getAndroidApplicationPackageNameListErr",title:"获取用户已安装的应用包名",msg:le}),X(le)):(ae&&(p.value=ae==null?void 0:ae.split(",")),j(p.value))})}async function y(){const j=[Me(sN()),Me(vN()),Me(VN()),Me(YN()),Me(xN()),Me(MN()),Me(yN()),Me(CN()),Me(_N()),Me(wN()),Me(SN()),Me(FN()),Me(eV()),Me(tV()),Me(oV()),Me(hV()),Me(rN()),Me(iN()),Me(kV()),Me(EV())],X=await Promise.all(j),[[,le],[,ae],[,Fe],[,fe],[,ue],[,we],[,ie],[,be],[,ze],[,pe],[,U],[,N],[,ge],[,Ce],[,se],[,te],[,ce],[,Q],[,re],[,he]]=X;if(le!=null&&le.length||L.push({type:"moduleInfo",title:"模块信息",msg:"获取模块信息失败"}),le!=null&&le.length){const et=jv({...JH(le),dir:"/data/adb/modules/MIUI_MagicWindow+"});et.versionCode&&(r.value?r.value {const e="getprop ro.build.characteristics";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},oN=()=>{const e="getprop ro.build.version.sdk";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(Number(r))}}),e)},nN=()=>{const e="getprop ro.mi.os.version.code";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(Number(r))}}),e)},rN=()=>{const e="getprop ro.vendor.qti.soc_name";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},iN=()=>{const e="getprop ro.vendor.qti.soc_model";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},aN=()=>{const e="getprop ro.config.miui_compat_enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},lN=()=>{const e="getprop ro.config.miui_appcompat_enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},sN=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/module.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},uN=()=>{const e=`grep -q '^is_patch_mode=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_patch_mode=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},dN=()=>{const e=`sed -i '/^is_patch_mode=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_patch_mode successfully." || echo "Remove is_patch_mode failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},cN=()=>{const e="grep 'is_patch_mode=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},fN=()=>{const e=`grep -q '^is_disabled_os2_system_app_optimize=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_disabled_os2_system_app_optimize=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},hN=()=>{const e=`sed -i '/^is_disabled_os2_system_app_optimize=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_disabled_os2_system_app_optimize successfully." || echo "Remove is_disabled_os2_system_app_optimize failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},pN=()=>{const e="grep 'is_disabled_os2_system_app_optimize=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},mN=()=>{const e=`sed -i '/^# 开启游戏显示布局/d; /^ro.config.miui_compat_enable=/d; /^ro.config.miui_appcompat_enable=/d' /data/adb/modules/MIUI_MagicWindow+/system.prop && echo "Command executed successfully." || echo "Command failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},gN=()=>{const e=`grep -qxF "# 开启游戏显示布局" system.prop || echo -e " # 开启游戏显示布局 ro.config.miui_compat_enable=true ro.config.miui_appcompat_enable=true" >> /data/adb/modules/MIUI_MagicWindow+/system.prop && echo "Command executed successfully." || echo "Command failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},vN=()=>{const e="settings get global device_name";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},bN=()=>{const e="settings get secure show_rotation_suggestions";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},xN=()=>{const e="settings get global miui_version_name";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},yN=()=>{const e="cat /sys/class/qcom-battery/soh";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},CN=()=>{const e="cat /sys/class/power_supply/bms/soh";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},wN=()=>{const e="cat /sys/class/power_supply/battery/charge_full_design";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},SN=()=>{const e="cat /sys/class/power_supply/battery/charge_full";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},FN=()=>{const e="cat /sys/class/power_supply/battery/cycle_count";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},EN=()=>{const e="cat /sys/class/qcom-battery/fg1_rsoc";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},kN=()=>{const e="cat /sys/class/power_supply/bms/capacity_raw";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},_N=()=>{const e="cat /sys/class/xm_power/fg_master/soh";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},MN=()=>{const e="settings get global miui_pre_version";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},RN=e=>{const t=`settings put secure show_rotation_suggestions ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i==="null"?"":i)}}),t)},zN=()=>{const e=`grep -q '^is_hide_gesture_line=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_hide_gesture_line=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},AN=()=>{const e=`sed -i '/^is_hide_gesture_line=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_hide_gesture_line successfully." || echo "Remove is_hide_gesture_line failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},PN=e=>{const t=`settings put global hide_gesture_line ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i==="null"?"":i)}}),t)},BN=()=>{const e="settings get global hide_gesture_line";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},$N=e=>{const t=`settings put secure key_invisible_mode_state ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i==="null"?"":i)}}),t)},DN=()=>{const e="settings get secure key_invisible_mode_state";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},TN=()=>{const e="am start -n com.miui.securitycenter/com.miui.permcenter.settings.InvisibleModeActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},IN=e=>{const t=`settings put system miui_cursor_style ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i==="null"?"":i)}}),t)},ON=()=>{const e="settings get system miui_cursor_style";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},LN=e=>{const t=`settings put secure mouse_gesture_naturalscroll ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i==="null"?"":i)}}),t)},HN=()=>{const e="settings get secure mouse_gesture_naturalscroll";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},Uv=e=>{const t=`settings put system pointer_speed ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i==="null"?"":i)}}),t)},NN=()=>{const e="settings get system pointer_speed";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},VN=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/temp/root_manager_info.txt";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},WN=()=>{const e=`pm list packages -a | awk -F':' '{print $2}' | tr ' ' ',' | sed 's/,$/ -/'`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},jN=()=>{const e='CLASSPATH="/data/adb/modules/MIUI_MagicWindow+/common/utils/classes.dex" app_process /system/bin com.xayah.dex.HiddenApiUtil getInstalledPackagesAsUser 0 "user" "pkgName|label"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},UN=()=>{const e='ls /system/product/priv-app/MIUIContentExtension/MIUIContentExtension.apk &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},KN=()=>{const e="am start -n com.miui.contentextension/.setting.activity.MainSettingsActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Kv=()=>{const e='reboot && echo "Reboot command executed successfully." || echo "Reboot command failed."';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Reboot command executed successfully."?t(r):o(r)}}),e)},jX=(e,t)=>{const o=`echo "${e.replace(/"/g,'\\"')}" > /data/adb/MIUI_MagicWindow+/logs-${t}.txt`;return new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):n("save command executed successfully.")}})},UX=()=>{const e='pkill -9 -f com.android.systemui && echo "kill command executed successfully." || echo "kill command failed."';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="kill command executed successfully."?t(r):o(r)}}),e)},GN=e=>{const t=`pgrep -f ${e} > /dev/null && kill -9 $(pgrep -f ${e}) || true && pgrep -f com.miui.securitycenter > /dev/null && kill -9 $(pgrep -f com.miui.securitycenter) || true && pgrep -f com.miui.securityadd > /dev/null && kill -9 $(pgrep -f com.miui.securityadd) || true && am start -n com.miui.securityadd/com.miui.gamebooster.GameBoosterRichWebActivity`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},qN=e=>{const t=`cmd activity ${e}service -n com.miui.powerkeeper/.ui.framerate.FrameRateService`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},ZN=e=>{const t=ht(),o=[];return e.split(` -`).forEach(r=>{const a=(t.androidTargetSdk&&t.androidTargetSdk>=35?/id=(\d+),\s*width=(\d+),\s*height=(\d+),\s*fps=([\d.]+),\s*vsync=([\d.]+),\s*synthetic=(true|false),\s*alternativeRefreshRates=\[([^\]]*)\],\s*supportedHdrTypes=\[([^\]]*)\]/:/id=(\d+),\s*width=(\d+),\s*height=(\d+),\s*fps=([\d.]+),\s*alternativeRefreshRates=\[([^\]]*)\],\s*supportedHdrTypes=\[([^\]]*)\]/).exec(r);if(a)if(t.androidTargetSdk&&t.androidTargetSdk>=35){const[l,s,u,d,c,h,f,p,g]=a,v={id:parseInt(s,10),width:parseInt(u,10),height:parseInt(d,10),fps:parseFloat(c),vsync:parseInt(h),synthetic:f==="true",alternativeRefreshRates:p?p.split(",").map(b=>parseFloat(b.trim())):[],supportedHdrTypes:g?g.split(",").map(b=>parseInt(b.trim(),10)):[]};o.push(v)}else{const[l,s,u,d,c,h,f]=a,p={id:parseInt(s,10),width:parseInt(u,10),height:parseInt(d,10),fps:parseFloat(c),alternativeRefreshRates:h?h.split(",").map(g=>parseFloat(g.trim())):[],supportedHdrTypes:f?f.split(",").map(g=>parseInt(g.trim(),10)):[]};o.push(p)}}),o},XN=()=>{const e="dumpsys display | grep 'DisplayModeRecord'";return ke(new Promise(async(t,o)=>{try{const{errno:n,stdout:r,stderr:i}=await Se(e);if(n){o(i);return}const a=ZN(r);t(a)}catch(n){o(n)}}),e)},rc=e=>ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(`sh /data/adb/modules/MIUI_MagicWindow+/common/source/update_rule/update_rule.sh${e?` ${e}`:""}`);n?o(i):t(r)}}),"updateMiuiEmbeddingWindowRule"),YN=()=>{const e='ls -d /data/adb/shamiko/ &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},QN=()=>{const e='ls /data/adb/shamiko/whitelist &>/dev/null && echo "whitelist" || echo "blacklist"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},JN=e=>{const t=e==="whitelist"?"touch /data/adb/shamiko/whitelist":"rm -rf /data/adb/shamiko/whitelist";return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},eV=()=>{const e='ls /sys/touchpanel/pen_update &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},tV=()=>{const e='ls /sys/touchpanel/pen_enable &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},oV=()=>{const e='ls /sys/touchpanel/keyboard &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},nV=()=>{const e="cat /sys/touchpanel/pen_update";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},rV=e=>{const t=`echo ${e} > /sys/touchpanel/pen_update`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},iV=()=>{const e=`grep -q '^is_amktiao_pen_update=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_amktiao_pen_update=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},aV=()=>{const e=`sed -i '/^is_amktiao_pen_update=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_amktiao_pen_update successfully." || echo "Remove is_amktiao_pen_update failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},lV=()=>{const e="cat /sys/touchpanel/pen_enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},sV=e=>{const t=`echo ${e} > /sys/touchpanel/pen_enable`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},uV=()=>{const e=`grep -q '^is_amktiao_pen_enable=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_amktiao_pen_enable=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},dV=()=>{const e=`sed -i '/^is_amktiao_pen_enable=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_amktiao_pen_enable successfully." || echo "Remove is_amktiao_pen_enable failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},cV=()=>{const e="cat /sys/touchpanel/keyboard | head -n 1";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},fV=e=>{const t=`echo ${e} > /sys/touchpanel/keyboard`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},hV=()=>{const e="getprop ro.config.miui_desktop_mode_enabled";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},pV=()=>{const e=`grep -q '^is_add_miui_desktop_mode_enabled=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_add_miui_desktop_mode_enabled=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},mV=()=>{const e=`sed -i '/^is_add_miui_desktop_mode_enabled=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_add_miui_desktop_mode_enabled successfully." || echo "Remove is_add_miui_desktop_mode_enabled failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},gV=()=>{const e=`grep -q '^ro.config.miui_desktop_mode_enabled=' /data/adb/modules/MIUI_MagicWindow+/system.prop || (echo "ro.config.miui_desktop_mode_enabled=true" | tee -a /data/adb/modules/MIUI_MagicWindow+/system.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},vV=()=>{const e=`sed -i '/^ro.config.miui_desktop_mode_enabled=/d' //data/adb/modules/MIUI_MagicWindow+/system.prop && echo "Remove ro.config.miui_desktop_mode_enabled successfully." || echo "Remove ro.config.miui_desktop_mode_enabled failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},bV=()=>{const e="settings get system miui_dkt_mode";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},xV=e=>{const t=`settings put system miui_dkt_mode ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},yV=()=>{const e=`grep -q '^is_enable_show_notification_icon_num=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_enable_show_notification_icon_num=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},G4=()=>{const e=`sed -i '/^is_enable_show_notification_icon_num=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_enable_show_notification_icon_num successfully." || echo "Remove is_enable_show_notification_icon_num failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},CV=()=>{const e="grep 'is_enable_show_notification_icon_num=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},wV=()=>{const e=`sed -i '/^show_notification_icon_num=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove show_notification_icon_num successfully." || echo "Remove show_notification_icon_num failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},SV=e=>{const t=`grep -q '^show_notification_icon_num=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "show_notification_icon_num=${e}" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):i==="Command executed successfully."?o(i):n(i)}}),t)},FV=e=>{const t=`settings put system status_bar_show_notification_icon ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},EV=()=>{const e="cat /proc/mv";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},kV=()=>{const e="cat /sys/class/mi_display/disp-DSI-0/panel_info";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);if(n)o(i);else{r==="null"&&t("");const a=r.split("=");Array.isArray(a)&&a.length===2?t(a[1]):t("")}}}),e)},_V=e=>{const t=`service call SurfaceFlinger 1035 i32 ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},q4=e=>{const t=`service call SurfaceFlinger 1034 i32 ${e?1:0}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},Gv=()=>{const e="am start com.miui.voiceassist/com.xiaomi.voiceassistant.CTAAlertActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},MV=()=>{const e="am startservice -n com.xiaomi.aiasst.vision/.control.translation.AiTranslateService --es from systemui.plugin.tile.aisubtitles --es floatingWindowType startAiSubtitlesWindow";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},RV=()=>{const e="am start -n com.miui.mediaeditor/com.miui.gallery.vlog.template2.VlogTemplateActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},zV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$ReduceBrightColorsSettingsActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},AV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$AccessibilityInversionSettingsActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},PV=()=>{const e='am start -n com.android.phone/com.android.phone.EmergencyDialer -e shortcut "volume_down_up_three_time"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},BV=()=>{const e="am start -a android.intent.action.VIEW -n com.android.settings/.RunningServices -f 0x10000000";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},$V=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$NotificationStationActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},DV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$MemorySettingsActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},TV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.thememanager/.activity.ai.AiWallpaperListActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},IV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.xiaomi.aicr/.dist.client.activity.DistComputeClientActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},OV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.xiaomi.aicr/.dist.client.activity.DistComputeServerActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},LV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.thememanager/.activity.AiWallpaperGuideActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},HV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.miui.voiceassist/com.xiaomi.voiceassistant.instruction.card.translation.TranslationChatActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},NV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.miui.voiceassist/com.xiaomi.voiceassistant.instruction.card.translation.TranslationSynchronizeActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},VV=()=>{const e="am start -n com.google.android.gms/com.google.android.gms.googlesettings.ui.GoogleSettingsActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},WV=()=>{const e="am start -n com.miui.securitycenter/com.miui.autotask.activity.TaskManagerActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},jV=()=>{const e="am broadcast -a android.telephony.action.SECRET_CODE -d android_secret_code://5776733 android";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},UV=()=>{const e="am start -n com.android.thememanager/com.android.thememanager.activity.ThemeTabActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},qv=()=>{const e="am start -n com.miui.securitycenter/com.miui.apppredict.activity.AppClassificationActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},KV=()=>{const e="am start -n com.hyperos.aitoolbox/com.xiaomi.windowsgame.ui.GameEngineLauncherActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},GV=()=>{const e='ls /data/data/com.miui.securitycenter/databases/gamebooster.db &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},qV=()=>{const o=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/data/com.miui.securitycenter/databases/gamebooster.db "DELETE FROM gamebooster_table WHERE package_name='com.miui.contentextension'; SELECT changes();")"`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):(l&&r(l),n(a))}}),o)},Z4=e=>{const t=`chmod ${e} /data/user/0/com.miui.contentextension/files/blacklistConfig`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},ZV=()=>{const e="getprop persist.sys.stability.smartfocusio";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},XV=()=>{const e="grep 'is_auto_start_miui_cursor_style_type=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},X4=()=>{const e=`sed -i '/^is_auto_start_miui_cursor_style_type=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_auto_start_miui_cursor_style_type successfully." || echo "Remove is_auto_start_miui_cursor_style_type failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},YV=e=>{const t=`grep -q '^is_auto_start_miui_cursor_style_type=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_auto_start_miui_cursor_style_type=${e}" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):i==="Command executed successfully."?o(i):n(i)}}),t)},QV=()=>{const e="getprop persist.miui.extm.dm_opt.enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},JV=()=>{const e="echo $(awk '{print int($3 * 4096 / 1024 / 1024)}' /sys/block/zram0/bd_stat)";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},eW=()=>{const e="echo $(awk '{print int($2 * 4096 / 1024 / 1024)}' /sys/block/zram0/bd_stat)";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},tW=()=>{const e="echo $(awk '{print int($1 * 4096 / 1024 / 1024)}' /sys/block/zram0/bd_stat)";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Zv=Gi("gameBooster",()=>{const e=A([]),t=D(()=>{const u=n.value.trim().toLowerCase();return e.value.reduce((c,h)=>{const f=h.package_name.trim().toLowerCase(),p=h.app_name?h.app_name.toLowerCase():"";return!f.includes(u)&&!p.includes(u)||c.push(h),c},[])}),o=D(()=>a.length>0);D(()=>e.value.length);const n=A(""),r=A(!0),i=A(!1),a=Nt([]),l=D(()=>new Set([...e.value]));async function s(){r.value=!0;const[u,d]=await Me(GV());if(u&&(r.value=!1,i.value=!1),d){i.value=!0;const[c,h]=await Me(YH());c&&(r.value=!1,e.value=[]),h&&(r.value=!1,e.value=h)}a.length||(r.value=!1)}return{gameBoosterList:e,filterGameBoosterList:t,allPackageName:l,hasGameBoosterDataBase:i,searchKeyWord:n,errorLogging:a,isNeedShowErrorModal:o,loading:r,initDefault:s}},{persist:{pick:[]}});function g3(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Ws(){let e=[],t={addEventListener(o,n,r,i){return o.addEventListener(n,r,i),t.add(()=>o.removeEventListener(n,r,i))},requestAnimationFrame(...o){let n=requestAnimationFrame(...o);t.add(()=>cancelAnimationFrame(n))},nextFrame(...o){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...o)})},setTimeout(...o){let n=setTimeout(...o);t.add(()=>clearTimeout(n))},microTask(...o){let n={current:!0};return g3(()=>{n.current&&o[0]()}),t.add(()=>{n.current=!1})},style(o,n,r){let i=o.style.getPropertyValue(n);return Object.assign(o.style,{[n]:r}),this.add(()=>{Object.assign(o.style,{[n]:i})})},group(o){let n=Ws();return o(n),this.add(()=>n.dispose())},add(o){return e.push(o),()=>{let n=e.indexOf(o);if(n>=0)for(let r of e.splice(n,1))r()}},dispose(){for(let o of e.splice(0))o()}};return t}var Y4;let oW=Symbol("headlessui.useid"),nW=0;const v3=(Y4=Tx)!=null?Y4:function(){return He(oW,()=>`${++nW}`)()};function ho(e){var t;if(e==null||e.value==null)return null;let o=(t=e.value.$el)!=null?t:e.value;return o instanceof Node?o:null}function Qn(e,t,...o){if(e in t){let r=t[e];return typeof r=="function"?r(...o):r}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qn),n}var rW=Object.defineProperty,iW=(e,t,o)=>t in e?rW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Q4=(e,t,o)=>(iW(e,typeof t!="symbol"?t+"":t,o),o);let aW=class{constructor(){Q4(this,"current",this.detect()),Q4(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},js=new aW;function Qa(e){if(js.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ho(e);if(t)return t.ownerDocument}return document}let _1=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Wr=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Wr||{}),Xv=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Xv||{}),lW=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(lW||{});function sW(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(_1)).sort((t,o)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var Yv=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Yv||{});function uW(e,t=0){var o;return e===((o=Qa(e))==null?void 0:o.body)?!1:Qn(t,{0(){return e.matches(_1)},1(){let n=e;for(;n!==null;){if(n.matches(_1))return!0;n=n.parentElement}return!1}})}var dW=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(dW||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ii(e){e==null||e.focus({preventScroll:!0})}let cW=["textarea","input"].join(",");function fW(e){var t,o;return(o=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,cW))!=null?o:!1}function hW(e,t=o=>o){return e.slice().sort((o,n)=>{let r=t(o),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Nu(e,t,{sorted:o=!0,relativeTo:n=null,skipElements:r=[]}={}){var i;let a=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?i:document,l=Array.isArray(e)?o?hW(e):e:sW(e);r.length>0&&l.length>1&&(l=l.filter(p=>!r.includes(p))),n=n??a.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(n))-1;if(t&4)return Math.max(0,l.indexOf(n))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},c=0,h=l.length,f;do{if(c>=h||c+h<=0)return 0;let p=u+c;if(t&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}f=l[p],f==null||f.focus(d),c+=s}while(f!==a.activeElement);return t&6&&fW(f)&&f.select(),2}function Qv(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function pW(){return/Android/gi.test(window.navigator.userAgent)}function mW(){return Qv()||pW()}function Su(e,t,o){js.isServer||kt(n=>{document.addEventListener(e,t,o),n(()=>document.removeEventListener(e,t,o))})}function Jv(e,t,o){js.isServer||kt(n=>{window.addEventListener(e,t,o),n(()=>window.removeEventListener(e,t,o))})}function gW(e,t,o=D(()=>!0)){function n(i,a){if(!o.value||i.defaultPrevented)return;let l=a(i);if(l===null||!l.getRootNode().contains(l))return;let s=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let u of s){if(u===null)continue;let d=u instanceof HTMLElement?u:ho(u);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!uW(l,Yv.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let r=A(null);Su("pointerdown",i=>{var a,l;o.value&&(r.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Su("mousedown",i=>{var a,l;o.value&&(r.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Su("click",i=>{mW()||r.value&&(n(i,()=>r.value),r.value=null)},!0),Su("touchend",i=>n(i,()=>i.target instanceof HTMLElement?i.target:null),!0),Jv("blur",i=>n(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var dd=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(dd||{}),Ur=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ur||{});function _r({visible:e=!0,features:t=0,ourProps:o,theirProps:n,...r}){var i;let a=t9(n,o),l=Object.assign(r,{props:a});if(e||t&2&&a.static)return v0(l);if(t&1){let s=(i=a.unmount)==null||i?0:1;return Qn(s,{0(){return null},1(){return v0({...r,props:{...a,hidden:!0,style:{display:"none"}}})}})}return v0(l)}function v0({props:e,attrs:t,slots:o,slot:n,name:r}){var i,a;let{as:l,...s}=o9(e,["unmount","static"]),u=(i=o.default)==null?void 0:i.call(o,n),d={};if(n){let c=!1,h=[];for(let[f,p]of Object.entries(n))typeof p=="boolean"&&(c=!0),p===!0&&h.push(f);c&&(d["data-headlessui-state"]=h.join(" "))}if(l==="template"){if(u=e9(u??[]),Object.keys(s).length>0||Object.keys(t).length>0){let[c,...h]=u??[];if(!vW(c)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${r} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(s).concat(Object.keys(t)).map(g=>g.trim()).filter((g,v,b)=>b.indexOf(g)===v).sort((g,v)=>g.localeCompare(v)).map(g=>` - ${g}`).join(` +/'`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},jN=()=>{const e='CLASSPATH="/data/adb/modules/MIUI_MagicWindow+/common/utils/classes.dex" app_process /system/bin com.xayah.dex.HiddenApiUtil getInstalledPackagesAsUser 0 "user" "pkgName|label"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},UN=()=>{const e='ls /system/product/priv-app/MIUIContentExtension/MIUIContentExtension.apk &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},KN=()=>{const e="am start -n com.miui.contentextension/.setting.activity.MainSettingsActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Kv=()=>{const e='reboot && echo "Reboot command executed successfully." || echo "Reboot command failed."';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Reboot command executed successfully."?t(r):o(r)}}),e)},GX=(e,t)=>{const o=`echo "${e.replace(/"/g,'\\"')}" > /data/adb/MIUI_MagicWindow+/logs-${t}.txt`;return new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):n("save command executed successfully.")}})},qX=()=>{const e='pkill -9 -f com.android.systemui && echo "kill command executed successfully." || echo "kill command failed."';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="kill command executed successfully."?t(r):o(r)}}),e)},GN=e=>{const t=`pgrep -f ${e} > /dev/null && kill -9 $(pgrep -f ${e}) || true && pgrep -f com.miui.securitycenter > /dev/null && kill -9 $(pgrep -f com.miui.securitycenter) || true && pgrep -f com.miui.securityadd > /dev/null && kill -9 $(pgrep -f com.miui.securityadd) || true && am start -n com.miui.securityadd/com.miui.gamebooster.GameBoosterRichWebActivity`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},qN=e=>{const t=`cmd activity ${e}service -n com.miui.powerkeeper/.ui.framerate.FrameRateService`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},ZN=e=>{const t=ht(),o=[];return e.split(` +`).forEach(r=>{const a=(t.androidTargetSdk&&t.androidTargetSdk>=35?/id=(\d+),\s*width=(\d+),\s*height=(\d+),\s*fps=([\d.]+),\s*vsync=([\d.]+),\s*synthetic=(true|false),\s*alternativeRefreshRates=\[([^\]]*)\],\s*supportedHdrTypes=\[([^\]]*)\]/:/id=(\d+),\s*width=(\d+),\s*height=(\d+),\s*fps=([\d.]+),\s*alternativeRefreshRates=\[([^\]]*)\],\s*supportedHdrTypes=\[([^\]]*)\]/).exec(r);if(a)if(t.androidTargetSdk&&t.androidTargetSdk>=35){const[l,s,u,d,c,h,f,p,g]=a,v={id:parseInt(s,10),width:parseInt(u,10),height:parseInt(d,10),fps:parseFloat(c),vsync:parseInt(h),synthetic:f==="true",alternativeRefreshRates:p?p.split(",").map(b=>parseFloat(b.trim())):[],supportedHdrTypes:g?g.split(",").map(b=>parseInt(b.trim(),10)):[]};o.push(v)}else{const[l,s,u,d,c,h,f]=a,p={id:parseInt(s,10),width:parseInt(u,10),height:parseInt(d,10),fps:parseFloat(c),alternativeRefreshRates:h?h.split(",").map(g=>parseFloat(g.trim())):[],supportedHdrTypes:f?f.split(",").map(g=>parseInt(g.trim(),10)):[]};o.push(p)}}),o},XN=()=>{const e="dumpsys display | grep 'DisplayModeRecord'";return ke(new Promise(async(t,o)=>{try{const{errno:n,stdout:r,stderr:i}=await Se(e);if(n){o(i);return}const a=ZN(r);t(a)}catch(n){o(n)}}),e)},rc=e=>ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(`sh /data/adb/modules/MIUI_MagicWindow+/common/source/update_rule/update_rule.sh${e?` ${e}`:""}`);n?o(i):t(r)}}),"updateMiuiEmbeddingWindowRule"),YN=()=>{const e='ls -d /data/adb/shamiko/ &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},QN=()=>{const e='ls /data/adb/shamiko/whitelist &>/dev/null && echo "whitelist" || echo "blacklist"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},JN=e=>{const t=e==="whitelist"?"touch /data/adb/shamiko/whitelist":"rm -rf /data/adb/shamiko/whitelist";return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},eV=()=>{const e='ls /sys/touchpanel/pen_update &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},tV=()=>{const e='ls /sys/touchpanel/pen_enable &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},oV=()=>{const e='ls /sys/touchpanel/keyboard &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},nV=()=>{const e="cat /sys/touchpanel/pen_update";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},rV=e=>{const t=`echo ${e} > /sys/touchpanel/pen_update`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},iV=()=>{const e=`grep -q '^is_amktiao_pen_update=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_amktiao_pen_update=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},aV=()=>{const e=`sed -i '/^is_amktiao_pen_update=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_amktiao_pen_update successfully." || echo "Remove is_amktiao_pen_update failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},lV=()=>{const e="cat /sys/touchpanel/pen_enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},sV=e=>{const t=`echo ${e} > /sys/touchpanel/pen_enable`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},uV=()=>{const e=`grep -q '^is_amktiao_pen_enable=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_amktiao_pen_enable=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},dV=()=>{const e=`sed -i '/^is_amktiao_pen_enable=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_amktiao_pen_enable successfully." || echo "Remove is_amktiao_pen_enable failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},cV=()=>{const e="cat /sys/touchpanel/keyboard | head -n 1";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},fV=e=>{const t=`echo ${e} > /sys/touchpanel/keyboard`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},hV=()=>{const e="getprop ro.config.miui_desktop_mode_enabled";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},pV=()=>{const e=`grep -q '^is_add_miui_desktop_mode_enabled=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_add_miui_desktop_mode_enabled=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},mV=()=>{const e=`sed -i '/^is_add_miui_desktop_mode_enabled=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_add_miui_desktop_mode_enabled successfully." || echo "Remove is_add_miui_desktop_mode_enabled failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},gV=()=>{const e=`grep -q '^ro.config.miui_desktop_mode_enabled=' /data/adb/modules/MIUI_MagicWindow+/system.prop || (echo "ro.config.miui_desktop_mode_enabled=true" | tee -a /data/adb/modules/MIUI_MagicWindow+/system.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},vV=()=>{const e=`sed -i '/^ro.config.miui_desktop_mode_enabled=/d' //data/adb/modules/MIUI_MagicWindow+/system.prop && echo "Remove ro.config.miui_desktop_mode_enabled successfully." || echo "Remove ro.config.miui_desktop_mode_enabled failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},bV=()=>{const e="settings get system miui_dkt_mode";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},xV=e=>{const t=`settings put system miui_dkt_mode ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},yV=()=>{const e=`grep -q '^is_enable_show_notification_icon_num=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_enable_show_notification_icon_num=true" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="Command executed successfully."?t(r):o(r)}}),e)},G4=()=>{const e=`sed -i '/^is_enable_show_notification_icon_num=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_enable_show_notification_icon_num successfully." || echo "Remove is_enable_show_notification_icon_num failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},CV=()=>{const e="grep 'is_enable_show_notification_icon_num=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},wV=()=>{const e=`sed -i '/^show_notification_icon_num=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove show_notification_icon_num successfully." || echo "Remove show_notification_icon_num failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},SV=e=>{const t=`grep -q '^show_notification_icon_num=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "show_notification_icon_num=${e}" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):i==="Command executed successfully."?o(i):n(i)}}),t)},FV=e=>{const t=`settings put system status_bar_show_notification_icon ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},EV=()=>{const e="cat /proc/mv";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r==="null"?"":r)}}),e)},kV=()=>{const e="cat /sys/class/mi_display/disp-DSI-0/panel_info";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);if(n)o(i);else{r==="null"&&t("");const a=r.split("=");Array.isArray(a)&&a.length===2?t(a[1]):t("")}}}),e)},_V=e=>{const t=`service call SurfaceFlinger 1035 i32 ${e}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},q4=e=>{const t=`service call SurfaceFlinger 1034 i32 ${e?1:0}`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},Gv=()=>{const e="am start com.miui.voiceassist/com.xiaomi.voiceassistant.CTAAlertActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},MV=()=>{const e="am startservice -n com.xiaomi.aiasst.vision/.control.translation.AiTranslateService --es from systemui.plugin.tile.aisubtitles --es floatingWindowType startAiSubtitlesWindow";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},RV=()=>{const e="am start -n com.miui.mediaeditor/com.miui.gallery.vlog.template2.VlogTemplateActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},zV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$ReduceBrightColorsSettingsActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},AV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$AccessibilityInversionSettingsActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},PV=()=>{const e='am start -n com.android.phone/com.android.phone.EmergencyDialer -e shortcut "volume_down_up_three_time"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},BV=()=>{const e="am start -a android.intent.action.VIEW -n com.android.settings/.RunningServices -f 0x10000000";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},$V=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$NotificationStationActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},DV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.settings/.Settings$MemorySettingsActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},TV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.thememanager/.activity.ai.AiWallpaperListActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},IV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.xiaomi.aicr/.dist.client.activity.DistComputeClientActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},OV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.xiaomi.aicr/.dist.client.activity.DistComputeServerActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},LV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.android.thememanager/.activity.AiWallpaperGuideActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},HV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.miui.voiceassist/com.xiaomi.voiceassistant.instruction.card.translation.TranslationChatActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},NV=()=>{const e="am start 'intent://settings/#Intent;action=android.intent.action.VIEW;launchFlags=0x14400000;component=com.miui.voiceassist/com.xiaomi.voiceassistant.instruction.card.translation.TranslationSynchronizeActivity;end'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},VV=()=>{const e="am start -n com.google.android.gms/com.google.android.gms.googlesettings.ui.GoogleSettingsActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},WV=()=>{const e="am start -n com.miui.securitycenter/com.miui.autotask.activity.TaskManagerActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},jV=()=>{const e="am broadcast -a android.telephony.action.SECRET_CODE -d android_secret_code://5776733 android";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},UV=()=>{const e="am start -n com.android.thememanager/com.android.thememanager.activity.ThemeTabActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},qv=()=>{const e="am start -n com.miui.securitycenter/com.miui.apppredict.activity.AppClassificationActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},KV=()=>{const e="am start -n com.hyperos.aitoolbox/com.xiaomi.windowsgame.ui.GameEngineLauncherActivity";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},GV=()=>{const e='ls /data/data/com.miui.securitycenter/databases/gamebooster.db &>/dev/null && echo "exists" || echo "not exists"';return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}}),e)},qV=()=>{const o=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/data/com.miui.securitycenter/databases/gamebooster.db "DELETE FROM gamebooster_table WHERE package_name='com.miui.contentextension'; SELECT changes();")"`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):(l&&r(l),n(a))}}),o)},Z4=e=>{const t=`chmod ${e} /data/user/0/com.miui.contentextension/files/blacklistConfig`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):o(i)}}),t)},ZV=()=>{const e="getprop persist.sys.stability.smartfocusio";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},XV=()=>{const e="grep 'is_auto_start_miui_cursor_style_type=' /data/adb/MIUI_MagicWindow+/config.prop | awk -F'=' '{print $2}'";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},X4=()=>{const e=`sed -i '/^is_auto_start_miui_cursor_style_type=/d' //data/adb/MIUI_MagicWindow+/config.prop && echo "Remove is_auto_start_miui_cursor_style_type successfully." || echo "Remove is_auto_start_miui_cursor_style_type failed."`;return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},YV=e=>{const t=`grep -q '^is_auto_start_miui_cursor_style_type=' /data/adb/MIUI_MagicWindow+/config.prop || (echo "is_auto_start_miui_cursor_style_type=${e}" | tee -a /data/adb/MIUI_MagicWindow+/config.prop > /dev/null && echo "Command executed successfully." || echo "Command failed.")`;return ke(new Promise(async(o,n)=>{{const{errno:r,stdout:i,stderr:a}=await Se(t);r?n(a):i==="Command executed successfully."?o(i):n(i)}}),t)},QV=()=>{const e="cat /sys/block/zram0/backing_dev";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},JV=()=>{const e="getprop persist.miui.extm.dm_opt.enable";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},eW=()=>{const e="echo $(awk '{print int($3 * 4096 / 1024 / 1024)}' /sys/block/zram0/bd_stat)";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},tW=()=>{const e="echo $(awk '{print int($2 * 4096 / 1024 / 1024)}' /sys/block/zram0/bd_stat)";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},oW=()=>{const e="echo $(awk '{print int($1 * 4096 / 1024 / 1024)}' /sys/block/zram0/bd_stat)";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Zv=Gi("gameBooster",()=>{const e=A([]),t=D(()=>{const u=n.value.trim().toLowerCase();return e.value.reduce((c,h)=>{const f=h.package_name.trim().toLowerCase(),p=h.app_name?h.app_name.toLowerCase():"";return!f.includes(u)&&!p.includes(u)||c.push(h),c},[])}),o=D(()=>a.length>0);D(()=>e.value.length);const n=A(""),r=A(!0),i=A(!1),a=Nt([]),l=D(()=>new Set([...e.value]));async function s(){r.value=!0;const[u,d]=await Me(GV());if(u&&(r.value=!1,i.value=!1),d){i.value=!0;const[c,h]=await Me(YH());c&&(r.value=!1,e.value=[]),h&&(r.value=!1,e.value=h)}a.length||(r.value=!1)}return{gameBoosterList:e,filterGameBoosterList:t,allPackageName:l,hasGameBoosterDataBase:i,searchKeyWord:n,errorLogging:a,isNeedShowErrorModal:o,loading:r,initDefault:s}},{persist:{pick:[]}});function g3(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function Ws(){let e=[],t={addEventListener(o,n,r,i){return o.addEventListener(n,r,i),t.add(()=>o.removeEventListener(n,r,i))},requestAnimationFrame(...o){let n=requestAnimationFrame(...o);t.add(()=>cancelAnimationFrame(n))},nextFrame(...o){t.requestAnimationFrame(()=>{t.requestAnimationFrame(...o)})},setTimeout(...o){let n=setTimeout(...o);t.add(()=>clearTimeout(n))},microTask(...o){let n={current:!0};return g3(()=>{n.current&&o[0]()}),t.add(()=>{n.current=!1})},style(o,n,r){let i=o.style.getPropertyValue(n);return Object.assign(o.style,{[n]:r}),this.add(()=>{Object.assign(o.style,{[n]:i})})},group(o){let n=Ws();return o(n),this.add(()=>n.dispose())},add(o){return e.push(o),()=>{let n=e.indexOf(o);if(n>=0)for(let r of e.splice(n,1))r()}},dispose(){for(let o of e.splice(0))o()}};return t}var Y4;let nW=Symbol("headlessui.useid"),rW=0;const v3=(Y4=Tx)!=null?Y4:function(){return He(nW,()=>`${++rW}`)()};function ho(e){var t;if(e==null||e.value==null)return null;let o=(t=e.value.$el)!=null?t:e.value;return o instanceof Node?o:null}function Qn(e,t,...o){if(e in t){let r=t[e];return typeof r=="function"?r(...o):r}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(r=>`"${r}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,Qn),n}var iW=Object.defineProperty,aW=(e,t,o)=>t in e?iW(e,t,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[t]=o,Q4=(e,t,o)=>(aW(e,typeof t!="symbol"?t+"":t,o),o);let lW=class{constructor(){Q4(this,"current",this.detect()),Q4(this,"currentId",0)}set(t){this.current!==t&&(this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}},js=new lW;function Qa(e){if(js.isServer)return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let t=ho(e);if(t)return t.ownerDocument}return document}let _1=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Wr=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Wr||{}),Xv=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Xv||{}),sW=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(sW||{});function uW(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(_1)).sort((t,o)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(o.tabIndex||Number.MAX_SAFE_INTEGER)))}var Yv=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Yv||{});function dW(e,t=0){var o;return e===((o=Qa(e))==null?void 0:o.body)?!1:Qn(t,{0(){return e.matches(_1)},1(){let n=e;for(;n!==null;){if(n.matches(_1))return!0;n=n.parentElement}return!1}})}var cW=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(cW||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Ii(e){e==null||e.focus({preventScroll:!0})}let fW=["textarea","input"].join(",");function hW(e){var t,o;return(o=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,fW))!=null?o:!1}function pW(e,t=o=>o){return e.slice().sort((o,n)=>{let r=t(o),i=t(n);if(r===null||i===null)return 0;let a=r.compareDocumentPosition(i);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Nu(e,t,{sorted:o=!0,relativeTo:n=null,skipElements:r=[]}={}){var i;let a=(i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?i:document,l=Array.isArray(e)?o?pW(e):e:uW(e);r.length>0&&l.length>1&&(l=l.filter(p=>!r.includes(p))),n=n??a.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),u=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,l.indexOf(n))-1;if(t&4)return Math.max(0,l.indexOf(n))+1;if(t&8)return l.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),d=t&32?{preventScroll:!0}:{},c=0,h=l.length,f;do{if(c>=h||c+h<=0)return 0;let p=u+c;if(t&16)p=(p+h)%h;else{if(p<0)return 3;if(p>=h)return 1}f=l[p],f==null||f.focus(d),c+=s}while(f!==a.activeElement);return t&6&&hW(f)&&f.select(),2}function Qv(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function mW(){return/Android/gi.test(window.navigator.userAgent)}function gW(){return Qv()||mW()}function Su(e,t,o){js.isServer||kt(n=>{document.addEventListener(e,t,o),n(()=>document.removeEventListener(e,t,o))})}function Jv(e,t,o){js.isServer||kt(n=>{window.addEventListener(e,t,o),n(()=>window.removeEventListener(e,t,o))})}function vW(e,t,o=D(()=>!0)){function n(i,a){if(!o.value||i.defaultPrevented)return;let l=a(i);if(l===null||!l.getRootNode().contains(l))return;let s=function u(d){return typeof d=="function"?u(d()):Array.isArray(d)||d instanceof Set?d:[d]}(e);for(let u of s){if(u===null)continue;let d=u instanceof HTMLElement?u:ho(u);if(d!=null&&d.contains(l)||i.composed&&i.composedPath().includes(d))return}return!dW(l,Yv.Loose)&&l.tabIndex!==-1&&i.preventDefault(),t(i,l)}let r=A(null);Su("pointerdown",i=>{var a,l;o.value&&(r.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Su("mousedown",i=>{var a,l;o.value&&(r.value=((l=(a=i.composedPath)==null?void 0:a.call(i))==null?void 0:l[0])||i.target)},!0),Su("click",i=>{gW()||r.value&&(n(i,()=>r.value),r.value=null)},!0),Su("touchend",i=>n(i,()=>i.target instanceof HTMLElement?i.target:null),!0),Jv("blur",i=>n(i,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}var dd=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(dd||{}),Ur=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(Ur||{});function _r({visible:e=!0,features:t=0,ourProps:o,theirProps:n,...r}){var i;let a=t9(n,o),l=Object.assign(r,{props:a});if(e||t&2&&a.static)return v0(l);if(t&1){let s=(i=a.unmount)==null||i?0:1;return Qn(s,{0(){return null},1(){return v0({...r,props:{...a,hidden:!0,style:{display:"none"}}})}})}return v0(l)}function v0({props:e,attrs:t,slots:o,slot:n,name:r}){var i,a;let{as:l,...s}=o9(e,["unmount","static"]),u=(i=o.default)==null?void 0:i.call(o,n),d={};if(n){let c=!1,h=[];for(let[f,p]of Object.entries(n))typeof p=="boolean"&&(c=!0),p===!0&&h.push(f);c&&(d["data-headlessui-state"]=h.join(" "))}if(l==="template"){if(u=e9(u??[]),Object.keys(s).length>0||Object.keys(t).length>0){let[c,...h]=u??[];if(!bW(c)||h.length>0)throw new Error(['Passing props on "template"!',"",`The current component <${r} /> is rendering a "template".`,"However we need to passthrough the following props:",Object.keys(s).concat(Object.keys(t)).map(g=>g.trim()).filter((g,v,b)=>b.indexOf(g)===v).sort((g,v)=>g.localeCompare(v)).map(g=>` - ${g}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".',"Render a single element as the child so that we can forward the props onto that element."].map(g=>` - ${g}`).join(` `)].join(` -`));let f=t9((a=c.props)!=null?a:{},s,d),p=qo(c,f,!0);for(let g in f)g.startsWith("on")&&(p.props||(p.props={}),p.props[g]=f[g]);return p}return Array.isArray(u)&&u.length===1?u[0]:u}return m(l,Object.assign({},s,d),{default:()=>u})}function e9(e){return e.flatMap(t=>t.type===ft?e9(t.children):[t])}function t9(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},o={};for(let n of e)for(let r in n)r.startsWith("on")&&typeof n[r]=="function"?(o[r]!=null||(o[r]=[]),o[r].push(n[r])):t[r]=n[r];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(o).map(n=>[n,void 0])));for(let n in o)Object.assign(t,{[n](r,...i){let a=o[n];for(let l of a){if(r instanceof Event&&r.defaultPrevented)return;l(r,...i)}}});return t}function o9(e,t=[]){let o=Object.assign({},e);for(let n of t)n in o&&delete o[n];return o}function vW(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var cd=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(cd||{});let M1=ye({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:o}){return()=>{var n;let{features:r,...i}=e,a={"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return _r({ourProps:a,theirProps:i,slot:{},attrs:o,slots:t,name:"Hidden"})}}}),n9=Symbol("Context");var Jo=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Jo||{});function bW(){return b3()!==null}function b3(){return He(n9,null)}function xW(e){tt(n9,e)}var r9=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(r9||{});function yW(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Ci=[];yW(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ci[0]!==t.target&&(Ci.unshift(t.target),Ci=Ci.filter(o=>o!=null&&o.isConnected),Ci.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function i9(e,t,o,n){js.isServer||kt(r=>{e=e??window,e.addEventListener(t,o,n),r(()=>e.removeEventListener(t,o,n))})}var Ml=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ml||{});function CW(){let e=A(0);return Jv("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function a9(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let o of e.value){let n=ho(o);n instanceof HTMLElement&&t.add(n)}return t}var l9=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(l9||{});let yl=Object.assign(ye({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:A(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:n}){let r=A(null);n({el:r,$el:r});let i=D(()=>Qa(r)),a=A(!1);ut(()=>a.value=!0),Go(()=>a.value=!1),SW({ownerDocument:i},D(()=>a.value&&!!(e.features&16)));let l=FW({ownerDocument:i,container:r,initialFocus:D(()=>e.initialFocus)},D(()=>a.value&&!!(e.features&2)));EW({ownerDocument:i,container:r,containers:e.containers,previousActiveElement:l},D(()=>a.value&&!!(e.features&8)));let s=CW();function u(f){let p=ho(r);p&&(g=>g())(()=>{Qn(s.value,{[Ml.Forwards]:()=>{Nu(p,Wr.First,{skipElements:[f.relatedTarget]})},[Ml.Backwards]:()=>{Nu(p,Wr.Last,{skipElements:[f.relatedTarget]})}})})}let d=A(!1);function c(f){f.key==="Tab"&&(d.value=!0,requestAnimationFrame(()=>{d.value=!1}))}function h(f){if(!a.value)return;let p=a9(e.containers);ho(r)instanceof HTMLElement&&p.add(ho(r));let g=f.relatedTarget;g instanceof HTMLElement&&g.dataset.headlessuiFocusGuard!=="true"&&(s9(p,g)||(d.value?Nu(ho(r),Qn(s.value,{[Ml.Forwards]:()=>Wr.Next,[Ml.Backwards]:()=>Wr.Previous})|Wr.WrapAround,{relativeTo:f.target}):f.target instanceof HTMLElement&&Ii(f.target)))}return()=>{let f={},p={ref:r,onKeydown:c,onFocusout:h},{features:g,initialFocus:v,containers:b,...C}=e;return m(ft,[!!(g&4)&&m(M1,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:cd.Focusable}),_r({ourProps:p,theirProps:{...t,...C},slot:f,attrs:t,slots:o,name:"FocusTrap"}),!!(g&4)&&m(M1,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:cd.Focusable})])}}}),{features:l9});function wW(e){let t=A(Ci.slice());return lt([e],([o],[n])=>{n===!0&&o===!1?g3(()=>{t.value.splice(0)}):n===!1&&o===!0&&(t.value=Ci.slice())},{flush:"post"}),()=>{var o;return(o=t.value.find(n=>n!=null&&n.isConnected))!=null?o:null}}function SW({ownerDocument:e},t){let o=wW(t);ut(()=>{kt(()=>{var n,r;t.value||((n=e.value)==null?void 0:n.activeElement)===((r=e.value)==null?void 0:r.body)&&Ii(o())},{flush:"post"})}),Go(()=>{t.value&&Ii(o())})}function FW({ownerDocument:e,container:t,initialFocus:o},n){let r=A(null),i=A(!1);return ut(()=>i.value=!0),Go(()=>i.value=!1),ut(()=>{lt([t,o,n],(a,l)=>{if(a.every((u,d)=>(l==null?void 0:l[d])===u)||!n.value)return;let s=ho(t);s&&g3(()=>{var u,d;if(!i.value)return;let c=ho(o),h=(u=e.value)==null?void 0:u.activeElement;if(c){if(c===h){r.value=h;return}}else if(s.contains(h)){r.value=h;return}c?Ii(c):Nu(s,Wr.First|Wr.NoScroll)===Xv.Error&&console.warn("There are no focusable elements inside the "),r.value=(d=e.value)==null?void 0:d.activeElement})},{immediate:!0,flush:"post"})}),r}function EW({ownerDocument:e,container:t,containers:o,previousActiveElement:n},r){var i;i9((i=e.value)==null?void 0:i.defaultView,"focus",a=>{if(!r.value)return;let l=a9(o);ho(t)instanceof HTMLElement&&l.add(ho(t));let s=n.value;if(!s)return;let u=a.target;u&&u instanceof HTMLElement?s9(l,u)?(n.value=u,Ii(u)):(a.preventDefault(),a.stopPropagation(),Ii(s)):Ii(n.value)},!0)}function s9(e,t){for(let o of e)if(o.contains(t))return!0;return!1}function kW(e){let t=Fd(e.getSnapshot());return Go(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function _W(e,t){let o=e(),n=new Set;return{getSnapshot(){return o},subscribe(r){return n.add(r),()=>n.delete(r)},dispatch(r,...i){let a=t[r].call(o,...i);a&&(o=a,n.forEach(l=>l()))}}}function MW(){let e;return{before({doc:t}){var o;let n=t.documentElement;e=((o=t.defaultView)!=null?o:window).innerWidth-n.clientWidth},after({doc:t,d:o}){let n=t.documentElement,r=n.clientWidth-n.offsetWidth,i=e-r;o.style(n,"paddingRight",`${i}px`)}}}function RW(){return Qv()?{before({doc:e,d:t,meta:o}){function n(r){return o.containers.flatMap(i=>i()).some(i=>i.contains(r))}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=Ws();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(r=window.scrollY)!=null?r:window.pageYOffset,a=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:u}=new URL(s.href),d=e.querySelector(u);d&&!n(d)&&(a=d)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(n(l.target)){let s=l.target;for(;s.parentElement&&n(s.parentElement);)s=s.parentElement;t.style(s,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement){if(l.target.tagName==="INPUT")return;if(n(l.target)){let s=l.target;for(;s.parentElement&&s.dataset.headlessuiPortal!==""&&!(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);)s=s.parentElement;s.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let s=(l=window.scrollY)!=null?l:window.pageYOffset;i!==s&&window.scrollTo(0,i),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function zW(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function AW(e){let t={};for(let o of e)Object.assign(t,o(t));return t}let ki=_W(()=>new Map,{PUSH(e,t){var o;let n=(o=this.get(e))!=null?o:{doc:e,count:0,d:Ws(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let o=this.get(e);return o&&(o.count--,o.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:o}){let n={doc:e,d:t,meta:AW(o)},r=[RW(),MW(),zW()];r.forEach(({before:i})=>i==null?void 0:i(n)),r.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ki.subscribe(()=>{let e=ki.getSnapshot(),t=new Map;for(let[o]of e)t.set(o,o.documentElement.style.overflow);for(let o of e.values()){let n=t.get(o.doc)==="hidden",r=o.count!==0;(r&&!n||!r&&n)&&ki.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&ki.dispatch("TEARDOWN",o)}});function PW(e,t,o){let n=kW(ki),r=D(()=>{let i=e.value?n.value.get(e.value):void 0;return i?i.count>0:!1});return lt([e,t],([i,a],[l],s)=>{if(!i||!a)return;ki.dispatch("PUSH",i,o);let u=!1;s(()=>{u||(ki.dispatch("POP",l??i,o),u=!0)})},{immediate:!0}),r}let b0=new Map,Cl=new Map;function J4(e,t=A(!0)){kt(o=>{var n;if(!t.value)return;let r=ho(e);if(!r)return;o(function(){var a;if(!r)return;let l=(a=Cl.get(r))!=null?a:1;if(l===1?Cl.delete(r):Cl.set(r,l-1),l!==1)return;let s=b0.get(r);s&&(s["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",s["aria-hidden"]),r.inert=s.inert,b0.delete(r))});let i=(n=Cl.get(r))!=null?n:0;Cl.set(r,i+1),i===0&&(b0.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function BW({defaultContainers:e=[],portals:t,mainTreeNodeRef:o}={}){let n=A(null),r=Qa(n);function i(){var a,l,s;let u=[];for(let d of e)d!==null&&(d instanceof HTMLElement?u.push(d):"value"in d&&d.value instanceof HTMLElement&&u.push(d.value));if(t!=null&&t.value)for(let d of t.value)u.push(d);for(let d of(a=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?a:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(ho(n))||d.contains((s=(l=ho(n))==null?void 0:l.getRootNode())==null?void 0:s.host)||u.some(c=>d.contains(c))||u.push(d));return u}return{resolveContainers:i,contains(a){return i().some(l=>l.contains(a))},mainTreeNodeRef:n,MainTreeNode(){return o!=null?null:m(M1,{features:cd.Hidden,ref:n})}}}let u9=Symbol("ForcePortalRootContext");function $W(){return He(u9,!1)}let e5=ye({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:o}){return tt(u9,e.force),()=>{let{force:n,...r}=e;return _r({theirProps:r,ourProps:{},slot:{},slots:t,attrs:o,name:"ForcePortalRoot"})}}}),d9=Symbol("StackContext");var R1=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(R1||{});function DW(){return He(d9,()=>{})}function TW({type:e,enabled:t,element:o,onUpdate:n}){let r=DW();function i(...a){n==null||n(...a),r(...a)}ut(()=>{lt(t,(a,l)=>{a?i(0,e,o):l===!0&&i(1,e,o)},{immediate:!0,flush:"sync"})}),Go(()=>{t.value&&i(1,e,o)}),tt(d9,i)}let IW=Symbol("DescriptionContext");function OW({slot:e=A({}),name:t="Description",props:o={}}={}){let n=A([]);function r(i){return n.value.push(i),()=>{let a=n.value.indexOf(i);a!==-1&&n.value.splice(a,1)}}return tt(IW,{register:r,slot:e,name:t,props:o}),D(()=>n.value.length>0?n.value.join(" "):void 0)}function LW(e){let t=Qa(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let o=t.getElementById("headlessui-portal-root");if(o)return o;let n=t.createElement("div");return n.setAttribute("id","headlessui-portal-root"),t.body.appendChild(n)}const z1=new WeakMap;function HW(e){var t;return(t=z1.get(e))!=null?t:0}function t5(e,t){let o=t(HW(e));return o<=0?z1.delete(e):z1.set(e,o),o}let NW=ye({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:o}){let n=A(null),r=D(()=>Qa(n)),i=$W(),a=He(c9,null),l=A(i===!0||a==null?LW(n.value):a.resolveTarget());l.value&&t5(l.value,h=>h+1);let s=A(!1);ut(()=>{s.value=!0}),kt(()=>{i||a!=null&&(l.value=a.resolveTarget())});let u=He(A1,null),d=!1,c=xr();return lt(n,()=>{if(d||!u)return;let h=ho(n);h&&(Go(u.register(h),c),d=!0)}),Go(()=>{var h,f;let p=(h=r.value)==null?void 0:h.getElementById("headlessui-portal-root");!p||l.value!==p||t5(l.value,g=>g-1)||l.value.children.length>0||(f=l.value.parentElement)==null||f.removeChild(l.value)}),()=>{if(!s.value||l.value===null)return null;let h={ref:n,"data-headlessui-portal":""};return m(Fs,{to:l.value},_r({ourProps:h,theirProps:e,slot:{},attrs:o,slots:t,name:"Portal"}))}}}),A1=Symbol("PortalParentContext");function VW(){let e=He(A1,null),t=A([]);function o(i){return t.value.push(i),e&&e.register(i),()=>n(i)}function n(i){let a=t.value.indexOf(i);a!==-1&&t.value.splice(a,1),e&&e.unregister(i)}let r={register:o,unregister:n,portals:t};return[t,ye({name:"PortalWrapper",setup(i,{slots:a}){return tt(A1,r),()=>{var l;return(l=a.default)==null?void 0:l.call(a)}}})]}let c9=Symbol("PortalGroupContext"),WW=ye({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:o}){let n=Nt({resolveTarget(){return e.target}});return tt(c9,n),()=>{let{target:r,...i}=e;return _r({theirProps:i,ourProps:{},slot:{},attrs:t,slots:o,name:"PortalGroup"})}}});var jW=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(jW||{});let P1=Symbol("DialogContext");function f9(e){let t=He(P1,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,f9),o}return t}let Fu="DC8F892D-2EBD-447C-A4C8-A03058436FF4",UW=ye({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Fu},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:o,slots:n,expose:r}){var i,a;let l=(i=e.id)!=null?i:`headlessui-dialog-${v3()}`,s=A(!1);ut(()=>{s.value=!0});let u=!1,d=D(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(u||(u=!0,console.warn(`Invalid role [${d}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),c=A(0),h=b3(),f=D(()=>e.open===Fu&&h!==null?(h.value&Jo.Open)===Jo.Open:e.open),p=A(null),g=D(()=>Qa(p));if(r({el:p,$el:p}),!(e.open!==Fu||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof f.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${f.value===Fu?void 0:e.open}`);let v=D(()=>s.value&&f.value?0:1),b=D(()=>v.value===0),C=D(()=>c.value>1),k=He(P1,null)!==null,[w,_]=VW(),{resolveContainers:M,mainTreeNodeRef:E,MainTreeNode:P}=BW({portals:w,defaultContainers:[D(()=>{var j;return(j=R.panelRef.value)!=null?j:p.value})]}),z=D(()=>C.value?"parent":"leaf"),$=D(()=>h!==null?(h.value&Jo.Closing)===Jo.Closing:!1),G=D(()=>k||$.value?!1:b.value),H=D(()=>{var j,X,le;return(le=Array.from((X=(j=g.value)==null?void 0:j.querySelectorAll("body > *"))!=null?X:[]).find(ae=>ae.id==="headlessui-portal-root"?!1:ae.contains(ho(E))&&ae instanceof HTMLElement))!=null?le:null});J4(H,G);let q=D(()=>C.value?!0:b.value),W=D(()=>{var j,X,le;return(le=Array.from((X=(j=g.value)==null?void 0:j.querySelectorAll("[data-headlessui-portal]"))!=null?X:[]).find(ae=>ae.contains(ho(E))&&ae instanceof HTMLElement))!=null?le:null});J4(W,q),TW({type:"Dialog",enabled:D(()=>v.value===0),element:p,onUpdate:(j,X)=>{if(X==="Dialog")return Qn(j,{[R1.Add]:()=>c.value+=1,[R1.Remove]:()=>c.value-=1})}});let L=OW({name:"DialogDescription",slot:D(()=>({open:f.value}))}),I=A(null),R={titleId:I,panelRef:A(null),dialogState:v,setTitleId(j){I.value!==j&&(I.value=j)},close(){t("close",!1)}};tt(P1,R);let O=D(()=>!(!b.value||C.value));gW(M,(j,X)=>{j.preventDefault(),R.close(),Rt(()=>X==null?void 0:X.focus())},O);let oe=D(()=>!(C.value||v.value!==0));i9((a=g.value)==null?void 0:a.defaultView,"keydown",j=>{oe.value&&(j.defaultPrevented||j.key===r9.Escape&&(j.preventDefault(),j.stopPropagation(),R.close()))});let y=D(()=>!($.value||v.value!==0||k));return PW(g,y,j=>{var X;return{containers:[...(X=j.containers)!=null?X:[],M]}}),kt(j=>{if(v.value!==0)return;let X=ho(p);if(!X)return;let le=new ResizeObserver(ae=>{for(let Fe of ae){let fe=Fe.target.getBoundingClientRect();fe.x===0&&fe.y===0&&fe.width===0&&fe.height===0&&R.close()}});le.observe(X),j(()=>le.disconnect())}),()=>{let{open:j,initialFocus:X,...le}=e,ae={...o,ref:p,id:l,role:d.value,"aria-modal":v.value===0?!0:void 0,"aria-labelledby":I.value,"aria-describedby":L.value},Fe={open:v.value===0};return m(e5,{force:!0},()=>[m(NW,()=>m(WW,{target:p.value},()=>m(e5,{force:!1},()=>m(yl,{initialFocus:X,containers:M,features:b.value?Qn(z.value,{parent:yl.features.RestoreFocus,leaf:yl.features.All&~yl.features.FocusLock}):yl.features.None},()=>m(_,{},()=>_r({ourProps:ae,theirProps:{...le,...o},slot:Fe,attrs:o,slots:n,visible:v.value===0,features:dd.RenderStrategy|dd.Static,name:"Dialog"})))))),m(P)])}}}),KW=ye({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:n}){var r;let i=(r=e.id)!=null?r:`headlessui-dialog-panel-${v3()}`,a=f9("DialogPanel");n({el:a.panelRef,$el:a.panelRef});function l(s){s.stopPropagation()}return()=>{let{...s}=e,u={id:i,ref:a.panelRef,onClick:l};return _r({ourProps:u,theirProps:s,slot:{open:a.dialogState.value===0},attrs:t,slots:o,name:"DialogPanel"})}}});function GW(e){let t={called:!1};return(...o)=>{if(!t.called)return t.called=!0,e(...o)}}function x0(e,...t){e&&t.length>0&&e.classList.add(...t)}function Eu(e,...t){e&&t.length>0&&e.classList.remove(...t)}var B1=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(B1||{});function qW(e,t){let o=Ws();if(!e)return o.dispose;let{transitionDuration:n,transitionDelay:r}=getComputedStyle(e),[i,a]=[n,r].map(l=>{let[s=0]=l.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,d)=>d-u);return s});return i!==0?o.setTimeout(()=>t("finished"),i+a):t("finished"),o.add(()=>t("cancelled")),o.dispose}function o5(e,t,o,n,r,i){let a=Ws(),l=i!==void 0?GW(i):()=>{};return Eu(e,...r),x0(e,...t,...o),a.nextFrame(()=>{Eu(e,...o),x0(e,...n),a.add(qW(e,s=>(Eu(e,...n,...t),x0(e,...r),l(s))))}),a.add(()=>Eu(e,...t,...o,...n,...r)),a.add(()=>l("cancelled")),a.dispose}function bi(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let x3=Symbol("TransitionContext");var ZW=(e=>(e.Visible="visible",e.Hidden="hidden",e))(ZW||{});function XW(){return He(x3,null)!==null}function YW(){let e=He(x3,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function QW(){let e=He(y3,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let y3=Symbol("NestingContext");function ic(e){return"children"in e?ic(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function h9(e){let t=A([]),o=A(!1);ut(()=>o.value=!0),Go(()=>o.value=!1);function n(i,a=Ur.Hidden){let l=t.value.findIndex(({id:s})=>s===i);l!==-1&&(Qn(a,{[Ur.Unmount](){t.value.splice(l,1)},[Ur.Hidden](){t.value[l].state="hidden"}}),!ic(t)&&o.value&&(e==null||e()))}function r(i){let a=t.value.find(({id:l})=>l===i);return a?a.state!=="visible"&&(a.state="visible"):t.value.push({id:i,state:"visible"}),()=>n(i,Ur.Unmount)}return{children:t,register:r,unregister:n}}let p9=dd.RenderStrategy,Vu=ye({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:n,expose:r}){let i=A(0);function a(){i.value|=Jo.Opening,t("beforeEnter")}function l(){i.value&=~Jo.Opening,t("afterEnter")}function s(){i.value|=Jo.Closing,t("beforeLeave")}function u(){i.value&=~Jo.Closing,t("afterLeave")}if(!XW()&&bW())return()=>m(m9,{...e,onBeforeEnter:a,onAfterEnter:l,onBeforeLeave:s,onAfterLeave:u},n);let d=A(null),c=D(()=>e.unmount?Ur.Unmount:Ur.Hidden);r({el:d,$el:d});let{show:h,appear:f}=YW(),{register:p,unregister:g}=QW(),v=A(h.value?"visible":"hidden"),b={value:!0},C=v3(),k={value:!1},w=h9(()=>{!k.value&&v.value!=="hidden"&&(v.value="hidden",g(C),u())});ut(()=>{let q=p(C);Go(q)}),kt(()=>{if(c.value===Ur.Hidden&&C){if(h.value&&v.value!=="visible"){v.value="visible";return}Qn(v.value,{hidden:()=>g(C),visible:()=>p(C)})}});let _=bi(e.enter),M=bi(e.enterFrom),E=bi(e.enterTo),P=bi(e.entered),z=bi(e.leave),$=bi(e.leaveFrom),G=bi(e.leaveTo);ut(()=>{kt(()=>{if(v.value==="visible"){let q=ho(d);if(q instanceof Comment&&q.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function H(q){let W=b.value&&!f.value,L=ho(d);!L||!(L instanceof HTMLElement)||W||(k.value=!0,h.value&&a(),h.value||s(),q(h.value?o5(L,_,M,E,P,I=>{k.value=!1,I===B1.Finished&&l()}):o5(L,z,$,G,P,I=>{k.value=!1,I===B1.Finished&&(ic(w)||(v.value="hidden",g(C),u()))})))}return ut(()=>{lt([h],(q,W,L)=>{H(L),b.value=!1},{immediate:!0})}),tt(y3,w),xW(D(()=>Qn(v.value,{visible:Jo.Open,hidden:Jo.Closed})|i.value)),()=>{let{appear:q,show:W,enter:L,enterFrom:I,enterTo:R,entered:O,leave:oe,leaveFrom:y,leaveTo:j,...X}=e,le={ref:d},ae={...X,...f.value&&h.value&&js.isServer?{class:xe([o.class,X.class,..._,...M])}:{}};return _r({theirProps:ae,ourProps:le,slot:{},slots:n,attrs:o,features:p9,visible:v.value==="visible",name:"TransitionChild"})}}}),JW=Vu,m9=ye({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:n}){let r=b3(),i=D(()=>e.show===null&&r!==null?(r.value&Jo.Open)===Jo.Open:e.show);kt(()=>{if(![!0,!1].includes(i.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let a=A(i.value?"visible":"hidden"),l=h9(()=>{a.value="hidden"}),s=A(!0),u={show:i,appear:D(()=>e.appear||!s.value)};return ut(()=>{kt(()=>{s.value=!1,i.value?a.value="visible":ic(l)||(a.value="hidden")})}),tt(y3,l),tt(x3,u),()=>{let d=o9(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),c={unmount:e.unmount};return _r({ourProps:{...c,as:"template"},theirProps:{},slot:{},slots:{...n,default:()=>[m(JW,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...o,...c,...d},n.default)]},attrs:{},features:p9,visible:a.value==="visible",name:"Transition"})}}});function g9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function ej(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})])}function v9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})])}function b9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})])}function x9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})])}function y9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function tj(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m7.848 8.25 1.536.887M7.848 8.25a3 3 0 1 1-5.196-3 3 3 0 0 1 5.196 3Zm1.536.887a2.165 2.165 0 0 1 1.083 1.839c.005.351.054.695.14 1.024M9.384 9.137l2.077 1.199M7.848 15.75l1.536-.887m-1.536.887a3 3 0 1 1-5.196 3 3 3 0 0 1 5.196-3Zm1.536-.887a2.165 2.165 0 0 0 1.083-1.838c.005-.352.054-.695.14-1.025m-1.223 2.863 2.077-1.199m0-3.328a4.323 4.323 0 0 1 2.068-1.379l5.325-1.628a4.5 4.5 0 0 1 2.48-.044l.803.215-7.794 4.5m-2.882-1.664A4.33 4.33 0 0 0 10.607 12m3.736 0 7.794 4.5-.802.215a4.5 4.5 0 0 1-2.48-.043l-5.326-1.629a4.324 4.324 0 0 1-2.068-1.379M14.343 12l-2.882 1.664"})])}function fd(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z"})])}function C9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"})])}function w9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function S9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function oj(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}function F9(){const e=D(()=>t.miuiCompatEnable&&t.miuiAppCompatEnable&&t.androidTargetSdk&&t.androidTargetSdk>31),t=ht();return ut(()=>{}),{isSupportGameMode:e}}function E9(){const e=ht(),t=di(),o=A(!1),n=D(()=>({theme:e.isDarkMode?Bt:Ft})),{message:r,modal:i}=It(["message","modal"],{configProviderProps:n}),a=async()=>{if(!o.value){await navigator.clipboard.writeText("https://caiyun.139.com/m/i?135CdxVMTx4nf"),i.create({title:"无法打开传送门",type:"error",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("未检测到系统存在传送门,请先通过模块修补传送门再进入~")]),x("p",null,[F("已经复制模块下载链接到剪切板了,请务必选择固化并修复传送门~")]),x("p",null,[F("下载链接:https://caiyun.139.com/m/i?135CdxVMTx4nf")])]),negativeText:"确定"});return}i.create({title:"确认打开传送门吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("即将打开")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("传送门")])," ",F("管理界面,确定要继续吗?")])]),positiveText:"确定打开",negativeText:"我再想想",onPositiveClick:async()=>{KN().then(d=>{i.create({title:"已开启",type:"success",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("好耶OwO~")]),x("p",null,[F("已经成功开启")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("传送门")])," ",F("的管理界面了~")])]),positiveText:"确定"})},d=>{i.create({title:"无法打开传送门",type:"error",preset:"dialog",content:()=>x("p",null,[F("出现异常,无法正常打开传送门QwQ,详细问题可浏览日志记录~")]),negativeText:"确定"})})}})},l=async()=>{const[d,c]=await Me(qV());if(d){t.error("修复传送门失败",d),console.log("进来了修复失败",d);return}console.log("进来了修复成功",c),t.success("修复传送门成功",c),i.create({title:"更新设置成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("好耶w,已经成功修复传送门~实际生效还需要重启")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平板/手机管家")])," ",F("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){GN("com.miui.contentextension").then(async h=>{i.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("已经成功为你重启对应的作用域,请查看是否生效~")])})}).catch(h=>{i.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}})},s=async()=>{i.create({title:"确认固化应用黑名单吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("固化")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F("后可以避免被系统异常重置,但是后续添加")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F("需要先解除固化,确定要继续吗?")])]),positiveText:"确定固化",negativeText:"我再想想",onPositiveClick:async()=>{Z4(400)}})},u=async()=>{i.create({title:"确认解除应用黑名单的固化吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("解除")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F("固化后可以修改应用黑名单列表,修改完毕后建议重新固化")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F(",以避免被系统异常重置,确定要继续吗?")])]),positiveText:"确定解除",negativeText:"我再想想",onPositiveClick:async()=>{Z4(600)}})};return ut(()=>{UN().then(d=>{d==="exists"&&(o.value=!0)})}),{open:a,fix:l,isInstallMIUIContentExtension:o,setAuthIsOnlyRead:s,setAuthIsReadAndWrite:u}}const nj={class:"fixed inset-0 flex"},rj={class:"absolute left-full top-0 flex w-16 justify-center pt-5"},ij={class:"flex flex-1 flex-col"},aj={role:"list",class:"flex flex-1 flex-col gap-y-7"},lj={role:"list",class:"-mx-2 space-y-1"},sj={role:"list",class:"-mx-2 mt-2 space-y-1"},uj={class:"truncate"},dj={class:"mt-auto"},cj={class:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col"},fj={class:"flex flex-1 flex-col"},hj={role:"list",class:"flex flex-1 flex-col gap-y-7"},pj={role:"list",class:"-mx-2 space-y-1"},mj={role:"list",class:"-mx-2 mt-2 space-y-1"},gj={class:"truncate"},vj={class:"mt-auto"},bj={class:"min-h-screen lg:pl-72"},xj={class:"sticky top-0 z-40 backdrop-blur-md lg:mx-auto"},yj={class:"flex flex-1 gap-x-4 self-stretch lg:gap-x-6"},Cj={class:"flex h-full w-full content-center items-center justify-center"},wj={class:"flex items-center gap-x-4 lg:gap-x-6"},Sj={class:"mx-auto max-w-7xl px-4 pb-1 sm:px-6 lg:px-8"},Fj=ye({__name:"Sidebar",setup(e){const t=Vv();F9();const o=ht(),n=Zv();E9();const r=D(()=>({theme:o.isDarkMode?Bt:Ft})),{message:i,modal:a}=It(["message","modal"],{configProviderProps:r}),l=Nt([{name:"应用横屏布局",routeName:"home",href:"/",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-putong"},null)])},{name:"应用布局优化",routeName:"autoui",isShow(){return!!(o.androidTargetSdk&&o.androidTargetSdk>=33)},href:"/autoui",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-yingyong2"},null)])},{name:"游戏显示布局",routeName:"game-booster",href:"/game-booster",isShow(){return!!(o.androidTargetSdk&&o.androidTargetSdk>=32&&n.hasGameBoosterDataBase)},icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-youxi7"},null)])},{name:"窗口控制器",routeName:"dot-black-list",href:"/dot-black-list",isShow(){return!!(o.MIOSVersion&&o.MIOSVersion>=1)},icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-kongzhitai"},null)])},{name:"外设按键映射",routeName:"magic-control",href:"/magic-control",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-youxi8"},null)]),isShow(){return o.deviceCharacteristics==="tablet"}},{name:"精选应用",routeName:"appStore",href:"/appStore",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-linggan"},null)])},{name:"日志记录",routeName:"logs",href:"/logs",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-biaoji"},null)])},{name:"新春彩蛋",routeName:"eggs",href:"/eggs",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-chunjie"},null)])}]),s=[{id:1,name:"模块首页",href:"/embedded-webview?url=https://hyper-magic-window.sothx.com",initial:"H",current:!1},{id:2,name:"打赏",href:"/embedded-webview?url=https://hyper-magic-window.sothx.com/donation.html",initial:"D",current:!1}],u=A(!1),d=()=>{o.windowWidth=window.innerWidth};return ut(()=>{window.addEventListener("resize",d)}),Jt(()=>{window.removeEventListener("resize",d)}),(c,h)=>(rt("n-badge"),Re(),Oe("div",null,[x(S(m9),{as:"template",show:u.value},{default:K(()=>[x(S(UW),{as:"div",class:"relative z-50 lg:hidden",onClose:h[1]||(h[1]=f=>u.value=!1)},{default:K(()=>[x(S(Vu),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:K(()=>h[4]||(h[4]=[T("div",{class:"fixed inset-0 bg-zinc-900/80"},null,-1)])),_:1}),T("div",nj,[x(S(Vu),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:K(()=>[x(S(KW),{class:xe(["relative mr-16 flex w-full max-w-xs flex-1",S(o).isDarkMode?"bg-zinc-900":"bg-white"])},{default:K(()=>[x(S(Vu),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:K(()=>[T("div",rj,[T("button",{type:"button",class:"-m-2.5 p-2.5",onClick:h[0]||(h[0]=f=>u.value=!1)},[h[5]||(h[5]=T("span",{class:"sr-only"},"Close sidebar",-1)),x(S(oj),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),T("div",{class:xe(["flex grow flex-col gap-y-5 overflow-y-auto px-6 pb-4",S(o).isDarkMode?"bg-[#151515]":"bg-[#f6f6f6]"])},[h[7]||(h[7]=T("div",{class:"flex h-2 shrink-0 items-center"},null,-1)),T("nav",ij,[T("ul",aj,[T("li",null,[T("ul",lj,[(Re(!0),Oe(ft,null,wi(l,f=>(Re(),Oe("li",{key:f.name},[zo((Re(),Tt(ru(f.href&&f.routeName?"RouterLink":"a"),mo({ref_for:!0},f.href&&f.routeName?{to:f.href}:{href:"javascript:void(0)"},{onClick:p=>f.click&&f.click(),class:[f.routeName===S(t).name?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"]}),{default:K(()=>[(Re(),Tt(ru(f.icon),{class:xe([f.routeName===S(t).name?S(o).isDarkMode?"text-teal-400":"text-teal-600":S(o).isDarkMode?"text-gray-500 group-hover:text-teal-400":"text-gray-400 group-hover:text-teal-600","h-6 w-6 shrink-0"]),"aria-hidden":"true"},null,8,["class"])),F(" "+et(f.name),1)]),_:2},1040,["onClick","class"])),[[bn,f.isShow?f.isShow():!0]])]))),128))])]),T("li",null,[T("div",{class:xe(["text-xs font-semibold leading-6",S(o).isDarkMode?"text-gray-500":"text-gray-400"])},"快捷入口",2),T("ul",sj,[(Re(),Oe(ft,null,wi(s,f=>T("li",{key:f.name},[x(S(_l),{to:f.href,class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>[T("span",{class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"border-teal-400 text-teal-400":"border-teal-600 text-teal-600":S(o).isDarkMode?"border-gray-700 text-gray-500 group-hover:border-teal-400 group-hover:text-teal-400":"border-gray-200 text-gray-400 group-hover:border-teal-600 group-hover:text-teal-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border bg-white text-[0.625rem] font-medium"])},et(f.initial),3),T("span",uj,et(f.name),1)]),_:2},1032,["to","class"])])),64))])]),T("li",dj,[x(S(_l),{to:"/settings",class:xe([S(t).name==="settings"?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group-mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>h[6]||(h[6]=[T("svg",{class:"icon h-6 w-6 shrink-0","aria-hidden":"true"},[T("use",{"xlink:href":"#icon-shezhi"})],-1),F(" 模块设置 ")])),_:1},8,["class"])])])])],2)]),_:1},8,["class"])]),_:1})])]),_:1})]),_:1},8,["show"]),T("div",cj,[T("div",{class:xe(["flex grow flex-col gap-y-5 overflow-y-auto border-r",S(o).isDarkMode?"border-gray-700 bg-[#151515]":"border-gray-200 bg-[#f6f6f6]","px-6 pb-4"])},[h[9]||(h[9]=T("div",{class:"flex h-10 shrink-0 items-center"},null,-1)),T("nav",fj,[T("ul",hj,[T("li",null,[T("ul",pj,[(Re(!0),Oe(ft,null,wi(l,f=>(Re(),Oe("li",{key:f.name},[!f.isShow||f.isShow()?(Re(),Tt(ru(f.href&&f.routeName?"RouterLink":"a"),mo({key:0,ref_for:!0},f.href&&f.routeName?{to:f.href}:{href:"javascript:void(0)"},{onClick:p=>f.click&&f.click(),class:[f.routeName===S(t).name?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"]}),{default:K(()=>[(Re(),Tt(ru(f.icon),{class:xe([f.routeName===S(t).name?S(o).isDarkMode?"text-teal-400":"text-teal-600":S(o).isDarkMode?"text-gray-500 group-hover:text-teal-400":"text-gray-400 group-hover:text-teal-600","h-6 w-6 shrink-0"]),"aria-hidden":"true"},null,8,["class"])),F(" "+et(f.name),1)]),_:2},1040,["onClick","class"])):Ge("",!0)]))),128))])]),T("li",null,[T("div",{class:xe(["text-xs font-semibold leading-6",S(o).isDarkMode?"text-gray-500":"text-gray-400"])},"快捷入口",2),T("ul",mj,[(Re(),Oe(ft,null,wi(s,f=>T("li",{key:f.name},[x(S(_l),{to:f.href,class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>[T("span",{class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"border-teal-400 text-teal-400":"border-teal-600 text-teal-600":S(o).isDarkMode?"border-gray-700 text-gray-500 group-hover:border-teal-400 group-hover:text-teal-400":"border-gray-200 text-gray-400 group-hover:border-teal-600 group-hover:text-teal-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border bg-white text-[0.625rem] font-medium"])},et(f.initial),3),T("span",gj,et(f.name),1)]),_:2},1032,["to","class"])])),64))])]),T("li",vj,[x(S(_l),{to:"/settings",class:xe([S(t).name==="settings"?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group -mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>h[8]||(h[8]=[T("svg",{class:"icon h-6 w-6 shrink-0","aria-hidden":"true"},[T("use",{"xlink:href":"#icon-shezhi"})],-1),F(" 模块设置 ")])),_:1},8,["class"])])])])],2)]),T("div",bj,[T("div",xj,[T("div",{class:xe(["flex h-14 items-center gap-x-4 border-b",S(o).isDarkMode?"border-gray-700 bg-zinc-900/50":"border-gray-200 bg-white/50"])},[T("button",{type:"button",class:"m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:h[2]||(h[2]=f=>u.value=!0)},[h[10]||(h[10]=T("span",{class:"sr-only"},"Open sidebar",-1)),x(S(ej),{class:"h-6 w-6","aria-hidden":"true"})]),T("div",yj,[T("div",Cj,[T("h1",{class:xe([S(o).isDarkMode?"text-gray-300":"text-gray-600","text-lg font-bold","text-h1 animated-bg bg-clip-text text-center text-transparent"]),style:{"background-image":`linear-gradient(\r +`));let f=t9((a=c.props)!=null?a:{},s,d),p=qo(c,f,!0);for(let g in f)g.startsWith("on")&&(p.props||(p.props={}),p.props[g]=f[g]);return p}return Array.isArray(u)&&u.length===1?u[0]:u}return m(l,Object.assign({},s,d),{default:()=>u})}function e9(e){return e.flatMap(t=>t.type===ft?e9(t.children):[t])}function t9(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},o={};for(let n of e)for(let r in n)r.startsWith("on")&&typeof n[r]=="function"?(o[r]!=null||(o[r]=[]),o[r].push(n[r])):t[r]=n[r];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(o).map(n=>[n,void 0])));for(let n in o)Object.assign(t,{[n](r,...i){let a=o[n];for(let l of a){if(r instanceof Event&&r.defaultPrevented)return;l(r,...i)}}});return t}function o9(e,t=[]){let o=Object.assign({},e);for(let n of t)n in o&&delete o[n];return o}function bW(e){return e==null?!1:typeof e.type=="string"||typeof e.type=="object"||typeof e.type=="function"}var cd=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(cd||{});let M1=ye({name:"Hidden",props:{as:{type:[Object,String],default:"div"},features:{type:Number,default:1}},setup(e,{slots:t,attrs:o}){return()=>{var n;let{features:r,...i}=e,a={"aria-hidden":(r&2)===2?!0:(n=i["aria-hidden"])!=null?n:void 0,hidden:(r&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(r&4)===4&&(r&2)!==2&&{display:"none"}}};return _r({ourProps:a,theirProps:i,slot:{},attrs:o,slots:t,name:"Hidden"})}}}),n9=Symbol("Context");var Jo=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Jo||{});function xW(){return b3()!==null}function b3(){return He(n9,null)}function yW(e){tt(n9,e)}var r9=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(r9||{});function CW(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let Ci=[];CW(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&Ci[0]!==t.target&&(Ci.unshift(t.target),Ci=Ci.filter(o=>o!=null&&o.isConnected),Ci.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function i9(e,t,o,n){js.isServer||kt(r=>{e=e??window,e.addEventListener(t,o,n),r(()=>e.removeEventListener(t,o,n))})}var Ml=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ml||{});function wW(){let e=A(0);return Jv("keydown",t=>{t.key==="Tab"&&(e.value=t.shiftKey?1:0)}),e}function a9(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let o of e.value){let n=ho(o);n instanceof HTMLElement&&t.add(n)}return t}var l9=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.RestoreFocus=16]="RestoreFocus",e[e.All=30]="All",e))(l9||{});let yl=Object.assign(ye({name:"FocusTrap",props:{as:{type:[Object,String],default:"div"},initialFocus:{type:Object,default:null},features:{type:Number,default:30},containers:{type:[Object,Function],default:A(new Set)}},inheritAttrs:!1,setup(e,{attrs:t,slots:o,expose:n}){let r=A(null);n({el:r,$el:r});let i=D(()=>Qa(r)),a=A(!1);ut(()=>a.value=!0),Go(()=>a.value=!1),FW({ownerDocument:i},D(()=>a.value&&!!(e.features&16)));let l=EW({ownerDocument:i,container:r,initialFocus:D(()=>e.initialFocus)},D(()=>a.value&&!!(e.features&2)));kW({ownerDocument:i,container:r,containers:e.containers,previousActiveElement:l},D(()=>a.value&&!!(e.features&8)));let s=wW();function u(f){let p=ho(r);p&&(g=>g())(()=>{Qn(s.value,{[Ml.Forwards]:()=>{Nu(p,Wr.First,{skipElements:[f.relatedTarget]})},[Ml.Backwards]:()=>{Nu(p,Wr.Last,{skipElements:[f.relatedTarget]})}})})}let d=A(!1);function c(f){f.key==="Tab"&&(d.value=!0,requestAnimationFrame(()=>{d.value=!1}))}function h(f){if(!a.value)return;let p=a9(e.containers);ho(r)instanceof HTMLElement&&p.add(ho(r));let g=f.relatedTarget;g instanceof HTMLElement&&g.dataset.headlessuiFocusGuard!=="true"&&(s9(p,g)||(d.value?Nu(ho(r),Qn(s.value,{[Ml.Forwards]:()=>Wr.Next,[Ml.Backwards]:()=>Wr.Previous})|Wr.WrapAround,{relativeTo:f.target}):f.target instanceof HTMLElement&&Ii(f.target)))}return()=>{let f={},p={ref:r,onKeydown:c,onFocusout:h},{features:g,initialFocus:v,containers:b,...C}=e;return m(ft,[!!(g&4)&&m(M1,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:cd.Focusable}),_r({ourProps:p,theirProps:{...t,...C},slot:f,attrs:t,slots:o,name:"FocusTrap"}),!!(g&4)&&m(M1,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:u,features:cd.Focusable})])}}}),{features:l9});function SW(e){let t=A(Ci.slice());return lt([e],([o],[n])=>{n===!0&&o===!1?g3(()=>{t.value.splice(0)}):n===!1&&o===!0&&(t.value=Ci.slice())},{flush:"post"}),()=>{var o;return(o=t.value.find(n=>n!=null&&n.isConnected))!=null?o:null}}function FW({ownerDocument:e},t){let o=SW(t);ut(()=>{kt(()=>{var n,r;t.value||((n=e.value)==null?void 0:n.activeElement)===((r=e.value)==null?void 0:r.body)&&Ii(o())},{flush:"post"})}),Go(()=>{t.value&&Ii(o())})}function EW({ownerDocument:e,container:t,initialFocus:o},n){let r=A(null),i=A(!1);return ut(()=>i.value=!0),Go(()=>i.value=!1),ut(()=>{lt([t,o,n],(a,l)=>{if(a.every((u,d)=>(l==null?void 0:l[d])===u)||!n.value)return;let s=ho(t);s&&g3(()=>{var u,d;if(!i.value)return;let c=ho(o),h=(u=e.value)==null?void 0:u.activeElement;if(c){if(c===h){r.value=h;return}}else if(s.contains(h)){r.value=h;return}c?Ii(c):Nu(s,Wr.First|Wr.NoScroll)===Xv.Error&&console.warn("There are no focusable elements inside the "),r.value=(d=e.value)==null?void 0:d.activeElement})},{immediate:!0,flush:"post"})}),r}function kW({ownerDocument:e,container:t,containers:o,previousActiveElement:n},r){var i;i9((i=e.value)==null?void 0:i.defaultView,"focus",a=>{if(!r.value)return;let l=a9(o);ho(t)instanceof HTMLElement&&l.add(ho(t));let s=n.value;if(!s)return;let u=a.target;u&&u instanceof HTMLElement?s9(l,u)?(n.value=u,Ii(u)):(a.preventDefault(),a.stopPropagation(),Ii(s)):Ii(n.value)},!0)}function s9(e,t){for(let o of e)if(o.contains(t))return!0;return!1}function _W(e){let t=Fd(e.getSnapshot());return Go(e.subscribe(()=>{t.value=e.getSnapshot()})),t}function MW(e,t){let o=e(),n=new Set;return{getSnapshot(){return o},subscribe(r){return n.add(r),()=>n.delete(r)},dispatch(r,...i){let a=t[r].call(o,...i);a&&(o=a,n.forEach(l=>l()))}}}function RW(){let e;return{before({doc:t}){var o;let n=t.documentElement;e=((o=t.defaultView)!=null?o:window).innerWidth-n.clientWidth},after({doc:t,d:o}){let n=t.documentElement,r=n.clientWidth-n.offsetWidth,i=e-r;o.style(n,"paddingRight",`${i}px`)}}}function zW(){return Qv()?{before({doc:e,d:t,meta:o}){function n(r){return o.containers.flatMap(i=>i()).some(i=>i.contains(r))}t.microTask(()=>{var r;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=Ws();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let i=(r=window.scrollY)!=null?r:window.pageYOffset,a=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let s=l.target.closest("a");if(!s)return;let{hash:u}=new URL(s.href),d=e.querySelector(u);d&&!n(d)&&(a=d)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(n(l.target)){let s=l.target;for(;s.parentElement&&n(s.parentElement);)s=s.parentElement;t.style(s,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement){if(l.target.tagName==="INPUT")return;if(n(l.target)){let s=l.target;for(;s.parentElement&&s.dataset.headlessuiPortal!==""&&!(s.scrollHeight>s.clientHeight||s.scrollWidth>s.clientWidth);)s=s.parentElement;s.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()}},{passive:!1}),t.add(()=>{var l;let s=(l=window.scrollY)!=null?l:window.pageYOffset;i!==s&&window.scrollTo(0,i),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function AW(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function PW(e){let t={};for(let o of e)Object.assign(t,o(t));return t}let ki=MW(()=>new Map,{PUSH(e,t){var o;let n=(o=this.get(e))!=null?o:{doc:e,count:0,d:Ws(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let o=this.get(e);return o&&(o.count--,o.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:o}){let n={doc:e,d:t,meta:PW(o)},r=[zW(),RW(),AW()];r.forEach(({before:i})=>i==null?void 0:i(n)),r.forEach(({after:i})=>i==null?void 0:i(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});ki.subscribe(()=>{let e=ki.getSnapshot(),t=new Map;for(let[o]of e)t.set(o,o.documentElement.style.overflow);for(let o of e.values()){let n=t.get(o.doc)==="hidden",r=o.count!==0;(r&&!n||!r&&n)&&ki.dispatch(o.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",o),o.count===0&&ki.dispatch("TEARDOWN",o)}});function BW(e,t,o){let n=_W(ki),r=D(()=>{let i=e.value?n.value.get(e.value):void 0;return i?i.count>0:!1});return lt([e,t],([i,a],[l],s)=>{if(!i||!a)return;ki.dispatch("PUSH",i,o);let u=!1;s(()=>{u||(ki.dispatch("POP",l??i,o),u=!0)})},{immediate:!0}),r}let b0=new Map,Cl=new Map;function J4(e,t=A(!0)){kt(o=>{var n;if(!t.value)return;let r=ho(e);if(!r)return;o(function(){var a;if(!r)return;let l=(a=Cl.get(r))!=null?a:1;if(l===1?Cl.delete(r):Cl.set(r,l-1),l!==1)return;let s=b0.get(r);s&&(s["aria-hidden"]===null?r.removeAttribute("aria-hidden"):r.setAttribute("aria-hidden",s["aria-hidden"]),r.inert=s.inert,b0.delete(r))});let i=(n=Cl.get(r))!=null?n:0;Cl.set(r,i+1),i===0&&(b0.set(r,{"aria-hidden":r.getAttribute("aria-hidden"),inert:r.inert}),r.setAttribute("aria-hidden","true"),r.inert=!0)})}function $W({defaultContainers:e=[],portals:t,mainTreeNodeRef:o}={}){let n=A(null),r=Qa(n);function i(){var a,l,s;let u=[];for(let d of e)d!==null&&(d instanceof HTMLElement?u.push(d):"value"in d&&d.value instanceof HTMLElement&&u.push(d.value));if(t!=null&&t.value)for(let d of t.value)u.push(d);for(let d of(a=r==null?void 0:r.querySelectorAll("html > *, body > *"))!=null?a:[])d!==document.body&&d!==document.head&&d instanceof HTMLElement&&d.id!=="headlessui-portal-root"&&(d.contains(ho(n))||d.contains((s=(l=ho(n))==null?void 0:l.getRootNode())==null?void 0:s.host)||u.some(c=>d.contains(c))||u.push(d));return u}return{resolveContainers:i,contains(a){return i().some(l=>l.contains(a))},mainTreeNodeRef:n,MainTreeNode(){return o!=null?null:m(M1,{features:cd.Hidden,ref:n})}}}let u9=Symbol("ForcePortalRootContext");function DW(){return He(u9,!1)}let e5=ye({name:"ForcePortalRoot",props:{as:{type:[Object,String],default:"template"},force:{type:Boolean,default:!1}},setup(e,{slots:t,attrs:o}){return tt(u9,e.force),()=>{let{force:n,...r}=e;return _r({theirProps:r,ourProps:{},slot:{},slots:t,attrs:o,name:"ForcePortalRoot"})}}}),d9=Symbol("StackContext");var R1=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(R1||{});function TW(){return He(d9,()=>{})}function IW({type:e,enabled:t,element:o,onUpdate:n}){let r=TW();function i(...a){n==null||n(...a),r(...a)}ut(()=>{lt(t,(a,l)=>{a?i(0,e,o):l===!0&&i(1,e,o)},{immediate:!0,flush:"sync"})}),Go(()=>{t.value&&i(1,e,o)}),tt(d9,i)}let OW=Symbol("DescriptionContext");function LW({slot:e=A({}),name:t="Description",props:o={}}={}){let n=A([]);function r(i){return n.value.push(i),()=>{let a=n.value.indexOf(i);a!==-1&&n.value.splice(a,1)}}return tt(OW,{register:r,slot:e,name:t,props:o}),D(()=>n.value.length>0?n.value.join(" "):void 0)}function HW(e){let t=Qa(e);if(!t){if(e===null)return null;throw new Error(`[Headless UI]: Cannot find ownerDocument for contextElement: ${e}`)}let o=t.getElementById("headlessui-portal-root");if(o)return o;let n=t.createElement("div");return n.setAttribute("id","headlessui-portal-root"),t.body.appendChild(n)}const z1=new WeakMap;function NW(e){var t;return(t=z1.get(e))!=null?t:0}function t5(e,t){let o=t(NW(e));return o<=0?z1.delete(e):z1.set(e,o),o}let VW=ye({name:"Portal",props:{as:{type:[Object,String],default:"div"}},setup(e,{slots:t,attrs:o}){let n=A(null),r=D(()=>Qa(n)),i=DW(),a=He(c9,null),l=A(i===!0||a==null?HW(n.value):a.resolveTarget());l.value&&t5(l.value,h=>h+1);let s=A(!1);ut(()=>{s.value=!0}),kt(()=>{i||a!=null&&(l.value=a.resolveTarget())});let u=He(A1,null),d=!1,c=xr();return lt(n,()=>{if(d||!u)return;let h=ho(n);h&&(Go(u.register(h),c),d=!0)}),Go(()=>{var h,f;let p=(h=r.value)==null?void 0:h.getElementById("headlessui-portal-root");!p||l.value!==p||t5(l.value,g=>g-1)||l.value.children.length>0||(f=l.value.parentElement)==null||f.removeChild(l.value)}),()=>{if(!s.value||l.value===null)return null;let h={ref:n,"data-headlessui-portal":""};return m(Fs,{to:l.value},_r({ourProps:h,theirProps:e,slot:{},attrs:o,slots:t,name:"Portal"}))}}}),A1=Symbol("PortalParentContext");function WW(){let e=He(A1,null),t=A([]);function o(i){return t.value.push(i),e&&e.register(i),()=>n(i)}function n(i){let a=t.value.indexOf(i);a!==-1&&t.value.splice(a,1),e&&e.unregister(i)}let r={register:o,unregister:n,portals:t};return[t,ye({name:"PortalWrapper",setup(i,{slots:a}){return tt(A1,r),()=>{var l;return(l=a.default)==null?void 0:l.call(a)}}})]}let c9=Symbol("PortalGroupContext"),jW=ye({name:"PortalGroup",props:{as:{type:[Object,String],default:"template"},target:{type:Object,default:null}},setup(e,{attrs:t,slots:o}){let n=Nt({resolveTarget(){return e.target}});return tt(c9,n),()=>{let{target:r,...i}=e;return _r({theirProps:i,ourProps:{},slot:{},attrs:t,slots:o,name:"PortalGroup"})}}});var UW=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(UW||{});let P1=Symbol("DialogContext");function f9(e){let t=He(P1,null);if(t===null){let o=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(o,f9),o}return t}let Fu="DC8F892D-2EBD-447C-A4C8-A03058436FF4",KW=ye({name:"Dialog",inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},static:{type:Boolean,default:!1},unmount:{type:Boolean,default:!0},open:{type:[Boolean,String],default:Fu},initialFocus:{type:Object,default:null},id:{type:String,default:null},role:{type:String,default:"dialog"}},emits:{close:e=>!0},setup(e,{emit:t,attrs:o,slots:n,expose:r}){var i,a;let l=(i=e.id)!=null?i:`headlessui-dialog-${v3()}`,s=A(!1);ut(()=>{s.value=!0});let u=!1,d=D(()=>e.role==="dialog"||e.role==="alertdialog"?e.role:(u||(u=!0,console.warn(`Invalid role [${d}] passed to . Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")),c=A(0),h=b3(),f=D(()=>e.open===Fu&&h!==null?(h.value&Jo.Open)===Jo.Open:e.open),p=A(null),g=D(()=>Qa(p));if(r({el:p,$el:p}),!(e.open!==Fu||h!==null))throw new Error("You forgot to provide an `open` prop to the `Dialog`.");if(typeof f.value!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${f.value===Fu?void 0:e.open}`);let v=D(()=>s.value&&f.value?0:1),b=D(()=>v.value===0),C=D(()=>c.value>1),k=He(P1,null)!==null,[w,_]=WW(),{resolveContainers:M,mainTreeNodeRef:E,MainTreeNode:P}=$W({portals:w,defaultContainers:[D(()=>{var j;return(j=R.panelRef.value)!=null?j:p.value})]}),z=D(()=>C.value?"parent":"leaf"),$=D(()=>h!==null?(h.value&Jo.Closing)===Jo.Closing:!1),G=D(()=>k||$.value?!1:b.value),H=D(()=>{var j,X,le;return(le=Array.from((X=(j=g.value)==null?void 0:j.querySelectorAll("body > *"))!=null?X:[]).find(ae=>ae.id==="headlessui-portal-root"?!1:ae.contains(ho(E))&&ae instanceof HTMLElement))!=null?le:null});J4(H,G);let q=D(()=>C.value?!0:b.value),W=D(()=>{var j,X,le;return(le=Array.from((X=(j=g.value)==null?void 0:j.querySelectorAll("[data-headlessui-portal]"))!=null?X:[]).find(ae=>ae.contains(ho(E))&&ae instanceof HTMLElement))!=null?le:null});J4(W,q),IW({type:"Dialog",enabled:D(()=>v.value===0),element:p,onUpdate:(j,X)=>{if(X==="Dialog")return Qn(j,{[R1.Add]:()=>c.value+=1,[R1.Remove]:()=>c.value-=1})}});let L=LW({name:"DialogDescription",slot:D(()=>({open:f.value}))}),I=A(null),R={titleId:I,panelRef:A(null),dialogState:v,setTitleId(j){I.value!==j&&(I.value=j)},close(){t("close",!1)}};tt(P1,R);let O=D(()=>!(!b.value||C.value));vW(M,(j,X)=>{j.preventDefault(),R.close(),Rt(()=>X==null?void 0:X.focus())},O);let oe=D(()=>!(C.value||v.value!==0));i9((a=g.value)==null?void 0:a.defaultView,"keydown",j=>{oe.value&&(j.defaultPrevented||j.key===r9.Escape&&(j.preventDefault(),j.stopPropagation(),R.close()))});let y=D(()=>!($.value||v.value!==0||k));return BW(g,y,j=>{var X;return{containers:[...(X=j.containers)!=null?X:[],M]}}),kt(j=>{if(v.value!==0)return;let X=ho(p);if(!X)return;let le=new ResizeObserver(ae=>{for(let Fe of ae){let fe=Fe.target.getBoundingClientRect();fe.x===0&&fe.y===0&&fe.width===0&&fe.height===0&&R.close()}});le.observe(X),j(()=>le.disconnect())}),()=>{let{open:j,initialFocus:X,...le}=e,ae={...o,ref:p,id:l,role:d.value,"aria-modal":v.value===0?!0:void 0,"aria-labelledby":I.value,"aria-describedby":L.value},Fe={open:v.value===0};return m(e5,{force:!0},()=>[m(VW,()=>m(jW,{target:p.value},()=>m(e5,{force:!1},()=>m(yl,{initialFocus:X,containers:M,features:b.value?Qn(z.value,{parent:yl.features.RestoreFocus,leaf:yl.features.All&~yl.features.FocusLock}):yl.features.None},()=>m(_,{},()=>_r({ourProps:ae,theirProps:{...le,...o},slot:Fe,attrs:o,slots:n,visible:v.value===0,features:dd.RenderStrategy|dd.Static,name:"Dialog"})))))),m(P)])}}}),GW=ye({name:"DialogPanel",props:{as:{type:[Object,String],default:"div"},id:{type:String,default:null}},setup(e,{attrs:t,slots:o,expose:n}){var r;let i=(r=e.id)!=null?r:`headlessui-dialog-panel-${v3()}`,a=f9("DialogPanel");n({el:a.panelRef,$el:a.panelRef});function l(s){s.stopPropagation()}return()=>{let{...s}=e,u={id:i,ref:a.panelRef,onClick:l};return _r({ourProps:u,theirProps:s,slot:{open:a.dialogState.value===0},attrs:t,slots:o,name:"DialogPanel"})}}});function qW(e){let t={called:!1};return(...o)=>{if(!t.called)return t.called=!0,e(...o)}}function x0(e,...t){e&&t.length>0&&e.classList.add(...t)}function Eu(e,...t){e&&t.length>0&&e.classList.remove(...t)}var B1=(e=>(e.Finished="finished",e.Cancelled="cancelled",e))(B1||{});function ZW(e,t){let o=Ws();if(!e)return o.dispose;let{transitionDuration:n,transitionDelay:r}=getComputedStyle(e),[i,a]=[n,r].map(l=>{let[s=0]=l.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,d)=>d-u);return s});return i!==0?o.setTimeout(()=>t("finished"),i+a):t("finished"),o.add(()=>t("cancelled")),o.dispose}function o5(e,t,o,n,r,i){let a=Ws(),l=i!==void 0?qW(i):()=>{};return Eu(e,...r),x0(e,...t,...o),a.nextFrame(()=>{Eu(e,...o),x0(e,...n),a.add(ZW(e,s=>(Eu(e,...n,...t),x0(e,...r),l(s))))}),a.add(()=>Eu(e,...t,...o,...n,...r)),a.add(()=>l("cancelled")),a.dispose}function bi(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let x3=Symbol("TransitionContext");var XW=(e=>(e.Visible="visible",e.Hidden="hidden",e))(XW||{});function YW(){return He(x3,null)!==null}function QW(){let e=He(x3,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}function JW(){let e=He(y3,null);if(e===null)throw new Error("A is used but it is missing a parent .");return e}let y3=Symbol("NestingContext");function ic(e){return"children"in e?ic(e.children):e.value.filter(({state:t})=>t==="visible").length>0}function h9(e){let t=A([]),o=A(!1);ut(()=>o.value=!0),Go(()=>o.value=!1);function n(i,a=Ur.Hidden){let l=t.value.findIndex(({id:s})=>s===i);l!==-1&&(Qn(a,{[Ur.Unmount](){t.value.splice(l,1)},[Ur.Hidden](){t.value[l].state="hidden"}}),!ic(t)&&o.value&&(e==null||e()))}function r(i){let a=t.value.find(({id:l})=>l===i);return a?a.state!=="visible"&&(a.state="visible"):t.value.push({id:i,state:"visible"}),()=>n(i,Ur.Unmount)}return{children:t,register:r,unregister:n}}let p9=dd.RenderStrategy,Vu=ye({props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:n,expose:r}){let i=A(0);function a(){i.value|=Jo.Opening,t("beforeEnter")}function l(){i.value&=~Jo.Opening,t("afterEnter")}function s(){i.value|=Jo.Closing,t("beforeLeave")}function u(){i.value&=~Jo.Closing,t("afterLeave")}if(!YW()&&xW())return()=>m(m9,{...e,onBeforeEnter:a,onAfterEnter:l,onBeforeLeave:s,onAfterLeave:u},n);let d=A(null),c=D(()=>e.unmount?Ur.Unmount:Ur.Hidden);r({el:d,$el:d});let{show:h,appear:f}=QW(),{register:p,unregister:g}=JW(),v=A(h.value?"visible":"hidden"),b={value:!0},C=v3(),k={value:!1},w=h9(()=>{!k.value&&v.value!=="hidden"&&(v.value="hidden",g(C),u())});ut(()=>{let q=p(C);Go(q)}),kt(()=>{if(c.value===Ur.Hidden&&C){if(h.value&&v.value!=="visible"){v.value="visible";return}Qn(v.value,{hidden:()=>g(C),visible:()=>p(C)})}});let _=bi(e.enter),M=bi(e.enterFrom),E=bi(e.enterTo),P=bi(e.entered),z=bi(e.leave),$=bi(e.leaveFrom),G=bi(e.leaveTo);ut(()=>{kt(()=>{if(v.value==="visible"){let q=ho(d);if(q instanceof Comment&&q.data==="")throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")}})});function H(q){let W=b.value&&!f.value,L=ho(d);!L||!(L instanceof HTMLElement)||W||(k.value=!0,h.value&&a(),h.value||s(),q(h.value?o5(L,_,M,E,P,I=>{k.value=!1,I===B1.Finished&&l()}):o5(L,z,$,G,P,I=>{k.value=!1,I===B1.Finished&&(ic(w)||(v.value="hidden",g(C),u()))})))}return ut(()=>{lt([h],(q,W,L)=>{H(L),b.value=!1},{immediate:!0})}),tt(y3,w),yW(D(()=>Qn(v.value,{visible:Jo.Open,hidden:Jo.Closed})|i.value)),()=>{let{appear:q,show:W,enter:L,enterFrom:I,enterTo:R,entered:O,leave:oe,leaveFrom:y,leaveTo:j,...X}=e,le={ref:d},ae={...X,...f.value&&h.value&&js.isServer?{class:xe([o.class,X.class,..._,...M])}:{}};return _r({theirProps:ae,ourProps:le,slot:{},slots:n,attrs:o,features:p9,visible:v.value==="visible",name:"TransitionChild"})}}}),ej=Vu,m9=ye({inheritAttrs:!1,props:{as:{type:[Object,String],default:"div"},show:{type:[Boolean],default:null},unmount:{type:[Boolean],default:!0},appear:{type:[Boolean],default:!1},enter:{type:[String],default:""},enterFrom:{type:[String],default:""},enterTo:{type:[String],default:""},entered:{type:[String],default:""},leave:{type:[String],default:""},leaveFrom:{type:[String],default:""},leaveTo:{type:[String],default:""}},emits:{beforeEnter:()=>!0,afterEnter:()=>!0,beforeLeave:()=>!0,afterLeave:()=>!0},setup(e,{emit:t,attrs:o,slots:n}){let r=b3(),i=D(()=>e.show===null&&r!==null?(r.value&Jo.Open)===Jo.Open:e.show);kt(()=>{if(![!0,!1].includes(i.value))throw new Error('A is used but it is missing a `:show="true | false"` prop.')});let a=A(i.value?"visible":"hidden"),l=h9(()=>{a.value="hidden"}),s=A(!0),u={show:i,appear:D(()=>e.appear||!s.value)};return ut(()=>{kt(()=>{s.value=!1,i.value?a.value="visible":ic(l)||(a.value="hidden")})}),tt(y3,l),tt(x3,u),()=>{let d=o9(e,["show","appear","unmount","onBeforeEnter","onBeforeLeave","onAfterEnter","onAfterLeave"]),c={unmount:e.unmount};return _r({ourProps:{...c,as:"template"},theirProps:{},slot:{},slots:{...n,default:()=>[m(ej,{onBeforeEnter:()=>t("beforeEnter"),onAfterEnter:()=>t("afterEnter"),onBeforeLeave:()=>t("beforeLeave"),onAfterLeave:()=>t("afterLeave"),...o,...c,...d},n.default)]},attrs:{},features:p9,visible:a.value==="visible",name:"Transition"})}}});function g9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0 3.181 3.183a8.25 8.25 0 0 0 13.803-3.7M4.031 9.865a8.25 8.25 0 0 1 13.803-3.7l3.181 3.182m0-4.991v4.99"})])}function tj(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M3.75 6.75h16.5M3.75 12h16.5m-16.5 5.25h16.5"})])}function v9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M20.25 6.375c0 2.278-3.694 4.125-8.25 4.125S3.75 8.653 3.75 6.375m16.5 0c0-2.278-3.694-4.125-8.25-4.125S3.75 4.097 3.75 6.375m16.5 0v11.25c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125V6.375m16.5 0v3.75m-16.5-3.75v3.75m16.5 0v3.75C20.25 16.153 16.556 18 12 18s-8.25-1.847-8.25-4.125v-3.75m16.5 0c0 2.278-3.694 4.125-8.25 4.125s-8.25-1.847-8.25-4.125"})])}function b9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 3c2.755 0 5.455.232 8.083.678.533.09.917.556.917 1.096v1.044a2.25 2.25 0 0 1-.659 1.591l-5.432 5.432a2.25 2.25 0 0 0-.659 1.591v2.927a2.25 2.25 0 0 1-1.244 2.013L9.75 21v-6.568a2.25 2.25 0 0 0-.659-1.591L3.659 7.409A2.25 2.25 0 0 1 3 5.818V4.774c0-.54.384-1.006.917-1.096A48.32 48.32 0 0 1 12 3Z"})])}function x9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"})])}function y9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 4.5v15m7.5-7.5h-15"})])}function oj(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m7.848 8.25 1.536.887M7.848 8.25a3 3 0 1 1-5.196-3 3 3 0 0 1 5.196 3Zm1.536.887a2.165 2.165 0 0 1 1.083 1.839c.005.351.054.695.14 1.024M9.384 9.137l2.077 1.199M7.848 15.75l1.536-.887m-1.536.887a3 3 0 1 1-5.196 3 3 3 0 0 1 5.196-3Zm1.536-.887a2.165 2.165 0 0 0 1.083-1.838c.005-.352.054-.695.14-1.025m-1.223 2.863 2.077-1.199m0-3.328a4.323 4.323 0 0 1 2.068-1.379l5.325-1.628a4.5 4.5 0 0 1 2.48-.044l.803.215-7.794 4.5m-2.882-1.664A4.33 4.33 0 0 0 10.607 12m3.736 0 7.794 4.5-.802.215a4.5 4.5 0 0 1-2.48-.043l-5.326-1.629a4.324 4.324 0 0 1-2.068-1.379M14.343 12l-2.882 1.664"})])}function fd(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M7.217 10.907a2.25 2.25 0 1 0 0 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186 9.566-5.314m-9.566 7.5 9.566 5.314m0 0a2.25 2.25 0 1 0 3.935 2.186 2.25 2.25 0 0 0-3.935-2.186Zm0-12.814a2.25 2.25 0 1 0 3.933-2.185 2.25 2.25 0 0 0-3.933 2.185Z"})])}function C9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 16.875h3.375m0 0h3.375m-3.375 0V13.5m0 3.375v3.375M6 10.5h2.25a2.25 2.25 0 0 0 2.25-2.25V6a2.25 2.25 0 0 0-2.25-2.25H6A2.25 2.25 0 0 0 3.75 6v2.25A2.25 2.25 0 0 0 6 10.5Zm0 9.75h2.25A2.25 2.25 0 0 0 10.5 18v-2.25a2.25 2.25 0 0 0-2.25-2.25H6a2.25 2.25 0 0 0-2.25 2.25V18A2.25 2.25 0 0 0 6 20.25Zm9.75-9.75H18a2.25 2.25 0 0 0 2.25-2.25V6A2.25 2.25 0 0 0 18 3.75h-2.25A2.25 2.25 0 0 0 13.5 6v2.25a2.25 2.25 0 0 0 2.25 2.25Z"})])}function w9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"})])}function S9(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"m9.75 9.75 4.5 4.5m0-4.5-4.5 4.5M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"})])}function nj(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24","stroke-width":"1.5",stroke:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18 18 6M6 6l12 12"})])}function F9(){const e=D(()=>t.miuiCompatEnable&&t.miuiAppCompatEnable&&t.androidTargetSdk&&t.androidTargetSdk>31),t=ht();return ut(()=>{}),{isSupportGameMode:e}}function E9(){const e=ht(),t=di(),o=A(!1),n=D(()=>({theme:e.isDarkMode?Bt:Ft})),{message:r,modal:i}=It(["message","modal"],{configProviderProps:n}),a=async()=>{if(!o.value){await navigator.clipboard.writeText("https://caiyun.139.com/m/i?135CdxVMTx4nf"),i.create({title:"无法打开传送门",type:"error",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("未检测到系统存在传送门,请先通过模块修补传送门再进入~")]),x("p",null,[F("已经复制模块下载链接到剪切板了,请务必选择固化并修复传送门~")]),x("p",null,[F("下载链接:https://caiyun.139.com/m/i?135CdxVMTx4nf")])]),negativeText:"确定"});return}i.create({title:"确认打开传送门吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("即将打开")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("传送门")])," ",F("管理界面,确定要继续吗?")])]),positiveText:"确定打开",negativeText:"我再想想",onPositiveClick:async()=>{KN().then(d=>{i.create({title:"已开启",type:"success",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("好耶OwO~")]),x("p",null,[F("已经成功开启")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("传送门")])," ",F("的管理界面了~")])]),positiveText:"确定"})},d=>{i.create({title:"无法打开传送门",type:"error",preset:"dialog",content:()=>x("p",null,[F("出现异常,无法正常打开传送门QwQ,详细问题可浏览日志记录~")]),negativeText:"确定"})})}})},l=async()=>{const[d,c]=await Me(qV());if(d){t.error("修复传送门失败",d),console.log("进来了修复失败",d);return}console.log("进来了修复成功",c),t.success("修复传送门成功",c),i.create({title:"更新设置成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("好耶w,已经成功修复传送门~实际生效还需要重启")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平板/手机管家")])," ",F("的作用域,确定要继续吗?")]),positiveText:"确定重启作用域",negativeText:"稍后手动重启",onPositiveClick(){GN("com.miui.contentextension").then(async h=>{i.create({title:"重启作用域成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("已经成功为你重启对应的作用域,请查看是否生效~")])})}).catch(h=>{i.create({title:"重启作用域失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,重启系统界面作用域失败QwQ,详细错误请查看日志~")])})})}})},s=async()=>{i.create({title:"确认固化应用黑名单吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("固化")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F("后可以避免被系统异常重置,但是后续添加")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F("需要先解除固化,确定要继续吗?")])]),positiveText:"确定固化",negativeText:"我再想想",onPositiveClick:async()=>{Z4(400)}})},u=async()=>{i.create({title:"确认解除应用黑名单的固化吗?",type:"info",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("解除")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F("固化后可以修改应用黑名单列表,修改完毕后建议重新固化")," ",x("span",{class:`font-bold ${e.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用黑名单")])," ",F(",以避免被系统异常重置,确定要继续吗?")])]),positiveText:"确定解除",negativeText:"我再想想",onPositiveClick:async()=>{Z4(600)}})};return ut(()=>{UN().then(d=>{d==="exists"&&(o.value=!0)})}),{open:a,fix:l,isInstallMIUIContentExtension:o,setAuthIsOnlyRead:s,setAuthIsReadAndWrite:u}}const rj={class:"fixed inset-0 flex"},ij={class:"absolute left-full top-0 flex w-16 justify-center pt-5"},aj={class:"flex flex-1 flex-col"},lj={role:"list",class:"flex flex-1 flex-col gap-y-7"},sj={role:"list",class:"-mx-2 space-y-1"},uj={role:"list",class:"-mx-2 mt-2 space-y-1"},dj={class:"truncate"},cj={class:"mt-auto"},fj={class:"hidden lg:fixed lg:inset-y-0 lg:z-50 lg:flex lg:w-72 lg:flex-col"},hj={class:"flex flex-1 flex-col"},pj={role:"list",class:"flex flex-1 flex-col gap-y-7"},mj={role:"list",class:"-mx-2 space-y-1"},gj={role:"list",class:"-mx-2 mt-2 space-y-1"},vj={class:"truncate"},bj={class:"mt-auto"},xj={class:"min-h-screen lg:pl-72"},yj={class:"sticky top-0 z-40 backdrop-blur-md lg:mx-auto"},Cj={class:"flex flex-1 gap-x-4 self-stretch lg:gap-x-6"},wj={class:"flex h-full w-full content-center items-center justify-center"},Sj={class:"flex items-center gap-x-4 lg:gap-x-6"},Fj={class:"mx-auto max-w-7xl px-4 pb-1 sm:px-6 lg:px-8"},Ej=ye({__name:"Sidebar",setup(e){const t=Vv();F9();const o=ht(),n=Zv();E9();const r=D(()=>({theme:o.isDarkMode?Bt:Ft})),{message:i,modal:a}=It(["message","modal"],{configProviderProps:r}),l=Nt([{name:"应用横屏布局",routeName:"home",href:"/",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-putong"},null)])},{name:"应用布局优化",routeName:"autoui",isShow(){return!!(o.androidTargetSdk&&o.androidTargetSdk>=33)},href:"/autoui",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-yingyong2"},null)])},{name:"游戏显示布局",routeName:"game-booster",href:"/game-booster",isShow(){return!!(o.androidTargetSdk&&o.androidTargetSdk>=32&&n.hasGameBoosterDataBase)},icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-youxi7"},null)])},{name:"窗口控制器",routeName:"dot-black-list",href:"/dot-black-list",isShow(){return!!(o.MIOSVersion&&o.MIOSVersion>=1)},icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-kongzhitai"},null)])},{name:"外设按键映射",routeName:"magic-control",href:"/magic-control",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-youxi8"},null)]),isShow(){return o.deviceCharacteristics==="tablet"}},{name:"精选应用",routeName:"appStore",href:"/appStore",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-linggan"},null)])},{name:"日志记录",routeName:"logs",href:"/logs",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-biaoji"},null)])},{name:"新春彩蛋",routeName:"eggs",href:"/eggs",icon:()=>x("svg",{class:"icon","aria-hidden":"true"},[x("use",{"xlink:href":"#icon-chunjie"},null)])}]),s=[{id:1,name:"模块首页",href:"/embedded-webview?url=https://hyper-magic-window.sothx.com",initial:"H",current:!1},{id:2,name:"打赏",href:"/embedded-webview?url=https://hyper-magic-window.sothx.com/donation.html",initial:"D",current:!1}],u=A(!1),d=()=>{o.windowWidth=window.innerWidth};return ut(()=>{window.addEventListener("resize",d)}),Jt(()=>{window.removeEventListener("resize",d)}),(c,h)=>(rt("n-badge"),Re(),Oe("div",null,[x(S(m9),{as:"template",show:u.value},{default:K(()=>[x(S(KW),{as:"div",class:"relative z-50 lg:hidden",onClose:h[1]||(h[1]=f=>u.value=!1)},{default:K(()=>[x(S(Vu),{as:"template",enter:"transition-opacity ease-linear duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"transition-opacity ease-linear duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:K(()=>h[4]||(h[4]=[T("div",{class:"fixed inset-0 bg-zinc-900/80"},null,-1)])),_:1}),T("div",rj,[x(S(Vu),{as:"template",enter:"transition ease-in-out duration-300 transform","enter-from":"-translate-x-full","enter-to":"translate-x-0",leave:"transition ease-in-out duration-300 transform","leave-from":"translate-x-0","leave-to":"-translate-x-full"},{default:K(()=>[x(S(GW),{class:xe(["relative mr-16 flex w-full max-w-xs flex-1",S(o).isDarkMode?"bg-zinc-900":"bg-white"])},{default:K(()=>[x(S(Vu),{as:"template",enter:"ease-in-out duration-300","enter-from":"opacity-0","enter-to":"opacity-100",leave:"ease-in-out duration-300","leave-from":"opacity-100","leave-to":"opacity-0"},{default:K(()=>[T("div",ij,[T("button",{type:"button",class:"-m-2.5 p-2.5",onClick:h[0]||(h[0]=f=>u.value=!1)},[h[5]||(h[5]=T("span",{class:"sr-only"},"Close sidebar",-1)),x(S(nj),{class:"h-6 w-6 text-white","aria-hidden":"true"})])])]),_:1}),T("div",{class:xe(["flex grow flex-col gap-y-5 overflow-y-auto px-6 pb-4",S(o).isDarkMode?"bg-[#151515]":"bg-[#f6f6f6]"])},[h[7]||(h[7]=T("div",{class:"flex h-2 shrink-0 items-center"},null,-1)),T("nav",aj,[T("ul",lj,[T("li",null,[T("ul",sj,[(Re(!0),Oe(ft,null,wi(l,f=>(Re(),Oe("li",{key:f.name},[zo((Re(),Tt(ru(f.href&&f.routeName?"RouterLink":"a"),mo({ref_for:!0},f.href&&f.routeName?{to:f.href}:{href:"javascript:void(0)"},{onClick:p=>f.click&&f.click(),class:[f.routeName===S(t).name?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"]}),{default:K(()=>[(Re(),Tt(ru(f.icon),{class:xe([f.routeName===S(t).name?S(o).isDarkMode?"text-teal-400":"text-teal-600":S(o).isDarkMode?"text-gray-500 group-hover:text-teal-400":"text-gray-400 group-hover:text-teal-600","h-6 w-6 shrink-0"]),"aria-hidden":"true"},null,8,["class"])),F(" "+Ye(f.name),1)]),_:2},1040,["onClick","class"])),[[bn,f.isShow?f.isShow():!0]])]))),128))])]),T("li",null,[T("div",{class:xe(["text-xs font-semibold leading-6",S(o).isDarkMode?"text-gray-500":"text-gray-400"])},"快捷入口",2),T("ul",uj,[(Re(),Oe(ft,null,wi(s,f=>T("li",{key:f.name},[x(S(_l),{to:f.href,class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>[T("span",{class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"border-teal-400 text-teal-400":"border-teal-600 text-teal-600":S(o).isDarkMode?"border-gray-700 text-gray-500 group-hover:border-teal-400 group-hover:text-teal-400":"border-gray-200 text-gray-400 group-hover:border-teal-600 group-hover:text-teal-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border bg-white text-[0.625rem] font-medium"])},Ye(f.initial),3),T("span",dj,Ye(f.name),1)]),_:2},1032,["to","class"])])),64))])]),T("li",cj,[x(S(_l),{to:"/settings",class:xe([S(t).name==="settings"?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group-mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>h[6]||(h[6]=[T("svg",{class:"icon h-6 w-6 shrink-0","aria-hidden":"true"},[T("use",{"xlink:href":"#icon-shezhi"})],-1),F(" 模块设置 ")])),_:1},8,["class"])])])])],2)]),_:1},8,["class"])]),_:1})])]),_:1})]),_:1},8,["show"]),T("div",fj,[T("div",{class:xe(["flex grow flex-col gap-y-5 overflow-y-auto border-r",S(o).isDarkMode?"border-gray-700 bg-[#151515]":"border-gray-200 bg-[#f6f6f6]","px-6 pb-4"])},[h[9]||(h[9]=T("div",{class:"flex h-10 shrink-0 items-center"},null,-1)),T("nav",hj,[T("ul",pj,[T("li",null,[T("ul",mj,[(Re(!0),Oe(ft,null,wi(l,f=>(Re(),Oe("li",{key:f.name},[!f.isShow||f.isShow()?(Re(),Tt(ru(f.href&&f.routeName?"RouterLink":"a"),mo({key:0,ref_for:!0},f.href&&f.routeName?{to:f.href}:{href:"javascript:void(0)"},{onClick:p=>f.click&&f.click(),class:[f.routeName===S(t).name?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"]}),{default:K(()=>[(Re(),Tt(ru(f.icon),{class:xe([f.routeName===S(t).name?S(o).isDarkMode?"text-teal-400":"text-teal-600":S(o).isDarkMode?"text-gray-500 group-hover:text-teal-400":"text-gray-400 group-hover:text-teal-600","h-6 w-6 shrink-0"]),"aria-hidden":"true"},null,8,["class"])),F(" "+Ye(f.name),1)]),_:2},1040,["onClick","class"])):Ge("",!0)]))),128))])]),T("li",null,[T("div",{class:xe(["text-xs font-semibold leading-6",S(o).isDarkMode?"text-gray-500":"text-gray-400"])},"快捷入口",2),T("ul",gj,[(Re(),Oe(ft,null,wi(s,f=>T("li",{key:f.name},[x(S(_l),{to:f.href,class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>[T("span",{class:xe([f.href===S(t).fullPath?S(o).isDarkMode?"border-teal-400 text-teal-400":"border-teal-600 text-teal-600":S(o).isDarkMode?"border-gray-700 text-gray-500 group-hover:border-teal-400 group-hover:text-teal-400":"border-gray-200 text-gray-400 group-hover:border-teal-600 group-hover:text-teal-600","flex h-6 w-6 shrink-0 items-center justify-center rounded-lg border bg-white text-[0.625rem] font-medium"])},Ye(f.initial),3),T("span",vj,Ye(f.name),1)]),_:2},1032,["to","class"])])),64))])]),T("li",bj,[x(S(_l),{to:"/settings",class:xe([S(t).name==="settings"?S(o).isDarkMode?"bg-[#232323] text-teal-400":"bg-[#E8E8E8] text-teal-600":S(o).isDarkMode?"text-gray-300 hover:bg-[#232323] hover:text-teal-400":"text-gray-700 hover:bg-[#E8E8E8] hover:text-teal-600","group -mx-2 flex gap-x-3 rounded-md p-2 text-sm font-semibold leading-6"])},{default:K(()=>h[8]||(h[8]=[T("svg",{class:"icon h-6 w-6 shrink-0","aria-hidden":"true"},[T("use",{"xlink:href":"#icon-shezhi"})],-1),F(" 模块设置 ")])),_:1},8,["class"])])])])],2)]),T("div",xj,[T("div",yj,[T("div",{class:xe(["flex h-14 items-center gap-x-4 border-b",S(o).isDarkMode?"border-gray-700 bg-zinc-900/50":"border-gray-200 bg-white/50"])},[T("button",{type:"button",class:"m-2.5 p-2.5 text-gray-700 lg:hidden",onClick:h[2]||(h[2]=f=>u.value=!0)},[h[10]||(h[10]=T("span",{class:"sr-only"},"Open sidebar",-1)),x(S(tj),{class:"h-6 w-6","aria-hidden":"true"})]),T("div",Cj,[T("div",wj,[T("h1",{class:xe([S(o).isDarkMode?"text-gray-300":"text-gray-600","text-lg font-bold","text-h1 animated-bg bg-clip-text text-center text-transparent"]),style:{"background-image":`linear-gradient(\r 101.22deg,\r rgb(255, 182, 133) -18.32%,\r rgb(255, 111, 29) 7.01%,\r @@ -4170,12 +4170,12 @@ ro.config.miui_appcompat_enable=true" >> /data/adb/modules/MIUI_MagicWindow+/sys rgb(135, 148, 255) 70.98%,\r rgb(60, 112, 255) 91.35%,\r rgb(60, 112, 255) 110.17%\r - )`}},"完美横屏应用计划 For Web UI",2),Ge("",!0)]),T("div",wj,[T("button",{onClick:h[3]||(h[3]=()=>S(i).warning("此区域尚未开放,请以后再来探索吧~")),type:"button",class:"m-2.5 p-2.5 text-gray-400 hover:text-gray-500"},h[11]||(h[11]=[T("span",{class:"sr-only"},"消息中心",-1),T("svg",{class:"icon h-7 w-7","aria-hidden":"true"},[T("use",{"xlink:href":"#icon-xiaoxi"})],-1)]))])])],2)]),T("main",null,[T("div",Sj,[Es(c.$slots,"default")])])])]))}}),k9=ye({__name:"ErrorModal",props:{modelValue:{type:Boolean},errorLogging:{}},setup(e,{emit:t}){const o=e;A(!1);const n=t,r=A(o.modelValue);lt(()=>o.modelValue,a=>{r.value=a});const i=()=>{n("update:modelValue",!1)};return(a,l)=>{const s=rt("n-alert"),u=rt("n-card"),d=rt("n-modal");return Re(),Tt(d,{onPositiveClick:i,onClose:i,style:{width:"600px"},title:"发生错误",type:"error","block-scroll":"true","positive-text":"确认",preset:"dialog","mask-closable":!0,show:o.modelValue},{default:K(()=>[x(u,{bordered:!1},{default:K(()=>[(Re(!0),Oe(ft,null,wi(o.errorLogging,c=>(Re(),Tt(s,{title:`[发生错误] ${c.type}`,class:"mb-5",type:"error"},{default:K(()=>[T("p",null,"错误描述:无法获取"+et(c.title),1),T("p",null,"错误详情:"+et(c.msg),1)]),_:2},1032,["title"]))),256))]),_:1})]),_:1},8,["show"])}}}),Ej={class:"splash-screen"},kj=ye({__name:"SplashScreen",setup(e){return ht(),(t,o)=>(Re(),Oe("div",Ej,o[0]||(o[0]=[T("div",{class:"flex h-full flex-col items-center justify-center"},[T("div",{class:"mt-[61px] bg-gradient-to-t from-[#242424] to-[#262626] bg-clip-text text-center text-[40px] font-[600] leading-[53px] text-black/50 mix-blend-color-burn tablet:mt-[75px] tablet:text-[64px] tablet:leading-[85px]"},"完美横屏应用计划"),T("div",{class:"mt-12 bg-gradient-to-t from-[#242424] to-[#262626] bg-clip-text text-center text-[20px] font-[600] leading-[27px] text-black/50 mix-blend-color-burn tablet:mt-[23px] tablet:text-[24px] tablet:font-[600] tablet:leading-[32px]"},"正在加载中,请稍等……")],-1)])))}}),_9=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o},_j=_9(kj,[["__scopeId","data-v-1cac3c56"]]),Mj="modulepreload",Rj=function(e){return"/"+e},n5={},kn=function(t,o,n){let r=Promise.resolve();if(o&&o.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(o.map(s=>{if(s=Rj(s),s in n5)return;n5[s]=!0;const u=s.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":Mj,u||(c.as="script"),c.crossOrigin="",c.href=s,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((h,f)=>{c.addEventListener("load",h),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},zj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/embedded_rules_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Aj=()=>{const e="cat /product/etc/embedded_rules_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Pj=(e,t)=>{const o=`cmd miui_embedding_window set-appMode ${e} ${t}`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):n(a)}}),o)},Bj=(e,t)=>{const o=`cmd miui_embedding_window ${t} ${e}`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):n(a)}}),o)},$j=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/fixed_orientation_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Dj=()=>{const e="cat /product/etc/fixed_orientation_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Tj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/embedded_rules_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Ij=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/fixed_orientation_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Oj=()=>{const e="cat /data/system/users/0/embedded_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Lj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/embedded_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Hj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/embedded_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Nj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/os2_third_party_app_optimize/third_party_app_optimize.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Vj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/os2_system_app_optimize/system_app_optimize.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Wj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/third_party_app_optimize.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},M9=e=>ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(`am compat reset-all ${e}`);n?o(i):t(r)}}),"resetApplicationCompats"),wa=e=>ke(new Promise(async(t,o)=>{{const n=[],r=[],i=ht();if(i.MIOSVersion&&i.MIOSVersion>=2){if(e.customThirdPartyAppOptimizeConfigProp){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.customThirdPartyAppOptimizeConfigProp}' > /data/adb/MIUI_MagicWindow+/config/third_party_app_optimize.prop`);p?n.push({type:"customThirdPartyAppOptimizeConfigProp",name:"[第三方应用横屏优化]第三方应用横屏优化配置文件",message:v}):r.push({type:"customThirdPartyAppOptimizeConfigProp",name:"[第三方应用横屏优化]第三方应用横屏优化配置文件",message:"更新成功"})}if(e.thirdPartyAppOptimizeConfigRunnerShell){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.thirdPartyAppOptimizeConfigRunnerShell}' > /data/adb/MIUI_MagicWindow+/config/third_party_app_optimize_runner.sh`);p?n.push({type:"thirdPartyAppOptimizeConfigRunnerShell",name:"[第三方应用横屏优化]第三方应用横屏优化运行脚本",message:v}):r.push({type:"thirdPartyAppOptimizeConfigRunnerShell",name:"[第三方应用横屏优化]第三方应用横屏优化运行脚本",message:"更新成功"})}}if(e.isPatchMode){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.patchEmbeddedRulesListXML}' > /data/adb/MIUI_MagicWindow+/patch_rule/embedded_rules_list.xml`);p?n.push({type:"patchEmbeddedRulesListXML",name:"[定制模式]平行窗口配置文件",message:v}):r.push({type:"patchEmbeddedRulesListXML",name:"[定制模式]平行窗口配置文件",message:"更新成功"});const{errno:b,stdout:C,stderr:k}=await Se(`echo '${e.patchFixedOrientationListXML}' > /data/adb/MIUI_MagicWindow+/patch_rule/fixed_orientation_list.xml`);if(b?n.push({type:"patchFixedOrientationListXML",name:"[定制模式]信箱模式配置文件",message:k}):r.push({type:"patchixedOrientationListXML",name:"[定制模式]信箱模式配置文件",message:"更新成功"}),i.MIOSVersion&&i.MIOSVersion>=2){const{errno:w,stdout:_,stderr:M}=await Se(`echo '${e.patchEmbeddedSettingConfigXML}' > /data/adb/MIUI_MagicWindow+/patch_rule/embedded_setting_config.xml`);w?n.push({type:"patchEmbeddedSettingConfigXML",name:"[定制模式]应用横屏布局配置文件",message:M}):r.push({type:"patchEmbeddedSettingConfigXML",name:"[定制模式]应用横屏布局配置文件",message:"更新成功"})}}const{errno:a,stdout:l,stderr:s}=await Se(`echo '${e.customEmbeddedRulesListXML}' > /data/adb/MIUI_MagicWindow+/config/embedded_rules_list.xml`);a?n.push({type:"customEmbeddedRulesListXML",name:"[自定义规则]平行窗口配置文件",message:s}):r.push({type:"customEmbeddedRulesListXML",name:"[自定义规则]平行窗口配置文件",message:"更新成功"});const{errno:u,stdout:d,stderr:c}=await Se(`echo '${e.customFixedOrientationListXML}' > /data/adb/MIUI_MagicWindow+/config/fixed_orientation_list.xml`);if(u?n.push({type:"customFixedOrientationListXML",name:"[自定义规则]信箱模式配置文件",message:c}):r.push({type:"customFixedOrientationListXML",name:"[自定义规则]信箱模式配置文件",message:"更新成功"}),i.MIOSVersion&&i.MIOSVersion>=2){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.settingConfigXML}' > /data/adb/MIUI_MagicWindow+/config/embedded_setting_config.xml`);p?n.push({type:"settingConfigXML",name:"[自定义规则]应用横屏布局配置文件",message:v}):r.push({type:"settingConfigXML",name:"[自定义规则]应用横屏布局配置文件",message:"更新成功"})}else{const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.settingConfigXML}' > /data/system/users/0/embedded_setting_config.xml`);p?n.push({type:"settingConfigXML",name:"[系统]应用横屏布局配置文件",message:v}):r.push({type:"settingConfigXML",name:"[系统]应用横屏布局配置文件",message:"更新成功"})}if(e.setAppMode){const[p,g]=await Me(M9(e.setAppMode.name));p&&n.push({type:"resetApplicationCompat",name:"[模块]重置应用兼容性",message:p}),g&&r.push({type:"resetApplicationCompat",name:"[模块]重置应用兼容性",message:g})}const[h,f]=await Me(rc("miui_embedding_window"));if(h&&n.push({type:"updateMiuiEmbeddingWindowRule",name:"[模块]重新载入模块应用横屏布局规则",message:h}),f&&r.push({type:"updateMiuiEmbeddingWindowRule",name:"[模块]重新载入模块应用横屏布局配置文件",message:f.split(` -`)}),e.switchAction){const{errno:p,stdout:g,stderr:v}=await Se(`cmd miui_embedding_window ${e.switchAction.action} ${e.switchAction.name}`);p?n.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.switchAction.action}的设置`,message:v}):r.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.switchAction.action}的设置`,message:g})}if(e.setAppMode){const{errno:p,stdout:g,stderr:v}=await Se(`cmd miui_embedding_window set-appMode ${e.setAppMode.name} ${e.setAppMode.action}`);p?n.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.setAppMode.name}的设置为${e.setAppMode.action}`,message:v}):r.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.setAppMode.name}的设置${e.setAppMode.action}`,message:g})}n.length?o({type:"error",message:"发生错误,提交失败",errorLogging:n,successLogging:r}):t({type:"success",message:"更新成功",errorLogging:n,successLogging:r})}})),jj={"com.lbe.security.miui":1,"com.miui.player":1,"com.miui.fm":1,"com.miui.hybrid":1,"com.miui.securitycenter":1,"com.miui.compass":1,"com.miui.contentextension":1,"com.miui.misound":1,"com.miui.voiceassist":1,"com.miui.securityadd":1},Uj={"com.miui.touchassistant":1,"com.miui.whitenoise":1,"com.tencent.mobileqq":1,"com.tencent.mm":1,"com.alibaba.android.rimet":1,"com.coolapk.market":1,"com.sina.weibo":1,"com.baidu.tieba":1,"com.xuetangx.ykt":1,"io.github.vvb2060.magisk":1,"com.topjohnwu.magisk":1,"io.github.huskydg.magisk":1,"io.github.a13e300.ksuwebui":1,"me.weishu.kernelsu":1,"me.bmax.apatch":1,"com.dna.tools":1,"com.sevtinge.hyperceiler":1,"com.github.kr328.clash.foss":1,"com.github.kr328.clash":1,"com.github.metacubex.clash.meta":1,"com.rocket.e5b382b19324e0a":1,"dev.miuiicons.pedroz":1,"com.tencent.androidqqmail":1,"com.jingdong.app.mall":1,"com.tencent.wework":1,"com.tencent.weworkenterprise":1,"com.taobao.trip":1,"com.fenbi.android.leo":1,"com.duokan.reader":1,"com.xiaomi.shop":1,"com.xiaomi.smarthome":1,"com.youdao.dict":1,"com.netease.uu":1,"com.lemon.lv":1,"com.valvesoftware.android.steam.community":1,"com.douban.book.reader":1,"com.amazon.kindlefc":1,"com.alicloud.databox":1,"com.huawei.appmarket":1,"com.huawei.smarthome":1,"mark.via":1,"com.fenbi.android.servant":1,"com.fenbi.android.zhaojiao":1,"com.eusoft.eudic":1,"com.eusoft.ting.en":1,"com.cnki.android.cnkimobile":1,"com.zui.calculator":1,"com.jd.app.reader":1,"com.huajiao":1,"com.youku.phone":1,"com.tencent.qqlive":1,"com.xiaomi.gamecenter":1,"com.kugou.android":1,"com.ss.android.ugc.aweme":1,"com.ss.android.ugc.live":1,"com.ss.android.ugc.aweme.lite":1,"com.smile.gifmaker":1,"com.kuaishou.nebula":1,"com.bdatu.geography":1,"com.ubestkid.beilehu.android":1,"youqu.android.todesk":1,"com.tencent.docs":1,"com.tencent.pao":1,"com.estrongs.android.pop":1,"com.adobe.reader":1,"com.microsoft.skydrive":1,"cn.com.langeasy.LangEasyLexis":1,"cn.ticktick.task":1,"com.google.earth":1,"com.omarea.vtools":1,"com.plan.kot32.tomatotime":1,"com.farplace.qingzhuo":1,"com.xiachufang":1,"com.happyteam.dubbingshow":1,"czh.mindnode":1,"com.chrissen.card":1,"top.onepix.timeblock":1,"www.imxiaoyu.com.musiceditor":1,"com.mmbox.xbrowser":1,"com.flyersoft.moonreader":1,"com.flyersoft.moonreaderp":1,"com.yikaobang.yixue":1,"com.kwai.m2u":1,"com.qiyi.video.pad":1,"com.baidu.baidutranslate":1,"org.zwanoo.android.speedtest":1,"com.xiwang.zaixian":1,"com.yozo.office":1,"com.taobao.taobao":1,"cn.canva.editor":1,"com.singularity.tiangong":1,"com.mubu.app":1,"chuxin.shimo.shimowendang":1,"com.roblox.client":1,"com.netease.cloudmusic":1,"com.netease.mc.mi":1,"com.netease.x19":1,"com.netease.mc.huawei":1,"com.netease.mc.vivo":1,"com.netease.mc.oppo":1,"com.netease.mc.honor":1,"com.netease.mc.bilibili":1,"com.netease.mc.nearme.gamecenter":1,"com.netease.mc":1,"com.netease.mctest":1,"com.hicloud.browser":1,"com.hihonor.health":1,"com.ss.android.ugc.livelite":1,"com.oray.sunlogin":1,"com.microsoft.todos":1,"com.jdjdc.jdfastjdc":1,"com.google.android.apps.translate":1,"com.adsk.sketchbook":1,"com.pick.sketchbook":1,"com.ihuman.recite":1,"com.ctfile":1,"com.quark.scanking":1,"com.hunantv.imgo.activity":1,"com.sohu.sohuvideo":1,"com.wuba.town.client":1,"com.yhqx.player":1,"com.lixiangdong.mediaplayer":1,"cn.ylkj.zmjh":1,"com.yixinli.muse":1,"com.antutu.ABenchMark":1,"cn.honor.qinxuan":1,"com.fenbi.android.zenglish.hd":1,"com.huawei.videoeditor":1,"com.huawei.genexcloud.speedtest":1,"com.huawei.ch18":1,"com.hihonor.dz.reader":1,"com.hihonor.vmall":1,"com.hihonor.magichome":1,"com.hihonor.heartstudy":1,"cn.ieway.evcapture":1,"cn.ieway.evplayer2":1,"com.aliyun.wuying.enterprise":1,"com.jingdong.app.reader.campus":1,"com.UCMobile":1,"com.quark.browser":1,"com.smzdm.client.android":1,"com.baidu.netdisk":1,"com.mfcloudcalculate.networkdisk":1,"com.chinamobile.mcloud":1,"info.muge.appshare":1,"com.x7890.shortcutcreator":1,"org.kde.kdeconnect_tp":1,"com.tencent.weread":1,"com.larus.nova":1,"com.moonshot.kimichat":1,"com.baidu.newapp":1,"com.tencent.hunyuan.app.chat":1,"jp.pokemon.pokemonsleep":1,"com.heytap.headset":1,"com.twitter.android":1,"cn.jagat.main":1,"com.furrybar.chat.app":1,"me.ele":1,"com.max.xiaoheihe":1,"com.ruanmei.ithome":1,"com.youdao.translator":1,"com.netflix.NGP.MonumentValley3":1,"com.ophone.reader.ui":1,"studio.fountainhead.habicat":1,"com.hihonor.appmarket":1,"cn.wenyu.bodian":1,"com.zte.smarthome":1,"com.phoenix.read":1,"com.bilibili.app.in":1,"com.bilibili.app.blue":1,"com.joey.colors.simple.c":1,"com.hanfuhui":1,"com.hurantech.cherrysleep":1,"tech.caicheng.youshi":1,"org.panda.words":1,"com.tencent.phoenix":1,"com.tencent.wetype":1,"com.tencent.wehear":1,"com.tencent.weishi":1,"com.ctg.itrdc.clouddesk":1,"com.oppo.store":1,"com.pupumall.customer":1,"me.tangke.gamecores":1,"com.xunmeng.pinduoduo":1,"com.vblast.flipaclip":1,"com.gstarmc.android":1,"com.quickview3d":1,"com.aihuishou.opt":1,"com.duolingo":1,"cn.etouch.ecalendar.life":1,"cn.etouch.ecalendar":1,"com.gamestar.pianoperfect":1,"me.yoopu.app.songbook":1,"com.autonavi.minimap":1,"com.tencent.map":1,"com.baidu.BaiduMap":1,"com.yuzebin.pokemon":1,"com.CDA.StructureMaster":1,"com.cxincx.xxjz":1},y0={...jj,...Uj},Us=Gi("embedded",()=>{const e=A(!1),t=A(!1),o=A({}),n=A(!1),r=A({}),i=A({}),a=A({}),l=A({}),s=A({}),u=A({}),d=A({}),c=A({}),h=A({}),f=A({}),p=A({}),g=A({}),v=D(()=>{const O={...p.value};for(const oe in g.value){const y=g.value[oe];y===-1?delete O[oe]:O[oe]=y}return O}),b=D(()=>{const O=ht(),oe=new Set([...Object.keys(i.value),...Object.keys(s.value),...O.installedAndroidApplicationPackageNameList,...Object.keys(y0)]),y=Object.entries(r.value).filter(([j])=>oe.has(j));return Object.fromEntries(y)}),C=D(()=>{const O=ht(),oe=new Set([...Object.keys(i.value),...Object.keys(s.value),...O.installedAndroidApplicationPackageNameList,...Object.keys(y0)]),y=Object.entries(l.value).filter(([j])=>oe.has(j));return Object.fromEntries(y)}),k=D(()=>{const O=ht(),oe=new Set([...Object.keys(i.value),...Object.keys(s.value),...O.installedAndroidApplicationPackageNameList,...Object.keys(y0)]),y=Object.entries(c.value).filter(([j])=>oe.has(j));return Object.fromEntries(y)}),w=A([]),_=D(()=>{const O=ht(),oe=new Set(O.installedAndroidApplicationPackageNameList);return w.value.reduce((j,X)=>(oe.has(X.name)&&j.push(X.name),j),[])}),M=D(()=>{const O=ht(),oe=new Set(O.installedAndroidApplicationPackageNameList);return w.value.reduce((j,X)=>{var le;return oe.has(X.name)&&(le=X.fixedOrientationRule)!=null&&le.compatChange&&j.push(X.name),j},[])}),E=A(""),P=A(""),z=u7(O=>{E.value=O.trim().toLowerCase()},500);lt(P,O=>{z(O)});const $=D(()=>{const O=w.value,oe=ht(),y=new Set(oe.installedAndroidApplicationPackageNameList),j=t.value,X=E.value,le=o.value,ae=v.value,Fe=oe.installedAppNameList;return O.reduce((fe,ue)=>{const we=ue.name.trim().toLowerCase();Fe[ue.name]&&!ue.applicationName&&(ue.applicationName=Fe[ue.name]),le[ue.name]&&!ue.applicationName&&(ue.applicationName=le[ue.name]),ae[ue.name]?ue.thirdPartyAppOptimize=!0:ue.thirdPartyAppOptimize=!1;const ie=ue.applicationName?ue.applicationName.toLowerCase():"";return!we.includes(X)&&!ie.includes(X)||j&&!y.has(ue.name)||fe.push(ue),fe},[]).sort((fe,ue)=>fe.ruleMode==="custom"&&ue.ruleMode!=="custom"?-1:fe.ruleMode!=="custom"&&ue.ruleMode==="custom"?1:fe.name.localeCompare(ue.name))}),G=D(()=>W.length>0),H=D(()=>w.value.length),q=A(!0),W=Nt([]),L=D(()=>new Set([...e.value?Object.keys(b.value):Object.keys(r.value),...e.value?Object.keys(C.value):Object.keys(l.value),...Object.keys(a.value),...Object.keys(u.value)]));function I(){const O=ht();w.value=U4(e.value?b.value:r.value,e.value?C.value:l.value,O.MIOSVersion&&O.MIOSVersion>=2?e.value?k.value:c.value:d.value,a.value,u.value,h.value)}async function R(){const O=ht();q.value=!0;const y=(await kn(()=>import("./applicationName-exrf0CFH.js"),[])).default;o.value=y;const[j,X]=await Me(cN());j?W.push({type:"getIsPatchModeErr",title:"补丁模式",msg:j}):X==="true"?e.value=!0:e.value=!1;const le=[zj(),Aj(),Tj(),$j(),Dj(),Ij(),Lj(),Oj(),Hj(),Nj(),Wj(),Vj()],[[ae,Fe],[fe,ue],[we,ie],[be,ze],[pe,U],[N,ge],[Ce,se],[te,ce],[Q,re],[he,ne],[Y,de],[Ee,Ie]]=await Promise.all(le.map(Ye=>Me(Ye)));ae&&(r.value={},W.push({type:"sourceEmbeddedRulesList",title:"[模块]平行窗口配置文件",msg:ae})),Fe&&(r.value=hn(Fe,"package_config","package")),fe&&(i.value={},W.push({type:"SystemEmbeddedRulesList",title:"[系统]平行窗口配置文件",msg:fe})),ue&&(i.value=hn(ue,"package_config","package")),we&&(a.value={}),ie&&(a.value=hn(ie,"package_config","package",!0),console.log(a.value,"customConfigEmbeddedRulesList.value")),be&&(l.value={},W.push({type:"sourceFixedOrientationList",title:"[模块]信箱模式配置文件",msg:be})),ze&&(l.value=hn(ze,"package_config","package")),pe&&(s.value={}),U&&(s.value=hn(U,"package_config","package")),N&&(u.value={}),ge&&(u.value=hn(ge,"package_config","package",!0)),Ce&&(c.value={}),se&&(c.value=hn(se,"setting_rule","setting")),te&&(d.value={}),ce&&(d.value=hn(ce,"setting_rule","setting")),Q&&(h.value={}),re&&(h.value=hn(re,"setting_rule","setting",!0)),he&&(p.value={}),ne&&(p.value=g0(ne)),Y&&(g.value={}),de&&(g.value=g0(de)),Ee&&(f.value={}),Ie&&(f.value=g0(Ie)),di().info("deviceStore.MIOSVersion",O.MIOSVersion),w.value=U4(e.value?b.value:r.value,e.value?C.value:l.value,O.MIOSVersion&&O.MIOSVersion>=2?e.value?k.value:c.value:d.value,a.value,u.value,h.value),W.length||(q.value=!1,O.needReloadData&&e.value&&(n.value=!0))}return{sourceEmbeddedRulesList:r,sourceFixedOrientationList:l,patchEmbeddedRulesList:b,patchFixedOrientationList:C,patchEmbeddedSettingConfig:k,customConfigEmbeddedRulesList:a,customConfigFixedOrientationList:u,customConfigEmbeddedSettingConfig:h,sourceThirdPartyAppOptimizeConfig:p,customThirdPartyAppOptimizeConfig:g,mergeThirdPartyAppOptimizeConfig:v,systemAppOptimizeConfig:f,filterSetAppModeAppList:_,filterResetAppCompatAppList:M,systemEmbeddedSettingConfig:d,systemEmbeddedRulesList:i,systemFixedOrientationList:s,mergeRuleList:w,filterInstalledApps:t,filterMergeRuleList:$,searchKeyWord:P,errorLogging:W,isNeedShowErrorModal:G,loading:q,ruleCount:H,allPackageName:L,applicationName:o,isPatchMode:e,initDefault:R,updateMergeRuleList:I,isNeedShowReloadPathModeDialog:n}},{persist:{pick:["filterInstalledApps"]}}),R9=Gi("font",()=>{const e=A("MiSans"),t=D(()=>`${e.value}, system-ui, sans-serif`);return{currentFont:e,setFont:n=>{e.value=n},currentFontFamily:t}},{persist:{pick:["currentFont"]}}),Kj=()=>{const o=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db "SELECT dataId FROM cloud_all_data WHERE moduleName='MiuiFreeform';")"`;return new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);if(i&&r(l),a)try{const s=a.split(` -`);n(s)}catch(s){r(s)}}})},Gj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/dot_black_list.json";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);if(n)o(i);else if(r)try{t(JSON.parse(r))}catch{o("dot_black_list config is empty")}else o(null)}}),e)},qj=()=>{const e="/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3",t="/data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db";return new Promise(async(o,n)=>{{const[,r]=await Me(Kj());if(r){const i=async s=>{const u=`echo "$(${e} ${t} "SELECT productData FROM cloud_all_data WHERE dataId='${s}';")"`;return ke(new Promise(async(d,c)=>{const{errno:h,stdout:f,stderr:p}=await Se(u);if(h&&c(p),f)try{const g=JSON.parse(f);g.dot_black_list?d({dataId:Number(s),productData:g||{},dataList:g.dot_black_list||[]}):d({dataId:Number(s),productData:g||{},dataList:[]})}catch(g){c(g)}}),u)},[a,l]=await Me(Promise.all(r.map(s=>i(s))));a&&n(a),l&&o(l)}}})},Zj=()=>{const e='ls /data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db &>/dev/null && echo "exists" || echo "not exists"';return new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}})},GX=e=>{const t="/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3",o="/data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db",n=[],r=[];return ke(new Promise(async(i,a)=>{{const l=Array.from(new Set(e.customDotBlackList)),s=async c=>{const h=`echo '${JSON.stringify(c)}' > /data/adb/MIUI_MagicWindow+/config/dot_black_list.json`;return ke(new Promise(async(f,p)=>{const{errno:g,stdout:v,stderr:b}=await Se(h);g?(n.push({type:"updateCustomDotBlackListJSON",name:"[自定义规则]窗口控制器配置文件",message:b}),p(b)):(r.push({type:"updateCustomDotBlackListJSON",name:"[自定义规则]窗口控制器配置文件",message:"更新成功"}),f(v))}),h)},[u,d]=await Me(s(l));if(u)a(u);else{const c=e.sourceDotBlackList.map(g=>{const v=Sa(g.productData);return v.dot_black_list=e.dotBlackList,{dataId:g.dataId,productData:v}}),h=async(g,v)=>{const b=`echo "$(${t} ${o} "UPDATE cloud_all_data SET productData='${JSON.stringify(v).replace(/"/g,'\\"')}' WHERE dataId='${g}'; SELECT changes();")"`;return ke(new Promise(async(C,k)=>{const{errno:w,stdout:_,stderr:M}=await Se(b);w?k(M):_==="1"?C(_):k(_)}),b)},[f,p]=await Me(Promise.all(c.map(g=>h(g.dataId,g.productData))));f&&a(f),p&&i({type:"success",message:"更新成功",errorLogging:n,successLogging:r})}}}),"updateDotBlackList")},Xj=Gi("dotBlackList",()=>{const e=A(!1),t=A([]),o=D(()=>{if(t.value.length===0)return[];const v=t.value[0].dataList,b=new Set(v);return t.value.slice(1).forEach(C=>{const k=new Set(C.dataList);for(const w of b)k.has(w)||b.delete(w)}),v.filter(C=>b.has(C))}),n=A([]),r=D(()=>{const b=ht().installedAppNameList,C=o.value.map(M=>{const E=n.value.includes(M),P=b[M]||a.value[M];return{name:M,applicationName:P,ruleMode:E?"custom":"system",status:!0}}),k=n.value.filter(M=>!o.value.includes(M)).map(M=>{const E=b[M]||a.value[M];return{name:M,applicationName:E,ruleMode:"custom",status:!1}}),w=Math.floor(C.length/2);return[...C.slice(0,w),...k,...C.slice(w)]}),i=D(()=>{const v=d.value.trim().toLowerCase(),b=r.value,C=ht();return b.reduce((k,w)=>{const _=w.name.trim().toLowerCase(),M=w.applicationName?w.applicationName.toLowerCase():"";if(!_.includes(v)&&!M.includes(v))return k;const E=new Set(C.installedAndroidApplicationPackageNameList);return e.value&&!E.has(w.name)||k.push(w),k},[]).sort((k,w)=>k.ruleMode==="custom"&&w.ruleMode!=="custom"?-1:k.ruleMode!=="custom"&&w.ruleMode==="custom"?1:k.name.localeCompare(w.name))}),a=A({}),l=A([]),s=D(()=>f.length>0),u=D(()=>l.value.length),d=A(""),c=A(!0),h=A(!1),f=Nt([]),p=D(()=>new Set([...n.value,...o.value]));async function g(){c.value=!0;const b=(await kn(()=>import("./applicationName-exrf0CFH.js"),[])).default;a.value=b;const[C,k]=await Me(Zj());if(C&&(h.value=!1),k){h.value=!0;const[w,_]=await Me(qj());w&&(t.value=[]),_&&(t.value=_);const[M,E]=await Me(Gj());M&&(n.value=[]),E&&(n.value=E),c.value=!1}}return{mergeRuleList:l,allPackageName:p,sourceDotBlackList:t,hasHTMLViewerCloudData:h,systemDotBlackList:o,customDotBlackList:n,mergeDotBlackList:r,filterMergeDotBlackList:i,applicationName:a,searchKeyWord:d,errorLogging:f,isNeedShowErrorModal:s,filterInstalledApps:e,loading:c,ruleCount:u,initDefault:g}},{persist:{pick:["filterInstalledApps"]}}),Yj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/autoui_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Qj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/autoui_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Jj=()=>{const e="cat /data/system/users/0/autoui_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},wl=e=>ke(new Promise(async(t,o)=>{{const n=[],r=[],{errno:i,stdout:a,stderr:l}=await Se(`echo '${e.customAutoUIListXML}' > /data/adb/MIUI_MagicWindow+/config/autoui_list.xml`);i?n.push({type:"customAutoUIListXML",name:"[自定义规则]应用布局优化配置文件",message:l}):r.push({type:"customAutoUIListXML",name:"[自定义规则]应用布局优化配置文件",message:"更新成功"});const{errno:s,stdout:u,stderr:d}=await Se(`echo '${e.settingConfigXML}' > /data/system/users/0/autoui_setting_config.xml`);s?n.push({type:"settingConfigXML",name:"[模块]应用布局优化配置文件",message:d}):r.push({type:"settingConfigXML",name:"[模块]应用布局优化配置文件",message:"更新成功"});const[c,h]=await Me(rc("miui_auto_ui"));if(c&&n.push({type:"updateAutoUIRule",name:"[模块]重新载入模块应用布局优化规则",message:c}),h&&r.push({type:"updateAutoUIRule",name:"[模块]重新载入模块应用布局优化规则",message:h.split(` -`)}),e.reloadRuleAction){const{errno:f,stdout:p,stderr:g}=await Se(`cmd miui_auto_ui ${e.reloadRuleAction.action} ${e.reloadRuleAction.name}`);f?n.push({type:"updateMiuiAutoUIReloadAction",name:`[模块]更新${e.reloadRuleAction.name}的设置`,message:g}):r.push({type:"updateMiuiAutoUIReloadAction",name:`[模块]更新${e.reloadRuleAction.name}的设置`,message:p})}n.length?o({type:"error",message:"发生错误,提交失败",errorLogging:n,successLogging:r}):t({type:"success",message:"更新成功",errorLogging:n,successLogging:r})}})),C3=Gi("autoui",()=>{const e=A(!1),t=A({}),o=A({}),n=A({}),r=A({}),i=A([]),a=D(()=>{const g=u.value.trim().toLowerCase(),v=i.value,b=ht(),C=b.installedAppNameList;return v.reduce((k,w)=>{const _=w.name.trim().toLowerCase();C[w.name]&&!w.applicationName&&(w.applicationName=C[w.name]),n.value[w.name]&&!w.applicationName&&(w.applicationName=n.value[w.name]);const M=w.applicationName?w.applicationName.toLowerCase():"";if(!_.includes(g)&&!M.includes(g))return k;const E=new Set(b.installedAndroidApplicationPackageNameList);return e.value&&!E.has(w.name)||k.push(w),k},[]).sort((k,w)=>k.ruleMode==="custom"&&w.ruleMode!=="custom"?-1:k.ruleMode!=="custom"&&w.ruleMode==="custom"?1:k.name.localeCompare(w.name))}),l=D(()=>c.length>0),s=D(()=>i.value.length),u=A(""),d=A(!0),c=Nt([]),h=D(()=>new Set([...Object.keys(t.value),...Object.keys(o.value)]));function f(){i.value=K4(t.value,o.value,r.value)}async function p(){d.value=!0;const v=(await kn(()=>import("./applicationName-exrf0CFH.js"),[])).default;n.value=v;const[b,C]=await Me(Yj());b&&c.push({type:"sourceAutoUIList",title:"[模块]应用布局优化配置文件",msg:b}),C&&(t.value=hn(C,"packageRules","package"));const[k,w]=await Me(Qj());k||(o.value=hn(w,"packageRules","package",!0));const[_,M]=await Me(Jj());_&&(r.value={}),M&&(r.value=hn(M,"setting_config","setting")),i.value=K4(t.value,o.value,r.value),c.length||(d.value=!1)}return{sourceAutoUIList:t,customConfigAutoUIList:o,autoUISettingConfig:r,mergeRuleList:i,filterMergeRuleList:a,applicationName:n,searchKeyWord:u,errorLogging:c,isNeedShowErrorModal:l,updateMergeRuleList:f,filterInstalledApps:e,loading:d,ruleCount:s,allPackageName:h,initDefault:p}},{persist:{pick:["filterInstalledApps"]}}),eU=ye({__name:"App",setup(e){const t=ht(),o=di(),n=Zv(),r=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:i,modal:a}=It(["message","modal"],{configProviderProps:r}),l=Us(),s=R9(),u=C3(),d=Xj(),c=A(!1),h=A(!0);kt(p=>{!t.loading&&!l.loading&&(h.value=!1),(t.errorLogging.length||l.errorLogging.length)&&(h.value=!1),p(()=>{})}),lt(()=>s.currentFont,(p,g)=>{p&&document.documentElement.style.setProperty("--global-font-family",s.currentFontFamily)},{immediate:!0}),lt(()=>t.isNeedShowErrorModal,(p,g)=>{p&&(c.value=!0)},{immediate:!1});function f(){return!!window.matchMedia("(prefers-color-scheme: dark)").matches}return kt(p=>{const g=window.matchMedia("(prefers-color-scheme: dark)");t.rhythmMode==="autoRhythm"&&(t.isDarkMode=f());const v=b=>{t.rhythmMode==="autoRhythm"&&(t.isDarkMode=b.matches)};g.addEventListener("change",v),p(()=>{g.removeEventListener("change",v)})}),ut(async()=>{window.onerror=function(p,g,v,b,C){o&&o.error("[JavaScript Error]",p.toString())},window.addEventListener("unhandledrejection",function(p){o&&o.error("[JavaScript Promise Error]",p.reason.toString())}),await t.initDefault(),t.androidTargetSdk&&t.androidTargetSdk===30?a.create({title:"不适配说明",type:"error",preset:"dialog",content:()=>x("p",null,[F("Web UI 未对Android 11做适配,无法使用~")]),negativeText:"确定"}):(t.androidTargetSdk&&t.androidTargetSdk<=33&&!t.skipConfirm.lowWebViewVersion&&a.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("Web UI 强依赖部分较新内核的JavaScript API实现,为了确保模块正常工作,Android 13/12的小米设备可能需要升级系统内置WebView版本,请通过Google Play商店升级!")]),x("p",null,[F("下载地址:https://play.google.com/store/apps/details?id=com.google.android.webview")]),x("p",null,[F("如果下载的是Beta/Dev/Canary版本的WebView,则需要前往[开发者选项-WebView实现]进行切换~")])]),positiveText:"复制下载链接到剪切板",negativeText:"已升级,不再提醒",onPositiveClick:()=>{navigator.clipboard.writeText("https://play.google.com/store/apps/details?id=com.google.android.webview")},onNegativeClick:()=>{t.skipConfirm.lowWebViewVersion=!0}}),["KernelSU","APatch"].includes(t.currentRootManager)&&!t.skipConfirm.needInstalledKsuWebUiApk&&a.create({title:"Web UI 升级提醒",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("KernelSU/APatch 自带的 Web UI 存在部分问题,可能导致模块功能显示不全,建议可以安装波奇大佬提取制作的 「KsuWebUI」,取代自带的 Web UI,这不是必选项,您可以选择忽略此条建议,但可能导致模块部分功能无法正常工作。")]),x("p",null,[F("下载地址:https://caiyun.139.com/m/i?135Ce7C7omgXj")])]),positiveText:"复制下载链接到剪切板",negativeText:"已安装,不再提醒",onPositiveClick:()=>{navigator.clipboard.writeText("https://caiyun.139.com/m/i?135Ce7C7omgXj")},onNegativeClick:()=>{t.skipConfirm.needInstalledKsuWebUiApk=!0}}),l.initDefault(),u.initDefault(),n.initDefault(),t.MIOSVersion&&t.MIOSVersion>=1&&d.initDefault())}),(p,g)=>{const v=rt("n-config-provider");return Re(),Oe("div",{class:xe(["app-container h-full",`${S(t).isDarkMode?"bg-zinc-900 theme-dark-mode":"bg-white"}`])},[x(v,{theme:S(t).isDarkMode?S(Bt):S(Ft)},{default:K(()=>[x(S(Fj),null,{default:K(()=>[x(S(Nv))]),_:1}),x(k9,{modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=b=>c.value=b),errorLogging:S(t).errorLogging},null,8,["modelValue","errorLogging"]),h.value?(Re(),Tt(_j,{key:0})):Ge("",!0)]),_:1},8,["theme"])],2)}}}),tU=_9(eU,[["__scopeId","data-v-de76c51d"]]),z9="/images/icons/all_app.png",hd="/images/icons/ai_icon.png";/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const oU=4,r5=0,i5=1,nU=2;function Ja(e){let t=e.length;for(;--t>=0;)e[t]=0}const rU=0,A9=1,iU=2,aU=3,lU=258,w3=29,Ks=256,ms=Ks+1+w3,Aa=30,S3=19,P9=2*ms+1,_i=15,C0=16,sU=7,F3=256,B9=16,$9=17,D9=18,$1=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Wu=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),uU=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),T9=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),dU=512,fr=new Array((ms+2)*2);Ja(fr);const Gl=new Array(Aa*2);Ja(Gl);const gs=new Array(dU);Ja(gs);const vs=new Array(lU-aU+1);Ja(vs);const E3=new Array(w3);Ja(E3);const pd=new Array(Aa);Ja(pd);function w0(e,t,o,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=o,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let I9,O9,L9;function S0(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const H9=e=>e<256?gs[e]:gs[256+(e>>>7)],bs=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Uo=(e,t,o)=>{e.bi_valid>C0-o?(e.bi_buf|=t< >C0-e.bi_valid,e.bi_valid+=o-C0):(e.bi_buf|=t< {Uo(e,o[t*2],o[t*2+1])},N9=(e,t)=>{let o=0;do o|=e&1,e>>>=1,o<<=1;while(--t>0);return o>>>1},cU=e=>{e.bi_valid===16?(bs(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},fU=(e,t)=>{const o=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let u,d,c,h,f,p,g=0;for(h=0;h<=_i;h++)e.bl_count[h]=0;for(o[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u s&&(h=s,g++),o[d*2+1]=h,!(d>n)&&(e.bl_count[h]++,f=0,d>=l&&(f=a[d-l]),p=o[d*2],e.opt_len+=p*(h+f),i&&(e.static_len+=p*(r[d*2+1]+f)));if(g!==0){do{for(h=s-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[s]--,g-=2}while(g>0);for(h=s;h!==0;h--)for(d=e.bl_count[h];d!==0;)c=e.heap[--u],!(c>n)&&(o[c*2+1]!==h&&(e.opt_len+=(h-o[c*2+1])*o[c*2],o[c*2+1]=h),d--)}},V9=(e,t,o)=>{const n=new Array(_i+1);let r=0,i,a;for(i=1;i<=_i;i++)r=r+o[i-1]<<1,n[i]=r;for(a=0;a<=t;a++){let l=e[a*2+1];l!==0&&(e[a*2]=N9(n[l]++,l))}},hU=()=>{let e,t,o,n,r;const i=new Array(_i+1);for(o=0,n=0;n >=7;n {let t;for(t=0;t {e.bi_valid>8?bs(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},a5=(e,t,o,n)=>{const r=t*2,i=o*2;return e[r] {const n=e.heap[o];let r=o<<1;for(;r<=e.heap_len&&(r {let n,r,i=0,a,l;if(e.sym_next!==0)do n=e.pending_buf[e.sym_buf+i++]&255,n+=(e.pending_buf[e.sym_buf+i++]&255)<<8,r=e.pending_buf[e.sym_buf+i++],n===0?Wn(e,r,t):(a=vs[r],Wn(e,a+Ks+1,t),l=$1[a],l!==0&&(r-=E3[a],Uo(e,r,l)),n--,a=H9(n),Wn(e,a,o),l=Wu[a],l!==0&&(n-=pd[a],Uo(e,n,l)));while(i {const o=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,i=t.stat_desc.elems;let a,l,s=-1,u;for(e.heap_len=0,e.heap_max=P9,a=0;a>1;a>=1;a--)F0(e,o,a);u=i;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],F0(e,o,1),l=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=l,o[u*2]=o[a*2]+o[l*2],e.depth[u]=(e.depth[a]>=e.depth[l]?e.depth[a]:e.depth[l])+1,o[a*2+1]=o[l*2+1]=u,e.heap[1]=u++,F0(e,o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],fU(e,t),V9(o,s,e.bl_count)},s5=(e,t,o)=>{let n,r=-1,i,a=t[0*2+1],l=0,s=7,u=4;for(a===0&&(s=138,u=3),t[(o+1)*2+1]=65535,n=0;n<=o;n++)i=a,a=t[(n+1)*2+1],!(++l {let n,r=-1,i,a=t[0*2+1],l=0,s=7,u=4;for(a===0&&(s=138,u=3),n=0;n<=o;n++)if(i=a,a=t[(n+1)*2+1],!(++l{let t;for(s5(e,e.dyn_ltree,e.l_desc.max_code),s5(e,e.dyn_dtree,e.d_desc.max_code),D1(e,e.bl_desc),t=S3-1;t>=3&&e.bl_tree[T9[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},mU=(e,t,o,n)=>{let r;for(Uo(e,t-257,5),Uo(e,o-1,5),Uo(e,n-4,4),r=0;r{let t=4093624447,o;for(o=0;o<=31;o++,t>>>=1)if(t&1&&e.dyn_ltree[o*2]!==0)return r5;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return i5;for(o=32;o {d5||(hU(),d5=!0),e.l_desc=new S0(e.dyn_ltree,I9),e.d_desc=new S0(e.dyn_dtree,O9),e.bl_desc=new S0(e.bl_tree,L9),e.bi_buf=0,e.bi_valid=0,W9(e)},U9=(e,t,o,n)=>{Uo(e,(rU<<1)+(n?1:0),3),j9(e),bs(e,o),bs(e,~o),o&&e.pending_buf.set(e.window.subarray(t,t+o),e.pending),e.pending+=o},bU=e=>{Uo(e,A9<<1,3),Wn(e,F3,fr),cU(e)},xU=(e,t,o,n)=>{let r,i,a=0;e.level>0?(e.strm.data_type===nU&&(e.strm.data_type=gU(e)),D1(e,e.l_desc),D1(e,e.d_desc),a=pU(e),r=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=r&&(r=i)):r=i=o+5,o+4<=r&&t!==-1?U9(e,t,o,n):e.strategy===oU||i===r?(Uo(e,(A9<<1)+(n?1:0),3),l5(e,fr,Gl)):(Uo(e,(iU<<1)+(n?1:0),3),mU(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),l5(e,e.dyn_ltree,e.dyn_dtree)),W9(e),n&&j9(e)},yU=(e,t,o)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=o,t===0?e.dyn_ltree[o*2]++:(e.matches++,t--,e.dyn_ltree[(vs[o]+Ks+1)*2]++,e.dyn_dtree[H9(t)*2]++),e.sym_next===e.sym_end);var CU=vU,wU=U9,SU=xU,FU=yU,EU=bU,kU={_tr_init:CU,_tr_stored_block:wU,_tr_flush_block:SU,_tr_tally:FU,_tr_align:EU};const _U=(e,t,o,n)=>{let r=e&65535|0,i=e>>>16&65535|0,a=0;for(;o!==0;){a=o>2e3?2e3:o,o-=a;do r=r+t[n++]|0,i=i+r|0;while(--a);r%=65521,i%=65521}return r|i<<16|0};var xs=_U;const MU=()=>{let e,t=[];for(var o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[o]=e}return t},RU=new Uint32Array(MU()),zU=(e,t,o,n)=>{const r=RU,i=n+o;e^=-1;for(let a=n;a>>8^r[(e^t[a])&255];return e^-1};var Co=zU,Wi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},na={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:AU,_tr_stored_block:T1,_tr_flush_block:PU,_tr_tally:Xr,_tr_align:BU}=kU,{Z_NO_FLUSH:Yr,Z_PARTIAL_FLUSH:$U,Z_FULL_FLUSH:DU,Z_FINISH:mn,Z_BLOCK:c5,Z_OK:Eo,Z_STREAM_END:f5,Z_STREAM_ERROR:Gn,Z_DATA_ERROR:TU,Z_BUF_ERROR:E0,Z_DEFAULT_COMPRESSION:IU,Z_FILTERED:OU,Z_HUFFMAN_ONLY:ku,Z_RLE:LU,Z_FIXED:HU,Z_DEFAULT_STRATEGY:NU,Z_UNKNOWN:VU,Z_DEFLATED:ac}=na,WU=9,jU=15,UU=8,KU=29,GU=256,I1=GU+1+KU,qU=30,ZU=19,XU=2*I1+1,YU=15,zt=3,Kr=258,qn=Kr+zt+1,QU=32,Ha=42,k3=57,O1=69,L1=73,H1=91,N1=103,Mi=113,Rl=666,Io=1,el=2,ji=3,tl=4,JU=3,Ri=(e,t)=>(e.msg=Wi[t],t),h5=e=>e*2-(e>4?9:0),jr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},eK=e=>{let t,o,n,r=e.w_size;t=e.hash_size,n=t;do o=e.head[--n],e.head[n]=o>=r?o-r:0;while(--t);t=r,n=t;do o=e.prev[--n],e.prev[n]=o>=r?o-r:0;while(--t)};let tK=(e,t,o)=>(t< {const t=e.state;let o=t.pending;o>e.avail_out&&(o=e.avail_out),o!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+o),e.next_out),e.next_out+=o,t.pending_out+=o,e.total_out+=o,e.avail_out-=o,t.pending-=o,t.pending===0&&(t.pending_out=0))},nn=(e,t)=>{PU(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Qo(e.strm)},Lt=(e,t)=>{e.pending_buf[e.pending++]=t},Sl=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},V1=(e,t,o,n)=>{let r=e.avail_in;return r>n&&(r=n),r===0?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),o),e.state.wrap===1?e.adler=xs(e.adler,t,r,o):e.state.wrap===2&&(e.adler=Co(e.adler,t,r,o)),e.next_in+=r,e.total_in+=r,r)},K9=(e,t)=>{let o=e.max_chain_length,n=e.strstart,r,i,a=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-qn?e.strstart-(e.w_size-qn):0,u=e.window,d=e.w_mask,c=e.prev,h=e.strstart+Kr;let f=u[n+a-1],p=u[n+a];e.prev_length>=e.good_match&&(o>>=2),l>e.lookahead&&(l=e.lookahead);do if(r=t,!(u[r+a]!==p||u[r+a-1]!==f||u[r]!==u[n]||u[++r]!==u[n+1])){n+=2,r++;do;while(u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&n a){if(e.match_start=t,a=i,i>=l)break;f=u[n+a-1],p=u[n+a]}}while((t=c[t&d])>s&&--o!==0);return a<=e.lookahead?a:e.lookahead},Na=e=>{const t=e.w_size;let o,n,r;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-qn)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),eK(e),n+=t),e.strm.avail_in===0)break;if(o=V1(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=o,e.lookahead+e.insert>=zt)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=Qr(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=Qr(e,e.ins_h,e.window[r+zt-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert {let o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,r,i,a=0,l=e.strm.avail_in;do{if(n=65535,i=e.bi_valid+42>>3,e.strm.avail_outr+e.strm.avail_in&&(n=r+e.strm.avail_in),n>i&&(n=i),n >8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Qo(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(V1(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(a===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_water i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(V1(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water >3,i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i,o=i>e.w_size?e.w_size:i,r=e.strstart-e.block_start,(r>=o||(r||t===mn)&&t!==Yr&&e.strm.avail_in===0&&r<=i)&&(n=r>i?i:r,a=t===mn&&e.strm.avail_in===0&&n===r?1:0,T1(e,e.block_start,n,a),e.block_start+=n,Qo(e.strm)),a?ji:Io)},k0=(e,t)=>{let o,n;for(;;){if(e.lookahead =zt&&(e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),o!==0&&e.strstart-o<=e.w_size-qn&&(e.match_length=K9(e,o)),e.match_length>=zt)if(n=Xr(e,e.strstart-e.match_start,e.match_length-zt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=zt){e.match_length--;do e.strstart++,e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+1]);else n=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(nn(e,!1),e.strm.avail_out===0))return Io}return e.insert=e.strstart {let o,n,r;for(;;){if(e.lookahead =zt&&(e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=zt-1,o!==0&&e.prev_length 4096)&&(e.match_length=zt-1)),e.prev_length>=zt&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-zt,n=Xr(e,e.strstart-1-e.prev_match,e.prev_length-zt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=zt-1,e.strstart++,n&&(nn(e,!1),e.strm.avail_out===0))return Io}else if(e.match_available){if(n=Xr(e,0,e.window[e.strstart-1]),n&&nn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Io}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Xr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart {let o,n,r,i;const a=e.window;for(;;){if(e.lookahead<=Kr){if(Na(e),e.lookahead<=Kr&&t===Yr)return Io;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=zt&&e.strstart>0&&(r=e.strstart-1,n=a[r],n===a[++r]&&n===a[++r]&&n===a[++r])){i=e.strstart+Kr;do;while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=zt?(o=Xr(e,1,e.match_length-zt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(o=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),o&&(nn(e,!1),e.strm.avail_out===0))return Io}return e.insert=0,t===mn?(nn(e,!0),e.strm.avail_out===0?ji:tl):e.sym_next&&(nn(e,!1),e.strm.avail_out===0)?Io:el},nK=(e,t)=>{let o;for(;;){if(e.lookahead===0&&(Na(e),e.lookahead===0)){if(t===Yr)return Io;break}if(e.match_length=0,o=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,o&&(nn(e,!1),e.strm.avail_out===0))return Io}return e.insert=0,t===mn?(nn(e,!0),e.strm.avail_out===0?ji:tl):e.sym_next&&(nn(e,!1),e.strm.avail_out===0)?Io:el};function Hn(e,t,o,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=o,this.max_chain=n,this.func=r}const zl=[new Hn(0,0,0,0,G9),new Hn(4,4,8,4,k0),new Hn(4,5,16,8,k0),new Hn(4,6,32,32,k0),new Hn(4,4,16,16,ma),new Hn(8,16,32,32,ma),new Hn(8,16,128,128,ma),new Hn(8,32,128,256,ma),new Hn(32,128,258,1024,ma),new Hn(32,258,258,4096,ma)],rK=e=>{e.window_size=2*e.w_size,jr(e.head),e.max_lazy_match=zl[e.level].max_lazy,e.good_match=zl[e.level].good_length,e.nice_match=zl[e.level].nice_length,e.max_chain_length=zl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=zt-1,e.match_available=0,e.ins_h=0};function iK(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ac,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(XU*2),this.dyn_dtree=new Uint16Array((2*qU+1)*2),this.bl_tree=new Uint16Array((2*ZU+1)*2),jr(this.dyn_ltree),jr(this.dyn_dtree),jr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(YU+1),this.heap=new Uint16Array(2*I1+1),jr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*I1+1),jr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Gs=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Ha&&t.status!==k3&&t.status!==O1&&t.status!==L1&&t.status!==H1&&t.status!==N1&&t.status!==Mi&&t.status!==Rl?1:0},q9=e=>{if(Gs(e))return Ri(e,Gn);e.total_in=e.total_out=0,e.data_type=VU;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?k3:t.wrap?Ha:Mi,e.adler=t.wrap===2?0:1,t.last_flush=-2,AU(t),Eo},Z9=e=>{const t=q9(e);return t===Eo&&rK(e.state),t},aK=(e,t)=>Gs(e)||e.state.wrap!==2?Gn:(e.state.gzhead=t,Eo),X9=(e,t,o,n,r,i)=>{if(!e)return Gn;let a=1;if(t===IU&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),r<1||r>WU||o!==ac||n<8||n>15||t<0||t>9||i<0||i>HU||n===8&&a!==1)return Ri(e,Gn);n===8&&(n=9);const l=new iK;return e.state=l,l.strm=e,l.status=Ha,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1< X9(e,t,ac,jU,UU,NU),sK=(e,t)=>{if(Gs(e)||t>c5||t<0)return e?Ri(e,Gn):Gn;const o=e.state;if(!e.output||e.avail_in!==0&&!e.input||o.status===Rl&&t!==mn)return Ri(e,e.avail_out===0?E0:Gn);const n=o.last_flush;if(o.last_flush=t,o.pending!==0){if(Qo(e),e.avail_out===0)return o.last_flush=-1,Eo}else if(e.avail_in===0&&h5(t)<=h5(n)&&t!==mn)return Ri(e,E0);if(o.status===Rl&&e.avail_in!==0)return Ri(e,E0);if(o.status===Ha&&o.wrap===0&&(o.status=Mi),o.status===Ha){let r=ac+(o.w_bits-8<<4)<<8,i=-1;if(o.strategy>=ku||o.level<2?i=0:o.level<6?i=1:o.level===6?i=2:i=3,r|=i<<6,o.strstart!==0&&(r|=QU),r+=31-r%31,Sl(o,r),o.strstart!==0&&(Sl(o,e.adler>>>16),Sl(o,e.adler&65535)),e.adler=1,o.status=Mi,Qo(e),o.pending!==0)return o.last_flush=-1,Eo}if(o.status===k3){if(e.adler=0,Lt(o,31),Lt(o,139),Lt(o,8),o.gzhead)Lt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),Lt(o,o.gzhead.time&255),Lt(o,o.gzhead.time>>8&255),Lt(o,o.gzhead.time>>16&255),Lt(o,o.gzhead.time>>24&255),Lt(o,o.level===9?2:o.strategy>=ku||o.level<2?4:0),Lt(o,o.gzhead.os&255),o.gzhead.extra&&o.gzhead.extra.length&&(Lt(o,o.gzhead.extra.length&255),Lt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=Co(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=O1;else if(Lt(o,0),Lt(o,0),Lt(o,0),Lt(o,0),Lt(o,0),Lt(o,o.level===9?2:o.strategy>=ku||o.level<2?4:0),Lt(o,JU),o.status=Mi,Qo(e),o.pending!==0)return o.last_flush=-1,Eo}if(o.status===O1){if(o.gzhead.extra){let r=o.pending,i=(o.gzhead.extra.length&65535)-o.gzindex;for(;o.pending+i>o.pending_buf_size;){let l=o.pending_buf_size-o.pending;if(o.pending_buf.set(o.gzhead.extra.subarray(o.gzindex,o.gzindex+l),o.pending),o.pending=o.pending_buf_size,o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex+=l,Qo(e),o.pending!==0)return o.last_flush=-1,Eo;r=0,i-=l}let a=new Uint8Array(o.gzhead.extra);o.pending_buf.set(a.subarray(o.gzindex,o.gzindex+i),o.pending),o.pending+=i,o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex=0}o.status=L1}if(o.status===L1){if(o.gzhead.name){let r=o.pending,i;do{if(o.pending===o.pending_buf_size){if(o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),Qo(e),o.pending!==0)return o.last_flush=-1,Eo;r=0}o.gzindex r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex=0}o.status=H1}if(o.status===H1){if(o.gzhead.comment){let r=o.pending,i;do{if(o.pending===o.pending_buf_size){if(o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),Qo(e),o.pending!==0)return o.last_flush=-1,Eo;r=0}o.gzindex r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r))}o.status=N1}if(o.status===N1){if(o.gzhead.hcrc){if(o.pending+2>o.pending_buf_size&&(Qo(e),o.pending!==0))return o.last_flush=-1,Eo;Lt(o,e.adler&255),Lt(o,e.adler>>8&255),e.adler=0}if(o.status=Mi,Qo(e),o.pending!==0)return o.last_flush=-1,Eo}if(e.avail_in!==0||o.lookahead!==0||t!==Yr&&o.status!==Rl){let r=o.level===0?G9(o,t):o.strategy===ku?nK(o,t):o.strategy===LU?oK(o,t):zl[o.level].func(o,t);if((r===ji||r===tl)&&(o.status=Rl),r===Io||r===ji)return e.avail_out===0&&(o.last_flush=-1),Eo;if(r===el&&(t===$U?BU(o):t!==c5&&(T1(o,0,0,!1),t===DU&&(jr(o.head),o.lookahead===0&&(o.strstart=0,o.block_start=0,o.insert=0))),Qo(e),e.avail_out===0))return o.last_flush=-1,Eo}return t!==mn?Eo:o.wrap<=0?f5:(o.wrap===2?(Lt(o,e.adler&255),Lt(o,e.adler>>8&255),Lt(o,e.adler>>16&255),Lt(o,e.adler>>24&255),Lt(o,e.total_in&255),Lt(o,e.total_in>>8&255),Lt(o,e.total_in>>16&255),Lt(o,e.total_in>>24&255)):(Sl(o,e.adler>>>16),Sl(o,e.adler&65535)),Qo(e),o.wrap>0&&(o.wrap=-o.wrap),o.pending!==0?Eo:f5)},uK=e=>{if(Gs(e))return Gn;const t=e.state.status;return e.state=null,t===Mi?Ri(e,TU):Eo},dK=(e,t)=>{let o=t.length;if(Gs(e))return Gn;const n=e.state,r=n.wrap;if(r===2||r===1&&n.status!==Ha||n.lookahead)return Gn;if(r===1&&(e.adler=xs(e.adler,t,o,0)),n.wrap=0,o>=n.w_size){r===0&&(jr(n.head),n.strstart=0,n.block_start=0,n.insert=0);let s=new Uint8Array(n.w_size);s.set(t.subarray(o-n.w_size,o),0),t=s,o=n.w_size}const i=e.avail_in,a=e.next_in,l=e.input;for(e.avail_in=o,e.next_in=0,e.input=t,Na(n);n.lookahead>=zt;){let s=n.strstart,u=n.lookahead-(zt-1);do n.ins_h=Qr(n,n.ins_h,n.window[s+zt-1]),n.prev[s&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=s,s++;while(--u);n.strstart=s,n.lookahead=zt-1,Na(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=zt-1,n.match_available=0,e.next_in=a,e.input=l,e.avail_in=i,n.wrap=r,Eo};var cK=lK,fK=X9,hK=Z9,pK=q9,mK=aK,gK=sK,vK=uK,bK=dK,xK="pako deflate (from Nodeca project)",ql={deflateInit:cK,deflateInit2:fK,deflateReset:hK,deflateResetKeep:pK,deflateSetHeader:mK,deflate:gK,deflateEnd:vK,deflateSetDictionary:bK,deflateInfo:xK};const yK=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var CK=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const o=t.shift();if(o){if(typeof o!="object")throw new TypeError(o+"must be non-object");for(const n in o)yK(o,n)&&(e[n]=o[n])}}return e},wK=e=>{let t=0;for(let n=0,r=e.length;n =252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ys[254]=ys[254]=1;var SK=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,o,n,r,i,a=e.length,l=0;for(r=0;r>>6,t[i++]=128|o&63):o<65536?(t[i++]=224|o>>>12,t[i++]=128|o>>>6&63,t[i++]=128|o&63):(t[i++]=240|o>>>18,t[i++]=128|o>>>12&63,t[i++]=128|o>>>6&63,t[i++]=128|o&63);return t};const FK=(e,t)=>{if(t<65534&&e.subarray&&Y9)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let o="";for(let n=0;n {const o=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let n,r;const i=new Array(o*2);for(r=0,n=0;n 4){i[r++]=65533,n+=l-1;continue}for(a&=l===2?31:l===3?15:7;l>1&&n 1){i[r++]=65533;continue}a<65536?i[r++]=a:(a-=65536,i[r++]=55296|a>>10&1023,i[r++]=56320|a&1023)}return FK(i,r)},kK=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let o=t-1;for(;o>=0&&(e[o]&192)===128;)o--;return o<0||o===0?t:o+ys[e[o]]>t?o:t},Cs={string2buf:SK,buf2string:EK,utf8border:kK};function _K(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Q9=_K;const J9=Object.prototype.toString,{Z_NO_FLUSH:MK,Z_SYNC_FLUSH:RK,Z_FULL_FLUSH:zK,Z_FINISH:AK,Z_OK:md,Z_STREAM_END:PK,Z_DEFAULT_COMPRESSION:BK,Z_DEFAULT_STRATEGY:$K,Z_DEFLATED:DK}=na;function qs(e){this.options=lc.assign({level:BK,method:DK,chunkSize:16384,windowBits:15,memLevel:8,strategy:$K},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Q9,this.strm.avail_out=0;let o=ql.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(o!==md)throw new Error(Wi[o]);if(t.header&&ql.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=Cs.string2buf(t.dictionary):J9.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,o=ql.deflateSetDictionary(this.strm,n),o!==md)throw new Error(Wi[o]);this._dict_set=!0}}qs.prototype.push=function(e,t){const o=this.strm,n=this.options.chunkSize;let r,i;if(this.ended)return!1;for(t===~~t?i=t:i=t===!0?AK:MK,typeof e=="string"?o.input=Cs.string2buf(e):J9.call(e)==="[object ArrayBuffer]"?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){if(o.avail_out===0&&(o.output=new Uint8Array(n),o.next_out=0,o.avail_out=n),(i===RK||i===zK)&&o.avail_out<=6){this.onData(o.output.subarray(0,o.next_out)),o.avail_out=0;continue}if(r=ql.deflate(o,i),r===PK)return o.next_out>0&&this.onData(o.output.subarray(0,o.next_out)),r=ql.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===md;if(o.avail_out===0){this.onData(o.output);continue}if(i>0&&o.next_out>0){this.onData(o.output.subarray(0,o.next_out)),o.avail_out=0;continue}if(o.avail_in===0)break}return!0};qs.prototype.onData=function(e){this.chunks.push(e)};qs.prototype.onEnd=function(e){e===md&&(this.result=lc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function _3(e,t){const o=new qs(t);if(o.push(e,!0),o.err)throw o.msg||Wi[o.err];return o.result}function TK(e,t){return t=t||{},t.raw=!0,_3(e,t)}function IK(e,t){return t=t||{},t.gzip=!0,_3(e,t)}var OK=qs,LK=_3,HK=TK,NK=IK,VK=na,WK={Deflate:OK,deflate:LK,deflateRaw:HK,gzip:NK,constants:VK};const _u=16209,jK=16191;var UK=function(t,o){let n,r,i,a,l,s,u,d,c,h,f,p,g,v,b,C,k,w,_,M,E,P,z,$;const G=t.state;n=t.next_in,z=t.input,r=n+(t.avail_in-5),i=t.next_out,$=t.output,a=i-(o-t.avail_out),l=i+(t.avail_out-257),s=G.dmax,u=G.wsize,d=G.whave,c=G.wnext,h=G.window,f=G.hold,p=G.bits,g=G.lencode,v=G.distcode,b=(1< >>24,f>>>=w,p-=w,w=k>>>16&255,w===0)$[i++]=k&65535;else if(w&16){_=k&65535,w&=15,w&&(p >>=w,p-=w),p<15&&(f+=z[n++]< >>24,f>>>=w,p-=w,w=k>>>16&255,w&16){if(M=k&65535,w&=15,p
s){t.msg="invalid distance too far back",G.mode=_u;break e}if(f>>>=w,p-=w,w=i-a,M>w){if(w=M-w,w>d&&G.sane){t.msg="invalid distance too far back",G.mode=_u;break e}if(E=0,P=h,c===0){if(E+=u-w,w<_){_-=w;do $[i++]=h[E++];while(--w);E=i-M,P=$}}else if(c 2;)$[i++]=P[E++],$[i++]=P[E++],$[i++]=P[E++],_-=3;_&&($[i++]=P[E++],_>1&&($[i++]=P[E++]))}else{E=i-M;do $[i++]=$[E++],$[i++]=$[E++],$[i++]=$[E++],_-=3;while(_>2);_&&($[i++]=$[E++],_>1&&($[i++]=$[E++]))}}else if(w&64){t.msg="invalid distance code",G.mode=_u;break e}else{k=v[(k&65535)+(f&(1< >3,n-=_,p-=_<<3,f&=(1< {const s=l.bits;let u=0,d=0,c=0,h=0,f=0,p=0,g=0,v=0,b=0,C=0,k,w,_,M,E,P=null,z;const $=new Uint16Array(ga+1),G=new Uint16Array(ga+1);let H=null,q,W,L;for(u=0;u<=ga;u++)$[u]=0;for(d=0;d
=1&&$[h]===0;h--);if(f>h&&(f=h),h===0)return r[i++]=1<<24|64<<16|0,r[i++]=1<<24|64<<16|0,l.bits=1,0;for(c=1;c 0&&(e===g5||h!==1))return-1;for(G[1]=0,u=1;u p5||e===v5&&b>m5)return 1;for(;;){q=u-g,a[d]+1 =z?(W=H[a[d]-z],L=P[a[d]-z]):(W=96,L=0),k=1< >g)+w]=q<<24|W<<16|L|0;while(w!==0);for(k=1< >=1;if(k!==0?(C&=k-1,C+=k):C=0,d++,--$[u]===0){if(u===h)break;u=t[o+a[d]]}if(u>f&&(C&M)!==_){for(g===0&&(g=f),E+=c,p=u-g,v=1< p5||e===v5&&b>m5)return 1;_=C&M,r[_]=f<<24|p<<16|E-i|0}}return C!==0&&(r[E+C]=u-g<<24|64<<16|0),l.bits=f,0};var Zl=XK;const YK=0,eb=1,tb=2,{Z_FINISH:b5,Z_BLOCK:QK,Z_TREES:Mu,Z_OK:Ui,Z_STREAM_END:JK,Z_NEED_DICT:eG,Z_STREAM_ERROR:Cn,Z_DATA_ERROR:ob,Z_MEM_ERROR:nb,Z_BUF_ERROR:tG,Z_DEFLATED:x5}=na,sc=16180,y5=16181,C5=16182,w5=16183,S5=16184,F5=16185,E5=16186,k5=16187,_5=16188,M5=16189,gd=16190,ur=16191,M0=16192,R5=16193,R0=16194,z5=16195,A5=16196,P5=16197,B5=16198,Ru=16199,zu=16200,$5=16201,D5=16202,T5=16203,I5=16204,O5=16205,z0=16206,L5=16207,H5=16208,to=16209,rb=16210,ib=16211,oG=852,nG=592,rG=15,iG=rG,N5=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function aG(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ra=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode
ib?1:0},ab=e=>{if(ra(e))return Cn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=sc,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(oG),t.distcode=t.distdyn=new Int32Array(nG),t.sane=1,t.back=-1,Ui},lb=e=>{if(ra(e))return Cn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ab(e)},sb=(e,t)=>{let o;if(ra(e))return Cn;const n=e.state;return t<0?(o=0,t=-t):(o=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Cn:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=o,n.wbits=t,lb(e))},ub=(e,t)=>{if(!e)return Cn;const o=new aG;e.state=o,o.strm=e,o.window=null,o.mode=sc;const n=sb(e,t);return n!==Ui&&(e.state=null),n},lG=e=>ub(e,iG);let V5=!0,A0,P0;const sG=e=>{if(V5){A0=new Int32Array(512),P0=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Zl(eb,e.lens,0,288,A0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Zl(tb,e.lens,0,32,P0,0,e.work,{bits:5}),V5=!1}e.lencode=A0,e.lenbits=9,e.distcode=P0,e.distbits=5},db=(e,t,o,n)=>{let r;const i=e.state;return i.window===null&&(i.wsize=1< =i.wsize?(i.window.set(t.subarray(o-i.wsize,o),0),i.wnext=0,i.whave=i.wsize):(r=i.wsize-i.wnext,r>n&&(r=n),i.window.set(t.subarray(o-n,o-n+r),i.wnext),n-=r,n?(i.window.set(t.subarray(o-n,o),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=r,i.wnext===i.wsize&&(i.wnext=0),i.whave {let o,n,r,i,a,l,s,u,d,c,h,f,p,g,v=0,b,C,k,w,_,M,E,P;const z=new Uint8Array(4);let $,G;const H=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ra(e)||!e.output||!e.input&&e.avail_in!==0)return Cn;o=e.state,o.mode===ur&&(o.mode=M0),a=e.next_out,r=e.output,s=e.avail_out,i=e.next_in,n=e.input,l=e.avail_in,u=o.hold,d=o.bits,c=l,h=s,P=Ui;e:for(;;)switch(o.mode){case sc:if(o.wrap===0){o.mode=M0;break}for(;d<16;){if(l===0)break e;l--,u+=n[i++]< >>8&255,o.check=Co(o.check,z,2,0),u=0,d=0,o.mode=y5;break}if(o.head&&(o.head.done=!1),!(o.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",o.mode=to;break}if((u&15)!==x5){e.msg="unknown compression method",o.mode=to;break}if(u>>>=4,d-=4,E=(u&15)+8,o.wbits===0&&(o.wbits=E),E>15||E>o.wbits){e.msg="invalid window size",o.mode=to;break}o.dmax=1< >8&1),o.flags&512&&o.wrap&4&&(z[0]=u&255,z[1]=u>>>8&255,o.check=Co(o.check,z,2,0)),u=0,d=0,o.mode=C5;case C5:for(;d<32;){if(l===0)break e;l--,u+=n[i++]< >>8&255,z[2]=u>>>16&255,z[3]=u>>>24&255,o.check=Co(o.check,z,4,0)),u=0,d=0,o.mode=w5;case w5:for(;d<16;){if(l===0)break e;l--,u+=n[i++]< >8),o.flags&512&&o.wrap&4&&(z[0]=u&255,z[1]=u>>>8&255,o.check=Co(o.check,z,2,0)),u=0,d=0,o.mode=S5;case S5:if(o.flags&1024){for(;d<16;){if(l===0)break e;l--,u+=n[i++]< >>8&255,o.check=Co(o.check,z,2,0)),u=0,d=0}else o.head&&(o.head.extra=null);o.mode=F5;case F5:if(o.flags&1024&&(f=o.length,f>l&&(f=l),f&&(o.head&&(E=o.head.extra_len-o.length,o.head.extra||(o.head.extra=new Uint8Array(o.head.extra_len)),o.head.extra.set(n.subarray(i,i+f),E)),o.flags&512&&o.wrap&4&&(o.check=Co(o.check,n,f,i)),l-=f,i+=f,o.length-=f),o.length))break e;o.length=0,o.mode=E5;case E5:if(o.flags&2048){if(l===0)break e;f=0;do E=n[i+f++],o.head&&E&&o.length<65536&&(o.head.name+=String.fromCharCode(E));while(E&&f >9&1,o.head.done=!0),e.adler=o.check=0,o.mode=ur;break;case M5:for(;d<32;){if(l===0)break e;l--,u+=n[i++]< >>=d&7,d-=d&7,o.mode=z0;break}for(;d<3;){if(l===0)break e;l--,u+=n[i++]< >>=1,d-=1,u&3){case 0:o.mode=R5;break;case 1:if(sG(o),o.mode=Ru,t===Mu){u>>>=2,d-=2;break e}break;case 2:o.mode=A5;break;case 3:e.msg="invalid block type",o.mode=to}u>>>=2,d-=2;break;case R5:for(u>>>=d&7,d-=d&7;d<32;){if(l===0)break e;l--,u+=n[i++]< >>16^65535)){e.msg="invalid stored block lengths",o.mode=to;break}if(o.length=u&65535,u=0,d=0,o.mode=R0,t===Mu)break e;case R0:o.mode=z5;case z5:if(f=o.length,f){if(f>l&&(f=l),f>s&&(f=s),f===0)break e;r.set(n.subarray(i,i+f),a),l-=f,i+=f,s-=f,a+=f,o.length-=f;break}o.mode=ur;break;case A5:for(;d<14;){if(l===0)break e;l--,u+=n[i++]< >>=5,d-=5,o.ndist=(u&31)+1,u>>>=5,d-=5,o.ncode=(u&15)+4,u>>>=4,d-=4,o.nlen>286||o.ndist>30){e.msg="too many length or distance symbols",o.mode=to;break}o.have=0,o.mode=P5;case P5:for(;o.have >>=3,d-=3}for(;o.have<19;)o.lens[H[o.have++]]=0;if(o.lencode=o.lendyn,o.lenbits=7,$={bits:o.lenbits},P=Zl(YK,o.lens,0,19,o.lencode,0,o.work,$),o.lenbits=$.bits,P){e.msg="invalid code lengths set",o.mode=to;break}o.have=0,o.mode=B5;case B5:for(;o.have >>24,C=v>>>16&255,k=v&65535,!(b<=d);){if(l===0)break e;l--,u+=n[i++]< >>=b,d-=b,o.lens[o.have++]=k;else{if(k===16){for(G=b+2;d >>=b,d-=b,o.have===0){e.msg="invalid bit length repeat",o.mode=to;break}E=o.lens[o.have-1],f=3+(u&3),u>>>=2,d-=2}else if(k===17){for(G=b+3;d >>=b,d-=b,E=0,f=3+(u&7),u>>>=3,d-=3}else{for(G=b+7;d >>=b,d-=b,E=0,f=11+(u&127),u>>>=7,d-=7}if(o.have+f>o.nlen+o.ndist){e.msg="invalid bit length repeat",o.mode=to;break}for(;f--;)o.lens[o.have++]=E}}if(o.mode===to)break;if(o.lens[256]===0){e.msg="invalid code -- missing end-of-block",o.mode=to;break}if(o.lenbits=9,$={bits:o.lenbits},P=Zl(eb,o.lens,0,o.nlen,o.lencode,0,o.work,$),o.lenbits=$.bits,P){e.msg="invalid literal/lengths set",o.mode=to;break}if(o.distbits=6,o.distcode=o.distdyn,$={bits:o.distbits},P=Zl(tb,o.lens,o.nlen,o.ndist,o.distcode,0,o.work,$),o.distbits=$.bits,P){e.msg="invalid distances set",o.mode=to;break}if(o.mode=Ru,t===Mu)break e;case Ru:o.mode=zu;case zu:if(l>=6&&s>=258){e.next_out=a,e.avail_out=s,e.next_in=i,e.avail_in=l,o.hold=u,o.bits=d,UK(e,h),a=e.next_out,r=e.output,s=e.avail_out,i=e.next_in,n=e.input,l=e.avail_in,u=o.hold,d=o.bits,o.mode===ur&&(o.back=-1);break}for(o.back=0;v=o.lencode[u&(1< >>24,C=v>>>16&255,k=v&65535,!(b<=d);){if(l===0)break e;l--,u+=n[i++]< >w)],b=v>>>24,C=v>>>16&255,k=v&65535,!(w+b<=d);){if(l===0)break e;l--,u+=n[i++]< >>=w,d-=w,o.back+=w}if(u>>>=b,d-=b,o.back+=b,o.length=k,C===0){o.mode=O5;break}if(C&32){o.back=-1,o.mode=ur;break}if(C&64){e.msg="invalid literal/length code",o.mode=to;break}o.extra=C&15,o.mode=$5;case $5:if(o.extra){for(G=o.extra;d >>=o.extra,d-=o.extra,o.back+=o.extra}o.was=o.length,o.mode=D5;case D5:for(;v=o.distcode[u&(1< >>24,C=v>>>16&255,k=v&65535,!(b<=d);){if(l===0)break e;l--,u+=n[i++]< >w)],b=v>>>24,C=v>>>16&255,k=v&65535,!(w+b<=d);){if(l===0)break e;l--,u+=n[i++]< >>=w,d-=w,o.back+=w}if(u>>>=b,d-=b,o.back+=b,C&64){e.msg="invalid distance code",o.mode=to;break}o.offset=k,o.extra=C&15,o.mode=T5;case T5:if(o.extra){for(G=o.extra;d >>=o.extra,d-=o.extra,o.back+=o.extra}if(o.offset>o.dmax){e.msg="invalid distance too far back",o.mode=to;break}o.mode=I5;case I5:if(s===0)break e;if(f=h-s,o.offset>f){if(f=o.offset-f,f>o.whave&&o.sane){e.msg="invalid distance too far back",o.mode=to;break}f>o.wnext?(f-=o.wnext,p=o.wsize-f):p=o.wnext-f,f>o.length&&(f=o.length),g=o.window}else g=r,p=a-o.offset,f=o.length;f>s&&(f=s),s-=f,o.length-=f;do r[a++]=g[p++];while(--f);o.length===0&&(o.mode=zu);break;case O5:if(s===0)break e;r[a++]=o.length,s--,o.mode=zu;break;case z0:if(o.wrap){for(;d<32;){if(l===0)break e;l--,u|=n[i++]< {if(ra(e))return Cn;let t=e.state;return t.window&&(t.window=null),e.state=null,Ui},cG=(e,t)=>{if(ra(e))return Cn;const o=e.state;return o.wrap&2?(o.head=t,t.done=!1,Ui):Cn},fG=(e,t)=>{const o=t.length;let n,r,i;return ra(e)||(n=e.state,n.wrap!==0&&n.mode!==gd)?Cn:n.mode===gd&&(r=1,r=xs(r,t,o,0),r!==n.check)?ob:(i=db(e,t,o,o),i?(n.mode=rb,nb):(n.havedict=1,Ui))};var hG=lb,pG=sb,mG=ab,gG=lG,vG=ub,bG=uG,xG=dG,yG=cG,CG=fG,wG="pako inflate (from Nodeca project)",hr={inflateReset:hG,inflateReset2:pG,inflateResetKeep:mG,inflateInit:gG,inflateInit2:vG,inflate:bG,inflateEnd:xG,inflateGetHeader:yG,inflateSetDictionary:CG,inflateInfo:wG};function SG(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var FG=SG;const cb=Object.prototype.toString,{Z_NO_FLUSH:EG,Z_FINISH:kG,Z_OK:ws,Z_STREAM_END:B0,Z_NEED_DICT:$0,Z_STREAM_ERROR:_G,Z_DATA_ERROR:W5,Z_MEM_ERROR:MG}=na;function Zs(e){this.options=lc.assign({chunkSize:1024*64,windowBits:15,to:""},e||{});const t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(e&&e.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15||(t.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Q9,this.strm.avail_out=0;let o=hr.inflateInit2(this.strm,t.windowBits);if(o!==ws)throw new Error(Wi[o]);if(this.header=new FG,hr.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=Cs.string2buf(t.dictionary):cb.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(o=hr.inflateSetDictionary(this.strm,t.dictionary),o!==ws)))throw new Error(Wi[o])}Zs.prototype.push=function(e,t){const o=this.strm,n=this.options.chunkSize,r=this.options.dictionary;let i,a,l;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?kG:EG,cb.call(e)==="[object ArrayBuffer]"?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){for(o.avail_out===0&&(o.output=new Uint8Array(n),o.next_out=0,o.avail_out=n),i=hr.inflate(o,a),i===$0&&r&&(i=hr.inflateSetDictionary(o,r),i===ws?i=hr.inflate(o,a):i===W5&&(i=$0));o.avail_in>0&&i===B0&&o.state.wrap>0&&e[o.next_in]!==0;)hr.inflateReset(o),i=hr.inflate(o,a);switch(i){case _G:case W5:case $0:case MG:return this.onEnd(i),this.ended=!0,!1}if(l=o.avail_out,o.next_out&&(o.avail_out===0||i===B0))if(this.options.to==="string"){let s=Cs.utf8border(o.output,o.next_out),u=o.next_out-s,d=Cs.buf2string(o.output,s);o.next_out=u,o.avail_out=n-u,u&&o.output.set(o.output.subarray(s,s+u),0),this.onData(d)}else this.onData(o.output.length===o.next_out?o.output:o.output.subarray(0,o.next_out));if(!(i===ws&&l===0)){if(i===B0)return i=hr.inflateEnd(this.strm),this.onEnd(i),this.ended=!0,!0;if(o.avail_in===0)break}}return!0};Zs.prototype.onData=function(e){this.chunks.push(e)};Zs.prototype.onEnd=function(e){e===ws&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=lc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function M3(e,t){const o=new Zs(t);if(o.push(e),o.err)throw o.msg||Wi[o.err];return o.result}function RG(e,t){return t=t||{},t.raw=!0,M3(e,t)}var zG=Zs,AG=M3,PG=RG,BG=M3,$G=na,DG={Inflate:zG,inflate:AG,inflateRaw:PG,ungzip:BG,constants:$G};const{Deflate:TG,deflate:IG,deflateRaw:OG,gzip:LG}=WK,{Inflate:HG,inflate:NG,inflateRaw:VG,ungzip:WG}=DG;var jG=TG,UG=IG,KG=OG,GG=LG,qG=HG,ZG=NG,XG=VG,YG=WG,QG=na,Va={Deflate:jG,deflate:UG,deflateRaw:KG,gzip:GG,Inflate:qG,inflate:ZG,inflateRaw:XG,ungzip:YG,constants:QG};function Fl(e){const t=Us(),o=Nt({moduleEmbeddedRules:Sa(t.isPatchMode?t.patchEmbeddedRulesList[e]:t.sourceEmbeddedRulesList[e]),currentEmbeddedRules:Sa(t.customConfigEmbeddedRulesList[e]||(t.isPatchMode?t.patchEmbeddedRulesList[e]:t.sourceEmbeddedRulesList[e]))||{},moduleFixedOrientation:Sa(t.isPatchMode?t.patchFixedOrientationList[e]:t.sourceFixedOrientationList[e]),currentFixedOrientation:Sa(t.customConfigFixedOrientationList[e]||(t.isPatchMode?t.patchFixedOrientationList[e]:t.sourceFixedOrientationList[e]))||{}});return{...Fh(o)}}const fb=e=>{const t=/^[a-zA-Z0-9_.]+$/;return e===""?!0:!(/\s/.test(e)||!t.test(e))},JG=e=>{const t=/^[a-zA-Z0-9_:,.*-]+$/;return e===""?!0:!(/\s/.test(e)||!t.test(e))},eq=e=>{const t=/^[a-zA-Z0-9_,.]+$/;return e===""?!0:!(/\s/.test(e)||!t.test(e))},tq={class:"mb-4"},oq={class:"mb-4"},nq={class:"mb-4"},rq={class:"mb-4"},iq={class:"mb-4"},aq={class:"mb-4"},lq={class:"mb-4"},j5=ye({__name:"EmbeddedAppDrawer",props:{type:{},title:{}},emits:["submit"],setup(e,{expose:t,emit:o}){const n=A(null),r=e,i=A(!1),a=ht(),l=Us(),s=di(),u=D(()=>({theme:a.isDarkMode?Bt:Ft})),{message:d,modal:c}=It(["message","modal"],{configProviderProps:u});let h,f;const p=[{label:"强制应用所有界面横屏[nra:cr:rcr:nr]",key:"fullScreen_nra:cr:rcr:nr",rule:"nra:cr:rcr:nr"},{label:"继承应用自身设置横屏[*]",key:"fullScreen_*",rule:"*"},{label:"自定义",key:"fullScreen_custom"}],g=D(()=>{const ze=[{label:"默认横屏规则",key:"fullScreen_default",rule:""}];return a.MIOSVersion&&a.MIOSVersion>=2?[...ze,...p]:p}),v=[{label:"大尺寸[11:10]",key:"ratio_11_10",ratio:1.1},{label:"中尺寸",key:"ratio_default"},{label:"小尺寸[15:10]",key:"ratio_15_10",ratio:1.5},{label:"小尺寸[18:10]",key:"ratio_18:10",ratio:1.8},{label:"自定义",key:"ratio_custom"}],b=A(g.value[0]),C=A(),k=A(!0),w=A(),_=A(),M=A(v[1]),E=A(),P=A(.5),z=A(!1),$=A(!1),G=A([]),H=ze=>{const pe=document.querySelector(".n-drawer-content");pe instanceof HTMLElement&&(s.info("resizeDrawerContent",ze),pe.style.height=ze?"calc(100% + 200px)":"100%")},q=ze=>{var pe;H(!0),(pe=n.value)==null||pe.$el.scrollIntoView({behavior:"smooth",block:"start"})},W=ze=>{var pe;H(!1),(pe=n.value)==null||pe.$el.scrollIntoView({behavior:"smooth",block:"start"})},L=async ze=>{if(ze&&a.MIOSVersion&&a.MIOSVersion>=2){const[pe]=await Me(new Promise((U,N)=>{c.create({title:"确认启用第三方横屏优化吗?",type:"warning",preset:"dialog",content:()=>x("p",null,[F("由于小米的BUG,部分应用即使配置了横屏,在系统重启后仍然会丢失横屏配置,开启此项可以保证该应用的横屏规则不会丢失,但每次设备重启或修改模块规则,该应用都将被强制重启,确定要继续吗?")]),positiveText:"确定继续",negativeText:"我再想想",onPositiveClick:()=>{U("positiveClick")},onNegativeClick:()=>{N("negativeClick")}})}));if(pe)return}X.value=ze},I=A({openDrawer:ze=>new Promise((pe,U)=>{var N,ge,Ce,se,te,ce,Q;if(r.type==="update"&&!ze){U(new Error("更新模式下必须传入初始化参数")),d.error("初始化参数不能为空");return}h=pe,f=U,r.type==="add"&&(_.value="add",b.value=g.value[0],fe.value="",C.value=a.MIOSVersion&&a.MIOSVersion>=2?"":"nra:cr:rcr:nr",G.value=["fullScreen","fixedOrientation","disabled"],ae.value=!1,Fe.value=!1,z.value=!1),r.type==="update"&&ze&&(_.value="update",$.value=!1,P.value=.5,w.value=ze.ruleMode,fe.value=ze.name,we.value=ze.isSupportEmbedded,ze.embeddedRules&&ze.embeddedRules.hasOwnProperty("splitRatio")&&(P.value=ze.embeddedRules.splitRatio??.5),ze.embeddedRules&&ze.embeddedRules.hasOwnProperty("relaunch")?ae.value=!!ze.embeddedRules.relaunch:ae.value=!0,y.value=ze.settingMode,a.MIOSVersion&&a.MIOSVersion>=2&&(X.value=ze.thirdPartyAppOptimize??!1),(!a.MIOSVersion||a.MIOSVersion&&a.MIOSVersion<2)&&(j.value=((N=ze.fixedOrientationRule)==null?void 0:N.disable)??!1),le.value=((ge=ze.fixedOrientationRule)==null?void 0:ge.isShowDivider)??!1,C.value=((Ce=ze.embeddedRules)==null?void 0:Ce.fullRule)??void 0,z.value=((te=(se=ze.fixedOrientationRule)==null?void 0:se.compatChange)==null?void 0:te.split(",").includes("OVERRIDE_UNDEFINED_ORIENTATION_TO_PORTRAIT"))??!1,C.value==="nra:cr:rcr:nr"?b.value=a.MIOSVersion&&a.MIOSVersion>=2?g.value[1]:g.value[0]:ze.embeddedRules&&!ze.embeddedRules.hasOwnProperty("fullRule")?(C.value=a.MIOSVersion&&a.MIOSVersion>=2?void 0:"nra:cr:rcr:nr",b.value=a.MIOSVersion&&a.MIOSVersion>=2?g.value[0]:g.value[1]):C.value==="*"?b.value=a.MIOSVersion&&a.MIOSVersion>=2?g.value[2]:g.value[1]:b.value=a.MIOSVersion&&a.MIOSVersion>=2?g.value[3]:g.value[2],k.value=((ce=ze.embeddedRules)==null?void 0:ce.supportFullSize)??!1,ze.fixedOrientationRule&&ze.fixedOrientationRule.hasOwnProperty("relaunch")?ae.value=!!ze.fixedOrientationRule.relaunch:ae.value=!1,E.value=((Q=ze.fixedOrientationRule)==null?void 0:Q.ratio)??void 0,E.value?E.value===1.1?M.value=v[0]:E.value===1.5?M.value=v[2]:E.value===1.8?M.value=v[3]:M.value=v[4]:M.value=v[1]),i.value=!0}),closeDrawer:()=>{i.value=!1,f("Drawer closed without submission")}}),R=(ze,pe)=>{b.value=pe,C.value=["fullScreen_nra:cr:rcr:nr","fullScreen_*"].includes(ze)?pe.rule:void 0},O=(ze,pe)=>{M.value=pe,E.value=["ratio_11_10","ratio_15_10","ratio_18:10"].includes(ze)?pe.ratio:ze==="ratio_custom"?1.5:void 0},oe=({focused:ze,checked:pe})=>{const U={};return pe?(U.background="#2080f0",ze&&(U.boxShadow="0 0 0 2px #2080f040")):(U.background="#d03050",ze&&(U.boxShadow="0 0 0 2px #d0305040")),U},y=A("fullScreen"),j=A(!1),X=A(!1),le=A(!0),ae=A(!0),Fe=A(!1),fe=A(""),ue=A(""),we=A(!1),ie=async()=>{if(!fe.value){c.create({title:"应用包名不能为空",type:"error",preset:"dialog",content:()=>x("p",null,[F("噫?应用包名不能为空(敲")])});return}if(y.value==="fullScreen"&&!C.value&&(!a.MIOSVersion||a.MIOSVersion<2)){c.create({title:"应用全屏规则不能为空",type:"error",preset:"dialog",content:()=>x("p",null,[F("噫?应用全屏规则不能为空(敲")])});return}if(r.type==="add"&&l.allPackageName.has(fe.value)){c.create({title:"应用包名已存在",type:"error",preset:"dialog",content:()=>x("p",null,[F("噫?这个应用包名已经存在列表中了(敲")])});return}if(r.type==="update"&&we.value&&y.value==="fullScreen"){const[N]=await Me(new Promise((ge,Ce)=>{c.create({title:"确认使用全屏规则吗?",type:"warning",preset:"dialog",content:()=>w.value==="custom"?x("p",null,[F("当前应用已存在")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平行窗口的自定义规则")])," ",F(",继续提交可能导致")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平行窗口的自定义规则")])," ",F("丢失。确定要继续吗?")]):x("p",null,[F("当前应用已存在")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平行窗口的模块规则")])," ",F(",继续更新将会被更替为")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("全屏规则")])," ",F(",如后续需要改回")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平行窗口的模块规则")])," ",F("可能需要先清除自定义规则,确定要继续吗?")]),positiveText:"确定继续",negativeText:"我再想想",onPositiveClick:()=>{ge("positiveClick")},onNegativeClick:()=>{Ce("negativeClick")}})}));if(N)return}if(r.type==="update"&&w.value==="module"&&$.value){const[N]=await Me(new Promise((ge,Ce)=>{c.create({title:"确认使用平行窗口自定义规则吗?",type:"warning",preset:"dialog",content:()=>x("p",null,[F("当前应用已存在")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平行窗口的模块规则")])," ",F(",继续更新将会被更替为")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平行窗口的自定义规则")])," ",F(",且该应用规则不再随模块版本更新,如后续需要改回")," ",x("span",{class:`font-bold ${a.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平行窗口的模块规则")])," ",F("则需要先清除自定义规则,确定要继续吗?")]),positiveText:"确定继续",negativeText:"我再想想",onPositiveClick:()=>{ge("positiveClick")},onNegativeClick:()=>{Ce("negativeClick")}})}));if(N)return}be.value=!0;const ze=()=>{be.value=!1,i.value=!1},pe=()=>{be.value=!1},U={name:fe.value,settingMode:y.value,...a.MIOSVersion&&a.MIOSVersion>=2&&{thirdPartyAppOptimize:!!(X.value&&y.value==="fullScreen")},modePayload:{...y.value==="fullScreen"&&{fullRule:C.value},...y.value==="fullScreen"&&(!a.MIOSVersion||a.MIOSVersion&&a.MIOSVersion<2)&&{skipSelfAdaptive:j.value},...y.value==="fullScreen"&&{isShowDivider:le.value},...y.value==="fullScreen"&&{supportFullSize:k.value},...y.value==="fixedOrientation"&&{ratio:E.value},...y.value==="fixedOrientation"&&{foRelaunch:ae.value},...y.value==="fixedOrientation"&&a.MIOSVersion&&a.MIOSVersion>=2&&{forceFixedOrientation:z.value},...y.value==="embedded"&&(w.value==="custom"||w.value==="module"&&$.value)&&{splitRatio:P.value},...y.value==="embedded"&&(w.value==="custom"||w.value==="module"&&$.value)&&{emRelaunch:Fe.value}},loadingCallback:pe,closeCallback:ze};h(U)},be=A(!1);return t({openDrawer:I.value.openDrawer}),(ze,pe)=>{const U=rt("n-input-group-label"),N=rt("n-input"),ge=rt("n-input-group"),Ce=rt("n-tag"),se=rt("n-alert"),te=rt("n-switch"),ce=rt("n-card"),Q=rt("n-slider"),re=rt("n-input-number"),he=rt("n-tab-pane"),ne=rt("n-button"),Y=rt("n-dropdown"),de=rt("n-tabs"),Ee=rt("n-drawer-content"),Ie=rt("n-drawer");return Re(),Oe(ft,null,[Es(ze.$slots,"default",eh(u6({openDrawer:I.value.openDrawer}))),x(Ie,{show:i.value,"onUpdate:show":pe[22]||(pe[22]=$e=>i.value=$e),width:S(a).windowWidth>=640?"450px":"100%",placement:"right"},{default:K(()=>[x(Ee,{title:r.title,closable:""},{footer:K(()=>[x(ne,{type:"info",loading:be.value,"onUpdate:loading":pe[20]||(pe[20]=$e=>be.value=$e),onClick:pe[21]||(pe[21]=()=>ie())},{default:K(()=>pe[58]||(pe[58]=[F(" 提交 ")])),_:1},8,["loading"])]),default:K(()=>[x(ge,null,{default:K(()=>[x(U,{size:"large"},{default:K(()=>pe[23]||(pe[23]=[F("应用包名")])),_:1}),x(N,{size:"large",status:ue.value,value:fe.value,"onUpdate:value":pe[0]||(pe[0]=$e=>fe.value=$e),"allow-input":$e=>fb($e),readonly:r.type==="update",placeholder:"请输入应用包名"},null,8,["status","value","allow-input","readonly"])]),_:1}),w.value==="custom"?(Re(),Tt(se,{key:0,type:"info",class:"mt-5"},{default:K(()=>[pe[26]||(pe[26]=F(" 当前应用已被 ")),x(Ce,{bordered:!1,type:"info"},{default:K(()=>pe[24]||(pe[24]=[F("自定义规则")])),_:1}),pe[27]||(pe[27]=F(" 覆盖,该应用规则不再随模块版本更新,如需恢复模块规则,请先清除 ")),x(Ce,{bordered:!1,type:"info"},{default:K(()=>pe[25]||(pe[25]=[F("自定义规则")])),_:1}),pe[28]||(pe[28]=F(" 。 "))]),_:1})):Ge("",!0),x(de,{class:"my-3",type:"segment",animated:"",value:y.value,"onUpdate:value":pe[19]||(pe[19]=$e=>y.value=$e)},{default:K(()=>[r.type==="update"&&we.value?(Re(),Tt(he,{key:0,name:"embedded",tab:"平行窗口"},{default:K(()=>[x(se,{"show-icon":!1,bordered:!1,title:"应用分屏显示",type:"success"},{default:K(()=>pe[29]||(pe[29]=[F(" 开启后,未适配横屏应用界面将通过平行窗口显示 ")])),_:1}),w.value==="module"?(Re(),Tt(ce,{key:0,bordered:!1,title:"切换自定义规则",size:"small"},{default:K(()=>[T("div",tq,[x(Ce,{bordered:!1,type:"info"},{default:K(()=>pe[30]||(pe[30]=[F(" 切换为自定义规则后该应用不再随模块更新 ")])),_:1})]),x(te,{"rail-style":oe,value:$.value,"onUpdate:value":pe[1]||(pe[1]=$e=>$.value=$e),size:"large"},{checked:K(()=>pe[31]||(pe[31]=[F("使用自定义规则")])),unchecked:K(()=>pe[32]||(pe[32]=[F("不使用自定义规则")])),_:1},8,["value"])]),_:1})):Ge("",!0),w.value==="custom"||$.value?(Re(),Tt(ce,{key:1,bordered:!1,title:"平行窗口默认分屏比例",size:"small"},{default:K(()=>[x(Q,{value:P.value,"onUpdate:value":pe[2]||(pe[2]=$e=>P.value=$e),size:"small",min:.01,max:.99,step:.01},null,8,["value"]),x(re,{"show-button":!1,class:"pt-3",readonly:"",placeholder:"请输入平行窗口默认分屏比例",value:P.value,"onUpdate:value":pe[3]||(pe[3]=$e=>P.value=$e),min:.01,max:.99,step:.01},null,8,["value"])]),_:1})):Ge("",!0),w.value==="custom"||$.value?(Re(),Tt(ce,{key:2,bordered:!1,title:"平行窗口显示比例发生变化时是否重载",size:"small"},{default:K(()=>[T("div",oq,[x(Ce,{bordered:!1,type:"success"},{default:K(()=>pe[33]||(pe[33]=[F(" 适用于开启 "),T("span",{class:"font-bold"},"平行窗口滑动条",-1),F(" 的应用 ")])),_:1})]),x(te,{"rail-style":oe,value:Fe.value,"onUpdate:value":pe[4]||(pe[4]=$e=>Fe.value=$e),size:"large"},{checked:K(()=>pe[34]||(pe[34]=[F("平行窗口显示比例变化时重载")])),unchecked:K(()=>pe[35]||(pe[35]=[F("平行窗口显示比例变化时不重载")])),_:1},8,["value"])]),_:1})):Ge("",!0)]),_:1})):Ge("",!0),x(he,{name:"fullScreen",tab:"全屏"},{default:K(()=>[x(se,{"show-icon":!1,bordered:!1,title:"应用横屏显示",type:"info"},{default:K(()=>pe[36]||(pe[36]=[F(" 开启后,未适配横屏应用界面将全屏显示,并可更改显示规则 ")])),_:1}),x(ce,{bordered:!1,title:"横屏显示规则",size:"small"},{default:K(()=>[x(Y,{modelValue:b.value,"onUpdate:modelValue":pe[5]||(pe[5]=$e=>b.value=$e),size:"large",trigger:"click",options:g.value,onSelect:R},{default:K(()=>[x(ne,{block:"",type:"info",dashed:""},{default:K(()=>[F(et(b.value.label),1)]),_:1})]),_:1},8,["modelValue","options"])]),_:1}),b.value.key==="fullScreen_custom"?(Re(),Tt(ce,{key:0,bordered:!1,title:"自定义横屏规则",size:"small"},{default:K(()=>[x(ge,null,{default:K(()=>[x(N,{ref_key:"currentFullRuleRef",ref:n,onFocus:pe[6]||(pe[6]=()=>q("currentFullRuleRef")),onBlur:pe[7]||(pe[7]=()=>W("currentFullRuleRef")),value:C.value,"onUpdate:value":pe[8]||(pe[8]=$e=>C.value=$e),placeholder:"请输入横屏规则"},null,8,["value"])]),_:1})]),_:1})):Ge("",!0),x(ce,{bordered:!1,title:"平行窗口滑动条",size:"small"},{default:K(()=>[T("div",nq,[x(Ce,{bordered:!1,type:"success"},{default:K(()=>pe[37]||(pe[37]=[F(" 适用于原生适配 "),T("span",{class:"font-bold"},"Android Embedded",-1),F(" 的应用 ")])),_:1})]),x(te,{"rail-style":oe,value:le.value,"onUpdate:value":pe[9]||(pe[9]=$e=>le.value=$e),size:"large"},{checked:K(()=>pe[38]||(pe[38]=[F("启用平行窗口滑动条")])),unchecked:K(()=>pe[39]||(pe[39]=[F("关闭平行窗口滑动条")])),_:1},8,["value"])]),_:1}),le.value?(Re(),Tt(ce,{key:1,bordered:!1,title:"平行窗口可滑动至全屏",size:"small"},{default:K(()=>[T("div",rq,[x(Ce,{bordered:!1,type:"success"},{default:K(()=>pe[40]||(pe[40]=[F(" 适用于原生适配 "),T("span",{class:"font-bold"},"Android Embedded",-1),F(" 的应用 ")])),_:1})]),x(te,{"rail-style":oe,value:k.value,"onUpdate:value":pe[10]||(pe[10]=$e=>k.value=$e),size:"large"},{checked:K(()=>pe[41]||(pe[41]=[F("平行窗口可滑动至全屏")])),unchecked:K(()=>pe[42]||(pe[42]=[F("平行窗口不可滑动至全屏")])),_:1},8,["value"])]),_:1})):Ge("",!0),!S(a).MIOSVersion||S(a).MIOSVersion&&S(a).MIOSVersion<2?(Re(),Tt(ce,{key:2,class:"",bordered:!1,title:"跳过应用自适配声明",size:"small"},{default:K(()=>[T("div",iq,[x(Ce,{bordered:!1,type:"success"},{default:K(()=>pe[43]||(pe[43]=[F(" 适用于即使设置了 "),T("span",{class:"font-bold"},"横屏规则",-1),F(" 仍无法横屏的应用 ")])),_:1})]),x(te,{"rail-style":oe,value:j.value,"onUpdate:value":pe[11]||(pe[11]=$e=>j.value=$e),size:"large"},{checked:K(()=>pe[44]||(pe[44]=[F("跳过自适配声明")])),unchecked:K(()=>pe[45]||(pe[45]=[F("不跳过自适配声明")])),_:1},8,["value"])]),_:1})):Ge("",!0),S(a).MIOSVersion&&S(a).MIOSVersion>=2?(Re(),Tt(ce,{key:3,class:"",bordered:!1,title:"第三方应用横屏优化",size:"small"},{default:K(()=>[T("div",aq,[x(Ce,{bordered:!1,type:"success"},{default:K(()=>pe[46]||(pe[46]=[F(" 适用于即使设置了 "),T("span",{class:"font-bold"},"横屏规则",-1),F(" 仍无法横屏的应用 ")])),_:1})]),x(te,{"rail-style":oe,"onUpdate:value":pe[12]||(pe[12]=$e=>L($e)),value:X.value,size:"large"},{checked:K(()=>pe[47]||(pe[47]=[F("已开启第三方应用横屏优化")])),unchecked:K(()=>pe[48]||(pe[48]=[F("未开启第三方应用横屏优化")])),_:1},8,["value"])]),_:1})):Ge("",!0)]),_:1}),x(he,{name:"fixedOrientation",tab:"居中布局"},{default:K(()=>[x(se,{"show-icon":!1,bordered:!1,title:"应用居中显示",type:"warning"},{default:K(()=>pe[49]||(pe[49]=[F(" 开启后,未适配横屏应用界面将居中显示,并可更改显示比例 ")])),_:1}),x(ce,{bordered:!1,title:"居中显示比例",size:"small"},{default:K(()=>[x(Y,{value:M.value,"onUpdate:value":pe[13]||(pe[13]=$e=>M.value=$e),size:"large",trigger:"click",options:v,onSelect:O},{default:K(()=>[x(ne,{block:"",type:"error",dashed:""},{default:K(()=>[F(et(M.value.label),1)]),_:1})]),_:1},8,["value"])]),_:1}),M.value.key==="ratio_custom"?(Re(),Tt(ce,{key:0,bordered:!1,title:"自定义显示比例",size:"small"},{default:K(()=>[x(Q,{size:"small",value:E.value,"onUpdate:value":pe[14]||(pe[14]=$e=>E.value=$e),min:1.01,max:1.99,step:.01},null,8,["value"]),x(re,{"show-button":!1,class:"pt-3",readonly:"",placeholder:"请输入自定义显示比例",value:E.value,"onUpdate:value":pe[15]||(pe[15]=$e=>E.value=$e),min:1.01,max:1.99,step:.01},null,8,["value"])]),_:1})):Ge("",!0),x(ce,{bordered:!1,title:"应用比例变化时是否重载应用",size:"small"},{default:K(()=>[x(te,{"rail-style":oe,value:ae.value,"onUpdate:value":pe[16]||(pe[16]=$e=>ae.value=$e),size:"large"},{checked:K(()=>pe[50]||(pe[50]=[F("应用比例变化时重载应用")])),unchecked:K(()=>pe[51]||(pe[51]=[F("应用比例变化时不重载应用")])),_:1},8,["value"])]),_:1}),S(a).MIOSVersion&&S(a).MIOSVersion>=2?(Re(),Tt(ce,{key:1,class:"",bordered:!1,title:"强制应用居中显示",size:"small"},{default:K(()=>[T("div",lq,[x(Ce,{bordered:!1,type:"success"},{default:K(()=>pe[52]||(pe[52]=[F(" 适用于即使设置了 "),T("span",{class:"font-bold"},"居中布局",-1),F(" 仍无法居中显示的应用 ")])),_:1})]),x(te,{"rail-style":oe,value:z.value,"onUpdate:value":pe[17]||(pe[17]=$e=>z.value=$e),size:"large"},{checked:K(()=>pe[53]||(pe[53]=[F("强制应用居中显示")])),unchecked:K(()=>pe[54]||(pe[54]=[F("不强制应用居中显示")])),_:1},8,["value"])]),_:1})):Ge("",!0)]),_:1}),x(he,{name:"disabled",tab:"原始布局"},{default:K(()=>[x(se,{"show-icon":!1,bordered:!1,title:"应用原始布局",type:"error"},{default:K(()=>pe[55]||(pe[55]=[F(" 开启后,将禁用任何系统规则干预,应用会根据自身的适配规则进行显示,大多数应用仅竖屏显示 ")])),_:1}),x(ce,{bordered:!1,title:"应用比例变化时是否重载应用",size:"small"},{default:K(()=>[x(te,{"rail-style":oe,value:ae.value,"onUpdate:value":pe[18]||(pe[18]=$e=>ae.value=$e),size:"large"},{checked:K(()=>pe[56]||(pe[56]=[F("应用比例变化时重载应用")])),unchecked:K(()=>pe[57]||(pe[57]=[F("应用比例变化时不重载应用")])),_:1},8,["value"])]),_:1})]),_:1})]),_:1},8,["value"])]),_:1},8,["title"])]),_:1},8,["show","width"])],64)}}});function hb(){const e=ht(),t=A(!1),o=()=>new Promise(async(n,r)=>{if(t.value)r("已经有存在的任务了!");else{t.value=!0;const[i,a]=await Me(jN());if(i&&(r(i),t.value=!1),a){const l=a.trim().split(` -`).filter(u=>u),s={};l.forEach(u=>{const[,d,c]=u.split(",");s[d]=c}),e.installedAppNameList=s,n(s),t.value=!1}}});return{loading:t,installedAppNameList:e.installedAppNameList,getList:o}}function sq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-.53 14.03a.75.75 0 0 0 1.06 0l3-3a.75.75 0 1 0-1.06-1.06l-1.72 1.72V8.25a.75.75 0 0 0-1.5 0v5.69l-1.72-1.72a.75.75 0 0 0-1.06 1.06l3 3Z","clip-rule":"evenodd"})])}function uq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{d:"M12 7.5a2.25 2.25 0 1 0 0 4.5 2.25 2.25 0 0 0 0-4.5Z"}),T("path",{"fill-rule":"evenodd",d:"M1.5 4.875C1.5 3.839 2.34 3 3.375 3h17.25c1.035 0 1.875.84 1.875 1.875v9.75c0 1.036-.84 1.875-1.875 1.875H3.375A1.875 1.875 0 0 1 1.5 14.625v-9.75ZM8.25 9.75a3.75 3.75 0 1 1 7.5 0 3.75 3.75 0 0 1-7.5 0ZM18.75 9a.75.75 0 0 0-.75.75v.008c0 .414.336.75.75.75h.008a.75.75 0 0 0 .75-.75V9.75a.75.75 0 0 0-.75-.75h-.008ZM4.5 9.75A.75.75 0 0 1 5.25 9h.008a.75.75 0 0 1 .75.75v.008a.75.75 0 0 1-.75.75H5.25a.75.75 0 0 1-.75-.75V9.75Z","clip-rule":"evenodd"}),T("path",{d:"M2.25 18a.75.75 0 0 0 0 1.5c5.4 0 10.63.722 15.6 2.075 1.19.324 2.4-.558 2.4-1.82V18.75a.75.75 0 0 0-.75-.75H2.25Z"})])}function dq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{d:"M5.85 3.5a.75.75 0 0 0-1.117-1 9.719 9.719 0 0 0-2.348 4.876.75.75 0 0 0 1.479.248A8.219 8.219 0 0 1 5.85 3.5ZM19.267 2.5a.75.75 0 1 0-1.118 1 8.22 8.22 0 0 1 1.987 4.124.75.75 0 0 0 1.48-.248A9.72 9.72 0 0 0 19.266 2.5Z"}),T("path",{"fill-rule":"evenodd",d:"M12 2.25A6.75 6.75 0 0 0 5.25 9v.75a8.217 8.217 0 0 1-2.119 5.52.75.75 0 0 0 .298 1.206c1.544.57 3.16.99 4.831 1.243a3.75 3.75 0 1 0 7.48 0 24.583 24.583 0 0 0 4.83-1.244.75.75 0 0 0 .298-1.205 8.217 8.217 0 0 1-2.118-5.52V9A6.75 6.75 0 0 0 12 2.25ZM9.75 18c0-.034 0-.067.002-.1a25.05 25.05 0 0 0 4.496 0l.002.1a2.25 2.25 0 1 1-4.5 0Z","clip-rule":"evenodd"})])}function cq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M14.615 1.595a.75.75 0 0 1 .359.852L12.982 9.75h7.268a.75.75 0 0 1 .548 1.262l-10.5 11.25a.75.75 0 0 1-1.272-.71l1.992-7.302H3.75a.75.75 0 0 1-.548-1.262l10.5-11.25a.75.75 0 0 1 .913-.143Z","clip-rule":"evenodd"})])}function fq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M6.75 2.25A.75.75 0 0 1 7.5 3v1.5h9V3A.75.75 0 0 1 18 3v1.5h.75a3 3 0 0 1 3 3v11.25a3 3 0 0 1-3 3H5.25a3 3 0 0 1-3-3V7.5a3 3 0 0 1 3-3H6V3a.75.75 0 0 1 .75-.75Zm13.5 9a1.5 1.5 0 0 0-1.5-1.5H5.25a1.5 1.5 0 0 0-1.5 1.5v7.5a1.5 1.5 0 0 0 1.5 1.5h13.5a1.5 1.5 0 0 0 1.5-1.5v-7.5Z","clip-rule":"evenodd"})])}function pb(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M11.078 2.25c-.917 0-1.699.663-1.85 1.567L9.05 4.889c-.02.12-.115.26-.297.348a7.493 7.493 0 0 0-.986.57c-.166.115-.334.126-.45.083L6.3 5.508a1.875 1.875 0 0 0-2.282.819l-.922 1.597a1.875 1.875 0 0 0 .432 2.385l.84.692c.095.078.17.229.154.43a7.598 7.598 0 0 0 0 1.139c.015.2-.059.352-.153.43l-.841.692a1.875 1.875 0 0 0-.432 2.385l.922 1.597a1.875 1.875 0 0 0 2.282.818l1.019-.382c.115-.043.283-.031.45.082.312.214.641.405.985.57.182.088.277.228.297.35l.178 1.071c.151.904.933 1.567 1.85 1.567h1.844c.916 0 1.699-.663 1.85-1.567l.178-1.072c.02-.12.114-.26.297-.349.344-.165.673-.356.985-.57.167-.114.335-.125.45-.082l1.02.382a1.875 1.875 0 0 0 2.28-.819l.923-1.597a1.875 1.875 0 0 0-.432-2.385l-.84-.692c-.095-.078-.17-.229-.154-.43a7.614 7.614 0 0 0 0-1.139c-.016-.2.059-.352.153-.43l.84-.692c.708-.582.891-1.59.433-2.385l-.922-1.597a1.875 1.875 0 0 0-2.282-.818l-1.02.382c-.114.043-.282.031-.449-.083a7.49 7.49 0 0 0-.985-.57c-.183-.087-.277-.227-.297-.348l-.179-1.072a1.875 1.875 0 0 0-1.85-1.567h-1.843ZM12 15.75a3.75 3.75 0 1 0 0-7.5 3.75 3.75 0 0 0 0 7.5Z","clip-rule":"evenodd"})])}function hq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{d:"M16.5 7.5h-9v9h9v-9Z"}),T("path",{"fill-rule":"evenodd",d:"M8.25 2.25A.75.75 0 0 1 9 3v.75h2.25V3a.75.75 0 0 1 1.5 0v.75H15V3a.75.75 0 0 1 1.5 0v.75h.75a3 3 0 0 1 3 3v.75H21A.75.75 0 0 1 21 9h-.75v2.25H21a.75.75 0 0 1 0 1.5h-.75V15H21a.75.75 0 0 1 0 1.5h-.75v.75a3 3 0 0 1-3 3h-.75V21a.75.75 0 0 1-1.5 0v-.75h-2.25V21a.75.75 0 0 1-1.5 0v-.75H9V21a.75.75 0 0 1-1.5 0v-.75h-.75a3 3 0 0 1-3-3v-.75H3A.75.75 0 0 1 3 15h.75v-2.25H3a.75.75 0 0 1 0-1.5h.75V9H3a.75.75 0 0 1 0-1.5h.75v-.75a3 3 0 0 1 3-3h.75V3a.75.75 0 0 1 .75-.75ZM6 6.75A.75.75 0 0 1 6.75 6h10.5a.75.75 0 0 1 .75.75v10.5a.75.75 0 0 1-.75.75H6.75a.75.75 0 0 1-.75-.75V6.75Z","clip-rule":"evenodd"})])}function mb(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm0 8.625a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25ZM15.375 12a1.125 1.125 0 1 1 2.25 0 1.125 1.125 0 0 1-2.25 0ZM7.5 10.875a1.125 1.125 0 1 0 0 2.25 1.125 1.125 0 0 0 0-2.25Z","clip-rule":"evenodd"})])}function pq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{d:"M3.53 2.47a.75.75 0 0 0-1.06 1.06l18 18a.75.75 0 1 0 1.06-1.06l-18-18ZM22.676 12.553a11.249 11.249 0 0 1-2.631 4.31l-3.099-3.099a5.25 5.25 0 0 0-6.71-6.71L7.759 4.577a11.217 11.217 0 0 1 4.242-.827c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113Z"}),T("path",{d:"M15.75 12c0 .18-.013.357-.037.53l-4.244-4.243A3.75 3.75 0 0 1 15.75 12ZM12.53 15.713l-4.243-4.244a3.75 3.75 0 0 0 4.244 4.243Z"}),T("path",{d:"M6.75 12c0-.619.107-1.213.304-1.764l-3.1-3.1a11.25 11.25 0 0 0-2.63 4.31c-.12.362-.12.752 0 1.114 1.489 4.467 5.704 7.69 10.675 7.69 1.5 0 2.933-.294 4.242-.827l-2.477-2.477A5.25 5.25 0 0 1 6.75 12Z"})])}function mq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M1.5 5.625c0-1.036.84-1.875 1.875-1.875h17.25c1.035 0 1.875.84 1.875 1.875v12.75c0 1.035-.84 1.875-1.875 1.875H3.375A1.875 1.875 0 0 1 1.5 18.375V5.625Zm1.5 0v1.5c0 .207.168.375.375.375h1.5a.375.375 0 0 0 .375-.375v-1.5a.375.375 0 0 0-.375-.375h-1.5A.375.375 0 0 0 3 5.625Zm16.125-.375a.375.375 0 0 0-.375.375v1.5c0 .207.168.375.375.375h1.5A.375.375 0 0 0 21 7.125v-1.5a.375.375 0 0 0-.375-.375h-1.5ZM21 9.375A.375.375 0 0 0 20.625 9h-1.5a.375.375 0 0 0-.375.375v1.5c0 .207.168.375.375.375h1.5a.375.375 0 0 0 .375-.375v-1.5Zm0 3.75a.375.375 0 0 0-.375-.375h-1.5a.375.375 0 0 0-.375.375v1.5c0 .207.168.375.375.375h1.5a.375.375 0 0 0 .375-.375v-1.5Zm0 3.75a.375.375 0 0 0-.375-.375h-1.5a.375.375 0 0 0-.375.375v1.5c0 .207.168.375.375.375h1.5a.375.375 0 0 0 .375-.375v-1.5ZM4.875 18.75a.375.375 0 0 0 .375-.375v-1.5a.375.375 0 0 0-.375-.375h-1.5a.375.375 0 0 0-.375.375v1.5c0 .207.168.375.375.375h1.5ZM3.375 15h1.5a.375.375 0 0 0 .375-.375v-1.5a.375.375 0 0 0-.375-.375h-1.5a.375.375 0 0 0-.375.375v1.5c0 .207.168.375.375.375Zm0-3.75h1.5a.375.375 0 0 0 .375-.375v-1.5A.375.375 0 0 0 4.875 9h-1.5A.375.375 0 0 0 3 9.375v1.5c0 .207.168.375.375.375Zm4.125 0a.75.75 0 0 0 0 1.5h9a.75.75 0 0 0 0-1.5h-9Z","clip-rule":"evenodd"})])}function gb(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M3.792 2.938A49.069 49.069 0 0 1 12 2.25c2.797 0 5.54.236 8.209.688a1.857 1.857 0 0 1 1.541 1.836v1.044a3 3 0 0 1-.879 2.121l-6.182 6.182a1.5 1.5 0 0 0-.439 1.061v2.927a3 3 0 0 1-1.658 2.684l-1.757.878A.75.75 0 0 1 9.75 21v-5.818a1.5 1.5 0 0 0-.44-1.06L3.13 7.938a3 3 0 0 1-.879-2.121V4.774c0-.897.64-1.683 1.542-1.836Z","clip-rule":"evenodd"})])}function gq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M1.5 4.5a3 3 0 0 1 3-3h1.372c.86 0 1.61.586 1.819 1.42l1.105 4.423a1.875 1.875 0 0 1-.694 1.955l-1.293.97c-.135.101-.164.249-.126.352a11.285 11.285 0 0 0 6.697 6.697c.103.038.25.009.352-.126l.97-1.293a1.875 1.875 0 0 1 1.955-.694l4.423 1.105c.834.209 1.42.959 1.42 1.82V19.5a3 3 0 0 1-3 3h-2.25C8.552 22.5 1.5 15.448 1.5 6.75V4.5Z","clip-rule":"evenodd"})])}function R3(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 0 1-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 0 1-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 0 1-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584ZM12 18a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"})])}function vq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M8.128 9.155a3.751 3.751 0 1 1 .713-1.321l1.136.656a.75.75 0 0 1 .222 1.104l-.006.007a.75.75 0 0 1-1.032.157 1.421 1.421 0 0 0-.113-.072l-.92-.531Zm-4.827-3.53a2.25 2.25 0 0 1 3.994 2.063.756.756 0 0 0-.122.23 2.25 2.25 0 0 1-3.872-2.293ZM13.348 8.272a5.073 5.073 0 0 0-3.428 3.57 5.08 5.08 0 0 0-.165 1.202 1.415 1.415 0 0 1-.707 1.201l-.96.554a3.751 3.751 0 1 0 .734 1.309l13.729-7.926a.75.75 0 0 0-.181-1.374l-.803-.215a5.25 5.25 0 0 0-2.894.05l-5.325 1.629Zm-9.223 7.03a2.25 2.25 0 1 0 2.25 3.897 2.25 2.25 0 0 0-2.25-3.897ZM12 12.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z","clip-rule":"evenodd"}),T("path",{d:"M16.372 12.615a.75.75 0 0 1 .75 0l5.43 3.135a.75.75 0 0 1-.182 1.374l-.802.215a5.25 5.25 0 0 1-2.894-.051l-5.147-1.574a.75.75 0 0 1-.156-1.367l3-1.732Z"})])}function bq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{d:"M5.507 4.048A3 3 0 0 1 7.785 3h8.43a3 3 0 0 1 2.278 1.048l1.722 2.008A4.533 4.533 0 0 0 19.5 6h-15c-.243 0-.482.02-.715.056l1.722-2.008Z"}),T("path",{"fill-rule":"evenodd",d:"M1.5 10.5a3 3 0 0 1 3-3h15a3 3 0 1 1 0 6h-15a3 3 0 0 1-3-3Zm15 0a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Zm2.25.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM4.5 15a3 3 0 1 0 0 6h15a3 3 0 1 0 0-6h-15Zm11.25 3.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5ZM19.5 18a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z","clip-rule":"evenodd"})])}function xq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{d:"M4.08 5.227A3 3 0 0 1 6.979 3H17.02a3 3 0 0 1 2.9 2.227l2.113 7.926A5.228 5.228 0 0 0 18.75 12H5.25a5.228 5.228 0 0 0-3.284 1.153L4.08 5.227Z"}),T("path",{"fill-rule":"evenodd",d:"M5.25 13.5a3.75 3.75 0 1 0 0 7.5h13.5a3.75 3.75 0 1 0 0-7.5H5.25Zm10.5 4.5a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm3.75-.75a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0Z","clip-rule":"evenodd"})])}function yq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{d:"M6 3a3 3 0 0 0-3 3v1.5a.75.75 0 0 0 1.5 0V6A1.5 1.5 0 0 1 6 4.5h1.5a.75.75 0 0 0 0-1.5H6ZM16.5 3a.75.75 0 0 0 0 1.5H18A1.5 1.5 0 0 1 19.5 6v1.5a.75.75 0 0 0 1.5 0V6a3 3 0 0 0-3-3h-1.5ZM12 8.25a3.75 3.75 0 1 0 0 7.5 3.75 3.75 0 0 0 0-7.5ZM4.5 16.5a.75.75 0 0 0-1.5 0V18a3 3 0 0 0 3 3h1.5a.75.75 0 0 0 0-1.5H6A1.5 1.5 0 0 1 4.5 18v-1.5ZM21 16.5a.75.75 0 0 0-1.5 0V18a1.5 1.5 0 0 1-1.5 1.5h-1.5a.75.75 0 0 0 0 1.5H18a3 3 0 0 0 3-3v-1.5Z"})])}function Cq(e,t){return Re(),Oe("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon"},[T("path",{"fill-rule":"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z","clip-rule":"evenodd"})])}function z3(e){let t="",o=new Uint8Array(e),n=o.byteLength;for(let r=0;r {const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o});r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("p",null,[F("经过多轮测试,")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏设备体验不佳,模块无法对其进行很好的适配,不推荐在大屏设备下使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("~")]),positiveText:"已了解该应用可能不兼容"})},"com.qiyi.video":e=>{const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="https://caiyun.139.com/m/i?135ClWdvL9xtB";r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[" ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏体验下欠佳,在大屏设备下更推荐使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("爱奇艺PAD(com.qiyi.video.pad)")])," ",F("~")]),x("p",null,[F("下载地址:")]),x("p",null,[a])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${a}`)},onNegativeClick:()=>{}})},"com.hunantv.imgo.activity":e=>{const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="https://caiyun.139.com/m/i?135CmUTZaefoj";r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[" ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏体验下欠佳,在大屏设备下更推荐使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("芒果TV HD(com.imgo.pad)")])," ",F("~")]),x("p",null,[F("下载地址:")]),x("p",null,[a])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${a}`)},onNegativeClick:()=>{}})},"com.taobao.idlefish":e=>{const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o});r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("p",null,[" ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏设备体验不佳,模块无法对其进行很好的适配,模块更推荐在")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("居中布局")])," ",F("下使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("~")]),positiveText:"已了解该应用可能不兼容"})},"cn.cntv":e=>{const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="https://caiyun.139.com/m/i?135CmUTNrzYNh";r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[" ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏体验下欠佳,在大屏设备下更推荐使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("央视影音 HD(cn.cntvhd)")])," ",F("~")]),x("p",null,[F("下载地址:")]),x("p",null,[a])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${a}`)},onNegativeClick:()=>{}})},"com.sohu.sohuvideo":e=>{const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="https://caiyun.139.com/m/i?135ClWdevpbAN";r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[" ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏体验下欠佳,在大屏设备下更推荐使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("搜狐视频 HD(com.sohu.tv)")])," ",F("~")]),x("p",null,[F("下载地址:")]),x("p",null,[a])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${a}`)},onNegativeClick:()=>{}})},"com.sinyee.babybus.recommendapp":e=>{const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="https://caiyun.139.com/m/i?135ClqWyzHNVM";r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[" ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏体验下欠佳,在大屏设备下更推荐使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("宝宝巴士 HD(com.bb.happykids)")])," ",F("~")]),x("p",null,[F("下载地址:")]),x("p",null,[a])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${a}`)},onNegativeClick:()=>{}})},"com.CDA.StructureMaster":e=>{const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="https://caiyun.139.com/m/i?135ClqS1uhW8p";r.create({title:"应用不兼容感知",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[" ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在大屏体验下欠佳,在大屏设备下更推荐使用")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("结构大师 HD(com.CDAStudio.StructureMasterHD)")])," ",F("~")]),x("p",null,[F("下载地址:")]),x("p",null,[a])]),positiveText:"复制下载链接到剪切板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(`${a}`)},onNegativeClick:()=>{}})}},ba={"com.coolapk.market":{isShow(){const e=ht();return!!(e.deviceCharacteristics==="tablet"&&e.MIOSVersion&&e.MIOSVersion===2)},onClick(e){const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="eNqtVk1zGjEM/S977GQ8mfZC6IlC6SWkBBJ61noFq8Fre2wvDM3kv1deEj5mgDVpLra8q2dZsp6sl0xDhVk3k6YS0hgFdikqcEsM2U0mKxuy7tebDKus+3JR1S/JTlHNewXYQCvWC65G/m4VhQkEMln3Vnx7+zAGcpNand5NrAjXLJMWIx56kvejsOl+uTmnW3t0qzvxzNPUgsTZXQJImwLFYMNOkXxgeQwLTIB5BCdLMa0tG2vkCfpahQRoDh7FlCqrsKdsCQmQOWIhhjwMMACpd8SscwED1lag2Rsnnu3CQYGj7TLR3qojKnaIpnVeURCjvZywwYHxnrXphuMVNhcYnb0nn2JLGh1ABjF0hPpqEGifCNmfzShl1uxXSiBUXlcNqhela0yNNgNaUHiC/AB1AbQwpvCM+hXnY1SSW2OSoXaYCCs2JWfIYFMm6ucgl7WNyuLHTkzAVeg9J4/olxAC6cU1bJmgVZtjyrQn/TbHI3zWSaofgeYkY2nT4uFgkXrQ5pB7ZS6i8La4tjSetbMGpSxwpWr+WpKizzPf93FsPl5K/rOQXBGg8wXZKvBckJspVXtYKzWVDlH3ilbMigo0YhbHbdwOM7gtAjGffurgQPO71GlF2dIEIx4nfX6RUk2cStw2zGONPibrEwXVbqipMA2F+w4h4LDWTyVz0rf7g64i7yNHxo5WINsvdI15M9+bRUKKK242xD0PrZrnCsqHykkLyLg1uHjvrPoOYYLHNPAU4x4p7j+F45/AtGtz6GORTKPzpaBzBMlPS7MeUOSk2zWZtbXGhYbU9HfXe84VLGKMHfJTN3bYj08/aXTdy+wbx3HG69bDSm4IUMb73JJjt+RWmIV3/Pfsre8dkf5DRSiz7t3t7Suf0LT11Sf9LchDrrDF/dMtOVsNGxvtYZVjUWDBVgpckYzfLMRlxcXnWCGU5IoxOM5ma3/zdlVjaA7K4+s/HRabjA==";r.create({title:"应用规则感知",type:"info",preset:"dialog",content(){const l=s=>m(sd,{code:s,class:"my-5 overflow-y-auto line-clamp-6",language:"Base64",wordWrap:!0});return x("div",null,[x("p",null,[F("模块已为")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," "," ",F("进行了更详尽的应用规则适配,您可以将此自定义规则通过")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("[应用横屏布局-从分享规则导入]")])," ",F("进行导入~")]),x(rt("n-button"),null,{default:()=>[F("223")]}),x("p",null,[F("Tips: 此规则需要搭配最新版的Hyper OS 2.0,老版本的 OS 2 可能由于小米BUG存在崩溃的问题。")]),l&&l(a)])},positiveText:"复制自定义规则到剪贴板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(a)},onNegativeClick:()=>{}})}},"tv.danmaku.bili":{isShow(){const e=ht();return!!(e.deviceCharacteristics==="tablet"&&e.MIOSVersion&&e.MIOSVersion===2)},onClick(e){const t=ht(),o=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:n,modal:r,notification:i}=It(["message","modal","notification"],{configProviderProps:o}),a="eNqVVd1v2kAM/1/StwndVjRpU95SUKtJoFFSdc9H4oDFfe3uAmNV//fZR4BCC13zkrPP/tnnz6fMSA1ZnsWVqKXRctmKGSrMelmlXczyfi8DneVP5+VqDHKmoAQTrM/y6FvoZcEpjCM0MLCKudnVbfryq+tv19+vi6wTmcqINsu/iK+9DEO5sOshrrCGA1DrnPXxtlWqxL9whD+R6KetesMtMZZoiioSVtw89vNPvcrqdJNuA0hfLYQmIXFDDJYuE2+nc6oxc6oNorFK2TWaucIQxe8Wq6WorAmtBnHP1GBLvEA5daxFwe+ztV0bZWUtHpkadtSIcM+5QD/WvgMDXqrLJhq5sh4jiNvucGP/XNbgWPTFLxmrxUhG8B/24khKOiechwY8mApCCvLkQF9Sk21cWB+crIANFYksmTyntc1m/3I6qeBkR/xXyRybqKxqtWF/aogSlUAt5yAGif2Dz48I60PUThyMbY1WVGAosKmQCGiQqAlRLw2/DnaytEroYgw1youWbIVSUZ+IsJAeyG+foshRKZkzBAVzyu/H1O/vixBelGbSipxKE7kBDFT819oa8YbkHp96mV6hbU0ZEJwfXNG/ExXFlvEA2u3UKWvRSxOQpoThvIX3E3d6HXQQpQ4jO0czpOfZ+bksRwBDwfaBPEzvftgxxsQ41n2rh8hRzlKRflvxB/a+OZeu3UFxHAjAW7ol4x6CbT01wI1CsyTj044xohlB4+cDaAlhSqdzj+Yaa2SIi83MYy1mytuWClOUxRCpC2kenPP+RJPqgFqDxoK4o1Ux2FE73S+Uy0bJOWfQQxuA5sFeKH932Drut5m360AG6HEjnC/izZY+PI1tWIrThFaGl7gvw9dV8/nivArRejaY+mZ7HstUCnvEZzZ1cTF2q4trhx/d0ArrkQpdLNGVoJqilo7QuqVGgHHjGAr0DOoaal6u1PoV85xkkgvzWCAu0NcT6eOmcO4nwem0JRupAjz/AySS7HI=";r.create({title:"应用规则感知",type:"info",preset:"dialog",content(){const l=s=>m(sd,{code:s,class:"my-5 overflow-y-auto line-clamp-6",language:"Base64",wordWrap:!0});return x("div",null,[x("p",null,[F("小米已为")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," "," ",F("适配了应用布局优化,您可以将此自定义规则通过")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("[应用横屏布局-从分享规则导入]")])," ",F("进行导入并开启")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(e.name,e.applicationName)])," ",F("在")," ",x("span",{class:`font-bold ${t.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用布局优化")])," ",F("的开关,即可体验~")]),x("p",null,[F("Tips: 此规则需要搭配最新版的Hyper OS 2.0,老版本的 OS 2 可能由于小米BUG存在较为严重的内存泄露问题,会导致系统越来越卡顿。")]),l&&l(a)])},positiveText:"复制自定义规则到剪贴板",negativeText:"取消",onPositiveClick:()=>{navigator.clipboard.writeText(a)},onNegativeClick:()=>{}})}}},wq={class:"mb-10"},Sq={class:"mt-3"},Fq={class:"mb-3 px-4 sm:px-0"},Eq={class:"flex flex-wrap"},kq={class:"flex"},_q={class:"flex"},Mq=ye({__name:"HomeView",setup(e){const t=A(""),o=hb(),n=ht(),r=Us(),i=di(),a=A(!1),l=A(!1),s=A(null),u=A(null),d=A(null),c=D(()=>({theme:n.isDarkMode?Bt:Ft})),{message:h,modal:f,notification:p}=It(["message","modal","notification"],{configProviderProps:c}),g=L(),v=A(!1),b=A(null);function C(I){return()=>m(Zt,null,{default:()=>m(I)})}const k=async()=>{const[I,R]=await Me(o.getList());I&&f.create({title:"获取失败",type:"warning",preset:"dialog",content:()=>x("p",null,[F("您的系统环境暂不支持该功能,获取失败~")]),negativeText:"确定"}),R&&f.create({title:"获取成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("好耶OwO,已重新获取当前已安装的应用名称~")]),negativeText:"确定"})},w=()=>{r.filterInstalledApps=!r.filterInstalledApps};lt(()=>r.isNeedShowErrorModal,(I,R)=>{I&&(v.value=!0)},{immediate:!1});const _=async()=>{await n.getAndroidApplicationPackageNameList(),await r.initDefault()},M=async()=>{t.value="";const[,I]=await Me(new Promise((R,O)=>{f.create({title:"请粘贴分享规则口令",preset:"dialog",style:"min-width:500px; width:50%;",content:()=>m(rn,{type:"textarea",value:t.value,"onUpdate:value":oe=>{t.value=oe},autosize:{minRows:8,maxRows:8},placeholder:"在此处粘贴分享规则口令"}),positiveText:"确定提交",negativeText:"取消导入",onPositiveClick(){R("positiveClick")}})}));if(I){a.value=!0;const R=t.value,O=m3(R);if(!(O!=null&&O.length)){f.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("导入分享规则失败了QwQ,解析")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("自定义规则")])," ",F("口令发生错误,无法正常解析。")]),negativeText:"确定"}),a.value=!1;return}try{const oe=A3(O),y=Va.inflate(oe,{to:"string"}),j=JSON.parse(y);if(j.type!=="embedded"){f.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("导入分享规则失败了QwQ,该")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("自定义规则")])," ",F("不适用于应用横屏布局。")]),negativeText:"确定"}),a.value=!1;return}if(j.device==="pad"&&n.deviceCharacteristics!=="tablet"||j.device==="fold"&&n.deviceCharacteristics==="tablet"){f.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("导入分享规则失败了QwQ,平板和折叠屏的适配规则不能混用哦~")]),negativeText:"确定"}),a.value=!1;return}if(j.comp===1&&n.MIOSVersion&&n.MIOSVersion>1){f.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("导入分享规则失败了QwQ,该")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("自定义规则")])," ",F("仅兼容Android 13 - 14 的小米机型。")]),negativeText:"确定"}),a.value=!1;return}if(j.comp===2&&(!n.MIOSVersion||n.MIOSVersion<2)){f.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("导入分享规则失败了QwQ,该")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("自定义规则")])," ",F("仅兼容Hyper OS 2+的小米机型。")]),negativeText:"确定"}),a.value=!1;return}r.customConfigEmbeddedRulesList[j.name]=j.em,r.customConfigFixedOrientationList[j.name]=j.fo,n.MIOSVersion&&n.MIOSVersion>=2?(j.thirdPartyAppOptimize?r.customThirdPartyAppOptimizeConfig[j.name]=Dr(j.mode):r.sourceThirdPartyAppOptimizeConfig[j.name]?r.customThirdPartyAppOptimizeConfig[j.name]=-1:delete r.customThirdPartyAppOptimizeConfig[j.name],r.customConfigEmbeddedSettingConfig[j.name]={name:j.name,...m0(r.customConfigEmbeddedRulesList[j.name],r.customConfigFixedOrientationList[j.name],j.mode)}):r.systemEmbeddedSettingConfig[j.name]={name:j.name,embeddedEnable:!!["embedded","fullScreen"].includes(j.mode)};const[X,le]=await Me(wa({...n.MIOSVersion&&n.MIOSVersion>=2?{customThirdPartyAppOptimizeConfigProp:bl(r.customThirdPartyAppOptimizeConfig),thirdPartyAppOptimizeConfigRunnerShell:xl(r.mergeThirdPartyAppOptimizeConfig)}:void 0,isPatchMode:r.isPatchMode,patchEmbeddedRulesListXML:ct(r.patchEmbeddedRulesList,"package","package_config"),patchFixedOrientationListXML:ct(r.patchFixedOrientationList,"package","package_config"),patchEmbeddedSettingConfigXML:ct(r.patchEmbeddedSettingConfig,"setting","setting_rule"),customEmbeddedRulesListXML:ct(r.customConfigEmbeddedRulesList,"package",void 0),customFixedOrientationListXML:ct(r.customConfigFixedOrientationList,"package",void 0),...n.MIOSVersion&&n.MIOSVersion>=2?{settingConfigXML:ct(r.customConfigEmbeddedSettingConfig,"setting",void 0)}:{settingConfigXML:ct(r.systemEmbeddedSettingConfig,"setting","setting_rule")},...n.MIOSVersion&&n.MIOSVersion>=2?{setAppMode:{name:j.name,action:Dr(j.mode)}}:{switchAction:{name:j.name,action:["embedded","fullScreen"].includes(j.mode)?"enable":"disable"}}}));X?(f.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,导入失败了QwQ,详细错误请查看错误日志~")])}),a.value=!1):(r.updateMergeRuleList(),await _(),a.value=!1,f.create({title:"导入分享规则成功",type:"success",preset:"dialog",content:()=>n.MIOSVersion&&n.MIOSVersion>=2?x("p",null,[F("好耶w,")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(j.name,n.installedAppNameList[j.name]||r.applicationName[j.name])])," ",F("的应用导入成功了OwO~如果应用更新后的规则不生效,可以尝试重启平板再做尝试~")]):x("p",null,[F("好耶w,")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(j.name,n.installedAppNameList[j.name]||r.applicationName[j.name])])," ",F("的应用导入成功了OwO~如果应用更新后的规则不生效,可以尝试重启平板并且在")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平板专区-平行窗口")])," ",F("内")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[["embedded","fullScreen"].includes(j.mode)?"打开":"关闭"])," ",F("该应用的开关再做尝试~")]),positiveText:"确定"}))}catch{f.create({title:"导入分享规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("解析分享规则失败了QwQ,请检查导入口令是否有误")]),negativeText:"确定"}),a.value=!1}}},E=Nt({page:1,pageSize:10,simple:!0,showSizePicker:!0,onChange:I=>{E.page=I},onUpdatePageSize:I=>{E.pageSize=I,E.page=1}}),P=A(!1),z=async()=>{l.value=!0,await _();const[I,R]=await Me(rc("miui_embedding_window"));I&&(f.create({title:"热重载应用数据失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("热重载应用数据失败了QwQ,详情请查看错误日志~")]),negativeText:"确定"}),l.value=!1),R&&(f.create({title:"热重载应用数据成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("好耶w,已经重新为你载入包括自定义规则在内的应用数据~")]),positiveText:"确定"}),l.value=!1)},$=async()=>{await n.getAndroidApplicationPackageNameList(),P.value=!0;const[I,R]=await Me(wa({...n.MIOSVersion&&n.MIOSVersion>=2?{customThirdPartyAppOptimizeConfigProp:bl(r.customThirdPartyAppOptimizeConfig),thirdPartyAppOptimizeConfigRunnerShell:xl(r.mergeThirdPartyAppOptimizeConfig)}:void 0,isPatchMode:r.isPatchMode,patchEmbeddedRulesListXML:ct(r.patchEmbeddedRulesList,"package","package_config"),patchFixedOrientationListXML:ct(r.patchFixedOrientationList,"package","package_config"),patchEmbeddedSettingConfigXML:ct(r.patchEmbeddedSettingConfig,"setting","setting_rule"),customEmbeddedRulesListXML:ct(r.customConfigEmbeddedRulesList,"package",void 0),customFixedOrientationListXML:ct(r.customConfigFixedOrientationList,"package",void 0),...n.MIOSVersion&&n.MIOSVersion>=2?{settingConfigXML:ct(r.customConfigEmbeddedSettingConfig,"setting",void 0)}:{settingConfigXML:ct(r.systemEmbeddedSettingConfig,"setting","setting_rule")}}));I?(f.create({title:"操作失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,更新失败了QwQ,详细错误请查看错误日志~")])}),P.value=!1):(r.updateMergeRuleList(),P.value=!1,f.create({title:"操作成功",type:"success",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("好耶w,已根据您设备当前的整体应用情况重新")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("修剪模块应用适配列表")])," ",F(",后续每次更新模块或者安装新的应用后,建议重新操作")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("生成定制应用数据")])," ",F("。")])]),negativeText:"确定"}))},G=async()=>{if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备,暂时不兼容折叠屏设备,请等待后续更新情况!")])}),i.info("应用横屏布局-添加应用","该功能仅兼容平板设备,暂时不兼容折叠屏设备,请等待后续更新情况!");return}if(u.value){const[I,R]=await Me(u.value.openDrawer());if(I)console.log("操作取消:",I);else{n.MIOSVersion&&n.MIOSVersion>=2&&(R.thirdPartyAppOptimize?r.customThirdPartyAppOptimizeConfig[R.name]=Dr(R.settingMode):r.sourceThirdPartyAppOptimizeConfig[R.name]?r.customThirdPartyAppOptimizeConfig[R.name]=-1:delete r.customThirdPartyAppOptimizeConfig[R.name]),R.settingMode==="fullScreen"&&(R.modePayload.fullRule&&(r.customConfigEmbeddedRulesList[R.name]={name:R.name,fullRule:R.modePayload.fullRule,...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{}}),r.customConfigFixedOrientationList[R.name]={name:R.name,...R.modePayload.isShowDivider?{isShowDivider:!0}:{},...R.modePayload.skipSelfAdaptive&&(!n.MIOSVersion||n.MIOSVersion<2)?{disable:!0}:{},...R.modePayload.supportFullSize?{supportFullSize:!0}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{supportModes:"full,fo"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{defaultSettings:"full"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{}}),R.settingMode==="fixedOrientation"&&(r.customConfigFixedOrientationList[R.name]={name:R.name,...n.MIOSVersion&&n.MIOSVersion>=2?{supportModes:"full,fo"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{defaultSettings:"fo"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{},...R.modePayload.ratio!==void 0?{ratio:R.modePayload.ratio}:{},...R.modePayload.foRelaunch!==void 0?{relaunch:R.modePayload.foRelaunch}:{}}),R.settingMode==="disabled"&&(r.customConfigFixedOrientationList[R.name]={name:R.name,disable:!0,...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{},...R.modePayload.foRelaunch!==void 0?{relaunch:R.modePayload.foRelaunch}:{}}),n.MIOSVersion&&n.MIOSVersion>=2?r.customConfigEmbeddedSettingConfig[R.name]={name:R.name,...m0(r.customConfigEmbeddedRulesList[R.name],r.customConfigFixedOrientationList[R.name],R.settingMode)}:r.systemEmbeddedSettingConfig[R.name]={name:R.name,embeddedEnable:!!["embedded","fullScreen"].includes(R.settingMode)};const[O,oe]=await Me(wa({...n.MIOSVersion&&n.MIOSVersion>=2?{customThirdPartyAppOptimizeConfigProp:bl(r.customThirdPartyAppOptimizeConfig),thirdPartyAppOptimizeConfigRunnerShell:xl(r.mergeThirdPartyAppOptimizeConfig)}:void 0,isPatchMode:r.isPatchMode,patchEmbeddedRulesListXML:ct(r.patchEmbeddedRulesList,"package","package_config"),patchFixedOrientationListXML:ct(r.patchFixedOrientationList,"package","package_config"),patchEmbeddedSettingConfigXML:ct(r.patchEmbeddedSettingConfig,"setting","setting_rule"),customEmbeddedRulesListXML:ct(r.customConfigEmbeddedRulesList,"package",void 0),customFixedOrientationListXML:ct(r.customConfigFixedOrientationList,"package",void 0),...n.MIOSVersion&&n.MIOSVersion>=2?{settingConfigXML:ct(r.customConfigEmbeddedSettingConfig,"setting",void 0)}:{settingConfigXML:ct(r.systemEmbeddedSettingConfig,"setting","setting_rule")},...n.MIOSVersion&&n.MIOSVersion>=2?{setAppMode:{name:R.name,action:Dr(R.settingMode)}}:{switchAction:{name:R.name,action:["embedded","fullScreen"].includes(R.settingMode)?"enable":"disable"}}}));O?(f.create({title:"应用添加失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,更新失败了QwQ,详细错误请查看错误日志~")])}),R.loadingCallback&&R.loadingCallback()):(f.create({title:"应用添加成功",type:"success",preset:"dialog",content:()=>n.MIOSVersion&&n.MIOSVersion>=2?x("p",null,[F("好耶w,")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(R.name,n.installedAppNameList[R.name]||r.applicationName[R.name])])," ",F("的应用配置添加成功了OwO~如果应用添加后的规则不生效,可以尝试重启平板再做尝试~")]):x("p",null,[F("好耶w,")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(R.name,n.installedAppNameList[R.name]||r.applicationName[R.name])])," ",F("的应用配置添加成功了OwO~如果应用添加后的规则不生效,可以尝试重启平板并且在")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平板专区-平行窗口")])," ",F("内")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[["embedded","fullScreen"].includes(R.settingMode)?"打开":"关闭"])," ",F("该应用的开关再做尝试~")])}),r.updateMergeRuleList(),R.loadingCallback&&R.loadingCallback(),R.closeCallback&&R.closeCallback())}}},H=async(I,R)=>{var O;if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备,暂时不兼容折叠屏设备,请等待后续更新情况!")])}),i.info("应用横屏布局-添加应用","该功能仅兼容平板设备,暂时不兼容折叠屏设备,请等待后续更新情况!");return}if(r.systemAppOptimizeConfig[I.name]&&n.MIOSVersion&&n.MIOSVersion>=2){f.create({title:"该应用已受模块保护",type:"warning",preset:"dialog",content:()=>x("p",null,[F("为确保")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(I.name,I.applicationName)])," ",F("正常横屏工作,模块已保护该应用不允许修改任何配置,如需修改请先前往")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("模块设置")])," ",F("禁用")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("系统应用横屏优化")])," ",F("。")])});return}if(va[I.name]&&va[I.name]&&va[I.name](I),d.value){const[oe,y]=await Me(d.value.openDrawer(I));if(oe)console.log("操作取消:",oe);else{if(n.MIOSVersion&&n.MIOSVersion>=2&&(y.thirdPartyAppOptimize?r.customThirdPartyAppOptimizeConfig[y.name]=Dr(y.settingMode):r.sourceThirdPartyAppOptimizeConfig[y.name]?r.customThirdPartyAppOptimizeConfig[y.name]=-1:delete r.customThirdPartyAppOptimizeConfig[y.name]),y.settingMode==="fullScreen"){const{moduleEmbeddedRules:le,currentEmbeddedRules:ae,moduleFixedOrientation:Fe,currentFixedOrientation:fe}=Fl(I.name);ae.value?(y.modePayload.fullRule&&(ae.value.fullRule=y.modePayload.fullRule,ae.value.skipSelfAdaptive=!0),n.MIOSVersion&&n.MIOSVersion>=2&&!y.modePayload.fullRule&&ae.value.fullRule&&delete ae.value.fullRule,fa(le.value,ae.value)||(r.customConfigEmbeddedRulesList[I.name]={name:I.name,...ae.value})):y.modePayload.fullRule?r.customConfigEmbeddedRulesList[I.name]={name:I.name,fullRule:y.modePayload.fullRule,...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{}}:n.MIOSVersion&&n.MIOSVersion>=2&&(r.customConfigEmbeddedRulesList[I.name]={name:I.name,skipSelfAdaptive:!0}),fe.value?(y.modePayload.hasOwnProperty("isShowDivider")&&(fe.value.isShowDivider=y.modePayload.isShowDivider),y.modePayload.hasOwnProperty("supportFullSize")&&(fe.value.supportFullSize=y.modePayload.supportFullSize),n.MIOSVersion&&n.MIOSVersion>=2?(fe.value.hasOwnProperty("disable")&&(delete fe.value.disable,fe.value.supportModes="full,fo",fe.value.defaultSettings="full"),fe.value.hasOwnProperty("compatChange")&&delete fe.value.compatChange):y.modePayload.hasOwnProperty("skipSelfAdaptive")&&(fe.value.disable=y.modePayload.skipSelfAdaptive),fa(Fe.value,fe.value)||(r.customConfigFixedOrientationList[I.name]={name:I.name,...fe.value})):r.customConfigFixedOrientationList[I.name]={name:I.name,...y.modePayload.isShowDivider?{isShowDivider:!0}:{},...y.modePayload.skipSelfAdaptive&&(!n.MIOSVersion||n.MIOSVersion<2)?{disable:!0}:{},...y.modePayload.supportFullSize?{supportFullSize:!0}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{supportModes:"full,fo"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{defaultSettings:"full"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{}}}if(y.settingMode==="fixedOrientation"){const{moduleEmbeddedRules:le,currentEmbeddedRules:ae,moduleFixedOrientation:Fe,currentFixedOrientation:fe}=Fl(I.name);if(fe.value){if(fe.value.hasOwnProperty("disable")&&delete fe.value.disable,fe.value.hasOwnProperty("isScale")&&delete fe.value.isScale,y.modePayload.ratio!==void 0?fe.value.ratio=y.modePayload.ratio:delete fe.value.ratio,y.modePayload.foRelaunch!==void 0?fe.value.relaunch=y.modePayload.foRelaunch:delete fe.value.relaunch,n.MIOSVersion&&n.MIOSVersion>=2)if(fe.value.supportModes="full,fo",fe.value.defaultSettings="fo",fe.value.skipSelfAdaptive=!0,y.modePayload.hasOwnProperty("forceFixedOrientation")&&y.modePayload.forceFixedOrientation)if(fe.value.compatChange){const ie=new Set((O=fe.value.compatChange)==null?void 0:O.split(","));ie.add("OVERRIDE_UNDEFINED_ORIENTATION_TO_PORTRAIT"),fe.value.compatChange=[...ie].join(",")}else fe.value.compatChange="OVERRIDE_UNDEFINED_ORIENTATION_TO_PORTRAIT";else fe.value.hasOwnProperty("compatChange")&&delete fe.value.compatChange;fa(Fe.value,fe.value)||(r.customConfigFixedOrientationList[I.name]={name:I.name,...fe.value})}else r.customConfigFixedOrientationList[I.name]={name:I.name,...n.MIOSVersion&&n.MIOSVersion>=2?{supportModes:"full,fo"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{defaultSettings:"fo"}:{},...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{},...n.MIOSVersion&&n.MIOSVersion>=2&&y.modePayload.forceFixedOrientation?{compatChange:"OVERRIDE_UNDEFINED_ORIENTATION_TO_PORTRAIT"}:{},...y.modePayload.ratio!==void 0?{ratio:y.modePayload.ratio}:{},...y.modePayload.foRelaunch!==void 0?{relaunch:y.modePayload.foRelaunch}:{}}}if(y.settingMode==="disabled"&&I.settingMode!==y.settingMode){const{moduleEmbeddedRules:le,currentEmbeddedRules:ae,moduleFixedOrientation:Fe,currentFixedOrientation:fe}=Fl(I.name);fe.value?(fe.value.skipSelfAdaptive=!0,fe.value.disable=!0,fe.value.hasOwnProperty("compatChange")&&delete fe.value.compatChange,fa(Fe.value,fe.value)||(r.customConfigFixedOrientationList[I.name]={name:I.name,...fe.value})):r.customConfigFixedOrientationList[I.name]={name:I.name,disable:!0,...n.MIOSVersion&&n.MIOSVersion>=2?{skipSelfAdaptive:!0}:{}}}if(y.settingMode==="embedded"){if(I.settingMode!==y.settingMode&&I.ruleMode==="custom"&&I.isSupportEmbedded&&delete r.customConfigEmbeddedRulesList[I.name],r.customConfigEmbeddedRulesList[I.name])y.modePayload.hasOwnProperty("splitRatio")&&(r.customConfigEmbeddedRulesList[I.name].splitRatio=y.modePayload.splitRatio),y.modePayload.hasOwnProperty("relaunch")&&(r.customConfigEmbeddedRulesList[I.name].relaunch=y.modePayload.emRelaunch);else{let le=!1;y.modePayload.hasOwnProperty("splitRatio")&&(le=!0),y.modePayload.hasOwnProperty("emRelaunch")&&(le=!0),le&&(r.customConfigEmbeddedRulesList[I.name]={...r.isPatchMode?r.patchEmbeddedRulesList[I.name]:r.sourceEmbeddedRulesList[I.name],...y.modePayload.hasOwnProperty("splitRatio")&&{splitRatio:y.modePayload.splitRatio},...y.modePayload.hasOwnProperty("emRelaunch")&&{relaunch:y.modePayload.emRelaunch}})}if(n.MIOSVersion&&n.MIOSVersion>=2){const{moduleEmbeddedRules:le,currentEmbeddedRules:ae,moduleFixedOrientation:Fe,currentFixedOrientation:fe}=Fl(I.name);fe.value&&(fe.hasOwnProperty("disable")&&delete fe.value.disable,fe.hasOwnProperty("defaultSettings")&&delete fe.value.defaultSettings,fe.hasOwnProperty("skipSelfAdaptive")||(fe.value.skipSelfAdaptive=!0),fe.hasOwnProperty("compatChange")&&delete fe.value.compatChange),fe.value&&(ae.hasOwnProperty("skipSelfAdaptive")||(ae.value.skipSelfAdaptive=!0)),fa(le.value,ae.value)||(r.customConfigFixedOrientationList[I.name]={name:I.name,...fe.value}),fa(Fe.value,fe.value)||(r.customConfigEmbeddedRulesList[I.name]={name:I.name,...ae.value})}}if(n.MIOSVersion&&n.MIOSVersion>=2){const{moduleEmbeddedRules:le,currentEmbeddedRules:ae,moduleFixedOrientation:Fe,currentFixedOrientation:fe}=Fl(I.name);I.settingMode!==y.settingMode&&(r.customConfigEmbeddedSettingConfig[I.name]={name:I.name,...m0(ae.value,fe.value,y.settingMode)})}else r.systemEmbeddedSettingConfig[I.name]={name:I.name,embeddedEnable:!!["embedded","fullScreen"].includes(y.settingMode)};const[j,X]=await Me(wa({...n.MIOSVersion&&n.MIOSVersion>=2?{customThirdPartyAppOptimizeConfigProp:bl(r.customThirdPartyAppOptimizeConfig),thirdPartyAppOptimizeConfigRunnerShell:xl(r.mergeThirdPartyAppOptimizeConfig)}:void 0,isPatchMode:r.isPatchMode,patchEmbeddedRulesListXML:ct(r.patchEmbeddedRulesList,"package","package_config"),patchFixedOrientationListXML:ct(r.patchFixedOrientationList,"package","package_config"),patchEmbeddedSettingConfigXML:ct(r.patchEmbeddedSettingConfig,"setting","setting_rule"),customEmbeddedRulesListXML:ct(r.customConfigEmbeddedRulesList,"package",void 0),customFixedOrientationListXML:ct(r.customConfigFixedOrientationList,"package",void 0),...n.MIOSVersion&&n.MIOSVersion>=2?{settingConfigXML:ct(r.customConfigEmbeddedSettingConfig,"setting",void 0)}:{settingConfigXML:ct(r.systemEmbeddedSettingConfig,"setting","setting_rule")},...n.MIOSVersion&&n.MIOSVersion>=2?{setAppMode:{name:I.name,action:Dr(y.settingMode)}}:{switchAction:{name:I.name,action:["embedded","fullScreen"].includes(y.settingMode)?"enable":"disable"}}}));j?(f.create({title:"应用更新失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,更新失败了QwQ,详细错误请查看错误日志~")])}),y.loadingCallback&&y.loadingCallback()):(f.create({title:"应用更新成功",type:"success",preset:"dialog",content:()=>n.MIOSVersion&&n.MIOSVersion>=2?x("p",null,[F("好耶w,")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(I.name,I.applicationName)])," ",F("的应用配置更新成功了OwO~如果应用更新后的规则不生效,可以尝试重启平板再做尝试~")]):x("p",null,[F("好耶w,")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(I.name,I.applicationName)])," ",F("的应用配置更新成功了OwO~如果应用更新后的规则不生效,可以尝试重启平板并且在")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("平板专区-平行窗口")])," ",F("内")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[["embedded","fullScreen"].includes(y.settingMode)?"打开":"关闭"])," ",F("该应用的开关再做尝试~")])}),r.updateMergeRuleList(),y.loadingCallback&&y.loadingCallback(),y.closeCallback&&y.closeCallback())}}},q=async(I,R,O,oe)=>{if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备,不兼容折叠屏设备!")])}),i.info("应用横屏布局-添加应用","该功能仅兼容平板设备,不兼容折叠屏设备!");return}if(I==="cleanCustomRule"){const y=f.create({title:"想清除自定义规则吗?",type:"warning",preset:"dialog",content:()=>x("p",null,[F("清除自定义规则后,你对")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(O.name,O.applicationName)])," ",F("所做的所有自定义配置将丢失,如果该应用同时还存在")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("模块规则")])," ",F(",将会还原回模块自身的适配规则。确定要继续吗?")]),positiveText:"确定清除",negativeText:"我再想想",onPositiveClick:async()=>{y.loading=!0,r.customConfigEmbeddedRulesList[O.name]&&delete r.customConfigEmbeddedRulesList[O.name],r.customConfigFixedOrientationList[O.name]&&delete r.customConfigFixedOrientationList[O.name],r.customConfigEmbeddedSettingConfig[O.name]&&delete r.customConfigEmbeddedSettingConfig[O.name],r.customThirdPartyAppOptimizeConfig[O.name]&&delete r.customThirdPartyAppOptimizeConfig[O.name];const[j,X]=await Me(wa({...n.MIOSVersion&&n.MIOSVersion>=2?{customThirdPartyAppOptimizeConfigProp:bl(r.customThirdPartyAppOptimizeConfig),thirdPartyAppOptimizeConfigRunnerShell:xl(r.mergeThirdPartyAppOptimizeConfig)}:void 0,isPatchMode:r.isPatchMode,patchEmbeddedRulesListXML:ct(r.patchEmbeddedRulesList,"package","package_config"),patchFixedOrientationListXML:ct(r.patchFixedOrientationList,"package","package_config"),patchEmbeddedSettingConfigXML:ct(r.patchEmbeddedSettingConfig,"setting","setting_rule"),customEmbeddedRulesListXML:ct(r.customConfigEmbeddedRulesList,"package",void 0),customFixedOrientationListXML:ct(r.customConfigFixedOrientationList,"package",void 0),...n.MIOSVersion&&n.MIOSVersion>=2?{settingConfigXML:ct(r.customConfigEmbeddedSettingConfig,"setting",void 0)}:{settingConfigXML:ct(r.systemEmbeddedSettingConfig,"setting","setting_rule")},...n.MIOSVersion&&n.MIOSVersion>=2?{setAppMode:{name:O.name,action:Dr(Wv(r.isPatchMode?r.patchEmbeddedRulesList[O.name]:r.sourceEmbeddedRulesList[O.name],r.isPatchMode?r.patchFixedOrientationList[O.name]:r.sourceFixedOrientationList[O.name]))}}:{switchAction:{name:O.name,action:(r.isPatchMode?r.patchEmbeddedRulesList[O.name]:r.sourceEmbeddedRulesList[O.name])?"enable":"disable"}}}));j?(f.create({title:"清除自定义规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,更新失败了QwQ,详细错误请查看错误日志~")])}),y.loading=!1):(f.create({title:"清除自定义规则成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("好耶w,清除自定义规则成功了OwO~如果应用更新后的规则不生效,可以尝试重启平板再试试~")])}),y.loading=!1,r.updateMergeRuleList())}})}if(I==="shareCustomRule"){const y={name:O.name,cmpt:n.MIOSVersion&&n.MIOSVersion>=2?2:1,em:{name:O.name,...O.embeddedRules},fo:{name:O.name,...O.fixedOrientationRule},type:"embedded",device:n.deviceCharacteristics==="tablet"?"pad":"fold",mode:O.settingMode,...n.MIOSVersion&&n.MIOSVersion>=2?{thirdPartyAppOptimize:O.thirdPartyAppOptimize}:void 0},j=JSON.stringify(y),X=Va.deflate(j,{level:9,memLevel:9,windowBits:15}),le=new Uint8Array(X),ae=z3(le),[Fe]=await Me(navigator.clipboard.writeText(`我分享了一个[应用横屏布局]的自定义规则,可以前往[完美横屏应用计划 For Web UI]导入: -${ae}`));if(Fe){f.create({title:"复制分享口令失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("复制")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(O.name,O.applicationName)])," ",F("的分享口令失败了QwQ,可能由于没有读取/写入剪切板的权限或")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("自定义规则")])," ",F("长度过大。")]),negativeText:"确定"});return}else f.create({title:"复制分享口令成功",type:"success",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("好耶w,复制")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(O.name,O.applicationName)])," ",F("分享口令成功了~")]),x("p",null,[F("如果没有复制成功,请确认是否给予了读取/写入剪切板的权限或")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("自定义规则")])," ",F("长度过大。")]),x("p",null,[F("分享口令导入入口位于")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("应用横屏布局- 从分享口令导入")])," ",F("。")])]),positiveText:"确定"})}},W=(I,R)=>{if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备,不兼容折叠屏设备!")])});return}f.create({title:"模块规则说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("模块已对")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(I.name,I.applicationName)])," ",F("配置了合适的适配规则,且不可被移除,仅有自定义规则可以被移除哦~")])})};function L(){return[{title:"应用名称",minWidth:250,key:"name",render(I,R){return x("div",null,[I.applicationName&&x("p",null,[I.applicationName]),I.name&&x("p",null,[x("span",{class:{hidden:!I.applicationName}},[F("(")]),I.name,x("span",{class:{hidden:!I.applicationName}},[F(")")])]),va[I.name]&&x(rt("n-button"),{class:"mt-1",size:"tiny",ghost:!0,type:"warning",onClick:()=>va[I.name]&&va[I.name](I)},{default:()=>[F("应用不兼容感知")]}),ba[I.name]&&ba[I.name].isShow&&ba[I.name].isShow()&&x(rt("n-button"),{class:"mt-1",size:"tiny",ghost:!0,type:"info",onClick:()=>ba[I.name]&&ba[I.name].onClick&&ba[I.name].onClick(I)},{default:()=>[F("应用规则感知")]})])}},{title:"规则来源",minWidth:100,key:"ruleMode",render(I,R){const O={icon:I.ruleMode==="custom"?mb:R3};if(I.ruleMode==="custom"){const oe=[{label:"分享自定义规则",key:"shareCustomRule",icon:C(fd)},{label:"清除自定义规则",key:"cleanCustomRule",icon:C(w9)}];return x(rt("n-dropdown"),{onSelect:(y,j)=>q(y,j,I),size:"large",trigger:"click",options:oe},{default:()=>[x(rt("n-button"),{size:"small",dashed:!0,type:"info"},{default:()=>[F("自定义规则")],...O})]})}return x(rt("n-button"),{size:"small",dashed:!0,type:"error",onClick:()=>W(I)},{default:()=>[F("模块规则")],...O})}},{title:"规则修复",minWidth:100,key:"setting",render(I,R){const O={icon:Cq},oe=(y,j)=>{f.create({title:"想修复应用规则吗?",type:"warning",preset:"dialog",content:()=>x("p",null,[F("由于系统BUG,部分情况下会导致应用当前适配与实际不符,模块可以主动修复")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(y.name,y.applicationName)])," ",F("由于系统错误的兼容性配置导致应用布局异常的问题,确定要继续吗?")]),positiveText:"确定修复",negativeText:"我再想想",onPositiveClick:async()=>{const[X,le]=await Me(M9(y.name));if(X)f.create({title:"修复应用规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,修复应用规则失败了QwQ,详细错误请查看错误日志~")])});else{if(n.MIOSVersion&&n.MIOSVersion>=2){const[ae,Fe]=await Me(Pj(y.name,Dr(y.settingMode)));ae&&(i.error("SetAppModeErr",ae),f.create({title:"修复应用规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,修复应用规则失败了QwQ,详细错误请查看错误日志~")])}))}else{const[ae,Fe]=await Me(Bj(y.name,["embedded","fullScreen"].includes(y.settingMode)?"enable":"disable"));ae&&(i.error("SwitchActionErr",ae),f.create({title:"修复应用规则失败",type:"error",preset:"dialog",content:()=>x("p",null,[F("发生异常错误,修复应用规则失败了QwQ,详细错误请查看错误日志~")])}))}f.create({title:"修复应用规则成功",type:"success",preset:"dialog",content:()=>x("p",null,[F("好耶w,修复")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[Pt(y.name,y.applicationName)])," ",F("的应用规则成功了OwO~")])})}}})};return x("div",null,[x(rt("n-button"),{size:"small",dashed:!0,type:"warning",onClick:()=>oe(I)},{default:()=>[F("规则修复")],...O})])}},{title:"当前规则",minWidth:100,key:"settingMode",render(I,R){const O={icon:pb},oe={embedded:{type:"success",name:"平行窗口",onClick(y,j){if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备,不兼容折叠屏设备!")])});return}H(y)}},fullScreen:{type:"info",name:"全屏",onClick(y,j){if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备不兼容折叠屏设备!")])});return}H(y)}},fixedOrientation:{type:"warning",name:"居中布局",onClick(y,j){if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备,不兼容折叠屏设备!")])});return}H(y)}},disabled:{type:"error",name:"原始布局",onClick(y,j){if(n.deviceCharacteristics!=="tablet"){f.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("p",null,[F("该功能仅兼容平板设备,不兼容折叠屏设备!")])});return}H(y)}}};return x(rt("n-button"),{size:"small",strong:!0,dashed:!0,type:oe[I.settingMode].type,onClick:()=>oe[I.settingMode].onClick(I,R)},{default:()=>[oe[I.settingMode].name],...O})}}]}return ut(()=>{kt(()=>{r.isNeedShowReloadPathModeDialog&&Rt(async()=>{const[,I]=await Me(new Promise((R,O)=>{f.create({title:"是否需要重新生成定制应用数据?",type:"info",preset:"dialog",content:()=>x("p",null,[F("检测到您最近已经更新了模块版本并且开启了")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("定制模式")])," ",F(",模块需要重新操作")," ",x("span",{class:`font-bold ${n.isDarkMode?"text-teal-400":"text-gray-600"}`},[F("生成定制应用数据")])," ",F(",确定要继续吗?")]),positiveText:"确定",negativeText:"取消",onPositiveClick(){R("success")},onNegativeClick(){O("cancel")},onMaskClick(){O("cancel")},onClose(){O("cancel")}})}));I&&$(),r.isNeedShowReloadPathModeDialog=!1,n.needReloadData=!1})})}),(I,R)=>{const O=rt("n-alert"),oe=rt("n-input-group"),y=rt("n-card");return Re(),Oe(ft,null,[T("main",wq,[T("div",Sq,[T("div",Fq,[R[12]||(R[12]=T("h3",{class:xe("text-base font-semibold leading-7")},[T("span",{class:"animated-bg bg-clip-text font-semibold text-transparent",style:{"background-image":`linear-gradient( + )`}},"完美横屏应用计划 For Web UI",2),Ge("",!0)]),T("div",Sj,[T("button",{onClick:h[3]||(h[3]=()=>S(i).warning("此区域尚未开放,请以后再来探索吧~")),type:"button",class:"m-2.5 p-2.5 text-gray-400 hover:text-gray-500"},h[11]||(h[11]=[T("span",{class:"sr-only"},"消息中心",-1),T("svg",{class:"icon h-7 w-7","aria-hidden":"true"},[T("use",{"xlink:href":"#icon-xiaoxi"})],-1)]))])])],2)]),T("main",null,[T("div",Fj,[Es(c.$slots,"default")])])])]))}}),k9=ye({__name:"ErrorModal",props:{modelValue:{type:Boolean},errorLogging:{}},setup(e,{emit:t}){const o=e;A(!1);const n=t,r=A(o.modelValue);lt(()=>o.modelValue,a=>{r.value=a});const i=()=>{n("update:modelValue",!1)};return(a,l)=>{const s=rt("n-alert"),u=rt("n-card"),d=rt("n-modal");return Re(),Tt(d,{onPositiveClick:i,onClose:i,style:{width:"600px"},title:"发生错误",type:"error","block-scroll":"true","positive-text":"确认",preset:"dialog","mask-closable":!0,show:o.modelValue},{default:K(()=>[x(u,{bordered:!1},{default:K(()=>[(Re(!0),Oe(ft,null,wi(o.errorLogging,c=>(Re(),Tt(s,{title:`[发生错误] ${c.type}`,class:"mb-5",type:"error"},{default:K(()=>[T("p",null,"错误描述:无法获取"+Ye(c.title),1),T("p",null,"错误详情:"+Ye(c.msg),1)]),_:2},1032,["title"]))),256))]),_:1})]),_:1},8,["show"])}}}),kj={class:"splash-screen"},_j=ye({__name:"SplashScreen",setup(e){return ht(),(t,o)=>(Re(),Oe("div",kj,o[0]||(o[0]=[T("div",{class:"flex h-full flex-col items-center justify-center"},[T("div",{class:"mt-[61px] bg-gradient-to-t from-[#242424] to-[#262626] bg-clip-text text-center text-[40px] font-[600] leading-[53px] text-black/50 mix-blend-color-burn tablet:mt-[75px] tablet:text-[64px] tablet:leading-[85px]"},"完美横屏应用计划"),T("div",{class:"mt-12 bg-gradient-to-t from-[#242424] to-[#262626] bg-clip-text text-center text-[20px] font-[600] leading-[27px] text-black/50 mix-blend-color-burn tablet:mt-[23px] tablet:text-[24px] tablet:font-[600] tablet:leading-[32px]"},"正在加载中,请稍等……")],-1)])))}}),_9=(e,t)=>{const o=e.__vccOpts||e;for(const[n,r]of t)o[n]=r;return o},Mj=_9(_j,[["__scopeId","data-v-1cac3c56"]]),Rj="modulepreload",zj=function(e){return"/"+e},n5={},kn=function(t,o,n){let r=Promise.resolve();if(o&&o.length>0){document.getElementsByTagName("link");const a=document.querySelector("meta[property=csp-nonce]"),l=(a==null?void 0:a.nonce)||(a==null?void 0:a.getAttribute("nonce"));r=Promise.allSettled(o.map(s=>{if(s=zj(s),s in n5)return;n5[s]=!0;const u=s.endsWith(".css"),d=u?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${s}"]${d}`))return;const c=document.createElement("link");if(c.rel=u?"stylesheet":Rj,u||(c.as="script"),c.crossOrigin="",c.href=s,l&&c.setAttribute("nonce",l),document.head.appendChild(c),u)return new Promise((h,f)=>{c.addEventListener("load",h),c.addEventListener("error",()=>f(new Error(`Unable to preload CSS for ${s}`)))})}))}function i(a){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=a,window.dispatchEvent(l),!l.defaultPrevented)throw a}return r.then(a=>{for(const l of a||[])l.status==="rejected"&&i(l.reason);return t().catch(i)})},Aj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/embedded_rules_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Pj=()=>{const e="cat /product/etc/embedded_rules_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Bj=(e,t)=>{const o=`cmd miui_embedding_window set-appMode ${e} ${t}`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):n(a)}}),o)},$j=(e,t)=>{const o=`cmd miui_embedding_window ${t} ${e}`;return ke(new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);i?r(l):n(a)}}),o)},Dj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/fixed_orientation_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Tj=()=>{const e="cat /product/etc/fixed_orientation_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Ij=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/embedded_rules_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Oj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/fixed_orientation_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Lj=()=>{const e="cat /data/system/users/0/embedded_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Hj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/embedded_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Nj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/embedded_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Vj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/os2_third_party_app_optimize/third_party_app_optimize.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Wj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/os2_system_app_optimize/system_app_optimize.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},jj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/third_party_app_optimize.prop";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},M9=e=>ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(`am compat reset-all ${e}`);n?o(i):t(r)}}),"resetApplicationCompats"),wa=e=>ke(new Promise(async(t,o)=>{{const n=[],r=[],i=ht();if(i.MIOSVersion&&i.MIOSVersion>=2){if(e.customThirdPartyAppOptimizeConfigProp){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.customThirdPartyAppOptimizeConfigProp}' > /data/adb/MIUI_MagicWindow+/config/third_party_app_optimize.prop`);p?n.push({type:"customThirdPartyAppOptimizeConfigProp",name:"[第三方应用横屏优化]第三方应用横屏优化配置文件",message:v}):r.push({type:"customThirdPartyAppOptimizeConfigProp",name:"[第三方应用横屏优化]第三方应用横屏优化配置文件",message:"更新成功"})}if(e.thirdPartyAppOptimizeConfigRunnerShell){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.thirdPartyAppOptimizeConfigRunnerShell}' > /data/adb/MIUI_MagicWindow+/config/third_party_app_optimize_runner.sh`);p?n.push({type:"thirdPartyAppOptimizeConfigRunnerShell",name:"[第三方应用横屏优化]第三方应用横屏优化运行脚本",message:v}):r.push({type:"thirdPartyAppOptimizeConfigRunnerShell",name:"[第三方应用横屏优化]第三方应用横屏优化运行脚本",message:"更新成功"})}}if(e.isPatchMode){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.patchEmbeddedRulesListXML}' > /data/adb/MIUI_MagicWindow+/patch_rule/embedded_rules_list.xml`);p?n.push({type:"patchEmbeddedRulesListXML",name:"[定制模式]平行窗口配置文件",message:v}):r.push({type:"patchEmbeddedRulesListXML",name:"[定制模式]平行窗口配置文件",message:"更新成功"});const{errno:b,stdout:C,stderr:k}=await Se(`echo '${e.patchFixedOrientationListXML}' > /data/adb/MIUI_MagicWindow+/patch_rule/fixed_orientation_list.xml`);if(b?n.push({type:"patchFixedOrientationListXML",name:"[定制模式]信箱模式配置文件",message:k}):r.push({type:"patchixedOrientationListXML",name:"[定制模式]信箱模式配置文件",message:"更新成功"}),i.MIOSVersion&&i.MIOSVersion>=2){const{errno:w,stdout:_,stderr:M}=await Se(`echo '${e.patchEmbeddedSettingConfigXML}' > /data/adb/MIUI_MagicWindow+/patch_rule/embedded_setting_config.xml`);w?n.push({type:"patchEmbeddedSettingConfigXML",name:"[定制模式]应用横屏布局配置文件",message:M}):r.push({type:"patchEmbeddedSettingConfigXML",name:"[定制模式]应用横屏布局配置文件",message:"更新成功"})}}const{errno:a,stdout:l,stderr:s}=await Se(`echo '${e.customEmbeddedRulesListXML}' > /data/adb/MIUI_MagicWindow+/config/embedded_rules_list.xml`);a?n.push({type:"customEmbeddedRulesListXML",name:"[自定义规则]平行窗口配置文件",message:s}):r.push({type:"customEmbeddedRulesListXML",name:"[自定义规则]平行窗口配置文件",message:"更新成功"});const{errno:u,stdout:d,stderr:c}=await Se(`echo '${e.customFixedOrientationListXML}' > /data/adb/MIUI_MagicWindow+/config/fixed_orientation_list.xml`);if(u?n.push({type:"customFixedOrientationListXML",name:"[自定义规则]信箱模式配置文件",message:c}):r.push({type:"customFixedOrientationListXML",name:"[自定义规则]信箱模式配置文件",message:"更新成功"}),i.MIOSVersion&&i.MIOSVersion>=2){const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.settingConfigXML}' > /data/adb/MIUI_MagicWindow+/config/embedded_setting_config.xml`);p?n.push({type:"settingConfigXML",name:"[自定义规则]应用横屏布局配置文件",message:v}):r.push({type:"settingConfigXML",name:"[自定义规则]应用横屏布局配置文件",message:"更新成功"})}else{const{errno:p,stdout:g,stderr:v}=await Se(`echo '${e.settingConfigXML}' > /data/system/users/0/embedded_setting_config.xml`);p?n.push({type:"settingConfigXML",name:"[系统]应用横屏布局配置文件",message:v}):r.push({type:"settingConfigXML",name:"[系统]应用横屏布局配置文件",message:"更新成功"})}if(e.setAppMode){const[p,g]=await Me(M9(e.setAppMode.name));p&&n.push({type:"resetApplicationCompat",name:"[模块]重置应用兼容性",message:p}),g&&r.push({type:"resetApplicationCompat",name:"[模块]重置应用兼容性",message:g})}const[h,f]=await Me(rc("miui_embedding_window"));if(h&&n.push({type:"updateMiuiEmbeddingWindowRule",name:"[模块]重新载入模块应用横屏布局规则",message:h}),f&&r.push({type:"updateMiuiEmbeddingWindowRule",name:"[模块]重新载入模块应用横屏布局配置文件",message:f.split(` +`)}),e.switchAction){const{errno:p,stdout:g,stderr:v}=await Se(`cmd miui_embedding_window ${e.switchAction.action} ${e.switchAction.name}`);p?n.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.switchAction.action}的设置`,message:v}):r.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.switchAction.action}的设置`,message:g})}if(e.setAppMode){const{errno:p,stdout:g,stderr:v}=await Se(`cmd miui_embedding_window set-appMode ${e.setAppMode.name} ${e.setAppMode.action}`);p?n.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.setAppMode.name}的设置为${e.setAppMode.action}`,message:v}):r.push({type:"updateMiuiEmbeddingWindowSwitchAction",name:`[模块]更新${e.setAppMode.name}的设置${e.setAppMode.action}`,message:g})}n.length?o({type:"error",message:"发生错误,提交失败",errorLogging:n,successLogging:r}):t({type:"success",message:"更新成功",errorLogging:n,successLogging:r})}})),Uj={"com.lbe.security.miui":1,"com.miui.player":1,"com.miui.fm":1,"com.miui.hybrid":1,"com.miui.securitycenter":1,"com.miui.compass":1,"com.miui.contentextension":1,"com.miui.misound":1,"com.miui.voiceassist":1,"com.miui.securityadd":1},Kj={"com.miui.touchassistant":1,"com.miui.whitenoise":1,"com.tencent.mobileqq":1,"com.tencent.mm":1,"com.alibaba.android.rimet":1,"com.coolapk.market":1,"com.sina.weibo":1,"com.baidu.tieba":1,"com.xuetangx.ykt":1,"io.github.vvb2060.magisk":1,"com.topjohnwu.magisk":1,"io.github.huskydg.magisk":1,"io.github.a13e300.ksuwebui":1,"me.weishu.kernelsu":1,"me.bmax.apatch":1,"com.dna.tools":1,"com.sevtinge.hyperceiler":1,"com.github.kr328.clash.foss":1,"com.github.kr328.clash":1,"com.github.metacubex.clash.meta":1,"com.rocket.e5b382b19324e0a":1,"dev.miuiicons.pedroz":1,"com.tencent.androidqqmail":1,"com.jingdong.app.mall":1,"com.tencent.wework":1,"com.tencent.weworkenterprise":1,"com.taobao.trip":1,"com.fenbi.android.leo":1,"com.duokan.reader":1,"com.xiaomi.shop":1,"com.xiaomi.smarthome":1,"com.youdao.dict":1,"com.netease.uu":1,"com.lemon.lv":1,"com.valvesoftware.android.steam.community":1,"com.douban.book.reader":1,"com.amazon.kindlefc":1,"com.alicloud.databox":1,"com.huawei.appmarket":1,"com.huawei.smarthome":1,"mark.via":1,"com.fenbi.android.servant":1,"com.fenbi.android.zhaojiao":1,"com.eusoft.eudic":1,"com.eusoft.ting.en":1,"com.cnki.android.cnkimobile":1,"com.zui.calculator":1,"com.jd.app.reader":1,"com.huajiao":1,"com.youku.phone":1,"com.tencent.qqlive":1,"com.xiaomi.gamecenter":1,"com.kugou.android":1,"com.ss.android.ugc.aweme":1,"com.ss.android.ugc.live":1,"com.ss.android.ugc.aweme.lite":1,"com.smile.gifmaker":1,"com.kuaishou.nebula":1,"com.bdatu.geography":1,"com.ubestkid.beilehu.android":1,"youqu.android.todesk":1,"com.tencent.docs":1,"com.tencent.pao":1,"com.estrongs.android.pop":1,"com.adobe.reader":1,"com.microsoft.skydrive":1,"cn.com.langeasy.LangEasyLexis":1,"cn.ticktick.task":1,"com.google.earth":1,"com.omarea.vtools":1,"com.plan.kot32.tomatotime":1,"com.farplace.qingzhuo":1,"com.xiachufang":1,"com.happyteam.dubbingshow":1,"czh.mindnode":1,"com.chrissen.card":1,"top.onepix.timeblock":1,"www.imxiaoyu.com.musiceditor":1,"com.mmbox.xbrowser":1,"com.flyersoft.moonreader":1,"com.flyersoft.moonreaderp":1,"com.yikaobang.yixue":1,"com.kwai.m2u":1,"com.qiyi.video.pad":1,"com.baidu.baidutranslate":1,"org.zwanoo.android.speedtest":1,"com.xiwang.zaixian":1,"com.yozo.office":1,"com.taobao.taobao":1,"cn.canva.editor":1,"com.singularity.tiangong":1,"com.mubu.app":1,"chuxin.shimo.shimowendang":1,"com.roblox.client":1,"com.netease.cloudmusic":1,"com.netease.mc.mi":1,"com.netease.x19":1,"com.netease.mc.huawei":1,"com.netease.mc.vivo":1,"com.netease.mc.oppo":1,"com.netease.mc.honor":1,"com.netease.mc.bilibili":1,"com.netease.mc.nearme.gamecenter":1,"com.netease.mc":1,"com.netease.mctest":1,"com.hicloud.browser":1,"com.hihonor.health":1,"com.ss.android.ugc.livelite":1,"com.oray.sunlogin":1,"com.microsoft.todos":1,"com.jdjdc.jdfastjdc":1,"com.google.android.apps.translate":1,"com.adsk.sketchbook":1,"com.pick.sketchbook":1,"com.ihuman.recite":1,"com.ctfile":1,"com.quark.scanking":1,"com.hunantv.imgo.activity":1,"com.sohu.sohuvideo":1,"com.wuba.town.client":1,"com.yhqx.player":1,"com.lixiangdong.mediaplayer":1,"cn.ylkj.zmjh":1,"com.yixinli.muse":1,"com.antutu.ABenchMark":1,"cn.honor.qinxuan":1,"com.fenbi.android.zenglish.hd":1,"com.huawei.videoeditor":1,"com.huawei.genexcloud.speedtest":1,"com.huawei.ch18":1,"com.hihonor.dz.reader":1,"com.hihonor.vmall":1,"com.hihonor.magichome":1,"com.hihonor.heartstudy":1,"cn.ieway.evcapture":1,"cn.ieway.evplayer2":1,"com.aliyun.wuying.enterprise":1,"com.jingdong.app.reader.campus":1,"com.UCMobile":1,"com.quark.browser":1,"com.smzdm.client.android":1,"com.baidu.netdisk":1,"com.mfcloudcalculate.networkdisk":1,"com.chinamobile.mcloud":1,"info.muge.appshare":1,"com.x7890.shortcutcreator":1,"org.kde.kdeconnect_tp":1,"com.tencent.weread":1,"com.larus.nova":1,"com.moonshot.kimichat":1,"com.baidu.newapp":1,"com.tencent.hunyuan.app.chat":1,"jp.pokemon.pokemonsleep":1,"com.heytap.headset":1,"com.twitter.android":1,"cn.jagat.main":1,"com.furrybar.chat.app":1,"me.ele":1,"com.max.xiaoheihe":1,"com.ruanmei.ithome":1,"com.youdao.translator":1,"com.netflix.NGP.MonumentValley3":1,"com.ophone.reader.ui":1,"studio.fountainhead.habicat":1,"com.hihonor.appmarket":1,"cn.wenyu.bodian":1,"com.zte.smarthome":1,"com.phoenix.read":1,"com.bilibili.app.in":1,"com.bilibili.app.blue":1,"com.joey.colors.simple.c":1,"com.hanfuhui":1,"com.hurantech.cherrysleep":1,"tech.caicheng.youshi":1,"org.panda.words":1,"com.tencent.phoenix":1,"com.tencent.wetype":1,"com.tencent.wehear":1,"com.tencent.weishi":1,"com.ctg.itrdc.clouddesk":1,"com.oppo.store":1,"com.pupumall.customer":1,"me.tangke.gamecores":1,"com.xunmeng.pinduoduo":1,"com.vblast.flipaclip":1,"com.gstarmc.android":1,"com.quickview3d":1,"com.aihuishou.opt":1,"com.duolingo":1,"cn.etouch.ecalendar.life":1,"cn.etouch.ecalendar":1,"com.gamestar.pianoperfect":1,"me.yoopu.app.songbook":1,"com.autonavi.minimap":1,"com.tencent.map":1,"com.baidu.BaiduMap":1,"com.yuzebin.pokemon":1,"com.CDA.StructureMaster":1,"com.cxincx.xxjz":1},y0={...Uj,...Kj},Us=Gi("embedded",()=>{const e=A(!1),t=A(!1),o=A({}),n=A(!1),r=A({}),i=A({}),a=A({}),l=A({}),s=A({}),u=A({}),d=A({}),c=A({}),h=A({}),f=A({}),p=A({}),g=A({}),v=D(()=>{const O={...p.value};for(const oe in g.value){const y=g.value[oe];y===-1?delete O[oe]:O[oe]=y}return O}),b=D(()=>{const O=ht(),oe=new Set([...Object.keys(i.value),...Object.keys(s.value),...O.installedAndroidApplicationPackageNameList,...Object.keys(y0)]),y=Object.entries(r.value).filter(([j])=>oe.has(j));return Object.fromEntries(y)}),C=D(()=>{const O=ht(),oe=new Set([...Object.keys(i.value),...Object.keys(s.value),...O.installedAndroidApplicationPackageNameList,...Object.keys(y0)]),y=Object.entries(l.value).filter(([j])=>oe.has(j));return Object.fromEntries(y)}),k=D(()=>{const O=ht(),oe=new Set([...Object.keys(i.value),...Object.keys(s.value),...O.installedAndroidApplicationPackageNameList,...Object.keys(y0)]),y=Object.entries(c.value).filter(([j])=>oe.has(j));return Object.fromEntries(y)}),w=A([]),_=D(()=>{const O=ht(),oe=new Set(O.installedAndroidApplicationPackageNameList);return w.value.reduce((j,X)=>(oe.has(X.name)&&j.push(X.name),j),[])}),M=D(()=>{const O=ht(),oe=new Set(O.installedAndroidApplicationPackageNameList);return w.value.reduce((j,X)=>{var le;return oe.has(X.name)&&(le=X.fixedOrientationRule)!=null&&le.compatChange&&j.push(X.name),j},[])}),E=A(""),P=A(""),z=u7(O=>{E.value=O.trim().toLowerCase()},500);lt(P,O=>{z(O)});const $=D(()=>{const O=w.value,oe=ht(),y=new Set(oe.installedAndroidApplicationPackageNameList),j=t.value,X=E.value,le=o.value,ae=v.value,Fe=oe.installedAppNameList;return O.reduce((fe,ue)=>{const we=ue.name.trim().toLowerCase();Fe[ue.name]&&!ue.applicationName&&(ue.applicationName=Fe[ue.name]),le[ue.name]&&!ue.applicationName&&(ue.applicationName=le[ue.name]),ae[ue.name]?ue.thirdPartyAppOptimize=!0:ue.thirdPartyAppOptimize=!1;const ie=ue.applicationName?ue.applicationName.toLowerCase():"";return!we.includes(X)&&!ie.includes(X)||j&&!y.has(ue.name)||fe.push(ue),fe},[]).sort((fe,ue)=>fe.ruleMode==="custom"&&ue.ruleMode!=="custom"?-1:fe.ruleMode!=="custom"&&ue.ruleMode==="custom"?1:fe.name.localeCompare(ue.name))}),G=D(()=>W.length>0),H=D(()=>w.value.length),q=A(!0),W=Nt([]),L=D(()=>new Set([...e.value?Object.keys(b.value):Object.keys(r.value),...e.value?Object.keys(C.value):Object.keys(l.value),...Object.keys(a.value),...Object.keys(u.value)]));function I(){const O=ht();w.value=U4(e.value?b.value:r.value,e.value?C.value:l.value,O.MIOSVersion&&O.MIOSVersion>=2?e.value?k.value:c.value:d.value,a.value,u.value,h.value)}async function R(){const O=ht();q.value=!0;const y=(await kn(()=>import("./applicationName-exrf0CFH.js"),[])).default;o.value=y;const[j,X]=await Me(cN());j?W.push({type:"getIsPatchModeErr",title:"补丁模式",msg:j}):X==="true"?e.value=!0:e.value=!1;const le=[Aj(),Pj(),Ij(),Dj(),Tj(),Oj(),Hj(),Lj(),Nj(),Vj(),jj(),Wj()],[[ae,Fe],[fe,ue],[we,ie],[be,ze],[pe,U],[N,ge],[Ce,se],[te,ce],[Q,re],[he,ne],[Y,de],[Ee,Ie]]=await Promise.all(le.map(Qe=>Me(Qe)));ae&&(r.value={},W.push({type:"sourceEmbeddedRulesList",title:"[模块]平行窗口配置文件",msg:ae})),Fe&&(r.value=hn(Fe,"package_config","package")),fe&&(i.value={},W.push({type:"SystemEmbeddedRulesList",title:"[系统]平行窗口配置文件",msg:fe})),ue&&(i.value=hn(ue,"package_config","package")),we&&(a.value={}),ie&&(a.value=hn(ie,"package_config","package",!0),console.log(a.value,"customConfigEmbeddedRulesList.value")),be&&(l.value={},W.push({type:"sourceFixedOrientationList",title:"[模块]信箱模式配置文件",msg:be})),ze&&(l.value=hn(ze,"package_config","package")),pe&&(s.value={}),U&&(s.value=hn(U,"package_config","package")),N&&(u.value={}),ge&&(u.value=hn(ge,"package_config","package",!0)),Ce&&(c.value={}),se&&(c.value=hn(se,"setting_rule","setting")),te&&(d.value={}),ce&&(d.value=hn(ce,"setting_rule","setting")),Q&&(h.value={}),re&&(h.value=hn(re,"setting_rule","setting",!0)),he&&(p.value={}),ne&&(p.value=g0(ne)),Y&&(g.value={}),de&&(g.value=g0(de)),Ee&&(f.value={}),Ie&&(f.value=g0(Ie)),di().info("deviceStore.MIOSVersion",O.MIOSVersion),w.value=U4(e.value?b.value:r.value,e.value?C.value:l.value,O.MIOSVersion&&O.MIOSVersion>=2?e.value?k.value:c.value:d.value,a.value,u.value,h.value),W.length||(q.value=!1,O.needReloadData&&e.value&&(n.value=!0))}return{sourceEmbeddedRulesList:r,sourceFixedOrientationList:l,patchEmbeddedRulesList:b,patchFixedOrientationList:C,patchEmbeddedSettingConfig:k,customConfigEmbeddedRulesList:a,customConfigFixedOrientationList:u,customConfigEmbeddedSettingConfig:h,sourceThirdPartyAppOptimizeConfig:p,customThirdPartyAppOptimizeConfig:g,mergeThirdPartyAppOptimizeConfig:v,systemAppOptimizeConfig:f,filterSetAppModeAppList:_,filterResetAppCompatAppList:M,systemEmbeddedSettingConfig:d,systemEmbeddedRulesList:i,systemFixedOrientationList:s,mergeRuleList:w,filterInstalledApps:t,filterMergeRuleList:$,searchKeyWord:P,errorLogging:W,isNeedShowErrorModal:G,loading:q,ruleCount:H,allPackageName:L,applicationName:o,isPatchMode:e,initDefault:R,updateMergeRuleList:I,isNeedShowReloadPathModeDialog:n}},{persist:{pick:["filterInstalledApps"]}}),R9=Gi("font",()=>{const e=A("MiSans"),t=D(()=>`${e.value}, system-ui, sans-serif`);return{currentFont:e,setFont:n=>{e.value=n},currentFontFamily:t}},{persist:{pick:["currentFont"]}}),Gj=()=>{const o=`echo "$(/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3 /data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db "SELECT dataId FROM cloud_all_data WHERE moduleName='MiuiFreeform';")"`;return new Promise(async(n,r)=>{{const{errno:i,stdout:a,stderr:l}=await Se(o);if(i&&r(l),a)try{const s=a.split(` +`);n(s)}catch(s){r(s)}}})},qj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/dot_black_list.json";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);if(n)o(i);else if(r)try{t(JSON.parse(r))}catch{o("dot_black_list config is empty")}else o(null)}}),e)},Zj=()=>{const e="/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3",t="/data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db";return new Promise(async(o,n)=>{{const[,r]=await Me(Gj());if(r){const i=async s=>{const u=`echo "$(${e} ${t} "SELECT productData FROM cloud_all_data WHERE dataId='${s}';")"`;return ke(new Promise(async(d,c)=>{const{errno:h,stdout:f,stderr:p}=await Se(u);if(h&&c(p),f)try{const g=JSON.parse(f);g.dot_black_list?d({dataId:Number(s),productData:g||{},dataList:g.dot_black_list||[]}):d({dataId:Number(s),productData:g||{},dataList:[]})}catch(g){c(g)}}),u)},[a,l]=await Me(Promise.all(r.map(s=>i(s))));a&&n(a),l&&o(l)}}})},Xj=()=>{const e='ls /data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db &>/dev/null && echo "exists" || echo "not exists"';return new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):r==="exists"?t(r):o(r)}})},XX=e=>{const t="/data/adb/modules/MIUI_MagicWindow+/common/utils/sqlite3",o="/data/user_de/0/com.android.htmlviewer/databases/cloud_all_data.db",n=[],r=[];return ke(new Promise(async(i,a)=>{{const l=Array.from(new Set(e.customDotBlackList)),s=async c=>{const h=`echo '${JSON.stringify(c)}' > /data/adb/MIUI_MagicWindow+/config/dot_black_list.json`;return ke(new Promise(async(f,p)=>{const{errno:g,stdout:v,stderr:b}=await Se(h);g?(n.push({type:"updateCustomDotBlackListJSON",name:"[自定义规则]窗口控制器配置文件",message:b}),p(b)):(r.push({type:"updateCustomDotBlackListJSON",name:"[自定义规则]窗口控制器配置文件",message:"更新成功"}),f(v))}),h)},[u,d]=await Me(s(l));if(u)a(u);else{const c=e.sourceDotBlackList.map(g=>{const v=Sa(g.productData);return v.dot_black_list=e.dotBlackList,{dataId:g.dataId,productData:v}}),h=async(g,v)=>{const b=`echo "$(${t} ${o} "UPDATE cloud_all_data SET productData='${JSON.stringify(v).replace(/"/g,'\\"')}' WHERE dataId='${g}'; SELECT changes();")"`;return ke(new Promise(async(C,k)=>{const{errno:w,stdout:_,stderr:M}=await Se(b);w?k(M):_==="1"?C(_):k(_)}),b)},[f,p]=await Me(Promise.all(c.map(g=>h(g.dataId,g.productData))));f&&a(f),p&&i({type:"success",message:"更新成功",errorLogging:n,successLogging:r})}}}),"updateDotBlackList")},Yj=Gi("dotBlackList",()=>{const e=A(!1),t=A([]),o=D(()=>{if(t.value.length===0)return[];const v=t.value[0].dataList,b=new Set(v);return t.value.slice(1).forEach(C=>{const k=new Set(C.dataList);for(const w of b)k.has(w)||b.delete(w)}),v.filter(C=>b.has(C))}),n=A([]),r=D(()=>{const b=ht().installedAppNameList,C=o.value.map(M=>{const E=n.value.includes(M),P=b[M]||a.value[M];return{name:M,applicationName:P,ruleMode:E?"custom":"system",status:!0}}),k=n.value.filter(M=>!o.value.includes(M)).map(M=>{const E=b[M]||a.value[M];return{name:M,applicationName:E,ruleMode:"custom",status:!1}}),w=Math.floor(C.length/2);return[...C.slice(0,w),...k,...C.slice(w)]}),i=D(()=>{const v=d.value.trim().toLowerCase(),b=r.value,C=ht();return b.reduce((k,w)=>{const _=w.name.trim().toLowerCase(),M=w.applicationName?w.applicationName.toLowerCase():"";if(!_.includes(v)&&!M.includes(v))return k;const E=new Set(C.installedAndroidApplicationPackageNameList);return e.value&&!E.has(w.name)||k.push(w),k},[]).sort((k,w)=>k.ruleMode==="custom"&&w.ruleMode!=="custom"?-1:k.ruleMode!=="custom"&&w.ruleMode==="custom"?1:k.name.localeCompare(w.name))}),a=A({}),l=A([]),s=D(()=>f.length>0),u=D(()=>l.value.length),d=A(""),c=A(!0),h=A(!1),f=Nt([]),p=D(()=>new Set([...n.value,...o.value]));async function g(){c.value=!0;const b=(await kn(()=>import("./applicationName-exrf0CFH.js"),[])).default;a.value=b;const[C,k]=await Me(Xj());if(C&&(h.value=!1),k){h.value=!0;const[w,_]=await Me(Zj());w&&(t.value=[]),_&&(t.value=_);const[M,E]=await Me(qj());M&&(n.value=[]),E&&(n.value=E),c.value=!1}}return{mergeRuleList:l,allPackageName:p,sourceDotBlackList:t,hasHTMLViewerCloudData:h,systemDotBlackList:o,customDotBlackList:n,mergeDotBlackList:r,filterMergeDotBlackList:i,applicationName:a,searchKeyWord:d,errorLogging:f,isNeedShowErrorModal:s,filterInstalledApps:e,loading:c,ruleCount:u,initDefault:g}},{persist:{pick:["filterInstalledApps"]}}),Qj=()=>{const e="cat /data/adb/modules/MIUI_MagicWindow+/common/source/autoui_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},Jj=()=>{const e="cat /data/adb/MIUI_MagicWindow+/config/autoui_list.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},eU=()=>{const e="cat /data/system/users/0/autoui_setting_config.xml";return ke(new Promise(async(t,o)=>{{const{errno:n,stdout:r,stderr:i}=await Se(e);n?o(i):t(r)}}),e)},wl=e=>ke(new Promise(async(t,o)=>{{const n=[],r=[],{errno:i,stdout:a,stderr:l}=await Se(`echo '${e.customAutoUIListXML}' > /data/adb/MIUI_MagicWindow+/config/autoui_list.xml`);i?n.push({type:"customAutoUIListXML",name:"[自定义规则]应用布局优化配置文件",message:l}):r.push({type:"customAutoUIListXML",name:"[自定义规则]应用布局优化配置文件",message:"更新成功"});const{errno:s,stdout:u,stderr:d}=await Se(`echo '${e.settingConfigXML}' > /data/system/users/0/autoui_setting_config.xml`);s?n.push({type:"settingConfigXML",name:"[模块]应用布局优化配置文件",message:d}):r.push({type:"settingConfigXML",name:"[模块]应用布局优化配置文件",message:"更新成功"});const[c,h]=await Me(rc("miui_auto_ui"));if(c&&n.push({type:"updateAutoUIRule",name:"[模块]重新载入模块应用布局优化规则",message:c}),h&&r.push({type:"updateAutoUIRule",name:"[模块]重新载入模块应用布局优化规则",message:h.split(` +`)}),e.reloadRuleAction){const{errno:f,stdout:p,stderr:g}=await Se(`cmd miui_auto_ui ${e.reloadRuleAction.action} ${e.reloadRuleAction.name}`);f?n.push({type:"updateMiuiAutoUIReloadAction",name:`[模块]更新${e.reloadRuleAction.name}的设置`,message:g}):r.push({type:"updateMiuiAutoUIReloadAction",name:`[模块]更新${e.reloadRuleAction.name}的设置`,message:p})}n.length?o({type:"error",message:"发生错误,提交失败",errorLogging:n,successLogging:r}):t({type:"success",message:"更新成功",errorLogging:n,successLogging:r})}})),C3=Gi("autoui",()=>{const e=A(!1),t=A({}),o=A({}),n=A({}),r=A({}),i=A([]),a=D(()=>{const g=u.value.trim().toLowerCase(),v=i.value,b=ht(),C=b.installedAppNameList;return v.reduce((k,w)=>{const _=w.name.trim().toLowerCase();C[w.name]&&!w.applicationName&&(w.applicationName=C[w.name]),n.value[w.name]&&!w.applicationName&&(w.applicationName=n.value[w.name]);const M=w.applicationName?w.applicationName.toLowerCase():"";if(!_.includes(g)&&!M.includes(g))return k;const E=new Set(b.installedAndroidApplicationPackageNameList);return e.value&&!E.has(w.name)||k.push(w),k},[]).sort((k,w)=>k.ruleMode==="custom"&&w.ruleMode!=="custom"?-1:k.ruleMode!=="custom"&&w.ruleMode==="custom"?1:k.name.localeCompare(w.name))}),l=D(()=>c.length>0),s=D(()=>i.value.length),u=A(""),d=A(!0),c=Nt([]),h=D(()=>new Set([...Object.keys(t.value),...Object.keys(o.value)]));function f(){i.value=K4(t.value,o.value,r.value)}async function p(){d.value=!0;const v=(await kn(()=>import("./applicationName-exrf0CFH.js"),[])).default;n.value=v;const[b,C]=await Me(Qj());b&&c.push({type:"sourceAutoUIList",title:"[模块]应用布局优化配置文件",msg:b}),C&&(t.value=hn(C,"packageRules","package"));const[k,w]=await Me(Jj());k||(o.value=hn(w,"packageRules","package",!0));const[_,M]=await Me(eU());_&&(r.value={}),M&&(r.value=hn(M,"setting_config","setting")),i.value=K4(t.value,o.value,r.value),c.length||(d.value=!1)}return{sourceAutoUIList:t,customConfigAutoUIList:o,autoUISettingConfig:r,mergeRuleList:i,filterMergeRuleList:a,applicationName:n,searchKeyWord:u,errorLogging:c,isNeedShowErrorModal:l,updateMergeRuleList:f,filterInstalledApps:e,loading:d,ruleCount:s,allPackageName:h,initDefault:p}},{persist:{pick:["filterInstalledApps"]}}),tU=ye({__name:"App",setup(e){const t=ht(),o=di(),n=Zv(),r=D(()=>({theme:t.isDarkMode?Bt:Ft})),{message:i,modal:a}=It(["message","modal"],{configProviderProps:r}),l=Us(),s=R9(),u=C3(),d=Yj(),c=A(!1),h=A(!0);kt(p=>{!t.loading&&!l.loading&&(h.value=!1),(t.errorLogging.length||l.errorLogging.length)&&(h.value=!1),p(()=>{})}),lt(()=>s.currentFont,(p,g)=>{p&&document.documentElement.style.setProperty("--global-font-family",s.currentFontFamily)},{immediate:!0}),lt(()=>t.isNeedShowErrorModal,(p,g)=>{p&&(c.value=!0)},{immediate:!1});function f(){return!!window.matchMedia("(prefers-color-scheme: dark)").matches}return kt(p=>{const g=window.matchMedia("(prefers-color-scheme: dark)");t.rhythmMode==="autoRhythm"&&(t.isDarkMode=f());const v=b=>{t.rhythmMode==="autoRhythm"&&(t.isDarkMode=b.matches)};g.addEventListener("change",v),p(()=>{g.removeEventListener("change",v)})}),ut(async()=>{window.onerror=function(p,g,v,b,C){o&&o.error("[JavaScript Error]",p.toString())},window.addEventListener("unhandledrejection",function(p){o&&o.error("[JavaScript Promise Error]",p.reason.toString())}),await t.initDefault(),t.androidTargetSdk&&t.androidTargetSdk===30?a.create({title:"不适配说明",type:"error",preset:"dialog",content:()=>x("p",null,[F("Web UI 未对Android 11做适配,无法使用~")]),negativeText:"确定"}):(t.androidTargetSdk&&t.androidTargetSdk<=33&&!t.skipConfirm.lowWebViewVersion&&a.create({title:"不兼容说明",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("Web UI 强依赖部分较新内核的JavaScript API实现,为了确保模块正常工作,Android 13/12的小米设备可能需要升级系统内置WebView版本,请通过Google Play商店升级!")]),x("p",null,[F("下载地址:https://play.google.com/store/apps/details?id=com.google.android.webview")]),x("p",null,[F("如果下载的是Beta/Dev/Canary版本的WebView,则需要前往[开发者选项-WebView实现]进行切换~")])]),positiveText:"复制下载链接到剪切板",negativeText:"已升级,不再提醒",onPositiveClick:()=>{navigator.clipboard.writeText("https://play.google.com/store/apps/details?id=com.google.android.webview")},onNegativeClick:()=>{t.skipConfirm.lowWebViewVersion=!0}}),["KernelSU","APatch"].includes(t.currentRootManager)&&!t.skipConfirm.needInstalledKsuWebUiApk&&a.create({title:"Web UI 升级提醒",type:"warning",preset:"dialog",content:()=>x("div",null,[x("p",null,[F("KernelSU/APatch 自带的 Web UI 存在部分问题,可能导致模块功能显示不全,建议可以安装波奇大佬提取制作的 「KsuWebUI」,取代自带的 Web UI,这不是必选项,您可以选择忽略此条建议,但可能导致模块部分功能无法正常工作。")]),x("p",null,[F("下载地址:https://caiyun.139.com/m/i?135Ce7C7omgXj")])]),positiveText:"复制下载链接到剪切板",negativeText:"已安装,不再提醒",onPositiveClick:()=>{navigator.clipboard.writeText("https://caiyun.139.com/m/i?135Ce7C7omgXj")},onNegativeClick:()=>{t.skipConfirm.needInstalledKsuWebUiApk=!0}}),l.initDefault(),u.initDefault(),n.initDefault(),t.MIOSVersion&&t.MIOSVersion>=1&&d.initDefault())}),(p,g)=>{const v=rt("n-config-provider");return Re(),Oe("div",{class:xe(["app-container h-full",`${S(t).isDarkMode?"bg-zinc-900 theme-dark-mode":"bg-white"}`])},[x(v,{theme:S(t).isDarkMode?S(Bt):S(Ft)},{default:K(()=>[x(S(Ej),null,{default:K(()=>[x(S(Nv))]),_:1}),x(k9,{modelValue:c.value,"onUpdate:modelValue":g[0]||(g[0]=b=>c.value=b),errorLogging:S(t).errorLogging},null,8,["modelValue","errorLogging"]),h.value?(Re(),Tt(Mj,{key:0})):Ge("",!0)]),_:1},8,["theme"])],2)}}}),oU=_9(tU,[["__scopeId","data-v-de76c51d"]]),z9="/images/icons/all_app.png",hd="/images/icons/ai_icon.png";/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */const nU=4,r5=0,i5=1,rU=2;function Ja(e){let t=e.length;for(;--t>=0;)e[t]=0}const iU=0,A9=1,aU=2,lU=3,sU=258,w3=29,Ks=256,ms=Ks+1+w3,Aa=30,S3=19,P9=2*ms+1,_i=15,C0=16,uU=7,F3=256,B9=16,$9=17,D9=18,$1=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),Wu=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),dU=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),T9=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),cU=512,fr=new Array((ms+2)*2);Ja(fr);const Gl=new Array(Aa*2);Ja(Gl);const gs=new Array(cU);Ja(gs);const vs=new Array(sU-lU+1);Ja(vs);const E3=new Array(w3);Ja(E3);const pd=new Array(Aa);Ja(pd);function w0(e,t,o,n,r){this.static_tree=e,this.extra_bits=t,this.extra_base=o,this.elems=n,this.max_length=r,this.has_stree=e&&e.length}let I9,O9,L9;function S0(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}const H9=e=>e<256?gs[e]:gs[256+(e>>>7)],bs=(e,t)=>{e.pending_buf[e.pending++]=t&255,e.pending_buf[e.pending++]=t>>>8&255},Uo=(e,t,o)=>{e.bi_valid>C0-o?(e.bi_buf|=t< >C0-e.bi_valid,e.bi_valid+=o-C0):(e.bi_buf|=t< {Uo(e,o[t*2],o[t*2+1])},N9=(e,t)=>{let o=0;do o|=e&1,e>>>=1,o<<=1;while(--t>0);return o>>>1},fU=e=>{e.bi_valid===16?(bs(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=e.bi_buf&255,e.bi_buf>>=8,e.bi_valid-=8)},hU=(e,t)=>{const o=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,i=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,l=t.stat_desc.extra_base,s=t.stat_desc.max_length;let u,d,c,h,f,p,g=0;for(h=0;h<=_i;h++)e.bl_count[h]=0;for(o[e.heap[e.heap_max]*2+1]=0,u=e.heap_max+1;u s&&(h=s,g++),o[d*2+1]=h,!(d>n)&&(e.bl_count[h]++,f=0,d>=l&&(f=a[d-l]),p=o[d*2],e.opt_len+=p*(h+f),i&&(e.static_len+=p*(r[d*2+1]+f)));if(g!==0){do{for(h=s-1;e.bl_count[h]===0;)h--;e.bl_count[h]--,e.bl_count[h+1]+=2,e.bl_count[s]--,g-=2}while(g>0);for(h=s;h!==0;h--)for(d=e.bl_count[h];d!==0;)c=e.heap[--u],!(c>n)&&(o[c*2+1]!==h&&(e.opt_len+=(h-o[c*2+1])*o[c*2],o[c*2+1]=h),d--)}},V9=(e,t,o)=>{const n=new Array(_i+1);let r=0,i,a;for(i=1;i<=_i;i++)r=r+o[i-1]<<1,n[i]=r;for(a=0;a<=t;a++){let l=e[a*2+1];l!==0&&(e[a*2]=N9(n[l]++,l))}},pU=()=>{let e,t,o,n,r;const i=new Array(_i+1);for(o=0,n=0;n >=7;n {let t;for(t=0;t {e.bi_valid>8?bs(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0},a5=(e,t,o,n)=>{const r=t*2,i=o*2;return e[r] {const n=e.heap[o];let r=o<<1;for(;r<=e.heap_len&&(r {let n,r,i=0,a,l;if(e.sym_next!==0)do n=e.pending_buf[e.sym_buf+i++]&255,n+=(e.pending_buf[e.sym_buf+i++]&255)<<8,r=e.pending_buf[e.sym_buf+i++],n===0?Wn(e,r,t):(a=vs[r],Wn(e,a+Ks+1,t),l=$1[a],l!==0&&(r-=E3[a],Uo(e,r,l)),n--,a=H9(n),Wn(e,a,o),l=Wu[a],l!==0&&(n-=pd[a],Uo(e,n,l)));while(i {const o=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,i=t.stat_desc.elems;let a,l,s=-1,u;for(e.heap_len=0,e.heap_max=P9,a=0;a>1;a>=1;a--)F0(e,o,a);u=i;do a=e.heap[1],e.heap[1]=e.heap[e.heap_len--],F0(e,o,1),l=e.heap[1],e.heap[--e.heap_max]=a,e.heap[--e.heap_max]=l,o[u*2]=o[a*2]+o[l*2],e.depth[u]=(e.depth[a]>=e.depth[l]?e.depth[a]:e.depth[l])+1,o[a*2+1]=o[l*2+1]=u,e.heap[1]=u++,F0(e,o,1);while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],hU(e,t),V9(o,s,e.bl_count)},s5=(e,t,o)=>{let n,r=-1,i,a=t[0*2+1],l=0,s=7,u=4;for(a===0&&(s=138,u=3),t[(o+1)*2+1]=65535,n=0;n<=o;n++)i=a,a=t[(n+1)*2+1],!(++l {let n,r=-1,i,a=t[0*2+1],l=0,s=7,u=4;for(a===0&&(s=138,u=3),n=0;n<=o;n++)if(i=a,a=t[(n+1)*2+1],!(++l{let t;for(s5(e,e.dyn_ltree,e.l_desc.max_code),s5(e,e.dyn_dtree,e.d_desc.max_code),D1(e,e.bl_desc),t=S3-1;t>=3&&e.bl_tree[T9[t]*2+1]===0;t--);return e.opt_len+=3*(t+1)+5+5+4,t},gU=(e,t,o,n)=>{let r;for(Uo(e,t-257,5),Uo(e,o-1,5),Uo(e,n-4,4),r=0;r{let t=4093624447,o;for(o=0;o<=31;o++,t>>>=1)if(t&1&&e.dyn_ltree[o*2]!==0)return r5;if(e.dyn_ltree[9*2]!==0||e.dyn_ltree[10*2]!==0||e.dyn_ltree[13*2]!==0)return i5;for(o=32;o {d5||(pU(),d5=!0),e.l_desc=new S0(e.dyn_ltree,I9),e.d_desc=new S0(e.dyn_dtree,O9),e.bl_desc=new S0(e.bl_tree,L9),e.bi_buf=0,e.bi_valid=0,W9(e)},U9=(e,t,o,n)=>{Uo(e,(iU<<1)+(n?1:0),3),j9(e),bs(e,o),bs(e,~o),o&&e.pending_buf.set(e.window.subarray(t,t+o),e.pending),e.pending+=o},xU=e=>{Uo(e,A9<<1,3),Wn(e,F3,fr),fU(e)},yU=(e,t,o,n)=>{let r,i,a=0;e.level>0?(e.strm.data_type===rU&&(e.strm.data_type=vU(e)),D1(e,e.l_desc),D1(e,e.d_desc),a=mU(e),r=e.opt_len+3+7>>>3,i=e.static_len+3+7>>>3,i<=r&&(r=i)):r=i=o+5,o+4<=r&&t!==-1?U9(e,t,o,n):e.strategy===nU||i===r?(Uo(e,(A9<<1)+(n?1:0),3),l5(e,fr,Gl)):(Uo(e,(aU<<1)+(n?1:0),3),gU(e,e.l_desc.max_code+1,e.d_desc.max_code+1,a+1),l5(e,e.dyn_ltree,e.dyn_dtree)),W9(e),n&&j9(e)},CU=(e,t,o)=>(e.pending_buf[e.sym_buf+e.sym_next++]=t,e.pending_buf[e.sym_buf+e.sym_next++]=t>>8,e.pending_buf[e.sym_buf+e.sym_next++]=o,t===0?e.dyn_ltree[o*2]++:(e.matches++,t--,e.dyn_ltree[(vs[o]+Ks+1)*2]++,e.dyn_dtree[H9(t)*2]++),e.sym_next===e.sym_end);var wU=bU,SU=U9,FU=yU,EU=CU,kU=xU,_U={_tr_init:wU,_tr_stored_block:SU,_tr_flush_block:FU,_tr_tally:EU,_tr_align:kU};const MU=(e,t,o,n)=>{let r=e&65535|0,i=e>>>16&65535|0,a=0;for(;o!==0;){a=o>2e3?2e3:o,o-=a;do r=r+t[n++]|0,i=i+r|0;while(--a);r%=65521,i%=65521}return r|i<<16|0};var xs=MU;const RU=()=>{let e,t=[];for(var o=0;o<256;o++){e=o;for(var n=0;n<8;n++)e=e&1?3988292384^e>>>1:e>>>1;t[o]=e}return t},zU=new Uint32Array(RU()),AU=(e,t,o,n)=>{const r=zU,i=n+o;e^=-1;for(let a=n;a>>8^r[(e^t[a])&255];return e^-1};var Co=AU,Wi={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},na={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:PU,_tr_stored_block:T1,_tr_flush_block:BU,_tr_tally:Xr,_tr_align:$U}=_U,{Z_NO_FLUSH:Yr,Z_PARTIAL_FLUSH:DU,Z_FULL_FLUSH:TU,Z_FINISH:mn,Z_BLOCK:c5,Z_OK:Eo,Z_STREAM_END:f5,Z_STREAM_ERROR:Gn,Z_DATA_ERROR:IU,Z_BUF_ERROR:E0,Z_DEFAULT_COMPRESSION:OU,Z_FILTERED:LU,Z_HUFFMAN_ONLY:ku,Z_RLE:HU,Z_FIXED:NU,Z_DEFAULT_STRATEGY:VU,Z_UNKNOWN:WU,Z_DEFLATED:ac}=na,jU=9,UU=15,KU=8,GU=29,qU=256,I1=qU+1+GU,ZU=30,XU=19,YU=2*I1+1,QU=15,zt=3,Kr=258,qn=Kr+zt+1,JU=32,Ha=42,k3=57,O1=69,L1=73,H1=91,N1=103,Mi=113,Rl=666,Io=1,el=2,ji=3,tl=4,eK=3,Ri=(e,t)=>(e.msg=Wi[t],t),h5=e=>e*2-(e>4?9:0),jr=e=>{let t=e.length;for(;--t>=0;)e[t]=0},tK=e=>{let t,o,n,r=e.w_size;t=e.hash_size,n=t;do o=e.head[--n],e.head[n]=o>=r?o-r:0;while(--t);t=r,n=t;do o=e.prev[--n],e.prev[n]=o>=r?o-r:0;while(--t)};let oK=(e,t,o)=>(t< {const t=e.state;let o=t.pending;o>e.avail_out&&(o=e.avail_out),o!==0&&(e.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+o),e.next_out),e.next_out+=o,t.pending_out+=o,e.total_out+=o,e.avail_out-=o,t.pending-=o,t.pending===0&&(t.pending_out=0))},nn=(e,t)=>{BU(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Qo(e.strm)},Lt=(e,t)=>{e.pending_buf[e.pending++]=t},Sl=(e,t)=>{e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=t&255},V1=(e,t,o,n)=>{let r=e.avail_in;return r>n&&(r=n),r===0?0:(e.avail_in-=r,t.set(e.input.subarray(e.next_in,e.next_in+r),o),e.state.wrap===1?e.adler=xs(e.adler,t,r,o):e.state.wrap===2&&(e.adler=Co(e.adler,t,r,o)),e.next_in+=r,e.total_in+=r,r)},K9=(e,t)=>{let o=e.max_chain_length,n=e.strstart,r,i,a=e.prev_length,l=e.nice_match;const s=e.strstart>e.w_size-qn?e.strstart-(e.w_size-qn):0,u=e.window,d=e.w_mask,c=e.prev,h=e.strstart+Kr;let f=u[n+a-1],p=u[n+a];e.prev_length>=e.good_match&&(o>>=2),l>e.lookahead&&(l=e.lookahead);do if(r=t,!(u[r+a]!==p||u[r+a-1]!==f||u[r]!==u[n]||u[++r]!==u[n+1])){n+=2,r++;do;while(u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&u[++n]===u[++r]&&n a){if(e.match_start=t,a=i,i>=l)break;f=u[n+a-1],p=u[n+a]}}while((t=c[t&d])>s&&--o!==0);return a<=e.lookahead?a:e.lookahead},Na=e=>{const t=e.w_size;let o,n,r;do{if(n=e.window_size-e.lookahead-e.strstart,e.strstart>=t+(t-qn)&&(e.window.set(e.window.subarray(t,t+t-n),0),e.match_start-=t,e.strstart-=t,e.block_start-=t,e.insert>e.strstart&&(e.insert=e.strstart),tK(e),n+=t),e.strm.avail_in===0)break;if(o=V1(e.strm,e.window,e.strstart+e.lookahead,n),e.lookahead+=o,e.lookahead+e.insert>=zt)for(r=e.strstart-e.insert,e.ins_h=e.window[r],e.ins_h=Qr(e,e.ins_h,e.window[r+1]);e.insert&&(e.ins_h=Qr(e,e.ins_h,e.window[r+zt-1]),e.prev[r&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=r,r++,e.insert--,!(e.lookahead+e.insert {let o=e.pending_buf_size-5>e.w_size?e.w_size:e.pending_buf_size-5,n,r,i,a=0,l=e.strm.avail_in;do{if(n=65535,i=e.bi_valid+42>>3,e.strm.avail_outr+e.strm.avail_in&&(n=r+e.strm.avail_in),n>i&&(n=i),n >8,e.pending_buf[e.pending-2]=~n,e.pending_buf[e.pending-1]=~n>>8,Qo(e.strm),r&&(r>n&&(r=n),e.strm.output.set(e.window.subarray(e.block_start,e.block_start+r),e.strm.next_out),e.strm.next_out+=r,e.strm.avail_out-=r,e.strm.total_out+=r,e.block_start+=r,n-=r),n&&(V1(e.strm,e.strm.output,e.strm.next_out,n),e.strm.next_out+=n,e.strm.avail_out-=n,e.strm.total_out+=n)}while(a===0);return l-=e.strm.avail_in,l&&(l>=e.w_size?(e.matches=2,e.window.set(e.strm.input.subarray(e.strm.next_in-e.w_size,e.strm.next_in),0),e.strstart=e.w_size,e.insert=e.strstart):(e.window_size-e.strstart<=l&&(e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,e.insert>e.strstart&&(e.insert=e.strstart)),e.window.set(e.strm.input.subarray(e.strm.next_in-l,e.strm.next_in),e.strstart),e.strstart+=l,e.insert+=l>e.w_size-e.insert?e.w_size-e.insert:l),e.block_start=e.strstart),e.high_water i&&e.block_start>=e.w_size&&(e.block_start-=e.w_size,e.strstart-=e.w_size,e.window.set(e.window.subarray(e.w_size,e.w_size+e.strstart),0),e.matches<2&&e.matches++,i+=e.w_size,e.insert>e.strstart&&(e.insert=e.strstart)),i>e.strm.avail_in&&(i=e.strm.avail_in),i&&(V1(e.strm,e.window,e.strstart,i),e.strstart+=i,e.insert+=i>e.w_size-e.insert?e.w_size-e.insert:i),e.high_water >3,i=e.pending_buf_size-i>65535?65535:e.pending_buf_size-i,o=i>e.w_size?e.w_size:i,r=e.strstart-e.block_start,(r>=o||(r||t===mn)&&t!==Yr&&e.strm.avail_in===0&&r<=i)&&(n=r>i?i:r,a=t===mn&&e.strm.avail_in===0&&n===r?1:0,T1(e,e.block_start,n,a),e.block_start+=n,Qo(e.strm)),a?ji:Io)},k0=(e,t)=>{let o,n;for(;;){if(e.lookahead =zt&&(e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),o!==0&&e.strstart-o<=e.w_size-qn&&(e.match_length=K9(e,o)),e.match_length>=zt)if(n=Xr(e,e.strstart-e.match_start,e.match_length-zt),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=zt){e.match_length--;do e.strstart++,e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart;while(--e.match_length!==0);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+1]);else n=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(n&&(nn(e,!1),e.strm.avail_out===0))return Io}return e.insert=e.strstart {let o,n,r;for(;;){if(e.lookahead =zt&&(e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=zt-1,o!==0&&e.prev_length 4096)&&(e.match_length=zt-1)),e.prev_length>=zt&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-zt,n=Xr(e,e.strstart-1-e.prev_match,e.prev_length-zt),e.lookahead-=e.prev_length-1,e.prev_length-=2;do++e.strstart<=r&&(e.ins_h=Qr(e,e.ins_h,e.window[e.strstart+zt-1]),o=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart);while(--e.prev_length!==0);if(e.match_available=0,e.match_length=zt-1,e.strstart++,n&&(nn(e,!1),e.strm.avail_out===0))return Io}else if(e.match_available){if(n=Xr(e,0,e.window[e.strstart-1]),n&&nn(e,!1),e.strstart++,e.lookahead--,e.strm.avail_out===0)return Io}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(n=Xr(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart {let o,n,r,i;const a=e.window;for(;;){if(e.lookahead<=Kr){if(Na(e),e.lookahead<=Kr&&t===Yr)return Io;if(e.lookahead===0)break}if(e.match_length=0,e.lookahead>=zt&&e.strstart>0&&(r=e.strstart-1,n=a[r],n===a[++r]&&n===a[++r]&&n===a[++r])){i=e.strstart+Kr;do;while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&re.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=zt?(o=Xr(e,1,e.match_length-zt),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(o=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),o&&(nn(e,!1),e.strm.avail_out===0))return Io}return e.insert=0,t===mn?(nn(e,!0),e.strm.avail_out===0?ji:tl):e.sym_next&&(nn(e,!1),e.strm.avail_out===0)?Io:el},rK=(e,t)=>{let o;for(;;){if(e.lookahead===0&&(Na(e),e.lookahead===0)){if(t===Yr)return Io;break}if(e.match_length=0,o=Xr(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,o&&(nn(e,!1),e.strm.avail_out===0))return Io}return e.insert=0,t===mn?(nn(e,!0),e.strm.avail_out===0?ji:tl):e.sym_next&&(nn(e,!1),e.strm.avail_out===0)?Io:el};function Hn(e,t,o,n,r){this.good_length=e,this.max_lazy=t,this.nice_length=o,this.max_chain=n,this.func=r}const zl=[new Hn(0,0,0,0,G9),new Hn(4,4,8,4,k0),new Hn(4,5,16,8,k0),new Hn(4,6,32,32,k0),new Hn(4,4,16,16,ma),new Hn(8,16,32,32,ma),new Hn(8,16,128,128,ma),new Hn(8,32,128,256,ma),new Hn(32,128,258,1024,ma),new Hn(32,258,258,4096,ma)],iK=e=>{e.window_size=2*e.w_size,jr(e.head),e.max_lazy_match=zl[e.level].max_lazy,e.good_match=zl[e.level].good_length,e.nice_match=zl[e.level].nice_length,e.max_chain_length=zl[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=zt-1,e.match_available=0,e.ins_h=0};function aK(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ac,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(YU*2),this.dyn_dtree=new Uint16Array((2*ZU+1)*2),this.bl_tree=new Uint16Array((2*XU+1)*2),jr(this.dyn_ltree),jr(this.dyn_dtree),jr(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(QU+1),this.heap=new Uint16Array(2*I1+1),jr(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*I1+1),jr(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Gs=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.status!==Ha&&t.status!==k3&&t.status!==O1&&t.status!==L1&&t.status!==H1&&t.status!==N1&&t.status!==Mi&&t.status!==Rl?1:0},q9=e=>{if(Gs(e))return Ri(e,Gn);e.total_in=e.total_out=0,e.data_type=WU;const t=e.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?k3:t.wrap?Ha:Mi,e.adler=t.wrap===2?0:1,t.last_flush=-2,PU(t),Eo},Z9=e=>{const t=q9(e);return t===Eo&&iK(e.state),t},lK=(e,t)=>Gs(e)||e.state.wrap!==2?Gn:(e.state.gzhead=t,Eo),X9=(e,t,o,n,r,i)=>{if(!e)return Gn;let a=1;if(t===OU&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),r<1||r>jU||o!==ac||n<8||n>15||t<0||t>9||i<0||i>NU||n===8&&a!==1)return Ri(e,Gn);n===8&&(n=9);const l=new aK;return e.state=l,l.strm=e,l.status=Ha,l.wrap=a,l.gzhead=null,l.w_bits=n,l.w_size=1< X9(e,t,ac,UU,KU,VU),uK=(e,t)=>{if(Gs(e)||t>c5||t<0)return e?Ri(e,Gn):Gn;const o=e.state;if(!e.output||e.avail_in!==0&&!e.input||o.status===Rl&&t!==mn)return Ri(e,e.avail_out===0?E0:Gn);const n=o.last_flush;if(o.last_flush=t,o.pending!==0){if(Qo(e),e.avail_out===0)return o.last_flush=-1,Eo}else if(e.avail_in===0&&h5(t)<=h5(n)&&t!==mn)return Ri(e,E0);if(o.status===Rl&&e.avail_in!==0)return Ri(e,E0);if(o.status===Ha&&o.wrap===0&&(o.status=Mi),o.status===Ha){let r=ac+(o.w_bits-8<<4)<<8,i=-1;if(o.strategy>=ku||o.level<2?i=0:o.level<6?i=1:o.level===6?i=2:i=3,r|=i<<6,o.strstart!==0&&(r|=JU),r+=31-r%31,Sl(o,r),o.strstart!==0&&(Sl(o,e.adler>>>16),Sl(o,e.adler&65535)),e.adler=1,o.status=Mi,Qo(e),o.pending!==0)return o.last_flush=-1,Eo}if(o.status===k3){if(e.adler=0,Lt(o,31),Lt(o,139),Lt(o,8),o.gzhead)Lt(o,(o.gzhead.text?1:0)+(o.gzhead.hcrc?2:0)+(o.gzhead.extra?4:0)+(o.gzhead.name?8:0)+(o.gzhead.comment?16:0)),Lt(o,o.gzhead.time&255),Lt(o,o.gzhead.time>>8&255),Lt(o,o.gzhead.time>>16&255),Lt(o,o.gzhead.time>>24&255),Lt(o,o.level===9?2:o.strategy>=ku||o.level<2?4:0),Lt(o,o.gzhead.os&255),o.gzhead.extra&&o.gzhead.extra.length&&(Lt(o,o.gzhead.extra.length&255),Lt(o,o.gzhead.extra.length>>8&255)),o.gzhead.hcrc&&(e.adler=Co(e.adler,o.pending_buf,o.pending,0)),o.gzindex=0,o.status=O1;else if(Lt(o,0),Lt(o,0),Lt(o,0),Lt(o,0),Lt(o,0),Lt(o,o.level===9?2:o.strategy>=ku||o.level<2?4:0),Lt(o,eK),o.status=Mi,Qo(e),o.pending!==0)return o.last_flush=-1,Eo}if(o.status===O1){if(o.gzhead.extra){let r=o.pending,i=(o.gzhead.extra.length&65535)-o.gzindex;for(;o.pending+i>o.pending_buf_size;){let l=o.pending_buf_size-o.pending;if(o.pending_buf.set(o.gzhead.extra.subarray(o.gzindex,o.gzindex+l),o.pending),o.pending=o.pending_buf_size,o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex+=l,Qo(e),o.pending!==0)return o.last_flush=-1,Eo;r=0,i-=l}let a=new Uint8Array(o.gzhead.extra);o.pending_buf.set(a.subarray(o.gzindex,o.gzindex+i),o.pending),o.pending+=i,o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex=0}o.status=L1}if(o.status===L1){if(o.gzhead.name){let r=o.pending,i;do{if(o.pending===o.pending_buf_size){if(o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),Qo(e),o.pending!==0)return o.last_flush=-1,Eo;r=0}o.gzindex r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),o.gzindex=0}o.status=H1}if(o.status===H1){if(o.gzhead.comment){let r=o.pending,i;do{if(o.pending===o.pending_buf_size){if(o.gzhead.hcrc&&o.pending>r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r)),Qo(e),o.pending!==0)return o.last_flush=-1,Eo;r=0}o.gzindex r&&(e.adler=Co(e.adler,o.pending_buf,o.pending-r,r))}o.status=N1}if(o.status===N1){if(o.gzhead.hcrc){if(o.pending+2>o.pending_buf_size&&(Qo(e),o.pending!==0))return o.last_flush=-1,Eo;Lt(o,e.adler&255),Lt(o,e.adler>>8&255),e.adler=0}if(o.status=Mi,Qo(e),o.pending!==0)return o.last_flush=-1,Eo}if(e.avail_in!==0||o.lookahead!==0||t!==Yr&&o.status!==Rl){let r=o.level===0?G9(o,t):o.strategy===ku?rK(o,t):o.strategy===HU?nK(o,t):zl[o.level].func(o,t);if((r===ji||r===tl)&&(o.status=Rl),r===Io||r===ji)return e.avail_out===0&&(o.last_flush=-1),Eo;if(r===el&&(t===DU?$U(o):t!==c5&&(T1(o,0,0,!1),t===TU&&(jr(o.head),o.lookahead===0&&(o.strstart=0,o.block_start=0,o.insert=0))),Qo(e),e.avail_out===0))return o.last_flush=-1,Eo}return t!==mn?Eo:o.wrap<=0?f5:(o.wrap===2?(Lt(o,e.adler&255),Lt(o,e.adler>>8&255),Lt(o,e.adler>>16&255),Lt(o,e.adler>>24&255),Lt(o,e.total_in&255),Lt(o,e.total_in>>8&255),Lt(o,e.total_in>>16&255),Lt(o,e.total_in>>24&255)):(Sl(o,e.adler>>>16),Sl(o,e.adler&65535)),Qo(e),o.wrap>0&&(o.wrap=-o.wrap),o.pending!==0?Eo:f5)},dK=e=>{if(Gs(e))return Gn;const t=e.state.status;return e.state=null,t===Mi?Ri(e,IU):Eo},cK=(e,t)=>{let o=t.length;if(Gs(e))return Gn;const n=e.state,r=n.wrap;if(r===2||r===1&&n.status!==Ha||n.lookahead)return Gn;if(r===1&&(e.adler=xs(e.adler,t,o,0)),n.wrap=0,o>=n.w_size){r===0&&(jr(n.head),n.strstart=0,n.block_start=0,n.insert=0);let s=new Uint8Array(n.w_size);s.set(t.subarray(o-n.w_size,o),0),t=s,o=n.w_size}const i=e.avail_in,a=e.next_in,l=e.input;for(e.avail_in=o,e.next_in=0,e.input=t,Na(n);n.lookahead>=zt;){let s=n.strstart,u=n.lookahead-(zt-1);do n.ins_h=Qr(n,n.ins_h,n.window[s+zt-1]),n.prev[s&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=s,s++;while(--u);n.strstart=s,n.lookahead=zt-1,Na(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=zt-1,n.match_available=0,e.next_in=a,e.input=l,e.avail_in=i,n.wrap=r,Eo};var fK=sK,hK=X9,pK=Z9,mK=q9,gK=lK,vK=uK,bK=dK,xK=cK,yK="pako deflate (from Nodeca project)",ql={deflateInit:fK,deflateInit2:hK,deflateReset:pK,deflateResetKeep:mK,deflateSetHeader:gK,deflate:vK,deflateEnd:bK,deflateSetDictionary:xK,deflateInfo:yK};const CK=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var wK=function(e){const t=Array.prototype.slice.call(arguments,1);for(;t.length;){const o=t.shift();if(o){if(typeof o!="object")throw new TypeError(o+"must be non-object");for(const n in o)CK(o,n)&&(e[n]=o[n])}}return e},SK=e=>{let t=0;for(let n=0,r=e.length;n =252?6:e>=248?5:e>=240?4:e>=224?3:e>=192?2:1;ys[254]=ys[254]=1;var FK=e=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(e);let t,o,n,r,i,a=e.length,l=0;for(r=0;r>>6,t[i++]=128|o&63):o<65536?(t[i++]=224|o>>>12,t[i++]=128|o>>>6&63,t[i++]=128|o&63):(t[i++]=240|o>>>18,t[i++]=128|o>>>12&63,t[i++]=128|o>>>6&63,t[i++]=128|o&63);return t};const EK=(e,t)=>{if(t<65534&&e.subarray&&Y9)return String.fromCharCode.apply(null,e.length===t?e:e.subarray(0,t));let o="";for(let n=0;n {const o=t||e.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(e.subarray(0,t));let n,r;const i=new Array(o*2);for(r=0,n=0;n 4){i[r++]=65533,n+=l-1;continue}for(a&=l===2?31:l===3?15:7;l>1&&n 1){i[r++]=65533;continue}a<65536?i[r++]=a:(a-=65536,i[r++]=55296|a>>10&1023,i[r++]=56320|a&1023)}return EK(i,r)},_K=(e,t)=>{t=t||e.length,t>e.length&&(t=e.length);let o=t-1;for(;o>=0&&(e[o]&192)===128;)o--;return o<0||o===0?t:o+ys[e[o]]>t?o:t},Cs={string2buf:FK,buf2string:kK,utf8border:_K};function MK(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var Q9=MK;const J9=Object.prototype.toString,{Z_NO_FLUSH:RK,Z_SYNC_FLUSH:zK,Z_FULL_FLUSH:AK,Z_FINISH:PK,Z_OK:md,Z_STREAM_END:BK,Z_DEFAULT_COMPRESSION:$K,Z_DEFAULT_STRATEGY:DK,Z_DEFLATED:TK}=na;function qs(e){this.options=lc.assign({level:$K,method:TK,chunkSize:16384,windowBits:15,memLevel:8,strategy:DK},e||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Q9,this.strm.avail_out=0;let o=ql.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(o!==md)throw new Error(Wi[o]);if(t.header&&ql.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=Cs.string2buf(t.dictionary):J9.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,o=ql.deflateSetDictionary(this.strm,n),o!==md)throw new Error(Wi[o]);this._dict_set=!0}}qs.prototype.push=function(e,t){const o=this.strm,n=this.options.chunkSize;let r,i;if(this.ended)return!1;for(t===~~t?i=t:i=t===!0?PK:RK,typeof e=="string"?o.input=Cs.string2buf(e):J9.call(e)==="[object ArrayBuffer]"?o.input=new Uint8Array(e):o.input=e,o.next_in=0,o.avail_in=o.input.length;;){if(o.avail_out===0&&(o.output=new Uint8Array(n),o.next_out=0,o.avail_out=n),(i===zK||i===AK)&&o.avail_out<=6){this.onData(o.output.subarray(0,o.next_out)),o.avail_out=0;continue}if(r=ql.deflate(o,i),r===BK)return o.next_out>0&&this.onData(o.output.subarray(0,o.next_out)),r=ql.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===md;if(o.avail_out===0){this.onData(o.output);continue}if(i>0&&o.next_out>0){this.onData(o.output.subarray(0,o.next_out)),o.avail_out=0;continue}if(o.avail_in===0)break}return!0};qs.prototype.onData=function(e){this.chunks.push(e)};qs.prototype.onEnd=function(e){e===md&&(this.result=lc.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};function _3(e,t){const o=new qs(t);if(o.push(e,!0),o.err)throw o.msg||Wi[o.err];return o.result}function IK(e,t){return t=t||{},t.raw=!0,_3(e,t)}function OK(e,t){return t=t||{},t.gzip=!0,_3(e,t)}var LK=qs,HK=_3,NK=IK,VK=OK,WK=na,jK={Deflate:LK,deflate:HK,deflateRaw:NK,gzip:VK,constants:WK};const _u=16209,UK=16191;var KK=function(t,o){let n,r,i,a,l,s,u,d,c,h,f,p,g,v,b,C,k,w,_,M,E,P,z,$;const G=t.state;n=t.next_in,z=t.input,r=n+(t.avail_in-5),i=t.next_out,$=t.output,a=i-(o-t.avail_out),l=i+(t.avail_out-257),s=G.dmax,u=G.wsize,d=G.whave,c=G.wnext,h=G.window,f=G.hold,p=G.bits,g=G.lencode,v=G.distcode,b=(1< >>24,f>>>=w,p-=w,w=k>>>16&255,w===0)$[i++]=k&65535;else if(w&16){_=k&65535,w&=15,w&&(p >>=w,p-=w),p<15&&(f+=z[n++]< >>24,f>>>=w,p-=w,w=k>>>16&255,w&16){if(M=k&65535,w&=15,p
s){t.msg="invalid distance too far back",G.mode=_u;break e}if(f>>>=w,p-=w,w=i-a,M>w){if(w=M-w,w>d&&G.sane){t.msg="invalid distance too far back",G.mode=_u;break e}if(E=0,P=h,c===0){if(E+=u-w,w<_){_-=w;do $[i++]=h[E++];while(--w);E=i-M,P=$}}else if(c 2;)$[i++]=P[E++],$[i++]=P[E++],$[i++]=P[E++],_-=3;_&&($[i++]=P[E++],_>1&&($[i++]=P[E++]))}else{E=i-M;do $[i++]=$[E++],$[i++]=$[E++],$[i++]=$[E++],_-=3;while(_>2);_&&($[i++]=$[E++],_>1&&($[i++]=$[E++]))}}else if(w&64){t.msg="invalid distance code",G.mode=_u;break e}else{k=v[(k&65535)+(f&(1< >3,n-=_,p-=_<<3,f&=(1< {const s=l.bits;let u=0,d=0,c=0,h=0,f=0,p=0,g=0,v=0,b=0,C=0,k,w,_,M,E,P=null,z;const $=new Uint16Array(ga+1),G=new Uint16Array(ga+1);let H=null,q,W,L;for(u=0;u<=ga;u++)$[u]=0;for(d=0;d
=1&&$[h]===0;h--);if(f>h&&(f=h),h===0)return r[i++]=1<<24|64<<16|0,r[i++]=1<<24|64<<16|0,l.bits=1,0;for(c=1;c 0&&(e===g5||h!==1))return-1;for(G[1]=0,u=1;u p5||e===v5&&b>m5)return 1;for(;;){q=u-g,a[d]+1 =z?(W=H[a[d]-z],L=P[a[d]-z]):(W=96,L=0),k=1< >g)+w]=q<<24|W<<16|L|0;while(w!==0);for(k=1< >=1;if(k!==0?(C&=k-1,C+=k):C=0,d++,--$[u]===0){if(u===h)break;u=t[o+a[d]]}if(u>f&&(C&M)!==_){for(g===0&&(g=f),E+=c,p=u-g,v=1< p5||e===v5&&b>m5)return 1;_=C&M,r[_]=f<<24|p<<16|E-i|0}}return C!==0&&(r[E+C]=u-g<<24|64<<16|0),l.bits=f,0};var Zl=YK;const QK=0,eb=1,tb=2,{Z_FINISH:b5,Z_BLOCK:JK,Z_TREES:Mu,Z_OK:Ui,Z_STREAM_END:eG,Z_NEED_DICT:tG,Z_STREAM_ERROR:Cn,Z_DATA_ERROR:ob,Z_MEM_ERROR:nb,Z_BUF_ERROR:oG,Z_DEFLATED:x5}=na,sc=16180,y5=16181,C5=16182,w5=16183,S5=16184,F5=16185,E5=16186,k5=16187,_5=16188,M5=16189,gd=16190,ur=16191,M0=16192,R5=16193,R0=16194,z5=16195,A5=16196,P5=16197,B5=16198,Ru=16199,zu=16200,$5=16201,D5=16202,T5=16203,I5=16204,O5=16205,z0=16206,L5=16207,H5=16208,to=16209,rb=16210,ib=16211,nG=852,rG=592,iG=15,aG=iG,N5=e=>(e>>>24&255)+(e>>>8&65280)+((e&65280)<<8)+((e&255)<<24);function lG(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const ra=e=>{if(!e)return 1;const t=e.state;return!t||t.strm!==e||t.mode
ib?1:0},ab=e=>{if(ra(e))return Cn;const t=e.state;return e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=t.wrap&1),t.mode=sc,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(nG),t.distcode=t.distdyn=new Int32Array(rG),t.sane=1,t.back=-1,Ui},lb=e=>{if(ra(e))return Cn;const t=e.state;return t.wsize=0,t.whave=0,t.wnext=0,ab(e)},sb=(e,t)=>{let o;if(ra(e))return Cn;const n=e.state;return t<0?(o=0,t=-t):(o=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Cn:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=o,n.wbits=t,lb(e))},ub=(e,t)=>{if(!e)return Cn;const o=new lG;e.state=o,o.strm=e,o.window=null,o.mode=sc;const n=sb(e,t);return n!==Ui&&(e.state=null),n},sG=e=>ub(e,aG);let V5=!0,A0,P0;const uG=e=>{if(V5){A0=new Int32Array(512),P0=new Int32Array(32);let t=0;for(;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(Zl(eb,e.lens,0,288,A0,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;Zl(tb,e.lens,0,32,P0,0,e.work,{bits:5}),V5=!1}e.lencode=A0,e.lenbits=9,e.distcode=P0,e.distbits=5},db=(e,t,o,n)=>{let r;const i=e.state;return i.window===null&&(i.wsize=1< =i.wsize?(i.window.set(t.subarray(o-i.wsize,o),0),i.wnext=0,i.whave=i.wsize):(r=i.wsize-i.wnext,r>n&&(r=n),i.window.set(t.subarray(o-n,o-n+r),i.wnext),n-=r,n?(i.window.set(t.subarray(o-n,o),0),i.wnext=n,i.whave=i.wsize):(i.wnext+=r,i.wnext===i.wsize&&(i.wnext=0),i.whave {let o,n,r,i,a,l,s,u,d,c,h,f,p,g,v=0,b,C,k,w,_,M,E,P;const z=new Uint8Array(4);let $,G;const H=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(ra(e)||!e.output||!e.input&&e.avail_in!==0)return Cn;o=e.state,o.mode===ur&&(o.mode=M0),a=e.next_out,r=e.output,s=e.avail_out,i=e.next_in,n=e.input,l=e.avail_in,u=o.hold,d=o.bits,c=l,h=s,P=Ui;e:for(;;)switch(o.mode){case sc:if(o.wrap===0){o.mode=M0;break}for(;d<16;){if(l===0)break e;l--,u+=n[i++]< >>8&255,o.check=Co(o.check,z,2,0),u=0,d=0,o.mode=y5;break}if(o.head&&(o.head.done=!1),!(o.wrap&1)||(((u&255)<<8)+(u>>8))%31){e.msg="incorrect header check",o.mode=to;break}if((u&15)!==x5){e.msg="unknown compression method",o.mode=to;break}if(u>>>=4,d-=4,E=(u&15)+8,o.wbits===0&&(o.wbits=E),E>15||E>o.wbits){e.msg="invalid window size",o.mode=to;break}o.dmax=1<