import{o as Ot,c as Dr,J as YN,d as Ta,h as Le,a as q,F as ea,p as si,j as rt,i as al,w as Kr,b as Y,t as dt,K as UN,G as Ye,L as ZN,M as l2,N as u2,e as Xv,O as xt,g as pe,P as sr,Q as ad,R as mn,S as XN,T as c2,U as f2,V as St,x as v2,W as qN,X as jN,Y as Wy,Z as h2,$ as d2,a0 as p2,a1 as KN,I as Ne,y as fn,z as ys,a2 as c_,_ as Xn}from"./index-108817e3.js";import{B as JN,_ as QN}from"./button.vue_vue_type_style_index_0_lang-9ce24083.js";import{_ as eB}from"./BasicSelect.vue_vue_type_style_index_0_lang-bf2c93fd.js";import{_ as tB,w as Dn}from"./_plugin-vue_export-helper-ec62f026.js";import{T as zu,K as mt,i as rB,a as aB,s as nB,u as g2}from"./shallowequal-105194c4.js";import{I as cw}from"./Icon-03d9588d.js";import{T as iB,f as oB,d as yt,u as sB,c as lB,a as uB,w as cB,l as fB,b as vB,e as hB,g as dB,h as pB,C as y2,i as m2,j as gB,m as nr}from"./index-802c3c8f.js";import{c as yB,o as mB}from"./vnode-9b8abbbf.js";import{u as Fa,a as fw}from"./useState-472505a2.js";import{u as _2}from"./FormItemContext-cecaca7f.js";import{u as _B}from"./usePrice-7afab779.js";import{a as vn}from"./useDataTime-0f06f32d.js";import"./toArray-a421612c.js";import"./pickAttrs-f899bdd0.js";const SB={},wB={class:"bg-gradient"};function xB(r,t){return Ot(),Dr("div",wB,[YN(r.$slots,"default")])}const Fu=tB(SB,[["render",xB]]),vw="/assets/users4-80585f51.svg",hw="/assets/users3-3a96ddd8.svg",op="/assets/users5-1dc3f500.svg",bB="/assets/users2-8002992a.svg",CB={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},TB={class:"flex"},DB=["src","alt"],MB={class:"flex flex-col justify-between w-full mr-2"},AB={class:"text-base font-bold"},IB={class:"flex items-center justify-end"},LB={class:"text-base font-bold"},PB={class:"mr-1"},kB={class:"grid grid-cols-1 md:grid-cols-4 gap-3 mt-3"},RB={class:"flex"},EB=["src","alt"],OB={class:"flex flex-col justify-between w-full mr-2"},NB={class:"text-base font-bold"},BB={class:"flex items-center justify-end"},VB={class:"text-base font-bold"},zB={class:"mr-1"},FB=Ta({__name:"Header",props:{statistics:{}},setup(r){const t=r,e=Le(()=>{var i,o,s,l;return[{title:"تعداد کاربران",alt:"sales-number",image:bB,value:((i=t.statistics.count_sale_order)==null?void 0:i.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"کاربران جدید 7 روز گذشته",alt:"new-users-last-7-days",image:op,value:((o=t.statistics.new_users_last_7_days)==null?void 0:o.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"کاربران فعال این هفته",alt:"active-users-saturday-to-friday",image:hw,value:((s=t.statistics.active_users_saturday_to_friday)==null?void 0:s.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"کاربران فعال این ماه",alt:"active-users-jalali-month",image:vw,value:((l=t.statistics.active_users_jalali_month)==null?void 0:l.toLocaleString("fa-IR"))||"0",unit:"نفر"}]}),a=Le(()=>{var i,o,s;return[{title:"کاربران جدید امروز",alt:"customers",image:op,value:t.statistics.new_customer,unit:"نفر"},{title:"کاربران جدید 30 روز گذشته",alt:"new-users-last-30-days",image:op,value:((i=t.statistics.new_users_last_30_days)==null?void 0:i.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"کاربران فعال هفته گذشته",alt:"active-users-last-week",image:hw,value:((o=t.statistics.active_users_last_week)==null?void 0:o.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"کاربران فعال ماه گذشته",alt:"active-users-last-month",image:vw,value:((s=t.statistics.active_users_last_month)==null?void 0:s.toLocaleString("fa-IR"))||"0",unit:"نفر"}]}),n=i=>({"تعداد کاربران":"این عدد تعداد کل کاربران ثبت‌نام شده در سیستم از اول تا حالا را نشان می‌دهد","کاربران جدید 7 روز گذشته":"این عدد تعداد کاربرانی است که در 7 روز گذشته ثبت‌نام کرده‌اند","کاربران فعال این هفته":"این عدد تعداد کاربرانی است که در این هفته (از شنبه تا جمعه) حداقل یک بازدید از یک قسمت از اپ داشته‌اند","کاربران فعال این ماه":"این عدد تعداد کاربرانی است که در ماه جاری (شمسی) حداقل یک بازدید از یک قسمت از اپ داشته‌اند","کاربران جدید امروز":"این عدد تعداد کاربرانی است که امروز ثبت‌نام کرده‌اند","کاربران جدید 30 روز گذشته":"این عدد تعداد کاربرانی است که در 30 روز گذشته ثبت‌نام کرده‌اند","کاربران فعال هفته گذشته":"این عدد تعداد کاربرانی است که در هفته گذشته (از شنبه تا جمعه) حداقل یک بازدید از یک قسمت از اپ داشته‌اند","کاربران فعال ماه گذشته":"این عدد تعداد کاربرانی است که در ماه گذشته (شمسی) حداقل یک بازدید از یک قسمت از اپ داشته‌اند"})[i]||"";return(i,o)=>(Ot(),Dr("div",null,[q("div",CB,[(Ot(!0),Dr(ea,null,si(rt(e),(s,l)=>(Ot(),al(Fu,{class:"h-[120px] p-5",key:l},{default:Kr(()=>[Y(rt(zu),{title:n(s.title),placement:"top"},{default:Kr(()=>[q("div",TB,[q("div",null,[q("img",{class:"w-20 h-20",src:s.image,alt:s.alt},null,8,DB)]),q("div",MB,[q("div",null,[q("span",AB,dt(s.title),1)]),q("div",IB,[q("span",LB,dt(s.value),1),q("span",PB,dt(s.unit),1)])])])]),_:2},1032,["title"])]),_:2},1024))),128))]),q("div",kB,[(Ot(!0),Dr(ea,null,si(rt(a),(s,l)=>(Ot(),al(Fu,{class:"h-[120px] p-5",key:l+4},{default:Kr(()=>[Y(rt(zu),{title:n(s.title),placement:"top"},{default:Kr(()=>[q("div",RB,[q("div",null,[q("img",{class:"w-20 h-20",src:s.image,alt:s.alt},null,8,EB)]),q("div",OB,[q("div",null,[q("span",NB,dt(s.title),1)]),q("div",BB,[q("span",VB,dt(s.value),1),q("span",zB,dt(s.unit),1)])])])]),_:2},1032,["title"])]),_:2},1024))),128))])]))}}),GB={locale:"fa_IR",today:"امروز",now:"اکنون",backToToday:"بازگشت به روز",ok:"باشه",clear:"پاک کردن",month:"ماه",year:"سال",timeSelect:"انتخاب زمان",dateSelect:"انتخاب تاریخ",monthSelect:"یک ماه را انتخاب کنید",yearSelect:"یک سال را انتخاب کنید",decadeSelect:"یک دهه را انتخاب کنید",yearFormat:"YYYY",dateFormat:"M/D/YYYY",dayFormat:"D",dateTimeFormat:"M/D/YYYY HH:mm:ss",monthBeforeYear:!0,previousMonth:"ماه قبل (PageUp)",nextMonth:"ماه بعد (PageDown)",previousYear:"سال قبل (Control + left)",nextYear:"سال بعد (Control + right)",previousDecade:"دهه قبل",nextDecade:"دهه بعد",previousCentury:"قرن قبل",nextCentury:"قرن بعد"},HB={lang:{placeholder:"انتخاب تاریخ",yearPlaceholder:"انتخاب سال",quarterPlaceholder:"انتخاب فصل",monthPlaceholder:"انتخاب ماه",weekPlaceholder:"انتخاب هفته",rangePlaceholder:["تاریخ شروع","تاریخ پایان"],rangeYearPlaceholder:["سال شروع","سال پایان"],rangeMonthPlaceholder:["ماه شروع","ماه پایان"],rangeWeekPlaceholder:["هفته شروع","هفته پایان"],...GB},timePickerLocale:{...iB}};function ef(r,t){return $B(r)||WB(r,t)||YB()}function $B(r){if(Array.isArray(r))return r}function WB(r,t){var e=[],a=!0,n=!1,i=void 0;try{for(var o=r[Symbol.iterator](),s;!(a=(s=o.next()).done)&&(e.push(s.value),!(t&&e.length===t));a=!0);}catch(l){n=!0,i=l}finally{try{!a&&o.return!=null&&o.return()}finally{if(n)throw i}}return e}function YB(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}var Jt=Math.floor;function nl(r,t){return r-t*Jt(r/t)}function S2(r){return r%4==0&&!(r%100==0&&r%400!=0)}var w2=17214255e-1;function xv(r,t,e){return w2-1+365*(r-1)+Jt((r-1)/4)+-Jt((r-1)/100)+Jt((r-1)/400)+Jt((367*t-362)/12+(t<=2?0:S2(r)?-1:-2)+e)}function UB(r){var t,e,a,n,i,o,s,l,u,c,f,v;t=Jt(r-.5)+.5,e=t-w2,a=Jt(e/146097),n=nl(e,146097),i=Jt(n/36524),o=nl(n,36524),s=Jt(o/1461),l=nl(o,1461),u=Jt(l/365),c=a*400+i*100+s*4+u,i==4||u==4||c++,f=t-xv(c,1,1),v=t=0?474:473),n=474+nl(a,2820),e+(t<=7?(t-1)*31:(t-1)*30+6)+Jt((n*682-110)/2816)+(n-1)*365+Jt(a/2820)*1029983+(ZB-1)}function XB(r){var t,e,a,n,i,o,s,l,u,c;return r=Jt(r)+.5,n=r-bv(475,1,1),i=Jt(n/1029983),o=nl(n,1029983),o==1029982?s=2820:(l=Jt(o/366),u=nl(o,366),s=Jt((2134*l+2816*u+2815)/1028522)+l+1),t=s+2820*i+474,t<=0&&t--,c=r-bv(t,1,1)+1,e=c<=186?Math.ceil(c/31):Math.ceil((c-6)/30),a=r-bv(t,e,1)+1,[t,e,a]}var tf={J:function(t,e,a){return XB(xv(t,e,a))},G:function(t,e,a){return UB(bv(t,e,a))}},qB=/^(\d{4})[-/]?(\d{1,2})[-/]?(\d{0,2})(.*)?$/,jB=/\[.*?\]|jY{2,4}|jM{1,4}|jD{1,2}|Y{2,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,sp="date",ms="day",Hi="month",$i="year",KB="week",JB="YYYY-MM-DDTHH:mm:ssZ",QB={jmonths:"فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند".split("_")},eV=function(r,t,e){var a=t.prototype,n=a.$utils(),i=function(D){return D.$C==="jalali"},o=n.prettyUnit||n.p,s=n.isUndefined||n.u,l=n.padStart||n.s,u=n.monthDiff||n.m,c=n.absFloor||n.a,f=function(D){return function(){var M=D.bind(this).apply(void 0,arguments);return M.$C=this.$C,M.isJalali()&&M.InitJalali(),M}};a.startOf=f(a.startOf),a.endOf=f(a.endOf),a.add=f(a.add),a.subtract=f(a.subtract),a.set=f(a.set);var v=a.parse,h=a.init,d=a.startOf,p=a.$set,g=a.add,y=a.format,m=a.diff,_=a.year,S=a.month,w=a.date,x=a.daysInMonth,b=a.toArray;e.$C="gregory",e.$fdow=6,e.calendar=function(C){return e.$C=C,e},a.calendar=function(C){var D=this.clone();return D.$C=C,D.isJalali()&&D.InitJalali(),D},a.isJalali=function(){return i(this)},e.en.jmonths="Farvardin_Ordibehesht_Khordaad_Tir_Mordaad_Shahrivar_Mehr_Aabaan_Aazar_Dey_Bahman_Esfand".split("_"),e.locale("fa",Object.assign({},oB,{},QB),!0);var T=function(D,M){return e(D,{locale:M.$L,utc:M.$u,calendar:M.$C})};a.init=function(){var C=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};h.bind(this)(C),this.isJalali()&&this.InitJalali()},a.parse=function(C){var D;if(this.$C=C.calendar||this.$C||e.$C,C.jalali&&typeof C.date=="string"&&/.*[^Z]$/i.test(C.date)&&(D=C.date.match(qB))){var M=tf.G(parseInt(D[1],10),parseInt(D[2],10),parseInt(D[3]||1,10)),L=ef(M,3),I=L[0],P=L[1],R=L[2];C.date="".concat(I,"-").concat(P,"-").concat(R).concat(D[4]||"")}return v.bind(this)(C)},a.InitJalali=function(){var C=tf.J(this.$y,this.$M+1,this.$D),D=ef(C,3),M=D[0],L=D[1],I=D[2];this.$jy=M,this.$jM=L-1,this.$jD=I},a.startOf=function(C,D){var M=this;if(!i(this))return d.bind(this)(C,D);var L=s(D)?!0:D,I=o(C),P=function(O,k){var N=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M.$jy,B=tf.G(N,k+1,O),F=ef(B,3),H=F[0],j=F[1],ee=F[2],ce=T(new Date(H,j-1,ee),M);return(L?ce:ce.endOf(ms)).$set("hour",1)},R=(this.$W+(7-e.$fdow))%7;switch(I){case $i:return L?P(1,0):P(0,0,this.$jy+1);case Hi:return L?P(1,this.$jM):P(0,(this.$jM+1)%12,this.$jy+parseInt((this.$jM+1)/12,10));case KB:return L?P(this.$jD-R,this.$jM):P(this.$jD+(6-R),this.$jM);default:return d.bind(this)(C,D)}},a.$set=function(C,D){var M=this;if(!i(this))return p.bind(this)(C,D);var L=o(C),I=function(R,E){var O=arguments.length>2&&arguments[2]!==void 0?arguments[2]:M.$jy,k=tf.G(O,E+1,R),N=ef(k,3),B=N[0],F=N[1],H=N[2];return M.$d.setFullYear(B),M.$d.setMonth(F-1),M.$d.setDate(H),M};switch(L){case sp:case ms:I(D,this.$jM);break;case Hi:I(this.$jD,D);break;case $i:I(this.$jD,this.$jM,D);break;default:return p.bind(this)(C,D)}return this.init(),this},a.add=function(C,D){var M=this;if(!i(this))return g.bind(this)(C,D);C=Number(C);var L=D&&(D.length===1||D==="ms")?D:o(D),I=function(B,F){var H=M.set(sp,1).set(B,F+C);return H.set(sp,Math.min(M.$jD,H.daysInMonth()))};if(["M",Hi].indexOf(L)>-1){var P=this.$jM+C,R=P<0?-Math.ceil(-P/12):parseInt(P/12,10),E=this.$jD,O=this.set(ms,1).add(R,$i).set(Hi,P-R*12);return O.set(ms,Math.min(O.daysInMonth(),E))}if(["y",$i].indexOf(L)>-1)return I($i,this.$jy);if(["d",ms].indexOf(L)>-1){var k=new Date(this.$d);return k.setDate(k.getDate()+C),T(k,this)}return g.bind(this)(C,D)},a.format=function(C,D){var M=this;if(!i(this))return y.bind(this)(C,D);var L=C||JB,I=D||this.$locale(),P=I.jmonths;return L.replace(jB,function(R){if(R.indexOf("[")>-1)return R.replace(/\[|\]/g,"");switch(R){case"YY":return String(M.$jy).slice(-2);case"YYYY":return String(M.$jy);case"M":return String(M.$jM+1);case"MM":return l(M.$jM+1,2,"0");case"MMM":return P[M.$jM].slice(0,3);case"MMMM":return P[M.$jM];case"D":return String(M.$jD);case"DD":return l(M.$jD,2,"0");default:return y.bind(M)(R,D)}})},a.diff=function(C,D,M){if(!i(this))return m.bind(this)(C,D,M);var L=o(D),I=e(C),P=u(this,I);switch(L){case $i:P/=12;break;case Hi:break;default:return m.bind(this)(C,D,M)}return M?P:c(P)},a.$g=function(C,D,M){return s(C)?this[D]:this.set(M,C)},a.year=function(C){return i(this)?this.$g(C,"$jy",$i):_.bind(this)(C)},a.month=function(C){return i(this)?this.$g(C,"$jM",Hi):S.bind(this)(C)},a.date=function(C){return i(this)?this.$g(C,"$jD",ms):w.bind(this)(C)},a.daysInMonth=function(){return i(this)?this.endOf(Hi).$jD:x.bind(this)()},b&&(a.toArray=function(){return i(this)?[this.$jy,this.$jM,this.$jD,this.$H,this.$m,this.$s,this.$ms]:b.bind(this)()}),a.clone=function(){return T(this.toDate(),this)}};yt.extend(sB);yt.extend(eV);yt.calendar("jalali");yt.extend(lB);yt.extend(uB);yt.extend(cB);yt.extend(fB);yt.extend(vB);yt.extend(hB);yt.extend((r,t)=>{const e=t.prototype,a=e.format;e.format=function(i){const o=(i||"").replace("Wo","wo");return a.bind(this)(o)}});const tV=["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"],rV=["فروردین","اردیبهشت","خرداد","تیر","مرداد","شهریور","مهر","آبان","آذر","دی","بهمن","اسفند"];yt.updateLocale("fa",{months:rV,monthsShort:tV});const aV={bn_BD:"bn-bd",by_BY:"be",en_GB:"en-gb",en_US:"en",fa_IR:"fa",fr_BE:"fr",fr_CA:"fr-ca",hy_AM:"hy-am",kmr_IQ:"ku",nl_BE:"nl-be",pt_BR:"pt-br",zh_CN:"zh-cn",zh_HK:"zh-hk",zh_TW:"zh-tw"},Wi=r=>aV[r]||r.split("_")[0],dw=()=>{UN(!1,"Not match any format. Please help to fire a issue about this.")},nV={getNow:()=>yt().locale("fa"),getFixedDate:r=>yt(r,["YYYY-M-DD","YYYY-MM-DD"]),getEndDate:r=>r.endOf("month"),getWeekDay:r=>{const t=r.locale("en");return t.weekday()+t.localeData().firstDayOfWeek()},getYear:r=>r.year(),getMonth:r=>r.month(),getDate:r=>r.locale("fa").date(),getHour:r=>r.hour(),getMinute:r=>r.minute(),getSecond:r=>r.second(),addYear:(r,t)=>r.add(t,"year"),addMonth:(r,t)=>r.add(t,"month"),addDate:(r,t)=>r.add(t,"day"),setYear:(r,t)=>r.year(t),setMonth:(r,t)=>r.month(t),setDate:(r,t)=>r.date(t),setHour:(r,t)=>r.hour(t),setMinute:(r,t)=>r.minute(t),setSecond:(r,t)=>r.second(t),isAfter:(r,t)=>r.isAfter(t),isValidate:r=>r.isValid(),locale:{getWeekFirstDay:r=>yt().locale(Wi(r)).localeData().firstDayOfWeek(),getWeekFirstDate:(r,t)=>t.locale(Wi(r)).weekday(0),getWeek:(r,t)=>t.locale(Wi(r)).week(),getShortWeekDays:r=>yt().locale(Wi(r)).localeData().weekdaysMin(),getShortMonths:r=>yt().locale(Wi(r)).localeData().monthsShort(),format:(r,t,e)=>t.locale(Wi(r)).format(e),parse:(r,t,e)=>{const a=Wi(r);for(let n=0;nArray.isArray(r)?r.map(e=>typeof e=="string"&&e?yt(e,t):e||null):typeof r=="string"&&r?yt(r,t):r||null,toString:(r,t)=>Array.isArray(r)?r.map(e=>yt.isDayjs(e)?e.format(t):e):yt.isDayjs(r)?r.format(t):r},iV=(r,{attrs:t,slots:e})=>Y(JN,Ye({size:"small",type:"primary"},r,t),e);function oV(r,{slots:t,attrs:e}){return Y(dB,Ye({color:"blue"},r,e),t)}function Dt(r){const t=ZN();return{...r,...t}}const x2=Symbol("PanelContextProps"),f_=r=>{l2(x2,r)},sn=()=>u2(x2,{}),rf={visibility:"hidden"};function Oi(r,{slots:t}){var d;const e=Dt(r),{prefixCls:a,prevIcon:n="‹",nextIcon:i="›",superPrevIcon:o="«",superNextIcon:s="»",onSuperPrev:l,onSuperNext:u,onPrev:c,onNext:f}=e,{hideNextBtn:v,hidePrevBtn:h}=sn();return Y("div",{class:a},[l&&Y("button",{type:"button",onClick:l,tabindex:-1,class:`${a}-super-prev-btn`,style:h.value?rf:{}},[o]),c&&Y("button",{type:"button",onClick:c,tabindex:-1,class:`${a}-prev-btn`,style:h.value?rf:{}},[n]),Y("div",{class:`${a}-view`},[(d=t.default)==null?void 0:d.call(t)]),f&&Y("button",{type:"button",onClick:f,tabindex:-1,class:`${a}-next-btn`,style:v.value?rf:{}},[i]),u&&Y("button",{type:"button",onClick:u,tabindex:-1,class:`${a}-super-next-btn`,style:v.value?rf:{}},[s])])}Oi.displayName="Header";Oi.inheritAttrs=!1;function v_(r){const t=Dt(r),{prefixCls:e,generateConfig:a,viewDate:n,onPrevDecades:i,onNextDecades:o}=t,{hideHeader:s}=sn();if(s)return null;const l=`${e}-header`,u=a.getYear(n),c=Math.floor(u/xn)*xn,f=c+xn-1;return Y(Oi,Ye(t,{prefixCls:l,onSuperPrev:i,onSuperNext:o}),{default:()=>[c,Xv("-"),f]})}v_.displayName="DecadeHeader";v_.inheritAttrs=!1;function b2(r,t,e,a,n){let i=r.setHour(t,e);return i=r.setMinute(i,a),i=r.setSecond(i,n),i}function Cv(r,t,e){if(!e)return t;let a=t;return a=r.setHour(a,r.getHour(e)),a=r.setMinute(a,r.getMinute(e)),a=r.setSecond(a,r.getSecond(e)),a}function sV(r,t,e,a,n,i){const o=Math.floor(r/a)*a;if(o{L||a[1](M)},onMouseenter:()=>{!L&&y&&y(M)},onMouseleave:()=>{!L&&m&&m(M)}},[v?v(M):Y("div",{class:`${S}-inner`},[f(M)])]))}w.push(Y("tr",{key:x,class:l&&l(T)},[b]))}return Y("div",{class:`${t}-body`},[Y("table",{class:`${t}-content`},[g&&Y("thead",null,[Y("tr",null,[g])]),Y("tbody",null,[w])])])}ts.displayName="PanelBody";ts.inheritAttrs=!1;const Yy=3,pw=4;function h_(r){const t=Dt(r),e=ga-1,{prefixCls:a,viewDate:n,generateConfig:i}=t,o=`${a}-cell`,s=i.getYear(n),l=Math.floor(s/ga)*ga,u=Math.floor(s/xn)*xn,c=u+xn-1,f=i.setYear(n,u-Math.ceil((Yy*pw*ga-xn)/2));return Y(ts,Ye(t,{rowNum:pw,colNum:Yy,baseDate:f,getCellText:h=>{const d=i.getYear(h);return`${d}-${d+e}`},getCellClassName:h=>{const d=i.getYear(h),p=d+e;return{[`${o}-in-view`]:u<=d&&p<=c,[`${o}-selected`]:d===l}},getCellDate:(h,d)=>i.addYear(h,d*ga)}),null)}h_.displayName="DecadeBody";h_.inheritAttrs=!1;const af=new Map;function uV(r,t){let e;function a(){rB(r)?t():e=Dn(()=>{a()})}return a(),()=>{Dn.cancel(e)}}function Uy(r,t,e){if(af.get(r)&&Dn.cancel(af.get(r)),e<=0){af.set(r,Dn(()=>{r.scrollTop=t}));return}const n=(t-r.scrollTop)/e*10;af.set(r,Dn(()=>{r.scrollTop+=n,r.scrollTop!==t&&Uy(r,t,e-10)}))}function Tl(r,{onLeftRight:t,onCtrlLeftRight:e,onUpDown:a,onPageUpDown:n,onEnter:i}){const{which:o,ctrlKey:s,metaKey:l}=r;switch(o){case mt.LEFT:if(s||l){if(e)return e(-1),!0}else if(t)return t(-1),!0;break;case mt.RIGHT:if(s||l){if(e)return e(1),!0}else if(t)return t(1),!0;break;case mt.UP:if(a)return a(-1),!0;break;case mt.DOWN:if(a)return a(1),!0;break;case mt.PAGE_UP:if(n)return n(-1),!0;break;case mt.PAGE_DOWN:if(n)return n(1),!0;break;case mt.ENTER:if(i)return i(),!0;break}return!1}function C2(r,t,e,a){let n=r;if(!n)switch(t){case"time":n=a?"hh:mm:ss a":"HH:mm:ss";break;case"week":n="gggg-wo";break;case"month":n="YYYY-MM";break;case"quarter":n="YYYY-[Q]Q";break;case"year":n="YYYY";break;default:n=e?"YYYY-MM-DD HH:mm:ss":"YYYY-MM-DD"}return n}function T2(r,t,e){const a=r==="time"?8:10,n=typeof t=="function"?t(e.getNow()).length:t.length;return Math.max(a,n)+2}let Zl=null;const nf=new Set;function cV(r){return!Zl&&typeof window<"u"&&window.addEventListener&&(Zl=t=>{[...nf].forEach(e=>{e(t)})},window.addEventListener("mousedown",Zl)),nf.add(r),()=>{nf.delete(r),nf.size===0&&(window.removeEventListener("mousedown",Zl),Zl=null)}}function fV(r){var e;const t=r.target;return r.composed&&t.shadowRoot&&((e=r.composedPath)==null?void 0:e.call(r)[0])||t}const vV=r=>r==="month"||r==="date"?"year":r,hV=r=>r==="date"?"month":r,dV=r=>r==="month"||r==="date"?"quarter":r,pV=r=>r==="date"?"week":r,gV={year:vV,month:hV,quarter:dV,week:pV,time:null,date:null};function D2(r,t){return r.some(e=>e&&e.contains(t))}const ga=10,xn=ga*10;function d_(r){const t=Dt(r),{prefixCls:e,onViewDateChange:a,generateConfig:n,viewDate:i,operationRef:o,onSelect:s,onPanelChange:l}=t,u=`${e}-decade-panel`;o.value={onKeydown:v=>Tl(v,{onLeftRight:h=>{s(n.addYear(i,h*ga),"key")},onCtrlLeftRight:h=>{s(n.addYear(i,h*xn),"key")},onUpDown:h=>{s(n.addYear(i,h*ga*Yy),"key")},onEnter:()=>{l("year",i)}})};const c=v=>{const h=n.addYear(i,v*xn);a(h),l(null,h)},f=v=>{s(v,"mouse"),l("year",v)};return Y("div",{class:u},[Y(v_,Ye(t,{prefixCls:e,onPrevDecades:()=>{c(-1)},onNextDecades:()=>{c(1)}}),null),Y(h_,Ye(t,{prefixCls:e,onSelect:f}),null)])}d_.displayName="DecadePanel";d_.inheritAttrs=!1;const Tv=7;function rs(r,t){if(!r&&!t)return!0;if(!r||!t)return!1}function yV(r,t,e){const a=rs(t,e);if(typeof a=="boolean")return a;const n=Math.floor(r.getYear(t)/10),i=Math.floor(r.getYear(e)/10);return n===i}function nd(r,t,e){const a=rs(t,e);return typeof a=="boolean"?a:r.getYear(t)===r.getYear(e)}function Zy(r,t){return Math.floor(r.getMonth(t)/3)+1}function M2(r,t,e){const a=rs(t,e);return typeof a=="boolean"?a:nd(r,t,e)&&Zy(r,t)===Zy(r,e)}function p_(r,t,e){const a=rs(t,e);return typeof a=="boolean"?a:nd(r,t,e)&&r.getMonth(t)===r.getMonth(e)}function bn(r,t,e){const a=rs(t,e);return typeof a=="boolean"?a:r.getYear(t)===r.getYear(e)&&r.getMonth(t)===r.getMonth(e)&&r.getDate(t)===r.getDate(e)}function mV(r,t,e){const a=rs(t,e);return typeof a=="boolean"?a:r.getHour(t)===r.getHour(e)&&r.getMinute(t)===r.getMinute(e)&&r.getSecond(t)===r.getSecond(e)}function A2(r,t,e,a){const n=rs(e,a);return typeof n=="boolean"?n:r.locale.getWeek(t,e)===r.locale.getWeek(t,a)}function il(r,t,e){return bn(r,t,e)&&mV(r,t,e)}function of(r,t,e,a){return!t||!e||!a?!1:!bn(r,t,a)&&!bn(r,e,a)&&r.isAfter(a,t)&&r.isAfter(e,a)}function _V(r,t,e){const a=t.locale.getWeekFirstDay(r),n=t.setDate(e,1),i=t.getWeekDay(n);let o=t.addDate(n,a-i);return t.getMonth(o)===t.getMonth(e)&&t.getDate(o)>1&&(o=t.addDate(o,-7)),o}function Gu(r,t,e,a=1){switch(t){case"year":return e.addYear(r,a*10);case"quarter":case"month":return e.addYear(r,a);default:return e.addMonth(r,a)}}function Qt(r,{generateConfig:t,locale:e,format:a}){return typeof a=="function"?a(r):t.locale.format(e.locale,r,a)}function I2(r,{generateConfig:t,locale:e,formatList:a}){return!r||typeof a[0]=="function"?null:t.locale.parse(e.locale,r,a)}function Xy({cellDate:r,mode:t,disabledDate:e,generateConfig:a}){if(!e)return!1;const n=(i,o,s)=>{let l=o;for(;l<=s;){let u;switch(i){case"date":{if(u=a.setDate(r,l),!e(u))return!1;break}case"month":{if(u=a.setMonth(r,l),!Xy({cellDate:u,mode:"month",generateConfig:a,disabledDate:e}))return!1;break}case"year":{if(u=a.setYear(r,l),!Xy({cellDate:u,mode:"year",generateConfig:a,disabledDate:e}))return!1;break}}l+=1}return!0};switch(t){case"date":case"week":return e(r);case"month":{const o=a.getDate(a.getEndDate(r));return n("date",1,o)}case"quarter":{const i=Math.floor(a.getMonth(r)/3)*3,o=i+2;return n("month",i,o)}case"year":return n("month",0,11);case"decade":{const i=a.getYear(r),o=Math.floor(i/ga)*ga,s=o+ga-1;return n("year",o,s)}}}function g_(r){const t=Dt(r),{hideHeader:e}=sn();if(e.value)return null;const{prefixCls:a,generateConfig:n,locale:i,value:o,format:s}=t,l=`${a}-header`;return Y(Oi,{prefixCls:l},{default:()=>[o?Qt(o,{locale:i,format:s,generateConfig:n}):" "]})}g_.displayName="TimeHeader";g_.inheritAttrs=!1;const sf=Ta({name:"TimeUnitColumn",props:["prefixCls","units","onSelect","value","active","hideDisabledOptions"],setup(r){const{open:t}=sn(),e=pe(null),a=pe(new Map),n=pe();return sr(()=>r.value,()=>{const i=a.value.get(r.value);i&&t.value!==!1&&Uy(e.value,i.offsetTop,120)}),ad(()=>{var i;(i=n.value)==null||i.call(n)}),sr(t,()=>{var i;(i=n.value)==null||i.call(n),mn(()=>{if(t.value){const o=a.value.get(r.value);o&&(n.value=uV(o,()=>{Uy(e.value,o.offsetTop,0)}))}})},{immediate:!0,flush:"post"}),()=>{const{prefixCls:i,units:o,onSelect:s,value:l,active:u,hideDisabledOptions:c}=r,f=`${i}-cell`;return Y("ul",{class:xt(`${i}-column`,{[`${i}-column-active`]:u}),ref:e,style:{position:"relative"}},[o.map(v=>c&&v.disabled?null:Y("li",{key:v.value,ref:h=>{a.value.set(v.value,h)},class:xt(f,{[`${f}-disabled`]:v.disabled,[`${f}-selected`]:l===v.value}),onClick:()=>{v.disabled||s(v.value)}},[Y("div",{class:`${f}-inner`},[v.label])]))])}}});function L2(r,t,e="0"){let a=String(r);for(;a.lengthr;function P2(r){return r==null?[]:Array.isArray(r)?r:[r]}function k2(r){const t={};return Object.keys(r).forEach(e=>{(e.substr(0,5)==="data-"||e.substr(0,5)==="aria-"||e==="role"||e==="name")&&e.substr(0,7)!=="data-__"&&(t[e]=r[e])}),t}function et(r,t){return r?r[t]:null}function Xr(r,t,e){const a=[et(r,0),et(r,1)];return a[e]=typeof t=="function"?t(a[e]):t,!a[0]&&!a[1]?null:a}function lp(r,t,e,a){const n=[];for(let i=r;i<=t;i+=e)n.push({label:L2(i,2),value:i,disabled:(a||[]).includes(i)});return n}const wV=Ta({name:"TimeBody",inheritAttrs:!1,props:["generateConfig","prefixCls","operationRef","activeColumnIndex","value","showHour","showMinute","showSecond","use12Hours","hourStep","minuteStep","secondStep","disabledHours","disabledMinutes","disabledSeconds","disabledTime","hideDisabledOptions","onSelect"],setup(r){const t=Le(()=>r.value?r.generateConfig.getHour(r.value):-1),e=Le(()=>r.use12Hours?t.value>=12:!1),a=Le(()=>r.use12Hours?t.value%12:t.value),n=Le(()=>r.value?r.generateConfig.getMinute(r.value):-1),i=Le(()=>r.value?r.generateConfig.getSecond(r.value):-1),o=pe(r.generateConfig.getNow()),s=pe(),l=pe(),u=pe();XN(()=>{o.value=r.generateConfig.getNow()}),c2(()=>{if(r.disabledTime){const g=r.disabledTime(o);[s.value,l.value,u.value]=[g.disabledHours,g.disabledMinutes,g.disabledSeconds]}else[s.value,l.value,u.value]=[r.disabledHours,r.disabledMinutes,r.disabledSeconds]});const c=(g,y,m,_)=>{let S=r.value||r.generateConfig.getNow();const w=Math.max(0,y),x=Math.max(0,m),b=Math.max(0,_);return S=b2(r.generateConfig,S,!r.use12Hours||!g?w:w+12,x,b),S},f=Le(()=>lp(0,23,r.hourStep??1,s.value&&s.value())),v=Le(()=>{if(!r.use12Hours)return[!1,!1];const g=[!0,!0];return f.value.forEach(({disabled:y,value:m})=>{y||(m>=12?g[1]=!1:g[0]=!1)}),g}),h=Le(()=>r.use12Hours?f.value.filter(e.value?g=>g.value>=12:g=>g.value<12).map(g=>{const y=g.value%12,m=y===0?"12":L2(y,2);return{...g,label:m,value:y}}):f.value),d=Le(()=>lp(0,59,r.minuteStep??1,l.value&&l.value(t.value))),p=Le(()=>lp(0,59,r.secondStep??1,u.value&&u.value(t.value,n)));return()=>{const{prefixCls:g,operationRef:y,activeColumnIndex:m,showHour:_,showMinute:S,showSecond:w,use12Hours:x,hideDisabledOptions:b,onSelect:T}=r,C=[],D=`${g}-content`,M=`${g}-time-panel`;y.value={onUpDown:P=>{const R=C[m];if(R){const E=R.units.findIndex(k=>k.value===R.value),O=R.units.length;for(let k=1;k{T(c(e.value,P,n.value,i.value),"mouse")}),L(S,Y(sf,{key:"minute"},null),n.value,d.value,P=>{T(c(e.value,a.value,P,i.value),"mouse")}),L(w,Y(sf,{key:"second"},null),i.value,p.value,P=>{T(c(e.value,a.value,n.value,P),"mouse")});let I=-1;return typeof e.value=="boolean"&&(I=e.value?1:0),L(x===!0,Y(sf,{key:"12hours"},null),I,[{label:"AM",value:0,disabled:v.value[0]},{label:"PM",value:1,disabled:v.value[1]}],P=>{T(c(!!P,a.value,n.value,i.value),"mouse")}),Y("div",{class:D},[C.map(({node:P})=>P)])}}}),xV=r=>r.filter(t=>t!==!1).length;function id(r){const t=Dt(r),{generateConfig:e,format:a="HH:mm:ss",prefixCls:n,active:i,operationRef:o,showHour:s,showMinute:l,showSecond:u,use12Hours:c=!1,onSelect:f,value:v}=t,h=`${n}-time-panel`,d=pe(),p=pe(-1),g=xV([s,l,u,c]);return o.value={onKeydown:y=>Tl(y,{onLeftRight:m=>{p.value=(p.value+m+g)%g},onUpDown:m=>{p.value===-1?p.value=0:d.value&&d.value.onUpDown(m)},onEnter:()=>{f(v||e.getNow(),"key"),p.value=-1}}),onBlur:()=>{p.value=-1}},Y("div",{class:xt(h,{[`${h}-active`]:i})},[Y(g_,Ye(t,{format:a,prefixCls:n}),null),Y(wV,Ye(t,{prefixCls:n,activeColumnIndex:p.value,operationRef:d}),null)])}id.displayName="TimePanel";id.inheritAttrs=!1;function od({cellPrefixCls:r,generateConfig:t,rangedValue:e,hoverRangedValue:a,isInView:n,isSameCell:i,offsetCell:o,today:s,value:l}){function u(c){const f=o(c,-1),v=o(c,1),h=et(e,0),d=et(e,1),p=et(a,0),g=et(a,1),y=of(t,p,g,c);function m(T){return i(h,T)}function _(T){return i(d,T)}const S=i(p,c),w=i(g,c),x=(y||w)&&(!n(f)||_(f)),b=(y||S)&&(!n(v)||m(v));return{[`${r}-in-view`]:n(c),[`${r}-in-range`]:of(t,h,d,c),[`${r}-range-start`]:m(c),[`${r}-range-end`]:_(c),[`${r}-range-start-single`]:m(c)&&!d,[`${r}-range-end-single`]:_(c)&&!h,[`${r}-range-start-near-hover`]:m(c)&&(i(f,p)||of(t,p,g,f)),[`${r}-range-end-near-hover`]:_(c)&&(i(v,g)||of(t,p,g,v)),[`${r}-range-hover`]:y,[`${r}-range-hover-start`]:S,[`${r}-range-hover-end`]:w,[`${r}-range-hover-edge-start`]:x,[`${r}-range-hover-edge-end`]:b,[`${r}-range-hover-edge-start-near-range`]:x&&i(f,d),[`${r}-range-hover-edge-end-near-range`]:b&&i(v,h),[`${r}-today`]:i(s,c),[`${r}-selected`]:i(l,c)}}return u}const R2=Symbol("RangeContextProps"),bV=r=>{l2(R2,r)},kc=()=>u2(R2,{rangedValue:pe(),hoverRangedValue:pe(),inRange:pe(),panelPosition:pe()}),CV=Ta({name:"PanelContextProvider",inheritAttrs:!1,props:{value:{type:Object,default:()=>({})}},setup(r,{slots:t}){const e={rangedValue:pe(r.value.rangedValue),hoverRangedValue:pe(r.value.hoverRangedValue),inRange:pe(r.value.inRange),panelPosition:pe(r.value.panelPosition)};return bV(e),sr(()=>r.value,()=>{Object.keys(r.value).forEach(a=>{e[a]&&(e[a].value=r.value[a])})}),()=>{var a;return(a=t.default)==null?void 0:a.call(t)}}});function sd(r){const t=Dt(r),{prefixCls:e,generateConfig:a,prefixColumn:n,locale:i,rowCount:o,viewDate:s,value:l,dateRender:u}=t,{rangedValue:c,hoverRangedValue:f}=kc(),v=_V(i.locale,a,s),h=`${e}-cell`,d=a.locale.getWeekFirstDay(i.locale),p=a.getNow(),g=[],y=i.shortWeekDays||(a.locale.getShortWeekDays?a.locale.getShortWeekDays(i.locale):[]);n&&g.push(Y("th",{key:"empty","aria-label":"empty cell"},null));for(let S=0;Sbn(a,S,w),isInView:S=>p_(a,S,s),offsetCell:(S,w)=>a.addDate(S,w)});return Y(ts,Ye(t,{rowNum:o,colNum:Tv,baseDate:v,getCellNode:u?S=>u({current:S,today:p}):void 0,getCellText:a.getDate,getCellClassName:m,getCellDate:a.addDate,titleCell:S=>Qt(S,{locale:i,format:"YYYY-MM-DD",generateConfig:a}),headerCells:g}),null)}sd.displayName="DateBody";sd.inheritAttrs=!1;sd.props=["prefixCls","generateConfig","value?","viewDate","locale","rowCount","onSelect","dateRender?","disabledDate?","prefixColumn?","rowClassName?"];function TV(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!f2(r)}function y_(r){const t=Dt(r),{prefixCls:e,generateConfig:a,locale:n,viewDate:i,onNextMonth:o,onPrevMonth:s,onNextYear:l,onPrevYear:u,onYearClick:c,onMonthClick:f}=t,{hideHeader:v}=sn();if(v.value)return null;const h=`${e}-header`,d=n.shortMonths||(a.locale.getShortMonths?a.locale.getShortMonths(n.locale):[]),p=a.getMonth(i),g=Y("button",{type:"button",key:"year",onClick:c,tabindex:-1,class:`${e}-year-btn`},[Qt(i,{locale:n,format:n.yearFormat,generateConfig:a})]),y=Y("button",{type:"button",key:"month",onClick:f,tabindex:-1,class:`${e}-month-btn`},[n.monthFormat?Qt(i,{locale:n,format:n.monthFormat,generateConfig:a}):d[p]]),m=n.monthBeforeYear?[y,g]:[g,y];return Y(Oi,Ye(t,{prefixCls:h,onSuperPrev:u,onPrev:s,onNext:o,onSuperNext:l}),TV(m)?m:{default:()=>[m]})}y_.displayName="DateHeader";y_.inheritAttrs=!1;const DV=6;function Rc(r){const t=Dt(r),{prefixCls:e,panelName:a="date",keyboardConfig:n,active:i,operationRef:o,generateConfig:s,value:l,viewDate:u,onViewDateChange:c,onPanelChange:f,onSelect:v}=t,h=`${e}-${a}-panel`;o.value={onKeydown:g=>Tl(g,{onLeftRight:y=>{v(s.addDate(l||u,y),"key")},onCtrlLeftRight:y=>{v(s.addYear(l||u,y),"key")},onUpDown:y=>{v(s.addDate(l||u,y*Tv),"key")},onPageUpDown:y=>{v(s.addMonth(l||u,y),"key")},...n})};const d=g=>{const y=s.addYear(u,g);c(y),f(null,y)},p=g=>{const y=s.addMonth(u,g);c(y),f(null,y)};return Y("div",{class:xt(h,{[`${h}-active`]:i})},[Y(y_,Ye(t,{prefixCls:e,value:l,viewDate:u,onPrevYear:()=>{d(-1)},onNextYear:()=>{d(1)},onPrevMonth:()=>{p(-1)},onNextMonth:()=>{p(1)},onMonthClick:()=>{f("month",u)},onYearClick:()=>{f("year",u)}}),null),Y(sd,Ye(t,{onSelect:g=>v(g,"mouse"),prefixCls:e,value:l,viewDate:u,rowCount:DV}),null)])}Rc.displayName="DatePanel";Rc.inheritAttrs=!1;const gw=SV("date","time");function m_(r){const t=Dt(r),{prefixCls:e,operationRef:a,generateConfig:n,value:i,defaultValue:o,disabledTime:s,showTime:l,onSelect:u}=t,c=`${e}-datetime-panel`,f=pe(null),v=pe({}),h=pe({}),d=typeof l=="object"?{...l}:{};function p(_){const S=gw.indexOf(f.value)+_;return gw[S]||null}const g=_=>{h.value.onBlur&&h.value.onBlur(_),f.value=null};a.value={onKeydown:_=>{if(_.which===mt.TAB){const S=p(_.shiftKey?-1:1);return f.value=S,S&&_.preventDefault(),!0}if(f.value){const S=f.value==="date"?v:h;return S.value&&S.value.onKeydown&&S.value.onKeydown(_),!0}return[mt.LEFT,mt.RIGHT,mt.UP,mt.DOWN].includes(_.which)?(f.value="date",!0):!1},onBlur:g,onClose:g};const y=(_,S)=>{let w=_;S==="date"&&!i&&d.defaultValue?(w=n.setHour(w,n.getHour(d.defaultValue)),w=n.setMinute(w,n.getMinute(d.defaultValue)),w=n.setSecond(w,n.getSecond(d.defaultValue))):S==="time"&&!i&&o&&(w=n.setYear(w,n.getYear(o)),w=n.setMonth(w,n.getMonth(o)),w=n.setDate(w,n.getDate(o))),u&&u(w,"mouse")},m=s?s(i||null):{};return Y("div",{class:xt(c,{[`${c}-active`]:f.value})},[Y(Rc,Ye(t,{operationRef:v,active:f.value==="date",onSelect:_=>{y(Cv(n,_,!i&&typeof l=="object"?l.defaultValue:null),"date")}}),null),Y(id,Ye(t,{format:void 0},d,m,{disabledTime:null,defaultValue:void 0,operationRef:h,active:f.value==="time",onSelect:_=>{y(_,"time")}}),null)])}m_.displayName="DatetimePanel";m_.inheritAttrs=!1;function __(r){const t=Dt(r),{prefixCls:e,generateConfig:a,locale:n,value:i}=t,o=`${e}-cell`,s=c=>Y("td",{key:"week",class:xt(o,`${o}-week`)},[a.locale.getWeek(n.locale,c)]),l=`${e}-week-panel-row`;return Y(Rc,Ye(t,{panelName:"week",prefixColumn:s,rowClassName:c=>xt(l,{[`${l}-selected`]:A2(a,n.locale,i,c)}),keyboardConfig:{onLeftRight:null}}),null)}__.displayName="WeekPanel";__.inheritAttrs=!1;function S_(r){const t=Dt(r),{prefixCls:e,generateConfig:a,locale:n,viewDate:i,onNextYear:o,onPrevYear:s,onYearClick:l}=t,{hideHeader:u}=sn();if(u.value)return null;const c=`${e}-header`;return Y(Oi,Ye(t,{prefixCls:c,onSuperPrev:s,onSuperNext:o}),{default:()=>[Y("button",{type:"button",onClick:l,class:`${e}-year-btn`},[Qt(i,{locale:n,format:n.yearFormat,generateConfig:a})])]})}S_.displayName="MonthHeader";S_.inheritAttrs=!1;const E2=3,MV=4;function w_(r){const t=Dt(r),{prefixCls:e,locale:a,value:n,viewDate:i,generateConfig:o,monthCellRender:s}=t,{rangedValue:l,hoverRangedValue:u}=kc(),c=`${e}-cell`,f=od({cellPrefixCls:c,value:n,generateConfig:o,rangedValue:l.value,hoverRangedValue:u.value,isSameCell:(p,g)=>p_(o,p,g),isInView:()=>!0,offsetCell:(p,g)=>o.addMonth(p,g)}),v=a.shortMonths||(o.locale.getShortMonths?o.locale.getShortMonths(a.locale):[]),h=o.setMonth(i,0);return Y(ts,Ye(t,{rowNum:MV,colNum:E2,baseDate:h,getCellNode:s?p=>s({current:p,locale:a}):void 0,getCellText:p=>a.monthFormat?Qt(p,{locale:a,format:a.monthFormat,generateConfig:o}):v[o.getMonth(p)],getCellClassName:f,getCellDate:o.addMonth,titleCell:p=>Qt(p,{locale:a,format:"YYYY-MM",generateConfig:o})}),null)}w_.displayName="MonthBody";w_.inheritAttrs=!1;function x_(r){const t=Dt(r),{prefixCls:e,operationRef:a,onViewDateChange:n,generateConfig:i,value:o,viewDate:s,onPanelChange:l,onSelect:u}=t,c=`${e}-month-panel`;a.value={onKeydown:v=>Tl(v,{onLeftRight:h=>{u(i.addMonth(o||s,h),"key")},onCtrlLeftRight:h=>{u(i.addYear(o||s,h),"key")},onUpDown:h=>{u(i.addMonth(o||s,h*E2),"key")},onEnter:()=>{l("date",o||s)}})};const f=v=>{const h=i.addYear(s,v);n(h),l(null,h)};return Y("div",{class:c},[Y(S_,Ye(t,{prefixCls:e,onPrevYear:()=>{f(-1)},onNextYear:()=>{f(1)},onYearClick:()=>{l("year",s)}}),null),Y(w_,Ye(t,{prefixCls:e,onSelect:v=>{u(v,"mouse"),l("date",v)}}),null)])}x_.displayName="MonthPanel";x_.inheritAttrs=!1;function b_(r){const t=Dt(r),{prefixCls:e,generateConfig:a,locale:n,viewDate:i,onNextYear:o,onPrevYear:s,onYearClick:l}=t,{hideHeader:u}=sn();if(u.value)return null;const c=`${e}-header`;return Y(Oi,Ye(t,{prefixCls:c,onSuperPrev:s,onSuperNext:o}),{default:()=>[Y("button",{type:"button",onClick:l,class:`${e}-year-btn`},[Qt(i,{locale:n,format:n.yearFormat,generateConfig:a})])]})}b_.displayName="QuarterHeader";b_.inheritAttrs=!1;const AV=4,IV=1;function C_(r){const t=Dt(r),{prefixCls:e,locale:a,value:n,viewDate:i,generateConfig:o}=t,{rangedValue:s,hoverRangedValue:l}=kc(),u=`${e}-cell`,c=od({cellPrefixCls:u,value:n,generateConfig:o,rangedValue:s.value,hoverRangedValue:l.value,isSameCell:(v,h)=>M2(o,v,h),isInView:()=>!0,offsetCell:(v,h)=>o.addMonth(v,h*3)}),f=o.setDate(o.setMonth(i,0),1);return Y(ts,Ye(t,{rowNum:IV,colNum:AV,baseDate:f,getCellText:v=>Qt(v,{locale:a,format:a.quarterFormat||"[Q]Q",generateConfig:o}),getCellClassName:c,getCellDate:(v,h)=>o.addMonth(v,h*3),titleCell:v=>Qt(v,{locale:a,format:"YYYY-[Q]Q",generateConfig:o})}),null)}C_.displayName="QuarterBody";C_.inheritAttrs=!1;function T_(r){const t=Dt(r),{prefixCls:e,operationRef:a,onViewDateChange:n,generateConfig:i,value:o,viewDate:s,onPanelChange:l,onSelect:u}=t,c=`${e}-quarter-panel`;a.value={onKeydown:v=>Tl(v,{onLeftRight:h=>{u(i.addMonth(o||s,h*3),"key")},onCtrlLeftRight:h=>{u(i.addYear(o||s,h),"key")},onUpDown:h=>{u(i.addYear(o||s,h),"key")}})};const f=v=>{const h=i.addYear(s,v);n(h),l(null,h)};return Y("div",{class:c},[Y(b_,Ye(t,{prefixCls:e,onPrevYear:()=>{f(-1)},onNextYear:()=>{f(1)},onYearClick:()=>{l("year",s)}}),null),Y(C_,Ye(t,{prefixCls:e,onSelect:v=>{u(v,"mouse")}}),null)])}T_.displayName="QuarterPanel";T_.inheritAttrs=!1;function D_(r){const t=Dt(r),{prefixCls:e,generateConfig:a,viewDate:n,onPrevDecade:i,onNextDecade:o,onDecadeClick:s}=t,{hideHeader:l}=sn();if(l!=null&&l.value)return null;const u=`${e}-header`,c=a.getYear(n),f=Math.floor(c/ci)*ci,v=f+ci-1;return Y(Oi,Ye(t,{prefixCls:u,onSuperPrev:i,onSuperNext:o}),{default:()=>[Y("button",{type:"button",onClick:s,class:`${e}-decade-btn`},[f,Xv("-"),v])]})}D_.displayName="YearHeader";D_.inheritAttrs=!1;const qy=3,yw=4;function M_(r){const t=Dt(r),{prefixCls:e,value:a,viewDate:n,locale:i,generateConfig:o}=t,{rangedValue:s,hoverRangedValue:l}=kc(),u=`${e}-cell`,c=o.getYear(n),f=Math.floor(c/ci)*ci,v=f+ci-1,h=o.setYear(n,f-Math.ceil((qy*yw-ci)/2)),d=g=>{const y=o.getYear(g);return f<=y&&y<=v},p=od({cellPrefixCls:u,value:a,generateConfig:o,rangedValue:s.value,hoverRangedValue:l.value,isSameCell:(g,y)=>nd(o,g,y),isInView:d,offsetCell:(g,y)=>o.addYear(g,y)});return Y(ts,Ye(t,{rowNum:yw,colNum:qy,baseDate:h,getCellText:o.getYear,getCellClassName:p,getCellDate:o.addYear,titleCell:g=>Qt(g,{locale:i,format:"YYYY",generateConfig:o})}),null)}M_.displayName="YearBody";M_.inheritAttrs=!1;const ci=10;function A_(r){const t=Dt(r),{prefixCls:e,operationRef:a,onViewDateChange:n,generateConfig:i,value:o,viewDate:s,sourceMode:l,onSelect:u,onPanelChange:c}=t,f=`${e}-year-panel`;a.value={onKeydown:h=>Tl(h,{onLeftRight:d=>{u(i.addYear(o||s,d),"key")},onCtrlLeftRight:d=>{u(i.addYear(o||s,d*ci),"key")},onUpDown:d=>{u(i.addYear(o||s,d*qy),"key")},onEnter:()=>{c(l==="date"?"date":"month",o||s)}})};const v=h=>{const d=i.addYear(s,h*10);n(d),c(null,d)};return Y("div",{class:f},[Y(D_,Ye(t,{prefixCls:e,onPrevDecade:()=>{v(-1)},onNextDecade:()=>{v(1)},onDecadeClick:()=>{c("decade",s)}}),null),Y(M_,Ye(t,{prefixCls:e,onSelect:h=>{c(l==="date"?"date":"month",h),u(h,"mouse")}}),null)])}A_.displayName="YearPanel";A_.inheritAttrs=!1;function O2(r,t,e){return e?Y("div",{class:`${r}-footer-extra`},[e(t)]):null}function LV(r){return typeof r=="function"||Object.prototype.toString.call(r)==="[object Object]"&&!f2(r)}function N2({prefixCls:r,rangeList:t=[],components:e={},needConfirmButton:a,onNow:n,onOk:i,okDisabled:o,showNow:s,locale:l}){let u,c;if(t.length){const f=e.rangeItem||"span";u=Y(ea,null,[t.map(({label:v,onClick:h,onMouseenter:d,onMouseleave:p})=>Y("li",{key:v,class:`${r}-preset`},[Y(f,{onClick:h,onMouseenter:d,onMouseleave:p},LV(v)?v:{default:()=>[v]})]))])}if(a){const f=e.button||"button";n&&!u&&s!==!1&&(u=Y("li",{class:`${r}-now`},[Y("a",{class:`${r}-now-btn`,onClick:n},[l.now])])),c=a&&Y("li",{class:`${r}-ok`},[Y(f,{disabled:o,onClick:i},{default:()=>[l.ok]})])}return!u&&!c?null:Y("ul",{class:`${r}-ranges`},[u,c])}function PV(){return Ta({name:"PickerPanel",inheritAttrs:!1,props:{prefixCls:String,locale:Object,generateConfig:Object,value:Object,defaultValue:Object,pickerValue:Object,defaultPickerValue:Object,disabledDate:Function,mode:String,picker:{type:String,default:"date"},tabindex:{type:[Number,String],default:0},showNow:{type:Boolean,default:void 0},showTime:[Boolean,Object],showToday:Boolean,renderExtraFooter:Function,dateRender:Function,hideHeader:{type:Boolean,default:void 0},onSelect:Function,onChange:Function,onPanelChange:Function,onPanelChange2:Function,onMousedown:Function,onPickerValueChange:Function,onOk:Function,components:Object,direction:String,hourStep:{type:Number,default:1},minuteStep:{type:Number,default:1},secondStep:{type:Number,default:1}},setup(r,{attrs:t}){const e=Le(()=>r.picker==="date"&&!!r.showTime||r.picker==="time"),a=Le(()=>24%r.hourStep===0),n=Le(()=>60%r.minuteStep===0),i=Le(()=>60%r.secondStep===0),o=sn(),{operationRef:s,panelRef:l,onSelect:u,hideRanges:c,defaultOpenValue:f}=o,{inRange:v,panelPosition:h,rangedValue:d,hoverRangedValue:p}=kc(),g=pe({}),[y,m]=Fa(null,{value:St(r,"value"),defaultValue:r.defaultValue,postState:O=>!O&&(f!=null&&f.value)&&r.picker==="time"?f.value:O}),[_,S]=Fa(null,{value:St(r,"pickerValue"),defaultValue:r.defaultPickerValue||y.value,postState:O=>{const{generateConfig:k,showTime:N,defaultValue:B}=r,F=k.getNow();return O?!y.value&&r.showTime?typeof N=="object"?Cv(k,Array.isArray(O)?O[0]:O,N.defaultValue||F):B?Cv(k,Array.isArray(O)?O[0]:O,B):Cv(k,Array.isArray(O)?O[0]:O,F):O:F}}),w=O=>{S(O),r.onPickerValueChange&&r.onPickerValueChange(O)},x=O=>{const k=gV[r.picker];return k?k(O):O},[b,T]=Fa(()=>r.picker==="time"?"time":x("date"),{value:St(r,"mode")});sr(()=>r.picker,()=>{T(r.picker)});const C=pe(b.value),D=O=>{C.value=O},M=(O,k)=>{const{onPanelChange:N,onPanelChange2:B,generateConfig:F}=r,H=x(O||b.value);D(b.value),T(H),N&&(b.value!==H||il(F,_.value,_.value))&&(B&&B(k,H),N(k,H))},L=(O,k,N=!1)=>{const{picker:B,generateConfig:F,onSelect:H,onChange:j,disabledDate:ee}=r;(b.value===B||N)&&(m(O),H&&H(O),u&&u(O,k),j&&!il(F,O,y.value)&&!(ee!=null&&ee(O))&&j(O))},I=O=>g.value&&g.value.onKeydown?([mt.LEFT,mt.RIGHT,mt.UP,mt.DOWN,mt.PAGE_UP,mt.PAGE_DOWN,mt.ENTER].includes(O.which)&&O.preventDefault(),g.value.onKeydown(O)):!1,P=O=>{g.value&&g.value.onBlur&&g.value.onBlur(O)},R=()=>{const{generateConfig:O,hourStep:k,minuteStep:N,secondStep:B}=r,F=O.getNow(),H=sV(O.getHour(F),O.getMinute(F),O.getSecond(F),a.value?k:1,n.value?N:1,i.value?B:1),j=b2(O,F,H[0],H[1],H[2]);L(j,"submit")},E=Le(()=>{const{prefixCls:O,direction:k}=r;return xt(`${O}-panel`,{[`${O}-panel-has-range`]:d&&d.value&&d.value[0]&&d.value[1],[`${O}-panel-has-range-hover`]:p&&p.value&&p.value[0]&&p.value[1],[`${O}-panel-rtl`]:k==="rtl"})});return f_({...o,mode:b,hideHeader:Le(()=>{var O;return r.hideHeader!==void 0?r.hideHeader:(O=o.hideHeader)==null?void 0:O.value}),hidePrevBtn:Le(()=>v.value&&h.value==="right"),hideNextBtn:Le(()=>v.value&&h.value==="left")}),sr(()=>r.value,()=>{r.value&&S(r.value)}),()=>{const{prefixCls:O="ant-picker",locale:k,generateConfig:N,disabledDate:B,picker:F="date",tabindex:H=0,showNow:j,showTime:ee,showToday:ce,renderExtraFooter:Ae,onMousedown:Be,onOk:he,components:fe}=r;s&&h.value!=="right"&&(s.value={onKeydown:I,onClose:()=>{g.value&&g.value.onClose&&g.value.onClose()}});let U;const z={...t,...r,operationRef:g,prefixCls:O,viewDate:_.value,value:y.value,onViewDateChange:w,sourceMode:C.value,onPanelChange:M,disabledDate:B};switch(delete z.onChange,delete z.onSelect,b.value){case"decade":U=Y(d_,Ye(z,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null);break;case"year":U=Y(A_,Ye(z,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null);break;case"month":U=Y(x_,Ye(z,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null);break;case"quarter":U=Y(T_,Ye(z,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null);break;case"week":U=Y(__,Ye(z,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null);break;case"time":delete z.showTime,U=Y(id,Ye(z,typeof ee=="object"?ee:null,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null);break;default:ee?U=Y(m_,Ye(z,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null):U=Y(Rc,Ye(z,{onSelect:(Q,re)=>{w(Q),L(Q,re)}}),null)}let J,ie;c!=null&&c.value||(J=O2(O,b.value,Ae),ie=N2({prefixCls:O,components:fe,needConfirmButton:e.value,okDisabled:!y.value||B&&B(y.value),locale:k,showNow:j,onNow:e.value&&R,onOk:()=>{y.value&&(L(y.value,"submit",!0),he&&he(y.value))}}));let W;if(ce&&b.value==="date"&&F==="date"&&!ee){const Q=N.getNow(),re=`${O}-today-btn`,ge=B&&B(Q);W=Y("a",{class:xt(re,ge&&`${re}-disabled`),"aria-disabled":ge,onClick:()=>{ge||L(Q,"mouse",!0)}},[k.today])}return Y("div",{tabindex:H,class:xt(E.value,t.class),style:t.style,onKeydown:I,onBlur:P,onMousedown:Be,ref:l},[U,J||ie||W?Y("div",{class:`${O}-footer`},[J,ie,W]):null])}}})}const kV=PV(),B2=r=>Y(kV,r),RV={bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:1,adjustY:1}},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:0,adjustY:1}}};function V2(r,{slots:t}){const{prefixCls:e,popupStyle:a,visible:n,dropdownClassName:i,dropdownAlign:o,transitionName:s,getPopupContainer:l,range:u,popupPlacement:c,direction:f}=Dt(r),v=`${e}-dropdown`;return Y(aB,{showAction:[],hideAction:[],popupPlacement:(()=>c!==void 0?c:f==="rtl"?"bottomRight":"bottomLeft")(),builtinPlacements:RV,prefixCls:v,popupTransitionName:s,popupAlign:o,popupVisible:n,popupClassName:xt(i,{[`${v}-range`]:u,[`${v}-rtl`]:f==="rtl"}),popupStyle:a,getPopupContainer:l},{default:t.default,popup:t.popupElement})}function jy({open:r,value:t,isClickOutside:e,triggerOpen:a,forwardKeydown:n,onKeydown:i,blurToCancel:o,onSubmit:s,onCancel:l,onFocus:u,onBlur:c}){const f=pe(!1),v=pe(!1),h=pe(!1),d=pe(!1),p=pe(!1),g=Le(()=>({onMousedown:()=>{f.value=!0,a(!0)},onKeydown:m=>{if(i(m,()=>{p.value=!0}),!p.value){switch(m.which){case mt.ENTER:{r.value?s()!==!1&&(f.value=!0):a(!0),m.preventDefault();return}case mt.TAB:{f.value&&r.value&&!m.shiftKey?(f.value=!1,m.preventDefault()):!f.value&&r.value&&!n(m)&&m.shiftKey&&(f.value=!0,m.preventDefault());return}case mt.ESC:{f.value=!0,l();return}}!r.value&&![mt.SHIFT].includes(m.which)?a(!0):f.value||n(m)}},onFocus:m=>{f.value=!0,v.value=!0,u&&u(m)},onBlur:m=>{if(h.value||!e(document.activeElement)){h.value=!1;return}o.value?setTimeout(()=>{let{activeElement:_}=document;for(;_&&_.shadowRoot;)_=_.shadowRoot.activeElement;e(_)&&l()},0):r.value&&(a(!1),d.value&&s()),v.value=!1,c&&c(m)}}));sr(r,()=>{d.value=!1}),sr(t,()=>{d.value=!0});const y=pe();return v2(()=>{y.value=cV(m=>{const _=fV(m);if(r.value){const S=e(_);S?(!v.value||S)&&a(!1):(h.value=!0,Dn(()=>{h.value=!1}))}})}),ad(()=>{y.value&&y.value()}),[g,{focused:v,typing:f}]}function Ky({valueTexts:r,onTextChange:t}){const e=pe("");function a(i){e.value=i,t(i)}function n(){e.value=r.value[0]}return sr(()=>[...r.value],(i,o=[])=>{i.join("||")!==o.join("||")&&r.value.every(s=>s!==e.value)&&n()},{immediate:!0}),[e,a,n]}function qv(r,{formatList:t,generateConfig:e,locale:a}){const n=pB(()=>{if(!r.value)return[[""],""];let s="";const l=[];for(let u=0;ul[0]!==s[0]||!nB(l[1],s[1])),i=Le(()=>n.value[0]),o=Le(()=>n.value[1]);return[i,o]}function Jy(r,{formatList:t,generateConfig:e,locale:a}){const n=pe(null);let i;function o(c,f=!1){if(Dn.cancel(i),f){n.value=c;return}i=Dn(()=>{n.value=c})}const[,s]=qv(n,{formatList:t,generateConfig:e,locale:a});function l(c){o(c)}function u(c=!1){o(null,c)}return sr(r,()=>{u(!0)}),ad(()=>{Dn.cancel(i)}),[s,l,u]}function EV(){return Ta({name:"Picker",inheritAttrs:!1,props:["prefixCls","id","tabindex","dropdownClassName","dropdownAlign","popupStyle","transitionName","generateConfig","locale","inputReadOnly","allowClear","autofocus","showTime","showNow","showHour","showMinute","showSecond","picker","format","use12Hours","value","defaultValue","open","defaultOpen","defaultOpenValue","suffixIcon","clearIcon","disabled","disabledDate","placeholder","getPopupContainer","panelRender","inputRender","onChange","onOpenChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onContextmenu","onClick","onKeydown","onSelect","direction","autocomplete","showToday","renderExtraFooter","dateRender","minuteStep","hourStep","secondStep","hideDisabledOptions"],setup(r,{attrs:t,expose:e}){const a=pe(null),n=Le(()=>r.picker??"date"),i=Le(()=>n.value==="date"&&!!r.showTime||n.value==="time"),o=Le(()=>P2(C2(r.format,n.value,r.showTime,r.use12Hours))),s=pe(null),l=pe(null),u=pe(null),[c,f]=Fa(null,{value:St(r,"value"),defaultValue:r.defaultValue}),v=pe(c.value),h=k=>{v.value=k},d=pe(null),[p,g]=Fa(!1,{value:St(r,"open"),defaultValue:r.defaultOpen,postState:k=>r.disabled?!1:k,onChange:k=>{r.onOpenChange&&r.onOpenChange(k),!k&&d.value&&d.value.onClose&&d.value.onClose()}}),[y,m]=qv(v,{formatList:o,generateConfig:St(r,"generateConfig"),locale:St(r,"locale")}),[_,S,w]=Ky({valueTexts:y,onTextChange:k=>{const N=I2(k,{locale:r.locale,formatList:o.value,generateConfig:r.generateConfig});N&&(!r.disabledDate||!r.disabledDate(N))&&h(N)}}),x=k=>{const{onChange:N,generateConfig:B,locale:F}=r;h(k),f(k),N&&!il(B,c.value,k)&&N(k,k?Qt(k,{generateConfig:B,locale:F,format:o.value[0]}):"")},b=k=>{r.disabled&&k||g(k)},T=k=>p.value&&d.value&&d.value.onKeydown?d.value.onKeydown(k):!1,C=(...k)=>{r.onMouseup&&r.onMouseup(...k),a.value&&(a.value.focus(),b(!0))},[D,{focused:M,typing:L}]=jy({blurToCancel:i,open:p,value:_,triggerOpen:b,forwardKeydown:T,isClickOutside:k=>!D2([s.value,l.value,u.value],k),onSubmit:()=>!v.value||r.disabledDate&&r.disabledDate(v.value)?!1:(x(v.value),b(!1),w(),!0),onCancel:()=>{b(!1),h(c.value),w()},onKeydown:(k,N)=>{var B;(B=r.onKeydown)==null||B.call(r,k,N)},onFocus:k=>{var N;(N=r.onFocus)==null||N.call(r,k)},onBlur:k=>{var N;(N=r.onBlur)==null||N.call(r,k)}});sr([p,y],()=>{p.value||(h(c.value),!y.value.length||y.value[0]===""?S(""):m.value!==_.value&&w())}),sr(n,()=>{p.value||w()}),sr(c,()=>{h(c.value)});const[I,P,R]=Jy(_,{formatList:o,generateConfig:St(r,"generateConfig"),locale:St(r,"locale")}),E=(k,N)=>{(N==="submit"||N!=="key"&&!i.value)&&(x(k),b(!1))};f_({operationRef:d,hideHeader:Le(()=>n.value==="time"),panelRef:s,onSelect:E,open:p,defaultOpenValue:St(r,"defaultOpenValue"),onDateMouseenter:P,onDateMouseleave:R}),e({focus:()=>{a.value&&a.value.focus()},blur:()=>{a.value&&a.value.blur()}});const O=g2();return()=>{const{prefixCls:k="rc-picker",id:N,tabindex:B,dropdownClassName:F,dropdownAlign:H,popupStyle:j,transitionName:ee,generateConfig:ce,locale:Ae,inputReadOnly:Be,allowClear:he,autofocus:fe,picker:U="date",defaultOpenValue:z,suffixIcon:J,clearIcon:ie,disabled:W,placeholder:Q,getPopupContainer:re,panelRender:ge,onMousedown:ae,onMouseenter:te,onMouseleave:K,onContextmenu:Te,onClick:Ge,onSelect:Ke,direction:tt,autocomplete:Hr="off"}=r,xr={...r,...t,class:xt({[`${k}-panel-focused`]:!L.value}),style:void 0,pickerValue:void 0,onPickerValueChange:void 0,onChange:null};let Ia=Y(B2,Ye(xr,{generateConfig:ce,value:v.value,locale:Ae,tabindex:-1,onSelect:vr=>{Ke==null||Ke(vr),h(vr)},direction:tt}),null);ge&&(Ia=ge(Ia));const qd=Y("div",{class:`${k}-panel-container`,onMousedown:vr=>{vr.preventDefault()}},[Ia]);let $l;J&&($l=Y("span",{class:`${k}-suffix`},[J]));let jc;he&&c.value&&!W&&(jc=Y("span",{onMousedown:vr=>{vr.preventDefault(),vr.stopPropagation()},onMouseup:vr=>{vr.preventDefault(),vr.stopPropagation(),x(null),b(!1)},class:`${k}-clear`,role:"button"},[ie||Y("span",{class:`${k}-clear-btn`},null)]));const Wl={id:N,tabindex:B,disabled:W,readonly:Be||typeof o.value[0]=="function"||!L.value,value:I.value||_.value,onInput:vr=>{S(vr.target.value)},autofocus:fe,placeholder:Q,ref:a,title:_.value,...D.value,size:T2(U,o.value[0],ce),...k2(r),autocomplete:Hr},Kc=r.inputRender?r.inputRender(Wl):Y("input",Wl,null),jd=tt==="rtl"?"bottomRight":"bottomLeft";return Y(V2,{visible:p.value,popupStyle:j,prefixCls:k,dropdownClassName:F,dropdownAlign:H,getPopupContainer:re,transitionName:ee,popupPlacement:jd,direction:tt},{default:()=>[Y("div",{ref:u,class:xt(k,t.class,{[`${k}-disabled`]:W,[`${k}-focused`]:M.value,[`${k}-rtl`]:tt==="rtl"}),style:t.style,onMousedown:ae,onMouseup:C,onMouseenter:te,onMouseleave:K,onContextmenu:Te,onClick:Ge},[Y("div",{class:xt(`${k}-input`,{[`${k}-input-placeholder`]:!!I.value}),ref:l},[Kc,$l,jc]),O()])],popupElement:()=>qd})}}})}const OV=EV();function NV({picker:r,locale:t,selectedValue:e,disabledDate:a,disabled:n,generateConfig:i},o){const s=Le(()=>et(e.value,0)),l=Le(()=>et(e.value,1));function u(d){return i.value.locale.getWeekFirstDate(t.value.locale,d)}function c(d){const p=i.value.getYear(d),g=i.value.getMonth(d);return p*100+g}function f(d){const p=i.value.getYear(d),g=Zy(i.value,d);return p*10+g}return[d=>{var p;if(a&&((p=a==null?void 0:a.value)!=null&&p.call(a,d)))return!0;if(n[1]&&l)return!bn(i.value,d,l.value)&&i.value.isAfter(d,l.value);if(o.value[1]&&l.value)switch(r.value){case"quarter":return f(d)>f(l.value);case"month":return c(d)>c(l.value);case"week":return u(d)>u(l.value);default:return!bn(i.value,d,l.value)&&i.value.isAfter(d,l.value)}return!1},d=>{var p;if((p=a.value)!=null&&p.call(a,d))return!0;if(n[0]&&s)return!bn(i.value,d,l.value)&&i.value.isAfter(s.value,d);if(o.value[0]&&s.value)switch(r.value){case"quarter":return f(d)yV(a,o,s));case"quarter":case"month":return i((o,s)=>nd(a,o,s));default:return i((o,s)=>p_(a,o,s))}}function VV(r,t,e,a){const n=et(r,0),i=et(r,1);if(t===0)return n;if(n&&i)switch(BV(n,i,e,a)){case"same":return n;case"closing":return n;default:return Gu(i,e,a,-1)}return n}function zV({values:r,picker:t,defaultDates:e,generateConfig:a}){const n=pe([et(e,0),et(e,1)]),i=pe(null),o=Le(()=>et(r.value,0)),s=Le(()=>et(r.value,1)),l=v=>n.value[v]?n.value[v]:et(i.value,v)||VV(r.value,v,t.value,a.value)||o.value||s.value||a.value.getNow(),u=pe(null),c=pe(null);c2(()=>{u.value=l(0),c.value=l(1)});function f(v,h){if(v){let d=Xr(i.value,v,h);n.value=Xr(n.value,null,h)||[null,null];const p=(h+1)%2;et(r.value,p)||(d=Xr(d,v,p)),i.value=d}else(o.value||s.value)&&(i.value=null)}return[u,c,f]}function mw(r,t){return r&&r[0]&&r[1]&&t.isAfter(r[0],r[1])?[r[1],r[0]]:r}function _w(r,t,e,a){return!!(r||a&&a[t]||e[(t+1)%2])}function FV(){return Ta({name:"RangerPicker",inheritAttrs:!1,props:["prefixCls","id","popupStyle","dropdownClassName","transitionName","dropdownAlign","getPopupContainer","generateConfig","locale","placeholder","autofocus","disabled","format","picker","showTime","showNow","showHour","showMinute","showSecond","use12Hours","separator","value","defaultValue","defaultPickerValue","open","defaultOpen","disabledDate","disabledTime","dateRender","panelRender","ranges","allowEmpty","allowClear","suffixIcon","clearIcon","pickerRef","inputReadOnly","mode","renderExtraFooter","onChange","onOpenChange","onPanelChange","onCalendarChange","onFocus","onBlur","onMousedown","onMouseup","onMouseenter","onMouseleave","onClick","onOk","onKeydown","components","order","direction","activePickerIndex","autocomplete","minuteStep","hourStep","secondStep","hideDisabledOptions","disabledMinutes"],setup(r,{attrs:t,expose:e}){const a=Le(()=>r.picker==="date"&&!!r.showTime||r.picker==="time"),n=g2(),i=pe({}),o=pe(null),s=pe(null),l=pe(null),u=pe(null),c=pe(null),f=pe(null),v=pe(null),h=pe(null),d=Le(()=>P2(C2(r.format,r.picker,r.showTime,r.use12Hours))),[p,g]=Fa(0,{value:St(r,"activePickerIndex")}),y=pe(null),m=Le(()=>{const{disabled:le}=r;return Array.isArray(le)?le:[le||!1,le||!1]}),[_,S]=Fa(null,{value:St(r,"value"),defaultValue:r.defaultValue,postState:le=>r.picker==="time"&&!r.order?le:mw(le,r.generateConfig)}),[w,x,b]=zV({values:_,picker:St(r,"picker"),defaultDates:r.defaultPickerValue,generateConfig:St(r,"generateConfig")}),[T,C]=Fa(_.value,{postState:le=>{let Ee=le;if(m.value[0]&&m.value[1])return Ee;for(let Ie=0;Ie<2;Ie+=1)m[Ie]&&!et(Ee,Ie)&&!et(r.allowEmpty,Ie)&&(Ee=Xr(Ee,r.generateConfig.getNow(),Ie));return Ee}}),[D,M]=Fa([r.picker,r.picker],{value:St(r,"mode")});sr(()=>r.picker,()=>{M([r.picker,r.picker])});const L=(le,Ee)=>{var Ie;M(le),(Ie=r.onPanelChange)==null||Ie.call(r,Ee,le)},[I,P]=NV({picker:St(r,"picker"),selectedValue:T,locale:St(r,"locale"),disabled:m,disabledDate:St(r,"disabledDate"),generateConfig:St(r,"generateConfig")},i),[R,E]=Fa(!1,{value:St(r,"open"),defaultValue:r.defaultOpen,postState:le=>m.value[p.value]?!1:le,onChange:le=>{var Ee;(Ee=r.onOpenChange)==null||Ee.call(r,le),!le&&y.value&&y.value.onClose&&y.value.onClose()}}),O=Le(()=>R.value&&p.value===0),k=Le(()=>R.value&&p.value===1),N=pe(0);sr(R,()=>{!R.value&&o.value&&(N.value=o.value.offsetWidth)});const B=pe();function F(le,Ee){if(le)clearTimeout(B.value),i.value[Ee]=!0,g(Ee),E(le),R.value||b(null,Ee);else if(p.value===Ee){E(le);const Ie=i.value;B.value=setTimeout(()=>{Ie===i.value&&(i.value={})})}}function H(le){F(!0,le),setTimeout(()=>{const Ee=[f,v][le];Ee.value&&Ee.value.focus()},0)}function j(le,Ee){let Ie=le,vt=et(Ie,0),hr=et(Ie,1);const{generateConfig:br,locale:Wn,picker:$r,order:Yl,onCalendarChange:Yn,allowEmpty:Fi,onChange:Wt,showTime:un}=r;vt&&hr&&br.isAfter(vt,hr)&&($r==="week"&&!A2(br,Wn.locale,vt,hr)||$r==="quarter"&&!M2(br,vt,hr)||$r!=="week"&&$r!=="quarter"&&$r!=="time"&&!(un?il(br,vt,hr):bn(br,vt,hr))?(Ee===0?(Ie=[vt,null],hr=null):(vt=null,Ie=[null,hr]),i.value={[Ee]:!0}):($r!=="time"||Yl!==!1)&&(Ie=mw(Ie,br))),C(Ie);const Un=Ie&&Ie[0]?Qt(Ie[0],{generateConfig:br,locale:Wn,format:d.value[0]}):"",Ul=Ie&&Ie[1]?Qt(Ie[1],{generateConfig:br,locale:Wn,format:d.value[0]}):"";Yn&&Yn(Ie,[Un,Ul],{range:Ee===0?"start":"end"});const Jc=_w(vt,0,m.value,Fi),Jd=_w(hr,1,m.value,Fi);(Ie===null||Jc&&Jd)&&(S(Ie),Wt&&(!il(br,et(_.value,0),vt)||!il(br,et(_.value,1),hr))&&Wt(Ie,[Un,Ul]));let cn=null;Ee===0&&!m.value[1]?cn=1:Ee===1&&!m.value[0]&&(cn=0),cn!==null&&cn!==p.value&&(!i.value[cn]||!et(Ie,cn))&&et(Ie,Ee)?H(cn):F(!1,Ee)}const ee=le=>R&&y.value&&y.value.onKeydown?y.value.onKeydown(le):!1,ce={formatList:d,generateConfig:St(r,"generateConfig"),locale:St(r,"locale")},[Ae,Be]=qv(Le(()=>et(T.value,0)),ce),[he,fe]=qv(Le(()=>et(T.value,1)),ce),U=(le,Ee)=>{const Ie=I2(le,{locale:r.locale,formatList:d.value,generateConfig:r.generateConfig});Ie&&!(Ee===0?I:P)(Ie)&&(C(Xr(T.value,Ie,Ee)),b(Ie,Ee))},[z,J,ie]=Ky({valueTexts:Ae,onTextChange:le=>U(le,0)}),[W,Q,re]=Ky({valueTexts:he,onTextChange:le=>U(le,1)}),[ge,ae]=fw(null),[te,K]=fw(null),[Te,Ge,Ke]=Jy(z,ce),[tt,Hr,xr]=Jy(W,ce),Ia=le=>{K(Xr(T.value,le,p.value)),p.value===0?Ge(le):Hr(le)},qd=()=>{K(Xr(T.value,null,p.value)),p.value===0?Ke():xr()},$l=(le,Ee)=>({forwardKeydown:ee,onBlur:Ie=>{var vt;(vt=r.onBlur)==null||vt.call(r,Ie)},isClickOutside:Ie=>!D2([s.value,l.value,u.value,o.value],Ie),onFocus:Ie=>{var vt;g(le),(vt=r.onFocus)==null||vt.call(r,Ie)},triggerOpen:Ie=>{F(Ie,le)},onSubmit:()=>{if(!T.value||r.disabledDate&&r.disabledDate(T.value[le]))return!1;j(T.value,le),Ee()},onCancel:()=>{F(!1,le),C(_.value),Ee()}}),[jc,{focused:Wl,typing:Kc}]=jy({...$l(0,ie),blurToCancel:a,open:O,value:z,onKeydown:(le,Ee)=>{var Ie;(Ie=r.onKeydown)==null||Ie.call(r,le,Ee)}}),[jd,{focused:vr,typing:ew}]=jy({...$l(1,re),blurToCancel:a,open:k,value:W,onKeydown:(le,Ee)=>{var Ie;(Ie=r.onKeydown)==null||Ie.call(r,le,Ee)}}),AN=le=>{var Ee;(Ee=r.onClick)==null||Ee.call(r,le),!R.value&&!f.value.contains(le.target)&&!v.value.contains(le.target)&&(m.value[0]?m.value[1]||H(1):H(0))},IN=le=>{var Ee;(Ee=r.onMousedown)==null||Ee.call(r,le),R.value&&(Wl.value||vr.value)&&!f.value.contains(le.target)&&!v.value.contains(le.target)&&le.preventDefault()},LN=Le(()=>{var le;return(le=_.value)!=null&&le[0]?Qt(_.value[0],{locale:r.locale,format:"YYYYMMDDHHmmss",generateConfig:r.generateConfig}):""}),PN=Le(()=>{var le;return(le=_.value)!=null&&le[1]?Qt(_.value[1],{locale:r.locale,format:"YYYYMMDDHHmmss",generateConfig:r.generateConfig}):""});sr([R,Ae,he],()=>{R.value||(C(_.value),!Ae.value.length||Ae.value[0]===""?J(""):Be.value!==z.value&&ie(),!he.value.length||he.value[0]===""?Q(""):fe.value!==W.value&&re())}),sr([LN,PN],()=>{C(_.value)}),e({focus:()=>{f.value&&f.value.focus()},blur:()=>{f.value&&f.value.blur(),v.value&&v.value.blur()}});const kN=Le(()=>Object.keys(r.ranges||{}).map(le=>{const Ee=r.ranges[le],Ie=typeof Ee=="function"?Ee():Ee;return{label:le,onClick:()=>{j(Ie,null),F(!1,p.value)},onMouseenter:()=>{ae(Ie)},onMouseleave:()=>{ae(null)}}})),RN=Le(()=>R.value&&te.value&&te.value[0]&&te.value[1]&&r.generateConfig.isAfter(te.value[1],te.value[0])?te.value:null);function Kd(le=!1,Ee={}){const{generateConfig:Ie,showTime:vt,dateRender:hr,direction:br,disabledTime:Wn,prefixCls:$r,locale:Yl}=r;let Yn=vt;if(vt&&typeof vt=="object"&&vt.defaultValue){const Wt=vt.defaultValue;Yn={...vt,defaultValue:et(Wt,p.value)||void 0}}let Fi=null;return hr&&(Fi=({current:Wt,today:un})=>hr({current:Wt,today:un,info:{range:p.value?"end":"start"}})),Y(CV,{value:{inRange:!0,panelPosition:le,rangedValue:ge.value||T.value,hoverRangedValue:RN.value}},{default:()=>[Y(B2,Ye(r,Ee,{dateRender:Fi,showTime:Yn,mode:D.value[p.value],generateConfig:Ie,style:void 0,direction:br,disabledDate:p.value===0?I:P,disabledTime:Wt=>Wn?Wn(Wt,p.value===0?"start":"end"):!1,class:xt({[`${$r}-panel-focused`]:p.value===0?!Kc.value:!ew.value}),value:et(T.value,p.value),locale:Yl,tabIndex:-1,onPanelChange:(Wt,un)=>{p.value===0&&Ke(!0),p.value===1&&xr(!0),L(Xr(D.value,un,p.value),Xr(T.value,Wt,p.value));let Un=Wt;le==="right"&&D.value[p.value]===un&&(Un=Gu(Un,un,Ie,-1)),b(Un,p.value)},onOk:null,onSelect:void 0,onChange:void 0,defaultValue:p.value===0?et(T.value,1):et(T.value,0)}),null)]})}const EN=(le,Ee)=>{const Ie=Xr(T.value,le,p.value);Ee==="submit"||Ee!=="key"&&!a.value?(j(Ie,p.value),p.value===0?Ke():xr()):C(Ie)};return f_({operationRef:y,hideHeader:Le(()=>r.picker==="time"),onDateMouseenter:Ia,onDateMouseleave:qd,hideRanges:Le(()=>!0),onSelect:EN,open:R}),()=>{const{prefixCls:le="rc-picker",id:Ee,popupStyle:Ie,dropdownClassName:vt,transitionName:hr,dropdownAlign:br,getPopupContainer:Wn,generateConfig:$r,locale:Yl,placeholder:Yn,autofocus:Fi,picker:Wt="date",showTime:un,separator:Un="~",disabledDate:Ul,panelRender:Jc,allowClear:Jd,suffixIcon:Qd,clearIcon:cn,inputReadOnly:ep,renderExtraFooter:ON,onMouseenter:NN,onMouseleave:BN,onMouseup:VN,onOk:tw,components:zN,direction:gs,autocomplete:rw="off"}=r;let Gi=0,aw=0;p.value&&l.value&&c.value&&s.value&&(Gi=l.value.offsetWidth+c.value.offsetWidth,s.value.offsetWidth&&h.value.offsetWidth&&Gi>s.value.offsetWidth-h.value.offsetWidth-(gs==="rtl"||h.value.offsetLeft>Gi?0:h.value.offsetLeft)&&(aw=Gi));const FN=gs==="rtl"?{right:`${Gi}px`}:{left:`${Gi}px`};function GN(){let Cr;const Zn=O2(le,D.value[p.value],ON),sw=N2({prefixCls:le,components:zN,needConfirmButton:a.value,okDisabled:!et(T.value,p.value)||Ul&&Ul(T.value[p.value]),locale:Yl,rangeList:kN.value,onOk:()=>{et(T.value,p.value)&&(j(T.value,p.value),tw&&tw(T.value))}});if(Wt!=="time"&&!un){const Qc=p.value===0?w.value:x.value,WN=Gu(Qc,Wt,$r),np=D.value[p.value]===Wt,lw=Kd(np?"left":!1,{pickerValue:Qc,onPickerValueChange:ip=>{b(ip,p.value)}}),uw=Kd("right",{pickerValue:WN,onPickerValueChange:ip=>{b(Gu(ip,Wt,$r,-1),p.value)}});gs==="rtl"?Cr=Y(ea,null,[uw,np&&lw]):Cr=Y(ea,null,[lw,np&&uw])}else Cr=Kd();let ap=Y(ea,null,[Y("div",{class:`${le}-panels`},[Cr]),(Zn||sw)&&Y("div",{class:`${le}-footer`},[Zn,sw])]);return Jc&&(ap=Jc(ap)),Y("div",{class:`${le}-panel-container`,style:{marginLeft:`${aw}px`},ref:s,onMousedown:Qc=>{Qc.preventDefault()}},[ap])}const HN=Y("div",{class:xt(`${le}-range-wrapper`,`${le}-${Wt}-range-wrapper`),style:{minWidth:`${N.value}px`}},[Y("div",{ref:h,class:`${le}-range-arrow`,style:FN},null),GN()]);let nw;Qd&&(nw=Y("span",{class:`${le}-suffix`},[Qd]));let iw;Jd&&(et(_.value,0)&&!m.value[0]||et(_.value,1)&&!m.value[1])&&(iw=Y("span",{onMousedown:Cr=>{Cr.preventDefault(),Cr.stopPropagation()},onMouseup:Cr=>{Cr.preventDefault(),Cr.stopPropagation();let Zn=_.value;m.value[0]||(Zn=Xr(Zn,null,0)),m.value[1]||(Zn=Xr(Zn,null,1)),j(Zn,null),F(!1,p.value)},class:`${le}-clear`},[cn||Y("span",{class:`${le}-clear-btn`},null)]));const ow={size:T2(Wt,d.value[0],$r)};let tp=0,rp=0;l.value&&u.value&&c.value&&(p.value===0?rp=l.value.offsetWidth:(tp=Gi,rp=u.value.offsetWidth));const $N=gs==="rtl"?{right:`${tp}px`}:{left:`${tp}px`};return Y(V2,{visible:R.value,popupStyle:Ie,prefixCls:le,dropdownClassName:vt,dropdownAlign:br,getPopupContainer:Wn,transitionName:hr,range:!0,direction:gs},{default:()=>[Y("div",Ye({ref:o,class:xt(le,`${le}-range`,t.class,{[`${le}-disabled`]:m.value[0]&&m.value[1],[`${le}-focused`]:p.value===0?Wl.value:vr.value,[`${le}-rtl`]:gs==="rtl"}),style:t.style,onClick:AN,onMouseenter:NN,onMouseleave:BN,onMousedown:IN,onMouseup:VN},k2(r)),[Y("div",{class:xt(`${le}-input`,{[`${le}-input-active`]:p.value===0,[`${le}-input-placeholder`]:!!Te.value}),ref:l},[Y("input",Ye({id:Ee,disabled:m.value[0],readonly:ep||typeof d.value[0]=="function"||!Kc.value,value:Te.value||z.value,onInput:Cr=>{J(Cr.target.value)},autofocus:Fi,placeholder:et(Yn,0)||"",ref:f},jc.value,ow,{autocomplete:rw}),null)]),Y("div",{class:`${le}-range-separator`,ref:c},[Un]),Y("div",{class:xt(`${le}-input`,{[`${le}-input-active`]:p.value===1,[`${le}-input-placeholder`]:!!tt.value}),ref:u},[Y("input",Ye({disabled:m.value[1],readonly:ep||typeof d.value[0]=="function"||!ew.value,value:tt.value||W.value,onInput:Cr=>{Q(Cr.target.value)},placeholder:et(Yn,1)||"",ref:v},jd.value,ow,{autocomplete:rw}),null)]),Y("div",{class:`${le}-active-bar`,style:{...$N,width:`${rp}px`,position:"absolute"}},null),nw,iw,n()])],popupElement:()=>HN})}}})}const GV=FV(),z2={lang:{placeholder:"Select date",yearPlaceholder:"Select year",quarterPlaceholder:"Select quarter",monthPlaceholder:"Select month",weekPlaceholder:"Select week",rangePlaceholder:["Start date","End date"],rangeYearPlaceholder:["Start year","End year"],rangeQuarterPlaceholder:["Start quarter","End quarter"],rangeMonthPlaceholder:["Start month","End month"],rangeWeekPlaceholder:["Start week","End week"],...qN},timePickerLocale:{...jN}};function HV(r,t,e){return e!==void 0?e:r==="year"&&t.lang.yearPlaceholder?t.lang.yearPlaceholder:r==="quarter"&&t.lang.quarterPlaceholder?t.lang.quarterPlaceholder:r==="month"&&t.lang.monthPlaceholder?t.lang.monthPlaceholder:r==="week"&&t.lang.weekPlaceholder?t.lang.weekPlaceholder:r==="time"&&t.timePickerLocale.placeholder?t.timePickerLocale.placeholder:t.lang.placeholder}function $V(r,t,e){return e!==void 0?e:r==="year"&&t.lang.yearPlaceholder?t.lang.rangeYearPlaceholder:r==="month"&&t.lang.monthPlaceholder?t.lang.rangeMonthPlaceholder:r==="week"&&t.lang.weekPlaceholder?t.lang.rangeWeekPlaceholder:r==="time"&&t.timePickerLocale.placeholder?t.timePickerLocale.rangePlaceholder:t.lang.rangePlaceholder}function F2(){return{id:String,dropdownClassName:String,dropdownAlign:{type:Object},popupStyle:{type:Object},transitionName:String,placeholder:String,allowClear:{type:Boolean,default:void 0},autofocus:{type:Boolean,default:void 0},disabled:{type:Boolean,default:void 0},tabindex:Number,open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:void 0},inputReadOnly:{type:Boolean,default:void 0},getPopupContainer:{type:Function},panelRender:{type:Function},onChange:{type:Function},"onUpdate:value":{type:Function},onOk:{type:Function},onOpenChange:{type:Function},"onUpdate:open":{type:Function},onFocus:{type:Function},onBlur:{type:Function},onMousedown:{type:Function},onMouseup:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onClick:{type:Function},onContextmenu:{type:Function},onKeydown:{type:Function},role:String,name:String,autocomplete:String,direction:{type:String},showToday:{type:Boolean,default:void 0},showTime:{type:[Boolean,Object],default:void 0},locale:{type:Object},size:{type:String},bordered:{type:Boolean,default:void 0},dateRender:{type:Function},disabledDate:{type:Function},mode:{type:String},picker:{type:String},valueFormat:String,disabledHours:Function,disabledMinutes:Function,disabledSeconds:Function}}function WV(){return{defaultPickerValue:{type:[String,Object]},defaultValue:{type:[String,Object]},value:{type:[String,Object]},disabledTime:{type:Function},format:{type:[String,Function,Array]},renderExtraFooter:{type:Function},showNow:{type:Boolean,default:void 0},monthCellRender:{type:Function},monthCellContentRender:{type:Function}}}function YV(){return{allowEmpty:{type:Array},dateRender:{type:Function},defaultPickerValue:{type:Array},defaultValue:{type:Array},value:{type:Array},disabledTime:{type:Function},disabled:{type:[Boolean,Array]},format:String,renderExtraFooter:{type:Function},separator:{type:String},ranges:{type:Object},placeholder:Array,mode:{type:Array},onChange:{type:Function},"onUpdate:value":{type:Function},onCalendarChange:{type:Function},onPanelChange:{type:Function},onOk:{type:Function}}}function UV(r,t){function e(u,c){const f={...F2(),...WV(),...t};return Ta({name:c,inheritAttrs:!1,props:f,slots:["suffixIcon","prevIcon","nextIcon","superPrevIcon","superNextIcon","dateRender","renderExtraFooter","monthCellRender"],setup(v,{slots:h,expose:d,attrs:p,emit:g}){const y=v,m=_2();Wy(!(y.monthCellContentRender||h.monthCellContentRender),"DatePicker",'`monthCellContentRender` is deprecated. Please use `monthCellRender"` instead.'),Wy(!p.getCalendarContainer,"DatePicker",'`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.');const{prefixCls:_,direction:S,getPopupContainer:w,size:x,rootPrefixCls:b}=h2("picker",y),T=pe();d({focus:()=>{var B;(B=T.value)==null||B.focus()},blur:()=>{var B;(B=T.value)==null||B.blur()}});const C=B=>y.valueFormat?r.toString(B,y.valueFormat):B,D=(B,F)=>{const H=C(B);g("update:value",H),g("change",H,F),m.onFieldChange()},M=B=>{g("update:open",B),g("openChange",B)},L=B=>{g("focus",B)},I=B=>{g("blur",B),m.onFieldBlur()},P=(B,F)=>{const H=C(B);g("panelChange",H,F)},R=B=>{const F=C(B);g("ok",F)},[E]=d2("DatePicker",z2),O=Le(()=>y.value?y.valueFormat?r.toDate(y.value,y.valueFormat):y.value:y.value===""?void 0:y.value),k=Le(()=>y.defaultValue?y.valueFormat?r.toDate(y.defaultValue,y.valueFormat):y.defaultValue:y.defaultValue===""?void 0:y.defaultValue),N=Le(()=>y.defaultPickerValue?y.valueFormat?r.toDate(y.defaultPickerValue,y.valueFormat):y.defaultPickerValue:y.defaultPickerValue===""?void 0:y.defaultPickerValue);return()=>{var te,K,Te,Ge,Ke,tt;const B={...E.value,...y.locale},F={...y,...p},{bordered:H=!0,placeholder:j,suffixIcon:ee=(te=h.suffixIcon)==null?void 0:te.call(h),showToday:ce=!0,transitionName:Ae,allowClear:Be=!0,dateRender:he=h.dateRender,renderExtraFooter:fe=h.renderExtraFooter,monthCellRender:U=h.monthCellRender||y.monthCellContentRender||h.monthCellContentRender,clearIcon:z=(K=h.clearIcon)==null?void 0:K.call(h),id:J=m.id.value,...ie}=F,W=F.showTime===""?!0:F.showTime,{format:Q}=F;let re={};u&&(re.picker=u);const ge=u||F.picker||"date";re={...re,...W?jv({format:Q,picker:ge,...typeof W=="object"?W:{}}):{},...ge==="time"?jv({format:Q,...ie,picker:ge}):{}};const ae=_.value;return Y(OV,Ye({monthCellRender:U,dateRender:he,renderExtraFooter:fe,ref:T,placeholder:HV(ge,B,j),suffixIcon:ee||(ge==="time"?Y(y2,null,null):Y(m2,null,null)),clearIcon:z||Y(p2,null,null),allowClear:Be,transitionName:Ae||`${b.value}-slide-up`},ie,re,{id:J,picker:ge,value:O.value,defaultValue:k.value,defaultPickerValue:N.value,showToday:ce,locale:B.lang,class:xt({[`${ae}-${x.value}`]:x.value,[`${ae}-borderless`]:!H},p.class),prefixCls:ae,getPopupContainer:p.getCalendarContainer||w.value,generateConfig:r,prevIcon:((Te=h.prevIcon)==null?void 0:Te.call(h))||Y("span",{class:`${ae}-prev-icon`},null),nextIcon:((Ge=h.nextIcon)==null?void 0:Ge.call(h))||Y("span",{class:`${ae}-next-icon`},null),superPrevIcon:((Ke=h.superPrevIcon)==null?void 0:Ke.call(h))||Y("span",{class:`${ae}-super-prev-icon`},null),superNextIcon:((tt=h.superNextIcon)==null?void 0:tt.call(h))||Y("span",{class:`${ae}-super-next-icon`},null),components:G2,direction:S.value,onChange:D,onOpenChange:M,onFocus:L,onBlur:I,onPanelChange:P,onOk:R}),null)}}})}const a=e(void 0,"ADatePicker"),n=e("week","AWeekPicker"),i=e("month","AMonthPicker"),o=e("year","AYearPicker"),s=e("time","TimePicker"),l=e("quarter","AQuarterPicker");return{DatePicker:a,WeekPicker:n,MonthPicker:i,YearPicker:o,TimePicker:s,QuarterPicker:l}}function ZV(r,t){return Ta({name:"ARangePicker",inheritAttrs:!1,props:{...F2(),...YV(),...t},slots:["suffixIcon","prevIcon","nextIcon","superPrevIcon","superNextIcon","dateRender","renderExtraFooter"],setup(a,{expose:n,slots:i,attrs:o,emit:s}){const l=a,u=_2();Wy(!o.getCalendarContainer,"DatePicker",'`getCalendarContainer` is deprecated. Please use `getPopupContainer"` instead.');const{prefixCls:c,direction:f,getPopupContainer:v,size:h,rootPrefixCls:d}=h2("picker",l),p=pe();n({focus:()=>{var L;(L=p.value)==null||L.focus()},blur:()=>{var L;(L=p.value)==null||L.blur()}});const g=L=>l.valueFormat?r.toString(L,l.valueFormat):L,y=(L,I)=>{const P=g(L);s("update:value",P),s("change",P,I),u.onFieldChange()},m=L=>{s("update:open",L),s("openChange",L)},_=L=>{s("focus",L)},S=L=>{s("blur",L),u.onFieldBlur()},w=(L,I)=>{const P=g(L);s("panelChange",P,I)},x=L=>{const I=g(L);s("ok",I)},b=(L,I,P)=>{const R=g(L);s("calendarChange",R,I,P)},[T]=d2("DatePicker",z2),C=Le(()=>l.value&&l.valueFormat?r.toDate(l.value,l.valueFormat):l.value),D=Le(()=>l.defaultValue&&l.valueFormat?r.toDate(l.defaultValue,l.valueFormat):l.defaultValue),M=Le(()=>l.defaultPickerValue&&l.valueFormat?r.toDate(l.defaultPickerValue,l.valueFormat):l.defaultPickerValue);return()=>{var z,J,ie,W,Q,re,ge;const L={...T.value,...l.locale},I={...l,...o},{prefixCls:P,bordered:R=!0,placeholder:E,suffixIcon:O=(z=i.suffixIcon)==null?void 0:z.call(i),picker:k="date",transitionName:N,allowClear:B=!0,dateRender:F=i.dateRender,renderExtraFooter:H=i.renderExtraFooter,separator:j=(J=i.separator)==null?void 0:J.call(i),clearIcon:ee=(ie=i.clearIcon)==null?void 0:ie.call(i),id:ce=u.id.value,...Ae}=I;delete Ae["onUpdate:value"],delete Ae["onUpdate:open"];const{format:Be,showTime:he}=I;let fe={};fe={...fe,...he?jv({format:Be,picker:k,...he}):{},...k==="time"?jv({format:Be,...mB(Ae,["disabledTime"]),picker:k}):{}};const U=c.value;return Y(GV,Ye({dateRender:F,renderExtraFooter:H,separator:j||Y("span",{"aria-label":"to",class:`${U}-separator`},[Y(gB,null,null)]),ref:p,placeholder:$V(k,L,E),suffixIcon:O||(k==="time"?Y(y2,null,null):Y(m2,null,null)),clearIcon:ee||Y(p2,null,null),allowClear:B,transitionName:N||`${d.value}-slide-up`},Ae,fe,{id:ce,value:C.value,defaultValue:D.value,defaultPickerValue:M.value,picker:k,class:xt({[`${U}-${h.value}`]:h.value,[`${U}-borderless`]:!R},o.class),locale:L.lang,prefixCls:U,getPopupContainer:o.getCalendarContainer||v.value,generateConfig:r,prevIcon:((W=i.prevIcon)==null?void 0:W.call(i))||Y("span",{class:`${U}-prev-icon`},null),nextIcon:((Q=i.nextIcon)==null?void 0:Q.call(i))||Y("span",{class:`${U}-next-icon`},null),superPrevIcon:((re=i.superPrevIcon)==null?void 0:re.call(i))||Y("span",{class:`${U}-super-prev-icon`},null),superNextIcon:((ge=i.superNextIcon)==null?void 0:ge.call(i))||Y("span",{class:`${U}-super-next-icon`},null),components:G2,direction:f.value,onChange:y,onOpenChange:m,onFocus:_,onBlur:S,onPanelChange:w,onOk:x,onCalendarChange:b}),null)}}})}const G2={button:iV,rangeItem:oV};function XV(r){return r?Array.isArray(r)?r:[r]:[]}function jv(r){const{format:t,picker:e,showHour:a,showMinute:n,showSecond:i,use12Hours:o}=r,s=XV(t)[0],l={...r};return s&&typeof s=="string"&&(!s.includes("s")&&i===void 0&&(l.showSecond=!1),!s.includes("m")&&n===void 0&&(l.showMinute=!1),!s.includes("H")&&!s.includes("h")&&a===void 0&&(l.showHour=!1),(s.includes("a")||s.includes("A"))&&o===void 0&&(l.use12Hours=!0)),e==="time"?l:(typeof s=="function"&&delete l.format,{showTime:l})}function qV(r,t){const{DatePicker:e,WeekPicker:a,MonthPicker:n,YearPicker:i,TimePicker:o,QuarterPicker:s}=UV(r,t),l=ZV(r,t);return{DatePicker:e,WeekPicker:a,MonthPicker:n,YearPicker:i,TimePicker:o,QuarterPicker:s,RangePicker:l}}const{DatePicker:up,WeekPicker:cp,MonthPicker:fp,YearPicker:jV,TimePicker:KV,QuarterPicker:vp,RangePicker:hp}=qV(nV),JV=Object.assign(up,{WeekPicker:cp,MonthPicker:fp,YearPicker:jV,RangePicker:hp,TimePicker:KV,QuarterPicker:vp,install:r=>(r.component(up.name,up),r.component(hp.name,hp),r.component(fp.name,fp),r.component(cp.name,cp),r.component(vp.name,vp),r)}),_s=Ta({__name:"InputDatePicker",props:{value:{default:""}},emits:["update:value"],setup(r,{emit:t}){const e=r,a=Le({set:n=>{let i=n;i&&(i=n.calendar("gregory").locale("en").format("YYYY/MM/DD")),t("update:value",i)},get:()=>{if(typeof e.value=="string")return e.value?yt(e.value):null}});return(n,i)=>(Ot(),al(rt(JV),{class:"w-full",inputReadOnly:"",locale:rt(HB),size:"large",value:a.value,"onUpdate:value":i[0]||(i[0]=o=>a.value=o)},null,8,["locale","value"]))}}),QV=async()=>await KN.get("/admin/report"),ez=async r=>{const{type:t,item_id:e,date:a,startDate:n,endDate:i,statType:o="cumulative_viewers"}=r,s=a?new Date(a):new Date;if(t==="hourly"){let l,u;if(n&&i?(l=n,u=i):(l=s.toISOString().split("T")[0],u=l),o==="cumulative_viewers"){const c=new Date(u);c.setHours(23,59,59,999);let f=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").lte("viewed_at",c.toISOString()).not("user_id","is",null).order("viewed_at");e&&(f=f.eq("item_id",e));const{data:v,error:h}=await f;if(h)throw h;if(!v||v.length===0)return[];const d=new Date(l);d.setHours(0,0,0,0);const p=[],g=new Date(d);for(;g<=c;){const m=g.toISOString().split("T")[0],_=g.getHours();p.push({day:m,hour:_}),g.setHours(g.getHours()+1)}return p.map(({day:m,hour:_})=>{const S=new Date(m);S.setHours(_,59,59,999);const w=new Set;return v.forEach(x=>{new Date(x.viewed_at)<=S&&w.add(x.user_id)}),{day:m,hour:_,views:w.size}})}else if(o==="total_views"){let c=Ne.from("user_views_hourly").select("*").eq("type","story").gte("day",l).lte("day",u).order("day").order("hour");e&&(c=c.eq("item_id",e));const{data:f,error:v}=await c;if(v)throw v;return f||[]}else{const c=new Date(l);c.setHours(0,0,0,0);const f=new Date(u);f.setHours(23,59,59,999);let v=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").gte("viewed_at",c.toISOString()).lte("viewed_at",f.toISOString()).not("user_id","is",null);e&&(v=v.eq("item_id",e));const{data:h,error:d}=await v;if(d)throw d;if(!h||h.length===0)return[];const p={};return h.forEach(g=>{const y=new Date(g.viewed_at),m=y.toISOString().split("T")[0],_=y.getHours(),S=`${m}_${_}`,w=g.user_id;p[S]||(p[S]=new Set),p[S].add(w)}),Object.keys(p).map(g=>{const[y,m]=g.split("_");return{day:y,hour:Number(m),views:p[g].size}})}}else if(t==="daily"){let l,u;if(n&&i)l=n,u=i;else{const c=new Date(s);c.setDate(s.getDate()-29),l=c.toISOString().split("T")[0],u=s.toISOString().split("T")[0]}if(o==="cumulative_viewers"){const c=new Date(u);c.setHours(23,59,59,999);let f=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").lte("viewed_at",c.toISOString()).not("user_id","is",null).order("viewed_at");e&&(f=f.eq("item_id",e));const{data:v,error:h}=await f;if(h)throw h;if(!v||v.length===0)return[];const d=[],p=new Date(l);for(;p<=c;)d.push(p.toISOString().split("T")[0]),p.setDate(p.getDate()+1);return d.map(y=>{const m=new Date(y);m.setHours(23,59,59,999);const _=new Set;return v.forEach(S=>{new Date(S.viewed_at)<=m&&_.add(S.user_id)}),{day:y,views:_.size}})}else if(o==="total_views"){let c=Ne.from("user_views_hourly").select("*").eq("type","story").gte("day",l).lte("day",u).order("day").order("hour");e&&(c=c.eq("item_id",e));const{data:f,error:v}=await c;if(v)throw v;return f||[]}else{const c=new Date(l);c.setHours(0,0,0,0);const f=new Date(u);f.setHours(23,59,59,999);let v=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").gte("viewed_at",c.toISOString()).lte("viewed_at",f.toISOString()).not("user_id","is",null);e&&(v=v.eq("item_id",e));const{data:h,error:d}=await v;if(d)throw d;if(!h||h.length===0)return[];const p={};return h.forEach(g=>{const m=new Date(g.viewed_at).toISOString().split("T")[0],_=g.user_id;p[m]||(p[m]=new Set),p[m].add(_)}),Object.keys(p).sort().map(g=>({day:g,views:p[g].size}))}}else if(t==="weekly"){let l,u;if(n&&i)l=n,u=i;else{const c=new Date(s);c.setDate(s.getDate()-84),l=c.toISOString().split("T")[0],u=s.toISOString().split("T")[0]}if(o==="cumulative_viewers"){const c=new Date(u);c.setHours(23,59,59,999);let f=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").lte("viewed_at",c.toISOString()).not("user_id","is",null).order("viewed_at");e&&(f=f.eq("item_id",e));const{data:v,error:h}=await f;if(h)throw h;if(!v||v.length===0)return[];const d=[],p=new Date(l);for(;p<=new Date(u);){const y=p.getDay();let m=0;y===0?m=1:y!==6&&(m=6-y);const _=new Date(p);_.setDate(p.getDate()-m);const S=_.toISOString().split("T")[0];d.includes(S)||d.push(S),p.setDate(p.getDate()+1)}return d.sort().map(y=>{const m=new Date(y);m.setDate(m.getDate()+5),m.setHours(23,59,59,999);const _=new Set;return v.forEach(S=>{new Date(S.viewed_at)<=m&&_.add(S.user_id)}),{day:y,views:_.size}})}else if(o==="total_views"){let c=Ne.from("user_views_hourly").select("*").eq("type","story").gte("day",l).lte("day",u).order("day").order("hour");e&&(c=c.eq("item_id",e));const{data:f,error:v}=await c;if(v)throw v;if(!f||f.length===0)return[];const h={};return f.forEach(d=>{const p=new Date(d.day+"T00:00:00"),g=p.getDay();let y=0;g===0?y=1:g!==6&&(y=6-g);const m=new Date(p);m.setDate(p.getDate()-y);const _=m.toISOString().split("T")[0];h[_]=(h[_]||0)+Number(d.views||0)}),Object.keys(h).sort().map(d=>({day:d,views:h[d]}))}else{const c=new Date(l);c.setHours(0,0,0,0);const f=new Date(u);f.setHours(23,59,59,999);let v=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").gte("viewed_at",c.toISOString()).lte("viewed_at",f.toISOString()).not("user_id","is",null);e&&(v=v.eq("item_id",e));const{data:h,error:d}=await v;if(d)throw d;if(!h||h.length===0)return[];const p={};return h.forEach(g=>{const y=new Date(g.viewed_at),m=y.getDay();let _=0;m===0?_=1:m!==6&&(_=6-m);const S=new Date(y);S.setDate(y.getDate()-_);const w=S.toISOString().split("T")[0],x=g.user_id;p[w]||(p[w]=new Set),p[w].add(x)}),Object.keys(p).sort().map(g=>({day:g,views:p[g].size}))}}else if(t==="monthly"){let l,u;if(n&&i)l=n,u=i;else{const c=new Date(s);c.setMonth(s.getMonth()-12),l=c.toISOString().split("T")[0],u=s.toISOString().split("T")[0]}if(o==="cumulative_viewers"){const c=new Date(u);c.setHours(23,59,59,999);let f=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").lte("viewed_at",c.toISOString()).not("user_id","is",null).order("viewed_at");e&&(f=f.eq("item_id",e));const{data:v,error:h}=await f;if(h)throw h;if(!v||v.length===0)return[];const d=[],p=new Date(l);for(;p<=new Date(u);){const y=nr(p),m=`${y.jYear()}-${String(y.jMonth()+1).padStart(2,"0")}`;d.includes(m)||d.push(m),p.setMonth(p.getMonth()+1)}return d.sort().map(y=>{const[m,_]=y.split("-"),S=nr().jYear(Number(m)).jMonth(Number(_)-1).endOf("jMonth").toDate();S.setHours(23,59,59,999);const w=new Set;return v.forEach(x=>{new Date(x.viewed_at)<=S&&w.add(x.user_id)}),{day:y,views:w.size}})}else if(o==="total_views"){let c=Ne.from("user_views_hourly").select("*").eq("type","story").gte("day",l).lte("day",u).order("day").order("hour");e&&(c=c.eq("item_id",e));const{data:f,error:v}=await c;if(v)throw v;if(!f||f.length===0)return[];const h={};return f.forEach(d=>{const p=new Date(d.day+"T00:00:00"),g=nr(p),y=`${g.jYear()}-${String(g.jMonth()+1).padStart(2,"0")}`;h[y]=(h[y]||0)+Number(d.views||0)}),Object.keys(h).sort().map(d=>({day:d,views:h[d]}))}else{const c=new Date(l);c.setHours(0,0,0,0);const f=new Date(u);f.setHours(23,59,59,999);let v=Ne.from("user_views").select("user_id, viewed_at").eq("type","story").gte("viewed_at",c.toISOString()).lte("viewed_at",f.toISOString()).not("user_id","is",null);e&&(v=v.eq("item_id",e));const{data:h,error:d}=await v;if(d)throw d;if(!h||h.length===0)return[];const p={};return h.forEach(g=>{const y=new Date(g.viewed_at),m=nr(y),_=`${m.jYear()}-${String(m.jMonth()+1).padStart(2,"0")}`,S=g.user_id;p[_]||(p[_]=new Set),p[_].add(S)}),Object.keys(p).sort().map(g=>({day:g,views:p[g].size}))}}},tz=async()=>{const r=new Date,t=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=new Date(t);e.setDate(e.getDate()+1);const a=t.toISOString(),n=e.toISOString(),[i,o]=await Promise.all([Ne.from("users").select("*",{count:"exact",head:!0}),Ne.from("users").select("*",{count:"exact",head:!0}).gte("created_at",a).lt("created_at",n)]);if(i.error)throw i.error;if(o.error)throw o.error;return{total:i.count||0,today:o.count||0}},rz=async()=>{const r=new Date,t=new Date(r);t.setDate(r.getDate()-7);const e=t.toISOString(),a=r.toISOString(),{count:n,error:i}=await Ne.from("users").select("*",{count:"exact",head:!0}).gte("created_at",e).lt("created_at",a);if(i)throw i;return n||0},az=async()=>{const r=new Date,t=new Date(r);t.setDate(r.getDate()-30);const e=t.toISOString(),a=r.toISOString(),{count:n,error:i}=await Ne.from("users").select("*",{count:"exact",head:!0}).gte("created_at",e).lt("created_at",a);if(i)throw i;return n||0},nz=async()=>{let r=0;const{data:t,error:e}=await Ne.rpc("get_views_stats",{target_type:"story",period:"month",group_by_user:!0}),{data:a,error:n}=await Ne.rpc("get_views_stats",{target_type:"story",period:"week",group_by_user:!0});return t==null||t.forEach(o=>{(o==null?void 0:o.views)>0&&(r+=o.views)}),{story_view_week:a!=null&&a.length?a[0].views:0,story_view_month:t!=null&&t.length?t[0].views:0,story_view_last_week:(a==null?void 0:a.length)>1?a[1].views:0,story_view_last_month:(t==null?void 0:t.length)>1?t[1].views:0,uniqAllStoryView:r}},iz=async()=>{const r=new Date,t=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=new Date(t);e.setDate(e.getDate()+1);const a=t.toISOString(),n=e.toISOString(),{data:i,error:o}=await Ne.from("user_views").select("user_id").eq("type","story").gte("viewed_at",a).lt("viewed_at",n).not("user_id","is",null);if(o)throw o;if(!i||i.length===0)return 0;const s=new Set;return i.forEach(l=>{l.user_id&&s.add(l.user_id)}),s.size},oz=async(r=10)=>{const t=new Date;t.toISOString().split("T")[0];const{data:e,error:a}=await Ne.from("storys").select("id, title, created_at").order("created_at",{ascending:!1}).limit(r+1);if(a)throw a;const n=e&&e.length>0?e[0].id:null,i=e&&e.length>0?e.slice(0,r):[],o=new Date(t);o.setDate(t.getDate()-15),o.setHours(0,0,0,0);const s=o.toISOString(),l=t.toISOString(),[u,c,f,v]=await Promise.all([Ne.from("user_views_hourly").select("views").eq("type","story"),Ne.from("user_views").select("user_id").eq("type","story").gte("viewed_at",s).lte("viewed_at",l).not("user_id","is",null),n?Ne.from("user_views_hourly").select("views").eq("type","story").eq("item_id",n):Promise.resolve({data:[],error:null}),i.length>0?Ne.from("user_views").select("item_id, user_id").eq("type","story").in("item_id",i.map(S=>S.id)).not("user_id","is",null):Promise.resolve({data:[],error:null})]);let h=0;u.data&&u.data.forEach(S=>{h+=Number((S==null?void 0:S.views)||0)});const d=new Map;c.data&&c.data.forEach(S=>{if(S.user_id){const w=d.get(S.user_id)||0;d.set(S.user_id,w+1)}});let p=0;d.forEach(S=>{S>=4&&p++});let g=0;f.data&&f.data.forEach(S=>{g+=Number((S==null?void 0:S.views)||0)});const y=new Map;v.data&&v.data.forEach(S=>{S.item_id&&S.user_id&&(y.has(S.item_id)||y.set(S.item_id,new Set),y.get(S.item_id).add(S.user_id))});const m=i.map(async S=>{var T;const{data:w}=await Ne.from("user_views_hourly").select("views").eq("type","story").eq("item_id",S.id);let x=0;w&&w.forEach(C=>{x+=Number((C==null?void 0:C.views)||0)});const b=((T=y.get(S.id))==null?void 0:T.size)||0;return{id:S.id,title:S.title||"بدون عنوان",unique_viewers:b,total_views:x,created_at:S.created_at}}),_=await Promise.all(m);return{total_story_views:h,unique_story_viewers:p,latest_story_views:g,story_views_stats:_.sort((S,w)=>{const x=new Date(S.created_at).getTime();return new Date(w.created_at).getTime()-x})}},sz=async()=>{const{data:r,error:t}=await Ne.rpc("get_views_stats",{target_type:"app-view",period:"month",group_by_user:!0}),{data:e,error:a}=await Ne.rpc("get_views_stats",{target_type:"app-view",period:"week",group_by_user:!0});return{active_users_week:e!=null&&e.length?e[0].views:0,active_users_month:r!=null&&r.length?r[0].views:0,active_users_last_week:(e==null?void 0:e.length)>1?e[1].views:0,active_users_last_month:(r==null?void 0:r.length)>1?r[1].views:0}},lz=async()=>{const r=new Date,t=r.getDay(),e=r.getHours(),a=r.getMinutes(),n=r.getSeconds();if(t===5&&e>=23&&a>=59&&n>=59||t===6&&e===0&&a===0&&n===0)return 0;let i=0;t===0?i=1:t===6?i=0:i=6-t;const o=new Date(r);o.setDate(r.getDate()-i),o.setHours(0,0,0,0);const s=o.toISOString(),l=r.toISOString(),{data:u,error:c}=await Ne.from("user_views").select("user_id").gte("viewed_at",s).lte("viewed_at",l).not("user_id","is",null);if(c)throw c;if(!u||u.length===0)return 0;const f=new Set;return u.forEach(v=>{v.user_id&&f.add(v.user_id)}),f.size},uz=async r=>{const{type:t,date:e,startDate:a,endDate:n,statType:i="all"}=r,o=e?new Date(e):new Date;if(t==="hourly"){let s,l;if(a&&n?(s=new Date(a),s.setHours(0,0,0,0),l=new Date(n),l.setHours(23,59,59,999)):(s=new Date(o),s.setHours(0,0,0,0),l=new Date(o),l.setHours(23,59,59,999)),i==="registration"){const{data:u,error:c}=await Ne.from("users").select("id, created_at").gte("created_at",s.toISOString()).lte("created_at",l.toISOString());if(c)throw c;if(!u||u.length===0)return[];const f={};return u.forEach(v=>{const d=new Date(v.created_at).getHours(),p=v.id;f[d]||(f[d]=new Set),f[d].add(p)}),Object.keys(f).map(v=>({hour:Number(v),users:f[Number(v)].size,totalUniqueUsers:0}))}else if(i==="active"){const{data:u,error:c}=await Ne.from("user_views").select("user_id, viewed_at").gte("viewed_at",s.toISOString()).lte("viewed_at",l.toISOString()).not("user_id","is",null);if(c)throw c;if(!u||u.length===0)return[];const f={};u.forEach(g=>{const y=g.user_id;f[y]=(f[y]||0)+1});const v=Object.keys(f).filter(g=>f[g]>4);if(v.length===0)return[];const h=new Set(v),d=u.filter(g=>h.has(String(g.user_id)));if(d.length===0)return[];const p={};return d.forEach(g=>{const m=new Date(g.viewed_at).getHours(),_=g.user_id;p[m]||(p[m]=new Set),p[m].add(_)}),Object.keys(p).map(g=>({hour:Number(g),users:p[Number(g)].size,totalUniqueUsers:0}))}else{const u=new Date(l);u.setHours(23,59,59,999);const{data:c,error:f}=await Ne.from("users").select("id, created_at").lte("created_at",u.toISOString()).order("created_at");if(f)throw f;const v=[],h=new Date(s);for(;h<=u;){const p=h.toISOString().split("T")[0],g=h.getHours();v.push({day:p,hour:g}),h.setHours(h.getHours()+1)}return!c||c.length===0?v.map(({day:p,hour:g})=>({hour:g,users:0,totalUniqueUsers:0})):v.map(({day:p,hour:g})=>{const y=new Date(p);y.setHours(g,59,59,999);const m=new Set;return c.forEach(_=>{new Date(_.created_at)<=y&&m.add(_.id)}),{hour:g,users:m.size,totalUniqueUsers:m.size}})}}else if(t==="daily"){let s,l;if(a&&n)s=new Date(a),s.setHours(0,0,0,0),l=new Date(n),l.setHours(23,59,59,999);else{const u=new Date(o);u.setDate(o.getDate()-29),u.setHours(0,0,0,0),l=new Date(o),l.setHours(23,59,59,999),s=u}if(i==="registration"){const{data:u,error:c}=await Ne.from("users").select("id, created_at").gte("created_at",s.toISOString()).lte("created_at",l.toISOString());if(c)throw c;if(!u||u.length===0)return[];const f={};return u.forEach(v=>{const d=new Date(v.created_at).toISOString().split("T")[0],p=v.id;f[d]||(f[d]=new Set),f[d].add(p)}),Object.keys(f).sort().map(v=>({day:v,users:f[v].size,totalUniqueUsers:0}))}else if(i==="active"){const{data:u,error:c}=await Ne.from("user_views").select("user_id, viewed_at").gte("viewed_at",s.toISOString()).lte("viewed_at",l.toISOString()).not("user_id","is",null);if(c)throw c;if(!u||u.length===0)return[];const f={};u.forEach(g=>{const y=g.user_id;f[y]=(f[y]||0)+1});const v=Object.keys(f).filter(g=>f[g]>4);if(v.length===0)return[];const h=new Set(v),d=u.filter(g=>h.has(String(g.user_id)));if(d.length===0)return[];const p={};return d.forEach(g=>{const m=new Date(g.viewed_at).toISOString().split("T")[0],_=g.user_id;p[m]||(p[m]=new Set),p[m].add(_)}),Object.keys(p).sort().map(g=>({day:g,users:p[g].size,totalUniqueUsers:0}))}else{const u=new Date(l);u.setHours(23,59,59,999);const{data:c,error:f}=await Ne.from("users").select("id, created_at").lte("created_at",u.toISOString()).order("created_at");if(f)throw f;const v=[],h=new Date(s);for(;h<=u;)v.push(h.toISOString().split("T")[0]),h.setDate(h.getDate()+1);return!c||c.length===0?v.map(p=>({day:p,users:0,totalUniqueUsers:0})):v.map(p=>{const g=new Date(p);g.setHours(23,59,59,999);const y=new Set;return c.forEach(m=>{new Date(m.created_at)<=g&&y.add(m.id)}),{day:p,users:y.size,totalUniqueUsers:y.size}})}}else if(t==="weekly"){let s,l;if(a&&n)s=new Date(a),s.setHours(0,0,0,0),l=new Date(n),l.setHours(23,59,59,999);else{const v=new Date(o);v.setDate(o.getDate()-84),v.setHours(0,0,0,0),l=new Date(o),l.setHours(23,59,59,999),s=v}const u=new Date(l);u.setHours(23,59,59,999);let c,f;if(i==="registration"||i==="all"){const v=await Ne.from("users").select("id, created_at").lte("created_at",u.toISOString()).order("created_at");c=v.data||[],f=v.error}else if(i==="active"){const v=await Ne.from("user_views").select("user_id, viewed_at").lte("viewed_at",u.toISOString()).not("user_id","is",null).order("viewed_at");c=v.data||[],f=v.error}if(f)throw f;if(!c||c.length===0)return[];if(i==="all"){const v=[],h=new Date(s);for(;h<=l;){const p=h.getDay();let g=0;p===0?g=1:p!==6&&(g=6-p);const y=new Date(h);y.setDate(h.getDate()-g),y.setHours(0,0,0,0);const m=y.toISOString().split("T")[0];v.includes(m)||v.push(m),h.setDate(h.getDate()+7)}return v.sort().map(p=>{const g=new Date(p+"T00:00:00"),y=new Date(g);y.setDate(g.getDate()+5),y.setHours(23,59,59,999);const m=new Set;return c.forEach(_=>{new Date(_.created_at)<=y&&m.add(_.id)}),{day:p,users:m.size,totalUniqueUsers:m.size}})}else if(i==="registration"){const v=[],h=new Date(s);for(;h<=l;){const p=h.getDay();let g=0;p===0?g=1:p!==6&&(g=6-p);const y=new Date(h);y.setDate(h.getDate()-g),y.setHours(0,0,0,0);const m=y.toISOString().split("T")[0];v.includes(m)||v.push(m),h.setDate(h.getDate()+7)}return v.sort().map(p=>{const g=new Date(p+"T00:00:00"),y=new Date(g);y.setDate(g.getDate()+5),y.setHours(23,59,59,999);const m=new Set;return c.forEach(_=>{const S=new Date(_.created_at);S>=g&&S<=y&&m.add(_.id)}),{day:p,users:m.size,totalUniqueUsers:0}})}else if(i==="active"){const v=[],h=new Date(s);for(;h<=l;){const p=h.getDay();let g=0;p===0?g=1:p!==6&&(g=6-p);const y=new Date(h);y.setDate(h.getDate()-g),y.setHours(0,0,0,0);const m=y.toISOString().split("T")[0];v.includes(m)||v.push(m),h.setDate(h.getDate()+7)}return v.sort().map(p=>{const g=new Date(p+"T00:00:00"),y=new Date(g);y.setDate(g.getDate()+5),y.setHours(23,59,59,999);const m=c.filter(w=>{const x=new Date(w.viewed_at);return x>=g&&x<=y}),_={};m.forEach(w=>{const x=w.user_id;_[x]=(_[x]||0)+1});const S=Object.keys(_).filter(w=>_[w]>4);return{day:p,users:S.length,totalUniqueUsers:0}})}}else if(t==="monthly"){let s,l;if(a&&n)s=new Date(a),s.setHours(0,0,0,0),l=new Date(n),l.setHours(23,59,59,999);else{const v=new Date(o);v.setMonth(o.getMonth()-12),v.setHours(0,0,0,0),l=new Date(o),l.setHours(23,59,59,999),s=v}const u=new Date(l);u.setHours(23,59,59,999);let c,f;if(i==="registration"||i==="all"){const v=await Ne.from("users").select("id, created_at").lte("created_at",u.toISOString()).order("created_at");c=v.data||[],f=v.error}else if(i==="active"){const v=await Ne.from("user_views").select("user_id, viewed_at").lte("viewed_at",u.toISOString()).not("user_id","is",null).order("viewed_at");c=v.data||[],f=v.error}if(f)throw f;if(!c||c.length===0)return[];if(i==="all"){const v=[],h=new Date(s);for(;h<=l;){const p=nr(h),g=`${p.jYear()}-${String(p.jMonth()+1).padStart(2,"0")}`;v.includes(g)||v.push(g),h.setMonth(h.getMonth()+1)}return v.sort().map(p=>{const[g,y]=p.split("-"),m=nr().jYear(Number(g)).jMonth(Number(y)-1).endOf("jMonth").toDate();m.setHours(23,59,59,999);const _=new Set;return c.forEach(S=>{new Date(S.created_at)<=m&&_.add(S.id)}),{day:p,users:_.size,totalUniqueUsers:_.size}})}else if(i==="registration"){const v=[],h=new Date(s);for(;h<=l;){const p=nr(h),g=`${p.jYear()}-${String(p.jMonth()+1).padStart(2,"0")}`;v.includes(g)||v.push(g),h.setMonth(h.getMonth()+1)}return v.sort().map(p=>{const[g,y]=p.split("-"),m=nr().jYear(Number(g)).jMonth(Number(y)-1).startOf("jMonth").toDate();m.setHours(0,0,0,0);const _=nr().jYear(Number(g)).jMonth(Number(y)-1).endOf("jMonth").toDate();_.setHours(23,59,59,999);const S=new Set;return c.forEach(w=>{const x=new Date(w.created_at);x>=m&&x<=_&&S.add(w.id)}),{day:p,users:S.size,totalUniqueUsers:0}})}else if(i==="active"){const v=[],h=new Date(s);for(;h<=l;){const p=nr(h),g=`${p.jYear()}-${String(p.jMonth()+1).padStart(2,"0")}`;v.includes(g)||v.push(g),h.setMonth(h.getMonth()+1)}return v.sort().map(p=>{const[g,y]=p.split("-"),m=nr().jYear(Number(g)).jMonth(Number(y)-1).startOf("jMonth").toDate();m.setHours(0,0,0,0);const _=nr().jYear(Number(g)).jMonth(Number(y)-1).endOf("jMonth").toDate();_.setHours(23,59,59,999);const S=c.filter(b=>{const T=new Date(b.viewed_at);return T>=m&&T<=_}),w={};S.forEach(b=>{const T=b.user_id;w[T]=(w[T]||0)+1});const x=Object.keys(w).filter(b=>w[b]>4);return{day:p,users:x.length,totalUniqueUsers:0}})}}},cz=async()=>{const{data:r,error:t}=await Ne.from("users").select("id, first_name, last_name, phone, created_at").order("created_at",{ascending:!1}).limit(50);if(t)throw t;return!r||r.length===0?[]:r.map((e,a)=>{let n="نامشخص";return e.first_name||e.last_name?n=`${e.first_name||""} ${e.last_name||""}`.trim():e.phone&&(n=e.phone),{rank:a+1,name:n,mobile:e.phone||e.mobile||"-",created_at:e.created_at||""}})},fz=async()=>{const{data:r,error:t}=await Ne.from("matchs").select("id, minimum_score").order("created_at",{ascending:!1}).limit(1);if(t)throw t;const e=r&&r.length>0?r[0].id:null,a=r&&r.length>0&&r[0].minimum_score?Number(r[0].minimum_score):0,[n,i,o]=await Promise.all([Ne.from("answers").select("user_id").not("user_id","is",null),Ne.from("answers").select("user_id, match_id, score, matchs!match_id(minimum_score)").not("user_id","is",null),e?Ne.from("answers").select("user_id, score").eq("match_id",e).not("user_id","is",null):Promise.resolve({data:[],error:null})]),s=new Set;n.data&&n.data.forEach(f=>{f.user_id&&s.add(f.user_id)});const l=new Set;i.data&&i.data.forEach(f=>{const h=(Array.isArray(f.matchs)?f.matchs[0]:f.matchs)||{},d=h.minimum_score?Number(h.minimum_score):0;(f.score?Number(f.score):0)>=d&&f.user_id&&l.add(f.user_id)});const u=new Set;o.data&&o.data.forEach(f=>{f.user_id&&u.add(f.user_id)});const c=new Set;return o.data&&o.data.forEach(f=>{(f.score?Number(f.score):0)>=a&&f.user_id&&c.add(f.user_id)}),{total_competition_participants:s.size,eligible_competition_participants:l.size,latest_competition_participants:u.size,latest_competition_eligible_participants:c.size}},vz=async r=>{const{type:t,date:e,startDate:a,endDate:n}=r,i=e?new Date(e):new Date;if(t==="hourly"){let o,s;a&&n?(o=new Date(a),o.setHours(0,0,0,0),s=new Date(n),s.setHours(23,59,59,999)):(o=new Date(i),o.setHours(0,0,0,0),s=new Date(i),s.setHours(23,59,59,999));const{data:l,error:u}=await Ne.from("answers").select("user_id, match_id, score, created_at, matchs!match_id(minimum_score)").gte("created_at",o.toISOString()).lte("created_at",s.toISOString()).not("user_id","is",null);if(u)throw u;if(!l||l.length===0)return[];const c={};return l.forEach(f=>{const h=new Date(f.created_at).getHours(),d=f.user_id;c[h]||(c[h]={total:new Set,eligible:new Set}),c[h].total.add(d);const g=(Array.isArray(f.matchs)?f.matchs[0]:f.matchs)||{},y=g.minimum_score?Number(g.minimum_score):0;(f.score?Number(f.score):0)>=y&&c[h].eligible.add(d)}),Object.keys(c).map(f=>({hour:Number(f),totalParticipants:c[Number(f)].total.size,eligibleParticipants:c[Number(f)].eligible.size}))}else if(t==="daily"){let o,s;if(a&&n)o=new Date(a),o.setHours(0,0,0,0),s=new Date(n),s.setHours(23,59,59,999);else{const f=new Date(i);f.setDate(i.getDate()-29),f.setHours(0,0,0,0),s=new Date(i),s.setHours(23,59,59,999),o=f}const{data:l,error:u}=await Ne.from("answers").select("user_id, match_id, score, created_at, matchs!match_id(minimum_score)").gte("created_at",o.toISOString()).lte("created_at",s.toISOString()).not("user_id","is",null);if(u)throw u;if(!l||l.length===0)return[];const c={};return l.forEach(f=>{const h=new Date(f.created_at).toISOString().split("T")[0],d=f.user_id;c[h]||(c[h]={total:new Set,eligible:new Set}),c[h].total.add(d);const g=(Array.isArray(f.matchs)?f.matchs[0]:f.matchs)||{},y=g.minimum_score?Number(g.minimum_score):0;(f.score?Number(f.score):0)>=y&&c[h].eligible.add(d)}),Object.keys(c).sort().map(f=>({day:f,totalParticipants:c[f].total.size,eligibleParticipants:c[f].eligible.size}))}else if(t==="weekly"){let o,s;if(a&&n)o=new Date(a),o.setHours(0,0,0,0),s=new Date(n),s.setHours(23,59,59,999);else{const f=new Date(i);f.setDate(i.getDate()-84),f.setHours(0,0,0,0),s=new Date(i),s.setHours(23,59,59,999),o=f}const{data:l,error:u}=await Ne.from("answers").select("user_id, match_id, score, created_at, matchs!match_id(minimum_score)").gte("created_at",o.toISOString()).lte("created_at",s.toISOString()).not("user_id","is",null);if(u)throw u;if(!l||l.length===0)return[];const c={};return l.forEach(f=>{const v=new Date(f.created_at),h=v.getDay();let d=0;h===0?d=1:h!==6&&(d=6-h);const p=new Date(v);p.setDate(v.getDate()-d),p.setHours(0,0,0,0);const g=p.toISOString().split("T")[0],y=f.user_id;c[g]||(c[g]={total:new Set,eligible:new Set}),c[g].total.add(y);const _=(Array.isArray(f.matchs)?f.matchs[0]:f.matchs)||{},S=_.minimum_score?Number(_.minimum_score):0;(f.score?Number(f.score):0)>=S&&c[g].eligible.add(y)}),Object.keys(c).sort().map(f=>({day:f,totalParticipants:c[f].total.size,eligibleParticipants:c[f].eligible.size}))}else if(t==="monthly"){let o,s;if(a&&n)o=new Date(a),o.setHours(0,0,0,0),s=new Date(n),s.setHours(23,59,59,999);else{const f=new Date(i);f.setMonth(i.getMonth()-12),f.setHours(0,0,0,0),s=new Date(i),s.setHours(23,59,59,999),o=f}const{data:l,error:u}=await Ne.from("answers").select("user_id, match_id, score, created_at, matchs!match_id(minimum_score)").gte("created_at",o.toISOString()).lte("created_at",s.toISOString()).not("user_id","is",null);if(u)throw u;if(!l||l.length===0)return[];const c={};return l.forEach(f=>{const v=new Date(f.created_at),h=nr(v),d=`${h.jYear()}-${String(h.jMonth()+1).padStart(2,"0")}`,p=f.user_id;c[d]||(c[d]={total:new Set,eligible:new Set}),c[d].total.add(p);const y=(Array.isArray(f.matchs)?f.matchs[0]:f.matchs)||{},m=y.minimum_score?Number(y.minimum_score):0;(f.score?Number(f.score):0)>=m&&c[d].eligible.add(p)}),Object.keys(c).sort().map(f=>({day:f,totalParticipants:c[f].total.size,eligibleParticipants:c[f].eligible.size}))}},hz=async()=>{const{data:r,error:t}=await Ne.from("matchs").select("id, title, created_at").order("created_at",{ascending:!1});if(t)throw t;if(!r||r.length===0)return[];for(const e of r){const{data:a,error:n}=await Ne.from("winners_match").select("*").eq("match_id",e.id).order("rank",{ascending:!0});if(!n&&a&&a.length>0){const i=[...new Set(a.map(v=>v.user_id||v.winner_id).filter(Boolean))];if(i.length===0)return[];const[o,s]=await Promise.all([Ne.from("users").select("*").in("id",i),Ne.from("answers").select("user_id, score").eq("match_id",e.id).in("user_id",i)]),l=o.data||[],u=s.data||[],c=new Map;l.forEach(v=>{const h=v.id;c.set(h,v),c.set(String(h),v)});const f=new Map;return u.forEach(v=>{const h=v.user_id;f.set(h,v.score||0),f.set(String(h),v.score||0)}),a.map(v=>{const h=v.user_id||v.winner_id,d=c.get(h)||c.get(String(h))||{},p=f.get(h)||f.get(String(h))||0;let g="نامشخص";return d.first_name||d.last_name?g=`${d.first_name||""} ${d.last_name||""}`.trim():d.name?g=d.name:d.phone&&(g=d.phone),{rank:v.rank||0,name:g,mobile:(d==null?void 0:d.phone)||(d==null?void 0:d.mobile)||"",score:Number(p)||0}})}}return[]};/*! ***************************************************************************** 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 Qy=function(r,t){return Qy=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,a){e.__proto__=a}||function(e,a){for(var n in a)Object.prototype.hasOwnProperty.call(a,n)&&(e[n]=a[n])},Qy(r,t)};function V(r,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");Qy(r,t);function e(){this.constructor=r}r.prototype=t===null?Object.create(t):(e.prototype=t.prototype,new e)}var dz=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),pz=function(){function r(){this.browser=new dz,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}(),ni=new pz;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ni.wxa=!0,ni.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?ni.worker=!0:!ni.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(ni.node=!0,ni.svgSupported=!0):gz(navigator.userAgent,ni);function gz(r,t){var e=t.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&&(e.firefox=!0,e.version=a[1]),n&&(e.ie=!0,e.version=n[1]),i&&(e.edge=!0,e.version=i[1],e.newEdge=+i[1].split(".")[0]>18),o&&(e.weChat=!0),t.svgSupported=typeof SVGRect<"u",t.touchEventsSupported="ontouchstart"in window&&!e.ie&&!e.edge,t.pointerEventsSupported="onpointerdown"in window&&(e.edge||e.ie&&+e.version>=11);var s=t.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;t.transform3dSupported=(e.ie&&"transition"in l||e.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),t.transformSupported=t.transform3dSupported||e.ie&&+e.version>=9}}const qe=ni;var I_=12,H2="sans-serif",kn=I_+"px "+H2,yz=20,mz=100,_z="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Sz(r){var t={};if(typeof JSON>"u")return t;for(var e=0;e=0)s=o*e.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),e.push(o)}return t.clearMarkers=function(){A(e,function(c){c.parentNode&&c.parentNode.removeChild(c)})},e}function Hz(r,t,e){for(var a=e?"invTrans":"trans",n=t[a],i=t.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),f=2*u,v=c.left,h=c.top;o.push(v,h),l=l&&i&&v===i[f]&&h===i[f+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&n?n:(t.srcCoords=o,t[a]=e?bw(s,o):bw(o,s))}function q2(r){return r.nodeName.toUpperCase()==="CANVAS"}var $z=/([&<>"'])/g,Wz={"&":"&","<":"<",">":">",'"':""","'":"'"};function or(r){return r==null?"":(r+"").replace($z,function(t,e){return Wz[e]})}var Yz=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,pp=[],Uz=qe.browser.firefox&&+qe.browser.version.split(".")[0]<39;function om(r,t,e,a){return e=e||{},a?Cw(r,t,e):Uz&&t.layerX!=null&&t.layerX!==t.offsetX?(e.zrX=t.layerX,e.zrY=t.layerY):t.offsetX!=null?(e.zrX=t.offsetX,e.zrY=t.offsetY):Cw(r,t,e),e}function Cw(r,t,e){if(qe.domSupported&&r.getBoundingClientRect){var a=t.clientX,n=t.clientY;if(q2(r)){var i=r.getBoundingClientRect();e.zrX=a-i.left,e.zrY=n-i.top;return}else if(im(pp,r,a,n)){e.zrX=pp[0],e.zrY=pp[1];return}}e.zrX=e.zrY=0}function N_(r){return r||window.event}function qr(r,t,e){if(t=N_(t),t.zrX!=null)return t;var a=t.type,n=a&&a.indexOf("touch")>=0;if(n){var o=a!=="touchend"?t.targetTouches[0]:t.changedTouches[0];o&&om(r,o,t,e)}else{om(r,t,t,e);var i=Zz(t);t.zrDelta=i?i/120:-(t.detail||0)/3}var s=t.button;return t.which==null&&s!==void 0&&Yz.test(t.type)&&(t.which=s&1?1:s&2?3:s&4?2:0),t}function Zz(r){var t=r.wheelDelta;if(t)return t;var e=r.deltaX,a=r.deltaY;if(e==null||a==null)return t;var n=Math.abs(a!==0?a:e),i=a>0?-1:a<0?1:e>0?-1:1;return 3*n*i}function sm(r,t,e,a){r.addEventListener(t,e,a)}function Xz(r,t,e,a){r.removeEventListener(t,e,a)}var Rn=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Tw(r){return r.which===2||r.which===3}var qz=function(){function r(){this._track=[]}return r.prototype.recognize=function(t,e,a){return this._doTrack(t,e,a),this._recognize(t)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(t,e,a){var n=t.touches;if(n){for(var i={points:[],touches:[],target:e,event:t},o=0,s=n.length;o1&&a&&a.length>1){var i=Dw(a)/Dw(n);!isFinite(i)&&(i=1),t.pinchScale=i;var o=jz(a);return t.pinchX=o[0],t.pinchY=o[1],{type:"pinch",target:r[0].target,event:t}}}}};function Xt(){return[1,0,0,1,0,0]}function vd(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function hd(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4],r[5]=t[5],r}function ja(r,t,e){var a=t[0]*e[0]+t[2]*e[1],n=t[1]*e[0]+t[3]*e[1],i=t[0]*e[2]+t[2]*e[3],o=t[1]*e[2]+t[3]*e[3],s=t[0]*e[4]+t[2]*e[5]+t[4],l=t[1]*e[4]+t[3]*e[5]+t[5];return r[0]=a,r[1]=n,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function tn(r,t,e){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r[4]=t[4]+e[0],r[5]=t[5]+e[1],r}function Ni(r,t,e,a){a===void 0&&(a=[0,0]);var n=t[0],i=t[2],o=t[4],s=t[1],l=t[3],u=t[5],c=Math.sin(e),f=Math.cos(e);return r[0]=n*f+s*c,r[1]=-n*c+s*f,r[2]=i*f+l*c,r[3]=-i*c+f*l,r[4]=f*(o-a[0])+c*(u-a[1])+a[0],r[5]=f*(u-a[1])-c*(o-a[0])+a[1],r}function B_(r,t,e){var a=e[0],n=e[1];return r[0]=t[0]*a,r[1]=t[1]*n,r[2]=t[2]*a,r[3]=t[3]*n,r[4]=t[4]*a,r[5]=t[5]*n,r}function xa(r,t){var e=t[0],a=t[2],n=t[4],i=t[1],o=t[3],s=t[5],l=e*o-i*a;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-a*l,r[3]=e*l,r[4]=(a*s-o*n)*l,r[5]=(i*n-e*s)*l,r):null}function Kz(r){var t=Xt();return hd(t,r),t}var Jz=function(){function r(t,e){this.x=t||0,this.y=e||0}return r.prototype.copy=function(t){return this.x=t.x,this.y=t.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(t,e){return this.x=t,this.y=e,this},r.prototype.equal=function(t){return t.x===this.x&&t.y===this.y},r.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this},r.prototype.scale=function(t){this.x*=t,this.y*=t},r.prototype.scaleAndAdd=function(t,e){this.x+=t.x*e,this.y+=t.y*e},r.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this},r.prototype.dot=function(t){return this.x*t.x+this.y*t.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 t=this.len();return this.x/=t,this.y/=t,this},r.prototype.distance=function(t){var e=this.x-t.x,a=this.y-t.y;return Math.sqrt(e*e+a*a)},r.prototype.distanceSquare=function(t){var e=this.x-t.x,a=this.y-t.y;return e*e+a*a},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(t){if(t){var e=this.x,a=this.y;return this.x=t[0]*e+t[2]*a+t[4],this.y=t[1]*e+t[3]*a+t[5],this}},r.prototype.toArray=function(t){return t[0]=this.x,t[1]=this.y,t},r.prototype.fromArray=function(t){this.x=t[0],this.y=t[1]},r.set=function(t,e,a){t.x=e,t.y=a},r.copy=function(t,e){t.x=e.x,t.y=e.y},r.len=function(t){return Math.sqrt(t.x*t.x+t.y*t.y)},r.lenSquare=function(t){return t.x*t.x+t.y*t.y},r.dot=function(t,e){return t.x*e.x+t.y*e.y},r.add=function(t,e,a){t.x=e.x+a.x,t.y=e.y+a.y},r.sub=function(t,e,a){t.x=e.x-a.x,t.y=e.y-a.y},r.scale=function(t,e,a){t.x=e.x*a,t.y=e.y*a},r.scaleAndAdd=function(t,e,a,n){t.x=e.x+a.x*n,t.y=e.y+a.y*n},r.lerp=function(t,e,a,n){var i=1-n;t.x=i*e.x+n*a.x,t.y=i*e.y+n*a.y},r}();const we=Jz;var Io=Math.min,js=Math.max,lm=Math.abs,Mw=["x","y"],Qz=["width","height"],Yi=new we,Ui=new we,Zi=new we,Xi=new we,Er=j2(),Du=Er.minTv,um=Er.maxTv,$u=[0,0],V_=function(){function r(t,e,a,n){r.set(this,t,e,a,n)}return r.set=function(t,e,a,n,i){return n<0&&(e=e+n,n=-n),i<0&&(a=a+i,i=-i),t.x=e,t.y=a,t.width=n,t.height=i,t},r.prototype.union=function(t){var e=Io(t.x,this.x),a=Io(t.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=js(t.x+t.width,this.x+this.width)-e:this.width=t.width,isFinite(this.y)&&isFinite(this.height)?this.height=js(t.y+t.height,this.y+this.height)-a:this.height=t.height,this.x=e,this.y=a},r.prototype.applyTransform=function(t){r.applyTransform(this,this,t)},r.prototype.calculateTransform=function(t){var e=this,a=t.width/e.width,n=t.height/e.height,i=Xt();return tn(i,i,[-e.x,-e.y]),B_(i,i,[a,n]),tn(i,i,[t.x,t.y]),i},r.prototype.intersect=function(t,e,a){return r.intersect(this,t,e,a)},r.intersect=function(t,e,a,n){a&&we.set(a,0,0);var i=n&&n.outIntersectRect||null,o=n&&n.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!t||!e)return!1;t instanceof r||(t=r.set(e5,t.x,t.y,t.width,t.height)),e instanceof r||(e=r.set(t5,e.x,e.y,e.width,e.height));var s=!!a;Er.reset(n,s);var l=Er.touchThreshold,u=t.x+l,c=t.x+t.width-l,f=t.y+l,v=t.y+t.height-l,h=e.x+l,d=e.x+e.width-l,p=e.y+l,g=e.y+e.height-l;if(u>c||f>v||h>d||p>g)return!1;var y=!(c=t.x&&e<=t.x+t.width&&a>=t.y&&a<=t.y+t.height},r.prototype.contain=function(t,e){return r.contain(this,t,e)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(t){r.copy(this,t)},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(t){return new r(t.x,t.y,t.width,t.height)},r.copy=function(t,e){return t.x=e.x,t.y=e.y,t.width=e.width,t.height=e.height,t},r.applyTransform=function(t,e,a){if(!a){t!==e&&r.copy(t,e);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];t.x=e.x*n+o,t.y=e.y*i+s,t.width=e.width*n,t.height=e.height*i,t.width<0&&(t.x+=t.width,t.width=-t.width),t.height<0&&(t.y+=t.height,t.height=-t.height);return}Yi.x=Zi.x=e.x,Yi.y=Xi.y=e.y,Ui.x=Xi.x=e.x+e.width,Ui.y=Zi.y=e.y+e.height,Yi.transform(a),Xi.transform(a),Ui.transform(a),Zi.transform(a),t.x=Io(Yi.x,Ui.x,Zi.x,Xi.x),t.y=Io(Yi.y,Ui.y,Zi.y,Xi.y);var l=js(Yi.x,Ui.x,Zi.x,Xi.x),u=js(Yi.y,Ui.y,Zi.y,Xi.y);t.width=l-t.x,t.height=u-t.y},r}(),e5=new V_(0,0,0,0),t5=new V_(0,0,0,0);function Aw(r,t,e,a,n,i,o,s){var l=lm(t-e),u=lm(a-r),c=Io(l,u),f=Mw[n],v=Mw[1-n],h=Qz[n];t=u||!Er.bidirectional)&&(Du[f]=-u,Du[v]=0,Er.useDir&&Er.calcDirMTV())))}function j2(){var r=0,t=new we,e=new we,a={minTv:new we,maxTv:new we,useDir:!1,dirMinTv:new we,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){a.touchThreshold=0,i&&i.touchThreshold!=null&&(a.touchThreshold=js(0,i.touchThreshold)),a.negativeSize=!1,o&&(a.minTv.set(1/0,1/0),a.maxTv.set(0,0),a.useDir=!1,i&&i.direction!=null&&(a.useDir=!0,a.dirMinTv.copy(a.minTv),e.copy(a.minTv),r=i.direction,a.bidirectional=i.bidirectional==null||!!i.bidirectional,a.bidirectional||t.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=a.minTv,o=a.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),c=l*i.y+u*i.x;if(n(c)){n(i.x)&&n(i.y)&&o.set(0,0);return}if(e.x=s*u/c,e.y=s*l/c,n(e.x)&&n(e.y)){o.set(0,0);return}(a.bidirectional||t.dot(e)>0)&&e.len()=0;f--){var v=i[f];v!==n&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(yp.copy(v.getBoundingRect()),v.transform&&yp.applyTransform(v.transform),yp.intersect(c)&&s.push(v))}if(s.length)for(var h=4,d=Math.PI/12,p=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,t)}});function o5(r,t,e){if(r[r.rectHover?"rectContain":"contain"](t,e)){for(var a=r,n=void 0,i=!1;a;){if(a.ignoreClip&&(i=!0),!i){var o=a.getClipPath();if(o&&!o.contain(t,e))return!1}a.silent&&(n=!0);var s=a.__hostTarget;a=s?a.ignoreHostSilent?null:s:a.parent}return n?K2:!0}return!1}function Iw(r,t,e,a,n){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==n&&!o.ignore&&(s=o5(o,e,a))&&(!t.topTarget&&(t.topTarget=o),s!==K2)){t.target=o;break}}}function Q2(r,t,e){var a=r.painter;return t<0||t>a.getWidth()||e<0||e>a.getHeight()}const s5=J2;var eI=32,ql=7;function l5(r){for(var t=0;r>=eI;)t|=r&1,r>>=1;return r+t}function Lw(r,t,e,a){var n=t+1;if(n===e)return 1;if(a(r[n++],r[t])<0){for(;n=0;)n++;return n-t}function u5(r,t,e){for(e--;t>>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 mp(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+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,t[e+c])>0?o=c+1:l=c}return l}function _p(r,t,e,a,n,i){var o=0,s=0,l=1;if(i(r,t[e+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,t[e+c])<0?l=c:o=c+1}return l}function c5(r,t){var e=ql,a,n,i=0,o=[];a=[],n=[];function s(h,d){a[i]=h,n[i]=d,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&n[h-1]<=n[h]+n[h+1]||h>=2&&n[h-2]<=n[h]+n[h-1])n[h-1]n[h+1])break;c(h)}}function u(){for(;i>1;){var h=i-2;h>0&&n[h-1]=ql||b>=ql);if(T)break;w<0&&(w=0),w+=2}if(e=w,e<1&&(e=1),d===1){for(y=0;y=0;y--)r[x+y]=r[w+y];r[S]=o[_];return}for(var b=e;;){var T=0,C=0,D=!1;do if(t(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--d===0){D=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){D=!0;break}while((T|C)=0;y--)r[x+y]=r[w+y];if(d===0){D=!0;break}}if(r[S--]=o[_--],--g===1){D=!0;break}if(C=g-mp(r[m],o,0,g,g-1,t),C!==0){for(S-=C,_-=C,g-=C,x=S+1,w=_+1,y=0;y=ql||C>=ql);if(D)break;b<0&&(b=0),b+=2}if(e=b,e<1&&(e=1),g===1){for(S-=d,m-=d,x=S+1,w=m+1,y=d-1;y>=0;y--)r[x+y]=r[w+y];r[S]=o[_]}else{if(g===0)throw new Error;for(w=S-(g-1),y=0;ys&&(l=s),Pw(r,e,e+l,e+i,t),i=l}o.pushRun(e,i),o.mergeRuns(),n-=i,e+=i}while(n!==0);o.forceMergeRuns()}}var Or=1,Mu=2,Us=4,kw=!1;function Sp(){kw||(kw=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function Rw(r,t){return r.zlevel===t.zlevel?r.z===t.z?r.z2-t.z2:r.z-t.z:r.zlevel-t.zlevel}var f5=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=Rw}return r.prototype.traverse=function(t,e){for(var a=0;a=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 v5=f5;var tI;tI=qe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const cm=tI;var Lv={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 t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)))},elasticOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*r)*Math.sin((r-t)*(2*Math.PI)/a)+1)},elasticInOut:function(r){var t,e=.1,a=.4;return r===0?0:r===1?1:(!e||e<1?(e=1,t=a/4):t=a*Math.asin(1/e)/(2*Math.PI),(r*=2)<1?-.5*(e*Math.pow(2,10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)):e*Math.pow(2,-10*(r-=1))*Math.sin((r-t)*(2*Math.PI)/a)*.5+1)},backIn:function(r){var t=1.70158;return r*r*((t+1)*r-t)},backOut:function(r){var t=1.70158;return--r*r*((t+1)*r+t)+1},backInOut:function(r){var t=2.5949095;return(r*=2)<1?.5*(r*r*((t+1)*r-t)):.5*((r-=2)*r*((t+1)*r+t)+2)},bounceIn:function(r){return 1-Lv.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?Lv.bounceIn(r*2)*.5:Lv.bounceOut(r*2-1)*.5+.5}};const rI=Lv;var uf=Math.pow,Si=Math.sqrt,Qv=1e-8,aI=1e-4,Ew=Si(3),cf=1/3,Ga=ns(),ta=ns(),ol=ns();function di(r){return r>-Qv&&rQv||r<-Qv}function Gt(r,t,e,a,n){var i=1-n;return i*i*(i*r+3*n*t)+n*n*(n*a+3*i*e)}function Ow(r,t,e,a,n){var i=1-n;return 3*(((t-r)*i+2*(e-t)*n)*i+(a-e)*n*n)}function eh(r,t,e,a,n,i){var o=a+3*(t-e)-r,s=3*(e-t*2+r),l=3*(t-r),u=r-n,c=s*s-3*o*l,f=s*l-9*o*u,v=l*l-3*s*u,h=0;if(di(c)&&di(f))if(di(s))i[0]=0;else{var d=-l/s;d>=0&&d<=1&&(i[h++]=d)}else{var p=f*f-4*c*v;if(di(p)){var g=f/c,d=-s/o+g,y=-g/2;d>=0&&d<=1&&(i[h++]=d),y>=0&&y<=1&&(i[h++]=y)}else if(p>0){var m=Si(p),_=c*s+1.5*o*(-f+m),S=c*s+1.5*o*(-f-m);_<0?_=-uf(-_,cf):_=uf(_,cf),S<0?S=-uf(-S,cf):S=uf(S,cf);var d=(-s-(_+S))/(3*o);d>=0&&d<=1&&(i[h++]=d)}else{var w=(2*c*s-3*o*f)/(2*Si(c*c*c)),x=Math.acos(w)/3,b=Si(c),T=Math.cos(x),d=(-s-2*b*T)/(3*o),y=(-s+b*(T+Ew*Math.sin(x)))/(3*o),C=(-s+b*(T-Ew*Math.sin(x)))/(3*o);d>=0&&d<=1&&(i[h++]=d),y>=0&&y<=1&&(i[h++]=y),C>=0&&C<=1&&(i[h++]=C)}}return h}function iI(r,t,e,a,n){var i=6*e-12*t+6*r,o=9*t+3*a-3*r-9*e,s=3*t-3*r,l=0;if(di(o)){if(nI(i)){var u=-s/i;u>=0&&u<=1&&(n[l++]=u)}}else{var c=i*i-4*o*s;if(di(c))n[0]=-i/(2*o);else if(c>0){var f=Si(c),u=(-i+f)/(2*o),v=(-i-f)/(2*o);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function Mi(r,t,e,a,n,i){var o=(t-r)*n+r,s=(e-t)*n+t,l=(a-e)*n+e,u=(s-o)*n+o,c=(l-s)*n+s,f=(c-u)*n+u;i[0]=r,i[1]=o,i[2]=u,i[3]=f,i[4]=f,i[5]=c,i[6]=l,i[7]=a}function oI(r,t,e,a,n,i,o,s,l,u,c){var f,v=.005,h=1/0,d,p,g,y;Ga[0]=l,Ga[1]=u;for(var m=0;m<1;m+=.05)ta[0]=Gt(r,e,n,o,m),ta[1]=Gt(t,a,i,s,m),g=No(Ga,ta),g=0&&g=0&&u<=1&&(n[l++]=u)}}else{var c=o*o-4*i*s;if(di(c)){var u=-o/(2*i);u>=0&&u<=1&&(n[l++]=u)}else if(c>0){var f=Si(c),u=(-o+f)/(2*i),v=(-o-f)/(2*i);u>=0&&u<=1&&(n[l++]=u),v>=0&&v<=1&&(n[l++]=v)}}return l}function sI(r,t,e){var a=r+e-2*t;return a===0?.5:(r-t)/a}function rc(r,t,e,a,n){var i=(t-r)*a+r,o=(e-t)*a+t,s=(o-i)*a+i;n[0]=r,n[1]=i,n[2]=s,n[3]=s,n[4]=o,n[5]=e}function lI(r,t,e,a,n,i,o,s,l){var u,c=.005,f=1/0;Ga[0]=o,Ga[1]=s;for(var v=0;v<1;v+=.05){ta[0]=Zt(r,e,n,v),ta[1]=Zt(t,a,i,v);var h=No(Ga,ta);h=0&&h=1?1:eh(0,a,i,1,l,s)&&Gt(0,n,o,1,s[0])}}}var y5=function(){function r(t){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=t.life||1e3,this._delay=t.delay||0,this.loop=t.loop||!1,this.onframe=t.onframe||Ct,this.ondestroy=t.ondestroy||Ct,this.onrestart=t.onrestart||Ct,t.easing&&this.setEasing(t.easing)}return r.prototype.step=function(t,e){if(this._inited||(this._startTime=t+this._delay,this._inited=!0),this._paused){this._pausedTime+=e;return}var a=this._life,n=t-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=t-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(t){this.easing=t,this.easingFunc=ye(t)?t:rI[t]||z_(t)},r}();const m5=y5;var uI=function(){function r(t){this.value=t}return r}(),_5=function(){function r(){this._len=0}return r.prototype.insert=function(t){var e=new uI(t);return this.insertEntry(e),e},r.prototype.insertEntry=function(t){this.head?(this.tail.next=t,t.prev=this.tail,t.next=null,this.tail=t):this.head=this.tail=t,this._len++},r.prototype.remove=function(t){var e=t.prev,a=t.next;e?e.next=a:this.head=a,a?a.prev=e:this.tail=e,t.next=t.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r}(),S5=function(){function r(t){this._list=new _5,this._maxSize=10,this._map={},this._maxSize=t}return r.prototype.put=function(t,e){var a=this._list,n=this._map,i=null;if(n[t]==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=e:s=new uI(e),s.key=t,a.insertEntry(s),n[t]=s}return i},r.prototype.get=function(t){var e=this._map[t],a=this._list;if(e!=null)return e!==a.tail&&(a.remove(e),a.insertEntry(e)),e.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r}();const vl=S5;var Nw={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 ma(r){return r=Math.round(r),r<0?0:r>255?255:r}function w5(r){return r=Math.round(r),r<0?0:r>360?360:r}function ac(r){return r<0?0:r>1?1:r}function wp(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ma(parseFloat(t)/100*255):ma(parseInt(t,10))}function wi(r){var t=r;return t.length&&t.charAt(t.length-1)==="%"?ac(parseFloat(t)/100):ac(parseFloat(t))}function xp(r,t,e){return e<0?e+=1:e>1&&(e-=1),e*6<1?r+(t-r)*e*6:e*2<1?t:e*3<2?r+(t-r)*(2/3-e)*6:r}function pi(r,t,e){return r+(t-r)*e}function Zr(r,t,e,a,n){return r[0]=t,r[1]=e,r[2]=a,r[3]=n,r}function vm(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}var cI=new vl(20),ff=null;function ws(r,t){ff&&vm(ff,t),ff=cI.put(r,ff||t.slice())}function Lr(r,t){if(r){t=t||[];var e=cI.get(r);if(e)return vm(t,e);r=r+"";var a=r.replace(/ /g,"").toLowerCase();if(a in Nw)return vm(t,Nw[a]),ws(r,t),t;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)){Zr(t,0,0,0,1);return}return Zr(t,(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),ws(r,t),t}else if(n===7||n===9){var i=parseInt(a.slice(1,7),16);if(!(i>=0&&i<=16777215)){Zr(t,0,0,0,1);return}return Zr(t,(i&16711680)>>16,(i&65280)>>8,i&255,n===9?parseInt(a.slice(7),16)/255:1),ws(r,t),t}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(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?Zr(t,+u[0],+u[1],+u[2],1):Zr(t,0,0,0,1);c=wi(u.pop());case"rgb":if(u.length>=3)return Zr(t,wp(u[0]),wp(u[1]),wp(u[2]),u.length===3?c:wi(u[3])),ws(r,t),t;Zr(t,0,0,0,1);return;case"hsla":if(u.length!==4){Zr(t,0,0,0,1);return}return u[3]=wi(u[3]),hm(u,t),ws(r,t),t;case"hsl":if(u.length!==3){Zr(t,0,0,0,1);return}return hm(u,t),ws(r,t),t;default:return}}Zr(t,0,0,0,1)}}function hm(r,t){var e=(parseFloat(r[0])%360+360)%360/360,a=wi(r[1]),n=wi(r[2]),i=n<=.5?n*(a+1):n+a-n*a,o=n*2-i;return t=t||[],Zr(t,ma(xp(o,i,e+1/3)*255),ma(xp(o,i,e)*255),ma(xp(o,i,e-1/3)*255),1),r.length===4&&(t[3]=r[3]),t}function x5(r){if(r){var t=r[0]/255,e=r[1]/255,a=r[2]/255,n=Math.min(t,e,a),i=Math.max(t,e,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 c=((i-t)/6+o/2)/o,f=((i-e)/6+o/2)/o,v=((i-a)/6+o/2)/o;t===i?l=v-f:e===i?l=1/3+c-v:a===i&&(l=2/3+f-c),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function dm(r,t){var e=Lr(r);if(e){for(var a=0;a<3;a++)t<0?e[a]=e[a]*(1-t)|0:e[a]=(255-e[a])*t+e[a]|0,e[a]>255?e[a]=255:e[a]<0&&(e[a]=0);return Ka(e,e.length===4?"rgba":"rgb")}}function bp(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){e=e||[];var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=t[n],s=t[i],l=a-n;return e[0]=ma(pi(o[0],s[0],l)),e[1]=ma(pi(o[1],s[1],l)),e[2]=ma(pi(o[2],s[2],l)),e[3]=ac(pi(o[3],s[3],l)),e}}function b5(r,t,e){if(!(!(t&&t.length)||!(r>=0&&r<=1))){var a=r*(t.length-1),n=Math.floor(a),i=Math.ceil(a),o=Lr(t[n]),s=Lr(t[i]),l=a-n,u=Ka([ma(pi(o[0],s[0],l)),ma(pi(o[1],s[1],l)),ma(pi(o[2],s[2],l)),ac(pi(o[3],s[3],l))],"rgba");return e?{color:u,leftIndex:n,rightIndex:i,value:a}:u}}function xi(r,t,e,a){var n=Lr(r);if(r)return n=x5(n),t!=null&&(n[0]=w5(ye(t)?t(n[0]):t)),e!=null&&(n[1]=wi(ye(e)?e(n[1]):e)),a!=null&&(n[2]=wi(ye(a)?a(n[2]):a)),Ka(hm(n),"rgba")}function th(r,t){var e=Lr(r);if(e&&t!=null)return e[3]=ac(t),Ka(e,"rgba")}function Ka(r,t){if(!(!r||!r.length)){var e=r[0]+","+r[1]+","+r[2];return(t==="rgba"||t==="hsva"||t==="hsla")&&(e+=","+r[3]),t+"("+e+")"}}function rh(r,t){var e=Lr(r);return e?(.299*e[0]+.587*e[1]+.114*e[2])*e[3]/255+(1-e[3])*t:0}var Bw=new vl(100);function pm(r){if(oe(r)){var t=Bw.get(r);return t||(t=dm(r,-.1),Bw.put(r,t)),t}else if(ud(r)){var e=$({},r);return e.colorStops=X(r.colorStops,function(a){return{offset:a.offset,color:dm(a.color,-.1)}}),e}return r}var ah=Math.round;function nc(r){var t;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var e=Lr(r);e&&(r="rgb("+e[0]+","+e[1]+","+e[2]+")",t=e[3])}return{color:r,opacity:t??1}}var Vw=1e-4;function gi(r){return r-Vw}function vf(r){return ah(r*1e3)/1e3}function gm(r){return ah(r*1e4)/1e4}function C5(r){return"matrix("+vf(r[0])+","+vf(r[1])+","+vf(r[2])+","+vf(r[3])+","+gm(r[4])+","+gm(r[5])+")"}var T5={left:"start",right:"end",center:"middle",middle:"middle"};function D5(r,t,e){return e==="top"?r+=t/2:e==="bottom"&&(r-=t/2),r}function M5(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function A5(r){var t=r.style,e=r.getGlobalScale();return[t.shadowColor,(t.shadowBlur||0).toFixed(2),(t.shadowOffsetX||0).toFixed(2),(t.shadowOffsetY||0).toFixed(2),e[0],e[1]].join(",")}function fI(r){return r&&!!r.image}function I5(r){return r&&!!r.svgElement}function F_(r){return fI(r)||I5(r)}function vI(r){return r.type==="linear"}function hI(r){return r.type==="radial"}function dI(r){return r&&(r.type==="linear"||r.type==="radial")}function dd(r){return"url(#"+r+")"}function pI(r){var t=r.getGlobalScale(),e=Math.max(t[0],t[1]);return Math.max(Math.ceil(Math.log(e)/Math.log(10)),1)}function gI(r){var t=r.x||0,e=r.y||0,a=(r.rotation||0)*Dv,n=de(r.scaleX,1),i=de(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(t||e)&&l.push("translate("+t+"px,"+e+"px)"),a&&l.push("rotate("+a+")"),(n!==1||i!==1)&&l.push("scale("+n+","+i+")"),(o||s)&&l.push("skew("+ah(o*Dv)+"deg, "+ah(s*Dv)+"deg)"),l.join(" ")}var L5=function(){return qe.hasGlobalWindow&&ye(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}}(),ym=Array.prototype.slice;function _n(r,t,e){return(t-r)*e+r}function Cp(r,t,e,a){for(var n=t.length,i=0;ia?t:r,i=Math.min(e,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(t,e,a){this._needsSort=!0;var n=this.keyframes,i=n.length,o=!1,s=Fw,l=e;if(ur(e)){var u=E5(e);s=u,(u===1&&!$e(e[0])||u===2&&!$e(e[0][0]))&&(o=!0)}else if($e(e)&&!lr(e))s=df;else if(oe(e))if(!isNaN(+e))s=df;else{var c=Lr(e);c&&(l=c,s=Au)}else if(ud(e)){var f=$({},l);f.colorStops=X(e.colorStops,function(h){return{offset:h.offset,color:Lr(h.color)}}),vI(e)?s=mm:hI(e)&&(s=_m),l=f}i===0?this.valType=s:(s!==this.valType||s===Fw)&&(o=!0),this.discrete=this.discrete||o;var v={time:t,value:l,rawValue:e,percent:0};return a&&(v.easing=a,v.easingFunc=ye(a)?a:rI[a]||z_(a)),n.push(v),v},r.prototype.prepare=function(t,e){var a=this.keyframes;this._needsSort&&a.sort(function(p,g){return p.time-g.time});for(var n=this.valType,i=a.length,o=a[i-1],s=this.discrete,l=pf(n),u=Gw(n),c=0;c=0&&!(o[c].percent<=e);c--);c=v(c,s-2)}else{for(c=f;ce);c++);c=v(c-1,s-2)}d=o[c+1],h=o[c]}if(h&&d){this._lastFr=c,this._lastFrP=e;var g=d.percent-h.percent,y=g===0?1:v((e-h.percent)/g,1);d.easingFunc&&(y=d.easingFunc(y));var m=a?this._additiveValue:u?jl:t[l];if((pf(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)t[l]=y<1?h.rawValue:d.rawValue;else if(pf(i))i===kv?Cp(m,h[n],d[n],y):P5(m,h[n],d[n],y);else if(Gw(i)){var _=h[n],S=d[n],w=i===mm;t[l]={type:w?"linear":"radial",x:_n(_.x,S.x,y),y:_n(_.y,S.y,y),colorStops:X(_.colorStops,function(b,T){var C=S.colorStops[T];return{offset:_n(b.offset,C.offset,y),color:Pv(Cp([],b.color,C.color,y))}}),global:S.global},w?(t[l].x2=_n(_.x2,S.x2,y),t[l].y2=_n(_.y2,S.y2,y)):t[l].r=_n(_.r,S.r,y)}else if(u)Cp(m,h[n],d[n],y),a||(t[l]=Pv(m));else{var x=_n(h[n],d[n],y);a?this._additiveValue=x:t[l]=x}a&&this._addToTarget(t)}}},r.prototype._addToTarget=function(t){var e=this.valType,a=this.propName,n=this._additiveValue;e===df?t[a]=t[a]+n:e===Au?(Lr(t[a],jl),hf(jl,jl,n,1),t[a]=Pv(jl)):e===kv?hf(t[a],t[a],n,1):e===yI&&zw(t[a],t[a],n,1)},r}(),G_=function(){function r(t,e,a,n){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=t,this._loop=e,e&&n){k_("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(t){this._target=t},r.prototype.when=function(t,e,a){return this.whenWithKeys(t,e,He(e),a)},r.prototype.whenWithKeys=function(t,e,a,n){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,Wu(u),n),this._trackKeys.push(s)}l.addKeyframe(t,Wu(e[s]),n)}return this._maxTime=Math.max(this._maxTime,t),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(t){return this._maxTime=t,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var t=this._doneCbs;if(t)for(var e=t.length,a=0;a0)){this._started=1;for(var e=this,a=[],n=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,t[n]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r}();function Ks(){return new Date().getTime()}var N5=function(r){V(t,r);function t(e){var a=r.call(this)||this;return a._running=!1,a._time=0,a._pausedTime=0,a._pauseStart=0,a._paused=!1,e=e||{},a.stage=e.stage||{},a}return t.prototype.addClip=function(e){e.animation&&this.removeClip(e),this._head?(this._tail.next=e,e.prev=this._tail,e.next=null,this._tail=e):this._head=this._tail=e,e.animation=this},t.prototype.addAnimator=function(e){e.animation=this;var a=e.getClip();a&&this.addClip(a)},t.prototype.removeClip=function(e){if(e.animation){var a=e.prev,n=e.next;a?a.next=n:this._head=n,n?n.prev=a:this._tail=a,e.next=e.prev=e.animation=null}},t.prototype.removeAnimator=function(e){var a=e.getClip();a&&this.removeClip(a),e.animation=null},t.prototype.update=function(e){for(var a=Ks()-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,e||(this.trigger("frame",n),this.stage.update&&this.stage.update())},t.prototype._startLoop=function(){var e=this;this._running=!0;function a(){e._running&&(cm(a),!e._paused&&e.update())}cm(a)},t.prototype.start=function(){this._running||(this._time=Ks(),this._pausedTime=0,this._startLoop())},t.prototype.stop=function(){this._running=!1},t.prototype.pause=function(){this._paused||(this._pauseStart=Ks(),this._paused=!0)},t.prototype.resume=function(){this._paused&&(this._pausedTime+=Ks()-this._pauseStart,this._paused=!1)},t.prototype.clear=function(){for(var e=this._head;e;){var a=e.next;e.prev=e.next=e.animation=null,e=a}this._head=this._tail=null},t.prototype.isFinished=function(){return this._head==null},t.prototype.animate=function(e,a){a=a||{},this.start();var n=new G_(e,a.loop);return this.addAnimator(n),n},t}(ca);const B5=N5;var V5=300,Tp=qe.domSupported,Dp=function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],t=["touchstart","touchend","touchmove"],e={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},a=X(r,function(n){var i=n.replace("mouse","pointer");return e.hasOwnProperty(i)?i:n});return{mouse:r,touch:t,pointer:a}}(),Hw={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},$w=!1;function Sm(r){var t=r.pointerType;return t==="pen"||t==="touch"}function z5(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 Mp(r){r&&(r.zrByTouch=!0)}function F5(r,t){return qr(r.dom,new G5(r,t),!0)}function mI(r,t){for(var e=t,a=!1;e&&e.nodeType!==9&&!(a=e.domBelongToZr||e!==t&&e===r.painterRoot);)e=e.parentNode;return a}var G5=function(){function r(t,e){this.stopPropagation=Ct,this.stopImmediatePropagation=Ct,this.preventDefault=Ct,this.type=e.type,this.target=this.currentTarget=t.dom,this.pointerType=e.pointerType,this.clientX=e.clientX,this.clientY=e.clientY}return r}(),ha={mousedown:function(r){r=qr(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=qr(this.dom,r);var t=this.__mayPointerCapture;t&&(r.zrX!==t[0]||r.zrY!==t[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=qr(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=qr(this.dom,r);var t=r.toElement||r.relatedTarget;mI(this,t)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){$w=!0,r=qr(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){$w||(r=qr(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=qr(this.dom,r),Mp(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),ha.mousemove.call(this,r),ha.mousedown.call(this,r)},touchmove:function(r){r=qr(this.dom,r),Mp(r),this.handler.processGesture(r,"change"),ha.mousemove.call(this,r)},touchend:function(r){r=qr(this.dom,r),Mp(r),this.handler.processGesture(r,"end"),ha.mouseup.call(this,r),+new Date-+this.__lastTouchMomentUw||r<-Uw}var ji=[],xs=[],Ip=Xt(),Lp=Math.abs,Z5=function(){function r(){}return r.prototype.getLocalTransform=function(t){return r.getLocalTransform(this,t)},r.prototype.setPosition=function(t){this.x=t[0],this.y=t[1]},r.prototype.setScale=function(t){this.scaleX=t[0],this.scaleY=t[1]},r.prototype.setSkew=function(t){this.skewX=t[0],this.skewY=t[1]},r.prototype.setOrigin=function(t){this.originX=t[0],this.originY=t[1]},r.prototype.needLocalTransform=function(){return qi(this.rotation)||qi(this.x)||qi(this.y)||qi(this.scaleX-1)||qi(this.scaleY-1)||qi(this.skewX)||qi(this.skewY)},r.prototype.updateTransform=function(){var t=this.parent&&this.parent.transform,e=this.needLocalTransform(),a=this.transform;if(!(e||t)){a&&(Yw(a),this.invTransform=null);return}a=a||Xt(),e?this.getLocalTransform(a):Yw(a),t&&(e?ja(a,t,a):hd(a,t)),this.transform=a,this._resolveGlobalScaleRatio(a)},r.prototype._resolveGlobalScaleRatio=function(t){var e=this.globalScaleRatio;if(e!=null&&e!==1){this.getGlobalScale(ji);var a=ji[0]<0?-1:1,n=ji[1]<0?-1:1,i=((ji[0]-a)*e+a)/ji[0]||0,o=((ji[1]-n)*e+n)/ji[1]||0;t[0]*=i,t[1]*=i,t[2]*=o,t[3]*=o}this.invTransform=this.invTransform||Xt(),xa(this.invTransform,t)},r.prototype.getComputedTransform=function(){for(var t=this,e=[];t;)e.push(t),t=t.parent;for(;t=e.pop();)t.updateTransform();return this.transform},r.prototype.setLocalTransform=function(t){if(t){var e=t[0]*t[0]+t[1]*t[1],a=t[2]*t[2]+t[3]*t[3],n=Math.atan2(t[1],t[0]),i=Math.PI/2+n-Math.atan2(t[3],t[2]);a=Math.sqrt(a)*Math.cos(i),e=Math.sqrt(e),this.skewX=i,this.skewY=0,this.rotation=-n,this.x=+t[4],this.y=+t[5],this.scaleX=e,this.scaleY=a,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var t=this.parent,e=this.transform;t&&t.transform&&(t.invTransform=t.invTransform||Xt(),ja(xs,t.invTransform,e),e=xs);var a=this.originX,n=this.originY;(a||n)&&(Ip[4]=a,Ip[5]=n,ja(xs,e,Ip),xs[4]-=a,xs[5]-=n,e=xs),this.setLocalTransform(e)}},r.prototype.getGlobalScale=function(t){var e=this.transform;return t=t||[],e?(t[0]=Math.sqrt(e[0]*e[0]+e[1]*e[1]),t[1]=Math.sqrt(e[2]*e[2]+e[3]*e[3]),e[0]<0&&(t[0]=-t[0]),e[3]<0&&(t[1]=-t[1]),t):(t[0]=1,t[1]=1,t)},r.prototype.transformCoordToLocal=function(t,e){var a=[t,e],n=this.invTransform;return n&&Tt(a,a,n),a},r.prototype.transformCoordToGlobal=function(t,e){var a=[t,e],n=this.transform;return n&&Tt(a,a,n),a},r.prototype.getLineScale=function(){var t=this.transform;return t&&Lp(t[0]-1)>1e-10&&Lp(t[3]-1)>1e-10?Math.sqrt(Lp(t[0]*t[3]-t[2]*t[1])):1},r.prototype.copyTransform=function(t){ih(this,t)},r.getLocalTransform=function(t,e){e=e||[];var a=t.originX||0,n=t.originY||0,i=t.scaleX,o=t.scaleY,s=t.anchorX,l=t.anchorY,u=t.rotation||0,c=t.x,f=t.y,v=t.skewX?Math.tan(t.skewX):0,h=t.skewY?Math.tan(-t.skewY):0;if(a||n||s||l){var d=a+s,p=n+l;e[4]=-d*i-v*p*o,e[5]=-p*o-h*d*i}else e[4]=e[5]=0;return e[0]=i,e[3]=o,e[1]=h*i,e[2]=v*o,u&&Ni(e,e,u),e[4]+=a+c,e[5]+=n+f,e},r.initDefaultProps=function(){var t=r.prototype;t.scaleX=t.scaleY=t.globalScaleRatio=1,t.x=t.y=t.originX=t.originY=t.skewX=t.skewY=t.rotation=t.anchorX=t.anchorY=0}(),r}(),rn=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function ih(r,t){for(var e=0;e=Zw)){r=r||kn;for(var t=[],e=+new Date,a=0;a<=127;a++)t[a]=wa.measureText(String.fromCharCode(a),r).width;var n=+new Date-e;return n>16?Pp=Zw:n>2&&Pp++,t}}var Pp=0,Zw=5;function SI(r,t){return r.asciiWidthMapTried||(r.asciiWidthMap=X5(r.font),r.asciiWidthMapTried=!0),0<=t&&t<=127?r.asciiWidthMap!=null?r.asciiWidthMap[t]:r.asciiCharWidth:r.stWideCharWidth}function Qa(r,t){var e=r.strWidthCache,a=e.get(t);return a==null&&(a=wa.measureText(t,r.font).width,e.put(t,a)),a}function Xw(r,t,e,a){var n=Qa(Ja(t),r),i=Ec(t),o=hl(0,n,e),s=Bo(0,i,a),l=new Ce(o,s,n,i);return l}function pd(r,t,e,a){var n=((r||"")+"").split(` `),i=n.length;if(i===1)return Xw(n[0],t,e,a);for(var o=new Ce(0,0,0,0),s=0;s=0?parseFloat(r)/100*t:parseFloat(r):r}function oh(r,t,e){var a=t.position||"inside",n=t.distance!=null?t.distance:5,i=e.height,o=e.width,s=i/2,l=e.x,u=e.y,c="left",f="top";if(a instanceof Array)l+=ba(a[0],e.width),u+=ba(a[1],e.height),c=null,f=null;else switch(a){case"left":l-=n,u+=s,c="right",f="middle";break;case"right":l+=n+o,u+=s,f="middle";break;case"top":l+=o/2,u-=n,c="center",f="bottom";break;case"bottom":l+=o/2,u+=i+n,c="center";break;case"inside":l+=o/2,u+=s,c="center",f="middle";break;case"insideLeft":l+=n,u+=s,f="middle";break;case"insideRight":l+=o-n,u+=s,c="right",f="middle";break;case"insideTop":l+=o/2,u+=n,c="center";break;case"insideBottom":l+=o/2,u+=i-n,c="center",f="bottom";break;case"insideTopLeft":l+=n,u+=n;break;case"insideTopRight":l+=o-n,u+=n,c="right";break;case"insideBottomLeft":l+=n,u+=i-n,f="bottom";break;case"insideBottomRight":l+=o-n,u+=i-n,c="right",f="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=f,r}var kp="__zr_normal__",Rp=rn.concat(["ignore"]),q5=en(rn,function(r,t){return r[t]=!0,r},{ignore:!1}),bs={},j5=new Ce(0,0,0,0),yf=[],H_=function(){function r(t){this.id=Y2(),this.animators=[],this.currentStates=[],this.states={},this._init(t)}return r.prototype._init=function(t){this.attr(t)},r.prototype.drift=function(t,e,a){switch(this.draggable){case"horizontal":e=0;break;case"vertical":t=0;break}var n=this.transform;n||(n=this.transform=[1,0,0,1,0,0]),n[4]+=t,n[5]+=e,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(t){var e=this._textContent;if(e&&(!e.ignore||t)){this.textConfig||(this.textConfig={});var a=this.textConfig,n=a.local,i=e.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=n?this:null;var u=!1;i.copyTransform(e);var c=a.position!=null,f=a.autoOverflowArea,v=void 0;if((f||c)&&(v=j5,a.layoutRect?v.copy(a.layoutRect):v.copy(this.getBoundingRect()),n||v.applyTransform(this.transform)),c){this.calculateTextPosition?this.calculateTextPosition(bs,a,v):oh(bs,a,v),i.x=bs.x,i.y=bs.y,o=bs.align,s=bs.verticalAlign;var h=a.origin;if(h&&a.rotation!=null){var d=void 0,p=void 0;h==="center"?(d=v.width*.5,p=v.height*.5):(d=ba(h[0],v.width),p=ba(h[1],v.height)),u=!0,i.originX=-i.x+d+(n?0:v.x),i.originY=-i.y+p+(n?0:v.y)}}a.rotation!=null&&(i.rotation=a.rotation);var g=a.offset;g&&(i.x+=g[0],i.y+=g[1],u||(i.originX=-g[0],i.originY=-g[1]));var y=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={});if(f){var m=y.overflowRect=y.overflowRect||new Ce(0,0,0,0);i.getLocalTransform(yf),xa(yf,yf),Ce.copy(m,v),m.applyTransform(yf)}else y.overflowRect=null;var _=a.inside==null?typeof a.position=="string"&&a.position.indexOf("inside")>=0:a.inside,S=void 0,w=void 0,x=void 0;_&&this.canBeInsideText()?(S=a.insideFill,w=a.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(w==null||w==="auto")&&(w=this.getInsideTextStroke(S),x=!0)):(S=a.outsideFill,w=a.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(w==null||w==="auto")&&(w=this.getOutsideStroke(S),x=!0)),S=S||"#000",(S!==y.fill||w!==y.stroke||x!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=w,y.autoStroke=x,y.align=o,y.verticalAlign=s,e.setDefaultTextStyle(y)),e.__dirty|=Or,l&&e.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(t){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?Cm:bm},r.prototype.getOutsideStroke=function(t){var e=this.__zr&&this.__zr.getBackgroundColor(),a=typeof e=="string"&&Lr(e);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,Ka(a,"rgba")},r.prototype.traverse=function(t,e){},r.prototype.attrKV=function(t,e){t==="textConfig"?this.setTextConfig(e):t==="textContent"?this.setTextContent(e):t==="clipPath"?this.setClipPath(e):t==="extra"?(this.extra=this.extra||{},$(this.extra,e)):this[t]=e},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(t,e){if(typeof t=="string")this.attrKV(t,e);else if(be(t))for(var a=t,n=He(a),i=0;i0},r.prototype.getState=function(t){return this.states[t]},r.prototype.ensureState=function(t){var e=this.states;return e[t]||(e[t]={}),e[t]},r.prototype.clearStates=function(t){this.useState(kp,!1,t)},r.prototype.useState=function(t,e,a,n){var i=t===kp,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(ke(s,t)>=0&&(e||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(t)),u||(u=this.states&&this.states[t]),!u&&!i){k_("State "+t+" not exists.");return}i||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||n);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(t,u,this._normalState,e,!a&&!this.__inHover&&l&&l.duration>0,l);var f=this._textContent,v=this._textGuide;return f&&f.useState(t,e,a,c),v&&v.useState(t,e,a,c),i?(this.currentStates=[],this._normalState={}):e?this.currentStates.push(t):this.currentStates=[t],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Or),u}}},r.prototype.useStates=function(t,e,a){if(!t.length)this.clearStates();else{var n=[],i=this.currentStates,o=t.length,s=o===i.length;if(s){for(var l=0;l0,d);var p=this._textContent,g=this._textGuide;p&&p.useStates(t,e,v),g&&g.useStates(t,e,v),this._updateAnimationTargets(),this.currentStates=t.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Or)}},r.prototype.isSilent=function(){for(var t=this;t;){if(t.silent)return!0;var e=t.__hostTarget;t=e?t.ignoreHostSilent?null:e:t.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var t=0;t=0){var a=this.currentStates.slice();a.splice(e,1),this.useStates(a)}},r.prototype.replaceState=function(t,e,a){var n=this.currentStates.slice(),i=ke(n,t),o=ke(n,e)>=0;i>=0?o?n.splice(i,1):n[i]=e:a&&!o&&n.push(e),this.useStates(n)},r.prototype.toggleState=function(t,e){e?this.useState(t,!0):this.removeState(t)},r.prototype._mergeStates=function(t){for(var e={},a,n=0;n=0&&i.splice(o,1)}),this.animators.push(t),a&&a.animation.addAnimator(t),a&&a.wakeUp()},r.prototype.updateDuringAnimation=function(t){this.markRedraw()},r.prototype.stopAnimation=function(t,e){for(var a=this.animators,n=a.length,i=[],o=0;o0&&e.during&&i[0].during(function(d,p){e.during(p)});for(var v=0;v0||n.force&&!o.length){var T=void 0,C=void 0,D=void 0;if(s){C={},v&&(T={});for(var S=0;S<_;S++){var y=p[S];C[y]=e[y],v?T[y]=a[y]:e[y]=a[y]}}else if(v){D={};for(var S=0;S<_;S++){var y=p[S];D[y]=Wu(e[y]),J5(e,a,y)}}var w=new G_(e,!1,!1,f?Qe(d,function(L){return L.targetName===t}):null);w.targetName=t,n.scope&&(w.scope=n.scope),v&&T&&w.whenWithKeys(0,T,p),D&&w.whenWithKeys(0,D,p),w.whenWithKeys(u??500,s?C:a,p).delay(c||0),r.addAnimator(w,t),o.push(w)}}const xI=H_;var bI=function(r){V(t,r);function t(e){var a=r.call(this)||this;return a.isGroup=!0,a._children=[],a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.children=function(){return this._children.slice()},t.prototype.childAt=function(e){return this._children[e]},t.prototype.childOfName=function(e){for(var a=this._children,n=0;n=0&&(n.splice(i,0,e),this._doAdd(e))}return this},t.prototype.replace=function(e,a){var n=ke(this._children,e);return n>=0&&this.replaceAt(a,n),this},t.prototype.replaceAt=function(e,a){var n=this._children,i=n[a];if(e&&e!==this&&e.parent!==this&&e!==i){n[a]=e,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(e)}return this},t.prototype._doAdd=function(e){e.parent&&e.parent.remove(e),e.parent=this;var a=this.__zr;a&&a!==e.__zr&&e.addSelfToZr(a),a&&a.refresh()},t.prototype.remove=function(e){var a=this.__zr,n=this._children,i=ke(n,e);return i<0?this:(n.splice(i,1),e.parent=null,a&&e.removeSelfFromZr(a),a&&a.refresh(),this)},t.prototype.removeAll=function(){for(var e=this._children,a=this.__zr,n=0;n0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(t){this._sleepAfterStill=t},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(t){this._disposed||(t=t||{},this.painter.resize(t.width,t.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(t){this._disposed||this.handler.setCursorStyle(t)},r.prototype.findHover=function(t,e){if(!this._disposed)return this.handler.findHover(t,e)},r.prototype.on=function(t,e,a){return this._disposed||this.handler.on(t,e,a),this},r.prototype.off=function(t,e){this._disposed||this.handler.off(t,e)},r.prototype.trigger=function(t,e){this._disposed||this.handler.trigger(t,e)},r.prototype.clear=function(){if(!this._disposed){for(var t=this.storage.getRoots(),e=0;e0){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}var ne=l3;function l3(r,t,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 sh(r,t,e)}function sh(r,t,e){return oe(r)?s3(r).match(/%$/)?parseFloat(r)/100*t+(e||0):parseFloat(r):r==null?NaN:+r}function At(r,t,e){return t==null&&(t=10),t=Math.min(Math.max(0,t),TI),r=(+r).toFixed(t),e?r:+r}function oa(r){return r.sort(function(t,e){return t-e}),r}function Ya(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var t=1,e=0;e<15;e++,t*=10)if(Math.round(r*t)/t===r)return e}return u3(r)}function u3(r){var t=r.toString().toLowerCase(),e=t.indexOf("e"),a=e>0?+t.slice(e+1):0,n=e>0?e:t.length,i=t.indexOf("."),o=i<0?0:n-1-i;return Math.max(0,o-a)}function DI(r,t){var e=Math.log,a=Math.LN10,n=Math.floor(e(r[1]-r[0])/a),i=Math.round(e(Wa(t[1]-t[0]))/a),o=Math.min(Math.max(-n+i,0),20);return isFinite(o)?o:20}function c3(r,t){var e=en(r,function(h,d){return h+(isNaN(d)?0:d)},0);if(e===0)return[];for(var a=Math.pow(10,t),n=X(r,function(h){return(isNaN(h)?0:h)/e*a*100}),i=a*100,o=X(n,function(h){return Math.floor(h)}),s=en(o,function(h,d){return h+d},0),l=X(n,function(h,d){return h-o[d]});su&&(u=l[f],c=f);++o[c],l[c]=0,++s}return X(o,function(h){return h/a})}function f3(r,t){var e=Math.max(Ya(r),Ya(t)),a=r+t;return e>TI?a:At(a,e)}var Kw=9007199254740991;function MI(r){var t=Math.PI*2;return(r%t+t)%t}function ic(r){return r>-jw&&r=10&&t++,t}function AI(r,t){var e=$_(r),a=Math.pow(10,e),n=r/a,i;return t?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,e>=-20?+r.toFixed(e<0?-e:0):r}function Np(r,t){var e=(r.length-1)*t+1,a=Math.floor(e),n=+r[a-1],i=e-a;return i?n+i*(r[a]-n):n}function Jw(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var t=-1/0,e=1,a=0;a0?t.length:0),this.item=null,this.key=NaN,this},r.prototype.next=function(){return(this._step>0?this._idx=this._end)?(this.item=this._list[this._idx],this.key=this._idx=this._idx+this._step,!0):!1},r}();function Bp(r){r.option=r.parentModel=r.ecModel=null}var k3=".",Ki="___EC__COMPONENT__CONTAINER___",zI="___EC__EXTENDED_CLASS___";function Ua(r){var t={main:"",sub:""};if(r){var e=r.split(k3);t.main=e[0]||"",t.sub=e[1]||""}return t}function R3(r){cr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function E3(r){return!!(r&&r[zI])}function U_(r,t){r.$constructor=r,r.extend=function(e){var a=this,n;return O3(a)?n=function(i){V(o,i);function o(){return i.apply(this,arguments)||this}return o}(a):(n=function(){(e.$constructor||a).apply(this,arguments)},Dz(n,this)),$(n.prototype,e),n[zI]=!0,n.extend=this.extend,n.superCall=V3,n.superApply=z3,n.superClass=a,n}}function O3(r){return ye(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function FI(r,t){r.extend=t.extend}var N3=Math.round(Math.random()*10);function B3(r){var t=["__\0is_clz",N3++].join("_");r.prototype[t]=!0,r.isInstance=function(e){return!!(e&&e[t])}}function V3(r,t){for(var e=[],a=2;a=0||i&&ke(i,l)<0)){var u=a.getShallow(l,t);u!=null&&(o[r[s][0]]=u)}}return o}}var F3=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],G3=Xo(F3),H3=function(){function r(){}return r.prototype.getAreaStyle=function(t,e){return G3(this,t,e)},r}(),Mm=new vl(50);function $3(r){if(typeof r=="string"){var t=Mm.get(r);return t&&t.image}else return r}function Z_(r,t,e,a,n){if(r)if(typeof r=="string"){if(t&&t.__zrImageSrc===r||!e)return t;var i=Mm.get(r),o={hostEl:e,cb:a,cbPayload:n};return i?(t=i.image,!yd(t)&&i.pending.push(o)):(t=wa.loadImage(r,ax,ax),t.__zrImageSrc=r,Mm.put(r,t.__cachedImgObj={image:t,pending:[o]})),t}else return r;else return t}function ax(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var t=0;t=s;u++)l-=s;var c=Qa(o,e);return c>l&&(e="",c=0),l=r-c,n.ellipsis=e,n.ellipsisWidth=c,n.contentWidth=l,n.containerWidth=r,n}function HI(r,t,e){var a=e.containerWidth,n=e.contentWidth,i=e.fontMeasureInfo;if(!a){r.textLine="",r.isTruncated=!1;return}var o=Qa(i,t);if(o<=a){r.textLine=t,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=n||s>=e.maxIterations){t+=e.ellipsis;break}var l=s===0?Y3(t,n,i):o>0?Math.floor(t.length*n/o):0;t=t.substr(0,l),o=Qa(i,t)}t===""&&(t=e.placeholder),r.textLine=t,r.isTruncated=!0}function Y3(r,t,e){for(var a=0,n=0,i=r.length;ng&&h){var _=Math.floor(g/v);d=d||y.length>_,y=y.slice(0,_),m=y.length*v}if(n&&c&&p!=null)for(var S=GI(p,u,t.ellipsis,{minChar:t.truncateMinChar,placeholder:t.placeholder}),w={},x=0;xd&&zp(i,o.substring(d,g),t,h),zp(i,p[2],t,h,p[1]),d=Vp.lastIndex}df){var N=i.lines.length;L>0?(C.tokens=C.tokens.slice(0,L),b(C,M,D),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length0&&d+a.accumWidth>a.width&&(c=t.split(` `),u=!0),a.accumWidth=d}else{var p=$I(t,l,a.width,a.breakAll,a.accumWidth);a.accumWidth=p.accumWidth+h,f=p.linesWidths,c=p.lines}}c||(c=t.split(` `));for(var g=Ja(l),y=0;y=32&&t<=591||t>=880&&t<=4351||t>=4608&&t<=5119||t>=7680&&t<=8303}var K3=en(",&?/;] ".split(""),function(r,t){return r[t]=!0,r},{});function J3(r){return j3(r)?!!K3[r]:!0}function $I(r,t,e,a,n){for(var i=[],o=[],s="",l="",u=0,c=0,f=Ja(t),v=0;ve:n+c+d>e){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),i.push(s),o.push(c-u),l+=h,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(c),s=h,c=d)):p?(i.push(l),o.push(u),l=h,u=d):(i.push(h),o.push(d));continue}c+=d,p?(l+=h,u+=d):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(i.push(s),o.push(c)),i.length===1&&(c+=n),{accumWidth:c,lines:i,linesWidths:o}}function ix(r,t,e,a,n,i){if(r.baseX=e,r.baseY=a,r.outerWidth=r.outerHeight=null,!!t){var o=t.width*2,s=t.height*2;Ce.set(ox,hl(e,o,n),Bo(a,s,i),o,s),Ce.intersect(t,ox,null,sx);var l=sx.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=hl(l.x,l.width,n,!0),r.baseY=Bo(l.y,l.height,i,!0)}}var ox=new Ce(0,0,0,0),sx={outIntersectRect:{},clamp:!0};function X_(r){return r!=null?r+="":r=""}function Q3(r){var t=X_(r.text),e=r.font,a=Qa(Ja(e),t),n=Ec(e);return Am(r,a,n,null)}function Am(r,t,e,a){var n=new Ce(hl(r.x||0,t,r.textAlign),Bo(r.y||0,e,r.textBaseline),t,e),i=a??(WI(r)?r.lineWidth:0);return i>0&&(n.x-=i/2,n.y-=i/2,n.width+=i,n.height+=i),n}function WI(r){var t=r.stroke;return t!=null&&t!=="none"&&r.lineWidth>0}var Im="__zr_style_"+Math.round(Math.random()*10),Vo={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},md={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Vo[Im]=!0;var lx=["z","z2","invisible"],eF=["invisible"],tF=function(r){V(t,r);function t(e){return r.call(this,e)||this}return t.prototype._init=function(e){for(var a=He(e),n=0;n1e-4){s[0]=r-e,s[1]=t-a,l[0]=r+e,l[1]=t+a;return}if(mf[0]=$p(n)*e+r,mf[1]=Hp(n)*a+t,_f[0]=$p(i)*e+r,_f[1]=Hp(i)*a+t,u(s,mf,_f),c(l,mf,_f),n=n%Ji,n<0&&(n=n+Ji),i=i%Ji,i<0&&(i=i+Ji),n>i&&!o?i+=Ji:nn&&(Sf[0]=$p(h)*e+r,Sf[1]=Hp(h)*a+t,u(s,Sf,s),c(l,Sf,l))}var nt={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Qi=[],eo=[],La=[],qn=[],Pa=[],ka=[],Wp=Math.min,Yp=Math.max,to=Math.cos,ro=Math.sin,hn=Math.abs,Lm=Math.PI,ii=Lm*2,Up=typeof Float32Array<"u",Kl=[];function Zp(r){var t=Math.round(r/Lm*1e8)/1e8;return t%2*Lm}function Sd(r,t){var e=Zp(r[0]);e<0&&(e+=ii);var a=e-r[0],n=r[1];n+=a,!t&&n-e>=ii?n=e+ii:t&&e-n>=ii?n=e-ii:!t&&e>n?n=e+(ii-Zp(e-n)):t&&e0&&(this._ux=hn(a/nh/t)||0,this._uy=hn(a/nh/e)||0)},r.prototype.setDPR=function(t){this.dpr=t},r.prototype.setContext=function(t){this._ctx=t},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(t,e){return this._drawPendingPt(),this.addData(nt.M,t,e),this._ctx&&this._ctx.moveTo(t,e),this._x0=t,this._y0=e,this._xi=t,this._yi=e,this},r.prototype.lineTo=function(t,e){var a=hn(t-this._xi),n=hn(e-this._yi),i=a>this._ux||n>this._uy;if(this.addData(nt.L,t,e),this._ctx&&i&&this._ctx.lineTo(t,e),i)this._xi=t,this._yi=e,this._pendingPtDist=0;else{var o=a*a+n*n;o>this._pendingPtDist&&(this._pendingPtX=t,this._pendingPtY=e,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){return this._drawPendingPt(),this.addData(nt.C,t,e,a,n,i,o),this._ctx&&this._ctx.bezierCurveTo(t,e,a,n,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(t,e,a,n){return this._drawPendingPt(),this.addData(nt.Q,t,e,a,n),this._ctx&&this._ctx.quadraticCurveTo(t,e,a,n),this._xi=a,this._yi=n,this},r.prototype.arc=function(t,e,a,n,i,o){this._drawPendingPt(),Kl[0]=n,Kl[1]=i,Sd(Kl,o),n=Kl[0],i=Kl[1];var s=i-n;return this.addData(nt.A,t,e,a,a,n,s,0,o?0:1),this._ctx&&this._ctx.arc(t,e,a,n,i,o),this._xi=to(i)*a+t,this._yi=ro(i)*a+e,this},r.prototype.arcTo=function(t,e,a,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(t,e,a,n,i),this},r.prototype.rect=function(t,e,a,n){return this._drawPendingPt(),this._ctx&&this._ctx.rect(t,e,a,n),this.addData(nt.R,t,e,a,n),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(nt.Z);var t=this._ctx,e=this._x0,a=this._y0;return t&&t.closePath(),this._xi=e,this._yi=a,this},r.prototype.fill=function(t){t&&t.fill(),this.toStatic()},r.prototype.stroke=function(t){t&&t.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(t){if(this._saveData){var e=t.length;!(this.data&&this.data.length===e)&&Up&&(this.data=new Float32Array(e));for(var a=0;a0&&o))for(var s=0;sc.length&&(this._expandData(),c=this.data);for(var f=0;f0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var t=[],e=0;e11&&(this.data=new Float32Array(t)))}},r.prototype.getBoundingRect=function(){La[0]=La[1]=Pa[0]=Pa[1]=Number.MAX_VALUE,qn[0]=qn[1]=ka[0]=ka[1]=-Number.MAX_VALUE;var t=this.data,e=0,a=0,n=0,i=0,o;for(o=0;oa||hn(_)>n||v===e-1)&&(p=Math.sqrt(m*m+_*_),i=g,o=y);break}case nt.C:{var S=t[v++],w=t[v++],g=t[v++],y=t[v++],x=t[v++],b=t[v++];p=h5(i,o,S,w,g,y,x,b,10),i=x,o=b;break}case nt.Q:{var S=t[v++],w=t[v++],g=t[v++],y=t[v++];p=p5(i,o,S,w,g,y,10),i=g,o=y;break}case nt.A:var T=t[v++],C=t[v++],D=t[v++],M=t[v++],L=t[v++],I=t[v++],P=I+L;v+=1,d&&(s=to(L)*D+T,l=ro(L)*M+C),p=Yp(D,M)*Wp(ii,Math.abs(I)),i=to(P)*D+T,o=ro(P)*M+C;break;case nt.R:{s=i=t[v++],l=o=t[v++];var R=t[v++],E=t[v++];p=R*2+E*2;break}case nt.Z:{var m=s-i,_=l-o;p=Math.sqrt(m*m+_*_),i=s,o=l;break}}p>=0&&(u[f++]=p,c+=p)}return this._pathLen=c,c},r.prototype.rebuildPath=function(t,e){var a=this.data,n=this._ux,i=this._uy,o=this._len,s,l,u,c,f,v,h=e<1,d,p,g=0,y=0,m,_=0,S,w;if(!(h&&(this._pathSegLen||this._calculateLength(),d=this._pathSegLen,p=this._pathLen,m=e*p,!m)))e:for(var x=0;x0&&(t.lineTo(S,w),_=0),b){case nt.M:s=u=a[x++],l=c=a[x++],t.moveTo(u,c);break;case nt.L:{f=a[x++],v=a[x++];var C=hn(f-u),D=hn(v-c);if(C>n||D>i){if(h){var M=d[y++];if(g+M>m){var L=(m-g)/M;t.lineTo(u*(1-L)+f*L,c*(1-L)+v*L);break e}g+=M}t.lineTo(f,v),u=f,c=v,_=0}else{var I=C*C+D*D;I>_&&(S=f,w=v,_=I)}break}case nt.C:{var P=a[x++],R=a[x++],E=a[x++],O=a[x++],k=a[x++],N=a[x++];if(h){var M=d[y++];if(g+M>m){var L=(m-g)/M;Mi(u,P,E,k,L,Qi),Mi(c,R,O,N,L,eo),t.bezierCurveTo(Qi[1],eo[1],Qi[2],eo[2],Qi[3],eo[3]);break e}g+=M}t.bezierCurveTo(P,R,E,O,k,N),u=k,c=N;break}case nt.Q:{var P=a[x++],R=a[x++],E=a[x++],O=a[x++];if(h){var M=d[y++];if(g+M>m){var L=(m-g)/M;rc(u,P,E,L,Qi),rc(c,R,O,L,eo),t.quadraticCurveTo(Qi[1],eo[1],Qi[2],eo[2]);break e}g+=M}t.quadraticCurveTo(P,R,E,O),u=E,c=O;break}case nt.A:var B=a[x++],F=a[x++],H=a[x++],j=a[x++],ee=a[x++],ce=a[x++],Ae=a[x++],Be=!a[x++],he=H>j?H:j,fe=hn(H-j)>.001,U=ee+ce,z=!1;if(h){var M=d[y++];g+M>m&&(U=ee+ce*(m-g)/M,z=!0),g+=M}if(fe&&t.ellipse?t.ellipse(B,F,H,j,Ae,ee,U,Be):t.arc(B,F,he,ee,U,Be),z)break e;T&&(s=to(ee)*H+B,l=ro(ee)*j+F),u=to(U)*H+B,c=ro(U)*j+F;break;case nt.R:s=u=a[x],l=c=a[x+1],f=a[x++],v=a[x++];var J=a[x++],ie=a[x++];if(h){var M=d[y++];if(g+M>m){var W=m-g;t.moveTo(f,v),t.lineTo(f+Wp(W,J),v),W-=J,W>0&&t.lineTo(f+J,v+Wp(W,ie)),W-=ie,W>0&&t.lineTo(f+Yp(J-W,0),v+ie),W-=J,W>0&&t.lineTo(f,v+Yp(ie-W,0));break e}g+=M}t.rect(f,v,J,ie);break;case nt.Z:if(h){var M=d[y++];if(g+M>m){var L=(m-g)/M;t.lineTo(u*(1-L)+s*L,c*(1-L)+l*L);break e}g+=M}t.closePath(),u=s,c=l}}},r.prototype.clone=function(){var t=new r,e=this.data;return t.data=e.slice?e.slice():Array.prototype.slice.call(e),t._len=this._len,t},r.prototype.canSave=function(){return!!this._saveData},r.CMD=nt,r.initDefaultProps=function(){var t=r.prototype;t._saveData=!0,t._ux=0,t._uy=0,t._pendingPtDist=0,t._version=0}(),r}();const an=oF;function li(r,t,e,a,n,i,o){if(n===0)return!1;var s=n,l=0,u=r;if(o>t+s&&o>a+s||or+s&&i>e+s||it+f&&c>a+f&&c>i+f&&c>s+f||cr+f&&u>e+f&&u>n+f&&u>o+f||ut+u&&l>a+u&&l>i+u||lr+u&&s>e+u&&s>n+u||se||c+un&&(n+=Jl);var v=Math.atan2(l,s);return v<0&&(v+=Jl),v>=a&&v<=n||v+Jl>=a&&v+Jl<=n}function Sn(r,t,e,a,n,i){if(i>t&&i>a||in?s:0}var jn=an.CMD,ao=Math.PI*2,uF=1e-4;function cF(r,t){return Math.abs(r-t)t&&u>a&&u>i&&u>s||u1&&fF(),h=Gt(t,a,i,s,Jr[0]),v>1&&(d=Gt(t,a,i,s,Jr[1]))),v===2?gt&&s>a&&s>i||s=0&&u<=1){for(var c=0,f=Zt(t,a,i,u),v=0;ve||s<-e)return 0;var l=Math.sqrt(e*e-s*s);gr[0]=-l,gr[1]=l;var u=Math.abs(a-n);if(u<1e-4)return 0;if(u>=ao-1e-4){a=0,n=ao;var c=i?1:-1;return o>=gr[0]+r&&o<=gr[1]+r?c:0}if(a>n){var f=a;a=n,n=f}a<0&&(a+=ao,n+=ao);for(var v=0,h=0;h<2;h++){var d=gr[h];if(d+r>o){var p=Math.atan2(s,d),c=i?1:-1;p<0&&(p=ao+p),(p>=a&&p<=n||p+ao>=a&&p+ao<=n)&&(p>Math.PI/2&&p1&&(e||(s+=Sn(l,u,c,f,a,n))),g&&(l=i[d],u=i[d+1],c=l,f=u),p){case jn.M:c=i[d++],f=i[d++],l=c,u=f;break;case jn.L:if(e){if(li(l,u,i[d],i[d+1],t,a,n))return!0}else s+=Sn(l,u,i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case jn.C:if(e){if(sF(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=vF(l,u,i[d++],i[d++],i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case jn.Q:if(e){if(YI(l,u,i[d++],i[d++],i[d],i[d+1],t,a,n))return!0}else s+=hF(l,u,i[d++],i[d++],i[d],i[d+1],a,n)||0;l=i[d++],u=i[d++];break;case jn.A:var y=i[d++],m=i[d++],_=i[d++],S=i[d++],w=i[d++],x=i[d++];d+=1;var b=!!(1-i[d++]);v=Math.cos(w)*_+y,h=Math.sin(w)*S+m,g?(c=v,f=h):s+=Sn(l,u,v,h,a,n);var T=(a-y)*S/_+y;if(e){if(lF(y,m,S,w,w+x,b,t,T,n))return!0}else s+=dF(y,m,S,w,w+x,b,T,n);l=Math.cos(w+x)*_+y,u=Math.sin(w+x)*S+m;break;case jn.R:c=l=i[d++],f=u=i[d++];var C=i[d++],D=i[d++];if(v=c+C,h=f+D,e){if(li(c,f,v,f,t,a,n)||li(v,f,v,h,t,a,n)||li(v,h,c,h,t,a,n)||li(c,h,c,f,t,a,n))return!0}else s+=Sn(v,f,v,h,a,n),s+=Sn(c,h,c,f,a,n);break;case jn.Z:if(e){if(li(l,u,c,f,t,a,n))return!0}else s+=Sn(l,u,c,f,a,n);l=c,u=f;break}}return!e&&!cF(u,f)&&(s+=Sn(l,u,c,f,a,n)||0),s!==0}function pF(r,t,e){return UI(r,0,!1,t,e)}function gF(r,t,e,a){return UI(r,t,!0,e,a)}var lh=xe({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Vo),yF={style:xe({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},md.style)},Xp=rn.concat(["invisible","culling","z","z2","zlevel","parent"]),mF=function(r){V(t,r);function t(e){return r.call(this,e)||this}return t.prototype.update=function(){var e=this;r.prototype.update.call(this);var a=this.style;if(a.decal){var n=this._decalEl=this._decalEl||new t;n.buildPath===t.prototype.buildPath&&(n.buildPath=function(l){e.buildPath(l,e.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?bm:a>.2?U5:Cm}else if(e)return Cm}return bm},t.prototype.getInsideTextStroke=function(e){var a=this.style.fill;if(oe(a)){var n=this.__zr,i=!!(n&&n.isDarkMode()),o=rh(e,0)0))},t.prototype.hasFill=function(){var e=this.style,a=e.fill;return a!=null&&a!=="none"},t.prototype.getBoundingRect=function(){var e=this._rect,a=this.style,n=!e;if(n){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Us)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),e=o.getBoundingRect()}if(this._rect=e,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=e.clone());if(this.__dirty||n){s.copy(e);var l=a.strokeNoScale?this.getLineScale():1,u=a.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c??4)}l>1e-10&&(s.width+=u/l,s.height+=u/l,s.x-=u/l/2,s.y-=u/l/2)}return s}return e},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect(),o=this.style;if(e=n[0],a=n[1],i.contain(e,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)),gF(s,l/u,e,a)))return!0}if(this.hasFill())return pF(s,e,a)}return!1},t.prototype.dirtyShape=function(){this.__dirty|=Us,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},t.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},t.prototype.animateShape=function(e){return this.animate("shape",e)},t.prototype.updateDuringAnimation=function(e){e==="style"?this.dirtyStyle():e==="shape"?this.dirtyShape():this.markRedraw()},t.prototype.attrKV=function(e,a){e==="shape"?this.setShape(a):r.prototype.attrKV.call(this,e,a)},t.prototype.setShape=function(e,a){var n=this.shape;return n||(n=this.shape={}),typeof e=="string"?n[e]=a:$(n,e),this.dirtyShape(),this},t.prototype.shapeChanged=function(){return!!(this.__dirty&Us)},t.prototype.createStyle=function(e){return fd(lh,e)},t.prototype._innerSaveToNormal=function(e){r.prototype._innerSaveToNormal.call(this,e);var a=this._normalState;e.shape&&!a.shape&&(a.shape=$({},this.shape))},t.prototype._applyStateObj=function(e,a,n,i,o,s){r.prototype._applyStateObj.call(this,e,a,n,i,o,s);var l=!(a&&i),u;if(a&&a.shape?o?i?u=a.shape:(u=$({},n.shape),$(u,a.shape)):(u=$({},i?this.shape:n.shape),$(u,a.shape)):l&&(u=n.shape),u)if(o){this.shape=$({},this.shape);for(var c={},f=He(u),v=0;vn&&(f=s+l,s*=n/f,l*=n/f),u+c>n&&(f=u+c,u*=n/f,c*=n/f),l+u>i&&(f=l+u,l*=i/f,u*=i/f),s+c>i&&(f=s+c,s*=i/f,c*=i/f),r.moveTo(e+s,a),r.lineTo(e+n-l,a),l!==0&&r.arc(e+n-l,a+l,l,-Math.PI/2,0),r.lineTo(e+n,a+i-u),u!==0&&r.arc(e+n-u,a+i-u,u,0,Math.PI/2),r.lineTo(e+c,a+i),c!==0&&r.arc(e+c,a+i-c,c,Math.PI/2,Math.PI),r.lineTo(e,a+s),s!==0&&r.arc(e+s,a+s,s,Math.PI,Math.PI*1.5)}var Js=Math.round;function wd(r,t,e){if(t){var a=t.x1,n=t.x2,i=t.y1,o=t.y2;r.x1=a,r.x2=n,r.y1=i,r.y2=o;var s=e&&e.lineWidth;return s&&(Js(a*2)===Js(n*2)&&(r.x1=r.x2=Br(a,s,!0)),Js(i*2)===Js(o*2)&&(r.y1=r.y2=Br(i,s,!0))),r}}function qI(r,t,e){if(t){var a=t.x,n=t.y,i=t.width,o=t.height;r.x=a,r.y=n,r.width=i,r.height=o;var s=e&&e.lineWidth;return s&&(r.x=Br(a,s,!0),r.y=Br(n,s,!0),r.width=Math.max(Br(a+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(Br(n+o,s,!1)-r.y,o===0?0:1)),r}}function Br(r,t,e){if(!t)return r;var a=Js(r*2);return(a+Js(t))%2===0?a/2:(a+(e?1:-1))/2}var CF=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),TF={},jI=function(r){V(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new CF},t.prototype.buildPath=function(e,a){var n,i,o,s;if(this.subPixelOptimize){var l=qI(TF,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?bF(e,a):e.rect(n,i,o,s)},t.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},t}(Fe);jI.prototype.type="rect";const Ve=jI;var hx={fill:"#000"},dx=2,Ra={},DF={style:xe({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},md.style)},KI=function(r){V(t,r);function t(e){var a=r.call(this)||this;return a.type="text",a._children=[],a._defaultStyle=hx,a.attr(e),a}return t.prototype.childrenRef=function(){return this._children},t.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var e=0;e0,L=0;L=0&&(P=x[I],P.align==="right");)this._placeToken(P,e,T,y,L,"right",_),C-=P.width,L-=P.width,I--;for(M+=(c-(M-g)-(m-L)-C)/2;D<=I;)P=x[D],this._placeToken(P,e,T,y,M+P.width/2,"center",_),M+=P.width,D++;y+=T}},t.prototype._placeToken=function(e,a,n,i,o,s,l){var u=a.rich[e.styleName]||{};u.text=e.text;var c=e.verticalAlign,f=i+n/2;c==="top"?f=i+e.height/2:c==="bottom"&&(f=i+n-e.height/2);var v=!e.isLineHolder&&qp(u);v&&this._renderBackground(u,a,s==="right"?o-e.width:s==="center"?o-e.width/2:o,f-e.height/2,e.width,e.height);var h=!!u.backgroundColor,d=e.textPadding;d&&(o=Sx(o,s,d),f-=e.height/2-d[0]-e.innerHeight/2);var p=this._getOrCreateChild(sc),g=p.createStyle();p.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,w=_x("fill"in u?u.fill:"fill"in a?a.fill:(m=!0,y.fill)),x=mx("stroke"in u?u.stroke:"stroke"in a?a.stroke:!h&&!l&&(!y.autoStroke||m)?(_=dx,S=!0,y.stroke):null),b=u.textShadowBlur>0||a.textShadowBlur>0;g.text=e.text,g.x=o,g.y=f,b&&(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=e.font||kn,g.opacity=Vr(u.opacity,a.opacity,1),gx(g,u),x&&(g.lineWidth=Vr(u.lineWidth,a.lineWidth,_),g.lineDash=de(u.lineDash,a.lineDash),g.lineDashOffset=a.lineDashOffset||0,g.stroke=x),w&&(g.fill=w),p.setBoundingRect(Am(g,e.contentWidth,e.contentHeight,S?0:null))},t.prototype._renderBackground=function(e,a,n,i,o,s){var l=e.backgroundColor,u=e.borderWidth,c=e.borderColor,f=l&&l.image,v=l&&!f,h=e.borderRadius,d=this,p,g;if(v||e.lineHeight||u&&c){p=this._getOrCreateChild(Ve),p.useStyle(p.createStyle()),p.style.fill=null;var y=p.shape;y.x=n,y.y=i,y.width=o,y.height=s,y.r=h,p.dirtyShape()}if(v){var m=p.style;m.fill=l||null,m.fillOpacity=de(e.fillOpacity,1)}else if(f){g=this._getOrCreateChild(rr),g.onload=function(){d.dirtyStyle()};var _=g.style;_.image=l.image,_.x=n,_.y=i,_.width=o,_.height=s}if(u&&c){var m=p.style;m.lineWidth=u,m.stroke=c,m.strokeOpacity=de(e.strokeOpacity,1),m.lineDash=e.borderDash,m.lineDashOffset=e.borderDashOffset||0,p.strokeContainThreshold=0,p.hasFill()&&p.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(p||g).style;S.shadowBlur=e.shadowBlur||0,S.shadowColor=e.shadowColor||"transparent",S.shadowOffsetX=e.shadowOffsetX||0,S.shadowOffsetY=e.shadowOffsetY||0,S.opacity=Vr(e.opacity,a.opacity,1)},t.makeFont=function(e){var a="";return QI(e)&&(a=[e.fontStyle,e.fontWeight,JI(e.fontSize),e.fontFamily||"sans-serif"].join(" ")),a&&ia(a)||e.textFont||e.font},t}(la),MF={left:!0,right:1,center:1},AF={top:1,bottom:1,middle:1},px=["fontStyle","fontWeight","fontSize","fontFamily"];function JI(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?I_+"px":r+"px"}function gx(r,t){for(var e=0;e=0,i=!1;if(r instanceof Fe){var o=eL(r),s=n&&o.selectFill||o.normalFill,l=n&&o.selectStroke||o.normalStroke;if(Cs(s)||Cs(l)){a=a||{};var u=a.style||{};u.fill==="inherit"?(i=!0,a=$({},a),u=$({},u),u.fill=s):!Cs(u.fill)&&Cs(s)?(i=!0,a=$({},a),u=$({},u),u.fill=pm(s)):!Cs(u.stroke)&&Cs(l)&&(i||(a=$({},a),u=$({},u)),u.stroke=pm(l)),a.style=u}}if(a&&a.z2==null){i||(a=$({},a));var c=r.z2EmphasisLift;a.z2=r.z2+(c??Ll)}return a}function OF(r,t,e){if(e&&e.z2==null){e=$({},e);var a=r.z2SelectLift;e.z2=r.z2+(a??LF)}return e}function NF(r,t,e){var a=ke(r.currentStates,t)>=0,n=r.style.opacity,i=a?null:RF(r,["opacity"],t,{opacity:1});e=e||{};var o=e.style||{};return o.opacity==null&&(e=$({},e),o=$({opacity:a?n:i.opacity*.1},o),e.style=o),e}function jp(r,t){var e=this.states[r];if(this.style){if(r==="emphasis")return EF(this,r,t,e);if(r==="blur")return NF(this,r,e);if(r==="select")return OF(this,r,e)}return e}function qo(r){r.stateProxy=jp;var t=r.getTextContent(),e=r.getTextGuideLine();t&&(t.stateProxy=jp),e&&(e.stateProxy=jp)}function Dx(r,t){!sL(r,t)&&!r.__highByOuter&&Gn(r,tL)}function Mx(r,t){!sL(r,t)&&!r.__highByOuter&&Gn(r,rL)}function On(r,t){r.__highByOuter|=1<<(t||0),Gn(r,tL)}function Nn(r,t){!(r.__highByOuter&=~(1<<(t||0)))&&Gn(r,rL)}function nL(r){Gn(r,J_)}function Q_(r){Gn(r,aL)}function iL(r){Gn(r,PF)}function oL(r){Gn(r,kF)}function sL(r,t){return r.__highDownSilentOnTouch&&t.zrByTouch}function lL(r){var t=r.getModel(),e=[],a=[];t.eachComponent(function(n,i){var o=q_(i),s=n==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&a.push(l),o.isBlured&&(l.group.traverse(function(u){aL(u)}),s&&e.push(i)),o.isBlured=!1}),A(a,function(n){n&&n.toggleBlurSeries&&n.toggleBlurSeries(e,!1,t)})}function Rm(r,t,e,a){var n=a.getModel();e=e||"coordinateSystem";function i(u,c){for(var f=0;f0){var s={dataIndex:o,seriesIndex:e.seriesIndex};i!=null&&(s.dataType=i),t.push(s)}})}),t}function Fo(r,t,e){Lo(r,!0),Gn(r,qo),Om(r,t,e)}function HF(r){Lo(r,!1)}function ut(r,t,e,a){a?HF(r):Fo(r,t,e)}function Om(r,t,e){var a=De(r);t!=null?(a.focus=t,a.blurScope=e):a.focus&&(a.focus=null)}var Ix=["emphasis","blur","select"],$F={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Vt(r,t,e,a){e=e||"itemStyle";for(var n=0;n1&&(o*=Kp(d),s*=Kp(d));var p=(n===i?-1:1)*Kp((o*o*(s*s)-o*o*(h*h)-s*s*(v*v))/(o*o*(h*h)+s*s*(v*v)))||0,g=p*o*h/s,y=p*-s*v/o,m=(r+e)/2+xf(f)*g-wf(f)*y,_=(t+a)/2+wf(f)*g+xf(f)*y,S=Rx([1,0],[(v-g)/o,(h-y)/s]),w=[(v-g)/o,(h-y)/s],x=[(-1*v-g)/o,(-1*h-y)/s],b=Rx(w,x);if(Bm(w,x)<=-1&&(b=Ql),Bm(w,x)>=1&&(b=0),b<0){var T=Math.round(b/Ql*1e6)/1e6;b=Ql*2+T%2*Ql}c.addData(u,m,_,o,s,S,b,f,i)}var qF=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,jF=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function KF(r){var t=new an;if(!r)return t;var e=0,a=0,n=e,i=a,o,s=an.CMD,l=r.match(qF);if(!l)return t;for(var u=0;uP*P+R*R&&(T=D,C=M),{cx:T,cy:C,x0:-c,y0:-f,x1:T*(n/w-1),y1:C*(n/w-1)}}function nG(r){var t;if(Z(r)){var e=r.length;if(!e)return r;e===1?t=[r[0],r[0],0,0]:e===2?t=[r[0],r[0],r[1],r[1]]:e===3?t=r.concat(r[2]):t=r}else t=[r,r,r,r];return t}function iG(r,t){var e,a=Iu(t.r,0),n=Iu(t.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=t.startAngle,u=t.endAngle;if(!(isNaN(l)||isNaN(u))){var c=t.cx,f=t.cy,v=!!t.clockwise,h=Ox(u-l),d=h>Jp&&h%Jp;if(d>va&&(h=d),!(a>va))r.moveTo(c,f);else if(h>Jp-va)r.moveTo(c+a*Ds(l),f+a*no(l)),r.arc(c,f,a,l,u,!v),n>va&&(r.moveTo(c+n*Ds(u),f+n*no(u)),r.arc(c,f,n,u,l,v));else{var p=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0,b=void 0,T=void 0,C=void 0,D=void 0,M=void 0,L=void 0,I=void 0,P=void 0,R=a*Ds(l),E=a*no(l),O=n*Ds(u),k=n*no(u),N=h>va;if(N){var B=t.cornerRadius;B&&(e=nG(B),p=e[0],g=e[1],y=e[2],m=e[3]);var F=Ox(a-n)/2;if(_=Ea(F,y),S=Ea(F,m),w=Ea(F,p),x=Ea(F,g),C=b=Iu(_,S),D=T=Iu(w,x),(b>va||T>va)&&(M=a*Ds(u),L=a*no(u),I=n*Ds(l),P=n*no(l),hva){var fe=Ea(y,C),U=Ea(m,C),z=bf(I,P,R,E,a,fe,v),J=bf(M,L,O,k,a,U,v);r.moveTo(c+z.cx+z.x0,f+z.cy+z.y0),C0&&r.arc(c+z.cx,f+z.cy,fe,ar(z.y0,z.x0),ar(z.y1,z.x1),!v),r.arc(c,f,a,ar(z.cy+z.y1,z.cx+z.x1),ar(J.cy+J.y1,J.cx+J.x1),!v),U>0&&r.arc(c+J.cx,f+J.cy,U,ar(J.y1,J.x1),ar(J.y0,J.x0),!v))}else r.moveTo(c+R,f+E),r.arc(c,f,a,l,u,!v);if(!(n>va)||!N)r.lineTo(c+O,f+k);else if(D>va){var fe=Ea(p,D),U=Ea(g,D),z=bf(O,k,M,L,n,-U,v),J=bf(R,E,I,P,n,-fe,v);r.lineTo(c+z.cx+z.x0,f+z.cy+z.y0),D0&&r.arc(c+z.cx,f+z.cy,U,ar(z.y0,z.x0),ar(z.y1,z.x1),!v),r.arc(c,f,n,ar(z.cy+z.y1,z.cx+z.x1),ar(J.cy+J.y1,J.cx+J.x1),v),fe>0&&r.arc(c+J.cx,f+J.cy,fe,ar(J.y1,J.x1),ar(J.y0,J.x0),!v))}else r.lineTo(c+O,f+k),r.arc(c,f,n,u,l,v)}r.closePath()}}}var oG=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}(),yL=function(r){V(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new oG},t.prototype.buildPath=function(e,a){iG(e,a)},t.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},t}(Fe);yL.prototype.type="sector";const Sr=yL;var sG=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),mL=function(r){V(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new sG},t.prototype.buildPath=function(e,a){var n=a.cx,i=a.cy,o=Math.PI*2;e.moveTo(n+a.r,i),e.arc(n,i,a.r,0,o,!1),e.moveTo(n+a.r0,i),e.arc(n,i,a.r0,0,o,!0)},t}(Fe);mL.prototype.type="ring";const Cd=mL;function lG(r,t,e,a){var n=[],i=[],o=[],s=[],l,u,c,f;if(a){c=[1/0,1/0],f=[-1/0,-1/0];for(var v=0,h=r.length;v=2){if(a){var i=lG(n,a,e,t.smoothConstraint);r.moveTo(n[0][0],n[0][1]);for(var o=n.length,s=0;s<(e?o:o-1);s++){var l=i[s*2],u=i[s*2+1],c=n[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(n[0][0],n[0][1]);for(var s=1,f=n.length;soo[1]){if(i=!1,Ut.negativeSize||a)return i;var l=Cf(oo[0]-io[1]),u=Cf(io[0]-oo[1]);Qp(l,u)>Df.len()&&(l=u||!Ut.bidirectional)&&(we.scale(Tf,s,-u*n),Ut.useDir&&Ut.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(t,e,a){for(var n=this._axes[t],i=this._origin,o=e[0].dot(n)+i[t],s=o,l=o,u=1;u0){var f=c.duration,v=c.delay,h=c.easing,d={duration:f,delay:v||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?t.animateFrom(e,d):t.animateTo(e,d)}else t.stopAnimation(),!s&&t.attr(e),o&&o(1),i&&i()}function Ze(r,t,e,a,n,i){n1("update",r,t,e,a,n,i)}function lt(r,t,e,a,n,i){n1("enter",r,t,e,a,n,i)}function ll(r){if(!r.__zr)return!0;for(var t=0;tWa(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function Vx(r){return!r.isGroup}function IG(r){return r.shape!=null}function Nc(r,t,e){if(!r||!t)return;function a(o){var s={};return o.traverse(function(l){Vx(l)&&l.anid&&(s[l.anid]=l)}),s}function n(o){var s={x:o.x,y:o.y,rotation:o.rotation};return IG(o)&&(s.shape=me(o.shape)),s}var i=a(r);t.traverse(function(o){if(Vx(o)&&o.anid){var s=i[o.anid];if(s){var l=n(o);o.attr(n(s)),Ze(o,l,e,De(o).dataIndex)}}})}function kL(r,t){return X(r,function(e){var a=e[0];a=bt(a,t.x),a=zr(a,t.x+t.width);var n=e[1];return n=bt(n,t.y),n=zr(n,t.y+t.height),[a,n]})}function LG(r,t){var e=bt(r.x,t.x),a=zr(r.x+r.width,t.x+t.width),n=bt(r.y,t.y),i=zr(r.y+r.height,t.y+t.height);if(a>=e&&i>=n)return{x:e,y:n,width:a-e,height:i-n}}function Bc(r,t,e){var a=$({rectHover:!0},t),n=a.style={strokeNoScale:!0};if(e=e||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(n.image=r.slice(8),xe(n,e),new rr(a)):cc(r.replace("path://",""),a,e,"center")}function Lu(r,t,e,a,n){for(var i=0,o=n[n.length-1];i1)return!1;var g=eg(h,d,c,f)/v;return!(g<0||g>1)}function eg(r,t,e,a){return r*a-e*t}function PG(r){return r<=1e-6&&r>=-1e-6}function jo(r,t,e,a,n){return t==null||($e(t)?ht[0]=ht[1]=ht[2]=ht[3]=t:(ht[0]=t[0],ht[1]=t[1],ht[2]=t[2],ht[3]=t[3]),a&&(ht[0]=bt(0,ht[0]),ht[1]=bt(0,ht[1]),ht[2]=bt(0,ht[2]),ht[3]=bt(0,ht[3])),e&&(ht[0]=-ht[0],ht[1]=-ht[1],ht[2]=-ht[2],ht[3]=-ht[3]),zx(r,ht,"x","width",3,1,n&&n[0]||0),zx(r,ht,"y","height",0,2,n&&n[1]||0)),r}var ht=[0,0,0,0];function zx(r,t,e,a,n,i,o){var s=t[i]+t[n],l=r[a];r[a]+=s,o=bt(0,zr(o,l)),r[a]=0?-t[n]:t[i]>=0?l+t[i]:Wa(s)>1e-8?(l-o)*t[n]/s:0):r[e]-=t[n]}function Hn(r){var t=r.itemTooltipOption,e=r.componentModel,a=r.itemName,n=oe(t)?{formatter:t}:t,i=e.mainType,o=e.componentIndex,s={componentType:i,name:a,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&A(He(l),function(c){ue(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=De(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:a,option:xe({content:a,encodeHTMLContent:!0,formatterParams:s},n)}}function zm(r,t){var e;r.isGroup&&(e=t(r)),e||r.traverse(t)}function Vi(r,t){if(r)if(Z(r))for(var e=0;et&&(t=o),ot&&(e=t=0),{min:e,max:t}}function Ad(r,t,e){OL(r,t,e,-1/0)}function OL(r,t,e,a){if(r.ignoreModelZ)return a;var n=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function zi(r,t){return Re(Re({},r,!0),t,!0)}const WG={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:". "}}}},YG={time:{month:["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"],monthAbbr:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],dayOfWeek:["星期日","星期一","星期二","星期三","星期四","星期五","星期六"],dayOfWeekAbbr:["日","一","二","三","四","五","六"]},legend:{selector:{all:"全选",inverse:"反选"}},toolbox:{brush:{title:{rect:"矩形选择",polygon:"圈选",lineX:"横向选择",lineY:"纵向选择",keep:"保持选择",clear:"清除选择"}},dataView:{title:"数据视图",lang:["数据视图","关闭","刷新"]},dataZoom:{title:{zoom:"区域缩放",back:"区域缩放还原"}},magicType:{title:{line:"切换为折线图",bar:"切换为柱状图",stack:"切换为堆叠",tiled:"切换为平铺"}},restore:{title:"还原"},saveAsImage:{title:"保存为图片",lang:["右键另存为图片"]}},series:{typeNames:{pie:"饼图",bar:"柱状图",line:"折线图",scatter:"散点图",effectScatter:"涟漪散点图",radar:"雷达图",tree:"树图",treemap:"矩形树图",boxplot:"箱型图",candlestick:"K线图",k:"K线图",heatmap:"热力图",map:"地图",parallel:"平行坐标图",lines:"线图",graph:"关系图",sankey:"桑基图",funnel:"漏斗图",gauge:"仪表盘图",pictorialBar:"象形柱图",themeRiver:"主题河流图",sunburst:"旭日图",custom:"自定义图表",chart:"图表"}},aria:{general:{withTitle:"这是一个关于“{title}”的图表。",withoutTitle:"这是一个图表,"},series:{single:{prefix:"",withName:"图表类型是{seriesType},表示{seriesName}。",withoutName:"图表类型是{seriesType}。"},multiple:{prefix:"它由{seriesCount}个图表系列组成。",withName:"第{seriesId}个系列是一个表示{seriesName}的{seriesType},",withoutName:"第{seriesId}个系列是一个{seriesType},",separator:{middle:";",end:"。"}}},data:{allData:"其数据是——",partialData:"其中,前{displayCnt}项是——",withName:"{name}的数据是{value}",withoutName:"{value}",separator:{middle:",",end:""}}}};var dh="ZH",l1="EN",ul=l1,Bv={},u1={},GL=qe.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||ul).toUpperCase();return r.indexOf(dh)>-1?dh:ul}():ul;function HL(r,t){r=r.toUpperCase(),u1[r]=new Xe(t),Bv[r]=t}function UG(r){if(oe(r)){var t=Bv[r.toUpperCase()]||{};return r===dh||r===l1?me(t):Re(me(t),me(Bv[ul]),!1)}else return Re(me(r),me(Bv[ul]),!1)}function Gm(r){return u1[r]}function ZG(){return u1[ul]}HL(l1,WG);HL(dh,YG);var Hm=null;function XG(r){Hm||(Hm=r)}function It(){return Hm}var c1=1e3,f1=c1*60,Zu=f1*60,na=Zu*24,Wx=na*365,qG={year:/({yyyy}|{yy})/,month:/({MMMM}|{MMM}|{MM}|{M})/,day:/({dd}|{d})/,hour:/({HH}|{H}|{hh}|{h})/,minute:/({mm}|{m})/,second:/({ss}|{s})/,millisecond:/({SSS}|{S})/},Vv={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},jG="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Af="{yyyy}-{MM}-{dd}",Yx={year:"{yyyy}",month:"{yyyy}-{MM}",day:Af,hour:Af+" "+Vv.hour,minute:Af+" "+Vv.minute,second:Af+" "+Vv.second,millisecond:jG},Rr=["year","month","day","hour","minute","second","millisecond"],KG=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function JG(r){return!oe(r)&&!ye(r)?QG(r):r}function QG(r){r=r||{};var t={},e=!0;return A(Rr,function(a){e&&(e=r[a]==null)}),A(Rr,function(a,n){var i=r[a];t[a]={};for(var o=null,s=n;s>=0;s--){var l=Rr[s],u=be(i)&&!Z(i)?i[l]:i,c=void 0;Z(u)?(c=u.slice(),o=c[0]||""):oe(u)?(o=u,c=[o]):(o==null?o=Vv[a]:qG[l].test(o)||(o=t[l][l][0]+" "+o),c=[o],e&&(c[1]="{primary|"+o+"}")),t[a][l]=c}}),t}function Kn(r,t){return r+="","0000".substr(0,t-r.length)+r}function Xu(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 eH(r){return r===Xu(r)}function tH(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ld(r,t,e,a){var n=is(r),i=n[$L(e)](),o=n[v1(e)]()+1,s=Math.floor((o-1)/3)+1,l=n[h1(e)](),u=n["get"+(e?"UTC":"")+"Day"](),c=n[d1(e)](),f=(c-1)%12+1,v=n[p1(e)](),h=n[g1(e)](),d=n[y1(e)](),p=c>=12?"pm":"am",g=p.toUpperCase(),y=a instanceof Xe?a:Gm(a||GL)||ZG(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),w=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(t||"").replace(/{a}/g,p+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Kn(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Kn(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Kn(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,w[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Kn(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Kn(f+"",2)).replace(/{h}/g,f+"").replace(/{mm}/g,Kn(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,Kn(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Kn(d,3)).replace(/{S}/g,d+"")}function rH(r,t,e,a,n){var i=null;if(oe(e))i=e;else if(ye(e)){var o={time:r.time,level:r.time.level},s=It();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=e(r.value,t,o)}else{var l=r.time;if(l){var u=e[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var c=el(r.value,n);i=e[c][c][0]}}return Ld(new Date(r.value),i,n,a)}function el(r,t){var e=is(r),a=e[v1(t)]()+1,n=e[h1(t)](),i=e[d1(t)](),o=e[p1(t)](),s=e[g1(t)](),l=e[y1(t)](),u=l===0,c=u&&s===0,f=c&&o===0,v=f&&i===0,h=v&&n===1,d=h&&a===1;return d?"year":h?"month":v?"day":f?"hour":c?"minute":u?"second":"millisecond"}function $m(r,t,e){switch(t){case"year":r[WL(e)](0);case"month":r[YL(e)](1);case"day":r[UL(e)](0);case"hour":r[ZL(e)](0);case"minute":r[XL(e)](0);case"second":r[qL(e)](0)}return r}function $L(r){return r?"getUTCFullYear":"getFullYear"}function v1(r){return r?"getUTCMonth":"getMonth"}function h1(r){return r?"getUTCDate":"getDate"}function d1(r){return r?"getUTCHours":"getHours"}function p1(r){return r?"getUTCMinutes":"getMinutes"}function g1(r){return r?"getUTCSeconds":"getSeconds"}function y1(r){return r?"getUTCMilliseconds":"getMilliseconds"}function aH(r){return r?"setUTCFullYear":"setFullYear"}function WL(r){return r?"setUTCMonth":"setMonth"}function YL(r){return r?"setUTCDate":"setDate"}function UL(r){return r?"setUTCHours":"setHours"}function ZL(r){return r?"setUTCMinutes":"setMinutes"}function XL(r){return r?"setUTCSeconds":"setSeconds"}function qL(r){return r?"setUTCMilliseconds":"setMilliseconds"}function jL(r){if(!II(r))return oe(r)?r:"-";var t=(r+"").split(".");return t[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(t.length>1?"."+t[1]:"")}function KL(r,t){return r=(r||"").toLowerCase().replace(/-(.)/g,function(e,a){return a.toUpperCase()}),t&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var Vc=cd;function Wm(r,t,e){var a="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function n(c){return c&&ia(c)?c:"-"}function i(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=t==="time",s=r instanceof Date;if(o||s){var l=o?is(r):r;if(isNaN(+l)){if(s)return"-"}else return Ld(l,a,e)}if(t==="ordinal")return em(r)?n(r):$e(r)&&i(r)?r+"":"-";var u=En(r);return i(u)?jL(u):em(r)?n(r):typeof r=="boolean"?r+"":"-"}var Ux=["a","b","c","d","e","f","g"],ag=function(r,t){return"{"+r+(t??"")+"}"};function JL(r,t,e){Z(t)||(t=[t]);var a=t.length;if(!a)return"";for(var n=t[0].$vars||[],i=0;i':'';var o=e.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 Jo(r,t){return t=t||"transparent",oe(r)?r:be(r)&&r.colorStops&&(r.colorStops[0]||{}).color||t}function ph(r,t){if(t==="_blank"||t==="blank"){var e=window.open();e.opener=null,e.location.href=r}else window.open(r,t)}var zv={},ng={},oH=function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(t,e){this._nonSeriesBoxMasterList=a(zv),this._normalMasterList=a(ng);function a(n,i){var o=[];return A(n,function(s,l){var u=s.create(t,e);o=o.concat(u||[])}),o}},r.prototype.update=function(t,e){A(this._normalMasterList,function(a){a.update&&a.update(t,e)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(t,e){if(t==="matrix"||t==="calendar"){zv[t]=e;return}ng[t]=e},r.get=function(t){return ng[t]||zv[t]},r}();function sH(r){return!!zv[r]}var Ym={coord:1,coord2:2};function lH(r){QL.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var QL=ve();function uH(r){var t=r.getShallow("coord",!0),e=Ym.coord;if(t==null){var a=QL.get(r.type);a&&a.getCoord2&&(e=Ym.coord2,t=a.getCoord2(r))}return{coord:t,from:e}}var Ha={none:0,dataCoordSys:1,boxCoordSys:2};function eP(r,t){var e=r.getShallow("coordinateSystem"),a=r.getShallow("coordinateSystemUsage",!0),n=Ha.none;if(e){var i=r.mainType==="series";a==null&&(a=i?"data":"box"),a==="data"?(n=Ha.dataCoordSys,i||(n=Ha.none)):a==="box"&&(n=Ha.boxCoordSys,!i&&!sH(e)&&(n=Ha.none))}return{coordSysType:e,kind:n}}function zc(r){var t=r.targetModel,e=r.coordSysType,a=r.coordSysProvider,n=r.isDefaultDataCoordSys;r.allowNotFound;var i=eP(t),o=i.kind,s=i.coordSysType;if(n&&o!==Ha.dataCoordSys&&(o=Ha.dataCoordSys,s=e),o===Ha.none||s!==e)return!1;var l=a(e,t);return l?(o===Ha.dataCoordSys?t.coordinateSystem=l:t.boxCoordinateSystem=l,!0):!1}var tP=function(r,t){var e=t.getReferringComponents(r,gt).models[0];return e&&e.coordinateSystem};const Fc=oH;var Fv=A,rP=["left","right","top","bottom","width","height"],Po=[["width","left","right"],["height","top","bottom"]];function m1(r,t,e,a,n){var i=0,o=0;a==null&&(a=1/0),n==null&&(n=1/0);var s=0;t.eachChild(function(l,u){var c=l.getBoundingRect(),f=t.childAt(u+1),v=f&&f.getBoundingRect(),h,d;if(r==="horizontal"){var p=c.width+(v?-v.x+c.x:0);h=i+p,h>a||l.newline?(i=0,h=p,o+=s+e,s=c.height):s=Math.max(s,c.height)}else{var g=c.height+(v?-v.y+c.y:0);d=o+g,d>n||l.newline?(i+=s+e,o=0,d=g,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+e:o=d+e)})}var Ho=m1;Pe(m1,"vertical");Pe(m1,"horizontal");function aP(r,t){return{left:r.getShallow("left",t),top:r.getShallow("top",t),right:r.getShallow("right",t),bottom:r.getShallow("bottom",t),width:r.getShallow("width",t),height:r.getShallow("height",t)}}function cH(r,t){var e=Ft(r,t,{enableLayoutOnlyByCenter:!0}),a=r.getBoxLayoutParams(),n,i;if(e.type===Pu.point)i=e.refPoint,n=ct(a,{width:t.getWidth(),height:t.getHeight()});else{var o=r.get("center"),s=Z(o)?o:[o,o];n=ct(a,e.refContainer),i=e.boxCoordFrom===Ym.coord2?e.refPoint:[ne(s[0],n.width)+n.x,ne(s[1],n.height)+n.y]}return{viewRect:n,center:i}}function nP(r,t){var e=cH(r,t),a=e.viewRect,n=e.center,i=r.get("radius");Z(i)||(i=[0,i]);var o=ne(a.width,t.getWidth()),s=ne(a.height,t.getHeight()),l=Math.min(o,s),u=ne(i[0],l/2),c=ne(i[1],l/2);return{cx:n[0],cy:n[1],r0:u,r:c,viewRect:a}}function ct(r,t,e){e=Vc(e||0);var a=t.width,n=t.height,i=ne(r.left,a),o=ne(r.top,n),s=ne(r.right,a),l=ne(r.bottom,n),u=ne(r.width,a),c=ne(r.height,n),f=e[2]+e[0],v=e[1]+e[3],h=r.aspect;switch(isNaN(u)&&(u=a-s-v-i),isNaN(c)&&(c=n-l-f-o),h!=null&&(isNaN(u)&&isNaN(c)&&(h>a/n?u=a*.8:c=n*.8),isNaN(u)&&(u=h*c),isNaN(c)&&(c=u/h)),isNaN(i)&&(i=a-s-u-v),isNaN(o)&&(o=n-l-c-f),r.left||r.right){case"center":i=a/2-u/2-e[3];break;case"right":i=a-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=n/2-c/2-e[0];break;case"bottom":o=n-c-f;break}i=i||0,o=o||0,isNaN(u)&&(u=a-v-i-(s||0)),isNaN(c)&&(c=n-f-o-(l||0));var d=new Ce((t.x||0)+i+e[3],(t.y||0)+o+e[0],u,c);return d.margin=e,d}function iP(r,t,e){var a=r.getShallow("preserveAspect",!0);if(!a)return t;var n=t.width/t.height;if(Math.abs(Math.atan(e)-Math.atan(n))<1e-9)return t;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:t.width,height:t.height},l=a==="cover";return n>e&&!l||n=p)return f;for(var g=0;g=0;l--)s=Re(s,n[l],!0);a.defaultOption=s}return a.defaultOption},t.prototype.getReferringComponents=function(e,a){var n=e+"Index",i=e+"Id";return Il(this.ecModel,e,{index:this.get(n,!0),id:this.get(i,!0)},a)},t.prototype.getBoxLayoutParams=function(){return aP(this,!1)},t.prototype.getZLevelKey=function(){return""},t.prototype.setZLevel=function(e){this.option.zlevel=e},t.protoInitialize=function(){var e=t.prototype;e.type="component",e.id="",e.name="",e.mainType="",e.subType="",e.componentIndex=0}(),t}(Xe);FI(Ol,Xe);gd(Ol);HG(Ol);$G(Ol,hH);function hH(r){var t=[];return A(Ol.getClassesByMainType(r),function(e){t=t.concat(e.dependencies||e.prototype.dependencies||[])}),t=X(t,function(e){return Ua(e).main}),r!=="dataset"&&ke(t,"dataset")<=0&&t.unshift("dataset"),t}const We=Ol;var ko={color:{},darkColor:{},size:{}},_t=ko.color={theme:["#5070dd","#b6d634","#505372","#ff994d","#0ca8df","#ffd10a","#fb628b","#785db0","#3fbe95"],neutral00:"#fff",neutral05:"#f4f7fd",neutral10:"#e8ebf0",neutral15:"#dbdee4",neutral20:"#cfd2d7",neutral25:"#c3c5cb",neutral30:"#b7b9be",neutral35:"#aaacb2",neutral40:"#9ea0a5",neutral45:"#929399",neutral50:"#86878c",neutral55:"#797b7f",neutral60:"#6d6e73",neutral65:"#616266",neutral70:"#54555a",neutral75:"#48494d",neutral80:"#3c3c41",neutral85:"#303034",neutral90:"#232328",neutral95:"#17171b",neutral99:"#000",accent05:"#eff1f9",accent10:"#e0e4f2",accent15:"#d0d6ec",accent20:"#c0c9e6",accent25:"#b1bbdf",accent30:"#a1aed9",accent35:"#91a0d3",accent40:"#8292cc",accent45:"#7285c6",accent50:"#6578ba",accent55:"#5c6da9",accent60:"#536298",accent65:"#4a5787",accent70:"#404c76",accent75:"#374165",accent80:"#2e3654",accent85:"#252b43",accent90:"#1b2032",accent95:"#121521",transparent:"rgba(0,0,0,0)",highlight:"rgba(255,231,130,0.8)"};$(_t,{primary:_t.neutral80,secondary:_t.neutral70,tertiary:_t.neutral60,quaternary:_t.neutral50,disabled:_t.neutral20,border:_t.neutral30,borderTint:_t.neutral20,borderShade:_t.neutral40,background:_t.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:_t.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:_t.neutral70,axisLineTint:_t.neutral40,axisTick:_t.neutral70,axisTickMinor:_t.neutral60,axisLabel:_t.neutral70,axisSplitLine:_t.neutral15,axisMinorSplitLine:_t.neutral05});for(var so in _t)if(_t.hasOwnProperty(so)){var Zx=_t[so];so==="theme"?ko.darkColor.theme=_t.theme.slice():so==="highlight"?ko.darkColor.highlight="rgba(255,231,130,0.4)":so.indexOf("accent")===0?ko.darkColor[so]=xi(Zx,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):ko.darkColor[so]=xi(Zx,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}ko.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};const G=ko;var sP="";typeof navigator<"u"&&(sP=navigator.platform||"");var Ms="rgba(0, 0, 0, 0.2)",lP=G.color.theme[0],dH=xi(lP,null,null,.9);const pH={darkMode:"auto",colorBy:"series",color:G.color.theme,gradientColor:[dH,lP],aria:{decal:{decals:[{color:Ms,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Ms,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Ms,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Ms,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Ms,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Ms,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:sP.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 uP=ve(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),Fr="original",qt="arrayRows",Gr="objectRows",Ma="keyedColumns",Ci="typedArray",cP="unknown",Sa="column",us="row",jt={Must:1,Might:2,Not:3},fP=ze();function gH(r){fP(r).datasetMap=ve()}function vP(r,t,e){var a={},n=S1(t);if(!n||!r)return a;var i=[],o=[],s=t.ecModel,l=fP(s).datasetMap,u=n.uid+"_"+e.seriesLayoutBy,c,f;r=r.slice(),A(r,function(p,g){var y=be(p)?p:r[g]={name:p};y.type==="ordinal"&&c==null&&(c=g,f=d(y)),a[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:f,valueWayDim:0});A(r,function(p,g){var y=p.name,m=d(p);if(c==null){var _=v.valueWayDim;h(a[y],_,m),h(o,_,m),v.valueWayDim+=m}else if(c===g)h(a[y],0,m),h(i,0,m);else{var _=v.categoryWayDim;h(a[y],_,m),h(o,_,m),v.categoryWayDim+=m}});function h(p,g,y){for(var m=0;mt)return r[a];return r[e-1]}function pP(r,t,e,a,n,i,o){i=i||r;var s=t(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(n))return u[n];var c=o==null||!a?e:wH(a,o);if(c=c||e,!(!c||!c.length)){var f=c[l];return n&&(u[n]=f),s.paletteIdx=(l+1)%c.length,f}}function xH(r,t){t(r).paletteIdx=0,t(r).paletteNameMap={}}var If,eu,qx,jx="\0_ec_inner",bH=1,gP=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e,a,n,i,o,s){i=i||{},this.option=null,this._theme=new Xe(i),this._locale=new Xe(o),this._optionManager=s},t.prototype.setOption=function(e,a,n){var i=Qx(a);this._optionManager.setOption(e,n,i),this._resetOption(null,i)},t.prototype.resetOption=function(e,a){return this._resetOption(e,Qx(a))},t.prototype._resetOption=function(e,a){var n=!1,i=this._optionManager;if(!e||e==="recreate"){var o=i.mountOption(e==="recreate");!this.option||e==="recreate"?qx(this,o):(this.restoreData(),this._mergeOption(o,a)),n=!0}if((e==="timeline"||e==="media")&&this.restoreData(),!e||e==="recreate"||e==="timeline"){var s=i.getTimelineOption(this);s&&(n=!0,this._mergeOption(s,a))}if(!e||e==="recreate"||e==="media"){var l=i.getMediaOption(this);l.length&&A(l,function(u){n=!0,this._mergeOption(u,a)},this)}return n},t.prototype.mergeOption=function(e){this._mergeOption(e,null)},t.prototype._mergeOption=function(e,a){var n=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=ve(),u=a&&a.replaceMergeMainTypeMap;gH(this),A(e,function(f,v){f!=null&&(We.hasClass(v)?v&&(s.push(v),l.set(v,!0)):n[v]=n[v]==null?me(f):Re(n[v],f,!0))}),u&&u.each(function(f,v){We.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),We.topologicalTravel(s,We.getAllClassMainTypes(),c,this);function c(f){var v=_H(this,f,at(e[f])),h=i.get(f),d=h?u&&u.get(f)?"replaceMerge":"normalMerge":"replaceAll",p=OI(h,v,d);T3(p,f,We),n[f]=null,i.set(f,null),o.set(f,0);var g=[],y=[],m=0,_;A(p,function(S,w){var x=S.existing,b=S.newOption;if(!b)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=f==="series",C=We.getClass(f,S.keyInfo.subType,!T);if(!C)return;if(f==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===C)x.name=S.keyInfo.name,x.mergeOption(b,this),x.optionUpdated(b,!1);else{var D=$({componentIndex:w},S.keyInfo);x=new C(b,this,this,D),$(x,D),S.brandNew&&(x.__requireNewView=!0),x.init(b,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[f]=g,i.set(f,y),o.set(f,m),f==="series"&&If(this)}this._seriesIndices||If(this)},t.prototype.getOption=function(){var e=me(this.option);return A(e,function(a,n){if(We.hasClass(n)){for(var i=at(a),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!oc(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,e[n]=i}}),delete e[jx],e},t.prototype.setTheme=function(e){this._theme=new Xe(e),this._resetOption("recreate",null)},t.prototype.getTheme=function(){return this._theme},t.prototype.getLocaleModel=function(){return this._locale},t.prototype.setUpdatePayload=function(e){this._payload=e},t.prototype.getUpdatePayload=function(){return this._payload},t.prototype.getComponent=function(e,a){var n=this._componentsMap.get(e);if(n){var i=n[a||0];if(i)return i;if(a==null){for(var o=0;o=t:e==="max"?r<=t:r===t}function RH(r,t){return r.join(",")===t.join(",")}const EH=IH;var fa=A,hc=be,eb=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function ig(r){var t=r&&r.itemStyle;if(t)for(var e=0,a=eb.length;e0?e[o-1].seriesModel:null)}),$H(e)}})}function $H(r){A(r,function(t,e){var a=[],n=[NaN,NaN],i=[t.stackResultDimension,t.stackedOverDimension],o=t.data,s=t.isStackedByIndex,l=t.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,c,f){var v=o.get(t.stackedDimension,f);if(isNaN(v))return n;var h,d;s?d=o.getRawIndex(f):h=o.get(t.stackedByDimension,f);for(var p=NaN,g=e-1;g>=0;g--){var y=r[g];if(s||(d=y.data.rawIndexOf(y.stackedByDimension,h)),d>=0){var m=y.data.getByRawIndex(y.stackResultDimension,d);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=f3(v,m),p=m;break}}}return a[0]=v,a[1]=p,a})})}var kd=function(){function r(t){this.data=t.data||(t.sourceFormat===Ma?{}:[]),this.sourceFormat=t.sourceFormat||cP,this.seriesLayoutBy=t.seriesLayoutBy||Sa,this.startIndex=t.startIndex||0,this.dimensionsDetectedCount=t.dimensionsDetectedCount,this.metaRawOption=t.metaRawOption;var e=this.dimensionsDefine=t.dimensionsDefine;if(e)for(var a=0;ap&&(p=_)}h[0]=d,h[1]=p}},n=function(){return this._data?this._data.length/this._dimSize:0};sb=(t={},t[qt+"_"+Sa]={pure:!0,appendData:i},t[qt+"_"+us]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},t[Gr]={pure:!0,appendData:i},t[Ma]={pure:!0,appendData:function(o){var s=this._data;A(o,function(l,u){for(var c=s[u]||(s[u]=[]),f=0;f<(l||[]).length;f++)c.push(l[f])})}},t[Fr]={appendData:i},t[Ci]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},t);function i(o){for(var s=0;s=0&&(p=o.interpolatedValue[g])}return p!=null?p+"":""})}},r.prototype.getRawValue=function(t,e){return pl(this.getData(e),t)},r.prototype.formatTooltip=function(t,e,a){},r}();function fb(r){var t,e;return be(r)?r.type&&(e=r):t=r,{text:t,frag:e}}function qu(r){return new KH(r)}var KH=function(){function r(t){t=t||{},this._reset=t.reset,this._plan=t.plan,this._count=t.count,this._onDirty=t.onDirty,this._dirty=!0}return r.prototype.perform=function(t){var e=this._upstream,a=t&&t.skip;if(this._dirty&&e){var n=this.context;n.data=n.outputData=e.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!a&&(i=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(t&&t.modBy),u=t&&t.modDataCount||0;(o!==l||s!==u)&&(i="reset");function c(m){return!(m>=1)&&(m=1),m}var f;(this._dirty||i==="reset")&&(this._dirty=!1,f=this._doReset(a)),this._modBy=l,this._modDataCount=u;var v=t&&t.step;if(e?this._dueEnd=e._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,d=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!a&&(f||h1&&a>0?s:o}};return i;function o(){return t=r?null:lt},gte:function(r,t){return r>=t}},QH=function(){function r(t,e){if(!$e(e)){var a="";je(a)}this._opFn=AP[t],this._rvalFloat=En(e)}return r.prototype.evaluate=function(t){return $e(t)?this._opFn(t,this._rvalFloat):this._opFn(En(t),this._rvalFloat)},r}(),IP=function(){function r(t,e){var a=t==="desc";this._resultLT=a?1:-1,e==null&&(e=a?"min":"max"),this._incomparable=e==="min"?-1/0:1/0}return r.prototype.evaluate=function(t,e){var a=$e(t)?t:En(t),n=$e(e)?e:En(e),i=isNaN(a),o=isNaN(n);if(i&&(a=this._incomparable),o&&(n=this._incomparable),i&&o){var s=oe(t),l=oe(e);s&&(a=l?t:0),l&&(n=s?e:0)}return an?-this._resultLT:0},r}(),e$=function(){function r(t,e){this._rval=e,this._isEQ=t,this._rvalTypeof=typeof e,this._rvalFloat=En(e)}return r.prototype.evaluate=function(t){var e=t===this._rval;if(!e){var a=typeof t;a!==this._rvalTypeof&&(a==="number"||this._rvalTypeof==="number")&&(e=En(t)===this._rvalFloat)}return this._isEQ?e:!e},r}();function t$(r,t){return r==="eq"||r==="ne"?new e$(r==="eq",t):ue(AP,r)?new QH(r,t):null}var r$=function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(t){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(t){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(t,e){},r.prototype.retrieveValueFromItem=function(t,e){},r.prototype.convertValue=function(t,e){return Ti(t,e)},r}();function a$(r,t){var e=new r$,a=r.data,n=e.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Sa&&je(o);var s=[],l={},u=r.dimensionsDefine;if(u)A(u,function(p,g){var y=p.name,m={index:g,name:y,displayName:p.displayName};if(s.push(m),y!=null){var _="";ue(l,y)&&je(_),l[y]=m}});else for(var c=0;c65535?f$:v$}function Is(){return[1/0,-1/0]}function h$(r){var t=r.constructor;return t===Array?r.slice():new t(r)}function db(r,t,e,a,n){var i=kP[e||"float"];if(n){var o=r[t],s=o&&o.length;if(s!==a){for(var l=new i(a),u=0;ug[1]&&(g[1]=p)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(t,e,a){for(var n=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=X(o,function(m){return m.property}),c=0;cy[1]&&(y[1]=g)}}!n.persistent&&n.clean&&n.clean(),this._rawCount=this._count=e,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(t,e){if(!(e>=0&&e=0&&e=this._rawCount||t<0)return-1;if(!this._indices)return t;var e=this._indices,a=e[t];if(a!=null&&at)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var t,e=this._indices;if(e){var a=e.constructor,n=this._count;if(a===Array){t=new a(n);for(var i=0;i=f&&m<=v||isNaN(m))&&(l[u++]=p),p++}d=!0}else if(i===2){for(var g=h[n[0]],_=h[n[1]],S=t[n[1]][0],w=t[n[1]][1],y=0;y=f&&m<=v||isNaN(m))&&(x>=S&&x<=w||isNaN(x))&&(l[u++]=p),p++}d=!0}}if(!d)if(i===1)for(var y=0;y=f&&m<=v||isNaN(m))&&(l[u++]=b)}else for(var y=0;yt[D][1])&&(T=!1)}T&&(l[u++]=e.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(t,e){var a=this.clone([t],!0),n=a._chunks,i=n[t],o=this.count(),s=0,l=Math.floor(1/e),u=this.getRawIndex(0),c,f,v,h=new(As(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var d=1;dc&&(c=f,v=S)}M>0&&Ms&&(p=s-c);for(var g=0;gd&&(d=m,h=c+g)}var _=this.getRawIndex(f),S=this.getRawIndex(h);fc-d&&(l=c-d,s.length=l);for(var p=0;pf[1]&&(f[1]=y),v[h++]=m}return i._count=h,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(t,e){if(this._count)for(var a=t.length,n=this._chunks,i=0,o=this.count();il&&(l=f)}return o=[s,l],this._extent[t]=o,o},r.prototype.getRawDataItem=function(t){var e=this.getRawIndex(t);if(this._provider.persistent)return this._provider.getItem(e);for(var a=[],n=this._chunks,i=0;i=0?this._indices[t]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function t(e,a,n,i){return Ti(e[i],this._dimensions[i])}lg={arrayRows:t,objectRows:function(e,a,n,i){return Ti(e[a],this._dimensions[i])},keyedColumns:t,original:function(e,a,n,i){var o=e&&(e.value==null?e:e.value);return Ti(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(e,a,n,i){return e[i]}}}(),r}(),RP=function(){function r(t){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=t}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(t,e){this._sourceList=t,this._upstreamSignList=e,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 t=this._sourceHost,e=this._getUpstreamSourceManagers(),a=!!e.length,n,i;if(Pf(t)){var o=t,s=void 0,l=void 0,u=void 0;if(a){var c=e[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,i=[c._getVersionSign()]}else s=o.get("data",!0),l=Pr(s)?Ci:Fr,i=[];var f=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},h=de(f.seriesLayoutBy,v.seriesLayoutBy)||null,d=de(f.sourceHeader,v.sourceHeader),p=de(f.dimensions,v.dimensions),g=h!==v.seriesLayoutBy||!!d!=!!v.sourceHeader||p;n=g?[Xm(s,{seriesLayoutBy:h,sourceHeader:d,dimensions:p},l)]:[]}else{var y=t;if(a){var m=this._applyTransform(e);n=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);n=[Xm(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(n,i)},r.prototype._applyTransform=function(t){var e=this._sourceHost,a=e.get("transform",!0),n=e.get("fromTransformResult",!0);if(n!=null){var i="";t.length!==1&&gb(i)}var o,s=[],l=[];return A(t,function(u){u.prepareSource();var c=u.getSource(n||0),f="";n!=null&&!c&&gb(f),s.push(c),l.push(u._getVersionSign())}),a?o=u$(a,s,{datasetIndex:e.componentIndex}):n!=null&&(o=[WH(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var t=this._getUpstreamSourceManagers(),e=0;e1||e>0&&!r.noHeader;return A(r.blocks,function(n){var i=BP(n);i>=t&&(t=i+ +(a&&(!i||jm(n)&&!n.noHeader)))}),t}return 0}function y$(r,t,e,a){var n=t.noHeader,i=_$(BP(t)),o=[],s=t.blocks||[];cr(!s||Z(s)),s=s||[];var l=r.orderMode;if(t.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ue(u,l)){var c=new IP(u[l],null);s.sort(function(p,g){return c.evaluate(p.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}A(s,function(p,g){var y=t.valueFormatter,m=NP(p)(y?$($({},r),{valueFormatter:y}):r,p,g>0?i.html:0,a);m!=null&&o.push(m)});var f=r.renderMode==="richText"?o.join(i.richText):Km(a,o.join(""),n?e:i.html);if(n)return f;var v=Wm(t.header,"ordinal",r.useUTC),h=OP(a,r.renderMode).nameStyle,d=EP(a);return r.renderMode==="richText"?VP(r,v,h)+i.richText+f:Km(a,'
'+or(v)+"
"+f,e)}function m$(r,t,e,a){var n=r.renderMode,i=t.noName,o=t.noValue,s=!t.markerType,l=t.name,u=r.useUTC,c=t.valueFormatter||r.valueFormatter||function(S){return S=Z(S)?S:[S],X(S,function(w,x){return Wm(w,Z(h)?h[x]:h,u)})};if(!(i&&o)){var f=s?"":r.markupStyleCreator.makeTooltipMarker(t.markerType,t.markerColor||G.color.secondary,n),v=i?"":Wm(l,"ordinal",u),h=t.valueType,d=o?[]:c(t.value,t.dataIndex),p=!s||!i,g=!s&&i,y=OP(a,n),m=y.nameStyle,_=y.valueStyle;return n==="richText"?(s?"":f)+(i?"":VP(r,v,m))+(o?"":x$(r,d,p,g,_)):Km(a,(s?"":f)+(i?"":S$(v,!s,m))+(o?"":w$(d,p,g,_)),e)}}function yb(r,t,e,a,n,i){if(r){var o=NP(r),s={useUTC:n,renderMode:e,orderMode:a,markupStyleCreator:t,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function _$(r){return{html:p$[r],richText:g$[r]}}function Km(r,t,e){var a='
',n="margin: "+e+"px 0 0",i=EP(r);return'
'+t+a+"
"}function S$(r,t,e){var a=t?"margin-left:2px":"";return''+or(r)+""}function w$(r,t,e,a){var n=e?"10px":"20px",i=t?"float:right;margin-left:"+n:"";return r=Z(r)?r:[r],''+X(r,function(o){return or(o)}).join("  ")+""}function VP(r,t,e){return r.markupStyleCreator.wrapRichTextStyle(t,e)}function x$(r,t,e,a,n){var i=[n],o=a?10:20;return e&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(Z(t)?t.join(" "):t,i)}function zP(r,t){var e=r.getData().getItemVisual(t,"style"),a=e[r.visualDrawType];return Jo(a)}function FP(r,t){var e=r.get("padding");return e??(t==="richText"?[8,10]:10)}var ug=function(){function r(){this.richTextStyles={},this._nextStyleNameId=LI()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(t,e,a){var n=a==="richText"?this._generateStyleName():null,i=iH({color:e,type:t,renderMode:a,markerId:n});return oe(i)?i:(this.richTextStyles[n]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(t,e){var a={};Z(e)?A(e,function(i){return $(a,i)}):$(a,e);var n=this._generateStyleName();return this.richTextStyles[n]=a,"{"+n+"|"+t+"}"},r}();function GP(r){var t=r.series,e=r.dataIndex,a=r.multipleSeries,n=t.getData(),i=n.mapDimensionsAll("defaultedTooltip"),o=i.length,s=t.getRawValue(e),l=Z(s),u=zP(t,e),c,f,v,h;if(o>1||l&&!o){var d=b$(s,t,e,i,u);c=d.inlineValues,f=d.inlineValueTypes,v=d.blocks,h=d.inlineValues[0]}else if(o){var p=n.getDimensionInfo(i[0]);h=c=pl(n,e,i[0]),f=p.type}else h=c=l?s[0]:s;var g=W_(t),y=g&&t.name||"",m=n.getName(e),_=a?y:m;return Pt("section",{header:y,noHeader:a||!g,sortParam:h,blocks:[Pt("nameValue",{markerType:"item",markerColor:u,name:_,noName:!ia(_),value:c,valueType:f,dataIndex:e})].concat(v||[])})}function b$(r,t,e,a,n){var i=t.getData(),o=en(r,function(f,v,h){var d=i.getDimensionInfo(h);return f=f||d&&d.tooltip!==!1&&d.displayName!=null},!1),s=[],l=[],u=[];a.length?A(a,function(f){c(pl(i,e,f),f)}):A(r,c);function c(f,v){var h=i.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(Pt("nameValue",{markerType:"subItem",markerColor:n,name:h.displayName,value:f,valueType:h.type})):(s.push(f),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Jn=ze();function kf(r,t){return r.getName(t)||r.getId(t)}var Gv="__universalTransitionEnabled",Od=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e._selectedDataIndicesMap={},e}return t.prototype.init=function(e,a,n){this.seriesIndex=this.componentIndex,this.dataTask=qu({count:T$,reset:D$}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(e,n);var i=Jn(this).sourceManager=new RP(this);i.prepareSource();var o=this.getInitialData(e,n);_b(o,this),this.dataTask.context.data=o,Jn(this).dataBeforeProcessed=o,mb(this),this._initSelectedMapFromData(o)},t.prototype.mergeDefaultAndTheme=function(e,a){var n=vc(this),i=n?ls(e):{},o=this.subType;We.hasClass(o)&&(o+="Series"),Re(e,a.getTheme().get(this.subType)),Re(e,this.getDefaultOption()),Uo(e,"label",["show"]),this.fillDataTextStyle(e.data),n&&nn(e,i,n)},t.prototype.mergeOption=function(e,a){e=Re(this.option,e,!0),this.fillDataTextStyle(e.data);var n=vc(this);n&&nn(this.option,e,n);var i=Jn(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(e,a);_b(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Jn(this).dataBeforeProcessed=o,mb(this),this._initSelectedMapFromData(o)},t.prototype.fillDataTextStyle=function(e){if(e&&!Pr(e))for(var a=["show"],n=0;n=0&&v<0)&&(f=m,v=y,h=0),y===v&&(c[h++]=p))}),c.length=h,c},t.prototype.formatTooltip=function(e,a,n){return GP({series:this,dataIndex:e,multipleSeries:a})},t.prototype.isAnimationEnabled=function(){var e=this.ecModel;if(qe.node&&!(e&&e.ssr))return!1;var a=this.getShallow("animation");return a&&this.getData().count()>this.getShallow("animationThreshold")&&(a=!1),!!a},t.prototype.restoreData=function(){this.dataTask.dirty()},t.prototype.getColorFromPalette=function(e,a,n){var i=this.ecModel,o=w1.prototype.getColorFromPalette.call(this,e,a,n);return o||(o=i.getColorFromPalette(e,a,n)),o},t.prototype.coordDimToDataDim=function(e){return this.getRawData().mapDimensionsAll(e)},t.prototype.getProgressive=function(){return this.get("progressive")},t.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},t.prototype.select=function(e,a){this._innerSelect(this.getData(a),e)},t.prototype.unselect=function(e,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},t.prototype.isSelected=function(e,a){var n=this.option.selectedMap;if(!n)return!1;var i=this.getData(a);return(n==="all"||n[kf(i,e)])&&!i.getItemModel(e).get(["select","disabled"])},t.prototype.isUniversalTransitionEnabled=function(){if(this[Gv])return!0;var e=this.option.universalTransition;return e?e===!0?!0:e&&e.enabled:!1},t.prototype._innerSelect=function(e,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"){be(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c0&&this._innerSelect(e,a)}},t.registerClass=function(e){return We.registerClass(e)},t.protoInitialize=function(){var e=t.prototype;e.type="series.__base__",e.seriesIndex=0,e.ignoreStyleOnData=!1,e.hasSymbolVisual=!1,e.defaultSymbol="circle",e.visualStyleAccessPath="itemStyle",e.visualDrawType="fill"}(),t}(We);Rt(Od,Rd);Rt(Od,w1);FI(Od,We);function mb(r){var t=r.name;W_(r)||(r.name=C$(r)||t)}function C$(r){var t=r.getRawData(),e=t.mapDimensionsAll("seriesName"),a=[];return A(e,function(n){var i=t.getDimensionInfo(n);i.displayName&&a.push(i.displayName)}),a.join(" ")}function T$(r){return r.model.getRawData().count()}function D$(r){var t=r.model;return t.setData(t.getRawData().cloneShallow()),M$}function M$(r,t){t.outputData&&r.end>t.outputData.count()&&t.model.getRawData().cloneShallow(t.outputData)}function _b(r,t){A(tc(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(e){r.wrapMethod(e,Pe(A$,t))})}function A$(r,t){var e=Jm(r);return e&&e.setOutputEnd((t||this).count()),t}function Jm(r){var t=(r.ecModel||{}).scheduler,e=t&&t.getPipeline(r.uid);if(e){var a=e.currentTask;if(a){var n=a.agentStubMap;n&&(a=n.get(r.uid))}return a}}const ft=Od;var D1=function(){function r(){this.group=new _e,this.uid=El("viewComponent")}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){},r.prototype.updateLayout=function(t,e,a,n){},r.prototype.updateVisual=function(t,e,a,n){},r.prototype.toggleBlurSeries=function(t,e,a){},r.prototype.eachRendered=function(t){var e=this.group;e&&e.traverse(t)},r}();U_(D1);gd(D1);const pt=D1;function Nl(){var r=ze();return function(t){var e=r(t),a=t.pipelineContext,n=!!e.large,i=!!e.progressiveRender,o=e.large=!!(a&&a.large),s=e.progressiveRender=!!(a&&a.progressiveRender);return(n!==o||i!==s)&&"reset"}}var HP=ze(),I$=Nl(),M1=function(){function r(){this.group=new _e,this.uid=El("viewChart"),this.renderTask=qu({plan:L$,reset:P$}),this.renderTask.context={view:this}}return r.prototype.init=function(t,e){},r.prototype.render=function(t,e,a,n){},r.prototype.highlight=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&wb(i,n,"emphasis")},r.prototype.downplay=function(t,e,a,n){var i=t.getData(n&&n.dataType);i&&wb(i,n,"normal")},r.prototype.remove=function(t,e){this.group.removeAll()},r.prototype.dispose=function(t,e){},r.prototype.updateView=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateLayout=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.updateVisual=function(t,e,a,n){this.render(t,e,a,n)},r.prototype.eachRendered=function(t){Vi(this.group,t)},r.markUpdateMethod=function(t,e){HP(t).updateMethod=e},r.protoInitialize=function(){var t=r.prototype;t.type="chart"}(),r}();function Sb(r,t,e){r&&uc(r)&&(t==="emphasis"?On:Nn)(r,e)}function wb(r,t,e){var a=Zo(r,t),n=t&&t.highlightKey!=null?YF(t.highlightKey):null;a!=null?A(at(a),function(i){Sb(r.getItemGraphicEl(i),e,n)}):r.eachItemGraphicEl(function(i){Sb(i,e,n)})}U_(M1);gd(M1);function L$(r){return I$(r.model)}function P$(r){var t=r.model,e=r.ecModel,a=r.api,n=r.payload,i=t.pipelineContext.progressiveRender,o=r.view,s=n&&HP(n).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](t,e,a,n),k$[l]}var k$={incrementalPrepareRender:{progress:function(r,t){t.view.incrementalRender(r,t.model,t.ecModel,t.api,t.payload)}},render:{forceFirstProgress:!0,progress:function(r,t){t.view.render(t.model,t.ecModel,t.api,t.payload)}}};const ot=M1;var gh="\0__throttleOriginMethod",xb="\0__throttleRate",bb="\0__throttleType";function A1(r,t,e){var a,n=0,i=0,o=null,s,l,u,c;t=t||0;function f(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var h=[],d=0;d=0?f():o=setTimeout(f,-s),n=a};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(h){c=h},v}function Bl(r,t,e,a){var n=r[t];if(n){var i=n[gh]||n,o=n[bb],s=n[xb];if(s!==e||o!==a){if(e==null||!a)return r[t]=i;n=r[t]=A1(i,e,a==="debounce"),n[gh]=i,n[bb]=a,n[xb]=e}return n}}function dc(r,t){var e=r[t];e&&e[gh]&&(e.clear&&e.clear(),r[t]=e[gh])}var Cb=ze(),Tb={itemStyle:Xo(FL,!0),lineStyle:Xo(zL,!0)},R$={lineStyle:"stroke",itemStyle:"fill"};function $P(r,t){var e=r.visualStyleMapper||Tb[t];return e||(console.warn("Unknown style type '"+t+"'."),Tb.itemStyle)}function WP(r,t){var e=r.visualDrawType||R$[t];return e||(console.warn("Unknown style type '"+t+"'."),"fill")}var E$={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=r.getModel(a),i=$P(r,a),o=i(n),s=n.getShallow("decal");s&&(e.setVisual("decal",s),s.dirty=!0);var l=WP(r,a),u=o[l],c=ye(u)?u:null,f=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||f){var v=r.getColorFromPalette(r.name,null,t.getSeriesCount());o[l]||(o[l]=v,e.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ye(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||ye(o.stroke)?v:o.stroke}if(e.setVisual("style",o),e.setVisual("drawType",l),!t.isSeriesFiltered(r)&&c)return e.setVisual("colorFromPalette",!1),{dataEach:function(h,d){var p=r.getDataParams(d),g=$({},o);g[l]=c(p),h.setItemVisual(d,"style",g)}}}},ru=new Xe,O$={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){if(!(r.ignoreStyleOnData||t.isSeriesFiltered(r))){var e=r.getData(),a=r.visualStyleAccessPath||"itemStyle",n=$P(r,a),i=e.getVisual("drawType");return{dataEach:e.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[a]){ru.option=l[a];var u=n(ru),c=o.ensureUniqueItemVisual(s,"style");$(c,u),ru.option.decal&&(o.setItemVisual(s,"decal",ru.option.decal),ru.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},N$={performRawSeries:!0,overallReset:function(r){var t=ve();r.eachSeries(function(e){var a=e.getColorBy();if(!e.isColorBySeries()){var n=e.type+"-"+a,i=t.get(n);i||(i={},t.set(n,i)),Cb(e).scope=i}}),r.eachSeries(function(e){if(!(e.isColorBySeries()||r.isSeriesFiltered(e))){var a=e.getRawData(),n={},i=e.getData(),o=Cb(e).scope,s=e.visualStyleAccessPath||"itemStyle",l=WP(e,s);i.each(function(u){var c=i.getRawIndex(u);n[c]=u}),a.each(function(u){var c=n[u],f=i.getItemVisual(c,"colorFromPalette");if(f){var v=i.ensureUniqueItemVisual(c,"style"),h=a.getName(u)||u+"",d=a.count();v[l]=e.getColorFromPalette(h,o,d)}})}})}},Rf=Math.PI;function B$(r,t){t=t||{},xe(t,{text:"loading",textColor:G.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:G.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var e=new _e,a=new Ve({style:{fill:t.maskColor},zlevel:t.zlevel,z:1e4});e.add(a);var n=new Ue({style:{text:t.text,fill:t.textColor,fontSize:t.fontSize,fontWeight:t.fontWeight,fontStyle:t.fontStyle,fontFamily:t.fontFamily},zlevel:t.zlevel,z:10001}),i=new Ve({style:{fill:"none"},textContent:n,textConfig:{position:"right",distance:10},zlevel:t.zlevel,z:10001});e.add(i);var o;return t.showSpinner&&(o=new a1({shape:{startAngle:-Rf/2,endAngle:-Rf/2+.1,r:t.spinnerRadius},style:{stroke:t.color,lineCap:"round",lineWidth:t.lineWidth},zlevel:t.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Rf*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Rf*3/2}).delay(300).start("circularInOut"),e.add(o)),e.resize=function(){var s=n.getBoundingRect().width,l=t.showSpinner?t.spinnerRadius:0,u=(r.getWidth()-l*2-(t.showSpinner&&s?10:0)-s)/2-(t.showSpinner&&s?0:5+s/2)+(t.showSpinner?0:s/2)+(s?0:l),c=r.getHeight()/2;t.showSpinner&&o.setShape({cx:u,cy:c}),i.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),a.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},e.resize(),e}var V$=function(){function r(t,e,a,n){this._stageTaskMap=ve(),this.ecInstance=t,this.api=e,a=this._dataProcessorHandlers=a.slice(),n=this._visualHandlers=n.slice(),this._allHandlers=a.concat(n)}return r.prototype.restoreData=function(t,e){t.restoreData(e),this._stageTaskMap.each(function(a){var n=a.overallTask;n&&n.dirty()})},r.prototype.getPerformArgs=function(t,e){if(t.__pipeline){var a=this._pipelineMap.get(t.__pipeline.id),n=a.context,i=!e&&a.progressiveEnabled&&(!n||n.progressiveRender)&&t.__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(t){return this._pipelineMap.get(t)},r.prototype.updateStreamModes=function(t,e){var a=this._pipelineMap.get(t.uid),n=t.getData(),i=n.count(),o=a.progressiveEnabled&&e.incrementalPrepareRender&&i>=a.threshold,s=t.get("large")&&i>=t.get("largeThreshold"),l=t.get("progressiveChunkMode")==="mod"?i:null;t.pipelineContext=a.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(t){var e=this,a=e._pipelineMap=ve();t.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}),e._pipe(n,n.dataTask)})},r.prototype.prepareStageTasks=function(){var t=this._stageTaskMap,e=this.api.getModel(),a=this.api;A(this._allHandlers,function(n){var i=t.get(n.uid)||t.set(n.uid,{}),o="";cr(!(n.reset&&n.overallReset),o),n.reset&&this._createSeriesStageTask(n,i,e,a),n.overallReset&&this._createOverallStageTask(n,i,e,a)},this)},r.prototype.prepareView=function(t,e,a,n){var i=t.renderTask,o=i.context;o.model=e,o.ecModel=a,o.api=n,i.__block=!t.incrementalPrepareRender,this._pipe(e,i)},r.prototype.performDataProcessorTasks=function(t,e){this._performStageTasks(this._dataProcessorHandlers,t,e,{block:!0})},r.prototype.performVisualTasks=function(t,e,a){this._performStageTasks(this._visualHandlers,t,e,a)},r.prototype._performStageTasks=function(t,e,a,n){n=n||{};var i=!1,o=this;A(t,function(l,u){if(!(n.visualType&&n.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),f=c.seriesTaskMap,v=c.overallTask;if(v){var h,d=v.agentStubMap;d.each(function(g){s(n,g)&&(g.dirty(),h=!0)}),h&&v.dirty(),o.updatePayload(v,a);var p=o.getPerformArgs(v,n.block);d.each(function(g){g.perform(p)}),v.perform(p)&&(i=!0)}else f&&f.each(function(g,y){s(n,g)&&g.dirty();var m=o.getPerformArgs(g,n.block);m.skip=!l.performRawSeries&&e.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(t){var e;t.eachSeries(function(a){e=a.dataTask.perform()||e}),this.unfinished=e||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(t){var e=t.tail;do{if(e.__block){t.blockIndex=e.__idxInPipeline;break}e=e.getUpstream()}while(e)})},r.prototype.updatePayload=function(t,e){e!=="remain"&&(t.context.payload=e)},r.prototype._createSeriesStageTask=function(t,e,a,n){var i=this,o=e.seriesTaskMap,s=e.seriesTaskMap=ve(),l=t.seriesType,u=t.getTargetSeries;t.createOnAllSeries?a.eachRawSeries(c):l?a.eachRawSeriesByType(l,c):u&&u(a,n).each(c);function c(f){var v=f.uid,h=s.set(v,o&&o.get(v)||qu({plan:$$,reset:W$,count:U$}));h.context={model:f,ecModel:a,api:n,useClearVisual:t.isVisual&&!t.isLayout,plan:t.plan,reset:t.reset,scheduler:i},i._pipe(f,h)}},r.prototype._createOverallStageTask=function(t,e,a,n){var i=this,o=e.overallTask=e.overallTask||qu({reset:z$});o.context={ecModel:a,api:n,overallReset:t.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=ve(),u=t.seriesType,c=t.getTargetSeries,f=!0,v=!1,h="";cr(!t.createOnAllSeries,h),u?a.eachRawSeriesByType(u,d):c?c(a,n).each(d):(f=!1,A(a.getSeries(),d));function d(p){var g=p.uid,y=l.set(g,s&&s.get(g)||(v=!0,qu({reset:F$,onDirty:H$})));y.context={model:p,overallProgress:f},y.agent=o,y.__block=f,i._pipe(p,y)}v&&o.dirty()},r.prototype._pipe=function(t,e){var a=t.uid,n=this._pipelineMap.get(a);!n.head&&(n.head=e),n.tail&&n.tail.pipe(e),n.tail=e,e.__idxInPipeline=n.count++,e.__pipeline=n},r.wrapStageHandler=function(t,e){return ye(t)&&(t={overallReset:t,seriesType:Z$(t)}),t.uid=El("stageHandler"),e&&(t.visualType=e),t},r}();function z$(r){r.overallReset(r.ecModel,r.api,r.payload)}function F$(r){return r.overallProgress&&G$}function G$(){this.agent.dirty(),this.getDownstream().dirty()}function H$(){this.agent&&this.agent.dirty()}function $$(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function W$(r){r.useClearVisual&&r.data.clearAllVisual();var t=r.resetDefines=at(r.reset(r.model,r.ecModel,r.api,r.payload));return t.length>1?X(t,function(e,a){return YP(a)}):Y$}var Y$=YP(0);function YP(r){return function(t,e){var a=e.data,n=e.resetDefines[r];if(n&&n.dataEach)for(var i=t.start;i0&&h===u.length-v.length){var d=u.slice(0,h);d!=="data"&&(e.mainType=d,e[v.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(a[u]=l,c=!0),c||(n[u]=l)})}return{cptQuery:e,dataQuery:a,otherQuery:n}},r.prototype.filter=function(t,e){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=e.cptQuery,u=e.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,i,"name")&&c(u,i,"dataIndex")&&c(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(t,e.otherQuery,n,i));function c(f,v,h,d){return f[h]==null||v[d||h]===f[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),Qm=["symbol","symbolSize","symbolRotate","symbolOffset"],Mb=Qm.concat(["symbolKeepAspect"]),K$={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,t){var e=r.getData();if(r.legendIcon&&e.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var a={},n={},i=!1,o=0;o=0&&Eo(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function e0(r,t,e){for(var a=t.type==="radial"?h4(r,t,e):v4(r,t,e),n=t.colorStops,i=0;i0)?null:r==="dashed"?[4*t,2*t]:r==="dotted"?[t]:$e(r)?[r]:Z(r)?r:null}function L1(r){var t=r.style,e=t.lineDash&&t.lineWidth>0&&p4(t.lineDash,t.lineWidth),a=t.lineDashOffset;if(e){var n=t.strokeNoScale&&r.getLineScale?r.getLineScale():1;n&&n!==1&&(e=X(e,function(i){return i/n}),a/=n)}return[e,a]}var g4=new an(!0);function _h(r){var t=r.stroke;return!(t==null||t==="none"||!(r.lineWidth>0))}function Ab(r){return typeof r=="string"&&r!=="none"}function Sh(r){var t=r.fill;return t!=null&&t!=="none"}function Ib(r,t){if(t.fillOpacity!=null&&t.fillOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.fillOpacity*t.opacity,r.fill(),r.globalAlpha=e}else r.fill()}function Lb(r,t){if(t.strokeOpacity!=null&&t.strokeOpacity!==1){var e=r.globalAlpha;r.globalAlpha=t.strokeOpacity*t.opacity,r.stroke(),r.globalAlpha=e}else r.stroke()}function t0(r,t,e){var a=Z_(t.image,t.__image,e);if(yd(a)){var n=r.createPattern(a,t.repeat||"repeat");if(typeof DOMMatrix=="function"&&n&&n.setTransform){var i=new DOMMatrix;i.translateSelf(t.x||0,t.y||0),i.rotateSelf(0,0,(t.rotation||0)*Dv),i.scaleSelf(t.scaleX||1,t.scaleY||1),n.setTransform(i)}return n}}function y4(r,t,e,a){var n,i=_h(e),o=Sh(e),s=e.strokePercent,l=s<1,u=!t.path;(!t.silent||l)&&u&&t.createPathProxy();var c=t.path||g4,f=t.__dirty;if(!a){var v=e.fill,h=e.stroke,d=o&&!!v.colorStops,p=i&&!!h.colorStops,g=o&&!!v.image,y=i&&!!h.image,m=void 0,_=void 0,S=void 0,w=void 0,x=void 0;(d||p)&&(x=t.getBoundingRect()),d&&(m=f?e0(r,v,x):t.__canvasFillGradient,t.__canvasFillGradient=m),p&&(_=f?e0(r,h,x):t.__canvasStrokeGradient,t.__canvasStrokeGradient=_),g&&(S=f||!t.__canvasFillPattern?t0(r,v,t):t.__canvasFillPattern,t.__canvasFillPattern=S),y&&(w=f||!t.__canvasStrokePattern?t0(r,h,t):t.__canvasStrokePattern,t.__canvasStrokePattern=w),d?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),p?r.strokeStyle=_:y&&(w?r.strokeStyle=w:i=!1)}var b=t.getGlobalScale();c.setScale(b[0],b[1],t.segmentIgnoreThreshold);var T,C;r.setLineDash&&e.lineDash&&(n=L1(t),T=n[0],C=n[1]);var D=!0;(u||f&Us)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),D=!1),c.reset(),t.buildPath(c,t.shape,a),c.toStatic(),t.pathUpdated()),D&&c.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),a||(e.strokeFirst?(i&&Lb(r,e),o&&Ib(r,e)):(o&&Ib(r,e),i&&Lb(r,e))),T&&r.setLineDash([])}function m4(r,t,e){var a=t.__image=Z_(e.image,t.__image,t,t.onload);if(!(!a||!yd(a))){var n=e.x||0,i=e.y||0,o=t.getWidth(),s=t.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),e.sWidth&&e.sHeight){var u=e.sx||0,c=e.sy||0;r.drawImage(a,u,c,e.sWidth,e.sHeight,n,i,o,s)}else if(e.sx&&e.sy){var u=e.sx,c=e.sy,f=o-u,v=s-c;r.drawImage(a,u,c,f,v,n,i,o,s)}else r.drawImage(a,n,i,o,s)}}function _4(r,t,e){var a,n=e.text;if(n!=null&&(n+=""),n){r.font=e.font||kn,r.textAlign=e.textAlign,r.textBaseline=e.textBaseline;var i=void 0,o=void 0;r.setLineDash&&e.lineDash&&(a=L1(t),i=a[0],o=a[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),e.strokeFirst?(_h(e)&&r.strokeText(n,e.x,e.y),Sh(e)&&r.fillText(n,e.x,e.y)):(Sh(e)&&r.fillText(n,e.x,e.y),_h(e)&&r.strokeText(n,e.x,e.y)),i&&r.setLineDash([])}}var Pb=["shadowBlur","shadowOffsetX","shadowOffsetY"],kb=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function JP(r,t,e,a,n){var i=!1;if(!a&&(e=e||{},t===e))return!1;if(a||t.opacity!==e.opacity){Ir(r,n),i=!0;var o=Math.max(Math.min(t.opacity,1),0);r.globalAlpha=isNaN(o)?Vo.opacity:o}(a||t.blend!==e.blend)&&(i||(Ir(r,n),i=!0),r.globalCompositeOperation=t.blend||Vo.blend);for(var s=0;s0&&e.unfinished);e.unfinished||this._zr.flush()}}},t.prototype.getDom=function(){return this._dom},t.prototype.getId=function(){return this.id},t.prototype.getZr=function(){return this._zr},t.prototype.isSSR=function(){return this._ssr},t.prototype.setOption=function(e,a,n){if(!this[Et]){if(this._disposed){this.id;return}var i,o,s;if(be(a)&&(n=a.lazyUpdate,i=a.silent,o=a.replaceMerge,s=a.transition,a=a.notMerge),this[Et]=!0,Rs(this),!this._model||a){var l=new EH(this._api),u=this._theme,c=this._model=new yP;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(e,{replaceMerge:o},i0);var f={seriesTransition:s,optionChanged:!0};if(n)this[Yt]={silent:i,updateParams:f},this[Et]=!1,this.getZr().wakeUp();else{try{vo(this),pn.update.call(this,null,f)}catch(v){throw this[Yt]=null,this[Et]=!1,v}this._ssr||this._zr.flush(),this[Yt]=null,this[Et]=!1,Ps.call(this,i),ks.call(this,i)}}},t.prototype.setTheme=function(e,a){if(!this[Et]){if(this._disposed){this.id;return}var n=this._model;if(n){var i=a&&a.silent,o=null;this[Yt]&&(i==null&&(i=this[Yt].silent),o=this[Yt].updateParams,this[Yt]=null),this[Et]=!0,Rs(this);try{this._updateTheme(e),n.setTheme(this._theme),vo(this),pn.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Et]=!1,s}this[Et]=!1,Ps.call(this,i),ks.call(this,i)}}},t.prototype._updateTheme=function(e){oe(e)&&(e=gk[e]),e&&(e=me(e),e&&SP(e,!0),this._theme=e)},t.prototype.getModel=function(){return this._model},t.prototype.getOption=function(){return this._model&&this._model.getOption()},t.prototype.getWidth=function(){return this._zr.getWidth()},t.prototype.getHeight=function(){return this._zr.getHeight()},t.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||qe.hasGlobalWindow&&window.devicePixelRatio||1},t.prototype.getRenderedCanvas=function(e){return this.renderToCanvas(e)},t.prototype.renderToCanvas=function(e){e=e||{};var a=this._zr.painter;return a.getRenderedCanvas({backgroundColor:e.backgroundColor||this._model.get("backgroundColor"),pixelRatio:e.pixelRatio||this.getDevicePixelRatio()})},t.prototype.renderToSVGString=function(e){e=e||{};var a=this._zr.painter;return a.renderToString({useViewBox:e.useViewBox})},t.prototype.getSvgDataURL=function(){var e=this._zr,a=e.storage.getDisplayList();return A(a,function(n){n.stopAnimation(null,!0)}),e.painter.toDataURL()},t.prototype.getDataURL=function(e){if(this._disposed){this.id;return}e=e||{};var a=e.excludeComponents,n=this._model,i=[],o=this;A(a,function(l){n.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(i.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(e).toDataURL("image/"+(e&&e.type||"png"));return A(i,function(l){l.group.ignore=!1}),s},t.prototype.getConnectedDataURL=function(e){if(this._disposed){this.id;return}var a=e.type==="svg",n=this.group,i=Math.min,o=Math.max,s=1/0;if(Zb[n]){var l=s,u=s,c=-s,f=-s,v=[],h=e&&e.pixelRatio||this.getDevicePixelRatio();A(ju,function(_,S){if(_.group===n){var w=a?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(me(e)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),c=o(x.right,c),f=o(x.bottom,f),v.push({dom:w,left:x.left,top:x.top})}}),l*=h,u*=h,c*=h,f*=h;var d=c-l,p=f-u,g=wa.createCanvas(),y=qw(g,{renderer:a?"svg":"canvas"});if(y.resize({width:d,height:p}),a){var m="";return A(v,function(_){var S=_.left-l,w=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,e.connectedBackgroundColor&&y.painter.setBackgroundColor(e.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return e.connectedBackgroundColor&&y.add(new Ve({shape:{x:0,y:0,width:d,height:p},style:{fill:e.connectedBackgroundColor}})),A(v,function(_){var S=new rr({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(e&&e.type||"png"))}else return this.getDataURL(e)},t.prototype.convertToPixel=function(e,a,n){return Bf(this,"convertToPixel",e,a,n)},t.prototype.convertToLayout=function(e,a,n){return Bf(this,"convertToLayout",e,a,n)},t.prototype.convertFromPixel=function(e,a,n){return Bf(this,"convertFromPixel",e,a,n)},t.prototype.containPixel=function(e,a){if(this._disposed){this.id;return}var n=this._model,i,o=sl(n,e);return A(o,function(s,l){l.indexOf("Models")>=0&&A(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)i=i||!!c.containPoint(a);else if(l==="seriesModels"){var f=this._chartsMap[u.__viewId];f&&f.containPoint&&(i=i||f.containPoint(a,u))}},this)},this),!!i},t.prototype.getVisual=function(e,a){var n=this._model,i=sl(n,e,{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?I1(s,l,a):Gc(s,a)},t.prototype.getViewOfComponentModel=function(e){return this._componentsMap[e.__viewId]},t.prototype.getViewOfSeriesModel=function(e){return this._chartsMap[e.__viewId]},t.prototype._initEvents=function(){var e=this;A(Z4,function(n){var i=function(o){var s=e.getModel(),l=o.target,u,c=n==="globalout";if(c?u={}:l&&Ro(l,function(p){var g=De(p);if(g&&g.dataIndex!=null){var y=g.dataModel||s.getSeriesByIndex(g.seriesIndex);return u=y&&y.getDataParams(g.dataIndex,g.dataType,l)||{},!0}else if(g.eventData)return u=$({},g.eventData),!0},!0),u){var f=u.componentType,v=u.componentIndex;(f==="markLine"||f==="markPoint"||f==="markArea")&&(f="series",v=u.seriesIndex);var h=f&&v!=null&&s.getComponent(f,v),d=h&&e[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=n,e._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:d},e.trigger(n,u)}};i.zrEventfulCallAtLast=!0,e._zr.on(n,i,e)});var a=this._messageCenter;A(a0,function(n,i){a.on(i,function(o){e.trigger(i,o)})}),Q$(a,this,this._api)},t.prototype.isDisposed=function(){return this._disposed},t.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},t.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var e=this.getDom();e&&BI(this.getDom(),R1,"");var a=this,n=a._api,i=a._model;A(a._componentsViews,function(o){o.dispose(i,n)}),A(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 ju[a.id]},t.prototype.resize=function(e){if(!this[Et]){if(this._disposed){this.id;return}this._zr.resize(e);var a=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!a){var n=a.resetOption("media"),i=e&&e.silent;this[Yt]&&(i==null&&(i=this[Yt].silent),n=!0,this[Yt]=null),this[Et]=!0,Rs(this);try{n&&vo(this),pn.update.call(this,{type:"resize",animation:$({duration:0},e&&e.animation)})}catch(o){throw this[Et]=!1,o}this[Et]=!1,Ps.call(this,i),ks.call(this,i)}}},t.prototype.showLoading=function(e,a){if(this._disposed){this.id;return}if(be(e)&&(a=e,e=""),e=e||"default",this.hideLoading(),!!o0[e]){var n=o0[e](this._api,a),i=this._zr;this._loadingFX=n,i.add(n)}},t.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},t.prototype.makeActionFromEvent=function(e){var a=$({},e);return a.type=r0[e.type],a},t.prototype.dispatchAction=function(e,a){if(this._disposed){this.id;return}if(be(a)||(a={silent:!!a}),!!wh[e.type]&&this._model){if(this[Et]){this._pendingActions.push(e);return}var n=a.silent;pg.call(this,e,n);var i=a.flush;i?this._zr.flush():i!==!1&&qe.browser.weChat&&this._throttledZrFlush(),Ps.call(this,n),ks.call(this,n)}},t.prototype.updateLabelLayout=function(){da.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},t.prototype.appendData=function(e){if(this._disposed){this.id;return}var a=e.seriesIndex,n=this.getModel(),i=n.getSeriesByIndex(a);i.appendData(e),this._scheduler.unfinished=!0,this.getZr().wakeUp()},t.internalField=function(){vo=function(f){var v=f._scheduler;v.restorePipelines(f._model),v.prepareStageTasks(),hg(f,!0),hg(f,!1),v.plan()},hg=function(f,v){for(var h=f._model,d=f._scheduler,p=v?f._componentsViews:f._chartsViews,g=v?f._componentsMap:f._chartsMap,y=f._zr,m=f._api,_=0;_v.get("hoverLayerThreshold")&&!qe.node&&!qe.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=f._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(f,v){var h=f.get("blendMode")||null;v.eachRendered(function(d){d.isGroup||(d.style.blend=h)})}function l(f,v){if(!f.preventAutoZ){var h=Ko(f);v.eachRendered(function(d){return Ad(d,h.z,h.zlevel),!0})}}function u(f,v){v.eachRendered(function(h){if(!ll(h)){var d=h.getTextContent(),p=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function c(f,v){var h=f.getModel("stateAnimation"),d=f.isAnimationEnabled(),p=h.get("duration"),g=p>0?{duration:p,delay:h.get("delay"),easing:h.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if(ll(y))return;if(y instanceof Fe&&UF(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(d){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}Yb=function(f){return new(function(v){V(h,v);function h(){return v!==null&&v.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return f._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(d){for(;d;){var p=d.__ecComponentInfo;if(p!=null)return f._model.getComponent(p.mainType,p.index);d=d.parent}},h.prototype.enterEmphasis=function(d,p){On(d,p),Wr(f)},h.prototype.leaveEmphasis=function(d,p){Nn(d,p),Wr(f)},h.prototype.enterBlur=function(d){nL(d),Wr(f)},h.prototype.leaveBlur=function(d){Q_(d),Wr(f)},h.prototype.enterSelect=function(d){iL(d),Wr(f)},h.prototype.leaveSelect=function(d){oL(d),Wr(f)},h.prototype.getModel=function(){return f.getModel()},h.prototype.getViewOfComponentModel=function(d){return f.getViewOfComponentModel(d)},h.prototype.getViewOfSeriesModel=function(d){return f.getViewOfSeriesModel(d)},h.prototype.getMainProcessVersion=function(){return f[Of]},h}(mP))(f)},dk=function(f){function v(h,d){for(var p=0;p=0)){Xb.push(e);var i=XP.wrapStageHandler(e,n);i.__prio=t,i.__raw=e,r.push(i)}}function Sk(r,t){o0[r]=t}function eW(r,t,e){var a=L4("registerMap");a&&a(r,t,e)}var tW=l$;fs(P1,E$);fs(Nd,O$);fs(Nd,N$);fs(P1,K$);fs(Nd,J$);fs(lk,M4);mk(SP);_k(O4,HH);Sk("default",B$);ln({type:zo,event:zo,update:zo},Ct);ln({type:Ov,event:Ov,update:Ov},Ct);ln({type:uh,event:K_,update:uh,action:Ct,refineEvent:N1,publishNonRefinedEvent:!0});ln({type:km,event:K_,update:km,action:Ct,refineEvent:N1,publishNonRefinedEvent:!0});ln({type:ch,event:K_,update:ch,action:Ct,refineEvent:N1,publishNonRefinedEvent:!0});function N1(r,t,e,a){return{eventContent:{selected:GF(e),isFromClick:t.isFromClick||!1}}}yk("default",{});yk("dark",q$);var qb=[],rW={registerPreprocessor:mk,registerProcessor:_k,registerPostInit:j4,registerPostUpdate:K4,registerUpdateLifecycle:E1,registerAction:ln,registerCoordinateSystem:J4,registerLayout:Q4,registerVisual:fs,registerTransform:tW,registerLoading:Sk,registerMap:eW,registerImpl:I4,PRIORITY:W4,ComponentModel:We,ComponentView:pt,SeriesModel:ft,ChartView:ot,registerComponentModel:function(r){We.registerClass(r)},registerComponentView:function(r){pt.registerClass(r)},registerSeriesModel:function(r){ft.registerClass(r)},registerChartView:function(r){ot.registerClass(r)},registerCustomSeries:function(r,t){P4(r,t)},registerSubTypeDefaulter:function(r,t){We.registerSubTypeDefaulter(r,t)},registerPainter:function(r,t){n3(r,t)}};function Oe(r){if(Z(r)){A(r,function(t){Oe(t)});return}ke(qb,r)>=0||(qb.push(r),ye(r)&&(r={install:r}),r.install(rW))}function nu(r){return r==null?0:r.length||1}function jb(r){return r}var aW=function(){function r(t,e,a,n,i,o){this._old=t,this._new=e,this._oldKeyGetter=a||jb,this._newKeyGetter=n||jb,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(t){return this._add=t,this},r.prototype.update=function(t){return this._update=t,this},r.prototype.updateManyToOne=function(t){return this._updateManyToOne=t,this},r.prototype.updateOneToMany=function(t){return this._updateOneToMany=t,this},r.prototype.updateManyToMany=function(t){return this._updateManyToMany=t,this},r.prototype.remove=function(t){return this._remove=t,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var t=this._old,e=this._new,a={},n=new Array(t.length),i=new Array(e.length);this._initIndexMap(t,null,n,"_oldKeyGetter"),this._initIndexMap(e,a,i,"_newKeyGetter");for(var o=0;o1){var c=l.shift();l.length===1&&(a[s]=l[0]),this._update&&this._update(c,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 t=this._old,e=this._new,a={},n={},i=[],o=[];this._initIndexMap(t,a,i,"_oldKeyGetter"),this._initIndexMap(e,n,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(c,u),n[l]=null;else if(f===1&&v>1)this._updateOneToMany&&this._updateOneToMany(c,u),n[l]=null;else if(f===1&&v===1)this._update&&this._update(c,u),n[l]=null;else if(f>1&&v>1)this._updateManyToMany&&this._updateManyToMany(c,u),n[l]=null;else if(f>1)for(var h=0;h1)for(var s=0;s30}var iu=be,Qn=X,cW=typeof Int32Array>"u"?Array:Int32Array,fW="e\0\0",Kb=-1,vW=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],hW=["_approximateExtent"],Jb,zf,ou,su,_g,lu,Sg,dW=function(){function r(t,e){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","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var a,n=!1;xk(t)?(a=t.dimensions,this._dimOmitted=t.isDimensionOmitted(),this._schema=t):(n=!0,a=t),a=a||["x","y"];for(var i={},o=[],s={},l=!1,u={},c=0;c=e)){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=[],c=t;c0},r.prototype.ensureUniqueItemVisual=function(t,e){var a=this._itemVisuals,n=a[t];n||(n=a[t]={});var i=n[e];return i==null&&(i=this.getVisual(e),Z(i)?i=i.slice():iu(i)&&(i=$({},i)),n[e]=i),i},r.prototype.setItemVisual=function(t,e,a){var n=this._itemVisuals[t]||{};this._itemVisuals[t]=n,iu(e)?$(n,e):n[e]=a},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(t,e){iu(t)?$(this._layout,t):this._layout[t]=e},r.prototype.getLayout=function(t){return this._layout[t]},r.prototype.getItemLayout=function(t){return this._itemLayouts[t]},r.prototype.setItemLayout=function(t,e,a){this._itemLayouts[t]=a?$(this._itemLayouts[t]||{},e):e},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(t,e){var a=this.hostModel&&this.hostModel.seriesIndex;Pm(a,this.dataType,t,e),this._graphicEls[t]=e},r.prototype.getItemGraphicEl=function(t){return this._graphicEls[t]},r.prototype.eachItemGraphicEl=function(t,e){A(this._graphicEls,function(a,n){a&&t&&t.call(e,a,n)})},r.prototype.cloneShallow=function(t){return t||(t=new r(this._schema?this._schema:Qn(this.dimensions,this._getDimInfo,this),this.hostModel)),_g(t,this),t._store=this._store,t},r.prototype.wrapMethod=function(t,e){var a=this[t];ye(a)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(t),this[t]=function(){var n=a.apply(this,arguments);return e.apply(this,[n].concat(E_(arguments)))})},r.internalField=function(){Jb=function(t){var e=t._invertedIndicesMap;A(e,function(a,n){var i=t._dimInfos[n],o=i.ordinalMeta,s=t._store;if(o){a=e[n]=new cW(o.categories.length);for(var l=0;l1&&(l+="__ec__"+c),n[e]=l}}}(),r}();const mr=dW;function Hc(r,t){x1(r)||(r=b1(r)),t=t||{};var e=t.coordDimensions||[],a=t.dimensionsDefine||r.dimensionsDefine||[],n=ve(),i=[],o=gW(r,e,a,t.dimensionsCount),s=t.canOmitUnusedDimensions&&Tk(o),l=a===r.dimensionsDefine,u=l?Ck(r):bk(a),c=t.encodeDefine;!c&&t.encodeDefaulter&&(c=t.encodeDefaulter(r,o));for(var f=ve(c),v=new PP(o),h=0;h0&&(a.name=n+(i-1)),i++,t.set(n,i)}}function gW(r,t,e,a){var n=Math.max(r.dimensionsDetectedCount||1,t.length,e.length,a||0);return A(t,function(i){var o;be(i)&&(o=i.dimsDef)&&(n=Math.max(n,o.length))}),n}function yW(r,t,e){if(e||t.hasKey(r)){for(var a=0;t.hasKey(r+a);)a++;r+=a}return t.set(r,!0),r}var mW=function(){function r(t){this.coordSysDims=[],this.axisMap=ve(),this.categoryAxisMap=ve(),this.coordSysName=t}return r}();function _W(r){var t=r.get("coordinateSystem"),e=new mW(t),a=SW[t];if(a)return a(r,e,e.axisMap,e.categoryAxisMap),e}var SW={cartesian2d:function(r,t,e,a){var n=r.getReferringComponents("xAxis",gt).models[0],i=r.getReferringComponents("yAxis",gt).models[0];t.coordSysDims=["x","y"],e.set("x",n),e.set("y",i),Es(n)&&(a.set("x",n),t.firstCategoryDimIndex=0),Es(i)&&(a.set("y",i),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},singleAxis:function(r,t,e,a){var n=r.getReferringComponents("singleAxis",gt).models[0];t.coordSysDims=["single"],e.set("single",n),Es(n)&&(a.set("single",n),t.firstCategoryDimIndex=0)},polar:function(r,t,e,a){var n=r.getReferringComponents("polar",gt).models[0],i=n.findAxisModel("radiusAxis"),o=n.findAxisModel("angleAxis");t.coordSysDims=["radius","angle"],e.set("radius",i),e.set("angle",o),Es(i)&&(a.set("radius",i),t.firstCategoryDimIndex=0),Es(o)&&(a.set("angle",o),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=1))},geo:function(r,t,e,a){t.coordSysDims=["lng","lat"]},parallel:function(r,t,e,a){var n=r.ecModel,i=n.getComponent("parallel",r.get("parallelIndex")),o=t.coordSysDims=i.dimensions.slice();A(i.parallelAxisIndex,function(s,l){var u=n.getComponent("parallelAxis",s),c=o[l];e.set(c,u),Es(u)&&(a.set(c,u),t.firstCategoryDimIndex==null&&(t.firstCategoryDimIndex=l))})},matrix:function(r,t,e,a){var n=r.getReferringComponents("matrix",gt).models[0];t.coordSysDims=["x","y"];var i=n.getDimensionModel("x"),o=n.getDimensionModel("y");e.set("x",i),e.set("y",o),a.set("x",i),a.set("y",o)}};function Es(r){return r.get("type")==="category"}function wW(r,t,e){e=e||{};var a=e.byIndex,n=e.stackedCoordDimension,i,o,s;xW(t)?i=t:(o=t.schema,i=o.dimensions,s=t.store);var l=!!(r&&r.get("stack")),u,c,f,v;if(A(i,function(m,_){oe(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!a&&!u&&m.ordinalMeta&&(u=m),!c&&m.type!=="ordinal"&&m.type!=="time"&&(!n||n===m.coordDim)&&(c=m))}),c&&!a&&!u&&(a=!0),c){f="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=c.coordDim,d=c.type,p=0;A(i,function(m){m.coordDim===h&&p++});var g={name:f,coordDim:h,coordDimIndex:p,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:p+1,type:d,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,d),y.storeDimIndex=s.ensureCalculationDimension(f,d)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:a,stackedOverDimension:v,stackResultDimension:f}}function xW(r){return!xk(r.schema)}function Ii(r,t){return!!t&&t===r.getCalculationInfo("stackedDimension")}function Dk(r,t){return Ii(r,t)?r.getCalculationInfo("stackResultDimension"):t}function bW(r,t){var e=r.get("coordinateSystem"),a=Fc.get(e),n;return t&&t.coordSysDims&&(n=X(t.coordSysDims,function(i){var o={name:i},s=t.axisMap.get(i);if(s){var l=s.get("type");o.type=bh(l)}return o})),n||(n=a&&(a.getDimensionsInfo?a.getDimensionsInfo():a.dimensions.slice())||["x","y"]),n}function CW(r,t,e){var a,n;return e&&A(r,function(i,o){var s=i.coordDim,l=e.categoryAxisMap.get(s);l&&(a==null&&(a=o),i.ordinalMeta=l.getOrdinalMeta(),t&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(n=!0)}),!n&&a!=null&&(r[a].otherDims.itemName=0),a}function $n(r,t,e){e=e||{};var a=t.getSourceManager(),n,i=!1;r?(i=!0,n=b1(r)):(n=a.getSource(),i=n.sourceFormat===Fr);var o=_W(t),s=bW(t,o),l=e.useEncodeDefaulter,u=ye(l)?l:l?Pe(vP,s,t):null,c={coordDimensions:s,generateCoord:e.generateCoord,encodeDefine:t.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},f=Hc(n,c),v=CW(f.dimensions,e.createInvertedIndices,o),h=i?null:a.getSharedDataStore(f),d=wW(t,{schema:f,store:h}),p=new mr(f,t);p.setCalculationInfo(d);var g=v!=null&&TW(n)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return p.hasItemOption=!1,p.initData(i?n:h,null,g),p}function TW(r){if(r.sourceFormat===Fr){var t=DW(r.data||[]);return!Z(Al(t))}}function DW(r){for(var t=0;tn&&(o=i.interval=n);var s=i.intervalPrecision=yc(o),l=i.niceTickExtent=[At(Math.ceil(r[0]/o)*o,s),At(Math.floor(r[1]/o)*o,s)];return AW(l,r),i}function wg(r){var t=Math.pow(10,$_(r)),e=r/t;return e?e===2?e=3:e===3?e=5:e*=2:e=1,At(e*t)}function yc(r){return Ya(r)+2}function Qb(r,t,e){r[t]=Math.max(Math.min(r[t],e[1]),e[0])}function AW(r,t){!isFinite(r[0])&&(r[0]=t[0]),!isFinite(r[1])&&(r[1]=t[1]),Qb(r,0,t),Qb(r,1,t),r[0]>r[1]&&(r[0]=r[1])}function B1(r,t){return r>=t[0]&&r<=t[1]}var IW=function(){function r(){this.normalize=eC,this.scale=tC}return r.prototype.updateMethods=function(t){t.hasBreaks()?(this.normalize=se(t.normalize,t),this.scale=se(t.scale,t)):(this.normalize=eC,this.scale=tC)},r}();function eC(r,t){return t[1]===t[0]?.5:(r-t[0])/(t[1]-t[0])}function tC(r,t){return r*(t[1]-t[0])+t[0]}function l0(r,t,e){var a=Math.log(r);return[Math.log(e?t[0]:Math.max(0,t[0]))/a,Math.log(e?t[1]:Math.max(0,t[1]))/a]}var Mk=function(){function r(t){this._calculator=new IW,this._setting=t||{},this._extent=[1/0,-1/0];var e=It();e&&(this._brkCtx=e.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(t){return this._setting[t]},r.prototype._innerUnionExtent=function(t){var e=this._extent;this._innerSetExtent(t[0]e[1]?t[1]:e[1])},r.prototype.unionExtentFromData=function(t,e){this._innerUnionExtent(t.getApproximateExtent(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(t,e){this._innerSetExtent(t,e)},r.prototype._innerSetExtent=function(t,e){var a=this._extent;isNaN(t)||(a[0]=t),isNaN(e)||(a[1]=e),this._brkCtx&&this._brkCtx.update(a)},r.prototype.setBreaksFromOption=function(t){var e=It();e&&this._innerSetBreak(e.parseAxisBreakOption(t,se(this.parse,this)))},r.prototype._innerSetBreak=function(t){this._brkCtx&&(this._brkCtx.setBreaks(t),this._calculator.updateMethods(this._brkCtx),this._brkCtx.update(this._extent))},r.prototype._innerGetBreaks=function(){return this._brkCtx?this._brkCtx.breaks:[]},r.prototype.hasBreaks=function(){return this._brkCtx?this._brkCtx.hasBreaks():!1},r.prototype._getExtentSpanWithBreaks=function(){return this._brkCtx&&this._brkCtx.hasBreaks()?this._brkCtx.getExtentSpan():this._extent[1]-this._extent[0]},r.prototype.isInExtentRange=function(t){return this._extent[0]<=t&&this._extent[1]>=t},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(t){this._isBlank=t},r}();gd(Mk);const vs=Mk;var LW=0,PW=function(){function r(t){this.categories=t.categories||[],this._needCollect=t.needCollect,this._deduplication=t.deduplication,this.uid=++LW,this._onCollect=t.onCollect}return r.createByAxisModel=function(t){var e=t.option,a=e.data,n=a&&X(a,kW);return new r({categories:n,needCollect:!n,deduplication:e.dedplication!==!1})},r.prototype.getOrdinal=function(t){return this._getOrCreateMap().get(t)},r.prototype.parseAndCollect=function(t){var e,a=this._needCollect;if(!oe(t)&&!a)return t;if(a&&!this._deduplication)return e=this.categories.length,this.categories[e]=t,this._onCollect&&this._onCollect(t,e),e;var n=this._getOrCreateMap();return e=n.get(t),e==null&&(a?(e=this.categories.length,this.categories[e]=t,n.set(t,e),this._onCollect&&this._onCollect(t,e)):e=NaN),e},r.prototype._getOrCreateMap=function(){return this._map||(this._map=ve(this.categories))},r}();function kW(r){return be(r)&&r.value!=null?r.value:r+""}const mc=PW;var Ak=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;a.type="ordinal";var n=a.getSetting("ordinalMeta");return n||(n=new mc({})),Z(n)&&(n=new mc({categories:X(n,function(i){return be(i)?i.value:i})})),a._ordinalMeta=n,a._extent=a.getSetting("extent")||[0,n.categories.length-1],a}return t.prototype.parse=function(e){return e==null?NaN:oe(e)?this._ordinalMeta.getOrdinal(e):Math.round(e)},t.prototype.contain=function(e){return B1(e,this._extent)&&e>=0&&e=0&&e=0&&e=e},t.prototype.getOrdinalMeta=function(){return this._ordinalMeta},t.prototype.calcNiceTicks=function(){},t.prototype.calcNiceExtent=function(){},t.type="ordinal",t}(vs);vs.registerClass(Ak);const _c=Ak;var ei=At,Ik=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="interval",e._interval=0,e._intervalPrecision=2,e}return t.prototype.parse=function(e){return e==null||e===""?NaN:Number(e)},t.prototype.contain=function(e){return B1(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.prototype.getInterval=function(){return this._interval},t.prototype.setInterval=function(e){this._interval=e,this._niceExtent=this._extent.slice(),this._intervalPrecision=yc(e)},t.prototype.getTicks=function(e){e=e||{};var a=this._interval,n=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=It(),l=[];if(!a)return l;if(e.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;n[0]=0&&(f=ei(f+v*a,o))}if(l.length>0&&f===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:i[1];return n[1]>h&&(e.expandToNicedExtent?l.push({value:ei(h+a,o)}):l.push({value:n[1]})),s&&s.pruneTicksByBreak(e.pruneByBreak,l,this._brkCtx.breaks,function(d){return d.value},this._interval,this._extent),e.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},t.prototype.getMinorTicks=function(e){for(var a=this.getTicks({expandToNicedExtent:!0}),n=[],i=this.getExtent(),o=1;oi[0]&&d0&&(i=i===null?s:Math.min(i,s))}e[a]=i}}return e}function kk(r){var t=OW(r),e=[];return A(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=t[l],c=Math.abs(o[1]-o[0]),f=i.scale.getExtent(),v=Math.abs(f[1]-f[0]);s=u?c/v*u:c}else{var h=a.getData();s=Math.abs(o[1]-o[0])/h.count()}var d=ne(a.get("barWidth"),s),p=ne(a.get("barMaxWidth"),s),g=ne(a.get("barMinWidth")||(Bk(a)?.5:1),s),y=a.get("barGap"),m=a.get("barCategoryGap"),_=a.get("defaultBarGap");e.push({bandWidth:s,barWidth:d,barMaxWidth:p,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:z1(i),stackId:V1(a)})}),Rk(e)}function Rk(r){var t={};A(r,function(a,n){var i=a.axisKey,o=a.bandWidth,s=t[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:a.defaultBarGap||0,stacks:{}},l=s.stacks;t[i]=s;var u=a.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=a.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var f=a.barMaxWidth;f&&(l[u].maxWidth=f);var v=a.barMinWidth;v&&(l[u].minWidth=v);var h=a.barGap;h!=null&&(s.gap=h);var d=a.barCategoryGap;d!=null&&(s.categoryGap=d)});var e={};return A(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=a.categoryGap;if(s==null){var l=He(i).length;s=Math.max(35-l*4,15)+"%"}var u=ne(s,o),c=ne(a.gap,1),f=a.remainedWidth,v=a.autoWidthCount,h=(f-u)/(v+(v-1)*c);h=Math.max(h,0),A(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,f-=S+c*S,v--}else{var S=h;m&&mS&&(S=_),S!==h&&(y.width=S,f-=S+c*S,v--)}}),h=(f-u)/(v+(v-1)*c),h=Math.max(h,0);var d=0,p;A(i,function(y,m){y.width||(y.width=h),p=y,d+=y.width*(1+c)}),p&&(d-=p.width*c);var g=-d/2;A(i,function(y,m){e[n][m]=e[n][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+c)})}),e}function NW(r,t,e){if(r&&t){var a=r[z1(t)];return a!=null&&e!=null?a[V1(e)]:a}}function Ek(r,t){var e=Pk(r,t),a=kk(e);A(e,function(n){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=V1(n),u=a[z1(s)][l],c=u.offset,f=u.width;i.setLayout({bandWidth:u.bandWidth,offset:c,size:f})})}function Ok(r){return{seriesType:r,plan:Nl(),reset:function(t){if(Nk(t)){var e=t.getData(),a=t.coordinateSystem,n=a.getBaseAxis(),i=a.getOtherAxis(n),o=e.getDimensionIndex(e.mapDimension(i.dim)),s=e.getDimensionIndex(e.mapDimension(n.dim)),l=t.get("showBackground",!0),u=e.mapDimension(i.dim),c=e.getCalculationInfo("stackResultDimension"),f=Ii(e,u)&&!!e.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),h=BW(n,i),d=Bk(t),p=t.get("barMinHeight")||0,g=c&&e.getDimensionIndex(c),y=e.getLayout("size"),m=e.getLayout("offset");return{progress:function(_,S){for(var w=_.count,x=d&&Za(w*3),b=d&&l&&Za(w*3),T=d&&Za(w),C=a.master.getRect(),D=v?C.width:C.height,M,L=S.getStore(),I=0;(M=_.next())!=null;){var P=L.get(f?g:o,M),R=L.get(s,M),E=h,O=void 0;f&&(O=+P-L.get(o,M));var k=void 0,N=void 0,B=void 0,F=void 0;if(v){var H=a.dataToPoint([P,R]);if(f){var j=a.dataToPoint([O,R]);E=j[0]}k=E,N=H[1]+m,B=H[0]-E,F=y,Math.abs(B)0?e:1:e))}var VW=function(r,t,e,a){for(;e>>1;r[n][1]n&&(this._approxInterval=n);var o=Ff.length,s=Math.min(VW(Ff,this._approxInterval,0,o),o-1);this._interval=Ff[s][1],this._intervalPrecision=yc(this._interval),this._minLevelUnit=Ff[Math.max(s-1,0)][0]},t.prototype.parse=function(e){return $e(e)?e:+is(e)},t.prototype.contain=function(e){return B1(e,this._extent)},t.prototype.normalize=function(e){return this._calculator.normalize(e,this._extent)},t.prototype.scale=function(e){return this._calculator.scale(e,this._extent)},t.type="time",t}(Li),Ff=[["second",c1],["minute",f1],["hour",Zu],["quarter-day",Zu*6],["half-day",Zu*12],["day",na*1.2],["half-week",na*3.5],["week",na*7],["month",na*31],["quarter",na*95],["half-year",Wx/2],["year",Wx]];function zk(r,t,e,a){return $m(new Date(t),r,a).getTime()===$m(new Date(e),r,a).getTime()}function zW(r,t){return r/=na,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function FW(r){var t=30*na;return r/=t,r>6?6:r>3?3:r>2?2:1}function GW(r){return r/=Zu,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function rC(r,t){return r/=t?f1:c1,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function HW(r){return AI(r,!0)}function $W(r,t,e){var a=Math.max(0,ke(Rr,t)-1);return $m(new Date(r),Rr[a],e).getTime()}function WW(r,t){var e=new Date(0);e[r](1);var a=e.getTime();e[r](1+t);var n=e.getTime()-a;return function(i,o){return Math.max(0,Math.round((o-i)/n))}}function YW(r,t,e,a,n,i){var o=1e4,s=KG,l=0;function u(I,P,R,E,O,k,N){for(var B=WW(O,I),F=P,H=new Date(F);Fo));)if(H[O](H[E]()+I),F=H.getTime(),i){var j=i.calcNiceTickMultiple(F,B);j>0&&(H[O](H[E]()+j*I),F=H.getTime())}N.push({value:F,notAdd:!0})}function c(I,P,R){var E=[],O=!P.length;if(!zk(Xu(I),a[0],a[1],e)){O&&(P=[{value:$W(a[0],I,e)},{value:a[1]}]);for(var k=0;k=a[0]&&N<=a[1]&&u(F,N,B,H,j,ee,E),I==="year"&&R.length>1&&k===0&&R.unshift({value:R[0].value-F})}}for(var k=0;k=a[0]&&S<=a[1]&&h++)}var w=n/t;if(h>w*1.5&&d>w/1.5||(f.push(m),h>w||r===s[p]))break}v=[]}}}for(var x=Qe(X(f,function(I){return Qe(I,function(P){return P.value>=a[0]&&P.value<=a[1]&&!P.notAdd})}),function(I){return I.length>0}),b=[],T=x.length-1,p=0;p0;)i*=10;var s=[c0(ZW(a[0]/i)*i),c0(UW(a[1]/i)*i)];this._interval=i,this._intervalPrecision=yc(i),this._niceExtent=s}},t.prototype.calcNiceExtent=function(e){r.prototype.calcNiceExtent.call(this,e),this._fixMin=e.fixMin,this._fixMax=e.fixMax},t.prototype.contain=function(e){return e=Hf(e)/Hf(this.base),r.prototype.contain.call(this,e)},t.prototype.normalize=function(e){return e=Hf(e)/Hf(this.base),r.prototype.normalize.call(this,e)},t.prototype.scale=function(e){return e=r.prototype.scale.call(this,e),Gf(this.base,e)},t.prototype.setBreaksFromOption=function(e){var a=It();if(a){var n=a.logarithmicParseBreaksFromOption(e,this.base,se(this.parse,this)),i=n.parsedOriginal,o=n.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},t.type="log",t}(Li);function $f(r,t){return c0(r,Ya(t))}vs.registerClass(Gk);const XW=Gk;var qW=function(){function r(t,e,a){this._prepareParams(t,e,a)}return r.prototype._prepareParams=function(t,e,a){a[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var v=this._determinedMin,h=this._determinedMax;return v!=null&&(s=v,u=!0),h!=null&&(l=h,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:f}},r.prototype.modifyDataMinMax=function(t,e){this[KW[t]]=e},r.prototype.setDeterminedMinMax=function(t,e){var a=jW[t];this[a]=e},r.prototype.freeze=function(){this.frozen=!0},r}(),jW={min:"_determinedMin",max:"_determinedMax"},KW={min:"_dataMin",max:"_dataMax"};function Hk(r,t,e){var a=r.rawExtentInfo;return a||(a=new qW(r,t,e),r.rawExtentInfo=a,a)}function Wf(r,t){return t==null?null:lr(t)?NaN:r.parse(t)}function $k(r,t){var e=r.type,a=Hk(r,t,r.getExtent()).calculate();r.setBlank(a.isBlank);var n=a.min,i=a.max,o=t.ecModel;if(o&&e==="time"){var s=Pk("bar",o),l=!1;if(A(s,function(f){l=l||f.getBaseAxis()===t.axis}),l){var u=kk(s),c=JW(n,i,t,u);n=c.min,i=c.max}}return{extent:[n,i],fixMin:a.minFixed,fixMax:a.maxFixed}}function JW(r,t,e,a){var n=e.axis.getExtent(),i=Math.abs(n[1]-n[0]),o=NW(a,e.axis);if(o===void 0)return{min:r,max:t};var s=1/0;A(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;A(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=t-r,f=1-(s+l)/i,v=c/f-c;return t+=v*(l/u),r-=v*(s/u),{min:r,max:t}}function yl(r,t){var e=t,a=$k(r,e),n=a.extent,i=e.get("splitNumber");r instanceof XW&&(r.base=e.get("logBase"));var o=r.type,s=e.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(Yk(e)),r.setExtent(n[0],n[1]),r.calcNiceExtent({splitNumber:i,fixMin:a.fixMin,fixMax:a.fixMax,minInterval:l?e.get("minInterval"):null,maxInterval:l?e.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Bd(r,t){if(t=t||r.get("type"),t)switch(t){case"category":return new _c({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new Fk({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(vs.getClass(t)||Li)}}function QW(r){var t=r.scale.getExtent(),e=t[0],a=t[1];return!(e>0&&a>0||e<0&&a<0)}function zl(r){var t=r.getLabelModel().get("formatter");if(r.type==="time"){var e=JG(t);return function(n,i){return r.scale.getFormattedLabel(n,i,e)}}else{if(oe(t))return function(n){var i=r.scale.getLabel(n),o=t.replace("{value}",i??"");return o};if(ye(t)){if(r.type==="category")return function(n,i){return t(Ch(r,n),n.value-r.scale.getExtent()[0],null)};var a=It();return function(n,i){var o=null;return a&&(o=a.makeAxisLabelFormatterParamBreak(o,n.break)),t(Ch(r,n),i,o)}}else return function(n){return r.scale.getLabel(n)}}}function Ch(r,t){return r.type==="category"?r.scale.getLabel(t):t.value}function F1(r){var t=r.get("interval");return t??"auto"}function Wk(r){return r.type==="category"&&F1(r.getLabelModel())===0}function Th(r,t){var e={};return A(r.mapDimensionsAll(t),function(a){e[Dk(r,a)]=!0}),He(e)}function eY(r,t,e){t&&A(Th(t,e),function(a){var n=t.getApproximateExtent(a);n[0]r[1]&&(r[1]=n[1])})}function ml(r){return r==="middle"||r==="center"}function Sc(r){return r.getShallow("show")}function Yk(r){var t=r.get("breaks",!0);if(t!=null)return!It()||!tY(r.axis)?void 0:t}function tY(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var $c=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var t=this.option;return!t.scale},r.prototype.getCoordSysModel=function(){},r}(),rY=1e-8;function aC(r,t){return Math.abs(r-t)n&&(a=o,n=l)}if(a)return nY(a.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},t.prototype.getBoundingRect=function(e){var a=this._rect;if(a&&!e)return a;var n=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return A(o,function(s){s.type==="polygon"?nC(s.exterior,n,i,e):A(s.points,function(l){nC(l,n,i,e)})}),isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])||(n[0]=n[1]=i[0]=i[1]=0),a=new Ce(n[0],n[1],i[0]-n[0],i[1]-n[1]),e||(this._rect=a),a},t.prototype.contain=function(e){var a=this.getBoundingRect(),n=this.geometries;if(!a.contain(e[0],e[1]))return!1;e: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/e,l/e])}return a}function sY(r,t){return r=oY(r),X(Qe(r.features,function(e){return e.geometry&&e.properties&&e.geometry.coordinates.length>0}),function(e){var a=e.properties,n=e.geometry,i=[];switch(n.type){case"Polygon":var o=n.coordinates;i.push(new iC(o[0],o.slice(1)));break;case"MultiPolygon":A(n.coordinates,function(l){l[0]&&i.push(new iC(l[0],l.slice(1)))});break;case"LineString":i.push(new oC([n.coordinates]));break;case"MultiLineString":i.push(new oC(n.coordinates))}var s=new Zk(a[t||"name"],i,a.cp);return s.properties=a,s})}var lY=ze(),Ku=ze(),Ca={estimate:1,determine:2};function Dh(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function qk(r,t){var e=X(t,function(a){return r.scale.parse(a)});return r.type==="time"&&e.length>0&&(e.sort(),e.unshift(e[0]),e.push(e[e.length-1])),e}function uY(r,t){var e=r.getLabelModel().get("customValues");if(e){var a=zl(r),n=r.scale.getExtent(),i=qk(r,e),o=Qe(i,function(s){return s>=n[0]&&s<=n[1]});return{labels:X(o,function(s){var l={value:s};return{formattedLabel:a(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?fY(r,t):hY(r)}function cY(r,t,e){var a=r.getTickModel().get("customValues");if(a){var n=r.scale.getExtent(),i=qk(r,a);return{ticks:Qe(i,function(o){return o>=n[0]&&o<=n[1]})}}return r.type==="category"?vY(r,t):{ticks:X(r.scale.getTicks(e),function(o){return o.value})}}function fY(r,t){var e=r.getLabelModel(),a=jk(r,e,t);return!e.get("show")||r.scale.isBlank()?{labels:[]}:a}function jk(r,t,e){var a=pY(r),n=F1(t),i=e.kind===Ca.estimate;if(!i){var o=Jk(a,n);if(o)return o}var s,l;ye(n)?s=tR(r,n):(l=n==="auto"?gY(r,e):n,s=eR(r,l));var u={labels:s,labelCategoryInterval:l};return i?e.out.noPxChangeTryDetermine.push(function(){return f0(a,n,u),!0}):f0(a,n,u),u}function vY(r,t){var e=dY(r),a=F1(t),n=Jk(e,a);if(n)return n;var i,o;if((!t.get("show")||r.scale.isBlank())&&(i=[]),ye(a))i=tR(r,a,!0);else if(a==="auto"){var s=jk(r,r.getLabelModel(),Dh(Ca.determine));o=s.labelCategoryInterval,i=X(s.labels,function(l){return l.tickValue})}else o=a,i=eR(r,o,!0);return f0(e,a,{ticks:i,tickCategoryInterval:o})}function hY(r){var t=r.scale.getTicks(),e=zl(r);return{labels:X(t,function(a,n){return{formattedLabel:e(a,n),rawLabel:r.scale.getLabel(a),tickValue:a.value,time:a.time,break:a.break}})}}var dY=Kk("axisTick"),pY=Kk("axisLabel");function Kk(r){return function(e){return Ku(e)[r]||(Ku(e)[r]={list:[]})}}function Jk(r,t){for(var e=0;ec&&(u=Math.max(1,Math.floor(l/c)));for(var f=s[0],v=r.dataToCoord(f+1)-r.dataToCoord(f),h=Math.abs(v*Math.cos(i)),d=Math.abs(v*Math.sin(i)),p=0,g=0;f<=s[1];f+=u){var y=0,m=0,_=pd(n({value:f}),a.font,"center","top");y=_.width*1.3,m=_.height*1.3,p=Math.max(p,y,7),g=Math.max(g,m,7)}var S=p/h,w=g/d;isNaN(S)&&(S=1/0),isNaN(w)&&(w=1/0);var x=Math.max(0,Math.floor(Math.min(S,w)));if(e===Ca.estimate)return t.out.noPxChangeTryDetermine.push(se(mY,null,r,x,l)),x;var b=Qk(r,x,l);return b??x}function mY(r,t,e){return Qk(r,t,e)==null}function Qk(r,t,e){var a=lY(r.model),n=r.getExtent(),i=a.lastAutoInterval,o=a.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-t)<=1&&Math.abs(o-e)<=1&&i>t&&a.axisExtent0===n[0]&&a.axisExtent1===n[1])return i;a.lastTickCount=e,a.lastAutoInterval=t,a.axisExtent0=n[0],a.axisExtent1=n[1]}function _Y(r){var t=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:t.get("rotate")||0,font:t.getFont()}}function eR(r,t,e){var a=zl(r),n=r.scale,i=n.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((t||0)+1,1),u=i[0],c=n.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var f=Wk(r),v=o.get("showMinLabel")||f,h=o.get("showMaxLabel")||f;v&&u!==i[0]&&p(i[0]);for(var d=u;d<=i[1];d+=l)p(d);h&&d-l!==i[1]&&p(i[1]);function p(g){var y={value:g};s.push(e?g:{formattedLabel:a(y),rawLabel:n.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function tR(r,t,e){var a=r.scale,n=zl(r),i=[];return A(a.getTicks(),function(o){var s=a.getLabel(o),l=o.value;t(o.value,s)&&i.push(e?l:{formattedLabel:n(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var sC=[0,1],SY=function(){function r(t,e,a){this.onBand=!1,this.inverse=!1,this.dim=t,this.scale=e,this._extent=a||[0,0]}return r.prototype.contain=function(t){var e=this._extent,a=Math.min(e[0],e[1]),n=Math.max(e[0],e[1]);return t>=a&&t<=n},r.prototype.containData=function(t){return this.scale.contain(this.scale.parse(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(t){return DI(t||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(t,e){var a=this._extent;a[0]=t,a[1]=e},r.prototype.dataToCoord=function(t,e){var a=this._extent,n=this.scale;return t=n.normalize(n.parse(t)),this.onBand&&n.type==="ordinal"&&(a=a.slice(),lC(a,n.count())),Je(t,sC,a,e)},r.prototype.coordToData=function(t,e){var a=this._extent,n=this.scale;this.onBand&&n.type==="ordinal"&&(a=a.slice(),lC(a,n.count()));var i=Je(t,a,sC,e);return this.scale.scale(i)},r.prototype.pointToData=function(t,e){},r.prototype.getTicksCoords=function(t){t=t||{};var e=t.tickModel||this.getTickModel(),a=cY(this,e,{breakTicks:t.breakTicks,pruneByBreak:t.pruneByBreak}),n=a.ticks,i=X(n,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=e.get("alignWithLabel");return wY(this,i,o,t.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var t=this.model.getModel("minorTick"),e=t.get("splitNumber");e>0&&e<100||(e=5);var a=this.scale.getMinorTicks(e),n=X(a,function(i){return X(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return n},r.prototype.getViewLabels=function(t){return t=t||Dh(Ca.determine),uY(this,t).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var t=this._extent,e=this.scale.getExtent(),a=e[1]-e[0]+(this.onBand?1:0);a===0&&(a=1);var n=Math.abs(t[1]-t[0]);return Math.abs(n)/a},r.prototype.calculateCategoryInterval=function(t){return t=t||Dh(Ca.determine),yY(this,t)},r}();function lC(r,t){var e=r[1]-r[0],a=t,n=e/a/2;r[0]+=n,r[1]-=n}function wY(r,t,e,a){var n=t.length;if(!r.onBand||e||!n)return;var i=r.getExtent(),o,s;if(n===1)t[0].coord=i[0],t[0].onBand=!0,o=t[1]={coord:i[1],tickValue:t[0].tickValue,onBand:!0};else{var l=t[n-1].tickValue-t[0].tickValue,u=(t[n-1].coord-t[0].coord)/l;A(t,function(h){h.coord-=u/2,h.onBand=!0});var c=r.scale.getExtent();s=1+c[1]-t[n-1].tickValue,o={coord:t[n-1].coord+u*s,tickValue:c[1]+1,onBand:!0},t.push(o)}var f=i[0]>i[1];v(t[0].coord,i[0])&&(a?t[0].coord=i[0]:t.shift()),a&&v(i[0],t[0].coord)&&t.unshift({coord:i[0],onBand:!0}),v(i[1],o.coord)&&(a?o.coord=i[1]:t.pop()),a&&v(o.coord,i[1])&&t.push({coord:i[1],onBand:!0});function v(h,d){return h=At(h),d=At(d),f?h>d:hn&&(n+=uu);var h=Math.atan2(s,o);if(h<0&&(h+=uu),h>=a&&h<=n||h+uu>=a&&h+uu<=n)return l[0]=c,l[1]=f,u-e;var d=e*Math.cos(a)+r,p=e*Math.sin(a)+t,g=e*Math.cos(n)+r,y=e*Math.sin(n)+t,m=(d-o)*(d-o)+(p-s)*(p-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=d,l[1]=p,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Mh(r,t,e,a,n,i,o,s){var l=n-r,u=i-t,c=e-r,f=a-t,v=Math.sqrt(c*c+f*f);c/=v,f/=v;var h=l*c+u*f,d=h/v;s&&(d=Math.min(Math.max(d,0),1)),d*=v;var p=o[0]=r+d*c,g=o[1]=t+d*f;return Math.sqrt((p-n)*(p-n)+(g-i)*(g-i))}function rR(r,t,e,a,n,i,o){e<0&&(r=r+e,e=-e),a<0&&(t=t+a,a=-a);var s=r+e,l=t+a,u=o[0]=Math.min(Math.max(n,r),s),c=o[1]=Math.min(Math.max(i,t),l);return Math.sqrt((u-n)*(u-n)+(c-i)*(c-i))}var pa=[];function TY(r,t,e){var a=rR(t.x,t.y,t.width,t.height,r.x,r.y,pa);return e.set(pa[0],pa[1]),a}function DY(r,t,e){for(var a=0,n=0,i=0,o=0,s,l,u=1/0,c=t.data,f=r.x,v=r.y,h=0;h0){t=t/180*Math.PI,ya.fromArray(r[0]),st.fromArray(r[1]),wt.fromArray(r[2]),we.sub(Xa,ya,st),we.sub($a,wt,st);var e=Xa.len(),a=$a.len();if(!(e<.001||a<.001)){Xa.scale(1/e),$a.scale(1/a);var n=Xa.dot($a),i=Math.cos(t);if(i1&&we.copy(yr,wt),yr.toArray(r[1])}}}}function MY(r,t,e){if(e<=180&&e>0){e=e/180*Math.PI,ya.fromArray(r[0]),st.fromArray(r[1]),wt.fromArray(r[2]),we.sub(Xa,st,ya),we.sub($a,wt,st);var a=Xa.len(),n=$a.len();if(!(a<.001||n<.001)){Xa.scale(1/a),$a.scale(1/n);var i=Xa.dot(t),o=Math.cos(e);if(i=l)we.copy(yr,wt);else{yr.scaleAndAdd($a,s/Math.tan(Math.PI/2-c));var f=wt.x!==st.x?(yr.x-st.x)/(wt.x-st.x):(yr.y-st.y)/(wt.y-st.y);if(isNaN(f))return;f<0?we.copy(yr,st):f>1&&we.copy(yr,wt)}yr.toArray(r[1])}}}}function Cg(r,t,e,a){var n=e==="normal",i=n?r:r.ensureState(e);i.ignore=t;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 AY(r,t){var e=t.smooth,a=t.points;if(a)if(r.moveTo(a[0][0],a[0][1]),e>0&&a.length>=3){var n=fi(a[0],a[1]),i=fi(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)*e,s=Av([],a[1],a[0],o/n),l=Av([],a[1],a[2],o/i),u=Av([],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 c=1;c0&&n&&x(-f/i,0,i);var g=r[0],y=r[i-1],m,_;S(),m<0&&b(-m,.8),_<0&&b(_,.8),S(),w(m,_,1),w(_,m,-1),S(),m<0&&T(-m),_<0&&T(_);function S(){m=g.rect[o]-e,_=a-y.rect[o]-y.rect[s]}function w(C,D,M){if(C<0){var L=Math.min(D,-C);if(L>0){x(L*M,0,i);var I=L+C;I<0&&b(-I*M,1)}else b(-C*M,1)}}function x(C,D,M){C!==0&&(c=!0);for(var L=D;L0)for(var I=0;I0;I--){var O=M[I-1]*E;x(-O,I,i)}}}function T(C){var D=C<0?-1:1;C=Math.abs(C);for(var M=Math.ceil(C/(i-1)),L=0;L0?x(M,0,L+1):x(-M,i-L-1,i),C-=M,C<=0)return}return c}function PY(r){for(var t=0;t=0&&a.attr(i.oldLayoutSelect),ke(v,"emphasis")>=0&&a.attr(i.oldLayoutEmphasis)),Ze(a,u,e,l)}else if(a.attr(u),!Rl(a).valueAnimation){var f=de(a.style.opacity,1);a.style.opacity=0,lt(a,{style:{opacity:f}},e,l)}if(i.oldLayout=u,a.states.select){var h=i.oldLayoutSelect={};Yf(h,u,Uf),Yf(h,a.states.select,Uf)}if(a.states.emphasis){var d=i.oldLayoutEmphasis={};Yf(d,u,Uf),Yf(d,a.states.emphasis,Uf)}VL(a,l,c,e,e)}if(n&&!n.ignore&&!n.invisible){var i=EY(n),o=i.oldLayout,p={points:n.shape.points};o?(n.attr({shape:o}),Ze(n,{shape:p},e)):(n.setShape(p),n.style.strokePercent=0,lt(n,{style:{strokePercent:1}},e)),i.oldLayout=p}},r}();const NY=OY;var Mg=ze();function BY(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){var n=Mg(e).labelManager;n||(n=Mg(e).labelManager=new NY),n.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(t,e,a){var n=Mg(e).labelManager;a.updatedSeries.forEach(function(i){n.addLabelsOfSeries(e.getViewOfSeriesModel(i))}),n.updateLayoutConfig(e),n.layout(e),n.processLabelsOverall()})}var Ag=Math.sin,Ig=Math.cos,lR=Math.PI,po=Math.PI*2,VY=180/lR,zY=function(){function r(){}return r.prototype.reset=function(t){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,t||4)},r.prototype.moveTo=function(t,e){this._add("M",t,e)},r.prototype.lineTo=function(t,e){this._add("L",t,e)},r.prototype.bezierCurveTo=function(t,e,a,n,i,o){this._add("C",t,e,a,n,i,o)},r.prototype.quadraticCurveTo=function(t,e,a,n){this._add("Q",t,e,a,n)},r.prototype.arc=function(t,e,a,n,i,o){this.ellipse(t,e,a,a,0,n,i,o)},r.prototype.ellipse=function(t,e,a,n,i,o,s,l){var u=s-o,c=!l,f=Math.abs(u),v=gi(f-po)||(c?u>=po:-u>=po),h=u>0?u%po:u%po+po,d=!1;v?d=!0:gi(f)?d=!1:d=h>=lR==!!c;var p=t+a*Ig(o),g=e+n*Ag(o);this._start&&this._add("M",p,g);var y=Math.round(i*VY);if(v){var m=1/this._p,_=(c?1:-1)*(po-m);this._add("A",a,n,y,1,+c,t+a*Ig(o+_),e+n*Ag(o+_)),m>.01&&this._add("A",a,n,y,0,+c,p,g)}else{var S=t+a*Ig(s),w=e+n*Ag(s);this._add("A",a,n,y,+d,+c,S,w)}},r.prototype.rect=function(t,e,a,n){this._add("M",t,e),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(t,e,a,n,i,o,s,l,u){for(var c=[],f=this._p,v=1;v"}function XY(r){return""}function $1(r,t){t=t||{};var e=t.newline?` `:"";function a(n){var i=n.children,o=n.tag,s=n.attrs,l=n.text;return ZY(o,s)+(o!=="style"?or(l):l||"")+(i?""+e+X(i,function(u){return a(u)}).join(e)+e:"")+XY(o)}return a(r)}function qY(r,t,e){e=e||{};var a=e.newline?` `:"",n=" {"+a,i=a+"}",o=X(He(r),function(l){return l+n+X(He(r[l]),function(u){return u+":"+r[l][u]+";"}).join(a)+i}).join(a),s=X(He(t),function(l){return"@keyframes "+l+n+X(He(t[l]),function(u){return u+n+X(He(t[l][u]),function(c){var f=t[l][u][c];return c==="d"&&(f='path("'+f+'")'),c+":"+f+";"}).join(a)+i}).join(a)+i}).join(a);return!o&&!s?"":[""].join(a)}function g0(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function dC(r,t,e,a){return Ht("svg","root",{width:r,height:t,xmlns:cR,"xmlns:xlink":fR,version:"1.1",baseProfile:"full",viewBox:a?"0 0 "+r+" "+t:!1},e)}var jY=0;function hR(){return jY++}var pC={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"},mo="transform-origin";function KY(r,t,e){var a=$({},r.shape);$(a,t),r.buildPath(e,a);var n=new uR;return n.reset(pI(r)),e.rebuildPath(n,1),n.generateStr(),n.getStr()}function JY(r,t){var e=t.originX,a=t.originY;(e||a)&&(r[mo]=e+"px "+a+"px")}var QY={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function dR(r,t){var e=t.zrId+"-ani-"+t.cssAnimIdx++;return t.cssAnims[e]=r,e}function e9(r,t,e){var a=r.shape.paths,n={},i,o;if(A(a,function(l){var u=g0(e.zrId);u.animation=!0,zd(l,{},u,!0);var c=u.cssAnims,f=u.cssNodes,v=He(c),h=v.length;if(h){o=v[h-1];var d=c[o];for(var p in d){var g=d[p];n[p]=n[p]||{d:""},n[p].d+=g.d||""}for(var y in f){var m=f[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){t.d=!1;var s=dR(n,e);return i.replace(o,s)}}function gC(r){return oe(r)?pC[r]?"cubic-bezier("+pC[r]+")":z_(r)?r:"":""}function zd(r,t,e,a){var n=r.animators,i=n.length,o=[];if(r instanceof Dd){var s=e9(r,t,e);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var Be=dR(b,e);return Be+" "+m[0]+" both"}}for(var g in l){var s=p(l[g]);s&&o.push(s)}if(o.length){var y=e.zrId+"-cls-"+hR();e.cssNodes["."+y]={animation:o.join(",")},t.class=y}}function t9(r,t,e){if(!r.ignore)if(r.isSilent()){var a={"pointer-events":"none"};yC(a,t,e,!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=pm(l))}var u=n.lineWidth;if(u){var c=!n.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var a={cursor:"pointer"};i&&(a.fill=i),n.stroke&&(a.stroke=n.stroke),u&&(a["stroke-width"]=u),yC(a,t,e,!0)}}function yC(r,t,e,a){var n=JSON.stringify(r),i=e.cssStyleCache[n];i||(i=e.zrId+"-cls-"+hR(),e.cssStyleCache[n]=i,e.cssNodes["."+i+(a?":hover":"")]=r),t.class=t.class?t.class+" "+i:i}var wc=Math.round;function pR(r){return r&&oe(r.src)}function gR(r){return r&&ye(r.toDataURL)}function W1(r,t,e,a){WY(function(n,i){var o=n==="fill"||n==="stroke";o&&dI(i)?mR(t,r,n,a):o&&F_(i)?_R(e,r,n,a):r[n]=i,o&&a.ssr&&i==="none"&&(r["pointer-events"]="visible")},t,e,!1),l9(e,r,a)}function Y1(r,t){var e=i3(t);e&&(e.each(function(a,n){a!=null&&(r[(hC+n).toLowerCase()]=a+"")}),t.isSilent()&&(r[hC+"silent"]="true"))}function mC(r){return gi(r[0]-1)&&gi(r[1])&&gi(r[2])&&gi(r[3]-1)}function r9(r){return gi(r[4])&&gi(r[5])}function U1(r,t,e){if(t&&!(r9(t)&&mC(t))){var a=e?10:1e4;r.transform=mC(t)?"translate("+wc(t[4]*a)/a+" "+wc(t[5]*a)/a+")":C5(t)}}function _C(r,t,e){for(var a=r.points,n=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";cr(v,g),cr(h,g)}else if(v==null||h==null){var y=function(D,M){if(D){var L=D.elm,I=v||M.width,P=h||M.height;D.tag==="pattern"&&(u?(P=1,I/=i.width):c&&(I=1,P/=i.height)),D.attrs.width=I,D.attrs.height=P,L&&(L.setAttribute("width",I),L.setAttribute("height",P))}},m=Z_(d,null,r,function(D){l||y(x,D),y(f,D)});m&&m.width&&m.height&&(v=v||m.width,h=h||m.height)}f=Ht("image","img",{href:d,width:v,height:h}),o.width=v,o.height=h}else n.svgElement&&(f=me(n.svgElement),o.width=n.svgWidth,o.height=n.svgHeight);if(f){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):c?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var w=gI(n);w&&(o.patternTransform=w);var x=Ht("pattern","",o,[f]),b=$1(x),T=a.patternCache,C=T[b];C||(C=a.zrId+"-p"+a.patternIdx++,T[b]=C,o.id=C,x=a.defs[C]=Ht("pattern",C,o,[f])),t[e]=dd(C)}}function u9(r,t,e){var a=e.clipPathCache,n=e.defs,i=a[r.id];if(!i){i=e.zrId+"-c"+e.clipPathIdx++;var o={id:i};a[r.id]=i,n[i]=Ht("clipPath",i,o,[yR(r,e)])}t["clip-path"]=dd(i)}function xC(r){return document.createTextNode(r)}function To(r,t,e){r.insertBefore(t,e)}function bC(r,t){r.removeChild(t)}function CC(r,t){r.appendChild(t)}function SR(r){return r.parentNode}function wR(r){return r.nextSibling}function Lg(r,t){r.textContent=t}var TC=58,c9=120,f9=Ht("","");function y0(r){return r===void 0}function za(r){return r!==void 0}function v9(r,t,e){for(var a={},n=t;n<=e;++n){var i=r[n].key;i!==void 0&&(a[i]=n)}return a}function Ru(r,t){var e=r.key===t.key,a=r.tag===t.tag;return a&&e}function xc(r){var t,e=r.children,a=r.tag;if(za(a)){var n=r.elm=vR(a);if(Z1(f9,r),Z(e))for(t=0;ti?(d=e[l+1]==null?null:e[l+1].elm,xR(r,d,e,n,l)):Ph(r,t,a,i))}function Zs(r,t){var e=t.elm=r.elm,a=r.children,n=t.children;r!==t&&(Z1(r,t),y0(t.text)?za(a)&&za(n)?a!==n&&h9(e,a,n):za(n)?(za(r.text)&&Lg(e,""),xR(e,null,n,0,n.length-1)):za(a)?Ph(e,a,0,a.length-1):za(r.text)&&Lg(e,""):r.text!==t.text&&(za(a)&&Ph(e,a,0,a.length-1),Lg(e,t.text)))}function d9(r,t){if(Ru(r,t))Zs(r,t);else{var e=r.elm,a=SR(e);xc(t),a!==null&&(To(a,t.elm,wR(e)),Ph(a,[r],0,0))}return t}var p9=0,g9=function(){function r(t,e,a){if(this.type="svg",this.refreshHover=DC(),this.configLayer=DC(),this.storage=e,this._opts=a=$({},a),this.root=t,this._id="zr"+p9++,this._oldVNode=dC(a.width,a.height),t&&!a.ssr){var n=this._viewport=document.createElement("div");n.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=vR("svg");Z1(null,this._oldVNode),n.appendChild(i),t.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 t=this.getViewportRoot();if(t)return{offsetLeft:t.offsetLeft||0,offsetTop:t.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var t=this.renderToVNode({willUpdate:!0});t.attrs.style="position:absolute;left:0;top:0;user-select:none",d9(this._oldVNode,t),this._oldVNode=t}},r.prototype.renderOneToVNode=function(t){return wC(t,g0(this._id))},r.prototype.renderToVNode=function(t){t=t||{};var e=this.storage.getDisplayList(!0),a=this._width,n=this._height,i=g0(this._id);i.animation=t.animation,i.willUpdate=t.willUpdate,i.compress=t.compress,i.emphasis=t.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=y9(a,n,this._backgroundColor,i);s&&o.push(s);var l=t.compress?null:this._mainVNode=Ht("g","main",{},[]);this._paintList(e,i,l?l.children:o),l&&o.push(l);var u=X(He(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(Ht("defs","defs",{},u)),t.animation){var c=qY(i.cssNodes,i.cssAnims,{newline:!0});if(c){var f=Ht("style","stl",{},[],c);o.push(f)}}return dC(a,n,o,t.useViewBox)},r.prototype.renderToString=function(t){return t=t||{},$1(this.renderToVNode({animation:de(t.cssAnimation,!0),emphasis:de(t.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:de(t.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(t,e,a){for(var n=t.length,i=[],o=0,s,l,u=0,c=0;c=0&&!(v&&l&&v[p]===l[p]);p--);for(var g=d-1;g>p;g--)o--,s=i[o-1];for(var y=p+1;y=s)}}for(var f=this.__startIndex;f15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var D=h.dpr,M=0;M0&&t>n[0]){for(l=0;lt);l++);s=a[n[l]]}if(n.splice(l+1,0,t),a[t]=e,!e.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(e.dom,u.nextSibling):o.appendChild(e.dom)}else o.firstChild?o.insertBefore(e.dom,o.firstChild):o.appendChild(e.dom);e.painter||(e.painter=this)}},r.prototype.eachLayer=function(t,e){for(var a=this._zlevelList,n=0;n0?Zf:0),this._needsManuallyCompositing),c.__builtin__||k_("ZLevel "+u+" has been used by unkown layer "+c.id),c!==i&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,e(l),i=c),n.__dirty&Or&&!n.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}e(l),this.eachBuiltinLayer(function(f,v){!f.__used&&f.getElementCount()>0&&(f.__dirty=!0,f.__startIndex=f.__endIndex=f.__drawIndex=0),f.__dirty&&f.__drawIndex<0&&(f.__drawIndex=f.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(t){t.clear()},r.prototype.setBackgroundColor=function(t){this._backgroundColor=t,A(this._layers,function(e){e.setUnpainted()})},r.prototype.configLayer=function(t,e){if(e){var a=this._layerConfig;a[t]?Re(a[t],e,!0):a[t]=e;for(var n=0;n-1&&(u.style.stroke=u.style.fill,u.style.fill=G.color.neutral00,u.style.lineWidth=2),a},t.type="series.line",t.dependencies=["grid","polar"],t.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:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},t}(ft);const A9=M9;function _l(r,t){var e=r.mapDimensionsAll("defaultedLabel"),a=e.length;if(a===1){var n=pl(r,t,e[0]);return n!=null?n+"":null}else if(a){for(var i=[],o=0;o=0&&a.push(t[i])}return a.join(" ")}var I9=function(r){V(t,r);function t(e,a,n,i){var o=r.call(this)||this;return o.updateData(e,a,n,i),o}return t.prototype._createSymbol=function(e,a,n,i,o,s){this.removeAll();var l=kt(e,-1,-1,2,2,null,s);l.attr({z2:de(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=L9,this._symbolType=e,this.add(l)},t.prototype.stopSymbolAnimation=function(e){this.childAt(0).stopAnimation(null,e)},t.prototype.getSymbolType=function(){return this._symbolType},t.prototype.getSymbolPath=function(){return this.childAt(0)},t.prototype.highlight=function(){On(this.childAt(0))},t.prototype.downplay=function(){Nn(this.childAt(0))},t.prototype.setZ=function(e,a){var n=this.childAt(0);n.zlevel=e,n.z=a},t.prototype.setDraggable=function(e,a){var n=this.childAt(0);n.draggable=e,n.cursor=!a&&e?"move":n.cursor},t.prototype.updateData=function(e,a,n,i){this.silent=!1;var o=e.getItemVisual(a,"symbol")||"circle",s=e.hostModel,l=t.getSymbolSize(e,a),u=t.getSymbolZ2(e,a),c=o!==this._symbolType,f=i&&i.disableAnimation;if(c){var v=e.getItemVisual(a,"symbolKeepAspect");this._createSymbol(o,e,a,l,u,v)}else{var h=this.childAt(0);h.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};f?h.attr(d):Ze(h,d,s,a),ua(h)}if(this._updateCommon(e,a,l,n,i),c){var h=this.childAt(0);if(!f){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,lt(h,d,s,a)}}f&&this.childAt(0).stopAnimation("leave")},t.prototype._updateCommon=function(e,a,n,i,o){var s=this.childAt(0),l=e.hostModel,u,c,f,v,h,d,p,g,y;if(i&&(u=i.emphasisItemStyle,c=i.blurItemStyle,f=i.selectItemStyle,v=i.focus,h=i.blurScope,p=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,d=i.emphasisDisabled),!i||e.hasItemOption){var m=i&&i.itemModel?i.itemModel:e.getItemModel(a),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),f=m.getModel(["select","itemStyle"]).getItemStyle(),c=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),h=_.get("blurScope"),d=_.get("disabled"),p=zt(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=e.getItemVisual(a,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var w=cs(e.getItemVisual(a,"symbolOffset"),n);w&&(s.x=w[0],s.y=w[1]),y&&s.attr("cursor",y);var x=e.getItemVisual(a,"style"),b=x.fill;if(s instanceof rr){var T=s.style;s.useStyle($({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle($({},x)):s.useStyle(x),s.style.decal=null,s.setColor(b,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=e.getItemVisual(a,"liftZ"),D=this._z2;C!=null?D==null&&(this._z2=s.z2,s.z2+=C):D!=null&&(s.z2=D,this._z2=null);var M=o&&o.useNameLabel;$t(s,p,{labelFetcher:l,labelDataIndex:a,defaultText:L,inheritColor:b,defaultOpacity:x.opacity});function L(R){return M?e.getName(R):_l(e,R)}this._sizeX=n[0]/2,this._sizeY=n[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=f,s.ensureState("blur").style=c;var P=g==null||g===!0?Math.max(1.1,3/this._sizeY):isFinite(g)&&g>0?+g:1;I.scaleX=this._sizeX*P,I.scaleY=this._sizeY*P,this.setSymbolScale(1),ut(this,v,h,d)},t.prototype.setSymbolScale=function(e){this.scaleX=this.scaleY=e},t.prototype.fadeOut=function(e,a,n){var i=this.childAt(0),o=De(this).dataIndex,s=n&&n.animation;if(this.silent=i.silent=!0,n&&n.fadeLabel){var l=i.getTextContent();l&&Ai(l,{style:{opacity:0}},a,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();Ai(i,{style:{opacity:0},scaleX:0,scaleY:0},a,{dataIndex:o,cb:e,removeOpt:s})},t.getSymbolSize=function(e,a){return Vl(e.getItemVisual(a,"symbolSize"))},t.getSymbolZ2=function(e,a){return e.getItemVisual(a,"z2")},t}(_e);function L9(r,t){this.parent.drift(r,t)}const Wc=I9;function kg(r,t,e,a){return t&&!isNaN(t[0])&&!isNaN(t[1])&&!(a.isIgnore&&a.isIgnore(e))&&!(a.clipShape&&!a.clipShape.contain(t[0],t[1]))&&r.getItemVisual(e,"symbol")!=="none"}function IC(r){return r!=null&&!be(r)&&(r={isIgnore:r}),r||{}}function LC(r){var t=r.hostModel,e=t.getModel("emphasis");return{emphasisItemStyle:e.getModel("itemStyle").getItemStyle(),blurItemStyle:t.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:t.getModel(["select","itemStyle"]).getItemStyle(),focus:e.get("focus"),blurScope:e.get("blurScope"),emphasisDisabled:e.get("disabled"),hoverScale:e.get("scale"),labelStatesModels:zt(t),cursorStyle:t.get("cursor")}}var P9=function(){function r(t){this.group=new _e,this._SymbolCtor=t||Wc}return r.prototype.updateData=function(t,e){this._progressiveEls=null,e=IC(e);var a=this.group,n=t.hostModel,i=this._data,o=this._SymbolCtor,s=e.disableAnimation,l=LC(t),u={disableAnimation:s},c=e.getSymbolPoint||function(f){return t.getItemLayout(f)};i||a.removeAll(),t.diff(i).add(function(f){var v=c(f);if(kg(t,v,f,e)){var h=new o(t,f,l,u);h.setPosition(v),t.setItemGraphicEl(f,h),a.add(h)}}).update(function(f,v){var h=i.getItemGraphicEl(v),d=c(f);if(!kg(t,d,f,e)){a.remove(h);return}var p=t.getItemVisual(f,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==p)a.remove(h),h=new o(t,f,l,u),h.setPosition(d);else{h.updateData(t,f,l,u);var y={x:d[0],y:d[1]};s?h.attr(y):Ze(h,y,n)}a.add(h),t.setItemGraphicEl(f,h)}).remove(function(f){var v=i.getItemGraphicEl(f);v&&v.fadeOut(function(){a.remove(v)},n)}).execute(),this._getSymbolPoint=c,this._data=t},r.prototype.updateLayout=function(){var t=this,e=this._data;e&&e.eachItemGraphicEl(function(a,n){var i=t._getSymbolPoint(n);a.setPosition(i),a.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=LC(t),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e,a){this._progressiveEls=[],a=IC(a);function n(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=t.start;i0?e=a[0]:a[1]<0&&(e=a[1]),e}function TR(r,t,e,a){var n=NaN;r.stacked&&(n=e.get(e.getCalculationInfo("stackedOverDimension"),a)),isNaN(n)&&(n=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=e.get(r.baseDim,a),o[1-i]=n,t.dataToPoint(o)}function R9(r,t){var e=[];return t.diff(r).add(function(a){e.push({cmd:"+",idx:a})}).update(function(a,n){e.push({cmd:"=",idx:n,idx1:a})}).remove(function(a){e.push({cmd:"-",idx:a})}).execute(),e}function E9(r,t,e,a,n,i,o,s){for(var l=R9(r,t),u=[],c=[],f=[],v=[],h=[],d=[],p=[],g=CR(n,t,o),y=r.getLayout("points")||[],m=t.getLayout("points")||[],_=0;_=n||p<0)break;if($o(y,m)){if(l){p+=i;continue}break}if(p===e)r[i>0?"moveTo":"lineTo"](y,m),f=y,v=m;else{var _=y-u,S=m-c;if(_*_+S*S<.5){p+=i;continue}if(o>0){for(var w=p+i,x=t[w*2],b=t[w*2+1];x===y&&b===m&&g=a||$o(x,b))h=y,d=m;else{D=x-u,M=b-c;var P=y-u,R=x-y,E=m-c,O=b-m,k=void 0,N=void 0;if(s==="x"){k=Math.abs(P),N=Math.abs(R);var B=D>0?1:-1;h=y-B*k*o,d=m,L=y+B*N*o,I=m}else if(s==="y"){k=Math.abs(E),N=Math.abs(O);var F=M>0?1:-1;h=y,d=m-F*k*o,L=y,I=m+F*N*o}else k=Math.sqrt(P*P+E*E),N=Math.sqrt(R*R+O*O),C=N/(N+k),h=y-D*o*(1-C),d=m-M*o*(1-C),L=y+D*o*C,I=m+M*o*C,L=ti(L,ri(x,y)),I=ti(I,ri(b,m)),L=ri(L,ti(x,y)),I=ri(I,ti(b,m)),D=L-y,M=I-m,h=y-D*k/N,d=m-M*k/N,h=ti(h,ri(u,y)),d=ti(d,ri(c,m)),h=ri(h,ti(u,y)),d=ri(d,ti(c,m)),D=y-h,M=m-d,L=y+D*N/k,I=m+M*N/k}r.bezierCurveTo(f,v,h,d,y,m),f=L,v=I}else r.lineTo(y,m)}u=y,c=m,p+=i}return g}var DR=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),O9=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polyline",a}return t.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new DR},t.prototype.buildPath=function(e,a){var n=a.points,i=0,o=n.length/2;if(a.connectNulls){for(;o>0&&$o(n[o*2-2],n[o*2-1]);o--);for(;i=0){var S=u?(d-l)*_+l:(h-s)*_+s;return u?[e,S]:[S,e]}s=h,l=d;break;case o.C:h=i[f++],d=i[f++],p=i[f++],g=i[f++],y=i[f++],m=i[f++];var w=u?eh(s,h,p,y,e,c):eh(l,d,g,m,e,c);if(w>0)for(var x=0;x=0){var S=u?Gt(l,d,g,m,b):Gt(s,h,p,y,b);return u?[e,S]:[S,e]}}s=y,l=m;break}}},t}(Fe),N9=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t}(DR),MR=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a.type="ec-polygon",a}return t.prototype.getDefaultShape=function(){return new N9},t.prototype.buildPath=function(e,a){var n=a.points,i=a.stackedOnPoints,o=0,s=n.length/2,l=a.smoothMonotone;if(a.connectNulls){for(;s>0&&$o(n[s*2-2],n[s*2-1]);s--);for(;ot){i?e.push(o(i,l,t)):n&&e.push(o(n,l,0),o(n,l,t));break}else n&&(e.push(o(n,l,0)),n=null),e.push(l),i=l}return e}function z9(r,t,e){var a=r.getVisual("visualMeta");if(!(!a||!a.length||!r.count())&&t.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=t.getAxis(n),u=X(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,f=i.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),f.reverse());var v=V9(u,n==="x"?e.getWidth():e.getHeight()),h=v.length;if(!h&&c)return u[0].coord<0?f[1]?f[1]:u[c-1].color:f[0]?f[0]:u[0].color;var d=10,p=v[0].coord-d,g=v[h-1].coord+d,y=g-p;if(y<.001)return"transparent";A(v,function(_){_.offset=(_.coord-p)/y}),v.push({offset:h?v[h-1].offset:.5,color:f[1]||"transparent"}),v.unshift({offset:h?v[0].offset:.5,color:f[0]||"transparent"});var m=new Pl(0,0,0,0,v,!0);return m[n]=p,m[n+"2"]=g,m}}}function F9(r,t,e){var a=r.get("showAllSymbol"),n=a==="auto";if(!(a&&!n)){var i=e.getAxesByScale("ordinal")[0];if(i&&!(n&&G9(i,t))){var o=t.mapDimension(i.dim),s={};return A(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(t.get(o,l))}}}}function G9(r,t){var e=r.getExtent(),a=Math.abs(e[1]-e[0])/r.scale.count();isNaN(a)&&(a=0);for(var n=t.count(),i=Math.max(1,Math.round(n/5)),o=0;oa)return!1;return!0}function H9(r,t){return isNaN(r)||isNaN(t)}function $9(r){for(var t=r.length/2;t>0&&H9(r[t*2-2],r[t*2-1]);t--);return t-1}function OC(r,t){return[r[t*2],r[t*2+1]]}function W9(r,t,e){for(var a=r.length/2,n=e==="x"?0:1,i,o,s=0,l=-1,u=0;u=t||i>=t&&o<=t){l=u;break}s=u,i=o}return{range:[s,l],t:(t-i)/(o-i)}}function LR(r){if(r.get(["endLabel","show"]))return!0;for(var t=0;t<_r.length;t++)if(r.get([_r[t],"endLabel","show"]))return!0;return!1}function Rg(r,t,e,a){if(Pi(t,"cartesian2d")){var n=a.getModel("endLabel"),i=n.get("valueAnimation"),o=a.getData(),s={lastFrameIndex:0},l=LR(a)?function(h,d){r._endLabelOnDuring(h,d,o,s,i,n,t)}:null,u=t.getBaseAxis().isHorizontal(),c=AR(t,e,a,function(){var h=r._endLabel;h&&e&&s.originalX!=null&&h.attr({x:s.originalX,y:s.originalY})},l);if(!a.get("clip",!0)){var f=c.shape,v=Math.max(f.width,f.height);u?(f.y-=v,f.height+=v*2):(f.x-=v,f.width+=v*2)}return l&&l(1,c),c}else return IR(t,e,a)}function Y9(r,t){var e=t.getBaseAxis(),a=e.isHorizontal(),n=e.inverse,i=a?n?"right":"left":"center",o=a?"middle":n?"top":"bottom";return{normal:{align:r.get("align")||i,verticalAlign:r.get("verticalAlign")||o}}}var U9=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(){var e=new _e,a=new Yc;this.group.add(a.group),this._symbolDraw=a,this._lineGroup=e,this._changePolyState=se(this._changePolyState,this)},t.prototype.render=function(e,a,n){var i=e.coordinateSystem,o=this.group,s=e.getData(),l=e.getModel("lineStyle"),u=e.getModel("areaStyle"),c=s.getLayout("points")||[],f=i.type==="polar",v=this._coordSys,h=this._symbolDraw,d=this._polyline,p=this._polygon,g=this._lineGroup,y=!a.ssr&&e.get("animation"),m=!u.isEmpty(),_=u.get("origin"),S=CR(i,s,_),w=m&&B9(i,s,S),x=e.get("showSymbol"),b=e.get("connectNulls"),T=x&&!f&&F9(e,s,i),C=this._data;C&&C.eachItemGraphicEl(function(ce,Ae){ce.__temp&&(o.remove(ce),C.setItemGraphicEl(Ae,null))}),x||h.remove(),o.add(g);var D=f?!1:e.get("step"),M;i&&i.getArea&&e.get("clip",!0)&&(M=i.getArea(),M.width!=null?(M.x-=.1,M.y-=.1,M.width+=.2,M.height+=.2):M.r0&&(M.r0-=.5,M.r+=.5)),this._clipShapeForSymbol=M;var L=z9(s,i,n)||s.getVisual("style")[s.getVisual("drawType")];if(!(d&&v.type===i.type&&D===this._step))x&&h.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(ce){return[c[ce*2],c[ce*2+1]]}}),y&&this._initSymbolLabelAnimation(s,i,M),D&&(w&&(w=ai(w,c,i,D,b)),c=ai(c,null,i,D,b)),d=this._newPolyline(c),m?p=this._newPolygon(c,w):p&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(e,i,Jo(L)),g.setClipPath(Rg(this,i,!0,e));else{m&&!p?p=this._newPolygon(c,w):p&&!m&&(g.remove(p),p=this._polygon=null),f||this._initOrUpdateEndLabel(e,i,Jo(L));var I=g.getClipPath();if(I){var P=Rg(this,i,!1,e);lt(I,{shape:P.shape},e)}else g.setClipPath(Rg(this,i,!0,e));x&&h.updateData(s,{isIgnore:T,clipShape:M,disableAnimation:!0,getSymbolPoint:function(ce){return[c[ce*2],c[ce*2+1]]}}),(!PC(this._stackedOnPoints,w)||!PC(this._points,c))&&(y?this._doUpdateAnimation(s,w,i,n,D,_,b):(D&&(w&&(w=ai(w,c,i,D,b)),c=ai(c,null,i,D,b)),d.setShape({points:c}),p&&p.setShape({points:c,stackedOnPoints:w})))}var R=e.getModel("emphasis"),E=R.get("focus"),O=R.get("blurScope"),k=R.get("disabled");if(d.useStyle(xe(l.getLineStyle(),{fill:"none",stroke:L,lineJoin:"bevel"})),Vt(d,e,"lineStyle"),d.style.lineWidth>0&&e.get(["emphasis","lineStyle","width"])==="bolder"){var N=d.getState("emphasis").style;N.lineWidth=+d.style.lineWidth+1}De(d).seriesIndex=e.seriesIndex,ut(d,E,O,k);var B=EC(e.get("smooth")),F=e.get("smoothMonotone");if(d.setShape({smooth:B,smoothMonotone:F,connectNulls:b}),p){var H=s.getCalculationInfo("stackedOnSeries"),j=0;p.useStyle(xe(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(j=EC(H.get("smooth"))),p.setShape({smooth:B,stackedOnSmooth:j,smoothMonotone:F,connectNulls:b}),Vt(p,e,"areaStyle"),De(p).seriesIndex=e.seriesIndex,ut(p,E,O,k)}var ee=this._changePolyState;s.eachItemGraphicEl(function(ce){ce&&(ce.onHoverStateChange=ee)}),this._polyline.onHoverStateChange=ee,this._data=s,this._coordSys=i,this._stackedOnPoints=w,this._points=c,this._step=D,this._valueOrigin=_,e.get("triggerLineEvent")&&(this.packEventData(e,d),p&&this.packEventData(e,p))},t.prototype.packEventData=function(e,a){De(a).eventData={componentType:"series",componentSubType:"line",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"line"}},t.prototype.highlight=function(e,a,n,i){var o=e.getData(),s=Zo(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 c=l[s*2],f=l[s*2+1];if(isNaN(c)||isNaN(f)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,f))return;var v=e.get("zlevel")||0,h=e.get("z")||0;u=new Wc(o,s),u.x=c,u.y=f,u.setZ(v,h);var d=u.getSymbolPath().getTextContent();d&&(d.zlevel=v,d.z=h,d.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else ot.prototype.highlight.call(this,e,a,n,i)},t.prototype.downplay=function(e,a,n,i){var o=e.getData(),s=Zo(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 ot.prototype.downplay.call(this,e,a,n,i)},t.prototype._changePolyState=function(e){var a=this._polygon;fh(this._polyline,e),a&&fh(a,e)},t.prototype._newPolyline=function(e){var a=this._polyline;return a&&this._lineGroup.remove(a),a=new O9({shape:{points:e},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(a),this._polyline=a,a},t.prototype._newPolygon=function(e,a){var n=this._polygon;return n&&this._lineGroup.remove(n),n=new MR({shape:{points:e,stackedOnPoints:a},segmentIgnoreThreshold:2}),this._lineGroup.add(n),this._polygon=n,n},t.prototype._initSymbolLabelAnimation=function(e,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=e.hostModel,c=u.get("animationDuration");ye(c)&&(c=c(null));var f=u.get("animationDelay")||0,v=ye(f)?f(null):f;e.eachItemGraphicEl(function(h,d){var p=h;if(p){var g=[h.x,h.y],y=void 0,m=void 0,_=void 0;if(n)if(o){var S=n,w=a.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-w[1]/180*Math.PI):(y=S.r0,m=S.r,_=w[0])}else{var x=n;i?(y=x.x,m=x.x+x.width,_=h.x):(y=x.y+x.height,m=x.y,_=h.y)}var b=m===y?0:(_-y)/(m-y);l&&(b=1-b);var T=ye(f)?f(d):c*b+v,C=p.getSymbolPath(),D=C.getTextContent();p.attr({scaleX:0,scaleY:0}),p.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),D&&D.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},t.prototype._initOrUpdateEndLabel=function(e,a,n){var i=e.getModel("endLabel");if(LR(e)){var o=e.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 Ue({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=$9(l);c>=0&&($t(s,zt(e,"endLabel"),{inheritColor:n,labelFetcher:e,labelDataIndex:c,defaultText:function(f,v,h){return h!=null?bR(o,h):_l(o,f)},enableTextSetter:!0},Y9(i,a)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},t.prototype._endLabelOnDuring=function(e,a,n,i,o,s,l){var u=this._endLabel,c=this._polyline;if(u){e<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var f=n.getLayout("points"),v=n.hostModel,h=v.get("connectNulls"),d=s.get("precision"),p=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,w=(y?p:0)*(m?-1:1),x=(y?0:-p)*(m?-1:1),b=y?"x":"y",T=W9(f,S,b),C=T.range,D=C[1]-C[0],M=void 0;if(D>=1){if(D>1&&!h){var L=OC(f,C[0]);u.attr({x:L[0]+w,y:L[1]+x}),o&&(M=v.getRawValue(C[0]))}else{var L=c.getPointOn(S,b);L&&u.attr({x:L[0]+w,y:L[1]+x});var I=v.getRawValue(C[0]),P=v.getRawValue(C[1]);o&&(M=VI(n,d,I,P,T.t))}i.lastFrameIndex=C[0]}else{var R=e===1||i.lastFrameIndex>0?C[0]:0,L=OC(f,R);o&&(M=v.getRawValue(R)),u.attr({x:L[0]+w,y:L[1]+x})}if(o){var E=Rl(u);typeof E.setLabelText=="function"&&E.setLabelText(M)}}},t.prototype._doUpdateAnimation=function(e,a,n,i,o,s,l){var u=this._polyline,c=this._polygon,f=e.hostModel,v=E9(this._data,e,this._stackedOnPoints,a,this._coordSys,n,this._valueOrigin),h=v.current,d=v.stackedOnCurrent,p=v.next,g=v.stackedOnNext;if(o&&(d=ai(v.stackedOnCurrent,v.current,n,o,l),h=ai(v.current,null,n,o,l),g=ai(v.stackedOnNext,v.next,n,o,l),p=ai(v.next,null,n,o,l)),RC(h,p)>3e3||c&&RC(d,g)>3e3){u.stopAnimation(),u.setShape({points:p}),c&&(c.stopAnimation(),c.setShape({points:p,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=h;var y={shape:{points:p}};v.current!==h&&(y.shape.__points=v.next),u.stopAnimation(),Ze(u,y,f),c&&(c.setShape({points:h,stackedOnPoints:d}),c.stopAnimation(),Ze(c,{shape:{stackedOnPoints:g}},f),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var w=_[S].cmd;if(w==="="){var x=e.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var b=u.shape.__points,T=0;Tt&&(t=r[e]);return isFinite(t)?t:NaN},min:function(r){for(var t=1/0,e=0;e10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),f=a.getDevicePixelRatio(),v=Math.abs(c[1]-c[0])*(f||1),h=Math.round(s/v);if(isFinite(h)&&h>1){i==="lttb"?t.setData(n.lttbDownSample(n.mapDimension(u.dim),1/h)):i==="minmax"&&t.setData(n.minmaxDownSample(n.mapDimension(u.dim),1/h));var d=void 0;oe(i)?d=X9[i]:ye(i)&&(d=i),d&&t.setData(n.downSample(n.mapDimension(u.dim),1/h,d,q9))}}}}}function j9(r){r.registerChartView(Z9),r.registerSeriesModel(A9),r.registerLayout(Zc("line",!0)),r.registerVisual({seriesType:"line",reset:function(t){var e=t.getData(),a=t.getModel("lineStyle").getLineStyle();a&&!a.stroke&&(a.stroke=e.getVisual("style").fill),e.setVisual("legendLineStyle",a)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,PR("line"))}var kR=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return $n(null,this,{useEncodeDefaulter:!0})},t.prototype.getMarkerPosition=function(e,a,n){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(e),s=i.dataToPoint(o);if(n)A(i.getAxes(),function(v,h){if(v.type==="category"&&a!=null){var d=v.getTicksCoords(),p=v.getTickModel().get("alignWithLabel"),g=o[h],y=a[h]==="x1"||a[h]==="y1";if(y&&!p&&(g+=1),d.length<2)return;if(d.length===2){s[h]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,w=0;wg){_=(x+m)/2;break}w===1&&(S=b-d[0].tickValue)}_==null&&(m?m&&(_=d[d.length-1].coord):_=d[0].coord),s[h]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),f=i.getBaseAxis().isHorizontal()?0:1;s[f]+=u+c/2}return s}return[NaN,NaN]},t.type="series.__base_bar__",t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},t}(ft);ft.registerClass(kR);const kh=kR;var K9=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(){return $n(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},t.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},t.prototype.getProgressiveThreshold=function(){var e=this.get("progressiveThreshold"),a=this.get("largeThreshold");return a>e&&(e=a),e},t.prototype.brushSelector=function(e,a,n){return n.rect(a.getItemLayout(e))},t.type="series.bar",t.dependencies=["grid","polar"],t.defaultOption=zi(kh.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:G.color.primary,borderWidth:2}},realtimeSort:!1}),t}(kh);const J9=K9;var Q9=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}(),eU=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a.type="sausage",a}return t.prototype.getDefaultShape=function(){return new Q9},t.prototype.buildPath=function(e,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,c=a.startAngle,f=a.endAngle,v=a.clockwise,h=Math.PI*2,d=v?f-cMath.PI/2&&cs)return!0;s=f}return!1},t.prototype._isOrderDifferentInView=function(e,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(e.ordinalNumbers[o]!==n.getRawOrdinalNumber(o))return!0},t.prototype._updateSortWithinSameData=function(e,a,n,i){if(this._isOrderChangedWithinSameData(e,a,n)){var o=this._dataSort(e,n,a);this._isOrderDifferentInView(o,n)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:n.dim+"Axis",axisId:n.index,sortInfo:o}))}},t.prototype._dispatchInitSort=function(e,a,n){var i=a.baseAxis,o=this._dataSort(e,i,function(s){return e.get(e.mapDimension(a.otherAxis.dim),s)});n.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},t.prototype.remove=function(e,a){this._clear(this._model),this._removeOnRenderedListener(a)},t.prototype.dispose=function(e,a){this._removeOnRenderedListener(a)},t.prototype._removeOnRenderedListener=function(e){this._onRendered&&(e.getZr().off("rendered",this._onRendered),this._onRendered=null)},t.prototype._clear=function(e){var a=this.group,n=this._data;e&&e.isAnimationEnabled()&&n&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],n.eachItemGraphicEl(function(i){An(i,e,De(i).dataIndex)})):a.removeAll(),this._data=null,this._isFirstFrame=!0},t.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},t.type="bar",t}(ot),NC={cartesian2d:function(r,t){var e=t.width<0?-1:1,a=t.height<0?-1:1;e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height);var n=r.x+r.width,i=r.y+r.height,o=Eg(t.x,r.x),s=Og(t.x+t.width,n),l=Eg(t.y,r.y),u=Og(t.y+t.height,i),c=sn?s:o,t.y=f&&l>i?u:l,t.width=c?0:s-o,t.height=f?0:u-l,e<0&&(t.x+=t.width,t.width=-t.width),a<0&&(t.y+=t.height,t.height=-t.height),c||f},polar:function(r,t){var e=t.r0<=t.r?1:-1;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}var n=Og(t.r,r.r),i=Eg(t.r0,r.r0);t.r=n,t.r0=i;var o=n-i<0;if(e<0){var a=t.r;t.r=t.r0,t.r0=a}return o}},BC={cartesian2d:function(r,t,e,a,n,i,o,s,l){var u=new Ve({shape:$({},a),z2:1});if(u.__dataIndex=e,u.name="item",i){var c=u.shape,f=n?"height":"width";c[f]=0}return u},polar:function(r,t,e,a,n,i,o,s,l){var u=!n&&l?Rh:Sr,c=new u({shape:a,z2:1});c.name="item";var f=RR(n);if(c.calculateTextPosition=tU(f,{isRoundCap:u===Rh}),i){var v=c.shape,h=n?"r":"endAngle",d={};v[h]=n?a.r0:a.startAngle,d[h]=a[h],(s?Ze:lt)(c,{shape:d},i)}return c}};function iU(r,t){var e=r.get("realtimeSort",!0),a=t.getBaseAxis();if(e&&a.type==="category"&&t.type==="cartesian2d")return{baseAxis:a,otherAxis:t.getOtherAxis(a)}}function VC(r,t,e,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?Ze:lt)(e,{shape:l},t,n,null);var c=t?r.baseAxis.model:null;(o?Ze:lt)(e,{shape:u},c,n)}function zC(r,t){for(var e=0;e0?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,t,e){var a=r.getItemLayout(t);return{cx:a.cx,cy:a.cy,r0:a.r0,r:a.r,startAngle:a.startAngle,endAngle:a.endAngle,clockwise:a.clockwise}}};function lU(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function RR(r){return function(t){var e=t?"Arc":"Angle";return function(a){switch(a){case"start":case"insideStart":case"end":case"insideEnd":return a+e;default:return a}}}(r)}function GC(r,t,e,a,n,i,o,s){var l=t.getItemVisual(e,"style");if(s){if(!i.get("roundCap")){var c=r.shape,f=qa(a.getModel("itemStyle"),c,!0);$(c,f),r.setShape(c)}}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 h=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",d=zt(a);$t(r,d,{labelFetcher:i,labelDataIndex:e,defaultText:_l(i.getData(),e),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var p=r.getTextContent();if(s&&p){var g=a.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,rU(r,g==="outside"?h:g,RR(o),a.get(["label","rotate"]))}BL(p,d,i.getRawValue(e),function(m){return bR(t,m)});var y=a.getModel(["emphasis"]);ut(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Vt(r,a),lU(n)&&(r.style.fill="none",r.style.stroke="none",A(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function uU(r,t){var e=r.get(["itemStyle","borderColor"]);if(!e||e==="none")return 0;var a=r.get(["itemStyle","borderWidth"])||0,n=isNaN(t.width)?Number.MAX_VALUE:Math.abs(t.width),i=isNaN(t.height)?Number.MAX_VALUE:Math.abs(t.height);return Math.min(a,n,i)}var cU=function(){function r(){}return r}(),HC=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a.type="largeBar",a}return t.prototype.getDefaultShape=function(){return new cU},t.prototype.buildPath=function(e,a){for(var n=a.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c=0?e:null},30,!1);function fU(r,t,e){for(var a=r.baseDimIdx,n=1-a,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,f=i.length/3;c=s[0]&&t<=s[0]+l[0]&&e>=s[1]&&e<=s[1]+l[1])return o[c]}return-1}function ER(r,t,e){if(Pi(e,"cartesian2d")){var a=t,n=e.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=e.getArea(),i=t;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 vU(r,t,e){var a=r.type==="polar"?Sr:Ve;return new a({shape:ER(t,e,r),silent:!0,z2:0})}const hU=nU;function dU(r){r.registerChartView(hU),r.registerSeriesModel(J9),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Pe(Ek,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ok("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,PR("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(t,e){var a=t.componentType||"series";e.eachComponent({mainType:a,query:t},function(n){t.sortInfo&&n.axis.setCategorySortInfo(t.sortInfo)})})}var YC=Math.PI*2,Kf=Math.PI/180;function pU(r,t,e){t.eachSeriesByType(r,function(a){var n=a.getData(),i=n.mapDimension("value"),o=nP(a,e),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=o.viewRect,v=-a.get("startAngle")*Kf,h=a.get("endAngle"),d=a.get("padAngle")*Kf;h=h==="auto"?v-YC:-h*Kf;var p=a.get("minAngle")*Kf,g=p+d,y=0;n.each(i,function(O){!isNaN(O)&&y++});var m=n.getSum(i),_=Math.PI/(m||y)*2,S=a.get("clockwise"),w=a.get("roseType"),x=a.get("stillShowZeroSum"),b=n.getDataExtent(i);b[0]=0;var T=S?1:-1,C=[v,h],D=T*d/2;Sd(C,!S),v=C[0],h=C[1];var M=OR(a);M.startAngle=v,M.endAngle=h,M.clockwise=S,M.cx=s,M.cy=l,M.r=u,M.r0=c;var L=Math.abs(h-v),I=L,P=0,R=v;if(n.setLayout({viewRect:f,r:u}),n.each(i,function(O,k){var N;if(isNaN(O)){n.setItemLayout(k,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:c,r:w?NaN:u});return}w!=="area"?N=m===0&&x?_:O*_:N=L/y,NN?(F=R+T*N/2,H=F):(F=R+D,H=B-D),n.setItemLayout(k,{angle:N,startAngle:F,endAngle:H,clockwise:S,cx:s,cy:l,r0:c,r:w?Je(O,b,[c,u]):u}),R=B}),Ie?y:g,w=Math.abs(_.label.y-e);if(w>=S.maxY){var x=_.label.x-t-_.len2*n,b=a+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;a.setStyle("width",h)}BR(i,a)}}}function BR(r,t){ZC.rect=r,oR(ZC,t,mU)}var mU={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},ZC={};function Ng(r){return r.position==="center"}function _U(r){var t=r.getData(),e=[],a,n,i=!1,o=(r.get("minShowLabelAngle")||0)*gU,s=t.getLayout("viewRect"),l=t.getLayout("r"),u=s.width,c=s.x,f=s.y,v=s.height;function h(x){x.ignore=!0}function d(x){if(!x.ignore)return!0;for(var b in x.states)if(x.states[b].ignore===!1)return!0;return!1}t.each(function(x){var b=t.getItemGraphicEl(x),T=b.shape,C=b.getTextContent(),D=b.getTextGuideLine(),M=t.getItemModel(x),L=M.getModel("label"),I=L.get("position")||M.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),R=L.get("alignTo"),E=ne(L.get("edgeDistance"),u),O=L.get("bleedMargin");O==null&&(O=Math.min(u,v)>200?10:2);var k=M.getModel("labelLine"),N=k.get("length");N=ne(N,u);var B=k.get("length2");if(B=ne(B,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":H>0?"left":"right"}var Q=Math.PI,re=0,ge=L.get("rotate");if($e(ge))re=ge*(Q/180);else if(I==="center")re=0;else if(ge==="radial"||ge===!0){var ae=H<0?-F+Q:-F;re=ae}else if(ge==="tangential"&&I!=="outside"&&I!=="outer"){var te=Math.atan2(H,j);te<0&&(te=Q*2+te);var K=j>0;K&&(te=Q+te),re=te-Q}if(i=!!re,C.x=ee,C.y=ce,C.rotation=re,C.setStyle({verticalAlign:"middle"}),he){C.setStyle({align:Be});var Ge=C.states.select;Ge&&(Ge.x+=C.x,Ge.y+=C.y)}else{var Te=new Ce(0,0,0,0);BR(Te,C),e.push({label:C,labelLine:D,position:I,len:N,len2:B,minTurnAngle:k.get("minTurnAngle"),maxSurfaceAngle:k.get("maxSurfaceAngle"),surfaceNormal:new we(H,j),linePoints:Ae,textAlign:Be,labelDistance:P,labelAlignTo:R,edgeDistance:E,bleedMargin:O,rect:Te,unconstrainedWidth:Te.width,labelStyleWidth:C.style.width})}b.setTextConfig({inside:he})}}),!i&&r.get("avoidLabelOverlap")&&yU(e,a,n,l,u,v,c,f);for(var p=0;p0){for(var c=o.getItemLayout(0),f=1;isNaN(c&&c.startAngle)&&f=i.r0}},t.type="pie",t}(ot);const xU=wU;function Gl(r,t,e){t=Z(t)&&{coordDimensions:t}||$({encodeDefine:r.getEncode()},t);var a=r.getSource(),n=Hc(a,t).dimensions,i=new mr(n,r);return i.initData(a,e),i}var bU=function(){function r(t,e){this._getDataWithEncodedVisual=t,this._getRawData=e}return r.prototype.getAllNames=function(){var t=this._getRawData();return t.mapArray(t.getName)},r.prototype.containName=function(t){var e=this._getRawData();return e.indexOfName(t)>=0},r.prototype.indexOfName=function(t){var e=this._getDataWithEncodedVisual();return e.indexOfName(t)},r.prototype.getItemVisual=function(t,e){var a=this._getDataWithEncodedVisual();return a.getItemVisual(t,e)},r}();const Hl=bU;var CU=ze(),VR=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Hl(se(this.getData,this),se(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},t.prototype.getInitialData=function(){return Gl(this,{coordDimensions:["value"],encodeDefaulter:Pe(_1,this)})},t.prototype.getDataParams=function(e){var a=this.getData(),n=CU(a),i=n.seats;if(!i){var o=[];a.each(a.mapDimension("value"),function(l){o.push(l)}),i=n.seats=c3(o,a.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,e);return s.percent=i[e]||0,s.$vars.push("percent"),s},t.prototype._defaultLabelLine=function(e){Uo(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.type="series.pie",t.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"50%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,coordinateSystemUsage:"box",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%",distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:30,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"},t}(ft);lH({fullType:VR.type,getCoord2:function(r){return r.getShallow("center")}});const TU=VR;function DU(r){return{seriesType:r,reset:function(t,e){var a=t.getData();a.filterSelf(function(n){var i=a.mapDimension("value"),o=a.get(i,n);return!($e(o)&&!isNaN(o)&&o<0)})}}}function MU(r){r.registerChartView(xU),r.registerSeriesModel(TU),KP("pie",r.registerAction),r.registerLayout(Pe(pU,"pie")),r.registerProcessor(Fl("pie")),r.registerProcessor(DU("pie"))}var AU=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.getInitialData=function(e,a){return $n(null,this,{useEncodeDefaulter:!0})},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?5e3:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?1e4:this.get("progressiveThreshold"))},t.prototype.brushSelector=function(e,a,n){return n.point(a.getItemLayout(e))},t.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},t.type="series.scatter",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:G.color.primary}},universalTransition:{divideShape:"clone"}},t}(ft);const IU=AU;var zR=4,LU=function(){function r(){}return r}(),PU=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.getDefaultShape=function(){return new LU},t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.buildPath=function(e,a){var n=a.points,i=a.size,o=this.symbolProxy,s=o.shape,l=e.getContext?e.getContext():e,u=l&&i[0]=0;u--){var c=u*2,f=i[c]-s/2,v=i[c+1]-l/2;if(e>=f&&a>=v&&e<=f+s&&a<=v+l)return u}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){for(var a=this.shape,n=a.points,i=a.size,o=i[0],s=i[1],l=1/0,u=1/0,c=-1/0,f=-1/0,v=0;v=0&&(u.dataIndex=f+(t.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const RU=kU;var EU=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.updateData(i,{clipShape:this._getClipShape(e)}),this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateSymbolDraw(i,e);o.incrementalPrepareUpdate(i),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._symbolDraw.incrementalUpdate(e,a.getData(),{clipShape:this._getClipShape(a)}),this._finished=e.end===a.getData().count()},t.prototype.updateTransform=function(e,a,n){var i=e.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Zc("").reset(e,a,n);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},t.prototype.eachRendered=function(e){this._symbolDraw&&this._symbolDraw.eachRendered(e)},t.prototype._getClipShape=function(e){if(e.get("clip",!0)){var a=e.coordinateSystem;return a&&a.getArea&&a.getArea(.1)}},t.prototype._updateSymbolDraw=function(e,a){var n=this._symbolDraw,i=a.pipelineContext,o=i.large;return(!n||o!==this._isLargeDraw)&&(n&&n.remove(),n=this._symbolDraw=o?new RU:new Yc,this._isLargeDraw=o,this.group.removeAll()),this.group.add(n.group),n},t.prototype.remove=function(e,a){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},t.prototype.dispose=function(){},t.type="scatter",t}(ot);const OU=EU;var FR={left:0,right:0,top:0,bottom:0},Eh=["25%","25%"],NU=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.mergeDefaultAndTheme=function(e,a){var n=ls(e.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),n&&e.outerBounds&&nn(e.outerBounds,n)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&e.outerBounds&&nn(this.option.outerBounds,e.outerBounds)},t.type="grid",t.dependencies=["xAxis","yAxis"],t.layoutMode="box",t.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:FR,outerBoundsContain:"all",outerBoundsClampWidth:Eh[0],outerBoundsClampHeight:Eh[1],backgroundColor:G.color.transparent,borderWidth:1,borderColor:G.color.neutral30},t}(We);const BU=NU;var _0=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",gt).models[0]},t.type="cartesian2dAxis",t}(We);Rt(_0,$c);var GR={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:G.color.axisLine,width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15],breakLine:!0},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,color:G.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:G.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[G.color.backgroundTint,G.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:G.color.neutral00,borderColor:G.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},VU=Re({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},GR),X1=Re({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:G.color.axisMinorSplitLine,width:1}}},GR),zU=Re({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},X1),FU=xe({logBase:10},X1);const HR={category:VU,value:X1,time:zU,log:FU};var GU={value:1,category:1,time:1,log:1},S0=null;function HU(r){S0||(S0=r)}function Xc(){return S0}function Sl(r,t,e,a){A(GU,function(n,i){var o=Re(Re({},HR[i],!0),a,!0),s=function(l){V(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=t+"Axis."+i,c}return u.prototype.mergeDefaultAndTheme=function(c,f){var v=vc(this),h=v?ls(c):{},d=f.getTheme();Re(c,d.get(i+"Axis")),Re(c,this.getDefaultOption()),c.type=XC(c),v&&nn(c,h,v)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=mc.createByAxisModel(this))},u.prototype.getCategories=function(c){var f=this.option;if(f.type==="category")return c?f.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(c){var f=Xc();return f?f.updateModelAxisBreak(this,c):{breaks:[]}},u.type=t+"Axis."+i,u.defaultOption=o,u}(e);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(t+"Axis",XC)}function XC(r){return r.type||(r.data?"category":"value")}var $U=function(){function r(t){this.type="cartesian",this._dimList=[],this._axes={},this.name=t||""}return r.prototype.getAxis=function(t){return this._axes[t]},r.prototype.getAxes=function(){return X(this._dimList,function(t){return this._axes[t]},this)},r.prototype.getAxesByScale=function(t){return t=t.toLowerCase(),Qe(this.getAxes(),function(e){return e.scale.type===t})},r.prototype.addAxis=function(t){var e=t.dim;this._axes[e]=t,this._dimList.push(e)},r}();const WU=$U;var w0=["x","y"];function qC(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var YU=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="cartesian2d",e.dimensions=w0,e}return t.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var e=this.getAxis("x").scale,a=this.getAxis("y").scale;if(!(!qC(e)||!qC(a))){var n=e.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 c=(s[0]-o[0])/l,f=(s[1]-o[1])/u,v=o[0]-n[0]*c,h=o[1]-i[0]*f,d=this._transform=[c,0,0,f,v,h];this._invTransform=xa([],d)}}},t.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},t.prototype.containPoint=function(e){var a=this.getAxis("x"),n=this.getAxis("y");return a.contain(a.toLocalCoord(e[0]))&&n.contain(n.toLocalCoord(e[1]))},t.prototype.containData=function(e){return this.getAxis("x").containData(e[0])&&this.getAxis("y").containData(e[1])},t.prototype.containZone=function(e,a){var n=this.dataToPoint(e),i=this.dataToPoint(a),o=this.getArea(),s=new Ce(n[0],n[1],i[0]-n[0],i[1]-n[1]);return o.intersect(s)},t.prototype.dataToPoint=function(e,a,n){n=n||[];var i=e[0],o=e[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Tt(n,e,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},t.prototype.clampData=function(e,a){var n=this.getAxis("x").scale,i=this.getAxis("y").scale,o=n.getExtent(),s=i.getExtent(),l=n.parse(e[0]),u=i.parse(e[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},t.prototype.pointToData=function(e,a,n){if(n=n||[],this._invTransform)return Tt(n,e,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return n[0]=i.coordToData(i.toLocalCoord(e[0]),a),n[1]=o.coordToData(o.toLocalCoord(e[1]),a),n},t.prototype.getOtherAxis=function(e){return this.getAxis(e.dim==="x"?"y":"x")},t.prototype.getArea=function(e){e=e||0;var a=this.getAxis("x").getGlobalExtent(),n=this.getAxis("y").getGlobalExtent(),i=Math.min(a[0],a[1])-e,o=Math.min(n[0],n[1])-e,s=Math.max(a[0],a[1])-i+e,l=Math.max(n[0],n[1])-o+e;return new Ce(i,o,s,l)},t}(WU),UU=function(r){V(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return t.prototype.isHorizontal=function(){var e=this.position;return e==="top"||e==="bottom"},t.prototype.getGlobalExtent=function(e){var a=this.getExtent();return a[0]=this.toGlobalCoord(a[0]),a[1]=this.toGlobalCoord(a[1]),e&&a[0]>a[1]&&a.reverse(),a},t.prototype.pointToData=function(e,a){return this.coordToData(this.toLocalCoord(e[this.dim==="x"?0:1]),a)},t.prototype.setCategorySortInfo=function(e){if(this.type!=="category")return!1;this.model.option.categorySortInfo=e,this.scale.setSortInfo(e)},t}(Aa);const $R=UU;var Fd="expandAxisBreak",WR="collapseAxisBreak",YR="toggleAxisBreak",q1="axisbreakchanged",ZU={type:Fd,event:q1,update:"update",refineEvent:j1},XU={type:WR,event:q1,update:"update",refineEvent:j1},qU={type:YR,event:q1,update:"update",refineEvent:j1};function j1(r,t,e,a){var n=[];return A(r,function(i){n=n.concat(i.eventBreaks)}),{eventContent:{breaks:n}}}function jU(r){r.registerAction(ZU,t),r.registerAction(XU,t),r.registerAction(qU,t);function t(e,a){var n=[],i=sl(a,e);function o(s,l){A(i[s],function(u){var c=u.updateAxisBreaks(e);A(c.breaks,function(f){var v;n.push(xe((v={},v[l]=u.componentIndex,v),f))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:n}}}var yi=Math.PI,KU=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],JU=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],wl=ze(),UR=ze(),ZR=function(){function r(t){this.recordMap={},this.resolveAxisNameOverlap=t}return r.prototype.ensureRecord=function(t){var e=t.axis.dim,a=t.componentIndex,n=this.recordMap,i=n[e]||(n[e]=[]);return i[a]||(i[a]={ready:{}})},r}();function QU(r,t,e,a){var n=e.axis,i=t.ensureRecord(e),o=[],s,l=K1(r.axisName)&&ml(r.nameLocation);A(a,function(d){var p=on(d);if(!(!p||p.label.ignore)){o.push(p);var g=i.transGroup;l&&(g.transform?xa(cu,g.transform):vd(cu),p.transform&&ja(cu,cu,p.transform),Ce.copy(Jf,p.localRect),Jf.applyTransform(cu),s?s.union(Jf):Ce.copy(s=new Ce(0,0,0,0),Jf))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",c=i.transGroup[u];if(o.sort(function(d,p){return Math.abs(d.label[u]-c)-Math.abs(p.label[u]-c)}),l&&s){var f=n.getExtent(),v=Math.min(f[0],f[1]),h=Math.max(f[0],f[1])-v;s.union(new Ce(v,0,h,1))}i.stOccupiedRect=s,i.labelInfoList=o}var cu=Xt(),Jf=new Ce(0,0,0,0),XR=function(r,t,e,a,n,i){if(ml(r.nameLocation)){var o=i.stOccupiedRect;o&&qR(LY({},o,i.transGroup.transform),a,n)}else jR(i.labelInfoList,i.dirVec,a,n)};function qR(r,t,e){var a=new we;Vd(r,t,a,{direction:Math.atan2(e.y,e.x),bidirectional:!1,touchThreshold:.05})&&v0(t,a)}function jR(r,t,e,a){for(var n=we.dot(a,t)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):ic(n-yi)?(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(t){var e={componentType:t.mainType,componentIndex:t.componentIndex};return e[t.mainType+"Index"]=t.componentIndex,e},r.isLabelSilent=function(t){var e=t.get("tooltip");return t.get("silent")||!(t.get("triggerEvent")||e&&e.show)},r}(),e6=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],t6={axisLine:function(r,t,e,a,n,i,o){var s=a.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=a.axis.getExtent(),u=i.transform,c=[l[0],0],f=[l[1],0],v=c[0]>f[0];u&&(Tt(c,c,u),Tt(f,f,u));var h=$({lineCap:"round"},a.getModel(["axisLine","lineStyle"]).getLineStyle()),d={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:h};if(a.get(["axisLine","breakLine"])&&a.axis.scale.hasBreaks())Xc().buildAxisBreakLine(a,n,i,d);else{var p=new Bt($({shape:{x1:c[0],y1:c[1],x2:f[0],y2:f[1]}},d));dl(p.shape,p.style.lineWidth),p.anid="line",n.add(p)}var g=a.get(["axisLine","symbol"]);if(g!=null){var y=a.get(["axisLine","symbolSize"]);oe(g)&&(g=[g,g]),(oe(y)||$e(y))&&(y=[y,y]);var m=cs(a.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=y[1];A([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((c[0]-f[0])*(c[0]-f[0])+(c[1]-f[1])*(c[1]-f[1]))}],function(w,x){if(g[x]!=="none"&&g[x]!=null){var b=kt(g[x],-_/2,-S/2,_,S,h.stroke,!0),T=w.r+w.offset,C=v?f:c;b.attr({rotation:w.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),n.add(b)}})}}},axisTickLabelEstimate:function(r,t,e,a,n,i,o,s){var l=KC(t,n,s);l&&jC(r,t,e,a,n,i,o,Ca.estimate)},axisTickLabelDetermine:function(r,t,e,a,n,i,o,s){var l=KC(t,n,s);l&&jC(r,t,e,a,n,i,o,Ca.determine);var u=i6(r,n,i,a);n6(r,t.labelLayoutList,u),o6(r,n,i,a,r.tickDirection)},axisName:function(r,t,e,a,n,i,o,s){var l=e.ensureRecord(a);t.nameEl&&(n.remove(t.nameEl),t.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(K1(u)){var c=r.nameLocation,f=r.nameDirection,v=a.getModel("nameTextStyle"),h=a.get("nameGap")||0,d=a.axis.getExtent(),p=a.axis.inverse?-1:1,g=new we(0,0),y=new we(0,0);c==="start"?(g.x=d[0]-p*h,y.x=-p):c==="end"?(g.x=d[1]+p*h,y.x=p):(g.x=(d[0]+d[1])/2,g.y=r.labelOffset+f*h,y.y=f);var m=Xt();y.transform(Ni(m,m,r.rotation));var _=a.get("nameRotate");_!=null&&(_=_*yi/180);var S,w;ml(c)?S=Wo.innerTextLayout(r.rotation,_??r.rotation,f):(S=r6(r.rotation,c,_||0,d),w=r.raw.axisNameAvailableWidth,w!=null&&(w=Math.abs(w/Math.sin(S.rotation)),!isFinite(w)&&(w=null)));var x=v.getFont(),b=a.get("nameTruncate",!0)||{},T=b.ellipsis,C=er(r.raw.nameTruncateMaxWidth,b.maxWidth,w),D=s.nameMarginLevel||0,M=new Ue({x:g.x,y:g.y,rotation:S.rotation,silent:Wo.isLabelSilent(a),style:it(v,{text:u,font:x,overflow:"truncate",width:C,ellipsis:T,fill:v.getTextColor()||a.get(["axisLine","lineStyle","color"]),align:v.get("align")||S.textAlign,verticalAlign:v.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(Hn({el:M,componentModel:a,itemName:u}),M.__fullText=u,M.anid="name",a.get("triggerEvent")){var L=Wo.makeAxisEventDataBase(a);L.targetType="axisName",L.name=u,De(M).eventData=L}i.add(M),M.updateTransform(),t.nameEl=M;var I=l.nameLayout=on({label:M,priority:M.z2,defaultAttr:{ignore:M.ignore},marginDefault:ml(c)?KU[D]:JU[D]});if(l.nameLocation=c,n.add(M),M.decomposeTransform(),r.shouldNameMoveOverlap&&I){var P=e.ensureRecord(a);e.resolveAxisNameOverlap(r,e,a,I,y,P)}}}};function jC(r,t,e,a,n,i,o,s){JR(t)||s6(r,t,n,s,a,o);var l=t.labelLayoutList;l6(r,a,l,i),f6(a,r.rotation,l);var u=r.optionHideOverlap;a6(a,l,u),u&&sR(Qe(l,function(c){return c&&!c.label.ignore})),QU(r,e,a,l)}function r6(r,t,e,a){var n=MI(e-r),i,o,s=a[0]>a[1],l=t==="start"&&!s||t!=="start"&&s;return ic(n-yi/2)?(o=l?"bottom":"top",i="center"):ic(n-yi*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",nyi/2?i=l?"left":"right":i=l?"right":"left"),{rotation:n,textAlign:i,textVerticalAlign:o}}function a6(r,t,e){if(Wk(r.axis))return;function a(s,l,u){var c=on(t[l]),f=on(t[u]);if(!(!c||!f)){if(s===!1||c.suggestIgnore){Eu(c.label);return}if(f.suggestIgnore){Eu(f.label);return}var v=.1;if(!e){var h=[0,0,0,0];c=h0({marginForce:h},c),f=h0({marginForce:h},f)}Vd(c,f,null,{touchThreshold:v})&&Eu(s?f.label:c.label)}}var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=t.length;a(n,0,1),a(i,o-1,o-2)}function n6(r,t,e){r.showMinorTicks||A(t,function(a){if(a&&a.label.ignore)for(var n=0;nu[0]&&isFinite(d)&&isFinite(u[0]);)h=wg(h),d=u[1]-h*o;else{var g=r.getTicks().length-1;g>o&&(h=wg(h));var y=h*o;p=Math.ceil(u[1]/h)*h,d=At(p-y),d<0&&u[0]>=0?(d=0,p=At(y)):p>0&&u[1]<=0&&(p=0,d=-At(y))}var m=(n[0].value-i[0].value)/s,_=(n[o].value-i[o].value)/s;a.setExtent.call(r,d+h*m,p+h*_),a.setInterval.call(r,h),(m||_)&&a.setNiceExtent.call(r,d+h,p-h)}var QC=[[3,1],[0,2]],p6=function(){function r(t,e,a){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=w0,this._initCartesian(t,e,a),this.model=t}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(t,e){var a=this._axesMap;this._updateScale(t,this.model);function n(o){var s,l=He(o),u=l.length;if(u){for(var c=[],f=u-1;f>=0;f--){var v=+l[f],h=o[v],d=h.model,p=h.scale;s0(p)&&d.get("alignTicks")&&d.get("interval")==null?c.push(h):(yl(p,d),s0(p)&&(s=h))}c.length&&(s||(s=c.pop(),yl(s.scale,s.model)),A(c,function(g){QR(g.scale,g.model,s.scale)}))}}n(a.x),n(a.y);var i={};A(a.x,function(o){eT(a,"y",o,i)}),A(a.y,function(o){eT(a,"x",o,i)}),this.resize(this.model,e)},r.prototype.resize=function(t,e,a){var n=Ft(t,e),i=this._rect=ct(t.getBoxLayoutParams(),n.refContainer),o=this._axesMap,s=this._coordsList,l=t.get("containLabel");if(b0(o,i),!a){var u=m6(i,s,o,l,e),c=void 0;if(l)C0?(C0(this._axesList,i),b0(o,i)):c=aT(i.clone(),"axisLabel",null,i,o,u,n);else{var f=_6(t,i,n),v=f.outerBoundsRect,h=f.parsedOuterBoundsContain,d=f.outerBoundsClamp;v&&(c=aT(v,h,d,i,o,u,n))}eE(i,o,Ca.determine,null,c,n)}A(this._coordsList,function(p){p.calcAffineTransform()})},r.prototype.getAxis=function(t,e){var a=this._axesMap[t];if(a!=null)return a[e||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(t,e){if(t!=null&&e!=null){var a="x"+t+"y"+e;return this._coordsMap[a]}be(t)&&(e=t.yAxisIndex,t=t.xAxisIndex);for(var n=0,i=this._coordsList;n0})==null;return jo(a,s,!0,!0,e),b0(n,a),l;function u(v){A(n[Me[v]],function(h){if(Sc(h.model)){var d=i.ensureRecord(h.model),p=d.labelInfoList;if(p)for(var g=0;g0&&!lr(h)&&h>1e-4&&(v/=h),v}}function m6(r,t,e,a,n){var i=new ZR(S6);return A(e,function(o){return A(o,function(s){if(Sc(s.model)){var l=!a;s.axisBuilder=h6(r,t,s.model,n,i,l)}})}),i}function eE(r,t,e,a,n,i){var o=e===Ca.determine;A(t,function(u){return A(u,function(c){Sc(c.model)&&(d6(c.axisBuilder,r,c.model),c.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:n}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[Me[1-u]]=r[Lt[u]]<=i.refContainer[Lt[u]]*.5?0:1-u===1?2:1}A(t,function(u,c){return A(u,function(f){Sc(f.model)&&((a==="all"||o)&&f.axisBuilder.build({axisName:!0},{nameMarginLevel:s[c]}),o&&f.axisBuilder.build({axisLine:!0}))})})}function _6(r,t,e){var a,n=r.get("outerBoundsMode",!0);n==="same"?a=t.clone():(n==null||n==="auto")&&(a=ct(r.get("outerBounds",!0)||FR,e.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||ke(["all","axisLabel"],i)<0?o="all":o=i;var s=[sh(de(r.get("outerBoundsClampWidth",!0),Eh[0]),t.width),sh(de(r.get("outerBoundsClampHeight",!0),Eh[1]),t.height)];return{outerBoundsRect:a,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var S6=function(r,t,e,a,n,i){var o=e.axis.dim==="x"?"y":"x";XR(r,t,e,a,n,i),ml(r.nameLocation)||A(t.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&jR(s.labelInfoList,s.dirVec,a,n)})};const w6=p6;function x6(r,t){var e={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return b6(e,r,t),e.seriesInvolved&&T6(e,r),e}function b6(r,t,e){var a=t.getComponent("tooltip"),n=t.getComponent("axisPointer"),i=n.get("link",!0)||[],o=[];A(e.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=bc(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,f=c.getModel("tooltip",a);if(A(s.getAxes(),Pe(p,!1,null)),s.getTooltipAxes&&a&&f.get("show")){var v=f.get("trigger")==="axis",h=f.get(["axisPointer","type"])==="cross",d=s.getTooltipAxes(f.get(["axisPointer","axis"]));(v||h)&&A(d.baseAxes,Pe(p,h?"cross":!0,v)),h&&A(d.otherAxes,Pe(p,"cross",!1))}function p(g,y,m){var _=m.model.getModel("axisPointer",n),S=_.get("show");if(!(!S||S==="auto"&&!g&&!T0(_))){y==null&&(y=_.get("triggerTooltip")),_=g?C6(m,f,n,t,g,y):_;var w=_.get("snap"),x=_.get("triggerEmphasis"),b=bc(m.model),T=y||w||m.type==="category",C=r.axesInfo[b]={key:b,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:x,involveSeries:T,snap:w,useHandle:T0(_),seriesModels:[],linkGroup:null};u[b]=C,r.seriesInvolved=r.seriesInvolved||T;var D=D6(i,m);if(D!=null){var M=o[D]||(o[D]={axesInfo:{}});M.axesInfo[b]=C,M.mapper=i[D].mapper,C.linkGroup=M}}}})}function C6(r,t,e,a,n,i){var o=t.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};A(s,function(v){l[v]=me(o.get(v))}),l.snap=r.type!=="category"&&!!i,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),n==="cross"){var c=o.get(["label","show"]);if(u.show=c??!0,!i){var f=l.lineStyle=o.get("crossStyle");f&&xe(u,f.textStyle)}}return r.model.getModel("axisPointer",new Xe(l,e,a))}function T6(r,t){t.eachSeries(function(e){var a=e.coordinateSystem,n=e.get(["tooltip","trigger"],!0),i=e.get(["tooltip","show"],!0);!a||!a.model||n==="none"||n===!1||n==="item"||i===!1||e.get(["axisPointer","show"],!0)===!1||A(r.coordSysAxesInfo[bc(a.model)],function(o){var s=o.axis;a.getAxis(s.dim)===s&&(o.seriesModels.push(e),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=e.getData().count())})})}function D6(r,t){for(var e=t.model,a=t.dim,n=0;n=0||r===t}function M6(r){var t=J1(r);if(t){var e=t.axisPointerModel,a=t.axis.scale,n=e.option,i=e.get("status"),o=e.get("value");o!=null&&(o=a.parse(o));var s=T0(e);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;return o&&s}var O6=ze();function oT(r,t,e,a){if(r instanceof $R){var n=r.scale.type;if(n!=="category"&&n!=="ordinal")return e}var i=r.model,o=i.get("jitter"),s=i.get("jitterOverlap"),l=i.get("jitterMargin")||0,u=r.scale.type==="ordinal"?r.getBandWidth():null;return o>0?s?oE(e,o,u,a):N6(r,t,e,a,o,l):e}function oE(r,t,e,a){if(e===null)return r+(Math.random()-.5)*t;var n=e-a*2,i=Math.min(Math.max(0,t),n);return r+(Math.random()-.5)*i}function N6(r,t,e,a,n,i){var o=O6(r);o.items||(o.items=[]);var s=o.items,l=sT(s,t,e,a,n,i,1),u=sT(s,t,e,a,n,i,-1),c=Math.abs(l-e)n/2||f&&v>f/2-a?oE(e,n,f,a):(s.push({fixedCoord:t,floatCoord:c,r:a}),c)}function sT(r,t,e,a,n,i,o){for(var s=e,l=0;ln/2)return Number.MAX_VALUE;if(o===1&&d>s||o===-1&&d0&&!d.min?d.min=0:d.min!=null&&d.min<0&&!d.max&&(d.max=0);var p=l;d.color!=null&&(p=xe({color:d.color},l));var g=Re(me(d),{boundaryGap:e,splitNumber:a,scale:n,axisLine:i,axisTick:o,axisLabel:s,name:d.text,showName:u,nameLocation:"end",nameGap:f,nameTextStyle:p,triggerEvent:v},!1);if(oe(c)){var y=g.name;g.name=c.replace("{value}",y??"")}else ye(c)&&(g.name=c(g.name,g));var m=new Xe(g,null,this.ecModel);return Rt(m,$c.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=h},t.prototype.getIndicatorModels=function(){return this._indicatorModels},t.type="radar",t.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:G.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:Re({lineStyle:{color:G.color.neutral20}},fu.axisLine),axisLabel:Qf(fu.axisLabel,!1),axisTick:Qf(fu.axisTick,!1),splitLine:Qf(fu.splitLine,!0),splitArea:Qf(fu.splitArea,!0),indicator:[]},t}(We);const Z6=U6;var X6=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll(),this._buildAxes(e,n),this._buildSplitLineAndArea(e)},t.prototype._buildAxes=function(e,a){var n=e.coordinateSystem,i=n.getIndicatorAxes(),o=X(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Vn(s.model,a,{axisName:l,position:[n.cx,n.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});A(o,function(s){s.build(),this.group.add(s.group)},this)},t.prototype._buildSplitLineAndArea=function(e){var a=e.coordinateSystem,n=a.getIndicatorAxes();if(!n.length)return;var i=e.get("shape"),o=e.getModel("splitLine"),s=e.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),f=s.get("show"),v=l.get("color"),h=u.get("color"),d=Z(v)?v:[v],p=Z(h)?h:[h],g=[],y=[];function m(R,E,O){var k=O%E.length;return R[k]=R[k]||[],k}if(i==="circle")for(var _=n[0].getTicksCoords(),S=a.cx,w=a.cy,x=0;x<_.length;x++){if(c){var b=m(g,d,x);g[b].push(new Bi({shape:{cx:S,cy:w,r:_[x].coord}}))}if(f&&x<_.length-1){var b=m(y,p,x);y[b].push(new Cd({shape:{cx:S,cy:w,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=X(n,function(R,E){var O=R.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),X(O,function(k){return a.coordToPoint(k.coord,E)})}),D=[],x=0;x<=T;x++){for(var M=[],L=0;L3?1.4:o>1?1.2:1.1,c=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",e,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(n){var f=Math.abs(i),v=(i>0?1:-1)*(f>3?.4:f>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",e,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}}},t.prototype._pinchHandler=function(e){if(!(cT(this._zr,"globalPan")||vu(e))){var a=e.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,e,{scale:a,originX:e.pinchX,originY:e.pinchY,isAvailableBehavior:null})}},t.prototype._checkTriggerMoveZoom=function(e,a,n,i,o){e._checkPointer(i,o.originX,o.originY)&&(Rn(i.event),i.__ecRoamConsumed=!0,fT(e,a,n,i,o))},t}(ca);function vu(r){return r.__ecRoamConsumed}var o8=ze();function Gd(r){var t=o8(r);return t.roam=t.roam||{},t.uniform=t.uniform||{},t}function hu(r,t,e,a){for(var n=Gd(r),i=n.roam,o=i[t]=i[t]||[],s=0;s=4&&(c={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(c&&s!=null&&l!=null&&(f=vE(c,{x:0,y:0,width:s,height:l}),!e.ignoreViewBox)){var h=n;n=new _e,n.add(h),h.scaleX=h.scaleY=f.scale,h.x=f.x,h.y=f.y}return!e.ignoreRootClip&&s!=null&&l!=null&&n.setClipPath(new Ve({shape:{x:0,y:0,width:s,height:l}})),{root:n,width:s,height:l,viewBoxRect:c,viewBoxTransform:f,named:i}},r.prototype._parseNode=function(t,e,a,n,i,o){var s=t.nodeName.toLowerCase(),l,u=n;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=e;else{if(!i){var c=zg[s];if(c&&ue(zg,s)){l=c.call(this,t,e);var f=t.getAttribute("name");if(f){var v={name:f,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});e.add(l)}}var h=pT[s];if(h&&ue(pT,s)){var d=h.call(this,t),p=t.getAttribute("id");p&&(this._defs[p]=d)}}if(l&&l.isGroup)for(var g=t.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(t,e){var a=new sc({style:{text:t.textContent},silent:!0,x:this._textX||0,y:this._textY||0});Yr(e,a),kr(t,a,this._defsUsePending,!1,!1),c8(a,e);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,e.add(a),a},r.internalField=function(){zg={g:function(t,e){var a=new _e;return Yr(e,a),kr(t,a,this._defsUsePending,!1,!1),a},rect:function(t,e){var a=new Ve;return Yr(e,a),kr(t,a,this._defsUsePending,!1,!1),a.setShape({x:parseFloat(t.getAttribute("x")||"0"),y:parseFloat(t.getAttribute("y")||"0"),width:parseFloat(t.getAttribute("width")||"0"),height:parseFloat(t.getAttribute("height")||"0")}),a.silent=!0,a},circle:function(t,e){var a=new Bi;return Yr(e,a),kr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),r:parseFloat(t.getAttribute("r")||"0")}),a.silent=!0,a},line:function(t,e){var a=new Bt;return Yr(e,a),kr(t,a,this._defsUsePending,!1,!1),a.setShape({x1:parseFloat(t.getAttribute("x1")||"0"),y1:parseFloat(t.getAttribute("y1")||"0"),x2:parseFloat(t.getAttribute("x2")||"0"),y2:parseFloat(t.getAttribute("y2")||"0")}),a.silent=!0,a},ellipse:function(t,e){var a=new r1;return Yr(e,a),kr(t,a,this._defsUsePending,!1,!1),a.setShape({cx:parseFloat(t.getAttribute("cx")||"0"),cy:parseFloat(t.getAttribute("cy")||"0"),rx:parseFloat(t.getAttribute("rx")||"0"),ry:parseFloat(t.getAttribute("ry")||"0")}),a.silent=!0,a},polygon:function(t,e){var a=t.getAttribute("points"),n;a&&(n=mT(a));var i=new wr({shape:{points:n||[]},silent:!0});return Yr(e,i),kr(t,i,this._defsUsePending,!1,!1),i},polyline:function(t,e){var a=t.getAttribute("points"),n;a&&(n=mT(a));var i=new fr({shape:{points:n||[]},silent:!0});return Yr(e,i),kr(t,i,this._defsUsePending,!1,!1),i},image:function(t,e){var a=new rr;return Yr(e,a),kr(t,a,this._defsUsePending,!1,!1),a.setStyle({image:t.getAttribute("xlink:href")||t.getAttribute("href"),x:+t.getAttribute("x"),y:+t.getAttribute("y"),width:+t.getAttribute("width"),height:+t.getAttribute("height")}),a.silent=!0,a},text:function(t,e){var a=t.getAttribute("x")||"0",n=t.getAttribute("y")||"0",i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0";this._textX=parseFloat(a)+parseFloat(i),this._textY=parseFloat(n)+parseFloat(o);var s=new _e;return Yr(e,s),kr(t,s,this._defsUsePending,!1,!0),s},tspan:function(t,e){var a=t.getAttribute("x"),n=t.getAttribute("y");a!=null&&(this._textX=parseFloat(a)),n!=null&&(this._textY=parseFloat(n));var i=t.getAttribute("dx")||"0",o=t.getAttribute("dy")||"0",s=new _e;return Yr(e,s),kr(t,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(t,e){var a=t.getAttribute("d")||"",n=hL(a);return Yr(e,n),kr(t,n,this._defsUsePending,!1,!1),n.silent=!0,n}}}(),r}(),pT={lineargradient:function(r){var t=parseInt(r.getAttribute("x1")||"0",10),e=parseInt(r.getAttribute("y1")||"0",10),a=parseInt(r.getAttribute("x2")||"10",10),n=parseInt(r.getAttribute("y2")||"0",10),i=new Pl(t,e,a,n);return gT(r,i),yT(r,i),i},radialgradient:function(r){var t=parseInt(r.getAttribute("cx")||"0",10),e=parseInt(r.getAttribute("cy")||"0",10),a=parseInt(r.getAttribute("r")||"0",10),n=new DL(t,e,a);return gT(r,n),yT(r,n),n}};function gT(r,t){var e=r.getAttribute("gradientUnits");e==="userSpaceOnUse"&&(t.global=!0)}function yT(r,t){for(var e=r.firstChild;e;){if(e.nodeType===1&&e.nodeName.toLocaleLowerCase()==="stop"){var a=e.getAttribute("offset"),n=void 0;a&&a.indexOf("%")>0?n=parseInt(a,10)/100:a?n=parseFloat(a):n=0;var i={};fE(e,i,i);var o=i.stopColor||e.getAttribute("stop-color")||"#000000",s=i.stopOpacity||e.getAttribute("stop-opacity");if(s){var l=Lr(o),u=l&&l[3];u&&(l[3]*=wi(s),o=Ka(l,"rgba"))}t.colorStops.push({offset:n,color:o})}e=e.nextSibling}}function Yr(r,t){r&&r.__inheritedStyle&&(t.__inheritedStyle||(t.__inheritedStyle={}),xe(t.__inheritedStyle,r.__inheritedStyle))}function mT(r){for(var t=$d(r),e=[],a=0;a0;i-=2){var o=a[i],s=a[i-1],l=$d(o);switch(n=n||Xt(),s){case"translate":tn(n,n,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":B_(n,n,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":Ni(n,n,-parseFloat(l[0])*Fg,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Fg);ja(n,[1,0,u,1,0,0],n);break;case"skewY":var c=Math.tan(parseFloat(l[0])*Fg);ja(n,[1,c,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}}t.setLocalTransform(n)}}var ST=/([^\s:;]+)\s*:\s*([^:;]+)/g;function fE(r,t,e){var a=r.getAttribute("style");if(a){ST.lastIndex=0;for(var n;(n=ST.exec(a))!=null;){var i=n[1],o=ue(Nh,i)?Nh[i]:null;o&&(t[o]=n[2]);var s=ue(Bh,i)?Bh[i]:null;s&&(e[s]=n[2])}}}function g8(r,t,e){for(var a=0;a0,m={api:a,geo:l,mapOrGeoModel:t,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(t,g,e,a),this._updateMapSelectHandler(t,u,a,n)},r.prototype._buildGeoJSON=function(t){var e=this._regionsGroupByName=ve(),a=ve(),n=this._regionsGroup,i=t.transformInfoRaw,o=t.mapOrGeoModel,s=t.data,l=t.geo.projection,u=l&&l.stream;function c(h,d){return d&&(h=d(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function f(h){for(var d=[],p=!u&&l&&l.project,g=0;g=0)&&(v=n);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;$t(t,zt(a),{labelFetcher:v,labelDataIndex:f,defaultText:e},h);var d=t.getTextContent();if(d&&(hE(d).ignore=d.ignore,t.textConfig&&o)){var p=t.getBoundingRect().clone();t.textConfig.layoutRect=p,t.textConfig.position=[(o[0]-p.x)/p.width*100+"%",(o[1]-p.y)/p.height*100+"%"]}t.disableLabelAnimation=!0}else t.removeTextContent(),t.removeTextConfig(),t.disableLabelAnimation=null}function TT(r,t,e,a,n,i){r.data?r.data.setItemGraphicEl(i,t):De(t).eventData={componentType:"geo",componentIndex:n.componentIndex,geoIndex:n.componentIndex,name:e,region:a&&a.option||{}}}function DT(r,t,e,a,n){r.data||Hn({el:t,componentModel:n,itemName:e,itemTooltipOption:a.get("tooltip")})}function MT(r,t,e,a,n){t.highDownSilentOnTouch=!!n.get("selectedMode");var i=a.getModel("emphasis"),o=i.get("focus");return ut(t,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&WF(t,n,e),o}function AT(r,t,e){var a=[],n;function i(){n=[]}function o(){n.length&&(a.push(n),n=[])}var s=t({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&n.push([l,u])},sphere:function(){}});return!e&&s.polygonStart(),A(r,function(l){s.lineStart();for(var u=0;u-1&&(n.style.stroke=n.style.fill,n.style.fill=G.color.neutral00,n.style.lineWidth=2),n},t.type="series.map",t.dependencies=["geo"],t.layoutMode="box",t.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:G.color.tertiary},itemStyle:{borderWidth:.5,borderColor:G.color.border,areaColor:G.color.background},emphasis:{label:{show:!0,color:G.color.primary},itemStyle:{areaColor:G.color.highlight}},select:{label:{show:!0,color:G.color.primary},itemStyle:{color:G.color.highlight}},nameProperty:"name"},t}(ft);const V8=B8;function z8(r,t){var e={};return A(r,function(a){a.each(a.mapDimension("value"),function(n,i){var o="ec-"+a.getName(i);e[o]=e[o]||[],isNaN(n)||e[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=e[i].length,c=0;c1?(_.width=m,_.height=m/p):(_.height=m,_.width=m*p),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=r.getBoxLayoutParams();S.aspect=p,_=ct(S,d),_=iP(r,_,p)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function W8(r,t){A(t.get("geoCoord"),function(e,a){r.addGeoCoord(a,e)})}var Y8=function(){function r(){this.dimensions=pE}return r.prototype.create=function(t,e){var a=[];function n(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}t.eachComponent("geo",function(o,s){var l=o.get("map"),u=new kT(l+s,l,$({nameMap:o.get("nameMap"),api:e,ecModel:t},n(o)));u.zoomLimit=o.get("scaleLimit"),a.push(u),o.coordinateSystem=u,u.model=o,u.resize=RT,u.resize(o,e)}),t.eachSeries(function(o){zc({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",gt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return t.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),A(i,function(o,s){var l=X(o,function(c){return c.get("nameMap")}),u=new kT(s,s,$({nameMap:R_(l),api:e,ecModel:t},n(o[0])));u.zoomLimit=er.apply(null,X(o,function(c){return c.get("scaleLimit")})),a.push(u),u.resize=RT,u.resize(o[0],e),A(o,function(c){c.coordinateSystem=u,W8(u,c)})}),a},r.prototype.getFilledRegions=function(t,e,a,n){for(var i=(t||[]).slice(),o=ve(),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},e.push(s)}}function e7(r,t){var e=r.isExpand?r.children:[],a=r.parentNode.children,n=r.hierNode.i?a[r.hierNode.i-1]:null;if(e.length){r7(r);var i=(e[0].hierNode.prelim+e[e.length-1].hierNode.prelim)/2;n?(r.hierNode.prelim=n.hierNode.prelim+t(r,n),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else n&&(r.hierNode.prelim=n.hierNode.prelim+t(r,n));r.parentNode.hierNode.defaultAncestor=a7(r,n,r.parentNode.hierNode.defaultAncestor||a[0],t)}function t7(r){var t=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:t},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function ET(r){return arguments.length?r:o7}function Ou(r,t){return r-=Math.PI/2,{x:t*Math.cos(r),y:t*Math.sin(r)}}function r7(r){for(var t=r.children,e=t.length,a=0,n=0;--e>=0;){var i=t[e];i.hierNode.prelim+=a,i.hierNode.modifier+=a,n+=i.hierNode.change,a+=i.hierNode.shift+n}}function a7(r,t,e,a){if(t){for(var n=r,i=r,o=i.parentNode.children[0],s=t,l=n.hierNode.modifier,u=i.hierNode.modifier,c=o.hierNode.modifier,f=s.hierNode.modifier;s=Gg(s),i=Hg(i),s&&i;){n=Gg(n),o=Hg(o),n.hierNode.ancestor=r;var v=s.hierNode.prelim+f-i.hierNode.prelim-u+a(s,i);v>0&&(i7(n7(s,r,e),r,v),u+=v,l+=v),f+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=n.hierNode.modifier,c+=o.hierNode.modifier}s&&!Gg(n)&&(n.hierNode.thread=s,n.hierNode.modifier+=f-l),i&&!Hg(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-c,e=r)}return e}function Gg(r){var t=r.children;return t.length&&r.isExpand?t[t.length-1]:r.hierNode.thread}function Hg(r){var t=r.children;return t.length&&r.isExpand?t[0]:r.hierNode.thread}function n7(r,t,e){return r.hierNode.ancestor.parentNode===t.parentNode?r.hierNode.ancestor:e}function i7(r,t,e){var a=e/(t.hierNode.i-r.hierNode.i);t.hierNode.change-=a,t.hierNode.shift+=e,t.hierNode.modifier+=e,t.hierNode.prelim+=e,r.hierNode.change+=a}function o7(r,t){return r.parentNode===t.parentNode?1:2}var s7=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),l7=function(r){V(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new s7},t.prototype.buildPath=function(e,a){var n=a.childPoints,i=n.length,o=a.parentPoint,s=n[0],l=n[i-1];if(i===1){e.moveTo(o[0],o[1]),e.lineTo(s[0],s[1]);return}var u=a.orient,c=u==="TB"||u==="BT"?0:1,f=1-c,v=ne(a.forkPosition,1),h=[];h[c]=o[c],h[f]=o[f]+(l[f]-o[f])*v,e.moveTo(o[0],o[1]),e.lineTo(h[0],h[1]),e.moveTo(s[0],s[1]),h[c]=s[c],e.lineTo(h[0],h[1]),h[c]=l[c],e.lineTo(h[0],h[1]),e.lineTo(l[0],l[1]);for(var d=1;dm.x,w||(S=S-Math.PI));var b=w?"left":"right",T=s.getModel("label"),C=T.get("rotate"),D=C*(Math.PI/180),M=g.getTextContent();M&&(g.setTextConfig({position:T.get("position")||b,rotation:C==null?-S:D,origin:"center"}),M.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?tc(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(De(e).focus=I),c7(n,o,c,e,d,h,p,a),e.__edge&&(e.onHoverStateChange=function(P){if(P!=="blur"){var R=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);R&&R.hoverState===Oc||fh(e.__edge,P)}})}function c7(r,t,e,a,n,i,o,s){var l=t.getModel(),u=r.get("edgeShape"),c=r.get("layout"),f=r.getOrient(),v=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),d=l.getModel("lineStyle").getLineStyle(),p=a.__edge;if(u==="curve")t.parentNode&&t.parentNode!==e&&(p||(p=a.__edge=new Td({shape:A0(c,f,v,n,n)})),Ze(p,{shape:A0(c,f,v,i,o)},r));else if(u==="polyline"&&c==="orthogonal"&&t!==e&&t.children&&t.children.length!==0&&t.isExpand===!0){for(var g=t.children,y=[],m=0;me&&(e=n.height)}this.height=e+1},r.prototype.getNodeById=function(t){if(this.getId()===t)return this;for(var e=0,a=this.children,n=a.length;e=0&&this.hostTree.data.setItemLayout(this.dataIndex,t,e)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostTree,a=e.data.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(t,e){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,t,e)},r.prototype.getVisual=function(t){return this.hostTree.data.getItemVisual(this.dataIndex,t)},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 t=this.parentNode.children,e=0;e=0){var a=e.getData().tree.root,n=r.targetNode;if(oe(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 xE(r){for(var t=[];r;)r=r.parentNode,r&&t.push(r);return t.reverse()}function oS(r,t){var e=xE(r);return ke(e,t)>=0}function Wd(r,t){for(var e=[];r;){var a=r.dataIndex;e.push({name:r.name,dataIndex:a,value:t.getRawValue(a)}),r=r.parentNode}return e.reverse(),e}var w7=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.hasSymbolVisual=!0,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e){var a={name:e.name,children:e.data},n=e.leaves||{},i=new Xe(n,this,this.ecModel),o=iS.createTree(a,this,s);function s(f){f.wrapMethod("getItemModel",function(v,h){var d=o.getNodeByDataIndex(h);return d&&d.children.length&&d.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(f){f.depth>l&&(l=f.depth)});var u=e.expandAndCollapse,c=u&&e.initialTreeDepth>=0?e.initialTreeDepth:l;return o.root.eachNode("preorder",function(f){var v=f.hostTree.data.getRawDataItem(f.dataIndex);f.isExpand=v&&v.collapsed!=null?!v.collapsed:f.depth<=c}),o.data},t.prototype.getOrient=function(){var e=this.get("orient");return e==="horizontal"?e="LR":e==="vertical"&&(e="TB"),e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.formatTooltip=function(e,a,n){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(e),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Pt("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Wd(n,this),a.collapsed=!n.isExpand,a},t.type="series.tree",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,roamTrigger:"global",nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:G.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},t}(ft);const x7=w7;function b7(r,t,e){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--)e.push(n[i])}}function C7(r,t){r.eachSeriesByType("tree",function(e){T7(e,t)})}function T7(r,t){var e=Ft(r,t).refContainer,a=ct(r.getBoxLayoutParams(),e);r.layoutInfo=a;var n=r.get("layout"),i=0,o=0,s=null;n==="radial"?(i=2*Math.PI,o=Math.min(a.height,a.width)/2,s=ET(function(S,w){return(S.parentNode===w.parentNode?1:2)/S.depth})):(i=a.width,o=a.height,s=ET());var l=r.getData().tree.root,u=l.children[0];if(u){Q8(l),b7(u,e7,s),l.hierNode.modifier=-u.hierNode.prelim,gu(u,t7);var c=u,f=u,v=u;gu(u,function(S){var w=S.getLayout().x;wf.getLayout().x&&(f=S),S.depth>v.depth&&(v=S)});var h=c===f?1:s(c,f)/2,d=h-c.getLayout().x,p=0,g=0,y=0,m=0;if(n==="radial")p=i/(f.getLayout().x+h+d),g=o/(v.depth-1||1),gu(u,function(S){y=(S.getLayout().x+d)*p,m=(S.depth-1)*g;var w=Ou(y,m);S.setLayout({x:w.x,y:w.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(f.getLayout().x+h+d),p=i/(v.depth-1||1),gu(u,function(S){m=(S.getLayout().x+d)*g,y=_==="LR"?(S.depth-1)*p:i-(S.depth-1)*p,S.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(p=i/(f.getLayout().x+h+d),g=o/(v.depth-1||1),gu(u,function(S){y=(S.getLayout().x+d)*p,m=_==="TB"?(S.depth-1)*g:o-(S.depth-1)*g,S.setLayout({x:y,y:m},!0)}))}}}function D7(r){r.eachSeriesByType("tree",function(t){var e=t.getData(),a=e.tree;a.eachNode(function(n){var i=n.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=e.ensureUniqueItemVisual(n.dataIndex,"style");$(s,o)})})}function M7(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"tree",query:t},function(a){var n=t.dataIndex,i=a.getData().tree,o=i.getNodeByDataIndex(n);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"tree",query:t},function(n){var i=n.coordinateSystem,o=Hd(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}function A7(r){r.registerChartView(f7),r.registerSeriesModel(x7),r.registerLayout(C7),r.registerVisual(D7),M7(r)}var zT=["treemapZoomToNode","treemapRender","treemapMove"];function I7(r){for(var t=0;t1;)i=i.parentNode;var o=Zm(r.ecModel,i.name||i.dataIndex+"",a);n.setVisual("decal",o)})}var L7=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventUsingHoverLayer=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};CE(n);var i=e.levels||[],o=this.designatedVisualItemStyle={},s=new Xe({itemStyle:o},this,a);i=e.levels=P7(i,a);var l=X(i||[],function(f){return new Xe(f,s,a)},this),u=iS.createTree(n,this,c);function c(f){f.wrapMethod("getItemModel",function(v,h){var d=u.getNodeByDataIndex(h),p=d?l[d.depth]:null;return v.parentModel=p||s,v})}return u.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.formatTooltip=function(e,a,n){var i=this.getData(),o=this.getRawValue(e),s=i.getName(e);return Pt("nameValue",{name:s,value:o})},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treeAncestors=Wd(n,this),a.treePathInfo=a.treeAncestors,a},t.prototype.setLayoutInfo=function(e){this.layoutInfo=this.layoutInfo||{},$(this.layoutInfo,e)},t.prototype.mapIdToIndex=function(e){var a=this._idIndexMap;a||(a=this._idIndexMap=ve(),this._idIndexMapCount=0);var n=a.get(e);return n==null&&a.set(e,n=this._idIndexMapCount++),n},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){bE(this)},t.type="series.treemap",t.layoutMode="box",t.defaultOption={progressive:0,coordinateSystemUsage:"box",left:G.size.l,top:G.size.xxxl,right:G.size.l,bottom:G.size.xxxl,sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:{max:5,min:.2},roam:!0,roamTrigger:"global",nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",bottom:G.size.m,emptyItemWidth:25,itemStyle:{color:G.color.backgroundShade,textStyle:{color:G.color.secondary}},emphasis:{itemStyle:{color:G.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:G.color.neutral00,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:G.color.neutral00,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:[]},t}(ft);function CE(r){var t=0;A(r.children,function(a){CE(a);var n=a.value;Z(n)&&(n=n[0]),t+=n});var e=r.value;Z(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),Z(r.value)?r.value[0]=e:r.value=e}function P7(r,t){var e=at(t.get("color")),a=at(t.get(["aria","decal","decals"]));if(e){r=r||[];var n,i;A(r,function(s){var l=new Xe(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(n=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return n||(o.color=e.slice()),!i&&a&&(o.decal=a.slice()),r}}const k7=L7;var R7=8,FT=8,$g=5,E7=function(){function r(t){this.group=new _e,t.add(this.group)}return r.prototype.render=function(t,e,a,n){var i=t.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"),c=l.getModel(["itemStyle","textStyle"]),f=Ft(t,e).refContainer,v={left:i.get("left"),right:i.get("right"),top:i.get("top"),bottom:i.get("bottom")},h={emptyItemWidth:i.get("emptyItemWidth"),totalWidth:0,renderList:[]},d=ct(v,f);this._prepare(a,h,u),this._renderContent(t,h,d,s,l,u,c,n),Pd(o,v,f)}},r.prototype._prepare=function(t,e,a){for(var n=t;n;n=n.parentNode){var i=Nt(n.getModel().get("name"),""),o=a.getTextRect(i),s=Math.max(o.width+R7*2,e.emptyItemWidth);e.totalWidth+=s+FT,e.renderList.push({node:n,text:i,width:s})}},r.prototype._renderContent=function(t,e,a,n,i,o,s,l){for(var u=0,c=e.emptyItemWidth,f=t.get(["breadcrumb","height"]),v=e.totalWidth,h=e.renderList,d=i.getModel("itemStyle").getItemStyle(),p=h.length-1;p>=0;p--){var g=h[p],y=g.node,m=g.width,_=g.text;v>a.width&&(v-=m-c,m=c,_=null);var S=new wr({shape:{points:O7(u,0,m,f,p===h.length-1,p===0)},style:xe(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ue({style:it(o,{text:_})}),textConfig:{position:"inside"},z2:Ll*1e4,onclick:Pe(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=it(s,{text:_}),S.ensureState("emphasis").style=d,ut(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),N7(S,t,y),u+=m+FT}},r.prototype.remove=function(){this.group.removeAll()},r}();function O7(r,t,e,a,n,i){var o=[[n?r:r-$g,t],[r+e,t],[r+e,t+a],[n?r:r-$g,t+a]];return!i&&o.splice(2,0,[r+e+$g,t+a/2]),!n&&o.push([r,t+a/2]),o}function N7(r,t,e){De(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:e&&e.dataIndex,name:e&&e.name},treePathInfo:e&&Wd(e,t)}}const B7=E7;var V7=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(t,e,a,n,i){return this._elExistsMap[t.id]?!1:(this._elExistsMap[t.id]=!0,this._storage.push({el:t,target:e,duration:a,delay:n,easing:i}),!0)},r.prototype.finished=function(t){return this._finishedCallback=t,this},r.prototype.start=function(){for(var t=this,e=this._storage.length,a=function(){e--,e<=0&&(t._storage.length=0,t._elExistsMap={},t._finishedCallback&&t._finishedCallback())},n=0,i=this._storage.length;nHT||Math.abs(e.dy)>HT)){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+e.dx,y:n.y+e.dy,width:n.width,height:n.height}})}},t.prototype._onZoom=function(e){var a=e.originX,n=e.originY,i=e.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 Ce(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var f=c.zoom=c.zoom||1;if(f*=i,u){var v=u.min||0,h=u.max||1/0;f=Math.max(Math.min(h,f),v)}var d=f/c.zoom;c.zoom=f;var p=this.seriesModel.layoutInfo;a-=p.x,n-=p.y;var g=Xt();tn(g,g,[-a,-n]),B_(g,g,[d,d]),tn(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}})}},t.prototype._initEvents=function(e){var a=this;e.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),c=l.get("target",!0)||"blank";u&&ph(u,c)}}}}},this)},t.prototype._renderBreadcrumb=function(e,a,n){var i=this;n||(n=e.get("leafDepth",!0)!=null?{node:e.getViewRoot()}:this.findTarget(a.getWidth()/2,a.getHeight()/2),n||(n={node:e.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new B7(this.group))).render(e,a,n.node,function(o){i._state!=="animating"&&(oS(e.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},t.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=yu(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},t.prototype.dispose=function(){this._clearController()},t.prototype._zoomToNode=function(e){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype._rootToNode=function(e){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:e.node})},t.prototype.findTarget=function(e,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(e,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},t.type="treemap",t}(ot);function yu(){return{nodeGroup:[],background:[],content:[]}}function W7(r,t,e,a,n,i,o,s,l,u){if(!o)return;var c=o.getLayout(),f=r.getData(),v=o.getModel();if(f.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var h=c.width,d=c.height,p=c.borderWidth,g=c.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=c.upperHeight,w=_&&_.length,x=v.getModel("itemStyle"),b=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),D=x.get("borderRadius")||0,M=ce("nodeGroup",I0);if(!M)return;if(l.add(M),M.x=c.x||0,M.y=c.y||0,M.markRedraw(),Vh(M).nodeWidth=h,Vh(M).nodeHeight=d,c.isAboveViewRoot)return M;var L=ce("background",GT,u,G7);L&&B(M,L,w&&c.upperLabelHeight);var I=v.getModel("emphasis"),P=I.get("focus"),R=I.get("blurScope"),E=I.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(w)uc(M)&&Lo(M,!1),L&&(Lo(L,!E),f.setItemGraphicEl(o.dataIndex,L),Om(L,O,R));else{var k=ce("content",GT,u,H7);k&&F(M,k),L.disableMorphing=!0,L&&uc(L)&&Lo(L,!1),Lo(M,!E),f.setItemGraphicEl(o.dataIndex,M);var N=v.getShallow("cursor");N&&k.attr("cursor",N),Om(M,O,R)}return M;function B(he,fe,U){var z=De(fe);if(z.dataIndex=o.dataIndex,z.seriesIndex=r.seriesIndex,fe.setShape({x:0,y:0,width:h,height:d,r:D}),g)H(fe);else{fe.invisible=!1;var J=o.getVisual("style"),ie=J.stroke,W=YT(x);W.fill=ie;var Q=So(b);Q.fill=b.get("borderColor");var re=So(T);re.fill=T.get("borderColor");var ge=So(C);if(ge.fill=C.get("borderColor"),U){var ae=h-2*p;j(fe,ie,J.opacity,{x:p,y:0,width:ae,height:S})}else fe.removeTextContent();fe.setStyle(W),fe.ensureState("emphasis").style=Q,fe.ensureState("blur").style=re,fe.ensureState("select").style=ge,qo(fe)}he.add(fe)}function F(he,fe){var U=De(fe);U.dataIndex=o.dataIndex,U.seriesIndex=r.seriesIndex;var z=Math.max(h-2*p,0),J=Math.max(d-2*p,0);if(fe.culling=!0,fe.setShape({x:p,y:p,width:z,height:J,r:D}),g)H(fe);else{fe.invisible=!1;var ie=o.getVisual("style"),W=ie.fill,Q=YT(x);Q.fill=W,Q.decal=ie.decal;var re=So(b),ge=So(T),ae=So(C);j(fe,W,ie.opacity,null),fe.setStyle(Q),fe.ensureState("emphasis").style=re,fe.ensureState("blur").style=ge,fe.ensureState("select").style=ae,qo(fe)}he.add(fe)}function H(he){!he.invisible&&i.push(he)}function j(he,fe,U,z){var J=v.getModel(z?WT:$T),ie=Nt(v.get("name"),null),W=J.getShallow("show");$t(he,zt(v,z?WT:$T),{defaultText:W?ie:null,inheritColor:fe,defaultOpacity:U,labelFetcher:r,labelDataIndex:o.dataIndex});var Q=he.getTextContent();if(Q){var re=Q.style,ge=cd(re.padding||0);z&&(he.setTextConfig({layoutRect:z}),Q.disableLabelLayout=!0),Q.beforeUpdate=function(){var te=Math.max((z?z.width:he.shape.width)-ge[1]-ge[3],0),K=Math.max((z?z.height:he.shape.height)-ge[0]-ge[2],0);(re.width!==te||re.height!==K)&&Q.setStyle({width:te,height:K})},re.truncateMinChar=2,re.lineOverflow="truncate",ee(re,z,c);var ae=Q.getState("emphasis");ee(ae?ae.style:null,z,c)}}function ee(he,fe,U){var z=he?he.text:null;if(!fe&&U.isLeafRoot&&z!=null){var J=r.get("drillDownIcon",!0);he.text=J?J+" "+z:z}}function ce(he,fe,U,z){var J=m!=null&&e[he][m],ie=n[he];return J?(e[he][m]=null,Ae(ie,J)):g||(J=new fe,J instanceof la&&(J.z2=Y7(U,z)),Be(ie,J)),t[he][y]=J}function Ae(he,fe){var U=he[y]={};fe instanceof I0?(U.oldX=fe.x,U.oldY=fe.y):U.oldShape=$({},fe.shape)}function Be(he,fe){var U=he[y]={},z=o.parentNode,J=fe instanceof _e;if(z&&(!a||a.direction==="drillDown")){var ie=0,W=0,Q=n.background[z.getRawIndex()];!a&&Q&&Q.oldShape&&(ie=Q.oldShape.width,W=Q.oldShape.height),J?(U.oldX=0,U.oldY=W):U.oldShape={x:ie,y:W,width:0,height:0}}U.fadein=!J}}function Y7(r,t){return r*F7+t}const U7=$7;var Tc=A,Z7=be,zh=-1,sS=function(){function r(t){var e=t.mappingMethod,a=t.type,n=this.option=me(t);this.type=a,this.mappingMethod=e,this._normalizeData=j7[e];var i=r.visualHandlers[a];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[e],e==="piecewise"?(Wg(n),X7(n)):e==="category"?n.categories?q7(n):Wg(n,!0):(cr(e!=="linear"||n.dataExtent),Wg(n))}return r.prototype.mapValueToVisual=function(t){var e=this._normalizeData(t);return this._normalizedToVisual(e,t)},r.prototype.getNormalizer=function(){return se(this._normalizeData,this)},r.listVisualTypes=function(){return He(r.visualHandlers)},r.isValidType=function(t){return r.visualHandlers.hasOwnProperty(t)},r.eachVisual=function(t,e,a){be(t)?A(t,e,a):e.call(a,t)},r.mapVisual=function(t,e,a){var n,i=Z(t)?[]:be(t)?{}:(n=!0,null);return r.eachVisual(t,function(o,s){var l=e.call(a,o,s);n?i=l:i[s]=l}),i},r.retrieveVisuals=function(t){var e={},a;return t&&Tc(r.visualHandlers,function(n,i){t.hasOwnProperty(i)&&(e[i]=t[i],a=!0)}),a?e:null},r.prepareVisualTypes=function(t){if(Z(t))t=t.slice();else if(Z7(t)){var e=[];Tc(t,function(a,n){e.push(n)}),t=e}else return[];return t.sort(function(a,n){return n==="color"&&a!=="color"&&a.indexOf("color")===0?1:-1}),t},r.dependsOn=function(t,e){return e==="color"?!!(t&&t.indexOf(e)===0):t===e},r.findPieceIndex=function(t,e,a){for(var n,i=1/0,o=0,s=e.length;o=0;i--)a[i]==null&&(delete e[t[i]],t.pop())}function Wg(r,t){var e=r.visual,a=[];be(e)?Tc(e,function(i){a.push(i)}):e!=null&&a.push(e);var n={color:1,symbol:1};!t&&a.length===1&&!n.hasOwnProperty(r.type)&&(a[1]=a[0]),TE(r,a)}function tv(r){return{applyVisual:function(t,e,a){var n=this.mapValueToVisual(t);a("color",r(e("color"),n))},_normalizedToVisual:L0([0,1])}}function UT(r){var t=this.option.visual;return t[Math.round(Je(r,[0,1],[0,t.length-1],!0))]||{}}function mu(r){return function(t,e,a){a(r,this.mapValueToVisual(t))}}function Nu(r){var t=this.option.visual;return t[this.option.loop&&r!==zh?r%t.length:r]}function wo(){return this.option.visual[0]}function L0(r){return{linear:function(t){return Je(t,r,this.option.visual,!0)},category:Nu,piecewise:function(t,e){var a=P0.call(this,e);return a==null&&(a=Je(t,r,this.option.visual,!0)),a},fixed:wo}}function P0(r){var t=this.option,e=t.pieceList;if(t.hasSpecialVisual){var a=sS.findPieceIndex(r,e),n=e[a];if(n&&n.visual)return n.visual[this.type]}}function TE(r,t){return r.visual=t,r.type==="color"&&(r.parsedVisual=X(t,function(e){var a=Lr(e);return a||[0,0,0,1]})),t}var j7={linear:function(r){return Je(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var t=this.option.pieceList,e=sS.findPieceIndex(r,t,!0);if(e!=null)return Je(e,[0,t.length-1],[0,1],!0)},category:function(r){var t=this.option.categories?this.option.categoryMap[r]:r;return t??zh},fixed:Ct};function rv(r,t,e){return r?t<=e:t=e.length||p===e[p.depth]){var y=rZ(n,l,p,g,d,a);ME(p,y,e,a)}})}}}function Q7(r,t,e){var a=$({},t),n=e.designatedVisualItemStyle;return A(["color","colorAlpha","colorSaturation"],function(i){n[i]=t[i];var o=r.get(i);n[i]=null,o!=null&&(a[i]=o)}),a}function ZT(r){var t=Yg(r,"color");if(t){var e=Yg(r,"colorAlpha"),a=Yg(r,"colorSaturation");return a&&(t=xi(t,null,null,a)),e&&(t=th(t,e)),t}}function eZ(r,t){return t!=null?xi(t,null,null,r):null}function Yg(r,t){var e=r[t];if(e!=null&&e!=="none")return e}function tZ(r,t,e,a,n,i){if(!(!i||!i.length)){var o=Ug(t,"color")||n.color!=null&&n.color!=="none"&&(Ug(t,"colorAlpha")||Ug(t,"colorSaturation"));if(o){var s=t.get("visualMin"),l=t.get("visualMax"),u=e.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var c=t.get("colorMappingBy"),f={type:o.name,dataExtent:u,visual:o.range};f.type==="color"&&(c==="index"||c==="id")?(f.mappingMethod="category",f.loop=!0):f.mappingMethod="linear";var v=new tr(f);return DE(v).drColorMappingBy=c,v}}}function Ug(r,t){var e=r.get(t);return Z(e)&&e.length?{name:t,range:e}:null}function rZ(r,t,e,a,n,i){var o=$({},t);if(n){var s=n.type,l=s==="color"&&DE(n).drColorMappingBy,u=l==="index"?a:l==="id"?i.mapIdToIndex(e.getId()):e.getValue(r.get("visualDimension"));o[s]=n.mapValueToVisual(u)}return o}var Dc=Math.max,Fh=Math.min,XT=er,lS=A,AE=["itemStyle","borderWidth"],aZ=["itemStyle","gapWidth"],nZ=["upperLabel","show"],iZ=["upperLabel","height"];const oZ={seriesType:"treemap",reset:function(r,t,e,a){var n=r.option,i=Ft(r,e).refContainer,o=ct(r.getBoxLayoutParams(),i),s=n.size||[],l=ne(XT(o.width,s[0]),i.width),u=ne(XT(o.height,s[1]),i.height),c=a&&a.type,f=["treemapZoomToNode","treemapRootToNode"],v=Cc(a,f,r),h=c==="treemapRender"||c==="treemapMove"?a.rootRect:null,d=r.getViewRoot(),p=xE(d);if(c!=="treemapMove"){var g=c==="treemapZoomToNode"?vZ(r,v,d,l,u):h?[h.width,h.height]:[l,u],y=n.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:n.squareRatio,sort:y,leafDepth:n.leafDepth};d.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};d.setLayout(_),IE(d,m,!1,0),_=d.getLayout(),lS(p,function(w,x){var b=(p[x+1]||d).getValue();w.setLayout($({dataExtent:[b,b],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(hZ(o,h,v),!0),r.setLayoutInfo(o),LE(S,new Ce(-o.x,-o.y,e.getWidth(),e.getHeight()),p,d,0)}};function IE(r,t,e,a){var n,i;if(!r.isRemoved()){var o=r.getLayout();n=o.width,i=o.height;var s=r.getModel(),l=s.get(AE),u=s.get(aZ)/2,c=PE(s),f=Math.max(l,c),v=l-u,h=f-u;r.setLayout({borderWidth:l,upperHeight:f,upperLabelHeight:c},!0),n=Dc(n-2*v,0),i=Dc(i-v-h,0);var d=n*i,p=sZ(r,s,d,t,e,a);if(p.length){var g={x:v,y:h,width:n,height:i},y=Fh(n,i),m=1/0,_=[];_.area=0;for(var S=0,w=p.length;S=0;l--){var u=n[a==="asc"?o-l-1:l].getValue();u/e*ts[1]&&(s[1]=u)})),{sum:a,dataExtent:s}}function fZ(r,t,e){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=t*t*e;return l?Dc(u*a/l,l/(u*n)):1/0}function qT(r,t,e,a,n){var i=t===e.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=e[s[i]],c=t?r.area/t:0;(n||c>e[l[o]])&&(c=e[l[o]]);for(var f=0,v=r.length;fKw&&(u=Kw),i=s}ua&&(a=t);var i=a%2?a+2:a+3;n=[];for(var o=0;o0&&(w[0]=-w[0],w[1]=-w[1]);var b=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);f[0].8?"left":v[0]<-.8?"right":"center",p=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+c[0],i.y=-v[1]*m+c[1],d=v[0]>.8?"right":v[0]<-.8?"left":"center",p=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*b+c[0],i.y=c[1]+C,d=S[0]<0?"right":"left",i.originX=-y*b,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+C,d="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*b+f[0],i.y=f[1]+C,d=S[0]>=0?"right":"left",i.originX=y*b,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||p,align:i.__align||d})}},t}(_e);const vS=PZ;var kZ=function(){function r(t){this.group=new _e,this._LineCtor=t||vS}return r.prototype.updateData=function(t){var e=this;this._progressiveEls=null;var a=this,n=a.group,i=a._lineData;a._lineData=t,i||n.removeAll();var o=tD(t);t.diff(i).add(function(s){e._doAdd(t,s,o)}).update(function(s,l){e._doUpdate(i,t,l,s,o)}).remove(function(s){n.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var t=this._lineData;t&&t.eachItemGraphicEl(function(e,a){e.updateLayout(t,a)},this)},r.prototype.incrementalPrepareUpdate=function(t){this._seriesScope=tD(t),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(t,e){this._progressiveEls=[];function a(s){!s.isGroup&&!RZ(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var n=t.start;n0}function tD(r){var t=r.hostModel,e=t.getModel("emphasis");return{lineStyle:t.getModel("lineStyle").getLineStyle(),emphasisLineStyle:e.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:t.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:t.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:e.get("disabled"),blurScope:e.get("blurScope"),focus:e.get("focus"),labelStatesModels:zt(t)}}function rD(r){return isNaN(r[0])||isNaN(r[1])}function Kg(r){return r&&!rD(r[0])&&!rD(r[1])}const hS=kZ;var Jg=[],Qg=[],ey=[],Bs=Zt,ty=No,aD=Math.abs;function nD(r,t,e){for(var a=r[0],n=r[1],i=r[2],o=1/0,s,l=e*e,u=.1,c=.1;c<=.9;c+=.1){Jg[0]=Bs(a[0],n[0],i[0],c),Jg[1]=Bs(a[1],n[1],i[1],c);var f=aD(ty(Jg,t)-l);f=0?s=s+u:s=s-u:d>=0?s=s-u:s=s+u}return s}function ry(r,t){var e=[],a=rc,n=[[],[],[]],i=[[],[]],o=[];t/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),f=s.getVisual("toSymbol");u.__original||(u.__original=[Mn(u[0]),Mn(u[1])],u[2]&&u.__original.push(Mn(u[2])));var v=u.__original;if(u[2]!=null){if(pr(n[0],v[0]),pr(n[1],v[2]),pr(n[2],v[1]),c&&c!=="none"){var h=Vu(s.node1),d=nD(n,v[0],h*t);a(n[0][0],n[1][0],n[2][0],d,e),n[0][0]=e[3],n[1][0]=e[4],a(n[0][1],n[1][1],n[2][1],d,e),n[0][1]=e[3],n[1][1]=e[4]}if(f&&f!=="none"){var h=Vu(s.node2),d=nD(n,v[1],h*t);a(n[0][0],n[1][0],n[2][0],d,e),n[1][0]=e[1],n[2][0]=e[2],a(n[0][1],n[1][1],n[2][1],d,e),n[1][1]=e[1],n[2][1]=e[2]}pr(u[0],n[0]),pr(u[1],n[2]),pr(u[2],n[1])}else{if(pr(i[0],v[0]),pr(i[1],v[1]),Ao(o,i[1],i[0]),Ml(o,o),c&&c!=="none"){var h=Vu(s.node1);tm(i[0],i[0],o,h*t)}if(f&&f!=="none"){var h=Vu(s.node2);tm(i[1],i[1],o,-h*t)}pr(u[0],i[0]),pr(u[1],i[1])}})}var VE=ze();function EZ(r){if(r)return VE(r).bridge}function iD(r,t){r&&(VE(r).bridge=t)}function oD(r){return r.type==="view"}var OZ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){var n=new Yc,i=new hS,o=this.group,s=new _e;this._controller=new ds(a.getZr()),this._controllerHost={target:s},s.add(n.group),s.add(i.group),o.add(s),this._symbolDraw=n,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},t.prototype.render=function(e,a,n){var i=this,o=e.coordinateSystem,s=!1;this._model=e,this._api=n,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(n);var u=this._symbolDraw,c=this._lineDraw;if(oD(o)){var f={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(f):Ze(this._mainGroup,f,e)}ry(e.getGraph(),Bu(e));var v=e.getData();u.updateData(v);var h=e.getEdgeData();c.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,e,n),clearTimeout(this._layoutTimeout);var d=e.forceLayout,p=e.get(["force","layoutAnimation"]);d&&(s=!0,this._startForceLayoutIteration(d,n,p));var g=e.get("layout");v.graph.eachNode(function(S){var w=S.dataIndex,x=S.getGraphicEl(),b=S.getModel();if(x){x.off("drag").off("dragend");var T=b.get("draggable");T&&x.on("drag",function(D){switch(g){case"force":d.warmUp(),!i._layouting&&i._startForceLayoutIteration(d,n,p),d.setFixed(w),v.setItemLayout(w,[x.x,x.y]);break;case"circular":v.setItemLayout(w,[x.x,x.y]),S.setLayout({fixed:!0},!0),fS(e,"symbolSize",S,[D.offsetX,D.offsetY]),i.updateLayout(e);break;case"none":default:v.setItemLayout(w,[x.x,x.y]),cS(e.getGraph(),e),i.updateLayout(e);break}}).on("dragend",function(){d&&d.setUnfixed(w)}),x.setDraggable(T,!!b.get("cursor"));var C=b.get(["emphasis","focus"]);C==="adjacency"&&(De(x).focus=S.getAdjacentDataIndices())}}),v.graph.eachEdge(function(S){var w=S.getGraphicEl(),x=S.getModel().get(["emphasis","focus"]);w&&x==="adjacency"&&(De(w).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var y=e.get("layout")==="circular"&&e.get(["circular","rotateLabel"]),m=v.getLayout("cx"),_=v.getLayout("cy");v.graph.eachNode(function(S){OE(S,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(e,n,this._symbolDraw,this._lineDraw)},t.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._startForceLayoutIteration=function(e,a,n){var i=this,o=!1;(function s(){e.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,a,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(n?i._layoutTimeout=setTimeout(s,16):s())})})()},t.prototype._updateController=function(e,a,n){var i=this._controller,o=this._controllerHost,s=a.coordinateSystem;if(!oD(s)){i.disable();return}i.enable(a.get("roam"),{api:n,zInfo:{component:a},triggerInfo:{roamTrigger:a.get("roamTrigger"),isInSelf:function(l,u,c){return s.containPoint([u,c])},isInClip:function(l,u,c){return!e||e.contain(u,c)}}}),o.zoomLimit=a.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){n.dispatchAction({seriesId:a.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},t.prototype.updateViewOnPan=function(e,a,n){this._active&&(eS(this._controllerHost,n.dx,n.dy),this._updateThumbnailWindow())},t.prototype.updateViewOnZoom=function(e,a,n){this._active&&(tS(this._controllerHost,n.zoom,n.originX,n.originY),this._updateNodeAndLinkScale(),ry(e.getGraph(),Bu(e)),this._lineDraw.updateLayout(),a.updateLabelLayout(),this._updateThumbnailWindow())},t.prototype._updateNodeAndLinkScale=function(){var e=this._model,a=e.getData(),n=Bu(e);a.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(n)})},t.prototype.updateLayout=function(e){this._active&&(ry(e.getGraph(),Bu(e)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},t.prototype.remove=function(){this._active=!1,clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove(),this._controller&&this._controller.disable()},t.prototype._getThumbnailInfo=function(){var e=this._model,a=e.coordinateSystem;if(a.type==="view"){var n=EZ(e);if(n)return{bridge:n,coordSys:a}}},t.prototype._updateThumbnailWindow=function(){var e=this._getThumbnailInfo();e&&e.bridge.updateWindow(e.coordSys.transform,this._api)},t.prototype._renderThumbnail=function(e,a,n,i){var o=this._getThumbnailInfo();if(o){var s=new _e,l=n.group.children(),u=i.group.children(),c=new _e,f=new _e;s.add(f),s.add(c);for(var v=0;v=0&&t.call(e,a[i],i)},r.prototype.eachEdge=function(t,e){for(var a=this.edges,n=a.length,i=0;i=0&&a[i].node1.dataIndex>=0&&a[i].node2.dataIndex>=0&&t.call(e,a[i],i)},r.prototype.breadthFirstTraverse=function(t,e,a,n){if(e instanceof xo||(e=this._nodesMap[Vs(e)]),!!e){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&&!t.hasKey(d)&&(t.set(d,!0),o.push(h.node1))}for(l=0;l=0&&!t.hasKey(_)&&(t.set(_,!0),s.push(m.node2))}}}return{edge:t.keys(),node:e.keys()}},r}(),zE=function(){function r(t,e,a){this.dataIndex=-1,this.node1=t,this.node2=e,this.dataIndex=a??-1}return r.prototype.getModel=function(t){if(!(this.dataIndex<0)){var e=this.hostGraph,a=e.edgeData.getItemModel(this.dataIndex);return a.getModel(t)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var t=ve(),e=ve();t.set(this.dataIndex,!0);for(var a=[this.node1],n=[this.node2],i=0;i=0&&!t.hasKey(f)&&(t.set(f,!0),a.push(c.node1))}for(i=0;i=0&&!t.hasKey(p)&&(t.set(p,!0),n.push(d.node2))}return{edge:t.keys(),node:e.keys()}},r}();function FE(r,t){return{getValue:function(e){var a=this[r][t];return a.getStore().get(a.getDimensionIndex(e||"value"),this.dataIndex)},setVisual:function(e,a){this.dataIndex>=0&&this[r][t].setItemVisual(this.dataIndex,e,a)},getVisual:function(e){return this[r][t].getItemVisual(this.dataIndex,e)},setLayout:function(e,a){this.dataIndex>=0&&this[r][t].setItemLayout(this.dataIndex,e,a)},getLayout:function(){return this[r][t].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][t].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][t].getRawIndex(this.dataIndex)}}}Rt(xo,FE("hostGraph","data"));Rt(zE,FE("hostGraph","edgeData"));const VZ=BZ;function dS(r,t,e,a,n){for(var i=new VZ(a),o=0;o "+v)),u++)}var h=e.get("coordinateSystem"),d;if(h==="cartesian2d"||h==="polar"||h==="matrix")d=$n(r,e);else{var p=Fc.get(h),g=p?p.dimensions||[]:[];ke(g,"value")<0&&g.concat(["value"]);var y=Hc(r,{coordDimensions:g,encodeDefine:e.getEncode()}).dimensions;d=new mr(y,e),d.initData(r)}var m=new mr(["value"],e);return m.initData(l,s),n&&n(d,m),SE({mainData:d,struct:i,structAttr:"graph",datas:{node:d,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var zZ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments);var a=this;function n(){return a._categoriesData}this.legendVisualProvider=new Hl(n,n),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this._updateCategoriesData()},t.prototype.mergeDefaultAndTheme=function(e){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Uo(e,"edgeLabel",["show"])},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=this;if(i&&n){SZ(this);var s=dS(i,n,this,!0,l);return A(s.edges,function(u){wZ(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(d){var p=o._categoriesModels,g=d.getShallow("category"),y=p[g];return y&&(y.parentModel=d.parentModel,d.parentModel=y),d});var f=Xe.prototype.getModel;function v(d,p){var g=f.call(this,d,p);return g.resolveParentPath=h,g}c.wrapMethod("getItemModel",function(d){return d.resolveParentPath=h,d.getModel=v,d});function h(d){if(d&&(d[0]==="label"||d[1]==="label")){var p=d.slice();return d[0]==="label"?p[0]="edgeLabel":d[1]==="label"&&(p[1]="edgeLabel"),p}return d}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.getCategoriesData=function(){return this._categoriesData},t.prototype.formatTooltip=function(e,a,n){if(n==="edge"){var i=this.getData(),o=this.getDataParams(e,n),s=i.graph.getEdgeByIndex(e),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Pt("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var f=GP({series:this,dataIndex:e,multipleSeries:a});return f},t.prototype._updateCategoriesData=function(){var e=X(this.option.categories||[],function(n){return n.value!=null?n:$({value:0},n)}),a=new mr(["value"],this);a.initData(e),this._categoriesData=a,this._categoriesModels=a.mapArray(function(n){return a.getItemModel(n)})},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},t.type="series.graph",t.dependencies=["grid","polar","geo","singleAxis","calendar"],t.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:G.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:G.color.primary}}},t}(ft);const FZ=zZ;function GZ(r){r.registerChartView(NZ),r.registerSeriesModel(FZ),r.registerProcessor(pZ),r.registerVisual(gZ),r.registerVisual(yZ),r.registerLayout(xZ),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,CZ),r.registerLayout(DZ),r.registerCoordinateSystem("graphView",{dimensions:ps.dimensions,create:AZ}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},Ct),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},Ct),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",query:t},function(n){var i=a.getViewOfSeriesModel(n);i&&(t.dx!=null&&t.dy!=null&&i.updateViewOnPan(n,a,t),t.zoom!=null&&t.originX!=null&&t.originY!=null&&i.updateViewOnZoom(n,a,t));var o=n.coordinateSystem,s=Hd(o,t,n.get("scaleLimit"));n.setCenter&&n.setCenter(s.center),n.setZoom&&n.setZoom(s.zoom)})})}var HZ=function(r){V(t,r);function t(e,a,n){var i=r.call(this)||this;De(i).dataType="node",i.z2=2;var o=new Ue;return i.setTextContent(o),i.updateData(e,a,n,!0),i}return t.prototype.updateData=function(e,a,n,i){var o=this,s=e.graph.getNodeByIndex(a),l=e.hostModel,u=s.getModel(),c=u.getModel("emphasis"),f=e.getItemLayout(a),v=$(qa(u.getModel("itemStyle"),f,!0),f),h=this;if(isNaN(v.startAngle)){h.setShape(v);return}i?h.setShape(v):Ze(h,{shape:v},l,a);var d=$(qa(u.getModel("itemStyle"),f,!0),f);o.setShape(d),o.useStyle(e.getItemVisual(a,"style")),Vt(o,u),this._updateLabel(l,u,s),e.setItemGraphicEl(a,h),Vt(h,u,"itemStyle");var p=c.get("focus");ut(this,p==="adjacency"?s.getAdjacentDataIndices():p,c.get("blurScope"),c.get("disabled"))},t.prototype._updateLabel=function(e,a,n){var i=this.getTextContent(),o=n.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),c=a.getModel("label");i.ignore=!c.get("show");var f=zt(a),v=n.getVisual("style");$t(i,f,{labelFetcher:{getFormattedLabel:function(m,_,S,w,x,b){return e.getFormattedLabel(m,_,"node",w,Vr(x,f.normal&&f.normal.get("formatter"),a.get("name")),b)}},labelDataIndex:n.dataIndex,defaultText:n.dataIndex+"",inheritColor:v.fill,defaultOpacity:v.opacity,defaultOutsidePosition:"startArc"});var h=c.get("position")||"outside",d=c.get("distance")||0,p;h==="outside"?p=o.r+d:p=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var g=h!=="outside"?c.get("align")||"center":l>0?"left":"right",y=h!=="outside"?c.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*p+o.cx,y:u*p+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},t}(Sr);const sD=HZ;var $Z=function(r){V(t,r);function t(e,a,n,i){var o=r.call(this)||this;return De(o).dataType="edge",o.updateData(e,a,n,i,!0),o}return t.prototype.buildPath=function(e,a){e.moveTo(a.s1[0],a.s1[1]);var n=.7,i=a.clockwise;e.arc(a.cx,a.cy,a.r,a.sStartAngle,a.sEndAngle,!i),e.bezierCurveTo((a.cx-a.s2[0])*n+a.s2[0],(a.cy-a.s2[1])*n+a.s2[1],(a.cx-a.t1[0])*n+a.t1[0],(a.cy-a.t1[1])*n+a.t1[1],a.t1[0],a.t1[1]),e.arc(a.cx,a.cy,a.r,a.tStartAngle,a.tEndAngle,!i),e.bezierCurveTo((a.cx-a.t2[0])*n+a.t2[0],(a.cy-a.t2[1])*n+a.t2[1],(a.cx-a.s1[0])*n+a.s1[0],(a.cy-a.s1[1])*n+a.s1[1],a.s1[0],a.s1[1]),e.closePath()},t.prototype.updateData=function(e,a,n,i,o){var s=e.hostModel,l=a.graph.getEdgeByIndex(n),u=l.getLayout(),c=l.node1.getModel(),f=a.getItemModel(l.dataIndex),v=f.getModel("lineStyle"),h=f.getModel("emphasis"),d=h.get("focus"),p=$(qa(c.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(p.sStartAngle)||isNaN(p.tStartAngle)){g.setShape(p);return}o?(g.setShape(p),lD(g,l,e,v)):(ua(g),lD(g,l,e,v),Ze(g,{shape:p},s,n)),ut(this,d==="adjacency"?l.getAdjacentDataIndices():d,h.get("blurScope"),h.get("disabled")),Vt(g,f,"lineStyle"),a.setItemGraphicEl(l.dataIndex,g)},t}(Fe);function lD(r,t,e,a){var n=t.node1,i=t.node2,o=r.style;r.setStyle(a.getLineStyle());var s=a.get("color");switch(s){case"source":o.fill=e.getItemVisual(n.dataIndex,"style").fill,o.decal=n.getVisual("style").decal;break;case"target":o.fill=e.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=e.getItemVisual(n.dataIndex,"style").fill,u=e.getItemVisual(i.dataIndex,"style").fill;if(oe(l)&&oe(u)){var c=r.shape,f=(c.s1[0]+c.s2[0])/2,v=(c.s1[1]+c.s2[1])/2,h=(c.t1[0]+c.t2[0])/2,d=(c.t1[1]+c.t2[1])/2;o.fill=new Pl(f,v,h,d,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var WZ=Math.PI/180,YZ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){},t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group,l=-e.get("startAngle")*WZ;if(i.diff(o).add(function(c){var f=i.getItemLayout(c);if(f){var v=new sD(i,c,l);De(v).dataIndex=c,s.add(v)}}).update(function(c,f){var v=o.getItemGraphicEl(f),h=i.getItemLayout(c);if(!h){v&&An(v,e,f);return}v?v.updateData(i,c,l):v=new sD(i,c,l),s.add(v)}).remove(function(c){var f=o.getItemGraphicEl(c);f&&An(f,e,c)}).execute(),!o){var u=e.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=ne(u[0],n.getWidth()),this.group.originY=ne(u[1],n.getHeight()),lt(this.group,{scaleX:1,scaleY:1},e)}this._data=i,this.renderEdges(e,l)},t.prototype.renderEdges=function(e,a){var n=e.getData(),i=e.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new $Z(n,i,l,a);De(u).dataIndex=l,s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(n,i,l,a),s.add(c)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&An(u,e,l)}).execute(),this._edgeData=i},t.prototype.dispose=function(){},t.type="chord",t}(ot);const UZ=YZ;var ZZ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links),this.legendVisualProvider=new Hl(se(this.getData,this),se(this.getRawData,this))},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(e.edges||e.links)},t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[];if(i&&n){var o=dS(i,n,this,!0,s);return o.data}function s(l,u){var c=Xe.prototype.getModel;function f(h,d){var p=c.call(this,h,d);return p.resolveParentPath=v,p}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=v,h.getModel=f,h});function v(h){if(h&&(h[0]==="label"||h[1]==="label")){var d=h.slice();return h[0]==="label"?d[0]="edgeLabel":h[1]==="label"&&(d[1]="edgeLabel"),d}return h}}},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){var i=this.getDataParams(e,n);if(n==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(e),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Pt("nameValue",{name:c.join(" > "),value:i.value,noValue:i.value==null})}return Pt("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(a==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(e);if(n.name==null&&(n.name=i.getName(e)),n.value==null){var s=o.getLayout().value;n.value=s}}return n},t.type="series.chord",t.defaultOption={z:2,coordinateSystem:"none",legendHoverLink:!0,colorBy:"data",left:0,top:0,right:0,bottom:0,width:null,height:null,center:["50%","50%"],radius:["70%","80%"],clockwise:!0,startAngle:90,endAngle:"auto",minAngle:0,padAngle:3,itemStyle:{borderRadius:[0,0,5,5]},lineStyle:{width:0,color:"source",opacity:.2},label:{show:!0,position:"outside",distance:5},emphasis:{focus:"adjacency",lineStyle:{opacity:.5}}},t}(ft);const XZ=ZZ;var ay=Math.PI/180;function qZ(r,t){r.eachSeriesByType("chord",function(e){jZ(e,t)})}function jZ(r,t){var e=r.getData(),a=e.graph,n=r.getEdgeData(),i=n.count();if(i){var o=nP(r,t),s=o.cx,l=o.cy,u=o.r,c=o.r0,f=Math.max((r.get("padAngle")||0)*ay,0),v=Math.max((r.get("minAngle")||0)*ay,0),h=-r.get("startAngle")*ay,d=h+Math.PI*2,p=r.get("clockwise"),g=p?1:-1,y=[h,d];Sd(y,!p);var m=y[0],_=y[1],S=_-m,w=e.getSum("value")===0&&n.getSum("value")===0,x=[],b=0;a.eachEdge(function(k){var N=w?1:k.getValue("value");w&&(N>0||v)&&(b+=2);var B=k.node1.dataIndex,F=k.node2.dataIndex;x[B]=(x[B]||0)+N,x[F]=(x[F]||0)+N});var T=0;if(a.eachNode(function(k){var N=k.getValue("value");isNaN(N)||(x[k.dataIndex]=Math.max(N,x[k.dataIndex]||0)),!w&&(x[k.dataIndex]>0||v)&&b++,T+=x[k.dataIndex]||0}),!(b===0||T===0)){f*b>=Math.abs(S)&&(f=Math.max(0,(Math.abs(S)-v*b)/b)),(f+v)*b>=Math.abs(S)&&(v=(Math.abs(S)-f*b)/b);var C=(S-f*b*g)/T,D=0,M=0,L=0;a.eachNode(function(k){var N=x[k.dataIndex]||0,B=C*(T?N:1)*g;Math.abs(B)M){var P=D/M;a.eachNode(function(k){var N=k.getLayout().angle;Math.abs(N)>=v?k.setLayout({angle:N*P,ratio:P},!0):k.setLayout({angle:v,ratio:v===0?1:N/v},!0)})}else a.eachNode(function(k){if(!I){var N=k.getLayout().angle,B=Math.min(N/L,1),F=B*D;N-Fv&&v>0){var B=I?1:Math.min(N/L,1),F=N-v,H=Math.min(F,Math.min(R,D*B));R-=H,k.setLayout({angle:N-H,ratio:(N-H)/N},!0)}else v>0&&k.setLayout({angle:v,ratio:N===0?1:v/N},!0)}});var E=m,O=[];a.eachNode(function(k){var N=Math.max(k.getLayout().angle,v);k.setLayout({cx:s,cy:l,r0:c,r:u,startAngle:E,endAngle:E+N*g,clockwise:p},!0),O[k.dataIndex]=E,E+=(N+f)*g}),a.eachEdge(function(k){var N=w?1:k.getValue("value"),B=C*(T?N:1)*g,F=k.node1.dataIndex,H=O[F]||0,j=Math.abs((k.node1.getLayout().ratio||1)*B),ee=H+j*g,ce=[s+c*Math.cos(H),l+c*Math.sin(H)],Ae=[s+c*Math.cos(ee),l+c*Math.sin(ee)],Be=k.node2.dataIndex,he=O[Be]||0,fe=Math.abs((k.node2.getLayout().ratio||1)*B),U=he+fe*g,z=[s+c*Math.cos(he),l+c*Math.sin(he)],J=[s+c*Math.cos(U),l+c*Math.sin(U)];k.setLayout({s1:ce,s2:Ae,sStartAngle:H,sEndAngle:ee,t1:z,t2:J,tStartAngle:he,tEndAngle:U,cx:s,cy:l,r:c,value:N,clockwise:p}),O[F]=ee,O[Be]=U})}}}function KZ(r){r.registerChartView(UZ),r.registerSeriesModel(XZ),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,qZ),r.registerProcessor(Fl("chord"))}var JZ=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),QZ=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a.type="pointer",a}return t.prototype.getDefaultShape=function(){return new JZ},t.prototype.buildPath=function(e,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),c=a.y-i(l)*s*(s>=o/3?1:2);l=a.angle-Math.PI/2,e.moveTo(u,c),e.lineTo(a.x+n(l)*s,a.y+i(l)*s),e.lineTo(a.x+n(a.angle)*o,a.y+i(a.angle)*o),e.lineTo(a.x-n(l)*s,a.y-i(l)*s),e.lineTo(u,c)},t}(Fe);const eX=QZ;function tX(r,t){var e=r.get("center"),a=t.getWidth(),n=t.getHeight(),i=Math.min(a,n),o=ne(e[0],t.getWidth()),s=ne(e[1],t.getHeight()),l=ne(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function nv(r,t){var e=r==null?"":r+"";return t&&(oe(t)?e=t.replace("{value}",e):ye(t)&&(e=t(r))),e}var rX=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeAll();var i=e.get(["axisLine","lineStyle","color"]),o=tX(e,n);this._renderMain(e,a,n,i,o),this._data=e.getData()},t.prototype.dispose=function(){},t.prototype._renderMain=function(e,a,n,i,o){var s=this.group,l=e.get("clockwise"),u=-e.get("startAngle")/180*Math.PI,c=-e.get("endAngle")/180*Math.PI,f=e.getModel("axisLine"),v=f.get("roundCap"),h=v?Rh:Sr,d=f.get("show"),p=f.getModel("lineStyle"),g=p.get("width"),y=[u,c];Sd(y,!l),u=y[0],c=y[1];for(var m=c-u,_=u,S=[],w=0;d&&w=C&&(D===0?0:i[D-1][0])Math.PI/2&&(ee+=Math.PI)):j==="tangential"?ee=-T-Math.PI/2:$e(j)&&(ee=j*Math.PI/180),ee===0?f.add(new Ue({style:it(_,{text:N,x:F,y:H,verticalAlign:R<-.8?"top":R>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:B}),silent:!0})):f.add(new Ue({style:it(_,{text:N,x:F,y:H,verticalAlign:"middle",align:"center"},{inheritColor:B}),silent:!0,originX:F,originY:H,rotation:ee}))}if(m.get("show")&&E!==S){var O=m.get("distance");O=O?O+c:c;for(var ce=0;ce<=w;ce++){P=Math.cos(T),R=Math.sin(T);var Ae=new Bt({shape:{x1:P*(d-O)+v,y1:R*(d-O)+h,x2:P*(d-b-O)+v,y2:R*(d-b-O)+h},silent:!0,style:L});L.stroke==="auto"&&Ae.setStyle({stroke:i((E+ce/w)/S)}),f.add(Ae),T+=D}T-=D}else T+=C}},t.prototype._renderPointer=function(e,a,n,i,o,s,l,u,c){var f=this.group,v=this._data,h=this._progressEls,d=[],p=e.get(["pointer","show"]),g=e.getModel("progress"),y=g.get("show"),m=e.getData(),_=m.mapDimension("value"),S=+e.get("min"),w=+e.get("max"),x=[S,w],b=[s,l];function T(D,M){var L=m.getItemModel(D),I=L.getModel("pointer"),P=ne(I.get("width"),o.r),R=ne(I.get("length"),o.r),E=e.get(["pointer","icon"]),O=I.get("offsetCenter"),k=ne(O[0],o.r),N=ne(O[1],o.r),B=I.get("keepAspect"),F;return E?F=kt(E,k-P/2,N-R,P,R,null,B):F=new eX({shape:{angle:-Math.PI/2,width:P,r:R,x:k,y:N}}),F.rotation=-(M+Math.PI/2),F.x=o.cx,F.y=o.cy,F}function C(D,M){var L=g.get("roundCap"),I=L?Rh:Sr,P=g.get("overlap"),R=P?g.get("width"):c/m.count(),E=P?o.r-R:o.r-(D+1)*R,O=P?o.r:o.r-D*R,k=new I({shape:{startAngle:s,endAngle:M,cx:o.cx,cy:o.cy,clockwise:u,r0:E,r:O}});return P&&(k.z2=Je(m.get(_,D),[S,w],[100,0],!0)),k}(y||p)&&(m.diff(v).add(function(D){var M=m.get(_,D);if(p){var L=T(D,s);lt(L,{rotation:-((isNaN(+M)?b[0]:Je(M,x,b,!0))+Math.PI/2)},e),f.add(L),m.setItemGraphicEl(D,L)}if(y){var I=C(D,s),P=g.get("clip");lt(I,{shape:{endAngle:Je(M,x,b,P)}},e),f.add(I),Pm(e.seriesIndex,m.dataType,D,I),d[D]=I}}).update(function(D,M){var L=m.get(_,D);if(p){var I=v.getItemGraphicEl(M),P=I?I.rotation:s,R=T(D,P);R.rotation=P,Ze(R,{rotation:-((isNaN(+L)?b[0]:Je(L,x,b,!0))+Math.PI/2)},e),f.add(R),m.setItemGraphicEl(D,R)}if(y){var E=h[M],O=E?E.shape.endAngle:s,k=C(D,O),N=g.get("clip");Ze(k,{shape:{endAngle:Je(L,x,b,N)}},e),f.add(k),Pm(e.seriesIndex,m.dataType,D,k),d[D]=k}}).execute(),m.each(function(D){var M=m.getItemModel(D),L=M.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),R=L.get("disabled");if(p){var E=m.getItemGraphicEl(D),O=m.getItemVisual(D,"style"),k=O.fill;if(E instanceof rr){var N=E.style;E.useStyle($({image:N.image,x:N.x,y:N.y,width:N.width,height:N.height},O))}else E.useStyle(O),E.type!=="pointer"&&E.setColor(k);E.setStyle(M.getModel(["pointer","itemStyle"]).getItemStyle()),E.style.fill==="auto"&&E.setStyle("fill",i(Je(m.get(_,D),x,[0,1],!0))),E.z2EmphasisLift=0,Vt(E,M),ut(E,I,P,R)}if(y){var B=d[D];B.useStyle(m.getItemVisual(D,"style")),B.setStyle(M.getModel(["progress","itemStyle"]).getItemStyle()),B.z2EmphasisLift=0,Vt(B,M),ut(B,I,P,R)}}),this._progressEls=d)},t.prototype._renderAnchor=function(e,a){var n=e.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"),c=kt(s,a.cx-o/2+ne(l[0],a.r),a.cy-o/2+ne(l[1],a.r),o,o,null,u);c.z2=n.get("showAbove")?1:0,c.setStyle(n.getModel("itemStyle").getItemStyle()),this.group.add(c)}},t.prototype._renderTitleAndDetail=function(e,a,n,i,o){var s=this,l=e.getData(),u=l.mapDimension("value"),c=+e.get("min"),f=+e.get("max"),v=new _e,h=[],d=[],p=e.isAnimationEnabled(),g=e.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){h[y]=new Ue({silent:!0}),d[y]=new Ue({silent:!0})}).update(function(y,m){h[y]=s._titleEls[m],d[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new _e,w=i(Je(_,[c,f],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var b=x.get("offsetCenter"),T=o.cx+ne(b[0],o.r),C=o.cy+ne(b[1],o.r),D=h[y];D.attr({z2:g?0:2,style:it(x,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:w})}),S.add(D)}var M=m.getModel("detail");if(M.get("show")){var L=M.get("offsetCenter"),I=o.cx+ne(L[0],o.r),P=o.cy+ne(L[1],o.r),R=ne(M.get("width"),o.r),E=ne(M.get("height"),o.r),O=e.get(["progress","show"])?l.getItemVisual(y,"style").fill:w,D=d[y],k=M.get("formatter");D.attr({z2:g?0:2,style:it(M,{x:I,y:P,text:nv(_,k),width:isNaN(R)?null:R,height:isNaN(E)?null:E,align:"center",verticalAlign:"middle"},{inheritColor:O})}),BL(D,{normal:M},_,function(B){return nv(B,k)}),p&&VL(D,y,l,e,{getFormattedLabel:function(B,F,H,j,ee,ce){return nv(ce?ce.interpolatedValue:_,k)}}),S.add(D)}v.add(S)}),this.group.add(v),this._titleEls=h,this._detailEls=d},t.type="gauge",t}(ot);const aX=rX;var nX=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="itemStyle",e}return t.prototype.getInitialData=function(e,a){return Gl(this,["value"])},t.type="series.gauge",t.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,G.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:G.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:G.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:G.color.axisLabel,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:G.color.neutral00,borderWidth:0,borderColor:G.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:G.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:G.color.transparent,borderWidth:0,borderColor:G.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:G.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},t}(ft);const iX=nX;function oX(r){r.registerChartView(aX),r.registerSeriesModel(iX)}var sX=["itemStyle","opacity"],lX=function(r){V(t,r);function t(e,a){var n=r.call(this)||this,i=n,o=new fr,s=new Ue;return i.setTextContent(s),n.setTextGuideLine(o),n.updateData(e,a,!0),n}return t.prototype.updateData=function(e,a,n){var i=this,o=e.hostModel,s=e.getItemModel(a),l=e.getItemLayout(a),u=s.getModel("emphasis"),c=s.get(sX);c=c??1,n||ua(i),i.useStyle(e.getItemVisual(a,"style")),i.style.lineJoin="round",n?(i.setShape({points:l.points}),i.style.opacity=0,lt(i,{style:{opacity:c}},o,a)):Ze(i,{style:{opacity:c},shape:{points:l.points}},o,a),Vt(i,s),this._updateLabel(e,a),ut(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e,a){var n=this,i=this.getTextGuideLine(),o=n.getTextContent(),s=e.hostModel,l=e.getItemModel(a),u=e.getItemLayout(a),c=u.label,f=e.getItemVisual(a,"style"),v=f.fill;$t(o,zt(l),{labelFetcher:e.hostModel,labelDataIndex:a,defaultOpacity:f.opacity,defaultText:e.getName(a)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}});var h=l.getModel("label"),d=h.get("color"),p=d==="inherit"?v:null;n.setTextConfig({local:!0,inside:!!c.inside,insideStroke:p,outsideFill:p});var g=c.linePoints;i.setShape({points:g}),n.textGuideLineConfig={anchor:g?new we(g[0][0],g[0][1]):null},Ze(o,{style:{x:c.x,y:c.y}},s,a),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),G1(n,H1(l),{stroke:v})},t}(wr),uX=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreLabelLineUpdate=!0,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new lX(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(i,l),s.add(c),i.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);An(u,e,l)}).execute(),this._data=i},t.prototype.remove=function(){this.group.removeAll(),this._data=null},t.prototype.dispose=function(){},t.type="funnel",t}(ot);const cX=uX;var fX=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Hl(se(this.getData,this),se(this.getRawData,this)),this._defaultLabelLine(e)},t.prototype.getInitialData=function(e,a){return Gl(this,{coordDimensions:["value"],encodeDefaulter:Pe(_1,this)})},t.prototype._defaultLabelLine=function(e){Uo(e,"labelLine",["show"]);var a=e.labelLine,n=e.emphasis.labelLine;a.show=a.show&&e.label.show,n.show=n.show&&e.emphasis.label.show},t.prototype.getDataParams=function(e){var a=this.getData(),n=r.prototype.getDataParams.call(this,e),i=a.mapDimension("value"),o=a.getSum(i);return n.percent=o?+(a.get(i,e)/o*100).toFixed(2):0,n.$vars.push("percent"),n},t.type="series.funnel",t.defaultOption={coordinateSystemUsage:"box",z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:65,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:G.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:G.color.primary}}},t}(ft);const vX=fX;function hX(r,t){for(var e=r.mapDimension("value"),a=r.mapArray(e,function(l){return l}),n=[],i=t==="ascending",o=0,s=r.count();okX)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||!iy(this,"mousemove"))){var t=this._model,e=t.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),a=e.behavior;a==="jump"&&this._throttledDispatchExpand.debounceNextCall(t.get("axisExpandDebounce")),this._throttledDispatchExpand(a==="none"?null:{axisExpandWindow:e.axisExpandWindow,animation:a==="jump"?null:{duration:0}})}}};function iy(r,t){var e=r._model;return e.get("axisExpandable")&&e.get("axisExpandTriggerOn")===t}const OX=RX;var NX=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},t.prototype.mergeOption=function(e){var a=this.option;e&&Re(a,e,!0),this._initDimensions()},t.prototype.contains=function(e,a){var n=e.get("parallelIndex");return n!=null&&a.getComponent("parallel",n)===this},t.prototype.setAxisExpand=function(e){A(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(a){e.hasOwnProperty(a)&&(this.option[a]=e[a])},this)},t.prototype._initDimensions=function(){var e=this.dimensions=[],a=this.parallelAxisIndex=[],n=Qe(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);A(n,function(i){e.push("dim"+i.get("dim")),a.push(i.componentIndex)})},t.type="parallel",t.dependencies=["parallelAxis"],t.layoutMode="box",t.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},t}(We);const BX=NX;var VX=function(r){V(t,r);function t(e,a,n,i,o){var s=r.call(this,e,a,n)||this;return s.type=i||"value",s.axisIndex=o,s}return t.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},t}(Aa);const zX=VX;function ki(r,t,e,a,n,i){r=r||0;var o=e[1]-e[0];if(n!=null&&(n=zs(n,[0,o])),i!=null&&(i=Math.max(i,n??0)),a==="all"){var s=Math.abs(t[1]-t[0]);s=zs(s,[0,o]),n=i=zs(s,[n,i]),a=0}t[0]=zs(t[0],e),t[1]=zs(t[1],e);var l=oy(t,a);t[a]+=r;var u=n||0,c=e.slice();l.sign<0?c[0]+=u:c[1]-=u,t[a]=zs(t[a],c);var f;return f=oy(t,a),n!=null&&(f.sign!==l.sign||f.spani&&(t[1-a]=t[a]+f.sign*i),t}function oy(r,t){var e=r[t]-r[1-t];return{span:Math.abs(e),sign:e>0?-1:e<0?1:t?-1:1}}function zs(r,t){return Math.min(t[1]!=null?t[1]:1/0,Math.max(t[0]!=null?t[0]:-1/0,r))}var sy=A,HE=Math.min,$E=Math.max,fD=Math.floor,FX=Math.ceil,vD=At,GX=Math.PI,HX=function(){function r(t,e,a){this.type="parallel",this._axesMap=ve(),this._axesLayout={},this.dimensions=t.dimensions,this._model=t,this._init(t,e,a)}return r.prototype._init=function(t,e,a){var n=t.dimensions,i=t.parallelAxisIndex;sy(n,function(o,s){var l=i[s],u=e.getComponent("parallelAxis",l),c=this._axesMap.set(o,new zX(o,Bd(u),[0,0],u.get("type"),l)),f=c.type==="category";c.onBand=f&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(t,e){this._updateAxesFromSeries(this._model,t)},r.prototype.containPoint=function(t){var e=this._makeLayoutInfo(),a=e.axisBase,n=e.layoutBase,i=e.pixelDimIndex,o=t[1-i],s=t[i];return o>=a&&o<=a+e.axisLength&&s>=n&&s<=n+e.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(t,e){e.eachSeries(function(a){if(t.contains(a,e)){var n=a.getData();sy(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(n,n.mapDimension(i)),yl(o.scale,o.model)},this)}},this)},r.prototype.resize=function(t,e){var a=Ft(t,e).refContainer;this._rect=ct(t.getBoxLayoutParams(),a),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var t=this._model,e=this._rect,a=["x","y"],n=["width","height"],i=t.get("layout"),o=i==="horizontal"?0:1,s=e[n[o]],l=[0,s],u=this.dimensions.length,c=iv(t.get("axisExpandWidth"),l),f=iv(t.get("axisExpandCount")||0,[0,u]),v=t.get("axisExpandable")&&u>3&&u>f&&f>1&&c>0&&s>0,h=t.get("axisExpandWindow"),d;if(h)d=iv(h[1]-h[0],l),h[1]=h[0]+d;else{d=iv(c*(f-1),l);var p=t.get("axisExpandCenter")||fD(u/2);h=[c*p-d/2],h[1]=h[0]+d}var g=(s-d)/(u-f);g<3&&(g=0);var y=[fD(vD(h[0]/c,1))+1,FX(vD(h[1]/c,1))-1],m=g/c*h[0];return{layout:i,pixelDimIndex:o,layoutBase:e[a[o]],layoutLength:s,axisBase:e[a[1-o]],axisLength:e[n[1-o]],axisExpandable:v,axisExpandWidth:c,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var t=this._rect,e=this._axesMap,a=this.dimensions,n=this._makeLayoutInfo(),i=n.layout;e.each(function(o){var s=[0,n.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),sy(a,function(o,s){var l=(n.axisExpandable?WX:$X)(s,n),u={horizontal:{x:l.position,y:n.axisLength},vertical:{x:0,y:l.position}},c={horizontal:GX/2,vertical:0},f=[u[i].x+t.x,u[i].y+t.y],v=c[i],h=Xt();Ni(h,h,v),tn(h,h,f),this._axesLayout[o]={position:f,rotation:v,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(t){return this._axesMap.get(t)},r.prototype.dataToPoint=function(t,e){return this.axisCoordToPoint(this._axesMap.get(e).dataToCoord(t),e)},r.prototype.eachActiveState=function(t,e,a,n){a==null&&(a=0),n==null&&(n=t.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];A(o,function(g){s.push(t.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),c=a;ci*(1-f[0])?(u="jump",l=s-i*(1-f[2])):(l=s-i*f[1])>=0&&(l=s-i*(1-f[1]))<=0&&(l=0),l*=e.axisExpandWidth/c,l?ki(l,n,o,"all"):u="none";else{var h=n[1]-n[0],d=o[1]*s/h;n=[$E(0,d-h/2)],n[1]=HE(o[1],n[0]+h),n[0]=n[1]-h}return{axisExpandWindow:n,behavior:u}},r}();function iv(r,t){return HE($E(r,t[0]),t[1])}function $X(r,t){var e=t.layoutLength/(t.axisCount-1);return{position:e*r,axisNameAvailableWidth:e,axisLabelShow:!0}}function WX(r,t){var e=t.layoutLength,a=t.axisExpandWidth,n=t.axisCount,i=t.axisCollapseWidth,o=t.winInnerIndices,s,l=i,u=!1,c;return r=0;n--)oa(a[n])},t.prototype.getActiveState=function(e){var a=this.activeIntervals;if(!a.length)return"normal";if(e==null||isNaN(+e))return"inactive";if(a.length===1){var n=a[0];if(n[0]<=e&&e<=n[1])return"active"}else for(var i=0,o=a.length;iKX}function jE(r){var t=r.length-1;return t<0&&(t=0),[r[0],r[t]]}function KE(r,t,e,a){var n=new _e;return n.add(new Ve({name:"main",style:mS(e),silent:!0,draggable:!0,cursor:"move",drift:Pe(gD,r,t,n,["n","s","w","e"]),ondragend:Pe(es,t,{isEnd:!0})})),A(a,function(i){n.add(new Ve({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Pe(gD,r,t,n,i),ondragend:Pe(es,t,{isEnd:!0})}))}),n}function JE(r,t,e,a){var n=a.brushStyle.lineWidth||0,i=xl(n,JX),o=e[0][0],s=e[1][0],l=o-n/2,u=s-n/2,c=e[0][1],f=e[1][1],v=c-i+n/2,h=f-i+n/2,d=c-o,p=f-s,g=d+n,y=p+n;yn(r,t,"main",o,s,d,p),a.transformable&&(yn(r,t,"w",l,u,i,y),yn(r,t,"e",v,u,i,y),yn(r,t,"n",l,u,g,i),yn(r,t,"s",l,h,g,i),yn(r,t,"nw",l,u,i,i),yn(r,t,"ne",v,u,i,i),yn(r,t,"sw",l,h,i,i),yn(r,t,"se",v,h,i,i))}function N0(r,t){var e=t.__brushOption,a=e.transformable,n=t.childAt(0);n.useStyle(mS(e)),n.attr({silent:!a,cursor:a?"move":"default"}),A([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=t.childOfName(i.join("")),s=i.length===1?B0(r,i[0]):iq(r,i);o&&o.attr({silent:!a,invisible:!a,cursor:a?eq[s]+"-resize":null})})}function yn(r,t,e,a,n,i,o){var s=t.childOfName(e);s&&s.setShape(sq(_S(r,t,[[a,n],[a+i,n+o]])))}function mS(r){return xe({strokeNoScale:!0},r.brushStyle)}function QE(r,t,e,a){var n=[Ac(r,e),Ac(t,a)],i=[xl(r,e),xl(t,a)];return[[n[0],i[0]],[n[1],i[1]]]}function nq(r){return Go(r.group)}function B0(r,t){var e={w:"left",e:"right",n:"top",s:"bottom"},a={left:"w",right:"e",top:"n",bottom:"s"},n=Md(e[t],nq(r));return a[n]}function iq(r,t){var e=[B0(r,t[0]),B0(r,t[1])];return(e[0]==="e"||e[0]==="w")&&e.reverse(),e.join("")}function gD(r,t,e,a,n,i){var o=e.__brushOption,s=r.toRectRange(o.range),l=eO(t,n,i);A(a,function(u){var c=QX[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(QE(s[0][0],s[1][0],s[0][1],s[1][1])),pS(t,e),es(t,{isEnd:!1})}function oq(r,t,e,a){var n=t.__brushOption.range,i=eO(r,e,a);A(n,function(o){o[0]+=i[0],o[1]+=i[1]}),pS(r,t),es(r,{isEnd:!1})}function eO(r,t,e){var a=r.group,n=a.transformCoordToLocal(t,e),i=a.transformCoordToLocal(0,0);return[n[0]-i[0],n[1]-i[1]]}function _S(r,t,e){var a=qE(r,t);return a&&a!==Qo?a.clipPath(e,r._transform):me(e)}function sq(r){var t=Ac(r[0][0],r[1][0]),e=Ac(r[0][1],r[1][1]),a=xl(r[0][0],r[1][0]),n=xl(r[0][1],r[1][1]);return{x:t,y:e,width:a-t,height:n-e}}function lq(r,t,e){if(!(!r._brushType||cq(r,t.offsetX,t.offsetY))){var a=r._zr,n=r._covers,i=yS(r,t,e);if(!r._dragging)for(var o=0;oa.getWidth()||e<0||e>a.getHeight()}var Ud={lineX:_D(0),lineY:_D(1),rect:{createCover:function(r,t){function e(a){return a}return KE({toRectRange:e,fromRectRange:e},r,t,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var t=jE(r);return QE(t[1][0],t[1][1],t[0][0],t[0][1])},updateCoverShape:function(r,t,e,a){JE(r,t,e,a)},updateCommon:N0,contain:z0},polygon:{createCover:function(r,t){var e=new _e;return e.add(new fr({name:"main",style:mS(t),silent:!0})),e},getCreatingRange:function(r){return r},endCreating:function(r,t){t.remove(t.childAt(0)),t.add(new wr({name:"main",draggable:!0,drift:Pe(oq,r,t),ondragend:Pe(es,r,{isEnd:!0})}))},updateCoverShape:function(r,t,e,a){t.childAt(0).setShape({points:_S(r,t,e)})},updateCommon:N0,contain:z0}};function _D(r){return{createCover:function(t,e){return KE({toRectRange:function(a){var n=[a,[0,100]];return r&&n.reverse(),n},fromRectRange:function(a){return a[r]}},t,e,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(t){var e=jE(t),a=Ac(e[0][r],e[1][r]),n=xl(e[0][r],e[1][r]);return[a,n]},updateCoverShape:function(t,e,a,n){var i,o=qE(t,e);if(o!==Qo&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=t._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[a,i];r&&l.reverse(),JE(t,e,l,n)},updateCommon:N0,contain:z0}}const SS=rq;function rO(r){return r=wS(r),function(t){return kL(t,r)}}function aO(r,t){return r=wS(r),function(e){var a=t??e,n=a?r.width:r.height,i=a?r.x:r.y;return[i,i+(n||0)]}}function nO(r,t,e){var a=wS(r);return function(n,i){return a.contain(i[0],i[1])&&!sE(n,t,e)}}function wS(r){return Ce.create(r)}var fq=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){r.prototype.init.apply(this,arguments),(this._brushController=new SS(a.getZr())).on("brush",se(this._onBrush,this))},t.prototype.render=function(e,a,n,i){if(!vq(e,a,i)){this.axisModel=e,this.api=n,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new _e,this.group.add(this._axisGroup),!!e.get("show")){var s=dq(e,a),l=s.coordinateSystem,u=e.getAreaSelectStyle(),c=u.width,f=e.axis.dim,v=l.getAxisLayout(f),h=$({strokeContainThreshold:c},v),d=new Vn(e,n,h);d.build(),this._axisGroup.add(d.group),this._refreshBrushController(h,u,e,s,c,n),Nc(o,this._axisGroup,e)}}},t.prototype._refreshBrushController=function(e,a,n,i,o,s){var l=n.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),f=Ce.create({x:l[0],y:-o/2,width:u,height:o});f.x-=c,f.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:e.rotation,x:e.position[0],y:e.position[1]}).setPanels([{panelId:"pl",clipPath:rO(f),isTargetByCursor:nO(f,s,i),getLinearBrushOtherExtent:aO(f,0)}]).enableBrush({brushType:"lineX",brushStyle:a,removeOnClick:!0}).updateCovers(hq(n))},t.prototype._onBrush=function(e){var a=e.areas,n=this.axisModel,i=n.axis,o=X(a,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!n.option.realtime===e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:n.id,intervals:o})},t.prototype.dispose=function(){this._brushController.dispose()},t.type="parallelAxis",t}(pt);function vq(r,t,e){return e&&e.type==="axisAreaSelect"&&t.findComponents({mainType:"parallelAxis",query:e})[0]===r}function hq(r){var t=r.axis;return X(r.activeIntervals,function(e){return{brushType:"lineX",panelId:"pl",range:[t.dataToCoord(e[0],!0),t.dataToCoord(e[1],!0)]}})}function dq(r,t){return t.getComponent("parallel",r.get("parallelIndex"))}const pq=fq;var gq={type:"axisAreaSelect",event:"axisAreaSelected"};function yq(r){r.registerAction(gq,function(t,e){e.eachComponent({mainType:"parallelAxis",query:t},function(a){a.axis.model.setActiveIntervals(t.intervals)})}),r.registerAction("parallelAxisExpand",function(t,e){e.eachComponent({mainType:"parallel",query:t},function(a){a.setAxisExpand(t)})})}var mq={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function iO(r){r.registerComponentView(OX),r.registerComponentModel(BX),r.registerCoordinateSystem("parallel",XX),r.registerPreprocessor(IX),r.registerComponentModel(hD),r.registerComponentView(pq),Sl(r,"parallel",hD,mq),yq(r)}function _q(r){Oe(iO),r.registerChartView(wX),r.registerSeriesModel(TX),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,AX)}var Sq=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}(),wq=function(r){V(t,r);function t(e){return r.call(this,e)||this}return t.prototype.getDefaultShape=function(){return new Sq},t.prototype.buildPath=function(e,a){var n=a.extent;e.moveTo(a.x1,a.y1),e.bezierCurveTo(a.cpx1,a.cpy1,a.cpx2,a.cpy2,a.x2,a.y2),a.orient==="vertical"?(e.lineTo(a.x2+n,a.y2),e.bezierCurveTo(a.cpx2+n,a.cpy2,a.cpx1+n,a.cpy1,a.x1+n,a.y1)):(e.lineTo(a.x2,a.y2+n),e.bezierCurveTo(a.cpx2,a.cpy2+n,a.cpx1,a.cpy1+n,a.x1,a.y1+n)),e.closePath()},t.prototype.highlight=function(){On(this)},t.prototype.downplay=function(){Nn(this)},t}(Fe),xq=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._mainGroup=new _e,e._focusAdjacencyDisabled=!1,e}return t.prototype.init=function(e,a){this._controller=new ds(a.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},t.prototype.render=function(e,a,n){var i=this,o=e.getGraph(),s=this._mainGroup,l=e.layoutInfo,u=l.width,c=l.height,f=e.getData(),v=e.getData("edge"),h=e.get("orient");this._model=e,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(e,n),lE(e,n,s,this._controller,this._controllerHost,null),o.eachEdge(function(d){var p=new wq,g=De(p);g.dataIndex=d.dataIndex,g.seriesIndex=e.seriesIndex,g.dataType="edge";var y=d.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=d.node1.getLayout(),w=d.node1.getModel(),x=w.get("localX"),b=w.get("localY"),T=d.node2.getLayout(),C=d.node2.getModel(),D=C.get("localX"),M=C.get("localY"),L=d.getLayout(),I,P,R,E,O,k,N,B;p.shape.extent=Math.max(1,L.dy),p.shape.orient=h,h==="vertical"?(I=(x!=null?x*u:S.x)+L.sy,P=(b!=null?b*c:S.y)+S.dy,R=(D!=null?D*u:T.x)+L.ty,E=M!=null?M*c:T.y,O=I,k=P*(1-_)+E*_,N=R,B=P*_+E*(1-_)):(I=(x!=null?x*u:S.x)+S.dx,P=(b!=null?b*c:S.y)+L.sy,R=D!=null?D*u:T.x,E=(M!=null?M*c:T.y)+L.ty,O=I*(1-_)+R*_,k=P,N=I*_+R*(1-_),B=E),p.setShape({x1:I,y1:P,x2:R,y2:E,cpx1:O,cpy1:k,cpx2:N,cpy2:B}),p.useStyle(m.getItemStyle()),SD(p.style,h,d);var F=""+y.get("value"),H=zt(y,"edgeLabel");$t(p,H,{labelFetcher:{getFormattedLabel:function(ce,Ae,Be,he,fe,U){return e.getFormattedLabel(ce,Ae,"edge",he,Vr(fe,H.normal&&H.normal.get("formatter"),F),U)}},labelDataIndex:d.dataIndex,defaultText:F}),p.setTextConfig({position:"inside"});var j=y.getModel("emphasis");Vt(p,y,"lineStyle",function(ce){var Ae=ce.getItemStyle();return SD(Ae,h,d),Ae}),s.add(p),v.setItemGraphicEl(d.dataIndex,p);var ee=j.get("focus");ut(p,ee==="adjacency"?d.getAdjacentDataIndices():ee==="trajectory"?d.getTrajectoryDataIndices():ee,j.get("blurScope"),j.get("disabled"))}),o.eachNode(function(d){var p=d.getLayout(),g=d.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,w=new Ve({shape:{x:y!=null?y*u:p.x,y:m!=null?m*c:p.y,width:p.dx,height:p.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});$t(w,zt(g),{labelFetcher:{getFormattedLabel:function(b,T){return e.getFormattedLabel(b,T,"node")}},labelDataIndex:d.dataIndex,defaultText:d.id}),w.disableLabelAnimation=!0,w.setStyle("fill",d.getVisual("color")),w.setStyle("decal",d.getVisual("style").decal),Vt(w,g),s.add(w),f.setItemGraphicEl(d.dataIndex,w),De(w).dataType="node";var x=_.get("focus");ut(w,x==="adjacency"?d.getAdjacentDataIndices():x==="trajectory"?d.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),f.eachItemGraphicEl(function(d,p){var g=f.getItemModel(p);g.get("draggable")&&(d.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),n.dispatchAction({type:"dragNode",seriesId:e.id,dataIndex:f.getRawIndex(p),localX:this.shape.x/u,localY:this.shape.y/c})},d.ondragend=function(){i._focusAdjacencyDisabled=!1},d.draggable=!0,d.cursor="move")}),!this._data&&e.isAnimationEnabled()&&s.setClipPath(bq(s.getBoundingRect(),e,function(){s.removeClipPath()})),this._data=e.getData()},t.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},t.prototype._updateViewCoordSys=function(e,a){var n=e.layoutInfo,i=n.width,o=n.height,s=e.coordinateSystem=new ps(null,{api:a,ecModel:e.ecModel});s.zoomLimit=e.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(e.get("center")),s.setZoom(e.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},t.type="sankey",t}(ot);function SD(r,t,e){switch(r.fill){case"source":r.fill=e.node1.getVisual("color"),r.decal=e.node1.getVisual("style").decal;break;case"target":r.fill=e.node2.getVisual("color"),r.decal=e.node2.getVisual("style").decal;break;case"gradient":var a=e.node1.getVisual("color"),n=e.node2.getVisual("color");oe(a)&&oe(n)&&(r.fill=new Pl(0,0,+(t==="horizontal"),+(t==="vertical"),[{color:a,offset:0},{color:n,offset:1}]))}}function bq(r,t,e){var a=new Ve({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return lt(a,{shape:{width:r.width+20}},t,e),a}const Cq=xq;var Tq=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){var n=e.edges||e.links||[],i=e.data||e.nodes||[],o=e.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new Xe(o[l],this,a));var u=dS(i,n,this,!0,c);return u.data;function c(f,v){f.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getData().getItemLayout(d);if(g){var y=g.depth,m=p.levelModels[y];m&&(h.parentModel=m)}return h}),v.wrapMethod("getItemModel",function(h,d){var p=h.parentModel,g=p.getGraph().getEdgeByIndex(d),y=g.node1.getLayout();if(y){var m=y.depth,_=p.levelModels[m];_&&(h.parentModel=_)}return h})}},t.prototype.setNodePosition=function(e,a){var n=this.option.data||this.option.nodes,i=n[e];i.localX=a[0],i.localY=a[1]},t.prototype.setCenter=function(e){this.option.center=e},t.prototype.setZoom=function(e){this.option.zoom=e},t.prototype.getGraph=function(){return this.getData().graph},t.prototype.getEdgeData=function(){return this.getGraph().edgeData},t.prototype.formatTooltip=function(e,a,n){function i(h){return isNaN(h)||h==null}if(n==="edge"){var o=this.getDataParams(e,n),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Pt("nameValue",{name:u,value:l,noValue:i(l)})}else{var c=this.getGraph().getNodeByIndex(e),f=c.getLayout().value,v=this.getDataParams(e,n).data.name;return Pt("nameValue",{name:v!=null?v+"":null,value:f,noValue:i(f)})}},t.prototype.optionUpdated=function(){},t.prototype.getDataParams=function(e,a){var n=r.prototype.getDataParams.call(this,e,a);if(n.value==null&&a==="node"){var i=this.getGraph().getNodeByIndex(e),o=i.getLayout().value;n.value=o}return n},t.type="series.sankey",t.layoutMode="box",t.defaultOption={z:2,coordinateSystemUsage:"box",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,roam:!1,roamTrigger:"global",center:null,zoom:1,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:G.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:G.color.primary}},animationEasing:"linear",animationDuration:1e3},t}(ft);const Dq=Tq;function Mq(r,t){r.eachSeriesByType("sankey",function(e){var a=e.get("nodeWidth"),n=e.get("nodeGap"),i=Ft(e,t).refContainer,o=ct(e.getBoxLayoutParams(),i);e.layoutInfo=o;var s=o.width,l=o.height,u=e.getGraph(),c=u.nodes,f=u.edges;Iq(c);var v=Qe(c,function(g){return g.getLayout().value===0}),h=v.length!==0?0:e.get("layoutIterations"),d=e.get("orient"),p=e.get("nodeAlign");Aq(c,f,a,n,s,l,h,d,p)})}function Aq(r,t,e,a,n,i,o,s,l){Lq(r,t,e,n,i,s,l),Eq(r,t,i,n,a,o,s),$q(r,s)}function Iq(r){A(r,function(t){var e=Di(t.outEdges,Gh),a=Di(t.inEdges,Gh),n=t.getValue()||0,i=Math.max(e,a,n);t.setLayout({value:i},!0)})}function Lq(r,t,e,a,n,i,o){for(var s=[],l=[],u=[],c=[],f=0,v=0;v=0;y&&g.depth>h&&(h=g.depth),p.setLayout({depth:y?g.depth:f},!0),i==="vertical"?p.setLayout({dy:e},!0):p.setLayout({dx:e},!0);for(var m=0;mf-1?h:f-1;o&&o!=="left"&&Pq(r,o,i,b);var T=i==="vertical"?(n-e)/b:(a-e)/b;Rq(r,T,i)}function oO(r){var t=r.hostGraph.data.getRawDataItem(r.dataIndex);return t.depth!=null&&t.depth>=0}function Pq(r,t,e,a){if(t==="right"){for(var n=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,Bq(s,l,o),ly(s,n,e,a,o),Hq(s,l,o),ly(s,n,e,a,o)}function Oq(r,t){var e=[],a=t==="vertical"?"y":"x",n=Dm(r,function(i){return i.getLayout()[a]});return n.keys.sort(function(i,o){return i-o}),A(n.keys,function(i){e.push(n.buckets.get(i))}),e}function Nq(r,t,e,a,n,i){var o=1/0;A(r,function(s){var l=s.length,u=0;A(s,function(f){u+=f.getLayout().value});var c=i==="vertical"?(a-(l-1)*n)/u:(e-(l-1)*n)/u;c0&&(s=l.getLayout()[i]+u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]+l.getLayout()[v]+t;var d=n==="vertical"?a:e;if(u=c-t-d,u>0){s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var h=f-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[v]+t-c,u>0&&(s=l.getLayout()[i]-u,n==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[i]}})}function Bq(r,t,e){A(r.slice().reverse(),function(a){A(a,function(n){if(n.outEdges.length){var i=Di(n.outEdges,Vq,e)/Di(n.outEdges,Gh);if(isNaN(i)){var o=n.outEdges.length;i=o?Di(n.outEdges,zq,e)/o:0}if(e==="vertical"){var s=n.getLayout().x+(i-Ri(n,e))*t;n.setLayout({x:s},!0)}else{var l=n.getLayout().y+(i-Ri(n,e))*t;n.setLayout({y:l},!0)}}})})}function Vq(r,t){return Ri(r.node2,t)*r.getValue()}function zq(r,t){return Ri(r.node2,t)}function Fq(r,t){return Ri(r.node1,t)*r.getValue()}function Gq(r,t){return Ri(r.node1,t)}function Ri(r,t){return t==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function Gh(r){return r.getValue()}function Di(r,t,e){for(var a=0,n=r.length,i=-1;++io&&(o=l)}),A(a,function(s){var l=new tr({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:t.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}n.length&&A(n,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function Yq(r){r.registerChartView(Cq),r.registerSeriesModel(Dq),r.registerLayout(Mq),r.registerVisual(Wq),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(t,e){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(a){a.setNodePosition(t.dataIndex,[t.localX,t.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(t,e,a){e.eachComponent({mainType:"series",subType:"sankey",query:t},function(n){var i=n.coordinateSystem,o=Hd(i,t,n.get("scaleLimit"));n.setCenter(o.center),n.setZoom(o.zoom)})})}var sO=function(){function r(){}return r.prototype._hasEncodeRule=function(t){var e=this.getEncode();return e&&e.get(t)!=null},r.prototype.getInitialData=function(t,e){var a,n=e.getComponent("xAxis",this.get("xAxisIndex")),i=e.getComponent("yAxis",this.get("yAxisIndex")),o=n.get("type"),s=i.get("type"),l;o==="category"?(t.layout="horizontal",a=n.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(t.layout="vertical",a=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):t.layout=t.layout||"horizontal";var u=["x","y"],c=t.layout==="horizontal"?0:1,f=this._baseAxisDim=u[c],v=u[1-c],h=[n,i],d=h[c].get("type"),p=h[1-c].get("type"),g=t.data;if(g&&l){var y=[];A(g,function(S,w){var x;Z(S)?(x=S.slice(),S.unshift(w)):Z(S.value)?(x=$({},S),x.value=x.value.slice(),S.value.unshift(w)):x=S,y.push(x)}),t.data=y}var m=this.defaultValueDimensions,_=[{name:f,type:bh(d),ordinalMeta:a,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:bh(p),dimsDef:m.slice()}];return Gl(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:Pe(vP,_,this)})},r.prototype.getBaseAxis=function(){var t=this._baseAxisDim;return this.ecModel.getComponent(t+"Axis",this.get(t+"AxisIndex")).axis},r}(),lO=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],e.visualDrawType="stroke",e}return t.type="series.boxplot",t.dependencies=["xAxis","yAxis","grid"],t.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:G.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:G.color.shadow}},animationDuration:800},t}(ft);Rt(lO,sO,!0);const Uq=lO;var Zq=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=e.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var c=i.getItemLayout(u),f=wD(c,i,u,l,!0);i.setItemGraphicEl(u,f),o.add(f)}}).update(function(u,c){var f=s.getItemGraphicEl(c);if(!i.hasValue(u)){o.remove(f);return}var v=i.getItemLayout(u);f?(ua(f),uO(v,f,i,u)):f=wD(v,i,u,l),o.add(f),i.setItemGraphicEl(u,f)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=i},t.prototype.remove=function(e){var a=this.group,n=this._data;this._data=null,n&&n.eachItemGraphicEl(function(i){i&&a.remove(i)})},t.type="boxplot",t}(ot),Xq=function(){function r(){}return r}(),qq=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a.type="boxplotBoxPath",a}return t.prototype.getDefaultShape=function(){return new Xq},t.prototype.buildPath=function(e,a){var n=a.points,i=0;for(e.moveTo(n[i][0],n[i][1]),i++;i<4;i++)e.lineTo(n[i][0],n[i][1]);for(e.closePath();ip){var S=[y,_];a.push(S)}}}return{boxData:e,outliers:a}}var aj={type:"echarts:boxplot",transform:function(t){var e=t.upstream;if(e.sourceFormat!==qt){var a="";je(a)}var n=rj(e.getRawData(),t.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:n.boxData},{data:n.outliers}]}};function nj(r){r.registerSeriesModel(Uq),r.registerChartView(Kq),r.registerLayout(Jq),r.registerTransform(aj)}var ij=["itemStyle","borderColor"],oj=["itemStyle","borderColor0"],sj=["itemStyle","borderColorDoji"],lj=["itemStyle","color"],uj=["itemStyle","color0"];function xS(r,t){return t.get(r>0?lj:uj)}function bS(r,t){return t.get(r===0?sj:r>0?ij:oj)}var cj={seriesType:"candlestick",plan:Nl(),performRawSeries:!0,reset:function(r,t){if(!t.isSeriesFiltered(r)){var e=r.pipelineContext.large;return!e&&{progress:function(a,n){for(var i;(i=a.next())!=null;){var o=n.getItemModel(i),s=n.getItemLayout(i).sign,l=o.getItemStyle();l.fill=xS(s,o),l.stroke=bS(s,o)||l.fill;var u=n.ensureUniqueItemVisual(i,"style");$(u,l)}}}}}};const fj=cj;var vj=["color","borderColor"],hj=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(e),this._isLargeDraw?this._renderLarge(e):this._renderNormal(e)},t.prototype.incrementalPrepareRender=function(e,a,n){this._clear(),this._updateDrawMode(e)},t.prototype.incrementalRender=function(e,a,n,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(e,a):this._incrementalRenderNormal(e,a)},t.prototype.eachRendered=function(e){Vi(this._progressiveEls||this.group,e)},t.prototype._updateDrawMode=function(e){var a=e.pipelineContext.large;(this._isLargeDraw==null||a!==this._isLargeDraw)&&(this._isLargeDraw=a,this._clear())},t.prototype._renderNormal=function(e){var a=e.getData(),n=this._data,i=this.group,o=a.getLayout("isSimpleBox"),s=e.get("clip",!0),l=e.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),a.diff(n).add(function(c){if(a.hasValue(c)){var f=a.getItemLayout(c);if(s&&xD(u,f))return;var v=uy(f,c,!0);lt(v,{shape:{points:f.ends}},e,c),cy(v,a,c,o),i.add(v),a.setItemGraphicEl(c,v)}}).update(function(c,f){var v=n.getItemGraphicEl(f);if(!a.hasValue(c)){i.remove(v);return}var h=a.getItemLayout(c);if(s&&xD(u,h)){i.remove(v);return}v?(Ze(v,{shape:{points:h.ends}},e,c),ua(v)):v=uy(h),cy(v,a,c,o),i.add(v),a.setItemGraphicEl(c,v)}).remove(function(c){var f=n.getItemGraphicEl(c);f&&i.remove(f)}).execute(),this._data=a},t.prototype._renderLarge=function(e){this._clear(),bD(e,this.group);var a=e.get("clip",!0)?Uc(e.coordinateSystem,!1,e):null;a?this.group.setClipPath(a):this.group.removeClipPath()},t.prototype._incrementalRenderNormal=function(e,a){for(var n=a.getData(),i=n.getLayout("isSimpleBox"),o;(o=e.next())!=null;){var s=n.getItemLayout(o),l=uy(s);cy(l,n,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},t.prototype._incrementalRenderLarge=function(e,a){bD(a,this.group,this._progressiveEls,!0)},t.prototype.remove=function(e){this._clear()},t.prototype._clear=function(){this.group.removeAll(),this._data=null},t.type="candlestick",t}(ot),dj=function(){function r(){}return r}(),pj=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a.type="normalCandlestickBox",a}return t.prototype.getDefaultShape=function(){return new dj},t.prototype.buildPath=function(e,a){var n=a.points;this.__simpleBox?(e.moveTo(n[4][0],n[4][1]),e.lineTo(n[6][0],n[6][1])):(e.moveTo(n[0][0],n[0][1]),e.lineTo(n[1][0],n[1][1]),e.lineTo(n[2][0],n[2][1]),e.lineTo(n[3][0],n[3][1]),e.closePath(),e.moveTo(n[4][0],n[4][1]),e.lineTo(n[5][0],n[5][1]),e.moveTo(n[6][0],n[6][1]),e.lineTo(n[7][0],n[7][1]))},t}(Fe);function uy(r,t,e){var a=r.ends;return new pj({shape:{points:e?gj(a,r):a},z2:100})}function xD(r,t){for(var e=!0,a=0;aw?M[i]:D[i],ends:P,brushRect:N(x,b,_)})}function O(F,H){var j=[];return j[n]=H,j[i]=F,isNaN(H)||isNaN(F)?[NaN,NaN]:t.dataToPoint(j)}function k(F,H,j){var ee=H.slice(),ce=H.slice();ee[n]=Nv(ee[n]+a/2,1,!1),ce[n]=Nv(ce[n]-a/2,1,!0),j?F.push(ee,ce):F.push(ce,ee)}function N(F,H,j){var ee=O(F,j),ce=O(H,j);return ee[n]-=a/2,ce[n]-=a/2,{x:ee[0],y:ee[1],width:a,height:ce[1]-ee[1]}}function B(F){return F[n]=Nv(F[n],1),F}}function d(p,g){for(var y=Za(p.count*4),m=0,_,S=[],w=[],x,b=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=p.next())!=null;){var C=b.get(s,x),D=b.get(u,x),M=b.get(c,x),L=b.get(f,x),I=b.get(v,x);if(isNaN(C)||isNaN(L)||isNaN(I)){y[m++]=NaN,m+=3;continue}y[m++]=CD(b,x,D,M,c,T),S[n]=C,S[i]=L,_=t.dataToPoint(S,null,w),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=I,_=t.dataToPoint(S,null,w),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function CD(r,t,e,a,n,i){var o;return e>a?o=-1:e0?r.get(n,t-1)<=a?1:-1:1,o}function xj(r,t){var e=r.getBaseAxis(),a,n=e.type==="category"?e.getBandWidth():(a=e.getExtent(),Math.abs(a[1]-a[0])/t.count()),i=ne(de(r.get("barMaxWidth"),n),n),o=ne(de(r.get("barMinWidth"),1),n),s=r.get("barWidth");return s!=null?ne(s,n):Math.max(Math.min(n/2,i),o)}const bj=wj;function Cj(r){r.registerChartView(mj),r.registerSeriesModel(_j),r.registerPreprocessor(Sj),r.registerVisual(fj),r.registerLayout(bj)}function TD(r,t){var e=t.rippleEffectColor||t.color;r.eachChild(function(a){a.attr({z:t.z,zlevel:t.zlevel,style:{stroke:t.brushType==="stroke"?e:null,fill:t.brushType==="fill"?e:null}})})}var Tj=function(r){V(t,r);function t(e,a){var n=r.call(this)||this,i=new Wc(e,a),o=new _e;return n.add(i),n.add(o),n.updateData(e,a),n}return t.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},t.prototype.startEffectAnimation=function(e){for(var a=e.symbolType,n=e.color,i=e.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var v=void 0;ye(f)?v=f(n):v=f,i.__t>0&&(v=-s*i.__t),this._animateSymbol(i,s,v,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},t.prototype._animateSymbol=function(e,a,n,i,o){if(a>0){e.__t=0;var s=this,l=e.animate("",i).when(o?a*2:a,{__t:o?2:1}).delay(n).during(function(){s._updateSymbolPosition(e)});i||l.done(function(){s.remove(e)}),l.start()}},t.prototype._getLineLength=function(e){return fi(e.__p1,e.__cp1)+fi(e.__cp1,e.__p2)},t.prototype._updateAnimationPoints=function(e,a){e.__p1=a[0],e.__p2=a[1],e.__cp1=a[2]||[(a[0][0]+a[1][0])/2,(a[0][1]+a[1][1])/2]},t.prototype.updateData=function(e,a,n){this.childAt(0).updateData(e,a,n),this._updateEffectSymbol(e,a)},t.prototype._updateSymbolPosition=function(e){var a=e.__p1,n=e.__p2,i=e.__cp1,o=e.__t<1?e.__t:2-e.__t,s=[e.x,e.y],l=s.slice(),u=Zt,c=fm;s[0]=u(a[0],i[0],n[0],o),s[1]=u(a[1],i[1],n[1],o);var f=e.__t<1?c(a[0],i[0],n[0],o):c(n[0],i[0],a[0],1-o),v=e.__t<1?c(a[1],i[1],n[1],o):c(n[1],i[1],a[1],1-o);e.rotation=-Math.atan2(v,f)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(e.__lastT!==void 0&&e.__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 c=(a-i[l])/(i[l+1]-i[l]),f=n[l],v=n[l+1];e.x=f[0]*(1-c)+c*v[0],e.y=f[1]*(1-c)+c*v[1];var h=e.__t<1?v[0]-f[0]:f[0]-v[0],d=e.__t<1?v[1]-f[1]:f[1]-v[1];e.rotation=-Math.atan2(d,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=a,e.ignore=!1}},t}(fO);const Oj=Ej;var Nj=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),Bj=function(r){V(t,r);function t(e){var a=r.call(this,e)||this;return a._off=0,a.hoverDataIdx=-1,a}return t.prototype.reset=function(){this.notClear=!1,this._off=0},t.prototype.getDefaultStyle=function(){return{stroke:G.color.neutral99,fill:null}},t.prototype.getDefaultShape=function(){return new Nj},t.prototype.buildPath=function(e,a){var n=a.segs,i=a.curveness,o;if(a.polyline)for(o=this._off;o0){e.moveTo(n[o++],n[o++]);for(var l=1;l0){var h=(u+f)/2-(c-v)*i,d=(c+v)/2-(f-u)*i;e.quadraticCurveTo(h,d,f,v)}else e.lineTo(f,v)}this.incremental&&(this._off=o,this.notClear=!0)},t.prototype.findDataIndex=function(e,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 f=i[u++],v=i[u++],h=1;h0){var g=(f+d)/2-(v-p)*o,y=(v+p)/2-(d-f)*o;if(YI(f,v,g,y,d,p,s,e,a))return l}else if(li(f,v,d,p,s,e,a))return l;l++}return-1},t.prototype.contain=function(e,a){var n=this.transformCoordToLocal(e,a),i=this.getBoundingRect();if(e=n[0],a=n[1],i.contain(e,a)){var o=this.hoverDataIdx=this.findDataIndex(e,a);return o>=0}return this.hoverDataIdx=-1,!1},t.prototype.getBoundingRect=function(){var e=this._rect;if(!e){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+t.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const zj=Vj;var Fj={seriesType:"lines",plan:Nl(),reset:function(r){var t=r.coordinateSystem;if(t){var e=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(e){for(var u=0,c=n.start;c0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var f=e.get("clip",!0)&&Uc(e.coordinateSystem,!1,e);f?this.group.setClipPath(f):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},t.prototype.incrementalPrepareRender=function(e,a,n){var i=e.getData(),o=this._updateLineDraw(i,e);o.incrementalPrepareUpdate(i),this._clearLayer(n),this._finished=!1},t.prototype.incrementalRender=function(e,a,n){this._lineDraw.incrementalUpdate(e,a.getData()),this._finished=e.end===a.getData().count()},t.prototype.eachRendered=function(e){this._lineDraw&&this._lineDraw.eachRendered(e)},t.prototype.updateTransform=function(e,a,n){var i=e.getData(),o=e.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=hO.reset(e,a,n);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(n)},t.prototype._updateLineDraw=function(e,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 zj:new hS(o?i?Oj:vO:i?fO:vS),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(n.group),n},t.prototype._showEffect=function(e){return!!e.get(["effect","show"])},t.prototype._clearLayer=function(e){var a=e.getZr(),n=a.painter.getType()==="svg";!n&&this._lastZlevel!=null&&a.painter.getLayer(this._lastZlevel).clear(!0)},t.prototype.remove=function(e,a){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(a)},t.prototype.dispose=function(e,a){this.remove(e,a)},t.type="lines",t}(ot);const Hj=Gj;var $j=typeof Uint32Array>"u"?Array:Uint32Array,Wj=typeof Float64Array>"u"?Array:Float64Array;function DD(r){var t=r.data;t&&t[0]&&t[0][0]&&t[0][0].coord&&(r.data=X(t,function(e){var a=[e[0].coord,e[1].coord],n={coords:a};return e[0].name&&(n.fromName=e[0].name),e[1].name&&(n.toName=e[1].name),R_([n,e[0],e[1]])}))}var Yj=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.visualStyleAccessPath="lineStyle",e.visualDrawType="stroke",e}return t.prototype.init=function(e){e.data=e.data||[],DD(e);var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count)),r.prototype.init.apply(this,arguments)},t.prototype.mergeOption=function(e){if(DD(e),e.data){var a=this._processFlatCoordsArray(e.data);this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset,a.flatCoords&&(e.data=new Float32Array(a.count))}r.prototype.mergeOption.apply(this,arguments)},t.prototype.appendData=function(e){var a=this._processFlatCoordsArray(e.data);a.flatCoords&&(this._flatCoords?(this._flatCoords=tc(this._flatCoords,a.flatCoords),this._flatCoordsOffset=tc(this._flatCoordsOffset,a.flatCoordsOffset)):(this._flatCoords=a.flatCoords,this._flatCoordsOffset=a.flatCoordsOffset),e.data=new Float32Array(a.count)),this.getRawData().appendData(e.data)},t.prototype._getCoordsFromItemModel=function(e){var a=this.getData().getItemModel(e),n=a.option instanceof Array?a.option:a.getShallow("coords");return n},t.prototype.getLineCoordsCount=function(e){return this._flatCoordsOffset?this._flatCoordsOffset[e*2+1]:this._getCoordsFromItemModel(e).length},t.prototype.getLineCoords=function(e,a){if(this._flatCoordsOffset){for(var n=this._flatCoordsOffset[e*2],i=this._flatCoordsOffset[e*2+1],o=0;o ")})},t.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},t.prototype.getProgressive=function(){var e=this.option.progressive;return e??(this.option.large?1e4:this.get("progressive"))},t.prototype.getProgressiveThreshold=function(){var e=this.option.progressiveThreshold;return e??(this.option.large?2e4:this.get("progressiveThreshold"))},t.prototype.getZLevelKey=function(){var e=this.getModel("effect"),a=e.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:e.get("show")&&a>0?a+"":""},t.type="series.lines",t.dependencies=["grid","polar","geo","calendar"],t.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}},t}(ft);const Uj=Yj;function ov(r){return r instanceof Array||(r=[r,r]),r}var Zj={seriesType:"lines",reset:function(r){var t=ov(r.get("symbol")),e=ov(r.get("symbolSize")),a=r.getData();a.setVisual("fromSymbol",t&&t[0]),a.setVisual("toSymbol",t&&t[1]),a.setVisual("fromSymbolSize",e&&e[0]),a.setVisual("toSymbolSize",e&&e[1]);function n(i,o){var s=i.getItemModel(o),l=ov(s.getShallow("symbol",!0)),u=ov(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 Xj=Zj;function qj(r){r.registerChartView(Hj),r.registerSeriesModel(Uj),r.registerLayout(hO),r.registerVisual(Xj)}var jj=256,Kj=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var t=wa.createCanvas();this.canvas=t}return r.prototype.update=function(t,e,a,n,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),c=this.pointSize+this.blurSize,f=this.canvas,v=f.getContext("2d"),h=t.length;f.width=e,f.height=a;for(var d=0;d0){var L=o(_)?l:u;_>0&&(_=_*D+T),w[x++]=L[M],w[x++]=L[M+1],w[x++]=L[M+2],w[x++]=L[M+3]*_*256}else x+=4}return v.putImageData(S,0,0),f},r.prototype._getBrush=function(){var t=this._brushCanvas||(this._brushCanvas=wa.createCanvas()),e=this.pointSize+this.blurSize,a=e*2;t.width=a,t.height=a;var n=t.getContext("2d");return n.clearRect(0,0,a,a),n.shadowOffsetX=a,n.shadowBlur=this.blurSize,n.shadowColor=G.color.neutral99,n.beginPath(),n.arc(-e,e,this.pointSize,0,Math.PI*2,!0),n.closePath(),n.fill(),t},r.prototype._getGradient=function(t,e){for(var a=this._gradientPixels,n=a[e]||(a[e]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)t[e](s/255,!0,i),n[o++]=i[0],n[o++]=i[1],n[o++]=i[2],n[o++]=i[3];return n},r}();const Jj=Kj;function Qj(r,t,e){var a=r[1]-r[0];t=X(t,function(o){return{interval:[(o.interval[0]-r[0])/a,(o.interval[1]-r[0])/a]}});var n=t.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=t[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=t[0]&&a<=t[1]}}function MD(r){var t=r.dimensions;return t[0]==="lng"&&t[1]==="lat"}var tK=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i;a.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===e&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=e.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(e,n,0,e.getData().count()):MD(o)&&this._renderOnGeo(o,e,i,n)},t.prototype.incrementalPrepareRender=function(e,a,n){this.group.removeAll()},t.prototype.incrementalRender=function(e,a,n,i){var o=a.coordinateSystem;o&&(MD(o)?this.render(a,n,i):(this._progressiveEls=[],this._renderOnGridLike(a,i,e.start,e.end,!0)))},t.prototype.eachRendered=function(e){Vi(this._progressiveEls||this.group,e)},t.prototype._renderOnGridLike=function(e,a,n,i,o){var s=e.coordinateSystem,l=Pi(s,"cartesian2d"),u=Pi(s,"matrix"),c,f,v,h;if(l){var d=s.getAxis("x"),p=s.getAxis("y");c=d.getBandWidth()+.5,f=p.getBandWidth()+.5,v=d.scale.getExtent(),h=p.scale.getExtent()}for(var g=this.group,y=e.getData(),m=e.getModel(["emphasis","itemStyle"]).getItemStyle(),_=e.getModel(["blur","itemStyle"]).getItemStyle(),S=e.getModel(["select","itemStyle"]).getItemStyle(),w=e.get(["itemStyle","borderRadius"]),x=zt(e),b=e.getModel("emphasis"),T=b.get("focus"),C=b.get("blurScope"),D=b.get("disabled"),M=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],L=n;Lv[1]||Eh[1])continue;var O=s.dataToPoint([R,E]);I=new Ve({shape:{x:O[0]-c/2,y:O[1]-f/2,width:c,height:f},style:P})}else if(u){var k=s.dataToLayout([y.get(M[0],L),y.get(M[1],L)]).rect;if(lr(k.x))continue;I=new Ve({z2:1,shape:k,style:P})}else{if(isNaN(y.get(M[1],L)))continue;var N=s.dataToLayout([y.get(M[0],L)]),k=N.contentRect||N.rect;if(lr(k.x)||lr(k.y))continue;I=new Ve({z2:1,shape:k,style:P})}if(y.hasItemOption){var B=y.getItemModel(L),F=B.getModel("emphasis");m=F.getModel("itemStyle").getItemStyle(),_=B.getModel(["blur","itemStyle"]).getItemStyle(),S=B.getModel(["select","itemStyle"]).getItemStyle(),w=B.get(["itemStyle","borderRadius"]),T=F.get("focus"),C=F.get("blurScope"),D=F.get("disabled"),x=zt(B)}I.shape.r=w;var H=e.getRawValue(L),j="-";H&&H[2]!=null&&(j=H[2]+""),$t(I,x,{labelFetcher:e,labelDataIndex:L,defaultOpacity:P.opacity,defaultText:j}),I.ensureState("emphasis").style=m,I.ensureState("blur").style=_,I.ensureState("select").style=S,ut(I,T,C,D),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),g.add(I),y.setItemGraphicEl(L,I),this._progressiveEls&&this._progressiveEls.push(I)}},t.prototype._renderOnGeo=function(e,a,n,i){var o=n.targetVisuals.inRange,s=n.targetVisuals.outOfRange,l=a.getData(),u=this._hmLayer||this._hmLayer||new Jj;u.blurSize=a.get("blurSize"),u.pointSize=a.get("pointSize"),u.minOpacity=a.get("minOpacity"),u.maxOpacity=a.get("maxOpacity");var c=e.getViewRect().clone(),f=e.getRoamTransform();c.applyTransform(f);var v=Math.max(c.x,0),h=Math.max(c.y,0),d=Math.min(c.width+c.x,i.getWidth()),p=Math.min(c.height+c.y,i.getHeight()),g=d-v,y=p-h,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(b,T,C){var D=e.dataToPoint([b,T]);return D[0]-=v,D[1]-=h,D.push(C),D}),S=n.getExtent(),w=n.type==="visualMap.continuous"?eK(S,n.option.range):Qj(S,n.getPieceList(),n.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},w);var x=new rr({style:{width:g,height:y,x:v,y:h,image:u.canvas},silent:!0});this.group.add(x)},t.type="heatmap",t}(ot);const rK=tK;var aK=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.getInitialData=function(e,a){return $n(null,this,{generateCoord:"value"})},t.prototype.preventIncremental=function(){var e=Fc.get(this.get("coordinateSystem"));if(e&&e.dimensions)return e.dimensions[0]==="lng"&&e.dimensions[1]==="lat"},t.type="series.heatmap",t.dependencies=["grid","geo","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:G.color.primary}}},t}(ft);const nK=aK;function iK(r){r.registerChartView(rK),r.registerSeriesModel(nK)}var oK=["itemStyle","borderWidth"],AD=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],hy=new Bi,sK=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group,o=e.getData(),s=this._data,l=e.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),f=l.master.getRect(),v={ecSize:{width:n.getWidth(),height:n.getHeight()},seriesModel:e,coordSys:l,coordSysExtent:[[f.x,f.x+f.width],[f.y,f.y+f.height]],isHorizontal:c,valueDim:AD[+c],categoryDim:AD[1-+c]};o.diff(s).add(function(d){if(o.hasValue(d)){var p=LD(o,d),g=ID(o,d,p,v),y=PD(o,v,g);o.setItemGraphicEl(d,y),i.add(y),RD(y,v,g)}}).update(function(d,p){var g=s.getItemGraphicEl(p);if(!o.hasValue(d)){i.remove(g);return}var y=LD(o,d),m=ID(o,d,y,v),_=_O(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(d,null),g=null),g?dK(g,v,m):g=PD(o,v,m,!0),o.setItemGraphicEl(d,g),g.__pictorialSymbolMeta=m,i.add(g),RD(g,v,m)}).remove(function(d){var p=s.getItemGraphicEl(d);p&&kD(s,d,p.__pictorialSymbolMeta.animationModel,p)}).execute();var h=e.get("clip",!0)?Uc(e.coordinateSystem,!1,e):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},t.prototype.remove=function(e,a){var n=this.group,i=this._data;e.get("animation")?i&&i.eachItemGraphicEl(function(o){kD(i,De(o).dataIndex,e,o)}):n.removeAll()},t.type="pictorialBar",t}(ot);function ID(r,t,e,a){var n=r.getItemLayout(t),i=e.get("symbolRepeat"),o=e.get("symbolClip"),s=e.get("symbolPosition")||"start",l=e.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=e.get("symbolPatternSize")||2,f=e.isAnimationEnabled(),v={dataIndex:t,layout:n,itemModel:e,symbolType:r.getItemVisual(t,"symbol")||"circle",style:r.getItemVisual(t,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:e.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:f?e:null,hoverScale:f&&e.get(["emphasis","scale"]),z2:e.getShallow("z",!0)||0};lK(e,i,n,a,v),uK(r,t,n,i,o,v.boundingLength,v.pxSign,c,a,v),cK(e,v.symbolScale,u,a,v);var h=v.symbolSize,d=cs(e.get("symbolOffset"),h);return fK(e,h,n,i,o,d,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,a,v),v}function lK(r,t,e,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-+(e[i.wh]<=0),c;if(Z(o)){var f=[dy(s,o[0])-l,dy(s,o[1])-l];f[1]=0?1:-1:c>0?1:-1}function dy(r,t){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(t)))}function uK(r,t,e,a,n,i,o,s,l,u){var c=l.valueDim,f=l.categoryDim,v=Math.abs(e[f.wh]),h=r.getItemVisual(t,"symbolSize"),d;Z(h)?d=h.slice():h==null?d=["100%","100%"]:d=[h,h],d[f.index]=ne(d[f.index],v),d[c.index]=ne(d[c.index],a?v:Math.abs(i)),u.symbolSize=d;var p=u.symbolScale=[d[0]/s,d[1]/s];p[c.index]*=(l.isHorizontal?-1:1)*o}function cK(r,t,e,a,n){var i=r.get(oK)||0;i&&(hy.attr({scaleX:t[0],scaleY:t[1],rotation:e}),hy.updateTransform(),i/=hy.getLineScale(),i*=t[a.valueDim.index]),n.valueLineWidth=i||0}function fK(r,t,e,a,n,i,o,s,l,u,c,f){var v=c.categoryDim,h=c.valueDim,d=f.pxSign,p=Math.max(t[h.index]+s,0),g=p;if(a){var y=Math.abs(l),m=er(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=ne(m,t[h.index]),w=Math.max(p+S*2,0),x=_?0:S*2,b=II(a),T=b?a:ED((y+x)/w),C=y-T*p;S=C/2/(_?T:Math.max(T-1,1)),w=p+S*2,x=_?0:S*2,!b&&a!=="fixed"&&(T=u?ED((Math.abs(u)+x)/w):0),g=T*w-x,f.repeatTimes=T,f.symbolMargin=S}var D=d*(g/2),M=f.pathPosition=[];M[v.index]=e[v.wh]/2,M[h.index]=o==="start"?D:o==="end"?l-D:l/2,i&&(M[0]+=i[0],M[1]+=i[1]);var L=f.bundlePosition=[];L[v.index]=e[v.xy],L[h.index]=e[h.xy];var I=f.barRectShape=$({},e);I[h.wh]=d*Math.max(Math.abs(e[h.wh]),Math.abs(M[h.index]+D)),I[v.wh]=e[v.wh];var P=f.clipShape={};P[v.xy]=-e[v.xy],P[v.wh]=c.ecSize[v.wh],P[h.xy]=0,P[h.wh]=e[h.wh]}function dO(r){var t=r.symbolPatternSize,e=kt(r.symbolType,-t/2,-t/2,t,t);return e.attr({culling:!0}),e.type!=="image"&&e.setStyle({strokeNoScale:!0}),e}function pO(r,t,e,a){var n=r.__pictorialBundle,i=e.symbolSize,o=e.valueLineWidth,s=e.pathPosition,l=t.valueDim,u=e.repeatTimes||0,c=0,f=i[t.valueDim.index]+o+e.symbolMargin*2;for(CS(r,function(p){p.__pictorialAnimationIndex=c,p.__pictorialRepeatTimes=u,c0:y<0)&&(m=u-1-p),g[l.index]=f*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation}}}function gO(r,t,e,a){var n=r.__pictorialBundle,i=r.__pictorialMainPath;i?cl(i,null,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:e.symbolScale[0],scaleY:e.symbolScale[1],rotation:e.rotation},e,a):(i=r.__pictorialMainPath=dO(e),n.add(i),cl(i,{x:e.pathPosition[0],y:e.pathPosition[1],scaleX:0,scaleY:0,rotation:e.rotation},{scaleX:e.symbolScale[0],scaleY:e.symbolScale[1]},e,a))}function yO(r,t,e){var a=$({},t.barRectShape),n=r.__pictorialBarRect;n?cl(n,null,{shape:a},t,e):(n=r.__pictorialBarRect=new Ve({z2:2,shape:a,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),n.disableMorphing=!0,r.add(n))}function mO(r,t,e,a){if(e.symbolClip){var n=r.__pictorialClipPath,i=$({},e.clipShape),o=t.valueDim,s=e.animationModel,l=e.dataIndex;if(n)Ze(n,{shape:i},s,l);else{i[o.wh]=0,n=new Ve({shape:i}),r.__pictorialBundle.setClipPath(n),r.__pictorialClipPath=n;var u={};u[o.wh]=e.clipShape[o.wh],os[a?"updateProps":"initProps"](n,{shape:u},s,l)}}}function LD(r,t){var e=r.getItemModel(t);return e.getAnimationDelayParams=vK,e.isAnimationEnabled=hK,e}function vK(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function hK(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function PD(r,t,e,a){var n=new _e,i=new _e;return n.add(i),n.__pictorialBundle=i,i.x=e.bundlePosition[0],i.y=e.bundlePosition[1],e.symbolRepeat?pO(n,t,e):gO(n,t,e),yO(n,e,a),mO(n,t,e,a),n.__pictorialShapeStr=_O(r,e),n.__pictorialSymbolMeta=e,n}function dK(r,t,e){var a=e.animationModel,n=e.dataIndex,i=r.__pictorialBundle;Ze(i,{x:e.bundlePosition[0],y:e.bundlePosition[1]},a,n),e.symbolRepeat?pO(r,t,e,!0):gO(r,t,e,!0),yO(r,e,!0),mO(r,t,e,!0)}function kD(r,t,e,a){var n=a.__pictorialBarRect;n&&n.removeTextContent();var i=[];CS(a,function(o){i.push(o)}),a.__pictorialMainPath&&i.push(a.__pictorialMainPath),a.__pictorialClipPath&&(e=null),A(i,function(o){Ai(o,{scaleX:0,scaleY:0},e,t,function(){a.parent&&a.parent.remove(a)})}),r.setItemGraphicEl(t,null)}function _O(r,t){return[r.getItemVisual(t.dataIndex,"symbol")||"none",!!t.symbolRepeat,!!t.symbolClip].join(":")}function CS(r,t,e){A(r.__pictorialBundle.children(),function(a){a!==r.__pictorialBarRect&&t.call(e,a)})}function cl(r,t,e,a,n,i){t&&r.attr(t),a.symbolClip&&!n?e&&r.attr(e):e&&os[n?"updateProps":"initProps"](r,e,a.animationModel,a.dataIndex,i)}function RD(r,t,e){var a=e.dataIndex,n=e.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"),c=i.get("focus"),f=i.get("blurScope"),v=i.get("scale");CS(r,function(p){if(p instanceof rr){var g=p.style;p.useStyle($({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},e.style))}else p.useStyle(e.style);var y=p.ensureState("emphasis");y.style=o,v&&(y.scaleX=p.scaleX*1.1,y.scaleY=p.scaleY*1.1),p.ensureState("blur").style=s,p.ensureState("select").style=l,u&&(p.cursor=u),p.z2=e.z2});var h=t.valueDim.posDesc[+(e.boundingLength>0)],d=r.__pictorialBarRect;d.ignoreClip=!0,$t(d,zt(n),{labelFetcher:t.seriesModel,labelDataIndex:a,defaultText:_l(t.seriesModel.getData(),a),inheritColor:e.style.fill,defaultOpacity:e.style.opacity,defaultOutsidePosition:h}),ut(r,c,f,i.get("disabled"))}function ED(r){var t=Math.round(r);return Math.abs(r-t)<1e-4?t:Math.ceil(r)}const pK=sK;var gK=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.hasSymbolVisual=!0,e.defaultSymbol="roundRect",e}return t.prototype.getInitialData=function(e){return e.stack=null,r.prototype.getInitialData.apply(this,arguments)},t.type="series.pictorialBar",t.dependencies=["grid"],t.defaultOption=zi(kh.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:G.color.primary}}}),t}(kh);const yK=gK;function mK(r){r.registerChartView(pK),r.registerSeriesModel(yK),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Pe(Ek,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,Ok("pictorialBar"))}var _K=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._layers=[],e}return t.prototype.render=function(e,a,n){var i=e.getData(),o=this,s=this.group,l=e.getLayerSeries(),u=i.getLayout("layoutInfo"),c=u.rect,f=u.boundaryGap;s.x=0,s.y=c.y+f[0];function v(g){return g.name}var h=new Bn(this._layersSeries||[],l,v,v),d=[];h.add(se(p,this,"add")).update(se(p,this,"update")).remove(se(p,this,"remove")).execute();function p(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],w=[],x,b=l[y].indices,T=0;Ti&&(i=s),a.push(s)}for(var u=0;ui&&(i=f)}return{y0:n,max:i}}function DK(r){r.registerChartView(wK),r.registerSeriesModel(bK),r.registerLayout(CK),r.registerProcessor(Fl("themeRiver"))}var MK=2,AK=4,IK=function(r){V(t,r);function t(e,a,n,i){var o=r.call(this)||this;o.z2=MK,o.textConfig={inside:!0},De(o).seriesIndex=a.seriesIndex;var s=new Ue({z2:AK,silent:e.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,e,a,n,i),o}return t.prototype.updateData=function(e,a,n,i,o){this.node=a,a.piece=this,n=n||this._seriesModel,i=i||this._ecModel;var s=this;De(s).dataIndex=a.dataIndex;var l=a.getModel(),u=l.getModel("emphasis"),c=a.getLayout(),f=$({},c);f.label=null;var v=a.getVisual("style");v.lineJoin="bevel";var h=a.getVisual("decal");h&&(v.decal=gl(h,o));var d=qa(l.getModel("itemStyle"),f,!0);$(f,d),A(_r,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var w=qa(S,f);w&&(_.shape=w)}),e?(s.setShape(f),s.shape.r=c.r0,lt(s,{shape:{r:c.r}},n,a.dataIndex)):(Ze(s,{shape:f},n),ua(s)),s.useStyle(v),this._updateLabel(n);var p=l.getShallow("cursor");p&&s.attr("cursor",p),this._seriesModel=n||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?tc(a.getAncestorsIndices(),a.getDescendantIndices()):g==="ancestor"?a.getAncestorsIndices():g==="descendant"?a.getDescendantIndices():g;ut(this,y,u.get("blurScope"),u.get("disabled"))},t.prototype._updateLabel=function(e){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),c=Math.sin(l),f=this,v=f.getTextContent(),h=this.node.dataIndex,d=i.get("minAngle")/180*Math.PI,p=i.get("show")&&!(d!=null&&Math.abs(s)P&&!ic(E-P)&&E0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,e,a,n):(o.virtualPiece=new ND(m,e,a,n),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},t.prototype._initEvents=function(){var e=this;this.group.off("click"),this.group.on("click",function(a){var n=!1,i=e.seriesModel.getViewRoot();i.eachNode(function(o){if(!n&&o.piece&&o.piece===a.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")e._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var c=l.get("target",!0)||"_blank";ph(u,c)}}n=!0}})})},t.prototype._rootToNode=function(e){e!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:F0,from:this.uid,seriesId:this.seriesModel.id,targetNode:e})},t.prototype.containPoint=function(e,a){var n=a.getData(),i=n.getItemLayout(0);if(i){var o=e[0]-i.cx,s=e[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},t.type="sunburst",t}(ot);const RK=kK;var EK=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.ignoreStyleOnData=!0,e}return t.prototype.getInitialData=function(e,a){var n={name:e.name,children:e.data};SO(n);var i=this._levelModels=X(e.levels||[],function(l){return new Xe(l,this,a)},this),o=iS.createTree(n,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var f=o.getNodeByDataIndex(c),v=i[f.depth];return v&&(u.parentModel=v),u})}return o.data},t.prototype.optionUpdated=function(){this.resetViewRoot()},t.prototype.getDataParams=function(e){var a=r.prototype.getDataParams.apply(this,arguments),n=this.getData().tree.getNodeByDataIndex(e);return a.treePathInfo=Wd(n,this),a},t.prototype.getLevelModel=function(e){return this._levelModels&&this._levelModels[e.depth]},t.prototype.getViewRoot=function(){return this._viewRoot},t.prototype.resetViewRoot=function(e){e?this._viewRoot=e:e=this._viewRoot;var a=this.getRawData().tree.root;(!e||e!==a&&!a.contains(e))&&(this._viewRoot=a)},t.prototype.enableAriaDecal=function(){bE(this)},t.type="series.sunburst",t.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"},t}(ft);function SO(r){var t=0;A(r.children,function(a){SO(a);var n=a.value;Z(n)&&(n=n[0]),t+=n});var e=r.value;Z(e)&&(e=e[0]),(e==null||isNaN(e))&&(e=t),e<0&&(e=0),Z(r.value)?r.value[0]=e:r.value=e}const OK=EK;var VD=Math.PI/180;function NK(r,t,e){t.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=e.getWidth(),s=e.getHeight(),l=Math.min(o,s),u=ne(n[0],o),c=ne(n[1],s),f=ne(i[0],l/2),v=ne(i[1],l/2),h=-a.get("startAngle")*VD,d=a.get("minAngle")*VD,p=a.getData().tree.root,g=a.getViewRoot(),y=g.depth,m=a.get("sort");m!=null&&wO(g,m);var _=0;A(g.children,function(E){!isNaN(E.getValue())&&_++});var S=g.getValue(),w=Math.PI/(S||_)*2,x=g.depth>0,b=g.height-(x?-1:1),T=(v-f)/(b||1),C=a.get("clockwise"),D=a.get("stillShowZeroSum"),M=C?1:-1,L=function(E,O){if(E){var k=O;if(E!==p){var N=E.getValue(),B=S===0&&D?w:N*w;B1;)o=o.parentNode;var s=n.getColorFromPalette(o.name||o.dataIndex+"",t);return a.depth>1&&oe(s)&&(s=dm(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=e(o,a,i.root.height));var u=n.ensureUniqueItemVisual(o.dataIndex,"style");$(u,l)})})}function zK(r){r.registerChartView(RK),r.registerSeriesModel(OK),r.registerLayout(Pe(NK,"sunburst")),r.registerProcessor(Pe(Fl,"sunburst")),r.registerVisual(VK),PK(r)}var zD={color:"fill",borderColor:"stroke"},FK={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},In=ze(),GK=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},t.prototype.getInitialData=function(e,a){return $n(null,this)},t.prototype.getDataParams=function(e,a,n){var i=r.prototype.getDataParams.call(this,e,a);return n&&(i.info=In(n).info),i},t.type="series.custom",t.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],t.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},t}(ft);const HK=GK;function $K(r,t){return t=t||[0,0],X(["x","y"],function(e,a){var n=this.getAxis(e),i=t[a],o=r[a]/2;return n.type==="category"?n.getBandWidth():Math.abs(n.dataToCoord(i-o)-n.dataToCoord(i+o))},this)}function WK(r){var t=r.master.getRect();return{coordSys:{type:"cartesian2d",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:se($K,r)}}}function YK(r,t){return t=t||[0,0],X([0,1],function(e){var a=t[e],n=r[e]/2,i=[],o=[];return i[e]=a-n,o[e]=a+n,i[1-e]=o[1-e]=t[1-e],Math.abs(this.dataToPoint(i)[e]-this.dataToPoint(o)[e])},this)}function UK(r){var t=r.getBoundingRect();return{coordSys:{type:"geo",x:t.x,y:t.y,width:t.width,height:t.height,zoom:r.getZoom()},api:{coord:function(e){return r.dataToPoint(e)},size:se(YK,r)}}}function ZK(r,t){var e=this.getAxis(),a=t instanceof Array?t[0]:t,n=(r instanceof Array?r[0]:r)/2;return e.type==="category"?e.getBandWidth():Math.abs(e.dataToCoord(a-n)-e.dataToCoord(a+n))}function XK(r){var t=r.getRect();return{coordSys:{type:"singleAxis",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e){return r.dataToPoint(e)},size:se(ZK,r)}}}function qK(r,t){return t=t||[0,0],X(["Radius","Angle"],function(e,a){var n="get"+e+"Axis",i=this[n](),o=t[a],s=r[a]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return e==="Angle"&&(l=l*Math.PI/180),l},this)}function jK(r){var t=r.getRadiusAxis(),e=r.getAngleAxis(),a=t.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=t.dataToRadius(n[0]),o=e.dataToAngle(n[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:se(qK,r)}}}function KK(r){var t=r.getRect(),e=r.getRangeInfo();return{coordSys:{type:"calendar",x:t.x,y:t.y,width:t.width,height:t.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:e.start,end:e.end,weeks:e.weeks,dayCount:e.allDay}},api:{coord:function(a,n){return r.dataToPoint(a,n)},layout:function(a,n){return r.dataToLayout(a,n)}}}}function JK(r){var t=r.getRect();return{coordSys:{type:"matrix",x:t.x,y:t.y,width:t.width,height:t.height},api:{coord:function(e,a){return r.dataToPoint(e,a)},layout:function(e,a){return r.dataToLayout(e,a)}}}}function xO(r,t,e,a){return r&&(r.legacy||r.legacy!==!1&&!e&&!a&&t!=="tspan"&&(t==="text"||ue(r,"text")))}function bO(r,t,e){var a=r,n,i,o;if(t==="text")o=a;else{o={},ue(a,"text")&&(o.text=a.text),ue(a,"rich")&&(o.rich=a.rich),ue(a,"textFill")&&(o.fill=a.textFill),ue(a,"textStroke")&&(o.stroke=a.textStroke),ue(a,"fontFamily")&&(o.fontFamily=a.fontFamily),ue(a,"fontSize")&&(o.fontSize=a.fontSize),ue(a,"fontStyle")&&(o.fontStyle=a.fontStyle),ue(a,"fontWeight")&&(o.fontWeight=a.fontWeight),i={type:"text",style:o,silent:!0},n={};var s=ue(a,"textPosition");e?n.position=s?a.textPosition:"inside":s&&(n.position=a.textPosition),ue(a,"textPosition")&&(n.position=a.textPosition),ue(a,"textOffset")&&(n.offset=a.textOffset),ue(a,"textRotation")&&(n.rotation=a.textRotation),ue(a,"textDistance")&&(n.distance=a.textDistance)}return FD(o,r),A(o.rich,function(l){FD(l,l)}),{textConfig:n,textContent:i}}function FD(r,t){t&&(t.font=t.textFont||t.font,ue(t,"textStrokeWidth")&&(r.lineWidth=t.textStrokeWidth),ue(t,"textAlign")&&(r.align=t.textAlign),ue(t,"textVerticalAlign")&&(r.verticalAlign=t.textVerticalAlign),ue(t,"textLineHeight")&&(r.lineHeight=t.textLineHeight),ue(t,"textWidth")&&(r.width=t.textWidth),ue(t,"textHeight")&&(r.height=t.textHeight),ue(t,"textBackgroundColor")&&(r.backgroundColor=t.textBackgroundColor),ue(t,"textPadding")&&(r.padding=t.textPadding),ue(t,"textBorderColor")&&(r.borderColor=t.textBorderColor),ue(t,"textBorderWidth")&&(r.borderWidth=t.textBorderWidth),ue(t,"textBorderRadius")&&(r.borderRadius=t.textBorderRadius),ue(t,"textBoxShadowColor")&&(r.shadowColor=t.textBoxShadowColor),ue(t,"textBoxShadowBlur")&&(r.shadowBlur=t.textBoxShadowBlur),ue(t,"textBoxShadowOffsetX")&&(r.shadowOffsetX=t.textBoxShadowOffsetX),ue(t,"textBoxShadowOffsetY")&&(r.shadowOffsetY=t.textBoxShadowOffsetY))}function GD(r,t,e){var a=r;a.textPosition=a.textPosition||e.position||"inside",e.offset!=null&&(a.textOffset=e.offset),e.rotation!=null&&(a.textRotation=e.rotation),e.distance!=null&&(a.textDistance=e.distance);var n=a.textPosition.indexOf("inside")>=0,i=r.fill||G.color.neutral99;HD(a,t);var o=a.textFill==null;return n?o&&(a.textFill=e.insideFill||G.color.neutral00,!a.textStroke&&e.insideStroke&&(a.textStroke=e.insideStroke),!a.textStroke&&(a.textStroke=i),a.textStrokeWidth==null&&(a.textStrokeWidth=2)):(o&&(a.textFill=r.fill||e.outsideFill||G.color.neutral00),!a.textStroke&&e.outsideStroke&&(a.textStroke=e.outsideStroke)),a.text=t.text,a.rich=t.rich,A(t.rich,function(s){HD(s,s)}),a}function HD(r,t){t&&(ue(t,"fill")&&(r.textFill=t.fill),ue(t,"stroke")&&(r.textStroke=t.fill),ue(t,"lineWidth")&&(r.textStrokeWidth=t.lineWidth),ue(t,"font")&&(r.font=t.font),ue(t,"fontStyle")&&(r.fontStyle=t.fontStyle),ue(t,"fontWeight")&&(r.fontWeight=t.fontWeight),ue(t,"fontSize")&&(r.fontSize=t.fontSize),ue(t,"fontFamily")&&(r.fontFamily=t.fontFamily),ue(t,"align")&&(r.textAlign=t.align),ue(t,"verticalAlign")&&(r.textVerticalAlign=t.verticalAlign),ue(t,"lineHeight")&&(r.textLineHeight=t.lineHeight),ue(t,"width")&&(r.textWidth=t.width),ue(t,"height")&&(r.textHeight=t.height),ue(t,"backgroundColor")&&(r.textBackgroundColor=t.backgroundColor),ue(t,"padding")&&(r.textPadding=t.padding),ue(t,"borderColor")&&(r.textBorderColor=t.borderColor),ue(t,"borderWidth")&&(r.textBorderWidth=t.borderWidth),ue(t,"borderRadius")&&(r.textBorderRadius=t.borderRadius),ue(t,"shadowColor")&&(r.textBoxShadowColor=t.shadowColor),ue(t,"shadowBlur")&&(r.textBoxShadowBlur=t.shadowBlur),ue(t,"shadowOffsetX")&&(r.textBoxShadowOffsetX=t.shadowOffsetX),ue(t,"shadowOffsetY")&&(r.textBoxShadowOffsetY=t.shadowOffsetY),ue(t,"textShadowColor")&&(r.textShadowColor=t.textShadowColor),ue(t,"textShadowBlur")&&(r.textShadowBlur=t.textShadowBlur),ue(t,"textShadowOffsetX")&&(r.textShadowOffsetX=t.textShadowOffsetX),ue(t,"textShadowOffsetY")&&(r.textShadowOffsetY=t.textShadowOffsetY))}var CO={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},$D=He(CO);en(rn,function(r,t){return r[t]=1,r},{});rn.join(", ");var Hh=["","style","shape","extra"],bl=ze();function TS(r,t,e,a,n){var i=r+"Animation",o=kl(r,a,n)||{},s=bl(t).userDuring;return o.duration>0&&(o.during=s?se(aJ,{el:t,userDuring:s}):null,o.setToFinal=!0,o.scope=r),$(o,e[i]),o}function Wv(r,t,e,a){a=a||{};var n=a.dataIndex,i=a.isInit,o=a.clearStyle,s=e.isAnimationEnabled(),l=bl(r),u=t.style;l.userDuring=t.during;var c={},f={};if(iJ(r,t,f),r.type==="compound")for(var v=r.shape.paths,h=t.shape.paths,d=0;d0&&r.animateFrom(g,y)}else eJ(r,t,n||0,e,c);TO(r,t),u?r.dirty():r.markRedraw()}function TO(r,t){for(var e=bl(r).leaveToProps,a=0;a0&&r.animateFrom(n,i)}}function tJ(r,t){ue(t,"silent")&&(r.silent=t.silent),ue(t,"ignore")&&(r.ignore=t.ignore),r instanceof la&&ue(t,"invisible")&&(r.invisible=t.invisible),r instanceof Fe&&ue(t,"autoBatch")&&(r.autoBatch=t.autoBatch)}var Ba={},rJ={setTransform:function(r,t){return Ba.el[r]=t,this},getTransform:function(r){return Ba.el[r]},setShape:function(r,t){var e=Ba.el,a=e.shape||(e.shape={});return a[r]=t,e.dirtyShape&&e.dirtyShape(),this},getShape:function(r){var t=Ba.el.shape;if(t)return t[r]},setStyle:function(r,t){var e=Ba.el,a=e.style;return a&&(a[r]=t,e.dirtyStyle&&e.dirtyStyle()),this},getStyle:function(r){var t=Ba.el.style;if(t)return t[r]},setExtra:function(r,t){var e=Ba.el.extra||(Ba.el.extra={});return e[r]=t,this},getExtra:function(r){var t=Ba.el.extra;if(t)return t[r]}};function aJ(){var r=this,t=r.el;if(t){var e=bl(t).userDuring,a=r.userDuring;if(e!==a){r.el=r.userDuring=null;return}Ba.el=t,a(rJ)}}function WD(r,t,e,a){var n=e[r];if(n){var i=t[r],o;if(i){var s=e.transition,l=n.transition;if(l)if(!o&&(o=a[r]={}),Yo(l))$(o,i);else for(var u=at(l),c=0;c=0){!o&&(o=a[r]={});for(var h=He(i),c=0;c=0)){var v=r.getAnimationStyleProps(),h=v?v.style:null;if(h){!i&&(i=a.style={});for(var d=He(e),u=0;u=0?t.getStore().get(k,E):void 0}var N=t.get(O.name,E),B=O&&O.ordinalMeta;return B?B.categories[N]:N}function b(R,E){E==null&&(E=c);var O=t.getItemVisual(E,"style"),k=O&&O.fill,N=O&&O.opacity,B=_(E,mi).getItemStyle();k!=null&&(B.fill=k),N!=null&&(B.opacity=N);var F={inheritColor:oe(k)?k:G.color.neutral99},H=S(E,mi),j=it(H,null,F,!1,!0);j.text=H.getShallow("show")?de(r.getFormattedLabel(E,mi),_l(t,E)):null;var ee=hh(H,F,!1);return D(R,B),B=GD(B,j,ee),R&&C(B,R),B.legacy=!0,B}function T(R,E){E==null&&(E=c);var O=_(E,Ln).getItemStyle(),k=S(E,Ln),N=it(k,null,null,!0,!0);N.text=k.getShallow("show")?Vr(r.getFormattedLabel(E,Ln),r.getFormattedLabel(E,mi),_l(t,E)):null;var B=hh(k,null,!0);return D(R,O),O=GD(O,N,B),R&&C(O,R),O.legacy=!0,O}function C(R,E){for(var O in E)ue(E,O)&&(R[O]=E[O])}function D(R,E){R&&(R.textFill&&(E.textFill=R.textFill),R.textPosition&&(E.textPosition=R.textPosition))}function M(R,E){if(E==null&&(E=c),ue(zD,R)){var O=t.getItemVisual(E,"style");return O?O[zD[R]]:null}if(ue(FK,R))return t.getItemVisual(E,R)}function L(R){if(o.type==="cartesian2d"){var E=o.getBaseAxis();return EW(xe({axis:E},R))}}function I(){return e.getCurrentSeriesIndices()}function P(R){return s1(R,e)}}function yJ(r){var t={};return A(r.dimensions,function(e){var a=r.getDimensionInfo(e);if(!a.isExtraCoord){var n=a.coordDim,i=t[n]=t[n]||[];i[a.coordDimIndex]=r.getDimensionIndex(e)}}),t}function _y(r,t,e,a,n,i,o){if(!a){i.remove(t);return}var s=LS(r,t,e,a,n,i);return s&&o.setItemGraphicEl(e,s),s&&ut(s,a.focus,a.blurScope,a.emphasisDisabled),s}function LS(r,t,e,a,n,i){var o=-1,s=t;t&&IO(t,a,n)&&(o=ke(i.childrenRef(),t),t=null);var l=!t,u=t;u?u.clearStates():(u=AS(a),s&&vJ(s,u)),a.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),a.tooltipDisabled&&(u.tooltipDisabled=!0),Ur.normal.cfg=Ur.normal.conOpt=Ur.emphasis.cfg=Ur.emphasis.conOpt=Ur.blur.cfg=Ur.blur.conOpt=Ur.select.cfg=Ur.select.conOpt=null,Ur.isLegacy=!1,_J(u,e,a,n,l,Ur),mJ(u,e,a,n,l),IS(r,u,e,a,Ur,n,l),ue(a,"info")&&(In(u).info=a.info);for(var c=0;c=0?i.replaceAt(u,o):i.add(u),u}function IO(r,t,e){var a=In(r),n=t.type,i=t.shape,o=t.style;return e.isUniversalTransitionEnabled()||n!=null&&n!==a.customGraphicType||n==="path"&&CJ(i)&&LO(i)!==a.customPathData||n==="image"&&ue(o,"image")&&o.image!==a.customImagePath}function mJ(r,t,e,a,n){var i=e.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&IO(o,i,a)&&(o=null),o||(o=AS(i),r.setClipPath(o)),IS(null,o,t,i,null,a,n)}}function _J(r,t,e,a,n,i){if(!(r.isGroup||r.type==="compoundPath")){UD(e,null,i),UD(e,Ln,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 c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=AS(o),r.setTextContent(c)),IS(null,c,t,o,null,a,n);for(var f=o&&o.style,v=0;v=c;h--){var d=t.childAt(h);wJ(t,d,n)}}}function wJ(r,t,e){t&&Zd(t,In(r).option,e)}function xJ(r){new Bn(r.oldChildren,r.newChildren,ZD,ZD,r).add(XD).update(XD).remove(bJ).execute()}function ZD(r,t){var e=r&&r.name;return e??cJ+t}function XD(r,t){var e=this.context,a=r!=null?e.newChildren[r]:null,n=t!=null?e.oldChildren[t]:null;LS(e.api,n,e.dataIndex,a,e.seriesModel,e.group)}function bJ(r){var t=this.context,e=t.oldChildren[r];e&&Zd(e,In(e).option,t.seriesModel)}function LO(r){return r&&(r.pathData||r.d)}function CJ(r){return r&&(ue(r,"pathData")||ue(r,"d"))}function TJ(r){r.registerChartView(dJ),r.registerSeriesModel(HK)}var Do=ze(),qD=me,Sy=se,DJ=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(t,e,a,n){var i=e.get("value"),o=e.get("status");if(this._axisModel=t,this._axisPointerModel=e,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,t,e,a);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(a),this._lastGraphicKey=c;var f=this._moveAnimation=this.determineAnimation(t,e);if(!s)s=this._group=new _e,this.createPointerEl(s,u,t,e),this.createLabelEl(s,u,t,e),a.getZr().add(s);else{var v=Pe(jD,e,f);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,e)}JD(s,e,!0),this._renderHandle(i)}},r.prototype.remove=function(t){this.clear(t)},r.prototype.dispose=function(t){this.clear(t)},r.prototype.determineAnimation=function(t,e){var a=e.get("animation"),n=t.axis,i=n.type==="category",o=e.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=J1(t).seriesDataCount,u=n.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return a===!0},r.prototype.makeElOption=function(t,e,a,n,i){},r.prototype.createPointerEl=function(t,e,a,n){var i=e.pointer;if(i){var o=Do(t).pointerEl=new os[i.type](qD(e.pointer));t.add(o)}},r.prototype.createLabelEl=function(t,e,a,n){if(e.label){var i=Do(t).labelEl=new Ue(qD(e.label));t.add(i),KD(i,n)}},r.prototype.updatePointerEl=function(t,e,a){var n=Do(t).pointerEl;n&&e.pointer&&(n.setStyle(e.pointer.style),a(n,{shape:e.pointer.shape}))},r.prototype.updateLabelEl=function(t,e,a,n){var i=Do(t).labelEl;i&&(i.setStyle(e.label.style),a(i,{x:e.label.x,y:e.label.y}),KD(i,n))},r.prototype._renderHandle=function(t){if(!(this._dragging||!this.updateHandleTransform)){var e=this._axisPointerModel,a=this._api.getZr(),n=this._handle,i=e.getModel("handle"),o=e.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=Bc(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Rn(u.event)},onmousedown:Sy(this._onHandleDragMove,this,0,0),drift:Sy(this._onHandleDragMove,this),ondragend:Sy(this._onHandleDragEnd,this)}),a.add(n)),JD(n,e,!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,Bl(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(t,s)}},r.prototype._moveHandleToValue=function(t,e){jD(this._axisPointerModel,!e&&this._moveAnimation,this._handle,wy(this.getHandleTransform(t,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(t,e){var a=this._handle;if(a){this._dragging=!0;var n=this.updateHandleTransform(wy(a),[t,e],this._axisModel,this._axisPointerModel);this._payloadInfo=n,a.stopAnimation(),a.attr(wy(n)),Do(a).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var t=this._handle;if(t){var e=this._payloadInfo,a=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:e.cursorPoint[0],y:e.cursorPoint[1],tooltipOption:e.tooltipOption,axesInfo:[{axisDim:a.axis.dim,axisIndex:a.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var t=this._handle;if(t){var e=this._axisPointerModel.get("value");this._moveHandleToValue(e),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(t){this._lastValue=null,this._lastStatus=null;var e=t.getZr(),a=this._group,n=this._handle;e&&a&&(this._lastGraphicKey=null,a&&e.remove(a),n&&e.remove(n),this._group=null,this._handle=null,this._payloadInfo=null),dc(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(t,e,a){return a=a||0,{x:t[a],y:t[1-a],width:e[a],height:e[1-a]}},r}();function jD(r,t,e,a){PO(Do(e).lastProp,a)||(Do(e).lastProp=a,t?Ze(e,a,r):(e.stopAnimation(),e.attr(a)))}function PO(r,t){if(be(r)&&be(t)){var e=!0;return A(t,function(a,n){e=e&&PO(r[n],a)}),!!e}else return r===t}function KD(r,t){r[t.get(["label","show"])?"show":"hide"]()}function wy(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function JD(r,t,e){var a=t.get("z"),n=t.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(a!=null&&(i.z=a),n!=null&&(i.zlevel=n),i.silent=e)})}const kS=DJ;function RS(r){var t=r.get("type"),e=r.getModel(t+"Style"),a;return t==="line"?(a=e.getLineStyle(),a.fill=null):t==="shadow"&&(a=e.getAreaStyle(),a.stroke=null),a}function kO(r,t,e,a,n){var i=e.get("value"),o=RO(i,t.axis,t.ecModel,e.get("seriesDataIndices"),{precision:e.get(["label","precision"]),formatter:e.get(["label","formatter"])}),s=e.getModel("label"),l=Vc(s.get("padding")||0),u=s.getFont(),c=pd(o,u),f=n.position,v=c.width+l[1]+l[3],h=c.height+l[0]+l[2],d=n.align;d==="right"&&(f[0]-=v),d==="center"&&(f[0]-=v/2);var p=n.verticalAlign;p==="bottom"&&(f[1]-=h),p==="middle"&&(f[1]-=h/2),MJ(f,v,h,a);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=t.get(["axisLine","lineStyle","color"])),r.label={x:f[0],y:f[1],style:it(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function MJ(r,t,e,a){var n=a.getWidth(),i=a.getHeight();r[0]=Math.min(r[0]+t,n)-t,r[1]=Math.min(r[1]+e,i)-e,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function RO(r,t,e,a,n){r=t.scale.parse(r);var i=t.scale.getLabel({value:r},{precision:n.precision}),o=n.formatter;if(o){var s={value:Ch(t,{value:r}),axisDimension:t.dim,axisIndex:t.index,seriesData:[]};A(a,function(l){var u=e.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,f=u&&u.getDataParams(c);f&&s.seriesData.push(f)}),oe(o)?i=o.replace("{value}",i):ye(o)&&(i=o(s))}return i}function ES(r,t,e){var a=Xt();return Ni(a,a,e.rotation),tn(a,a,e.position),_a([r.dataToCoord(t),(e.labelOffset||0)+(e.labelDirection||1)*(e.labelMargin||0)],a)}function EO(r,t,e,a,n,i){var o=Vn.innerTextLayout(e.rotation,0,e.labelDirection);e.labelMargin=n.get(["label","margin"]),kO(t,a,n,i,{position:ES(a.axis,r,e),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function OS(r,t,e){return e=e||0,{x1:r[e],y1:r[1-e],x2:t[e],y2:t[1-e]}}function OO(r,t,e){return e=e||0,{x:r[e],y:r[1-e],width:t[e],height:t[1-e]}}function QD(r,t,e,a,n,i){return{cx:r,cy:t,r0:e,r:a,startAngle:n,endAngle:i,clockwise:!0}}var AJ=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.grid,u=i.get("type"),c=eM(l,s).getOtherAxis(s).getGlobalExtent(),f=s.toGlobalCoord(s.dataToCoord(a,!0));if(u&&u!=="none"){var v=RS(i),h=IJ[u](s,f,c);h.style=v,e.graphicKey=h.type,e.pointer=h}var d=Oh(l.getRect(),n);EO(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=Oh(a.axis.grid.getRect(),a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=ES(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.grid,l=o.getGlobalExtent(!0),u=eM(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,f=[e.x,e.y];f[c]+=a[c],f[c]=Math.min(l[1],f[c]),f[c]=Math.max(l[0],f[c]);var v=(u[1]+u[0])/2,h=[v,v];h[c]=f[c];var d=[{verticalAlign:"middle"},{align:"center"}];return{x:f[0],y:f[1],rotation:e.rotation,cursorPoint:h,tooltipOption:d[c]}},t}(kS);function eM(r,t){var e={};return e[t.dim+"AxisIndex"]=t.index,r.getCartesian(e)}var IJ={line:function(r,t,e){var a=OS([t,e[0]],[t,e[1]],tM(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=Math.max(1,r.getBandWidth()),n=e[1]-e[0];return{type:"Rect",shape:OO([t-a/2,e[0]],[a,n],tM(r))}}};function tM(r){return r.dim==="x"?0:1}const LJ=AJ;var PJ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="axisPointer",t.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:G.color.border,width:1,type:"dashed"},shadowStyle:{color:G.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:G.color.neutral00,padding:[5,7,5,7],backgroundColor:G.color.accent60,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:G.color.accent40,throttle:40}},t}(We);const kJ=PJ;var Tn=ze(),RJ=A;function NO(r,t,e){if(!qe.node){var a=t.getZr();Tn(a).records||(Tn(a).records={}),EJ(a,t);var n=Tn(a).records[r]||(Tn(a).records[r]={});n.handler=e}}function EJ(r,t){if(Tn(r).initialized)return;Tn(r).initialized=!0,e("click",Pe(rM,"click")),e("mousemove",Pe(rM,"mousemove")),e("globalout",NJ);function e(a,n){r.on(a,function(i){var o=BJ(t);RJ(Tn(r).records,function(s){s&&n(s,i,o.dispatchAction)}),OJ(o.pendings,t)})}}function OJ(r,t){var e=r.showTip.length,a=r.hideTip.length,n;e?n=r.showTip[e-1]:a&&(n=r.hideTip[a-1]),n&&(n.dispatchAction=null,t.dispatchAction(n))}function NJ(r,t,e){r.handler("leave",null,e)}function rM(r,t,e,a){t.handler(r,e,a)}function BJ(r){var t={showTip:[],hideTip:[]},e=function(a){var n=t[a.type];n?n.push(a):(a.dispatchAction=e,r.dispatchAction(a))};return{dispatchAction:e,pendings:t}}function $0(r,t){if(!qe.node){var e=t.getZr(),a=(Tn(e).records||{})[r];a&&(Tn(e).records[r]=null)}}var VJ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=a.getComponent("tooltip"),o=e.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";NO("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})})},t.prototype.remove=function(e,a){$0("axisPointer",a)},t.prototype.dispose=function(e,a){$0("axisPointer",a)},t.type="axisPointer",t}(pt);const zJ=VJ;function BO(r,t){var e=[],a=r.seriesIndex,n;if(a==null||!(n=t.getSeriesByIndex(a)))return{point:[]};var i=n.getData(),o=Zo(i,r);if(o==null||o<0||Z(o))return{point:[]};var s=i.getItemGraphicEl(o),l=n.coordinateSystem;if(n.getTooltipPosition)e=n.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),f=c.dim,v=u.dim,h=f==="x"||f==="radius"?1:0,d=i.mapDimension(v),p=[];p[h]=i.get(d,o),p[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),e=l.dataToPoint(p)||[]}else e=l.dataToPoint(i.getValues(X(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),e=[g.x+g.width/2,g.y+g.height/2]}return{point:e,el:s}}var aM=ze();function FJ(r,t,e){var a=r.currTrigger,n=[r.x,r.y],i=r,o=r.dispatchAction||se(e.dispatchAction,e),s=t.getComponent("axisPointer").coordSysAxesInfo;if(s){Yv(n)&&(n=BO({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},t).point);var l=Yv(n),u=i.axesInfo,c=s.axesInfo,f=a==="leave"||Yv(n),v={},h={},d={list:[],map:{}},p={showPointer:Pe(HJ,h),showTooltip:Pe($J,d)};A(s.coordSysMap,function(y,m){var _=l||y.containPoint(n);A(s.coordSysAxesInfo[m],function(S,w){var x=S.axis,b=ZJ(u,S);if(!f&&_&&(!u||b)){var T=b&&b.value;T==null&&!l&&(T=x.pointToData(n)),T!=null&&nM(S,T,p,!1,v)}})});var g={};return A(c,function(y,m){var _=y.linkGroup;_&&!h[m]&&A(_.axesInfo,function(S,w){var x=h[w];if(S!==y&&x){var b=x.value;_.mapper&&(b=y.axis.scale.parse(_.mapper(b,iM(S),iM(y)))),g[y.key]=b}})}),A(g,function(y,m){nM(c[m],y,p,!0,v)}),WJ(h,c,v),YJ(d,n,r,o),UJ(c,o,e),v}}function nM(r,t,e,a,n){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(t))){if(!r.involveSeries){e.showPointer(r,t);return}var o=GJ(t,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&n.seriesIndex==null&&$(n,s[0]),!a&&r.snap&&i.containData(l)&&l!=null&&(t=l),e.showPointer(r,t,s),e.showTooltip(r,o,l)}}function GJ(r,t){var e=t.axis,a=e.dim,n=r,i=[],o=Number.MAX_VALUE,s=-1;return A(t.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(a),f,v;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(c,r,e);v=h.dataIndices,f=h.nestestValue}else{if(v=l.indicesOfNearest(a,c[0],r,e.type==="category"?.5:null),!v.length)return;f=l.getData().get(c[0],v[0])}if(!(f==null||!isFinite(f))){var d=r-f,p=Math.abs(d);p<=o&&((p=0&&s<0)&&(o=p,s=d,n=f,i.length=0),A(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:n}}function HJ(r,t,e,a){r[t.key]={value:e,payloadBatch:a}}function $J(r,t,e,a){var n=e.payloadBatch,i=t.axis,o=i.model,s=t.axisPointerModel;if(!(!t.triggerTooltip||!n.length)){var l=t.coordSys.model,u=bc(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.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 WJ(r,t,e){var a=e.axesInfo=[];A(t,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 YJ(r,t,e,a){if(Yv(t)||!r.list.length){a({type:"hideTip"});return}var n=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};a({type:"showTip",escapeConnect:!0,x:t[0],y:t[1],tooltipOption:e.tooltipOption,position:e.position,dataIndexInside:n.dataIndexInside,dataIndex:n.dataIndex,seriesIndex:n.seriesIndex,dataByCoordSys:r.list})}function UJ(r,t,e){var a=e.getZr(),n="axisPointerLastHighlights",i=aM(a)[n]||{},o=aM(a)[n]={};A(r,function(u,c){var f=u.axisPointerModel.option;f.status==="show"&&u.triggerEmphasis&&A(f.seriesDataIndices,function(v){var h=v.seriesIndex+" | "+v.dataIndex;o[h]=v})});var s=[],l=[];A(i,function(u,c){!o[c]&&l.push(u)}),A(o,function(u,c){!i[c]&&s.push(u)}),l.length&&e.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&e.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function ZJ(r,t){for(var e=0;e<(r||[]).length;e++){var a=r[e];if(t.axis.dim===a.axisDim&&t.axis.model.componentIndex===a.axisIndex)return a}}function iM(r){var t=r.axis.model,e={},a=e.axisDim=r.axis.dim;return e.axisIndex=e[a+"AxisIndex"]=t.componentIndex,e.axisName=e[a+"AxisName"]=t.name,e.axisId=e[a+"AxisId"]=t.id,e}function Yv(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function qc(r){hs.registerAxisPointerClass("CartesianAxisPointer",LJ),r.registerComponentModel(kJ),r.registerComponentView(zJ),r.registerPreprocessor(function(t){if(t){(!t.axisPointer||t.axisPointer.length===0)&&(t.axisPointer={});var e=t.axisPointer.link;e&&!Z(e)&&(t.axisPointer.link=[e])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(t,e){t.getComponent("axisPointer").coordSysAxesInfo=x6(t,e)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},FJ)}function XJ(r){Oe(iE),Oe(qc)}var qJ=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),f=s.dataToCoord(a),v=i.get("type");if(v&&v!=="none"){var h=RS(i),d=KJ[v](s,l,f,c);d.style=h,e.graphicKey=d.type,e.pointer=d}var p=i.get(["label","margin"]),g=jJ(a,n,i,l,p);kO(e,n,i,o,g)},t}(kS);function jJ(r,t,e,a,n){var i=t.axis,o=i.dataToCoord(r),s=a.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=a.getRadiusAxis().getExtent(),u,c,f;if(i.dim==="radius"){var v=Xt();Ni(v,v,s),tn(v,v,[a.cx,a.cy]),u=_a([o,-n],v);var h=t.getModel("axisLabel").get("rotate")||0,d=Vn.innerTextLayout(s,h*Math.PI/180,-1);c=d.textAlign,f=d.textVerticalAlign}else{var p=l[1];u=a.coordToPoint([p+n,o]);var g=a.cx,y=a.cy;c=Math.abs(u[0]-g)/p<.3?"center":u[0]>g?"left":"right",f=Math.abs(u[1]-y)/p<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:c,verticalAlign:f}}var KJ={line:function(r,t,e,a){return r.dim==="angle"?{type:"Line",shape:OS(t.coordToPoint([a[0],e]),t.coordToPoint([a[1],e]))}:{type:"Circle",shape:{cx:t.cx,cy:t.cy,r:e}}},shadow:function(r,t,e,a){var n=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:QD(t.cx,t.cy,a[0],a[1],(-e-n/2)*i,(-e+n/2)*i)}:{type:"Sector",shape:QD(t.cx,t.cy,e-n/2,e+n/2,0,Math.PI*2)}}};const JJ=qJ;var QJ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.findAxisModel=function(e){var a,n=this.ecModel;return n.eachComponent(e,function(i){i.getCoordSysModel()===this&&(a=i)},this),a},t.type="polar",t.dependencies=["radiusAxis","angleAxis"],t.defaultOption={z:0,center:["50%","50%"],radius:"80%"},t}(We);const eQ=QJ;var NS=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",gt).models[0]},t.type="polarAxis",t}(We);Rt(NS,$c);var tQ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="angleAxis",t}(NS),rQ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="radiusAxis",t}(NS),BS=function(r){V(t,r);function t(e,a){return r.call(this,"radius",e,a)||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t}(Aa);BS.prototype.dataToRadius=Aa.prototype.dataToCoord;BS.prototype.radiusToData=Aa.prototype.coordToData;const aQ=BS;var nQ=ze(),VS=function(r){V(t,r);function t(e,a){return r.call(this,"angle",e,a||[0,360])||this}return t.prototype.pointToData=function(e,a){return this.polar.pointToData(e,a)[this.dim==="radius"?0:1]},t.prototype.calculateCategoryInterval=function(){var e=this,a=e.getLabelModel(),n=e.scale,i=n.getExtent(),o=n.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=e.dataToCoord(s+1)-e.dataToCoord(s),u=Math.abs(l),c=pd(s==null?"":s+"",a.getFont(),"center","top"),f=Math.max(c.height,7),v=f/u;isNaN(v)&&(v=1/0);var h=Math.max(0,Math.floor(v)),d=nQ(e.model),p=d.lastAutoInterval,g=d.lastTickCount;return p!=null&&g!=null&&Math.abs(p-h)<=1&&Math.abs(g-o)<=1&&p>h?h=p:(d.lastTickCount=o,d.lastAutoInterval=h),h},t}(Aa);VS.prototype.dataToAngle=Aa.prototype.dataToCoord;VS.prototype.angleToData=Aa.prototype.coordToData;const iQ=VS;var VO=["radius","angle"],oQ=function(){function r(t){this.dimensions=VO,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new aQ,this._angleAxis=new iQ,this.axisPointerEnabled=!0,this.name=t||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(t){var e=this.pointToCoord(t);return this._radiusAxis.contain(e[0])&&this._angleAxis.contain(e[1])},r.prototype.containData=function(t){return this._radiusAxis.containData(t[0])&&this._angleAxis.containData(t[1])},r.prototype.getAxis=function(t){var e="_"+t+"Axis";return this[e]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(t){var e=[],a=this._angleAxis,n=this._radiusAxis;return a.scale.type===t&&e.push(a),n.scale.type===t&&e.push(n),e},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(t){var e=this._angleAxis;return t===e?this._radiusAxis:e},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(t){var e=t!=null&&t!=="auto"?this.getAxis(t):this.getBaseAxis();return{baseAxes:[e],otherAxes:[this.getOtherAxis(e)]}},r.prototype.dataToPoint=function(t,e,a){return this.coordToPoint([this._radiusAxis.dataToRadius(t[0],e),this._angleAxis.dataToAngle(t[1],e)],a)},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.pointToCoord(t);return a[0]=this._radiusAxis.radiusToData(n[0],e),a[1]=this._angleAxis.angleToData(n[1],e),a},r.prototype.pointToCoord=function(t){var e=t[0]-this.cx,a=t[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(e*e+a*a);e/=l,a/=l;for(var u=Math.atan2(-a,e)/Math.PI*180,c=us;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(t,e){e=e||[];var a=t[0],n=t[1]/180*Math.PI;return e[0]=Math.cos(n)*a+this.cx,e[1]=-Math.sin(n)*a+this.cy,e},r.prototype.getArea=function(){var t=this.getAngleAxis(),e=this.getRadiusAxis(),a=e.getExtent().slice();a[0]>a[1]&&a.reverse();var n=t.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:a[0],r:a[1],startAngle:-n[0]*i,endAngle:-n[1]*i,clockwise:t.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,f=u*u+c*c,v=this.r,h=this.r0;return v!==h&&f-o<=v*v&&f+o>=h*h},x:this.cx-a[1],y:this.cy-a[1],width:a[1]*2,height:a[1]*2}},r.prototype.convertToPixel=function(t,e,a){var n=oM(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=oM(e);return n===this?this.pointToData(a):null},r}();function oM(r){var t=r.seriesModel,e=r.polarModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}const sQ=oQ;function lQ(r,t,e){var a=t.get("center"),n=Ft(t,e).refContainer;r.cx=ne(a[0],n.width)+n.x,r.cy=ne(a[1],n.height)+n.y;var i=r.getRadiusAxis(),o=Math.min(n.width,n.height)/2,s=t.get("radius");s==null?s=[0,"100%"]:Z(s)||(s=[0,s]);var l=[ne(s[0],o),ne(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function uQ(r,t){var e=this,a=e.getAngleAxis(),n=e.getRadiusAxis();if(a.scale.setExtent(1/0,-1/0),n.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===e){var l=s.getData();A(Th(l,"radius"),function(u){n.scale.unionExtentFromData(l,u)}),A(Th(l,"angle"),function(u){a.scale.unionExtentFromData(l,u)})}}),yl(a.scale,a.model),yl(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 cQ(r){return r.mainType==="angleAxis"}function sM(r,t){var e;if(r.type=t.get("type"),r.scale=Bd(t),r.onBand=t.get("boundaryGap")&&r.type==="category",r.inverse=t.get("inverse"),cQ(t)){r.inverse=r.inverse!==t.get("clockwise");var a=t.get("startAngle"),n=(e=t.get("endAngle"))!==null&&e!==void 0?e:a+(r.inverse?-360:360);r.setExtent(a,n)}t.axis=r,r.model=t}var fQ={dimensions:VO,create:function(r,t){var e=[];return r.eachComponent("polar",function(a,n){var i=new sQ(n+"");i.update=uQ;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=a.findAxisModel("radiusAxis"),u=a.findAxisModel("angleAxis");sM(o,l),sM(s,u),lQ(i,a,t),e.push(i),a.coordinateSystem=i,i.model=a}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="polar"){var n=a.getReferringComponents("polar",gt).models[0];a.coordinateSystem=n.coordinateSystem}}),e}};const vQ=fQ;var hQ=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function sv(r,t,e){t[1]>t[0]&&(t=t.slice().reverse());var a=r.coordToPoint([t[0],e]),n=r.coordToPoint([t[1],e]);return{x1:a[0],y1:a[1],x2:n[0],y2:n[1]}}function lv(r){var t=r.getRadiusAxis();return t.inverse?0:1}function lM(r){var t=r[0],e=r[r.length-1];t&&e&&Math.abs(Math.abs(t.coord-e.coord)-360)<1e-4&&r.pop()}var dQ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.axisPointerClass="PolarAxisPointer",e}return t.prototype.render=function(e,a){if(this.group.removeAll(),!!e.get("show")){var n=e.axis,i=n.polar,o=i.getRadiusAxis().getExtent(),s=n.getTicksCoords({breakTicks:"none"}),l=n.getMinorTicksCoords(),u=X(n.getViewLabels(),function(c){c=me(c);var f=n.scale,v=f.type==="ordinal"?f.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=n.dataToCoord(v),c});lM(u),lM(s),A(hQ,function(c){e.get([c,"show"])&&(!n.scale.isBlank()||c==="axisLine")&&pQ[c](this.group,e,i,s,l,o,u)},this)}},t.type="angleAxis",t}(hs),pQ={axisLine:function(r,t,e,a,n,i){var o=t.getModel(["axisLine","lineStyle"]),s=e.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=lv(e),f=c?0:1,v,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[f]===0?v=new os[h]({shape:{cx:e.cx,cy:e.cy,r:i[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new Cd({shape:{cx:e.cx,cy:e.cy,r:i[c],r0:i[f]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,t,e,a,n,i){var o=t.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[lv(e)],u=X(a,function(c){return new Bt({shape:sv(e,[l,l+s],c.coord)})});r.add(aa(u,{style:xe(o.getModel("lineStyle").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,t,e,a,n,i){if(n.length){for(var o=t.getModel("axisTick"),s=t.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[lv(e)],c=[],f=0;fy?"left":"right",S=Math.abs(g[1]-m)/p<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[d]){var w=s[d];be(w)&&w.textStyle&&(h=new Xe(w.textStyle,l,l.ecModel))}var x=new Ue({silent:Vn.isLabelSilent(t),style:it(h,{x:g[0],y:g[1],fill:h.getTextColor()||t.get(["axisLine","lineStyle","color"]),text:f.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),Hn({el:x,componentModel:t,itemName:f.formattedLabel,formatterParamsExtra:{isTruncated:function(){return x.isTruncated},value:f.rawLabel,tickIndex:v}}),c){var b=Vn.makeAxisEventDataBase(t);b.targetType="axisLabel",b.value=f.rawLabel,De(x).eventData=b}},this)},splitLine:function(r,t,e,a,n,i){var o=t.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],f=0;f=0?"p":"n",R=C;w&&(a[c][I]||(a[c][I]={p:C,n:C}),R=a[c][I][P]);var E=void 0,O=void 0,k=void 0,N=void 0;if(d.dim==="radius"){var B=d.dataToCoord(L)-C,F=l.dataToCoord(I);Math.abs(B)=N})}}})}function bQ(r){var t={};A(r,function(a,n){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=FO(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),f=t[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=f.stacks;t[l]=f;var h=zO(a);v[h]||f.autoWidthCount++,v[h]=v[h]||{width:0,maxWidth:0};var d=ne(a.get("barWidth"),c),p=ne(a.get("barMaxWidth"),c),g=a.get("barGap"),y=a.get("barCategoryGap");d&&!v[h].width&&(d=Math.min(f.remainedWidth,d),v[h].width=d,f.remainedWidth-=d),p&&(v[h].maxWidth=p),g!=null&&(f.gap=g),y!=null&&(f.categoryGap=y)});var e={};return A(t,function(a,n){e[n]={};var i=a.stacks,o=a.bandWidth,s=ne(a.categoryGap,o),l=ne(a.gap,1),u=a.remainedWidth,c=a.autoWidthCount,f=(u-s)/(c+(c-1)*l);f=Math.max(f,0),A(i,function(p,g){var y=p.maxWidth;y&&y=e.y&&t[1]<=e.y+e.height:a.contain(a.toLocalCoord(t[1]))&&t[0]>=e.y&&t[0]<=e.y+e.height},r.prototype.pointToData=function(t,e,a){a=a||[];var n=this.getAxis();return a[0]=n.coordToData(n.toLocalCoord(t[n.orient==="horizontal"?0:1])),a},r.prototype.dataToPoint=function(t,e,a){var n=this.getAxis(),i=this.getRect();a=a||[];var o=n.orient==="horizontal"?0:1;return t instanceof Array&&(t=t[0]),a[o]=n.toGlobalCoord(n.dataToCoord(+t)),a[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,a},r.prototype.convertToPixel=function(t,e,a){var n=uM(e);return n===this?this.dataToPoint(a):null},r.prototype.convertFromPixel=function(t,e,a){var n=uM(e);return n===this?this.pointToData(a):null},r}();function uM(r){var t=r.seriesModel,e=r.singleAxisModel;return e&&e.coordinateSystem||t&&t.coordinateSystem}function OQ(r,t){var e=[];return r.eachComponent("singleAxis",function(a,n){var i=new EQ(a,r,t);i.name="single_"+n,i.resize(a,t),a.coordinateSystem=i,e.push(i)}),r.eachSeries(function(a){if(a.get("coordinateSystem")==="singleAxis"){var n=a.getReferringComponents("singleAxis",gt).models[0];a.coordinateSystem=n&&n.coordinateSystem}}),e}var NQ={create:OQ,dimensions:HO};const BQ=NQ;var cM=["x","y"],VQ=["width","height"],zQ=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.makeElOption=function(e,a,n,i,o){var s=n.axis,l=s.coordinateSystem,u=by(l,1-Yh(s)),c=l.dataToPoint(a)[0],f=i.get("type");if(f&&f!=="none"){var v=RS(i),h=FQ[f](s,c,u);h.style=v,e.graphicKey=h.type,e.pointer=h}var d=W0(n);EO(a,e,d,n,i,o)},t.prototype.getHandleTransform=function(e,a,n){var i=W0(a,{labelInside:!1});i.labelMargin=n.get(["handle","margin"]);var o=ES(a.axis,e,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},t.prototype.updateHandleTransform=function(e,a,n,i){var o=n.axis,s=o.coordinateSystem,l=Yh(o),u=by(s,l),c=[e.x,e.y];c[l]+=a[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var f=by(s,1-l),v=(f[1]+f[0])/2,h=[v,v];return h[l]=c[l],{x:c[0],y:c[1],rotation:e.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},t}(kS),FQ={line:function(r,t,e){var a=OS([t,e[0]],[t,e[1]],Yh(r));return{type:"Line",subPixelOptimize:!0,shape:a}},shadow:function(r,t,e){var a=r.getBandWidth(),n=e[1]-e[0];return{type:"Rect",shape:OO([t-a/2,e[0]],[a,n],Yh(r))}}};function Yh(r){return r.isHorizontal()?0:1}function by(r,t){var e=r.getRect();return[e[cM[t]],e[cM[t]]+e[VQ[t]]]}const GQ=zQ;var HQ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="single",t}(pt);function $Q(r){Oe(qc),hs.registerAxisPointerClass("SingleAxisPointer",GQ),r.registerComponentView(HQ),r.registerComponentView(PQ),r.registerComponentModel(xy),Sl(r,"single",xy,xy.defaultOption),r.registerCoordinateSystem("single",BQ)}var WQ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a,n){var i=ls(e);r.prototype.init.apply(this,arguments),fM(e,i)},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),fM(this.option,e)},t.prototype.getCellSize=function(){return this.option.cellSize},t.type="calendar",t.layoutMode="box",t.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:G.color.axisLine,width:1,type:"solid"}},itemStyle:{color:G.color.neutral00,borderWidth:1,borderColor:G.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:G.size.s,color:G.color.secondary},monthLabel:{show:!0,position:"start",margin:G.size.s,align:"center",formatter:null,color:G.color.secondary},yearLabel:{show:!0,position:null,margin:G.size.xl,formatter:null,color:G.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},t}(We);function fM(r,t){var e=r.cellSize,a;Z(e)?a=e:a=r.cellSize=[e,e],a.length===1&&(a[1]=a[0]);var n=X([0,1],function(i){return fH(t,i)&&(a[i]="auto"),a[i]!=null&&a[i]!=="auto"});nn(r,t,{type:"box",ignoreSize:n})}const YQ=WQ;var UQ=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){var i=this.group;i.removeAll();var o=e.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=a.getLocaleModel();this._renderDayRect(e,s,i),this._renderLines(e,s,l,i),this._renderYearText(e,s,l,i),this._renderMonthText(e,u,l,i),this._renderWeekText(e,u,s,l,i)},t.prototype._renderDayRect=function(e,a,n){for(var i=e.coordinateSystem,o=e.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=a.start.time;u<=a.end.time;u=i.getNextNDay(u,1).time){var c=i.dataToCalendarLayout([u],!1).tl,f=new Ve({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});n.add(f)}},t.prototype._renderLines=function(e,a,n,i){var o=this,s=e.coordinateSystem,l=e.getModel(["splitLine","lineStyle"]).getLineStyle(),u=e.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var f=a.start,v=0;f.time<=a.end.time;v++){d(f.formatedDate),v===0&&(f=s.getDateInfo(a.start.y+"-"+a.start.m));var h=f.date;h.setMonth(h.getMonth()+1),f=s.getDateInfo(h)}d(s.getNextNDay(a.end.time,1).formatedDate);function d(p){o._firstDayOfMonth.push(s.getDateInfo(p)),o._firstDayPoints.push(s.dataToCalendarLayout([p],!1).tl);var g=o._getLinePointsOfOneWeek(e,p,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,c,n),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,n),l,i)},t.prototype._getEdgesPoints=function(e,a,n){var i=[e[0].slice(),e[e.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},t.prototype._drawSplitline=function(e,a,n){var i=new fr({z2:20,shape:{points:e},style:a});n.add(i)},t.prototype._getLinePointsOfOneWeek=function(e,a,n){for(var i=e.coordinateSystem,o=i.getDateInfo(a),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),c=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[n==="horizontal"?"bl":"tr"]}return s},t.prototype._formatterLabel=function(e,a){return oe(e)&&e?nH(e,a):ye(e)?e(a):a.nameMap},t.prototype._yearTextPositionControl=function(e,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 c=0;return(i==="left"||i==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},t.prototype._renderYearText=function(e,a,n,i){var o=e.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]],c=(u[0][0]+u[1][0])/2,f=(u[0][1]+u[1][1])/2,v=n==="horizontal"?0:1,h={top:[c,u[v][1]],bottom:[c,u[1-v][1]],left:[u[1-v][0],f],right:[u[v][0],f]},d=a.start.y;+a.end.y>+a.start.y&&(d=d+"-"+a.end.y);var p=o.get("formatter"),g={start:a.start.y,end:a.end.y,nameMap:d},y=this._formatterLabel(p,g),m=new Ue({z2:30,style:it(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,h[l],n,l,s)),i.add(m)}},t.prototype._monthTextPositionControl=function(e,a,n,i,o){var s="left",l="top",u=e[0],c=e[1];return n==="horizontal"?(c=c+o,a&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,a&&(l="middle"),i==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},t.prototype._renderMonthText=function(e,a,n,i){var o=e.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),f=[this._tlpoints,this._blpoints];(!s||oe(s))&&(s&&(a=Gm(s)||a),s=a.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,h=n==="horizontal"?0:1;l=u==="start"?-l:l;for(var d=c==="center",p=o.get("silent"),g=0;g=i.start.time&&n.times.end.time&&e.reverse(),e},r.prototype._getRangeInfo=function(t){var e=[this.getDateInfo(t[0]),this.getDateInfo(t[1])],a;e[0].time>e[1].time&&(a=!0,e.reverse());var n=Math.floor(e[1].time/Cy)-Math.floor(e[0].time/Cy)+1,i=new Date(e[0].time),o=i.getDate(),s=e[1].date.getDate();i.setDate(o+n-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-e[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-e[1].time)*u>0;)n-=u,i.setDate(l-u);var c=Math.floor((n+e[0].day+6)/7),f=a?-c+1:c-1;return a&&e.reverse(),{range:[e[0].formatedDate,e[1].formatedDate],start:e[0],end:e[1],allDay:n,weeks:c,nthWeek:f,fweek:e[0].day,lweek:e[1].day}},r.prototype._getDateByWeeksAndDay=function(t,e,a){var n=this._getRangeInfo(a);if(t>n.weeks||t===0&&en.lweek)return null;var i=(t-1)*7-n.fweek+e,o=new Date(n.start.time);return o.setDate(+n.start.d+i),this.getDateInfo(o)},r.create=function(t,e){var a=[];return t.eachComponent("calendar",function(n){var i=new r(n,t,e);a.push(i),n.coordinateSystem=i}),t.eachComponent(function(n,i){zc({targetModel:i,coordSysType:"calendar",coordSysProvider:tP})}),a},r.dimensions=["time","value"],r}();function Ty(r){var t=r.calendarModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}const qQ=XQ;function jQ(r){r.registerComponentModel(YQ),r.registerComponentView(ZQ),r.registerCoordinateSystem("calendar",qQ)}var wn={level:1,leaf:2,nonLeaf:3},Pn={none:0,all:1,body:2,corner:3};function Y0(r,t,e){var a=t[Me[e]].getCell(r);return!a&&$e(r)&&r<0&&(a=t[Me[1-e]].getUnitLayoutInfo(e,Math.round(r))),a}function $O(r){var t=r||[];return t[0]=t[0]||[],t[1]=t[1]||[],t[0][0]=t[0][1]=t[1][0]=t[1][1]=NaN,t}function WO(r,t,e,a,n){vM(r[0],t,n,e,a,0),vM(r[1],t,n,e,a,1)}function vM(r,t,e,a,n,i){r[0]=1/0,r[1]=-1/0;var o=a[i],s=Z(o)?o:[o],l=s.length,u=!!e;if(l>=1?(hM(r,t,s,u,n,i,0),l>1&&hM(r,t,s,u,n,i,l-1)):r[0]=r[1]=NaN,u){var c=-n[Me[1-i]].getLocatorCount(i),f=n[Me[i]].getLocatorCount(i)-1;e===Pn.body?c=bt(0,c):e===Pn.corner&&(f=zr(-1,f)),f=t[0]&&r[0]<=t[1]}function gM(r,t){r.id.set(t[0][0],t[1][0]),r.span.set(t[0][1]-r.id.x+1,t[1][1]-r.id.y+1)}function QQ(r,t){r[0][0]=t[0][0],r[0][1]=t[0][1],r[1][0]=t[1][0],r[1][1]=t[1][1]}function yM(r,t,e,a){var n=Y0(t[a][0],e,a),i=Y0(t[a][1],e,a);r[Me[a]]=r[Lt[a]]=NaN,n&&i&&(r[Me[a]]=n.xy,r[Lt[a]]=i.xy+i.wh-n.xy)}function _u(r,t,e,a){return r[Me[t]]=e,r[Me[1-t]]=a,r}function eee(r){return r&&(r.type===wn.leaf||r.type===wn.nonLeaf)?r:null}function Uh(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var mM=function(){function r(t,e){this._cells=[],this._levels=[],this.dim=t,this.dimIdx=t==="x"?0:1,this._model=e,this._uniqueValueGen=tee(t);var a=e.get("data",!0);a!=null&&!Z(a)&&(a=[]),a?this._initByDimModelData(a):this._initBySeriesData()}return r.prototype._initByDimModelData=function(t){var e=this,a=e._cells,n=e._levels,i=[],o=0;e._leavesCount=s(t,0,0),l();return;function s(u,c,f){var v=0;return u&&A(u,function(h,d){var p;oe(h)?p={value:h}:be(h)?(p=h,h.value!=null&&!oe(h.value)&&(p={value:null})):p={value:null};var g={type:wn.nonLeaf,ordinal:NaN,level:f,firstLeafLocator:c,id:new we,span:_u(new we,e.dimIdx,1,1),option:p,xy:NaN,wh:NaN,dim:e,rect:Uh()};o++,(i[c]||(i[c]=[])).push(g),n[f]||(n[f]={type:wn.level,xy:NaN,wh:NaN,option:null,id:new we,dim:e});var y=s(p.children,c,f+1),m=Math.max(1,y);g.span[Me[e.dimIdx]]=m,v+=m,c+=m}),v}function l(){for(var u=[];a.length=1,_=e[Me[a]],S=i.getLocatorCount(a)-1,w=new bi;for(o.resetLayoutIterator(w,a);w.next();)x(w.item);for(i.resetLayoutIterator(w,a);w.next();)x(w.item);function x(b){lr(b.wh)&&(b.wh=y),b.xy=_,b.id[Me[a]]===S&&!m&&(b.wh=e[Me[a]]+e[Lt[a]]-b.xy),_+=b.wh}}function TM(r,t){for(var e=t[Me[r]].resetCellIterator();e.next();){var a=e.item;Zh(a.rect,r,a.id,a.span,t),Zh(a.rect,1-r,a.id,a.span,t),a.type===wn.nonLeaf&&(a.xy=a.rect[Me[r]],a.wh=a.rect[Lt[r]])}}function DM(r,t){r.travelExistingCells(function(e){var a=e.span;if(a){var n=e.spanRect,i=e.id;Zh(n,0,i,a,t),Zh(n,1,i,a,t)}})}function Zh(r,t,e,a,n){r[Lt[t]]=0;var i=e[Me[t]],o=i<0?n[Me[1-t]]:n[Me[t]],s=o.getUnitLayoutInfo(t,e[Me[t]]);if(r[Me[t]]=s.xy,r[Lt[t]]=s.wh,a[Me[t]]>1){var l=o.getUnitLayoutInfo(t,e[Me[t]]+a[Me[t]]-1);r[Lt[t]]=l.xy+l.wh-s.xy}}function gee(r,t,e){var a=sh(r,e[Lt[t]]);return Z0(a,e[Lt[t]])}function Z0(r,t){return Math.max(Math.min(r,de(t,1/0)),0)}function Ay(r){var t=r.matrixModel,e=r.seriesModel,a=t?t.coordinateSystem:e?e.coordinateSystem:null;return a}var Kt={inBody:1,inCorner:2,outside:3},Oa={x:null,y:null,point:[]};function MM(r,t,e,a,n){var i=e[Me[t]],o=e[Me[1-t]],s=i.getUnitLayoutInfo(t,i.getLocatorCount(t)-1),l=i.getUnitLayoutInfo(t,0),u=o.getUnitLayoutInfo(t,-o.getLocatorCount(t)),c=o.shouldShow()?o.getUnitLayoutInfo(t,-1):null,f=r.point[t]=a[t];if(!l&&!c){r[Me[t]]=Kt.outside;return}if(n===Pn.body){l?(r[Me[t]]=Kt.inBody,f=zr(s.xy+s.wh,bt(l.xy,f)),r.point[t]=f):r[Me[t]]=Kt.outside;return}else if(n===Pn.corner){c?(r[Me[t]]=Kt.inCorner,f=zr(c.xy+c.wh,bt(u.xy,f)),r.point[t]=f):r[Me[t]]=Kt.outside;return}var v=l?l.xy:c?c.xy+c.wh:NaN,h=u?u.xy:v,d=s?s.xy+s.wh:v;if(fd){if(!n){r[Me[t]]=Kt.outside;return}f=d}r.point[t]=f,r[Me[t]]=v<=f&&f<=d?Kt.inBody:h<=f&&f<=v?Kt.inCorner:Kt.outside}function AM(r,t,e,a){var n=1-e;if(r[Me[e]]!==Kt.outside)for(a[Me[e]].resetCellIterator(My);My.next();){var i=My.item;if(LM(r.point[e],i.rect,e)&&LM(r.point[n],i.rect,n)){t[e]=i.ordinal,t[n]=i.id[Me[n]];return}}}function IM(r,t,e,a){if(r[Me[e]]!==Kt.outside){var n=r[Me[e]]===Kt.inCorner?a[Me[1-e]]:a[Me[e]];for(n.resetLayoutIterator(hv,e);hv.next();)if(yee(r.point[e],hv.item)){t[e]=hv.item.id[Me[e]];return}}}function yee(r,t){return t.xy<=r&&r<=t.xy+t.wh}function LM(r,t,e){return t[Me[e]]<=r&&r<=t[Me[e]]+t[Lt[e]]}const mee=pee;function _ee(r){r.registerComponentModel(oee),r.registerComponentView(dee),r.registerCoordinateSystem("matrix",mee)}function See(r,t){var e=r.existing;if(t.id=r.keyInfo.id,!t.type&&e&&(t.type=e.type),t.parentId==null){var a=t.parentOption;a?t.parentId=a.id:e&&(t.parentId=e.parentId)}t.parentOption=null}function PM(r,t){var e;return A(t,function(a){r[a]!=null&&r[a]!=="auto"&&(e=!0)}),e}function wee(r,t,e){var a=$({},e),n=r[t],i=e.$action||"merge";i==="merge"?n?(Re(n,a,!0),nn(n,a,{ignoreSize:!0}),oP(e,n),dv(e,n),dv(e,n,"shape"),dv(e,n,"style"),dv(e,n,"extra"),e.clipPath=n.clipPath):r[t]=a:i==="replace"?r[t]=a:i==="remove"&&n&&(r[t]=null)}var UO=["transition","enterFrom","leaveTo"],xee=UO.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function dv(r,t,e){if(e&&(!r[e]&&t[e]&&(r[e]={}),r=r[e],t=t[e]),!(!r||!t))for(var a=e?UO:xee,n=0;n=0;c--){var f=n[c],v=Nt(f.id,null),h=v!=null?o.get(v):null;if(h){var d=h.parent,y=Qr(d),m=d===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=Pd(h,f,m,null,{hv:f.hv,boundingMode:f.bounding},_);if(!Qr(h).isNew&&S){for(var w=f.transition,x={},b=0;b=0)?x[T]=C:h[T]=C}Ze(h,x,e,0)}else h.attr(_)}}},t.prototype._clear=function(){var e=this,a=this._elMap;a.each(function(n){Uv(n,Qr(n).option,a,e._lastGraphicModel)}),this._elMap=ve()},t.prototype.dispose=function(){this._clear()},t.type="graphic",t}(pt);function X0(r){var t=ue(kM,r)?kM[r]:vh(r),e=new t({});return Qr(e).type=r,e}function RM(r,t,e,a){var n=X0(e);return t.add(n),a.set(r,n),Qr(n).id=r,Qr(n).isNew=!0,n}function Uv(r,t,e,a){var n=r&&r.parent;n&&(r.type==="group"&&r.traverse(function(i){Uv(i,t,e,a)}),Zd(r,t,a),e.removeKey(Qr(r).id))}function EM(r,t,e,a){r.isGroup||A([["cursor",la.prototype.cursor],["zlevel",a||0],["z",e||0],["z2",0]],function(n){var i=n[0];ue(t,i)?r[i]=de(t[i],n[1]):r[i]==null&&(r[i]=n[1])}),A(He(t),function(n){if(n.indexOf("on")===0){var i=t[n];r[n]=ye(i)?i:null}}),ue(t,"draggable")&&(r.draggable=t.draggable),t.name!=null&&(r.name=t.name),t.id!=null&&(r.id=t.id)}function Dee(r){return r=$({},r),A(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(rP),function(t){delete r[t]}),r}function Mee(r,t,e){var a=De(r).eventData;!r.silent&&!r.ignore&&!a&&(a=De(r).eventData={componentType:"graphic",componentIndex:t.componentIndex,name:r.name}),a&&(a.info=e.info)}function Aee(r){r.registerComponentModel(Cee),r.registerComponentView(Tee),r.registerPreprocessor(function(t){var e=t.graphic;Z(e)?!e[0]||!e[0].elements?t.graphic=[{elements:e}]:t.graphic=[t.graphic[0]]:e&&!e.elements&&(t.graphic=[{elements:[e]}])})}var OM=["x","y","radius","angle","single"],Iee=["cartesian2d","polar","singleAxis"];function Lee(r){var t=r.get("coordinateSystem");return ke(Iee,t)>=0}function _i(r){return r+"Axis"}function Pee(r,t){var e=ve(),a=[],n=ve();r.eachComponent({mainType:"dataZoom",query:t},function(c){n.get(c.uid)||s(c)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(c){!n.get(c.uid)&&l(c)&&(s(c),i=!0)}function s(c){n.set(c.uid,!0),a.push(c),u(c)}function l(c){var f=!1;return c.eachTargetAxis(function(v,h){var d=e.get(v);d&&d[h]&&(f=!0)}),f}function u(c){c.eachTargetAxis(function(f,v){(e.get(f)||e.set(f,[]))[v]=!0})}return a}function ZO(r){var t=r.ecModel,e={infoList:[],infoMap:ve()};return r.eachTargetAxis(function(a,n){var i=t.getComponent(_i(a),n);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=e.infoMap.get(s);l||(l={model:o,axisModels:[]},e.infoList.push(l),e.infoMap.set(s,l)),l.axisModels.push(i)}}}),e}var Iy=function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(t){this.indexMap[t]||(this.indexList.push(t),this.indexMap[t]=!0)},r}(),kee=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._autoThrottle=!0,e._noTarget=!0,e._rangePropMode=["percent","percent"],e}return t.prototype.init=function(e,a,n){var i=NM(e);this.settledOption=i,this.mergeDefaultAndTheme(e,n),this._doInit(i)},t.prototype.mergeOption=function(e){var a=NM(e);Re(this.option,e,!0),Re(this.settledOption,a,!0),this._doInit(a)},t.prototype._doInit=function(e){var a=this.option;this._setDefaultThrottle(e),this._updateRangeUse(e);var n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(a[i[0]]=n[i[0]]=null)},this),this._resetTarget()},t.prototype._resetTarget=function(){var e=this.get("orient",!0),a=this._targetAxisInfoMap=ve(),n=this._fillSpecifiedTargetAxis(a);n?this._orient=e||this._makeAutoOrientByTargetAxis():(this._orient=e||"horizontal",this._fillAutoTargetAxisByOrient(a,this._orient)),this._noTarget=!0,a.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},t.prototype._fillSpecifiedTargetAxis=function(e){var a=!1;return A(OM,function(n){var i=this.getReferringComponents(_i(n),I3);if(i.specified){a=!0;var o=new Iy;A(i.models,function(s){o.add(s.componentIndex)}),e.set(n,o)}},this),a},t.prototype._fillAutoTargetAxisByOrient=function(e,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(c){return c.get("orient",!0)===a}});l(s,"single")}function l(u,c){var f=u[0];if(f){var v=new Iy;if(v.add(f.componentIndex),e.set(c,v),i=!1,c==="x"||c==="y"){var h=f.getReferringComponents("grid",gt).models[0];h&&A(u,function(d){f.componentIndex!==d.componentIndex&&h===d.getReferringComponents("grid",gt).models[0]&&v.add(d.componentIndex)})}}}i&&A(OM,function(u){if(i){var c=n.findComponents({mainType:_i(u),filter:function(v){return v.get("type",!0)==="category"}});if(c[0]){var f=new Iy;f.add(c[0].componentIndex),e.set(u,f),i=!1}}},this)},t.prototype._makeAutoOrientByTargetAxis=function(){var e;return this.eachTargetAxis(function(a){!e&&(e=a)},this),e==="y"?"vertical":"horizontal"},t.prototype._setDefaultThrottle=function(e){if(e.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var a=this.ecModel.option;this.option.throttle=a.animation&&a.animationDurationUpdate>0?100:20}},t.prototype._updateRangeUse=function(e){var a=this._rangePropMode,n=this.get("rangeMode");A([["start","startValue"],["end","endValue"]],function(i,o){var s=e[i[0]]!=null,l=e[i[1]]!=null;s&&!l?a[o]="percent":!s&&l?a[o]="value":n?a[o]=n[o]:s&&(a[o]="percent")})},t.prototype.noTarget=function(){return this._noTarget},t.prototype.getFirstTargetAxisModel=function(){var e;return this.eachTargetAxis(function(a,n){e==null&&(e=this.ecModel.getComponent(_i(a),n))},this),e},t.prototype.eachTargetAxis=function(e,a){this._targetAxisInfoMap.each(function(n,i){A(n.indexList,function(o){e.call(a,i,o)})})},t.prototype.getAxisProxy=function(e,a){var n=this.getAxisModel(e,a);if(n)return n.__dzAxisProxy},t.prototype.getAxisModel=function(e,a){var n=this._targetAxisInfoMap.get(e);if(n&&n.indexMap[a])return this.ecModel.getComponent(_i(e),a)},t.prototype.setRawRange=function(e){var a=this.option,n=this.settledOption;A([["start","startValue"],["end","endValue"]],function(i){(e[i[0]]!=null||e[i[1]]!=null)&&(a[i[0]]=n[i[0]]=e[i[0]],a[i[1]]=n[i[1]]=e[i[1]])},this),this._updateRangeUse(e)},t.prototype.setCalculatedRange=function(e){var a=this.option;A(["start","startValue","end","endValue"],function(n){a[n]=e[n]})},t.prototype.getPercentRange=function(){var e=this.findRepresentativeAxisProxy();if(e)return e.getDataPercentWindow()},t.prototype.getValueRange=function(e,a){if(e==null&&a==null){var n=this.findRepresentativeAxisProxy();if(n)return n.getDataValueWindow()}else return this.getAxisProxy(e,a).getDataValueWindow()},t.prototype.findRepresentativeAxisProxy=function(e){if(e)return e.__dzAxisProxy;for(var a,n=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!w)return!0;_&&(g=!0),S&&(d=!0),w&&(p=!0)}return g&&d&&p})}else Xs(c,function(h){if(i==="empty")l.setData(u=u.map(h,function(p){return s(p)?p:NaN}));else{var d={};d[h]=o,u.selectRange(d)}});Xs(c,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var t=this._minMaxSpan={},e=this._dataZoomModel,a=this._dataExtent;Xs(["min","max"],function(n){var i=e.get(n+"Span"),o=e.get(n+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=Je(a[0]+o,a,[0,100],!0):i!=null&&(o=Je(i,[0,100],a,!0)-a[0]),t[n+"Span"]=i,t[n+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var t=this.getAxisModel(),e=this._percentWindow,a=this._valueWindow;if(e){var n=DI(a,[0,500]);n=Math.min(n,20);var i=t.axis.scale.rawExtentInfo;e[0]!==0&&i.setDeterminedMinMax("min",+a[0].toFixed(n)),e[1]!==100&&i.setDeterminedMinMax("max",+a[1].toFixed(n)),i.freeze()}},r}();function zee(r,t,e){var a=[1/0,-1/0];Xs(e,function(o){eY(a,o.getData(),t)});var n=r.getAxisModel(),i=Hk(n.axis.scale,n,a).calculate();return[i.min,i.max]}const Fee=Vee;var Gee={getTargetSeries:function(r){function t(n){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(_i(o),s);n(o,s,l,i)})})}t(function(n,i,o,s){o.__dzAxisProxy=null});var e=[];t(function(n,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Fee(n,i,s,r),e.push(o.__dzAxisProxy))});var a=ve();return A(e,function(n){A(n.getTargetSeriesModels(),function(i){a.set(i.uid,i)})}),a},overallReset:function(r,t){r.eachComponent("dataZoom",function(e){e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).reset(e)}),e.eachTargetAxis(function(a,n){e.getAxisProxy(a,n).filterData(e,t)})}),r.eachComponent("dataZoom",function(e){var a=e.findRepresentativeAxisProxy();if(a){var n=a.getDataPercentWindow(),i=a.getDataValueWindow();e.setCalculatedRange({start:n[0],end:n[1],startValue:i[0],endValue:i[1]})}})}};const Hee=Gee;function $ee(r){r.registerAction("dataZoom",function(t,e){var a=Pee(e,t);A(a,function(n){n.setRawRange({start:t.start,end:t.end,startValue:t.startValue,endValue:t.endValue})})})}var VM=!1;function HS(r){VM||(VM=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Hee),$ee(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Wee(r){r.registerComponentModel(Eee),r.registerComponentView(Bee),HS(r)}var ra=function(){function r(){}return r}(),XO={};function qs(r,t){XO[r]=t}function qO(r){return XO[r]}var Yee=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var e=this.ecModel;A(this.option.feature,function(a,n){var i=qO(n);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(e)),Re(a,i.defaultOption))})},t.type="toolbox",t.layoutMode={type:"box",ignoreSize:!0},t.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:G.color.border,borderRadius:0,borderWidth:0,padding:G.size.m,itemSize:15,itemGap:G.size.s,showTitle:!0,iconStyle:{borderColor:G.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:G.color.accent50}},tooltip:{show:!1,position:"bottom"}},t}(We);const Uee=Yee;function jO(r,t){var e=Vc(t.get("padding")),a=t.getItemStyle(["color","opacity"]);a.fill=t.get("backgroundColor");var n=new Ve({shape:{x:r.x-e[3],y:r.y-e[0],width:r.width+e[1]+e[3],height:r.height+e[0]+e[2],r:t.get("borderRadius")},style:a,silent:!0,z2:-1});return n}var Zee=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){var o=this.group;if(o.removeAll(),!e.get("show"))return;var s=+e.get("itemSize"),l=e.get("orient")==="vertical",u=e.get("feature")||{},c=this._features||(this._features={}),f=[];A(u,function(m,_){f.push(_)}),new Bn(this._featureNames||[],f).add(v).update(v).remove(Pe(v,null)).execute(),this._featureNames=f;function v(m,_){var S=f[m],w=f[_],x=u[S],b=new Xe(x,e,e.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(x.title=i.newTitle),S&&!w){if(Xee(S))T={onclick:b.option.onclick,featureName:S};else{var C=qO(S);if(!C)return;T=new C}c[S]=T}else if(T=c[w],!T)return;T.uid=El("toolbox-feature"),T.model=b,T.ecModel=a,T.api=n;var D=T instanceof ra;if(!S&&w){D&&T.dispose&&T.dispose(a,n);return}if(!b.get("show")||D&&T.unusable){D&&T.remove&&T.remove(a,n);return}h(b,T,S),b.setIconStatus=function(M,L){var I=this.option,P=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[M]=L,P[M]&&(L==="emphasis"?On:Nn)(P[M])},T instanceof ra&&T.render&&T.render(b,a,n,i)}function h(m,_,S){var w=m.getModel("iconStyle"),x=m.getModel(["emphasis","iconStyle"]),b=_ instanceof ra&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,D;oe(b)?(C={},C[S]=b):C=b,oe(T)?(D={},D[S]=T):D=T;var M=m.iconPaths={};A(C,function(L,I){var P=Bc(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(w.getItemStyle());var R=P.ensureState("emphasis");R.style=x.getItemStyle();var E=new Ue({style:{text:D[I],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:s1({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},a)},ignore:!0});P.setTextContent(E),Hn({el:P,componentModel:e,itemName:I,formatterParamsExtra:{title:D[I]}}),P.__title=D[I],P.on("mouseover",function(){var O=x.getItemStyle(),k=l?e.get("right")==null&&e.get("left")!=="right"?"right":"left":e.get("bottom")==null&&e.get("top")!=="bottom"?"bottom":"top";E.setStyle({fill:x.get("textFill")||O.fill||O.stroke||G.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),P.setTextConfig({position:x.get("textPosition")||k}),E.ignore=!e.get("showTitle"),n.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",I])!=="emphasis"&&n.leaveEmphasis(this),E.hide()}),(m.get(["iconStatus",I])==="emphasis"?On:Nn)(P),o.add(P),P.on("click",se(_.onclick,_,a,n,I)),M[I]=P})}var d=Ft(e,n).refContainer,p=e.getBoxLayoutParams(),g=e.get("padding"),y=ct(p,d,g);Ho(e.get("orient"),o,e.get("itemGap"),y.width,y.height),Pd(o,p,d,g),o.add(jO(o.getBoundingRect(),e)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),w=S.textConfig||(S.textConfig={}),x=m.getTextContent(),b=x&&x.ensureState("emphasis");if(b&&!ye(b)&&_){var T=b.style||(b.style={}),C=pd(_,Ue.makeFont(T)),D=m.x+o.x,M=m.y+o.y+s,L=!1;M+C.height>n.getHeight()&&(w.position="top",L=!0);var I=L?-5-C.height:s+10;D+C.width/2>n.getWidth()?(w.position=["100%",I],T.align="right"):D-C.width/2<0&&(w.position=[0,I],T.align="left")}})},t.prototype.updateView=function(e,a,n,i){A(this._features,function(o){o instanceof ra&&o.updateView&&o.updateView(o.model,a,n,i)})},t.prototype.remove=function(e,a){A(this._features,function(n){n instanceof ra&&n.remove&&n.remove(e,a)}),this.group.removeAll()},t.prototype.dispose=function(e,a){A(this._features,function(n){n instanceof ra&&n.dispose&&n.dispose(e,a)})},t.type="toolbox",t}(pt);function Xee(r){return r.indexOf("my")===0}const qee=Zee;var jee=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){var n=this.model,i=n.get("name")||e.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)||e.get("backgroundColor")||G.color.neutral00,connectedBackgroundColor:n.get("connectedBackgroundColor"),excludeComponents:n.get("excludeComponents"),pixelRatio:n.get("pixelRatio")}),u=qe.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=i+"."+s,c.target="_blank",c.href=l;var f=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(f)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),h=v[0].indexOf("base64")>-1,d=o?decodeURIComponent(v[1]):v[1];h&&(d=window.atob(d));var p=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=d.length,y=new Uint8Array(g);g--;)y[g]=d.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,p)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,w=S.document;w.open("image/svg+xml","replace"),w.write(d),w.close(),S.focus(),w.execCommand("SaveAs",!0,p),document.body.removeChild(_)}}else{var x=n.get("lang"),b='',T=window.open();T.document.write(b),T.document.title=i}},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:G.color.neutral00,name:"",excludeComponents:["toolbox"],lang:e.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return a},t}(ra);const Kee=jee;var zM="__ec_magicType_stack__",Jee=[["line","bar"],["stack"]],Qee=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.getIcons=function(){var e=this.model,a=e.get("icon"),n={};return A(e.get("type"),function(i){a[i]&&(n[i]=a[i])}),n},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return a},t.prototype.onclick=function(e,a,n){var i=this.model,o=i.get(["seriesIndex",n]);if(FM[n]){var s={series:[]},l=function(f){var v=f.subType,h=f.id,d=FM[n](v,h,f,i);d&&(xe(d,f.option),s.series.push(d));var p=f.coordinateSystem;if(p&&p.type==="cartesian2d"&&(n==="line"||n==="bar")){var g=p.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=f.getReferringComponents(m,gt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var w=0;w<=S;w++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=n==="bar"}}};A(Jee,function(f){ke(f,n)>=0&&A(f,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(n,"emphasis"),e.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=n;n==="stack"&&(u=Re({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",n])!=="emphasis"&&(c="tiled")),a.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},t}(ra),FM={line:function(r,t,e,a){if(r==="bar")return Re({id:t,type:"line",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","line"])||{},!0)},bar:function(r,t,e,a){if(r==="line")return Re({id:t,type:"bar",data:e.get("data"),stack:e.get("stack"),markPoint:e.get("markPoint"),markLine:e.get("markLine")},a.get(["option","bar"])||{},!0)},stack:function(r,t,e,a){var n=e.get("stack")===zM;if(r==="line"||r==="bar")return a.setIconStatus("stack",n?"normal":"emphasis"),Re({id:t,stack:n?"":zM},a.get(["option","stack"])||{},!0)}};ln({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,t){t.mergeOption(r.newOption)});const ete=Qee;var Xd=new Array(60).join("-"),Cl=" ";function tte(r){var t={},e=[],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;t[s]||(t[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},a.push({axisDim:o.dim,axisIndex:o.index})),t[s].series.push(n)}else e.push(n)}else e.push(n)}),{seriesGroupByCategoryAxis:t,other:e,meta:a}}function rte(r){var t=[];return A(r,function(e,a){var n=e.categoryAxis,i=e.valueAxis,o=i.dim,s=[" "].concat(X(e.series,function(h){return h.name})),l=[n.model.getCategories()];A(e.series,function(h){var d=h.getRawData();l.push(h.getRawData().mapArray(d.mapDimension(o),function(p){return p}))});for(var u=[s.join(Cl)],c=0;c=0)return!0}var q0=new RegExp("["+Cl+"]+","g");function ote(r){for(var t=r.split(/\n+/g),e=Xh(t.shift()).split(q0),a=[],n=X(e,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=e[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();e[0][n]={dataZoomId:n,start:l[0],end:l[1]}}}}),e.push(t)}function hte(r){var t=$S(r),e=t[t.length-1];t.length>1&&t.pop();var a={};return KO(e,function(n,i){for(var o=t.length-1;o>=0;o--)if(n=t[o][i],n){a[i]=n;break}}),a}function dte(r){JO(r).snapshots=null}function pte(r){return $S(r).length}function $S(r){var t=JO(r);return t.snapshots||(t.snapshots=[{}]),t.snapshots}var gte=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.onclick=function(e,a){dte(e),a.dispatchAction({type:"restore",from:this.uid})},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","restore","title"])};return a},t}(ra);ln({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,t){t.resetOption("recreate")});const yte=gte;var mte=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],_te=function(){function r(t,e,a){var n=this;this._targetInfoList=[];var i=GM(e,t);A(Ste,function(o,s){(!a||!a.include||ke(a.include,s)>=0)&&o(i,n._targetInfoList)})}return r.prototype.setOutputRanges=function(t,e){return this.matchOutputRanges(t,e,function(a,n,i){if((a.coordRanges||(a.coordRanges=[])).push(n),!a.coordRange){a.coordRange=n;var o=Ly[a.brushType](0,i,n);a.__rangeOffset={offset:YM[a.brushType](o.values,a.range,[1,1]),xyMinMax:o.xyMinMax}}}),t},r.prototype.matchOutputRanges=function(t,e,a){A(t,function(n){var i=this.findTargetInfo(n,e);i&&i!==!0&&A(i.coordSyses,function(o){var s=Ly[n.brushType](1,o,n.range,!0);a(n,s.values,o,e)})},this)},r.prototype.setInputRanges=function(t,e){A(t,function(a){var n=this.findTargetInfo(a,e);if(a.range=a.range||[],n&&n!==!0){a.panelId=n.panelId;var i=Ly[a.brushType](0,n.coordSys,a.coordRange),o=a.__rangeOffset;a.range=o?YM[a.brushType](i.values,o.offset,wte(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(t,e){return X(this._targetInfoList,function(a){var n=a.getPanelRect();return{panelId:a.panelId,defaultBrushType:e?e(a):null,clipPath:rO(n),isTargetByCursor:nO(n,t,a.coordSysModel),getLinearBrushOtherExtent:aO(n)}})},r.prototype.controlSeries=function(t,e,a){var n=this.findTargetInfo(t,a);return n===!0||n&&ke(n.coordSyses,e.coordinateSystem)>=0},r.prototype.findTargetInfo=function(t,e){for(var a=this._targetInfoList,n=GM(e,t),i=0;ir[1]&&r.reverse(),r}function GM(r,t){return sl(r,t,{includeMainTypes:mte})}var Ste={grid:function(r,t){var e=r.xAxisModels,a=r.yAxisModels,n=r.gridModels,i=ve(),o={},s={};!e&&!a&&!n||(A(e,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),A(a,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),A(n,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,c=[];A(u.getCartesians(),function(f,v){(ke(e,f.getAxis("x").model)>=0||ke(a,f.getAxis("y").model)>=0)&&c.push(f)}),t.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:$M.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,t){A(r.geoModels,function(e){var a=e.coordinateSystem;t.push({panelId:"geo--"+e.id,geoModel:e,coordSysModel:e,coordSys:a,coordSyses:[a],getPanelRect:$M.geo})})}},HM=[function(r,t){var e=r.xAxisModel,a=r.yAxisModel,n=r.gridModel;return!n&&e&&(n=e.axis.grid.model),!n&&a&&(n=a.axis.grid.model),n&&n===t.gridModel},function(r,t){var e=r.geoModel;return e&&e===t.geoModel}],$M={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,t=r.getBoundingRect().clone();return t.applyTransform(Go(r)),t}},Ly={lineX:Pe(WM,0),lineY:Pe(WM,1),rect:function(r,t,e,a){var n=r?t.pointToData([e[0][0],e[1][0]],a):t.dataToPoint([e[0][0],e[1][0]],a),i=r?t.pointToData([e[0][1],e[1][1]],a):t.dataToPoint([e[0][1],e[1][1]],a),o=[j0([n[0],i[0]]),j0([n[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,t,e,a){var n=[[1/0,-1/0],[1/0,-1/0]],i=X(e,function(o){var s=r?t.pointToData(o,a):t.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 WM(r,t,e,a){var n=e.getAxis(["x","y"][r]),i=j0(X([0,1],function(s){return t?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 YM={lineX:Pe(UM,0),lineY:Pe(UM,1),rect:function(r,t,e){return[[r[0][0]-e[0]*t[0][0],r[0][1]-e[0]*t[0][1]],[r[1][0]-e[1]*t[1][0],r[1][1]-e[1]*t[1][1]]]},polygon:function(r,t,e){return X(r,function(a,n){return[a[0]-e[0]*t[n][0],a[1]-e[1]*t[n][1]]})}};function UM(r,t,e,a){return[t[0]-a[r]*e[0],t[1]-a[r]*e[1]]}function wte(r,t){var e=ZM(r),a=ZM(t),n=[e[0]/a[0],e[1]/a[1]];return isNaN(n[0])&&(n[0]=1),isNaN(n[1])&&(n[1]=1),n}function ZM(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const WS=_te;var K0=A,xte=C3("toolbox-dataZoom_"),bte=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,a,n,i){this._brushController||(this._brushController=new SS(n.getZr()),this._brushController.on("brush",se(this._onBrush,this)).mount()),Dte(e,a,this,i,n),Tte(e,a)},t.prototype.onclick=function(e,a,n){Cte[n].call(this)},t.prototype.remove=function(e,a){this._brushController&&this._brushController.unmount()},t.prototype.dispose=function(e,a){this._brushController&&this._brushController.dispose()},t.prototype._onBrush=function(e){var a=e.areas;if(!e.isEnd||!a.length)return;var n={},i=this.ecModel;this._brushController.updateCovers([]);var o=new WS(YS(this.model),i,{include:["grid"]});o.matchOutputRanges(a,i,function(u,c,f){if(f.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",f,c[0]),s("y",f,c[1])):s({lineX:"x",lineY:"y"}[v],f,c)}}),vte(i,n),this._dispatchZoomAction(n);function s(u,c,f){var v=c.getAxis(u),h=v.model,d=l(u,h,i),p=d.findRepresentativeAxisProxy(h).getMinMaxSpan();(p.minValueSpan!=null||p.maxValueSpan!=null)&&(f=ki(0,f.slice(),v.scale.getExtent(),0,p.minValueSpan,p.maxValueSpan)),d&&(n[d.id]={dataZoomId:d.id,startValue:f[0],endValue:f[1]})}function l(u,c,f){var v;return f.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var d=h.getAxisModel(u,c.componentIndex);d&&(v=h)}),v}},t.prototype._dispatchZoomAction=function(e){var a=[];K0(e,function(n,i){a.push(me(n))}),a.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:a})},t.getDefaultOption=function(e){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:e.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:G.color.backgroundTint}};return a},t}(ra),Cte={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(hte(this.ecModel))}};function YS(r){var t={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return t.xAxisIndex==null&&t.xAxisId==null&&(t.xAxisIndex="all"),t.yAxisIndex==null&&t.yAxisId==null&&(t.yAxisIndex="all"),t}function Tte(r,t){r.setIconStatus("back",pte(t)>1?"emphasis":"normal")}function Dte(r,t,e,a,n){var i=e._isZoomActive;a&&a.type==="takeGlobalCursor"&&(i=a.key==="dataZoomSelect"?a.dataZoomSelectActive:!1),e._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new WS(YS(r),t,{include:["grid"]}),s=o.makePanelOpts(n,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});e._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}mH("dataZoom",function(r){var t=r.getComponent("toolbox",0),e=["feature","dataZoom"];if(!t||t.get(e)==null)return;var a=t.getModel(e),n=[],i=YS(a),o=sl(r,i);K0(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),K0(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var f=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:a.get("filterMode",!0)||"filter",id:xte+u+f};v[c]=f,n.push(v)}return n});const Mte=bte;function Ate(r){r.registerComponentModel(Uee),r.registerComponentView(qee),qs("saveAsImage",Kee),qs("magicType",ete),qs("dataView",fte),qs("dataZoom",Mte),qs("restore",yte),Oe(Wee)}var Ite=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="tooltip",t.dependencies=["axisPointer"],t.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:G.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:G.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:G.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:G.color.tertiary,fontSize:14}},t}(We);const Lte=Ite;function QO(r){var t=r.get("confine");return t!=null?!!t:r.get("renderMode")==="richText"}function eN(r){if(qe.domSupported){for(var t=document.documentElement.style,e=0,a=r.length;e-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 c=u*Math.PI/180,f=o+n,v=f*Math.abs(Math.cos(c))+f*Math.abs(Math.sin(c)),h=Math.round(((v-Math.SQRT2*n)/2+Math.SQRT2*n-(v-f)/2)*100)/100;s+=";"+i+":-"+h+"px";var d=t+" solid "+n+"px;",p=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+d,"border-right:"+d,"background-color:"+a+";"];return'
'}function Bte(r,t,e){var a="cubic-bezier(0.23,1,0.32,1)",n="",i="";return e&&(n=" "+r/2+"s "+a,i="opacity"+n+",visibility"+n),t||(n=" "+r+"s "+a,i+=(i.length?",":"")+(qe.transformSupported?""+US+n:",left"+n+",top"+n)),Rte+":"+i}function XM(r,t,e){var a=r.toFixed(0)+"px",n=t.toFixed(0)+"px";if(!qe.transformSupported)return e?"top:"+n+";left:"+a+";":[["top",n],["left",a]];var i=qe.transform3dSupported,o="translate"+(i?"3d":"")+"("+a+","+n+(i?",0":"")+")";return e?"top:0;left:0;"+US+":"+o+";":[["top",0],["left",0],[tN,o]]}function Vte(r){var t=[],e=r.get("fontSize"),a=r.getTextColor();a&&t.push("color:"+a),t.push("font:"+r.getFont());var n=de(r.get("lineHeight"),Math.round(e*3/2));e&&t.push("line-height:"+n+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&t.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),A(["decoration","align"],function(u){var c=r.get(u);c&&t.push("text-"+u+":"+c)}),t.join(";")}function zte(r,t,e,a){var n=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),c=r.get("shadowOffsetY"),f=r.getModel("textStyle"),v=FP(r,"html"),h=u+"px "+c+"px "+s+"px "+l;return n.push("box-shadow:"+h),t&&i>0&&n.push(Bte(i,e,a)),o&&n.push("background-color:"+o),A(["width","color","radius"],function(d){var p="border-"+d,g=KL(p),y=r.get(g);y!=null&&n.push(p+":"+y+(d==="color"?"":"px"))}),n.push(Vte(f)),v!=null&&n.push("padding:"+Vc(v).join("px ")+"px"),n.join(";")+";"}function qM(r,t,e,a,n){var i=t&&t.painter;if(e){var o=i&&i.getViewportRoot();o&&zz(r,o,e,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]/t.getWidth(),r[3]=r[1]/t.getHeight()}var Fte=function(){function r(t,e){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,qe.wxa)return null;var a=document.createElement("div");a.domBelongToZr=!0,this.el=a;var n=this._zr=t.getZr(),i=e.appendTo,o=i&&(oe(i)?document.querySelector(i):fl(i)?i:ye(i)&&i(t.getDom()));qM(this._styleCoord,n,o,t.getWidth()/2,t.getHeight()/2),(o||t.getDom()).appendChild(a),this._api=t,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,c=n.painter.getViewportRoot();qr(c,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(t){if(!this._container){var e=this._api.getDom(),a=kte(e,"position"),n=e.style;n.position!=="absolute"&&a!=="absolute"&&(n.position="relative")}var i=t.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=t.get("displayTransition")&&t.get("transitionDuration")>0,this.el.className=t.get("className")||""},r.prototype.show=function(t,e){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var a=this.el,n=a.style,i=this._styleCoord;a.innerHTML?n.cssText=Ete+zte(t,!this._firstShow,this._longHide,this._enableDisplayTransition)+XM(i[0],i[1],!0)+("border-color:"+Jo(e)+";")+(t.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):n.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(t,e,a,n,i){var o=this.el;if(t==null){o.innerHTML="";return}var s="";if(oe(i)&&a.get("trigger")==="item"&&!QO(a)&&(s=Nte(a,n,i)),oe(t))o.innerHTML=t+s;else if(t){o.innerHTML="",Z(t)||(t=[t]);for(var l=0;l=0?this._tryShow(i,o):n==="leave"&&this._hide(o))},this))},t.prototype._keepShow=function(){var e=this._tooltipModel,a=this._ecModel,n=this._api,i=e.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(e,a,n,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},t.prototype.manuallyShowTip=function(e,a,n,i){if(!(i.from===this.uid||qe.node||!n.getDom())){var o=JM(i,n);this._ticket="";var s=i.dataByCoordSys,l=qte(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 c=Wte;c.x=i.x,c.y=i.y,c.update(),De(c).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:c},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(e,a,n,i))return;var f=BO(i,a),v=f.point[0],h=f.point[1];v!=null&&h!=null&&this._tryShow({offsetX:v,offsetY:h,target:f.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))}},t.prototype.manuallyHideTip=function(e,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(JM(i,n))},t.prototype._manuallyAxisShowTip=function(e,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 c=u.getData(),f=wu([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(f.get("trigger")==="axis")return n.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},t.prototype._tryShow=function(e,a){var n=e.target,i=this._tooltipModel;if(i){this._lastX=e.offsetX,this._lastY=e.offsetY;var o=e.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,e);else if(n){var s=De(n);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;Ro(n,function(c){if(c.tooltipDisabled)return l=u=null,!0;l||u||(De(c).dataIndex!=null?l=c:De(c).tooltipConfig!=null&&(u=c))},!0),l?this._showSeriesItemTooltip(e,l,a):u?this._showComponentItemTooltip(e,u,a):this._hide(a)}else this._lastDataByCoordSys=null,this._hide(a)}},t.prototype._showOrMove=function(e,a){var n=e.get("showDelay");a=se(a,this),clearTimeout(this._showTimout),n>0?this._showTimout=setTimeout(a,n):a()},t.prototype._showAxisTooltip=function(e,a){var n=this._ecModel,i=this._tooltipModel,o=[a.offsetX,a.offsetY],s=wu([a.tooltipOption],i),l=this._renderMode,u=[],c=Pt("section",{blocks:[],noHeader:!0}),f=[],v=new ug;A(e,function(m){A(m.dataByAxis,function(_){var S=n.getComponent(_.axisDim+"Axis",_.axisIndex),w=_.value;if(!(!S||w==null)){var x=RO(w,S.axis,n,_.seriesDataIndices,_.valueLabelOpt),b=Pt("section",{header:x,noHeader:!ia(x),sortBlocks:!0,blocks:[]});c.blocks.push(b),A(_.seriesDataIndices,function(T){var C=n.getSeriesByIndex(T.seriesIndex),D=T.dataIndexInside,M=C.getDataParams(D);if(!(M.dataIndex<0)){M.axisDim=_.axisDim,M.axisIndex=_.axisIndex,M.axisType=_.axisType,M.axisId=_.axisId,M.axisValue=Ch(S.axis,{value:w}),M.axisValueLabel=x,M.marker=v.makeTooltipMarker("item",Jo(M.color),l);var L=fb(C.formatTooltip(D,!0,null)),I=L.frag;if(I){var P=wu([C],i).get("valueFormatter");b.blocks.push(P?$({valueFormatter:P},I):I)}L.text&&f.push(L.text),u.push(M)}})}})}),c.blocks.reverse(),f.reverse();var h=a.position,d=s.get("order"),p=yb(c,v,l,d,n.get("useUTC"),s.get("textStyle"));p&&f.unshift(p);var g=l==="richText"?` `:"
",y=f.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(e,u)?this._updatePosition(s,h,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,y,u,Math.random()+"",o[0],o[1],h,null,v)})},t.prototype._showSeriesItemTooltip=function(e,a,n){var i=this._ecModel,o=De(a),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,f=o.dataType,v=u.getData(f),h=this._renderMode,d=e.positionDefault,p=wu([v.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,d?{position:d}:null),g=p.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(c,f),m=new ug;y.marker=m.makeTooltipMarker("item",Jo(y.color),h);var _=fb(u.formatTooltip(c,!1,f)),S=p.get("order"),w=p.get("valueFormatter"),x=_.frag,b=x?yb(w?$({valueFormatter:w},x):x,m,h,S,i.get("useUTC"),p.get("textStyle")):_.text,T="item_"+u.name+"_"+c;this._showOrMove(p,function(){this._showTooltipContent(p,b,y,T,e.offsetX,e.offsetY,e.position,e.target,m)}),n({type:"showTip",dataIndexInside:c,dataIndex:v.getRawIndex(c),seriesIndex:s,from:this.uid})}},t.prototype._showComponentItemTooltip=function(e,a,n){var i=this._renderMode==="html",o=De(a),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(oe(l)){var c=l;l={content:c,formatter:c},u=!0}u&&i&&l.content&&(l=me(l),l.content=or(l.content));var f=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&f.push(v),f.push({formatter:l.content});var h=e.positionDefault,d=wu(f,this._tooltipModel,h?{position:h}:null),p=d.get("content"),g=Math.random()+"",y=new ug;this._showOrMove(d,function(){var m=me(d.get("formatterParams")||{});this._showTooltipContent(d,p,m,g,e.offsetX,e.offsetY,e.position,a,y)}),n({type:"showTip",from:this.uid})},t.prototype._showTooltipContent=function(e,a,n,i,o,s,l,u,c){if(this._ticket="",!(!e.get("showContent")||!e.get("show"))){var f=this._tooltipContent;f.setEnterable(e.get("enterable"));var v=e.get("formatter");l=l||e.get("position");var h=a,d=this._getNearestPoint([o,s],n,e.get("trigger"),e.get("borderColor"),e.get("defaultBorderColor",!0)),p=d.color;if(v)if(oe(v)){var g=e.ecModel.get("useUTC"),y=Z(n)?n[0]:n,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=v,m&&(h=Ld(y.axisValue,h,g)),h=JL(h,n,!0)}else if(ye(v)){var _=se(function(S,w){S===this._ticket&&(f.setContent(w,c,e,p,l),this._updatePosition(e,l,o,s,f,n,u))},this);this._ticket=i,h=v(n,i,_)}else h=v;f.setContent(h,c,e,p,l),f.show(e,p),this._updatePosition(e,l,o,s,f,n,u)}},t.prototype._getNearestPoint=function(e,a,n,i,o){if(n==="axis"||Z(a))return{color:i||o};if(!Z(a))return{color:i||a.color||a.borderColor}},t.prototype._updatePosition=function(e,a,n,i,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();a=a||e.get("position");var f=o.getSize(),v=e.get("align"),h=e.get("verticalAlign"),d=l&&l.getBoundingRect().clone();if(l&&d.applyTransform(l.transform),ye(a)&&(a=a([n,i],s,o.el,d,{viewSize:[u,c],contentSize:f.slice()})),Z(a))n=ne(a[0],u),i=ne(a[1],c);else if(be(a)){var p=a;p.width=f[0],p.height=f[1];var g=ct(p,{width:u,height:c});n=g.x,i=g.y,v=null,h=null}else if(oe(a)&&l){var y=Xte(a,d,f,e.get("borderWidth"));n=y[0],i=y[1]}else{var y=Ute(n,i,o,u,c,v?null:20,h?null:20);n=y[0],i=y[1]}if(v&&(n-=QM(v)?f[0]/2:v==="right"?f[0]:0),h&&(i-=QM(h)?f[1]/2:h==="bottom"?f[1]:0),QO(e)){var y=Zte(n,i,o,u,c);n=y[0],i=y[1]}o.moveTo(n,i)},t.prototype._updateContentNotChangedOnAxis=function(e,a){var n=this._lastDataByCoordSys,i=this._cbParamsList,o=!!n&&n.length===e.length;return o&&A(n,function(s,l){var u=s.dataByAxis||[],c=e[l]||{},f=c.dataByAxis||[];o=o&&u.length===f.length,o&&A(u,function(v,h){var d=f[h]||{},p=v.seriesDataIndices||[],g=d.seriesDataIndices||[];o=o&&v.value===d.value&&v.axisType===d.axisType&&v.axisId===d.axisId&&p.length===g.length,o&&A(p,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&A(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=a[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=e,this._cbParamsList=a,!!o},t.prototype._hide=function(e){this._lastDataByCoordSys=null,e({type:"hideTip",from:this.uid})},t.prototype.dispose=function(e,a){qe.node||!a.getDom()||(dc(this,"_updatePosition"),this._tooltipContent.dispose(),$0("itemTooltip",a))},t.type="tooltip",t}(pt);function wu(r,t,e){var a=t.ecModel,n;e?(n=new Xe(e,a,a),n=new Xe(t.option,n,a)):n=t;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof Xe&&(o=o.get("tooltip",!0)),oe(o)&&(o={formatter:o}),o&&(n=new Xe(o,n,a)))}return n}function JM(r,t){return r.dispatchAction||se(t.dispatchAction,t)}function Ute(r,t,e,a,n,i,o){var s=e.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>a?r-=l+i:r+=i),o!=null&&(t+u+o>n?t-=u+o:t+=o),[r,t]}function Zte(r,t,e,a,n){var i=e.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,a)-o,t=Math.min(t+s,n)-s,r=Math.max(r,0),t=Math.max(t,0),[r,t]}function Xte(r,t,e,a){var n=e[0],i=e[1],o=Math.ceil(Math.SQRT2*a)+8,s=0,l=0,u=t.width,c=t.height;switch(r){case"inside":s=t.x+u/2-n/2,l=t.y+c/2-i/2;break;case"top":s=t.x+u/2-n/2,l=t.y-i-o;break;case"bottom":s=t.x+u/2-n/2,l=t.y+c+o;break;case"left":s=t.x-n-o,l=t.y+c/2-i/2;break;case"right":s=t.x+u+o,l=t.y+c/2-i/2}return[s,l]}function QM(r){return r==="center"||r==="middle"}function qte(r,t,e){var a=Y_(r).queryOptionMap,n=a.keys()[0];if(!(!n||n==="series")){var i=Il(t,n,a.get(n),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=e.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=De(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:n,componentIndex:o.componentIndex,el:l}}}}const jte=Yte;function Kte(r){Oe(qc),r.registerComponentModel(Lte),r.registerComponentView(jte),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},Ct),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},Ct)}var Jte=["rect","polygon","keep","clear"];function Qte(r,t){var e=at(r?r.brush:[]);if(e.length){var a=[];A(e,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),ere(s),t&&!s.length&&s.push.apply(s,Jte)}}function ere(r){var t={};A(r,function(e){t[e]=1}),r.length=0,A(t,function(e,a){r.push(a)})}var eA=A;function tA(r){if(r){for(var t in r)if(r.hasOwnProperty(t))return!0}}function J0(r,t,e){var a={};return eA(t,function(i){var o=a[i]=n();eA(r[i],function(s,l){if(tr.isValidType(l)){var u={type:l,visual:s};e&&e(u,i),o[l]=new tr(u),l==="opacity"&&(u=me(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new tr(u))}})}),a;function n(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function aN(r,t,e){var a;A(e,function(n){t.hasOwnProperty(n)&&tA(t[n])&&(a=!0)}),a&&A(e,function(n){t.hasOwnProperty(n)&&tA(t[n])?r[n]=me(t[n]):delete r[n]})}function tre(r,t,e,a,n,i){var o={};A(r,function(f){var v=tr.prepareVisualTypes(t[f]);o[f]=v});var s;function l(f){return I1(e,s,f)}function u(f,v){jP(e,s,f,v)}i==null?e.each(c):e.each([i],c);function c(f,v){s=i==null?f:v;var h=e.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var d=a.call(n,f),p=t[d],g=o[d],y=0,m=g.length;yt[0][1]&&(t[0][1]=i[0]),i[1]t[1][1]&&(t[1][1]=i[1])}return t&&oA(t)}};function oA(r){return new Ce(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var ure=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.ecModel=e,this.api=a,this.model,(this._brushController=new SS(a.getZr())).on("brush",se(this._onBrush,this)).mount()},t.prototype.render=function(e,a,n,i){this.model=e,this._updateController(e,a,n,i)},t.prototype.updateTransform=function(e,a,n,i){nN(a),this._updateController(e,a,n,i)},t.prototype.updateVisual=function(e,a,n,i){this.updateTransform(e,a,n,i)},t.prototype.updateView=function(e,a,n,i){this._updateController(e,a,n,i)},t.prototype._updateController=function(e,a,n,i){(!i||i.$from!==e.id)&&this._brushController.setPanels(e.brushTargetManager.makePanelOpts(n)).enableBrush(e.brushOption).updateCovers(e.areas.slice())},t.prototype.dispose=function(){this._brushController.dispose()},t.prototype._onBrush=function(e){var a=this.model.id,n=this.model.brushTargetManager.setOutputRanges(e.areas,this.ecModel);(!e.isEnd||e.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:a,areas:me(n),$from:a}),e.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:a,areas:me(n),$from:a})},t.type="brush",t}(pt);const cre=ure;var fre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.areas=[],e.brushOption={},e}return t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&aN(n,e,["inBrush","outOfBrush"]);var i=n.inBrush=n.inBrush||{};n.outOfBrush=n.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},t.prototype.setAreas=function(e){e&&(this.areas=X(e,function(a){return sA(this.option,a)},this))},t.prototype.setBrushOption=function(e){this.brushOption=sA(this.option,e),this.brushType=this.brushOption.brushType},t.type="brush",t.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],t.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:G.color.backgroundTint,borderColor:G.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:G.color.disabled},t}(We);function sA(r,t){return Re({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new Xe(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},t,!0)}const vre=fre;var hre=["rect","polygon","lineX","lineY","keep","clear"],dre=function(r){V(t,r);function t(){return r!==null&&r.apply(this,arguments)||this}return t.prototype.render=function(e,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,A(e.get("type",!0),function(l){e.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},t.prototype.updateView=function(e,a,n){this.render(e,a,n)},t.prototype.getIcons=function(){var e=this.model,a=e.get("icon",!0),n={};return A(e.get("type",!0),function(i){a[i]&&(n[i]=a[i])}),n},t.prototype.onclick=function(e,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}})},t.getDefaultOption=function(e){var a={show:!0,type:hre.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:e.getLocaleModel().get(["toolbox","brush","title"])};return a},t}(ra);const pre=dre;function gre(r){r.registerComponentView(cre),r.registerComponentModel(vre),r.registerPreprocessor(Qte),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,nre),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(t,e){e.eachComponent({mainType:"brush",query:t},function(a){a.setAreas(t.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},Ct),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},Ct),qs("brush",pre)}var yre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.type="title",t.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:G.size.m,backgroundColor:G.color.transparent,borderColor:G.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:G.color.primary},subtextStyle:{fontSize:12,color:G.color.quaternary}},t}(We),mre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this.group.removeAll(),!!e.get("show")){var i=this.group,o=e.getModel("textStyle"),s=e.getModel("subtextStyle"),l=e.get("textAlign"),u=de(e.get("textBaseline"),e.get("textVerticalAlign")),c=new Ue({style:it(o,{text:e.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),f=c.getBoundingRect(),v=e.get("subtext"),h=new Ue({style:it(s,{text:v,fill:s.getTextColor(),y:f.height+e.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),d=e.get("link"),p=e.get("sublink"),g=e.get("triggerEvent",!0);c.silent=!d&&!g,h.silent=!p&&!g,d&&c.on("click",function(){ph(d,"_"+e.get("target"))}),p&&h.on("click",function(){ph(p,"_"+e.get("subtarget"))}),De(c).eventData=De(h).eventData=g?{componentType:"title",componentIndex:e.componentIndex}:null,i.add(c),v&&i.add(h);var y=i.getBoundingRect(),m=e.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Ft(e,n),S=ct(m,_.refContainer,e.get("padding"));l||(l=e.get("left")||e.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=e.get("top")||e.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?S.y+=S.height:u==="middle"&&(S.y+=S.height/2),u=u||"top"),i.x=S.x,i.y=S.y,i.markRedraw();var w={align:l,verticalAlign:u};c.setStyle(w),h.setStyle(w),y=i.getBoundingRect();var x=S.margin,b=e.getItemStyle(["color","opacity"]);b.fill=e.get("backgroundColor");var T=new Ve({shape:{x:y.x-x[3],y:y.y-x[0],width:y.width+x[1]+x[3],height:y.height+x[0]+x[2],r:e.get("borderRadius")},style:b,subPixelOptimize:!0,silent:!0});i.add(T)}},t.type="title",t}(pt);function _re(r){r.registerComponentModel(yre),r.registerComponentView(mre)}var Sre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode="box",e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),this._initData()},t.prototype.mergeOption=function(e){r.prototype.mergeOption.apply(this,arguments),this._initData()},t.prototype.setCurrentIndex=function(e){e==null&&(e=this.option.currentIndex);var a=this._data.count();this.option.loop?e=(e%a+a)%a:(e>=a&&(e=a-1),e<0&&(e=0)),this.option.currentIndex=e},t.prototype.getCurrentIndex=function(){return this.option.currentIndex},t.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},t.prototype.setPlayState=function(e){this.option.autoPlay=!!e},t.prototype.getPlayState=function(){return!!this.option.autoPlay},t.prototype._initData=function(){var e=this.option,a=e.data||[],n=e.axisType,i=this._names=[],o;n==="category"?(o=[],A(a,function(u,c){var f=Nt(Al(u),""),v;be(u)?(v=me(u),v.value=c):v=c,o.push(v),i.push(f)})):o=a;var s={category:"ordinal",time:"time",value:"number"}[n]||"number",l=this._data=new mr([{name:"value",type:s}],this);l.initData(o,i)},t.prototype.getData=function(){return this._data},t.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},t.type="timeline",t.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:G.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:G.color.secondary},data:[]},t}(We);const lA=Sre;var iN=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline.slider",t.defaultOption=zi(lA.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:G.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:G.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:G.color.tertiary},itemStyle:{color:G.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:G.color.accent50,borderColor:G.color.accent50,borderWidth:0,shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10.6699C11.5 9.90014 12.3333 9.41887 13 9.80371L20.5 14.1338C21.1667 14.5187 21.1667 15.4813 20.5 15.8662L13 20.1963C12.3333 20.5811 11.5 20.0999 11.5 19.3301V10.6699Z",stopIcon:"path://M15 0C23.2843 0 30 6.71573 30 15C30 23.2843 23.2843 30 15 30C6.71573 30 0 23.2843 0 15C0 6.71573 6.71573 0 15 0ZM15 3C8.37258 3 3 8.37258 3 15C3 21.6274 8.37258 27 15 27C21.6274 27 27 21.6274 27 15C27 8.37258 21.6274 3 15 3ZM11.5 10C12.3284 10 13 10.6716 13 11.5V18.5C13 19.3284 12.3284 20 11.5 20C10.6716 20 10 19.3284 10 18.5V11.5C10 10.6716 10.6716 10 11.5 10ZM18.5 10C19.3284 10 20 10.6716 20 11.5V18.5C20 19.3284 19.3284 20 18.5 20C17.6716 20 17 19.3284 17 18.5V11.5C17 10.6716 17.6716 10 18.5 10Z",nextIcon:"path://M0.838834 18.7383C0.253048 18.1525 0.253048 17.2028 0.838834 16.617L7.55635 9.89949L0.838834 3.18198C0.253048 2.59619 0.253048 1.64645 0.838834 1.06066C1.42462 0.474874 2.37437 0.474874 2.96015 1.06066L10.7383 8.83883L10.8412 8.95277C11.2897 9.50267 11.2897 10.2963 10.8412 10.8462L10.7383 10.9602L2.96015 18.7383C2.37437 19.3241 1.42462 19.3241 0.838834 18.7383Z",prevIcon:"path://M10.9602 1.06066C11.5459 1.64645 11.5459 2.59619 10.9602 3.18198L4.24264 9.89949L10.9602 16.617C11.5459 17.2028 11.5459 18.1525 10.9602 18.7383C10.3744 19.3241 9.42462 19.3241 8.83883 18.7383L1.06066 10.9602L0.957771 10.8462C0.509245 10.2963 0.509245 9.50267 0.957771 8.95277L1.06066 8.83883L8.83883 1.06066C9.42462 0.474874 10.3744 0.474874 10.9602 1.06066Z",prevBtnSize:18,nextBtnSize:18,color:G.color.accent50,borderColor:G.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:G.color.accent60},itemStyle:{color:G.color.accent60,borderColor:G.color.accent60},controlStyle:{color:G.color.accent70,borderColor:G.color.accent70}},progress:{lineStyle:{color:G.color.accent30},itemStyle:{color:G.color.accent40}},data:[]}),t}(lA);Rt(iN,Rd.prototype);const wre=iN;var xre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="timeline",t}(pt);const bre=xre;var Cre=function(r){V(t,r);function t(e,a,n,i){var o=r.call(this,e,a,n)||this;return o.type=i||"value",o}return t.prototype.getLabelModel=function(){return this.model.getModel("label")},t.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},t}(Aa);const Tre=Cre;var ky=Math.PI,uA=ze(),Dre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(e,a){this.api=a},t.prototype.render=function(e,a,n){if(this.model=e,this.api=n,this.ecModel=a,this.group.removeAll(),e.get("show",!0)){var i=this._layout(e,n),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,e);e.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Pt("nameValue",{noName:!0,value:c})},A(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,e)},this),this._renderAxisLabel(i,s,l,e),this._position(i,e)}this._doPlayStop(),this._updateTicksStatus()},t.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},t.prototype.dispose=function(){this._clearTimer()},t.prototype._layout=function(e,a){var n=e.get(["label","position"]),i=e.get("orient"),o=Are(e,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"},c={horizontal:0,vertical:ky/2},f=i==="vertical"?o.height:o.width,v=e.getModel("controlStyle"),h=v.get("show",!0),d=h?v.get("itemSize"):0,p=h?v.get("itemGap"):0,g=d+p,y=e.get(["label","rotate"])||0;y=y*ky/180;var m,_,S,w=v.get("position",!0),x=h&&v.get("showPlayBtn",!0),b=h&&v.get("showPrevBtn",!0),T=h&&v.get("showNextBtn",!0),C=0,D=f;w==="left"||w==="bottom"?(x&&(m=[0,0],C+=g),b&&(_=[C,0],C+=g),T&&(S=[D-d,0],D-=g)):(x&&(m=[D-d,0],D-=g),b&&(_=[0,0],C+=g),T&&(S=[D-d,0],D-=g));var M=[C,D];return e.get("inverse")&&M.reverse(),{viewRect:o,mainLength:f,orient:i,rotation:c[i],labelRotation:y,labelPosOpt:s,labelAlign:e.get(["label","align"])||l[i],labelBaseline:e.get(["label","verticalAlign"])||e.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:M,controlSize:d,controlGap:p}},t.prototype._position=function(e,a){var n=this._mainGroup,i=this._labelGroup,o=e.viewRect;if(e.orient==="vertical"){var s=Xt(),l=o.x,u=o.y+o.height;tn(s,s,[-l,-u]),Ni(s,s,-ky/2),tn(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=m(o),f=m(n.getBoundingRect()),v=m(i.getBoundingRect()),h=[n.x,n.y],d=[i.x,i.y];d[0]=h[0]=c[0][0];var p=e.labelPosOpt;if(p==null||oe(p)){var g=p==="+"?0:1;_(h,f,c,1,g),_(d,v,c,1,1-g)}else{var g=p>=0?0:1;_(h,f,c,1,g),d[1]=h[1]+p}n.setPosition(h),i.setPosition(d),n.rotation=i.rotation=e.rotation,y(n),y(i);function y(S){S.originX=c[0][0]-S.x,S.originY=c[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,w,x,b,T){S[b]+=x[b][T]-w[b][T]}},t.prototype._createAxis=function(e,a){var n=a.getData(),i=a.get("axisType"),o=Mre(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 Tre("value",o,e.axisExtent,i);return l.model=a,l},t.prototype._createGroup=function(e){var a=this[e]=new _e;return this.group.add(a),a},t.prototype._renderAxisLine=function(e,a,n,i){var o=n.getExtent();if(i.get(["lineStyle","show"])){var s=new Bt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:$({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});a.add(s);var l=this._progressLine=new Bt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:xe({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});a.add(l)}},t.prototype._renderAxisTick=function(e,a,n,i){var o=this,s=i.getData(),l=n.scale.getTicks();this._tickSymbols=[],A(l,function(u){var c=n.dataToCoord(u.value),f=s.getItemModel(u.value),v=f.getModel("itemStyle"),h=f.getModel(["emphasis","itemStyle"]),d=f.getModel(["progress","itemStyle"]),p={x:c,y:0,onclick:se(o._changeTimeline,o,u.value)},g=cA(f,v,a,p);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=d.getItemStyle(),Fo(g);var y=De(g);f.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},t.prototype._renderAxisLabel=function(e,a,n,i){var o=this,s=n.getLabelModel();if(s.get("show")){var l=i.getData(),u=n.getViewLabels();this._tickLabels=[],A(u,function(c){var f=c.tickValue,v=l.getItemModel(f),h=v.getModel("label"),d=v.getModel(["emphasis","label"]),p=v.getModel(["progress","label"]),g=n.dataToCoord(c.tickValue),y=new Ue({x:g,y:0,rotation:e.labelRotation-e.rotation,onclick:se(o._changeTimeline,o,f),silent:!1,style:it(h,{text:c.formattedLabel,align:e.labelAlign,verticalAlign:e.labelBaseline})});y.ensureState("emphasis").style=it(d),y.ensureState("progress").style=it(p),a.add(y),Fo(y),uA(y).dataIndex=f,o._tickLabels.push(y)})}},t.prototype._renderControl=function(e,a,n,i){var o=e.controlSize,s=e.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),c=i.getPlayState(),f=i.get("inverse",!0);v(e.nextBtnPosition,"next",se(this._changeTimeline,this,f?"-":"+")),v(e.prevBtnPosition,"prev",se(this._changeTimeline,this,f?"+":"-")),v(e.playPosition,c?"stop":"play",se(this._handlePlayClick,this,!c),!0);function v(h,d,p,g){if(h){var y=ba(de(i.get(["controlStyle",d+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=Ire(i,d+"Icon",m,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:p});_.ensureState("emphasis").style=u,a.add(_),Fo(_)}}},t.prototype._renderCurrentPointer=function(e,a,n,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(f){f.draggable=!0,f.drift=se(u._handlePointerDrag,u),f.ondragend=se(u._handlePointerDragend,u),fA(f,u._progressLine,s,n,i,!0)},onUpdate:function(f){fA(f,u._progressLine,s,n,i)}};this._currentPointer=cA(l,l,this._mainGroup,{},this._currentPointer,c)},t.prototype._handlePlayClick=function(e){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:e,from:this.uid})},t.prototype._handlePointerDrag=function(e,a,n){this._clearTimer(),this._pointerChangeTimeline([n.offsetX,n.offsetY])},t.prototype._handlePointerDragend=function(e){this._pointerChangeTimeline([e.offsetX,e.offsetY],!0)},t.prototype._pointerChangeTimeline=function(e,a){var n=this._toAxisCoord(e)[0],i=this._axis,o=oa(i.getExtent().slice());n>o[1]&&(n=o[1]),n=0&&(s[o]=+s[o].toFixed(d)),[s,h]}var mv={min:Pe(yv,"min"),max:Pe(yv,"max"),average:Pe(yv,"average"),median:Pe(yv,"median")};function Lc(r,t){if(t){var e=r.getData(),a=r.coordinateSystem,n=a&&a.dimensions;if(!Bre(t)&&!Z(t.coord)&&Z(n)){var i=sN(t,e,a,r);if(t=me(t),t.type&&mv[t.type]&&i.baseAxis&&i.valueAxis){var o=ke(n,i.baseAxis.dim),s=ke(n,i.valueAxis.dim),l=mv[t.type](e,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);t.coord=l[0],t.value=l[1]}else t.coord=[t.xAxis!=null?t.xAxis:t.radiusAxis,t.yAxis!=null?t.yAxis:t.angleAxis]}if(t.coord==null||!Z(n)){t.coord=[];var u=r.getBaseAxis();if(u&&t.type&&mv[t.type]){var c=a.getOtherAxis(u);c&&(t.value=qh(e,e.mapDimension(c.dim),t.type))}}else for(var f=t.coord,v=0;v<2;v++)mv[f[v]]&&(f[v]=qh(e,e.mapDimension(n[v]),f[v]));return t}}function sN(r,t,e,a){var n={};return r.valueIndex!=null||r.valueDim!=null?(n.valueDataDim=r.valueIndex!=null?t.getDimension(r.valueIndex):r.valueDim,n.valueAxis=e.getAxis(Vre(a,n.valueDataDim)),n.baseAxis=e.getOtherAxis(n.valueAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim)):(n.baseAxis=a.getBaseAxis(),n.valueAxis=e.getOtherAxis(n.baseAxis),n.baseDataDim=t.mapDimension(n.baseAxis.dim),n.valueDataDim=t.mapDimension(n.valueAxis.dim)),n}function Vre(r,t){var e=r.getData().getDimensionInfo(t);return e&&e.coordDim}function Pc(r,t){return r&&r.containData&&t.coord&&!e_(t)?r.containData(t.coord):!0}function zre(r,t,e){return r&&r.containZone&&t.coord&&e.coord&&!e_(t)&&!e_(e)?r.containZone(t.coord,e.coord):!0}function lN(r,t){return r?function(e,a,n,i){var o=i<2?e.coord&&e.coord[i]:e.value;return Ti(o,t[i])}:function(e,a,n,i){return Ti(e.value,t[i])}}function qh(r,t,e){if(e==="average"){var a=0,n=0;return r.each(t,function(i,o){isNaN(i)||(a+=i,n++)}),a/n}else return e==="median"?r.getMedian(t):r.getDataExtent(t)[e==="max"?1:0]}var Ry=ze(),Fre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.init=function(){this.markerGroupMap=ve()},t.prototype.render=function(e,a,n){var i=this,o=this.markerGroupMap;o.each(function(s){Ry(s).keep=!1}),a.eachSeries(function(s){var l=Fn.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,a,n)}),o.each(function(s){!Ry(s).keep&&i.group.remove(s.group)}),Gre(a,o,this.type)},t.prototype.markKeep=function(e){Ry(e).keep=!0},t.prototype.toggleBlurSeries=function(e,a){var n=this;A(e,function(i){var o=Fn.getMarkerModelFromSeries(i,n.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(a?nL(l):Q_(l))})}})},t.type="marker",t}(pt);function Gre(r,t,e){r.eachSeries(function(a){var n=Fn.getMarkerModelFromSeries(a,e),i=t.get(a.id);if(n&&i&&i.group){var o=Ko(n),s=o.z,l=o.zlevel;Ad(i.group,s,l)}})}const XS=Fre;function hA(r,t,e){var a=t.coordinateSystem,n=e.getWidth(),i=e.getHeight(),o=a&&a.getArea&&a.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",c=u?o?o.width:0:n,f=u?o?o.height:0:i,v=u&&o?o.x:0,h=u&&o?o.y:0,d,p=ne(l.get("x"),c)+v,g=ne(l.get("y"),f)+h;if(!isNaN(p)&&!isNaN(g))d=[p,g];else if(t.getMarkerPosition)d=t.getMarkerPosition(r.getValues(r.dimensions,s));else if(a){var y=r.get(a.dimensions[0],s),m=r.get(a.dimensions[1],s);d=a.dataToPoint([y,m])}isNaN(p)||(d[0]=p),isNaN(g)||(d[1]=g),r.setItemLayout(s,d)})}var Hre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=Fn.getMarkerModelFromSeries(i,"markPoint");o&&(hA(o.getData(),i,n),this.markerGroupMap.get(i.id).updateLayout())},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Yc),f=$re(o,e,a);a.setData(f),hA(a.getData(),e,i),f.each(function(v){var h=f.getItemModel(v),d=h.getShallow("symbol"),p=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),y=h.getShallow("symbolOffset"),m=h.getShallow("symbolKeepAspect");if(ye(d)||ye(p)||ye(g)||ye(y)){var _=a.getRawValue(v),S=a.getDataParams(v);ye(d)&&(d=d(_,S)),ye(p)&&(p=p(_,S)),ye(g)&&(g=g(_,S)),ye(y)&&(y=y(_,S))}var w=h.getModel("itemStyle").getItemStyle(),x=h.get("z2"),b=Gc(l,"color");w.fill||(w.fill=b),f.setItemVisual(v,{z2:de(x,0),symbol:d,symbolSize:p,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:w})}),c.updateData(f),this.group.add(c.group),f.eachItemGraphicEl(function(v){v.traverse(function(h){De(h).dataModel=a})}),this.markKeep(c),c.group.silent=a.get("silent")||e.get("silent")},t.type="markPoint",t}(XS);function $re(r,t,e){var a;r?a=X(r&&r.dimensions,function(s){var l=t.getData().getDimensionInfo(t.getData().mapDimension(s))||{};return $($({},l),{name:s,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new mr(a,e),i=X(e.get("data"),Pe(Lc,t));r&&(i=Qe(i,Pe(Pc,r)));var o=lN(!!r,a);return n.initData(i,null,o),n}const Wre=Hre;function Yre(r){r.registerComponentModel(Nre),r.registerComponentView(Wre),r.registerPreprocessor(function(t){ZS(t.series,"markPoint")&&(t.markPoint=t.markPoint||{})})}var Ure=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},t.type="markLine",t.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"},t}(Fn);const Zre=Ure;var _v=ze(),Xre=function(r,t,e,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=t.getAxis(a.yAxis!=null?"y":"x"),l=er(a.yAxis,a.xAxis);else{var u=sN(a,n,t,r);s=u.valueAxis;var c=Dk(n,u.valueDataDim);l=qh(n,c,o)}var f=s.dim==="x"?0:1,v=1-f,h=me(a),d={coord:[]};h.type=null,h.coord=[],h.coord[v]=-1/0,d.coord[v]=1/0;var p=e.get("precision");p>=0&&$e(l)&&(l=+l.toFixed(Math.min(p,20))),h.coord[f]=d.coord[f]=l,i=[h,d,{type:o,valueIndex:a.valueIndex,value:l}]}else i=[]}var g=[Lc(r,i[0]),Lc(r,i[1]),$({},i[2])];return g[2].type=g[2].type||null,Re(g[2],g[0]),Re(g[2],g[1]),g};function jh(r){return!isNaN(r)&&!isFinite(r)}function dA(r,t,e,a){var n=1-r,i=a.dimensions[r];return jh(t[n])&&jh(e[n])&&t[r]===e[r]&&a.getAxis(i).containData(t[r])}function qre(r,t){if(r.type==="cartesian2d"){var e=t[0].coord,a=t[1].coord;if(e&&a&&(dA(1,e,a,r)||dA(0,e,a,r)))return!0}return Pc(r,t[0])&&Pc(r,t[1])}function Ey(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=ne(o.get("x"),n.getWidth()),u=ne(o.get("y"),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition)s=a.getMarkerPosition(r.getValues(r.dimensions,t));else{var c=i.dimensions,f=r.get(c[0],t),v=r.get(c[1],t);s=i.dataToPoint([f,v])}if(Pi(i,"cartesian2d")){var h=i.getAxis("x"),d=i.getAxis("y"),c=i.dimensions;jh(r.get(c[0],t))?s[0]=h.toGlobalCoord(h.getExtent()[e?0:1]):jh(r.get(c[1],t))&&(s[1]=d.toGlobalCoord(d.getExtent()[e?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(t,s)}var jre=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=Fn.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=_v(o).from,u=_v(o).to;l.each(function(c){Ey(l,c,!0,i,n),Ey(u,c,!1,i,n)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new hS);this.group.add(c.group);var f=Kre(o,e,a),v=f.from,h=f.to,d=f.line;_v(a).from=v,_v(a).to=h,a.setData(d);var p=a.get("symbol"),g=a.get("symbolSize"),y=a.get("symbolRotate"),m=a.get("symbolOffset");Z(p)||(p=[p,p]),Z(g)||(g=[g,g]),Z(y)||(y=[y,y]),Z(m)||(m=[m,m]),f.from.each(function(S){_(v,S,!0),_(h,S,!1)}),d.each(function(S){var w=d.getItemModel(S),x=w.getModel("lineStyle").getLineStyle();d.setItemLayout(S,[v.getItemLayout(S),h.getItemLayout(S)]);var b=w.get("z2");x.stroke==null&&(x.stroke=v.getItemVisual(S,"style").fill),d.setItemVisual(S,{z2:de(b,0),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:h.getItemVisual(S,"symbolKeepAspect"),toSymbolOffset:h.getItemVisual(S,"symbolOffset"),toSymbolRotate:h.getItemVisual(S,"symbolRotate"),toSymbolSize:h.getItemVisual(S,"symbolSize"),toSymbol:h.getItemVisual(S,"symbol"),style:x})}),c.updateData(d),f.line.eachItemGraphicEl(function(S){De(S).dataModel=a,S.traverse(function(w){De(w).dataModel=a})});function _(S,w,x){var b=S.getItemModel(w);Ey(S,w,x,e,i);var T=b.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Gc(l,"color")),S.setItemVisual(w,{symbolKeepAspect:b.get("symbolKeepAspect"),symbolOffset:de(b.get("symbolOffset",!0),m[x?0:1]),symbolRotate:de(b.get("symbolRotate",!0),y[x?0:1]),symbolSize:de(b.get("symbolSize"),g[x?0:1]),symbol:de(b.get("symbol",!0),p[x?0:1]),style:T})}this.markKeep(c),c.group.silent=a.get("silent")||e.get("silent")},t.type="markLine",t}(XS);function Kre(r,t,e){var a;r?a=X(r&&r.dimensions,function(u){var c=t.getData().getDimensionInfo(t.getData().mapDimension(u))||{};return $($({},c),{name:u,ordinalMeta:null})}):a=[{name:"value",type:"float"}];var n=new mr(a,e),i=new mr(a,e),o=new mr([],e),s=X(e.get("data"),Pe(Xre,t,r,e));r&&(s=Qe(s,Pe(qre,r)));var l=lN(!!r,a);return n.initData(X(s,function(u){return u[0]}),null,l),i.initData(X(s,function(u){return u[1]}),null,l),o.initData(X(s,function(u){return u[2]})),o.hasItemOption=!0,{from:n,to:i,line:o}}const Jre=jre;function Qre(r){r.registerComponentModel(Zre),r.registerComponentView(Jre),r.registerPreprocessor(function(t){ZS(t.series,"markLine")&&(t.markLine=t.markLine||{})})}var eae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.createMarkerModelFromSeries=function(e,a,n){return new t(e,a,n)},t.type="markArea",t.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},t}(Fn);const tae=eae;var Sv=ze(),rae=function(r,t,e,a){var n=a[0],i=a[1];if(!(!n||!i)){var o=Lc(r,n),s=Lc(r,i),l=o.coord,u=s.coord;l[0]=er(l[0],-1/0),l[1]=er(l[1],-1/0),u[0]=er(u[0],1/0),u[1]=er(u[1],1/0);var c=R_([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function Kh(r){return!isNaN(r)&&!isFinite(r)}function pA(r,t,e,a){var n=1-r;return Kh(t[n])&&Kh(e[n])}function aae(r,t){var e=t.coord[0],a=t.coord[1],n={coord:e,x:t.x0,y:t.y0},i={coord:a,x:t.x1,y:t.y1};return Pi(r,"cartesian2d")?e&&a&&(pA(1,e,a)||pA(0,e,a))?!0:zre(r,n,i):Pc(r,n)||Pc(r,i)}function gA(r,t,e,a,n){var i=a.coordinateSystem,o=r.getItemModel(t),s,l=ne(o.get(e[0]),n.getWidth()),u=ne(o.get(e[1]),n.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(a.getMarkerPosition){var c=r.getValues(["x0","y0"],t),f=r.getValues(["x1","y1"],t),v=i.clampData(c),h=i.clampData(f),d=[];e[0]==="x0"?d[0]=v[0]>h[0]?f[0]:c[0]:d[0]=v[0]>h[0]?c[0]:f[0],e[1]==="y0"?d[1]=v[1]>h[1]?f[1]:c[1]:d[1]=v[1]>h[1]?c[1]:f[1],s=a.getMarkerPosition(d,e,!0)}else{var p=r.get(e[0],t),g=r.get(e[1],t),y=[p,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(Pi(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),p=r.get(e[0],t),g=r.get(e[1],t);Kh(p)?s[0]=m.toGlobalCoord(m.getExtent()[e[0]==="x0"?0:1]):Kh(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[e[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var yA=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],nae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.updateTransform=function(e,a,n){a.eachSeries(function(i){var o=Fn.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=X(yA,function(f){return gA(s,l,f,i,n)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},t.prototype.renderSeries=function(e,a,n,i){var o=e.coordinateSystem,s=e.id,l=e.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new _e});this.group.add(c.group),this.markKeep(c);var f=iae(o,e,a);a.setData(f),f.each(function(v){var h=X(yA,function(D){return gA(f,v,D,e,i)}),d=o.getAxis("x").scale,p=o.getAxis("y").scale,g=d.getExtent(),y=p.getExtent(),m=[d.parse(f.get("x0",v)),d.parse(f.get("x1",v))],_=[p.parse(f.get("y0",v)),p.parse(f.get("y1",v))];oa(m),oa(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),w=!S;f.setItemLayout(v,{points:h,allClipped:w});var x=f.getItemModel(v),b=x.getModel("itemStyle").getItemStyle(),T=x.get("z2"),C=Gc(l,"color");b.fill||(b.fill=C,oe(b.fill)&&(b.fill=th(b.fill,.4))),b.stroke||(b.stroke=C),f.setItemVisual(v,"style",b),f.setItemVisual(v,"z2",de(T,0))}),f.diff(Sv(c).data).add(function(v){var h=f.getItemLayout(v),d=f.getItemVisual(v,"z2");if(!h.allClipped){var p=new wr({z2:de(d,0),shape:{points:h.points}});f.setItemGraphicEl(v,p),c.group.add(p)}}).update(function(v,h){var d=Sv(c).data.getItemGraphicEl(h),p=f.getItemLayout(v),g=f.getItemVisual(v,"z2");p.allClipped?d&&c.group.remove(d):(d?Ze(d,{z2:de(g,0),shape:{points:p.points}},a,v):d=new wr({shape:{points:p.points}}),f.setItemGraphicEl(v,d),c.group.add(d))}).remove(function(v){var h=Sv(c).data.getItemGraphicEl(v);c.group.remove(h)}).execute(),f.eachItemGraphicEl(function(v,h){var d=f.getItemModel(h),p=f.getItemVisual(h,"style");v.useStyle(f.getItemVisual(h,"style")),$t(v,zt(d),{labelFetcher:a,labelDataIndex:h,defaultText:f.getName(h)||"",inheritColor:oe(p.fill)?th(p.fill,1):G.color.neutral99}),Vt(v,d),ut(v,null,null,d.get(["emphasis","disabled"])),De(v).dataModel=a}),Sv(c).data=f,c.group.silent=a.get("silent")||e.get("silent")},t.type="markArea",t}(XS);function iae(r,t,e){var a,n,i=["x0","y0","x1","y1"];if(r){var o=X(r&&r.dimensions,function(u){var c=t.getData(),f=c.getDimensionInfo(c.mapDimension(u))||{};return $($({},f),{name:u,ordinalMeta:null})});n=X(i,function(u,c){return{name:u,type:o[c%2].type}}),a=new mr(n,e)}else n=[{name:"value",type:"float"}],a=new mr(n,e);var s=X(e.get("data"),Pe(rae,t,r,e));r&&(s=Qe(s,Pe(aae,r)));var l=r?function(u,c,f,v){var h=u.coord[Math.floor(v/2)][v%2];return Ti(h,n[v])}:function(u,c,f,v){return Ti(u.value,n[v])};return a.initData(s,null,l),a.hasItemOption=!0,a}const oae=nae;function sae(r){r.registerComponentModel(tae),r.registerComponentView(oae),r.registerPreprocessor(function(t){ZS(t.series,"markArea")&&(t.markArea=t.markArea||{})})}var lae=function(r,t){if(t==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(t==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},uae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.layoutMode={type:"box",ignoreSize:!0},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n),e.selected=e.selected||{},this._updateSelector(e)},t.prototype.mergeOption=function(e,a){r.prototype.mergeOption.call(this,e,a),this._updateSelector(e)},t.prototype._updateSelector=function(e){var a=e.selector,n=this.ecModel;a===!0&&(a=e.selector=["all","inverse"]),Z(a)&&A(a,function(i,o){oe(i)&&(i={type:i}),a[o]=Re(i,lae(n,i.type))})},t.prototype.optionUpdated=function(){this._updateData(this.ecModel);var e=this._data;if(e[0]&&this.get("selectedMode")==="single"){for(var a=!1,n=0;n=0},t.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},t.type="legend.plain",t.dependencies=["series"],t.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:G.size.m,align:"auto",backgroundColor:G.color.transparent,borderColor:G.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:G.color.disabled,inactiveBorderColor:G.color.disabled,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:G.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:G.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:G.color.tertiary,borderWidth:1,borderColor:G.color.border},emphasis:{selectorLabel:{show:!0,color:G.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},t}(We);const t_=uae;var Hs=Pe,r_=A,wv=_e,cae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.newlineDisabled=!1,e}return t.prototype.init=function(){this.group.add(this._contentGroup=new wv),this.group.add(this._selectorGroup=new wv),this._isFirstRender=!0},t.prototype.getContentGroup=function(){return this._contentGroup},t.prototype.getSelectorGroup=function(){return this._selectorGroup},t.prototype.render=function(e,a,n){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!e.get("show",!0)){var o=e.get("align"),s=e.get("orient");(!o||o==="auto")&&(o=e.get("left")==="right"&&s==="vertical"?"right":"left");var l=e.get("selector",!0),u=e.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,e,a,n,l,s,u);var c=Ft(e,n).refContainer,f=e.getBoxLayoutParams(),v=e.get("padding"),h=ct(f,c,v),d=this.layoutInner(e,o,h,i,l,u),p=ct(xe({width:d.width,height:d.height},f),c,v);this.group.x=p.x-d.x,this.group.y=p.y-d.y,this.group.markRedraw(),this.group.add(this._backgroundEl=jO(d,e))}},t.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},t.prototype.renderInner=function(e,a,n,i,o,s,l){var u=this.getContentGroup(),c=ve(),f=a.get("selectedMode"),v=a.get("triggerEvent"),h=[];n.eachRawSeries(function(d){!d.get("legendHoverLink")&&h.push(d.id)}),r_(a.getData(),function(d,p){var g=this,y=d.get("name");if(!this.newlineDisabled&&(y===""||y===` `)){var m=new wv;m.newline=!0,u.add(m);return}var _=n.getSeriesByName(y)[0];if(!c.get(y))if(_){var S=_.getData(),w=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),b=S.getVisual("style"),T=this._createItem(_,y,p,d,a,e,w,b,x,f,i);T.on("click",Hs(mA,y,null,i,h)).on("mouseover",Hs(a_,_.name,null,i,h)).on("mouseout",Hs(n_,_.name,null,i,h)),n.ssr&&T.eachChild(function(C){var D=De(C);D.seriesIndex=_.seriesIndex,D.dataIndex=p,D.ssrType="legend"}),v&&T.eachChild(function(C){g.packEventData(C,a,_,p,y)}),c.set(y,!0)}else n.eachRawSeries(function(C){var D=this;if(!c.get(y)&&C.legendVisualProvider){var M=C.legendVisualProvider;if(!M.containName(y))return;var L=M.indexOfName(y),I=M.getItemVisual(L,"style"),P=M.getItemVisual(L,"legendIcon"),R=Lr(I.fill);R&&R[3]===0&&(R[3]=.2,I=$($({},I),{fill:Ka(R,"rgba")}));var E=this._createItem(C,y,p,d,a,e,{},I,P,f,i);E.on("click",Hs(mA,null,y,i,h)).on("mouseover",Hs(a_,null,y,i,h)).on("mouseout",Hs(n_,null,y,i,h)),n.ssr&&E.eachChild(function(O){var k=De(O);k.seriesIndex=C.seriesIndex,k.dataIndex=p,k.ssrType="legend"}),v&&E.eachChild(function(O){D.packEventData(O,a,C,p,y)}),c.set(y,!0)}},this)},this),o&&this._createSelector(o,a,i,s,l)},t.prototype.packEventData=function(e,a,n,i,o){var s={componentType:"legend",componentIndex:a.componentIndex,dataIndex:i,value:o,seriesIndex:n.seriesIndex};De(e).eventData=s},t.prototype._createSelector=function(e,a,n,i,o){var s=this.getSelectorGroup();r_(e,function(u){var c=u.type,f=new Ue({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){n.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:a.id})}});s.add(f);var v=a.getModel("selectorLabel"),h=a.getModel(["emphasis","selectorLabel"]);$t(f,{normal:v,emphasis:h},{defaultText:u.title}),Fo(f)})},t.prototype._createItem=function(e,a,n,i,o,s,l,u,c,f,v){var h=e.visualDrawType,d=o.get("itemWidth"),p=o.get("itemHeight"),g=o.isSelected(a),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");c=_||c||"roundRect";var S=fae(c,i,l,u,h,g,v),w=new wv,x=i.getModel("textStyle");if(ye(e.getLegendIcon)&&(!_||_==="inherit"))w.add(e.getLegendIcon({itemWidth:d,itemHeight:p,icon:c,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var b=_==="inherit"&&e.getData().getVisual("symbol")?y==="inherit"?e.getData().getVisual("symbolRotate"):y:0;w.add(vae({itemWidth:d,itemHeight:p,icon:c,iconRotate:b,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}))}var T=s==="left"?d+5:-5,C=s,D=o.get("formatter"),M=a;oe(D)&&D?M=D.replace("{name}",a??""):ye(D)&&(M=D(a));var L=g?x.getTextColor():i.get("inactiveColor");w.add(new Ue({style:it(x,{text:M,x:T,y:p/2,fill:L,align:C,verticalAlign:"middle"},{inheritColor:L})}));var I=new Ve({shape:w.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&Hn({el:I,componentModel:o,itemName:a,itemTooltipOption:P.option}),w.add(I),w.eachChild(function(R){R.silent=!0}),I.silent=!f,this.getContentGroup().add(w),Fo(w),w.__legendDataIndex=n,w},t.prototype.layoutInner=function(e,a,n,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Ho(e.get("orient"),l,e.get("itemGap"),n.width,n.height);var c=l.getBoundingRect(),f=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Ho("horizontal",u,e.get("selectorItemGap",!0));var v=u.getBoundingRect(),h=[-v.x,-v.y],d=e.get("selectorButtonGap",!0),p=e.getOrient().index,g=p===0?"width":"height",y=p===0?"height":"width",m=p===0?"y":"x";s==="end"?h[p]+=c[g]+d:f[p]+=v[g]+d,h[1-p]+=c[y]/2-v[y]/2,u.x=h[0],u.y=h[1],l.x=f[0],l.y=f[1];var _={x:0,y:0};return _[g]=c[g]+d+v[g],_[y]=Math.max(c[y],v[y]),_[m]=Math.min(0,v[m]+h[1-p]),_}else return l.x=f[0],l.y=f[1],this.group.getBoundingRect()},t.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},t.type="legend.plain",t}(pt);function fae(r,t,e,a,n,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),r_(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=t.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",f=l.getShallow("decal");u.decal=!f||f==="inherit"?a.decal:gl(f,o),u.fill==="inherit"&&(u.fill=a[n]),u.stroke==="inherit"&&(u.stroke=a[c]),u.opacity==="inherit"&&(u.opacity=(n==="fill"?a:e).opacity),s(u,a);var v=t.getModel("lineStyle"),h=v.getLineStyle();if(s(h,e),u.fill==="auto"&&(u.fill=a.fill),u.stroke==="auto"&&(u.stroke=a.fill),h.stroke==="auto"&&(h.stroke=a.fill),!i){var d=t.get("inactiveBorderWidth"),p=u[c];u.lineWidth=d==="auto"?a.lineWidth>0&&p?2:0:u.lineWidth,u.fill=t.get("inactiveColor"),u.stroke=t.get("inactiveBorderColor"),h.stroke=v.get("inactiveColor"),h.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function vae(r){var t=r.icon||"roundRect",e=kt(t,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return e.setStyle(r.itemStyle),e.rotation=(r.iconRotate||0)*Math.PI/180,e.setOrigin([r.itemWidth/2,r.itemHeight/2]),t.indexOf("empty")>-1&&(e.style.stroke=e.style.fill,e.style.fill=G.color.neutral00,e.style.lineWidth=2),e}function mA(r,t,e,a){n_(r,t,e,a),e.dispatchAction({type:"legendToggleSelect",name:r??t}),a_(r,t,e,a)}function uN(r){for(var t=r.getZr().storage.getDisplayList(),e,a=0,n=t.length;an[o],g=[-h.x,-h.y];a||(g[i]=c[u]);var y=[0,0],m=[-d.x,-d.y],_=de(e.get("pageButtonGap",!0),e.get("itemGap",!0));if(p){var S=e.get("pageButtonPosition",!0);S==="end"?m[i]+=n[o]-d[o]:y[i]+=d[o]+_}m[1-i]+=h[s]/2-d[s]/2,c.setPosition(g),f.setPosition(y),v.setPosition(m);var w={x:0,y:0};if(w[o]=p?n[o]:h[o],w[s]=Math.max(h[s],d[s]),w[l]=Math.min(0,d[l]+m[1-i]),f.__rectSize=n[o],p){var x={x:0,y:0};x[o]=Math.max(n[o]-d[o]-_,0),x[s]=w[s],f.setClipPath(new Ve({shape:x})),f.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var b=this._getPageInfo(e);return b.pageIndex!=null&&Ze(c,{x:b.contentPosition[0],y:b.contentPosition[1]},p?e:null),this._updatePageInfoView(e,b),w},t.prototype._pageGo=function(e,a,n){var i=this._getPageInfo(a)[e];i!=null&&n.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:a.id})},t.prototype._updatePageInfoView=function(e,a){var n=this._controllerGroup;A(["pagePrev","pageNext"],function(c){var f=c+"DataIndex",v=a[f]!=null,h=n.childOfName(c);h&&(h.setStyle("fill",v?e.get("pageIconColor",!0):e.get("pageIconInactiveColor",!0)),h.cursor=v?"pointer":"default")});var i=n.childOfName("pageText"),o=e.get("pageFormatter"),s=a.pageIndex,l=s!=null?s+1:0,u=a.pageCount;i&&o&&i.setStyle("text",oe(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},t.prototype._getPageInfo=function(e){var a=e.get("scrollDataIndex",!0),n=this.getContentGroup(),i=this._containerGroup.__rectSize,o=e.getOrient().index,s=Oy[o],l=Ny[o],u=this._findTargetItemIndex(a),c=n.children(),f=c[u],v=c.length,h=v?1:0,d={contentPosition:[n.x,n.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!f)return d;var p=S(f);d.contentPosition[o]=-p.s;for(var g=u+1,y=p,m=p,_=null;g<=v;++g)_=S(c[g]),(!_&&m.e>y.s+i||_&&!w(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(d.pageNextDataIndex==null&&(d.pageNextDataIndex=y.i),++d.pageCount)),m=_;for(var g=u-1,y=p,m=p,_=null;g>=-1;--g)_=S(c[g]),(!_||!w(m,_.s))&&y.i=b&&x.s<=b+i}},t.prototype._findTargetItemIndex=function(e){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===e&&(a=s)}),a??i},t.type="legend.scroll",t}(cN);const mae=yae;function _ae(r){r.registerAction("legendScroll","legendscroll",function(t,e){var a=t.scrollDataIndex;a!=null&&e.eachComponent({mainType:"legend",subType:"scroll",query:t},function(n){n.setScrollDataIndex(a)})})}function Sae(r){Oe(fN),r.registerComponentModel(gae),r.registerComponentView(mae),_ae(r)}function wae(r){Oe(fN),Oe(Sae)}var xae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.inside",t.defaultOption=zi(Ic.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),t}(Ic);const bae=xae;var qS=ze();function Cae(r,t,e){qS(r).coordSysRecordMap.each(function(a){var n=a.dataZoomInfoMap.get(t.uid);n&&(n.getRange=e)})}function Tae(r,t){for(var e=qS(r).coordSysRecordMap,a=e.keys(),n=0;ni[n+a]&&(a=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:a,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:e,zInfo:{component:t.model},triggerInfo:{roamTrigger:null,isInSelf:t.containsPoint}}}}function Lae(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(t,e){var a=qS(e),n=a.coordSysRecordMap||(a.coordSysRecordMap=ve());n.each(function(i){i.dataZoomInfoMap=null}),t.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=ZO(i);A(o.infoList,function(s){var l=s.model.uid,u=n.get(l)||n.set(l,Dae(e,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=ve());c.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){vN(n,i);return}var c=Iae(l,i,e);o.enable(c.controlType,c.opt),Bl(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Pae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type="dataZoom.inside",e}return t.prototype.render=function(e,a,n){if(r.prototype.render.apply(this,arguments),e.noTarget()){this._clear();return}this.range=e.getPercentRange(),Cae(n,e,{pan:se(By.pan,this),zoom:se(By.zoom,this),scrollMove:se(By.scrollMove,this)})},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){Tae(this.api,this.dataZoomModel),this.range=null},t.type="dataZoom.inside",t}(GS),By={zoom:function(r,t,e,a){var n=this.range,i=n.slice(),o=r.axisModels[0];if(o){var s=Vy[t](null,[a.originX,a.originY],o,e,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 c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(ki(0,i,[0,100],0,c.minSpan,c.maxSpan),this.range=i,n[0]!==i[0]||n[1]!==i[1])return i}},pan:xA(function(r,t,e,a,n,i){var o=Vy[a]([i.oldX,i.oldY],[i.newX,i.newY],t,n,e);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:xA(function(r,t,e,a,n,i){var o=Vy[a]([0,0],[i.scrollDelta,i.scrollDelta],t,n,e);return o.signal*(r[1]-r[0])*i.scrollDelta})};function xA(r){return function(t,e,a,n){var i=this.range,o=i.slice(),s=t.axisModels[0];if(s){var l=r(o,s,t,e,a,n);if(ki(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Vy={grid:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=t[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,t,e,a,n){var i=e.axis,o={},s=n.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],t=s.pointToCoord(t),e.mainType==="radiusAxis"?(o.pixel=t[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=t[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,t,e,a,n){var i=e.axis,o=n.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=t[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=t[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};const kae=Pae;function hN(r){HS(r),r.registerComponentModel(bae),r.registerComponentView(kae),Lae(r)}var Rae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.type="dataZoom.slider",t.layoutMode="box",t.defaultOption=zi(Ic.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:G.color.accent10,borderRadius:0,backgroundColor:G.color.transparent,dataBackground:{lineStyle:{color:G.color.accent30,width:.5},areaStyle:{color:G.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:G.color.accent40,width:.5},areaStyle:{color:G.color.accent20,opacity:.3}},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:G.color.neutral00,borderColor:G.color.accent20},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:G.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:G.color.tertiary},brushSelect:!0,brushStyle:{color:G.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:G.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),t}(Ic);const Eae=Rae;var Cu=Ve,Oae=1,zy=30,Nae=7,Tu="horizontal",bA="vertical",Bae=5,Vae=["line","bar","candlestick","scatter"],zae={easing:"cubicOut",duration:100,delay:0},Fae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._displayables={},e}return t.prototype.init=function(e,a){this.api=a,this._onBrush=se(this._onBrush,this),this._onBrushEnd=se(this._onBrushEnd,this)},t.prototype.render=function(e,a,n,i){if(r.prototype.render.apply(this,arguments),Bl(this,"_dispatchZoomAction",e.get("throttle"),"fixRate"),this._orient=e.getOrient(),e.get("show")===!1){this.group.removeAll();return}if(e.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},t.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},t.prototype._clear=function(){dc(this,"_dispatchZoomAction");var e=this.api.getZr();e.off("mousemove",this._onBrush),e.off("mouseup",this._onBrushEnd)},t.prototype._buildView=function(){var e=this.group;e.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var a=this._displayables.sliderGroup=new _e;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),e.add(a),this._positionGroup()},t.prototype._resetLocation=function(){var e=this.dataZoomModel,a=this.api,n=e.get("brushSelect"),i=n?Nae:0,o=Ft(e,a).refContainer,s=this._findCoordRect(),l=e.get("defaultLocationEdgeGap",!0)||0,u=this._orient===Tu?{right:o.width-s.x-s.width,top:o.height-zy-l-i,width:s.width,height:zy}:{right:l,top:s.y,width:zy,height:s.height},c=ls(e.option);A(["right","top","width","height"],function(v){c[v]==="ph"&&(c[v]=u[v])});var f=ct(c,o);this._location={x:f.x,y:f.y},this._size=[f.width,f.height],this._orient===bA&&this._size.reverse()},t.prototype._positionGroup=function(){var e=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===Tu&&!o?{scaleY:l?1:-1,scaleX:1}:n===Tu&&o?{scaleY:l?1:-1,scaleX:-1}:n===bA&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=e.getBoundingRect([s]);e.x=a.x-u.x,e.y=a.y-u.y,e.markRedraw()},t.prototype._getViewExtent=function(){return[0,this._size[0]]},t.prototype._renderBackground=function(){var e=this.dataZoomModel,a=this._size,n=this._displayables.sliderGroup,i=e.get("brushSelect");n.add(new Cu({silent:!0,shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:e.get("backgroundColor")},z2:-40}));var o=new Cu({shape:{x:0,y:0,width:a[0],height:a[1]},style:{fill:"transparent"},z2:0,onclick:se(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)},t.prototype._renderDataShadow=function(){var e=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!e)return;var a=this._size,n=this._shadowSize||[],i=e.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():e.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||a[0]!==n[0]||a[1]!==n[1]){var f=o.getDataExtent(e.thisDim),v=o.getDataExtent(l),h=(v[1]-v[0])*.3;v=[v[0]-h,v[1]+h];var d=[0,a[1]],p=[0,a[0]],g=[[a[0],0],[0,0]],y=[],m=p[1]/Math.max(1,o.count()-1),_=a[0]/(f[1]-f[0]),S=e.thisAxis.type==="time",w=-m,x=Math.round(o.count()/a[0]),b;o.each([e.thisDim,l],function(L,I,P){if(x>0&&P%x){S||(w+=m);return}w=S?(+L-f[0])*_:w+m;var R=I==null||isNaN(I)||I==="",E=R?0:Je(I,v,d,!0);R&&!b&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!R&&b&&(g.push([w,0]),y.push([w,0])),R||(g.push([w,E]),y.push([w,E])),b=R}),u=this._shadowPolygonPts=g,c=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[a[0],a[1]];var T=this.dataZoomModel;function C(L){var I=T.getModel(L?"selectedDataBackground":"dataBackground"),P=new _e,R=new wr({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),E=new fr({shape:{points:c},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(R),P.add(E),P}for(var D=0;D<3;D++){var M=C(D===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},t.prototype._prepareDataShadowInfo=function(){var e=this.dataZoomModel,a=e.get("showDataShadow");if(a!==!1){var n,i=this.ecModel;return e.eachTargetAxis(function(o,s){var l=e.getAxisProxy(o,s).getTargetSeriesModels();A(l,function(u){if(!n&&!(a!==!0&&ke(Vae,u.get("type"))<0)){var c=i.getComponent(_i(o),s).axis,f=Gae(o),v,h=u.coordinateSystem;f!=null&&h.getOtherAxis&&(v=h.getOtherAxis(c).inverse),f=u.getData().mapDimension(f);var d=u.getData().mapDimension(o);n={thisAxis:c,series:u,thisDim:d,otherDim:f,otherAxisInverse:v}}},this)},this),n}},t.prototype._renderHandle=function(){var e=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,c=l.get("borderRadius")||0,f=l.get("brushSelect"),v=a.filler=new Cu({silent:f,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new Cu({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Oae,fill:G.color.transparent}})),A([0,1],function(_){var S=l.get("handleIcon");!mh[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var w=kt(S,-1,0,2,2,null,!0);w.attr({cursor:Hae(this._orient),draggable:!0,drift:se(this._onDragMove,this,_),ondragend:se(this._onDragEnd,this),onmouseover:se(this._showDataInfo,this,!0),onmouseout:se(this._showDataInfo,this,!1),z2:5});var x=w.getBoundingRect(),b=l.get("handleSize");this._handleHeight=ne(b,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,w.setStyle(l.getModel("handleStyle").getItemStyle()),w.style.strokeNoScale=!0,w.rectHover=!0,w.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Fo(w);var T=l.get("handleColor");T!=null&&(w.style.fill=T),o.add(n[_]=w);var C=l.getModel("textStyle"),D=l.get("handleLabel")||{},M=D.show||!1;e.add(i[_]=new Ue({silent:!0,invisible:!M,style:it(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var h=v;if(f){var d=ne(l.get("moveHandleSize"),s[1]),p=a.moveHandle=new Ve({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:d}}),g=d*.8,y=a.moveHandleIcon=kt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,G.color.neutral00,!0);y.silent=!0,y.y=s[1]+d/2-.5,p.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(d,10));h=a.moveZone=new Ve({invisible:!0,shape:{y:s[1]-m,height:d+m}}),h.on("mouseover",function(){u.enterEmphasis(p)}).on("mouseout",function(){u.leaveEmphasis(p)}),o.add(p),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:se(this._onDragMove,this,"all"),ondragstart:se(this._showDataInfo,this,!0),ondragend:se(this._onDragEnd,this),onmouseover:se(this._showDataInfo,this,!0),onmouseout:se(this._showDataInfo,this,!1)})},t.prototype._resetInterval=function(){var e=this._range=this.dataZoomModel.getPercentRange(),a=this._getViewExtent();this._handleEnds=[Je(e[0],[0,100],a,!0),Je(e[1],[0,100],a,!0)]},t.prototype._updateInterval=function(e,a){var n=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=n.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];ki(a,i,o,n.get("zoomLock")?"all":e,s.minSpan!=null?Je(s.minSpan,l,o,!0):null,s.maxSpan!=null?Je(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=oa([Je(i[0],o,l,!0),Je(i[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},t.prototype._updateView=function(e){var a=this._displayables,n=this._handleEnds,i=oa(n.slice()),o=this._size;A([0,1],function(h){var d=a.handles[h],p=this._handleHeight;d.attr({scaleX:p/2,scaleY:p/2,x:n[h]+(h?-1:1),y:o[1]/2-p/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]],c=0;ca[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)}},t.prototype._onBrushStart=function(e){var a=e.offsetX,n=e.offsetY;this._brushStart=new we(a,n),this._brushing=!0,this._brushStartTime=+new Date},t.prototype._onBrushEnd=function(e){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],l=this._handleEnds=[n.x,n.x+n.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();ki(0,l,o,0,u.minSpan!=null?Je(u.minSpan,s,o,!0):null,u.maxSpan!=null?Je(u.maxSpan,s,o,!0):null),this._range=oa([Je(l[0],o,s,!0),Je(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},t.prototype._onBrush=function(e){this._brushing&&(Rn(e.event),this._updateBrushRect(e.offsetX,e.offsetY))},t.prototype._updateBrushRect=function(e,a){var n=this._displayables,i=this.dataZoomModel,o=n.brushRect;o||(o=n.brushRect=new Cu({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(e,a),c=l.transformCoordToLocal(s.x,s.y),f=this._size;u[0]=Math.max(Math.min(f[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:f[1]})},t.prototype._dispatchZoomAction=function(e){var a=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:e?zae:null,start:a[0],end:a[1]})},t.prototype._findCoordRect=function(){var e,a=ZO(this.dataZoomModel).infoList;if(!e&&a.length){var n=a[0].model.coordinateSystem;e=n.getRect&&n.getRect()}if(!e){var i=this.api.getWidth(),o=this.api.getHeight();e={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return e},t.type="dataZoom.slider",t}(GS);function Gae(r){var t={x:"y",y:"x",radius:"angle",angle:"radius"};return t[r]}function Hae(r){return r==="vertical"?"ns-resize":"ew-resize"}const $ae=Fae;function dN(r){r.registerComponentModel(Eae),r.registerComponentView($ae),HS(r)}function Wae(r){Oe(hN),Oe(dN)}var Yae={get:function(r,t,e){var a=me((Uae[r]||{})[t]);return e&&Z(a)?a[a.length-1]:a}},Uae={color:{active:["#006edd","#e0ffff"],inactive:[G.color.transparent]},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 pN=Yae;var CA=tr.mapVisual,Zae=tr.eachVisual,Xae=Z,TA=A,qae=oa,jae=Je,Kae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.stateList=["inRange","outOfRange"],e.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],e.layoutMode={type:"box",ignoreSize:!0},e.dataBound=[-1/0,1/0],e.targetVisuals={},e.controllerVisuals={},e}return t.prototype.init=function(e,a,n){this.mergeDefaultAndTheme(e,n)},t.prototype.optionUpdated=function(e,a){var n=this.option;!a&&aN(n,e,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},t.prototype.resetVisual=function(e){var a=this.stateList;e=se(e,this),this.controllerVisuals=J0(this.option.controller,a,e),this.targetVisuals=J0(this.option.target,a,e)},t.prototype.getItemSymbol=function(){return null},t.prototype.getTargetSeriesIndices=function(){var e=this.option.seriesId,a=this.option.seriesIndex;a==null&&e==null&&(a="all");var n=Il(this.ecModel,"series",{index:a,id:e},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return X(n,function(i){return i.componentIndex})},t.prototype.eachTargetSeries=function(e,a){A(this.getTargetSeriesIndices(),function(n){var i=this.ecModel.getSeriesByIndex(n);i&&e.call(a,i)},this)},t.prototype.isTargetSeries=function(e){var a=!1;return this.eachTargetSeries(function(n){n===e&&(a=!0)}),a},t.prototype.formatValueText=function(e,a,n){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;n=n||["<",">"],Z(e)&&(e=e.slice(),u=!0);var c=a?e:u?[f(e[0]),f(e[1])]:f(e);if(oe(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(ye(l))return u?l(e[0],e[1]):l(e);if(u)return e[0]===s[0]?n[0]+" "+c[1]:e[1]===s[1]?n[1]+" "+c[0]:c[0]+" - "+c[1];return c;function f(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},t.prototype.resetExtent=function(){var e=this.option,a=qae([e.min,e.max]);this._dataExtent=a},t.prototype.getDataDimensionIndex=function(e){var a=this.option.dimension;if(a!=null)return e.getDimensionIndex(a);for(var n=e.dimensions,i=n.length-1;i>=0;i--){var o=n[i],s=e.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},t.prototype.getExtent=function(){return this._dataExtent.slice()},t.prototype.completeVisualOption=function(){var e=this.ecModel,a=this.option,n={inRange:a.inRange,outOfRange:a.outOfRange},i=a.target||(a.target={}),o=a.controller||(a.controller={});Re(i,n),Re(o,n);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),c.call(this,o);function l(f){Xae(a.color)&&!f.inRange&&(f.inRange={color:a.color.slice().reverse()}),f.inRange=f.inRange||{color:e.get("gradientColor")}}function u(f,v,h){var d=f[v],p=f[h];d&&!p&&(p=f[h]={},TA(d,function(g,y){if(tr.isValidType(y)){var m=pN.get(y,"inactive",s);m!=null&&(p[y]=m,y==="color"&&!p.hasOwnProperty("opacity")&&!p.hasOwnProperty("colorAlpha")&&(p.opacity=[0,0]))}}))}function c(f){var v=(f.inRange||{}).symbol||(f.outOfRange||{}).symbol,h=(f.inRange||{}).symbolSize||(f.outOfRange||{}).symbolSize,d=this.get("inactiveColor"),p=this.getItemSymbol(),g=p||"roundRect";TA(this.stateList,function(y){var m=this.itemSize,_=f[y];_||(_=f[y]={color:s?d:[d]}),_.symbol==null&&(_.symbol=v&&me(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=h&&me(h)||(s?m[0]:[m[0],m[0]])),_.symbol=CA(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var w=-1/0;Zae(S,function(x){x>w&&(w=x)}),_.symbolSize=CA(S,function(x){return jae(x,[0,w],[0,m[0]],!0)})}},this)}},t.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},t.prototype.isCategory=function(){return!!this.option.categories},t.prototype.setSelected=function(e){},t.prototype.getSelected=function(){return null},t.prototype.getValueState=function(e){return null},t.prototype.getVisualMeta=function(e){return null},t.type="visualMap",t.dependencies=["series"],t.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:G.color.transparent,borderColor:G.color.borderTint,contentColor:G.color.theme[0],inactiveColor:G.color.disabled,borderWidth:0,padding:G.size.m,textGap:10,precision:0,textStyle:{color:G.color.secondary}},t}(We);const Jh=Kae;var DA=[20,140],Jae=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(n){n.mappingMethod="linear",n.dataExtent=this.getExtent()}),this._resetRange()},t.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var e=this.itemSize;(e[0]==null||isNaN(e[0]))&&(e[0]=DA[0]),(e[1]==null||isNaN(e[1]))&&(e[1]=DA[1])},t.prototype._resetRange=function(){var e=this.getExtent(),a=this.option.range;!a||a.auto?(e.auto=1,this.option.range=e):Z(a)&&(a[0]>a[1]&&a.reverse(),a[0]=Math.max(a[0],e[0]),a[1]=Math.min(a[1],e[1]))},t.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),A(this.stateList,function(e){var a=this.option.controller[e].symbolSize;a&&a[0]!==a[1]&&(a[0]=a[1]/3)},this)},t.prototype.setSelected=function(e){this.option.range=e.slice(),this._resetRange()},t.prototype.getSelected=function(){var e=this.getExtent(),a=oa((this.get("range")||[]).slice());return a[0]>e[1]&&(a[0]=e[1]),a[1]>e[1]&&(a[1]=e[1]),a[0]=n[1]||e<=a[1])?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[];return this.eachTargetSeries(function(n){var i=[],o=n.getData();o.each(this.getDataDimensionIndex(o),function(s,l){e[0]<=s&&s<=e[1]&&i.push(l)},this),a.push({seriesId:n.id,dataIndex:i})},this),a},t.prototype.getVisualMeta=function(e){var a=MA(this,"outOfRange",this.getExtent()),n=MA(this,"inRange",this.option.range.slice()),i=[];function o(h,d){i.push({value:h,color:e(h,d)})}for(var s=0,l=0,u=n.length,c=a.length;le[1])break;i.push({color:this.getControllerVisual(l,"color",a),offset:s/n})}return i.push({color:this.getControllerVisual(e[1],"color",a),offset:1}),i},t.prototype._createBarPoints=function(e,a){var n=this.visualMapModel.itemSize;return[[n[0]-a[0],e[0]],[n[0],e[0]],[n[0],e[1]],[n[0]-a[1],e[1]]]},t.prototype._createBarGroup=function(e){var a=this._orient,n=this.visualMapModel.get("inverse");return new _e(a==="horizontal"&&!n?{scaleX:e==="bottom"?1:-1,rotation:Math.PI/2}:a==="horizontal"&&n?{scaleX:e==="bottom"?-1:1,rotation:-Math.PI/2}:a==="vertical"&&!n?{scaleX:e==="left"?1:-1,scaleY:-1}:{scaleX:e==="left"?1:-1})},t.prototype._updateHandle=function(e,a){if(this._useHandle){var n=this._shapes,i=this.visualMapModel,o=n.handleThumbs,s=n.handleLabels,l=i.itemSize,u=i.getExtent(),c=this._applyTransform("left",n.mainGroup);tne([0,1],function(f){var v=o[f];v.setStyle("fill",a.handlesColor[f]),v.y=e[f];var h=Va(e[f],[0,l[1]],u,!0),d=this.getControllerVisual(h,"symbolSize");v.scaleX=v.scaleY=d/l[0],v.x=l[0]-d/2;var p=_a(n.handleLabelPoints[f],Go(v,this.group));if(this._orient==="horizontal"){var g=c==="left"||c==="top"?(l[0]-d)/2:(l[0]-d)/-2;p[1]+=g}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)}},t.prototype._showIndicator=function(e,a,n,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,f=c.indicator;if(f){f.attr("invisible",!1);var v={convertOpacityToAlpha:!0},h=this.getControllerVisual(e,"color",v),d=this.getControllerVisual(e,"symbolSize"),p=Va(e,s,u,!0),g=l[0]-d/2,y={x:f.x,y:f.y};f.y=p,f.x=g;var m=_a(c.indicatorLabelPoint,Go(f,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",c.mainGroup),w=this._orient,x=w==="horizontal";_.setStyle({text:(n||"")+o.formatValueText(a),verticalAlign:x?S:"middle",align:x?"center":S});var b={x:g,y:p,style:{fill:h}},T={style:{x:m[0],y:m[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};f.x=y.x,f.y=y.y,f.animateTo(b,C),_.animateTo(T,C)}else f.attr(b),_.attr(T);this._firstShowIndicator=!1;var D=this._shapes.handleLabels;if(D)for(var M=0;Mo[1]&&(f[1]=1/0),a&&(f[0]===-1/0?this._showIndicator(c,f[1],"< ",l):f[1]===1/0?this._showIndicator(c,f[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var v=this._hoverLinkDataIndices,h=[];(a||PA(n))&&(h=this._hoverLinkDataIndices=n.findTargetDataIndices(f));var d=M3(v,h);this._dispatchHighDown("downplay",Zv(d[0],n)),this._dispatchHighDown("highlight",Zv(d[1],n))}},t.prototype._hoverLinkFromSeriesMouseOver=function(e){var a;if(Ro(e.target,function(l){var u=De(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)}}},t.prototype._hideIndicator=function(){var e=this._shapes;e.indicator&&e.indicator.attr("invisible",!0),e.indicatorLabel&&e.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 cne(r,t,e,a){for(var n=t.targetVisuals[a],i=tr.prepareVisualTypes(n),o={color:Gc(r.getData(),"color")},s=0,l=i.length;s0:t.splitNumber>0)||t.calculable)?"continuous":"piecewise"}),r.registerAction(sne,lne),A(une,function(t){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,t)}),r.registerPreprocessor(fne))}function _N(r){r.registerComponentModel(Qae),r.registerComponentView(one),mN(r)}var vne=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e._pieceList=[],e}return t.prototype.optionUpdated=function(e,a){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var n=this._mode=this._determineMode();this._pieceList=[],hne[this._mode].call(this,this._pieceList),this._resetSelected(e,a);var i=this.option.categories;this.resetVisual(function(o,s){n==="categories"?(o.mappingMethod="category",o.categories=me(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=X(this._pieceList,function(l){return l=me(l),s!=="inRange"&&(l.visual=null),l}))})},t.prototype.completeVisualOption=function(){var e=this.option,a={},n=tr.listVisualTypes(),i=this.isCategory();A(e.pieces,function(s){A(n,function(l){s.hasOwnProperty(l)&&(a[l]=1)})}),A(a,function(s,l){var u=!1;A(this.stateList,function(c){u=u||o(e,c,l)||o(e.target,c,l)},this),!u&&A(this.stateList,function(c){(e[c]||(e[c]={}))[l]=pN.get(l,c==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},t.prototype._resetSelected=function(e,a){var n=this.option,i=this._pieceList,o=(a?n:e).selected||{};if(n.selected=o,A(i,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),n.selectedMode==="single"){var s=!1;A(i,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!1:s=!0)},this)}},t.prototype.getItemSymbol=function(){return this.get("itemSymbol")},t.prototype.getSelectedMapKey=function(e){return this._mode==="categories"?e.value+"":e.index+""},t.prototype.getPieceList=function(){return this._pieceList},t.prototype._determineMode=function(){var e=this.option;return e.pieces&&e.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},t.prototype.setSelected=function(e){this.option.selected=me(e)},t.prototype.getValueState=function(e){var a=tr.findPieceIndex(e,this._pieceList);return a!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[a])]?"inRange":"outOfRange"},t.prototype.findTargetDataIndices=function(e){var a=[],n=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=tr.findPieceIndex(l,n);c===e&&o.push(u)},this),a.push({seriesId:i.id,dataIndex:o})},this),a},t.prototype.getRepresentValue=function(e){var a;if(this.isCategory())a=e.value;else if(e.value!=null)a=e.value;else{var n=e.interval||[];a=n[0]===-1/0&&n[1]===1/0?0:(n[0]+n[1])/2}return a},t.prototype.getVisualMeta=function(e){if(this.isCategory())return;var a=[],n=["",""],i=this;function o(c,f){var v=i.getRepresentValue({interval:c});f||(f=i.getValueState(v));var h=e(v,f);c[0]===-1/0?n[0]=h:c[1]===1/0?n[1]=h:a.push({value:c[0],color:h},{value:c[1],color:h})}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 A(s,function(c){var f=c.interval;f&&(f[0]>u&&o([u,f[0]],"outOfRange"),o(f.slice()),u=f[1])},this),{stops:a,outerColors:n}},t.type="visualMap.piecewise",t.defaultOption=zi(Jh.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}),t}(Jh),hne={splitNumber:function(r){var t=this.option,e=Math.min(t.precision,20),a=this.getExtent(),n=t.splitNumber;n=Math.max(parseInt(n,10),1),t.splitNumber=n;for(var i=(a[1]-a[0])/n;+i.toFixed(e)!==i&&e<5;)e++;t.precision=e,i=+i.toFixed(e),t.minOpen&&r.push({interval:[-1/0,a[0]],close:[0,0]});for(var o=0,s=a[0];o","≥"][a[0]]];e.text=e.text||this.formatValueText(e.value!=null?e.value:e.interval,!1,n)},this)}};function OA(r,t){var e=r.inverse;(r.orient==="vertical"?!e:e)&&t.reverse()}const dne=vne;var pne=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.doRender=function(){var e=this.group;e.removeAll();var a=this.visualMapModel,n=a.get("textGap"),i=a.textStyleModel,o=this._getItemAlign(),s=a.itemSize,l=this._getViewData(),u=l.endsText,c=er(a.get("showLabel",!0),!u),f=!a.get("selectedMode");u&&this._renderEndsText(e,u[0],s,c,o),A(l.viewPieceList,function(v){var h=v.piece,d=new _e;d.onclick=se(this._onItemClick,this,h),this._enableHoverLink(d,v.indexInModelPieceList);var p=a.getRepresentValue(h);if(this._createItemSymbol(d,p,[0,0,s[0],s[1]],f),c){var g=this.visualMapModel.getValueState(p),y=i.get("align")||o;d.add(new Ue({style:it(i,{x:y==="right"?-n:s[0]+n,y:s[1]/2,text:h.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:de(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:f}))}e.add(d)},this),u&&this._renderEndsText(e,u[1],s,c,o),Ho(a.get("orient"),e,a.get("itemGap")),this.renderBackground(e),this.positionGroup(e)},t.prototype._enableHoverLink=function(e,a){var n=this;e.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:Zv(s.findTargetDataIndices(a),s)})}},t.prototype._getItemAlign=function(){var e=this.visualMapModel,a=e.option;if(a.orient==="vertical")return yN(e,this.api,e.itemSize);var n=a.align;return(!n||n==="auto")&&(n="left"),n},t.prototype._renderEndsText=function(e,a,n,i,o){if(a){var s=new _e,l=this.visualMapModel.textStyleModel;s.add(new Ue({style:it(l,{x:i?o==="right"?n[0]:0:n[0]/2,y:n[1]/2,verticalAlign:"middle",align:i?o:"center",text:a})})),e.add(s)}},t.prototype._getViewData=function(){var e=this.visualMapModel,a=X(e.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),n=e.get("text"),i=e.get("orient"),o=e.get("inverse");return(i==="horizontal"?o:!o)?a.reverse():n&&(n=n.slice().reverse()),{viewPieceList:a,endsText:n}},t.prototype._createItemSymbol=function(e,a,n,i){var o=kt(this.getControllerVisual(a,"symbol"),n[0],n[1],n[2],n[3],this.getControllerVisual(a,"color"));o.silent=i,e.add(o)},t.prototype._onItemClick=function(e){var a=this.visualMapModel,n=a.option,i=n.selectedMode;if(i){var o=me(n.selected),s=a.getSelectedMapKey(e);i==="single"||i===!0?(o[s]=!0,A(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})}},t.type="visualMap.piecewise",t}(gN);const gne=pne;function SN(r){r.registerComponentModel(dne),r.registerComponentView(gne),mN(r)}function yne(r){Oe(_N),Oe(SN)}var mne=function(){function r(t){this._thumbnailModel=t}return r.prototype.reset=function(t){this._renderVersion=t.getMainProcessVersion()},r.prototype.renderContent=function(t){var e=t.api.getViewOfComponentModel(this._thumbnailModel);e&&(t.group.silent=!0,e.renderContent({group:t.group,targetTrans:t.targetTrans,z2Range:EL(t.group),roamType:t.roamType,viewportRect:t.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(t,e){var a=e.getViewOfComponentModel(this._thumbnailModel);a&&a.updateWindow({targetTrans:t,renderVersion:this._renderVersion})},r}(),_ne=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e.preventAutoZ=!0,e}return t.prototype.optionUpdated=function(e,a){this._updateBridge()},t.prototype._updateBridge=function(){var e=this._birdge=this._birdge||new mne(this);if(this._target=null,this.ecModel.eachSeries(function(n){iD(n,null)}),this.shouldShow()){var a=this.getTarget();iD(a.baseMapProvider,e)}},t.prototype.shouldShow=function(){return this.getShallow("show",!0)},t.prototype.getBridge=function(){return this._birdge},t.prototype.getTarget=function(){if(this._target)return this._target;var e=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return e?e.subType!=="graph"&&(e=null):e=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:e},this._target},t.type="thumbnail",t.layoutMode="box",t.dependencies=["series","geo"],t.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:G.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:G.color.neutral30,borderColor:G.color.neutral40,opacity:.3},z:10},t}(We),Sne=function(r){V(t,r);function t(){var e=r!==null&&r.apply(this,arguments)||this;return e.type=t.type,e}return t.prototype.render=function(e,a,n){if(this._api=n,this._model=e,this._coordSys||(this._coordSys=new ps),!this._isEnabled()){this._clear();return}this._renderVersion=n.getMainProcessVersion();var i=this.group;i.removeAll();var o=e.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=a.get("backgroundColor")||G.color.neutral00);var l=Ft(e,n).refContainer,u=ct(aP(e,!0),l),c=s.lineWidth||0,f=this._contentRect=jo(u.clone(),c/2,!0,!0),v=new _e;i.add(v),v.setClipPath(new Ve({shape:f.plain()}));var h=this._targetGroup=new _e;v.add(h);var d=u.plain();d.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new Ve({style:s,shape:d,silent:!1,cursor:"grab"}));var p=e.getModel("windowStyle"),g=p.getShallow("borderRadius",!0);v.add(this._windowRect=new Ve({shape:{x:0,y:0,width:0,height:0,r:g},style:p.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),BA(e,this)},t.prototype.renderContent=function(e){this._bridgeRendered=e,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),BA(this._model,this))},t.prototype._dealRenderContent=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=this._targetGroup,n=this._coordSys,i=this._contentRect;if(a.removeAll(),!!e){var o=e.group,s=o.getBoundingRect();a.add(o),this._bgRect.z2=e.z2Range.min-10,n.setBoundingRect(s.x,s.y,s.width,s.height);var l=ct({left:"center",top:"center",aspect:s.width/s.height},i);n.setViewRect(l.x,l.y,l.width,l.height),o.attr(n.getTransformInfo().raw),this._windowRect.z2=e.z2Range.max+10,this._resetRoamController(e.roamType)}}},t.prototype.updateWindow=function(e){var a=this._bridgeRendered;a&&a.renderVersion===e.renderVersion&&(a.targetTrans=e.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},t.prototype._dealUpdateWindow=function(){var e=this._bridgeRendered;if(!(!e||e.renderVersion!==this._renderVersion)){var a=xa([],e.targetTrans),n=ja([],this._coordSys.transform,a);this._transThisToTarget=xa([],n);var i=e.viewportRect;i?i=i.clone():i=new Ce(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(n);var o=this._windowRect,s=o.shape.r;o.setShape(xe({r:s},i))}},t.prototype._resetRoamController=function(e){var a=this,n=this._api,i=this._roamController;if(i||(i=this._roamController=new ds(n.getZr())),!e||!this._isEnabled()){i.disable();return}i.enable(e,{api:n,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return a._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",se(this._onPan,this)).on("zoom",se(this._onZoom,this))},t.prototype._onPan=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=Tt([],[e.oldX,e.oldY],a),i=Tt([],[e.oldX-e.dx,e.oldY-e.dy],a);this._api.dispatchAction(NA(this._model.getTarget().baseMapProvider,{dx:i[0]-n[0],dy:i[1]-n[1]}))}},t.prototype._onZoom=function(e){var a=this._transThisToTarget;if(!(!this._isEnabled()||!a)){var n=Tt([],[e.originX,e.originY],a);this._api.dispatchAction(NA(this._model.getTarget().baseMapProvider,{zoom:1/e.scale,originX:n[0],originY:n[1]}))}},t.prototype._isEnabled=function(){var e=this._model;if(!e||!e.shouldShow())return!1;var a=e.getTarget().baseMapProvider;return!!a},t.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},t.prototype.remove=function(){this._clear()},t.prototype.dispose=function(){this._clear()},t.type="thumbnail",t}(pt);function NA(r,t){var e=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",a={type:e};return a[r.mainType+"Id"]=r.id,$(a,t),a}function BA(r,t){var e=Ko(r);Ad(t.group,e.z,e.zlevel)}function wne(r){r.registerComponentModel(_ne),r.registerComponentView(Sne)}var xne={label:{enabled:!0},decal:{show:!1}},VA=ze(),bne={};function Cne(r,t){var e=r.getModel("aria");if(!e.get("enabled"))return;var a=me(xne);Re(a.label,r.getLocaleModel().get("aria"),!1),Re(e.option,a,!1),n(),i();function n(){var u=e.getModel("decal"),c=u.get("show");if(c){var f=ve();r.eachSeries(function(v){if(!v.isColorBySeries()){var h=f.get(v.type);h||(h={},f.set(v.type,h)),VA(v).scope=h}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(ye(v.enableAriaDecal)){v.enableAriaDecal();return}var h=v.getData();if(v.isColorBySeries()){var m=Zm(v.ecModel,v.name,bne,r.getSeriesCount()),_=h.getVisual("decal");h.setVisual("decal",S(_,m))}else{var d=v.getRawData(),p={},g=VA(v).scope;h.each(function(w){var x=h.getRawIndex(w);p[x]=w});var y=d.count();d.each(function(w){var x=p[w],b=d.getName(w)||w+"",T=Zm(v.ecModel,b,g,y),C=h.getItemVisual(x,"decal");h.setItemVisual(x,"decal",S(C,T))})}function S(w,x){var b=w?$($({},x),w):x;return b.dirty=!0,b}})}}function i(){var u=t.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),f=e.getModel("label");if(f.option=xe(f.option,c),!!f.get("enabled")){if(u.setAttribute("role","img"),f.get("description")){u.setAttribute("aria-label",f.get("description"));return}var v=r.getSeriesCount(),h=f.get(["data","maxCount"])||10,d=f.get(["series","maxCount"])||10,p=Math.min(v,d),g;if(!(v<1)){var y=s();if(y){var m=f.get(["general","withTitle"]);g=o(m,{title:y})}else g=f.get(["general","withoutTitle"]);var _=[],S=v>1?f.get(["series","multiple","prefix"]):f.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,C){if(C1?f.get(["series","multiple",L]):f.get(["series","single",L]),D=o(D,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>h){var P=f.get(["data","partialData"]);D+=o(P,{displayCnt:h})}else D+=f.get(["data","allData"]);for(var R=f.get(["data","separator","middle"]),E=f.get(["data","separator","end"]),O=f.get(["data","excludeDimensionId"]),k=[],N=0;N":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Mne=function(){function r(t){var e=this._condVal=oe(t)?new RegExp(t):Iz(t)?t:null;if(e==null){var a="";je(a)}}return r.prototype.evaluate=function(t){var e=typeof t;return oe(e)?this._condVal.test(t):$e(e)?this._condVal.test(t+""):!1},r}(),Ane=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),Ine=function(){function r(){}return r.prototype.evaluate=function(){for(var t=this.children,e=0;e2&&a.push(n),n=[I,P]}function c(I,P,R,E){rl(I,R)&&rl(P,E)||n.push(I,P,R,E,R,E)}function f(I,P,R,E,O,k){var N=Math.abs(P-I),B=Math.tan(N/4)*4/3,F=PT:M2&&a.push(n),a}function o_(r,t,e,a,n,i,o,s,l,u){if(rl(r,e)&&rl(t,a)&&rl(n,o)&&rl(i,s)){l.push(o,s);return}var c=2/u,f=c*c,v=o-r,h=s-t,d=Math.sqrt(v*v+h*h);v/=d,h/=d;var p=e-r,g=a-t,y=n-o,m=i-s,_=p*p+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],D=[];Mi(r,e,n,o,.5,C),Mi(t,a,i,s,.5,D),o_(C[0],D[0],C[1],D[1],C[2],D[2],C[3],D[3],l,u),o_(C[4],D[4],C[5],D[5],C[6],D[6],C[7],D[7],l,u)}function $ne(r,t){var e=i_(r),a=[];t=t||1;for(var n=0;n0)for(var u=0;uMath.abs(u),f=xN([l,u],c?0:1,t),v=(c?s:u)/f.length,h=0;hn,o=xN([a,n],i?0:1,t),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",c=i?"y":"x",f=r[s]/o.length,v=0;v1?null:new we(p*l+r,p*u+t)}function Une(r,t,e){var a=new we;we.sub(a,e,t),a.normalize();var n=new we;we.sub(n,r,t);var i=n.dot(a);return i}function Ws(r,t){var e=r[r.length-1];e&&e[0]===t[0]&&e[1]===t[1]||r.push(t)}function Zne(r,t,e){for(var a=r.length,n=[],i=0;io?(u.x=c.x=s+i/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+i),Zne(t,u,c)}function Qh(r,t,e,a){if(e===1)a.push(t);else{var n=Math.floor(e/2),i=r(t);Qh(r,i[0],n,a),Qh(r,i[1],e-n,a)}return a}function Xne(r,t){for(var e=[],a=0;a0)for(var w=a/e,x=-a/2;x<=a/2;x+=w){for(var b=Math.sin(x),T=Math.cos(x),C=0,_=0;_0;u/=2){var c=0,f=0;(r&u)>0&&(c=1),(t&u)>0&&(f=1),s+=u*u*(3*c^f),f===0&&(c===1&&(r=u-1-r,t=u-1-t),l=r,r=t,t=l)}return s}function rd(r){var t=1/0,e=1/0,a=-1/0,n=-1/0,i=X(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),f=l.y+l.height/2+(u?u[5]:0);return t=Math.min(c,t),e=Math.min(f,e),a=Math.max(c,a),n=Math.max(f,n),[c,f]}),o=X(i,function(s,l){return{cp:s,z:aie(s[0],s[1],t,e,a,n),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function TN(r){return Kne(r.path,r.count)}function s_(){return{fromIndividuals:[],toIndividuals:[],count:0}}function nie(r,t,e){var a=[];function n(w){for(var x=0;x=0;n--)if(!e[n].many.length){var l=e[s].many;if(l.length<=1)if(s)s=0;else return e;var i=l.length,u=Math.ceil(i/2);e[n].many=l.slice(u,i),e[s].many=l.slice(0,u),s++}return e}var oie={clone:function(r){for(var t=[],e=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,c;ZA(r)&&(u=r,c=t),ZA(t)&&(u=t,c=r);function f(y,m,_,S,w){var x=y.many,b=y.one;if(x.length===1&&!w){var T=m?x[0]:b,C=m?b:x[0];if(ed(T))f({many:[T],one:C},!0,_,S,!0);else{var D=s?xe({delay:s(_,S)},l):l;KS(T,C,D),i(T,C,T,C,D)}}else for(var M=xe({dividePath:oie[e],individualDelay:s&&function(O,k,N,B){return s(O+_,S)}},l),L=m?nie(x,b,M):iie(b,x,M),I=L.fromIndividuals,P=L.toIndividuals,R=I.length,E=0;Et.length,h=u?XA(c,u):XA(v?t:r,[v?r:t]),d=0,p=0;pDN))for(var i=a.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof Fe&&!T.animators.length&&T.animateFrom({style:{opacity:0}},b)})})}function QA(r){var t=r.getModel("universalTransition").get("seriesKey");return t||r.id}function e2(r){return Z(r)?r.sort().join(","):r}function ui(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function hie(r,t){var e=ve(),a=ve(),n=ve();return A(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=QA(i),c=e2(u);a.set(c,{dataGroupId:s,data:l}),Z(u)&&A(u,function(f){n.set(f,{key:c,dataGroupId:s,data:l})})}),A(t.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=QA(i),u=e2(l),c=a.get(u);if(c)e.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:ui(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:ui(s),data:s}]});else if(Z(l)){var f=[];A(l,function(d){var p=a.get(d);p.data&&f.push({dataGroupId:p.dataGroupId,divide:ui(p.data),data:p.data})}),f.length&&e.set(u,{oldSeries:f,newSeries:[{dataGroupId:o,data:s,divide:ui(s)}]})}else{var v=n.get(l);if(v){var h=e.get(v.key);h||(h={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:ui(v.data)}],newSeries:[]},e.set(v.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:ui(s)})}}}}),e}function t2(r,t){for(var e=0;e=0&&n.push({dataGroupId:t.oldDataGroupIds[s],data:t.oldData[s],divide:ui(t.oldData[s]),groupIdDim:o.dimension})}),A(at(r.to),function(o){var s=t2(e.updatedSeries,o);if(s>=0){var l=e.updatedSeries[s].getData();i.push({dataGroupId:t.oldDataGroupIds[s],data:l,divide:ui(l),groupIdDim:o.dimension})}}),n.length>0&&i.length>0&&MN(n,i,a)}function pie(r){r.registerUpdateLifecycle("series:beforeupdate",function(t,e,a){A(at(a.seriesTransition),function(n){A(at(n.to),function(i){for(var o=a.updatedSeries,s=0;so.vmin?e+=o.vmin-a+(t-o.vmin)/(o.vmax-o.vmin)*o.gapReal:e+=t-a,a=o.vmax,n=!1;break}e+=o.vmin-a+o.gapReal,a=o.vmax}return n&&(e+=t-a),e},r.prototype.unelapse=function(t){for(var e=r2,a=a2,n=!0,i=0,o=0;ol?i=s.vmin+(t-l)/(u-l)*(s.vmax-s.vmin):i=a+t-e,a=s.vmax,n=!1;break}e=u,a=s.vmax}return n&&(i=a+t-e),i},r}();function yie(){return new gie}var r2=0,a2=0;function mie(r,t){var e=0,a={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},n=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:n(),tpPrct:n()},E:{tpAbs:n(),tpPrct:n()}};A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(e+=l.val);var u=JS(s,t);if(u){var c=u.vmin!==s.vmin,f=u.vmax!==s.vmax,v=u.vmax-u.vmin;if(!(c&&f))if(c||f){var h=c?"S":"E";i[h][l.type].has=!0,i[h][l.type].span=v,i[h][l.type].inExtFrac=v/(s.vmax-s.vmin),i[h][l.type].val=l.val}else a[l.type].span+=v,a[l.type].val+=l.val}});var o=e*(0+(t[1]-t[0])+(a.tpAbs.val-a.tpAbs.span)+(i.S.tpAbs.has?(i.S.tpAbs.val-i.S.tpAbs.span)*i.S.tpAbs.inExtFrac:0)+(i.E.tpAbs.has?(i.E.tpAbs.val-i.E.tpAbs.span)*i.E.tpAbs.inExtFrac:0)-a.tpPrct.span-(i.S.tpPrct.has?i.S.tpPrct.span*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.span*i.E.tpPrct.inExtFrac:0))/(1-a.tpPrct.val-(i.S.tpPrct.has?i.S.tpPrct.val*i.S.tpPrct.inExtFrac:0)-(i.E.tpPrct.has?i.E.tpPrct.val*i.E.tpPrct.inExtFrac:0));A(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=e!==0?Math.max(o,0)*l.val/e:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function _ie(r,t,e,a,n,i){r!=="no"&&A(e,function(o){var s=JS(o,i);if(s)for(var l=t.length-1;l>=0;l--){var u=t[l],c=a(u),f=n*3/4;c>s.vmin-f&&ct[0]&&e=0&&o<1-1e-5}A(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:me(o),vmin:t(o.start),vmax:t(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(oe(o.gap)){var u=ia(o.gap);if(u.match(/%$/)){var c=parseFloat(u)/100;n(c)||(c=0),s.gapParsed.type="tpPrct",s.gapParsed.val=c,l=!0}}if(!l){var f=t(o.gap);(!isFinite(f)||f<0)&&(f=0),s.gapParsed.type="tpAbs",s.gapParsed.val=f}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),e&&e.noNegative&&A(["vmin","vmax"],function(h){s[h]<0&&(s[h]=0)}),s.vmin>s.vmax){var v=s.vmax;s.vmax=s.vmin,s.vmin=v}a.push(s)}}),a.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return A(a,function(o,s){i>o.vmin&&(a[s]=null),i=o.vmax}),{breaks:a.filter(function(o){return!!o})}}function QS(r,t){return u_(t)===u_(r)}function u_(r){return r.start+"_\0_"+r.end}function wie(r,t,e){var a=[];A(r,function(i,o){var s=t(i);s&&s.type==="vmin"&&a.push([o])}),A(r,function(i,o){var s=t(i);if(s&&s.type==="vmax"){var l=as(a,function(u){return QS(t(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var n=[];return A(a,function(i){i.length===2&&n.push(e?i:[r[i[0]],r[i[1]]])}),n}function xie(r,t,e,a){var n,i;if(r.break){var o=r.break.parsedBreak,s=as(e,function(f){return QS(f.breakOption,r.break.parsedBreak.breakOption)}),l=a(Math.pow(t,o.vmin),s.vmin),u=a(Math.pow(t,o.vmax),s.vmax),c={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?At(Math.pow(t,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};n={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:c,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:n}}function bie(r,t,e){var a={noNegative:!0},n=l_(r,e,a),i=l_(r,e,a),o=Math.log(t);return i.breaks=X(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,c={type:s.gapParsed.type,val:s.gapParsed.type==="tpAbs"?Math.log(s.vmin+s.gapParsed.val)/o-l:s.gapParsed.val};return{vmin:l,vmax:u,gapParsed:c,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:n,parsedLogged:i}}var Cie={vmin:"start",vmax:"end"};function Tie(r,t){return t&&(r=r||{},r.break={type:Cie[t.type],start:t.parsedBreak.vmin,end:t.parsedBreak.vmax}),r}function Die(){XG({createScaleBreakContext:yie,pruneTicksByBreak:_ie,addBreaksToTicks:Sie,parseAxisBreakOption:l_,identifyAxisBreak:QS,serializeAxisBreakIdentifier:u_,retrieveAxisBreakPairs:wie,getTicksLogTransformBreak:xie,logarithmicParseBreaksFromOption:bie,makeAxisLabelFormatterParamBreak:Tie})}var n2=ze();function Mie(r,t){var e=as(r,function(a){return It().identifyAxisBreak(a.parsedBreak.breakOption,t.breakOption)});return e||r.push(e={zigzagRandomList:[],parsedBreak:t,shouldRemove:!1}),e}function Aie(r){A(r,function(t){return t.shouldRemove=!0})}function Iie(r){for(var t=r.length-1;t>=0;t--)r[t].shouldRemove&&r.splice(t,1)}function Lie(r,t,e,a,n){var i=e.axis;if(i.scale.isBlank()||!It())return;var o=It().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=e.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),c=s.get("zigzagMaxSpan");u=Math.max(2,u||0),c=Math.max(u,c||0);var f=s.get("expandOnClick"),v=s.get("zigzagZ"),h=s.getModel("itemStyle"),d=h.getItemStyle(),p=d.stroke,g=d.lineWidth,y=d.lineDash,m=d.fill,_=new _e({ignoreModelZ:!0}),S=i.isHorizontal(),w=n2(t).visualList||(n2(t).visualList=[]);Aie(w);for(var x=function(C){var D=o[C][0].break.parsedBreak,M=[];M[0]=i.toGlobalCoord(i.dataToCoord(D.vmin,!0)),M[1]=i.toGlobalCoord(i.dataToCoord(D.vmax,!0)),M[1]=k;Ae&&(j=k);var Be=[],he=[];Be[E]=M,he[E]=L,!ce&&!Ae&&(Be[E]+=H?-l:l,he[E]-=H?l:-l),Be[O]=j,he[O]=j,B.push(Be),F.push(he);var fe=void 0;if(eem[1]&&m.reverse(),{coordPair:m,brkId:It().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],c=null,f=0;f=0?l[0].width:l[1].width),v=(f+c.x)/2-u.x,h=Math.min(v,v-c.x),d=Math.max(v,v-c.x),p=d<0?d:h>0?h:0;s=(v-p)/c.x}var g=new we,y=new we;we.scale(g,a,-s),we.scale(y,a,1-s),v0(e[0],g),v0(e[1],y)}function Rie(r,t){var e={breaks:[]};return A(t.breaks,function(a){if(a){var n=as(r.get("breaks",!0),function(s){return It().identifyAxisBreak(s,a)});if(n){var i=t.type,o={isExpanded:!!n.isExpanded};n.isExpanded=i===Fd?!0:i===WR?!1:i===YR?!n.isExpanded:n.isExpanded,e.breaks.push({start:n.start,end:n.end,isExpanded:!!n.isExpanded,old:o})}}}),e}function Eie(){HU({adjustBreakLabelPair:kie,buildAxisBreakLine:Pie,rectCoordBuildBreakAxis:Lie,updateModelAxisBreak:Rie})}function Oie(r){jU(r),Die(),Eie()}function Nie(){y6(Bie)}function Bie(r,t){A(r,function(e){if(!e.model.get(["axisLabel","inside"])){var a=Vie(e);if(a){var n=e.isHorizontal()?"height":"width",i=e.model.get(["axisLabel","margin"]);t[n]-=a[n]+i,e.position==="top"?t.y+=a.height+i:e.position==="left"&&(t.x+=a.width+i)}}})}function Vie(r){var t=r.model,e=r.scale;if(!t.get(["axisLabel","show"])||e.isBlank())return;var a,n,i=e.getExtent();e instanceof _c?n=e.count():(a=e.getTicks(),n=a.length);var o=r.getLabelModel(),s=zl(r),l,u=1;n>40&&(u=Math.ceil(n/40));for(var c=0;cآخرین اعضاء
ردیفنامشماره همراه
',2),Jie={class:"overflow-y-auto",style:{"max-height":"250px"}},Qie={class:"flex flex-col gap-4 mt-4"},eoe={class:"col-span-2 text-center"},toe={class:"col-span-4 text-right"},roe={class:"col-span-4 text-right"},aoe={class:"col-span-3 border-solid border-1 border-gray-200 rounded-lg p-6"},noe={class:"flex justify-between items-center"},ioe=q("span",{class:"text-lg font-bold"},"نمودار آماری کاربران",-1),ooe={class:"flex items-center gap-2"},soe={class:"w-32"},loe=q("span",{class:"text-gray-500"},"تا",-1),uoe={class:"w-32"},coe={class:"w-20r"},foe={class:"flex justify-center gap-6 mt-4"},voe=q("span",{class:"text-sm text-[#6B7280]"}," آمار کلی کاربران ",-1),hoe=q("span",{class:"text-sm text-[#6B7280]"}," آمار ثبت نام کاربران ",-1),doe=q("span",{class:"text-sm text-[#6B7280]"}," آمار کاربران فعال ",-1),poe={class:"mb-8"},goe=q("h2",{class:"text-xl font-bold mb-4"},"نمای کلی قصه ها",-1),yoe={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},moe={class:"flex"},_oe=["src","alt"],Soe={class:"flex flex-col justify-between w-full mr-2"},woe={class:"text-base font-bold"},xoe={class:"flex items-center justify-end"},boe={class:"text-base font-bold"},Coe={class:"mr-1"},Toe={class:"grid grid-cols-1 md:grid-cols-4 gap-3 mt-3"},Doe={class:"flex"},Moe=["src","alt"],Aoe={class:"flex flex-col justify-between w-full mr-2"},Ioe={class:"text-base font-bold"},Loe={class:"flex items-center justify-end"},Poe={class:"text-base font-bold"},koe={class:"mr-1"},Roe={class:"grid grid-cols-1 md:grid-cols-4 md:gap-3 mt-3"},Eoe={class:"col-span-1 border-solid border-1 border-gray-200 rounded-lg"},Ooe={class:"p-4"},Noe=c_('بازدید قصه ها
ردیفقصهبازدید کنندهبازدید
',2),Boe={class:"overflow-y-auto",style:{"max-height":"250px"}},Voe={class:"flex flex-col gap-4 mt-4"},zoe={class:"col-span-2 text-center"},Foe=["title"],Goe={class:"col-span-3 text-center"},Hoe={class:"col-span-3 text-center"},$oe={class:"mt-4 flex justify-center"},Woe={class:"col-span-3 border-solid border-1 border-gray-200 rounded-lg p-6"},Yoe={class:"flex justify-between items-center"},Uoe=q("span",{class:"text-lg font-bold"},"قصه های دیده شده",-1),Zoe={class:"flex items-center gap-2"},Xoe={class:"w-32"},qoe=q("span",{class:"text-gray-500"},"تا",-1),joe={class:"w-32"},Koe={class:"w-20r"},Joe={class:"flex justify-center gap-6 mt-4"},Qoe=q("span",{class:"text-sm text-[#6B7280]"}," آمار بازدید کننده تجمیعی همه قصه ها ",-1),ese=q("span",{class:"text-sm text-[#6B7280]"}," آمار بازدید همه قصه ها ",-1),tse=q("span",{class:"text-sm text-[#6B7280]"}," آمار بازدید کننده همه قصه ها ",-1),rse={class:"mb-8"},ase=q("h2",{class:"text-xl font-bold mb-4"},"نمای کلی مسابقات",-1),nse={class:"grid grid-cols-1 md:grid-cols-4 gap-3"},ise={class:"flex"},ose=["src","alt"],sse={class:"flex flex-col justify-between w-full mr-2"},lse={class:"text-base font-bold"},use={class:"flex items-center justify-end"},cse={class:"text-base font-bold"},fse={class:"mr-1"},vse={class:"grid grid-cols-1 md:grid-cols-4 md:gap-3 mt-3"},hse={class:"col-span-1 border-solid border-1 border-gray-200 rounded-lg"},dse={class:"p-4"},pse=c_('آخرین قرعه کشی
رتبهنامشماره همراهامتیاز
',2),gse={class:"overflow-y-auto",style:{"max-height":"250px"}},yse={class:"flex flex-col gap-4 mt-4"},mse={class:"col-span-2 text-center"},_se={class:"col-span-4 text-right"},Sse={class:"col-span-4 text-right"},wse={class:"col-span-3 text-center"},xse={class:"mt-4 flex justify-center"},bse={class:"col-span-3 border-solid border-1 border-gray-200 rounded-lg p-6"},Cse={class:"flex justify-between items-center"},Tse=q("span",{class:"text-lg font-bold"},"نمودار آماری مسابقات",-1),Dse={class:"flex items-center gap-2"},Mse={class:"w-32"},Ase=q("span",{class:"text-gray-500"},"تا",-1),Ise={class:"w-32"},Lse={class:"w-20r"},Use=Ta({__name:"index",setup(r){const t=pe(!0),e=pe("hourly"),a=pe("hourly"),n=pe("hourly"),i=pe(["all"]),o=pe(["cumulative_viewers"]),s=pe(""),l=pe(""),u=pe(""),c=pe(""),f=pe(""),v=pe(""),h=pe([]),d=pe([]),p=pe({total_sale:0,count_order:0,new_customer:0,count_sale_order:0,max_buy_sale:[],active_users_week:0,total_story_views:0,today_total_story_views:0,unique_story_viewers:0,latest_story_views:0,total_competition_participants:0,eligible_competition_participants:0,latest_competition_participants:0,latest_competition_eligible_participants:0,new_users_last_7_days:0,new_users_last_30_days:0,active_users_last_week:0,active_users_last_month:0,active_users_saturday_to_friday:0,active_users_jalali_month:0,today_unique_story_viewers:0,this_week_story_views:0,this_month_jalali_story_views:0});Le(()=>{let U=0;return h.value.forEach(z=>{U+=parseInt(z==null?void 0:z.sum_price)}),_B(U,!0,"")});const g=[{label:"ساعتی",value:"hourly"},{label:"روزانه",value:"daily"},{label:"هفتگی",value:"weekly"},{label:"ماهانه",value:"monthly"}];pe([]);const y=pe([]),m=pe([]),_=pe(null),S=pe(null),w=pe(null);let x=null,b=null,T=null;const C=pe([]),D=pe([]),M=pe([]),L=pe(!1),I=pe(!1),P=Le(()=>M.value),R=Le(()=>{var U,z,J,ie;return[{title:"بازدید همه قصه ها",alt:"total-story-views-2",image:i2,value:((U=p.value.total_story_views)==null?void 0:U.toLocaleString("fa-IR"))||"0",unit:"بازدید"},{title:"بازدید کننده امروز قصه ها",alt:"today-unique-story-viewers-2",image:s2,value:((z=p.value.today_unique_story_viewers)==null?void 0:z.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"بازدید فعال این هفته قصه ها",alt:"this-week-story-views-2",image:o2,value:((J=p.value.this_week_story_views)==null?void 0:J.toLocaleString("fa-IR"))||"0",unit:"بازدید"},{title:" بازدید فعال این ماه قصه ها",alt:"this-month-jalali-story-views-2",image:zie,value:((ie=p.value.this_month_jalali_story_views)==null?void 0:ie.toLocaleString("fa-IR"))||"0",unit:"بازدید"}]}),E=Le(()=>{var U,z,J,ie;return[{title:"بازدید کننده قصه ها",alt:"total-story-views-2-second",image:i2,value:((U=p.value.total_story_viewers)==null?void 0:U.toLocaleString("fa-IR"))||"0",unit:"بازدید"},{title:"بازدید کننده پیگیر قصه ها",alt:"unique-story-viewers-2-second",image:s2,value:((z=p.value.unique_story_viewers)==null?void 0:z.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"بازدید هفته گذشته قصه ها ",alt:"today-story-views-2-second",image:o2,value:((J=p.value.today_total_story_views)==null?void 0:J.toLocaleString("fa-IR"))||"0",unit:"بازدید"},{title:"بازدید آخرین قصه",alt:"latest-story-views-2-second",image:Fie,value:((ie=p.value.latest_story_views)==null?void 0:ie.toLocaleString("fa-IR"))||"0",unit:"بازدید"}]}),O=Le(()=>{var U,z,J,ie;return[{title:"شرکت کنندگان همه مسابقات",alt:"total-competition-participants-3",image:Gie,value:((U=p.value.total_competition_participants)==null?void 0:U.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"واجدین شرایط قرعه کشی همه مسابقات",alt:"eligible-competition-participants-3",image:Hie,value:((z=p.value.eligible_competition_participants)==null?void 0:z.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"شرکت کنندگان آخرین مسابقه",alt:"latest-competition-participants-3",image:$ie,value:((J=p.value.latest_competition_participants)==null?void 0:J.toLocaleString("fa-IR"))||"0",unit:"نفر"},{title:"واجدین شرایط قرعه کشی آخرین مسابقه",alt:"latest-competition-eligible-participants-3",image:Wie,value:((ie=p.value.latest_competition_eligible_participants)==null?void 0:ie.toLocaleString("fa-IR"))||"0",unit:"نفر"}]});Le(()=>{let U=0;return y.value.forEach(z=>{U+=Number((z==null?void 0:z.views)||0)}),U.toLocaleString("fa-IR")}),Le(()=>{if(!m.value||m.value.length===0)return"0";let U=0;return m.value.forEach(z=>{U+=Number((z==null?void 0:z.totalParticipants)||0)}),U.toLocaleString("fa-IR")}),Le(()=>{if(!d.value||d.value.length===0)return"0";const U=d.value[0];return U&&U.totalUniqueUsers!==void 0?U.totalUniqueUsers.toLocaleString("fa-IR"):Math.max(...d.value.map(J=>Number((J==null?void 0:J.users)||0))).toLocaleString("fa-IR")});const k=(U,z,J,ie,W)=>{if(!ie)return null;let Q=W;Q||(Q=yg(ie));const re={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"#2563EB",borderWidth:1,textStyle:{color:"#fff",fontSize:12,fontFamily:"iran-sans"},axisPointer:{type:"line",lineStyle:{color:"#2563EB",width:1,type:"dashed"},shadowStyle:{color:"rgba(37, 99, 235, 0.1)"}},formatter:ge=>{let ae=`
${ge[0].name}
`;return ge.forEach(te=>{ae+=`
${te.seriesName}: ${te.value.toLocaleString("fa-IR")}
`}),ae+="
",ae}},legend:{data:["همه شرکت کنندگان","واجدین شرایط"],top:10,right:10,textStyle:{color:"#6B7280",fontSize:12,fontFamily:"iran-sans"}},grid:{left:"5%",right:"5%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:U,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:n.value==="daily"||n.value==="weekly"||n.value==="monthly"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:ge=>Math.round(ge).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:[{name:"همه شرکت کنندگان",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:z,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(239, 68, 68, 0.4)"},{offset:1,color:"rgba(239, 68, 68, 0.05)"}]}},lineStyle:{width:3,color:"#EF4444"},itemStyle:{color:"#EF4444",borderColor:"#fff",borderWidth:2}},{name:"واجدین شرایط",type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:J,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:"rgba(34, 197, 94, 0.4)"},{offset:1,color:"rgba(34, 197, 94, 0.05)"}]}},lineStyle:{width:3,color:"#22C55E"},itemStyle:{color:"#22C55E",borderColor:"#fff",borderWidth:2}}]};return Q.setOption(re,!0),Q},N=async()=>{try{const[U,z,J,ie,W,Q,re,ge,ae,te,K]=await Promise.allSettled([tz(),sz(),cz(),hz(),oz(10),fz(),rz(),az(),lz(),iz(),nz()]);U.status==="fulfilled"?(p.value.count_sale_order=U.value.total,p.value.new_customer=U.value.today):(p.value.count_sale_order=0,p.value.new_customer=0),z.status==="fulfilled"?(p.value.count_order=z.value.active_users_week,p.value.active_users_week=z.value.active_users_week,p.value.active_users_last_week=z.value.active_users_last_week,p.value.active_users_last_month=z.value.active_users_last_month,p.value.total_sale=String(z.value.active_users_month),p.value.active_users_saturday_to_friday=z.value.active_users_week,p.value.active_users_jalali_month=z.value.active_users_month):(p.value.count_order=0,p.value.active_users_week=0,p.value.active_users_last_week=0,p.value.active_users_last_month=0,p.value.total_sale="0",p.value.active_users_saturday_to_friday=0,p.value.active_users_jalali_month=0),J.status==="fulfilled"?D.value=J.value||[]:D.value=[],ie.status==="fulfilled"?C.value=ie.value||[]:C.value=[],W.status==="fulfilled"?(p.value.total_story_views=W.value.total_story_views,p.value.unique_story_viewers=W.value.unique_story_viewers,p.value.latest_story_views=W.value.latest_story_views,M.value=W.value.story_views_stats||[]):(p.value.total_story_views=0,p.value.unique_story_viewers=0,p.value.latest_story_views=0,M.value=[]),Q.status==="fulfilled"?(p.value.total_competition_participants=Q.value.total_competition_participants,p.value.eligible_competition_participants=Q.value.eligible_competition_participants,p.value.latest_competition_participants=Q.value.latest_competition_participants,p.value.latest_competition_eligible_participants=Q.value.latest_competition_eligible_participants):(p.value.total_competition_participants=0,p.value.eligible_competition_participants=0,p.value.latest_competition_participants=0,p.value.latest_competition_eligible_participants=0),re.status==="fulfilled"?p.value.new_users_last_7_days=re.value:p.value.new_users_last_7_days=0,ge.status==="fulfilled"?p.value.new_users_last_30_days=ge.value:p.value.new_users_last_30_days=0,te.status==="fulfilled"?p.value.today_unique_story_viewers=te.value:p.value.today_unique_story_viewers=0,K.status==="fulfilled"?(p.value.this_week_story_views=K.value.story_view_week,p.value.today_total_story_views=K.value.story_view_last_week,p.value.this_month_jalali_story_views=K.value.story_view_month,p.value.total_story_viewers=K.value.uniqAllStoryView):(p.value.this_week_story_views=0,p.value.today_total_story_views=0,p.value.this_month_jalali_story_views=0,p.value.total_story_viewers=0)}catch{}if(!t.value)try{const U=await QV();p.value={...p.value,...U}}catch{}},B=U=>{const z=i.value.indexOf(U);z>-1?i.value.length>1&&i.value.splice(z,1):i.value.push(U),j()},F=U=>{const z=o.value.indexOf(U);z>-1?o.value.length>1&&o.value.splice(z,1):o.value.push(U),ce()},H=U=>({"بازدید همه قصه ها":"این عدد آمار بازدیدکنندگان همه قصه‌ها از اول تا حالا را نشان می‌دهد","بازدید کننده امروز قصه ها":"این عدد تعداد کاربران منحصر به فردی است که امروز حداقل یک قصه را دیده‌اند","بازدید فعال این هفته قصه ها":"این عدد بازدید نهایی همه قصه‌ها در هفته گذشته است"," بازدید فعال این ماه قصه ها":"این عدد بازدید نهایی همه قصه‌ها در ماه جاری (شمسی) است","بازدید کننده قصه ها":"این عدد تعداد کل کاربران منحصر به فردی است که از اول تا حالا حداقل یک قصه را دیده‌اند","بازدید کننده پیگیر قصه ها":"این عدد آمار کسانی است که در 15 روز گذشته حداقل 4 بازدید ثبت کرده‌اند","بازدید هفته گذشته قصه ها ":"این عدد تعداد کل بازدیدهای قصه‌ها در هفته گذشته است","بازدید آخرین قصه":"این عدد تعداد کل بازدیدهای آخرین قصه منتشر شده است","شرکت کنندگان همه مسابقات":"این عدد تعداد کل کاربرانی است که در همه مسابقات شرکت کرده‌اند","واجدین شرایط قرعه کشی همه مسابقات":"این عدد تعداد کاربرانی است که در همه مسابقات واجد شرایط قرعه‌کشی هستند (حداقل 4 بازدید در 15 روز گذشته)","شرکت کنندگان آخرین مسابقه":"این عدد تعداد کاربرانی است که در آخرین مسابقه منتشر شده شرکت کرده‌اند","واجدین شرایط قرعه کشی آخرین مسابقه":"این عدد تعداد کاربرانی است که در آخرین مسابقه واجد شرایط قرعه‌کشی هستند (حداقل 4 بازدید در 15 روز گذشته)"})[U]||"",j=async()=>{try{if(i.value.length===0)return;const U=new Date().toISOString().split("T")[0],z=i.value.map(async ae=>{const te={type:a.value,date:U,statType:ae};s.value&&l.value&&(te.startDate=s.value,te.endDate=l.value,delete te.date);const K=await uz(te);return{statType:ae,data:K||[]}}),J=await Promise.all(z);let ie=[];const W={};J.forEach(({statType:ae})=>{W[ae]||(W[ae]=[])});const Q=new Set;if(J.forEach(({data:ae})=>{a.value==="hourly"?ae.forEach(te=>{const K=Number(te.hour)||0;Q.add(String(K))}):ae.forEach(te=>{const K=te.day||"";K&&Q.add(K)})}),a.value==="hourly")for(let ae=0;ae<=24;ae++){const te=ae===24?"24:00":`${ae.toString().padStart(2,"0")}:00`;ie.push(te)}else Array.from(Q).sort().forEach(te=>{if(a.value==="daily")ie.push(vn(te));else if(a.value==="weekly")try{const K=new Date(te+"T00:00:00"),Te=new Date(K);Te.setDate(K.getDate()+5);const Ge=vn(te)+" تا "+vn(Te.toISOString().split("T")[0]);ie.push(Ge)}catch{ie.push(te)}else if(a.value==="monthly"){const[K,Te]=te.split("-"),Ge=`${K}/${Te}`;ie.push(Ge)}});J.forEach(({statType:ae,data:te})=>{var K,Te;if(a.value==="hourly"){const Ge={};te.forEach(Ke=>{const tt=Number(Ke.hour)||0,Hr=Number((Ke==null?void 0:Ke.users)||0),xr=Number((Ke==null?void 0:Ke.totalUniqueUsers)||0);Ge[tt]={users:Hr,totalUniqueUsers:xr}});for(let Ke=0;Ke<=24;Ke++){const tt=((K=Ge[Ke])==null?void 0:K.totalUniqueUsers)||((Te=Ge[Ke])==null?void 0:Te.users)||0;W[ae].push(Math.round(tt))}}else{const Ge={};te.forEach(tt=>{const Hr=tt.day||"",xr=Number((tt==null?void 0:tt.users)||0),Ia=Number((tt==null?void 0:tt.totalUniqueUsers)||0);Ge[Hr]={users:xr,totalUniqueUsers:Ia}}),Array.from(Q).sort().forEach(tt=>{var xr,Ia;const Hr=((xr=Ge[tt])==null?void 0:xr.totalUniqueUsers)||((Ia=Ge[tt])==null?void 0:Ia.users)||0;W[ae].push(Math.round(Hr))})}});const re=i.value.map(ae=>({name:ae==="all"?"آمار کلی کاربران":ae==="registration"?"آمار ثبت نام کاربران":"آمار کاربران فعال",data:W[ae]||[]}));if(await mn(),!_.value){setTimeout(()=>{if(_.value){const ae=ee(ie,re,_.value,x);ae&&(x=ae)}},100);return}const ge=ee(ie,re,_.value,x);ge&&(x=ge)}catch{if(await mn(),_.value){const z=ee([],[],_.value,x);z&&(x=z)}}},ee=(U,z,J,ie)=>{if(!J)return ie;let W=ie;W||(W=yg(J));const Q={"آمار کلی کاربران":{main:"#F97316",light:"#FB923C",gradient:["rgba(249, 115, 22, 0.4)","rgba(249, 115, 22, 0.05)"]},"آمار ثبت نام کاربران":{main:"#3B82F6",light:"#60A5FA",gradient:["rgba(59, 130, 246, 0.4)","rgba(59, 130, 246, 0.05)"]},"آمار کاربران فعال":{main:"#22C55E",light:"#4ADE80",gradient:["rgba(34, 197, 94, 0.4)","rgba(34, 197, 94, 0.05)"]}},re=z.map((ae,te)=>{const K=Q[ae.name]||Q["آمار کلی کاربران"];return{name:ae.name,type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:ae.data,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:K.gradient[0]},{offset:1,color:K.gradient[1]}]}},lineStyle:{width:3,color:{type:"linear",x:0,y:0,x2:1,y2:0,colorStops:[{offset:0,color:K.main},{offset:1,color:K.light}]},shadowColor:K.main.replace(")",", 0.5)").replace("rgb","rgba"),shadowBlur:10,shadowOffsetY:5},itemStyle:{color:K.main,borderColor:"#fff",borderWidth:2,shadowBlur:8,shadowColor:K.main.replace(")",", 0.5)").replace("rgb","rgba")},emphasis:{focus:"series",itemStyle:{color:K.main,borderColor:"#fff",borderWidth:3,shadowBlur:12,shadowColor:K.main.replace(")",", 0.8)").replace("rgb","rgba")}},animation:!0,animationDuration:1e3,animationEasing:"cubicOut"}}),ge={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"#F97316",borderWidth:1,textStyle:{color:"#fff",fontSize:12,fontFamily:"iran-sans"},axisPointer:{type:"line",lineStyle:{color:"#F97316",width:1,type:"dashed"},shadowStyle:{color:"rgba(249, 115, 22, 0.1)"}},formatter:ae=>{let te=`
${ae[0].name}
`;return ae.forEach(K=>{te+=`
${K.seriesName}: ${K.value.toLocaleString("fa-IR")}
`}),te+="
",te}},legend:{data:z.map(ae=>ae.name),top:10,right:10,textStyle:{color:"#6B7280",fontSize:12,fontFamily:"iran-sans"}},grid:{left:"5%",right:"5%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:U,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:a.value==="daily"||a.value==="weekly"||a.value==="monthly"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:ae=>Math.round(ae).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:re};return W.setOption(ge,!0),W},ce=async()=>{try{const U=new Date().toISOString().split("T")[0],z=o.value.map(async ae=>{const te={type:e.value,date:U,statType:ae};u.value&&c.value&&(te.startDate=u.value,te.endDate=c.value,delete te.date);const K=await ez(te);return{statType:ae,data:K||[]}}),J=await Promise.all(z);let ie=[];const W={};o.value.forEach(ae=>{W[ae]=[]});const Q=new Set;if(J.forEach(({data:ae})=>{e.value==="hourly"?ae.forEach(te=>{if(te.hour!==void 0)Q.add(String(te.hour));else if(te.day){const K=Number(te.hour)||0;Q.add(`${te.day}_${K}`)}}):ae.forEach(te=>{const K=te.day||"";K&&Q.add(K)})}),e.value==="hourly")for(let ae=0;ae<=24;ae++){const te=ae===24?"24:00":`${ae.toString().padStart(2,"0")}:00`;ie.push(te)}else Array.from(Q).sort().forEach(te=>{if(e.value==="daily")ie.push(vn(te));else if(e.value==="weekly")try{const K=new Date(te+"T00:00:00"),Te=new Date(K);Te.setDate(K.getDate()+5);const Ge=vn(te)+" تا "+vn(Te.toISOString().split("T")[0]);ie.push(Ge)}catch{ie.push(te)}else if(e.value==="monthly"){const[K,Te]=te.split("-"),Ge=`${K}/${Te}`;ie.push(Ge)}});J.forEach(({statType:ae,data:te})=>{const K={};e.value==="hourly"?ae==="total_views"?te.forEach(Te=>{const Ge=Number(Te.hour)||0,Ke=Number((Te==null?void 0:Te.views)||0),tt=String(Ge);K[tt]=(K[tt]||0)+Ke}):te.forEach(Te=>{const Ge=Te.day||"",Ke=Number(Te.hour)||0,tt=`${Ge}_${Ke}`,Hr=Number((Te==null?void 0:Te.views)||0);K[tt]=Hr}):te.forEach(Te=>{const Ge=Te.day||"",Ke=Number((Te==null?void 0:Te.views)||0);ae==="total_views"?K[Ge]=(K[Ge]||0)+Ke:K[Ge]=Ke}),ie.forEach(Te=>{let Ge=Te;if(e.value==="daily")Ge=nr(Te,"jYYYY/jMM/jDD").format("YYYY-MM-DD");else if(e.value==="weekly"){const tt=Te.split(" تا ");Ge=nr(tt[0],"jYYYY/jMM/jDD").format("YYYY-MM-DD")}else if(e.value==="monthly")Ge=nr(Te,"jYYYY/jMM").format("YYYY-MM");else if(e.value==="hourly")if(ae==="total_views")Ge=String(parseInt(Te.split(":")[0]));else{const tt=parseInt(Te.split(":")[0]);Ge=Object.keys(K).find(xr=>xr.endsWith(`_${tt}`))||String(tt)}const Ke=K[Ge]||0;W[ae].push(Math.round(Ke))})});const re=o.value.map(ae=>({name:ae==="cumulative_viewers"?"آمار بازدید کننده تجمیعی همه قصه ها":ae==="total_views"?"آمار بازدید همه قصه ها":"آمار بازدید کننده همه قصه ها",data:W[ae]||[],color:ae==="cumulative_viewers"?"#3B82F6":ae==="total_views"?"#F97316":"#22C55E"}));if(await mn(),!S.value){setTimeout(()=>{if(S.value){const ae=Ae(ie,re,S.value,b);ae&&(b=ae)}},100);return}const ge=Ae(ie,re,S.value,b);ge&&(b=ge)}catch{if(await mn(),S.value){const z=Ae([],[],S.value,b);z&&(b=z)}}},Ae=(U,z,J,ie)=>{if(!J)return ie;let W=ie;W||(W=yg(J));const Q={backgroundColor:"transparent",tooltip:{trigger:"axis",backgroundColor:"rgba(0, 0, 0, 0.8)",borderColor:"#3B82F6",borderWidth:1,textStyle:{color:"#fff",fontSize:12,fontFamily:"iran-sans"},axisPointer:{type:"line",lineStyle:{color:"#3B82F6",width:1,type:"dashed"},shadowStyle:{color:"rgba(59, 130, 246, 0.1)"}},formatter:re=>{let ge=`
${re[0].name}
`;return re.forEach(ae=>{ge+=`
${ae.seriesName}: ${ae.value.toLocaleString("fa-IR")}
`}),ge+="
",ge}},legend:{data:z.map(re=>re.name),top:10,right:10,textStyle:{color:"#6B7280",fontSize:12,fontFamily:"iran-sans"}},grid:{left:"5%",right:"5%",bottom:"10%",top:"15%",containLabel:!0},xAxis:{type:"category",data:U,boundaryGap:!1,axisLine:{lineStyle:{color:"#E5E7EB",width:1}},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",rotate:e.value==="daily"||e.value==="weekly"||e.value==="monthly"?45:0,margin:12},splitLine:{show:!1}},yAxis:{type:"value",axisLine:{show:!1},axisTick:{show:!1},axisLabel:{color:"#6B7280",fontSize:11,fontFamily:"iran-sans",formatter:re=>Math.round(re).toLocaleString("fa-IR")},minInterval:1,scale:!1,splitLine:{lineStyle:{color:"#F3F4F6",type:"dashed",width:1}}},series:z.map(re=>({name:re.name,type:"line",smooth:!0,symbol:"circle",symbolSize:6,showSymbol:!1,data:re.data,areaStyle:{color:{type:"linear",x:0,y:0,x2:0,y2:1,colorStops:[{offset:0,color:`${re.color}40`},{offset:1,color:`${re.color}0D`}]}},lineStyle:{width:3,color:re.color,shadowColor:`${re.color}80`,shadowBlur:10,shadowOffsetY:5},itemStyle:{color:re.color,borderColor:"#fff",borderWidth:2,shadowBlur:8,shadowColor:`${re.color}80`},emphasis:{focus:"series",itemStyle:{color:re.color,borderColor:"#fff",borderWidth:3,shadowBlur:12,shadowColor:`${re.color}CC`}},animation:!0,animationDuration:1e3,animationEasing:"cubicOut"}))};return W.setOption(Q,!0),W},Be=async()=>{var U,z;try{const J=new Date().toISOString().split("T")[0],ie={type:n.value,date:J};f.value&&v.value&&(ie.startDate=f.value,ie.endDate=v.value,delete ie.date);const W=await vz(ie);m.value=W||[];let Q=[],re=[],ge=[];if(n.value==="hourly"){const te={};m.value.forEach(K=>{const Te=Number(K.hour)||0;te[Te]={total:Number((K==null?void 0:K.totalParticipants)||0),eligible:Number((K==null?void 0:K.eligibleParticipants)||0)}});for(let K=0;K<=24;K++){const Te=K===24?"24:00":`${K.toString().padStart(2,"0")}:00`;Q.push(Te),re.push(((U=te[K])==null?void 0:U.total)||0),ge.push(((z=te[K])==null?void 0:z.eligible)||0)}}else if(n.value==="daily"){const te={};m.value.forEach(K=>{const Te=K.day||"";te[Te]={total:Number((K==null?void 0:K.totalParticipants)||0),eligible:Number((K==null?void 0:K.eligibleParticipants)||0)}}),Object.keys(te).sort().forEach(K=>{const Te=vn(K);Q.push(Te),re.push(te[K].total),ge.push(te[K].eligible)})}else if(n.value==="weekly"){const te={};m.value.forEach(K=>{const Te=K.day||"";te[Te]={total:Number((K==null?void 0:K.totalParticipants)||0),eligible:Number((K==null?void 0:K.eligibleParticipants)||0)}}),Object.keys(te).sort().forEach(K=>{try{const Te=new Date(K+"T00:00:00"),Ge=new Date(Te);Ge.setDate(Te.getDate()+5);const Ke=vn(K)+" تا "+vn(Ge.toISOString().split("T")[0]);Q.push(Ke),re.push(te[K].total),ge.push(te[K].eligible)}catch{Q.push(K),re.push(te[K].total),ge.push(te[K].eligible)}})}else if(n.value==="monthly"){const te={};m.value.forEach(K=>{const Te=K.day||"";te[Te]={total:Number((K==null?void 0:K.totalParticipants)||0),eligible:Number((K==null?void 0:K.eligibleParticipants)||0)}}),Object.keys(te).sort().forEach(K=>{const[Te,Ge]=K.split("-"),Ke=`${Te}/${Ge}`;Q.push(Ke),re.push(te[K].total),ge.push(te[K].eligible)})}if(await mn(),!w.value){setTimeout(()=>{if(w.value){const te=k(Q,re,ge,w.value,T);te&&(T=te)}},100);return}const ae=k(Q,re,ge,w.value,T);ae&&(T=ae)}catch{if(await mn(),w.value){const ie=k([],[],[],w.value,T);ie&&(T=ie)}}};v2(async()=>{await N(),await mn(),await j(),await ce(),await mn(),await new Promise(U=>setTimeout(U,100)),await Be(),window.addEventListener("resize",()=>{x&&x.resize(),b&&b.resize(),T&&T.resize()})}),ad(()=>{x&&(x.dispose(),x=null),b&&(b.dispose(),b=null),T&&(T.dispose(),T=null)});async function he(){if(C.value.length===0){const{message:U}=await Xn(()=>import("./index-28e3bd94.js"),["assets/index-28e3bd94.js","assets/index-7c9c2b70.js","assets/index-108817e3.js","assets/index-6f54f748.css","assets/vnode-9b8abbbf.js","assets/_plugin-vue_export-helper-ec62f026.js","assets/shallowequal-105194c4.js","assets/index-0d047161.js","assets/Col-b2cbfe37.js","assets/button.vue_vue_type_style_index_0_lang-9ce24083.js","assets/Icon-03d9588d.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-f899bdd0.js","assets/FormItemContext-cecaca7f.js","assets/useState-472505a2.js","assets/index-f0ba03aa.js","assets/index-802c3c8f.js","assets/toArray-a421612c.js","assets/index-707b194d.js","assets/isPlainObject-a22b8354.js","assets/index-4f951158.js","assets/index-60d145d7.js","assets/index-d1557459.js","assets/useRefs-eb5e3b2f.js","assets/index-54b911d1.js","assets/index-81cb9660.js","assets/index-7f62fea2.js","assets/dayjs-1639faa5.js"]);U.warning("داده‌ای برای خروجی وجود ندارد");return}try{L.value=!0;const U=C.value.map((ge,ae)=>({ردیف:ae+1,رتبه:ge.rank||"",نام:ge.name||"","شماره همراه":ge.mobile||"-",امتیاز:ge.score||0})),z=await Xn(()=>import("./xlsx-6ed613d4.js"),[]),J=z.utils.json_to_sheet(U),ie=z.utils.book_new();z.utils.book_append_sheet(ie,J,"برندگان قرعه کشی");const Q=`برندگان_قرعه_کشی_${new Date().getTime()}.xlsx`;z.writeFile(ie,Q);const{message:re}=await Xn(()=>import("./index-28e3bd94.js"),["assets/index-28e3bd94.js","assets/index-7c9c2b70.js","assets/index-108817e3.js","assets/index-6f54f748.css","assets/vnode-9b8abbbf.js","assets/_plugin-vue_export-helper-ec62f026.js","assets/shallowequal-105194c4.js","assets/index-0d047161.js","assets/Col-b2cbfe37.js","assets/button.vue_vue_type_style_index_0_lang-9ce24083.js","assets/Icon-03d9588d.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-f899bdd0.js","assets/FormItemContext-cecaca7f.js","assets/useState-472505a2.js","assets/index-f0ba03aa.js","assets/index-802c3c8f.js","assets/toArray-a421612c.js","assets/index-707b194d.js","assets/isPlainObject-a22b8354.js","assets/index-4f951158.js","assets/index-60d145d7.js","assets/index-d1557459.js","assets/useRefs-eb5e3b2f.js","assets/index-54b911d1.js","assets/index-81cb9660.js","assets/index-7f62fea2.js","assets/dayjs-1639faa5.js"]);re.success("فایل اکسل با موفقیت دانلود شد")}catch{const{message:z}=await Xn(()=>import("./index-28e3bd94.js"),["assets/index-28e3bd94.js","assets/index-7c9c2b70.js","assets/index-108817e3.js","assets/index-6f54f748.css","assets/vnode-9b8abbbf.js","assets/_plugin-vue_export-helper-ec62f026.js","assets/shallowequal-105194c4.js","assets/index-0d047161.js","assets/Col-b2cbfe37.js","assets/button.vue_vue_type_style_index_0_lang-9ce24083.js","assets/Icon-03d9588d.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-f899bdd0.js","assets/FormItemContext-cecaca7f.js","assets/useState-472505a2.js","assets/index-f0ba03aa.js","assets/index-802c3c8f.js","assets/toArray-a421612c.js","assets/index-707b194d.js","assets/isPlainObject-a22b8354.js","assets/index-4f951158.js","assets/index-60d145d7.js","assets/index-d1557459.js","assets/useRefs-eb5e3b2f.js","assets/index-54b911d1.js","assets/index-81cb9660.js","assets/index-7f62fea2.js","assets/dayjs-1639faa5.js"]);z.error("خطا در خروجی اکسل")}finally{L.value=!1}}async function fe(){if(M.value.length===0){const{message:U}=await Xn(()=>import("./index-28e3bd94.js"),["assets/index-28e3bd94.js","assets/index-7c9c2b70.js","assets/index-108817e3.js","assets/index-6f54f748.css","assets/vnode-9b8abbbf.js","assets/_plugin-vue_export-helper-ec62f026.js","assets/shallowequal-105194c4.js","assets/index-0d047161.js","assets/Col-b2cbfe37.js","assets/button.vue_vue_type_style_index_0_lang-9ce24083.js","assets/Icon-03d9588d.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-f899bdd0.js","assets/FormItemContext-cecaca7f.js","assets/useState-472505a2.js","assets/index-f0ba03aa.js","assets/index-802c3c8f.js","assets/toArray-a421612c.js","assets/index-707b194d.js","assets/isPlainObject-a22b8354.js","assets/index-4f951158.js","assets/index-60d145d7.js","assets/index-d1557459.js","assets/useRefs-eb5e3b2f.js","assets/index-54b911d1.js","assets/index-81cb9660.js","assets/index-7f62fea2.js","assets/dayjs-1639faa5.js"]);U.warning("داده‌ای برای خروجی وجود ندارد");return}try{I.value=!0;const z=[...M.value].reverse().map((ae,te)=>({ردیف:te+1,قصه:ae.title||"-","بازدید کننده":ae.unique_viewers||0,بازدید:ae.total_views||0})),J=await Xn(()=>import("./xlsx-6ed613d4.js"),[]),ie=J.utils.json_to_sheet(z),W=J.utils.book_new();J.utils.book_append_sheet(W,ie,"بازدید قصه ها");const re=`بازدید_قصه_ها_${new Date().getTime()}.xlsx`;J.writeFile(W,re);const{message:ge}=await Xn(()=>import("./index-28e3bd94.js"),["assets/index-28e3bd94.js","assets/index-7c9c2b70.js","assets/index-108817e3.js","assets/index-6f54f748.css","assets/vnode-9b8abbbf.js","assets/_plugin-vue_export-helper-ec62f026.js","assets/shallowequal-105194c4.js","assets/index-0d047161.js","assets/Col-b2cbfe37.js","assets/button.vue_vue_type_style_index_0_lang-9ce24083.js","assets/Icon-03d9588d.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-f899bdd0.js","assets/FormItemContext-cecaca7f.js","assets/useState-472505a2.js","assets/index-f0ba03aa.js","assets/index-802c3c8f.js","assets/toArray-a421612c.js","assets/index-707b194d.js","assets/isPlainObject-a22b8354.js","assets/index-4f951158.js","assets/index-60d145d7.js","assets/index-d1557459.js","assets/useRefs-eb5e3b2f.js","assets/index-54b911d1.js","assets/index-81cb9660.js","assets/index-7f62fea2.js","assets/dayjs-1639faa5.js"]);ge.success("فایل اکسل با موفقیت دانلود شد")}catch{const{message:z}=await Xn(()=>import("./index-28e3bd94.js"),["assets/index-28e3bd94.js","assets/index-7c9c2b70.js","assets/index-108817e3.js","assets/index-6f54f748.css","assets/vnode-9b8abbbf.js","assets/_plugin-vue_export-helper-ec62f026.js","assets/shallowequal-105194c4.js","assets/index-0d047161.js","assets/Col-b2cbfe37.js","assets/button.vue_vue_type_style_index_0_lang-9ce24083.js","assets/Icon-03d9588d.js","assets/Icon-07033a75.css","assets/button-318cd43f.css","assets/pickAttrs-f899bdd0.js","assets/FormItemContext-cecaca7f.js","assets/useState-472505a2.js","assets/index-f0ba03aa.js","assets/index-802c3c8f.js","assets/toArray-a421612c.js","assets/index-707b194d.js","assets/isPlainObject-a22b8354.js","assets/index-4f951158.js","assets/index-60d145d7.js","assets/index-d1557459.js","assets/useRefs-eb5e3b2f.js","assets/index-54b911d1.js","assets/index-81cb9660.js","assets/index-7f62fea2.js","assets/dayjs-1639faa5.js"]);z.error("خطا در خروجی اکسل")}finally{I.value=!1}}return(U,z)=>{const J=eB,ie=QN;return Ot(),Dr("div",Yie,[q("div",Uie,[Zie,Y(FB,{statistics:rt(p)},null,8,["statistics"]),q("div",Xie,[q("div",qie,[q("div",jie,[Kie,q("div",Jie,[q("div",Qie,[(Ot(!0),Dr(ea,null,si(rt(D),(W,Q)=>(Ot(),Dr("div",{class:"grid grid-cols-10 items-center items-center text-xs text-[#1F2937] font-semibold",key:Q},[q("span",eoe,dt(W.rank),1),q("span",toe,dt(W.name),1),q("span",roe,dt(W.mobile||"-"),1)]))),128))])])])]),q("div",aoe,[q("div",null,[q("div",noe,[ioe,q("div",ooe,[q("div",soe,[Y(_s,{value:rt(s),"onUpdate:value":[z[0]||(z[0]=W=>fn(s)?s.value=W:null),j]},null,8,["value"])]),loe,q("div",uoe,[Y(_s,{value:rt(l),"onUpdate:value":[z[1]||(z[1]=W=>fn(l)?l.value=W:null),j]},null,8,["value"])]),q("div",coe,[Y(J,{value:rt(a),"onUpdate:value":z[2]||(z[2]=W=>fn(a)?a.value=W:null),items:g,"key-name":"value","value-name":"label","allow-clear":!1,onChange:j,style:{cursor:"pointer"}},null,8,["value"])])])]),q("div",{ref_key:"chartContainer",ref:_,style:{width:"100%",height:"300px"}},null,512),q("div",foe,[q("div",{class:"flex items-center gap-2 cursor-pointer",onClick:z[3]||(z[3]=W=>B("all"))},[q("div",{class:"w-3 h-3 rounded-full",style:ys({backgroundColor:rt(i).includes("all")?"#F97316":"#9CA3AF"})},null,4),voe]),q("div",{class:"flex items-center gap-2 cursor-pointer",onClick:z[4]||(z[4]=W=>B("registration"))},[q("div",{class:"w-3 h-3 rounded-full",style:ys({backgroundColor:rt(i).includes("registration")?"#F97316":"#9CA3AF"})},null,4),hoe]),q("div",{class:"flex items-center gap-2 cursor-pointer",onClick:z[5]||(z[5]=W=>B("active"))},[q("div",{class:"w-3 h-3 rounded-full",style:ys({backgroundColor:rt(i).includes("active")?"#F97316":"#9CA3AF"})},null,4),doe])])])])])]),q("div",poe,[goe,q("div",yoe,[(Ot(!0),Dr(ea,null,si(rt(R),(W,Q)=>(Ot(),al(Fu,{class:"h-[120px] p-5",key:Q+4},{default:Kr(()=>[Y(rt(zu),{title:H(W.title),placement:"top"},{default:Kr(()=>[q("div",moe,[q("div",null,[q("img",{class:"w-20 h-20",src:W.image,alt:W.alt},null,8,_oe)]),q("div",Soe,[q("div",null,[q("span",woe,dt(W.title),1)]),q("div",xoe,[q("span",boe,dt(W.value),1),q("span",Coe,dt(W.unit),1)])])])]),_:2},1032,["title"])]),_:2},1024))),128))]),q("div",Toe,[(Ot(!0),Dr(ea,null,si(rt(E),(W,Q)=>(Ot(),al(Fu,{class:"h-[120px] p-5",key:Q+8},{default:Kr(()=>[Y(rt(zu),{title:H(W.title),placement:"top"},{default:Kr(()=>[q("div",Doe,[q("div",null,[q("img",{class:"w-20 h-20",src:W.image,alt:W.alt},null,8,Moe)]),q("div",Aoe,[q("div",null,[q("span",Ioe,dt(W.title),1)]),q("div",Loe,[q("span",Poe,dt(W.value),1),q("span",koe,dt(W.unit),1)])])])]),_:2},1032,["title"])]),_:2},1024))),128))]),q("div",Roe,[q("div",Eoe,[q("div",Ooe,[Noe,q("div",Boe,[q("div",Voe,[(Ot(!0),Dr(ea,null,si(rt(P),(W,Q)=>{var re,ge;return Ot(),Dr("div",{class:"grid grid-cols-12 items-center items-center text-xs text-[#1F2937] font-semibold",key:Q},[q("span",zoe,dt(Q+1),1),q("span",{class:"col-span-4 text-right truncate",title:W.title},dt(W.title||"-"),9,Foe),q("span",Goe,dt(((re=W.unique_viewers)==null?void 0:re.toLocaleString("fa-IR"))||"0"),1),q("span",Hoe,dt(((ge=W.total_views)==null?void 0:ge.toLocaleString("fa-IR"))||"0"),1)])}),128))])]),q("div",$oe,[Y(ie,{onClick:fe,loading:rt(I),disabled:rt(M).length===0,style:{backgroundColor:"#217346",borderColor:"#217346",color:"#fff"},class:"excel-export-btn"},{default:Kr(()=>[Y(cw,{icon:"vuesax-linear:document-download",class:"mr-1"}),Xv(" خروجی اکسل ")]),_:1},8,["loading","disabled"])])])]),q("div",Woe,[q("div",null,[q("div",Yoe,[Uoe,q("div",Zoe,[q("div",Xoe,[Y(_s,{value:rt(u),"onUpdate:value":[z[6]||(z[6]=W=>fn(u)?u.value=W:null),ce]},null,8,["value"])]),qoe,q("div",joe,[Y(_s,{value:rt(c),"onUpdate:value":[z[7]||(z[7]=W=>fn(c)?c.value=W:null),ce]},null,8,["value"])]),q("div",Koe,[Y(J,{value:rt(e),"onUpdate:value":z[8]||(z[8]=W=>fn(e)?e.value=W:null),items:g,"key-name":"value","value-name":"label","allow-clear":!1,onChange:ce,style:{cursor:"pointer"}},null,8,["value"])])])]),q("div",{ref_key:"chartContainer2",ref:S,style:{width:"100%",height:"300px"}},null,512),q("div",Joe,[q("div",{class:"flex items-center gap-2 cursor-pointer",onClick:z[9]||(z[9]=W=>F("cumulative_viewers"))},[q("div",{class:"w-3 h-3 rounded-full",style:ys({backgroundColor:rt(o).includes("cumulative_viewers")?"#3B82F6":"#9CA3AF"})},null,4),Qoe]),q("div",{class:"flex items-center gap-2 cursor-pointer",onClick:z[10]||(z[10]=W=>F("total_views"))},[q("div",{class:"w-3 h-3 rounded-full",style:ys({backgroundColor:rt(o).includes("total_views")?"#3B82F6":"#9CA3AF"})},null,4),ese]),q("div",{class:"flex items-center gap-2 cursor-pointer",onClick:z[11]||(z[11]=W=>F("unique_viewers"))},[q("div",{class:"w-3 h-3 rounded-full",style:ys({backgroundColor:rt(o).includes("unique_viewers")?"#3B82F6":"#9CA3AF"})},null,4),tse])])])])])]),q("div",rse,[ase,q("div",nse,[(Ot(!0),Dr(ea,null,si(rt(O),(W,Q)=>(Ot(),al(Fu,{class:"h-[120px] p-5",key:Q+8},{default:Kr(()=>[Y(rt(zu),{title:H(W.title),placement:"top"},{default:Kr(()=>[q("div",ise,[q("div",null,[q("img",{class:"w-20 h-20",src:W.image,alt:W.alt},null,8,ose)]),q("div",sse,[q("div",null,[q("span",lse,dt(W.title),1)]),q("div",use,[q("span",cse,dt(W.value),1),q("span",fse,dt(W.unit),1)])])])]),_:2},1032,["title"])]),_:2},1024))),128))]),q("div",vse,[q("div",hse,[q("div",dse,[pse,q("div",gse,[q("div",yse,[(Ot(!0),Dr(ea,null,si(rt(C),(W,Q)=>(Ot(),Dr("div",{class:"grid grid-cols-13 items-center items-center text-xs text-[#1F2937] font-semibold",key:Q},[q("span",mse,dt(W.rank),1),q("span",_se,dt(W.name),1),q("span",Sse,dt(W.mobile||"-"),1),q("span",wse,dt(W.score.toLocaleString("fa-IR")),1)]))),128))])]),q("div",xse,[Y(ie,{onClick:he,loading:rt(L),disabled:rt(C).length===0,style:{backgroundColor:"#217346",borderColor:"#217346",color:"#fff"},class:"excel-export-btn"},{default:Kr(()=>[Y(cw,{icon:"vuesax-linear:document-download",class:"mr-1"}),Xv(" خروجی اکسل ")]),_:1},8,["loading","disabled"])])])]),q("div",bse,[q("div",null,[q("div",Cse,[Tse,q("div",Dse,[q("div",Mse,[Y(_s,{value:rt(f),"onUpdate:value":[z[12]||(z[12]=W=>fn(f)?f.value=W:null),Be]},null,8,["value"])]),Ase,q("div",Ise,[Y(_s,{value:rt(v),"onUpdate:value":[z[13]||(z[13]=W=>fn(v)?v.value=W:null),Be]},null,8,["value"])]),q("div",Lse,[Y(J,{value:rt(n),"onUpdate:value":z[14]||(z[14]=W=>fn(n)?n.value=W:null),items:g,"key-name":"value","value-name":"label","allow-clear":!1,onChange:Be,style:{cursor:"pointer"}},null,8,["value"])])])]),q("div",{ref_key:"chartContainer3",ref:w,style:{width:"100%",height:"300px"}},null,512)])])])])])}}});export{Use as default};