diff --git a/README.md b/README.md index deb8550..95ccaa4 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ 👉 https://skymail.ink |  |  | -|---------------------|---------------------| +|--------------------------------------------------------|---------------------| |  |  | @@ -54,19 +54,47 @@ - **框架**:[Vue3](https://vuejs.org/) + [Element Plus](https://element-plus.org/) +- **Web框架**:[Hono](https://hono.dev/) + +- **ORM:**[Drizzle](https://orm.drizzle.team/) + +- **平台:** [Cloudflare workers](https://developers.cloudflare.com/workers/) + - **缓存**:[Cloudflare KV](https://developers.cloudflare.com/kv/) - **数据库**:[Cloudflare D1](https://developers.cloudflare.com/d1/) - **文件存储**:[Cloudflare R2](https://developers.cloudflare.com/r2/) -- **ORM:**[Drizzle ORM](https://orm.drizzle.team/) +## 使用教程 -## 项目配置 +[**👉小白保姆教程-界面部署**](https://doc.skymail.ink) + +### 环境要求 + + + +Nodejs v18.20 + + +Cloudflare 账号 + + +**克隆项目到本地** +``` shell +git clone https://github.com/LaziestRen/cloud-mail #拉取代码 +cd cloud-mail/mail-worker #进入worker目录 +``` + +**安装依赖** +```shell +npm i +``` + +**项目配置** ```toml [[d1_databases]] @@ -78,6 +106,7 @@ database_id = "" #d1数据库id binding = "kv" #kv绑定名默认不可修改 id = "" #kv数据库id +#(可选) [[r2_buckets]] binding = "r2" #r2对象存储绑定名默认不可修改 bucket_name = "" #r2对象存储桶的名字 @@ -90,13 +119,35 @@ directory = "./dist" #前端vue项目打包的静态资源存放位置, [vars] domain = [] #邮件域名可以配置多个 示例: ["example1.com","example2.com"] admin = "" #管理员的邮箱 示例: admin@example.com -r2_domain = "" #r2对象存储桶的访问域名 jwt_secret = "" #jwt令牌的密钥,随便填一串字符串 -site_key = "" #Turnstile人机验证的站点密钥 -secret_key = "" #Turnstile人机验证的后端密钥 +r2_domain = "" #r2对象存储桶的访问域名(可选) +site_key = "" #Turnstile人机验证的站点密钥(可选) +secret_key = "" #Turnstile人机验证的后端密钥(可选) ``` +**本地运行** + +本地开发环境,数据库会自动安装,无需创建 + +```shell +npm run dev +``` + + +**远程部署** + +在Cloudflare控制台创建KV和D1数据库,可选:R2对象存储,Turnstile人机验证 (这两个不配置附件和人机验证不可用) + +在 wrangler.toml 中配置对应环境变量 + +```shell +npm run deploy +``` + +然后进入域名管理->电子邮件->路由规则->Catch-all 地址. 这里选择发送到 worker, 然后选择创建的worker + + ## 目录结构 diff --git a/mail-vue/src/layout/aside/index.vue b/mail-vue/src/layout/aside/index.vue index e667111..376b190 100644 --- a/mail-vue/src/layout/aside/index.vue +++ b/mail-vue/src/layout/aside/index.vue @@ -31,7 +31,7 @@
diff --git a/mail-vue/src/views/test/index.vue b/mail-vue/src/views/test/index.vue index 52d2b3e..b4545db 100644 --- a/mail-vue/src/views/test/index.vue +++ b/mail-vue/src/views/test/index.vue @@ -20,7 +20,7 @@ justify-content: center; width: 100px; height: 50px; - margin: 10px; + marngin-bottom: 10px; text-align: center; border-radius: 4px; background: var(--el-color-danger-light-9); diff --git a/mail-worker/dist/assets/index-B67-0-m9.js b/mail-worker/dist/assets/index-BRburrSt.js similarity index 95% rename from mail-worker/dist/assets/index-B67-0-m9.js rename to mail-worker/dist/assets/index-BRburrSt.js index 0e637fe..7cc7798 100644 --- a/mail-worker/dist/assets/index-B67-0-m9.js +++ b/mail-worker/dist/assets/index-BRburrSt.js @@ -1,4 +1,4 @@ -var qT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wle=qT((mo,go)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();/** +var qT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var qle=qT((mo,go)=>{(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))o(r);new MutationObserver(r=>{for(const l of r)if(l.type==="childList")for(const s of l.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&o(s)}).observe(document,{childList:!0,subtree:!0});function n(r){const l={};return r.integrity&&(l.integrity=r.integrity),r.referrerPolicy&&(l.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?l.credentials="include":r.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l}function o(r){if(r.ep)return;r.ep=!0;const l=n(r);fetch(r.href,l)}})();/** * @vue/shared v3.5.13 * (c) 2018-present Yuxi (Evan) You and Vue contributors * @license MIT @@ -23,11 +23,11 @@ var qT=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var Wle=qT((mo,go `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[Iy]=this[Iy]={accessors:{}}).accessors,r=this.prototype;function l(s){const a=Va(s);o[a]||(II(r,s),o[a]=!0)}return Re.isArray(t)?t.forEach(l):l(t),this}};ro.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);Re.reduceDescriptors(ro.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}});Re.freezeMethods(ro);function jf(e,t){const n=this||lu,o=t||n,r=ro.from(o.headers);let l=o.data;return Re.forEach(e,function(a){l=a.call(n,l,r.normalize(),t?t.status:void 0)}),r.normalize(),l}function iS(e){return!!(e&&e.__CANCEL__)}function Ca(e,t,n){Et.call(this,e??"canceled",Et.ERR_CANCELED,t,n),this.name="CanceledError"}Re.inherits(Ca,Et,{__CANCEL__:!0});function uS(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new Et("Request failed with status code "+n.status,[Et.ERR_BAD_REQUEST,Et.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function MI(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function NI(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,l=0,s;return t=t!==void 0?t:1e3,function(u){const c=Date.now(),d=o[l];s||(s=c),n[r]=u,o[r]=c;let f=l,p=0;for(;f!==r;)p+=n[f++],f=f%e;if(r=(r+1)%e,r===l&&(l=(l+1)%e),c-s{if(!o._listeners)return;let l=o._listeners.length;for(;l-- >0;)o._listeners[l](r);o._listeners=null}),this.promise.then=r=>{let l;const s=new Promise(a=>{o.subscribe(a),l=a}).then(r);return s.cancel=function(){o.unsubscribe(l)},s},t(function(l,s,a){o.reason||(o.reason=new Ca(l,s,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new mS(function(r){t=r}),cancel:t}}};function ZI(e){return function(n){return e.apply(null,n)}}function QI(e){return Re.isObject(e)&&e.isAxiosError===!0}const Gp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gp).forEach(([e,t])=>{Gp[t]=e});function gS(e){const t=new Zl(e),n=YC(Zl.prototype.request,t);return Re.extend(n,Zl.prototype,t,{allOwnKeys:!0}),Re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return gS(rs(e,r))},n}const sn=gS(lu);sn.Axios=Zl;sn.CanceledError=Ca;sn.CancelToken=JI;sn.isCancel=iS;sn.VERSION=vS;sn.toFormData=zd;sn.AxiosError=Et;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=ZI;sn.isAxiosError=QI;sn.mergeConfig=rs;sn.AxiosHeaders=ro;sn.formToJSON=e=>aS(Re.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=hS.getAdapter;sn.HttpStatusCode=Gp;sn.default=sn;const{Axios:Jle,AxiosError:Zle,CanceledError:Qle,isCancel:ese,CancelToken:tse,VERSION:nse,all:ose,Cancel:rse,isAxiosError:lse,spread:sse,toFormData:ase,AxiosHeaders:ise,HttpStatusCode:use,formToJSON:cse,getAdapter:dse,mergeConfig:fse}=sn,eM="modulepreload",tM=function(e){return"/"+e},By={},Zr=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(n.map(u=>{if(u=tM(u),u in By)return;By[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":eM,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,v)=>{f.addEventListener("load",p),f.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return r.then(s=>{for(const a of s||[])a.status==="rejected"&&l(a.reason);return t().catch(l)})};/*! +`+l):o.stack=l}catch{}}throw o}}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=rs(this.defaults,n);const{transitional:o,paramsSerializer:r,headers:l}=n;o!==void 0&&oc.assertOptions(o,{silentJSONParsing:ar.transitional(ar.boolean),forcedJSONParsing:ar.transitional(ar.boolean),clarifyTimeoutError:ar.transitional(ar.boolean)},!1),r!=null&&(Re.isFunction(r)?n.paramsSerializer={serialize:r}:oc.assertOptions(r,{encode:ar.function,serialize:ar.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),oc.assertOptions(n,{baseUrl:ar.spelling("baseURL"),withXsrfToken:ar.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let s=l&&Re.merge(l.common,l[n.method]);l&&Re.forEach(["delete","get","head","post","put","patch","common"],m=>{delete l[m]}),n.headers=ro.concat(s,l);const a=[];let u=!0;this.interceptors.request.forEach(function(h){typeof h.runWhen=="function"&&h.runWhen(n)===!1||(u=u&&h.synchronous,a.unshift(h.fulfilled,h.rejected))});const c=[];this.interceptors.response.forEach(function(h){c.push(h.fulfilled,h.rejected)});let d,f=0,p;if(!u){const m=[Dy.bind(this),void 0];for(m.unshift.apply(m,a),m.push.apply(m,c),p=m.length,d=Promise.resolve(n);f
{if(!o._listeners)return;let l=o._listeners.length;for(;l-- >0;)o._listeners[l](r);o._listeners=null}),this.promise.then=r=>{let l;const s=new Promise(a=>{o.subscribe(a),l=a}).then(r);return s.cancel=function(){o.unsubscribe(l)},s},t(function(l,s,a){o.reason||(o.reason=new Ca(l,s,a),n(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=o=>{t.abort(o)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new mS(function(r){t=r}),cancel:t}}};function ZI(e){return function(n){return e.apply(null,n)}}function QI(e){return Re.isObject(e)&&e.isAxiosError===!0}const Gp={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Gp).forEach(([e,t])=>{Gp[t]=e});function gS(e){const t=new Zl(e),n=YC(Zl.prototype.request,t);return Re.extend(n,Zl.prototype,t,{allOwnKeys:!0}),Re.extend(n,t,null,{allOwnKeys:!0}),n.create=function(r){return gS(rs(e,r))},n}const sn=gS(lu);sn.Axios=Zl;sn.CanceledError=Ca;sn.CancelToken=JI;sn.isCancel=iS;sn.VERSION=vS;sn.toFormData=zd;sn.AxiosError=Et;sn.Cancel=sn.CanceledError;sn.all=function(t){return Promise.all(t)};sn.spread=ZI;sn.isAxiosError=QI;sn.mergeConfig=rs;sn.AxiosHeaders=ro;sn.formToJSON=e=>aS(Re.isHTMLForm(e)?new FormData(e):e);sn.getAdapter=hS.getAdapter;sn.HttpStatusCode=Gp;sn.default=sn;const{Axios:Qle,AxiosError:ese,CanceledError:tse,isCancel:nse,CancelToken:ose,VERSION:rse,all:lse,Cancel:sse,isAxiosError:ase,spread:ise,toFormData:use,AxiosHeaders:cse,HttpStatusCode:dse,formToJSON:fse,getAdapter:pse,mergeConfig:hse}=sn,eM="modulepreload",tM=function(e){return"/"+e},By={},Zr=function(t,n,o){let r=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const s=document.querySelector("meta[property=csp-nonce]"),a=(s==null?void 0:s.nonce)||(s==null?void 0:s.getAttribute("nonce"));r=Promise.allSettled(n.map(u=>{if(u=tM(u),u in By)return;By[u]=!0;const c=u.endsWith(".css"),d=c?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${d}`))return;const f=document.createElement("link");if(f.rel=c?"stylesheet":eM,c||(f.as="script"),f.crossOrigin="",f.href=u,a&&f.setAttribute("nonce",a),document.head.appendChild(f),c)return new Promise((p,v)=>{f.addEventListener("load",p),f.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${u}`)))})}))}function l(s){const a=new Event("vite:preloadError",{cancelable:!0});if(a.payload=s,window.dispatchEvent(a),!a.defaultPrevented)throw s}return r.then(s=>{for(const a of s||[])a.status==="rejected"&&l(a.reason);return t().catch(l)})};/*!
* vue-router v4.5.0
* (c) 2024 Eduardo San Martin Morote
* @license MIT
- */const Os=typeof document<"u";function yS(e){return typeof e=="object"||"displayName"in e||"props"in e||"__vccOpts"in e}function nM(e){return e.__esModule||e[Symbol.toStringTag]==="Module"||e.default&&yS(e.default)}const jt=Object.assign;function Uf(e,t){const n={};for(const o in t){const r=t[o];n[o]=Go(r)?r.map(e):e(r)}return n}const ui=()=>{},Go=Array.isArray,bS=/#/g,oM=/&/g,rM=/\//g,lM=/=/g,sM=/\?/g,wS=/\+/g,aM=/%5B/g,iM=/%5D/g,CS=/%5E/g,uM=/%60/g,SS=/%7B/g,cM=/%7C/g,_S=/%7D/g,dM=/%20/g;function Hv(e){return encodeURI(""+e).replace(cM,"|").replace(aM,"[").replace(iM,"]")}function fM(e){return Hv(e).replace(SS,"{").replace(_S,"}").replace(CS,"^")}function Xp(e){return Hv(e).replace(wS,"%2B").replace(dM,"+").replace(bS,"%23").replace(oM,"%26").replace(uM,"`").replace(SS,"{").replace(_S,"}").replace(CS,"^")}function pM(e){return Xp(e).replace(lM,"%3D")}function hM(e){return Hv(e).replace(bS,"%23").replace(sM,"%3F")}function vM(e){return e==null?"":hM(e).replace(rM,"%2F")}function xi(e){try{return decodeURIComponent(""+e)}catch{}return""+e}const mM=/\/$/,gM=e=>e.replace(mM,"");function qf(e,t,n="/"){let o,r={},l="",s="";const a=t.indexOf("#");let u=t.indexOf("?");return a=0&&(u=-1),u>-1&&(o=t.slice(0,u),l=t.slice(u+1,a>-1?a:t.length),r=e(l)),a>-1&&(o=o||t.slice(0,a),s=t.slice(a,t.length)),o=CM(o??t,n),{fullPath:o+(l&&"?")+l+s,path:o,query:r,hash:xi(s)}}function yM(e,t){const n=t.query?e(t.query):"";return t.path+(n&&"?")+n+(t.hash||"")}function Vy(e,t){return!t||!e.toLowerCase().startsWith(t.toLowerCase())?e:e.slice(t.length)||"/"}function bM(e,t,n){const o=t.matched.length-1,r=n.matched.length-1;return o>-1&&o===r&&Gs(t.matched[o],n.matched[r])&&kS(t.params,n.params)&&e(t.query)===e(n.query)&&t.hash===n.hash}function Gs(e,t){return(e.aliasOf||e)===(t.aliasOf||t)}function kS(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(!wM(e[n],t[n]))return!1;return!0}function wM(e,t){return Go(e)?zy(e,t):Go(t)?zy(t,e):e===t}function zy(e,t){return Go(t)?e.length===t.length&&e.every((n,o)=>n===t[o]):e.length===1&&e[0]===t}function CM(e,t){if(e.startsWith("/"))return e;if(!e)return t;const n=t.split("/"),o=e.split("/"),r=o[o.length-1];(r===".."||r===".")&&o.push("");let l=n.length-1,s,a;for(s=0;s {const o=Mr(e,t,n,"column");return[o.size,o.offset]},getRowPosition:(e,t,n)=>{const o=Mr(e,t,n,"row");return[o.size,o.offset]},getColumnOffset:(e,t,n,o,r,l)=>Mw(e,t,n,o,r,"column",l),getRowOffset:(e,t,n,o,r,l)=>Mw(e,t,n,o,r,"row",l),getColumnStartIndexForOffset:(e,t,n)=>Iw(e,n,t,"column"),getColumnStopIndexForStartIndex:(e,t,n,o)=>{const r=Mr(e,t,o,"column"),l=n+e.width;let s=r.offset+r.size,a=t;for(;aa&&(e.scrollTop=l-e.clientHeight)}function RL(e,t,n,o,r){const l=Date.now();let s;const a=()=>{const c=Date.now()-l,d=ML(c>o?o:c,t,n,o);Qd(e)?e.scrollTo(window.pageXOffset,d):e.scrollTop=d,ca&&(e.scrollTop=l-e.clientHeight)}function RL(e,t,n,o,r){const l=Date.now();let s;const a=()=>{const c=Date.now()-l,d=ML(c>o?o:c,t,n,o);Qd(e)?e.scrollTo(window.pageXOffset,d):e.scrollTop=d,cu.level-c.level),l=Object.create(null),s=Object.keys(o);r.forEach(u=>u.setChecked(!1,!1));const a=u=>{u.childNodes.forEach(c=>{var d;l[c.data[t]]=!0,(d=c.childNodes)!=null&&d.length&&a(c)})};for(let u=0,c=r.length;u