diff --git a/CNAME b/CNAME new file mode 100644 index 0000000..3d8d6f0 --- /dev/null +++ b/CNAME @@ -0,0 +1 @@ +dev-hex-admin.hexschool.io diff --git a/assets/AssistantDetail.1fffdb7f.css b/assets/AssistantDetail.1fffdb7f.css new file mode 100644 index 0000000..1d70afb --- /dev/null +++ b/assets/AssistantDetail.1fffdb7f.css @@ -0,0 +1 @@ +.card-body-height{height:300px;overflow:hidden;overflow-y:auto}.vs__dropdown-menu{max-height:200px} diff --git a/assets/AssistantDetail.f8b32a67.js b/assets/AssistantDetail.f8b32a67.js new file mode 100644 index 0000000..af0e8a1 --- /dev/null +++ b/assets/AssistantDetail.f8b32a67.js @@ -0,0 +1 @@ +import{l as ps,D as bs,r as n,s as H,m as J,o as ms,z as K,a as d,c,b as s,A as Q,f as gs,h as v,g as P,F as b,q as m,w as G,C as D,p as ks,x as g,E as fs,G as ys,$ as ws}from"./index.8b9bb582.js";/* empty css */import{b as Ls}from"./bsTab.87eb58d2.js";import{a as xs}from"./assistant.c4224b31.js";import{a as Ts}from"./task.9bd3355c.js";import"./tab.a420e993.js";const Cs={class:"about px-4 mt-4"},As={class:"border-bottom border-light pb-2 mb-4"},$s={"aria-label":"breadcrumb"},Gs={class:"breadcrumb"},Ds={class:"breadcrumb-item"},Vs=s("li",{class:"breadcrumb-item active","aria-current":"page"},"\u7DE8\u8F2F\u52A9\u6559",-1),Es=s("h1",{class:"fs-4 mb-0"},"\u7DE8\u8F2F\u52A9\u6559",-1),Ss={id:"assistantDetail",class:"col-md-5"},Ns={class:"assistant card shadow-sm rounded-4 overflow-hidden mb-4"},Us={class:"card-header bg-white py-3"},Ms=s("div",{style:{width:"60px",height:"60px"},class:"rounded-circle mx-auto bg-light mb-1"},null,-1),Ps={class:"text-center mb-0"},zs={class:"card-body"},Bs={class:"d-flex align-items-center"},js=s("span",{class:"material-icons-outlined me-1"},"email",-1),Fs={class:"d-flex"},Is=s("span",{class:"material-icons-outlined me-1"},"face",-1),Rs={class:"col-md-12"},qs={class:"nav nav-tabs",role:"tablist"},Os=["id","aria-controls","data-bs-target","onClick"],Hs={class:"tab-content mb-5",id:"myTabContent"},Js={class:"tab-pane fade show active",id:"assistantTab",role:"tabpanel","aria-labelledby":"assistant-tab"},Ks={class:"mt-4 card shadow-sm rounded-4 overflow-hidden mb-4"},Qs=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u52A9\u6559\u7A31\u865F")],-1),Ws={class:"card-body card-body-height"},Xs={class:"list list-unstyled"},Ys={class:"form-check"},Zs=["id","value","checked"],se=["for"],ee=s("hr",null,null,-1),te={class:"card-footer bg-white text-end py-3"},ae={class:"tab-pane fade",id:"coursesTab",role:"tabpanel","aria-labelledby":"courses-tab"},oe={class:"mt-4 row position-relative align-items-start"},le={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},ie={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ne=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u53EF\u6279\u6539\u7684\u4F5C\u696D\u5217\u8868")],-1),de={class:"card-body card-body-height"},ce={class:"list list-unstyled"},re=s("hr",null,null,-1),ue={class:"col-md-8"},he={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},_e={class:"card-header bg-white py-3"},ve={class:"form-check"},pe=s("label",{class:"h2 fs-6 mb-0 lh-base",for:"assistantAll"},"\u6279\u6539\u8AB2\u7A0B\u8A2D\u5B9A",-1),be={class:"card-body card-body-height"},me={class:"list list-unstyled"},ge={class:"form-check"},ke=["id","value","checked"],fe=["for"],ye=s("hr",null,null,-1),we={class:"card-footer bg-white text-end py-3"},Le={class:"tab-pane fade",id:"tasksTab",role:"tabpanel","aria-labelledby":"tasks-tab"},xe={class:"mt-4 row position-relative align-items-start"},Te={class:"col-md-4 users-sticky-md-top",style:{top:"80px"}},Ce={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ae=s("div",{class:"card-header bg-white py-3"},[s("h2",{class:"fs-6 mb-0 lh-base"},"\u53EF\u6279\u6539\u7684\u4EFB\u52D9\u5217\u8868")],-1),$e={class:"card-body card-body-height"},Ge={id:"task-group",class:"list-unstyled mb-0"},De=["aria-controls","href"],Ve={class:"fw-bold"},Ee=["id"],Se={class:"list list-unstyled"},Ne={class:"col-md-8"},Ue={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Me=s("div",{class:"card-header bg-white py-3 fw-bold"}," \u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A ",-1),Pe={class:"card-body card-body-height"},ze={key:0,class:"form-check"},Be=s("label",{class:"h2 fs-6 mb-0 lh-base",for:"tasksAll"},"\u5168\u9078",-1),je={id:"task-list",class:"list list-unstyled mt-3"},Fe={class:"form-check"},Ie=["id","value"],Re=["for"],qe=s("hr",null,null,-1),Oe={class:"card-footer bg-white text-end py-3"},st={__name:"AssistantDetail",setup(He){const{apiGetVideoCoursesList:W,apiGetAssistantDetail:X,apiPutAssistantDetail:Y,apiGetAssistantsTitles:Z,apiPutAssistantTasks:ss,apiDeleteAssistantTasks:es}=xs,{apiGetTaskGroupsList:ts,apiGetTasks:as}=Ts,os=ps(),k=bs.useLoading(),S=(a,t,o)=>a.map(r=>(r[t]=o,r)),y=n([]),h=n([]),_=n([]),w=n(!1),ls=()=>{w.value?(_.value=[],y.value.forEach(a=>{_.value.push(a.id)})):_.value=[]};H(()=>_.value,()=>{y.value.length!==0&&_.value.length===y.value.length?w.value=!0:w.value=!1},{deep:!0});const is=()=>{y.value.forEach(a=>{h.value.video_courses.forEach(t=>{a.id===t.id&&(a.isChecked=!0,_.value.push(a.id))})})},ns=async()=>{const a=k.show();try{_.value=[];const{courses:t}=await W();y.value=S(t,"isChecked",!1),is()}catch(t){g("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${t.response.data.statusCode}:${t.response.data.message}`)}finally{a.hide()}},N=n([]),L=n([]),ds=()=>{N.value.forEach(a=>{h.value.assistant_titles.forEach(t=>{a.id===t.id&&(a.isChecked=!0,L.value.push(a.id))})})},cs=async()=>{const a=k.show();try{L.value=[];const{assistant_titles:t}=await Z();N.value=S(t,"isChecked",!1),ds()}catch(t){g("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5931\u6557",`${t.response.data.statusCode}:${t.response.data.message}`)}finally{a.hide()}},p=n(""),U=n([]),x=n({taskGroupsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),V=n(1),rs=async(a=1)=>{var o,r,e,i;const t=k.show();try{const{task_groups:l,pagination:f}=await ts({count:150,page:a});x.value.taskGroupsList=l,x.value.pagination=f,V.value=f.current_page,U.value=[...U.value,...x.value.taskGroupsList]}catch(l){g("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${(r=(o=l==null?void 0:l.response)==null?void 0:o.data)==null?void 0:r.statusCode} : ${(i=(e=l==null?void 0:l.response)==null?void 0:e.data)==null?void 0:i.message}`)}finally{t.hide()}},z=async(a=1)=>{await rs(a),x.value.pagination.total_page!==0&&V.value!==x.value.pagination.total_page&&(V.value+=1,z(V.value))},T=n([]),C=n({tasksList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),E=n(1),B=n(null),us=async(a=1)=>{var o,r,e,i;const t=k.show();try{const{tasks:l,pagination:f}=await as({count:100,page:a,scoped:B.value});C.value.tasksList=S(l,"isChecked",!1),C.value.tasksList=l,C.value.pagination=f,E.value=f.current_page,T.value=[...T.value,...l]}catch(l){g("danger","\u53D6\u5F97\u6307\u5B9A\u7684\u4EFB\u52D9\u7FA4\u7D44\u4EFB\u52D9\u5217\u8868\u5931\u6557",`${(r=(o=l==null?void 0:l.response)==null?void 0:o.data)==null?void 0:r.statusCode} : ${(i=(e=l==null?void 0:l.response)==null?void 0:e.data)==null?void 0:i.message}`)}finally{t.hide()}},j=n(""),u=n([]),M=async a=>{var o,r;const t=k.show();try{const e=await X(a);h.value=e,u.value=[],e.task_groups.forEach(i=>{i.tasks&&i.tasks.forEach(l=>{u.value.push({id:l.id,task_group_id:i.id})})}),ns(),cs()}catch(e){g("danger","\u53D6\u5F97\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${(o=e.response)==null?void 0:o.data.statusCode}:${(r=e.response)==null?void 0:r.data.message}`)}finally{t.hide()}},F=async(a=1)=>{await us(a),C.value.pagination.total_page!==0&&E.value!==C.value.pagination.total_page&&(E.value+=1,F(E.value))},hs=async a=>{j.value=a,B.value=`&filter=task_group&task_group_id=${j.value}`,T.value=[],await F()},I=async a=>{const t=k.show();try{const o={video_course_list:_.value,assistant_title_list:L.value};await Y(a,o),g("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u52A9\u6559\u8A2D\u5B9A"),M(a)}catch(o){g("danger","\u66F4\u65B0\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}},A=n([]),$=n(!1),R=()=>{var a;if(A.value=T.value.map(t=>({id:t.id,task_group_id:p.value})),$.value)u.value.length===0&&u.value.push(...A.value),A.value.forEach(t=>{u.value.findIndex(r=>r.id===t.id)===-1&&u.value.push(t)});else{const t=A.value.map(o=>o.id);u.value=(a=u.value)==null?void 0:a.filter(o=>{if(!t.includes(o.id))return o}),A.value=[]}},_s=()=>{u.value.some(t=>p.value===t.task_group_id)?($.value=!0,R()):$.value=!1},vs=async a=>{const t=k.show();try{let o=[];u.value.length>0?(o=u.value.reduce((e,i)=>{let l=e.find(f=>f.task_group_id===i.task_group_id);return l||(l={id:i.task_group_id,task_ids:[]},e.push(l)),l.task_ids.push(i.id),e},[]),await ss(a,{task_groups:o})):await es(a),M(a)}catch(o){g("danger","\u66F4\u65B0\u52A9\u6559\u53EF\u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}},q=J([]),O=J([{id:"assistant-tab",name:"\u52A9\u6559\u7A31\u865F\u8A2D\u5B9A",target:"assistantTab",active:!0,danger:!1,element:null},{id:"courses-tab",name:"\u6279\u6539\u8AB2\u7A0B\u8A2D\u5B9A",target:"coursesTab",active:!1,danger:!1,element:null},{id:"tasks-tab",name:"\u6279\u6539\u4EFB\u52D9\u8A2D\u5B9A",target:"tasksTab",active:!1,danger:!1,element:null}]);return ms(()=>{const a=os.params.id;M(a),z(),Ls(q,O)}),H(()=>p.value,async()=>{p.value&&(await hs(p.value),_s())}),(a,t)=>{const o=K("router-link"),r=K("v-select");return d(),c("div",Cs,[s("header",As,[s("nav",$s,[s("ol",Gs,[s("li",Ds,[Q(o,{to:"/admin/assistants/list"},{default:gs(()=>[P(" \u52A9\u6559\u7BA1\u7406 ")]),_:1})]),Vs])]),Es]),s("div",Ss,[s("div",Ns,[s("div",Us,[Ms,s("h5",Ps,v(h.value.nickname),1)]),s("div",zs,[s("p",Bs,[js,P(" "+v(h.value.email),1)]),s("div",Fs,[Is,s("div",null,[(d(!0),c(b,null,m(h.value.assistant_titles,e=>(d(),c("span",{key:e.id,class:"badge bg-light text-dark me-1"},v(e.name),1))),128))])])])])]),s("div",Rs,[s("ul",qs,[(d(!0),c(b,null,m(O,e=>(d(),c("li",{class:"nav-item",role:"presentation",key:e.id},[s("button",{class:fs(["nav-link border",{active:e.active,"text-danger bg-danger bg-opacity-10":e.danger}]),id:e.id,type:"button",role:"tab","aria-controls":e.id,"aria-selected":"true","data-bs-target":`#${e.target}`,ref_for:!0,ref:i=>q.push(i),onClick:ys(i=>e.element.show(),["prevent"])},v(e.name),11,Os)]))),128))])]),s("div",Hs,[s("div",Js,[s("div",Ks,[Qs,s("div",Ws,[s("ul",Xs,[(d(!0),c(b,null,m(N.value,e=>(d(),c("li",{key:e.id,class:"list-item"},[s("div",Ys,[G(s("input",{id:e.name,"onUpdate:modelValue":t[0]||(t[0]=i=>L.value=i),class:"form-check-input",type:"checkbox",value:e.id,checked:e.isChecked},null,8,Zs),[[D,L.value]]),s("span",{class:"d-inline-block rounded-pill me-1",style:ws([{width:"10px",height:"10px"},`background-color:${e.color_code}`])},null,4),s("label",{class:"form-check-label",for:e.name},v(e.name),9,se)]),ee]))),128))])]),s("div",te,[s("button",{type:"button",class:"btn btn-primary",onClick:t[1]||(t[1]=e=>I(h.value.user_id))}," \u66F4\u65B0 ")])])]),s("div",ae,[s("div",oe,[s("div",le,[s("div",ie,[ne,s("div",de,[s("ul",ce,[(d(!0),c(b,null,m(h.value.video_courses,e=>(d(),c("li",{key:e.id,class:"list-item"},[P(v(e.name)+" ",1),re]))),128))])])])]),s("div",ue,[s("div",he,[s("div",_e,[s("div",ve,[G(s("input",{id:"assistantAll","onUpdate:modelValue":t[2]||(t[2]=e=>w.value=e),class:"form-check-input",type:"checkbox",onChange:ls},null,544),[[D,w.value]]),pe])]),s("div",be,[s("ul",me,[(d(!0),c(b,null,m(y.value,e=>(d(),c("li",{key:e.id,class:"list-item"},[s("div",ge,[G(s("input",{id:e.id,"onUpdate:modelValue":t[3]||(t[3]=i=>_.value=i),class:"form-check-input",type:"checkbox",value:e.id,checked:e.isChecked},null,8,ke),[[D,_.value]]),s("label",{class:"form-check-label",for:e.id},v(e.name),9,fe)]),ye]))),128))])]),s("div",we,[s("button",{type:"button",class:"btn btn-primary",onClick:t[4]||(t[4]=e=>I(h.value.user_id))}," \u66F4\u65B0 ")])])])])]),s("div",Le,[s("div",xe,[s("div",Te,[s("div",Ce,[Ae,s("div",$e,[s("ul",Ge,[(d(!0),c(b,null,m(h.value.task_groups,e=>(d(),c("li",{key:e.id,class:"mb-2 task-group"},[s("a",{class:"d-flex justify-content-between align-items-center text-decoration-none bg-light text-primary rounded mb-1 px-2 py-1","data-bs-toggle":"collapse",role:"button","aria-expanded":"false","aria-controls":e.id,href:`#checkedTaskList-${e.id}`},[s("span",Ve,v(e.name),1)],8,De),s("div",{class:"collapse",id:`checkedTaskList-${e.id}`},[s("ul",Se,[(d(!0),c(b,null,m(e.tasks,i=>(d(),c("li",{key:i.id,class:"list-item px-1 mb-1 task-item"},v(i.name),1))),128))])],8,Ee)]))),128))])])])]),s("div",Ne,[s("div",Ue,[Me,s("div",Pe,[Q(r,{id:"v-select",class:"mb-2",modelValue:p.value,"onUpdate:modelValue":t[5]||(t[5]=e=>p.value=e),options:U.value,label:"name",clearable:!1,reduce:e=>e.id},null,8,["modelValue","options","reduce"]),p.value?(d(),c("div",ze,[G(s("input",{id:"tasksAll","onUpdate:modelValue":t[6]||(t[6]=e=>$.value=e),class:"form-check-input",type:"checkbox",onChange:R},null,544),[[D,$.value]]),Be])):ks("",!0),s("ul",je,[(d(!0),c(b,null,m(T.value,e=>(d(),c("li",{class:"list-item",key:e.id},[s("div",Fe,[G(s("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[7]||(t[7]=i=>u.value=i),id:e.id,value:{task_group_id:p.value,id:e.id}},null,8,Ie),[[D,u.value]]),s("label",{class:"form-check-label",for:e.id},v(e.name),9,Re)]),qe]))),128))])]),s("div",Oe,[s("button",{type:"button",class:"btn btn-primary",onClick:t[8]||(t[8]=e=>vs(h.value.user_id))}," \u66F4\u65B0\u4EFB\u52D9 ")])])])])])])])}}};export{st as default}; diff --git a/assets/AssistantList.90a8bcc8.css b/assets/AssistantList.90a8bcc8.css new file mode 100644 index 0000000..2126960 --- /dev/null +++ b/assets/AssistantList.90a8bcc8.css @@ -0,0 +1 @@ +.dropdown-menu[data-v-07e438cb]{max-height:150px;overflow:auto} diff --git a/assets/AssistantList.c51c6184.js b/assets/AssistantList.c51c6184.js new file mode 100644 index 0000000..899b791 --- /dev/null +++ b/assets/AssistantList.c51c6184.js @@ -0,0 +1 @@ +import{_ as w,D as k,r as b,o as L,z as A,a as t,c as e,b as s,F as p,q as u,x as g,h as r,G as C,A as $,f as B,g as I,R as S,S as D}from"./index.8b9bb582.js";import{a as G}from"./assistant.c4224b31.js";const _=i=>(S("data-v-07e438cb"),i=i(),D(),i),M={class:"about px-4 mt-4 position-relative"},N=_(()=>s("header",{class:"d-flex align-items-center justify-content-between border-bottom border-light pb-2 mb-4"},[s("h1",{class:"fs-4 mb-0"}," \u52A9\u6559\u7BA1\u7406 ")],-1)),V={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},z={class:"card-body p-0"},F={class:"table-responsive"},j={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},q=_(()=>s("thead",{class:"bg-light"},[s("tr",null,[s("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u66B1\u7A31 "),s("th",{scope:"col",class:"py-3 text-muted border-0"}," \u6279\u6539\u5217\u8868 "),s("th",{scope:"col",class:"py-3 text-muted border-0"}," \u52A9\u6559\u7A31\u865F "),s("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1)),E={class:"text-nowrap"},O={scope:"row",class:"ps-4"},R={class:"fs-6 mb-0"},T={class:"mb-0 text-muted"},H={class:"dropdown"},J=["onClick"],K={class:"dropdown-menu","aria-labelledby":"dropdownCourseButton"},P={key:1,class:"p-1"},Q=_(()=>s("small",null,"\u9084\u6C92\u6709\u52A0\u5165\u8AB2\u7A0B\u5594\uFF01",-1)),U=[Q],W={style:{"max-width":"100px"}},X={class:"d-flex flex-wrap"},Y={class:"pe-3"},Z=_(()=>s("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),ss={__name:"AssistantList",setup(i){const{apiGetAssistantList:v,apiGetAssistantDetail:y}=G,h=k.useLoading(),m=b([]);L(async()=>{const l=h.show();try{const{assistants:o}=await v();m.value=o}catch(o){g("danger","\u53D6\u5F97\u52A9\u6559\u5217\u8868\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{l.hide()}});const c=b([]),f=async l=>{const o=h.show();try{c.value={};const{video_courses:a}=await y(l);c.value=a}catch(a){g("danger","\u53D6\u5F97\u52A9\u6559\u8CC7\u8A0A\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{o.hide()}};return(l,o)=>{const a=A("router-link");return t(),e("div",M,[N,s("div",V,[s("div",z,[s("div",F,[s("table",j,[q,s("tbody",E,[(t(!0),e(p,null,u(m.value,n=>(t(),e("tr",{key:n.user_id,class:"align-middle"},[s("td",O,[s("h5",R,r(n.nickname),1),s("p",T,r(n.email),1)]),s("td",null,[s("div",H,[s("a",{id:"dropdownCourseButton",href:"#","data-bs-toggle":"dropdown",onClick:C(d=>f(n.user_id),["prevent"])}," \u5C55\u958B\u5217\u8868 ",8,J),s("ul",K,[c.value.length?(t(!0),e(p,{key:0},u(c.value,d=>(t(),e("li",{key:d.id,class:"p-1"},[s("small",null,r(d.name),1)]))),128)):(t(),e("li",P,U))])])]),s("td",W,[s("div",X,[(t(!0),e(p,null,u(n.assistant_titles,(d,x)=>(t(),e("span",{key:x,class:"badge bg-light text-dark me-1 mb-1"},r(d),1))),128))])]),s("td",Y,[$(a,{to:`/admin/assistants/list/${n.user_id}`,class:"btn btn-sm btn-outline-gray"},{default:B(()=>[Z,I(" \u7DE8\u8F2F ")]),_:2},1032,["to"])])]))),128))])])])])])])}}},as=w(ss,[["__scopeId","data-v-07e438cb"]]);export{as as default}; diff --git a/assets/AssistantReply.1d864528.js b/assets/AssistantReply.1d864528.js new file mode 100644 index 0000000..52aa910 --- /dev/null +++ b/assets/AssistantReply.1d864528.js @@ -0,0 +1 @@ +import{r as f,s as G,o as j,a,c as n,b as t,G as Q,h as $,p as B,w as M,v as L,Q as Z,F as k,q as F,a9 as H,B as J,e as K,f as W,M as Y,g as tt,D as it,m as rt,X as dt,A as V,Z as T,x as S,T as ct}from"./index.8b9bb582.js";import{a as ut}from"./statistics.1a0d5647.js";import{a as pt}from"./assistant.c4224b31.js";import{b as X}from"./date.7e59e512.js";const mt={class:"accordion mb-3",id:"accordionPanelsStayOpenExample"},vt={class:"accordion-item"},_t=t("h2",{class:"accordion-header"},[t("button",{class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne","aria-expanded":"true","aria-controls":"panelsStayOpen-collapseOne"}," \u67E5\u8A62 ")],-1),yt={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show"},ht={class:"accordion-body"},ft={class:"col-md-12"},bt={key:0},kt={class:"col-md-6"},$t=t("label",{for:"start-time",class:"form-label"},"\u958B\u59CB\u6642\u9593",-1),gt={class:"col-md-6"},wt=t("label",{for:"end-time",class:"form-label"},"\u7D50\u675F\u6642\u9593",-1),Ut={class:"my-3"},xt=t("label",{for:"end-time",class:"form-label"},"\u67E5\u8A62\u985E\u578B",-1),It=t("option",{value:"/v1/stats/assistant/total"},"\u7E3D\u9AD4\u6578\u64DA",-1),Ft=t("option",{value:"/v1/stats/assistant/id"},"\u55AE\u4F4D\u52A9\u6559\u7684\u56DE\u8986\u72C0\u6CC1",-1),Dt=[It,Ft],Mt={class:"my-3"},St={class:""},At=t("p",{class:"mb-2"},"\u52A9\u6559\u540D\u7A31",-1),Ct={class:"list list-unstyled overflow-scroll",style:{height:"200px"}},Ot={class:"form-check"},qt=["id","type","value","checked"],Lt=["for"],jt={class:"d-flex justify-content-between"},Rt=t("button",{type:"submit",class:"btn btn-primary"},"\u67E5\u8A62",-1),Pt={__name:"AssistantSelector",props:{status:{type:String},id:{type:String},data:{type:Object,default(){return{assistantList:[],type:[],range:[]}}},queryParams:{type:Object,default(){return{}}},downloadCSV:{type:Function},openFavoriteModal:{type:Function}},emits:["submit"],setup(A,{emit:C}){const v=A,o=f({assistantUserIds:[],route:"",from:"",to:""});G(()=>v.queryParams,h=>{o.value={assistantUserIds:h.assistantUserIds||[],route:h.route,from:h.from,to:h.to}}),j(()=>{o.value={assistantUserIds:v.queryParams.assistantUserIds||[],route:v.queryParams.route||"/v1/stats/assistant/total",from:v.queryParams.from||"",to:v.queryParams.to||""}});const g=h=>C("submit",h);return(h,i)=>(a(),n("div",mt,[t("div",vt,[_t,t("div",yt,[t("div",ht,[t("form",{class:"row",onSubmit:i[5]||(i[5]=Q(()=>g(o.value),["prevent"]))},[t("div",ft,[o.value.name?(a(),n("h6",bt,"\u76EE\u524D\u6B63\u5728\u5957\u7528\uFF1A"+$(o.value.name),1)):B("",!0)]),t("div",kt,[$t,M(t("input",{type:"date","onUpdate:modelValue":i[0]||(i[0]=y=>o.value.from=y),name:"start-time",id:"start-time",class:"form-control"},null,512),[[L,o.value.from]])]),t("div",gt,[wt,M(t("input",{type:"date","onUpdate:modelValue":i[1]||(i[1]=y=>o.value.to=y),name:"end-time",id:"end-time",class:"form-control"},null,512),[[L,o.value.to]])]),t("div",Ut,[xt,M(t("select",{"onUpdate:modelValue":i[2]||(i[2]=y=>o.value.route=y),class:"form-select","aria-label":"Default select example"},Dt,512),[[Z,o.value.route]])]),t("div",Mt,[t("div",St,[At,t("ul",Ct,[(a(!0),n(k,null,F(v.data.assistantList,({id:y,name:w})=>(a(),n("li",{class:"border border-2 rounded-3 p-2 mb-2",key:y},[t("div",Ot,[M(t("input",{"onUpdate:modelValue":i[3]||(i[3]=U=>o.value.assistantUserIds=U),id:y,type:o.value.route==="/v1/stats/assistant/id"?"radio":"checkbox",class:"form-check-input",name:"assistantUserIds",value:y,checked:o.value.assistantUserIds.includes(y)},null,8,qt),[[H,o.value.assistantUserIds]]),t("label",{for:y,class:"form-check-label"},$(w),9,Lt)])]))),128))])])]),t("div",jt,[t("button",{onClick:i[4]||(i[4]=()=>v.openFavoriteModal(o.value)),type:"button",class:"btn btn-outline-primary"}," \u5E38\u7528\u8A2D\u5B9A "),Rt])],32)])])])]))}},Vt={class:"row"},Tt={class:"col-md-6"},Bt=t("h5",{class:"text-dark mb-3 fw-bold"},"\u5132\u5B58\u70BA\u5E38\u7528\u8A2D\u5B9A",-1),Gt={class:"mb-3"},Nt=t("label",{for:"name"},"\u5E38\u7528\u67E5\u8A62\u540D\u7A31",-1),Et={class:"border border-1 p-3 rounded-3"},zt=t("p",{class:"mb-2"}," \u52A9\u6559\u540D\u7A31 ",-1),Xt={class:"list list-unstyled overflow-scroll",style:{height:"150px"}},Qt={class:"form-check"},Zt=["id","type","value","checked"],Ht=["for"],Jt={class:"mb-3 mt-2"},Kt=t("label",{for:"end-time",class:"form-label"},"\u67E5\u8A62\u985E\u578B",-1),Wt=t("option",{value:"/v1/stats/assistant/total"},"\u7E3D\u9AD4\u6578\u64DA",-1),Yt=t("option",{value:"/v1/stats/assistant/id"},"\u55AE\u4F4D\u52A9\u6559\u7684\u56DE\u8986\u72C0\u6CC1",-1),ts=[Wt,Yt],ss={class:"mb-3"},es=t("label",{for:"form"},"\u8D77\u59CB\u65E5\u671F",-1),as={class:"mb-3"},os=t("label",{for:"to"},"\u7D50\u675F\u65E5\u671F",-1),ls=t("div",{class:"d-flex justify-content-end"},[t("button",{type:"submit",class:"btn btn-outline-primary"},"\u5132\u5B58")],-1),ns={class:"col-md-6"},is=t("h5",{class:"text-dark mb-3 fw-bold"},"\u5957\u7528\u5E38\u7528\u8A2D\u5B9A",-1),rs={class:"list-group list-group-flush"},ds=["onClick"],cs=["onClick","id"],us=["for"],ps=t("div",{class:"d-flex justify-content-end"},[t("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u95DC\u9589 ")],-1),ms={__name:"AssistantFavoriteModal",props:{status:{type:String},data:{type:Object,default(){return{list:[],type:[],range:[]}}},favoriteList:{type:Array,default(){return[]}},options:{type:Object,default(){return{}}}},emits:["applyFavorite","saveFavorite","deleteFavorite"],setup(A,{expose:C,emit:v}){const o=A,g=f(null),h=f(null),i=f({route:o.options.route||"",assistantUserIds:o.options.assistantUserIds||[],from:o.options.from||"",to:o.options.to||""});G(()=>o.options,_=>{i.value=_});const y=()=>{h.value.show()},w=()=>{h.value.hide()};j(()=>{h.value=new J(g.value.hModal)});const U=_=>{v("saveFavorite",_)},b=(_,c)=>{v("applyFavorite",{...c,name:_})},D=_=>{v("deleteFavorite",_)};return C({show:y,hide:w}),(_,c)=>(a(),K(Y,{ref_key:"modalRef",ref:g,modalSize:"modal-xl","has-footer":!0},{body:W(()=>[t("div",Vt,[t("div",Tt,[Bt,t("form",{onSubmit:c[5]||(c[5]=Q(()=>U(i.value),["prevent"]))},[t("div",Gt,[Nt,M(t("input",{"onUpdate:modelValue":c[0]||(c[0]=u=>i.value.name=u),type:"text",class:"form-control",id:"name",placeholder:"\u8ACB\u8F38\u5165\u540D\u7A31"},null,512),[[L,i.value.name]])]),t("div",Et,[zt,t("ul",Xt,[(a(!0),n(k,null,F(o.data.assistantList,({id:u,name:x})=>(a(),n("li",{class:"border border-2 rounded-3 p-2 mb-2",key:u},[t("div",Qt,[M(t("input",{"onUpdate:modelValue":c[1]||(c[1]=O=>i.value.assistantUserIds=O),id:u,type:A.options.route==="/v1/stats/assistant/id"?"radio":"checkbox",class:"form-check-input",name:"assistantUserIds",value:u,checked:o.options.assistantUserIds.includes(u)},null,8,Zt),[[H,i.value.assistantUserIds]]),t("label",{for:u,class:"form-check-label"},$(x),9,Ht)])]))),128))])]),t("div",Jt,[Kt,M(t("select",{"onUpdate:modelValue":c[2]||(c[2]=u=>i.value.route=u),class:"form-select","aria-label":"Default select example"},ts,512),[[Z,i.value.route]])]),t("div",ss,[es,M(t("input",{"onUpdate:modelValue":c[3]||(c[3]=u=>i.value.from=u),type:"date",class:"form-control",id:"form"},null,512),[[L,i.value.from]])]),t("div",as,[os,M(t("input",{"onUpdate:modelValue":c[4]||(c[4]=u=>i.value.to=u),type:"date",class:"form-control",id:"to"},null,512),[[L,i.value.to]])]),ls],32)]),t("div",ns,[is,t("ul",rs,[(a(!0),n(k,null,F(o.favoriteList,({id:u,name:x,route:O,query_params:R})=>(a(),n("li",{class:"list-group-item d-flex align-items-center",key:u},[t("button",{onClick:()=>D(u),type:"button",class:"btn btn-outline-danger btn-sm me-2"},"X",8,ds),t("input",{onClick:()=>b(x,{...R,route:O}),class:"form-check-input me-1",type:"radio",name:"listGroupRadio",id:`firstRadio-${u}`},null,8,cs),t("label",{class:"form-check-label",for:`firstRadio-${u}`},$(x),9,us)]))),128))])])]),ps]),_:1},512))}},vs={class:"list-group"},_s={class:"badge text-bg-primary rounded-pill"},ys={__name:"AssistantDetailModal",props:{replayDetail:{type:Object,default:()=>({})}},setup(A,{expose:C}){const v=A,o=f(null),g=f(null),h=()=>{g.value.show()},i=()=>{g.value.hide()};return j(()=>{g.value=new J(o.value.hModal)}),C({show:h,hide:i}),(y,w)=>{var U,b;return a(),K(Y,{ref_key:"modalRef",ref:o,modalSize:"modal-md","has-footer":!0,title:`${(U=v.replayDetail)==null?void 0:U.date}\uFF5C${(b=v.replayDetail)==null?void 0:b.type}`||""},{body:W(()=>{var D,_;return[t("ul",vs,[(a(!0),n(k,null,F((_=v.replayDetail)==null?void 0:_[(D=v.replayDetail)==null?void 0:D.typeName],c=>(a(),n("li",{key:c.id,class:"list-group-item d-flex justify-content-between align-items-center"},[tt($(c.name)+" ",1),t("span",_s,$(c.count),1)]))),128))])]}),_:1},8,["title"])}}},hs={class:"container-fluid px-4 pt-4 pb-6"},fs=t("h1",{class:"fs-4 mb-5"},"\u52A9\u6559\u56DE\u8986\u91CF",-1),bs={key:0,class:"table-responsive"},ks={class:"table table-striped"},$s={key:0},gs={key:1,class:"table-responsive"},ws={key:0,class:"table table-striped"},Us=t("th",{style:{"white-space":"nowrap"}},"\u65E5\u671F",-1),xs={style:{"white-space":"nowrap"}},Is={key:0,class:"text-muted"},Fs=["onClick"],Ds={key:2},qs={__name:"AssistantReply",setup(A){const{apiGetAssistantTotal:C,apiGetOneAssistant:v,apiGetAssistantFavorite:o,apiPostAssistantFavorite:g,apiDeleteAssistantFavorite:h,apiGetOneAssistantDetail:i}=ut,{apiGetAssistantList:y}=pt,w=it.useLoading(),U=rt({list:[],type:[],range:[]}),b=f({route:"/v1/stats/assistant/total",from:X(new Date),to:X(new Date),assistantUserIds:""}),D=f({}),_=f({}),c=f(null),u=f([{key:"nickname",label:"\u52A9\u6559\u540D\u7A31"},{key:"question_count",label:"\u554F\u984C\u56DE\u8986\u6578"},{key:"question_assign_count",label:"\u554F\u984C\u6307\u6D3E\u91CF"},{key:"task_count",label:"\u4EFB\u52D9\u56DE\u8986\u91CF"},{key:"task_assign_count",label:"\u4EFB\u52D9\u6307\u6D3E\u91CF"},{key:"question_completion_rate",label:"\u554F\u984C\u56DE\u8986\u7387"},{key:"task_completion_rate",label:"\u4EFB\u52D9\u56DE\u8986\u7387"}]),x=f([]),O=()=>{x.value.forEach(p=>p.dispose()),x.value=[],[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).forEach(p=>{const d=new ct(p);x.value.push(d)})};G(()=>D.value,async()=>{await T(),O()}),dt(()=>{x.value.forEach(r=>r.dispose()),x.value=[]});const R=async r=>{var d,m,l,s;const p=w.show();b.value.route=r.route;try{if(r.route==="/v1/stats/assistant/total"){const{result:e}=await C({from:r.from,to:r.to,assistantUserIds:r.assistantUserIds.join(",")});D.value=(e==null?void 0:e.stats)||[]}else{const{result:e}=await v({from:r.from,to:r.to,assistantUserIds:r.assistantUserIds[0]});_.value=e}await T(),O()}catch(e){console.log(e),S("danger","\u67E5\u8A62\u5931\u6557",`${(m=(d=e==null?void 0:e.response)==null?void 0:d.data)==null?void 0:m.statusCode}:${(s=(l=e==null?void 0:e.response)==null?void 0:l.data)==null?void 0:s.message}`)}finally{p.hide()}},N=f([]),P=async()=>{var p,d,m,l;const r=w.show();try{const{result:s}=await o();N.value=s}catch(s){S("danger","\u53D6\u5F97\u5931\u6557",`${(d=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:d.statusCode}:${(l=(m=s==null?void 0:s.response)==null?void 0:m.data)==null?void 0:l.message}`)}finally{r.hide()}},st=r=>{b.value=r,c.value.show()},et=async r=>{var d,m,l,s;const p=w.show();try{await g({...r,assistantUserIds:r.assistantUserIds.join(",")}),S("success","\u5132\u5B58\u6210\u529F","\u5DF2\u6210\u529F\u5132\u5B58\u5E38\u7528\u8A2D\u5B9A"),await P()}catch(e){S("danger","\u5132\u5B58\u5931\u6557",`${(m=(d=e==null?void 0:e.response)==null?void 0:d.data)==null?void 0:m.statusCode}:${(s=(l=e==null?void 0:e.response)==null?void 0:l.data)==null?void 0:s.message}`)}finally{p.hide()}},at=async r=>{b.value={...r,assistantUserIds:r.assistantUserIds.split(",").map(p=>p)},c.value.hide()},ot=async r=>{var d,m,l,s;const p=w.show();try{await h(r),S("success","\u522A\u9664\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u5E38\u7528\u8A2D\u5B9A"),await P()}catch(e){S("danger","\u522A\u9664\u5931\u6557",`${(m=(d=e==null?void 0:e.response)==null?void 0:d.data)==null?void 0:m.statusCode}:${(s=(l=e==null?void 0:e.response)==null?void 0:l.data)==null?void 0:s.message}`)}finally{p.hide()}};j(async()=>{var p,d,m,l;const r=w.show();try{const{assistants:s}=await y();U.assistantList=s.map(e=>({id:e.user_id,name:e.nickname})),await P(),await T(),O()}catch(s){S("danger","\u5931\u6557",`${(d=(p=s==null?void 0:s.response)==null?void 0:p.data)==null?void 0:d.statusCode}:${(l=(m=s==null?void 0:s.response)==null?void 0:m.data)==null?void 0:l.message}`)}finally{r.hide()}});const E=f(null),z=f({}),lt=async(r,p,d)=>{var l,s,e,q;r.preventDefault();const m={\u554F\u7B54\u6578\u91CF:"question",\u4EFB\u52D9\u6578\u91CF:"task"};try{const{result:I}=await i({date:p,assistantId:b.value.assistantUserIds[0],type:m[d]});E.value.show(),z.value={...I,type:d,typeName:`${m[d]}s`}}catch(I){S("danger","\u5931\u6557",`${(s=(l=I==null?void 0:I.response)==null?void 0:l.data)==null?void 0:s.statusCode}:${(q=(e=I==null?void 0:I.response)==null?void 0:e.data)==null?void 0:q.message}`)}};return(r,p)=>{var d,m;return a(),n(k,null,[t("div",hs,[fs,V(Pt,{id:D.value.id,data:U,onSubmit:R,openFavoriteModal:st,queryParams:b.value},null,8,["id","data","queryParams"]),b.value.route==="/v1/stats/assistant/total"?(a(),n("div",bs,[t("table",ks,[t("thead",null,[t("tr",null,[(a(!0),n(k,null,F(u.value,l=>(a(),n("th",{key:l.key,style:{"white-space":"nowrap"}},$(l.label),1))),128))])]),t("tbody",null,[(a(!0),n(k,null,F(D.value,l=>(a(),n("tr",{key:l.nickname},[(a(!0),n(k,null,F(u.value,s=>(a(),n("td",{key:s.key,style:{"white-space":"nowrap"}},[tt($(l[s.key])+" ",1),s.key.includes("rate")?(a(),n("span",$s,"%")):B("",!0)]))),128))]))),128))])])])):b.value.route==="/v1/stats/assistant/id"?(a(),n("div",gs,[_.value.nickname?(a(),n("table",ws,[t("thead",null,[t("tr",null,[Us,(a(!0),n(k,null,F(Object.values((d=_.value)==null?void 0:d.stats),l=>(a(),n("th",{key:l.cht_name,style:{"white-space":"nowrap"}},$(l.cht_name),1))),128))])]),t("tbody",null,[(a(!0),n(k,null,F((m=_.value)==null?void 0:m.date,(l,s)=>{var e;return a(),n("tr",{key:l},[t("td",xs,$(l),1),(a(!0),n(k,null,F(Object.values((e=_.value)==null?void 0:e.stats),(q,I)=>(a(),n("td",{key:`\u554F\u7B54_${I}`,style:{"white-space":"nowrap"}},[q.data[s].toString()==="0"?(a(),n("span",Is,"0")):(a(),n("a",{key:1,"data-bs-toggle":"tooltip",title:"\u9EDE\u64CA\u67E5\u770B\u56DE\u8986\u7D30\u7BC0",class:"text-decoration-none",href:"#",onClick:nt=>{lt(nt,l,q.cht_name)}},$(q.data[s]),9,Fs))]))),128))])}),128))])])):B("",!0)])):(a(),n("div",Ds))]),V(ys,{ref_key:"AssistantDetailModalRef",ref:E,replayDetail:z.value},null,8,["replayDetail"]),V(ms,{ref_key:"FavoriteModalRef",ref:c,data:U,options:b.value,favoriteList:N.value,onSaveFavorite:et,onApplyFavorite:at,onDeleteFavorite:ot},null,8,["data","options","favoriteList"])],64)}}};export{qs as default}; diff --git a/assets/CourseDetail.cdca4d93.js b/assets/CourseDetail.cdca4d93.js new file mode 100644 index 0000000..7cecb43 --- /dev/null +++ b/assets/CourseDetail.cdca4d93.js @@ -0,0 +1 @@ +import{l as j,D as z,m as $,r as U,o as H,z as w,a as r,c,b as e,A as o,f as y,F as v,q as f,p as V,x as b,g as P,E as _,G as R,h as p,w as T,Q as O,C as Q}from"./index.8b9bb582.js";import{b as J}from"./bsTab.87eb58d2.js";import{a as K}from"./courses.c968273a.js";import{a as W}from"./assistant.c4224b31.js";import"./tab.a420e993.js";const X={class:"about px-4 mt-4"},Y={class:"border-bottom border-light pb-2 mb-4"},Z={"aria-label":"breadcrumb"},ee={class:"breadcrumb"},se={class:"breadcrumb-item"},ae=e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u8AB2\u7A0B ",-1),te=e("h1",{class:"fs-4 mb-0"}," \u7DE8\u8F2F\u8AB2\u7A0B ",-1),le={class:"row"},oe={class:"col-md-4"},ie={id:"list-tab",class:"list-group mb-3 mb-md-0",role:"tablist"},de=["id","href","aria-controls","onClick"],ne={class:"col-md-8"},re={id:"nav-tabContent",class:"tab-content"},ce={id:"list-home","data-bs-target":"list-home",class:"tab-pane fade show active",role:"tabpanel","aria-labelledby":"list-home-list"},ue={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},me=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," \u8AB2\u7A0B\u8A2D\u5B9A ")],-1),_e={class:"card-body"},be={class:"mb-3"},he=e("label",{for:"name",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),ve={class:"mb-3"},fe=e("label",{for:"assistants",class:"form-label"},"\u9810\u8A2D\u52A9\u6559",-1),pe=e("option",{value:"",disabled:""}," \u8ACB\u9078\u64C7\u52A9\u6559 ",-1),ye=["value"],ge={class:"text-end"},we=["disabled"],Ve={key:0,id:"udemy_info","data-bs-target":"udemy_info",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-udemy-list"},ke={class:"card shadow-sm rounded-4 overflow-hidden mb-4",role:"tabpanel","aria-labelledby":"list-home-list"},Ce=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," Udemy \u8A2D\u5B9A ")],-1),xe={class:"card-body"},De={class:"mb-3"},$e=e("label",{for:"udemy-name",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),Ue={class:"mb-3"},Te=e("label",{for:"description",class:"form-label"},"\u8AB2\u7A0B\u63CF\u8FF0",-1),Me=["innerHTML"],qe={class:"mb-3"},Le=e("label",{for:"abbr-name",class:"form-label"},"\u8AB2\u7A0B\u7E2E\u5BEB",-1),Se={class:"mb-3"},Ie=e("label",{for:"amount",class:"form-label"},"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",-1),Ae={key:1,id:"teachable_info","data-bs-target":"teachable_info",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-teachable-list"},Fe={class:"card shadow-sm rounded-4 overflow-hidden mb-4",role:"tabpanel","aria-labelledby":"list-home-list"},Ne=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," Teachable \u8A2D\u5B9A ")],-1),Ee={class:"card-body"},Be={class:"mb-3"},Ge=e("label",{for:"teachableId",class:"form-label"},"Teachable ID",-1),je={class:"mb-3"},ze=e("label",{for:"teachableName",class:"form-label"},"\u8AB2\u7A0B\u540D\u7A31",-1),He={class:"mb-3"},Pe=e("label",{for:"teachableAmount",class:"form-label"},"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",-1),Re={id:"list-lectures","data-bs-target":"list-teachable",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-lectures-list"},Oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Qe=e("div",{class:"card-header bg-white py-3 d-flex"},[e("h2",{class:"fs-6 mb-0 lh-base",style:{"margin-right":"260px"}}," Teachable \u7AE0\u7BC0 "),e("h2",{class:"fs-6 mb-0 lh-base"}," Udemy \u7AE0\u7BC0 ")],-1),Je={class:"card-body pt-2"},Ke={class:"row"},We={class:"col-md-6"},Xe={class:"list-group list-group-numbered"},Ye={class:"w-100"},Ze={class:"fw-bold mb-2"},es={class:"list-group mb-3"},ss={class:"col-md-6"},as={class:"list-group list-group-numbered"},ts={class:"w-100"},ls={class:"fw-bold mb-2"},os={class:"list-group mb-3"},is={id:"list-surveys","data-bs-target":"list-surveys",class:"tab-pane fade",role:"tabpanel","aria-labelledby":"list-surveys-list"},ds={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ns=e("div",{class:"card-header bg-white py-3"},[e("h2",{class:"fs-6 mb-0 lh-base"}," \u8A55\u50F9\u8A2D\u5B9A ")],-1),rs={class:"card-body"},cs={class:"mb-3"},us=e("p",null,"\u8A55\u50F9\u529F\u80FD",-1),ms={class:"form-check form-switch"},_s=e("label",{class:"form-check-label",for:"flexSwitchCheckDefault"},"\u958B\u555F/\u95DC\u9589",-1),bs={class:"mb-3"},hs=e("label",{for:"course-seconds",class:"form-label"},"\u8A72\u8AB2\u7A0B\u6709\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6(\u79D2)",-1),vs=e("div",{class:"form-text"}," \u8ACB\u5230 Teachable \u8A08\u7B97\u4E94\u500B\u7AE0\u7BC0\u7684\u5F71\u97F3\u7AE0\u7BC0\u5F71\u7247\u9577\u5EA6 ",-1),fs={class:"mb-3"},ps=e("label",{for:"course-completion",class:"form-label"},"\u8AB2\u7A0B\u5B8C\u6210\u5EA6(%)",-1),ys={key:1,class:"text-end"},gs=["disabled"],$s={__name:"CourseDetail",setup(ws){const{apiGetCourseDetail:M,apiPutCourseDetail:q,apiPutCourseSurveys:L,apiDeleteCourseSurveys:S}=K,{apiGetAssistantList:I}=W,A=j(),F=z.useLoading(),k=$([]),C=$([{id:"list-home-list",name:"\u8AB2\u7A0B\u8A2D\u5B9A",target:"list-home",active:!0,danger:!1,element:null},{id:"list-udemy-list",name:"Udemy \u8A2D\u5B9A",target:"udemy_info",active:!1,danger:!1,element:null},{id:"list-teachable-list",name:"Teachable \u8A2D\u5B9A",target:"teachable_info",active:!1,danger:!1,element:null},{id:"list-lectures-list",name:"\u7AE0\u7BC0\u5C0D\u61C9",target:"list-lectures",active:!1,danger:!1,element:null},{id:"list-surveys-list",name:"\u8A55\u50F9\u8A2D\u5B9A",target:"list-surveys",active:!1,danger:!1,element:null}]),s=U({teachable_info:{},udemy_info:{},surveys_info:{},default_assistants:[{}],lectures:[]}),x=U([]),g=async i=>{var m,d;const a=F.show();try{const{course:n}=await M(i),h=n.default_assistants;s.value={...n,default_assistants:h.length===0?[{user_id:""}]:h}}catch(n){b("danger","\u53D6\u5F97\u8AB2\u7A0B\u5931\u6557",`${(m=n.response.data)==null?void 0:m.statusCode}:${(d=n.response.data)==null?void 0:d.message}`)}finally{a.hide()}},N=async i=>{var m,d;const a={name:s.value.name};s.value.default_assistants&&(a.default_assistant_user_id=s.value.default_assistants[0].user_id);try{await q(i,a),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u8AB2\u7A0B"),g(i)}catch(n){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${(m=n.response.data)==null?void 0:m.statusCode}:${(d=n.response.data)==null?void 0:d.message}`)}},D=async i=>{const a={review_threshold_sec:s.value.review_threshold_sec||1200,percent_complete_threshold_of_review:s.value.percent_complete_threshold_of_review||5};try{await L(i,a),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u8AB2\u7A0B\u8A55\u50F9"),g(i)}catch(m){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${m.response.data.statusCode}:${m.response.data.message}`)}},E=async i=>{try{await S(i),b("success","\u66F4\u65B0\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u95DC\u9589\u8AB2\u7A0B\u8A55\u50F9"),g(i)}catch(a){b("danger","\u66F4\u65B0\u8AB2\u7A0B\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}},B=async()=>{try{const{assistants:i}=await I();x.value=i}catch(i){b("danger","\u7372\u53D6\u52A9\u6559\u5217\u8868\u5931\u6557",`${i.response.data.statusCode}:${i.response.data.message}`)}};H(()=>{const{id:i}=A.params;g(i),B(),J(k,C)});const G=(i,a)=>{let m=!1;return a.forEach(d=>{i===d&&(m=!s.value[d])}),m};return(i,a)=>{const m=w("router-link"),d=w("Field"),n=w("ErrorMessage"),h=w("VForm");return r(),c("div",X,[e("header",Y,[e("nav",Z,[e("ol",ee,[e("li",se,[o(m,{to:"/admin/courses"},{default:y(()=>[P(" \u8AB2\u7A0B\u7BA1\u7406 ")]),_:1})]),ae])]),te]),e("div",le,[e("div",oe,[e("div",ie,[(r(!0),c(v,null,f(C,t=>(r(),c("a",{id:t.id,class:_(["list-group-item list-group-item-action",{active:t.active,disabled:G(t.target,["udemy_info","teachable_info"])}]),href:`#${t.target}`,role:"tab","aria-controls":t.target,key:t.id,ref_for:!0,ref:l=>k.push(l),onClick:R(l=>t.element.show(),["prevent"])},p(t.name),11,de))),128))])]),e("div",ne,[e("div",re,[e("div",ce,[e("div",ue,[me,e("div",_e,[o(h,{onSubmit:a[2]||(a[2]=t=>N(s.value.id))},{default:y(({errors:t,invalid:l})=>[e("div",be,[he,o(d,{id:"name",modelValue:s.value.name,"onUpdate:modelValue":a[0]||(a[0]=u=>s.value.name=u),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",ve,[fe,T(e("select",{id:"assistants","onUpdate:modelValue":a[1]||(a[1]=u=>s.value.default_assistants[0].user_id=u),name:"\u9810\u8A2D\u52A9\u6559",class:"form-control"},[pe,(r(!0),c(v,null,f(x.value,u=>(r(),c("option",{key:u.user_id,value:u.user_id},p(u.nickname),9,ye))),128))],512),[[O,s.value.default_assistants[0].user_id]])]),e("div",ge,[e("button",{type:"submit",class:"btn btn-primary",disabled:l}," \u5132\u5B58 ",8,we)])]),_:1})])])]),s.value.udemy_info?(r(),c("div",Ve,[e("div",ke,[Ce,e("div",xe,[o(h,null,{default:y(({errors:t})=>[e("div",De,[$e,o(d,{id:"udemy-name",modelValue:s.value.udemy_info.name,"onUpdate:modelValue":a[3]||(a[3]=l=>s.value.udemy_info.name=l),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",Ue,[Te,e("div",{class:"bg-light p-3",innerHTML:s.value.udemy_info.description},null,8,Me)]),e("div",qe,[Le,o(d,{id:"abbr-name",modelValue:s.value.udemy_info.headline,"onUpdate:modelValue":a[4]||(a[4]=l=>s.value.udemy_info.headline=l),name:"\u8AB2\u7A0B\u7E2E\u5BEB",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u7E2E\u5BEB}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u7E2E\u5BEB",class:"invalid-feedback"})]),e("div",Se,[Ie,o(d,{id:"amount",modelValue:s.value.udemy_info.enrollments_count,"onUpdate:modelValue":a[5]||(a[5]=l=>s.value.udemy_info.enrollments_count=l),name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),s.value.teachable_info?(r(),c("div",Ae,[e("div",Fe,[Ne,e("div",Ee,[o(h,null,{default:y(({errors:t})=>[e("div",Be,[Ge,o(d,{id:"teachableId",modelValue:s.value.teachable_info.id,"onUpdate:modelValue":a[6]||(a[6]=l=>s.value.teachable_info.id=l),name:"Teachable ID",type:"text",class:_(["form-control",{"is-invalid":t["Teachable ID"]}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"Teachable ID",class:"invalid-feedback"})]),e("div",je,[ze,o(d,{id:"teachableName",modelValue:s.value.teachable_info.name,"onUpdate:modelValue":a[7]||(a[7]=l=>s.value.teachable_info.name=l),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",He,[Pe,o(d,{id:"teachableAmount",modelValue:s.value.teachable_info.enrollments_count,"onUpdate:modelValue":a[8]||(a[8]=l=>s.value.teachable_info.enrollments_count=l),name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",type:"text",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578}]),rules:"required",readonly:""},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u8A3B\u518A\u4EBA\u6578",class:"invalid-feedback"})])]),_:1})])])])):V("",!0),e("div",Re,[e("div",Oe,[Qe,e("div",Je,[e("div",Ke,[e("div",We,[e("ol",Xe,[(r(!0),c(v,null,f(s.value.lectures,t=>(r(),c("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",Ye,[e("div",Ze,p(t.name),1),e("ul",es,[(r(!0),c(v,null,f(t.sub_lectures,l=>(r(),c("li",{key:l.id,class:"list-group-item"},p(l.hasTeachable?l.name:"-"),1))),128))])])]))),128))])]),e("div",ss,[e("ol",as,[(r(!0),c(v,null,f(s.value.lectures,t=>(r(),c("li",{key:t.id,class:"d-flex justify-content-between align-items-start"},[e("div",ts,[e("div",ls,p(t.name),1),e("ul",os,[(r(!0),c(v,null,f(t.sub_lectures,l=>(r(),c("li",{key:l.id,class:"list-group-item"},p(l.hasUdemy?l.name:"-"),1))),128))])])]))),128))])])])])])]),e("div",is,[e("div",ds,[ns,e("div",rs,[o(h,{onSubmit:a[13]||(a[13]=t=>D(s.value.id))},{default:y(({errors:t,invalid:l})=>[e("div",cs,[us,e("div",ms,[T(e("input",{id:"flexSwitchCheckDefault","onUpdate:modelValue":a[9]||(a[9]=u=>s.value.enable_review=u),class:"form-check-input",type:"checkbox",role:"switch",onClick:a[10]||(a[10]=u=>s.value.enable_review?E(s.value.id):D(s.value.id))},null,512),[[Q,s.value.enable_review]]),_s])]),s.value.enable_review?(r(),c(v,{key:0},[e("div",bs,[hs,o(d,{id:"course-seconds",modelValue:s.value.review_threshold_sec,"onUpdate:modelValue":a[11]||(a[11]=u=>s.value.review_threshold_sec=u),modelModifiers:{number:!0},name:"\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6",type:"number",min:"1",class:_(["form-control",{"is-invalid":t.\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6}]),rules:"required"},null,8,["modelValue","class"]),vs,o(n,{name:"\u8A72\u8AB2\u7A0B\u53EF\u88AB\u8A55\u50F9\u7684\u6642\u6578\u9577\u5EA6",class:"invalid-feedback"})]),e("div",fs,[ps,o(d,{id:"course-completion",modelValue:s.value.percent_complete_threshold_of_review,"onUpdate:modelValue":a[12]||(a[12]=u=>s.value.percent_complete_threshold_of_review=u),modelModifiers:{number:!0},name:"\u8AB2\u7A0B\u5B8C\u6210\u5EA6",type:"number",min:"1",max:"100",class:_(["form-control",{"is-invalid":t.\u8AB2\u7A0B\u5B8C\u6210\u5EA6}]),rules:"required"},null,8,["modelValue","class"]),o(n,{name:"\u8AB2\u7A0B\u5B8C\u6210\u5EA6",class:"invalid-feedback"})])],64)):V("",!0),s.value.enable_review?(r(),c("div",ys,[e("button",{type:"submit",class:"btn btn-primary",disabled:l}," \u7DE8\u8F2F ",8,gs)])):V("",!0)]),_:1})])])])])])])])}}};export{$s as default}; diff --git a/assets/CourseList.264283dd.js b/assets/CourseList.264283dd.js new file mode 100644 index 0000000..1c45f78 --- /dev/null +++ b/assets/CourseList.264283dd.js @@ -0,0 +1 @@ +import{r,o as F,B as T,z as y,a as o,e as U,f as C,A as h,M as q,b as e,E as G,w as j,c as l,F as V,q as N,h as L,Q as I,x as M,D as O,p as w,g as A}from"./index.8b9bb582.js";import{a as B}from"./courses.c968273a.js";import{a as P}from"./assistant.c4224b31.js";const Q={class:"mb-3"},H=e("label",{for:"addName",class:"form-label text-dark"},"\u8AB2\u7A0B\u540D\u7A31",-1),J={class:"mb-3"},K=e("label",{for:"addAssistants",class:"form-label text-dark"},"\u9810\u8A2D\u52A9\u6559",-1),W=e("option",{value:"",disabled:""}," \u8ACB\u9078\u64C7\u52A9\u6559 ",-1),X=["value"],Y=["disabled"],Z={__name:"CreateCourseModal",emits:["createCourseMethod"],setup(D,{expose:g,emit:f}){const{apiPostCreateCourse:b}=B,{apiGetAssistantList:v}=P,c=r(),p=r(""),u=r(""),n=async()=>{try{const s={name:p.value};u.value&&(s.default_assistant_user_id=u.value),await b(s),f("createCourseMethod",{target:"import",type:"\u6210\u529F"}),c.value.resetForm()}catch(s){f("createCourseMethod",{target:"import",type:"\u5931\u6557",error:`${s.response.status}:${s.response.statusText}`})}},a=r([]),k=async()=>{var s,d;try{const{assistants:m}=await v();a.value=m}catch(m){M("danger","\u7372\u53D6\u52A9\u6559\u5217\u8868\u5931\u6557",`${(s=m.response.data)==null?void 0:s.statusCode}:${(d=m.response.data)==null?void 0:d.message}`)}},t=r(null),_=r(null);return F(()=>{k(),_.value=new T(t.value.hModal)}),g({openModal:()=>{_.value.show()},hideModal:()=>{_.value.hide()}}),(s,d)=>{const m=y("Field"),E=y("ErrorMessage"),R=y("VForm");return o(),U(R,{ref_key:"refs",ref:c,onSubmit:n},{default:C(({errors:z,meta:S})=>[h(q,{id:"createCourseModal",ref_key:"createCourseModalRef",ref:t,"has-footer":!0,title:"\u65B0\u589E\u8AB2\u7A0B","class-list":""},{body:C(()=>[e("div",Q,[H,h(m,{id:"addName",modelValue:p.value,"onUpdate:modelValue":d[0]||(d[0]=i=>p.value=i),name:"\u8AB2\u7A0B\u540D\u7A31",type:"text",class:G(["form-control",{"is-invalid":z.\u8AB2\u7A0B\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),h(E,{name:"\u8AB2\u7A0B\u540D\u7A31",class:"invalid-feedback"})]),e("div",J,[K,j(e("select",{id:"addAssistants","onUpdate:modelValue":d[1]||(d[1]=i=>u.value=i),name:"\u9810\u8A2D\u52A9\u6559",class:"form-control text-dark"},[W,(o(!0),l(V,null,N(a.value,i=>(o(),l("option",{key:i.user_id,value:i.user_id},L(i.nickname),9,X))),128))],512),[[I,u.value]])])]),footer:C(()=>[e("button",{type:"submit",disabled:!S.valid,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,Y)]),_:2},1536)]),_:1},512)}}},ee={class:"about px-4 mt-4 position-relative"},te={class:"d-flex align-items-center justify-content-between"},se=e("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u7BA1\u7406 ",-1),ae=e("hr",null,null,-1),oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ne={class:"card-body p-0"},re={class:"table-responsive"},le={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},de=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u8AB2\u7A0B\u540D\u7A31 "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u52A9\u6559\u6578 "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u5C0D\u61C9\u7684\u8AB2\u7A0B "),e("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1),ie={class:"text-nowrap"},ce={scope:"row",class:"ps-4"},ue={class:"fs-6 mb-0"},_e=["href"],me=["href"],pe={class:"pe-3"},he=e("span",{class:"material-icons align-middle fs-6"},"edit",-1),ye={__name:"CourseList",setup(D){const{apiGetCourseList:g}=B,f=O.useLoading(),b=r([]),v=async()=>{const n=f.show();try{const{courses:a}=await g();b.value=a}catch(a){M("danger","\u53D6\u5F97\u8AB2\u7A0B\u5217\u8868\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{n.hide()}};F(v);const c=r(null),p=()=>{c.value.openModal()},u=n=>{n.type==="\u6210\u529F"?M("success","\u5EFA\u7ACB\u8AB2\u7A0B\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u8AB2\u7A0B"):n.type==="\u5931\u6557"&&M("danger","\u5EFA\u7ACB\u8AB2\u7A0B\u5931\u6557",n.error),c.value.hideModal(),v()};return(n,a)=>{const k=y("router-link");return o(),l("div",ee,[e("header",te,[se,e("button",{class:"btn btn-primary",onClick:a[0]||(a[0]=t=>p())}," \u65B0\u589E\u8AB2\u7A0B ")]),ae,e("div",oe,[e("div",ne,[e("div",re,[e("table",le,[de,e("tbody",ie,[(o(!0),l(V,null,N(b.value,t=>{var _,x,$,s;return o(),l("tr",{key:t.id,class:"align-middle"},[e("td",ce,[e("h5",ue,L(t.name),1)]),e("td",null,L(t.assistant_count),1),e("td",null,[(_=t.teachable_info)!=null&&_.id?(o(),l("a",{key:0,href:t.teachable_info.url,target:"_blank"}," Teachable \u9023\u7D50 ",8,_e)):w("",!0),((x=t.udemy_info)==null?void 0:x.id)&&(($=t.teachable_info)==null?void 0:$.id)?(o(),l(V,{key:1},[A(" | ")],64)):w("",!0),(s=t.udemy_info)!=null&&s.id?(o(),l("a",{key:2,href:t.udemy_info.url,target:"_blank"}," Udemy \u9023\u7D50 ",8,me)):w("",!0)]),e("td",pe,[h(k,{to:`/admin/courses/${t.id}`,class:"btn btn-sm btn-outline-gray"},{default:C(()=>[he,A("\u7DE8\u8F2F ")]),_:2},1032,["to"])])])}),128))])])])])]),h(Z,{ref_key:"createCourseModalComponentRef",ref:c,onCreateCourseMethod:u},null,512)])}}};export{ye as default}; diff --git a/assets/CoursesSurveys.8ca81c48.css b/assets/CoursesSurveys.8ca81c48.css new file mode 100644 index 0000000..a18f6aa --- /dev/null +++ b/assets/CoursesSurveys.8ca81c48.css @@ -0,0 +1 @@ +.progress[data-v-1bd672ba]{border-radius:24px}.progress-bar[data-v-1bd672ba]:first-child{border-top-left-radius:24px;border-bottom-left-radius:24px}.progress-bar[data-v-1bd672ba]:last-child{border-top-right-radius:24px;border-bottom-right-radius:24px}.progress-bar-text[data-v-1bd672ba]{left:0;right:0;bottom:-20px}[data-v-1bd672ba] span.vue-star-rating-star{display:flex} diff --git a/assets/CoursesSurveys.a80ce5fa.js b/assets/CoursesSurveys.a80ce5fa.js new file mode 100644 index 0000000..edcf4e4 --- /dev/null +++ b/assets/CoursesSurveys.a80ce5fa.js @@ -0,0 +1,6 @@ +import{a0 as K,V as J,_ as X,n as Y,j as q,m as Z,z as Q,a as M,c as j,b as f,A as W,f as $,h as N,i as P,F as D,q as F,$ as U,g as tt,p as H,R as et,S as rt}from"./index.8b9bb582.js";var G={exports:{}};(function(T){T.exports=function(_){var c={};function s(e){if(c[e])return c[e].exports;var l=c[e]={i:e,l:!1,exports:{}};return _[e].call(l.exports,l,l.exports,s),l.l=!0,l.exports}return s.m=_,s.c=c,s.d=function(e,l,p){s.o(e,l)||Object.defineProperty(e,l,{enumerable:!0,get:p})},s.r=function(e){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,l){if(l&1&&(e=s(e)),l&8||l&4&&typeof e=="object"&&e&&e.__esModule)return e;var p=Object.create(null);if(s.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:e}),l&2&&typeof e!="string")for(var r in e)s.d(p,r,function(h){return e[h]}.bind(null,r));return p},s.n=function(e){var l=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(l,"a",l),l},s.o=function(e,l){return Object.prototype.hasOwnProperty.call(e,l)},s.p="",s(s.s="fb15")}({"0a04":function(_,c,s){var e=s("4bad");c=e(!1),c.push([_.i,".vue-star-rating-star[data-v-f675a548]{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-tap-highlight-color:transparent}.vue-star-rating-pointer[data-v-f675a548]{cursor:pointer}.vue-star-rating[data-v-f675a548]{display:flex;align-items:center}.vue-star-rating-inline[data-v-f675a548]{display:inline-flex}.vue-star-rating-rating-text[data-v-f675a548]{margin-left:7px}.vue-star-rating-rtl[data-v-f675a548]{direction:rtl}.vue-star-rating-rtl .vue-star-rating-rating-text[data-v-f675a548]{margin-right:10px;direction:rtl}.sr-only[data-v-f675a548]{position:absolute;left:-10000px;top:auto;width:1px;height:1px;overflow:hidden}",""]),_.exports=c},"0fde":function(_,c,s){var e=s("4bad");c=e(!1),c.push([_.i,".vue-star-rating-star[data-v-11edf2d6]{overflow:visible!important}.vue-star-rating-star-rotate[data-v-11edf2d6]{transition:all .25s}.vue-star-rating-star-rotate[data-v-11edf2d6]:hover{transition:transform .25s;transform:rotate(-15deg) scale(1.3)}",""]),_.exports=c},"499e":function(_,c,s){s.r(c),s.d(c,"default",function(){return b});function e(i,o){for(var t=[],u={},n=0;nt.parts.length&&(u.parts.length=t.parts.length)}else{for(var a=[],n=0;n([\\d\\D]*?)<\\/script>[\\d\\D]*","i"),x=b.replace(O,"$1").trim());for(var w=0;w[Object(r.createVNode)("span",null,"Rated "+Object(r.toDisplayString)(n.selectedRating)+" stars out of "+Object(r.toDisplayString)(t.maxRating),1)])]),Object(r.createVNode)("div",{class:"vue-star-rating",onMouseleave:o[2]||(o[2]=(...A)=>a.resetRating(...A))},[(Object(r.openBlock)(!0),Object(r.createBlock)(r.Fragment,null,Object(r.renderList)(t.maxRating,A=>(Object(r.openBlock)(),Object(r.createBlock)("span",{key:A,class:[{"vue-star-rating-pointer":!t.readOnly},"vue-star-rating-star"],style:{"margin-right":a.margin+"px"}},[Object(r.createVNode)(g,{fill:n.fillLevel[A-1],size:t.starSize,points:t.starPoints,"star-id":A,step:n.step,"active-color":a.currentActiveColor,"inactive-color":t.inactiveColor,"border-color":t.borderColor,"active-border-color":a.currentActiveBorderColor,"border-width":t.borderWidth,"rounded-corners":t.roundedCorners,rtl:t.rtl,glow:t.glow,"glow-color":t.glowColor,animate:t.animate,"onStar-selected":o[1]||(o[1]=I=>a.setRating(I,!0)),"onStar-mouse-move":a.setRating},null,8,["fill","size","points","star-id","step","active-color","inactive-color","border-color","active-border-color","border-width","rounded-corners","rtl","glow","glow-color","animate","onStar-mouse-move"])],6))),128)),t.showRating?(Object(r.openBlock)(),Object(r.createBlock)("span",{key:0,class:["vue-star-rating-rating-text",t.textClass]},Object(r.toDisplayString)(a.formattedRating),3)):Object(r.createCommentVNode)("",!0)],32)],2)}),R=Object(r.withScopeId)("data-v-11edf2d6");Object(r.pushScopeId)("data-v-11edf2d6");const S=Object(r.createVNode)("feMerge",null,[Object(r.createVNode)("feMergeNode",{in:"coloredBlur"}),Object(r.createVNode)("feMergeNode",{in:"SourceGraphic"})],-1);Object(r.popScopeId)();const B=R(function(i,o,t,u,n,a){return Object(r.openBlock)(),Object(r.createBlock)("svg",{class:["vue-star-rating-star",{"vue-star-rating-star-rotate":a.shouldAnimate}],height:a.starSize,width:a.starSize,viewBox:a.viewBox,onMousemove:o[1]||(o[1]=(...g)=>a.mouseMoving(...g)),onClick:o[2]||(o[2]=(...g)=>a.selected(...g)),onTouchstart:o[3]||(o[3]=(...g)=>a.touchStart(...g)),onTouchend:o[4]||(o[4]=(...g)=>a.touchEnd(...g))},[Object(r.createVNode)("linearGradient",{id:n.grad,x1:"0",x2:"100%",y1:"0",y2:"0"},[Object(r.createVNode)("stop",{offset:a.starFill,"stop-color":t.rtl?a.getColor(t.inactiveColor):a.getColor(t.activeColor),"stop-opacity":t.rtl?a.getOpacity(t.inactiveColor):a.getOpacity(t.activeColor)},null,8,["offset","stop-color","stop-opacity"]),Object(r.createVNode)("stop",{offset:a.starFill,"stop-color":t.rtl?a.getColor(t.activeColor):a.getColor(t.inactiveColor),"stop-opacity":t.rtl?a.getOpacity(t.activeColor):a.getOpacity(t.inactiveColor)},null,8,["offset","stop-color","stop-opacity"])],8,["id"]),Object(r.createVNode)("filter",{id:n.glowId,height:"130%",width:"130%",filterUnits:"userSpaceOnUse"},[Object(r.createVNode)("feGaussianBlur",{stdDeviation:t.glow,result:"coloredBlur"},null,8,["stdDeviation"]),S],8,["id"]),Object(r.withDirectives)(Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId,stroke:t.glowColor,filter:"url(#"+n.glowId+")","stroke-width":a.border},null,8,["points","fill","stroke","filter","stroke-width"]),[[r.vShow,t.glowColor&&t.glow>0&&t.fill>0]]),Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId,stroke:a.getBorderColor,"stroke-width":a.border,"stroke-linejoin":a.strokeLinejoin},null,8,["points","fill","stroke","stroke-width","stroke-linejoin"]),Object(r.createVNode)("polygon",{points:a.starPointsToString,fill:a.gradId},null,8,["points","fill"])],42,["height","width","viewBox"])});var m=s("d4aa"),b=s.n(m),O={name:"Star",props:{fill:{type:Number,default:0},points:{type:Array,default(){return[]}},size:{type:Number,default:50},starId:{type:Number,required:!0},activeColor:{type:String,required:!0},inactiveColor:{type:String,required:!0},borderColor:{type:String,default:"#000"},activeBorderColor:{type:String,default:"#000"},borderWidth:{type:Number,default:0},roundedCorners:{type:Boolean,default:!1},rtl:{type:Boolean,default:!1},glow:{type:Number,default:0},glowColor:{type:String,default:null,required:!1},animate:{type:Boolean,default:!1}},emits:["star-mouse-move","star-selected"],data(){return{starPoints:[19.8,2.2,6.6,43.56,39.6,17.16,0,17.16,33,43.56],grad:"",glowId:"",isStarActive:!0}},computed:{starPointsToString(){return this.starPoints.join(",")},gradId(){return"url(#"+this.grad+")"},starSize(){const d=this.roundedCorners&&this.borderWidth<=0?parseInt(this.size)-parseInt(this.border):this.size;return parseInt(d)+parseInt(this.border)},starFill(){return this.rtl?100-this.fill+"%":this.fill+"%"},border(){return this.roundedCorners&&this.borderWidth<=0?6:this.borderWidth},getBorderColor(){return this.roundedCorners&&this.borderWidth<=0?this.fill<=0?this.inactiveColor:this.activeColor:this.fill<=0?this.borderColor:this.activeBorderColor},maxSize(){return this.starPoints.reduce(function(d,i){return Math.max(d,i)})},viewBox(){return"0 0 "+this.maxSize+" "+this.maxSize},shouldAnimate(){return this.animate&&this.isStarActive},strokeLinejoin(){return this.roundedCorners?"round":"miter"}},created(){this.starPoints=this.points.length?this.points:this.starPoints,this.calculatePoints(),this.grad=this.getRandomId(),this.glowId=this.getRandomId()},methods:{mouseMoving(d){d.touchAction!=="undefined"&&this.$emit("star-mouse-move",{event:d,position:this.getPosition(d),id:this.starId})},touchStart(){this.$nextTick(()=>{this.isStarActive=!0})},touchEnd(){this.$nextTick(()=>{this.isStarActive=!1})},getPosition(d){var i=.92*this.size;const o=this.rtl?Math.min(d.offsetX,45):Math.max(d.offsetX,1);var t=Math.round(100/i*o);return Math.min(t,100)},selected(d){this.$emit("star-selected",{id:this.starId,position:this.getPosition(d)})},getRandomId(){return Math.random().toString(36).substring(7)},calculatePoints(){this.starPoints=this.starPoints.map((d,i)=>{const o=i%2===0?this.border*1.5:0;return this.size/this.maxSize*d+o})},getColor(d){return new b.a(d).parseAlphaColor().color},getOpacity(d){return new b.a(d).parseAlphaColor().opacity}}};s("d1b1"),O.render=B,O.__scopeId="data-v-11edf2d6";var x=O,y={name:"VueStarRating",components:{Star:x},props:{increment:{type:Number,default:1},rating:{type:Number,default:0},roundStartRating:{type:Boolean,default:!0},activeColor:{type:[String,Array],default:"#ffd055"},inactiveColor:{type:String,default:"#d8d8d8"},maxRating:{type:Number,default:5},starPoints:{type:Array,default(){return[]}},starSize:{type:Number,default:50},showRating:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},textClass:{type:String,default:""},inline:{type:Boolean,default:!1},borderColor:{type:String,default:"#999"},activeBorderColor:{type:[String,Array],default:null},borderWidth:{type:Number,default:0},roundedCorners:{type:Boolean,default:!1},padding:{type:Number,default:0},rtl:{type:Boolean,default:!1},fixedPoints:{type:Number,default:null},glow:{type:Number,default:0},glowColor:{type:String,default:"#fff"},clearable:{type:Boolean,default:!1},activeOnClick:{type:Boolean,default:!1},animate:{type:Boolean,default:!1}},emits:["update:rating","hover:rating"],data(){return{step:0,fillLevel:[],currentRating:0,selectedRating:0,ratingSelected:!1}},computed:{formattedRating(){return this.fixedPoints===null?this.currentRating:this.currentRating.toFixed(this.fixedPoints)},shouldRound(){return this.ratingSelected||this.roundStartRating},margin(){return this.padding+this.borderWidth},activeColors(){return Array.isArray(this.activeColor)?this.padColors(this.activeColor,this.maxRating,this.activeColor.slice(-1)[0]):new Array(this.maxRating).fill(this.activeColor)},currentActiveColor(){return this.activeOnClick?this.selectedRating>0?this.activeColors[Math.ceil(this.selectedRating)-1]:this.inactiveColor:this.currentRating>0?this.activeColors[Math.ceil(this.currentRating)-1]:this.inactiveColor},activeBorderColors(){if(Array.isArray(this.activeBorderColor))return this.padColors(this.activeBorderColor,this.maxRating,this.activeBorderColor.slice(-1)[0]);let d=this.activeBorderColor?this.activeBorderColor:this.borderColor;return new Array(this.maxRating).fill(d)},currentActiveBorderColor(){return this.activeOnClick?this.selectedRating>0?this.activeBorderColors[Math.ceil(this.selectedRating)-1]:this.borderColor:this.currentRating>0?this.activeBorderColors[Math.ceil(this.currentRating)-1]:this.borderColor}},watch:{rating(d){this.currentRating=d,this.selectedRating=d,this.createStars(this.shouldRound)}},created(){this.step=this.increment*100,this.currentRating=this.rating,this.selectedRating=this.currentRating,this.createStars(this.roundStartRating)},methods:{setRating(d,i){if(!this.readOnly){const o=this.rtl?(100-d.position)/100:d.position/100;this.currentRating=(d.id+o-1).toFixed(2),this.currentRating=this.currentRating>this.maxRating?this.maxRating:this.currentRating,i?(this.createStars(!0,!0),this.clearable&&this.currentRating===this.selectedRating?this.selectedRating=0:this.selectedRating=this.currentRating,this.$emit("update:rating",this.selectedRating),this.ratingSelected=!0):(this.createStars(!0,!this.activeOnClick),this.$emit("hover:rating",this.currentRating))}},resetRating(){this.readOnly||(this.currentRating=this.selectedRating,this.createStars(this.shouldRound))},createStars(d=!0,i=!0){d&&this.round();for(var o=0;o1?100:(this.currentRating-o)*100),i&&(this.fillLevel[o]=Math.round(t))}},round(){var d=1/this.increment;this.currentRating=Math.min(this.maxRating,Math.ceil(this.currentRating*d)/d)},padColors(d,i,o){return Object.assign(new Array(i).fill(o),d)}}};s("9ff5"),y.render=C,y.__scopeId="data-v-f675a548";var w=y,z=w;c.default=z}})})(G);const ot=J(G.exports);const L=T=>(et("data-v-1bd672ba"),T=T(),rt(),T),it={class:"card"},at={class:"card-header bg-primary"},st={class:"h4 m-2"},nt={class:"card-body bg-light"},lt={class:"row"},dt={class:"col-md-4 d-flex"},ct={class:"card w-50 shadow-sm"},ut=L(()=>f("div",{class:"card-header bg-white text-muted border-bottom-0"}," \u8A55\u50F9 ",-1)),pt={class:"card-body"},_t={class:"card w-50 ms-4 shadow-sm"},ht=L(()=>f("div",{class:"card-header bg-white text-muted border-bottom-0"}," \u8AB2\u7A0B\u5E73\u5747\u5206\u6578 ",-1)),gt={class:"card-body"},ft={class:"col-md-8"},vt={class:"list-unstyled"},bt={class:"progress w-100 me-3 rounded-pill"},mt={class:"mb-0 text-end",style:{width:"60px"}},yt=L(()=>f("h5",{class:"text-muted mb-0 mt-5"}," \u8AB2\u7A0B\u7D30\u7BC0\u8868\u73FE ",-1)),Ct={class:"list-unstyled mt-3"},St={class:"me-4 mb-0 w-25"},Rt={class:"progress w-100 overflow-visible",style:{height:"24px"}},xt={class:"position-absolute text-dark progress-bar-text"},wt={key:0,style:{width:"60px"},class:"flex-shrink-0 mb-0 ms-4 text-end"},Ot={key:1,style:{width:"60px"},class:"flex-shrink-0 mb-0 ms-4 text-end"},Bt={__name:"CoursesSurveys",props:{data:{type:Object,default(){return{}}}},setup(T){const _=T,c={starSize:24,readOnly:!0,activeColor:"#2A8356",showRating:!1},{id:s,name:e,review_count:l,rating_distribution:p,average_rating:r,questionnaires:h}=Y(_.data),v=q(()=>p.value.reverse()),C=Z(["#DADEDD","#B5BEBB","#798B86","#3D5950"]);return(R,S)=>{const B=Q("RouterLink");return M(),j("div",it,[f("div",at,[W(B,{class:"text-white text-decoration-none",to:{name:"SurveysDetail",params:{id:P(s)}}},{default:$(()=>[f("h2",st,N(P(e)),1)]),_:1},8,["to"])]),f("div",nt,[f("div",lt,[f("div",dt,[f("div",ct,[ut,f("div",pt,[f("h2",null,N(P(l)?`${P(l)} \u5247`:"\u7121"),1)])]),f("div",_t,[ht,f("div",gt,[f("h2",null,N(P(r)||"\u7121"),1)])])]),f("div",ft,[f("ul",vt,[(M(!0),j(D,null,F(P(v),(m,b)=>(M(),j("li",{key:`progress-bar${b}`,class:"d-flex align-items-center mb-1"},[f("div",bt,[f("div",{class:"progress-bar bg-primary",role:"progressbar",style:U(`width: ${m.percent}%`)},null,4)]),W(P(ot),{rating:m.rating,"star-size":c.starSize,"read-only":c.readOnly,"show-rating":c.showRating,"active-color":c.activeColor},null,8,["rating","star-size","read-only","show-rating","active-color"]),f("p",mt,N(Math.floor(m.percent))+"% ",1)]))),128))])])]),P(h).length?(M(),j(D,{key:0},[yt,f("ul",Ct,[(M(!0),j(D,null,F(P(h),(m,b)=>{var O;return M(),j("li",{key:`questionnaires${b}`,class:"mb-4 d-flex align-items-center"},[f("p",St,N(m.question),1),f("div",Rt,[(M(!0),j(D,null,F(m.rating_distribution,(x,y)=>(M(),j(D,null,[Number(x.percent)?(M(),j("div",{key:P(p)+y,class:"progress-bar position-relative overflow-visible",style:U(`width: ${x.percent}%; background-color: ${P(C)[y]};`)},[tt(N(Math.floor(x.percent))+"%("+N(x.count)+") ",1),f("span",xt,N(x.rating)+" \u5206",1)],4)):H("",!0)],64))),256))]),(O=m.rating_distribution[b])!=null&&O.avg_rating?(M(),j("p",wt,N(m.rating_distribution[b].avg_rating)+" \u5206 ",1)):(M(),j("p",Ot," \u7121 "))])}),128))])],64)):H("",!0)])])}}},It=X(Bt,[["__scopeId","data-v-1bd672ba"]]);export{It as C,ot as V}; diff --git a/assets/Editor.7c035c32.js b/assets/Editor.7c035c32.js new file mode 100644 index 0000000..a20543d --- /dev/null +++ b/assets/Editor.7c035c32.js @@ -0,0 +1,54 @@ +import{N as Te,V as nr,W as rr,o as ir,X as or,r as $t,s as Mn,Y as ar,Z as lr,a as ur,e as sr,i as fr,x as cr,d as Hn}from"./index.8b9bb582.js";var Vn={exports:{}};/*! + * Quill Editor v1.3.7 + * https://quilljs.com/ + * Copyright (c) 2014, Jason Chen + * Copyright (c) 2013, salesforce.com + */(function(R,B){(function(d,s){R.exports=s()})(typeof self<"u"?self:Te,function(){return function(y){var d={};function s(E){if(d[E])return d[E].exports;var m=d[E]={i:E,l:!1,exports:{}};return y[E].call(m.exports,m,m.exports,s),m.l=!0,m.exports}return s.m=y,s.c=d,s.d=function(E,m,_){s.o(E,m)||Object.defineProperty(E,m,{configurable:!1,enumerable:!0,get:_})},s.n=function(E){var m=E&&E.__esModule?function(){return E.default}:function(){return E};return s.d(m,"a",m),m},s.o=function(E,m){return Object.prototype.hasOwnProperty.call(E,m)},s.p="",s(s.s=109)}([function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(17),m=s(18),_=s(19),p=s(45),g=s(46),h=s(47),o=s(48),e=s(49),t=s(12),f=s(32),a=s(33),u=s(31),r=s(1),i={Scope:r.Scope,create:r.create,find:r.find,query:r.query,register:r.register,Container:E.default,Format:m.default,Leaf:_.default,Embed:o.default,Scroll:p.default,Block:h.default,Inline:g.default,Text:e.default,Attributor:{Attribute:t.default,Class:f.default,Style:a.default,Store:u.default}};d.default=i},function(y,d,s){var E=this&&this.__extends||function(){var u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var c in i)i.hasOwnProperty(c)&&(r[c]=i[c])};return function(r,i){u(r,i);function c(){this.constructor=r}r.prototype=i===null?Object.create(i):(c.prototype=i.prototype,new c)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=function(u){E(r,u);function r(i){var c=this;return i="[Parchment] "+i,c=u.call(this,i)||this,c.message=i,c.name=c.constructor.name,c}return r}(Error);d.ParchmentError=m;var _={},p={},g={},h={};d.DATA_KEY="__blot";var o;(function(u){u[u.TYPE=3]="TYPE",u[u.LEVEL=12]="LEVEL",u[u.ATTRIBUTE=13]="ATTRIBUTE",u[u.BLOT=14]="BLOT",u[u.INLINE=7]="INLINE",u[u.BLOCK=11]="BLOCK",u[u.BLOCK_BLOT=10]="BLOCK_BLOT",u[u.INLINE_BLOT=6]="INLINE_BLOT",u[u.BLOCK_ATTRIBUTE=9]="BLOCK_ATTRIBUTE",u[u.INLINE_ATTRIBUTE=5]="INLINE_ATTRIBUTE",u[u.ANY=15]="ANY"})(o=d.Scope||(d.Scope={}));function e(u,r){var i=f(u);if(i==null)throw new m("Unable to create "+u+" blot");var c=i,n=u instanceof Node||u.nodeType===Node.TEXT_NODE?u:c.create(r);return new c(n,r)}d.create=e;function t(u,r){return r===void 0&&(r=!1),u==null?null:u[d.DATA_KEY]!=null?u[d.DATA_KEY].blot:r?t(u.parentNode,r):null}d.find=t;function f(u,r){r===void 0&&(r=o.ANY);var i;if(typeof u=="string")i=h[u]||_[u];else if(u instanceof Text||u.nodeType===Node.TEXT_NODE)i=h.text;else if(typeof u=="number")u&o.LEVEL&o.BLOCK?i=h.block:u&o.LEVEL&o.INLINE&&(i=h.inline);else if(u instanceof HTMLElement){var c=(u.getAttribute("class")||"").split(/\s+/);for(var n in c)if(i=p[c[n]],i)break;i=i||g[u.tagName]}return i==null?null:r&o.LEVEL&i.scope&&r&o.TYPE&i.scope?i:null}d.query=f;function a(){for(var u=[],r=0;r1)return u.map(function(n){return a(n)});var i=u[0];if(typeof i.blotName!="string"&&typeof i.attrName!="string")throw new m("Invalid definition");if(i.blotName==="abstract")throw new m("Cannot register abstract class");if(h[i.blotName||i.attrName]=i,typeof i.keyName=="string")_[i.keyName]=i;else if(i.className!=null&&(p[i.className]=i),i.tagName!=null){Array.isArray(i.tagName)?i.tagName=i.tagName.map(function(n){return n.toUpperCase()}):i.tagName=i.tagName.toUpperCase();var c=Array.isArray(i.tagName)?i.tagName:[i.tagName];c.forEach(function(n){(g[n]==null||i.className==null)&&(g[n]=i)})}return i}d.register=a},function(y,d,s){var E=s(51),m=s(11),_=s(3),p=s(20),g=String.fromCharCode(0),h=function(o){Array.isArray(o)?this.ops=o:o!=null&&Array.isArray(o.ops)?this.ops=o.ops:this.ops=[]};h.prototype.insert=function(o,e){var t={};return o.length===0?this:(t.insert=o,e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t))},h.prototype.delete=function(o){return o<=0?this:this.push({delete:o})},h.prototype.retain=function(o,e){if(o<=0)return this;var t={retain:o};return e!=null&&typeof e=="object"&&Object.keys(e).length>0&&(t.attributes=e),this.push(t)},h.prototype.push=function(o){var e=this.ops.length,t=this.ops[e-1];if(o=_(!0,{},o),typeof t=="object"){if(typeof o.delete=="number"&&typeof t.delete=="number")return this.ops[e-1]={delete:t.delete+o.delete},this;if(typeof t.delete=="number"&&o.insert!=null&&(e-=1,t=this.ops[e-1],typeof t!="object"))return this.ops.unshift(o),this;if(m(o.attributes,t.attributes)){if(typeof o.insert=="string"&&typeof t.insert=="string")return this.ops[e-1]={insert:t.insert+o.insert},typeof o.attributes=="object"&&(this.ops[e-1].attributes=o.attributes),this;if(typeof o.retain=="number"&&typeof t.retain=="number")return this.ops[e-1]={retain:t.retain+o.retain},typeof o.attributes=="object"&&(this.ops[e-1].attributes=o.attributes),this}}return e===this.ops.length?this.ops.push(o):this.ops.splice(e,0,o),this},h.prototype.chop=function(){var o=this.ops[this.ops.length-1];return o&&o.retain&&!o.attributes&&this.ops.pop(),this},h.prototype.filter=function(o){return this.ops.filter(o)},h.prototype.forEach=function(o){this.ops.forEach(o)},h.prototype.map=function(o){return this.ops.map(o)},h.prototype.partition=function(o){var e=[],t=[];return this.forEach(function(f){var a=o(f)?e:t;a.push(f)}),[e,t]},h.prototype.reduce=function(o,e){return this.ops.reduce(o,e)},h.prototype.changeLength=function(){return this.reduce(function(o,e){return e.insert?o+p.length(e):e.delete?o-e.delete:o},0)},h.prototype.length=function(){return this.reduce(function(o,e){return o+p.length(e)},0)},h.prototype.slice=function(o,e){o=o||0,typeof e!="number"&&(e=1/0);for(var t=[],f=p.iterator(this.ops),a=0;a0&&t.next(a.retain-u)}for(var r=new h(f);e.hasNext()||t.hasNext();)if(t.peekType()==="insert")r.push(t.next());else if(e.peekType()==="delete")r.push(e.next());else{var i=Math.min(e.peekLength(),t.peekLength()),c=e.next(i),n=t.next(i);if(typeof n.retain=="number"){var v={};typeof c.retain=="number"?v.retain=i:v.insert=c.insert;var O=p.attributes.compose(c.attributes,n.attributes,typeof c.retain=="number");if(O&&(v.attributes=O),r.push(v),!t.hasNext()&&m(r.ops[r.ops.length-1],v)){var A=new h(e.rest());return r.concat(A).chop()}}else typeof n.delete=="number"&&typeof c.retain=="number"&&r.push(n)}return r.chop()},h.prototype.concat=function(o){var e=new h(this.ops.slice());return o.ops.length>0&&(e.push(o.ops[0]),e.ops=e.ops.concat(o.ops.slice(1))),e},h.prototype.diff=function(o,e){if(this.ops===o.ops)return new h;var t=[this,o].map(function(i){return i.map(function(c){if(c.insert!=null)return typeof c.insert=="string"?c.insert:g;var n=i===o?"on":"with";throw new Error("diff() called "+n+" non-document")}).join("")}),f=new h,a=E(t[0],t[1],e),u=p.iterator(this.ops),r=p.iterator(o.ops);return a.forEach(function(i){for(var c=i[1].length;c>0;){var n=0;switch(i[0]){case E.INSERT:n=Math.min(r.peekLength(),c),f.push(r.next(n));break;case E.DELETE:n=Math.min(c,u.peekLength()),u.next(n),f.delete(n);break;case E.EQUAL:n=Math.min(u.peekLength(),r.peekLength(),c);var v=u.next(n),O=r.next(n);m(v.insert,O.insert)?f.retain(n,p.attributes.diff(v.attributes,O.attributes)):f.push(O).delete(n);break}c-=n}}),f.chop()},h.prototype.eachLine=function(o,e){e=e||` +`;for(var t=p.iterator(this.ops),f=new h,a=0;t.hasNext();){if(t.peekType()!=="insert")return;var u=t.peek(),r=p.length(u)-t.peekLength(),i=typeof u.insert=="string"?u.insert.indexOf(e,r)-r:-1;if(i<0)f.push(t.next());else if(i>0)f.push(t.next(i));else{if(o(f,t.next(1).attributes||{},a)===!1)return;a+=1,f=new h}}f.length()>0&&o(f,{},a)},h.prototype.transform=function(o,e){if(e=!!e,typeof o=="number")return this.transformPosition(o,e);for(var t=p.iterator(this.ops),f=p.iterator(o.ops),a=new h;t.hasNext()||f.hasNext();)if(t.peekType()==="insert"&&(e||f.peekType()!=="insert"))a.retain(p.length(t.next()));else if(f.peekType()==="insert")a.push(f.next());else{var u=Math.min(t.peekLength(),f.peekLength()),r=t.next(u),i=f.next(u);if(r.delete)continue;i.delete?a.push(i):a.retain(u,p.attributes.transform(r.attributes,i.attributes,e))}return a.chop()},h.prototype.transformPosition=function(o,e){e=!!e;for(var t=p.iterator(this.ops),f=0;t.hasNext()&&f<=o;){var a=t.peekLength(),u=t.peekType();if(t.next(),u==="delete"){o-=Math.min(a,o-f);continue}else u==="insert"&&(f"u"||s.call(t,u)},h=function(t,f){m&&f.name==="__proto__"?m(t,f.name,{enumerable:!0,configurable:!0,value:f.newValue,writable:!0}):t[f.name]=f.newValue},o=function(t,f){if(f==="__proto__")if(s.call(t,f)){if(_)return _(t,f).value}else return;return t[f]};y.exports=function e(){var t,f,a,u,r,i,c=arguments[0],n=1,v=arguments.length,O=!1;for(typeof c=="boolean"&&(O=c,c=arguments[1]||{},n=2),(c==null||typeof c!="object"&&typeof c!="function")&&(c={});n0&&(L1&&arguments[1]!==void 0?arguments[1]:!1;if(D&&(L===0||L>=this.length()-A)){var z=this.clone();return L===0?(this.parent.insertBefore(z,this),this):(this.parent.insertBefore(z,this.next),z)}else{var $=m(w.prototype.__proto__||Object.getPrototypeOf(w.prototype),"split",this).call(this,L,D);return this.cache={},$}}}]),w}(e.default.Block);P.blotName="block",P.tagName="P",P.defaultChild="break",P.allowedChildren=[u.default,e.default.Embed,i.default];function T(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};return b==null||(typeof b.formats=="function"&&(w=(0,p.default)(w,b.formats())),b.parent==null||b.parent.blotName=="scroll"||b.parent.statics.scope!==b.statics.scope)?w:T(b.parent,w)}d.bubbleFormats=T,d.BlockEmbed=N,d.default=P},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.overload=d.expandConfig=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},m=function(){function H(j,k){var I=[],M=!0,K=!1,F=void 0;try{for(var q=j[Symbol.iterator](),U;!(M=(U=q.next()).done)&&(I.push(U.value),!(k&&I.length===k));M=!0);}catch(G){K=!0,F=G}finally{try{!M&&q.return&&q.return()}finally{if(K)throw F}}return I}return function(j,k){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(j,k){for(var I=0;I2&&arguments[2]!==void 0?arguments[2]:!1;if(typeof k!="string"){var F=k.attrName||k.blotName;typeof F=="string"?this.register("formats/"+F,k,I):Object.keys(k).forEach(function(q){M.register(q,k[q],I)})}else this.imports[k]!=null&&!K&&x.warn("Overwriting "+k+" with",I),this.imports[k]=I,(k.startsWith("blots/")||k.startsWith("formats/"))&&I.blotName!=="abstract"?r.default.register(I):k.startsWith("modules")&&typeof I.register=="function"&&I.register()}}]);function H(j){var k=this,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(w(this,H),this.options=D(j,I),this.container=this.options.container,this.container==null)return x.error("Invalid Quill container",j);this.options.debug&&H.debug(this.options.debug);var M=this.container.innerHTML.trim();this.container.classList.add("ql-container"),this.container.innerHTML="",this.container.__quill=this,this.root=this.addContainer("ql-editor"),this.root.classList.add("ql-blank"),this.root.setAttribute("data-gramm",!1),this.scrollingContainer=this.options.scrollingContainer||this.root,this.emitter=new t.default,this.scroll=r.default.create(this.root,{emitter:this.emitter,whitelist:this.options.formats}),this.editor=new o.default(this.scroll),this.selection=new c.default(this.scroll,this.emitter),this.theme=new this.options.theme(this,this.options),this.keyboard=this.theme.addModule("keyboard"),this.clipboard=this.theme.addModule("clipboard"),this.history=this.theme.addModule("history"),this.theme.init(),this.emitter.on(t.default.events.EDITOR_CHANGE,function(F){F===t.default.events.TEXT_CHANGE&&k.root.classList.toggle("ql-blank",k.editor.isBlank())}),this.emitter.on(t.default.events.SCROLL_UPDATE,function(F,q){var U=k.selection.lastRange,G=U&&U.length===0?U.index:void 0;z.call(k,function(){return k.editor.update(null,q,G)},F)});var K=this.clipboard.convert(`
`+M+"


");this.setContents(K),this.history.clear(),this.options.placeholder&&this.root.setAttribute("data-placeholder",this.options.placeholder),this.options.readOnly&&this.disable()}return _(H,[{key:"addContainer",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;if(typeof k=="string"){var M=k;k=document.createElement("div"),k.classList.add(M)}return this.container.insertBefore(k,I),k}},{key:"blur",value:function(){this.selection.setRange(null)}},{key:"deleteText",value:function(k,I,M){var K=this,F=$(k,I,M),q=m(F,4);return k=q[0],I=q[1],M=q[3],z.call(this,function(){return K.editor.deleteText(k,I)},M,k,-1*I)}},{key:"disable",value:function(){this.enable(!1)}},{key:"enable",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.scroll.enable(k),this.container.classList.toggle("ql-disabled",!k)}},{key:"focus",value:function(){var k=this.scrollingContainer.scrollTop;this.selection.focus(),this.scrollingContainer.scrollTop=k,this.scrollIntoView()}},{key:"format",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:t.default.sources.API;return z.call(this,function(){var F=M.getSelection(!0),q=new g.default;if(F==null)return q;if(r.default.query(k,r.default.Scope.BLOCK))q=M.editor.formatLine(F.index,F.length,b({},k,I));else{if(F.length===0)return M.selection.format(k,I),q;q=M.editor.formatText(F.index,F.length,b({},k,I))}return M.setSelection(F,t.default.sources.SILENT),q},K)}},{key:"formatLine",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,I,M,K,F),V=m(G,4);return k=V[0],I=V[1],U=V[2],F=V[3],z.call(this,function(){return q.editor.formatLine(k,I,U)},F,k,0)}},{key:"formatText",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,I,M,K,F),V=m(G,4);return k=V[0],I=V[1],U=V[2],F=V[3],z.call(this,function(){return q.editor.formatText(k,I,U)},F,k,0)}},{key:"getBounds",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=void 0;typeof k=="number"?M=this.selection.getBounds(k,I):M=this.selection.getBounds(k.index,k.length);var K=this.container.getBoundingClientRect();return{bottom:M.bottom-K.top,height:M.height,left:M.left-K.left,right:M.right-K.left,top:M.top-K.top,width:M.width}}},{key:"getContents",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,M=$(k,I),K=m(M,2);return k=K[0],I=K[1],this.editor.getContents(k,I)}},{key:"getFormat",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.getSelection(!0),I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return typeof k=="number"?this.editor.getFormat(k,I):this.editor.getFormat(k.index,k.length)}},{key:"getIndex",value:function(k){return k.offset(this.scroll)}},{key:"getLength",value:function(){return this.scroll.length()}},{key:"getLeaf",value:function(k){return this.scroll.leaf(k)}},{key:"getLine",value:function(k){return this.scroll.line(k)}},{key:"getLines",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE;return typeof k!="number"?this.scroll.lines(k.index,k.length):this.scroll.lines(k,I)}},{key:"getModule",value:function(k){return this.theme.modules[k]}},{key:"getSelection",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;return k&&this.focus(),this.update(),this.selection.getRange()[0]}},{key:"getText",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getLength()-k,M=$(k,I),K=m(M,2);return k=K[0],I=K[1],this.editor.getText(k,I)}},{key:"hasFocus",value:function(){return this.selection.hasFocus()}},{key:"insertEmbed",value:function(k,I,M){var K=this,F=arguments.length>3&&arguments[3]!==void 0?arguments[3]:H.sources.API;return z.call(this,function(){return K.editor.insertEmbed(k,I,M)},F,k)}},{key:"insertText",value:function(k,I,M,K,F){var q=this,U=void 0,G=$(k,0,M,K,F),V=m(G,4);return k=V[0],U=V[2],F=V[3],z.call(this,function(){return q.editor.insertText(k,I,U)},F,k,I.length)}},{key:"isEnabled",value:function(){return!this.container.classList.contains("ql-disabled")}},{key:"off",value:function(){return this.emitter.off.apply(this.emitter,arguments)}},{key:"on",value:function(){return this.emitter.on.apply(this.emitter,arguments)}},{key:"once",value:function(){return this.emitter.once.apply(this.emitter,arguments)}},{key:"pasteHTML",value:function(k,I,M){this.clipboard.dangerouslyPasteHTML(k,I,M)}},{key:"removeFormat",value:function(k,I,M){var K=this,F=$(k,I,M),q=m(F,4);return k=q[0],I=q[1],M=q[3],z.call(this,function(){return K.editor.removeFormat(k,I)},M,k)}},{key:"scrollIntoView",value:function(){this.selection.scrollIntoView(this.scrollingContainer)}},{key:"setContents",value:function(k){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){k=new g.default(k);var K=I.getLength(),F=I.editor.deleteText(0,K),q=I.editor.applyDelta(k),U=q.ops[q.ops.length-1];U!=null&&typeof U.insert=="string"&&U.insert[U.insert.length-1]===` +`&&(I.editor.deleteText(I.getLength()-1,1),q.delete(1));var G=F.compose(q);return G},M)}},{key:"setSelection",value:function(k,I,M){if(k==null)this.selection.setRange(null,I||H.sources.API);else{var K=$(k,I,M),F=m(K,4);k=F[0],I=F[1],M=F[3],this.selection.setRange(new i.Range(k,I),M),M!==t.default.sources.SILENT&&this.selection.scrollIntoView(this.scrollingContainer)}}},{key:"setText",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API,M=new g.default().insert(k);return this.setContents(M,I)}},{key:"update",value:function(){var k=arguments.length>0&&arguments[0]!==void 0?arguments[0]:t.default.sources.USER,I=this.scroll.update(k);return this.selection.update(k),I}},{key:"updateContents",value:function(k){var I=this,M=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t.default.sources.API;return z.call(this,function(){return k=new g.default(k),I.editor.applyDelta(k,M)},M,!0)}}]),H}();L.DEFAULTS={bounds:null,formats:null,modules:{},placeholder:"",readOnly:!1,scrollingContainer:null,strict:!0,theme:"default"},L.events=t.default.events,L.sources=t.default.sources,L.version="1.3.7",L.imports={delta:g.default,parchment:r.default,"core/module":a.default,"core/theme":P.default};function D(H,j){if(j=(0,v.default)(!0,{container:H,modules:{clipboard:!0,keyboard:!0,history:!0}},j),!j.theme||j.theme===L.DEFAULTS.theme)j.theme=P.default;else if(j.theme=L.import("themes/"+j.theme),j.theme==null)throw new Error("Invalid theme "+j.theme+". Did you register it?");var k=(0,v.default)(!0,{},j.theme.DEFAULTS);[k,j].forEach(function(K){K.modules=K.modules||{},Object.keys(K.modules).forEach(function(F){K.modules[F]===!0&&(K.modules[F]={})})});var I=Object.keys(k.modules).concat(Object.keys(j.modules)),M=I.reduce(function(K,F){var q=L.import("modules/"+F);return q==null?x.error("Cannot load "+F+" module. Are you sure you registered it?"):K[F]=q.DEFAULTS||{},K},{});return j.modules!=null&&j.modules.toolbar&&j.modules.toolbar.constructor!==Object&&(j.modules.toolbar={container:j.modules.toolbar}),j=(0,v.default)(!0,{},L.DEFAULTS,{modules:M},k,j),["bounds","container","scrollingContainer"].forEach(function(K){typeof j[K]=="string"&&(j[K]=document.querySelector(j[K]))}),j.modules=Object.keys(j.modules).reduce(function(K,F){return j.modules[F]&&(K[F]=j.modules[F]),K},{}),j}function z(H,j,k,I){if(this.options.strict&&!this.isEnabled()&&j===t.default.sources.USER)return new g.default;var M=k==null?null:this.getSelection(),K=this.editor.delta,F=H();if(M!=null&&(k===!0&&(k=M.index),I==null?M=J(M,F,j):I!==0&&(M=J(M,k,I,j)),this.setSelection(M,t.default.sources.SILENT)),F.length()>0){var q,U=[t.default.events.TEXT_CHANGE,F,K,j];if((q=this.emitter).emit.apply(q,[t.default.events.EDITOR_CHANGE].concat(U)),j!==t.default.sources.SILENT){var G;(G=this.emitter).emit.apply(G,U)}}return F}function $(H,j,k,I,M){var K={};return typeof H.index=="number"&&typeof H.length=="number"?typeof j!="number"?(M=I,I=k,k=j,j=H.length,H=H.index):(j=H.length,H=H.index):typeof j!="number"&&(M=I,I=k,k=j,j=0),(typeof k>"u"?"undefined":E(k))==="object"?(K=k,M=I):typeof k=="string"&&(I!=null?K[k]=I:M=k),M=M||t.default.sources.API,[H,j,K,M]}function J(H,j,k,I){if(H==null)return null;var M=void 0,K=void 0;if(j instanceof g.default){var F=[H.index,H.index+H.length].map(function(V){return j.transformPosition(V,I!==t.default.sources.USER)}),q=m(F,2);M=q[0],K=q[1]}else{var U=[H.index,H.index+H.length].map(function(V){return V=0?V+k:Math.max(j,V+k)}),G=m(U,2);M=G[0],K=G[1]}return new i.Range(M,K-M)}d.expandConfig=D,d.overload=$,d.default=L},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c0){var n=this.parent.isolate(this.offset(),this.length());this.moveChildren(n),n.wrap(this)}}}],[{key:"compare",value:function(c,n){var v=r.order.indexOf(c),O=r.order.indexOf(n);return v>=0||O>=0?v-O:c===n?0:c1?O-1:0),N=1;N1&&arguments[1]!==void 0?arguments[1]:{};E(this,_),this.quill=p,this.options=g};m.DEFAULTS={},d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=["error","warn","log","info"],m="warn";function _(g){if(E.indexOf(g)<=E.indexOf(m)){for(var h,o=arguments.length,e=Array(o>1?o-1:0),t=1;t0&&typeof e[0]!="number")}function o(e,t,f){var a,u;if(g(e)||g(t)||e.prototype!==t.prototype)return!1;if(_(e))return _(t)?(e=E.call(e),t=E.call(t),p(e,t,f)):!1;if(h(e)){if(!h(t)||e.length!==t.length)return!1;for(a=0;a=0;a--)if(r[a]!=i[a])return!1;for(a=r.length-1;a>=0;a--)if(u=r[a],!p(e[u],t[u],f))return!1;return typeof e==typeof t}},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(1),m=function(){function _(p,g,h){h===void 0&&(h={}),this.attrName=p,this.keyName=g;var o=E.Scope.TYPE&E.Scope.ATTRIBUTE;h.scope!=null?this.scope=h.scope&E.Scope.LEVEL|o:this.scope=E.Scope.ATTRIBUTE,h.whitelist!=null&&(this.whitelist=h.whitelist)}return _.keys=function(p){return[].map.call(p.attributes,function(g){return g.name})},_.prototype.add=function(p,g){return this.canAdd(p,g)?(p.setAttribute(this.keyName,g),!0):!1},_.prototype.canAdd=function(p,g){var h=E.query(p,E.Scope.BLOT&(this.scope|E.Scope.TYPE));return h==null?!1:this.whitelist==null?!0:typeof g=="string"?this.whitelist.indexOf(g.replace(/["']/g,""))>-1:this.whitelist.indexOf(g)>-1},_.prototype.remove=function(p){p.removeAttribute(this.keyName)},_.prototype.value=function(p){var g=p.getAttribute(this.keyName);return this.canAdd(p,g)&&g?g:""},_}();d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.Code=void 0;var E=function(){function N(P,T){var b=[],w=!0,x=!1,L=void 0;try{for(var D=P[Symbol.iterator](),z;!(w=(z=D.next()).done)&&(b.push(z.value),!(T&&b.length===T));w=!0);}catch($){x=!0,L=$}finally{try{!w&&D.return&&D.return()}finally{if(x)throw L}}return b}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return N(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(){function N(P,T){for(var b=0;b=b+w)){var z=this.newlineIndex(b,!0)+1,$=D-z+1,J=this.isolate(z,$),H=J.next;J.format(x,L),H instanceof P&&H.formatAt(0,b-z+w-$,x,L)}}}},{key:"insertAt",value:function(b,w,x){if(x==null){var L=this.descendant(r.default,b),D=E(L,2),z=D[0],$=D[1];z.insertAt($,w)}}},{key:"length",value:function(){var b=this.domNode.textContent.length;return this.domNode.textContent.endsWith(` +`)?b:b+1}},{key:"newlineIndex",value:function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;if(w)return this.domNode.textContent.slice(0,b).lastIndexOf(` +`);var x=this.domNode.textContent.slice(b).indexOf(` +`);return x>-1?b+x:-1}},{key:"optimize",value:function(b){this.domNode.textContent.endsWith(` +`)||this.appendChild(o.default.create("text",` +`)),_(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"optimize",this).call(this,b);var w=this.next;w!=null&&w.prev===this&&w.statics.blotName===this.statics.blotName&&this.statics.formats(this.domNode)===w.statics.formats(w.domNode)&&(w.optimize(b),w.moveChildren(this),w.remove())}},{key:"replace",value:function(b){_(P.prototype.__proto__||Object.getPrototypeOf(P.prototype),"replace",this).call(this,b),[].slice.call(this.domNode.querySelectorAll("*")).forEach(function(w){var x=o.default.find(w);x==null?w.parentNode.removeChild(w):x instanceof o.default.Embed?x.remove():x.unwrap()})}}],[{key:"create",value:function(b){var w=_(P.__proto__||Object.getPrototypeOf(P),"create",this).call(this,b);return w.setAttribute("spellcheck",!1),w}},{key:"formats",value:function(){return!0}}]),P}(t.default);A.blotName="code-block",A.tagName="PRE",A.TAB=" ",d.Code=O,d.default=A},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(H){return typeof H}:function(H){return H&&typeof Symbol=="function"&&H.constructor===Symbol&&H!==Symbol.prototype?"symbol":typeof H},m=function(){function H(j,k){var I=[],M=!0,K=!1,F=void 0;try{for(var q=j[Symbol.iterator](),U;!(M=(U=q.next()).done)&&(I.push(U.value),!(k&&I.length===k));M=!0);}catch(G){K=!0,F=G}finally{try{!M&&q.return&&q.return()}finally{if(K)throw F}}return I}return function(j,k){if(Array.isArray(j))return j;if(Symbol.iterator in Object(j))return H(j,k);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function H(j,k){for(var I=0;I=K&&!V.endsWith(` +`)&&(M=!0),I.scroll.insertAt(F,V);var X=I.scroll.line(F),ne=m(X,2),ie=ne[0],ae=ne[1],fe=(0,b.default)({},(0,i.bubbleFormats)(ie));if(ie instanceof c.default){var he=ie.descendant(t.default.Leaf,ae),me=m(he,1),ge=me[0];fe=(0,b.default)(fe,(0,i.bubbleFormats)(ge))}G=o.default.attributes.diff(fe,G)||{}}else if(E(q.insert)==="object"){var W=Object.keys(q.insert)[0];if(W==null)return F;I.scroll.insertAt(F,W,q.insert[W])}K+=U}return Object.keys(G).forEach(function(Y){I.scroll.formatAt(F,U,Y,G[Y])}),F+U},0),k.reduce(function(F,q){return typeof q.delete=="number"?(I.scroll.deleteAt(F,q.delete),F):F+(q.retain||q.insert.length||1)},0),this.scroll.batchEnd(),this.update(k)}},{key:"deleteText",value:function(k,I){return this.scroll.deleteAt(k,I),this.update(new g.default().retain(k).delete(I))}},{key:"formatLine",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return this.scroll.update(),Object.keys(K).forEach(function(F){if(!(M.scroll.whitelist!=null&&!M.scroll.whitelist[F])){var q=M.scroll.lines(k,Math.max(I,1)),U=I;q.forEach(function(G){var V=G.length();if(!(G instanceof a.default))G.format(F,K[F]);else{var X=k-G.offset(M.scroll),ne=G.newlineIndex(X+U)-X+1;G.formatAt(X,ne,F,K[F])}U-=V})}}),this.scroll.optimize(),this.update(new g.default().retain(k).retain(I,(0,A.default)(K)))}},{key:"formatText",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return Object.keys(K).forEach(function(F){M.scroll.formatAt(k,I,F,K[F])}),this.update(new g.default().retain(k).retain(I,(0,A.default)(K)))}},{key:"getContents",value:function(k,I){return this.delta.slice(k,k+I)}},{key:"getDelta",value:function(){return this.scroll.lines().reduce(function(k,I){return k.concat(I.delta())},new g.default)}},{key:"getFormat",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,M=[],K=[];I===0?this.scroll.path(k).forEach(function(q){var U=m(q,1),G=U[0];G instanceof c.default?M.push(G):G instanceof t.default.Leaf&&K.push(G)}):(M=this.scroll.lines(k,I),K=this.scroll.descendants(t.default.Leaf,k,I));var F=[M,K].map(function(q){if(q.length===0)return{};for(var U=(0,i.bubbleFormats)(q.shift());Object.keys(U).length>0;){var G=q.shift();if(G==null)return U;U=$((0,i.bubbleFormats)(G),U)}return U});return b.default.apply(b.default,F)}},{key:"getText",value:function(k,I){return this.getContents(k,I).filter(function(M){return typeof M.insert=="string"}).map(function(M){return M.insert}).join("")}},{key:"insertEmbed",value:function(k,I,M){return this.scroll.insertAt(k,I,M),this.update(new g.default().retain(k).insert(x({},I,M)))}},{key:"insertText",value:function(k,I){var M=this,K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};return I=I.replace(/\r\n/g,` +`).replace(/\r/g,` +`),this.scroll.insertAt(k,I),Object.keys(K).forEach(function(F){M.scroll.formatAt(k,I.length,F,K[F])}),this.update(new g.default().retain(k).insert(I,(0,A.default)(K)))}},{key:"isBlank",value:function(){if(this.scroll.children.length==0)return!0;if(this.scroll.children.length>1)return!1;var k=this.scroll.children.head;return k.statics.blotName!==c.default.blotName||k.children.length>1?!1:k.children.head instanceof v.default}},{key:"removeFormat",value:function(k,I){var M=this.getText(k,I),K=this.scroll.line(k+I),F=m(K,2),q=F[0],U=F[1],G=0,V=new g.default;q!=null&&(q instanceof a.default?G=q.newlineIndex(U)-U+1:G=q.length()-U,V=q.delta().slice(U,U+G-1).insert(` +`));var X=this.getContents(k,I+G),ne=X.diff(new g.default().insert(M).concat(V)),ie=new g.default().retain(k).concat(ne);return this.applyDelta(ie)}},{key:"update",value:function(k){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:void 0,K=this.delta;if(I.length===1&&I[0].type==="characterData"&&I[0].target.data.match(D)&&t.default.find(I[0].target)){var F=t.default.find(I[0].target),q=(0,i.bubbleFormats)(F),U=F.offset(this.scroll),G=I[0].oldValue.replace(r.default.CONTENTS,""),V=new g.default().insert(G),X=new g.default().insert(F.value()),ne=new g.default().retain(U).concat(V.diff(X,M));k=ne.reduce(function(ie,ae){return ae.insert?ie.insert(ae.insert,q):ie.push(ae)},new g.default),this.delta=K.compose(k)}else this.delta=this.getDelta(),(!k||!(0,P.default)(K.compose(k),this.delta))&&(k=K.diff(this.delta,M));return k}}]),H}();function $(H,j){return Object.keys(j).reduce(function(k,I){return H[I]==null||(j[I]===H[I]?k[I]=j[I]:Array.isArray(j[I])?j[I].indexOf(H[I])<0&&(k[I]=j[I].concat([H[I]])):k[I]=[j[I],H[I]]),k},{})}function J(H){return H.reduce(function(j,k){if(k.insert===1){var I=(0,A.default)(k.attributes);return delete I.image,j.insert({image:k.attributes.image},I)}if(k.attributes!=null&&(k.attributes.list===!0||k.attributes.bullet===!0)&&(k=(0,A.default)(k),k.attributes.list?k.attributes.list="ordered":(k.attributes.list="bullet",delete k.attributes.bullet)),typeof k.insert=="string"){var M=k.insert.replace(/\r\n/g,` +`).replace(/\r/g,` +`);return j.insert(M,k.attributes)}return j.push(k)},new g.default)}d.default=z},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.Range=void 0;var E=function(){function N(P,T){var b=[],w=!0,x=!1,L=void 0;try{for(var D=P[Symbol.iterator](),z;!(w=(z=D.next()).done)&&(b.push(z.value),!(T&&b.length===T));w=!0);}catch($){x=!0,L=$}finally{try{!w&&D.return&&D.return()}finally{if(x)throw L}}return b}return function(P,T){if(Array.isArray(P))return P;if(Symbol.iterator in Object(P))return N(P,T);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function(){function N(P,T){for(var b=0;b1&&arguments[1]!==void 0?arguments[1]:0;c(this,N),this.index=P,this.length=T},O=function(){function N(P,T){var b=this;c(this,N),this.emitter=T,this.scroll=P,this.composing=!1,this.mouseDown=!1,this.root=this.scroll.domNode,this.cursor=p.default.create("cursor",this),this.lastRange=this.savedRange=new v(0,0),this.handleComposition(),this.handleDragging(),this.emitter.listenDOM("selectionchange",document,function(){b.mouseDown||setTimeout(b.update.bind(b,f.default.sources.USER),1)}),this.emitter.on(f.default.events.EDITOR_CHANGE,function(w,x){w===f.default.events.TEXT_CHANGE&&x.length()>0&&b.update(f.default.sources.SILENT)}),this.emitter.on(f.default.events.SCROLL_BEFORE_UPDATE,function(){if(!!b.hasFocus()){var w=b.getNativeRange();w!=null&&w.start.node!==b.cursor.textNode&&b.emitter.once(f.default.events.SCROLL_UPDATE,function(){try{b.setNativeRange(w.start.node,w.start.offset,w.end.node,w.end.offset)}catch{}})}}),this.emitter.on(f.default.events.SCROLL_OPTIMIZE,function(w,x){if(x.range){var L=x.range,D=L.startNode,z=L.startOffset,$=L.endNode,J=L.endOffset;b.setNativeRange(D,z,$,J)}}),this.update(f.default.sources.SILENT)}return m(N,[{key:"handleComposition",value:function(){var T=this;this.root.addEventListener("compositionstart",function(){T.composing=!0}),this.root.addEventListener("compositionend",function(){if(T.composing=!1,T.cursor.parent){var b=T.cursor.restore();if(!b)return;setTimeout(function(){T.setNativeRange(b.startNode,b.startOffset,b.endNode,b.endOffset)},1)}})}},{key:"handleDragging",value:function(){var T=this;this.emitter.listenDOM("mousedown",document.body,function(){T.mouseDown=!0}),this.emitter.listenDOM("mouseup",document.body,function(){T.mouseDown=!1,T.update(f.default.sources.USER)})}},{key:"focus",value:function(){this.hasFocus()||(this.root.focus(),this.setRange(this.savedRange))}},{key:"format",value:function(T,b){if(!(this.scroll.whitelist!=null&&!this.scroll.whitelist[T])){this.scroll.update();var w=this.getNativeRange();if(!(w==null||!w.native.collapsed||p.default.query(T,p.default.Scope.BLOCK))){if(w.start.node!==this.cursor.textNode){var x=p.default.find(w.start.node,!1);if(x==null)return;if(x instanceof p.default.Leaf){var L=x.split(w.start.offset);x.parent.insertBefore(this.cursor,L)}else x.insertBefore(this.cursor,w.start.node);this.cursor.attach()}this.cursor.format(T,b),this.scroll.optimize(),this.setNativeRange(this.cursor.textNode,this.cursor.textNode.data.length),this.update()}}}},{key:"getBounds",value:function(T){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,w=this.scroll.length();T=Math.min(T,w-1),b=Math.min(T+b,w-1)-T;var x=void 0,L=this.scroll.leaf(T),D=E(L,2),z=D[0],$=D[1];if(z==null)return null;var J=z.position($,!0),H=E(J,2);x=H[0],$=H[1];var j=document.createRange();if(b>0){j.setStart(x,$);var k=this.scroll.leaf(T+b),I=E(k,2);if(z=I[0],$=I[1],z==null)return null;var M=z.position($,!0),K=E(M,2);return x=K[0],$=K[1],j.setEnd(x,$),j.getBoundingClientRect()}else{var F="left",q=void 0;return x instanceof Text?($0&&(F="right")),{bottom:q.top+q.height,height:q.height,left:q[F],right:q[F],top:q.top,width:0}}}},{key:"getNativeRange",value:function(){var T=document.getSelection();if(T==null||T.rangeCount<=0)return null;var b=T.getRangeAt(0);if(b==null)return null;var w=this.normalizeNative(b);return n.info("getNativeRange",w),w}},{key:"getRange",value:function(){var T=this.getNativeRange();if(T==null)return[null,null];var b=this.normalizedToRange(T);return[b,T]}},{key:"hasFocus",value:function(){return document.activeElement===this.root}},{key:"normalizedToRange",value:function(T){var b=this,w=[[T.start.node,T.start.offset]];T.native.collapsed||w.push([T.end.node,T.end.offset]);var x=w.map(function(z){var $=E(z,2),J=$[0],H=$[1],j=p.default.find(J,!0),k=j.offset(b.scroll);return H===0?k:j instanceof p.default.Container?k+j.length():k+j.index(J,H)}),L=Math.min(Math.max.apply(Math,i(x)),this.scroll.length()-1),D=Math.min.apply(Math,[L].concat(i(x)));return new v(D,L-D)}},{key:"normalizeNative",value:function(T){if(!A(this.root,T.startContainer)||!T.collapsed&&!A(this.root,T.endContainer))return null;var b={start:{node:T.startContainer,offset:T.startOffset},end:{node:T.endContainer,offset:T.endOffset},native:T};return[b.start,b.end].forEach(function(w){for(var x=w.node,L=w.offset;!(x instanceof Text)&&x.childNodes.length>0;)if(x.childNodes.length>L)x=x.childNodes[L],L=0;else if(x.childNodes.length===L)x=x.lastChild,L=x instanceof Text?x.data.length:x.childNodes.length+1;else break;w.node=x,w.offset=L}),b}},{key:"rangeToNative",value:function(T){var b=this,w=T.collapsed?[T.index]:[T.index,T.index+T.length],x=[],L=this.scroll.length();return w.forEach(function(D,z){D=Math.min(L-1,D);var $=void 0,J=b.scroll.leaf(D),H=E(J,2),j=H[0],k=H[1],I=j.position(k,z!==0),M=E(I,2);$=M[0],k=M[1],x.push($,k)}),x.length<2&&(x=x.concat(x)),x}},{key:"scrollIntoView",value:function(T){var b=this.lastRange;if(b!=null){var w=this.getBounds(b.index,b.length);if(w!=null){var x=this.scroll.length()-1,L=this.scroll.line(Math.min(b.index,x)),D=E(L,1),z=D[0],$=z;if(b.length>0){var J=this.scroll.line(Math.min(b.index+b.length,x)),H=E(J,1);$=H[0]}if(!(z==null||$==null)){var j=T.getBoundingClientRect();w.topj.bottom&&(T.scrollTop+=w.bottom-j.bottom)}}}}},{key:"setNativeRange",value:function(T,b){var w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:T,x=arguments.length>3&&arguments[3]!==void 0?arguments[3]:b,L=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1;if(n.info("setNativeRange",T,b,w,x),!(T!=null&&(this.root.parentNode==null||T.parentNode==null||w.parentNode==null))){var D=document.getSelection();if(D!=null)if(T!=null){this.hasFocus()||this.root.focus();var z=(this.getNativeRange()||{}).native;if(z==null||L||T!==z.startContainer||b!==z.startOffset||w!==z.endContainer||x!==z.endOffset){T.tagName=="BR"&&(b=[].indexOf.call(T.parentNode.childNodes,T),T=T.parentNode),w.tagName=="BR"&&(x=[].indexOf.call(w.parentNode.childNodes,w),w=w.parentNode);var $=document.createRange();$.setStart(T,b),$.setEnd(w,x),D.removeAllRanges(),D.addRange($)}}else D.removeAllRanges(),this.root.blur(),document.body.focus()}}},{key:"setRange",value:function(T){var b=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,w=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.default.sources.API;if(typeof b=="string"&&(w=b,b=!1),n.info("setRange",T),T!=null){var x=this.rangeToNative(T);this.setNativeRange.apply(this,i(x).concat([b]))}else this.setNativeRange(null);this.update(w)}},{key:"update",value:function(){var T=arguments.length>0&&arguments[0]!==void 0?arguments[0]:f.default.sources.USER,b=this.lastRange,w=this.getRange(),x=E(w,2),L=x[0],D=x[1];if(this.lastRange=L,this.lastRange!=null&&(this.savedRange=this.lastRange),!(0,e.default)(b,this.lastRange)){var z;!this.composing&&D!=null&&D.native.collapsed&&D.start.node!==this.cursor.textNode&&this.cursor.restore();var $=[f.default.events.SELECTION_CHANGE,(0,h.default)(this.lastRange),(0,h.default)(b),T];if((z=this.emitter).emit.apply(z,[f.default.events.EDITOR_CHANGE].concat($)),T!==f.default.sources.SILENT){var J;(J=this.emitter).emit.apply(J,$)}}}}]),N}();function A(N,P){try{P.parentNode}catch{return!1}return P instanceof Text&&(P=P.parentNode),N.contains(P)}d.Range=v,d.default=O},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r0&&(t+=1),[this.parent.domNode,t]},h.prototype.value=function(){var o;return o={},o[this.statics.blotName]=this.statics.value(this.domNode)||!0,o},h.scope=_.Scope.INLINE_BLOT,h}(m.default);d.default=p},function(y,d,s){var E=s(11),m=s(3),_={attributes:{compose:function(g,h,o){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var e=m(!0,{},h);o||(e=Object.keys(e).reduce(function(f,a){return e[a]!=null&&(f[a]=e[a]),f},{}));for(var t in g)g[t]!==void 0&&h[t]===void 0&&(e[t]=g[t]);return Object.keys(e).length>0?e:void 0},diff:function(g,h){typeof g!="object"&&(g={}),typeof h!="object"&&(h={});var o=Object.keys(g).concat(Object.keys(h)).reduce(function(e,t){return E(g[t],h[t])||(e[t]=h[t]===void 0?null:h[t]),e},{});return Object.keys(o).length>0?o:void 0},transform:function(g,h,o){if(typeof g!="object")return h;if(typeof h=="object"){if(!o)return h;var e=Object.keys(h).reduce(function(t,f){return g[f]===void 0&&(t[f]=h[f]),t},{});return Object.keys(e).length>0?e:void 0}}},iterator:function(g){return new p(g)},length:function(g){return typeof g.delete=="number"?g.delete:typeof g.retain=="number"?g.retain:typeof g.insert=="string"?g.insert.length:1}};function p(g){this.ops=g,this.index=0,this.offset=0}p.prototype.hasNext=function(){return this.peekLength()<1/0},p.prototype.next=function(g){g||(g=1/0);var h=this.ops[this.index];if(h){var o=this.offset,e=_.length(h);if(g>=e-o?(g=e-o,this.index+=1,this.offset=0):this.offset+=g,typeof h.delete=="number")return{delete:g};var t={};return h.attributes&&(t.attributes=h.attributes),typeof h.retain=="number"?t.retain=g:typeof h.insert=="string"?t.insert=h.insert.substr(o,g):t.insert=h.insert,t}else return{retain:1/0}},p.prototype.peek=function(){return this.ops[this.index]},p.prototype.peekLength=function(){return this.ops[this.index]?_.length(this.ops[this.index])-this.offset:1/0},p.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},p.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var g=this.offset,h=this.index,o=this.next(),e=this.ops.slice(this.index);return this.offset=g,this.index=h,[o].concat(e)}else return[]},y.exports=_},function(y,d){var s=function(){function E(a,u){return u!=null&&a instanceof u}var m;try{m=Map}catch{m=function(){}}var _;try{_=Set}catch{_=function(){}}var p;try{p=Promise}catch{p=function(){}}function g(a,u,r,i,c){typeof u=="object"&&(r=u.depth,i=u.prototype,c=u.includeNonEnumerable,u=u.circular);var n=[],v=[],O=typeof Buffer<"u";typeof u>"u"&&(u=!0),typeof r>"u"&&(r=1/0);function A(N,P){if(N===null)return null;if(P===0)return N;var T,b;if(typeof N!="object")return N;if(E(N,m))T=new m;else if(E(N,_))T=new _;else if(E(N,p))T=new p(function(j,k){N.then(function(I){j(A(I,P-1))},function(I){k(A(I,P-1))})});else if(g.__isArray(N))T=[];else if(g.__isRegExp(N))T=new RegExp(N.source,f(N)),N.lastIndex&&(T.lastIndex=N.lastIndex);else if(g.__isDate(N))T=new Date(N.getTime());else{if(O&&Buffer.isBuffer(N))return Buffer.allocUnsafe?T=Buffer.allocUnsafe(N.length):T=new Buffer(N.length),N.copy(T),T;E(N,Error)?T=Object.create(N):typeof i>"u"?(b=Object.getPrototypeOf(N),T=Object.create(b)):(T=Object.create(i),b=i)}if(u){var w=n.indexOf(N);if(w!=-1)return v[w];n.push(N),v.push(T)}E(N,m)&&N.forEach(function(j,k){var I=A(k,P-1),M=A(j,P-1);T.set(I,M)}),E(N,_)&&N.forEach(function(j){var k=A(j,P-1);T.add(k)});for(var x in N){var L;b&&(L=Object.getOwnPropertyDescriptor(b,x)),!(L&&L.set==null)&&(T[x]=A(N[x],P-1))}if(Object.getOwnPropertySymbols)for(var D=Object.getOwnPropertySymbols(N),x=0;x0){if($ instanceof e.BlockEmbed||k instanceof e.BlockEmbed){this.optimize();return}if($ instanceof r.default){var I=$.newlineIndex($.length(),!0);if(I>-1&&($=$.split(I+1),$===k)){this.optimize();return}}else if(k instanceof r.default){var M=k.newlineIndex(0);M>-1&&k.split(M+1)}var K=k.children.head instanceof a.default?null:k.children.head;$.moveChildren(k,K),$.remove()}this.optimize()}},{key:"enable",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;this.domNode.setAttribute("contenteditable",x)}},{key:"formatAt",value:function(x,L,D,z){this.whitelist!=null&&!this.whitelist[D]||(_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"formatAt",this).call(this,x,L,D,z),this.optimize())}},{key:"insertAt",value:function(x,L,D){if(!(D!=null&&this.whitelist!=null&&!this.whitelist[L])){if(x>=this.length())if(D==null||g.default.query(L,g.default.Scope.BLOCK)==null){var z=g.default.create(this.statics.defaultChild);this.appendChild(z),D==null&&L.endsWith(` +`)&&(L=L.slice(0,-1)),z.insertAt(0,L,D)}else{var $=g.default.create(L,D);this.appendChild($)}else _(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertAt",this).call(this,x,L,D);this.optimize()}}},{key:"insertBefore",value:function(x,L){if(x.statics.scope===g.default.Scope.INLINE_BLOT){var D=g.default.create(this.statics.defaultChild);D.appendChild(x),x=D}_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"insertBefore",this).call(this,x,L)}},{key:"leaf",value:function(x){return this.path(x).pop()||[null,-1]}},{key:"line",value:function(x){return x===this.length()?this.line(x-1):this.descendant(N,x)}},{key:"lines",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Number.MAX_VALUE,D=function z($,J,H){var j=[],k=H;return $.children.forEachAt(J,H,function(I,M,K){N(I)?j.push(I):I instanceof g.default.Container&&(j=j.concat(z(I,M,k))),k-=K}),j};return D(this,x,L)}},{key:"optimize",value:function(){var x=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],L=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.batch!==!0&&(_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"optimize",this).call(this,x,L),x.length>0&&this.emitter.emit(o.default.events.SCROLL_OPTIMIZE,x,L))}},{key:"path",value:function(x){return _(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"path",this).call(this,x).slice(1)}},{key:"update",value:function(x){if(this.batch!==!0){var L=o.default.sources.USER;typeof x=="string"&&(L=x),Array.isArray(x)||(x=this.observer.takeRecords()),x.length>0&&this.emitter.emit(o.default.events.SCROLL_BEFORE_UPDATE,L,x),_(b.prototype.__proto__||Object.getPrototypeOf(b.prototype),"update",this).call(this,x.concat([])),x.length>0&&this.emitter.emit(o.default.events.SCROLL_UPDATE,L,x)}}}]),b}(g.default.Scroll);P.blotName="scroll",P.className="ql-editor",P.tagName="DIV",P.defaultChild="block",P.allowedChildren=[t.default,e.BlockEmbed,c.default],d.default=P},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.SHORTKEY=d.default=void 0;var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(q){return typeof q}:function(q){return q&&typeof Symbol=="function"&&q.constructor===Symbol&&q!==Symbol.prototype?"symbol":typeof q},m=function(){function q(U,G){var V=[],X=!0,ne=!1,ie=void 0;try{for(var ae=U[Symbol.iterator](),fe;!(X=(fe=ae.next()).done)&&(V.push(fe.value),!(G&&V.length===G));X=!0);}catch(he){ne=!0,ie=he}finally{try{!X&&ae.return&&ae.return()}finally{if(ne)throw ie}}return V}return function(U,G){if(Array.isArray(U))return U;if(Symbol.iterator in Object(U))return q(U,G);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),_=function(){function q(U,G){for(var V=0;V1&&arguments[1]!==void 0?arguments[1]:{},ne=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=F(V);if(ie==null||ie.key==null)return D.warn("Attempted to add invalid keyboard binding",ie);typeof X=="function"&&(X={handler:X}),typeof ne=="function"&&(ne={handler:ne}),ie=(0,t.default)(ie,X,ne),this.bindings[ie.key]=this.bindings[ie.key]||[],this.bindings[ie.key].push(ie)}},{key:"listen",value:function(){var V=this;this.quill.root.addEventListener("keydown",function(X){if(!X.defaultPrevented){var ne=X.which||X.keyCode,ie=(V.bindings[ne]||[]).filter(function(de){return U.match(X,de)});if(ie.length!==0){var ae=V.quill.getSelection();if(!(ae==null||!V.quill.hasFocus())){var fe=V.quill.getLine(ae.index),he=m(fe,2),me=he[0],ge=he[1],W=V.quill.getLeaf(ae.index),Y=m(W,2),ee=Y[0],te=Y[1],Q=ae.length===0?[ee,te]:V.quill.getLeaf(ae.index+ae.length),se=m(Q,2),oe=se[0],le=se[1],Ne=ee instanceof c.default.Text?ee.value().slice(0,te):"",Oe=oe instanceof c.default.Text?oe.value().slice(le):"",pe={collapsed:ae.length===0,empty:ae.length===0&&me.length()<=1,format:V.quill.getFormat(ae),offset:ge,prefix:Ne,suffix:Oe},Ze=ie.some(function(de){if(de.collapsed!=null&&de.collapsed!==pe.collapsed||de.empty!=null&&de.empty!==pe.empty||de.offset!=null&&de.offset!==pe.offset)return!1;if(Array.isArray(de.format)){if(de.format.every(function(je){return pe.format[je]==null}))return!1}else if(E(de.format)==="object"&&!Object.keys(de.format).every(function(je){return de.format[je]===!0?pe.format[je]!=null:de.format[je]===!1?pe.format[je]==null:(0,o.default)(de.format[je],pe.format[je])}))return!1;return de.prefix!=null&&!de.prefix.test(pe.prefix)||de.suffix!=null&&!de.suffix.test(pe.suffix)?!1:de.handler.call(V,ae,pe)!==!0});Ze&&X.preventDefault()}}}})}}]),U}(P.default);$.keys={BACKSPACE:8,TAB:9,ENTER:13,ESCAPE:27,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46},$.DEFAULTS={bindings:{bold:K("bold"),italic:K("italic"),underline:K("underline"),indent:{key:$.keys.TAB,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","+1",v.default.sources.USER)}},outdent:{key:$.keys.TAB,shiftKey:!0,format:["blockquote","indent","list"],handler:function(U,G){if(G.collapsed&&G.offset!==0)return!0;this.quill.format("indent","-1",v.default.sources.USER)}},"outdent backspace":{key:$.keys.BACKSPACE,collapsed:!0,shiftKey:null,metaKey:null,ctrlKey:null,altKey:null,format:["indent","list"],offset:0,handler:function(U,G){G.format.indent!=null?this.quill.format("indent","-1",v.default.sources.USER):G.format.list!=null&&this.quill.format("list",!1,v.default.sources.USER)}},"indent code-block":M(!0),"outdent code-block":M(!1),"remove tab":{key:$.keys.TAB,shiftKey:!0,collapsed:!0,prefix:/\t$/,handler:function(U){this.quill.deleteText(U.index-1,1,v.default.sources.USER)}},tab:{key:$.keys.TAB,handler:function(U){this.quill.history.cutoff();var G=new a.default().retain(U.index).delete(U.length).insert(" ");this.quill.updateContents(G,v.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index+1,v.default.sources.SILENT)}},"list empty enter":{key:$.keys.ENTER,collapsed:!0,format:["list"],empty:!0,handler:function(U,G){this.quill.format("list",!1,v.default.sources.USER),G.format.indent&&this.quill.format("indent",!1,v.default.sources.USER)}},"checklist enter":{key:$.keys.ENTER,collapsed:!0,format:{list:"checked"},handler:function(U){var G=this.quill.getLine(U.index),V=m(G,2),X=V[0],ne=V[1],ie=(0,t.default)({},X.formats(),{list:"checked"}),ae=new a.default().retain(U.index).insert(` +`,ie).retain(X.length()-ne-1).retain(1,{list:"unchecked"});this.quill.updateContents(ae,v.default.sources.USER),this.quill.setSelection(U.index+1,v.default.sources.SILENT),this.quill.scrollIntoView()}},"header enter":{key:$.keys.ENTER,collapsed:!0,format:["header"],suffix:/^$/,handler:function(U,G){var V=this.quill.getLine(U.index),X=m(V,2),ne=X[0],ie=X[1],ae=new a.default().retain(U.index).insert(` +`,G.format).retain(ne.length()-ie-1).retain(1,{header:null});this.quill.updateContents(ae,v.default.sources.USER),this.quill.setSelection(U.index+1,v.default.sources.SILENT),this.quill.scrollIntoView()}},"list autofill":{key:" ",collapsed:!0,format:{list:!1},prefix:/^\s*?(\d+\.|-|\*|\[ ?\]|\[x\])$/,handler:function(U,G){var V=G.prefix.length,X=this.quill.getLine(U.index),ne=m(X,2),ie=ne[0],ae=ne[1];if(ae>V)return!0;var fe=void 0;switch(G.prefix.trim()){case"[]":case"[ ]":fe="unchecked";break;case"[x]":fe="checked";break;case"-":case"*":fe="bullet";break;default:fe="ordered"}this.quill.insertText(U.index," ",v.default.sources.USER),this.quill.history.cutoff();var he=new a.default().retain(U.index-ae).delete(V+1).retain(ie.length()-2-ae).retain(1,{list:fe});this.quill.updateContents(he,v.default.sources.USER),this.quill.history.cutoff(),this.quill.setSelection(U.index-V,v.default.sources.SILENT)}},"code exit":{key:$.keys.ENTER,collapsed:!0,format:["code-block"],prefix:/\n\n$/,suffix:/^\s+$/,handler:function(U){var G=this.quill.getLine(U.index),V=m(G,2),X=V[0],ne=V[1],ie=new a.default().retain(U.index+X.length()-ne-2).retain(1,{"code-block":null}).delete(1);this.quill.updateContents(ie,v.default.sources.USER)}},"embed left":J($.keys.LEFT,!1),"embed left shift":J($.keys.LEFT,!0),"embed right":J($.keys.RIGHT,!1),"embed right shift":J($.keys.RIGHT,!0)}};function J(q,U){var G,V=q===$.keys.LEFT?"prefix":"suffix";return G={key:q,shiftKey:U,altKey:null},b(G,V,/^$/),b(G,"handler",function(ne){var ie=ne.index;q===$.keys.RIGHT&&(ie+=ne.length+1);var ae=this.quill.getLeaf(ie),fe=m(ae,1),he=fe[0];return he instanceof c.default.Embed?(q===$.keys.LEFT?U?this.quill.setSelection(ne.index-1,ne.length+1,v.default.sources.USER):this.quill.setSelection(ne.index-1,v.default.sources.USER):U?this.quill.setSelection(ne.index,ne.length+1,v.default.sources.USER):this.quill.setSelection(ne.index+ne.length+1,v.default.sources.USER),!1):!0}),G}function H(q,U){if(!(q.index===0||this.quill.getLength()<=1)){var G=this.quill.getLine(q.index),V=m(G,1),X=V[0],ne={};if(U.offset===0){var ie=this.quill.getLine(q.index-1),ae=m(ie,1),fe=ae[0];if(fe!=null&&fe.length()>1){var he=X.formats(),me=this.quill.getFormat(q.index-1,1);ne=r.default.attributes.diff(he,me)||{}}}var ge=/[\uD800-\uDBFF][\uDC00-\uDFFF]$/.test(U.prefix)?2:1;this.quill.deleteText(q.index-ge,ge,v.default.sources.USER),Object.keys(ne).length>0&&this.quill.formatLine(q.index-ge,ge,ne,v.default.sources.USER),this.quill.focus()}}function j(q,U){var G=/^[\uD800-\uDBFF][\uDC00-\uDFFF]/.test(U.suffix)?2:1;if(!(q.index>=this.quill.getLength()-G)){var V={},X=0,ne=this.quill.getLine(q.index),ie=m(ne,1),ae=ie[0];if(U.offset>=ae.length()-1){var fe=this.quill.getLine(q.index+1),he=m(fe,1),me=he[0];if(me){var ge=ae.formats(),W=this.quill.getFormat(q.index,1);V=r.default.attributes.diff(ge,W)||{},X=me.length()}}this.quill.deleteText(q.index,G,v.default.sources.USER),Object.keys(V).length>0&&this.quill.formatLine(q.index+X-1,G,V,v.default.sources.USER)}}function k(q){var U=this.quill.getLines(q),G={};if(U.length>1){var V=U[0].formats(),X=U[U.length-1].formats();G=r.default.attributes.diff(X,V)||{}}this.quill.deleteText(q,v.default.sources.USER),Object.keys(G).length>0&&this.quill.formatLine(q.index,1,G,v.default.sources.USER),this.quill.setSelection(q.index,v.default.sources.SILENT),this.quill.focus()}function I(q,U){var G=this;q.length>0&&this.quill.scroll.deleteAt(q.index,q.length);var V=Object.keys(U.format).reduce(function(X,ne){return c.default.query(ne,c.default.Scope.BLOCK)&&!Array.isArray(U.format[ne])&&(X[ne]=U.format[ne]),X},{});this.quill.insertText(q.index,` +`,V,v.default.sources.USER),this.quill.setSelection(q.index+1,v.default.sources.SILENT),this.quill.focus(),Object.keys(U.format).forEach(function(X){V[X]==null&&(Array.isArray(U.format[X])||X!=="link"&&G.quill.format(X,U.format[X],v.default.sources.USER))})}function M(q){return{key:$.keys.TAB,shiftKey:!q,format:{"code-block":!0},handler:function(G){var V=c.default.query("code-block"),X=G.index,ne=G.length,ie=this.quill.scroll.descendant(V,X),ae=m(ie,2),fe=ae[0],he=ae[1];if(fe!=null){var me=this.quill.getIndex(fe),ge=fe.newlineIndex(he,!0)+1,W=fe.newlineIndex(me+he+ne),Y=fe.domNode.textContent.slice(ge,W).split(` +`);he=0,Y.forEach(function(ee,te){q?(fe.insertAt(ge+he,V.TAB),he+=V.TAB.length,te===0?X+=V.TAB.length:ne+=V.TAB.length):ee.startsWith(V.TAB)&&(fe.deleteAt(ge+he,V.TAB.length),he-=V.TAB.length,te===0?X-=V.TAB.length:ne-=V.TAB.length),he+=ee.length+1}),this.quill.update(v.default.sources.USER),this.quill.setSelection(X,ne,v.default.sources.SILENT)}}}}function K(q){return{key:q[0].toUpperCase(),shortKey:!0,handler:function(G,V){this.quill.format(q,!V.format[q],v.default.sources.USER)}}}function F(q){if(typeof q=="string"||typeof q=="number")return F({key:q});if((typeof q>"u"?"undefined":E(q))==="object"&&(q=(0,g.default)(q,!1)),typeof q.key=="string")if($.keys[q.key.toUpperCase()]!=null)q.key=$.keys[q.key.toUpperCase()];else if(q.key.length===1)q.key=q.key.toUpperCase().charCodeAt(0);else return null;return q.shortKey&&(q[z]=q.shortKey,delete q.shortKey),q}d.default=$,d.SHORTKEY=z},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function r(i,c){var n=[],v=!0,O=!1,A=void 0;try{for(var N=i[Symbol.iterator](),P;!(v=(P=N.next()).done)&&(n.push(P.value),!(c&&n.length===c));v=!0);}catch(T){O=!0,A=T}finally{try{!v&&N.return&&N.return()}finally{if(O)throw A}}return n}return function(i,c){if(Array.isArray(i))return i;if(Symbol.iterator in Object(i))return r(i,c);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function r(i,c,n){i===null&&(i=Function.prototype);var v=Object.getOwnPropertyDescriptor(i,c);if(v===void 0){var O=Object.getPrototypeOf(i);return O===null?void 0:r(O,c,n)}else{if("value"in v)return v.value;var A=v.get;return A===void 0?void 0:A.call(n)}},_=function(){function r(i,c){for(var n=0;n-1}d.default=t,d.sanitize=f},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},m=function(){function u(r,i){for(var c=0;c1&&arguments[1]!==void 0?arguments[1]:!1,n=this.container.querySelector(".ql-selected");if(i!==n&&(n!=null&&n.classList.remove("ql-selected"),i!=null&&(i.classList.add("ql-selected"),this.select.selectedIndex=[].indexOf.call(i.parentNode.children,i),i.hasAttribute("data-value")?this.label.setAttribute("data-value",i.getAttribute("data-value")):this.label.removeAttribute("data-value"),i.hasAttribute("data-label")?this.label.setAttribute("data-label",i.getAttribute("data-label")):this.label.removeAttribute("data-label"),c))){if(typeof Event=="function")this.select.dispatchEvent(new Event("change"));else if((typeof Event>"u"?"undefined":E(Event))==="object"){var v=document.createEvent("Event");v.initEvent("change",!0,!0),this.select.dispatchEvent(v)}this.close()}}},{key:"update",value:function(){var i=void 0;if(this.select.selectedIndex>-1){var c=this.container.querySelector(".ql-picker-options").children[this.select.selectedIndex];i=this.select.options[this.select.selectedIndex],this.selectItem(c)}else this.selectItem(null);var n=i!=null&&i!==this.select.querySelector("option[selected]");this.label.classList.toggle("ql-active",n)}}]),u}();d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(0),m=D(E),_=s(5),p=D(_),g=s(4),h=D(g),o=s(16),e=D(o),t=s(25),f=D(t),a=s(24),u=D(a),r=s(35),i=D(r),c=s(6),n=D(c),v=s(22),O=D(v),A=s(7),N=D(A),P=s(55),T=D(P),b=s(42),w=D(b),x=s(23),L=D(x);function D(z){return z&&z.__esModule?z:{default:z}}p.default.register({"blots/block":h.default,"blots/block/embed":g.BlockEmbed,"blots/break":e.default,"blots/container":f.default,"blots/cursor":u.default,"blots/embed":i.default,"blots/inline":n.default,"blots/scroll":O.default,"blots/text":N.default,"modules/clipboard":T.default,"modules/history":w.default,"modules/keyboard":L.default}),m.default.register(h.default,e.default,u.default,n.default,O.default,N.default),d.default=p.default},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(1),m=function(){function _(p){this.domNode=p,this.domNode[E.DATA_KEY]={blot:this}}return Object.defineProperty(_.prototype,"statics",{get:function(){return this.constructor},enumerable:!0,configurable:!0}),_.create=function(p){if(this.tagName==null)throw new E.ParchmentError("Blot definition missing tagName");var g;return Array.isArray(this.tagName)?(typeof p=="string"&&(p=p.toUpperCase(),parseInt(p).toString()===p&&(p=parseInt(p))),typeof p=="number"?g=document.createElement(this.tagName[p-1]):this.tagName.indexOf(p)>-1?g=document.createElement(p):g=document.createElement(this.tagName[0])):g=document.createElement(this.tagName),this.className&&g.classList.add(this.className),g},_.prototype.attach=function(){this.parent!=null&&(this.scroll=this.parent.scroll)},_.prototype.clone=function(){var p=this.domNode.cloneNode(!1);return E.create(p)},_.prototype.detach=function(){this.parent!=null&&this.parent.removeChild(this),delete this.domNode[E.DATA_KEY]},_.prototype.deleteAt=function(p,g){var h=this.isolate(p,g);h.remove()},_.prototype.formatAt=function(p,g,h,o){var e=this.isolate(p,g);if(E.query(h,E.Scope.BLOT)!=null&&o)e.wrap(h,o);else if(E.query(h,E.Scope.ATTRIBUTE)!=null){var t=E.create(this.statics.scope);e.wrap(t),t.format(h,o)}},_.prototype.insertAt=function(p,g,h){var o=h==null?E.create("text",g):E.create(g,h),e=this.split(p);this.parent.insertBefore(o,e)},_.prototype.insertInto=function(p,g){g===void 0&&(g=null),this.parent!=null&&this.parent.children.remove(this);var h=null;p.children.insertBefore(this,g),g!=null&&(h=g.domNode),(this.domNode.parentNode!=p.domNode||this.domNode.nextSibling!=h)&&p.domNode.insertBefore(this.domNode,h),this.parent=p,this.attach()},_.prototype.isolate=function(p,g){var h=this.split(p);return h.split(g),h},_.prototype.length=function(){return 1},_.prototype.offset=function(p){return p===void 0&&(p=this.parent),this.parent==null||this==p?0:this.parent.children.offset(this)+this.parent.offset(p)},_.prototype.optimize=function(p){this.domNode[E.DATA_KEY]!=null&&delete this.domNode[E.DATA_KEY].mutations},_.prototype.remove=function(){this.domNode.parentNode!=null&&this.domNode.parentNode.removeChild(this.domNode),this.detach()},_.prototype.replace=function(p){p.parent!=null&&(p.parent.insertBefore(this,p.next),p.remove())},_.prototype.replaceWith=function(p,g){var h=typeof p=="string"?E.create(p,g):p;return h.replace(this),h},_.prototype.split=function(p,g){return p===0?this:this.next},_.prototype.update=function(p,g){},_.prototype.wrap=function(p,g){var h=typeof p=="string"?E.create(p,g):p;return this.parent!=null&&this.parent.insertBefore(h,this.next),h.appendChild(this),h},_.blotName="abstract",_}();d.default=m},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(12),m=s(32),_=s(33),p=s(1),g=function(){function h(o){this.attributes={},this.domNode=o,this.build()}return h.prototype.attribute=function(o,e){e?o.add(this.domNode,e)&&(o.value(this.domNode)!=null?this.attributes[o.attrName]=o:delete this.attributes[o.attrName]):(o.remove(this.domNode),delete this.attributes[o.attrName])},h.prototype.build=function(){var o=this;this.attributes={};var e=E.default.keys(this.domNode),t=m.default.keys(this.domNode),f=_.default.keys(this.domNode);e.concat(t).concat(f).forEach(function(a){var u=p.query(a,p.Scope.ATTRIBUTE);u instanceof E.default&&(o.attributes[u.attrName]=u)})},h.prototype.copy=function(o){var e=this;Object.keys(this.attributes).forEach(function(t){var f=e.attributes[t].value(e.domNode);o.format(t,f)})},h.prototype.move=function(o){var e=this;this.copy(o),Object.keys(this.attributes).forEach(function(t){e.attributes[t].remove(e.domNode)}),this.attributes={}},h.prototype.values=function(){var o=this;return Object.keys(this.attributes).reduce(function(e,t){return e[t]=o.attributes[t].value(o.domNode),e},{})},h}();d.default=g},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(12);function _(g,h){var o=g.getAttribute("class")||"";return o.split(/\s+/).filter(function(e){return e.indexOf(h+"-")===0})}var p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("class")||"").split(/\s+/).map(function(e){return e.split("-").slice(0,-1).join("-")})},h.prototype.add=function(o,e){return this.canAdd(o,e)?(this.remove(o),o.classList.add(this.keyName+"-"+e),!0):!1},h.prototype.remove=function(o){var e=_(o,this.keyName);e.forEach(function(t){o.classList.remove(t)}),o.classList.length===0&&o.removeAttribute("class")},h.prototype.value=function(o){var e=_(o,this.keyName)[0]||"",t=e.slice(this.keyName.length+1);return this.canAdd(o,t)?t:""},h}(m.default);d.default=p},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(12);function _(g){var h=g.split("-"),o=h.slice(1).map(function(e){return e[0].toUpperCase()+e.slice(1)}).join("");return h[0]+o}var p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.keys=function(o){return(o.getAttribute("style")||"").split(";").map(function(e){var t=e.split(":");return t[0].trim()})},h.prototype.add=function(o,e){return this.canAdd(o,e)?(o.style[_(this.keyName)]=e,!0):!1},h.prototype.remove=function(o){o.style[_(this.keyName)]="",o.getAttribute("style")||o.removeAttribute("style")},h.prototype.value=function(o){var e=o.style[_(this.keyName)];return this.canAdd(o,e)?e:""},h}(m.default);d.default=p},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function p(g,h){for(var o=0;oP&&this.stack.undo.length>0){var T=this.stack.undo.pop();N=N.compose(T.undo),O=T.redo.compose(O)}else this.lastRecorded=P;this.stack.undo.push({redo:O,undo:N}),this.stack.undo.length>this.options.maxStack&&this.stack.undo.shift()}}},{key:"redo",value:function(){this.change("redo","undo")}},{key:"transform",value:function(O){this.stack.undo.forEach(function(A){A.undo=O.transform(A.undo,!0),A.redo=O.transform(A.redo,!0)}),this.stack.redo.forEach(function(A){A.undo=O.transform(A.undo,!0),A.redo=O.transform(A.redo,!0)})}},{key:"undo",value:function(){this.change("undo","redo")}}]),n}(o.default);u.DEFAULTS={delay:1e3,maxStack:100,userOnly:!1};function r(c){var n=c.ops[c.ops.length-1];return n==null?!1:n.insert!=null?typeof n.insert=="string"&&n.insert.endsWith(` +`):n.attributes!=null?Object.keys(n.attributes).some(function(v){return _.default.query(v,_.default.Scope.BLOCK)!=null}):!1}function i(c){var n=c.reduce(function(O,A){return O+=A.delete||0,O},0),v=c.length()-n;return r(c)&&(v-=1),v}d.default=u,d.getLastChangeIndex=i},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.BaseTooltip=void 0;var E=function(){function I(M,K){for(var F=0;F0&&arguments[0]!==void 0?arguments[0]:"link",q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;this.root.classList.remove("ql-hidden"),this.root.classList.add("ql-editing"),q!=null?this.textbox.value=q:F!==this.root.getAttribute("data-mode")&&(this.textbox.value=""),this.position(this.quill.getBounds(this.quill.selection.savedRange)),this.textbox.select(),this.textbox.setAttribute("placeholder",this.textbox.getAttribute("data-"+F)||""),this.root.setAttribute("data-mode",F)}},{key:"restoreFocus",value:function(){var F=this.quill.scrollingContainer.scrollTop;this.quill.focus(),this.quill.scrollingContainer.scrollTop=F}},{key:"save",value:function(){var F=this.textbox.value;switch(this.root.getAttribute("data-mode")){case"link":{var q=this.quill.root.scrollTop;this.linkRange?(this.quill.formatText(this.linkRange,"link",F,e.default.sources.USER),delete this.linkRange):(this.restoreFocus(),this.quill.format("link",F,e.default.sources.USER)),this.quill.root.scrollTop=q;break}case"video":F=j(F);case"formula":{if(!F)break;var U=this.quill.getSelection(!0);if(U!=null){var G=U.index+U.length;this.quill.insertEmbed(G,this.root.getAttribute("data-mode"),F,e.default.sources.USER),this.root.getAttribute("data-mode")==="formula"&&this.quill.insertText(G+1," ",e.default.sources.USER),this.quill.setSelection(G+2,e.default.sources.USER)}break}}this.textbox.value="",this.hide()}}]),M}(N.default);function j(I){var M=I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtube\.com\/watch.*v=([a-zA-Z0-9_-]+)/)||I.match(/^(?:(https?):\/\/)?(?:(?:www|m)\.)?youtu\.be\/([a-zA-Z0-9_-]+)/);return M?(M[1]||"https")+"://www.youtube.com/embed/"+M[2]+"?showinfo=0":(M=I.match(/^(?:(https?):\/\/)?(?:www\.)?vimeo\.com\/(\d+)/))?(M[1]||"https")+"://player.vimeo.com/video/"+M[2]+"/":I}function k(I,M){var K=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;M.forEach(function(F){var q=document.createElement("option");F===K?q.setAttribute("selected","selected"):q.setAttribute("value",F),I.appendChild(q)})}d.BaseTooltip=H,d.default=J},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function m(){this.head=this.tail=null,this.length=0}return m.prototype.append=function(){for(var _=[],p=0;p1&&this.append.apply(this,_.slice(1))},m.prototype.contains=function(_){for(var p,g=this.iterator();p=g();)if(p===_)return!0;return!1},m.prototype.insertBefore=function(_,p){!_||(_.next=p,p!=null?(_.prev=p.prev,p.prev!=null&&(p.prev.next=_),p.prev=_,p===this.head&&(this.head=_)):this.tail!=null?(this.tail.next=_,_.prev=this.tail,this.tail=_):(_.prev=null,this.head=this.tail=_),this.length+=1)},m.prototype.offset=function(_){for(var p=0,g=this.head;g!=null;){if(g===_)return p;p+=g.length(),g=g.next}return-1},m.prototype.remove=function(_){!this.contains(_)||(_.prev!=null&&(_.prev.next=_.next),_.next!=null&&(_.next.prev=_.prev),_===this.head&&(this.head=_.next),_===this.tail&&(this.tail=_.prev),this.length-=1)},m.prototype.iterator=function(_){return _===void 0&&(_=this.head),function(){var p=_;return _!=null&&(_=_.next),p}},m.prototype.find=function(_,p){p===void 0&&(p=!1);for(var g,h=this.iterator();g=h();){var o=g.length();if(_f?g(t,_-f,Math.min(p,f+u-_)):g(t,0,Math.min(u,_+p-f)),f+=u}},m.prototype.map=function(_){return this.reduce(function(p,g){return p.push(_(g)),p},[])},m.prototype.reduce=function(_,p){for(var g,h=this.iterator();g=h();)p=_(p,g);return p},m}();d.default=E},function(y,d,s){var E=this&&this.__extends||function(){var o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var f in t)t.hasOwnProperty(f)&&(e[f]=t[f])};return function(e,t){o(e,t);function f(){this.constructor=e}e.prototype=t===null?Object.create(t):(f.prototype=t.prototype,new f)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(17),_=s(1),p={attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0},g=100,h=function(o){E(e,o);function e(t){var f=o.call(this,t)||this;return f.scroll=f,f.observer=new MutationObserver(function(a){f.update(a)}),f.observer.observe(f.domNode,p),f.attach(),f}return e.prototype.detach=function(){o.prototype.detach.call(this),this.observer.disconnect()},e.prototype.deleteAt=function(t,f){this.update(),t===0&&f===this.length()?this.children.forEach(function(a){a.remove()}):o.prototype.deleteAt.call(this,t,f)},e.prototype.formatAt=function(t,f,a,u){this.update(),o.prototype.formatAt.call(this,t,f,a,u)},e.prototype.insertAt=function(t,f,a){this.update(),o.prototype.insertAt.call(this,t,f,a)},e.prototype.optimize=function(t,f){var a=this;t===void 0&&(t=[]),f===void 0&&(f={}),o.prototype.optimize.call(this,f);for(var u=[].slice.call(this.observer.takeRecords());u.length>0;)t.push(u.pop());for(var r=function(v,O){O===void 0&&(O=!0),!(v==null||v===a)&&v.domNode.parentNode!=null&&(v.domNode[_.DATA_KEY].mutations==null&&(v.domNode[_.DATA_KEY].mutations=[]),O&&r(v.parent))},i=function(v){v.domNode[_.DATA_KEY]==null||v.domNode[_.DATA_KEY].mutations==null||(v instanceof m.default&&v.children.forEach(i),v.optimize(f))},c=t,n=0;c.length>0;n+=1){if(n>=g)throw new Error("[Parchment] Maximum optimize iterations reached");for(c.forEach(function(v){var O=_.find(v.target,!0);O!=null&&(O.domNode===v.target&&(v.type==="childList"?(r(_.find(v.previousSibling,!1)),[].forEach.call(v.addedNodes,function(A){var N=_.find(A,!1);r(N,!1),N instanceof m.default&&N.children.forEach(function(P){r(P,!1)})})):v.type==="attributes"&&r(O.prev)),r(O))}),this.children.forEach(i),c=[].slice.call(this.observer.takeRecords()),u=c.slice();u.length>0;)t.push(u.pop())}},e.prototype.update=function(t,f){var a=this;f===void 0&&(f={}),t=t||this.observer.takeRecords(),t.map(function(u){var r=_.find(u.target,!0);return r==null?null:r.domNode[_.DATA_KEY].mutations==null?(r.domNode[_.DATA_KEY].mutations=[u],r):(r.domNode[_.DATA_KEY].mutations.push(u),null)}).forEach(function(u){u==null||u===a||u.domNode[_.DATA_KEY]==null||u.update(u.domNode[_.DATA_KEY].mutations||[],f)}),this.domNode[_.DATA_KEY].mutations!=null&&o.prototype.update.call(this,this.domNode[_.DATA_KEY].mutations,f),this.optimize(t,f)},e.blotName="scroll",e.defaultChild="block",e.scope=_.Scope.BLOCK_BLOT,e.tagName="DIV",e}(m.default);d.default=h},function(y,d,s){var E=this&&this.__extends||function(){var h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(o,e){o.__proto__=e}||function(o,e){for(var t in e)e.hasOwnProperty(t)&&(o[t]=e[t])};return function(o,e){h(o,e);function t(){this.constructor=o}o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(18),_=s(1);function p(h,o){if(Object.keys(h).length!==Object.keys(o).length)return!1;for(var e in h)if(h[e]!==o[e])return!1;return!0}var g=function(h){E(o,h);function o(){return h!==null&&h.apply(this,arguments)||this}return o.formats=function(e){if(e.tagName!==o.tagName)return h.formats.call(this,e)},o.prototype.format=function(e,t){var f=this;e===this.statics.blotName&&!t?(this.children.forEach(function(a){a instanceof m.default||(a=a.wrap(o.blotName,!0)),f.attributes.copy(a)}),this.unwrap()):h.prototype.format.call(this,e,t)},o.prototype.formatAt=function(e,t,f,a){if(this.formats()[f]!=null||_.query(f,_.Scope.ATTRIBUTE)){var u=this.isolate(e,t);u.format(f,a)}else h.prototype.formatAt.call(this,e,t,f,a)},o.prototype.optimize=function(e){h.prototype.optimize.call(this,e);var t=this.formats();if(Object.keys(t).length===0)return this.unwrap();var f=this.next;f instanceof o&&f.prev===this&&p(t,f.formats())&&(f.moveChildren(this),f.remove())},o.blotName="inline",o.scope=_.Scope.INLINE_BLOT,o.tagName="SPAN",o}(m.default);d.default=g},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(18),_=s(1),p=function(g){E(h,g);function h(){return g!==null&&g.apply(this,arguments)||this}return h.formats=function(o){var e=_.query(h.blotName).tagName;if(o.tagName!==e)return g.formats.call(this,o)},h.prototype.format=function(o,e){_.query(o,_.Scope.BLOCK)!=null&&(o===this.statics.blotName&&!e?this.replaceWith(h.blotName):g.prototype.format.call(this,o,e))},h.prototype.formatAt=function(o,e,t,f){_.query(t,_.Scope.BLOCK)!=null?this.format(t,f):g.prototype.formatAt.call(this,o,e,t,f)},h.prototype.insertAt=function(o,e,t){if(t==null||_.query(e,_.Scope.INLINE)!=null)g.prototype.insertAt.call(this,o,e,t);else{var f=this.split(o),a=_.create(e,t);f.parent.insertBefore(a,f)}},h.prototype.update=function(o,e){navigator.userAgent.match(/Trident/)?this.build():g.prototype.update.call(this,o,e)},h.blotName="block",h.scope=_.Scope.BLOCK_BLOT,h.tagName="P",h}(m.default);d.default=p},function(y,d,s){var E=this&&this.__extends||function(){var p=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(g,h){g.__proto__=h}||function(g,h){for(var o in h)h.hasOwnProperty(o)&&(g[o]=h[o])};return function(g,h){p(g,h);function o(){this.constructor=g}g.prototype=h===null?Object.create(h):(o.prototype=h.prototype,new o)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(19),_=function(p){E(g,p);function g(){return p!==null&&p.apply(this,arguments)||this}return g.formats=function(h){},g.prototype.format=function(h,o){p.prototype.formatAt.call(this,0,this.length(),h,o)},g.prototype.formatAt=function(h,o,e,t){h===0&&o===this.length()?this.format(e,t):p.prototype.formatAt.call(this,h,o,e,t)},g.prototype.formats=function(){return this.statics.formats(this.domNode)},g}(m.default);d.default=_},function(y,d,s){var E=this&&this.__extends||function(){var g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(h,o){h.__proto__=o}||function(h,o){for(var e in o)o.hasOwnProperty(e)&&(h[e]=o[e])};return function(h,o){g(h,o);function e(){this.constructor=h}h.prototype=o===null?Object.create(o):(e.prototype=o.prototype,new e)}}();Object.defineProperty(d,"__esModule",{value:!0});var m=s(19),_=s(1),p=function(g){E(h,g);function h(o){var e=g.call(this,o)||this;return e.text=e.statics.value(e.domNode),e}return h.create=function(o){return document.createTextNode(o)},h.value=function(o){var e=o.data;return e.normalize&&(e=e.normalize()),e},h.prototype.deleteAt=function(o,e){this.domNode.data=this.text=this.text.slice(0,o)+this.text.slice(o+e)},h.prototype.index=function(o,e){return this.domNode===o?e:-1},h.prototype.insertAt=function(o,e,t){t==null?(this.text=this.text.slice(0,o)+e+this.text.slice(o),this.domNode.data=this.text):g.prototype.insertAt.call(this,o,e,t)},h.prototype.length=function(){return this.text.length},h.prototype.optimize=function(o){g.prototype.optimize.call(this,o),this.text=this.statics.value(this.domNode),this.text.length===0?this.remove():this.next instanceof h&&this.next.prev===this&&(this.insertAt(this.length(),this.next.value()),this.next.remove())},h.prototype.position=function(o,e){return[this.domNode,o]},h.prototype.split=function(o,e){if(e===void 0&&(e=!1),!e){if(o===0)return this;if(o===this.length())return this.next}var t=_.create(this.domNode.splitText(o));return this.parent.insertBefore(t,this.next),this.text=this.statics.value(this.domNode),t},h.prototype.update=function(o,e){var t=this;o.some(function(f){return f.type==="characterData"&&f.target===t.domNode})&&(this.text=this.statics.value(this.domNode))},h.prototype.value=function(){return this.text},h.blotName="text",h.scope=_.Scope.INLINE_BLOT,h}(m.default);d.default=p},function(y,d,s){var E=document.createElement("div");if(E.classList.toggle("test-class",!1),E.classList.contains("test-class")){var m=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(_,p){return arguments.length>1&&!this.contains(_)==!p?p:m.call(this,_)}}String.prototype.startsWith||(String.prototype.startsWith=function(_,p){return p=p||0,this.substr(p,_.length)===_}),String.prototype.endsWith||(String.prototype.endsWith=function(_,p){var g=this.toString();(typeof p!="number"||!isFinite(p)||Math.floor(p)!==p||p>g.length)&&(p=g.length),p-=_.length;var h=g.indexOf(_,p);return h!==-1&&h===p}),Array.prototype.find||Object.defineProperty(Array.prototype,"find",{value:function(p){if(this===null)throw new TypeError("Array.prototype.find called on null or undefined");if(typeof p!="function")throw new TypeError("predicate must be a function");for(var g=Object(this),h=g.length>>>0,o=arguments[1],e,t=0;tv.length?n:v,N=n.length>v.length?v:n,P=A.indexOf(N);if(P!=-1)return O=[[E,A.substring(0,P)],[m,N],[E,A.substring(P+N.length)]],n.length>v.length&&(O[0][0]=O[2][0]=s),O;if(N.length==1)return[[s,n],[E,v]];var T=t(n,v);if(T){var b=T[0],w=T[1],x=T[2],L=T[3],D=T[4],z=_(b,x),$=_(w,L);return z.concat([[m,D]],$)}return g(n,v)}function g(n,v){for(var O=n.length,A=v.length,N=Math.ceil((O+A)/2),P=N,T=2*N,b=new Array(T),w=new Array(T),x=0;xO)$+=2;else if(K>A)z+=2;else if(D){var F=P+L-k;if(F>=0&&F=q)return h(n,v,M,K)}}}for(var U=-j+J;U<=j-H;U+=2){var F=P+U,q;U==-j||U!=j&&w[F-1]O)H+=2;else if(G>A)J+=2;else if(!D){var I=P+L-U;if(I>=0&&I=q)return h(n,v,M,K)}}}}return[[s,n],[E,v]]}function h(n,v,O,A){var N=n.substring(0,O),P=v.substring(0,A),T=n.substring(O),b=v.substring(A),w=_(N,P),x=_(T,b);return w.concat(x)}function o(n,v){if(!n||!v||n.charAt(0)!=v.charAt(0))return 0;for(var O=0,A=Math.min(n.length,v.length),N=A,P=0;Ov.length?n:v,A=n.length>v.length?v:n;if(O.length<4||A.length*2=$.length?[M,K,F,q,I]:null}var P=N(O,A,Math.ceil(O.length/4)),T=N(O,A,Math.ceil(O.length/2)),b;if(!P&&!T)return null;T?P?b=P[4].length>T[4].length?P:T:b=T:b=P;var w,x,L,D;n.length>v.length?(w=b[0],x=b[1],L=b[2],D=b[3]):(L=b[0],D=b[1],w=b[2],x=b[3]);var z=b[4];return[w,x,L,D,z]}function f(n){n.push([m,""]);for(var v=0,O=0,A=0,N="",P="",T;v1?(O!==0&&A!==0&&(T=o(P,N),T!==0&&(v-O-A>0&&n[v-O-A-1][0]==m?n[v-O-A-1][1]+=P.substring(0,T):(n.splice(0,0,[m,P.substring(0,T)]),v++),P=P.substring(T),N=N.substring(T)),T=e(P,N),T!==0&&(n[v][1]=P.substring(P.length-T)+n[v][1],P=P.substring(0,P.length-T),N=N.substring(0,N.length-T))),O===0?n.splice(v-A,O+A,[E,P]):A===0?n.splice(v-O,O+A,[s,N]):n.splice(v-O-A,O+A,[s,N],[E,P]),v=v-O-A+(O?1:0)+(A?1:0)+1):v!==0&&n[v-1][0]==m?(n[v-1][1]+=n[v][1],n.splice(v,1)):v++,A=0,O=0,N="",P="";break}n[n.length-1][1]===""&&n.pop();var b=!1;for(v=1;v0&&A.splice(N+2,0,[T[0],b]),c(A,N,3)}else return n}function i(n){for(var v=!1,O=function(T){return T.charCodeAt(0)>=56320&&T.charCodeAt(0)<=57343},A=function(T){return T.charCodeAt(T.length-1)>=55296&&T.charCodeAt(T.length-1)<=56319},N=2;N0&&P.push(n[N]);return P}function c(n,v,O){for(var A=v+O-1;A>=0&&A>=v-1;A--)if(A+1\r?\n +\<"),this.convert();var Q=this.quill.getFormat(this.quill.selection.savedRange.index);if(Q[A.default.blotName]){var se=this.container.innerText;return this.container.innerHTML="",new o.default().insert(se,x({},A.default.blotName,Q[A.default.blotName]))}var oe=this.prepareMatching(),le=m(oe,2),Ne=le[0],Oe=le[1],pe=U(this.container,Ne,Oe);return F(pe,` +`)&&pe.ops[pe.ops.length-1].attributes==null&&(pe=pe.compose(new o.default().retain(pe.length()-1).delete(1))),$.log("convert",this.container.innerHTML,pe),this.container.innerHTML="",pe}},{key:"dangerouslyPasteHTML",value:function(te,Q){var se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:a.default.sources.API;if(typeof te=="string")this.quill.setContents(this.convert(te),Q),this.quill.setSelection(0,a.default.sources.SILENT);else{var oe=this.convert(Q);this.quill.updateContents(new o.default().retain(te).concat(oe),se),this.quill.setSelection(te+oe.length(),a.default.sources.SILENT)}}},{key:"onPaste",value:function(te){var Q=this;if(!(te.defaultPrevented||!this.quill.isEnabled())){var se=this.quill.getSelection(),oe=new o.default().retain(se.index),le=this.quill.scrollingContainer.scrollTop;this.container.focus(),this.quill.selection.update(a.default.sources.SILENT),setTimeout(function(){oe=oe.concat(Q.convert()).delete(se.length),Q.quill.updateContents(oe,a.default.sources.USER),Q.quill.setSelection(oe.length()-se.length,a.default.sources.SILENT),Q.quill.scrollingContainer.scrollTop=le,Q.quill.focus()},1)}}},{key:"prepareMatching",value:function(){var te=this,Q=[],se=[];return this.matchers.forEach(function(oe){var le=m(oe,2),Ne=le[0],Oe=le[1];switch(Ne){case Node.TEXT_NODE:se.push(Oe);break;case Node.ELEMENT_NODE:Q.push(Oe);break;default:[].forEach.call(te.container.querySelectorAll(Ne),function(pe){pe[J]=pe[J]||[],pe[J].push(Oe)});break}}),[Q,se]}}]),Y}(c.default);I.DEFAULTS={matchers:[],matchVisual:!0};function M(W,Y,ee){return(typeof Y>"u"?"undefined":E(Y))==="object"?Object.keys(Y).reduce(function(te,Q){return M(te,Q,Y[Q])},W):W.reduce(function(te,Q){return Q.attributes&&Q.attributes[Y]?te.push(Q):te.insert(Q.insert,(0,g.default)({},x({},Y,ee),Q.attributes))},new o.default)}function K(W){if(W.nodeType!==Node.ELEMENT_NODE)return{};var Y="__ql-computed-style";return W[Y]||(W[Y]=window.getComputedStyle(W))}function F(W,Y){for(var ee="",te=W.ops.length-1;te>=0&&ee.length-1}function U(W,Y,ee){return W.nodeType===W.TEXT_NODE?ee.reduce(function(te,Q){return Q(W,te)},new o.default):W.nodeType===W.ELEMENT_NODE?[].reduce.call(W.childNodes||[],function(te,Q){var se=U(Q,Y,ee);return Q.nodeType===W.ELEMENT_NODE&&(se=Y.reduce(function(oe,le){return le(Q,oe)},se),se=(Q[J]||[]).reduce(function(oe,le){return le(Q,oe)},se)),te.concat(se)},new o.default):new o.default}function G(W,Y,ee){return M(ee,W,!0)}function V(W,Y){var ee=t.default.Attributor.Attribute.keys(W),te=t.default.Attributor.Class.keys(W),Q=t.default.Attributor.Style.keys(W),se={};return ee.concat(te).concat(Q).forEach(function(oe){var le=t.default.query(oe,t.default.Scope.ATTRIBUTE);le!=null&&(se[le.attrName]=le.value(W),se[le.attrName])||(le=j[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(se[le.attrName]=le.value(W)||void 0),le=k[oe],le!=null&&(le.attrName===oe||le.keyName===oe)&&(le=k[oe],se[le.attrName]=le.value(W)||void 0))}),Object.keys(se).length>0&&(Y=M(Y,se)),Y}function X(W,Y){var ee=t.default.query(W);if(ee==null)return Y;if(ee.prototype instanceof t.default.Embed){var te={},Q=ee.value(W);Q!=null&&(te[ee.blotName]=Q,Y=new o.default().insert(te,ee.formats(W)))}else typeof ee.formats=="function"&&(Y=M(Y,ee.blotName,ee.formats(W)));return Y}function ne(W,Y){return F(Y,` +`)||Y.insert(` +`),Y}function ie(){return new o.default}function ae(W,Y){var ee=t.default.query(W);if(ee==null||ee.blotName!=="list-item"||!F(Y,` +`))return Y;for(var te=-1,Q=W.parentNode;!Q.classList.contains("ql-clipboard");)(t.default.query(Q)||{}).blotName==="list"&&(te+=1),Q=Q.parentNode;return te<=0?Y:Y.compose(new o.default().retain(Y.length()-1).retain(1,{indent:te}))}function fe(W,Y){return F(Y,` +`)||(q(W)||Y.length()>0&&W.nextSibling&&q(W.nextSibling))&&Y.insert(` +`),Y}function he(W,Y){if(q(W)&&W.nextElementSibling!=null&&!F(Y,` + +`)){var ee=W.offsetHeight+parseFloat(K(W).marginTop)+parseFloat(K(W).marginBottom);W.nextElementSibling.offsetTop>W.offsetTop+ee*1.5&&Y.insert(` +`)}return Y}function me(W,Y){var ee={},te=W.style||{};return te.fontStyle&&K(W).fontStyle==="italic"&&(ee.italic=!0),te.fontWeight&&(K(W).fontWeight.startsWith("bold")||parseInt(K(W).fontWeight)>=700)&&(ee.bold=!0),Object.keys(ee).length>0&&(Y=M(Y,ee)),parseFloat(te.textIndent||0)>0&&(Y=new o.default().insert(" ").concat(Y)),Y}function ge(W,Y){var ee=W.data;if(W.parentNode.tagName==="O:P")return Y.insert(ee.trim());if(ee.trim().length===0&&W.parentNode.classList.contains("ql-clipboard"))return Y;if(!K(W.parentNode).whiteSpace.startsWith("pre")){var te=function(se,oe){return oe=oe.replace(/[^\u00a0]/g,""),oe.length<1&&se?" ":oe};ee=ee.replace(/\r\n/g," ").replace(/\n/g," "),ee=ee.replace(/\s\s+/g,te.bind(te,!0)),(W.previousSibling==null&&q(W.parentNode)||W.previousSibling!=null&&q(W.previousSibling))&&(ee=ee.replace(/^\s+/,te.bind(te,!1))),(W.nextSibling==null&&q(W.parentNode)||W.nextSibling!=null&&q(W.nextSibling))&&(ee=ee.replace(/\s+$/,te.bind(te,!1)))}return Y.insert(ee)}d.default=I,d.matchAttributor=V,d.matchBlot=X,d.matchNewline=fe,d.matchSpacing=he,d.matchText=ge},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r '},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;rt.right&&(a=t.right-f.right,this.root.style.left=o+a+"px"),f.leftt.bottom){var u=f.bottom-f.top,r=h.bottom-h.top+u;this.root.style.top=e-r+"px",this.root.classList.add("ql-flip")}return a}},{key:"show",value:function(){this.root.classList.remove("ql-editing"),this.root.classList.remove("ql-hidden")}}]),p}();d.default=_},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function T(b,w){var x=[],L=!0,D=!1,z=void 0;try{for(var $=b[Symbol.iterator](),J;!(L=(J=$.next()).done)&&(x.push(J.value),!(w&&x.length===w));L=!0);}catch(H){D=!0,z=H}finally{try{!L&&$.return&&$.return()}finally{if(D)throw z}}return x}return function(b,w){if(Array.isArray(b))return b;if(Symbol.iterator in Object(b))return T(b,w);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),m=function T(b,w,x){b===null&&(b=Function.prototype);var L=Object.getOwnPropertyDescriptor(b,w);if(L===void 0){var D=Object.getPrototypeOf(b);return D===null?void 0:T(D,w,x)}else{if("value"in L)return L.value;var z=L.get;return z===void 0?void 0:z.call(x)}},_=function(){function T(b,w){for(var x=0;x','','',''].join(""),d.default=N},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(29),m=Q(E),_=s(36),p=s(38),g=s(64),h=s(65),o=Q(h),e=s(66),t=Q(e),f=s(67),a=Q(f),u=s(37),r=s(26),i=s(39),c=s(40),n=s(56),v=Q(n),O=s(68),A=Q(O),N=s(27),P=Q(N),T=s(69),b=Q(T),w=s(70),x=Q(w),L=s(71),D=Q(L),z=s(72),$=Q(z),J=s(73),H=Q(J),j=s(13),k=Q(j),I=s(74),M=Q(I),K=s(75),F=Q(K),q=s(57),U=Q(q),G=s(41),V=Q(G),X=s(28),ne=Q(X),ie=s(59),ae=Q(ie),fe=s(60),he=Q(fe),me=s(61),ge=Q(me),W=s(108),Y=Q(W),ee=s(62),te=Q(ee);function Q(se){return se&&se.__esModule?se:{default:se}}m.default.register({"attributors/attribute/direction":p.DirectionAttribute,"attributors/class/align":_.AlignClass,"attributors/class/background":u.BackgroundClass,"attributors/class/color":r.ColorClass,"attributors/class/direction":p.DirectionClass,"attributors/class/font":i.FontClass,"attributors/class/size":c.SizeClass,"attributors/style/align":_.AlignStyle,"attributors/style/background":u.BackgroundStyle,"attributors/style/color":r.ColorStyle,"attributors/style/direction":p.DirectionStyle,"attributors/style/font":i.FontStyle,"attributors/style/size":c.SizeStyle},!0),m.default.register({"formats/align":_.AlignClass,"formats/direction":p.DirectionClass,"formats/indent":g.IndentClass,"formats/background":u.BackgroundStyle,"formats/color":r.ColorStyle,"formats/font":i.FontClass,"formats/size":c.SizeClass,"formats/blockquote":o.default,"formats/code-block":k.default,"formats/header":t.default,"formats/list":a.default,"formats/bold":v.default,"formats/code":j.Code,"formats/italic":A.default,"formats/link":P.default,"formats/script":b.default,"formats/strike":x.default,"formats/underline":D.default,"formats/image":$.default,"formats/video":H.default,"formats/list/item":f.ListItem,"modules/formula":M.default,"modules/syntax":F.default,"modules/toolbar":U.default,"themes/bubble":Y.default,"themes/snow":te.default,"ui/icons":V.default,"ui/picker":ne.default,"ui/icon-picker":he.default,"ui/color-picker":ae.default,"ui/tooltip":ge.default},!0),d.default=m.default},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.IndentClass=void 0;var E=function(){function a(u,r){for(var i=0;i0&&this.children.tail.format(A,N)}},{key:"formats",value:function(){return f({},this.statics.blotName,this.statics.formats(this.domNode))}},{key:"insertBefore",value:function(A,N){if(A instanceof i)m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"insertBefore",this).call(this,A,N);else{var P=N==null?this.length():N.offset(this),T=this.split(P);T.parent.insertBefore(A,T)}}},{key:"optimize",value:function(A){m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"optimize",this).call(this,A);var N=this.next;N!=null&&N.prev===this&&N.statics.blotName===this.statics.blotName&&N.domNode.tagName===this.domNode.tagName&&N.domNode.getAttribute("data-checked")===this.domNode.getAttribute("data-checked")&&(N.moveChildren(this),N.remove())}},{key:"replace",value:function(A){if(A.statics.blotName!==this.statics.blotName){var N=p.default.create(this.statics.defaultChild);A.moveChildren(N),this.appendChild(N)}m(v.prototype.__proto__||Object.getPrototypeOf(v.prototype),"replace",this).call(this,A)}}]),v}(e.default);c.blotName="list",c.scope=p.default.Scope.BLOCK_BLOT,c.tagName=["OL","UL"],c.defaultChild="list-item",c.allowedChildren=[i],d.ListItem=i,d.default=c},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=s(56),m=_(E);function _(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function h(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var o=function(e){h(t,e);function t(){return p(this,t),g(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return t}(m.default);o.blotName="italic",o.tagName=["EM","I"],d.default=o},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function f(a,u){for(var r=0;r-1?n?this.domNode.setAttribute(c,n):this.domNode.removeAttribute(c):m(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,n)}}],[{key:"create",value:function(c){var n=m(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return typeof c=="string"&&n.setAttribute("src",this.sanitize(c)),n}},{key:"formats",value:function(c){return f.reduce(function(n,v){return c.hasAttribute(v)&&(n[v]=c.getAttribute(v)),n},{})}},{key:"match",value:function(c){return/\.(jpe?g|gif|png)$/.test(c)||/^data:image\/.+;base64/.test(c)}},{key:"sanitize",value:function(c){return(0,g.sanitize)(c,["http","https","data"])?c:"//:0"}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(p.default.Embed);a.blotName="image",a.tagName="IMG",d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0});var E=function(){function u(r,i){for(var c=0;c-1?n?this.domNode.setAttribute(c,n):this.domNode.removeAttribute(c):m(r.prototype.__proto__||Object.getPrototypeOf(r.prototype),"format",this).call(this,c,n)}}],[{key:"create",value:function(c){var n=m(r.__proto__||Object.getPrototypeOf(r),"create",this).call(this,c);return n.setAttribute("frameborder","0"),n.setAttribute("allowfullscreen",!0),n.setAttribute("src",this.sanitize(c)),n}},{key:"formats",value:function(c){return f.reduce(function(n,v){return c.hasAttribute(v)&&(n[v]=c.getAttribute(v)),n},{})}},{key:"sanitize",value:function(c){return g.default.sanitize(c)}},{key:"value",value:function(c){return c.getAttribute("src")}}]),r}(_.BlockEmbed);a.blotName="video",a.className="ql-video",a.tagName="IFRAME",d.default=a},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.FormulaBlot=void 0;var E=function(){function c(n,v){for(var O=0;O0||this.cachedText==null)&&(this.domNode.innerHTML=P(T),this.domNode.normalize(),this.attach()),this.cachedText=T)}}]),A}(f.default);c.className="ql-syntax";var n=new p.default.Attributor.Class("token","hljs",{scope:p.default.Scope.INLINE}),v=function(O){i(A,O),E(A,null,[{key:"register",value:function(){h.default.register(n,!0),h.default.register(c,!0)}}]);function A(N,P){u(this,A);var T=r(this,(A.__proto__||Object.getPrototypeOf(A)).call(this,N,P));if(typeof T.options.highlight!="function")throw new Error("Syntax module requires highlight.js. Please include the library on the page before Quill.");var b=null;return T.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){clearTimeout(b),b=setTimeout(function(){T.highlight(),b=null},T.options.interval)}),T.highlight(),T}return E(A,[{key:"highlight",value:function(){var P=this;if(!this.quill.selection.composing){this.quill.update(h.default.sources.USER);var T=this.quill.getSelection();this.quill.scroll.descendants(c).forEach(function(b){b.highlight(P.options.highlight)}),this.quill.update(h.default.sources.SILENT),T!=null&&this.quill.setSelection(T,h.default.sources.SILENT)}}}]),A}(e.default);v.DEFAULTS={highlight:function(){return window.hljs==null?null:function(O){var A=window.hljs.highlightAuto(O);return A.value}}(),interval:1e3},d.CodeBlock=c,d.CodeToken=n,d.default=v},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d){y.exports=' '},function(y,d,s){Object.defineProperty(d,"__esModule",{value:!0}),d.default=d.BubbleTooltip=void 0;var E=function A(N,P,T){N===null&&(N=Function.prototype);var b=Object.getOwnPropertyDescriptor(N,P);if(b===void 0){var w=Object.getPrototypeOf(N);return w===null?void 0:A(w,P,T)}else{if("value"in b)return b.value;var x=b.get;return x===void 0?void 0:x.call(T)}},m=function(){function A(N,P){for(var T=0;T0&&D===h.default.sources.USER){b.show(),b.root.style.left="0px",b.root.style.width="",b.root.style.width=b.root.offsetWidth+"px";var z=b.quill.getLines(x.index,x.length);if(z.length===1)b.position(b.quill.getBounds(x));else{var $=z[z.length-1],J=b.quill.getIndex($),H=Math.min($.length()-1,x.index+x.length-J),j=b.quill.getBounds(new t.Range(J,H));b.position(j)}}else document.activeElement!==b.textbox&&b.quill.hasFocus()&&b.hide()}),b}return m(N,[{key:"listen",value:function(){var T=this;E(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"listen",this).call(this),this.root.querySelector(".ql-close").addEventListener("click",function(){T.root.classList.remove("ql-editing")}),this.quill.on(h.default.events.SCROLL_OPTIMIZE,function(){setTimeout(function(){if(!T.root.classList.contains("ql-hidden")){var b=T.quill.getSelection();b!=null&&T.position(T.quill.getBounds(b))}},1)})}},{key:"cancel",value:function(){this.show()}},{key:"position",value:function(T){var b=E(N.prototype.__proto__||Object.getPrototypeOf(N.prototype),"position",this).call(this,T),w=this.root.querySelector(".ql-tooltip-arrow");if(w.style.marginLeft="",b===0)return b;w.style.marginLeft=-1*b-w.offsetWidth/2+"px"}}]),N}(o.BaseTooltip);O.TEMPLATE=['','
','','',"
"].join(""),d.BubbleTooltip=O,d.default=v},function(y,d,s){y.exports=s(63)}]).default})})(Vn);const tt=nr(Vn.exports);var Ue=-1,De=1,Re=0;function wt(R,B,y,d){if(R===B)return R?[[Re,R]]:[];if(y!=null){var s=yr(R,B,y);if(s)return s}var E=Bn(R,B),m=R.substring(0,E);R=R.substring(E),B=B.substring(E),E=Cn(R,B);var _=R.substring(R.length-E);R=R.substring(0,R.length-E),B=B.substring(0,B.length-E);var p=hr(R,B);return m&&p.unshift([Re,m]),_&&p.push([Re,_]),Zn(p,d),p}function hr(R,B){var y;if(!R)return[[De,B]];if(!B)return[[Ue,R]];var d=R.length>B.length?R:B,s=R.length>B.length?B:R,E=d.indexOf(s);if(E!==-1)return y=[[De,d.substring(0,E)],[Re,s],[De,d.substring(E+s.length)]],R.length>B.length&&(y[0][0]=y[2][0]=Ue),y;if(s.length===1)return[[Ue,R],[De,B]];var m=vr(R,B);if(m){var _=m[0],p=m[1],g=m[2],h=m[3],o=m[4],e=wt(_,g),t=wt(p,h);return e.concat([[Re,o]],t)}return dr(R,B)}function dr(R,B){for(var y=R.length,d=B.length,s=Math.ceil((y+d)/2),E=s,m=2*s,_=new Array(m),p=new Array(m),g=0;gy)t+=2;else if(n>d)e+=2;else if(o){var v=E+h-r;if(v>=0&&v=O)return zn(R,B,c,n)}}}for(var A=-u+f;A<=u-a;A+=2){var v=E+A,O;A===-u||A!==u&&p[v-1]y)a+=2;else if(N>d)f+=2;else if(!o){var i=E+h-A;if(i>=0&&i=O)return zn(R,B,c,n)}}}}return[[Ue,R],[De,B]]}function zn(R,B,y,d){var s=R.substring(0,y),E=B.substring(0,d),m=R.substring(y),_=B.substring(d),p=wt(s,E),g=wt(m,_);return p.concat(g)}function Bn(R,B){if(!R||!B||R.charAt(0)!==B.charAt(0))return 0;for(var y=0,d=Math.min(R.length,B.length),s=d,E=0;yB.length?R:B,d=R.length>B.length?B:R;if(y.length<4||d.length*2=t.length?[c,n,v,O,i]:null}var E=s(y,d,Math.ceil(y.length/4)),m=s(y,d,Math.ceil(y.length/2)),_;if(!E&&!m)return null;m?E?_=E[4].length>m[4].length?E:m:_=m:_=E;var p,g,h,o;R.length>B.length?(p=_[0],g=_[1],h=_[2],o=_[3]):(h=_[0],o=_[1],p=_[2],g=_[3]);var e=_[4];return[p,g,h,o,e]}function Zn(R,B){R.push([Re,""]);for(var y=0,d=0,s=0,E="",m="",_;y=0&&Qn(R[p][1])){var g=R[p][1].slice(-1);if(R[p][1]=R[p][1].slice(0,-1),E=g+E,m=g+m,!R[p][1]){R.splice(p,1),y--;var h=p-1;R[h]&&R[h][0]===De&&(s++,m=R[h][1]+m,h--),R[h]&&R[h][0]===Ue&&(d++,E=R[h][1]+E,h--),p=h}}if(Xn(R[y][1])){var g=R[y][1].charAt(0);R[y][1]=R[y][1].slice(1),E+=g,m+=g}}if(y0||m.length>0){E.length>0&&m.length>0&&(_=Bn(m,E),_!==0&&(p>=0?R[p][1]+=m.substring(0,_):(R.splice(0,0,[Re,m.substring(0,_)]),y++),m=m.substring(_),E=E.substring(_)),_=Cn(m,E),_!==0&&(R[y][1]=m.substring(m.length-_)+R[y][1],m=m.substring(0,m.length-_),E=E.substring(0,E.length-_)));var o=s+d;E.length===0&&m.length===0?(R.splice(y-o,o),y=y-o):E.length===0?(R.splice(y-o,o,[De,m]),y=y-o+1):m.length===0?(R.splice(y-o,o,[Ue,E]),y=y-o+1):(R.splice(y-o,o,[Ue,E],[De,m]),y=y-o+2)}y!==0&&R[y-1][0]===Re?(R[y-1][1]+=R[y][1],R.splice(y,1)):y++,s=0,d=0,E="",m="";break}}R[R.length-1][1]===""&&R.pop();var e=!1;for(y=1;y=55296&&R<=56319}function Yn(R){return R>=56320&&R<=57343}function Xn(R){return Yn(R.charCodeAt(0))}function Qn(R){return Wn(R.charCodeAt(R.length-1))}function pr(R){for(var B=[],y=0;y0&&B.push(R[y]);return B}function jn(R,B,y,d){return Qn(R)||Xn(d)?null:pr([[Re,R],[Ue,B],[De,y],[Re,d]])}function yr(R,B,y){var d=typeof y=="number"?{index:y,length:0}:y.oldRange,s=typeof y=="number"?null:y.newRange,E=R.length,m=B.length;if(d.length===0&&(s===null||s.length===0)){var _=d.index,p=R.slice(0,_),g=R.slice(_),h=s?s.index:null;e:{var o=_+m-E;if(h!==null&&h!==o||o<0||o>m)break e;var e=B.slice(0,o),t=B.slice(o);if(t!==g)break e;var f=Math.min(_,o),a=p.slice(0,f),u=e.slice(0,f);if(a!==u)break e;var r=p.slice(f),i=e.slice(f);return jn(a,r,i,g)}e:{if(h!==null&&h!==_)break e;var c=_,e=B.slice(0,c),t=B.slice(c);if(e!==p)break e;var n=Math.min(E-c,m-c),v=g.slice(g.length-n),O=t.slice(t.length-n);if(v!==O)break e;var r=g.slice(0,g.length-n),i=t.slice(0,t.length-n);return jn(p,r,i,v)}}if(d.length>0&&s&&s.length===0){e:{var a=R.slice(0,d.index),v=R.slice(d.index+d.length),f=a.length,n=v.length;if(m-1}function rn(l,S){var C=this.__data__,Z=at(C,l);return Z<0?C.push([l,S]):C[Z][1]=S,this}Ee.prototype.clear=Jt,Ee.prototype.delete=en,Ee.prototype.get=tn,Ee.prototype.has=nn,Ee.prototype.set=rn;function ke(l){var S=-1,C=l?l.length:0;for(this.clear();++S-1&&l%1==0&&l-1&&l%1==0&&l<=s}function Fe(l){var S=typeof l;return!!l&&(S=="object"||S=="function")}function Ct(l){return!!l&&typeof l=="object"}function Et(l){return st(l)?ot(l):bn(l)}function qn(){return[]}function Rn(){return!1}R.exports=It})(Gt,Gt.exports);var Vt={exports:{}};(function(R,B){var y=200,d="__lodash_hash_undefined__",s=1,E=2,m=9007199254740991,_="[object Arguments]",p="[object Array]",g="[object AsyncFunction]",h="[object Boolean]",o="[object Date]",e="[object Error]",t="[object Function]",f="[object GeneratorFunction]",a="[object Map]",u="[object Number]",r="[object Null]",i="[object Object]",c="[object Promise]",n="[object Proxy]",v="[object RegExp]",O="[object Set]",A="[object String]",N="[object Symbol]",P="[object Undefined]",T="[object WeakMap]",b="[object ArrayBuffer]",w="[object DataView]",x="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",z="[object Int16Array]",$="[object Int32Array]",J="[object Uint8Array]",H="[object Uint8ClampedArray]",j="[object Uint16Array]",k="[object Uint32Array]",I=/[\\^$.*+?()[\]{}|]/g,M=/^\[object .+?Constructor\]$/,K=/^(?:0|[1-9]\d*)$/,F={};F[x]=F[L]=F[D]=F[z]=F[$]=F[J]=F[H]=F[j]=F[k]=!0,F[_]=F[p]=F[b]=F[h]=F[w]=F[o]=F[e]=F[t]=F[a]=F[u]=F[i]=F[v]=F[O]=F[A]=F[T]=!1;var q=typeof Te=="object"&&Te&&Te.Object===Object&&Te,U=typeof self=="object"&&self&&self.Object===Object&&self,G=q||U||Function("return this")(),V=B&&!B.nodeType&&B,X=V&&!0&&R&&!R.nodeType&&R,ne=X&&X.exports===V,ie=ne&&q.process,ae=function(){try{return ie&&ie.binding&&ie.binding("util")}catch{}}(),fe=ae&&ae.isTypedArray;function he(l,S){for(var C=-1,Z=l==null?0:l.length,ue=0,re=[];++C-1}function sn(l,S){var C=this.__data__,Z=lt(C,l);return Z<0?(++this.size,C.push([l,S])):C[Z][1]=S,this}ke.prototype.clear=on,ke.prototype.delete=an,ke.prototype.get=ln,ke.prototype.has=un,ke.prototype.set=sn;function Le(l){var S=-1,C=l==null?0:l.length;for(this.clear();++Sve))return!1;var ye=re.get(l);if(ye&&re.get(S))return ye==S;var Se=-1,qe=!0,_e=C&E?new ot:void 0;for(re.set(l,S),re.set(S,l);++Se-1&&l%1==0&&l-1&&l%1==0&&l<=m}function Bt(l){var S=typeof l;return l!=null&&(S=="object"||S=="function")}function Fe(l){return l!=null&&typeof l=="object"}var Ct=fe?Y(fe):En;function Et(l){return _t(l)?bn(l):An(l)}function qn(){return[]}function Rn(){return!1}R.exports=Ln})(Vt,Vt.exports);var Fn={},Jn=Te&&Te.__importDefault||function(R){return R&&R.__esModule?R:{default:R}};Object.defineProperty(Fn,"__esModule",{value:!0});var mr=Jn(Gt.exports),br=Jn(Vt.exports),Dn;(function(R){function B(E,m,_){E===void 0&&(E={}),m===void 0&&(m={}),typeof E!="object"&&(E={}),typeof m!="object"&&(m={});var p=mr.default(m);_||(p=Object.keys(p).reduce(function(h,o){return p[o]!=null&&(h[o]=p[o]),h},{}));for(var g in E)E[g]!==void 0&&m[g]===void 0&&(p[g]=E[g]);return Object.keys(p).length>0?p:void 0}R.compose=B;function y(E,m){E===void 0&&(E={}),m===void 0&&(m={}),typeof E!="object"&&(E={}),typeof m!="object"&&(m={});var _=Object.keys(E).concat(Object.keys(m)).reduce(function(p,g){return br.default(E[g],m[g])||(p[g]=m[g]===void 0?null:m[g]),p},{});return Object.keys(_).length>0?_:void 0}R.diff=y;function d(E,m){E===void 0&&(E={}),m===void 0&&(m={}),E=E||{};var _=Object.keys(m).reduce(function(p,g){return m[g]!==E[g]&&E[g]!==void 0&&(p[g]=m[g]),p},{});return Object.keys(E).reduce(function(p,g){return E[g]!==m[g]&&m[g]===void 0&&(p[g]=null),p},_)}R.invert=d;function s(E,m,_){if(_===void 0&&(_=!1),typeof E!="object")return m;if(typeof m=="object"){if(!_)return m;var p=Object.keys(m).reduce(function(g,h){return E[h]===void 0&&(g[h]=m[h]),g},{});return Object.keys(p).length>0?p:void 0}}R.transform=s})(Dn||(Dn={}));Fn.default=Dn;var Ht={},zt={},Kn;function _r(){if(Kn)return zt;Kn=1;var R=Te&&Te.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(zt,"__esModule",{value:!0});var B=R(er()),y=function(){function d(s){this.ops=s,this.index=0,this.offset=0}return d.prototype.hasNext=function(){return this.peekLength()<1/0},d.prototype.next=function(s){s||(s=1/0);var E=this.ops[this.index];if(E){var m=this.offset,_=B.default.length(E);if(s>=_-m?(s=_-m,this.index+=1,this.offset=0):this.offset+=s,typeof E.delete=="number")return{delete:s};var p={};return E.attributes&&(p.attributes=E.attributes),typeof E.retain=="number"?p.retain=s:typeof E.insert=="string"?p.insert=E.insert.substr(m,s):p.insert=E.insert,p}else return{retain:1/0}},d.prototype.peek=function(){return this.ops[this.index]},d.prototype.peekLength=function(){return this.ops[this.index]?B.default.length(this.ops[this.index])-this.offset:1/0},d.prototype.peekType=function(){return this.ops[this.index]?typeof this.ops[this.index].delete=="number"?"delete":typeof this.ops[this.index].retain=="number"?"retain":"insert":"retain"},d.prototype.rest=function(){if(this.hasNext()){if(this.offset===0)return this.ops.slice(this.index);var s=this.offset,E=this.index,m=this.next(),_=this.ops.slice(this.index);return this.offset=s,this.index=E,[m].concat(_)}else return[]},d}();return zt.default=y,zt}var $n;function er(){if($n)return Ht;$n=1;var R=Te&&Te.__importDefault||function(d){return d&&d.__esModule?d:{default:d}};Object.defineProperty(Ht,"__esModule",{value:!0});var B=R(_r()),y;return function(d){function s(m){return new B.default(m)}d.iterator=s;function E(m){return typeof m.delete=="number"?m.delete:typeof m.retain=="number"?m.retain:typeof m.insert=="string"?m.insert.length:1}d.length=E}(y||(y={})),Ht.default=y,Ht}var Tt=Te&&Te.__importDefault||function(R){return R&&R.__esModule?R:{default:R}},Kt=Tt(gr),Or=Tt(Gt.exports),In=Tt(Vt.exports),At=Tt(Fn),we=Tt(er()),Er=String.fromCharCode(0);(function(){function R(B){Array.isArray(B)?this.ops=B:B!=null&&Array.isArray(B.ops)?this.ops=B.ops:this.ops=[]}return R.prototype.insert=function(B,y){var d={};return typeof B=="string"&&B.length===0?this:(d.insert=B,y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(d.attributes=y),this.push(d))},R.prototype.delete=function(B){return B<=0?this:this.push({delete:B})},R.prototype.retain=function(B,y){if(B<=0)return this;var d={retain:B};return y!=null&&typeof y=="object"&&Object.keys(y).length>0&&(d.attributes=y),this.push(d)},R.prototype.push=function(B){var y=this.ops.length,d=this.ops[y-1];if(B=Or.default(B),typeof d=="object"){if(typeof B.delete=="number"&&typeof d.delete=="number")return this.ops[y-1]={delete:d.delete+B.delete},this;if(typeof d.delete=="number"&&B.insert!=null&&(y-=1,d=this.ops[y-1],typeof d!="object"))return this.ops.unshift(B),this;if(In.default(B.attributes,d.attributes)){if(typeof B.insert=="string"&&typeof d.insert=="string")return this.ops[y-1]={insert:d.insert+B.insert},typeof B.attributes=="object"&&(this.ops[y-1].attributes=B.attributes),this;if(typeof B.retain=="number"&&typeof d.retain=="number")return this.ops[y-1]={retain:d.retain+B.retain},typeof B.attributes=="object"&&(this.ops[y-1].attributes=B.attributes),this}}return y===this.ops.length?this.ops.push(B):this.ops.splice(y,0,B),this},R.prototype.chop=function(){var B=this.ops[this.ops.length-1];return B&&B.retain&&!B.attributes&&this.ops.pop(),this},R.prototype.filter=function(B){return this.ops.filter(B)},R.prototype.forEach=function(B){this.ops.forEach(B)},R.prototype.map=function(B){return this.ops.map(B)},R.prototype.partition=function(B){var y=[],d=[];return this.forEach(function(s){var E=B(s)?y:d;E.push(s)}),[y,d]},R.prototype.reduce=function(B,y){return this.ops.reduce(B,y)},R.prototype.changeLength=function(){return this.reduce(function(B,y){return y.insert?B+we.default.length(y):y.delete?B-y.delete:B},0)},R.prototype.length=function(){return this.reduce(function(B,y){return B+we.default.length(y)},0)},R.prototype.slice=function(B,y){B===void 0&&(B=0),y===void 0&&(y=1/0);for(var d=[],s=we.default.iterator(this.ops),E=0;E0&&d.next(E.retain-m)}for(var _=new R(s);y.hasNext()||d.hasNext();)if(d.peekType()==="insert")_.push(d.next());else if(y.peekType()==="delete")_.push(y.next());else{var p=Math.min(y.peekLength(),d.peekLength()),g=y.next(p),h=d.next(p);if(typeof h.retain=="number"){var o={};typeof g.retain=="number"?o.retain=p:o.insert=g.insert;var e=At.default.compose(g.attributes,h.attributes,typeof g.retain=="number");if(e&&(o.attributes=e),_.push(o),!d.hasNext()&&In.default(_.ops[_.ops.length-1],o)){var t=new R(y.rest());return _.concat(t).chop()}}else typeof h.delete=="number"&&typeof g.retain=="number"&&_.push(h)}return _.chop()},R.prototype.concat=function(B){var y=new R(this.ops.slice());return B.ops.length>0&&(y.push(B.ops[0]),y.ops=y.ops.concat(B.ops.slice(1))),y},R.prototype.diff=function(B,y){if(this.ops===B.ops)return new R;var d=[this,B].map(function(p){return p.map(function(g){if(g.insert!=null)return typeof g.insert=="string"?g.insert:Er;var h=p===B?"on":"with";throw new Error("diff() called "+h+" non-document")}).join("")}),s=new R,E=Kt.default(d[0],d[1],y),m=we.default.iterator(this.ops),_=we.default.iterator(B.ops);return E.forEach(function(p){for(var g=p[1].length;g>0;){var h=0;switch(p[0]){case Kt.default.INSERT:h=Math.min(_.peekLength(),g),s.push(_.next(h));break;case Kt.default.DELETE:h=Math.min(g,m.peekLength()),m.next(h),s.delete(h);break;case Kt.default.EQUAL:h=Math.min(m.peekLength(),_.peekLength(),g);var o=m.next(h),e=_.next(h);In.default(o.insert,e.insert)?s.retain(h,At.default.diff(o.attributes,e.attributes)):s.push(e).delete(h);break}g-=h}}),s.chop()},R.prototype.eachLine=function(B,y){y===void 0&&(y=` +`);for(var d=we.default.iterator(this.ops),s=new R,E=0;d.hasNext();){if(d.peekType()!=="insert")return;var m=d.peek(),_=we.default.length(m)-d.peekLength(),p=typeof m.insert=="string"?m.insert.indexOf(y,_)-_:-1;if(p<0)s.push(d.next());else if(p>0)s.push(d.next(p));else{if(B(s,d.next(1).attributes||{},E)===!1)return;E+=1,s=new R}}s.length()>0&&B(s,{},E)},R.prototype.invert=function(B){var y=new R;return this.reduce(function(d,s){if(s.insert)y.delete(we.default.length(s));else{if(s.retain&&s.attributes==null)return y.retain(s.retain),d+s.retain;if(s.delete||s.retain&&s.attributes){var E=s.delete||s.retain,m=B.slice(d,d+E);return m.forEach(function(_){s.delete?y.push(_):s.retain&&s.attributes&&y.retain(we.default.length(_),At.default.invert(s.attributes,_.attributes))}),d+E}}return d},0),y.chop()},R.prototype.transform=function(B,y){if(y===void 0&&(y=!1),y=!!y,typeof B=="number")return this.transformPosition(B,y);for(var d=B,s=we.default.iterator(this.ops),E=we.default.iterator(d.ops),m=new R;s.hasNext()||E.hasNext();)if(s.peekType()==="insert"&&(y||E.peekType()!=="insert"))m.retain(we.default.length(s.next()));else if(E.peekType()==="insert")m.push(E.next());else{var _=Math.min(s.peekLength(),E.peekLength()),p=s.next(_),g=E.next(_);if(p.delete)continue;g.delete?m.push(g):m.retain(_,At.default.transform(p.attributes,g.attributes,y))}return m.chop()},R.prototype.transformPosition=function(B,y){y===void 0&&(y=!1),y=!!y;for(var d=we.default.iterator(this.ops),s=0;d.hasNext()&&s<=B;){var E=d.peekLength(),m=d.peekType();if(d.next(),m==="delete"){B-=Math.min(E,B-s);continue}else m==="insert"&&(s{}},contentType:{type:String,default:"delta",validator:R=>["delta","html","text"].includes(R)},enable:{type:Boolean,default:!0},readOnly:{type:Boolean,default:!1},placeholder:{type:String,required:!1},theme:{type:String,default:"snow",validator:R=>["snow","bubble",""].includes(R)},toolbar:{type:[String,Array,Object],required:!1,validator:R=>typeof R=="string"&&R!==""?R.charAt(0)==="#"?!0:Object.keys(Gn).indexOf(R)!==-1:!0},modules:{type:Object,required:!1},options:{type:Object,required:!1},globalOptions:{type:Object,required:!1}},emits:["textChange","selectionChange","editorChange","update:content","focus","blur","ready"],setup:(R,B)=>{ir(()=>{E()}),or(()=>{y=null});let y,d;const s=$t(),E=()=>{var O;if(!!s.value){if(d=m(),R.modules)if(Array.isArray(R.modules))for(const A of R.modules)tt.register(`modules/${A.name}`,A.module);else tt.register(`modules/${R.modules.name}`,R.modules.module);y=new tt(s.value,d),a(R.content),y.on("text-change",_),y.on("selection-change",g),y.on("editor-change",h),R.theme!=="bubble"&&s.value.classList.remove("ql-bubble"),R.theme!=="snow"&&s.value.classList.remove("ql-snow"),(O=y.getModule("toolbar"))===null||O===void 0||O.container.addEventListener("mousedown",A=>{A.preventDefault()}),B.emit("ready",y)}},m=()=>{const O={};if(R.theme!==""&&(O.theme=R.theme),R.readOnly&&(O.readOnly=R.readOnly),R.placeholder&&(O.placeholder=R.placeholder),R.toolbar&&R.toolbar!==""&&(O.modules={toolbar:(()=>{if(typeof R.toolbar=="object")return R.toolbar;if(typeof R.toolbar=="string")return R.toolbar.charAt(0)==="#"?R.toolbar:Gn[R.toolbar]})()}),R.modules){const A=(()=>{var N,P;const T={};if(Array.isArray(R.modules))for(const b of R.modules)T[b.name]=(N=b.options)!==null&&N!==void 0?N:{};else T[R.modules.name]=(P=R.modules.options)!==null&&P!==void 0?P:{};return T})();O.modules=Object.assign({},O.modules,A)}return Object.assign({},R.globalOptions,R.options,O)},_=(O,A,N)=>{B.emit("update:content",f()),B.emit("textChange",{delta:O,oldContents:A,source:N})},p=$t(),g=(O,A,N)=>{p.value=!!(y!=null&&y.hasFocus()),B.emit("selectionChange",{range:O,oldRange:A,source:N})};Mn(p,O=>{O?B.emit("focus",s):B.emit("blur",s)});const h=(...O)=>{O[0]==="text-change"&&B.emit("editorChange",{name:O[0],delta:O[1],oldContents:O[2],source:O[3]}),O[0]==="selection-change"&&B.emit("editorChange",{name:O[0],range:O[1],oldRange:O[2],source:O[3]})},o=()=>s.value,e=()=>{var O;return(O=y==null?void 0:y.getModule("toolbar"))===null||O===void 0?void 0:O.container},t=()=>{if(y)return y;throw`The quill editor hasn't been instantiated yet, + make sure to call this method when the editor ready + or use v-on:ready="onReady(quill)" event instead.`},f=(O,A)=>R.contentType==="html"?i():R.contentType==="text"?u(O,A):y==null?void 0:y.getContents(O,A),a=(O,A="api")=>{R.contentType==="html"?c(O):R.contentType==="text"?r(O,A):y==null||y.setContents(O,A)},u=(O,A)=>{var N;return(N=y==null?void 0:y.getText(O,A))!==null&&N!==void 0?N:""},r=(O,A="api")=>{y==null||y.setText(O,A)},i=()=>{var O;return(O=y==null?void 0:y.root.innerHTML)!==null&&O!==void 0?O:""},c=O=>{y&&(y.root.innerHTML=O)},n=(O,A="api")=>{const N=y==null?void 0:y.clipboard.convert(O);N&&(y==null||y.setContents(N,A))},v=()=>{lr(()=>{var O;!B.slots.toolbar&&y&&((O=y.getModule("toolbar"))===null||O===void 0||O.container.remove()),E()})};return Mn(()=>R.enable,O=>{y&&y.enable(O)}),{editor:s,getEditor:o,getToolbar:e,getQuill:t,getContents:f,setContents:a,getHTML:i,setHTML:c,pasteHTML:n,getText:u,setText:r,reinit:v}},render(){var R,B;return[(B=(R=this.$slots).toolbar)===null||B===void 0?void 0:B.call(R),ar("div",{ref:"editor",...this.$attrs})]}});const wr=tt.import("blots/block");class Nt extends wr{static create(B){const y=super.create(B);if(B===!0)return y;const d=document.createElement("img");return d.setAttribute("src",B),y.appendChild(d),y}deleteAt(B,y){super.deleteAt(B,y),this.cache={}}static value(B){const{src:y,custom:d}=B.dataset;return{src:y,custom:d}}}Nt.blotName="imageBlot";Nt.className="image-uploading";Nt.tagName="span";tt.register({"formats/imageBlot":Nt});class tr{constructor(B,y){this.quill=B,this.options=y,this.range=null,typeof this.options.upload!="function"&&console.warn("[Missing config] upload function that returns a promise is required");var d=this.quill.getModule("toolbar");d.addHandler("image",this.selectLocalImage.bind(this)),this.handleDrop=this.handleDrop.bind(this),this.handlePaste=this.handlePaste.bind(this),this.quill.root.addEventListener("drop",this.handleDrop,!1),this.quill.root.addEventListener("paste",this.handlePaste,!1)}selectLocalImage(){this.quill.focus(),this.range=this.quill.getSelection(),this.fileHolder=document.createElement("input"),this.fileHolder.setAttribute("type","file"),this.fileHolder.setAttribute("accept","image/*"),this.fileHolder.setAttribute("style","visibility:hidden"),this.fileHolder.onchange=this.fileChanged.bind(this),document.body.appendChild(this.fileHolder),this.fileHolder.click(),window.requestAnimationFrame(()=>{document.body.removeChild(this.fileHolder)})}handleDrop(B){if(B.stopPropagation(),B.preventDefault(),B.dataTransfer&&B.dataTransfer.files&&B.dataTransfer.files.length){if(document.caretRangeFromPoint){const d=document.getSelection(),s=document.caretRangeFromPoint(B.clientX,B.clientY);d&&s&&d.setBaseAndExtent(s.startContainer,s.startOffset,s.startContainer,s.startOffset)}else{const d=document.getSelection(),s=document.caretPositionFromPoint(B.clientX,B.clientY);d&&s&&d.setBaseAndExtent(s.offsetNode,s.offset,s.offsetNode,s.offset)}this.quill.focus(),this.range=this.quill.getSelection();let y=B.dataTransfer.files[0];setTimeout(()=>{this.quill.focus(),this.range=this.quill.getSelection(),this.readAndUploadFile(y)},0)}}handlePaste(B){let y=B.clipboardData||window.clipboardData;if(y&&(y.items||y.files)){let d=y.items||y.files;const s=/^image\/(jpe?g|gif|png|svg|webp)$/i;for(let E=0;E{this.quill.focus(),this.range=this.quill.getSelection(),this.readAndUploadFile(m)},0))}}}readAndUploadFile(B){let y=!1;const d=new FileReader;d.addEventListener("load",()=>{if(!y){let s=d.result;this.insertBase64Image(s)}},!1),B&&d.readAsDataURL(B),this.options.upload(B).then(s=>{this.insertToEditor(s)},s=>{y=!0,this.removeBase64Image(),console.warn(s)})}fileChanged(){const B=this.fileHolder.files[0];this.readAndUploadFile(B)}insertBase64Image(B){const y=this.range;this.quill.insertEmbed(y.index,Nt.blotName,`${B}`,"user")}insertToEditor(B){const y=this.range;this.quill.deleteText(y.index,3,"user"),this.quill.insertEmbed(y.index,"image",`${B}`,"user"),y.index++,this.quill.setSelection(y,"user")}removeBase64Image(){const B=this.range;this.quill.deleteText(B.index,3,"user")}}window.ImageUploader=tr;const Nr={__name:"Editor",props:{content:{type:String,default:""}},setup(R,{expose:B}){const y=R;tt.imports["modules/ImageUploader"]||tt.register("modules/ImageUploader",tr);const d=$t(null),s=$t("");Mn(()=>y.content,()=>{s.value=y.content,d.value.setHTML(s.value)});const E=o=>({"image/png":"png","image/jpeg":"jpeg"})[o],m=(o,e)=>{cr("danger",o,e)},_=o=>new Promise((e,t)=>{const f=new FileReader;f.readAsArrayBuffer(o),f.onload=a=>{const{result:u}=a.target;e(u)},f.onerror=t}),h={modules:{ImageUploader:{upload(o){return new Promise((e,t)=>{const{type:f,size:a}=o;if(!E(f)){m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"),t(new Error("\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"));return}const u=1024*1024*3;if(a>=u){m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"),t(new Error("\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"));return}async function r(){if(o){const i=new FileReader;i.onload=c=>{const n=new Image;n.onload=()=>{const O=`/v1/common/upload/image/${o.type.split("/")[1]}`;(async()=>{try{const N=await _(o),{data:P}=await Hn.get(O),T=P.image_url,b=P.upload_url,w={transformRequest(x,L){return delete L.common.Authorization,x},headers:{"Content-Type":o.type},withCredentials:!1};await Hn.put(b,N,w),e(T)}catch{m("\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"),t(new Error("\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"))}})()},n.src=c.target.result},i.readAsDataURL(o)}}r()})}},toolbar:[[{header:[1,2,3,4,5,6,!1]}],["bold","italic","underline","strike"],["code","code-block"],[{list:"ordered"},{list:"bullet"}],["image","link"],["clean"]]},placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9..."};return B({editorContent:s}),(o,e)=>(ur(),sr(fr(Ar),{ref_key:"editorRef",ref:d,content:s.value,"onUpdate:content":e[0]||(e[0]=t=>s.value=t),theme:"snow","content-type":"html",options:h,placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9...",class:"quill-height-300px"},null,8,["content"]))}};export{tr as I,Nr as _}; diff --git a/assets/Editor.86746698.css b/assets/Editor.86746698.css new file mode 100644 index 0000000..39e5590 --- /dev/null +++ b/assets/Editor.86746698.css @@ -0,0 +1 @@ +.ql-container{box-sizing:border-box;font-family:Helvetica,Arial,sans-serif;font-size:13px;height:100%;margin:0;position:relative}.ql-container.ql-disabled .ql-tooltip{visibility:hidden}.ql-container.ql-disabled .ql-editor ul[data-checked]>li:before{pointer-events:none}.ql-clipboard{left:-100000px;height:1px;overflow-y:hidden;position:absolute;top:50%}.ql-clipboard p{margin:0;padding:0}.ql-editor{box-sizing:border-box;line-height:1.42;height:100%;outline:none;overflow-y:auto;padding:12px 15px;tab-size:4;-moz-tab-size:4;text-align:left;white-space:pre-wrap;word-wrap:break-word}.ql-editor>*{cursor:text}.ql-editor p,.ql-editor ol,.ql-editor ul,.ql-editor pre,.ql-editor blockquote,.ql-editor h1,.ql-editor h2,.ql-editor h3,.ql-editor h4,.ql-editor h5,.ql-editor h6{margin:0;padding:0;counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol,.ql-editor ul{padding-left:1.5em}.ql-editor ol>li,.ql-editor ul>li{list-style-type:none}.ql-editor ul>li:before{content:"\2022"}.ql-editor ul[data-checked=true],.ql-editor ul[data-checked=false]{pointer-events:none}.ql-editor ul[data-checked=true]>li *,.ql-editor ul[data-checked=false]>li *{pointer-events:all}.ql-editor ul[data-checked=true]>li:before,.ql-editor ul[data-checked=false]>li:before{color:#777;cursor:pointer;pointer-events:all}.ql-editor ul[data-checked=true]>li:before{content:"\2611"}.ql-editor ul[data-checked=false]>li:before{content:"\2610"}.ql-editor li:before{display:inline-block;white-space:nowrap;width:1.2em}.ql-editor li:not(.ql-direction-rtl):before{margin-left:-1.5em;margin-right:.3em;text-align:right}.ql-editor li.ql-direction-rtl:before{margin-left:.3em;margin-right:-1.5em}.ql-editor ol li:not(.ql-direction-rtl),.ql-editor ul li:not(.ql-direction-rtl){padding-left:1.5em}.ql-editor ol li.ql-direction-rtl,.ql-editor ul li.ql-direction-rtl{padding-right:1.5em}.ql-editor ol li{counter-reset:list-1 list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9;counter-increment:list-0}.ql-editor ol li:before{content:counter(list-0,decimal) ". "}.ql-editor ol li.ql-indent-1{counter-increment:list-1}.ql-editor ol li.ql-indent-1:before{content:counter(list-1,lower-alpha) ". "}.ql-editor ol li.ql-indent-1{counter-reset:list-2 list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-2{counter-increment:list-2}.ql-editor ol li.ql-indent-2:before{content:counter(list-2,lower-roman) ". "}.ql-editor ol li.ql-indent-2{counter-reset:list-3 list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-3{counter-increment:list-3}.ql-editor ol li.ql-indent-3:before{content:counter(list-3,decimal) ". "}.ql-editor ol li.ql-indent-3{counter-reset:list-4 list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-4{counter-increment:list-4}.ql-editor ol li.ql-indent-4:before{content:counter(list-4,lower-alpha) ". "}.ql-editor ol li.ql-indent-4{counter-reset:list-5 list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-5{counter-increment:list-5}.ql-editor ol li.ql-indent-5:before{content:counter(list-5,lower-roman) ". "}.ql-editor ol li.ql-indent-5{counter-reset:list-6 list-7 list-8 list-9}.ql-editor ol li.ql-indent-6{counter-increment:list-6}.ql-editor ol li.ql-indent-6:before{content:counter(list-6,decimal) ". "}.ql-editor ol li.ql-indent-6{counter-reset:list-7 list-8 list-9}.ql-editor ol li.ql-indent-7{counter-increment:list-7}.ql-editor ol li.ql-indent-7:before{content:counter(list-7,lower-alpha) ". "}.ql-editor ol li.ql-indent-7{counter-reset:list-8 list-9}.ql-editor ol li.ql-indent-8{counter-increment:list-8}.ql-editor ol li.ql-indent-8:before{content:counter(list-8,lower-roman) ". "}.ql-editor ol li.ql-indent-8{counter-reset:list-9}.ql-editor ol li.ql-indent-9{counter-increment:list-9}.ql-editor ol li.ql-indent-9:before{content:counter(list-9,decimal) ". "}.ql-editor .ql-indent-1:not(.ql-direction-rtl){padding-left:3em}.ql-editor li.ql-indent-1:not(.ql-direction-rtl){padding-left:4.5em}.ql-editor .ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:3em}.ql-editor li.ql-indent-1.ql-direction-rtl.ql-align-right{padding-right:4.5em}.ql-editor .ql-indent-2:not(.ql-direction-rtl){padding-left:6em}.ql-editor li.ql-indent-2:not(.ql-direction-rtl){padding-left:7.5em}.ql-editor .ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:6em}.ql-editor li.ql-indent-2.ql-direction-rtl.ql-align-right{padding-right:7.5em}.ql-editor .ql-indent-3:not(.ql-direction-rtl){padding-left:9em}.ql-editor li.ql-indent-3:not(.ql-direction-rtl){padding-left:10.5em}.ql-editor .ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:9em}.ql-editor li.ql-indent-3.ql-direction-rtl.ql-align-right{padding-right:10.5em}.ql-editor .ql-indent-4:not(.ql-direction-rtl){padding-left:12em}.ql-editor li.ql-indent-4:not(.ql-direction-rtl){padding-left:13.5em}.ql-editor .ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:12em}.ql-editor li.ql-indent-4.ql-direction-rtl.ql-align-right{padding-right:13.5em}.ql-editor .ql-indent-5:not(.ql-direction-rtl){padding-left:15em}.ql-editor li.ql-indent-5:not(.ql-direction-rtl){padding-left:16.5em}.ql-editor .ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:15em}.ql-editor li.ql-indent-5.ql-direction-rtl.ql-align-right{padding-right:16.5em}.ql-editor .ql-indent-6:not(.ql-direction-rtl){padding-left:18em}.ql-editor li.ql-indent-6:not(.ql-direction-rtl){padding-left:19.5em}.ql-editor .ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:18em}.ql-editor li.ql-indent-6.ql-direction-rtl.ql-align-right{padding-right:19.5em}.ql-editor .ql-indent-7:not(.ql-direction-rtl){padding-left:21em}.ql-editor li.ql-indent-7:not(.ql-direction-rtl){padding-left:22.5em}.ql-editor .ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:21em}.ql-editor li.ql-indent-7.ql-direction-rtl.ql-align-right{padding-right:22.5em}.ql-editor .ql-indent-8:not(.ql-direction-rtl){padding-left:24em}.ql-editor li.ql-indent-8:not(.ql-direction-rtl){padding-left:25.5em}.ql-editor .ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:24em}.ql-editor li.ql-indent-8.ql-direction-rtl.ql-align-right{padding-right:25.5em}.ql-editor .ql-indent-9:not(.ql-direction-rtl){padding-left:27em}.ql-editor li.ql-indent-9:not(.ql-direction-rtl){padding-left:28.5em}.ql-editor .ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:27em}.ql-editor li.ql-indent-9.ql-direction-rtl.ql-align-right{padding-right:28.5em}.ql-editor .ql-video{display:block;max-width:100%}.ql-editor .ql-video.ql-align-center{margin:0 auto}.ql-editor .ql-video.ql-align-right{margin:0 0 0 auto}.ql-editor .ql-bg-black{background-color:#000}.ql-editor .ql-bg-red{background-color:#e60000}.ql-editor .ql-bg-orange{background-color:#f90}.ql-editor .ql-bg-yellow{background-color:#ff0}.ql-editor .ql-bg-green{background-color:#008a00}.ql-editor .ql-bg-blue{background-color:#06c}.ql-editor .ql-bg-purple{background-color:#93f}.ql-editor .ql-color-white{color:#fff}.ql-editor .ql-color-red{color:#e60000}.ql-editor .ql-color-orange{color:#f90}.ql-editor .ql-color-yellow{color:#ff0}.ql-editor .ql-color-green{color:#008a00}.ql-editor .ql-color-blue{color:#06c}.ql-editor .ql-color-purple{color:#93f}.ql-editor .ql-font-serif{font-family:Georgia,Times New Roman,serif}.ql-editor .ql-font-monospace{font-family:Monaco,Courier New,monospace}.ql-editor .ql-size-small{font-size:.75em}.ql-editor .ql-size-large{font-size:1.5em}.ql-editor .ql-size-huge{font-size:2.5em}.ql-editor .ql-direction-rtl{direction:rtl;text-align:inherit}.ql-editor .ql-align-center{text-align:center}.ql-editor .ql-align-justify{text-align:justify}.ql-editor .ql-align-right{text-align:right}.ql-editor.ql-blank:before{color:#0009;content:attr(data-placeholder);font-style:italic;left:15px;pointer-events:none;position:absolute;right:15px}.ql-snow.ql-toolbar:after,.ql-snow .ql-toolbar:after{clear:both;content:"";display:table}.ql-snow.ql-toolbar button,.ql-snow .ql-toolbar button{background:none;border:none;cursor:pointer;display:inline-block;float:left;height:24px;padding:3px 5px;width:28px;margin-left:1px;margin-right:1px}.ql-snow.ql-toolbar button svg,.ql-snow .ql-toolbar button svg{float:left;height:100%}.ql-snow.ql-toolbar button:active:hover,.ql-snow .ql-toolbar button:active:hover{outline:none}.ql-snow.ql-toolbar input.ql-image[type=file],.ql-snow .ql-toolbar input.ql-image[type=file]{display:none}.ql-snow.ql-toolbar button:hover,.ql-snow .ql-toolbar button:hover,.ql-snow.ql-toolbar button:focus,.ql-snow .ql-toolbar button:focus,.ql-snow.ql-toolbar .ql-picker-label:hover,.ql-snow .ql-toolbar .ql-picker-label:hover,.ql-snow.ql-toolbar .ql-picker-item:hover,.ql-snow .ql-toolbar .ql-picker-item:hover{background-color:#f3f4f6}.ql-snow.ql-toolbar button.ql-active,.ql-snow .ql-toolbar button.ql-active,.ql-snow.ql-toolbar .ql-picker-label.ql-active,.ql-snow .ql-toolbar .ql-picker-label.ql-active,.ql-snow.ql-toolbar .ql-picker-item.ql-selected,.ql-snow .ql-toolbar .ql-picker-item.ql-selected{background-color:#dbeafe;color:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-fill,.ql-snow.ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar button.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke.ql-fill,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke.ql-fill{fill:#2563eb}.ql-snow.ql-toolbar button.ql-active .ql-stroke,.ql-snow .ql-toolbar button.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke,.ql-snow.ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar button.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-label.ql-active .ql-stroke-miter,.ql-snow.ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter,.ql-snow .ql-toolbar .ql-picker-item.ql-selected .ql-stroke-miter{stroke:#2563eb}@media (pointer: coarse){.ql-snow.ql-toolbar button:hover:not(.ql-active),.ql-snow .ql-toolbar button:hover:not(.ql-active){color:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-fill,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke.ql-fill{fill:#4b5563}.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke,.ql-snow.ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter,.ql-snow .ql-toolbar button:hover:not(.ql-active) .ql-stroke-miter{stroke:#4b5563}}.ql-snow,.ql-snow *{box-sizing:border-box}.ql-snow .ql-hidden{display:none}.ql-snow .ql-out-bottom,.ql-snow .ql-out-top{visibility:hidden}.ql-snow .ql-tooltip{position:absolute;transform:translateY(10px)}.ql-snow .ql-tooltip a{cursor:pointer;text-decoration:none}.ql-snow .ql-tooltip.ql-flip{transform:translateY(-10px)}.ql-snow .ql-formats{display:inline-block;vertical-align:middle}.ql-snow .ql-formats:after{clear:both;content:"";display:table}.ql-snow .ql-stroke{fill:none;stroke:#4b5563;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}.ql-snow .ql-stroke-miter{fill:none;stroke:#4b5563;stroke-miterlimit:10;stroke-width:2}.ql-snow .ql-fill,.ql-snow .ql-stroke.ql-fill{fill:#4b5563}.ql-snow .ql-empty{fill:none}.ql-snow .ql-even{fill-rule:evenodd}.ql-snow .ql-thin,.ql-snow .ql-stroke.ql-thin{stroke-width:1}.ql-snow .ql-transparent{opacity:.4}.ql-snow .ql-direction svg:last-child{display:none}.ql-snow .ql-direction.ql-active svg:last-child{display:inline}.ql-snow .ql-direction.ql-active svg:first-child{display:none}.ql-snow .ql-editor h1{font-size:2em}.ql-snow .ql-editor h2{font-size:1.5em}.ql-snow .ql-editor h3{font-size:1.17em}.ql-snow .ql-editor h4{font-size:1em}.ql-snow .ql-editor h5{font-size:.83em}.ql-snow .ql-editor h6{font-size:.67em}.ql-snow .ql-editor a{text-decoration:underline}.ql-snow .ql-editor blockquote{border-left:4px solid #ccc;margin-bottom:5px;margin-top:5px;padding-left:16px}.ql-snow .ql-editor code,.ql-snow .ql-editor pre{background-color:#f0f0f0;border-radius:3px}.ql-snow .ql-editor pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.ql-snow .ql-editor code{font-size:85%;padding:2px 4px}.ql-snow .ql-editor pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}.ql-snow .ql-editor img{max-width:100%}.ql-snow .ql-picker{color:#4b5563;display:inline-block;float:left;font-size:14px;font-weight:500;height:24px;position:relative;vertical-align:middle;margin-right:1px;margin-left:1px}.ql-snow .ql-picker-label{cursor:pointer;display:flex;height:100%;padding-left:8px;padding-right:2px;position:relative;width:100%}.ql-snow .ql-picker-label:before{display:inline-block;line-height:22px}.ql-snow .ql-picker-options{background-color:#fff;display:none;min-width:100%;position:absolute;white-space:nowrap}.ql-snow .ql-picker-options .ql-picker-item{cursor:pointer;display:block;padding:5px 8px}.ql-snow .ql-picker.ql-expanded .ql-picker-label{color:#d1d5db;z-index:2}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-fill{fill:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-label .ql-stroke{stroke:#d1d5db}.ql-snow .ql-picker.ql-expanded .ql-picker-options{display:block;margin-top:-1px;top:100%;z-index:1}.ql-snow .ql-color-picker,.ql-snow .ql-icon-picker{width:28px}.ql-snow .ql-color-picker .ql-picker-label,.ql-snow .ql-icon-picker .ql-picker-label{padding:2px 4px}.ql-snow .ql-color-picker .ql-picker-label svg,.ql-snow .ql-icon-picker .ql-picker-label svg{right:4px}.ql-snow .ql-icon-picker .ql-picker-options{padding:3px}.ql-snow .ql-icon-picker .ql-picker-item{height:24px;width:24px;padding:2px 4px;margin:2px}.ql-snow .ql-color-picker .ql-picker-options{padding:3px 5px;width:152px}.ql-snow .ql-color-picker .ql-picker-item{border:1px solid transparent;float:left;height:16px;margin:2px;padding:0;width:16px}.ql-snow .ql-picker:not(.ql-color-picker):not(.ql-icon-picker) svg{position:absolute;margin-top:-9px;right:0;top:50%;width:18px}.ql-snow .ql-picker.ql-header .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-label[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-label]:not([data-label=""]):before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-label]:not([data-label=""]):before{content:attr(data-label)}.ql-snow .ql-picker.ql-header{width:98px}.ql-snow .ql-picker.ql-header .ql-picker-label:before,.ql-snow .ql-picker.ql-header .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="1"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{content:"Heading 1"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="2"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{content:"Heading 2"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="3"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{content:"Heading 3"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="4"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{content:"Heading 4"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="5"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{content:"Heading 5"}.ql-snow .ql-picker.ql-header .ql-picker-label[data-value="6"]:before,.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{content:"Heading 6"}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="1"]:before{font-size:2em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="2"]:before{font-size:1.5em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="3"]:before{font-size:1.17em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="4"]:before{font-size:1em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="5"]:before{font-size:.83em}.ql-snow .ql-picker.ql-header .ql-picker-item[data-value="6"]:before{font-size:.67em}.ql-snow .ql-picker.ql-font{width:108px}.ql-snow .ql-picker.ql-font .ql-picker-label:before,.ql-snow .ql-picker.ql-font .ql-picker-item:before{content:"Sans Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=serif]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{content:"Serif"}.ql-snow .ql-picker.ql-font .ql-picker-label[data-value=monospace]:before,.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{content:"Monospace"}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=serif]:before{font-family:Georgia,Times New Roman,serif}.ql-snow .ql-picker.ql-font .ql-picker-item[data-value=monospace]:before{font-family:Monaco,Courier New,monospace}.ql-snow .ql-picker.ql-size{width:98px}.ql-snow .ql-picker.ql-size .ql-picker-label:before,.ql-snow .ql-picker.ql-size .ql-picker-item:before{content:"Normal"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=small]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{content:"Small"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=large]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{content:"Large"}.ql-snow .ql-picker.ql-size .ql-picker-label[data-value=huge]:before,.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{content:"Huge"}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=small]:before{font-size:10px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=large]:before{font-size:18px}.ql-snow .ql-picker.ql-size .ql-picker-item[data-value=huge]:before{font-size:32px}.ql-snow .ql-color-picker.ql-background .ql-picker-item{background-color:#fff}.ql-snow .ql-color-picker.ql-color .ql-picker-item{background-color:#000}.ql-toolbar.ql-snow{border:1px solid #d1d5db;box-sizing:border-box;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;padding:8px}.ql-toolbar.ql-snow .ql-formats{margin-right:15px}.ql-toolbar.ql-snow .ql-picker-label{border:1px solid transparent}.ql-toolbar.ql-snow .ql-picker-options{border:1px solid transparent;box-shadow:#0003 0 2px 8px}.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-label,.ql-toolbar.ql-snow .ql-picker.ql-expanded .ql-picker-options{border-color:#d1d5db}.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item.ql-selected,.ql-toolbar.ql-snow .ql-color-picker .ql-picker-item:hover{border-color:#000}.ql-toolbar.ql-snow+.ql-container.ql-snow{border-top:0px}.ql-snow .ql-tooltip{background-color:#fff;border:1px solid #d1d5db;box-shadow:0 0 5px #d1d5db;color:#4b5563;padding:5px 12px;white-space:nowrap}.ql-snow .ql-tooltip:before{content:"Visit URL:";line-height:26px;margin-right:8px}.ql-snow .ql-tooltip input[type=text]{display:none;border:1px solid #d1d5db;font-size:13px;height:26px;margin:0;padding:3px 5px;width:170px}.ql-snow .ql-tooltip a.ql-preview{display:inline-block;max-width:200px;overflow-x:hidden;text-overflow:ellipsis;vertical-align:top}.ql-snow .ql-tooltip a.ql-action:after{border-right:1px solid #d1d5db;content:"Edit";margin-left:16px;padding-right:8px}.ql-snow .ql-tooltip a.ql-remove:before{content:"Remove";margin-left:8px}.ql-snow .ql-tooltip a{line-height:26px}.ql-snow .ql-tooltip.ql-editing a.ql-preview,.ql-snow .ql-tooltip.ql-editing a.ql-remove{display:none}.ql-snow .ql-tooltip.ql-editing input[type=text]{display:inline-block}.ql-snow .ql-tooltip.ql-editing a.ql-action:after{border-right:0px;content:"Save";padding-right:0}.ql-snow .ql-tooltip[data-mode=link]:before{content:"Enter link:"}.ql-snow .ql-tooltip[data-mode=formula]:before{content:"Enter formula:"}.ql-snow .ql-tooltip[data-mode=video]:before{content:"Enter video:"}.ql-snow a{color:#2563eb}.ql-container.ql-snow{border:1px solid #d1d5db}.image-uploading{position:relative;display:inline-block}.image-uploading img{max-width:98%!important;filter:blur(5px);opacity:.3}.image-uploading:before{content:"";box-sizing:border-box;position:absolute;top:50%;left:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:3px solid #ccc;border-top-color:#1e986c;z-index:1;animation:spinner .6s linear infinite}@keyframes spinner{to{transform:rotate(360deg)}}.quill-height-300px{height:300px} diff --git a/assets/Email.92d8568b.js b/assets/Email.92d8568b.js new file mode 100644 index 0000000..bc0dba1 --- /dev/null +++ b/assets/Email.92d8568b.js @@ -0,0 +1 @@ +import{n as D,a as d,c as r,b as e,h,i as a,F as w,q as x,w as p,v as f,Q as U,r as m,o as L,A as T,x as _,L as C,E as P,G as A}from"./index.8b9bb582.js";import{a as S}from"./notification.1a161297.js";const B={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},G={class:"card-body"},I={class:"card-title mb-3"},z={class:"mb-3 border-bottom"},F=e("h6",null,"\u89F8\u767C\u689D\u4EF6",-1),H={class:"mb-3 border-bottom"},N=e("h6",null,"\u53EF\u7528\u6B04\u4F4D",-1),q={class:"table table-borderless"},O=e("thead",null,[e("tr",null,[e("th",{width:"100"}," \u6B04\u4F4D\u540D\u7A31 "),e("th",{width:"200"}," \u8B8A\u6578 "),e("th",null,"\u6E2C\u8A66\u5C08\u7528\u6E2C\u8A66\u6587\u5B57")])],-1),Q=["id","onUpdate:modelValue"],R={class:"row"},J={class:"col-md-6"},K={class:"mb-3"},W=e("label",{for:"mail_to",class:"form-label"},"\u767C\u9001\u4FE1\u7BB1",-1),X={class:"mb-3"},Y=e("label",{for:"mail_title",class:"form-label"},"\u4FE1\u4EF6\u6A19\u984C",-1),Z={class:"mb-3"},ee=e("label",{for:"mail_time",class:"form-label"},"\u767C\u9001\u9031\u671F",-1),te=["value"],se={class:"mb-3"},le=e("label",{for:"mail_content",class:"form-label"},"\u8A0A\u606F\u5167\u5BB9",-1),ae=e("br",null,null,-1),oe=["innerHTML"],ne={class:"d-flex justify-content-between mt-5"},ie={__name:"Email",props:{data:{type:Object,default:()=>({})},schedulesList:{type:Array,default:()=>[]}},emits:["emailTest","editEmail"],setup(y,{emit:v}){const g=y,{data:l}=D(g),E=(u,s)=>{const t=[];s.forEach(c=>{t.push({id:c.id,content:c.replace_keyword})}),v("emailTest",u,t)},i=(u,s)=>{const t={cht_name:s.cht_name,content:s.content,subject:s.subject,schedule_id:s.schedule_id};v("editEmail",u,t)};return(u,s)=>(d(),r("div",B,[e("div",G,[e("h4",I,h(a(l).cht_name)+"\u56DE\u994B ",1),e("div",z,[F,e("p",null,h(a(l).trigger_description),1)]),e("div",H,[N,e("table",q,[O,e("tbody",null,[(d(!0),r(w,null,x(a(l).variables,t=>(d(),r("tr",{key:`email_${t.id}`},[e("td",null,h(t.cht_name),1),e("td",null,"{% "+h(t.name)+" %}",1),e("td",null,[p(e("input",{id:t.name,"onUpdate:modelValue":c=>t.replace_keyword=c,type:"text",class:"form-control"},null,8,Q),[[f,t.replace_keyword]])])]))),128))])])]),e("div",R,[e("div",J,[e("div",K,[W,p(e("input",{id:"mail_to","onUpdate:modelValue":s[0]||(s[0]=t=>a(l).sender_mail=t),disabled:"",type:"text",class:"form-control",placeholder:"no-reply@hexschool.com"},null,512),[[f,a(l).sender_mail]])]),e("div",X,[Y,p(e("input",{id:"mail_title","onUpdate:modelValue":s[1]||(s[1]=t=>a(l).subject=t),type:"text",class:"form-control",placeholder:"\u4F5C\u696D\u88AB\u6279\u6539"},null,512),[[f,a(l).subject]])]),e("div",Z,[ee,p(e("select",{id:"mail_time","onUpdate:modelValue":s[2]||(s[2]=t=>a(l).schedule_id=t),class:"form-select","aria-label":"Default select example"},[(d(!0),r(w,null,x(y.schedulesList,t=>(d(),r("option",{key:`schedule_${t.id}`,value:t.id},h(t.cht_name),9,te))),128))],512),[[U,a(l).schedule_id]])])])]),e("div",se,[le,p(e("textarea",{"onUpdate:modelValue":s[3]||(s[3]=t=>a(l).content=t),class:"form-control",rows:"20"},null,512),[[f,a(l).content]]),ae,e("div",{innerHTML:a(l).content},null,8,oe)]),e("div",ne,[e("button",{type:"button",class:"btn btn-outline-primary",onClick:s[4]||(s[4]=t=>E(a(l).id,a(l).variables,a(l).content))}," \u6E2C\u8A66\u767C\u9001 "),e("button",{type:"button",class:"btn btn-secondary",onClick:s[5]||(s[5]=t=>i(a(l).id,a(l)))}," \u78BA\u8A8D\u66F4\u65B0 ")])])]))}},ce={class:"px-4 mt-4"},de=e("h4",{class:"mb-3"}," Email \u8A0A\u606F\u7BA1\u7406 ",-1),re={class:"row"},ue={class:"col-md-3"},me={class:"list-group"},_e=["onClick"],he={class:"col-md-9"},fe={__name:"Email",setup(y){const{apiGetEmailList:v,apiPutEmailTemplate:g,apiGetSchedules:l,apiPostEmailTest:E}=S,i=m(!1),u=m(!0),s=m(1),t=m(null),c=m({}),$=async()=>{try{i.value=!0;const{templates:o}=await v();t.value=o,[c.value]=o}catch(o){_("success","Email \u5217\u8868\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};L(()=>{$()});const k=m(null),V=async()=>{try{i.value=!0;const{schedules:o}=await l();k.value=o}catch(o){_("danger","\u9031\u671F\u6E05\u55AE\u51FA\u73FE\u932F\u8AA4",o.response.data.message)}finally{i.value=!1}};L(()=>{V()});const M=async(o,b)=>{try{i.value=!0;const{message:n}=await E(o,b);_("success","Email \u767C\u9001\u7D50\u679C",n)}catch(n){_("danger","\u6E2C\u8A66 API \u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}},j=async(o,b)=>{try{i.value=!0;const{message:n}=await g(o,b);_("success","Eamil \u6A23\u677F\u7DE8\u8F2F\u7D50\u679C",n),s.value=1,$()}catch(n){_("danger","\u7DE8\u8F2F Email \u6A23\u677F\u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{i.value=!1}};return(o,b)=>(d(),r("div",ce,[T(a(C),{active:i.value,"is-full-page":u.value,"z-index":1021},null,8,["active","is-full-page"]),de,e("div",re,[e("div",ue,[e("div",me,[(d(!0),r(w,null,x(t.value,n=>(d(),r("a",{key:n.id,href:"#",class:P(["list-group-item",s.value===n.id?"active":""]),"aria-current":"true",onClick:A(pe=>(c.value=n,s.value=n.id),["prevent"])},h(n.cht_name),11,_e))),128))])]),e("div",he,[T(ie,{data:c.value,"schedules-list":k.value,onEmailTest:M,onEditEmail:j},null,8,["data","schedules-list"])])])]))}};export{fe as default}; diff --git a/assets/FavoriteModal.d433ff02.js b/assets/FavoriteModal.d433ff02.js new file mode 100644 index 0000000..38371cd --- /dev/null +++ b/assets/FavoriteModal.d433ff02.js @@ -0,0 +1,60 @@ +import{r as kr,o as nf,j as LL,s as eg,a as ne,c as ue,b as J,G as _w,h as ka,p as PL,w as er,v as to,Q as of,F as Hn,q as Wn,C as Sw,i as RL,B as EL,e as kL,f as OL,M as NL}from"./index.8b9bb582.js";const VL={class:"accordion mb-3",id:"accordionPanelsStayOpenExample"},BL={class:"accordion-item"},zL=J("h2",{class:"accordion-header"},[J("button",{class:"accordion-button",type:"button","data-bs-toggle":"collapse","data-bs-target":"#panelsStayOpen-collapseOne","aria-expanded":"true","aria-controls":"panelsStayOpen-collapseOne"}," \u67E5\u8A62 ")],-1),GL={id:"panelsStayOpen-collapseOne",class:"accordion-collapse collapse show"},FL={class:"accordion-body"},HL={class:"col-md-12"},WL={key:0},$L={class:"col-md-4"},UL=J("label",{for:"start-time",class:"form-label"},"\u958B\u59CB\u6642\u9593",-1),YL={class:"col-md-4"},ZL=J("label",{for:"end-time",class:"form-label"},"\u7D50\u675F\u6642\u9593",-1),XL={class:"col-md-4"},qL=J("label",{for:"search-time",class:"form-label"},"\u67E5\u8A62\u5340\u9593",-1),KL=["value"],jL={class:"col-12 my-3"},QL={class:"border border-1 p-3 rounded-3"},JL=J("p",{class:"mb-2"}," \u8981\u67E5\u8A62\u7684\u5167\u5BB9 ",-1),t2={class:"mb-2"},e2={class:"form-check"},r2=["id","value","checked"],a2=["for"],n2={class:"col-md-12 mb-3"},i2=J("label",{for:"end-time",class:"form-label"},"\u67E5\u8A62\u985E\u578B",-1),o2=["value"],s2={class:"col-md-12"},l2={class:"btn-group"},u2=J("button",{type:"submit",class:"btn btn-outline-primary"}," \u67E5\u8A62 ",-1),pq={__name:"Selector",props:{status:{type:String},data:{type:Object,default(){return{list:[],type:[],range:[]}}},queryParams:{type:Object,default(){return{}}},openFavoriteModal:{type:Function}},emits:["submit","getData"],setup(r,{emit:e}){const t=r,a=kr(null);nf(()=>{var h;(h=a.value)==null||h.addEventListener("scroll",v=>{var p;const{target:c}=v;c.clientHeight+c.scrollTop===((p=a.value)==null?void 0:p.scrollHeight)&&e("getData",1)})});const i=kr(""),o=LL(()=>t.data.list.filter(h=>h.name.includes(i.value))),s=kr(""),l=kr(""),u=kr({name:"",type:"",[s.value]:[],range:"",from:"",to:""});eg(()=>t.queryParams,h=>{u.value={name:h.name,type:h.type||"",[s.value]:h[s.value],range:h.range,from:h.from,to:h.to}}),nf(()=>{s.value=t.status==="questions"?"videoCourseIds":"taskGroupIds",l.value=t.status==="questions"?"unresolved":"pending",u.value={name:t.queryParams.name||"",type:t.queryParams.type||l.value,[s.value]:t.queryParams[s.value]||[],range:t.queryParams.range||"day",from:t.queryParams.from||"",to:t.queryParams.to||""}});const f=h=>e("submit",h);return(h,v)=>(ne(),ue("div",VL,[J("div",BL,[zL,J("div",GL,[J("div",FL,[J("form",{class:"row",onSubmit:v[7]||(v[7]=_w(()=>f(u.value),["prevent"]))},[J("div",HL,[u.value.name?(ne(),ue("h6",WL,"\u76EE\u524D\u6B63\u5728\u5957\u7528\uFF1A"+ka(u.value.name),1)):PL("",!0)]),J("div",$L,[UL,er(J("input",{type:"date","onUpdate:modelValue":v[0]||(v[0]=c=>u.value.from=c),name:"start-time",id:"start-time",class:"form-control"},null,512),[[to,u.value.from]])]),J("div",YL,[ZL,er(J("input",{type:"date","onUpdate:modelValue":v[1]||(v[1]=c=>u.value.to=c),name:"end-time",id:"end-time",class:"form-control"},null,512),[[to,u.value.to]])]),J("div",XL,[qL,er(J("select",{"onUpdate:modelValue":v[2]||(v[2]=c=>u.value.range=c),class:"form-select","aria-label":"\u67E5\u8A62\u5340\u9593"},[(ne(!0),ue(Hn,null,Wn(t.data.range,({name:c,cht_name:p})=>(ne(),ue("option",{value:c,key:c},ka(p),9,KL))),128))],512),[[of,u.value.range]])]),J("div",jL,[J("div",QL,[JL,J("div",t2,[er(J("input",{"onUpdate:modelValue":v[3]||(v[3]=c=>i.value=c),type:"text",class:"form-control",placeholder:"\u8ACB\u8F38\u5165\u8981\u641C\u5C0B\u7684\u5167\u5BB9"},null,512),[[to,i.value]])]),J("ul",{ref_key:"selectRef",ref:a,class:"list list-unstyled overflow-scroll",style:{height:"200px"}},[(ne(!0),ue(Hn,null,Wn(RL(o),({id:c,name:p})=>(ne(),ue("li",{class:"border border-2 rounded-3 p-2 mb-2",key:c},[J("div",e2,[er(J("input",{"onUpdate:modelValue":v[4]||(v[4]=d=>u.value[s.value]=d),id:c,type:"checkbox",class:"form-check-input",value:c,checked:u.value[s.value].includes(c)},null,8,r2),[[Sw,u.value[s.value]]]),J("label",{for:c,class:"form-check-label"},ka(p),9,a2)])]))),128))],512)])]),J("div",n2,[i2,er(J("select",{"onUpdate:modelValue":v[5]||(v[5]=c=>u.value.type=c),class:"form-select","aria-label":"Default select example"},[(ne(!0),ue(Hn,null,Wn(t.data.type,({name:c,cht_name:p})=>(ne(),ue("option",{value:c,key:c},ka(p),9,o2))),128))],512),[[of,u.value.type]])]),J("div",s2,[J("div",l2,[J("button",{onClick:v[6]||(v[6]=()=>t.openFavoriteModal(u.value)),type:"button",class:"btn btn-outline-primary"}," \u5E38\u7528\u8A2D\u5B9A "),u2])])],32)])])])]))}};/*! ***************************************************************************** +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 cp=function(r,e){return cp=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,a){t.__proto__=a}||function(t,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n])},cp(r,e)};function k(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");cp(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var f2=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),h2=function(){function r(){this.browser=new f2,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 r}(),Pn=new h2;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Pn.wxa=!0,Pn.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Pn.worker=!0:typeof navigator>"u"||navigator.userAgent.indexOf("Node.js")===0?(Pn.node=!0,Pn.svgSupported=!0):v2(navigator.userAgent,Pn);function v2(r,e){var t=e.browser,a=r.match(/Firefox\/([\d.]+)/),n=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);a&&(t.firefox=!0,t.version=a[1]),n&&(t.ie=!0,t.version=n[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document<"u";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}const At=Pn;var rg=12,xw="sans-serif",Xa=rg+"px "+xw,c2=20,p2=100,d2="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function g2(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.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",a[l]+":0",n[u]+":0",a[1-l]+":auto",n[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function z2(r,e,t){for(var a=t?"invTrans":"trans",n=e[a],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),h=2*u,v=f.left,c=f.top;o.push(v,c),l=l&&i&&v===i[h]&&c===i[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(e.srcCoords=o,e[a]=t?ym(s,o):ym(o,s))}function Dw(r){return r.nodeName.toUpperCase()==="CANVAS"}var G2=/([&<>"'])/g,F2={"&":"&","<":"<",">":">",'"':""","'":"'"};function Ce(r){return r==null?"":(r+"").replace(G2,function(e,t){return F2[t]})}var H2=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,$h=[],W2=At.browser.firefox&&+At.browser.version.split(".")[0]<39;function Sp(r,e,t,a){return t=t||{},a?_m(r,e,t):W2&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):_m(r,e,t),t}function _m(r,e,t){if(At.domSupported&&r.getBoundingClientRect){var a=e.clientX,n=e.clientY;if(Dw(r)){var i=r.getBoundingClientRect();t.zrX=a-i.left,t.zrY=n-i.top;return}else if(_p($h,r,a,n)){t.zrX=$h[0],t.zrY=$h[1];return}}t.zrX=t.zrY=0}function ug(r){return r||window.event}function je(r,e,t){if(e=ug(e),e.zrX!=null)return e;var a=e.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Sp(r,o,e,t)}else{Sp(r,e,e,t);var i=$2(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&H2.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function $2(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,a=r.deltaY;if(t==null||a==null)return e;var n=Math.abs(a!==0?a:t),i=a>0?-1:a<0?1:t>0?-1:1;return 3*n*i}function xp(r,e,t,a){r.addEventListener(e,t,a)}function U2(r,e,t,a){r.removeEventListener(e,t,a)}var fa=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Sm(r){return r.which===2||r.which===3}var Y2=function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,a){return this._doTrack(e,t,a),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,a){var n=e.touches;if(!!n){for(var i={points:[],touches:[],target:t,event:e},o=0,s=n.length;o1&&a&&a.length>1){var i=xm(a)/xm(n);!isFinite(i)&&(i=1),e.pinchScale=i;var o=Z2(a);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function We(){return[1,0,0,1,0,0]}function ih(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function fg(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function ia(r,e,t){var a=e[0]*t[0]+e[2]*t[1],n=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function $r(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function gi(r,e,t,a){a===void 0&&(a=[0,0]);var n=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),h=Math.cos(t);return r[0]=n*h+s*f,r[1]=-n*f+s*h,r[2]=i*h+l*f,r[3]=-i*f+h*l,r[4]=h*(o-a[0])+f*(u-a[1])+a[0],r[5]=h*(u-a[1])-f*(o-a[0])+a[1],r}function hg(r,e,t){var a=t[0],n=t[1];return r[0]=e[0]*a,r[1]=e[1]*n,r[2]=e[2]*a,r[3]=e[3]*n,r[4]=e[4]*a,r[5]=e[5]*n,r}function So(r,e){var t=e[0],a=e[2],n=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=t*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-t*s)*l,r):null}function X2(r){var e=We();return fg(e,r),e}var q2=function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,a=this.y-e.y;return Math.sqrt(t*t+a*a)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,a=this.y-e.y;return t*t+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(!!e){var t=this.x,a=this.y;return this.x=e[0]*t+e[2]*a+e[4],this.y=e[1]*t+e[3]*a+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,a){e.x=t,e.y=a},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,a){e.x=t.x+a.x,e.y=t.y+a.y},r.sub=function(e,t,a){e.x=t.x-a.x,e.y=t.y-a.y},r.scale=function(e,t,a){e.x=t.x*a,e.y=t.y*a},r.scaleAndAdd=function(e,t,a,n){e.x=t.x+a.x*n,e.y=t.y+a.y*n},r.lerp=function(e,t,a,n){var i=1-n;e.x=i*t.x+n*a.x,e.y=i*t.y+n*a.y},r}();const ft=q2;var Ol=Math.min,Nl=Math.max,sn=new ft,ln=new ft,un=new ft,fn=new ft,No=new ft,Vo=new ft,K2=function(){function r(e,t,a,n){a<0&&(e=e+a,a=-a),n<0&&(t=t+n,n=-n),this.x=e,this.y=t,this.width=a,this.height=n}return r.prototype.union=function(e){var t=Ol(e.x,this.x),a=Ol(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=Nl(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=Nl(e.y+e.height,this.y+this.height)-a:this.height=e.height,this.x=t,this.y=a},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,a=e.width/t.width,n=e.height/t.height,i=We();return $r(i,i,[-t.x,-t.y]),hg(i,i,[a,n]),$r(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var a=this,n=a.x,i=a.x+a.width,o=a.y,s=a.y+a.height,l=e.x,u=e.x+e.width,f=e.y,h=e.y+e.height,v=!(ip&&(p=_,dp&&(p=S,y=a.x&&e<=a.x+a.width&&t>=a.y&&t<=a.y+a.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,a){if(!a){e!==t&&r.copy(e,t);return}if(a[1]<1e-5&&a[1]>-1e-5&&a[2]<1e-5&&a[2]>-1e-5){var n=a[0],i=a[3],o=a[4],s=a[5];e.x=t.x*n+o,e.y=t.y*i+s,e.width=t.width*n,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}sn.x=un.x=t.x,sn.y=fn.y=t.y,ln.x=fn.x=t.x+t.width,ln.y=un.y=t.y+t.height,sn.transform(a),fn.transform(a),ln.transform(a),un.transform(a),e.x=Ol(sn.x,ln.x,un.x,fn.x),e.y=Ol(sn.y,ln.y,un.y,fn.y);var l=Nl(sn.x,ln.x,un.x,fn.x),u=Nl(sn.y,ln.y,un.y,fn.y);e.width=l-e.x,e.height=u-e.y},r}();const vt=K2;var Iw="silent";function j2(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:Q2}}function Q2(){fa(this.event)}var J2=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(ur),Bo=function(){function r(e,t){this.x=e,this.y=t}return r}(),tP=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],Yh=new vt(0,0,0,0),Lw=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this)||this;return s._hovered=new Bo(0,0),s.storage=t,s.painter=a,s.painterRoot=i,s._pointerSize=o,n=n||new J2,s.proxy=null,s.setHandlerProxy(n),s._draggingMgr=new k2(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(C(tP,function(a){t.on&&t.on(a,this[a],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var a=t.zrX,n=t.zrY,i=Pw(this,a,n),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 Bo(a,n):this.findHover(a,n),u=l.target,f=this.proxy;f.setCursor&&f.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var a=t.zrEventControl;a!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),a!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Bo(0,0)},e.prototype.dispatch=function(t,a){var n=this[t];n&&n.call(this,a)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var a=this.proxy;a.setCursor&&a.setCursor(t)},e.prototype.dispatchToElement=function(t,a,n){t=t||{};var i=t.target;if(!(i&&i.silent)){for(var o="on"+a,s=j2(a,t,n);i&&(i[o]&&(s.cancelBubble=!!i[o].call(i,s)),i.trigger(a,s),i=i.__hostTarget?i.__hostTarget:i.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(a,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(a,s)}))}},e.prototype.findHover=function(t,a,n){var i=this.storage.getDisplayList(),o=new Bo(t,a);if(bm(i,o,t,a,n),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,f=new vt(t-u,a-u,l,l),h=i.length-1;h>=0;h--){var v=i[h];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(Yh.copy(v.getBoundingRect()),v.transform&&Yh.applyTransform(v.transform),Yh.intersect(f)&&s.push(v))}if(s.length)for(var c=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function eP(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(e,t))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s||a.parent}return n?Iw:!0}return!1}function bm(r,e,t,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=eP(o,t,a))&&(!e.topTarget&&(e.topTarget=o),s!==Iw)){e.target=o;break}}}function Pw(r,e,t){var a=r.painter;return e<0||e>a.getWidth()||t<0||t>a.getHeight()}const rP=Lw;var Rw=32,zo=7;function aP(r){for(var e=0;r>=Rw;)e|=r&1,r>>=1;return r+e}function wm(r,e,t,a){var n=e+1;if(n===t)return 1;if(a(r[n++],r[e])<0){for(;n=0;)n++;return n-e}function nP(r,e,t){for(t--;e>>1,n(i,r[l])<0?s=l:o=l+1;var u=a-o;switch(u){case 3:r[o+3]=r[o+2];case 2:r[o+2]=r[o+1];case 1:r[o+1]=r[o];break;default:for(;u>0;)r[o+u]=r[o+u-1],u--}r[o]=i}}function Zh(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])>0){for(s=a-n;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}else{for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}for(o++;o>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function Xh(r,e,t,a,n,i){var o=0,s=0,l=1;if(i(r,e[t+n])<0){for(s=n+1;ls&&(l=s);var u=o;o=n-l,l=n-u}else{for(s=a-n;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=n,l+=n}for(o++;o>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function iP(r,e){var t=zo,a,n,i=0,o=[];a=[],n=[];function s(c,p){a[i]=c,n[i]=p,i+=1}function l(){for(;i>1;){var c=i-2;if(c>=1&&n[c-1]<=n[c]+n[c+1]||c>=2&&n[c-2]<=n[c]+n[c-1])n[c-1]n[c+1])break;f(c)}}function u(){for(;i>1;){var c=i-2;c>0&&n[c-1]=zo||w>=zo);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,A=0,M=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,A=0,--p===0){M=!0;break}}else if(r[S--]=o[_--],A++,T=0,--g===1){M=!0;break}while((T|A)=0;y--)r[x+y]=r[b+y];if(p===0){M=!0;break}}if(r[S--]=o[_--],--g===1){M=!0;break}if(A=g-Zh(r[m],o,0,g,g-1,e),A!==0){for(S-=A,_-=A,g-=A,x=S+1,b=_+1,y=0;y=zo||A>=zo);if(M)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),Tm(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),n-=i,t+=i}while(n!==0);o.forceMergeRuns()}}var Fe=1,hs=2,Ui=4,Am=!1;function qh(){Am||(Am=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Cm(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var oP=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Cm}return r.prototype.traverse=function(e,t){for(var a=0;a0&&(f.__clipPaths=[]),isNaN(f.z)&&(qh(),f.z=0),isNaN(f.z2)&&(qh(),f.z2=0),isNaN(f.zlevel)&&(qh(),f.zlevel=0),this._displayList[this._displayListLen++]=f}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,a);var v=e.getTextGuideLine();v&&this._updateAndAddDisplayable(v,t,a);var c=e.getTextContent();c&&this._updateAndAddDisplayable(c,t,a)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,a=e.length;t=0&&this._roots.splice(n,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}();const sP=oP;var Ew;Ew=At.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const bp=Ew;var Fu={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)))},elasticOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var e,t=.1,a=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=a/4):e=a*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Fu.bounceOut(1-r)},bounceOut:function(r){return r<1/2.75?7.5625*r*r:r<2/2.75?7.5625*(r-=1.5/2.75)*r+.75:r<2.5/2.75?7.5625*(r-=2.25/2.75)*r+.9375:7.5625*(r-=2.625/2.75)*r+.984375},bounceInOut:function(r){return r<.5?Fu.bounceIn(r*2)*.5:Fu.bounceOut(r*2-1)*.5+.5}};const kw=Fu;var Vl=Math.pow,$a=Math.sqrt,uf=1e-8,Ow=1e-4,Mm=$a(3),Bl=1/3,Or=di(),rr=di(),eo=di();function Ba(r){return r>-uf&&ruf||r<-uf}function te(r,e,t,a,n){var i=1-n;return i*i*(i*r+3*n*e)+n*n*(n*a+3*i*t)}function Dm(r,e,t,a,n){var i=1-n;return 3*(((e-r)*i+2*(t-e)*n)*i+(a-t)*n*n)}function ff(r,e,t,a,n,i){var o=a+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-n,f=s*s-3*o*l,h=s*l-9*o*u,v=l*l-3*s*u,c=0;if(Ba(f)&&Ba(h))if(Ba(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[c++]=p)}else{var d=h*h-4*f*v;if(Ba(d)){var g=h/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y)}else if(d>0){var m=$a(d),_=f*s+1.5*o*(-h+m),S=f*s+1.5*o*(-h-m);_<0?_=-Vl(-_,Bl):_=Vl(_,Bl),S<0?S=-Vl(-S,Bl):S=Vl(S,Bl);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[c++]=p)}else{var b=(2*f*s-3*o*h)/(2*$a(f*f*f)),x=Math.acos(b)/3,w=$a(f),T=Math.cos(x),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+Mm*Math.sin(x)))/(3*o),A=(-s+w*(T-Mm*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[c++]=p),y>=0&&y<=1&&(i[c++]=y),A>=0&&A<=1&&(i[c++]=A)}}return c}function Vw(r,e,t,a,n){var i=6*t-12*e+6*r,o=9*e+3*a-3*r-9*t,s=3*e-3*r,l=0;if(Ba(o)){if(Nw(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var f=i*i-4*o*s;if(Ba(f))n[0]=-i/(2*o);else if(f>0){var h=$a(f),u=(-i+h)/(2*o),v=(-i-h)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function qa(r,e,t,a,n,i){var o=(e-r)*n+r,s=(t-e)*n+e,l=(a-t)*n+t,u=(s-o)*n+o,f=(l-s)*n+s,h=(f-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=h,i[4]=h,i[5]=f,i[6]=l,i[7]=a}function Bw(r,e,t,a,n,i,o,s,l,u,f){var h,v=.005,c=1/0,p,d,g,y;Or[0]=l,Or[1]=u;for(var m=0;m<1;m+=.05)rr[0]=te(r,t,n,o,m),rr[1]=te(e,a,i,s,m),g=Qn(Or,rr),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var f=o*o-4*i*s;if(Ba(f)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(f>0){var h=$a(f),u=(-o+h)/(2*i),v=(-o-h)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function zw(r,e,t){var a=r+t-2*e;return a===0?.5:(r-e)/a}function Gs(r,e,t,a,n){var i=(e-r)*a+r,o=(t-e)*a+e,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=t}function Gw(r,e,t,a,n,i,o,s,l){var u,f=.005,h=1/0;Or[0]=o,Or[1]=s;for(var v=0;v<1;v+=.05){rr[0]=ie(r,t,n,v),rr[1]=ie(e,a,i,v);var c=Qn(Or,rr);c=0&&c=1?1:ff(0,a,i,1,l,s)&&te(0,n,o,1,s[0])}}}var vP=function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||Zt,this.ondestroy=e.ondestroy||Zt,this.onrestart=e.onrestart||Zt,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var a=this._life,n=e-this._startTime-this._pausedTime,i=n/a;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=n%a;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=j(e)?e:kw[e]||vg(e)},r}();const cP=vP;var Fw=function(){function r(e){this.value=e}return r}(),pP=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new Fw(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,a=e.next;t?t.next=a:this.head=a,a?a.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),dP=function(){function r(e){this._list=new pP,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var a=this._list,n=this._map,i=null;if(n[e]==null){var o=a.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=a.head;a.remove(l),delete n[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new Fw(t),s.key=e,a.insertEntry(s),n[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],a=this._list;if(t!=null)return t!==a.tail&&(a.remove(t),a.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const cl=dP;var Im={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 Sr(r){return r=Math.round(r),r<0?0:r>255?255:r}function gP(r){return r=Math.round(r),r<0?0:r>360?360:r}function Fs(r){return r<0?0:r>1?1:r}function Kh(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Sr(parseFloat(e)/100*255):Sr(parseInt(e,10))}function Jn(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Fs(parseFloat(e)/100):Fs(parseFloat(e))}function jh(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function za(r,e,t){return r+(e-r)*t}function Ke(r,e,t,a,n){return r[0]=e,r[1]=t,r[2]=a,r[3]=n,r}function Tp(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var Hw=new cl(20),zl=null;function Ai(r,e){zl&&Tp(zl,e),zl=Hw.put(r,zl||e.slice())}function $e(r,e){if(!!r){e=e||[];var t=Hw.get(r);if(t)return Tp(e,t);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in Im)return Tp(e,Im[a]),Ai(r,e),e;var n=a.length;if(a.charAt(0)==="#"){if(n===4||n===5){var i=parseInt(a.slice(1,4),16);if(!(i>=0&&i<=4095)){Ke(e,0,0,0,1);return}return Ke(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,n===5?parseInt(a.slice(4),16)/15:1),Ai(r,e),e}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){Ke(e,0,0,0,1);return}return Ke(e,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),Ai(r,e),e}return}var o=a.indexOf("("),s=a.indexOf(")");if(o!==-1&&s+1===n){var l=a.substr(0,o),u=a.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Ke(e,+u[0],+u[1],+u[2],1):Ke(e,0,0,0,1);f=Jn(u.pop());case"rgb":if(u.length>=3)return Ke(e,Kh(u[0]),Kh(u[1]),Kh(u[2]),u.length===3?f:Jn(u[3])),Ai(r,e),e;Ke(e,0,0,0,1);return;case"hsla":if(u.length!==4){Ke(e,0,0,0,1);return}return u[3]=Jn(u[3]),Ap(u,e),Ai(r,e),e;case"hsl":if(u.length!==3){Ke(e,0,0,0,1);return}return Ap(u,e),Ai(r,e),e;default:return}}Ke(e,0,0,0,1)}}function Ap(r,e){var t=(parseFloat(r[0])%360+360)%360/360,a=Jn(r[1]),n=Jn(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return e=e||[],Ke(e,Sr(jh(o,i,t+1/3)*255),Sr(jh(o,i,t)*255),Sr(jh(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function yP(r){if(!!r){var e=r[0]/255,t=r[1]/255,a=r[2]/255,n=Math.min(e,t,a),i=Math.max(e,t,a),o=i-n,s=(i+n)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+n):u=o/(2-i-n);var f=((i-e)/6+o/2)/o,h=((i-t)/6+o/2)/o,v=((i-a)/6+o/2)/o;e===i?l=v-h:t===i?l=1/3+f-v:a===i&&(l=2/3+h-f),l<0&&(l+=1),l>1&&(l-=1)}var c=[l*360,u,s];return r[3]!=null&&c.push(r[3]),c}}function Cp(r,e){var t=$e(r);if(t){for(var a=0;a<3;a++)e<0?t[a]=t[a]*(1-e)|0:t[a]=(255-t[a])*e+t[a]|0,t[a]>255?t[a]=255:t[a]<0&&(t[a]=0);return oa(t,t.length===4?"rgba":"rgb")}}function Qh(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=e[n],s=e[i],l=a-n;return t[0]=Sr(za(o[0],s[0],l)),t[1]=Sr(za(o[1],s[1],l)),t[2]=Sr(za(o[2],s[2],l)),t[3]=Fs(za(o[3],s[3],l)),t}}function mP(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var a=r*(e.length-1),n=Math.floor(a),i=Math.ceil(a),o=$e(e[n]),s=$e(e[i]),l=a-n,u=oa([Sr(za(o[0],s[0],l)),Sr(za(o[1],s[1],l)),Sr(za(o[2],s[2],l)),Fs(za(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function Ts(r,e,t,a){var n=$e(r);if(r)return n=yP(n),e!=null&&(n[0]=gP(e)),t!=null&&(n[1]=Jn(t)),a!=null&&(n[2]=Jn(a)),oa(Ap(n),"rgba")}function hf(r,e){var t=$e(r);if(t&&e!=null)return t[3]=Fs(e),oa(t,"rgba")}function oa(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function vf(r,e){var t=$e(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var Lm=new cl(100);function Mp(r){if($(r)){var e=Lm.get(r);return e||(e=Cp(r,-.1),Lm.put(r,e)),e}else if(ah(r)){var t=B({},r);return t.colorStops=G(r.colorStops,function(a){return{offset:a.offset,color:Cp(a.color,-.1)}}),t}return r}var cf=Math.round;function Hs(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=$e(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e==null?1:e}}var Pm=1e-4;function Ga(r){return r-Pm}function Gl(r){return cf(r*1e3)/1e3}function Dp(r){return cf(r*1e4)/1e4}function _P(r){return"matrix("+Gl(r[0])+","+Gl(r[1])+","+Gl(r[2])+","+Gl(r[3])+","+Dp(r[4])+","+Dp(r[5])+")"}var SP={left:"start",right:"end",center:"middle",middle:"middle"};function xP(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function bP(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function wP(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function Ww(r){return r&&!!r.image}function TP(r){return r&&!!r.svgElement}function cg(r){return Ww(r)||TP(r)}function $w(r){return r.type==="linear"}function Uw(r){return r.type==="radial"}function Yw(r){return r&&(r.type==="linear"||r.type==="radial")}function oh(r){return"url(#"+r+")"}function Zw(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function Xw(r){var e=r.x||0,t=r.y||0,a=(r.rotation||0)*Vu,n=ot(r.scaleX,1),i=ot(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+cf(o*Vu)+"deg, "+cf(s*Vu)+"deg)"),l.join(" ")}var AP=function(){return At.hasGlobalWindow&&j(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer<"u"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),Ip=Array.prototype.slice;function ta(r,e,t){return(e-r)*t+r}function Jh(r,e,t,a){for(var n=e.length,i=0;ia?e:r,i=Math.min(t,a),o=n[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)a.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=Em,l=t;if(_e(t)){var u=IP(t);s=u,(u===1&&!Mt(t[0])||u===2&&!Mt(t[0][0]))&&(o=!0)}else if(Mt(t)&&!zs(t))s=Hl;else if($(t))if(!isNaN(+t))s=Hl;else{var f=$e(t);f&&(l=f,s=vs)}else if(ah(t)){var h=B({},l);h.colorStops=G(t.colorStops,function(c){return{offset:c.offset,color:$e(c.color)}}),$w(t)?s=Lp:Uw(t)&&(s=Pp),l=h}i===0?this.valType=s:(s!==this.valType||s===Em)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return a&&(v.easing=a,v.easingFunc=j(a)?a:kw[a]||vg(a)),n.push(v),v},r.prototype.prepare=function(e,t){var a=this.keyframes;this._needsSort&&a.sort(function(d,g){return d.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=Wl(n),u=km(n),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=h;ft);f++);f=v(f-1,s-2)}p=o[f+1],c=o[f]}if(!!(c&&p)){this._lastFr=f,this._lastFrP=t;var g=p.percent-c.percent,y=g===0?1:v((t-c.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=a?this._additiveValue:u?Go:e[l];if((Wl(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?c.rawValue:p.rawValue;else if(Wl(i))i===Wu?Jh(m,c[n],p[n],y):CP(m,c[n],p[n],y);else if(km(i)){var _=c[n],S=p[n],b=i===Lp;e[l]={type:b?"linear":"radial",x:ta(_.x,S.x,y),y:ta(_.y,S.y,y),colorStops:G(_.colorStops,function(w,T){var A=S.colorStops[T];return{offset:ta(w.offset,A.offset,y),color:Hu(Jh([],w.color,A.color,y))}}),global:S.global},b?(e[l].x2=ta(_.x2,S.x2,y),e[l].y2=ta(_.y2,S.y2,y)):e[l].r=ta(_.r,S.r,y)}else if(u)Jh(m,c[n],p[n],y),a||(e[l]=Hu(m));else{var x=ta(c[n],p[n],y);a?this._additiveValue=x:e[l]=x}a&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,a=this.propName,n=this._additiveValue;t===Hl?e[a]=e[a]+n:t===vs?($e(e[a],Go),Fl(Go,Go,n,1),e[a]=Hu(Go)):t===Wu?Fl(e[a],e[a],n,1):t===qw&&Rm(e[a],e[a],n,1)},r}(),pg=function(){function r(e,t,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&n){ig("Can' use additive animation on looped animation.");return}this._additiveAnimators=n,this._allowDiscrete=a}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,a){return this.whenWithKeys(e,t,_t(t),a)},r.prototype.whenWithKeys=function(e,t,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,As(u),n),this._trackKeys.push(s)}l.addKeyframe(e,As(t[s]),n)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,a=0;a0)){this._started=1;for(var t=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function Ki(){return new Date().getTime()}var PP=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,t=t||{},a.stage=t.stage||{},a}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var a=t.getClip();a&&this.addClip(a)},e.prototype.removeClip=function(t){if(!!t.animation){var a=t.prev,n=t.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var a=t.getClip();a&&this.removeClip(a),t.animation=null},e.prototype.update=function(t){for(var a=Ki()-this._pausedTime,n=a-this._time,i=this._head;i;){var o=i.next,s=i.step(a,n);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=a,t||(this.trigger("frame",n),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function a(){t._running&&(bp(a),!t._paused&&t.update())}bp(a)},e.prototype.start=function(){this._running||(this._time=Ki(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Ki(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Ki()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var a=t.next;t.prev=t.next=t.animation=null,t=a}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,a){a=a||{},this.start();var n=new pg(t,a.loop);return this.addAnimator(n),n},e}(ur);const RP=PP;var EP=300,tv=At.domSupported,ev=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=G(r,function(n){var i=n.replace("mouse","pointer");return t.hasOwnProperty(i)?i:n});return{mouse:r,touch:e,pointer:a}}(),Om={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},Nm=!1;function Rp(r){var e=r.pointerType;return e==="pen"||e==="touch"}function kP(r){r.touching=!0,r.touchTimer!=null&&(clearTimeout(r.touchTimer),r.touchTimer=null),r.touchTimer=setTimeout(function(){r.touching=!1,r.touchTimer=null},700)}function rv(r){r&&(r.zrByTouch=!0)}function OP(r,e){return je(r.dom,new NP(r,e),!0)}function Kw(r,e){for(var t=e,a=!1;t&&t.nodeType!==9&&!(a=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return a}var NP=function(){function r(e,t){this.stopPropagation=Zt,this.stopImmediatePropagation=Zt,this.preventDefault=Zt,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),dr={mousedown:function(r){r=je(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=je(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=je(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=je(this.dom,r);var e=r.toElement||r.relatedTarget;Kw(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){Nm=!0,r=je(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){Nm||(r=je(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=je(this.dom,r),rv(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),dr.mousemove.call(this,r),dr.mousedown.call(this,r)},touchmove:function(r){r=je(this.dom,r),rv(r),this.handler.processGesture(r,"change"),dr.mousemove.call(this,r)},touchend:function(r){r=je(this.dom,r),rv(r),this.handler.processGesture(r,"end"),dr.mouseup.call(this,r),+new Date-+this.__lastTouchMomentzm||r<-zm}var vn=[],Ci=[],nv=We(),iv=Math.abs,HP=function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return hn(this.rotation)||hn(this.x)||hn(this.y)||hn(this.scaleX-1)||hn(this.scaleY-1)||hn(this.skewX)||hn(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),a=this.transform;if(!(t||e)){a&&(Bm(a),this.invTransform=null);return}a=a||We(),t?this.getLocalTransform(a):Bm(a),e&&(t?ia(a,e,a):fg(a,e)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(vn);var a=vn[0]<0?-1:1,n=vn[1]<0?-1:1,i=((vn[0]-a)*t+a)/vn[0]||0,o=((vn[1]-n)*t+n)/vn[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||We(),So(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(!!e){var t=e[0]*e[0]+e[1]*e[1],a=e[2]*e[2]+e[3]*e[3],n=Math.atan2(e[1],e[0]),i=Math.PI/2+n-Math.atan2(e[3],e[2]);a=Math.sqrt(a)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(!!this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||We(),ia(Ci,e.invTransform,t),t=Ci);var a=this.originX,n=this.originY;(a||n)&&(nv[4]=a,nv[5]=n,ia(Ci,t,nv),Ci[4]-=a,Ci[5]-=n,t=Ci),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var a=[e,t],n=this.invTransform;return n&&fe(a,a,n),a},r.prototype.transformCoordToGlobal=function(e,t){var a=[e,t],n=this.transform;return n&&fe(a,a,n),a},r.prototype.getLineScale=function(){var e=this.transform;return e&&iv(e[0]-1)>1e-10&&iv(e[3]-1)>1e-10?Math.sqrt(iv(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){Qw(this,e)},r.getLocalTransform=function(e,t){t=t||[];var a=e.originX||0,n=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,h=e.y,v=e.skewX?Math.tan(e.skewX):0,c=e.skewY?Math.tan(-e.skewY):0;if(a||n||s||l){var p=a+s,d=n+l;t[4]=-p*i-v*d*o,t[5]=-d*o-c*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=c*i,t[2]=v*o,u&&gi(t,t,u),t[4]+=a+f,t[5]+=n+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Ur=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function Qw(r,e){for(var t=0;t=0?parseFloat(r)/100*e:parseFloat(r):r}function df(r,e,t){var a=e.position||"inside",n=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",h="top";if(a instanceof Array)l+=br(a[0],t.width),u+=br(a[1],t.height),f=null,h=null;else switch(a){case"left":l-=n,u+=s,f="right",h="middle";break;case"right":l+=n+o,u+=s,h="middle";break;case"top":l+=o/2,u-=n,f="center",h="bottom";break;case"bottom":l+=o/2,u+=i+n,f="center";break;case"inside":l+=o/2,u+=s,f="center",h="middle";break;case"insideLeft":l+=n,u+=s,h="middle";break;case"insideRight":l+=o-n,u+=s,f="right",h="middle";break;case"insideTop":l+=o/2,u+=n,f="center";break;case"insideBottom":l+=o/2,u+=i-n,f="center",h="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,f="right";break;case"insideBottomLeft":l+=n,u+=i-n,h="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,f="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=h,r}var ov="__zr_normal__",sv=Ur.concat(["ignore"]),WP=Wr(Ur,function(r,e){return r[e]=!0,r},{ignore:!1}),Mi={},$P=new vt(0,0,0,0),dg=function(){function r(e){this.id=Tw(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,a){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=e,n[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;if(i.copyTransform(t),a.position!=null){var f=$P;a.layoutRect?f.copy(a.layoutRect):f.copy(this.getBoundingRect()),n||f.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Mi,a,f):df(Mi,a,f),i.x=Mi.x,i.y=Mi.y,o=Mi.align,s=Mi.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var v=void 0,c=void 0;h==="center"?(v=f.width*.5,c=f.height*.5):(v=br(h[0],f.width),c=br(h[1],f.height)),u=!0,i.originX=-i.x+v+(n?0:f.x),i.originY=-i.y+c+(n?0:f.y)}}a.rotation!=null&&(i.rotation=a.rotation);var p=a.offset;p&&(i.x+=p[0],i.y+=p[1],u||(i.originX=-p[0],i.originY=-p[1]));var d=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,g=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),y=void 0,m=void 0,_=void 0;d&&this.canBeInsideText()?(y=a.insideFill,m=a.insideStroke,(y==null||y==="auto")&&(y=this.getInsideTextFill()),(m==null||m==="auto")&&(m=this.getInsideTextStroke(y),_=!0)):(y=a.outsideFill,m=a.outsideStroke,(y==null||y==="auto")&&(y=this.getOutsideFill()),(m==null||m==="auto")&&(m=this.getOutsideStroke(y),_=!0)),y=y||"#000",(y!==g.fill||m!==g.stroke||_!==g.autoStroke||o!==g.align||s!==g.verticalAlign)&&(l=!0,g.fill=y,g.stroke=m,g.autoStroke=_,g.align=o,g.verticalAlign=s,t.setDefaultTextStyle(g)),t.__dirty|=Fe,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Np:Op},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),a=typeof t=="string"&&$e(t);a||(a=[255,255,255,1]);for(var n=a[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)a[o]=a[o]*n+(i?0:255)*(1-n);return a[3]=1,oa(a,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},B(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(et(e))for(var a=e,n=_t(a),i=0;i0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(ov,!1,e)},r.prototype.useState=function(e,t,a,n){var i=e===ov,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(ct(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){ig("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!a&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,v=this._textGuide;return h&&h.useState(e,t,a,f),v&&v.useState(e,t,a,f),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Fe),u}}},r.prototype.useStates=function(e,t,a){if(!e.length)this.clearStates();else{var n=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Fe)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var a=this.currentStates.slice();a.splice(t,1),this.useStates(a)}},r.prototype.replaceState=function(e,t,a){var n=this.currentStates.slice(),i=ct(n,e),o=ct(n,t)>=0;i>=0?o?n.splice(i,1):n[i]=t:a&&!o&&n.push(t),this.useStates(n)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(e),a&&a.animation.addAnimator(e),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var a=this.animators,n=a.length,i=[],o=0;o0&&t.during&&i[0].during(function(p,d){t.during(d)});for(var v=0;v0||n.force&&!o.length){var T=void 0,A=void 0,M=void 0;if(s){A={},v&&(T={});for(var S=0;S<_;S++){var y=d[S];A[y]=t[y],v?T[y]=a[y]:t[y]=a[y]}}else if(v){M={};for(var S=0;S<_;S++){var y=d[S];M[y]=As(t[y]),YP(t,a,y)}}var b=new pg(t,!1,!1,h?Pt(p,function(I){return I.targetName===e}):null);b.targetName=e,n.scope&&(b.scope=n.scope),v&&T&&b.whenWithKeys(0,T,d),M&&b.whenWithKeys(0,M,d),b.whenWithKeys(u==null?500:u,s?A:a,d).delay(f||0),r.addAnimator(b,e),o.push(b)}}const tT=dg;var eT=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var a=this._children,n=0;n=0&&(n.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,a){var n=ct(this._children,t);return n>=0&&this.replaceAt(a,n),this},e.prototype.replaceAt=function(t,a){var n=this._children,i=n[a];if(t&&t!==this&&t.parent!==this&&t!==i){n[a]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var a=this.__zr;a&&a!==t.__zr&&t.addSelfToZr(a),a&&a.refresh()},e.prototype.remove=function(t){var a=this.__zr,n=this._children,i=ct(n,t);return i<0?this:(n.splice(i,1),t.parent=null,a&&t.removeSelfFromZr(a),a&&a.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,a){return this._disposed||this.handler.on(e,t,a),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=n)return o;if(r>=i)return s}else{if(r>=n)return o;if(r<=i)return s}else{if(r===n)return o;if(r===i)return s}return(r-n)/l*u+o}function W(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return $(r)?eR(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Ut(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),aT),r=(+r).toFixed(e),t?r:+r}function or(r){return r.sort(function(e,t){return e-t}),r}function Vr(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return rR(r)}function rR(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),a=t>0?+e.slice(t+1):0,n=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function nT(r,e){var t=Math.log,a=Math.LN10,n=Math.floor(t(r[1]-r[0])/a),i=Math.round(t(Math.abs(e[1]-e[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function aR(r,e){var t=Wr(r,function(c,p){return c+(isNaN(p)?0:p)},0);if(t===0)return[];for(var a=Math.pow(10,e),n=G(r,function(c){return(isNaN(c)?0:c)/t*a*100}),i=a*100,o=G(n,function(c){return Math.floor(c)}),s=Wr(o,function(c,p){return c+p},0),l=G(n,function(c,p){return c-o[p]});su&&(u=l[h],f=h);++o[f],l[f]=0,++s}return G(o,function(c){return c/a})}function nR(r,e){var t=Math.max(Vr(r),Vr(e)),a=r+e;return t>aT?a:Ut(a,t)}var $m=9007199254740991;function iT(r){var e=Math.PI*2;return(r%e+e)%e}function Ws(r){return r>-Wm&&r=10&&e++,e}function oT(r,e){var t=gg(r),a=Math.pow(10,t),n=r/a,i;return e?n<1.5?i=1:n<2.5?i=2:n<4?i=3:n<7?i=5:i=10:n<1?i=1:n<2?i=2:n<3?i=3:n<5?i=5:i=10,r=i*a,t>=-20?+r.toFixed(t<0?-t:0):r}function fv(r,e){var t=(r.length-1)*e+1,a=Math.floor(t),n=+r[a-1],i=t-a;return i?n+i*(r[a]-n):n}function Um(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,a=0;a=0||i&&ct(i,l)<0)){var u=a.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var LR=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],PR=fi(LR),RR=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return PR(this,e,t)},r}(),zp=new cl(50);function ER(r){if(typeof r=="string"){var e=zp.get(r);return e&&e.image}else return r}function Sg(r,e,t,a,n){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=zp.get(r),o={hostEl:t,cb:a,cbPayload:n};return i?(e=i.image,!uh(e)&&i.pending.push(o)):(e=ua.loadImage(r,qm,qm),e.__zrImageSrc=r,zp.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function qm(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=o;l++)s-=o;var u=Ue(t,e);return u>s&&(t="",u=0),s=r-u,n.ellipsis=t,n.ellipsisWidth=u,n.contentWidth=s,n.containerWidth=r,n}function _T(r,e){var t=e.containerWidth,a=e.font,n=e.contentWidth;if(!t)return"";var i=Ue(r,a);if(i<=t)return r;for(var o=0;;o++){if(i<=n||o>=e.maxIterations){r+=e.ellipsis;break}var s=o===0?OR(r,n,e.ascCharWidth,e.cnCharWidth):i>0?Math.floor(r.length*n/i):0;r=r.substr(0,s),i=Ue(r,a)}return r===""&&(r=e.placeholder),r}function OR(r,e,t,a){for(var n=0,i=0,o=r.length;ic&&u){var p=Math.floor(c/s);h=h.slice(0,p)}if(r&&i&&f!=null)for(var d=mT(f,n,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),g=0;gs&&vv(t,r.substring(s,u),e,o),vv(t,l[2],e,o,l[1]),s=hv.lastIndex}sn){b>0?(m.tokens=m.tokens.slice(0,b),g(m,S,_),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y);break t}var I=w.width,L=I==null||I==="auto";if(typeof I=="string"&&I.charAt(I.length-1)==="%")x.percentWidth=I,f.push(x),x.contentWidth=Ue(x.text,M);else{if(L){var P=w.backgroundColor,R=P&&P.image;R&&(R=ER(R),uh(R)&&(x.width=Math.max(x.width,R.width*D/R.height)))}var E=p&&a!=null?a-S:null;E!=null&&E0&&p+a.accumWidth>a.width&&(f=e.split(` +`),u=!0),a.accumWidth=p}else{var d=ST(e,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=d.accumWidth+c,h=d.linesWidths,f=d.lines}}else f=e.split(` +`);for(var g=0;g=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var FR=Wr(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function HR(r){return GR(r)?!!FR[r]:!0}function ST(r,e,t,a,n){for(var i=[],o=[],s="",l="",u=0,f=0,h=0;ht:n+f+c>t){f?(s||l)&&(p?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=v,u+=c,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=v,f=c)):p?(i.push(l),o.push(u),l=v,u=c):(i.push(v),o.push(c));continue}f+=c,p?(l+=v,u+=c):(l&&(s+=l,l="",u=0),s+=v)}return!i.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=n),{accumWidth:f,lines:i,linesWidths:o}}var Gp="__zr_style_"+Math.round(Math.random()*10),ti={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},fh={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ti[Gp]=!0;var jm=["z","z2","invisible"],WR=["invisible"],$R=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var a=_t(t),n=0;n1e-4){s[0]=r-t,s[1]=e-a,l[0]=r+t,l[1]=e+a;return}if($l[0]=gv(n)*t+r,$l[1]=dv(n)*a+e,Ul[0]=gv(i)*t+r,Ul[1]=dv(i)*a+e,u(s,$l,Ul),f(l,$l,Ul),n=n%pn,n<0&&(n=n+pn),i=i%pn,i<0&&(i=i+pn),n>i&&!o?i+=pn:nn&&(Yl[0]=gv(c)*t+r,Yl[1]=dv(c)*a+e,u(s,Yl,s),f(l,Yl,l))}var Et={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},dn=[],gn=[],Cr=[],xa=[],Mr=[],Dr=[],yv=Math.min,mv=Math.max,yn=Math.cos,mn=Math.sin,jr=Math.abs,Fp=Math.PI,La=Fp*2,_v=typeof Float32Array<"u",Fo=[];function Sv(r){var e=Math.round(r/Fp*1e8)/1e8;return e%2*Fp}function xg(r,e){var t=Sv(r[0]);t<0&&(t+=La);var a=t-r[0],n=r[1];n+=a,!e&&n-t>=La?n=t+La:e&&t-n>=La?n=t-La:!e&&t>n?n=t+(La-Sv(t-n)):e&&t0&&(this._ux=jr(a/pf/e)||0,this._uy=jr(a/pf/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(Et.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var a=jr(e-this._xi),n=jr(t-this._yi),i=a>this._ux||n>this._uy;if(this.addData(Et.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){return this._drawPendingPt(),this.addData(Et.C,e,t,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,a,n){return this._drawPendingPt(),this.addData(Et.Q,e,t,a,n),this._ctx&&this._ctx.quadraticCurveTo(e,t,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(e,t,a,n,i,o){this._drawPendingPt(),Fo[0]=n,Fo[1]=i,xg(Fo,o),n=Fo[0],i=Fo[1];var s=i-n;return this.addData(Et.A,e,t,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,a,n,i,o),this._xi=yn(i)*a+e,this._yi=mn(i)*a+t,this},r.prototype.arcTo=function(e,t,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,a,n,i),this},r.prototype.rect=function(e,t,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,a,n),this.addData(Et.R,e,t,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(Et.Z);var e=this._ctx,t=this._x0,a=this._y0;return e&&e.closePath(),this._xi=t,this._yi=a,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){var t=e.length;!(this.data&&this.data.length===t)&&_v&&(this.data=new Float32Array(t));for(var a=0;af.length&&(this._expandData(),f=this.data);for(var h=0;h0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){Cr[0]=Cr[1]=Mr[0]=Mr[1]=Number.MAX_VALUE,xa[0]=xa[1]=Dr[0]=Dr[1]=-Number.MAX_VALUE;var e=this.data,t=0,a=0,n=0,i=0,o;for(o=0;oa||jr(_)>n||v===t-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case Et.C:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++],x=e[v++],w=e[v++];d=lP(i,o,S,b,g,y,x,w,10),i=x,o=w;break}case Et.Q:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++];d=fP(i,o,S,b,g,y,10),i=g,o=y;break}case Et.A:var T=e[v++],A=e[v++],M=e[v++],D=e[v++],I=e[v++],L=e[v++],P=L+I;v+=1,p&&(s=yn(I)*M+T,l=mn(I)*D+A),d=mv(M,D)*yv(La,Math.abs(L)),i=yn(P)*M+T,o=mn(P)*D+A;break;case Et.R:{s=i=e[v++],l=o=e[v++];var R=e[v++],E=e[v++];d=R*2+E*2;break}case Et.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[h++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,f,h,v,c=t<1,p,d,g=0,y=0,m,_=0,S,b;if(c&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m))return;t:for(var x=0;x0&&(e.lineTo(S,b),_=0),w){case Et.M:s=u=a[x++],l=f=a[x++],e.moveTo(u,f);break;case Et.L:{h=a[x++],v=a[x++];var A=jr(h-u),M=jr(v-f);if(A>n||M>i){if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+h*I,f*(1-I)+v*I);break t}g+=D}e.lineTo(h,v),u=h,f=v,_=0}else{var L=A*A+M*M;L>_&&(S=h,b=v,_=L)}break}case Et.C:{var P=a[x++],R=a[x++],E=a[x++],N=a[x++],O=a[x++],V=a[x++];if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;qa(u,P,E,O,I,dn),qa(f,R,N,V,I,gn),e.bezierCurveTo(dn[1],gn[1],dn[2],gn[2],dn[3],gn[3]);break t}g+=D}e.bezierCurveTo(P,R,E,N,O,V),u=O,f=V;break}case Et.Q:{var P=a[x++],R=a[x++],E=a[x++],N=a[x++];if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;Gs(u,P,E,I,dn),Gs(f,R,N,I,gn),e.quadraticCurveTo(dn[1],gn[1],dn[2],gn[2]);break t}g+=D}e.quadraticCurveTo(P,R,E,N),u=E,f=N;break}case Et.A:var F=a[x++],H=a[x++],U=a[x++],K=a[x++],Q=a[x++],pt=a[x++],St=a[x++],dt=!a[x++],at=U>K?U:K,gt=jr(U-K)>.001,lt=Q+pt,q=!1;if(c){var D=p[y++];g+D>m&&(lt=Q+pt*(m-g)/D,q=!0),g+=D}if(gt&&e.ellipse?e.ellipse(F,H,U,K,St,Q,lt,dt):e.arc(F,H,at,Q,lt,dt),q)break t;T&&(s=yn(Q)*U+F,l=mn(Q)*K+H),u=yn(lt)*U+F,f=mn(lt)*K+H;break;case Et.R:s=u=a[x],l=f=a[x+1],h=a[x++],v=a[x++];var ut=a[x++],zt=a[x++];if(c){var D=p[y++];if(g+D>m){var bt=m-g;e.moveTo(h,v),e.lineTo(h+yv(bt,ut),v),bt-=ut,bt>0&&e.lineTo(h+ut,v+yv(bt,zt)),bt-=zt,bt>0&&e.lineTo(h+mv(ut-bt,0),v+zt),bt-=ut,bt>0&&e.lineTo(h,v+mv(zt-bt,0));break t}g+=D}e.rect(h,v,ut,zt);break;case Et.Z:if(c){var D=p[y++];if(g+D>m){var I=(m-g)/D;e.lineTo(u*(1-I)+s*I,f*(1-I)+l*I);break t}g+=D}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=Et,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function Ra(r,e,t,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>e+s&&o>a+s||or+s&&i>t+s||ie+h&&f>a+h&&f>i+h&&f>s+h||fr+h&&u>t+h&&u>n+h&&u>o+h||ue+u&&l>a+u&&l>i+u||lr+u&&s>t+u&&s>n+u||st||f+un&&(n+=Ho);var v=Math.atan2(l,s);return v<0&&(v+=Ho),v>=a&&v<=n||v+Ho>=a&&v+Ho<=n}function ea(r,e,t,a,n,i){if(i>e&&i>a||in?s:0}var ba=Zr.CMD,_n=Math.PI*2,jR=1e-4;function QR(r,e){return Math.abs(r-e)e&&u>a&&u>i&&u>s||u1&&JR(),c=te(e,a,i,s,Je[0]),v>1&&(p=te(e,a,i,s,Je[1]))),v===2?ge&&s>a&&s>i||s=0&&u<=1){for(var f=0,h=ie(e,a,i,u),v=0;vt||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Te[0]=-l,Te[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=_n-1e-4){a=0,n=_n;var f=i?1:-1;return o>=Te[0]+r&&o<=Te[1]+r?f:0}if(a>n){var h=a;a=n,n=h}a<0&&(a+=_n,n+=_n);for(var v=0,c=0;c<2;c++){var p=Te[c];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=_n+d),(d>=a&&d<=n||d+_n>=a&&d+_n<=n)&&(d>Math.PI/2&&d1&&(t||(s+=ea(l,u,f,h,a,n))),g&&(l=i[p],u=i[p+1],f=l,h=u),d){case ba.M:f=i[p++],h=i[p++],l=f,u=h;break;case ba.L:if(t){if(Ra(l,u,i[p],i[p+1],e,a,n))return!0}else s+=ea(l,u,i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case ba.C:if(t){if(qR(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=tE(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case ba.Q:if(t){if(xT(l,u,i[p++],i[p++],i[p],i[p+1],e,a,n))return!0}else s+=eE(l,u,i[p++],i[p++],i[p],i[p+1],a,n)||0;l=i[p++],u=i[p++];break;case ba.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],b=i[p++],x=i[p++];p+=1;var w=!!(1-i[p++]);v=Math.cos(b)*_+y,c=Math.sin(b)*S+m,g?(f=v,h=c):s+=ea(l,u,v,c,a,n);var T=(a-y)*S/_+y;if(t){if(KR(y,m,S,b,b+x,w,e,T,n))return!0}else s+=rE(y,m,S,b,b+x,w,T,n);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case ba.R:f=l=i[p++],h=u=i[p++];var A=i[p++],M=i[p++];if(v=f+A,c=h+M,t){if(Ra(f,h,v,h,e,a,n)||Ra(v,h,v,c,e,a,n)||Ra(v,c,f,c,e,a,n)||Ra(f,c,f,h,e,a,n))return!0}else s+=ea(v,h,v,c,a,n),s+=ea(f,c,f,h,a,n);break;case ba.Z:if(t){if(Ra(l,u,f,h,e,a,n))return!0}else s+=ea(l,u,f,h,a,n);l=f,u=h;break}}return!t&&!QR(u,h)&&(s+=ea(l,u,f,h,a,n)||0),s!==0}function aE(r,e,t){return bT(r,0,!1,e,t)}function nE(r,e,t,a){return bT(r,e,!0,t,a)}var gf=tt({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ti),iE={style:tt({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},fh.style)},xv=Ur.concat(["invisible","culling","z","z2","zlevel","parent"]),oE=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new e;n.buildPath===e.prototype.buildPath&&(n.buildPath=function(l){t.buildPath(l,t.shape)}),n.silent=!0;var i=n.style;for(var o in a)i[o]!==a[o]&&(i[o]=a[o]);i.fill=a.fill?a.decal:null,i.decal=null,i.shadowColor=null,a.strokeFirst&&(i.stroke=null);for(var s=0;s.5?Op:a>.2?FP:Np}else if(t)return Np}return Op},e.prototype.getInsideTextStroke=function(t){var a=this.style.fill;if($(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=vf(t,0)0))},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,a=this.style,n=!t;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Ui)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||n){s.copy(t);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f==null?4:f)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return t},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect(),o=this.style;if(t=n[0],a=n[1],i.contain(t,a)){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)),nE(s,l/u,t,a)))return!0}if(this.hasFill())return aE(s,t,a)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Ui,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,a){t==="shape"?this.setShape(a):r.prototype.attrKV.call(this,t,a)},e.prototype.setShape=function(t,a){var n=this.shape;return n||(n=this.shape={}),typeof t=="string"?n[t]=a:B(n,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Ui)},e.prototype.createStyle=function(t){return nh(gf,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var a=this._normalState;t.shape&&!a.shape&&(a.shape=B({},this.shape))},e.prototype._applyStateObj=function(t,a,n,i,o,s){r.prototype._applyStateObj.call(this,t,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=B({},n.shape),B(u,a.shape)):(u=B({},i?this.shape:n.shape),B(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=B({},this.shape);for(var f={},h=_t(u),v=0;v0},e.prototype.hasFill=function(){var t=this.style,a=t.fill;return a!=null&&a!=="none"},e.prototype.createStyle=function(t){return nh(sE,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var a=t.text;a!=null?a+="":a="";var n=pl(a,t.font,t.textAlign,t.textBaseline);if(n.x+=t.x||0,n.y+=t.y||0,this.hasStroke()){var i=t.lineWidth;n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i}this._rect=n}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(lr);wT.prototype.type="tspan";const Us=wT;var lE=tt({x:0,y:0},ti),uE={style:tt({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},fh.style)};function fE(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var TT=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return nh(lE,t)},e.prototype._getSize=function(t){var a=this.style,n=a[t];if(n!=null)return n;var i=fE(a.image)?a.image:this.__image;if(!i)return 0;var o=t==="width"?"height":"width",s=a[o];return s==null?i[t]:i[t]/i[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return uE},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new vt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(lr);TT.prototype.type="image";const pe=TT;function hE(r,e){var t=e.x,a=e.y,n=e.width,i=e.height,o=e.r,s,l,u,f;n<0&&(t=t+n,n=-n),i<0&&(a=a+i,i=-i),typeof o=="number"?s=l=u=f=o:o instanceof Array?o.length===1?s=l=u=f=o[0]:o.length===2?(s=u=o[0],l=f=o[1]):o.length===3?(s=o[0],l=f=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],f=o[3]):s=l=u=f=0;var h;s+l>n&&(h=s+l,s*=n/h,l*=n/h),u+f>n&&(h=u+f,u*=n/h,f*=n/h),l+u>i&&(h=l+u,l*=i/h,u*=i/h),s+f>i&&(h=s+f,s*=i/h,f*=i/h),r.moveTo(t+s,a),r.lineTo(t+n-l,a),l!==0&&r.arc(t+n-l,a+l,l,-Math.PI/2,0),r.lineTo(t+n,a+i-u),u!==0&&r.arc(t+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(t+f,a+i),f!==0&&r.arc(t+f,a+i-f,f,Math.PI/2,Math.PI),r.lineTo(t,a+s),s!==0&&r.arc(t+s,a+s,s,Math.PI,Math.PI*1.5)}var ji=Math.round;function AT(r,e,t){if(!!e){var a=e.x1,n=e.x2,i=e.y1,o=e.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(ji(a*2)===ji(n*2)&&(r.x1=r.x2=Un(a,s,!0)),ji(i*2)===ji(o*2)&&(r.y1=r.y2=Un(i,s,!0))),r}}function CT(r,e,t){if(!!e){var a=e.x,n=e.y,i=e.width,o=e.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=Un(a,s,!0),r.y=Un(n,s,!0),r.width=Math.max(Un(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(Un(n+o,s,!1)-r.y,o===0?0:1)),r}}function Un(r,e,t){if(!e)return r;var a=ji(r*2);return(a+ji(e))%2===0?a/2:(a+(t?1:-1))/2}var vE=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),cE={},MT=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new vE},e.prototype.buildPath=function(t,a){var n,i,o,s;if(this.subPixelOptimize){var l=CT(cE,a,this.style);n=l.x,i=l.y,o=l.width,s=l.height,l.r=a.r,a=l}else n=a.x,i=a.y,o=a.width,s=a.height;a.r?hE(t,a):t.rect(n,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(mt);MT.prototype.type="rect";const wt=MT;var r0={fill:"#000"},a0=2,pE={style:tt({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},fh.style)},DT=function(r){k(e,r);function e(t){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=r0,a.attr(t),a}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,I=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),L=o.calculatedLineHeight,P=0;P=0&&(P=x[L],P.align==="right");)this._placeToken(P,t,T,y,I,"right",_),A-=P.width,I-=P.width,L--;for(D+=(i-(D-g)-(m-I)-A)/2;M<=L;)P=x[M],this._placeToken(P,t,T,y,D+P.width/2,"center",_),D+=P.width,M++;y+=T}},e.prototype._placeToken=function(t,a,n,i,o,s,l){var u=a.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,h=i+n/2;f==="top"?h=i+t.height/2:f==="bottom"&&(h=i+n-t.height/2);var v=!t.isLineHolder&&bv(u);v&&this._renderBackground(u,a,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var c=!!u.backgroundColor,p=t.textPadding;p&&(o=u0(o,s,p),h-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(Us),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=l0("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),b=s0("stroke"in u?u.stroke:"stroke"in a?a.stroke:!c&&!l&&(!y.autoStroke||m)?(_=a0,y.stroke):null),x=u.textShadowBlur>0||a.textShadowBlur>0;g.text=t.text,g.x=o,g.y=h,x&&(g.shadowBlur=u.textShadowBlur||a.textShadowBlur||0,g.shadowColor=u.textShadowColor||a.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||a.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||a.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||Xa,g.opacity=Fr(u.opacity,a.opacity,1),i0(g,u),b&&(g.lineWidth=Fr(u.lineWidth,a.lineWidth,_),g.lineDash=ot(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=b),S&&(g.fill=S);var w=t.contentWidth,T=t.contentHeight;d.setBoundingRect(new vt(cs(g.x,w,g.textAlign),Yi(g.y,T,g.textBaseline),w,T))},e.prototype._renderBackground=function(t,a,n,i,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,h=l&&l.image,v=l&&!h,c=t.borderRadius,p=this,d,g;if(v||t.lineHeight||u&&f){d=this._getOrCreateChild(wt),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=c,d.dirtyShape()}if(v){var m=d.style;m.fill=l||null,m.fillOpacity=ot(t.fillOpacity,1)}else if(h){g=this._getOrCreateChild(pe),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=ot(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=Fr(t.opacity,a.opacity,1)},e.makeFont=function(t){var a="";return LT(t)&&(a=[t.fontStyle,t.fontWeight,IT(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),a&&mr(a)||t.textFont||t.font},e}(lr),dE={left:!0,right:1,center:1},gE={top:1,bottom:1,middle:1},n0=["fontStyle","fontWeight","fontSize","fontFamily"];function IT(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?rg+"px":r+"px"}function i0(r,e){for(var t=0;t=0,i=!1;if(r instanceof mt){var o=PT(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Di(s)||Di(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=B({},a),u=B({},u),u.fill=s):!Di(u.fill)&&Di(s)?(i=!0,a=B({},a),u=B({},u),u.fill=Mp(s)):!Di(u.stroke)&&Di(l)&&(i||(a=B({},a),u=B({},u)),u.stroke=Mp(l)),a.style=u}}if(a&&a.z2==null){i||(a=B({},a));var f=r.z2EmphasisLift;a.z2=r.z2+(f!=null?f:bo)}return a}function wE(r,e,t){if(t&&t.z2==null){t=B({},t);var a=r.z2SelectLift;t.z2=r.z2+(a!=null?a:mE)}return t}function TE(r,e,t){var a=ct(r.currentStates,e)>=0,n=r.style.opacity,i=a?null:xE(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=B({},t),o=B({opacity:a?n:i.opacity*.1},o),t.style=o),t}function wv(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return bE(this,r,e,t);if(r==="blur")return TE(this,r,t);if(r==="select")return wE(this,r,t)}return t}function hi(r){r.stateProxy=wv;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=wv),t&&(t.stateProxy=wv)}function p0(r,e){!BT(r,e)&&!r.__highByOuter&&ya(r,RT)}function d0(r,e){!BT(r,e)&&!r.__highByOuter&&ya(r,ET)}function va(r,e){r.__highByOuter|=1<<(e||0),ya(r,RT)}function ca(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&ya(r,ET)}function OT(r){ya(r,Tg)}function Ag(r){ya(r,kT)}function NT(r){ya(r,_E)}function VT(r){ya(r,SE)}function BT(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function zT(r){var e=r.getModel(),t=[],a=[];e.eachComponent(function(n,i){var o=bg(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){kT(u)}),s&&t.push(i)),o.isBlured=!1}),C(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(t,!1,e)})}function Wp(r,e,t,a){var n=a.getModel();t=t||"coordinateSystem";function i(u,f){for(var h=0;h0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function ri(r,e,t){Yn(r,!0),ya(r,hi),Up(r,e,t)}function LE(r){Yn(r,!1)}function Ht(r,e,t,a){a?LE(r):ri(r,e,t)}function Up(r,e,t){var a=it(r);e!=null?(a.focus=e,a.blurScope=t):a.focus&&(a.focus=null)}var y0=["emphasis","blur","select"],PE={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function ve(r,e,t,a){t=t||"itemStyle";for(var n=0;n1&&(o*=Tv(p),s*=Tv(p));var d=(n===i?-1:1)*Tv((o*o*(s*s)-o*o*(c*c)-s*s*(v*v))/(o*o*(c*c)+s*s*(v*v)))||0,g=d*o*c/s,y=d*-s*v/o,m=(r+t)/2+Xl(h)*g-Zl(h)*y,_=(e+a)/2+Zl(h)*g+Xl(h)*y,S=x0([1,0],[(v-g)/o,(c-y)/s]),b=[(v-g)/o,(c-y)/s],x=[(-1*v-g)/o,(-1*c-y)/s],w=x0(b,x);if(Zp(b,x)<=-1&&(w=Wo),Zp(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Wo*1e6)/1e6;w=Wo*2+T%2*Wo}f.addData(u,m,_,o,s,S,w,h,i)}var VE=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,BE=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function zE(r){var e=new Zr;if(!r)return e;var t=0,a=0,n=t,i=a,o,s=Zr.CMD,l=r.match(VE);if(!l)return e;for(var u=0;uP*P+R*R&&(T=M,A=D),{cx:T,cy:A,x0:-f,y0:-h,x1:T*(n/b-1),y1:A*(n/b-1)}}function YE(r){var e;if(z(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function ZE(r,e){var t,a=ps(e.r,0),n=ps(e.r0||0,0),i=a>0,o=n>0;if(!(!i&&!o)){if(i||(a=n,n=0),n>a){var s=a;a=n,n=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,h=e.cy,v=!!e.clockwise,c=w0(u-l),p=c>Av&&c%Av;if(p>pr&&(c=p),!(a>pr))r.moveTo(f,h);else if(c>Av-pr)r.moveTo(f+a*Li(l),h+a*Sn(l)),r.arc(f,h,a,l,u,!v),n>pr&&(r.moveTo(f+n*Li(u),h+n*Sn(u)),r.arc(f,h,n,u,l,v));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=void 0,A=void 0,M=void 0,D=void 0,I=void 0,L=void 0,P=void 0,R=a*Li(l),E=a*Sn(l),N=n*Li(u),O=n*Sn(u),V=c>pr;if(V){var F=e.cornerRadius;F&&(t=YE(F),d=t[0],g=t[1],y=t[2],m=t[3]);var H=w0(a-n)/2;if(_=Ir(H,y),S=Ir(H,m),b=Ir(H,d),x=Ir(H,g),A=w=ps(_,S),M=T=ps(b,x),(w>pr||T>pr)&&(D=a*Li(u),I=a*Sn(u),L=n*Li(l),P=n*Sn(l),cpr){var gt=Ir(y,A),lt=Ir(m,A),q=ql(L,P,R,E,a,gt,v),ut=ql(D,I,N,O,a,lt,v);r.moveTo(f+q.cx+q.x0,h+q.cy+q.y0),A0&&r.arc(f+q.cx,h+q.cy,gt,ge(q.y0,q.x0),ge(q.y1,q.x1),!v),r.arc(f,h,a,ge(q.cy+q.y1,q.cx+q.x1),ge(ut.cy+ut.y1,ut.cx+ut.x1),!v),lt>0&&r.arc(f+ut.cx,h+ut.cy,lt,ge(ut.y1,ut.x1),ge(ut.y0,ut.x0),!v))}else r.moveTo(f+R,h+E),r.arc(f,h,a,l,u,!v);if(!(n>pr)||!V)r.lineTo(f+N,h+O);else if(M>pr){var gt=Ir(d,M),lt=Ir(g,M),q=ql(N,O,D,I,n,-lt,v),ut=ql(R,E,L,P,n,-gt,v);r.lineTo(f+q.cx+q.x0,h+q.cy+q.y0),M0&&r.arc(f+q.cx,h+q.cy,lt,ge(q.y0,q.x0),ge(q.y1,q.x1),!v),r.arc(f,h,n,ge(q.cy+q.y1,q.cx+q.x1),ge(ut.cy+ut.y1,ut.cx+ut.x1),v),gt>0&&r.arc(f+ut.cx,h+ut.cy,gt,ge(ut.y1,ut.x1),ge(ut.y0,ut.x0),!v))}else r.lineTo(f+N,h+O),r.arc(f,h,n,u,l,v)}r.closePath()}}}var XE=function(){function r(){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 r}(),XT=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new XE},e.prototype.buildPath=function(t,a){ZE(t,a)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(mt);XT.prototype.type="sector";const Ve=XT;var qE=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),qT=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new qE},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.PI*2;t.moveTo(n+a.r,i),t.arc(n,i,a.r,0,o,!1),t.moveTo(n+a.r0,i),t.arc(n,i,a.r0,0,o,!0)},e}(mt);qT.prototype.type="ring";const ph=qT;function KE(r,e,t,a){var n=[],i=[],o=[],s=[],l,u,f,h;if(a){f=[1/0,1/0],h=[-1/0,-1/0];for(var v=0,c=r.length;v=2){if(a){var i=KE(n,a,t,e.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,h=n.length;sbn[1]){if(s=!1,i)return s;var f=Math.abs(bn[0]-xn[1]),h=Math.abs(xn[0]-bn[1]);Math.min(f,h)>n.len()&&(f0){var h=f.duration,v=f.delay,c=f.easing,p={duration:h,delay:v||0,easing:c,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Dt(r,e,t,a,n,i){Pg("update",r,e,t,a,n,i)}function Bt(r,e,t,a,n,i){Pg("enter",r,e,t,a,n,i)}function ro(r){if(!r.__zr)return!0;for(var e=0;eMath.abs(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function C0(r){return!r.isGroup}function gk(r){return r.shape!=null}function ml(r,e,t){if(!r||!e)return;function a(o){var s={};return o.traverse(function(l){C0(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return gk(o)&&(s.shape=B({},o.shape)),s}var i=a(r);e.traverse(function(o){if(C0(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),Dt(o,l,t,it(o).dataIndex)}}})}function lA(r,e){return G(r,function(t){var a=t[0];a=_f(a,e.x),a=Sf(a,e.x+e.width);var n=t[1];return n=_f(n,e.y),n=Sf(n,e.y+e.height),[a,n]})}function yk(r,e){var t=_f(r.x,e.x),a=Sf(r.x+r.width,e.x+e.width),n=_f(r.y,e.y),i=Sf(r.y+r.height,e.y+e.height);if(a>=t&&i>=n)return{x:t,y:n,width:a-t,height:i-n}}function _l(r,e,t){var a=B({rectHover:!0},e),n=a.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),tt(n,t),new pe(a)):gh(r.replace("path://",""),a,t,"center")}function ds(r,e,t,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=Cv(c,p,f,h)/v;return!(g<0||g>1)}function Cv(r,e,t,a){return r*a-t*e}function mk(r){return r<=1e-6&&r>=-1e-6}function To(r){var e=r.itemTooltipOption,t=r.componentModel,a=r.itemName,n=$(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&C(_t(l),function(f){Z(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=it(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:tt({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function M0(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function nn(r,e){if(r)if(z(r))for(var t=0;t=0&&s.push(l)}),s}}function on(r,e){return ht(ht({},r,!0),e,!0)}const Pk={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:". "}}}},Rk={time:{month:["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"],monthAbbr:["1\u6708","2\u6708","3\u6708","4\u6708","5\u6708","6\u6708","7\u6708","8\u6708","9\u6708","10\u6708","11\u6708","12\u6708"],dayOfWeek:["\u661F\u671F\u65E5","\u661F\u671F\u4E00","\u661F\u671F\u4E8C","\u661F\u671F\u4E09","\u661F\u671F\u56DB","\u661F\u671F\u4E94","\u661F\u671F\u516D"],dayOfWeekAbbr:["\u65E5","\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D"]},legend:{selector:{all:"\u5168\u9009",inverse:"\u53CD\u9009"}},toolbox:{brush:{title:{rect:"\u77E9\u5F62\u9009\u62E9",polygon:"\u5708\u9009",lineX:"\u6A2A\u5411\u9009\u62E9",lineY:"\u7EB5\u5411\u9009\u62E9",keep:"\u4FDD\u6301\u9009\u62E9",clear:"\u6E05\u9664\u9009\u62E9"}},dataView:{title:"\u6570\u636E\u89C6\u56FE",lang:["\u6570\u636E\u89C6\u56FE","\u5173\u95ED","\u5237\u65B0"]},dataZoom:{title:{zoom:"\u533A\u57DF\u7F29\u653E",back:"\u533A\u57DF\u7F29\u653E\u8FD8\u539F"}},magicType:{title:{line:"\u5207\u6362\u4E3A\u6298\u7EBF\u56FE",bar:"\u5207\u6362\u4E3A\u67F1\u72B6\u56FE",stack:"\u5207\u6362\u4E3A\u5806\u53E0",tiled:"\u5207\u6362\u4E3A\u5E73\u94FA"}},restore:{title:"\u8FD8\u539F"},saveAsImage:{title:"\u4FDD\u5B58\u4E3A\u56FE\u7247",lang:["\u53F3\u952E\u53E6\u5B58\u4E3A\u56FE\u7247"]}},series:{typeNames:{pie:"\u997C\u56FE",bar:"\u67F1\u72B6\u56FE",line:"\u6298\u7EBF\u56FE",scatter:"\u6563\u70B9\u56FE",effectScatter:"\u6D9F\u6F2A\u6563\u70B9\u56FE",radar:"\u96F7\u8FBE\u56FE",tree:"\u6811\u56FE",treemap:"\u77E9\u5F62\u6811\u56FE",boxplot:"\u7BB1\u578B\u56FE",candlestick:"K\u7EBF\u56FE",k:"K\u7EBF\u56FE",heatmap:"\u70ED\u529B\u56FE",map:"\u5730\u56FE",parallel:"\u5E73\u884C\u5750\u6807\u56FE",lines:"\u7EBF\u56FE",graph:"\u5173\u7CFB\u56FE",sankey:"\u6851\u57FA\u56FE",funnel:"\u6F0F\u6597\u56FE",gauge:"\u4EEA\u8868\u76D8\u56FE",pictorialBar:"\u8C61\u5F62\u67F1\u56FE",themeRiver:"\u4E3B\u9898\u6CB3\u6D41\u56FE",sunburst:"\u65ED\u65E5\u56FE",custom:"\u81EA\u5B9A\u4E49\u56FE\u8868",chart:"\u56FE\u8868"}},aria:{general:{withTitle:"\u8FD9\u662F\u4E00\u4E2A\u5173\u4E8E\u201C{title}\u201D\u7684\u56FE\u8868\u3002",withoutTitle:"\u8FD9\u662F\u4E00\u4E2A\u56FE\u8868\uFF0C"},series:{single:{prefix:"",withName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\uFF0C\u8868\u793A{seriesName}\u3002",withoutName:"\u56FE\u8868\u7C7B\u578B\u662F{seriesType}\u3002"},multiple:{prefix:"\u5B83\u7531{seriesCount}\u4E2A\u56FE\u8868\u7CFB\u5217\u7EC4\u6210\u3002",withName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A\u8868\u793A{seriesName}\u7684{seriesType}\uFF0C",withoutName:"\u7B2C{seriesId}\u4E2A\u7CFB\u5217\u662F\u4E00\u4E2A{seriesType}\uFF0C",separator:{middle:"\uFF1B",end:"\u3002"}}},data:{allData:"\u5176\u6570\u636E\u662F\u2014\u2014",partialData:"\u5176\u4E2D\uFF0C\u524D{displayCnt}\u9879\u662F\u2014\u2014",withName:"{name}\u7684\u6570\u636E\u662F{value}",withoutName:"{value}",separator:{middle:"\uFF0C",end:""}}}};var bf="ZH",kg="EN",ao=kg,qu={},Og={},dA=At.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ao).toUpperCase();return r.indexOf(bf)>-1?bf:ao}():ao;function gA(r,e){r=r.toUpperCase(),Og[r]=new Nt(e),qu[r]=e}function Ek(r){if($(r)){var e=qu[r.toUpperCase()]||{};return r===bf||r===kg?rt(e):ht(rt(e),rt(qu[ao]),!1)}else return ht(rt(r),rt(qu[ao]),!1)}function Kp(r){return Og[r]}function kk(){return Og[ao]}gA(kg,Pk);gA(bf,Rk);var Ng=1e3,Vg=Ng*60,Ps=Vg*60,ir=Ps*24,R0=ir*365,gs={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}"},Ql="{yyyy}-{MM}-{dd}",E0={year:"{yyyy}",month:"{yyyy}-{MM}",day:Ql,hour:Ql+" "+gs.hour,minute:Ql+" "+gs.minute,second:Ql+" "+gs.second,millisecond:gs.none},Iv=["year","month","day","hour","minute","second","millisecond"],yA=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function wa(r,e){return r+="","0000".substr(0,e-r.length)+r}function no(r){switch(r){case"half-year":case"quarter":return"month";case"week":case"half-week":return"day";case"half-day":case"quarter-day":return"hour";default:return r}}function Ok(r){return r===no(r)}function Nk(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function _h(r,e,t,a){var n=Yr(r),i=n[Bg(t)](),o=n[io(t)]()+1,s=Math.floor((o-1)/3)+1,l=n[Sh(t)](),u=n["get"+(t?"UTC":"")+"Day"](),f=n[qs(t)](),h=(f-1)%12+1,v=n[xh(t)](),c=n[bh(t)](),p=n[wh(t)](),d=f>=12?"pm":"am",g=d.toUpperCase(),y=a instanceof Nt?a:Kp(a||dA)||kk(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,wa(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,wa(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,wa(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,wa(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,wa(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,wa(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,wa(c,2)).replace(/{s}/g,c+"").replace(/{SSS}/g,wa(p,3)).replace(/{S}/g,p+"")}function Vk(r,e,t,a,n){var i=null;if($(t))i=t;else if(j(t))i=t(r.value,e,{level:r.level});else{var o=B({},gs);if(r.level>0)for(var s=0;s=0;--s)if(l[u]){i=l[u];break}i=i||o.none}if(z(i)){var h=r.level==null?0:r.level>=0?r.level:i.length+r.level;h=Math.min(h,i.length-1),i=i[h]}}return _h(new Date(r.value),i,n,a)}function mA(r,e){var t=Yr(r),a=t[io(e)]()+1,n=t[Sh(e)](),i=t[qs(e)](),o=t[xh(e)](),s=t[bh(e)](),l=t[wh(e)](),u=l===0,f=u&&s===0,h=f&&o===0,v=h&&i===0,c=v&&n===1,p=c&&a===1;return p?"year":c?"month":v?"day":h?"hour":f?"minute":u?"second":"millisecond"}function k0(r,e,t){var a=Mt(r)?Yr(r):r;switch(e=e||mA(r,t),e){case"year":return a[Bg(t)]();case"half-year":return a[io(t)]()>=6?1:0;case"quarter":return Math.floor((a[io(t)]()+1)/4);case"month":return a[io(t)]();case"day":return a[Sh(t)]();case"half-day":return a[qs(t)]()/24;case"hour":return a[qs(t)]();case"minute":return a[xh(t)]();case"second":return a[bh(t)]();case"millisecond":return a[wh(t)]()}}function Bg(r){return r?"getUTCFullYear":"getFullYear"}function io(r){return r?"getUTCMonth":"getMonth"}function Sh(r){return r?"getUTCDate":"getDate"}function qs(r){return r?"getUTCHours":"getHours"}function xh(r){return r?"getUTCMinutes":"getMinutes"}function bh(r){return r?"getUTCSeconds":"getSeconds"}function wh(r){return r?"getUTCMilliseconds":"getMilliseconds"}function Bk(r){return r?"setUTCFullYear":"setFullYear"}function _A(r){return r?"setUTCMonth":"setMonth"}function SA(r){return r?"setUTCDate":"setDate"}function xA(r){return r?"setUTCHours":"setHours"}function bA(r){return r?"setUTCMinutes":"setMinutes"}function wA(r){return r?"setUTCSeconds":"setSeconds"}function TA(r){return r?"setUTCMilliseconds":"setMilliseconds"}function AA(r){if(!sT(r))return $(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function CA(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,a){return a.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Mo=lg;function jp(r,e,t){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(f){return f&&mr(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?Yr(r):r;if(isNaN(+l)){if(s)return"-"}else return _h(l,a,t)}if(e==="ordinal")return pp(r)?n(r):Mt(r)&&i(r)?r+"":"-";var u=ha(r);return i(u)?AA(u):pp(r)?n(r):typeof r=="boolean"?r+"":"-"}var O0=["a","b","c","d","e","f","g"],Lv=function(r,e){return"{"+r+(e==null?"":e)+"}"};function MA(r,e,t){z(e)||(e=[e]);var a=e.length;if(!a)return"";for(var n=e[0].$vars||[],i=0;i':'';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:n==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:a}:{width:10,height:10,borderRadius:5,backgroundColor:a}}}function vi(r,e){return e=e||"transparent",$(r)?r:et(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function wf(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Ku=C,DA=["left","right","top","bottom","width","height"],Zn=[["width","left","right"],["height","top","bottom"]];function zg(r,e,t,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),h=e.childAt(u+1),v=h&&h.getBoundingRect(),c,p;if(r==="horizontal"){var d=f.width+(v?-v.x+f.x:0);c=i+d,c>a||l.newline?(i=0,c=d,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);p=o+g,p>n||l.newline?(i+=s+t,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=c+t:o=p+t)})}var ni=zg;st(zg,"vertical");st(zg,"horizontal");function Fk(r,e,t){var a=e.width,n=e.height,i=W(r.left,a),o=W(r.top,n),s=W(r.right,a),l=W(r.bottom,n);return(isNaN(i)||isNaN(parseFloat(r.left)))&&(i=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=a),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=n),t=Mo(t||0),{width:Math.max(s-i-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function Jt(r,e,t){t=Mo(t||0);var a=e.width,n=e.height,i=W(r.left,a),o=W(r.top,n),s=W(r.right,a),l=W(r.bottom,n),u=W(r.width,a),f=W(r.height,n),h=t[2]+t[0],v=t[1]+t[3],c=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(f)&&(f=n-l-h-o),c!=null&&(isNaN(u)&&isNaN(f)&&(c>a/n?u=a*.8:f=n*.8),isNaN(u)&&(u=c*f),isNaN(f)&&(f=u/c)),isNaN(i)&&(i=a-s-u-v),isNaN(o)&&(o=n-l-f-h),r.left||r.right){case"center":i=a/2-u/2-t[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-f/2-t[0];break;case"bottom":o=n-f-h;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(f)&&(f=n-h-o-(l||0));var p=new vt(i+t[3],o+t[0],u,f);return p.margin=t,p}function Th(r,e,t,a,n,i){var o=!n||!n.hv||n.hv[0],s=!n||!n.hv||n.hv[1],l=n&&n.boundingMode||"all";if(i=i||r,i.x=r.x,i.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new vt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var f=r.getLocalTransform();u=u.clone(),u.applyTransform(f)}var h=Jt(tt({width:u.width,height:u.height},e),t,a),v=o?h.x-u.x:0,c=s?h.y-u.y:0;return l==="raw"?(i.x=v,i.y=c):(i.x+=v,i.y+=c),i===r&&r.markRedraw(),!0}function Hk(r,e){return r[Zn[e][0]]!=null||r[Zn[e][1]]!=null&&r[Zn[e][2]]!=null}function Ks(r){var e=r.layoutMode||r.constructor.layoutMode;return et(e)?e:e?{type:e}:null}function ja(r,e,t){var a=t&&t.ignoreSize;!z(a)&&(a=[a,a]);var n=o(Zn[0],0),i=o(Zn[1],1);u(Zn[0],r,n),u(Zn[1],r,i);function o(f,h){var v={},c=0,p={},d=0,g=2;if(Ku(f,function(_){p[_]=r[_]}),Ku(f,function(_){s(e,_)&&(v[_]=p[_]=e[_]),l(v,_)&&c++,l(p,_)&&d++}),a[h])return l(e,f[1])?p[f[2]]=null:l(e,f[2])&&(p[f[1]]=null),p;if(d===g||!c)return p;if(c>=g)return v;for(var y=0;y=0;l--)s=ht(s,n[l],!0);a.defaultOption=s}return a.defaultOption},e.prototype.getReferringComponents=function(t,a){var n=t+"Index",i=t+"Id";return dl(this.ecModel,t,{index:this.get(n,!0),id:this.get(i,!0)},a)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(Nt);yT(Io,Nt);lh(Io);Ik(Io);Lk(Io,$k);function $k(r){var e=[];return C(Io.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=G(e,function(t){return Br(t).main}),r!=="dataset"&&ct(e,"dataset")<=0&&e.unshift("dataset"),e}const Tt=Io;var LA="";typeof navigator<"u"&&(LA=navigator.platform||"");var Pi="rgba(0, 0, 0, 0.2)";const Uk={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Pi,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Pi,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Pi,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Pi,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Pi,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Pi,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:LA.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 PA=X(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),fr="original",Se="arrayRows",hr="objectRows",Xr="keyedColumns",Ua="typedArray",RA="unknown",Hr="column",Lo="row",le={Must:1,Might:2,Not:3},EA=xt();function Yk(r){EA(r).datasetMap=X()}function kA(r,e,t){var a={},n=Fg(e);if(!n||!r)return a;var i=[],o=[],s=e.ecModel,l=EA(s).datasetMap,u=n.uid+"_"+t.seriesLayoutBy,f,h;r=r.slice(),C(r,function(d,g){var y=et(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,h=p(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});C(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=v.valueWayDim;c(a[y],_,m),c(o,_,m),v.valueWayDim+=m}else if(f===g)c(a[y],0,m),c(i,0,m);else{var _=v.categoryWayDim;c(a[y],_,m),c(o,_,m),v.categoryWayDim+=m}});function c(d,g,y){for(var m=0;me)return r[a];return r[t-1]}function VA(r,e,t,a,n,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var f=o==null||!a?t:jk(a,o);if(f=f||t,!(!f||!f.length)){var h=f[l];return n&&(u[n]=h),s.paletteIdx=(l+1)%f.length,h}}function Qk(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Jl,$o,V0,B0="\0_ec_inner",Jk=1,BA=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Nt(i),this._locale=new Nt(o),this._optionManager=s},e.prototype.setOption=function(t,a,n){var i=F0(a);this._optionManager.setOption(t,n,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,a){return this._resetOption(t,F0(a))},e.prototype._resetOption=function(t,a){var n=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?V0(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&C(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=X(),u=a&&a.replaceMergeMainTypeMap;Yk(this),C(t,function(h,v){h!=null&&(Tt.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?rt(h):ht(n[v],h,!0))}),u&&u.each(function(h,v){Tt.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),Tt.topologicalTravel(s,Tt.getAllClassMainTypes(),f,this);function f(h){var v=qk(this,h,Rt(t[h])),c=i.get(h),p=c?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",d=vT(c,v,p);dR(d,h,Tt),n[h]=null,i.set(h,null),o.set(h,0);var g=[],y=[],m=0,_;C(d,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=h==="series",A=Tt.getClass(h,S.keyInfo.subType,!T);if(!A)return;if(h==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===A)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var M=B({componentIndex:b},S.keyInfo);x=new A(w,this,this,M),B(x,M),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),n[h]=g,i.set(h,y),o.set(h,m),h==="series"&&Jl(this)}this._seriesIndices||Jl(this)},e.prototype.getOption=function(){var t=rt(this.option);return C(t,function(a,n){if(Tt.hasClass(n)){for(var i=Rt(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!$s(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[n]=i}}),delete t[B0],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,a){var n=this._componentsMap.get(t);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function fO(r,e){return r.join(",")===e.join(",")}const hO=oO;var vr=C,js=et,H0=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Rv(r){var e=r&&r.itemStyle;if(!!e)for(var t=0,a=H0.length;t=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,c)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=nR(v,m),d=m;break}}}return a[0]=v,a[1]=d,a})})}var Ah=function(){function r(e){this.data=e.data||(e.sourceFormat===Xr?{}:[]),this.sourceFormat=e.sourceFormat||RA,this.seriesLayoutBy=e.seriesLayoutBy||Hr,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var a=0;ad&&(d=_)}c[0]=p,c[1]=d}},n=function(){return this._data?this._data.length/this._dimSize:0};q0=(e={},e[Se+"_"+Hr]={pure:!0,appendData:i},e[Se+"_"+Lo]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[hr]={pure:!0,appendData:i},e[Xr]={pure:!0,appendData:function(o){var s=this._data;C(o,function(l,u){for(var f=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)f.push(l[h])})}},e[fr]={appendData:i},e[Ua]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return uo(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,a){},r}();function J0(r){var e,t;return et(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Rs(r){return new DO(r)}var DO=function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,a=e&&e.skip;if(this._dirty&&t){var n=this.context;n.data=n.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var h;(this._dirty||i==="reset")&&(this._dirty=!1,h=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var c=this._dueIndex,p=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(h||c1&&a>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},LO=function(){function r(e,t){if(!Mt(t)){var a="";It(a)}this._opFn=KA[e],this._rvalFloat=ha(t)}return r.prototype.evaluate=function(e){return Mt(e)?this._opFn(e,this._rvalFloat):this._opFn(ha(e),this._rvalFloat)},r}(),jA=function(){function r(e,t){var a=e==="desc";this._resultLT=a?1:-1,t==null&&(t=a?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var a=Mt(e)?e:ha(e),n=Mt(t)?t:ha(t),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=$(e),l=$(t);s&&(a=l?e:0),l&&(n=s?t:0)}return an?-this._resultLT:0},r}(),PO=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=ha(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var a=typeof e;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(t=ha(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function RO(r,e){return r==="eq"||r==="ne"?new PO(r==="eq",e):Z(KA,r)?new LO(r,e):null}var EO=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return Ya(e,t)},r}();function kO(r,e){var t=new EO,a=r.data,n=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Hr&&It(o);var s=[],l={},u=r.dimensionsDefine;if(u)C(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";Z(l,y)&&It(_),l[y]=m}});else for(var f=0;f65535?HO:WO}function Ri(){return[1/0,-1/0]}function $O(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function r_(r,e,t,a,n){var i=tC[t||"float"];if(n){var o=r[e],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=G(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,a=t[e];if(a!=null&&ae)i=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,a){var n=this._chunks,i=n[e],o=[];if(!i)return o;a==null&&(a=1/0);for(var s=1/0,l=-1,u=0,f=0,h=this.count();f=0&&l<0)&&(s=p,l=c,u=0),c===l&&(o[u++]=f))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var a=t.constructor,n=this._count;if(a===Array){e=new a(n);for(var i=0;i=h&&m<=v||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=c[n[0]],_=c[n[1]],S=e[n[1]][0],b=e[n[1]][1],y=0;y=h&&m<=v||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=h&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;ye[M][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var a=this.clone([e],!0),n=a._chunks,i=n[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,h,v,c=new(Yo(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));c[s++]=u;for(var p=1;pf&&(f=h,v=S)}D>0&&Df-p&&(l=f-p,s.length=l);for(var d=0;dh[1]&&(h[1]=y),v[c++]=m}return i._count=c,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(!!this._count)for(var a=e.length,n=this._chunks,i=0,o=this.count();il&&(l=h)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var a=[],n=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,a,n,i){return Ya(t[i],this._dimensions[i])}Ov={arrayRows:e,objectRows:function(t,a,n,i){return Ya(t[a],this._dimensions[i])},keyedColumns:e,original:function(t,a,n,i){var o=t&&(t.value==null?t:t.value);return Ya(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,a,n,i){return t[i]}}}(),r}(),eC=function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),a=!!t.length,n,i;if(tu(e)){var o=e,s=void 0,l=void 0,u=void 0;if(a){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=Ne(s)?Ua:fr,i=[];var h=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},c=ot(h.seriesLayoutBy,v.seriesLayoutBy)||null,p=ot(h.sourceHeader,v.sourceHeader),d=ot(h.dimensions,v.dimensions),g=c!==v.seriesLayoutBy||!!p!=!!v.sourceHeader||d;n=g?[td(s,{seriesLayoutBy:c,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(a){var m=this._applyTransform(t);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[td(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,a=t.get("transform",!0),n=t.get("fromTransformResult",!0);if(n!=null){var i="";e.length!==1&&n_(i)}var o,s=[],l=[];return C(e,function(u){u.prepareSource();var f=u.getSource(n||0),h="";n!=null&&!f&&n_(h),s.push(f),l.push(u._getVersionSign())}),a?o=GO(a,s,{datasetIndex:t.componentIndex}):n!=null&&(o=[xO(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return C(r.blocks,function(n){var i=iC(n);i>=e&&(e=i+ +(a&&(!i||rd(n)&&!n.noHeader)))}),e}return 0}function ZO(r,e,t,a){var n=e.noHeader,i=qO(iC(e)),o=[],s=e.blocks||[];De(!s||z(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Z(u,l)){var f=new jA(u[l],null);s.sort(function(p,d){return f.evaluate(p.sortParam,d.sortParam)})}else l==="seriesDesc"&&s.reverse()}C(s,function(p,d){var g=e.valueFormatter,y=nC(p)(g?B(B({},r),{valueFormatter:g}):r,p,d>0?i.html:0,a);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(i.richText):ad(o.join(""),n?t:i.html);if(n)return h;var v=jp(e.header,"ordinal",r.useUTC),c=aC(a,r.renderMode).nameStyle;return r.renderMode==="richText"?oC(r,v,c)+i.richText+h:ad('
'+Ce(v)+"
"+h,t)}function XO(r,e,t,a){var n=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=z(S)?S:[S],G(S,function(b,x){return jp(b,z(c)?c[x]:c,u)})};if(!(i&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",n),v=i?"":jp(l,"ordinal",u),c=e.valueType,p=o?[]:f(e.value,e.dataIndex),d=!s||!i,g=!s&&i,y=aC(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":h)+(i?"":oC(r,v,m))+(o?"":QO(r,p,d,g,_)):ad((s?"":h)+(i?"":KO(v,!s,m))+(o?"":jO(p,d,g,_)),t)}}function i_(r,e,t,a,n,i){if(!!r){var o=nC(r),s={useUTC:n,renderMode:t,orderMode:a,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function qO(r){return{html:UO[r],richText:YO[r]}}function ad(r,e){var t='
',a="margin: "+e+"px 0 0";return'
'+r+t+"
"}function KO(r,e,t){var a=e?"margin-left:2px":"";return''+Ce(r)+""}function jO(r,e,t,a){var n=t?"10px":"20px",i=e?"float:right;margin-left:"+n:"";return r=z(r)?r:[r],''+G(r,function(o){return Ce(o)}).join("  ")+""}function oC(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function QO(r,e,t,a,n){var i=[n],o=a?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(z(e)?e.join(" "):e,i)}function sC(r,e){var t=r.getData().getItemVisual(e,"style"),a=t[r.visualDrawType];return vi(a)}function lC(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var Nv=function(){function r(){this.richTextStyles={},this._nextStyleNameId=lT()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,a){var n=a==="richText"?this._generateStyleName():null,i=Gk({color:t,type:e,renderMode:a,markerId:n});return $(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var a={};z(t)?C(t,function(i){return B(a,i)}):B(a,t);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+e+"}"},r}();function uC(r){var e=r.series,t=r.dataIndex,a=r.multipleSeries,n=e.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=z(s),u=sC(e,t),f,h,v,c;if(o>1||l&&!o){var p=JO(s,e,t,i,u);f=p.inlineValues,h=p.inlineValueTypes,v=p.blocks,c=p.inlineValues[0]}else if(o){var d=n.getDimensionInfo(i[0]);c=f=uo(n,t,i[0]),h=d.type}else c=f=l?s[0]:s;var g=yg(e),y=g&&e.name||"",m=n.getName(t),_=a?y:m;return ae("section",{header:y,noHeader:a||!g,sortParam:c,blocks:[ae("nameValue",{markerType:"item",markerColor:u,name:_,noName:!mr(_),value:f,valueType:h,dataIndex:t})].concat(v||[])})}function JO(r,e,t,a,n){var i=e.getData(),o=Wr(r,function(h,v,c){var p=i.getDimensionInfo(c);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];a.length?C(a,function(h){f(uo(i,t,h),h)}):C(r,f);function f(h,v){var c=i.getDimensionInfo(v);!c||c.otherDims.tooltip===!1||(o?u.push(ae("nameValue",{markerType:"subItem",markerColor:n,name:c.displayName,value:h,valueType:c.type})):(s.push(h),l.push(c.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Ta=xt();function eu(r,e){return r.getName(e)||r.getId(e)}var ju="__universalTransitionEnabled",Dh=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,a,n){this.seriesIndex=this.componentIndex,this.dataTask=Rs({count:eN,reset:rN}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,n);var i=Ta(this).sourceManager=new eC(this);i.prepareSource();var o=this.getInitialData(t,n);s_(o,this),this.dataTask.context.data=o,Ta(this).dataBeforeProcessed=o,o_(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,a){var n=Ks(this),i=n?Do(t):{},o=this.subType;Tt.hasClass(o)&&(o+="Series"),ht(t,a.getTheme().get(this.subType)),ht(t,this.getDefaultOption()),li(t,"label",["show"]),this.fillDataTextStyle(t.data),n&&ja(t,i,n)},e.prototype.mergeOption=function(t,a){t=ht(this.option,t,!0),this.fillDataTextStyle(t.data);var n=Ks(this);n&&ja(this.option,t,n);var i=Ta(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,a);s_(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ta(this).dataBeforeProcessed=o,o_(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ne(t))for(var a=["show"],n=0;nthis.getShallow("animationThreshold")&&(a=!1),!!a},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,a,n){var i=this.ecModel,o=Hg.prototype.getColorFromPalette.call(this,t,a,n);return o||(o=i.getColorFromPalette(t,a,n)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,a){this._innerSelect(this.getData(a),t)},e.prototype.unselect=function(t,a){var n=this.option.selectedMap;if(!!n){var i=this.option.selectedMode,o=this.getData(a);if(i==="series"||n==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&n.push(o)}return n},e.prototype.isSelected=function(t,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[eu(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[ju])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,a){var n,i,o=this.option,s=o.selectedMode,l=a.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){et(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,a)}},e.registerClass=function(t){return Tt.registerClass(t)},e.protoInitialize=function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"}(),e}(Tt);jt(Dh,Ch);jt(Dh,Hg);yT(Dh,Tt);function o_(r){var e=r.name;yg(r)||(r.name=tN(r)||e)}function tN(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),a=[];return C(t,function(n){var i=e.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function eN(r){return r.model.getRawData().count()}function rN(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),aN}function aN(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function s_(r,e){C(lf(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,st(nN,e))})}function nN(r,e){var t=nd(r);return t&&t.setOutputEnd((e||this).count()),e}function nd(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var a=t.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}const Gt=Dh;var Zg=function(){function r(){this.group=new nt,this.uid=Co("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){},r.prototype.updateLayout=function(e,t,a,n){},r.prototype.updateVisual=function(e,t,a,n){},r.prototype.toggleBlurSeries=function(e,t,a){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();_g(Zg);lh(Zg);const Wt=Zg;function Po(){var r=xt();return function(e){var t=r(e),a=e.pipelineContext,n=!!t.large,i=!!t.progressiveRender,o=t.large=!!(a&&a.large),s=t.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var fC=xt(),iN=Po(),Xg=function(){function r(){this.group=new nt,this.uid=Co("viewChart"),this.renderTask=Rs({plan:oN,reset:sN}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,a,n){},r.prototype.highlight=function(e,t,a,n){var i=e.getData(n&&n.dataType);!i||u_(i,n,"emphasis")},r.prototype.downplay=function(e,t,a,n){var i=e.getData(n&&n.dataType);!i||u_(i,n,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateLayout=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.updateVisual=function(e,t,a,n){this.render(e,t,a,n)},r.prototype.eachRendered=function(e){nn(this.group,e)},r.markUpdateMethod=function(e,t){fC(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function l_(r,e,t){r&&Zs(r)&&(e==="emphasis"?va:ca)(r,t)}function u_(r,e,t){var a=ui(r,e),n=e&&e.highlightKey!=null?EE(e.highlightKey):null;a!=null?C(Rt(a),function(i){l_(r.getItemGraphicEl(i),t,n)}):r.eachItemGraphicEl(function(i){l_(i,t,n)})}_g(Xg);lh(Xg);function oN(r){return iN(r.model)}function sN(r){var e=r.model,t=r.ecModel,a=r.api,n=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=n&&fC(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,a,n),lN[l]}var lN={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const Vt=Xg;var Tf="\0__throttleOriginMethod",f_="\0__throttleRate",h_="\0__throttleType";function qg(r,e,t){var a,n=0,i=0,o=null,s,l,u,f;e=e||0;function h(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var c=[],p=0;p=0?h():o=setTimeout(h,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(c){f=c},v}function Ro(r,e,t,a){var n=r[e];if(!!n){var i=n[Tf]||n,o=n[h_],s=n[f_];if(s!==t||o!==a){if(t==null||!a)return r[e]=i;n=r[e]=qg(i,t,a==="debounce"),n[Tf]=i,n[h_]=a,n[f_]=t}return n}}function Qs(r,e){var t=r[e];t&&t[Tf]&&(t.clear&&t.clear(),r[e]=t[Tf])}var v_=xt(),c_={itemStyle:fi(pA,!0),lineStyle:fi(cA,!0)},uN={lineStyle:"stroke",itemStyle:"fill"};function hC(r,e){var t=r.visualStyleMapper||c_[e];return t||(console.warn("Unknown style type '"+e+"'."),c_.itemStyle)}function vC(r,e){var t=r.visualDrawType||uN[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var fN={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=hC(r,a),o=i(n),s=n.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=vC(r,a),u=o[l],f=j(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||h){var v=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=v,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||j(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||j(o.stroke)?v:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(c,p){var d=r.getDataParams(p),g=B({},o);g[l]=f(d),c.setItemVisual(p,"style",g)}}}},Zo=new Nt,hN={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=hC(r,a),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){Zo.option=l[a];var u=n(Zo),f=o.ensureUniqueItemVisual(s,"style");B(f,u),Zo.option.decal&&(o.setItemVisual(s,"decal",Zo.option.decal),Zo.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},vN={performRawSeries:!0,overallReset:function(r){var e=X();r.eachSeries(function(t){var a=t.getColorBy();if(!t.isColorBySeries()){var n=t.type+"-"+a,i=e.get(n);i||(i={},e.set(n,i)),v_(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var a=t.getRawData(),n={},i=t.getData(),o=v_(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=vC(t,s);i.each(function(u){var f=i.getRawIndex(u);n[f]=u}),a.each(function(u){var f=n[u],h=i.getItemVisual(f,"colorFromPalette");if(h){var v=i.ensureUniqueItemVisual(f,"style"),c=a.getName(u)||u+"",p=a.count();v[l]=t.getColorFromPalette(c,o,p)}})}})}},ru=Math.PI;function cN(r,e){e=e||{},tt(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new nt,a=new wt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(a);var n=new Ct({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new wt({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Ig({shape:{startAngle:-ru/2,endAngle:-ru/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:ru*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ru*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=n.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var pN=function(){function r(e,t,a,n){this._stageTaskMap=X(),this.ecInstance=e,this.api=t,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(e,t){if(!!e.__pipeline){var a=this._pipelineMap.get(e.__pipeline.id),n=a.context,i=!t&&a.progressiveEnabled&&(!n||n.progressiveRender)&&e.__idxInPipeline>a.blockIndex,o=i?a.step:null,s=n&&n.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var a=this._pipelineMap.get(e.uid),n=e.getData(),i=n.count(),o=a.progressiveEnabled&&t.incrementalPrepareRender&&i>=a.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,a=t._pipelineMap=X();e.eachSeries(function(n){var i=n.getProgressive(),o=n.uid;a.set(o,{id:o,head:null,tail:null,threshold:n.getProgressiveThreshold(),progressiveEnabled:i&&!(n.preventIncremental&&n.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),a=this.api;C(this._allHandlers,function(n){var i=e.get(n.uid)||e.set(n.uid,{}),o="";De(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,t,a),n.overallReset&&this._createOverallStageTask(n,i,t,a)},this)},r.prototype.prepareView=function(e,t,a,n){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=a,o.api=n,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,a){this._performStageTasks(this._visualHandlers,e,t,a)},r.prototype._performStageTasks=function(e,t,a,n){n=n||{};var i=!1,o=this;C(e,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),h=f.seriesTaskMap,v=f.overallTask;if(v){var c,p=v.agentStubMap;p.each(function(g){s(n,g)&&(g.dirty(),c=!0)}),c&&v.dirty(),o.updatePayload(v,a);var d=o.getPerformArgs(v,n.block);p.each(function(g){g.perform(d)}),v.perform(d)&&(i=!0)}else h&&h.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,a),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(a){t=a.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,a,n){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=X(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?a.eachRawSeries(f):l?a.eachRawSeriesByType(l,f):u&&u(a,n).each(f);function f(h){var v=h.uid,c=s.set(v,o&&o.get(v)||Rs({plan:_N,reset:SN,count:bN}));c.context={model:h,ecModel:a,api:n,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(h,c)}},r.prototype._createOverallStageTask=function(e,t,a,n){var i=this,o=t.overallTask=t.overallTask||Rs({reset:dN});o.context={ecModel:a,api:n,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=X(),u=e.seriesType,f=e.getTargetSeries,h=!0,v=!1,c="";De(!e.createOnAllSeries,c),u?a.eachRawSeriesByType(u,p):f?f(a,n).each(p):(h=!1,C(a.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(v=!0,Rs({reset:gN,onDirty:mN})));y.context={model:d,overallProgress:h},y.agent=o,y.__block=h,i._pipe(d,y)}v&&o.dirty()},r.prototype._pipe=function(e,t){var a=e.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=t),n.tail&&n.tail.pipe(t),n.tail=t,t.__idxInPipeline=n.count++,t.__pipeline=n},r.wrapStageHandler=function(e,t){return j(e)&&(e={overallReset:e,seriesType:wN(e)}),e.uid=Co("stageHandler"),t&&(e.visualType=t),e},r}();function dN(r){r.overallReset(r.ecModel,r.api,r.payload)}function gN(r){return r.overallProgress&&yN}function yN(){this.agent.dirty(),this.getDownstream().dirty()}function mN(){this.agent&&this.agent.dirty()}function _N(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function SN(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Rt(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?G(e,function(t,a){return cC(a)}):xN}var xN=cC(0);function cC(r){return function(e,t){var a=t.data,n=t.resetDefines[r];if(n&&n.dataEach)for(var i=e.start;i0&&c===u.length-v.length){var p=u.slice(0,c);p!=="data"&&(t.mainType=p,t[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(a[u]=l,f=!0),f||(n[u]=l)})}return{cptQuery:t,dataQuery:a,otherQuery:n}},r.prototype.filter=function(e,t){var a=this.eventInfo;if(!a)return!0;var n=a.targetEl,i=a.packedEvent,o=a.model,s=a.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,n,i));function f(h,v,c,p){return h[c]==null||v[p||c]===h[c]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),id=["symbol","symbolSize","symbolRotate","symbolOffset"],y_=id.concat(["symbolKeepAspect"]),MN={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&qn(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function od(r,e,t){for(var a=e.type==="radial"?WN(r,e,t):HN(r,e,t),n=e.colorStops,i=0;i0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Mt(r)?[r]:z(r)?r:null}function jg(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&UN(e.lineDash,e.lineWidth),a=e.lineDashOffset;if(t){var n=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(t=G(t,function(i){return i/n}),a/=n)}return[t,a]}var YN=new Zr(!0);function Mf(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function m_(r){return typeof r=="string"&&r!=="none"}function Df(r){var e=r.fill;return e!=null&&e!=="none"}function __(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function S_(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function sd(r,e,t){var a=Sg(e.image,e.__image,t);if(uh(a)){var n=r.createPattern(a,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*Vu),i.scaleSelf(e.scaleX||1,e.scaleY||1),n.setTransform(i)}return n}}function ZN(r,e,t,a){var n,i=Mf(t),o=Df(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||YN,h=e.__dirty;if(!a){var v=t.fill,c=t.stroke,p=o&&!!v.colorStops,d=i&&!!c.colorStops,g=o&&!!v.image,y=i&&!!c.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(p||d)&&(x=e.getBoundingRect()),p&&(m=h?od(r,v,x):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=h?od(r,c,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=h||!e.__canvasFillPattern?sd(r,v,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(b=h||!e.__canvasStrokePattern?sd(r,c,e):e.__canvasStrokePattern,e.__canvasStrokePattern=S),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(b?r.strokeStyle=b:i=!1)}var w=e.getGlobalScale();f.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,A;r.setLineDash&&t.lineDash&&(n=jg(e),T=n[0],A=n[1]);var M=!0;(u||h&Ui)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),M=!1),f.reset(),e.buildPath(f,e.shape,a),f.toStatic(),e.pathUpdated()),M&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=A),a||(t.strokeFirst?(i&&S_(r,t),o&&__(r,t)):(o&&__(r,t),i&&S_(r,t))),T&&r.setLineDash([])}function XN(r,e,t){var a=e.__image=Sg(t.image,e.__image,e,e.onload);if(!(!a||!uh(a))){var n=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=a.width/a.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=a.width,s=a.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(a,u,f,t.sWidth,t.sHeight,n,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,h=o-u,v=s-f;r.drawImage(a,u,f,h,v,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function qN(r,e,t){var a,n=t.text;if(n!=null&&(n+=""),n){r.font=t.font||Xa,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(a=jg(e),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(Mf(t)&&r.strokeText(n,t.x,t.y),Df(t)&&r.fillText(n,t.x,t.y)):(Df(t)&&r.fillText(n,t.x,t.y),Mf(t)&&r.strokeText(n,t.x,t.y)),i&&r.setLineDash([])}}var x_=["shadowBlur","shadowOffsetX","shadowOffsetY"],b_=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function SC(r,e,t,a,n){var i=!1;if(!a&&(t=t||{},e===t))return!1;if(a||e.opacity!==t.opacity){Oe(r,n),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?ti.opacity:o}(a||e.blend!==t.blend)&&(i||(Oe(r,n),i=!0),r.globalCompositeOperation=e.blend||ti.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,a,n){if(!this[ye]){if(this._disposed){this.id;return}var i,o,s;if(et(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[ye]=!0,!this._model||a){var l=new hO(this._api),u=this._theme,f=this._model=new zA;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},ud);var h={seriesTransition:s,optionChanged:!0};if(n)this[Re]={silent:i,updateParams:h},this[ye]=!1,this.getZr().wakeUp();else{try{ki(this),Aa.update.call(this,null,h)}catch(v){throw this[Re]=null,this[ye]=!1,v}this._ssr||this._zr.flush(),this[Re]=null,this[ye]=!1,Xo.call(this,i),qo.call(this,i)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||At.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var a=this._zr.painter;return a.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){if(!!At.svgSupported){var t=this._zr,a=t.storage.getDisplayList();return C(a,function(n){n.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var a=t.excludeComponents,n=this._model,i=[],o=this;C(a,function(l){n.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return C(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var a=t.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(V_[n]){var l=s,u=s,f=-s,h=-s,v=[],c=t&&t.pixelRatio||this.getDevicePixelRatio();C(ks,function(_,S){if(_.group===n){var b=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(rt(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),h=o(x.bottom,h),v.push({dom:b,left:x.left,top:x.top})}}),l*=c,u*=c,f*=c,h*=c;var p=f-l,d=h-u,g=ua.createCanvas(),y=Hm(g,{renderer:a?"svg":"canvas"});if(y.resize({width:p,height:d}),a){var m="";return C(v,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new wt({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),C(v,function(_){var S=new pe({style:{x:_.left*c-l,y:_.top*c-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,a){return Fv(this,"convertToPixel",t,a)},e.prototype.convertFromPixel=function(t,a){return Fv(this,"convertFromPixel",t,a)},e.prototype.containPixel=function(t,a){if(this._disposed){this.id;return}var n=this._model,i,o=Ms(n,t);return C(o,function(s,l){l.indexOf("Models")>=0&&C(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(a);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(i=i||h.containPoint(a,u))}},this)},this),!!i},e.prototype.getVisual=function(t,a){var n=this._model,i=Ms(n,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?Kg(s,l,a):xl(s,a)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;C(xV,function(a){var n=function(i){var o=t.getModel(),s=i.target,l,u=a==="globalout";if(u?l={}:s&&Xn(s,function(p){var d=it(p);if(d&&d.dataIndex!=null){var g=d.dataModel||o.getSeriesByIndex(d.seriesIndex);return l=g&&g.getDataParams(d.dataIndex,d.dataType,s)||{},!0}else if(d.eventData)return l=B({},d.eventData),!0},!0),l){var f=l.componentType,h=l.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",h=l.seriesIndex);var v=f&&h!=null&&o.getComponent(f,h),c=v&&t[v.mainType==="series"?"_chartsMap":"_componentsMap"][v.__viewId];l.event=i,l.type=a,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:v,view:c},t.trigger(a,l)}};n.zrEventfulCallAtLast=!0,t._zr.on(a,n,t)}),C(Es,function(a,n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),C(["selectchanged"],function(a){t._messageCenter.on(a,function(n){this.trigger(a,n)},t)}),IN(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&pT(this.getDom(),ty,"");var a=this,n=a._api,i=a._model;C(a._componentsViews,function(o){o.dispose(i,n)}),C(a._chartsViews,function(o){o.dispose(i,n)}),a._zr.dispose(),a._dom=a._model=a._chartsMap=a._componentsMap=a._chartsViews=a._componentsViews=a._scheduler=a._api=a._zr=a._throttledZrFlush=a._theme=a._coordSysMgr=a._messageCenter=null,delete ks[a.id]},e.prototype.resize=function(t){if(!this[ye]){if(this._disposed){this.id;return}this._zr.resize(t);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=t&&t.silent;this[Re]&&(i==null&&(i=this[Re].silent),n=!0,this[Re]=null),this[ye]=!0;try{n&&ki(this),Aa.update.call(this,{type:"resize",animation:B({duration:0},t&&t.animation)})}catch(o){throw this[ye]=!1,o}this[ye]=!1,Xo.call(this,i),qo.call(this,i)}}},e.prototype.showLoading=function(t,a){if(this._disposed){this.id;return}if(et(t)&&(a=t,t=""),t=t||"default",this.hideLoading(),!!fd[t]){var n=fd[t](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var a=B({},t);return a.type=Es[t.type],a},e.prototype.dispatchAction=function(t,a){if(this._disposed){this.id;return}if(et(a)||(a={silent:!!a}),!!If[t.type]&&!!this._model){if(this[ye]){this._pendingActions.push(t);return}var n=a.silent;Wv.call(this,t,n);var i=a.flush;i?this._zr.flush():i!==!1&&At.browser.weChat&&this._throttledZrFlush(),Xo.call(this,n),qo.call(this,n)}},e.prototype.updateLabelLayout=function(){gr.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var a=t.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){ki=function(h){var v=h._scheduler;v.restorePipelines(h._model),v.prepareStageTasks(),Gv(h,!0),Gv(h,!1),v.plan()},Gv=function(h,v){for(var c=h._model,p=h._scheduler,d=v?h._componentsViews:h._chartsViews,g=v?h._componentsMap:h._chartsMap,y=h._zr,m=h._api,_=0;_v.get("hoverLayerThreshold")&&!At.node&&!At.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=h._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function o(h,v){var c=h.get("blendMode")||null;v.eachRendered(function(p){p.isGroup||(p.style.blend=c)})}function s(h,v){if(!h.preventAutoZ){var c=h.get("z")||0,p=h.get("zlevel")||0;v.eachRendered(function(d){return l(d,c,p,-1/0),!0})}}function l(h,v,c,p){var d=h.getTextContent(),g=h.getTextGuideLine(),y=h.isGroup;if(y)for(var m=h.childrenRef(),_=0;_0?{duration:d,delay:c.get("delay"),easing:c.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(ro(y))return;if(y instanceof mt&&kE(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&n(y)}})}O_=function(h){return new(function(v){k(c,v);function c(){return v!==null&&v.apply(this,arguments)||this}return c.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},c.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return h._model.getComponent(d.mainType,d.index);p=p.parent}},c.prototype.enterEmphasis=function(p,d){va(p,d),Ye(h)},c.prototype.leaveEmphasis=function(p,d){ca(p,d),Ye(h)},c.prototype.enterBlur=function(p){OT(p),Ye(h)},c.prototype.leaveBlur=function(p){Ag(p),Ye(h)},c.prototype.enterSelect=function(p){NT(p),Ye(h)},c.prototype.leaveSelect=function(p){VT(p),Ye(h)},c.prototype.getModel=function(){return h.getModel()},c.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},c.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},c}(GA))(h)},OC=function(h){function v(c,p){for(var d=0;d=0)){B_.push(t);var i=gC.wrapStageHandler(t,n);i.__prio=e,i.__raw=t,r.push(i)}}function FC(r,e){fd[r]=e}function IV(r,e,t){var a=oV("registerMap");a&&a(r,e,t)}var LV=zO;Si(Qg,fN);Si(Ih,hN);Si(Ih,vN);Si(Qg,MN);Si(Ih,DN);Si(IC,aV);zC(HA);GC(uV,_O);FC("default",cN);qr({type:ei,event:ei,update:ei},Zt);qr({type:Yu,event:Yu,update:Yu},Zt);qr({type:Ds,event:Ds,update:Ds},Zt);qr({type:Zu,event:Zu,update:Zu},Zt);qr({type:Is,event:Is,update:Is},Zt);BC("light",TN);BC("dark",AN);var z_=[],PV={registerPreprocessor:zC,registerProcessor:GC,registerPostInit:AV,registerPostUpdate:CV,registerUpdateLifecycle:ey,registerAction:qr,registerCoordinateSystem:MV,registerLayout:DV,registerVisual:Si,registerTransform:LV,registerLoading:FC,registerMap:IV,registerImpl:iV,PRIORITY:mV,ComponentModel:Tt,ComponentView:Wt,SeriesModel:Gt,ChartView:Vt,registerComponentModel:function(r){Tt.registerClass(r)},registerComponentView:function(r){Wt.registerClass(r)},registerSeriesModel:function(r){Gt.registerClass(r)},registerChartView:function(r){Vt.registerClass(r)},registerSubTypeDefaulter:function(r,e){Tt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){QP(r,e)}};function yt(r){if(z(r)){C(r,function(e){yt(e)});return}ct(z_,r)>=0||(z_.push(r),j(r)&&(r={install:r}),r.install(PV))}function Ko(r){return r==null?0:r.length||1}function G_(r){return r}var RV=function(){function r(e,t,a,n,i,o){this._old=e,this._new=t,this._oldKeyGetter=a||G_,this._newKeyGetter=n||G_,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,a={},n=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,n,"_oldKeyGetter"),this._initIndexMap(t,a,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(f,o)}else u===1?(a[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,a)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,a={},n={},i=[],o=[];this._initIndexMap(e,a,i,"_oldKeyGetter"),this._initIndexMap(t,n,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),n[l]=null;else if(h===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),n[l]=null;else if(h===1&&v===1)this._update&&this._update(f,u),n[l]=null;else if(h>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),n[l]=null;else if(h>1)for(var c=0;c1)for(var s=0;s30}var jo=et,Ca=G,zV=typeof Int32Array>"u"?Array:Int32Array,GV="e\0\0",F_=-1,FV=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],HV=["_approximateExtent"],H_,su,Qo,Jo,Yv,lu,Zv,WV=function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","lttbDownSample"];var a,n=!1;WC(e)?(a=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(n=!0,a=e),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=t)){var a=this._store,n=a.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=n.getSource().sourceFormat,l=s===fr;if(l&&!n.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var a=this._itemVisuals,n=a[e];n||(n=a[e]={});var i=n[t];return i==null&&(i=this.getVisual(t),z(i)?i=i.slice():jo(i)&&(i=B({},i)),n[t]=i),i},r.prototype.setItemVisual=function(e,t,a){var n=this._itemVisuals[e]||{};this._itemVisuals[e]=n,jo(t)?B(n,t):n[t]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){jo(e)?B(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,a){this._itemLayouts[e]=a?B(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var a=this.hostModel&&this.hostModel.seriesIndex;Hp(a,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){C(this._graphicEls,function(a,n){a&&e&&e.call(t,a,n)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Ca(this.dimensions,this._getDimInfo,this),this.hostModel)),Yv(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var a=this[e];!j(a)||(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var n=a.apply(this,arguments);return t.apply(this,[n].concat(sg(arguments)))})},r.internalField=function(){H_=function(e){var t=e._invertedIndicesMap;C(t,function(a,n){var i=e._dimInfos[n],o=i.ordinalMeta,s=e._store;if(o){a=t[n]=new zV(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),n[t]=l}}}(),r}();const Me=WV;function bl(r,e){Wg(r)||(r=$g(r)),e=e||{};var t=e.coordDimensions||[],a=e.dimensionsDefine||r.dimensionsDefine||[],n=X(),i=[],o=UV(r,t,a,e.dimensionsCount),s=e.canOmitUnusedDimensions&&YC(o),l=a===r.dimensionsDefine,u=l?UC(r):$C(a),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var h=X(f),v=new JA(o),c=0;c0&&(a.name=n+(i-1)),i++,e.set(n,i)}}function UV(r,e,t,a){var n=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,a||0);return C(e,function(i){var o;et(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function YV(r,e,t){if(t||e.hasKey(r)){for(var a=0;e.hasKey(r+a);)a++;r+=a}return e.set(r,!0),r}var ZV=function(){function r(e){this.coordSysDims=[],this.axisMap=X(),this.categoryAxisMap=X(),this.coordSysName=e}return r}();function XV(r){var e=r.get("coordinateSystem"),t=new ZV(e),a=qV[e];if(a)return a(r,t,t.axisMap,t.categoryAxisMap),t}var qV={cartesian2d:function(r,e,t,a){var n=r.getReferringComponents("xAxis",qt).models[0],i=r.getReferringComponents("yAxis",qt).models[0];e.coordSysDims=["x","y"],t.set("x",n),t.set("y",i),Oi(n)&&(a.set("x",n),e.firstCategoryDimIndex=0),Oi(i)&&(a.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,a){var n=r.getReferringComponents("singleAxis",qt).models[0];e.coordSysDims=["single"],t.set("single",n),Oi(n)&&(a.set("single",n),e.firstCategoryDimIndex=0)},polar:function(r,e,t,a){var n=r.getReferringComponents("polar",qt).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),Oi(i)&&(a.set("radius",i),e.firstCategoryDimIndex=0),Oi(o)&&(a.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,a){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();C(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),f=o[l];t.set(f,u),Oi(u)&&(a.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Oi(r){return r.get("type")==="category"}function KV(r,e,t){t=t||{};var a=t.byIndex,n=t.stackedCoordDimension,i,o,s;jV(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,h,v;if(C(i,function(m,_){$(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(f=m))}),f&&!a&&!u&&(a=!0),f){h="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var c=f.coordDim,p=f.type,d=0;C(i,function(m){m.coordDim===c&&d++});var g={name:h,coordDim:c,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,p),y.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:h}}function jV(r){return!WC(r.schema)}function Qa(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function ZC(r,e){return Qa(r,e)?r.getCalculationInfo("stackResultDimension"):e}function QV(r,e){var t=r.get("coordinateSystem"),a=Sl.get(t),n;return e&&e.coordSysDims&&(n=G(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Pf(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function JV(r,e,t){var a,n;return t&&C(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function ma(r,e,t){t=t||{};var a=e.getSourceManager(),n,i=!1;r?(i=!0,n=$g(r)):(n=a.getSource(),i=n.sourceFormat===fr);var o=XV(e),s=QV(e,o),l=t.useEncodeDefaulter,u=j(l)?l:l?st(kA,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},h=bl(n,f),v=JV(h.dimensions,t.createInvertedIndices,o),c=i?null:a.getSharedDataStore(h),p=KV(e,{schema:h,store:c}),d=new Me(h,e);d.setCalculationInfo(p);var g=v!=null&&tB(n)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(i?n:c,null,g),d}function tB(r){if(r.sourceFormat===fr){var e=eB(r.data||[]);return!z(xo(e))}}function eB(r){for(var e=0;et[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var a=this._extent;isNaN(e)||(a[0]=e),isNaN(t)||(a[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();lh(XC);const _a=XC;var rB=0,aB=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++rB}return r.createByAxisModel=function(e){var t=e.option,a=t.data,n=a&&G(a,nB);return new r({categories:n,needCollect:!n,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,a=this._needCollect;if(!$(e)&&!a)return e;if(a&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var n=this._getOrCreateMap();return t=n.get(e),t==null&&(a?(t=this.categories.length,this.categories[t]=e,n.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=X(this.categories))},r}();function nB(r){return et(r)&&r.value!=null?r.value:r+""}const hd=aB;function vd(r){return r.type==="interval"||r.type==="log"}function iB(r,e,t,a){var n={},i=r[1]-r[0],o=n.interval=oT(i/e,!0);t!=null&&oa&&(o=n.interval=a);var s=n.intervalPrecision=qC(o),l=n.niceTickExtent=[Ut(Math.ceil(r[0]/o)*o,s),Ut(Math.floor(r[1]/o)*o,s)];return oB(l,r),n}function Xv(r){var e=Math.pow(10,gg(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Ut(t*e)}function qC(r){return Vr(r)+2}function W_(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function oB(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),W_(r,0,e),W_(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function Lh(r,e){return r>=e[0]&&r<=e[1]}function Ph(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function Rh(r,e){return r*(e[1]-e[0])+e[0]}var KC=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new hd({})),z(n)&&(n=new hd({categories:G(n,function(i){return et(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return e.prototype.parse=function(t){return t==null?NaN:$(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),Lh(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),Ph(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(Rh(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],a=this._extent,n=a[0];n<=a[1];)t.push({value:n}),n++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var a=t.ordinalNumbers,n=this._ordinalNumbersByTick=[],i=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,a.length);o=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(_a);_a.registerClass(KC);const ay=KC;var Cn=Ut,jC=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return Lh(t,this._extent)},e.prototype.normalize=function(t){return Ph(t,this._extent)},e.prototype.scale=function(t){return Rh(t,this._extent)},e.prototype.setExtent=function(t,a){var n=this._extent;isNaN(t)||(n[0]=parseFloat(t)),isNaN(a)||(n[1]=parseFloat(a))},e.prototype.unionExtent=function(t){var a=this._extent;t[0]a[1]&&(a[1]=t[1]),this.setExtent(a[0],a[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=qC(t)},e.prototype.getTicks=function(t){var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=[];if(!a)return s;var l=1e4;n[0]l)return[];var f=s.length?s[s.length-1].value:i[1];return n[1]>f&&(t?s.push({value:Cn(f+a,o)}):s.push({value:n[1]})),s},e.prototype.getMinorTicks=function(t){for(var a=this.getTicks(!0),n=[],i=this.getExtent(),o=1;oi[0]&&c0&&(i=i===null?s:Math.min(i,s))}t[a]=i}}return t}function tM(r){var e=uB(r),t=[];return C(r,function(a){var n=a.coordinateSystem,i=n.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],f=Math.abs(o[1]-o[0]),h=i.scale.getExtent(),v=Math.abs(h[1]-h[0]);s=u?f/v*u:f}else{var c=a.getData();s=Math.abs(o[1]-o[0])/c.count()}var p=W(a.get("barWidth"),s),d=W(a.get("barMaxWidth"),s),g=W(a.get("barMinWidth")||(iM(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,axisKey:iy(i),stackId:ny(a)})}),eM(t)}function eM(r){var e={};C(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=a.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var h=a.barMaxWidth;h&&(l[u].maxWidth=h);var v=a.barMinWidth;v&&(l[u].minWidth=v);var c=a.barGap;c!=null&&(s.gap=c);var p=a.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return C(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=_t(i).length;s=Math.max(35-l*4,15)+"%"}var u=W(s,o),f=W(a.gap,1),h=a.remainedWidth,v=a.autoWidthCount,c=(h-u)/(v+(v-1)*f);c=Math.max(c,0),C(i,function(y){var m=y.maxWidth,_=y.minWidth;if(y.width){var S=y.width;m&&(S=Math.min(S,m)),_&&(S=Math.max(S,_)),y.width=S,h-=S+f*S,v--}else{var S=c;m&&mS&&(S=_),S!==c&&(y.width=S,h-=S+f*S,v--)}}),c=(h-u)/(v+(v-1)*f),c=Math.max(c,0);var p=0,d;C(i,function(y,m){y.width||(y.width=c),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;C(i,function(y,m){t[n][m]=t[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function fB(r,e,t){if(r&&e){var a=r[iy(e)];return a!=null&&t!=null?a[ny(t)]:a}}function rM(r,e){var t=JC(r,e),a=tM(t);C(t,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=ny(n),u=a[iy(s)][l],f=u.offset,h=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:h})})}function aM(r){return{seriesType:r,plan:Po(),reset:function(e){if(!!nM(e)){var t=e.getData(),a=e.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(n.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),f=t.getCalculationInfo("stackResultDimension"),h=Qa(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),c=hB(n,i),p=iM(e),d=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=p&&zr(b*3),w=p&&l&&zr(b*3),T=p&&zr(b),A=a.master.getRect(),M=v?A.width:A.height,D,I=S.getStore(),L=0;(D=_.next())!=null;){var P=I.get(h?g:o,D),R=I.get(s,D),E=c,N=void 0;h&&(N=+P-I.get(o,D));var O=void 0,V=void 0,F=void 0,H=void 0;if(v){var U=a.dataToPoint([P,R]);if(h){var K=a.dataToPoint([N,R]);E=K[0]}O=E,V=U[1]+m,F=U[0]-E,H=y,Math.abs(F)0?t:1:t))}var vB=function(r,e,t,a){for(;t>>1;r[n][1]n&&(this._approxInterval=n);var s=uu.length,l=Math.min(vB(uu,this._approxInterval,0,s),s-1);this._interval=uu[l][1],this._minLevelUnit=uu[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Mt(t)?t:+Yr(t)},e.prototype.contain=function(t){return Lh(this.parse(t),this._extent)},e.prototype.normalize=function(t){return Ph(this.parse(t),this._extent)},e.prototype.scale=function(t){return Rh(t,this._extent)},e.type="time",e}(Ja),uu=[["second",Ng],["minute",Vg],["hour",Ps],["quarter-day",Ps*6],["half-day",Ps*12],["day",ir*1.2],["half-week",ir*3.5],["week",ir*7],["month",ir*31],["quarter",ir*95],["half-year",R0/2],["year",R0]];function cB(r,e,t,a){var n=Yr(e),i=Yr(t),o=function(p){return k0(n,p,a)===k0(i,p,a)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},f=function(){return u()&&o("hour")},h=function(){return f()&&o("minute")},v=function(){return h()&&o("second")},c=function(){return v()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return f();case"minute":return h();case"second":return v();case"millisecond":return c()}}function pB(r,e){return r/=ir,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function dB(r){var e=30*ir;return r/=e,r>6?6:r>3?3:r>2?2:1}function gB(r){return r/=Ps,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function $_(r,e){return r/=e?Vg:Ng,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function yB(r){return oT(r,!0)}function mB(r,e,t){var a=new Date(r);switch(no(e)){case"year":case"month":a[_A(t)](0);case"day":a[SA(t)](1);case"hour":a[xA(t)](0);case"minute":a[bA(t)](0);case"second":a[wA(t)](0),a[TA(t)](0)}return a.getTime()}function _B(r,e,t,a){var n=1e4,i=yA,o=0;function s(M,D,I,L,P,R,E){for(var N=new Date(D),O=D,V=N[L]();O1&&R===0&&I.unshift({value:I[0].value-O})}}for(var R=0;R=a[0]&&m<=a[1]&&h++)}var _=(a[1]-a[0])/e;if(h>_*1.5&&v>_/1.5||(u.push(g),h>_||r===i[c]))break}f=[]}}}for(var S=Pt(G(u,function(M){return Pt(M,function(D){return D.value>=a[0]&&D.value<=a[1]&&!D.notAdd})}),function(M){return M.length>0}),b=[],x=S.length-1,c=0;c0;)i*=10;var s=[Ut(bB(a[0]/i)*i),Ut(xB(a[1]/i)*i)];this._interval=i,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){Os.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=cr(t)/cr(this.base),Lh(t,this._extent)},e.prototype.normalize=function(t){return t=cr(t)/cr(this.base),Ph(t,this._extent)},e.prototype.scale=function(t){return t=Rh(t,this._extent),fu(this.base,t)},e.type="log",e}(_a),lM=oy.prototype;lM.getMinorTicks=Os.getMinorTicks;lM.getLabel=Os.getLabel;function hu(r,e){return SB(r,Vr(e))}_a.registerClass(oy);const wB=oy;var TB=function(){function r(e,t,a){this._prepareParams(e,t,a)}return r.prototype._prepareParams=function(e,t,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,c=this._determinedMax;return v!=null&&(s=v,u=!0),c!=null&&(l=c,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[CB[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var a=AB[e];this[a]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),AB={min:"_determinedMin",max:"_determinedMax"},CB={min:"_dataMin",max:"_dataMax"};function uM(r,e,t){var a=r.rawExtentInfo;return a||(a=new TB(r,e,t),r.rawExtentInfo=a,a)}function vu(r,e){return e==null?null:zs(e)?NaN:r.parse(e)}function fM(r,e){var t=r.type,a=uM(r,e,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=e.ecModel;if(o&&t==="time"){var s=JC("bar",o),l=!1;if(C(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=tM(s),f=MB(n,i,e,u);n=f.min,i=f.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function MB(r,e,t,a){var n=t.axis.getExtent(),i=n[1]-n[0],o=fB(a,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;C(o,function(c){s=Math.min(c.offset,s)});var l=-1/0;C(o,function(c){l=Math.max(c.offset+c.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,h=1-(s+l)/i,v=f/h-f;return e+=v*(l/u),r-=v*(s/u),{min:r,max:e}}function ho(r,e){var t=e,a=fM(r,t),n=a.extent,i=t.get("splitNumber");r instanceof wB&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Eh(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new ay({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new sM({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(_a.getClass(e)||Ja)}}function DB(r){var e=r.scale.getExtent(),t=e[0],a=e[1];return!(t>0&&a>0||t<0&&a<0)}function ko(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(a){return function(n,i){return r.scale.getFormattedLabel(n,i,a)}}(e):$(e)?function(a){return function(n){var i=r.scale.getLabel(n),o=a.replace("{value}",i!=null?i:"");return o}}(e):j(e)?function(a){return function(n,i){return t!=null&&(i=n.value-t),a(sy(r,n),i,n.level!=null?{level:n.level}:null)}}(e):function(a){return r.scale.getLabel(a)}}function sy(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function IB(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var a,n,i=t.getExtent();t instanceof ay?n=t.count():(a=t.getTicks(),n=a.length);var o=r.getLabelModel(),s=ko(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var f=0;fr[1]&&(r[1]=n[1])})}var wl=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),RB=1e-8;function Y_(r,e){return Math.abs(r-e)n&&(a=o,n=l)}if(a)return kB(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var a=this._rect;if(a&&!t)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return C(o,function(s){s.type==="polygon"?Z_(s.exterior,n,i,t):C(s.points,function(l){Z_(l,n,i,t)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new vt(n[0],n[1],i[0]-n[0],i[1]-n[1]),t||(this._rect=a),a},e.prototype.contain=function(t){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(t[0],t[1]))return!1;t:for(var i=0,o=n.length;i>1^-(s&1),l=l>>1^-(l&1),s+=n,l+=i,n=s,i=l,a.push([s/t,l/t])}return a}function VB(r,e){return r=NB(r),G(Pt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var a=t.properties,n=t.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new X_(o[0],o.slice(1)));break;case"MultiPolygon":C(n.coordinates,function(l){l[0]&&i.push(new X_(l[0],l.slice(1)))});break;case"LineString":i.push(new q_([n.coordinates]));break;case"MultiLineString":i.push(new q_(n.coordinates))}var s=new cM(a[e||"name"],i,a.cp);return s.properties=a,s})}var el=xt();function dM(r,e){var t=G(e,function(a){return r.scale.parse(a)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function BB(r){var e=r.getLabelModel().get("customValues");if(e){var t=ko(r);return{labels:dM(r,e).map(function(a){var n={value:a};return{formattedLabel:t(n),rawLabel:r.scale.getLabel(n),tickValue:a}})}}return r.type==="category"?GB(r):HB(r)}function zB(r,e){var t=r.getTickModel().get("customValues");return t?{ticks:dM(r,t)}:r.type==="category"?FB(r,e):{ticks:G(r.scale.getTicks(),function(a){return a.value})}}function GB(r){var e=r.getLabelModel(),t=gM(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function gM(r,e){var t=yM(r,"labels"),a=ly(e),n=mM(t,a);if(n)return n;var i,o;return j(a)?i=xM(r,a):(o=a==="auto"?WB(r):a,i=SM(r,o)),_M(t,a,{labels:i,labelCategoryInterval:o})}function FB(r,e){var t=yM(r,"ticks"),a=ly(e),n=mM(t,a);if(n)return n;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),j(a))i=xM(r,a,!0);else if(a==="auto"){var s=gM(r,r.getLabelModel());o=s.labelCategoryInterval,i=G(s.labels,function(l){return l.tickValue})}else o=a,i=SM(r,o,!0);return _M(t,a,{ticks:i,tickCategoryInterval:o})}function HB(r){var e=r.scale.getTicks(),t=ko(r);return{labels:G(e,function(a,n){return{level:a.level,formattedLabel:t(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value}})}}function yM(r,e){return el(r)[e]||(el(r)[e]=[])}function mM(r,e){for(var t=0;t40&&(s=Math.max(1,Math.floor(o/40)));for(var l=i[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),f=Math.abs(u*Math.cos(a)),h=Math.abs(u*Math.sin(a)),v=0,c=0;l<=i[1];l+=s){var p=0,d=0,g=pl(t({value:l}),e.font,"center","top");p=g.width*1.3,d=g.height*1.3,v=Math.max(v,p,7),c=Math.max(c,d,7)}var y=v/f,m=c/h;isNaN(y)&&(y=1/0),isNaN(m)&&(m=1/0);var _=Math.max(0,Math.floor(Math.min(y,m))),S=el(r.model),b=r.getExtent(),x=S.lastAutoInterval,w=S.lastTickCount;return x!=null&&w!=null&&Math.abs(x-_)<=1&&Math.abs(w-o)<=1&&x>_&&S.axisExtent0===b[0]&&S.axisExtent1===b[1]?_=x:(S.lastTickCount=o,S.lastAutoInterval=_,S.axisExtent0=b[0],S.axisExtent1=b[1]),_}function UB(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function SM(r,e,t){var a=ko(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],f=n.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=hM(r),v=o.get("showMinLabel")||h,c=o.get("showMaxLabel")||h;v&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);c&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g})}return s}function xM(r,e,t){var a=r.scale,n=ko(r),i=[];return C(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:n(o),rawLabel:s,tickValue:l})}),i}var K_=[0,1],YB=function(){function r(e,t,a){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=a||[0,0]}return r.prototype.contain=function(e){var t=this._extent,a=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return e>=a&&e<=n},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return nT(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var a=this._extent;a[0]=e,a[1]=t},r.prototype.dataToCoord=function(e,t){var a=this._extent,n=this.scale;return e=n.normalize(e),this.onBand&&n.type==="ordinal"&&(a=a.slice(),j_(a,n.count())),Lt(e,K_,a,t)},r.prototype.coordToData=function(e,t){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),j_(a,n.count()));var i=Lt(e,a,K_,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),a=zB(this,t),n=a.ticks,i=G(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return ZB(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var a=this.scale.getMinorTicks(t),n=G(a,function(i){return G(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(){return BB(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),a=t[1]-t[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(e[1]-e[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(){return $B(this)},r}();function j_(r,e){var t=r[1]-r[0],a=e,n=t/a/2;r[0]+=n,r[1]-=n}function ZB(r,e,t,a){var n=e.length;if(!r.onBand||t||!n)return;var i=r.getExtent(),o,s;if(n===1)e[0].coord=i[0],o=e[1]={coord:i[1]};else{var l=e[n-1].tickValue-e[0].tickValue,u=(e[n-1].coord-e[0].coord)/l;C(e,function(c){c.coord-=u/2});var f=r.scale.getExtent();s=1+f[1]-e[n-1].tickValue,o={coord:e[n-1].coord+u*s},e.push(o)}var h=i[0]>i[1];v(e[0].coord,i[0])&&(a?e[0].coord=i[0]:e.shift()),a&&v(i[0],e[0].coord)&&e.unshift({coord:i[0]}),v(i[1],o.coord)&&(a?o.coord=i[1]:e.pop()),a&&v(o.coord,i[1])&&e.push({coord:i[1]});function v(c,p){return c=Ut(c),p=Ut(p),h?c>p:cn&&(n+=ts);var c=Math.atan2(s,o);if(c<0&&(c+=ts),c>=a&&c<=n||c+ts>=a&&c+ts<=n)return l[0]=f,l[1]=h,u-t;var p=t*Math.cos(a)+r,d=t*Math.sin(a)+e,g=t*Math.cos(n)+r,y=t*Math.sin(n)+e,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Ef(r,e,t,a,n,i,o,s){var l=n-r,u=i-e,f=t-r,h=a-e,v=Math.sqrt(f*f+h*h);f/=v,h/=v;var c=l*f+u*h,p=c/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*f,g=o[1]=e+p*h;return Math.sqrt((d-n)*(d-n)+(g-i)*(g-i))}function bM(r,e,t,a,n,i,o){t<0&&(r=r+t,t=-t),a<0&&(e=e+a,a=-a);var s=r+t,l=e+a,u=o[0]=Math.min(Math.max(n,r),s),f=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-n)*(u-n)+(f-i)*(f-i))}var yr=[];function jB(r,e,t){var a=bM(e.x,e.y,e.width,e.height,r.x,r.y,yr);return t.set(yr[0],yr[1]),a}function QB(r,e,t){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,f=e.data,h=r.x,v=r.y,c=0;c0){e=e/180*Math.PI,_r.fromArray(r[0]),kt.fromArray(r[1]),Yt.fromArray(r[2]),ft.sub(Gr,_r,kt),ft.sub(Nr,Yt,kt);var t=Gr.len(),a=Nr.len();if(!(t<.001||a<.001)){Gr.scale(1/t),Nr.scale(1/a);var n=Gr.dot(Nr),i=Math.cos(e);if(i1&&ft.copy(Ae,Yt),Ae.toArray(r[1])}}}}function JB(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,_r.fromArray(r[0]),kt.fromArray(r[1]),Yt.fromArray(r[2]),ft.sub(Gr,kt,_r),ft.sub(Nr,Yt,kt);var a=Gr.len(),n=Nr.len();if(!(a<.001||n<.001)){Gr.scale(1/a),Nr.scale(1/n);var i=Gr.dot(e),o=Math.cos(t);if(i=l)ft.copy(Ae,Yt);else{Ae.scaleAndAdd(Nr,s/Math.tan(Math.PI/2-f));var h=Yt.x!==kt.x?(Ae.x-kt.x)/(Yt.x-kt.x):(Ae.y-kt.y)/(Yt.y-kt.y);if(isNaN(h))return;h<0?ft.copy(Ae,kt):h>1&&ft.copy(Ae,Yt)}Ae.toArray(r[1])}}}}function jv(r,e,t,a){var n=t==="normal",i=n?r:r.ensureState(t);i.ignore=e;var o=a.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=a.getModel("lineStyle").getLineStyle();n?r.useStyle(s):i.style=s}function tz(r,e){var t=e.smooth,a=e.points;if(!!a)if(r.moveTo(a[0][0],a[0][1]),t>0&&a.length>=3){var n=Oa(a[0],a[1]),i=Oa(a[1],a[2]);if(!n||!i){r.lineTo(a[1][0],a[1][1]),r.lineTo(a[2][0],a[2][1]);return}var o=Math.min(n,i)*t,s=zu([],a[1],a[0],o/n),l=zu([],a[1],a[2],o/i),u=zu([],s,l,.5);r.bezierCurveTo(s[0],s[1],s[0],s[1],u[0],u[1]),r.bezierCurveTo(l[0],l[1],l[0],l[1],a[2][0],a[2][1])}else for(var f=1;f0&&i&&b(-f/o,0,o);var d=r[0],g=r[o-1],y,m;_(),y<0&&x(-y,.8),m<0&&x(m,.8),_(),S(y,m,1),S(m,y,-1),_(),y<0&&w(-y),m<0&&w(m);function _(){y=d.rect[e]-a,m=n-g.rect[e]-g.rect[t]}function S(T,A,M){if(T<0){var D=Math.min(A,-T);if(D>0){b(D*M,0,o);var I=D+T;I<0&&x(-I*M,1)}else x(-T*M,1)}}function b(T,A,M){T!==0&&(u=!0);for(var D=A;D0)for(var I=0;I0;I--){var E=M[I-1]*R;b(-E,I,o)}}}function w(T){var A=T<0?-1:1;T=Math.abs(T);for(var M=Math.ceil(T/(o-1)),D=0;D0?b(M,0,D+1):b(-M,o-D-1,o),T-=M,T<=0)return}return u}function ez(r,e,t,a){return AM(r,"x","width",e,t,a)}function CM(r,e,t,a){return AM(r,"y","height",e,t,a)}function MM(r){var e=[];r.sort(function(d,g){return g.priority-d.priority});var t=new vt(0,0,0,0);function a(d){if(!d.ignore){var g=d.ensureState("emphasis");g.ignore==null&&(g.ignore=!1)}d.ignore=!0}for(var n=0;n=0&&a.attr(i.oldLayoutSelect),ct(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),Dt(a,u,t,l)}else if(a.attr(u),!Ao(a).valueAnimation){var h=ot(a.style.opacity,1);a.style.opacity=0,Bt(a,{style:{opacity:h}},t,l)}if(i.oldLayout=u,a.states.select){var c=i.oldLayoutSelect={};cu(c,u,pu),cu(c,a.states.select,pu)}if(a.states.emphasis){var p=i.oldLayoutEmphasis={};cu(p,u,pu),cu(p,a.states.emphasis,pu)}vA(a,l,f,t,t)}if(n&&!n.ignore&&!n.invisible){var i=nz(n),o=i.oldLayout,d={points:n.shape.points};o?(n.attr({shape:o}),Dt(n,{shape:d},t)):(n.setShape(d),n.style.strokePercent=0,Bt(n,{style:{strokePercent:1}},t)),i.oldLayout=d}},r}();const oz=iz;var Jv=xt();function sz(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){var n=Jv(t).labelManager;n||(n=Jv(t).labelManager=new oz),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,a){var n=Jv(t).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),n.updateLayoutConfig(t),n.layout(t),n.processLabelsOverall()})}var tc=Math.sin,ec=Math.cos,DM=Math.PI,Dn=Math.PI*2,lz=180/DM,uz=function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,a,n,i,o){this._add("C",e,t,a,n,i,o)},r.prototype.quadraticCurveTo=function(e,t,a,n){this._add("Q",e,t,a,n)},r.prototype.arc=function(e,t,a,n,i,o){this.ellipse(e,t,a,a,0,n,i,o)},r.prototype.ellipse=function(e,t,a,n,i,o,s,l){var u=s-o,f=!l,h=Math.abs(u),v=Ga(h-Dn)||(f?u>=Dn:-u>=Dn),c=u>0?u%Dn:u%Dn+Dn,p=!1;v?p=!0:Ga(h)?p=!1:p=c>=DM==!!f;var d=e+a*ec(o),g=t+n*tc(o);this._start&&this._add("M",d,g);var y=Math.round(i*lz);if(v){var m=1/this._p,_=(f?1:-1)*(Dn-m);this._add("A",a,n,y,1,+f,e+a*ec(o+_),t+n*tc(o+_)),m>.01&&this._add("A",a,n,y,0,+f,d,g)}else{var S=e+a*ec(s),b=t+n*tc(s);this._add("A",a,n,y,+p,+f,S,b)}},r.prototype.rect=function(e,t,a,n){this._add("M",e,t),this._add("l",a,0),this._add("l",0,n),this._add("l",-a,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,a,n,i,o,s,l,u){for(var f=[],h=this._p,v=1;v"}function mz(r){return""}function hy(r,e){e=e||{};var t=e.newline?` +`:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return yz(o,s)+(o!=="style"?Ce(l):l||"")+(i?""+t+G(i,function(u){return a(u)}).join(t)+t:"")+mz(o)}return a(r)}function _z(r,e,t){t=t||{};var a=t.newline?` +`:"",n=" {"+a,i=a+"}",o=G(_t(r),function(l){return l+n+G(_t(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=G(_t(e),function(l){return"@keyframes "+l+n+G(_t(e[l]),function(u){return u+n+G(_t(e[l][u]),function(f){var h=e[l][u][f];return f==="d"&&(h='path("'+h+'")'),f+":"+h+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function dd(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function e1(r,e,t,a){return ee("svg","root",{width:r,height:e,xmlns:LM,"xmlns:xlink":PM,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+e:!1},t)}var Sz=0;function EM(){return Sz++}var r1={cubicIn:"0.32,0,0.67,0",cubicOut:"0.33,1,0.68,1",cubicInOut:"0.65,0,0.35,1",quadraticIn:"0.11,0,0.5,0",quadraticOut:"0.5,1,0.89,1",quadraticInOut:"0.45,0,0.55,1",quarticIn:"0.5,0,0.75,0",quarticOut:"0.25,1,0.5,1",quarticInOut:"0.76,0,0.24,1",quinticIn:"0.64,0,0.78,0",quinticOut:"0.22,1,0.36,1",quinticInOut:"0.83,0,0.17,1",sinusoidalIn:"0.12,0,0.39,0",sinusoidalOut:"0.61,1,0.88,1",sinusoidalInOut:"0.37,0,0.63,1",exponentialIn:"0.7,0,0.84,0",exponentialOut:"0.16,1,0.3,1",exponentialInOut:"0.87,0,0.13,1",circularIn:"0.55,0,1,0.45",circularOut:"0,0.55,0.45,1",circularInOut:"0.85,0,0.15,1"},Rn="transform-origin";function xz(r,e,t){var a=B({},r.shape);B(a,e),r.buildPath(t,a);var n=new IM;return n.reset(Zw(r)),t.rebuildPath(n,1),n.generateStr(),n.getStr()}function bz(r,e){var t=e.originX,a=e.originY;(t||a)&&(r[Rn]=t+"px "+a+"px")}var wz={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function kM(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function Tz(r,e,t){var a=r.shape.paths,n={},i,o;if(C(a,function(l){var u=dd(t.zrId);u.animation=!0,kh(l,{},u,!0);var f=u.cssAnims,h=u.cssNodes,v=_t(f),c=v.length;if(!!c){o=v[c-1];var p=f[o];for(var d in p){var g=p[d];n[d]=n[d]||{d:""},n[d].d+=g.d||""}for(var y in h){var m=h[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=kM(n,t);return i.replace(o,s)}}function a1(r){return $(r)?r1[r]?"cubic-bezier("+r1[r]+")":vg(r)?r:"":""}function kh(r,e,t,a){var n=r.animators,i=n.length,o=[];if(r instanceof Lg){var s=Tz(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var dt=kM(w,t);return dt+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+EM();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function Az(r,e,t){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};n1(a,e,t,!0)}else{var n=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=n.fill;if(!i){var o=r.style&&r.style.fill,s=r.states.select&&r.states.select.style&&r.states.select.style.fill,l=r.currentStates.indexOf("select")>=0&&s||o;l&&(i=Mp(l))}var u=n.lineWidth;if(u){var f=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),n1(a,e,t,!0)}}function n1(r,e,t,a){var n=JSON.stringify(r),i=t.cssStyleCache[n];i||(i=t.zrId+"-cls-"+EM(),t.cssStyleCache[n]=i,t.cssNodes["."+i+(a?":hover":"")]=r),e.class=e.class?e.class+" "+i:i}var rl=Math.round;function OM(r){return r&&$(r.src)}function NM(r){return r&&j(r.toDataURL)}function vy(r,e,t,a){pz(function(n,i){var o=n==="fill"||n==="stroke";o&&Yw(i)?BM(e,r,n,a):o&&cg(i)?zM(t,r,n,a):o&&i==="none"?r[n]="transparent":r[n]=i},e,t,!1),Rz(t,r,a)}function cy(r,e){var t=JP(e);t&&(t.each(function(a,n){a!=null&&(r[(t1+n).toLowerCase()]=a+"")}),e.isSilent()&&(r[t1+"silent"]="true"))}function i1(r){return Ga(r[0]-1)&&Ga(r[1])&&Ga(r[2])&&Ga(r[3]-1)}function Cz(r){return Ga(r[4])&&Ga(r[5])}function py(r,e,t){if(e&&!(Cz(e)&&i1(e))){var a=t?10:1e4;r.transform=i1(e)?"translate("+rl(e[4]*a)/a+" "+rl(e[5]*a)/a+")":_P(e)}}function o1(r,e,t){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";De(v,g),De(c,g)}else if(v==null||c==null){var y=function(M,D){if(M){var I=M.elm,L=v||D.width,P=c||D.height;M.tag==="pattern"&&(u?(P=1,L/=i.width):f&&(L=1,P/=i.height)),M.attrs.width=L,M.attrs.height=P,I&&(I.setAttribute("width",L),I.setAttribute("height",P))}},m=Sg(p,null,r,function(M){l||y(x,M),y(h,M)});m&&m.width&&m.height&&(v=v||m.width,c=c||m.height)}h=ee("image","img",{href:p,width:v,height:c}),o.width=v,o.height=c}else n.svgElement&&(h=rt(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(!!h){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var b=Xw(n);b&&(o.patternTransform=b);var x=ee("pattern","",o,[h]),w=hy(x),T=a.patternCache,A=T[w];A||(A=a.zrId+"-p"+a.patternIdx++,T[w]=A,o.id=A,x=a.defs[A]=ee("pattern",A,o,[h])),e[t]=oh(A)}}function Ez(r,e,t){var a=t.clipPathCache,n=t.defs,i=a[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=ee("clipPath",i,o,[VM(r,t)])}e["clip-path"]=oh(i)}function u1(r){return document.createTextNode(r)}function zn(r,e,t){r.insertBefore(e,t)}function f1(r,e){r.removeChild(e)}function h1(r,e){r.appendChild(e)}function GM(r){return r.parentNode}function FM(r){return r.nextSibling}function rc(r,e){r.textContent=e}var v1=58,kz=120,Oz=ee("","");function gd(r){return r===void 0}function Er(r){return r!==void 0}function Nz(r,e,t){for(var a={},n=e;n<=t;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function ms(r,e){var t=r.key===e.key,a=r.tag===e.tag;return a&&t}function al(r){var e,t=r.children,a=r.tag;if(Er(a)){var n=r.elm=RM(a);if(dy(Oz,r),z(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,HM(r,p,t,n,l)):Of(r,e,a,i))}function Zi(r,e){var t=e.elm=r.elm,a=r.children,n=e.children;r!==e&&(dy(r,e),gd(e.text)?Er(a)&&Er(n)?a!==n&&Vz(t,a,n):Er(n)?(Er(r.text)&&rc(t,""),HM(t,null,n,0,n.length-1)):Er(a)?Of(t,a,0,a.length-1):Er(r.text)&&rc(t,""):r.text!==e.text&&(Er(a)&&Of(t,a,0,a.length-1),rc(t,e.text)))}function Bz(r,e){if(ms(r,e))Zi(r,e);else{var t=r.elm,a=GM(t);al(e),a!==null&&(zn(a,e.elm,FM(t)),Of(a,[r],0,0))}return e}var zz=0,Gz=function(){function r(e,t,a){if(this.type="svg",this.refreshHover=c1(),this.configLayer=c1(),this.storage=t,this._opts=a=B({},a),this.root=e,this._id="zr"+zz++,this._oldVNode=e1(a.width,a.height),e&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=RM("svg");dy(null,this._oldVNode),n.appendChild(i),e.appendChild(n)}this.resize(a.width,a.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",Bz(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return l1(e,dd(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=dd(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis;var o=[],s=this._bgVNode=Fz(a,n,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=ee("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=G(_t(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(ee("defs","defs",{},u)),e.animation){var f=_z(i.cssNodes,i.cssAnims,{newline:!0});if(f){var h=ee("style","stl",{},[],f);o.push(h)}}return e1(a,n,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},hy(this.renderToVNode({animation:ot(e.cssAnimation,!0),emphasis:ot(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ot(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,a){for(var n=e.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y=s)}}for(var h=this.__startIndex;h15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var M=c.dpr,D=0;D0&&e>n[0]){for(l=0;le);l++);s=a[n[l]]}if(n.splice(l+1,0,e),a[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var a=this._zlevelList,n=0;n0?du:0),this._needsManuallyCompositing),f.__builtin__||ig("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),i=f),n.__dirty&Fe&&!n.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,v){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,C(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var a=this._layerConfig;a[e]?ht(a[e],t,!0):a[e]=t;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",u.style.lineWidth=2),a},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(Gt);const Qz=jz;function vo(r,e){var t=r.mapDimensionsAll("defaultedLabel"),a=t.length;if(a===1){var n=uo(r,e,t[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(e[i])}return a.join(" ")}var Jz=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this)||this;return o.updateData(t,a,n,i),o}return e.prototype._createSymbol=function(t,a,n,i,o){this.removeAll();var s=Kt(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),s.drift=t5,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){va(this.childAt(0))},e.prototype.downplay=function(){ca(this.childAt(0))},e.prototype.setZ=function(t,a){var n=this.childAt(0);n.zlevel=t,n.z=a},e.prototype.setDraggable=function(t,a){var n=this.childAt(0);n.draggable=t,n.cursor=!a&&t?"move":n.cursor},e.prototype.updateData=function(t,a,n,i){this.silent=!1;var o=t.getItemVisual(a,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,a),u=o!==this._symbolType,f=i&&i.disableAnimation;if(u){var h=t.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,t,a,l,h)}else{var v=this.childAt(0);v.silent=!1;var c={scaleX:l[0]/2,scaleY:l[1]/2};f?v.attr(c):Dt(v,c,s,a),wr(v)}if(this._updateCommon(t,a,l,n,i),u){var v=this.childAt(0);if(!f){var c={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:v.style.opacity}};v.scaleX=v.scaleY=0,v.style.opacity=0,Bt(v,c,s,a)}}f&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,a,n,i,o){var s=this.childAt(0),l=t.hostModel,u,f,h,v,c,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,h=i.selectItemStyle,v=i.focus,c=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),c=_.get("blurScope"),p=_.get("disabled"),d=re(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=_i(t.getItemVisual(a,"symbolOffset"),n);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(a,"style"),w=x.fill;if(s instanceof pe){var T=s.style;s.useStyle(B({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(B({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var A=t.getItemVisual(a,"liftZ"),M=this._z2;A!=null?M==null&&(this._z2=s.z2,s.z2+=A):M!=null&&(s.z2=M,this._z2=null);var D=o&&o.useNameLabel;ce(s,d,{labelFetcher:l,labelDataIndex:a,defaultText:I,inheritColor:w,defaultOpacity:x.opacity});function I(R){return D?t.getName(R):vo(t,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var L=s.ensureState("emphasis");L.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=f;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;L.scaleX=this._sizeX*P,L.scaleY=this._sizeY*P,this.setSymbolScale(1),Ht(this,v,c,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,a,n){var i=this.childAt(0),o=it(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Ka(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Ka(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,a){return Eo(t.getItemVisual(a,"symbolSize"))},e}(nt);function t5(r,e){this.parent.drift(r,e)}const Tl=Jz;function nc(r,e,t,a){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(a.isIgnore&&a.isIgnore(t))&&!(a.clipShape&&!a.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function g1(r){return r!=null&&!et(r)&&(r={isIgnore:r}),r||{}}function y1(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:re(e),cursorStyle:e.get("cursor")}}var e5=function(){function r(e){this.group=new nt,this._SymbolCtor=e||Tl}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=g1(t);var a=this.group,n=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=y1(e),u={disableAnimation:s},f=t.getSymbolPoint||function(h){return e.getItemLayout(h)};i||a.removeAll(),e.diff(i).add(function(h){var v=f(h);if(nc(e,v,h,t)){var c=new o(e,h,l,u);c.setPosition(v),e.setItemGraphicEl(h,c),a.add(c)}}).update(function(h,v){var c=i.getItemGraphicEl(v),p=f(h);if(!nc(e,p,h,t)){a.remove(c);return}var d=e.getItemVisual(h,"symbol")||"circle",g=c&&c.getSymbolType&&c.getSymbolType();if(!c||g&&g!==d)a.remove(c),c=new o(e,h,l,u),c.setPosition(p);else{c.updateData(e,h,l,u);var y={x:p[0],y:p[1]};s?c.attr(y):Dt(c,y,n)}a.add(c),e.setItemGraphicEl(h,c)}).remove(function(h){var v=i.getItemGraphicEl(h);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(a,n){var i=e._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=y1(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,a){this._progressiveEls=[],a=g1(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=a[0]:a[1]<0&&(t=a[1]),t}function UM(r,e,t,a){var n=NaN;r.stacked&&(n=t.get(t.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,a),o[1-i]=n,e.dataToPoint(o)}function a5(r,e){var t=[];return e.diff(r).add(function(a){t.push({cmd:"+",idx:a})}).update(function(a,n){t.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){t.push({cmd:"-",idx:a})}).execute(),t}function n5(r,e,t,a,n,i,o,s){for(var l=a5(r,e),u=[],f=[],h=[],v=[],c=[],p=[],d=[],g=$M(n,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=n||d<0)break;if(ii(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),h=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var b=d+i,x=e[b*2],w=e[b*2+1];x===y&&w===m&&g=a||ii(x,w))c=y,p=m;else{M=x-u,D=w-f;var P=y-u,R=x-y,E=m-f,N=w-m,O=void 0,V=void 0;if(s==="x"){O=Math.abs(P),V=Math.abs(R);var F=M>0?1:-1;c=y-F*O*o,p=m,I=y+F*V*o,L=m}else if(s==="y"){O=Math.abs(E),V=Math.abs(N);var H=D>0?1:-1;c=y,p=m-H*O*o,I=y,L=m+H*V*o}else O=Math.sqrt(P*P+E*E),V=Math.sqrt(R*R+N*N),A=V/(V+O),c=y-M*o*(1-A),p=m-D*o*(1-A),I=y+M*o*A,L=m+D*o*A,I=Ma(I,Da(x,y)),L=Ma(L,Da(w,m)),I=Da(I,Ma(x,y)),L=Da(L,Ma(w,m)),M=I-y,D=L-m,c=y-M*O/V,p=m-D*O/V,c=Ma(c,Da(u,y)),p=Ma(p,Da(f,m)),c=Da(c,Ma(u,y)),p=Da(p,Ma(f,m)),M=y-c,D=m-p,I=y+M*V/O,L=m+D*V/O}r.bezierCurveTo(h,v,c,p,y,m),h=I,v=L}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var YM=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),i5=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polyline",a}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new YM},e.prototype.buildPath=function(t,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&ii(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(p-l)*_+l:(c-s)*_+s;return u?[t,S]:[S,t]}s=c,l=p;break;case o.C:c=i[h++],p=i[h++],d=i[h++],g=i[h++],y=i[h++],m=i[h++];var b=u?ff(s,c,d,y,t,f):ff(l,p,g,m,t,f);if(b>0)for(var x=0;x=0){var S=u?te(l,p,g,m,w):te(s,c,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e}(mt),o5=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(YM),ZM=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="ec-polygon",a}return e.prototype.getDefaultShape=function(){return new o5},e.prototype.buildPath=function(t,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&ii(n[s*2-2],n[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):n&&t.push(o(n,l,0),o(n,l,e));break}else n&&(t.push(o(n,l,0)),n=null),t.push(l),i=l}return t}function u5(r,e,t){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&e.type==="cartesian2d"){for(var n,i,o=a.length-1;o>=0;o--){var s=r.getDimensionInfo(a[o].dimension);if(n=s&&s.coordDim,n==="x"||n==="y"){i=a[o];break}}if(!!i){var l=e.getAxis(n),u=G(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,h=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),h.reverse());var v=l5(u,n==="x"?t.getWidth():t.getHeight()),c=v.length;if(!c&&f)return u[0].coord<0?h[1]?h[1]:u[f-1].color:h[0]?h[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[c-1].coord+p,y=g-d;if(y<.001)return"transparent";C(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:c?v[c-1].offset:.5,color:h[1]||"transparent"}),v.unshift({offset:c?v[0].offset:.5,color:h[0]||"transparent"});var m=new yl(0,0,0,0,v,!0);return m[n]=d,m[n+"2"]=g,m}}}function f5(r,e,t){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=t.getAxesByScale("ordinal")[0];if(!!i&&!(n&&h5(i,e))){var o=e.mapDimension(i.dim),s={};return C(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function h5(r,e){var t=r.getExtent(),a=Math.abs(t[1]-t[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=e.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function v5(r,e){return isNaN(r)||isNaN(e)}function c5(r){for(var e=r.length/2;e>0&&v5(r[e*2-2],r[e*2-1]);e--);return e-1}function b1(r,e){return[r[e*2],r[e*2+1]]}function p5(r,e,t){for(var a=r.length/2,n=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function KM(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var F=d.getState("emphasis").style;F.lineWidth=+d.style.lineWidth+1}it(d).seriesIndex=t.seriesIndex,Ht(d,N,O,V);var H=x1(t.get("smooth")),U=t.get("smoothMonotone");if(d.setShape({smooth:H,smoothMonotone:U,connectNulls:T}),g){var K=l.getCalculationInfo("stackedOnSeries"),Q=0;g.useStyle(tt(f.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:l.getVisual("style").decal})),K&&(Q=x1(K.get("smooth"))),g.setShape({smooth:H,stackedOnSmooth:Q,smoothMonotone:U,connectNulls:T}),ve(g,t,"areaStyle"),it(g).seriesIndex=t.seriesIndex,Ht(g,N,O,V)}var pt=function(St){i._changePolyState(St)};l.eachItemGraphicEl(function(St){St&&(St.onHoverStateChange=pt)}),this._polyline.onHoverStateChange=pt,this._data=l,this._coordSys=o,this._stackedOnPoints=x,this._points=h,this._step=D,this._valueOrigin=S,t.get("triggerLineEvent")&&(this.packEventData(t,d),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,a){it(a).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,a,n,i){var o=t.getData(),s=ui(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],h=l[s*2+1];if(isNaN(f)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,h))return;var v=t.get("zlevel")||0,c=t.get("z")||0;u=new Tl(o,s),u.x=f,u.y=h,u.setZ(v,c);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=c,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Vt.prototype.highlight.call(this,t,a,n,i)},e.prototype.downplay=function(t,a,n,i){var o=t.getData(),s=ui(o,i);if(this._changePolyState("normal"),s!=null&&s>=0){var l=o.getItemGraphicEl(s);l&&(l.__temp?(o.setItemGraphicEl(s,null),this.group.remove(l)):l.downplay())}else Vt.prototype.downplay.call(this,t,a,n,i)},e.prototype._changePolyState=function(t){var a=this._polygon;yf(this._polyline,t),a&&yf(a,t)},e.prototype._newPolyline=function(t){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new i5({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},e.prototype._newPolygon=function(t,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new ZM({shape:{points:t,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},e.prototype._initSymbolLabelAnimation=function(t,a,n){var i,o,s=a.getBaseAxis(),l=s.inverse;a.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):a.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");j(f)&&(f=f(null));var h=u.get("animationDelay")||0,v=j(h)?h(null):h;t.eachItemGraphicEl(function(c,p){var d=c;if(d){var g=[c.x,c.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,b=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=n;i?(y=x.x,m=x.x+x.width,_=c.x):(y=x.y+x.height,m=x.y,_=c.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=j(h)?h(p):f*w+v,A=d.getSymbolPath(),M=A.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),M&&M.animateFrom({style:{opacity:0}},{duration:300,delay:T}),A.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,a,n){var i=t.getModel("endLabel");if(KM(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Ct({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=c5(l);f>=0&&(ce(s,re(t,"endLabel"),{inheritColor:n,labelFetcher:t,labelDataIndex:f,defaultText:function(h,v,c){return c!=null?WM(o,c):vo(o,h)},enableTextSetter:!0},d5(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,a,n,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var h=n.getLayout("points"),v=n.hostModel,c=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=a.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=p5(h,S,w),A=T.range,M=A[1]-A[0],D=void 0;if(M>=1){if(M>1&&!c){var I=b1(h,A[0]);u.attr({x:I[0]+b,y:I[1]+x}),o&&(D=v.getRawValue(A[0]))}else{var I=f.getPointOn(S,w);I&&u.attr({x:I[0]+b,y:I[1]+x});var L=v.getRawValue(A[0]),P=v.getRawValue(A[1]);o&&(D=dT(n,p,L,P,T.t))}i.lastFrameIndex=A[0]}else{var R=t===1||i.lastFrameIndex>0?A[0]:0,I=b1(h,R);o&&(D=v.getRawValue(R)),u.attr({x:I[0]+b,y:I[1]+x})}if(o){var E=Ao(u);typeof E.setLabelText=="function"&&E.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,a,n,i,o,s,l){var u=this._polyline,f=this._polygon,h=t.hostModel,v=n5(this._data,t,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),c=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(c=Ia(v.current,n,o,l),p=Ia(v.stackedOnCurrent,n,o,l),d=Ia(v.next,n,o,l),g=Ia(v.stackedOnNext,n,o,l)),S1(c,d)>3e3||f&&S1(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=c;var y={shape:{points:d}};v.current!==c&&(y.shape.__points=v.next),u.stopAnimation(),Dt(u,y,h),f&&(f.setShape({points:c,stackedOnPoints:p}),f.stopAnimation(),Dt(f,{shape:{stackedOnPoints:g}},h),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;te&&(e=i,t=n)}return isFinite(t)?t:NaN},nearest:function(r){return r[0]}},_5=function(r){return Math.round(r.length/2)};function jM(r){return{seriesType:r,reset:function(e,t,a){var n=e.getData(),i=e.get("sampling"),o=e.coordinateSystem,s=n.count();if(s>10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),h=a.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(h||1),c=Math.round(s/v);if(isFinite(c)&&c>1){i==="lttb"&&e.setData(n.lttbDownSample(n.mapDimension(u.dim),1/c));var p=void 0;$(i)?p=m5[i]:j(i)&&(p=i),p&&e.setData(n.downSample(n.mapDimension(u.dim),1/c,p,_5))}}}}}function S5(r){r.registerChartView(y5),r.registerSeriesModel(Qz),r.registerLayout(Ml("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),a=e.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,jM("line"))}var QM=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return ma(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(n)C(i.getAxes(),function(v,c){if(v.type==="category"&&a!=null){var p=v.getTicksCoords(),d=v.getTickModel().get("alignWithLabel"),g=o[c],y=a[c]==="x1"||a[c]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[c]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;bg){_=(x+m)/2;break}b===1&&(S=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[c]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),h=i.getBaseAxis().isHorizontal()?0:1;s[h]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(Gt);Gt.registerClass(QM);const Nf=QM;var x5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return ma(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>t&&(t=a),t},e.prototype.brushSelector=function(t,a,n){return n.rect(a.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=on(Nf.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(Nf);const b5=x5;var w5=function(){function r(){this.cx=0,this.cy=0,this.r0=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),T5=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="sausage",a}return e.prototype.getDefaultShape=function(){return new w5},e.prototype.buildPath=function(t,a){var n=a.cx,i=a.cy,o=Math.max(a.r0||0,0),s=Math.max(a.r,0),l=(s-o)*.5,u=o+l,f=a.startAngle,h=a.endAngle,v=a.clockwise,c=Math.PI*2,p=v?h-fMath.PI/2&&fs)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,a){for(var n=a.scale,i=n.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],n.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,a,n,i){if(!!this._isOrderChangedWithinSameData(t,a,n)){var o=this._dataSort(t,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,a,n){var i=a.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,a){this._clear(this._model),this._removeOnRenderedListener(a)},e.prototype.dispose=function(t,a){this._removeOnRenderedListener(a)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var a=this.group,n=this._data;t&&t.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){Xs(i,t,it(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e}(Vt),w1={cartesian2d:function(r,e){var t=e.width<0?-1:1,a=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height);var n=r.x+r.width,i=r.y+r.height,o=oc(e.x,r.x),s=sc(e.x+e.width,n),l=oc(e.y,r.y),u=sc(e.y+e.height,i),f=sn?s:o,e.y=h&&l>i?u:l,e.width=f?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),a<0&&(e.y+=e.height,e.height=-e.height),f||h},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}var n=sc(e.r,r.r),i=oc(e.r0,r.r0);e.r=n,e.r0=i;var o=n-i<0;if(t<0){var a=e.r;e.r=e.r0,e.r0=a}return o}},T1={cartesian2d:function(r,e,t,a,n,i,o,s,l){var u=new wt({shape:B({},a),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,h=n?"height":"width";f[h]=0}return u},polar:function(r,e,t,a,n,i,o,s,l){var u=!n&&l?Vf:Ve,f=new u({shape:a,z2:1});f.name="item";var h=JM(n);if(f.calculateTextPosition=A5(h,{isRoundCap:u===Vf}),i){var v=f.shape,c=n?"r":"endAngle",p={};v[c]=n?a.r0:a.startAngle,p[c]=a[c],(s?Dt:Bt)(f,{shape:p},i)}return f}};function I5(r,e){var t=r.get("realtimeSort",!0),a=e.getBaseAxis();if(t&&a.type==="category"&&e.type==="cartesian2d")return{baseAxis:a,otherAxis:e.getOtherAxis(a)}}function A1(r,e,t,a,n,i,o,s){var l,u;i?(u={x:a.x,width:a.width},l={y:a.y,height:a.height}):(u={y:a.y,height:a.height},l={x:a.x,width:a.width}),s||(o?Dt:Bt)(t,{shape:l},e,n,null);var f=e?r.baseAxis.model:null;(o?Dt:Bt)(t,{shape:u},f,n)}function C1(r,e){for(var t=0;t0?1:-1,o=a.height>0?1:-1;return{x:a.x+i*n/2,y:a.y+o*n/2,width:a.width-i*n,height:a.height-o*n}},polar:function(r,e,t){var a=r.getItemLayout(e);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function R5(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function JM(r){return function(e){var t=e?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+t;default:return a}}}(r)}function D1(r,e,t,a,n,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,h=jn(a.getModel("itemStyle"),f,!0);B(f,h),r.setShape(f)}}else{var u=a.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=a.getShallow("cursor");v&&r.attr("cursor",v);var c=s?o?n.r>=n.r0?"endArc":"startArc":n.endAngle>=n.startAngle?"endAngle":"startAngle":o?n.height>=0?"bottom":"top":n.width>=0?"right":"left",p=re(a);ce(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:vo(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:c});var d=r.getTextContent();if(s&&d){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,C5(r,g==="outside"?c:g,JM(o),a.get(["label","rotate"]))}hA(d,p,i.getRawValue(t),function(m){return WM(e,m)});var y=a.getModel(["emphasis"]);Ht(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),ve(r,a),R5(n)&&(r.style.fill="none",r.style.stroke="none",C(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function E5(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(a,n,i)}var k5=function(){function r(){}return r}(),I1=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="largeBar",a}return e.prototype.getDefaultShape=function(){return new k5},e.prototype.buildPath=function(t,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function O5(r,e,t){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,h=i.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function tD(r,e,t){if(xi(t,"cartesian2d")){var a=e,n=t.getArea();return{x:r?a.x:n.x,y:r?n.y:a.y,width:r?a.width:n.width,height:r?n.height:a.height}}else{var n=t.getArea(),i=e;return{cx:n.cx,cy:n.cy,r0:r?n.r0:i.r0,r:r?n.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function N5(r,e,t){var a=r.type==="polar"?Ve:wt;return new a({shape:tD(e,t,r),silent:!0,z2:0})}const V5=D5;function B5(r){r.registerChartView(V5),r.registerSeriesModel(b5),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,st(rM,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,aM("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,jM("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var a=e.componentType||"series";t.eachComponent({mainType:a,query:e},function(n){e.sortInfo&&n.axis.setCategorySortInfo(e.sortInfo)})})}var R1=Math.PI*2,_u=Math.PI/180;function eD(r,e){return Jt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function rD(r,e){var t=eD(r,e),a=r.get("center"),n=r.get("radius");z(n)||(n=[0,n]);var i=W(t.width,e.getWidth()),o=W(t.height,e.getHeight()),s=Math.min(i,o),l=W(n[0],s/2),u=W(n[1],s/2),f,h,v=r.coordinateSystem;if(v){var c=v.dataToPoint(a);f=c[0]||0,h=c[1]||0}else z(a)||(a=[a,a]),f=W(a[0],i)+t.x,h=W(a[1],o)+t.y;return{cx:f,cy:h,r0:l,r:u}}function z5(r,e,t){e.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=eD(a,t),s=rD(a,t),l=s.cx,u=s.cy,f=s.r,h=s.r0,v=-a.get("startAngle")*_u,c=a.get("endAngle"),p=a.get("padAngle")*_u;c=c==="auto"?v-R1:-c*_u;var d=a.get("minAngle")*_u,g=d+p,y=0;n.each(i,function(N){!isNaN(N)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),b=a.get("roseType"),x=a.get("stillShowZeroSum"),w=n.getDataExtent(i);w[0]=0;var T=S?1:-1,A=[v,c],M=T*p/2;xg(A,!S),v=A[0],c=A[1];var D=aD(a);D.startAngle=v,D.endAngle=c,D.clockwise=S;var I=Math.abs(c-v),L=I,P=0,R=v;if(n.setLayout({viewRect:o,r:f}),n.each(i,function(N,O){var V;if(isNaN(N)){n.setItemLayout(O,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:l,cy:u,r0:h,r:b?NaN:f});return}b!=="area"?V=m===0&&x?_:N*_:V=I/y,VV?(H=R+T*V/2,U=H):(H=R+M,U=F-M),n.setItemLayout(O,{angle:V,startAngle:H,endAngle:U,clockwise:S,cx:l,cy:u,r0:h,r:b?Lt(N,w,[h,f]):f}),R=F}),Lt?y:g,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*n,w=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:c:null;a.setStyle("width",p)}var d=a.getBoundingRect();i.width=d.width;var g=(a.style.margin||0)+2.1;i.height=d.height+g,i.y-=(i.height-h)/2}}}function lc(r){return r.position==="center"}function H5(r){var e=r.getData(),t=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*G5,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,h=s.y,v=s.height;function c(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,A=w.getTextContent(),M=w.getTextGuideLine(),D=e.getItemModel(x),I=D.getModel("label"),L=I.get("position")||D.get(["emphasis","label","position"]),P=I.get("distanceToLabelLine"),R=I.get("alignTo"),E=W(I.get("edgeDistance"),u),N=I.get("bleedMargin"),O=D.getModel("labelLine"),V=O.get("length");V=W(V,u);var F=O.get("length2");if(F=W(F,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":U>0?"left":"right"}var $t=Math.PI,Ft=0,de=I.get("rotate");if(Mt(de))Ft=de*($t/180);else if(L==="center")Ft=0;else if(de==="radial"||de===!0){var Kr=U<0?-H+$t:-H;Ft=Kr}else if(de==="tangential"&&L!=="outside"&&L!=="outer"){var Le=Math.atan2(U,K);Le<0&&(Le=$t*2+Le);var El=K>0;El&&(Le=$t+Le),Ft=Le-$t}if(i=!!Ft,A.x=Q,A.y=pt,A.rotation=Ft,A.setStyle({verticalAlign:"middle"}),at){A.setStyle({align:dt});var Hh=A.states.select;Hh&&(Hh.x+=A.x,Hh.y+=A.y)}else{var Sa=A.getBoundingRect().clone();Sa.applyTransform(A.getComputedTransform());var cm=(A.style.margin||0)+2.1;Sa.y-=cm/2,Sa.height+=cm,t.push({label:A,labelLine:M,position:L,len:V,len2:F,minTurnAngle:O.get("minTurnAngle"),maxSurfaceAngle:O.get("maxSurfaceAngle"),surfaceNormal:new ft(U,K),linePoints:St,textAlign:dt,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:N,rect:Sa,unconstrainedWidth:Sa.width,labelStyleWidth:A.style.width})}w.setTextConfig({inside:at})}}),!i&&r.get("avoidLabelOverlap")&&F5(t,a,n,l,u,v,f,h);for(var d=0;d0){for(var f=o.getItemLayout(0),h=1;isNaN(f&&f.startAngle)&&h=i.r0}},e.type="pie",e}(Vt);const U5=$5;function Oo(r,e,t){e=z(e)&&{coordDimensions:e}||B({encodeDefine:r.getEncode()},e);var a=r.getSource(),n=bl(a,e).dimensions,i=new Me(n,r);return i.initData(a,t),i}var Y5=function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var a=this._getDataWithEncodedVisual();return a.getItemVisual(e,t)},r}();const Il=Y5;var Z5=xt(),X5=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Il(Y(this.getData,this),Y(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Oo(this,{coordDimensions:["value"],encodeDefaulter:st(Gg,this)})},e.prototype.getDataParams=function(t){var a=this.getData(),n=Z5(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=aR(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){li(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(Gt);const q5=X5;function K5(r){return{seriesType:r,reset:function(e,t){var a=e.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!(Mt(o)&&!isNaN(o)&&o<0)})}}}function j5(r){r.registerChartView(U5),r.registerSeriesModel(q5),_C("pie",r.registerAction),r.registerLayout(st(z5,"pie")),r.registerProcessor(Dl("pie")),r.registerProcessor(K5("pie"))}var Q5=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,a){return ma(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,a,n){return n.point(a.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(Gt);const J5=Q5;var iD=4,tG=function(){function r(){}return r}(),eG=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.getDefaultShape=function(){return new tG},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var f=u*2,h=i[f]-s/2,v=i[f+1]-l/2;if(t>=h&&a>=v&&t<=h+s&&a<=v+l)return u}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,h=-1/0,v=0;v=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const aG=rG;var nG=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._symbolDraw.incrementalUpdate(t,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=t.end===a.getData().count()},e.prototype.updateTransform=function(t,a,n){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Ml("").reset(t,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(!!t.get("clip",!0)){var a=t.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new aG:new Al,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},e.prototype.remove=function(t,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(Vt);const iG=nG;var oG=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Tt);const sG=oG;var md=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",qt).models[0]},e.type="cartesian2dAxis",e}(Tt);jt(md,wl);var oD={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},lG=ht({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},oD),gy=ht({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},oD),uG=ht({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},gy),fG=tt({logBase:10},gy);const sD={category:lG,value:gy,time:uG,log:fG};var hG={value:1,category:1,time:1,log:1};function co(r,e,t,a){C(hG,function(n,i){var o=ht(ht({},sD[i],!0),a,!0),s=function(l){k(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,h){var v=Ks(this),c=v?Do(f):{},p=h.getTheme();ht(f,p.get(i+"Axis")),ht(f,this.getDefaultOption()),f.type=k1(f),v&&ja(f,c,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=hd.createByAxisModel(this))},u.prototype.getCategories=function(f){var h=this.option;if(h.type==="category")return f?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+i,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",k1)}function k1(r){return r.type||(r.data?"category":"value")}var vG=function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return G(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Pt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}();const cG=vG;var _d=["x","y"];function O1(r){return r.type==="interval"||r.type==="time"}var pG=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=_d,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!O1(t)||!O1(a))){var n=t.getExtent(),i=a.getExtent(),o=this.dataToPoint([n[0],i[0]]),s=this.dataToPoint([n[1],i[1]]),l=n[1]-n[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,h=(s[1]-o[1])/u,v=o[0]-n[0]*f,c=o[1]-i[0]*h,p=this._transform=[f,0,0,h,v,c];this._invTransform=So([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(t[0]))&&n.contain(n.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,a){var n=this.dataToPoint(t),i=this.dataToPoint(a),o=this.getArea(),s=new vt(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,a,n){n=n||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return fe(n,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return n[0]=s.toGlobalCoord(s.dataToCoord(i,a)),n[1]=l.toGlobalCoord(l.dataToCoord(o,a)),n},e.prototype.clampData=function(t,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(t[0]),u=i.parse(t[1]);return a=a||[],a[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),a[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),a},e.prototype.pointToData=function(t,a){var n=[];if(this._invTransform)return fe(n,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(t[0]),a),n[1]=o.coordToData(o.toLocalCoord(t[1]),a),n},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-t,o=Math.min(n[0],n[1])-t,s=Math.max(a[0],a[1])-i+t,l=Math.max(n[0],n[1])-o+t;return new vt(i,o,s,l)},e}(cG),dG=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),t&&a[0]>a[1]&&a.reverse(),a},e.prototype.pointToData=function(t,a){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),a)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e}(Ar);const gG=dG;function Sd(r,e,t){t=t||{};var a=r.coordinateSystem,n=e.axis,i={},o=n.getAxesOnZeroOf()[0],s=n.position,l=o?"onZero":s,u=n.dim,f=a.getRect(),h=[f.x,f.x+f.width,f.y,f.y+f.height],v={left:0,right:1,top:0,bottom:1,onZero:2},c=e.get("offset")||0,p=u==="x"?[h[2]-c,h[3]+c]:[h[0]-c,h[1]+c];if(o){var d=o.toGlobalCoord(o.dataToCoord(0));p[v.onZero]=Math.max(Math.min(d,p[1]),p[0])}i.position=[u==="y"?p[v[l]]:h[0],u==="x"?p[v[l]]:h[3]],i.rotation=Math.PI/2*(u==="x"?0:1);var g={top:-1,bottom:1,left:-1,right:1};i.labelDirection=i.tickDirection=i.nameDirection=g[s],i.labelOffset=o?p[v[s]]-p[v.onZero]:0,e.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),oe(t.labelInside,e.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var y=e.get(["axisLabel","rotate"]);return i.labelRotate=l==="top"?-y:y,i.z2=1,i}function N1(r){return r.get("coordinateSystem")==="cartesian2d"}function V1(r){var e={xAxisModel:null,yAxisModel:null};return C(e,function(t,a){var n=a.replace(/Model$/,""),i=r.getReferringComponents(n,qt).models[0];e[a]=i}),e}var uc=Math.log;function lD(r,e,t){var a=Ja.prototype,n=a.getTicks.call(t),i=a.getTicks.call(t,!0),o=n.length-1,s=a.getInterval.call(t),l=fM(r,e),u=l.extent,f=l.fixMin,h=l.fixMax;if(r.type==="log"){var v=uc(r.base);u=[uc(u[0])/v,uc(u[1])/v]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:f,fixMax:h});var c=a.getExtent.call(r);f&&(u[0]=c[0]),h&&(u[1]=c[1]);var p=a.getInterval.call(r),d=u[0],g=u[1];if(f&&h)p=(g-d)/o;else if(f)for(g=u[0]+p*o;gu[0]&&isFinite(d)&&isFinite(u[0]);)p=Xv(p),d=u[1]-p*o;else{var y=r.getTicks().length-1;y>o&&(p=Xv(p));var m=p*o;g=Math.ceil(u[1]/p)*p,d=Ut(g-m),d<0&&u[0]>=0?(d=0,g=Ut(m)):g>0&&u[1]<=0&&(g=0,d=-Ut(m))}var _=(n[0].value-i[0].value)/s,S=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+p*_,g+p*S),a.setInterval.call(r,p),(_||S)&&a.setNiceExtent.call(r,d+p,g-p)}var yG=function(){function r(e,t,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=_d,this._initCartesian(e,t,a),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var a=this._axesMap;this._updateScale(e,this.model);function n(o){var s,l=_t(o),u=l.length;if(!!u){for(var f=[],h=u-1;h>=0;h--){var v=+l[h],c=o[v],p=c.model,d=c.scale;vd(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(c):(ho(d,p),vd(d)&&(s=c))}f.length&&(s||(s=f.pop(),ho(s.scale,s.model)),C(f,function(g){lD(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};C(a.x,function(o){B1(a,"y",o,i)}),C(a.y,function(o){B1(a,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,a){var n=e.getBoxLayoutParams(),i=!a&&e.get("containLabel"),o=Jt(n,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),i&&(C(s,function(u){if(!u.model.get(["axisLabel","inside"])){var f=IB(u);if(f){var h=u.isHorizontal()?"height":"width",v=u.model.get(["axisLabel","margin"]);o[h]-=f[h]+v,u.position==="top"?o.y+=f.height+v:u.position==="left"&&(o.x+=f.width+v)}}}),l()),C(this._coordsList,function(u){u.calcAffineTransform()});function l(){C(s,function(u){var f=u.isHorizontal(),h=f?[0,o.width]:[0,o.height],v=u.inverse?1:0;u.setExtent(h[v],h[1-v]),mG(u,f?o.x:o.y)})}},r.prototype.getAxis=function(e,t){var a=this._axesMap[e];if(a!=null)return a[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var a="x"+e+"y"+t;return this._coordsMap[a]}et(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var n=0,i=this._coordsList;n0?"top":"bottom",i="center"):Ws(n-Fa)?(o=a>0?"bottom":"top",i="center"):(o="middle",n>0&&n0?"right":"left":i=a>0?"left":"right"),{rotation:n,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r}(),G1={axisLine:function(r,e,t,a){var n=e.get(["axisLine","show"]);if(n==="auto"&&r.handleAutoShown&&(n=r.handleAutoShown("axisLine")),!!n){var i=e.axis.getExtent(),o=a.transform,s=[i[0],0],l=[i[1],0],u=s[0]>l[0];o&&(fe(s,s,o),fe(l,l,o));var f=B({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new se({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:f,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});lo(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var v=e.get(["axisLine","symbol"]);if(v!=null){var c=e.get(["axisLine","symbolSize"]);$(v)&&(v=[v,v]),($(c)||Mt(c))&&(c=[c,c]);var p=_i(e.get(["axisLine","symbolOffset"])||0,c),d=c[0],g=c[1];C([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(y,m){if(v[m]!=="none"&&v[m]!=null){var _=Kt(v[m],-d/2,-g/2,d,g,f.stroke,!0),S=y.r+y.offset,b=u?l:s;_.attr({rotation:y.rotate,x:b[0]+S*Math.cos(r.rotation),y:b[1]-S*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,a){var n=bG(t,a,e,r),i=TG(t,a,e,r);if(xG(e,i,n),wG(t,a,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=TM(G(i,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));MM(o)}},axisName:function(r,e,t,a){var n=oe(r.axisName,e.get("name"));if(!!n){var i=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),f=u[0]>u[1]?-1:1,h=[i==="start"?u[0]-f*l:i==="end"?u[1]+f*l:(u[0]+u[1])/2,H1(i)?r.labelOffset+o*l:0],v,c=e.get("nameRotate");c!=null&&(c=c*Fa/180);var p;H1(i)?v=oi.innerTextLayout(r.rotation,c!=null?c:r.rotation,o):(v=SG(r.rotation,i,c||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(v.rotation)),!isFinite(p)&&(p=null)));var d=s.getFont(),g=e.get("nameTruncate",!0)||{},y=g.ellipsis,m=oe(r.nameTruncateMaxWidth,g.maxWidth,p),_=new Ct({x:h[0],y:h[1],rotation:v.rotation,silent:oi.isLabelSilent(e),style:Ot(s,{text:n,font:d,overflow:"truncate",width:m,ellipsis:y,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||v.textAlign,verticalAlign:s.get("verticalAlign")||v.textVerticalAlign}),z2:1});if(To({el:_,componentModel:e,itemName:n}),_.__fullText=n,_.anid="name",e.get("triggerEvent")){var S=oi.makeAxisEventDataBase(e);S.targetType="axisName",S.name=n,it(_).eventData=S}a.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function SG(r,e,t,a){var n=iT(t-r),i,o,s=a[0]>a[1],l=e==="start"&&!s||e!=="start"&&s;return Ws(n-Fa/2)?(o=l?"bottom":"top",i="center"):Ws(n-Fa*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nFa/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function xG(r,e,t){if(!hM(r.axis)){var a=r.get(["axisLabel","showMinLabel"]),n=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var i=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],f=t[1],h=t[t.length-1],v=t[t.length-2];a===!1?(Ze(i),Ze(u)):F1(i,o)&&(a?(Ze(o),Ze(f)):(Ze(i),Ze(u))),n===!1?(Ze(s),Ze(h)):F1(l,s)&&(n?(Ze(l),Ze(v)):(Ze(s),Ze(h)))}}function Ze(r){r&&(r.ignore=!0)}function F1(r,e){var t=r&&r.getBoundingRect().clone(),a=e&&e.getBoundingRect().clone();if(!(!t||!a)){var n=ih([]);return gi(n,n,-r.rotation),t.applyTransform(ia([],n,r.getLocalTransform())),a.applyTransform(ia([],n,e.getLocalTransform())),t.intersect(a)}}function H1(r){return r==="middle"||r==="center"}function uD(r,e,t,a,n){for(var i=[],o=[],s=[],l=0;l=0||r===e}function LG(r){var e=yy(r);if(!!e){var t=e.axisPointerModel,a=e.axis.scale,n=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=a.parse(o));var s=xd(t);i==null&&(n.status=s?"show":"hide");var l=a.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=tt({color:p.color},l));var g=ht(rt(p),{boundaryGap:t,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:d,triggerEvent:v},!1);if($(f)){var y=g.name;g.name=f.replace("{value}",y!=null?y:"")}else j(f)&&(g.name=f(g.name,g));var m=new Nt(g,null,this.ecModel);return jt(m,wl.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=c},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ht({lineStyle:{color:"#bbb"}},es.axisLine),axisLabel:Su(es.axisLabel,!1),axisTick:Su(es.axisTick,!1),splitLine:Su(es.splitLine,!0),splitArea:Su(es.splitArea,!0),indicator:[]},e}(Tt);const YG=UG;var ZG=["axisLine","axisTickLabel","axisName"],XG=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes(),i=G(n,function(o){var s=o.model.get("showName")?o.name:"",l=new da(o.model,{axisName:s,position:[a.cx,a.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});C(i,function(o){C(ZG,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var a=t.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),h=s.get("show"),v=l.get("color"),c=u.get("color"),p=z(v)?v:[v],d=z(c)?c:[c],g=[],y=[];function m(R,E,N){var O=N%E.length;return R[O]=R[O]||[],O}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,b=a.cy,x=0;x<_.length;x++){if(f){var w=m(g,p,x);g[w].push(new an({shape:{cx:S,cy:b,r:_[x].coord}}))}if(h&&x<_.length-1){var w=m(y,d,x);y[w].push(new ph({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,A=G(n,function(R,E){var N=R.getTicksCoords();return T=T==null?N.length-1:Math.min(N.length-1,T),G(N,function(O){return a.coordToPoint(O.coord,E)})}),M=[],x=0;x<=T;x++){for(var D=[],I=0;I3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;vc(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(n){var h=Math.abs(i),v=(i>0?1:-1)*(h>3?.4:h>1?.15:.05);vc(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!X1(this._zr,"globalPan")){var a=t.pinchScale>1?1.1:1/1.1;vc(this,"zoom",null,t,{scale:a,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(ur);function vc(r,e,t,a,n){r.pointerChecker&&r.pointerChecker(a,n.originX,n.originY)&&(fa(a.event),dD(r,e,t,a,n))}function dD(r,e,t,a,n){n.isAvailableBehavior=Y(Ju,null,t,a),r.trigger(e,n)}function Ju(r,e,t){var a=t[r];return!r||a&&(!$(a)||e.event[a+"Key"])}const Ll=nF;function _y(r,e,t){var a=r.target;a.x+=e,a.y+=t,a.dirty()}function Sy(r,e,t,a){var n=r.target,i=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,i){var s=i.min||0,l=i.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,n.x-=(t-n.x)*(u-1),n.y-=(a-n.y)*(u-1),n.scaleX*=u,n.scaleY*=u,n.dirty()}var iF={axisPointer:1,tooltip:1,brush:1};function Oh(r,e,t){var a=e.getComponentByElement(r.topTarget),n=a&&a.coordinateSystem;return a&&a!==t&&!iF.hasOwnProperty(a.mainType)&&n&&n.model!==t}function gD(r){if($(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var cc,Bf={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},q1=_t(Bf),zf={"alignment-baseline":"textBaseline","stop-color":"stopColor"},K1=_t(zf),oF=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var a=gD(e);this._defsUsePending=[];var n=new nt;this._root=n;var i=[],o=a.getAttribute("viewBox")||"",s=parseFloat(a.getAttribute("width")||t.width),l=parseFloat(a.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Ge(a,n,null,!0,!1);for(var u=a.firstChild;u;)this._parseNode(u,n,i,null,!1,!1),u=u.nextSibling;uF(this._defs,this._defsUsePending),this._defsUsePending=[];var f,h;if(o){var v=Nh(o);v.length>=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(h=mD(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var c=n;n=new nt,n.add(c),c.scaleX=c.scaleY=h.scale,c.x=h.x,c.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new wt({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:f,viewBoxTransform:h,named:i}},r.prototype._parseNode=function(e,t,a,n,i,o){var s=e.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=cc[s];if(f&&Z(cc,s)){l=f.call(this,e,t);var h=e.getAttribute("name");if(h){var v={name:h,namedFrom:null,svgNodeTagLower:s,el:l};a.push(v),s==="g"&&(u=v)}else n&&a.push({name:n.name,namedFrom:n,svgNodeTagLower:s,el:l});t.add(l)}}var c=j1[s];if(c&&Z(j1,s)){var p=c.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,a,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var a=new Us({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Xe(t,a),Ge(e,a,this._defsUsePending,!1,!1),sF(a,t);var n=a.style,i=n.fontSize;i&&i<9&&(n.fontSize=9,a.scaleX*=i/9,a.scaleY*=i/9);var o=(n.fontSize||n.fontFamily)&&[n.fontStyle,n.fontWeight,(n.fontSize||12)+"px",n.fontFamily||"sans-serif"].join(" ");n.font=o;var s=a.getBoundingRect();return this._textX+=s.width,t.add(a),a},r.internalField=function(){cc={g:function(e,t){var a=new nt;return Xe(t,a),Ge(e,a,this._defsUsePending,!1,!1),a},rect:function(e,t){var a=new wt;return Xe(t,a),Ge(e,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(e,t){var a=new an;return Xe(t,a),Ge(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),a.silent=!0,a},line:function(e,t){var a=new se;return Xe(t,a),Ge(e,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(e,t){var a=new Dg;return Xe(t,a),Ge(e,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(e,t){var a=e.getAttribute("points"),n;a&&(n=tS(a));var i=new Be({shape:{points:n||[]},silent:!0});return Xe(t,i),Ge(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var a=e.getAttribute("points"),n;a&&(n=tS(a));var i=new ze({shape:{points:n||[]},silent:!0});return Xe(t,i),Ge(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var a=new pe;return Xe(t,a),Ge(e,a,this._defsUsePending,!1,!1),a.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),a.silent=!0,a},text:function(e,t){var a=e.getAttribute("x")||"0",n=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new nt;return Xe(t,s),Ge(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var a=e.getAttribute("x"),n=e.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new nt;return Xe(t,s),Ge(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var a=e.getAttribute("d")||"",n=$T(a);return Xe(t,n),Ge(e,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),j1={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new yl(e,t,a,n);return Q1(r,i),J1(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new aA(e,t,a);return Q1(r,n),J1(r,n),n}};function Q1(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function J1(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var a=t.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};yD(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:n,color:o})}t=t.nextSibling}}function Xe(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),tt(e.__inheritedStyle,r.__inheritedStyle))}function tS(r){for(var e=Nh(r),t=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=Nh(o);switch(n=n||We(),s){case"translate":$r(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":hg(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":gi(n,n,-parseFloat(l[0])*pc,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*pc);ia(n,[1,0,u,1,0,0],n);break;case"skewY":var f=Math.tan(parseFloat(l[0])*pc);ia(n,[1,f,0,1,0,0],n);break;case"matrix":n[0]=parseFloat(l[0]),n[1]=parseFloat(l[1]),n[2]=parseFloat(l[2]),n[3]=parseFloat(l[3]),n[4]=parseFloat(l[4]),n[5]=parseFloat(l[5]);break}}e.setLocalTransform(n)}}var rS=/([^\s:;]+)\s*:\s*([^:;]+)/g;function yD(r,e,t){var a=r.getAttribute("style");if(!!a){rS.lastIndex=0;for(var n;(n=rS.exec(a))!=null;){var i=n[1],o=Z(Bf,i)?Bf[i]:null;o&&(e[o]=n[2]);var s=Z(zf,i)?zf[i]:null;s&&(t[s]=n[2])}}}function cF(r,e,t){for(var a=0;a0,g={api:a,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:d,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(g):l.resourceType==="geoSVG"&&this._buildSVG(g),this._updateController(e,t,a),this._updateMapSelectHandler(e,u,a,n)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=X(),a=X(),n=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(c,p){return p&&(c=p(c)),c&&[c[0]*i.scaleX+i.x,c[1]*i.scaleY+i.y]}function h(c){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=n);var c=o?{normal:{align:"center",verticalAlign:"middle"}}:null;ce(e,re(a),{labelFetcher:v,labelDataIndex:h,defaultText:t},c);var p=e.getTextContent();if(p&&(_D(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function sS(r,e,t,a,n,i){r.data?r.data.setItemGraphicEl(i,e):it(e).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:t,region:a&&a.option||{}}}function lS(r,e,t,a,n){r.data||To({el:e,componentModel:n,itemName:t,itemTooltipOption:a.get("tooltip")})}function uS(r,e,t,a,n){e.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return Ht(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&RE(e,n,t),o}function fS(r,e,t){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),C(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill="#fff",n.style.lineWidth=2),n},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(Gt);const OF=kF;function NF(r,e){var t={};return C(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);t[o]=t[o]||[],isNaN(n)||t[o].push(n)})}),r[0].map(r[0].mapDimension("value"),function(a,n){for(var i="ec-"+r[0].getName(n),o=0,s=1/0,l=-1/0,u=t[i].length,f=0;f1?(S.width=_,S.height=_/g):(S.height=_,S.width=_*g),S.y=m[1]-S.height/2,S.x=m[0]-S.width/2;else{var b=r.getBoxLayoutParams();b.aspect=g,S=Jt(b,{width:p,height:d})}this.setViewRect(S.x,S.y,S.width,S.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function FF(r,e){C(e.get("geoCoord"),function(t,a){r.addGeoCoord(a,t)})}var HF=function(){function r(){this.dimensions=xD}return r.prototype.create=function(e,t){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new pS(l+s,l,B({nameMap:o.get("nameMap")},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=dS,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=a[l]}});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),C(i,function(o,s){var l=G(o,function(f){return f.get("nameMap")}),u=new pS(s,s,B({nameMap:og(l)},n(o[0])));u.zoomLimit=oe.apply(null,G(o,function(f){return f.get("scaleLimit")})),a.push(u),u.resize=dS,u.resize(o[0],t),C(o,function(f){f.coordinateSystem=u,FF(u,f)})}),a},r.prototype.getFilledRegions=function(e,t,a,n){for(var i=(e||[]).slice(),o=X(),s=0;s=0;o--){var s=n[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function jF(r,e){var t=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(t.length){t3(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+e(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+e(r,n));r.parentNode.hierNode.defaultAncestor=e3(r,n,r.parentNode.hierNode.defaultAncestor||a[0],e)}function QF(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function yS(r){return arguments.length?r:n3}function _s(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function JF(r,e){return Jt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function t3(r){for(var e=r.children,t=e.length,a=0,n=0;--t>=0;){var i=e[t];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function e3(r,e,t,a){if(e){for(var n=r,i=r,o=i.parentNode.children[0],s=e,l=n.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,h=s.hierNode.modifier;s=dc(s),i=gc(i),s&&i;){n=dc(n),o=gc(o),n.hierNode.ancestor=r;var v=s.hierNode.prelim+h-i.hierNode.prelim-u+a(s,i);v>0&&(a3(r3(s,r,t),r,v),u+=v,l+=v),h+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,f+=o.hierNode.modifier}s&&!dc(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=h-l),i&&!gc(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function dc(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function gc(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function r3(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function a3(r,e,t){var a=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=a,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=a}function n3(r,e){return r.parentNode===e.parentNode?1:2}var i3=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),o3=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new i3},e.prototype.buildPath=function(t,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=a.orient,f=u==="TB"||u==="BT"?0:1,h=1-f,v=W(a.forkPosition,1),c=[];c[f]=o[f],c[h]=o[h]+(l[h]-o[h])*v,t.moveTo(o[0],o[1]),t.lineTo(c[0],c[1]),t.moveTo(s[0],s[1]),c[f]=s[f],t.lineTo(c[0],c[1]),c[f]=l[f],t.lineTo(c[0],c[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(S=S-Math.PI));var w=b?"left":"right",T=s.getModel("label"),A=T.get("rotate"),M=A*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:A==null?-S:M,origin:"center"}),D.setStyle("verticalAlign","middle"))}var I=s.get(["emphasis","focus"]),L=I==="relative"?lf(o.getAncestorsIndices(),o.getDescendantIndices()):I==="ancestor"?o.getAncestorsIndices():I==="descendant"?o.getDescendantIndices():null;L&&(it(t).focus=L),l3(n,o,f,t,p,c,d,a),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===gl||yf(t.__edge,P)}})}function l3(r,e,t,a,n,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),h=r.getOrient(),v=r.get(["lineStyle","curveness"]),c=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=a.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=a.__edge=new dh({shape:Td(f,h,v,n,n)})),Dt(d,{shape:Td(f,h,v,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=n.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,a=this.children,n=a.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,a=t.data.getItemModel(this.dataIndex);return a.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var a=t.getData().tree.root,n=r.targetNode;if($(n)&&(n=a.getNodeById(n)),n&&a.contains(n))return{node:n};var i=r.targetNodeId;if(i!=null&&(n=a.getNodeById(i)))return{node:n}}}function DD(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function Ay(r,e){var t=DD(r);return ct(t,e)>=0}function Vh(r,e){for(var t=[];r;){var a=r.dataIndex;t.push({name:r.name,dataIndex:a,value:e.getRawValue(a)}),r=r.parentNode}return t.reverse(),t}var _3=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var a={name:t.name,children:t.data},n=t.leaves||{},i=new Nt(n,this,this.ecModel),o=Ty.createTree(a,this,s);function s(h){h.wrapMethod("getItemModel",function(v,c){var p=o.getNodeByDataIndex(c);return p&&p.children.length&&p.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var v=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=v&&v.collapsed!=null?!v.collapsed:h.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return ae("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Vh(n,this),a.collapsed=!n.isExpand,a},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(Gt);const S3=_3;function x3(r,e,t){for(var a=[r],n=[],i;i=a.pop();)if(n.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(n[i])}}function b3(r,e){r.eachSeriesByType("tree",function(t){w3(t,e)})}function w3(r,e){var t=JF(r,e);r.layoutInfo=t;var a=r.get("layout"),n=0,i=0,o=null;a==="radial"?(n=2*Math.PI,i=Math.min(t.height,t.width)/2,o=yS(function(_,S){return(_.parentNode===S.parentNode?1:2)/_.depth})):(n=t.width,i=t.height,o=yS());var s=r.getData().tree.root,l=s.children[0];if(l){KF(s),x3(l,jF,o),s.hierNode.modifier=-l.hierNode.prelim,as(l,QF);var u=l,f=l,h=l;as(l,function(_){var S=_.getLayout().x;Sf.getLayout().x&&(f=_),_.depth>h.depth&&(h=_)});var v=u===f?1:o(u,f)/2,c=v-u.getLayout().x,p=0,d=0,g=0,y=0;if(a==="radial")p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),as(l,function(_){g=(_.getLayout().x+c)*p,y=(_.depth-1)*d;var S=_s(g,y);_.setLayout({x:S.x,y:S.y,rawX:g,rawY:y},!0)});else{var m=r.getOrient();m==="RL"||m==="LR"?(d=i/(f.getLayout().x+v+c),p=n/(h.depth-1||1),as(l,function(_){y=(_.getLayout().x+c)*d,g=m==="LR"?(_.depth-1)*p:n-(_.depth-1)*p,_.setLayout({x:g,y},!0)})):(m==="TB"||m==="BT")&&(p=n/(f.getLayout().x+v+c),d=i/(h.depth-1||1),as(l,function(_){g=(_.getLayout().x+c)*p,y=m==="TB"?(_.depth-1)*d:i-(_.depth-1)*d,_.setLayout({x:g,y},!0)}))}}}function T3(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),a=t.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(n.dataIndex,"style");B(s,o)})})}function A3(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var n=e.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,a){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=n.coordinateSystem,o=by(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}function C3(r){r.registerChartView(u3),r.registerSeriesModel(S3),r.registerLayout(b3),r.registerVisual(T3),A3(r)}var bS=["treemapZoomToNode","treemapRender","treemapMove"];function M3(r){for(var e=0;e1;)i=i.parentNode;var o=Jp(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var D3=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};LD(n);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new Nt({itemStyle:o},this,a);i=t.levels=I3(i,a);var l=G(i||[],function(h){return new Nt(h,s,a)},this),u=Ty.createTree(n,this,f);function f(h){h.wrapMethod("getItemModel",function(v,c){var p=u.getNodeByDataIndex(c),d=p?l[p.depth]:null;return v.parentModel=d||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,a,n){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return ae("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treeAncestors=Vh(n,this),a.treePathInfo=a.treeAncestors,a},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},B(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var a=this._idIndexMap;a||(a=this._idIndexMap=X(),this._idIndexMapCount=0);var n=a.get(t);return n==null&&a.set(t,n=this._idIndexMapCount++),n},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){ID(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"\u25B6",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(Gt);function LD(r){var e=0;C(r.children,function(a){LD(a);var n=a.value;z(n)&&(n=n[0]),e+=n});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}function I3(r,e){var t=Rt(e.get("color")),a=Rt(e.get(["aria","decal","decals"]));if(!!t){r=r||[];var n,i;C(r,function(s){var l=new Nt(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=t.slice()),!i&&a&&(o.decal=a.slice()),r}}const L3=D3;var P3=8,wS=8,yc=5,R3=function(){function r(e){this.group=new nt,e.add(this.group)}return r.prototype.render=function(e,t,a,n){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!a)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),h={pos:{left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(a,h,u),this._renderContent(e,h,s,l,u,f,n),Th(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,a){for(var n=e;n;n=n.parentNode){var i=Qt(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+P3*2,t.emptyItemWidth);t.totalWidth+=s+wS,t.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(e,t,a,n,i,o,s){for(var l=0,u=t.emptyItemWidth,f=e.get(["breadcrumb","height"]),h=Fk(t.pos,t.box),v=t.totalWidth,c=t.renderList,p=n.getModel("itemStyle").getItemStyle(),d=c.length-1;d>=0;d--){var g=c[d],y=g.node,m=g.width,_=g.text;v>h.width&&(v-=m-u,m=u,_=null);var S=new Be({shape:{points:E3(l,0,m,f,d===c.length-1,d===0)},style:tt(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ct({style:Ot(i,{text:_})}),textConfig:{position:"inside"},z2:bo*1e4,onclick:st(s,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=Ot(o,{text:_}),S.ensureState("emphasis").style=p,Ht(S,n.get("focus"),n.get("blurScope"),n.get("disabled")),this.group.add(S),k3(S,e,y),l+=m+wS}},r.prototype.remove=function(){this.group.removeAll()},r}();function E3(r,e,t,a,n,i){var o=[[n?r:r-yc,e],[r+t,e],[r+t,e+a],[n?r:r-yc,e+a]];return!i&&o.splice(2,0,[r+t+yc,e+a/2]),!n&&o.push([r,e+a/2]),o}function k3(r,e,t){it(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Vh(t,e)}}const O3=R3;var N3=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,a,n,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,a=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},n=0,i=this._storage.length;nAS||Math.abs(t.dy)>AS)){var a=this.seriesModel.getData().tree.root;if(!a)return;var n=a.getLayout();if(!n)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:n.x+t.dx,y:n.y+t.dy,width:n.width,height:n.height}})}},e.prototype._onZoom=function(t){var a=t.originX,n=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new vt(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var h=f.zoom=f.zoom||1;if(h*=i,u){var v=u.min||0,c=u.max||1/0;h=Math.max(Math.min(c,h),v)}var p=h/f.zoom;f.zoom=h;var d=this.seriesModel.layoutInfo;a-=d.x,n-=d.y;var g=We();$r(g,g,[-a,-n]),hg(g,g,[p,p]),$r(g,g,[a,n]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var a=this;t.on("click",function(n){if(a._state==="ready"){var i=a.seriesModel.get("nodeClick",!0);if(!!i){var o=a.findTarget(n.offsetX,n.offsetY);if(!!o){var s=o.node;if(s.getLayout().isLeafRoot)a._rootToNode(o);else if(i==="zoomToNode")a._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&wf(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,a,n){var i=this;n||(n=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new O3(this.group))).render(t,a,n.node,function(o){i._state!=="animating"&&(Ay(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=ns(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,a){var n,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,a),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)n={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),n},e.type="treemap",e}(Vt);function ns(){return{nodeGroup:[],background:[],content:[]}}function H3(r,e,t,a,n,i,o,s,l,u){if(!o)return;var f=o.getLayout(),h=r.getData(),v=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var c=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),A=v.getModel(["select","itemStyle"]),M=x.get("borderRadius")||0,D=Q("nodeGroup",Ad);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),Gf(D).nodeWidth=c,Gf(D).nodeHeight=p,f.isAboveViewRoot)return D;var I=Q("background",TS,u,z3);I&&V(D,I,b&&f.upperLabelHeight);var L=v.getModel("emphasis"),P=L.get("focus"),R=L.get("blurScope"),E=L.get("disabled"),N=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)Zs(D)&&Yn(D,!1),I&&(Yn(I,!E),h.setItemGraphicEl(o.dataIndex,I),Up(I,N,R));else{var O=Q("content",TS,u,G3);O&&F(D,O),I.disableMorphing=!0,I&&Zs(I)&&Yn(I,!1),Yn(D,!E),h.setItemGraphicEl(o.dataIndex,D),Up(D,N,R)}return D;function V(dt,at,gt){var lt=it(at);if(lt.dataIndex=o.dataIndex,lt.seriesIndex=r.seriesIndex,at.setShape({x:0,y:0,width:c,height:p,r:M}),g)H(at);else{at.invisible=!1;var q=o.getVisual("style"),ut=q.stroke,zt=DS(x);zt.fill=ut;var bt=kn(w);bt.fill=w.get("borderColor");var $t=kn(T);$t.fill=T.get("borderColor");var Ft=kn(A);if(Ft.fill=A.get("borderColor"),gt){var de=c-2*d;U(at,ut,q.opacity,{x:d,y:0,width:de,height:S})}else at.removeTextContent();at.setStyle(zt),at.ensureState("emphasis").style=bt,at.ensureState("blur").style=$t,at.ensureState("select").style=Ft,hi(at)}dt.add(at)}function F(dt,at){var gt=it(at);gt.dataIndex=o.dataIndex,gt.seriesIndex=r.seriesIndex;var lt=Math.max(c-2*d,0),q=Math.max(p-2*d,0);if(at.culling=!0,at.setShape({x:d,y:d,width:lt,height:q,r:M}),g)H(at);else{at.invisible=!1;var ut=o.getVisual("style"),zt=ut.fill,bt=DS(x);bt.fill=zt,bt.decal=ut.decal;var $t=kn(w),Ft=kn(T),de=kn(A);U(at,zt,ut.opacity,null),at.setStyle(bt),at.ensureState("emphasis").style=$t,at.ensureState("blur").style=Ft,at.ensureState("select").style=de,hi(at)}dt.add(at)}function H(dt){!dt.invisible&&i.push(dt)}function U(dt,at,gt,lt){var q=v.getModel(lt?MS:CS),ut=Qt(v.get("name"),null),zt=q.getShallow("show");ce(dt,re(v,lt?MS:CS),{defaultText:zt?ut:null,inheritColor:at,defaultOpacity:gt,labelFetcher:r,labelDataIndex:o.dataIndex});var bt=dt.getTextContent();if(!!bt){var $t=bt.style,Ft=lg($t.padding||0);lt&&(dt.setTextConfig({layoutRect:lt}),bt.disableLabelLayout=!0),bt.beforeUpdate=function(){var Kr=Math.max((lt?lt.width:dt.shape.width)-Ft[1]-Ft[3],0),Le=Math.max((lt?lt.height:dt.shape.height)-Ft[0]-Ft[2],0);($t.width!==Kr||$t.height!==Le)&&bt.setStyle({width:Kr,height:Le})},$t.truncateMinChar=2,$t.lineOverflow="truncate",K($t,lt,f);var de=bt.getState("emphasis");K(de?de.style:null,lt,f)}}function K(dt,at,gt){var lt=dt?dt.text:null;if(!at&>.isLeafRoot&<!=null){var q=r.get("drillDownIcon",!0);dt.text=q?q+" "+lt:lt}}function Q(dt,at,gt,lt){var q=m!=null&&t[dt][m],ut=n[dt];return q?(t[dt][m]=null,pt(ut,q)):g||(q=new at,q instanceof lr&&(q.z2=W3(gt,lt)),St(ut,q)),e[dt][y]=q}function pt(dt,at){var gt=dt[y]={};at instanceof Ad?(gt.oldX=at.x,gt.oldY=at.y):gt.oldShape=B({},at.shape)}function St(dt,at){var gt=dt[y]={},lt=o.parentNode,q=at instanceof nt;if(lt&&(!a||a.direction==="drillDown")){var ut=0,zt=0,bt=n.background[lt.getRawIndex()];!a&&bt&&bt.oldShape&&(ut=bt.oldShape.width,zt=bt.oldShape.height),q?(gt.oldX=0,gt.oldY=zt):gt.oldShape={x:ut,y:zt,width:0,height:0}}gt.fadein=!q}}function W3(r,e){return r*B3+e}const $3=F3;var ol=C,U3=et,Ff=-1,Cy=function(){function r(e){var t=e.mappingMethod,a=e.type,n=this.option=rt(e);this.type=a,this.mappingMethod=t,this._normalizeData=X3[t];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(mc(n),Y3(n)):t==="category"?n.categories?Z3(n):mc(n,!0):(De(t!=="linear"||n.dataExtent),mc(n))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Y(this._normalizeData,this)},r.listVisualTypes=function(){return _t(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,a){et(e)?C(e,t,a):t.call(a,e)},r.mapVisual=function(e,t,a){var n,i=z(e)?[]:et(e)?{}:(n=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},a;return e&&ol(r.visualHandlers,function(n,i){e.hasOwnProperty(i)&&(t[i]=e[i],a=!0)}),a?t:null},r.prepareVisualTypes=function(e){if(z(e))e=e.slice();else if(U3(e)){var t=[];ol(e,function(a,n){t.push(n)}),e=t}else return[];return e.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,a){for(var n,i=1/0,o=0,s=t.length;o=0;i--)a[i]==null&&(delete t[e[i]],e.pop())}function mc(r,e){var t=r.visual,a=[];et(t)?ol(t,function(i){a.push(i)}):t!=null&&a.push(t);var n={color:1,symbol:1};!e&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),PD(r,a)}function bu(r){return{applyVisual:function(e,t,a){var n=this.mapValueToVisual(e);a("color",r(t("color"),n))},_normalizedToVisual:Cd([0,1])}}function IS(r){var e=this.option.visual;return e[Math.round(Lt(r,[0,1],[0,e.length-1],!0))]||{}}function is(r){return function(e,t,a){a(r,this.mapValueToVisual(e))}}function Ss(r){var e=this.option.visual;return e[this.option.loop&&r!==Ff?r%e.length:r]}function On(){return this.option.visual[0]}function Cd(r){return{linear:function(e){return Lt(e,r,this.option.visual,!0)},category:Ss,piecewise:function(e,t){var a=Md.call(this,t);return a==null&&(a=Lt(e,r,this.option.visual,!0)),a},fixed:On}}function Md(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var a=Cy.findPieceIndex(r,t),n=t[a];if(n&&n.visual)return n.visual[this.type]}}function PD(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=G(e,function(t){var a=$e(t);return a||[0,0,0,1]})),e}var X3={linear:function(r){return Lt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=Cy.findPieceIndex(r,e,!0);if(t!=null)return Lt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?Ff:e},fixed:Zt};function wu(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=tH(n,l,d,g,p,a);ED(d,y,t,a)}})}}}function j3(r,e,t){var a=B({},e),n=t.designatedVisualItemStyle;return C(["color","colorAlpha","colorSaturation"],function(i){n[i]=e[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function LS(r){var e=_c(r,"color");if(e){var t=_c(r,"colorAlpha"),a=_c(r,"colorSaturation");return a&&(e=Ts(e,null,null,a)),t&&(e=hf(e,t)),e}}function Q3(r,e){return e!=null?Ts(e,null,null,r):null}function _c(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function J3(r,e,t,a,n,i){if(!(!i||!i.length)){var o=Sc(e,"color")||n.color!=null&&n.color!=="none"&&(Sc(e,"colorAlpha")||Sc(e,"colorSaturation"));if(!!o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(f==="index"||f==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var v=new he(h);return RD(v).drColorMappingBy=f,v}}}function Sc(r,e){var t=r.get(e);return z(t)&&t.length?{name:e,range:t}:null}function tH(r,e,t,a,n,i){var o=B({},e);if(n){var s=n.type,l=s==="color"&&RD(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var sl=Math.max,Hf=Math.min,PS=oe,My=C,kD=["itemStyle","borderWidth"],eH=["itemStyle","gapWidth"],rH=["upperLabel","show"],aH=["upperLabel","height"];const nH={seriesType:"treemap",reset:function(r,e,t,a){var n=t.getWidth(),i=t.getHeight(),o=r.option,s=Jt(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=W(PS(s.width,l[0]),n),f=W(PS(s.height,l[1]),i),h=a&&a.type,v=["treemapZoomToNode","treemapRootToNode"],c=il(a,v,r),p=h==="treemapRender"||h==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),g=DD(d);if(h!=="treemapMove"){var y=h==="treemapZoomToNode"?fH(r,c,d,u,f):p?[p.width,p.height]:[u,f],m=o.sort;m&&m!=="asc"&&m!=="desc"&&(m="desc");var _={squareRatio:o.squareRatio,sort:m,leafDepth:o.leafDepth};d.hostTree.clearLayouts();var S={x:0,y:0,width:y[0],height:y[1],area:y[0]*y[1]};d.setLayout(S),OD(d,_,!1,0),S=d.getLayout(),My(g,function(x,w){var T=(g[w+1]||d).getValue();x.setLayout(B({dataExtent:[T,T],borderWidth:0,upperHeight:0},S))})}var b=r.getData().tree.root;b.setLayout(hH(s,p,c),!0),r.setLayoutInfo(s),ND(b,new vt(-s.x,-s.y,n,i),g,d,0)}};function OD(r,e,t,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(kD),u=s.get(eH)/2,f=VD(s),h=Math.max(l,f),v=l-u,c=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:f},!0),n=sl(n-2*v,0),i=sl(i-v-c,0);var p=n*i,d=iH(r,s,p,e,t,a);if(!!d.length){var g={x:v,y:c,width:n,height:i},y=Hf(n,i),m=1/0,_=[];_.area=0;for(var S=0,b=d.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function uH(r,e,t){for(var a=0,n=1/0,i=0,o=void 0,s=r.length;ia&&(a=o));var l=r.area*r.area,u=e*e*t;return l?sl(u*a/l,l/(u*n)):1/0}function RS(r,e,t,a,n){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],f=e?r.area/e:0;(n||f>t[l[o]])&&(f=t[l[o]]);for(var h=0,v=r.length;h$m&&(u=$m),i=s}ua&&(a=e);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);h[0].8?"left":v[0]<-.8?"right":"center",d=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[1],p=v[0]>.8?"right":v[0]<-.8?"left":"center",d=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+A,p=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-A;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+A,p="center",i.originY=-A;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+h[0],i.y=h[1]+A,p=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-A;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e}(nt);const Py=LH;var PH=function(){function r(e){this.group=new nt,this._LineCtor=e||Py}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=e,i||n.removeAll();var o=BS(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;!e||e.eachItemGraphicEl(function(t,a){t.updateLayout(e,a)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=BS(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function a(s){!s.isGroup&&!RH(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=e.start;n0}function BS(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:re(e)}}function zS(r){return isNaN(r[0])||isNaN(r[1])}function Ac(r){return r&&!zS(r[0])&&!zS(r[1])}const Ry=PH;var Cc=[],Mc=[],Dc=[],Bi=ie,Ic=Qn,GS=Math.abs;function FS(r,e,t){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){Cc[0]=Bi(a[0],n[0],i[0],f),Cc[1]=Bi(a[1],n[1],i[1],f);var h=GS(Ic(Cc,e)-l);h=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Lc(r,e){var t=[],a=Gs,n=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[na(u[0]),na(u[1])],u[2]&&u.__original.push(na(u[2])));var v=u.__original;if(u[2]!=null){if(we(n[0],v[0]),we(n[1],v[2]),we(n[2],v[1]),f&&f!=="none"){var c=bs(s.node1),p=FS(n,v[0],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[0][0]=t[3],n[1][0]=t[4],a(n[0][1],n[1][1],n[2][1],p,t),n[0][1]=t[3],n[1][1]=t[4]}if(h&&h!=="none"){var c=bs(s.node2),p=FS(n,v[1],c*e);a(n[0][0],n[1][0],n[2][0],p,t),n[1][0]=t[1],n[2][0]=t[2],a(n[0][1],n[1][1],n[2][1],p,t),n[1][1]=t[1],n[2][1]=t[2]}we(u[0],n[0]),we(u[1],n[2]),we(u[2],n[1])}else{if(we(i[0],v[0]),we(i[1],v[1]),$n(o,i[1],i[0]),_o(o,o),f&&f!=="none"){var c=bs(s.node1);dp(i[0],i[0],o,c*e)}if(h&&h!=="none"){var c=bs(s.node2);dp(i[1],i[1],o,-c*e)}we(u[0],i[0]),we(u[1],i[1])}})}function HS(r){return r.type==="view"}var EH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){var n=new Al,i=new Ry,o=this.group;this._controller=new Ll(a.getZr()),this._controllerHost={target:o},o.add(n.group),o.add(i.group),this._symbolDraw=n,this._lineDraw=i,this._firstRender=!0},e.prototype.render=function(t,a,n){var i=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(HS(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(f):Dt(u,f,t)}Lc(t.getGraph(),xs(t));var h=t.getData();s.updateData(h);var v=t.getEdgeData();l.updateData(v),this._updateNodeAndLinkScale(),this._updateController(t,a,n),clearTimeout(this._layoutTimeout);var c=t.forceLayout,p=t.get(["force","layoutAnimation"]);c&&this._startForceLayoutIteration(c,p);var d=t.get("layout");h.graph.eachNode(function(_){var S=_.dataIndex,b=_.getGraphicEl(),x=_.getModel();if(!!b){b.off("drag").off("dragend");var w=x.get("draggable");w&&b.on("drag",function(A){switch(d){case"force":c.warmUp(),!i._layouting&&i._startForceLayoutIteration(c,p),c.setFixed(S),h.setItemLayout(S,[b.x,b.y]);break;case"circular":h.setItemLayout(S,[b.x,b.y]),_.setLayout({fixed:!0},!0),Ly(t,"symbolSize",_,[A.offsetX,A.offsetY]),i.updateLayout(t);break;case"none":default:h.setItemLayout(S,[b.x,b.y]),Iy(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){c&&c.setUnfixed(S)}),b.setDraggable(w,!!x.get("cursor"));var T=x.get(["emphasis","focus"]);T==="adjacency"&&(it(b).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var S=_.getGraphicEl(),b=_.getModel().get(["emphasis","focus"]);!S||b==="adjacency"&&(it(S).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var g=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),y=h.getLayout("cx"),m=h.getLayout("cy");h.graph.eachNode(function(_){FD(_,g,y,m)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,a){var n=this;(function i(){t.step(function(o){n.updateLayout(n._model),(n._layouting=!o)&&(a?n._layoutTimeout=setTimeout(i,16):i())})})()},e.prototype._updateController=function(t,a,n){var i=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,f,h){var v=l.getBoundingRect();return v.applyTransform(l.transform),v.contain(f,h)&&!Oh(u,n,t)}),!HS(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){_y(s,u.dx,u.dy),n.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){Sy(s,u.scale,u.originX,u.originY),n.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),i._updateNodeAndLinkScale(),Lc(t.getGraph(),xs(t)),i._lineDraw.updateLayout(),n.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,a=t.getData(),n=xs(t);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},e.prototype.updateLayout=function(t){Lc(t.getGraph(),xs(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(Vt);const kH=EH;function zi(r){return"_EC_"+r}var OH=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var a=this._nodesMap;if(!a[zi(e)]){var n=new Nn(e,t);return n.hostGraph=this,this.nodes.push(n),a[zi(e)]=n,n}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[zi(e)]},r.prototype.addEdge=function(e,t,a){var n=this._nodesMap,i=this._edgesMap;if(Mt(e)&&(e=this.nodes[e]),Mt(t)&&(t=this.nodes[t]),e instanceof Nn||(e=n[zi(e)]),t instanceof Nn||(t=n[zi(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new WD(e,t,a);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),i[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof Nn&&(e=e.id),t instanceof Nn&&(t=t.id);var a=this._edgesMap;return this._directed?a[e+"-"+t]:a[e+"-"+t]||a[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var a=this.nodes,n=a.length,i=0;i=0&&e.call(t,a[i],i)},r.prototype.eachEdge=function(e,t){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&e.call(t,a[i],i)},r.prototype.breadthFirstTraverse=function(e,t,a,n){if(t instanceof Nn||(t=this._nodesMap[zi(t)]),!!t){for(var i=a==="out"?"outEdges":a==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=n.length;i=0&&this[r][e].setItemVisual(this.dataIndex,t,a)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,a){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,a)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}jt(Nn,$D("hostGraph","data"));jt(WD,$D("hostGraph","edgeData"));const NH=OH;function UD(r,e,t,a,n){for(var i=new NH(a),o=0;o "+v)),u++)}var c=t.get("coordinateSystem"),p;if(c==="cartesian2d"||c==="polar")p=ma(r,t);else{var d=Sl.get(c),g=d?d.dimensions||[]:[];ct(g,"value")<0&&g.concat(["value"]);var y=bl(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Me(y,t),p.initData(r)}var m=new Me(["value"],t);return m.initData(l,s),n&&n(p,m),CD({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var VH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Il(n,n),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),li(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,a){var n=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&n){mH(this);var s=UD(i,n,this,!0,l);return C(s.edges,function(u){_H(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var h=Nt.prototype.getModel;function v(p,d){var g=h.call(this,p,d);return g.resolveParentPath=c,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=c,p.getModel=v,p});function c(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(t,n),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),ae("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var h=uC({series:this,dataIndex:t,multipleSeries:a});return h},e.prototype._updateCategoriesData=function(){var t=G(this.option.categories||[],function(n){return n.value!=null?n:B({value:0},n)}),a=new Me(["value"],this);a.initData(t),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Gt);const BH=VH;var zH={type:"graphRoam",event:"graphRoam",update:"none"};function GH(r){r.registerChartView(kH),r.registerSeriesModel(BH),r.registerProcessor(cH),r.registerVisual(pH),r.registerVisual(dH),r.registerLayout(SH),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,bH),r.registerLayout(TH),r.registerCoordinateSystem("graphView",{dimensions:Pl.dimensions,create:CH}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Zt),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Zt),r.registerAction(zH,function(e,t,a){t.eachComponent({mainType:"series",query:e},function(n){var i=n.coordinateSystem,o=by(i,e,void 0,a);n.setCenter&&n.setCenter(o.center),n.setZoom&&n.setZoom(o.zoom)})})}var FH=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),HH=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="pointer",a}return e.prototype.getDefaultShape=function(){return new FH},e.prototype.buildPath=function(t,a){var n=Math.cos,i=Math.sin,o=a.r,s=a.width,l=a.angle,u=a.x-n(l)*s*(s>=o/3?1:2),f=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(a.x+n(l)*s,a.y+i(l)*s),t.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),t.lineTo(a.x-n(l)*s,a.y-i(l)*s),t.lineTo(u,f)},e}(mt);const WH=HH;function $H(r,e){var t=r.get("center"),a=e.getWidth(),n=e.getHeight(),i=Math.min(a,n),o=W(t[0],e.getWidth()),s=W(t[1],e.getHeight()),l=W(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function Au(r,e){var t=r==null?"":r+"";return e&&($(e)?t=e.replace("{value}",t):j(e)&&(t=e(r))),t}var UH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=$H(t,n);this._renderMain(t,a,n,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,a,n,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),v=h.get("roundCap"),c=v?Vf:Ve,p=h.get("show"),d=h.getModel("lineStyle"),g=d.get("width"),y=[u,f];xg(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],b=0;p&&b=A&&(M===0?0:i[M-1][0])Math.PI/2&&(Q+=Math.PI)):K==="tangential"?Q=-T-Math.PI/2:Mt(K)&&(Q=K*Math.PI/180),Q===0?h.add(new Ct({style:Ot(_,{text:V,x:H,y:U,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:F}),silent:!0})):h.add(new Ct({style:Ot(_,{text:V,x:H,y:U,verticalAlign:"middle",align:"center"},{inheritColor:F}),silent:!0,originX:H,originY:U,rotation:Q}))}if(m.get("show")&&E!==S){var N=m.get("distance");N=N?N+f:f;for(var pt=0;pt<=b;pt++){P=Math.cos(T),R=Math.sin(T);var St=new se({shape:{x1:P*(p-N)+v,y1:R*(p-N)+c,x2:P*(p-w-N)+v,y2:R*(p-w-N)+c},silent:!0,style:I});I.stroke==="auto"&&St.setStyle({stroke:i((E+pt/b)/S)}),h.add(St),T+=M}T-=M}else T+=A}},e.prototype._renderPointer=function(t,a,n,i,o,s,l,u,f){var h=this.group,v=this._data,c=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),b=+t.get("max"),x=[S,b],w=[s,l];function T(M,D){var I=m.getItemModel(M),L=I.getModel("pointer"),P=W(L.get("width"),o.r),R=W(L.get("length"),o.r),E=t.get(["pointer","icon"]),N=L.get("offsetCenter"),O=W(N[0],o.r),V=W(N[1],o.r),F=L.get("keepAspect"),H;return E?H=Kt(E,O-P/2,V-R,P,R,null,F):H=new WH({shape:{angle:-Math.PI/2,width:P,r:R,x:O,y:V}}),H.rotation=-(D+Math.PI/2),H.x=o.cx,H.y=o.cy,H}function A(M,D){var I=g.get("roundCap"),L=I?Vf:Ve,P=g.get("overlap"),R=P?g.get("width"):f/m.count(),E=P?o.r-R:o.r-(M+1)*R,N=P?o.r:o.r-M*R,O=new L({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:N}});return P&&(O.z2=b-m.get(_,M)%b),O}(y||d)&&(m.diff(v).add(function(M){var D=m.get(_,M);if(d){var I=T(M,s);Bt(I,{rotation:-((isNaN(+D)?w[0]:Lt(D,x,w,!0))+Math.PI/2)},t),h.add(I),m.setItemGraphicEl(M,I)}if(y){var L=A(M,s),P=g.get("clip");Bt(L,{shape:{endAngle:Lt(D,x,w,P)}},t),h.add(L),Hp(t.seriesIndex,m.dataType,M,L),p[M]=L}}).update(function(M,D){var I=m.get(_,M);if(d){var L=v.getItemGraphicEl(D),P=L?L.rotation:s,R=T(M,P);R.rotation=P,Dt(R,{rotation:-((isNaN(+I)?w[0]:Lt(I,x,w,!0))+Math.PI/2)},t),h.add(R),m.setItemGraphicEl(M,R)}if(y){var E=c[D],N=E?E.shape.endAngle:s,O=A(M,N),V=g.get("clip");Dt(O,{shape:{endAngle:Lt(I,x,w,V)}},t),h.add(O),Hp(t.seriesIndex,m.dataType,M,O),p[M]=O}}).execute(),m.each(function(M){var D=m.getItemModel(M),I=D.getModel("emphasis"),L=I.get("focus"),P=I.get("blurScope"),R=I.get("disabled");if(d){var E=m.getItemGraphicEl(M),N=m.getItemVisual(M,"style"),O=N.fill;if(E instanceof pe){var V=E.style;E.useStyle(B({image:V.image,x:V.x,y:V.y,width:V.width,height:V.height},N))}else E.useStyle(N),E.type!=="pointer"&&E.setColor(O);E.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(Lt(m.get(_,M),x,[0,1],!0))),E.z2EmphasisLift=0,ve(E,D),Ht(E,L,P,R)}if(y){var F=p[M];F.useStyle(m.getItemVisual(M,"style")),F.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),F.z2EmphasisLift=0,ve(F,D),Ht(F,L,P,R)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,a){var n=t.getModel("anchor"),i=n.get("show");if(i){var o=n.get("size"),s=n.get("icon"),l=n.get("offsetCenter"),u=n.get("keepAspect"),f=Kt(s,a.cx-o/2+W(l[0],a.r),a.cy-o/2+W(l[1],a.r),o,o,null,u);f.z2=n.get("showAbove")?1:0,f.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,a,n,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),h=+t.get("max"),v=new nt,c=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){c[y]=new Ct({silent:!0}),p[y]=new Ct({silent:!0})}).update(function(y,m){c[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new nt,b=i(Lt(_,[f,h],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+W(w[0],o.r),A=o.cy+W(w[1],o.r),M=c[y];M.attr({z2:g?0:2,style:Ot(x,{x:T,y:A,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(M)}var D=m.getModel("detail");if(D.get("show")){var I=D.get("offsetCenter"),L=o.cx+W(I[0],o.r),P=o.cy+W(I[1],o.r),R=W(D.get("width"),o.r),E=W(D.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,M=p[y],O=D.get("formatter");M.attr({z2:g?0:2,style:Ot(D,{x:L,y:P,text:Au(_,O),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:N})}),hA(M,{normal:D},_,function(F){return Au(F,O)}),d&&vA(M,y,l,t,{getFormattedLabel:function(F,H,U,K,Q,pt){return Au(pt?pt.interpolatedValue:_,O)}}),S.add(M)}v.add(S)}),this.group.add(v),this._titleEls=c,this._detailEls=p},e.type="gauge",e}(Vt);const YH=UH;var ZH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,a){return Oo(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(Gt);const XH=ZH;function qH(r){r.registerChartView(YH),r.registerSeriesModel(XH)}var KH=["itemStyle","opacity"],jH=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=n,o=new ze,s=new Ct;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(t,a,!0),n}return e.prototype.updateData=function(t,a,n){var i=this,o=t.hostModel,s=t.getItemModel(a),l=t.getItemLayout(a),u=s.getModel("emphasis"),f=s.get(KH);f=f==null?1:f,n||wr(i),i.useStyle(t.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,Bt(i,{style:{opacity:f}},o,a)):Dt(i,{style:{opacity:f},shape:{points:l.points}},o,a),ve(i,s),this._updateLabel(t,a),Ht(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=t.hostModel,l=t.getItemModel(a),u=t.getItemLayout(a),f=u.label,h=t.getItemVisual(a,"style"),v=h.fill;ce(o,re(l),{labelFetcher:t.hostModel,labelDataIndex:a,defaultOpacity:h.opacity,defaultText:t.getName(a)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}}),n.setTextConfig({local:!0,inside:!!f.inside,insideStroke:v,outsideFill:v});var c=f.linePoints;i.setShape({points:c}),n.textGuideLineConfig={anchor:c?new ft(c[0][0],c[0][1]):null},Dt(o,{style:{x:f.x,y:f.y}},s,a),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),uy(n,fy(l),{stroke:v})},e}(Be),QH=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new jH(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);Xs(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(Vt);const JH=QH;var t4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Il(Y(this.getData,this),Y(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,a){return Oo(this,{coordDimensions:["value"],encodeDefaulter:st(Gg,this)})},e.prototype._defaultLabelLine=function(t){li(t,"labelLine",["show"]);var a=t.labelLine,n=t.emphasis.labelLine;a.show=a.show&&t.label.show,n.show=n.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var a=this.getData(),n=r.prototype.getDataParams.call(this,t),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,t)/o*100).toFixed(2):0,n.$vars.push("percent"),n},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(Gt);const e4=t4;function r4(r,e){return Jt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function a4(r,e){for(var t=r.mapDimension("value"),a=r.mapArray(t,function(l){return l}),n=[],i=e==="ascending",o=0,s=r.count();ob4)return;var n=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);n.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:n.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Rc(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=t.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function Rc(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const A4=w4;var C4=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var a=this.option;t&&ht(a,t,!0),this._initDimensions()},e.prototype.contains=function(t,a){var n=t.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},e.prototype.setAxisExpand=function(t){C(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){t.hasOwnProperty(a)&&(this.option[a]=t[a])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],a=this.parallelAxisIndex=[],n=Pt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);C(n,function(i){t.push("dim"+i.get("dim")),a.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e}(Tt);const M4=C4;var D4=function(r){k(e,r);function e(t,a,n,i,o){var s=r.call(this,t,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(Ar);const I4=D4;function wi(r,e,t,a,n,i){r=r||0;var o=t[1]-t[0];if(n!=null&&(n=Gi(n,[0,o])),i!=null&&(i=Math.max(i,n!=null?n:0)),a==="all"){var s=Math.abs(e[1]-e[0]);s=Gi(s,[0,o]),n=i=Gi(s,[n,i]),a=0}e[0]=Gi(e[0],t),e[1]=Gi(e[1],t);var l=Ec(e,a);e[a]+=r;var u=n||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[a]=Gi(e[a],f);var h;return h=Ec(e,a),n!=null&&(h.sign!==l.sign||h.spani&&(e[1-a]=e[a]+h.sign*i),e}function Ec(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function Gi(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var kc=C,ZD=Math.min,XD=Math.max,US=Math.floor,L4=Math.ceil,YS=Ut,P4=Math.PI,R4=function(){function r(e,t,a){this.type="parallel",this._axesMap=X(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,a)}return r.prototype._init=function(e,t,a){var n=e.dimensions,i=e.parallelAxisIndex;kc(n,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new I4(o,Eh(u),[0,0],u.get("type"),l)),h=f.type==="category";f.onBand=h&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),a=t.axisBase,n=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=a&&o<=a+t.axisLength&&s>=n&&s<=n+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(a){if(!!e.contains(a,t)){var n=a.getData();kc(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),ho(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=Jt(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,a=["x","y"],n=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[n[o]],l=[0,s],u=this.dimensions.length,f=Cu(e.get("axisExpandWidth"),l),h=Cu(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>h&&h>1&&f>0&&s>0,c=e.get("axisExpandWindow"),p;if(c)p=Cu(c[1]-c[0],l),c[1]=c[0]+p;else{p=Cu(f*(h-1),l);var d=e.get("axisExpandCenter")||US(u/2);c=[f*d-p/2],c[1]=c[0]+p}var g=(s-p)/(u-h);g<3&&(g=0);var y=[US(YS(c[0]/f,1))+1,L4(YS(c[1]/f,1))-1],m=g/f*c[0];return{layout:i,pixelDimIndex:o,layoutBase:t[a[o]],layoutLength:s,axisBase:t[a[1-o]],axisLength:t[n[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:c,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;t.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),kc(a,function(o,s){var l=(n.axisExpandable?k4:E4)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},f={horizontal:P4/2,vertical:0},h=[u[i].x+e.x,u[i].y+e.y],v=f[i],c=We();gi(c,c,v),$r(c,c,h),this._axesLayout[o]={position:h,rotation:v,transform:c,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,a,n){a==null&&(a=0),n==null&&(n=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];C(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=a;fi*(1-h[0])?(u="jump",l=s-i*(1-h[2])):(l=s-i*h[1])>=0&&(l=s-i*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?wi(l,n,o,"all"):u="none";else{var c=n[1]-n[0],p=o[1]*s/c;n=[XD(0,p-c/2)],n[1]=ZD(o[1],n[0]+c),n[0]=n[1]-c}return{axisExpandWindow:n,behavior:u}},r}();function Cu(r,e){return ZD(XD(r,e[0]),e[1])}function E4(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function k4(r,e){var t=e.layoutLength,a=e.axisExpandWidth,n=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,f;return r=0;n--)or(a[n])},e.prototype.getActiveState=function(t){var a=this.activeIntervals;if(!a.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=t&&t<=n[1])return"active"}else for(var i=0,o=a.length;iF4}function eI(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function rI(r,e,t,a){var n=new nt;return n.add(new wt({name:"main",style:Ny(t),silent:!0,draggable:!0,cursor:"move",drift:st(KS,r,e,n,["n","s","w","e"]),ondragend:st(pi,e,{isEnd:!0})})),C(a,function(i){n.add(new wt({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:st(KS,r,e,n,i),ondragend:st(pi,e,{isEnd:!0})}))}),n}function aI(r,e,t,a){var n=a.brushStyle.lineWidth||0,i=po(n,H4),o=t[0][0],s=t[1][0],l=o-n/2,u=s-n/2,f=t[0][1],h=t[1][1],v=f-i+n/2,c=h-i+n/2,p=f-o,d=h-s,g=p+n,y=d+n;Jr(r,e,"main",o,s,p,d),a.transformable&&(Jr(r,e,"w",l,u,i,y),Jr(r,e,"e",v,u,i,y),Jr(r,e,"n",l,u,g,i),Jr(r,e,"s",l,c,g,i),Jr(r,e,"nw",l,u,i,i),Jr(r,e,"ne",v,u,i,i),Jr(r,e,"sw",l,c,i,i),Jr(r,e,"se",v,c,i,i))}function Rd(r,e){var t=e.__brushOption,a=t.transformable,n=e.childAt(0);n.useStyle(Ny(t)),n.attr({silent:!a,cursor:a?"move":"default"}),C([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?Ed(r,i[0]):q4(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?$4[s]+"-resize":null})})}function Jr(r,e,t,a,n,i,o){var s=e.childOfName(t);s&&s.setShape(j4(Vy(r,e,[[a,n],[a+i,n+o]])))}function Ny(r){return tt({strokeNoScale:!0},r.brushStyle)}function nI(r,e,t,a){var n=[ul(r,t),ul(e,a)],i=[po(r,t),po(e,a)];return[[n[0],i[0]],[n[1],i[1]]]}function X4(r){return ai(r.group)}function Ed(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=yh(t[e],X4(r));return a[n]}function q4(r,e){var t=[Ed(r,e[0]),Ed(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function KS(r,e,t,a,n,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=iI(e,n,i);C(a,function(u){var f=W4[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(nI(s[0][0],s[1][0],s[0][1],s[1][1])),Ey(e,t),pi(e,{isEnd:!1})}function K4(r,e,t,a){var n=e.__brushOption.range,i=iI(r,t,a);C(n,function(o){o[0]+=i[0],o[1]+=i[1]}),Ey(r,e),pi(r,{isEnd:!1})}function iI(r,e,t){var a=r.group,n=a.transformCoordToLocal(e,t),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function Vy(r,e,t){var a=tI(r,e);return a&&a!==ci?a.clipPath(t,r._transform):rt(t)}function j4(r){var e=ul(r[0][0],r[1][0]),t=ul(r[0][1],r[1][1]),a=po(r[0][0],r[1][0]),n=po(r[0][1],r[1][1]);return{x:e,y:t,width:a-e,height:n-t}}function Q4(r,e,t){if(!(!r._brushType||tW(r,e.offsetX,e.offsetY))){var a=r._zr,n=r._covers,i=Oy(r,e,t);if(!r._dragging)for(var o=0;oa.getWidth()||t<0||t>a.getHeight()}var zh={lineX:JS(0),lineY:JS(1),rect:{createCover:function(r,e){function t(a){return a}return rI({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=eI(r);return nI(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,a){aI(r,e,t,a)},updateCommon:Rd,contain:Od},polygon:{createCover:function(r,e){var t=new nt;return t.add(new ze({name:"main",style:Ny(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new Be({name:"main",draggable:!0,drift:st(K4,r,e),ondragend:st(pi,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,a){e.childAt(0).setShape({points:Vy(r,e,t)})},updateCommon:Rd,contain:Od}};function JS(r){return{createCover:function(e,t){return rI({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=eI(e),a=ul(t[0][r],t[1][r]),n=po(t[0][r],t[1][r]);return[a,n]},updateCoverShape:function(e,t,a,n){var i,o=tI(e,t);if(o!==ci&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),aI(e,t,l,n)},updateCommon:Rd,contain:Od}}const By=Y4;function sI(r){return r=zy(r),function(e){return lA(e,r)}}function lI(r,e){return r=zy(r),function(t){var a=e!=null?e:t,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function uI(r,e,t){var a=zy(r);return function(n,i){return a.contain(i[0],i[1])&&!Oh(n,e,t)}}function zy(r){return vt.create(r)}var eW=["axisLine","axisTickLabel","axisName"],rW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){r.prototype.init.apply(this,arguments),(this._brushController=new By(a.getZr())).on("brush",Y(this._onBrush,this))},e.prototype.render=function(t,a,n,i){if(!aW(t,a,i)){this.axisModel=t,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new nt,this.group.add(this._axisGroup),!!t.get("show")){var s=iW(t,a),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,h=t.axis.dim,v=l.getAxisLayout(h),c=B({strokeContainThreshold:f},v),p=new da(t,c);C(eW,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(c,u,t,s,f,n),ml(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),h=vt.create({x:l[0],y:-o/2,width:u,height:o});h.x-=f,h.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:sI(h),isTargetByCursor:uI(h,s,i),getLinearBrushOtherExtent:lI(h,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(nW(n))},e.prototype._onBrush=function(t){var a=t.areas,n=this.axisModel,i=n.axis,o=G(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(Wt);function aW(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function nW(r){var e=r.axis;return G(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function iW(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}const oW=rW;var sW={type:"axisAreaSelect",event:"axisAreaSelected"};function lW(r){r.registerAction(sW,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(a){a.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(a){a.setAxisExpand(e)})})}var uW={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function fI(r){r.registerComponentView(A4),r.registerComponentModel(M4),r.registerCoordinateSystem("parallel",B4),r.registerPreprocessor(_4),r.registerComponentModel(ZS),r.registerComponentView(oW),co(r,"parallel",ZS,uW),lW(r)}function fW(r){yt(fI),r.registerChartView(h4),r.registerSeriesModel(d4),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,m4)}var hW=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.cpx2=0,this.cpy2=0,this.extent=0}return r}(),vW=function(r){k(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new hW},e.prototype.buildPath=function(t,a){var n=a.extent;t.moveTo(a.x1,a.y1),t.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(t.lineTo(a.x2+n,a.y2),t.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(t.lineTo(a.x2,a.y2+n),t.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),t.closePath()},e.prototype.highlight=function(){va(this)},e.prototype.downplay=function(){ca(this)},e}(mt),cW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,a,n){var i=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,f=l.height,h=t.getData(),v=t.getData("edge"),c=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var d=new vW,g=it(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=p.node1.getLayout(),b=p.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=p.node2.getLayout(),A=p.node2.getModel(),M=A.get("localX"),D=A.get("localY"),I=p.getLayout(),L,P,R,E,N,O,V,F;d.shape.extent=Math.max(1,I.dy),d.shape.orient=c,c==="vertical"?(L=(x!=null?x*u:S.x)+I.sy,P=(w!=null?w*f:S.y)+S.dy,R=(M!=null?M*u:T.x)+I.ty,E=D!=null?D*f:T.y,N=L,O=P*(1-_)+E*_,V=R,F=P*_+E*(1-_)):(L=(x!=null?x*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+I.sy,R=M!=null?M*u:T.x,E=(D!=null?D*f:T.y)+I.ty,N=L*(1-_)+R*_,O=P,V=L*_+R*(1-_),F=E),d.setShape({x1:L,y1:P,x2:R,y2:E,cpx1:N,cpy1:O,cpx2:V,cpy2:F}),d.useStyle(m.getItemStyle()),tx(d.style,c,p);var H=""+y.get("value"),U=re(y,"edgeLabel");ce(d,U,{labelFetcher:{getFormattedLabel:function(pt,St,dt,at,gt,lt){return t.getFormattedLabel(pt,St,"edge",at,Fr(gt,U.normal&&U.normal.get("formatter"),H),lt)}},labelDataIndex:p.dataIndex,defaultText:H}),d.setTextConfig({position:"inside"});var K=y.getModel("emphasis");ve(d,y,"lineStyle",function(pt){var St=pt.getItemStyle();return tx(St,c,p),St}),s.add(d),v.setItemGraphicEl(p.dataIndex,d);var Q=K.get("focus");Ht(d,Q==="adjacency"?p.getAdjacentDataIndices():Q==="trajectory"?p.getTrajectoryDataIndices():Q,K.get("blurScope"),K.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,b=new wt({shape:{x:y!=null?y*u:d.x,y:m!=null?m*f:d.y,width:d.dx,height:d.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});ce(b,re(g),{labelFetcher:{getFormattedLabel:function(w,T){return t.getFormattedLabel(w,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),ve(b,g),s.add(b),h.setItemGraphicEl(p.dataIndex,b),it(b).dataType="node";var x=_.get("focus");Ht(b,x==="adjacency"?p.getAdjacentDataIndices():x==="trajectory"?p.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,d){var g=h.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(pW(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(Vt);function tx(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var a=t.node1.getVisual("color"),n=t.node2.getVisual("color");$(a)&&$(n)&&(r.fill=new yl(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function pW(r,e,t){var a=new wt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Bt(a,{shape:{width:r.width+20}},e,t),a}const dW=cW;var gW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){var n=t.edges||t.links,i=t.data||t.nodes,o=t.levels;this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Nt(o[l],this,a));if(i&&n){var u=UD(i,n,this,!0,f);return u.data}function f(h,v){h.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(c.parentModel=m)}return c}),v.wrapMethod("getItemModel",function(c,p){var d=c.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(c.parentModel=_)}return c})}},e.prototype.setNodePosition=function(t,a){var n=this.option.data||this.option.nodes,i=n[t];i.localX=a[0],i.localY=a[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,a,n){function i(c){return isNaN(c)||c==null}if(n==="edge"){var o=this.getDataParams(t,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return ae("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(t),h=f.getLayout().value,v=this.getDataParams(t,n).data.name;return ae("nameValue",{name:v!=null?v+"":null,value:h,noValue:i(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,a){var n=r.prototype.getDataParams.call(this,t,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;n.value=o}return n},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(Gt);const yW=gW;function mW(r,e){r.eachSeriesByType("sankey",function(t){var a=t.get("nodeWidth"),n=t.get("nodeGap"),i=_W(t,e);t.layoutInfo=i;var o=i.width,s=i.height,l=t.getGraph(),u=l.nodes,f=l.edges;xW(u);var h=Pt(u,function(d){return d.getLayout().value===0}),v=h.length!==0?0:t.get("layoutIterations"),c=t.get("orient"),p=t.get("nodeAlign");SW(u,f,a,n,o,s,v,c,p)})}function _W(r,e){return Jt(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function SW(r,e,t,a,n,i,o,s,l){bW(r,e,t,n,i,s,l),CW(r,e,i,n,a,o,s),OW(r,s)}function xW(r){C(r,function(e){var t=Za(e.outEdges,Wf),a=Za(e.inEdges,Wf),n=e.getValue()||0,i=Math.max(t,a,n);e.setLayout({value:i},!0)})}function bW(r,e,t,a,n,i,o){for(var s=[],l=[],u=[],f=[],h=0,v=0;v=0;y&&g.depth>c&&(c=g.depth),d.setLayout({depth:y?g.depth:h},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mh-1?c:h-1;o&&o!=="left"&&wW(r,o,i,w);var T=i==="vertical"?(n-t)/w:(a-t)/w;AW(r,T,i)}function hI(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function wW(r,e,t,a){if(e==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,IW(s,l,o),Oc(s,n,t,a,o),kW(s,l,o),Oc(s,n,t,a,o)}function MW(r,e){var t=[],a=e==="vertical"?"y":"x",n=Bp(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),C(n.keys,function(i){t.push(n.buckets.get(i))}),t}function DW(r,e,t,a,n,i){var o=1/0;C(r,function(s){var l=s.length,u=0;C(s,function(h){u+=h.getLayout().value});var f=i==="vertical"?(a-(l-1)*n)/u:(t-(l-1)*n)/u;f0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[v]+e;var p=n==="vertical"?a:t;if(u=f-e-p,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var c=h-2;c>=0;--c)l=o[c],u=l.getLayout()[i]+l.getLayout()[v]+e-f,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function IW(r,e,t){C(r.slice().reverse(),function(a){C(a,function(n){if(n.outEdges.length){var i=Za(n.outEdges,LW,t)/Za(n.outEdges,Wf);if(isNaN(i)){var o=n.outEdges.length;i=o?Za(n.outEdges,PW,t)/o:0}if(t==="vertical"){var s=n.getLayout().x+(i-tn(n,t))*e;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-tn(n,t))*e;n.setLayout({y:l},!0)}}})})}function LW(r,e){return tn(r.node2,e)*r.getValue()}function PW(r,e){return tn(r.node2,e)}function RW(r,e){return tn(r.node1,e)*r.getValue()}function EW(r,e){return tn(r.node1,e)}function tn(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Wf(r){return r.getValue()}function Za(r,e,t){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),C(a,function(s){var l=new he({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&C(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function VW(r){r.registerChartView(dW),r.registerSeriesModel(yW),r.registerLayout(mW),r.registerVisual(NW),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){a.setNodePosition(e.dataIndex,[e.localX,e.localY])})})}var vI=function(){function r(){}return r.prototype.getInitialData=function(e,t){var a,n=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",a=n.getOrdinalMeta(),l=!0):s==="category"?(e.layout="vertical",a=i.getOrdinalMeta(),l=!0):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[f],v=u[1-f],c=[n,i],p=c[f].get("type"),d=c[1-f].get("type"),g=e.data;if(g&&l){var y=[];C(g,function(S,b){var x;z(S)?(x=S.slice(),S.unshift(b)):z(S.value)?(x=B({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:h,type:Pf(p),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:Pf(d),dimsDef:m.slice()}];return Oo(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:st(kA,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),cI=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(Gt);jt(cI,vI,!0);const BW=cI;var zW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),h=ex(f,i,u,l,!0);i.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,f){var h=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(h);return}var v=i.getItemLayout(u);h?(wr(h),pI(v,h,i,u)):h=ex(v,i,u,l),o.add(h),i.setItemGraphicEl(u,h)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},e.prototype.remove=function(t){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},e.type="boxplot",e}(Vt),GW=function(){function r(){}return r}(),FW=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="boxplotBoxPath",a}return e.prototype.getDefaultShape=function(){return new GW},e.prototype.buildPath=function(t,a){var n=a.points,i=0;for(t.moveTo(n[i][0],n[i][1]),i++;i<4;i++)t.lineTo(n[i][0],n[i][1]);for(t.closePath();id){var S=[y,_];a.push(S)}}}return{boxData:t,outliers:a}}var qW={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==Se){var a="";It(a)}var n=XW(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function KW(r){r.registerSeriesModel(BW),r.registerChartView(WW),r.registerLayout($W),r.registerTransform(qW)}var jW=["color","borderColor"],QW=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,a,n){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,a):this._incrementalRenderNormal(t,a)},e.prototype.eachRendered=function(t){nn(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var a=t.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},e.prototype._renderNormal=function(t){var a=t.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(f){if(a.hasValue(f)){var h=a.getItemLayout(f);if(s&&rx(u,h))return;var v=Nc(h,f,!0);Bt(v,{shape:{points:h.ends}},t,f),Vc(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}}).update(function(f,h){var v=n.getItemGraphicEl(h);if(!a.hasValue(f)){i.remove(v);return}var c=a.getItemLayout(f);if(s&&rx(u,c)){i.remove(v);return}v?(Dt(v,{shape:{points:c.ends}},t,f),wr(v)):v=Nc(c),Vc(v,a,f,o),i.add(v),a.setItemGraphicEl(f,v)}).remove(function(f){var h=n.getItemGraphicEl(f);h&&i.remove(h)}).execute(),this._data=a},e.prototype._renderLarge=function(t){this._clear(),ax(t,this.group);var a=t.get("clip",!0)?Cl(t.coordinateSystem,!1,t):null;a?this.group.setClipPath(a):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=n.getItemLayout(o),l=Nc(s);Vc(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,a){ax(a,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e}(Vt),JW=function(){function r(){}return r}(),t$=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a.type="normalCandlestickBox",a}return e.prototype.getDefaultShape=function(){return new JW},e.prototype.buildPath=function(t,a){var n=a.points;this.__simpleBox?(t.moveTo(n[4][0],n[4][1]),t.lineTo(n[6][0],n[6][1])):(t.moveTo(n[0][0],n[0][1]),t.lineTo(n[1][0],n[1][1]),t.lineTo(n[2][0],n[2][1]),t.lineTo(n[3][0],n[3][1]),t.closePath(),t.moveTo(n[4][0],n[4][1]),t.lineTo(n[5][0],n[5][1]),t.moveTo(n[6][0],n[6][1]),t.lineTo(n[7][0],n[7][1]))},e}(mt);function Nc(r,e,t){var a=r.ends;return new t$({shape:{points:t?e$(a,r):a},z2:100})}function rx(r,e){for(var t=!0,a=0;a0?"borderColor":"borderColor0"])||t.get(["itemStyle",r>0?"color":"color0"]);r===0&&(n=t.get(["itemStyle","borderColorDoji"]));var i=t.getModel("itemStyle").getItemStyle(jW);e.useStyle(i),e.style.fill=null,e.style.stroke=n}const a$=QW;var dI=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,a,n){var i=a.getItemLayout(t);return i&&n.rect(i.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(Gt);jt(dI,vI,!0);const n$=dI;function i$(r){!r||!z(r.series)||C(r.series,function(e){et(e)&&e.type==="k"&&(e.type="candlestick")})}var o$=["itemStyle","borderColor"],s$=["itemStyle","borderColor0"],l$=["itemStyle","borderColorDoji"],u$=["itemStyle","color"],f$=["itemStyle","color0"],h$={seriesType:"candlestick",plan:Po(),performRawSeries:!0,reset:function(r,e){function t(i,o){return o.get(i>0?u$:f$)}function a(i,o){return o.get(i===0?l$:i>0?o$:s$)}if(!e.isSeriesFiltered(r)){var n=r.pipelineContext.large;return!n&&{progress:function(i,o){for(var s;(s=i.next())!=null;){var l=o.getItemModel(s),u=o.getItemLayout(s).sign,f=l.getItemStyle();f.fill=t(u,l),f.stroke=a(u,l)||f.fill;var h=o.ensureUniqueItemVisual(s,"style");B(h,f)}}}}}};const v$=h$;var c$={seriesType:"candlestick",plan:Po(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),a=p$(r,t),n=0,i=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[n])),l=G(t.mapDimensionsAll(o[i]),t.getDimensionIndex,t),u=l[0],f=l[1],h=l[2],v=l[3];if(t.setLayout({candleWidth:a,isSimpleBox:a<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:c};function c(d,g){for(var y,m=g.getStore();(y=d.next())!=null;){var _=m.get(s,y),S=m.get(u,y),b=m.get(f,y),x=m.get(h,y),w=m.get(v,y),T=Math.min(S,b),A=Math.max(S,b),M=N(T,_),D=N(A,_),I=N(x,_),L=N(w,_),P=[];O(P,D,0),O(P,M,1),P.push(F(L),F(D),F(I),F(M));var R=g.getItemModel(y),E=!!R.get(["itemStyle","borderColorDoji"]);g.setItemLayout(y,{sign:nx(m,y,S,b,f,E),initBaseline:S>b?D[i]:M[i],ends:P,brushRect:V(x,w,_)})}function N(H,U){var K=[];return K[n]=U,K[i]=H,isNaN(U)||isNaN(H)?[NaN,NaN]:e.dataToPoint(K)}function O(H,U,K){var Q=U.slice(),pt=U.slice();Q[n]=Xu(Q[n]+a/2,1,!1),pt[n]=Xu(pt[n]-a/2,1,!0),K?H.push(Q,pt):H.push(pt,Q)}function V(H,U,K){var Q=N(H,K),pt=N(U,K);return Q[n]-=a/2,pt[n]-=a/2,{x:Q[0],y:Q[1],width:a,height:pt[1]-Q[1]}}function F(H){return H[n]=Xu(H[n],1),H}}function p(d,g){for(var y=zr(d.count*4),m=0,_,S=[],b=[],x,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=d.next())!=null;){var A=w.get(s,x),M=w.get(u,x),D=w.get(f,x),I=w.get(h,x),L=w.get(v,x);if(isNaN(A)||isNaN(I)||isNaN(L)){y[m++]=NaN,m+=3;continue}y[m++]=nx(w,x,M,D,f,T),S[n]=A,S[i]=I,_=e.dataToPoint(S,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=L,_=e.dataToPoint(S,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function nx(r,e,t,a,n,i){var o;return t>a?o=-1:t0?r.get(n,e-1)<=a?1:-1:1,o}function p$(r,e){var t=r.getBaseAxis(),a,n=t.type==="category"?t.getBandWidth():(a=t.getExtent(),Math.abs(a[1]-a[0])/e.count()),i=W(ot(r.get("barMaxWidth"),n),n),o=W(ot(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?W(s,n):Math.max(Math.min(n/2,i),o)}const d$=c$;function g$(r){r.registerChartView(a$),r.registerSeriesModel(n$),r.registerPreprocessor(i$),r.registerVisual(v$),r.registerLayout(d$)}function ix(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(a){a.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var y$=function(r){k(e,r);function e(t,a){var n=r.call(this)||this,i=new Tl(t,a),o=new nt;return n.add(i),n.add(o),n.updateData(t,a),n}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var a=t.symbolType,n=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var v=void 0;j(h)?v=h(n):v=h,i.__t>0&&(v=-s*i.__t),this._animateSymbol(i,s,v,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,a,n,i,o){if(a>0){t.__t=0;var s=this,l=t.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return Oa(t.__p1,t.__cp1)+Oa(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,a){t.__p1=a[0],t.__p2=a[1],t.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},e.prototype.updateData=function(t,a,n){this.childAt(0).updateData(t,a,n),this._updateEffectSymbol(t,a)},e.prototype._updateSymbolPosition=function(t){var a=t.__p1,n=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=ie,f=wp;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var h=t.__t<1?f(a[0],i[0],n[0],o):f(n[0],i[0],a[0],1-o),v=t.__t<1?f(a[1],i[1],n[1],o):f(n[1],i[1],a[1],1-o);t.rotation=-Math.atan2(v,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=a);l--);l=Math.min(l,o-2)}else{for(l=s;la);l++);l=Math.min(l-1,o-2)}var f=(a-i[l])/(i[l+1]-i[l]),h=n[l],v=n[l+1];t.x=h[0]*(1-f)+f*v[0],t.y=h[1]*(1-f)+f*v[1];var c=t.__t<1?v[0]-h[0]:h[0]-v[0],p=t.__t<1?v[1]-h[1]:h[1]-v[1];t.rotation=-Math.atan2(p,c)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,t.ignore=!1}},e}(gI);const M$=C$;var D$=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),I$=function(r){k(e,r);function e(t){var a=r.call(this,t)||this;return a._off=0,a.hoverDataIdx=-1,a}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new D$},e.prototype.buildPath=function(t,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){t.moveTo(n[o++],n[o++]);for(var l=1;l0){var c=(u+h)/2-(f-v)*i,p=(f+v)/2-(h-u)*i;t.quadraticCurveTo(c,p,h,v)}else t.lineTo(h,v)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,a){var n=this.shape,i=n.segs,o=n.curveness,s=this.style.lineWidth;if(n.polyline)for(var l=0,u=0;u0)for(var h=i[u++],v=i[u++],c=1;c0){var g=(h+p)/2-(v-d)*o,y=(v+d)/2-(p-h)*o;if(xT(h,v,g,y,p,d,s,t,a))return l}else if(Ra(h,v,p,d,s,t,a))return l;l++}return-1},e.prototype.contain=function(t,a){var n=this.transformCoordToLocal(t,a),i=this.getBoundingRect();if(t=n[0],a=n[1],i.contain(t,a)){var o=this.hoverDataIdx=this.findDataIndex(t,a);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var a=this.shape,n=a.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const P$=L$;var R$={seriesType:"lines",plan:Po(),reset:function(r){var e=r.coordinateSystem;if(!!e){var t=r.get("polyline"),a=r.pipelineContext.large;return{progress:function(n,i){var o=[];if(a){var s=void 0,l=n.end-n.start;if(t){for(var u=0,f=n.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var h=t.get("clip",!0)&&Cl(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,a,n){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},e.prototype.incrementalRender=function(t,a,n){this._lineDraw.incrementalUpdate(t,a.getData()),this._finished=t.end===a.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,a,n){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=mI.reset(t,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},e.prototype._updateLineDraw=function(t,a){var n=this._lineDraw,i=this._showEffect(a),o=!!a.get("polyline"),s=a.pipelineContext,l=s.large;return(!n||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(n&&n.remove(),n=this._lineDraw=l?new P$:new Ry(o?i?M$:yI:i?gI:Py),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var a=t.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},e.prototype.dispose=function(t,a){this.remove(t,a)},e.type="lines",e}(Vt);const k$=E$;var O$=typeof Uint32Array>"u"?Array:Uint32Array,N$=typeof Float64Array>"u"?Array:Float64Array;function ox(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=G(e,function(t){var a=[t[0].coord,t[1].coord],n={coords:a};return t[0].name&&(n.fromName=t[0].name),t[1].name&&(n.toName=t[1].name),og([n,t[0],t[1]])}))}var V$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],ox(t);var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if(ox(t),t.data){var a=this._processFlatCoordsArray(t.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(t.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var a=this._processFlatCoordsArray(t.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=lf(this._flatCoords,a.flatCoords),this._flatCoordsOffset=lf(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),t.data=new Float32Array(a.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var a=this.getData().getItemModel(t),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),a=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&a>0?a+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e}(Gt);const B$=V$;function Mu(r){return r instanceof Array||(r=[r,r]),r}var z$={seriesType:"lines",reset:function(r){var e=Mu(r.get("symbol")),t=Mu(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",e&&e[0]),a.setVisual("toSymbol",e&&e[1]),a.setVisual("fromSymbolSize",t&&t[0]),a.setVisual("toSymbolSize",t&&t[1]);function n(i,o){var s=i.getItemModel(o),l=Mu(s.getShallow("symbol",!0)),u=Mu(s.getShallow("symbolSize",!0));l[0]&&i.setItemVisual(o,"fromSymbol",l[0]),l[1]&&i.setItemVisual(o,"toSymbol",l[1]),u[0]&&i.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&i.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:a.hasItemOption?n:null}}};const G$=z$;function F$(r){r.registerChartView(k$),r.registerSeriesModel(B$),r.registerLayout(mI),r.registerVisual(G$)}var H$=256,W$=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ua.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,h=this.canvas,v=h.getContext("2d"),c=e.length;h.width=t,h.height=a;for(var p=0;p0){var I=o(_)?l:u;_>0&&(_=_*M+T),b[x++]=I[D],b[x++]=I[D+1],b[x++]=I[D+2],b[x++]=I[D+3]*_*256}else x+=4}return v.putImageData(S,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ua.createCanvas()),t=this.pointSize+this.blurSize,a=t*2;e.width=a,e.height=a;var n=e.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor="#000",n.beginPath(),n.arc(-t,t,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),e},r.prototype._getGradient=function(e,t){for(var a=this._gradientPixels,n=a[t]||(a[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();const $$=W$;function U$(r,e,t){var a=r[1]-r[0];e=G(e,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&a<=e[1]}}function sx(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Z$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,n,0,t.getData().count()):sx(o)&&this._renderOnGeo(o,t,i,n)},e.prototype.incrementalPrepareRender=function(t,a,n){this.group.removeAll()},e.prototype.incrementalRender=function(t,a,n,i){var o=a.coordinateSystem;o&&(sx(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(a,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){nn(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,a,n,i,o){var s=t.coordinateSystem,l=xi(s,"cartesian2d"),u,f,h,v;if(l){var c=s.getAxis("x"),p=s.getAxis("y");u=c.getBandWidth()+.5,f=p.getBandWidth()+.5,h=c.scale.getExtent(),v=p.scale.getExtent()}for(var d=this.group,g=t.getData(),y=t.getModel(["emphasis","itemStyle"]).getItemStyle(),m=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),S=t.get(["itemStyle","borderRadius"]),b=re(t),x=t.getModel("emphasis"),w=x.get("focus"),T=x.get("blurScope"),A=x.get("disabled"),M=l?[g.mapDimension("x"),g.mapDimension("y"),g.mapDimension("value")]:[g.mapDimension("time"),g.mapDimension("value")],D=n;Dh[1]||Rv[1])continue;var E=s.dataToPoint([P,R]);I=new wt({shape:{x:E[0]-u/2,y:E[1]-f/2,width:u,height:f},style:L})}else{if(isNaN(g.get(M[1],D)))continue;I=new wt({z2:1,shape:s.dataToRect([g.get(M[0],D)]).contentShape,style:L})}if(g.hasItemOption){var N=g.getItemModel(D),O=N.getModel("emphasis");y=O.getModel("itemStyle").getItemStyle(),m=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),S=N.get(["itemStyle","borderRadius"]),w=O.get("focus"),T=O.get("blurScope"),A=O.get("disabled"),b=re(N)}I.shape.r=S;var V=t.getRawValue(D),F="-";V&&V[2]!=null&&(F=V[2]+""),ce(I,b,{labelFetcher:t,labelDataIndex:D,defaultOpacity:L.opacity,defaultText:F}),I.ensureState("emphasis").style=y,I.ensureState("blur").style=m,I.ensureState("select").style=_,Ht(I,w,T,A),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),d.add(I),g.setItemGraphicEl(D,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new $$;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var f=t.getViewRect().clone(),h=t.getRoamTransform();f.applyTransform(h);var v=Math.max(f.x,0),c=Math.max(f.y,0),p=Math.min(f.width+f.x,i.getWidth()),d=Math.min(f.height+f.y,i.getHeight()),g=p-v,y=d-c,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,A){var M=t.dataToPoint([w,T]);return M[0]-=v,M[1]-=c,M.push(A),M}),S=n.getExtent(),b=n.type==="visualMap.continuous"?Y$(S,n.option.range):U$(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new pe({style:{width:g,height:y,x:v,y:c,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e}(Vt);const X$=Z$;var q$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,a){return ma(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Sl.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(Gt);const K$=q$;function j$(r){r.registerChartView(X$),r.registerSeriesModel(K$)}var Q$=["itemStyle","borderWidth"],lx=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],Gc=new an,J$=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),h=l.master.getRect(),v={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:f,valueDim:lx[+f],categoryDim:lx[1-+f]};o.diff(s).add(function(p){if(!!o.hasValue(p)){var d=fx(o,p),g=ux(o,p,d,v),y=hx(o,v,g);o.setItemGraphicEl(p,y),i.add(y),cx(y,v,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=fx(o,p),m=ux(o,p,y,v),_=TI(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?o6(g,v,m):g=hx(o,v,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),cx(g,v,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&vx(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var c=t.get("clip",!0)?Cl(t.coordinateSystem,!1,t):null;return c?i.setClipPath(c):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,a){var n=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){vx(i,it(o).dataIndex,t,o)}):n.removeAll()},e.type="pictorialBar",e}(Vt);function ux(r,e,t,a){var n=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),v={dataIndex:e,layout:n,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};t6(t,i,n,a,v),e6(r,e,n,i,o,v.boundingLength,v.pxSign,f,a,v),r6(t,v.symbolScale,u,a,v);var c=v.symbolSize,p=_i(t.get("symbolOffset"),c);return a6(t,c,n,i,o,p,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function t6(r,e,t,a,n){var i=a.valueDim,o=r.get("symbolBoundingData"),s=a.coordSys.getOtherAxis(a.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),f;if(z(o)){var h=[Fc(s,o[0])-l,Fc(s,o[1])-l];h[1]0?1:-1}function Fc(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function e6(r,e,t,a,n,i,o,s,l,u){var f=l.valueDim,h=l.categoryDim,v=Math.abs(t[h.wh]),c=r.getItemVisual(e,"symbolSize"),p;z(c)?p=c.slice():c==null?p=["100%","100%"]:p=[c,c],p[h.index]=W(p[h.index],v),p[f.index]=W(p[f.index],a?v:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function r6(r,e,t,a,n){var i=r.get(Q$)||0;i&&(Gc.attr({scaleX:e[0],scaleY:e[1],rotation:t}),Gc.updateTransform(),i/=Gc.getLineScale(),i*=e[a.valueDim.index]),n.valueLineWidth=i||0}function a6(r,e,t,a,n,i,o,s,l,u,f,h){var v=f.categoryDim,c=f.valueDim,p=h.pxSign,d=Math.max(e[c.index]+s,0),g=d;if(a){var y=Math.abs(l),m=oe(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=W(m,e[c.index]),b=Math.max(d+S*2,0),x=_?0:S*2,w=sT(a),T=w?a:px((y+x)/b),A=y-T*d;S=A/2/(_?T:Math.max(T-1,1)),b=d+S*2,x=_?0:S*2,!w&&a!=="fixed"&&(T=u?px((Math.abs(u)+x)/b):0),g=T*b-x,h.repeatTimes=T,h.symbolMargin=S}var M=p*(g/2),D=h.pathPosition=[];D[v.index]=t[v.wh]/2,D[c.index]=o==="start"?M:o==="end"?l-M:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var I=h.bundlePosition=[];I[v.index]=t[v.xy],I[c.index]=t[c.xy];var L=h.barRectShape=B({},t);L[c.wh]=p*Math.max(Math.abs(t[c.wh]),Math.abs(D[c.index]+M)),L[v.wh]=t[v.wh];var P=h.clipShape={};P[v.xy]=-t[v.xy],P[v.wh]=f.ecSize[v.wh],P[c.xy]=0,P[c.wh]=t[c.wh]}function _I(r){var e=r.symbolPatternSize,t=Kt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function SI(r,e,t,a){var n=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,h=i[e.valueDim.index]+o+t.symbolMargin*2;for(Gy(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=h*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function xI(r,e,t,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?oo(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,a):(i=r.__pictorialMainPath=_I(t),n.add(i),oo(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,a))}function bI(r,e,t){var a=B({},e.barRectShape),n=r.__pictorialBarRect;n?oo(n,null,{shape:a},e,t):(n=r.__pictorialBarRect=new wt({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function wI(r,e,t,a){if(t.symbolClip){var n=r.__pictorialClipPath,i=B({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(n)Dt(n,{shape:i},s,l);else{i[o.wh]=0,n=new wt({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=t.clipShape[o.wh],yi[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function fx(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=n6,t.isAnimationEnabled=i6,t}function n6(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function i6(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function hx(r,e,t,a){var n=new nt,i=new nt;return n.add(i),n.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?SI(n,e,t):xI(n,e,t),bI(n,t,a),wI(n,e,t,a),n.__pictorialShapeStr=TI(r,t),n.__pictorialSymbolMeta=t,n}function o6(r,e,t){var a=t.animationModel,n=t.dataIndex,i=r.__pictorialBundle;Dt(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},a,n),t.symbolRepeat?SI(r,e,t,!0):xI(r,e,t,!0),bI(r,t,!0),wI(r,e,t,!0)}function vx(r,e,t,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];Gy(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(t=null),C(i,function(o){Ka(o,{scaleX:0,scaleY:0},t,e,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(e,null)}function TI(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function Gy(r,e,t){C(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&e.call(t,a)})}function oo(r,e,t,a,n,i){e&&r.attr(e),a.symbolClip&&!n?t&&r.attr(t):t&&yi[n?"updateProps":"initProps"](r,t,a.animationModel,a.dataIndex,i)}function cx(r,e,t){var a=t.dataIndex,n=t.itemModel,i=n.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=n.getModel(["blur","itemStyle"]).getItemStyle(),l=n.getModel(["select","itemStyle"]).getItemStyle(),u=n.getShallow("cursor"),f=i.get("focus"),h=i.get("blurScope"),v=i.get("scale");Gy(r,function(d){if(d instanceof pe){var g=d.style;d.useStyle(B({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,v&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var c=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,ce(p,re(n),{labelFetcher:e.seriesModel,labelDataIndex:a,defaultText:vo(e.seriesModel.getData(),a),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:c}),Ht(r,f,h,i.get("disabled"))}function px(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}const s6=J$;var l6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=on(Nf.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(Nf);const u6=l6;function f6(r){r.registerChartView(s6),r.registerSeriesModel(u6),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,st(rM,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,aM("pictorialBar"))}var h6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,a,n){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,h=u.boundaryGap;s.x=0,s.y=f.y+h[0];function v(g){return g.name}var c=new pa(this._layersSeries||[],l,v,v),p=[];c.add(Y(d,this,"add")).update(Y(d,this,"update")).remove(Y(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],b=[],x,w=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=h)}return{y0:n,max:i}}function m6(r){r.registerChartView(c6),r.registerSeriesModel(d6),r.registerLayout(g6),r.registerProcessor(Dl("themeRiver"))}var _6=2,S6=4,x6=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this)||this;o.z2=_6,o.textConfig={inside:!0},it(o).seriesIndex=a.seriesIndex;var s=new Ct({z2:S6,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,a,n,i),o}return e.prototype.updateData=function(t,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;it(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),f=a.getLayout(),h=B({},f);h.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var c=a.getVisual("decal");c&&(v.decal=fo(c,o));var p=jn(l.getModel("itemStyle"),h,!0);B(h,p),C(Ie,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=jn(S,h);b&&(_.shape=b)}),t?(s.setShape(h),s.shape.r=f.r0,Bt(s,{shape:{r:f.r}},n,a.dataIndex)):(Dt(s,{shape:h},n),wr(s)),s.useStyle(v),this._updateLabel(n);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;Ht(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var a=this,n=this.node.getModel(),i=n.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),h=this,v=h.getTextContent(),c=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)P&&!Ws(E-P)&&E0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,a,n):(o.virtualPiece=new gx(m,t,a,n),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";wf(u,f)}}n=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:Nd,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e}(Vt);const A6=T6;var C6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,a){var n={name:t.name,children:t.data};AI(n);var i=this._levelModels=G(t.levels||[],function(l){return new Nt(l,this,a)},this),o=Ty.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var h=o.getNodeByDataIndex(f),v=i[h.depth];return v&&(u.parentModel=v),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(t);return a.treePathInfo=Vh(n,this),a},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var a=this.getRawData().tree.root;(!t||t!==a&&!a.contains(t))&&(this._viewRoot=a)},e.prototype.enableAriaDecal=function(){ID(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e}(Gt);function AI(r){var e=0;C(r.children,function(a){AI(a);var n=a.value;z(n)&&(n=n[0]),e+=n});var t=r.value;z(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),z(r.value)?r.value[0]=t:r.value=t}const M6=C6;var mx=Math.PI/180;function D6(r,e,t){e.eachSeriesByType(r,function(a){var n=a.get("center"),i=a.get("radius");z(i)||(i=[0,i]),z(n)||(n=[n,n]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=W(n[0],o),f=W(n[1],s),h=W(i[0],l/2),v=W(i[1],l/2),c=-a.get("startAngle")*mx,p=a.get("minAngle")*mx,d=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&CI(g,m);var _=0;C(g.children,function(E){!isNaN(E.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(v-h)/(w||1),A=a.get("clockwise"),M=a.get("stillShowZeroSum"),D=A?1:-1,I=function(E,N){if(!!E){var O=N;if(E!==d){var V=E.getValue(),F=S===0&&M?b:V*b;F1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",e);return a.depth>1&&$(s)&&(s=Cp(s,(a.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(a){var n=a.getData(),i=n.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");B(u,l)})})}function P6(r){r.registerChartView(A6),r.registerSeriesModel(M6),r.registerLayout(st(D6,"sunburst")),r.registerProcessor(st(Dl,"sunburst")),r.registerVisual(L6),w6(r)}var _x={color:"fill",borderColor:"stroke"},R6={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},sa=xt(),E6=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,a){return ma(null,this)},e.prototype.getDataParams=function(t,a,n){var i=r.prototype.getDataParams.call(this,t,a);return n&&(i.info=sa(n).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(Gt);const k6=E6;function O6(r,e){return e=e||[0,0],G(["x","y"],function(t,a){var n=this.getAxis(t),i=e[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function N6(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Y(O6,r)}}}function V6(r,e){return e=e||[0,0],G([0,1],function(t){var a=e[t],n=r[t]/2,i=[],o=[];return i[t]=a-n,o[t]=a+n,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function B6(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:Y(V6,r)}}}function z6(r,e){var t=this.getAxis(),a=e instanceof Array?e[0]:e,n=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(a-n)-t.dataToCoord(a+n))}function G6(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:Y(z6,r)}}}function F6(r,e){return e=e||[0,0],G(["Radius","Angle"],function(t,a){var n="get"+t+"Axis",i=this[n](),o=e[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function H6(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),a=e.getExtent();return a[0]>a[1]&&a.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:a[1],r0:a[0]},api:{coord:function(n){var i=e.dataToRadius(n[0]),o=t.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:Y(F6,r)}}}function W6(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)}}}}function MI(r,e,t,a){return r&&(r.legacy||r.legacy!==!1&&!t&&!a&&e!=="tspan"&&(e==="text"||Z(r,"text")))}function DI(r,e,t){var a=r,n,i,o;if(e==="text")o=a;else{o={},Z(a,"text")&&(o.text=a.text),Z(a,"rich")&&(o.rich=a.rich),Z(a,"textFill")&&(o.fill=a.textFill),Z(a,"textStroke")&&(o.stroke=a.textStroke),Z(a,"fontFamily")&&(o.fontFamily=a.fontFamily),Z(a,"fontSize")&&(o.fontSize=a.fontSize),Z(a,"fontStyle")&&(o.fontStyle=a.fontStyle),Z(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=Z(a,"textPosition");t?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),Z(a,"textPosition")&&(n.position=a.textPosition),Z(a,"textOffset")&&(n.offset=a.textOffset),Z(a,"textRotation")&&(n.rotation=a.textRotation),Z(a,"textDistance")&&(n.distance=a.textDistance)}return Sx(o,r),C(o.rich,function(l){Sx(l,l)}),{textConfig:n,textContent:i}}function Sx(r,e){!e||(e.font=e.textFont||e.font,Z(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Z(e,"textAlign")&&(r.align=e.textAlign),Z(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Z(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Z(e,"textWidth")&&(r.width=e.textWidth),Z(e,"textHeight")&&(r.height=e.textHeight),Z(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Z(e,"textPadding")&&(r.padding=e.textPadding),Z(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Z(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Z(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Z(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Z(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Z(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Z(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function xx(r,e,t){var a=r;a.textPosition=a.textPosition||t.position||"inside",t.offset!=null&&(a.textOffset=t.offset),t.rotation!=null&&(a.textRotation=t.rotation),t.distance!=null&&(a.textDistance=t.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||"#000";bx(a,e);var o=a.textFill==null;return n?o&&(a.textFill=t.insideFill||"#fff",!a.textStroke&&t.insideStroke&&(a.textStroke=t.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||t.outsideFill||"#000"),!a.textStroke&&t.outsideStroke&&(a.textStroke=t.outsideStroke)),a.text=e.text,a.rich=e.rich,C(e.rich,function(s){bx(s,s)}),a}function bx(r,e){!e||(Z(e,"fill")&&(r.textFill=e.fill),Z(e,"stroke")&&(r.textStroke=e.fill),Z(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Z(e,"font")&&(r.font=e.font),Z(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Z(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Z(e,"fontSize")&&(r.fontSize=e.fontSize),Z(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Z(e,"align")&&(r.textAlign=e.align),Z(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Z(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Z(e,"width")&&(r.textWidth=e.width),Z(e,"height")&&(r.textHeight=e.height),Z(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Z(e,"padding")&&(r.textPadding=e.padding),Z(e,"borderColor")&&(r.textBorderColor=e.borderColor),Z(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Z(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Z(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Z(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Z(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Z(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Z(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Z(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Z(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Z(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var II={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},Tx=_t(II);Wr(Ur,function(r,e){return r[e]=1,r},{});Ur.join(", ");var $f=["","style","shape","extra"],go=xt();function Fy(r,e,t,a,n){var i=r+"Animation",o=wo(r,a,n)||{},s=go(e).userDuring;return o.duration>0&&(o.during=s?Y(X6,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),B(o,t[i]),o}function tf(r,e,t,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=t.isAnimationEnabled(),l=go(r),u=e.style;l.userDuring=e.during;var f={},h={};if(K6(r,e,h),Cx("shape",e,h),Cx("extra",e,h),!i&&s&&(q6(r,e,f),Ax("shape",r,e,f),Ax("extra",r,e,f),j6(r,e,u,f)),h.style=u,$6(r,h,o),Y6(r,e),s)if(i){var v={};C($f,function(p){var d=p?e[p]:e;d&&d.enterFrom&&(p&&(v[p]=v[p]||{}),B(p?v[p]:v,d.enterFrom))});var c=Fy("enter",r,e,t,n);c.duration>0&&r.animateFrom(v,c)}else U6(r,e,n||0,t,f);LI(r,e),u?r.dirty():r.markRedraw()}function LI(r,e){for(var t=go(r).leaveToProps,a=0;a<$f.length;a++){var n=$f[a],i=n?e[n]:e;i&&i.leaveTo&&(t||(t=go(r).leaveToProps={}),n&&(t[n]=t[n]||{}),B(n?t[n]:t,i.leaveTo))}}function Gh(r,e,t,a){if(r){var n=r.parent,i=go(r).leaveToProps;if(i){var o=Fy("update",r,e,t,0);o.done=function(){n.remove(r),a&&a()},r.animateTo(i,o)}else n.remove(r),a&&a()}}function si(r){return r==="all"}function $6(r,e,t){var a=e.style;if(!r.isGroup&&a){if(t){r.useStyle({});for(var n=r.animators,i=0;i0&&r.animateFrom(n,i)}}function Y6(r,e){Z(e,"silent")&&(r.silent=e.silent),Z(e,"ignore")&&(r.ignore=e.ignore),r instanceof lr&&Z(e,"invisible")&&(r.invisible=e.invisible),r instanceof mt&&Z(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Pr={},Z6={setTransform:function(r,e){return Pr.el[r]=e,this},getTransform:function(r){return Pr.el[r]},setShape:function(r,e){var t=Pr.el,a=t.shape||(t.shape={});return a[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Pr.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Pr.el,a=t.style;return a&&(a[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Pr.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Pr.el.extra||(Pr.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Pr.el.extra;if(e)return e[r]}};function X6(){var r=this,e=r.el;if(!!e){var t=go(e).userDuring,a=r.userDuring;if(t!==a){r.el=r.userDuring=null;return}Pr.el=e,a(Z6)}}function Ax(r,e,t,a){var n=t[r];if(!!n){var i=e[r],o;if(i){var s=t.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),si(l))B(o,i);else for(var u=Rt(l),f=0;f=0){!o&&(o=a[r]={});for(var c=_t(i),f=0;f=0)){var v=r.getAnimationStyleProps(),c=v?v.style:null;if(c){!i&&(i=a.style={});for(var p=_t(t),u=0;u=0?e.getStore().get(N,R):void 0}var O=e.get(E.name,R),V=E&&E.ordinalMeta;return V?V.categories[O]:O}function x(P,R){R==null&&(R=u);var E=e.getItemVisual(R,"style"),N=E&&E.fill,O=E&&E.opacity,V=m(R,Ha).getItemStyle();N!=null&&(V.fill=N),O!=null&&(V.opacity=O);var F={inheritColor:$(N)?N:"#000"},H=_(R,Ha),U=Ot(H,null,F,!1,!0);U.text=H.getShallow("show")?ot(r.getFormattedLabel(R,Ha),vo(e,R)):null;var K=xf(H,F,!1);return A(P,V),V=xx(V,U,K),P&&T(V,P),V.legacy=!0,V}function w(P,R){R==null&&(R=u);var E=m(R,la).getItemStyle(),N=_(R,la),O=Ot(N,null,null,!0,!0);O.text=N.getShallow("show")?Fr(r.getFormattedLabel(R,la),r.getFormattedLabel(R,Ha),vo(e,R)):null;var V=xf(N,null,!0);return A(P,E),E=xx(E,O,V),P&&T(E,P),E.legacy=!0,E}function T(P,R){for(var E in R)Z(R,E)&&(P[E]=R[E])}function A(P,R){P&&(P.textFill&&(R.textFill=P.textFill),P.textPosition&&(R.textPosition=P.textPosition))}function M(P,R){if(R==null&&(R=u),Z(_x,P)){var E=e.getItemVisual(R,"style");return E?E[_x[P]]:null}if(Z(R6,P))return e.getItemVisual(R,P)}function D(P){if(i.type==="cartesian2d"){var R=i.getBaseAxis();return lB(tt({axis:R},P))}}function I(){return t.getCurrentSeriesIndices()}function L(P){return Eg(P,t)}}function lU(r){var e={};return C(r.dimensions,function(t){var a=r.getDimensionInfo(t);if(!a.isExtraCoord){var n=a.coordDim,i=e[n]=e[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(t)}}),e}function Uc(r,e,t,a,n,i,o){if(!a){i.remove(e);return}var s=Yy(r,e,t,a,n,i);return s&&o.setItemGraphicEl(t,s),s&&Ht(s,a.focus,a.blurScope,a.emphasisDisabled),s}function Yy(r,e,t,a,n,i){var o=-1,s=e;e&&kI(e,a,n)&&(o=ct(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=$y(a),s&&aU(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),qe.normal.cfg=qe.normal.conOpt=qe.emphasis.cfg=qe.emphasis.conOpt=qe.blur.cfg=qe.blur.conOpt=qe.select.cfg=qe.select.conOpt=null,qe.isLegacy=!1,fU(u,t,a,n,l,qe),uU(u,t,a,n,l),Uy(r,u,t,a,qe,n,l),Z(a,"info")&&(sa(u).info=a.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function kI(r,e,t){var a=sa(r),n=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&dU(i)&&OI(i)!==a.customPathData||n==="image"&&Z(o,"image")&&o.image!==a.customImagePath}function uU(r,e,t,a,n){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&kI(o,i,a)&&(o=null),o||(o=$y(i),r.setClipPath(o)),Uy(null,o,e,i,null,a,n)}}function fU(r,e,t,a,n,i){if(!r.isGroup){Dx(t,null,i),Dx(t,la,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=$y(o),r.setTextContent(f)),Uy(null,f,e,o,null,a,n);for(var h=o&&o.style,v=0;v=f;c--){var p=e.childAt(c);vU(e,p,n)}}}function vU(r,e,t){e&&Gh(e,sa(r).option,t)}function cU(r){new pa(r.oldChildren,r.newChildren,Ix,Ix,r).add(Lx).update(Lx).remove(pU).execute()}function Ix(r,e){var t=r&&r.name;return t!=null?t:eU+e}function Lx(r,e){var t=this.context,a=r!=null?t.newChildren[r]:null,n=e!=null?t.oldChildren[e]:null;Yy(t.api,n,t.dataIndex,a,t.seriesModel,t.group)}function pU(r){var e=this.context,t=e.oldChildren[r];t&&Gh(t,sa(t).option,e.seriesModel)}function OI(r){return r&&(r.pathData||r.d)}function dU(r){return r&&(Z(r,"pathData")||Z(r,"d"))}function gU(r){r.registerChartView(iU),r.registerSeriesModel(k6)}var Gn=xt(),Px=rt,Yc=Y,yU=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,a,n){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=a,!(!n&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,a);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=f;var h=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new nt,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),a.getZr().add(s);else{var v=st(Rx,t,h);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}kx(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var a=t.get("animation"),n=e.axis,i=n.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(a==="auto"||a==null){var s=this.animationThreshold;if(i&&n.getBandWidth()>s)return!0;if(o){var l=yy(e).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(e,t,a,n,i){},r.prototype.createPointerEl=function(e,t,a,n){var i=t.pointer;if(i){var o=Gn(e).pointerEl=new yi[i.type](Px(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,a,n){if(t.label){var i=Gn(e).labelEl=new Ct(Px(t.label));e.add(i),Ex(i,n)}},r.prototype.updatePointerEl=function(e,t,a){var n=Gn(e).pointerEl;n&&t.pointer&&(n.setStyle(t.pointer.style),a(n,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,a,n){var i=Gn(e).labelEl;i&&(i.setStyle(t.label.style),a(i,{x:t.label.x,y:t.label.y}),Ex(i,n))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){n&&a.remove(n),this._handle=null;return}var s;this._handle||(s=!0,n=this._handle=_l(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){fa(u.event)},onmousedown:Yc(this._onHandleDragMove,this,0,0),drift:Yc(this._onHandleDragMove,this),ondragend:Yc(this._onHandleDragEnd,this)}),a.add(n)),kx(n,t,!1),n.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");z(l)||(l=[l,l]),n.scaleX=l[0]/2,n.scaleY=l[1]/2,Ro(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){Rx(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Zc(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var a=this._handle;if(!!a){this._dragging=!0;var n=this.updateHandleTransform(Zc(a),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(Zc(n)),Gn(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(!!e){var t=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(!!e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),a=this._group,n=this._handle;t&&a&&(this._lastGraphicKey=null,a&&t.remove(a),n&&t.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),Qs(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,a){return a=a||0,{x:e[a],y:e[1-a],width:t[a],height:t[1-a]}},r}();function Rx(r,e,t,a){NI(Gn(t).lastProp,a)||(Gn(t).lastProp=a,e?Dt(t,a,r):(t.stopAnimation(),t.attr(a)))}function NI(r,e){if(et(r)&&et(e)){var t=!0;return C(e,function(a,n){t=t&&NI(r[n],a)}),!!t}else return r===e}function Ex(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Zc(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function kx(r,e,t){var a=e.get("z"),n=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=t)})}const Xy=yU;function qy(r){var e=r.get("type"),t=r.getModel(e+"Style"),a;return e==="line"?(a=t.getLineStyle(),a.fill=null):e==="shadow"&&(a=t.getAreaStyle(),a.stroke=null),a}function VI(r,e,t,a,n){var i=t.get("value"),o=BI(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Mo(s.get("padding")||0),u=s.getFont(),f=pl(o,u),h=n.position,v=f.width+l[1]+l[3],c=f.height+l[0]+l[2],p=n.align;p==="right"&&(h[0]-=v),p==="center"&&(h[0]-=v/2);var d=n.verticalAlign;d==="bottom"&&(h[1]-=c),d==="middle"&&(h[1]-=c/2),mU(h,v,c,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:Ot(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function mU(r,e,t,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+e,n)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function BI(r,e,t,a,n){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:sy(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};C(a,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,h=u&&u.getDataParams(f);h&&s.seriesData.push(h)}),$(o)?i=o.replace("{value}",i):j(o)&&(i=o(s))}return i}function Ky(r,e,t){var a=We();return gi(a,a,t.rotation),$r(a,a,t.position),xr([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],a)}function zI(r,e,t,a,n,i){var o=da.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=n.get(["label","margin"]),VI(e,a,n,i,{position:Ky(a.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function jy(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function GI(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function Ox(r,e,t,a,n,i){return{cx:r,cy:e,r0:t,r:a,startAngle:n,endAngle:i,clockwise:!0}}var _U=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),f=Nx(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=qy(i),c=SU[u](s,h,f);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=Sd(l.model,n);zI(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Sd(a.axis.grid.model,a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Ky(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=Nx(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,h=[t.x,t.y];h[f]+=a[f],h[f]=Math.min(l[1],h[f]),h[f]=Math.max(l[0],h[f]);var v=(u[1]+u[0])/2,c=[v,v];c[f]=h[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:c,tooltipOption:p[f]}},e}(Xy);function Nx(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var SU={line:function(r,e,t){var a=jy([e,t[0]],[e,t[1]],Vx(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=Math.max(1,r.getBandWidth()),n=t[1]-t[0];return{type:"Rect",shape:GI([e-a/2,t[0]],[a,n],Vx(r))}}};function Vx(r){return r.dim==="x"?0:1}const xU=_U;var bU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Tt);const wU=bU;var aa=xt(),TU=C;function FI(r,e,t){if(!At.node){var a=e.getZr();aa(a).records||(aa(a).records={}),AU(a,e);var n=aa(a).records[r]||(aa(a).records[r]={});n.handler=t}}function AU(r,e){if(aa(r).initialized)return;aa(r).initialized=!0,t("click",st(Bx,"click")),t("mousemove",st(Bx,"mousemove")),t("globalout",MU);function t(a,n){r.on(a,function(i){var o=DU(e);TU(aa(r).records,function(s){s&&n(s,i,o.dispatchAction)}),CU(o.pendings,e)})}}function CU(r,e){var t=r.showTip.length,a=r.hideTip.length,n;t?n=r.showTip[t-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,e.dispatchAction(n))}function MU(r,e,t){r.handler("leave",null,t)}function Bx(r,e,t,a){e.handler(r,t,a)}function DU(r){var e={showTip:[],hideTip:[]},t=function(a){var n=e[a.type];n?n.push(a):(a.dispatchAction=t,r.dispatchAction(a))};return{dispatchAction:t,pendings:e}}function zd(r,e){if(!At.node){var t=e.getZr(),a=(aa(t).records||{})[r];a&&(aa(t).records[r]=null)}}var IU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=a.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";FI("axisPointer",n,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,a){zd("axisPointer",a)},e.prototype.dispose=function(t,a){zd("axisPointer",a)},e.type="axisPointer",e}(Wt);const LU=IU;function HI(r,e){var t=[],a=r.seriesIndex,n;if(a==null||!(n=e.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=ui(i,r);if(o==null||o<0||z(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)t=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),h=f.dim,v=u.dim,c=h==="x"||h==="radius"?1:0,p=i.mapDimension(v),d=[];d[c]=i.get(p,o),d[1-c]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues(G(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var zx=xt();function PU(r,e,t){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||Y(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(!!s){ef(n)&&(n=HI({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=ef(n),u=i.axesInfo,f=s.axesInfo,h=a==="leave"||ef(n),v={},c={},p={list:[],map:{}},d={showPointer:st(EU,c),showTooltip:st(kU,p)};C(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);C(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=BU(u,S);if(!h&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(n)),T!=null&&Gx(S,T,d,!1,v)}})});var g={};return C(f,function(y,m){var _=y.linkGroup;_&&!c[m]&&C(_.axesInfo,function(S,b){var x=c[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,Fx(S),Fx(y)))),g[y.key]=w}})}),C(g,function(y,m){Gx(f[m],y,d,!0,v)}),OU(c,f,v),NU(p,n,r,o),VU(f,o,t),v}}function Gx(r,e,t,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=RU(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&B(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function RU(r,e){var t=e.axis,a=t.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return C(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(a),h,v;if(l.getAxisTooltipData){var c=l.getAxisTooltipData(f,r,t);v=c.dataIndices,h=c.nestestValue}else{if(v=l.getData().indicesOfNearest(f[0],r,t.type==="category"?.5:null),!v.length)return;h=l.getData().get(f[0],v[0])}if(!(h==null||!isFinite(h))){var p=r-h,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,n=h,i.length=0),C(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function EU(r,e,t,a){r[e.key]={value:t,payloadBatch:a}}function kU(r,e,t,a){var n=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!n.length)){var l=e.coordSys.model,u=nl(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:a,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:n.slice()})}}function OU(r,e,t){var a=t.axesInfo=[];C(e,function(n,i){var o=n.axisPointerModel.option,s=r[i];s?(!n.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!n.useHandle&&(o.status="hide"),o.status==="show"&&a.push({axisDim:n.axis.dim,axisIndex:n.axis.model.componentIndex,value:o.value})})}function NU(r,e,t,a){if(ef(e)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function VU(r,e,t){var a=t.getZr(),n="axisPointerLastHighlights",i=zx(a)[n]||{},o=zx(a)[n]={};C(r,function(u,f){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&C(h.seriesDataIndices,function(v){var c=v.seriesIndex+" | "+v.dataIndex;o[c]=v})});var s=[],l=[];C(i,function(u,f){!o[f]&&l.push(u)}),C(o,function(u,f){!i[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function BU(r,e){for(var t=0;t<(r||[]).length;t++){var a=r[t];if(e.axis.dim===a.axisDim&&e.axis.model.componentIndex===a.axisIndex)return a}}function Fx(r){var e=r.axis.model,t={},a=t.axisDim=r.axis.dim;return t.axisIndex=t[a+"AxisIndex"]=e.componentIndex,t.axisName=t[a+"AxisName"]=e.name,t.axisId=t[a+"AxisId"]=e.id,t}function ef(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Rl(r){bi.registerAxisPointerClass("CartesianAxisPointer",xU),r.registerComponentModel(wU),r.registerComponentView(LU),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!z(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=AG(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},PU)}function zU(r){yt(pD),yt(Rl)}var GU=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),h=s.dataToCoord(a),v=i.get("type");if(v&&v!=="none"){var c=qy(i),p=HU[v](s,l,h,f);p.style=c,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=FU(a,n,i,l,d);VI(t,n,i,o,g)},e}(Xy);function FU(r,e,t,a,n){var i=e.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,f,h;if(i.dim==="radius"){var v=We();gi(v,v,s),$r(v,v,[a.cx,a.cy]),u=xr([o,-n],v);var c=e.getModel("axisLabel").get("rotate")||0,p=da.innerTextLayout(s,c*Math.PI/180,-1);f=p.textAlign,h=p.textVerticalAlign}else{var d=l[1];u=a.coordToPoint([d+n,o]);var g=a.cx,y=a.cy;f=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",h=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:h}}var HU={line:function(r,e,t,a){return r.dim==="angle"?{type:"Line",shape:jy(e.coordToPoint([a[0],t]),e.coordToPoint([a[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:Ox(e.cx,e.cy,a[0],a[1],(-t-n/2)*i,(-t+n/2)*i)}:{type:"Sector",shape:Ox(e.cx,e.cy,t-n/2,t+n/2,0,Math.PI*2)}}};const WU=GU;var $U=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var a,n=this.ecModel;return n.eachComponent(t,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Tt);const UU=$U;var Qy=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",qt).models[0]},e.type="polarAxis",e}(Tt);jt(Qy,wl);var YU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(Qy),ZU=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(Qy),Jy=function(r){k(e,r);function e(t,a){return r.call(this,"radius",t,a)||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e}(Ar);Jy.prototype.dataToRadius=Ar.prototype.dataToCoord;Jy.prototype.radiusToData=Ar.prototype.coordToData;const XU=Jy;var qU=xt(),tm=function(r){k(e,r);function e(t,a){return r.call(this,"angle",t,a||[0,360])||this}return e.prototype.pointToData=function(t,a){return this.polar.pointToData(t,a)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,a=t.getLabelModel(),n=t.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=pl(s==null?"":s+"",a.getFont(),"center","top"),h=Math.max(f.height,7),v=h/u;isNaN(v)&&(v=1/0);var c=Math.max(0,Math.floor(v)),p=qU(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-c)<=1&&Math.abs(g-o)<=1&&d>c?c=d:(p.lastTickCount=o,p.lastAutoInterval=c),c},e}(Ar);tm.prototype.dataToAngle=Ar.prototype.dataToCoord;tm.prototype.angleToData=Ar.prototype.coordToData;const KU=tm;var WI=["radius","angle"],jU=function(){function r(e){this.dimensions=WI,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new XU,this._angleAxis=new KU,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===e&&t.push(a),n.scale.type===e&&t.push(n),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var a=this.pointToCoord(e);return[this._radiusAxis.radiusToData(a[0],t),this._angleAxis.angleToData(a[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,a=e[1]-this.cy,n=this.getAngleAxis(),i=n.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);n.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+a*a);t/=l,a/=l;for(var u=Math.atan2(-a,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],a=e[1]/180*Math.PI,n=Math.cos(a)*t+this.cx,i=-Math.sin(a)*t+this.cy;return[n,i]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),a=t.getExtent().slice();a[0]>a[1]&&a.reverse();var n=e.getExtent(),i=Math.PI/180;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:e.inverse,contain:function(o,s){var l=o-this.cx,u=s-this.cy,f=l*l+u*u-1e-4,h=this.r,v=this.r0;return f<=h*h&&f>=v*v}}},r.prototype.convertToPixel=function(e,t,a){var n=Hx(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Hx(t);return n===this?this.pointToData(a):null},r}();function Hx(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const QU=jU;function JU(r,e,t){var a=e.get("center"),n=t.getWidth(),i=t.getHeight();r.cx=W(a[0],n),r.cy=W(a[1],i);var o=r.getRadiusAxis(),s=Math.min(n,i)/2,l=e.get("radius");l==null?l=[0,"100%"]:z(l)||(l=[0,l]);var u=[W(l[0],s),W(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function t8(r,e){var t=this,a=t.getAngleAxis(),n=t.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();C(Rf(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),C(Rf(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),ho(a.scale,a.model),ho(n.scale,n.model),a.type==="category"&&!a.onBand){var i=a.getExtent(),o=360/a.scale.count();a.inverse?i[1]+=o:i[1]-=o,a.setExtent(i[0],i[1])}}function e8(r){return r.mainType==="angleAxis"}function Wx(r,e){var t;if(r.type=e.get("type"),r.scale=Eh(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),e8(e)){r.inverse=r.inverse!==e.get("clockwise");var a=e.get("startAngle"),n=(t=e.get("endAngle"))!==null&&t!==void 0?t:a+(r.inverse?-360:360);r.setExtent(a,n)}e.axis=r,r.model=e}var r8={dimensions:WI,create:function(r,e){var t=[];return r.eachComponent("polar",function(a,n){var i=new QU(n+"");i.update=t8;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");Wx(o,l),Wx(s,u),JU(i,a,e),t.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",qt).models[0];a.coordinateSystem=n.coordinateSystem}}),t}};const a8=r8;var n8=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Du(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var a=r.coordToPoint([e[0],t]),n=r.coordToPoint([e[1],t]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function Iu(r){var e=r.getRadiusAxis();return e.inverse?0:1}function $x(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var i8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,a){if(this.group.removeAll(),!!t.get("show")){var n=t.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords(),l=n.getMinorTicksCoords(),u=G(n.getViewLabels(),function(f){f=rt(f);var h=n.scale,v=h.type==="ordinal"?h.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=n.dataToCoord(v),f});$x(u),$x(s),C(n8,function(f){t.get([f,"show"])&&(!n.scale.isBlank()||f==="axisLine")&&o8[f](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e}(bi),o8={axisLine:function(r,e,t,a,n,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=Iu(t),h=f?0:1,v,c=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[h]===0?v=new yi[c]({shape:{cx:t.cx,cy:t.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new ph({shape:{cx:t.cx,cy:t.cy,r:i[f],r0:i[h]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,e,t,a,n,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[Iu(t)],u=G(a,function(f){return new se({shape:Du(t,[l,l+s],f.coord)})});r.add(nr(u,{style:tt(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,a,n,i){if(!!n.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[Iu(t)],f=[],h=0;hy?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];et(b)&&b.textStyle&&(c=new Nt(b.textStyle,l,l.ecModel))}var x=new Ct({silent:da.isLabelSilent(e),style:Ot(c,{x:g[0],y:g[1],fill:c.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),f){var w=da.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=h.rawLabel,it(x).eventData=w}},this)},splitLine:function(r,e,t,a,n,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],h=0;h=0?"p":"n",R=A;b&&(a[f][L]||(a[f][L]={p:A,n:A}),R=a[f][L][P]);var E=void 0,N=void 0,O=void 0,V=void 0;if(p.dim==="radius"){var F=p.dataToCoord(I)-A,H=l.dataToCoord(L);Math.abs(F)=V})}}})}function d8(r){var e={};C(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=UI(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),h=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=h.stacks;e[l]=h;var c=$I(a);v[c]||h.autoWidthCount++,v[c]=v[c]||{width:0,maxWidth:0};var p=W(a.get("barWidth"),f),d=W(a.get("barMaxWidth"),f),g=a.get("barGap"),y=a.get("barCategoryGap");p&&!v[c].width&&(p=Math.min(h.remainedWidth,p),v[c].width=p,h.remainedWidth-=p),d&&(v[c].maxWidth=d),g!=null&&(h.gap=g),y!=null&&(h.categoryGap=y)});var t={};return C(e,function(a,n){t[n]={};var i=a.stacks,o=a.bandWidth,s=W(a.categoryGap,o),l=W(a.gap,1),u=a.remainedWidth,f=a.autoWidthCount,h=(u-s)/(f+(f-1)*l);h=Math.max(h,0),C(i,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:a.contain(a.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),a=this.getRect(),n=[],i=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[i]=t.toGlobalCoord(t.dataToCoord(+e)),n[1-i]=i===0?a.y+a.height/2:a.x+a.width/2,n},r.prototype.convertToPixel=function(e,t,a){var n=Ux(t);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(e,t,a){var n=Ux(t);return n===this?this.pointToData(a):null},r}();function Ux(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function D8(r,e){var t=[];return r.eachComponent("singleAxis",function(a,n){var i=new M8(a,r,e);i.name="single_"+n,i.resize(a,e),a.coordinateSystem=i,t.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",qt).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),t}var I8={create:D8,dimensions:ZI};const L8=I8;var Yx=["x","y"],P8=["width","height"],R8=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=qc(l,1-Zf(s)),f=l.dataToPoint(a)[0],h=i.get("type");if(h&&h!=="none"){var v=qy(i),c=E8[h](s,f,u);c.style=v,t.graphicKey=c.type,t.pointer=c}var p=Gd(n);zI(a,t,p,n,i,o)},e.prototype.getHandleTransform=function(t,a,n){var i=Gd(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=Ky(a.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,a,n,i){var o=n.axis,s=o.coordinateSystem,l=Zf(o),u=qc(s,l),f=[t.x,t.y];f[l]+=a[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var h=qc(s,1-l),v=(h[1]+h[0])/2,c=[v,v];return c[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:c,tooltipOption:{verticalAlign:"middle"}}},e}(Xy),E8={line:function(r,e,t){var a=jy([e,t[0]],[e,t[1]],Zf(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,e,t){var a=r.getBandWidth(),n=t[1]-t[0];return{type:"Rect",shape:GI([e-a/2,t[0]],[a,n],Zf(r))}}};function Zf(r){return r.isHorizontal()?0:1}function qc(r,e){var t=r.getRect();return[t[Yx[e]],t[Yx[e]]+t[P8[e]]]}const k8=R8;var O8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(Wt);function N8(r){yt(Rl),bi.registerAxisPointerClass("SingleAxisPointer",k8),r.registerComponentView(O8),r.registerComponentView(T8),r.registerComponentModel(Xc),co(r,"single",Xc,Xc.defaultOption),r.registerCoordinateSystem("single",L8)}var V8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a,n){var i=Do(t);r.prototype.init.apply(this,arguments),Zx(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),Zx(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Tt);function Zx(r,e){var t=r.cellSize,a;z(t)?a=t:a=r.cellSize=[t,t],a.length===1&&(a[1]=a[0]);var n=G([0,1],function(i){return Hk(e,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});ja(r,e,{type:"box",ignoreSize:n})}const B8=V8;var z8=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,a,n){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToRect([u],!1).tl,h=new wt({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});n.add(h)}},e.prototype._renderLines=function(t,a,n,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=a.start,v=0;h.time<=a.end.time;v++){p(h.formatedDate),v===0&&(h=s.getDateInfo(a.start.y+"-"+a.start.m));var c=h.date;c.setMonth(c.getMonth()+1),h=s.getDateInfo(c)}p(s.getNextNDay(a.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToRect([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,n);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,n),l,i)},e.prototype._getEdgesPoints=function(t,a,n){var i=[t[0].slice(),t[t.length-1].slice()],o=n==="horizontal"?0:1;return i[0][o]=i[0][o]-a/2,i[1][o]=i[1][o]+a/2,i},e.prototype._drawSplitline=function(t,a,n){var i=new ze({z2:20,shape:{points:t},style:a});n.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,a,n){for(var i=t.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToRect([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[n==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,a){return $(t)&&t?zk(t,a):j(t)?t(a):a.nameMap},e.prototype._yearTextPositionControl=function(t,a,n,i,o){var s=a[0],l=a[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,a,n,i){var o=t.getModel("yearLabel");if(!!o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=n!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,v=n==="horizontal"?0:1,c={top:[f,u[v][1]],bottom:[f,u[1-v][1]],left:[u[1-v][0],h],right:[u[v][0],h]},p=a.start.y;+a.end.y>+a.start.y&&(p=p+"-"+a.end.y);var d=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new Ct({z2:30,style:Ot(o,{text:y})});m.attr(this._yearTextPositionControl(m,c[l],n,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,a,n,i,o){var s="left",l="top",u=t[0],f=t[1];return n==="horizontal"?(f=f+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,a,n,i){var o=t.getModel("monthLabel");if(!!o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||$(s))&&(s&&(a=Kp(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,c=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=f==="center",d=0;d=n.start.time&&a.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],a;t[0].time>t[1].time&&(a=!0,t.reverse());var n=Math.floor(t[1].time/Kc)-Math.floor(t[0].time/Kc)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)n-=u,i.setDate(l-u);var f=Math.floor((n+t[0].day+6)/7),h=a?-f+1:f-1;return a&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:n,weeks:f,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,a){var n=this._getRangeInfo(a);if(e>n.weeks||e===0&&tn.lweek)return null;var i=(e-1)*7-n.fweek+t,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var a=[];return e.eachComponent("calendar",function(n){var i=new r(n);a.push(i),n.coordinateSystem=i}),e.eachSeries(function(n){n.get("coordinateSystem")==="calendar"&&(n.coordinateSystem=a[n.get("calendarIndex")||0])}),a},r.dimensions=["time","value"],r}();function Xx(r){var e=r.calendarModel,t=r.seriesModel,a=e?e.coordinateSystem:t?t.coordinateSystem:null;return a}const H8=F8;function W8(r){r.registerComponentModel(B8),r.registerComponentView(G8),r.registerCoordinateSystem("calendar",H8)}function $8(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var a=e.parentOption;a?e.parentId=a.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function qx(r,e){var t;return C(e,function(a){r[a]!=null&&r[a]!=="auto"&&(t=!0)}),t}function U8(r,e,t){var a=B({},t),n=r[e],i=t.$action||"merge";i==="merge"?n?(ht(n,a,!0),ja(n,a,{ignoreSize:!0}),IA(t,n),Lu(t,n),Lu(t,n,"shape"),Lu(t,n,"style"),Lu(t,n,"extra"),t.clipPath=n.clipPath):r[e]=a:i==="replace"?r[e]=a:i==="remove"&&n&&(r[e]=null)}var XI=["transition","enterFrom","leaveTo"],Y8=XI.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Lu(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var a=t?XI:Y8,n=0;n=0;f--){var h=n[f],v=Qt(h.id,null),c=v!=null?o.get(v):null;if(!!c){var p=c.parent,y=tr(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=Th(c,h,m,null,{hv:h.hv,boundingMode:h.bounding},_);if(!tr(c).isNew&&S){for(var b=h.transition,x={},w=0;w=0)?x[T]=A:c[T]=A}Dt(c,x,t,0)}else c.attr(_)}}},e.prototype._clear=function(){var t=this,a=this._elMap;a.each(function(n){rf(n,tr(n).option,a,t._lastGraphicModel)}),this._elMap=X()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(Wt);function Fd(r){var e=Z(Kx,r)?Kx[r]:Rg(r),t=new e({});return tr(t).type=r,t}function jx(r,e,t,a){var n=Fd(t);return e.add(n),a.set(r,n),tr(n).id=r,tr(n).isNew=!0,n}function rf(r,e,t,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){rf(i,e,t,a)}),Gh(r,e,a),t.removeKey(tr(r).id))}function Qx(r,e,t,a){r.isGroup||C([["cursor",lr.prototype.cursor],["zlevel",a||0],["z",t||0],["z2",0]],function(n){var i=n[0];Z(e,i)?r[i]=ot(e[i],n[1]):r[i]==null&&(r[i]=n[1])}),C(_t(e),function(n){if(n.indexOf("on")===0){var i=e[n];r[n]=j(i)?i:null}}),Z(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function K8(r){return r=B({},r),C(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(DA),function(e){delete r[e]}),r}function j8(r,e,t){var a=it(r).eventData;!r.silent&&!r.ignore&&!a&&(a=it(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),a&&(a.info=t.info)}function Q8(r){r.registerComponentModel(X8),r.registerComponentView(q8),r.registerPreprocessor(function(e){var t=e.graphic;z(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var Jx=["x","y","radius","angle","single"],J8=["cartesian2d","polar","singleAxis"];function tY(r){var e=r.get("coordinateSystem");return ct(J8,e)>=0}function Wa(r){return r+"Axis"}function eY(r,e){var t=X(),a=[],n=X();r.eachComponent({mainType:"dataZoom",query:e},function(f){n.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!n.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){n.set(f.uid,!0),a.push(f),u(f)}function l(f){var h=!1;return f.eachTargetAxis(function(v,c){var p=t.get(v);p&&p[c]&&(h=!0)}),h}function u(f){f.eachTargetAxis(function(h,v){(t.get(h)||t.set(h,[]))[v]=!0})}return a}function qI(r){var e=r.ecModel,t={infoList:[],infoMap:X()};return r.eachTargetAxis(function(a,n){var i=e.getComponent(Wa(a),n);if(!!i){var o=i.getCoordSysModel();if(!!o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var jc=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r}(),rY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,a,n){var i=tb(t);this.settledOption=i,this.mergeDefaultAndTheme(t,n),this._doInit(i)},e.prototype.mergeOption=function(t){var a=tb(t);ht(this.option,t,!0),ht(this.settledOption,a,!0),this._doInit(a)},e.prototype._doInit=function(t){var a=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var n=this.settledOption;C([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),a=this._targetAxisInfoMap=X(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var a=!1;return C(Jx,function(n){var i=this.getReferringComponents(Wa(n),_R);if(!!i.specified){a=!0;var o=new jc;C(i.models,function(s){o.add(s.componentIndex)}),t.set(n,o)}},this),a},e.prototype._fillAutoTargetAxisByOrient=function(t,a){var n=this.ecModel,i=!0;if(i){var o=a==="vertical"?"y":"x",s=n.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=n.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===a}});l(s,"single")}function l(u,f){var h=u[0];if(!!h){var v=new jc;if(v.add(h.componentIndex),t.set(f,v),i=!1,f==="x"||f==="y"){var c=h.getReferringComponents("grid",qt).models[0];c&&C(u,function(p){h.componentIndex!==p.componentIndex&&c===p.getReferringComponents("grid",qt).models[0]&&v.add(p.componentIndex)})}}}i&&C(Jx,function(u){if(!!i){var f=n.findComponents({mainType:Wa(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var h=new jc;h.add(f[0].componentIndex),t.set(u,h),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(a){!t&&(t=a)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var a=this._rangePropMode,n=this.get("rangeMode");C([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(a,n){t==null&&(t=this.ecModel.getComponent(Wa(a),n))},this),t},e.prototype.eachTargetAxis=function(t,a){this._targetAxisInfoMap.each(function(n,i){C(n.indexList,function(o){t.call(a,i,o)})})},e.prototype.getAxisProxy=function(t,a){var n=this.getAxisModel(t,a);if(n)return n.__dzAxisProxy},e.prototype.getAxisModel=function(t,a){var n=this._targetAxisInfoMap.get(t);if(n&&n.indexMap[a])return this.ecModel.getComponent(Wa(t),a)},e.prototype.setRawRange=function(t){var a=this.option,n=this.settledOption;C([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(a[i[0]]=n[i[0]]=t[i[0]],a[i[1]]=n[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var a=this.option;C(["start","startValue","end","endValue"],function(n){a[n]=t[n]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,a){if(t==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(t,a).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(p=!0),b&&(d=!0)}return g&&p&&d})}else Xi(f,function(c){if(i==="empty")l.setData(u=u.map(c,function(d){return s(d)?d:NaN}));else{var p={};p[c]=o,u.selectRange(p)}});Xi(f,function(c){u.setApproximateExtent(o,c)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,a=this._dataExtent;Xi(["min","max"],function(n){var i=t.get(n+"Span"),o=t.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Lt(a[0]+o,a,[0,100],!0):i!=null&&(o=Lt(i,[0,100],a,!0)-a[0]),e[n+"Span"]=i,e[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,a=this._valueWindow;if(!!t){var n=nT(a,[0,500]);n=Math.min(n,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),t[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function uY(r,e,t){var a=[1/0,-1/0];Xi(t,function(o){PB(a,o.getData(),e)});var n=r.getAxisModel(),i=uM(n.axis.scale,n,a).calculate();return[i.min,i.max]}const fY=lY;var hY={getTargetSeries:function(r){function e(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Wa(o),s);n(o,s,l,i)})})}e(function(n,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new fY(n,i,s,r),t.push(o.__dzAxisProxy))});var a=X();return C(t,function(n){C(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).reset(t)}),t.eachTargetAxis(function(a,n){t.getAxisProxy(a,n).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var a=t.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();t.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};const vY=hY;function cY(r){r.registerAction("dataZoom",function(e,t){var a=eY(t,e);C(a,function(n){n.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var rb=!1;function rm(r){rb||(rb=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,vY),cY(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function pY(r){r.registerComponentModel(nY),r.registerComponentView(sY),rm(r)}var ar=function(){function r(){}return r}(),KI={};function qi(r,e){KI[r]=e}function jI(r){return KI[r]}var dY=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;C(this.option.feature,function(a,n){var i=jI(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),ht(a,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Tt);const gY=dY;function yY(r,e,t){var a=e.getBoxLayoutParams(),n=e.get("padding"),i={width:t.getWidth(),height:t.getHeight()},o=Jt(a,i,n);ni(e.get("orient"),r,e.get("itemGap"),o.width,o.height),Th(r,a,i,n)}function QI(r,e){var t=Mo(e.get("padding")),a=e.getItemStyle(["color","opacity"]);return a.fill=e.get("backgroundColor"),r=new wt({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:a,silent:!0,z2:-1}),r}var mY=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),h=[];C(u,function(p,d){h.push(d)}),new pa(this._featureNames||[],h).add(v).update(v).remove(st(v,null)).execute(),this._featureNames=h;function v(p,d){var g=h[p],y=h[d],m=u[g],_=new Nt(m,t,t.ecModel),S;if(i&&i.newTitle!=null&&i.featureName===g&&(m.title=i.newTitle),g&&!y){if(_Y(g))S={onclick:_.option.onclick,featureName:g};else{var b=jI(g);if(!b)return;S=new b}f[g]=S}else if(S=f[y],!S)return;S.uid=Co("toolbox-feature"),S.model=_,S.ecModel=a,S.api=n;var x=S instanceof ar;if(!g&&y){x&&S.dispose&&S.dispose(a,n);return}if(!_.get("show")||x&&S.unusable){x&&S.remove&&S.remove(a,n);return}c(_,S,g),_.setIconStatus=function(w,T){var A=this.option,M=this.iconPaths;A.iconStatus=A.iconStatus||{},A.iconStatus[w]=T,M[w]&&(T==="emphasis"?va:ca)(M[w])},S instanceof ar&&S.render&&S.render(_,a,n,i)}function c(p,d,g){var y=p.getModel("iconStyle"),m=p.getModel(["emphasis","iconStyle"]),_=d instanceof ar&&d.getIcons?d.getIcons():p.get("icon"),S=p.get("title")||{},b,x;$(_)?(b={},b[g]=_):b=_,$(S)?(x={},x[g]=S):x=S;var w=p.iconPaths={};C(b,function(T,A){var M=_l(T,{},{x:-s/2,y:-s/2,width:s,height:s});M.setStyle(y.getItemStyle());var D=M.ensureState("emphasis");D.style=m.getItemStyle();var I=new Ct({style:{text:x[A],align:m.get("textAlign"),borderRadius:m.get("textBorderRadius"),padding:m.get("textPadding"),fill:null,font:Eg({fontStyle:m.get("textFontStyle"),fontFamily:m.get("textFontFamily"),fontSize:m.get("textFontSize"),fontWeight:m.get("textFontWeight")},a)},ignore:!0});M.setTextContent(I),To({el:M,componentModel:t,itemName:A,formatterParamsExtra:{title:x[A]}}),M.__title=x[A],M.on("mouseover",function(){var L=m.getItemStyle(),P=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";I.setStyle({fill:m.get("textFill")||L.fill||L.stroke||"#000",backgroundColor:m.get("textBackgroundColor")}),M.setTextConfig({position:m.get("textPosition")||P}),I.ignore=!t.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",A])!=="emphasis"&&n.leaveEmphasis(this),I.hide()}),(p.get(["iconStatus",A])==="emphasis"?va:ca)(M),o.add(M),M.on("click",Y(d.onclick,d,a,n,A)),w[A]=M})}yY(o,t,n),o.add(QI(o.getBoundingRect(),t)),l||o.eachChild(function(p){var d=p.__title,g=p.ensureState("emphasis"),y=g.textConfig||(g.textConfig={}),m=p.getTextContent(),_=m&&m.ensureState("emphasis");if(_&&!j(_)&&d){var S=_.style||(_.style={}),b=pl(d,Ct.makeFont(S)),x=p.x+o.x,w=p.y+o.y+s,T=!1;w+b.height>n.getHeight()&&(y.position="top",T=!0);var A=T?-5-b.height:s+10;x+b.width/2>n.getWidth()?(y.position=["100%",A],S.align="right"):x-b.width/2<0&&(y.position=[0,A],S.align="left")}})},e.prototype.updateView=function(t,a,n,i){C(this._features,function(o){o instanceof ar&&o.updateView&&o.updateView(o.model,a,n,i)})},e.prototype.remove=function(t,a){C(this._features,function(n){n instanceof ar&&n.remove&&n.remove(t,a)}),this.group.removeAll()},e.prototype.dispose=function(t,a){C(this._features,function(n){n instanceof ar&&n.dispose&&n.dispose(t,a)})},e.type="toolbox",e}(Wt);function _Y(r){return r.indexOf("my")===0}const SY=mY;var xY=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){var n=this.model,i=n.get("name")||t.get("title.0.text")||"echarts",o=a.getZr().painter.getType()==="svg",s=o?"svg":n.get("type",!0)||"png",l=a.getConnectedDataURL({type:s,backgroundColor:n.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=At.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),c=v[0].indexOf("base64")>-1,p=o?decodeURIComponent(v[1]):v[1];c&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),S.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var x=n.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},e.getDefaultOption=function(t){var a={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},e}(ar);const bY=xY;var ab="__ec_magicType_stack__",wY=[["line","bar"],["stack"]],TY=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,a=t.get("icon"),n={};return C(t.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},e.getDefaultOption=function(t){var a={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},e.prototype.onclick=function(t,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(!!nb[n]){var s={series:[]},l=function(h){var v=h.subType,c=h.id,p=nb[n](v,c,h,i);p&&(tt(p,h.option),s.series.push(p));var d=h.coordinateSystem;if(d&&d.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=h.getReferringComponents(m,qt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};C(wY,function(h){ct(h,n)>=0&&C(h,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=n;n==="stack"&&(u=ht({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(f="tiled")),a.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e}(ar),nb={line:function(r,e,t,a){if(r==="bar")return ht({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,e,t,a){if(r==="line")return ht({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,e,t,a){var n=t.get("stack")===ab;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),ht({id:e,stack:n?"":ab},a.get(["option","stack"])||{},!0)}};qr({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});const AY=TY;var Fh=new Array(60).join("-"),yo=" ";function CY(r){var e={},t=[],a=[];return r.eachRawSeries(function(n){var i=n.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(n)}else t.push(n)}else t.push(n)}),{seriesGroupByCategoryAxis:e,other:t,meta:a}}function MY(r){var e=[];return C(r,function(t,a){var n=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat(G(t.series,function(c){return c.name})),l=[n.model.getCategories()];C(t.series,function(c){var p=c.getRawData();l.push(c.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(yo)],f=0;f=0)return!0}var Hd=new RegExp("["+yo+"]+","g");function PY(r){for(var e=r.split(/\n+/g),t=Xf(e.shift()).split(Hd),a=[],n=G(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[n])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:n})[0];if(s){var l=s.getPercentRange();t[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),t.push(e)}function BY(r){var e=am(r),t=e[e.length-1];e.length>1&&e.pop();var a={};return JI(t,function(n,i){for(var o=e.length-1;o>=0;o--)if(n=e[o][i],n){a[i]=n;break}}),a}function zY(r){tL(r).snapshots=null}function GY(r){return am(r).length}function am(r){var e=tL(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var FY=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,a){zY(t),a.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var a={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return a},e}(ar);qr({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});const HY=FY;var WY=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],$Y=function(){function r(e,t,a){var n=this;this._targetInfoList=[];var i=ib(t,e);C(UY,function(o,s){(!a||!a.include||ct(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Qc[a.brushType](0,i,n);a.__rangeOffset={offset:ub[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,a){C(e,function(n){var i=this.findTargetInfo(n,t);i&&i!==!0&&C(i.coordSyses,function(o){var s=Qc[n.brushType](1,o,n.range,!0);a(n,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){C(e,function(a){var n=this.findTargetInfo(a,t);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Qc[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?ub[a.brushType](i.values,o.offset,YY(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return G(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:t?t(a):null,clipPath:sI(n),isTargetByCursor:uI(n,e,a.coordSysModel),getLinearBrushOtherExtent:lI(n)}})},r.prototype.controlSeries=function(e,t,a){var n=this.findTargetInfo(e,a);return n===!0||n&&ct(n.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var a=this._targetInfoList,n=ib(t,e),i=0;ir[1]&&r.reverse(),r}function ib(r,e){return Ms(r,e,{includeMainTypes:WY})}var UY={grid:function(r,e){var t=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=X(),o={},s={};!t&&!a&&!n||(C(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),C(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),C(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];C(u.getCartesians(),function(h,v){(ct(t,h.getAxis("x").model)>=0||ct(a,h.getAxis("y").model)>=0)&&f.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:sb.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){C(r.geoModels,function(t){var a=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:a,coordSyses:[a],getPanelRect:sb.geo})})}},ob=[function(r,e){var t=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&t&&(n=t.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],sb={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(ai(r)),e}},Qc={lineX:st(lb,0),lineY:st(lb,1),rect:function(r,e,t,a){var n=r?e.pointToData([t[0][0],t[1][0]],a):e.dataToPoint([t[0][0],t[1][0]],a),i=r?e.pointToData([t[0][1],t[1][1]],a):e.dataToPoint([t[0][1],t[1][1]],a),o=[Wd([n[0],i[0]]),Wd([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=G(t,function(o){var s=r?e.pointToData(o,a):e.dataToPoint(o,a);return n[0][0]=Math.min(n[0][0],s[0]),n[1][0]=Math.min(n[1][0],s[1]),n[0][1]=Math.max(n[0][1],s[0]),n[1][1]=Math.max(n[1][1],s[1]),s});return{values:i,xyMinMax:n}}};function lb(r,e,t,a){var n=t.getAxis(["x","y"][r]),i=Wd(G([0,1],function(s){return e?n.coordToData(n.toLocalCoord(a[s]),!0):n.toGlobalCoord(n.dataToCoord(a[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var ub={lineX:st(fb,0),lineY:st(fb,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return G(r,function(a,n){return[a[0]-t[0]*e[n][0],a[1]-t[1]*e[n][1]]})}};function fb(r,e,t,a){return[e[0]-a[r]*t[0],e[1]-a[r]*t[1]]}function YY(r,e){var t=hb(r),a=hb(e),n=[t[0]/a[0],t[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function hb(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const nm=$Y;var $d=C,ZY=pR("toolbox-dataZoom_"),XY=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n,i){this._brushController||(this._brushController=new By(n.getZr()),this._brushController.on("brush",Y(this._onBrush,this)).mount()),jY(t,a,this,i,n),KY(t,a)},e.prototype.onclick=function(t,a,n){qY[n].call(this)},e.prototype.remove=function(t,a){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,a){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var a=t.areas;if(!t.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new nm(im(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,f,h){if(h.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",h,f[0]),s("y",h,f[1])):s({lineX:"x",lineY:"y"}[v],h,f)}}),VY(i,n),this._dispatchZoomAction(n);function s(u,f,h){var v=f.getAxis(u),c=v.model,p=l(u,c,i),d=p.findRepresentativeAxisProxy(c).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(h=wi(0,h.slice(),v.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(n[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,f,h){var v;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(c){var p=c.getAxisModel(u,f.componentIndex);p&&(v=c)}),v}},e.prototype._dispatchZoomAction=function(t){var a=[];$d(t,function(n,i){a.push(rt(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},e.getDefaultOption=function(t){var a={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:"rgba(210,219,238,0.2)"}};return a},e}(ar),qY={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(BY(this.ecModel))}};function im(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function KY(r,e){r.setIconStatus("back",GY(e)>1?"emphasis":"normal")}function jY(r,e,t,a,n){var i=t._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new nm(im(r),e,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}Xk("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var a=e.getModel(t),n=[],i=im(a),o=Ms(r,i);$d(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),$d(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var h=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:ZY+u+h};v[f]=h,n.push(v)}return n});const QY=XY;function JY(r){r.registerComponentModel(gY),r.registerComponentView(SY),qi("saveAsImage",bY),qi("magicType",AY),qi("dataView",NY),qi("dataZoom",QY),qi("restore",HY),yt(pY)}var t7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Tt);const e7=t7;function eL(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function rL(r){if(!!At.domSupported){for(var e=document.documentElement.style,t=0,a=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,h=o+n,v=h*Math.abs(Math.cos(f))+h*Math.abs(Math.sin(f)),c=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-h)/2)*100)/100;s+=";"+i+":-"+c+"px";var p=e+" solid "+n+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+a+";"];return'
'}function l7(r,e){var t="cubic-bezier(0.23,1,0.32,1)",a=" "+r/2+"s "+t,n="opacity"+a+",visibility"+a;return e||(a=" "+r+"s "+t,n+=At.transformSupported?","+om+a:",left"+a+",top"+a),n7+":"+n}function vb(r,e,t){var a=r.toFixed(0)+"px",n=e.toFixed(0)+"px";if(!At.transformSupported)return t?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=At.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return t?"top:0;left:0;"+om+":"+o+";":[["top",0],["left",0],[aL,o]]}function u7(r){var e=[],t=r.get("fontSize"),a=r.getTextColor();a&&e.push("color:"+a),e.push("font:"+r.getFont()),t&&e.push("line-height:"+Math.round(t*3/2)+"px");var n=r.get("textShadowColor"),i=r.get("textShadowBlur")||0,o=r.get("textShadowOffsetX")||0,s=r.get("textShadowOffsetY")||0;return n&&i&&e.push("text-shadow:"+o+"px "+s+"px "+i+"px "+n),C(["decoration","align"],function(l){var u=r.get(l);u&&e.push("text-"+l+":"+u)}),e.join(";")}function f7(r,e,t){var a=[],n=r.get("transitionDuration"),i=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),f=r.getModel("textStyle"),h=lC(r,"html"),v=l+"px "+u+"px "+o+"px "+s;return a.push("box-shadow:"+v),e&&n&&a.push(l7(n,t)),i&&a.push("background-color:"+i),C(["width","color","radius"],function(c){var p="border-"+c,d=CA(p),g=r.get(d);g!=null&&a.push(p+":"+g+(c==="color"?"":"px"))}),a.push(u7(f)),h!=null&&a.push("padding:"+Mo(h).join("px ")+"px"),a.join(";")+";"}function cb(r,e,t,a,n){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&V2(r,o,t,a,n)}else{r[0]=a,r[1]=n;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var h7=function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,At.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=e.getZr(),i=t.appendTo,o=i&&($(i)?document.querySelector(i):so(i)?i:j(i)&&i(e.getDom()));cb(this._styleCoord,n,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(a),this._api=e,this._container=o;var s=this;a.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},a.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=n.handler,f=n.painter.getViewportRoot();je(f,l,!0),u.dispatch("mousemove",l)}},a.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),a=a7(t,"position"),n=t.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=i7+f7(e,!this._firstShow,this._longHide)+vb(i[0],i[1],!0)+("border-color:"+vi(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,a,n,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if($(i)&&a.get("trigger")==="item"&&!eL(a)&&(s=s7(a,n,i)),$(e))o.innerHTML=e+s;else if(e){o.innerHTML="",z(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,a=this._ecModel,n=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!n.isDisposed()&&o.manuallyShowTip(t,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,a,n,i){if(!(i.from===this.uid||At.node||!n.getDom())){var o=gb(i,n);this._ticket="";var s=i.dataByCoordSys,l=S7(i,a,n);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=d7;f.x=i.x,f.y=i.y,f.update(),it(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,a,n,i))return;var h=HI(i,a),v=h.point[0],c=h.point[1];v!=null&&c!=null&&this._tryShow({offsetX:v,offsetY:c,target:h.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(n.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:n.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,a,n,i){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,i.from!==this.uid&&this._hide(gb(i,n))},e.prototype._manuallyAxisShowTip=function(t,a,n,i){var o=i.seriesIndex,s=i.dataIndex,l=a.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=a.getSeriesByIndex(o);if(!!u){var f=u.getData(),h=os([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,a){var n=t.target,i=this._tooltipModel;if(!!i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(n){var s=it(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Xn(n,function(f){if(it(f).dataIndex!=null)return l=f,!0;if(it(f).tooltipConfig!=null)return u=f,!0},!0),l?this._showSeriesItemTooltip(t,l,a):u?this._showComponentItemTooltip(t,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},e.prototype._showOrMove=function(t,a){var n=t.get("showDelay");a=Y(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},e.prototype._showAxisTooltip=function(t,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=os([a.tooltipOption],i),l=this._renderMode,u=[],f=ae("section",{blocks:[],noHeader:!0}),h=[],v=new Nv;C(t,function(m){C(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=BI(b,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),w=ae("section",{header:x,noHeader:!mr(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),C(_.seriesDataIndices,function(T){var A=n.getSeriesByIndex(T.seriesIndex),M=T.dataIndexInside,D=A.getDataParams(M);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=sy(S.axis,{value:b}),D.axisValueLabel=x,D.marker=v.makeTooltipMarker("item",vi(D.color),l);var I=J0(A.formatTooltip(M,!0,null)),L=I.frag;if(L){var P=os([A],i).get("valueFormatter");w.blocks.push(P?B({valueFormatter:P},L):L)}I.text&&h.push(I.text),u.push(D)}})}})}),f.blocks.reverse(),h.reverse();var c=a.position,p=s.get("order"),d=i_(f,v,l,p,n.get("useUTC"),s.get("textStyle"));d&&h.unshift(d);var g=l==="richText"?` + +`:"
",y=h.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,c,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],c,null,v)})},e.prototype._showSeriesItemTooltip=function(t,a,n){var i=this._ecModel,o=it(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,h=o.dataType,v=u.getData(h),c=this._renderMode,p=t.positionDefault,d=os([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,h),m=new Nv;y.marker=m.makeTooltipMarker("item",vi(y.color),c);var _=J0(u.formatTooltip(f,!1,h)),S=d.get("order"),b=d.get("valueFormatter"),x=_.frag,w=x?i_(b?B({valueFormatter:b},x):x,m,c,S,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),n({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,a,n){var i=this._renderMode==="html",o=it(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if($(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=rt(l),l.content=Ce(l.content));var h=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&h.push(v),h.push({formatter:l.content});var c=t.positionDefault,p=os(h,this._tooltipModel,c?{position:c}:null),d=p.get("content"),g=Math.random()+"",y=new Nv;this._showOrMove(p,function(){var m=rt(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,t.offsetX,t.offsetY,t.position,a,y)}),n({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,a,n,i,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var c=a,p=this._getNearestPoint([o,s],n,t.get("trigger"),t.get("borderColor")),d=p.color;if(v)if($(v)){var g=t.ecModel.get("useUTC"),y=z(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;c=v,m&&(c=_h(y.axisValue,c,g)),c=MA(c,n,!0)}else if(j(v)){var _=Y(function(S,b){S===this._ticket&&(h.setContent(b,f,t,d,l),this._updatePosition(t,l,o,s,h,n,u))},this);this._ticket=i,c=v(n,i,_)}else c=v;h.setContent(c,f,t,d,l),h.show(t,d),this._updatePosition(t,l,o,s,h,n,u)}},e.prototype._getNearestPoint=function(t,a,n,i){if(n==="axis"||z(a))return{color:i||(this._renderMode==="html"?"#fff":"none")};if(!z(a))return{color:i||a.color||a.borderColor}},e.prototype._updatePosition=function(t,a,n,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();a=a||t.get("position");var h=o.getSize(),v=t.get("align"),c=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),j(a)&&(a=a([n,i],s,o.el,p,{viewSize:[u,f],contentSize:h.slice()})),z(a))n=W(a[0],u),i=W(a[1],f);else if(et(a)){var d=a;d.width=h[0],d.height=h[1];var g=Jt(d,{width:u,height:f});n=g.x,i=g.y,v=null,c=null}else if($(a)&&l){var y=_7(a,p,h,t.get("borderWidth"));n=y[0],i=y[1]}else{var y=y7(n,i,o,u,f,v?null:20,c?null:20);n=y[0],i=y[1]}if(v&&(n-=yb(v)?h[0]/2:v==="right"?h[0]:0),c&&(i-=yb(c)?h[1]/2:c==="bottom"?h[1]:0),eL(t)){var y=m7(n,i,o,u,f);n=y[0],i=y[1]}o.moveTo(n,i)},e.prototype._updateContentNotChangedOnAxis=function(t,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===t.length;return o&&C(n,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},h=f.dataByAxis||[];o=o&&u.length===h.length,o&&C(u,function(v,c){var p=h[c]||{},d=v.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&v.value===p.value&&v.axisType===p.axisType&&v.axisId===p.axisId&&d.length===g.length,o&&C(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&C(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=a,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,a){At.node||!a.getDom()||(Qs(this,"_updatePosition"),this._tooltipContent.dispose(),zd("itemTooltip",a))},e.type="tooltip",e}(Wt);function os(r,e,t){var a=e.ecModel,n;t?(n=new Nt(t,a,a),n=new Nt(e.option,n,a)):n=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Nt&&(o=o.get("tooltip",!0)),$(o)&&(o={formatter:o}),o&&(n=new Nt(o,n,a)))}return n}function gb(r,e){return r.dispatchAction||Y(e.dispatchAction,e)}function y7(r,e,t,a,n,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(e+u+o>n?e-=u+o:e+=o),[r,e]}function m7(r,e,t,a,n){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,e=Math.min(e+s,n)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function _7(r,e,t,a){var n=t[0],i=t[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-n/2,l=e.y+f/2-i/2;break;case"top":s=e.x+u/2-n/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-n/2,l=e.y+f+o;break;case"left":s=e.x-n-o,l=e.y+f/2-i/2;break;case"right":s=e.x+u+o,l=e.y+f/2-i/2}return[s,l]}function yb(r){return r==="center"||r==="middle"}function S7(r,e,t){var a=mg(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=dl(e,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(!!o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=it(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}const x7=g7;function b7(r){yt(Rl),r.registerComponentModel(e7),r.registerComponentView(x7),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Zt),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Zt)}var w7=["rect","polygon","keep","clear"];function T7(r,e){var t=Rt(r?r.brush:[]);if(!!t.length){var a=[];C(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(a=a.concat(u))});var n=r&&r.toolbox;z(n)&&(n=n[0]),n||(n={feature:{}},r.toolbox=[n]);var i=n.feature||(n.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,a),A7(s),e&&!s.length&&s.push.apply(s,w7)}}function A7(r){var e={};C(r,function(t){e[t]=1}),r.length=0,C(e,function(t,a){r.push(a)})}var mb=C;function _b(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function Ud(r,e,t){var a={};return mb(e,function(i){var o=a[i]=n();mb(r[i],function(s,l){if(!!he.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new he(u),l==="opacity"&&(u=rt(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new he(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function iL(r,e,t){var a;C(t,function(n){e.hasOwnProperty(n)&&_b(e[n])&&(a=!0)}),a&&C(t,function(n){e.hasOwnProperty(n)&&_b(e[n])?r[n]=rt(e[n]):delete r[n]})}function C7(r,e,t,a,n,i){var o={};C(r,function(h){var v=he.prepareVisualTypes(e[h]);o[h]=v});var s;function l(h){return Kg(t,s,h)}function u(h,v){mC(t,s,h,v)}i==null?t.each(f):t.each([i],f);function f(h,v){s=i==null?h:v;var c=t.getRawDataItem(s);if(!(c&&c.visualMap===!1))for(var p=a.call(n,h),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&Tb(e)}};function Tb(r){return new vt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var k7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.ecModel=t,this.api=a,this.model,(this._brushController=new By(a.getZr())).on("brush",Y(this._onBrush,this)).mount()},e.prototype.render=function(t,a,n,i){this.model=t,this._updateController(t,a,n,i)},e.prototype.updateTransform=function(t,a,n,i){oL(a),this._updateController(t,a,n,i)},e.prototype.updateVisual=function(t,a,n,i){this.updateTransform(t,a,n,i)},e.prototype.updateView=function(t,a,n,i){this._updateController(t,a,n,i)},e.prototype._updateController=function(t,a,n,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(n)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:rt(n),$from:a}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:rt(n),$from:a})},e.type="brush",e}(Wt);const O7=k7;var N7="#ddd",V7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&iL(n,t,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:N7},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){!t||(this.areas=G(t,function(a){return Ab(this.option,a)},this))},e.prototype.setBrushOption=function(t){this.brushOption=Ab(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Tt);function Ab(r,e){return ht({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Nt(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}const B7=V7;var z7=["rect","polygon","lineX","lineY","keep","clear"],G7=function(r){k(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,a,n){var i,o,s;a.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,C(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,a,n){this.render(t,a,n)},e.prototype.getIcons=function(){var t=this.model,a=t.get("icon",!0),n={};return C(t.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},e.prototype.onclick=function(t,a,n){var i=this._brushType,o=this._brushMode;n==="clear"?(a.dispatchAction({type:"axisAreaSelect",intervals:[]}),a.dispatchAction({type:"brush",command:"clear",areas:[]})):a.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:n==="keep"?i:i===n?!1:n,brushMode:n==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var a={show:!0,type:z7.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return a},e}(ar);const F7=G7;function H7(r){r.registerComponentView(O7),r.registerComponentModel(B7),r.registerPreprocessor(T7),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,I7),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(a){a.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Zt),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Zt),qi("brush",F7)}var W7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Tt),$7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,a,n){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=ot(t.get("textBaseline"),t.get("textVerticalAlign")),f=new Ct({style:Ot(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=f.getBoundingRect(),v=t.get("subtext"),c=new Ct({style:Ot(s,{text:v,fill:s.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!p&&!g,c.silent=!d&&!g,p&&f.on("click",function(){wf(p,"_"+t.get("target"))}),d&&c.on("click",function(){wf(d,"_"+t.get("subtarget"))}),it(f).eventData=it(c).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),v&&i.add(c);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Jt(m,{width:n.getWidth(),height:n.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),i.x=_.x,i.y=_.y,i.markRedraw();var S={align:l,verticalAlign:u};f.setStyle(S),c.setStyle(S),y=i.getBoundingRect();var b=_.margin,x=t.getItemStyle(["color","opacity"]);x.fill=t.get("backgroundColor");var w=new wt({shape:{x:y.x-b[3],y:y.y-b[0],width:y.width+b[1]+b[3],height:y.height+b[0]+b[2],r:t.get("borderRadius")},style:x,subPixelOptimize:!0,silent:!0});i.add(w)}},e.type="title",e}(Wt);function U7(r){r.registerComponentModel(W7),r.registerComponentView($7)}var Y7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var a=this._data.count();this.option.loop?t=(t%a+a)%a:(t>=a&&(t=a-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,a=t.data||[],n=t.axisType,i=this._names=[],o;n==="category"?(o=[],C(a,function(u,f){var h=Qt(xo(u),""),v;et(u)?(v=rt(u),v.value=f):v=f,o.push(v),i.push(h)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new Me([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Tt);const Cb=Y7;var sL=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=on(Cb.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(Cb);jt(sL,Ch.prototype);const Z7=sL;var X7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(Wt);const q7=X7;var K7=function(r){k(e,r);function e(t,a,n,i){var o=r.call(this,t,a,n)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(Ar);const j7=K7;var tp=Math.PI,Mb=xt(),Q7=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,a){this.api=a},e.prototype.render=function(t,a,n){if(this.model=t,this.api=n,this.ecModel=a,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return ae("nameValue",{noName:!0,value:f})},C(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,a){var n=t.get(["label","position"]),i=t.get("orient"),o=t9(t,a),s;n==null||n==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:tp/2},h=i==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),c=v.get("show",!0),p=c?v.get("itemSize"):0,d=c?v.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*tp/180;var m,_,S,b=v.get("position",!0),x=c&&v.get("showPlayBtn",!0),w=c&&v.get("showPrevBtn",!0),T=c&&v.get("showNextBtn",!0),A=0,M=h;b==="left"||b==="bottom"?(x&&(m=[0,0],A+=g),w&&(_=[A,0],A+=g),T&&(S=[M-p,0],M-=g)):(x&&(m=[M-p,0],M-=g),w&&(_=[0,0],A+=g),T&&(S=[M-p,0],M-=g));var D=[A,M];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:h,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:p,controlGap:d}},e.prototype._position=function(t,a){var n=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=We(),l=o.x,u=o.y+o.height;$r(s,s,[-l,-u]),gi(s,s,-tp/2),$r(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),h=m(n.getBoundingRect()),v=m(i.getBoundingRect()),c=[n.x,n.y],p=[i.x,i.y];p[0]=c[0]=f[0][0];var d=t.labelPosOpt;if(d==null||$(d)){var g=d==="+"?0:1;_(c,h,f,1,g),_(p,v,f,1,1-g)}else{var g=d>=0?0:1;_(c,h,f,1,g),p[1]=c[1]+d}n.setPosition(c),i.setPosition(p),n.rotation=i.rotation=t.rotation,y(n),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,b,x,w,T){S[w]+=x[w][T]-b[w][T]}},e.prototype._createAxis=function(t,a){var n=a.getData(),i=a.get("axisType"),o=J7(a,i);o.getTicks=function(){return n.mapArray(["value"],function(u){return{value:u}})};var s=n.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new j7("value",o,t.axisExtent,i);return l.model=a,l},e.prototype._createGroup=function(t){var a=this[t]=new nt;return this.group.add(a),a},e.prototype._renderAxisLine=function(t,a,n,i){var o=n.getExtent();if(!!i.get(["lineStyle","show"])){var s=new se({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:B({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new se({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:tt({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},e.prototype._renderAxisTick=function(t,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],C(l,function(u){var f=n.dataToCoord(u.value),h=s.getItemModel(u.value),v=h.getModel("itemStyle"),c=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:Y(o._changeTimeline,o,u.value)},g=Db(h,v,a,d);g.ensureState("emphasis").style=c.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),ri(g);var y=it(g);h.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,a,n,i){var o=this,s=n.getLabelModel();if(!!s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],C(u,function(f){var h=f.tickValue,v=l.getItemModel(h),c=v.getModel("label"),p=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=n.dataToCoord(f.tickValue),y=new Ct({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:Y(o._changeTimeline,o,h),silent:!1,style:Ot(c,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=Ot(p),y.ensureState("progress").style=Ot(d),a.add(y),ri(y),Mb(y).dataIndex=h,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,a,n,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),h=i.get("inverse",!0);v(t.nextBtnPosition,"next",Y(this._changeTimeline,this,h?"-":"+")),v(t.prevBtnPosition,"prev",Y(this._changeTimeline,this,h?"+":"-")),v(t.playPosition,f?"stop":"play",Y(this._handlePlayClick,this,!f),!0);function v(c,p,d,g){if(!!c){var y=br(ot(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=e9(i,p+"Icon",m,{x:c[0],y:c[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,a.add(_),ri(_)}}},e.prototype._renderCurrentPointer=function(t,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(h){h.draggable=!0,h.drift=Y(u._handlePointerDrag,u),h.ondragend=Y(u._handlePointerDragend,u),Ib(h,u._progressLine,s,n,i,!0)},onUpdate:function(h){Ib(h,u._progressLine,s,n,i)}};this._currentPointer=Db(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,a){var n=this._toAxisCoord(t)[0],i=this._axis,o=or(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(o[i]=+o[i].toFixed(v)),[o,h]}var ep={min:st(Eu,"min"),max:st(Eu,"max"),average:st(Eu,"average"),median:st(Eu,"median")};function hl(r,e){if(!!e){var t=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!u9(e)&&!z(e.coord)&&z(n)){var i=uL(e,t,a,r);if(e=rt(e),e.type&&ep[e.type]&&i.baseAxis&&i.valueAxis){var o=ct(n,i.baseAxis.dim),s=ct(n,i.valueAxis.dim),l=ep[e.type](t,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!z(n))e.coord=[];else for(var u=e.coord,f=0;f<2;f++)ep[u[f]]&&(u[f]=lm(t,t.mapDimension(n[f]),u[f]));return e}}function uL(r,e,t,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,n.valueAxis=t.getAxis(f9(a,n.valueDataDim)),n.baseAxis=t.getOtherAxis(n.valueAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=t.getOtherAxis(n.baseAxis),n.baseDataDim=e.mapDimension(n.baseAxis.dim),n.valueDataDim=e.mapDimension(n.valueAxis.dim)),n}function f9(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function vl(r,e){return r&&r.containData&&e.coord&&!Zd(e)?r.containData(e.coord):!0}function h9(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Zd(e)&&!Zd(t)?r.containZone(e.coord,t.coord):!0}function fL(r,e){return r?function(t,a,n,i){var o=i<2?t.coord&&t.coord[i]:t.value;return Ya(o,e[i])}:function(t,a,n,i){return Ya(t.value,e[i])}}function lm(r,e,t){if(t==="average"){var a=0,n=0;return r.each(e,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var rp=xt(),v9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=X()},e.prototype.render=function(t,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){rp(s).keep=!1}),a.eachSeries(function(s){var l=rn.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!rp(s).keep&&i.group.remove(s.group)})},e.prototype.markKeep=function(t){rp(t).keep=!0},e.prototype.toggleBlurSeries=function(t,a){var n=this;C(t,function(i){var o=rn.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?OT(l):Ag(l))})}})},e.type="marker",e}(Wt);const um=v9;function Pb(r,e,t){var a=e.coordinateSystem;r.each(function(n){var i=r.getItemModel(n),o,s=W(i.get("x"),t.getWidth()),l=W(i.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,n));else if(a){var u=r.get(a.dimensions[0],n),f=r.get(a.dimensions[1],n);o=a.dataToPoint([u,f])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(n,o)})}var c9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=rn.getMarkerModelFromSeries(i,"markPoint");o&&(Pb(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Al),h=p9(o,t,a);a.setData(h),Pb(a.getData(),t,i),h.each(function(v){var c=h.getItemModel(v),p=c.getShallow("symbol"),d=c.getShallow("symbolSize"),g=c.getShallow("symbolRotate"),y=c.getShallow("symbolOffset"),m=c.getShallow("symbolKeepAspect");if(j(p)||j(d)||j(g)||j(y)){var _=a.getRawValue(v),S=a.getDataParams(v);j(p)&&(p=p(_,S)),j(d)&&(d=d(_,S)),j(g)&&(g=g(_,S)),j(y)&&(y=y(_,S))}var b=c.getModel("itemStyle").getItemStyle(),x=xl(l,"color");b.fill||(b.fill=x),h.setItemVisual(v,{symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(h),this.group.add(f.group),h.eachItemGraphicEl(function(v){v.traverse(function(c){it(c).dataModel=a})}),this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markPoint",e}(um);function p9(r,e,t){var a;r?a=G(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return B(B({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Me(a,t),i=G(t.get("data"),st(hl,e));r&&(i=Pt(i,st(vl,r)));var o=fL(!!r,a);return n.initData(i,null,o),n}const d9=c9;function g9(r){r.registerComponentModel(l9),r.registerComponentView(d9),r.registerPreprocessor(function(e){sm(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var y9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e}(rn);const m9=y9;var ku=xt(),_9=function(r,e,t,a){var n=r.getData(),i;if(z(a))i=a;else{var o=a.type;if(o==="min"||o==="max"||o==="average"||o==="median"||a.xAxis!=null||a.yAxis!=null){var s=void 0,l=void 0;if(a.yAxis!=null||a.xAxis!=null)s=e.getAxis(a.yAxis!=null?"y":"x"),l=oe(a.yAxis,a.xAxis);else{var u=uL(a,n,e,r);s=u.valueAxis;var f=ZC(n,u.valueDataDim);l=lm(n,f,o)}var h=s.dim==="x"?0:1,v=1-h,c=rt(a),p={coord:[]};c.type=null,c.coord=[],c.coord[v]=-1/0,p.coord[v]=1/0;var d=t.get("precision");d>=0&&Mt(l)&&(l=+l.toFixed(Math.min(d,20))),c.coord[h]=p.coord[h]=l,i=[c,p,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[hl(r,i[0]),hl(r,i[1]),B({},i[2])];return g[2].type=g[2].type||null,ht(g[2],g[0]),ht(g[2],g[1]),g};function qf(r){return!isNaN(r)&&!isFinite(r)}function Rb(r,e,t,a){var n=1-r,i=a.dimensions[r];return qf(e[n])&&qf(t[n])&&e[r]===t[r]&&a.getAxis(i).containData(e[r])}function S9(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,a=e[1].coord;if(t&&a&&(Rb(1,t,a,r)||Rb(0,t,a,r)))return!0}return vl(r,e[0])&&vl(r,e[1])}function ap(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=W(o.get("x"),n.getWidth()),u=W(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=i.dimensions,h=r.get(f[0],e),v=r.get(f[1],e);s=i.dataToPoint([h,v])}if(xi(i,"cartesian2d")){var c=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;qf(r.get(f[0],e))?s[0]=c.toGlobalCoord(c.getExtent()[t?0:1]):qf(r.get(f[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var x9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=rn.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=ku(o).from,u=ku(o).to;l.each(function(f){ap(l,f,!0,i,n),ap(u,f,!1,i,n)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new Ry);this.group.add(f.group);var h=b9(o,t,a),v=h.from,c=h.to,p=h.line;ku(a).from=v,ku(a).to=c,a.setData(p);var d=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");z(d)||(d=[d,d]),z(g)||(g=[g,g]),z(y)||(y=[y,y]),z(m)||(m=[m,m]),h.from.each(function(S){_(v,S,!0),_(c,S,!1)}),p.each(function(S){var b=p.getItemModel(S).getModel("lineStyle").getLineStyle();p.setItemLayout(S,[v.getItemLayout(S),c.getItemLayout(S)]),b.stroke==null&&(b.stroke=v.getItemVisual(S,"style").fill),p.setItemVisual(S,{fromSymbolKeepAspect:v.getItemVisual(S,"symbolKeepAspect"),fromSymbolOffset:v.getItemVisual(S,"symbolOffset"),fromSymbolRotate:v.getItemVisual(S,"symbolRotate"),fromSymbolSize:v.getItemVisual(S,"symbolSize"),fromSymbol:v.getItemVisual(S,"symbol"),toSymbolKeepAspect:c.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:c.getItemVisual(S,"symbolOffset"),toSymbolRotate:c.getItemVisual(S,"symbolRotate"),toSymbolSize:c.getItemVisual(S,"symbolSize"),toSymbol:c.getItemVisual(S,"symbol"),style:b})}),f.updateData(p),h.line.eachItemGraphicEl(function(S){it(S).dataModel=a,S.traverse(function(b){it(b).dataModel=a})});function _(S,b,x){var w=S.getItemModel(b);ap(S,b,x,t,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=xl(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:ot(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:ot(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:ot(w.get("symbolSize"),g[x?0:1]),symbol:ot(w.get("symbol",!0),d[x?0:1]),style:T})}this.markKeep(f),f.group.silent=a.get("silent")||t.get("silent")},e.type="markLine",e}(um);function b9(r,e,t){var a;r?a=G(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return B(B({},f),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new Me(a,t),i=new Me(a,t),o=new Me([],t),s=G(t.get("data"),st(_9,e,r,t));r&&(s=Pt(s,st(S9,r)));var l=fL(!!r,a);return n.initData(G(s,function(u){return u[0]}),null,l),i.initData(G(s,function(u){return u[1]}),null,l),o.initData(G(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const w9=x9;function T9(r){r.registerComponentModel(m9),r.registerComponentView(w9),r.registerPreprocessor(function(e){sm(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var A9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,a,n){return new e(t,a,n)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e}(rn);const C9=A9;var Ou=xt(),M9=function(r,e,t,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=hl(r,n),s=hl(r,i),l=o.coord,u=s.coord;l[0]=oe(l[0],-1/0),l[1]=oe(l[1],-1/0),u[0]=oe(u[0],1/0),u[1]=oe(u[1],1/0);var f=og([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function Kf(r){return!isNaN(r)&&!isFinite(r)}function Eb(r,e,t,a){var n=1-r;return Kf(e[n])&&Kf(t[n])}function D9(r,e){var t=e.coord[0],a=e.coord[1],n={coord:t,x:e.x0,y:e.y0},i={coord:a,x:e.x1,y:e.y1};return xi(r,"cartesian2d")?t&&a&&(Eb(1,t,a)||Eb(0,t,a))?!0:h9(r,n,i):vl(r,n)||vl(r,i)}function kb(r,e,t,a,n){var i=a.coordinateSystem,o=r.getItemModel(e),s,l=W(o.get(t[0]),n.getWidth()),u=W(o.get(t[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var f=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),v=i.clampData(f),c=i.clampData(h),p=[];t[0]==="x0"?p[0]=v[0]>c[0]?h[0]:f[0]:p[0]=v[0]>c[0]?f[0]:h[0],t[1]==="y0"?p[1]=v[1]>c[1]?h[1]:f[1]:p[1]=v[1]>c[1]?f[1]:h[1],s=a.getMarkerPosition(p,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(xi(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);Kf(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Kf(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var Ob=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],I9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,a,n){a.eachSeries(function(i){var o=rn.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=G(Ob,function(h){return kb(s,l,h,i,n)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,a,n,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new nt});this.group.add(f.group),this.markKeep(f);var h=L9(o,t,a);a.setData(h),h.each(function(v){var c=G(Ob,function(T){return kb(h,v,T,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(h.get("x0",v)),p.parse(h.get("x1",v))],_=[d.parse(h.get("y0",v)),d.parse(h.get("y1",v))];or(m),or(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!S;h.setItemLayout(v,{points:c,allClipped:b});var x=h.getItemModel(v).getModel("itemStyle").getItemStyle(),w=xl(l,"color");x.fill||(x.fill=w,$(x.fill)&&(x.fill=hf(x.fill,.4))),x.stroke||(x.stroke=w),h.setItemVisual(v,"style",x)}),h.diff(Ou(f).data).add(function(v){var c=h.getItemLayout(v);if(!c.allClipped){var p=new Be({shape:{points:c.points}});h.setItemGraphicEl(v,p),f.group.add(p)}}).update(function(v,c){var p=Ou(f).data.getItemGraphicEl(c),d=h.getItemLayout(v);d.allClipped?p&&f.group.remove(p):(p?Dt(p,{shape:{points:d.points}},a,v):p=new Be({shape:{points:d.points}}),h.setItemGraphicEl(v,p),f.group.add(p))}).remove(function(v){var c=Ou(f).data.getItemGraphicEl(v);f.group.remove(c)}).execute(),h.eachItemGraphicEl(function(v,c){var p=h.getItemModel(c),d=h.getItemVisual(c,"style");v.useStyle(h.getItemVisual(c,"style")),ce(v,re(p),{labelFetcher:a,labelDataIndex:c,defaultText:h.getName(c)||"",inheritColor:$(d.fill)?hf(d.fill,1):"#000"}),ve(v,p),Ht(v,null,null,p.get(["emphasis","disabled"])),it(v).dataModel=a}),Ou(f).data=h,f.group.silent=a.get("silent")||t.get("silent")},e.type="markArea",e}(um);function L9(r,e,t){var a,n,i=["x0","y0","x1","y1"];if(r){var o=G(r&&r.dimensions,function(u){var f=e.getData(),h=f.getDimensionInfo(f.mapDimension(u))||{};return B(B({},h),{name:u,ordinalMeta:null})});n=G(i,function(u,f){return{name:u,type:o[f%2].type}}),a=new Me(n,t)}else n=[{name:"value",type:"float"}],a=new Me(n,t);var s=G(t.get("data"),st(M9,e,r,t));r&&(s=Pt(s,st(D9,r)));var l=r?function(u,f,h,v){var c=u.coord[Math.floor(v/2)][v%2];return Ya(c,n[v])}:function(u,f,h,v){return Ya(u.value,n[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}const P9=I9;function R9(r){r.registerComponentModel(C9),r.registerComponentView(P9),r.registerPreprocessor(function(e){sm(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var E9=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},k9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,a){r.prototype.mergeOption.call(this,t,a),this._updateSelector(t)},e.prototype._updateSelector=function(t){var a=t.selector,n=this.ecModel;a===!0&&(a=t.selector=["all","inverse"]),z(a)&&C(a,function(i,o){$(i)&&(i={type:i}),a[o]=ht(i,E9(n,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Tt);const Xd=k9;var Fi=st,qd=C,Nu=nt,O9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new Nu),this.group.add(this._selectorGroup=new Nu),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,a,n,l,s,u);var f=t.getBoxLayoutParams(),h={width:n.getWidth(),height:n.getHeight()},v=t.get("padding"),c=Jt(f,h,v),p=this.layoutInner(t,o,c,i,l,u),d=Jt(tt({width:p.width,height:p.height},f),h,v);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=QI(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,a,n,i,o,s,l){var u=this.getContentGroup(),f=X(),h=a.get("selectedMode"),v=[];n.eachRawSeries(function(c){!c.get("legendHoverLink")&&v.push(c.id)}),qd(a.getData(),function(c,p){var d=c.get("name");if(!this.newlineDisabled&&(d===""||d===` +`)){var g=new Nu;g.newline=!0,u.add(g);return}var y=n.getSeriesByName(d)[0];if(!f.get(d))if(y){var m=y.getData(),_=m.getVisual("legendLineStyle")||{},S=m.getVisual("legendIcon"),b=m.getVisual("style"),x=this._createItem(y,d,p,c,a,t,_,b,S,h,i);x.on("click",Fi(Nb,d,null,i,v)).on("mouseover",Fi(Kd,y.name,null,i,v)).on("mouseout",Fi(jd,y.name,null,i,v)),n.ssr&&x.eachChild(function(w){var T=it(w);T.seriesIndex=y.seriesIndex,T.dataIndex=p,T.ssrType="legend"}),f.set(d,!0)}else n.eachRawSeries(function(w){if(!f.get(d)&&w.legendVisualProvider){var T=w.legendVisualProvider;if(!T.containName(d))return;var A=T.indexOfName(d),M=T.getItemVisual(A,"style"),D=T.getItemVisual(A,"legendIcon"),I=$e(M.fill);I&&I[3]===0&&(I[3]=.2,M=B(B({},M),{fill:oa(I,"rgba")}));var L=this._createItem(w,d,p,c,a,t,{},M,D,h,i);L.on("click",Fi(Nb,null,d,i,v)).on("mouseover",Fi(Kd,null,d,i,v)).on("mouseout",Fi(jd,null,d,i,v)),n.ssr&&L.eachChild(function(P){var R=it(P);R.seriesIndex=w.seriesIndex,R.dataIndex=p,R.ssrType="legend"}),f.set(d,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},e.prototype._createSelector=function(t,a,n,i,o){var s=this.getSelectorGroup();qd(t,function(u){var f=u.type,h=new Ct({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect"})}});s.add(h);var v=a.getModel("selectorLabel"),c=a.getModel(["emphasis","selectorLabel"]);ce(h,{normal:v,emphasis:c},{defaultText:u.title}),ri(h)})},e.prototype._createItem=function(t,a,n,i,o,s,l,u,f,h,v){var c=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=N9(f,i,l,u,c,g,v),b=new Nu,x=i.getModel("textStyle");if(j(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(V9({itemWidth:p,itemHeight:d,icon:f,iconRotate:w,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,A=s,M=o.get("formatter"),D=a;$(M)&&M?D=M.replace("{name}",a!=null?a:""):j(M)&&(D=M(a));var I=g?x.getTextColor():i.get("inactiveColor");b.add(new Ct({style:Ot(x,{text:D,x:T,y:d/2,fill:I,align:A,verticalAlign:"middle"},{inheritColor:I})}));var L=new wt({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&To({el:L,componentModel:o,itemName:a,itemTooltipOption:P.option}),b.add(L),b.eachChild(function(R){R.silent=!0}),L.silent=!h,this.getContentGroup().add(b),ri(b),b.__legendDataIndex=n,b},e.prototype.layoutInner=function(t,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();ni(t.get("orient"),l,t.get("itemGap"),n.width,n.height);var f=l.getBoundingRect(),h=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){ni("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),c=[-v.x,-v.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?c[d]+=f[g]+p:h[d]+=v[g]+p,c[1-d]+=f[y]/2-v[y]/2,u.x=c[0],u.y=c[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[g]=f[g]+p+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+c[1-d]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(Wt);function N9(r,e,t,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),qd(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?a.decal:fo(h,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[f]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:t).opacity),s(u,a);var v=e.getModel("lineStyle"),c=v.getLineStyle();if(s(c,t),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),c.stroke==="auto"&&(c.stroke=a.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?a.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),c.stroke=v.get("inactiveColor"),c.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:c}}function V9(r){var e=r.icon||"roundRect",t=Kt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function Nb(r,e,t,a){jd(r,e,t,a),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),Kd(r,e,t,a)}function hL(r){for(var e=r.getZr().storage.getDisplayList(),t,a=0,n=e.length;an[o],g=[-c.x,-c.y];a||(g[i]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=ot(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=c[s]/2-p[s]/2,f.setPosition(g),h.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=d?n[o]:c[o],b[s]=Math.max(c[s],p[s]),b[l]=Math.min(0,p[l]+m[1-i]),h.__rectSize=n[o],d){var x={x:0,y:0};x[o]=Math.max(n[o]-p[o]-_,0),x[s]=b[s],h.setClipPath(new wt({shape:x})),h.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Dt(f,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,a,n){var i=this._getPageInfo(a)[t];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},e.prototype._updatePageInfoView=function(t,a){var n=this._controllerGroup;C(["pagePrev","pageNext"],function(f){var h=f+"DataIndex",v=a[h]!=null,c=n.childOfName(f);c&&(c.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),c.cursor=v?"pointer":"default")});var i=n.childOfName("pageText"),o=t.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",$(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var a=t.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=np[o],l=ip[o],u=this._findTargetItemIndex(a),f=n.children(),h=f[u],v=f.length,c=v?1:0,p={contentPosition:[n.x,n.y],pageCount:c,pageIndex:c-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var d=S(h);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i=w&&x.s<=w+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var a,n=this.getContentGroup(),i;return n.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(a=s)}),a!=null?a:i},e.type="legend.scroll",e}(vL);const W9=H9;function $9(r){r.registerAction("legendScroll","legendscroll",function(e,t){var a=e.scrollDataIndex;a!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(n){n.setScrollDataIndex(a)})})}function U9(r){yt(cL),r.registerComponentModel(F9),r.registerComponentView(W9),$9(r)}function Y9(r){yt(cL),yt(U9)}var Z9=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=on(fl.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(fl);const X9=Z9;var fm=xt();function q9(r,e,t){fm(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(e.uid);n&&(n.getRange=t)})}function K9(r,e){for(var t=fm(r).coordSysRecordMap,a=t.keys(),n=0;na[t+e]&&(e=s),n=n&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!n}}}function eZ(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var a=fm(t),n=a.coordSysRecordMap||(a.coordSysRecordMap=X());n.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=qI(i);C(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,j9(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=X());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),n.each(function(i){var o=i.controller,s,l=i.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){pL(n,i);return}var f=tZ(l);o.enable(f.controlType,f.opt),o.setPointerChecker(i.containsPoint),Ro(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var rZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,a,n){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),q9(n,t,{pan:Y(op.pan,this),zoom:Y(op.zoom,this),scrollMove:Y(op.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){K9(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(em),op={zoom:function(r,e,t,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(!!o){var s=sp[e](null,[a.originX,a.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/a.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(wi(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:zb(function(r,e,t,a,n,i){var o=sp[a]([i.oldX,i.oldY],[i.newX,i.newY],e,n,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:zb(function(r,e,t,a,n,i){var o=sp[a]([0,0],[i.scrollDelta,i.scrollDelta],e,n,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function zb(r){return function(e,t,a,n){var i=this.range,o=i.slice(),s=e.axisModels[0];if(!!s){var l=r(o,s,e,t,a,n);if(wi(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var sp={grid:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,a,n){var i=t.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,a,n){var i=t.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};const aZ=rZ;function dL(r){rm(r),r.registerComponentModel(X9),r.registerComponentView(aZ),eZ(r)}var nZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=on(fl.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(fl);const iZ=nZ;var us=wt,Gb=7,oZ=1,lp=30,sZ=7,fs="horizontal",Fb="vertical",lZ=5,uZ=["line","bar","candlestick","scatter"],fZ={easing:"cubicOut",duration:100,delay:0},hZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,a){this.api=a,this._onBrush=Y(this._onBrush,this),this._onBrushEnd=Y(this._onBrushEnd,this)},e.prototype.render=function(t,a,n,i){if(r.prototype.render.apply(this,arguments),Ro(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Qs(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new nt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(a),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,a=this.api,n=t.get("brushSelect"),i=n?sZ:0,o=this._findCoordRect(),s={width:a.getWidth(),height:a.getHeight()},l=this._orient===fs?{right:s.width-o.x-o.width,top:s.height-lp-Gb-i,width:o.width,height:lp}:{right:Gb,top:o.y,width:lp,height:o.height},u=Do(t.option);C(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var f=Jt(u,s);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===Fb&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,a=this._location,n=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(n===fs&&!o?{scaleY:l?1:-1,scaleX:1}:n===fs&&o?{scaleY:l?1:-1,scaleX:-1}:n===Fb&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=a.x-u.x,t.y=a.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=t.get("brushSelect");n.add(new us({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new us({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:Y(this._onClickPanel,this)}),s=this.api.getZr();i?(o.on("mousedown",this._onBrushStart,this),o.cursor="crosshair",s.on("mousemove",this._onBrush),s.on("mouseup",this._onBrushEnd)):(s.off("mousemove",this._onBrush),s.off("mouseup",this._onBrushEnd)),n.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var a=this._size,n=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var h=o.getDataExtent(l),v=(h[1]-h[0])*.3;h=[h[0]-v,h[1]+v];var c=[0,a[1]],p=[0,a[0]],d=[[a[0],0],[0,0]],g=[],y=p[1]/(o.count()-1),m=0,_=Math.round(o.count()/a[0]),S;o.each([l],function(A,M){if(_>0&&M%_){m+=y;return}var D=A==null||isNaN(A)||A==="",I=D?0:Lt(A,h,c,!0);D&&!S&&M?(d.push([d[d.length-1][0],0]),g.push([g[g.length-1][0],0])):!D&&S&&(d.push([m,0]),g.push([m,0])),d.push([m,I]),g.push([m,I]),m+=y,S=D}),u=this._shadowPolygonPts=d,f=this._shadowPolylinePts=g}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var b=this.dataZoomModel;function x(A){var M=b.getModel(A?"selectedDataBackground":"dataBackground"),D=new nt,I=new Be({shape:{points:u},segmentIgnoreThreshold:1,style:M.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),L=new ze({shape:{points:f},segmentIgnoreThreshold:1,style:M.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return D.add(I),D.add(L),D}for(var w=0;w<3;w++){var T=x(w===1);this._displayables.sliderGroup.add(T),this._displayables.dataShadowSegs.push(T)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,a=t.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();C(l,function(u){if(!n&&!(a!==!0&&ct(uZ,u.get("type"))<0)){var f=i.getComponent(Wa(o),s).axis,h=vZ(o),v,c=u.coordinateSystem;h!=null&&c.getOtherAxis&&(v=c.getOtherAxis(f).inverse),h=u.getData().mapDimension(h),n={thisAxis:f,series:u,thisDim:o,otherDim:h,otherAxisInverse:v}}},this)},this),n}},e.prototype._renderHandle=function(){var t=this.group,a=this._displayables,n=a.handles=[null,null],i=a.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,h=l.get("brushSelect"),v=a.filler=new us({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new us({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:oZ,fill:"rgba(0,0,0,0)"}})),C([0,1],function(_){var S=l.get("handleIcon");!Cf[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=Kt(S,-1,0,2,2,null,!0);b.attr({cursor:Hb(this._orient),draggable:!0,drift:Y(this._onDragMove,this,_),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=W(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),ri(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(n[_]=b);var A=l.getModel("textStyle");t.add(i[_]=new Ct({silent:!0,invisible:!0,style:Ot(A,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:A.getTextColor(),font:A.getFont()}),z2:10}))},this);var c=v;if(h){var p=W(l.get("moveHandleSize"),s[1]),d=a.moveHandle=new wt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=a.moveHandleIcon=Kt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,"#fff",!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));c=a.moveZone=new wt({invisible:!0,shape:{y:s[1]-m,height:p+m}}),c.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(c)}c.attr({draggable:!0,cursor:Hb(this._orient),drift:Y(this._onDragMove,this,"all"),ondragstart:Y(this._showDataInfo,this,!0),ondragend:Y(this._onDragEnd,this),onmouseover:Y(this._showDataInfo,this,!0),onmouseout:Y(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Lt(t[0],[0,100],a,!0),Lt(t[1],[0,100],a,!0)]},e.prototype._updateInterval=function(t,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];wi(a,i,o,n.get("zoomLock")?"all":t,s.minSpan!=null?Lt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Lt(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=or([Lt(i[0],o,l,!0),Lt(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var a=this._displayables,n=this._handleEnds,i=or(n.slice()),o=this._size;C([0,1],function(c){var p=a.handles[c],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:n[c]+(c?-1:1),y:o[1]/2-d/2})},this),a.filler.setShape({x:i[0],y:0,width:i[1]-i[0],height:o[1]});var s={x:i[0],width:i[1]-i[0]};a.moveHandle&&(a.moveHandle.setShape(s),a.moveZone.setShape(s),a.moveZone.getBoundingRect(),a.moveHandleIcon&&a.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=a.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fa[0]||n[1]<0||n[1]>a[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",n[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var a=t.offsetX,n=t.offsetY;this._brushStart=new ft(a,n),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(!!this._brushing){var a=this._displayables.brushRect;if(this._brushing=!1,!!a){a.attr("ignore",!0);var n=a.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(n.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=or([Lt(n.x,o,s,!0),Lt(n.x+n.width,o,s,!0)]),this._handleEnds=[n.x,n.x+n.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(fa(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new us({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),n.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,a),f=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?fZ:null,start:a[0],end:a[1]})},e.prototype._findCoordRect=function(){var t,a=qI(this.dataZoomModel).infoList;if(!t&&a.length){var n=a[0].model.coordinateSystem;t=n.getRect&&n.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(em);function vZ(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Hb(r){return r==="vertical"?"ns-resize":"ew-resize"}const cZ=hZ;function gL(r){r.registerComponentModel(iZ),r.registerComponentView(cZ),rm(r)}function pZ(r){yt(dL),yt(gL)}var dZ={get:function(r,e,t){var a=rt((gZ[r]||{})[e]);return t&&z(a)?a[a.length-1]:a}},gZ={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const yL=dZ;var Wb=he.mapVisual,yZ=he.eachVisual,mZ=z,$b=C,_Z=or,SZ=Lt,xZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,a,n){this.mergeDefaultAndTheme(t,n)},e.prototype.optionUpdated=function(t,a){var n=this.option;!a&&iL(n,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var a=this.stateList;t=Y(t,this),this.controllerVisuals=Ud(this.option.controller,a,t),this.targetVisuals=Ud(this.option.target,a,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,a=[];return t==null||t==="all"?this.ecModel.eachSeries(function(n,i){a.push(i)}):a=Rt(t),a},e.prototype.eachTargetSeries=function(t,a){C(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&t.call(a,i)},this)},e.prototype.isTargetSeries=function(t){var a=!1;return this.eachTargetSeries(function(n){n===t&&(a=!0)}),a},e.prototype.formatValueText=function(t,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],z(t)&&(t=t.slice(),u=!0);var f=a?t:u?[h(t[0]),h(t[1])]:h(t);if($(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(j(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?n[0]+" "+f[1]:t[1]===s[1]?n[1]+" "+f[0]:f[0]+" - "+f[1];return f;function h(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,a=_Z([t.min,t.max]);this._dataExtent=a},e.prototype.getDataDimensionIndex=function(t){var a=this.option.dimension;if(a!=null)return t.getDimensionIndex(a);for(var n=t.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});ht(i,n),ht(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(h){mZ(a.color)&&!h.inRange&&(h.inRange={color:a.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,v,c){var p=h[v],d=h[c];p&&!d&&(d=h[c]={},$b(p,function(g,y){if(!!he.isValidType(y)){var m=yL.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(h){var v=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,c=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";$b(this.stateList,function(y){var m=this.itemSize,_=h[y];_||(_=h[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=v&&rt(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=c&&rt(c)||(s?m[0]:[m[0],m[0]])),_.symbol=Wb(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;yZ(S,function(x){x>b&&(b=x)}),_.symbolSize=Wb(S,function(x){return SZ(x,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Tt);const jf=xZ;var Ub=[20,140],bZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=Ub[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=Ub[1])},e.prototype._resetRange=function(){var t=this.getExtent(),a=this.option.range;!a||a.auto?(t.auto=1,this.option.range=t):z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],t[0]),a[1]=Math.min(a[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),C(this.stateList,function(t){var a=this.option.controller[t].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),a=or((this.get("range")||[]).slice());return a[0]>t[1]&&(a[0]=t[1]),a[1]>t[1]&&(a[1]=t[1]),a[0]=n[1]||t<=a[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},e.prototype.getVisualMeta=function(t){var a=Yb(this,"outOfRange",this.getExtent()),n=Yb(this,"inRange",this.option.range.slice()),i=[];function o(c,p){i.push({value:c,color:t(c,p)})}for(var s=0,l=0,u=n.length,f=a.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(t[1],"color",a),offset:1}),i},e.prototype._createBarPoints=function(t,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],t[0]],[n[0],t[0]],[n[0],t[1]],[n[0]-a[1],t[1]]]},e.prototype._createBarGroup=function(t){var a=this._orient,n=this.visualMapModel.get("inverse");return new nt(a==="horizontal"&&!n?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,a){if(!!this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent();AZ([0,1],function(f){var h=o[f];h.setStyle("fill",a.handlesColor[f]),h.y=t[f];var v=Rr(t[f],[0,l[1]],u,!0),c=this.getControllerVisual(v,"symbolSize");h.scaleX=h.scaleY=c/l[0],h.x=l[0]-c/2;var p=xr(n.handleLabelPoints[f],ai(h,this.group));s[f].setStyle({x:p[0],y:p[1],text:i.formatValueText(this._dataInterval[f]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",n.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,h=f.indicator;if(!!h){h.attr("invisible",!1);var v={convertOpacityToAlpha:!0},c=this.getControllerVisual(t,"color",v),p=this.getControllerVisual(t,"symbolSize"),d=Rr(t,s,u,!0),g=l[0]-p/2,y={x:h.x,y:h.y};h.y=d,h.x=g;var m=xr(f.indicatorLabelPoint,ai(h,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:d,style:{fill:c}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var A={duration:100,easing:"cubicInOut",additive:!0};h.x=y.x,h.y=y.y,h.animateTo(w,A),_.animateTo(T,A)}else h.attr(w),_.attr(T);this._firstShowIndicator=!1;var M=this._shapes.handleLabels;if(M)for(var D=0;Do[1]&&(h[1]=1/0),a&&(h[0]===-1/0?this._showIndicator(f,h[1],"< ",l):h[1]===1/0?this._showIndicator(f,h[0],"> ",l):this._showIndicator(f,f,"\u2248 ",l));var v=this._hoverLinkDataIndices,c=[];(a||Kb(n))&&(c=this._hoverLinkDataIndices=n.findTargetDataIndices(h));var p=yR(v,c);this._dispatchHighDown("downplay",af(p[0],n)),this._dispatchHighDown("highlight",af(p[1],n))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var a;if(Xn(t.target,function(l){var u=it(l);if(u.dataIndex!=null)return a=u,!0},!0),!!a){var n=this.ecModel.getSeriesByIndex(a.seriesIndex),i=this.visualMapModel;if(!!i.isTargetSeries(n)){var o=n.getData(a.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),a.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var a=this._shapes.handleLabels;if(a)for(var n=0;n=0&&(i.dimension=o,a.push(i))}}),r.getData().setVisual("visualMeta",a)}}];function kZ(r,e,t,a){for(var n=e.targetVisuals[a],i=he.prepareVisualTypes(n),o={color:xl(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(PZ,RZ),C(EZ,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(OZ))}function xL(r){r.registerComponentModel(wZ),r.registerComponentView(LZ),SL(r)}var NZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],VZ[this._mode].call(this,this._pieceList),this._resetSelected(t,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=rt(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=G(this._pieceList,function(l){return l=rt(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,a={},n=he.listVisualTypes(),i=this.isCategory();C(t.pieces,function(s){C(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),C(a,function(s,l){var u=!1;C(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&C(this.stateList,function(f){(t[f]||(t[f]={}))[l]=yL.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,a){var n=this.option,i=this._pieceList,o=(a?n:t).selected||{};if(n.selected=o,C(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),n.selectedMode==="single"){var s=!1;C(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=rt(t)},e.prototype.getValueState=function(t){var a=he.findPieceIndex(t,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=he.findPieceIndex(l,n);f===t&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},e.prototype.getRepresentValue=function(t){var a;if(this.isCategory())a=t.value;else if(t.value!=null)a=t.value;else{var n=t.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(f,h){var v=i.getRepresentValue({interval:f});h||(h=i.getValueState(v));var c=t(v,h);f[0]===-1/0?n[0]=c:f[1]===1/0?n[1]=c:a.push({value:f[0],color:c},{value:f[1],color:c})}var s=this._pieceList.slice();if(!s.length)s.push({interval:[-1/0,1/0]});else{var l=s[0].interval[0];l!==-1/0&&s.unshift({interval:[-1/0,l]}),l=s[s.length-1].interval[1],l!==1/0&&s.push({interval:[l,1/0]})}var u=-1/0;return C(s,function(f){var h=f.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:a,outerColors:n}},e.type="visualMap.piecewise",e.defaultOption=on(jf.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e}(jf),VZ={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),a=this.getExtent(),n=e.splitNumber;n=Math.max(parseInt(n,10),1),e.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","\u2265"][a[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,n)},this)}};function tw(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}const BZ=NZ;var zZ=function(r){k(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=i.getFont(),s=i.getTextColor(),l=this._getItemAlign(),u=a.itemSize,f=this._getViewData(),h=f.endsText,v=oe(a.get("showLabel",!0),!h);h&&this._renderEndsText(t,h[0],u,v,l),C(f.viewPieceList,function(c){var p=c.piece,d=new nt;d.onclick=Y(this._onItemClick,this,p),this._enableHoverLink(d,c.indexInModelPieceList);var g=a.getRepresentValue(p);if(this._createItemSymbol(d,g,[0,0,u[0],u[1]]),v){var y=this.visualMapModel.getValueState(g);d.add(new Ct({style:{x:l==="right"?-n:u[0]+n,y:u[1]/2,text:p.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1}}))}t.add(d)},this),h&&this._renderEndsText(t,h[1],u,v,l),ni(a.get("orient"),t,a.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,a){var n=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=n.visualMapModel;s.option.hoverLink&&n.api.dispatchAction({type:o,batch:af(s.findTargetDataIndices(a),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,a=t.option;if(a.orient==="vertical")return _L(t,this.api,t.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},e.prototype._renderEndsText=function(t,a,n,i,o){if(!!a){var s=new nt,l=this.visualMapModel.textStyleModel;s.add(new Ct({style:Ot(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,a=G(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},e.prototype._createItemSymbol=function(t,a,n){t.add(Kt(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color")))},e.prototype._onItemClick=function(t){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(!!i){var o=rt(n.selected),s=a.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,C(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e}(mL);const GZ=zZ;function bL(r){r.registerComponentModel(BZ),r.registerComponentView(GZ),SL(r)}function FZ(r){yt(xL),yt(bL)}var HZ={label:{enabled:!0},decal:{show:!1}},ew=xt(),WZ={};function $Z(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var a=rt(HZ);ht(a.label,r.getLocaleModel().get("aria"),!1),ht(t.option,a,!1),n(),i();function n(){var u=t.getModel("decal"),f=u.get("show");if(f){var h=X();r.eachSeries(function(v){if(!v.isColorBySeries()){var c=h.get(v.type);c||(c={},h.set(v.type,c)),ew(v).scope=c}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(j(v.enableAriaDecal)){v.enableAriaDecal();return}var c=v.getData();if(v.isColorBySeries()){var m=Jp(v.ecModel,v.name,WZ,r.getSeriesCount()),_=c.getVisual("decal");c.setVisual("decal",S(_,m))}else{var p=v.getRawData(),d={},g=ew(v).scope;c.each(function(b){var x=c.getRawIndex(b);d[x]=b});var y=p.count();p.each(function(b){var x=d[b],w=p.getName(b)||b+"",T=Jp(v.ecModel,w,g,y),A=c.getItemVisual(x,"decal");c.setItemVisual(x,"decal",S(A,T))})}function S(b,x){var w=b?B(B({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(!!u){var f=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=tt(h.option,f),!!h.get("enabled")){if(h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var v=r.getSeriesCount(),c=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,d=Math.min(v,p),g;if(!(v<1)){var y=s();if(y){var m=h.get(["general","withTitle"]);g=o(m,{title:y})}else g=h.get(["general","withoutTitle"]);var _=[],S=v>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,A){if(A1?h.get(["series","multiple",I]):h.get(["series","single",I]),M=o(M,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var L=T.getData();if(L.count()>c){var P=h.get(["data","partialData"]);M+=o(P,{displayCnt:c})}else M+=h.get(["data","allData"]);for(var R=h.get(["data","separator","middle"]),E=h.get(["data","separator","end"]),N=[],O=0;O":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},ZZ=function(){function r(e){var t=this._condVal=$(e)?new RegExp(e):C2(e)?e:null;if(t==null){var a="";It(a)}}return r.prototype.evaluate=function(e){var t=typeof e;return $(t)?this._condVal.test(e):Mt(t)?this._condVal.test(e+""):!1},r}(),XZ=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),qZ=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&a.push(n),n=[L,P]}function f(L,P,R,E){Ji(L,R)&&Ji(P,E)||n.push(L,P,R,E,R,E)}function h(L,P,R,E,N,O){var V=Math.abs(P-L),F=Math.tan(V/4)*4/3,H=PT:D2&&a.push(n),a}function Jd(r,e,t,a,n,i,o,s,l,u){if(Ji(r,t)&&Ji(e,a)&&Ji(n,o)&&Ji(i,s)){l.push(o,s);return}var f=2/u,h=f*f,v=o-r,c=s-e,p=Math.sqrt(v*v+c*c);v/=p,c/=p;var d=t-r,g=a-e,y=n-o,m=i-s,_=d*d+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var A=[],M=[];qa(r,t,n,o,.5,A),qa(e,a,i,s,.5,M),Jd(A[0],M[0],A[1],M[1],A[2],M[2],A[3],M[3],l,u),Jd(A[4],M[4],A[5],M[5],A[6],M[6],A[7],M[7],l,u)}function uX(r,e){var t=Qd(r),a=[];e=e||1;for(var n=0;n0)for(var u=0;uMath.abs(u),h=TL([l,u],f?0:1,e),v=(f?s:u)/h.length,c=0;cn,o=TL([a,n],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",h=r[s]/o.length,v=0;v1?null:new ft(d*l+r,d*u+e)}function vX(r,e,t){var a=new ft;ft.sub(a,t,e),a.normalize();var n=new ft;ft.sub(n,r,e);var i=n.dot(a);return i}function Wi(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function cX(r,e,t){for(var a=r.length,n=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),cX(e,u,f)}function Qf(r,e,t,a){if(t===1)a.push(e);else{var n=Math.floor(t/2),i=r(e);Qf(r,i[0],n,a),Qf(r,i[1],t-n,a)}return a}function pX(r,e){for(var t=[],a=0;a0)for(var b=a/t,x=-a/2;x<=a/2;x+=b){for(var w=Math.sin(x),T=Math.cos(x),A=0,_=0;_0;u/=2){var f=0,h=0;(r&u)>0&&(f=1),(e&u)>0&&(h=1),s+=u*u*(3*f^h),h===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function eh(r){var e=1/0,t=1/0,a=-1/0,n=-1/0,i=G(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(h,t),a=Math.max(f,a),n=Math.max(h,n),[f,h]}),o=G(i,function(s,l){return{cp:s,z:wX(s[0],s[1],e,t,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function ML(r){return yX(r.path,r.count)}function tg(){return{fromIndividuals:[],toIndividuals:[],count:0}}function TX(r,e,t){var a=[];function n(b){for(var x=0;x=0;n--)if(!t[n].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[n].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var CX={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),a=0;a0))return;var s=a.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;fw(r)&&(u=r,f=e),fw(e)&&(u=e,f=r);function h(y,m,_,S,b){var x=y.many,w=y.one;if(x.length===1&&!b){var T=m?x[0]:w,A=m?w:x[0];if(Jf(T))h({many:[T],one:A},!0,_,S,!0);else{var M=s?tt({delay:s(_,S)},l):l;vm(T,A,M),i(T,A,T,A,M)}}else for(var D=tt({dividePath:CX[t],individualDelay:s&&function(N,O,V,F){return s(N+_,S)}},l),I=m?TX(x,w,D):AX(w,x,D),L=I.fromIndividuals,P=I.toIndividuals,R=L.length,E=0;Ee.length,c=u?hw(f,u):hw(v?e:r,[v?r:e]),p=0,d=0;dDL))for(var i=a.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof mt&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function gw(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function yw(r){return z(r)?r.sort().join(","):r}function Ea(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function EX(r,e){var t=X(),a=X(),n=X();return C(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=gw(i),f=yw(u);a.set(f,{dataGroupId:s,data:l}),z(u)&&C(u,function(h){n.set(h,{key:f,dataGroupId:s,data:l})})}),C(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=gw(i),u=yw(l),f=a.get(u);if(f)t.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Ea(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Ea(s),data:s}]});else if(z(l)){var h=[];C(l,function(p){var d=a.get(p);d.data&&h.push({dataGroupId:d.dataGroupId,divide:Ea(d.data),data:d.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:Ea(s)}]})}else{var v=n.get(l);if(v){var c=t.get(v.key);c||(c={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:Ea(v.data)}],newSeries:[]},t.set(v.key,c)),c.newSeries.push({dataGroupId:o,data:s,divide:Ea(s)})}}}}),t}function mw(r,e){for(var t=0;t=0&&n.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ea(e.oldData[s]),groupIdDim:o.dimension})}),C(Rt(r.to),function(o){var s=mw(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ea(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&IL(n,i,a)}function OX(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,a){C(Rt(a.seriesTransition),function(n){C(Rt(n.to),function(i){for(var o=a.updatedSeries,s=0;s{a&&a.dispose();const{date:o,stats:s}=i;a=wV(t.value);const l=new Set;Object.values(s).forEach(d=>{Object.keys(d).forEach(g=>{l.add(g)})});const u=Array.from(l),f={},h=[],v=o.length;u.forEach(d=>{f[d]={name:"",data:new Array(v).fill(0)}}),Object.values(s).forEach(d=>{u.forEach(g=>{if(d[g]&&Array.isArray(d[g].data)){const y=d[g].cht_name;f[g].name=y;for(let m=0;m{d.name&&(h.push(d.name),c.push({name:d.name,type:"line",stack:"Total",data:d.data}))});const p={tooltip:{trigger:"axis"},legend:{data:h},grid:{left:"3%",right:"4%",bottom:"3%",containLabel:!0},toolbox:{feature:{saveAsImage:{}}},xAxis:{type:"category",boundaryGap:!1,data:o},yAxis:{type:"value"},series:c};a.setOption(p)};return eg(()=>e.data,()=>{n(e.data)},{deep:!0}),nf(()=>{n(e.data)}),(i,o)=>(ne(),ue("div",NX,[J("div",VX,[J("div",{ref_key:"chartRef",ref:t,style:{height:"600px"}},null,512)])]))}},BX={class:"row"},zX={class:"col-md-6"},GX=J("h5",{class:"text-dark mb-3 fw-bold"},"\u5132\u5B58\u70BA\u5E38\u7528\u8A2D\u5B9A",-1),FX={class:"mb-3"},HX=J("label",{for:"name"},"\u5E38\u7528\u67E5\u8A62\u540D\u7A31",-1),WX={class:"mb-3"},$X=J("label",{for:"range"},"\u67E5\u8A62\u5340\u9593",-1),UX=["value"],YX={class:"border border-1 p-3 rounded-3"},ZX=J("p",{class:"mb-2"}," \u8981\u67E5\u8A62\u7684\u5167\u5BB9 ",-1),XX={class:"list list-unstyled overflow-scroll",style:{height:"150px"}},qX={class:"form-check"},KX=["id","value","checked"],jX=["for"],QX={class:"mb-3"},JX=J("label",{for:"end-time",class:"form-label"},"\u67E5\u8A62\u985E\u578B",-1),tq=["value"],eq={class:"mb-3"},rq=J("label",{for:"form"},"\u8D77\u59CB\u65E5\u671F",-1),aq={class:"mb-3"},nq=J("label",{for:"to"},"\u7D50\u675F\u65E5\u671F",-1),iq=J("div",{class:"d-flex justify-content-end"},[J("button",{type:"submit",class:"btn btn-outline-primary"},"\u5132\u5B58")],-1),oq={class:"col-md-6"},sq=J("h5",{class:"text-dark mb-3 fw-bold"},"\u5957\u7528\u5E38\u7528\u8A2D\u5B9A",-1),lq={class:"list-group list-group-flush"},uq=["onClick"],fq=["onClick","id"],hq=["for"],vq=J("div",{class:"d-flex justify-content-end"},[J("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u95DC\u9589 ")],-1),gq={__name:"FavoriteModal",props:{status:{type:String},data:{type:Object,default(){return{list:[],type:[],range:[]}}},favoriteList:{type:Array,default(){return[]}},options:{type:Object,default(){return{}}}},emits:["applyFavorite","saveFavorite","deleteFavorite"],setup(r,{expose:e,emit:t}){const a=r,n=kr(null),i=kr(null),o=kr(""),s=kr({name:a.options.name||"",type:a.options.type||"",[o.value]:[],range:a.options.range||"",from:a.options.from||"",to:a.options.to||""});eg(()=>a.options,c=>{s.value=c});const l=()=>{i.value.show()},u=()=>{i.value.hide()};nf(()=>{i.value=new EL(n.value.hModal),o.value=a.status==="questions"?"videoCourseIds":"taskGroupIds"});const f=c=>{t("saveFavorite",c)},h=(c,p)=>{t("applyFavorite",{...p,name:c})},v=c=>{t("deleteFavorite",c)};return e({show:l,hide:u}),(c,p)=>(ne(),kL(NL,{ref_key:"modalRef",ref:n,modalSize:"modal-xl","has-footer":!0},{body:OL(()=>[J("div",BX,[J("div",zX,[GX,J("form",{onSubmit:p[6]||(p[6]=_w(()=>f(s.value),["prevent"]))},[J("div",FX,[HX,er(J("input",{"onUpdate:modelValue":p[0]||(p[0]=d=>s.value.name=d),type:"text",class:"form-control",id:"name",placeholder:"\u8ACB\u8F38\u5165\u540D\u7A31"},null,512),[[to,s.value.name]])]),J("div",WX,[$X,er(J("select",{"onUpdate:modelValue":p[1]||(p[1]=d=>s.value.range=d),class:"form-select","aria-label":"\u67E5\u8A62\u5340\u9593"},[(ne(!0),ue(Hn,null,Wn(a.data.range,({name:d,cht_name:g})=>(ne(),ue("option",{value:d,key:d},ka(g),9,UX))),128))],512),[[of,s.value.range]])]),J("div",YX,[ZX,J("ul",XX,[(ne(!0),ue(Hn,null,Wn(a.data.list,({id:d,name:g})=>(ne(),ue("li",{class:"border border-2 rounded-3 p-2 mb-2",key:d},[J("div",qX,[er(J("input",{"onUpdate:modelValue":p[2]||(p[2]=y=>s.value[o.value]=y),id:d,type:"checkbox",class:"form-check-input",value:d,checked:a.options[o.value].includes(d)},null,8,KX),[[Sw,s.value[o.value]]]),J("label",{for:d,class:"form-check-label"},ka(g),9,jX)])]))),128))])]),J("div",QX,[JX,er(J("select",{"onUpdate:modelValue":p[3]||(p[3]=d=>s.value.type=d),class:"form-select","aria-label":"Default select example"},[(ne(!0),ue(Hn,null,Wn(a.data.type,({name:d,cht_name:g})=>(ne(),ue("option",{value:d,key:d},ka(g),9,tq))),128))],512),[[of,s.value.type]])]),J("div",eq,[rq,er(J("input",{"onUpdate:modelValue":p[4]||(p[4]=d=>s.value.from=d),type:"date",class:"form-control",id:"form"},null,512),[[to,s.value.from]])]),J("div",aq,[nq,er(J("input",{"onUpdate:modelValue":p[5]||(p[5]=d=>s.value.to=d),type:"date",class:"form-control",id:"to"},null,512),[[to,s.value.to]])]),iq],32)]),J("div",oq,[sq,J("ul",lq,[(ne(!0),ue(Hn,null,Wn(a.favoriteList,({id:d,name:g,query_params:y})=>(ne(),ue("li",{class:"list-group-item d-flex align-items-center",key:d},[J("button",{onClick:()=>v(d),type:"button",class:"btn btn-outline-danger btn-sm me-2"},"X",8,uq),J("input",{onClick:()=>h(g,y),class:"form-check-input me-1",type:"radio",name:"listGroupRadio",id:`firstRadio-${d}`},null,8,fq),J("label",{class:"form-check-label",for:`firstRadio-${d}`},ka(g),9,hq)]))),128))])])]),vq]),_:1},512))}};export{pq as _,dq as a,gq as b}; diff --git a/assets/Group.17117b95.js b/assets/Group.17117b95.js new file mode 100644 index 0000000..eb44a97 --- /dev/null +++ b/assets/Group.17117b95.js @@ -0,0 +1 @@ +import{r as d,s as X,z as P,a as c,e as j,f as C,A as u,b as e,E as L,w as K,C as H,M as Y,_ as Z,D as ee,o as se,c as _,v as te,O as ae,F,q as N,i as oe,x as B,B as le,G as ne,h as x,p as z,g as I,P as ie,R as de,S as re}from"./index.8b9bb582.js";import{a as J}from"./task.9bd3355c.js";import{a as ce}from"./task-tags.ac385c58.js";const ue={class:"row"},pe={class:"col-6"},ve={class:"mb-3"},me=e("label",{for:"taskGroupName",class:"form-label text-dark"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1),_e={class:"col-6"},ke={class:"mb-3"},be=e("label",{for:"taskGroupKeyword",class:"form-label text-dark"},"\u82F1\u6587\u540D\u7A31",-1),fe={class:"mb-3"},ge=e("label",{for:"taskGroupDescription",class:"form-label text-dark"},"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",-1),ye={class:"mb-3"},he=e("label",{for:"taskGroupEndDate",class:"form-label text-dark"},"\u5230\u671F\u65E5",-1),we={class:"form-check"},xe=e("label",{for:"taskGroupEnable",class:"form-check-label text-dark"},"\u662F\u5426\u986F\u793A",-1),Ge=["disabled"],$e={__name:"CreateTaskGroupModal",props:{tempTaskGroupData:{type:Object,default(){return{}}}},emits:["createTaskGroupMethod"],setup(G,{expose:q,emit:S}){const E=G,{apiPostTaskGroup:k}=J,m=d(),t=d({name:"",keyword:"",description:"",expired_at:"",enable:!1}),R=d(null);X(()=>{t.value=E.tempTaskGroupData});const V=async()=>{let g={};try{t.value.expired_at?g={name:t.value.name,keyword:t.value.keyword,description:t.value.description,expired_at:new Date(t.value.expired_at).toISOString(),enable:t.value.enable}:g={name:t.value.name,keyword:t.value.keyword,description:t.value.description,enable:t.value.enable},await k(g),S("createTaskGroupMethod",{target:"import",type:"\u6210\u529F"}),m.value.resetForm(),t.value.enable=!1}catch(n){S("createTaskGroupMethod",{target:"import",type:"\u5931\u6557",error:`${n.response.status}:${n.response.data.message}`})}};return q({createTaskGroupModalRef:R}),(g,n)=>{const y=P("Field"),$=P("ErrorMessage"),T=P("VForm");return c(),j(T,{ref_key:"formRef",ref:m,onSubmit:V},{default:C(({errors:b,invalid:M})=>[u(Y,{id:"createTaskGroupModal",ref_key:"createTaskGroupModalRef",ref:R,"has-footer":!0,title:"\u65B0\u589E\u4EFB\u52D9\u7FA4\u7D44","class-list":""},{body:C(()=>[e("div",ue,[e("div",pe,[e("div",ve,[me,u(y,{id:"taskGroupName",modelValue:t.value.name,"onUpdate:modelValue":n[0]||(n[0]=p=>t.value.name=p),name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",type:"text",class:L(["form-control",{"is-invalid":b.\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",class:"invalid-feedback"})])]),e("div",_e,[e("div",ke,[be,u(y,{id:"taskGroupKeyword",modelValue:t.value.keyword,"onUpdate:modelValue":n[1]||(n[1]=p=>t.value.keyword=p),name:"\u82F1\u6587\u540D\u7A31",type:"text",class:L(["form-control",{"is-invalid":b.\u82F1\u6587\u540D\u7A31}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u82F1\u6587\u540D\u7A31",class:"invalid-feedback"})])])]),e("div",fe,[ge,u(y,{id:"taskGroupDescription",modelValue:t.value.description,"onUpdate:modelValue":n[2]||(n[2]=p=>t.value.description=p),as:"textarea",name:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",type:"text",class:L(["form-control",{"is-invalid":b.\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),u($,{name:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0",class:"invalid-feedback"})]),e("div",ye,[he,u(y,{id:"taskGroupEndDate",modelValue:t.value.expired_at,"onUpdate:modelValue":n[3]||(n[3]=p=>t.value.expired_at=p),name:"\u5230\u671F\u65E5",type:"date",class:L(["form-control",{"is-invalid":b.\u5230\u671F\u65E5}])},null,8,["modelValue","class"]),u($,{name:"\u5230\u671F\u65E5",class:"invalid-feedback"})]),e("div",we,[K(e("input",{type:"checkbox",id:"taskGroupEnable",class:"form-check-input","onUpdate:modelValue":n[4]||(n[4]=p=>t.value.enable=p)},null,512),[[H,t.value.enable]]),xe])]),footer:C(()=>[e("button",{type:"submit",disabled:M,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,Ge)]),_:2},1536)]),_:1},512)}}};const D=G=>(de("data-v-9c41d8b7"),G=G(),re(),G),Te={class:"taskGroups px-4 mt-4"},Me=D(()=>e("h1",{class:"fs-4 mb-3"},"\u4EFB\u52D9\u7FA4\u7D44",-1)),Ve={class:"d-flex justify-content-between align-items-center mb-3"},Le={class:"row w-75"},Ce={class:"col-md-6"},De=D(()=>e("p",{class:"mb-1"},"\u6A19\u7C64\u7BE9\u9078",-1)),Se={class:"list-unstyled d-flex flex-wrap mb-2"},Ee=["value","onClick","id"],Re=["for"],Ue={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Fe={class:"card-body p-0"},Ne={class:"table-responsive"},Be={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Pe=D(()=>e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u7FA4\u7D44\u540D\u7A31 "),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u82F1\u6587\u540D\u7A31"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u4F7F\u7528\u8005\u7FA4\u7D44"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u5206\u985E\u6A19\u7C64"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u662F\u5426\u986F\u793A"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u5230\u671F\u6642\u9593"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u7DE8\u8F2F")])],-1)),qe={class:"text-nowrap"},Ae={scope:"row",class:"ps-4"},Ie={scope:"row",class:"ps-4"},Ke={scope:"row",class:"ps-4"},Oe={key:0},ze={key:0},je={scope:"row",class:"ps-4"},He={scope:"row",class:"ps-4"},Je={scope:"row",class:"ps-4"},Qe=D(()=>e("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),We=["onClick"],Xe=D(()=>e("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1)),Ye={class:"card-footer bg-white py-3"},Ze={class:"d-flex flex-wrap align-items-start"},es={__name:"Group",setup(G){const{apiGetTaskGroupsList:q}=J,{apiGetTaskTags:S}=ce,E=ee.useLoading(),k=d({taskGroupsList:[],pagination:{total:10,count:10,total_page:10,current_page:1}}),m=d(""),t=async(o=1)=>{var f,s,i,w;const a=E.show();try{const{task_groups:l,pagination:U}=await q({page:o,scoped:m.value});k.value.taskGroupsList=l,k.value.pagination=U}catch(l){B("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${(s=(f=l==null?void 0:l.response)==null?void 0:f.data)==null?void 0:s.statusCode} : ${(w=(i=l==null?void 0:l.response)==null?void 0:i.data)==null?void 0:w.message}`)}finally{a.hide()}},R=o=>{t(o)},V=d(""),g=d(null),n=d({}),y=(o,a)=>{o==="copy"?n.value={...a}:o==="add"&&(n.value={}),V.value.show()},$=o=>{o.type==="\u6210\u529F"?B("success","\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44"):o.type==="\u5931\u6557"&&B("danger","\u5EFA\u7ACB\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",o.error),V.value.hide(),t()},T=d({tagList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),b=d([]),M=d(1),p=async(o=1)=>{var f,s,i,w;const a=E.show();try{const{task_tags:l,pagination:U}=await S({page:o,count:100});T.value.tagList=l,T.value.pagination=U,M.value=U.current_page,b.value=[...b.value,...l]}catch(l){B("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(s=(f=l==null?void 0:l.response)==null?void 0:f.data)==null?void 0:s.statusCode}:${(w=(i=l==null?void 0:l.response)==null?void 0:i.data)==null?void 0:w.message}`)}finally{a.hide()}},O=async(o=1)=>{await p(o),T.value.pagination.total_page!==0&&M.value!==T.value.pagination.total_page&&(M.value+=1,O(M.value))},A=d(!1),r=d(""),h=d([]),v=d(""),Q=()=>{r.value=r.value.trim(),v.value&&r.value?m.value=`&keyword=${r.value}&task_tags=${v.value}`:v.value||r.value?m.value=`${r.value?`&keyword=${r.value}`:""}${v.value?`&task_tags=${v.value}`:""}`:m.value="",t()},W=o=>{h.value.includes(o)?h.value=h.value.filter(a=>a!==o):h.value.push(o),v.value=h.value.toString(),v.value&&r.value?m.value=`&keyword=${r.value}&task_tags=${v.value}`:v.value||r.value?m.value=`${r.value?`&keyword=${r.value}`:""}${v.value?`&task_tags=${v.value}`:""}`:m.value="",t()};return se(async()=>{await t(),O(),V.value=new le(g.value.createTaskGroupModalRef.hModal)}),(o,a)=>{const f=P("router-link");return c(),_("div",Te,[Me,e("div",Ve,[e("div",Le,[e("div",Ce,[K(e("input",{onCompositionstart:a[0]||(a[0]=s=>A.value=!0),onCompositionend:a[1]||(a[1]=s=>A.value=!1),placeholder:"\u641C\u5C0B\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31\u3001\u82F1\u6587\u540D\u7A31",class:"form-control",type:"text","onUpdate:modelValue":a[2]||(a[2]=s=>r.value=s),onKeydown:a[3]||(a[3]=ae(ne(()=>{A.value||Q()},["prevent"]),["enter"]))},null,544),[[te,r.value]])])]),e("button",{type:"button",class:"btn btn-primary",onClick:a[4]||(a[4]=s=>y("add"))}," \u65B0\u589E\u7FA4\u7D44 ")]),De,e("ul",Se,[(c(!0),_(F,null,N(b.value,s=>(c(),_("li",{key:s.id,class:"me-2 mb-2"},[K(e("input",{type:"checkbox",class:"btn-check","onUpdate:modelValue":a[5]||(a[5]=i=>h.value=i),value:s.id,onClick:i=>W(s.id),id:`btn-tag-${s.id}`},null,8,Ee),[[H,h.value]]),e("label",{class:"btn btn-sm custom-btn-primary-tag",for:`btn-tag-${s.id}`},x(s.name),9,Re)]))),128))]),e("div",Ue,[e("div",Fe,[e("div",Ne,[e("table",Be,[Pe,e("tbody",qe,[(c(!0),_(F,null,N(k.value.taskGroupsList,s=>(c(),_("tr",{key:s.id,class:"align-middle"},[e("td",Ae,x(s.name),1),e("td",Ie,x(s.keyword),1),e("td",Ke,[s.user_groups.length===0?(c(),_("span",Oe,"\u7121")):z("",!0),(c(!0),_(F,null,N(s.user_groups,(i,w)=>(c(),j(f,{key:i.id,target:"_blank",to:`/admin/users/groups/${i.id}`},{default:C(()=>[I(x(i.name)+" ",1),s.user_groups.length>1&&w(c(),_("span",{key:i,class:"badge bg-light text-primary me-1"},x(i),1))),128))]),e("td",{scope:"row",class:L(["ps-4",{"text-success":s.enable}])},x(s.enable?"\u662F":"\u5426"),3),e("td",He,x(new Date(s.expired_at).toLocaleDateString("sv-SE")),1),e("td",Je,[u(f,{to:`/admin/task/group/${s.id}`,class:"btn btn-sm btn-outline-gray ms-1"},{default:C(()=>[Qe,I(" \u7DE8\u8F2F ")]),_:2},1032,["to"]),e("button",{class:"btn btn-sm btn-outline-gray ms-1",type:"button",onClick:i=>y("copy",s)},[Xe,I(" \u8907\u88FD ")],8,We)])]))),128))])])])]),e("div",Ye,[e("div",Ze,[u(oe(ie),{modelValue:k.value.pagination.current_page,"onUpdate:modelValue":a[6]||(a[6]=s=>k.value.pagination.current_page=s),records:k.value.pagination.total,"per-page":10,options:{chunk:6},onPaginate:R},null,8,["modelValue","records"])])])]),u($e,{ref_key:"createTaskGroupModalComponentRef",ref:g,"temp-task-group-data":n.value,onCreateTaskGroupMethod:$},null,8,["temp-task-group-data"])])}}},ls=Z(es,[["__scopeId","data-v-9c41d8b7"]]);export{ls as default}; diff --git a/assets/Group.ef60d323.css b/assets/Group.ef60d323.css new file mode 100644 index 0000000..5300a16 --- /dev/null +++ b/assets/Group.ef60d323.css @@ -0,0 +1 @@ +.custom-btn-primary-tag[data-v-9c41d8b7]{background-color:var(--bs-gray-100);color:var(--bs-primary)}.custom-btn-primary-tag[data-v-9c41d8b7]:hover{background-color:var(--bs-gray-200)}.btn-check:checked+.custom-btn-primary-tag[data-v-9c41d8b7]{background-color:var(--bs-primary);color:var(--bs-gray-300)} diff --git a/assets/GroupDetail.6e8f4b29.css b/assets/GroupDetail.6e8f4b29.css new file mode 100644 index 0000000..dcef1b0 --- /dev/null +++ b/assets/GroupDetail.6e8f4b29.css @@ -0,0 +1 @@ +.card-body[data-v-1ed1d075]{height:200px;overflow-y:auto} diff --git a/assets/GroupDetail.ea54ceca.js b/assets/GroupDetail.ea54ceca.js new file mode 100644 index 0000000..e8a7ff5 --- /dev/null +++ b/assets/GroupDetail.ea54ceca.js @@ -0,0 +1 @@ +import{_ as le,l as ne,D as ie,r,s as re,o as ce,z as D,a as _,c as v,b as e,A as m,f as z,x as k,g as j,E as T,F as S,q as $,w as h,C as N,h as F,v as M,Q as de,R as ue,S as pe,y as _e}from"./index.8b9bb582.js";import{a as ve}from"./task.9bd3355c.js";import{a as he}from"./task-tags.ac385c58.js";const i=y=>(ue("data-v-1ed1d075"),y=y(),pe(),y),me={class:"taskGroupDetail px-4 mt-4"},fe={class:"border-bottom border-light pb-2 mb-3"},ge={"aria-label":"breadcrumb"},be={class:"breadcrumb"},ke={class:"breadcrumb-item"},ye=i(()=>e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44 ",-1)),Ge=i(()=>e("h1",{class:"fs-4"},"\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44",-1)),Le={class:"row"},we={class:"col-md-6"},xe={class:"mb-3"},De=i(()=>e("label",{for:"taskGroupInfoName",class:"form-label"},"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",-1)),Ce={class:"col-md-6"},Ee={class:"mb-3"},Ve=i(()=>e("label",{for:"taskGroupInfoKeyword",class:"form-label"},"\u82F1\u6587\u540D\u7A31",-1)),Ue={class:"card shadow-sm rounded-4 overflow-hidden mb-3"},Ie=i(()=>e("div",{class:"card-header bg-white py-3"}," \u5206\u985E\u6A19\u7C64 ",-1)),Te={class:"list-unstyled mb-0"},Se={class:"form-check"},$e=["value","id","checked"],Ne=["for"],Fe=i(()=>e("hr",null,null,-1)),Me={class:"mb-3"},Re=i(()=>e("label",{for:"taskGroupDescription",class:"form-label"},"\u63CF\u8FF0",-1)),Ke={class:"row"},He={class:"col-md-6"},qe={class:"mb-3"},Ae=i(()=>e("label",{class:"form-label",for:"groupEnd"},"\u5230\u671F\u65E5",-1)),Be={class:"form-check mb-3"},Oe=["checked"],Pe=i(()=>e("label",{class:"form-check-label",for:"showCheck"}," \u662F\u5426\u986F\u793A ",-1)),ze=i(()=>e("hr",null,null,-1)),je={class:"my-3"},Qe=i(()=>e("label",{class:"form-label",for:"userGroup"},"\u5C0D\u61C9\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),Je=i(()=>e("option",{value:"choose"},"\u9078\u64C7\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),We=i(()=>e("option",{value:""},"\u4E0D\u8A2D\u5B9A",-1)),Xe=[Je,We],Ye={class:"card-header bg-white py-3"},Ze={class:"row align-items-center justify-content-between"},es={class:"col"},ss=i(()=>e("p",{class:"mb-sm-0"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868",-1)),as={class:"small my-1"},os={class:"col-sm-6"},ts={class:"input-group"},ls={class:"list-unstyled mb-0"},ns={class:"form-check"},is=["value","id","checked"],rs=["for"],cs=i(()=>e("hr",null,null,-1)),ds=i(()=>e("button",{type:"submit",class:"btn btn-primary d-block ms-auto"}," \u78BA\u8A8D\u66F4\u65B0 ",-1)),us={__name:"GroupDetail",setup(y){const{apiGetTaskGroupDetail:Q,apiPutTaskGroupDetail:J}=ve,{apiGetUserGroups:W}=_e,{apiGetTaskTags:X}=he,Y=ne(),C=ie.useLoading(),u=r(""),p=r([]),t=r({}),R=async a=>{var c,n;const s=C.show();try{const{task_group:l}=await Q(a);t.value={...l},t.value.expired_at=new Date(t.value.expired_at).toLocaleDateString("sv-SE"),t.value.user_groups.length!==0&&(u.value="choose",t.value.user_groups.forEach(d=>{p.value.push(d.id)}))}catch(l){k("danger","\u53D6\u5F97\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",`${(c=l.response)==null?void 0:c.data.statusCode}:${(n=l.response)==null?void 0:n.data.message}`)}finally{s.hide()}},Z=()=>{u.value===""&&(p.value=[])},f=r([]),ee=()=>{f.value.forEach(a=>{t.value.user_groups.forEach(s=>{a.id===s.id&&(a.isChecked=!0,p.value.includes(a.id)||p.value.push(a.id))})})},G=r({userGroupsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),K=r(1),E=r(!1),L=r(""),V=async({page:a=1,keyword:s=""}={})=>{const c=C.show();E.value=!0;try{const{groups:n,pagination:l}=await W({page:a,keyword:s});n.forEach(d=>{d.isChecked=!1}),G.value.userGroupsList=n,G.value.pagination=l,K.value=l.current_page,a===1?f.value=n:f.value=[...f.value,...n],ee()}catch(n){k("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557",`${n.response.data.statusCode}:${n.response.data.message}`)}finally{c.hide(),E.value=!1}},H=r(null),q=()=>{const a=H.value;a.addEventListener("scroll",s=>{if(s.target.clientHeight+s.target.scrollTop>=a.scrollHeight){if(E.value||G.value.pagination.current_page===G.value.pagination.total_page)return;V({page:K.value+1,keyword:L.value})}})};re(u,a=>{a==="choose"&&q()});const g=r([]),w=r([]),se=()=>{w.value.forEach(a=>{t.value.tags.forEach(s=>{a.name===s&&g.value.indexOf(a.id)===-1&&(a.isChecked=!0,g.value.push(a.id))})})},x=r({tagsList:[],pagination:{total:100,count:10,total_page:10,current_page:1}}),A=r(1),U=r(!1),B=async(a=1)=>{var c,n;const s=C.show();U.value=!0;try{const{task_tags:l,pagination:d}=await X({page:a});l.forEach(b=>{b.isChecked=!1}),x.value.tagsList=l,x.value.pagination=d,A.value=d.current_page,w.value=[...w.value,...l],se()}catch(l){k("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(c=l.response)==null?void 0:c.data.statusCode}:${(n=l.response)==null?void 0:n.data.message}`)}finally{s.hide(),U.value=!1}},O=r(null),ae=()=>{const a=O.value;a.addEventListener("scroll",s=>{if(s.target.clientHeight+s.target.scrollTop>=a.scrollHeight){if(U.value||x.value.pagination.current_page===x.value.pagination.total_page)return;B(A.value+1)}})},oe=async a=>{try{const s={name:t.value.name,tag_ids:[...g.value],description:t.value.description,expired_at:new Date(t.value.expired_at).toISOString(),user_group_ids:[...p.value],enable:!!t.value.enable};await J(a,s),k("success","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u6210\u529F","\u5DF2\u6210\u529F\u7DE8\u8F2F\u4EFB\u52D9\u7FA4\u7D44"),R(a)}catch(s){k("danger","\u66F4\u65B0\u4EFB\u52D9\u7FA4\u7D44\u5931\u6557",`${s.response.data.statusCode}:${s.response.data.message}`)}},te=()=>{V({page:1,keyword:L.value})};return ce(async()=>{const{id:a}=Y.params;await R(a),V(),B(),u.value==="choose"&&q(),ae()}),(a,s)=>{const c=D("router-link"),n=D("Field"),l=D("ErrorMessage"),d=D("VForm");return _(),v("div",me,[e("header",fe,[e("nav",ge,[e("ol",be,[e("li",ke,[m(c,{to:"/admin/task/group"},{default:z(()=>[j(" \u4EFB\u52D9\u7FA4\u7D44 ")]),_:1})]),ye])]),Ge]),m(d,{ref:"taskGroupForm",onSubmit:s[9]||(s[9]=b=>oe(t.value.id))},{default:z(({errors:b})=>{var P;return[e("div",Le,[e("div",we,[e("div",xe,[De,m(n,{id:"taskGroupInfoName",modelValue:t.value.name,"onUpdate:modelValue":s[0]||(s[0]=o=>t.value.name=o),name:"\u4EFB\u52D9\u7FA4\u7D44\u540D\u7A31",type:"text",class:T(["form-control",{"is-invalid":b.taskGroupInfoName}]),rules:"required"},null,8,["modelValue","class"]),m(l,{name:"taskGroupInfoName",class:"invalid-feedback"})])]),e("div",Ce,[e("div",Ee,[Ve,m(n,{disabled:"",id:"taskGroupInfoKeyword",modelValue:t.value.keyword,"onUpdate:modelValue":s[1]||(s[1]=o=>t.value.keyword=o),name:"taskGroupInfoKeyword",label:"\u82F1\u6587\u540D\u7A31",type:"text",class:T(["form-control",{"is-invalid":b.taskGroupInfoKeyword}]),rules:{required:!0}},null,8,["modelValue","class"]),m(l,{name:"taskGroupInfoKeyword",class:"invalid-feedback"})])])]),e("div",Ue,[Ie,e("div",{class:"card-body",ref_key:"tagListRef",ref:O},[e("ul",Te,[(_(!0),v(S,null,$(w.value,o=>(_(),v("li",{key:o.id},[e("div",Se,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[2]||(s[2]=I=>g.value=I),value:o.id,id:o.id,checked:o.isChecked},null,8,$e),[[N,g.value]]),e("label",{class:"form-check-label",for:o.id},F(o.name),9,Ne)]),Fe]))),128))])],512)]),e("div",Me,[Re,h(e("textarea",{class:"form-control",id:"taskGroupDescription","onUpdate:modelValue":s[3]||(s[3]=o=>t.value.description=o),placeholder:"\u4EFB\u52D9\u7FA4\u7D44\u63CF\u8FF0"},null,512),[[M,t.value.description]])]),e("div",Ke,[e("div",He,[e("div",qe,[Ae,h(e("input",{type:"date",class:"form-control",id:"groupEnd","onUpdate:modelValue":s[4]||(s[4]=o=>t.value.expired_at=o)},null,512),[[M,t.value.expired_at]])])])]),e("div",Be,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[5]||(s[5]=o=>t.value.enable=o),checked:t.value.enable,id:"showCheck"},null,8,Oe),[[N,t.value.enable]]),Pe]),ze,e("div",je,[Qe,h(e("select",{class:"form-select",id:"userGroup",onChange:Z,"onUpdate:modelValue":s[6]||(s[6]=o=>u.value=o)},Xe,544),[[de,u.value]])]),e("div",{class:T(["card shadow-sm rounded-4 overflow-hidden mb-4",u.value?"d-block":"d-none"])},[e("div",Ye,[e("div",Ze,[e("div",es,[ss,e("p",as,[j(" \u5DF2\u9078\u64C7\u7684\u7FA4\u7D44\uFF1A "),(_(!0),v(S,null,$((P=t.value)==null?void 0:P.user_groups,o=>(_(),v("span",{key:o.id,class:"badge rounded-pill bg-dark mx-1"},F(o.name),1))),128))])]),e("div",os,[e("div",ts,[h(e("input",{type:"text",class:"form-control",placeholder:"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44","onUpdate:modelValue":s[7]||(s[7]=o=>L.value=o)},null,512),[[M,L.value]]),e("button",{class:"btn btn-secondary",type:"button",onClick:te},"\u641C\u5C0B")])])])]),e("div",{class:"card-body",ref_key:"userGroupsListRef",ref:H},[e("ul",ls,[(_(!0),v(S,null,$(f.value,o=>(_(),v("li",{key:o.id},[e("div",ns,[h(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":s[8]||(s[8]=I=>p.value=I),value:o.id,id:o.id,checked:o.isChecked},null,8,is),[[N,p.value]]),e("label",{class:"form-check-label",for:o.id},F(o.name),9,rs)]),cs]))),128))])],512)],2),ds]}),_:1},512)])}}},ms=le(us,[["__scopeId","data-v-1ed1d075"]]);export{ms as default}; diff --git a/assets/LoginVertify.a843816c.js b/assets/LoginVertify.a843816c.js new file mode 100644 index 0000000..eb748cf --- /dev/null +++ b/assets/LoginVertify.a843816c.js @@ -0,0 +1 @@ +import{_ as c,r as d,u as r,o as l,a as _,c as f,b as e,w as u,v as m,d as v}from"./index.8b9bb582.js";const y={name:"LoginVertify",setup(){const s=d(""),o=d(""),i=r();function t(){v.put("/v1/user/login/verify",{account:s.value,verify_code:o.value}).then(n=>{n.data.message==="\u6210\u529F"&&(document.cookie=`h_MqhC49RxFRI6pR3Z_token=${n.data.access_token};`,i.push("/"))})}return l(()=>{s.value=window.sessionStorage.getItem("H_temp_mail_store")}),{verifyCode:o,verify:t}}},h={class:"container"},p={class:"row justify-content-center"},b={class:"col-md-6"},w={class:"card shadow-sm rounded-4 overflow-hidden mt-5"},g=e("div",{class:"card-header bg-white d-flex justify-content-between align-items-center py-3"},[e("h5",{class:"mb-0"}," \u767B\u5165\u9A57\u8B49 ")],-1),x={class:"card-body display-12 fw-normal"},k={class:"mb-3"},C=e("label",{for:"add_mail",class:"form-label"},"\u9A57\u8B49\u78BC",-1),R={class:"d-flex justify-content-end"};function V(s,o,i,t,n,j){return _(),f("div",h,[e("div",p,[e("div",b,[e("div",w,[g,e("div",x,[e("div",k,[C,u(e("input",{id:"add_mail","onUpdate:modelValue":o[0]||(o[0]=a=>t.verifyCode=a),type:"email",class:"form-control"},null,512),[[m,t.verifyCode]])]),e("div",R,[e("button",{class:"btn btn-primary",onClick:o[1]||(o[1]=(...a)=>t.verify&&t.verify(...a))}," \u9A57\u8B49 ")])])])])])])}const M=c(y,[["render",V]]);export{M as default}; diff --git a/assets/Message.17470b9f.js b/assets/Message.17470b9f.js new file mode 100644 index 0000000..71bb760 --- /dev/null +++ b/assets/Message.17470b9f.js @@ -0,0 +1 @@ +import{r as f,n as P,a as c,c as d,b as e,h as y,i as _,F as L,q as C,w as H,v as N,A as T,k as B,_ as G,j as R,G as $,E as k,p as I,R as z,S as O,D as q,o as V,x as m}from"./index.8b9bb582.js";import{_ as J}from"./Editor.7c035c32.js";import{g as j}from"./date.7e59e512.js";import{a as K}from"./notification.1a161297.js";const Q={class:"card shadow-sm rounded-4 overflow-hidden mb-4 position-relative"},W={class:"card-body"},X={class:"card-title mb-3"},Y={class:"mb-3 border-bottom"},Z=e("h6",null,"\u89F8\u767C\u689D\u4EF6",-1),ee={class:"mb-3 border-bottom"},se=e("h6",null,"\u53EF\u7528\u6B04\u4F4D",-1),te={class:"table table-borderless"},ae=e("thead",null,[e("tr",null,[e("th",{width:"100"}," \u6B04\u4F4D\u540D\u7A31 "),e("th",{width:"200"}," \u8B8A\u6578 "),e("th",null,"\u6E2C\u8A66\u5C08\u7528\u6E2C\u8A66\u6587\u5B57")])],-1),ne=["id","onUpdate:modelValue"],oe=B('
',1),ie={class:"mb-3"},le=e("label",{for:"mail_content",class:"form-label"},"\u8A0A\u606F\u5167\u5BB9",-1),ce={class:"d-flex justify-content-between mt-5"},de={__name:"Message",props:{data:{type:Object,default:()=>({})}},emits:["messageTest","editMessage"],setup(h,{emit:v}){const b=h,g=f(null),{data:o}=P(b),u=(i,a)=>{const s=[];a.forEach(t=>{s.push({id:t.id,content:t.replace_keyword})}),v("messageTest",i,s)},w=(i,a)=>{const s={cht_name:a.cht_name,content:g.value.editorContent};v("editMessage",i,s)};return(i,a)=>(c(),d("div",Q,[e("div",W,[e("h4",X,y(_(o).cht_name)+"\u56DE\u994B ",1),e("div",Y,[Z,e("p",null,y(_(o).trigger_description),1)]),e("div",ee,[se,e("table",te,[ae,e("tbody",null,[(c(!0),d(L,null,C(_(o).variables,s=>(c(),d("tr",{key:`message_${s.id}`},[e("td",null,y(s.cht_name),1),e("td",null,"{% "+y(s.name)+" %}",1),e("td",null,[H(e("input",{id:s.name,"onUpdate:modelValue":t=>s.replace_keyword=t,type:"text",class:"form-control"},null,8,ne),[[N,s.replace_keyword]])])]))),128))])])]),oe,e("div",ie,[le,T(J,{ref_key:"editorRef",ref:g,content:_(o).content},null,8,["content"])]),e("div",ce,[e("button",{type:"button",class:"btn btn-outline-primary",onClick:a[0]||(a[0]=s=>u(_(o).id,_(o).variables,_(o).content))}," \u6E2C\u8A66\u767C\u9001 "),e("button",{type:"button",class:"btn btn-secondary",onClick:a[1]||(a[1]=s=>w(_(o).id,h.data))}," \u78BA\u8A8D\u66F4\u65B0 ")])])]))}};const D=h=>(z("data-v-16a97308"),h=h(),O(),h),re={class:"mt-5"},_e={class:"right dropdown-container expanded"},ue={id:"notification",class:"position-fixed",style:{bottom:"30px",right:"40px","z-index":"10000"}},he=D(()=>e("span",{class:"material-icons"}," notifications ",-1)),pe=[he],me={class:"tabs"},ve={class:"h_tabs-nav d-flex p-0 list-unstyled"},ge={class:"h_notice_content"},fe={key:0,id:"h_unread_notice",class:"h_notice_area"},ye={class:"d-flex"},be=D(()=>e("div",{class:"d-flex flex-column align-items-center"},[e("img",{src:"https://fakeimg.pl/300/",alt:"",width:"48",height:"48",class:"rounded-circle"})],-1)),we={class:"media-body ms-2"},Me=["innerHTML"],xe={class:"d-inline-block text-muted"},$e={style:{width:"10px"}},ke=["onClick"],Le={key:1,id:"h_all_notice",class:"h_notice_area"},Ce={class:"d-flex"},Te=D(()=>e("div",{class:"d-flex flex-column align-items-center"},[e("img",{src:"https://fakeimg.pl/300/",alt:"",width:"48",height:"48",class:"rounded-circle"})],-1)),De={class:"media-body ms-2"},Ue=["innerHTML"],Re={class:"d-inline-block text-muted"},Ie=["onClick"],Ve={__name:"MessageFront",props:{data:{type:Array}},emits:["readMessage","unreadMessage"],setup(h,{emit:v}){const b=h,{data:g}=P(b),o=f(!1),u=f("h_unread_notice"),w=R(()=>g.value.filter(a=>!!a.has_read).reverse()),i=R(()=>g.value.filter(a=>!a.has_read).reverse());return(a,s)=>(c(),d("div",re,[e("div",_e,[e("div",ue,[e("a",{href:"#","data-dropdown":"notificationMenu",class:"notification-icon d-flex align-items-center justify-content-center rounded-circle text-decoration-none text-primary",onClick:s[0]||(s[0]=$(t=>o.value=!o.value,["prevent"]))},pe)]),e("ul",{name:"notificationMenu",class:k(["h_dropdown shadow bg-white m-0 p-0 rounded-4 overflow-hidden",{show:o.value}])},[e("div",me,[e("ul",ve,[e("li",{class:k(["flex-fill",{"tab-active":u.value=="h_unread_notice"}])},[e("a",{href:"#h_unread_notice",onClick:s[1]||(s[1]=$(t=>u.value="h_unread_notice",["prevent"]))}," \u672A\u8B80\u901A\u77E5 ")],2),e("li",{class:k(["flex-fill",{"tab-active":u.value=="h_all_notice"}])},[e("a",{href:"#h_all_notice",onClick:s[2]||(s[2]=$(t=>u.value="h_all_notice",["prevent"]))}," \u5DF2\u8B80\u901A\u77E5 ")],2)]),e("div",ge,[u.value=="h_unread_notice"?(c(),d("div",fe,[e("div",null,[(c(!0),d(L,null,C(_(i),t=>(c(),d("li",{key:t.id,class:"notification-group p-2 d-flex justify-content-between"},[e("div",ye,[be,e("div",we,[e("p",{class:"mt-0 mb-0",innerHTML:t.content},null,8,Me),e("small",null,[e("span",xe,y(_(j)(t.create_time)),1)])])]),e("div",$e,[e("span",{class:"un read",onClick:M=>v("readMessage",t.id)},null,8,ke)])]))),128))])])):I("",!0),u.value=="h_all_notice"?(c(),d("div",Le,[e("div",null,[(c(!0),d(L,null,C(_(w),t=>(c(),d("li",{key:t.id,class:"notification-group p-2 d-flex justify-content-between"},[e("div",Ce,[Te,e("div",De,[e("p",{class:"mt-0 mb-0",innerHTML:t.content},null,8,Ue),e("small",null,[e("span",Re,y(_(j)(t.create_time)),1)])])]),e("span",{class:"read",onClick:M=>v("unreadMessage",t.id)},null,8,Ie)]))),128))])])):I("",!0)])])],2)])]))}},je=G(Ve,[["__scopeId","data-v-16a97308"]]),Pe={class:"px-4 mt-4"},Se=e("h4",{class:"mb-3"}," \u7AD9\u5167\u901A\u77E5\u8A0A\u606F ",-1),Fe={class:"row"},Ae={class:"col-md-3"},Ee={class:"list-group"},He=["onClick"],Ne={class:"col-md-9"},qe={__name:"Message",setup(h){const{apiGetMessageList:v,apiGetUserMessageList:b,apiPutUserMessageRead:g,apiPutUserMessageUnread:o,apiPostMessageTest:u,apiPutMessageTemplate:w}=K,i=q.useLoading(),a=f(1),s=f(null),t=f({}),M=async()=>{const r=i.show();try{const{templates:n}=await v();s.value=n,[t.value]=s.value}catch(n){m("danger","\u901A\u77E5\u5217\u8868\u51FA\u73FE\u932F\u8AA4",n.response.data.message)}finally{r.hide()}};V(()=>{M()});const U=f([]),x=async()=>{const r=i.show();try{const{messages:n}=await b();U.value=n}catch(n){m("danger","\u53D6\u5F97\u7AD9\u5167\u8A0A\u606F\u5931\u6557",n.response.data.message)}finally{r.hide()}};V(()=>{x()});const S=async r=>{const n=i.show();try{await g(r),x()}catch(l){m("danger","\u5DF2\u8B80\u5931\u6557",l.response.data.message)}finally{n.hide()}},F=async r=>{const n=i.show();try{await o(r),x()}catch(l){m("danger","\u5DF2\u8B80\u5931\u6557",l.response.data.message)}finally{n.hide()}},A=async(r,n)=>{const l=i.show();try{const{message:p}=await u(r,n);m("success","\u901A\u77E5\u6E2C\u8A66\u7D50\u679C",p),x()}catch(p){m("danger","\u6E2C\u8A66 API \u51FA\u73FE\u932F\u8AA4",p.response.data.message)}finally{l.hide()}},E=async(r,n)=>{const l=i.show();try{const{message:p}=await w(r,n);m("success","\u901A\u77E5\u6A23\u677F\u66F4\u65B0\u7D50\u679C",p),a.value=1,M()}catch(p){m("danger","\u7DE8\u8F2F\u7AD9\u5167\u8A0A\u606F\u6A23\u677F\u51FA\u73FE\u932F\u8AA4",p.response.data.message)}finally{l.hide()}};return(r,n)=>(c(),d("div",Pe,[Se,e("div",Fe,[e("div",Ae,[e("div",Ee,[(c(!0),d(L,null,C(s.value,l=>(c(),d("a",{key:l.id,href:"#",class:k(["list-group-item",a.value===l.id?"active":""]),onClick:$(p=>(t.value=l,a.value=l.id),["prevent"])},y(l.cht_name),11,He))),128))])]),e("div",Ne,[T(de,{data:t.value,onMessageTest:A,onEditMessage:E},null,8,["data"]),T(je,{data:U.value,onReadMessage:S,onUnreadMessage:F},null,8,["data"])])])]))}};export{qe as default}; diff --git a/assets/Message.ccbb6705.css b/assets/Message.ccbb6705.css new file mode 100644 index 0000000..4f410a6 --- /dev/null +++ b/assets/Message.ccbb6705.css @@ -0,0 +1 @@ +.notification-icon[data-v-16a97308]{width:52px;height:52px;font-size:22px;border:4px solid;background-color:var(--bs-gray-100)}.notification-icon[data-v-16a97308]:hover{background-color:var(--bs-gray-300)}.h_dropdown[data-v-16a97308]{z-index:100000;position:fixed;right:40px;bottom:110px;max-width:350px;min-width:350px;display:none}.h_dropdown.show[data-v-16a97308]{display:block}.h_tabs-nav li.tab-active a[data-v-16a97308]{background:transparent;border-bottom:2px solid var(--bs-primary);color:var(--bs-primary);cursor:default}.h_tabs-nav li a[data-v-16a97308]{background:var(--bs-gray-300);border-bottom:2px solid var(--bs-gray-300);color:var(--bs-secondary);display:block;padding:10px 0;text-align:center;text-decoration:none}.h_notice_content[data-v-16a97308]{height:auto;max-height:250px;overflow-y:auto}.notification-group[data-v-16a97308]{border-bottom:1px solid #e9ecef;overflow:hidden;min-height:65px;cursor:pointer}.read[data-v-16a97308]{width:12px;display:block;height:12px;border-radius:50%;border:2px solid var(--bs-primary)}.read.un[data-v-16a97308]{background:var(--bs-primary)} diff --git a/assets/Questions.00eb240c.js b/assets/Questions.00eb240c.js new file mode 100644 index 0000000..95a4e26 --- /dev/null +++ b/assets/Questions.00eb240c.js @@ -0,0 +1 @@ +import{D as st,m as at,r as b,X as M,s as ot,o as nt,j as $,a as d,c,b as l,A as R,e as it,p as E,F as p,q as F,i as y,x as v,Z as A,d as lt,h,g as w,T as dt}from"./index.8b9bb582.js";import{a as ct}from"./statistics.1a0d5647.js";import{a as rt}from"./courses.c968273a.js";import{_ as ut,a as pt,b as yt}from"./FavoriteModal.d433ff02.js";import{b as I}from"./date.7e59e512.js";const vt={class:"container-fluid px-4 pt-4 pb-6"},ht=l("h1",{class:"fs-4 mb-5"},"\u554F\u7B54\u91CF\u67E5\u8A62",-1),mt={key:1,class:"d-flex justify-content-end"},gt={class:"table-responsive"},ft={key:0,class:"table table-striped"},wt=l("th",{style:{"white-space":"nowrap"}},"\u65E5\u671F",-1),_t={style:{"white-space":"nowrap"}},bt={"data-bs-toggle":"tooltip","data-bs-title":"\u7E3D\u6578",title:"\u7E3D\u6578"},Ct={"data-bs-toggle":"tooltip","data-bs-title":"\u65B0\u589E\u554F\u984C",title:"\u65B0\u589E\u554F\u984C"},kt={"data-bs-toggle":"tooltip","data-bs-title":"\u518D\u6B21\u56DE\u8986",title:"\u518D\u6B21\u56DE\u8986"},$t=l("td",{style:{"white-space":"nowrap"}},"\u7E3D\u8A08",-1),Ft={"data-bs-toggle":"tooltip","data-bs-title":"\u7E3D\u6578",title:"\u7E3D\u6578"},St={"data-bs-toggle":"tooltip","data-bs-title":"\u65B0\u589E\u554F\u984C",title:"\u65B0\u589E\u554F\u984C"},qt={"data-bs-toggle":"tooltip","data-bs-title":"\u518D\u6B21\u56DE\u8986",title:"\u518D\u6B21\u56DE\u8986"},Bt={__name:"Questions",setup(Lt){const{apiGetStatsQuestionsSelector:V,apiGetStatsQuestions:G,apiGetStatsQuestionsFavorite:N,apiPostStatsQuestionsFavorite:P,apiDeleteStatsQuestionsFavorite:O}=ct,{apiGetCourseList:U}=rt,g=st.useLoading(),f=at({list:[],type:[],range:[]}),C=b({name:"",type:"unresolved",videoCourseIds:"",range:"",from:I(new Date),to:I(new Date)}),u=b({}),S=b(null),X=async({type:s,videoCourseIds:o,range:t,from:n,to:i})=>(await G({type:s,videoCourseIds:o,range:t,from:n,to:i})).result,Z=async()=>(await U()).courses,z=async()=>{const s=await V(),{result:o}=s;return o},H=async s=>{var t,n,i,a;const o=g.show();try{u.value=await X({...s,videoCourseIds:s.videoCourseIds.join(",")})}catch(e){v("danger","\u67E5\u8A62\u5931\u6557",`${(n=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:n.statusCode}:${(a=(i=e==null?void 0:e.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{o.hide()}},m=b([]),j=()=>{m.value.forEach(o=>o.dispose()),m.value=[],[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).forEach(o=>{const t=new dt(o);m.value.push(t)})};M(()=>{m.value.forEach(s=>s.dispose()),m.value=[]}),ot(()=>u.value,async()=>{await A(),j()});const B=b([]),q=async()=>{var o,t,n,i;const s=g.show();try{const{result:a}=await N();B.value=a}catch(a){v("danger","\u53D6\u5F97\u5931\u6557",`${(t=(o=a==null?void 0:a.response)==null?void 0:o.data)==null?void 0:t.statusCode}:${(i=(n=a==null?void 0:a.response)==null?void 0:n.data)==null?void 0:i.message}`)}finally{s.hide()}};nt(async()=>{var o,t,n,i;const s=g.show();try{f.list=await Z();const{range:a,type:e}=await z();f.range=a,f.type=e,await q(),await A(),j()}catch(a){v("danger","\u5931\u6557",`${(t=(o=a==null?void 0:a.response)==null?void 0:o.data)==null?void 0:t.statusCode}:${(i=(n=a==null?void 0:a.response)==null?void 0:n.data)==null?void 0:i.message}`)}finally{s.hide()}});const L=$(()=>Object.keys(u.value.stats||{})),T=$(()=>L.value.map(s=>{const o=f.list.find(t=>t.id===parseInt(s,10));return{id:s,name:o?o.name:`\u672A\u77E5\u7684\u8AB2\u7A0B\uFF08ID: ${s}\uFF09`}})),J=$(()=>{const s=u.value.date||[],{stats:o}=u.value;return s.map((n,i)=>{const a={date:n,courses:{}};return L.value.forEach(e=>{const r=o[e];if(r){const D=r.total.data[i],Q=r.question.data[i],x=r.reply.data[i];a.courses[e]={total:D,question:Q,reply:x}}else a.courses[e]={total:0,question:0,reply:0}}),a})}),k=$(()=>{const s={};return L.value.forEach(o=>{let t=0,n=0,i=0;const a=u.value.stats[o];a&&(t=a.total.data.reduce((e,r)=>e+r,0),n=a.question.data.reduce((e,r)=>e+r,0),i=a.reply.data.reduce((e,r)=>e+r,0)),s[o]={total:t,question:n,reply:i}}),s});M(()=>{m.value.forEach(s=>s.dispose()),m.value=[]});const K=async s=>{var t,n,i,a;const o=g.show();try{const e=await lt.get(`/v1/stats/questions/${s}/csv`,{responseType:"blob"}),r=new FileReader;r.onload=D=>{const Q=new Blob([D.target.result],{type:"text/csv;charset=utf-8;"}),x=window.URL.createObjectURL(Q),_=document.createElement("a");_.href=x,_.setAttribute("download",`tasks-${s}.csv`),document.body.appendChild(_),_.click(),_.remove()},r.readAsText(e.data,"utf-8")}catch(e){v("danger","\u4E0B\u8F09\u5931\u6557",`${(n=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:n.statusCode}:${(a=(i=e==null?void 0:e.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{o.hide()}},W=s=>{C.value=s,S.value.show()},Y=async s=>{var t,n,i,a;const o=g.show();try{await P({...s,videoCourseIds:s.videoCourseIds.join(",")}),v("success","\u5132\u5B58\u6210\u529F","\u5DF2\u6210\u529F\u5132\u5B58\u5E38\u7528\u8A2D\u5B9A"),await q()}catch(e){v("danger","\u5132\u5B58\u5931\u6557",`${(n=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:n.statusCode}:${(a=(i=e==null?void 0:e.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{o.hide()}},tt=async s=>{var t,n,i,a;const o=g.show();try{await O(s),v("success","\u522A\u9664\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u5E38\u7528\u8A2D\u5B9A"),await q()}catch(e){v("danger","\u522A\u9664\u5931\u6557",`${(n=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:n.statusCode}:${(a=(i=e==null?void 0:e.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{o.hide()}},et=async s=>{C.value={...s,videoCourseIds:s.videoCourseIds.split(",").map(o=>parseInt(o,10))},S.value.hide()};return(s,o)=>(d(),c(p,null,[l("div",vt,[ht,R(ut,{status:"questions",data:f,onSubmit:H,openFavoriteModal:W,queryParams:C.value},null,8,["data","queryParams"]),u.value.id?(d(),it(pt,{key:0,data:u.value},null,8,["data"])):E("",!0),u.value.id?(d(),c("div",mt,[l("button",{onClick:o[0]||(o[0]=t=>K(u.value.id)),type:"button",class:"btn btn-primary"}," \u532F\u51FA ")])):E("",!0),l("div",gt,[u.value.id?(d(),c("table",ft,[l("thead",null,[l("tr",null,[wt,(d(!0),c(p,null,F(y(T),t=>(d(),c("th",{key:t.id,style:{"white-space":"nowrap"}},h(t.name),1))),128))])]),l("tbody",null,[(d(!0),c(p,null,F(y(J),t=>(d(),c("tr",{key:t.date},[l("td",_t,h(t.date),1),(d(!0),c(p,null,F(y(T),n=>(d(),c("td",{key:n.id,style:{"white-space":"nowrap"}},[t.courses[n.id]?(d(),c(p,{key:0},[l("span",bt,h(t.courses[n.id].total),1),w(" / "),l("span",Ct,h(t.courses[n.id].question),1),w(" / "),l("span",kt,h(t.courses[n.id].reply),1)],64)):(d(),c(p,{key:1},[w("-")],64))]))),128))]))),128))]),l("tfoot",null,[l("tr",null,[$t,(d(!0),c(p,null,F(y(T),t=>(d(),c("td",{key:t.id,style:{"white-space":"nowrap"}},[y(k)[t.id]?(d(),c(p,{key:0},[l("span",Ft,h(y(k)[t.id].total),1),w(" / "),l("span",St,h(y(k)[t.id].question),1),w(" / "),l("span",qt,h(y(k)[t.id].reply),1)],64)):(d(),c(p,{key:1},[w("-")],64))]))),128))])])])):E("",!0)])]),R(yt,{ref_key:"FavoriteModalRef",ref:S,status:"questions",data:f,options:C.value,favoriteList:B.value,onSaveFavorite:Y,onApplyFavorite:et,onDeleteFavorite:tt},null,8,["data","options","favoriteList"])],64))}};export{Bt as default}; diff --git a/assets/SurveysDetail.0a67fffd.css b/assets/SurveysDetail.0a67fffd.css new file mode 100644 index 0000000..bbf1035 --- /dev/null +++ b/assets/SurveysDetail.0a67fffd.css @@ -0,0 +1 @@ +.rounded-box[data-v-84aaa1f9]{min-width:36px;min-height:36px}.progress[data-v-84aaa1f9]{border-radius:24px}.progress-bar[data-v-84aaa1f9]:first-child{border-top-left-radius:24px;border-bottom-left-radius:24px}.progress-bar[data-v-84aaa1f9]:last-child{border-top-right-radius:24px;border-bottom-right-radius:24px}.progress-bar-text[data-v-84aaa1f9]{left:0;right:0;bottom:-20px}[data-v-84aaa1f9] span.vue-star-rating-star{display:flex}.pre-line[data-v-84aaa1f9]{white-space:pre-line}.rotate-90[data-v-84aaa1f9]{transform:rotate(-90deg)}.transition-all[data-v-84aaa1f9]{transition:all .5s} diff --git a/assets/SurveysDetail.fb56daba.js b/assets/SurveysDetail.fb56daba.js new file mode 100644 index 0000000..fc399d7 --- /dev/null +++ b/assets/SurveysDetail.fb56daba.js @@ -0,0 +1,3 @@ +import{d as We,a1 as Fe,_ as Ae,D as Ze,l as He,r as C,m as Xe,o as Je,a as c,c as u,b as t,F,q as A,e as Ke,p as f,A as Ce,i as q,x as w,Z,h as b,g as P,G as H,w as ke,v as $e,E as z,P as Qe,R as Ye,S as Ie,a2 as es}from"./index.8b9bb582.js";import{C as ss,V as ts}from"./CoursesSurveys.a80ce5fa.js";import{g as X}from"./date.7e59e512.js";import{a as as}from"./surveys.0b3f8cdd.js";const J=We.create({baseURL:"https://dev-hexsystem-user.hexschool.io",withCredentials:!0,xsrfHeaderName:"xsrf-token",xsrfCookieName:"xsrf-token",withXSRFToken:!0,headers:{Authorization:`Bearer ${Fe("h_MqhC49RxFRI6pR3Z_token")}`}}),ls=g=>{const[B,E]=window.location.href.split("#"),{status:G}=g.response;switch(G){case 401:window.location.href=`https://dev-hex-user.hexschool.io/#/login?h_redirect=${B}&h_path=${E}`;break}return Promise.reject(g)};J.interceptors.request.use(g=>g,g=>Promise.reject(g));J.interceptors.response.use(g=>g.data,g=>ls(g));const is=()=>J.get("/v1/user/personal/profile"),os={apiGetUserPersonalInfo:is};const k=g=>(Ye("data-v-84aaa1f9"),g=g(),Ie(),g),ns={class:"surveys px-4 mt-4 position-relative"},ds=k(()=>t("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9 ",-1)),rs={class:"row gx-3 gy-2 align-items-center my-2"},cs={class:"col-md-6"},us={class:"row gx-3 gy-2 align-items-center"},ps={class:"col-md-8 d-flex align-items-center"},hs=k(()=>t("label",{for:"inputState",class:"form-label flex-shrink-0 me-2 mb-0"},"\u7BE9\u9078\u65B9\u5F0F",-1)),vs=k(()=>t("option",{value:""}," \u5168\u90E8\u8A55\u50F9 ",-1)),_s=k(()=>t("option",{value:"has_reply=0"}," \u672A\u56DE\u8986 ",-1)),ys=k(()=>t("option",{value:"has_reply=1"}," \u5DF2\u56DE\u8986 ",-1)),ws=k(()=>t("option",{value:"has_content=1"}," \u6709\u8A55\u8AD6 ",-1)),gs=["value"],fs={class:"card mt-4"},bs=k(()=>t("div",{class:"card-header bg-primary text-white"},[t("h2",{class:"h4 m-2"}," \u5B78\u54E1\u56DE\u994B ")],-1)),Cs={class:"card-body bg-light"},ks={class:"list-unstyled"},$s={class:"card"},xs={class:"card-body d-flex shadow-sm"},ms=["src","alt"],Vs={class:"ms-2"},Rs={class:"d-flex align-items-center m-0",style:{height:"40px"}},Ss=["onClick"],Ds=k(()=>t("span",{class:"material-icons align-bottom ms-2 text-muted"}," disabled_visible ",-1)),Ps=[Ds],Ls=["onClick"],Ts=k(()=>t("span",{class:"material-icons align-bottom ms-2"}," disabled_visible ",-1)),qs={class:"d-flex align-items-center my-2"},Us={class:"text-muted ms-1"},js=["onClick"],zs={key:1,class:"card bg-light",style:{width:"752px"}},Bs={class:"card-body"},Es={class:"d-flex align-items-center"},Gs=["src"],Ms={class:"ms-2 mb-0"},Os={key:0,class:"text-muted"},Ns={key:0,class:"mt-3"},Ws={class:"pre-line"},Fs={key:1},As=k(()=>t("p",null,[t("small",{class:"text-muted"}," \u9650\u5236 200 \u500B\u5B57\uFF0C\u50C5\u80FD\u8F38\u5165\u6578\u5B57\u3001\u82F1\u6587\u3001\u4E2D\u6587\u5B57\u3001\u6A19\u9EDE\u7B26\u865F\uFF08\u9017\u865F\u3001\u53E5\u865F\u3001\u9A5A\u5606\u865F\u3001\u554F\u865F\u3001\u9813\u865F\uFF09 ")],-1)),Zs=["onClick"],Hs={key:3,class:"d-flex justify-content-between"},Xs=["onClick"],Js={class:"mb-0"},Ks=["onClick"],Qs={class:"card-footer bg-white d-flex"},Ys={class:"ms-5"},Is={class:"my-3"},et=["onClick"],st={key:0},tt={class:"row"},at={class:"rounded-box bg-primary text-white d-flex justify-content-center align-items-center rounded-pill me-2"},lt={class:"m-0"},it={key:0},ot=k(()=>t("p",{class:"text-muted"}," \u7D66\u8001\u5E2B\u7684\u6084\u6084\u8A71 ",-1)),nt=["onClick"],dt={key:1,class:"card bg-light",style:{width:"752px"}},rt={class:"card-body"},ct={class:"d-flex align-items-center"},ut=["src"],pt={class:"ms-2 mb-0"},ht={key:0,class:"text-muted"},vt={key:0,class:"mt-3"},_t={class:"pre-line"},yt={key:1},wt=k(()=>t("p",null,[t("small",{class:"text-muted"}," \u9650\u5236 200 \u500B\u5B57\uFF0C\u50C5\u80FD\u8F38\u5165\u6578\u5B57\u3001\u82F1\u6587\u3001\u4E2D\u6587\u5B57\u3001\u6A19\u9EDE\u7B26\u865F\uFF08\u9017\u865F\u3001\u53E5\u865F\u3001\u9A5A\u5606\u865F\u3001\u554F\u865F\u3001\u9813\u865F\uFF09 ")],-1)),gt=["onClick"],ft={key:3,class:"d-flex justify-content-between"},bt=["onClick"],Ct={class:"mb-0"},kt=["onClick"],$t={class:"d-flex justify-content-end"},xt={__name:"SurveysDetail",setup(g){const{apiGetVideoCoursesDetail:B,apiGetVideoCoursesComments:E,apiGetVideoCoursesComment:G,apiPutVideoCoursesCommentsDisplay:xe,apiDeleteVideoCoursesCommentsDisplay:me,apiPostVideoCoursesCommentsReplys:Ve,apiPutVideoCoursesCommentsReplys:Re,apiPostVideoCoursesWhispers:Se,apiPutVideoCoursesWhispers:De}=as,{apiGetUserPersonalInfo:Pe}=os,x=Ze.useLoading(),Le=He(),U={starSize:24,readOnly:!0,activeColor:"#2A8356",showRating:!1},p=C({new:!1,edit:!1,id:null}),h=C({new:!1,edit:!1,id:null}),K=C(null),Q=C(null),M=Xe({}),m=C(null),O=C({}),Te=async l=>{var e,s,r,i;const d=x.show();try{const{review:a}=await B(l);O.value=a}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},Y=C([]);let N=[];const qe=()=>{const l=[];Y.value.forEach(e=>{e&&l.push(e)}),N=[].slice.call(l).map(e=>new es(e))},I=C([]),V=C({current_page:1,total:0}),D=async(l,d=M.name)=>{var s,r,i,a;const e=x.show();try{const{comments:o,pagination:_}=await E({videoCourseId:m.value,page:l,scoped:d});I.value=o,V.value=_}catch(o){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(r=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:r.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await Z(),qe()}},L=C({}),Ue=async()=>{var d,e,s,r;const l=x.show();try{const{profile:i}=await Pe();L.value=i}catch(i){w("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u8CC7\u8A0A\u5931\u6557",`${(e=(d=i==null?void 0:i.response)==null?void 0:d.data)==null?void 0:e.statusCode}:${(r=(s=i==null?void 0:i.response)==null?void 0:s.data)==null?void 0:r.message}`)}finally{l.hide()}};Je(async()=>{const{id:l}=Le.params;m.value=l,await D(),Te(l),Ue()});const je=async l=>{var e,s,r,i;const d=x.show();try{await xe(m.value,l),await D(V.value.current_page),w("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u89E3\u9664\u96B1\u85CF")}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},ze=async l=>{var e,s,r,i;const d=x.show();try{await me(m.value,l),await D(V.value.current_page),w("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u96B1\u85CF")}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},R=C(""),Be=async l=>{var e,s,r,i;const d=x.show();try{await Ve(m.value,l,{content:R.value}),p.value.new=!1,p.value.id="",await D(V.value.current_page),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(a){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(s=(e=a==null?void 0:a.response)==null?void 0:e.data)==null?void 0:s.statusCode}:${(i=(r=a==null?void 0:a.response)==null?void 0:r.data)==null?void 0:i.message}`)}finally{d.hide()}},Ee=async(l,d)=>{var s,r,i,a;const e=x.show();try{const o={videoCourseId:m.value,commentId:l,replyId:d,body:{content:R.value}};await Re(o),p.value.edit=!1,p.value.id="",await D(V.value.current_page),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(o){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(r=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:r.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide()}},j=async l=>{await Z(),l==="whisper"&&Q.value[0].focus(),l==="comment"&&K.value[0].focus()},n=C([]),W=async(l,d)=>{var s,r,i,a;const e=x.show();try{const{review:o}=await G(m.value,l);o.status=!0,n.value[d]=o}catch(o){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(r=(s=o==null?void 0:o.response)==null?void 0:s.data)==null?void 0:r.statusCode}:${(a=(i=o==null?void 0:o.response)==null?void 0:i.data)==null?void 0:a.message}`)}finally{e.hide(),await Z(),N[d].show()}},Ge=l=>{M.name=l.target.value,n.value=[],D(1,M.name)},S=C(""),Me=async(l,d,e)=>{var r,i,a,o;const s=x.show();try{const _={videoCourseId:m.value,commentId:l,whisperId:d,body:{content:S.value}};await Se(_),h.value.new=!1,h.value.id=null,await W(l,e),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch(_){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(i=(r=_==null?void 0:_.response)==null?void 0:r.data)==null?void 0:i.statusCode}:${(o=(a=_==null?void 0:_.response)==null?void 0:a.data)==null?void 0:o.message}`)}finally{s.hide()}},Oe=async(l,d,e,s)=>{var i,a,o,_;const r=x.show();try{const $={videoCourseId:m.value,commentId:l,whisperId:d,replyId:e,body:{content:S.value}};await De($),h.value.edit=!1,h.value.id=null,await W(l,s),w("success","\u56DE\u8986\u6210\u529F","\u5DF2\u56DE\u8986\u8A0A\u606F")}catch($){w("danger","\u53D6\u5F97\u8A55\u50F9\u8CC7\u8A0A\u5931\u6557",`${(a=(i=$==null?void 0:$.response)==null?void 0:i.data)==null?void 0:a.statusCode}:${(_=(o=$==null?void 0:$.response)==null?void 0:o.data)==null?void 0:_.message}`)}finally{r.hide()}},Ne=l=>{n.value[l].status=!n.value[l].status,N[l].toggle()},ee=(l,d,e)=>l?d||"https://fakeimg.pl/300/":e&&e||"https://fakeimg.pl/300/";return(l,d)=>(c(),u("div",ns,[ds,t("form",rs,[t("div",cs,[t("div",us,[t("div",ps,[hs,t("select",{class:"form-select",onChange:d[0]||(d[0]=e=>Ge(e))},[vs,_s,ys,ws,(c(),u(F,null,A(5,e=>t("option",{key:`sating${e}`,value:`rating=${6-e}`},b(6-e)+"\u661F\u8A55\u8AD6 ",9,gs)),64))],32)])])])]),O.value.id?(c(),Ke(ss,{key:0,data:O.value},null,8,["data"])):f("",!0),t("div",fs,[bs,t("div",Cs,[t("ul",ks,[(c(!0),u(F,null,A(I.value,(e,s)=>{var r,i,a,o,_,$,se,te,ae,le,ie,oe,ne,de,re,ce,ue,pe,he,ve,_e,ye,we,ge,fe;return c(),u("li",{key:e.id,class:"mb-4"},[t("div",$s,[t("div",xs,[t("img",{src:e.avatar,width:"40",height:"40",class:"rounded-pill",alt:e.nickname},null,8,ms),t("div",Vs,[t("p",Rs,[P(b(e.nickname)+" ",1),e.display?(c(),u("a",{key:0,href:"#",title:"\u96B1\u85CF\u8A55\u8AD6",onClick:H(v=>ze(e.id),["prevent"])},Ps,8,Ss)):(c(),u("a",{key:1,href:"#",title:"\u986F\u793A\u8A55\u8AD6",class:"text-danger text-decoration-none",onClick:H(v=>je(e.id),["prevent"])},[Ts,P(" \u53D6\u6D88\u96B1\u85CF ")],8,Ls))]),t("p",qs,[Ce(q(ts),{rating:e.rating,"star-size":U.starSize,"read-only":U.readOnly,"show-rating":U.showRating,"active-color":U.activeColor},null,8,["rating","star-size","read-only","show-rating","active-color"]),t("span",Us,b(q(X)(e.create_time)),1)]),t("p",null,b(e.content),1),p.value.id!==e.id&&!e.reply?(c(),u("button",{key:0,type:"button",class:"btn btn-outline-primary",onClick:v=>{p.value.new=!0,p.value.edit=!1,p.value.id=e.id,R.value="",j("comment")}}," \u56DE\u8986 ",8,js)):f("",!0),p.value.new&&p.value.id===e.id||e.reply?(c(),u("div",zs,[t("div",Bs,[t("div",Es,[t("img",{src:ee((r=e.reply)==null?void 0:r.id,(i=e.reply)==null?void 0:i.avatar,L.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,Gs),t("p",Ms,[P(b(((a=e.reply)==null?void 0:a.nickname)||L.value.nickname)+" ",1),p.value.new?f("",!0):(c(),u("span",Os,b(q(X)((o=e.reply)==null?void 0:o.create_time)),1))])]),((_=e.reply)==null?void 0:_.content)&&!p.value.edit||p.value.id!==e.id?(c(),u("p",Ns,[t("pre",Ws," "+b(($=e.reply)==null?void 0:$.content)+` + `,1)])):(c(),u("div",Fs,[ke(t("textarea",{ref_for:!0,ref_key:"commentTextareaRef",ref:K,"onUpdate:modelValue":d[1]||(d[1]=v=>R.value=v),class:"my-3 form-control bg-light border-1 form-control",placeholder:"\u8ACB\u8F38\u5165\u56DE\u8986\u5167\u5BB9...",rows:"3"},null,512),[[$e,R.value]]),As])),p.value.new&&p.value.id===e.id?(c(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Be(e.id)}," \u65B0\u589E\u56DE\u8986 ",8,Zs)):f("",!0),p.value.edit&&((se=e.reply)==null?void 0:se.content)&&p.value.id===e.id?(c(),u("div",Hs,[t("button",{type:"button",class:"btn btn-primary",onClick:v=>Ee(e.id,e.reply.id)}," \u9001\u51FA\u56DE\u8986 ",8,Xs),t("p",Js,[t("span",{class:z({"text-danger":R.value.length>200})},b(R.value.length),3),P("/200 ")])])):f("",!0),!p.value.edit&&((te=e.reply)==null?void 0:te.content)||p.value.id!==e.id?(c(),u("button",{key:4,class:"btn btn-primary",type:"button",onClick:v=>{var y;p.value.new=!1,p.value.edit=!0,p.value.id=e.id,R.value=(y=e.reply)==null?void 0:y.content,j("comment")}}," \u4FEE\u6539\u56DE\u8986 ",8,Ks)):f("",!0)])])):f("",!0)])]),t("div",Qs,[t("div",Ys,[t("p",Is,[t("a",{class:"d-flex fw-bold text-dark text-decoration-none",href:"#",role:"button","aria-expanded":"false","aria-controls":"collapseExample",onClick:H(v=>{var y;return(y=n.value[s])!=null&&y.id?Ne(s):W(e.id,s)},["prevent"])},[t("span",{class:z(["material-icons align-middle transition-all",{"rotate-90":!((ae=n.value[s])!=null&&ae.status)}])}," keyboard_arrow_down ",2),P(" \u67E5\u770B\u500B\u5225\u8A55\u5206 "),e.has_whisper?(c(),u("span",st,"(\u6709\u6084\u6084\u8A71)")):f("",!0)],8,et)]),t("div",{ref_for:!0,ref:v=>Y.value[s]=v,class:"collapse show mt-3"},[t("div",tt,[(c(!0),u(F,null,A((le=n.value[s])==null?void 0:le.questionnaires,(v,y)=>{var T,be;return c(),u("div",{key:`questionnaires${y}`,class:z(["d-flex align-items-center mb-3",{"col-md-6":((T=n.value[s])==null?void 0:T.questionnaires.length)<=2,"col-md-4":((be=n.value[s])==null?void 0:be.questionnaires.length)>=3}])},[t("span",at,b(v.rating),1),t("p",lt,b(v.question),1)],2)}),128))]),(ie=n.value[s])!=null&&ie.whisper?(c(),u("div",it,[ot,t("p",null,b(n.value[s].whisper.content),1),h.value.id!==((oe=n.value[s])==null?void 0:oe.whisper.id)&&!n.value[s].whisper.reply?(c(),u("button",{key:0,class:"btn btn-outline-primary",type:"button",onClick:v=>{var y;h.value.new=!0,h.value.edit=!1,h.value.id=(y=n.value[s])==null?void 0:y.whisper.id,S.value="",j("whisper")}}," \u56DE\u8986 ",8,nt)):f("",!0),h.value.new&&h.value.id===((ne=n.value[s])==null?void 0:ne.whisper.id)||n.value[s].whisper.reply?(c(),u("div",dt,[t("div",rt,[t("div",ct,[t("img",{src:ee((de=n.value[s].whisper.reply)==null?void 0:de.id,(re=n.value[s].whisper.reply)==null?void 0:re.avatar,L.value.avatar),width:"40",height:"40",class:"rounded-pill"},null,8,ut),t("p",pt,[P(b(((ce=n.value[s].whisper.reply)==null?void 0:ce.nickname)||L.value.nickname)+" ",1),h.value.new?f("",!0):(c(),u("span",ht,b(q(X)((ue=n.value[s].whisper.reply)==null?void 0:ue.create_time)),1))])]),((pe=n.value[s].whisper.reply)==null?void 0:pe.content)&&!h.value.edit||h.value.id!==((he=n.value[s].whisper)==null?void 0:he.id)?(c(),u("p",vt,[t("pre",_t," "+b((ve=n.value[s].whisper.reply)==null?void 0:ve.content)+` + `,1)])):(c(),u("div",yt,[ke(t("textarea",{ref_for:!0,ref_key:"whisperTextareaRef",ref:Q,"onUpdate:modelValue":d[2]||(d[2]=v=>S.value=v),class:"my-3 form-control bg-light border-1 form-control",placeholder:"\u8ACB\u8F38\u5165\u56DE\u8986\u5167\u5BB9...",type:"text",rows:"3"},null,512),[[$e,S.value]]),wt])),h.value.new&&h.value.id===((_e=n.value[s])==null?void 0:_e.whisper.id)?(c(),u("button",{key:2,type:"button",class:"btn btn-primary",onClick:v=>Me(e.id,n.value[s].whisper.id,s)}," \u65B0\u589E\u56DE\u8986 ",8,gt)):f("",!0),h.value.edit&&((ye=n.value[s].whisper.reply)==null?void 0:ye.content)&&h.value.id===((we=n.value[s].whisper)==null?void 0:we.id)?(c(),u("div",ft,[t("button",{type:"button",class:"btn btn-primary",onClick:v=>{var y;return Oe(e.id,n.value[s].whisper.id,(y=n.value[s].whisper.reply)==null?void 0:y.id,s)}}," \u9001\u51FA\u56DE\u8986 ",8,bt),t("p",Ct,[t("span",{class:z({"text-danger":S.value.length>200})},b(S.value.length),3),P("/200 ")])])):f("",!0),!h.value.edit&&((ge=n.value[s].whisper.reply)==null?void 0:ge.content)||h.value.id!==((fe=n.value[s].whisper)==null?void 0:fe.id)?(c(),u("button",{key:4,class:"btn btn-primary",type:"button",onClick:v=>{var y,T;h.value.new=!1,h.value.edit=!0,h.value.id=(y=n.value[s].whisper)==null?void 0:y.id,S.value=(T=n.value[s].whisper.reply)==null?void 0:T.content,j("whisper")}}," \u4FEE\u6539\u56DE\u8986 ",8,kt)):f("",!0)])])):f("",!0)])):f("",!0)],512)])])])])}),128))]),t("div",$t,[Ce(q(Qe),{modelValue:V.value.current_page,"onUpdate:modelValue":d[3]||(d[3]=e=>V.value.current_page=e),records:V.value.total,"per-page":20,options:{chunk:6},onPaginate:D},null,8,["modelValue","records"])])])])]))}},Pt=Ae(xt,[["__scopeId","data-v-84aaa1f9"]]);export{Pt as default}; diff --git a/assets/SurveysList.c36bc817.js b/assets/SurveysList.c36bc817.js new file mode 100644 index 0000000..8273367 --- /dev/null +++ b/assets/SurveysList.c36bc817.js @@ -0,0 +1 @@ +import{D as S,r as _,o as b,a as d,c as u,b as o,F as h,q as f,A as C,i as B,x as v,h as D,P as G}from"./index.8b9bb582.js";import{C as P}from"./CoursesSurveys.a80ce5fa.js";import{a as A}from"./surveys.0b3f8cdd.js";const F={class:"surveys px-4 mt-4 position-relative"},M=o("h1",{class:"fs-4 mb-0"}," \u8AB2\u7A0B\u8A55\u50F9\u5217\u8868 ",-1),N={class:"row gx-3 gy-2 align-items-center my-2"},j={class:"col-md-12"},q={class:"row"},E={class:"col-md-4"},O=["value"],U={class:"list-unstyled mb-0"},z={class:"d-flex justify-content-end"},R={__name:"SurveysList",setup(H){const{apiGetVideoCoursesList:w,apiGetVideoCoursesDetail:V,apiGetVideoCoursesSelector:L}=A,g=S.useLoading(),m=_([]),r=_({current_page:1,total:0}),p=async(c,t)=>{var n,l,e,a;const s=g.show();try{const{courses:i,pagination:x}=await w(c,t);m.value=i,r.value=x}catch(i){v("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(l=(n=i==null?void 0:i.response)==null?void 0:n.data)==null?void 0:l.statusCode}:${(a=(e=i==null?void 0:i.response)==null?void 0:e.data)==null?void 0:a.message}`)}finally{s.hide()}},y=_([]),$=async()=>{var t,s,n,l;const c=g.show();try{const{courses:e}=await L();y.value=e}catch(e){v("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(s=(t=e==null?void 0:e.response)==null?void 0:t.data)==null?void 0:s.statusCode}:${(l=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:l.message}`)}finally{c.hide()}},k=async c=>{var s,n,l,e;const t=g.show();try{if(c.target.value){const{review:a}=await V(c.target.value);m.value=Array(a)}else p()}catch(a){v("danger","\u8AB2\u7A0B\u8CC7\u8A0A\u53D6\u5F97\u5931\u6557",`${(n=(s=a==null?void 0:a.response)==null?void 0:s.data)==null?void 0:n.statusCode}:${(e=(l=a==null?void 0:a.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{t.hide()}};return b(async()=>{await p(),await $()}),(c,t)=>(d(),u("div",F,[M,o("form",N,[o("div",j,[o("div",q,[o("div",E,[o("select",{class:"form-select w-50",onChange:k},[o("option",{selected:"",value:"",onClick:p}," \u5168\u90E8\u8AB2\u7A0B "),(d(!0),u(h,null,f(y.value,s=>(d(),u("option",{key:s.id,value:s.id},D(s.name),9,O))),128))],32)])])])]),o("ul",U,[(d(!0),u(h,null,f(m.value,s=>(d(),u("li",{key:s,class:"mb-4"},[C(P,{data:s},null,8,["data"])]))),128))]),o("div",z,[C(B(G),{modelValue:r.value.current_page,"onUpdate:modelValue":t[0]||(t[0]=s=>r.value.current_page=s),records:r.value.total,"per-page":20,options:{chunk:6},onPaginate:p},null,8,["modelValue","records"])])]))}};export{R as default}; diff --git a/assets/SurveysManage.34cfdc89.js b/assets/SurveysManage.34cfdc89.js new file mode 100644 index 0000000..dc949b1 --- /dev/null +++ b/assets/SurveysManage.34cfdc89.js @@ -0,0 +1 @@ +import{r as g,a as i,e as I,f as P,b as s,M as A,D as F,o as Q,c as u,F as O,q as S,g as T,A as j,B as E,x as c,w as M,C as G,p as y,v as z}from"./index.8b9bb582.js";import{a as H}from"./surveys.0b3f8cdd.js";const J=s("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1),K={class:"d-flex justify-content-end"},W=s("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),X={__name:"AlertModal",emits:["deleteQuestionnaire"],setup(V,{expose:f,emit:w}){const r=g(null);return f({modalRef:r}),(k,b)=>(i(),I(A,{ref_key:"modalRef",ref:r,title:"\u662F\u5426\u522A\u9664\u6B64\u554F\u5238\uFF1F","has-footer":!0},{body:P(()=>[J,s("div",K,[W,s("button",{type:"button",class:"btn btn-danger",onClick:b[0]||(b[0]=v=>w("deleteQuestionnaire"))}," \u522A\u9664 ")])]),_:1},512))}},Y={class:"px-4 mt-4"},Z=s("h1",{class:"fs-4 mb-3"}," \u8A55\u50F9\u7BA1\u7406 ",-1),q={class:"card shadow-sm rounded"},ee=s("div",{class:"card-header"},[s("h5",{class:"text-secondary my-2"}," \u8A55\u50F9\u5167\u5BB9\u8A2D\u5B9A ")],-1),te={class:"card-body"},se={class:"table table-borderless"},ae=s("thead",null,[s("tr",{class:"text-secondary"},[s("th",{style:{width:"100px"}}," \u555F\u7528\u72C0\u614B "),s("th",null,"\u8A55\u50F9\u540D\u7A31"),s("th",{class:"w-25"})])],-1),oe={class:"align-middle"},ne={class:"form-check form-switch"},le=["onUpdate:modelValue","checked","onChange"],de=["onUpdate:modelValue","disabled"],ce={class:"d-flex align-items-center"},ie=["onClick"],ue=["onClick"],he=["onClick"],pe=s("span",{class:"material-icons-outlined"}," close ",-1),_e=[pe],re=s("td",null,null,-1),be=s("span",{class:"material-icons-outlined me-1"}," add_circle_outline ",-1),we={__name:"SurveysManage",setup(V){const{apiGetVideoCoursesQuestionnaires:f,apiPostVideoCoursesQuestionnaires:w,apiPutVideoCoursesQuestionnaires:r,apiDeleteVideoCoursesQuestionnaires:k,apiPutVideoCoursesOpenQuestionnaires:b,apiDeleteVideoCoursesCloseQuestionnaires:v}=H,h=F.useLoading(),$=g(null);let C=null;Q(()=>{C=new E($.value.modalRef.hModal)});const m=g([]),p=async()=>{var l,e,n,a;const d=h.show();try{const{questionnaires:t}=await f();m.value=t}catch(t){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.statusCode}:${(a=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:a.message}`)}finally{d.hide()}};Q(p);const B=async d=>{var e,n,a,t;const l=h.show();try{await w(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u65B0\u589E\u554F\u5377")}catch(o){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},D=async(d,l)=>{var n,a,t,o;const e=h.show();try{await r(d,{question:l.question}),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u66F4\u65B0\u554F\u5377")}catch(_){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(a=(n=_==null?void 0:_.response)==null?void 0:n.data)==null?void 0:a.statusCode}:${(o=(t=_==null?void 0:_.response)==null?void 0:t.data)==null?void 0:o.message}`)}finally{e.hide()}};let x=null;const R=async()=>{var l,e,n,a;const d=h.show();try{C.hide(),await k(x),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u554F\u5377")}catch(t){c("danger","\u53D6\u5F97\u8A55\u50F9\u5217\u8868\u5931\u6557",`${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.statusCode}:${(a=(n=t==null?void 0:t.response)==null?void 0:n.data)==null?void 0:a.message}`)}finally{d.hide()}},L=async d=>{var e,n,a,t;const l=h.show();try{await b(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u958B\u555F\u554F\u5377")}catch(o){c("danger","\u554F\u5377\u958B\u555F\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},N=async d=>{var e,n,a,t;const l=h.show();try{await v(d),await p(),c("success","\u66F4\u65B0\u554F\u5377\u6210\u529F","\u5DF2\u6210\u529F\u95DC\u9589\u554F\u5377")}catch(o){c("danger","\u554F\u5377\u95DC\u9589\u5931\u6557",`${(n=(e=o==null?void 0:o.response)==null?void 0:e.data)==null?void 0:n.statusCode}:${(t=(a=o==null?void 0:o.response)==null?void 0:a.data)==null?void 0:t.message}`)}finally{l.hide()}},U=d=>{x=d,C.show()};return(d,l)=>(i(),u("div",Y,[Z,s("div",q,[ee,s("div",te,[s("table",se,[ae,s("tbody",null,[(i(!0),u(O,null,S(m.value,(e,n)=>(i(),u("tr",{key:e.id},[s("td",oe,[s("div",ne,[e.id?M((i(),u("input",{key:0,id:"flexSwitchCheckDefault","onUpdate:modelValue":a=>e.enable=a,class:"form-check-input",type:"checkbox",role:"switch","true-value":1,"false-value":0,checked:e.enable,onChange:a=>e.enable?L(e.id):N(e.id)},null,40,le)),[[G,e.enable]]):y("",!0)])]),s("td",null,[M(s("input",{"onUpdate:modelValue":a=>e.question=a,type:"text",class:"form-control",placeholder:"\u8ACB\u8F38\u5165\u5167\u5BB9",disabled:e.id?e.enable:null},null,8,de),[[z,e.question]])]),s("td",ce,[e.id&&!e.enable?(i(),u("button",{key:0,type:"button",class:"btn btn-outline-dark",onClick:a=>D(e.id,e)}," \u5B8C\u6210 ",8,ie)):y("",!0),e.id?y("",!0):(i(),u("button",{key:1,type:"button",class:"btn btn-outline-primary",onClick:a=>B(e)}," \u65B0\u589E ",8,ue)),!e.enable||!e.id?(i(),u("button",{key:2,type:"button",class:"btn d-flex",onClick:a=>e.id?U(e.id):m.value.splice(n,1)},_e,8,he)):y("",!0)])]))),128)),s("tr",null,[re,s("td",null,[s("button",{type:"button",class:"btn d-flex text-primary d-flex",onClick:l[0]||(l[0]=e=>m.value.push({question:""}))},[be,T(" \u65B0\u589E\u8A55\u50F9 ")])])])])])])]),j(X,{ref_key:"alertRef",ref:$,onDeleteQuestionnaire:R},null,512)]))}};export{we as default}; diff --git a/assets/Tag.0c5bd492.js b/assets/Tag.0c5bd492.js new file mode 100644 index 0000000..078ad6c --- /dev/null +++ b/assets/Tag.0c5bd492.js @@ -0,0 +1 @@ +import{r as n,a as r,e as W,f as A,b as e,h as V,M as X,s as K,o as N,z as G,A as f,E as Q,c as _,F as P,q as U,g as Y,p as j,D as ee,m as te,w as se,v as ae,O as oe,i as le,B as H,x as I,G as ne,P as ie}from"./index.8b9bb582.js";import{B as de}from"./tab.a420e993.js";import{a as Z}from"./task-tags.ac385c58.js";const ce={class:"h4 text-dark mb-3 fw-bold"},re=e("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1),pe={class:"d-flex justify-content-end"},ue=e("button",{type:"button",class:"btn btn-primary me-2","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),me={__name:"TagDeleteModal",props:{name:{type:String,default:""}},emits:["delete"],setup(D,{expose:B,emit:w}){const b=D,g=n(null);return B({modalRef:g}),(x,v)=>(r(),W(X,{ref_key:"modalRef",ref:g,title:"\u662F\u5426\u522A\u9664\u6B64\u6A19\u7C64\uFF1F","has-footer":!0},{body:A(()=>[e("h5",ce,V(b.name),1),re,e("div",pe,[ue,e("button",{type:"button",class:"btn btn-danger",onClick:v[0]||(v[0]=y=>w("delete"))}," \u522A\u9664 ")])]),_:1},512))}},_e={class:"mb-3"},be=e("label",{for:"name",class:"form-label"},"\u6A19\u7C64\u540D\u7A31",-1),ve={class:"mb-3"},ye=e("label",{for:"description",class:"form-label"},"\u63CF\u8FF0",-1),fe={key:0,class:"mt-4"},ge={class:"card shadow-sm rounded-4 overflow-hidden h-100"},he=e("div",{class:"card-header bg-white py-2 d-flex align-items-center justify-content-between"},[e("h2",{class:"h6 mb-0 lh-base"},"\u5DF2\u5957\u7528\u6B64\u6A19\u7C64"),e("ul",{class:"nav nav-pills",id:"pills-tab",role:"tablist"},[e("li",{class:"nav-item",role:"presentation"},[e("button",{class:"nav-link active",id:"pills-home-tab","data-bs-toggle":"pill","data-bs-target":"#pills-home",type:"button",role:"tab","aria-controls":"pills-home","aria-selected":"true"}," \u4EFB\u52D9\u7FA4\u7D44 ")]),e("li",{class:"nav-item",role:"presentation"},[e("button",{class:"nav-link",id:"pills-profile-tab","data-bs-toggle":"pill","data-bs-target":"#pills-profile",type:"button",role:"tab","aria-controls":"pills-profile","aria-selected":"false"}," \u4EFB\u52D9 ")])])],-1),ke={class:"card-body",style:{"max-height":"230px","overflow-y":"scroll"}},$e={class:"tab-content",id:"pills-tabContent"},we={class:"tab-pane fade show active",id:"pills-home",role:"tabpanel","aria-labelledby":"pills-home-tab",tabindex:"0"},xe={class:"list-unstyled"},Te={class:"tab-pane fade",id:"pills-profile",role:"tabpanel","aria-labelledby":"pills-profile-tab",tabindex:"0"},Me={class:"list-unstyled"},Ce=e("button",{type:"button",class:"btn btn-secondary","data-bs-dismiss":"modal"}," \u53D6\u6D88 ",-1),Ve=["disabled"],Be={__name:"TagModal",props:{type:{type:String,default:""},data:{type:Object,default:()=>({id:"",name:"",description:""})}},emits:["update"],setup(D,{expose:B,emit:w}){const b=D,{apiGetTaskTagById:g,apiPostTaskTags:x,apiPutTaskTagById:v}=Z,y=n(null),R=n(null);B({tagContentModalRef:R});const i=n("create"),T=n(""),p=n({name:"",description:""});K(()=>{var o;return(o=b.data)==null?void 0:o.id},()=>{var o;(o=b.data)!=null&&o.id?(i.value="edit",T.value=b.data.id,p.value=JSON.parse(JSON.stringify(b.data))):(i.value="create",T.value="",p.value={name:"",description:""},y.value.resetForm())});const h=n({tasksApply:[],taskGroupsApply:[]}),L=async o=>{var d,l,m,c;try{const{task_tag:u}=await g(o);h.value={tasksApply:u.tasks_apply,taskGroupsApply:u.task_groups_apply}}catch(u){w("update",{type:"\u5931\u6557",status:i.value,error:`${(l=(d=u==null?void 0:u.response)==null?void 0:d.data)==null?void 0:l.statusCode}:${(c=(m=u==null?void 0:u.response)==null?void 0:m.data)==null?void 0:c.message}`})}};K(()=>T.value,o=>{o&&L(o)});const k=n(!1),E=async()=>{var o,d,l,m;k.value=!0;try{if(i.value==="create")await x(p.value),p.value={name:"",description:""};else{const c={name:p.value.name,description:p.value.description};await v(T.value,c)}k.value=!1,w("update",{type:"\u6210\u529F",status:i.value})}catch(c){k.value=!1,p.value.name=b.data.name,p.value.description=b.data.description,w("update",{type:"\u5931\u6557",status:i.value,error:`${(d=(o=c==null?void 0:c.response)==null?void 0:o.data)==null?void 0:d.statusCode}: ${(m=(l=c==null?void 0:c.response)==null?void 0:l.data)==null?void 0:m.message}`})}},F=n();return N(()=>{F.value=document.querySelectorAll("#myTab button"),F.value.forEach(o=>{const d=new de(o);o.addEventListener("click",l=>{l.preventDefault(),d.show()})})}),(o,d)=>{const l=G("Field"),m=G("ErrorMessage"),c=G("router-link"),u=G("VForm");return r(),W(u,{ref_key:"tagForm",ref:y,onSubmit:E},{default:A(({errors:S})=>[f(X,{ref_key:"tagContentModalRef",ref:R,title:i.value==="create"?"\u65B0\u589E\u6A19\u7C64":"\u7DE8\u8F2F\u6A19\u7C64","has-footer":!0},{body:A(()=>[e("div",_e,[be,f(l,{id:"name",modelValue:p.value.name,"onUpdate:modelValue":d[0]||(d[0]=t=>p.value.name=t),name:"name",label:"\u6A19\u7C64\u540D\u7A31",type:"text",class:Q(["form-control",{"is-invalid":S.name}]),rules:{required:!0}},null,8,["modelValue","class"]),f(m,{name:"name",class:"invalid-feedback"})]),e("div",ve,[ye,f(l,{as:"textarea",id:"description",modelValue:p.value.description,"onUpdate:modelValue":d[1]||(d[1]=t=>p.value.description=t),name:"description",label:"\u63CF\u8FF0",type:"text",rules:{required:!0},class:Q(["form-control",{"is-invalid":S.description}])},null,8,["modelValue","class"]),f(m,{name:"description",class:"invalid-feedback"})]),i.value==="edit"?(r(),_("div",fe,[e("div",ge,[he,e("div",ke,[e("div",$e,[e("div",we,[e("ul",xe,[(r(!0),_(P,null,U(h.value.taskGroupsApply,t=>(r(),_("li",{class:"mb-2",key:t.id},V(t.name),1))),128))])]),e("div",Te,[e("ul",Me,[(r(!0),_(P,null,U(h.value.tasksApply,t=>(r(),_("li",{class:"mb-2",key:t.id},[f(c,{target:"_blank",to:`/admin/task/list/${t.id}`},{default:A(()=>[Y(V(t.name),1)]),_:2},1032,["to"])]))),128))])])])])])])):j("",!0)]),footer:A(()=>[Ce,e("button",{type:"submit",class:"btn btn-primary",disabled:k.value},V(i.value==="create"?"\u65B0\u589E":"\u7DE8\u8F2F"),9,Ve)]),_:2},1032,["title"])]),_:1},512)}}},Re={class:"taskTag px-4 mt-4"},Fe=e("h1",{class:"fs-4 mb-3"},"\u6A19\u7C64\u7BA1\u7406",-1),Ie={class:"d-flex justify-content-between align-items-center mb-3"},Ae={class:"row w-75"},De={class:"col-md-6"},Le={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Se={class:"card-body p-0"},Ge={class:"table-responsive"},Ne={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Pe=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u6A19\u7C64\u540D\u7A31 "),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u63CF\u8FF0"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u4F7F\u7528\u72C0\u614B"),e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"},"\u7DE8\u8F2F")])],-1),Ue={class:"text-nowrap"},je={scope:"row",class:"ps-4"},Ee={scope:"row",class:"ps-4"},Oe={scope:"row",class:"ps-4"},qe={key:0,class:"text-success"},ze={key:1,class:"text-secondary"},Je={scope:"row",class:"ps-4"},Ke=["onClick"],Qe=e("span",{class:"material-icons align-middle fs-6"}," edit ",-1),He=["onClick"],We={key:0,class:"card-footer bg-white py-3"},Xe={class:"d-flex flex-wrap align-items-start"},tt={__name:"Tag",setup(D){const{apiGetTaskTags:B,apiDeleteTaskTagById:w}=Z,b=ee.useLoading(),g=n(!1),x=n(""),v=n(""),y=n({current_page:1,total_page:0,total:30}),R=n([]),i=async(t=1,s=10)=>{var O,q,z,J;v.value!==""?x.value=`name=${v.value}`:x.value="";const a=b.show(),{task_tags:M,pagination:$}=await B({page:t,count:s,scoped:x.value});try{R.value=M,y.value=$}catch(C){I("danger","\u53D6\u5F97\u5206\u985E\u6A19\u7C64\u5217\u8868\u5931\u6557",`${(q=(O=C==null?void 0:C.response)==null?void 0:O.data)==null?void 0:q.statusCode}:${(J=(z=C==null?void 0:C.response)==null?void 0:z.data)==null?void 0:J.message}`)}finally{a.hide()}},T=t=>{i(t)};N(async()=>{await i()});const h=te({type:"",data:{}}),L=n(null);let k=null;N(()=>{k=new H(L.value.tagContentModalRef.hModal)});const F=(t,s={})=>{h.type=t,h.data=s,k.show()},o=t=>{const s=t.status==="created"?"\u5EFA\u7ACB":"\u7DE8\u8F2F";t.type==="\u6210\u529F"?I("success",`${s}\u6A19\u7C64\u6210\u529F`,`\u5DF2\u6210\u529F${s}\u6A19\u7C64`):t.type==="\u5931\u6557"&&I("danger",`${s}\u6A19\u7C64\u5931\u6557`,t.error),k.hide(),i()},d=n(null),l=n({id:"",name:""});let m=null;N(()=>{m=new H(d.value.modalRef.hModal)});const u=(t,s)=>{l.value.id=t,l.value.name=s,m.show()},S=async()=>{var t,s,a,M;try{await w(l.value.id),I("success","\u522A\u9664\u6A19\u7C64\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u6A19\u7C64")}catch($){I("danger","\u522A\u9664\u6A19\u7C64\u5931\u6557",`${(s=(t=$==null?void 0:$.response)==null?void 0:t.data)==null?void 0:s.statusCode}:${(M=(a=$==null?void 0:$.response)==null?void 0:a.data)==null?void 0:M.message}`)}finally{m.hide(),l.value.id="",l.value.name="",i()}};return(t,s)=>(r(),_("div",Re,[Fe,e("div",Ie,[e("div",Ae,[e("div",De,[se(e("input",{"onUpdate:modelValue":s[0]||(s[0]=a=>v.value=a),onCompositionstart:s[1]||(s[1]=a=>g.value=!0),onCompositionend:s[2]||(s[2]=a=>g.value=!1),placeholder:"\u641C\u5C0B\u4EFB\u52D9\u6A19\u7C64",class:"form-control",onKeydown:s[3]||(s[3]=oe(ne(()=>{g.value||i(1)},["prevent"]),["enter"]))},null,544),[[ae,v.value]])])]),e("button",{class:"btn btn-primary",onClick:s[4]||(s[4]=a=>F("create"))}," \u65B0\u589E\u6A19\u7C64 ")]),e("div",Le,[e("div",Se,[e("div",Ge,[e("table",Ne,[Pe,e("tbody",Ue,[(r(!0),_(P,null,U(R.value,a=>(r(),_("tr",{key:a.id,class:"align-middle"},[e("td",je,V(a.name),1),e("td",Ee,V(a.description),1),e("td",Oe,[a.is_used?(r(),_("span",qe,"\u5DF2\u4F7F\u7528")):(r(),_("span",ze,"\u672A\u4F7F\u7528"))]),e("td",Je,[e("button",{class:"btn btn-sm btn-outline-gray ms-1",onClick:M=>F("edit",a)},[Qe,Y(" \u7DE8\u8F2F ")],8,Ke),a.is_used?j("",!0):(r(),_("button",{key:0,class:"btn btn-sm btn-outline-danger ms-2",onClick:M=>u(a.id,a.name)},"\u522A\u9664",8,He))])]))),128))])])])]),y.value.total_page>1?(r(),_("div",We,[e("div",Xe,[f(le(ie),{modelValue:y.value.current_page,"onUpdate:modelValue":s[5]||(s[5]=a=>y.value.current_page=a),records:y.value.total,"per-page":10,options:{chunk:6},onPaginate:T},null,8,["modelValue","records"])])])):j("",!0)]),f(me,{ref_key:"alertRef",ref:d,onDelete:S,name:l.value.name},null,8,["name"]),f(Be,{ref_key:"tagModalRef",ref:L,type:h.type,data:h.data,onUpdate:o},null,8,["type","data"])]))}};export{tt as default}; diff --git a/assets/TaskDetail.5b81e0f0.css b/assets/TaskDetail.5b81e0f0.css new file mode 100644 index 0000000..6a2fd90 --- /dev/null +++ b/assets/TaskDetail.5b81e0f0.css @@ -0,0 +1 @@ +@charset "UTF-8";.card-body-height{height:250px;overflow:hidden;overflow-y:auto}.nav-tabs .nav-link.active{background-color:#b0cc9759;color:#3d5950;font-weight:500}.preview-block{width:300px;height:157px;background-color:#b0cc9759;position:relative}.preview-block:after{content:"\8acb\4e0a\50b3\4e00\5f35\4efb\52d9\5716\7247";position:absolute;top:50%;left:50%;color:#3d5950;transform:translate(-50%,-50%);display:block}.task-detail .vs__dropdown-toggle{border:0!important} diff --git a/assets/TaskDetail.b2341464.js b/assets/TaskDetail.b2341464.js new file mode 100644 index 0000000..566dc20 --- /dev/null +++ b/assets/TaskDetail.b2341464.js @@ -0,0 +1 @@ +import{d as G,D as pe,l as ve,u as be,r as v,s as ge,o as he,z as B,a as r,c as d,b as e,A as m,f as A,h as y,x as R,g as K,E as F,F as C,q as L,a3 as fe,a4 as ke,w as b,v as $,i as ye,p as E,C as N,Q as we}from"./index.8b9bb582.js";import{I as xe,_ as Ve}from"./Editor.7c035c32.js";/* empty css */import{a as Ue}from"./task.9bd3355c.js";import{a as Te}from"./task-tags.ac385c58.js";const ae=h=>({"image/png":"png","image/jpg":"jpeg","image/jpeg":"jpeg"})[h],Ce=h=>new Promise((p,w)=>{const g=new FileReader;g.readAsArrayBuffer(h),g.onload=I=>{const{result:S}=I.target;p(S)},g.onerror=w}),Le={name:"ImageUploader",module:xe,options:{upload(h){return new Promise((p,w)=>{const{type:g,size:I}=h;if(!ae(g)){postMessage("danger","\u5716\u7247\u683C\u5F0F\u932F\u8AA4","\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"),w(new Error("\u50C5\u9650\u4E0A\u50B3 png\u3001jpg \u8207 jpeg \u6A94\u6848\u683C\u5F0F"));return}const S=1024*1024*3;if(I>=S){postMessage("danger","\u5716\u7247\u904E\u5927","\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"),w(new Error("\u5716\u7247\u5927\u5C0F\u4E0D\u5F97\u8D85\u904E 3MB\u3002"));return}const O=`/v1/common/upload/image/${ae(g)}`;(async()=>{try{const x=await Ce(h),{data:V}=await G.get(O),P=V.image_url,j=V.upload_url,U={transformRequest(a,M){return delete M.common.Authorization,a},headers:{"Content-Type":g},withCredentials:!1};await G.put(j,x,U),p(P)}catch{postMessage("danger","\u5716\u7247\u4E0A\u50B3\u5931\u6557","\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002"),w(new Error("\u5716\u7247\u4E0A\u50B3\u5931\u6557\u3002"))}})()})}}};const $e={class:"about task-detail px-4 mt-4"},Ie={class:"border-bottom border-light pb-2 mb-4"},Se={"aria-label":"breadcrumb"},Me={class:"breadcrumb"},Be={class:"breadcrumb-item"},Fe={class:"breadcrumb-item active","aria-current":"page"},je={class:"fs-4 mb-3"},qe={class:"my-3"},Ae={class:"row"},Re={class:"col-md-6"},Ee={class:"mb-3"},Ne=e("label",{class:"form-label",for:"name"},"\u4EFB\u52D9\u540D\u7A31",-1),Ge={class:"col-md-6"},Oe={class:"mb-3"},Pe=e("label",{class:"form-label",for:"taskGroupName"},"\u6240\u5C6C\u7FA4\u7D44",-1),ze={class:"position-relative"},De=["value"],Je=["required"],He={class:"col-md-6"},Qe={class:"mb-3"},Ke=e("label",{class:"form-label",for:"image_url"},"\u4EFB\u52D9\u5716\u7247 (1200 x 628)",-1),We={class:"mt-2"},Xe=["src"],Ye={key:1,class:"preview-block"},Ze={class:"col-md-6"},et={class:"mb-3"},tt=e("label",{class:"form-label",for:"taskPoint"},"\u4EFB\u52D9\u7A4D\u5206",-1),st={class:"mb-3"},at=e("label",{class:"form-label",for:"abstract"},"\u6458\u8981",-1),ot={class:"mb-3"},lt=e("label",{class:"form-label",for:"description"},"\u4EFB\u52D9\u5167\u5BB9\u8AAA\u660E",-1),nt={class:"mt-3 position-relative"},it={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},rt={class:"card-header bg-white py-3"},dt={key:0},ct={class:"card-body card-body-height"},ut={class:"list list-unstyled"},_t={class:"form-check"},mt=["id","value"],pt=["for"],vt=e("hr",null,null,-1),bt={class:"row"},gt={class:"col-md-6"},ht={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},ft=e("div",{class:"card-header bg-white py-3"},"\u4EFB\u52D9\u5B8C\u6210\u5F8C\u6703\u7372\u5F97\u7684\u6280\u80FD",-1),kt={class:"card-body card-body-height"},yt={class:"mb-3"},wt=e("label",{class:"form-label d-block h5",for:"summary"},null,-1),xt=["onUpdate:modelValue"],Vt=["onClick"],Ut={class:"col-md-6"},Tt={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Ct=e("div",{class:"card-header bg-white py-3"},"\u4EFB\u52D9\u5B8C\u6210\u689D\u4EF6",-1),Lt={class:"card-body card-body-height"},$t={class:"mb-3"},It=["onUpdate:modelValue"],St=["onClick"],Mt=e("hr",null,null,-1),Bt=e("h5",null,"\u662F\u5426\u5305\u542B\u7B49\u7D1A",-1),Ft={class:"form-check mb-3"},jt=e("label",{class:"form-check-label",for:"task-has-level"}," \u986F\u793A\u4EFB\u52D9\u5206\u968E\u7B49\u7D1A ",-1),qt={key:0,class:"my-3"},At=["onUpdate:modelValue"],Rt=["onClick"],Et=e("hr",null,null,-1),Nt=e("h5",null,"\u662F\u5426\u9700\u8981\u524D\u7F6E\u4EFB\u52D9",-1),Gt={class:"form-check mb-3"},Ot=e("label",{class:"form-check-label",for:"beforeStart"}," \u662F\u5426\u9700\u8981\u524D\u7F6E\u4EFB\u52D9 ",-1),Pt={key:1,class:"mb-3"},zt=e("label",{class:"form-label",for:"predecessor_task_id"},"\u524D\u7F6E\u4EFB\u52D9",-1),Dt=["value"],Jt=e("hr",null,null,-1),Ht={class:"row"},Qt={class:"col-md-6"},Kt={class:"mb-3"},Wt=e("label",{class:"form-label",for:"task_start_at"},"\u958B\u59CB\u6642\u9593",-1),Xt={class:"col-md-6"},Yt={class:"mb-3"},Zt=e("label",{class:"form-label",for:"task_expired_at"},"\u5230\u671F\u6642\u9593",-1),es={class:"form-check mb-3"},ts=e("label",{class:"form-check-label",for:"enable"}," \u662F\u5426\u555F\u7528\u4EFB\u52D9 ",-1),ss={class:"d-flex justify-content-end"},as={class:"d-flex flex-column align-items-end"},os=["disabled"],ls=e("i",{class:"fas fa-save"},null,-1),ns={key:0,class:"mb-0 mt-2 text-danger"},ps={__name:"TaskDetail",props:{type:{type:String}},setup(h){const p=h,{apiGetTasks:w,apiGetTaskGroupsList:g,apiGetTaskById:I,apiPostTask:S,apiPutTaskById:O}=Ue,{apiGetTaskTags:W}=Te,x=pe.useLoading(),V=ve(),P=be(),j=v(null),U=v(!1),a=v({name:"",task_group_id:"",image_url:"",tag_ids:[],rewarded_skills:[{content:""}],completion_criteria:[{content:""}],level:[]}),M=n=>{a.value[n].push({content:""})},z=(n,t)=>{a.value[n].splice(t,1)},q=v(""),D=v([]),J=v([]),H=v({current_page:1,total_page:1,total:0}),oe=async()=>{const n=x.show(),{task_groups:t}=await g({page:1,count:150}),{task_tags:o,pagination:i}=await W({page:1,count:150});D.value=t,J.value=o,H.value=i,n.hide()},T=v(!1),X=v([]),le=async n=>{const t=x.show(),{tasks:o}=await w({count:100,page:1,scoped:n});X.value=o.filter(i=>i.id!==q.value),t.hide()};ge(()=>T.value,n=>{if(n){const t=a.value.task_group_id;if(!t)R("danger","\u8ACB\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44","\u56E0\u524D\u7F6E\u4EFB\u52D9\u8981\u548C\u6B64\u4EFB\u52D9\u5728\u540C\u4E00\u500B\u7FA4\u7D44\u4E0B\uFF0C\u8ACB\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44");else{const o=`&filter=task_group&task_group_id=${t}`;le(o)}}});const Y=async n=>{var i,l,f,k;const t=x.show(),{task:o}=await I(n);a.value={name:o.name,task_group_id:(i=o==null?void 0:o.task_group)==null?void 0:i.id,predecessor_task_id:(l=o==null?void 0:o.predecessor_task)==null?void 0:l.id,tag_ids:o.tags.map(c=>c.id),rewarded_point:o.rewarded_point,abstract:o.abstract,description:o.description,rewarded_skills:o.rewarded_skills.map(c=>({content:c})),completion_criteria:o.completion_criteria.map(c=>({content:c})),level:o.level?o.level.map(c=>({content:c})):[],start_at:o.start_at?new Date(o.start_at).toLocaleDateString("sv-SE"):null,expired_at:o.expired_at?new Date(o.expired_at).toLocaleDateString("sv-SE"):null,enable:o.enable,image_url:o.image_url},(o==null?void 0:o.level)&&((f=o.level)==null?void 0:f.length)>0&&(U.value=!0),(o==null?void 0:o.predecessor_task)&&((k=o.predecessor_task)==null?void 0:k.id)&&(T.value=!0),t.hide()};he(async()=>{const{id:n}=V.params,{task_copy_id:t}=V.query;oe(),q.value=n,q.value&&Y(n),t&&!n&&Y(t)});const ne=async()=>{var i;a.value.description=j.value.editorContent,T.value||delete a.value.predecessor_task_id;const n=JSON.parse(JSON.stringify(a.value.completion_criteria.filter(l=>l.content!=="")));a.value.completion_criteria=n.map(l=>l.content);const t=JSON.parse(JSON.stringify(a.value.rewarded_skills.filter(l=>l.content!=="")));a.value.rewarded_skills=t==null?void 0:t.map(l=>l.content),((i=a.value.level)==null?void 0:i.length)===0?delete a.value.level:a.value.level=a.value.level?a.value.level.map(l=>l.content):[];const o=p.type==="create"?"\u65B0\u589E":"\u7DE8\u8F2F";try{Object.keys(a.value).forEach(l=>{a.value[l]===null&&delete a.value[l]}),p.type==="create"&&await S(a.value),p.type==="edit"&&await O(q.value,a.value),R("success",`${o}\u6210\u529F`,`${o}\u4EFB\u52D9\u6210\u529F`),P.push({name:"TaskList",query:V.query})}catch(l){R("danger",`${o}\u5931\u6557`,`${l.response.data.statusCode}:${l.response.data.message}`)}},Z=v(!1),ee=v(null),ie=n=>new Promise((t,o)=>{const i=new FileReader;i.readAsArrayBuffer(n),i.onload=l=>{const{result:f}=l.target;t(f)},i.onerror=o}),Q=(n,t)=>{Z.value=!1,n.target.value="",R("danger","\u5716\u7247\u4E0A\u50B3\u5931\u6557",`${t}`)},re=n=>{const t=x.show({container:ee.value,width:30,height:30}),o=n.target.files[0],i=3*1024*1024;if(o.size>i){Q(n,"\u5716\u7247\u5927\u5C0F\u4E0D\u80FD\u8D85\u904E 3MB");return}if(o){const l=new FileReader;l.onload=f=>{const k=new Image;k.onload=()=>{const{width:c,height:s}=k;if(c===1200&&s===628){const _=`/v1/common/upload/image/${o.type.split("/")[1]}`;(async()=>{try{const te=await ie(o),{data:se}=await G.get(_),de=se.image_url,ce=se.upload_url,ue={transformRequest(_e,me){return delete me.common.Authorization,_e},headers:{"Content-Type":o.type},withCredentials:!1};await G.put(ce,te,ue),a.value.image_url=de,t.hide()}catch{Q(n,"\u5716\u7247\u4E0A\u50B3\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u4E0A\u50B3\u3002")}})()}else Q(n,"\u5716\u7247\u5BEC\u9AD8\u9700\u7B26\u5408 1200 x 628")},k.src=f.target.result},l.readAsDataURL(o)}};return(n,t)=>{const o=B("router-link"),i=B("Field"),l=B("ErrorMessage"),f=B("v-select"),k=B("VForm");return r(),d("div",$e,[e("header",Ie,[e("nav",Se,[e("ol",Me,[e("li",Be,[m(o,{to:"/admin/task/list"},{default:A(()=>[K(" \u4EFB\u52D9\u5217\u8868 ")]),_:1})]),e("li",Fe,y(p.type==="create"?"\u65B0\u589E\u4EFB\u52D9":"\u7DE8\u8F2F\u4EFB\u52D9"),1)])])]),e("h1",je,y(p.type==="create"?"\u65B0\u589E\u4EFB\u52D9":"\u7DE8\u8F2F\u4EFB\u52D9"),1),e("div",qe,[m(k,{ref:"myForm",onSubmit:ne},{default:A(({errors:c})=>[e("div",Ae,[e("div",Re,[e("div",Ee,[Ne,m(i,{id:"name",modelValue:a.value.name,"onUpdate:modelValue":t[0]||(t[0]=s=>a.value.name=s),name:"name",label:"\u4EFB\u52D9\u540D\u7A31",type:"text",class:F(["form-control",{"is-invalid":c.name}]),rules:{required:!0}},null,8,["modelValue","class"]),m(l,{name:"name",class:"invalid-feedback"})])]),e("div",Ge,[e("div",Oe,[Pe,e("div",ze,[m(i,{as:"select",id:"taskGroupName",modelValue:a.value.task_group_id,"onUpdate:modelValue":t[1]||(t[1]=s=>a.value.task_group_id=s),name:"task_group_id",class:F(["form-select",{"is-invalid":c.task_group_id}]),label:"\u6240\u5C6C\u7FA4\u7D44",rules:{required:!0}},{default:A(()=>[(r(!0),d(C,null,L(D.value,s=>(r(),d("option",{key:s.id,value:s.id},y(s.name),9,De))),128))]),_:2},1032,["modelValue","class"]),m(f,{options:D.value,label:"name",class:"form-select position-absolute",modelValue:a.value.task_group_id,"onUpdate:modelValue":t[2]||(t[2]=s=>a.value.task_group_id=s),clearable:!1,reduce:s=>s.id,style:{border:"0",padding:"0",background:"white",width:"calc(100% - 2px)",left:"1px",top:"1px"}},{search:A(({attributes:s,events:u})=>[e("input",fe({class:"vs__search",required:!a.value.task_group_id},s,ke(u,!0)),null,16,Je)]),_:1},8,["options","modelValue","reduce"])]),m(l,{name:"task_group_id",class:"invalid-feedback"}),e("span",{class:F(["invalid-feedback",{"d-block":c.task_group_id}])},"\u6240\u5C6C\u7FA4\u7D44 \u70BA\u5FC5\u586B",2)])]),e("div",He,[e("div",Qe,[Ke,e("div",{class:"position-relative",ref_key:"imageLoadingRef",ref:ee},[e("input",{ref:"uploadTaskImageRef",type:"file",class:"form-control mb-2",accept:".png,.jpg,.jpeg",onChange:re},null,544)],512),m(i,{id:"image_url",modelValue:a.value.image_url,"onUpdate:modelValue":t[3]||(t[3]=s=>a.value.image_url=s),name:"image_url",label:"\u4EFB\u52D9\u5716\u7247",type:"text",disabled:Z.value,class:F(["form-control",{"is-invalid":c.image_url}]),rules:{required:!0}},null,8,["modelValue","disabled","class"]),m(l,{name:"image_url",class:"invalid-feedback"}),e("div",We,[a.value.image_url?(r(),d("img",{key:0,src:a.value.image_url,alt:"\u4EFB\u52D9\u5716\u7247",width:"300"},null,8,Xe)):(r(),d("div",Ye))])])]),e("div",Ze,[e("div",et,[tt,m(i,{id:"taskPoint",modelValue:a.value.rewarded_point,"onUpdate:modelValue":t[4]||(t[4]=s=>a.value.rewarded_point=s),modelModifiers:{number:!0},name:"rewarded_point",label:"\u4EFB\u52D9\u7A4D\u5206",type:"number",class:F(["form-control",{"is-invalid":c.rewarded_point}]),rules:{required:!0,min_value:10}},null,8,["modelValue","class"]),m(l,{name:"rewarded_point",class:"invalid-feedback"})])])]),e("div",st,[at,b(e("textarea",{class:"form-control",id:"abstract",placeholder:"","onUpdate:modelValue":t[5]||(t[5]=s=>a.value.abstract=s)},null,512),[[$,a.value.abstract]])]),e("div",ot,[lt,m(Ve,{ref_key:"editorRef",ref:j,content:a.value.description,modules:ye(Le)},null,8,["content","modules"])]),e("div",nt,[e("div",it,[e("div",rt,[K("\u4EFB\u52D9\u6A19\u7C64 "),H.value.total>0?(r(),d("small",dt," \uFF5C\u5DF2\u8F09\u5165 "+y(J.value.length)+" \u500B / \u5171 "+y(H.value.total)+" \u500B",1)):E("",!0)]),e("div",ct,[e("ul",ut,[(r(!0),d(C,null,L(J.value,(s,u)=>(r(),d("li",{key:`group-${u}`,class:"list-item"},[e("div",_t,[b(e("input",{"onUpdate:modelValue":t[6]||(t[6]=_=>a.value.tag_ids=_),name:"tag_ids",id:s.id,class:"form-check-input",type:"checkbox",value:s.id},null,8,mt),[[N,a.value.tag_ids]]),e("label",{class:"form-check-label",for:s.id},y(s.name),9,pt)]),vt]))),128))])])])]),e("div",bt,[e("div",gt,[e("div",ht,[ft,e("div",kt,[e("div",yt,[wt,(r(!0),d(C,null,L(a.value.rewarded_skills,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`skill_${u}`},[b(e("input",{type:"text",class:"form-control","onUpdate:modelValue":_=>s.content=_,placeholder:"\u6280\u80FD\u63CF\u8FF0","aria-label":"\u6280\u80FD\u63CF\u8FF0","aria-describedby":"button-addon2"},null,8,xt),[[$,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:_=>z("rewarded_skills",u)}," \u522A\u9664 ",8,Vt)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[7]||(t[7]=s=>M("rewarded_skills"))}," \u65B0\u589E\u4E00\u5217 ")])])])]),e("div",Ut,[e("div",Tt,[Ct,e("div",Lt,[e("div",$t,[(r(!0),d(C,null,L(a.value.completion_criteria,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`complete_${u}`},[b(e("input",{type:"text",class:"form-control",placeholder:"\u5B8C\u6210\u689D\u4EF6","aria-label":"\u5B8C\u6210\u689D\u4EF6","onUpdate:modelValue":_=>s.content=_,"aria-describedby":"button-addon2"},null,8,It),[[$,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:_=>z("completion_criteria",u)}," \u522A\u9664 ",8,St)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[8]||(t[8]=s=>M("completion_criteria"))}," \u65B0\u589E\u4E00\u5217 ")])])])])]),Mt,Bt,e("div",Ft,[b(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[9]||(t[9]=s=>U.value=s),id:"task-has-level","true-value":!0,"false-value":!1},null,512),[[N,U.value]]),jt]),U.value?(r(),d("div",qt,[(r(!0),d(C,null,L(a.value.level,(s,u)=>(r(),d("div",{class:"input-group mb-3",key:`level_${u}`},[b(e("input",{type:"text",class:"form-control",placeholder:"\u7B49\u7D1A\u5167\u5BB9","aria-label":"\u7B49\u7D1A\u5167\u5BB9","onUpdate:modelValue":_=>s.content=_,"aria-describedby":"button-addon2"},null,8,At),[[$,s.content]]),e("button",{class:"btn btn-outline-danger",type:"button",id:"button-addon2",onClick:_=>z("level",u)}," \u522A\u9664 ",8,Rt)]))),128)),e("button",{type:"button",class:"btn btn-sm btn-outline-primary",onClick:t[10]||(t[10]=s=>M("level"))}," \u65B0\u589E\u4E00\u5217 ")])):E("",!0),Et,Nt,e("div",Gt,[b(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[11]||(t[11]=s=>T.value=s),id:"beforeStart","true-value":!0,"false-value":!1},null,512),[[N,T.value]]),Ot]),T.value?(r(),d("div",Pt,[zt,b(e("select",{class:"form-select",id:"predecessor_task_id","onUpdate:modelValue":t[12]||(t[12]=s=>a.value.predecessor_task_id=s),"aria-label":"Floating label select example"},[(r(!0),d(C,null,L(X.value,s=>(r(),d("option",{value:s.id,key:s.id},y(s.name),9,Dt))),128))],512),[[we,a.value.predecessor_task_id]])])):E("",!0),Jt,e("div",Ht,[e("div",Qt,[e("div",Kt,[Wt,b(e("input",{type:"date",class:"form-control",id:"task_start_at","onUpdate:modelValue":t[13]||(t[13]=s=>a.value.start_at=s),placeholder:""},null,512),[[$,a.value.start_at]])])]),e("div",Xt,[e("div",Yt,[Zt,b(e("input",{type:"date",class:"form-control",id:"task_expired_at","onUpdate:modelValue":t[14]||(t[14]=s=>a.value.expired_at=s),placeholder:""},null,512),[[$,a.value.expired_at]])])])]),e("div",es,[b(e("input",{class:"form-check-input",type:"checkbox","onUpdate:modelValue":t[15]||(t[15]=s=>a.value.enable=s),id:"enable","true-value":!0,"false-value":!1},null,512),[[N,a.value.enable]]),ts]),e("div",ss,[e("div",as,[e("button",{type:"submit",class:"btn btn-lg btn-primary mt-2",disabled:Object.keys(c).length>0},[ls,K(" "+y(p.type==="create"?"\u5EFA\u7ACB\u4EFB\u52D9":"\u5132\u5B58\u66F4\u65B0"),1)],8,os),Object.keys(c).length>0?(r(),d("p",ns," \u8ACB\u78BA\u8A8D\u4EFB\u52D9\u5FC5\u586B\u9805\u76EE\u662F\u5426\u586B\u5BEB\u5B8C\u6574\u3002 ")):E("",!0)])])]),_:1},512)])])}}};export{ps as default}; diff --git a/assets/TaskList.75d6ed74.js b/assets/TaskList.75d6ed74.js new file mode 100644 index 0000000..d76acee --- /dev/null +++ b/assets/TaskList.75d6ed74.js @@ -0,0 +1 @@ +import{_ as J,D as K,u as W,l as X,r,s as R,m as Y,o as Z,z as U,a as o,c as l,b as s,w as B,Q as ss,A as b,f as L,v as ts,p as $,F as G,q as V,i as es,g as h,E as as,h as g,G as os,P as ls,R as ns,S as cs,x as is}from"./index.8b9bb582.js";/* empty css */import{a as ds}from"./task.9bd3355c.js";import{a as rs}from"./task-tags.ac385c58.js";const u=f=>(ns("data-v-daeda8d6"),f=f(),cs(),f),_s={class:"task px-4 mt-4 position-relative"},us=u(()=>s("h1",{class:"fs-4 mb-0"},"\u4EFB\u52D9\u5217\u8868",-1)),ps={class:"d-flex align-items-center justify-content-between my-3"},ms={class:"row align-items-center w-75"},vs={class:"col-md-6"},gs=u(()=>s("option",{selected:"",value:"default"},"\u5168\u90E8\u4EFB\u52D9",-1)),hs=u(()=>s("option",{value:"task_group"},[h("\u4EE5"),s("b",null,"\u4EFB\u52D9\u7FA4\u7D44"),h("\u7BE9\u9078")],-1)),ks=u(()=>s("option",{value:"task_tags"},[h("\u4EE5"),s("b",null,"\u4EFB\u52D9\u6A19\u7C64"),h("\u7BE9\u9078")],-1)),ys=[gs,hs,ks],bs={key:0},fs={class:"row align-items-center w-75 my-3"},ws=u(()=>s("p",{class:"mb-1"},"\u5148\u9078\u64C7\u4EFB\u52D9\u7FA4\u7D44\u5F8C\uFF0C\u518D\u8F38\u5165\u4EFB\u52D9\u540D\u7A31\u3002",-1)),xs={class:"col-lg-6"},Ts={class:"col-lg-4"},Ls={class:"mb-0"},$s=["disabled"],Gs={key:1,class:"w-75 my-3"},Vs={class:"d-flex flex-wrap"},Cs=["onClick"],Ss={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},qs={class:"card-body p-0"},Ds={class:"table-responsive"},Ms={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},Rs=u(()=>s("thead",{class:"bg-light"},[s("tr",null,[s("th",{scope:"col",width:"60",class:"ps-4 py-3 text-muted border-0"}),s("th",{scope:"col",width:"130",class:"ps-4 py-3 text-muted border-0"}," \u5206\u985E\u7FA4\u7D44 "),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u540D\u7A31"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u5206\u985E\u6A19\u7C64"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u662F\u5426\u555F\u7528"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u958B\u59CB\u6642\u9593"),s("th",{scope:"col",class:"py-3 text-muted border-0"},"\u5230\u671F\u6642\u9593"),s("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"},"\u7DE8\u8F2F")])],-1)),Us={class:"text-nowrap"},Bs={scope:"row",class:"ps-4"},Es={scope:"row",class:"ps-4"},Is={scope:"row",class:"ps-2"},Ns=["onClick"],Ps={scope:"row",class:"ps-2"},zs={scope:"row",class:"ps-2"},As={key:0,class:"text-success"},js={key:1,class:"text-muted"},Fs={scope:"row",class:"ps-2"},Os={key:0},Qs={key:1,class:"text-muted"},Hs={scope:"row",class:"ps-2"},Js={key:0},Ks={key:1,class:"text-muted"},Ws={class:"pe-3"},Xs=u(()=>s("span",{class:"material-icons align-middle fs-6"}," edit ",-1)),Ys=u(()=>s("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1)),Zs={key:0,class:"card-footer bg-white py-3"},st={class:"d-flex flex-wrap align-items-start"},tt={__name:"TaskList",setup(f){const{apiGetTaskGroupsList:E,apiGetTasks:I}=ds,{apiGetTaskTags:N}=rs,x=K.useLoading(),C=W(),w=X(),T=r([]),d=r(null),p=r({current_page:1,total_page:1}),k=async(e=1)=>{var i,v,t,y;const a=x.show();try{const{tasks:c,pagination:H}=await I({count:20,page:e,scoped:d.value});T.value=c,p.value=H}catch(c){is("danger","\u53D6\u5F97\u4EFB\u52D9\u5217\u8868\u5931\u6557",`${(v=(i=c==null?void 0:c.response)==null?void 0:i.data)==null?void 0:v.statusCode}:${(y=(t=c==null?void 0:c.response)==null?void 0:t.data)==null?void 0:y.message}`)}finally{a.hide()}},P=r([]);R(T,e=>{const a=e.map(i=>i.category);P.value=[...new Set(a)]});const _=r("default"),S=r([]),q=r(!1),z=async()=>{const e=x.show(),{task_groups:a}=await E({page:1,count:150});S.value=a,q.value=!0,e.hide()},D=r([]),M=r(!1),A=async()=>{const e=x.show(),{task_tags:a}=await N({page:1,count:150});D.value=a,M.value=!0,e.hide()};R(_,async e=>{e==="task_group"&&!q.value&&await z(),e==="task_tags"&&!M.value&&await A(),e==="default"&&(d.value="",C.replace({name:"TaskList",query:{}}),k())});const j=e=>{k(e),C.replace({name:"TaskList",query:{}})},n=Y({task_group_id:"",task_name:"",task_tags:""}),F=()=>{d.value=`&filter=${_.value}&task_group_id=${n.task_group_id}`,n.task_name&&(d.value+=`&task_name=${n.task_name}`),k()};Z(async()=>{var e,a,i,v;((e=w.query)==null?void 0:e.filter)==="task_group"&&(_.value="task_group",n.task_group_id=(a=w.query)==null?void 0:a.task_group_id,n.task_name=(i=w.query)==null?void 0:i.task_name,d.value=`&filter=${_.value}&task_group_id=${n.task_group_id}`,n.task_name&&(d.value+=`&task_name=${n.task_name}`)),await k(((v=w.query)==null?void 0:v.page)||1)});const m=r([]),O=e=>{m.value.includes(e)?m.value=m.value.filter(a=>a!==e):m.value.push(e),m.value.length>0?(n.task_tags=m.value.join(","),d.value=`&filter=${_.value}&task_tags=${n.task_tags}`,k()):(d.value=null,k())},Q=e=>{window.open(`https://dev-hex-user.hexschool.io/#/tasks/${e}?preview=1`,"_blank")};return(e,a)=>{const i=U("router-link"),v=U("v-select");return o(),l("div",_s,[us,s("div",ps,[s("div",ms,[s("div",vs,[B(s("select",{class:"form-select w-100",placeholder:"\u9078\u64C7\u8981\u7BE9\u9078\u7684\u985E\u5225","onUpdate:modelValue":a[0]||(a[0]=t=>_.value=t)},ys,512),[[ss,_.value]])])]),b(i,{to:"/admin/task/list/create",class:"btn btn-primary"},{default:L(()=>[h(" \u65B0\u589E\u4EFB\u52D9 ")]),_:1})]),_.value==="task_group"?(o(),l("div",bs,[s("div",fs,[ws,s("div",xs,[b(v,{modelValue:n.task_group_id,"onUpdate:modelValue":a[1]||(a[1]=t=>n.task_group_id=t),options:S.value,label:"name",clearable:!1,reduce:t=>t.id},null,8,["modelValue","options","reduce"])]),s("div",Ts,[s("div",Ls,[B(s("input",{id:"search","onUpdate:modelValue":a[2]||(a[2]=t=>n.task_name=t),type:"text",placeholder:"\u641C\u5C0B\u4EFB\u52D9\uFF08\u540D\u7A31\uFF09",class:"form-control",disabled:!n.task_group_id},null,8,$s),[[ts,n.task_name]])])])]),s("div",{class:"mb-4"},[s("button",{type:"button",class:"btn btn-primary",onClick:F}," \u641C\u5C0B ")])])):$("",!0),_.value==="task_tags"?(o(),l("div",Gs,[s("div",Vs,[(o(!0),l(G,null,V(D.value,t=>(o(),l("button",{key:t.id,type:"button",onClick:y=>O(t.id),class:as([{active:m.value.includes(t.id)},"btn btn-sm btn-outline-primary custom-btn-tag border-0 mx-2 mb-1"])},g(t.name),11,Cs))),128))])])):$("",!0),s("div",Ss,[s("div",qs,[s("div",Ds,[s("table",Ms,[Rs,s("tbody",Us,[(o(!0),l(G,null,V(T.value,(t,y)=>(o(),l("tr",{key:t.id,class:"align-middle"},[s("td",Bs,g((p.value.current_page-1)*20+(y+1)),1),s("td",Es,g(t.task_group_name),1),s("td",Is,[s("a",{href:"#",onClick:os(c=>Q(t.id),["prevent"])},g(t.name),9,Ns)]),s("td",Ps,[(o(!0),l(G,null,V(t.tags,c=>(o(),l("span",{key:c,class:"badge bg-light text-dark me-1"},g(c),1))),128))]),s("td",zs,[t.enable?(o(),l("span",As,"\u662F")):(o(),l("span",js,"\u5426"))]),s("td",Fs,[t.start_at?(o(),l("span",Os,g(new Date(t.start_at).toLocaleDateString("sv-SE")),1)):(o(),l("span",Qs,"\u672A\u8A2D\u5B9A"))]),s("td",Hs,[t.expired_at?(o(),l("span",Js,g(new Date(t.expired_at).toLocaleDateString("sv-SE")),1)):(o(),l("span",Ks,"\u672A\u8A2D\u5B9A"))]),s("td",Ws,[b(i,{to:`/admin/task/list/${t.id}?page=${p.value.current_page}${d.value?d.value:""}`,class:"btn btn-sm btn-outline-gray"},{default:L(()=>[Xs,h(" \u7DE8\u8F2F ")]),_:2},1032,["to"]),b(i,{to:`/admin/task/list/create?task_copy_id=${t.id}`,class:"btn btn-sm btn-outline-gray ms-1"},{default:L(()=>[Ys,h(" \u8907\u88FD ")]),_:2},1032,["to"])])]))),128))])])])]),p.value.total_page>1?(o(),l("div",Zs,[s("div",st,[b(es(ls),{modelValue:p.value.current_page,"onUpdate:modelValue":a[3]||(a[3]=t=>p.value.current_page=t),records:p.value.total,"per-page":10,options:{chunk:6},onPaginate:j},null,8,["modelValue","records"])])])):$("",!0)])])}}},ct=J(tt,[["__scopeId","data-v-daeda8d6"]]);export{ct as default}; diff --git a/assets/TaskList.7a05c82b.css b/assets/TaskList.7a05c82b.css new file mode 100644 index 0000000..3786661 --- /dev/null +++ b/assets/TaskList.7a05c82b.css @@ -0,0 +1 @@ +.custom-btn-tag[data-v-daeda8d6]{background-color:#f8f9fa;color:var(--bs-dark-rgb)}.custom-btn-tag[data-v-daeda8d6]:hover{background-color:#ececec}.custom-btn-tag.active[data-v-daeda8d6]{background-color:var(--bs-dark);color:#f8f9fa} diff --git a/assets/Tasks.18a05b7f.js b/assets/Tasks.18a05b7f.js new file mode 100644 index 0000000..70830a2 --- /dev/null +++ b/assets/Tasks.18a05b7f.js @@ -0,0 +1 @@ +import{D as lt,m as ct,r as w,X as V,s as it,o as dt,j as I,a as i,c as r,b as c,A as N,e as rt,p as C,F as k,q as F,i as D,x as p,Z as x,d as ut,h as v,g as _,T as pt}from"./index.8b9bb582.js";import{a as yt}from"./statistics.1a0d5647.js";import{a as vt}from"./task.9bd3355c.js";import{_ as ht,a as mt,b as gt}from"./FavoriteModal.d433ff02.js";import{b as O}from"./date.7e59e512.js";const wt={class:"container-fluid px-4 pt-4 pb-6"},kt=c("h1",{class:"fs-4 mb-5"},"\u4EFB\u52D9\u67E5\u8A62",-1),ft={key:1,class:"d-flex justify-content-end"},_t={class:"table-responsive"},bt={key:0,class:"table table-striped"},Tt=c("th",{style:{"white-space":"nowrap"}},"\u65E5\u671F",-1),$t={style:{"white-space":"nowrap"}},Ft={"data-bs-toggle":"tooltip",title:"\u7E3D\u6578"},St={"data-bs-toggle":"tooltip",title:"\u65B0\u589E"},Gt={"data-bs-toggle":"tooltip",title:"\u56DE\u8986"},Lt=c("td",{style:{"white-space":"nowrap"}},"\u7E3D\u8A08",-1),qt={__name:"Tasks",setup(Ct){const{apiGetStatsTasks:U,apiGetStatsTasksSelector:X,apiGetStatsTasksFavorite:Z,apiPostStatsTasksFavorite:z,apiDeleteStatsTasksFavorite:H}=yt,{apiGetTaskGroupsList:J}=vt,h=lt.useLoading(),f=ct({list:[],type:[],range:[]}),b=w({name:"",type:"",taskGroupIds:"",range:"",from:O(new Date),to:O(new Date)}),u=w({}),S=w(null),K=async({type:s,taskGroupIds:n,range:a,from:o,to:l})=>(await U({type:s,taskGroupIds:n,range:a,from:o,to:l})).result,E=w(0),Q=w({total:0,count:0,current_page:0,total_page:0}),j=async s=>{var a,o,l,e;const n=h.show();try{E.value+=s;const t=await J({count:100,page:E.value}),d=t.task_groups.map(g=>({id:g.id,name:g.name}));Q.value=t.pagination,f.list=[...f.list,...d]}catch(t){p("danger","\u53D6\u5F97\u5931\u6557",`${(o=(a=t==null?void 0:t.response)==null?void 0:a.data)==null?void 0:o.statusCode}:${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{n.hide()}},W=async()=>{const s=await X(),{result:n}=s;return n},m=w([]),G=()=>{m.value.forEach(n=>n.dispose()),m.value=[],[].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]')).forEach(n=>{const a=new pt(n);m.value.push(a)})};V(()=>{m.value.forEach(s=>s.dispose()),m.value=[]}),it(()=>u.value,async()=>{await x(),G()});const Y=async s=>{var a,o,l,e;const n=h.show();try{const t=await K({type:s.type,taskGroupIds:s.taskGroupIds.join(","),range:s.range,from:s.from,to:s.to});u.value=t,await x(),G()}catch(t){p("danger","\u67E5\u8A62\u5931\u6557",`${(o=(a=t==null?void 0:t.response)==null?void 0:a.data)==null?void 0:o.statusCode}:${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{n.hide()}},B=w([]),L=async()=>{var n,a,o,l;const s=h.show();try{const{result:e}=await Z();B.value=e}catch(e){p("danger","\u53D6\u5F97\u5931\u6557",`${(a=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:a.statusCode}:${(l=(o=e==null?void 0:e.response)==null?void 0:o.data)==null?void 0:l.message}`)}finally{s.hide()}};dt(async()=>{var n,a,o,l;const s=h.show();try{await j(1);const{range:e,type:t}=await W();f.range=e,f.type=t,await L(),await x(),G()}catch(e){p("danger","\u5931\u6557",`${(a=(n=e==null?void 0:e.response)==null?void 0:n.data)==null?void 0:a.statusCode}:${(l=(o=e==null?void 0:e.response)==null?void 0:o.data)==null?void 0:l.message}`)}finally{s.hide()}});const tt=I(()=>{const s=u.value.date||[],n=u.value.stats||{};return s.map((a,o)=>{const l={date:a,tasks:{}};return Object.keys(n).forEach(e=>{var d,g,T,$,y,q,A,P,R;const t=n[e];l.tasks[e]={name:t.name,total:(T=(g=(d=t.total)==null?void 0:d.data)==null?void 0:g[o])!=null?T:0,newTask:(q=(y=($=t.new)==null?void 0:$.data)==null?void 0:y[o])!=null?q:0,reply:(R=(P=(A=t.reply)==null?void 0:A.data)==null?void 0:P[o])!=null?R:0}}),l})}),M=I(()=>{const s={};return Object.keys(u.value.stats).forEach(n=>{var o,l,e;const a=u.value.stats[n];s[n]={name:a.name,total:(((o=a.total)==null?void 0:o.data)||[]).reduce((t,d)=>t+d,0),newTask:(((l=a.new)==null?void 0:l.data)||[]).reduce((t,d)=>t+d,0),reply:(((e=a.reply)==null?void 0:e.data)||[]).reduce((t,d)=>t+d,0)}}),s});V(()=>{m.value.forEach(s=>s.dispose()),m.value=[]});const at=async s=>{var a,o,l,e;const n=h.show();try{const t=await ut.get(`/v1/stats/task/${s}/csv`,{responseType:"blob"}),d=new FileReader;d.onload=g=>{const T=new Blob([g.target.result],{type:"text/csv;charset=utf-8;"}),$=window.URL.createObjectURL(T),y=document.createElement("a");y.href=$,y.setAttribute("download",`task-${s}.csv`),document.body.appendChild(y),y.click(),y.remove()},d.readAsText(t.data,"utf-8")}catch(t){p("danger","\u4E0B\u8F09\u5931\u6557",`${(o=(a=t==null?void 0:t.response)==null?void 0:a.data)==null?void 0:o.statusCode}:${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{n.hide()}},st=s=>{b.value=s,S.value.show()},et=async s=>{var a,o,l,e;const n=h.show();try{await z({...s,taskGroupIds:s.taskGroupIds.join(",")}),p("success","\u5132\u5B58\u6210\u529F","\u5DF2\u6210\u529F\u5132\u5B58\u5E38\u7528\u8A2D\u5B9A"),await L()}catch(t){p("danger","\u5132\u5B58\u5931\u6557",`${(o=(a=t==null?void 0:t.response)==null?void 0:a.data)==null?void 0:o.statusCode}:${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{n.hide()}},ot=async s=>{b.value={...s,taskGroupIds:s.taskGroupIds.split(",").map(n=>n)},S.value.hide()},nt=async s=>{var a,o,l,e;const n=h.show();try{await H(s),p("success","\u522A\u9664\u6210\u529F","\u5DF2\u6210\u529F\u522A\u9664\u5E38\u7528\u8A2D\u5B9A"),await L()}catch(t){p("danger","\u522A\u9664\u5931\u6557",`${(o=(a=t==null?void 0:t.response)==null?void 0:a.data)==null?void 0:o.statusCode}:${(e=(l=t==null?void 0:t.response)==null?void 0:l.data)==null?void 0:e.message}`)}finally{n.hide()}};return(s,n)=>(i(),r(k,null,[c("div",wt,[kt,N(ht,{status:"task",data:f,onGetData:j,onSubmit:Y,openFavoriteModal:st,queryParams:b.value},null,8,["data","queryParams"]),u.value.id?(i(),rt(mt,{key:0,data:u.value},null,8,["data"])):C("",!0),u.value.id?(i(),r("div",ft,[c("button",{onClick:n[0]||(n[0]=a=>at(u.value.id)),type:"button",class:"btn btn-primary"}," \u532F\u51FA ")])):C("",!0),c("div",_t,[u.value.id?(i(),r("table",bt,[c("thead",null,[c("tr",null,[Tt,(i(!0),r(k,null,F(D(M),(a,o)=>(i(),r("th",{key:o,style:{"white-space":"nowrap"}},v(a.name),1))),128))])]),c("tbody",null,[(i(!0),r(k,null,F(D(tt),a=>(i(),r("tr",{key:a.date},[c("td",$t,v(a.date),1),(i(!0),r(k,null,F(a.tasks,(o,l)=>(i(),r("td",{key:l,style:{"white-space":"nowrap"}},[o?(i(),r(k,{key:0},[c("span",Ft,v(o.total),1),_(" / "),c("span",St,v(o.newTask),1),_(" / "),c("span",Gt,v(o.reply),1)],64)):(i(),r(k,{key:1},[_("-")],64))]))),128))]))),128))]),c("tfoot",null,[c("tr",null,[Lt,(i(!0),r(k,null,F(D(M),(a,o)=>(i(),r("td",{key:o,style:{"white-space":"nowrap"}},[c("span",null,v(a.total),1),_(" / "),c("span",null,v(a.newTask),1),_(" / "),c("span",null,v(a.reply),1)]))),128))])])])):C("",!0)])]),N(gt,{ref_key:"FavoriteModalRef",ref:S,status:"task",data:f,options:b.value,favoriteList:B.value,onSaveFavorite:et,onApplyFavorite:ot,onDeleteFavorite:nt},null,8,["data","options","favoriteList"])],64))}};export{qt as default}; diff --git a/assets/Title.5cd94b1a.js b/assets/Title.5cd94b1a.js new file mode 100644 index 0000000..50b8b54 --- /dev/null +++ b/assets/Title.5cd94b1a.js @@ -0,0 +1 @@ +import{a as C}from"./assistant.c4224b31.js";import{r as d,s as F,z as f,a as h,e as A,f as y,A as l,b as e,E as v,M as B,D,o as V,B as q,c as x,F as R,q as z,x as k,$ as E,g as M,h as w}from"./index.8b9bb582.js";const N={class:"mb-3"},U=e("label",{for:"addTitle",class:"form-label text-dark"},"\u7A31\u865F",-1),S={class:"mb-3"},j=e("label",{for:"titleLevel",class:"form-label text-dark"},"\u7B49\u7D1A",-1),O={class:"mb-3"},G=e("label",{for:"titleColor",class:"form-label text-dark"},"\u4EE3\u8868\u8272",-1),P={class:"mb-3"},H=e("label",{for:"titleDescription",class:"form-label text-dark"},"\u63CF\u8FF0",-1),I=["disabled"],J={__name:"CreateTitleModal",props:{tempTitle:{type:Object,default(){return{}}}},emits:["createTitleMethod"],setup($,{expose:g,emit:r}){const _=$,{apiPostAssistantTitleDetail:b}=C,m=d(),s=d({}),u=d(null);F(()=>_.tempTitle.name,()=>{s.value=_.tempTitle});const T=async()=>{try{const n={name:s.value.name,level:Number(s.value.level),color_code:s.value.color_code,description:s.value.description};await b(n),r("createTitleMethod",{target:"import",type:"\u6210\u529F"}),m.value.resetForm()}catch(n){r("createTitleMethod",{target:"import",type:"\u5931\u6557",error:`${n.response.data.statusCode}:${n.response.data.message}`})}};return g({createTitleModalRef:u}),(n,t)=>{const o=f("Field"),c=f("ErrorMessage"),a=f("VForm");return h(),A(a,{ref_key:"refs",ref:m,onSubmit:T},{default:y(({errors:p,meta:L})=>[l(B,{ref_key:"createTitleModalRef",ref:u,"has-footer":!0,title:"\u65B0\u589E\u52A9\u6559\u7A31\u865F","class-list":""},{body:y(()=>[e("div",N,[U,l(o,{id:"addTitle",modelValue:s.value.name,"onUpdate:modelValue":t[0]||(t[0]=i=>s.value.name=i),name:"\u7A31\u865F",type:"text",class:v(["form-control",{"is-invalid":p.\u7A31\u865F}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u7A31\u865F",class:"invalid-feedback"})]),e("div",S,[j,l(o,{id:"titleLevel",modelValue:s.value.level,"onUpdate:modelValue":t[1]||(t[1]=i=>s.value.level=i),name:"\u7B49\u7D1A",type:"text",class:v(["form-control",{"is-invalid":p.\u7B49\u7D1A}]),rules:"required|numeric"},null,8,["modelValue","class"]),l(c,{name:"\u7B49\u7D1A",class:"invalid-feedback"})]),e("div",O,[G,l(o,{id:"titleColor",modelValue:s.value.color_code,"onUpdate:modelValue":t[2]||(t[2]=i=>s.value.color_code=i),name:"\u4EE3\u8868\u8272",type:"color",class:v(["form-control form-control-color",{"is-invalid":p.\u4EE3\u8868\u8272}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u4EE3\u8868\u8272",class:"invalid-feedback"})]),e("div",P,[H,l(o,{id:"titleDescription",modelValue:s.value.description,"onUpdate:modelValue":t[3]||(t[3]=i=>s.value.description=i),as:"textarea",name:"\u63CF\u8FF0",type:"text",class:v(["form-control",{"is-invalid":p.\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),l(c,{name:"\u63CF\u8FF0",class:"invalid-feedback"})])]),footer:y(()=>[e("button",{type:"submit",disabled:!L.valid,class:"btn btn-primary"}," \u5EFA\u7ACB ",8,I)]),_:2},1536)]),_:1},512)}}},K={class:"about px-4 mt-4 position-relative"},Q={class:"d-flex align-items-center justify-content-between"},W=e("h1",{class:"fs-4 mb-0"}," \u52A9\u6559\u7A31\u865F ",-1),X=e("hr",null,null,-1),Y={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},Z={class:"card-body p-0"},ee={class:"table-responsive"},te={class:"table table-hover mb-0 text-nowrap",style:{"font-size":"14px"}},se=e("thead",{class:"bg-light"},[e("tr",null,[e("th",{scope:"col",class:"ps-4 py-3 text-muted border-0"}," \u7A31\u865F "),e("th",{scope:"col",class:"py-3 text-muted border-0"}," \u7B49\u7D1A "),e("th",{scope:"col",class:"py-3 text-muted pe-3 border-0"}," \u7DE8\u8F2F ")])],-1),oe={class:"text-nowrap"},le={scope:"row",class:"ps-4"},ae={class:"pe-3"},ne=e("span",{class:"material-icons align-middle fs-6"}," edit",-1),ie=["onClick"],de=e("span",{class:"material-icons align-middle fs-6"}," content_copy ",-1),me={__name:"Title",setup($){const{apiGetAssistantsTitles:g}=C,r=d(""),_=D.useLoading(),b=d([]),m=async()=>{const t=_.show();try{const{assistant_titles:o}=await g();b.value=o}catch(o){k("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5217\u8868\u5931\u6557",`${o.response.data.statusCode}:${o.response.data.message}`)}finally{t.hide()}};V(m);const s=d({}),u=(t,o)=>{t==="copy"?s.value={...o}:t==="add"&&(s.value={}),r.value.show()},T=t=>{t.type==="\u6210\u529F"?k("success","\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F\u6210\u529F","\u5DF2\u6210\u529F\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F"):t.type==="\u5931\u6557"&&k("danger","\u5EFA\u7ACB\u52A9\u6559\u7A31\u865F\u5931\u6557",t.error),r.value.hide(),m()},n=d(null);return V(()=>{r.value=new q(n.value.createTitleModalRef.hModal)}),(t,o)=>{const c=f("router-link");return h(),x("div",K,[e("header",Q,[W,e("button",{type:"button",class:"btn btn-primary",onClick:o[0]||(o[0]=a=>u("add"))}," \u65B0\u589E\u7A31\u865F ")]),X,e("div",Y,[e("div",Z,[e("div",ee,[e("table",te,[se,e("tbody",oe,[(h(!0),x(R,null,z(b.value,a=>(h(),x("tr",{key:a.id,class:"align-middle"},[e("td",le,[e("span",{class:"d-inline-block rounded-pill",style:E([{width:"10px",height:"10px"},`background-color:${a.color_code}`])},null,4),M(" "+w(a.name),1)]),e("td",null,w(a.level),1),e("td",ae,[l(c,{to:`/admin/assistants/title/${a.id}`,class:"btn btn-sm btn-outline-gray me-2"},{default:y(()=>[M(" \u7DE8\u8F2F"),ne]),_:2},1032,["to"]),e("button",{type:"button",class:"btn btn-sm btn-outline-gray me-2",onClick:p=>u("copy",a)},[M(" \u8907\u88FD"),de],8,ie)])]))),128))])])])])]),l(J,{ref_key:"createTitleModalComponentRef",ref:n,"temp-title":s.value,onCreateTitleMethod:T},null,8,["temp-title"])])}}};export{me as default}; diff --git a/assets/TitleDetail.da2069e8.js b/assets/TitleDetail.da2069e8.js new file mode 100644 index 0000000..358fe94 --- /dev/null +++ b/assets/TitleDetail.da2069e8.js @@ -0,0 +1 @@ +import{t as I,r as m,o as $,B as L,j as R,a as U,e as q,f as w,b as e,h as _,i as p,w as F,v as j,M as N,D as S,l as z,u as O,z as V,c as G,A as o,x as v,g as P,E as k}from"./index.8b9bb582.js";import{a as H}from"./assistant.c4224b31.js";const J={class:"mb-4"},K={for:"title"},Q=["disabled"],W={__name:"DangerActionsModal",props:{body:{type:Object,default(){return{userId:String,type:String}}}},emits:["danger-user-method"],setup(A,{expose:x,emit:T}){const d=I(A,"body"),r=m(""),b=m(null),t=m(null);$(()=>{b.value=new L(t.value.hModal),t.value.hModal.addEventListener("hidden.bs.modal",()=>{r.value=""})});const i=R(()=>{const{type:c}=d.value;return c==="deleteTitle"?{title:"\u662F\u5426\u522A\u9664\u4EE5\u4E0B\u52A9\u6559\u7A31\u865F\uFF1F",body:{label:"\u8ACB\u518D\u6B21\u8F38\u5165\u52A9\u6559\u7A31\u865F",btn:"\u522A\u9664"}}:{body:{}}}),f=()=>{b.value.show()},h=()=>{b.value.hide()},D=()=>{const{type:c,userId:u}=d.value;T("danger-user-method",{userId:u,type:c})};return x({openModal:f,hideModal:h}),(c,u)=>(U(),q(N,{id:"userDangerActions",ref_key:"myModal",ref:t,"has-footer":!0,title:p(i).title},{body:w(()=>[e("p",J,_(p(d).name),1),e("label",K,_(p(i).body.label),1),F(e("input",{id:"title","onUpdate:modelValue":u[0]||(u[0]=l=>r.value=l),type:"text",class:"form-control"},null,512),[[j,r.value]])]),footer:w(()=>[e("button",{type:"button",class:"btn btn-primary",onClick:h},"\u53D6\u6D88"),e("button",{disabled:r.value!==p(d).name,type:"button",class:"btn btn-danger",onClick:D},_(p(i).body.btn),9,Q)]),_:1},8,["title"]))}},X={class:"about px-4 mt-4"},Y={"aria-label":"breadcrumb"},Z={class:"breadcrumb"},ee={class:"breadcrumb-item"},te=e("li",{class:"breadcrumb-item active","aria-current":"page"}," \u7DE8\u8F2F\u52A9\u6559\u7A31\u865F ",-1),se=e("h1",{class:"fs-4 mb-0"},"\u7DE8\u8F2F\u52A9\u6559\u7A31\u865F",-1),ae=e("hr",null,null,-1),oe={class:"card shadow-sm rounded-4 overflow-hidden mb-4"},le={class:"card-header bg-white py-3"},ne={class:"fs-6 mb-0 lh-base"},de={class:"mb-0"},ie={class:"card-body"},re={class:"mb-3"},ce=e("label",{for:"name",class:"form-label"},"\u7A31\u865F",-1),ue={class:"mb-3"},me=e("label",{for:"level",class:"form-label"},"\u7B49\u7D1A",-1),be={class:"mb-3"},pe=e("label",{for:"colorCode",class:"form-label"},"\u4EE3\u8868\u8272",-1),ve={class:"mb-3"},_e=e("label",{for:"description",class:"form-label"},"\u63CF\u8FF0",-1),fe={class:"card-footer bg-white py-3 d-flex justify-content-between"},he=["disabled"],Me={__name:"TitleDetail",setup(A){const{apiGetAssistantTitleDetail:x,apiPutAssistantTitleDetail:T,apiDeleteAssistantTitle:C}=H,d=S.useLoading(),r=z(),b=O(),t=m({}),i=m(null),f=m({}),h=({type:l,name:s})=>{i.value.openModal(),f.value={type:l,name:s}},D=async({type:l})=>{try{l==="deleteTitle"&&await C(t.value.id),v("success","\u5371\u96AA\u64CD\u4F5C\u6210\u529F\uFF0C3 \u79D2\u5F8C\u8DF3\u56DE\u52A9\u6559\u7A31\u865F, \u52A9\u6559\u7A31\u865F\u5DF2\u7D93\u88AB\u522A\u9664\u3002"),setTimeout(()=>{b.push("/admin/assistants/title")},3e3)}catch(s){v("danger","\u5371\u96AA\u64CD\u4F5C\u5931\u6557\uFF0C\u8ACB\u91CD\u65B0\u64CD\u4F5C",s)}finally{i.value.hideModal()}},c=async l=>{const s=d.show();try{const a={name:t.value.name,level:t.value.level,color_code:t.value.color_code,description:t.value.description};await T(l,a),v("success","\u66F4\u65B0\u6210\u529F","\u5DF2\u6210\u529F\u66F4\u65B0\u52A9\u6559\u7A31\u865F")}catch(a){v("danger","\u64CD\u4F5C\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{s.hide()}},u=async l=>{const s=d.show();try{const{assistant_title_info:a}=await x(l);t.value=a}catch(a){v("danger","\u53D6\u5F97\u52A9\u6559\u7A31\u865F\u5931\u6557",`${a.response.data.statusCode}:${a.response.data.message}`)}finally{s.hide()}};return $(()=>{u(r.params.id)}),(l,s)=>{const a=V("router-link"),y=V("Field"),g=V("ErrorMessage"),B=V("VForm");return U(),G("div",X,[e("header",null,[e("nav",Y,[e("ol",Z,[e("li",ee,[o(a,{to:"/admin/assistants/title"},{default:w(()=>[P(" \u52A9\u6559\u7A31\u865F ")]),_:1})]),te])]),se,ae]),o(B,{ref:"refs"},{default:w(({errors:M,meta:E})=>[e("div",oe,[e("div",le,[e("h2",ne,_(t.value.name),1),e("p",de,[e("small",null,"\u76EE\u524D\u5171\u6709 "+_(t.value.apply_count)+" \u4EBA\u5957\u7528\u6B64\u7A31\u865F",1)])]),e("div",ie,[e("div",re,[ce,o(y,{id:"name",modelValue:t.value.name,"onUpdate:modelValue":s[0]||(s[0]=n=>t.value.name=n),name:"\u7A31\u865F",type:"text",class:k(["form-control",{"is-invalid":M.\u7A31\u865F}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u7A31\u865F",class:"invalid-feedback"})]),e("div",ue,[me,o(y,{id:"level",modelValue:t.value.level,"onUpdate:modelValue":s[1]||(s[1]=n=>t.value.level=n),name:"\u7B49\u7D1A",type:"text",class:k(["form-control",{"is-invalid":M.\u7B49\u7D1A}]),rules:"required|numeric"},null,8,["modelValue","class"]),o(g,{name:"\u7B49\u7D1A",class:"invalid-feedback"})]),e("div",be,[pe,o(y,{id:"colorCode",modelValue:t.value.color_code,"onUpdate:modelValue":s[2]||(s[2]=n=>t.value.color_code=n),name:"\u4EE3\u8868\u8272",type:"color",class:k(["form-control form-control-color",{"is-invalid":M.\u4EE3\u8868\u8272}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u4EE3\u8868\u8272",class:"invalid-feedback"})]),e("div",ve,[_e,o(y,{id:"description",modelValue:t.value.description,"onUpdate:modelValue":s[3]||(s[3]=n=>t.value.description=n),as:"textarea",name:"\u63CF\u8FF0",type:"text",class:k(["form-control",{"is-invalid":M.\u63CF\u8FF0}]),rules:"required"},null,8,["modelValue","class"]),o(g,{name:"\u63CF\u8FF0",class:"invalid-feedback"})])]),e("div",fe,[e("button",{type:"button",class:"btn btn-outline-danger",onClick:s[4]||(s[4]=n=>h({type:"deleteTitle",name:t.value.name}))}," \u522A\u9664 "),e("button",{type:"button",disabled:!E.valid,class:"btn btn-primary",onClick:s[5]||(s[5]=n=>c(t.value.id))}," \u66F4\u65B0 ",8,he)])])]),_:1},512),o(W,{ref_key:"dangerActionsModalRef",ref:i,body:f.value,onDangerUserMethod:D},null,8,["body"])])}}};export{Me as default}; diff --git a/assets/TrainingDetail.0132ccae.css b/assets/TrainingDetail.0132ccae.css new file mode 100644 index 0000000..dd6acf6 --- /dev/null +++ b/assets/TrainingDetail.0132ccae.css @@ -0,0 +1 @@ +[data-v-50d0b977] .content img{max-width:100%;display:block}[data-v-50d0b977] .content code,[data-v-50d0b977] .content pre{background-color:#f0f0f0;padding:2px;border-radius:3px}[data-v-50d0b977] .content pre.ql-syntax{background-color:#23241f;color:#f8f8f2;overflow:visible}[data-v-50d0b977] .content pre{white-space:pre-wrap;margin-bottom:5px;margin-top:5px;padding:5px 10px}.custom-form-check-input[data-v-3a8382f7]{font-size:22px;transform:translateY(50%)}.form-check-input[data-v-3a8382f7]:checked{background-color:#fff;border-color:var(--bs-success);border-width:2px}.form-check-input:checked[type=radio][data-v-3a8382f7]{background-image:url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='2' fill='%232A8356'/%3e%3c/svg%3e")}.checked .form-check-label[data-v-3a8382f7],.checked .btn-link[data-v-3a8382f7]{color:var(--bs-success)}.form-check-label[data-v-3a8382f7]:hover,.form-check-label:hover+.btn-link[data-v-3a8382f7]{color:var(--bs-success);cursor:pointer}.list-group[data-v-a71f8236]{border-radius:0}.list-group-item[data-v-a71f8236]{border:none}.list-group-item.active[data-v-a71f8236],.list-group-item[data-v-a71f8236]:hover{background-color:#edf0ef;color:#00251a}.cursor-grabbing[data-v-93322c6e]{cursor:grabbing!important}.cursor-not-allowed[data-v-93322c6e]{cursor:not-allowed!important}.ghost[data-v-93322c6e]{opacity:.5;background:#c8ebfb}.drag[data-v-93322c6e]{height:74px!important;border:1px solid var(--bs-primary)!important;border-radius:var(--bs-border-radius)!important}input[type=radio][data-v-162f359f]{visibility:hidden}input[data-v-1b46ba3d]{padding-top:9px;padding-bottom:9px}.inputFile[data-v-1b46ba3d]{position:relative}.inputFile[data-v-1b46ba3d]::-webkit-file-upload-button{position:absolute;top:0;bottom:0;right:-13px;background-color:#3d5950;color:#fff}.inputFile[data-v-1b46ba3d]:hover::-webkit-file-upload-button{background-color:#314740!important} diff --git a/assets/TrainingDetail.ade12ac6.js b/assets/TrainingDetail.ade12ac6.js new file mode 100644 index 0000000..4c1c233 --- /dev/null +++ b/assets/TrainingDetail.ade12ac6.js @@ -0,0 +1,10 @@ +import{r as W,s as Pn,z as se,a as B,c as k,A as H,f as Rt,b as d,E as Dt,h as Ct,x as ct,_ as He,D as on,o as le,F as Vt,q as te,w as ye,a5 as fn,i as _t,p as It,e as ae,M as Me,B as Le,R as rn,S as sn,g as _e,v as ya,a6 as La,u as Na,m as Tn,G as Ae,a7 as Fa,a8 as ja,a0 as Ua,N as Va,V as Ga,U as Yt,l as ba,j as Sa,Z as Pe,a3 as ta,C as Ba,a2 as Ka,Q as ea,d as na}from"./index.8b9bb582.js";import{a as ln}from"./training.e8f233d3.js";import{f as Hn,a as Wn}from"./date.7e59e512.js";import{_ as Ha}from"./Editor.7c035c32.js";import{b as Wa}from"./bsTab.87eb58d2.js";/* empty css */import"./tab.a420e993.js";const ka={class:"rounded-4 border border-1 border-custom-color p-4"},Xa={class:"row"},Ya={class:"col-md-6"},za={class:"mb-3"},Ja=d("label",{for:"title",class:"form-label"},"\u6D3B\u52D5\u540D\u7A31",-1),Za={class:"row"},Qa={class:"col-md-6"},_a={class:"mb-3"},qa=d("label",{for:"start_at",class:"form-label"},"\u958B\u59CB\u6642\u9593",-1),to={class:"col-md-6"},eo={class:"mb-3"},no=d("label",{for:"end_at",class:"form-label"},"\u7D50\u675F\u6642\u9593",-1),ao={class:"d-flex justify-content-end mt-3"},oo=["disabled"],aa={__name:"CalendarCreate",props:{id:{type:String,default:""},editData:{type:Object,default:()=>({})}},emits:["refresh","close"],setup(r,{emit:e}){const a=r,{apiPostTrainingCalendar:i,apiPutTrainingCalendar:n}=ln,c=W(null),t=W(""),o=W({name:"",start_at:"",end_at:"",content:""});Pn(()=>a.editData,f=>{f.id&&(t.value=f.id,o.value={name:f.name,start_at:f.start_at,end_at:f.end_at,content:f.content})},{deep:!0});const s=W(null),l=()=>{s.value.resetForm(),e("close")},u=async()=>{const f=t.value!==""?"\u66F4\u65B0":"\u5EFA\u7ACB";o.value.content=c.value.editorContent,o.value.start_at=Hn(o.value.start_at),o.value.end_at=Hn(o.value.end_at);try{t.value!==""?await n(a.id,t.value,o.value):await i(a.id,o.value),ct("success",`\u884C\u4E8B\u66C6${f}\u6210\u529F`,`${o.value.name}\u5DF2\u7D93${f}\u6210\u529F`),e("refresh")}catch(v){const h=v.response.data;ct("danger",`\u884C\u4E8B\u66C6${f}\u5931\u6557`,`${h.statusCode}: ${h.message}`)}l()};return(f,v)=>{const h=se("Field"),p=se("ErrorMessage"),y=se("VForm");return B(),k("div",ka,[H(y,{ref_key:"formRef",ref:s,onSubmit:u},{default:Rt(({errors:m,meta:g})=>[d("div",Xa,[d("div",Ya,[d("div",za,[Ja,H(h,{id:"title",name:"title",label:"\u57F9\u8A13\u73ED\u540D\u7A31",type:"text",class:Dt([{"is-invalid":m.title},"form-control"]),modelValue:o.value.name,"onUpdate:modelValue":v[0]||(v[0]=x=>o.value.name=x),placeholder:"ex: Vue \u76F4\u64AD\u73ED 2022 \u6625\u5B63\u73ED",rules:"required"},null,8,["class","modelValue"]),H(p,{name:"title",class:"invalid-feedback"})])])]),d("div",Za,[d("div",Qa,[d("div",_a,[qa,H(h,{id:"start_at",name:"start_at",label:"\u958B\u59CB\u6642\u9593",type:"datetime-local",modelValue:o.value.start_at,"onUpdate:modelValue":v[1]||(v[1]=x=>o.value.start_at=x),class:Dt([{"is-invalid":m.start_at},"form-control"]),placeholder:"ex: Vue \u76F4\u64AD\u73ED 2022 \u6625\u5B63\u73ED",rules:"required","format-value":"yyyy-MM-ddTHH:mm"},null,8,["modelValue","class"]),H(p,{name:"start_at",class:"invalid-feedback"})])]),d("div",to,[d("div",eo,[no,H(h,{id:"end_at",name:"end_at",label:"\u7D50\u675F\u6642\u9593",type:"datetime-local",class:Dt([{"is-invalid":m.end_at},"form-control"]),modelValue:o.value.end_at,"onUpdate:modelValue":v[2]||(v[2]=x=>o.value.end_at=x),rules:"required","format-value":"yyyy-MM-ddTHH:mm"},null,8,["class","modelValue"]),H(p,{name:"end_at",class:"invalid-feedback"})])])]),d("div",null,[H(Ha,{ref_key:"editorComponentRef",ref:c,content:o.value.content},null,8,["content"])]),d("div",ao,[d("button",{type:"button",class:"btn btn-outline-secondary me-2",onClick:l}," \u53D6\u6D88 "),d("button",{type:"submit",class:"btn btn-primary",disabled:!g.valid},Ct(t.value!==""?"\u66F4\u65B0":"\u78BA\u8A8D\u65B0\u589E"),9,oo)])]),_:1},512)])}}};const Ne=r=>(rn("data-v-50d0b977"),r=r(),sn(),r),ro={class:"mb-5"},io={class:"table-responsive mb-3"},so={class:"table custom-table-style mb-0"},lo=Ne(()=>d("thead",null,[d("tr",{class:"text-nowrap bg-soft border-0"},[d("th",null,"\u6A19\u984C"),d("th",{width:"150"}),d("th",{width:"200"},"\u6D3B\u52D5\u6642\u9593"),d("th",{width:"150"})])],-1)),co={class:"text-nowrap"},uo=["onClick"],fo={class:"mt-2"},vo={key:0,colspan:"4",class:"border-0"},ho=["onClick"],po=["onClick"],mo={key:0,class:"text-center"},go=Ne(()=>d("span",{class:"material-icons align-bottom"}," add ",-1)),yo=[go],bo=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u6A19\u984C",-1)),So={class:"text-primary"},xo={class:"d-flex mt-3"},Eo={class:"col-md-6"},Co=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u958B\u59CB\u6642\u9593",-1)),To={class:"text-primary"},$o={class:"col-md-6"},Oo=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u7D50\u675F\u6642\u9593",-1)),Io={class:"text-primary"},Do={class:"mt-3"},wo=Ne(()=>d("p",{class:"text-dark mb-2"},"\u6D3B\u52D5\u5167\u5BB9\u63CF\u8FF0",-1)),Po=["innerHTML"],Ao={class:"h4 text-dark mb-3 fw-bold"},Ro=Ne(()=>d("p",{class:"text-danger mb-2"},"\u8ACB\u6CE8\u610F\uFF01\u522A\u9664\u5F8C\u5C07\u7121\u6CD5\u5FA9\u539F",-1)),Mo={class:"d-flex justify-content-end"},Lo={__name:"Calendar",props:{trainingId:{type:String,required:!0}},setup(r,{expose:e}){const a=r,{apiGetTrainingCalendar:i,apiGetTrainingCalendarDetail:n,apiDeleteTrainingCalendar:c}=ln,t=on.useLoading(),o=W([]),s=W({}),l=W(null),u=W(null),f=W(null),v=W(null);le(()=>{f.value=new Le(l.value.hModal),v.value=new Le(u.value.hModal)});const p=()=>{f.value.show()};e({openModal:p,hideModal:()=>{f.value.hide(),s.value={}}});const m=async()=>{const j=t.show(),{calendar:D}=await i(a.trainingId);o.value=D,j.hide()};le(()=>{m()});const g=async j=>{const D=t.show(),{calendar:w}=await n(a.trainingId,j);s.value=w,D.hide()},x=async j=>{await g(j),p()},b=W({name:"",id:""}),E=async j=>{const D=t.show();try{await c(a.trainingId,j),ct("success","\u522A\u9664\u6210\u529F",`${b.value.name}\u5DF2\u7D93\u522A\u9664\u6210\u529F`),m()}catch(w){const X=w.response.data;ct("danger","\u522A\u9664\u5931\u6557",`${X.statusCode}: ${b.value.name}\u522A\u9664\u5931\u6557\uFF5C${X.message}`)}D.hide(),v.value.hide()},I=j=>{v.value.show(),b.value=o.value.find(D=>D.id===j)},C=W(""),N=W(""),R=W({});function S(j){const D=new Date(j),w=D.getFullYear(),X=(D.getMonth()+1).toString().padStart(2,"0"),L=D.getDate().toString().padStart(2,"0"),Y=D.getHours().toString().padStart(2,"0"),it=D.getMinutes().toString().padStart(2,"0");return`${w}-${X}-${L}T${Y}:${it}`}const P=async j=>{await g(j),R.value={id:j,name:s.value.name,start_at:S(s.value.start_at),end_at:S(s.value.end_at),content:s.value.content}},M=(j="",D="")=>{C.value=j,N.value=D,j==="edit"?P(D):(R.value={name:"",start_at:"",end_at:"",content:""},setTimeout(()=>{window.scrollTo(0,document.body.scrollHeight)},300))};return(j,D)=>(B(),k(Vt,null,[d("div",ro,[d("div",io,[d("table",so,[lo,d("tbody",co,[(B(!0),k(Vt,null,te(o.value,w=>(B(),k("tr",{class:"align-middle",key:w.id},[ye(d("td",null,Ct(w.name),513),[[fn,!(C.value==="edit"&&N.value===w.id)]]),ye(d("td",null,[d("button",{type:"button",class:"btn btn-link link-success text-decoration-none fw-bold",onClick:X=>x(w.id)},"\u8A73\u7D30\u5167\u5BB9",8,uo)],512),[[fn,!(C.value==="edit"&&N.value===w.id)]]),ye(d("td",null,[d("p",fo,Ct(_t(Wn)(w.start_at)),1),d("p",null,Ct(_t(Wn)(w.end_at)),1)],512),[[fn,!(C.value==="edit"&&N.value===w.id)]]),C.value==="edit"&&N.value===w.id?(B(),k("td",vo,[H(aa,{id:r.trainingId,"edit-data":R.value,onRefresh:m,onClose:M},null,8,["id","edit-data"])])):It("",!0),ye(d("td",null,[d("button",{type:"button",class:"btn btn-outline-dark me-2",onClick:X=>M("edit",w.id)},"\u7DE8\u8F2F",8,ho),d("button",{type:"button",class:"btn btn-outline-danger",onClick:X=>I(w.id)},"\u522A\u9664",8,po)],512),[[fn,!(C.value==="edit"&&N.value===w.id)]])]))),128))])])]),C.value!=="create"?(B(),k("div",mo,[d("button",{type:"button",class:"btn btn-outline-soft border-dashed rounded-circle p-2",onClick:D[0]||(D[0]=w=>M("create"))},yo)])):It("",!0),C.value==="create"?(B(),ae(aa,{key:1,id:r.trainingId,"edit-data":{},onRefresh:m,onClose:M},null,8,["id"])):It("",!0)]),H(Me,{ref_key:"modalDetailRef",ref:l,title:"",modalSize:"modal-lg","has-footer":!1},{body:Rt(()=>[d("div",null,[bo,d("p",So,Ct(s.value.name),1)]),d("div",xo,[d("div",Eo,[Co,d("p",To,Ct(new Date(s.value.start_at).toLocaleString("sv-SE")),1)]),d("div",$o,[Oo,d("p",Io,Ct(new Date(s.value.end_at).toLocaleString("sv-SE")),1)])]),d("div",Do,[wo,d("div",{class:"content text-primary",innerHTML:s.value.content},null,8,Po)])]),_:1},512),H(Me,{ref_key:"modalDeleteRef",ref:u,title:"\u662F\u5426\u522A\u9664\u6B64\u6D3B\u52D5\uFF1F",modalSize:"modal-md",hasFooter:!0},{body:Rt(()=>[d("h5",Ao,Ct(b.value.name),1),Ro,d("div",Mo,[d("button",{type:"button",class:"btn btn-primary me-2",onClick:D[1]||(D[1]=w=>v.value.hide())},"\u53D6\u6D88"),d("button",{type:"button",class:"btn btn-danger",onClick:D[2]||(D[2]=w=>E(b.value.id))},"\u522A\u9664\u6D3B\u52D5")])]),_:1},512)],64))}},No=He(Lo,[["__scopeId","data-v-50d0b977"]]);function oa(r){return typeof r=="function"?r():_t(r)}const ra=()=>{};function Fo(r,e){function a(...i){return new Promise((n,c)=>{Promise.resolve(r(()=>e.apply(this,i),{fn:e,thisArg:this,args:i})).then(n).catch(c)})}return a}const jo=r=>r();function Uo(r,e={}){let a,i,n=ra;const c=o=>{clearTimeout(o),n(),n=ra};return o=>{const s=oa(r),l=oa(e.maxWait);return a&&c(a),s<=0||l!==void 0&&l<=0?(i&&(c(i),i=null),Promise.resolve(o())):new Promise((u,f)=>{n=e.rejectOnCancel?f:u,l&&!i&&(i=setTimeout(()=>{a&&c(a),i=null,u(o())},l)),a=setTimeout(()=>{i&&c(i),i=null,u(o())},s)})}}function Vo(r,e,a={}){const{eventFilter:i=jo,...n}=a;return Pn(r,Fo(i,e),n)}function Go(r,e,a={}){const{debounce:i=0,maxWait:n=void 0,...c}=a;return Vo(r,e,{...c,eventFilter:Uo(i,{maxWait:n})})}const We=r=>(rn("data-v-3a8382f7"),r=r(),sn(),r),Bo=We(()=>d("h4",{class:"text-dark mb-3"},"\u4F7F\u7528\u8005\u7FA4\u7D44\u8A2D\u5B9A",-1)),Ko={key:0,class:"text-primary"},Ho=We(()=>d("span",{class:"material-icons align-middle"},"open_in_new",-1)),Wo={class:"row"},ko={class:"col-lg-4 col-md-7"},Xo={class:"form-floating mb-2"},Yo=We(()=>d("label",{for:"training-name"},"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44",-1)),zo={class:"card rounded-4"},Jo={class:"card-body"},Zo=["id","value"],Qo={class:"d-flex align-items-center"},_o=["for"],qo=We(()=>d("span",{class:"material-icons align-middle"},"open_in_new",-1)),tr={class:"mb-0 text-dark",style:{"font-size":"14px"}},er={key:0},nr={key:1,class:"text-muted"},ar={key:0},or={class:"my-5"},rr={class:"mb-3"},ir={class:"table custom-table-style mb-0"},sr=We(()=>d("thead",null,[d("tr",{class:"text-nowrap bg-soft border-0"},[d("th",null,"\u6A19\u984C"),d("th",null,"\u4EFB\u52D9\u7FA4\u7D44"),d("th",null,"\u5F8C\u53F0\u9023\u7D50"),d("th",null,"\u524D\u53F0\u9023\u7D50")])],-1)),lr=We(()=>d("td",null,"-",-1)),cr={__name:"UserGroup",props:{trainingId:{type:String,required:!0},userGroups:{type:Array,required:!0}},emits:["refresh"],setup(r,{emit:e}){const a=r,{apiGetTrainingUserGroup:i,apiGetTrainingTask:n,apiPutTrainingUserGroups:c}=ln,t=on.useLoading(),o=W(!1),s=W([]),l=W(""),u=W({total:0,total_page:0,current_page:1}),f=W(""),v=async({keyword:b,page:E}={})=>{const I=t.show();o.value=!0;try{const{user_groups:C,pagination:N}=await i({keyword:b,page:E});E===1?(s.value=[],s.value=C):s.value=[...s.value,...C],u.value=N}catch{ct("danger","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557","\u53D6\u5F97\u4F7F\u7528\u8005\u7FA4\u7D44\u5217\u8868\u5931\u6557")}finally{I.hide(),o.value=!1}},h=W([]),p=W(!1),y=async()=>{p.value=!0;const b=t.show();try{const{tasks:E}=await n(a.trainingId);h.value=E}catch{ct("danger","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557","\u53D6\u5F97\u57F9\u8A13\u73ED\u4EFB\u52D9\u6E05\u55AE\u5931\u6557")}finally{b.hide(),p.value=!1}};le(()=>{v(),y()}),Pn(()=>a.userGroups,b=>{l.value=b[0].id},{immediate:!0});const m=W(null);le(()=>{const b=m.value;b.addEventListener("scroll",E=>{if(E.target.clientHeight+E.target.scrollTop>b.scrollHeight-1){if(o.value||u.value.current_page===u.value.total_page)return;v({keyword:f.value,page:u.value.current_page+1})}})}),Go(f,()=>{v({keyword:f.value,page:1})},{debounce:1e3,maxWait:1300});const x=async()=>{const b=[];b.push(l.value);try{await c(a.trainingId,{user_group_ids:b}),ct("success","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u6210\u529F"),y(),e("refresh")}catch{ct("danger","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557","\u5132\u5B58\u4F7F\u7528\u8005\u7FA4\u7D44\u5931\u6557")}};return(b,E)=>{const I=se("router-link");return B(),k(Vt,null,[d("div",null,[Bo,a.userGroups.length>0?(B(),k("p",Ko,[_e(" \u76EE\u524D\u5DF2\u9078\u64C7\u7684\u4F7F\u7528\u8005\u7FA4\u7D44\uFF1A"),H(I,{target:"_blank",to:{name:"UserGroupDetail",params:{id:a.userGroups[0].id}},class:"btn btn-link p-0 ms-1"},{default:Rt(()=>[d("b",null,Ct(a.userGroups[0].name),1),Ho]),_:1},8,["to"])])):It("",!0),d("div",Wo,[d("div",ko,[d("div",Xo,[ye(d("input",{type:"text",class:"form-control",id:"training-name",placeholder:"\u641C\u5C0B\u4F7F\u7528\u8005\u7FA4\u7D44","onUpdate:modelValue":E[0]||(E[0]=C=>f.value=C)},null,512),[[ya,f.value]]),Yo])])])]),d("div",zo,[d("div",Jo,[d("ul",{class:"list-group border-bottom mb-3 overflow-y-scroll",ref_key:"userGroupListRef",ref:m,style:{"max-height":"500px"}},[(B(!0),k(Vt,null,te(s.value,C=>(B(),k("li",{class:"list-group-item border-0",key:C.id},[d("div",{class:Dt(["form-check",{checked:l.value===C.id}])},[ye(d("input",{type:"radio",class:"form-check-input custom-form-check-input",name:"user-group",id:C.id,"onUpdate:modelValue":E[1]||(E[1]=N=>l.value=N),value:C.id},null,8,Zo),[[La,l.value]]),d("div",Qo,[d("label",{for:C.id,class:"form-check-label"},Ct(C.name),9,_o),H(I,{target:"_blank",to:{name:"UserGroupDetail",params:{id:C.id}},class:"btn btn-link p-0 ms-1"},{default:Rt(()=>[qo]),_:2},1032,["to"])]),d("p",tr,[C.task_groups.length>0?(B(),k("span",er,"\u5DF2\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")):(B(),k("span",nr,"\u76EE\u524D\u672A\u5305\u542B\u4EFB\u52D9\u7FA4\u7D44")),(B(!0),k(Vt,null,te(C.task_groups,(N,R)=>(B(),k("span",{key:N.id},[_e(" \u300C"+Ct(N.name)+" \u300D ",1),R(B(),k("tr",{class:"align-middle",key:C.id},[d("td",null,Ct(C.name),1),d("td",null,Ct(C.task_group_name),1),d("td",null,[H(I,{target:"_blank",to:{name:"TaskDetail",params:{id:C.id}},class:"btn btn-link text-decoration-none link-success fw-bold"},{default:Rt(()=>[_e(" \u9023\u7D50 ")]),_:2},1032,["to"])]),lr]))),128))])])])],64)}}},dr=He(cr,[["__scopeId","data-v-3a8382f7"]]);const ur={key:0,class:"text-dark mb-4"},fr={class:"row"},vr={class:"col-md-3"},hr={class:"list-group"},pr=["href","onClick"],mr={class:"material-icons-outlined me-2"},gr={class:"col-md-9"},yr={class:"tab-content"},br={__name:"ListGroup",props:{title:{type:String,default:""},tabList:{type:Array,default:()=>[{id:1,name:"home",cht_icon:"settings",cht_name:"\u5217\u88681"}]}},setup(r,{expose:e}){const a=r,i=Na(),n=Tn(a.tabList),c=W(1),t=Tn([]),o=s=>{s.element.show(),c.value=s.id};return le(()=>{Wa(t,n)}),e({tabShow:o}),(s,l)=>(B(),k(Vt,null,[a.title?(B(),k("h4",ur,Ct(a.title),1)):It("",!0),d("div",fr,[d("div",vr,[d("div",hr,[(B(!0),k(Vt,null,te(n,(u,f)=>(B(),k("a",{key:u.id,href:`#${u.name}`,ref_for:!0,ref:v=>t.push(v),class:Dt(["list-group-item d-flex align-items-center mb-1",c.value===u.id?"active":""]),onClick:Ae(()=>{o(u),_t(i).replace({query:{menuId:f}})},["prevent"])},[d("span",mr,Ct(u.cht_icon),1),_e(" "+Ct(u.cht_name),1)],10,pr))),128))])]),d("div",gr,[d("div",yr,[Fa(s.$slots,"body",{nowId:c.value},void 0,!0)])])])],64))}},Sr=He(br,[["__scopeId","data-v-a71f8236"]]);var xa={exports:{}};/**! + * Sortable 1.14.0 + * @author RubaXa + * @author owenm + * @license MIT + */function ia(r,e){var a=Object.keys(r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(r);e&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable})),a.push.apply(a,i)}return a}function Se(r){for(var e=1;e=0)&&(a[n]=r[n]);return a}function Cr(r,e){if(r==null)return{};var a=Er(r,e),i,n;if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(r);for(n=0;n=0)&&(!Object.prototype.propertyIsEnumerable.call(r,i)||(a[i]=r[i]))}return a}function Tr(r){return $r(r)||Or(r)||Ir(r)||Dr()}function $r(r){if(Array.isArray(r))return kn(r)}function Or(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function Ir(r,e){if(!!r){if(typeof r=="string")return kn(r,e);var a=Object.prototype.toString.call(r).slice(8,-1);if(a==="Object"&&r.constructor&&(a=r.constructor.name),a==="Map"||a==="Set")return Array.from(r);if(a==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a))return kn(r,e)}}function kn(r,e){(e==null||e>r.length)&&(e=r.length);for(var a=0,i=new Array(e);a"&&(e=e.substring(1)),r)try{if(r.matches)return r.matches(e);if(r.msMatchesSelector)return r.msMatchesSelector(e);if(r.webkitMatchesSelector)return r.webkitMatchesSelector(e)}catch{return!1}return!1}}function Ar(r){return r.host&&r!==document&&r.host.nodeType?r.host:r.parentNode}function pe(r,e,a,i){if(r){a=a||document;do{if(e!=null&&(e[0]===">"?r.parentNode===a&&$n(r,e):$n(r,e))||i&&r===a)return r;if(r===a)break}while(r=Ar(r))}return null}var la=/\s+/g;function Ut(r,e,a){if(r&&e)if(r.classList)r.classList[a?"add":"remove"](e);else{var i=(" "+r.className+" ").replace(la," ").replace(" "+e+" "," ");r.className=(i+(a?" "+e:"")).replace(la," ")}}function Q(r,e,a){var i=r&&r.style;if(i){if(a===void 0)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(r,""):r.currentStyle&&(a=r.currentStyle),e===void 0?a:a[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=a+(typeof a=="string"?"":"px")}}function Re(r,e){var a="";if(typeof r=="string")a=r;else do{var i=Q(r,"transform");i&&i!=="none"&&(a=i+" "+a)}while(!e&&(r=r.parentNode));var n=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return n&&new n(a)}function Ta(r,e,a){if(r){var i=r.getElementsByTagName(e),n=0,c=i.length;if(a)for(;n=c:t=n<=c,!t)return i;if(i===be())break;i=Oe(i,!1)}return!1}function Ke(r,e,a,i){for(var n=0,c=0,t=r.children;c2&&arguments[2]!==void 0?arguments[2]:{},n=i.evt,c=Cr(i,Ur);dn.pluginEvent.bind(dt)(e,a,Se({dragEl:K,parentEl:Gt,ghostEl:gt,rootEl:Ft,nextEl:we,lastDownEl:Sn,cloneEl:Bt,cloneHidden:$e,dragStarted:Je,putSortable:Qt,activeSortable:dt.active,originalEvent:n,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Te,hideGhostForTarget:Pa,unhideGhostForTarget:Aa,cloneNowHidden:function(){$e=!0},cloneNowShown:function(){$e=!1},dispatchSortableEvent:function(o){ne({sortable:a,name:o,originalEvent:n})}},c))};function ne(r){ze(Se({putSortable:Qt,cloneEl:Bt,targetEl:K,rootEl:Ft,oldIndex:Be,oldDraggableIndex:en,newIndex:de,newDraggableIndex:Te},r))}var K,Gt,gt,Ft,we,Sn,Bt,$e,Be,de,en,Te,vn,Qt,Ge=!1,On=!1,In=[],Ie,ve,Fn,jn,fa,va,Je,Ue,nn,an=!1,hn=!1,xn,qt,Un=[],Xn=!1,Dn=[],An=typeof document<"u",pn=Ea,ha=cn||Ce?"cssFloat":"float",Vr=An&&!Pr&&!Ea&&"draggable"in document.createElement("div"),Ia=function(){if(!!An){if(Ce)return!1;var r=document.createElement("x");return r.style.cssText="pointer-events:auto",r.style.pointerEvents==="auto"}}(),Da=function(e,a){var i=Q(e),n=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),c=Ke(e,0,a),t=Ke(e,1,a),o=c&&Q(c),s=t&&Q(t),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+jt(c).width,u=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+jt(t).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(c&&o.float&&o.float!=="none"){var f=o.float==="left"?"left":"right";return t&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return c&&(o.display==="block"||o.display==="flex"||o.display==="table"||o.display==="grid"||l>=n&&i[ha]==="none"||t&&i[ha]==="none"&&l+u>n)?"vertical":"horizontal"},Gr=function(e,a,i){var n=i?e.left:e.top,c=i?e.right:e.bottom,t=i?e.width:e.height,o=i?a.left:a.top,s=i?a.right:a.bottom,l=i?a.width:a.height;return n===o||c===s||n+t/2===o+l/2},Br=function(e,a){var i;return In.some(function(n){var c=n[ee].options.emptyInsertThreshold;if(!(!c||Zn(n))){var t=jt(n),o=e>=t.left-c&&e<=t.right+c,s=a>=t.top-c&&a<=t.bottom+c;if(o&&s)return i=n}}),i},wa=function(e){function a(c,t){return function(o,s,l,u){var f=o.options.group.name&&s.options.group.name&&o.options.group.name===s.options.group.name;if(c==null&&(t||f))return!0;if(c==null||c===!1)return!1;if(t&&c==="clone")return c;if(typeof c=="function")return a(c(o,s,l,u),t)(o,s,l,u);var v=(t?o:s).options.group.name;return c===!0||typeof c=="string"&&c===v||c.join&&c.indexOf(v)>-1}}var i={},n=e.group;(!n||bn(n)!="object")&&(n={name:n}),i.name=n.name,i.checkPull=a(n.pull,!0),i.checkPut=a(n.put),i.revertClone=n.revertClone,e.group=i},Pa=function(){!Ia&>&&Q(gt,"display","none")},Aa=function(){!Ia&>&&Q(gt,"display","")};An&&document.addEventListener("click",function(r){if(On)return r.preventDefault(),r.stopPropagation&&r.stopPropagation(),r.stopImmediatePropagation&&r.stopImmediatePropagation(),On=!1,!1},!0);var De=function(e){if(K){e=e.touches?e.touches[0]:e;var a=Br(e.clientX,e.clientY);if(a){var i={};for(var n in e)e.hasOwnProperty(n)&&(i[n]=e[n]);i.target=i.rootEl=a,i.preventDefault=void 0,i.stopPropagation=void 0,a[ee]._onDragOver(i)}}},Kr=function(e){K&&K.parentNode[ee]._isOutsideThisEl(e.target)};function dt(r,e){if(!(r&&r.nodeType&&r.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(r));this.el=r,this.options=e=fe({},e),r[ee]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(r.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Da(r,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,o){t.setData("Text",o.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:dt.supportPointer!==!1&&"PointerEvent"in window&&!qe,emptyInsertThreshold:5};dn.initializePlugins(this,r,a);for(var i in a)!(i in e)&&(e[i]=a[i]);wa(e);for(var n in this)n.charAt(0)==="_"&&typeof this[n]=="function"&&(this[n]=this[n].bind(this));this.nativeDraggable=e.forceFallback?!1:Vr,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?xt(r,"pointerdown",this._onTapStart):(xt(r,"mousedown",this._onTapStart),xt(r,"touchstart",this._onTapStart)),this.nativeDraggable&&(xt(r,"dragover",this),xt(r,"dragenter",this)),In.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),fe(this,Nr())}dt.prototype={constructor:dt,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(Ue=null)},_getDirection:function(e,a){return typeof this.options.direction=="function"?this.options.direction.call(this,e,a,K):this.options.direction},_onTapStart:function(e){if(!!e.cancelable){var a=this,i=this.el,n=this.options,c=n.preventOnFilter,t=e.type,o=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(o||e).target,l=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,u=n.filter;if(Zr(i),!K&&!(/mousedown|pointerdown/.test(t)&&e.button!==0||n.disabled)&&!l.isContentEditable&&!(!this.nativeDraggable&&qe&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=pe(s,n.draggable,i,!1),!(s&&s.animated)&&Sn!==s)){if(Be=Kt(s),en=Kt(s,n.draggable),typeof u=="function"){if(u.call(this,e,s,this)){ne({sortable:a,rootEl:l,name:"filter",targetEl:s,toEl:i,fromEl:i}),re("filter",a,{evt:e}),c&&e.cancelable&&e.preventDefault();return}}else if(u&&(u=u.split(",").some(function(f){if(f=pe(l,f.trim(),i,!1),f)return ne({sortable:a,rootEl:f,name:"filter",targetEl:s,fromEl:i,toEl:i}),re("filter",a,{evt:e}),!0}),u)){c&&e.cancelable&&e.preventDefault();return}n.handle&&!pe(l,n.handle,i,!1)||this._prepareDragStart(e,o,s)}}},_prepareDragStart:function(e,a,i){var n=this,c=n.el,t=n.options,o=c.ownerDocument,s;if(i&&!K&&i.parentNode===c){var l=jt(i);if(Ft=c,K=i,Gt=K.parentNode,we=K.nextSibling,Sn=i,vn=t.group,dt.dragged=K,Ie={target:K,clientX:(a||e).clientX,clientY:(a||e).clientY},fa=Ie.clientX-l.left,va=Ie.clientY-l.top,this._lastX=(a||e).clientX,this._lastY=(a||e).clientY,K.style["will-change"]="all",s=function(){if(re("delayEnded",n,{evt:e}),dt.eventCanceled){n._onDrop();return}n._disableDelayedDragEvents(),!sa&&n.nativeDraggable&&(K.draggable=!0),n._triggerDragStart(e,a),ne({sortable:n,name:"choose",originalEvent:e}),Ut(K,t.chosenClass,!0)},t.ignore.split(",").forEach(function(u){Ta(K,u.trim(),Vn)}),xt(o,"dragover",De),xt(o,"mousemove",De),xt(o,"touchmove",De),xt(o,"mouseup",n._onDrop),xt(o,"touchend",n._onDrop),xt(o,"touchcancel",n._onDrop),sa&&this.nativeDraggable&&(this.options.touchStartThreshold=4,K.draggable=!0),re("delayStart",this,{evt:e}),t.delay&&(!t.delayOnTouchOnly||a)&&(!this.nativeDraggable||!(cn||Ce))){if(dt.eventCanceled){this._onDrop();return}xt(o,"mouseup",n._disableDelayedDrag),xt(o,"touchend",n._disableDelayedDrag),xt(o,"touchcancel",n._disableDelayedDrag),xt(o,"mousemove",n._delayedDragTouchMoveHandler),xt(o,"touchmove",n._delayedDragTouchMoveHandler),t.supportPointer&&xt(o,"pointermove",n._delayedDragTouchMoveHandler),n._dragStartTimer=setTimeout(s,t.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var a=e.touches?e.touches[0]:e;Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){K&&Vn(K),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;bt(e,"mouseup",this._disableDelayedDrag),bt(e,"touchend",this._disableDelayedDrag),bt(e,"touchcancel",this._disableDelayedDrag),bt(e,"mousemove",this._delayedDragTouchMoveHandler),bt(e,"touchmove",this._delayedDragTouchMoveHandler),bt(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,a){a=a||e.pointerType=="touch"&&e,!this.nativeDraggable||a?this.options.supportPointer?xt(document,"pointermove",this._onTouchMove):a?xt(document,"touchmove",this._onTouchMove):xt(document,"mousemove",this._onTouchMove):(xt(K,"dragend",this),xt(Ft,"dragstart",this._onDragStart));try{document.selection?En(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,a){if(Ge=!1,Ft&&K){re("dragStarted",this,{evt:a}),this.nativeDraggable&&xt(document,"dragover",Kr);var i=this.options;!e&&Ut(K,i.dragClass,!1),Ut(K,i.ghostClass,!0),dt.active=this,e&&this._appendGhost(),ne({sortable:this,name:"start",originalEvent:a})}else this._nulling()},_emulateDragOver:function(){if(ve){this._lastX=ve.clientX,this._lastY=ve.clientY,Pa();for(var e=document.elementFromPoint(ve.clientX,ve.clientY),a=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(ve.clientX,ve.clientY),e!==a);)a=e;if(K.parentNode[ee]._isOutsideThisEl(e),a)do{if(a[ee]){var i=void 0;if(i=a[ee]._onDragOver({clientX:ve.clientX,clientY:ve.clientY,target:e,rootEl:a}),i&&!this.options.dragoverBubble)break}e=a}while(a=a.parentNode);Aa()}},_onTouchMove:function(e){if(Ie){var a=this.options,i=a.fallbackTolerance,n=a.fallbackOffset,c=e.touches?e.touches[0]:e,t=gt&&Re(gt,!0),o=gt&&t&&t.a,s=gt&&t&&t.d,l=pn&&qt&&da(qt),u=(c.clientX-Ie.clientX+n.x)/(o||1)+(l?l[0]-Un[0]:0)/(o||1),f=(c.clientY-Ie.clientY+n.y)/(s||1)+(l?l[1]-Un[1]:0)/(s||1);if(!dt.active&&!Ge){if(i&&Math.max(Math.abs(c.clientX-this._lastX),Math.abs(c.clientY-this._lastY))=0&&(ne({rootEl:Gt,name:"add",toEl:Gt,fromEl:Ft,originalEvent:e}),ne({sortable:this,name:"remove",toEl:Gt,originalEvent:e}),ne({rootEl:Gt,name:"sort",toEl:Gt,fromEl:Ft,originalEvent:e}),ne({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),Qt&&Qt.save()):de!==Be&&de>=0&&(ne({sortable:this,name:"update",toEl:Gt,originalEvent:e}),ne({sortable:this,name:"sort",toEl:Gt,originalEvent:e})),dt.active&&((de==null||de===-1)&&(de=Be,Te=en),ne({sortable:this,name:"end",toEl:Gt,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){re("nulling",this),Ft=K=Gt=gt=we=Bt=Sn=$e=Ie=ve=Je=de=Te=Be=en=Ue=nn=Qt=vn=dt.dragged=dt.ghost=dt.clone=dt.active=null,Dn.forEach(function(e){e.checked=!0}),Dn.length=Fn=jn=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":K&&(this._onDragOver(e),Hr(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],a,i=this.el.children,n=0,c=i.length,t=this.options;ni.right+n||r.clientX<=i.right&&r.clientY>i.bottom&&r.clientX>=i.left:r.clientX>i.right&&r.clientY>i.top||r.clientX<=i.right&&r.clientY>i.bottom+n}function Yr(r,e,a,i,n,c,t,o){var s=i?r.clientY:r.clientX,l=i?a.height:a.width,u=i?a.top:a.left,f=i?a.bottom:a.right,v=!1;if(!t){if(o&&xnu+l*c/2:sf-xn)return-nn}else if(s>u+l*(1-n)/2&&sf-l*c/2)?s>u+l/2?1:-1:0}function zr(r){return Kt(K)1&&(mt.forEach(function(o){c.addAnimationState({target:o,rect:ie?jt(o):t}),Ln(o),o.fromRect=t,i.removeAnimationState(o)}),ie=!1,ei(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(a){var i=a.sortable,n=a.isOwner,c=a.insertion,t=a.activeSortable,o=a.parentEl,s=a.putSortable,l=this.options;if(c){if(n&&t._hideClone(),Xe=!1,l.animation&&mt.length>1&&(ie||!n&&!t.options.sort&&!s)){var u=jt(Nt,!1,!0,!0);mt.forEach(function(v){v!==Nt&&(ua(v,u),o.appendChild(v))}),ie=!0}if(!n)if(ie||yn(),mt.length>1){var f=gn;t._showClone(i),t.options.animation&&!gn&&f&&ce.forEach(function(v){t.addAnimationState({target:v,rect:Ye}),v.fromRect=Ye,v.thisAnimationDuration=null})}else t._showClone(i)}},dragOverAnimationCapture:function(a){var i=a.dragRect,n=a.isOwner,c=a.activeSortable;if(mt.forEach(function(o){o.thisAnimationDuration=null}),c.options.animation&&!n&&c.multiDrag.isMultiDrag){Ye=fe({},i);var t=Re(Nt,!0);Ye.top-=t.f,Ye.left-=t.e}},dragOverAnimationComplete:function(){ie&&(ie=!1,yn())},drop:function(a){var i=a.originalEvent,n=a.rootEl,c=a.parentEl,t=a.sortable,o=a.dispatchSortableEvent,s=a.oldIndex,l=a.putSortable,u=l||this.sortable;if(!!i){var f=this.options,v=c.children;if(!Ve)if(f.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),Ut(Nt,f.selectedClass,!~mt.indexOf(Nt)),~mt.indexOf(Nt))mt.splice(mt.indexOf(Nt),1),ke=null,ze({sortable:t,rootEl:n,name:"deselect",targetEl:Nt,originalEvt:i});else{if(mt.push(Nt),ze({sortable:t,rootEl:n,name:"select",targetEl:Nt,originalEvt:i}),i.shiftKey&&ke&&t.el.contains(ke)){var h=Kt(ke),p=Kt(Nt);if(~h&&~p&&h!==p){var y,m;for(p>h?(m=h,y=p):(m=p,y=h+1);m1){var g=jt(Nt),x=Kt(Nt,":not(."+this.options.selectedClass+")");if(!Xe&&f.animation&&(Nt.thisAnimationDuration=null),u.captureAnimationState(),!Xe&&(f.animation&&(Nt.fromRect=g,mt.forEach(function(E){if(E.thisAnimationDuration=null,E!==Nt){var I=ie?jt(E):g;E.fromRect=I,u.addAnimationState({target:E,rect:I})}})),yn(),mt.forEach(function(E){v[x]?c.insertBefore(E,v[x]):c.appendChild(E),x++}),s===Kt(Nt))){var b=!1;mt.forEach(function(E){if(E.sortableIndex!==Kt(E)){b=!0;return}}),b&&o("update")}mt.forEach(function(E){Ln(E)}),u.animateAll()}he=u}(n===c||l&&l.lastPutMode!=="clone")&&ce.forEach(function(E){E.parentNode&&E.parentNode.removeChild(E)})}},nullingGlobal:function(){this.isMultiDrag=Ve=!1,ce.length=0},destroyGlobal:function(){this._deselectMultiDrag(),bt(document,"pointerup",this._deselectMultiDrag),bt(document,"mouseup",this._deselectMultiDrag),bt(document,"touchend",this._deselectMultiDrag),bt(document,"keydown",this._checkKeyDown),bt(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(a){if(!(typeof Ve<"u"&&Ve)&&he===this.sortable&&!(a&&pe(a.target,this.options.draggable,this.sortable.el,!1))&&!(a&&a.button!==0))for(;mt.length;){var i=mt[0];Ut(i,this.options.selectedClass,!1),mt.shift(),ze({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:i,originalEvt:a})}},_checkKeyDown:function(a){a.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(a){a.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},fe(r,{pluginName:"multiDrag",utils:{select:function(a){var i=a.parentNode[ee];!i||!i.options.multiDrag||~mt.indexOf(a)||(he&&he!==i&&(he.multiDrag._deselectMultiDrag(),he=i),Ut(a,i.options.selectedClass,!0),mt.push(a))},deselect:function(a){var i=a.parentNode[ee],n=mt.indexOf(a);!i||!i.options.multiDrag||!~n||(Ut(a,i.options.selectedClass,!1),mt.splice(n,1))}},eventProperties:function(){var a=this,i=[],n=[];return mt.forEach(function(c){i.push({multiDragElement:c,index:c.sortableIndex});var t;ie&&c!==Nt?t=-1:ie?t=Kt(c,":not(."+a.options.selectedClass+")"):t=Kt(c),n.push({multiDragElement:c,index:t})}),{items:Tr(mt),clones:[].concat(ce),oldIndicies:i,newIndicies:n}},optionListeners:{multiDragKey:function(a){return a=a.toLowerCase(),a==="ctrl"?a="Control":a.length>1&&(a=a.charAt(0).toUpperCase()+a.substr(1)),a}}})}function ei(r,e){mt.forEach(function(a,i){var n=e.children[a.sortableIndex+(r?Number(i):0)];n?e.insertBefore(a,n):e.appendChild(a)})}function ma(r,e){ce.forEach(function(a,i){var n=e.children[a.sortableIndex+(r?Number(i):0)];n?e.insertBefore(a,n):e.appendChild(a)})}function yn(){mt.forEach(function(r){r!==Nt&&r.parentNode&&r.parentNode.removeChild(r)})}dt.mount(new Qr);dt.mount(qn,_n);const ni=Object.freeze(Object.defineProperty({__proto__:null,default:dt,MultiDrag:ti,Sortable:dt,Swap:_r},Symbol.toStringTag,{value:"Module"})),ai=ja(ni);(function(r,e){(function(i,n){r.exports=n(Ua,ai)})(typeof self<"u"?self:Va,function(a,i){return function(n){var c={};function t(o){if(c[o])return c[o].exports;var s=c[o]={i:o,l:!1,exports:{}};return n[o].call(s.exports,s,s.exports,t),s.l=!0,s.exports}return t.m=n,t.c=c,t.d=function(o,s,l){t.o(o,s)||Object.defineProperty(o,s,{enumerable:!0,get:l})},t.r=function(o){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},t.t=function(o,s){if(s&1&&(o=t(o)),s&8||s&4&&typeof o=="object"&&o&&o.__esModule)return o;var l=Object.create(null);if(t.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:o}),s&2&&typeof o!="string")for(var u in o)t.d(l,u,function(f){return o[f]}.bind(null,u));return l},t.n=function(o){var s=o&&o.__esModule?function(){return o.default}:function(){return o};return t.d(s,"a",s),s},t.o=function(o,s){return Object.prototype.hasOwnProperty.call(o,s)},t.p="",t(t.s="fb15")}({"00ee":function(n,c,t){var o=t("b622"),s=o("toStringTag"),l={};l[s]="z",n.exports=String(l)==="[object z]"},"0366":function(n,c,t){var o=t("1c0b");n.exports=function(s,l,u){if(o(s),l===void 0)return s;switch(u){case 0:return function(){return s.call(l)};case 1:return function(f){return s.call(l,f)};case 2:return function(f,v){return s.call(l,f,v)};case 3:return function(f,v,h){return s.call(l,f,v,h)}}return function(){return s.apply(l,arguments)}}},"057f":function(n,c,t){var o=t("fc6a"),s=t("241c").f,l={}.toString,u=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],f=function(v){try{return s(v)}catch{return u.slice()}};n.exports.f=function(h){return u&&l.call(h)=="[object Window]"?f(h):s(o(h))}},"06cf":function(n,c,t){var o=t("83ab"),s=t("d1e7"),l=t("5c6c"),u=t("fc6a"),f=t("c04e"),v=t("5135"),h=t("0cfb"),p=Object.getOwnPropertyDescriptor;c.f=o?p:function(m,g){if(m=u(m),g=f(g,!0),h)try{return p(m,g)}catch{}if(v(m,g))return l(!s.f.call(m,g),m[g])}},"0cfb":function(n,c,t){var o=t("83ab"),s=t("d039"),l=t("cc12");n.exports=!o&&!s(function(){return Object.defineProperty(l("div"),"a",{get:function(){return 7}}).a!=7})},"13d5":function(n,c,t){var o=t("23e7"),s=t("d58f").left,l=t("a640"),u=t("ae40"),f=l("reduce"),v=u("reduce",{1:0});o({target:"Array",proto:!0,forced:!f||!v},{reduce:function(p){return s(this,p,arguments.length,arguments.length>1?arguments[1]:void 0)}})},"14c3":function(n,c,t){var o=t("c6b6"),s=t("9263");n.exports=function(l,u){var f=l.exec;if(typeof f=="function"){var v=f.call(l,u);if(typeof v!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return v}if(o(l)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return s.call(l,u)}},"159b":function(n,c,t){var o=t("da84"),s=t("fdbc"),l=t("17c2"),u=t("9112");for(var f in s){var v=o[f],h=v&&v.prototype;if(h&&h.forEach!==l)try{u(h,"forEach",l)}catch{h.forEach=l}}},"17c2":function(n,c,t){var o=t("b727").forEach,s=t("a640"),l=t("ae40"),u=s("forEach"),f=l("forEach");n.exports=!u||!f?function(h){return o(this,h,arguments.length>1?arguments[1]:void 0)}:[].forEach},"1be4":function(n,c,t){var o=t("d066");n.exports=o("document","documentElement")},"1c0b":function(n,c){n.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}},"1c7e":function(n,c,t){var o=t("b622"),s=o("iterator"),l=!1;try{var u=0,f={next:function(){return{done:!!u++}},return:function(){l=!0}};f[s]=function(){return this},Array.from(f,function(){throw 2})}catch{}n.exports=function(v,h){if(!h&&!l)return!1;var p=!1;try{var y={};y[s]=function(){return{next:function(){return{done:p=!0}}}},v(y)}catch{}return p}},"1d80":function(n,c){n.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}},"1dde":function(n,c,t){var o=t("d039"),s=t("b622"),l=t("2d00"),u=s("species");n.exports=function(f){return l>=51||!o(function(){var v=[],h=v.constructor={};return h[u]=function(){return{foo:1}},v[f](Boolean).foo!==1})}},"23cb":function(n,c,t){var o=t("a691"),s=Math.max,l=Math.min;n.exports=function(u,f){var v=o(u);return v<0?s(v+f,0):l(v,f)}},"23e7":function(n,c,t){var o=t("da84"),s=t("06cf").f,l=t("9112"),u=t("6eeb"),f=t("ce4e"),v=t("e893"),h=t("94ca");n.exports=function(p,y){var m=p.target,g=p.global,x=p.stat,b,E,I,C,N,R;if(g?E=o:x?E=o[m]||f(m,{}):E=(o[m]||{}).prototype,E)for(I in y){if(N=y[I],p.noTargetGet?(R=s(E,I),C=R&&R.value):C=E[I],b=h(g?I:m+(x?".":"#")+I,p.forced),!b&&C!==void 0){if(typeof N==typeof C)continue;v(N,C)}(p.sham||C&&C.sham)&&l(N,"sham",!0),u(E,I,N,p)}}},"241c":function(n,c,t){var o=t("ca84"),s=t("7839"),l=s.concat("length","prototype");c.f=Object.getOwnPropertyNames||function(f){return o(f,l)}},"25f0":function(n,c,t){var o=t("6eeb"),s=t("825a"),l=t("d039"),u=t("ad6d"),f="toString",v=RegExp.prototype,h=v[f],p=l(function(){return h.call({source:"a",flags:"b"})!="/a/b"}),y=h.name!=f;(p||y)&&o(RegExp.prototype,f,function(){var g=s(this),x=String(g.source),b=g.flags,E=String(b===void 0&&g instanceof RegExp&&!("flags"in v)?u.call(g):b);return"/"+x+"/"+E},{unsafe:!0})},"2ca0":function(n,c,t){var o=t("23e7"),s=t("06cf").f,l=t("50c4"),u=t("5a34"),f=t("1d80"),v=t("ab13"),h=t("c430"),p="".startsWith,y=Math.min,m=v("startsWith"),g=!h&&!m&&!!function(){var x=s(String.prototype,"startsWith");return x&&!x.writable}();o({target:"String",proto:!0,forced:!g&&!m},{startsWith:function(b){var E=String(f(this));u(b);var I=l(y(arguments.length>1?arguments[1]:void 0,E.length)),C=String(b);return p?p.call(E,C,I):E.slice(I,I+C.length)===C}})},"2d00":function(n,c,t){var o=t("da84"),s=t("342f"),l=o.process,u=l&&l.versions,f=u&&u.v8,v,h;f?(v=f.split("."),h=v[0]+v[1]):s&&(v=s.match(/Edge\/(\d+)/),(!v||v[1]>=74)&&(v=s.match(/Chrome\/(\d+)/),v&&(h=v[1]))),n.exports=h&&+h},"342f":function(n,c,t){var o=t("d066");n.exports=o("navigator","userAgent")||""},"35a1":function(n,c,t){var o=t("f5df"),s=t("3f8c"),l=t("b622"),u=l("iterator");n.exports=function(f){if(f!=null)return f[u]||f["@@iterator"]||s[o(f)]}},"37e8":function(n,c,t){var o=t("83ab"),s=t("9bf2"),l=t("825a"),u=t("df75");n.exports=o?Object.defineProperties:function(v,h){l(v);for(var p=u(h),y=p.length,m=0,g;y>m;)s.f(v,g=p[m++],h[g]);return v}},"3bbe":function(n,c,t){var o=t("861d");n.exports=function(s){if(!o(s)&&s!==null)throw TypeError("Can't set "+String(s)+" as a prototype");return s}},"3ca3":function(n,c,t){var o=t("6547").charAt,s=t("69f3"),l=t("7dd0"),u="String Iterator",f=s.set,v=s.getterFor(u);l(String,"String",function(h){f(this,{type:u,string:String(h),index:0})},function(){var p=v(this),y=p.string,m=p.index,g;return m>=y.length?{value:void 0,done:!0}:(g=o(y,m),p.index+=g.length,{value:g,done:!1})})},"3f8c":function(n,c){n.exports={}},4160:function(n,c,t){var o=t("23e7"),s=t("17c2");o({target:"Array",proto:!0,forced:[].forEach!=s},{forEach:s})},"428f":function(n,c,t){var o=t("da84");n.exports=o},"44ad":function(n,c,t){var o=t("d039"),s=t("c6b6"),l="".split;n.exports=o(function(){return!Object("z").propertyIsEnumerable(0)})?function(u){return s(u)=="String"?l.call(u,""):Object(u)}:Object},"44d2":function(n,c,t){var o=t("b622"),s=t("7c73"),l=t("9bf2"),u=o("unscopables"),f=Array.prototype;f[u]==null&&l.f(f,u,{configurable:!0,value:s(null)}),n.exports=function(v){f[u][v]=!0}},"44e7":function(n,c,t){var o=t("861d"),s=t("c6b6"),l=t("b622"),u=l("match");n.exports=function(f){var v;return o(f)&&((v=f[u])!==void 0?!!v:s(f)=="RegExp")}},4930:function(n,c,t){var o=t("d039");n.exports=!!Object.getOwnPropertySymbols&&!o(function(){return!String(Symbol())})},"4d64":function(n,c,t){var o=t("fc6a"),s=t("50c4"),l=t("23cb"),u=function(f){return function(v,h,p){var y=o(v),m=s(y.length),g=l(p,m),x;if(f&&h!=h){for(;m>g;)if(x=y[g++],x!=x)return!0}else for(;m>g;g++)if((f||g in y)&&y[g]===h)return f||g||0;return!f&&-1}};n.exports={includes:u(!0),indexOf:u(!1)}},"4de4":function(n,c,t){var o=t("23e7"),s=t("b727").filter,l=t("1dde"),u=t("ae40"),f=l("filter"),v=u("filter");o({target:"Array",proto:!0,forced:!f||!v},{filter:function(p){return s(this,p,arguments.length>1?arguments[1]:void 0)}})},"4df4":function(n,c,t){var o=t("0366"),s=t("7b0b"),l=t("9bdd"),u=t("e95a"),f=t("50c4"),v=t("8418"),h=t("35a1");n.exports=function(y){var m=s(y),g=typeof this=="function"?this:Array,x=arguments.length,b=x>1?arguments[1]:void 0,E=b!==void 0,I=h(m),C=0,N,R,S,P,M,j;if(E&&(b=o(b,x>2?arguments[2]:void 0,2)),I!=null&&!(g==Array&&u(I)))for(P=I.call(m),M=P.next,R=new g;!(S=M.call(P)).done;C++)j=E?l(P,b,[S.value,C],!0):S.value,v(R,C,j);else for(N=f(m.length),R=new g(N);N>C;C++)j=E?b(m[C],C):m[C],v(R,C,j);return R.length=C,R}},"4fad":function(n,c,t){var o=t("23e7"),s=t("6f53").entries;o({target:"Object",stat:!0},{entries:function(u){return s(u)}})},"50c4":function(n,c,t){var o=t("a691"),s=Math.min;n.exports=function(l){return l>0?s(o(l),9007199254740991):0}},5135:function(n,c){var t={}.hasOwnProperty;n.exports=function(o,s){return t.call(o,s)}},5319:function(n,c,t){var o=t("d784"),s=t("825a"),l=t("7b0b"),u=t("50c4"),f=t("a691"),v=t("1d80"),h=t("8aa5"),p=t("14c3"),y=Math.max,m=Math.min,g=Math.floor,x=/\$([$&'`]|\d\d?|<[^>]*>)/g,b=/\$([$&'`]|\d\d?)/g,E=function(I){return I===void 0?I:String(I)};o("replace",2,function(I,C,N,R){var S=R.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,P=R.REPLACE_KEEPS_$0,M=S?"$":"$0";return[function(w,X){var L=v(this),Y=w==null?void 0:w[I];return Y!==void 0?Y.call(w,L,X):C.call(String(L),w,X)},function(D,w){if(!S&&P||typeof w=="string"&&w.indexOf(M)===-1){var X=N(C,D,this,w);if(X.done)return X.value}var L=s(D),Y=String(this),it=typeof w=="function";it||(w=String(w));var _=L.global;if(_){var G=L.unicode;L.lastIndex=0}for(var at=[];;){var pt=p(L,Y);if(pt===null||(at.push(pt),!_))break;var Tt=String(pt[0]);Tt===""&&(L.lastIndex=h(Y,u(L.lastIndex),G))}for(var ht="",St=0,$t=0;$t=St&&(ht+=Y.slice(St,ut)+zt,St=ut+wt.length)}return ht+Y.slice(St)}];function j(D,w,X,L,Y,it){var _=X+D.length,G=L.length,at=b;return Y!==void 0&&(Y=l(Y),at=x),C.call(it,at,function(pt,Tt){var ht;switch(Tt.charAt(0)){case"$":return"$";case"&":return D;case"`":return w.slice(0,X);case"'":return w.slice(_);case"<":ht=Y[Tt.slice(1,-1)];break;default:var St=+Tt;if(St===0)return pt;if(St>G){var $t=g(St/10);return $t===0?pt:$t<=G?L[$t-1]===void 0?Tt.charAt(1):L[$t-1]+Tt.charAt(1):pt}ht=L[St-1]}return ht===void 0?"":ht})}})},5692:function(n,c,t){var o=t("c430"),s=t("c6cd");(n.exports=function(l,u){return s[l]||(s[l]=u!==void 0?u:{})})("versions",[]).push({version:"3.6.5",mode:o?"pure":"global",copyright:"\xA9 2020 Denis Pushkarev (zloirock.ru)"})},"56ef":function(n,c,t){var o=t("d066"),s=t("241c"),l=t("7418"),u=t("825a");n.exports=o("Reflect","ownKeys")||function(v){var h=s.f(u(v)),p=l.f;return p?h.concat(p(v)):h}},"5a34":function(n,c,t){var o=t("44e7");n.exports=function(s){if(o(s))throw TypeError("The method doesn't accept regular expressions");return s}},"5c6c":function(n,c){n.exports=function(t,o){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:o}}},"5db7":function(n,c,t){var o=t("23e7"),s=t("a2bf"),l=t("7b0b"),u=t("50c4"),f=t("1c0b"),v=t("65f0");o({target:"Array",proto:!0},{flatMap:function(p){var y=l(this),m=u(y.length),g;return f(p),g=v(y,0),g.length=s(g,y,y,m,0,1,p,arguments.length>1?arguments[1]:void 0),g}})},6547:function(n,c,t){var o=t("a691"),s=t("1d80"),l=function(u){return function(f,v){var h=String(s(f)),p=o(v),y=h.length,m,g;return p<0||p>=y?u?"":void 0:(m=h.charCodeAt(p),m<55296||m>56319||p+1===y||(g=h.charCodeAt(p+1))<56320||g>57343?u?h.charAt(p):m:u?h.slice(p,p+2):(m-55296<<10)+(g-56320)+65536)}};n.exports={codeAt:l(!1),charAt:l(!0)}},"65f0":function(n,c,t){var o=t("861d"),s=t("e8b5"),l=t("b622"),u=l("species");n.exports=function(f,v){var h;return s(f)&&(h=f.constructor,typeof h=="function"&&(h===Array||s(h.prototype))?h=void 0:o(h)&&(h=h[u],h===null&&(h=void 0))),new(h===void 0?Array:h)(v===0?0:v)}},"69f3":function(n,c,t){var o=t("7f9a"),s=t("da84"),l=t("861d"),u=t("9112"),f=t("5135"),v=t("f772"),h=t("d012"),p=s.WeakMap,y,m,g,x=function(S){return g(S)?m(S):y(S,{})},b=function(S){return function(P){var M;if(!l(P)||(M=m(P)).type!==S)throw TypeError("Incompatible receiver, "+S+" required");return M}};if(o){var E=new p,I=E.get,C=E.has,N=E.set;y=function(S,P){return N.call(E,S,P),P},m=function(S){return I.call(E,S)||{}},g=function(S){return C.call(E,S)}}else{var R=v("state");h[R]=!0,y=function(S,P){return u(S,R,P),P},m=function(S){return f(S,R)?S[R]:{}},g=function(S){return f(S,R)}}n.exports={set:y,get:m,has:g,enforce:x,getterFor:b}},"6eeb":function(n,c,t){var o=t("da84"),s=t("9112"),l=t("5135"),u=t("ce4e"),f=t("8925"),v=t("69f3"),h=v.get,p=v.enforce,y=String(String).split("String");(n.exports=function(m,g,x,b){var E=b?!!b.unsafe:!1,I=b?!!b.enumerable:!1,C=b?!!b.noTargetGet:!1;if(typeof x=="function"&&(typeof g=="string"&&!l(x,"name")&&s(x,"name",g),p(x).source=y.join(typeof g=="string"?g:"")),m===o){I?m[g]=x:u(g,x);return}else E?!C&&m[g]&&(I=!0):delete m[g];I?m[g]=x:s(m,g,x)})(Function.prototype,"toString",function(){return typeof this=="function"&&h(this).source||f(this)})},"6f53":function(n,c,t){var o=t("83ab"),s=t("df75"),l=t("fc6a"),u=t("d1e7").f,f=function(v){return function(h){for(var p=l(h),y=s(p),m=y.length,g=0,x=[],b;m>g;)b=y[g++],(!o||u.call(p,b))&&x.push(v?[b,p[b]]:p[b]);return x}};n.exports={entries:f(!0),values:f(!1)}},"73d9":function(n,c,t){var o=t("44d2");o("flatMap")},7418:function(n,c){c.f=Object.getOwnPropertySymbols},"746f":function(n,c,t){var o=t("428f"),s=t("5135"),l=t("e538"),u=t("9bf2").f;n.exports=function(f){var v=o.Symbol||(o.Symbol={});s(v,f)||u(v,f,{value:l.f(f)})}},7839:function(n,c){n.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"7b0b":function(n,c,t){var o=t("1d80");n.exports=function(s){return Object(o(s))}},"7c73":function(n,c,t){var o=t("825a"),s=t("37e8"),l=t("7839"),u=t("d012"),f=t("1be4"),v=t("cc12"),h=t("f772"),p=">",y="<",m="prototype",g="script",x=h("IE_PROTO"),b=function(){},E=function(S){return y+g+p+S+y+"/"+g+p},I=function(S){S.write(E("")),S.close();var P=S.parentWindow.Object;return S=null,P},C=function(){var S=v("iframe"),P="java"+g+":",M;return S.style.display="none",f.appendChild(S),S.src=String(P),M=S.contentWindow.document,M.open(),M.write(E("document.F=Object")),M.close(),M.F},N,R=function(){try{N=document.domain&&new ActiveXObject("htmlfile")}catch{}R=N?I(N):C();for(var S=l.length;S--;)delete R[m][l[S]];return R()};u[x]=!0,n.exports=Object.create||function(P,M){var j;return P!==null?(b[m]=o(P),j=new b,b[m]=null,j[x]=P):j=R(),M===void 0?j:s(j,M)}},"7dd0":function(n,c,t){var o=t("23e7"),s=t("9ed3"),l=t("e163"),u=t("d2bb"),f=t("d44e"),v=t("9112"),h=t("6eeb"),p=t("b622"),y=t("c430"),m=t("3f8c"),g=t("ae93"),x=g.IteratorPrototype,b=g.BUGGY_SAFARI_ITERATORS,E=p("iterator"),I="keys",C="values",N="entries",R=function(){return this};n.exports=function(S,P,M,j,D,w,X){s(M,P,j);var L=function($t){if($t===D&&at)return at;if(!b&&$t in _)return _[$t];switch($t){case I:return function(){return new M(this,$t)};case C:return function(){return new M(this,$t)};case N:return function(){return new M(this,$t)}}return function(){return new M(this)}},Y=P+" Iterator",it=!1,_=S.prototype,G=_[E]||_["@@iterator"]||D&&_[D],at=!b&&G||L(D),pt=P=="Array"&&_.entries||G,Tt,ht,St;if(pt&&(Tt=l(pt.call(new S)),x!==Object.prototype&&Tt.next&&(!y&&l(Tt)!==x&&(u?u(Tt,x):typeof Tt[E]!="function"&&v(Tt,E,R)),f(Tt,Y,!0,!0),y&&(m[Y]=R))),D==C&&G&&G.name!==C&&(it=!0,at=function(){return G.call(this)}),(!y||X)&&_[E]!==at&&v(_,E,at),m[P]=at,D)if(ht={values:L(C),keys:w?at:L(I),entries:L(N)},X)for(St in ht)(b||it||!(St in _))&&h(_,St,ht[St]);else o({target:P,proto:!0,forced:b||it},ht);return ht}},"7f9a":function(n,c,t){var o=t("da84"),s=t("8925"),l=o.WeakMap;n.exports=typeof l=="function"&&/native code/.test(s(l))},"825a":function(n,c,t){var o=t("861d");n.exports=function(s){if(!o(s))throw TypeError(String(s)+" is not an object");return s}},"83ab":function(n,c,t){var o=t("d039");n.exports=!o(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})},8418:function(n,c,t){var o=t("c04e"),s=t("9bf2"),l=t("5c6c");n.exports=function(u,f,v){var h=o(f);h in u?s.f(u,h,l(0,v)):u[h]=v}},"861d":function(n,c){n.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}},8875:function(n,c,t){var o,s,l;(function(u,f){s=[],o=f,l=typeof o=="function"?o.apply(c,s):o,l!==void 0&&(n.exports=l)})(typeof self<"u"?self:this,function(){function u(){var f=Object.getOwnPropertyDescriptor(document,"currentScript");if(!f&&"currentScript"in document&&document.currentScript||f&&f.get!==u&&document.currentScript)return document.currentScript;try{throw new Error}catch(N){var v=/.*at [^(]*\((.*):(.+):(.+)\)$/ig,h=/@([^@]*):(\d+):(\d+)\s*$/ig,p=v.exec(N.stack)||h.exec(N.stack),y=p&&p[1]||!1,m=p&&p[2]||!1,g=document.location.href.replace(document.location.hash,""),x,b,E,I=document.getElementsByTagName("script");y===g&&(x=document.documentElement.outerHTML,b=new RegExp("(?:[^\\n]+?\\n){0,"+(m-2)+"}[^<]* + + + +
+ + +