=We.limit&&(!We.values||ht.req.values)&&lV(ht.req.query.range,We.query.range)}),!1,je,Xe];case"count":return tt=Xe.find(function(ht){return kx(ht.req.query.range,We.query.range)}),[tt,!!tt,je,Xe]}}(x,P,"query",Q),Ne=Oe[0],Se=Oe[1],Be=Oe[2],Ie=Oe[3];return Ne&&Se?Ne.obsSet=Q.obsSet:(Se=z.query(Q).then(function($e){var Fe=$e.result;if(Ne&&(Ne.res=Fe),ce){for(var Le=0,We=Fe.length;LeP4.user.email,()=>O4());const mde={class:"send"},yde={class:"title"},bde={class:"title-left"},_de={class:"title-text"},wde={class:"sender"},Sde={class:"sender-name"},Cde={class:"send-email"},Tde={class:"container"},Ede={class:"item-title"},xde={class:"item-title"},kde={class:"button-item"},Mde={class:"att-list"},Ide={class:"att-filename"},Ade={class:"att-size"},Dde={__name:"index",setup(e,{expose:t}){t({open:A,openReply:M,openDraft:D});const{t:n}=Hr(),r=D4(),a=Ur(),i=eu(),o=Bs(),s=j({}),l=Vi(),u=j(!1),c=j(0);let f=null,d=!1;const h=j(""),p=Yt({receiveEmail:[],subject:"",content:"",sendType:""}),v=Yt({sendEmail:"",receiveEmail:[],accountId:-1,manyType:null,name:"",subject:"",content:"",sendType:"",text:"",emailId:0,attachments:[],draftId:null});function g(W){const V=Array.from(new Set(W.split(/[,,]/).map(O=>O.trim()).filter(O=>O)));v.receiveEmail.splice(v.receiveEmail.length-1,1),V.forEach(O=>{Vl(O)&&!v.receiveEmail.includes(O)&&v.receiveEmail.push(O)})}function m(){v.manyType=v.manyType?null:"divide"}function y(){Ta.confirm(n("clearContentConfirm"),{confirmButtonText:n("confirm"),cancelButtonText:n("cancel"),type:"warning"}).then(()=>{T()})}function w(W){v.attachments.splice(W,1)}function _(){const W=document.createElement("input");W.setAttribute("type","file"),W.click(),W.onchange=async V=>{const O=V.target.files[0],F=O.size,R=O.name,L=O.type;if(v.attachments.reduce((ee,se)=>ee+se.size,0)+F>29360128){It({message:n("attLimitMsg"),type:"error",plain:!0});return}const X=await jfe(O);v.attachments.push({content:X,filename:R,size:F,contentType:L})}}async function S(){if(v.receiveEmail.length===0){It({message:n("emptyRecipientMsg"),type:"error",plain:!0});return}if(!v.subject){It({message:n("emptySubjectMsg"),type:"error",plain:!0});return}if(!v.content){It({message:n("emptyContentMsg"),type:"error",plain:!0});return}if(v.manyType==="divide"&&v.attachments.length>0){It({message:n("noSeparateSendMsg"),type:"error",plain:!0});return}if(d){It({message:n("sendingErrorMsg"),type:"error",plain:!0});return}f=It({message:()=>Tt(rde,{value:c.value,desc:n("sending")}),dangerouslyUseHTMLString:!0,plain:!0,duration:0,customClass:"message-bottom"}),d=!0,u.value=!1,Qfe(v,W=>{c.value=Math.round(W.loaded*98/W.total)}).then(W=>{const V=W[0];W.forEach(O=>{i.sendScroll?.addItem(O)}),sI({title:n("sendSuccessMsg"),type:"success",message:Tt("span",{style:"color: teal"},V.subject),position:"bottom-right"}),l.refreshUserInfo(),v.draftId&&(v.subject="",v.content="",v.receiveEmail=[],r.setDraft={...on(v)}),T(),u.value=!1}).catch(W=>{sI({title:n("sendFailMsg"),type:W.code===403?"warning":"error",message:Tt("span",{style:"color: teal"},W.message),position:"bottom-right"}),u.value=!0}).finally(()=>{f.close(),c.value=0,d=!1})}function T(){v.receiveEmail=[],v.subject="",v.content="",v.manyType=null,v.attachments=[],v.sendType="",v.emailId=0,v.draftId=null,p.content="",p.subject="",p.receiveEmail=[],p.sendType="",s.value.clearEditor()}function E(W,V){v.content=W,v.text=V}function M(W){T(),W.subject=W.subject||"",v.receiveEmail.push(W.sendEmail),v.subject=W.subject.startsWith("Re:")||W.subject.startsWith("回复:")?W.subject:"Re: "+W.subject,v.sendType="reply",v.emailId=W.emailId,h.value="",setTimeout(()=>{h.value=`
+
+
+
+ ${A4(W.createTime)} ${W.name} <${W.sendEmail}> ${n("wrote")}:
+
+
+
+ ${k(W.content)||`${W.text}`}
+
+
`,A(),Bt(()=>{p.content=s.value.getContent(),p.subject=v.subject,p.receiveEmail=v.receiveEmail,p.sendType=v.sendType})})}function k(W){W=W||"";const V=a.settings.r2Domain;return W.replace(/{{domain}}/g,V+"/")}function A(){o.currentAccount.email?(v.sendEmail=o.currentAccount.email,v.accountId=o.currentAccount.accountId,v.name=o.currentAccount.name):(v.sendEmail=l.user.email,v.accountId=l.user.accountId,v.name=l.user.name),u.value=!0,s.value.focus()}function D(W){Object.assign(v,{...W}),h.value="",setTimeout(()=>h.value=v.content),u.value=!0,s.value.focus()}const B=W=>{W.key==="Escape"&&Y()};Gt(()=>{window.addEventListener("keydown",B)}),Xo(()=>{window.removeEventListener("keydown",B)});function Y(){if(v.draftId){r.setDraft={...on(v)},u.value=!1,T();return}if(!(v.content||v.subject||v.receiveEmail.length>0)){u.value=!1,T();return}if(p.sendType==="reply"){let W=v.subject===p.subject,V=s.value.getContent()===p.content,O=v.receiveEmail.length===1&&v.receiveEmail[0]===p.receiveEmail[0];if(W&&V&&O){T(),Y();return}}Ta.confirm(n("saveDraftConfirm"),{confirmButtonText:n("confirm"),cancelButtonText:n("cancel"),type:"warning",distinguishCancelAndClose:!0}).then(async()=>{const W={...on(v)};delete W.draftId,delete W.attachments,W.createTime=xt().utc().format("YYYY-MM-DD HH:mm:ss");const V=await Si.value.draft.add({...W});Si.value.att.add({draftId:V,attachments:on(v.attachments)}),r.refreshList++,u.value=!1}).catch(W=>{W==="cancel"&&(u.value=!1,T())})}return(W,V)=>{const O=a2,F=Or,R=Xr;return Ot((N(),te("div",mde,[I("div",{class:"write-box",onClick:V[2]||(V[2]=Lt(()=>{},["stop"]))},[I("div",yde,[I("div",bde,[I("span",_de,[H(b(ot),{icon:"hugeicons:quill-write-01",width:"28",height:"28"})]),I("span",wde,ae(W.$t("sender"))+":",1),I("span",Sde,ae(v.name),1),I("span",Cde,"<"+ae(v.sendEmail)+">",1)]),I("div",{onClick:Y,style:{cursor:"pointer"}},[H(b(ot),{icon:"material-symbols-light:close-rounded",width:"22",height:"22"})])]),I("div",Tde,[H(O,{onAddTag:g,"tag-type":"primary",size:"default",modelValue:v.receiveEmail,"onUpdate:modelValue":V[0]||(V[0]=L=>v.receiveEmail=L),placeholder:W.$t("ruleEmailsInputDesc")},{prefix:J(()=>[I("div",Ede,ae(W.$t("recipient")),1)]),suffix:J(()=>[I("span",{class:q(["distribute",v.manyType?"checked":""]),onClick:Lt(m,["stop"])},ae(W.$t("sendSeparately")),3)]),_:1},8,["modelValue","placeholder"]),H(F,{modelValue:v.subject,"onUpdate:modelValue":V[1]||(V[1]=L=>v.subject=L),placeholder:W.$t("subjectInputDesc")},{prefix:J(()=>[I("div",xde,ae(W.$t("subject")),1)]),_:1},8,["modelValue","placeholder"]),H(Zfe,{"def-value":h.value,ref_key:"editor",ref:s,onChange:E},null,8,["def-value"]),I("div",kde,[I("div",{class:"att-add",onClick:_},[H(b(ot),{icon:"iconamoon:attachment-fill",width:"24",height:"24"})]),I("div",{class:"att-clear",onClick:y},[H(b(ot),{icon:"icon-park-outline:clear-format",width:"24",height:"24 "})]),I("div",Mde,[(N(!0),te(bt,null,rn(v.attachments,(L,U)=>(N(),te("div",{class:"att-item",key:U},[H(b(ot),{icon:b(I4)(L.filename),width:"20",height:"20"},null,8,["icon"]),I("span",Ide,ae(L.filename),1),I("span",Ade,ae(b(k4)(L.size)),1),H(b(ot),{style:{cursor:"pointer"},icon:"material-symbols-light:close-rounded",onClick:X=>w(U),width:"22",height:"22"},null,8,["onClick"])]))),128))]),I("div",null,[v.sendType==="reply"?(N(),pe(R,{key:0,type:"primary",onClick:S},{default:J(()=>[nt(ae(W.$t("reply")),1)]),_:1})):(N(),pe(R,{key:1,type:"primary",onClick:S},{default:J(()=>[nt(ae(W.$t("send")),1)]),_:1}))])])])])],512)),[[In,u.value]])}}},Pde=sr(Dde,[["__scopeId","data-v-b6266946"]]),Ode={__name:"index",setup(e){const t=Ql(),n=j({}),r=j(window.innerWidth<1025),a=()=>{r.value=window.innerWidth<1025,t.asideShow=window.innerWidth>1024};return Gt(()=>{t.writerRef=n,window.addEventListener("resize",a),a()}),ar(()=>{window.removeEventListener("resize",a)}),(i,o)=>{const s=rZ,l=aZ,u=iZ,c=nZ;return N(),te(bt,null,[H(c,{class:"layout"},{default:J(()=>[H(s,{class:q(["aside",b(t).asideShow?"aside-show":"el-aside-hide"])},{default:J(()=>[H(Lce)]),_:1},8,["class"]),I("div",{class:q(b(t).asideShow&&r.value?"overlay-show":"overlay-hide"),onClick:o[0]||(o[0]=f=>b(t).asideShow=!1)},null,2),H(c,{class:"main-container"},{default:J(()=>[H(u,null,{default:J(()=>[H(l,null,{default:J(()=>[H(ife)]),_:1}),H(Efe)]),_:1})]),_:1})]),_:1}),H(Pde,{ref_key:"writerRef",ref:n},null,512)],64)}}},Lde=sr(Ode,[["__scopeId","data-v-517b6d1b"]]),Rde=Object.freeze(Object.defineProperty({__proto__:null,default:Lde},Symbol.toStringTag,{value:"Module"})),$de={class:"email-container"},Nde={class:"header-actions"},Fde={class:"header-right"},Bde={key:0,class:"email-count"},Vde={class:"scroll-box","infinite-scroll-immediate":!1,"infinite-scroll-distance":"600"},zde=["data-checked","onClick"],Hde=["onClick"],Ude={key:1},Wde={key:0,class:"email-status"},Kde={key:1},Yde={class:"name"},jde={class:"phone-time"},Gde={class:"email-text"},qde={class:"email-subject"},Xde={class:"email-content"},Zde={key:0,class:"user-info"},Jde={class:"user"},Qde={class:"account"},ehe={key:0,class:"del-status"},the={class:"email-time"},nhe={key:0,class:"follow-loading"},rhe={key:1,class:"noLoading"},ahe={key:2,class:"empty"},ihe={__name:"index",props:{getEmailList:Function,emailDelete:Function,starAdd:Function,starCancel:Function,cancelSuccess:Function,starSuccess:Function,actionLeft:{type:String,default:"0"},timeSort:{type:Number,default:0},showStatus:{type:Boolean,default:!1},showAccountIcon:{type:Boolean,default:!0},showUserInfo:{type:Boolean,default:!1},showStar:{type:Boolean,default:!0},allowStar:{type:Boolean,default:!0},type:{type:String,default:""}},emits:["jump","refresh-before","delete-draft"],setup(e,{expose:t,emit:n}){const r=e,a=n,{t:i}=Hr(),o=Ur(),s=Ql(),l=eu(),u=j(!1),c=j(!1),f=j(!1),d=Yt([]),h=j(0),p=j(!1),v=j(!1),g=j(null),m=j(!0);let y=0;const w=j(null),_=j(null);let S=!1,T=window.innerWidth<1025;const E=Yt({emailId:0,size:30});t({refreshList:me,deleteEmail:V,addItem:O,emailList:d,firstLoad:m,latestEmail:w,noLoading:f,total:h}),Dp(()=>{g.value.scrollTop=y}),ee(),Qoe(()=>{y=g.value.scrollTop}),Je(()=>d.map(le=>le.checked),()=>{d.length>0&&U()},{deep:!0}),Je(()=>l.deleteIds,()=>{l.deleteIds&&V(l.deleteIds)}),Je(()=>l.cancelStarEmailId,()=>{d.forEach(le=>{le.emailId===l.cancelStarEmailId&&(le.isStar=0)})}),Je(()=>l.addStarEmailId,()=>{d.forEach(le=>{le.emailId===l.addStarEmailId&&(le.isStar=1)})});const M=G(()=>s.accountShow&&o.settings.manyEmail===0);function k(le){}function A(le){if(le.content){const fe=document.createElement("div");fe.innerHTML=le.content.replace(/<(img|iframe|object|embed|video|audio|source|link)[^>]*>/gi,""),fe.querySelectorAll("script, style, title").forEach(ze=>ze.remove());let he=fe.textContent||fe.innerText||"";return he=he.replace(/\s+/g," ").trim(),D(he)}return le.text?D(le.text):""}function D(le){return le.replace(/[\u200B-\u200F\uFEFF\u034F\u200B-\u200F\u00A0\u3000\u00AD]/g,"").replace(/\s+/g," ").trim()}function B(le){if(le.isStar)le.isStar=0,r.starCancel(le.emailId).then(()=>{le.isStar=0,r.cancelSuccess?.(le)}).catch(fe=>{console.error(fe),le.isStar=1});else{if(!r.allowStar)return;le.isStar=1,r.starAdd(le.emailId).then(()=>{le.isStar=1,r.starSuccess(le)}).catch(fe=>{console.error(fe),le.isStar=0})}}function Y(){s.accountShow=!s.accountShow}const W=()=>{Ta.confirm(i("delEmailsConfirm"),{confirmButtonText:i("confirm"),cancelButtonText:i("cancel"),type:"warning"}).then(()=>{if(r.type==="draft"){const fe=L();a("delete-draft",fe);return}const le=R();r.emailDelete(le).then(()=>{It({message:i("delSuccessMsg"),type:"success",plain:!0}),l.deleteIds=le})})};function V(le){le.forEach(fe=>{d.forEach((ke,he)=>{fe===ke.emailId&&d.splice(he,1)})}),d.lengthhe.emailId===le.emailId)>-1)return;if(r.timeSort){f.value&&(d.push(le),w.value=le),h.value++;return}const ke=d.findIndex(he=>he.emailIdfe.checked=le),v.value=!1}function R(){return d.filter(le=>le.checked).map(le=>le.emailId)}function L(){return d.filter(le=>le.checked).map(le=>le.draftId)}function U(){const le=d.filter(fe=>fe.checked).length;p.value=le===d.length,v.value=le>0&&le{m.value=!1;let ke=fe.list.map(he=>({...he,checked:!1}));le&&(d.length=0),w.value=fe.latestEmail,d.push(...ke),le&&_.value?.setScrollTop(0),f.value=fe.list.length=E.size,h.value=fe.total,E.emailId=fe.list.length>0?fe.list.at(-1).emailId:0}).finally(()=>{u.value=!1,S=!1})}}function se(){a("refresh-before"),me()}function me(){p.value=!1,v.value=!1,E.emailId=0,ee(!0)}function xe(){ee()}return(le,fe)=>{const ke=Bl,he=$s,ze=Sc,Ye=O0,Z=Pa,oe=Os("perm"),de=z3;return N(),te("div",$de,[I("div",Nde,[H(ke,{modelValue:p.value,"onUpdate:modelValue":fe[0]||(fe[0]=Te=>p.value=Te),indeterminate:v.value,disabled:!d.length,onChange:F},null,8,["modelValue","indeterminate","disabled"]),I("div",{class:"header-left",style:zt("padding-left:"+e.actionLeft)},[Ue(le.$slots,"first",{},void 0,!0),H(b(ot),{class:"icon",icon:"ion:reload",width:"18",height:"18",onClick:se}),R().length>0?Ot((N(),pe(b(ot),{key:0,class:"icon",icon:"uiw:delete",width:"16",height:"16",onClick:W},null,512)),[[oe,"email:delete"]]):Ee("",!0)],4),I("div",Fde,[h.value?(N(),te("span",Bde,ae(le.$t("emailCount",{total:h.value})),1)):Ee("",!0),e.showAccountIcon?(N(),pe(b(ot),{key:1,class:"more-icon icon",width:"16",height:"16",icon:"akar-icons:dot-grid-fill",onClick:Y})):Ee("",!0)])]),I("div",{ref_key:"scroll",ref:g,class:"scroll"},[H(Z,{ref_key:"scrollbarRef",ref:_,onScroll:k},{default:J(()=>[Ot((N(),te("div",Vde,[(N(!0),te(bt,null,rn(d,Te=>(N(),te("div",{key:Te.emailId},[I("div",{class:"email-row","data-checked":Te.checked,onClick:Ce=>X(Te)},[H(ke,{class:q(r.type==="all-email"?"all-email-checkbox":"checkbox"),modelValue:Te.checked,"onUpdate:modelValue":Ce=>Te.checked=Ce,onClick:fe[1]||(fe[1]=Lt(()=>{},["stop"]))},null,8,["class","modelValue","onUpdate:modelValue"]),e.showStar?(N(),te("div",{key:0,onClick:Lt(Ce=>B(Te),["stop"]),class:"pc-star"},[Te.isStar?(N(),pe(b(ot),{key:0,icon:"fluent-color:star-16",width:"20",height:"20"})):(N(),pe(b(ot),{key:1,icon:"solar:star-line-duotone",width:"18",height:"18"}))],8,Hde)):Ee("",!0),e.showStar?Ee("",!0):(N(),te("div",Ude)),I("div",{class:q(["title",(M.value,"title-column")])},[I("div",{class:"email-sender",style:zt(e.showStatus?"gap: 10px;":"")},[e.showStatus?(N(),te("div",Wde,[Te.status===0?(N(),pe(he,{key:0,effect:"dark",content:le.$t("received")},{default:J(()=>[H(b(ot),{icon:"ic:round-mark-email-read",style:{color:"#67C23A"},width:"20",height:"20"}),fe[2]||(fe[2]=nt(" /> "))]),_:1},8,["content"])):Ee("",!0),Te.status===1?(N(),pe(he,{key:1,effect:"dark",content:le.$t("sent")},{default:J(()=>[H(b(ot),{icon:"bi:send-arrow-up-fill",style:{color:"#67C23A"},width:"20",height:"20"})]),_:1},8,["content"])):Ee("",!0),Te.status===2?(N(),pe(he,{key:2,effect:"dark",content:le.$t("delivered")},{default:J(()=>[H(b(ot),{icon:"bi:send-check-fill",style:{color:"#67C23A"},width:"20",height:"20"})]),_:1},8,["content"])):Ee("",!0),Te.status===3?(N(),pe(he,{key:3,effect:"dark",content:le.$t("bounced")},{default:J(()=>[H(b(ot),{icon:"bi:send-x-fill",style:{color:"#F56C6C"},width:"20",height:"20"})]),_:1},8,["content"])):Ee("",!0),Te.status===4?(N(),pe(he,{key:4,effect:"dark",content:le.$t("complained")},{default:J(()=>[H(b(ot),{icon:"bi:send-exclamation-fill",style:{color:"#FBBD08"},width:"20",height:"20"})]),_:1},8,["content"])):Ee("",!0),Te.status===5?(N(),pe(he,{key:5,effect:"dark",content:le.$t("delayed")},{default:J(()=>[H(b(ot),{icon:"bi:send-arrow-up-fill",style:{color:"#FBBD08"},width:"20",height:"20"})]),_:1},8,["content"])):Ee("",!0),Te.status===7?(N(),pe(he,{key:6,effect:"dark",content:le.$t("noRecipient")},{default:J(()=>[H(b(ot),{icon:"ic:round-mark-email-read",style:{color:"#FBBD08"},width:"20",height:"20"})]),_:1},8,["content"])):Ee("",!0)])):(N(),te("div",Kde)),I("span",Yde,[I("span",null,[Ue(le.$slots,"name",{email:Te},()=>[nt(ae(Te.name),1)],!0)]),I("span",null,[Te.isStar?(N(),pe(b(ot),{key:0,icon:"fluent-color:star-16",width:"18",height:"18"})):Ee("",!0)])]),I("span",jde,ae(b(GA)(Te.createTime)),1)],4),I("div",null,[I("div",Gde,[I("span",qde,[Ue(le.$slots,"subject",{email:Te},()=>[nt(ae(Te.subject),1)],!0)]),I("span",Xde,ae(A(Te)),1)]),e.showUserInfo?(N(),te("div",Zde,[I("div",Jde,[I("span",null,[H(b(ot),{icon:"mynaui:user",width:"20",height:"20"})]),I("span",null,ae(Te.userEmail),1)]),I("div",Qde,[I("span",null,[H(b(ot),{icon:"mdi-light:email",width:"20",height:"20"})]),I("span",null,ae(Te.type===0?Te.toEmail:Te.sendEmail),1)]),Te.isDel?(N(),te("div",ehe,[H(ze,{type:"danger",size:"small"},{default:J(()=>[nt(ae(le.$t("deleted")),1)]),_:1})])):Ee("",!0)])):Ee("",!0)])],2),I("div",{class:"email-right",style:zt(e.showUserInfo?"align-self: start;":"")},[I("span",the,ae(b(GA)(Te.createTime)),1)],4)],8,zde)]))),128)),I("div",{class:q(["loading",u.value?"loading-show":"loading-hide"])},[H(Ms)],2),c.value?(N(),te("div",nhe,[H(Ms)])):Ee("",!0),f.value&&d.length>0?(N(),te("div",rhe,[I("div",null,ae(le.$t("noMoreData")),1)])):Ee("",!0),f.value&&d.length===0?(N(),te("div",ahe,[H(Ye,{"image-size":b(T)?120:0,description:le.$t("noMessagesFound")},null,8,["image-size","description"])])):Ee("",!0)])),[[de,xe]])]),_:3},512)],512)])}}},Gp=sr(ihe,[["__scopeId","data-v-d53e1742"]]);function nd(e){return Zt.post("/star/add",{emailId:e})}function rd(e){return Zt.delete("/star/cancel",{params:{emailId:e}})}function ohe(e,t){return Zt.get("/star/list",{params:{emailId:e,size:t}})}function she(e){return new Promise(t=>setTimeout(t,e))}const lhe=Object.assign({name:"email"},{__name:"index",setup(e){const t=eu(),n=Bs(),r=Ur(),a=j({}),i=Yt({timeSort:0});Gt(()=>{t.emailScroll=a,u()}),Je(()=>n.currentAccountId,()=>{a.value.refreshList()});function o(){i.timeSort=i.timeSort?0:1,a.value.refreshList()}function s(h){t.contentData.email=h,t.contentData.delType="logic",t.contentData.showStar=!0,t.contentData.showReply=!0,er.push("/message")}const l=new Set;async function u(){for(;;){const h=a.value.latestEmail?.emailId||0;if(!a.value.firstLoad&&r.settings.autoRefreshTime)try{const p=n.currentAccountId,v=i.timeSort,g=await Jfe(h,p);p===n.currentAccountId&&i.timeSort===v&&g.length>0&&g.forEach(m=>{l.add(m.emailId),a.value.addItem(m)})}catch(p){console.error(p)}await she(r.settings.autoRefreshTime*1e3)}}function c(h){t.starScroll?.addItem(h)}function f(h){t.starScroll?.deleteEmail([h.emailId])}function d(h,p){return M4(n.currentAccountId,h,i.timeSort,p,0)}return(h,p)=>(N(),pe(Gp,{ref_key:"scroll",ref:a,"cancel-success":f,"star-success":c,getEmailList:d,emailDelete:b(jp),"star-add":b(nd),"star-cancel":b(rd),"time-sort":i.timeSort,actionLeft:"4px",onJump:s},{first:J(()=>[i.timeSort===0?(N(),pe(b(ot),{key:0,class:"icon",onClick:o,icon:"material-symbols-light:timer-arrow-down-outline",width:"28",height:"28"})):(N(),pe(b(ot),{key:1,class:"icon",onClick:o,icon:"material-symbols-light:timer-arrow-up-outline",width:"28",height:"28"}))]),_:1},8,["emailDelete","star-add","star-cancel","time-sort"]))}}),uhe=Object.freeze(Object.defineProperty({__proto__:null,default:lhe},Symbol.toStringTag,{value:"Module"})),che={__name:"index",props:{html:{type:String,required:!0}},setup(e){const t=e,n=j(null),r=j(null);let a=null;function i(){const l=document.createElement("style");l.textContent=`
+ @font-face {
+ font-family: 'HarmonyOS';
+ src: url('@/assets/fonts/HarmonyOS_Sans_SC_Regular.woff2') format('woff2');
+ font-display: swap;
+ }
+ `,document.head.appendChild(l)}function o(){if(!a)return;const l=/]*style="([^"]*)"[^>]*>/i,u=t.html.match(l),c=u?u[1]:"",f=t.html.replace(/<\/?body[^>]*>/gi,"");a.innerHTML=`
+
+
+ ${f}
+
+ `}function s(){if(!a||!r.value)return;const l=r.value,u=a.querySelector(".shadow-content");if(!u)return;const c=l.offsetWidth,f=l.offsetHeight,d=u.scrollWidth,h=u.scrollHeight;if(d===0||h===0)return;const p=c/d,v=f/h,g=Math.min(p,v),m=a.host;m.style.zoom=g}return Gt(()=>{i(),a=n.value.attachShadow({mode:"open"}),o(),s()}),Je(()=>t.html,()=>{o(),s()}),(l,u)=>(N(),te("div",{class:"content-box",ref_key:"contentBox",ref:r},[I("div",{ref_key:"container",ref:n,class:"content-html"},null,512)],512))}},fhe=sr(che,[["__scopeId","data-v-01c24297"]]);function dhe(e){return Zt.get("/allEmail/list",{params:{...e}})}function L4(e){return Zt.delete("/allEmail/delete?emailIds="+e)}const hhe={class:"box"},phe={class:"header-actions"},vhe={key:0,class:"star"},ghe={class:"container"},mhe={class:"email-title"},yhe={class:"content"},bhe={class:"email-info"},_he={class:"send"},whe={class:"send-source"},She={class:"send-name"},Che={class:"send-name-title"},The={class:"receive"},Ehe={class:"source"},xhe={class:"receive-email"},khe={class:"date"},Mhe={key:1,class:"email-text"},Ihe={key:0,class:"att"},Ahe={class:"att-title"},Dhe={class:"att-box"},Phe=["onClick"],Ohe=["onClick"],Lhe={style:{color:"rgba(24, 36, 48, 0.6)"}},Rhe={class:"opt-icon att-icon"},$he=["href"],Nhe={__name:"index",setup(e){const t=Ql(),n=Ur(),r=Bs(),a=eu(),i=use(),o=a.contentData.email,s=j(!1),l=Yt([]),{t:u}=Hr();Je(()=>r.currentAccountId,()=>{m()});function c(){t.writerRef.openReply(o)}function f(w){return w?JSON.parse(w).message:""}function d(w){w=w||"";const _=n.settings.r2Domain;return w.replace(/{{domain}}/g,_+"/")}function h(w){if(!p(w))return;const _=Nf(w);l.length=0,l.push(_),s.value=!0}function p(w){return["png","jpg","jpeg","bmp","gif","jfif"].includes(x4(w))}function v(w){return w=JSON.parse(w),w.map(_=>_.address).join(", ")}function g(){o.isStar?(o.isStar=0,rd(o.emailId).then(()=>{o.isStar=0,a.cancelStarEmailId=o.emailId,setTimeout(()=>a.cancelStarEmailId=0),a.starScroll?.deleteEmail([o.emailId])}).catch(w=>{console.error(w),o.isStar=1})):(o.isStar=1,nd(o.emailId).then(()=>{o.isStar=1,a.addStarEmailId=o.emailId,setTimeout(()=>a.addStarEmailId=0),a.starScroll?.addItem(o)}).catch(w=>{console.error(w),o.isStar=0}))}const m=()=>{i.back()},y=()=>{Ta.confirm(u("delEmailConfirm"),{confirmButtonText:u("confirm"),cancelButtonText:u("cancel"),type:"warning"}).then(()=>{a.contentData.delType==="logic"?jp(o.emailId).then(()=>{It({message:u("delSuccessMsg"),type:"success",plain:!0}),a.deleteIds=[o.emailId]}):L4(o.emailId).then(()=>{It({message:u("delSuccessMsg"),type:"success",plain:!0}),a.deleteIds=[o.emailId]}),i.back()})};return(w,_)=>{const S=IY,T=Pa,E=c3,M=Os("perm");return N(),te("div",hhe,[I("div",phe,[H(b(ot),{class:"icon",icon:"material-symbols-light:arrow-back-ios-new",width:"20",height:"20",onClick:m}),Ot(H(b(ot),{class:"icon",icon:"uiw:delete",width:"16",height:"16",onClick:y},null,512),[[M,"email:delete"]]),b(a).contentData.showStar?(N(),te("span",vhe,[b(o).isStar?(N(),pe(b(ot),{key:0,class:"icon",onClick:g,icon:"fluent-color:star-16",width:"21",height:"20"})):(N(),pe(b(ot),{key:1,class:"icon",onClick:g,icon:"solar:star-line-duotone",width:"19",height:"19"}))])):Ee("",!0),b(a).contentData.showReply?Ot((N(),pe(b(ot),{key:1,class:"icon",onClick:c,icon:"carbon:reply",width:"20",height:"20"},null,512)),[[M,"email:send"]]):Ee("",!0)]),_[1]||(_[1]=I("div",null,null,-1)),H(T,{class:"scrollbar"},{default:J(()=>[I("div",ghe,[I("div",mhe,ae(b(o).subject),1),I("div",yhe,[I("div",bhe,[I("div",null,[I("div",_he,[I("span",whe,ae(w.$t("from")),1),I("div",She,[I("span",Che,ae(b(o).name),1),I("span",null,"<"+ae(b(o).sendEmail)+">",1)])]),I("div",The,[I("span",Ehe,ae(w.$t("recipient")),1),I("span",xhe,ae(v(b(o).recipient)),1)]),I("div",khe,[I("div",null,ae(b(A4)(b(o).createTime)),1)])]),b(o).status===3?(N(),pe(S,{key:0,closable:!1,title:`${w.$t("bounced")} `+f(b(o).message),class:"email-msg",type:"error","show-icon":""},null,8,["title"])):Ee("",!0),b(o).status===4?(N(),pe(S,{key:1,closable:!1,title:w.$t("complained"),class:"email-msg",type:"warning","show-icon":""},null,8,["title"])):Ee("",!0),b(o).status===5?(N(),pe(S,{key:2,closable:!1,title:w.$t("delayed"),class:"email-msg",type:"warning","show-icon":""},null,8,["title"])):Ee("",!0)]),H(T,{class:q(["htm-scrollbar",b(o).attList.length===0?"bottom-distance":""])},{default:J(()=>[b(o).content?(N(),pe(fhe,{key:0,html:d(b(o).content)},null,8,["html"])):(N(),te("pre",Mhe,ae(b(o).text),1))]),_:1},8,["class"]),b(o).attList.length>0?(N(),te("div",Ihe,[I("div",Ahe,[I("span",null,ae(w.$t("attachments")),1),I("span",null,ae(w.$t("attCount",{total:b(o).attList.length})),1)]),I("div",Dhe,[(N(!0),te(bt,null,rn(b(o).attList,k=>(N(),te("div",{class:"att-item",key:k.attId},[I("div",{class:"att-icon",onClick:A=>h(k.key)},[H(b(ot),{icon:b(I4)(k.filename),width:"20",height:"20"},null,8,["icon"])],8,Phe),I("div",{class:"att-name",onClick:A=>h(k.key)},ae(k.filename),9,Ohe),I("div",Lhe,ae(b(k4)(k.size)),1),I("div",Rhe,[p(k.filename)?(N(),pe(b(ot),{key:0,icon:"hugeicons:view",width:"22",height:"22",onClick:A=>h(k.key)},null,8,["onClick"])):Ee("",!0),I("a",{href:b(Nf)(k.key),download:""},[H(b(ot),{icon:"system-uicons:push-down",width:"22",height:"22"})],8,$he)])]))),128))])])):Ee("",!0)])])]),_:1}),s.value?(N(),pe(E,{key:0,"url-list":l,"show-progress":"",onClose:_[0]||(_[0]=k=>s.value=!1)},null,8,["url-list"])):Ee("",!0)])}}},Fhe=sr(Nhe,[["__scopeId","data-v-ef9bb1fe"]]),Bhe=Object.freeze(Object.defineProperty({__proto__:null,default:Fhe},Symbol.toStringTag,{value:"Module"})),Vhe={class:"box"},zhe={class:"container"},Hhe={class:"title"},Uhe={class:"item"},Whe={key:0,class:"edit-name-input"},Khe={key:1,class:"user-name"},Yhe={class:"item"},jhe={class:"item"},Ghe={class:"container lang"},qhe={class:"title"},Xhe={class:"del-email"},Zhe={class:"title"},Jhe={style:{color:"#585d69"}},Qhe={class:"update-pwd"},epe=Object.assign({name:"setting"},{__name:"index",setup(e){const{t,locale:n}=Hr(),r=Ur(),a=Bs(),i=Vi(),o=j(!1),s=j(!1),l=j(null),{lang:u}=wF(r);Je(()=>u.value,()=>{window.location.reload()});function c(){l.value=i.user.name,s.value=!0}function f(){if(!l.value){It({message:t("emptyUserNameMsg"),type:"error",plain:!0});return}s.value=!1;let g=l.value;g!==i.user.name&&(i.user.name=l.value,S4(i.user.accountId,g).then(()=>{It({message:t("changSuccessMsg"),type:"success",plain:!0}),a.changeUserAccountName=g}).catch(()=>{i.user.name=g}))}const d=j(!1),h=Yt({password:"",newPwd:""}),p=()=>{Ta.confirm(t("delAccountConfirm"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{aue().then(()=>{localStorage.removeItem("token"),er.replace("/login"),It({message:t("delSuccessMsg"),type:"success",plain:!0})})})};function v(){if(!h.password){It({message:t("emptyPwdMsg"),type:"error",plain:!0});return}if(h.password.length<6){It({message:t("pwdLengthMsg"),type:"error",plain:!0});return}if(h.password!==h.newPwd){It({message:t("confirmPwdFailMsg"),type:"error",plain:!0});return}o.value=!0,rue(h.password).then(()=>{It({message:t("changSuccessMsg"),type:"success",plain:!0}),d.value=!1,o.value=!1,h.password="",h.newPwd=""}).catch(()=>{o.value=!1})}return(g,m)=>{const y=Or,w=Xr,_=Fs,S=Ns,T=Jf,E=Os("perm");return N(),te("div",Vhe,[I("div",zhe,[I("div",Hhe,ae(g.$t("profile")),1),I("div",Uhe,[I("div",null,ae(g.$t("username")),1),I("div",null,[s.value?(N(),te("span",Whe,[H(y,{modelValue:l.value,"onUpdate:modelValue":m[0]||(m[0]=M=>l.value=M)},null,8,["modelValue"]),I("span",{class:"edit-name",onClick:f},ae(g.$t("save")),1)])):(N(),te("span",Khe,[I("span",null,ae(b(i).user.name),1),I("span",{class:"edit-name",onClick:c},ae(g.$t("change")),1)]))])]),I("div",Yhe,[I("div",null,ae(g.$t("emailAccount")),1),I("div",null,ae(b(i).user.email),1)]),I("div",jhe,[I("div",null,ae(g.$t("password")),1),I("div",null,[H(w,{type:"primary",onClick:m[1]||(m[1]=M=>d.value=!0)},{default:J(()=>[nt(ae(g.$t("changePwdBtn")),1)]),_:1})])])]),I("div",Ghe,[I("div",qhe,ae(g.$t("language")),1),I("div",null,[H(S,{modelValue:b(u),"onUpdate:modelValue":m[2]||(m[2]=M=>Cn(u)?u.value=M:null),placeholder:"Select",style:{width:"100px"}},{default:J(()=>[H(_,{key:"zh",label:"简体中文",value:"zh"}),H(_,{key:"en",label:"English",value:"en"})]),_:1},8,["modelValue"])])]),Ot((N(),te("div",Xhe,[I("div",Zhe,ae(g.$t("deleteUser")),1),I("div",Jhe,ae(g.$t("delAccountMsg")),1),I("div",null,[H(w,{type:"primary",onClick:p},{default:J(()=>[nt(ae(g.$t("deleteUserBtn")),1)]),_:1})])])),[[E,"my:delete"]]),H(T,{modelValue:d.value,"onUpdate:modelValue":m[5]||(m[5]=M=>d.value=M),title:g.$t("changePassword"),width:"340"},{default:J(()=>[I("div",Qhe,[H(y,{type:"password",placeholder:g.$t("newPassword"),modelValue:h.password,"onUpdate:modelValue":m[3]||(m[3]=M=>h.password=M)},null,8,["placeholder","modelValue"]),H(y,{type:"password",placeholder:g.$t("confirmPassword"),modelValue:h.newPwd,"onUpdate:modelValue":m[4]||(m[4]=M=>h.newPwd=M)},null,8,["placeholder","modelValue"]),H(w,{type:"primary",loading:o.value,onClick:v},{default:J(()=>[nt(ae(g.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"])])}}}),tpe=sr(epe,[["__scopeId","data-v-30c66c38"]]),npe=Object.freeze(Object.defineProperty({__proto__:null,default:tpe},Symbol.toStringTag,{value:"Module"})),rpe=Object.assign({name:"star"},{__name:"index",setup(e){const t=j({}),n=eu();function r(i){n.contentData.email=i,n.contentData.delType="logic",n.contentData.showStar=!0,n.contentData.showReply=!0,er.push("/message")}function a(i){n.cancelStarEmailId=i.emailId,t.value.deleteEmail([i.emailId])}return Gt(()=>{n.starScroll=t}),(i,o)=>(N(),pe(Gp,{type:"star",ref_key:"scroll",ref:t,"allow-star":!1,"cancel-success":a,getEmailList:b(ohe),emailDelete:b(jp),"star-add":b(nd),"star-cancel":b(rd),onJump:r,actionLeft:"6px","show-account-icon":!1},null,8,["getEmailList","emailDelete","star-add","star-cancel"]))}}),ape=Object.freeze(Object.defineProperty({__proto__:null,default:rpe},Symbol.toStringTag,{value:"Module"})),ipe={id:"login-box"},ope={key:0,id:"background-wrap"},spe={class:"form-wrapper"},lpe={class:"container"},upe={class:"form-title"},cpe={key:0,class:"form-desc"},fpe={key:1,class:"form-desc"},dpe={key:2},hpe={style:{color:"#333"}},ppe={key:3},vpe={style:{color:"#333"}},gpe=["data-sitekey"],mpe={__name:"index",setup(e){UR(S=>({"663d1b76":g.value}));const{t}=Hr(),n=Bs(),r=Vi(),a=Ur(),i=j(!1),o=j("login"),s=Yt({email:"",password:""}),l=j(),u=j(""),c=Yt({email:"",password:"",confirmPassword:"",code:null}),f=a.domainList,d=j(!1);u.value=f[0];const h=j(!1);let p="",v=null;window.onTurnstileSuccess=S=>{p=S,setTimeout(()=>{h.value=!1},2e3)};const g=G(()=>`rgba(255, 255, 255, ${a.settings.loginOpacity})`),m=G(()=>a.settings.background?{"background-image":`url(${Nf(a.settings.background)})`,"background-repeat":"no-repeat","background-size":"cover","background-position":"center"}:""),y=()=>{l.value.toggleMenu()},w=()=>{if(!s.email){It({message:t("emptyEmailMsg"),type:"error",plain:!0});return}if(!Vl(s.email+u.value)){It({message:t("notEmailMsg"),type:"error",plain:!0});return}if(!s.password){It({message:t("emptyPwdMsg"),type:"error",plain:!0});return}i.value=!0,Nce(s.email+u.value,s.password).then(async S=>{localStorage.setItem("token",S.token);const T=await fy();n.currentAccountId=T.accountId,r.user=T,s4(T.permKeys).forEach(M=>{er.addRoute("layout",M)}),await er.replace({name:"layout"})}).finally(()=>{i.value=!1})};function _(){if(!c.email){It({message:t("emptyEmailMsg"),type:"error",plain:!0});return}if(!Vl(c.email+u.value)){It({message:t("notEmailMsg"),type:"error",plain:!0});return}if(!c.password){It({message:t("emptyPwdMsg"),type:"error",plain:!0});return}if(c.password.length<6){It({message:t("pwdLengthMsg"),type:"error",plain:!0});return}if(c.password!==c.confirmPassword){It({message:t("confirmPwdFailMsg"),type:"error",plain:!0});return}if(a.settings.regKey===0&&!c.code){It({message:t("emptyRegKeyMsg"),type:"error",plain:!0});return}if(!p&&a.settings.registerVerify===0){h.value=!0,Bt(v?()=>{window.turnstile.reset(v)}:()=>{v=window.turnstile.render(".register-turnstile")});return}d.value=!0;const S={email:c.email+u.value,password:c.password,token:p,code:c.code};Bce(S).then(()=>{o.value="login",c.email="",c.password="",c.confirmPassword="",c.code="",d.value=!1,v=null,p="",It({message:t("regSuccessMsg"),type:"success",plain:!0})}).catch(T=>{T.code===400&&(p="",window.turnstile.reset(v),h.value=!0),d.value=!1})}return(S,T)=>{const E=Fs,M=Ns,k=Or,A=Xr;return N(),te("div",ipe,[b(a).settings.background?(N(),te("div",{key:1,style:zt(m.value)},null,4)):(N(),te("div",ope,T[11]||(T[11]=[Yz('',5)]))),I("div",spe,[I("div",lpe,[I("span",upe,ae(b(a).settings.title),1),o.value==="login"?(N(),te("span",cpe,ae(S.$t("loginTitle")),1)):(N(),te("span",fpe,ae(S.$t("regTitle")),1)),o.value==="login"?(N(),te("div",dpe,[H(k,{class:"email-input",modelValue:s.email,"onUpdate:modelValue":T[1]||(T[1]=D=>s.email=D),type:"text",placeholder:S.$t("emailAccount"),autocomplete:"off"},{append:J(()=>[I("div",{onClick:Lt(y,["stop"])},[H(M,{ref_key:"mySelect",ref:l,modelValue:u.value,"onUpdate:modelValue":T[0]||(T[0]=D=>u.value=D),placeholder:S.$t("select"),class:"select"},{default:J(()=>[(N(!0),te(bt,null,rn(b(f),D=>(N(),pe(E,{key:D,label:D,value:D},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),I("div",hpe,[I("span",null,ae(u.value),1),H(b(ot),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue","placeholder"]),H(k,{modelValue:s.password,"onUpdate:modelValue":T[2]||(T[2]=D=>s.password=D),placeholder:S.$t("password"),type:"password",autocomplete:"off"},null,8,["modelValue","placeholder"]),H(A,{class:"btn",type:"primary",onClick:w,loading:i.value},{default:J(()=>[nt(ae(S.$t("loginBtn")),1)]),_:1},8,["loading"])])):(N(),te("div",ppe,[H(k,{class:"email-input",modelValue:c.email,"onUpdate:modelValue":T[4]||(T[4]=D=>c.email=D),type:"text",placeholder:S.$t("emailAccount"),autocomplete:"off"},{append:J(()=>[I("div",{onClick:Lt(y,["stop"])},[H(M,{ref_key:"mySelect",ref:l,modelValue:u.value,"onUpdate:modelValue":T[3]||(T[3]=D=>u.value=D),placeholder:S.$t("select"),class:"select"},{default:J(()=>[(N(!0),te(bt,null,rn(b(f),D=>(N(),pe(E,{key:D,label:D,value:D},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),I("div",vpe,[I("span",null,ae(u.value),1),H(b(ot),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue","placeholder"]),H(k,{modelValue:c.password,"onUpdate:modelValue":T[5]||(T[5]=D=>c.password=D),placeholder:S.$t("password"),type:"password",autocomplete:"off"},null,8,["modelValue","placeholder"]),H(k,{modelValue:c.confirmPassword,"onUpdate:modelValue":T[6]||(T[6]=D=>c.confirmPassword=D),placeholder:S.$t("confirmPwd"),type:"password",autocomplete:"off"},null,8,["modelValue","placeholder"]),b(a).settings.regKey===0?(N(),pe(k,{key:0,modelValue:c.code,"onUpdate:modelValue":T[7]||(T[7]=D=>c.code=D),placeholder:S.$t("regKey"),type:"text",autocomplete:"off"},null,8,["modelValue","placeholder"])):Ee("",!0),b(a).settings.regKey===2?(N(),pe(k,{key:1,modelValue:c.code,"onUpdate:modelValue":T[8]||(T[8]=D=>c.code=D),placeholder:S.$t("regKeyOptional"),type:"text",autocomplete:"off"},null,8,["modelValue","placeholder"])):Ee("",!0),Ot(I("div",{class:"register-turnstile","data-sitekey":b(a).settings.siteKey,"data-callback":"onTurnstileSuccess"},null,8,gpe),[[In,h.value]]),H(A,{class:"btn",type:"primary",onClick:_,loading:d.value},{default:J(()=>[nt(ae(S.$t("regBtn")),1)]),_:1},8,["loading"])])),b(a).settings.register===0?(N(),te(bt,{key:4},[o.value==="login"?(N(),te("div",{key:0,class:"switch",onClick:T[9]||(T[9]=D=>o.value="register")},[nt(ae(S.$t("noAccount"))+" ",1),I("span",null,ae(S.$t("regSwitch")),1)])):(N(),te("div",{key:1,class:"switch",onClick:T[10]||(T[10]=D=>o.value="login")},[nt(ae(S.$t("hasAccount"))+" ",1),I("span",null,ae(S.$t("loginSwitch")),1)]))],64)):Ee("",!0)])])])}}},ype=sr(mpe,[["__scopeId","data-v-6a529b9f"]]),bpe=Object.freeze(Object.defineProperty({__proto__:null,default:ype},Symbol.toStringTag,{value:"Module"})),_pe={},wpe={class:"scrollbar-flex-content"};function Spe(e,t){const n=Pa;return N(),pe(n,null,{default:J(()=>[I("div",wpe,[(N(),te(bt,null,rn(1e3,r=>I("p",{key:r,class:"scrollbar-demo-item"},ae(r),1)),64))])]),_:1})}const Cpe=sr(_pe,[["render",Spe],["__scopeId","data-v-fbb8d012"]]),Tpe=Object.freeze(Object.defineProperty({__proto__:null,default:Cpe},Symbol.toStringTag,{value:"Module"})),Epe={class:"box-404"},xpe={__name:"index",setup(e){let t=window.innerWidth<1025;return(n,r)=>{const a=Xr,i=O0;return N(),te("div",Epe,[H(i,{"image-size":b(t)?120:0,class:"empty",description:n.$t("error404")},{default:J(()=>[H(a,{type:"primary",onClick:r[0]||(r[0]=o=>b(er).replace({name:"layout"}))},{default:J(()=>[nt(ae(n.$t("home")),1)]),_:1})]),_:1},8,["image-size","description"])])}}},kpe=sr(xpe,[["__scopeId","data-v-08a98c88"]]),Mpe=Object.freeze(Object.defineProperty({__proto__:null,default:kpe},Symbol.toStringTag,{value:"Module"})),Ipe=Object.assign({name:"send"},{__name:"index",setup(e){const t=eu(),n=Bs(),r=j({}),a=Yt({timeSort:0});Gt(()=>{t.sendScroll=r}),Je(()=>n.currentAccountId,()=>{r.value.refreshList()});function i(){a.timeSort=a.timeSort?0:1,r.value.refreshList()}function o(c){t.contentData.email=c,t.contentData.delType="logic",t.contentData.showStar=!0,t.contentData.showReply=!0,er.push("/message")}function s(c){t.starScroll?.addItem(c)}function l(c){t.starScroll?.deleteEmail([c.emailId])}function u(c,f){return M4(n.currentAccountId,c,a.timeSort,f,1)}return(c,f)=>(N(),pe(Gp,{ref_key:"sendScroll",ref:r,"cancel-success":l,"star-success":s,getEmailList:u,emailDelete:b(jp),"star-add":b(nd),"show-status":"",actionLeft:"4px","star-cancel":b(rd),onJump:o,"time-sort":a.timeSort},{first:J(()=>[a.timeSort===0?(N(),pe(b(ot),{key:0,class:"icon",onClick:i,icon:"material-symbols-light:timer-arrow-down-outline",width:"28",height:"28"})):(N(),pe(b(ot),{key:1,class:"icon",onClick:i,icon:"material-symbols-light:timer-arrow-up-outline",width:"28",height:"28"}))]),_:1},8,["emailDelete","star-add","star-cancel","time-sort"]))}}),Ape=sr(Ipe,[["__scopeId","data-v-0659138e"]]),Dpe=Object.freeze(Object.defineProperty({__proto__:null,default:Ape},Symbol.toStringTag,{value:"Module"})),Ppe={class:"send-email"},Ope=Object.assign({name:"draft"},{__name:"index",setup(e){const t=D4(),n=Ql(),r=j({}),a=eu();Je(()=>t.setDraft,async()=>{const u=on(t.setDraft),c=u.draftId,f=on(t.setDraft.attachments);if(delete u.draftId,delete u.attachments,!u.content&&!u.subject&&!(u.receiveEmail.length>0)){await Si.value.draft.delete(c),await Si.value.att.delete(c),r.value.refreshList();return}await Si.value.draft.update(c,u),await Si.value.att.update(c,{attachments:f}),r.value.refreshList()},{deep:!0}),Je(()=>t.refreshList,()=>{r.value.refreshList()});function i(){return new Promise((u,c)=>{Si.value.draft.orderBy("createTime").reverse().toArray().then(f=>{u({list:f})})})}async function o(u){await Si.value.draft.bulkDelete(u),r.value.refreshList()}async function s(u){const c=await Si.value.att.get(u.draftId);u.attachments=c.attachments,n.writerRef.openDraft(u)}function l(u){a.cancelStarEmailId=u.emailId,r.value.deleteEmail([u.emailId])}return Gt(()=>{a.starScroll=r}),(u,c)=>(N(),pe(Gp,{ref_key:"scroll",ref:r,"allow-star":!1,"cancel-success":l,getEmailList:i,emailDelete:b(jp),"star-add":b(nd),"star-cancel":b(rd),onJump:s,actionLeft:"6px","show-account-icon":!1,showStar:!1,onDeleteDraft:o,type:"draft"},{name:J(f=>[I("span",Ppe,ae(f.email.receiveEmail.join(",")||"("+u.$t("noRecipient")+")"),1)]),subject:J(f=>[nt(ae(f.email.subject||"("+u.$t("noSubject")+")"),1)]),_:1},8,["emailDelete","star-add","star-cancel"]))}}),Lpe=Object.freeze(Object.defineProperty({__proto__:null,default:Ope},Symbol.toStringTag,{value:"Module"}));function Rpe(e){return Zt.get("/user/list",{params:{...e}})}function $pe(e){return Zt.put("/user/setPwd",e)}function Npe(e){return Zt.put("/user/setStatus",e)}function Fpe(e){return Zt.put("/user/setType",e)}function Bpe(e){return Zt.delete("/user/delete",{params:{userId:e}})}function Vpe(e){return Zt.post("/user/add",e)}function zpe(e){return Zt.put("/user/resetSendCount",{userId:e})}function Hpe(e,t){return Zt.put("/user/restore",{userId:e,type:t})}function Upe(e){return Zt.post("/role/add",e)}function Wpe(){return Zt.get("/role/permTree")}function Kpe(){return Zt.get("/role/list")}function Ype(e){return Zt.put("/role/set",e)}function jpe(e){return Zt.delete("/role/delete",{params:{roleId:e}})}function Gpe(e){return Zt.put("/role/setDefault",{roleId:e})}function Mh(){return Zt.get("/role/selectUse")}const N2=Cc("role",{state:()=>({refresh:0}),actions:{refreshSelect(){this.refresh++}}}),qpe={class:"user-box"},Xpe={class:"header-actions"},Zpe={class:"search"},Jpe={class:"details"},Qpe={key:0},eve={class:"details-item-title"},tve={key:1},nve={class:"details-item-title"},rve={key:2},ave={class:"details-item-title"},ive={key:3},ove={class:"details-item-title"},sve={key:4},lve={class:"details-item-title"},uve={class:"details-item-title"},cve={class:"details-item-title"},fve={class:"details-item-title"},dve={class:"details-item-title"},hve={class:"details-item-title"},pve={class:"details-item-title"},vve={class:"details-item-title"},gve={class:"email-row"},mve={class:"type"},yve={key:0,class:"pagination"},bve={class:"dialog-box"},_ve={class:"dialog-box"},wve={class:"container"},Sve={style:{color:"#333"}},Cve=Object.assign({name:"user"},{__name:"index",setup(e){const{t,locale:n}=Hr(),r=N2(),a=Vi(),i=Ur(),o=["normal","del"],s=[{text:t("active"),value:"normal"},{text:t("deleted"),value:"del"}],l=j(!1),u=j(230),c=j(40),f=j(null),d=j(!0),h=j(!0),p=j(!0),v=j(!0),g=j(!0),m=j(null),y=j(!1),w=j("prev, pager, next, sizes, total"),_=j(""),S=j(!1),T=j([]),E=j(0),M=j(!0),k=j(null),A=i.domainList,D=Yt({email:"",suffix:i.domainList[0],password:"",type:null}),B=Yt({email:"",num:1,size:15,timeSort:0,status:-1});let Y={};const W=Yt({password:null,type:-1,userId:0}),V=j(!1),O=j(!1),F=j(!1),R=j(!1),L=j(10),U=j(!1),X=j(!0),ee=Yt([]),se=j({}),me=j(0);Mh().then(_e=>{ee.length=0,ee.push(..._e)});const xe=localStorage.getItem("user-params");if(xe){const _e=JSON.parse(xe);B.num=_e.num,B.size=_e.size,B.timeSort=_e.timeSort,B.status=_e.status}Je(()=>B,()=>{localStorage.setItem("user-params",JSON.stringify(B))},{deep:!0}),Je(()=>r.refresh,()=>{Mh().then(_e=>{ee.length=0,ee.push(..._e)})}),Je(()=>a.refreshList,()=>{re(!1)}),re();const le=Yt({send:["normal","del"],account:["normal","del"],receive:["normal","del"]});function fe(_e){_e.send&&(le.send=_e.send),_e.account&&(le.account=_e.account),_e.receive&&(le.receive=_e.receive)}function ke(_e){return le.send.length===2?_e.sendEmailCount+_e.delSendEmailCount:le.send.includes("normal")?_e.sendEmailCount:le.send.includes("del")?_e.delSendEmailCount:0}function he(_e){return le.account.length===2?_e.accountCount+_e.delAccountCount:le.account.includes("normal")?_e.accountCount:le.account.includes("del")?_e.delAccountCount:0}function ze(_e){return le.receive.length===2?_e.receiveEmailCount+_e.delReceiveEmailCount:le.receive.includes("normal")?_e.receiveEmailCount:le.receive.includes("del")?_e.delReceiveEmailCount:0}function Ye(_e){if(_e.isDel===1)return t("restore");if(_e.status===0)return t("btnBan");if(_e.status===1)return t("enable")}const Z=_e=>_e.row.email;function oe(){S.value=!S.value,me.value++}const de=()=>{se.value.toggleMenu()};function Te(){D.email="",D.suffix=i.domainList[0],D.type=null,D.password=""}function Ce(){V.value=!0}function Ve(){if(!D.email){It({message:t("emptyEmailMsg"),type:"error",plain:!0});return}if(!Vl(D.email+D.suffix)){It({message:t("notEmailMsg"),type:"error",plain:!0});return}if(!D.password){It({message:t("emptyPwdMsg"),type:"error",plain:!0});return}if(D.password.length<6){It({message:t("pwdLengthMsg"),type:"error",plain:!0});return}if(!D.type){It({message:t("emptyRole"),type:"error",plain:!0});return}O.value=!0;const _e={...D};_e.email=_e.email+_e.suffix,Vpe(_e).then(()=>{O.value=!1,V.value=!1,It({message:t("addSuccessMsg"),type:"success",plain:!0}),Te(),re(!1)}).finally(ft=>{O.value=!1})}function ie(_e){if(_e.sendAction.sendType==="day")return t("daily");if(_e.sendAction.sendType==="count")return t("total")}function ne(_e){return _e.sendAction.hasPerm?_e.sendAction.sendCount?_e.sendCount+"/"+_e.sendAction.sendCount:t("unlimited"):t("unauthorized")}function we(_e){if(_e===0)return t("admin");const ft=ee.findIndex(rt=>rt.roleId===_e);return ft>-1?ee[ft].name:""}function Ae(_e){Ta.confirm(t("reSendConfirm",{msg:_e.email}),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{zpe(_e.userId).then(()=>{It({message:t("reSuccessMsg"),type:"success",plain:!0}),_e.sendCount=0})})}function ut(_e){Ta.confirm(t("delConfirm",{msg:_e.email}),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{Bpe(_e.userId).then(()=>{It({message:t("delSuccessMsg"),type:"success",plain:!0}),re(!1)})})}function Ge(_e){const ft=j(0);Ta.confirm(null,{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),message:()=>Tt("div",[Tt("div",{class:"mb-2"},t("restoreConfirm",{msg:_e.email})),Tt(M0,{modelValue:ft.value,"onUpdate:modelValue":rt=>ft.value=rt},[Tt(ny,{label:"option1",value:0},t("normalRestore")),Tt(ny,{label:"option2",value:1},t("allRestore"))])]),type:"warning"}).then(()=>{Hpe(_e.userId,ft.value).then(()=>{_e.isDel=0,It({message:t("restoreSuccessMsg"),type:"success",plain:!0})})})}function ue(_e){_e.status===0?Ta.confirm(t("banRestore",{msg:_e.email}),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{De(_e)}):De(_e)}function De(_e){let ft=_e.status?0:1;Npe({status:ft,userId:_e.userId}).then(()=>{_e.status=ft,It({message:t("changSuccessMsg"),type:"success",plain:!0})})}function it(){U.value=!0,Fpe({type:W.type,userId:W.userId}).then(()=>{Y.type=W.type,F.value=!1,It({message:t("changSuccessMsg"),type:"success",plain:!0})}).finally(()=>{U.value=!1})}function St(){W.password=null,W.userId=0,W.type=0}function Ft(){B.num=1,re()}function cn(){if(!W.password){It({message:t("emptyPwdMsg"),type:"error",plain:!0});return}if(W.password.length<6){It({message:t("pwdLengthMsg"),type:"error",plain:!0});return}U.value=!0,$pe({password:W.password,userId:W.userId}).then(()=>{R.value=!1,It({message:t("changSuccessMsg"),type:"success",plain:!0})}).finally(()=>{U.value=!1})}function Rt(_e){Y=_e,W.userId=_e.userId,W.type=_e.type,F.value=!0}function He(_e){W.userId=_e.userId,R.value=!0}function ye(){B.email="",B.num=1,B.status=-1,B.timeSort=0,re(),Mh().then(_e=>{ee.length=0,ee.push(..._e)})}function ge(){B.num=1,B.timeSort=B.timeSort?0:1,re()}function Re(_e){B.num=_e,re()}function Ke(_e){B.size=_e,re()}function re(_e=!0){X.value=_e;const ft={...B};ft.status===-2&&(delete ft.status,ft.isDel=1),Rpe(ft).then(rt=>{T.value=rt.list,E.value=rt.total,k.value?.setScrollTop(0)}).finally(()=>{X.value=!1,M.value=!1})}window.onresize=()=>{Ze()},Ze();function Ze(){const _e=window.innerWidth;v.value=_e>1090,p.value=_e>1200,h.value=_e>650,d.value=_e>685,g.value=_e>767,u.value=_e>480?230:null,f.value=_e<480?n.value==="en"?85:75:null,c.value=_e<480?25:40,L.value=_e<768?7:11,m.value=_e<480?90:null,w.value=_e<768?"pager":"prev, pager, next,sizes, total",y.value=_e<768,_.value=_e<380?"small":""}return(_e,ft)=>{const rt=Or,Rn=Fs,vr=Ns,Ir=Sc,Ar=Xr,en=R0,lr=D0,zs=P0,ci=Up,lt=L0,Hs=Ste,Us=Pa,$n=Jf;return N(),te("div",qpe,[I("div",Xpe,[H(b(ot),{class:"icon",icon:"ion:add-outline",width:"23",height:"23",onClick:Ce}),I("div",Zpe,[H(rt,{modelValue:B.email,"onUpdate:modelValue":ft[0]||(ft[0]=dt=>B.email=dt),class:"search-input",placeholder:_e.$t("searchByEmail")},null,8,["modelValue","placeholder"])]),H(vr,{modelValue:B.status,"onUpdate:modelValue":ft[1]||(ft[1]=dt=>B.status=dt),placeholder:"Select",class:"status-select",style:zt(`width: ${b(n)==="en"?95:80}px`)},{default:J(()=>[(N(),pe(Rn,{key:-1,label:_e.$t("all"),value:-1},null,8,["label"])),(N(),pe(Rn,{key:0,label:_e.$t("active"),value:0},null,8,["label"])),(N(),pe(Rn,{key:1,label:_e.$t("banned"),value:1},null,8,["label"])),(N(),pe(Rn,{key:-2,label:_e.$t("deleted"),value:-2},null,8,["label"]))]),_:1},8,["modelValue","style"]),H(b(ot),{class:"icon",icon:"iconoir:search",onClick:Ft,width:"20",height:"20"}),B.timeSort===1?(N(),pe(b(ot),{key:0,class:"icon",onClick:ge,icon:"material-symbols-light:timer-arrow-down-outline",width:"28",height:"28"})):(N(),pe(b(ot),{key:1,class:"icon",onClick:ge,icon:"material-symbols-light:timer-arrow-up-outline",width:"28",height:"28"})),H(b(ot),{class:"icon",icon:"ion:reload",width:"18",height:"18",onClick:ye}),H(b(ot),{class:"icon",icon:"pepicons-pencil:expand",width:"26",height:"26",onClick:oe})]),H(Us,{ref_key:"scrollbarRef",ref:k,class:"scrollbar"},{default:J(()=>[I("div",null,[I("div",{class:q(["loading",X.value?"loading-show":"loading-hide"])},[H(Ms)],2),(N(),pe(lt,{onFilterChange:fe,"empty-text":M.value?"":null,"default-expand-all":S.value,data:T.value,"preserve-expanded-content":l.value,style:{width:"100%"},key:me.value},{default:J(()=>[H(en,{width:c.value,type:"expand"},{default:J(dt=>[I("div",Jpe,[d.value?Ee("",!0):(N(),te("div",Qpe,[I("span",eve,ae(_e.$t("tabSent"))+":",1),nt(ae(dt.row.sendEmailCount),1)])),h.value?Ee("",!0):(N(),te("div",tve,[I("span",nve,ae(_e.$t("tabMailboxes"))+":",1),nt(ae(dt.row.accountCount),1)])),p.value?Ee("",!0):(N(),te("div",rve,[I("span",ave,ae(_e.$t("tabRegisteredAt"))+":",1),nt(ae(b(kh)(dt.row.createTime).format("YYYY-MM-DD HH:mm")),1)])),g.value?Ee("",!0):(N(),te("div",ive,[I("span",ove,ae(_e.$t("perm"))+":",1),nt(" "+ae(we(dt.row.type)),1)])),v.value?Ee("",!0):(N(),te("div",sve,[I("span",lve,ae(_e.$t("tabStatus"))+":",1),dt.row.isDel===1?(N(),pe(Ir,{key:0,"disable-transitions":"",type:"info"},{default:J(()=>[nt(ae(_e.$t("deleted")),1)]),_:1})):dt.row.status===0?(N(),pe(Ir,{key:1,"disable-transitions":"",type:"primary"},{default:J(()=>[nt(ae(_e.$t("active")),1)]),_:1})):dt.row.status===1?(N(),pe(Ir,{key:2,"disable-transitions":"",type:"danger"},{default:J(()=>[nt(ae(_e.$t("banned")),1)]),_:1})):Ee("",!0)])),I("div",null,[I("span",uve,ae(_e.$t("registrationIp"))+":",1),nt(ae(dt.row.createIp||_e.$t("unknown")),1)]),I("div",null,[I("span",cve,ae(_e.$t("recentIP"))+":",1),nt(ae(dt.row.activeIp||_e.$t("unknown")),1)]),I("div",null,[I("span",fve,ae(_e.$t("recentActivity"))+":",1),nt(ae(dt.row.activeTime?b(kh)(dt.row.activeTime).format("YYYY-MM-DD"):_e.$t("unknown")),1)]),I("div",null,[I("span",dve,ae(_e.$t("loginDevice"))+":",1),nt(ae(dt.row.device||_e.$t("unknown")),1)]),I("div",null,[I("span",hve,ae(_e.$t("loginSystem"))+":",1),nt(ae(dt.row.os||_e.$t("unknown")),1)]),I("div",null,[I("span",pve,ae(_e.$t("browserLogin"))+":",1),nt(ae(dt.row.browser||_e.$t("unknown")),1)]),I("div",null,[I("span",vve,ae(_e.$t("sendEmail"))+":",1),I("span",null,ae(ne(dt.row)),1),dt.row.sendAction.hasPerm?(N(),pe(Ir,{key:0,style:{"margin-left":"10px"}},{default:J(()=>[nt(ae(ie(dt.row)),1)]),_:2},1024)):Ee("",!0),dt.row.sendAction.hasPerm&&dt.row.sendAction.sendCount?(N(),pe(Ar,{key:1,size:"small",style:{"margin-left":"10px"},onClick:ts=>Ae(dt.row),type:"primary"},{default:J(()=>[nt(ae(_e.$t("reset")),1)]),_:2},1032,["onClick"])):Ee("",!0)])])]),_:1},8,["width"]),H(en,{"show-overflow-tooltip":"","tooltip-formatter":Z,label:_e.$t("tabEmailAddress"),"min-width":u.value},{default:J(dt=>[I("div",gve,ae(dt.row.email),1)]),_:1},8,["label","min-width"]),H(en,{formatter:ze,"label-class-name":"receive","column-key":"receive","filtered-value":o,filters:s,width:m.value,label:_e.$t("tabReceived"),prop:"receiveEmailCount"},null,8,["width","label"]),d.value?(N(),pe(en,{key:0,formatter:ke,"label-class-name":"send","column-key":"send","filtered-value":o,filters:s,label:_e.$t("tabSent"),prop:"sendEmailCount"},null,8,["label"])):Ee("",!0),h.value?(N(),pe(en,{key:1,formatter:he,"label-class-name":"account","column-key":"account","filtered-value":o,filters:s,label:_e.$t("tabMailboxes"),prop:"accountCount"},null,8,["label"])):Ee("",!0),p.value?(N(),pe(en,{key:2,label:_e.$t("tabRegisteredAt"),"min-width":"160",prop:"createTime"},{default:J(dt=>[nt(ae(b(kh)(dt.row.createTime).format("YYYY-MM-DD HH:mm")),1)]),_:1},8,["label"])):Ee("",!0),v.value?(N(),pe(en,{key:3,"min-width":"60px",label:_e.$t("tabStatus"),prop:"status"},{default:J(dt=>[dt.row.isDel===1?(N(),pe(Ir,{key:0,"disable-transitions":"",type:"info"},{default:J(()=>[nt(ae(_e.$t("deleted")),1)]),_:1})):dt.row.status===0?(N(),pe(Ir,{key:1,"disable-transitions":"",type:"primary"},{default:J(()=>[nt(ae(_e.$t("active")),1)]),_:1})):dt.row.status===1?(N(),pe(Ir,{key:2,"disable-transitions":"",type:"danger"},{default:J(()=>[nt(ae(_e.$t("banned")),1)]),_:1})):Ee("",!0)]),_:1},8,["label"])):Ee("",!0),g.value?(N(),pe(en,{key:4,label:_e.$t("tabRole"),"min-width":"140",prop:"type"},{default:J(dt=>[I("div",mve,ae(we(dt.row.type)),1)]),_:1},8,["label"])):Ee("",!0),H(en,{label:_e.$t("tabSetting"),width:f.value},{default:J(dt=>[H(ci,{trigger:"click"},{dropdown:J(()=>[H(zs,null,{default:J(()=>[H(lr,{onClick:ts=>He(dt.row)},{default:J(()=>[nt(ae(_e.$t("chgPwd")),1)]),_:2},1032,["onClick"]),H(lr,{onClick:ts=>Rt(dt.row)},{default:J(()=>[nt(ae(_e.$t("perm")),1)]),_:2},1032,["onClick"]),dt.row.isDel!==1?(N(),pe(lr,{key:0,onClick:ts=>ue(dt.row)},{default:J(()=>[nt(ae(Ye(dt.row)),1)]),_:2},1032,["onClick"])):(N(),pe(lr,{key:1,onClick:ts=>Ge(dt.row)},{default:J(()=>[nt(ae(_e.$t("restore")),1)]),_:2},1032,["onClick"])),H(lr,{onClick:ts=>ut(dt.row)},{default:J(()=>[nt(ae(_e.$t("delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:J(()=>[H(Ar,{size:"small",type:"primary"},{default:J(()=>[nt(ae(_e.$t("action")),1)]),_:1})]),_:2},1024)]),_:1},8,["label","width"])]),_:1},8,["empty-text","default-expand-all","data","preserve-expanded-content"])),E.value>10?(N(),te("div",yve,[H(Hs,{size:_.value,"current-page":B.num,"page-size":B.size,"pager-count":L.value,"page-sizes":[10,15,20,25,30,50],background:"",layout:w.value,total:E.value,onSizeChange:Ke,onCurrentChange:Re},null,8,["size","current-page","page-size","pager-count","layout","total"]),y.value?(N(),pe(Hs,{key:0,size:_.value,"current-page":B.num,"page-size":B.size,"pager-count":L.value,"page-sizes":[10,15,20,25,30,50],background:"",layout:"sizes, total",total:E.value,onSizeChange:Ke,onCurrentChange:Re},null,8,["size","current-page","page-size","pager-count","total"])):Ee("",!0)])):Ee("",!0)])]),_:1},512),H($n,{class:"dialog",modelValue:R.value,"onUpdate:modelValue":ft[3]||(ft[3]=dt=>R.value=dt),title:_e.$t("changePassword"),onClosed:St},{default:J(()=>[I("div",bve,[H(rt,{modelValue:W.password,"onUpdate:modelValue":ft[2]||(ft[2]=dt=>W.password=dt),type:"password",placeholder:_e.$t("newPassword"),autocomplete:"off"},null,8,["modelValue","placeholder"]),H(Ar,{class:"btn",type:"primary",loading:U.value,onClick:cn},{default:J(()=>[nt(ae(_e.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"]),H($n,{class:"dialog",modelValue:F.value,"onUpdate:modelValue":ft[5]||(ft[5]=dt=>F.value=dt),title:_e.$t("changePerm"),onClosed:St},{default:J(()=>[I("div",_ve,[W.type===0?(N(),pe(rt,{key:0,disabled:"","model-value":_e.$t("admin")},null,8,["model-value"])):(N(),pe(vr,{key:1,modelValue:W.type,"onUpdate:modelValue":ft[4]||(ft[4]=dt=>W.type=dt),placeholder:"Select"},{default:J(()=>[(N(!0),te(bt,null,rn(ee,dt=>(N(),pe(Rn,{label:dt.name,value:dt.roleId,key:dt.roleId},null,8,["label","value"]))),128))]),_:1},8,["modelValue"])),H(Ar,{disabled:W.type===0,class:"btn",loading:U.value,type:"primary",onClick:it},{default:J(()=>[nt(ae(_e.$t("save")),1)]),_:1},8,["disabled","loading"])])]),_:1},8,["modelValue","title"]),H($n,{modelValue:V.value,"onUpdate:modelValue":ft[10]||(ft[10]=dt=>V.value=dt),title:_e.$t("addUser")},{default:J(()=>[I("div",wve,[H(rt,{modelValue:D.email,"onUpdate:modelValue":ft[7]||(ft[7]=dt=>D.email=dt),type:"text",placeholder:_e.$t("emailAccount"),autocomplete:"off"},{append:J(()=>[I("div",{onClick:Lt(de,["stop"])},[H(vr,{ref_key:"mySelect",ref:se,modelValue:D.suffix,"onUpdate:modelValue":ft[6]||(ft[6]=dt=>D.suffix=dt),placeholder:_e.$t("select"),class:"select"},{default:J(()=>[(N(!0),te(bt,null,rn(b(A),dt=>(N(),pe(Rn,{key:dt,label:dt,value:dt},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),I("div",Sve,[I("span",null,ae(D.suffix),1),H(b(ot),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue","placeholder"]),H(rt,{type:"password",modelValue:D.password,"onUpdate:modelValue":ft[8]||(ft[8]=dt=>D.password=dt),placeholder:_e.$t("password")},null,8,["modelValue","placeholder"]),H(vr,{modelValue:D.type,"onUpdate:modelValue":ft[9]||(ft[9]=dt=>D.type=dt),placeholder:_e.$t("perm")},{default:J(()=>[(N(!0),te(bt,null,rn(ee,dt=>(N(),pe(Rn,{label:dt.name,value:dt.roleId,key:dt.roleId},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),H(Ar,{class:"btn",type:"primary",onClick:Ve,loading:O.value},{default:J(()=>[nt(ae(_e.$t("add")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"])])}}}),Tve=sr(Cve,[["__scopeId","data-v-be7c8a0c"]]),Eve=Object.freeze(Object.defineProperty({__proto__:null,default:Tve},Symbol.toStringTag,{value:"Module"})),xve={class:"perm-box"},kve={class:"header-actions"},Mve={key:0,class:"loading"},Ive={class:"role-name"},Ave={key:0},Dve={class:"description"},Pve={class:"dialog-box"},Ove={class:"dialog-input"},Lve=Object.assign({name:"role"},{__name:"index",setup(e){const{t,locale:n}=Hr(),r=Vi(),a=N2(),i=j(!1),o=Yt([]),s=j([]),l=j({}),u=j(!1),c=j(!1),f=j(!0),d=j(null),h=j(null),p=j(200),v=Yt({title:"",type:""}),g=Yt({name:null,description:null,banEmail:[],banEmailType:0,sendType:"count",sendCount:0,accountCount:0,sort:0,isDefault:0}),m=j(!1);let y={};Y(),Wpe().then(O=>{o.push(...O)});function w(O){const F=Array.from(new Set(O.split(/[,,]/).map(R=>R.trim()).filter(R=>R)));g.banEmail.splice(g.banEmail.length-1,1),F.forEach(R=>{Vl(R)&&!g.banEmail.includes(R)&&g.banEmail.push(R)})}function _(){v.type==="add"?B():M()}function S(O){Gpe(O.roleId).then(()=>{It({message:t("changSuccessMsg"),type:"success",plain:!0}),W()})}function T(O){Ta.confirm(t("delConfirm",{msg:O.name}),{confirmButtonText:t("confirm"),cancelButtonText:t("confirm"),type:"warning"}).then(()=>{jpe(O.roleId).then(()=>{It({message:t("copySuccessMsg"),type:"success",plain:!0}),W(),r.refreshUserList(),a.refreshSelect()})})}function E(O){if(O){const F=l.value?.store.nodesMap;for(const R in F)F[R].expanded=!0}else{const F=l.value?.store.nodesMap;for(const R in F)F[R].expanded=!1}}function M(){if(!g.name){It({message:t("emptyRoleNameMsg"),type:"error",plain:!0});return}const O={...g,roleId:y.roleId},F=l.value.getCheckedKeys(),R=l.value.getHalfCheckedKeys();O.permIds=[...F,...R],u.value=!0,Ype(O).then(()=>{It({message:t("changSuccessMsg"),type:"success",plain:!0}),s.value.map(U=>U.name).includes(O.name)||a.refreshSelect(),i.value=!1,W()}).finally(()=>{u.value=!1})}function k(){g.name=null,g.description=null,g.sort=0,g.sendType="count",g.sendCount=0,g.accountCount=0,g.banEmail=[],g.banEmailType=0,l.value.setCheckedKeys([])}function A(O){y=O,v.title=t("changeRoleTitle"),v.type="set",i.value=!0,g.sort=O.sort,g.name=O.name,g.description=O.description,g.sendType=O.sendType,g.sendCount=O.sendCount,g.accountCount=O.accountCount,g.banEmail=O.banEmail,Bt(()=>{l.value.setCheckedKeys(O.permIds)})}function D(){v.title=t("addRoleTitle"),v.type="add",i.value=!0}function B(){const O={...g},F=l.value.getCheckedKeys(),R=l.value.getHalfCheckedKeys();O.permIds=[...F,...R],u.value=!0,Upe(O).then(()=>{It({message:t("addSuccessMsg"),type:"success",plain:!0}),i.value=!1,W(),a.refreshSelect()}).finally(()=>{u.value=!1})}function Y(){c.value=!0,s.length=0,W()}function W(){Kpe().then(O=>{s.value=O}).finally(()=>{c.value=!1})}function V(){f.value=window.innerWidth>767,d.value=window.innerWidth<480?n.value==="en"?85:75:null,h.value=window.innerWidth<480?75:null,p.value=window.innerWidth<480?180:200}return V(),window.onresize=()=>{V()},(O,F)=>{const R=R0,L=Sc,U=Xr,X=D0,ee=P0,se=Up,me=L0,xe=Pa,le=Or,fe=a2,ke=ny,he=M0,ze=r2,Ye=BN,Z=Fs,oe=Ns,de=fre,Te=Jf;return N(),te("div",xve,[I("div",kve,[H(b(ot),{class:"icon",icon:"ion:add-outline",width:"23",height:"23",onClick:D}),H(b(ot),{class:"icon",icon:"ion:reload",width:"18",height:"18",onClick:Y})]),c.value?(N(),te("div",Mve,[H(Ms)])):(N(),pe(xe,{key:1,class:"perm-scrollbar"},{default:J(()=>[I("div",null,[H(me,{data:s.value,style:{width:"100%"}},{default:J(()=>[H(R,{width:"10"}),H(R,{label:O.$t("role"),prop:"name","min-width":p.value},{default:J(Ce=>[I("div",Ive,[I("span",null,ae(Ce.row.name),1),Ce.row.isDefault?(N(),te("span",Ave,[H(L,{class:"def-tag"},{default:J(()=>[nt(ae(O.$t("default")),1)]),_:1})])):Ee("",!0)])]),_:1},8,["label","min-width"]),H(R,{label:O.$t("order"),width:h.value,prop:"sort"},null,8,["label","width"]),f.value?(N(),pe(R,{key:0,label:O.$t("description"),"min-width":"200",prop:"description"},{default:J(Ce=>[I("div",Dve,[I("span",null,ae(Ce.row.description),1)])]),_:1},8,["label"])):Ee("",!0),H(R,{label:O.$t("tabSetting"),width:d.value},{default:J(Ce=>[H(se,{trigger:"click"},{dropdown:J(()=>[H(ee,null,{default:J(()=>[H(X,{onClick:Ve=>A(Ce.row)},{default:J(()=>[nt(ae(O.$t("change")),1)]),_:2},1032,["onClick"]),H(X,{onClick:Ve=>S(Ce.row)},{default:J(()=>[nt(ae(O.$t("default")),1)]),_:2},1032,["onClick"]),H(X,{onClick:Ve=>T(Ce.row)},{default:J(()=>[nt(ae(O.$t("delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:J(()=>[H(U,{size:"small",type:"primary"},{default:J(()=>[nt(ae(O.$t("action")),1)]),_:1})]),_:2},1024)]),_:1},8,["label","width"])]),_:1},8,["data"])])]),_:1})),H(Te,{top:"5vh",class:"dialog",modelValue:i.value,"onUpdate:modelValue":F[11]||(F[11]=Ce=>i.value=Ce),title:v.title,onClosed:k},{default:J(()=>[I("div",Pve,[H(le,{class:"dialog-input",modelValue:g.name,"onUpdate:modelValue":F[0]||(F[0]=Ce=>g.name=Ce),type:"text",maxlength:12,placeholder:O.$t("roleName"),autocomplete:"off"},null,8,["modelValue","placeholder"]),H(le,{class:"dialog-input",modelValue:g.description,"onUpdate:modelValue":F[1]||(F[1]=Ce=>g.description=Ce),maxlength:30,type:"text",placeholder:O.$t("description"),autocomplete:"off"},null,8,["modelValue","placeholder"]),H(fe,{class:q(["dialog-input-tag",g.banEmail.length===0?"dialog-input":""]),"tag-type":"warning",modelValue:g.banEmail,"onUpdate:modelValue":F[2]||(F[2]=Ce=>g.banEmail=Ce),onAddTag:w,type:"text",placeholder:O.$t("emailBlock"),autocomplete:"off"},null,8,["class","modelValue","placeholder"]),g.banEmail.length>0?(N(),pe(he,{key:0,class:"dialog-radio",modelValue:g.banEmailType,"onUpdate:modelValue":F[3]||(F[3]=Ce=>g.banEmailType=Ce)},{default:J(()=>[H(ke,{label:O.$t("removeAll"),value:0},null,8,["label"]),H(ke,{label:O.$t("removeBody"),value:1},null,8,["label"])]),_:1},8,["modelValue"])):Ee("",!0),I("div",Ove,[H(ze,{placeholder:O.$t("order"),min:0,max:9999,modelValue:g.sort,"onUpdate:modelValue":F[4]||(F[4]=Ce=>g.sort=Ce),modelModifiers:{number:!0},"controls-position":"right",autocomplete:"off"},null,8,["placeholder","modelValue"])]),H(he,{modelValue:m.value,"onUpdate:modelValue":F[5]||(F[5]=Ce=>m.value=Ce),size:"small",onChange:E,class:"perm-expand"},{default:J(()=>[H(Ye,{label:O.$t("expand"),value:!0},null,8,["label"]),H(Ye,{label:O.$t("collapse"),value:!1},null,8,["label"])]),_:1},8,["modelValue"]),H(de,{"expand-on-click-node":!1,"check-on-click-node":!1,ref_key:"tree",ref:l,data:o,"show-checkbox":"","node-key":"permId","default-expand-all":m.value,props:{label:"name"}},{default:J(({node:Ce,data:Ve})=>[I("div",null,[I("span",null,ae(Ce.label),1),Ve.permKey==="email:send"?(N(),te("span",{key:0,class:"send-num",onClick:F[8]||(F[8]=Lt(()=>{},["stop"]))},[H(ze,{modelValue:g.sendCount,"onUpdate:modelValue":F[6]||(F[6]=ie=>g.sendCount=ie),"controls-position":"right",min:0,max:99999,size:"small",placeholder:O.$t("total")},null,8,["modelValue","placeholder"]),H(oe,{modelValue:g.sendType,"onUpdate:modelValue":F[7]||(F[7]=ie=>g.sendType=ie),placeholder:"Select",size:"small",style:{width:"65px","margin-left":"5px"}},{default:J(()=>[H(Z,{label:O.$t("total"),value:"count"},null,8,["label"]),H(Z,{label:O.$t("daily"),value:"day"},null,8,["label"]),H(Z,{label:O.$t("btnBan"),value:"ban"},null,8,["label"])]),_:1},8,["modelValue"])])):Ee("",!0),Ve.permKey==="account:add"?(N(),te("span",{key:1,class:"send-num",onClick:F[10]||(F[10]=Lt(()=>{},["stop"]))},[H(ze,{modelValue:g.accountCount,"onUpdate:modelValue":F[9]||(F[9]=ie=>g.accountCount=ie),"controls-position":"right",min:0,max:99999,size:"small",placeholder:O.$t("total")},null,8,["modelValue","placeholder"])])):Ee("",!0)])]),_:1},8,["data","default-expand-all"]),H(U,{class:"btn",type:"primary",loading:u.value,onClick:_},{default:J(()=>[nt(ae(O.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"])])}}}),Rve=sr(Lve,[["__scopeId","data-v-05d447ae"]]),$ve=Object.freeze(Object.defineProperty({__proto__:null,default:Rve},Symbol.toStringTag,{value:"Module"}));function gy(e,t="14px sans-serif"){const n=document.createElement("canvas");n.width=2e3,n.style.width="1000px";const r=n.getContext("2d");return r.font=t,r.measureText(e).width}const Nve={class:"settings-container"},Fve={key:0,class:"loading"},Bve={class:"scroll-body"},Vve={class:"card-grid"},zve={class:"settings-card"},Hve={class:"card-title"},Uve={class:"card-content"},Wve={class:"setting-item"},Kve={class:"setting-item"},Yve={class:"setting-item"},jve={class:"setting-item"},Gve={class:"setting-item"},qve={class:"settings-card"},Xve={class:"card-title"},Zve={class:"card-content"},Jve={class:"setting-item"},Qve={class:"title-item"},ege={class:"email-title"},tge={class:"setting-item"},nge={class:"title-item"},rge={class:"setting-item personalized"},age={class:"background-btn"},ige={class:"settings-card"},oge={class:"card-title"},sge={class:"card-content"},lge={class:"setting-item"},uge={class:"setting-item"},cge={class:"setting-item"},fge={class:"setting-item"},dge={class:"settings-card"},hge={class:"card-title"},pge={class:"card-content"},vge={class:"setting-item"},gge={class:"r2domain"},mge={class:"settings-card"},yge={class:"card-title"},bge={class:"card-content"},_ge={class:"setting-item"},wge={class:"forward"},Sge={class:"setting-item"},Cge={class:"forward"},Tge={class:"setting-item"},Ege={class:"forward"},xge={class:"settings-card"},kge={class:"card-title"},Mge={class:"card-content"},Ige={class:"setting-item"},Age={class:"setting-item"},Dge={class:"setting-item"},Pge={class:"bot-verify"},Oge={class:"setting-item"},Lge={class:"bot-verify"},Rge={class:"settings-card about"},$ge={class:"card-title"},Nge={class:"card-content"},Fge={class:"concerning-item"},Bge={class:"concerning-item"},Vge={class:"concerning-item"},zge={class:"cropper"},Hge={class:"cut-button"},Uge={class:"forward-head"},Wge={class:"forward-set-title"},Kge={class:"forward-set-body"},Yge={class:"dialog-footer"},jge={class:"forward-head"},Gge={class:"forward-set-title"},qge={class:"forward-set-body"},Xge={class:"dialog-footer"},Zge={class:"forward-head"},Jge={class:"forward-set-title"},Qge={class:"forward-set-body"},eme={class:"dialog-footer"},tme=Object.assign({name:"sys-setting"},{__name:"index",setup(e){const{t,locale:n}=Hr(),r=j(!0),a=j(),i=j(""),o=j(!1),s=Bs(),l=Vi(),u=j(!1),c=j(!1),f=j(!1),d=j(!1),h=j(!1),p=j(!1),v=j(!1),g=j(!1),m=Ur(),{settings:y}=wF(m),w=j(""),_=j(!1),S=j(""),T=j(0);let E="{}";const M=Yt({domain:"",token:""}),k=Yt({siteKey:"",secretKey:""}),A=[{label:t("enable"),value:0},{label:t("disable"),value:1},{label:t("optional"),value:2}],D=[{label:t("disable"),value:0},{label:"3s",value:3},{label:"5s",value:5},{label:"7s",value:7},{label:"10s",value:10},{label:"15s",value:15},{label:"20s",value:20}],B=j([]),Y=j(0),W=j(""),V=j([]),O=j(0),F=j(0),R=j(0),L=j(0),U=j([]),X=G(()=>{let He=Object.keys(y.value.resendTokens).map(ye=>({key:ye,value:y.value.resendTokens[ye]}));if(He.length>0){const ye=He.reduce((Re,Ke)=>ee(Re,Ke,"key")).key;F.value=gy(ye)+30;const ge=He.reduce((Re,Ke)=>ee(Re,Ke,"value")).value;R.value=gy(ge)+30}return He}),ee=(He,ye,ge)=>{const Re=Ke=>(Ke.match(/[A-Z]/g)||[]).length;return He[ge].length===ye[ge].length?Re(He[ge])>Re(ye[ge])?He:ye:He[ge].length>ye[ge].length?He:ye};wA().then(He=>{y.value=He,M.domain=y.value.domainList[0],T.value=y.value.loginOpacity,r.value=!1});function se(){if(Y.value=y.value.tgBotStatus,W.value=y.value.tgBotToken,B.value=[],y.value.tgChatId){const He=y.value.tgChatId.split(",");B.value.push(...He)}h.value=!0}function me(){g.value=!0}function xe(){if(V.value=[],O.value=y.value.forwardStatus,y.value.forwardEmail){const He=y.value.forwardEmail.split(",");V.value.push(...He)}p.value=!0}function le(){if(L.value=y.value.ruleType,U.value=[],y.value.ruleEmail){const He=y.value.ruleEmail.split(",");U.value.push(...He)}v.value=!0}function fe(He){const ye=Array.from(new Set(He.split(/[,,]/).map(ge=>ge.trim()).filter(ge=>ge)));V.value.splice(V.value.length-1,1),ye.forEach(ge=>{Vl(ge)&&!V.value.includes(ge)&&V.value.push(ge)})}function ke(He){const ye=Array.from(new Set(He.split(/[,,]/).map(ge=>ge.trim()).filter(ge=>ge)));U.value.splice(U.value.length-1,1),ye.forEach(ge=>{Vl(ge)&&!U.value.includes(ge)&&U.value.push(ge)})}function he(He){const ye=Array.from(new Set(He.split(/[,,]/).map(ge=>ge.trim()).filter(ge=>ge)));B.value.splice(B.value.length-1,1),ye.forEach(ge=>{isNaN(Number(ge))||B.value.push(ge)})}function ze(){const He={tgBotToken:W.value,tgBotStatus:Y.value,tgChatId:B.value+""};Rt(He)}function Ye(){const He={forwardStatus:O.value,forwardEmail:V.value+""};Rt(He)}function Z(){const He={ruleEmail:U.value+"",ruleType:L.value};Rt(He)}function oe(){const He={};He.loginOpacity=T.value,Rt(He,!0)}const de=xs(oe,1e3,{leading:!1,trailing:!0});function Te(){Ta.prompt(t("clearAllDelConfirm"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),dangerouslyUseHTMLString:!0,title:t("warning"),type:"warning",inputPattern:new RegExp(`^${t("delInputPattern")}$`),inputErrorMessage:t("inputErrorMessage")}).then(()=>{lue().then(()=>{It({message:t("delSuccessMsg"),type:"success",plain:!0})})})}function Ce(){Ta.confirm(t("delBackgroundConfirm"),{confirmButtonText:t("confirm"),cancelButtonText:t("cancel"),type:"warning"}).then(()=>{y.value.background=null,Rt({background:null})})}function Ve(){const He={};He.siteKey=k.siteKey,He.secretKey=k.secretKey,Rt(He)}function ie(){_.value=!0,a.value.getCropData(He=>{sue(He).then(ye=>{y.value.background=ye,o.value=!1,It({message:t("changSuccessMsg"),type:"success",plain:!0})}).finally(()=>{_.value=!1})})}function ne(){const He=document.createElement("input");He.setAttribute("type","file"),He.setAttribute("accept","image/*"),He.click(),He.onchange=async ye=>{i.value=URL.createObjectURL(ye.target.files[0]),o.value=!0}}function we(){const He={r2Domain:S.value};Rt(He)}function Ae(){c.value=!0}function ut(){const He={resendTokens:{}},ye=M.domain.slice(1);He.resendTokens[ye]=M.token,Rt(He)}function Ge(){({...y.value},E=JSON.stringify(y.value))}function ue(){M.token=""}function De(){return _.value?!1:(Ge(),!0)}function it(He){const ye={...y.value};delete ye.siteKey,delete ye.secretKey,delete ye.resendTokens,Rt(ye,!1)}function St(){wA().then(He=>{m.settings=He,m.domainList=He.domainList})}function Ft(){Rt({title:w.value})}function cn(He){const ye=document.createElement("a");ye.href=He,ye.target="_blank",ye.click()}function Rt(He,ye=!0){_.value||(_.value=!0,oue(He).then(()=>{_.value=!1,It({message:t("changSuccessMsg"),type:"success",plain:!0}),y.value.manyEmail===1&&(s.currentAccountId=l.user.accountId),ye&&St(),u.value=!1,f.value=!1,c.value=!1,d.value=!1,h.value=!1,p.value=!1,v.value=!1}).catch(ge=>{console.log(ge),T.value=y.value.loginOpacity,y.value={...y.value,...JSON.parse(E)}}).finally(()=>{_.value=!1}))}return(He,ye)=>{const ge=Ute,Re=Fs,Ke=Ns,re=$s,Ze=Xr,_e=r2,ft=QQ,rt=Or,Rn=Jf,vr=qt("vueCropper"),Ir=a2,Ar=ny,en=M0,lr=R0,zs=L0,ci=Pa;return N(),te("div",Nve,[r.value?(N(),te("div",Fve,[H(Ms)])):(N(),pe(ci,{key:1,class:"scroll"},{default:J(()=>[I("div",Bve,[I("div",Vve,[I("div",zve,[I("div",Hve,ae(He.$t("websiteSetting")),1),I("div",Uve,[I("div",Wve,[I("div",null,[I("span",null,ae(He.$t("websiteReg")),1)]),I("div",null,[H(ge,{onChange:it,"before-change":De,"active-value":0,"inactive-value":1,modelValue:b(y).register,"onUpdate:modelValue":ye[0]||(ye[0]=lt=>b(y).register=lt)},null,8,["modelValue"])])]),I("div",Kve,[I("div",null,[I("span",null,ae(He.$t("regKey")),1)]),I("div",null,[H(Ke,{onChange:it,style:zt(`width: ${b(n)==="en"?100:80}px;`),modelValue:b(y).regKey,"onUpdate:modelValue":ye[1]||(ye[1]=lt=>b(y).regKey=lt),placeholder:"Select"},{default:J(()=>[(N(),te(bt,null,rn(A,lt=>H(Re,{key:lt.value,label:lt.label,value:lt.value},null,8,["label","value"])),64))]),_:1},8,["style","modelValue"])])]),I("div",Yve,[I("div",null,[I("span",null,ae(He.$t("addAccount")),1)]),I("div",null,[H(ge,{onChange:it,"before-change":De,"active-value":0,"inactive-value":1,modelValue:b(y).addEmail,"onUpdate:modelValue":ye[2]||(ye[2]=lt=>b(y).addEmail=lt)},null,8,["modelValue"])])]),I("div",jve,[I("div",null,[I("span",null,ae(He.$t("multipleEmail")),1),H(re,{effect:"dark",content:He.$t("multipleEmailDesc")},{default:J(()=>[H(b(ot),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1},8,["content"])]),I("div",null,[H(ge,{onChange:it,"before-change":De,"active-value":0,"inactive-value":1,modelValue:b(y).manyEmail,"onUpdate:modelValue":ye[3]||(ye[3]=lt=>b(y).manyEmail=lt)},null,8,["modelValue"])])]),I("div",Gve,[I("div",null,[I("span",null,ae(He.$t("physicallyWipeData")),1),H(re,{effect:"dark",content:He.$t("physicallyWipeDataDesc")},{default:J(()=>[H(b(ot),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1},8,["content"])]),I("div",null,[H(Ze,{class:"opt-button",style:{"margin-top":"0"},onClick:Te,size:"small",type:"primary"},{default:J(()=>[H(b(ot),{icon:"material-symbols:delete-outline-rounded",width:"16",height:"16"})]),_:1})])])])]),I("div",qve,[I("div",Xve,ae(He.$t("customization")),1),I("div",Zve,[I("div",Jve,[I("div",Qve,[I("span",null,ae(He.$t("websiteTitle")),1)]),I("div",ege,[I("span",null,ae(b(y).title),1),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:ye[4]||(ye[4]=lt=>u.value=!0)},{default:J(()=>[H(b(ot),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])]),I("div",tge,[I("div",nge,[I("span",null,ae(He.$t("loginBoxOpacity")),1)]),I("div",null,[H(_e,{size:"small",modelValue:T.value,"onUpdate:modelValue":ye[5]||(ye[5]=lt=>T.value=lt),onChange:b(de),precision:2,step:.01,max:1,min:0},null,8,["modelValue","onChange"])])]),I("div",rge,[I("div",null,[I("span",null,ae(He.$t("loginBackground")),1)]),I("div",null,[H(ft,{class:"background",src:b(Nf)(b(y).background),"preview-src-list":[b(Nf)(b(y).background)],"show-progress":"",fit:"cover"},{error:J(()=>[I("div",{class:"error-image",onClick:ne},[H(b(ot),{icon:"ph:image",width:"24",height:"24"})])]),_:1},8,["src","preview-src-list"]),I("div",age,[H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:ne},{default:J(()=>[H(b(ot),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1}),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:Ce},{default:J(()=>[H(b(ot),{icon:"material-symbols:delete-outline-rounded",width:"16",height:"16"})]),_:1})])])])])]),I("div",ige,[I("div",oge,ae(He.$t("emailSetting")),1),I("div",sge,[I("div",lge,[I("div",null,[I("span",null,ae(He.$t("receiveEmails")),1)]),I("div",null,[H(ge,{onChange:it,"before-change":De,"active-value":0,"inactive-value":1,modelValue:b(y).receive,"onUpdate:modelValue":ye[6]||(ye[6]=lt=>b(y).receive=lt)},null,8,["modelValue"])])]),I("div",uge,[I("div",null,[I("span",null,ae(He.$t("autoRefresh")),1),H(re,{effect:"dark",content:He.$t("autoRefreshDesc")},{default:J(()=>[H(b(ot),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1},8,["content"])]),I("div",null,[H(Ke,{onChange:it,style:zt(`width: ${b(n)==="en"?100:80}px;`),modelValue:b(y).autoRefreshTime,"onUpdate:modelValue":ye[7]||(ye[7]=lt=>b(y).autoRefreshTime=lt),placeholder:"Select"},{default:J(()=>[(N(),te(bt,null,rn(D,lt=>H(Re,{key:lt.value,label:lt.label,value:lt.value},null,8,["label","value"])),64))]),_:1},8,["style","modelValue"])])]),I("div",cge,[I("div",null,[I("span",null,ae(He.$t("sendEmail")),1)]),I("div",null,[H(ge,{onChange:it,"before-change":De,"active-value":0,"inactive-value":1,modelValue:b(y).send,"onUpdate:modelValue":ye[8]||(ye[8]=lt=>b(y).send=lt)},null,8,["modelValue"])])]),I("div",fge,[I("div",null,[I("span",null,ae(He.$t("resendToken")),1)]),I("div",null,[H(Ze,{class:"opt-button",style:{"margin-top":"0"},onClick:me,size:"small",type:"primary"},{default:J(()=>[H(b(ot),{icon:"ic:round-list",width:"18",height:"18"})]),_:1}),H(Ze,{class:"opt-button",style:{"margin-top":"0"},onClick:Ae,size:"small",type:"primary"},{default:J(()=>[H(b(ot),{icon:"material-symbols:add-rounded",width:"16",height:"16"})]),_:1})])])])]),I("div",dge,[I("div",hge,ae(He.$t("R2OS")),1),I("div",pge,[I("div",vge,[I("div",null,[I("span",null,ae(He.$t("osDomain")),1)]),I("div",gge,[I("span",null,ae(b(y).r2Domain||""),1),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:ye[9]||(ye[9]=lt=>f.value=!0)},{default:J(()=>[H(b(ot),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])])])]),I("div",mge,[I("div",yge,ae(He.$t("emailPush")),1),I("div",bge,[I("div",_ge,[I("div",null,[I("span",null,ae(He.$t("tgBot")),1)]),I("div",wge,[I("span",null,ae(b(y).tgBotStatus===0?He.$t("enabled"):He.$t("disabled")),1),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:se},{default:J(()=>[H(b(ot),{icon:"fluent:settings-48-regular",width:"18",height:"18"})]),_:1})])]),I("div",Sge,[I("div",null,[I("span",null,ae(He.$t("otherEmail")),1)]),I("div",Cge,[I("span",null,ae(b(y).forwardStatus===0?He.$t("enabled"):He.$t("disabled")),1),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:xe},{default:J(()=>[H(b(ot),{icon:"fluent:settings-48-regular",width:"18",height:"18"})]),_:1})])]),I("div",Tge,[I("div",null,[I("span",null,ae(He.$t("forwardingRules")),1)]),I("div",Ege,[I("span",null,ae(b(y).ruleType===0?He.$t("forwardAll"):He.$t("rules")),1),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:le},{default:J(()=>[H(b(ot),{icon:"fluent:settings-48-regular",width:"18",height:"18"})]),_:1})])])])]),I("div",xge,[I("div",kge,ae(He.$t("turnstileSetting")),1),I("div",Mge,[I("div",Ige,[I("div",null,[I("span",null,ae(He.$t("signUpVerification")),1)]),I("div",null,[H(ge,{onChange:it,"before-change":De,"active-value":0,"inactive-value":1,modelValue:b(y).registerVerify,"onUpdate:modelValue":ye[10]||(ye[10]=lt=>b(y).registerVerify=lt)},null,8,["modelValue"])])]),I("div",Age,[I("div",null,[I("span",null,ae(He.$t("addEmailVerification")),1)]),I("div",null,[H(ge,{onChange:it,"before-change":De,"active-value":0,"inactive-value":1,modelValue:b(y).addEmailVerify,"onUpdate:modelValue":ye[11]||(ye[11]=lt=>b(y).addEmailVerify=lt)},null,8,["modelValue"])])]),I("div",Dge,[ye[42]||(ye[42]=I("div",null,[I("span",null,"Site Key")],-1)),I("div",Pge,[I("span",null,ae(b(y).siteKey),1),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:ye[12]||(ye[12]=lt=>d.value=!0)},{default:J(()=>[H(b(ot),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])]),I("div",Oge,[ye[43]||(ye[43]=I("div",null,[I("span",null,"Secret Key")],-1)),I("div",Lge,[I("span",null,ae(b(y).secretKey),1),H(Ze,{class:"opt-button",size:"small",type:"primary",onClick:ye[13]||(ye[13]=lt=>d.value=!0)},{default:J(()=>[H(b(ot),{icon:"lsicon:edit-outline",width:"16",height:"16"})]),_:1})])])])]),I("div",Rge,[I("div",$ge,ae(He.$t("about")),1),I("div",Nge,[I("div",Fge,[I("span",null,ae(He.$t("version"))+" :",1),ye[44]||(ye[44]=I("span",null,"v1.5.0",-1))]),I("div",Bge,[I("span",null,ae(He.$t("community"))+" : ",1),H(Ze,{onClick:ye[14]||(ye[14]=lt=>cn("https://github.com/eoao/cloud-mail"))},{icon:J(()=>[H(b(ot),{icon:"codicon:github-inverted",width:"22",height:"22"})]),default:J(()=>[ye[45]||(ye[45]=nt(" Github "))]),_:1}),H(Ze,{onClick:ye[15]||(ye[15]=lt=>cn("https://t.me/cloud_mail_tg"))},{icon:J(()=>[H(b(ot),{icon:"logos:telegram",width:"30",height:"30"})]),default:J(()=>[ye[46]||(ye[46]=nt(" Telegram "))]),_:1})]),I("div",Vge,[I("span",null,ae(He.$t("support"))+" : ",1),H(Ze,{onClick:ye[16]||(ye[16]=lt=>cn("https://afdian.com/a/eoao_"))},{icon:J(()=>[H(b(ot),{color:"#8261DB",icon:"simple-icons:afdian",width:"24",height:"24"})]),default:J(()=>[ye[47]||(ye[47]=nt(" Afdian "))]),_:1})])])])])]),H(Rn,{modelValue:u.value,"onUpdate:modelValue":ye[18]||(ye[18]=lt=>u.value=lt),title:He.$t("changeTitle"),width:"340",onClosed:ye[19]||(ye[19]=lt=>w.value="")},{default:J(()=>[I("form",null,[H(rt,{type:"text",placeholder:He.$t("websiteTitle"),modelValue:w.value,"onUpdate:modelValue":ye[17]||(ye[17]=lt=>w.value=lt)},null,8,["placeholder","modelValue"]),H(Ze,{type:"primary",loading:_.value,onClick:Ft},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"]),H(Rn,{modelValue:c.value,"onUpdate:modelValue":ye[22]||(ye[22]=lt=>c.value=lt),title:He.$t("resendToken"),width:"340",onClosed:ue},{default:J(()=>[I("form",null,[H(Ke,{style:{"margin-bottom":"15px"},modelValue:M.domain,"onUpdate:modelValue":ye[20]||(ye[20]=lt=>M.domain=lt),placeholder:"Select"},{default:J(()=>[(N(!0),te(bt,null,rn(b(m).domainList,lt=>(N(),pe(Re,{key:lt,label:lt,value:lt},null,8,["label","value"]))),128))]),_:1},8,["modelValue"]),H(rt,{type:"text",placeholder:He.$t("addResendTokenDesc"),modelValue:M.token,"onUpdate:modelValue":ye[21]||(ye[21]=lt=>M.token=lt)},null,8,["placeholder","modelValue"]),H(Ze,{type:"primary",loading:_.value,onClick:ut},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"]),H(Rn,{modelValue:f.value,"onUpdate:modelValue":ye[24]||(ye[24]=lt=>f.value=lt),title:He.$t("addOsDomain"),width:"340",onClosed:ye[25]||(ye[25]=lt=>S.value="")},{default:J(()=>[I("form",null,[H(rt,{type:"text",placeholder:He.$t("domainDesc"),modelValue:S.value,"onUpdate:modelValue":ye[23]||(ye[23]=lt=>S.value=lt)},null,8,["placeholder","modelValue"]),H(Ze,{type:"primary",loading:_.value,onClick:we},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"]),H(Rn,{modelValue:d.value,"onUpdate:modelValue":ye[28]||(ye[28]=lt=>d.value=lt),title:He.$t("addTurnstileSecret"),width:"340",onClosed:ye[29]||(ye[29]=lt=>{k.secretKey="",k.siteKey=""})},{default:J(()=>[I("form",null,[H(rt,{type:"text",placeholder:"Site Key",modelValue:k.siteKey,"onUpdate:modelValue":ye[26]||(ye[26]=lt=>k.siteKey=lt)},null,8,["modelValue"]),H(rt,{type:"text",style:{"margin-top":"15px"},placeholder:"Secret Key",modelValue:k.secretKey,"onUpdate:modelValue":ye[27]||(ye[27]=lt=>k.secretKey=lt)},null,8,["modelValue"]),H(Ze,{type:"primary",loading:_.value,onClick:Ve},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"]),H(Rn,{modelValue:o.value,"onUpdate:modelValue":ye[30]||(ye[30]=lt=>o.value=lt),title:He.$t("backgroundCropping"),class:"cut-dialog"},{default:J(()=>[I("div",zge,[H(vr,{ref_key:"cropper",ref:a,img:i.value,fixedNumber:[16,9],outputType:"jpeg",fixed:!0,centerBox:!0,full:!0,autoCrop:!0,outputSize:.92},null,8,["img"])]),I("div",Hge,[H(Ze,{type:"primary",loading:_.value,onClick:ie},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"]),H(Rn,{modelValue:h.value,"onUpdate:modelValue":ye[34]||(ye[34]=lt=>h.value=lt),class:"forward-dialog"},{header:J(()=>[I("div",Uge,[I("span",Wge,ae(He.$t("tgBot")),1),H(re,{effect:"dark",content:He.$t("tgBotDesc")},{default:J(()=>[H(b(ot),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1},8,["content"])])]),footer:J(()=>[I("div",Yge,[H(ge,{modelValue:Y.value,"onUpdate:modelValue":ye[33]||(ye[33]=lt=>Y.value=lt),"active-value":0,"inactive-value":1,"active-text":He.$t("enable"),"inactive-text":He.$t("disable")},null,8,["modelValue","active-text","inactive-text"]),H(Ze,{loading:_.value,type:"primary",onClick:ze},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),default:J(()=>[I("div",Kge,[H(rt,{placeholder:He.$t("tgBotToken"),modelValue:W.value,"onUpdate:modelValue":ye[31]||(ye[31]=lt=>W.value=lt)},null,8,["placeholder","modelValue"]),H(Ir,{"tag-type":"warning",placeholder:He.$t("toBotTokenDesc"),modelValue:B.value,"onUpdate:modelValue":ye[32]||(ye[32]=lt=>B.value=lt),onAddTag:he},null,8,["placeholder","modelValue"])])]),_:1},8,["modelValue"]),H(Rn,{modelValue:p.value,"onUpdate:modelValue":ye[37]||(ye[37]=lt=>p.value=lt),class:"forward-dialog"},{header:J(()=>[I("div",jge,[I("span",Gge,ae(He.$t("otherEmail")),1),H(re,{effect:"dark",content:He.$t("otherEmailDec")},{default:J(()=>[H(b(ot),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1},8,["content"])])]),footer:J(()=>[I("div",Xge,[H(ge,{modelValue:O.value,"onUpdate:modelValue":ye[36]||(ye[36]=lt=>O.value=lt),"active-value":0,"inactive-value":1,"active-text":He.$t("enable"),"inactive-text":He.$t("disable")},null,8,["modelValue","active-text","inactive-text"]),H(Ze,{loading:_.value,type:"primary",onClick:Ye},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),default:J(()=>[I("div",qge,[H(Ir,{"tag-type":"warning",placeholder:He.$t("otherEmailInputDesc"),modelValue:V.value,"onUpdate:modelValue":ye[35]||(ye[35]=lt=>V.value=lt),onAddTag:fe},null,8,["placeholder","modelValue"])])]),_:1},8,["modelValue"]),H(Rn,{modelValue:v.value,"onUpdate:modelValue":ye[40]||(ye[40]=lt=>v.value=lt),class:"forward-dialog"},{header:J(()=>[I("div",Zge,[I("span",Jge,ae(He.$t("forwardingRules")),1),H(re,{effect:"dark",content:He.$t("forwardingRulesDesc")},{default:J(()=>[H(b(ot),{class:"warning",icon:"fe:warning",width:"18",height:"18"})]),_:1},8,["content"])])]),footer:J(()=>[I("div",eme,[H(en,{modelValue:L.value,"onUpdate:modelValue":ye[39]||(ye[39]=lt=>L.value=lt)},{default:J(()=>[H(Ar,{value:0},{default:J(()=>[nt(ae(He.$t("forwardAll")),1)]),_:1}),H(Ar,{value:1},{default:J(()=>[nt(ae(He.$t("rules")),1)]),_:1})]),_:1},8,["modelValue"]),H(Ze,{loading:_.value,type:"primary",onClick:Z},{default:J(()=>[nt(ae(He.$t("save")),1)]),_:1},8,["loading"])])]),default:J(()=>[I("div",Qge,[H(Ir,{placeholder:He.$t("ruleEmailsInputDesc"),"tag-type":"success",modelValue:U.value,"onUpdate:modelValue":ye[38]||(ye[38]=lt=>U.value=lt),onAddTag:ke},null,8,["placeholder","modelValue"])])]),_:1},8,["modelValue"]),H(Rn,{class:"resend-table",modelValue:g.value,"onUpdate:modelValue":ye[41]||(ye[41]=lt=>g.value=lt),title:He.$t("resendTokenList")},{default:J(()=>[H(zs,{data:X.value},{default:J(()=>[H(lr,{"min-width":F.value,property:"key",label:He.$t("domain"),"show-overflow-tooltip":!0},null,8,["min-width","label"]),H(lr,{width:R.value,property:"value",label:"Token",fixed:"right","show-overflow-tooltip":!0},null,8,["width"])]),_:1},8,["data"])]),_:1},8,["modelValue","title"])]),_:1}))])}}}),nme=sr(tme,[["__scopeId","data-v-1034deff"]]),rme=Object.freeze(Object.defineProperty({__proto__:null,default:nme},Symbol.toStringTag,{value:"Module"}));function ame(e){return Zt.get("/regKey/list",{params:{...e}})}function ime(e){return Zt.post("/regKey/add",e)}function ome(e){return Zt.delete("/regKey/delete?regKeyIds="+e)}function sme(){return Zt.delete("/regKey/clearNotUse")}function lme(e){return Zt.get("/regKey/history",{params:{regKeyId:e}})}const ume={class:"reg-key"},cme={class:"header-actions"},fme={class:"search"},dme={class:"code-box"},hme={class:"code-item"},pme={class:"code-info"},vme={class:"info-left"},gme={class:"info-left-item"},mme=["onClick"],yme={class:"info-left-item"},bme={key:0},_me={class:"info-left-item"},wme={class:"info-left-item"},Sme={key:0},Cme={class:"info-right"},Tme={key:0,class:"empty"},Eme={class:"container"},xme=Object.assign({name:"reg-key"},{__name:"index",setup(e){const t=N2(),n=Ur(),r=Yt({code:""}),{t:a}=Hr(),i=Yt([]),o=j(!1),s=j(!1),l=j(!0),u=j(!0),c=j(!1),f=Yt([]),d=j(0),h=j(0),p=j(!1),v=window.innerWidth<1025,g=Yt({code:"",count:1,roleId:null,expireTime:null}),m=Yt([]);M(!0),Mh().then(F=>{i.length=0,i.push(...F)}),Je(()=>t.refresh,()=>{Mh().then(F=>{i.length=0,i.push(...F)})});function y(F){f.length=0,p.value=!0,lme(F.regKeyId).then(R=>{if(f.push(...R),R.length>0){const L=R.reduce((X,ee)=>w(X,ee,"email")).email;d.value=gy(L)+30,d.value=d.value<300?d.value:300;const U=R.reduce((X,ee)=>w(X,ee,"createTime")).createTime;h.value=gy(U)}}).finally(()=>{p.value=!1}),c.value=!0}const w=(F,R,L)=>{const U=X=>(X.match(/[A-Z]/g)||[]).length;return F[L].length===R[L].length?U(F[L])>U(R[L])?F:R:F[L].length>R[L].length?F:R};function _(F){const R=kh(F.createTime),L=xt().year(),U=R.year();return n.lang==="zh"?U===L?R.format("M月D日 HH:mm"):R.format("YYYY年M月D日 HH:mm"):U===L?R.format("MMM D, HH:mm"):R.format("MMM D, YYYY HH:mm")}function S(F){const R=kh(F),L=xt().year(),U=R.year();return n.lang==="zh"?U===L?R.format("M月D日"):R.format("YYYY年M月D日"):U===L?R.format("MMM D"):R.format("MMM D, YYYY")}function T(){r.code=null,M(!0)}function E(){M(!0)}function M(F=!1){F&&(l.value=!0),ame(r).then(R=>{m.length=0,m.push(...R),l.value=!1,u.value=!1})}async function k(F){try{await navigator.clipboard.writeText(F),It({message:a("copySuccessMsg"),type:"success",plain:!0})}catch(R){console.error("复制失败:",R),It({message:"复制失败",type:"error",plain:!0})}}function A(){g.code=D()}function D(F=8){const R="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";let L="";for(let U=0;U{sme().then(()=>{It({message:a("clearSuccess"),type:"success",plain:!0}),M()})})}function Y(){if(!g.code){It({message:$("emptyRegKeyMsg"),type:"error",plain:!0});return}if(!g.roleId){It({message:a("emptyRole"),type:"error",plain:!0});return}if(!g.expireTime){It({message:a("emptyTimeMsg"),type:"error",plain:!0});return}if(!g.count){It({message:a("emptyCountMsg"),type:"error",plain:!0});return}o.value=!0,ime(g).then(()=>{s.value=!1,V(),It({message:a("addSuccessMsg"),type:"success",plain:!0}),M()}).finally(()=>{o.value=!1})}function W(F){Ta.confirm(a("delConfirm",{msg:F.code}),{confirmButtonText:a("confirm"),cancelButtonText:a("cancel"),type:"warning"}).then(()=>{ome([F.regKeyId]).then(()=>{M(),It({message:a("delSuccessMsg"),type:"success",plain:!0})})})}function V(){g.code=""}function O(){A(),s.value=!0}return(F,R)=>{const L=Or,U=Sc,X=D0,ee=P0,se=Up,me=O0,xe=Pa,le=Fs,fe=Ns,ke=PJ,he=r2,ze=Xr,Ye=Jf,Z=R0,oe=L0;return N(),te("div",ume,[I("div",cme,[H(b(ot),{class:"icon",icon:"ion:add-outline",width:"23",height:"23",onClick:O}),I("div",fme,[H(L,{modelValue:r.code,"onUpdate:modelValue":R[0]||(R[0]=de=>r.code=de),class:"search-input",placeholder:F.$t("searchRegKeyDesc")},null,8,["modelValue","placeholder"])]),H(b(ot),{class:"icon",icon:"iconoir:search",onClick:E,width:"20",height:"20"}),H(b(ot),{class:"icon",icon:"ion:reload",width:"18",height:"18",onClick:T}),H(b(ot),{class:"icon",icon:"fluent:broom-sparkle-16-regular",width:"22",height:"22",onClick:B})]),H(xe,{class:"scrollbar",style:zt(`background: ${m.length>0?"#FAFCFF;":"#FFF"}`)},{default:J(()=>[I("div",{class:q(["loading",l.value?"loading-show":"loading-hide"])},[H(Ms)],2),I("div",dme,[(N(!0),te(bt,null,rn(m,de=>(N(),te("div",hme,[I("div",pme,[I("div",vme,[I("div",gme,[I("span",{class:"code",onClick:Te=>k(de.code)},ae(de.code),9,mme)]),I("div",yme,[I("div",null,ae(F.$t("remainingUses"))+":",1),de.count?(N(),te("div",bme,ae(de.count),1)):(N(),pe(U,{key:1,type:"danger"},{default:J(()=>[nt(ae(F.$t("exhausted")),1)]),_:1}))]),I("div",_me,[I("div",null,ae(F.$t("roleDesc"))+":",1),H(U,null,{default:J(()=>[nt(ae(de.roleName),1)]),_:2},1024)]),I("div",wme,[I("div",null,ae(F.$t("validUntil"))+":",1),de.expireTime?(N(),te("div",Sme,ae(S(de.expireTime)),1)):(N(),pe(U,{key:1,type:"danger"},{default:J(()=>[nt(ae(F.$t("expired")),1)]),_:1}))])]),I("div",Cme,[H(se,{class:"setting"},{dropdown:J(()=>[H(ee,null,{default:J(()=>[H(X,{onClick:Te=>k(de.code)},{default:J(()=>[nt(ae(F.$t("copy")),1)]),_:2},1032,["onClick"]),H(X,{onClick:Te=>y(de)},{default:J(()=>[nt(ae(F.$t("history")),1)]),_:2},1032,["onClick"]),H(X,{onClick:Te=>W(de)},{default:J(()=>[nt(ae(F.$t("delete")),1)]),_:2},1032,["onClick"])]),_:2},1024)]),default:J(()=>[H(b(ot),{icon:"fluent:settings-24-filled",width:"21",height:"21",color:"#909399"})]),_:2},1024)])])]))),256))]),m.length===0?(N(),te("div",Tme,[u.value?Ee("",!0):(N(),pe(me,{key:0,"image-size":v?120:0,description:F.$t("noCodeFound")},null,8,["image-size","description"]))])):Ee("",!0)]),_:1},8,["style"]),H(Ye,{modelValue:s.value,"onUpdate:modelValue":R[5]||(R[5]=de=>s.value=de),title:F.$t("addRegKey")},{default:J(()=>[I("div",Eme,[H(L,{modelValue:g.code,"onUpdate:modelValue":R[1]||(R[1]=de=>g.code=de),placeholder:F.$t("regKey")},{suffix:J(()=>[H(b(ot),{onClick:Lt(A,["stop"]),class:"gen-code",icon:"bitcoin-icons:refresh-filled",width:"24",height:"24"})]),_:1},8,["modelValue","placeholder"]),H(fe,{modelValue:g.roleId,"onUpdate:modelValue":R[2]||(R[2]=de=>g.roleId=de),placeholder:F.$t("roleDesc")},{default:J(()=>[(N(!0),te(bt,null,rn(i,de=>(N(),pe(le,{label:de.name,value:de.roleId,key:de.roleId},null,8,["label","value"]))),128))]),_:1},8,["modelValue","placeholder"]),H(ke,{modelValue:g.expireTime,"onUpdate:modelValue":R[3]||(R[3]=de=>g.expireTime=de),type:"date",placeholder:F.$t("validUntil")},null,8,["modelValue","placeholder"]),H(he,{modelValue:g.count,"onUpdate:modelValue":R[4]||(R[4]=de=>g.count=de),min:1,max:99999},null,8,["modelValue"]),H(ze,{class:"btn",type:"primary",onClick:Y,loading:o.value},{default:J(()=>[nt(ae(F.$t("add")),1)]),_:1},8,["loading"])])]),_:1},8,["modelValue","title"]),H(Ye,{class:"history-list",modelValue:c.value,"onUpdate:modelValue":R[6]||(R[6]=de=>c.value=de),title:F.$t("useHistory")},{default:J(()=>[I("div",{class:q(["loading",p.value?"loading-show":"loading-hide"])},[H(Ms)],2),p.value?Ee("",!0):(N(),pe(oe,{key:0,data:f,fit:!0,style:{height:"100%"}},{default:J(()=>[H(Z,{"min-width":d.value,property:"email",label:F.$t("user"),"show-overflow-tooltip":!0},null,8,["min-width","label"]),H(Z,{width:h.value,formatter:_,property:"createTime",label:F.$t("date"),fixed:"right","show-overflow-tooltip":!0},null,8,["width","label"])]),_:1},8,["data"]))]),_:1},8,["modelValue","title"])])}}}),kme=sr(xme,[["__scopeId","data-v-5c110eb9"]]),Mme=Object.freeze(Object.defineProperty({__proto__:null,default:kme},Symbol.toStringTag,{value:"Module"})),Ime={class:"email-list-box"},Ame={style:{color:"#333",display:"flex"}},Dme=Object.assign({name:"all-email"},{__name:"index",setup(e){const{t}=Hr(),n=eu(),r=j({}),a=j(""),i=j(),o=()=>{i.value.toggleMenu()},s=Yt({timeSort:0,type:"receive",userEmail:null,accountEmail:null,name:null,subject:null,searchType:"name"}),l=G(()=>{if(s.searchType==="user")return t("user");if(s.searchType==="account")return t("selectEmail");if(s.searchType==="name")return t("sender");if(s.searchType==="subject")return t("subject")}),u=localStorage.getItem("all-email-params");if(u){const v=JSON.parse(u);s.type=v.type,s.timeSort=v.timeSort,s.status=v.status,s.searchType=v.searchType}Je(()=>s,()=>{localStorage.setItem("all-email-params",JSON.stringify(s))},{deep:!0});function c(){a.value=null,s.timeSort=0,s.type="receive",s.userEmail=null,s.accountEmail=null,s.name=null,s.subject=null,s.searchType="name"}function f(){s.userEmail=null,s.accountEmail=null,s.name=null,s.subject=null,s.searchType==="user"&&(s.userEmail=a.value),s.searchType==="account"&&(s.accountEmail=a.value),s.searchType==="name"&&(s.name=a.value),s.searchType==="subject"&&(s.subject=a.value),r.value.refreshList()}function d(){s.timeSort=s.timeSort?0:1,r.value.refreshList()}function h(v){n.contentData.email=v,n.contentData.delType="physics",n.contentData.showStar=!1,n.contentData.showReply=!1,er.push({name:"content"})}function p(v,g){return dhe({emailId:v,size:g,...s})}return(v,g)=>{const m=Fs,y=Ns,w=Or;return N(),te("div",Ime,[H(Gp,{ref_key:"sysEmailScroll",ref:r,"get-emailList":p,"email-delete":b(L4),"star-add":b(nd),"star-cancel":b(rd),"show-star":!1,"show-user-info":"","show-status":"",actionLeft:"4px","show-account-icon":!1,onJump:h,onRefreshBefore:c,type:"all-email"},{first:J(()=>[H(w,{modelValue:a.value,"onUpdate:modelValue":g[1]||(g[1]=_=>a.value=_),placeholder:v.$t("searchByContent"),class:"search-input"},{prefix:J(()=>[I("div",{onClick:Lt(o,["stop"])},[H(y,{ref_key:"mySelect",ref:i,modelValue:s.searchType,"onUpdate:modelValue":g[0]||(g[0]=_=>s.searchType=_),placeholder:v.$t("select"),class:"select"},{default:J(()=>[H(m,{key:"3",label:v.$t("sender"),value:"name"},null,8,["label"]),H(m,{key:"4",label:v.$t("subject"),value:"subject"},null,8,["label"]),H(m,{key:"1",label:v.$t("user"),value:"user"},null,8,["label"]),H(m,{key:"2",label:v.$t("selectEmail"),value:"account"},null,8,["label"])]),_:1},8,["modelValue","placeholder"]),I("div",Ame,[I("span",null,ae(l.value),1),H(b(ot),{class:"setting-icon",icon:"mingcute:down-small-fill",width:"20",height:"20"})])])]),_:1},8,["modelValue","placeholder"]),H(y,{modelValue:s.type,"onUpdate:modelValue":g[2]||(g[2]=_=>s.type=_),placeholder:"Select",class:"status-select"},{default:J(()=>[H(m,{key:"1",label:v.$t("all"),value:"all"},null,8,["label"]),H(m,{key:"3",label:v.$t("received"),value:"receive"},null,8,["label"]),H(m,{key:"2",label:v.$t("sent"),value:"send"},null,8,["label"]),H(m,{key:"4",label:v.$t("deleted"),value:"delete"},null,8,["label"]),H(m,{key:"4",label:v.$t("noRecipient"),value:"noone"},null,8,["label"])]),_:1},8,["modelValue"]),H(b(ot),{class:"icon",icon:"iconoir:search",onClick:f,width:"20",height:"20"}),s.timeSort===0?(N(),pe(b(ot),{key:0,class:"icon",onClick:d,icon:"material-symbols-light:timer-arrow-down-outline",width:"28",height:"28"})):(N(),pe(b(ot),{key:1,class:"icon",onClick:d,icon:"material-symbols-light:timer-arrow-up-outline",width:"28",height:"28"}))]),_:1},8,["email-delete","star-add","star-cancel"])])}}}),Pme=sr(Dme,[["__scopeId","data-v-b7ef255e"]]),Ome=Object.freeze(Object.defineProperty({__proto__:null,default:Pme},Symbol.toStringTag,{value:"Module"}));function Lme(e){return t0()?(n0(e),!0):!1}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function Rme(e,t=!1,n="Timeout"){return new Promise((r,a)=>{setTimeout(t?()=>a(n):r,e)})}function $me(e){return e}function Nme([e,t,n,r]){const a=(c,f)=>1-3*f+3*c,i=(c,f)=>3*f-6*c,o=c=>3*c,s=(c,f,d)=>((a(f,d)*c+i(f,d))*c+o(f))*c,l=(c,f,d)=>3*a(f,d)*c*c+2*i(f,d)*c+o(f),u=c=>{let f=c;for(let d=0;d<4;++d){const h=l(f,e,n);if(h===0)return f;const p=s(f,e,n)-c;f-=p/h}return f};return c=>e===t&&n===r?c:s(u(c),t,r)}function ZA(e,t,n){return e+n*(t-e)}function q_(e){return(typeof e=="number"?[e]:e)||[]}function Fme(e,t,n,r={}){var a,i;const o=bi(t),s=bi(n),l=q_(o),u=q_(s),c=(a=bi(r.duration))!=null?a:1e3,f=Date.now(),d=Date.now()+c,h=typeof r.transition=="function"?r.transition:(i=bi(r.transition))!=null?i:$me,p=typeof h=="function"?h:Nme(h);return new Promise(v=>{e.value=o;const g=()=>{var m;if((m=r.abort)!=null&&m.call(r)){v();return}const y=Date.now(),w=p((y-f)/c),_=q_(e.value).map((S,T)=>ZA(l[T],u[T],w));Array.isArray(e.value)?e.value=_.map((S,T)=>{var E,M;return ZA((E=l[T])!=null?E:0,(M=u[T])!=null?M:0,w)}):typeof e.value=="number"&&(e.value=_[0]),y{const i=bi(e);return typeof i=="number"?i:i.map(bi)},a=j(r());return Je(r,async i=>{var o,s;if(bi(t.disabled))return;const l=++n;if(t.delay&&await Rme(bi(t.delay)),l!==n)return;const u=Array.isArray(i)?i.map(bi):bi(i);(o=t.onStarted)==null||o.call(t),await Fme(a,a.value,u,{...t,abort:()=>{var c;return l!==n||((c=t.abort)==null?void 0:c.call(t))}}),(s=t.onFinished)==null||s.call(t)},{deep:!0}),Je(()=>bi(t.disabled),i=>{i&&(n++,a.value=r())}),Lme(()=>{n++}),G(()=>bi(t.disabled)?r():a.value)}/*! *****************************************************************************
+Copyright (c) Microsoft Corporation.
+
+Permission to use, copy, modify, and/or distribute this software for any
+purpose with or without fee is hereby granted.
+
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
+REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
+AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
+INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+***************************************************************************** */var FS=function(e,t){return FS=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(n[a]=r[a])},FS(e,t)};function Xt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");FS(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var Bme=function(){function e(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return e}(),Vme=function(){function e(){this.browser=new Bme,this.node=!1,this.wxa=!1,this.worker=!1,this.svgSupported=!1,this.touchEventsSupported=!1,this.pointerEventsSupported=!1,this.domSupported=!1,this.transformSupported=!1,this.transform3dSupported=!1,this.hasGlobalWindow=typeof window<"u"}return e}(),Qt=new Vme;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Qt.wxa=!0,Qt.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Qt.worker=!0:!Qt.hasGlobalWindow||"Deno"in window?(Qt.node=!0,Qt.svgSupported=!0):zme(navigator.userAgent,Qt);function zme(e,t){var n=t.browser,r=e.match(/Firefox\/([\d.]+)/),a=e.match(/MSIE\s([\d.]+)/)||e.match(/Trident\/.+?rv:(([\d.]+))/),i=e.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(e);r&&(n.firefox=!0,n.version=r[1]),a&&(n.ie=!0,n.version=a[1]),i&&(n.edge=!0,n.version=i[1],n.newEdge=+i[1].split(".")[0]>18),o&&(n.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!n.ie&&!n.edge,t.pointerEventsSupported="onpointerdown"in window&&(n.edge||n.ie&&+n.version>=11),t.domSupported=typeof document<"u";var s=document.documentElement.style;t.transform3dSupported=(n.ie&&"transition"in s||n.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),t.transformSupported=t.transform3dSupported||n.ie&&+n.version>=9}var F2=12,Hme="sans-serif",cc=F2+"px "+Hme,Ume=20,Wme=100,Kme="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Yme(e){var t={};if(typeof JSON>"u")return t;for(var n=0;n=0)s=o*n.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",r[l]+":0",a[u]+":0",r[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),e.appendChild(o),n.push(o)}return n}function _ye(e,t,n){for(var r=n?"invTrans":"trans",a=t[r],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=e[u].getBoundingClientRect(),f=2*u,d=c.left,h=c.top;o.push(d,h),l=l&&i&&d===i[f]&&h===i[f+1],s.push(e[u].offsetLeft,e[u].offsetTop)}return l&&a?a:(t.srcCoords=o,t[r]=n?QA(s,o):QA(o,s))}function G4(e){return e.nodeName.toUpperCase()==="CANVAS"}var wye=/([&<>"'])/g,Sye={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ca(e){return e==null?"":(e+"").replace(wye,function(t,n){return Sye[n]})}var Cye=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Z_=[],Tye=Qt.browser.firefox&&+Qt.browser.version.split(".")[0]<39;function WS(e,t,n,r){return n=n||{},r?tD(e,t,n):Tye&&t.layerX!=null&&t.layerX!==t.offsetX?(n.zrX=t.layerX,n.zrY=t.layerY):t.offsetX!=null?(n.zrX=t.offsetX,n.zrY=t.offsetY):tD(e,t,n),n}function tD(e,t,n){if(Qt.domSupported&&e.getBoundingClientRect){var r=t.clientX,a=t.clientY;if(G4(e)){var i=e.getBoundingClientRect();n.zrX=r-i.left,n.zrY=a-i.top;return}else if(US(Z_,e,r,a)){n.zrX=Z_[0],n.zrY=Z_[1];return}}n.zrX=n.zrY=0}function j2(e){return e||window.event}function mi(e,t,n){if(t=j2(t),t.zrX!=null)return t;var r=t.type,a=r&&r.indexOf("touch")>=0;if(a){var o=r!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&WS(e,o,t,n)}else{WS(e,t,t,n);var i=Eye(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Cye.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Eye(e){var t=e.wheelDelta;if(t)return t;var n=e.deltaX,r=e.deltaY;if(n==null||r==null)return t;var a=Math.abs(r!==0?r:n),i=r>0?-1:r<0?1:n>0?-1:1;return 3*a*i}function xye(e,t,n,r){e.addEventListener(t,n,r)}function kye(e,t,n,r){e.removeEventListener(t,n,r)}var q4=function(e){e.preventDefault(),e.stopPropagation(),e.cancelBubble=!0},Mye=function(){function e(){this._track=[]}return e.prototype.recognize=function(t,n,r){return this._doTrack(t,n,r),this._recognize(t)},e.prototype.clear=function(){return this._track.length=0,this},e.prototype._doTrack=function(t,n,r){var a=t.touches;if(a){for(var i={points:[],touches:[],target:n,event:t},o=0,s=a.length;o1&&r&&r.length>1){var i=nD(r)/nD(a);!isFinite(i)&&(i=1),t.pinchScale=i;var o=Iye(r);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:e[0].target,event:t}}}}};function Ml(){return[1,0,0,1,0,0]}function Zp(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=1,e[4]=0,e[5]=0,e}function G2(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e}function Il(e,t,n){var r=t[0]*n[0]+t[2]*n[1],a=t[1]*n[0]+t[3]*n[1],i=t[0]*n[2]+t[2]*n[3],o=t[1]*n[2]+t[3]*n[3],s=t[0]*n[4]+t[2]*n[5]+t[4],l=t[1]*n[4]+t[3]*n[5]+t[5];return e[0]=r,e[1]=a,e[2]=i,e[3]=o,e[4]=s,e[5]=l,e}function wy(e,t,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4]+n[0],e[5]=t[5]+n[1],e}function eb(e,t,n,r){r===void 0&&(r=[0,0]);var a=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(n),f=Math.cos(n);return e[0]=a*f+s*c,e[1]=-a*c+s*f,e[2]=i*f+l*c,e[3]=-i*c+f*l,e[4]=f*(o-r[0])+c*(u-r[1])+r[0],e[5]=f*(u-r[1])-c*(o-r[0])+r[1],e}function X4(e,t,n){var r=n[0],a=n[1];return e[0]=t[0]*r,e[1]=t[1]*a,e[2]=t[2]*r,e[3]=t[3]*a,e[4]=t[4]*r,e[5]=t[5]*a,e}function Jp(e,t){var n=t[0],r=t[2],a=t[4],i=t[1],o=t[3],s=t[5],l=n*o-i*r;return l?(l=1/l,e[0]=o*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e[4]=(r*s-o*a)*l,e[5]=(i*a-n*s)*l,e):null}function Aye(e){var t=Ml();return G2(t,e),t}const Dye=Object.freeze(Object.defineProperty({__proto__:null,clone:Aye,copy:G2,create:Ml,identity:Zp,invert:Jp,mul:Il,rotate:eb,scale:X4,translate:wy},Symbol.toStringTag,{value:"Module"}));var nn=function(){function e(t,n){this.x=t||0,this.y=n||0}return e.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},e.prototype.clone=function(){return new e(this.x,this.y)},e.prototype.set=function(t,n){return this.x=t,this.y=n,this},e.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},e.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},e.prototype.scale=function(t){this.x*=t,this.y*=t},e.prototype.scaleAndAdd=function(t,n){this.x+=t.x*n,this.y+=t.y*n},e.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},e.prototype.dot=function(t){return this.x*t.x+this.y*t.y},e.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},e.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},e.prototype.normalize=function(){var t=this.len();return this.x/=t,this.y/=t,this},e.prototype.distance=function(t){var n=this.x-t.x,r=this.y-t.y;return Math.sqrt(n*n+r*r)},e.prototype.distanceSquare=function(t){var n=this.x-t.x,r=this.y-t.y;return n*n+r*r},e.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},e.prototype.transform=function(t){if(t){var n=this.x,r=this.y;return this.x=t[0]*n+t[2]*r+t[4],this.y=t[1]*n+t[3]*r+t[5],this}},e.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},e.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},e.set=function(t,n,r){t.x=n,t.y=r},e.copy=function(t,n){t.x=n.x,t.y=n.y},e.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},e.lenSquare=function(t){return t.x*t.x+t.y*t.y},e.dot=function(t,n){return t.x*n.x+t.y*n.y},e.add=function(t,n,r){t.x=n.x+r.x,t.y=n.y+r.y},e.sub=function(t,n,r){t.x=n.x-r.x,t.y=n.y-r.y},e.scale=function(t,n,r){t.x=n.x*r,t.y=n.y*r},e.scaleAndAdd=function(t,n,r,a){t.x=n.x+r.x*a,t.y=n.y+r.y*a},e.lerp=function(t,n,r,a){var i=1-a;t.x=i*n.x+a*r.x,t.y=i*n.y+a*r.y},e}(),Qv=Math.min,eg=Math.max,vu=new nn,gu=new nn,mu=new nn,yu=new nn,Id=new nn,Ad=new nn,xn=function(){function e(t,n,r,a){r<0&&(t=t+r,r=-r),a<0&&(n=n+a,a=-a),this.x=t,this.y=n,this.width=r,this.height=a}return e.prototype.union=function(t){var n=Qv(t.x,this.x),r=Qv(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=eg(t.x+t.width,this.x+this.width)-n:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=eg(t.y+t.height,this.y+this.height)-r:this.height=t.height,this.x=n,this.y=r},e.prototype.applyTransform=function(t){e.applyTransform(this,this,t)},e.prototype.calculateTransform=function(t){var n=this,r=t.width/n.width,a=t.height/n.height,i=Ml();return wy(i,i,[-n.x,-n.y]),X4(i,i,[r,a]),wy(i,i,[t.x,t.y]),i},e.prototype.intersect=function(t,n){if(!t)return!1;t instanceof e||(t=e.create(t));var r=this,a=r.x,i=r.x+r.width,o=r.y,s=r.y+r.height,l=t.x,u=t.x+t.width,c=t.y,f=t.y+t.height,d=!(ip&&(p=w,vp&&(p=_,m=r.x&&t<=r.x+r.width&&n>=r.y&&n<=r.y+r.height},e.prototype.clone=function(){return new e(this.x,this.y,this.width,this.height)},e.prototype.copy=function(t){e.copy(this,t)},e.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},e.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},e.prototype.isZero=function(){return this.width===0||this.height===0},e.create=function(t){return new e(t.x,t.y,t.width,t.height)},e.copy=function(t,n){t.x=n.x,t.y=n.y,t.width=n.width,t.height=n.height},e.applyTransform=function(t,n,r){if(!r){t!==n&&e.copy(t,n);return}if(r[1]<1e-5&&r[1]>-1e-5&&r[2]<1e-5&&r[2]>-1e-5){var a=r[0],i=r[3],o=r[4],s=r[5];t.x=n.x*a+o,t.y=n.y*i+s,t.width=n.width*a,t.height=n.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}vu.x=mu.x=n.x,vu.y=yu.y=n.y,gu.x=yu.x=n.x+n.width,gu.y=mu.y=n.y+n.height,vu.transform(r),yu.transform(r),gu.transform(r),mu.transform(r),t.x=Qv(vu.x,gu.x,mu.x,yu.x),t.y=Qv(vu.y,gu.y,mu.y,yu.y);var l=eg(vu.x,gu.x,mu.x,yu.x),u=eg(vu.y,gu.y,mu.y,yu.y);t.width=l-t.x,t.height=u-t.y},e}(),Z4="silent";function Pye(e,t,n){return{type:e,event:n,target:t.target,topTarget:t.topTarget,cancelBubble:!1,offsetX:n.zrX,offsetY:n.zrY,gestureEvent:n.gestureEvent,pinchX:n.pinchX,pinchY:n.pinchY,pinchScale:n.pinchScale,wheelDelta:n.zrDelta,zrByTouch:n.zrByTouch,which:n.which,stop:Oye}}function Oye(){q4(this.event)}var Lye=function(e){qn(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.handler=null,n}return t.prototype.dispose=function(){},t.prototype.setCursor=function(){},t}(Zo),Dd=function(){function e(t,n){this.x=t,this.y=n}return e}(),Rye=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Q_=new xn(0,0,0,0),J4=function(e){qn(t,e);function t(n,r,a,i,o){var s=e.call(this)||this;return s._hovered=new Dd(0,0),s.storage=n,s.painter=r,s.painterRoot=i,s._pointerSize=o,a=a||new Lye,s.proxy=null,s.setHandlerProxy(a),s._draggingMgr=new gye(s),s}return t.prototype.setHandlerProxy=function(n){this.proxy&&this.proxy.dispose(),n&&(be(Rye,function(r){n.on&&n.on(r,this[r],this)},this),n.handler=this),this.proxy=n},t.prototype.mousemove=function(n){var r=n.zrX,a=n.zrY,i=Q4(this,r,a),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=i?new Dd(r,a):this.findHover(r,a),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",n),this.dispatchToElement(l,"mousemove",n),u&&u!==s&&this.dispatchToElement(l,"mouseover",n)},t.prototype.mouseout=function(n){var r=n.zrEventControl;r!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",n),r!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:n})},t.prototype.resize=function(){this._hovered=new Dd(0,0)},t.prototype.dispatch=function(n,r){var a=this[n];a&&a.call(this,r)},t.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},t.prototype.setCursorStyle=function(n){var r=this.proxy;r.setCursor&&r.setCursor(n)},t.prototype.dispatchToElement=function(n,r,a){n=n||{};var i=n.target;if(!(i&&i.silent)){for(var o="on"+r,s=Pye(r,n,a);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(r,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(r,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(r,s)}))}},t.prototype.findHover=function(n,r,a){var i=this.storage.getDisplayList(),o=new Dd(n,r);if(rD(i,o,n,r,a),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new xn(n-u,r-u,l,l),f=i.length-1;f>=0;f--){var d=i[f];d!==a&&!d.ignore&&!d.ignoreCoarsePointer&&(!d.parent||!d.parent.ignoreCoarsePointer)&&(Q_.copy(d.getBoundingRect()),d.transform&&Q_.applyTransform(d.transform),Q_.intersect(c)&&s.push(d))}if(s.length)for(var h=4,p=Math.PI/12,v=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,e,t)}});function $ye(e,t,n){if(e[e.rectHover?"rectContain":"contain"](t,n)){for(var r=e,a=void 0,i=!1;r;){if(r.ignoreClip&&(i=!0),!i){var o=r.getClipPath();if(o&&!o.contain(t,n))return!1}r.silent&&(a=!0);var s=r.__hostTarget;r=s||r.parent}return a?Z4:!0}return!1}function rD(e,t,n,r,a){for(var i=e.length-1;i>=0;i--){var o=e[i],s=void 0;if(o!==a&&!o.ignore&&(s=$ye(o,n,r))&&(!t.topTarget&&(t.topTarget=o),s!==Z4)){t.target=o;break}}}function Q4(e,t,n){var r=e.painter;return t<0||t>r.getWidth()||n<0||n>r.getHeight()}var e8=32,Pd=7;function Nye(e){for(var t=0;e>=e8;)t|=e&1,e>>=1;return e+t}function aD(e,t,n,r){var a=t+1;if(a===n)return 1;if(r(e[a++],e[t])<0){for(;a=0;)a++;return a-t}function Fye(e,t,n){for(n--;t>>1,a(i,e[l])<0?s=l:o=l+1;var u=r-o;switch(u){case 3:e[o+3]=e[o+2];case 2:e[o+2]=e[o+1];case 1:e[o+1]=e[o];break;default:for(;u>0;)e[o+u]=e[o+u-1],u--}e[o]=i}}function e1(e,t,n,r,a,i){var o=0,s=0,l=1;if(i(e,t[n+a])>0){for(s=r-a;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o>>1);i(e,t[n+c])>0?o=c+1:l=c}return l}function t1(e,t,n,r,a,i){var o=0,s=0,l=1;if(i(e,t[n+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=r-a;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);i(e,t[n+c])<0?l=c:o=c+1}return l}function Bye(e,t){var n=Pd,r,a,i=0,o=[];r=[],a=[];function s(h,p){r[i]=h,a[i]=p,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&a[h-1]<=a[h]+a[h+1]||h>=2&&a[h-2]<=a[h]+a[h-1])a[h-1]a[h+1])break;c(h)}}function u(){for(;i>1;){var h=i-2;h>0&&a[h-1]=Pd||E>=Pd);if(M)break;S<0&&(S=0),S+=2}if(n=S,n<1&&(n=1),p===1){for(m=0;m=0;m--)e[T+m]=e[S+m];e[_]=o[w];return}for(var E=n;;){var M=0,k=0,A=!1;do if(t(o[w],e[y])<0){if(e[_--]=e[y--],M++,k=0,--p===0){A=!0;break}}else if(e[_--]=o[w--],k++,M=0,--g===1){A=!0;break}while((M|k)=0;m--)e[T+m]=e[S+m];if(p===0){A=!0;break}}if(e[_--]=o[w--],--g===1){A=!0;break}if(k=g-e1(e[y],o,0,g,g-1,t),k!==0){for(_-=k,w-=k,g-=k,T=_+1,S=w+1,m=0;m=Pd||k>=Pd);if(A)break;E<0&&(E=0),E+=2}if(n=E,n<1&&(n=1),g===1){for(_-=p,y-=p,T=_+1,S=y+1,m=p-1;m>=0;m--)e[T+m]=e[S+m];e[_]=o[w]}else{if(g===0)throw new Error;for(S=_-(g-1),m=0;ms&&(l=s),iD(e,n,n+l,n+i,t),i=l}o.pushRun(n,i),o.mergeRuns(),a-=i,n+=i}while(a!==0);o.forceMergeRuns()}}var Ho=1,ym=2,th=4,oD=!1;function n1(){oD||(oD=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function sD(e,t){return e.zlevel===t.zlevel?e.z===t.z?e.z2-t.z2:e.z-t.z:e.zlevel-t.zlevel}var Vye=function(){function e(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=sD}return e.prototype.traverse=function(t,n){for(var r=0;r0&&(c.__clipPaths=[]),isNaN(c.z)&&(n1(),c.z=0),isNaN(c.z2)&&(n1(),c.z2=0),isNaN(c.zlevel)&&(n1(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var f=t.getDecalElement&&t.getDecalElement();f&&this._updateAndAddDisplayable(f,n,r);var d=t.getTextGuideLine();d&&this._updateAndAddDisplayable(d,n,r);var h=t.getTextContent();h&&this._updateAndAddDisplayable(h,n,r)}},e.prototype.addRoot=function(t){t.__zr&&t.__zr.storage===this||this._roots.push(t)},e.prototype.delRoot=function(t){if(t instanceof Array){for(var n=0,r=t.length;n=0&&this._roots.splice(a,1)},e.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},e.prototype.getRoots=function(){return this._roots},e.prototype.dispose=function(){this._displayList=null,this._roots=null},e}(),Sy;Sy=Qt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(e){return setTimeout(e,16)};var Ih={linear:function(e){return e},quadraticIn:function(e){return e*e},quadraticOut:function(e){return e*(2-e)},quadraticInOut:function(e){return(e*=2)<1?.5*e*e:-.5*(--e*(e-2)-1)},cubicIn:function(e){return e*e*e},cubicOut:function(e){return--e*e*e+1},cubicInOut:function(e){return(e*=2)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},quarticIn:function(e){return e*e*e*e},quarticOut:function(e){return 1- --e*e*e*e},quarticInOut:function(e){return(e*=2)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},quinticIn:function(e){return e*e*e*e*e},quinticOut:function(e){return--e*e*e*e*e+1},quinticInOut:function(e){return(e*=2)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},sinusoidalIn:function(e){return 1-Math.cos(e*Math.PI/2)},sinusoidalOut:function(e){return Math.sin(e*Math.PI/2)},sinusoidalInOut:function(e){return .5*(1-Math.cos(Math.PI*e))},exponentialIn:function(e){return e===0?0:Math.pow(1024,e-1)},exponentialOut:function(e){return e===1?1:1-Math.pow(2,-10*e)},exponentialInOut:function(e){return e===0?0:e===1?1:(e*=2)<1?.5*Math.pow(1024,e-1):.5*(-Math.pow(2,-10*(e-1))+2)},circularIn:function(e){return 1-Math.sqrt(1-e*e)},circularOut:function(e){return Math.sqrt(1- --e*e)},circularInOut:function(e){return(e*=2)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},elasticIn:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)))},elasticOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/r)+1)},elasticInOut:function(e){var t,n=.1,r=.4;return e===0?0:e===1?1:(!n||n<1?(n=1,t=r/4):t=r*Math.asin(1/n)/(2*Math.PI),(e*=2)<1?-.5*(n*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)):n*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/r)*.5+1)},backIn:function(e){var t=1.70158;return e*e*((t+1)*e-t)},backOut:function(e){var t=1.70158;return--e*e*((t+1)*e+t)+1},backInOut:function(e){var t=2.5949095;return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)},bounceIn:function(e){return 1-Ih.bounceOut(1-e)},bounceOut:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},bounceInOut:function(e){return e<.5?Ih.bounceIn(e*2)*.5:Ih.bounceOut(e*2-1)*.5+.5}},tg=Math.pow,Al=Math.sqrt,t8=1e-8,n8=1e-4,lD=Al(3),ng=1/3,Do=Tc(),Ti=Tc(),pf=Tc();function wl(e){return e>-1e-8&&et8||e<-1e-8}function jr(e,t,n,r,a){var i=1-a;return i*i*(i*e+3*a*t)+a*a*(a*r+3*i*n)}function uD(e,t,n,r,a){var i=1-a;return 3*(((t-e)*i+2*(n-t)*a)*i+(r-n)*a*a)}function Cy(e,t,n,r,a,i){var o=r+3*(t-n)-e,s=3*(n-t*2+e),l=3*(t-e),u=e-a,c=s*s-3*o*l,f=s*l-9*o*u,d=l*l-3*s*u,h=0;if(wl(c)&&wl(f))if(wl(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[h++]=p)}else{var v=f*f-4*c*d;if(wl(v)){var g=f/c,p=-s/o+g,m=-g/2;p>=0&&p<=1&&(i[h++]=p),m>=0&&m<=1&&(i[h++]=m)}else if(v>0){var y=Al(v),w=c*s+1.5*o*(-f+y),_=c*s+1.5*o*(-f-y);w<0?w=-tg(-w,ng):w=tg(w,ng),_<0?_=-tg(-_,ng):_=tg(_,ng);var p=(-s-(w+_))/(3*o);p>=0&&p<=1&&(i[h++]=p)}else{var S=(2*c*s-3*o*f)/(2*Al(c*c*c)),T=Math.acos(S)/3,E=Al(c),M=Math.cos(T),p=(-s-2*E*M)/(3*o),m=(-s+E*(M+lD*Math.sin(T)))/(3*o),k=(-s+E*(M-lD*Math.sin(T)))/(3*o);p>=0&&p<=1&&(i[h++]=p),m>=0&&m<=1&&(i[h++]=m),k>=0&&k<=1&&(i[h++]=k)}}return h}function a8(e,t,n,r,a){var i=6*n-12*t+6*e,o=9*t+3*r-3*e-9*n,s=3*t-3*e,l=0;if(wl(o)){if(r8(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var c=i*i-4*o*s;if(wl(c))a[0]=-i/(2*o);else if(c>0){var f=Al(c),u=(-i+f)/(2*o),d=(-i-f)/(2*o);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function Ty(e,t,n,r,a,i){var o=(t-e)*a+e,s=(n-t)*a+t,l=(r-n)*a+n,u=(s-o)*a+o,c=(l-s)*a+s,f=(c-u)*a+u;i[0]=e,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=r}function zye(e,t,n,r,a,i,o,s,l,u,c){var f,d=.005,h=1/0,p,v,g,m;Do[0]=l,Do[1]=u;for(var y=0;y<1;y+=.05)Ti[0]=jr(e,n,a,o,y),Ti[1]=jr(t,r,i,s,y),g=ec(Do,Ti),g=0&&g=0&&u<=1&&(a[l++]=u)}}else{var c=o*o-4*i*s;if(wl(c)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(c>0){var f=Al(c),u=(-o+f)/(2*i),d=(-o-f)/(2*i);u>=0&&u<=1&&(a[l++]=u),d>=0&&d<=1&&(a[l++]=d)}}return l}function i8(e,t,n){var r=e+n-2*t;return r===0?.5:(e-t)/r}function Ey(e,t,n,r,a){var i=(t-e)*r+e,o=(n-t)*r+t,s=(o-i)*r+i;a[0]=e,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=n}function Wye(e,t,n,r,a,i,o,s,l){var u,c=.005,f=1/0;Do[0]=o,Do[1]=s;for(var d=0;d<1;d+=.05){Ti[0]=Fa(e,n,a,d),Ti[1]=Fa(t,r,i,d);var h=ec(Do,Ti);h=0&&h=1?1:Cy(0,r,i,1,l,s)&&jr(0,a,o,1,s[0])}}}var jye=function(){function e(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||xa,this.ondestroy=t.ondestroy||xa,this.onrestart=t.onrestart||xa,t.easing&&this.setEasing(t.easing)}return e.prototype.step=function(t,n){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=n;return}var r=this._life,a=t-this._startTime-this._pausedTime,i=a/r;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%r;this._startTime=t-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},e.prototype.pause=function(){this._paused=!0},e.prototype.resume=function(){this._paused=!1},e.prototype.setEasing=function(t){this.easing=t,this.easingFunc=tn(t)?t:Ih[t]||o8(t)},e}(),s8=function(){function e(t){this.value=t}return e}(),Gye=function(){function e(){this._len=0}return e.prototype.insert=function(t){var n=new s8(t);return this.insertEntry(n),n},e.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},e.prototype.remove=function(t){var n=t.prev,r=t.next;n?n.next=r:this.head=r,r?r.prev=n:this.tail=n,t.next=t.prev=null,this._len--},e.prototype.len=function(){return this._len},e.prototype.clear=function(){this.head=this.tail=null,this._len=0},e}(),Qp=function(){function e(t){this._list=new Gye,this._maxSize=10,this._map={},this._maxSize=t}return e.prototype.put=function(t,n){var r=this._list,a=this._map,i=null;if(a[t]==null){var o=r.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=r.head;r.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=n:s=new s8(n),s.key=t,r.insertEntry(s),a[t]=s}return i},e.prototype.get=function(t){var n=this._map[t],r=this._list;if(n!=null)return n!==r.tail&&(r.remove(n),r.insertEntry(n)),n.value},e.prototype.clear=function(){this._list.clear(),this._map={}},e.prototype.len=function(){return this._list.len()},e}(),fD={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function oo(e){return e=Math.round(e),e<0?0:e>255?255:e}function qye(e){return e=Math.round(e),e<0?0:e>360?360:e}function pp(e){return e<0?0:e>1?1:e}function r1(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?oo(parseFloat(t)/100*255):oo(parseInt(t,10))}function tc(e){var t=e;return t.length&&t.charAt(t.length-1)==="%"?pp(parseFloat(t)/100):pp(parseFloat(t))}function a1(e,t,n){return n<0?n+=1:n>1&&(n-=1),n*6<1?e+(t-e)*n*6:n*2<1?t:n*3<2?e+(t-e)*(2/3-n)*6:e}function Sl(e,t,n){return e+(t-e)*n}function vi(e,t,n,r,a){return e[0]=t,e[1]=n,e[2]=r,e[3]=a,e}function KS(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}var l8=new Qp(20),rg=null;function Fc(e,t){rg&&KS(rg,t),rg=l8.put(e,rg||t.slice())}function ri(e,t){if(e){t=t||[];var n=l8.get(e);if(n)return KS(t,n);e=e+"";var r=e.replace(/ /g,"").toLowerCase();if(r in fD)return KS(t,fD[r]),Fc(e,t),t;var a=r.length;if(r.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(r.slice(1,4),16);if(!(i>=0&&i<=4095)){vi(t,0,0,0,1);return}return vi(t,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(r.slice(4),16)/15:1),Fc(e,t),t}else if(a===7||a===9){var i=parseInt(r.slice(1,7),16);if(!(i>=0&&i<=16777215)){vi(t,0,0,0,1);return}return vi(t,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(r.slice(7),16)/255:1),Fc(e,t),t}return}var o=r.indexOf("("),s=r.indexOf(")");if(o!==-1&&s+1===a){var l=r.substr(0,o),u=r.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?vi(t,+u[0],+u[1],+u[2],1):vi(t,0,0,0,1);c=tc(u.pop());case"rgb":if(u.length>=3)return vi(t,r1(u[0]),r1(u[1]),r1(u[2]),u.length===3?c:tc(u[3])),Fc(e,t),t;vi(t,0,0,0,1);return;case"hsla":if(u.length!==4){vi(t,0,0,0,1);return}return u[3]=tc(u[3]),YS(u,t),Fc(e,t),t;case"hsl":if(u.length!==3){vi(t,0,0,0,1);return}return YS(u,t),Fc(e,t),t;default:return}}vi(t,0,0,0,1)}}function YS(e,t){var n=(parseFloat(e[0])%360+360)%360/360,r=tc(e[1]),a=tc(e[2]),i=a<=.5?a*(r+1):a+r-a*r,o=a*2-i;return t=t||[],vi(t,oo(a1(o,i,n+1/3)*255),oo(a1(o,i,n)*255),oo(a1(o,i,n-1/3)*255),1),e.length===4&&(t[3]=e[3]),t}function Xye(e){if(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255,a=Math.min(t,n,r),i=Math.max(t,n,r),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var c=((i-t)/6+o/2)/o,f=((i-n)/6+o/2)/o,d=((i-r)/6+o/2)/o;t===i?l=d-f:n===i?l=1/3+c-d:r===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return e[3]!=null&&h.push(e[3]),h}}function jS(e,t){var n=ri(e);if(n){for(var r=0;r<3;r++)t<0?n[r]=n[r]*(1-t)|0:n[r]=(255-n[r])*t+n[r]|0,n[r]>255?n[r]=255:n[r]<0&&(n[r]=0);return tu(n,n.length===4?"rgba":"rgb")}}function Zye(e){var t=ri(e);if(t)return((1<<24)+(t[0]<<16)+(t[1]<<8)+ +t[2]).toString(16).slice(1)}function u8(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){n=n||[];var r=e*(t.length-1),a=Math.floor(r),i=Math.ceil(r),o=t[a],s=t[i],l=r-a;return n[0]=oo(Sl(o[0],s[0],l)),n[1]=oo(Sl(o[1],s[1],l)),n[2]=oo(Sl(o[2],s[2],l)),n[3]=pp(Sl(o[3],s[3],l)),n}}var Jye=u8;function q2(e,t,n){if(!(!(t&&t.length)||!(e>=0&&e<=1))){var r=e*(t.length-1),a=Math.floor(r),i=Math.ceil(r),o=ri(t[a]),s=ri(t[i]),l=r-a,u=tu([oo(Sl(o[0],s[0],l)),oo(Sl(o[1],s[1],l)),oo(Sl(o[2],s[2],l)),pp(Sl(o[3],s[3],l))],"rgba");return n?{color:u,leftIndex:a,rightIndex:i,value:r}:u}}var Qye=q2;function e0e(e,t,n,r){var a=ri(e);if(e)return a=Xye(a),t!=null&&(a[0]=qye(t)),n!=null&&(a[1]=tc(n)),r!=null&&(a[2]=tc(r)),tu(YS(a),"rgba")}function t0e(e,t){var n=ri(e);if(n&&t!=null)return n[3]=pp(t),tu(n,"rgba")}function tu(e,t){if(!(!e||!e.length)){var n=e[0]+","+e[1]+","+e[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(n+=","+e[3]),t+"("+n+")"}}function vp(e,t){var n=ri(e);return n?(.299*n[0]+.587*n[1]+.114*n[2])*n[3]/255+(1-n[3])*t:0}function n0e(){return tu([Math.round(Math.random()*255),Math.round(Math.random()*255),Math.round(Math.random()*255)],"rgb")}var dD=new Qp(100);function GS(e){if(Vt(e)){var t=dD.get(e);return t||(t=jS(e,-.1),dD.put(e,t)),t}else if(qp(e)){var n=vt({},e);return n.colorStops=Ut(e.colorStops,function(r){return{offset:r.offset,color:jS(r.color,-.1)}}),n}return e}const r0e=Object.freeze(Object.defineProperty({__proto__:null,fastLerp:u8,fastMapToColor:Jye,lerp:q2,lift:jS,liftColor:GS,lum:vp,mapToColor:Qye,modifyAlpha:t0e,modifyHSL:e0e,parse:ri,random:n0e,stringify:tu,toHex:Zye},Symbol.toStringTag,{value:"Module"}));function a0e(e){return e.type==="linear"}function i0e(e){return e.type==="radial"}(function(){return Qt.hasGlobalWindow&&tn(window.btoa)?function(e){return window.btoa(unescape(encodeURIComponent(e)))}:typeof Buffer<"u"?function(e){return Buffer.from(e).toString("base64")}:function(e){return null}})();var qS=Array.prototype.slice;function hs(e,t,n){return(t-e)*n+e}function i1(e,t,n,r){for(var a=t.length,i=0;ir?t:e,i=Math.min(n,r),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)r.length=o;else for(var l=i;l=1},e.prototype.getAdditiveTrack=function(){return this._additiveTrack},e.prototype.addKeyframe=function(t,n,r){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=pD,l=n;if(Ia(n)){var u=u0e(n);s=u,(u===1&&!Kn(n[0])||u===2&&!Kn(n[0][0]))&&(o=!0)}else if(Kn(n)&&!hp(n))s=ig;else if(Vt(n))if(!isNaN(+n))s=ig;else{var c=ri(n);c&&(l=c,s=nh)}else if(qp(n)){var f=vt({},l);f.colorStops=Ut(n.colorStops,function(h){return{offset:h.offset,color:ri(h.color)}}),a0e(n)?s=XS:i0e(n)&&(s=ZS),l=f}i===0?this.valType=s:(s!==this.valType||s===pD)&&(o=!0),this.discrete=this.discrete||o;var d={time:t,value:l,rawValue:n,percent:0};return r&&(d.easing=r,d.easingFunc=tn(r)?r:Ih[r]||o8(r)),a.push(d),d},e.prototype.prepare=function(t,n){var r=this.keyframes;this._needsSort&&r.sort(function(v,g){return v.time-g.time});for(var a=this.valType,i=r.length,o=r[i-1],s=this.discrete,l=og(a),u=vD(a),c=0;c=0&&!(o[c].percent<=n);c--);c=d(c,s-2)}else{for(c=f;cn);c++);c=d(c-1,s-2)}p=o[c+1],h=o[c]}if(h&&p){this._lastFr=c,this._lastFrP=n;var g=p.percent-h.percent,m=g===0?1:d((n-h.percent)/g,1);p.easingFunc&&(m=p.easingFunc(m));var y=r?this._additiveValue:u?Od:t[l];if((og(i)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)t[l]=m<1?h.rawValue:p.rawValue;else if(og(i))i===wm?i1(y,h[a],p[a],m):o0e(y,h[a],p[a],m);else if(vD(i)){var w=h[a],_=p[a],S=i===XS;t[l]={type:S?"linear":"radial",x:hs(w.x,_.x,m),y:hs(w.y,_.y,m),colorStops:Ut(w.colorStops,function(E,M){var k=_.colorStops[M];return{offset:hs(E.offset,k.offset,m),color:_m(i1([],E.color,k.color,m))}}),global:_.global},S?(t[l].x2=hs(w.x2,_.x2,m),t[l].y2=hs(w.y2,_.y2,m)):t[l].r=hs(w.r,_.r,m)}else if(u)i1(y,h[a],p[a],m),r||(t[l]=_m(y));else{var T=hs(h[a],p[a],m);r?this._additiveValue=T:t[l]=T}r&&this._addToTarget(t)}}},e.prototype._addToTarget=function(t){var n=this.valType,r=this.propName,a=this._additiveValue;n===ig?t[r]=t[r]+a:n===nh?(ri(t[r],Od),ag(Od,Od,a,1),t[r]=_m(Od)):n===wm?ag(t[r],t[r],a,1):n===c8&&hD(t[r],t[r],a,1)},e}(),X2=function(){function e(t,n,r,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=n,n&&a){J0("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=r}return e.prototype.getMaxTime=function(){return this._maxTime},e.prototype.getDelay=function(){return this._delay},e.prototype.getLoop=function(){return this._loop},e.prototype.getTarget=function(){return this._target},e.prototype.changeTarget=function(t){this._target=t},e.prototype.when=function(t,n,r){return this.whenWithKeys(t,n,rr(n),r)},e.prototype.whenWithKeys=function(t,n,r,a){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,bm(u),a),this._trackKeys.push(s)}l.addKeyframe(t,bm(n[s]),a)}return this._maxTime=Math.max(this._maxTime,t),this},e.prototype.pause=function(){this._clip.pause(),this._paused=!0},e.prototype.resume=function(){this._clip.resume(),this._paused=!1},e.prototype.isPaused=function(){return!!this._paused},e.prototype.duration=function(t){return this._maxTime=t,this._force=!0,this},e.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var n=t.length,r=0;r0)){this._started=1;for(var n=this,r=[],a=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},e}();function af(){return new Date().getTime()}var f0e=function(e){qn(t,e);function t(n){var r=e.call(this)||this;return r._running=!1,r._time=0,r._pausedTime=0,r._pauseStart=0,r._paused=!1,n=n||{},r.stage=n.stage||{},r}return t.prototype.addClip=function(n){n.animation&&this.removeClip(n),this._head?(this._tail.next=n,n.prev=this._tail,n.next=null,this._tail=n):this._head=this._tail=n,n.animation=this},t.prototype.addAnimator=function(n){n.animation=this;var r=n.getClip();r&&this.addClip(r)},t.prototype.removeClip=function(n){if(n.animation){var r=n.prev,a=n.next;r?r.next=a:this._head=a,a?a.prev=r:this._tail=r,n.next=n.prev=n.animation=null}},t.prototype.removeAnimator=function(n){var r=n.getClip();r&&this.removeClip(r),n.animation=null},t.prototype.update=function(n){for(var r=af()-this._pausedTime,a=r-this._time,i=this._head;i;){var o=i.next,s=i.step(r,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=r,n||(this.trigger("frame",a),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var n=this;this._running=!0;function r(){n._running&&(Sy(r),!n._paused&&n.update())}Sy(r)},t.prototype.start=function(){this._running||(this._time=af(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=af(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=af()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var n=this._head;n;){var r=n.next;n.prev=n.next=n.animation=null,n=r}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(n,r){r=r||{},this.start();var a=new X2(n,r.loop);return this.addAnimator(a),a},t}(Zo),d0e=300,o1=Qt.domSupported,s1=function(){var e=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],n={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},r=Ut(e,function(a){var i=a.replace("mouse","pointer");return n.hasOwnProperty(i)?i:a});return{mouse:e,touch:t,pointer:r}}(),gD={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},mD=!1;function JS(e){var t=e.pointerType;return t==="pen"||t==="touch"}function h0e(e){e.touching=!0,e.touchTimer!=null&&(clearTimeout(e.touchTimer),e.touchTimer=null),e.touchTimer=setTimeout(function(){e.touching=!1,e.touchTimer=null},700)}function l1(e){e&&(e.zrByTouch=!0)}function p0e(e,t){return mi(e.dom,new v0e(e,t),!0)}function f8(e,t){for(var n=t,r=!1;n&&n.nodeType!==9&&!(r=n.domBelongToZr||n!==t&&n===e.painterRoot);)n=n.parentNode;return r}var v0e=function(){function e(t,n){this.stopPropagation=xa,this.stopImmediatePropagation=xa,this.preventDefault=xa,this.type=n.type,this.target=this.currentTarget=t.dom,this.pointerType=n.pointerType,this.clientX=n.clientX,this.clientY=n.clientY}return e}(),Gi={mousedown:function(e){e=mi(this.dom,e),this.__mayPointerCapture=[e.zrX,e.zrY],this.trigger("mousedown",e)},mousemove:function(e){e=mi(this.dom,e);var t=this.__mayPointerCapture;t&&(e.zrX!==t[0]||e.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",e)},mouseup:function(e){e=mi(this.dom,e),this.__togglePointerCapture(!1),this.trigger("mouseup",e)},mouseout:function(e){e=mi(this.dom,e);var t=e.toElement||e.relatedTarget;f8(this,t)||(this.__pointerCapturing&&(e.zrEventControl="no_globalout"),this.trigger("mouseout",e))},wheel:function(e){mD=!0,e=mi(this.dom,e),this.trigger("mousewheel",e)},mousewheel:function(e){mD||(e=mi(this.dom,e),this.trigger("mousewheel",e))},touchstart:function(e){e=mi(this.dom,e),l1(e),this.__lastTouchMoment=new Date,this.handler.processGesture(e,"start"),Gi.mousemove.call(this,e),Gi.mousedown.call(this,e)},touchmove:function(e){e=mi(this.dom,e),l1(e),this.handler.processGesture(e,"change"),Gi.mousemove.call(this,e)},touchend:function(e){e=mi(this.dom,e),l1(e),this.handler.processGesture(e,"end"),Gi.mouseup.call(this,e),+new Date-+this.__lastTouchMoment_0e||e<-5e-5}var _u=[],Bc=[],c1=Ml(),f1=Math.abs,Z2=function(){function e(){}return e.prototype.getLocalTransform=function(t){return e.getLocalTransform(this,t)},e.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},e.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},e.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},e.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},e.prototype.needLocalTransform=function(){return bu(this.rotation)||bu(this.x)||bu(this.y)||bu(this.scaleX-1)||bu(this.scaleY-1)||bu(this.skewX)||bu(this.skewY)},e.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,n=this.needLocalTransform(),r=this.transform;if(!(n||t)){r&&(bD(r),this.invTransform=null);return}r=r||Ml(),n?this.getLocalTransform(r):bD(r),t&&(n?Il(r,t,r):G2(r,t)),this.transform=r,this._resolveGlobalScaleRatio(r)},e.prototype._resolveGlobalScaleRatio=function(t){var n=this.globalScaleRatio;if(n!=null&&n!==1){this.getGlobalScale(_u);var r=_u[0]<0?-1:1,a=_u[1]<0?-1:1,i=((_u[0]-r)*n+r)/_u[0]||0,o=((_u[1]-a)*n+a)/_u[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Ml(),Jp(this.invTransform,t)},e.prototype.getComputedTransform=function(){for(var t=this,n=[];t;)n.push(t),t=t.parent;for(;t=n.pop();)t.updateTransform();return this.transform},e.prototype.setLocalTransform=function(t){if(t){var n=t[0]*t[0]+t[1]*t[1],r=t[2]*t[2]+t[3]*t[3],a=Math.atan2(t[1],t[0]),i=Math.PI/2+a-Math.atan2(t[3],t[2]);r=Math.sqrt(r)*Math.cos(i),n=Math.sqrt(n),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+t[4],this.y=+t[5],this.scaleX=n,this.scaleY=r,this.originX=0,this.originY=0}},e.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,n=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Ml(),Il(Bc,t.invTransform,n),n=Bc);var r=this.originX,a=this.originY;(r||a)&&(c1[4]=r,c1[5]=a,Il(Bc,n,c1),Bc[4]-=r,Bc[5]-=a,n=Bc),this.setLocalTransform(n)}},e.prototype.getGlobalScale=function(t){var n=this.transform;return t=t||[],n?(t[0]=Math.sqrt(n[0]*n[0]+n[1]*n[1]),t[1]=Math.sqrt(n[2]*n[2]+n[3]*n[3]),n[0]<0&&(t[0]=-t[0]),n[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},e.prototype.transformCoordToLocal=function(t,n){var r=[t,n],a=this.invTransform;return a&&ka(r,r,a),r},e.prototype.transformCoordToGlobal=function(t,n){var r=[t,n],a=this.transform;return a&&ka(r,r,a),r},e.prototype.getLineScale=function(){var t=this.transform;return t&&f1(t[0]-1)>1e-10&&f1(t[3]-1)>1e-10?Math.sqrt(f1(t[0]*t[3]-t[2]*t[1])):1},e.prototype.copyTransform=function(t){w0e(this,t)},e.getLocalTransform=function(t,n){n=n||[];var r=t.originX||0,a=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,d=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(r||a||s||l){var p=r+s,v=a+l;n[4]=-p*i-d*v*o,n[5]=-v*o-h*p*i}else n[4]=n[5]=0;return n[0]=i,n[3]=o,n[1]=h*i,n[2]=d*o,u&&eb(n,n,u),n[4]+=r+c,n[5]+=a+f,n},e.initDefaultProps=function(){var t=e.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),e}(),gp=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function w0e(e,t){for(var n=0;n=0?parseFloat(e)/100*t:parseFloat(e):e}function ky(e,t,n){var r=t.position||"inside",a=t.distance!=null?t.distance:5,i=n.height,o=n.width,s=i/2,l=n.x,u=n.y,c="left",f="top";if(r instanceof Array)l+=Ul(r[0],n.width),u+=Ul(r[1],n.height),c=null,f=null;else switch(r){case"left":l-=a,u+=s,c="right",f="middle";break;case"right":l+=a+o,u+=s,f="middle";break;case"top":l+=o/2,u-=a,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+a,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=a,u+=s,f="middle";break;case"insideRight":l+=o-a,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=a,c="center";break;case"insideBottom":l+=o/2,u+=i-a,c="center",f="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,c="right";break;case"insideBottomLeft":l+=a,u+=i-a,f="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,c="right",f="bottom";break}return e=e||{},e.x=l,e.y=u,e.align=c,e.verticalAlign=f,e}var d1="__zr_normal__",h1=gp.concat(["ignore"]),S0e=Go(gp,function(e,t){return e[t]=!0,e},{ignore:!1}),Vc={},C0e=new xn(0,0,0,0),tb=function(){function e(t){this.id=z2(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return e.prototype._init=function(t){this.attr(t)},e.prototype.drift=function(t,n,r){switch(this.draggable){case"horizontal":n=0;break;case"vertical":t=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=t,a[5]+=n,this.decomposeTransform(),this.markRedraw()},e.prototype.beforeUpdate=function(){},e.prototype.afterUpdate=function(){},e.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},e.prototype.updateInnerText=function(t){var n=this._textContent;if(n&&(!n.ignore||t)){this.textConfig||(this.textConfig={});var r=this.textConfig,a=r.local,i=n.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;if(i.copyTransform(n),r.position!=null){var c=C0e;r.layoutRect?c.copy(r.layoutRect):c.copy(this.getBoundingRect()),a||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Vc,r,c):ky(Vc,r,c),i.x=Vc.x,i.y=Vc.y,o=Vc.align,s=Vc.verticalAlign;var f=r.origin;if(f&&r.rotation!=null){var d=void 0,h=void 0;f==="center"?(d=c.width*.5,h=c.height*.5):(d=Ul(f[0],c.width),h=Ul(f[1],c.height)),u=!0,i.originX=-i.x+d+(a?0:c.x),i.originY=-i.y+h+(a?0:c.y)}}r.rotation!=null&&(i.rotation=r.rotation);var p=r.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var v=r.inside==null?typeof r.position=="string"&&r.position.indexOf("inside")>=0:r.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,w=void 0;v&&this.canBeInsideText()?(m=r.insideFill,y=r.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),w=!0)):(m=r.outsideFill,y=r.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),w=!0)),m=m||"#000",(m!==g.fill||y!==g.stroke||w!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=m,g.stroke=y,g.autoStroke=w,g.align=o,g.verticalAlign=s,n.setDefaultTextStyle(g)),n.__dirty|=Ho,l&&n.dirtyStyle(!0)}},e.prototype.canBeInsideText=function(){return!0},e.prototype.getInsideTextFill=function(){return"#fff"},e.prototype.getInsideTextStroke=function(t){return"#000"},e.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?nC:tC},e.prototype.getOutsideStroke=function(t){var n=this.__zr&&this.__zr.getBackgroundColor(),r=typeof n=="string"&&ri(n);r||(r=[255,255,255,1]);for(var a=r[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)r[o]=r[o]*a+(i?0:255)*(1-a);return r[3]=1,tu(r,"rgba")},e.prototype.traverse=function(t,n){},e.prototype.attrKV=function(t,n){t==="textConfig"?this.setTextConfig(n):t==="textContent"?this.setTextContent(n):t==="clipPath"?this.setClipPath(n):t==="extra"?(this.extra=this.extra||{},vt(this.extra,n)):this[t]=n},e.prototype.hide=function(){this.ignore=!0,this.markRedraw()},e.prototype.show=function(){this.ignore=!1,this.markRedraw()},e.prototype.attr=function(t,n){if(typeof t=="string")this.attrKV(t,n);else if(Kt(t))for(var r=t,a=rr(r),i=0;i0},e.prototype.getState=function(t){return this.states[t]},e.prototype.ensureState=function(t){var n=this.states;return n[t]||(n[t]={}),n[t]},e.prototype.clearStates=function(t){this.useState(d1,!1,t)},e.prototype.useState=function(t,n,r,a){var i=t===d1,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(Bn(s,t)>=0&&(n||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){J0("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||a);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,n,!r&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,d=this._textGuide;return f&&f.useState(t,n,r,c),d&&d.useState(t,n,r,c),i?(this.currentStates=[],this._normalState={}):n?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2),u}}},e.prototype.useStates=function(t,n,r){if(!t.length)this.clearStates();else{var a=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l0,p);var v=this._textContent,g=this._textGuide;v&&v.useStates(t,n,d),g&&g.useStates(t,n,d),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!d&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=-2)}},e.prototype.isSilent=function(){for(var t=this.silent,n=this.parent;!t&&n;){if(n.silent){t=!0;break}n=n.parent}return t},e.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var r=this.currentStates.slice();r.splice(n,1),this.useStates(r)}},e.prototype.replaceState=function(t,n,r){var a=this.currentStates.slice(),i=Bn(a,t),o=Bn(a,n)>=0;i>=0?o?a.splice(i,1):a[i]=n:r&&!o&&a.push(n),this.useStates(a)},e.prototype.toggleState=function(t,n){n?this.useState(t,!0):this.removeState(t)},e.prototype._mergeStates=function(t){for(var n={},r,a=0;a=0&&i.splice(o,1)}),this.animators.push(t),r&&r.animation.addAnimator(t),r&&r.wakeUp()},e.prototype.updateDuringAnimation=function(t){this.markRedraw()},e.prototype.stopAnimation=function(t,n){for(var r=this.animators,a=r.length,i=[],o=0;o0&&n.during&&i[0].during(function(p,v){n.during(v)});for(var d=0;d0||a.force&&!o.length){var M=void 0,k=void 0,A=void 0;if(s){k={},d&&(M={});for(var _=0;_=0&&(a.splice(i,0,n),this._doAdd(n))}return this},t.prototype.replace=function(n,r){var a=Bn(this._children,n);return a>=0&&this.replaceAt(r,a),this},t.prototype.replaceAt=function(n,r){var a=this._children,i=a[r];if(n&&n!==this&&n.parent!==this&&n!==i){a[r]=n,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(n)}return this},t.prototype._doAdd=function(n){n.parent&&n.parent.remove(n),n.parent=this;var r=this.__zr;r&&r!==n.__zr&&n.addSelfToZr(r),r&&r.refresh()},t.prototype.remove=function(n){var r=this.__zr,a=this._children,i=Bn(a,n);return i<0?this:(a.splice(i,1),n.parent=null,r&&n.removeSelfFromZr(r),r&&r.refresh(),this)},t.prototype.removeAll=function(){for(var n=this._children,r=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},e.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},e.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},e.prototype.refreshHover=function(){this._needsRefreshHover=!0},e.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},e.prototype.resize=function(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.height),this.handler.resize())},e.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},e.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},e.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},e.prototype.setCursorStyle=function(t){this._disposed||this.handler.setCursorStyle(t)},e.prototype.findHover=function(t,n){if(!this._disposed)return this.handler.findHover(t,n)},e.prototype.on=function(t,n,r){return this._disposed||this.handler.on(t,n,r),this},e.prototype.off=function(t,n){this._disposed||this.handler.off(t,n)},e.prototype.trigger=function(t,n){this._disposed||this.handler.trigger(t,n)},e.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),n=0;n0){if(e<=a)return o;if(e>=i)return s}else{if(e>=a)return o;if(e<=i)return s}else{if(e===a)return o;if(e===i)return s}return(e-a)/l*u+o}function fn(e,t){switch(e){case"center":case"middle":e="50%";break;case"left":case"top":e="0%";break;case"right":case"bottom":e="100%";break}return Vt(e)?F0e(e).match(/%$/)?parseFloat(e)/100*t:parseFloat(e):e==null?NaN:+e}function pr(e,t,n){return t==null&&(t=10),t=Math.min(Math.max(0,t),g8),e=(+e).toFixed(t),n?e:+e}function B0e(e){return e.sort(function(t,n){return t-n}),e}function Ro(e){if(e=+e,isNaN(e))return 0;if(e>1e-14){for(var t=1,n=0;n<15;n++,t*=10)if(Math.round(e*t)/t===e)return n}return m8(e)}function m8(e){var t=e.toString().toLowerCase(),n=t.indexOf("e"),r=n>0?+t.slice(n+1):0,a=n>0?n:t.length,i=t.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-r)}function y8(e,t){var n=Math.log,r=Math.LN10,a=Math.floor(n(e[1]-e[0])/r),i=Math.round(n(Math.abs(t[1]-t[0]))/r),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function V0e(e,t,n){if(!e[t])return 0;var r=b8(e,n);return r[t]||0}function b8(e,t){var n=Go(e,function(h,p){return h+(isNaN(p)?0:p)},0);if(n===0)return[];for(var r=Math.pow(10,t),a=Ut(e,function(h){return(isNaN(h)?0:h)/n*r*100}),i=r*100,o=Ut(a,function(h){return Math.floor(h)}),s=Go(o,function(h,p){return h+p},0),l=Ut(a,function(h,p){return h-o[p]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return Ut(o,function(h){return h/r})}function z0e(e,t){var n=Math.max(Ro(e),Ro(t)),r=e+t;return n>g8?r:pr(r,n)}var H0e=9007199254740991;function eE(e){var t=Math.PI*2;return(e%t+t)%t}function mp(e){return e>-1e-4&&e=10&&t++,t}function tE(e,t){var n=nb(e),r=Math.pow(10,n),a=e/r,i;return t?a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10:a<1?i=1:a<2?i=2:a<3?i=3:a<5?i=5:i=10,e=i*r,n>=-20?+e.toFixed(n<0?-n:0):e}function W0e(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),a=+e[r-1],i=n-r;return i?a+i*(e[r]-a):a}function K0e(e){e.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,n=1,r=0;r=0||i&&Bn(i,l)<0)){var u=r.getShallow(l,t);u!=null&&(o[e[s][0]]=u)}}return o}}var pbe=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],vbe=_p(pbe),gbe=function(){function e(){}return e.prototype.getAreaStyle=function(t,n){return vbe(this,t,n)},e}(),oC=new Qp(50);function mbe(e){if(typeof e=="string"){var t=oC.get(e);return t&&t.image}else return e}function A8(e,t,n,r,a){if(e)if(typeof e=="string"){if(t&&t.__zrImageSrc===e||!n)return t;var i=oC.get(e),o={hostEl:n,cb:r,cbPayload:a};return i?(t=i.image,!ab(t)&&i.pending.push(o)):(t=Is.loadImage(e,ED,ED),t.__zrImageSrc=e,oC.put(e,t.__cachedImgObj={image:t,pending:[o]})),t}else return e;else return t}function ED(){var e=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=o;l++)s-=o;var u=ai(n,t);return u>s&&(n="",u=0),s=e-u,a.ellipsis=n,a.ellipsisWidth=u,a.contentWidth=s,a.containerWidth=e,a}function O8(e,t,n){var r=n.containerWidth,a=n.font,i=n.contentWidth;if(!r){e.textLine="",e.isTruncated=!1;return}var o=ai(t,a);if(o<=r){e.textLine=t,e.isTruncated=!1;return}for(var s=0;;s++){if(o<=i||s>=n.maxIterations){t+=n.ellipsis;break}var l=s===0?bbe(t,i,n.ascCharWidth,n.cnCharWidth):o>0?Math.floor(t.length*i/o):0;t=t.substr(0,l),o=ai(t,a)}t===""&&(t=n.placeholder),e.textLine=t,e.isTruncated=!0}function bbe(e,t,n,r){for(var a=0,i=0,o=e.length;ip&&u){var v=Math.floor(p/s);c=c||d.length>v,d=d.slice(0,v)}if(e&&i&&f!=null)for(var g=P8(f,a,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),m={},y=0;ys&&y1(n,e.substring(s,u),t,o),y1(n,l[2],t,o,l[1]),s=m1.lastIndex}sa){var Y=n.lines.length;T>0?(w.tokens=w.tokens.slice(0,T),m(w,S,_),n.lines=n.lines.slice(0,y+1)):n.lines=n.lines.slice(0,y),n.isTruncated=n.isTruncated||n.lines.length0&&p+r.accumWidth>r.width&&(c=t.split(`
+`),u=!0),r.accumWidth=p}else{var v=L8(t,l,r.width,r.breakAll,r.accumWidth);r.accumWidth=v.accumWidth+h,f=v.linesWidths,c=v.lines}}else c=t.split(`
+`);for(var g=0;g=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var Ebe=Go(",&?/;] ".split(""),function(e,t){return e[t]=!0,e},{});function xbe(e){return Tbe(e)?!!Ebe[e]:!0}function L8(e,t,n,r,a){for(var i=[],o=[],s="",l="",u=0,c=0,f=0;fn:a+c+h>n){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=d,u+=h,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=d,c=h)):p?(i.push(l),o.push(u),l=d,u=h):(i.push(d),o.push(h));continue}c+=h,p?(l+=d,u+=h):(l&&(s+=l,l="",u=0),s+=d)}return!i.length&&!s&&(s=e,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=a),{accumWidth:c,lines:i,linesWidths:o}}var sC="__zr_style_"+Math.round(Math.random()*10),nc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},ib={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};nc[sC]=!0;var kD=["z","z2","invisible"],kbe=["invisible"],nv=function(e){qn(t,e);function t(n){return e.call(this,n)||this}return t.prototype._init=function(n){for(var r=rr(n),a=0;a1e-4){s[0]=e-n,s[1]=t-r,l[0]=e+n,l[1]=t+r;return}if(sg[0]=S1(a)*n+e,sg[1]=w1(a)*r+t,lg[0]=S1(i)*n+e,lg[1]=w1(i)*r+t,u(s,sg,lg),c(l,sg,lg),a=a%Su,a<0&&(a=a+Su),i=i%Su,i<0&&(i=i+Su),a>i&&!o?i+=Su:aa&&(ug[0]=S1(h)*n+e,ug[1]=w1(h)*r+t,u(s,ug,s),c(l,ug,l))}var Nn={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Cu=[],Tu=[],Eo=[],Js=[],xo=[],ko=[],C1=Math.min,T1=Math.max,Eu=Math.cos,xu=Math.sin,us=Math.abs,lC=Math.PI,ul=lC*2,E1=typeof Float32Array<"u",Ld=[];function x1(e){var t=Math.round(e/lC*1e8)/1e8;return t%2*lC}function iE(e,t){var n=x1(e[0]);n<0&&(n+=ul);var r=n-e[0],a=e[1];a+=r,!t&&a-n>=ul?a=n+ul:t&&n-a>=ul?a=n-ul:!t&&n>a?a=n+(ul-x1(n-a)):t&&n0&&(this._ux=us(r/xy/t)||0,this._uy=us(r/xy/n)||0)},e.prototype.setDPR=function(t){this.dpr=t},e.prototype.setContext=function(t){this._ctx=t},e.prototype.getContext=function(){return this._ctx},e.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},e.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},e.prototype.moveTo=function(t,n){return this._drawPendingPt(),this.addData(Nn.M,t,n),this._ctx&&this._ctx.moveTo(t,n),this._x0=t,this._y0=n,this._xi=t,this._yi=n,this},e.prototype.lineTo=function(t,n){var r=us(t-this._xi),a=us(n-this._yi),i=r>this._ux||a>this._uy;if(this.addData(Nn.L,t,n),this._ctx&&i&&this._ctx.lineTo(t,n),i)this._xi=t,this._yi=n,this._pendingPtDist=0;else{var o=r*r+a*a;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=n,this._pendingPtDist=o)}return this},e.prototype.bezierCurveTo=function(t,n,r,a,i,o){return this._drawPendingPt(),this.addData(Nn.C,t,n,r,a,i,o),this._ctx&&this._ctx.bezierCurveTo(t,n,r,a,i,o),this._xi=i,this._yi=o,this},e.prototype.quadraticCurveTo=function(t,n,r,a){return this._drawPendingPt(),this.addData(Nn.Q,t,n,r,a),this._ctx&&this._ctx.quadraticCurveTo(t,n,r,a),this._xi=r,this._yi=a,this},e.prototype.arc=function(t,n,r,a,i,o){this._drawPendingPt(),Ld[0]=a,Ld[1]=i,iE(Ld,o),a=Ld[0],i=Ld[1];var s=i-a;return this.addData(Nn.A,t,n,r,r,a,s,0,o?0:1),this._ctx&&this._ctx.arc(t,n,r,a,i,o),this._xi=Eu(i)*r+t,this._yi=xu(i)*r+n,this},e.prototype.arcTo=function(t,n,r,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,n,r,a,i),this},e.prototype.rect=function(t,n,r,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,n,r,a),this.addData(Nn.R,t,n,r,a),this},e.prototype.closePath=function(){this._drawPendingPt(),this.addData(Nn.Z);var t=this._ctx,n=this._x0,r=this._y0;return t&&t.closePath(),this._xi=n,this._yi=r,this},e.prototype.fill=function(t){t&&t.fill(),this.toStatic()},e.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},e.prototype.len=function(){return this._len},e.prototype.setData=function(t){var n=t.length;!(this.data&&this.data.length===n)&&E1&&(this.data=new Float32Array(n));for(var r=0;rc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},e.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],n=0;n11&&(this.data=new Float32Array(t)))}},e.prototype.getBoundingRect=function(){Eo[0]=Eo[1]=xo[0]=xo[1]=Number.MAX_VALUE,Js[0]=Js[1]=ko[0]=ko[1]=-Number.MAX_VALUE;var t=this.data,n=0,r=0,a=0,i=0,o;for(o=0;or||us(w)>a||d===n-1)&&(v=Math.sqrt(y*y+w*w),i=g,o=m);break}case Nn.C:{var _=t[d++],S=t[d++],g=t[d++],m=t[d++],T=t[d++],E=t[d++];v=Hye(i,o,_,S,g,m,T,E,10),i=T,o=E;break}case Nn.Q:{var _=t[d++],S=t[d++],g=t[d++],m=t[d++];v=Kye(i,o,_,S,g,m,10),i=g,o=m;break}case Nn.A:var M=t[d++],k=t[d++],A=t[d++],D=t[d++],B=t[d++],Y=t[d++],W=Y+B;d+=1,p&&(s=Eu(B)*A+M,l=xu(B)*D+k),v=T1(A,D)*C1(ul,Math.abs(Y)),i=Eu(W)*A+M,o=xu(W)*D+k;break;case Nn.R:{s=i=t[d++],l=o=t[d++];var V=t[d++],O=t[d++];v=V*2+O*2;break}case Nn.Z:{var y=s-i,w=l-o;v=Math.sqrt(y*y+w*w),i=s,o=l;break}}v>=0&&(u[f++]=v,c+=v)}return this._pathLen=c,c},e.prototype.rebuildPath=function(t,n){var r=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,c,f,d,h=n<1,p,v,g=0,m=0,y,w=0,_,S;if(!(h&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,v=this._pathLen,y=n*v,!y)))e:for(var T=0;T0&&(t.lineTo(_,S),w=0),E){case Nn.M:s=u=r[T++],l=c=r[T++],t.moveTo(u,c);break;case Nn.L:{f=r[T++],d=r[T++];var k=us(f-u),A=us(d-c);if(k>a||A>i){if(h){var D=p[m++];if(g+D>y){var B=(y-g)/D;t.lineTo(u*(1-B)+f*B,c*(1-B)+d*B);break e}g+=D}t.lineTo(f,d),u=f,c=d,w=0}else{var Y=k*k+A*A;Y>w&&(_=f,S=d,w=Y)}break}case Nn.C:{var W=r[T++],V=r[T++],O=r[T++],F=r[T++],R=r[T++],L=r[T++];if(h){var D=p[m++];if(g+D>y){var B=(y-g)/D;Ty(u,W,O,R,B,Cu),Ty(c,V,F,L,B,Tu),t.bezierCurveTo(Cu[1],Tu[1],Cu[2],Tu[2],Cu[3],Tu[3]);break e}g+=D}t.bezierCurveTo(W,V,O,F,R,L),u=R,c=L;break}case Nn.Q:{var W=r[T++],V=r[T++],O=r[T++],F=r[T++];if(h){var D=p[m++];if(g+D>y){var B=(y-g)/D;Ey(u,W,O,B,Cu),Ey(c,V,F,B,Tu),t.quadraticCurveTo(Cu[1],Tu[1],Cu[2],Tu[2]);break e}g+=D}t.quadraticCurveTo(W,V,O,F),u=O,c=F;break}case Nn.A:var U=r[T++],X=r[T++],ee=r[T++],se=r[T++],me=r[T++],xe=r[T++],le=r[T++],fe=!r[T++],ke=ee>se?ee:se,he=us(ee-se)>.001,ze=me+xe,Ye=!1;if(h){var D=p[m++];g+D>y&&(ze=me+xe*(y-g)/D,Ye=!0),g+=D}if(he&&t.ellipse?t.ellipse(U,X,ee,se,le,me,ze,fe):t.arc(U,X,ke,me,ze,fe),Ye)break e;M&&(s=Eu(me)*ee+U,l=xu(me)*se+X),u=Eu(ze)*ee+U,c=xu(ze)*se+X;break;case Nn.R:s=u=r[T],l=c=r[T+1],f=r[T++],d=r[T++];var Z=r[T++],oe=r[T++];if(h){var D=p[m++];if(g+D>y){var de=y-g;t.moveTo(f,d),t.lineTo(f+C1(de,Z),d),de-=Z,de>0&&t.lineTo(f+Z,d+C1(de,oe)),de-=oe,de>0&&t.lineTo(f+T1(Z-de,0),d+oe),de-=Z,de>0&&t.lineTo(f,d+T1(oe-de,0));break e}g+=D}t.rect(f,d,Z,oe);break;case Nn.Z:if(h){var D=p[m++];if(g+D>y){var B=(y-g)/D;t.lineTo(u*(1-B)+s*B,c*(1-B)+l*B);break e}g+=D}t.closePath(),u=s,c=l}}},e.prototype.clone=function(){var t=new e,n=this.data;return t.data=n.slice?n.slice():Array.prototype.slice.call(n),t._len=this._len,t},e.CMD=Nn,e.initDefaultProps=function(){var t=e.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),e}();function zc(e,t,n,r,a,i,o){if(a===0)return!1;var s=a,l=0,u=e;if(o>t+s&&o>r+s||oe+s&&i>n+s||it+f&&c>r+f&&c>i+f&&c>s+f||ce+f&&u>n+f&&u>a+f&&u>o+f||ut+u&&l>r+u&&l>i+u||le+u&&s>n+u&&s>a+u||sn||c+ua&&(a+=Rd);var d=Math.atan2(l,s);return d<0&&(d+=Rd),d>=r&&d<=a||d+Rd>=r&&d+Rd<=a}function ps(e,t,n,r,a,i){if(i>t&&i>r||ia?s:0}var Qs=dc.CMD,ku=Math.PI*2,Rbe=1e-4;function $be(e,t){return Math.abs(e-t)t&&u>r&&u>i&&u>s||u1&&Nbe(),h=jr(t,r,i,s,_i[0]),d>1&&(p=jr(t,r,i,s,_i[1]))),d===2?g<_i[0]?f+=ht&&s>r&&s>i||s=0&&u<=1){for(var c=0,f=Fa(t,r,i,u),d=0;dn||s<-n)return 0;var l=Math.sqrt(n*n-s*s);ya[0]=-l,ya[1]=l;var u=Math.abs(r-a);if(u<1e-4)return 0;if(u>=ku-1e-4){r=0,a=ku;var c=i?1:-1;return o>=ya[0]+e&&o<=ya[1]+e?c:0}if(r>a){var f=r;r=a,a=f}r<0&&(r+=ku,a+=ku);for(var d=0,h=0;h<2;h++){var p=ya[h];if(p+e>o){var v=Math.atan2(s,p),c=i?1:-1;v<0&&(v=ku+v),(v>=r&&v<=a||v+ku>=r&&v+ku<=a)&&(v>Math.PI/2&&v1&&(n||(s+=ps(l,u,c,f,r,a))),g&&(l=i[p],u=i[p+1],c=l,f=u),v){case Qs.M:c=i[p++],f=i[p++],l=c,u=f;break;case Qs.L:if(n){if(zc(l,u,i[p],i[p+1],t,r,a))return!0}else s+=ps(l,u,i[p],i[p+1],r,a)||0;l=i[p++],u=i[p++];break;case Qs.C:if(n){if(Pbe(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],t,r,a))return!0}else s+=Fbe(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],r,a)||0;l=i[p++],u=i[p++];break;case Qs.Q:if(n){if(Obe(l,u,i[p++],i[p++],i[p],i[p+1],t,r,a))return!0}else s+=Bbe(l,u,i[p++],i[p++],i[p],i[p+1],r,a)||0;l=i[p++],u=i[p++];break;case Qs.A:var m=i[p++],y=i[p++],w=i[p++],_=i[p++],S=i[p++],T=i[p++];p+=1;var E=!!(1-i[p++]);d=Math.cos(S)*w+m,h=Math.sin(S)*_+y,g?(c=d,f=h):s+=ps(l,u,d,h,r,a);var M=(r-m)*_/w+m;if(n){if(Lbe(m,y,_,S,S+T,E,t,M,a))return!0}else s+=Vbe(m,y,_,S,S+T,E,M,a);l=Math.cos(S+T)*w+m,u=Math.sin(S+T)*_+y;break;case Qs.R:c=l=i[p++],f=u=i[p++];var k=i[p++],A=i[p++];if(d=c+k,h=f+A,n){if(zc(c,f,d,f,t,r,a)||zc(d,f,d,h,t,r,a)||zc(d,h,c,h,t,r,a)||zc(c,h,c,f,t,r,a))return!0}else s+=ps(d,f,d,h,r,a),s+=ps(c,h,c,f,r,a);break;case Qs.Z:if(n){if(zc(l,u,c,f,t,r,a))return!0}else s+=ps(l,u,c,f,r,a);l=c,u=f;break}}return!n&&!$be(u,f)&&(s+=ps(l,u,c,f,r,a)||0),s!==0}function zbe(e,t,n){return R8(e,0,!1,t,n)}function Hbe(e,t,n,r){return R8(e,t,!0,n,r)}var $8=Dn({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},nc),Ube={style:Dn({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},ib.style)},k1=gp.concat(["invisible","culling","z","z2","zlevel","parent"]),zn=function(e){qn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.update=function(){var n=this;e.prototype.update.call(this);var r=this.style;if(r.decal){var a=this._decalEl=this._decalEl||new t;a.buildPath===t.prototype.buildPath&&(a.buildPath=function(l){n.buildPath(l,n.shape)}),a.silent=!0;var i=a.style;for(var o in r)i[o]!==r[o]&&(i[o]=r[o]);i.fill=r.fill?r.decal:null,i.decal=null,i.shadowColor=null,r.strokeFirst&&(i.stroke=null);for(var s=0;s.5?tC:r>.2?b0e:nC}else if(n)return nC}return tC},t.prototype.getInsideTextStroke=function(n){var r=this.style.fill;if(Vt(r)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=vp(n,0)0))},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.getBoundingRect=function(){var n=this._rect,r=this.style,a=!n;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&th)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),n=o.getBoundingRect()}if(this._rect=n,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=n.clone());if(this.__dirty||a){s.copy(n);var l=r.strokeNoScale?this.getLineScale():1,u=r.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return n},t.prototype.contain=function(n,r){var a=this.transformCoordToLocal(n,r),i=this.getBoundingRect(),o=this.style;if(n=a[0],r=a[1],i.contain(n,r)){var s=this.path;if(this.hasStroke()){var l=o.lineWidth,u=o.strokeNoScale?this.getLineScale():1;if(u>1e-10&&(this.hasFill()||(l=Math.max(l,this.strokeContainThreshold)),Hbe(s,l/u,n,r)))return!0}if(this.hasFill())return zbe(s,n,r)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=th,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(n){return this.animate("shape",n)},t.prototype.updateDuringAnimation=function(n){n==="style"?this.dirtyStyle():n==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(n,r){n==="shape"?this.setShape(r):e.prototype.attrKV.call(this,n,r)},t.prototype.setShape=function(n,r){var a=this.shape;return a||(a=this.shape={}),typeof n=="string"?a[n]=r:vt(a,n),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&th)},t.prototype.createStyle=function(n){return Xp($8,n)},t.prototype._innerSaveToNormal=function(n){e.prototype._innerSaveToNormal.call(this,n);var r=this._normalState;n.shape&&!r.shape&&(r.shape=vt({},this.shape))},t.prototype._applyStateObj=function(n,r,a,i,o,s){e.prototype._applyStateObj.call(this,n,r,a,i,o,s);var l=!(r&&i),u;if(r&&r.shape?o?i?u=r.shape:(u=vt({},a.shape),vt(u,r.shape)):(u=vt({},i?this.shape:a.shape),vt(u,r.shape)):l&&(u=a.shape),u)if(o){this.shape=vt({},this.shape);for(var c={},f=rr(u),d=0;d0},t.prototype.hasFill=function(){var n=this.style,r=n.fill;return r!=null&&r!=="none"},t.prototype.createStyle=function(n){return Xp(Wbe,n)},t.prototype.setBoundingRect=function(n){this._rect=n},t.prototype.getBoundingRect=function(){var n=this.style;if(!this._rect){var r=n.text;r!=null?r+="":r="";var a=J2(r,n.font,n.textAlign,n.textBaseline);if(a.x+=n.x||0,a.y+=n.y||0,this.hasStroke()){var i=n.lineWidth;a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i}this._rect=a}return this._rect},t.initDefaultProps=function(){var n=t.prototype;n.dirtyRectTolerance=10}(),t}(nv);My.prototype.type="tspan";var Kbe=Dn({x:0,y:0},nc),Ybe={style:Dn({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},ib.style)};function jbe(e){return!!(e&&typeof e!="string"&&e.width&&e.height)}var Jo=function(e){qn(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.createStyle=function(n){return Xp(Kbe,n)},t.prototype._getSize=function(n){var r=this.style,a=r[n];if(a!=null)return a;var i=jbe(r.image)?r.image:this.__image;if(!i)return 0;var o=n==="width"?"height":"width",s=r[o];return s==null?i[n]:i[n]/i[o]*s},t.prototype.getWidth=function(){return this._getSize("width")},t.prototype.getHeight=function(){return this._getSize("height")},t.prototype.getAnimationStyleProps=function(){return Ybe},t.prototype.getBoundingRect=function(){var n=this.style;return this._rect||(this._rect=new xn(n.x||0,n.y||0,this.getWidth(),this.getHeight())),this._rect},t}(nv);Jo.prototype.type="image";function Gbe(e,t){var n=t.x,r=t.y,a=t.width,i=t.height,o=t.r,s,l,u,c;a<0&&(n=n+a,a=-a),i<0&&(r=r+i,i=-i),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var f;s+l>a&&(f=s+l,s*=a/f,l*=a/f),u+c>a&&(f=u+c,u*=a/f,c*=a/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=i/f),e.moveTo(n+s,r),e.lineTo(n+a-l,r),l!==0&&e.arc(n+a-l,r+l,l,-Math.PI/2,0),e.lineTo(n+a,r+i-u),u!==0&&e.arc(n+a-u,r+i-u,u,0,Math.PI/2),e.lineTo(n+c,r+i),c!==0&&e.arc(n+c,r+i-c,c,Math.PI/2,Math.PI),e.lineTo(n,r+s),s!==0&&e.arc(n+s,r+s,s,Math.PI,Math.PI*1.5)}var of=Math.round;function N8(e,t,n){if(t){var r=t.x1,a=t.x2,i=t.y1,o=t.y2;e.x1=r,e.x2=a,e.y1=i,e.y2=o;var s=n&&n.lineWidth;return s&&(of(r*2)===of(a*2)&&(e.x1=e.x2=Wu(r,s,!0)),of(i*2)===of(o*2)&&(e.y1=e.y2=Wu(i,s,!0))),e}}function F8(e,t,n){if(t){var r=t.x,a=t.y,i=t.width,o=t.height;e.x=r,e.y=a,e.width=i,e.height=o;var s=n&&n.lineWidth;return s&&(e.x=Wu(r,s,!0),e.y=Wu(a,s,!0),e.width=Math.max(Wu(r+i,s,!1)-e.x,i===0?0:1),e.height=Math.max(Wu(a+o,s,!1)-e.y,o===0?0:1)),e}}function Wu(e,t,n){if(!t)return e;var r=of(e*2);return(r+of(t))%2===0?r/2:(r+(n?1:-1))/2}var qbe=function(){function e(){this.x=0,this.y=0,this.width=0,this.height=0}return e}(),Xbe={},kr=function(e){qn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new qbe},t.prototype.buildPath=function(n,r){var a,i,o,s;if(this.subPixelOptimize){var l=F8(Xbe,r,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=r.r,r=l}else a=r.x,i=r.y,o=r.width,s=r.height;r.r?Gbe(n,r):n.rect(a,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(zn);kr.prototype.type="rect";var PD={fill:"#000"},OD=2,Zbe={style:Dn({fill:!0,stroke:!0,fillOpacity:!0,strokeOpacity:!0,lineWidth:!0,fontSize:!0,lineHeight:!0,width:!0,height:!0,textShadowColor:!0,textShadowBlur:!0,textShadowOffsetX:!0,textShadowOffsetY:!0,backgroundColor:!0,padding:!0,borderColor:!0,borderWidth:!0,borderRadius:!0},ib.style)},wr=function(e){qn(t,e);function t(n){var r=e.call(this)||this;return r.type="text",r._children=[],r._defaultStyle=PD,r.attr(n),r}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){e.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var n=0;n0,B=n.width!=null&&(n.overflow==="truncate"||n.overflow==="break"||n.overflow==="breakAll"),Y=o.calculatedLineHeight,W=0;W=0&&(W=T[Y],W.align==="right");)this._placeToken(W,n,M,m,B,"right",w),k-=W.width,B-=W.width,Y--;for(D+=(i-(D-g)-(y-B)-k)/2;A<=Y;)W=T[A],this._placeToken(W,n,M,m,D+W.width/2,"center",w),D+=W.width,A++;m+=M}},t.prototype._placeToken=function(n,r,a,i,o,s,l){var u=r.rich[n.styleName]||{};u.text=n.text;var c=n.verticalAlign,f=i+a/2;c==="top"?f=i+n.height/2:c==="bottom"&&(f=i+a-n.height/2);var d=!n.isLineHolder&&M1(u);d&&this._renderBackground(u,r,s==="right"?o-n.width:s==="center"?o-n.width/2:o,f-n.height/2,n.width,n.height);var h=!!u.backgroundColor,p=n.textPadding;p&&(o=BD(o,s,p),f-=n.height/2-p[0]-n.innerHeight/2);var v=this._getOrCreateChild(My),g=v.createStyle();v.useStyle(g);var m=this._defaultStyle,y=!1,w=0,_=FD("fill"in u?u.fill:"fill"in r?r.fill:(y=!0,m.fill)),S=ND("stroke"in u?u.stroke:"stroke"in r?r.stroke:!h&&!l&&(!m.autoStroke||y)?(w=OD,m.stroke):null),T=u.textShadowBlur>0||r.textShadowBlur>0;g.text=n.text,g.x=o,g.y=f,T&&(g.shadowBlur=u.textShadowBlur||r.textShadowBlur||0,g.shadowColor=u.textShadowColor||r.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||r.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||r.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=n.font||cc,g.opacity=df(u.opacity,r.opacity,1),RD(g,u),S&&(g.lineWidth=df(u.lineWidth,r.lineWidth,w),g.lineDash=dn(u.lineDash,r.lineDash),g.lineDashOffset=r.lineDashOffset||0,g.stroke=S),_&&(g.fill=_);var E=n.contentWidth,M=n.contentHeight;v.setBoundingRect(new xn(rh(g.x,E,g.textAlign),rf(g.y,M,g.textBaseline),E,M))},t.prototype._renderBackground=function(n,r,a,i,o,s){var l=n.backgroundColor,u=n.borderWidth,c=n.borderColor,f=l&&l.image,d=l&&!f,h=n.borderRadius,p=this,v,g;if(d||n.lineHeight||u&&c){v=this._getOrCreateChild(kr),v.useStyle(v.createStyle()),v.style.fill=null;var m=v.shape;m.x=a,m.y=i,m.width=o,m.height=s,m.r=h,v.dirtyShape()}if(d){var y=v.style;y.fill=l||null,y.fillOpacity=dn(n.fillOpacity,1)}else if(f){g=this._getOrCreateChild(Jo),g.onload=function(){p.dirtyStyle()};var w=g.style;w.image=l.image,w.x=a,w.y=i,w.width=o,w.height=s}if(u&&c){var y=v.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=dn(n.strokeOpacity,1),y.lineDash=n.borderDash,y.lineDashOffset=n.borderDashOffset||0,v.strokeContainThreshold=0,v.hasFill()&&v.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var _=(v||g).style;_.shadowBlur=n.shadowBlur||0,_.shadowColor=n.shadowColor||"transparent",_.shadowOffsetX=n.shadowOffsetX||0,_.shadowOffsetY=n.shadowOffsetY||0,_.opacity=df(n.opacity,r.opacity,1)},t.makeFont=function(n){var r="";return t_e(n)&&(r=[n.fontStyle,n.fontWeight,e_e(n.fontSize),n.fontFamily||"sans-serif"].join(" ")),r&&to(r)||n.textFont||n.font},t}(nv),Jbe={left:!0,right:1,center:1},Qbe={top:1,bottom:1,middle:1},LD=["fontStyle","fontWeight","fontSize","fontFamily"];function e_e(e){return typeof e=="string"&&(e.indexOf("px")!==-1||e.indexOf("rem")!==-1||e.indexOf("em")!==-1)?e:isNaN(+e)?F2+"px":e+"px"}function RD(e,t){for(var n=0;n=0,i=!1;if(e instanceof zn){var o=B8(e),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(Hc(s)||Hc(l)){r=r||{};var u=r.style||{};u.fill==="inherit"?(i=!0,r=vt({},r),u=vt({},u),u.fill=s):!Hc(u.fill)&&Hc(s)?(i=!0,r=vt({},r),u=vt({},u),u.fill=GS(s)):!Hc(u.stroke)&&Hc(l)&&(i||(r=vt({},r),u=vt({},u)),u.stroke=GS(l)),r.style=u}}if(r&&r.z2==null){i||(r=vt({},r));var c=e.z2EmphasisLift;r.z2=e.z2+(c??r_e)}return r}function u_e(e,t,n){if(n&&n.z2==null){n=vt({},n);var r=e.z2SelectLift;n.z2=e.z2+(r??a_e)}return n}function c_e(e,t,n){var r=Bn(e.currentStates,t)>=0,a=e.style.opacity,i=r?null:s_e(e,["opacity"],t,{opacity:1});n=n||{};var o=n.style||{};return o.opacity==null&&(n=vt({},n),o=vt({opacity:r?a:i.opacity*.1},o),n.style=o),n}function I1(e,t){var n=this.states[e];if(this.style){if(e==="emphasis")return l_e(this,e,t,n);if(e==="blur")return c_e(this,e,n);if(e==="select")return u_e(this,e,n)}return n}function f_e(e){e.stateProxy=I1;var t=e.getTextContent(),n=e.getTextGuideLine();t&&(t.stateProxy=I1),n&&(n.stateProxy=I1)}function KD(e,t){!Y8(e,t)&&!e.__highByOuter&&Vs(e,V8)}function YD(e,t){!Y8(e,t)&&!e.__highByOuter&&Vs(e,z8)}function Ay(e,t){e.__highByOuter|=1<<(t||0),Vs(e,V8)}function Dy(e,t){!(e.__highByOuter&=~(1<<(t||0)))&&Vs(e,z8)}function d_e(e){Vs(e,lE)}function U8(e){Vs(e,H8)}function W8(e){Vs(e,i_e)}function K8(e){Vs(e,o_e)}function Y8(e,t){return e.__highDownSilentOnTouch&&t.zrByTouch}function j8(e){var t=e.getModel(),n=[],r=[];t.eachComponent(function(a,i){var o=oE(i),s=a==="series",l=s?e.getViewOfSeriesModel(i):e.getViewOfComponentModel(i);!s&&r.push(l),o.isBlured&&(l.group.traverse(function(u){H8(u)}),s&&n.push(i)),o.isBlured=!1}),be(r,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(n,!1,t)})}function cC(e,t,n,r){var a=r.getModel();n=n||"coordinateSystem";function i(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:n.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Py(e,t,n){G8(e,!0),Vs(e,f_e),b_e(e,t,n)}function y_e(e){G8(e,!1)}function hc(e,t,n,r){r?y_e(e):Py(e,t,n)}function b_e(e,t,n){var r=An(e);t!=null?(r.focus=t,r.blurScope=n):r.focus&&(r.focus=null)}var GD=["emphasis","blur","select"],__e={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function zf(e,t,n,r){n=n||"itemStyle";for(var a=0;a1&&(o*=A1(p),s*=A1(p));var v=(a===i?-1:1)*A1((o*o*(s*s)-o*o*(h*h)-s*s*(d*d))/(o*o*(h*h)+s*s*(d*d)))||0,g=v*o*h/s,m=v*-s*d/o,y=(e+n)/2+dg(f)*g-fg(f)*m,w=(t+r)/2+fg(f)*g+dg(f)*m,_=JD([1,0],[(d-g)/o,(h-m)/s]),S=[(d-g)/o,(h-m)/s],T=[(-1*d-g)/o,(-1*h-m)/s],E=JD(S,T);if(pC(S,T)<=-1&&(E=$d),pC(S,T)>=1&&(E=0),E<0){var M=Math.round(E/$d*1e6)/1e6;E=$d*2+M%2*$d}c.addData(u,y,w,o,s,_,E,f,i)}var x_e=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,k_e=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function M_e(e){var t=new dc;if(!e)return t;var n=0,r=0,a=n,i=r,o,s=dc.CMD,l=e.match(x_e);if(!l)return t;for(var u=0;uW*W+V*V&&(M=A,k=D),{cx:M,cy:k,x0:-c,y0:-f,x1:M*(a/S-1),y1:k*(a/S-1)}}function $_e(e){var t;if(Pt(e)){var n=e.length;if(!n)return e;n===1?t=[e[0],e[0],0,0]:n===2?t=[e[0],e[0],e[1],e[1]]:n===3?t=e.concat(e[2]):t=e}else t=[e,e,e,e];return t}function N_e(e,t){var n,r=ah(t.r,0),a=ah(t.r0||0,0),i=r>0,o=a>0;if(!(!i&&!o)){if(i||(r=a,a=0),a>r){var s=r;r=a,a=s}var l=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,d=!!t.clockwise,h=eP(u-l),p=h>D1&&h%D1;if(p>ji&&(h=p),!(r>ji))e.moveTo(c,f);else if(h>D1-ji)e.moveTo(c+r*Wc(l),f+r*Mu(l)),e.arc(c,f,r,l,u,!d),a>ji&&(e.moveTo(c+a*Wc(u),f+a*Mu(u)),e.arc(c,f,a,u,l,d));else{var v=void 0,g=void 0,m=void 0,y=void 0,w=void 0,_=void 0,S=void 0,T=void 0,E=void 0,M=void 0,k=void 0,A=void 0,D=void 0,B=void 0,Y=void 0,W=void 0,V=r*Wc(l),O=r*Mu(l),F=a*Wc(u),R=a*Mu(u),L=h>ji;if(L){var U=t.cornerRadius;U&&(n=$_e(U),v=n[0],g=n[1],m=n[2],y=n[3]);var X=eP(r-a)/2;if(w=Mo(X,m),_=Mo(X,y),S=Mo(X,v),T=Mo(X,g),k=E=ah(w,_),A=M=ah(S,T),(E>ji||M>ji)&&(D=r*Wc(u),B=r*Mu(u),Y=a*Wc(l),W=a*Mu(l),hji){var he=Mo(m,k),ze=Mo(y,k),Ye=hg(Y,W,V,O,r,he,d),Z=hg(D,B,F,R,r,ze,d);e.moveTo(c+Ye.cx+Ye.x0,f+Ye.cy+Ye.y0),k0&&e.arc(c+Ye.cx,f+Ye.cy,he,ea(Ye.y0,Ye.x0),ea(Ye.y1,Ye.x1),!d),e.arc(c,f,r,ea(Ye.cy+Ye.y1,Ye.cx+Ye.x1),ea(Z.cy+Z.y1,Z.cx+Z.x1),!d),ze>0&&e.arc(c+Z.cx,f+Z.cy,ze,ea(Z.y1,Z.x1),ea(Z.y0,Z.x0),!d))}else e.moveTo(c+V,f+O),e.arc(c,f,r,l,u,!d);if(!(a>ji)||!L)e.lineTo(c+F,f+R);else if(A>ji){var he=Mo(v,A),ze=Mo(g,A),Ye=hg(F,R,D,B,a,-ze,d),Z=hg(V,O,Y,W,a,-he,d);e.lineTo(c+Ye.cx+Ye.x0,f+Ye.cy+Ye.y0),A0&&e.arc(c+Ye.cx,f+Ye.cy,ze,ea(Ye.y0,Ye.x0),ea(Ye.y1,Ye.x1),!d),e.arc(c,f,a,ea(Ye.cy+Ye.y1,Ye.cx+Ye.x1),ea(Z.cy+Z.y1,Z.cx+Z.x1),d),he>0&&e.arc(c+Z.cx,f+Z.cy,he,ea(Z.y1,Z.x1),ea(Z.y0,Z.x0),!d))}else e.lineTo(c+F,f+R),e.arc(c,f,a,u,l,d)}e.closePath()}}}var F_e=function(){function e(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0,this.cornerRadius=0}return e}(),fo=function(e){qn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new F_e},t.prototype.buildPath=function(n,r){N_e(n,r)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(zn);fo.prototype.type="sector";var B_e=function(){function e(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return e}(),cb=function(e){qn(t,e);function t(n){return e.call(this,n)||this}return t.prototype.getDefaultShape=function(){return new B_e},t.prototype.buildPath=function(n,r){var a=r.cx,i=r.cy,o=Math.PI*2;n.moveTo(a+r.r,i),n.arc(a,i,r.r,0,o,!1),n.moveTo(a+r.r0,i),n.arc(a,i,r.r0,0,o,!0)},t}(zn);cb.prototype.type="ring";function V_e(e,t,n,r){var a=[],i=[],o=[],s=[],l,u,c,f;if(r){c=[1/0,1/0],f=[-1/0,-1/0];for(var d=0,h=e.length;d=2){if(r){var i=V_e(a,r,n,t.smoothConstraint);e.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(n?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=a[(s+1)%o];e.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{e.moveTo(a[0][0],a[0][1]);for(var s=1,f=a.length;sAu[1]){if(s=!1,i)return s;var c=Math.abs(Au[0]-Iu[1]),f=Math.abs(Iu[0]-Au[1]);Math.min(c,f)>a.len()&&(c0){var f=c.duration,d=c.delay,h=c.easing,p={duration:f,delay:d||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:e,during:o};s?t.animateFrom(n,p):t.animateTo(n,p)}else t.stopAnimation(),!s&&t.attr(n),o&&o(1),i&&i()}function Rr(e,t,n,r,a,i){fE("update",e,t,n,r,a,i)}function fa(e,t,n,r,a,i){fE("enter",e,t,n,r,a,i)}function Lh(e){if(!e.__zr)return!0;for(var t=0;tMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function rP(e){return!e.isGroup}function e1e(e){return e.shape!=null}function cB(e,t,n){if(!e||!t)return;function r(o){var s={};return o.traverse(function(l){rP(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return e1e(o)&&(s.shape=vt({},o.shape)),s}var i=r(e);t.traverse(function(o){if(rP(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Rr(o,l,n,An(o).dataIndex)}}})}function fB(e,t){return Ut(e,function(n){var r=n[0];r=$y(r,t.x),r=Ny(r,t.x+t.width);var a=n[1];return a=$y(a,t.y),a=Ny(a,t.y+t.height),[r,a]})}function dB(e,t){var n=$y(e.x,t.x),r=Ny(e.x+e.width,t.x+t.width),a=$y(e.y,t.y),i=Ny(e.y+e.height,t.y+t.height);if(r>=n&&i>=a)return{x:n,y:a,width:r-n,height:i-a}}function pb(e,t,n){var r=vt({rectHover:!0},t),a=r.style={strokeNoScale:!0};if(n=n||{x:-1,y:-1,width:2,height:2},e)return e.indexOf("image://")===0?(a.image=e.slice(8),Dn(a,n),new Jo(r)):hb(e.replace("path://",""),r,n,"center")}function t1e(e,t,n,r,a){for(var i=0,o=a[a.length-1];i1)return!1;var g=P1(h,p,c,f)/d;return!(g<0||g>1)}function P1(e,t,n,r){return e*r-n*t}function n1e(e){return e<=1e-6&&e>=-1e-6}function vb(e){var t=e.itemTooltipOption,n=e.componentModel,r=e.itemName,a=Vt(t)?{formatter:t}:t,i=n.mainType,o=n.componentIndex,s={componentType:i,name:r,$vars:["name"]};s[i+"Index"]=o;var l=e.formatterParamsExtra;l&&be(rr(l),function(c){Hl(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=An(e.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:r,option:Dn({content:r,encodeHTMLContent:!0,formatterParams:s},a)}}function aP(e,t){var n;e.isGroup&&(n=t(e)),n||e.traverse(t)}function gb(e,t){if(e)if(Pt(e))for(var n=0;n=0&&s.push(l)}),s}}function yB(e,t){return En(En({},e,!0),t,!0)}const m1e={time:{month:["January","February","March","April","May","June","July","August","September","October","November","December"],monthAbbr:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayOfWeek:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayOfWeekAbbr:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]},legend:{selector:{all:"All",inverse:"Inv"}},toolbox:{brush:{title:{rect:"Box Select",polygon:"Lasso Select",lineX:"Horizontally Select",lineY:"Vertically Select",keep:"Keep Selections",clear:"Clear Selections"}},dataView:{title:"Data View",lang:["Data View","Close","Refresh"]},dataZoom:{title:{zoom:"Zoom",back:"Zoom Reset"}},magicType:{title:{line:"Switch to Line Chart",bar:"Switch to Bar Chart",stack:"Stack",tiled:"Tile"}},restore:{title:"Restore"},saveAsImage:{title:"Save as Image",lang:["Right Click to Save Image"]}},series:{typeNames:{pie:"Pie chart",bar:"Bar chart",line:"Line chart",scatter:"Scatter plot",effectScatter:"Ripple scatter plot",radar:"Radar chart",tree:"Tree",treemap:"Treemap",boxplot:"Boxplot",candlestick:"Candlestick",k:"K line chart",heatmap:"Heat map",map:"Map",parallel:"Parallel coordinate map",lines:"Line graph",graph:"Relationship graph",sankey:"Sankey diagram",funnel:"Funnel chart",gauge:"Gauge",pictorialBar:"Pictorial bar",themeRiver:"Theme River Map",sunburst:"Sunburst",custom:"Custom chart",chart:"Chart"}},aria:{general:{withTitle:'This is a chart about "{title}"',withoutTitle:"This is a chart"},series:{single:{prefix:"",withName:" with type {seriesType} named {seriesName}.",withoutName:" with type {seriesType}."},multiple:{prefix:". It consists of {seriesCount} series count.",withName:" The {seriesId} series is a {seriesType} representing {seriesName}.",withoutName:" The {seriesId} series is a {seriesType}.",separator:{middle:"",end:""}}},data:{allData:"The data is as follows: ",partialData:"The first {displayCnt} items are: ",withName:"the data for {name} is {value}",withoutName:"{value}",separator:{middle:", ",end:". "}}}},y1e={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var Fy="ZH",gE="EN",vf=gE,xm={},mE={},bB=Qt.domSupported?function(){var e=(document.documentElement.lang||navigator.language||navigator.browserLanguage||vf).toUpperCase();return e.indexOf(Fy)>-1?Fy:vf}():vf;function yE(e,t){e=e.toUpperCase(),mE[e]=new nr(t),xm[e]=t}function b1e(e){if(Vt(e)){var t=xm[e.toUpperCase()]||{};return e===Fy||e===gE?wn(t):En(wn(t),wn(xm[vf]),!1)}else return En(wn(e),wn(xm[vf]),!1)}function _1e(e){return mE[e]}function w1e(){return mE[vf]}yE(gE,m1e);yE(Fy,y1e);var bE=1e3,_E=bE*60,Rh=_E*60,ki=Rh*24,cP=ki*365,ih={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},gg="{yyyy}-{MM}-{dd}",fP={year:"{yyyy}",month:"{yyyy}-{MM}",day:gg,hour:gg+" "+ih.hour,minute:gg+" "+ih.minute,second:gg+" "+ih.second,millisecond:ih.none},R1=["year","month","day","hour","minute","second","millisecond"],_B=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function ba(e,t){return e+="","0000".substr(0,t-e.length)+e}function gf(e){switch(e){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return e}}function S1e(e){return e===gf(e)}function C1e(e){switch(e){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function lv(e,t,n,r){var a=$i(e),i=a[wE(n)](),o=a[mf(n)]()+1,s=Math.floor((o-1)/3)+1,l=a[bb(n)](),u=a["get"+(n?"UTC":"")+"Day"](),c=a[Sp(n)](),f=(c-1)%12+1,d=a[_b(n)](),h=a[wb(n)](),p=a[Sb(n)](),v=c>=12?"pm":"am",g=v.toUpperCase(),m=r instanceof nr?r:_1e(r||bB)||w1e(),y=m.getModel("time"),w=y.get("month"),_=y.get("monthAbbr"),S=y.get("dayOfWeek"),T=y.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,v+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,ba(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,w[o-1]).replace(/{MMM}/g,_[o-1]).replace(/{MM}/g,ba(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,ba(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[u]).replace(/{ee}/g,T[u]).replace(/{e}/g,u+"").replace(/{HH}/g,ba(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,ba(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,ba(d,2)).replace(/{m}/g,d+"").replace(/{ss}/g,ba(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,ba(p,3)).replace(/{S}/g,p+"")}function T1e(e,t,n,r,a){var i=null;if(Vt(n))i=n;else if(tn(n))i=n(e.value,t,{level:e.level});else{var o=vt({},ih);if(e.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(Pt(i)){var f=e.level==null?0:e.level>=0?e.level:i.length+e.level;f=Math.min(f,i.length-1),i=i[f]}}return lv(new Date(e.value),i,a,r)}function wB(e,t){var n=$i(e),r=n[mf(t)]()+1,a=n[bb(t)](),i=n[Sp(t)](),o=n[_b(t)](),s=n[wb(t)](),l=n[Sb(t)](),u=l===0,c=u&&s===0,f=c&&o===0,d=f&&i===0,h=d&&a===1,p=h&&r===1;return p?"year":h?"month":d?"day":f?"hour":c?"minute":u?"second":"millisecond"}function dP(e,t,n){var r=Kn(e)?$i(e):e;switch(t=t||wB(e,n),t){case"year":return r[wE(n)]();case"half-year":return r[mf(n)]()>=6?1:0;case"quarter":return Math.floor((r[mf(n)]()+1)/4);case"month":return r[mf(n)]();case"day":return r[bb(n)]();case"half-day":return r[Sp(n)]()/24;case"hour":return r[Sp(n)]();case"minute":return r[_b(n)]();case"second":return r[wb(n)]();case"millisecond":return r[Sb(n)]()}}function wE(e){return e?"getUTCFullYear":"getFullYear"}function mf(e){return e?"getUTCMonth":"getMonth"}function bb(e){return e?"getUTCDate":"getDate"}function Sp(e){return e?"getUTCHours":"getHours"}function _b(e){return e?"getUTCMinutes":"getMinutes"}function wb(e){return e?"getUTCSeconds":"getSeconds"}function Sb(e){return e?"getUTCMilliseconds":"getMilliseconds"}function E1e(e){return e?"setUTCFullYear":"setFullYear"}function SB(e){return e?"setUTCMonth":"setMonth"}function CB(e){return e?"setUTCDate":"setDate"}function TB(e){return e?"setUTCHours":"setHours"}function EB(e){return e?"setUTCMinutes":"setMinutes"}function xB(e){return e?"setUTCSeconds":"setSeconds"}function kB(e){return e?"setUTCMilliseconds":"setMilliseconds"}function x1e(e,t,n,r,a,i,o,s){var l=new wr({style:{text:e,font:t,align:n,verticalAlign:r,padding:a,rich:i,overflow:o?"truncate":null,lineHeight:s}});return l.getBoundingRect()}function SE(e){if(!w8(e))return Vt(e)?e:"-";var t=(e+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function CE(e,t){return e=(e||"").toLowerCase().replace(/-(.)/g,function(n,r){return r.toUpperCase()}),t&&e&&(e=e.charAt(0).toUpperCase()+e.slice(1)),e}var uv=U2;function mC(e,t,n){var r="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(c){return c&&to(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=e instanceof Date;if(o||s){var l=o?$i(e):e;if(isNaN(+l)){if(s)return"-"}else return lv(l,r,n)}if(t==="ordinal")return my(e)?a(e):Kn(e)&&i(e)?e+"":"-";var u=yp(e);return i(u)?SE(u):my(e)?a(e):typeof e=="boolean"?e+"":"-"}var hP=["a","b","c","d","e","f","g"],$1=function(e,t){return"{"+e+(t??"")+"}"};function TE(e,t,n){Pt(t)||(t=[t]);var r=t.length;if(!r)return"";for(var a=t[0].$vars||[],i=0;i':'';var o=n.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:r}:{width:10,height:10,borderRadius:5,backgroundColor:r}}}function k1e(e,t,n){(e==="week"||e==="month"||e==="quarter"||e==="half-year"||e==="year")&&(e=`MM-dd
+yyyy`);var r=$i(t),a=n?"getUTC":"get",i=r[a+"FullYear"](),o=r[a+"Month"]()+1,s=r[a+"Date"](),l=r[a+"Hours"](),u=r[a+"Minutes"](),c=r[a+"Seconds"](),f=r[a+"Milliseconds"]();return e=e.replace("MM",ba(o,2)).replace("M",o).replace("yyyy",i).replace("yy",ba(i%100+"",2)).replace("dd",ba(s,2)).replace("d",s).replace("hh",ba(l,2)).replace("h",l).replace("mm",ba(u,2)).replace("m",u).replace("ss",ba(c,2)).replace("s",c).replace("SSS",ba(f,3)),e}function M1e(e){return e&&e.charAt(0).toUpperCase()+e.substr(1)}function pc(e,t){return t=t||"transparent",Vt(e)?e:Kt(e)&&e.colorStops&&(e.colorStops[0]||{}).color||t}var km=be,I1e=["left","right","top","bottom","width","height"],mg=[["width","left","right"],["height","top","bottom"]];function EE(e,t,n,r,a){var i=0,o=0;r==null&&(r=1/0),a==null&&(a=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),d=f&&f.getBoundingRect(),h,p;if(e==="horizontal"){var v=c.width+(d?-d.x+c.x:0);h=i+v,h>r||l.newline?(i=0,h=v,o+=s+n,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(d?-d.y+c.y:0);p=o+g,p>a||l.newline?(i+=s+n,o=0,p=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),e==="horizontal"?i=h+n:o=p+n)})}var $h=EE;ur(EE,"vertical");ur(EE,"horizontal");function Hf(e,t,n){n=uv(n||0);var r=t.width,a=t.height,i=fn(e.left,r),o=fn(e.top,a),s=fn(e.right,r),l=fn(e.bottom,a),u=fn(e.width,r),c=fn(e.height,a),f=n[2]+n[0],d=n[1]+n[3],h=e.aspect;switch(isNaN(u)&&(u=r-s-d-i),isNaN(c)&&(c=a-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>r/a?u=r*.8:c=a*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=r-s-u-d),isNaN(o)&&(o=a-l-c-f),e.left||e.right){case"center":i=r/2-u/2-n[3];break;case"right":i=r-u-d;break}switch(e.top||e.bottom){case"middle":case"center":o=a/2-c/2-n[0];break;case"bottom":o=a-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=r-d-i-(s||0)),isNaN(c)&&(c=a-f-o-(l||0));var p=new xn(i+n[3],o+n[0],u,c);return p.margin=n,p}function Cp(e){var t=e.layoutMode||e.constructor.layoutMode;return Kt(t)?t:t?{type:t}:null}function Uf(e,t,n){var r=n&&n.ignoreSize;!Pt(r)&&(r=[r,r]);var a=o(mg[0],0),i=o(mg[1],1);u(mg[0],e,a),u(mg[1],e,i);function o(c,f){var d={},h=0,p={},v=0,g=2;if(km(c,function(w){p[w]=e[w]}),km(c,function(w){s(t,w)&&(d[w]=p[w]=t[w]),l(d,w)&&h++,l(p,w)&&v++}),r[f])return l(t,c[1])?p[c[2]]=null:l(t,c[2])&&(p[c[1]]=null),p;if(v===g||!h)return p;if(h>=g)return d;for(var m=0;m=0;l--)s=En(s,a[l],!0);r.defaultOption=s}return r.defaultOption},t.prototype.getReferringComponents=function(n,r){var a=n+"Index",i=n+"Id";return tv(this.ecModel,n,{index:this.get(a,!0),id:this.get(i,!0)},r)},t.prototype.getBoxLayoutParams=function(){var n=this;return{left:n.get("left"),top:n.get("top"),right:n.get("right"),bottom:n.get("bottom"),width:n.get("width"),height:n.get("height")}},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(n){this.option.zlevel=n},t.protoInitialize=function(){var n=t.prototype;n.type="component",n.id="",n.name="",n.mainType="",n.subType="",n.componentIndex=0}(),t}(nr);I8(On,nr);rb(On);v1e(On);g1e(On,P1e);function P1e(e){var t=[];return be(On.getClassesByMainType(e),function(n){t=t.concat(n.dependencies||n.prototype.dependencies||[])}),t=Ut(t,function(n){return $o(n).main}),e!=="dataset"&&Bn(t,"dataset")<=0&&t.unshift("dataset"),t}var IB="";typeof navigator<"u"&&(IB=navigator.platform||"");var Kc="rgba(0, 0, 0, 0.2)";const O1e={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Kc,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Kc,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Kc,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Kc,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Kc,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Kc,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:IB.match(/^Win/)?"Microsoft YaHei":"sans-serif",fontSize:12,fontStyle:"normal",fontWeight:"normal"},blendMode:null,stateAnimation:{duration:300,easing:"cubicOut"},animation:"auto",animationDuration:1e3,animationDurationUpdate:500,animationEasing:"cubicInOut",animationEasingUpdate:"cubicInOut",animationThreshold:2e3,progressiveThreshold:3e3,progressive:400,hoverLayerThreshold:3e3,useUTC:!1};var AB=hn(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Ui="original",Ga="arrayRows",_o="objectRows",Qo="keyedColumns",Dl="typedArray",DB="unknown",Es="column",od="row",Kr={Must:1,Might:2,Not:3},PB=Cr();function L1e(e){PB(e).datasetMap=hn()}function R1e(e,t,n){var r={},a=xE(t);if(!a||!e)return r;var i=[],o=[],s=t.ecModel,l=PB(s).datasetMap,u=a.uid+"_"+n.seriesLayoutBy,c,f;e=e.slice(),be(e,function(v,g){var m=Kt(v)?v:e[g]={name:v};m.type==="ordinal"&&c==null&&(c=g,f=p(m)),r[m.name]=[]});var d=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});be(e,function(v,g){var m=v.name,y=p(v);if(c==null){var w=d.valueWayDim;h(r[m],w,y),h(o,w,y),d.valueWayDim+=y}else if(c===g)h(r[m],0,y),h(i,0,y);else{var w=d.categoryWayDim;h(r[m],w,y),h(o,w,y),d.categoryWayDim+=y}});function h(v,g,m){for(var y=0;yt)return e[r];return e[n-1]}function z1e(e,t,n,r,a,i,o){i=i||e;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var c=o==null||!r?n:V1e(r,o);if(c=c||n,!(!c||!c.length)){var f=c[l];return a&&(u[a]=f),s.paletteIdx=(l+1)%c.length,f}}function H1e(e,t){t(e).paletteIdx=0,t(e).paletteNameMap={}}var yg,Nd,vP,gP="\0_ec_inner",U1e=1,ME=function(e){Xt(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.init=function(n,r,a,i,o,s){i=i||{},this.option=null,this._theme=new nr(i),this._locale=new nr(o),this._optionManager=s},t.prototype.setOption=function(n,r,a){var i=bP(r);this._optionManager.setOption(n,a,i),this._resetOption(null,i)},t.prototype.resetOption=function(n,r){return this._resetOption(n,bP(r))},t.prototype._resetOption=function(n,r){var a=!1,i=this._optionManager;if(!n||n==="recreate"){var o=i.mountOption(n==="recreate");!this.option||n==="recreate"?vP(this,o):(this.restoreData(),this._mergeOption(o,r)),a=!0}if((n==="timeline"||n==="media")&&this.restoreData(),!n||n==="recreate"||n==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,r))}if(!n||n==="recreate"||n==="media"){var l=i.getMediaOption(this);l.length&&be(l,function(u){a=!0,this._mergeOption(u,r)},this)}return a},t.prototype.mergeOption=function(n){this._mergeOption(n,null)},t.prototype._mergeOption=function(n,r){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=hn(),u=r&&r.replaceMergeMainTypeMap;L1e(this),be(n,function(f,d){f!=null&&(On.hasClass(d)?d&&(s.push(d),l.set(d,!0)):a[d]=a[d]==null?wn(f):En(a[d],f,!0))}),u&&u.each(function(f,d){On.hasClass(d)&&!l.get(d)&&(s.push(d),l.set(d,!0))}),On.topologicalTravel(s,On.getAllClassMainTypes(),c,this);function c(f){var d=B1e(this,f,Ma(n[f])),h=i.get(f),p=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",v=G0e(h,d,p);tbe(v,f,On),a[f]=null,i.set(f,null),o.set(f,0);var g=[],m=[],y=0,w;be(v,function(_,S){var T=_.existing,E=_.newOption;if(!E)T&&(T.mergeOption({},this),T.optionUpdated({},!1));else{var M=f==="series",k=On.getClass(f,_.keyInfo.subType,!M);if(!k)return;if(f==="tooltip"){if(w)return;w=!0}if(T&&T.constructor===k)T.name=_.keyInfo.name,T.mergeOption(E,this),T.optionUpdated(E,!1);else{var A=vt({componentIndex:S},_.keyInfo);T=new k(E,this,this,A),vt(T,A),_.brandNew&&(T.__requireNewView=!0),T.init(E,this,this),T.optionUpdated(null,!0)}}T?(g.push(T.option),m.push(T),y++):(g.push(void 0),m.push(void 0))},this),a[f]=g,i.set(f,m),o.set(f,y),f==="series"&&yg(this)}this._seriesIndices||yg(this)},t.prototype.getOption=function(){var n=wn(this.option);return be(n,function(r,a){if(On.hasClass(a)){for(var i=Ma(r),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!bp(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,n[a]=i}}),delete n[gP],n},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(n){this._payload=n},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(n,r){var a=this._componentsMap.get(n);if(a){var i=a[r||0];if(i)return i;if(r==null){for(var o=0;o