")}function vo(r,e,t){const n=new r._zod.constr(e??r._zod.def);return(!e||t?.parent)&&(n._zod.parent=r),n}function Te(r){const e=r;if(!e)return{};if(typeof e=="string")return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");e.error=e.message}return delete e.message,typeof e.error=="string"?{...e,error:()=>e.error}:e}function s5(r){return Object.keys(r).filter(e=>r[e]._zod.optin==="optional"&&r[e]._zod.optout==="optional")}const l5={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function u5(r,e){const t=r._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const i=co(r._zod.def,{get shape(){const o={};for(const s in e){if(!(s in t.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&(o[s]=t.shape[s])}return Fs(this,"shape",o),o},checks:[]});return vo(r,i)}function f5(r,e){const t=r._zod.def,n=t.checks;if(n&&n.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const i=co(r._zod.def,{get shape(){const o={...r._zod.def.shape};for(const s in e){if(!(s in t.shape))throw new Error(`Unrecognized key: "${s}"`);e[s]&&delete o[s]}return Fs(this,"shape",o),o},checks:[]});return vo(r,i)}function c5(r,e){if(!Xf(e))throw new Error("Invalid input to extend: expected a plain object");const t=r._zod.def.checks;if(t&&t.length>0){const i=r._zod.def.shape;for(const o in e)if(Object.getOwnPropertyDescriptor(i,o)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const a=co(r._zod.def,{get shape(){const i={...r._zod.def.shape,...e};return Fs(this,"shape",i),i}});return vo(r,a)}function v5(r,e){if(!Xf(e))throw new Error("Invalid input to safeExtend: expected a plain object");const t=co(r._zod.def,{get shape(){const n={...r._zod.def.shape,...e};return Fs(this,"shape",n),n}});return vo(r,t)}function h5(r,e){const t=co(r._zod.def,{get shape(){const n={...r._zod.def.shape,...e._zod.def.shape};return Fs(this,"shape",n),n},get catchall(){return e._zod.def.catchall},checks:[]});return vo(r,t)}function p5(r,e,t){const a=e._zod.def.checks;if(a&&a.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const o=co(e._zod.def,{get shape(){const s=e._zod.def.shape,l={...s};if(t)for(const u in t){if(!(u in s))throw new Error(`Unrecognized key: "${u}"`);t[u]&&(l[u]=r?new r({type:"optional",innerType:s[u]}):s[u])}else for(const u in s)l[u]=r?new r({type:"optional",innerType:s[u]}):s[u];return Fs(this,"shape",l),l},checks:[]});return vo(e,o)}function d5(r,e,t){const n=co(e._zod.def,{get shape(){const a=e._zod.def.shape,i={...a};if(t)for(const o in t){if(!(o in i))throw new Error(`Unrecognized key: "${o}"`);t[o]&&(i[o]=new r({type:"nonoptional",innerType:a[o]}))}else for(const o in a)i[o]=new r({type:"nonoptional",innerType:a[o]});return Fs(this,"shape",i),i}});return vo(e,n)}function kl(r,e=0){if(r.aborted===!0)return!0;for(let t=e;t{var n;return(n=t).path??(n.path=[]),t.path.unshift(r),t})}function ev(r){return typeof r=="string"?r:r?.message}function Ls(r,e,t){const n={...r,path:r.path??[]};if(!r.message){const a=ev(r.inst?._zod.def?.error?.(r))??ev(e?.error?.(r))??ev(t.customError?.(r))??ev(t.localeError?.(r))??"Invalid input";n.message=a}return delete n.inst,delete n.continue,e?.reportInput||delete n.input,n}function w1(r){return Array.isArray(r)?"array":typeof r=="string"?"string":"unknown"}function qf(...r){const[e,t,n]=r;return typeof e=="string"?{message:e,code:"custom",input:t,inst:n}:{...e}}const wL=(r,e)=>{r.name="$ZodError",Object.defineProperty(r,"_zod",{value:r._zod,enumerable:!1}),Object.defineProperty(r,"issues",{value:e,enumerable:!1}),r.message=JSON.stringify(e,Xm,2),Object.defineProperty(r,"toString",{value:()=>r.message,enumerable:!1})},TL=Z("$ZodError",wL),CL=Z("$ZodError",wL,{Parent:Error});function g5(r,e=t=>t.message){const t={},n=[];for(const a of r.issues)a.path.length>0?(t[a.path[0]]=t[a.path[0]]||[],t[a.path[0]].push(e(a))):n.push(e(a));return{formErrors:n,fieldErrors:t}}function y5(r,e=t=>t.message){const t={_errors:[]},n=a=>{for(const i of a.issues)if(i.code==="invalid_union"&&i.errors.length)i.errors.map(o=>n({issues:o}));else if(i.code==="invalid_key")n({issues:i.issues});else if(i.code==="invalid_element")n({issues:i.issues});else if(i.path.length===0)t._errors.push(e(i));else{let o=t,s=0;for(;s(e,t,n,a)=>{const i=n?Object.assign(n,{async:!1}):{async:!1},o=e._zod.run({value:t,issues:[]},i);if(o instanceof Promise)throw new Fl;if(o.issues.length){const s=new(a?.Err??r)(o.issues.map(l=>Ls(l,i,Is())));throw SL(s,a?.callee),s}return o.value},C1=r=>async(e,t,n,a)=>{const i=n?Object.assign(n,{async:!0}):{async:!0};let o=e._zod.run({value:t,issues:[]},i);if(o instanceof Promise&&(o=await o),o.issues.length){const s=new(a?.Err??r)(o.issues.map(l=>Ls(l,i,Is())));throw SL(s,a?.callee),s}return o.value},sd=r=>(e,t,n)=>{const a=n?{...n,async:!1}:{async:!1},i=e._zod.run({value:t,issues:[]},a);if(i instanceof Promise)throw new Fl;return i.issues.length?{success:!1,error:new(r??TL)(i.issues.map(o=>Ls(o,a,Is())))}:{success:!0,data:i.value}},m5=sd(CL),ld=r=>async(e,t,n)=>{const a=n?Object.assign(n,{async:!0}):{async:!0};let i=e._zod.run({value:t,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new r(i.issues.map(o=>Ls(o,a,Is())))}:{success:!0,data:i.value}},_5=ld(CL),S5=r=>(e,t,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return T1(r)(e,t,a)},b5=r=>(e,t,n)=>T1(r)(e,t,n),x5=r=>async(e,t,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return C1(r)(e,t,a)},w5=r=>async(e,t,n)=>C1(r)(e,t,n),T5=r=>(e,t,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return sd(r)(e,t,a)},C5=r=>(e,t,n)=>sd(r)(e,t,n),A5=r=>async(e,t,n)=>{const a=n?Object.assign(n,{direction:"backward"}):{direction:"backward"};return ld(r)(e,t,a)},M5=r=>async(e,t,n)=>ld(r)(e,t,n),D5=/^[cC][^\s-]{8,}$/,I5=/^[0-9a-z]+$/,L5=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,P5=/^[0-9a-vA-V]{20}$/,k5=/^[A-Za-z0-9]{27}$/,E5=/^[a-zA-Z0-9_-]{21}$/,R5=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,O5=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,mx=r=>r?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${r}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}) svelte_strategy_survey ):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,N5=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,z5="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function B5(){return new RegExp(z5,"u")}const V5=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,G5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,F5=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,H5=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,W5=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,AL=/^[A-Za-z0-9_-]*$/,$5=/^\+[1-9]\d{6,14}$/,ML="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Z5=new RegExp(`^${ML} svelte_strategy_survey );function DL(r){const e="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof r.precision=="number"?r.precision===-1?`${e}`:r.precision===0?`${e}:[0-5]\\d`:`${e}:[0-5]\\d\\.\\d{${r.precision}}`:`${e}(?::[0-5]\\d(?:\\.\\d+)?)?`}function U5(r){return new RegExp(`^${DL(r)} svelte_strategy_survey )}function Y5(r){const e=DL({precision:r.precision}),t=["Z"];r.local&&t.push(""),r.offset&&t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const n=`${e}(?:${t.join("|")})`;return new RegExp(`^${ML}T(?:${n}) svelte_strategy_survey )}const X5=r=>{const e=r?`[\\s\\S]{${r?.minimum??0},${r?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${e} svelte_strategy_survey )},q5=/^-?\d+$/,j5=/^-?\d+(?:\.\d+)?$/,K5=/^[^A-Z]*$/,J5=/^[^a-z]*$/,Yr=Z("$ZodCheck",(r,e)=>{var t;r._zod??(r._zod={}),r._zod.def=e,(t=r._zod).onattach??(t.onattach=[])}),IL={number:"number",bigint:"bigint",object:"date"},LL=Z("$ZodCheckLessThan",(r,e)=>{Yr.init(r,e);const t=IL[typeof e.value];r._zod.onattach.push(n=>{const a=n._zod.bag,i=(e.inclusive?a.maximum:a.exclusiveMaximum)??Number.POSITIVE_INFINITY;e.value{(e.inclusive?n.value<=e.value:n.value{Yr.init(r,e);const t=IL[typeof e.value];r._zod.onattach.push(n=>{const a=n._zod.bag,i=(e.inclusive?a.minimum:a.exclusiveMinimum)??Number.NEGATIVE_INFINITY;e.value>i&&(e.inclusive?a.minimum=e.value:a.exclusiveMinimum=e.value)}),r._zod.check=n=>{(e.inclusive?n.value>=e.value:n.value>e.value)||n.issues.push({origin:t,code:"too_small",minimum:typeof e.value=="object"?e.value.getTime():e.value,input:n.value,inclusive:e.inclusive,inst:r,continue:!e.abort})}}),Q5=Z("$ZodCheckMultipleOf",(r,e)=>{Yr.init(r,e),r._zod.onattach.push(t=>{var n;(n=t._zod.bag).multipleOf??(n.multipleOf=e.value)}),r._zod.check=t=>{if(typeof t.value!=typeof e.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof t.value=="bigint"?t.value%e.value===BigInt(0):n5(t.value,e.value)===0)||t.issues.push({origin:typeof t.value,code:"not_multiple_of",divisor:e.value,input:t.value,inst:r,continue:!e.abort})}}),e3=Z("$ZodCheckNumberFormat",(r,e)=>{Yr.init(r,e),e.format=e.format||"float64";const t=e.format?.includes("int"),n=t?"int":"number",[a,i]=l5[e.format];r._zod.onattach.push(o=>{const s=o._zod.bag;s.format=e.format,s.minimum=a,s.maximum=i,t&&(s.pattern=q5)}),r._zod.check=o=>{const s=o.value;if(t){if(!Number.isInteger(s)){o.issues.push({expected:n,format:e.format,code:"invalid_type",continue:!1,input:s,inst:r});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:n,inclusive:!0,continue:!e.abort}):o.issues.push({input:s,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:r,origin:n,inclusive:!0,continue:!e.abort});return}}si&&o.issues.push({origin:"number",input:s,code:"too_big",maximum:i,inclusive:!0,inst:r,continue:!e.abort})}}),t3=Z("$ZodCheckMaxLength",(r,e)=>{var t;Yr.init(r,e),(t=r._zod.def).when??(t.when=n=>{const a=n.value;return!b1(a)&&a.length!==void 0}),r._zod.onattach.push(n=>{const a=n._zod.bag.maximum??Number.POSITIVE_INFINITY;e.maximum{const a=n.value;if(a.length<=e.maximum)return;const o=w1(a);n.issues.push({origin:o,code:"too_big",maximum:e.maximum,inclusive:!0,input:a,inst:r,continue:!e.abort})}}),r3=Z("$ZodCheckMinLength",(r,e)=>{var t;Yr.init(r,e),(t=r._zod.def).when??(t.when=n=>{const a=n.value;return!b1(a)&&a.length!==void 0}),r._zod.onattach.push(n=>{const a=n._zod.bag.minimum??Number.NEGATIVE_INFINITY;e.minimum>a&&(n._zod.bag.minimum=e.minimum)}),r._zod.check=n=>{const a=n.value;if(a.length>=e.minimum)return;const o=w1(a);n.issues.push({origin:o,code:"too_small",minimum:e.minimum,inclusive:!0,input:a,inst:r,continue:!e.abort})}}),n3=Z("$ZodCheckLengthEquals",(r,e)=>{var t;Yr.init(r,e),(t=r._zod.def).when??(t.when=n=>{const a=n.value;return!b1(a)&&a.length!==void 0}),r._zod.onattach.push(n=>{const a=n._zod.bag;a.minimum=e.length,a.maximum=e.length,a.length=e.length}),r._zod.check=n=>{const a=n.value,i=a.length;if(i===e.length)return;const o=w1(a),s=i>e.length;n.issues.push({origin:o,...s?{code:"too_big",maximum:e.length}:{code:"too_small",minimum:e.length},inclusive:!0,exact:!0,input:n.value,inst:r,continue:!e.abort})}}),ud=Z("$ZodCheckStringFormat",(r,e)=>{var t,n;Yr.init(r,e),r._zod.onattach.push(a=>{const i=a._zod.bag;i.format=e.format,e.pattern&&(i.patterns??(i.patterns=new Set),i.patterns.add(e.pattern))}),e.pattern?(t=r._zod).check??(t.check=a=>{e.pattern.lastIndex=0,!e.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:e.format,input:a.value,...e.pattern?{pattern:e.pattern.toString()}:{},inst:r,continue:!e.abort})}):(n=r._zod).check??(n.check=()=>{})}),a3=Z("$ZodCheckRegex",(r,e)=>{ud.init(r,e),r._zod.check=t=>{e.pattern.lastIndex=0,!e.pattern.test(t.value)&&t.issues.push({origin:"string",code:"invalid_format",format:"regex",input:t.value,pattern:e.pattern.toString(),inst:r,continue:!e.abort})}}),i3=Z("$ZodCheckLowerCase",(r,e)=>{e.pattern??(e.pattern=K5),ud.init(r,e)}),o3=Z("$ZodCheckUpperCase",(r,e)=>{e.pattern??(e.pattern=J5),ud.init(r,e)}),s3=Z("$ZodCheckIncludes",(r,e)=>{Yr.init(r,e);const t=od(e.includes),n=new RegExp(typeof e.position=="number"?`^.{${e.position}}${t}`:t);e.pattern=n,r._zod.onattach.push(a=>{const i=a._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),r._zod.check=a=>{a.value.includes(e.includes,e.position)||a.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:e.includes,input:a.value,inst:r,continue:!e.abort})}}),l3=Z("$ZodCheckStartsWith",(r,e)=>{Yr.init(r,e);const t=new RegExp(`^${od(e.prefix)}.*`);e.pattern??(e.pattern=t),r._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(t)}),r._zod.check=n=>{n.value.startsWith(e.prefix)||n.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:e.prefix,input:n.value,inst:r,continue:!e.abort})}}),u3=Z("$ZodCheckEndsWith",(r,e)=>{Yr.init(r,e);const t=new RegExp(`.*${od(e.suffix)} svelte_strategy_survey );e.pattern??(e.pattern=t),r._zod.onattach.push(n=>{const a=n._zod.bag;a.patterns??(a.patterns=new Set),a.patterns.add(t)}),r._zod.check=n=>{n.value.endsWith(e.suffix)||n.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:e.suffix,input:n.value,inst:r,continue:!e.abort})}}),f3=Z("$ZodCheckOverwrite",(r,e)=>{Yr.init(r,e),r._zod.check=t=>{t.value=e.tx(t.value)}});class c3{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),this.indent-=1}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}const n=e.split(` `).filter(o=>o),a=Math.min(...n.map(o=>o.length-o.trimStart().length)),i=n.map(o=>o.slice(a)).map(o=>" ".repeat(this.indent*2)+o);for(const o of i)this.content.push(o)}compile(){const e=Function,t=this?.args,a=[...(this?.content??[""]).map(i=>` ${i}`)];return new e(...t,a.join(` `))}}const v3={major:4,minor:3,patch:6},Wt=Z("$ZodType",(r,e)=>{var t;r??(r={}),r._zod.def=e,r._zod.bag=r._zod.bag||{},r._zod.version=v3;const n=[...r._zod.def.checks??[]];r._zod.traits.has("$ZodCheck")&&n.unshift(r);for(const a of n)for(const i of a._zod.onattach)i(r);if(n.length===0)(t=r._zod).deferred??(t.deferred=[]),r._zod.deferred?.push(()=>{r._zod.run=r._zod.parse});else{const a=(o,s,l)=>{let u=kl(o),f;for(const c of s){if(c._zod.def.when){if(!c._zod.def.when(o))continue}else if(u)continue;const v=o.issues.length,h=c._zod.check(o);if(h instanceof Promise&&l?.async===!1)throw new Fl;if(f||h instanceof Promise)f=(f??Promise.resolve()).then(async()=>{await h,o.issues.length!==v&&(u||(u=kl(o,v)))});else{if(o.issues.length===v)continue;u||(u=kl(o,v))}}return f?f.then(()=>o):o},i=(o,s,l)=>{if(kl(o))return o.aborted=!0,o;const u=a(s,n,l);if(u instanceof Promise){if(l.async===!1)throw new Fl;return u.then(f=>r._zod.parse(f,l))}return r._zod.parse(u,l)};r._zod.run=(o,s)=>{if(s.skipChecks)return r._zod.parse(o,s);if(s.direction==="backward"){const u=r._zod.parse({value:o.value,issues:[]},{...s,skipChecks:!0});return u instanceof Promise?u.then(f=>i(f,o,s)):i(u,o,s)}const l=r._zod.parse(o,s);if(l instanceof Promise){if(s.async===!1)throw new Fl;return l.then(u=>a(u,n,s))}return a(l,n,s)}}it(r,"~standard",()=>({validate:a=>{try{const i=m5(r,a);return i.success?{value:i.data}:{issues:i.error?.issues}}catch{return _5(r,a).then(o=>o.success?{value:o.data}:{issues:o.error?.issues})}},vendor:"zod",version:1}))}),A1=Z("$ZodString",(r,e)=>{Wt.init(r,e),r._zod.pattern=[...r?._zod.bag?.patterns??[]].pop()??X5(r._zod.bag),r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=String(t.value)}catch{}return typeof t.value=="string"||t.issues.push({expected:"string",code:"invalid_type",input:t.value,inst:r}),t}}),gt=Z("$ZodStringFormat",(r,e)=>{ud.init(r,e),A1.init(r,e)}),h3=Z("$ZodGUID",(r,e)=>{e.pattern??(e.pattern=O5),gt.init(r,e)}),p3=Z("$ZodUUID",(r,e)=>{if(e.version){const n={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[e.version];if(n===void 0)throw new Error(`Invalid UUID version: "${e.version}"`);e.pattern??(e.pattern=mx(n))}else e.pattern??(e.pattern=mx());gt.init(r,e)}),d3=Z("$ZodEmail",(r,e)=>{e.pattern??(e.pattern=N5),gt.init(r,e)}),g3=Z("$ZodURL",(r,e)=>{gt.init(r,e),r._zod.check=t=>{try{const n=t.value.trim(),a=new URL(n);e.hostname&&(e.hostname.lastIndex=0,e.hostname.test(a.hostname)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:e.hostname.source,input:t.value,inst:r,continue:!e.abort})),e.protocol&&(e.protocol.lastIndex=0,e.protocol.test(a.protocol.endsWith(":")?a.protocol.slice(0,-1):a.protocol)||t.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:e.protocol.source,input:t.value,inst:r,continue:!e.abort})),e.normalize?t.value=a.href:t.value=n;return}catch{t.issues.push({code:"invalid_format",format:"url",input:t.value,inst:r,continue:!e.abort})}}}),y3=Z("$ZodEmoji",(r,e)=>{e.pattern??(e.pattern=B5()),gt.init(r,e)}),m3=Z("$ZodNanoID",(r,e)=>{e.pattern??(e.pattern=E5),gt.init(r,e)}),_3=Z("$ZodCUID",(r,e)=>{e.pattern??(e.pattern=D5),gt.init(r,e)}),S3=Z("$ZodCUID2",(r,e)=>{e.pattern??(e.pattern=I5),gt.init(r,e)}),b3=Z("$ZodULID",(r,e)=>{e.pattern??(e.pattern=L5),gt.init(r,e)}),x3=Z("$ZodXID",(r,e)=>{e.pattern??(e.pattern=P5),gt.init(r,e)}),w3=Z("$ZodKSUID",(r,e)=>{e.pattern??(e.pattern=k5),gt.init(r,e)}),T3=Z("$ZodISODateTime",(r,e)=>{e.pattern??(e.pattern=Y5(e)),gt.init(r,e)}),C3=Z("$ZodISODate",(r,e)=>{e.pattern??(e.pattern=Z5),gt.init(r,e)}),A3=Z("$ZodISOTime",(r,e)=>{e.pattern??(e.pattern=U5(e)),gt.init(r,e)}),M3=Z("$ZodISODuration",(r,e)=>{e.pattern??(e.pattern=R5),gt.init(r,e)}),D3=Z("$ZodIPv4",(r,e)=>{e.pattern??(e.pattern=V5),gt.init(r,e),r._zod.bag.format="ipv4"}),I3=Z("$ZodIPv6",(r,e)=>{e.pattern??(e.pattern=G5),gt.init(r,e),r._zod.bag.format="ipv6",r._zod.check=t=>{try{new URL(`http://[${t.value}]`)}catch{t.issues.push({code:"invalid_format",format:"ipv6",input:t.value,inst:r,continue:!e.abort})}}}),L3=Z("$ZodCIDRv4",(r,e)=>{e.pattern??(e.pattern=F5),gt.init(r,e)}),P3=Z("$ZodCIDRv6",(r,e)=>{e.pattern??(e.pattern=H5),gt.init(r,e),r._zod.check=t=>{const n=t.value.split("/");try{if(n.length!==2)throw new Error;const[a,i]=n;if(!i)throw new Error;const o=Number(i);if(`${o}`!==i)throw new Error;if(o<0||o>128)throw new Error;new URL(`http://[${a}]`)}catch{t.issues.push({code:"invalid_format",format:"cidrv6",input:t.value,inst:r,continue:!e.abort})}}});function kL(r){if(r==="")return!0;if(r.length%4!==0)return!1;try{return atob(r),!0}catch{return!1}}const k3=Z("$ZodBase64",(r,e)=>{e.pattern??(e.pattern=W5),gt.init(r,e),r._zod.bag.contentEncoding="base64",r._zod.check=t=>{kL(t.value)||t.issues.push({code:"invalid_format",format:"base64",input:t.value,inst:r,continue:!e.abort})}});function E3(r){if(!AL.test(r))return!1;const e=r.replace(/[-_]/g,n=>n==="-"?"+":"/"),t=e.padEnd(Math.ceil(e.length/4)*4,"=");return kL(t)}const R3=Z("$ZodBase64URL",(r,e)=>{e.pattern??(e.pattern=AL),gt.init(r,e),r._zod.bag.contentEncoding="base64url",r._zod.check=t=>{E3(t.value)||t.issues.push({code:"invalid_format",format:"base64url",input:t.value,inst:r,continue:!e.abort})}}),O3=Z("$ZodE164",(r,e)=>{e.pattern??(e.pattern=$5),gt.init(r,e)});function N3(r,e=null){try{const t=r.split(".");if(t.length!==3)return!1;const[n]=t;if(!n)return!1;const a=JSON.parse(atob(n));return!("typ"in a&&a?.typ!=="JWT"||!a.alg||e&&(!("alg"in a)||a.alg!==e))}catch{return!1}}const z3=Z("$ZodJWT",(r,e)=>{gt.init(r,e),r._zod.check=t=>{N3(t.value,e.alg)||t.issues.push({code:"invalid_format",format:"jwt",input:t.value,inst:r,continue:!e.abort})}}),EL=Z("$ZodNumber",(r,e)=>{Wt.init(r,e),r._zod.pattern=r._zod.bag.pattern??j5,r._zod.parse=(t,n)=>{if(e.coerce)try{t.value=Number(t.value)}catch{}const a=t.value;if(typeof a=="number"&&!Number.isNaN(a)&&Number.isFinite(a))return t;const i=typeof a=="number"?Number.isNaN(a)?"NaN":Number.isFinite(a)?void 0:"Infinity":void 0;return t.issues.push({expected:"number",code:"invalid_type",input:a,inst:r,...i?{received:i}:{}}),t}}),B3=Z("$ZodNumberFormat",(r,e)=>{e3.init(r,e),EL.init(r,e)}),V3=Z("$ZodUnknown",(r,e)=>{Wt.init(r,e),r._zod.parse=t=>t}),G3=Z("$ZodNever",(r,e)=>{Wt.init(r,e),r._zod.parse=(t,n)=>(t.issues.push({expected:"never",code:"invalid_type",input:t.value,inst:r}),t)});function _x(r,e,t){r.issues.length&&e.issues.push(...xL(t,r.issues)),e.value[t]=r.value}const F3=Z("$ZodArray",(r,e)=>{Wt.init(r,e),r._zod.parse=(t,n)=>{const a=t.value;if(!Array.isArray(a))return t.issues.push({expected:"array",code:"invalid_type",input:a,inst:r}),t;t.value=Array(a.length);const i=[];for(let o=0;o_x(u,t,o))):_x(l,t,o)}return i.length?Promise.all(i).then(()=>t):t}});function $h(r,e,t,n,a){if(r.issues.length){if(a&&!(t in n))return;e.issues.push(...xL(t,r.issues))}r.value===void 0?t in n&&(e.value[t]=void 0):e.value[t]=r.value}function RL(r){const e=Object.keys(r.shape);for(const n of e)if(!r.shape?.[n]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${n}": expected a Zod schema`);const t=s5(r.shape);return{...r,keys:e,keySet:new Set(e),numKeys:e.length,optionalKeys:new Set(t)}}function OL(r,e,t,n,a,i){const o=[],s=a.keySet,l=a.catchall._zod,u=l.def.type,f=l.optout==="optional";for(const c in e){if(s.has(c))continue;if(u==="never"){o.push(c);continue}const v=l.run({value:e[c],issues:[]},n);v instanceof Promise?r.push(v.then(h=>$h(h,t,c,e,f))):$h(v,t,c,e,f)}return o.length&&t.issues.push({code:"unrecognized_keys",keys:o,input:e,inst:i}),r.length?Promise.all(r).then(()=>t):t}const H3=Z("$ZodObject",(r,e)=>{if(Wt.init(r,e),!Object.getOwnPropertyDescriptor(e,"shape")?.get){const s=e.shape;Object.defineProperty(e,"shape",{get:()=>{const l={...s};return Object.defineProperty(e,"shape",{value:l}),l}})}const n=S1(()=>RL(e));it(r._zod,"propValues",()=>{const s=e.shape,l={};for(const u in s){const f=s[u]._zod;if(f.values){l[u]??(l[u]=new Set);for(const c of f.values)l[u].add(c)}}return l});const a=Wh,i=e.catchall;let o;r._zod.parse=(s,l)=>{o??(o=n.value);const u=s.value;if(!a(u))return s.issues.push({expected:"object",code:"invalid_type",input:u,inst:r}),s;s.value={};const f=[],c=o.shape;for(const v of o.keys){const h=c[v],p=h._zod.optout==="optional",d=h._zod.run({value:u[v],issues:[]},l);d instanceof Promise?f.push(d.then(g=>$h(g,s,v,u,p))):$h(d,s,v,u,p)}return i?OL(f,u,s,l,n.value,r):f.length?Promise.all(f).then(()=>s):s}}),W3=Z("$ZodObjectJIT",(r,e)=>{H3.init(r,e);const t=r._zod.parse,n=S1(()=>RL(e)),a=v=>{const h=new c3(["shape","payload","ctx"]),p=n.value,d=_=>{const S=yx(_);return`shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`};h.write("const input = payload.value;");const g=Object.create(null);let y=0;for(const _ of p.keys)g[_]=`key_${y++}`;h.write("const newResult = {};");for(const _ of p.keys){const S=g[_],b=yx(_),w=v[_]?._zod?.optout==="optional";h.write(`const ${S} = ${d(_)};`),w?h.write(` if (${S}.issues.length) { if (${b} in input) { payload.issues = payload.issues.concat(${S}.issues.map(iss => ({ ...iss, path: iss.path ? [${b}, ...iss.path] : [${b}] }))); } } if (${S}.value === undefined) { if (${b} in input) { newResult[${b}] = undefined; } } else { newResult[${b}] = ${S}.value; } `):h.write(` if (${S}.issues.length) { payload.issues = payload.issues.concat(${S}.issues.map(iss => ({ ...iss, path: iss.path ? [${b}, ...iss.path] : [${b}] }))); } if (${S}.value === undefined) { if (${b} in input) { newResult[${b}] = undefined; } } else { newResult[${b}] = ${S}.value; } `)}h.write("payload.value = newResult;"),h.write("return payload;");const m=h.compile();return(_,S)=>m(v,_,S)};let i;const o=Wh,s=!mL.jitless,u=s&&i5.value,f=e.catchall;let c;r._zod.parse=(v,h)=>{c??(c=n.value);const p=v.value;return o(p)?s&&u&&h?.async===!1&&h.jitless!==!0?(i||(i=a(e.shape)),v=i(v,h),f?OL([],p,v,h,c,r):v):t(v,h):(v.issues.push({expected:"object",code:"invalid_type",input:p,inst:r}),v)}});function Sx(r,e,t,n){for(const i of r)if(i.issues.length===0)return e.value=i.value,e;const a=r.filter(i=>!kl(i));return a.length===1?(e.value=a[0].value,a[0]):(e.issues.push({code:"invalid_union",input:e.value,inst:t,errors:r.map(i=>i.issues.map(o=>Ls(o,n,Is())))}),e)}const $3=Z("$ZodUnion",(r,e)=>{Wt.init(r,e),it(r._zod,"optin",()=>e.options.some(a=>a._zod.optin==="optional")?"optional":void 0),it(r._zod,"optout",()=>e.options.some(a=>a._zod.optout==="optional")?"optional":void 0),it(r._zod,"values",()=>{if(e.options.every(a=>a._zod.values))return new Set(e.options.flatMap(a=>Array.from(a._zod.values)))}),it(r._zod,"pattern",()=>{if(e.options.every(a=>a._zod.pattern)){const a=e.options.map(i=>i._zod.pattern);return new RegExp(`^(${a.map(i=>x1(i.source)).join("|")}) svelte_strategy_survey )}});const t=e.options.length===1,n=e.options[0]._zod.run;r._zod.parse=(a,i)=>{if(t)return n(a,i);let o=!1;const s=[];for(const l of e.options){const u=l._zod.run({value:a.value,issues:[]},i);if(u instanceof Promise)s.push(u),o=!0;else{if(u.issues.length===0)return u;s.push(u)}}return o?Promise.all(s).then(l=>Sx(l,a,r,i)):Sx(s,a,r,i)}}),Z3=Z("$ZodIntersection",(r,e)=>{Wt.init(r,e),r._zod.parse=(t,n)=>{const a=t.value,i=e.left._zod.run({value:a,issues:[]},n),o=e.right._zod.run({value:a,issues:[]},n);return i instanceof Promise||o instanceof Promise?Promise.all([i,o]).then(([l,u])=>bx(t,l,u)):bx(t,i,o)}});function qm(r,e){if(r===e)return{valid:!0,data:r};if(r instanceof Date&&e instanceof Date&&+r==+e)return{valid:!0,data:r};if(Xf(r)&&Xf(e)){const t=Object.keys(e),n=Object.keys(r).filter(i=>t.indexOf(i)!==-1),a={...r,...e};for(const i of n){const o=qm(r[i],e[i]);if(!o.valid)return{valid:!1,mergeErrorPath:[i,...o.mergeErrorPath]};a[i]=o.data}return{valid:!0,data:a}}if(Array.isArray(r)&&Array.isArray(e)){if(r.length!==e.length)return{valid:!1,mergeErrorPath:[]};const t=[];for(let n=0;ns.l&&s.r).map(([s])=>s);if(i.length&&a&&r.issues.push({...a,keys:i}),kl(r))return r;const o=qm(e.value,t.value);if(!o.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);return r.value=o.data,r}const U3=Z("$ZodEnum",(r,e)=>{Wt.init(r,e);const t=_L(e.entries),n=new Set(t);r._zod.values=n,r._zod.pattern=new RegExp(`^(${t.filter(a=>o5.has(typeof a)).map(a=>typeof a=="string"?od(a):a.toString()).join("|")}) svelte_strategy_survey ),r._zod.parse=(a,i)=>{const o=a.value;return n.has(o)||a.issues.push({code:"invalid_value",values:t,input:o,inst:r}),a}}),Y3=Z("$ZodTransform",(r,e)=>{Wt.init(r,e),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new yL(r.constructor.name);const a=e.transform(t.value,t);if(n.async)return(a instanceof Promise?a:Promise.resolve(a)).then(o=>(t.value=o,t));if(a instanceof Promise)throw new Fl;return t.value=a,t}});function xx(r,e){return r.issues.length&&e===void 0?{issues:[],value:void 0}:r}const NL=Z("$ZodOptional",(r,e)=>{Wt.init(r,e),r._zod.optin="optional",r._zod.optout="optional",it(r._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,void 0]):void 0),it(r._zod,"pattern",()=>{const t=e.innerType._zod.pattern;return t?new RegExp(`^(${x1(t.source)})? svelte_strategy_survey ):void 0}),r._zod.parse=(t,n)=>{if(e.innerType._zod.optin==="optional"){const a=e.innerType._zod.run(t,n);return a instanceof Promise?a.then(i=>xx(i,t.value)):xx(a,t.value)}return t.value===void 0?t:e.innerType._zod.run(t,n)}}),X3=Z("$ZodExactOptional",(r,e)=>{NL.init(r,e),it(r._zod,"values",()=>e.innerType._zod.values),it(r._zod,"pattern",()=>e.innerType._zod.pattern),r._zod.parse=(t,n)=>e.innerType._zod.run(t,n)}),q3=Z("$ZodNullable",(r,e)=>{Wt.init(r,e),it(r._zod,"optin",()=>e.innerType._zod.optin),it(r._zod,"optout",()=>e.innerType._zod.optout),it(r._zod,"pattern",()=>{const t=e.innerType._zod.pattern;return t?new RegExp(`^(${x1(t.source)}|null) svelte_strategy_survey ):void 0}),it(r._zod,"values",()=>e.innerType._zod.values?new Set([...e.innerType._zod.values,null]):void 0),r._zod.parse=(t,n)=>t.value===null?t:e.innerType._zod.run(t,n)}),j3=Z("$ZodDefault",(r,e)=>{Wt.init(r,e),r._zod.optin="optional",it(r._zod,"values",()=>e.innerType._zod.values),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);if(t.value===void 0)return t.value=e.defaultValue,t;const a=e.innerType._zod.run(t,n);return a instanceof Promise?a.then(i=>Tx(i,e)):Tx(a,e)}});function Tx(r,e){return r.value===void 0&&(r.value=e.defaultValue),r}const K3=Z("$ZodPrefault",(r,e)=>{Wt.init(r,e),r._zod.optin="optional",it(r._zod,"values",()=>e.innerType._zod.values),r._zod.parse=(t,n)=>(n.direction==="backward"||t.value===void 0&&(t.value=e.defaultValue),e.innerType._zod.run(t,n))}),J3=Z("$ZodNonOptional",(r,e)=>{Wt.init(r,e),it(r._zod,"values",()=>{const t=e.innerType._zod.values;return t?new Set([...t].filter(n=>n!==void 0)):void 0}),r._zod.parse=(t,n)=>{const a=e.innerType._zod.run(t,n);return a instanceof Promise?a.then(i=>Cx(i,r)):Cx(a,r)}});function Cx(r,e){return!r.issues.length&&r.value===void 0&&r.issues.push({code:"invalid_type",expected:"nonoptional",input:r.value,inst:e}),r}const Q3=Z("$ZodCatch",(r,e)=>{Wt.init(r,e),it(r._zod,"optin",()=>e.innerType._zod.optin),it(r._zod,"optout",()=>e.innerType._zod.optout),it(r._zod,"values",()=>e.innerType._zod.values),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);const a=e.innerType._zod.run(t,n);return a instanceof Promise?a.then(i=>(t.value=i.value,i.issues.length&&(t.value=e.catchValue({...t,error:{issues:i.issues.map(o=>Ls(o,n,Is()))},input:t.value}),t.issues=[]),t)):(t.value=a.value,a.issues.length&&(t.value=e.catchValue({...t,error:{issues:a.issues.map(i=>Ls(i,n,Is()))},input:t.value}),t.issues=[]),t)}}),eG=Z("$ZodPipe",(r,e)=>{Wt.init(r,e),it(r._zod,"values",()=>e.in._zod.values),it(r._zod,"optin",()=>e.in._zod.optin),it(r._zod,"optout",()=>e.out._zod.optout),it(r._zod,"propValues",()=>e.in._zod.propValues),r._zod.parse=(t,n)=>{if(n.direction==="backward"){const i=e.out._zod.run(t,n);return i instanceof Promise?i.then(o=>tv(o,e.in,n)):tv(i,e.in,n)}const a=e.in._zod.run(t,n);return a instanceof Promise?a.then(i=>tv(i,e.out,n)):tv(a,e.out,n)}});function tv(r,e,t){return r.issues.length?(r.aborted=!0,r):e._zod.run({value:r.value,issues:r.issues},t)}const tG=Z("$ZodReadonly",(r,e)=>{Wt.init(r,e),it(r._zod,"propValues",()=>e.innerType._zod.propValues),it(r._zod,"values",()=>e.innerType._zod.values),it(r._zod,"optin",()=>e.innerType?._zod?.optin),it(r._zod,"optout",()=>e.innerType?._zod?.optout),r._zod.parse=(t,n)=>{if(n.direction==="backward")return e.innerType._zod.run(t,n);const a=e.innerType._zod.run(t,n);return a instanceof Promise?a.then(Ax):Ax(a)}});function Ax(r){return r.value=Object.freeze(r.value),r}const rG=Z("$ZodCustom",(r,e)=>{Yr.init(r,e),Wt.init(r,e),r._zod.parse=(t,n)=>t,r._zod.check=t=>{const n=t.value,a=e.fn(n);if(a instanceof Promise)return a.then(i=>Mx(i,t,n,r));Mx(a,t,n,r)}});function Mx(r,e,t,n){if(!r){const a={code:"custom",input:t,inst:n,path:[...n._zod.def.path??[]],continue:!n._zod.def.abort};n._zod.def.params&&(a.params=n._zod.def.params),e.issues.push(qf(a))}}var Dx;class nG{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t){const n=t[0];return this._map.set(e,n),n&&typeof n=="object"&&"id"in n&&this._idmap.set(n.id,e),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){const t=this._map.get(e);return t&&typeof t=="object"&&"id"in t&&this._idmap.delete(t.id),this._map.delete(e),this}get(e){const t=e._zod.parent;if(t){const n={...this.get(t)??{}};delete n.id;const a={...n,...this._map.get(e)};return Object.keys(a).length?a:void 0}return this._map.get(e)}has(e){return this._map.has(e)}}function aG(){return new nG}(Dx=globalThis).__zod_globalRegistry??(Dx.__zod_globalRegistry=aG());const gf=globalThis.__zod_globalRegistry;function iG(r,e){return new r({type:"string",...Te(e)})}function oG(r,e){return new r({type:"string",format:"email",check:"string_format",abort:!1,...Te(e)})}function Ix(r,e){return new r({type:"string",format:"guid",check:"string_format",abort:!1,...Te(e)})}function sG(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,...Te(e)})}function lG(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Te(e)})}function uG(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Te(e)})}function fG(r,e){return new r({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Te(e)})}function cG(r,e){return new r({type:"string",format:"url",check:"string_format",abort:!1,...Te(e)})}function vG(r,e){return new r({type:"string",format:"emoji",check:"string_format",abort:!1,...Te(e)})}function hG(r,e){return new r({type:"string",format:"nanoid",check:"string_format",abort:!1,...Te(e)})}function pG(r,e){return new r({type:"string",format:"cuid",check:"string_format",abort:!1,...Te(e)})}function dG(r,e){return new r({type:"string",format:"cuid2",check:"string_format",abort:!1,...Te(e)})}function gG(r,e){return new r({type:"string",format:"ulid",check:"string_format",abort:!1,...Te(e)})}function yG(r,e){return new r({type:"string",format:"xid",check:"string_format",abort:!1,...Te(e)})}function mG(r,e){return new r({type:"string",format:"ksuid",check:"string_format",abort:!1,...Te(e)})}function _G(r,e){return new r({type:"string",format:"ipv4",check:"string_format",abort:!1,...Te(e)})}function SG(r,e){return new r({type:"string",format:"ipv6",check:"string_format",abort:!1,...Te(e)})}function bG(r,e){return new r({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Te(e)})}function xG(r,e){return new r({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Te(e)})}function wG(r,e){return new r({type:"string",format:"base64",check:"string_format",abort:!1,...Te(e)})}function TG(r,e){return new r({type:"string",format:"base64url",check:"string_format",abort:!1,...Te(e)})}function CG(r,e){return new r({type:"string",format:"e164",check:"string_format",abort:!1,...Te(e)})}function AG(r,e){return new r({type:"string",format:"jwt",check:"string_format",abort:!1,...Te(e)})}function MG(r,e){return new r({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Te(e)})}function DG(r,e){return new r({type:"string",format:"date",check:"string_format",...Te(e)})}function IG(r,e){return new r({type:"string",format:"time",check:"string_format",precision:null,...Te(e)})}function LG(r,e){return new r({type:"string",format:"duration",check:"string_format",...Te(e)})}function PG(r,e){return new r({type:"number",coerce:!0,checks:[],...Te(e)})}function kG(r,e){return new r({type:"number",check:"number_format",abort:!1,format:"safeint",...Te(e)})}function EG(r){return new r({type:"unknown"})}function RG(r,e){return new r({type:"never",...Te(e)})}function Lx(r,e){return new LL({check:"less_than",...Te(e),value:r,inclusive:!1})}function tg(r,e){return new LL({check:"less_than",...Te(e),value:r,inclusive:!0})}function Px(r,e){return new PL({check:"greater_than",...Te(e),value:r,inclusive:!1})}function rg(r,e){return new PL({check:"greater_than",...Te(e),value:r,inclusive:!0})}function kx(r,e){return new Q5({check:"multiple_of",...Te(e),value:r})}function zL(r,e){return new t3({check:"max_length",...Te(e),maximum:r})}function Zh(r,e){return new r3({check:"min_length",...Te(e),minimum:r})}function BL(r,e){return new n3({check:"length_equals",...Te(e),length:r})}function OG(r,e){return new a3({check:"string_format",format:"regex",...Te(e),pattern:r})}function NG(r){return new i3({check:"string_format",format:"lowercase",...Te(r)})}function zG(r){return new o3({check:"string_format",format:"uppercase",...Te(r)})}function BG(r,e){return new s3({check:"string_format",format:"includes",...Te(e),includes:r})}function VG(r,e){return new l3({check:"string_format",format:"starts_with",...Te(e),prefix:r})}function GG(r,e){return new u3({check:"string_format",format:"ends_with",...Te(e),suffix:r})}function du(r){return new f3({check:"overwrite",tx:r})}function FG(r){return du(e=>e.normalize(r))}function HG(){return du(r=>r.trim())}function WG(){return du(r=>r.toLowerCase())}function $G(){return du(r=>r.toUpperCase())}function ZG(){return du(r=>a5(r))}function UG(r,e,t){return new r({type:"array",element:e,...Te(t)})}function YG(r,e,t){return new r({type:"custom",check:"custom",fn:e,...Te(t)})}function XG(r){const e=qG(t=>(t.addIssue=n=>{if(typeof n=="string")t.issues.push(qf(n,t.value,e._zod.def));else{const a=n;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=t.value),a.inst??(a.inst=e),a.continue??(a.continue=!e._zod.def.abort),t.issues.push(qf(a))}},r(t.value,t)));return e}function qG(r,e){const t=new Yr({check:"custom",...Te(e)});return t._zod.check=r,t}function VL(r){let e=r?.target??"draft-2020-12";return e==="draft-4"&&(e="draft-04"),e==="draft-7"&&(e="draft-07"),{processors:r.processors??{},metadataRegistry:r?.metadata??gf,target:e,unrepresentable:r?.unrepresentable??"throw",override:r?.override??(()=>{}),io:r?.io??"output",counter:0,seen:new Map,cycles:r?.cycles??"ref",reused:r?.reused??"inline",external:r?.external??void 0}}function hr(r,e,t={path:[],schemaPath:[]}){var n;const a=r._zod.def,i=e.seen.get(r);if(i)return i.count++,t.schemaPath.includes(r)&&(i.cycle=t.path),i.schema;const o={schema:{},count:1,cycle:void 0,path:t.path};e.seen.set(r,o);const s=r._zod.toJSONSchema?.();if(s)o.schema=s;else{const f={...t,schemaPath:[...t.schemaPath,r],path:t.path};if(r._zod.processJSONSchema)r._zod.processJSONSchema(e,o.schema,f);else{const v=o.schema,h=e.processors[a.type];if(!h)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${a.type}`);h(r,e,v,f)}const c=r._zod.parent;c&&(o.ref||(o.ref=c),hr(c,e,f),e.seen.get(c).isParent=!0)}const l=e.metadataRegistry.get(r);return l&&Object.assign(o.schema,l),e.io==="input"&&Ir(r)&&(delete o.schema.examples,delete o.schema.default),e.io==="input"&&o.schema._prefault&&((n=o.schema).default??(n.default=o.schema._prefault)),delete o.schema._prefault,e.seen.get(r).schema}function GL(r,e){const t=r.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=new Map;for(const o of r.seen.entries()){const s=r.metadataRegistry.get(o[0])?.id;if(s){const l=n.get(s);if(l&&l!==o[0])throw new Error(`Duplicate schema id "${s}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);n.set(s,o[0])}}const a=o=>{const s=r.target==="draft-2020-12"?"$defs":"definitions";if(r.external){const c=r.external.registry.get(o[0])?.id,v=r.external.uri??(p=>p);if(c)return{ref:v(c)};const h=o[1].defId??o[1].schema.id??`schema${r.counter++}`;return o[1].defId=h,{defId:h,ref:`${v("__shared")}#/${s}/${h}`}}if(o[1]===t)return{ref:"#"};const u=`#/${s}/`,f=o[1].schema.id??`__schema${r.counter++}`;return{defId:f,ref:u+f}},i=o=>{if(o[1].schema.$ref)return;const s=o[1],{ref:l,defId:u}=a(o);s.def={...s.schema},u&&(s.defId=u);const f=s.schema;for(const c in f)delete f[c];f.$ref=l};if(r.cycles==="throw")for(const o of r.seen.entries()){const s=o[1];if(s.cycle)throw new Error(`Cycle detected: #/${s.cycle?.join("/")}/ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const o of r.seen.entries()){const s=o[1];if(e===o[0]){i(o);continue}if(r.external){const u=r.external.registry.get(o[0])?.id;if(e!==o[0]&&u){i(o);continue}}if(r.metadataRegistry.get(o[0])?.id){i(o);continue}if(s.cycle){i(o);continue}if(s.count>1&&r.reused==="ref"){i(o);continue}}}function FL(r,e){const t=r.seen.get(e);if(!t)throw new Error("Unprocessed schema. This is a bug in Zod.");const n=o=>{const s=r.seen.get(o);if(s.ref===null)return;const l=s.def??s.schema,u={...l},f=s.ref;if(s.ref=null,f){n(f);const v=r.seen.get(f),h=v.schema;if(h.$ref&&(r.target==="draft-07"||r.target==="draft-04"||r.target==="openapi-3.0")?(l.allOf=l.allOf??[],l.allOf.push(h)):Object.assign(l,h),Object.assign(l,u),o._zod.parent===f)for(const d in l)d==="$ref"||d==="allOf"||d in u||delete l[d];if(h.$ref&&v.def)for(const d in l)d==="$ref"||d==="allOf"||d in v.def&&JSON.stringify(l[d])===JSON.stringify(v.def[d])&&delete l[d]}const c=o._zod.parent;if(c&&c!==f){n(c);const v=r.seen.get(c);if(v?.schema.$ref&&(l.$ref=v.schema.$ref,v.def))for(const h in l)h==="$ref"||h==="allOf"||h in v.def&&JSON.stringify(l[h])===JSON.stringify(v.def[h])&&delete l[h]}r.override({zodSchema:o,jsonSchema:l,path:s.path??[]})};for(const o of[...r.seen.entries()].reverse())n(o[0]);const a={};if(r.target==="draft-2020-12"?a.$schema="https://json-schema.org/draft/2020-12/schema":r.target==="draft-07"?a.$schema="http://json-schema.org/draft-07/schema#":r.target==="draft-04"?a.$schema="http://json-schema.org/draft-04/schema#":r.target,r.external?.uri){const o=r.external.registry.get(e)?.id;if(!o)throw new Error("Schema is missing an `id` property");a.$id=r.external.uri(o)}Object.assign(a,t.def??t.schema);const i=r.external?.defs??{};for(const o of r.seen.entries()){const s=o[1];s.def&&s.defId&&(i[s.defId]=s.def)}r.external||Object.keys(i).length>0&&(r.target==="draft-2020-12"?a.$defs=i:a.definitions=i);try{const o=JSON.parse(JSON.stringify(a));return Object.defineProperty(o,"~standard",{value:{...e["~standard"],jsonSchema:{input:Uh(e,"input",r.processors),output:Uh(e,"output",r.processors)}},enumerable:!1,writable:!1}),o}catch{throw new Error("Error converting schema to JSON.")}}function Ir(r,e){const t=e??{seen:new Set};if(t.seen.has(r))return!1;t.seen.add(r);const n=r._zod.def;if(n.type==="transform")return!0;if(n.type==="array")return Ir(n.element,t);if(n.type==="set")return Ir(n.valueType,t);if(n.type==="lazy")return Ir(n.getter(),t);if(n.type==="promise"||n.type==="optional"||n.type==="nonoptional"||n.type==="nullable"||n.type==="readonly"||n.type==="default"||n.type==="prefault")return Ir(n.innerType,t);if(n.type==="intersection")return Ir(n.left,t)||Ir(n.right,t);if(n.type==="record"||n.type==="map")return Ir(n.keyType,t)||Ir(n.valueType,t);if(n.type==="pipe")return Ir(n.in,t)||Ir(n.out,t);if(n.type==="object"){for(const a in n.shape)if(Ir(n.shape[a],t))return!0;return!1}if(n.type==="union"){for(const a of n.options)if(Ir(a,t))return!0;return!1}if(n.type==="tuple"){for(const a of n.items)if(Ir(a,t))return!0;return!!(n.rest&&Ir(n.rest,t))}return!1}const jG=(r,e={})=>t=>{const n=VL({...t,processors:e});return hr(r,n),GL(n,r),FL(n,r)},Uh=(r,e,t={})=>n=>{const{libraryOptions:a,target:i}=n??{},o=VL({...a??{},target:i,io:e,processors:t});return hr(r,o),GL(o,r),FL(o,r)},KG={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},JG=(r,e,t,n)=>{const a=t;a.type="string";const{minimum:i,maximum:o,format:s,patterns:l,contentEncoding:u}=r._zod.bag;if(typeof i=="number"&&(a.minLength=i),typeof o=="number"&&(a.maxLength=o),s&&(a.format=KG[s]??s,a.format===""&&delete a.format,s==="time"&&delete a.format),u&&(a.contentEncoding=u),l&&l.size>0){const f=[...l];f.length===1?a.pattern=f[0].source:f.length>1&&(a.allOf=[...f.map(c=>({...e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0"?{type:"string"}:{},pattern:c.source}))])}},QG=(r,e,t,n)=>{const a=t,{minimum:i,maximum:o,format:s,multipleOf:l,exclusiveMaximum:u,exclusiveMinimum:f}=r._zod.bag;typeof s=="string"&&s.includes("int")?a.type="integer":a.type="number",typeof f=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(a.minimum=f,a.exclusiveMinimum=!0):a.exclusiveMinimum=f),typeof i=="number"&&(a.minimum=i,typeof f=="number"&&e.target!=="draft-04"&&(f>=i?delete a.minimum:delete a.exclusiveMinimum)),typeof u=="number"&&(e.target==="draft-04"||e.target==="openapi-3.0"?(a.maximum=u,a.exclusiveMaximum=!0):a.exclusiveMaximum=u),typeof o=="number"&&(a.maximum=o,typeof u=="number"&&e.target!=="draft-04"&&(u<=o?delete a.maximum:delete a.exclusiveMaximum)),typeof l=="number"&&(a.multipleOf=l)},eF=(r,e,t,n)=>{t.not={}},tF=(r,e,t,n)=>{},rF=(r,e,t,n)=>{const a=r._zod.def,i=_L(a.entries);i.every(o=>typeof o=="number")&&(t.type="number"),i.every(o=>typeof o=="string")&&(t.type="string"),t.enum=i},nF=(r,e,t,n)=>{if(e.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},aF=(r,e,t,n)=>{if(e.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},iF=(r,e,t,n)=>{const a=t,i=r._zod.def,{minimum:o,maximum:s}=r._zod.bag;typeof o=="number"&&(a.minItems=o),typeof s=="number"&&(a.maxItems=s),a.type="array",a.items=hr(i.element,e,{...n,path:[...n.path,"items"]})},oF=(r,e,t,n)=>{const a=t,i=r._zod.def;a.type="object",a.properties={};const o=i.shape;for(const u in o)a.properties[u]=hr(o[u],e,{...n,path:[...n.path,"properties",u]});const s=new Set(Object.keys(o)),l=new Set([...s].filter(u=>{const f=i.shape[u]._zod;return e.io==="input"?f.optin===void 0:f.optout===void 0}));l.size>0&&(a.required=Array.from(l)),i.catchall?._zod.def.type==="never"?a.additionalProperties=!1:i.catchall?i.catchall&&(a.additionalProperties=hr(i.catchall,e,{...n,path:[...n.path,"additionalProperties"]})):e.io==="output"&&(a.additionalProperties=!1)},sF=(r,e,t,n)=>{const a=r._zod.def,i=a.inclusive===!1,o=a.options.map((s,l)=>hr(s,e,{...n,path:[...n.path,i?"oneOf":"anyOf",l]}));i?t.oneOf=o:t.anyOf=o},lF=(r,e,t,n)=>{const a=r._zod.def,i=hr(a.left,e,{...n,path:[...n.path,"allOf",0]}),o=hr(a.right,e,{...n,path:[...n.path,"allOf",1]}),s=u=>"allOf"in u&&Object.keys(u).length===1,l=[...s(i)?i.allOf:[i],...s(o)?o.allOf:[o]];t.allOf=l},uF=(r,e,t,n)=>{const a=r._zod.def,i=hr(a.innerType,e,n),o=e.seen.get(r);e.target==="openapi-3.0"?(o.ref=a.innerType,t.nullable=!0):t.anyOf=[i,{type:"null"}]},fF=(r,e,t,n)=>{const a=r._zod.def;hr(a.innerType,e,n);const i=e.seen.get(r);i.ref=a.innerType},cF=(r,e,t,n)=>{const a=r._zod.def;hr(a.innerType,e,n);const i=e.seen.get(r);i.ref=a.innerType,t.default=JSON.parse(JSON.stringify(a.defaultValue))},vF=(r,e,t,n)=>{const a=r._zod.def;hr(a.innerType,e,n);const i=e.seen.get(r);i.ref=a.innerType,e.io==="input"&&(t._prefault=JSON.parse(JSON.stringify(a.defaultValue)))},hF=(r,e,t,n)=>{const a=r._zod.def;hr(a.innerType,e,n);const i=e.seen.get(r);i.ref=a.innerType;let o;try{o=a.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}t.default=o},pF=(r,e,t,n)=>{const a=r._zod.def,i=e.io==="input"?a.in._zod.def.type==="transform"?a.out:a.in:a.out;hr(i,e,n);const o=e.seen.get(r);o.ref=i},dF=(r,e,t,n)=>{const a=r._zod.def;hr(a.innerType,e,n);const i=e.seen.get(r);i.ref=a.innerType,t.readOnly=!0},HL=(r,e,t,n)=>{const a=r._zod.def;hr(a.innerType,e,n);const i=e.seen.get(r);i.ref=a.innerType},gF=Z("ZodISODateTime",(r,e)=>{T3.init(r,e),St.init(r,e)});function yF(r){return MG(gF,r)}const mF=Z("ZodISODate",(r,e)=>{C3.init(r,e),St.init(r,e)});function _F(r){return DG(mF,r)}const SF=Z("ZodISOTime",(r,e)=>{A3.init(r,e),St.init(r,e)});function bF(r){return IG(SF,r)}const xF=Z("ZodISODuration",(r,e)=>{M3.init(r,e),St.init(r,e)});function wF(r){return LG(xF,r)}const TF=(r,e)=>{TL.init(r,e),r.name="ZodError",Object.defineProperties(r,{format:{value:t=>y5(r,t)},flatten:{value:t=>g5(r,t)},addIssue:{value:t=>{r.issues.push(t),r.message=JSON.stringify(r.issues,Xm,2)}},addIssues:{value:t=>{r.issues.push(...t),r.message=JSON.stringify(r.issues,Xm,2)}},isEmpty:{get(){return r.issues.length===0}}})},Pn=Z("ZodError",TF,{Parent:Error}),CF=T1(Pn),AF=C1(Pn),MF=sd(Pn),DF=ld(Pn),IF=S5(Pn),LF=b5(Pn),PF=x5(Pn),kF=w5(Pn),EF=T5(Pn),RF=C5(Pn),OF=A5(Pn),NF=M5(Pn),$t=Z("ZodType",(r,e)=>(Wt.init(r,e),Object.assign(r["~standard"],{jsonSchema:{input:Uh(r,"input"),output:Uh(r,"output")}}),r.toJSONSchema=jG(r,{}),r.def=e,r.type=e.type,Object.defineProperty(r,"_def",{value:e}),r.check=(...t)=>r.clone(co(e,{checks:[...e.checks??[],...t.map(n=>typeof n=="function"?{_zod:{check:n,def:{check:"custom"},onattach:[]}}:n)]}),{parent:!0}),r.with=r.check,r.clone=(t,n)=>vo(r,t,n),r.brand=()=>r,r.register=((t,n)=>(t.add(r,n),r)),r.parse=(t,n)=>CF(r,t,n,{callee:r.parse}),r.safeParse=(t,n)=>MF(r,t,n),r.parseAsync=async(t,n)=>AF(r,t,n,{callee:r.parseAsync}),r.safeParseAsync=async(t,n)=>DF(r,t,n),r.spa=r.safeParseAsync,r.encode=(t,n)=>IF(r,t,n),r.decode=(t,n)=>LF(r,t,n),r.encodeAsync=async(t,n)=>PF(r,t,n),r.decodeAsync=async(t,n)=>kF(r,t,n),r.safeEncode=(t,n)=>EF(r,t,n),r.safeDecode=(t,n)=>RF(r,t,n),r.safeEncodeAsync=async(t,n)=>OF(r,t,n),r.safeDecodeAsync=async(t,n)=>NF(r,t,n),r.refine=(t,n)=>r.check(I4(t,n)),r.superRefine=t=>r.check(L4(t)),r.overwrite=t=>r.check(du(t)),r.optional=()=>Nx(r),r.exactOptional=()=>g4(r),r.nullable=()=>zx(r),r.nullish=()=>Nx(zx(r)),r.nonoptional=t=>x4(r,t),r.array=()=>o4(r),r.or=t=>f4([r,t]),r.and=t=>v4(r,t),r.transform=t=>Bx(r,p4(t)),r.default=t=>_4(r,t),r.prefault=t=>b4(r,t),r.catch=t=>T4(r,t),r.pipe=t=>Bx(r,t),r.readonly=()=>M4(r),r.describe=t=>{const n=r.clone();return gf.add(n,{description:t}),n},Object.defineProperty(r,"description",{get(){return gf.get(r)?.description},configurable:!0}),r.meta=(...t)=>{if(t.length===0)return gf.get(r);const n=r.clone();return gf.add(n,t[0]),n},r.isOptional=()=>r.safeParse(void 0).success,r.isNullable=()=>r.safeParse(null).success,r.apply=t=>t(r),r)),WL=Z("_ZodString",(r,e)=>{A1.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(n,a,i)=>JG(r,n,a);const t=r._zod.bag;r.format=t.format??null,r.minLength=t.minimum??null,r.maxLength=t.maximum??null,r.regex=(...n)=>r.check(OG(...n)),r.includes=(...n)=>r.check(BG(...n)),r.startsWith=(...n)=>r.check(VG(...n)),r.endsWith=(...n)=>r.check(GG(...n)),r.min=(...n)=>r.check(Zh(...n)),r.max=(...n)=>r.check(zL(...n)),r.length=(...n)=>r.check(BL(...n)),r.nonempty=(...n)=>r.check(Zh(1,...n)),r.lowercase=n=>r.check(NG(n)),r.uppercase=n=>r.check(zG(n)),r.trim=()=>r.check(HG()),r.normalize=(...n)=>r.check(FG(...n)),r.toLowerCase=()=>r.check(WG()),r.toUpperCase=()=>r.check($G()),r.slugify=()=>r.check(ZG())}),zF=Z("ZodString",(r,e)=>{A1.init(r,e),WL.init(r,e),r.email=t=>r.check(oG(BF,t)),r.url=t=>r.check(cG(VF,t)),r.jwt=t=>r.check(AG(e4,t)),r.emoji=t=>r.check(vG(GF,t)),r.guid=t=>r.check(Ix(Ex,t)),r.uuid=t=>r.check(sG(rv,t)),r.uuidv4=t=>r.check(lG(rv,t)),r.uuidv6=t=>r.check(uG(rv,t)),r.uuidv7=t=>r.check(fG(rv,t)),r.nanoid=t=>r.check(hG(FF,t)),r.guid=t=>r.check(Ix(Ex,t)),r.cuid=t=>r.check(pG(HF,t)),r.cuid2=t=>r.check(dG(WF,t)),r.ulid=t=>r.check(gG($F,t)),r.base64=t=>r.check(wG(KF,t)),r.base64url=t=>r.check(TG(JF,t)),r.xid=t=>r.check(yG(ZF,t)),r.ksuid=t=>r.check(mG(UF,t)),r.ipv4=t=>r.check(_G(YF,t)),r.ipv6=t=>r.check(SG(XF,t)),r.cidrv4=t=>r.check(bG(qF,t)),r.cidrv6=t=>r.check(xG(jF,t)),r.e164=t=>r.check(CG(QF,t)),r.datetime=t=>r.check(yF(t)),r.date=t=>r.check(_F(t)),r.time=t=>r.check(bF(t)),r.duration=t=>r.check(wF(t))});function En(r){return iG(zF,r)}const St=Z("ZodStringFormat",(r,e)=>{gt.init(r,e),WL.init(r,e)}),BF=Z("ZodEmail",(r,e)=>{d3.init(r,e),St.init(r,e)}),Ex=Z("ZodGUID",(r,e)=>{h3.init(r,e),St.init(r,e)}),rv=Z("ZodUUID",(r,e)=>{p3.init(r,e),St.init(r,e)}),VF=Z("ZodURL",(r,e)=>{g3.init(r,e),St.init(r,e)}),GF=Z("ZodEmoji",(r,e)=>{y3.init(r,e),St.init(r,e)}),FF=Z("ZodNanoID",(r,e)=>{m3.init(r,e),St.init(r,e)}),HF=Z("ZodCUID",(r,e)=>{_3.init(r,e),St.init(r,e)}),WF=Z("ZodCUID2",(r,e)=>{S3.init(r,e),St.init(r,e)}),$F=Z("ZodULID",(r,e)=>{b3.init(r,e),St.init(r,e)}),ZF=Z("ZodXID",(r,e)=>{x3.init(r,e),St.init(r,e)}),UF=Z("ZodKSUID",(r,e)=>{w3.init(r,e),St.init(r,e)}),YF=Z("ZodIPv4",(r,e)=>{D3.init(r,e),St.init(r,e)}),XF=Z("ZodIPv6",(r,e)=>{I3.init(r,e),St.init(r,e)}),qF=Z("ZodCIDRv4",(r,e)=>{L3.init(r,e),St.init(r,e)}),jF=Z("ZodCIDRv6",(r,e)=>{P3.init(r,e),St.init(r,e)}),KF=Z("ZodBase64",(r,e)=>{k3.init(r,e),St.init(r,e)}),JF=Z("ZodBase64URL",(r,e)=>{R3.init(r,e),St.init(r,e)}),QF=Z("ZodE164",(r,e)=>{O3.init(r,e),St.init(r,e)}),e4=Z("ZodJWT",(r,e)=>{z3.init(r,e),St.init(r,e)}),$L=Z("ZodNumber",(r,e)=>{EL.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(n,a,i)=>QG(r,n,a),r.gt=(n,a)=>r.check(Px(n,a)),r.gte=(n,a)=>r.check(rg(n,a)),r.min=(n,a)=>r.check(rg(n,a)),r.lt=(n,a)=>r.check(Lx(n,a)),r.lte=(n,a)=>r.check(tg(n,a)),r.max=(n,a)=>r.check(tg(n,a)),r.int=n=>r.check(Rx(n)),r.safe=n=>r.check(Rx(n)),r.positive=n=>r.check(Px(0,n)),r.nonnegative=n=>r.check(rg(0,n)),r.negative=n=>r.check(Lx(0,n)),r.nonpositive=n=>r.check(tg(0,n)),r.multipleOf=(n,a)=>r.check(kx(n,a)),r.step=(n,a)=>r.check(kx(n,a)),r.finite=()=>r;const t=r._zod.bag;r.minValue=Math.max(t.minimum??Number.NEGATIVE_INFINITY,t.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,r.maxValue=Math.min(t.maximum??Number.POSITIVE_INFINITY,t.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,r.isInt=(t.format??"").includes("int")||Number.isSafeInteger(t.multipleOf??.5),r.isFinite=!0,r.format=t.format??null}),t4=Z("ZodNumberFormat",(r,e)=>{B3.init(r,e),$L.init(r,e)});function Rx(r){return kG(t4,r)}const r4=Z("ZodUnknown",(r,e)=>{V3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>tF()});function Ox(){return EG(r4)}const n4=Z("ZodNever",(r,e)=>{G3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>eF(r,t,n)});function a4(r){return RG(n4,r)}const i4=Z("ZodArray",(r,e)=>{F3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>iF(r,t,n,a),r.element=e.element,r.min=(t,n)=>r.check(Zh(t,n)),r.nonempty=t=>r.check(Zh(1,t)),r.max=(t,n)=>r.check(zL(t,n)),r.length=(t,n)=>r.check(BL(t,n)),r.unwrap=()=>r.element});function o4(r,e){return UG(i4,r,e)}const s4=Z("ZodObject",(r,e)=>{W3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>oF(r,t,n,a),it(r,"shape",()=>e.shape),r.keyof=()=>ZL(Object.keys(r._zod.def.shape)),r.catchall=t=>r.clone({...r._zod.def,catchall:t}),r.passthrough=()=>r.clone({...r._zod.def,catchall:Ox()}),r.loose=()=>r.clone({...r._zod.def,catchall:Ox()}),r.strict=()=>r.clone({...r._zod.def,catchall:a4()}),r.strip=()=>r.clone({...r._zod.def,catchall:void 0}),r.extend=t=>c5(r,t),r.safeExtend=t=>v5(r,t),r.merge=t=>h5(r,t),r.pick=t=>u5(r,t),r.omit=t=>f5(r,t),r.partial=(...t)=>p5(UL,r,t[0]),r.required=(...t)=>d5(YL,r,t[0])});function l4(r,e){const t={type:"object",shape:r??{},...Te(e)};return new s4(t)}const u4=Z("ZodUnion",(r,e)=>{$3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>sF(r,t,n,a),r.options=e.options});function f4(r,e){return new u4({type:"union",options:r,...Te(e)})}const c4=Z("ZodIntersection",(r,e)=>{Z3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>lF(r,t,n,a)});function v4(r,e){return new c4({type:"intersection",left:r,right:e})}const jm=Z("ZodEnum",(r,e)=>{U3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(n,a,i)=>rF(r,n,a),r.enum=e.entries,r.options=Object.values(e.entries);const t=new Set(Object.keys(e.entries));r.extract=(n,a)=>{const i={};for(const o of n)if(t.has(o))i[o]=e.entries[o];else throw new Error(`Key ${o} not found in enum`);return new jm({...e,checks:[],...Te(a),entries:i})},r.exclude=(n,a)=>{const i={...e.entries};for(const o of n)if(t.has(o))delete i[o];else throw new Error(`Key ${o} not found in enum`);return new jm({...e,checks:[],...Te(a),entries:i})}});function ZL(r,e){const t=Array.isArray(r)?Object.fromEntries(r.map(n=>[n,n])):r;return new jm({type:"enum",entries:t,...Te(e)})}const h4=Z("ZodTransform",(r,e)=>{Y3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>aF(r,t),r._zod.parse=(t,n)=>{if(n.direction==="backward")throw new yL(r.constructor.name);t.addIssue=i=>{if(typeof i=="string")t.issues.push(qf(i,t.value,e));else{const o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=t.value),o.inst??(o.inst=r),t.issues.push(qf(o))}};const a=e.transform(t.value,t);return a instanceof Promise?a.then(i=>(t.value=i,t)):(t.value=a,t)}});function p4(r){return new h4({type:"transform",transform:r})}const UL=Z("ZodOptional",(r,e)=>{NL.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>HL(r,t,n,a),r.unwrap=()=>r._zod.def.innerType});function Nx(r){return new UL({type:"optional",innerType:r})}const d4=Z("ZodExactOptional",(r,e)=>{X3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>HL(r,t,n,a),r.unwrap=()=>r._zod.def.innerType});function g4(r){return new d4({type:"optional",innerType:r})}const y4=Z("ZodNullable",(r,e)=>{q3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>uF(r,t,n,a),r.unwrap=()=>r._zod.def.innerType});function zx(r){return new y4({type:"nullable",innerType:r})}const m4=Z("ZodDefault",(r,e)=>{j3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>cF(r,t,n,a),r.unwrap=()=>r._zod.def.innerType,r.removeDefault=r.unwrap});function _4(r,e){return new m4({type:"default",innerType:r,get defaultValue(){return typeof e=="function"?e():bL(e)}})}const S4=Z("ZodPrefault",(r,e)=>{K3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>vF(r,t,n,a),r.unwrap=()=>r._zod.def.innerType});function b4(r,e){return new S4({type:"prefault",innerType:r,get defaultValue(){return typeof e=="function"?e():bL(e)}})}const YL=Z("ZodNonOptional",(r,e)=>{J3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>fF(r,t,n,a),r.unwrap=()=>r._zod.def.innerType});function x4(r,e){return new YL({type:"nonoptional",innerType:r,...Te(e)})}const w4=Z("ZodCatch",(r,e)=>{Q3.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>hF(r,t,n,a),r.unwrap=()=>r._zod.def.innerType,r.removeCatch=r.unwrap});function T4(r,e){return new w4({type:"catch",innerType:r,catchValue:typeof e=="function"?e:()=>e})}const C4=Z("ZodPipe",(r,e)=>{eG.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>pF(r,t,n,a),r.in=e.in,r.out=e.out});function Bx(r,e){return new C4({type:"pipe",in:r,out:e})}const A4=Z("ZodReadonly",(r,e)=>{tG.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>dF(r,t,n,a),r.unwrap=()=>r._zod.def.innerType});function M4(r){return new A4({type:"readonly",innerType:r})}const D4=Z("ZodCustom",(r,e)=>{rG.init(r,e),$t.init(r,e),r._zod.processJSONSchema=(t,n,a)=>nF(r,t)});function I4(r,e={}){return YG(D4,r,e)}function L4(r){return XG(r)}function Ru(r){return PG($L,r)}const XL=l4({department:En().min(1,"Support Department is required"),leadName:En().min(1,"Support Lead Name is required"),managerSoeid:En().regex(/^(|[A-Z]{2}\d{5})$/,"SOEID must match XXNNNNN").default(""),managerName:En().default(""),teamSize:Ru().int().min(0).default(0),teamStructure:En().default(""),shiftCoverage:ZL(["24x7","follow-the-sun","business-hours","extended-hours","on-call",""]).default(""),totalApps:Ru().int().min(0).default(0),ecaCount:Ru().int().min(0).default(0),keyApps:En().default(""),sysIncidents:Ru().int().min(0).default(0),humIncidents:Ru().int().min(0).default(0),automationRates:En().default(""),appsOtr:En().default(""),mtpStatus:En().default(""),painPoints:En().default(""),managerPriorities:En().default("")}),Vx=["Support Lead 1","Support Lead 2","Support Lead 3","Support Lead 4","Support Lead 5","Support Lead 6","Support Lead 7"],Gx={};function _o(r){function e(){r.style.height="auto",r.style.height=r.scrollHeight+"px"}return e(),r.addEventListener("input",e),{destroy(){r.removeEventListener("input",e)}}}const Fx={department:"",leadName:"",managerSoeid:"",managerName:"",teamSize:"",teamStructure:"",shiftCoverage:"",totalApps:"",ecaCount:"",keyApps:"",sysIncidents:"",humIncidents:"",automationRates:"",appsOtr:"",mtpStatus:"",painPoints:"",managerPriorities:""},nv="prodSupportSurveyDraft";function P4(){let r={...Fx};if(typeof window<"u"){const a=localStorage.getItem(nv);if(a)try{const i=JSON.parse(a);r={...r,...i}}catch(i){console.error("Could not parse saved draft",i)}}const{subscribe:e,set:t,update:n}=qV(r);return{subscribe:e,set:a=>{typeof window<"u"&&localStorage.setItem(nv,JSON.stringify(a)),t(a)},update:a=>{n(i=>{const o=a(i);return typeof window<"u"&&localStorage.setItem(nv,JSON.stringify(o)),o})},clear:()=>{typeof window<"u"&&localStorage.removeItem(nv),t({...Fx})}}}const Ut=P4();var k4=ct('

'),E4=ct(''),R4=ct('
Why we need this

'),O4=ct('
How to answer

'),N4=ct('
Example

'),z4=ct('
'),B4=ct('
');function V4(r,e){let t=df(e,"question",8,""),n=df(e,"why",8,""),a=df(e,"how",8,""),i=df(e,"example",8,""),o=er(!1);var s=B4(),l=ne(s);{var u=p=>{var d=k4(),g=ne(d);Er(()=>ur(g,t())),tt(p,d)};Vt(l,p=>{t()&&p(u)})}var f=K(l,2);{var c=p=>{var d=E4();let g;var y=K(ne(d),2),m=ne(y);Er(()=>{g=Oi(d,1,"context-toggle svelte-1i9w3h7",null,g,{open:Y(o)}),YV(d,"aria-expanded",Y(o)),ur(m,Y(o)?"Hide context & examples":"Why we need this & How to answer")}),lr("click",d,()=>Fe(o,!Y(o))),tt(p,d)};Vt(f,p=>{(n()||a()||i())&&p(c)})}var v=K(f,2);{var h=p=>{var d=z4(),g=ne(d);{var y=w=>{var T=R4(),C=K(ne(T),2),A=ne(C);Er(()=>ur(A,n())),tt(w,T)};Vt(g,w=>{n()&&w(y)})}var m=K(g,2),_=ne(m);{var S=w=>{var T=O4(),C=K(ne(T),2),A=ne(C);Er(()=>ur(A,a())),tt(w,T)};Vt(_,w=>{a()&&w(S)})}var b=K(_,2);{var x=w=>{var T=N4(),C=K(ne(T),2),A=ne(C);Er(()=>ur(A,`"${i()??""}"`)),tt(w,T)};Vt(b,w=>{i()&&w(x)})}tt(p,d)};Vt(v,p=>{Y(o)&&p(h)})}tt(r,s)}var G4=ct('
'),F4=ct(' '),H4=ct(''),W4=ct(' '),$4=ct('

General Information

Required

Manager Lookup (Optional)

Format: XXNNNNN (2 letters + 5 numbers)

'),Z4=ct(`

1. Team & Organization Structure

How is your team structured - by application, technology stack, or geography?

What is your shift coverage model?

`),U4=ct(`

2. Applications & Portfolio

How many total production applications does your team support?

How many are Enterprise Critical Applications (ECAs)?

List your top 10-15 applications by Business criticality or incident volume.

`),Y4=ct('

3. Incidents, Automation, & OTR

Baseline for 40% reduction target

Baseline for 25% reduction target

% of daily checks, pre/post checks automated

Current count and success rate of apps on OTR

Total MTPs, MMTPs mapping

'),X4=ct(`

4. Strategic Alignment

What's causing the most toil?

What does your manager care about most?

`),q4=ct(`

5. Review & Submit

You have reached the end of the 2026 Production Support Strategy Survey!

Please ensure all required fields are filled out. When you are ready, click the button below to export your final dataset. This will run a final validation check against the data schema.

`),j4=ct(''),K4=ct(''),J4=ct("
"),Q4=ct('
Draft tools
');function eH(r,e){ed(e,!1);const t=()=>KV(Ut,"$surveyDraft",n),[n,a]=JV(),i=er();let o=er(1);const s=6,l=["General","Team","Apps","Incidents","Strategy","Review"];let u=er({}),f=er(""),c=er(!1),v=er(),h=er("idle"),p=er(!1);function d(ye,Ie){return`${ye||Ie}`.replace(/[^a-z0-9]/gi,"_").toLowerCase()}function g(ye){return`${ye||""}`.toUpperCase().replace(/[^A-Z0-9]/g,"").slice(0,7)}function y(ye){const Ie=g(ye.target.value),Ye=Gx[Ie]||"",ot=Ye&&Ye!==t().managerName;Ie.length===7?Fe(h,Ye?"found":"notFound"):Fe(h,"idle"),Ut.update(Ne=>({...Ne,managerSoeid:Ie,managerName:Ye})),ot&&(Fe(p,!0),setTimeout(()=>{Fe(p,!1)},500))}function m(ye){return typeof ye=="string"?ye:""}function _(ye){return ye===""||typeof ye=="number"||typeof ye=="string"?ye:""}function S(){Y(v)?.click()}function b(ye){const Ie=ye.target?.files?.[0];if(ye.target.value="",!Ie)return;const Ye=new FileReader;Ye.onload=ot=>{try{const Ne=JSON.parse(ot.target?.result??"null");if(!Ne||typeof Ne!="object"||Array.isArray(Ne))throw new Error("Draft JSON must be an object");const bt=m(Ne.leadName),ht=Vx.includes(bt)?bt:"",Dt=g(Ne.managerSoeid),Tr=Gx[Dt]||m(Ne.managerName);Ut.set({...t(),department:m(Ne.department),leadName:ht,managerSoeid:Dt,managerName:Tr,teamSize:_(Ne.teamSize),teamStructure:m(Ne.teamStructure),shiftCoverage:m(Ne.shiftCoverage),totalApps:_(Ne.totalApps),ecaCount:_(Ne.ecaCount),keyApps:m(Ne.keyApps),sysIncidents:_(Ne.sysIncidents),humIncidents:_(Ne.humIncidents),automationRates:m(Ne.automationRates),appsOtr:m(Ne.appsOtr),mtpStatus:m(Ne.mtpStatus),painPoints:m(Ne.painPoints),managerPriorities:m(Ne.managerPriorities)}),Fe(u,{}),Fe(o,1),x(`Draft imported from ${Ie.name}`)}catch(Ne){console.error("Could not import draft file",Ne),x(`Could not import draft from ${Ie.name}`,!0)}},Ye.readAsText(Ie)}function x(ye,Ie=!1){Fe(f,ye),Fe(c,Ie),setTimeout(()=>{Fe(f,"")},3e3)}function w(){Y(o)1&&(tx(o,-1),window.scrollTo({top:0,behavior:"smooth"}))}function C(){const ye=XL.safeParse(t());if(!ye.success){Fe(u,ye.error.flatten().fieldErrors),x("Validation failed. Please check required fields in general info.",!0);return}Fe(u,{});const Ie=ye.data,Ye=JSON.stringify(Ie,null,2),ot=d(Ie.department,"department"),Ne=d(Ie.leadName,"support_lead"),bt=new Date().toISOString().replace(/[:.]/g,"-"),ht=`strategy_survey_${Ne}_${ot}_${bt}.json`,Dt=new Blob([Ye],{type:"application/json"}),Tr=URL.createObjectURL(Dt),pt=document.createElement("a");pt.href=Tr,pt.download=ht,document.body.appendChild(pt),pt.click(),setTimeout(()=>{document.body.removeChild(pt),URL.revokeObjectURL(Tr)},0),Ut.clear(),Fe(o,1),x("JSON exported successfully! Draft cleared.")}function A(){const ye=JSON.stringify(t(),null,2),Ie=d(t().department,"draft"),Ye=d(t().leadName,"support_lead"),ot=new Date().toISOString().replace(/[:.]/g,"-"),Ne=`strategy_survey_${Ye}_${Ie}_${ot}_draft.json`,bt=new Blob([ye],{type:"application/json"}),ht=URL.createObjectURL(bt),Dt=document.createElement("a");Dt.href=ht,Dt.download=Ne,document.body.appendChild(Dt),Dt.click(),setTimeout(()=>{document.body.removeChild(Dt),URL.revokeObjectURL(ht)},0),x("Draft JSON exported! (Note: Not validated for required fields)")}eL(()=>Y(o),()=>{Fe(i,(Y(o)-1)/(s-1)*100)}),tL(),_1();var D=Q4(),L=ne(D),I=ne(L),P=ne(I),E=K(I,2),k=ne(E),O=K(E,2);Zm(O,5,()=>l,Wm,(ye,Ie,Ye)=>{var ot=G4();let Ne;var bt=ne(ot);bt.textContent=Ye+1;var ht=K(bt,2),Dt=ne(ht);Er(()=>{Ne=Oi(ot,1,"step-chip svelte-r9pnp8",null,Ne,{active:Y(o)===Ye+1,completed:Y(o)>Ye+1}),ur(Dt,Y(Ie))}),tt(ye,ot)});var R=K(L,2),z=ne(R);{var V=ye=>{var Ie=$4(),Ye=K(ne(Ie),2),ot=K(ne(Ye),2),Ne=K(ne(ot),2);let bt;var ht=K(Ne,2);{var Dt=mt=>{var Cr=F4(),_i=ne(Cr);Er(()=>ur(_i,(Y(u),De(()=>Y(u).department[0])))),tt(mt,Cr)};Vt(ht,mt=>{Y(u),De(()=>Y(u).department)&&mt(Dt)})}var Tr=K(ot,2),pt=K(ne(Tr),2);let Oa;var Na=ne(pt);Na.value=Na.__value="";var mi=K(Na);Zm(mi,1,()=>Vx,Wm,(mt,Cr)=>{var _i=H4(),pB=ne(_i),jb={};Er(()=>{ur(pB,Y(Cr)),jb!==(jb=Y(Cr))&&(_i.value=(_i.__value=Y(Cr))??"")}),tt(mt,_i)});var It=K(pt,2);{var qc=mt=>{var Cr=W4(),_i=ne(Cr);Er(()=>ur(_i,(Y(u),De(()=>Y(u).leadName[0])))),tt(mt,Cr)};Vt(It,mt=>{Y(u),De(()=>Y(u).leadName)&&mt(qc)})}var za=K(Ye,2),sB=K(ne(za),2),Yb=ne(sB),Xb=K(ne(Yb),2),lB=K(Yb,4),Kd=K(ne(lB),2);let qb;var uB=K(Kd,2),fB=ne(uB);{var cB=mt=>{var Cr=Jd("Filled automatically from SOEID.");tt(mt,Cr)},vB=mt=>{var Cr=Jd("No manager found for this SOEID.");tt(mt,Cr)},hB=mt=>{var Cr=Jd("Enter SOEID to auto-fill manager name.");tt(mt,Cr)};Vt(fB,mt=>{Y(h)==="found"?mt(cB):Y(h)==="notFound"?mt(vB,1):mt(hB,!1)})}Er(()=>{bt=Oi(Ne,1,"svelte-r9pnp8",null,bt,{error:Y(u).department}),Oa=Oi(pt,1,"svelte-r9pnp8",null,Oa,{error:Y(u).leadName}),vx(Xb,(t(),De(()=>t().managerSoeid))),vx(Kd,(t(),De(()=>t().managerName))),qb=Oi(Kd,1,"svelte-r9pnp8",null,qb,{"autofill-pulse":Y(p)})}),Xr(Ne,()=>t().department,mt=>(Mr(Ut,De(t).department=mt,De(t)),Ar(()=>{Y(u)}))),cx(pt,()=>t().leadName,mt=>(Mr(Ut,De(t).leadName=mt,De(t)),Ar(()=>{Y(u)}))),lr("input",Xb,y),tt(ye,Ie)};Vt(z,ye=>{Y(o)===1&&ye(V)})}var G=K(z,2);{var F=ye=>{var Ie=Z4(),Ye=K(ne(Ie),2),ot=K(ne(Ye),2);V4(ot,{question:"How many Production Support engineers/analysts are on your team?",why:"Understanding your team size is critical for setting realistic goals and calculating capacity. With the PM Strategy targeting aggressive automation (35%) and incident reduction (40%/25%), we need to know if you have 3 people or 30 people to determine what's achievable. A small team will need to focus on high-impact quick wins, while a larger team can run parallel workstreams.",how:'Provide the total headcount including full-time employees, contractors, and offshore resources. If you have sub-teams or squads, break it down (e.g., "15 total: 10 FTE, 5 contractors, split into 3 squads of 5").',example:"12 people total: 8 in BIC (London), 4 in LATMEX (Mexico City). Mix of 10 FTE and 2 contractors."});var Ne=K(ot,2),bt=K(Ye,2),ht=K(ne(bt),4);mo(ht,za=>_o?.(za)),ua(()=>Xr(ht,()=>t().teamStructure,za=>(Mr(Ut,De(t).teamStructure=za,De(t)),Ar(()=>{Y(u)}))));var Dt=K(bt,2),Tr=K(ne(Dt),4),pt=ne(Tr);pt.value=pt.__value="";var Oa=K(pt);Oa.value=Oa.__value="24x7";var Na=K(Oa);Na.value=Na.__value="follow-the-sun";var mi=K(Na);mi.value=mi.__value="business-hours";var It=K(mi);It.value=It.__value="extended-hours";var qc=K(It);qc.value=qc.__value="on-call",Xr(Ne,()=>t().teamSize,za=>(Mr(Ut,De(t).teamSize=za,De(t)),Ar(()=>{Y(u)}))),cx(Tr,()=>t().shiftCoverage,za=>(Mr(Ut,De(t).shiftCoverage=za,De(t)),Ar(()=>{Y(u)}))),tt(ye,Ie)};Vt(G,ye=>{Y(o)===2&&ye(F)})}var U=K(G,2);{var J=ye=>{var Ie=U4(),Ye=K(ne(Ie),2),ot=ne(Ye),Ne=K(ne(ot),4),bt=K(ot,2),ht=K(ne(bt),4),Dt=K(Ye,2),Tr=K(ne(Dt),4);mo(Tr,pt=>_o?.(pt)),ua(()=>Xr(Tr,()=>t().keyApps,pt=>(Mr(Ut,De(t).keyApps=pt,De(t)),Ar(()=>{Y(u)})))),Xr(Ne,()=>t().totalApps,pt=>(Mr(Ut,De(t).totalApps=pt,De(t)),Ar(()=>{Y(u)}))),Xr(ht,()=>t().ecaCount,pt=>(Mr(Ut,De(t).ecaCount=pt,De(t)),Ar(()=>{Y(u)}))),tt(ye,Ie)};Vt(U,ye=>{Y(o)===3&&ye(J)})}var he=K(U,2);{var Oe=ye=>{var Ie=Y4(),Ye=K(ne(Ie),2),ot=ne(Ye),Ne=K(ne(ot),4),bt=K(ot,2),ht=K(ne(bt),4),Dt=K(Ye,2),Tr=K(ne(Dt),4);mo(Tr,It=>_o?.(It)),ua(()=>Xr(Tr,()=>t().automationRates,It=>(Mr(Ut,De(t).automationRates=It,De(t)),Ar(()=>{Y(u)}))));var pt=K(Dt,2),Oa=K(ne(pt),4);mo(Oa,It=>_o?.(It)),ua(()=>Xr(Oa,()=>t().appsOtr,It=>(Mr(Ut,De(t).appsOtr=It,De(t)),Ar(()=>{Y(u)}))));var Na=K(pt,2),mi=K(ne(Na),4);mo(mi,It=>_o?.(It)),ua(()=>Xr(mi,()=>t().mtpStatus,It=>(Mr(Ut,De(t).mtpStatus=It,De(t)),Ar(()=>{Y(u)})))),Xr(Ne,()=>t().sysIncidents,It=>(Mr(Ut,De(t).sysIncidents=It,De(t)),Ar(()=>{Y(u)}))),Xr(ht,()=>t().humIncidents,It=>(Mr(Ut,De(t).humIncidents=It,De(t)),Ar(()=>{Y(u)}))),tt(ye,Ie)};Vt(he,ye=>{Y(o)===4&&ye(Oe)})}var We=K(he,2);{var pe=ye=>{var Ie=X4(),Ye=K(ne(Ie),2),ot=K(ne(Ye),4);mo(ot,ht=>_o?.(ht)),ua(()=>Xr(ot,()=>t().painPoints,ht=>(Mr(Ut,De(t).painPoints=ht,De(t)),Ar(()=>{Y(u)}))));var Ne=K(Ye,2),bt=K(ne(Ne),4);mo(bt,ht=>_o?.(ht)),ua(()=>Xr(bt,()=>t().managerPriorities,ht=>(Mr(Ut,De(t).managerPriorities=ht,De(t)),Ar(()=>{Y(u)})))),tt(ye,Ie)};Vt(We,ye=>{Y(o)===5&&ye(pe)})}var ae=K(We,2);{var _e=ye=>{var Ie=q4();tt(ye,Ie)};Vt(ae,ye=>{Y(o)===6&&ye(_e)})}var ee=K(ae,2),de=ne(ee),Ue=K(ne(de),2),Ee=K(Ue,2),Ge=K(Ee,2);Ef(Ge,ye=>Fe(v,ye),()=>Y(v));var qe=K(de,2),yt=ne(qe),wr=K(yt,2);{var dr=ye=>{var Ie=j4();lr("click",Ie,w),tt(ye,Ie)},Ra=ye=>{var Ie=K4();lr("click",Ie,C),tt(ye,Ie)};Vt(wr,ye=>{Y(o){var Ie=J4();let Ye;var ot=ne(Ie);Er(()=>{Ye=Oi(Ie,1,"toast show svelte-r9pnp8",null,Ye,{"error-toast":Y(c)}),ur(ot,Y(f))}),tt(ye,Ie)};Vt(yi,ye=>{Y(f)&&ye(ku)})}Er(()=>{HV(P,`width: ${Y(i)??""}%`),ur(k,`Step ${Y(o)??""} of 6 - ${Y(o),De(()=>l[Y(o)-1])??""}`),yt.disabled=Y(o)===1}),lr("click",Ue,A),lr("click",Ee,S),lr("change",Ge,b),lr("click",yt,T),lr("submit",R,Um(()=>{})),tt(r,D),td(),a()}var Km=function(r,e){return Km=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])},Km(r,e)};function N(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Km(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var tH=(function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r})(),rH=(function(){function r(){this.browser=new tH,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})(),Pe=new rH;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(Pe.wxa=!0,Pe.touchEventsSupported=!0):typeof document>"u"&&typeof self<"u"?Pe.worker=!0:!Pe.hasGlobalWindow||"Deno"in window||typeof navigator<"u"&&typeof navigator.userAgent=="string"&&navigator.userAgent.indexOf("Node.js")>-1?(Pe.node=!0,Pe.svgSupported=!0):nH(navigator.userAgent,Pe);function nH(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),a=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),i=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),a&&(t.ie=!0,t.version=a[1]),i&&(t.edge=!0,t.version=i[1],t.newEdge=+i[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect<"u",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11);var s=e.domSupported=typeof document<"u";if(s){var l=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in l||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in l)&&!("OTransition"in l),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}}var M1=12,qL="sans-serif",ai=M1+"px "+qL,aH=20,iH=100,oH="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function sH(r){var e={};if(typeof JSON>"u")return e;for(var t=0;t=0)s=o*t.length;else for(var l=0;l>1)%2;s.cssText=["position: absolute","visibility: hidden","padding: 0","margin: 0","border-width: 0","user-select: none","width:0","height:0",n[l]+":0",a[u]+":0",n[1-l]+":auto",a[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return e.clearMarkers=function(){M(t,function(f){f.parentNode&&f.parentNode.removeChild(f)})},t}function MH(r,e,t){for(var n=t?"invTrans":"trans",a=e[n],i=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var f=r[u].getBoundingClientRect(),c=2*u,v=f.left,h=f.top;o.push(v,h),l=l&&i&&v===i[c]&&h===i[c+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&a?a:(e.srcCoords=o,e[n]=t?Zx(s,o):Zx(o,s))}function rP(r){return r.nodeName.toUpperCase()==="CANVAS"}var DH=/([&<>"'])/g,IH={"&":"&","<":"<",">":">",'"':""","'":"'"};function Rr(r){return r==null?"":(r+"").replace(DH,function(e,t){return IH[t]})}var LH=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ag=[],PH=Pe.browser.firefox&&+Pe.browser.version.split(".")[0]<39;function a0(r,e,t,n){return t=t||{},n?Ux(r,e,t):PH&&e.layerX!=null&&e.layerX!==e.offsetX?(t.zrX=e.layerX,t.zrY=e.layerY):e.offsetX!=null?(t.zrX=e.offsetX,t.zrY=e.offsetY):Ux(r,e,t),t}function Ux(r,e,t){if(Pe.domSupported&&r.getBoundingClientRect){var n=e.clientX,a=e.clientY;if(rP(r)){var i=r.getBoundingClientRect();t.zrX=n-i.left,t.zrY=a-i.top;return}else if(n0(ag,r,n,a)){t.zrX=ag[0],t.zrY=ag[1];return}}t.zrX=t.zrY=0}function R1(r){return r||window.event}function hn(r,e,t){if(e=R1(e),e.zrX!=null)return e;var n=e.type,a=n&&n.indexOf("touch")>=0;if(a){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&a0(r,o,e,t)}else{a0(r,e,e,t);var i=kH(e);e.zrDelta=i?i/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&LH.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function kH(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var a=Math.abs(n!==0?n:t),i=n>0?-1:n<0?1:t>0?-1:1;return 3*a*i}function i0(r,e,t,n){r.addEventListener(e,t,n)}function EH(r,e,t,n){r.removeEventListener(e,t,n)}var ii=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function Yx(r){return r.which===2||r.which===3}var RH=(function(){function r(){this._track=[]}return r.prototype.recognize=function(e,t,n){return this._doTrack(e,t,n),this._recognize(e)},r.prototype.clear=function(){return this._track.length=0,this},r.prototype._doTrack=function(e,t,n){var a=e.touches;if(a){for(var i={points:[],touches:[],target:t,event:e},o=0,s=a.length;o1&&n&&n.length>1){var i=Xx(n)/Xx(a);!isFinite(i)&&(i=1),e.pinchScale=i;var o=OH(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function rr(){return[1,0,0,1,0,0]}function pd(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function dd(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4],r[5]=e[5],r}function Sa(r,e,t){var n=e[0]*t[0]+e[2]*t[1],a=e[1]*t[0]+e[3]*t[1],i=e[0]*t[2]+e[2]*t[3],o=e[1]*t[2]+e[3]*t[3],s=e[0]*t[4]+e[2]*t[5]+e[4],l=e[1]*t[4]+e[3]*t[5]+e[5];return r[0]=n,r[1]=a,r[2]=i,r[3]=o,r[4]=s,r[5]=l,r}function Aa(r,e,t){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r[4]=e[4]+t[0],r[5]=e[5]+t[1],r}function ho(r,e,t,n){n===void 0&&(n=[0,0]);var a=e[0],i=e[2],o=e[4],s=e[1],l=e[3],u=e[5],f=Math.sin(t),c=Math.cos(t);return r[0]=a*c+s*f,r[1]=-a*f+s*c,r[2]=i*c+l*f,r[3]=-i*f+c*l,r[4]=c*(o-n[0])+f*(u-n[1])+n[0],r[5]=c*(u-n[1])-f*(o-n[0])+n[1],r}function O1(r,e,t){var n=t[0],a=t[1];return r[0]=e[0]*n,r[1]=e[1]*a,r[2]=e[2]*n,r[3]=e[3]*a,r[4]=e[4]*n,r[5]=e[5]*a,r}function Yn(r,e){var t=e[0],n=e[2],a=e[4],i=e[1],o=e[3],s=e[5],l=t*o-i*n;return l?(l=1/l,r[0]=o*l,r[1]=-i*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*a)*l,r[5]=(i*a-t*s)*l,r):null}function NH(r){var e=rr();return dd(e,r),e}var ue=(function(){function r(e,t){this.x=e||0,this.y=t||0}return r.prototype.copy=function(e){return this.x=e.x,this.y=e.y,this},r.prototype.clone=function(){return new r(this.x,this.y)},r.prototype.set=function(e,t){return this.x=e,this.y=t,this},r.prototype.equal=function(e){return e.x===this.x&&e.y===this.y},r.prototype.add=function(e){return this.x+=e.x,this.y+=e.y,this},r.prototype.scale=function(e){this.x*=e,this.y*=e},r.prototype.scaleAndAdd=function(e,t){this.x+=e.x*t,this.y+=e.y*t},r.prototype.sub=function(e){return this.x-=e.x,this.y-=e.y,this},r.prototype.dot=function(e){return this.x*e.x+this.y*e.y},r.prototype.len=function(){return Math.sqrt(this.x*this.x+this.y*this.y)},r.prototype.lenSquare=function(){return this.x*this.x+this.y*this.y},r.prototype.normalize=function(){var e=this.len();return this.x/=e,this.y/=e,this},r.prototype.distance=function(e){var t=this.x-e.x,n=this.y-e.y;return Math.sqrt(t*t+n*n)},r.prototype.distanceSquare=function(e){var t=this.x-e.x,n=this.y-e.y;return t*t+n*n},r.prototype.negate=function(){return this.x=-this.x,this.y=-this.y,this},r.prototype.transform=function(e){if(e){var t=this.x,n=this.y;return this.x=e[0]*t+e[2]*n+e[4],this.y=e[1]*t+e[3]*n+e[5],this}},r.prototype.toArray=function(e){return e[0]=this.x,e[1]=this.y,e},r.prototype.fromArray=function(e){this.x=e[0],this.y=e[1]},r.set=function(e,t,n){e.x=t,e.y=n},r.copy=function(e,t){e.x=t.x,e.y=t.y},r.len=function(e){return Math.sqrt(e.x*e.x+e.y*e.y)},r.lenSquare=function(e){return e.x*e.x+e.y*e.y},r.dot=function(e,t){return e.x*t.x+e.y*t.y},r.add=function(e,t,n){e.x=t.x+n.x,e.y=t.y+n.y},r.sub=function(e,t,n){e.x=t.x-n.x,e.y=t.y-n.y},r.scale=function(e,t,n){e.x=t.x*n,e.y=t.y*n},r.scaleAndAdd=function(e,t,n,a){e.x=t.x+n.x*a,e.y=t.y+n.y*a},r.lerp=function(e,t,n,a){var i=1-a;e.x=i*t.x+a*n.x,e.y=i*t.y+a*n.y},r})(),os=Math.min,El=Math.max,o0=Math.abs,qx=["x","y"],zH=["width","height"],So=new ue,bo=new ue,xo=new ue,wo=new ue,Jr=nP(),yf=Jr.minTv,s0=Jr.maxTv,Of=[0,0],ve=(function(){function r(e,t,n,a){r.set(this,e,t,n,a)}return r.set=function(e,t,n,a,i){return a<0&&(t=t+a,a=-a),i<0&&(n=n+i,i=-i),e.x=t,e.y=n,e.width=a,e.height=i,e},r.prototype.union=function(e){var t=os(e.x,this.x),n=os(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=El(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=El(e.y+e.height,this.y+this.height)-n:this.height=e.height,this.x=t,this.y=n},r.prototype.applyTransform=function(e){r.applyTransform(this,this,e)},r.prototype.calculateTransform=function(e){var t=this,n=e.width/t.width,a=e.height/t.height,i=rr();return Aa(i,i,[-t.x,-t.y]),O1(i,i,[n,a]),Aa(i,i,[e.x,e.y]),i},r.prototype.intersect=function(e,t,n){return r.intersect(this,e,t,n)},r.intersect=function(e,t,n,a){n&&ue.set(n,0,0);var i=a&&a.outIntersectRect||null,o=a&&a.clamp;if(i&&(i.x=i.y=i.width=i.height=NaN),!e||!t)return!1;e instanceof r||(e=r.set(BH,e.x,e.y,e.width,e.height)),t instanceof r||(t=r.set(VH,t.x,t.y,t.width,t.height));var s=!!n;Jr.reset(a,s);var l=Jr.touchThreshold,u=e.x+l,f=e.x+e.width-l,c=e.y+l,v=e.y+e.height-l,h=t.x+l,p=t.x+t.width-l,d=t.y+l,g=t.y+t.height-l;if(u>f||c>v||h>p||d>g)return!1;var y=!(f=e.x&&t<=e.x+e.width&&n>=e.y&&n<=e.y+e.height},r.prototype.contain=function(e,t){return r.contain(this,e,t)},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){return e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height,e},r.applyTransform=function(e,t,n){if(!n){e!==t&&r.copy(e,t);return}if(n[1]<1e-5&&n[1]>-1e-5&&n[2]<1e-5&&n[2]>-1e-5){var a=n[0],i=n[3],o=n[4],s=n[5];e.x=t.x*a+o,e.y=t.y*i+s,e.width=t.width*a,e.height=t.height*i,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}So.x=xo.x=t.x,So.y=wo.y=t.y,bo.x=wo.x=t.x+t.width,bo.y=xo.y=t.y+t.height,So.transform(n),wo.transform(n),bo.transform(n),xo.transform(n),e.x=os(So.x,bo.x,xo.x,wo.x),e.y=os(So.y,bo.y,xo.y,wo.y);var l=El(So.x,bo.x,xo.x,wo.x),u=El(So.y,bo.y,xo.y,wo.y);e.width=l-e.x,e.height=u-e.y},r})(),BH=new ve(0,0,0,0),VH=new ve(0,0,0,0);function jx(r,e,t,n,a,i,o,s){var l=o0(e-t),u=o0(n-r),f=os(l,u),c=qx[a],v=qx[1-a],h=zH[a];e=u||!Jr.bidirectional)&&(yf[c]=-u,yf[v]=0,Jr.useDir&&Jr.calcDirMTV())))}function nP(){var r=0,e=new ue,t=new ue,n={minTv:new ue,maxTv:new ue,useDir:!1,dirMinTv:new ue,touchThreshold:0,bidirectional:!0,negativeSize:!1,reset:function(i,o){n.touchThreshold=0,i&&i.touchThreshold!=null&&(n.touchThreshold=El(0,i.touchThreshold)),n.negativeSize=!1,o&&(n.minTv.set(1/0,1/0),n.maxTv.set(0,0),n.useDir=!1,i&&i.direction!=null&&(n.useDir=!0,n.dirMinTv.copy(n.minTv),t.copy(n.minTv),r=i.direction,n.bidirectional=i.bidirectional==null||!!i.bidirectional,n.bidirectional||e.set(Math.cos(r),Math.sin(r))))},calcDirMTV:function(){var i=n.minTv,o=n.dirMinTv,s=i.y*i.y+i.x*i.x,l=Math.sin(r),u=Math.cos(r),f=l*i.y+u*i.x;if(a(f)){a(i.x)&&a(i.y)&&o.set(0,0);return}if(t.x=s*u/f,t.y=s*l/f,a(t.x)&&a(t.y)){o.set(0,0);return}(n.bidirectional||e.dot(t)>0)&&t.len()=0;c--){var v=i[c];v!==a&&!v.ignore&&!v.ignoreCoarsePointer&&(!v.parent||!v.parent.ignoreCoarsePointer)&&(og.copy(v.getBoundingRect()),v.transform&&og.applyTransform(v.transform),og.intersect(f)&&s.push(v))}if(s.length)for(var h=4,p=Math.PI/12,d=Math.PI*2,g=0;g4)return;this._downPoint=null}this.dispatchToElement(i,r,e)}});function $H(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,a=void 0,i=!1;n;){if(n.ignoreClip&&(i=!0),!i){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(a=!0);var s=n.__hostTarget;n=s?n.ignoreHostSilent?null:s:n.parent}return a?aP:!0}return!1}function Kx(r,e,t,n,a){for(var i=r.length-1;i>=0;i--){var o=r[i],s=void 0;if(o!==a&&!o.ignore&&(s=$H(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==aP)){e.target=o;break}}}function oP(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var sP=32,Nu=7;function ZH(r){for(var e=0;r>=sP;)e|=r&1,r>>=1;return r+e}function Jx(r,e,t,n){var a=e+1;if(a===t)return 1;if(n(r[a++],r[e])<0){for(;a=0;)a++;return a-e}function UH(r,e,t){for(t--;e>>1,a(i,r[l])<0?s=l:o=l+1;var u=n-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 sg(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])>0){for(s=n-a;l0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}else{for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}for(o++;o>>1);i(r,e[t+f])>0?o=f+1:l=f}return l}function lg(r,e,t,n,a,i){var o=0,s=0,l=1;if(i(r,e[t+a])<0){for(s=a+1;ls&&(l=s);var u=o;o=a-l,l=a-u}else{for(s=n-a;l=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=a,l+=a}for(o++;o>>1);i(r,e[t+f])<0?l=f:o=f+1}return l}function YH(r,e){var t=Nu,n,a,i=0,o=[];n=[],a=[];function s(h,p){n[i]=h,a[i]=p,i+=1}function l(){for(;i>1;){var h=i-2;if(h>=1&&a[h-1]<=a[h]+a[h+1]||h>=2&&a[h-2]<=a[h]+a[h-1])a[h-1]a[h+1])break;f(h)}}function u(){for(;i>1;){var h=i-2;h>0&&a[h-1]=Nu||w>=Nu);if(T)break;b<0&&(b=0),b+=2}if(t=b,t<1&&(t=1),p===1){for(y=0;y=0;y--)r[x+y]=r[b+y];r[S]=o[_];return}for(var w=t;;){var T=0,C=0,A=!1;do if(e(o[_],r[m])<0){if(r[S--]=r[m--],T++,C=0,--p===0){A=!0;break}}else if(r[S--]=o[_--],C++,T=0,--g===1){A=!0;break}while((T|C)=0;y--)r[x+y]=r[b+y];if(p===0){A=!0;break}}if(r[S--]=o[_--],--g===1){A=!0;break}if(C=g-sg(r[m],o,0,g,g-1,e),C!==0){for(S-=C,_-=C,g-=C,x=S+1,b=_+1,y=0;y=Nu||C>=Nu);if(A)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),g===1){for(S-=p,m-=p,x=S+1,b=m+1,y=p-1;y>=0;y--)r[x+y]=r[b+y];r[S]=o[_]}else{if(g===0)throw new Error;for(b=S-(g-1),y=0;ys&&(l=s),Qx(r,t,t+l,t+i,e),i=l}o.pushRun(t,i),o.mergeRuns(),a-=i,t+=i}while(a!==0);o.forceMergeRuns()}}var Qr=1,mf=2,Ml=4,ew=!1;function ug(){ew||(ew=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function tw(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var XH=(function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=tw}return r.prototype.traverse=function(e,t){for(var n=0;n=0&&this._roots.splice(a,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})(),qh;qh=Pe.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};var Nf={linear:function(r){return r},quadraticIn:function(r){return r*r},quadraticOut:function(r){return r*(2-r)},quadraticInOut:function(r){return(r*=2)<1?.5*r*r:-.5*(--r*(r-2)-1)},cubicIn:function(r){return r*r*r},cubicOut:function(r){return--r*r*r+1},cubicInOut:function(r){return(r*=2)<1?.5*r*r*r:.5*((r-=2)*r*r+2)},quarticIn:function(r){return r*r*r*r},quarticOut:function(r){return 1- --r*r*r*r},quarticInOut:function(r){return(r*=2)<1?.5*r*r*r*r:-.5*((r-=2)*r*r*r-2)},quinticIn:function(r){return r*r*r*r*r},quinticOut:function(r){return--r*r*r*r*r+1},quinticInOut:function(r){return(r*=2)<1?.5*r*r*r*r*r:.5*((r-=2)*r*r*r*r+2)},sinusoidalIn:function(r){return 1-Math.cos(r*Math.PI/2)},sinusoidalOut:function(r){return Math.sin(r*Math.PI/2)},sinusoidalInOut:function(r){return .5*(1-Math.cos(Math.PI*r))},exponentialIn:function(r){return r===0?0:Math.pow(1024,r-1)},exponentialOut:function(r){return r===1?1:1-Math.pow(2,-10*r)},exponentialInOut:function(r){return r===0?0:r===1?1:(r*=2)<1?.5*Math.pow(1024,r-1):.5*(-Math.pow(2,-10*(r-1))+2)},circularIn:function(r){return 1-Math.sqrt(1-r*r)},circularOut:function(r){return Math.sqrt(1- --r*r)},circularInOut:function(r){return(r*=2)<1?-.5*(Math.sqrt(1-r*r)-1):.5*(Math.sqrt(1-(r-=2)*r)+1)},elasticIn:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),-(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)))},elasticOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),t*Math.pow(2,-10*r)*Math.sin((r-e)*(2*Math.PI)/n)+1)},elasticInOut:function(r){var e,t=.1,n=.4;return r===0?0:r===1?1:(!t||t<1?(t=1,e=n/4):e=n*Math.asin(1/t)/(2*Math.PI),(r*=2)<1?-.5*(t*Math.pow(2,10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)):t*Math.pow(2,-10*(r-=1))*Math.sin((r-e)*(2*Math.PI)/n)*.5+1)},backIn:function(r){var e=1.70158;return r*r*((e+1)*r-e)},backOut:function(r){var e=1.70158;return--r*r*((e+1)*r+e)+1},backInOut:function(r){var e=2.5949095;return(r*=2)<1?.5*(r*r*((e+1)*r-e)):.5*((r-=2)*r*((e+1)*r+e)+2)},bounceIn:function(r){return 1-Nf.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?Nf.bounceIn(r*2)*.5:Nf.bounceOut(r*2-1)*.5+.5}},iv=Math.pow,ji=Math.sqrt,jh=1e-8,lP=1e-4,rw=ji(3),ov=1/3,ca=Ws(),mn=Ws(),Hl=Ws();function Gi(r){return r>-jh&&rjh||r<-jh}function Yt(r,e,t,n,a){var i=1-a;return i*i*(i*r+3*a*e)+a*a*(a*n+3*i*t)}function nw(r,e,t,n,a){var i=1-a;return 3*(((e-r)*i+2*(t-e)*a)*i+(n-t)*a*a)}function Kh(r,e,t,n,a,i){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-a,f=s*s-3*o*l,c=s*l-9*o*u,v=l*l-3*s*u,h=0;if(Gi(f)&&Gi(c))if(Gi(s))i[0]=0;else{var p=-l/s;p>=0&&p<=1&&(i[h++]=p)}else{var d=c*c-4*f*v;if(Gi(d)){var g=c/f,p=-s/o+g,y=-g/2;p>=0&&p<=1&&(i[h++]=p),y>=0&&y<=1&&(i[h++]=y)}else if(d>0){var m=ji(d),_=f*s+1.5*o*(-c+m),S=f*s+1.5*o*(-c-m);_<0?_=-iv(-_,ov):_=iv(_,ov),S<0?S=-iv(-S,ov):S=iv(S,ov);var p=(-s-(_+S))/(3*o);p>=0&&p<=1&&(i[h++]=p)}else{var b=(2*f*s-3*o*c)/(2*ji(f*f*f)),x=Math.acos(b)/3,w=ji(f),T=Math.cos(x),p=(-s-2*w*T)/(3*o),y=(-s+w*(T+rw*Math.sin(x)))/(3*o),C=(-s+w*(T-rw*Math.sin(x)))/(3*o);p>=0&&p<=1&&(i[h++]=p),y>=0&&y<=1&&(i[h++]=y),C>=0&&C<=1&&(i[h++]=C)}}return h}function fP(r,e,t,n,a){var i=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(Gi(o)){if(uP(i)){var u=-s/i;u>=0&&u<=1&&(a[l++]=u)}}else{var f=i*i-4*o*s;if(Gi(f))a[0]=-i/(2*o);else if(f>0){var c=ji(f),u=(-i+c)/(2*o),v=(-i-c)/(2*o);u>=0&&u<=1&&(a[l++]=u),v>=0&&v<=1&&(a[l++]=v)}}return l}function ao(r,e,t,n,a,i){var o=(e-r)*a+r,s=(t-e)*a+e,l=(n-t)*a+t,u=(s-o)*a+o,f=(l-s)*a+s,c=(f-u)*a+u;i[0]=r,i[1]=o,i[2]=u,i[3]=c,i[4]=c,i[5]=f,i[6]=l,i[7]=n}function cP(r,e,t,n,a,i,o,s,l,u,f){var c,v=.005,h=1/0,p,d,g,y;ca[0]=l,ca[1]=u;for(var m=0;m<1;m+=.05)mn[0]=Yt(r,t,a,o,m),mn[1]=Yt(e,n,i,s,m),g=ds(ca,mn),g=0&&g=0&&u<=1&&(a[l++]=u)}}else{var f=o*o-4*i*s;if(Gi(f)){var u=-o/(2*i);u>=0&&u<=1&&(a[l++]=u)}else if(f>0){var c=ji(f),u=(-o+c)/(2*i),v=(-o-c)/(2*i);u>=0&&u<=1&&(a[l++]=u),v>=0&&v<=1&&(a[l++]=v)}}return l}function vP(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Kf(r,e,t,n,a){var i=(e-r)*n+r,o=(t-e)*n+e,s=(o-i)*n+i;a[0]=r,a[1]=i,a[2]=s,a[3]=s,a[4]=o,a[5]=t}function hP(r,e,t,n,a,i,o,s,l){var u,f=.005,c=1/0;ca[0]=o,ca[1]=s;for(var v=0;v<1;v+=.05){mn[0]=tr(r,t,a,v),mn[1]=tr(e,n,i,v);var h=ds(ca,mn);h=0&&h=1?1:Kh(0,n,i,1,l,s)&&Yt(0,a,o,1,s[0])}}}var QH=(function(){function r(e){this._inited=!1,this._startTime=0,this._pausedTime=0,this._paused=!1,this._life=e.life||1e3,this._delay=e.delay||0,this.loop=e.loop||!1,this.onframe=e.onframe||At,this.ondestroy=e.ondestroy||At,this.onrestart=e.onrestart||At,e.easing&&this.setEasing(e.easing)}return r.prototype.step=function(e,t){if(this._inited||(this._startTime=e+this._delay,this._inited=!0),this._paused){this._pausedTime+=t;return}var n=this._life,a=e-this._startTime-this._pausedTime,i=a/n;i<0&&(i=0),i=Math.min(i,1);var o=this.easingFunc,s=o?o(i):i;if(this.onframe(s),i===1)if(this.loop){var l=a%n;this._startTime=e-l,this._pausedTime=0,this.onrestart()}else return!0;return!1},r.prototype.pause=function(){this._paused=!0},r.prototype.resume=function(){this._paused=!1},r.prototype.setEasing=function(e){this.easing=e,this.easingFunc=ie(e)?e:Nf[e]||N1(e)},r})(),pP=(function(){function r(e){this.value=e}return r})(),eW=(function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new pP(e);return this.insertEntry(t),t},r.prototype.insertEntry=function(e){this.head?(this.tail.next=e,e.prev=this.tail,e.next=null,this.tail=e):this.head=this.tail=e,this._len++},r.prototype.remove=function(e){var t=e.prev,n=e.next;t?t.next=n:this.head=n,n?n.prev=t:this.tail=t,e.next=e.prev=null,this._len--},r.prototype.len=function(){return this._len},r.prototype.clear=function(){this.head=this.tail=null,this._len=0},r})(),Kl=(function(){function r(e){this._list=new eW,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,a=this._map,i=null;if(a[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete a[l.key],i=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new pP(t),s.key=e,n.insertEntry(s),a[e]=s}return i},r.prototype.get=function(e){var t=this._map[e],n=this._list;if(t!=null)return t!==n.tail&&(n.remove(t),n.insertEntry(t)),t.value},r.prototype.clear=function(){this._list.clear(),this._map={}},r.prototype.len=function(){return this._list.len()},r})(),aw={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 Wn(r){return r=Math.round(r),r<0?0:r>255?255:r}function tW(r){return r=Math.round(r),r<0?0:r>360?360:r}function Jf(r){return r<0?0:r>1?1:r}function fg(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Wn(parseFloat(e)/100*255):Wn(parseInt(e,10))}function Ki(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?Jf(parseFloat(e)/100):Jf(parseFloat(e))}function cg(r,e,t){return t<0?t+=1:t>1&&(t-=1),t*6<1?r+(e-r)*t*6:t*2<1?e:t*3<2?r+(e-r)*(2/3-t)*6:r}function Fi(r,e,t){return r+(e-r)*t}function cn(r,e,t,n,a){return r[0]=e,r[1]=t,r[2]=n,r[3]=a,r}function u0(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var dP=new Kl(20),sv=null;function tl(r,e){sv&&u0(sv,e),sv=dP.put(r,sv||e.slice())}function Zr(r,e){if(r){e=e||[];var t=dP.get(r);if(t)return u0(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in aw)return u0(e,aw[n]),tl(r,e),e;var a=n.length;if(n.charAt(0)==="#"){if(a===4||a===5){var i=parseInt(n.slice(1,4),16);if(!(i>=0&&i<=4095)){cn(e,0,0,0,1);return}return cn(e,(i&3840)>>4|(i&3840)>>8,i&240|(i&240)>>4,i&15|(i&15)<<4,a===5?parseInt(n.slice(4),16)/15:1),tl(r,e),e}else if(a===7||a===9){var i=parseInt(n.slice(1,7),16);if(!(i>=0&&i<=16777215)){cn(e,0,0,0,1);return}return cn(e,(i&16711680)>>16,(i&65280)>>8,i&255,a===9?parseInt(n.slice(7),16)/255:1),tl(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===a){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),f=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?cn(e,+u[0],+u[1],+u[2],1):cn(e,0,0,0,1);f=Ki(u.pop());case"rgb":if(u.length>=3)return cn(e,fg(u[0]),fg(u[1]),fg(u[2]),u.length===3?f:Ki(u[3])),tl(r,e),e;cn(e,0,0,0,1);return;case"hsla":if(u.length!==4){cn(e,0,0,0,1);return}return u[3]=Ki(u[3]),f0(u,e),tl(r,e),e;case"hsl":if(u.length!==3){cn(e,0,0,0,1);return}return f0(u,e),tl(r,e),e;default:return}}cn(e,0,0,0,1)}}function f0(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Ki(r[1]),a=Ki(r[2]),i=a<=.5?a*(n+1):a+n-a*n,o=a*2-i;return e=e||[],cn(e,Wn(cg(o,i,t+1/3)*255),Wn(cg(o,i,t)*255),Wn(cg(o,i,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function rW(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,a=Math.min(e,t,n),i=Math.max(e,t,n),o=i-a,s=(i+a)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(i+a):u=o/(2-i-a);var f=((i-e)/6+o/2)/o,c=((i-t)/6+o/2)/o,v=((i-n)/6+o/2)/o;e===i?l=v-c:t===i?l=1/3+f-v:n===i&&(l=2/3+c-f),l<0&&(l+=1),l>1&&(l-=1)}var h=[l*360,u,s];return r[3]!=null&&h.push(r[3]),h}}function c0(r,e){var t=Zr(r);if(t){for(var n=0;n<3;n++)e<0?t[n]=t[n]*(1-e)|0:t[n]=(255-t[n])*e+t[n]|0,t[n]>255?t[n]=255:t[n]<0&&(t[n]=0);return ba(t,t.length===4?"rgba":"rgb")}}function vg(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=e[a],s=e[i],l=n-a;return t[0]=Wn(Fi(o[0],s[0],l)),t[1]=Wn(Fi(o[1],s[1],l)),t[2]=Wn(Fi(o[2],s[2],l)),t[3]=Jf(Fi(o[3],s[3],l)),t}}function nW(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),a=Math.floor(n),i=Math.ceil(n),o=Zr(e[a]),s=Zr(e[i]),l=n-a,u=ba([Wn(Fi(o[0],s[0],l)),Wn(Fi(o[1],s[1],l)),Wn(Fi(o[2],s[2],l)),Jf(Fi(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:a,rightIndex:i,value:n}:u}}function Ji(r,e,t,n){var a=Zr(r);if(r)return a=rW(a),e!=null&&(a[0]=tW(ie(e)?e(a[0]):e)),t!=null&&(a[1]=Ki(ie(t)?t(a[1]):t)),n!=null&&(a[2]=Ki(ie(n)?n(a[2]):n)),ba(f0(a),"rgba")}function Jh(r,e){var t=Zr(r);if(t&&e!=null)return t[3]=Jf(e),ba(t,"rgba")}function ba(r,e){if(!(!r||!r.length)){var t=r[0]+","+r[1]+","+r[2];return(e==="rgba"||e==="hsva"||e==="hsla")&&(t+=","+r[3]),e+"("+t+")"}}function Qh(r,e){var t=Zr(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var iw=new Kl(100);function v0(r){if(q(r)){var e=iw.get(r);return e||(e=c0(r,-.1),iw.put(r,e)),e}else if(cd(r)){var t=H({},r);return t.colorStops=$(r.colorStops,function(n){return{offset:n.offset,color:c0(n.color,-.1)}}),t}return r}var ep=Math.round;function Qf(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=Zr(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e??1}}var ow=1e-4;function Hi(r){return r-ow}function lv(r){return ep(r*1e3)/1e3}function h0(r){return ep(r*1e4)/1e4}function aW(r){return"matrix("+lv(r[0])+","+lv(r[1])+","+lv(r[2])+","+lv(r[3])+","+h0(r[4])+","+h0(r[5])+")"}var iW={left:"start",right:"end",center:"middle",middle:"middle"};function oW(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function sW(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function lW(r){var e=r.style,t=r.getGlobalScale();return[e.shadowColor,(e.shadowBlur||0).toFixed(2),(e.shadowOffsetX||0).toFixed(2),(e.shadowOffsetY||0).toFixed(2),t[0],t[1]].join(",")}function gP(r){return r&&!!r.image}function uW(r){return r&&!!r.svgElement}function z1(r){return gP(r)||uW(r)}function yP(r){return r.type==="linear"}function mP(r){return r.type==="radial"}function _P(r){return r&&(r.type==="linear"||r.type==="radial")}function gd(r){return"url(#"+r+")"}function SP(r){var e=r.getGlobalScale(),t=Math.max(e[0],e[1]);return Math.max(Math.ceil(Math.log(t)/Math.log(10)),1)}function bP(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*_h,a=re(r.scaleX,1),i=re(r.scaleY,1),o=r.skewX||0,s=r.skewY||0,l=[];return(e||t)&&l.push("translate("+e+"px,"+t+"px)"),n&&l.push("rotate("+n+")"),(a!==1||i!==1)&&l.push("scale("+a+","+i+")"),(o||s)&&l.push("skew("+ep(o*_h)+"deg, "+ep(s*_h)+"deg)"),l.join(" ")}var fW=(function(){return Pe.hasGlobalWindow&&ie(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}})(),p0=Array.prototype.slice;function $a(r,e,t){return(e-r)*t+r}function hg(r,e,t,n){for(var a=e.length,i=0;in?e:r,i=Math.min(t,n),o=a[i-1]||{color:[0,0,0,0],offset:0},s=i;so;if(s)n.length=o;else for(var l=i;l=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var a=this.keyframes,i=a.length,o=!1,s=lw,l=t;if(_r(t)){var u=pW(t);s=u,(u===1&&!ze(t[0])||u===2&&!ze(t[0][0]))&&(o=!0)}else if(ze(t)&&!mr(t))s=fv;else if(q(t))if(!isNaN(+t))s=fv;else{var f=Zr(t);f&&(l=f,s=_f)}else if(cd(t)){var c=H({},l);c.colorStops=$(t.colorStops,function(h){return{offset:h.offset,color:Zr(h.color)}}),yP(t)?s=d0:mP(t)&&(s=g0),l=c}i===0?this.valType=s:(s!==this.valType||s===lw)&&(o=!0),this.discrete=this.discrete||o;var v={time:e,value:l,rawValue:t,percent:0};return n&&(v.easing=n,v.easingFunc=ie(n)?n:Nf[n]||N1(n)),a.push(v),v},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(d,g){return d.time-g.time});for(var a=this.valType,i=n.length,o=n[i-1],s=this.discrete,l=cv(a),u=uw(a),f=0;f=0&&!(o[f].percent<=t);f--);f=v(f,s-2)}else{for(f=c;ft);f++);f=v(f-1,s-2)}p=o[f+1],h=o[f]}if(h&&p){this._lastFr=f,this._lastFrP=t;var g=p.percent-h.percent,y=g===0?1:v((t-h.percent)/g,1);p.easingFunc&&(y=p.easingFunc(y));var m=n?this._additiveValue:u?zu:e[l];if((cv(i)||u)&&!m&&(m=this._additiveValue=[]),this.discrete)e[l]=y<1?h.rawValue:p.rawValue;else if(cv(i))i===Th?hg(m,h[a],p[a],y):cW(m,h[a],p[a],y);else if(uw(i)){var _=h[a],S=p[a],b=i===d0;e[l]={type:b?"linear":"radial",x:$a(_.x,S.x,y),y:$a(_.y,S.y,y),colorStops:$(_.colorStops,function(w,T){var C=S.colorStops[T];return{offset:$a(w.offset,C.offset,y),color:wh(hg([],w.color,C.color,y))}}),global:S.global},b?(e[l].x2=$a(_.x2,S.x2,y),e[l].y2=$a(_.y2,S.y2,y)):e[l].r=$a(_.r,S.r,y)}else if(u)hg(m,h[a],p[a],y),n||(e[l]=wh(m));else{var x=$a(h[a],p[a],y);n?this._additiveValue=x:e[l]=x}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,a=this._additiveValue;t===fv?e[n]=e[n]+a:t===_f?(Zr(e[n],zu),uv(zu,zu,a,1),e[n]=wh(zu)):t===Th?uv(e[n],e[n],a,1):t===xP&&sw(e[n],e[n],a,1)},r})(),B1=(function(){function r(e,t,n,a){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&a){L1("Can' use additive animation on looped animation.");return}this._additiveAnimators=a,this._allowDiscrete=n}return r.prototype.getMaxTime=function(){return this._maxTime},r.prototype.getDelay=function(){return this._delay},r.prototype.getLoop=function(){return this._loop},r.prototype.getTarget=function(){return this._target},r.prototype.changeTarget=function(e){this._target=e},r.prototype.when=function(e,t,n){return this.whenWithKeys(e,t,Re(t),n)},r.prototype.whenWithKeys=function(e,t,n,a){for(var i=this._tracks,o=0;o0&&l.addKeyframe(0,zf(u),a),this._trackKeys.push(s)}l.addKeyframe(e,zf(t[s]),a)}return this._maxTime=Math.max(this._maxTime,e),this},r.prototype.pause=function(){this._clip.pause(),this._paused=!0},r.prototype.resume=function(){this._clip.resume(),this._paused=!1},r.prototype.isPaused=function(){return!!this._paused},r.prototype.duration=function(e){return this._maxTime=e,this._force=!0,this},r.prototype._doneCallback=function(){this._setTracksFinished(),this._clip=null;var e=this._doneCbs;if(e)for(var t=e.length,n=0;n0)){this._started=1;for(var t=this,n=[],a=this._maxTime||0,i=0;i1){var s=o.pop();i.addKeyframe(s.time,e[a]),i.prepare(this._maxTime,i.getAdditiveTrack())}}}},r})();function Rl(){return new Date().getTime()}var gW=(function(r){N(e,r);function e(t){var n=r.call(this)||this;return n._running=!1,n._time=0,n._pausedTime=0,n._pauseStart=0,n._paused=!1,t=t||{},n.stage=t.stage||{},n}return e.prototype.addClip=function(t){t.animation&&this.removeClip(t),this._head?(this._tail.next=t,t.prev=this._tail,t.next=null,this._tail=t):this._head=this._tail=t,t.animation=this},e.prototype.addAnimator=function(t){t.animation=this;var n=t.getClip();n&&this.addClip(n)},e.prototype.removeClip=function(t){if(t.animation){var n=t.prev,a=t.next;n?n.next=a:this._head=a,a?a.prev=n:this._tail=n,t.next=t.prev=t.animation=null}},e.prototype.removeAnimator=function(t){var n=t.getClip();n&&this.removeClip(n),t.animation=null},e.prototype.update=function(t){for(var n=Rl()-this._pausedTime,a=n-this._time,i=this._head;i;){var o=i.next,s=i.step(n,a);s&&(i.ondestroy(),this.removeClip(i)),i=o}this._time=n,t||(this.trigger("frame",a),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(qh(n),!t._paused&&t.update())}qh(n)},e.prototype.start=function(){this._running||(this._time=Rl(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=Rl(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=Rl()-this._pauseStart,this._paused=!1)},e.prototype.clear=function(){for(var t=this._head;t;){var n=t.next;t.prev=t.next=t.animation=null,t=n}this._head=this._tail=null},e.prototype.isFinished=function(){return this._head==null},e.prototype.animate=function(t,n){n=n||{},this.start();var a=new B1(t,n.loop);return this.addAnimator(a),a},e})(kn),yW=300,pg=Pe.domSupported,dg=(function(){var r=["click","dblclick","mousewheel","wheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],e=["touchstart","touchend","touchmove"],t={pointerdown:1,pointerup:1,pointermove:1,pointerout:1},n=$(r,function(a){var i=a.replace("mouse","pointer");return t.hasOwnProperty(i)?i:a});return{mouse:r,touch:e,pointer:n}})(),fw={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},cw=!1;function y0(r){var e=r.pointerType;return e==="pen"||e==="touch"}function mW(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 gg(r){r&&(r.zrByTouch=!0)}function _W(r,e){return hn(r.dom,new SW(r,e),!0)}function wP(r,e){for(var t=e,n=!1;t&&t.nodeType!==9&&!(n=t.domBelongToZr||t!==e&&t===r.painterRoot);)t=t.parentNode;return n}var SW=(function(){function r(e,t){this.stopPropagation=At,this.stopImmediatePropagation=At,this.preventDefault=At,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r})(),Nn={mousedown:function(r){r=hn(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=hn(this.dom,r);var e=this.__mayPointerCapture;e&&(r.zrX!==e[0]||r.zrY!==e[1])&&this.__togglePointerCapture(!0),this.trigger("mousemove",r)},mouseup:function(r){r=hn(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=hn(this.dom,r);var e=r.toElement||r.relatedTarget;wP(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){cw=!0,r=hn(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){cw||(r=hn(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=hn(this.dom,r),gg(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Nn.mousemove.call(this,r),Nn.mousedown.call(this,r)},touchmove:function(r){r=hn(this.dom,r),gg(r),this.handler.processGesture(r,"change"),Nn.mousemove.call(this,r)},touchend:function(r){r=hn(this.dom,r),gg(r),this.handler.processGesture(r,"end"),Nn.mouseup.call(this,r),+new Date-+this.__lastTouchMomentpw||r<-pw}var Co=[],rl=[],mg=rr(),_g=Math.abs,Xa=(function(){function r(){}return r.prototype.getLocalTransform=function(e){return r.getLocalTransform(this,e)},r.prototype.setPosition=function(e){this.x=e[0],this.y=e[1]},r.prototype.setScale=function(e){this.scaleX=e[0],this.scaleY=e[1]},r.prototype.setSkew=function(e){this.skewX=e[0],this.skewY=e[1]},r.prototype.setOrigin=function(e){this.originX=e[0],this.originY=e[1]},r.prototype.needLocalTransform=function(){return To(this.rotation)||To(this.x)||To(this.y)||To(this.scaleX-1)||To(this.scaleY-1)||To(this.skewX)||To(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(hw(n),this.invTransform=null);return}n=n||rr(),t?this.getLocalTransform(n):hw(n),e&&(t?Sa(n,e,n):dd(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(Co);var n=Co[0]<0?-1:1,a=Co[1]<0?-1:1,i=((Co[0]-n)*t+n)/Co[0]||0,o=((Co[1]-a)*t+a)/Co[1]||0;e[0]*=i,e[1]*=i,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||rr(),Yn(this.invTransform,e)},r.prototype.getComputedTransform=function(){for(var e=this,t=[];e;)t.push(e),e=e.parent;for(;e=t.pop();)e.updateTransform();return this.transform},r.prototype.setLocalTransform=function(e){if(e){var t=e[0]*e[0]+e[1]*e[1],n=e[2]*e[2]+e[3]*e[3],a=Math.atan2(e[1],e[0]),i=Math.PI/2+a-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(i),t=Math.sqrt(t),this.skewX=i,this.skewY=0,this.rotation=-a,this.x=+e[4],this.y=+e[5],this.scaleX=t,this.scaleY=n,this.originX=0,this.originY=0}},r.prototype.decomposeTransform=function(){if(this.transform){var e=this.parent,t=this.transform;e&&e.transform&&(e.invTransform=e.invTransform||rr(),Sa(rl,e.invTransform,t),t=rl);var n=this.originX,a=this.originY;(n||a)&&(mg[4]=n,mg[5]=a,Sa(rl,t,mg),rl[4]-=n,rl[5]-=a,t=rl),this.setLocalTransform(t)}},r.prototype.getGlobalScale=function(e){var t=this.transform;return e=e||[],t?(e[0]=Math.sqrt(t[0]*t[0]+t[1]*t[1]),e[1]=Math.sqrt(t[2]*t[2]+t[3]*t[3]),t[0]<0&&(e[0]=-e[0]),t[3]<0&&(e[1]=-e[1]),e):(e[0]=1,e[1]=1,e)},r.prototype.transformCoordToLocal=function(e,t){var n=[e,t],a=this.invTransform;return a&&Mt(n,n,a),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],a=this.transform;return a&&Mt(n,n,a),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&_g(e[0]-1)>1e-10&&_g(e[3]-1)>1e-10?Math.sqrt(_g(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){rp(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,a=e.originY||0,i=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,f=e.x,c=e.y,v=e.skewX?Math.tan(e.skewX):0,h=e.skewY?Math.tan(-e.skewY):0;if(n||a||s||l){var p=n+s,d=a+l;t[4]=-p*i-v*d*o,t[5]=-d*o-h*p*i}else t[4]=t[5]=0;return t[0]=i,t[3]=o,t[1]=h*i,t[2]=v*o,u&&ho(t,t,u),t[4]+=n+f,t[5]+=a+c,t},r.initDefaultProps=(function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0})(),r})(),Ma=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function rp(r,e){for(var t=0;t=dw)){r=r||ai;for(var e=[],t=+new Date,n=0;n<=127;n++)e[n]=Un.measureText(String.fromCharCode(n),r).width;var a=+new Date-t;return a>16?Sg=dw:a>2&&Sg++,e}}var Sg=0,dw=5;function CP(r,e){return r.asciiWidthMapTried||(r.asciiWidthMap=CW(r.font),r.asciiWidthMapTried=!0),0<=e&&e<=127?r.asciiWidthMap!=null?r.asciiWidthMap[e]:r.asciiCharWidth:r.stWideCharWidth}function wa(r,e){var t=r.strWidthCache,n=t.get(e);return n==null&&(n=Un.measureText(e,r.font).width,t.put(e,n)),n}function gw(r,e,t,n){var a=wa(xa(e),r),i=Pc(e),o=Jl(0,a,t),s=gs(0,i,n),l=new ve(o,s,a,i);return l}function yd(r,e,t,n){var a=((r||"")+"").split(` `),i=a.length;if(i===1)return gw(a[0],e,t,n);for(var o=new ve(0,0,0,0),s=0;s=0?parseFloat(r)/100*e:parseFloat(r):r}function np(r,e,t){var n=e.position||"inside",a=e.distance!=null?e.distance:5,i=t.height,o=t.width,s=i/2,l=t.x,u=t.y,f="left",c="top";if(n instanceof Array)l+=Xn(n[0],t.width),u+=Xn(n[1],t.height),f=null,c=null;else switch(n){case"left":l-=a,u+=s,f="right",c="middle";break;case"right":l+=a+o,u+=s,c="middle";break;case"top":l+=o/2,u-=a,f="center",c="bottom";break;case"bottom":l+=o/2,u+=i+a,f="center";break;case"inside":l+=o/2,u+=s,f="center",c="middle";break;case"insideLeft":l+=a,u+=s,c="middle";break;case"insideRight":l+=o-a,u+=s,f="right",c="middle";break;case"insideTop":l+=o/2,u+=a,f="center";break;case"insideBottom":l+=o/2,u+=i-a,f="center",c="bottom";break;case"insideTopLeft":l+=a,u+=a;break;case"insideTopRight":l+=o-a,u+=a,f="right";break;case"insideBottomLeft":l+=a,u+=i-a,c="bottom";break;case"insideBottomRight":l+=o-a,u+=i-a,f="right",c="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=f,r.verticalAlign=c,r}var bg="__zr_normal__",xg=Ma.concat(["ignore"]),AW=Ca(Ma,function(r,e){return r[e]=!0,r},{ignore:!1}),nl={},MW=new ve(0,0,0,0),hv=[],md=(function(){function r(e){this.id=JL(),this.animators=[],this.currentStates=[],this.states={},this._init(e)}return r.prototype._init=function(e){this.attr(e)},r.prototype.drift=function(e,t,n){switch(this.draggable){case"horizontal":t=0;break;case"vertical":e=0;break}var a=this.transform;a||(a=this.transform=[1,0,0,1,0,0]),a[4]+=e,a[5]+=t,this.decomposeTransform(),this.markRedraw()},r.prototype.beforeUpdate=function(){},r.prototype.afterUpdate=function(){},r.prototype.update=function(){this.updateTransform(),this.__dirty&&this.updateInnerText()},r.prototype.updateInnerText=function(e){var t=this._textContent;if(t&&(!t.ignore||e)){this.textConfig||(this.textConfig={});var n=this.textConfig,a=n.local,i=t.innerTransformable,o=void 0,s=void 0,l=!1;i.parent=a?this:null;var u=!1;i.copyTransform(t);var f=n.position!=null,c=n.autoOverflowArea,v=void 0;if((c||f)&&(v=MW,n.layoutRect?v.copy(n.layoutRect):v.copy(this.getBoundingRect()),a||v.applyTransform(this.transform)),f){this.calculateTextPosition?this.calculateTextPosition(nl,n,v):np(nl,n,v),i.x=nl.x,i.y=nl.y,o=nl.align,s=nl.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var p=void 0,d=void 0;h==="center"?(p=v.width*.5,d=v.height*.5):(p=Xn(h[0],v.width),d=Xn(h[1],v.height)),u=!0,i.originX=-i.x+p+(a?0:v.x),i.originY=-i.y+d+(a?0:v.y)}}n.rotation!=null&&(i.rotation=n.rotation);var g=n.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(c){var m=y.overflowRect=y.overflowRect||new ve(0,0,0,0);i.getLocalTransform(hv),Yn(hv,hv),ve.copy(m,v),m.applyTransform(hv)}else y.overflowRect=null;var _=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,S=void 0,b=void 0,x=void 0;_&&this.canBeInsideText()?(S=n.insideFill,b=n.insideStroke,(S==null||S==="auto")&&(S=this.getInsideTextFill()),(b==null||b==="auto")&&(b=this.getInsideTextStroke(S),x=!0)):(S=n.outsideFill,b=n.outsideStroke,(S==null||S==="auto")&&(S=this.getOutsideFill()),(b==null||b==="auto")&&(b=this.getOutsideStroke(S),x=!0)),S=S||"#000",(S!==y.fill||b!==y.stroke||x!==y.autoStroke||o!==y.align||s!==y.verticalAlign)&&(l=!0,y.fill=S,y.stroke=b,y.autoStroke=x,y.align=o,y.verticalAlign=s,t.setDefaultTextStyle(y)),t.__dirty|=Qr,l&&t.dirtyStyle(!0)}},r.prototype.canBeInsideText=function(){return!0},r.prototype.getInsideTextFill=function(){return"#fff"},r.prototype.getInsideTextStroke=function(e){return"#000"},r.prototype.getOutsideFill=function(){return this.__zr&&this.__zr.isDarkMode()?b0:S0},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&Zr(t);n||(n=[255,255,255,1]);for(var a=n[3],i=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*a+(i?0:255)*(1-a);return n[3]=1,ba(n,"rgba")},r.prototype.traverse=function(e,t){},r.prototype.attrKV=function(e,t){e==="textConfig"?this.setTextConfig(t):e==="textContent"?this.setTextContent(t):e==="clipPath"?this.setClipPath(t):e==="extra"?(this.extra=this.extra||{},H(this.extra,t)):this[e]=t},r.prototype.hide=function(){this.ignore=!0,this.markRedraw()},r.prototype.show=function(){this.ignore=!1,this.markRedraw()},r.prototype.attr=function(e,t){if(typeof e=="string")this.attrKV(e,t);else if(ce(e))for(var n=e,a=Re(n),i=0;i0},r.prototype.getState=function(e){return this.states[e]},r.prototype.ensureState=function(e){var t=this.states;return t[e]||(t[e]={}),t[e]},r.prototype.clearStates=function(e){this.useState(bg,!1,e)},r.prototype.useState=function(e,t,n,a){var i=e===bg,o=this.hasState();if(!(!o&&i)){var s=this.currentStates,l=this.stateTransition;if(!(be(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!i&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!i){L1("State "+e+" not exists.");return}i||this.saveCurrentToNormalState(u);var f=!!(u&&u.hoverLayer||a);f&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var c=this._textContent,v=this._textGuide;return c&&c.useState(e,t,n,f),v&&v.useState(e,t,n,f),i?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Qr),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var a=[],i=this.currentStates,o=e.length,s=o===i.length;if(s){for(var l=0;l0,p);var d=this._textContent,g=this._textGuide;d&&d.useStates(e,t,v),g&&g.useStates(e,t,v),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!v&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~Qr)}},r.prototype.isSilent=function(){for(var e=this;e;){if(e.silent)return!0;var t=e.__hostTarget;e=t?e.ignoreHostSilent?null:t:e.parent}return!1},r.prototype._updateAnimationTargets=function(){for(var e=0;e=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var a=this.currentStates.slice(),i=be(a,e),o=be(a,t)>=0;i>=0?o?a.splice(i,1):a[i]=t:n&&!o&&a.push(t),this.useStates(a)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,a=0;a=0&&i.splice(o,1)}),this.animators.push(e),n&&n.animation.addAnimator(e),n&&n.wakeUp()},r.prototype.updateDuringAnimation=function(e){this.markRedraw()},r.prototype.stopAnimation=function(e,t){for(var n=this.animators,a=n.length,i=[],o=0;o0&&t.during&&i[0].during(function(p,d){t.during(d)});for(var v=0;v0||a.force&&!o.length){var T=void 0,C=void 0,A=void 0;if(s){C={},v&&(T={});for(var S=0;S<_;S++){var y=d[S];C[y]=t[y],v?T[y]=n[y]:t[y]=n[y]}}else if(v){A={};for(var S=0;S<_;S++){var y=d[S];A[y]=zf(t[y]),IW(t,n,y)}}var b=new B1(t,!1,!1,c?Ze(p,function(L){return L.targetName===e}):null);b.targetName=e,a.scope&&(b.scope=a.scope),v&&T&&b.whenWithKeys(0,T,d),A&&b.whenWithKeys(0,A,d),b.whenWithKeys(u??500,s?C:n,d).delay(f||0),r.addAnimator(b,e),o.push(b)}}var oe=(function(r){N(e,r);function e(t){var n=r.call(this)||this;return n.isGroup=!0,n._children=[],n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.children=function(){return this._children.slice()},e.prototype.childAt=function(t){return this._children[t]},e.prototype.childOfName=function(t){for(var n=this._children,a=0;a=0&&(a.splice(i,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var a=be(this._children,t);return a>=0&&this.replaceAt(n,a),this},e.prototype.replaceAt=function(t,n){var a=this._children,i=a[n];if(t&&t!==this&&t.parent!==this&&t!==i){a[n]=t,i.parent=null;var o=this.__zr;o&&i.removeSelfFromZr(o),this._doAdd(t)}return this},e.prototype._doAdd=function(t){t.parent&&t.parent.remove(t),t.parent=this;var n=this.__zr;n&&n!==t.__zr&&t.addSelfToZr(n),n&&n.refresh()},e.prototype.remove=function(t){var n=this.__zr,a=this._children,i=be(a,t);return i<0?this:(a.splice(i,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,a=0;a0&&(this._stillFrameAccum++,this._stillFrameAccum>this._sleepAfterStill&&this.animation.stop())},r.prototype.setSleepAfterStill=function(e){this._sleepAfterStill=e},r.prototype.wakeUp=function(){this._disposed||(this.animation.start(),this._stillFrameAccum=0)},r.prototype.refreshHover=function(){this._needsRefreshHover=!0},r.prototype.refreshHoverImmediately=function(){this._disposed||(this._needsRefreshHover=!1,this.painter.refreshHover&&this.painter.getType()==="canvas"&&this.painter.refreshHover())},r.prototype.resize=function(e){this._disposed||(e=e||{},this.painter.resize(e.width,e.height),this.handler.resize())},r.prototype.clearAnimation=function(){this._disposed||this.animation.clear()},r.prototype.getWidth=function(){if(!this._disposed)return this.painter.getWidth()},r.prototype.getHeight=function(){if(!this._disposed)return this.painter.getHeight()},r.prototype.setCursorStyle=function(e){this._disposed||this.handler.setCursorStyle(e)},r.prototype.findHover=function(e,t){if(!this._disposed)return this.handler.findHover(e,t)},r.prototype.on=function(e,t,n){return this._disposed||this.handler.on(e,t,n),this},r.prototype.off=function(e,t){this._disposed||this.handler.off(e,t)},r.prototype.trigger=function(e,t){this._disposed||this.handler.trigger(e,t)},r.prototype.clear=function(){if(!this._disposed){for(var e=this.storage.getRoots(),t=0;t0){if(r<=a)return o;if(r>=i)return s}else{if(r>=a)return o;if(r<=i)return s}else{if(r===a)return o;if(r===i)return s}return(r-a)/l*u+o}var X=VW;function VW(r,e,t){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return ap(r,e,t)}function ap(r,e,t){return q(r)?BW(r).match(/%$/)?parseFloat(r)/100*e+(t||0):parseFloat(r):r==null?NaN:+r}function Pt(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),DP),r=(+r).toFixed(e),t?r:+r}function wn(r){return r.sort(function(e,t){return e-t}),r}function da(r){if(r=+r,isNaN(r))return 0;if(r>1e-14){for(var e=1,t=0;t<15;t++,e*=10)if(Math.round(r*e)/e===r)return t}return GW(r)}function GW(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,a=t>0?t:e.length,i=e.indexOf("."),o=i<0?0:a-1-i;return Math.max(0,o-n)}function IP(r,e){var t=Math.log,n=Math.LN10,a=Math.floor(t(r[1]-r[0])/n),i=Math.round(t(pa(e[1]-e[0]))/n),o=Math.min(Math.max(-a+i,0),20);return isFinite(o)?o:20}function FW(r,e){var t=Ca(r,function(h,p){return h+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),a=$(r,function(h){return(isNaN(h)?0:h)/t*n*100}),i=n*100,o=$(a,function(h){return Math.floor(h)}),s=Ca(o,function(h,p){return h+p},0),l=$(a,function(h,p){return h-o[p]});su&&(u=l[c],f=c);++o[f],l[f]=0,++s}return $(o,function(h){return h/n})}function HW(r,e){var t=Math.max(da(r),da(e)),n=r+e;return t>DP?n:Pt(n,t)}var _w=9007199254740991;function LP(r){var e=Math.PI*2;return(r%e+e)%e}function ec(r){return r>-mw&&r=10&&e++,e}function PP(r,e){var t=V1(r),n=Math.pow(10,t),a=r/n,i;return a<1.5?i=1:a<2.5?i=2:a<4?i=3:a<7?i=5:i=10,r=i*n,t>=-20?+r.toFixed(t<0?-t:0):r}function Cg(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),a=+r[n-1],i=t-n;return i?a+i*(r[n]-a):a}function Sw(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n0?e.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 Ag(r){r.option=r.parentModel=r.ecModel=null}var u8=".",Ao="___EC__COMPONENT__CONTAINER___",HP="___EC__EXTENDED_CLASS___";function ga(r){var e={main:"",sub:""};if(r){var t=r.split(u8);e.main=t[0]||"",e.sub=t[1]||""}return e}function f8(r){Sr(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function c8(r){return!!(r&&r[HP])}function H1(r,e){r.$constructor=r,r.extend=function(t){var n=this,a;return v8(n)?a=(function(i){N(o,i);function o(){return i.apply(this,arguments)||this}return o})(n):(a=function(){(t.$constructor||n).apply(this,arguments)},hH(a,this)),H(a.prototype,t),a[HP]=!0,a.extend=this.extend,a.superCall=d8,a.superApply=g8,a.superClass=n,a}}function v8(r){return ie(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function WP(r,e){r.extend=e.extend}var h8=Math.round(Math.random()*10);function p8(r){var e=["__\0is_clz",h8++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function d8(r,e){for(var t=[],n=2;n=0||i&&be(i,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var y8=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],m8=Es(y8),_8=(function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return m8(this,e,t)},r})(),T0=new Kl(50);function S8(r){if(typeof r=="string"){var e=T0.get(r);return e&&e.image}else return r}function W1(r,e,t,n,a){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var i=T0.get(r),o={hostEl:t,cb:n,cbPayload:a};return i?(e=i.image,!Sd(e)&&i.pending.push(o)):(e=Un.loadImage(r,Tw,Tw),e.__zrImageSrc=r,T0.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function Tw(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e=s;u++)l-=s;var f=wa(o,t);return f>l&&(t="",f=0),l=r-f,a.ellipsis=t,a.ellipsisWidth=f,a.contentWidth=l,a.containerWidth=r,a}function ZP(r,e,t){var n=t.containerWidth,a=t.contentWidth,i=t.fontMeasureInfo;if(!n){r.textLine="",r.isTruncated=!1;return}var o=wa(i,e);if(o<=n){r.textLine=e,r.isTruncated=!1;return}for(var s=0;;s++){if(o<=a||s>=t.maxIterations){e+=t.ellipsis;break}var l=s===0?x8(e,a,i):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=wa(i,e)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function x8(r,e,t){for(var n=0,a=0,i=r.length;ag&&h){var _=Math.floor(g/v);p=p||y.length>_,y=y.slice(0,_),m=y.length*v}if(a&&f&&d!=null)for(var S=$P(d,u,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),b={},x=0;xp&&Dg(i,o.substring(p,g),e,h),Dg(i,d[2],e,h,d[1]),p=Mg.lastIndex}pc){var z=i.lines.length;L>0?(C.tokens=C.tokens.slice(0,L),w(C,D,A),i.lines=i.lines.slice(0,T+1)):i.lines=i.lines.slice(0,T),i.isTruncated=i.isTruncated||i.lines.length0&&p+n.accumWidth>n.width&&(f=e.split(` `),u=!0),n.accumWidth=p}else{var d=UP(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=d.accumWidth+h,c=d.linesWidths,f=d.lines}}f||(f=e.split(` `));for(var g=xa(l),y=0;y=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var D8=Ca(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function I8(r){return M8(r)?!!D8[r]:!0}function UP(r,e,t,n,a){for(var i=[],o=[],s="",l="",u=0,f=0,c=xa(e),v=0;vt:a+f+p>t){f?(s||l)&&(d?(s||(s=l,l="",u=0,f=u),i.push(s),o.push(f-u),l+=h,u+=p,s="",f=u):(l&&(s+=l,l="",u=0),i.push(s),o.push(f),s=h,f=p)):d?(i.push(l),o.push(u),l=h,u=p):(i.push(h),o.push(p));continue}f+=p,d?(l+=h,u+=p):(l&&(s+=l,l="",u=0),s+=h)}return l&&(s+=l),s&&(i.push(s),o.push(f)),i.length===1&&(f+=a),{accumWidth:f,lines:i,linesWidths:o}}function Aw(r,e,t,n,a,i){if(r.baseX=t,r.baseY=n,r.outerWidth=r.outerHeight=null,!!e){var o=e.width*2,s=e.height*2;ve.set(Mw,Jl(t,o,a),gs(n,s,i),o,s),ve.intersect(e,Mw,null,Dw);var l=Dw.outIntersectRect;r.outerWidth=l.width,r.outerHeight=l.height,r.baseX=Jl(l.x,l.width,a,!0),r.baseY=gs(l.y,l.height,i,!0)}}var Mw=new ve(0,0,0,0),Dw={outIntersectRect:{},clamp:!0};function $1(r){return r!=null?r+="":r=""}function L8(r){var e=$1(r.text),t=r.font,n=wa(xa(t),e),a=Pc(t);return C0(r,n,a,null)}function C0(r,e,t,n){var a=new ve(Jl(r.x||0,e,r.textAlign),gs(r.y||0,t,r.textBaseline),e,t),i=n??(YP(r)?r.lineWidth:0);return i>0&&(a.x-=i/2,a.y-=i/2,a.width+=i,a.height+=i),a}function YP(r){var e=r.stroke;return e!=null&&e!=="none"&&r.lineWidth>0}var A0="__zr_style_"+Math.round(Math.random()*10),ys={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},bd={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};ys[A0]=!0;var Iw=["z","z2","invisible"],P8=["invisible"],In=(function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=Re(t),a=0;a1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(pv[0]=kg(a)*t+r,pv[1]=Pg(a)*n+e,dv[0]=kg(i)*t+r,dv[1]=Pg(i)*n+e,u(s,pv,dv),f(l,pv,dv),a=a%Mo,a<0&&(a=a+Mo),i=i%Mo,i<0&&(i=i+Mo),a>i&&!o?i+=Mo:aa&&(gv[0]=kg(h)*t+r,gv[1]=Pg(h)*n+e,u(s,gv,s),f(l,gv,l))}var et={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Do=[],Io=[],ea=[],xi=[],ta=[],ra=[],Eg=Math.min,Rg=Math.max,Lo=Math.cos,Po=Math.sin,Ba=Math.abs,M0=Math.PI,Pi=M0*2,Og=typeof Float32Array<"u",Bu=[];function Ng(r){var e=Math.round(r/M0*1e8)/1e8;return e%2*M0}function wd(r,e){var t=Ng(r[0]);t<0&&(t+=Pi);var n=t-r[0],a=r[1];a+=n,!e&&a-t>=Pi?a=t+Pi:e&&t-a>=Pi?a=t-Pi:!e&&t>a?a=t+(Pi-Ng(t-a)):e&&t0&&(this._ux=Ba(n/tp/e)||0,this._uy=Ba(n/tp/t)||0)},r.prototype.setDPR=function(e){this.dpr=e},r.prototype.setContext=function(e){this._ctx=e},r.prototype.getContext=function(){return this._ctx},r.prototype.beginPath=function(){return this._ctx&&this._ctx.beginPath(),this.reset(),this},r.prototype.reset=function(){this._saveData&&(this._len=0),this._pathSegLen&&(this._pathSegLen=null,this._pathLen=0),this._version++},r.prototype.moveTo=function(e,t){return this._drawPendingPt(),this.addData(et.M,e,t),this._ctx&&this._ctx.moveTo(e,t),this._x0=e,this._y0=t,this._xi=e,this._yi=t,this},r.prototype.lineTo=function(e,t){var n=Ba(e-this._xi),a=Ba(t-this._yi),i=n>this._ux||a>this._uy;if(this.addData(et.L,e,t),this._ctx&&i&&this._ctx.lineTo(e,t),i)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+a*a;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){return this._drawPendingPt(),this.addData(et.C,e,t,n,a,i,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,a,i,o),this._xi=i,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,a){return this._drawPendingPt(),this.addData(et.Q,e,t,n,a),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,a),this._xi=n,this._yi=a,this},r.prototype.arc=function(e,t,n,a,i,o){this._drawPendingPt(),Bu[0]=a,Bu[1]=i,wd(Bu,o),a=Bu[0],i=Bu[1];var s=i-a;return this.addData(et.A,e,t,n,n,a,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,a,i,o),this._xi=Lo(i)*n+e,this._yi=Po(i)*n+t,this},r.prototype.arcTo=function(e,t,n,a,i){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,a,i),this},r.prototype.rect=function(e,t,n,a){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,a),this.addData(et.R,e,t,n,a),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(et.Z);var e=this._ctx,t=this._x0,n=this._y0;return e&&e.closePath(),this._xi=t,this._yi=n,this},r.prototype.fill=function(e){e&&e.fill(),this.toStatic()},r.prototype.stroke=function(e){e&&e.stroke(),this.toStatic()},r.prototype.len=function(){return this._len},r.prototype.setData=function(e){if(this._saveData){var t=e.length;!(this.data&&this.data.length===t)&&Og&&(this.data=new Float32Array(t));for(var n=0;n0&&o))for(var s=0;sf.length&&(this._expandData(),f=this.data);for(var c=0;c0&&(this._ctx&&this._ctx.lineTo(this._pendingPtX,this._pendingPtY),this._pendingPtDist=0)},r.prototype._expandData=function(){if(!(this.data instanceof Array)){for(var e=[],t=0;t11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){ea[0]=ea[1]=ta[0]=ta[1]=Number.MAX_VALUE,xi[0]=xi[1]=ra[0]=ra[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,a=0,i=0,o;for(o=0;on||Ba(_)>a||v===t-1)&&(d=Math.sqrt(m*m+_*_),i=g,o=y);break}case et.C:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++],x=e[v++],w=e[v++];d=qH(i,o,S,b,g,y,x,w,10),i=x,o=w;break}case et.Q:{var S=e[v++],b=e[v++],g=e[v++],y=e[v++];d=KH(i,o,S,b,g,y,10),i=g,o=y;break}case et.A:var T=e[v++],C=e[v++],A=e[v++],D=e[v++],L=e[v++],I=e[v++],P=I+L;v+=1,p&&(s=Lo(L)*A+T,l=Po(L)*D+C),d=Rg(A,D)*Eg(Pi,Math.abs(I)),i=Lo(P)*A+T,o=Po(P)*D+C;break;case et.R:{s=i=e[v++],l=o=e[v++];var E=e[v++],k=e[v++];d=E*2+k*2;break}case et.Z:{var m=s-i,_=l-o;d=Math.sqrt(m*m+_*_),i=s,o=l;break}}d>=0&&(u[c++]=d,f+=d)}return this._pathLen=f,f},r.prototype.rebuildPath=function(e,t){var n=this.data,a=this._ux,i=this._uy,o=this._len,s,l,u,f,c,v,h=t<1,p,d,g=0,y=0,m,_=0,S,b;if(!(h&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,d=this._pathLen,m=t*d,!m)))e:for(var x=0;x0&&(e.lineTo(S,b),_=0),w){case et.M:s=u=n[x++],l=f=n[x++],e.moveTo(u,f);break;case et.L:{c=n[x++],v=n[x++];var C=Ba(c-u),A=Ba(v-f);if(C>a||A>i){if(h){var D=p[y++];if(g+D>m){var L=(m-g)/D;e.lineTo(u*(1-L)+c*L,f*(1-L)+v*L);break e}g+=D}e.lineTo(c,v),u=c,f=v,_=0}else{var I=C*C+A*A;I>_&&(S=c,b=v,_=I)}break}case et.C:{var P=n[x++],E=n[x++],k=n[x++],O=n[x++],R=n[x++],z=n[x++];if(h){var D=p[y++];if(g+D>m){var L=(m-g)/D;ao(u,P,k,R,L,Do),ao(f,E,O,z,L,Io),e.bezierCurveTo(Do[1],Io[1],Do[2],Io[2],Do[3],Io[3]);break e}g+=D}e.bezierCurveTo(P,E,k,O,R,z),u=R,f=z;break}case et.Q:{var P=n[x++],E=n[x++],k=n[x++],O=n[x++];if(h){var D=p[y++];if(g+D>m){var L=(m-g)/D;Kf(u,P,k,L,Do),Kf(f,E,O,L,Io),e.quadraticCurveTo(Do[1],Io[1],Do[2],Io[2]);break e}g+=D}e.quadraticCurveTo(P,E,k,O),u=k,f=O;break}case et.A:var V=n[x++],G=n[x++],F=n[x++],U=n[x++],J=n[x++],he=n[x++],Oe=n[x++],We=!n[x++],pe=F>U?F:U,ae=Ba(F-U)>.001,_e=J+he,ee=!1;if(h){var D=p[y++];g+D>m&&(_e=J+he*(m-g)/D,ee=!0),g+=D}if(ae&&e.ellipse?e.ellipse(V,G,F,U,Oe,J,_e,We):e.arc(V,G,pe,J,_e,We),ee)break e;T&&(s=Lo(J)*F+V,l=Po(J)*U+G),u=Lo(_e)*F+V,f=Po(_e)*U+G;break;case et.R:s=u=n[x],l=f=n[x+1],c=n[x++],v=n[x++];var de=n[x++],Ue=n[x++];if(h){var D=p[y++];if(g+D>m){var Ee=m-g;e.moveTo(c,v),e.lineTo(c+Eg(Ee,de),v),Ee-=de,Ee>0&&e.lineTo(c+de,v+Eg(Ee,Ue)),Ee-=Ue,Ee>0&&e.lineTo(c+Rg(de-Ee,0),v+Ue),Ee-=de,Ee>0&&e.lineTo(c,v+Rg(Ue-Ee,0));break e}g+=D}e.rect(c,v,de,Ue);break;case et.Z:if(h){var D=p[y++];if(g+D>m){var L=(m-g)/D;e.lineTo(u*(1-L)+s*L,f*(1-L)+l*L);break e}g+=D}e.closePath(),u=s,f=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.prototype.canSave=function(){return!!this._saveData},r.CMD=et,r.initDefaultProps=(function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0})(),r})();function Ei(r,e,t,n,a,i,o){if(a===0)return!1;var s=a,l=0,u=r;if(o>e+s&&o>n+s||or+s&&i>t+s||ie+c&&f>n+c&&f>i+c&&f>s+c||fr+c&&u>t+c&&u>a+c&&u>o+c||ue+u&&l>n+u&&l>i+u||lr+u&&s>t+u&&s>a+u||st||f+ua&&(a+=Vu);var v=Math.atan2(l,s);return v<0&&(v+=Vu),v>=n&&v<=a||v+Vu>=n&&v+Vu<=a}function Za(r,e,t,n,a,i){if(i>e&&i>n||ia?s:0}var wi=Da.CMD,ko=Math.PI*2,B8=1e-4;function V8(r,e){return Math.abs(r-e)e&&u>n&&u>i&&u>s||u1&&G8(),h=Yt(e,n,i,s,dn[0]),v>1&&(p=Yt(e,n,i,s,dn[1]))),v===2?ge&&s>n&&s>i||s=0&&u<=1){for(var f=0,c=tr(e,n,i,u),v=0;vt||s<-t)return 0;var l=Math.sqrt(t*t-s*s);Pr[0]=-l,Pr[1]=l;var u=Math.abs(n-a);if(u<1e-4)return 0;if(u>=ko-1e-4){n=0,a=ko;var f=i?1:-1;return o>=Pr[0]+r&&o<=Pr[1]+r?f:0}if(n>a){var c=n;n=a,a=c}n<0&&(n+=ko,a+=ko);for(var v=0,h=0;h<2;h++){var p=Pr[h];if(p+r>o){var d=Math.atan2(s,p),f=i?1:-1;d<0&&(d=ko+d),(d>=n&&d<=a||d+ko>=n&&d+ko<=a)&&(d>Math.PI/2&&d1&&(t||(s+=Za(l,u,f,c,n,a))),g&&(l=i[p],u=i[p+1],f=l,c=u),d){case wi.M:f=i[p++],c=i[p++],l=f,u=c;break;case wi.L:if(t){if(Ei(l,u,i[p],i[p+1],e,n,a))return!0}else s+=Za(l,u,i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case wi.C:if(t){if(N8(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=F8(l,u,i[p++],i[p++],i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case wi.Q:if(t){if(XP(l,u,i[p++],i[p++],i[p],i[p+1],e,n,a))return!0}else s+=H8(l,u,i[p++],i[p++],i[p],i[p+1],n,a)||0;l=i[p++],u=i[p++];break;case wi.A:var y=i[p++],m=i[p++],_=i[p++],S=i[p++],b=i[p++],x=i[p++];p+=1;var w=!!(1-i[p++]);v=Math.cos(b)*_+y,h=Math.sin(b)*S+m,g?(f=v,c=h):s+=Za(l,u,v,h,n,a);var T=(n-y)*S/_+y;if(t){if(z8(y,m,S,b,b+x,w,e,T,a))return!0}else s+=W8(y,m,S,b,b+x,w,T,a);l=Math.cos(b+x)*_+y,u=Math.sin(b+x)*S+m;break;case wi.R:f=l=i[p++],c=u=i[p++];var C=i[p++],A=i[p++];if(v=f+C,h=c+A,t){if(Ei(f,c,v,c,e,n,a)||Ei(v,c,v,h,e,n,a)||Ei(v,h,f,h,e,n,a)||Ei(f,h,f,c,e,n,a))return!0}else s+=Za(v,c,v,h,n,a),s+=Za(f,h,f,c,n,a);break;case wi.Z:if(t){if(Ei(l,u,f,c,e,n,a))return!0}else s+=Za(l,u,f,c,n,a);l=f,u=c;break}}return!t&&!V8(u,c)&&(s+=Za(l,u,f,c,n,a)||0),s!==0}function $8(r,e,t){return qP(r,0,!1,e,t)}function Z8(r,e,t,n){return qP(r,e,!0,t,n)}var ip=fe({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},ys),U8={style:fe({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},bd.style)},zg=Ma.concat(["invisible","culling","z","z2","zlevel","parent"]),Me=(function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype.update=function(){var t=this;r.prototype.update.call(this);var n=this.style;if(n.decal){var a=this._decalEl=this._decalEl||new e;a.buildPath===e.prototype.buildPath&&(a.buildPath=function(l){t.buildPath(l,t.shape)}),a.silent=!0;var i=a.style;for(var o in n)i[o]!==n[o]&&(i[o]=n[o]);i.fill=n.fill?n.decal:null,i.decal=null,i.shadowColor=null,n.strokeFirst&&(i.stroke=null);for(var s=0;s.5?S0:n>.2?TW:b0}else if(t)return b0}return S0},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(q(n)){var a=this.__zr,i=!!(a&&a.isDarkMode()),o=Qh(t,0)<_0;if(i===o)return n}},e.prototype.buildPath=function(t,n,a){},e.prototype.pathUpdated=function(){this.__dirty&=~Ml},e.prototype.getUpdatedPathProxy=function(t){return!this.path&&this.createPathProxy(),this.path.beginPath(),this.buildPath(this.path,this.shape,t),this.path},e.prototype.createPathProxy=function(){this.path=new Da(!1)},e.prototype.hasStroke=function(){var t=this.style,n=t.stroke;return!(n==null||n==="none"||!(t.lineWidth>0))},e.prototype.hasFill=function(){var t=this.style,n=t.fill;return n!=null&&n!=="none"},e.prototype.getBoundingRect=function(){var t=this._rect,n=this.style,a=!t;if(a){var i=!1;this.path||(i=!0,this.createPathProxy());var o=this.path;(i||this.__dirty&Ml)&&(o.beginPath(),this.buildPath(o,this.shape,!1),this.pathUpdated()),t=o.getBoundingRect()}if(this._rect=t,this.hasStroke()&&this.path&&this.path.len()>0){var s=this._rectStroke||(this._rectStroke=t.clone());if(this.__dirty||a){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var f=this.strokeContainThreshold;u=Math.max(u,f??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 t},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect(),o=this.style;if(t=a[0],n=a[1],i.contain(t,n)){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)),Z8(s,l/u,t,n)))return!0}if(this.hasFill())return $8(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=Ml,this._rect&&(this._rect=null),this._decalEl&&this._decalEl.dirtyShape(),this.markRedraw()},e.prototype.dirty=function(){this.dirtyStyle(),this.dirtyShape()},e.prototype.animateShape=function(t){return this.animate("shape",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():t==="shape"?this.dirtyShape():this.markRedraw()},e.prototype.attrKV=function(t,n){t==="shape"?this.setShape(n):r.prototype.attrKV.call(this,t,n)},e.prototype.setShape=function(t,n){var a=this.shape;return a||(a=this.shape={}),typeof t=="string"?a[t]=n:H(a,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&Ml)},e.prototype.createStyle=function(t){return hd(ip,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=H({},this.shape))},e.prototype._applyStateObj=function(t,n,a,i,o,s){r.prototype._applyStateObj.call(this,t,n,a,i,o,s);var l=!(n&&i),u;if(n&&n.shape?o?i?u=n.shape:(u=H({},a.shape),H(u,n.shape)):(u=H({},i?this.shape:a.shape),H(u,n.shape)):l&&(u=a.shape),u)if(o){this.shape=H({},this.shape);for(var f={},c=Re(u),v=0;va&&(c=s+l,s*=a/c,l*=a/c),u+f>a&&(c=u+f,u*=a/c,f*=a/c),l+u>i&&(c=l+u,l*=i/c,u*=i/c),s+f>i&&(c=s+f,s*=i/c,f*=i/c),r.moveTo(t+s,n),r.lineTo(t+a-l,n),l!==0&&r.arc(t+a-l,n+l,l,-Math.PI/2,0),r.lineTo(t+a,n+i-u),u!==0&&r.arc(t+a-u,n+i-u,u,0,Math.PI/2),r.lineTo(t+f,n+i),f!==0&&r.arc(t+f,n+i-f,f,Math.PI/2,Math.PI),r.lineTo(t,n+s),s!==0&&r.arc(t+s,n+s,s,Math.PI,Math.PI*1.5)}var Ol=Math.round;function Td(r,e,t){if(e){var n=e.x1,a=e.x2,i=e.y1,o=e.y2;r.x1=n,r.x2=a,r.y1=i,r.y2=o;var s=t&&t.lineWidth;return s&&(Ol(n*2)===Ol(a*2)&&(r.x1=r.x2=tn(n,s,!0)),Ol(i*2)===Ol(o*2)&&(r.y1=r.y2=tn(i,s,!0))),r}}function jP(r,e,t){if(e){var n=e.x,a=e.y,i=e.width,o=e.height;r.x=n,r.y=a,r.width=i,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=tn(n,s,!0),r.y=tn(a,s,!0),r.width=Math.max(tn(n+i,s,!1)-r.x,i===0?0:1),r.height=Math.max(tn(a+o,s,!1)-r.y,o===0?0:1)),r}}function tn(r,e,t){if(!e)return r;var n=Ol(r*2);return(n+Ol(e))%2===0?n/2:(n+(t?1:-1))/2}var J8=(function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r})(),Q8={},Ce=(function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new J8},e.prototype.buildPath=function(t,n){var a,i,o,s;if(this.subPixelOptimize){var l=jP(Q8,n,this.style);a=l.x,i=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else a=n.x,i=n.y,o=n.width,s=n.height;n.r?K8(t,n):t.rect(a,i,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e})(Me);Ce.prototype.type="rect";var Rw={fill:"#000"},Ow=2,na={},e9={style:fe({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},bd.style)},Be=(function(r){N(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=Rw,n.attr(t),n}return e.prototype.childrenRef=function(){return this._children},e.prototype.update=function(){r.prototype.update.call(this),this.styleChanged()&&this._updateSubTexts();for(var t=0;t0,L=0;L=0&&(P=x[I],P.align==="right");)this._placeToken(P,t,T,y,L,"right",_),C-=P.width,L-=P.width,I--;for(D+=(f-(D-g)-(m-L)-C)/2;A<=I;)P=x[A],this._placeToken(P,t,T,y,D+P.width/2,"center",_),D+=P.width,A++;y+=T}},e.prototype._placeToken=function(t,n,a,i,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var f=t.verticalAlign,c=i+a/2;f==="top"?c=i+t.height/2:f==="bottom"&&(c=i+a-t.height/2);var v=!t.isLineHolder&&Bg(u);v&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,c-t.height/2,t.width,t.height);var h=!!u.backgroundColor,p=t.textPadding;p&&(o=Fw(o,s,p),c-=t.height/2-p[0]-t.innerHeight/2);var d=this._getOrCreateChild(Ql),g=d.createStyle();d.useStyle(g);var y=this._defaultStyle,m=!1,_=0,S=!1,b=Gw("fill"in u?u.fill:"fill"in n?n.fill:(m=!0,y.fill)),x=Vw("stroke"in u?u.stroke:"stroke"in n?n.stroke:!h&&!l&&(!y.autoStroke||m)?(_=Ow,S=!0,y.stroke):null),w=u.textShadowBlur>0||n.textShadowBlur>0;g.text=t.text,g.x=o,g.y=c,w&&(g.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,g.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",g.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,g.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),g.textAlign=s,g.textBaseline="middle",g.font=t.font||ai,g.opacity=nn(u.opacity,n.opacity,1),zw(g,u),x&&(g.lineWidth=nn(u.lineWidth,n.lineWidth,_),g.lineDash=re(u.lineDash,n.lineDash),g.lineDashOffset=n.lineDashOffset||0,g.stroke=x),b&&(g.fill=b),d.setBoundingRect(C0(g,t.contentWidth,t.contentHeight,S?0:null))},e.prototype._renderBackground=function(t,n,a,i,o,s){var l=t.backgroundColor,u=t.borderWidth,f=t.borderColor,c=l&&l.image,v=l&&!c,h=t.borderRadius,p=this,d,g;if(v||t.lineHeight||u&&f){d=this._getOrCreateChild(Ce),d.useStyle(d.createStyle()),d.style.fill=null;var y=d.shape;y.x=a,y.y=i,y.width=o,y.height=s,y.r=h,d.dirtyShape()}if(v){var m=d.style;m.fill=l||null,m.fillOpacity=re(t.fillOpacity,1)}else if(c){g=this._getOrCreateChild(ar),g.onload=function(){p.dirtyStyle()};var _=g.style;_.image=l.image,_.x=a,_.y=i,_.width=o,_.height=s}if(u&&f){var m=d.style;m.lineWidth=u,m.stroke=f,m.strokeOpacity=re(t.strokeOpacity,1),m.lineDash=t.borderDash,m.lineDashOffset=t.borderDashOffset||0,d.strokeContainThreshold=0,d.hasFill()&&d.hasStroke()&&(m.strokeFirst=!0,m.lineWidth*=2)}var S=(d||g).style;S.shadowBlur=t.shadowBlur||0,S.shadowColor=t.shadowColor||"transparent",S.shadowOffsetX=t.shadowOffsetX||0,S.shadowOffsetY=t.shadowOffsetY||0,S.opacity=nn(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return JP(t)&&(n=[t.fontStyle,t.fontWeight,KP(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&xn(n)||t.textFont||t.font},e})(In),t9={left:!0,right:1,center:1},r9={top:1,bottom:1,middle:1},Nw=["fontStyle","fontWeight","fontSize","fontFamily"];function KP(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?M1+"px":r+"px"}function zw(r,e){for(var t=0;t=0,i=!1;if(r instanceof Me){var o=QP(r),s=a&&o.selectFill||o.normalFill,l=a&&o.selectStroke||o.normalStroke;if(al(s)||al(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(i=!0,n=H({},n),u=H({},u),u.fill=s):!al(u.fill)&&al(s)?(i=!0,n=H({},n),u=H({},u),u.fill=v0(s)):!al(u.stroke)&&al(l)&&(i||(n=H({},n),u=H({},u)),u.stroke=v0(l)),n.style=u}}if(n&&n.z2==null){i||(n=H({},n));var f=r.z2EmphasisLift;n.z2=r.z2+(f??Su)}return n}function u9(r,e,t){if(t&&t.z2==null){t=H({},t);var n=r.z2SelectLift;t.z2=r.z2+(n??a9)}return t}function f9(r,e,t){var n=be(r.currentStates,e)>=0,a=r.style.opacity,i=n?null:s9(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=H({},t),o=H({opacity:n?a:i.opacity*.1},o),t.style=o),t}function Vg(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return l9(this,r,e,t);if(r==="blur")return f9(this,r,t);if(r==="select")return u9(this,r,t)}return t}function Rs(r){r.stateProxy=Vg;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=Vg),t&&(t.stateProxy=Vg)}function Uw(r,e){!ok(r,e)&&!r.__highByOuter&&hi(r,ek)}function Yw(r,e){!ok(r,e)&&!r.__highByOuter&&hi(r,tk)}function si(r,e){r.__highByOuter|=1<<(e||0),hi(r,ek)}function li(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&hi(r,tk)}function nk(r){hi(r,X1)}function q1(r){hi(r,rk)}function ak(r){hi(r,i9)}function ik(r){hi(r,o9)}function ok(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function sk(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(a,i){var o=Z1(i),s=a==="series",l=s?r.getViewOfSeriesModel(i):r.getViewOfComponentModel(i);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){rk(u)}),s&&t.push(i)),o.isBlured=!1}),M(n,function(a){a&&a.toggleBlurSeries&&a.toggleBlurSeries(t,!1,e)})}function L0(r,e,t,n){var a=n.getModel();t=t||"coordinateSystem";function i(u,f){for(var c=0;c0){var s={dataIndex:o,seriesIndex:t.seriesIndex};i!=null&&(s.dataType=i),e.push(s)}})}),e}function _s(r,e,t){ss(r,!0),hi(r,Rs),k0(r,e,t)}function g9(r){ss(r,!1)}function ut(r,e,t,n){n?g9(r):_s(r,e,t)}function k0(r,e,t){var n=ge(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var qw=["emphasis","blur","select"],y9={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Ft(r,e,t,n){t=t||"itemStyle";for(var a=0;a1&&(o*=Gg(p),s*=Gg(p));var d=(a===i?-1:1)*Gg((o*o*(s*s)-o*o*(h*h)-s*s*(v*v))/(o*o*(h*h)+s*s*(v*v)))||0,g=d*o*h/s,y=d*-s*v/o,m=(r+t)/2+mv(c)*g-yv(c)*y,_=(e+n)/2+yv(c)*g+mv(c)*y,S=Qw([1,0],[(v-g)/o,(h-y)/s]),b=[(v-g)/o,(h-y)/s],x=[(-1*v-g)/o,(-1*h-y)/s],w=Qw(b,x);if(R0(b,x)<=-1&&(w=Gu),R0(b,x)>=1&&(w=0),w<0){var T=Math.round(w/Gu*1e6)/1e6;w=Gu*2+T%2*Gu}f.addData(u,m,_,o,s,S,w,c,i)}var w9=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,T9=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function C9(r){var e=new Da;if(!r)return e;var t=0,n=0,a=t,i=n,o,s=Da.CMD,l=r.match(w9);if(!l)return e;for(var u=0;uP*P+E*E&&(T=A,C=D),{cx:T,cy:C,x0:-f,y0:-c,x1:T*(a/b-1),y1:C*(a/b-1)}}function k9(r){var e;if(W(r)){var t=r.length;if(!t)return r;t===1?e=[r[0],r[0],0,0]:t===2?e=[r[0],r[0],r[1],r[1]]:t===3?e=r.concat(r[2]):e=r}else e=[r,r,r,r];return e}function E9(r,e){var t,n=Sf(e.r,0),a=Sf(e.r0||0,0),i=n>0,o=a>0;if(!(!i&&!o)){if(i||(n=a,a=0),a>n){var s=n;n=a,a=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var f=e.cx,c=e.cy,v=!!e.clockwise,h=tT(u-l),p=h>Fg&&h%Fg;if(p>On&&(h=p),!(n>On))r.moveTo(f,c);else if(h>Fg-On)r.moveTo(f+n*ol(l),c+n*Eo(l)),r.arc(f,c,n,l,u,!v),a>On&&(r.moveTo(f+a*ol(u),c+a*Eo(u)),r.arc(f,c,a,u,l,v));else{var d=void 0,g=void 0,y=void 0,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0,w=void 0,T=void 0,C=void 0,A=void 0,D=void 0,L=void 0,I=void 0,P=void 0,E=n*ol(l),k=n*Eo(l),O=a*ol(u),R=a*Eo(u),z=h>On;if(z){var V=e.cornerRadius;V&&(t=k9(V),d=t[0],g=t[1],y=t[2],m=t[3]);var G=tT(n-a)/2;if(_=aa(G,y),S=aa(G,m),b=aa(G,d),x=aa(G,g),C=w=Sf(_,S),A=T=Sf(b,x),(w>On||T>On)&&(D=n*ol(u),L=n*Eo(u),I=a*ol(l),P=a*Eo(l),hOn){var ae=aa(y,C),_e=aa(m,C),ee=_v(I,P,E,k,n,ae,v),de=_v(D,L,O,R,n,_e,v);r.moveTo(f+ee.cx+ee.x0,c+ee.cy+ee.y0),C0&&r.arc(f+ee.cx,c+ee.cy,ae,gr(ee.y0,ee.x0),gr(ee.y1,ee.x1),!v),r.arc(f,c,n,gr(ee.cy+ee.y1,ee.cx+ee.x1),gr(de.cy+de.y1,de.cx+de.x1),!v),_e>0&&r.arc(f+de.cx,c+de.cy,_e,gr(de.y1,de.x1),gr(de.y0,de.x0),!v))}else r.moveTo(f+E,c+k),r.arc(f,c,n,l,u,!v);if(!(a>On)||!z)r.lineTo(f+O,c+R);else if(A>On){var ae=aa(d,A),_e=aa(g,A),ee=_v(O,R,D,L,a,-_e,v),de=_v(E,k,I,P,a,-ae,v);r.lineTo(f+ee.cx+ee.x0,c+ee.cy+ee.y0),A0&&r.arc(f+ee.cx,c+ee.cy,_e,gr(ee.y0,ee.x0),gr(ee.y1,ee.x1),!v),r.arc(f,c,a,gr(ee.cy+ee.y1,ee.cx+ee.x1),gr(de.cy+de.y1,de.cx+de.x1),v),ae>0&&r.arc(f+de.cx,c+de.cy,ae,gr(de.y1,de.x1),gr(de.y0,de.x0),!v))}else r.lineTo(f+O,c+R),r.arc(f,c,a,u,l,v)}r.closePath()}}}var R9=(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})(),br=(function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new R9},e.prototype.buildPath=function(t,n){E9(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e})(Me);br.prototype.type="sector";var O9=(function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r})(),Ec=(function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new O9},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.PI*2;t.moveTo(a+n.r,i),t.arc(a,i,n.r,0,o,!1),t.moveTo(a+n.r0,i),t.arc(a,i,n.r0,0,o,!0)},e})(Me);Ec.prototype.type="ring";function N9(r,e,t,n){var a=[],i=[],o=[],s=[],l,u,f,c;if(n){f=[1/0,1/0],c=[-1/0,-1/0];for(var v=0,h=r.length;v=2){if(n){var i=N9(a,n,t,e.smoothConstraint);r.moveTo(a[0][0],a[0][1]);for(var o=a.length,s=0;s<(t?o:o-1);s++){var l=i[s*2],u=i[s*2+1],f=a[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],f[0],f[1])}}else{r.moveTo(a[0][0],a[0][1]);for(var s=1,c=a.length;sOo[1]){if(i=!1,Qt.negativeSize||n)return i;var l=Sv(Oo[0]-Ro[1]),u=Sv(Ro[0]-Oo[1]);Hg(l,u)>xv.len()&&(l=u||!Qt.bidirectional)&&(ue.scale(bv,s,-u*a),Qt.useDir&&Qt.calcDirMTV()))}}return i},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var a=this._axes[e],i=this._origin,o=t[0].dot(a)+i[e],s=o,l=o,u=1;u0){var c=f.duration,v=f.delay,h=f.easing,p={duration:c,delay:v||0,easing:h,done:i,force:!!i||!!o,setToFinal:!u,scope:r,during:o};s?e.animateFrom(t,p):e.animateTo(t,p)}else e.stopAnimation(),!s&&e.attr(t),o&&o(1),i&&i()}function Ve(r,e,t,n,a,i){J1("update",r,e,t,n,a,i)}function st(r,e,t,n,a,i){J1("enter",r,e,t,n,a,i)}function $l(r){if(!r.__zr)return!0;for(var e=0;epa(i[1])?i[0]>0?"right":"left":i[1]>0?"bottom":"top"}function aT(r){return!r.isGroup}function K9(r){return r.shape!=null}function Oc(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){aT(l)&&l.anid&&(s[l.anid]=l)}),s}function a(o){var s={x:o.x,y:o.y,rotation:o.rotation};return K9(o)&&(s.shape=se(o.shape)),s}var i=n(r);e.traverse(function(o){if(aT(o)&&o.anid){var s=i[o.anid];if(s){var l=a(o);o.attr(a(s)),Ve(o,l,t,ge(o).dataIndex)}}})}function xk(r,e){return $(r,function(t){var n=t[0];n=Ct(n,e.x),n=an(n,e.x+e.width);var a=t[1];return a=Ct(a,e.y),a=an(a,e.y+e.height),[n,a]})}function J9(r,e){var t=Ct(r.x,e.x),n=an(r.x+r.width,e.x+e.width),a=Ct(r.y,e.y),i=an(r.y+r.height,e.y+e.height);if(n>=t&&i>=a)return{x:t,y:a,width:n-t,height:i-a}}function Nc(r,e,t){var n=H({rectHover:!0},e),a=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(a.image=r.slice(8),fe(a,t),new ar(n)):ac(r.replace("path://",""),n,t,"center")}function bf(r,e,t,n,a){for(var i=0,o=a[a.length-1];i1)return!1;var g=Wg(h,p,f,c)/v;return!(g<0||g>1)}function Wg(r,e,t,n){return r*n-t*e}function Q9(r){return r<=1e-6&&r>=-1e-6}function Os(r,e,t,n,a){return e==null||(ze(e)?vt[0]=vt[1]=vt[2]=vt[3]=e:(vt[0]=e[0],vt[1]=e[1],vt[2]=e[2],vt[3]=e[3]),n&&(vt[0]=Ct(0,vt[0]),vt[1]=Ct(0,vt[1]),vt[2]=Ct(0,vt[2]),vt[3]=Ct(0,vt[3])),t&&(vt[0]=-vt[0],vt[1]=-vt[1],vt[2]=-vt[2],vt[3]=-vt[3]),iT(r,vt,"x","width",3,1,a&&a[0]||0),iT(r,vt,"y","height",0,2,a&&a[1]||0)),r}var vt=[0,0,0,0];function iT(r,e,t,n,a,i,o){var s=e[i]+e[a],l=r[n];r[n]+=s,o=Ct(0,an(o,l)),r[n]=0?-e[a]:e[i]>=0?l+e[i]:pa(s)>1e-8?(l-o)*e[a]/s:0):r[t]-=e[a]}function di(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,a=q(e)?{formatter:e}:e,i=t.mainType,o=t.componentIndex,s={componentType:i,name:n,$vars:["name"]};s[i+"Index"]=o;var l=r.formatterParamsExtra;l&&M(Re(l),function(f){Q(s,f)||(s[f]=l[f],s.$vars.push(f))});var u=ge(r.el);u.componentMainType=i,u.componentIndex=o,u.tooltipConfig={name:n,option:fe({content:n,encodeHTMLContent:!0,formatterParams:s},a)}}function N0(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function po(r,e){if(r)if(W(r))for(var t=0;te&&(e=o),oe&&(t=e=0),{min:t,max:e}}function Pd(r,e,t){Ck(r,e,t,-1/0)}function Ck(r,e,t,n){if(r.ignoreModelZ)return n;var a=r.getTextContent(),i=r.getTextGuideLine(),o=r.isGroup;if(o)for(var s=r.childrenRef(),l=0;l=0&&s.push(l)}),s}}function go(r,e){return xe(xe({},r,!0),e,!0)}const c$={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:". "}}}},v$={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 cp="ZH",rS="EN",Zl=rS,Ih={},nS={},Pk=Pe.domSupported?(function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Zl).toUpperCase();return r.indexOf(cp)>-1?cp:Zl})():Zl;function kk(r,e){r=r.toUpperCase(),nS[r]=new ke(e),Ih[r]=e}function h$(r){if(q(r)){var e=Ih[r.toUpperCase()]||{};return r===cp||r===rS?se(e):xe(se(e),se(Ih[Zl]),!1)}else return xe(se(r),se(Ih[Zl]),!1)}function B0(r){return nS[r]}function p$(){return nS[Zl]}kk(rS,c$);kk(cp,v$);var V0=null;function d$(r){V0||(V0=r)}function Et(){return V0}var aS=1e3,iS=aS*60,Gf=iS*60,bn=Gf*24,fT=bn*365,g$={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})/},Lh={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}"},y$="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}",Tv="{yyyy}-{MM}-{dd}",cT={year:"{yyyy}",month:"{yyyy}-{MM}",day:Tv,hour:Tv+" "+Lh.hour,minute:Tv+" "+Lh.minute,second:Tv+" "+Lh.second,millisecond:y$},Kr=["year","month","day","hour","minute","second","millisecond"],m$=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function _$(r){return!q(r)&&!ie(r)?S$(r):r}function S$(r){r=r||{};var e={},t=!0;return M(Kr,function(n){t&&(t=r[n]==null)}),M(Kr,function(n,a){var i=r[n];e[n]={};for(var o=null,s=a;s>=0;s--){var l=Kr[s],u=ce(i)&&!W(i)?i[l]:i,f=void 0;W(u)?(f=u.slice(),o=f[0]||""):q(u)?(o=u,f=[o]):(o==null?o=Lh[n]:g$[l].test(o)||(o=e[l][l][0]+" "+o),f=[o],t&&(f[1]="{primary|"+o+"}")),e[n][l]=f}}),e}function Ti(r,e){return r+="","0000".substr(0,e-r.length)+r}function Ff(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 b$(r){return r===Ff(r)}function x$(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function Ed(r,e,t,n){var a=$s(r),i=a[Ek(t)](),o=a[oS(t)]()+1,s=Math.floor((o-1)/3)+1,l=a[sS(t)](),u=a["get"+(t?"UTC":"")+"Day"](),f=a[lS(t)](),c=(f-1)%12+1,v=a[uS(t)](),h=a[fS(t)](),p=a[cS(t)](),d=f>=12?"pm":"am",g=d.toUpperCase(),y=n instanceof ke?n:B0(n||Pk)||p$(),m=y.getModel("time"),_=m.get("month"),S=m.get("monthAbbr"),b=m.get("dayOfWeek"),x=m.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,d+"").replace(/{A}/g,g+"").replace(/{yyyy}/g,i+"").replace(/{yy}/g,Ti(i%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,S[o-1]).replace(/{MM}/g,Ti(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Ti(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,b[u]).replace(/{ee}/g,x[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Ti(f,2)).replace(/{H}/g,f+"").replace(/{hh}/g,Ti(c+"",2)).replace(/{h}/g,c+"").replace(/{mm}/g,Ti(v,2)).replace(/{m}/g,v+"").replace(/{ss}/g,Ti(h,2)).replace(/{s}/g,h+"").replace(/{SSS}/g,Ti(p,3)).replace(/{S}/g,p+"")}function w$(r,e,t,n,a){var i=null;if(q(t))i=t;else if(ie(t)){var o={time:r.time,level:r.time.level},s=Et();s&&s.makeAxisLabelFormatterParamBreak(o,r.break),i=t(r.value,e,o)}else{var l=r.time;if(l){var u=t[l.lowerTimeUnit][l.upperTimeUnit];i=u[Math.min(l.level,u.length-1)]||""}else{var f=zl(r.value,a);i=t[f][f][0]}}return Ed(new Date(r.value),i,a,n)}function zl(r,e){var t=$s(r),n=t[oS(e)]()+1,a=t[sS(e)](),i=t[lS(e)](),o=t[uS(e)](),s=t[fS(e)](),l=t[cS(e)](),u=l===0,f=u&&s===0,c=f&&o===0,v=c&&i===0,h=v&&a===1,p=h&&n===1;return p?"year":h?"month":v?"day":c?"hour":f?"minute":u?"second":"millisecond"}function G0(r,e,t){switch(e){case"year":r[Rk(t)](0);case"month":r[Ok(t)](1);case"day":r[Nk(t)](0);case"hour":r[zk(t)](0);case"minute":r[Bk(t)](0);case"second":r[Vk(t)](0)}return r}function Ek(r){return r?"getUTCFullYear":"getFullYear"}function oS(r){return r?"getUTCMonth":"getMonth"}function sS(r){return r?"getUTCDate":"getDate"}function lS(r){return r?"getUTCHours":"getHours"}function uS(r){return r?"getUTCMinutes":"getMinutes"}function fS(r){return r?"getUTCSeconds":"getSeconds"}function cS(r){return r?"getUTCMilliseconds":"getMilliseconds"}function T$(r){return r?"setUTCFullYear":"setFullYear"}function Rk(r){return r?"setUTCMonth":"setMonth"}function Ok(r){return r?"setUTCDate":"setDate"}function Nk(r){return r?"setUTCHours":"setHours"}function zk(r){return r?"setUTCMinutes":"setMinutes"}function Bk(r){return r?"setUTCSeconds":"setSeconds"}function Vk(r){return r?"setUTCMilliseconds":"setMilliseconds"}function Gk(r){if(!kP(r))return q(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function Fk(r,e){return r=(r||"").toLowerCase().replace(/-(.)/g,function(t,n){return n.toUpperCase()}),e&&r&&(r=r.charAt(0).toUpperCase()+r.slice(1)),r}var zc=vd;function F0(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function a(f){return f&&xn(f)?f:"-"}function i(f){return!!(f!=null&&!isNaN(f)&&isFinite(f))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?$s(r):r;if(isNaN(+l)){if(s)return"-"}else return Ed(l,n,t)}if(e==="ordinal")return Jm(r)?a(r):ze(r)&&i(r)?r+"":"-";var u=oi(r);return i(u)?Gk(u):Jm(r)?a(r):typeof r=="boolean"?r+"":"-"}var vT=["a","b","c","d","e","f","g"],Ug=function(r,e){return"{"+r+(e??"")+"}"};function Hk(r,e,t){W(e)||(e=[e]);var n=e.length;if(!n)return"";for(var a=e[0].$vars||[],i=0;i':'';var o=t.markerId||"markerX";return{renderMode:i,content:"{"+o+"|} ",style:a==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function zs(r,e){return e=e||"transparent",q(r)?r:ce(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function vp(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var Ph={},Yg={},Bc=(function(){function r(){this._normalMasterList=[],this._nonSeriesBoxMasterList=[]}return r.prototype.create=function(e,t){this._nonSeriesBoxMasterList=n(Ph),this._normalMasterList=n(Yg);function n(a,i){var o=[];return M(a,function(s,l){var u=s.create(e,t);o=o.concat(u||[])}),o}},r.prototype.update=function(e,t){M(this._normalMasterList,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._normalMasterList.concat(this._nonSeriesBoxMasterList)},r.register=function(e,t){if(e==="matrix"||e==="calendar"){Ph[e]=t;return}Yg[e]=t},r.get=function(e){return Yg[e]||Ph[e]},r})();function M$(r){return!!Ph[r]}var H0={coord:1,coord2:2};function D$(r){Wk.set(r.fullType,{getCoord2:void 0}).getCoord2=r.getCoord2}var Wk=te();function I$(r){var e=r.getShallow("coord",!0),t=H0.coord;if(e==null){var n=Wk.get(r.type);n&&n.getCoord2&&(t=H0.coord2,e=n.getCoord2(r))}return{coord:e,from:t}}var va={none:0,dataCoordSys:1,boxCoordSys:2};function $k(r,e){var t=r.getShallow("coordinateSystem"),n=r.getShallow("coordinateSystemUsage",!0),a=va.none;if(t){var i=r.mainType==="series";n==null&&(n=i?"data":"box"),n==="data"?(a=va.dataCoordSys,i||(a=va.none)):n==="box"&&(a=va.boxCoordSys,!i&&!M$(t)&&(a=va.none))}return{coordSysType:t,kind:a}}function Vc(r){var e=r.targetModel,t=r.coordSysType,n=r.coordSysProvider,a=r.isDefaultDataCoordSys;r.allowNotFound;var i=$k(e),o=i.kind,s=i.coordSysType;if(a&&o!==va.dataCoordSys&&(o=va.dataCoordSys,s=t),o===va.none||s!==t)return!1;var l=n(t,e);return l?(o===va.dataCoordSys?e.coordinateSystem=l:e.boxCoordinateSystem=l,!0):!1}var Zk=function(r,e){var t=e.getReferringComponents(r,dt).models[0];return t&&t.coordinateSystem},kh=M,Uk=["left","right","top","bottom","width","height"],ls=[["width","left","right"],["height","top","bottom"]];function vS(r,e,t,n,a){var i=0,o=0;n==null&&(n=1/0),a==null&&(a=1/0);var s=0;e.eachChild(function(l,u){var f=l.getBoundingRect(),c=e.childAt(u+1),v=c&&c.getBoundingRect(),h,p;if(r==="horizontal"){var d=f.width+(v?-v.x+f.x:0);h=i+d,h>n||l.newline?(i=0,h=d,o+=s+t,s=f.height):s=Math.max(s,f.height)}else{var g=f.height+(v?-v.y+f.y:0);p=o+g,p>a||l.newline?(i+=s+t,o=0,p=g,s=f.width):s=Math.max(s,f.width)}l.newline||(l.x=i,l.y=o,l.markRedraw(),r==="horizontal"?i=h+t:o=p+t)})}var bs=vS;Se(vS,"vertical");Se(vS,"horizontal");function Yk(r,e){return{left:r.getShallow("left",e),top:r.getShallow("top",e),right:r.getShallow("right",e),bottom:r.getShallow("bottom",e),width:r.getShallow("width",e),height:r.getShallow("height",e)}}function L$(r,e){var t=Zt(r,e,{enableLayoutOnlyByCenter:!0}),n=r.getBoxLayoutParams(),a,i;if(t.type===xf.point)i=t.refPoint,a=ft(n,{width:e.getWidth(),height:e.getHeight()});else{var o=r.get("center"),s=W(o)?o:[o,o];a=ft(n,t.refContainer),i=t.boxCoordFrom===H0.coord2?t.refPoint:[X(s[0],a.width)+a.x,X(s[1],a.height)+a.y]}return{viewRect:a,center:i}}function Xk(r,e){var t=L$(r,e),n=t.viewRect,a=t.center,i=r.get("radius");W(i)||(i=[0,i]);var o=X(n.width,e.getWidth()),s=X(n.height,e.getHeight()),l=Math.min(o,s),u=X(i[0],l/2),f=X(i[1],l/2);return{cx:a[0],cy:a[1],r0:u,r:f,viewRect:n}}function ft(r,e,t){t=zc(t||0);var n=e.width,a=e.height,i=X(r.left,n),o=X(r.top,a),s=X(r.right,n),l=X(r.bottom,a),u=X(r.width,n),f=X(r.height,a),c=t[2]+t[0],v=t[1]+t[3],h=r.aspect;switch(isNaN(u)&&(u=n-s-v-i),isNaN(f)&&(f=a-l-c-o),h!=null&&(isNaN(u)&&isNaN(f)&&(h>n/a?u=n*.8:f=a*.8),isNaN(u)&&(u=h*f),isNaN(f)&&(f=u/h)),isNaN(i)&&(i=n-s-u-v),isNaN(o)&&(o=a-l-f-c),r.left||r.right){case"center":i=n/2-u/2-t[3];break;case"right":i=n-u-v;break}switch(r.top||r.bottom){case"middle":case"center":o=a/2-f/2-t[0];break;case"bottom":o=a-f-c;break}i=i||0,o=o||0,isNaN(u)&&(u=n-v-i-(s||0)),isNaN(f)&&(f=a-c-o-(l||0));var p=new ve((e.x||0)+i+t[3],(e.y||0)+o+t[0],u,f);return p.margin=t,p}function qk(r,e,t){var n=r.getShallow("preserveAspect",!0);if(!n)return e;var a=e.width/e.height;if(Math.abs(Math.atan(t)-Math.atan(a))<1e-9)return e;var i=r.getShallow("preserveAspectAlign",!0),o=r.getShallow("preserveAspectVerticalAlign",!0),s={width:e.width,height:e.height},l=n==="cover";return a>t&&!l||a=d)return c;for(var g=0;g=0;l--)s=xe(s,a[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var a=t+"Index",i=t+"Id";return _u(this.ecModel,t,{index:this.get(a,!0),id:this.get(i,!0)},n)},e.prototype.getBoxLayoutParams=function(){return Yk(this,!1)},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=(function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0})(),e})(ke);WP(Le,ke);_d(Le);u$(Le);f$(Le,E$);function E$(r){var e=[];return M(Le.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=$(e,function(t){return ga(t).main}),r!=="dataset"&&be(e,"dataset")<=0&&e.unshift("dataset"),e}var B={color:{},darkColor:{},size:{}},xt=B.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)"};H(xt,{primary:xt.neutral80,secondary:xt.neutral70,tertiary:xt.neutral60,quaternary:xt.neutral50,disabled:xt.neutral20,border:xt.neutral30,borderTint:xt.neutral20,borderShade:xt.neutral40,background:xt.neutral05,backgroundTint:"rgba(234,237,245,0.5)",backgroundTransparent:"rgba(255,255,255,0)",backgroundShade:xt.neutral10,shadow:"rgba(0,0,0,0.2)",shadowTint:"rgba(129,130,136,0.2)",axisLine:xt.neutral70,axisLineTint:xt.neutral40,axisTick:xt.neutral70,axisTickMinor:xt.neutral60,axisLabel:xt.neutral70,axisSplitLine:xt.neutral15,axisMinorSplitLine:xt.neutral05});for(var No in xt)if(xt.hasOwnProperty(No)){var hT=xt[No];No==="theme"?B.darkColor.theme=xt.theme.slice():No==="highlight"?B.darkColor.highlight="rgba(255,231,130,0.4)":No.indexOf("accent")===0?B.darkColor[No]=Ji(hT,null,function(r){return r*.5},function(r){return Math.min(1,1.3-r)}):B.darkColor[No]=Ji(hT,null,function(r){return r*.9},function(r){return 1-Math.pow(r,1.5)})}B.size={xxs:2,xs:5,s:10,m:15,l:20,xl:30,xxl:40,xxxl:50};var Kk="";typeof navigator<"u"&&(Kk=navigator.platform||"");var sl="rgba(0, 0, 0, 0.2)",Jk=B.color.theme[0],R$=Ji(Jk,null,null,.9);const O$={darkMode:"auto",colorBy:"series",color:B.color.theme,gradientColor:[R$,Jk],aria:{decal:{decals:[{color:sl,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:sl,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:sl,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:sl,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:sl,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:sl,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:Kk.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 Qk=te(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),on="original",nr="arrayRows",sn="objectRows",Jn="keyedColumns",eo="typedArray",eE="unknown",Zn="column",Ys="row",or={Must:1,Might:2,Not:3},tE=Ae();function N$(r){tE(r).datasetMap=te()}function rE(r,e,t){var n={},a=pS(e);if(!a||!r)return n;var i=[],o=[],s=e.ecModel,l=tE(s).datasetMap,u=a.uid+"_"+t.seriesLayoutBy,f,c;r=r.slice(),M(r,function(d,g){var y=ce(d)?d:r[g]={name:d};y.type==="ordinal"&&f==null&&(f=g,c=p(y)),n[y.name]=[]});var v=l.get(u)||l.set(u,{categoryWayDim:c,valueWayDim:0});M(r,function(d,g){var y=d.name,m=p(d);if(f==null){var _=v.valueWayDim;h(n[y],_,m),h(o,_,m),v.valueWayDim+=m}else if(f===g)h(n[y],0,m),h(i,0,m);else{var _=v.categoryWayDim;h(n[y],_,m),h(o,_,m),v.categoryWayDim+=m}});function h(d,g,y){for(var m=0;me)return r[n];return r[t-1]}function iE(r,e,t,n,a,i,o){i=i||r;var s=e(i),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(a))return u[a];var f=o==null||!n?t:F$(n,o);if(f=f||t,!(!f||!f.length)){var c=f[l];return a&&(u[a]=c),s.paletteIdx=(l+1)%f.length,c}}function H$(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var Cv,Fu,dT,gT="\0_ec_inner",W$=1,gS=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,a,i,o,s){i=i||{},this.option=null,this._theme=new ke(i),this._locale=new ke(o),this._optionManager=s},e.prototype.setOption=function(t,n,a){var i=_T(n);this._optionManager.setOption(t,a,i),this._resetOption(null,i)},e.prototype.resetOption=function(t,n){return this._resetOption(t,_T(n))},e.prototype._resetOption=function(t,n){var a=!1,i=this._optionManager;if(!t||t==="recreate"){var o=i.mountOption(t==="recreate");!this.option||t==="recreate"?dT(this,o):(this.restoreData(),this._mergeOption(o,n)),a=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=i.getTimelineOption(this);s&&(a=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=i.getMediaOption(this);l.length&&M(l,function(u){a=!0,this._mergeOption(u,n)},this)}return a},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var a=this.option,i=this._componentsMap,o=this._componentsCount,s=[],l=te(),u=n&&n.replaceMergeMainTypeMap;N$(this),M(t,function(c,v){c!=null&&(Le.hasClass(v)?v&&(s.push(v),l.set(v,!0)):a[v]=a[v]==null?se(c):xe(a[v],c,!0))}),u&&u.each(function(c,v){Le.hasClass(v)&&!l.get(v)&&(s.push(v),l.set(v,!0))}),Le.topologicalTravel(s,Le.getAllClassMainTypes(),f,this);function f(c){var v=V$(this,c,Qe(t[c])),h=i.get(c),p=h?u&&u.get(c)?"replaceMerge":"normalMerge":"replaceAll",d=BP(h,v,p);r8(d,c,Le),a[c]=null,i.set(c,null),o.set(c,0);var g=[],y=[],m=0,_;M(d,function(S,b){var x=S.existing,w=S.newOption;if(!w)x&&(x.mergeOption({},this),x.optionUpdated({},!1));else{var T=c==="series",C=Le.getClass(c,S.keyInfo.subType,!T);if(!C)return;if(c==="tooltip"){if(_)return;_=!0}if(x&&x.constructor===C)x.name=S.keyInfo.name,x.mergeOption(w,this),x.optionUpdated(w,!1);else{var A=H({componentIndex:b},S.keyInfo);x=new C(w,this,this,A),H(x,A),S.brandNew&&(x.__requireNewView=!0),x.init(w,this,this),x.optionUpdated(null,!0)}}x?(g.push(x.option),y.push(x),m++):(g.push(void 0),y.push(void 0))},this),a[c]=g,i.set(c,y),o.set(c,m),c==="series"&&Cv(this)}this._seriesIndices||Cv(this)},e.prototype.getOption=function(){var t=se(this.option);return M(t,function(n,a){if(Le.hasClass(a)){for(var i=Qe(n),o=i.length,s=!1,l=o-1;l>=0;l--)i[l]&&!tc(i[l])?s=!0:(i[l]=null,!s&&o--);i.length=o,t[a]=i}}),delete t[gT],t},e.prototype.setTheme=function(t){this._theme=new ke(t),this._resetOption("recreate",null)},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var a=this._componentsMap.get(t);if(a){var i=a[n||0];if(i)return i;if(n==null){for(var o=0;o=e:t==="max"?r<=e:r===e}function J$(r,e){return r.join(",")===e.join(",")}var Rn=M,sc=ce,ST=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function Xg(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=ST.length;t0?t[o-1].seriesModel:null)}),sZ(t)}})}function sZ(r){M(r,function(e,t){var n=[],a=[NaN,NaN],i=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(i,function(u,f,c){var v=o.get(e.stackedDimension,c);if(isNaN(v))return a;var h,p;s?p=o.getRawIndex(c):h=o.get(e.stackedByDimension,c);for(var d=NaN,g=t-1;g>=0;g--){var y=r[g];if(s||(p=y.data.rawIndexOf(y.stackedByDimension,h)),p>=0){var m=y.data.getByRawIndex(y.stackResultDimension,p);if(l==="all"||l==="positive"&&m>0||l==="negative"&&m<0||l==="samesign"&&v>=0&&m>0||l==="samesign"&&v<=0&&m<0){v=HW(v,m),d=m;break}}}return n[0]=v,n[1]=d,n})})}var Od=(function(){function r(e){this.data=e.data||(e.sourceFormat===Jn?{}:[]),this.sourceFormat=e.sourceFormat||eE,this.seriesLayoutBy=e.seriesLayoutBy||Zn,this.startIndex=e.startIndex||0,this.dimensionsDetectedCount=e.dimensionsDetectedCount,this.metaRawOption=e.metaRawOption;var t=this.dimensionsDefine=e.dimensionsDefine;if(t)for(var n=0;nd&&(d=_)}h[0]=p,h[1]=d}},a=function(){return this._data?this._data.length/this._dimSize:0};MT=(e={},e[nr+"_"+Zn]={pure:!0,appendData:i},e[nr+"_"+Ys]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[sn]={pure:!0,appendData:i},e[Jn]={pure:!0,appendData:function(o){var s=this._data;M(o,function(l,u){for(var f=s[u]||(s[u]=[]),c=0;c<(l||[]).length;c++)f.push(l[c])})}},e[on]={appendData:i},e[eo]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function i(o){for(var s=0;s=0&&(d=o.interpolatedValue[g])}return d!=null?d+"":""})}},r.prototype.getRawValue=function(e,t){return tu(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r})();function PT(r){var e,t;return ce(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function Hf(r){return new dZ(r)}var dZ=(function(){function r(e){e=e||{},this._reset=e.reset,this._plan=e.plan,this._count=e.count,this._onDirty=e.onDirty,this._dirty=!0}return r.prototype.perform=function(e){var t=this._upstream,n=e&&e.skip;if(this._dirty&&t){var a=this.context;a.data=a.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var i;this._plan&&!n&&(i=this._plan(this.context));var o=f(this._modBy),s=this._modDataCount||0,l=f(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(i="reset");function f(m){return!(m>=1)&&(m=1),m}var c;(this._dirty||i==="reset")&&(this._dirty=!1,c=this._doReset(n)),this._modBy=l,this._modDataCount=u;var v=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var h=this._dueIndex,p=Math.min(v!=null?this._dueIndex+v:1/0,this._dueEnd);if(!n&&(c||h1&&n>0?s:o}};return i;function o(){return e=r?null:le},gte:function(r,e){return r>=e}},yZ=(function(){function r(e,t){if(!ze(t)){var n="";He(n)}this._opFn=gE[e],this._rvalFloat=oi(t)}return r.prototype.evaluate=function(e){return ze(e)?this._opFn(e,this._rvalFloat):this._opFn(oi(e),this._rvalFloat)},r})(),yE=(function(){function r(e,t){var n=e==="desc";this._resultLT=n?1:-1,t==null&&(t=n?"min":"max"),this._incomparable=t==="min"?-1/0:1/0}return r.prototype.evaluate=function(e,t){var n=ze(e)?e:oi(e),a=ze(t)?t:oi(t),i=isNaN(n),o=isNaN(a);if(i&&(n=this._incomparable),o&&(a=this._incomparable),i&&o){var s=q(e),l=q(t);s&&(n=l?e:0),l&&(a=s?t:0)}return na?-this._resultLT:0},r})(),mZ=(function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=oi(t)}return r.prototype.evaluate=function(e){var t=e===this._rval;if(!t){var n=typeof e;n!==this._rvalTypeof&&(n==="number"||this._rvalTypeof==="number")&&(t=oi(e)===this._rvalFloat)}return this._isEQ?t:!t},r})();function _Z(r,e){return r==="eq"||r==="ne"?new mZ(r==="eq",e):Q(gE,r)?new yZ(r,e):null}var SZ=(function(){function r(){}return r.prototype.getRawData=function(){throw new Error("not supported")},r.prototype.getRawDataItem=function(e){throw new Error("not supported")},r.prototype.cloneRawData=function(){},r.prototype.getDimensionInfo=function(e){},r.prototype.cloneAllDimensionInfo=function(){},r.prototype.count=function(){},r.prototype.retrieveValue=function(e,t){},r.prototype.retrieveValueFromItem=function(e,t){},r.prototype.convertValue=function(e,t){return to(e,t)},r})();function bZ(r,e){var t=new SZ,n=r.data,a=t.sourceFormat=r.sourceFormat,i=r.startIndex,o="";r.seriesLayoutBy!==Zn&&He(o);var s=[],l={},u=r.dimensionsDefine;if(u)M(u,function(d,g){var y=d.name,m={index:g,name:y,displayName:d.displayName};if(s.push(m),y!=null){var _="";Q(l,y)&&He(_),l[y]=m}});else for(var f=0;f65535?IZ:LZ}function ul(){return[1/0,-1/0]}function PZ(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function RT(r,e,t,n,a){var i=SE[t||"float"];if(a){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new i(n),u=0;ug[1]&&(g[1]=d)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var a=this._provider,i=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=$(o,function(m){return m.property}),f=0;fy[1]&&(y[1]=g)}}!a.persistent&&a.clean&&a.clean(),this._rawCount=this._count=t,this._extent=[]},r.prototype.count=function(){return this._count},r.prototype.get=function(e,t){if(!(t>=0&&t=0&&t=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&ne)i=o-1;else return o}return-1},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,a=this._count;if(n===Array){e=new n(a);for(var i=0;i=c&&m<=v||isNaN(m))&&(l[u++]=d),d++}p=!0}else if(i===2){for(var g=h[a[0]],_=h[a[1]],S=e[a[1]][0],b=e[a[1]][1],y=0;y=c&&m<=v||isNaN(m))&&(x>=S&&x<=b||isNaN(x))&&(l[u++]=d),d++}p=!0}}if(!p)if(i===1)for(var y=0;y=c&&m<=v||isNaN(m))&&(l[u++]=w)}else for(var y=0;ye[A][1])&&(T=!1)}T&&(l[u++]=t.getRawIndex(y))}return uy[1]&&(y[1]=g)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),a=n._chunks,i=a[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),f,c,v,h=new(ll(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));h[s++]=u;for(var p=1;pf&&(f=c,v=S)}D>0&&Ds&&(d=s-f);for(var g=0;gp&&(p=m,h=f+g)}var _=this.getRawIndex(c),S=this.getRawIndex(h);cf-p&&(l=f-p,s.length=l);for(var d=0;dc[1]&&(c[1]=y),v[h++]=m}return i._count=h,i._indices=v,i._updateGetRawIdx(),i},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,a=this._chunks,i=0,o=this.count();il&&(l=c)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],a=this._chunks,i=0;i=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=(function(){function e(t,n,a,i){return to(t[i],this._dimensions[i])}Kg={arrayRows:e,objectRows:function(t,n,a,i){return to(t[n],this._dimensions[i])},keyedColumns:e,original:function(t,n,a,i){var o=t&&(t.value==null?t:t.value);return to(o instanceof Array?o[i]:o,this._dimensions[i])},typedArray:function(t,n,a,i){return t[i]}}})(),r})(),bE=(function(){function r(e){this._sourceList=[],this._storeList=[],this._upstreamSignList=[],this._versionSignBase=0,this._dirty=!0,this._sourceHost=e}return r.prototype.dirty=function(){this._setLocalSource([],[]),this._storeList=[],this._dirty=!0},r.prototype._setLocalSource=function(e,t){this._sourceList=e,this._upstreamSignList=t,this._versionSignBase++,this._versionSignBase>9e10&&(this._versionSignBase=0)},r.prototype._getVersionSign=function(){return this._sourceHost.uid+"_"+this._versionSignBase},r.prototype.prepareSource=function(){this._isDirty()&&(this._createSource(),this._dirty=!1)},r.prototype._createSource=function(){this._setLocalSource([],[]);var e=this._sourceHost,t=this._getUpstreamSourceManagers(),n=!!t.length,a,i;if(Mv(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var f=t[0];f.prepareSource(),u=f.getSource(),s=u.data,l=u.sourceFormat,i=[f._getVersionSign()]}else s=o.get("data",!0),l=Ur(s)?eo:on,i=[];var c=this._getSourceMetaRawOption()||{},v=u&&u.metaRawOption||{},h=re(c.seriesLayoutBy,v.seriesLayoutBy)||null,p=re(c.sourceHeader,v.sourceHeader),d=re(c.dimensions,v.dimensions),g=h!==v.seriesLayoutBy||!!p!=!!v.sourceHeader||d;a=g?[Z0(s,{seriesLayoutBy:h,sourceHeader:p,dimensions:d},l)]:[]}else{var y=e;if(n){var m=this._applyTransform(t);a=m.sourceList,i=m.upstreamSignList}else{var _=y.get("source",!0);a=[Z0(_,this._getSourceMetaRawOption(),null)],i=[]}}this._setLocalSource(a,i)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),a=t.get("fromTransformResult",!0);if(a!=null){var i="";e.length!==1&&NT(i)}var o,s=[],l=[];return M(e,function(u){u.prepareSource();var f=u.getSource(a||0),c="";a!=null&&!f&&NT(c),s.push(f),l.push(u._getVersionSign())}),n?o=MZ(n,s,{datasetIndex:t.componentIndex}):a!=null&&(o=[lZ(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t1||t>0&&!r.noHeader;return M(r.blocks,function(a){var i=CE(a);i>=e&&(e=i+ +(n&&(!i||Y0(a)&&!a.noHeader)))}),e}return 0}function OZ(r,e,t,n){var a=e.noHeader,i=zZ(CE(e)),o=[],s=e.blocks||[];Sr(!s||W(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(Q(u,l)){var f=new yE(u[l],null);s.sort(function(d,g){return f.evaluate(d.sortParam,g.sortParam)})}else l==="seriesDesc"&&s.reverse()}M(s,function(d,g){var y=e.valueFormatter,m=TE(d)(y?H(H({},r),{valueFormatter:y}):r,d,g>0?i.html:0,n);m!=null&&o.push(m)});var c=r.renderMode==="richText"?o.join(i.richText):X0(n,o.join(""),a?t:i.html);if(a)return c;var v=F0(e.header,"ordinal",r.useUTC),h=wE(n,r.renderMode).nameStyle,p=xE(n);return r.renderMode==="richText"?AE(r,v,h)+i.richText+c:X0(n,'
'+Rr(v)+"
"+c,t)}function NZ(r,e,t,n){var a=r.renderMode,i=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,f=e.valueFormatter||r.valueFormatter||function(S){return S=W(S)?S:[S],$(S,function(b,x){return F0(b,W(h)?h[x]:h,u)})};if(!(i&&o)){var c=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||B.color.secondary,a),v=i?"":F0(l,"ordinal",u),h=e.valueType,p=o?[]:f(e.value,e.dataIndex),d=!s||!i,g=!s&&i,y=wE(n,a),m=y.nameStyle,_=y.valueStyle;return a==="richText"?(s?"":c)+(i?"":AE(r,v,m))+(o?"":GZ(r,p,d,g,_)):X0(n,(s?"":c)+(i?"":BZ(v,!s,m))+(o?"":VZ(p,d,g,_)),t)}}function zT(r,e,t,n,a,i){if(r){var o=TE(r),s={useUTC:a,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,i)}}function zZ(r){return{html:EZ[r],richText:RZ[r]}}function X0(r,e,t){var n='
',a="margin: "+t+"px 0 0",i=xE(r);return'
'+e+n+"
"}function BZ(r,e,t){var n=e?"margin-left:2px":"";return''+Rr(r)+""}function VZ(r,e,t,n){var a=t?"10px":"20px",i=e?"float:right;margin-left:"+a:"";return r=W(r)?r:[r],''+$(r,function(o){return Rr(o)}).join("  ")+""}function AE(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function GZ(r,e,t,n,a){var i=[a],o=n?10:20;return t&&i.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(W(e)?e.join(" "):e,i)}function ME(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return zs(n)}function DE(r,e){var t=r.get("padding");return t??(e==="richText"?[8,10]:10)}var Jg=(function(){function r(){this.richTextStyles={},this._nextStyleNameId=EP()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var a=n==="richText"?this._generateStyleName():null,i=A$({color:t,type:e,renderMode:n,markerId:a});return q(i)?i:(this.richTextStyles[a]=i.style,i.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};W(t)?M(t,function(i){return H(n,i)}):H(n,t);var a=this._generateStyleName();return this.richTextStyles[a]=n,"{"+a+"|"+e+"}"},r})();function IE(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,a=e.getData(),i=a.mapDimensionsAll("defaultedTooltip"),o=i.length,s=e.getRawValue(t),l=W(s),u=ME(e,t),f,c,v,h;if(o>1||l&&!o){var p=FZ(s,e,t,i,u);f=p.inlineValues,c=p.inlineValueTypes,v=p.blocks,h=p.inlineValues[0]}else if(o){var d=a.getDimensionInfo(i[0]);h=f=tu(a,t,i[0]),c=d.type}else h=f=l?s[0]:s;var g=G1(e),y=g&&e.name||"",m=a.getName(t),_=n?y:m;return Ot("section",{header:y,noHeader:n||!g,sortParam:h,blocks:[Ot("nameValue",{markerType:"item",markerColor:u,name:_,noName:!xn(_),value:f,valueType:c,dataIndex:t})].concat(v||[])})}function FZ(r,e,t,n,a){var i=e.getData(),o=Ca(r,function(c,v,h){var p=i.getDimensionInfo(h);return c=c||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?M(n,function(c){f(tu(i,t,c),c)}):M(r,f);function f(c,v){var h=i.getDimensionInfo(v);!h||h.otherDims.tooltip===!1||(o?u.push(Ot("nameValue",{markerType:"subItem",markerColor:a,name:h.displayName,value:c,valueType:h.type})):(s.push(c),l.push(h.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Ci=Ae();function Dv(r,e){return r.getName(e)||r.getId(e)}var Eh="__universalTransitionEnabled",nt=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,a){this.seriesIndex=this.componentIndex,this.dataTask=Hf({count:WZ,reset:$Z}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,a);var i=Ci(this).sourceManager=new bE(this);i.prepareSource();var o=this.getInitialData(t,a);VT(o,this),this.dataTask.context.data=o,Ci(this).dataBeforeProcessed=o,BT(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var a=oc(this),i=a?Us(t):{},o=this.subType;Le.hasClass(o)&&(o+="Series"),xe(t,n.getTheme().get(this.subType)),xe(t,this.getDefaultOption()),Ps(t,"label",["show"]),this.fillDataTextStyle(t.data),a&&Ia(t,i,a)},e.prototype.mergeOption=function(t,n){t=xe(this.option,t,!0),this.fillDataTextStyle(t.data);var a=oc(this);a&&Ia(this.option,t,a);var i=Ci(this).sourceManager;i.dirty(),i.prepareSource();var o=this.getInitialData(t,n);VT(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Ci(this).dataBeforeProcessed=o,BT(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Ur(t))for(var n=["show"],a=0;a=0&&v<0)&&(c=m,v=y,h=0),y===v&&(f[h++]=d))}),f.length=h,f},e.prototype.formatTooltip=function(t,n,a){return IE({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(Pe.node&&!(t&&t.ssr))return!1;var n=this.getShallow("animation");return n&&this.getData().count()>this.getShallow("animationThreshold")&&(n=!1),!!n},e.prototype.restoreData=function(){this.dataTask.dirty()},e.prototype.getColorFromPalette=function(t,n,a){var i=this.ecModel,o=dS.prototype.getColorFromPalette.call(this,t,n,a);return o||(o=i.getColorFromPalette(t,n,a)),o},e.prototype.coordDimToDataDim=function(t){return this.getRawData().mapDimensionsAll(t)},e.prototype.getProgressive=function(){return this.get("progressive")},e.prototype.getProgressiveThreshold=function(){return this.get("progressiveThreshold")},e.prototype.select=function(t,n){this._innerSelect(this.getData(n),t)},e.prototype.unselect=function(t,n){var a=this.option.selectedMap;if(a){var i=this.option.selectedMode,o=this.getData(n);if(i==="series"||a==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s=0&&a.push(o)}return a},e.prototype.isSelected=function(t,n){var a=this.option.selectedMap;if(!a)return!1;var i=this.getData(n);return(a==="all"||a[Dv(i,t)])&&!i.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[Eh])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var a,i,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){ce(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,f=0;f0&&this._innerSelect(t,n)}},e.registerClass=function(t){return Le.registerClass(t)},e.protoInitialize=(function(){var t=e.prototype;t.type="series.__base__",t.seriesIndex=0,t.ignoreStyleOnData=!1,t.hasSymbolVisual=!1,t.defaultSymbol="circle",t.visualStyleAccessPath="itemStyle",t.visualDrawType="fill"})(),e})(Le);zt(nt,Nd);zt(nt,dS);WP(nt,Le);function BT(r){var e=r.name;G1(r)||(r.name=HZ(r)||e)}function HZ(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return M(t,function(a){var i=e.getDimensionInfo(a);i.displayName&&n.push(i.displayName)}),n.join(" ")}function WZ(r){return r.model.getRawData().count()}function $Z(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),ZZ}function ZZ(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function VT(r,e){M(jf(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,Se(UZ,e))})}function UZ(r,e){var t=q0(r);return t&&t.setOutputEnd((e||this).count()),e}function q0(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var a=n.agentStubMap;a&&(n=a.get(r.uid))}return n}}var lt=(function(){function r(){this.group=new oe,this.uid=Tu("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){},r.prototype.updateLayout=function(e,t,n,a){},r.prototype.updateVisual=function(e,t,n,a){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r})();H1(lt);_d(lt);function Cu(){var r=Ae();return function(e){var t=r(e),n=e.pipelineContext,a=!!t.large,i=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(a!==o||i!==s)&&"reset"}}var LE=Ae(),YZ=Cu(),Je=(function(){function r(){this.group=new oe,this.uid=Tu("viewChart"),this.renderTask=Hf({plan:XZ,reset:qZ}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,a){},r.prototype.highlight=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&FT(i,a,"emphasis")},r.prototype.downplay=function(e,t,n,a){var i=e.getData(a&&a.dataType);i&&FT(i,a,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateLayout=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.updateVisual=function(e,t,n,a){this.render(e,t,n,a)},r.prototype.eachRendered=function(e){po(this.group,e)},r.markUpdateMethod=function(e,t){LE(e).updateMethod=t},r.protoInitialize=(function(){var e=r.prototype;e.type="chart"})(),r})();function GT(r,e,t){r&&nc(r)&&(e==="emphasis"?si:li)(r,t)}function FT(r,e,t){var n=ks(r,e),a=e&&e.highlightKey!=null?_9(e.highlightKey):null;n!=null?M(Qe(n),function(i){GT(r.getItemGraphicEl(i),t,a)}):r.eachItemGraphicEl(function(i){GT(i,t,a)})}H1(Je);_d(Je);function XZ(r){return YZ(r.model)}function qZ(r){var e=r.model,t=r.ecModel,n=r.api,a=r.payload,i=e.pipelineContext.progressiveRender,o=r.view,s=a&&LE(a).updateMethod,l=i?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,a),jZ[l]}var jZ={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}},hp="\0__throttleOriginMethod",HT="\0__throttleRate",WT="\0__throttleType";function bS(r,e,t){var n,a=0,i=0,o=null,s,l,u,f;e=e||0;function c(){i=new Date().getTime(),o=null,r.apply(l,u||[])}var v=function(){for(var h=[],p=0;p=0?c():o=setTimeout(c,-s),a=n};return v.clear=function(){o&&(clearTimeout(o),o=null)},v.debounceNextCall=function(h){f=h},v}function Au(r,e,t,n){var a=r[e];if(a){var i=a[hp]||a,o=a[WT],s=a[HT];if(s!==t||o!==n){if(t==null||!n)return r[e]=i;a=r[e]=bS(i,t,n==="debounce"),a[hp]=i,a[WT]=n,a[HT]=t}return a}}function lc(r,e){var t=r[e];t&&t[hp]&&(t.clear&&t.clear(),r[e]=t[hp])}var $T=Ae(),ZT={itemStyle:Es(Lk,!0),lineStyle:Es(Ik,!0)},KZ={lineStyle:"stroke",itemStyle:"fill"};function PE(r,e){var t=r.visualStyleMapper||ZT[e];return t||(console.warn("Unknown style type '"+e+"'."),ZT.itemStyle)}function kE(r,e){var t=r.visualDrawType||KZ[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var JZ={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=r.getModel(n),i=PE(r,n),o=i(a),s=a.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=kE(r,n),u=o[l],f=ie(u)?u:null,c=o.fill==="auto"||o.stroke==="auto";if(!o[l]||f||c){var v=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=v,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||ie(o.fill)?v:o.fill,o.stroke=o.stroke==="auto"||ie(o.stroke)?v:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&f)return t.setVisual("colorFromPalette",!1),{dataEach:function(h,p){var d=r.getDataParams(p),g=H({},o);g[l]=f(d),h.setItemVisual(p,"style",g)}}}},Wu=new ke,QZ={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",a=PE(r,n),i=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){Wu.option=l[n];var u=a(Wu),f=o.ensureUniqueItemVisual(s,"style");H(f,u),Wu.option.decal&&(o.setItemVisual(s,"decal",Wu.option.decal),Wu.option.decal.dirty=!0),i in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},eU={performRawSeries:!0,overallReset:function(r){var e=te();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var a=t.type+"-"+n,i=e.get(a);i||(i={},e.set(a,i)),$T(t).scope=i}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),a={},i=t.getData(),o=$T(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=kE(t,s);i.each(function(u){var f=i.getRawIndex(u);a[f]=u}),n.each(function(u){var f=a[u],c=i.getItemVisual(f,"colorFromPalette");if(c){var v=i.ensureUniqueItemVisual(f,"style"),h=n.getName(u)||u+"",p=n.count();v[l]=t.getColorFromPalette(h,o,p)}})}})}},Iv=Math.PI;function tU(r,e){e=e||{},fe(e,{text:"loading",textColor:B.color.primary,fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255,255,255,0.8)",showSpinner:!0,color:B.color.theme[0],spinnerRadius:10,lineWidth:5,zlevel:0});var t=new oe,n=new Ce({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var a=new Be({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),i=new Ce({style:{fill:"none"},textContent:a,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(i);var o;return e.showSpinner&&(o=new Dd({shape:{startAngle:-Iv/2,endAngle:-Iv/2+.1,r:e.spinnerRadius},style:{stroke:e.color,lineCap:"round",lineWidth:e.lineWidth},zlevel:e.zlevel,z:10001}),o.animateShape(!0).when(1e3,{endAngle:Iv*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:Iv*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=a.getBoundingRect().width,l=e.showSpinner?e.spinnerRadius:0,u=(r.getWidth()-l*2-(e.showSpinner&&s?10:0)-s)/2-(e.showSpinner&&s?0:5+s/2)+(e.showSpinner?0:s/2)+(s?0:l),f=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:f}),i.setShape({x:u-l,y:f-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var EE=(function(){function r(e,t,n,a){this._stageTaskMap=te(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),a=this._visualHandlers=a.slice(),this._allHandlers=n.concat(a)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var a=n.overallTask;a&&a.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),a=n.context,i=!t&&n.progressiveEnabled&&(!a||a.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=i?n.step:null,s=a&&a.modDataCount,l=s!=null?Math.ceil(s/o):null;return{step:o,modBy:l,modDataCount:s}}},r.prototype.getPipeline=function(e){return this._pipelineMap.get(e)},r.prototype.updateStreamModes=function(e,t){var n=this._pipelineMap.get(e.uid),a=e.getData(),i=a.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&i>=n.threshold,s=e.get("large")&&i>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?i:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=te();e.eachSeries(function(a){var i=a.getProgressive(),o=a.uid;n.set(o,{id:o,head:null,tail:null,threshold:a.getProgressiveThreshold(),progressiveEnabled:i&&!(a.preventIncremental&&a.preventIncremental()),blockIndex:-1,step:Math.round(i||700),count:0}),t._pipe(a,a.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;M(this._allHandlers,function(a){var i=e.get(a.uid)||e.set(a.uid,{}),o="";Sr(!(a.reset&&a.overallReset),o),a.reset&&this._createSeriesStageTask(a,i,t,n),a.overallReset&&this._createOverallStageTask(a,i,t,n)},this)},r.prototype.prepareView=function(e,t,n,a){var i=e.renderTask,o=i.context;o.model=t,o.ecModel=n,o.api=a,i.__block=!e.incrementalPrepareRender,this._pipe(t,i)},r.prototype.performDataProcessorTasks=function(e,t){this._performStageTasks(this._dataProcessorHandlers,e,t,{block:!0})},r.prototype.performVisualTasks=function(e,t,n){this._performStageTasks(this._visualHandlers,e,t,n)},r.prototype._performStageTasks=function(e,t,n,a){a=a||{};var i=!1,o=this;M(e,function(l,u){if(!(a.visualType&&a.visualType!==l.visualType)){var f=o._stageTaskMap.get(l.uid),c=f.seriesTaskMap,v=f.overallTask;if(v){var h,p=v.agentStubMap;p.each(function(g){s(a,g)&&(g.dirty(),h=!0)}),h&&v.dirty(),o.updatePayload(v,n);var d=o.getPerformArgs(v,a.block);p.each(function(g){g.perform(d)}),v.perform(d)&&(i=!0)}else c&&c.each(function(g,y){s(a,g)&&g.dirty();var m=o.getPerformArgs(g,a.block);m.skip=!l.performRawSeries&&t.isSeriesFiltered(g.context.model),o.updatePayload(g,n),g.perform(m)&&(i=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=i||this.unfinished},r.prototype.performSeriesTasks=function(e){var t;e.eachSeries(function(n){t=n.dataTask.perform()||t}),this.unfinished=t||this.unfinished},r.prototype.plan=function(){this._pipelineMap.each(function(e){var t=e.tail;do{if(t.__block){e.blockIndex=t.__idxInPipeline;break}t=t.getUpstream()}while(t)})},r.prototype.updatePayload=function(e,t){t!=="remain"&&(e.context.payload=t)},r.prototype._createSeriesStageTask=function(e,t,n,a){var i=this,o=t.seriesTaskMap,s=t.seriesTaskMap=te(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(f):l?n.eachRawSeriesByType(l,f):u&&u(n,a).each(f);function f(c){var v=c.uid,h=s.set(v,o&&o.get(v)||Hf({plan:oU,reset:sU,count:uU}));h.context={model:c,ecModel:n,api:a,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:i},i._pipe(c,h)}},r.prototype._createOverallStageTask=function(e,t,n,a){var i=this,o=t.overallTask=t.overallTask||Hf({reset:rU});o.context={ecModel:n,api:a,overallReset:e.overallReset,scheduler:i};var s=o.agentStubMap,l=o.agentStubMap=te(),u=e.seriesType,f=e.getTargetSeries,c=!0,v=!1,h="";Sr(!e.createOnAllSeries,h),u?n.eachRawSeriesByType(u,p):f?f(n,a).each(p):(c=!1,M(n.getSeries(),p));function p(d){var g=d.uid,y=l.set(g,s&&s.get(g)||(v=!0,Hf({reset:nU,onDirty:iU})));y.context={model:d,overallProgress:c},y.agent=o,y.__block=c,i._pipe(d,y)}v&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,a=this._pipelineMap.get(n);!a.head&&(a.head=t),a.tail&&a.tail.pipe(t),a.tail=t,t.__idxInPipeline=a.count++,t.__pipeline=a},r.wrapStageHandler=function(e,t){return ie(e)&&(e={overallReset:e,seriesType:fU(e)}),e.uid=Tu("stageHandler"),t&&(e.visualType=t),e},r})();function rU(r){r.overallReset(r.ecModel,r.api,r.payload)}function nU(r){return r.overallProgress&&aU}function aU(){this.agent.dirty(),this.getDownstream().dirty()}function iU(){this.agent&&this.agent.dirty()}function oU(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function sU(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=Qe(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?$(e,function(t,n){return RE(n)}):lU}var lU=RE(0);function RE(r){return function(e,t){var n=t.data,a=t.resetDefines[r];if(a&&a.dataEach)for(var i=e.start;i0&&h===u.length-v.length){var p=u.slice(0,h);p!=="data"&&(t.mainType=p,t[v.toLowerCase()]=l,f=!0)}}s.hasOwnProperty(u)&&(n[u]=l,f=!0),f||(a[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:a}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var a=n.targetEl,i=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return f(l,o,"mainType")&&f(l,o,"subType")&&f(l,o,"index","componentIndex")&&f(l,o,"name")&&f(l,o,"id")&&f(u,i,"name")&&f(u,i,"dataIndex")&&f(u,i,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,a,i));function f(c,v,h,p){return c[h]==null||v[p||h]===c[h]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r})(),j0=["symbol","symbolSize","symbolRotate","symbolOffset"],YT=j0.concat(["symbolKeepAspect"]),hU={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData();if(r.legendIcon&&t.setVisual("legendIcon",r.legendIcon),!r.hasSymbolVisual)return;for(var n={},a={},i=!1,o=0;o=0&&fs(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function K0(r,e,t){for(var n=e.type==="radial"?DU(r,e,t):MU(r,e,t),a=e.colorStops,i=0;i0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:ze(r)?[r]:W(r)?r:null}function wS(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&LU(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var a=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;a&&a!==1&&(t=$(t,function(i){return i/a}),n/=a)}return[t,n]}var PU=new Da(!0);function gp(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function XT(r){return typeof r=="string"&&r!=="none"}function yp(r){var e=r.fill;return e!=null&&e!=="none"}function qT(r,e){if(e.fillOpacity!=null&&e.fillOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.fillOpacity*e.opacity,r.fill(),r.globalAlpha=t}else r.fill()}function jT(r,e){if(e.strokeOpacity!=null&&e.strokeOpacity!==1){var t=r.globalAlpha;r.globalAlpha=e.strokeOpacity*e.opacity,r.stroke(),r.globalAlpha=t}else r.stroke()}function J0(r,e,t){var n=W1(e.image,e.__image,t);if(Sd(n)){var a=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&a&&a.setTransform){var i=new DOMMatrix;i.translateSelf(e.x||0,e.y||0),i.rotateSelf(0,0,(e.rotation||0)*_h),i.scaleSelf(e.scaleX||1,e.scaleY||1),a.setTransform(i)}return a}}function kU(r,e,t,n){var a,i=gp(t),o=yp(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var f=e.path||PU,c=e.__dirty;if(!n){var v=t.fill,h=t.stroke,p=o&&!!v.colorStops,d=i&&!!h.colorStops,g=o&&!!v.image,y=i&&!!h.image,m=void 0,_=void 0,S=void 0,b=void 0,x=void 0;(p||d)&&(x=e.getBoundingRect()),p&&(m=c?K0(r,v,x):e.__canvasFillGradient,e.__canvasFillGradient=m),d&&(_=c?K0(r,h,x):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),g&&(S=c||!e.__canvasFillPattern?J0(r,v,e):e.__canvasFillPattern,e.__canvasFillPattern=S),y&&(b=c||!e.__canvasStrokePattern?J0(r,h,e):e.__canvasStrokePattern,e.__canvasStrokePattern=b),p?r.fillStyle=m:g&&(S?r.fillStyle=S:o=!1),d?r.strokeStyle=_:y&&(b?r.strokeStyle=b:i=!1)}var w=e.getGlobalScale();f.setScale(w[0],w[1],e.segmentIgnoreThreshold);var T,C;r.setLineDash&&t.lineDash&&(a=wS(e),T=a[0],C=a[1]);var A=!0;(u||c&Ml)&&(f.setDPR(r.dpr),l?f.setContext(null):(f.setContext(r),A=!1),f.reset(),e.buildPath(f,e.shape,n),f.toStatic(),e.pathUpdated()),A&&f.rebuildPath(r,l?s:1),T&&(r.setLineDash(T),r.lineDashOffset=C),n||(t.strokeFirst?(i&&jT(r,t),o&&qT(r,t)):(o&&qT(r,t),i&&jT(r,t))),T&&r.setLineDash([])}function EU(r,e,t){var n=e.__image=W1(t.image,e.__image,e,e.onload);if(!(!n||!Sd(n))){var a=t.x||0,i=t.y||0,o=e.getWidth(),s=e.getHeight(),l=n.width/n.height;if(o==null&&s!=null?o=s*l:s==null&&o!=null?s=o/l:o==null&&s==null&&(o=n.width,s=n.height),t.sWidth&&t.sHeight){var u=t.sx||0,f=t.sy||0;r.drawImage(n,u,f,t.sWidth,t.sHeight,a,i,o,s)}else if(t.sx&&t.sy){var u=t.sx,f=t.sy,c=o-u,v=s-f;r.drawImage(n,u,f,c,v,a,i,o,s)}else r.drawImage(n,a,i,o,s)}}function RU(r,e,t){var n,a=t.text;if(a!=null&&(a+=""),a){r.font=t.font||ai,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var i=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=wS(e),i=n[0],o=n[1]),i&&(r.setLineDash(i),r.lineDashOffset=o),t.strokeFirst?(gp(t)&&r.strokeText(a,t.x,t.y),yp(t)&&r.fillText(a,t.x,t.y)):(yp(t)&&r.fillText(a,t.x,t.y),gp(t)&&r.strokeText(a,t.x,t.y)),i&&r.setLineDash([])}}var KT=["shadowBlur","shadowOffsetX","shadowOffsetY"],JT=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function GE(r,e,t,n,a){var i=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){Wr(r,a),i=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?ys.opacity:o}(n||e.blend!==t.blend)&&(i||(Wr(r,a),i=!0),r.globalCompositeOperation=e.blend||ys.blend);for(var s=0;s0&&t.unfinished);t.unfinished||this._zr.flush()}}},e.prototype.getDom=function(){return this._dom},e.prototype.getId=function(){return this.id},e.prototype.getZr=function(){return this._zr},e.prototype.isSSR=function(){return this._ssr},e.prototype.setOption=function(t,n,a){if(!this[Bt]){if(this._disposed){this.id;return}var i,o,s;if(ce(n)&&(a=n.lazyUpdate,i=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[Bt]=!0,hl(this),!this._model||n){var l=new X$(this._api),u=this._theme,f=this._model=new gS;f.scheduler=this._scheduler,f.ssr=this._ssr,f.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},r_);var c={seriesTransition:s,optionChanged:!0};if(a)this[Jt]={silent:i,updateParams:c},this[Bt]=!1,this.getZr().wakeUp();else{try{Fo(this),Ga.update.call(this,null,c)}catch(v){throw this[Jt]=null,this[Bt]=!1,v}this._ssr||this._zr.flush(),this[Jt]=null,this[Bt]=!1,cl.call(this,i),vl.call(this,i)}}},e.prototype.setTheme=function(t,n){if(!this[Bt]){if(this._disposed){this.id;return}var a=this._model;if(a){var i=n&&n.silent,o=null;this[Jt]&&(i==null&&(i=this[Jt].silent),o=this[Jt].updateParams,this[Jt]=null),this[Bt]=!0,hl(this);try{this._updateTheme(t),a.setTheme(this._theme),Fo(this),Ga.update.call(this,{type:"setTheme"},o)}catch(s){throw this[Bt]=!1,s}this[Bt]=!1,cl.call(this,i),vl.call(this,i)}}},e.prototype._updateTheme=function(t){q(t)&&(t=aR[t]),t&&(t=se(t),t&&lE(t,!0),this._theme=t)},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||Pe.hasGlobalWindow&&window.devicePixelRatio||1},e.prototype.getRenderedCanvas=function(t){return this.renderToCanvas(t)},e.prototype.renderToCanvas=function(t){t=t||{};var n=this._zr.painter;return n.getRenderedCanvas({backgroundColor:t.backgroundColor||this._model.get("backgroundColor"),pixelRatio:t.pixelRatio||this.getDevicePixelRatio()})},e.prototype.renderToSVGString=function(t){t=t||{};var n=this._zr.painter;return n.renderToString({useViewBox:t.useViewBox})},e.prototype.getSvgDataURL=function(){var t=this._zr,n=t.storage.getDisplayList();return M(n,function(a){a.stopAnimation(null,!0)}),t.painter.toDataURL()},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,a=this._model,i=[],o=this;M(n,function(l){a.eachComponent({mainType:l},function(u){var f=o._componentsMap[u.__viewId];f.group.ignore||(i.push(f),f.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return M(i,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",a=this.group,i=Math.min,o=Math.max,s=1/0;if(hC[a]){var l=s,u=s,f=-s,c=-s,v=[],h=t&&t.pixelRatio||this.getDevicePixelRatio();M(Wf,function(_,S){if(_.group===a){var b=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(se(t)),x=_.getDom().getBoundingClientRect();l=i(x.left,l),u=i(x.top,u),f=o(x.right,f),c=o(x.bottom,c),v.push({dom:b,left:x.left,top:x.top})}}),l*=h,u*=h,f*=h,c*=h;var p=f-l,d=c-u,g=Un.createCanvas(),y=yw(g,{renderer:n?"svg":"canvas"});if(y.resize({width:p,height:d}),n){var m="";return M(v,function(_){var S=_.left-l,b=_.top-u;m+=''+_.dom+""}),y.painter.getSvgRoot().innerHTML=m,t.connectedBackgroundColor&&y.painter.setBackgroundColor(t.connectedBackgroundColor),y.refreshImmediately(),y.painter.toDataURL()}else return t.connectedBackgroundColor&&y.add(new Ce({shape:{x:0,y:0,width:p,height:d},style:{fill:t.connectedBackgroundColor}})),M(v,function(_){var S=new ar({style:{x:_.left*h-l,y:_.top*h-u,image:_.dom}});y.add(S)}),y.refreshImmediately(),g.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n,a){return Ev(this,"convertToPixel",t,n,a)},e.prototype.convertToLayout=function(t,n,a){return Ev(this,"convertToLayout",t,n,a)},e.prototype.convertFromPixel=function(t,n,a){return Ev(this,"convertFromPixel",t,n,a)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var a=this._model,i,o=Wl(a,t);return M(o,function(s,l){l.indexOf("Models")>=0&&M(s,function(u){var f=u.coordinateSystem;if(f&&f.containPoint)i=i||!!f.containPoint(n);else if(l==="seriesModels"){var c=this._chartsMap[u.__viewId];c&&c.containPoint&&(i=i||c.containPoint(n,u))}},this)},this),!!i},e.prototype.getVisual=function(t,n){var a=this._model,i=Wl(a,t,{defaultMainType:"series"}),o=i.seriesModel,s=o.getData(),l=i.hasOwnProperty("dataIndexInside")?i.dataIndexInside:i.hasOwnProperty("dataIndex")?s.indexOfRawIndex(i.dataIndex):null;return l!=null?xS(s,l,n):Gc(s,n)},e.prototype.getViewOfComponentModel=function(t){return this._componentsMap[t.__viewId]},e.prototype.getViewOfSeriesModel=function(t){return this._chartsMap[t.__viewId]},e.prototype._initEvents=function(){var t=this;M(s6,function(a){var i=function(o){var s=t.getModel(),l=o.target,u,f=a==="globalout";if(f?u={}:l&&us(l,function(d){var g=ge(d);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=H({},g.eventData),!0},!0),u){var c=u.componentType,v=u.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",v=u.seriesIndex);var h=c&&v!=null&&s.getComponent(c,v),p=h&&t[h.mainType==="series"?"_chartsMap":"_componentsMap"][h.__viewId];u.event=o,u.type=a,t._$eventProcessor.eventInfo={targetEl:l,packedEvent:u,model:h,view:p},t.trigger(a,u)}};i.zrEventfulCallAtLast=!0,t._zr.on(a,i,t)});var n=this._messageCenter;M(e_,function(a,i){n.on(i,function(o){t.trigger(i,o)})}),dU(n,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&GP(this.getDom(),AS,"");var n=this,a=n._api,i=n._model;M(n._componentsViews,function(o){o.dispose(i,a)}),M(n._chartsViews,function(o){o.dispose(i,a)}),n._zr.dispose(),n._dom=n._model=n._chartsMap=n._componentsMap=n._chartsViews=n._componentsViews=n._scheduler=n._api=n._zr=n._throttledZrFlush=n._theme=n._coordSysMgr=n._messageCenter=null,delete Wf[n.id]},e.prototype.resize=function(t){if(!this[Bt]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var a=n.resetOption("media"),i=t&&t.silent;this[Jt]&&(i==null&&(i=this[Jt].silent),a=!0,this[Jt]=null),this[Bt]=!0,hl(this);try{a&&Fo(this),Ga.update.call(this,{type:"resize",animation:H({duration:0},t&&t.animation)})}catch(o){throw this[Bt]=!1,o}this[Bt]=!1,cl.call(this,i),vl.call(this,i)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(ce(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!n_[t]){var a=n_[t](this._api,n),i=this._zr;this._loadingFX=a,i.add(a)}},e.prototype.hideLoading=function(){if(this._disposed){this.id;return}this._loadingFX&&this._zr.remove(this._loadingFX),this._loadingFX=null},e.prototype.makeActionFromEvent=function(t){var n=H({},t);return n.type=Q0[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(ce(n)||(n={silent:!!n}),!!mp[t.type]&&this._model){if(this[Bt]){this._pendingActions.push(t);return}var a=n.silent;ay.call(this,t,a);var i=n.flush;i?this._zr.flush():i!==!1&&Pe.browser.weChat&&this._throttledZrFlush(),cl.call(this,a),vl.call(this,a)}},e.prototype.updateLabelLayout=function(){zn.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,a=this.getModel(),i=a.getSeriesByIndex(n);i.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=(function(){Fo=function(c){var v=c._scheduler;v.restorePipelines(c._model),v.prepareStageTasks(),ry(c,!0),ry(c,!1),v.plan()},ry=function(c,v){for(var h=c._model,p=c._scheduler,d=v?c._componentsViews:c._chartsViews,g=v?c._componentsMap:c._chartsMap,y=c._zr,m=c._api,_=0;_v.get("hoverLayerThreshold")&&!Pe.node&&!Pe.worker&&v.eachSeries(function(g){if(!g.preventUsingHoverLayer){var y=c._chartsMap[g.__viewId];y.__alive&&y.eachRendered(function(m){m.states.emphasis&&(m.states.emphasis.hoverLayer=!0)})}})}function s(c,v){var h=c.get("blendMode")||null;v.eachRendered(function(p){p.isGroup||(p.style.blend=h)})}function l(c,v){if(!c.preventAutoZ){var h=Ns(c);v.eachRendered(function(p){return Pd(p,h.z,h.zlevel),!0})}}function u(c,v){v.eachRendered(function(h){if(!$l(h)){var p=h.getTextContent(),d=h.getTextGuideLine();h.stateTransition&&(h.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),d&&d.stateTransition&&(d.stateTransition=null),h.hasState()?(h.prevStates=h.currentStates,h.clearStates()):h.prevStates&&(h.prevStates=null)}})}function f(c,v){var h=c.getModel("stateAnimation"),p=c.isAnimationEnabled(),d=h.get("duration"),g=d>0?{duration:d,delay:h.get("delay"),easing:h.get("easing")}:null;v.eachRendered(function(y){if(y.states&&y.states.emphasis){if($l(y))return;if(y instanceof Me&&S9(y),y.__dirty){var m=y.prevStates;m&&y.useStates(m)}if(p){y.stateTransition=g;var _=y.getTextContent(),S=y.getTextGuideLine();_&&(_.stateTransition=g),S&&(S.stateTransition=g)}y.__dirty&&i(y)}})}cC=function(c){return new((function(v){N(h,v);function h(){return v!==null&&v.apply(this,arguments)||this}return h.prototype.getCoordinateSystems=function(){return c._coordSysMgr.getCoordinateSystems()},h.prototype.getComponentByElement=function(p){for(;p;){var d=p.__ecComponentInfo;if(d!=null)return c._model.getComponent(d.mainType,d.index);p=p.parent}},h.prototype.enterEmphasis=function(p,d){si(p,d),ln(c)},h.prototype.leaveEmphasis=function(p,d){li(p,d),ln(c)},h.prototype.enterBlur=function(p){nk(p),ln(c)},h.prototype.leaveBlur=function(p){q1(p),ln(c)},h.prototype.enterSelect=function(p){ak(p),ln(c)},h.prototype.leaveSelect=function(p){ik(p),ln(c)},h.prototype.getModel=function(){return c.getModel()},h.prototype.getViewOfComponentModel=function(p){return c.getViewOfComponentModel(p)},h.prototype.getViewOfSeriesModel=function(p){return c.getViewOfSeriesModel(p)},h.prototype.getMainProcessVersion=function(){return c[Pv]},h})(oE))(c)},rR=function(c){function v(h,p){for(var d=0;d=0)){pC.push(t);var i=EE.wrapStageHandler(t,a);i.__prio=e,i.__raw=t,r.push(i)}}function lR(r,e){n_[r]=e}function p6(r,e,t){var n=$U("registerMap");n&&n(r,e,t)}var d6=AZ;qs(TS,JZ);qs(Bd,QZ);qs(Bd,eU);qs(TS,hU);qs(Bd,pU);qs(jE,HU);oR(lE);sR(qU,oZ);lR("default",tU);Ea({type:ms,event:ms,update:ms},At);Ea({type:Mh,event:Mh,update:Mh},At);Ea({type:op,event:Y1,update:op,action:At,refineEvent:IS,publishNonRefinedEvent:!0});Ea({type:I0,event:Y1,update:I0,action:At,refineEvent:IS,publishNonRefinedEvent:!0});Ea({type:sp,event:Y1,update:sp,action:At,refineEvent:IS,publishNonRefinedEvent:!0});function IS(r,e,t,n){return{eventContent:{selected:d9(t),isFromClick:e.isFromClick||!1}}}iR("default",{});iR("dark",zE);var dC=[],g6={registerPreprocessor:oR,registerProcessor:sR,registerPostInit:f6,registerPostUpdate:c6,registerUpdateLifecycle:MS,registerAction:Ea,registerCoordinateSystem:v6,registerLayout:h6,registerVisual:qs,registerTransform:d6,registerLoading:lR,registerMap:p6,registerImpl:WU,PRIORITY:a6,ComponentModel:Le,ComponentView:lt,SeriesModel:nt,ChartView:Je,registerComponentModel:function(r){Le.registerClass(r)},registerComponentView:function(r){lt.registerClass(r)},registerSeriesModel:function(r){nt.registerClass(r)},registerChartView:function(r){Je.registerClass(r)},registerCustomSeries:function(r,e){ZU(r,e)},registerSubTypeDefaulter:function(r,e){Le.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){OW(r,e)}};function we(r){if(W(r)){M(r,function(e){we(e)});return}be(dC,r)>=0||(dC.push(r),ie(r)&&(r={install:r}),r.install(g6))}function Zu(r){return r==null?0:r.length||1}function gC(r){return r}var ui=(function(){function r(e,t,n,a,i,o){this._old=e,this._new=t,this._oldKeyGetter=n||gC,this._newKeyGetter=a||gC,this.context=i,this._diffModeMultiple=o==="multiple"}return r.prototype.add=function(e){return this._add=e,this},r.prototype.update=function(e){return this._update=e,this},r.prototype.updateManyToOne=function(e){return this._updateManyToOne=e,this},r.prototype.updateOneToMany=function(e){return this._updateOneToMany=e,this},r.prototype.updateManyToMany=function(e){return this._updateManyToMany=e,this},r.prototype.remove=function(e){return this._remove=e,this},r.prototype.execute=function(){this[this._diffModeMultiple?"_executeMultiple":"_executeOneToOne"]()},r.prototype._executeOneToOne=function(){var e=this._old,t=this._new,n={},a=new Array(e.length),i=new Array(t.length);this._initIndexMap(e,null,a,"_oldKeyGetter"),this._initIndexMap(t,n,i,"_newKeyGetter");for(var o=0;o1){var f=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(f,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(i,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},a={},i=[],o=[];this._initIndexMap(e,n,i,"_oldKeyGetter"),this._initIndexMap(t,a,o,"_newKeyGetter");for(var s=0;s1&&v===1)this._updateManyToOne&&this._updateManyToOne(f,u),a[l]=null;else if(c===1&&v>1)this._updateOneToMany&&this._updateOneToMany(f,u),a[l]=null;else if(c===1&&v===1)this._update&&this._update(f,u),a[l]=null;else if(c>1&&v>1)this._updateManyToMany&&this._updateManyToMany(f,u),a[l]=null;else if(c>1)for(var h=0;h1)for(var s=0;s30}var Uu=ce,Ai=$,x6=typeof Int32Array>"u"?Array:Int32Array,w6="e\0\0",yC=-1,T6=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],C6=["_approximateExtent"],mC,Ov,Yu,Xu,ly,qu,uy,Or=(function(){function r(e,t){this.type="list",this._dimOmitted=!1,this._nameList=[],this._idList=[],this._visual={},this._layout={},this._itemVisuals=[],this._itemLayouts=[],this._graphicEls=[],this._approximateExtent={},this._calculationInfo={},this.hasItemOption=!1,this.TRANSFERABLE_METHODS=["cloneShallow","downSample","minmaxDownSample","lttbDownSample","map"],this.CHANGABLE_METHODS=["filterSelf","selectRange"],this.DOWNSAMPLE_METHODS=["downSample","minmaxDownSample","lttbDownSample"];var n,a=!1;fR(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(a=!0,n=e),n=n||["x","y"];for(var i={},o=[],s={},l=!1,u={},f=0;f=t)){var n=this._store,a=n.getProvider();this._updateOrdinalMeta();var i=this._nameList,o=this._idList,s=a.getSource().sourceFormat,l=s===on;if(l&&!a.pure)for(var u=[],f=e;f0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,a=n[e];a||(a=n[e]={});var i=a[t];return i==null&&(i=this.getVisual(t),W(i)?i=i.slice():Uu(i)&&(i=H({},i)),a[t]=i),i},r.prototype.setItemVisual=function(e,t,n){var a=this._itemVisuals[e]||{};this._itemVisuals[e]=a,Uu(t)?H(a,t):a[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){Uu(e)?H(this._layout,e):this._layout[e]=t},r.prototype.getLayout=function(e){return this._layout[e]},r.prototype.getItemLayout=function(e){return this._itemLayouts[e]},r.prototype.setItemLayout=function(e,t,n){this._itemLayouts[e]=n?H(this._itemLayouts[e]||{},t):t},r.prototype.clearItemLayouts=function(){this._itemLayouts.length=0},r.prototype.setItemGraphicEl=function(e,t){var n=this.hostModel&&this.hostModel.seriesIndex;D0(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){M(this._graphicEls,function(n,a){n&&e&&e.call(t,n,a)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:Ai(this.dimensions,this._getDimInfo,this),this.hostModel)),ly(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];ie(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var a=n.apply(this,arguments);return t.apply(this,[a].concat(k1(arguments)))})},r.internalField=(function(){mC=function(e){var t=e._invertedIndicesMap;M(t,function(n,a){var i=e._dimInfos[a],o=i.ordinalMeta,s=e._store;if(o){n=t[a]=new x6(o.categories.length);for(var l=0;l1&&(l+="__ec__"+f),a[t]=l}}})(),r})();function Fc(r,e){yS(r)||(r=mS(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],a=te(),i=[],o=M6(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&hR(o),l=n===r.dimensionsDefine,u=l?vR(r):cR(n),f=e.encodeDefine;!f&&e.encodeDefaulter&&(f=e.encodeDefaulter(r,o));for(var c=te(f),v=new _E(o),h=0;h0&&(n.name=a+(i-1)),i++,e.set(a,i)}}function M6(r,e,t,n){var a=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return M(e,function(i){var o;ce(i)&&(o=i.dimsDef)&&(a=Math.max(a,o.length))}),a}function D6(r,e,t){if(t||e.hasKey(r)){for(var n=0;e.hasKey(r+n);)n++;r+=n}return e.set(r,!0),r}var I6=(function(){function r(e){this.coordSysDims=[],this.axisMap=te(),this.categoryAxisMap=te(),this.coordSysName=e}return r})();function L6(r){var e=r.get("coordinateSystem"),t=new I6(e),n=P6[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var P6={cartesian2d:function(r,e,t,n){var a=r.getReferringComponents("xAxis",dt).models[0],i=r.getReferringComponents("yAxis",dt).models[0];e.coordSysDims=["x","y"],t.set("x",a),t.set("y",i),pl(a)&&(n.set("x",a),e.firstCategoryDimIndex=0),pl(i)&&(n.set("y",i),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var a=r.getReferringComponents("singleAxis",dt).models[0];e.coordSysDims=["single"],t.set("single",a),pl(a)&&(n.set("single",a),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var a=r.getReferringComponents("polar",dt).models[0],i=a.findAxisModel("radiusAxis"),o=a.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",i),t.set("angle",o),pl(i)&&(n.set("radius",i),e.firstCategoryDimIndex=0),pl(o)&&(n.set("angle",o),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},geo:function(r,e,t,n){e.coordSysDims=["lng","lat"]},parallel:function(r,e,t,n){var a=r.ecModel,i=a.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=i.dimensions.slice();M(i.parallelAxisIndex,function(s,l){var u=a.getComponent("parallelAxis",s),f=o[l];t.set(f,u),pl(u)&&(n.set(f,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})},matrix:function(r,e,t,n){var a=r.getReferringComponents("matrix",dt).models[0];e.coordSysDims=["x","y"];var i=a.getDimensionModel("x"),o=a.getDimensionModel("y");t.set("x",i),t.set("y",o),n.set("x",i),n.set("y",o)}};function pl(r){return r.get("type")==="category"}function k6(r,e,t){t=t||{};var n=t.byIndex,a=t.stackedCoordDimension,i,o,s;E6(e)?i=e:(o=e.schema,i=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,f,c,v;if(M(i,function(m,_){q(m)&&(i[_]=m={name:m}),l&&!m.isExtraCoord&&(!n&&!u&&m.ordinalMeta&&(u=m),!f&&m.type!=="ordinal"&&m.type!=="time"&&(!a||a===m.coordDim)&&(f=m))}),f&&!n&&!u&&(n=!0),f){c="__\0ecstackresult_"+r.id,v="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var h=f.coordDim,p=f.type,d=0;M(i,function(m){m.coordDim===h&&d++});var g={name:c,coordDim:h,coordDimIndex:d,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length},y={name:v,coordDim:v,coordDimIndex:d+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:i.length+1};o?(s&&(g.storeDimIndex=s.ensureCalculationDimension(v,p),y.storeDimIndex=s.ensureCalculationDimension(c,p)),o.appendCalculationDimension(g),o.appendCalculationDimension(y)):(i.push(g),i.push(y))}return{stackedDimension:f&&f.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:v,stackResultDimension:c}}function E6(r){return!fR(r.schema)}function oo(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function pR(r,e){return oo(r,e)?r.getCalculationInfo("stackResultDimension"):e}function R6(r,e){var t=r.get("coordinateSystem"),n=Bc.get(t),a;return e&&e.coordSysDims&&(a=$(e.coordSysDims,function(i){var o={name:i},s=e.axisMap.get(i);if(s){var l=s.get("type");o.type=Sp(l)}return o})),a||(a=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),a}function O6(r,e,t){var n,a;return t&&M(r,function(i,o){var s=i.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),i.ordinalMeta=l.getOrdinalMeta(),e&&(i.createInvertedIndices=!0)),i.otherDims.itemName!=null&&(a=!0)}),!a&&n!=null&&(r[n].otherDims.itemName=0),n}function gi(r,e,t){t=t||{};var n=e.getSourceManager(),a,i=!1;r?(i=!0,a=mS(r)):(a=n.getSource(),i=a.sourceFormat===on);var o=L6(e),s=R6(e,o),l=t.useEncodeDefaulter,u=ie(l)?l:l?Se(rE,s,e):null,f={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!i},c=Fc(a,f),v=O6(c.dimensions,t.createInvertedIndices,o),h=i?null:n.getSharedDataStore(c),p=k6(e,{schema:c,store:h}),d=new Or(c,e);d.setCalculationInfo(p);var g=v!=null&&N6(a)?function(y,m,_,S){return S===v?_:this.defaultDimValueGetter(y,m,_,S)}:null;return d.hasItemOption=!1,d.initData(i?a:h,null,g),d}function N6(r){if(r.sourceFormat===on){var e=z6(r.data||[]);return!W(mu(e))}}function z6(r){for(var e=0;ea&&(o=i.interval=a);var s=i.intervalPrecision=cc(o),l=i.niceTickExtent=[Pt(Math.ceil(r[0]/o)*o,s),Pt(Math.floor(r[1]/o)*o,s)];return V6(l,r),i}function fy(r){var e=Math.pow(10,V1(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Pt(t*e)}function cc(r){return da(r)+2}function _C(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function V6(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),_C(r,0,e),_C(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function LS(r,e){return r>=e[0]&&r<=e[1]}var G6=(function(){function r(){this.normalize=SC,this.scale=bC}return r.prototype.updateMethods=function(e){e.hasBreaks()?(this.normalize=j(e.normalize,e),this.scale=j(e.scale,e)):(this.normalize=SC,this.scale=bC)},r})();function SC(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function bC(r,e){return r*(e[1]-e[0])+e[0]}function i_(r,e,t){var n=Math.log(r);return[Math.log(t?e[0]:Math.max(0,e[0]))/n,Math.log(t?e[1]:Math.max(0,e[1]))/n]}var yo=(function(){function r(e){this._calculator=new G6,this._setting=e||{},this._extent=[1/0,-1/0];var t=Et();t&&(this._brkCtx=t.createScaleBreakContext(),this._brkCtx.update(this._extent))}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype._innerUnionExtent=function(e){var t=this._extent;this._innerSetExtent(e[0]t[1]?e[1]:t[1])},r.prototype.unionExtentFromData=function(e,t){this._innerUnionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){this._innerSetExtent(e,t)},r.prototype._innerSetExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t),this._brkCtx&&this._brkCtx.update(n)},r.prototype.setBreaksFromOption=function(e){var t=Et();t&&this._innerSetBreak(t.parseAxisBreakOption(e,j(this.parse,this)))},r.prototype._innerSetBreak=function(e){this._brkCtx&&(this._brkCtx.setBreaks(e),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(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r})();_d(yo);var F6=0,vc=(function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++F6,this._onCollect=e.onCollect}return r.createByAxisModel=function(e){var t=e.option,n=t.data,a=n&&$(n,H6);return new r({categories:a,needCollect:!a,deduplication:t.dedplication!==!1})},r.prototype.getOrdinal=function(e){return this._getOrCreateMap().get(e)},r.prototype.parseAndCollect=function(e){var t,n=this._needCollect;if(!q(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,this._onCollect&&this._onCollect(e,t),t;var a=this._getOrCreateMap();return t=a.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,a.set(e,t),this._onCollect&&this._onCollect(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=te(this.categories))},r})();function H6(r){return ce(r)&&r.value!=null?r.value:r+""}var nu=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var a=n.getSetting("ordinalMeta");return a||(a=new vc({})),W(a)&&(a=new vc({categories:$(a,function(i){return ce(i)?i.value:i})})),n._ordinalMeta=a,n._extent=n.getSetting("extent")||[0,a.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:q(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return LS(t,this._extent)&&t>=0&&t=0&&t=0&&t=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e})(yo);yo.registerClass(nu);var Mi=Pt,fi=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t==null||t===""?NaN:Number(t)},e.prototype.contain=function(t){return LS(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=cc(t)},e.prototype.getTicks=function(t){t=t||{};var n=this._interval,a=this._extent,i=this._niceExtent,o=this._intervalPrecision,s=Et(),l=[];if(!n)return l;if(t.breakTicks==="only_break"&&s)return s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l;var u=1e4;a[0]=0&&(c=Mi(c+v*n,o))}if(l.length>0&&c===l[l.length-1].value)break;if(l.length>u)return[]}var h=l.length?l[l.length-1].value:i[1];return a[1]>h&&(t.expandToNicedExtent?l.push({value:Mi(h+n,o)}):l.push({value:a[1]})),s&&s.pruneTicksByBreak(t.pruneByBreak,l,this._brkCtx.breaks,function(p){return p.value},this._interval,this._extent),t.breakTicks!=="none"&&s&&s.addBreaksToTicks(l,this._brkCtx.breaks,this._extent),l},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks({expandToNicedExtent:!0}),a=[],i=this.getExtent(),o=1;oi[0]&&p0&&(i=i===null?s:Math.min(i,s))}t[n]=i}}return t}function mR(r){var e=Z6(r),t=[];return M(r,function(n){var a=n.coordinateSystem,i=a.getBaseAxis(),o=i.getExtent(),s;if(i.type==="category")s=i.getBandWidth();else if(i.type==="value"||i.type==="time"){var l=i.dim+"_"+i.index,u=e[l],f=Math.abs(o[1]-o[0]),c=i.scale.getExtent(),v=Math.abs(c[1]-c[0]);s=u?f/v*u:f}else{var h=n.getData();s=Math.abs(o[1]-o[0])/h.count()}var p=X(n.get("barWidth"),s),d=X(n.get("barMaxWidth"),s),g=X(n.get("barMinWidth")||(wR(n)?.5:1),s),y=n.get("barGap"),m=n.get("barCategoryGap"),_=n.get("defaultBarGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:d,barMinWidth:g,barGap:y,barCategoryGap:m,defaultBarGap:_,axisKey:PS(i),stackId:gR(n)})}),_R(t)}function _R(r){var e={};M(r,function(n,a){var i=n.axisKey,o=n.bandWidth,s=e[i]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:n.defaultBarGap||0,stacks:{}},l=s.stacks;e[i]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var f=n.barWidth;f&&!l[u].width&&(l[u].width=f,f=Math.min(s.remainedWidth,f),s.remainedWidth-=f);var c=n.barMaxWidth;c&&(l[u].maxWidth=c);var v=n.barMinWidth;v&&(l[u].minWidth=v);var h=n.barGap;h!=null&&(s.gap=h);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return M(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=Re(i).length;s=Math.max(35-l*4,15)+"%"}var u=X(s,o),f=X(n.gap,1),c=n.remainedWidth,v=n.autoWidthCount,h=(c-u)/(v+(v-1)*f);h=Math.max(h,0),M(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,c-=S+f*S,v--}else{var S=h;m&&mS&&(S=_),S!==h&&(y.width=S,c-=S+f*S,v--)}}),h=(c-u)/(v+(v-1)*f),h=Math.max(h,0);var p=0,d;M(i,function(y,m){y.width||(y.width=h),d=y,p+=y.width*(1+f)}),d&&(p-=d.width*f);var g=-p/2;M(i,function(y,m){t[a][m]=t[a][m]||{bandWidth:o,offset:g,width:y.width},g+=y.width*(1+f)})}),t}function U6(r,e,t){if(r&&e){var n=r[PS(e)];return n}}function SR(r,e){var t=yR(r,e),n=mR(t);M(t,function(a){var i=a.getData(),o=a.coordinateSystem,s=o.getBaseAxis(),l=gR(a),u=n[PS(s)][l],f=u.offset,c=u.width;i.setLayout({bandWidth:u.bandWidth,offset:f,size:c})})}function bR(r){return{seriesType:r,plan:Cu(),reset:function(e){if(xR(e)){var t=e.getData(),n=e.coordinateSystem,a=n.getBaseAxis(),i=n.getOtherAxis(a),o=t.getDimensionIndex(t.mapDimension(i.dim)),s=t.getDimensionIndex(t.mapDimension(a.dim)),l=e.get("showBackground",!0),u=t.mapDimension(i.dim),f=t.getCalculationInfo("stackResultDimension"),c=oo(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),v=i.isHorizontal(),h=Y6(a,i),p=wR(e),d=e.get("barMinHeight")||0,g=f&&t.getDimensionIndex(f),y=t.getLayout("size"),m=t.getLayout("offset");return{progress:function(_,S){for(var b=_.count,x=p&&ya(b*3),w=p&&l&&ya(b*3),T=p&&ya(b),C=n.master.getRect(),A=v?C.width:C.height,D,L=S.getStore(),I=0;(D=_.next())!=null;){var P=L.get(c?g:o,D),E=L.get(s,D),k=h,O=void 0;c&&(O=+P-L.get(o,D));var R=void 0,z=void 0,V=void 0,G=void 0;if(v){var F=n.dataToPoint([P,E]);if(c){var U=n.dataToPoint([O,E]);k=U[0]}R=k,z=F[1]+m,V=F[0]-k,G=y,Math.abs(V)0?t:1:t))}var X6=function(r,e,t,n){for(;t>>1;r[a][1]a&&(this._approxInterval=a);var o=Nv.length,s=Math.min(X6(Nv,this._approxInterval,0,o),o-1);this._interval=Nv[s][1],this._intervalPrecision=cc(this._interval),this._minLevelUnit=Nv[Math.max(s-1,0)][0]},e.prototype.parse=function(t){return ze(t)?t:+$s(t)},e.prototype.contain=function(t){return LS(t,this._extent)},e.prototype.normalize=function(t){return this._calculator.normalize(t,this._extent)},e.prototype.scale=function(t){return this._calculator.scale(t,this._extent)},e.type="time",e})(fi),Nv=[["second",aS],["minute",iS],["hour",Gf],["quarter-day",Gf*6],["half-day",Gf*12],["day",bn*1.2],["half-week",bn*3.5],["week",bn*7],["month",bn*31],["quarter",bn*95],["half-year",fT/2],["year",fT]];function TR(r,e,t,n){return G0(new Date(e),r,n).getTime()===G0(new Date(t),r,n).getTime()}function q6(r,e){return r/=bn,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function j6(r){var e=30*bn;return r/=e,r>6?6:r>3?3:r>2?2:1}function K6(r){return r/=Gf,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function xC(r,e){return r/=e?iS:aS,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function J6(r){return PP(r)}function Q6(r,e,t){var n=Math.max(0,be(Kr,e)-1);return G0(new Date(r),Kr[n],t).getTime()}function e7(r,e){var t=new Date(0);t[r](1);var n=t.getTime();t[r](1+e);var a=t.getTime()-n;return function(i,o){return Math.max(0,Math.round((o-i)/a))}}function t7(r,e,t,n,a,i){var o=1e4,s=m$,l=0;function u(I,P,E,k,O,R,z){for(var V=e7(O,I),G=P,F=new Date(G);Go));)if(F[O](F[k]()+I),G=F.getTime(),i){var U=i.calcNiceTickMultiple(G,V);U>0&&(F[O](F[k]()+U*I),G=F.getTime())}z.push({value:G,notAdd:!0})}function f(I,P,E){var k=[],O=!P.length;if(!TR(Ff(I),n[0],n[1],t)){O&&(P=[{value:Q6(n[0],I,t)},{value:n[1]}]);for(var R=0;R=n[0]&&z<=n[1]&&u(G,z,V,F,U,J,k),I==="year"&&E.length>1&&R===0&&E.unshift({value:E[0].value-G})}}for(var R=0;R=n[0]&&S<=n[1]&&h++)}var b=a/e;if(h>b*1.5&&p>b/1.5||(c.push(m),h>b||r===s[d]))break}v=[]}}}for(var x=Ze($(c,function(I){return Ze(I,function(P){return P.value>=n[0]&&P.value<=n[1]&&!P.notAdd})}),function(I){return I.length>0}),w=[],T=x.length-1,d=0;d0;)i*=10;var s=[s_(n7(n[0]/i)*i),s_(r7(n[1]/i)*i)];this._interval=i,this._intervalPrecision=cc(i),this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){r.prototype.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.contain=function(t){return t=Bv(t)/Bv(this.base),r.prototype.contain.call(this,t)},e.prototype.normalize=function(t){return t=Bv(t)/Bv(this.base),r.prototype.normalize.call(this,t)},e.prototype.scale=function(t){return t=r.prototype.scale.call(this,t),zv(this.base,t)},e.prototype.setBreaksFromOption=function(t){var n=Et();if(n){var a=n.logarithmicParseBreaksFromOption(t,this.base,j(this.parse,this)),i=a.parsedOriginal,o=a.parsedLogged;this._originalScale._innerSetBreak(i),this._innerSetBreak(o)}},e.type="log",e})(fi);function Vv(r,e){return s_(r,da(e))}yo.registerClass(CR);var a7=(function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]0&&l>0&&!u&&(s=0),s<0&&l<0&&!f&&(l=0));var v=this._determinedMin,h=this._determinedMax;return v!=null&&(s=v,u=!0),h!=null&&(l=h,f=!0),{min:s,max:l,minFixed:u,maxFixed:f,isBlank:c}},r.prototype.modifyDataMinMax=function(e,t){this[o7[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=i7[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r})(),i7={min:"_determinedMin",max:"_determinedMax"},o7={min:"_dataMin",max:"_dataMax"};function AR(r,e,t){var n=r.rawExtentInfo;return n||(n=new a7(r,e,t),r.rawExtentInfo=n,n)}function Gv(r,e){return e==null?null:mr(e)?NaN:r.parse(e)}function MR(r,e){var t=r.type,n=AR(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var a=n.min,i=n.max,o=e.ecModel;if(o&&t==="time"){var s=yR("bar",o),l=!1;if(M(s,function(c){l=l||c.getBaseAxis()===e.axis}),l){var u=mR(s),f=s7(a,i,e,u);a=f.min,i=f.max}}return{extent:[a,i],fixMin:n.minFixed,fixMax:n.maxFixed}}function s7(r,e,t,n){var a=t.axis.getExtent(),i=Math.abs(a[1]-a[0]),o=U6(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;M(o,function(h){s=Math.min(h.offset,s)});var l=-1/0;M(o,function(h){l=Math.max(h.offset+h.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,f=e-r,c=1-(s+l)/i,v=f/c-f;return e+=v*(l/u),r-=v*(s/u),{min:r,max:e}}function au(r,e){var t=e,n=MR(r,t),a=n.extent,i=t.get("splitNumber");r instanceof CR&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setBreaksFromOption(IR(t)),r.setExtent(a[0],a[1]),r.calcNiceExtent({splitNumber:i,fixMin:n.fixMin,fixMax:n.fixMax,minInterval:l?t.get("minInterval"):null,maxInterval:l?t.get("maxInterval"):null}),s!=null&&r.setInterval&&r.setInterval(s)}function Vd(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new nu({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new kS({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(yo.getClass(e)||fi)}}function l7(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Du(r){var e=r.getLabelModel().get("formatter");if(r.type==="time"){var t=_$(e);return function(a,i){return r.scale.getFormattedLabel(a,i,t)}}else{if(q(e))return function(a){var i=r.scale.getLabel(a),o=e.replace("{value}",i??"");return o};if(ie(e)){if(r.type==="category")return function(a,i){return e(bp(r,a),a.value-r.scale.getExtent()[0],null)};var n=Et();return function(a,i){var o=null;return n&&(o=n.makeAxisLabelFormatterParamBreak(o,a.break)),e(bp(r,a),i,o)}}else return function(a){return r.scale.getLabel(a)}}}function bp(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function ES(r){var e=r.get("interval");return e??"auto"}function DR(r){return r.type==="category"&&ES(r.getLabelModel())===0}function xp(r,e){var t={};return M(r.mapDimensionsAll(e),function(n){t[pR(r,n)]=!0}),Re(t)}function u7(r,e,t){e&&M(xp(e,t),function(n){var a=e.getApproximateExtent(n);a[0]r[1]&&(r[1]=a[1])})}function iu(r){return r==="middle"||r==="center"}function hc(r){return r.getShallow("show")}function IR(r){var e=r.get("breaks",!0);if(e!=null)return!Et()||!f7(r.axis)?void 0:e}function f7(r){return(r.dim==="x"||r.dim==="y"||r.dim==="z"||r.dim==="single")&&r.type!=="category"}var Hc=(function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r})(),c7=1e-8;function wC(r,e){return Math.abs(r-e)a&&(n=o,a=l)}if(n)return h7(n.exterior);var u=this.getBoundingRect();return[u.x+u.width/2,u.y+u.height/2]},e.prototype.getBoundingRect=function(t){var n=this._rect;if(n&&!t)return n;var a=[1/0,1/0],i=[-1/0,-1/0],o=this.geometries;return M(o,function(s){s.type==="polygon"?TC(s.exterior,a,i,t):M(s.points,function(l){TC(l,a,i,t)})}),isFinite(a[0])&&isFinite(a[1])&&isFinite(i[0])&&isFinite(i[1])||(a[0]=a[1]=i[0]=i[1]=0),n=new ve(a[0],a[1],i[0]-a[0],i[1]-a[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),a=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var i=0,o=a.length;i>1^-(s&1),l=l>>1^-(l&1),s+=a,l+=i,a=s,i=l,n.push([s/t,l/t])}return n}function g7(r,e){return r=d7(r),$(Ze(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,a=t.geometry,i=[];switch(a.type){case"Polygon":var o=a.coordinates;i.push(new CC(o[0],o.slice(1)));break;case"MultiPolygon":M(a.coordinates,function(l){l[0]&&i.push(new CC(l[0],l.slice(1)))});break;case"LineString":i.push(new AC([a.coordinates]));break;case"MultiLineString":i.push(new AC(a.coordinates))}var s=new PR(n[e||"name"],i,n.cp);return s.properties=n,s})}var y7=Ae(),$f=Ae(),qn={estimate:1,determine:2};function wp(r){return{out:{noPxChangeTryDetermine:[]},kind:r}}function ER(r,e){var t=$(e,function(n){return r.scale.parse(n)});return r.type==="time"&&t.length>0&&(t.sort(),t.unshift(t[0]),t.push(t[t.length-1])),t}function m7(r,e){var t=r.getLabelModel().get("customValues");if(t){var n=Du(r),a=r.scale.getExtent(),i=ER(r,t),o=Ze(i,function(s){return s>=a[0]&&s<=a[1]});return{labels:$(o,function(s){var l={value:s};return{formattedLabel:n(l),rawLabel:r.scale.getLabel(l),tickValue:s,time:void 0,break:void 0}})}}return r.type==="category"?S7(r,e):x7(r)}function _7(r,e,t){var n=r.getTickModel().get("customValues");if(n){var a=r.scale.getExtent(),i=ER(r,n);return{ticks:Ze(i,function(o){return o>=a[0]&&o<=a[1]})}}return r.type==="category"?b7(r,e):{ticks:$(r.scale.getTicks(t),function(o){return o.value})}}function S7(r,e){var t=r.getLabelModel(),n=RR(r,t,e);return!t.get("show")||r.scale.isBlank()?{labels:[]}:n}function RR(r,e,t){var n=T7(r),a=ES(e),i=t.kind===qn.estimate;if(!i){var o=NR(n,a);if(o)return o}var s,l;ie(a)?s=VR(r,a):(l=a==="auto"?C7(r,t):a,s=BR(r,l));var u={labels:s,labelCategoryInterval:l};return i?t.out.noPxChangeTryDetermine.push(function(){return l_(n,a,u),!0}):l_(n,a,u),u}function b7(r,e){var t=w7(r),n=ES(e),a=NR(t,n);if(a)return a;var i,o;if((!e.get("show")||r.scale.isBlank())&&(i=[]),ie(n))i=VR(r,n,!0);else if(n==="auto"){var s=RR(r,r.getLabelModel(),wp(qn.determine));o=s.labelCategoryInterval,i=$(s.labels,function(l){return l.tickValue})}else o=n,i=BR(r,o,!0);return l_(t,n,{ticks:i,tickCategoryInterval:o})}function x7(r){var e=r.scale.getTicks(),t=Du(r);return{labels:$(e,function(n,a){return{formattedLabel:t(n,a),rawLabel:r.scale.getLabel(n),tickValue:n.value,time:n.time,break:n.break}})}}var w7=OR("axisTick"),T7=OR("axisLabel");function OR(r){return function(t){return $f(t)[r]||($f(t)[r]={list:[]})}}function NR(r,e){for(var t=0;tf&&(u=Math.max(1,Math.floor(l/f)));for(var c=s[0],v=r.dataToCoord(c+1)-r.dataToCoord(c),h=Math.abs(v*Math.cos(i)),p=Math.abs(v*Math.sin(i)),d=0,g=0;c<=s[1];c+=u){var y=0,m=0,_=yd(a({value:c}),n.font,"center","top");y=_.width*1.3,m=_.height*1.3,d=Math.max(d,y,7),g=Math.max(g,m,7)}var S=d/h,b=g/p;isNaN(S)&&(S=1/0),isNaN(b)&&(b=1/0);var x=Math.max(0,Math.floor(Math.min(S,b)));if(t===qn.estimate)return e.out.noPxChangeTryDetermine.push(j(M7,null,r,x,l)),x;var w=zR(r,x,l);return w??x}function M7(r,e,t){return zR(r,e,t)==null}function zR(r,e,t){var n=y7(r.model),a=r.getExtent(),i=n.lastAutoInterval,o=n.lastTickCount;if(i!=null&&o!=null&&Math.abs(i-e)<=1&&Math.abs(o-t)<=1&&i>e&&n.axisExtent0===a[0]&&n.axisExtent1===a[1])return i;n.lastTickCount=t,n.lastAutoInterval=e,n.axisExtent0=a[0],n.axisExtent1=a[1]}function D7(r){var e=r.getLabelModel();return{axisRotate:r.getRotate?r.getRotate():r.isHorizontal&&!r.isHorizontal()?90:0,labelRotate:e.get("rotate")||0,font:e.getFont()}}function BR(r,e,t){var n=Du(r),a=r.scale,i=a.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=i[0],f=a.count();u!==0&&l>1&&f/l>2&&(u=Math.round(Math.ceil(u/l)*l));var c=DR(r),v=o.get("showMinLabel")||c,h=o.get("showMaxLabel")||c;v&&u!==i[0]&&d(i[0]);for(var p=u;p<=i[1];p+=l)d(p);h&&p-l!==i[1]&&d(i[1]);function d(g){var y={value:g};s.push(t?g:{formattedLabel:n(y),rawLabel:a.getLabel(y),tickValue:g,time:void 0,break:void 0})}return s}function VR(r,e,t){var n=r.scale,a=Du(r),i=[];return M(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&i.push(t?l:{formattedLabel:a(o),rawLabel:s,tickValue:l,time:void 0,break:void 0})}),i}var MC=[0,1],Qn=(function(){function r(e,t,n){this.onBand=!1,this.inverse=!1,this.dim=e,this.scale=t,this._extent=n||[0,0]}return r.prototype.contain=function(e){var t=this._extent,n=Math.min(t[0],t[1]),a=Math.max(t[0],t[1]);return e>=n&&e<=a},r.prototype.containData=function(e){return this.scale.contain(this.scale.parse(e))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return IP(e||this.scale.getExtent(),this._extent)},r.prototype.setExtent=function(e,t){var n=this._extent;n[0]=e,n[1]=t},r.prototype.dataToCoord=function(e,t){var n=this._extent,a=this.scale;return e=a.normalize(a.parse(e)),this.onBand&&a.type==="ordinal"&&(n=n.slice(),DC(n,a.count())),$e(e,MC,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,a=this.scale;this.onBand&&a.type==="ordinal"&&(n=n.slice(),DC(n,a.count()));var i=$e(e,n,MC,t);return this.scale.scale(i)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=_7(this,t,{breakTicks:e.breakTicks,pruneByBreak:e.pruneByBreak}),a=n.ticks,i=$(a,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return I7(this,i,o,e.clamp),i},r.prototype.getMinorTicksCoords=function(){if(this.scale.type==="ordinal")return[];var e=this.model.getModel("minorTick"),t=e.get("splitNumber");t>0&&t<100||(t=5);var n=this.scale.getMinorTicks(t),a=$(n,function(i){return $(i,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return a},r.prototype.getViewLabels=function(e){return e=e||wp(qn.determine),m7(this,e).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var a=Math.abs(e[1]-e[0]);return Math.abs(a)/n},r.prototype.calculateCategoryInterval=function(e){return e=e||wp(qn.determine),A7(this,e)},r})();function DC(r,e){var t=r[1]-r[0],n=e,a=t/n/2;r[0]+=a,r[1]-=a}function I7(r,e,t,n){var a=e.length;if(!r.onBand||t||!a)return;var i=r.getExtent(),o,s;if(a===1)e[0].coord=i[0],e[0].onBand=!0,o=e[1]={coord:i[1],tickValue:e[0].tickValue,onBand:!0};else{var l=e[a-1].tickValue-e[0].tickValue,u=(e[a-1].coord-e[0].coord)/l;M(e,function(h){h.coord-=u/2,h.onBand=!0});var f=r.scale.getExtent();s=1+f[1]-e[a-1].tickValue,o={coord:e[a-1].coord+u*s,tickValue:f[1]+1,onBand:!0},e.push(o)}var c=i[0]>i[1];v(e[0].coord,i[0])&&(n?e[0].coord=i[0]:e.shift()),n&&v(i[0],e[0].coord)&&e.unshift({coord:i[0],onBand:!0}),v(i[1],o.coord)&&(n?o.coord=i[1]:e.pop()),n&&v(o.coord,i[1])&&e.push({coord:i[1],onBand:!0});function v(h,p){return h=Pt(h),p=Pt(p),c?h>p:ha&&(a+=ju);var h=Math.atan2(s,o);if(h<0&&(h+=ju),h>=n&&h<=a||h+ju>=n&&h+ju<=a)return l[0]=f,l[1]=c,u-t;var p=t*Math.cos(n)+r,d=t*Math.sin(n)+e,g=t*Math.cos(a)+r,y=t*Math.sin(a)+e,m=(p-o)*(p-o)+(d-s)*(d-s),_=(g-o)*(g-o)+(y-s)*(y-s);return m<_?(l[0]=p,l[1]=d,Math.sqrt(m)):(l[0]=g,l[1]=y,Math.sqrt(_))}function Tp(r,e,t,n,a,i,o,s){var l=a-r,u=i-e,f=t-r,c=n-e,v=Math.sqrt(f*f+c*c);f/=v,c/=v;var h=l*f+u*c,p=h/v;s&&(p=Math.min(Math.max(p,0),1)),p*=v;var d=o[0]=r+p*f,g=o[1]=e+p*c;return Math.sqrt((d-a)*(d-a)+(g-i)*(g-i))}function GR(r,e,t,n,a,i,o){t<0&&(r=r+t,t=-t),n<0&&(e=e+n,n=-n);var s=r+t,l=e+n,u=o[0]=Math.min(Math.max(a,r),s),f=o[1]=Math.min(Math.max(i,e),l);return Math.sqrt((u-a)*(u-a)+(f-i)*(f-i))}var Bn=[];function E7(r,e,t){var n=GR(e.x,e.y,e.width,e.height,r.x,r.y,Bn);return t.set(Bn[0],Bn[1]),n}function R7(r,e,t){for(var n=0,a=0,i=0,o=0,s,l,u=1/0,f=e.data,c=r.x,v=r.y,h=0;h0){e=e/180*Math.PI,Hn.fromArray(r[0]),at.fromArray(r[1]),wt.fromArray(r[2]),ue.sub(ma,Hn,at),ue.sub(ha,wt,at);var t=ma.len(),n=ha.len();if(!(t<.001||n<.001)){ma.scale(1/t),ha.scale(1/n);var a=ma.dot(ha),i=Math.cos(e);if(i1&&ue.copy(kr,wt),kr.toArray(r[1])}}}}function O7(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,Hn.fromArray(r[0]),at.fromArray(r[1]),wt.fromArray(r[2]),ue.sub(ma,at,Hn),ue.sub(ha,wt,at);var n=ma.len(),a=ha.len();if(!(n<.001||a<.001)){ma.scale(1/n),ha.scale(1/a);var i=ma.dot(e),o=Math.cos(t);if(i=l)ue.copy(kr,wt);else{kr.scaleAndAdd(ha,s/Math.tan(Math.PI/2-f));var c=wt.x!==at.x?(kr.x-at.x)/(wt.x-at.x):(kr.y-at.y)/(wt.y-at.y);if(isNaN(c))return;c<0?ue.copy(kr,at):c>1&&ue.copy(kr,wt)}kr.toArray(r[1])}}}}function hy(r,e,t,n){var a=t==="normal",i=a?r:r.ensureState(t);i.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),i.shape=i.shape||{},o>0&&(i.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();a?r.useStyle(s):i.style=s}function N7(r,e){var t=e.smooth,n=e.points;if(n)if(r.moveTo(n[0][0],n[0][1]),t>0&&n.length>=3){var a=zi(n[0],n[1]),i=zi(n[1],n[2]);if(!a||!i){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(a,i)*t,s=bh([],n[1],n[0],o/a),l=bh([],n[1],n[2],o/i),u=bh([],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],n[2][0],n[2][1])}else for(var f=1;f0){S(A*C,0,i);var D=A+w;D<0&&b(-D*C,1)}else b(-w*C,1)}}function S(w,T,C){w!==0&&(f=!0);for(var A=T;A0)for(var D=0;D0;D--){var E=C[D-1]*P;S(-E,D,i)}}}function x(w){var T=w<0?-1:1;w=Math.abs(w);for(var C=Math.ceil(w/(i-1)),A=0;A0?S(C,0,A+1):S(-C,i-A-1,i),w-=C,w<=0)return}return f}function V7(r){for(var e=0;e=0&&n.attr(i.oldLayoutSelect),be(v,"emphasis")>=0&&n.attr(i.oldLayoutEmphasis)),Ve(n,u,t,l)}else if(n.attr(u),!wu(n).valueAnimation){var c=re(n.style.opacity,1);n.style.opacity=0,st(n,{style:{opacity:c}},t,l)}if(i.oldLayout=u,n.states.select){var h=i.oldLayoutSelect={};Fv(h,u,Hv),Fv(h,n.states.select,Hv)}if(n.states.emphasis){var p=i.oldLayoutEmphasis={};Fv(p,u,Hv),Fv(p,n.states.emphasis,Hv)}Dk(n,l,f,t,t)}if(a&&!a.ignore&&!a.invisible){var i=H7(a),o=i.oldLayout,d={points:a.shape.points};o?(a.attr({shape:o}),Ve(a,{shape:d},t)):(a.setShape(d),a.style.strokePercent=0,st(a,{style:{strokePercent:1}},t)),i.oldLayout=d}},r})(),gy=Ae();function $7(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var a=gy(t).labelManager;a||(a=gy(t).labelManager=new W7),a.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var a=gy(t).labelManager;n.updatedSeries.forEach(function(i){a.addLabelsOfSeries(t.getViewOfSeriesModel(i))}),a.updateLayoutConfig(t),a.layout(t),a.processLabelsOverall()})}var yy=Math.sin,my=Math.cos,UR=Math.PI,Wo=Math.PI*2,Z7=180/UR,YR=(function(){function r(){}return r.prototype.reset=function(e){this._start=!0,this._d=[],this._str="",this._p=Math.pow(10,e||4)},r.prototype.moveTo=function(e,t){this._add("M",e,t)},r.prototype.lineTo=function(e,t){this._add("L",e,t)},r.prototype.bezierCurveTo=function(e,t,n,a,i,o){this._add("C",e,t,n,a,i,o)},r.prototype.quadraticCurveTo=function(e,t,n,a){this._add("Q",e,t,n,a)},r.prototype.arc=function(e,t,n,a,i,o){this.ellipse(e,t,n,n,0,a,i,o)},r.prototype.ellipse=function(e,t,n,a,i,o,s,l){var u=s-o,f=!l,c=Math.abs(u),v=Hi(c-Wo)||(f?u>=Wo:-u>=Wo),h=u>0?u%Wo:u%Wo+Wo,p=!1;v?p=!0:Hi(c)?p=!1:p=h>=UR==!!f;var d=e+n*my(o),g=t+a*yy(o);this._start&&this._add("M",d,g);var y=Math.round(i*Z7);if(v){var m=1/this._p,_=(f?1:-1)*(Wo-m);this._add("A",n,a,y,1,+f,e+n*my(o+_),t+a*yy(o+_)),m>.01&&this._add("A",n,a,y,0,+f,d,g)}else{var S=e+n*my(s),b=t+a*yy(s);this._add("A",n,a,y,+p,+f,S,b)}},r.prototype.rect=function(e,t,n,a){this._add("M",e,t),this._add("l",n,0),this._add("l",0,a),this._add("l",-n,0),this._add("Z")},r.prototype.closePath=function(){this._d.length>0&&this._add("Z")},r.prototype._add=function(e,t,n,a,i,o,s,l,u){for(var f=[],c=this._p,v=1;v"}function eY(r){return""}function zS(r,e){e=e||{};var t=e.newline?` `:"";function n(a){var i=a.children,o=a.tag,s=a.attrs,l=a.text;return Q7(o,s)+(o!=="style"?Rr(l):l||"")+(i?""+t+$(i,function(u){return n(u)}).join(t)+t:"")+eY(o)}return n(r)}function tY(r,e,t){t=t||{};var n=t.newline?` `:"",a=" {"+n,i=n+"}",o=$(Re(r),function(l){return l+a+$(Re(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+i}).join(n),s=$(Re(e),function(l){return"@keyframes "+l+a+$(Re(e[l]),function(u){return u+a+$(Re(e[l][u]),function(f){var c=e[l][u][f];return f==="d"&&(c='path("'+c+'")'),f+":"+c+";"}).join(n)+i}).join(n)+i}).join(n);return!o&&!s?"":[""].join(n)}function h_(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function RC(r,e,t,n){return Xt("svg","root",{width:r,height:e,xmlns:XR,"xmlns:xlink":qR,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var rY=0;function KR(){return rY++}var OC={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"},Uo="transform-origin";function nY(r,e,t){var n=H({},r.shape);H(n,e),r.buildPath(t,n);var a=new YR;return a.reset(SP(r)),t.rebuildPath(a,1),a.generateStr(),a.getStr()}function aY(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[Uo]=t+"px "+n+"px")}var iY={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function JR(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function oY(r,e,t){var n=r.shape.paths,a={},i,o;if(M(n,function(l){var u=h_(t.zrId);u.animation=!0,Fd(l,{},u,!0);var f=u.cssAnims,c=u.cssNodes,v=Re(f),h=v.length;if(h){o=v[h-1];var p=f[o];for(var d in p){var g=p[d];a[d]=a[d]||{d:""},a[d].d+=g.d||""}for(var y in c){var m=c[y].animation;m.indexOf(o)>=0&&(i=m)}}}),!!i){e.d=!1;var s=JR(a,t);return i.replace(o,s)}}function NC(r){return q(r)?OC[r]?"cubic-bezier("+OC[r]+")":N1(r)?r:"":""}function Fd(r,e,t,n){var a=r.animators,i=a.length,o=[];if(r instanceof Id){var s=oY(r,e,t);if(s)o.push(s);else if(!i)return}else if(!i)return;for(var l={},u=0;u0}).length){var We=JR(w,t);return We+" "+m[0]+" both"}}for(var g in l){var s=d(l[g]);s&&o.push(s)}if(o.length){var y=t.zrId+"-cls-"+KR();t.cssNodes["."+y]={animation:o.join(",")},e.class=y}}function sY(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};zC(n,e,t)}else{var a=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},i=a.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=v0(l))}var u=a.lineWidth;if(u){var f=!a.strokeNoScale&&r.transform?r.transform[0]:1;u=u/f}var n={cursor:"pointer"};i&&(n.fill=i),a.stroke&&(n.stroke=a.stroke),u&&(n["stroke-width"]=u),zC(n,e,t)}}function zC(r,e,t,n){var a=JSON.stringify(r),i=t.cssStyleCache[a];i||(i=t.zrId+"-cls-"+KR(),t.cssStyleCache[a]=i,t.cssNodes["."+i+":hover"]=r),e.class=e.class?e.class+" "+i:i}var pc=Math.round;function QR(r){return r&&q(r.src)}function eO(r){return r&&ie(r.toDataURL)}function BS(r,e,t,n){j7(function(a,i){var o=a==="fill"||a==="stroke";o&&_P(i)?rO(e,r,a,n):o&&z1(i)?nO(t,r,a,n):r[a]=i,o&&n.ssr&&i==="none"&&(r["pointer-events"]="visible")},e,t,!1),pY(t,r,n)}function VS(r,e){var t=NW(e);t&&(t.each(function(n,a){n!=null&&(r[(EC+a).toLowerCase()]=n+"")}),e.isSilent()&&(r[EC+"silent"]="true"))}function BC(r){return Hi(r[0]-1)&&Hi(r[1])&&Hi(r[2])&&Hi(r[3]-1)}function lY(r){return Hi(r[4])&&Hi(r[5])}function GS(r,e,t){if(e&&!(lY(e)&&BC(e))){var n=1e4;r.transform=BC(e)?"translate("+pc(e[4]*n)/n+" "+pc(e[5]*n)/n+")":aW(e)}}function VC(r,e,t){for(var n=r.points,a=[],i=0;i"u"){var g="Image width/height must been given explictly in svg-ssr renderer.";Sr(v,g),Sr(h,g)}else if(v==null||h==null){var y=function(A,D){if(A){var L=A.elm,I=v||D.width,P=h||D.height;A.tag==="pattern"&&(u?(P=1,I/=i.width):f&&(I=1,P/=i.height)),A.attrs.width=I,A.attrs.height=P,L&&(L.setAttribute("width",I),L.setAttribute("height",P))}},m=W1(p,null,r,function(A){l||y(x,A),y(c,A)});m&&m.width&&m.height&&(v=v||m.width,h=h||m.height)}c=Xt("image","img",{href:p,width:v,height:h}),o.width=v,o.height=h}else a.svgElement&&(c=se(a.svgElement),o.width=a.svgWidth,o.height=a.svgHeight);if(c){var _,S;l?_=S=1:u?(S=1,_=o.width/i.width):f?(_=1,S=o.height/i.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),S!=null&&!isNaN(S)&&(o.height=S);var b=bP(a);b&&(o.patternTransform=b);var x=Xt("pattern","",o,[c]),w=zS(x),T=n.patternCache,C=T[w];C||(C=n.zrId+"-p"+n.patternIdx++,T[w]=C,o.id=C,x=n.defs[C]=Xt("pattern",C,o,[c])),e[t]=gd(C)}}function dY(r,e,t){var n=t.clipPathCache,a=t.defs,i=n[r.id];if(!i){i=t.zrId+"-c"+t.clipPathIdx++;var o={id:i};n[r.id]=i,a[i]=Xt("clipPath",i,o,[tO(r,t)])}e["clip-path"]=gd(i)}function HC(r){return document.createTextNode(r)}function Qo(r,e,t){r.insertBefore(e,t)}function WC(r,e){r.removeChild(e)}function $C(r,e){r.appendChild(e)}function aO(r){return r.parentNode}function iO(r){return r.nextSibling}function _y(r,e){r.textContent=e}var ZC=58,gY=120,yY=Xt("","");function p_(r){return r===void 0}function fa(r){return r!==void 0}function mY(r,e,t){for(var n={},a=e;a<=t;++a){var i=r[a].key;i!==void 0&&(n[i]=a)}return n}function Tf(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function dc(r){var e,t=r.children,n=r.tag;if(fa(n)){var a=r.elm=jR(n);if(FS(yY,r),W(t))for(e=0;ei?(p=t[l+1]==null?null:t[l+1].elm,oO(r,p,t,a,l)):Dp(r,e,n,i))}function Dl(r,e){var t=e.elm=r.elm,n=r.children,a=e.children;r!==e&&(FS(r,e),p_(e.text)?fa(n)&&fa(a)?n!==a&&_Y(t,n,a):fa(a)?(fa(r.text)&&_y(t,""),oO(t,null,a,0,a.length-1)):fa(n)?Dp(t,n,0,n.length-1):fa(r.text)&&_y(t,""):r.text!==e.text&&(fa(n)&&Dp(t,n,0,n.length-1),_y(t,e.text)))}function SY(r,e){if(Tf(r,e))Dl(r,e);else{var t=r.elm,n=aO(t);dc(e),n!==null&&(Qo(n,e.elm,iO(t)),Dp(n,[r],0,0))}return e}var bY=0,xY=(function(){function r(e,t,n){if(this.type="svg",this.refreshHover=UC(),this.configLayer=UC(),this.storage=t,this._opts=n=H({},n),this.root=e,this._id="zr"+bY++,this._oldVNode=RC(n.width,n.height),e&&!n.ssr){var a=this._viewport=document.createElement("div");a.style.cssText="position:relative;overflow:hidden";var i=this._svgDom=this._oldVNode.elm=jR("svg");FS(null,this._oldVNode),a.appendChild(i),e.appendChild(a)}this.resize(n.width,n.height)}return r.prototype.getType=function(){return this.type},r.prototype.getViewportRoot=function(){return this._viewport},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.getSvgDom=function(){return this._svgDom},r.prototype.refresh=function(){if(this.root){var e=this.renderToVNode({willUpdate:!0});e.attrs.style="position:absolute;left:0;top:0;user-select:none",SY(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return FC(e,h_(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,a=this._height,i=h_(this._id);i.animation=e.animation,i.willUpdate=e.willUpdate,i.compress=e.compress,i.emphasis=e.emphasis,i.ssr=this._opts.ssr;var o=[],s=this._bgVNode=wY(n,a,this._backgroundColor,i);s&&o.push(s);var l=e.compress?null:this._mainVNode=Xt("g","main",{},[]);this._paintList(t,i,l?l.children:o),l&&o.push(l);var u=$(Re(i.defs),function(v){return i.defs[v]});if(u.length&&o.push(Xt("defs","defs",{},u)),e.animation){var f=tY(i.cssNodes,i.cssAnims,{newline:!0});if(f){var c=Xt("style","stl",{},[],f);o.push(c)}}return RC(n,a,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},zS(this.renderToVNode({animation:re(e.cssAnimation,!0),emphasis:re(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:re(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var a=e.length,i=[],o=0,s,l,u=0,f=0;f=0&&!(v&&l&&v[d]===l[d]);d--);for(var g=p-1;g>d;g--)o--,s=i[o-1];for(var y=d+1;y=s)}}for(var c=this.__startIndex;c15)break}}P.prevElClipPaths&&y.restore()};if(m)if(m.length===0)T=g.__endIndex;else for(var A=h.dpr,D=0;D0&&e>a[0]){for(l=0;le);l++);s=n[a[l]]}if(a.splice(l+1,0,e),n[e]=t,!t.virtual)if(s){var u=s.dom;u.nextSibling?o.insertBefore(t.dom,u.nextSibling):o.appendChild(t.dom)}else o.firstChild?o.insertBefore(t.dom,o.firstChild):o.appendChild(t.dom);t.painter||(t.painter=this)}},r.prototype.eachLayer=function(e,t){for(var n=this._zlevelList,a=0;a0?Wv:0),this._needsManuallyCompositing),f.__builtin__||L1("ZLevel "+u+" has been used by unkown layer "+f.id),f!==i&&(f.__used=!0,f.__startIndex!==l&&(f.__dirty=!0),f.__startIndex=l,f.incremental?f.__drawIndex=-1:f.__drawIndex=l,t(l),i=f),a.__dirty&Qr&&!a.__inHover&&(f.__dirty=!0,f.incremental&&f.__drawIndex<0&&(f.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(c,v){!c.__used&&c.getElementCount()>0&&(c.__dirty=!0,c.__startIndex=c.__endIndex=c.__drawIndex=0),c.__dirty&&c.__drawIndex<0&&(c.__drawIndex=c.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,M(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?xe(n[e],t,!0):n[e]=t;for(var a=0;a-1&&(u.style.stroke=u.style.fill,u.style.fill=B.color.neutral00,u.style.lineWidth=2),n},e.type="series.line",e.dependencies=["grid","polar"],e.defaultOption={z:3,coordinateSystem:"cartesian2d",legendHoverLink:!0,clip:!0,label:{position:"top"},endLabel:{show:!1,valueAnimation:!0,distance:8},lineStyle:{width:2,type:"solid"},emphasis:{scale:!0},step:!1,smooth:!1,smoothMonotone:null,symbol:"emptyCircle",symbolSize:6,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e})(nt);function ou(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var a=tu(r,e,t[0]);return a!=null?a+"":null}else if(n){for(var i=[],o=0;o=0&&n.push(e[i])}return n.join(" ")}var Wc=(function(r){N(e,r);function e(t,n,a,i){var o=r.call(this)||this;return o.updateData(t,n,a,i),o}return e.prototype._createSymbol=function(t,n,a,i,o,s){this.removeAll();var l=Nt(t,-1,-1,2,2,null,s);l.attr({z2:re(o,100),culling:!0,scaleX:i[0]/2,scaleY:i[1]/2}),l.drift=PY,this._symbolType=t,this.add(l)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){si(this.childAt(0))},e.prototype.downplay=function(){li(this.childAt(0))},e.prototype.setZ=function(t,n){var a=this.childAt(0);a.zlevel=t,a.z=n},e.prototype.setDraggable=function(t,n){var a=this.childAt(0);a.draggable=t,a.cursor=!n&&t?"move":a.cursor},e.prototype.updateData=function(t,n,a,i){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=e.getSymbolZ2(t,n),f=o!==this._symbolType,c=i&&i.disableAnimation;if(f){var v=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,u,v)}else{var h=this.childAt(0);h.silent=!1;var p={scaleX:l[0]/2,scaleY:l[1]/2};c?h.attr(p):Ve(h,p,s,n),Ln(h)}if(this._updateCommon(t,n,l,a,i),f){var h=this.childAt(0);if(!c){var p={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:h.style.opacity}};h.scaleX=h.scaleY=0,h.style.opacity=0,st(h,p,s,n)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,a,i,o){var s=this.childAt(0),l=t.hostModel,u,f,c,v,h,p,d,g,y;if(i&&(u=i.emphasisItemStyle,f=i.blurItemStyle,c=i.selectItemStyle,v=i.focus,h=i.blurScope,d=i.labelStatesModels,g=i.hoverScale,y=i.cursorStyle,p=i.emphasisDisabled),!i||t.hasItemOption){var m=i&&i.itemModel?i.itemModel:t.getItemModel(n),_=m.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),c=m.getModel(["select","itemStyle"]).getItemStyle(),f=m.getModel(["blur","itemStyle"]).getItemStyle(),v=_.get("focus"),h=_.get("blurScope"),p=_.get("disabled"),d=Ht(m),g=_.getShallow("scale"),y=m.getShallow("cursor")}var S=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(S||0)*Math.PI/180||0);var b=Xs(t.getItemVisual(n,"symbolOffset"),a);b&&(s.x=b[0],s.y=b[1]),y&&s.attr("cursor",y);var x=t.getItemVisual(n,"style"),w=x.fill;if(s instanceof ar){var T=s.style;s.useStyle(H({image:T.image,x:T.x,y:T.y,width:T.width,height:T.height},x))}else s.__isEmptyBrush?s.useStyle(H({},x)):s.useStyle(x),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(n,"liftZ"),A=this._z2;C!=null?A==null&&(this._z2=s.z2,s.z2+=C):A!=null&&(s.z2=A,this._z2=null);var D=o&&o.useNameLabel;Kt(s,d,{labelFetcher:l,labelDataIndex:n,defaultText:L,inheritColor:w,defaultOpacity:x.opacity});function L(E){return D?t.getName(E):ou(t,E)}this._sizeX=a[0]/2,this._sizeY=a[1]/2;var I=s.ensureState("emphasis");I.style=u,s.ensureState("select").style=c,s.ensureState("blur").style=f;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,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,a){var i=this.childAt(0),o=ge(this).dataIndex,s=a&&a.animation;if(this.silent=i.silent=!0,a&&a.fadeLabel){var l=i.getTextContent();l&&io(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){i.removeTextContent()}})}else i.removeTextContent();io(i,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Mu(t.getItemVisual(n,"symbolSize"))},e.getSymbolZ2=function(t,n){return t.getItemVisual(n,"z2")},e})(oe);function PY(r,e){this.parent.drift(r,e)}function by(r,e,t,n){return e&&!isNaN(e[0])&&!isNaN(e[1])&&!(n.isIgnore&&n.isIgnore(t))&&!(n.clipShape&&!n.clipShape.contain(e[0],e[1]))&&r.getItemVisual(t,"symbol")!=="none"}function qC(r){return r!=null&&!ce(r)&&(r={isIgnore:r}),r||{}}function jC(r){var e=r.hostModel,t=e.getModel("emphasis");return{emphasisItemStyle:t.getModel("itemStyle").getItemStyle(),blurItemStyle:e.getModel(["blur","itemStyle"]).getItemStyle(),selectItemStyle:e.getModel(["select","itemStyle"]).getItemStyle(),focus:t.get("focus"),blurScope:t.get("blurScope"),emphasisDisabled:t.get("disabled"),hoverScale:t.get("scale"),labelStatesModels:Ht(e),cursorStyle:e.get("cursor")}}var $c=(function(){function r(e){this.group=new oe,this._SymbolCtor=e||Wc}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=qC(t);var n=this.group,a=e.hostModel,i=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=jC(e),u={disableAnimation:s},f=t.getSymbolPoint||function(c){return e.getItemLayout(c)};i||n.removeAll(),e.diff(i).add(function(c){var v=f(c);if(by(e,v,c,t)){var h=new o(e,c,l,u);h.setPosition(v),e.setItemGraphicEl(c,h),n.add(h)}}).update(function(c,v){var h=i.getItemGraphicEl(v),p=f(c);if(!by(e,p,c,t)){n.remove(h);return}var d=e.getItemVisual(c,"symbol")||"circle",g=h&&h.getSymbolType&&h.getSymbolType();if(!h||g&&g!==d)n.remove(h),h=new o(e,c,l,u),h.setPosition(p);else{h.updateData(e,c,l,u);var y={x:p[0],y:p[1]};s?h.attr(y):Ve(h,y,a)}n.add(h),e.setItemGraphicEl(c,h)}).remove(function(c){var v=i.getItemGraphicEl(c);v&&v.fadeOut(function(){n.remove(v)},a)}).execute(),this._getSymbolPoint=f,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,a){var i=e._getSymbolPoint(a);n.setPosition(i),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=jC(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=qC(n);function a(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i0?t=n[0]:n[1]<0&&(t=n[1]),t}function uO(r,e,t,n){var a=NaN;r.stacked&&(a=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(a)&&(a=r.valueStart);var i=r.baseDataOffset,o=[];return o[i]=t.get(r.baseDim,n),o[1-i]=a,e.dataToPoint(o)}function EY(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,a){t.push({cmd:"=",idx:a,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function RY(r,e,t,n,a,i,o,s){for(var l=EY(r,e),u=[],f=[],c=[],v=[],h=[],p=[],d=[],g=lO(a,e,o),y=r.getLayout("points")||[],m=e.getLayout("points")||[],_=0;_=a||d<0)break;if(xs(y,m)){if(l){d+=i;continue}break}if(d===t)r[i>0?"moveTo":"lineTo"](y,m),c=y,v=m;else{var _=y-u,S=m-f;if(_*_+S*S<.5){d+=i;continue}if(o>0){for(var b=d+i,x=e[b*2],w=e[b*2+1];x===y&&w===m&&g=n||xs(x,w))h=y,p=m;else{A=x-u,D=w-f;var P=y-u,E=x-y,k=m-f,O=w-m,R=void 0,z=void 0;if(s==="x"){R=Math.abs(P),z=Math.abs(E);var V=A>0?1:-1;h=y-V*R*o,p=m,L=y+V*z*o,I=m}else if(s==="y"){R=Math.abs(k),z=Math.abs(O);var G=D>0?1:-1;h=y,p=m-G*R*o,L=y,I=m+G*z*o}else R=Math.sqrt(P*P+k*k),z=Math.sqrt(E*E+O*O),C=z/(z+R),h=y-A*o*(1-C),p=m-D*o*(1-C),L=y+A*o*C,I=m+D*o*C,L=Di(L,Ii(x,y)),I=Di(I,Ii(w,m)),L=Ii(L,Di(x,y)),I=Ii(I,Di(w,m)),A=L-y,D=I-m,h=y-A*R/z,p=m-D*R/z,h=Di(h,Ii(u,y)),p=Di(p,Ii(f,m)),h=Ii(h,Di(u,y)),p=Ii(p,Di(f,m)),A=y-h,D=m-p,L=y+A*z/R,I=m+D*z/R}r.bezierCurveTo(c,v,h,p,y,m),c=L,v=I}else r.lineTo(y,m)}u=y,f=m,d+=i}return g}var fO=(function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r})(),OY=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polyline",n}return e.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new fO},e.prototype.buildPath=function(t,n){var a=n.points,i=0,o=a.length/2;if(n.connectNulls){for(;o>0&&xs(a[o*2-2],a[o*2-1]);o--);for(;i=0){var S=u?(p-l)*_+l:(h-s)*_+s;return u?[t,S]:[S,t]}s=h,l=p;break;case o.C:h=i[c++],p=i[c++],d=i[c++],g=i[c++],y=i[c++],m=i[c++];var b=u?Kh(s,h,d,y,t,f):Kh(l,p,g,m,t,f);if(b>0)for(var x=0;x=0){var S=u?Yt(l,p,g,m,w):Yt(s,h,d,y,w);return u?[t,S]:[S,t]}}s=y,l=m;break}}},e})(Me),NY=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(fO),cO=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-polygon",n}return e.prototype.getDefaultShape=function(){return new NY},e.prototype.buildPath=function(t,n){var a=n.points,i=n.stackedOnPoints,o=0,s=a.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&xs(a[s*2-2],a[s*2-1]);s--);for(;oe){i?t.push(o(i,l,e)):a&&t.push(o(a,l,0),o(a,l,e));break}else a&&(t.push(o(a,l,0)),a=null),t.push(l),i=l}return t}function VY(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var a,i,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(a=s&&s.coordDim,a==="x"||a==="y"){i=n[o];break}}if(i){var l=e.getAxis(a),u=$(i.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),f=u.length,c=i.outerColors.slice();f&&u[0].coord>u[f-1].coord&&(u.reverse(),c.reverse());var v=BY(u,a==="x"?t.getWidth():t.getHeight()),h=v.length;if(!h&&f)return u[0].coord<0?c[1]?c[1]:u[f-1].color:c[0]?c[0]:u[0].color;var p=10,d=v[0].coord-p,g=v[h-1].coord+p,y=g-d;if(y<.001)return"transparent";M(v,function(_){_.offset=(_.coord-d)/y}),v.push({offset:h?v[h-1].offset:.5,color:c[1]||"transparent"}),v.unshift({offset:h?v[0].offset:.5,color:c[0]||"transparent"});var m=new bu(0,0,0,0,v,!0);return m[a]=d,m[a+"2"]=g,m}}}function GY(r,e,t){var n=r.get("showAllSymbol"),a=n==="auto";if(!(n&&!a)){var i=t.getAxesByScale("ordinal")[0];if(i&&!(a&&FY(i,e))){var o=e.mapDimension(i.dim),s={};return M(i.getViewLabels(),function(l){var u=i.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function FY(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var a=e.count(),i=Math.max(1,Math.round(a/5)),o=0;on)return!1;return!0}function HY(r,e){return isNaN(r)||isNaN(e)}function WY(r){for(var e=r.length/2;e>0&&HY(r[e*2-2],r[e*2-1]);e--);return e-1}function tA(r,e){return[r[e*2],r[e*2+1]]}function $Y(r,e,t){for(var n=r.length/2,a=t==="x"?0:1,i,o,s=0,l=-1,u=0;u=e||i>=e&&o<=e){l=u;break}s=u,i=o}return{range:[s,l],t:(e-i)/(o-i)}}function pO(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var z=p.getState("emphasis").style;z.lineWidth=+p.style.lineWidth+1}ge(p).seriesIndex=t.seriesIndex,ut(p,k,O,R);var V=eA(t.get("smooth")),G=t.get("smoothMonotone");if(p.setShape({smooth:V,smoothMonotone:G,connectNulls:w}),d){var F=s.getCalculationInfo("stackedOnSeries"),U=0;d.useStyle(fe(u.getAreaStyle(),{fill:L,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),F&&(U=eA(F.get("smooth"))),d.setShape({smooth:V,stackedOnSmooth:U,smoothMonotone:G,connectNulls:w}),Ft(d,t,"areaStyle"),ge(d).seriesIndex=t.seriesIndex,ut(d,k,O,R)}var J=this._changePolyState;s.eachItemGraphicEl(function(he){he&&(he.onHoverStateChange=J)}),this._polyline.onHoverStateChange=J,this._data=s,this._coordSys=i,this._stackedOnPoints=b,this._points=f,this._step=A,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),d&&this.packEventData(t,d))},e.prototype.packEventData=function(t,n){ge(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,a,i){var o=t.getData(),s=ks(o,i);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var f=l[s*2],c=l[s*2+1];if(isNaN(f)||isNaN(c)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(f,c))return;var v=t.get("zlevel")||0,h=t.get("z")||0;u=new Wc(o,s),u.x=f,u.y=c,u.setZ(v,h);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=v,p.z=h,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else Je.prototype.highlight.call(this,t,n,a,i)},e.prototype.downplay=function(t,n,a,i){var o=t.getData(),s=ks(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 Je.prototype.downplay.call(this,t,n,a,i)},e.prototype._changePolyState=function(t){var n=this._polygon;lp(this._polyline,t),n&&lp(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new OY({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var a=this._polygon;return a&&this._lineGroup.remove(a),a=new cO({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(a),this._polygon=a,a},e.prototype._initSymbolLabelAnimation=function(t,n,a){var i,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(i=s.isHorizontal(),o=!1):n.type==="polar"&&(i=s.dim==="angle",o=!0);var u=t.hostModel,f=u.get("animationDuration");ie(f)&&(f=f(null));var c=u.get("animationDelay")||0,v=ie(c)?c(null):c;t.eachItemGraphicEl(function(h,p){var d=h;if(d){var g=[h.x,h.y],y=void 0,m=void 0,_=void 0;if(a)if(o){var S=a,b=n.pointToCoord(g);i?(y=S.startAngle,m=S.endAngle,_=-b[1]/180*Math.PI):(y=S.r0,m=S.r,_=b[0])}else{var x=a;i?(y=x.x,m=x.x+x.width,_=h.x):(y=x.y+x.height,m=x.y,_=h.y)}var w=m===y?0:(_-y)/(m-y);l&&(w=1-w);var T=ie(c)?c(p):f*w+v,C=d.getSymbolPath(),A=C.getTextContent();d.attr({scaleX:0,scaleY:0}),d.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:T}),A&&A.animateFrom({style:{opacity:0}},{duration:300,delay:T}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,a){var i=t.getModel("endLabel");if(pO(t)){var o=t.getData(),s=this._polyline,l=o.getLayout("points");if(!l){s.removeTextContent(),this._endLabel=null;return}var u=this._endLabel;u||(u=this._endLabel=new Be({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var f=WY(l);f>=0&&(Kt(s,Ht(t,"endLabel"),{inheritColor:a,labelFetcher:t,labelDataIndex:f,defaultText:function(c,v,h){return h!=null?sO(o,h):ou(o,c)},enableTextSetter:!0},ZY(i,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,a,i,o,s,l){var u=this._endLabel,f=this._polyline;if(u){t<1&&i.originalX==null&&(i.originalX=u.x,i.originalY=u.y);var c=a.getLayout("points"),v=a.hostModel,h=v.get("connectNulls"),p=s.get("precision"),d=s.get("distance")||0,g=l.getBaseAxis(),y=g.isHorizontal(),m=g.inverse,_=n.shape,S=m?y?_.x:_.y+_.height:y?_.x+_.width:_.y,b=(y?d:0)*(m?-1:1),x=(y?0:-d)*(m?-1:1),w=y?"x":"y",T=$Y(c,S,w),C=T.range,A=C[1]-C[0],D=void 0;if(A>=1){if(A>1&&!h){var L=tA(c,C[0]);u.attr({x:L[0]+b,y:L[1]+x}),o&&(D=v.getRawValue(C[0]))}else{var L=f.getPointOn(S,w);L&&u.attr({x:L[0]+b,y:L[1]+x});var I=v.getRawValue(C[0]),P=v.getRawValue(C[1]);o&&(D=FP(a,p,I,P,T.t))}i.lastFrameIndex=C[0]}else{var E=t===1||i.lastFrameIndex>0?C[0]:0,L=tA(c,E);o&&(D=v.getRawValue(E)),u.attr({x:L[0]+b,y:L[1]+x})}if(o){var k=wu(u);typeof k.setLabelText=="function"&&k.setLabelText(D)}}},e.prototype._doUpdateAnimation=function(t,n,a,i,o,s,l){var u=this._polyline,f=this._polygon,c=t.hostModel,v=RY(this._data,t,this._stackedOnPoints,n,this._coordSys,a,this._valueOrigin),h=v.current,p=v.stackedOnCurrent,d=v.next,g=v.stackedOnNext;if(o&&(p=Li(v.stackedOnCurrent,v.current,a,o,l),h=Li(v.current,null,a,o,l),g=Li(v.stackedOnNext,v.next,a,o,l),d=Li(v.next,null,a,o,l)),QC(h,d)>3e3||f&&QC(p,g)>3e3){u.stopAnimation(),u.setShape({points:d}),f&&(f.stopAnimation(),f.setShape({points:d,stackedOnPoints:g}));return}u.shape.__points=v.current,u.shape.points=h;var y={shape:{points:d}};v.current!==h&&(y.shape.__points=v.next),u.stopAnimation(),Ve(u,y,c),f&&(f.setShape({points:h,stackedOnPoints:p}),f.stopAnimation(),Ve(f,{shape:{stackedOnPoints:g}},c),u.shape.points!==f.shape.points&&(f.shape.points=u.shape.points));for(var m=[],_=v.status,S=0;S<_.length;S++){var b=_[S].cmd;if(b==="="){var x=t.getItemGraphicEl(_[S].idx1);x&&m.push({el:x,ptIdx:S})}}u.animators&&u.animators.length&&u.animators[0].during(function(){f&&f.dirtyShape();for(var w=u.shape.__points,T=0;Te&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t10&&o.type==="cartesian2d"&&i){var l=o.getBaseAxis(),u=o.getOtherAxis(l),f=l.getExtent(),c=n.getDevicePixelRatio(),v=Math.abs(f[1]-f[0])*(c||1),h=Math.round(s/v);if(isFinite(h)&&h>1){i==="lttb"?e.setData(a.lttbDownSample(a.mapDimension(u.dim),1/h)):i==="minmax"&&e.setData(a.minmaxDownSample(a.mapDimension(u.dim),1/h));var p=void 0;q(i)?p=YY[i]:ie(i)&&(p=i),p&&e.setData(a.downSample(a.mapDimension(u.dim),1/h,p,XY))}}}}}function qY(r){r.registerChartView(UY),r.registerSeriesModel(LY),r.registerLayout(Uc("line",!0)),r.registerVisual({seriesType:"line",reset:function(e){var t=e.getData(),n=e.getModel("lineStyle").getLineStyle();n&&!n.stroke&&(n.stroke=t.getVisual("style").fill),t.setVisual("legendLineStyle",n)}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,dO("line"))}var gc=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return gi(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,a){var i=this.coordinateSystem;if(i&&i.clampData){var o=i.clampData(t),s=i.dataToPoint(o);if(a)M(i.getAxes(),function(v,h){if(v.type==="category"&&n!=null){var p=v.getTicksCoords(),d=v.getTickModel().get("alignWithLabel"),g=o[h],y=n[h]==="x1"||n[h]==="y1";if(y&&!d&&(g+=1),p.length<2)return;if(p.length===2){s[h]=v.toGlobalCoord(v.getExtent()[y?1:0]);return}for(var m=void 0,_=void 0,S=1,b=0;bg){_=(x+m)/2;break}b===1&&(S=w-p[0].tickValue)}_==null&&(m?m&&(_=p[p.length-1].coord):_=p[0].coord),s[h]=v.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),f=l.getLayout("size"),c=i.getBaseAxis().isHorizontal()?0:1;s[c]+=u+f/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod",defaultBarGap:"10%"},e})(nt);nt.registerClass(gc);var jY=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(){return gi(null,this,{useEncodeDefaulter:!0,createInvertedIndices:!!this.get("realtimeSort",!0)||null})},e.prototype.getProgressive=function(){return this.get("large")?this.get("progressive"):!1},e.prototype.getProgressiveThreshold=function(){var t=this.get("progressiveThreshold"),n=this.get("largeThreshold");return n>t&&(t=n),t},e.prototype.brushSelector=function(t,n,a){return a.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=go(gc.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:B.color.primary,borderWidth:2}},realtimeSort:!1}),e})(gc),KY=(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})(),Ip=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new KY},e.prototype.buildPath=function(t,n){var a=n.cx,i=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,f=n.startAngle,c=n.endAngle,v=n.clockwise,h=Math.PI*2,p=v?c-fMath.PI/2&&fs)return!0;s=c}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var a=n.scale,i=a.getExtent(),o=Math.max(0,i[0]),s=Math.min(i[1],a.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==a.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,a,i){if(this._isOrderChangedWithinSameData(t,n,a)){var o=this._dataSort(t,a,n);this._isOrderDifferentInView(o,a)&&(this._removeOnRenderedListener(i),i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",axisId:a.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,a){var i=n.baseAxis,o=this._dataSort(t,i,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",isInitSort:!0,axisId:i.index,sortInfo:o})},e.prototype.remove=function(t,n){this._clear(this._model),this._removeOnRenderedListener(n)},e.prototype.dispose=function(t,n){this._removeOnRenderedListener(n)},e.prototype._removeOnRenderedListener=function(t){this._onRendered&&(t.getZr().off("rendered",this._onRendered),this._onRendered=null)},e.prototype._clear=function(t){var n=this.group,a=this._data;t&&t.isAnimationEnabled()&&a&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],a.eachItemGraphicEl(function(i){ei(i,t,ge(i).dataIndex)})):n.removeAll(),this._data=null,this._isFirstFrame=!0},e.prototype._removeBackground=function(){this.group.remove(this._backgroundGroup),this._backgroundGroup=null},e.type="bar",e})(Je),rA={cartesian2d:function(r,e){var t=e.width<0?-1:1,n=e.height<0?-1:1;t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height);var a=r.x+r.width,i=r.y+r.height,o=wy(e.x,r.x),s=Ty(e.x+e.width,a),l=wy(e.y,r.y),u=Ty(e.y+e.height,i),f=sa?s:o,e.y=c&&l>i?u:l,e.width=f?0:s-o,e.height=c?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),f||c},polar:function(r,e){var t=e.r0<=e.r?1:-1;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}var a=Ty(e.r,r.r),i=wy(e.r0,r.r0);e.r=a,e.r0=i;var o=a-i<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},nA={cartesian2d:function(r,e,t,n,a,i,o,s,l){var u=new Ce({shape:H({},n),z2:1});if(u.__dataIndex=t,u.name="item",i){var f=u.shape,c=a?"height":"width";f[c]=0}return u},polar:function(r,e,t,n,a,i,o,s,l){var u=!a&&l?Ip:br,f=new u({shape:n,z2:1});f.name="item";var c=gO(a);if(f.calculateTextPosition=JY(c,{isRoundCap:u===Ip}),i){var v=f.shape,h=a?"r":"endAngle",p={};v[h]=a?n.r0:n.startAngle,p[h]=n[h],(s?Ve:st)(f,{shape:p},i)}return f}};function rX(r,e){var t=r.get("realtimeSort",!0),n=e.getBaseAxis();if(t&&n.type==="category"&&e.type==="cartesian2d")return{baseAxis:n,otherAxis:e.getOtherAxis(n)}}function aA(r,e,t,n,a,i,o,s){var l,u;i?(u={x:n.x,width:n.width},l={y:n.y,height:n.height}):(u={y:n.y,height:n.height},l={x:n.x,width:n.width}),s||(o?Ve:st)(t,{shape:l},e,a,null);var f=e?r.baseAxis.model:null;(o?Ve:st)(t,{shape:u},f,a)}function iA(r,e){for(var t=0;t0?1:-1,o=n.height>0?1:-1;return{x:n.x+i*a/2,y:n.y+o*a/2,width:n.width-i*a,height:n.height-o*a}},polar:function(r,e,t){var n=r.getItemLayout(e);return{cx:n.cx,cy:n.cy,r0:n.r0,r:n.r,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}}};function iX(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function gO(r){return(function(e){var t=e?"Arc":"Angle";return function(n){switch(n){case"start":case"insideStart":case"end":case"insideEnd":return n+t;default:return n}}})(r)}function sA(r,e,t,n,a,i,o,s){var l=e.getItemVisual(t,"style");if(s){if(!i.get("roundCap")){var f=r.shape,c=_a(n.getModel("itemStyle"),f,!0);H(f,c),r.setShape(f)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var v=n.getShallow("cursor");v&&r.attr("cursor",v);var h=s?o?a.r>=a.r0?"endArc":"startArc":a.endAngle>=a.startAngle?"endAngle":"startAngle":o?a.height>=0?"bottom":"top":a.width>=0?"right":"left",p=Ht(n);Kt(r,p,{labelFetcher:i,labelDataIndex:t,defaultText:ou(i.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:h});var d=r.getTextContent();if(s&&d){var g=n.get(["label","position"]);r.textConfig.inside=g==="middle"?!0:null,QY(r,g==="outside"?h:g,gO(o),n.get(["label","rotate"]))}Mk(d,p,i.getRawValue(t),function(m){return sO(e,m)});var y=n.getModel(["emphasis"]);ut(r,y.get("focus"),y.get("blurScope"),y.get("disabled")),Ft(r,n),iX(a)&&(r.style.fill="none",r.style.stroke="none",M(r.states,function(m){m.style&&(m.style.fill=m.style.stroke="none")}))}function oX(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,a=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),i=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,a,i)}var sX=(function(){function r(){}return r})(),lA=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new sX},e.prototype.buildPath=function(t,n){for(var a=n.points,i=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,f=0;f=0?t:null},30,!1);function lX(r,e,t){for(var n=r.baseDimIdx,a=1-n,i=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,f=0,c=i.length/3;f=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[f]}return-1}function yO(r,e,t){if(so(t,"cartesian2d")){var n=e,a=t.getArea();return{x:r?n.x:a.x,y:r?a.y:n.y,width:r?n.width:a.width,height:r?a.height:n.height}}else{var a=t.getArea(),i=e;return{cx:a.cx,cy:a.cy,r0:r?a.r0:i.r0,r:r?a.r:i.r,startAngle:r?i.startAngle:0,endAngle:r?i.endAngle:Math.PI*2}}}function uX(r,e,t){var n=r.type==="polar"?br:Ce;return new n({shape:yO(e,t,r),silent:!0,z2:0})}function fX(r){r.registerChartView(tX),r.registerSeriesModel(jY),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Se(SR,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bR("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,dO("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(a){e.sortInfo&&a.axis.setCategorySortInfo(e.sortInfo)})})}var cA=Math.PI*2,Yv=Math.PI/180;function cX(r,e,t){e.eachSeriesByType(r,function(n){var a=n.getData(),i=a.mapDimension("value"),o=Xk(n,t),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=o.viewRect,v=-n.get("startAngle")*Yv,h=n.get("endAngle"),p=n.get("padAngle")*Yv;h=h==="auto"?v-cA:-h*Yv;var d=n.get("minAngle")*Yv,g=d+p,y=0;a.each(i,function(O){!isNaN(O)&&y++});var m=a.getSum(i),_=Math.PI/(m||y)*2,S=n.get("clockwise"),b=n.get("roseType"),x=n.get("stillShowZeroSum"),w=a.getDataExtent(i);w[0]=0;var T=S?1:-1,C=[v,h],A=T*p/2;wd(C,!S),v=C[0],h=C[1];var D=mO(n);D.startAngle=v,D.endAngle=h,D.clockwise=S,D.cx=s,D.cy=l,D.r=u,D.r0=f;var L=Math.abs(h-v),I=L,P=0,E=v;if(a.setLayout({viewRect:c,r:u}),a.each(i,function(O,R){var z;if(isNaN(O)){a.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:S,cx:s,cy:l,r0:f,r:b?NaN:u});return}b!=="area"?z=m===0&&x?_:O*_:z=L/y,zz?(G=E+T*z/2,F=G):(G=E+A,F=V-A),a.setItemLayout(R,{angle:z,startAngle:G,endAngle:F,clockwise:S,cx:s,cy:l,r0:f,r:b?$e(O,w,[f,u]):u}),E=V}),It?y:g,b=Math.abs(_.label.y-t);if(b>=S.maxY){var x=_.label.x-e-_.len2*a,w=n+_.len,T=Math.abs(x)r.unconstrainedWidth?null:v:null;n.setStyle("width",h)}SO(i,n)}}}function SO(r,e){hA.rect=r,$R(hA,e,pX)}var pX={minMarginForce:[null,0,null,0],marginDefault:[1,0,1,0]},hA={};function Cy(r){return r.position==="center"}function dX(r){var e=r.getData(),t=[],n,a,i=!1,o=(r.get("minShowLabelAngle")||0)*vX,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,f=s.x,c=s.y,v=s.height;function h(x){x.ignore=!0}function p(x){if(!x.ignore)return!0;for(var w in x.states)if(x.states[w].ignore===!1)return!0;return!1}e.each(function(x){var w=e.getItemGraphicEl(x),T=w.shape,C=w.getTextContent(),A=w.getTextGuideLine(),D=e.getItemModel(x),L=D.getModel("label"),I=L.get("position")||D.get(["emphasis","label","position"]),P=L.get("distanceToLabelLine"),E=L.get("alignTo"),k=X(L.get("edgeDistance"),u),O=L.get("bleedMargin");O==null&&(O=Math.min(u,v)>200?10:2);var R=D.getModel("labelLine"),z=R.get("length");z=X(z,u);var V=R.get("length2");if(V=X(V,u),Math.abs(T.endAngle-T.startAngle)0?"right":"left":F>0?"left":"right"}var Ge=Math.PI,qe=0,yt=L.get("rotate");if(ze(yt))qe=yt*(Ge/180);else if(I==="center")qe=0;else if(yt==="radial"||yt===!0){var wr=F<0?-G+Ge:-G;qe=wr}else if(yt==="tangential"&&I!=="outside"&&I!=="outer"){var dr=Math.atan2(F,U);dr<0&&(dr=Ge*2+dr);var Ra=U>0;Ra&&(dr=Ge+dr),qe=dr-Ge}if(i=!!qe,C.x=J,C.y=he,C.rotation=qe,C.setStyle({verticalAlign:"middle"}),pe){C.setStyle({align:We});var ku=C.states.select;ku&&(ku.x+=C.x,ku.y+=C.y)}else{var yi=new ve(0,0,0,0);SO(yi,C),t.push({label:C,labelLine:A,position:I,len:z,len2:V,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new ue(F,U),linePoints:Oe,textAlign:We,labelDistance:P,labelAlignTo:E,edgeDistance:k,bleedMargin:O,rect:yi,unconstrainedWidth:yi.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:pe})}}),!i&&r.get("avoidLabelOverlap")&&hX(t,n,a,l,u,v,f,c);for(var d=0;d0){for(var f=o.getItemLayout(0),c=1;isNaN(f&&f.startAngle)&&c=i.r0}},e.type="pie",e})(Je);function Lu(r,e,t){e=W(e)&&{coordDimensions:e}||H({encodeDefine:r.getEncode()},e);var n=r.getSource(),a=Fc(n,e).dimensions,i=new Or(a,r);return i.initData(n,t),i}var Pu=(function(){function r(e,t){this._getDataWithEncodedVisual=e,this._getRawData=t}return r.prototype.getAllNames=function(){var e=this._getRawData();return e.mapArray(e.getName)},r.prototype.containName=function(e){var t=this._getRawData();return t.indexOfName(e)>=0},r.prototype.indexOfName=function(e){var t=this._getDataWithEncodedVisual();return t.indexOfName(e)},r.prototype.getItemVisual=function(e,t){var n=this._getDataWithEncodedVisual();return n.getItemVisual(e,t)},r})(),mX=Ae(),bO=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pu(j(this.getData,this),j(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Lu(this,{coordDimensions:["value"],encodeDefaulter:Se(hS,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),a=mX(n),i=a.seats;if(!i){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),i=a.seats=FW(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=i[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){Ps(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.type="series.pie",e.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"},e})(nt);D$({fullType:bO.type,getCoord2:function(r){return r.getShallow("center")}});function _X(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(a){var i=n.mapDimension("value"),o=n.get(i,a);return!(ze(o)&&!isNaN(o)&&o<0)})}}}function SX(r){r.registerChartView(yX),r.registerSeriesModel(bO),VE("pie",r.registerAction),r.registerLayout(Se(cX,"pie")),r.registerProcessor(Iu("pie")),r.registerProcessor(_X("pie"))}var bX=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.getInitialData=function(t,n){return gi(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?5e3:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?1e4:this.get("progressiveThreshold"))},e.prototype.brushSelector=function(t,n,a){return a.point(n.getItemLayout(t))},e.prototype.getZLevelKey=function(){return this.getData().count()>this.getProgressiveThreshold()?this.id:""},e.type="series.scatter",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:B.color.primary}},universalTransition:{divideShape:"clone"}},e})(nt),xO=4,xX=(function(){function r(){}return r})(),wX=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.getDefaultShape=function(){return new xX},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var a=n.points,i=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&i[0]=0;u--){var f=u*2,c=i[f]-s/2,v=i[f+1]-l/2;if(t>=c&&n>=v&&t<=c+s&&n<=v+l)return u}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.points,i=n.size,o=i[0],s=i[1],l=1/0,u=1/0,f=-1/0,c=-1/0,v=0;v=0&&(u.dataIndex=c+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),CX=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.updateData(i,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateSymbolDraw(i,t);o.incrementalPrepareUpdate(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,a){var i=t.getData();if(this.group.dirty(),!this._finished||i.count()>1e4)return{update:!0};var o=Uc("").reset(t,n,a);o.progress&&o.progress({start:0,end:i.count(),count:i.count()},i),this._symbolDraw.updateLayout(i)},e.prototype.eachRendered=function(t){this._symbolDraw&&this._symbolDraw.eachRendered(t)},e.prototype._getClipShape=function(t){if(t.get("clip",!0)){var n=t.coordinateSystem;return n&&n.getArea&&n.getArea(.1)}},e.prototype._updateSymbolDraw=function(t,n){var a=this._symbolDraw,i=n.pipelineContext,o=i.large;return(!a||o!==this._isLargeDraw)&&(a&&a.remove(),a=this._symbolDraw=o?new TX:new $c,this._isLargeDraw=o,this.group.removeAll()),this.group.add(a.group),a},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e})(Je),wO={left:0,right:0,top:0,bottom:0},Lp=["25%","25%"],AX=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.mergeDefaultAndTheme=function(t,n){var a=Us(t.outerBounds);r.prototype.mergeDefaultAndTheme.apply(this,arguments),a&&t.outerBounds&&Ia(t.outerBounds,a)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.apply(this,arguments),this.option.outerBounds&&t.outerBounds&&Ia(this.option.outerBounds,t.outerBounds)},e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"15%",top:65,right:"10%",bottom:80,containLabel:!1,outerBoundsMode:"auto",outerBounds:wO,outerBoundsContain:"all",outerBoundsClampWidth:Lp[0],outerBoundsClampHeight:Lp[1],backgroundColor:B.color.transparent,borderWidth:1,borderColor:B.color.neutral30},e})(Le),g_=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",dt).models[0]},e.type="cartesian2dAxis",e})(Le);zt(g_,Hc);var TO={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:B.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:B.color.axisLabel,textMargin:[0,3]},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:B.color.axisSplitLine,width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:[B.color.backgroundTint,B.color.backgroundTransparent]}},breakArea:{show:!0,itemStyle:{color:B.color.neutral00,borderColor:B.color.border,borderWidth:1,borderType:[3,3],opacity:.6},zigzagAmplitude:4,zigzagMinSpan:4,zigzagMaxSpan:20,zigzagZ:100,expandOnClick:!0},breakLabelLayout:{moveOverlap:"auto"}},MX=xe({boundaryGap:!0,deduplication:null,jitter:0,jitterOverlap:!0,jitterMargin:2,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto",show:"auto"},axisLabel:{interval:"auto"}},TO),HS=xe({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:B.color.axisMinorSplitLine,width:1}}},TO),DX=xe({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},HS),IX=fe({logBase:10},HS);const CO={category:MX,value:HS,time:DX,log:IX};var LX={value:1,category:1,time:1,log:1},y_=null;function PX(r){y_||(y_=r)}function Yc(){return y_}function su(r,e,t,n){M(LX,function(a,i){var o=xe(xe({},CO[i],!0),n,!0),s=(function(l){N(u,l);function u(){var f=l!==null&&l.apply(this,arguments)||this;return f.type=e+"Axis."+i,f}return u.prototype.mergeDefaultAndTheme=function(f,c){var v=oc(this),h=v?Us(f):{},p=c.getTheme();xe(f,p.get(i+"Axis")),xe(f,this.getDefaultOption()),f.type=pA(f),v&&Ia(f,h,v)},u.prototype.optionUpdated=function(){var f=this.option;f.type==="category"&&(this.__ordinalMeta=vc.createByAxisModel(this))},u.prototype.getCategories=function(f){var c=this.option;if(c.type==="category")return f?c.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.prototype.updateAxisBreaks=function(f){var c=Yc();return c?c.updateModelAxisBreak(this,f):{breaks:[]}},u.type=e+"Axis."+i,u.defaultOption=o,u})(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",pA)}function pA(r){return r.type||(r.data?"category":"value")}var kX=(function(){function r(e){this.type="cartesian",this._dimList=[],this._axes={},this.name=e||""}return r.prototype.getAxis=function(e){return this._axes[e]},r.prototype.getAxes=function(){return $(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),Ze(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r})(),m_=["x","y"];function dA(r){return(r.type==="interval"||r.type==="time")&&!r.hasBreaks()}var EX=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=m_,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!dA(t)||!dA(n))){var a=t.getExtent(),i=n.getExtent(),o=this.dataToPoint([a[0],i[0]]),s=this.dataToPoint([a[1],i[1]]),l=a[1]-a[0],u=i[1]-i[0];if(!(!l||!u)){var f=(s[0]-o[0])/l,c=(s[1]-o[1])/u,v=o[0]-a[0]*f,h=o[1]-i[0]*c,p=this._transform=[f,0,0,c,v,h];this._invTransform=Yn([],p)}}},e.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAxis("x")},e.prototype.containPoint=function(t){var n=this.getAxis("x"),a=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&a.contain(a.toLocalCoord(t[1]))},e.prototype.containData=function(t){return this.getAxis("x").containData(t[0])&&this.getAxis("y").containData(t[1])},e.prototype.containZone=function(t,n){var a=this.dataToPoint(t),i=this.dataToPoint(n),o=this.getArea(),s=new ve(a[0],a[1],i[0]-a[0],i[1]-a[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,a){a=a||[];var i=t[0],o=t[1];if(this._transform&&i!=null&&isFinite(i)&&o!=null&&isFinite(o))return Mt(a,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return a[0]=s.toGlobalCoord(s.dataToCoord(i,n)),a[1]=l.toGlobalCoord(l.dataToCoord(o,n)),a},e.prototype.clampData=function(t,n){var a=this.getAxis("x").scale,i=this.getAxis("y").scale,o=a.getExtent(),s=i.getExtent(),l=a.parse(t[0]),u=i.parse(t[1]);return n=n||[],n[0]=Math.min(Math.max(Math.min(o[0],o[1]),l),Math.max(o[0],o[1])),n[1]=Math.min(Math.max(Math.min(s[0],s[1]),u),Math.max(s[0],s[1])),n},e.prototype.pointToData=function(t,n,a){if(a=a||[],this._invTransform)return Mt(a,t,this._invTransform);var i=this.getAxis("x"),o=this.getAxis("y");return a[0]=i.coordToData(i.toLocalCoord(t[0]),n),a[1]=o.coordToData(o.toLocalCoord(t[1]),n),a},e.prototype.getOtherAxis=function(t){return this.getAxis(t.dim==="x"?"y":"x")},e.prototype.getArea=function(t){t=t||0;var n=this.getAxis("x").getGlobalExtent(),a=this.getAxis("y").getGlobalExtent(),i=Math.min(n[0],n[1])-t,o=Math.min(a[0],a[1])-t,s=Math.max(n[0],n[1])-i+t,l=Math.max(a[0],a[1])-o+t;return new ve(i,o,s,l)},e})(kX),AO=(function(r){N(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.index=0,s.type=i||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.getGlobalExtent=function(t){var n=this.getExtent();return n[0]=this.toGlobalCoord(n[0]),n[1]=this.toGlobalCoord(n[1]),t&&n[0]>n[1]&&n.reverse(),n},e.prototype.pointToData=function(t,n){return this.coordToData(this.toLocalCoord(t[this.dim==="x"?0:1]),n)},e.prototype.setCategorySortInfo=function(t){if(this.type!=="category")return!1;this.model.option.categorySortInfo=t,this.scale.setSortInfo(t)},e})(Qn),Hd="expandAxisBreak",MO="collapseAxisBreak",DO="toggleAxisBreak",WS="axisbreakchanged",RX={type:Hd,event:WS,update:"update",refineEvent:$S},OX={type:MO,event:WS,update:"update",refineEvent:$S},NX={type:DO,event:WS,update:"update",refineEvent:$S};function $S(r,e,t,n){var a=[];return M(r,function(i){a=a.concat(i.eventBreaks)}),{eventContent:{breaks:a}}}function zX(r){r.registerAction(RX,e),r.registerAction(OX,e),r.registerAction(NX,e);function e(t,n){var a=[],i=Wl(n,t);function o(s,l){M(i[s],function(u){var f=u.updateAxisBreaks(t);M(f.breaks,function(c){var v;a.push(fe((v={},v[l]=u.componentIndex,v),c))})})}return o("xAxisModels","xAxisIndex"),o("yAxisModels","yAxisIndex"),o("singleAxisModels","singleAxisIndex"),{eventBreaks:a}}}var Wi=Math.PI,BX=[[1,2,1,2],[5,3,5,3],[8,3,8,3]],VX=[[0,1,0,1],[0,3,0,3],[0,3,0,3]],lu=Ae(),IO=Ae(),LO=(function(){function r(e){this.recordMap={},this.resolveAxisNameOverlap=e}return r.prototype.ensureRecord=function(e){var t=e.axis.dim,n=e.componentIndex,a=this.recordMap,i=a[t]||(a[t]=[]);return i[n]||(i[n]={ready:{}})},r})();function GX(r,e,t,n){var a=t.axis,i=e.ensureRecord(t),o=[],s,l=ZS(r.axisName)&&iu(r.nameLocation);M(n,function(p){var d=La(p);if(!(!d||d.label.ignore)){o.push(d);var g=i.transGroup;l&&(g.transform?Yn(Ku,g.transform):pd(Ku),d.transform&&Sa(Ku,Ku,d.transform),ve.copy(Xv,d.localRect),Xv.applyTransform(Ku),s?s.union(Xv):ve.copy(s=new ve(0,0,0,0),Xv))}});var u=Math.abs(i.dirVec.x)>.1?"x":"y",f=i.transGroup[u];if(o.sort(function(p,d){return Math.abs(p.label[u]-f)-Math.abs(d.label[u]-f)}),l&&s){var c=a.getExtent(),v=Math.min(c[0],c[1]),h=Math.max(c[0],c[1])-v;s.union(new ve(v,0,h,1))}i.stOccupiedRect=s,i.labelInfoList=o}var Ku=rr(),Xv=new ve(0,0,0,0),PO=function(r,e,t,n,a,i){if(iu(r.nameLocation)){var o=i.stOccupiedRect;o&&kO(B7({},o,i.transGroup.transform),n,a)}else EO(i.labelInfoList,i.dirVec,n,a)};function kO(r,e,t){var n=new ue;Gd(r,e,n,{direction:Math.atan2(t.y,t.x),bidirectional:!1,touchThreshold:.05})&&u_(e,n)}function EO(r,e,t,n){for(var a=ue.dot(n,e)>=0,i=0,o=r.length;i0?"top":"bottom",i="center"):ec(a-Wi)?(o=n>0?"bottom":"top",i="center"):(o="middle",a>0&&a0?"right":"left":i=n>0?"left":"right"),{rotation:a,textAlign:i,textVerticalAlign:o}},r.makeAxisEventDataBase=function(e){var t={componentType:e.mainType,componentIndex:e.componentIndex};return t[e.mainType+"Index"]=e.componentIndex,t},r.isLabelSilent=function(e){var t=e.get("tooltip");return e.get("silent")||!(e.get("triggerEvent")||t&&t.show)},r})(),FX=["axisLine","axisTickLabelEstimate","axisTickLabelDetermine","axisName"],HX={axisLine:function(r,e,t,n,a,i,o){var s=n.get(["axisLine","show"]);if(s==="auto"&&(s=!0,r.raw.axisLineAutoShow!=null&&(s=!!r.raw.axisLineAutoShow)),!!s){var l=n.axis.getExtent(),u=i.transform,f=[l[0],0],c=[l[1],0],v=f[0]>c[0];u&&(Mt(f,f,u),Mt(c,c,u));var h=H({lineCap:"round"},n.getModel(["axisLine","lineStyle"]).getLineStyle()),p={strokeContainThreshold:r.raw.strokeContainThreshold||5,silent:!0,z2:1,style:h};if(n.get(["axisLine","breakLine"])&&n.axis.scale.hasBreaks())Yc().buildAxisBreakLine(n,a,i,p);else{var d=new kt(H({shape:{x1:f[0],y1:f[1],x2:c[0],y2:c[1]}},p));eu(d.shape,d.style.lineWidth),d.anid="line",a.add(d)}var g=n.get(["axisLine","symbol"]);if(g!=null){var y=n.get(["axisLine","symbolSize"]);q(g)&&(g=[g,g]),(q(y)||ze(y))&&(y=[y,y]);var m=Xs(n.get(["axisLine","symbolOffset"])||0,y),_=y[0],S=y[1];M([{rotate:r.rotation+Math.PI/2,offset:m[0],r:0},{rotate:r.rotation-Math.PI/2,offset:m[1],r:Math.sqrt((f[0]-c[0])*(f[0]-c[0])+(f[1]-c[1])*(f[1]-c[1]))}],function(b,x){if(g[x]!=="none"&&g[x]!=null){var w=Nt(g[x],-_/2,-S/2,_,S,h.stroke,!0),T=b.r+b.offset,C=v?c:f;w.attr({rotation:b.rotate,x:C[0]+T*Math.cos(r.rotation),y:C[1]-T*Math.sin(r.rotation),silent:!0,z2:11}),a.add(w)}})}}},axisTickLabelEstimate:function(r,e,t,n,a,i,o,s){var l=yA(e,a,s);l&&gA(r,e,t,n,a,i,o,qn.estimate)},axisTickLabelDetermine:function(r,e,t,n,a,i,o,s){var l=yA(e,a,s);l&&gA(r,e,t,n,a,i,o,qn.determine);var u=UX(r,a,i,n);ZX(r,e.labelLayoutList,u),YX(r,a,i,n,r.tickDirection)},axisName:function(r,e,t,n,a,i,o,s){var l=t.ensureRecord(n);e.nameEl&&(a.remove(e.nameEl),e.nameEl=l.nameLayout=l.nameLocation=null);var u=r.axisName;if(ZS(u)){var f=r.nameLocation,c=r.nameDirection,v=n.getModel("nameTextStyle"),h=n.get("nameGap")||0,p=n.axis.getExtent(),d=n.axis.inverse?-1:1,g=new ue(0,0),y=new ue(0,0);f==="start"?(g.x=p[0]-d*h,y.x=-d):f==="end"?(g.x=p[1]+d*h,y.x=d):(g.x=(p[0]+p[1])/2,g.y=r.labelOffset+c*h,y.y=c);var m=rr();y.transform(ho(m,m,r.rotation));var _=n.get("nameRotate");_!=null&&(_=_*Wi/180);var S,b;iu(f)?S=Nr.innerTextLayout(r.rotation,_??r.rotation,c):(S=WX(r.rotation,f,_||0,p),b=r.raw.axisNameAvailableWidth,b!=null&&(b=Math.abs(b/Math.sin(S.rotation)),!isFinite(b)&&(b=null)));var x=v.getFont(),w=n.get("nameTruncate",!0)||{},T=w.ellipsis,C=fr(r.raw.nameTruncateMaxWidth,w.maxWidth,b),A=s.nameMarginLevel||0,D=new Be({x:g.x,y:g.y,rotation:S.rotation,silent:Nr.isLabelSilent(n),style:rt(v,{text:u,font:x,overflow:"truncate",width:C,ellipsis:T,fill:v.getTextColor()||n.get(["axisLine","lineStyle","color"]),align:v.get("align")||S.textAlign,verticalAlign:v.get("verticalAlign")||S.textVerticalAlign}),z2:1});if(di({el:D,componentModel:n,itemName:u}),D.__fullText=u,D.anid="name",n.get("triggerEvent")){var L=Nr.makeAxisEventDataBase(n);L.targetType="axisName",L.name=u,ge(D).eventData=L}i.add(D),D.updateTransform(),e.nameEl=D;var I=l.nameLayout=La({label:D,priority:D.z2,defaultAttr:{ignore:D.ignore},marginDefault:iu(f)?BX[A]:VX[A]});if(l.nameLocation=f,a.add(D),D.decomposeTransform(),r.shouldNameMoveOverlap&&I){var P=t.ensureRecord(n);t.resolveAxisNameOverlap(r,t,n,I,y,P)}}}};function gA(r,e,t,n,a,i,o,s){OO(e)||XX(r,e,a,s,n,o);var l=e.labelLayoutList;qX(r,n,l,i),JX(n,r.rotation,l);var u=r.optionHideOverlap;$X(n,l,u),u&&ZR(Ze(l,function(f){return f&&!f.label.ignore})),GX(r,t,n,l)}function WX(r,e,t,n){var a=LP(t-r),i,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return ec(a-Wi/2)?(o=l?"bottom":"top",i="center"):ec(a-Wi*1.5)?(o=l?"top":"bottom",i="center"):(o="middle",aWi/2?i=l?"left":"right":i=l?"right":"left"),{rotation:a,textAlign:i,textVerticalAlign:o}}function $X(r,e,t){if(DR(r.axis))return;function n(s,l,u){var f=La(e[l]),c=La(e[u]);if(!(!f||!c)){if(s===!1||f.suggestIgnore){Cf(f.label);return}if(c.suggestIgnore){Cf(c.label);return}var v=.1;if(!t){var h=[0,0,0,0];f=f_({marginForce:h},f),c=f_({marginForce:h},c)}Gd(f,c,null,{touchThreshold:v})&&Cf(s?c.label:f.label)}}var a=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]),o=e.length;n(a,0,1),n(i,o-1,o-2)}function ZX(r,e,t){r.showMinorTicks||M(e,function(n){if(n&&n.label.ignore)for(var a=0;au[0]&&isFinite(p)&&isFinite(u[0]);)h=fy(h),p=u[1]-h*o;else{var g=r.getTicks().length-1;g>o&&(h=fy(h));var y=h*o;d=Math.ceil(u[1]/h)*h,p=Pt(d-y),p<0&&u[0]>=0?(p=0,d=Pt(y)):d>0&&u[1]<=0&&(d=0,p=-Pt(y))}var m=(a[0].value-i[0].value)/s,_=(a[o].value-i[o].value)/s;n.setExtent.call(r,p+h*m,d+h*_),n.setInterval.call(r,h),(m||_)&&n.setNiceExtent.call(r,p+h,d-h)}var _A=[[3,1],[0,2]],rq=(function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=m_,this._initCartesian(e,t,n),this.model=e}return r.prototype.getRect=function(){return this._rect},r.prototype.update=function(e,t){var n=this._axesMap;this._updateScale(e,this.model);function a(o){var s,l=Re(o),u=l.length;if(u){for(var f=[],c=u-1;c>=0;c--){var v=+l[c],h=o[v],p=h.model,d=h.scale;a_(d)&&p.get("alignTicks")&&p.get("interval")==null?f.push(h):(au(d,p),a_(d)&&(s=h))}f.length&&(s||(s=f.pop(),au(s.scale,s.model)),M(f,function(g){NO(g.scale,g.model,s.scale)}))}}a(n.x),a(n.y);var i={};M(n.x,function(o){SA(n,"y",o,i)}),M(n.y,function(o){SA(n,"x",o,i)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var a=Zt(e,t),i=this._rect=ft(e.getBoxLayoutParams(),a.refContainer),o=this._axesMap,s=this._coordsList,l=e.get("containLabel");if(S_(o,i),!n){var u=iq(i,s,o,l,t),f=void 0;if(l)b_?(b_(this._axesList,i),S_(o,i)):f=wA(i.clone(),"axisLabel",null,i,o,u,a);else{var c=oq(e,i,a),v=c.outerBoundsRect,h=c.parsedOuterBoundsContain,p=c.outerBoundsClamp;v&&(f=wA(v,h,p,i,o,u,a))}zO(i,o,qn.determine,null,f,a)}M(this._coordsList,function(d){d.calcAffineTransform()})},r.prototype.getAxis=function(e,t){var n=this._axesMap[e];if(n!=null)return n[t||0]},r.prototype.getAxes=function(){return this._axesList.slice()},r.prototype.getCartesian=function(e,t){if(e!=null&&t!=null){var n="x"+e+"y"+t;return this._coordsMap[n]}ce(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var a=0,i=this._coordsList;a0})==null;return Os(n,s,!0,!0,t),S_(a,n),l;function u(v){M(a[me[v]],function(h){if(hc(h.model)){var p=i.ensureRecord(h.model),d=p.labelInfoList;if(d)for(var g=0;g0&&!mr(h)&&h>1e-4&&(v/=h),v}}function iq(r,e,t,n,a){var i=new LO(sq);return M(t,function(o){return M(o,function(s){if(hc(s.model)){var l=!n;s.axisBuilder=eq(r,e,s.model,a,i,l)}})}),i}function zO(r,e,t,n,a,i){var o=t===qn.determine;M(e,function(u){return M(u,function(f){hc(f.model)&&(tq(f.axisBuilder,r,f.model),f.axisBuilder.build(o?{axisTickLabelDetermine:!0}:{axisTickLabelEstimate:!0},{noPxChange:a}))})});var s={x:0,y:0};l(0),l(1);function l(u){s[me[1-u]]=r[Rt[u]]<=i.refContainer[Rt[u]]*.5?0:1-u===1?2:1}M(e,function(u,f){return M(u,function(c){hc(c.model)&&((n==="all"||o)&&c.axisBuilder.build({axisName:!0},{nameMarginLevel:s[f]}),o&&c.axisBuilder.build({axisLine:!0}))})})}function oq(r,e,t){var n,a=r.get("outerBoundsMode",!0);a==="same"?n=e.clone():(a==null||a==="auto")&&(n=ft(r.get("outerBounds",!0)||wO,t.refContainer));var i=r.get("outerBoundsContain",!0),o;i==null||i==="auto"||be(["all","axisLabel"],i)<0?o="all":o=i;var s=[ap(re(r.get("outerBoundsClampWidth",!0),Lp[0]),e.width),ap(re(r.get("outerBoundsClampHeight",!0),Lp[1]),e.height)];return{outerBoundsRect:n,parsedOuterBoundsContain:o,outerBoundsClamp:s}}var sq=function(r,e,t,n,a,i){var o=t.axis.dim==="x"?"y":"x";PO(r,e,t,n,a,i),iu(r.nameLocation)||M(e.recordMap[o],function(s){s&&s.labelInfoList&&s.dirVec&&EO(s.labelInfoList,s.dirVec,n,a)})};function lq(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return uq(t,r,e),t.seriesInvolved&&cq(t,r),t}function uq(r,e,t){var n=e.getComponent("tooltip"),a=e.getComponent("axisPointer"),i=a.get("link",!0)||[],o=[];M(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=yc(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var f=s.model,c=f.getModel("tooltip",n);if(M(s.getAxes(),Se(d,!1,null)),s.getTooltipAxes&&n&&c.get("show")){var v=c.get("trigger")==="axis",h=c.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(c.get(["axisPointer","axis"]));(v||h)&&M(p.baseAxes,Se(d,h?"cross":!0,v)),h&&M(p.otherAxes,Se(d,"cross",!1))}function d(g,y,m){var _=m.model.getModel("axisPointer",a),S=_.get("show");if(!(!S||S==="auto"&&!g&&!x_(_))){y==null&&(y=_.get("triggerTooltip")),_=g?fq(m,c,a,e,g,y):_;var b=_.get("snap"),x=_.get("triggerEmphasis"),w=yc(m.model),T=y||b||m.type==="category",C=r.axesInfo[w]={key:w,axis:m,coordSys:s,axisPointerModel:_,triggerTooltip:y,triggerEmphasis:x,involveSeries:T,snap:b,useHandle:x_(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||T;var A=vq(i,m);if(A!=null){var D=o[A]||(o[A]={axesInfo:{}});D.axesInfo[w]=C,D.mapper=i[A].mapper,C.linkGroup=D}}}})}function fq(r,e,t,n,a,i){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};M(s,function(v){l[v]=se(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),a==="cross"){var f=o.get(["label","show"]);if(u.show=f??!0,!i){var c=l.lineStyle=o.get("crossStyle");c&&fe(u,c.textStyle)}}return r.model.getModel("axisPointer",new ke(l,t,n))}function cq(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,a=t.get(["tooltip","trigger"],!0),i=t.get(["tooltip","show"],!0);!n||!n.model||a==="none"||a===!1||a==="item"||i===!1||t.get(["axisPointer","show"],!0)===!1||M(r.coordSysAxesInfo[yc(n.model)],function(o){var s=o.axis;n.getAxis(s.dim)===s&&(o.seriesModels.push(t),o.seriesDataCount==null&&(o.seriesDataCount=0),o.seriesDataCount+=t.getData().count())})})}function vq(r,e){for(var t=e.model,n=e.dim,a=0;a=0||r===e}function hq(r){var e=US(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,a=t.option,i=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=x_(t);i==null&&(a.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o0;return o&&s}var Sq=Ae();function AA(r,e,t,n){if(r instanceof AO){var a=r.scale.type;if(a!=="category"&&a!=="ordinal")return t}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?WO(t,o,u,n):bq(r,e,t,n,o,l):t}function WO(r,e,t,n){if(t===null)return r+(Math.random()-.5)*e;var a=t-n*2,i=Math.min(Math.max(0,e),a);return r+(Math.random()-.5)*i}function bq(r,e,t,n,a,i){var o=Sq(r);o.items||(o.items=[]);var s=o.items,l=MA(s,e,t,n,a,i,1),u=MA(s,e,t,n,a,i,-1),f=Math.abs(l-t)a/2||c&&v>c/2-n?WO(t,a,c,n):(s.push({fixedCoord:e,floatCoord:f,r:n}),f)}function MA(r,e,t,n,a,i,o){for(var s=t,l=0;la/2)return Number.MAX_VALUE;if(o===1&&p>s||o===-1&&p0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var d=l;p.color!=null&&(d=fe({color:p.color},l));var g=xe(se(p),{boundaryGap:t,splitNumber:n,scale:a,axisLine:i,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:c,nameTextStyle:d,triggerEvent:v},!1);if(q(f)){var y=g.name;g.name=f.replace("{value}",y??"")}else ie(f)&&(g.name=f(g.name,g));var m=new ke(g,null,this.ecModel);return zt(m,Hc.prototype),m.mainType="radar",m.componentIndex=this.componentIndex,m},this);this._indicatorModels=h},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"50%",startAngle:90,axisName:{show:!0,color:B.color.axisLabel},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:xe({lineStyle:{color:B.color.neutral20}},Ju.axisLine),axisLabel:qv(Ju.axisLabel,!1),axisTick:qv(Ju.axisTick,!1),splitLine:qv(Ju.splitLine,!0),splitArea:qv(Ju.splitArea,!0),indicator:[]},e})(Le),Lq=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll(),this._buildAxes(t,a),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t,n){var a=t.coordinateSystem,i=a.getIndicatorAxes(),o=$(i,function(s){var l=s.model.get("showName")?s.name:"",u=new Nr(s.model,n,{axisName:l,position:[a.cx,a.cy],rotation:s.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return u});M(o,function(s){s.build(),this.group.add(s.group)},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,a=n.getIndicatorAxes();if(!a.length)return;var i=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),f=o.get("show"),c=s.get("show"),v=l.get("color"),h=u.get("color"),p=W(v)?v:[v],d=W(h)?h:[h],g=[],y=[];function m(E,k,O){var R=O%k.length;return E[R]=E[R]||[],R}if(i==="circle")for(var _=a[0].getTicksCoords(),S=n.cx,b=n.cy,x=0;x<_.length;x++){if(f){var w=m(g,p,x);g[w].push(new pi({shape:{cx:S,cy:b,r:_[x].coord}}))}if(c&&x<_.length-1){var w=m(y,d,x);y[w].push(new Ec({shape:{cx:S,cy:b,r0:_[x].coord,r:_[x+1].coord}}))}}else for(var T,C=$(a,function(E,k){var O=E.getTicksCoords();return T=T==null?O.length-1:Math.min(O.length-1,T),$(O,function(R){return n.coordToPoint(R.coord,k)})}),A=[],x=0;x<=T;x++){for(var D=[],L=0;L3?1.4:o>1?1.2:1.1,f=i>0?u:1/u;this._checkTriggerMoveZoom(this,"zoom","zoomOnMouseWheel",t,{scale:f,originX:s,originY:l,isAvailableBehavior:null})}if(a){var c=Math.abs(i),v=(i>0?1:-1)*(c>3?.4:c>1?.15:.05);this._checkTriggerMoveZoom(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:v,originX:s,originY:l,isAvailableBehavior:null})}}}},e.prototype._pinchHandler=function(t){if(!(LA(this._zr,"globalPan")||Qu(t))){var n=t.pinchScale>1?1.1:1/1.1;this._checkTriggerMoveZoom(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e.prototype._checkTriggerMoveZoom=function(t,n,a,i,o){t._checkPointer(i,o.originX,o.originY)&&(ii(i.event),i.__ecRoamConsumed=!0,PA(t,n,a,i,o))},e})(kn);function Qu(r){return r.__ecRoamConsumed}var Bq=Ae();function Wd(r){var e=Bq(r);return e.roam=e.roam||{},e.uniform=e.uniform||{},e}function ef(r,e,t,n){for(var a=Wd(r),i=a.roam,o=i[e]=i[e]||[],s=0;s=4&&(f={x:parseFloat(v[0]||0),y:parseFloat(v[1]||0),width:parseFloat(v[2]),height:parseFloat(v[3])})}if(f&&s!=null&&l!=null&&(c=qO(f,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var h=a;a=new oe,a.add(h),h.scaleX=h.scaleY=c.scale,h.x=c.x,h.y=c.y}return!t.ignoreRootClip&&s!=null&&l!=null&&a.setClipPath(new Ce({shape:{x:0,y:0,width:s,height:l}})),{root:a,width:s,height:l,viewBoxRect:f,viewBoxTransform:c,named:i}},r.prototype._parseNode=function(e,t,n,a,i,o){var s=e.nodeName.toLowerCase(),l,u=a;if(s==="defs"&&(i=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!i){var f=Dy[s];if(f&&Q(Dy,s)){l=f.call(this,e,t);var c=e.getAttribute("name");if(c){var v={name:c,namedFrom:null,svgNodeTagLower:s,el:l};n.push(v),s==="g"&&(u=v)}else a&&n.push({name:a.name,namedFrom:a,svgNodeTagLower:s,el:l});t.add(l)}}var h=OA[s];if(h&&Q(OA,s)){var p=h.call(this,e),d=e.getAttribute("id");d&&(this._defs[d]=p)}}if(l&&l.isGroup)for(var g=e.firstChild;g;)g.nodeType===1?this._parseNode(g,l,n,u,i,o):g.nodeType===3&&o&&this._parseText(g,l),g=g.nextSibling},r.prototype._parseText=function(e,t){var n=new Ql({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});un(t,n),qr(e,n,this._defsUsePending,!1,!1),Hq(n,t);var a=n.style,i=a.fontSize;i&&i<9&&(a.fontSize=9,n.scaleX*=i/9,n.scaleY*=i/9);var o=(a.fontSize||a.fontFamily)&&[a.fontStyle,a.fontWeight,(a.fontSize||12)+"px",a.fontFamily||"sans-serif"].join(" ");a.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=(function(){Dy={g:function(e,t){var n=new oe;return un(t,n),qr(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Ce;return un(t,n),qr(e,n,this._defsUsePending,!1,!1),n.setShape({x:parseFloat(e.getAttribute("x")||"0"),y:parseFloat(e.getAttribute("y")||"0"),width:parseFloat(e.getAttribute("width")||"0"),height:parseFloat(e.getAttribute("height")||"0")}),n.silent=!0,n},circle:function(e,t){var n=new pi;return un(t,n),qr(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),r:parseFloat(e.getAttribute("r")||"0")}),n.silent=!0,n},line:function(e,t){var n=new kt;return un(t,n),qr(e,n,this._defsUsePending,!1,!1),n.setShape({x1:parseFloat(e.getAttribute("x1")||"0"),y1:parseFloat(e.getAttribute("y1")||"0"),x2:parseFloat(e.getAttribute("x2")||"0"),y2:parseFloat(e.getAttribute("y2")||"0")}),n.silent=!0,n},ellipse:function(e,t){var n=new Md;return un(t,n),qr(e,n,this._defsUsePending,!1,!1),n.setShape({cx:parseFloat(e.getAttribute("cx")||"0"),cy:parseFloat(e.getAttribute("cy")||"0"),rx:parseFloat(e.getAttribute("rx")||"0"),ry:parseFloat(e.getAttribute("ry")||"0")}),n.silent=!0,n},polygon:function(e,t){var n=e.getAttribute("points"),a;n&&(a=BA(n));var i=new xr({shape:{points:a||[]},silent:!0});return un(t,i),qr(e,i,this._defsUsePending,!1,!1),i},polyline:function(e,t){var n=e.getAttribute("points"),a;n&&(a=BA(n));var i=new pr({shape:{points:a||[]},silent:!0});return un(t,i),qr(e,i,this._defsUsePending,!1,!1),i},image:function(e,t){var n=new ar;return un(t,n),qr(e,n,this._defsUsePending,!1,!1),n.setStyle({image:e.getAttribute("xlink:href")||e.getAttribute("href"),x:+e.getAttribute("x"),y:+e.getAttribute("y"),width:+e.getAttribute("width"),height:+e.getAttribute("height")}),n.silent=!0,n},text:function(e,t){var n=e.getAttribute("x")||"0",a=e.getAttribute("y")||"0",i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(i),this._textY=parseFloat(a)+parseFloat(o);var s=new oe;return un(t,s),qr(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),a=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),a!=null&&(this._textY=parseFloat(a));var i=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new oe;return un(t,s),qr(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(i),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",a=vk(n);return un(t,a),qr(e,a,this._defsUsePending,!1,!1),a.silent=!0,a}}})(),r})(),OA={lineargradient:function(r){var e=parseInt(r.getAttribute("x1")||"0",10),t=parseInt(r.getAttribute("y1")||"0",10),n=parseInt(r.getAttribute("x2")||"10",10),a=parseInt(r.getAttribute("y2")||"0",10),i=new bu(e,t,n,a);return NA(r,i),zA(r,i),i},radialgradient:function(r){var e=parseInt(r.getAttribute("cx")||"0",10),t=parseInt(r.getAttribute("cy")||"0",10),n=parseInt(r.getAttribute("r")||"0",10),a=new gk(e,t,n);return NA(r,a),zA(r,a),a}};function NA(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function zA(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),a=void 0;n&&n.indexOf("%")>0?a=parseInt(n,10)/100:n?a=parseFloat(n):a=0;var i={};XO(t,i,i);var o=i.stopColor||t.getAttribute("stop-color")||"#000000",s=i.stopOpacity||t.getAttribute("stop-opacity");if(s){var l=Zr(o),u=l&&l[3];u&&(l[3]*=Ki(s),o=ba(l,"rgba"))}e.colorStops.push({offset:a,color:o})}t=t.nextSibling}}function un(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),fe(e.__inheritedStyle,r.__inheritedStyle))}function BA(r){for(var e=Zd(r),t=[],n=0;n0;i-=2){var o=n[i],s=n[i-1],l=Zd(o);switch(a=a||rr(),s){case"translate":Aa(a,a,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":O1(a,a,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":ho(a,a,-parseFloat(l[0])*Iy,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*Iy);Sa(a,[1,0,u,1,0,0],a);break;case"skewY":var f=Math.tan(parseFloat(l[0])*Iy);Sa(a,[1,f,0,1,0,0],a);break;case"matrix":a[0]=parseFloat(l[0]),a[1]=parseFloat(l[1]),a[2]=parseFloat(l[2]),a[3]=parseFloat(l[3]),a[4]=parseFloat(l[4]),a[5]=parseFloat(l[5]);break}}e.setLocalTransform(a)}}var GA=/([^\s:;]+)\s*:\s*([^:;]+)/g;function XO(r,e,t){var n=r.getAttribute("style");if(n){GA.lastIndex=0;for(var a;(a=GA.exec(n))!=null;){var i=a[1],o=Q(kp,i)?kp[i]:null;o&&(e[o]=a[2]);var s=Q(Ep,i)?Ep[i]:null;s&&(t[s]=a[2])}}}function Xq(r,e,t){for(var n=0;n0,m={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:y,isGeo:o,transformInfoRaw:v};l.resourceType==="geoJSON"?this._buildGeoJSON(m):l.resourceType==="geoSVG"&&this._buildSVG(m),this._updateController(e,g,t,n),this._updateMapSelectHandler(e,u,n,a)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=te(),n=te(),a=this._regionsGroup,i=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function f(h,p){return p&&(h=p(h)),h&&[h[0]*i.scaleX+i.x,h[1]*i.scaleY+i.y]}function c(h){for(var p=[],d=!u&&l&&l.project,g=0;g=0)&&(v=a);var h=o?{normal:{align:"center",verticalAlign:"middle"}}:null;Kt(e,Ht(n),{labelFetcher:v,labelDataIndex:c,defaultText:t},h);var p=e.getTextContent();if(p&&(jO(p).ignore=p.ignore,e.textConfig&&o)){var d=e.getBoundingRect().clone();e.textConfig.layoutRect=d,e.textConfig.position=[(o[0]-d.x)/d.width*100+"%",(o[1]-d.y)/d.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function ZA(r,e,t,n,a,i){r.data?r.data.setItemGraphicEl(i,e):ge(e).eventData={componentType:"geo",componentIndex:a.componentIndex,geoIndex:a.componentIndex,name:t,region:n&&n.option||{}}}function UA(r,e,t,n,a){r.data||di({el:e,componentModel:a,itemName:t,itemTooltipOption:n.get("tooltip")})}function YA(r,e,t,n,a){e.highDownSilentOnTouch=!!a.get("selectedMode");var i=n.getModel("emphasis"),o=i.get("focus");return ut(e,o,i.get("blurScope"),i.get("disabled")),r.isGeo&&m9(e,a,t),o}function XA(r,e,t){var n=[],a;function i(){a=[]}function o(){a.length&&(n.push(a),a=[])}var s=e({polygonStart:i,polygonEnd:o,lineStart:i,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&a.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),M(r,function(l){s.lineStart();for(var u=0;u-1&&(a.style.stroke=a.style.fill,a.style.fill=B.color.neutral00,a.style.lineWidth=2),a},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:B.color.tertiary},itemStyle:{borderWidth:.5,borderColor:B.color.border,areaColor:B.color.background},emphasis:{label:{show:!0,color:B.color.primary},itemStyle:{areaColor:B.color.highlight}},select:{label:{show:!0,color:B.color.primary},itemStyle:{color:B.color.highlight}},nameProperty:"name"},e})(nt);function pj(r,e){var t={};return M(r,function(n){n.each(n.mapDimension("value"),function(a,i){var o="ec-"+n.getName(i);t[o]=t[o]||[],isNaN(a)||t[o].push(a)})}),r[0].map(r[0].mapDimension("value"),function(n,a){for(var i="ec-"+r[0].getName(a),o=0,s=1/0,l=-1/0,u=t[i].length,f=0;f1?(_.width=m,_.height=m/d):(_.height=m,_.width=m*d),_.y=y[1]-_.height/2,_.x=y[0]-_.width/2;else{var S=r.getBoxLayoutParams();S.aspect=d,_=ft(S,p),_=qk(r,_,d)}this.setViewRect(_.x,_.y,_.width,_.height),this.setCenter(r.get("center")),this.setZoom(r.get("zoom"))}function mj(r,e){M(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var _j=(function(){function r(){this.dimensions=JO}return r.prototype.create=function(e,t){var n=[];function a(o){return{nameProperty:o.get("nameProperty"),aspectScale:o.get("aspectScale"),projection:o.get("projection")}}e.eachComponent("geo",function(o,s){var l=o.get("map"),u=new C_(l+s,l,H({nameMap:o.get("nameMap"),api:t,ecModel:e},a(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=JA,u.resize(o,t)}),e.eachSeries(function(o){Vc({targetModel:o,coordSysType:"geo",coordSysProvider:function(){var s=o.subType==="map"?o.getHostGeoModel():o.getReferringComponents("geo",dt).models[0];return s&&s.coordinateSystem},allowNotFound:!0})});var i={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();i[s]=i[s]||[],i[s].push(o)}}),M(i,function(o,s){var l=$(o,function(f){return f.get("nameMap")}),u=new C_(s,s,H({nameMap:P1(l),api:t,ecModel:e},a(o[0])));u.zoomLimit=fr.apply(null,$(o,function(f){return f.get("scaleLimit")})),n.push(u),u.resize=JA,u.resize(o[0],t),M(o,function(f){f.coordinateSystem=u,mj(u,f)})}),n},r.prototype.getFilledRegions=function(e,t,n,a){for(var i=(e||[]).slice(),o=te(),s=0;s=0;o--){var s=a[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function Cj(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,a=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){Mj(r);var i=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;a?(r.hierNode.prelim=a.hierNode.prelim+e(r,a),r.hierNode.modifier=r.hierNode.prelim-i):r.hierNode.prelim=i}else a&&(r.hierNode.prelim=a.hierNode.prelim+e(r,a));r.parentNode.hierNode.defaultAncestor=Dj(r,a,r.parentNode.hierNode.defaultAncestor||n[0],e)}function Aj(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function QA(r){return arguments.length?r:Pj}function Af(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function Mj(r){for(var e=r.children,t=e.length,n=0,a=0;--t>=0;){var i=e[t];i.hierNode.prelim+=n,i.hierNode.modifier+=n,a+=i.hierNode.change,n+=i.hierNode.shift+a}}function Dj(r,e,t,n){if(e){for(var a=r,i=r,o=i.parentNode.children[0],s=e,l=a.hierNode.modifier,u=i.hierNode.modifier,f=o.hierNode.modifier,c=s.hierNode.modifier;s=Ly(s),i=Py(i),s&&i;){a=Ly(a),o=Py(o),a.hierNode.ancestor=r;var v=s.hierNode.prelim+c-i.hierNode.prelim-u+n(s,i);v>0&&(Lj(Ij(s,r,t),r,v),u+=v,l+=v),c+=s.hierNode.modifier,u+=i.hierNode.modifier,l+=a.hierNode.modifier,f+=o.hierNode.modifier}s&&!Ly(a)&&(a.hierNode.thread=s,a.hierNode.modifier+=c-l),i&&!Py(o)&&(o.hierNode.thread=i,o.hierNode.modifier+=u-f,t=r)}return t}function Ly(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function Py(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function Ij(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function Lj(r,e,t){var n=t/(e.hierNode.i-r.hierNode.i);e.hierNode.change-=n,e.hierNode.shift+=t,e.hierNode.modifier+=t,e.hierNode.prelim+=t,r.hierNode.change+=n}function Pj(r,e){return r.parentNode===e.parentNode?1:2}var kj=(function(){function r(){this.parentPoint=[],this.childPoints=[]}return r})(),Ej=(function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new kj},e.prototype.buildPath=function(t,n){var a=n.childPoints,i=a.length,o=n.parentPoint,s=a[0],l=a[i-1];if(i===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,f=u==="TB"||u==="BT"?0:1,c=1-f,v=X(n.forkPosition,1),h=[];h[f]=o[f],h[c]=o[c]+(l[c]-o[c])*v,t.moveTo(o[0],o[1]),t.lineTo(h[0],h[1]),t.moveTo(s[0],s[1]),h[f]=s[f],t.lineTo(h[0],h[1]),h[f]=l[f],t.lineTo(h[0],h[1]),t.lineTo(l[0],l[1]);for(var p=1;pm.x,b||(S=S-Math.PI));var w=b?"left":"right",T=s.getModel("label"),C=T.get("rotate"),A=C*(Math.PI/180),D=g.getTextContent();D&&(g.setTextConfig({position:T.get("position")||w,rotation:C==null?-S:A,origin:"center"}),D.setStyle("verticalAlign","middle"))}var L=s.get(["emphasis","focus"]),I=L==="relative"?jf(o.getAncestorsIndices(),o.getDescendantIndices()):L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():null;I&&(ge(t).focus=I),Oj(a,o,f,t,p,h,d,n),t.__edge&&(t.onHoverStateChange=function(P){if(P!=="blur"){var E=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===kc||lp(t.__edge,P)}})}function Oj(r,e,t,n,a,i,o,s){var l=e.getModel(),u=r.get("edgeShape"),f=r.get("layout"),c=r.getOrient(),v=r.get(["lineStyle","curveness"]),h=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),d=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(d||(d=n.__edge=new Rc({shape:A_(f,c,v,a,a)})),Ve(d,{shape:A_(f,c,v,i,o)},r));else if(u==="polyline"&&f==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var g=e.children,y=[],m=0;mt&&(t=a.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,a=n.length;t=0&&this.hostTree.data.setItemLayout(this.dataIndex,e,t)},r.prototype.getLayout=function(){return this.hostTree.data.getItemLayout(this.dataIndex)},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostTree,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getLevelModel=function(){return(this.hostTree.levelModels||[])[this.depth]},r.prototype.setVisual=function(e,t){this.dataIndex>=0&&this.hostTree.data.setItemVisual(this.dataIndex,e,t)},r.prototype.getVisual=function(e){return this.hostTree.data.getItemVisual(this.dataIndex,e)},r.prototype.getRawIndex=function(){return this.hostTree.data.getRawIndex(this.dataIndex)},r.prototype.getId=function(){return this.hostTree.data.getId(this.dataIndex)},r.prototype.getChildIndex=function(){if(this.parentNode){for(var e=this.parentNode.children,t=0;t=0){var n=t.getData().tree.root,a=r.targetNode;if(q(a)&&(a=n.getNodeById(a)),a&&n.contains(a))return{node:a};var i=r.targetNodeId;if(i!=null&&(a=n.getNodeById(i)))return{node:a}}}function aN(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function eb(r,e){var t=aN(r);return be(t,e)>=0}function Ud(r,e){for(var t=[];r;){var n=r.dataIndex;t.push({name:r.name,dataIndex:n,value:e.getRawValue(n)}),r=r.parentNode}return t.reverse(),t}var $j=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.hasSymbolVisual=!0,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t){var n={name:t.name,children:t.data},a=t.leaves||{},i=new ke(a,this,this.ecModel),o=QS.createTree(n,this,s);function s(c){c.wrapMethod("getItemModel",function(v,h){var p=o.getNodeByDataIndex(h);return p&&p.children.length&&p.isExpand||(v.parentModel=i),v})}var l=0;o.eachNode("preorder",function(c){c.depth>l&&(l=c.depth)});var u=t.expandAndCollapse,f=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(c){var v=c.hostTree.data.getRawDataItem(c.dataIndex);c.isExpand=v&&v.collapsed!=null?!v.collapsed:c.depth<=f}),o.data},e.prototype.getOrient=function(){var t=this.get("orient");return t==="horizontal"?t="LR":t==="vertical"&&(t="TB"),t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.formatTooltip=function(t,n,a){for(var i=this.getData().tree,o=i.root.children[0],s=i.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ot("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Ud(a,this),n.collapsed=!a.isExpand,n},e.type="series.tree",e.layoutMode="box",e.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:B.color.borderTint,width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e})(nt);function Zj(r,e,t){for(var n=[r],a=[],i;i=n.pop();)if(a.push(i),i.isExpand){var o=i.children;if(o.length)for(var s=0;s=0;i--)t.push(a[i])}}function Uj(r,e){r.eachSeriesByType("tree",function(t){Yj(t,e)})}function Yj(r,e){var t=Zt(r,e).refContainer,n=ft(r.getBoxLayoutParams(),t);r.layoutInfo=n;var a=r.get("layout"),i=0,o=0,s=null;a==="radial"?(i=2*Math.PI,o=Math.min(n.height,n.width)/2,s=QA(function(S,b){return(S.parentNode===b.parentNode?1:2)/S.depth})):(i=n.width,o=n.height,s=QA());var l=r.getData().tree.root,u=l.children[0];if(u){Tj(l),Zj(u,Cj,s),l.hierNode.modifier=-u.hierNode.prelim,nf(u,Aj);var f=u,c=u,v=u;nf(u,function(S){var b=S.getLayout().x;bc.getLayout().x&&(c=S),S.depth>v.depth&&(v=S)});var h=f===c?1:s(f,c)/2,p=h-f.getLayout().x,d=0,g=0,y=0,m=0;if(a==="radial")d=i/(c.getLayout().x+h+p),g=o/(v.depth-1||1),nf(u,function(S){y=(S.getLayout().x+p)*d,m=(S.depth-1)*g;var b=Af(y,m);S.setLayout({x:b.x,y:b.y,rawX:y,rawY:m},!0)});else{var _=r.getOrient();_==="RL"||_==="LR"?(g=o/(c.getLayout().x+h+p),d=i/(v.depth-1||1),nf(u,function(S){m=(S.getLayout().x+p)*g,y=_==="LR"?(S.depth-1)*d:i-(S.depth-1)*d,S.setLayout({x:y,y:m},!0)})):(_==="TB"||_==="BT")&&(d=i/(c.getLayout().x+h+p),g=o/(v.depth-1||1),nf(u,function(S){y=(S.getLayout().x+p)*d,m=_==="TB"?(S.depth-1)*g:o-(S.depth-1)*g,S.setLayout({x:y,y:m},!0)}))}}}function Xj(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(a){var i=a.getModel(),o=i.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(a.dataIndex,"style");H(s,o)})})}function qj(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var a=e.dataIndex,i=n.getData().tree,o=i.getNodeByDataIndex(a);o.isExpand=!o.isExpand})}),r.registerAction({type:"treeRoam",event:"treeRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"tree",query:e},function(a){var i=a.coordinateSystem,o=$d(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}function jj(r){r.registerChartView(Rj),r.registerSeriesModel($j),r.registerLayout(Uj),r.registerVisual(Xj),qj(r)}var aM=["treemapZoomToNode","treemapRender","treemapMove"];function Kj(r){for(var e=0;e1;)i=i.parentNode;var o=$0(r.ecModel,i.name||i.dataIndex+"",n);a.setVisual("decal",o)})}var Jj=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventUsingHoverLayer=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};oN(a);var i=t.levels||[],o=this.designatedVisualItemStyle={},s=new ke({itemStyle:o},this,n);i=t.levels=Qj(i,n);var l=$(i||[],function(c){return new ke(c,s,n)},this),u=QS.createTree(a,this,f);function f(c){c.wrapMethod("getItemModel",function(v,h){var p=u.getNodeByDataIndex(h),d=p?l[p.depth]:null;return v.parentModel=d||s,v})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,a){var i=this.getData(),o=this.getRawValue(t),s=i.getName(t);return Ot("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=Ud(a,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},H(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=te(),this._idIndexMapCount=0);var a=n.get(t);return a==null&&n.set(t,a=this._idIndexMapCount++),a},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){iN(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,coordinateSystemUsage:"box",left:B.size.l,top:B.size.xxxl,right:B.size.l,bottom:B.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:B.size.m,emptyItemWidth:25,itemStyle:{color:B.color.backgroundShade,textStyle:{color:B.color.secondary}},emphasis:{itemStyle:{color:B.color.background}}},label:{show:!0,distance:0,padding:5,position:"inside",color:B.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:B.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:[]},e})(nt);function oN(r){var e=0;M(r.children,function(n){oN(n);var a=n.value;W(a)&&(a=a[0]),e+=a});var t=r.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(r.value)?r.value[0]=t:r.value=t}function Qj(r,e){var t=Qe(e.get("color")),n=Qe(e.get(["aria","decal","decals"]));if(t){r=r||[];var a,i;M(r,function(s){var l=new ke(s),u=l.get("color"),f=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(a=!0),(l.get(["itemStyle","decal"])||f&&f!=="none")&&(i=!0)});var o=r[0]||(r[0]={});return a||(o.color=t.slice()),!i&&n&&(o.decal=n.slice()),r}}var eK=8,iM=8,ky=5,tK=(function(){function r(e){this.group=new oe,e.add(this.group)}return r.prototype.render=function(e,t,n,a){var i=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!i.get("show")||!n)){var s=i.getModel("itemStyle"),l=i.getModel("emphasis"),u=s.getModel("textStyle"),f=l.getModel(["itemStyle","textStyle"]),c=Zt(e,t).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:[]},p=ft(v,c);this._prepare(n,h,u),this._renderContent(e,h,p,s,l,u,f,a),Rd(o,v,c)}},r.prototype._prepare=function(e,t,n){for(var a=e;a;a=a.parentNode){var i=Gt(a.getModel().get("name"),""),o=n.getTextRect(i),s=Math.max(o.width+eK*2,t.emptyItemWidth);t.totalWidth+=s+iM,t.renderList.push({node:a,text:i,width:s})}},r.prototype._renderContent=function(e,t,n,a,i,o,s,l){for(var u=0,f=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),v=t.totalWidth,h=t.renderList,p=i.getModel("itemStyle").getItemStyle(),d=h.length-1;d>=0;d--){var g=h[d],y=g.node,m=g.width,_=g.text;v>n.width&&(v-=m-f,m=f,_=null);var S=new xr({shape:{points:rK(u,0,m,c,d===h.length-1,d===0)},style:fe(a.getItemStyle(),{lineJoin:"bevel"}),textContent:new Be({style:rt(o,{text:_})}),textConfig:{position:"inside"},z2:Su*1e4,onclick:Se(l,y)});S.disableLabelAnimation=!0,S.getTextContent().ensureState("emphasis").style=rt(s,{text:_}),S.ensureState("emphasis").style=p,ut(S,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(S),nK(S,e,y),u+=m+iM}},r.prototype.remove=function(){this.group.removeAll()},r})();function rK(r,e,t,n,a,i){var o=[[a?r:r-ky,e],[r+t,e],[r+t,e+n],[a?r:r-ky,e+n]];return!i&&o.splice(2,0,[r+t+ky,e+n/2]),!a&&o.push([r,e+n/2]),o}function nK(r,e,t){ge(r).eventData={componentType:"series",componentSubType:"treemap",componentIndex:e.componentIndex,seriesIndex:e.seriesIndex,seriesName:e.name,seriesType:"treemap",selfType:"breadcrumb",nodeData:{dataIndex:t&&t.dataIndex,name:t&&t.name},treePathInfo:t&&Ud(t,e)}}var aK=(function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,a,i){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:a,easing:i}),!0)},r.prototype.finished=function(e){return this._finishedCallback=e,this},r.prototype.start=function(){for(var e=this,t=this._storage.length,n=function(){t--,t<=0&&(e._storage.length=0,e._elExistsMap={},e._finishedCallback&&e._finishedCallback())},a=0,i=this._storage.length;asM||Math.abs(t.dy)>sM)){var n=this.seriesModel.getData().tree.root;if(!n)return;var a=n.getLayout();if(!a)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:a.x+t.dx,y:a.y+t.dy,width:a.width,height:a.height}})}},e.prototype._onZoom=function(t){var n=t.originX,a=t.originY,i=t.scale;if(this._state!=="animating"){var o=this.seriesModel.getData().tree.root;if(!o)return;var s=o.getLayout();if(!s)return;var l=new ve(s.x,s.y,s.width,s.height),u=null,f=this._controllerHost;u=f.zoomLimit;var c=f.zoom=f.zoom||1;if(c*=i,u){var v=u.min||0,h=u.max||1/0;c=Math.max(Math.min(h,c),v)}var p=c/f.zoom;f.zoom=c;var d=this.seriesModel.layoutInfo;n-=d.x,a-=d.y;var g=rr();Aa(g,g,[-n,-a]),O1(g,g,[p,p]),Aa(g,g,[n,a]),l.applyTransform(g),this.api.dispatchAction({type:"treemapRender",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:l.x,y:l.y,width:l.width,height:l.height}})}},e.prototype._initEvents=function(t){var n=this;t.on("click",function(a){if(n._state==="ready"){var i=n.seriesModel.get("nodeClick",!0);if(i){var o=n.findTarget(a.offsetX,a.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(i==="zoomToNode")n._zoomToNode(o);else if(i==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),f=l.get("target",!0)||"blank";u&&vp(u,f)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,a){var i=this;a||(a=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),a||(a={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new tK(this.group))).render(t,n,a.node,function(o){i._state!=="animating"&&(eb(t.getViewRoot(),o)?i._rootToNode({node:o}):i._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=af(),this._state="ready",this._breadcrumb&&this._breadcrumb.remove()},e.prototype.dispose=function(){this._clearController()},e.prototype._zoomToNode=function(t){this.api.dispatchAction({type:"treemapZoomToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype._rootToNode=function(t){this.api.dispatchAction({type:"treemapRootToNode",from:this.uid,seriesId:this.seriesModel.id,targetNode:t.node})},e.prototype.findTarget=function(t,n){var a,i=this.seriesModel.getViewRoot();return i.eachNode({attr:"viewChildren",order:"preorder"},function(o){var s=this._storage.background[o.getRawIndex()];if(s){var l=s.transformCoordToLocal(t,n),u=s.shape;if(u.x<=l[0]&&l[0]<=u.x+u.width&&u.y<=l[1]&&l[1]<=u.y+u.height)a={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),a},e.type="treemap",e})(Je);function af(){return{nodeGroup:[],background:[],content:[]}}function fK(r,e,t,n,a,i,o,s,l,u){if(!o)return;var f=o.getLayout(),c=r.getData(),v=o.getModel();if(c.setItemGraphicEl(o.dataIndex,null),!f||!f.isInView)return;var h=f.width,p=f.height,d=f.borderWidth,g=f.invisible,y=o.getRawIndex(),m=s&&s.getRawIndex(),_=o.viewChildren,S=f.upperHeight,b=_&&_.length,x=v.getModel("itemStyle"),w=v.getModel(["emphasis","itemStyle"]),T=v.getModel(["blur","itemStyle"]),C=v.getModel(["select","itemStyle"]),A=x.get("borderRadius")||0,D=he("nodeGroup",M_);if(!D)return;if(l.add(D),D.x=f.x||0,D.y=f.y||0,D.markRedraw(),Rp(D).nodeWidth=h,Rp(D).nodeHeight=p,f.isAboveViewRoot)return D;var L=he("background",oM,u,sK);L&&V(D,L,b&&f.upperLabelHeight);var I=v.getModel("emphasis"),P=I.get("focus"),E=I.get("blurScope"),k=I.get("disabled"),O=P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():P;if(b)nc(D)&&ss(D,!1),L&&(ss(L,!k),c.setItemGraphicEl(o.dataIndex,L),k0(L,O,E));else{var R=he("content",oM,u,lK);R&&G(D,R),L.disableMorphing=!0,L&&nc(L)&&ss(L,!1),ss(D,!k),c.setItemGraphicEl(o.dataIndex,D);var z=v.getShallow("cursor");z&&R.attr("cursor",z),k0(D,O,E)}return D;function V(pe,ae,_e){var ee=ge(ae);if(ee.dataIndex=o.dataIndex,ee.seriesIndex=r.seriesIndex,ae.setShape({x:0,y:0,width:h,height:p,r:A}),g)F(ae);else{ae.invisible=!1;var de=o.getVisual("style"),Ue=de.stroke,Ee=fM(x);Ee.fill=Ue;var Ge=Xo(w);Ge.fill=w.get("borderColor");var qe=Xo(T);qe.fill=T.get("borderColor");var yt=Xo(C);if(yt.fill=C.get("borderColor"),_e){var wr=h-2*d;U(ae,Ue,de.opacity,{x:d,y:0,width:wr,height:S})}else ae.removeTextContent();ae.setStyle(Ee),ae.ensureState("emphasis").style=Ge,ae.ensureState("blur").style=qe,ae.ensureState("select").style=yt,Rs(ae)}pe.add(ae)}function G(pe,ae){var _e=ge(ae);_e.dataIndex=o.dataIndex,_e.seriesIndex=r.seriesIndex;var ee=Math.max(h-2*d,0),de=Math.max(p-2*d,0);if(ae.culling=!0,ae.setShape({x:d,y:d,width:ee,height:de,r:A}),g)F(ae);else{ae.invisible=!1;var Ue=o.getVisual("style"),Ee=Ue.fill,Ge=fM(x);Ge.fill=Ee,Ge.decal=Ue.decal;var qe=Xo(w),yt=Xo(T),wr=Xo(C);U(ae,Ee,Ue.opacity,null),ae.setStyle(Ge),ae.ensureState("emphasis").style=qe,ae.ensureState("blur").style=yt,ae.ensureState("select").style=wr,Rs(ae)}pe.add(ae)}function F(pe){!pe.invisible&&i.push(pe)}function U(pe,ae,_e,ee){var de=v.getModel(ee?uM:lM),Ue=Gt(v.get("name"),null),Ee=de.getShallow("show");Kt(pe,Ht(v,ee?uM:lM),{defaultText:Ee?Ue:null,inheritColor:ae,defaultOpacity:_e,labelFetcher:r,labelDataIndex:o.dataIndex});var Ge=pe.getTextContent();if(Ge){var qe=Ge.style,yt=vd(qe.padding||0);ee&&(pe.setTextConfig({layoutRect:ee}),Ge.disableLabelLayout=!0),Ge.beforeUpdate=function(){var dr=Math.max((ee?ee.width:pe.shape.width)-yt[1]-yt[3],0),Ra=Math.max((ee?ee.height:pe.shape.height)-yt[0]-yt[2],0);(qe.width!==dr||qe.height!==Ra)&&Ge.setStyle({width:dr,height:Ra})},qe.truncateMinChar=2,qe.lineOverflow="truncate",J(qe,ee,f);var wr=Ge.getState("emphasis");J(wr?wr.style:null,ee,f)}}function J(pe,ae,_e){var ee=pe?pe.text:null;if(!ae&&_e.isLeafRoot&&ee!=null){var de=r.get("drillDownIcon",!0);pe.text=de?de+" "+ee:ee}}function he(pe,ae,_e,ee){var de=m!=null&&t[pe][m],Ue=a[pe];return de?(t[pe][m]=null,Oe(Ue,de)):g||(de=new ae,de instanceof In&&(de.z2=cK(_e,ee)),We(Ue,de)),e[pe][y]=de}function Oe(pe,ae){var _e=pe[y]={};ae instanceof M_?(_e.oldX=ae.x,_e.oldY=ae.y):_e.oldShape=H({},ae.shape)}function We(pe,ae){var _e=pe[y]={},ee=o.parentNode,de=ae instanceof oe;if(ee&&(!n||n.direction==="drillDown")){var Ue=0,Ee=0,Ge=a.background[ee.getRawIndex()];!n&&Ge&&Ge.oldShape&&(Ue=Ge.oldShape.width,Ee=Ge.oldShape.height),de?(_e.oldX=0,_e.oldY=Ee):_e.oldShape={x:Ue,y:Ee,width:0,height:0}}_e.fadein=!de}}function cK(r,e){return r*oK+e}var _c=M,vK=ce,Op=-1,jt=(function(){function r(e){var t=e.mappingMethod,n=e.type,a=this.option=se(e);this.type=n,this.mappingMethod=t,this._normalizeData=dK[t];var i=r.visualHandlers[n];this.applyVisual=i.applyVisual,this.getColorMapper=i.getColorMapper,this._normalizedToVisual=i._normalizedToVisual[t],t==="piecewise"?(Ey(a),hK(a)):t==="category"?a.categories?pK(a):Ey(a,!0):(Sr(t!=="linear"||a.dataExtent),Ey(a))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return j(this._normalizeData,this)},r.listVisualTypes=function(){return Re(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){ce(e)?M(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var a,i=W(e)?[]:ce(e)?{}:(a=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);a?i=l:i[s]=l}),i},r.retrieveVisuals=function(e){var t={},n;return e&&_c(r.visualHandlers,function(a,i){e.hasOwnProperty(i)&&(t[i]=e[i],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(W(e))e=e.slice();else if(vK(e)){var t=[];_c(e,function(n,a){t.push(a)}),e=t}else return[];return e.sort(function(n,a){return a==="color"&&n!=="color"&&n.indexOf("color")===0?1:-1}),e},r.dependsOn=function(e,t){return t==="color"?!!(e&&e.indexOf(t)===0):e===t},r.findPieceIndex=function(e,t,n){for(var a,i=1/0,o=0,s=t.length;o=0;i--)n[i]==null&&(delete t[e[i]],e.pop())}function Ey(r,e){var t=r.visual,n=[];ce(t)?_c(t,function(i){n.push(i)}):t!=null&&n.push(t);var a={color:1,symbol:1};!e&&n.length===1&&!a.hasOwnProperty(r.type)&&(n[1]=n[0]),sN(r,n)}function Kv(r){return{applyVisual:function(e,t,n){var a=this.mapValueToVisual(e);n("color",r(t("color"),a))},_normalizedToVisual:D_([0,1])}}function cM(r){var e=this.option.visual;return e[Math.round($e(r,[0,1],[0,e.length-1],!0))]||{}}function of(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function Mf(r){var e=this.option.visual;return e[this.option.loop&&r!==Op?r%e.length:r]}function qo(){return this.option.visual[0]}function D_(r){return{linear:function(e){return $e(e,r,this.option.visual,!0)},category:Mf,piecewise:function(e,t){var n=I_.call(this,t);return n==null&&(n=$e(e,r,this.option.visual,!0)),n},fixed:qo}}function I_(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=jt.findPieceIndex(r,t),a=t[n];if(a&&a.visual)return a.visual[this.type]}}function sN(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=$(e,function(t){var n=Zr(t);return n||[0,0,0,1]})),e}var dK={linear:function(r){return $e(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=jt.findPieceIndex(r,e,!0);if(t!=null)return $e(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e??Op},fixed:At};function Jv(r,e,t){return r?e<=t:e=t.length||d===t[d.depth]){var y=bK(a,l,d,g,p,n);uN(d,y,t,n)}})}}}function mK(r,e,t){var n=H({},e),a=t.designatedVisualItemStyle;return M(["color","colorAlpha","colorSaturation"],function(i){a[i]=e[i];var o=r.get(i);a[i]=null,o!=null&&(n[i]=o)}),n}function vM(r){var e=Ry(r,"color");if(e){var t=Ry(r,"colorAlpha"),n=Ry(r,"colorSaturation");return n&&(e=Ji(e,null,null,n)),t&&(e=Jh(e,t)),e}}function _K(r,e){return e!=null?Ji(e,null,null,r):null}function Ry(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function SK(r,e,t,n,a,i){if(!(!i||!i.length)){var o=Oy(e,"color")||a.color!=null&&a.color!=="none"&&(Oy(e,"colorAlpha")||Oy(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&su[1]&&(u[1]=l);var f=e.get("colorMappingBy"),c={type:o.name,dataExtent:u,visual:o.range};c.type==="color"&&(f==="index"||f==="id")?(c.mappingMethod="category",c.loop=!0):c.mappingMethod="linear";var v=new jt(c);return lN(v).drColorMappingBy=f,v}}}function Oy(r,e){var t=r.get(e);return W(t)&&t.length?{name:e,range:t}:null}function bK(r,e,t,n,a,i){var o=H({},e);if(a){var s=a.type,l=s==="color"&&lN(a).drColorMappingBy,u=l==="index"?n:l==="id"?i.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=a.mapValueToVisual(u)}return o}var Sc=Math.max,Np=Math.min,hM=fr,tb=M,fN=["itemStyle","borderWidth"],xK=["itemStyle","gapWidth"],wK=["upperLabel","show"],TK=["upperLabel","height"];const CK={seriesType:"treemap",reset:function(r,e,t,n){var a=r.option,i=Zt(r,t).refContainer,o=ft(r.getBoxLayoutParams(),i),s=a.size||[],l=X(hM(o.width,s[0]),i.width),u=X(hM(o.height,s[1]),i.height),f=n&&n.type,c=["treemapZoomToNode","treemapRootToNode"],v=mc(n,c,r),h=f==="treemapRender"||f==="treemapMove"?n.rootRect:null,p=r.getViewRoot(),d=aN(p);if(f!=="treemapMove"){var g=f==="treemapZoomToNode"?PK(r,v,p,l,u):h?[h.width,h.height]:[l,u],y=a.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var m={squareRatio:a.squareRatio,sort:y,leafDepth:a.leafDepth};p.hostTree.clearLayouts();var _={x:0,y:0,width:g[0],height:g[1],area:g[0]*g[1]};p.setLayout(_),cN(p,m,!1,0),_=p.getLayout(),tb(d,function(b,x){var w=(d[x+1]||p).getValue();b.setLayout(H({dataExtent:[w,w],borderWidth:0,upperHeight:0},_))})}var S=r.getData().tree.root;S.setLayout(kK(o,h,v),!0),r.setLayoutInfo(o),vN(S,new ve(-o.x,-o.y,t.getWidth(),t.getHeight()),d,p,0)}};function cN(r,e,t,n){var a,i;if(!r.isRemoved()){var o=r.getLayout();a=o.width,i=o.height;var s=r.getModel(),l=s.get(fN),u=s.get(xK)/2,f=hN(s),c=Math.max(l,f),v=l-u,h=c-u;r.setLayout({borderWidth:l,upperHeight:c,upperLabelHeight:f},!0),a=Sc(a-2*v,0),i=Sc(i-v-h,0);var p=a*i,d=AK(r,s,p,e,t,n);if(d.length){var g={x:v,y:h,width:a,height:i},y=Np(a,i),m=1/0,_=[];_.area=0;for(var S=0,b=d.length;S=0;l--){var u=a[n==="asc"?o-l-1:l].getValue();u/t*es[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function LK(r,e,t){for(var n=0,a=1/0,i=0,o=void 0,s=r.length;in&&(n=o));var l=r.area*r.area,u=e*e*t;return l?Sc(u*n/l,l/(u*a)):1/0}function pM(r,e,t,n,a){var i=e===t.width?0:1,o=1-i,s=["x","y"],l=["width","height"],u=t[s[i]],f=e?r.area/e:0;(a||f>t[l[o]])&&(f=t[l[o]]);for(var c=0,v=r.length;c_w&&(u=_w),i=s}un&&(n=e);var i=n%2?n+2:n+3;a=[];for(var o=0;o0&&(b[0]=-b[0],b[1]=-b[1]);var w=S[0]<0?-1:1;if(i.__position!=="start"&&i.__position!=="end"){var T=-Math.atan2(S[1],S[0]);c[0].8?"left":v[0]<-.8?"right":"center",d=v[1]>.8?"top":v[1]<-.8?"bottom":"middle";break;case"start":i.x=-v[0]*y+f[0],i.y=-v[1]*m+f[1],p=v[0]>.8?"right":v[0]<-.8?"left":"center",d=v[1]>.8?"bottom":v[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":i.x=y*w+f[0],i.y=f[1]+C,p=S[0]<0?"right":"left",i.originX=-y*w,i.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":i.x=x[0],i.y=x[1]+C,p="center",i.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":i.x=-y*w+c[0],i.y=c[1]+C,p=S[0]>=0?"right":"left",i.originX=y*w,i.originY=-C;break}i.scaleX=i.scaleY=o,i.setStyle({verticalAlign:i.__verticalAlign||d,align:i.__align||p})}},e})(oe),ob=(function(){function r(e){this.group=new oe,this._LineCtor=e||ib}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,a=n.group,i=n._lineData;n._lineData=e,i||a.removeAll();var o=SM(e);e.diff(i).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(i,e,l,s,o)}).remove(function(s){a.remove(i.getItemGraphicEl(s))}).execute()},r.prototype.updateLayout=function(){var e=this._lineData;e&&e.eachItemGraphicEl(function(t,n){t.updateLayout(e,n)},this)},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=SM(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!qK(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a0}function SM(r){var e=r.hostModel,t=e.getModel("emphasis");return{lineStyle:e.getModel("lineStyle").getLineStyle(),emphasisLineStyle:t.getModel(["lineStyle"]).getLineStyle(),blurLineStyle:e.getModel(["blur","lineStyle"]).getLineStyle(),selectLineStyle:e.getModel(["select","lineStyle"]).getLineStyle(),emphasisDisabled:t.get("disabled"),blurScope:t.get("blurScope"),focus:t.get("focus"),labelStatesModels:Ht(e)}}function bM(r){return isNaN(r[0])||isNaN(r[1])}function Gy(r){return r&&!bM(r[0])&&!bM(r[1])}var Fy=[],Hy=[],Wy=[],yl=tr,$y=ds,xM=Math.abs;function wM(r,e,t){for(var n=r[0],a=r[1],i=r[2],o=1/0,s,l=t*t,u=.1,f=.1;f<=.9;f+=.1){Fy[0]=yl(n[0],a[0],i[0],f),Fy[1]=yl(n[1],a[1],i[1],f);var c=xM($y(Fy,e)-l);c=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function Zy(r,e){var t=[],n=Kf,a=[[],[],[]],i=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),f=s.getVisual("fromSymbol"),c=s.getVisual("toSymbol");u.__original||(u.__original=[Qa(u[0]),Qa(u[1])],u[2]&&u.__original.push(Qa(u[2])));var v=u.__original;if(u[2]!=null){if(Lr(a[0],v[0]),Lr(a[1],v[2]),Lr(a[2],v[1]),f&&f!=="none"){var h=If(s.node1),p=wM(a,v[0],h*e);n(a[0][0],a[1][0],a[2][0],p,t),a[0][0]=t[3],a[1][0]=t[4],n(a[0][1],a[1][1],a[2][1],p,t),a[0][1]=t[3],a[1][1]=t[4]}if(c&&c!=="none"){var h=If(s.node2),p=wM(a,v[1],h*e);n(a[0][0],a[1][0],a[2][0],p,t),a[1][0]=t[1],a[2][0]=t[2],n(a[0][1],a[1][1],a[2][1],p,t),a[1][1]=t[1],a[2][1]=t[2]}Lr(u[0],a[0]),Lr(u[1],a[2]),Lr(u[2],a[1])}else{if(Lr(i[0],v[0]),Lr(i[1],v[1]),is(o,i[1],i[0]),yu(o,o),f&&f!=="none"){var h=If(s.node1);Qm(i[0],i[0],o,h*e)}if(c&&c!=="none"){var h=If(s.node2);Qm(i[1],i[1],o,-h*e)}Lr(u[0],i[0]),Lr(u[1],i[1])}})}var SN=Ae();function jK(r){if(r)return SN(r).bridge}function TM(r,e){r&&(SN(r).bridge=e)}function CM(r){return r.type==="view"}var KK=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){var a=new $c,i=new ob,o=this.group,s=new oe;this._controller=new Ks(n.getZr()),this._controllerHost={target:s},s.add(a.group),s.add(i.group),o.add(s),this._symbolDraw=a,this._lineDraw=i,this._mainGroup=s,this._firstRender=!0},e.prototype.render=function(t,n,a){var i=this,o=t.coordinateSystem,s=!1;this._model=t,this._api=a,this._active=!0;var l=this._getThumbnailInfo();l&&l.bridge.reset(a);var u=this._symbolDraw,f=this._lineDraw;if(CM(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?this._mainGroup.attr(c):Ve(this._mainGroup,c,t)}Zy(t.getGraph(),Df(t));var v=t.getData();u.updateData(v);var h=t.getEdgeData();f.updateData(h),this._updateNodeAndLinkScale(),this._updateController(null,t,a),clearTimeout(this._layoutTimeout);var p=t.forceLayout,d=t.get(["force","layoutAnimation"]);p&&(s=!0,this._startForceLayoutIteration(p,a,d));var g=t.get("layout");v.graph.eachNode(function(S){var b=S.dataIndex,x=S.getGraphicEl(),w=S.getModel();if(x){x.off("drag").off("dragend");var T=w.get("draggable");T&&x.on("drag",function(A){switch(g){case"force":p.warmUp(),!i._layouting&&i._startForceLayoutIteration(p,a,d),p.setFixed(b),v.setItemLayout(b,[x.x,x.y]);break;case"circular":v.setItemLayout(b,[x.x,x.y]),S.setLayout({fixed:!0},!0),ab(t,"symbolSize",S,[A.offsetX,A.offsetY]),i.updateLayout(t);break;default:v.setItemLayout(b,[x.x,x.y]),nb(t.getGraph(),t),i.updateLayout(t);break}}).on("dragend",function(){p&&p.setUnfixed(b)}),x.setDraggable(T,!!w.get("cursor"));var C=w.get(["emphasis","focus"]);C==="adjacency"&&(ge(x).focus=S.getAdjacentDataIndices())}}),v.graph.eachEdge(function(S){var b=S.getGraphicEl(),x=S.getModel().get(["emphasis","focus"]);b&&x==="adjacency"&&(ge(b).focus={edge:[S.dataIndex],node:[S.node1.dataIndex,S.node2.dataIndex]})});var y=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=v.getLayout("cx"),_=v.getLayout("cy");v.graph.eachNode(function(S){yN(S,y,m,_)}),this._firstRender=!1,s||this._renderThumbnail(t,a,this._symbolDraw,this._lineDraw)},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n,a){var i=this,o=!1;(function s(){t.step(function(l){i.updateLayout(i._model),(l||!o)&&(o=!0,i._renderThumbnail(i._model,n,i._symbolDraw,i._lineDraw)),(i._layouting=!l)&&(a?i._layoutTimeout=setTimeout(s,16):s())})})()},e.prototype._updateController=function(t,n,a){var i=this._controller,o=this._controllerHost,s=n.coordinateSystem;if(!CM(s)){i.disable();return}i.enable(n.get("roam"),{api:a,zInfo:{component:n},triggerInfo:{roamTrigger:n.get("roamTrigger"),isInSelf:function(l,u,f){return s.containPoint([u,f])},isInClip:function(l,u,f){return!t||t.contain(u,f)}}}),o.zoomLimit=n.get("scaleLimit"),o.zoom=s.getZoom(),i.off("pan").off("zoom").on("pan",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",dx:l.dx,dy:l.dy})}).on("zoom",function(l){a.dispatchAction({seriesId:n.id,type:"graphRoam",zoom:l.scale,originX:l.originX,originY:l.originY})})},e.prototype.updateViewOnPan=function(t,n,a){this._active&&(XS(this._controllerHost,a.dx,a.dy),this._updateThumbnailWindow())},e.prototype.updateViewOnZoom=function(t,n,a){this._active&&(qS(this._controllerHost,a.zoom,a.originX,a.originY),this._updateNodeAndLinkScale(),Zy(t.getGraph(),Df(t)),this._lineDraw.updateLayout(),n.updateLabelLayout(),this._updateThumbnailWindow())},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),a=Df(t);n.eachItemGraphicEl(function(i,o){i&&i.setSymbolScale(a)})},e.prototype.updateLayout=function(t){this._active&&(Zy(t.getGraph(),Df(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout())},e.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()},e.prototype._getThumbnailInfo=function(){var t=this._model,n=t.coordinateSystem;if(n.type==="view"){var a=jK(t);if(a)return{bridge:a,coordSys:n}}},e.prototype._updateThumbnailWindow=function(){var t=this._getThumbnailInfo();t&&t.bridge.updateWindow(t.coordSys.transform,this._api)},e.prototype._renderThumbnail=function(t,n,a,i){var o=this._getThumbnailInfo();if(o){var s=new oe,l=a.group.children(),u=i.group.children(),f=new oe,c=new oe;s.add(c),s.add(f);for(var v=0;v=0&&e.call(t,n[i],i)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,a=n.length,i=0;i=0&&n[i].node1.dataIndex>=0&&n[i].node2.dataIndex>=0&&e.call(t,n[i],i)},r.prototype.breadthFirstTraverse=function(e,t,n,a){if(t instanceof jo||(t=this._nodesMap[ml(t)]),!!t){for(var i=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o=0&&l.node2.dataIndex>=0});for(var i=0,o=a.length;i=0&&!e.hasKey(p)&&(e.set(p,!0),o.push(h.node1))}for(l=0;l=0&&!e.hasKey(_)&&(e.set(_,!0),s.push(m.node2))}}}return{edge:e.keys(),node:t.keys()}},r})(),bN=(function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n??-1}return r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.edgeData.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){return{edge:[this.dataIndex],node:[this.node1.dataIndex,this.node2.dataIndex]}},r.prototype.getTrajectoryDataIndices=function(){var e=te(),t=te();e.set(this.dataIndex,!0);for(var n=[this.node1],a=[this.node2],i=0;i=0&&!e.hasKey(c)&&(e.set(c,!0),n.push(f.node1))}for(i=0;i=0&&!e.hasKey(d)&&(e.set(d,!0),a.push(p.node2))}return{edge:e.keys(),node:t.keys()}},r})();function xN(r,e){return{getValue:function(t){var n=this[r][e];return n.getStore().get(n.getDimensionIndex(t||"value"),this.dataIndex)},setVisual:function(t,n){this.dataIndex>=0&&this[r][e].setItemVisual(this.dataIndex,t,n)},getVisual:function(t){return this[r][e].getItemVisual(this.dataIndex,t)},setLayout:function(t,n){this.dataIndex>=0&&this[r][e].setItemLayout(this.dataIndex,t,n)},getLayout:function(){return this[r][e].getItemLayout(this.dataIndex)},getGraphicEl:function(){return this[r][e].getItemGraphicEl(this.dataIndex)},getRawIndex:function(){return this[r][e].getRawIndex(this.dataIndex)}}}zt(jo,xN("hostGraph","data"));zt(bN,xN("hostGraph","edgeData"));function sb(r,e,t,n,a){for(var i=new JK(n),o=0;o "+v)),u++)}var h=t.get("coordinateSystem"),p;if(h==="cartesian2d"||h==="polar"||h==="matrix")p=gi(r,t);else{var d=Bc.get(h),g=d?d.dimensions||[]:[];be(g,"value")<0&&g.concat(["value"]);var y=Fc(r,{coordDimensions:g,encodeDefine:t.getEncode()}).dimensions;p=new Or(y,t),p.initData(r)}var m=new Or(["value"],t);return m.initData(l,s),a&&a(p,m),rN({mainData:p,struct:i,structAttr:"graph",datas:{node:p,edge:m},datasAttr:{node:"data",edge:"edgeData"}}),i.update(),i}var QK=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments);var n=this;function a(){return n._categoriesData}this.legendVisualProvider=new Pu(a,a),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this._updateCategoriesData()},e.prototype.mergeDefaultAndTheme=function(t){r.prototype.mergeDefaultAndTheme.apply(this,arguments),Ps(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=this;if(i&&a){VK(this);var s=sb(i,a,this,!0,l);return M(s.edges,function(u){GK(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,f){u.wrapMethod("getItemModel",function(p){var d=o._categoriesModels,g=p.getShallow("category"),y=d[g];return y&&(y.parentModel=p.parentModel,p.parentModel=y),p});var c=ke.prototype.getModel;function v(p,d){var g=c.call(this,p,d);return g.resolveParentPath=h,g}f.wrapMethod("getItemModel",function(p){return p.resolveParentPath=h,p.getModel=v,p});function h(p){if(p&&(p[0]==="label"||p[1]==="label")){var d=p.slice();return p[0]==="label"?d[0]="edgeLabel":p[1]==="label"&&(d[1]="edgeLabel"),d}return p}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.getCategoriesData=function(){return this._categoriesData},e.prototype.formatTooltip=function(t,n,a){if(a==="edge"){var i=this.getData(),o=this.getDataParams(t,a),s=i.graph.getEdgeByIndex(t),l=i.getName(s.node1.dataIndex),u=i.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),Ot("nameValue",{name:f.join(" > "),value:o.value,noValue:o.value==null})}var c=IE({series:this,dataIndex:t,multipleSeries:n});return c},e.prototype._updateCategoriesData=function(){var t=$(this.option.categories||[],function(a){return a.value!=null?a:H({value:0},a)}),n=new Or(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(a){return n.getItemModel(a)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:B.color.neutral50,width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},e})(nt);function eJ(r){r.registerChartView(KK),r.registerSeriesModel(QK),r.registerProcessor(RK),r.registerVisual(OK),r.registerVisual(NK),r.registerLayout(FK),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,WK),r.registerLayout(ZK),r.registerCoordinateSystem("graphView",{dimensions:Js.dimensions,create:YK}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},At),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},At),r.registerAction({type:"graphRoam",event:"graphRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",query:e},function(a){var i=n.getViewOfSeriesModel(a);i&&(e.dx!=null&&e.dy!=null&&i.updateViewOnPan(a,n,e),e.zoom!=null&&e.originX!=null&&e.originY!=null&&i.updateViewOnZoom(a,n,e));var o=a.coordinateSystem,s=$d(o,e,a.get("scaleLimit"));a.setCenter&&a.setCenter(s.center),a.setZoom&&a.setZoom(s.zoom)})})}var AM=(function(r){N(e,r);function e(t,n,a){var i=r.call(this)||this;ge(i).dataType="node",i.z2=2;var o=new Be;return i.setTextContent(o),i.updateData(t,n,a,!0),i}return e.prototype.updateData=function(t,n,a,i){var o=this,s=t.graph.getNodeByIndex(n),l=t.hostModel,u=s.getModel(),f=u.getModel("emphasis"),c=t.getItemLayout(n),v=H(_a(u.getModel("itemStyle"),c,!0),c),h=this;if(isNaN(v.startAngle)){h.setShape(v);return}i?h.setShape(v):Ve(h,{shape:v},l,n);var p=H(_a(u.getModel("itemStyle"),c,!0),c);o.setShape(p),o.useStyle(t.getItemVisual(n,"style")),Ft(o,u),this._updateLabel(l,u,s),t.setItemGraphicEl(n,h),Ft(h,u,"itemStyle");var d=f.get("focus");ut(this,d==="adjacency"?s.getAdjacentDataIndices():d,f.get("blurScope"),f.get("disabled"))},e.prototype._updateLabel=function(t,n,a){var i=this.getTextContent(),o=a.getLayout(),s=(o.startAngle+o.endAngle)/2,l=Math.cos(s),u=Math.sin(s),f=n.getModel("label");i.ignore=!f.get("show");var c=Ht(n),v=a.getVisual("style");Kt(i,c,{labelFetcher:{getFormattedLabel:function(m,_,S,b,x,w){return t.getFormattedLabel(m,_,"node",b,nn(x,c.normal&&c.normal.get("formatter"),n.get("name")),w)}},labelDataIndex:a.dataIndex,defaultText:a.dataIndex+"",inheritColor:v.fill,defaultOpacity:v.opacity,defaultOutsidePosition:"startArc"});var h=f.get("position")||"outside",p=f.get("distance")||0,d;h==="outside"?d=o.r+p:d=(o.r+o.r0)/2,this.textConfig={inside:h!=="outside"};var g=h!=="outside"?f.get("align")||"center":l>0?"left":"right",y=h!=="outside"?f.get("verticalAlign")||"middle":u>0?"top":"bottom";i.attr({x:l*d+o.cx,y:u*d+o.cy,rotation:0,style:{align:g,verticalAlign:y}})},e})(br),tJ=(function(r){N(e,r);function e(t,n,a,i){var o=r.call(this)||this;return ge(o).dataType="edge",o.updateData(t,n,a,i,!0),o}return e.prototype.buildPath=function(t,n){t.moveTo(n.s1[0],n.s1[1]);var a=.7,i=n.clockwise;t.arc(n.cx,n.cy,n.r,n.sStartAngle,n.sEndAngle,!i),t.bezierCurveTo((n.cx-n.s2[0])*a+n.s2[0],(n.cy-n.s2[1])*a+n.s2[1],(n.cx-n.t1[0])*a+n.t1[0],(n.cy-n.t1[1])*a+n.t1[1],n.t1[0],n.t1[1]),t.arc(n.cx,n.cy,n.r,n.tStartAngle,n.tEndAngle,!i),t.bezierCurveTo((n.cx-n.t2[0])*a+n.t2[0],(n.cy-n.t2[1])*a+n.t2[1],(n.cx-n.s1[0])*a+n.s1[0],(n.cy-n.s1[1])*a+n.s1[1],n.s1[0],n.s1[1]),t.closePath()},e.prototype.updateData=function(t,n,a,i,o){var s=t.hostModel,l=n.graph.getEdgeByIndex(a),u=l.getLayout(),f=l.node1.getModel(),c=n.getItemModel(l.dataIndex),v=c.getModel("lineStyle"),h=c.getModel("emphasis"),p=h.get("focus"),d=H(_a(f.getModel("itemStyle"),u,!0),u),g=this;if(isNaN(d.sStartAngle)||isNaN(d.tStartAngle)){g.setShape(d);return}o?(g.setShape(d),MM(g,l,t,v)):(Ln(g),MM(g,l,t,v),Ve(g,{shape:d},s,a)),ut(this,p==="adjacency"?l.getAdjacentDataIndices():p,h.get("blurScope"),h.get("disabled")),Ft(g,c,"lineStyle"),n.setItemGraphicEl(l.dataIndex,g)},e})(Me);function MM(r,e,t,n){var a=e.node1,i=e.node2,o=r.style;r.setStyle(n.getLineStyle());var s=n.get("color");switch(s){case"source":o.fill=t.getItemVisual(a.dataIndex,"style").fill,o.decal=a.getVisual("style").decal;break;case"target":o.fill=t.getItemVisual(i.dataIndex,"style").fill,o.decal=i.getVisual("style").decal;break;case"gradient":var l=t.getItemVisual(a.dataIndex,"style").fill,u=t.getItemVisual(i.dataIndex,"style").fill;if(q(l)&&q(u)){var f=r.shape,c=(f.s1[0]+f.s2[0])/2,v=(f.s1[1]+f.s2[1])/2,h=(f.t1[0]+f.t2[0])/2,p=(f.t1[1]+f.t2[1])/2;o.fill=new bu(c,v,h,p,[{offset:0,color:l},{offset:1,color:u}],!0)}break}}var rJ=Math.PI/180,nJ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){},e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group,l=-t.get("startAngle")*rJ;if(i.diff(o).add(function(f){var c=i.getItemLayout(f);if(c){var v=new AM(i,f,l);ge(v).dataIndex=f,s.add(v)}}).update(function(f,c){var v=o.getItemGraphicEl(c),h=i.getItemLayout(f);if(!h){v&&ei(v,t,c);return}v?v.updateData(i,f,l):v=new AM(i,f,l),s.add(v)}).remove(function(f){var c=o.getItemGraphicEl(f);c&&ei(c,t,f)}).execute(),!o){var u=t.get("center");this.group.scaleX=.01,this.group.scaleY=.01,this.group.originX=X(u[0],a.getWidth()),this.group.originY=X(u[1],a.getHeight()),st(this.group,{scaleX:1,scaleY:1},t)}this._data=i,this.renderEdges(t,l)},e.prototype.renderEdges=function(t,n){var a=t.getData(),i=t.getEdgeData(),o=this._edgeData,s=this.group;i.diff(o).add(function(l){var u=new tJ(a,i,l,n);ge(u).dataIndex=l,s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(a,i,l,n),s.add(f)}).remove(function(l){var u=o.getItemGraphicEl(l);u&&ei(u,t,l)}).execute(),this._edgeData=i},e.prototype.dispose=function(){},e.type="chord",e})(Je),aJ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links),this.legendVisualProvider=new Pu(j(this.getData,this),j(this.getRawData,this))},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this.fillDataTextStyle(t.edges||t.links)},e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[];if(i&&a){var o=sb(i,a,this,!0,s);return o.data}function s(l,u){var f=ke.prototype.getModel;function c(h,p){var d=f.call(this,h,p);return d.resolveParentPath=v,d}u.wrapMethod("getItemModel",function(h){return h.resolveParentPath=v,h.getModel=c,h});function v(h){if(h&&(h[0]==="label"||h[1]==="label")){var p=h.slice();return h[0]==="label"?p[0]="edgeLabel":h[1]==="label"&&(p[1]="edgeLabel"),p}return h}}},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){var i=this.getDataParams(t,a);if(a==="edge"){var o=this.getData(),s=o.graph.getEdgeByIndex(t),l=o.getName(s.node1.dataIndex),u=o.getName(s.node2.dataIndex),f=[];return l!=null&&f.push(l),u!=null&&f.push(u),Ot("nameValue",{name:f.join(" > "),value:i.value,noValue:i.value==null})}return Ot("nameValue",{name:i.name,value:i.value,noValue:i.value==null})},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(n==="node"){var i=this.getData(),o=this.getGraph().getNodeByIndex(t);if(a.name==null&&(a.name=i.getName(t)),a.value==null){var s=o.getLayout().value;a.value=s}}return a},e.type="series.chord",e.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}}},e})(nt),Uy=Math.PI/180;function iJ(r,e){r.eachSeriesByType("chord",function(t){oJ(t,e)})}function oJ(r,e){var t=r.getData(),n=t.graph,a=r.getEdgeData(),i=a.count();if(i){var o=Xk(r,e),s=o.cx,l=o.cy,u=o.r,f=o.r0,c=Math.max((r.get("padAngle")||0)*Uy,0),v=Math.max((r.get("minAngle")||0)*Uy,0),h=-r.get("startAngle")*Uy,p=h+Math.PI*2,d=r.get("clockwise"),g=d?1:-1,y=[h,p];wd(y,!d);var m=y[0],_=y[1],S=_-m,b=t.getSum("value")===0&&a.getSum("value")===0,x=[],w=0;n.eachEdge(function(R){var z=b?1:R.getValue("value");b&&(z>0||v)&&(w+=2);var V=R.node1.dataIndex,G=R.node2.dataIndex;x[V]=(x[V]||0)+z,x[G]=(x[G]||0)+z});var T=0;if(n.eachNode(function(R){var z=R.getValue("value");isNaN(z)||(x[R.dataIndex]=Math.max(z,x[R.dataIndex]||0)),!b&&(x[R.dataIndex]>0||v)&&w++,T+=x[R.dataIndex]||0}),!(w===0||T===0)){c*w>=Math.abs(S)&&(c=Math.max(0,(Math.abs(S)-v*w)/w)),(c+v)*w>=Math.abs(S)&&(v=(Math.abs(S)-c*w)/w);var C=(S-c*w*g)/T,A=0,D=0,L=0;n.eachNode(function(R){var z=x[R.dataIndex]||0,V=C*(T?z:1)*g;Math.abs(V)D){var P=A/D;n.eachNode(function(R){var z=R.getLayout().angle;Math.abs(z)>=v?R.setLayout({angle:z*P,ratio:P},!0):R.setLayout({angle:v,ratio:v===0?1:z/v},!0)})}else n.eachNode(function(R){if(!I){var z=R.getLayout().angle,V=Math.min(z/L,1),G=V*A;z-Gv&&v>0){var V=I?1:Math.min(z/L,1),G=z-v,F=Math.min(G,Math.min(E,A*V));E-=F,R.setLayout({angle:z-F,ratio:(z-F)/z},!0)}else v>0&&R.setLayout({angle:v,ratio:z===0?1:v/z},!0)}});var k=m,O=[];n.eachNode(function(R){var z=Math.max(R.getLayout().angle,v);R.setLayout({cx:s,cy:l,r0:f,r:u,startAngle:k,endAngle:k+z*g,clockwise:d},!0),O[R.dataIndex]=k,k+=(z+c)*g}),n.eachEdge(function(R){var z=b?1:R.getValue("value"),V=C*(T?z:1)*g,G=R.node1.dataIndex,F=O[G]||0,U=Math.abs((R.node1.getLayout().ratio||1)*V),J=F+U*g,he=[s+f*Math.cos(F),l+f*Math.sin(F)],Oe=[s+f*Math.cos(J),l+f*Math.sin(J)],We=R.node2.dataIndex,pe=O[We]||0,ae=Math.abs((R.node2.getLayout().ratio||1)*V),_e=pe+ae*g,ee=[s+f*Math.cos(pe),l+f*Math.sin(pe)],de=[s+f*Math.cos(_e),l+f*Math.sin(_e)];R.setLayout({s1:he,s2:Oe,sStartAngle:F,sEndAngle:J,t1:ee,t2:de,tStartAngle:pe,tEndAngle:_e,cx:s,cy:l,r:f,value:z,clockwise:d}),O[G]=J,O[We]=_e})}}}function sJ(r){r.registerChartView(nJ),r.registerSeriesModel(aJ),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,iJ),r.registerProcessor(Iu("chord"))}var lJ=(function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r})(),uJ=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new lJ},e.prototype.buildPath=function(t,n){var a=Math.cos,i=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-a(l)*s*(s>=o/3?1:2),f=n.y-i(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,f),t.lineTo(n.x+a(l)*s,n.y+i(l)*s),t.lineTo(n.x+a(n.angle)*o,n.y+i(n.angle)*o),t.lineTo(n.x-a(l)*s,n.y-i(l)*s),t.lineTo(u,f)},e})(Me);function fJ(r,e){var t=r.get("center"),n=e.getWidth(),a=e.getHeight(),i=Math.min(n,a),o=X(t[0],e.getWidth()),s=X(t[1],e.getHeight()),l=X(r.get("radius"),i/2);return{cx:o,cy:s,r:l}}function eh(r,e){var t=r==null?"":r+"";return e&&(q(e)?t=e.replace("{value}",t):ie(e)&&(t=e(r))),t}var cJ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeAll();var i=t.get(["axisLine","lineStyle","color"]),o=fJ(t,a);this._renderMain(t,n,a,i,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,a,i,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,f=-t.get("endAngle")/180*Math.PI,c=t.getModel("axisLine"),v=c.get("roundCap"),h=v?Ip:br,p=c.get("show"),d=c.getModel("lineStyle"),g=d.get("width"),y=[u,f];wd(y,!l),u=y[0],f=y[1];for(var m=f-u,_=u,S=[],b=0;p&&b=C&&(A===0?0:i[A-1][0])Math.PI/2&&(J+=Math.PI)):U==="tangential"?J=-T-Math.PI/2:ze(U)&&(J=U*Math.PI/180),J===0?c.add(new Be({style:rt(_,{text:z,x:G,y:F,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:P<-.4?"left":P>.4?"right":"center"},{inheritColor:V}),silent:!0})):c.add(new Be({style:rt(_,{text:z,x:G,y:F,verticalAlign:"middle",align:"center"},{inheritColor:V}),silent:!0,originX:G,originY:F,rotation:J}))}if(m.get("show")&&k!==S){var O=m.get("distance");O=O?O+f:f;for(var he=0;he<=b;he++){P=Math.cos(T),E=Math.sin(T);var Oe=new kt({shape:{x1:P*(p-O)+v,y1:E*(p-O)+h,x2:P*(p-w-O)+v,y2:E*(p-w-O)+h},silent:!0,style:L});L.stroke==="auto"&&Oe.setStyle({stroke:i((k+he/b)/S)}),c.add(Oe),T+=A}T-=A}else T+=C}},e.prototype._renderPointer=function(t,n,a,i,o,s,l,u,f){var c=this.group,v=this._data,h=this._progressEls,p=[],d=t.get(["pointer","show"]),g=t.getModel("progress"),y=g.get("show"),m=t.getData(),_=m.mapDimension("value"),S=+t.get("min"),b=+t.get("max"),x=[S,b],w=[s,l];function T(A,D){var L=m.getItemModel(A),I=L.getModel("pointer"),P=X(I.get("width"),o.r),E=X(I.get("length"),o.r),k=t.get(["pointer","icon"]),O=I.get("offsetCenter"),R=X(O[0],o.r),z=X(O[1],o.r),V=I.get("keepAspect"),G;return k?G=Nt(k,R-P/2,z-E,P,E,null,V):G=new uJ({shape:{angle:-Math.PI/2,width:P,r:E,x:R,y:z}}),G.rotation=-(D+Math.PI/2),G.x=o.cx,G.y=o.cy,G}function C(A,D){var L=g.get("roundCap"),I=L?Ip:br,P=g.get("overlap"),E=P?g.get("width"):f/m.count(),k=P?o.r-E:o.r-(A+1)*E,O=P?o.r:o.r-A*E,R=new I({shape:{startAngle:s,endAngle:D,cx:o.cx,cy:o.cy,clockwise:u,r0:k,r:O}});return P&&(R.z2=$e(m.get(_,A),[S,b],[100,0],!0)),R}(y||d)&&(m.diff(v).add(function(A){var D=m.get(_,A);if(d){var L=T(A,s);st(L,{rotation:-((isNaN(+D)?w[0]:$e(D,x,w,!0))+Math.PI/2)},t),c.add(L),m.setItemGraphicEl(A,L)}if(y){var I=C(A,s),P=g.get("clip");st(I,{shape:{endAngle:$e(D,x,w,P)}},t),c.add(I),D0(t.seriesIndex,m.dataType,A,I),p[A]=I}}).update(function(A,D){var L=m.get(_,A);if(d){var I=v.getItemGraphicEl(D),P=I?I.rotation:s,E=T(A,P);E.rotation=P,Ve(E,{rotation:-((isNaN(+L)?w[0]:$e(L,x,w,!0))+Math.PI/2)},t),c.add(E),m.setItemGraphicEl(A,E)}if(y){var k=h[D],O=k?k.shape.endAngle:s,R=C(A,O),z=g.get("clip");Ve(R,{shape:{endAngle:$e(L,x,w,z)}},t),c.add(R),D0(t.seriesIndex,m.dataType,A,R),p[A]=R}}).execute(),m.each(function(A){var D=m.getItemModel(A),L=D.getModel("emphasis"),I=L.get("focus"),P=L.get("blurScope"),E=L.get("disabled");if(d){var k=m.getItemGraphicEl(A),O=m.getItemVisual(A,"style"),R=O.fill;if(k instanceof ar){var z=k.style;k.useStyle(H({image:z.image,x:z.x,y:z.y,width:z.width,height:z.height},O))}else k.useStyle(O),k.type!=="pointer"&&k.setColor(R);k.setStyle(D.getModel(["pointer","itemStyle"]).getItemStyle()),k.style.fill==="auto"&&k.setStyle("fill",i($e(m.get(_,A),x,[0,1],!0))),k.z2EmphasisLift=0,Ft(k,D),ut(k,I,P,E)}if(y){var V=p[A];V.useStyle(m.getItemVisual(A,"style")),V.setStyle(D.getModel(["progress","itemStyle"]).getItemStyle()),V.z2EmphasisLift=0,Ft(V,D),ut(V,I,P,E)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,n){var a=t.getModel("anchor"),i=a.get("show");if(i){var o=a.get("size"),s=a.get("icon"),l=a.get("offsetCenter"),u=a.get("keepAspect"),f=Nt(s,n.cx-o/2+X(l[0],n.r),n.cy-o/2+X(l[1],n.r),o,o,null,u);f.z2=a.get("showAbove")?1:0,f.setStyle(a.getModel("itemStyle").getItemStyle()),this.group.add(f)}},e.prototype._renderTitleAndDetail=function(t,n,a,i,o){var s=this,l=t.getData(),u=l.mapDimension("value"),f=+t.get("min"),c=+t.get("max"),v=new oe,h=[],p=[],d=t.isAnimationEnabled(),g=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(y){h[y]=new Be({silent:!0}),p[y]=new Be({silent:!0})}).update(function(y,m){h[y]=s._titleEls[m],p[y]=s._detailEls[m]}).execute(),l.each(function(y){var m=l.getItemModel(y),_=l.get(u,y),S=new oe,b=i($e(_,[f,c],[0,1],!0)),x=m.getModel("title");if(x.get("show")){var w=x.get("offsetCenter"),T=o.cx+X(w[0],o.r),C=o.cy+X(w[1],o.r),A=h[y];A.attr({z2:g?0:2,style:rt(x,{x:T,y:C,text:l.getName(y),align:"center",verticalAlign:"middle"},{inheritColor:b})}),S.add(A)}var D=m.getModel("detail");if(D.get("show")){var L=D.get("offsetCenter"),I=o.cx+X(L[0],o.r),P=o.cy+X(L[1],o.r),E=X(D.get("width"),o.r),k=X(D.get("height"),o.r),O=t.get(["progress","show"])?l.getItemVisual(y,"style").fill:b,A=p[y],R=D.get("formatter");A.attr({z2:g?0:2,style:rt(D,{x:I,y:P,text:eh(_,R),width:isNaN(E)?null:E,height:isNaN(k)?null:k,align:"center",verticalAlign:"middle"},{inheritColor:O})}),Mk(A,{normal:D},_,function(V){return eh(V,R)}),d&&Dk(A,y,l,t,{getFormattedLabel:function(V,G,F,U,J,he){return eh(he?he.interpolatedValue:_,R)}}),S.add(A)}v.add(S)}),this.group.add(v),this._titleEls=h,this._detailEls=p},e.type="gauge",e})(Je),vJ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="itemStyle",t}return e.prototype.getInitialData=function(t,n){return Lu(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,B.color.neutral10]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:B.color.axisTick,width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:B.color.axisTickMinor,width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:B.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:B.color.neutral00,borderWidth:0,borderColor:B.color.theme[0]}},title:{show:!0,offsetCenter:[0,"20%"],color:B.color.secondary,fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:B.color.transparent,borderWidth:0,borderColor:B.color.neutral40,width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:B.color.primary,fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e})(nt);function hJ(r){r.registerChartView(cJ),r.registerSeriesModel(vJ)}var pJ=["itemStyle","opacity"],dJ=(function(r){N(e,r);function e(t,n){var a=r.call(this)||this,i=a,o=new pr,s=new Be;return i.setTextContent(s),a.setTextGuideLine(o),a.updateData(t,n,!0),a}return e.prototype.updateData=function(t,n,a){var i=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),f=s.get(pJ);f=f??1,a||Ln(i),i.useStyle(t.getItemVisual(n,"style")),i.style.lineJoin="round",a?(i.setShape({points:l.points}),i.style.opacity=0,st(i,{style:{opacity:f}},o,n)):Ve(i,{style:{opacity:f},shape:{points:l.points}},o,n),Ft(i,s),this._updateLabel(t,n),ut(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var a=this,i=this.getTextGuideLine(),o=a.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),f=u.label,c=t.getItemVisual(n,"style"),v=c.fill;Kt(o,Ht(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:c.opacity,defaultText:t.getName(n)},{normal:{align:f.textAlign,verticalAlign:f.verticalAlign}});var h=l.getModel("label"),p=h.get("color"),d=p==="inherit"?v:null;a.setTextConfig({local:!0,inside:!!f.inside,insideStroke:d,outsideFill:d});var g=f.linePoints;i.setShape({points:g}),a.textGuideLineConfig={anchor:g?new ue(g[0][0],g[0][1]):null},Ve(o,{style:{x:f.x,y:f.y}},s,n),o.attr({rotation:f.rotation,originX:f.x,originY:f.y,z2:10}),RS(a,OS(l),{stroke:v})},e})(xr),gJ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this._data,s=this.group;i.diff(o).add(function(l){var u=new dJ(i,l);i.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var f=o.getItemGraphicEl(u);f.updateData(i,l),s.add(f),i.setItemGraphicEl(l,f)}).remove(function(l){var u=o.getItemGraphicEl(l);ei(u,t,l)}).execute(),this._data=i},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e})(Je),yJ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t){r.prototype.init.apply(this,arguments),this.legendVisualProvider=new Pu(j(this.getData,this),j(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Lu(this,{coordDimensions:["value"],encodeDefaulter:Se(hS,this)})},e.prototype._defaultLabelLine=function(t){Ps(t,"labelLine",["show"]);var n=t.labelLine,a=t.emphasis.labelLine;n.show=n.show&&t.label.show,a.show=a.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),a=r.prototype.getDataParams.call(this,t),i=n.mapDimension("value"),o=n.getSum(i);return a.percent=o?+(n.get(i,t)/o*100).toFixed(2):0,a.$vars.push("percent"),a},e.type="series.funnel",e.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:B.color.neutral00,borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:B.color.primary}}},e})(nt);function mJ(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),a=[],i=e==="ascending",o=0,s=r.count();oRJ)return;var a=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);a.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:a.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!Xy(this,"mousemove"))){var e=this._model,t=e.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]),n=t.behavior;n==="jump"&&this._throttledDispatchExpand.debounceNextCall(e.get("axisExpandDebounce")),this._throttledDispatchExpand(n==="none"?null:{axisExpandWindow:t.axisExpandWindow,animation:n==="jump"?null:{duration:0}})}}};function Xy(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}var zJ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){r.prototype.init.apply(this,arguments),this.mergeOption({})},e.prototype.mergeOption=function(t){var n=this.option;t&&xe(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var a=t.get("parallelIndex");return a!=null&&n.getComponent("parallel",a)===this},e.prototype.setAxisExpand=function(t){M(["axisExpandable","axisExpandCenter","axisExpandCount","axisExpandWidth","axisExpandWindow"],function(n){t.hasOwnProperty(n)&&(this.option[n]=t[n])},this)},e.prototype._initDimensions=function(){var t=this.dimensions=[],n=this.parallelAxisIndex=[],a=Ze(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(i){return(i.get("parallelIndex")||0)===this.componentIndex},this);M(a,function(i){t.push("dim"+i.get("dim")),n.push(i.componentIndex)})},e.type="parallel",e.dependencies=["parallelAxis"],e.layoutMode="box",e.defaultOption={z:0,left:80,top:60,right:80,bottom:60,layout:"horizontal",axisExpandable:!1,axisExpandCenter:null,axisExpandCount:0,axisExpandWidth:50,axisExpandRate:17,axisExpandDebounce:50,axisExpandSlideTriggerArea:[-.15,.05,.4],axisExpandTriggerOn:"click",parallelAxisDefault:null},e})(Le),BJ=(function(r){N(e,r);function e(t,n,a,i,o){var s=r.call(this,t,n,a)||this;return s.type=i||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e})(Qn);function lo(r,e,t,n,a,i){r=r||0;var o=t[1]-t[0];if(a!=null&&(a=_l(a,[0,o])),i!=null&&(i=Math.max(i,a??0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=_l(s,[0,o]),a=i=_l(s,[a,i]),n=0}e[0]=_l(e[0],t),e[1]=_l(e[1],t);var l=qy(e,n);e[n]+=r;var u=a||0,f=t.slice();l.sign<0?f[0]+=u:f[1]-=u,e[n]=_l(e[n],f);var c;return c=qy(e,n),a!=null&&(c.sign!==l.sign||c.spani&&(e[1-n]=e[n]+c.sign*i),e}function qy(r,e){var t=r[e]-r[1-e];return{span:Math.abs(t),sign:t>0?-1:t<0?1:e?-1:1}}function _l(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var jy=M,TN=Math.min,CN=Math.max,LM=Math.floor,VJ=Math.ceil,PM=Pt,GJ=Math.PI,FJ=(function(){function r(e,t,n){this.type="parallel",this._axesMap=te(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var a=e.dimensions,i=e.parallelAxisIndex;jy(a,function(o,s){var l=i[s],u=t.getComponent("parallelAxis",l),f=this._axesMap.set(o,new BJ(o,Vd(u),[0,0],u.get("type"),l)),c=f.type==="category";f.onBand=c&&u.get("boundaryGap"),f.inverse=u.get("inverse"),u.axis=f,f.model=u,f.coordinateSystem=u.coordinateSystem=this},this)},r.prototype.update=function(e,t){this._updateAxesFromSeries(this._model,e)},r.prototype.containPoint=function(e){var t=this._makeLayoutInfo(),n=t.axisBase,a=t.layoutBase,i=t.pixelDimIndex,o=e[1-i],s=e[i];return o>=n&&o<=n+t.axisLength&&s>=a&&s<=a+t.layoutLength},r.prototype.getModel=function(){return this._model},r.prototype._updateAxesFromSeries=function(e,t){t.eachSeries(function(n){if(e.contains(n,t)){var a=n.getData();jy(this.dimensions,function(i){var o=this._axesMap.get(i);o.scale.unionExtentFromData(a,a.mapDimension(i)),au(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){var n=Zt(e,t).refContainer;this._rect=ft(e.getBoxLayoutParams(),n),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],a=["width","height"],i=e.get("layout"),o=i==="horizontal"?0:1,s=t[a[o]],l=[0,s],u=this.dimensions.length,f=th(e.get("axisExpandWidth"),l),c=th(e.get("axisExpandCount")||0,[0,u]),v=e.get("axisExpandable")&&u>3&&u>c&&c>1&&f>0&&s>0,h=e.get("axisExpandWindow"),p;if(h)p=th(h[1]-h[0],l),h[1]=h[0]+p;else{p=th(f*(c-1),l);var d=e.get("axisExpandCenter")||LM(u/2);h=[f*d-p/2],h[1]=h[0]+p}var g=(s-p)/(u-c);g<3&&(g=0);var y=[LM(PM(h[0]/f,1))+1,VJ(PM(h[1]/f,1))-1],m=g/f*h[0];return{layout:i,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[a[1-o]],axisExpandable:v,axisExpandWidth:f,axisCollapseWidth:g,axisExpandWindow:h,axisCount:u,winInnerIndices:y,axisExpandWindow0Pos:m}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,a=this._makeLayoutInfo(),i=a.layout;t.each(function(o){var s=[0,a.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),jy(n,function(o,s){var l=(a.axisExpandable?WJ:HJ)(s,a),u={horizontal:{x:l.position,y:a.axisLength},vertical:{x:0,y:l.position}},f={horizontal:GJ/2,vertical:0},c=[u[i].x+e.x,u[i].y+e.y],v=f[i],h=rr();ho(h,h,v),Aa(h,h,c),this._axesLayout[o]={position:c,rotation:v,transform:h,axisNameAvailableWidth:l.axisNameAvailableWidth,axisLabelShow:l.axisLabelShow,nameTruncateMaxWidth:l.nameTruncateMaxWidth,tickDirection:1,labelDirection:1}},this)},r.prototype.getAxis=function(e){return this._axesMap.get(e)},r.prototype.dataToPoint=function(e,t){return this.axisCoordToPoint(this._axesMap.get(t).dataToCoord(e),t)},r.prototype.eachActiveState=function(e,t,n,a){n==null&&(n=0),a==null&&(a=e.count());var i=this._axesMap,o=this.dimensions,s=[],l=[];M(o,function(g){s.push(e.mapDimension(g)),l.push(i.get(g).model)});for(var u=this.hasAxisBrushed(),f=n;fi*(1-c[0])?(u="jump",l=s-i*(1-c[2])):(l=s-i*c[1])>=0&&(l=s-i*(1-c[1]))<=0&&(l=0),l*=t.axisExpandWidth/f,l?lo(l,a,o,"all"):u="none";else{var h=a[1]-a[0],p=o[1]*s/h;a=[CN(0,p-h/2)],a[1]=TN(o[1],a[0]+h),a[0]=a[1]-h}return{axisExpandWindow:a,behavior:u}},r})();function th(r,e){return TN(CN(r,e[0]),e[1])}function HJ(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function WJ(r,e){var t=e.layoutLength,n=e.axisExpandWidth,a=e.axisCount,i=e.axisCollapseWidth,o=e.winInnerIndices,s,l=i,u=!1,f;return r=0;a--)wn(n[a])},e.prototype.getActiveState=function(t){var n=this.activeIntervals;if(!n.length)return"normal";if(t==null||isNaN(+t))return"inactive";if(n.length===1){var a=n[0];if(a[0]<=t&&t<=a[1])return"active"}else for(var i=0,o=n.length;iXJ}function PN(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function kN(r,e,t,n){var a=new oe;return a.add(new Ce({name:"main",style:vb(t),silent:!0,draggable:!0,cursor:"move",drift:Se(RM,r,e,a,["n","s","w","e"]),ondragend:Se(Vs,e,{isEnd:!0})})),M(n,function(i){a.add(new Ce({name:i.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:Se(RM,r,e,a,i),ondragend:Se(Vs,e,{isEnd:!0})}))}),a}function EN(r,e,t,n){var a=n.brushStyle.lineWidth||0,i=uu(a,qJ),o=t[0][0],s=t[1][0],l=o-a/2,u=s-a/2,f=t[0][1],c=t[1][1],v=f-i+a/2,h=c-i+a/2,p=f-o,d=c-s,g=p+a,y=d+a;Ha(r,e,"main",o,s,p,d),n.transformable&&(Ha(r,e,"w",l,u,i,y),Ha(r,e,"e",v,u,i,y),Ha(r,e,"n",l,u,g,i),Ha(r,e,"s",l,h,g,i),Ha(r,e,"nw",l,u,i,i),Ha(r,e,"ne",v,u,i,i),Ha(r,e,"sw",l,h,i,i),Ha(r,e,"se",v,h,i,i))}function O_(r,e){var t=e.__brushOption,n=t.transformable,a=e.childAt(0);a.useStyle(vb(t)),a.attr({silent:!n,cursor:n?"move":"default"}),M([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(i){var o=e.childOfName(i.join("")),s=i.length===1?N_(r,i[0]):tQ(r,i);o&&o.attr({silent:!n,invisible:!n,cursor:n?KJ[s]+"-resize":null})})}function Ha(r,e,t,n,a,i,o){var s=e.childOfName(t);s&&s.setShape(nQ(hb(r,e,[[n,a],[n+i,a+o]])))}function vb(r){return fe({strokeNoScale:!0},r.brushStyle)}function RN(r,e,t,n){var a=[xc(r,t),xc(e,n)],i=[uu(r,t),uu(e,n)];return[[a[0],i[0]],[a[1],i[1]]]}function eQ(r){return Ss(r.group)}function N_(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},a=Ld(t[e],eQ(r));return n[a]}function tQ(r,e){var t=[N_(r,e[0]),N_(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function RM(r,e,t,n,a,i){var o=t.__brushOption,s=r.toRectRange(o.range),l=ON(e,a,i);M(n,function(u){var f=jJ[u];s[f[0]][f[1]]+=l[f[0]]}),o.range=r.fromRectRange(RN(s[0][0],s[1][0],s[0][1],s[1][1])),ub(e,t),Vs(e,{isEnd:!1})}function rQ(r,e,t,n){var a=e.__brushOption.range,i=ON(r,t,n);M(a,function(o){o[0]+=i[0],o[1]+=i[1]}),ub(r,e),Vs(r,{isEnd:!1})}function ON(r,e,t){var n=r.group,a=n.transformCoordToLocal(e,t),i=n.transformCoordToLocal(0,0);return[a[0]-i[0],a[1]-i[1]]}function hb(r,e,t){var n=LN(r,e);return n&&n!==Bs?n.clipPath(t,r._transform):se(t)}function nQ(r){var e=xc(r[0][0],r[1][0]),t=xc(r[0][1],r[1][1]),n=uu(r[0][0],r[1][0]),a=uu(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:a-t}}function aQ(r,e,t){if(!(!r._brushType||oQ(r,e.offsetX,e.offsetY))){var n=r._zr,a=r._covers,i=cb(r,e,t);if(!r._dragging)for(var o=0;on.getWidth()||t<0||t>n.getHeight()}var Xd={lineX:zM(0),lineY:zM(1),rect:{createCover:function(r,e){function t(n){return n}return kN({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=PN(r);return RN(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){EN(r,e,t,n)},updateCommon:O_,contain:B_},polygon:{createCover:function(r,e){var t=new oe;return t.add(new pr({name:"main",style:vb(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new xr({name:"main",draggable:!0,drift:Se(rQ,r,e),ondragend:Se(Vs,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:hb(r,e,t)})},updateCommon:O_,contain:B_}};function zM(r){return{createCover:function(e,t){return kN({toRectRange:function(n){var a=[n,[0,100]];return r&&a.reverse(),a},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=PN(e),n=xc(t[0][r],t[1][r]),a=uu(t[0][r],t[1][r]);return[n,a]},updateCoverShape:function(e,t,n,a){var i,o=LN(e,t);if(o!==Bs&&o.getLinearBrushOtherExtent)i=o.getLinearBrushOtherExtent(r);else{var s=e._zr;i=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,i];r&&l.reverse(),EN(e,t,l,a)},updateCommon:O_,contain:B_}}function zN(r){return r=pb(r),function(e){return xk(e,r)}}function BN(r,e){return r=pb(r),function(t){var n=e??t,a=n?r.width:r.height,i=n?r.x:r.y;return[i,i+(a||0)]}}function VN(r,e,t){var n=pb(r);return function(a,i){return n.contain(i[0],i[1])&&!$O(a,e,t)}}function pb(r){return ve.create(r)}var sQ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){r.prototype.init.apply(this,arguments),(this._brushController=new lb(n.getZr())).on("brush",j(this._onBrush,this))},e.prototype.render=function(t,n,a,i){if(!lQ(t,n,i)){this.axisModel=t,this.api=a,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new oe,this.group.add(this._axisGroup),!!t.get("show")){var s=fQ(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),f=u.width,c=t.axis.dim,v=l.getAxisLayout(c),h=H({strokeContainThreshold:f},v),p=new Nr(t,a,h);p.build(),this._axisGroup.add(p.group),this._refreshBrushController(h,u,t,s,f,a),Oc(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,a,i,o,s){var l=a.axis.getExtent(),u=l[1]-l[0],f=Math.min(30,Math.abs(u)*.1),c=ve.create({x:l[0],y:-o/2,width:u,height:o});c.x-=f,c.width+=2*f,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:zN(c),isTargetByCursor:VN(c,s,i),getLinearBrushOtherExtent:BN(c,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(uQ(a))},e.prototype._onBrush=function(t){var n=t.areas,a=this.axisModel,i=a.axis,o=$(n,function(s){return[i.coordToData(s.range[0],!0),i.coordToData(s.range[1],!0)]});(!a.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:a.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e})(lt);function lQ(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function uQ(r){var e=r.axis;return $(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function fQ(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}var cQ={type:"axisAreaSelect",event:"axisAreaSelected"};function vQ(r){r.registerAction(cQ,function(e,t){t.eachComponent({mainType:"parallelAxis",query:e},function(n){n.axis.model.setActiveIntervals(e.intervals)})}),r.registerAction("parallelAxisExpand",function(e,t){t.eachComponent({mainType:"parallel",query:e},function(n){n.setAxisExpand(e)})})}var hQ={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function GN(r){r.registerComponentView(OJ),r.registerComponentModel(zJ),r.registerCoordinateSystem("parallel",ZJ),r.registerPreprocessor(PJ),r.registerComponentModel(E_),r.registerComponentView(sQ),su(r,"parallel",E_,hQ),vQ(r)}function pQ(r){we(GN),r.registerChartView(wJ),r.registerSeriesModel(AJ),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,LJ)}var dQ=(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})(),gQ=(function(r){N(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new dQ},e.prototype.buildPath=function(t,n){var a=n.extent;t.moveTo(n.x1,n.y1),t.bezierCurveTo(n.cpx1,n.cpy1,n.cpx2,n.cpy2,n.x2,n.y2),n.orient==="vertical"?(t.lineTo(n.x2+a,n.y2),t.bezierCurveTo(n.cpx2+a,n.cpy2,n.cpx1+a,n.cpy1,n.x1+a,n.y1)):(t.lineTo(n.x2,n.y2+a),t.bezierCurveTo(n.cpx2,n.cpy2+a,n.cpx1,n.cpy1+a,n.x1,n.y1+a)),t.closePath()},e.prototype.highlight=function(){si(this)},e.prototype.downplay=function(){li(this)},e})(Me),yQ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new oe,t._focusAdjacencyDisabled=!1,t}return e.prototype.init=function(t,n){this._controller=new Ks(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,a){var i=this,o=t.getGraph(),s=this._mainGroup,l=t.layoutInfo,u=l.width,f=l.height,c=t.getData(),v=t.getData("edge"),h=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,this._updateViewCoordSys(t,a),ZO(t,a,s,this._controller,this._controllerHost,null),o.eachEdge(function(p){var d=new gQ,g=ge(d);g.dataIndex=p.dataIndex,g.seriesIndex=t.seriesIndex,g.dataType="edge";var y=p.getModel(),m=y.getModel("lineStyle"),_=m.get("curveness"),S=p.node1.getLayout(),b=p.node1.getModel(),x=b.get("localX"),w=b.get("localY"),T=p.node2.getLayout(),C=p.node2.getModel(),A=C.get("localX"),D=C.get("localY"),L=p.getLayout(),I,P,E,k,O,R,z,V;d.shape.extent=Math.max(1,L.dy),d.shape.orient=h,h==="vertical"?(I=(x!=null?x*u:S.x)+L.sy,P=(w!=null?w*f:S.y)+S.dy,E=(A!=null?A*u:T.x)+L.ty,k=D!=null?D*f:T.y,O=I,R=P*(1-_)+k*_,z=E,V=P*_+k*(1-_)):(I=(x!=null?x*u:S.x)+S.dx,P=(w!=null?w*f:S.y)+L.sy,E=A!=null?A*u:T.x,k=(D!=null?D*f:T.y)+L.ty,O=I*(1-_)+E*_,R=P,z=I*_+E*(1-_),V=k),d.setShape({x1:I,y1:P,x2:E,y2:k,cpx1:O,cpy1:R,cpx2:z,cpy2:V}),d.useStyle(m.getItemStyle()),BM(d.style,h,p);var G=""+y.get("value"),F=Ht(y,"edgeLabel");Kt(d,F,{labelFetcher:{getFormattedLabel:function(he,Oe,We,pe,ae,_e){return t.getFormattedLabel(he,Oe,"edge",pe,nn(ae,F.normal&&F.normal.get("formatter"),G),_e)}},labelDataIndex:p.dataIndex,defaultText:G}),d.setTextConfig({position:"inside"});var U=y.getModel("emphasis");Ft(d,y,"lineStyle",function(he){var Oe=he.getItemStyle();return BM(Oe,h,p),Oe}),s.add(d),v.setItemGraphicEl(p.dataIndex,d);var J=U.get("focus");ut(d,J==="adjacency"?p.getAdjacentDataIndices():J==="trajectory"?p.getTrajectoryDataIndices():J,U.get("blurScope"),U.get("disabled"))}),o.eachNode(function(p){var d=p.getLayout(),g=p.getModel(),y=g.get("localX"),m=g.get("localY"),_=g.getModel("emphasis"),S=g.get(["itemStyle","borderRadius"])||0,b=new Ce({shape:{x:y!=null?y*u:d.x,y:m!=null?m*f:d.y,width:d.dx,height:d.dy,r:S},style:g.getModel("itemStyle").getItemStyle(),z2:10});Kt(b,Ht(g),{labelFetcher:{getFormattedLabel:function(w,T){return t.getFormattedLabel(w,T,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),b.disableLabelAnimation=!0,b.setStyle("fill",p.getVisual("color")),b.setStyle("decal",p.getVisual("style").decal),Ft(b,g),s.add(b),c.setItemGraphicEl(p.dataIndex,b),ge(b).dataType="node";var x=_.get("focus");ut(b,x==="adjacency"?p.getAdjacentDataIndices():x==="trajectory"?p.getTrajectoryDataIndices():x,_.get("blurScope"),_.get("disabled"))}),c.eachItemGraphicEl(function(p,d){var g=c.getItemModel(d);g.get("draggable")&&(p.drift=function(y,m){i._focusAdjacencyDisabled=!0,this.shape.x+=y,this.shape.y+=m,this.dirty(),a.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:c.getRawIndex(d),localX:this.shape.x/u,localY:this.shape.y/f})},p.ondragend=function(){i._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(mQ(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._updateViewCoordSys=function(t,n){var a=t.layoutInfo,i=a.width,o=a.height,s=t.coordinateSystem=new Js(null,{api:n,ecModel:t.ecModel});s.zoomLimit=t.get("scaleLimit"),s.setBoundingRect(0,0,i,o),s.setCenter(t.get("center")),s.setZoom(t.get("zoom")),this._controllerHost.target.attr({x:s.x,y:s.y,scaleX:s.scaleX,scaleY:s.scaleY})},e.type="sankey",e})(Je);function BM(r,e,t){switch(r.fill){case"source":r.fill=t.node1.getVisual("color"),r.decal=t.node1.getVisual("style").decal;break;case"target":r.fill=t.node2.getVisual("color"),r.decal=t.node2.getVisual("style").decal;break;case"gradient":var n=t.node1.getVisual("color"),a=t.node2.getVisual("color");q(n)&&q(a)&&(r.fill=new bu(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:a,offset:1}]))}}function mQ(r,e,t){var n=new Ce({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return st(n,{shape:{width:r.width+20}},e,t),n}var _Q=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){var a=t.edges||t.links||[],i=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l=0&&(s[o[l].depth]=new ke(o[l],this,n));var u=sb(i,a,this,!0,f);return u.data;function f(c,v){c.wrapMethod("getItemModel",function(h,p){var d=h.parentModel,g=d.getData().getItemLayout(p);if(g){var y=g.depth,m=d.levelModels[y];m&&(h.parentModel=m)}return h}),v.wrapMethod("getItemModel",function(h,p){var d=h.parentModel,g=d.getGraph().getEdgeByIndex(p),y=g.node1.getLayout();if(y){var m=y.depth,_=d.levelModels[m];_&&(h.parentModel=_)}return h})}},e.prototype.setNodePosition=function(t,n){var a=this.option.data||this.option.nodes,i=a[t];i.localX=n[0],i.localY=n[1]},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,a){function i(h){return isNaN(h)||h==null}if(a==="edge"){var o=this.getDataParams(t,a),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ot("nameValue",{name:u,value:l,noValue:i(l)})}else{var f=this.getGraph().getNodeByIndex(t),c=f.getLayout().value,v=this.getDataParams(t,a).data.name;return Ot("nameValue",{name:v!=null?v+"":null,value:c,noValue:i(c)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var a=r.prototype.getDataParams.call(this,t,n);if(a.value==null&&n==="node"){var i=this.getGraph().getNodeByIndex(t),o=i.getLayout().value;a.value=o}return a},e.type="series.sankey",e.layoutMode="box",e.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:B.color.neutral50,opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:B.color.primary}},animationEasing:"linear",animationDuration:1e3},e})(nt);function SQ(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),a=t.get("nodeGap"),i=Zt(t,e).refContainer,o=ft(t.getBoxLayoutParams(),i);t.layoutInfo=o;var s=o.width,l=o.height,u=t.getGraph(),f=u.nodes,c=u.edges;xQ(f);var v=Ze(f,function(g){return g.getLayout().value===0}),h=v.length!==0?0:t.get("layoutIterations"),p=t.get("orient"),d=t.get("nodeAlign");bQ(f,c,n,a,s,l,h,p,d)})}function bQ(r,e,t,n,a,i,o,s,l){wQ(r,e,t,a,i,s,l),MQ(r,e,i,a,n,o,s),NQ(r,s)}function xQ(r){M(r,function(e){var t=ro(e.outEdges,zp),n=ro(e.inEdges,zp),a=e.getValue()||0,i=Math.max(t,n,a);e.setLayout({value:i},!0)})}function wQ(r,e,t,n,a,i,o){for(var s=[],l=[],u=[],f=[],c=0,v=0;v=0;y&&g.depth>h&&(h=g.depth),d.setLayout({depth:y?g.depth:c},!0),i==="vertical"?d.setLayout({dy:t},!0):d.setLayout({dx:t},!0);for(var m=0;mc-1?h:c-1;o&&o!=="left"&&TQ(r,o,i,w);var T=i==="vertical"?(a-t)/w:(n-t)/w;AQ(r,T,i)}function FN(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function TQ(r,e,t,n){if(e==="right"){for(var a=[],i=r,o=0;i.length;){for(var s=0;s0;i--)l*=.99,LQ(s,l,o),Ky(s,a,t,n,o),OQ(s,l,o),Ky(s,a,t,n,o)}function DQ(r,e){var t=[],n=e==="vertical"?"y":"x",a=w0(r,function(i){return i.getLayout()[n]});return a.keys.sort(function(i,o){return i-o}),M(a.keys,function(i){t.push(a.buckets.get(i))}),t}function IQ(r,e,t,n,a,i){var o=1/0;M(r,function(s){var l=s.length,u=0;M(s,function(c){u+=c.getLayout().value});var f=i==="vertical"?(n-(l-1)*a)/u:(t-(l-1)*a)/u;f0&&(s=l.getLayout()[i]+u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]+l.getLayout()[v]+e;var p=a==="vertical"?n:t;if(u=f-e-p,u>0){s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),f=s;for(var h=c-2;h>=0;--h)l=o[h],u=l.getLayout()[i]+l.getLayout()[v]+e-f,u>0&&(s=l.getLayout()[i]-u,a==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),f=l.getLayout()[i]}})}function LQ(r,e,t){M(r.slice().reverse(),function(n){M(n,function(a){if(a.outEdges.length){var i=ro(a.outEdges,PQ,t)/ro(a.outEdges,zp);if(isNaN(i)){var o=a.outEdges.length;i=o?ro(a.outEdges,kQ,t)/o:0}if(t==="vertical"){var s=a.getLayout().x+(i-uo(a,t))*e;a.setLayout({x:s},!0)}else{var l=a.getLayout().y+(i-uo(a,t))*e;a.setLayout({y:l},!0)}}})})}function PQ(r,e){return uo(r.node2,e)*r.getValue()}function kQ(r,e){return uo(r.node2,e)}function EQ(r,e){return uo(r.node1,e)*r.getValue()}function RQ(r,e){return uo(r.node1,e)}function uo(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function zp(r){return r.getValue()}function ro(r,e,t){for(var n=0,a=r.length,i=-1;++io&&(o=l)}),M(n,function(s){var l=new jt({type:"color",mappingMethod:"linear",dataExtent:[i,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),f=s.getModel().get(["itemStyle","color"]);f!=null?(s.setVisual("color",f),s.setVisual("style",{fill:f})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}a.length&&M(a,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function BQ(r){r.registerChartView(yQ),r.registerSeriesModel(_Q),r.registerLayout(SQ),r.registerVisual(zQ),r.registerAction({type:"dragNode",event:"dragnode",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(n){n.setNodePosition(e.dataIndex,[e.localX,e.localY])})}),r.registerAction({type:"sankeyRoam",event:"sankeyRoam",update:"none"},function(e,t,n){t.eachComponent({mainType:"series",subType:"sankey",query:e},function(a){var i=a.coordinateSystem,o=$d(i,e,a.get("scaleLimit"));a.setCenter(o.center),a.setZoom(o.zoom)})})}var HN=(function(){function r(){}return r.prototype._hasEncodeRule=function(e){var t=this.getEncode();return t&&t.get(e)!=null},r.prototype.getInitialData=function(e,t){var n,a=t.getComponent("xAxis",this.get("xAxisIndex")),i=t.getComponent("yAxis",this.get("yAxisIndex")),o=a.get("type"),s=i.get("type"),l;o==="category"?(e.layout="horizontal",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],f=e.layout==="horizontal"?0:1,c=this._baseAxisDim=u[f],v=u[1-f],h=[a,i],p=h[f].get("type"),d=h[1-f].get("type"),g=e.data;if(g&&l){var y=[];M(g,function(S,b){var x;W(S)?(x=S.slice(),S.unshift(b)):W(S.value)?(x=H({},S),x.value=x.value.slice(),S.value.unshift(b)):x=S,y.push(x)}),e.data=y}var m=this.defaultValueDimensions,_=[{name:c,type:Sp(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:v,type:Sp(d),dimsDef:m.slice()}];return Lu(this,{coordDimensions:_,dimensionsCount:m.length+1,encodeDefaulter:Se(rE,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r})(),WN=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:B.color.neutral00,borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:B.color.shadow}},animationDuration:800},e})(nt);zt(WN,HN,!0);var VQ=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;i.diff(s).add(function(u){if(i.hasValue(u)){var f=i.getItemLayout(u),c=VM(f,i,u,l,!0);i.setItemGraphicEl(u,c),o.add(c)}}).update(function(u,f){var c=s.getItemGraphicEl(f);if(!i.hasValue(u)){o.remove(c);return}var v=i.getItemLayout(u);c?(Ln(c),$N(v,c,i,u)):c=VM(v,i,u,l),o.add(c),i.setItemGraphicEl(u,c)}).remove(function(u){var f=s.getItemGraphicEl(u);f&&o.remove(f)}).execute(),this._data=i},e.prototype.remove=function(t){var n=this.group,a=this._data;this._data=null,a&&a.eachItemGraphicEl(function(i){i&&n.remove(i)})},e.type="boxplot",e})(Je),GQ=(function(){function r(){}return r})(),FQ=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new GQ},e.prototype.buildPath=function(t,n){var a=n.points,i=0;for(t.moveTo(a[i][0],a[i][1]),i++;i<4;i++)t.lineTo(a[i][0],a[i][1]);for(t.closePath();id){var S=[y,_];n.push(S)}}}return{boxData:t,outliers:n}}var XQ={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==nr){var n="";He(n)}var a=YQ(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:a.boxData},{data:a.outliers}]}};function qQ(r){r.registerSeriesModel(WN),r.registerChartView(VQ),r.registerLayout(WQ),r.registerTransform(XQ)}var jQ=["itemStyle","borderColor"],KQ=["itemStyle","borderColor0"],JQ=["itemStyle","borderColorDoji"],QQ=["itemStyle","color"],eee=["itemStyle","color0"];function db(r,e){return e.get(r>0?QQ:eee)}function gb(r,e){return e.get(r===0?JQ:r>0?jQ:KQ)}var tee={seriesType:"candlestick",plan:Cu(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,a){for(var i;(i=n.next())!=null;){var o=a.getItemModel(i),s=a.getItemLayout(i).sign,l=o.getItemStyle();l.fill=db(s,o),l.stroke=gb(s,o)||l.fill;var u=a.ensureUniqueItemVisual(i,"style");H(u,l)}}}}}},ree=["color","borderColor"],nee=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,a){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,a,i){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){po(this._progressiveEls||this.group,t)},e.prototype._updateDrawMode=function(t){var n=t.pipelineContext.large;(this._isLargeDraw==null||n!==this._isLargeDraw)&&(this._isLargeDraw=n,this._clear())},e.prototype._renderNormal=function(t){var n=t.getData(),a=this._data,i=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||i.removeAll(),n.diff(a).add(function(f){if(n.hasValue(f)){var c=n.getItemLayout(f);if(s&&GM(u,c))return;var v=Jy(c,f,!0);st(v,{shape:{points:c.ends}},t,f),Qy(v,n,f,o),i.add(v),n.setItemGraphicEl(f,v)}}).update(function(f,c){var v=a.getItemGraphicEl(c);if(!n.hasValue(f)){i.remove(v);return}var h=n.getItemLayout(f);if(s&&GM(u,h)){i.remove(v);return}v?(Ve(v,{shape:{points:h.ends}},t,f),Ln(v)):v=Jy(h),Qy(v,n,f,o),i.add(v),n.setItemGraphicEl(f,v)}).remove(function(f){var c=a.getItemGraphicEl(f);c&&i.remove(c)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),FM(t,this.group);var n=t.get("clip",!0)?Zc(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var a=n.getData(),i=a.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=a.getItemLayout(o),l=Jy(s);Qy(l,a,o,i),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){FM(n,this.group,this._progressiveEls,!0)},e.prototype.remove=function(t){this._clear()},e.prototype._clear=function(){this.group.removeAll(),this._data=null},e.type="candlestick",e})(Je),aee=(function(){function r(){}return r})(),iee=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new aee},e.prototype.buildPath=function(t,n){var a=n.points;this.__simpleBox?(t.moveTo(a[4][0],a[4][1]),t.lineTo(a[6][0],a[6][1])):(t.moveTo(a[0][0],a[0][1]),t.lineTo(a[1][0],a[1][1]),t.lineTo(a[2][0],a[2][1]),t.lineTo(a[3][0],a[3][1]),t.closePath(),t.moveTo(a[4][0],a[4][1]),t.lineTo(a[5][0],a[5][1]),t.moveTo(a[6][0],a[6][1]),t.lineTo(a[7][0],a[7][1]))},e})(Me);function Jy(r,e,t){var n=r.ends;return new iee({shape:{points:t?oee(n,r):n},z2:100})}function GM(r,e){for(var t=!0,n=0;nb?D[i]:A[i],ends:P,brushRect:z(x,w,_)})}function O(G,F){var U=[];return U[a]=F,U[i]=G,isNaN(F)||isNaN(G)?[NaN,NaN]:e.dataToPoint(U)}function R(G,F,U){var J=F.slice(),he=F.slice();J[a]=Dh(J[a]+n/2,1,!1),he[a]=Dh(he[a]-n/2,1,!0),U?G.push(J,he):G.push(he,J)}function z(G,F,U){var J=O(G,U),he=O(F,U);return J[a]-=n/2,he[a]-=n/2,{x:J[0],y:J[1],width:n,height:he[1]-J[1]}}function V(G){return G[a]=Dh(G[a],1),G}}function p(d,g){for(var y=ya(d.count*4),m=0,_,S=[],b=[],x,w=g.getStore(),T=!!r.get(["itemStyle","borderColorDoji"]);(x=d.next())!=null;){var C=w.get(s,x),A=w.get(u,x),D=w.get(f,x),L=w.get(c,x),I=w.get(v,x);if(isNaN(C)||isNaN(L)||isNaN(I)){y[m++]=NaN,m+=3;continue}y[m++]=HM(w,x,A,D,f,T),S[a]=C,S[i]=L,_=e.dataToPoint(S,null,b),y[m++]=_?_[0]:NaN,y[m++]=_?_[1]:NaN,S[i]=I,_=e.dataToPoint(S,null,b),y[m++]=_?_[1]:NaN}g.setLayout("largePoints",y)}}};function HM(r,e,t,n,a,i){var o;return t>n?o=-1:t0?r.get(a,e-1)<=n?1:-1:1,o}function fee(r,e){var t=r.getBaseAxis(),n,a=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),i=X(re(r.get("barMaxWidth"),a),a),o=X(re(r.get("barMinWidth"),1),a),s=r.get("barWidth");return s!=null?X(s,a):Math.max(Math.min(a/2,i),o)}function cee(r){r.registerChartView(nee),r.registerSeriesModel(ZN),r.registerPreprocessor(lee),r.registerVisual(tee),r.registerLayout(uee)}function WM(r,e){var t=e.rippleEffectColor||e.color;r.eachChild(function(n){n.attr({z:e.z,zlevel:e.zlevel,style:{stroke:e.brushType==="stroke"?t:null,fill:e.brushType==="fill"?t:null}})})}var vee=(function(r){N(e,r);function e(t,n){var a=r.call(this)||this,i=new Wc(t,n),o=new oe;return a.add(i),a.add(o),a.updateData(t,n),a}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,a=t.color,i=t.rippleNumber,o=this.childAt(1),s=0;s0&&(s=this._getLineLength(i)/f*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){i.stopAnimation();var v=void 0;ie(c)?v=c(a):v=c,i.__t>0&&(v=-s*i.__t),this._animateSymbol(i,s,v,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,a,i,o){if(n>0){t.__t=0;var s=this,l=t.animate("",i).when(o?n*2:n,{__t:o?2:1}).delay(a).during(function(){s._updateSymbolPosition(t)});i||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return zi(t.__p1,t.__cp1)+zi(t.__cp1,t.__p2)},e.prototype._updateAnimationPoints=function(t,n){t.__p1=n[0],t.__p2=n[1],t.__cp1=n[2]||[(n[0][0]+n[1][0])/2,(n[0][1]+n[1][1])/2]},e.prototype.updateData=function(t,n,a){this.childAt(0).updateData(t,n,a),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,a=t.__p2,i=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=tr,f=l0;s[0]=u(n[0],i[0],a[0],o),s[1]=u(n[1],i[1],a[1],o);var c=t.__t<1?f(n[0],i[0],a[0],o):f(a[0],i[0],n[0],1-o),v=t.__t<1?f(n[1],i[1],a[1],o):f(a[1],i[1],n[1],1-o);t.rotation=-Math.atan2(v,c)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT=0&&!(i[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;ln);l++);l=Math.min(l-1,o-2)}var f=(n-i[l])/(i[l+1]-i[l]),c=a[l],v=a[l+1];t.x=c[0]*(1-f)+f*v[0],t.y=c[1]*(1-f)+f*v[1];var h=t.__t<1?v[0]-c[0]:c[0]-v[0],p=t.__t<1?v[1]-c[1]:c[1]-v[1];t.rotation=-Math.atan2(p,h)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e})(UN),yee=(function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r})(),mee=(function(r){N(e,r);function e(t){var n=r.call(this,t)||this;return n._off=0,n.hoverDataIdx=-1,n}return e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.getDefaultStyle=function(){return{stroke:B.color.neutral99,fill:null}},e.prototype.getDefaultShape=function(){return new yee},e.prototype.buildPath=function(t,n){var a=n.segs,i=n.curveness,o;if(n.polyline)for(o=this._off;o0){t.moveTo(a[o++],a[o++]);for(var l=1;l0){var h=(u+c)/2-(f-v)*i,p=(f+v)/2-(c-u)*i;t.quadraticCurveTo(h,p,c,v)}else t.lineTo(c,v)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var a=this.shape,i=a.segs,o=a.curveness,s=this.style.lineWidth;if(a.polyline)for(var l=0,u=0;u0)for(var c=i[u++],v=i[u++],h=1;h0){var g=(c+p)/2-(v-d)*o,y=(v+d)/2-(p-c)*o;if(XP(c,v,g,y,p,d,s,t,n))return l}else if(Ei(c,v,p,d,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var a=this.transformCoordToLocal(t,n),i=this.getBoundingRect();if(t=a[0],n=a[1],i.contain(t,n)){var o=this.hoverDataIdx=this.findDataIndex(t,n);return o>=0}return this.hoverDataIdx=-1,!1},e.prototype.getBoundingRect=function(){var t=this._rect;if(!t){for(var n=this.shape,a=n.segs,i=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r})(),XN={seriesType:"lines",plan:Cu(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(a,i){var o=[];if(n){var s=void 0,l=a.end-a.start;if(t){for(var u=0,f=a.start;f0&&(f||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(i);var c=t.get("clip",!0)&&Zc(t.coordinateSystem,!1,t);c?this.group.setClipPath(c):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,a){var i=t.getData(),o=this._updateLineDraw(i,t);o.incrementalPrepareUpdate(i),this._clearLayer(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,a){this._lineDraw.incrementalUpdate(t,n.getData()),this._finished=t.end===n.getData().count()},e.prototype.eachRendered=function(t){this._lineDraw&&this._lineDraw.eachRendered(t)},e.prototype.updateTransform=function(t,n,a){var i=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=XN.reset(t,n,a);s.progress&&s.progress({start:0,end:i.count(),count:i.count()},i),this._lineDraw.updateLayout(),this._clearLayer(a)},e.prototype._updateLineDraw=function(t,n){var a=this._lineDraw,i=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!a||i!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(a&&a.remove(),a=this._lineDraw=l?new _ee:new ob(o?i?gee:YN:i?UN:ib),this._hasEffet=i,this._isPolyline=o,this._isLargeDraw=l),this.group.add(a.group),a},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),a=n.painter.getType()==="svg";!a&&this._lastZlevel!=null&&n.painter.getLayer(this._lastZlevel).clear(!0)},e.prototype.remove=function(t,n){this._lineDraw&&this._lineDraw.remove(),this._lineDraw=null,this._clearLayer(n)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.type="lines",e})(Je),bee=typeof Uint32Array>"u"?Array:Uint32Array,xee=typeof Float64Array>"u"?Array:Float64Array;function $M(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=$(e,function(t){var n=[t[0].coord,t[1].coord],a={coords:n};return t[0].name&&(a.fromName=t[0].name),t[1].name&&(a.toName=t[1].name),P1([a,t[0],t[1]])}))}var wee=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.visualStyleAccessPath="lineStyle",t.visualDrawType="stroke",t}return e.prototype.init=function(t){t.data=t.data||[],$M(t);var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count)),r.prototype.init.apply(this,arguments)},e.prototype.mergeOption=function(t){if($M(t),t.data){var n=this._processFlatCoordsArray(t.data);this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset,n.flatCoords&&(t.data=new Float32Array(n.count))}r.prototype.mergeOption.apply(this,arguments)},e.prototype.appendData=function(t){var n=this._processFlatCoordsArray(t.data);n.flatCoords&&(this._flatCoords?(this._flatCoords=jf(this._flatCoords,n.flatCoords),this._flatCoordsOffset=jf(this._flatCoordsOffset,n.flatCoordsOffset)):(this._flatCoords=n.flatCoords,this._flatCoordsOffset=n.flatCoordsOffset),t.data=new Float32Array(n.count)),this.getRawData().appendData(t.data)},e.prototype._getCoordsFromItemModel=function(t){var n=this.getData().getItemModel(t),a=n.option instanceof Array?n.option:n.getShallow("coords");return a},e.prototype.getLineCoordsCount=function(t){return this._flatCoordsOffset?this._flatCoordsOffset[t*2+1]:this._getCoordsFromItemModel(t).length},e.prototype.getLineCoords=function(t,n){if(this._flatCoordsOffset){for(var a=this._flatCoordsOffset[t*2],i=this._flatCoordsOffset[t*2+1],o=0;o ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t??(this.option.large?1e4:this.get("progressive"))},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t??(this.option.large?2e4:this.get("progressiveThreshold"))},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),n=t.get("trailLength");return this.getData().count()>this.getProgressiveThreshold()?this.id:t.get("show")&&n>0?n+"":""},e.type="series.lines",e.dependencies=["grid","polar","geo","calendar"],e.defaultOption={coordinateSystem:"geo",z:2,legendHoverLink:!0,xAxisIndex:0,yAxisIndex:0,symbol:["none","none"],symbolSize:[10,10],geoIndex:0,effect:{show:!1,period:4,constantSpeed:0,symbol:"circle",symbolSize:3,loop:!0,trailLength:.2},large:!1,largeThreshold:2e3,polyline:!1,clip:!0,label:{show:!1,position:"end"},lineStyle:{opacity:.5}},e})(nt);function rh(r){return r instanceof Array||(r=[r,r]),r}var Tee={seriesType:"lines",reset:function(r){var e=rh(r.get("symbol")),t=rh(r.get("symbolSize")),n=r.getData();n.setVisual("fromSymbol",e&&e[0]),n.setVisual("toSymbol",e&&e[1]),n.setVisual("fromSymbolSize",t&&t[0]),n.setVisual("toSymbolSize",t&&t[1]);function a(i,o){var s=i.getItemModel(o),l=rh(s.getShallow("symbol",!0)),u=rh(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:n.hasItemOption?a:null}}};function Cee(r){r.registerChartView(See),r.registerSeriesModel(wee),r.registerLayout(XN),r.registerVisual(Tee)}var Aee=256,Mee=(function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=Un.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,a,i,o){var s=this._getBrush(),l=this._getGradient(i,"inRange"),u=this._getGradient(i,"outOfRange"),f=this.pointSize+this.blurSize,c=this.canvas,v=c.getContext("2d"),h=e.length;c.width=t,c.height=n;for(var p=0;p0){var L=o(_)?l:u;_>0&&(_=_*A+T),b[x++]=L[D],b[x++]=L[D+1],b[x++]=L[D+2],b[x++]=L[D+3]*_*256}else x+=4}return v.putImageData(S,0,0),c},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=Un.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var a=e.getContext("2d");return a.clearRect(0,0,n,n),a.shadowOffsetX=n,a.shadowBlur=this.blurSize,a.shadowColor=B.color.neutral99,a.beginPath(),a.arc(-t,t,this.pointSize,0,Math.PI*2,!0),a.closePath(),a.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,a=n[t]||(n[t]=new Uint8ClampedArray(256*4)),i=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,i),a[o++]=i[0],a[o++]=i[1],a[o++]=i[2],a[o++]=i[3];return a},r})();function Dee(r,e,t){var n=r[1]-r[0];e=$(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var a=e.length,i=0;return function(o){var s;for(s=i;s=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){i=s;break}}return s>=0&&s=e[0]&&n<=e[1]}}function ZM(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var Lee=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(i=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"||o.type==="matrix"?this._renderOnGridLike(t,a,0,t.getData().count()):ZM(o)&&this._renderOnGeo(o,t,i,a)},e.prototype.incrementalPrepareRender=function(t,n,a){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,a,i){var o=n.coordinateSystem;o&&(ZM(o)?this.render(n,a,i):(this._progressiveEls=[],this._renderOnGridLike(n,i,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){po(this._progressiveEls||this.group,t)},e.prototype._renderOnGridLike=function(t,n,a,i,o){var s=t.coordinateSystem,l=so(s,"cartesian2d"),u=so(s,"matrix"),f,c,v,h;if(l){var p=s.getAxis("x"),d=s.getAxis("y");f=p.getBandWidth()+.5,c=d.getBandWidth()+.5,v=p.scale.getExtent(),h=d.scale.getExtent()}for(var g=this.group,y=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),_=t.getModel(["blur","itemStyle"]).getItemStyle(),S=t.getModel(["select","itemStyle"]).getItemStyle(),b=t.get(["itemStyle","borderRadius"]),x=Ht(t),w=t.getModel("emphasis"),T=w.get("focus"),C=w.get("blurScope"),A=w.get("disabled"),D=l||u?[y.mapDimension("x"),y.mapDimension("y"),y.mapDimension("value")]:[y.mapDimension("time"),y.mapDimension("value")],L=a;Lv[1]||kh[1])continue;var O=s.dataToPoint([E,k]);I=new Ce({shape:{x:O[0]-f/2,y:O[1]-c/2,width:f,height:c},style:P})}else if(u){var R=s.dataToLayout([y.get(D[0],L),y.get(D[1],L)]).rect;if(mr(R.x))continue;I=new Ce({z2:1,shape:R,style:P})}else{if(isNaN(y.get(D[1],L)))continue;var z=s.dataToLayout([y.get(D[0],L)]),R=z.contentRect||z.rect;if(mr(R.x)||mr(R.y))continue;I=new Ce({z2:1,shape:R,style:P})}if(y.hasItemOption){var V=y.getItemModel(L),G=V.getModel("emphasis");m=G.getModel("itemStyle").getItemStyle(),_=V.getModel(["blur","itemStyle"]).getItemStyle(),S=V.getModel(["select","itemStyle"]).getItemStyle(),b=V.get(["itemStyle","borderRadius"]),T=G.get("focus"),C=G.get("blurScope"),A=G.get("disabled"),x=Ht(V)}I.shape.r=b;var F=t.getRawValue(L),U="-";F&&F[2]!=null&&(U=F[2]+""),Kt(I,x,{labelFetcher:t,labelDataIndex:L,defaultOpacity:P.opacity,defaultText:U}),I.ensureState("emphasis").style=m,I.ensureState("blur").style=_,I.ensureState("select").style=S,ut(I,T,C,A),I.incremental=o,o&&(I.states.emphasis.hoverLayer=!0),g.add(I),y.setItemGraphicEl(L,I),this._progressiveEls&&this._progressiveEls.push(I)}},e.prototype._renderOnGeo=function(t,n,a,i){var o=a.targetVisuals.inRange,s=a.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new Mee;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var f=t.getViewRect().clone(),c=t.getRoamTransform();f.applyTransform(c);var v=Math.max(f.x,0),h=Math.max(f.y,0),p=Math.min(f.width+f.x,i.getWidth()),d=Math.min(f.height+f.y,i.getHeight()),g=p-v,y=d-h,m=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(m,function(w,T,C){var A=t.dataToPoint([w,T]);return A[0]-=v,A[1]-=h,A.push(C),A}),S=a.getExtent(),b=a.type==="visualMap.continuous"?Iee(S,a.option.range):Dee(S,a.getPieceList(),a.option.selected);u.update(_,g,y,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},b);var x=new ar({style:{width:g,height:y,x:v,y:h,image:u.canvas},silent:!0});this.group.add(x)},e.type="heatmap",e})(Je),Pee=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getInitialData=function(t,n){return gi(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Bc.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:B.color.primary}}},e})(nt);function kee(r){r.registerChartView(Lee),r.registerSeriesModel(Pee)}var Eee=["itemStyle","borderWidth"],UM=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],rm=new pi,Ree=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),f=u.isHorizontal(),c=l.master.getRect(),v={ecSize:{width:a.getWidth(),height:a.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[c.x,c.x+c.width],[c.y,c.y+c.height]],isHorizontal:f,valueDim:UM[+f],categoryDim:UM[1-+f]};o.diff(s).add(function(p){if(o.hasValue(p)){var d=XM(o,p),g=YM(o,p,d,v),y=qM(o,v,g);o.setItemGraphicEl(p,y),i.add(y),KM(y,v,g)}}).update(function(p,d){var g=s.getItemGraphicEl(d);if(!o.hasValue(p)){i.remove(g);return}var y=XM(o,p),m=YM(o,p,y,v),_=ez(o,m);g&&_!==g.__pictorialShapeStr&&(i.remove(g),o.setItemGraphicEl(p,null),g=null),g?Fee(g,v,m):g=qM(o,v,m,!0),o.setItemGraphicEl(p,g),g.__pictorialSymbolMeta=m,i.add(g),KM(g,v,m)}).remove(function(p){var d=s.getItemGraphicEl(p);d&&jM(s,p,d.__pictorialSymbolMeta.animationModel,d)}).execute();var h=t.get("clip",!0)?Zc(t.coordinateSystem,!1,t):null;return h?i.setClipPath(h):i.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var a=this.group,i=this._data;t.get("animation")?i&&i.eachItemGraphicEl(function(o){jM(i,ge(o).dataIndex,t,o)}):a.removeAll()},e.type="pictorialBar",e})(Je);function YM(r,e,t,n){var a=r.getItemLayout(e),i=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,f=t.get("symbolPatternSize")||2,c=t.isAnimationEnabled(),v={dataIndex:e,layout:a,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:i,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:f,rotation:u,animationModel:c?t:null,hoverScale:c&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};Oee(t,i,a,n,v),Nee(r,e,a,i,o,v.boundingLength,v.pxSign,f,n,v),zee(t,v.symbolScale,u,n,v);var h=v.symbolSize,p=Xs(t.get("symbolOffset"),h);return Bee(t,h,a,i,o,p,s,v.valueLineWidth,v.boundingLength,v.repeatCutLength,n,v),v}function Oee(r,e,t,n,a){var i=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[i.wh]<=0),f;if(W(o)){var c=[nm(s,o[0])-l,nm(s,o[1])-l];c[1]=0?1:-1:f>0?1:-1}function nm(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function Nee(r,e,t,n,a,i,o,s,l,u){var f=l.valueDim,c=l.categoryDim,v=Math.abs(t[c.wh]),h=r.getItemVisual(e,"symbolSize"),p;W(h)?p=h.slice():h==null?p=["100%","100%"]:p=[h,h],p[c.index]=X(p[c.index],v),p[f.index]=X(p[f.index],n?v:Math.abs(i)),u.symbolSize=p;var d=u.symbolScale=[p[0]/s,p[1]/s];d[f.index]*=(l.isHorizontal?-1:1)*o}function zee(r,e,t,n,a){var i=r.get(Eee)||0;i&&(rm.attr({scaleX:e[0],scaleY:e[1],rotation:t}),rm.updateTransform(),i/=rm.getLineScale(),i*=e[n.valueDim.index]),a.valueLineWidth=i||0}function Bee(r,e,t,n,a,i,o,s,l,u,f,c){var v=f.categoryDim,h=f.valueDim,p=c.pxSign,d=Math.max(e[h.index]+s,0),g=d;if(n){var y=Math.abs(l),m=fr(r.get("symbolMargin"),"15%")+"",_=!1;m.lastIndexOf("!")===m.length-1&&(_=!0,m=m.slice(0,m.length-1));var S=X(m,e[h.index]),b=Math.max(d+S*2,0),x=_?0:S*2,w=kP(n),T=w?n:JM((y+x)/b),C=y-T*d;S=C/2/(_?T:Math.max(T-1,1)),b=d+S*2,x=_?0:S*2,!w&&n!=="fixed"&&(T=u?JM((Math.abs(u)+x)/b):0),g=T*b-x,c.repeatTimes=T,c.symbolMargin=S}var A=p*(g/2),D=c.pathPosition=[];D[v.index]=t[v.wh]/2,D[h.index]=o==="start"?A:o==="end"?l-A:l/2,i&&(D[0]+=i[0],D[1]+=i[1]);var L=c.bundlePosition=[];L[v.index]=t[v.xy],L[h.index]=t[h.xy];var I=c.barRectShape=H({},t);I[h.wh]=p*Math.max(Math.abs(t[h.wh]),Math.abs(D[h.index]+A)),I[v.wh]=t[v.wh];var P=c.clipShape={};P[v.xy]=-t[v.xy],P[v.wh]=f.ecSize[v.wh],P[h.xy]=0,P[h.wh]=t[h.wh]}function qN(r){var e=r.symbolPatternSize,t=Nt(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function jN(r,e,t,n){var a=r.__pictorialBundle,i=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,f=0,c=i[e.valueDim.index]+o+t.symbolMargin*2;for(yb(r,function(d){d.__pictorialAnimationIndex=f,d.__pictorialRepeatTimes=u,f0:y<0)&&(m=u-1-d),g[l.index]=c*(m-u/2+.5)+s[l.index],{x:g[0],y:g[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function KN(r,e,t,n){var a=r.__pictorialBundle,i=r.__pictorialMainPath;i?Ul(i,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(i=r.__pictorialMainPath=qN(t),a.add(i),Ul(i,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:0,scaleY:0,rotation:t.rotation},{scaleX:t.symbolScale[0],scaleY:t.symbolScale[1]},t,n))}function JN(r,e,t){var n=H({},e.barRectShape),a=r.__pictorialBarRect;a?Ul(a,null,{shape:n},e,t):(a=r.__pictorialBarRect=new Ce({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),a.disableMorphing=!0,r.add(a))}function QN(r,e,t,n){if(t.symbolClip){var a=r.__pictorialClipPath,i=H({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(a)Ve(a,{shape:i},s,l);else{i[o.wh]=0,a=new Ce({shape:i}),r.__pictorialBundle.setClipPath(a),r.__pictorialClipPath=a;var u={};u[o.wh]=t.clipShape[o.wh],Zs[n?"updateProps":"initProps"](a,{shape:u},s,l)}}}function XM(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=Vee,t.isAnimationEnabled=Gee,t}function Vee(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function Gee(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function qM(r,e,t,n){var a=new oe,i=new oe;return a.add(i),a.__pictorialBundle=i,i.x=t.bundlePosition[0],i.y=t.bundlePosition[1],t.symbolRepeat?jN(a,e,t):KN(a,e,t),JN(a,t,n),QN(a,e,t,n),a.__pictorialShapeStr=ez(r,t),a.__pictorialSymbolMeta=t,a}function Fee(r,e,t){var n=t.animationModel,a=t.dataIndex,i=r.__pictorialBundle;Ve(i,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,a),t.symbolRepeat?jN(r,e,t,!0):KN(r,e,t,!0),JN(r,t,!0),QN(r,e,t,!0)}function jM(r,e,t,n){var a=n.__pictorialBarRect;a&&a.removeTextContent();var i=[];yb(n,function(o){i.push(o)}),n.__pictorialMainPath&&i.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),M(i,function(o){io(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function ez(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function yb(r,e,t){M(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Ul(r,e,t,n,a,i){e&&r.attr(e),n.symbolClip&&!a?t&&r.attr(t):t&&Zs[a?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,i)}function KM(r,e,t){var n=t.dataIndex,a=t.itemModel,i=a.getModel("emphasis"),o=i.getModel("itemStyle").getItemStyle(),s=a.getModel(["blur","itemStyle"]).getItemStyle(),l=a.getModel(["select","itemStyle"]).getItemStyle(),u=a.getShallow("cursor"),f=i.get("focus"),c=i.get("blurScope"),v=i.get("scale");yb(r,function(d){if(d instanceof ar){var g=d.style;d.useStyle(H({image:g.image,x:g.x,y:g.y,width:g.width,height:g.height},t.style))}else d.useStyle(t.style);var y=d.ensureState("emphasis");y.style=o,v&&(y.scaleX=d.scaleX*1.1,y.scaleY=d.scaleY*1.1),d.ensureState("blur").style=s,d.ensureState("select").style=l,u&&(d.cursor=u),d.z2=t.z2});var h=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,Kt(p,Ht(a),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:ou(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:h}),ut(r,f,c,i.get("disabled"))}function JM(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}var Hee=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.hasSymbolVisual=!0,t.defaultSymbol="roundRect",t}return e.prototype.getInitialData=function(t){return t.stack=null,r.prototype.getInitialData.apply(this,arguments)},e.type="series.pictorialBar",e.dependencies=["grid"],e.defaultOption=go(gc.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:B.color.primary}}}),e})(gc);function Wee(r){r.registerChartView(Ree),r.registerSeriesModel(Hee),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,Se(SR,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,bR("pictorialBar"))}var $ee=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._layers=[],t}return e.prototype.render=function(t,n,a){var i=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=i.getLayout("layoutInfo"),f=u.rect,c=u.boundaryGap;s.x=0,s.y=f.y+c[0];function v(g){return g.name}var h=new ui(this._layersSeries||[],l,v,v),p=[];h.add(j(d,this,"add")).update(j(d,this,"update")).remove(j(d,this,"remove")).execute();function d(g,y,m){var _=o._layers;if(g==="remove"){s.remove(_[y]);return}for(var S=[],b=[],x,w=l[y].indices,T=0;Ti&&(i=s),n.push(s)}for(var u=0;ui&&(i=c)}return{y0:a,max:i}}function qee(r){r.registerChartView($ee),r.registerSeriesModel(Uee),r.registerLayout(Yee),r.registerProcessor(Iu("themeRiver"))}var jee=2,Kee=4,eD=(function(r){N(e,r);function e(t,n,a,i){var o=r.call(this)||this;o.z2=jee,o.textConfig={inside:!0},ge(o).seriesIndex=n.seriesIndex;var s=new Be({z2:Kee,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,a,i),o}return e.prototype.updateData=function(t,n,a,i,o){this.node=n,n.piece=this,a=a||this._seriesModel,i=i||this._ecModel;var s=this;ge(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),f=n.getLayout(),c=H({},f);c.label=null;var v=n.getVisual("style");v.lineJoin="bevel";var h=n.getVisual("decal");h&&(v.decal=ru(h,o));var p=_a(l.getModel("itemStyle"),c,!0);H(c,p),M(zr,function(m){var _=s.ensureState(m),S=l.getModel([m,"itemStyle"]);_.style=S.getItemStyle();var b=_a(S,c);b&&(_.shape=b)}),t?(s.setShape(c),s.shape.r=f.r0,st(s,{shape:{r:f.r}},a,n.dataIndex)):(Ve(s,{shape:c},a),Ln(s)),s.useStyle(v),this._updateLabel(a);var d=l.getShallow("cursor");d&&s.attr("cursor",d),this._seriesModel=a||this._seriesModel,this._ecModel=i||this._ecModel;var g=u.get("focus"),y=g==="relative"?jf(n.getAncestorsIndices(),n.getDescendantIndices()):g==="ancestor"?n.getAncestorsIndices():g==="descendant"?n.getDescendantIndices():g;ut(this,y,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,a=this.node.getModel(),i=a.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),f=Math.sin(l),c=this,v=c.getTextContent(),h=this.node.dataIndex,p=i.get("minAngle")/180*Math.PI,d=i.get("show")&&!(p!=null&&Math.abs(s)P&&!ec(k-P)&&k0?(o.virtualPiece?o.virtualPiece.updateData(!1,m,t,n,a):(o.virtualPiece=new eD(m,t,n,a),f.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(S){o._rootToNode(_.parentNode)})):o.virtualPiece&&(f.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var a=!1,i=t.seriesModel.getViewRoot();i.eachNode(function(o){if(!a&&o.piece&&o.piece===n.target){var s=o.getModel().get("nodeClick");if(s==="rootToNode")t._rootToNode(o);else if(s==="link"){var l=o.getModel(),u=l.get("link");if(u){var f=l.get("target",!0)||"_blank";vp(u,f)}}a=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:V_,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var a=n.getData(),i=a.getItemLayout(0);if(i){var o=t[0]-i.cx,s=t[1]-i.cy,l=Math.sqrt(o*o+s*s);return l<=i.r&&l>=i.r0}},e.type="sunburst",e})(Je),tte=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.ignoreStyleOnData=!0,t}return e.prototype.getInitialData=function(t,n){var a={name:t.name,children:t.data};tz(a);var i=this._levelModels=$(t.levels||[],function(l){return new ke(l,this,n)},this),o=QS.createTree(a,this,s);function s(l){l.wrapMethod("getItemModel",function(u,f){var c=o.getNodeByDataIndex(f),v=i[c.depth];return v&&(u.parentModel=v),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),a=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=Ud(a,this),n},e.prototype.getLevelModel=function(t){return this._levelModels&&this._levelModels[t.depth]},e.prototype.getViewRoot=function(){return this._viewRoot},e.prototype.resetViewRoot=function(t){t?this._viewRoot=t:t=this._viewRoot;var n=this.getRawData().tree.root;(!t||t!==n&&!n.contains(t))&&(this._viewRoot=n)},e.prototype.enableAriaDecal=function(){iN(this)},e.type="series.sunburst",e.defaultOption={z:2,center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,minAngle:0,stillShowZeroSum:!0,nodeClick:"rootToNode",renderLabelForZeroData:!1,label:{rotate:"radial",show:!0,opacity:1,align:"center",position:"inside",distance:5,silent:!0},itemStyle:{borderWidth:1,borderColor:"white",borderType:"solid",shadowBlur:0,shadowColor:"rgba(0, 0, 0, 0.2)",shadowOffsetX:0,shadowOffsetY:0,opacity:1},emphasis:{focus:"descendant"},blur:{itemStyle:{opacity:.2},label:{opacity:.1}},animationType:"expansion",animationDuration:1e3,animationDurationUpdate:500,data:[],sort:"desc"},e})(nt);function tz(r){var e=0;M(r.children,function(n){tz(n);var a=n.value;W(a)&&(a=a[0]),e+=a});var t=r.value;W(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),W(r.value)?r.value[0]=t:r.value=t}var rD=Math.PI/180;function rte(r,e,t){e.eachSeriesByType(r,function(n){var a=n.get("center"),i=n.get("radius");W(i)||(i=[0,i]),W(a)||(a=[a,a]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=X(a[0],o),f=X(a[1],s),c=X(i[0],l/2),v=X(i[1],l/2),h=-n.get("startAngle")*rD,p=n.get("minAngle")*rD,d=n.getData().tree.root,g=n.getViewRoot(),y=g.depth,m=n.get("sort");m!=null&&rz(g,m);var _=0;M(g.children,function(k){!isNaN(k.getValue())&&_++});var S=g.getValue(),b=Math.PI/(S||_)*2,x=g.depth>0,w=g.height-(x?-1:1),T=(v-c)/(w||1),C=n.get("clockwise"),A=n.get("stillShowZeroSum"),D=C?1:-1,L=function(k,O){if(k){var R=O;if(k!==d){var z=k.getValue(),V=S===0&&A?b:z*b;V1;)o=o.parentNode;var s=a.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&q(s)&&(s=c0(s,(n.depth-1)/(i-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var a=n.getData(),i=a.tree;i.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,i.root.height));var u=a.ensureUniqueItemVisual(o.dataIndex,"style");H(u,l)})})}function ite(r){r.registerChartView(ete),r.registerSeriesModel(tte),r.registerLayout(Se(rte,"sunburst")),r.registerProcessor(Se(Iu,"sunburst")),r.registerVisual(ate),Qee(r)}var nD={color:"fill",borderColor:"stroke"},ote={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},ti=Ae(),ste=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){this.currentZLevel=this.get("zlevel",!0),this.currentZ=this.get("z",!0)},e.prototype.getInitialData=function(t,n){return gi(null,this)},e.prototype.getDataParams=function(t,n,a){var i=r.prototype.getDataParams.call(this,t,n);return a&&(i.info=ti(a).info),i},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar","matrix"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e})(nt);function lte(r,e){return e=e||[0,0],$(["x","y"],function(t,n){var a=this.getAxis(t),i=e[n],o=r[n]/2;return a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(i-o)-a.dataToCoord(i+o))},this)}function ute(r){var e=r.master.getRect();return{coordSys:{type:"cartesian2d",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:j(lte,r)}}}function fte(r,e){return e=e||[0,0],$([0,1],function(t){var n=e[t],a=r[t]/2,i=[],o=[];return i[t]=n-a,o[t]=n+a,i[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(i)[t]-this.dataToPoint(o)[t])},this)}function cte(r){var e=r.getBoundingRect();return{coordSys:{type:"geo",x:e.x,y:e.y,width:e.width,height:e.height,zoom:r.getZoom()},api:{coord:function(t){return r.dataToPoint(t)},size:j(fte,r)}}}function vte(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,a=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-a)-t.dataToCoord(n+a))}function hte(r){var e=r.getRect();return{coordSys:{type:"singleAxis",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t){return r.dataToPoint(t)},size:j(vte,r)}}}function pte(r,e){return e=e||[0,0],$(["Radius","Angle"],function(t,n){var a="get"+t+"Axis",i=this[a](),o=e[n],s=r[n]/2,l=i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(o-s)-i.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function dte(r){var e=r.getRadiusAxis(),t=r.getAngleAxis(),n=e.getExtent();return n[0]>n[1]&&n.reverse(),{coordSys:{type:"polar",cx:r.cx,cy:r.cy,r:n[1],r0:n[0]},api:{coord:function(a){var i=e.dataToRadius(a[0]),o=t.dataToAngle(a[1]),s=r.coordToPoint([i,o]);return s.push(i,o*Math.PI/180),s},size:j(pte,r)}}}function gte(r){var e=r.getRect(),t=r.getRangeInfo();return{coordSys:{type:"calendar",x:e.x,y:e.y,width:e.width,height:e.height,cellWidth:r.getCellWidth(),cellHeight:r.getCellHeight(),rangeInfo:{start:t.start,end:t.end,weeks:t.weeks,dayCount:t.allDay}},api:{coord:function(n,a){return r.dataToPoint(n,a)},layout:function(n,a){return r.dataToLayout(n,a)}}}}function yte(r){var e=r.getRect();return{coordSys:{type:"matrix",x:e.x,y:e.y,width:e.width,height:e.height},api:{coord:function(t,n){return r.dataToPoint(t,n)},layout:function(t,n){return r.dataToLayout(t,n)}}}}function nz(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||Q(r,"text")))}function az(r,e,t){var n=r,a,i,o;if(e==="text")o=n;else{o={},Q(n,"text")&&(o.text=n.text),Q(n,"rich")&&(o.rich=n.rich),Q(n,"textFill")&&(o.fill=n.textFill),Q(n,"textStroke")&&(o.stroke=n.textStroke),Q(n,"fontFamily")&&(o.fontFamily=n.fontFamily),Q(n,"fontSize")&&(o.fontSize=n.fontSize),Q(n,"fontStyle")&&(o.fontStyle=n.fontStyle),Q(n,"fontWeight")&&(o.fontWeight=n.fontWeight),i={type:"text",style:o,silent:!0},a={};var s=Q(n,"textPosition");t?a.position=s?n.textPosition:"inside":s&&(a.position=n.textPosition),Q(n,"textPosition")&&(a.position=n.textPosition),Q(n,"textOffset")&&(a.offset=n.textOffset),Q(n,"textRotation")&&(a.rotation=n.textRotation),Q(n,"textDistance")&&(a.distance=n.textDistance)}return aD(o,r),M(o.rich,function(l){aD(l,l)}),{textConfig:a,textContent:i}}function aD(r,e){e&&(e.font=e.textFont||e.font,Q(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),Q(e,"textAlign")&&(r.align=e.textAlign),Q(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),Q(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),Q(e,"textWidth")&&(r.width=e.textWidth),Q(e,"textHeight")&&(r.height=e.textHeight),Q(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),Q(e,"textPadding")&&(r.padding=e.textPadding),Q(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),Q(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),Q(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),Q(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),Q(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),Q(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),Q(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function iD(r,e,t){var n=r;n.textPosition=n.textPosition||t.position||"inside",t.offset!=null&&(n.textOffset=t.offset),t.rotation!=null&&(n.textRotation=t.rotation),t.distance!=null&&(n.textDistance=t.distance);var a=n.textPosition.indexOf("inside")>=0,i=r.fill||B.color.neutral99;oD(n,e);var o=n.textFill==null;return a?o&&(n.textFill=t.insideFill||B.color.neutral00,!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=i),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||B.color.neutral00),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,M(e.rich,function(s){oD(s,s)}),n}function oD(r,e){e&&(Q(e,"fill")&&(r.textFill=e.fill),Q(e,"stroke")&&(r.textStroke=e.fill),Q(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),Q(e,"font")&&(r.font=e.font),Q(e,"fontStyle")&&(r.fontStyle=e.fontStyle),Q(e,"fontWeight")&&(r.fontWeight=e.fontWeight),Q(e,"fontSize")&&(r.fontSize=e.fontSize),Q(e,"fontFamily")&&(r.fontFamily=e.fontFamily),Q(e,"align")&&(r.textAlign=e.align),Q(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),Q(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),Q(e,"width")&&(r.textWidth=e.width),Q(e,"height")&&(r.textHeight=e.height),Q(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),Q(e,"padding")&&(r.textPadding=e.padding),Q(e,"borderColor")&&(r.textBorderColor=e.borderColor),Q(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),Q(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),Q(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),Q(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),Q(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),Q(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),Q(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),Q(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),Q(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),Q(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var iz={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},sD=Re(iz);Ca(Ma,function(r,e){return r[e]=1,r},{});Ma.join(", ");var Bp=["","style","shape","extra"],fu=Ae();function mb(r,e,t,n,a){var i=r+"Animation",o=xu(r,n,a)||{},s=fu(e).userDuring;return o.duration>0&&(o.during=s?j(xte,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),H(o,t[i]),o}function Nh(r,e,t,n){n=n||{};var a=n.dataIndex,i=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=fu(r),u=e.style;l.userDuring=e.during;var f={},c={};if(Tte(r,e,c),r.type==="compound")for(var v=r.shape.paths,h=e.shape.paths,p=0;p0&&r.animateFrom(g,y)}else _te(r,e,a||0,t,f);oz(r,e),u?r.dirty():r.markRedraw()}function oz(r,e){for(var t=fu(r).leaveToProps,n=0;n0&&r.animateFrom(a,i)}}function Ste(r,e){Q(e,"silent")&&(r.silent=e.silent),Q(e,"ignore")&&(r.ignore=e.ignore),r instanceof In&&Q(e,"invisible")&&(r.invisible=e.invisible),r instanceof Me&&Q(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var sa={},bte={setTransform:function(r,e){return sa.el[r]=e,this},getTransform:function(r){return sa.el[r]},setShape:function(r,e){var t=sa.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=sa.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=sa.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=sa.el.style;if(e)return e[r]},setExtra:function(r,e){var t=sa.el.extra||(sa.el.extra={});return t[r]=e,this},getExtra:function(r){var e=sa.el.extra;if(e)return e[r]}};function xte(){var r=this,e=r.el;if(e){var t=fu(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}sa.el=e,n(bte)}}function lD(r,e,t,n){var a=t[r];if(a){var i=e[r],o;if(i){var s=t.transition,l=a.transition;if(l)if(!o&&(o=n[r]={}),ws(l))H(o,i);else for(var u=Qe(l),f=0;f=0){!o&&(o=n[r]={});for(var h=Re(i),f=0;f=0)){var v=r.getAnimationStyleProps(),h=v?v.style:null;if(h){!i&&(i=n.style={});for(var p=Re(t),u=0;u=0?e.getStore().get(R,k):void 0}var z=e.get(O.name,k),V=O&&O.ordinalMeta;return V?V.categories[z]:z}function w(E,k){k==null&&(k=f);var O=e.getItemVisual(k,"style"),R=O&&O.fill,z=O&&O.opacity,V=_(k,$i).getItemStyle();R!=null&&(V.fill=R),z!=null&&(V.opacity=z);var G={inheritColor:q(R)?R:B.color.neutral99},F=S(k,$i),U=rt(F,null,G,!1,!0);U.text=F.getShallow("show")?re(r.getFormattedLabel(k,$i),ou(e,k)):null;var J=fp(F,G,!1);return A(E,V),V=iD(V,U,J),E&&C(V,E),V.legacy=!0,V}function T(E,k){k==null&&(k=f);var O=_(k,ri).getItemStyle(),R=S(k,ri),z=rt(R,null,null,!0,!0);z.text=R.getShallow("show")?nn(r.getFormattedLabel(k,ri),r.getFormattedLabel(k,$i),ou(e,k)):null;var V=fp(R,null,!0);return A(E,O),O=iD(O,z,V),E&&C(O,E),O.legacy=!0,O}function C(E,k){for(var O in k)Q(k,O)&&(E[O]=k[O])}function A(E,k){E&&(E.textFill&&(k.textFill=E.textFill),E.textPosition&&(k.textPosition=E.textPosition))}function D(E,k){if(k==null&&(k=f),Q(nD,E)){var O=e.getItemVisual(k,"style");return O?O[nD[E]]:null}if(Q(ote,E))return e.getItemVisual(k,E)}function L(E){if(o.type==="cartesian2d"){var k=o.getBaseAxis();return $6(fe({axis:k},E))}}function I(){return t.getCurrentSeriesIndices()}function P(E){return tS(E,t)}}function Ote(r){var e={};return M(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var a=n.coordDim,i=e[a]=e[a]||[];i[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function lm(r,e,t,n,a,i,o){if(!n){i.remove(e);return}var s=wb(r,e,t,n,a,i);return s&&o.setItemGraphicEl(t,s),s&&ut(s,n.focus,n.blurScope,n.emphasisDisabled),s}function wb(r,e,t,n,a,i){var o=-1,s=e;e&&fz(e,n,a)&&(o=be(i.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=bb(n),s&&Pte(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),n.tooltipDisabled&&(u.tooltipDisabled=!0),fn.normal.cfg=fn.normal.conOpt=fn.emphasis.cfg=fn.emphasis.conOpt=fn.blur.cfg=fn.blur.conOpt=fn.select.cfg=fn.select.conOpt=null,fn.isLegacy=!1,zte(u,t,n,a,l,fn),Nte(u,t,n,a,l),xb(r,u,t,n,fn,a,l),Q(n,"info")&&(ti(u).info=n.info);for(var f=0;f=0?i.replaceAt(u,o):i.add(u),u}function fz(r,e,t){var n=ti(r),a=e.type,i=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||a!=null&&a!==n.customGraphicType||a==="path"&&Hte(i)&&cz(i)!==n.customPathData||a==="image"&&Q(o,"image")&&o.image!==n.customImagePath}function Nte(r,e,t,n,a){var i=t.clipPath;if(i===!1)r&&r.getClipPath()&&r.removeClipPath();else if(i){var o=r.getClipPath();o&&fz(o,i,n)&&(o=null),o||(o=bb(i),r.setClipPath(o)),xb(null,o,e,i,null,n,a)}}function zte(r,e,t,n,a,i){if(!(r.isGroup||r.type==="compoundPath")){fD(t,null,i),fD(t,ri,i);var o=i.normal.conOpt,s=i.emphasis.conOpt,l=i.blur.conOpt,u=i.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var f=r.getTextContent();if(o===!1)f&&r.removeTextContent();else{o=i.normal.conOpt=o||{type:"text"},f?f.clearStates():(f=bb(o),r.setTextContent(f)),xb(null,f,e,o,null,n,a);for(var c=o&&o.style,v=0;v=f;h--){var p=e.childAt(h);Vte(e,p,a)}}}function Vte(r,e,t){e&&qd(e,ti(r).option,t)}function Gte(r){new ui(r.oldChildren,r.newChildren,cD,cD,r).add(vD).update(vD).remove(Fte).execute()}function cD(r,e){var t=r&&r.name;return t??Ite+e}function vD(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,a=e!=null?t.oldChildren[e]:null;wb(t.api,a,t.dataIndex,n,t.seriesModel,t.group)}function Fte(r){var e=this.context,t=e.oldChildren[r];t&&qd(t,ti(t).option,e.seriesModel)}function cz(r){return r&&(r.pathData||r.d)}function Hte(r){return r&&(Q(r,"pathData")||Q(r,"d"))}function Wte(r){r.registerChartView(kte),r.registerSeriesModel(ste)}var es=Ae(),hD=se,um=j,Cb=(function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,a){var i=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!a&&this._lastValue===i&&this._lastStatus===o)){this._lastValue=i,this._lastStatus=o;var s=this._group,l=this._handle;if(!o||o==="hide"){s&&s.hide(),l&&l.hide();return}s&&s.show(),l&&l.show();var u={};this.makeElOption(u,i,e,t,n);var f=u.graphicKey;f!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=f;var c=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new oe,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var v=Se(pD,t,c);this.updatePointerEl(s,u,v),this.updateLabelEl(s,u,v,t)}gD(s,t,!0),this._renderHandle(i)}},r.prototype.remove=function(e){this.clear(e)},r.prototype.dispose=function(e){this.clear(e)},r.prototype.determineAnimation=function(e,t){var n=t.get("animation"),a=e.axis,i=a.type==="category",o=t.get("snap");if(!o&&!i)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(i&&a.getBandWidth()>s)return!0;if(o){var l=US(e).seriesDataCount,u=a.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,a,i){},r.prototype.createPointerEl=function(e,t,n,a){var i=t.pointer;if(i){var o=es(e).pointerEl=new Zs[i.type](hD(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,a){if(t.label){var i=es(e).labelEl=new Be(hD(t.label));e.add(i),dD(i,a)}},r.prototype.updatePointerEl=function(e,t,n){var a=es(e).pointerEl;a&&t.pointer&&(a.setStyle(t.pointer.style),n(a,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,a){var i=es(e).labelEl;i&&(i.setStyle(t.label.style),n(i,{x:t.label.x,y:t.label.y}),dD(i,a))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),a=this._handle,i=t.getModel("handle"),o=t.get("status");if(!i.get("show")||!o||o==="hide"){a&&n.remove(a),this._handle=null;return}var s;this._handle||(s=!0,a=this._handle=Nc(i.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){ii(u.event)},onmousedown:um(this._onHandleDragMove,this,0,0),drift:um(this._onHandleDragMove,this),ondragend:um(this._onHandleDragEnd,this)}),n.add(a)),gD(a,t,!1),a.setStyle(i.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=i.get("size");W(l)||(l=[l,l]),a.scaleX=l[0]/2,a.scaleY=l[1]/2,Au(this,"_doDispatchAxisPointer",i.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){pD(this._axisPointerModel,!t&&this._moveAnimation,this._handle,fm(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var a=this.updateHandleTransform(fm(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=a,n.stopAnimation(),n.attr(fm(a)),es(n).lastProp=null,this._doDispatchAxisPointer()}},r.prototype._doDispatchAxisPointer=function(){var e=this._handle;if(e){var t=this._payloadInfo,n=this._axisModel;this._api.dispatchAction({type:"updateAxisPointer",x:t.cursorPoint[0],y:t.cursorPoint[1],tooltipOption:t.tooltipOption,axesInfo:[{axisDim:n.axis.dim,axisIndex:n.componentIndex}]})}},r.prototype._onHandleDragEnd=function(){this._dragging=!1;var e=this._handle;if(e){var t=this._axisPointerModel.get("value");this._moveHandleToValue(t),this._api.dispatchAction({type:"hideTip"})}},r.prototype.clear=function(e){this._lastValue=null,this._lastStatus=null;var t=e.getZr(),n=this._group,a=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),a&&t.remove(a),this._group=null,this._handle=null,this._payloadInfo=null),lc(this,"_doDispatchAxisPointer")},r.prototype.doClear=function(){},r.prototype.buildLabel=function(e,t,n){return n=n||0,{x:e[n],y:e[1-n],width:t[n],height:t[1-n]}},r})();function pD(r,e,t,n){vz(es(t).lastProp,n)||(es(t).lastProp=n,e?Ve(t,n,r):(t.stopAnimation(),t.attr(n)))}function vz(r,e){if(ce(r)&&ce(e)){var t=!0;return M(e,function(n,a){t=t&&vz(r[a],n)}),!!t}else return r===e}function dD(r,e){r[e.get(["label","show"])?"show":"hide"]()}function fm(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function gD(r,e,t){var n=e.get("z"),a=e.get("zlevel");r&&r.traverse(function(i){i.type!=="group"&&(n!=null&&(i.z=n),a!=null&&(i.zlevel=a),i.silent=t)})}function Ab(r){var e=r.get("type"),t=r.getModel(e+"Style"),n;return e==="line"?(n=t.getLineStyle(),n.fill=null):e==="shadow"&&(n=t.getAreaStyle(),n.stroke=null),n}function hz(r,e,t,n,a){var i=t.get("value"),o=pz(i,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=zc(s.get("padding")||0),u=s.getFont(),f=yd(o,u),c=a.position,v=f.width+l[1]+l[3],h=f.height+l[0]+l[2],p=a.align;p==="right"&&(c[0]-=v),p==="center"&&(c[0]-=v/2);var d=a.verticalAlign;d==="bottom"&&(c[1]-=h),d==="middle"&&(c[1]-=h/2),$te(c,v,h,n);var g=s.get("backgroundColor");(!g||g==="auto")&&(g=e.get(["axisLine","lineStyle","color"])),r.label={x:c[0],y:c[1],style:rt(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:g}),z2:10}}function $te(r,e,t,n){var a=n.getWidth(),i=n.getHeight();r[0]=Math.min(r[0]+e,a)-e,r[1]=Math.min(r[1]+t,i)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function pz(r,e,t,n,a){r=e.scale.parse(r);var i=e.scale.getLabel({value:r},{precision:a.precision}),o=a.formatter;if(o){var s={value:bp(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};M(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),f=l.dataIndexInside,c=u&&u.getDataParams(f);c&&s.seriesData.push(c)}),q(o)?i=o.replace("{value}",i):ie(o)&&(i=o(s))}return i}function Mb(r,e,t){var n=rr();return ho(n,n,t.rotation),Aa(n,n,t.position),$n([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function dz(r,e,t,n,a,i){var o=Nr.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=a.get(["label","margin"]),hz(e,n,a,i,{position:Mb(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function Db(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function gz(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function yD(r,e,t,n,a,i){return{cx:r,cy:e,r0:t,r:n,startAngle:a,endAngle:i,clockwise:!0}}var Zte=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.grid,u=i.get("type"),f=mD(l,s).getOtherAxis(s).getGlobalExtent(),c=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var v=Ab(i),h=Ute[u](s,c,f);h.style=v,t.graphicKey=h.type,t.pointer=h}var p=Pp(l.getRect(),a);dz(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=Pp(n.axis.grid.getRect(),n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=Mb(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.grid,l=o.getGlobalExtent(!0),u=mD(s,o).getOtherAxis(o).getGlobalExtent(),f=o.dim==="x"?0:1,c=[t.x,t.y];c[f]+=n[f],c[f]=Math.min(l[1],c[f]),c[f]=Math.max(l[0],c[f]);var v=(u[1]+u[0])/2,h=[v,v];h[f]=c[f];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:h,tooltipOption:p[f]}},e})(Cb);function mD(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var Ute={line:function(r,e,t){var n=Db([e,t[0]],[e,t[1]],_D(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),a=t[1]-t[0];return{type:"Rect",shape:gz([e-n/2,t[0]],[n,a],_D(r))}}};function _D(r){return r.dim==="x"?0:1}var Yte=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:B.color.border,width:1,type:"dashed"},shadowStyle:{color:B.color.shadowTint},label:{show:!0,formatter:null,precision:"auto",margin:3,color:B.color.neutral00,padding:[5,7,5,7],backgroundColor:B.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:B.color.accent40,throttle:40}},e})(Le),qa=Ae(),Xte=M;function yz(r,e,t){if(!Pe.node){var n=e.getZr();qa(n).records||(qa(n).records={}),qte(n,e);var a=qa(n).records[r]||(qa(n).records[r]={});a.handler=t}}function qte(r,e){if(qa(r).initialized)return;qa(r).initialized=!0,t("click",Se(SD,"click")),t("mousemove",Se(SD,"mousemove")),t("globalout",Kte);function t(n,a){r.on(n,function(i){var o=Jte(e);Xte(qa(r).records,function(s){s&&a(s,i,o.dispatchAction)}),jte(o.pendings,e)})}}function jte(r,e){var t=r.showTip.length,n=r.hideTip.length,a;t?a=r.showTip[t-1]:n&&(a=r.hideTip[n-1]),a&&(a.dispatchAction=null,e.dispatchAction(a))}function Kte(r,e,t){r.handler("leave",null,t)}function SD(r,e,t,n){e.handler(r,t,n)}function Jte(r){var e={showTip:[],hideTip:[]},t=function(n){var a=e[n.type];a?a.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function H_(r,e){if(!Pe.node){var t=e.getZr(),n=(qa(t).records||{})[r];n&&(qa(t).records[r]=null)}}var Qte=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=n.getComponent("tooltip"),o=t.get("triggerOn")||i&&i.get("triggerOn")||"mousemove|click";yz("axisPointer",a,function(s,l,u){o!=="none"&&(s==="leave"||o.indexOf(s)>=0)&&u({type:"updateAxisPointer",currTrigger:s,x:l&&l.offsetX,y:l&&l.offsetY})})},e.prototype.remove=function(t,n){H_("axisPointer",n)},e.prototype.dispose=function(t,n){H_("axisPointer",n)},e.type="axisPointer",e})(lt);function mz(r,e){var t=[],n=r.seriesIndex,a;if(n==null||!(a=e.getSeriesByIndex(n)))return{point:[]};var i=a.getData(),o=ks(i,r);if(o==null||o<0||W(o))return{point:[]};var s=i.getItemGraphicEl(o),l=a.coordinateSystem;if(a.getTooltipPosition)t=a.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),f=l.getOtherAxis(u),c=f.dim,v=u.dim,h=c==="x"||c==="radius"?1:0,p=i.mapDimension(v),d=[];d[h]=i.get(p,o),d[1-h]=i.get(i.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(d)||[]}else t=l.dataToPoint(i.getValues($(l.dimensions,function(y){return i.mapDimension(y)}),o))||[];else if(s){var g=s.getBoundingRect().clone();g.applyTransform(s.transform),t=[g.x+g.width/2,g.y+g.height/2]}return{point:t,el:s}}var bD=Ae();function ere(r,e,t){var n=r.currTrigger,a=[r.x,r.y],i=r,o=r.dispatchAction||j(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){zh(a)&&(a=mz({seriesIndex:i.seriesIndex,dataIndex:i.dataIndex},e).point);var l=zh(a),u=i.axesInfo,f=s.axesInfo,c=n==="leave"||zh(a),v={},h={},p={list:[],map:{}},d={showPointer:Se(rre,h),showTooltip:Se(nre,p)};M(s.coordSysMap,function(y,m){var _=l||y.containPoint(a);M(s.coordSysAxesInfo[m],function(S,b){var x=S.axis,w=sre(u,S);if(!c&&_&&(!u||w)){var T=w&&w.value;T==null&&!l&&(T=x.pointToData(a)),T!=null&&xD(S,T,d,!1,v)}})});var g={};return M(f,function(y,m){var _=y.linkGroup;_&&!h[m]&&M(_.axesInfo,function(S,b){var x=h[b];if(S!==y&&x){var w=x.value;_.mapper&&(w=y.axis.scale.parse(_.mapper(w,wD(S),wD(y)))),g[y.key]=w}})}),M(g,function(y,m){xD(f[m],y,d,!0,v)}),are(h,f,v),ire(p,a,r,o),ore(f,o,t),v}}function xD(r,e,t,n,a){var i=r.axis;if(!(i.scale.isBlank()||!i.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=tre(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&a.seriesIndex==null&&H(a,s[0]),!n&&r.snap&&i.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function tre(r,e){var t=e.axis,n=t.dim,a=r,i=[],o=Number.MAX_VALUE,s=-1;return M(e.seriesModels,function(l,u){var f=l.getData().mapDimensionsAll(n),c,v;if(l.getAxisTooltipData){var h=l.getAxisTooltipData(f,r,t);v=h.dataIndices,c=h.nestestValue}else{if(v=l.indicesOfNearest(n,f[0],r,t.type==="category"?.5:null),!v.length)return;c=l.getData().get(f[0],v[0])}if(!(c==null||!isFinite(c))){var p=r-c,d=Math.abs(p);d<=o&&((d=0&&s<0)&&(o=d,s=p,a=c,i.length=0),M(v,function(g){i.push({seriesIndex:l.seriesIndex,dataIndexInside:g,dataIndex:l.getData().getRawIndex(g)})}))}}),{payloadBatch:i,snapToValue:a}}function rre(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function nre(r,e,t,n){var a=t.payloadBatch,i=e.axis,o=i.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!a.length)){var l=e.coordSys.model,u=yc(l),f=r.map[u];f||(f=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(f)),f.dataByAxis.push({axisDim:i.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:a.slice()})}}function are(r,e,t){var n=t.axesInfo=[];M(e,function(a,i){var o=a.axisPointerModel.option,s=r[i];s?(!a.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!a.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:a.axis.dim,axisIndex:a.axis.model.componentIndex,value:o.value})})}function ire(r,e,t,n){if(zh(e)||!r.list.length){n({type:"hideTip"});return}var a=((r.list[0].dataByAxis[0]||{}).seriesDataIndices||[])[0]||{};n({type:"showTip",escapeConnect:!0,x:e[0],y:e[1],tooltipOption:t.tooltipOption,position:t.position,dataIndexInside:a.dataIndexInside,dataIndex:a.dataIndex,seriesIndex:a.seriesIndex,dataByCoordSys:r.list})}function ore(r,e,t){var n=t.getZr(),a="axisPointerLastHighlights",i=bD(n)[a]||{},o=bD(n)[a]={};M(r,function(u,f){var c=u.axisPointerModel.option;c.status==="show"&&u.triggerEmphasis&&M(c.seriesDataIndices,function(v){var h=v.seriesIndex+" | "+v.dataIndex;o[h]=v})});var s=[],l=[];M(i,function(u,f){!o[f]&&l.push(u)}),M(o,function(u,f){!i[f]&&s.push(u)}),l.length&&t.dispatchAction({type:"downplay",escapeConnect:!0,notBlur:!0,batch:l}),s.length&&t.dispatchAction({type:"highlight",escapeConnect:!0,notBlur:!0,batch:s})}function sre(r,e){for(var t=0;t<(r||[]).length;t++){var n=r[t];if(e.axis.dim===n.axisDim&&e.axis.model.componentIndex===n.axisIndex)return n}}function wD(r){var e=r.axis.model,t={},n=t.axisDim=r.axis.dim;return t.axisIndex=t[n+"AxisIndex"]=e.componentIndex,t.axisName=t[n+"AxisName"]=e.name,t.axisId=t[n+"AxisId"]=e.id,t}function zh(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Xc(r){js.registerAxisPointerClass("CartesianAxisPointer",Zte),r.registerComponentModel(Yte),r.registerComponentView(Qte),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!W(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=lq(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},ere)}function lre(r){we(HO),we(Xc)}var ure=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),f=u.getExtent(),c=s.dataToCoord(n),v=i.get("type");if(v&&v!=="none"){var h=Ab(i),p=cre[v](s,l,c,f);p.style=h,t.graphicKey=p.type,t.pointer=p}var d=i.get(["label","margin"]),g=fre(n,a,i,l,d);hz(t,a,i,o,g)},e})(Cb);function fre(r,e,t,n,a){var i=e.axis,o=i.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,f,c;if(i.dim==="radius"){var v=rr();ho(v,v,s),Aa(v,v,[n.cx,n.cy]),u=$n([o,-a],v);var h=e.getModel("axisLabel").get("rotate")||0,p=Nr.innerTextLayout(s,h*Math.PI/180,-1);f=p.textAlign,c=p.textVerticalAlign}else{var d=l[1];u=n.coordToPoint([d+a,o]);var g=n.cx,y=n.cy;f=Math.abs(u[0]-g)/d<.3?"center":u[0]>g?"left":"right",c=Math.abs(u[1]-y)/d<.3?"middle":u[1]>y?"top":"bottom"}return{position:u,align:f,verticalAlign:c}}var cre={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:Db(e.coordToPoint([n[0],t]),e.coordToPoint([n[1],t]))}:{type:"Circle",shape:{cx:e.cx,cy:e.cy,r:t}}},shadow:function(r,e,t,n){var a=Math.max(1,r.getBandWidth()),i=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:yD(e.cx,e.cy,n[0],n[1],(-t-a/2)*i,(-t+a/2)*i)}:{type:"Sector",shape:yD(e.cx,e.cy,t-a/2,t+a/2,0,Math.PI*2)}}},vre=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.findAxisModel=function(t){var n,a=this.ecModel;return a.eachComponent(t,function(i){i.getCoordSysModel()===this&&(n=i)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e})(Le),Ib=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",dt).models[0]},e.type="polarAxis",e})(Le);zt(Ib,Hc);var hre=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e})(Ib),pre=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e})(Ib),Lb=(function(r){N(e,r);function e(t,n){return r.call(this,"radius",t,n)||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e})(Qn);Lb.prototype.dataToRadius=Qn.prototype.dataToCoord;Lb.prototype.radiusToData=Qn.prototype.coordToData;var dre=Ae(),Pb=(function(r){N(e,r);function e(t,n){return r.call(this,"angle",t,n||[0,360])||this}return e.prototype.pointToData=function(t,n){return this.polar.pointToData(t,n)[this.dim==="radius"?0:1]},e.prototype.calculateCategoryInterval=function(){var t=this,n=t.getLabelModel(),a=t.scale,i=a.getExtent(),o=a.count();if(i[1]-i[0]<1)return 0;var s=i[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),f=yd(s==null?"":s+"",n.getFont(),"center","top"),c=Math.max(f.height,7),v=c/u;isNaN(v)&&(v=1/0);var h=Math.max(0,Math.floor(v)),p=dre(t.model),d=p.lastAutoInterval,g=p.lastTickCount;return d!=null&&g!=null&&Math.abs(d-h)<=1&&Math.abs(g-o)<=1&&d>h?h=d:(p.lastTickCount=o,p.lastAutoInterval=h),h},e})(Qn);Pb.prototype.dataToAngle=Qn.prototype.dataToCoord;Pb.prototype.angleToData=Qn.prototype.coordToData;var _z=["radius","angle"],gre=(function(){function r(e){this.dimensions=_z,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new Lb,this._angleAxis=new Pb,this.axisPointerEnabled=!0,this.name=e||"",this._radiusAxis.polar=this._angleAxis.polar=this}return r.prototype.containPoint=function(e){var t=this.pointToCoord(e);return this._radiusAxis.contain(t[0])&&this._angleAxis.contain(t[1])},r.prototype.containData=function(e){return this._radiusAxis.containData(e[0])&&this._angleAxis.containData(e[1])},r.prototype.getAxis=function(e){var t="_"+e+"Axis";return this[t]},r.prototype.getAxes=function(){return[this._radiusAxis,this._angleAxis]},r.prototype.getAxesByScale=function(e){var t=[],n=this._angleAxis,a=this._radiusAxis;return n.scale.type===e&&t.push(n),a.scale.type===e&&t.push(a),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t,n){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)],n)},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.pointToCoord(e);return n[0]=this._radiusAxis.radiusToData(a[0],t),n[1]=this._angleAxis.angleToData(a[1],t),n},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,a=this.getAngleAxis(),i=a.getExtent(),o=Math.min(i[0],i[1]),s=Math.max(i[0],i[1]);a.inverse?o=s-360:s=o+360;var l=Math.sqrt(t*t+n*n);t/=l,n/=l;for(var u=Math.atan2(-n,t)/Math.PI*180,f=us;)u+=f*360;return[l,u]},r.prototype.coordToPoint=function(e,t){t=t||[];var n=e[0],a=e[1]/180*Math.PI;return t[0]=Math.cos(a)*n+this.cx,t[1]=-Math.sin(a)*n+this.cy,t},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var a=e.getExtent(),i=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-a[0]*i,endAngle:-a[1]*i,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,f=l-this.cy,c=u*u+f*f,v=this.r,h=this.r0;return v!==h&&c-o<=v*v&&c+o>=h*h},x:this.cx-n[1],y:this.cy-n[1],width:n[1]*2,height:n[1]*2}},r.prototype.convertToPixel=function(e,t,n){var a=TD(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=TD(t);return a===this?this.pointToData(n):null},r})();function TD(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function yre(r,e,t){var n=e.get("center"),a=Zt(e,t).refContainer;r.cx=X(n[0],a.width)+a.x,r.cy=X(n[1],a.height)+a.y;var i=r.getRadiusAxis(),o=Math.min(a.width,a.height)/2,s=e.get("radius");s==null?s=[0,"100%"]:W(s)||(s=[0,s]);var l=[X(s[0],o),X(s[1],o)];i.inverse?i.setExtent(l[1],l[0]):i.setExtent(l[0],l[1])}function mre(r,e){var t=this,n=t.getAngleAxis(),a=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),a.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();M(xp(l,"radius"),function(u){a.scale.unionExtentFromData(l,u)}),M(xp(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),au(n.scale,n.model),au(a.scale,a.model),n.type==="category"&&!n.onBand){var i=n.getExtent(),o=360/n.scale.count();n.inverse?i[1]+=o:i[1]-=o,n.setExtent(i[0],i[1])}}function _re(r){return r.mainType==="angleAxis"}function CD(r,e){var t;if(r.type=e.get("type"),r.scale=Vd(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),_re(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),a=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,a)}e.axis=r,r.model=e}var Sre={dimensions:_z,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,a){var i=new gre(a+"");i.update=mre;var o=i.getRadiusAxis(),s=i.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");CD(o,l),CD(s,u),yre(i,n,e),t.push(i),n.coordinateSystem=i,i.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var a=n.getReferringComponents("polar",dt).models[0];n.coordinateSystem=a.coordinateSystem}}),t}},bre=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function nh(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),a=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:a[0],y2:a[1]}}function ah(r){var e=r.getRadiusAxis();return e.inverse?0:1}function AD(r){var e=r[0],t=r[r.length-1];e&&t&&Math.abs(Math.abs(e.coord-t.coord)-360)<1e-4&&r.pop()}var xre=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="PolarAxisPointer",t}return e.prototype.render=function(t,n){if(this.group.removeAll(),!!t.get("show")){var a=t.axis,i=a.polar,o=i.getRadiusAxis().getExtent(),s=a.getTicksCoords({breakTicks:"none"}),l=a.getMinorTicksCoords(),u=$(a.getViewLabels(),function(f){f=se(f);var c=a.scale,v=c.type==="ordinal"?c.getRawOrdinalNumber(f.tickValue):f.tickValue;return f.coord=a.dataToCoord(v),f});AD(u),AD(s),M(bre,function(f){t.get([f,"show"])&&(!a.scale.isBlank()||f==="axisLine")&&wre[f](this.group,t,i,s,l,o,u)},this)}},e.type="angleAxis",e})(js),wre={axisLine:function(r,e,t,n,a,i){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),f=ah(t),c=f?0:1,v,h=Math.abs(u[1]-u[0])===360?"Circle":"Arc";i[c]===0?v=new Zs[h]({shape:{cx:t.cx,cy:t.cy,r:i[f],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):v=new Ec({shape:{cx:t.cx,cy:t.cy,r:i[f],r0:i[c]},style:o.getLineStyle(),z2:1,silent:!0}),v.style.fill=null,r.add(v)},axisTick:function(r,e,t,n,a,i){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=i[ah(t)],u=$(n,function(f){return new kt({shape:nh(t,[l,l+s],f.coord)})});r.add(Sn(u,{style:fe(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,a,i){if(a.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=i[ah(t)],f=[],c=0;cy?"left":"right",S=Math.abs(g[1]-m)/d<.3?"middle":g[1]>m?"top":"bottom";if(s&&s[p]){var b=s[p];ce(b)&&b.textStyle&&(h=new ke(b.textStyle,l,l.ecModel))}var x=new Be({silent:Nr.isLabelSilent(e),style:rt(h,{x:g[0],y:g[1],fill:h.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:c.formattedLabel,align:_,verticalAlign:S})});if(r.add(x),di({el:x,componentModel:e,itemName:c.formattedLabel,formatterParamsExtra:{isTruncated:function(){return x.isTruncated},value:c.rawLabel,tickIndex:v}}),f){var w=Nr.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=c.rawLabel,ge(x).eventData=w}},this)},splitLine:function(r,e,t,n,a,i){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var f=[],c=0;c=0?"p":"n",E=C;b&&(n[f][I]||(n[f][I]={p:C,n:C}),E=n[f][I][P]);var k=void 0,O=void 0,R=void 0,z=void 0;if(p.dim==="radius"){var V=p.dataToCoord(L)-C,G=l.dataToCoord(I);Math.abs(V)=z})}}})}function Ire(r){var e={};M(r,function(n,a){var i=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=bz(o,s),u=s.getExtent(),f=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/i.count(),c=e[l]||{bandWidth:f,remainedWidth:f,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},v=c.stacks;e[l]=c;var h=Sz(n);v[h]||c.autoWidthCount++,v[h]=v[h]||{width:0,maxWidth:0};var p=X(n.get("barWidth"),f),d=X(n.get("barMaxWidth"),f),g=n.get("barGap"),y=n.get("barCategoryGap");p&&!v[h].width&&(p=Math.min(c.remainedWidth,p),v[h].width=p,c.remainedWidth-=p),d&&(v[h].maxWidth=d),g!=null&&(c.gap=g),y!=null&&(c.categoryGap=y)});var t={};return M(e,function(n,a){t[a]={};var i=n.stacks,o=n.bandWidth,s=X(n.categoryGap,o),l=X(n.gap,1),u=n.remainedWidth,f=n.autoWidthCount,c=(u-s)/(f+(f-1)*l);c=Math.max(c,0),M(i,function(d,g){var y=d.maxWidth;y&&y=t.y&&e[1]<=t.y+t.height:n.contain(n.toLocalCoord(e[1]))&&e[0]>=t.y&&e[0]<=t.y+t.height},r.prototype.pointToData=function(e,t,n){n=n||[];var a=this.getAxis();return n[0]=a.coordToData(a.toLocalCoord(e[a.orient==="horizontal"?0:1])),n},r.prototype.dataToPoint=function(e,t,n){var a=this.getAxis(),i=this.getRect();n=n||[];var o=a.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),n[o]=a.toGlobalCoord(a.dataToCoord(+e)),n[1-o]=o===0?i.y+i.height/2:i.x+i.width/2,n},r.prototype.convertToPixel=function(e,t,n){var a=MD(t);return a===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var a=MD(t);return a===this?this.pointToData(n):null},r})();function MD(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Vre(r,e){var t=[];return r.eachComponent("singleAxis",function(n,a){var i=new Bre(n,r,e);i.name="single_"+a,i.resize(n,e),n.coordinateSystem=i,t.push(i)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var a=n.getReferringComponents("singleAxis",dt).models[0];n.coordinateSystem=a&&a.coordinateSystem}}),t}var Gre={create:Vre,dimensions:xz},DD=["x","y"],Fre=["width","height"],Hre=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,a,i,o){var s=a.axis,l=s.coordinateSystem,u=cm(l,1-Fp(s)),f=l.dataToPoint(n)[0],c=i.get("type");if(c&&c!=="none"){var v=Ab(i),h=Wre[c](s,f,u);h.style=v,t.graphicKey=h.type,t.pointer=h}var p=W_(a);dz(n,t,p,a,i,o)},e.prototype.getHandleTransform=function(t,n,a){var i=W_(n,{labelInside:!1});i.labelMargin=a.get(["handle","margin"]);var o=Mb(n.axis,t,i);return{x:o[0],y:o[1],rotation:i.rotation+(i.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,a,i){var o=a.axis,s=o.coordinateSystem,l=Fp(o),u=cm(s,l),f=[t.x,t.y];f[l]+=n[l],f[l]=Math.min(u[1],f[l]),f[l]=Math.max(u[0],f[l]);var c=cm(s,1-l),v=(c[1]+c[0])/2,h=[v,v];return h[l]=f[l],{x:f[0],y:f[1],rotation:t.rotation,cursorPoint:h,tooltipOption:{verticalAlign:"middle"}}},e})(Cb),Wre={line:function(r,e,t){var n=Db([e,t[0]],[e,t[1]],Fp(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),a=t[1]-t[0];return{type:"Rect",shape:gz([e-n/2,t[0]],[n,a],Fp(r))}}};function Fp(r){return r.isHorizontal()?0:1}function cm(r,e){var t=r.getRect();return[t[DD[e]],t[DD[e]]+t[Fre[e]]]}var $re=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e})(lt);function Zre(r){we(Xc),js.registerAxisPointerClass("SingleAxisPointer",Hre),r.registerComponentView($re),r.registerComponentView(Ore),r.registerComponentModel(Bh),su(r,"single",Bh,Bh.defaultOption),r.registerCoordinateSystem("single",Gre)}var Ure=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n,a){var i=Us(t);r.prototype.init.apply(this,arguments),ID(t,i)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),ID(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.layoutMode="box",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:B.color.axisLine,width:1,type:"solid"}},itemStyle:{color:B.color.neutral00,borderWidth:1,borderColor:B.color.neutral10},dayLabel:{show:!0,firstDay:0,position:"start",margin:B.size.s,color:B.color.secondary},monthLabel:{show:!0,position:"start",margin:B.size.s,align:"center",formatter:null,color:B.color.secondary},yearLabel:{show:!0,position:null,margin:B.size.xl,formatter:null,color:B.color.quaternary,fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e})(Le);function ID(r,e){var t=r.cellSize,n;W(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var a=$([0,1],function(i){return P$(e,i)&&(n[i]="auto"),n[i]!=null&&n[i]!=="auto"});Ia(r,e,{type:"box",ignoreSize:a})}var Yre=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){var i=this.group;i.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,i),this._renderLines(t,s,l,i),this._renderYearText(t,s,l,i),this._renderMonthText(t,u,l,i),this._renderWeekText(t,u,s,l,i)},e.prototype._renderDayRect=function(t,n,a){for(var i=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=i.getCellWidth(),l=i.getCellHeight(),u=n.start.time;u<=n.end.time;u=i.getNextNDay(u,1).time){var f=i.dataToCalendarLayout([u],!1).tl,c=new Ce({shape:{x:f[0],y:f[1],width:s,height:l},cursor:"default",style:o});a.add(c)}},e.prototype._renderLines=function(t,n,a,i){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),f=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var c=n.start,v=0;c.time<=n.end.time;v++){p(c.formatedDate),v===0&&(c=s.getDateInfo(n.start.y+"-"+n.start.m));var h=c.date;h.setMonth(h.getMonth()+1),c=s.getDateInfo(h)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(d){o._firstDayOfMonth.push(s.getDateInfo(d)),o._firstDayPoints.push(s.dataToCalendarLayout([d],!1).tl);var g=o._getLinePointsOfOneWeek(t,d,a);o._tlpoints.push(g[0]),o._blpoints.push(g[g.length-1]),u&&o._drawSplitline(g,l,i)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,f,a),l,i),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,f,a),l,i)},e.prototype._getEdgesPoints=function(t,n,a){var i=[t[0].slice(),t[t.length-1].slice()],o=a==="horizontal"?0:1;return i[0][o]=i[0][o]-n/2,i[1][o]=i[1][o]+n/2,i},e.prototype._drawSplitline=function(t,n,a){var i=new pr({z2:20,shape:{points:t},style:n});a.add(i)},e.prototype._getLinePointsOfOneWeek=function(t,n,a){for(var i=t.coordinateSystem,o=i.getDateInfo(n),s=[],l=0;l<7;l++){var u=i.getNextNDay(o.time,l),f=i.dataToCalendarLayout([u.time],!1);s[2*u.day]=f.tl,s[2*u.day+1]=f[a==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return q(t)&&t?C$(t,n):ie(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,a,i,o){var s=n[0],l=n[1],u=["center","bottom"];i==="bottom"?(l+=o,u=["center","top"]):i==="left"?s-=o:i==="right"?(s+=o,u=["center","top"]):l-=o;var f=0;return(i==="left"||i==="right")&&(f=Math.PI/2),{rotation:f,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,a,i){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=a!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],f=(u[0][0]+u[1][0])/2,c=(u[0][1]+u[1][1])/2,v=a==="horizontal"?0:1,h={top:[f,u[v][1]],bottom:[f,u[1-v][1]],left:[u[1-v][0],c],right:[u[v][0],c]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var d=o.get("formatter"),g={start:n.start.y,end:n.end.y,nameMap:p},y=this._formatterLabel(d,g),m=new Be({z2:30,style:rt(o,{text:y}),silent:o.get("silent")});m.attr(this._yearTextPositionControl(m,h[l],a,l,s)),i.add(m)}},e.prototype._monthTextPositionControl=function(t,n,a,i,o){var s="left",l="top",u=t[0],f=t[1];return a==="horizontal"?(f=f+o,n&&(s="center"),i==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),i==="start"&&(s="right")),{x:u,y:f,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,a,i){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),f=o.get("align"),c=[this._tlpoints,this._blpoints];(!s||q(s))&&(s&&(n=B0(s)||n),s=n.get(["time","monthAbbr"])||[]);var v=u==="start"?0:1,h=a==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=f==="center",d=o.get("silent"),g=0;g=i.start.time&&a.times.end.time&&t.reverse(),t},r.prototype._getRangeInfo=function(e){var t=[this.getDateInfo(e[0]),this.getDateInfo(e[1])],n;t[0].time>t[1].time&&(n=!0,t.reverse());var a=Math.floor(t[1].time/vm)-Math.floor(t[0].time/vm)+1,i=new Date(t[0].time),o=i.getDate(),s=t[1].date.getDate();i.setDate(o+a-1);var l=i.getDate();if(l!==s)for(var u=i.getTime()-t[1].time>0?1:-1;(l=i.getDate())!==s&&(i.getTime()-t[1].time)*u>0;)a-=u,i.setDate(l-u);var f=Math.floor((a+t[0].day+6)/7),c=n?-f+1:f-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:a,weeks:f,nthWeek:c,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var a=this._getRangeInfo(n);if(e>a.weeks||e===0&&ta.lweek)return null;var i=(e-1)*7-a.fweek+t,o=new Date(a.start.time);return o.setDate(+a.start.d+i),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(a){var i=new r(a,e,t);n.push(i),a.coordinateSystem=i}),e.eachComponent(function(a,i){Vc({targetModel:i,coordSysType:"calendar",coordSysProvider:Zk})}),n},r.dimensions=["time","value"],r})();function hm(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}function qre(r){r.registerComponentModel(Ure),r.registerComponentView(Yre),r.registerCoordinateSystem("calendar",Xre)}var Ua={level:1,leaf:2,nonLeaf:3},ni={none:0,all:1,body:2,corner:3};function $_(r,e,t){var n=e[me[t]].getCell(r);return!n&&ze(r)&&r<0&&(n=e[me[1-t]].getUnitLayoutInfo(t,Math.round(r))),n}function wz(r){var e=r||[];return e[0]=e[0]||[],e[1]=e[1]||[],e[0][0]=e[0][1]=e[1][0]=e[1][1]=NaN,e}function Tz(r,e,t,n,a){LD(r[0],e,a,t,n,0),LD(r[1],e,a,t,n,1)}function LD(r,e,t,n,a,i){r[0]=1/0,r[1]=-1/0;var o=n[i],s=W(o)?o:[o],l=s.length,u=!!t;if(l>=1?(PD(r,e,s,u,a,i,0),l>1&&PD(r,e,s,u,a,i,l-1)):r[0]=r[1]=NaN,u){var f=-a[me[1-i]].getLocatorCount(i),c=a[me[i]].getLocatorCount(i)-1;t===ni.body?f=Ct(0,f):t===ni.corner&&(c=an(-1,c)),c=e[0]&&r[0]<=e[1]}function RD(r,e){r.id.set(e[0][0],e[1][0]),r.span.set(e[0][1]-r.id.x+1,e[1][1]-r.id.y+1)}function Jre(r,e){r[0][0]=e[0][0],r[0][1]=e[0][1],r[1][0]=e[1][0],r[1][1]=e[1][1]}function OD(r,e,t,n){var a=$_(e[n][0],t,n),i=$_(e[n][1],t,n);r[me[n]]=r[Rt[n]]=NaN,a&&i&&(r[me[n]]=a.xy,r[Rt[n]]=i.xy+i.wh-a.xy)}function sf(r,e,t,n){return r[me[e]]=t,r[me[1-e]]=n,r}function Qre(r){return r&&(r.type===Ua.leaf||r.type===Ua.nonLeaf)?r:null}function Hp(){return{x:NaN,y:NaN,width:NaN,height:NaN}}var ND=(function(){function r(e,t){this._cells=[],this._levels=[],this.dim=e,this.dimIdx=e==="x"?0:1,this._model=t,this._uniqueValueGen=ene(e);var n=t.get("data",!0);n!=null&&!W(n)&&(n=[]),n?this._initByDimModelData(n):this._initBySeriesData()}return r.prototype._initByDimModelData=function(e){var t=this,n=t._cells,a=t._levels,i=[],o=0;t._leavesCount=s(e,0,0),l();return;function s(u,f,c){var v=0;return u&&M(u,function(h,p){var d;q(h)?d={value:h}:ce(h)?(d=h,h.value!=null&&!q(h.value)&&(d={value:null})):d={value:null};var g={type:Ua.nonLeaf,ordinal:NaN,level:c,firstLeafLocator:f,id:new ue,span:sf(new ue,t.dimIdx,1,1),option:d,xy:NaN,wh:NaN,dim:t,rect:Hp()};o++,(i[f]||(i[f]=[])).push(g),a[c]||(a[c]={type:Ua.level,xy:NaN,wh:NaN,option:null,id:new ue,dim:t});var y=s(d.children,f,c+1),m=Math.max(1,y);g.span[me[t.dimIdx]]=m,v+=m,f+=m}),v}function l(){for(var u=[];n.length=1,_=t[me[n]],S=i.getLocatorCount(n)-1,b=new Qi;for(o.resetLayoutIterator(b,n);b.next();)x(b.item);for(i.resetLayoutIterator(b,n);b.next();)x(b.item);function x(w){mr(w.wh)&&(w.wh=y),w.xy=_,w.id[me[n]]===S&&!m&&(w.wh=t[me[n]]+t[Rt[n]]-w.xy),_+=w.wh}}function WD(r,e){for(var t=e[me[r]].resetCellIterator();t.next();){var n=t.item;Wp(n.rect,r,n.id,n.span,e),Wp(n.rect,1-r,n.id,n.span,e),n.type===Ua.nonLeaf&&(n.xy=n.rect[me[r]],n.wh=n.rect[Rt[r]])}}function $D(r,e){r.travelExistingCells(function(t){var n=t.span;if(n){var a=t.spanRect,i=t.id;Wp(a,0,i,n,e),Wp(a,1,i,n,e)}})}function Wp(r,e,t,n,a){r[Rt[e]]=0;var i=t[me[e]],o=i<0?a[me[1-e]]:a[me[e]],s=o.getUnitLayoutInfo(e,t[me[e]]);if(r[me[e]]=s.xy,r[Rt[e]]=s.wh,n[me[e]]>1){var l=o.getUnitLayoutInfo(e,t[me[e]]+n[me[e]]-1);r[Rt[e]]=l.xy+l.wh-s.xy}}function hne(r,e,t){var n=ap(r,t[Rt[e]]);return U_(n,t[Rt[e]])}function U_(r,e){return Math.max(Math.min(r,re(e,1/0)),0)}function gm(r){var e=r.matrixModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}var sr={inBody:1,inCorner:2,outside:3},ia={x:null,y:null,point:[]};function ZD(r,e,t,n,a){var i=t[me[e]],o=t[me[1-e]],s=i.getUnitLayoutInfo(e,i.getLocatorCount(e)-1),l=i.getUnitLayoutInfo(e,0),u=o.getUnitLayoutInfo(e,-o.getLocatorCount(e)),f=o.shouldShow()?o.getUnitLayoutInfo(e,-1):null,c=r.point[e]=n[e];if(!l&&!f){r[me[e]]=sr.outside;return}if(a===ni.body){l?(r[me[e]]=sr.inBody,c=an(s.xy+s.wh,Ct(l.xy,c)),r.point[e]=c):r[me[e]]=sr.outside;return}else if(a===ni.corner){f?(r[me[e]]=sr.inCorner,c=an(f.xy+f.wh,Ct(u.xy,c)),r.point[e]=c):r[me[e]]=sr.outside;return}var v=l?l.xy:f?f.xy+f.wh:NaN,h=u?u.xy:v,p=s?s.xy+s.wh:v;if(cp){if(!a){r[me[e]]=sr.outside;return}c=p}r.point[e]=c,r[me[e]]=v<=c&&c<=p?sr.inBody:h<=c&&c<=v?sr.inCorner:sr.outside}function UD(r,e,t,n){var a=1-t;if(r[me[t]]!==sr.outside)for(n[me[t]].resetCellIterator(dm);dm.next();){var i=dm.item;if(XD(r.point[t],i.rect,t)&&XD(r.point[a],i.rect,a)){e[t]=i.ordinal,e[a]=i.id[me[a]];return}}}function YD(r,e,t,n){if(r[me[t]]!==sr.outside){var a=r[me[t]]===sr.inCorner?n[me[1-t]]:n[me[t]];for(a.resetLayoutIterator(uh,t);uh.next();)if(pne(r.point[t],uh.item)){e[t]=uh.item.id[me[t]];return}}}function pne(r,e){return e.xy<=r&&r<=e.xy+e.wh}function XD(r,e,t){return e[me[t]]<=r&&r<=e[me[t]]+e[Rt[t]]}function dne(r){r.registerComponentModel(ane),r.registerComponentView(une),r.registerCoordinateSystem("matrix",vne)}function gne(r,e){var t=r.existing;if(e.id=r.keyInfo.id,!e.type&&t&&(e.type=t.type),e.parentId==null){var n=e.parentOption;n?e.parentId=n.id:t&&(e.parentId=t.parentId)}e.parentOption=null}function qD(r,e){var t;return M(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function yne(r,e,t){var n=H({},t),a=r[e],i=t.$action||"merge";i==="merge"?a?(xe(a,n,!0),Ia(a,n,{ignoreSize:!0}),jk(t,a),fh(t,a),fh(t,a,"shape"),fh(t,a,"style"),fh(t,a,"extra"),t.clipPath=a.clipPath):r[e]=n:i==="replace"?r[e]=n:i==="remove"&&a&&(r[e]=null)}var Az=["transition","enterFrom","leaveTo"],mne=Az.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function fh(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?Az:mne,a=0;a=0;f--){var c=a[f],v=Gt(c.id,null),h=v!=null?o.get(v):null;if(h){var p=h.parent,y=gn(p),m=p===i?{width:s,height:l}:{width:y.width,height:y.height},_={},S=Rd(h,c,m,null,{hv:c.hv,boundingMode:c.bounding},_);if(!gn(h).isNew&&S){for(var b=c.transition,x={},w=0;w=0)?x[T]=C:h[T]=C}Ve(h,x,t,0)}else h.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(a){Vh(a,gn(a).option,n,t._lastGraphicModel)}),this._elMap=te()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e})(lt);function Y_(r){var e=Q(jD,r)?jD[r]:up(r),t=new e({});return gn(t).type=r,t}function KD(r,e,t,n){var a=Y_(t);return e.add(a),n.set(r,a),gn(a).id=r,gn(a).isNew=!0,a}function Vh(r,e,t,n){var a=r&&r.parent;a&&(r.type==="group"&&r.traverse(function(i){Vh(i,e,t,n)}),qd(r,e,n),t.removeKey(gn(r).id))}function JD(r,e,t,n){r.isGroup||M([["cursor",In.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(a){var i=a[0];Q(e,i)?r[i]=re(e[i],a[1]):r[i]==null&&(r[i]=a[1])}),M(Re(e),function(a){if(a.indexOf("on")===0){var i=e[a];r[a]=ie(i)?i:null}}),Q(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function xne(r){return r=H({},r),M(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(Uk),function(e){delete r[e]}),r}function wne(r,e,t){var n=ge(r).eventData;!r.silent&&!r.ignore&&!n&&(n=ge(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function Tne(r){r.registerComponentModel(Sne),r.registerComponentView(bne),r.registerPreprocessor(function(e){var t=e.graphic;W(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var QD=["x","y","radius","angle","single"],Cne=["cartesian2d","polar","singleAxis"];function Ane(r){var e=r.get("coordinateSystem");return be(Cne,e)>=0}function Zi(r){return r+"Axis"}function Mne(r,e){var t=te(),n=[],a=te();r.eachComponent({mainType:"dataZoom",query:e},function(f){a.get(f.uid)||s(f)});var i;do i=!1,r.eachComponent("dataZoom",o);while(i);function o(f){!a.get(f.uid)&&l(f)&&(s(f),i=!0)}function s(f){a.set(f.uid,!0),n.push(f),u(f)}function l(f){var c=!1;return f.eachTargetAxis(function(v,h){var p=t.get(v);p&&p[h]&&(c=!0)}),c}function u(f){f.eachTargetAxis(function(c,v){(t.get(c)||t.set(c,[]))[v]=!0})}return n}function Mz(r){var e=r.ecModel,t={infoList:[],infoMap:te()};return r.eachTargetAxis(function(n,a){var i=e.getComponent(Zi(n),a);if(i){var o=i.getCoordSysModel();if(o){var s=o.uid,l=t.infoMap.get(s);l||(l={model:o,axisModels:[]},t.infoList.push(l),t.infoMap.set(s,l)),l.axisModels.push(i)}}}),t}var ym=(function(){function r(){this.indexList=[],this.indexMap=[]}return r.prototype.add=function(e){this.indexMap[e]||(this.indexList.push(e),this.indexMap[e]=!0)},r})(),wc=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._autoThrottle=!0,t._noTarget=!0,t._rangePropMode=["percent","percent"],t}return e.prototype.init=function(t,n,a){var i=e2(t);this.settledOption=i,this.mergeDefaultAndTheme(t,a),this._doInit(i)},e.prototype.mergeOption=function(t){var n=e2(t);xe(this.option,t,!0),xe(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var a=this.settledOption;M([["start","startValue"],["end","endValue"]],function(i,o){this._rangePropMode[o]==="value"&&(n[i[0]]=a[i[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=te(),a=this._fillSpecifiedTargetAxis(n);a?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(i){i.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return M(QD,function(a){var i=this.getReferringComponents(Zi(a),o8);if(i.specified){n=!0;var o=new ym;M(i.models,function(s){o.add(s.componentIndex)}),t.set(a,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var a=this.ecModel,i=!0;if(i){var o=n==="vertical"?"y":"x",s=a.findComponents({mainType:o+"Axis"});l(s,o)}if(i){var s=a.findComponents({mainType:"singleAxis",filter:function(f){return f.get("orient",!0)===n}});l(s,"single")}function l(u,f){var c=u[0];if(c){var v=new ym;if(v.add(c.componentIndex),t.set(f,v),i=!1,f==="x"||f==="y"){var h=c.getReferringComponents("grid",dt).models[0];h&&M(u,function(p){c.componentIndex!==p.componentIndex&&h===p.getReferringComponents("grid",dt).models[0]&&v.add(p.componentIndex)})}}}i&&M(QD,function(u){if(i){var f=a.findComponents({mainType:Zi(u),filter:function(v){return v.get("type",!0)==="category"}});if(f[0]){var c=new ym;c.add(f[0].componentIndex),t.set(u,c),i=!1}}},this)},e.prototype._makeAutoOrientByTargetAxis=function(){var t;return this.eachTargetAxis(function(n){!t&&(t=n)},this),t==="y"?"vertical":"horizontal"},e.prototype._setDefaultThrottle=function(t){if(t.hasOwnProperty("throttle")&&(this._autoThrottle=!1),this._autoThrottle){var n=this.ecModel.option;this.option.throttle=n.animation&&n.animationDurationUpdate>0?100:20}},e.prototype._updateRangeUse=function(t){var n=this._rangePropMode,a=this.get("rangeMode");M([["start","startValue"],["end","endValue"]],function(i,o){var s=t[i[0]]!=null,l=t[i[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":a?n[o]=a[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,a){t==null&&(t=this.ecModel.getComponent(Zi(n),a))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(a,i){M(a.indexList,function(o){t.call(n,i,o)})})},e.prototype.getAxisProxy=function(t,n){var a=this.getAxisModel(t,n);if(a)return a.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var a=this._targetAxisInfoMap.get(t);if(a&&a.indexMap[n])return this.ecModel.getComponent(Zi(t),n)},e.prototype.setRawRange=function(t){var n=this.option,a=this.settledOption;M([["start","startValue"],["end","endValue"]],function(i){(t[i[0]]!=null||t[i[1]]!=null)&&(n[i[0]]=a[i[0]]=t[i[0]],n[i[1]]=a[i[1]]=t[i[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;M(["start","startValue","end","endValue"],function(a){n[a]=t[a]})},e.prototype.getPercentRange=function(){var t=this.findRepresentativeAxisProxy();if(t)return t.getDataPercentWindow()},e.prototype.getValueRange=function(t,n){if(t==null&&n==null){var a=this.findRepresentativeAxisProxy();if(a)return a.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,a=this._targetAxisInfoMap.keys(),i=0;io[1];if(_&&!S&&!b)return!0;_&&(g=!0),S&&(p=!0),b&&(d=!0)}return g&&p&&d})}else Il(f,function(h){if(i==="empty")l.setData(u=u.map(h,function(d){return s(d)?d:NaN}));else{var p={};p[h]=o,u.selectRange(p)}});Il(f,function(h){u.setApproximateExtent(o,h)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;Il(["min","max"],function(a){var i=t.get(a+"Span"),o=t.get(a+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?i=$e(n[0]+o,n,[0,100],!0):i!=null&&(o=$e(i,[0,100],n,!0)-n[0]),e[a+"Span"]=i,e[a+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var a=IP(n,[0,500]);a=Math.min(a,20);var i=e.axis.scale.rawExtentInfo;t[0]!==0&&i.setDeterminedMinMax("min",+n[0].toFixed(a)),t[1]!==100&&i.setDeterminedMinMax("max",+n[1].toFixed(a)),i.freeze()}},r})();function Pne(r,e,t){var n=[1/0,-1/0];Il(t,function(o){u7(n,o.getData(),e)});var a=r.getAxisModel(),i=AR(a.axis.scale,a,n).calculate();return[i.min,i.max]}var kne={getTargetSeries:function(r){function e(a){r.eachComponent("dataZoom",function(i){i.eachTargetAxis(function(o,s){var l=r.getComponent(Zi(o),s);a(o,s,l,i)})})}e(function(a,i,o,s){o.__dzAxisProxy=null});var t=[];e(function(a,i,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Lne(a,i,s,r),t.push(o.__dzAxisProxy))});var n=te();return M(t,function(a){M(a.getTargetSeriesModels(),function(i){n.set(i.uid,i)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).reset(t)}),t.eachTargetAxis(function(n,a){t.getAxisProxy(n,a).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var a=n.getDataPercentWindow(),i=n.getDataValueWindow();t.setCalculatedRange({start:a[0],end:a[1],startValue:i[0],endValue:i[1]})}})}};function Ene(r){r.registerAction("dataZoom",function(e,t){var n=Mne(t,e);M(n,function(a){a.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var r2=!1;function Ob(r){r2||(r2=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,kne),Ene(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Rne(r){r.registerComponentModel(Dne),r.registerComponentView(Ine),Ob(r)}var _n=(function(){function r(){}return r})(),Dz={};function Ll(r,e){Dz[r]=e}function Iz(r){return Dz[r]}var One=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){r.prototype.optionUpdated.apply(this,arguments);var t=this.ecModel;M(this.option.feature,function(n,a){var i=Iz(a);i&&(i.getDefaultOption&&(i.defaultOption=i.getDefaultOption(t)),xe(n,i.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:B.size.m,itemSize:15,itemGap:B.size.s,showTitle:!0,iconStyle:{borderColor:B.color.accent50,color:"none"},emphasis:{iconStyle:{borderColor:B.color.accent50}},tooltip:{show:!1,position:"bottom"}},e})(Le);function Lz(r,e){var t=zc(e.get("padding")),n=e.getItemStyle(["color","opacity"]);n.fill=e.get("backgroundColor");var a=new Ce({shape:{x:r.x-t[3],y:r.y-t[0],width:r.width+t[1]+t[3],height:r.height+t[0]+t[2],r:e.get("borderRadius")},style:n,silent:!0,z2:-1});return a}var Nne=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){var o=this.group;if(o.removeAll(),!t.get("show"))return;var s=+t.get("itemSize"),l=t.get("orient")==="vertical",u=t.get("feature")||{},f=this._features||(this._features={}),c=[];M(u,function(m,_){c.push(_)}),new ui(this._featureNames||[],c).add(v).update(v).remove(Se(v,null)).execute(),this._featureNames=c;function v(m,_){var S=c[m],b=c[_],x=u[S],w=new ke(x,t,t.ecModel),T;if(i&&i.newTitle!=null&&i.featureName===S&&(x.title=i.newTitle),S&&!b){if(zne(S))T={onclick:w.option.onclick,featureName:S};else{var C=Iz(S);if(!C)return;T=new C}f[S]=T}else if(T=f[b],!T)return;T.uid=Tu("toolbox-feature"),T.model=w,T.ecModel=n,T.api=a;var A=T instanceof _n;if(!S&&b){A&&T.dispose&&T.dispose(n,a);return}if(!w.get("show")||A&&T.unusable){A&&T.remove&&T.remove(n,a);return}h(w,T,S),w.setIconStatus=function(D,L){var I=this.option,P=this.iconPaths;I.iconStatus=I.iconStatus||{},I.iconStatus[D]=L,P[D]&&(L==="emphasis"?si:li)(P[D])},T instanceof _n&&T.render&&T.render(w,n,a,i)}function h(m,_,S){var b=m.getModel("iconStyle"),x=m.getModel(["emphasis","iconStyle"]),w=_ instanceof _n&&_.getIcons?_.getIcons():m.get("icon"),T=m.get("title")||{},C,A;q(w)?(C={},C[S]=w):C=w,q(T)?(A={},A[S]=T):A=T;var D=m.iconPaths={};M(C,function(L,I){var P=Nc(L,{},{x:-s/2,y:-s/2,width:s,height:s});P.setStyle(b.getItemStyle());var E=P.ensureState("emphasis");E.style=x.getItemStyle();var k=new Be({style:{text:A[I],align:x.get("textAlign"),borderRadius:x.get("textBorderRadius"),padding:x.get("textPadding"),fill:null,font:tS({fontStyle:x.get("textFontStyle"),fontFamily:x.get("textFontFamily"),fontSize:x.get("textFontSize"),fontWeight:x.get("textFontWeight")},n)},ignore:!0});P.setTextContent(k),di({el:P,componentModel:t,itemName:I,formatterParamsExtra:{title:A[I]}}),P.__title=A[I],P.on("mouseover",function(){var O=x.getItemStyle(),R=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";k.setStyle({fill:x.get("textFill")||O.fill||O.stroke||B.color.neutral99,backgroundColor:x.get("textBackgroundColor")}),P.setTextConfig({position:x.get("textPosition")||R}),k.ignore=!t.get("showTitle"),a.enterEmphasis(this)}).on("mouseout",function(){m.get(["iconStatus",I])!=="emphasis"&&a.leaveEmphasis(this),k.hide()}),(m.get(["iconStatus",I])==="emphasis"?si:li)(P),o.add(P),P.on("click",j(_.onclick,_,n,a,I)),D[I]=P})}var p=Zt(t,a).refContainer,d=t.getBoxLayoutParams(),g=t.get("padding"),y=ft(d,p,g);bs(t.get("orient"),o,t.get("itemGap"),y.width,y.height),Rd(o,d,p,g),o.add(Lz(o.getBoundingRect(),t)),l||o.eachChild(function(m){var _=m.__title,S=m.ensureState("emphasis"),b=S.textConfig||(S.textConfig={}),x=m.getTextContent(),w=x&&x.ensureState("emphasis");if(w&&!ie(w)&&_){var T=w.style||(w.style={}),C=yd(_,Be.makeFont(T)),A=m.x+o.x,D=m.y+o.y+s,L=!1;D+C.height>a.getHeight()&&(b.position="top",L=!0);var I=L?-5-C.height:s+10;A+C.width/2>a.getWidth()?(b.position=["100%",I],T.align="right"):A-C.width/2<0&&(b.position=[0,I],T.align="left")}})},e.prototype.updateView=function(t,n,a,i){M(this._features,function(o){o instanceof _n&&o.updateView&&o.updateView(o.model,n,a,i)})},e.prototype.remove=function(t,n){M(this._features,function(a){a instanceof _n&&a.remove&&a.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){M(this._features,function(a){a instanceof _n&&a.dispose&&a.dispose(t,n)})},e.type="toolbox",e})(lt);function zne(r){return r.indexOf("my")===0}var Bne=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var a=this.model,i=a.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":a.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:a.get("backgroundColor",!0)||t.get("backgroundColor")||B.color.neutral00,connectedBackgroundColor:a.get("connectedBackgroundColor"),excludeComponents:a.get("excludeComponents"),pixelRatio:a.get("pixelRatio")}),u=Pe.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var f=document.createElement("a");f.download=i+"."+s,f.target="_blank",f.href=l;var c=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});f.dispatchEvent(c)}else if(window.navigator.msSaveOrOpenBlob||o){var v=l.split(","),h=v[0].indexOf("base64")>-1,p=o?decodeURIComponent(v[1]):v[1];h&&(p=window.atob(p));var d=i+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var g=p.length,y=new Uint8Array(g);g--;)y[g]=p.charCodeAt(g);var m=new Blob([y]);window.navigator.msSaveOrOpenBlob(m,d)}else{var _=document.createElement("iframe");document.body.appendChild(_);var S=_.contentWindow,b=S.document;b.open("image/svg+xml","replace"),b.write(p),b.close(),S.focus(),b.execCommand("SaveAs",!0,d),document.body.removeChild(_)}}else{var x=a.get("lang"),w='',T=window.open();T.document.write(w),T.document.title=i}},e.getDefaultOption=function(t){var n={show:!0,icon:"M4.7,22.9L29.3,45.5L54.7,23.4M4.6,43.6L4.6,58L53.8,58L53.8,43.6M29.2,45.1L29.2,0",title:t.getLocaleModel().get(["toolbox","saveAsImage","title"]),type:"png",connectedBackgroundColor:B.color.neutral00,name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e})(_n),n2="__ec_magicType_stack__",Vne=[["line","bar"],["stack"]],Gne=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getIcons=function(){var t=this.model,n=t.get("icon"),a={};return M(t.get("type"),function(i){n[i]&&(a[i]=n[i])}),a},e.getDefaultOption=function(t){var n={show:!0,type:[],icon:{line:"M4.1,28.9h7.1l9.3-22l7.4,38l9.7-19.7l3,12.8h14.9M4.1,58h51.4",bar:"M6.7,22.9h10V48h-10V22.9zM24.9,13h10v35h-10V13zM43.2,2h10v46h-10V2zM3.1,58h53.7",stack:"M8.2,38.4l-8.4,4.1l30.6,15.3L60,42.5l-8.1-4.1l-21.5,11L8.2,38.4z M51.9,30l-8.1,4.2l-13.4,6.9l-13.9-6.9L8.2,30l-8.4,4.2l8.4,4.2l22.2,11l21.5-11l8.1-4.2L51.9,30z M51.9,21.7l-8.1,4.2L35.7,30l-5.3,2.8L24.9,30l-8.4-4.1l-8.3-4.2l-8.4,4.2L8.2,30l8.3,4.2l13.9,6.9l13.4-6.9l8.1-4.2l8.1-4.1L51.9,21.7zM30.4,2.2L-0.2,17.5l8.4,4.1l8.3,4.2l8.4,4.2l5.5,2.7l5.3-2.7l8.1-4.2l8.1-4.2l8.1-4.1L30.4,2.2z"},title:t.getLocaleModel().get(["toolbox","magicType","title"]),option:{},seriesIndex:{}};return n},e.prototype.onclick=function(t,n,a){var i=this.model,o=i.get(["seriesIndex",a]);if(a2[a]){var s={series:[]},l=function(c){var v=c.subType,h=c.id,p=a2[a](v,h,c,i);p&&(fe(p,c.option),s.series.push(p));var d=c.coordinateSystem;if(d&&d.type==="cartesian2d"&&(a==="line"||a==="bar")){var g=d.getAxesByScale("ordinal")[0];if(g){var y=g.dim,m=y+"Axis",_=c.getReferringComponents(m,dt).models[0],S=_.componentIndex;s[m]=s[m]||[];for(var b=0;b<=S;b++)s[m][S]=s[m][S]||{};s[m][S].boundaryGap=a==="bar"}}};M(Vne,function(c){be(c,a)>=0&&M(c,function(v){i.setIconStatus(v,"normal")})}),i.setIconStatus(a,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,f=a;a==="stack"&&(u=xe({stack:i.option.title.tiled,tiled:i.option.title.stack},i.option.title),i.get(["iconStatus",a])!=="emphasis"&&(f="tiled")),n.dispatchAction({type:"changeMagicType",currentType:f,newOption:s,newTitle:u,featureName:"magicType"})}},e})(_n),a2={line:function(r,e,t,n){if(r==="bar")return xe({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return xe({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var a=t.get("stack")===n2;if(r==="line"||r==="bar")return n.setIconStatus("stack",a?"normal":"emphasis"),xe({id:e,stack:a?"":n2},n.get(["option","stack"])||{},!0)}};Ea({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});var jd=new Array(60).join("-"),cu=" ";function Fne(r){var e={},t=[],n=[];return r.eachRawSeries(function(a){var i=a.coordinateSystem;if(i&&(i.type==="cartesian2d"||i.type==="polar")){var o=i.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:i.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(a)}else t.push(a)}else t.push(a)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function Hne(r){var e=[];return M(r,function(t,n){var a=t.categoryAxis,i=t.valueAxis,o=i.dim,s=[" "].concat($(t.series,function(h){return h.name})),l=[a.model.getCategories()];M(t.series,function(h){var p=h.getRawData();l.push(h.getRawData().mapArray(p.mapDimension(o),function(d){return d}))});for(var u=[s.join(cu)],f=0;f=0)return!0}var X_=new RegExp("["+cu+"]+","g");function Une(r){for(var e=r.split(/\n+/g),t=$p(e.shift()).split(X_),n=[],a=$(t,function(l){return{name:l,data:[]}}),i=0;i=0;i--){var o=t[i];if(o[a])break}if(i<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:a})[0];if(s){var l=s.getPercentRange();t[0][a]={dataZoomId:a,start:l[0],end:l[1]}}}}),t.push(e)}function Jne(r){var e=Nb(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return Pz(t,function(a,i){for(var o=e.length-1;o>=0;o--)if(a=e[o][i],a){n[i]=a;break}}),n}function Qne(r){kz(r).snapshots=null}function eae(r){return Nb(r).length}function Nb(r){var e=kz(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var tae=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){Qne(t),n.dispatchAction({type:"restore",from:this.uid})},e.getDefaultOption=function(t){var n={show:!0,icon:"M3.8,33.4 M47,18.9h9.8V8.7 M56.3,20.1 C52.1,9,40.5,0.6,26.8,2.1C12.6,3.7,1.6,16.2,2.1,30.6 M13,41.1H3.1v10.2 M3.7,39.9c4.2,11.1,15.8,19.5,29.5,18 c14.2-1.6,25.2-14.1,24.7-28.5",title:t.getLocaleModel().get(["toolbox","restore","title"])};return n},e})(_n);Ea({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});var rae=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],zb=(function(){function r(e,t,n){var a=this;this._targetInfoList=[];var i=i2(t,e);M(nae,function(o,s){(!n||!n.include||be(n.include,s)>=0)&&o(i,a._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,a,i){if((n.coordRanges||(n.coordRanges=[])).push(a),!n.coordRange){n.coordRange=a;var o=mm[n.brushType](0,i,a);n.__rangeOffset={offset:u2[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){M(e,function(a){var i=this.findTargetInfo(a,t);i&&i!==!0&&M(i.coordSyses,function(o){var s=mm[a.brushType](1,o,a.range,!0);n(a,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){M(e,function(n){var a=this.findTargetInfo(n,t);if(n.range=n.range||[],a&&a!==!0){n.panelId=a.panelId;var i=mm[n.brushType](0,a.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?u2[n.brushType](i.values,o.offset,aae(i.xyMinMax,o.xyMinMax)):i.values}},this)},r.prototype.makePanelOpts=function(e,t){return $(this._targetInfoList,function(n){var a=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:zN(a),isTargetByCursor:VN(a,e,n.coordSysModel),getLinearBrushOtherExtent:BN(a)}})},r.prototype.controlSeries=function(e,t,n){var a=this.findTargetInfo(e,n);return a===!0||a&&be(a.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,a=i2(t,e),i=0;ir[1]&&r.reverse(),r}function i2(r,e){return Wl(r,e,{includeMainTypes:rae})}var nae={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,a=r.gridModels,i=te(),o={},s={};!t&&!n&&!a||(M(t,function(l){var u=l.axis.grid.model;i.set(u.id,u),o[u.id]=!0}),M(n,function(l){var u=l.axis.grid.model;i.set(u.id,u),s[u.id]=!0}),M(a,function(l){i.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),i.each(function(l){var u=l.coordinateSystem,f=[];M(u.getCartesians(),function(c,v){(be(t,c.getAxis("x").model)>=0||be(n,c.getAxis("y").model)>=0)&&f.push(c)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:f[0],coordSyses:f,getPanelRect:s2.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){M(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:s2.geo})})}},o2=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,a=r.gridModel;return!a&&t&&(a=t.axis.grid.model),!a&&n&&(a=n.axis.grid.model),a&&a===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],s2={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Ss(r)),e}},mm={lineX:Se(l2,0),lineY:Se(l2,1),rect:function(r,e,t,n){var a=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),i=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[q_([a[0],i[0]]),q_([a[1],i[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var a=[[1/0,-1/0],[1/0,-1/0]],i=$(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return a[0][0]=Math.min(a[0][0],s[0]),a[1][0]=Math.min(a[1][0],s[1]),a[0][1]=Math.max(a[0][1],s[0]),a[1][1]=Math.max(a[1][1],s[1]),s});return{values:i,xyMinMax:a}}};function l2(r,e,t,n){var a=t.getAxis(["x","y"][r]),i=q_($([0,1],function(s){return e?a.coordToData(a.toLocalCoord(n[s]),!0):a.toGlobalCoord(a.dataToCoord(n[s]))})),o=[];return o[r]=i,o[1-r]=[NaN,NaN],{values:i,xyMinMax:o}}var u2={lineX:Se(f2,0),lineY:Se(f2,1),rect:function(r,e,t){return[[r[0][0]-t[0]*e[0][0],r[0][1]-t[0]*e[0][1]],[r[1][0]-t[1]*e[1][0],r[1][1]-t[1]*e[1][1]]]},polygon:function(r,e,t){return $(r,function(n,a){return[n[0]-t[0]*e[a][0],n[1]-t[1]*e[a][1]]})}};function f2(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function aae(r,e){var t=c2(r),n=c2(e),a=[t[0]/n[0],t[1]/n[1]];return isNaN(a[0])&&(a[0]=1),isNaN(a[1])&&(a[1]=1),a}function c2(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}var j_=M,iae=t8("toolbox-dataZoom_"),oae=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a,i){this._brushController||(this._brushController=new lb(a.getZr()),this._brushController.on("brush",j(this._onBrush,this)).mount()),uae(t,n,this,i,a),lae(t,n)},e.prototype.onclick=function(t,n,a){sae[a].call(this)},e.prototype.remove=function(t,n){this._brushController&&this._brushController.unmount()},e.prototype.dispose=function(t,n){this._brushController&&this._brushController.dispose()},e.prototype._onBrush=function(t){var n=t.areas;if(!t.isEnd||!n.length)return;var a={},i=this.ecModel;this._brushController.updateCovers([]);var o=new zb(Bb(this.model),i,{include:["grid"]});o.matchOutputRanges(n,i,function(u,f,c){if(c.type==="cartesian2d"){var v=u.brushType;v==="rect"?(s("x",c,f[0]),s("y",c,f[1])):s({lineX:"x",lineY:"y"}[v],c,f)}}),Kne(i,a),this._dispatchZoomAction(a);function s(u,f,c){var v=f.getAxis(u),h=v.model,p=l(u,h,i),d=p.findRepresentativeAxisProxy(h).getMinMaxSpan();(d.minValueSpan!=null||d.maxValueSpan!=null)&&(c=lo(0,c.slice(),v.scale.getExtent(),0,d.minValueSpan,d.maxValueSpan)),p&&(a[p.id]={dataZoomId:p.id,startValue:c[0],endValue:c[1]})}function l(u,f,c){var v;return c.eachComponent({mainType:"dataZoom",subType:"select"},function(h){var p=h.getAxisModel(u,f.componentIndex);p&&(v=h)}),v}},e.prototype._dispatchZoomAction=function(t){var n=[];j_(t,function(a,i){n.push(se(a))}),n.length&&this.api.dispatchAction({type:"dataZoom",from:this.uid,batch:n})},e.getDefaultOption=function(t){var n={show:!0,filterMode:"filter",icon:{zoom:"M0,13.5h26.9 M13.5,26.9V0 M32.1,13.5H58V58H13.5 V32.1",back:"M22,1.4L9.9,13.5l12.3,12.3 M10.3,13.5H54.9v44.6 H10.3v-26"},title:t.getLocaleModel().get(["toolbox","dataZoom","title"]),brushStyle:{borderWidth:0,color:B.color.backgroundTint}};return n},e})(_n),sae={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(Jne(this.ecModel))}};function Bb(r){var e={xAxisIndex:r.get("xAxisIndex",!0),yAxisIndex:r.get("yAxisIndex",!0),xAxisId:r.get("xAxisId",!0),yAxisId:r.get("yAxisId",!0)};return e.xAxisIndex==null&&e.xAxisId==null&&(e.xAxisIndex="all"),e.yAxisIndex==null&&e.yAxisId==null&&(e.yAxisIndex="all"),e}function lae(r,e){r.setIconStatus("back",eae(e)>1?"emphasis":"normal")}function uae(r,e,t,n,a){var i=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(i=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=i,r.setIconStatus("zoom",i?"emphasis":"normal");var o=new zb(Bb(r),e,{include:["grid"]}),s=o.makePanelOpts(a,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(i&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}B$("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),a=[],i=Bb(n),o=Wl(r,i);j_(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),j_(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,f){var c=l.componentIndex,v={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:iae+u+c};v[f]=c,a.push(v)}return a});function fae(r){r.registerComponentModel(One),r.registerComponentView(Nne),Ll("saveAsImage",Bne),Ll("magicType",Gne),Ll("dataView",qne),Ll("dataZoom",oae),Ll("restore",tae),we(Rne)}var cae=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,displayTransition:!0,enterable:!1,backgroundColor:B.color.neutral00,shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,defaultBorderColor:B.color.border,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:B.color.borderShade,width:1,type:"dashed",textStyle:{}}},textStyle:{color:B.color.tertiary,fontSize:14}},e})(Le);function Ez(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function Rz(r){if(Pe.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=i==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=i==="top"?225:45)+"deg)");var f=u*Math.PI/180,c=o+a,v=c*Math.abs(Math.cos(f))+c*Math.abs(Math.sin(f)),h=Math.round(((v-Math.SQRT2*a)/2+Math.SQRT2*a-(v-c)/2)*100)/100;s+=";"+i+":-"+h+"px";var p=e+" solid "+a+"px;",d=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'
'}function mae(r,e,t){var n="cubic-bezier(0.23,1,0.32,1)",a="",i="";return t&&(a=" "+r/2+"s "+n,i="opacity"+a+",visibility"+a),e||(a=" "+r+"s "+n,i+=(i.length?",":"")+(Pe.transformSupported?""+Vb+a:",left"+a+",top"+a)),pae+":"+i}function v2(r,e,t){var n=r.toFixed(0)+"px",a=e.toFixed(0)+"px";if(!Pe.transformSupported)return t?"top:"+a+";left:"+n+";":[["top",a],["left",n]];var i=Pe.transform3dSupported,o="translate"+(i?"3d":"")+"("+n+","+a+(i?",0":"")+")";return t?"top:0;left:0;"+Vb+":"+o+";":[["top",0],["left",0],[Oz,o]]}function _ae(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var a=re(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+a+"px");var i=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return i&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+i),M(["decoration","align"],function(u){var f=r.get(u);f&&e.push("text-"+u+":"+f)}),e.join(";")}function Sae(r,e,t,n){var a=[],i=r.get("transitionDuration"),o=r.get("backgroundColor"),s=r.get("shadowBlur"),l=r.get("shadowColor"),u=r.get("shadowOffsetX"),f=r.get("shadowOffsetY"),c=r.getModel("textStyle"),v=DE(r,"html"),h=u+"px "+f+"px "+s+"px "+l;return a.push("box-shadow:"+h),e&&i>0&&a.push(mae(i,t,n)),o&&a.push("background-color:"+o),M(["width","color","radius"],function(p){var d="border-"+p,g=Fk(d),y=r.get(g);y!=null&&a.push(d+":"+y+(p==="color"?"":"px"))}),a.push(_ae(c)),v!=null&&a.push("padding:"+zc(v).join("px ")+"px"),a.join(";")+";"}function h2(r,e,t,n,a){var i=e&&e.painter;if(t){var o=i&&i.getViewportRoot();o&&TH(r,o,t,n,a)}else{r[0]=n,r[1]=a;var s=i&&i.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var bae=(function(){function r(e,t){if(this._show=!1,this._styleCoord=[0,0,0,0],this._enterable=!0,this._alwaysShowContent=!1,this._firstShow=!0,this._longHide=!0,Pe.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var a=this._zr=e.getZr(),i=t.appendTo,o=i&&(q(i)?document.querySelector(i):jl(i)?i:ie(i)&&i(e.getDom()));h2(this._styleCoord,a,o,e.getWidth()/2,e.getHeight()/2),(o||e.getDom()).appendChild(n),this._api=e,this._container=o;var s=this;n.onmouseenter=function(){s._enterable&&(clearTimeout(s._hideTimeout),s._show=!0),s._inContent=!0},n.onmousemove=function(l){if(l=l||window.event,!s._enterable){var u=a.handler,f=a.painter.getViewportRoot();hn(f,l,!0),u.dispatch("mousemove",l)}},n.onmouseleave=function(){s._inContent=!1,s._enterable&&s._show&&s.hideLater(s._hideDelay)}}return r.prototype.update=function(e){if(!this._container){var t=this._api.getDom(),n=hae(t,"position"),a=t.style;a.position!=="absolute"&&n!=="absolute"&&(a.position="relative")}var i=e.get("alwaysShowContent");i&&this._moveIfResized(),this._alwaysShowContent=i,this._enableDisplayTransition=e.get("displayTransition")&&e.get("transitionDuration")>0,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,a=n.style,i=this._styleCoord;n.innerHTML?a.cssText=dae+Sae(e,!this._firstShow,this._longHide,this._enableDisplayTransition)+v2(i[0],i[1],!0)+("border-color:"+zs(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):a.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,a,i){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(q(i)&&n.get("trigger")==="item"&&!Ez(n)&&(s=yae(n,a,i)),q(e))o.innerHTML=e+s;else if(e){o.innerHTML="",W(e)||(e=[e]);for(var l=0;l=0?this._tryShow(i,o):a==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,a=this._api,i=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&i!=="none"&&i!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!a.isDisposed()&&o.manuallyShowTip(t,n,a,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,a,i){if(!(i.from===this.uid||Pe.node||!a.getDom())){var o=g2(i,a);this._ticket="";var s=i.dataByCoordSys,l=Dae(i,n,a);if(l){var u=l.el.getBoundingRect().clone();u.applyTransform(l.el.transform),this._tryShow({offsetX:u.x+u.width/2,offsetY:u.y+u.height/2,target:l.el,position:i.position,positionDefault:"bottom"},o)}else if(i.tooltip&&i.x!=null&&i.y!=null){var f=wae;f.x=i.x,f.y=i.y,f.update(),ge(f).tooltipConfig={name:null,option:i.tooltip},this._tryShow({offsetX:i.x,offsetY:i.y,target:f},o)}else if(s)this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,dataByCoordSys:s,tooltipOption:i.tooltipOption},o);else if(i.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,a,i))return;var c=mz(i,n),v=c.point[0],h=c.point[1];v!=null&&h!=null&&this._tryShow({offsetX:v,offsetY:h,target:c.el,position:i.position,positionDefault:"bottom"},o)}else i.x!=null&&i.y!=null&&(a.dispatchAction({type:"updateAxisPointer",x:i.x,y:i.y}),this._tryShow({offsetX:i.x,offsetY:i.y,position:i.position,target:a.getZr().findHover(i.x,i.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,a,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(g2(i,a))},e.prototype._manuallyAxisShowTip=function(t,n,a,i){var o=i.seriesIndex,s=i.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var f=u.getData(),c=uf([f.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(c.get("trigger")==="axis")return a.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:i.position}),!0}}},e.prototype._tryShow=function(t,n){var a=t.target,i=this._tooltipModel;if(i){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(a){var s=ge(a);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;us(a,function(f){if(f.tooltipDisabled)return l=u=null,!0;l||u||(ge(f).dataIndex!=null?l=f:ge(f).tooltipConfig!=null&&(u=f))},!0),l?this._showSeriesItemTooltip(t,l,n):u?this._showComponentItemTooltip(t,u,n):this._hide(n)}else this._lastDataByCoordSys=null,this._hide(n)}},e.prototype._showOrMove=function(t,n){var a=t.get("showDelay");n=j(n,this),clearTimeout(this._showTimout),a>0?this._showTimout=setTimeout(n,a):n()},e.prototype._showAxisTooltip=function(t,n){var a=this._ecModel,i=this._tooltipModel,o=[n.offsetX,n.offsetY],s=uf([n.tooltipOption],i),l=this._renderMode,u=[],f=Ot("section",{blocks:[],noHeader:!0}),c=[],v=new Jg;M(t,function(m){M(m.dataByAxis,function(_){var S=a.getComponent(_.axisDim+"Axis",_.axisIndex),b=_.value;if(!(!S||b==null)){var x=pz(b,S.axis,a,_.seriesDataIndices,_.valueLabelOpt),w=Ot("section",{header:x,noHeader:!xn(x),sortBlocks:!0,blocks:[]});f.blocks.push(w),M(_.seriesDataIndices,function(T){var C=a.getSeriesByIndex(T.seriesIndex),A=T.dataIndexInside,D=C.getDataParams(A);if(!(D.dataIndex<0)){D.axisDim=_.axisDim,D.axisIndex=_.axisIndex,D.axisType=_.axisType,D.axisId=_.axisId,D.axisValue=bp(S.axis,{value:b}),D.axisValueLabel=x,D.marker=v.makeTooltipMarker("item",zs(D.color),l);var L=PT(C.formatTooltip(A,!0,null)),I=L.frag;if(I){var P=uf([C],i).get("valueFormatter");w.blocks.push(P?H({valueFormatter:P},I):I)}L.text&&c.push(L.text),u.push(D)}})}})}),f.blocks.reverse(),c.reverse();var h=n.position,p=s.get("order"),d=zT(f,v,l,p,a.get("useUTC"),s.get("textStyle"));d&&c.unshift(d);var g=l==="richText"?` `:"
",y=c.join(g);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,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)})},e.prototype._showSeriesItemTooltip=function(t,n,a){var i=this._ecModel,o=ge(n),s=o.seriesIndex,l=i.getSeriesByIndex(s),u=o.dataModel||l,f=o.dataIndex,c=o.dataType,v=u.getData(c),h=this._renderMode,p=t.positionDefault,d=uf([v.getItemModel(f),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),g=d.get("trigger");if(!(g!=null&&g!=="item")){var y=u.getDataParams(f,c),m=new Jg;y.marker=m.makeTooltipMarker("item",zs(y.color),h);var _=PT(u.formatTooltip(f,!1,c)),S=d.get("order"),b=d.get("valueFormatter"),x=_.frag,w=x?zT(b?H({valueFormatter:b},x):x,m,h,S,i.get("useUTC"),d.get("textStyle")):_.text,T="item_"+u.name+"_"+f;this._showOrMove(d,function(){this._showTooltipContent(d,w,y,T,t.offsetX,t.offsetY,t.position,t.target,m)}),a({type:"showTip",dataIndexInside:f,dataIndex:v.getRawIndex(f),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,a){var i=this._renderMode==="html",o=ge(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(q(l)){var f=l;l={content:f,formatter:f},u=!0}u&&i&&l.content&&(l=se(l),l.content=Rr(l.content));var c=[l],v=this._ecModel.getComponent(o.componentMainType,o.componentIndex);v&&c.push(v),c.push({formatter:l.content});var h=t.positionDefault,p=uf(c,this._tooltipModel,h?{position:h}:null),d=p.get("content"),g=Math.random()+"",y=new Jg;this._showOrMove(p,function(){var m=se(p.get("formatterParams")||{});this._showTooltipContent(p,d,m,g,t.offsetX,t.offsetY,t.position,n,y)}),a({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,a,i,o,s,l,u,f){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var c=this._tooltipContent;c.setEnterable(t.get("enterable"));var v=t.get("formatter");l=l||t.get("position");var h=n,p=this._getNearestPoint([o,s],a,t.get("trigger"),t.get("borderColor"),t.get("defaultBorderColor",!0)),d=p.color;if(v)if(q(v)){var g=t.ecModel.get("useUTC"),y=W(a)?a[0]:a,m=y&&y.axisType&&y.axisType.indexOf("time")>=0;h=v,m&&(h=Ed(y.axisValue,h,g)),h=Hk(h,a,!0)}else if(ie(v)){var _=j(function(S,b){S===this._ticket&&(c.setContent(b,f,t,d,l),this._updatePosition(t,l,o,s,c,a,u))},this);this._ticket=i,h=v(a,i,_)}else h=v;c.setContent(h,f,t,d,l),c.show(t,d),this._updatePosition(t,l,o,s,c,a,u)}},e.prototype._getNearestPoint=function(t,n,a,i,o){if(a==="axis"||W(n))return{color:i||o};if(!W(n))return{color:i||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,a,i,o,s,l){var u=this._api.getWidth(),f=this._api.getHeight();n=n||t.get("position");var c=o.getSize(),v=t.get("align"),h=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),ie(n)&&(n=n([a,i],s,o.el,p,{viewSize:[u,f],contentSize:c.slice()})),W(n))a=X(n[0],u),i=X(n[1],f);else if(ce(n)){var d=n;d.width=c[0],d.height=c[1];var g=ft(d,{width:u,height:f});a=g.x,i=g.y,v=null,h=null}else if(q(n)&&l){var y=Mae(n,p,c,t.get("borderWidth"));a=y[0],i=y[1]}else{var y=Cae(a,i,o,u,f,v?null:20,h?null:20);a=y[0],i=y[1]}if(v&&(a-=y2(v)?c[0]/2:v==="right"?c[0]:0),h&&(i-=y2(h)?c[1]/2:h==="bottom"?c[1]:0),Ez(t)){var y=Aae(a,i,o,u,f);a=y[0],i=y[1]}o.moveTo(a,i)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var a=this._lastDataByCoordSys,i=this._cbParamsList,o=!!a&&a.length===t.length;return o&&M(a,function(s,l){var u=s.dataByAxis||[],f=t[l]||{},c=f.dataByAxis||[];o=o&&u.length===c.length,o&&M(u,function(v,h){var p=c[h]||{},d=v.seriesDataIndices||[],g=p.seriesDataIndices||[];o=o&&v.value===p.value&&v.axisType===p.axisType&&v.axisId===p.axisId&&d.length===g.length,o&&M(d,function(y,m){var _=g[m];o=o&&y.seriesIndex===_.seriesIndex&&y.dataIndex===_.dataIndex}),i&&M(v.seriesDataIndices,function(y){var m=y.seriesIndex,_=n[m],S=i[m];_&&S&&S.data!==_.data&&(o=!1)})})}),this._lastDataByCoordSys=t,this._cbParamsList=n,!!o},e.prototype._hide=function(t){this._lastDataByCoordSys=null,t({type:"hideTip",from:this.uid})},e.prototype.dispose=function(t,n){Pe.node||!n.getDom()||(lc(this,"_updatePosition"),this._tooltipContent.dispose(),H_("itemTooltip",n))},e.type="tooltip",e})(lt);function uf(r,e,t){var n=e.ecModel,a;t?(a=new ke(t,n,n),a=new ke(e.option,a,n)):a=e;for(var i=r.length-1;i>=0;i--){var o=r[i];o&&(o instanceof ke&&(o=o.get("tooltip",!0)),q(o)&&(o={formatter:o}),o&&(a=new ke(o,a,n)))}return a}function g2(r,e){return r.dispatchAction||j(e.dispatchAction,e)}function Cae(r,e,t,n,a,i,o){var s=t.getSize(),l=s[0],u=s[1];return i!=null&&(r+l+i+2>n?r-=l+i:r+=i),o!=null&&(e+u+o>a?e-=u+o:e+=o),[r,e]}function Aae(r,e,t,n,a){var i=t.getSize(),o=i[0],s=i[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,a)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function Mae(r,e,t,n){var a=t[0],i=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,f=e.height;switch(r){case"inside":s=e.x+u/2-a/2,l=e.y+f/2-i/2;break;case"top":s=e.x+u/2-a/2,l=e.y-i-o;break;case"bottom":s=e.x+u/2-a/2,l=e.y+f+o;break;case"left":s=e.x-a-o,l=e.y+f/2-i/2;break;case"right":s=e.x+u+o,l=e.y+f/2-i/2}return[s,l]}function y2(r){return r==="center"||r==="middle"}function Dae(r,e,t){var n=F1(r).queryOptionMap,a=n.keys()[0];if(!(!a||a==="series")){var i=_u(e,a,n.get(a),{useDefault:!1,enableAll:!1,enableNone:!1}),o=i.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var f=ge(u).tooltipConfig;if(f&&f.name===r.name)return l=u,!0}),l)return{componentMainType:a,componentIndex:o.componentIndex,el:l}}}}function Iae(r){we(Xc),r.registerComponentModel(cae),r.registerComponentView(Tae),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},At),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},At)}var Lae=["rect","polygon","keep","clear"];function Pae(r,e){var t=Qe(r?r.brush:[]);if(t.length){var n=[];M(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var a=r&&r.toolbox;W(a)&&(a=a[0]),a||(a={feature:{}},r.toolbox=[a]);var i=a.feature||(a.feature={}),o=i.brush||(i.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),kae(s),e&&!s.length&&s.push.apply(s,Lae)}}function kae(r){var e={};M(r,function(t){e[t]=1}),r.length=0,M(e,function(t,n){r.push(n)})}var m2=M;function _2(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function K_(r,e,t){var n={};return m2(e,function(i){var o=n[i]=a();m2(r[i],function(s,l){if(jt.isValidType(l)){var u={type:l,visual:s};t&&t(u,i),o[l]=new jt(u),l==="opacity"&&(u=se(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new jt(u))}})}),n;function a(){var i=function(){};i.prototype.__hidden=i.prototype;var o=new i;return o}}function zz(r,e,t){var n;M(t,function(a){e.hasOwnProperty(a)&&_2(e[a])&&(n=!0)}),n&&M(t,function(a){e.hasOwnProperty(a)&&_2(e[a])?r[a]=se(e[a]):delete r[a]})}function Eae(r,e,t,n,a,i){var o={};M(r,function(c){var v=jt.prepareVisualTypes(e[c]);o[c]=v});var s;function l(c){return xS(t,s,c)}function u(c,v){BE(t,s,c,v)}t.each(f);function f(c,v){s=c;var h=t.getRawDataItem(s);if(!(h&&h.visualMap===!1))for(var p=n.call(a,c),d=e[p],g=o[p],y=0,m=g.length;ye[0][1]&&(e[0][1]=i[0]),i[1]e[1][1]&&(e[1][1]=i[1])}return e&&T2(e)}};function T2(r){return new ve(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var Fae=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n,this.model,(this._brushController=new lb(n.getZr())).on("brush",j(this._onBrush,this)).mount()},e.prototype.render=function(t,n,a,i){this.model=t,this._updateController(t,n,a,i)},e.prototype.updateTransform=function(t,n,a,i){Bz(n),this._updateController(t,n,a,i)},e.prototype.updateVisual=function(t,n,a,i){this.updateTransform(t,n,a,i)},e.prototype.updateView=function(t,n,a,i){this._updateController(t,n,a,i)},e.prototype._updateController=function(t,n,a,i){(!i||i.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(a)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,a=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:se(a),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:se(a),$from:n})},e.type="brush",e})(lt),Hae=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.areas=[],t.brushOption={},t}return e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&zz(a,t,["inBrush","outOfBrush"]);var i=a.inBrush=a.inBrush||{};a.outOfBrush=a.outOfBrush||{color:this.option.defaultOutOfBrushColor},i.hasOwnProperty("liftZ")||(i.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=$(t,function(n){return C2(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=C2(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:B.color.backgroundTint,borderColor:B.color.borderTint},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4,defaultOutOfBrushColor:B.color.disabled},e})(Le);function C2(r,e){return xe({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new ke(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}var Wae=["rect","polygon","lineX","lineY","keep","clear"],$ae=(function(r){N(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,a){var i,o,s;n.eachComponent({mainType:"brush"},function(l){i=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=i,this._brushMode=o,M(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===i)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,a){this.render(t,n,a)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),a={};return M(t.get("type",!0),function(i){n[i]&&(a[i]=n[i])}),a},e.prototype.onclick=function(t,n,a){var i=this._brushType,o=this._brushMode;a==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:a==="keep"?i:i===a?!1:a,brushMode:a==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:Wae.slice(),icon:{rect:"M7.3,34.7 M0.4,10V-0.2h9.8 M89.6,10V-0.2h-9.8 M0.4,60v10.2h9.8 M89.6,60v10.2h-9.8 M12.3,22.4V10.5h13.1 M33.6,10.5h7.8 M49.1,10.5h7.8 M77.5,22.4V10.5h-13 M12.3,31.1v8.2 M77.7,31.1v8.2 M12.3,47.6v11.9h13.1 M33.6,59.5h7.6 M49.1,59.5 h7.7 M77.5,47.6v11.9h-13",polygon:"M55.2,34.9c1.7,0,3.1,1.4,3.1,3.1s-1.4,3.1-3.1,3.1 s-3.1-1.4-3.1-3.1S53.5,34.9,55.2,34.9z M50.4,51c1.7,0,3.1,1.4,3.1,3.1c0,1.7-1.4,3.1-3.1,3.1c-1.7,0-3.1-1.4-3.1-3.1 C47.3,52.4,48.7,51,50.4,51z M55.6,37.1l1.5-7.8 M60.1,13.5l1.6-8.7l-7.8,4 M59,19l-1,5.3 M24,16.1l6.4,4.9l6.4-3.3 M48.5,11.6 l-5.9,3.1 M19.1,12.8L9.7,5.1l1.1,7.7 M13.4,29.8l1,7.3l6.6,1.6 M11.6,18.4l1,6.1 M32.8,41.9 M26.6,40.4 M27.3,40.2l6.1,1.6 M49.9,52.1l-5.6-7.6l-4.9-1.2",lineX:"M15.2,30 M19.7,15.6V1.9H29 M34.8,1.9H40.4 M55.3,15.6V1.9H45.9 M19.7,44.4V58.1H29 M34.8,58.1H40.4 M55.3,44.4 V58.1H45.9 M12.5,20.3l-9.4,9.6l9.6,9.8 M3.1,29.9h16.5 M62.5,20.3l9.4,9.6L62.3,39.7 M71.9,29.9H55.4",lineY:"M38.8,7.7 M52.7,12h13.2v9 M65.9,26.6V32 M52.7,46.3h13.2v-9 M24.9,12H11.8v9 M11.8,26.6V32 M24.9,46.3H11.8v-9 M48.2,5.1l-9.3-9l-9.4,9.2 M38.9-3.9V12 M48.2,53.3l-9.3,9l-9.4-9.2 M38.9,62.3V46.4",keep:"M4,10.5V1h10.3 M20.7,1h6.1 M33,1h6.1 M55.4,10.5V1H45.2 M4,17.3v6.6 M55.6,17.3v6.6 M4,30.5V40h10.3 M20.7,40 h6.1 M33,40h6.1 M55.4,30.5V40H45.2 M21,18.9h62.9v48.6H21V18.9z",clear:"M22,14.7l30.9,31 M52.9,14.7L22,45.7 M4.7,16.8V4.2h13.1 M26,4.2h7.8 M41.6,4.2h7.8 M70.3,16.8V4.2H57.2 M4.7,25.9v8.6 M70.3,25.9v8.6 M4.7,43.2v12.6h13.1 M26,55.8h7.8 M41.6,55.8h7.8 M70.3,43.2v12.6H57.2"},title:t.getLocaleModel().get(["toolbox","brush","title"])};return n},e})(_n);function Zae(r){r.registerComponentView(Fae),r.registerComponentModel(Hae),r.registerPreprocessor(Pae),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,Nae),r.registerAction({type:"brush",event:"brush",update:"updateVisual"},function(e,t){t.eachComponent({mainType:"brush",query:e},function(n){n.setAreas(e.areas)})}),r.registerAction({type:"brushSelect",event:"brushSelected",update:"none"},At),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},At),Ll("brush",$ae)}var Uae=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:"center",top:B.size.m,backgroundColor:B.color.transparent,borderColor:B.color.primary,borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:B.color.primary},subtextStyle:{fontSize:12,color:B.color.quaternary}},e})(Le),Yae=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this.group.removeAll(),!!t.get("show")){var i=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=re(t.get("textBaseline"),t.get("textVerticalAlign")),f=new Be({style:rt(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),c=f.getBoundingRect(),v=t.get("subtext"),h=new Be({style:rt(s,{text:v,fill:s.getTextColor(),y:c.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),d=t.get("sublink"),g=t.get("triggerEvent",!0);f.silent=!p&&!g,h.silent=!d&&!g,p&&f.on("click",function(){vp(p,"_"+t.get("target"))}),d&&h.on("click",function(){vp(d,"_"+t.get("subtarget"))}),ge(f).eventData=ge(h).eventData=g?{componentType:"title",componentIndex:t.componentIndex}:null,i.add(f),v&&i.add(h);var y=i.getBoundingRect(),m=t.getBoxLayoutParams();m.width=y.width,m.height=y.height;var _=Zt(t,a),S=ft(m,_.refContainer,t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?S.x+=S.width:l==="center"&&(S.x+=S.width/2)),u||(u=t.get("top")||t.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 b={align:l,verticalAlign:u};f.setStyle(b),h.setStyle(b),y=i.getBoundingRect();var x=S.margin,w=t.getItemStyle(["color","opacity"]);w.fill=t.get("backgroundColor");var T=new Ce({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:t.get("borderRadius")},style:w,subPixelOptimize:!0,silent:!0});i.add(T)}},e.type="title",e})(lt);function Xae(r){r.registerComponentModel(Uae),r.registerComponentView(Yae)}var A2=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode="box",t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),this._initData()},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),this._initData()},e.prototype.setCurrentIndex=function(t){t==null&&(t=this.option.currentIndex);var n=this._data.count();this.option.loop?t=(t%n+n)%n:(t>=n&&(t=n-1),t<0&&(t=0)),this.option.currentIndex=t},e.prototype.getCurrentIndex=function(){return this.option.currentIndex},e.prototype.isIndexMax=function(){return this.getCurrentIndex()>=this._data.count()-1},e.prototype.setPlayState=function(t){this.option.autoPlay=!!t},e.prototype.getPlayState=function(){return!!this.option.autoPlay},e.prototype._initData=function(){var t=this.option,n=t.data||[],a=t.axisType,i=this._names=[],o;a==="category"?(o=[],M(n,function(u,f){var c=Gt(mu(u),""),v;ce(u)?(v=se(u),v.value=f):v=f,o.push(v),i.push(c)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[a]||"number",l=this._data=new Or([{name:"value",type:s}],this);l.initData(o,i)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:B.size.m,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:B.color.secondary},data:[]},e})(Le),Vz=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline.slider",e.defaultOption=go(A2.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:B.color.border,borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:B.color.accent10},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:B.color.tertiary},itemStyle:{color:B.color.accent20,borderWidth:0},checkpointStyle:{symbol:"circle",symbolSize:15,color:B.color.accent50,borderColor:B.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:B.color.accent50,borderColor:B.color.accent50,borderWidth:0},emphasis:{label:{show:!0,color:B.color.accent60},itemStyle:{color:B.color.accent60,borderColor:B.color.accent60},controlStyle:{color:B.color.accent70,borderColor:B.color.accent70}},progress:{lineStyle:{color:B.color.accent30},itemStyle:{color:B.color.accent40}},data:[]}),e})(A2);zt(Vz,Nd.prototype);var qae=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e})(lt),jae=(function(r){N(e,r);function e(t,n,a,i){var o=r.call(this,t,n,a)||this;return o.type=i||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e})(Qn),Sm=Math.PI,M2=Ae(),Kae=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(t,n){this.api=n},e.prototype.render=function(t,n,a){if(this.model=t,this.api=a,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var i=this._layout(t,a),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(i,t);t.formatTooltip=function(u){var f=l.scale.getLabel({value:u});return Ot("nameValue",{noName:!0,value:f})},M(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](i,o,l,t)},this),this._renderAxisLabel(i,s,l,t),this._position(i,t)}this._doPlayStop(),this._updateTicksStatus()},e.prototype.remove=function(){this._clearTimer(),this.group.removeAll()},e.prototype.dispose=function(){this._clearTimer()},e.prototype._layout=function(t,n){var a=t.get(["label","position"]),i=t.get("orient"),o=Qae(t,n),s;a==null||a==="auto"?s=i==="horizontal"?o.y+o.height/2=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},f={horizontal:0,vertical:Sm/2},c=i==="vertical"?o.height:o.width,v=t.getModel("controlStyle"),h=v.get("show",!0),p=h?v.get("itemSize"):0,d=h?v.get("itemGap"):0,g=p+d,y=t.get(["label","rotate"])||0;y=y*Sm/180;var m,_,S,b=v.get("position",!0),x=h&&v.get("showPlayBtn",!0),w=h&&v.get("showPrevBtn",!0),T=h&&v.get("showNextBtn",!0),C=0,A=c;b==="left"||b==="bottom"?(x&&(m=[0,0],C+=g),w&&(_=[C,0],C+=g),T&&(S=[A-p,0],A-=g)):(x&&(m=[A-p,0],A-=g),w&&(_=[0,0],C+=g),T&&(S=[A-p,0],A-=g));var D=[C,A];return t.get("inverse")&&D.reverse(),{viewRect:o,mainLength:c,orient:i,rotation:f[i],labelRotation:y,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[i],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[i],playPosition:m,prevBtnPosition:_,nextBtnPosition:S,axisExtent:D,controlSize:p,controlGap:d}},e.prototype._position=function(t,n){var a=this._mainGroup,i=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=rr(),l=o.x,u=o.y+o.height;Aa(s,s,[-l,-u]),ho(s,s,-Sm/2),Aa(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var f=m(o),c=m(a.getBoundingRect()),v=m(i.getBoundingRect()),h=[a.x,a.y],p=[i.x,i.y];p[0]=h[0]=f[0][0];var d=t.labelPosOpt;if(d==null||q(d)){var g=d==="+"?0:1;_(h,c,f,1,g),_(p,v,f,1,1-g)}else{var g=d>=0?0:1;_(h,c,f,1,g),p[1]=h[1]+d}a.setPosition(h),i.setPosition(p),a.rotation=i.rotation=t.rotation,y(a),y(i);function y(S){S.originX=f[0][0]-S.x,S.originY=f[1][0]-S.y}function m(S){return[[S.x,S.x+S.width],[S.y,S.y+S.height]]}function _(S,b,x,w,T){S[w]+=x[w][T]-b[w][T]}},e.prototype._createAxis=function(t,n){var a=n.getData(),i=n.get("axisType"),o=Jae(n,i);o.getTicks=function(){return a.mapArray(["value"],function(u){return{value:u}})};var s=a.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new jae("value",o,t.axisExtent,i);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new oe;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,a,i){var o=a.getExtent();if(i.get(["lineStyle","show"])){var s=new kt({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:H({lineCap:"round"},i.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new kt({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:fe({lineCap:"round",lineWidth:s.style.lineWidth},i.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,a,i){var o=this,s=i.getData(),l=a.scale.getTicks();this._tickSymbols=[],M(l,function(u){var f=a.dataToCoord(u.value),c=s.getItemModel(u.value),v=c.getModel("itemStyle"),h=c.getModel(["emphasis","itemStyle"]),p=c.getModel(["progress","itemStyle"]),d={x:f,y:0,onclick:j(o._changeTimeline,o,u.value)},g=D2(c,v,n,d);g.ensureState("emphasis").style=h.getItemStyle(),g.ensureState("progress").style=p.getItemStyle(),_s(g);var y=ge(g);c.get("tooltip")?(y.dataIndex=u.value,y.dataModel=i):y.dataIndex=y.dataModel=null,o._tickSymbols.push(g)})},e.prototype._renderAxisLabel=function(t,n,a,i){var o=this,s=a.getLabelModel();if(s.get("show")){var l=i.getData(),u=a.getViewLabels();this._tickLabels=[],M(u,function(f){var c=f.tickValue,v=l.getItemModel(c),h=v.getModel("label"),p=v.getModel(["emphasis","label"]),d=v.getModel(["progress","label"]),g=a.dataToCoord(f.tickValue),y=new Be({x:g,y:0,rotation:t.labelRotation-t.rotation,onclick:j(o._changeTimeline,o,c),silent:!1,style:rt(h,{text:f.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});y.ensureState("emphasis").style=rt(p),y.ensureState("progress").style=rt(d),n.add(y),_s(y),M2(y).dataIndex=c,o._tickLabels.push(y)})}},e.prototype._renderControl=function(t,n,a,i){var o=t.controlSize,s=t.rotation,l=i.getModel("controlStyle").getItemStyle(),u=i.getModel(["emphasis","controlStyle"]).getItemStyle(),f=i.getPlayState(),c=i.get("inverse",!0);v(t.nextBtnPosition,"next",j(this._changeTimeline,this,c?"-":"+")),v(t.prevBtnPosition,"prev",j(this._changeTimeline,this,c?"+":"-")),v(t.playPosition,f?"stop":"play",j(this._handlePlayClick,this,!f),!0);function v(h,p,d,g){if(h){var y=Xn(re(i.get(["controlStyle",p+"BtnSize"]),o),o),m=[0,-y/2,y,y],_=eie(i,p+"Icon",m,{x:h[0],y:h[1],originX:o/2,originY:0,rotation:g?-s:0,rectHover:!0,style:l,onclick:d});_.ensureState("emphasis").style=u,n.add(_),_s(_)}}},e.prototype._renderCurrentPointer=function(t,n,a,i){var o=i.getData(),s=i.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,f={onCreate:function(c){c.draggable=!0,c.drift=j(u._handlePointerDrag,u),c.ondragend=j(u._handlePointerDragend,u),I2(c,u._progressLine,s,a,i,!0)},onUpdate:function(c){I2(c,u._progressLine,s,a,i)}};this._currentPointer=D2(l,l,this._mainGroup,{},this._currentPointer,f)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,a){this._clearTimer(),this._pointerChangeTimeline([a.offsetX,a.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var a=this._toAxisCoord(t)[0],i=this._axis,o=wn(i.getExtent().slice());a>o[1]&&(a=o[1]),a=0&&(s[o]=+s[o].toFixed(p)),[s,h]}var ph={min:Se(hh,"min"),max:Se(hh,"max"),average:Se(hh,"average"),median:Se(hh,"median")};function Tc(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,a=n&&n.dimensions;if(!oie(e)&&!W(e.coord)&&W(a)){var i=Gz(e,t,n,r);if(e=se(e),e.type&&ph[e.type]&&i.baseAxis&&i.valueAxis){var o=be(a,i.baseAxis.dim),s=be(a,i.valueAxis.dim),l=ph[e.type](t,i.valueAxis.dim,i.baseDataDim,i.valueDataDim,o,s);e.coord=l[0],e.value=l[1]}else e.coord=[e.xAxis!=null?e.xAxis:e.radiusAxis,e.yAxis!=null?e.yAxis:e.angleAxis]}if(e.coord==null||!W(a)){e.coord=[];var u=r.getBaseAxis();if(u&&e.type&&ph[e.type]){var f=n.getOtherAxis(u);f&&(e.value=Zp(t,t.mapDimension(f.dim),e.type))}}else for(var c=e.coord,v=0;v<2;v++)ph[c[v]]&&(c[v]=Zp(t,t.mapDimension(a[v]),c[v]));return e}}function Gz(r,e,t,n){var a={};return r.valueIndex!=null||r.valueDim!=null?(a.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,a.valueAxis=t.getAxis(sie(n,a.valueDataDim)),a.baseAxis=t.getOtherAxis(a.valueAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim)):(a.baseAxis=n.getBaseAxis(),a.valueAxis=t.getOtherAxis(a.baseAxis),a.baseDataDim=e.mapDimension(a.baseAxis.dim),a.valueDataDim=e.mapDimension(a.valueAxis.dim)),a}function sie(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function Cc(r,e){return r&&r.containData&&e.coord&&!Q_(e)?r.containData(e.coord):!0}function lie(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!Q_(e)&&!Q_(t)?r.containZone(e.coord,t.coord):!0}function Fz(r,e){return r?function(t,n,a,i){var o=i<2?t.coord&&t.coord[i]:t.value;return to(o,e[i])}:function(t,n,a,i){return to(t.value,e[i])}}function Zp(r,e,t){if(t==="average"){var n=0,a=0;return r.each(e,function(i,o){isNaN(i)||(n+=i,a++)}),n/a}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var bm=Ae(),Fb=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.init=function(){this.markerGroupMap=te()},e.prototype.render=function(t,n,a){var i=this,o=this.markerGroupMap;o.each(function(s){bm(s).keep=!1}),n.eachSeries(function(s){var l=Pa.getMarkerModelFromSeries(s,i.type);l&&i.renderSeries(s,l,n,a)}),o.each(function(s){!bm(s).keep&&i.group.remove(s.group)}),uie(n,o,this.type)},e.prototype.markKeep=function(t){bm(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var a=this;M(t,function(i){var o=Pa.getMarkerModelFromSeries(i,a.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?nk(l):q1(l))})}})},e.type="marker",e})(lt);function uie(r,e,t){r.eachSeries(function(n){var a=Pa.getMarkerModelFromSeries(n,t),i=e.get(n.id);if(a&&i&&i.group){var o=Ns(a),s=o.z,l=o.zlevel;Pd(i.group,s,l)}})}function P2(r,e,t){var n=e.coordinateSystem,a=t.getWidth(),i=t.getHeight(),o=n&&n.getArea&&n.getArea();r.each(function(s){var l=r.getItemModel(s),u=l.get("relativeTo")==="coordinate",f=u?o?o.width:0:a,c=u?o?o.height:0:i,v=u&&o?o.x:0,h=u&&o?o.y:0,p,d=X(l.get("x"),f)+v,g=X(l.get("y"),c)+h;if(!isNaN(d)&&!isNaN(g))p=[d,g];else if(e.getMarkerPosition)p=e.getMarkerPosition(r.getValues(r.dimensions,s));else if(n){var y=r.get(n.dimensions[0],s),m=r.get(n.dimensions[1],s);p=n.dataToPoint([y,m])}isNaN(d)||(p[0]=d),isNaN(g)||(p[1]=g),r.setItemLayout(s,p)})}var fie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Pa.getMarkerModelFromSeries(i,"markPoint");o&&(P2(o.getData(),i,a),this.markerGroupMap.get(i.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new $c),c=cie(o,t,n);n.setData(c),P2(n.getData(),t,i),c.each(function(v){var h=c.getItemModel(v),p=h.getShallow("symbol"),d=h.getShallow("symbolSize"),g=h.getShallow("symbolRotate"),y=h.getShallow("symbolOffset"),m=h.getShallow("symbolKeepAspect");if(ie(p)||ie(d)||ie(g)||ie(y)){var _=n.getRawValue(v),S=n.getDataParams(v);ie(p)&&(p=p(_,S)),ie(d)&&(d=d(_,S)),ie(g)&&(g=g(_,S)),ie(y)&&(y=y(_,S))}var b=h.getModel("itemStyle").getItemStyle(),x=h.get("z2"),w=Gc(l,"color");b.fill||(b.fill=w),c.setItemVisual(v,{z2:re(x,0),symbol:p,symbolSize:d,symbolRotate:g,symbolOffset:y,symbolKeepAspect:m,style:b})}),f.updateData(c),this.group.add(f.group),c.eachItemGraphicEl(function(v){v.traverse(function(h){ge(h).dataModel=n})}),this.markKeep(f),f.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e})(Fb);function cie(r,e,t){var n;r?n=$(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return H(H({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Or(n,t),i=$(t.get("data"),Se(Tc,e));r&&(i=Ze(i,Se(Cc,r)));var o=Fz(!!r,n);return a.initData(i,null,o),a}function vie(r){r.registerComponentModel(iie),r.registerComponentView(fie),r.registerPreprocessor(function(e){Gb(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var hie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markLine",e.defaultOption={z:5,symbol:["circle","arrow"],symbolSize:[8,16],symbolOffset:0,precision:2,tooltip:{trigger:"item"},label:{show:!0,position:"end",distance:5},lineStyle:{type:"dashed"},emphasis:{label:{show:!0},lineStyle:{width:3}},animationEasing:"linear"},e})(Pa),dh=Ae(),pie=function(r,e,t,n){var a=r.getData(),i;if(W(n))i=n;else{var o=n.type;if(o==="min"||o==="max"||o==="average"||o==="median"||n.xAxis!=null||n.yAxis!=null){var s=void 0,l=void 0;if(n.yAxis!=null||n.xAxis!=null)s=e.getAxis(n.yAxis!=null?"y":"x"),l=fr(n.yAxis,n.xAxis);else{var u=Gz(n,a,e,r);s=u.valueAxis;var f=pR(a,u.valueDataDim);l=Zp(a,f,o)}var c=s.dim==="x"?0:1,v=1-c,h=se(n),p={coord:[]};h.type=null,h.coord=[],h.coord[v]=-1/0,p.coord[v]=1/0;var d=t.get("precision");d>=0&&ze(l)&&(l=+l.toFixed(Math.min(d,20))),h.coord[c]=p.coord[c]=l,i=[h,p,{type:o,valueIndex:n.valueIndex,value:l}]}else i=[]}var g=[Tc(r,i[0]),Tc(r,i[1]),H({},i[2])];return g[2].type=g[2].type||null,xe(g[2],g[0]),xe(g[2],g[1]),g};function Up(r){return!isNaN(r)&&!isFinite(r)}function k2(r,e,t,n){var a=1-r,i=n.dimensions[r];return Up(e[a])&&Up(t[a])&&e[r]===t[r]&&n.getAxis(i).containData(e[r])}function die(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(k2(1,t,n,r)||k2(0,t,n,r)))return!0}return Cc(r,e[0])&&Cc(r,e[1])}function xm(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=X(o.get("x"),a.getWidth()),u=X(o.get("y"),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var f=i.dimensions,c=r.get(f[0],e),v=r.get(f[1],e);s=i.dataToPoint([c,v])}if(so(i,"cartesian2d")){var h=i.getAxis("x"),p=i.getAxis("y"),f=i.dimensions;Up(r.get(f[0],e))?s[0]=h.toGlobalCoord(h.getExtent()[t?0:1]):Up(r.get(f[1],e))&&(s[1]=p.toGlobalCoord(p.getExtent()[t?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}r.setItemLayout(e,s)}var gie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Pa.getMarkerModelFromSeries(i,"markLine");if(o){var s=o.getData(),l=dh(o).from,u=dh(o).to;l.each(function(f){xm(l,f,!0,i,a),xm(u,f,!1,i,a)}),s.each(function(f){s.setItemLayout(f,[l.getItemLayout(f),u.getItemLayout(f)])}),this.markerGroupMap.get(i.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,new ob);this.group.add(f.group);var c=yie(o,t,n),v=c.from,h=c.to,p=c.line;dh(n).from=v,dh(n).to=h,n.setData(p);var d=n.get("symbol"),g=n.get("symbolSize"),y=n.get("symbolRotate"),m=n.get("symbolOffset");W(d)||(d=[d,d]),W(g)||(g=[g,g]),W(y)||(y=[y,y]),W(m)||(m=[m,m]),c.from.each(function(S){_(v,S,!0),_(h,S,!1)}),p.each(function(S){var b=p.getItemModel(S),x=b.getModel("lineStyle").getLineStyle();p.setItemLayout(S,[v.getItemLayout(S),h.getItemLayout(S)]);var w=b.get("z2");x.stroke==null&&(x.stroke=v.getItemVisual(S,"style").fill),p.setItemVisual(S,{z2:re(w,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})}),f.updateData(p),c.line.eachItemGraphicEl(function(S){ge(S).dataModel=n,S.traverse(function(b){ge(b).dataModel=n})});function _(S,b,x){var w=S.getItemModel(b);xm(S,b,x,t,i);var T=w.getModel("itemStyle").getItemStyle();T.fill==null&&(T.fill=Gc(l,"color")),S.setItemVisual(b,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:re(w.get("symbolOffset",!0),m[x?0:1]),symbolRotate:re(w.get("symbolRotate",!0),y[x?0:1]),symbolSize:re(w.get("symbolSize"),g[x?0:1]),symbol:re(w.get("symbol",!0),d[x?0:1]),style:T})}this.markKeep(f),f.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e})(Fb);function yie(r,e,t){var n;r?n=$(r&&r.dimensions,function(u){var f=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return H(H({},f),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var a=new Or(n,t),i=new Or(n,t),o=new Or([],t),s=$(t.get("data"),Se(pie,e,r,t));r&&(s=Ze(s,Se(die,r)));var l=Fz(!!r,n);return a.initData($(s,function(u){return u[0]}),null,l),i.initData($(s,function(u){return u[1]}),null,l),o.initData($(s,function(u){return u[2]})),o.hasItemOption=!0,{from:a,to:i,line:o}}function mie(r){r.registerComponentModel(hie),r.registerComponentView(gie),r.registerPreprocessor(function(e){Gb(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var _ie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.createMarkerModelFromSeries=function(t,n,a){return new e(t,n,a)},e.type="markArea",e.defaultOption={z:1,tooltip:{trigger:"item"},animation:!1,label:{show:!0,position:"top"},itemStyle:{borderWidth:0},emphasis:{label:{show:!0,position:"top"}}},e})(Pa),gh=Ae(),Sie=function(r,e,t,n){var a=n[0],i=n[1];if(!(!a||!i)){var o=Tc(r,a),s=Tc(r,i),l=o.coord,u=s.coord;l[0]=fr(l[0],-1/0),l[1]=fr(l[1],-1/0),u[0]=fr(u[0],1/0),u[1]=fr(u[1],1/0);var f=P1([{},o,s]);return f.coord=[o.coord,s.coord],f.x0=o.x,f.y0=o.y,f.x1=s.x,f.y1=s.y,f}};function Yp(r){return!isNaN(r)&&!isFinite(r)}function E2(r,e,t,n){var a=1-r;return Yp(e[a])&&Yp(t[a])}function bie(r,e){var t=e.coord[0],n=e.coord[1],a={coord:t,x:e.x0,y:e.y0},i={coord:n,x:e.x1,y:e.y1};return so(r,"cartesian2d")?t&&n&&(E2(1,t,n)||E2(0,t,n))?!0:lie(r,a,i):Cc(r,a)||Cc(r,i)}function R2(r,e,t,n,a){var i=n.coordinateSystem,o=r.getItemModel(e),s,l=X(o.get(t[0]),a.getWidth()),u=X(o.get(t[1]),a.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var f=r.getValues(["x0","y0"],e),c=r.getValues(["x1","y1"],e),v=i.clampData(f),h=i.clampData(c),p=[];t[0]==="x0"?p[0]=v[0]>h[0]?c[0]:f[0]:p[0]=v[0]>h[0]?f[0]:c[0],t[1]==="y0"?p[1]=v[1]>h[1]?c[1]:f[1]:p[1]=v[1]>h[1]?f[1]:c[1],s=n.getMarkerPosition(p,t,!0)}else{var d=r.get(t[0],e),g=r.get(t[1],e),y=[d,g];i.clampData&&i.clampData(y,y),s=i.dataToPoint(y,!0)}if(so(i,"cartesian2d")){var m=i.getAxis("x"),_=i.getAxis("y"),d=r.get(t[0],e),g=r.get(t[1],e);Yp(d)?s[0]=m.toGlobalCoord(m.getExtent()[t[0]==="x0"?0:1]):Yp(g)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var O2=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],xie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.updateTransform=function(t,n,a){n.eachSeries(function(i){var o=Pa.getMarkerModelFromSeries(i,"markArea");if(o){var s=o.getData();s.each(function(l){var u=$(O2,function(c){return R2(s,l,c,i,a)});s.setItemLayout(l,u);var f=s.getItemGraphicEl(l);f.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,a,i){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,f=u.get(s)||u.set(s,{group:new oe});this.group.add(f.group),this.markKeep(f);var c=wie(o,t,n);n.setData(c),c.each(function(v){var h=$(O2,function(A){return R2(c,v,A,t,i)}),p=o.getAxis("x").scale,d=o.getAxis("y").scale,g=p.getExtent(),y=d.getExtent(),m=[p.parse(c.get("x0",v)),p.parse(c.get("x1",v))],_=[d.parse(c.get("y0",v)),d.parse(c.get("y1",v))];wn(m),wn(_);var S=!(g[0]>m[1]||g[1]_[1]||y[1]<_[0]),b=!S;c.setItemLayout(v,{points:h,allClipped:b});var x=c.getItemModel(v),w=x.getModel("itemStyle").getItemStyle(),T=x.get("z2"),C=Gc(l,"color");w.fill||(w.fill=C,q(w.fill)&&(w.fill=Jh(w.fill,.4))),w.stroke||(w.stroke=C),c.setItemVisual(v,"style",w),c.setItemVisual(v,"z2",re(T,0))}),c.diff(gh(f).data).add(function(v){var h=c.getItemLayout(v),p=c.getItemVisual(v,"z2");if(!h.allClipped){var d=new xr({z2:re(p,0),shape:{points:h.points}});c.setItemGraphicEl(v,d),f.group.add(d)}}).update(function(v,h){var p=gh(f).data.getItemGraphicEl(h),d=c.getItemLayout(v),g=c.getItemVisual(v,"z2");d.allClipped?p&&f.group.remove(p):(p?Ve(p,{z2:re(g,0),shape:{points:d.points}},n,v):p=new xr({shape:{points:d.points}}),c.setItemGraphicEl(v,p),f.group.add(p))}).remove(function(v){var h=gh(f).data.getItemGraphicEl(v);f.group.remove(h)}).execute(),c.eachItemGraphicEl(function(v,h){var p=c.getItemModel(h),d=c.getItemVisual(h,"style");v.useStyle(c.getItemVisual(h,"style")),Kt(v,Ht(p),{labelFetcher:n,labelDataIndex:h,defaultText:c.getName(h)||"",inheritColor:q(d.fill)?Jh(d.fill,1):B.color.neutral99}),Ft(v,p),ut(v,null,null,p.get(["emphasis","disabled"])),ge(v).dataModel=n}),gh(f).data=c,f.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e})(Fb);function wie(r,e,t){var n,a,i=["x0","y0","x1","y1"];if(r){var o=$(r&&r.dimensions,function(u){var f=e.getData(),c=f.getDimensionInfo(f.mapDimension(u))||{};return H(H({},c),{name:u,ordinalMeta:null})});a=$(i,function(u,f){return{name:u,type:o[f%2].type}}),n=new Or(a,t)}else a=[{name:"value",type:"float"}],n=new Or(a,t);var s=$(t.get("data"),Se(Sie,e,r,t));r&&(s=Ze(s,Se(bie,r)));var l=r?function(u,f,c,v){var h=u.coord[Math.floor(v/2)][v%2];return to(h,a[v])}:function(u,f,c,v){return to(u.value,a[v])};return n.initData(s,null,l),n.hasItemOption=!0,n}function Tie(r){r.registerComponentModel(_ie),r.registerComponentView(xie),r.registerPreprocessor(function(e){Gb(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var Cie=function(r,e){if(e==="all")return{type:"all",title:r.getLocaleModel().get(["legend","selector","all"])};if(e==="inverse")return{type:"inverse",title:r.getLocaleModel().get(["legend","selector","inverse"])}},e1=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a),t.selected=t.selected||{},this._updateSelector(t)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),this._updateSelector(t)},e.prototype._updateSelector=function(t){var n=t.selector,a=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),W(n)&&M(n,function(i,o){q(i)&&(i={type:i}),n[o]=xe(i,Cie(a,i.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,a=0;a=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",bottom:B.size.m,align:"auto",backgroundColor:B.color.transparent,borderColor:B.color.border,borderRadius:0,borderWidth:0,padding:5,itemGap:8,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:B.color.disabled,inactiveBorderColor:B.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:B.color.disabled,inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:B.color.secondary},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:B.color.tertiary,borderWidth:1,borderColor:B.color.border},emphasis:{selectorLabel:{show:!0,color:B.color.quaternary}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1},triggerEvent:!1},e})(Le),xl=Se,t1=M,yh=oe,Hz=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!1,t}return e.prototype.init=function(){this.group.add(this._contentGroup=new yh),this.group.add(this._selectorGroup=new yh),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,a){var i=this._isFirstRender;if(this._isFirstRender=!1,this.resetInner(),!!t.get("show",!0)){var o=t.get("align"),s=t.get("orient");(!o||o==="auto")&&(o=t.get("left")==="right"&&s==="vertical"?"right":"left");var l=t.get("selector",!0),u=t.get("selectorPosition",!0);l&&(!u||u==="auto")&&(u=s==="horizontal"?"end":"start"),this.renderInner(o,t,n,a,l,s,u);var f=Zt(t,a).refContainer,c=t.getBoxLayoutParams(),v=t.get("padding"),h=ft(c,f,v),p=this.layoutInner(t,o,h,i,l,u),d=ft(fe({width:p.width,height:p.height},c),f,v);this.group.x=d.x-p.x,this.group.y=d.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=Lz(p,t))}},e.prototype.resetInner=function(){this.getContentGroup().removeAll(),this._backgroundEl&&this.group.remove(this._backgroundEl),this.getSelectorGroup().removeAll()},e.prototype.renderInner=function(t,n,a,i,o,s,l){var u=this.getContentGroup(),f=te(),c=n.get("selectedMode"),v=n.get("triggerEvent"),h=[];a.eachRawSeries(function(p){!p.get("legendHoverLink")&&h.push(p.id)}),t1(n.getData(),function(p,d){var g=this,y=p.get("name");if(!this.newlineDisabled&&(y===""||y===` `)){var m=new yh;m.newline=!0,u.add(m);return}var _=a.getSeriesByName(y)[0];if(!f.get(y))if(_){var S=_.getData(),b=S.getVisual("legendLineStyle")||{},x=S.getVisual("legendIcon"),w=S.getVisual("style"),T=this._createItem(_,y,d,p,n,t,b,w,x,c,i);T.on("click",xl(N2,y,null,i,h)).on("mouseover",xl(r1,_.name,null,i,h)).on("mouseout",xl(n1,_.name,null,i,h)),a.ssr&&T.eachChild(function(C){var A=ge(C);A.seriesIndex=_.seriesIndex,A.dataIndex=d,A.ssrType="legend"}),v&&T.eachChild(function(C){g.packEventData(C,n,_,d,y)}),f.set(y,!0)}else a.eachRawSeries(function(C){var A=this;if(!f.get(y)&&C.legendVisualProvider){var D=C.legendVisualProvider;if(!D.containName(y))return;var L=D.indexOfName(y),I=D.getItemVisual(L,"style"),P=D.getItemVisual(L,"legendIcon"),E=Zr(I.fill);E&&E[3]===0&&(E[3]=.2,I=H(H({},I),{fill:ba(E,"rgba")}));var k=this._createItem(C,y,d,p,n,t,{},I,P,c,i);k.on("click",xl(N2,null,y,i,h)).on("mouseover",xl(r1,null,y,i,h)).on("mouseout",xl(n1,null,y,i,h)),a.ssr&&k.eachChild(function(O){var R=ge(O);R.seriesIndex=C.seriesIndex,R.dataIndex=d,R.ssrType="legend"}),v&&k.eachChild(function(O){A.packEventData(O,n,C,d,y)}),f.set(y,!0)}},this)},this),o&&this._createSelector(o,n,i,s,l)},e.prototype.packEventData=function(t,n,a,i,o){var s={componentType:"legend",componentIndex:n.componentIndex,dataIndex:i,value:o,seriesIndex:a.seriesIndex};ge(t).eventData=s},e.prototype._createSelector=function(t,n,a,i,o){var s=this.getSelectorGroup();t1(t,function(u){var f=u.type,c=new Be({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){a.dispatchAction({type:f==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(c);var v=n.getModel("selectorLabel"),h=n.getModel(["emphasis","selectorLabel"]);Kt(c,{normal:v,emphasis:h},{defaultText:u.title}),_s(c)})},e.prototype._createItem=function(t,n,a,i,o,s,l,u,f,c,v){var h=t.visualDrawType,p=o.get("itemWidth"),d=o.get("itemHeight"),g=o.isSelected(n),y=i.get("symbolRotate"),m=i.get("symbolKeepAspect"),_=i.get("icon");f=_||f||"roundRect";var S=Aie(f,i,l,u,h,g,v),b=new yh,x=i.getModel("textStyle");if(ie(t.getLegendIcon)&&(!_||_==="inherit"))b.add(t.getLegendIcon({itemWidth:p,itemHeight:d,icon:f,iconRotate:y,itemStyle:S.itemStyle,lineStyle:S.lineStyle,symbolKeepAspect:m}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?y==="inherit"?t.getData().getVisual("symbolRotate"):y:0;b.add(Mie({itemWidth:p,itemHeight:d,icon:f,iconRotate:w,itemStyle:S.itemStyle,symbolKeepAspect:m}))}var T=s==="left"?p+5:-5,C=s,A=o.get("formatter"),D=n;q(A)&&A?D=A.replace("{name}",n??""):ie(A)&&(D=A(n));var L=g?x.getTextColor():i.get("inactiveColor");b.add(new Be({style:rt(x,{text:D,x:T,y:d/2,fill:L,align:C,verticalAlign:"middle"},{inheritColor:L})}));var I=new Ce({shape:b.getBoundingRect(),style:{fill:"transparent"}}),P=i.getModel("tooltip");return P.get("show")&&di({el:I,componentModel:o,itemName:n,itemTooltipOption:P.option}),b.add(I),b.eachChild(function(E){E.silent=!0}),I.silent=!c,this.getContentGroup().add(b),_s(b),b.__legendDataIndex=a,b},e.prototype.layoutInner=function(t,n,a,i,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();bs(t.get("orient"),l,t.get("itemGap"),a.width,a.height);var f=l.getBoundingRect(),c=[-f.x,-f.y];if(u.markRedraw(),l.markRedraw(),o){bs("horizontal",u,t.get("selectorItemGap",!0));var v=u.getBoundingRect(),h=[-v.x,-v.y],p=t.get("selectorButtonGap",!0),d=t.getOrient().index,g=d===0?"width":"height",y=d===0?"height":"width",m=d===0?"y":"x";s==="end"?h[d]+=f[g]+p:c[d]+=v[g]+p,h[1-d]+=f[y]/2-v[y]/2,u.x=h[0],u.y=h[1],l.x=c[0],l.y=c[1];var _={x:0,y:0};return _[g]=f[g]+p+v[g],_[y]=Math.max(f[y],v[y]),_[m]=Math.min(0,v[m]+h[1-d]),_}else return l.x=c[0],l.y=c[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e})(lt);function Aie(r,e,t,n,a,i,o){function s(g,y){g.lineWidth==="auto"&&(g.lineWidth=y.lineWidth>0?2:0),t1(g,function(m,_){g[_]==="inherit"&&(g[_]=y[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),f=r.lastIndexOf("empty",0)===0?"fill":"stroke",c=l.getShallow("decal");u.decal=!c||c==="inherit"?n.decal:ru(c,o),u.fill==="inherit"&&(u.fill=n[a]),u.stroke==="inherit"&&(u.stroke=n[f]),u.opacity==="inherit"&&(u.opacity=(a==="fill"?n:t).opacity),s(u,n);var v=e.getModel("lineStyle"),h=v.getLineStyle();if(s(h,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),h.stroke==="auto"&&(h.stroke=n.fill),!i){var p=e.get("inactiveBorderWidth"),d=u[f];u.lineWidth=p==="auto"?n.lineWidth>0&&d?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),h.stroke=v.get("inactiveColor"),h.lineWidth=v.get("inactiveWidth")}return{itemStyle:u,lineStyle:h}}function Mie(r){var e=r.icon||"roundRect",t=Nt(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill=B.color.neutral00,t.style.lineWidth=2),t}function N2(r,e,t,n){n1(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r??e}),r1(r,e,t,n)}function Wz(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,a=e.length;na[o],g=[-h.x,-h.y];n||(g[i]=f[u]);var y=[0,0],m=[-p.x,-p.y],_=re(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(d){var S=t.get("pageButtonPosition",!0);S==="end"?m[i]+=a[o]-p[o]:y[i]+=p[o]+_}m[1-i]+=h[s]/2-p[s]/2,f.setPosition(g),c.setPosition(y),v.setPosition(m);var b={x:0,y:0};if(b[o]=d?a[o]:h[o],b[s]=Math.max(h[s],p[s]),b[l]=Math.min(0,p[l]+m[1-i]),c.__rectSize=a[o],d){var x={x:0,y:0};x[o]=Math.max(a[o]-p[o]-_,0),x[s]=b[s],c.setClipPath(new Ce({shape:x})),c.__rectSize=x[o]}else v.eachChild(function(T){T.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&Ve(f,{x:w.contentPosition[0],y:w.contentPosition[1]},d?t:null),this._updatePageInfoView(t,w),b},e.prototype._pageGo=function(t,n,a){var i=this._getPageInfo(n)[t];i!=null&&a.dispatchAction({type:"legendScroll",scrollDataIndex:i,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var a=this._controllerGroup;M(["pagePrev","pageNext"],function(f){var c=f+"DataIndex",v=n[c]!=null,h=a.childOfName(f);h&&(h.setStyle("fill",v?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),h.cursor=v?"pointer":"default")});var i=a.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;i&&o&&i.setStyle("text",q(o)?o.replace("{current}",l==null?"":l+"").replace("{total}",u==null?"":u+""):o({current:l,total:u}))},e.prototype._getPageInfo=function(t){var n=t.get("scrollDataIndex",!0),a=this.getContentGroup(),i=this._containerGroup.__rectSize,o=t.getOrient().index,s=wm[o],l=Tm[o],u=this._findTargetItemIndex(n),f=a.children(),c=f[u],v=f.length,h=v?1:0,p={contentPosition:[a.x,a.y],pageCount:h,pageIndex:h-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!c)return p;var d=S(c);p.contentPosition[o]=-d.s;for(var g=u+1,y=d,m=d,_=null;g<=v;++g)_=S(f[g]),(!_&&m.e>y.s+i||_&&!b(_,y.s))&&(m.i>y.i?y=m:y=_,y&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=y.i),++p.pageCount)),m=_;for(var g=u-1,y=d,m=d,_=null;g>=-1;--g)_=S(f[g]),(!_||!b(m,_.s))&&y.i=w&&x.s<=w+i}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,a=this.getContentGroup(),i;return a.eachChild(function(o,s){var l=o.__legendDataIndex;i==null&&l!=null&&(i=s),l===t&&(n=s)}),n??i},e.type="legend.scroll",e})(Hz);function kie(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(a){a.setScrollDataIndex(n)})})}function Eie(r){we($z),r.registerComponentModel(Lie),r.registerComponentView(Pie),kie(r)}function Rie(r){we($z),we(Eie)}var Oie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.inside",e.defaultOption=go(wc.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e})(wc),Hb=Ae();function Nie(r,e,t){Hb(r).coordSysRecordMap.each(function(n){var a=n.dataZoomInfoMap.get(e.uid);a&&(a.getRange=t)})}function zie(r,e){for(var t=Hb(r).coordSysRecordMap,n=t.keys(),a=0;ai[a+n]&&(n=u),o=o&&l.get("preventDefaultMouseMove",!0)}),{controlType:n,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!o,api:t,zInfo:{component:e.model},triggerInfo:{roamTrigger:null,isInSelf:e.containsPoint}}}}function Hie(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=Hb(t),a=n.coordSysRecordMap||(n.coordSysRecordMap=te());a.each(function(i){i.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(i){var o=Mz(i);M(o.infoList,function(s){var l=s.model.uid,u=a.get(l)||a.set(l,Bie(t,s.model)),f=u.dataZoomInfoMap||(u.dataZoomInfoMap=te());f.set(i.uid,{dzReferCoordSysInfo:s,model:i,getRange:null})})}),a.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){Zz(a,i);return}var f=Fie(l,i,t);o.enable(f.controlType,f.opt),Au(i,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var Wie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataZoom.inside",t}return e.prototype.render=function(t,n,a){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),Nie(a,t,{pan:j(Cm.pan,this),zoom:j(Cm.zoom,this),scrollMove:j(Cm.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){zie(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e})(Rb),Cm={zoom:function(r,e,t,n){var a=this.range,i=a.slice(),o=r.axisModels[0];if(o){var s=Am[e](null,[n.originX,n.originY],o,t,r),l=(s.signal>0?s.pixelStart+s.pixelLength-s.pixel:s.pixel-s.pixelStart)/s.pixelLength*(i[1]-i[0])+i[0],u=Math.max(1/n.scale,0);i[0]=(i[0]-l)*u+l,i[1]=(i[1]-l)*u+l;var f=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(lo(0,i,[0,100],0,f.minSpan,f.maxSpan),this.range=i,a[0]!==i[0]||a[1]!==i[1])return i}},pan:G2(function(r,e,t,n,a,i){var o=Am[n]([i.oldX,i.oldY],[i.newX,i.newY],e,a,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:G2(function(r,e,t,n,a,i){var o=Am[n]([0,0],[i.scrollDelta,i.scrollDelta],e,a,t);return o.signal*(r[1]-r[0])*i.scrollDelta})};function G2(r){return function(e,t,n,a){var i=this.range,o=i.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,a);if(lo(l,o,[0,100],"all"),this.range=o,i[0]!==o[0]||i[1]!==o[1])return o}}}var Am={grid:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem.getRect();return r=r||[0,0],i.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=i.inverse?-1:1),o},polar:function(r,e,t,n,a){var i=t.axis,o={},s=a.model.coordinateSystem,l=s.getRadiusAxis().getExtent(),u=s.getAngleAxis().getExtent();return r=r?s.pointToCoord(r):[0,0],e=s.pointToCoord(e),t.mainType==="radiusAxis"?(o.pixel=e[0]-r[0],o.pixelLength=l[1]-l[0],o.pixelStart=l[0],o.signal=i.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=i.inverse?-1:1),o},singleAxis:function(r,e,t,n,a){var i=t.axis,o=a.model.coordinateSystem.getRect(),s={};return r=r||[0,0],i.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=i.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=i.inverse?-1:1),s}};function Uz(r){Ob(r),r.registerComponentModel(Oie),r.registerComponentView(Wie),Hie(r)}var $ie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.slider",e.layoutMode="box",e.defaultOption=go(wc.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:B.color.accent10,borderRadius:0,backgroundColor:B.color.transparent,dataBackground:{lineStyle:{color:B.color.accent30,width:.5},areaStyle:{color:B.color.accent20,opacity:.2}},selectedDataBackground:{lineStyle:{color:B.color.accent40,width:.5},areaStyle:{color:B.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:B.color.neutral00,borderColor:B.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:B.color.accent40,opacity:.5},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:B.color.tertiary},brushSelect:!0,brushStyle:{color:B.color.accent30,opacity:.3},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:B.color.accent40},moveHandleStyle:{opacity:.8}},defaultLocationEdgeGap:15}),e})(wc),vf=Ce,Zie=1,Mm=30,Uie=7,hf="horizontal",F2="vertical",Yie=5,Xie=["line","bar","candlestick","scatter"],qie={easing:"cubicOut",duration:100,delay:0},jie=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._displayables={},t}return e.prototype.init=function(t,n){this.api=n,this._onBrush=j(this._onBrush,this),this._onBrushEnd=j(this._onBrushEnd,this)},e.prototype.render=function(t,n,a,i){if(r.prototype.render.apply(this,arguments),Au(this,"_dispatchZoomAction",t.get("throttle"),"fixRate"),this._orient=t.getOrient(),t.get("show")===!1){this.group.removeAll();return}if(t.noTarget()){this._clear(),this.group.removeAll();return}(!i||i.type!=="dataZoom"||i.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){lc(this,"_dispatchZoomAction");var t=this.api.getZr();t.off("mousemove",this._onBrush),t.off("mouseup",this._onBrushEnd)},e.prototype._buildView=function(){var t=this.group;t.removeAll(),this._brushing=!1,this._displayables.brushRect=null,this._resetLocation(),this._resetInterval();var n=this._displayables.sliderGroup=new oe;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,a=t.get("brushSelect"),i=a?Uie:0,o=Zt(t,n).refContainer,s=this._findCoordRect(),l=t.get("defaultLocationEdgeGap",!0)||0,u=this._orient===hf?{right:o.width-s.x-s.width,top:o.height-Mm-l-i,width:s.width,height:Mm}:{right:l,top:s.y,width:Mm,height:s.height},f=Us(t.option);M(["right","top","width","height"],function(v){f[v]==="ph"&&(f[v]=u[v])});var c=ft(f,o);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===F2&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,a=this._orient,i=this.dataZoomModel.getFirstTargetAxisModel(),o=i&&i.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(a===hf&&!o?{scaleY:l?1:-1,scaleX:1}:a===hf&&o?{scaleY:l?1:-1,scaleX:-1}:a===F2&&!o?{scaleY:l?-1:1,scaleX:1,rotation:Math.PI/2}:{scaleY:l?-1:1,scaleX:-1,rotation:Math.PI/2});var u=t.getBoundingRect([s]);t.x=n.x-u.x,t.y=n.y-u.y,t.markRedraw()},e.prototype._getViewExtent=function(){return[0,this._size[0]]},e.prototype._renderBackground=function(){var t=this.dataZoomModel,n=this._size,a=this._displayables.sliderGroup,i=t.get("brushSelect");a.add(new vf({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new vf({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:j(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)),a.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,a=this._shadowSize||[],i=t.series,o=i.getRawData(),s=i.getShadowDim&&i.getShadowDim(),l=s&&o.getDimensionInfo(s)?i.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,f=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==a[0]||n[1]!==a[1]){var c=o.getDataExtent(t.thisDim),v=o.getDataExtent(l),h=(v[1]-v[0])*.3;v=[v[0]-h,v[1]+h];var p=[0,n[1]],d=[0,n[0]],g=[[n[0],0],[0,0]],y=[],m=d[1]/Math.max(1,o.count()-1),_=n[0]/(c[1]-c[0]),S=t.thisAxis.type==="time",b=-m,x=Math.round(o.count()/n[0]),w;o.each([t.thisDim,l],function(L,I,P){if(x>0&&P%x){S||(b+=m);return}b=S?(+L-c[0])*_:b+m;var E=I==null||isNaN(I)||I==="",k=E?0:$e(I,v,p,!0);E&&!w&&P?(g.push([g[g.length-1][0],0]),y.push([y[y.length-1][0],0])):!E&&w&&(g.push([b,0]),y.push([b,0])),E||(g.push([b,k]),y.push([b,k])),w=E}),u=this._shadowPolygonPts=g,f=this._shadowPolylinePts=y}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var T=this.dataZoomModel;function C(L){var I=T.getModel(L?"selectedDataBackground":"dataBackground"),P=new oe,E=new xr({shape:{points:u},segmentIgnoreThreshold:1,style:I.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),k=new pr({shape:{points:f},segmentIgnoreThreshold:1,style:I.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return P.add(E),P.add(k),P}for(var A=0;A<3;A++){var D=C(A===1);this._displayables.sliderGroup.add(D),this._displayables.dataShadowSegs.push(D)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var a,i=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();M(l,function(u){if(!a&&!(n!==!0&&be(Xie,u.get("type"))<0)){var f=i.getComponent(Zi(o),s).axis,c=Kie(o),v,h=u.coordinateSystem;c!=null&&h.getOtherAxis&&(v=h.getOtherAxis(f).inverse),c=u.getData().mapDimension(c);var p=u.getData().mapDimension(o);a={thisAxis:f,series:u,thisDim:p,otherDim:c,otherAxisInverse:v}}},this)},this),a}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,a=n.handles=[null,null],i=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,f=l.get("borderRadius")||0,c=l.get("brushSelect"),v=n.filler=new vf({silent:c,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(v),o.add(new vf({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:f},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:Zie,fill:B.color.transparent}})),M([0,1],function(_){var S=l.get("handleIcon");!dp[S]&&S.indexOf("path://")<0&&S.indexOf("image://")<0&&(S="path://"+S);var b=Nt(S,-1,0,2,2,null,!0);b.attr({cursor:Jie(this._orient),draggable:!0,drift:j(this._onDragMove,this,_),ondragend:j(this._onDragEnd,this),onmouseover:j(this._showDataInfo,this,!0),onmouseout:j(this._showDataInfo,this,!1),z2:5});var x=b.getBoundingRect(),w=l.get("handleSize");this._handleHeight=X(w,this._size[1]),this._handleWidth=x.width/x.height*this._handleHeight,b.setStyle(l.getModel("handleStyle").getItemStyle()),b.style.strokeNoScale=!0,b.rectHover=!0,b.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),_s(b);var T=l.get("handleColor");T!=null&&(b.style.fill=T),o.add(a[_]=b);var C=l.getModel("textStyle"),A=l.get("handleLabel")||{},D=A.show||!1;t.add(i[_]=new Be({silent:!0,invisible:!D,style:rt(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var h=v;if(c){var p=X(l.get("moveHandleSize"),s[1]),d=n.moveHandle=new Ce({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),g=p*.8,y=n.moveHandleIcon=Nt(l.get("moveHandleIcon"),-g/2,-g/2,g,g,B.color.neutral00,!0);y.silent=!0,y.y=s[1]+p/2-.5,d.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var m=Math.min(s[1]/2,Math.max(p,10));h=n.moveZone=new Ce({invisible:!0,shape:{y:s[1]-m,height:p+m}}),h.on("mouseover",function(){u.enterEmphasis(d)}).on("mouseout",function(){u.leaveEmphasis(d)}),o.add(d),o.add(y),o.add(h)}h.attr({draggable:!0,cursor:"default",drift:j(this._onDragMove,this,"all"),ondragstart:j(this._showDataInfo,this,!0),ondragend:j(this._onDragEnd,this),onmouseover:j(this._showDataInfo,this,!0),onmouseout:j(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[$e(t[0],[0,100],n,!0),$e(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var a=this.dataZoomModel,i=this._handleEnds,o=this._getViewExtent(),s=a.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];lo(n,i,o,a.get("zoomLock")?"all":t,s.minSpan!=null?$e(s.minSpan,l,o,!0):null,s.maxSpan!=null?$e(s.maxSpan,l,o,!0):null);var u=this._range,f=this._range=wn([$e(i[0],o,l,!0),$e(i[1],o,l,!0)]);return!u||u[0]!==f[0]||u[1]!==f[1]},e.prototype._updateView=function(t){var n=this._displayables,a=this._handleEnds,i=wn(a.slice()),o=this._size;M([0,1],function(h){var p=n.handles[h],d=this._handleHeight;p.attr({scaleX:d/2,scaleY:d/2,x:a[h]+(h?-1:1),y:o[1]/2-d/2})},this),n.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]};n.moveHandle&&(n.moveHandle.setShape(s),n.moveZone.setShape(s),n.moveZone.getBoundingRect(),n.moveHandleIcon&&n.moveHandleIcon.attr("x",s.x+s.width/2));for(var l=n.dataShadowSegs,u=[0,i[0],i[1],o[0]],f=0;fn[0]||a[1]<0||a[1]>n[1])){var i=this._handleEnds,o=(i[0]+i[1])/2,s=this._updateInterval("all",a[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,a=t.offsetY;this._brushStart=new ue(n,a),this._brushing=!0,this._brushStartTime=+new Date},e.prototype._onBrushEnd=function(t){if(this._brushing){var n=this._displayables.brushRect;if(this._brushing=!1,!!n){n.attr("ignore",!0);var a=n.shape,i=+new Date;if(!(i-this._brushStartTime<200&&Math.abs(a.width)<5)){var o=this._getViewExtent(),s=[0,100],l=this._handleEnds=[a.x,a.x+a.width],u=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();lo(0,l,o,0,u.minSpan!=null?$e(u.minSpan,s,o,!0):null,u.maxSpan!=null?$e(u.maxSpan,s,o,!0):null),this._range=wn([$e(l[0],o,s,!0),$e(l[1],o,s,!0)]),this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(ii(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var a=this._displayables,i=this.dataZoomModel,o=a.brushRect;o||(o=a.brushRect=new vf({silent:!0,style:i.getModel("brushStyle").getItemStyle()}),a.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),f=l.transformCoordToLocal(s.x,s.y),c=this._size;u[0]=Math.max(Math.min(c[0],u[0]),0),o.setShape({x:f[0],y:0,width:u[0]-f[0],height:c[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?qie:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=Mz(this.dataZoomModel).infoList;if(!t&&n.length){var a=n[0].model.coordinateSystem;t=a.getRect&&a.getRect()}if(!t){var i=this.api.getWidth(),o=this.api.getHeight();t={x:i*.2,y:o*.2,width:i*.6,height:o*.6}}return t},e.type="dataZoom.slider",e})(Rb);function Kie(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function Jie(r){return r==="vertical"?"ns-resize":"ew-resize"}function Yz(r){r.registerComponentModel($ie),r.registerComponentView(jie),Ob(r)}function Qie(r){we(Uz),we(Yz)}var Xz={get:function(r,e,t){var n=se((eoe[r]||{})[e]);return t&&W(n)?n[n.length-1]:n}},eoe={color:{active:["#006edd","#e0ffff"],inactive:[B.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]}},H2=jt.mapVisual,toe=jt.eachVisual,roe=W,W2=M,noe=wn,aoe=$e,Xp=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.stateList=["inRange","outOfRange"],t.replacableOptionKeys=["inRange","outOfRange","target","controller","color"],t.layoutMode={type:"box",ignoreSize:!0},t.dataBound=[-1/0,1/0],t.targetVisuals={},t.controllerVisuals={},t}return e.prototype.init=function(t,n,a){this.mergeDefaultAndTheme(t,a)},e.prototype.optionUpdated=function(t,n){var a=this.option;!n&&zz(a,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=j(t,this),this.controllerVisuals=K_(this.option.controller,n,t),this.targetVisuals=K_(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesId,n=this.option.seriesIndex;n==null&&t==null&&(n="all");var a=_u(this.ecModel,"series",{index:n,id:t},{useDefault:!1,enableAll:!0,enableNone:!1}).models;return $(a,function(i){return i.componentIndex})},e.prototype.eachTargetSeries=function(t,n){M(this.getTargetSeriesIndices(),function(a){var i=this.ecModel.getSeriesByIndex(a);i&&t.call(n,i)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(a){a===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,a){var i=this.option,o=i.precision,s=this.dataBound,l=i.formatter,u;a=a||["<",">"],W(t)&&(t=t.slice(),u=!0);var f=n?t:u?[c(t[0]),c(t[1])]:c(t);if(q(l))return l.replace("{value}",u?f[0]:f).replace("{value2}",u?f[1]:f);if(ie(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?a[0]+" "+f[1]:t[1]===s[1]?a[1]+" "+f[0]:f[0]+" - "+f[1];return f;function c(v){return v===s[0]?"min":v===s[1]?"max":(+v).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=noe([t.min,t.max]);this._dataExtent=n},e.prototype.getDataDimensionIndex=function(t){var n=this.option.dimension;if(n!=null)return t.getDimensionIndex(n);for(var a=t.dimensions,i=a.length-1;i>=0;i--){var o=a[i],s=t.getDimensionInfo(o);if(!s.isCalculationCoord)return s.storeDimIndex}},e.prototype.getExtent=function(){return this._dataExtent.slice()},e.prototype.completeVisualOption=function(){var t=this.ecModel,n=this.option,a={inRange:n.inRange,outOfRange:n.outOfRange},i=n.target||(n.target={}),o=n.controller||(n.controller={});xe(i,a),xe(o,a);var s=this.isCategory();l.call(this,i),l.call(this,o),u.call(this,i,"inRange","outOfRange"),f.call(this,o);function l(c){roe(n.color)&&!c.inRange&&(c.inRange={color:n.color.slice().reverse()}),c.inRange=c.inRange||{color:t.get("gradientColor")}}function u(c,v,h){var p=c[v],d=c[h];p&&!d&&(d=c[h]={},W2(p,function(g,y){if(jt.isValidType(y)){var m=Xz.get(y,"inactive",s);m!=null&&(d[y]=m,y==="color"&&!d.hasOwnProperty("opacity")&&!d.hasOwnProperty("colorAlpha")&&(d.opacity=[0,0]))}}))}function f(c){var v=(c.inRange||{}).symbol||(c.outOfRange||{}).symbol,h=(c.inRange||{}).symbolSize||(c.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),d=this.getItemSymbol(),g=d||"roundRect";W2(this.stateList,function(y){var m=this.itemSize,_=c[y];_||(_=c[y]={color:s?p:[p]}),_.symbol==null&&(_.symbol=v&&se(v)||(s?g:[g])),_.symbolSize==null&&(_.symbolSize=h&&se(h)||(s?m[0]:[m[0],m[0]])),_.symbol=H2(_.symbol,function(x){return x==="none"?g:x});var S=_.symbolSize;if(S!=null){var b=-1/0;toe(S,function(x){x>b&&(b=x)}),_.symbolSize=H2(S,function(x){return aoe(x,[0,b],[0,m[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:B.color.transparent,borderColor:B.color.borderTint,contentColor:B.color.theme[0],inactiveColor:B.color.disabled,borderWidth:0,padding:B.size.m,textGap:10,precision:0,textStyle:{color:B.color.secondary}},e})(Le),$2=[20,140],ioe=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent(),this.resetVisual(function(a){a.mappingMethod="linear",a.dataExtent=this.getExtent()}),this._resetRange()},e.prototype.resetItemSize=function(){r.prototype.resetItemSize.apply(this,arguments);var t=this.itemSize;(t[0]==null||isNaN(t[0]))&&(t[0]=$2[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=$2[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):W(n)&&(n[0]>n[1]&&n.reverse(),n[0]=Math.max(n[0],t[0]),n[1]=Math.min(n[1],t[1]))},e.prototype.completeVisualOption=function(){r.prototype.completeVisualOption.apply(this,arguments),M(this.stateList,function(t){var n=this.option.controller[t].symbolSize;n&&n[0]!==n[1]&&(n[0]=n[1]/3)},this)},e.prototype.setSelected=function(t){this.option.range=t.slice(),this._resetRange()},e.prototype.getSelected=function(){var t=this.getExtent(),n=wn((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]=a[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(a){var i=[],o=a.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&i.push(l)},this),n.push({seriesId:a.id,dataIndex:i})},this),n},e.prototype.getVisualMeta=function(t){var n=Z2(this,"outOfRange",this.getExtent()),a=Z2(this,"inRange",this.option.range.slice()),i=[];function o(h,p){i.push({value:h,color:t(h,p)})}for(var s=0,l=0,u=a.length,f=n.length;lt[1])break;i.push({color:this.getControllerVisual(l,"color",n),offset:s/a})}return i.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),i},e.prototype._createBarPoints=function(t,n){var a=this.visualMapModel.itemSize;return[[a[0]-n[0],t[0]],[a[0],t[0]],[a[0],t[1]],[a[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,a=this.visualMapModel.get("inverse");return new oe(n==="horizontal"&&!a?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&a?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!a?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var a=this._shapes,i=this.visualMapModel,o=a.handleThumbs,s=a.handleLabels,l=i.itemSize,u=i.getExtent(),f=this._applyTransform("left",a.mainGroup);ooe([0,1],function(c){var v=o[c];v.setStyle("fill",n.handlesColor[c]),v.y=t[c];var h=la(t[c],[0,l[1]],u,!0),p=this.getControllerVisual(h,"symbolSize");v.scaleX=v.scaleY=p/l[0],v.x=l[0]-p/2;var d=$n(a.handleLabelPoints[c],Ss(v,this.group));if(this._orient==="horizontal"){var g=f==="left"||f==="top"?(l[0]-p)/2:(l[0]-p)/-2;d[1]+=g}s[c].setStyle({x:d[0],y:d[1],text:i.formatValueText(this._dataInterval[c]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",a.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,a,i){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],f=this._shapes,c=f.indicator;if(c){c.attr("invisible",!1);var v={convertOpacityToAlpha:!0},h=this.getControllerVisual(t,"color",v),p=this.getControllerVisual(t,"symbolSize"),d=la(t,s,u,!0),g=l[0]-p/2,y={x:c.x,y:c.y};c.y=d,c.x=g;var m=$n(f.indicatorLabelPoint,Ss(c,this.group)),_=f.indicatorLabel;_.attr("invisible",!1);var S=this._applyTransform("left",f.mainGroup),b=this._orient,x=b==="horizontal";_.setStyle({text:(a||"")+o.formatValueText(n),verticalAlign:x?S:"middle",align:x?"center":S});var w={x:g,y:d,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};c.x=y.x,c.y=y.y,c.animateTo(w,C),_.animateTo(T,C)}else c.attr(w),_.attr(T);this._firstShowIndicator=!1;var A=this._shapes.handleLabels;if(A)for(var D=0;Do[1]&&(c[1]=1/0),n&&(c[0]===-1/0?this._showIndicator(f,c[1],"< ",l):c[1]===1/0?this._showIndicator(f,c[0],"> ",l):this._showIndicator(f,f,"≈ ",l));var v=this._hoverLinkDataIndices,h=[];(n||q2(a))&&(h=this._hoverLinkDataIndices=a.findTargetDataIndices(c));var p=a8(v,h);this._dispatchHighDown("downplay",Gh(p[0],a)),this._dispatchHighDown("highlight",Gh(p[1],a))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(us(t.target,function(l){var u=ge(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var a=this.ecModel.getSeriesByIndex(n.seriesIndex),i=this.visualMapModel;if(i.isTargetSeries(a)){var o=a.getData(n.dataType),s=o.getStore().get(i.getDataDimensionIndex(o),n.dataIndex);isNaN(s)||this._showIndicator(s,s)}}},e.prototype._hideIndicator=function(){var t=this._shapes;t.indicator&&t.indicator.attr("invisible",!0),t.indicatorLabel&&t.indicatorLabel.attr("invisible",!0);var n=this._shapes.handleLabels;if(n)for(var a=0;a=0&&(i.dimension=o,n.push(i))}}),r.getData().setVisual("visualMeta",n)}}];function poe(r,e,t,n){for(var a=e.targetVisuals[n],i=jt.prepareVisualTypes(a),o={color:Gc(r.getData(),"color")},s=0,l=i.length;s0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(coe,voe),M(hoe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(doe))}function Jz(r){r.registerComponentModel(ioe),r.registerComponentView(uoe),Kz(r)}var goe=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._pieceList=[],t}return e.prototype.optionUpdated=function(t,n){r.prototype.optionUpdated.apply(this,arguments),this.resetExtent();var a=this._mode=this._determineMode();this._pieceList=[],yoe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var i=this.option.categories;this.resetVisual(function(o,s){a==="categories"?(o.mappingMethod="category",o.categories=se(i)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=$(this._pieceList,function(l){return l=se(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},a=jt.listVisualTypes(),i=this.isCategory();M(t.pieces,function(s){M(a,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),M(n,function(s,l){var u=!1;M(this.stateList,function(f){u=u||o(t,f,l)||o(t.target,f,l)},this),!u&&M(this.stateList,function(f){(t[f]||(t[f]={}))[l]=Xz.get(l,f==="inRange"?"active":"inactive",i)})},this);function o(s,l,u){return s&&s[l]&&s[l].hasOwnProperty(u)}r.prototype.completeVisualOption.apply(this,arguments)},e.prototype._resetSelected=function(t,n){var a=this.option,i=this._pieceList,o=(n?a:t).selected||{};if(a.selected=o,M(i,function(l,u){var f=this.getSelectedMapKey(l);o.hasOwnProperty(f)||(o[f]=!0)},this),a.selectedMode==="single"){var s=!1;M(i,function(l,u){var f=this.getSelectedMapKey(l);o[f]&&(s?o[f]=!1:s=!0)},this)}},e.prototype.getItemSymbol=function(){return this.get("itemSymbol")},e.prototype.getSelectedMapKey=function(t){return this._mode==="categories"?t.value+"":t.index+""},e.prototype.getPieceList=function(){return this._pieceList},e.prototype._determineMode=function(){var t=this.option;return t.pieces&&t.pieces.length>0?"pieces":this.option.categories?"categories":"splitNumber"},e.prototype.setSelected=function(t){this.option.selected=se(t)},e.prototype.getValueState=function(t){var n=jt.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],a=this._pieceList;return this.eachTargetSeries(function(i){var o=[],s=i.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var f=jt.findPieceIndex(l,a);f===t&&o.push(u)},this),n.push({seriesId:i.id,dataIndex:o})},this),n},e.prototype.getRepresentValue=function(t){var n;if(this.isCategory())n=t.value;else if(t.value!=null)n=t.value;else{var a=t.interval||[];n=a[0]===-1/0&&a[1]===1/0?0:(a[0]+a[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],a=["",""],i=this;function o(f,c){var v=i.getRepresentValue({interval:f});c||(c=i.getValueState(v));var h=t(v,c);f[0]===-1/0?a[0]=h:f[1]===1/0?a[1]=h:n.push({value:f[0],color:h},{value:f[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 M(s,function(f){var c=f.interval;c&&(c[0]>u&&o([u,c[0]],"outOfRange"),o(c.slice()),u=c[1])},this),{stops:n,outerColors:a}},e.type="visualMap.piecewise",e.defaultOption=go(Xp.defaultOption,{selected:null,minOpen:!1,maxOpen:!1,align:"auto",itemWidth:20,itemHeight:14,itemSymbol:"roundRect",pieces:null,categories:null,splitNumber:5,selectedMode:"multiple",itemGap:10,hoverLink:!0}),e})(Xp),yoe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),a=e.splitNumber;a=Math.max(parseInt(a,10),1),e.splitNumber=a;for(var i=(n[1]-n[0])/a;+i.toFixed(t)!==i&&t<5;)t++;e.precision=t,i=+i.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,a)},this)}};function Q2(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}var moe=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.doRender=function(){var t=this.group;t.removeAll();var n=this.visualMapModel,a=n.get("textGap"),i=n.textStyleModel,o=this._getItemAlign(),s=n.itemSize,l=this._getViewData(),u=l.endsText,f=fr(n.get("showLabel",!0),!u),c=!n.get("selectedMode");u&&this._renderEndsText(t,u[0],s,f,o),M(l.viewPieceList,function(v){var h=v.piece,p=new oe;p.onclick=j(this._onItemClick,this,h),this._enableHoverLink(p,v.indexInModelPieceList);var d=n.getRepresentValue(h);if(this._createItemSymbol(p,d,[0,0,s[0],s[1]],c),f){var g=this.visualMapModel.getValueState(d),y=i.get("align")||o;p.add(new Be({style:rt(i,{x:y==="right"?-a:s[0]+a,y:s[1]/2,text:h.text,verticalAlign:i.get("verticalAlign")||"middle",align:y,opacity:re(i.get("opacity"),g==="outOfRange"?.5:1)}),silent:c}))}t.add(p)},this),u&&this._renderEndsText(t,u[1],s,f,o),bs(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var a=this;t.on("mouseover",function(){return i("highlight")}).on("mouseout",function(){return i("downplay")});var i=function(o){var s=a.visualMapModel;s.option.hoverLink&&a.api.dispatchAction({type:o,batch:Gh(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return jz(t,this.api,t.itemSize);var a=n.align;return(!a||a==="auto")&&(a="left"),a},e.prototype._renderEndsText=function(t,n,a,i,o){if(n){var s=new oe,l=this.visualMapModel.textStyleModel;s.add(new Be({style:rt(l,{x:i?o==="right"?a[0]:0:a[0]/2,y:a[1]/2,verticalAlign:"middle",align:i?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=$(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),a=t.get("text"),i=t.get("orient"),o=t.get("inverse");return(i==="horizontal"?o:!o)?n.reverse():a&&(a=a.slice().reverse()),{viewPieceList:n,endsText:a}},e.prototype._createItemSymbol=function(t,n,a,i){var o=Nt(this.getControllerVisual(n,"symbol"),a[0],a[1],a[2],a[3],this.getControllerVisual(n,"color"));o.silent=i,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,a=n.option,i=a.selectedMode;if(i){var o=se(a.selected),s=n.getSelectedMapKey(t);i==="single"||i===!0?(o[s]=!0,M(o,function(l,u){o[u]=u===s})):o[s]=!o[s],this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:o})}},e.type="visualMap.piecewise",e})(qz);function Qz(r){r.registerComponentModel(goe),r.registerComponentView(moe),Kz(r)}function _oe(r){we(Jz),we(Qz)}var Soe=(function(){function r(e){this._thumbnailModel=e}return r.prototype.reset=function(e){this._renderVersion=e.getMainProcessVersion()},r.prototype.renderContent=function(e){var t=e.api.getViewOfComponentModel(this._thumbnailModel);t&&(e.group.silent=!0,t.renderContent({group:e.group,targetTrans:e.targetTrans,z2Range:Tk(e.group),roamType:e.roamType,viewportRect:e.viewportRect,renderVersion:this._renderVersion}))},r.prototype.updateWindow=function(e,t){var n=t.getViewOfComponentModel(this._thumbnailModel);n&&n.updateWindow({targetTrans:e,renderVersion:this._renderVersion})},r})(),boe=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.preventAutoZ=!0,t}return e.prototype.optionUpdated=function(t,n){this._updateBridge()},e.prototype._updateBridge=function(){var t=this._birdge=this._birdge||new Soe(this);if(this._target=null,this.ecModel.eachSeries(function(a){TM(a,null)}),this.shouldShow()){var n=this.getTarget();TM(n.baseMapProvider,t)}},e.prototype.shouldShow=function(){return this.getShallow("show",!0)},e.prototype.getBridge=function(){return this._birdge},e.prototype.getTarget=function(){if(this._target)return this._target;var t=this.getReferringComponents("series",{useDefault:!1,enableAll:!1,enableNone:!1}).models[0];return t?t.subType!=="graph"&&(t=null):t=this.ecModel.queryComponents({mainType:"series",subType:"graph"})[0],this._target={baseMapProvider:t},this._target},e.type="thumbnail",e.layoutMode="box",e.dependencies=["series","geo"],e.defaultOption={show:!0,right:1,bottom:1,height:"25%",width:"25%",itemStyle:{borderColor:B.color.border,borderWidth:2},windowStyle:{borderWidth:1,color:B.color.neutral30,borderColor:B.color.neutral40,opacity:.3},z:10},e})(Le),xoe=(function(r){N(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.render=function(t,n,a){if(this._api=a,this._model=t,this._coordSys||(this._coordSys=new Js),!this._isEnabled()){this._clear();return}this._renderVersion=a.getMainProcessVersion();var i=this.group;i.removeAll();var o=t.getModel("itemStyle"),s=o.getItemStyle();s.fill==null&&(s.fill=n.get("backgroundColor")||B.color.neutral00);var l=Zt(t,a).refContainer,u=ft(Yk(t,!0),l),f=s.lineWidth||0,c=this._contentRect=Os(u.clone(),f/2,!0,!0),v=new oe;i.add(v),v.setClipPath(new Ce({shape:c.plain()}));var h=this._targetGroup=new oe;v.add(h);var p=u.plain();p.r=o.getShallow("borderRadius",!0),i.add(this._bgRect=new Ce({style:s,shape:p,silent:!1,cursor:"grab"}));var d=t.getModel("windowStyle"),g=d.getShallow("borderRadius",!0);v.add(this._windowRect=new Ce({shape:{x:0,y:0,width:0,height:0,r:g},style:d.getItemStyle(),silent:!1,cursor:"grab"})),this._dealRenderContent(),this._dealUpdateWindow(),tI(t,this)},e.prototype.renderContent=function(t){this._bridgeRendered=t,this._isEnabled()&&(this._dealRenderContent(),this._dealUpdateWindow(),tI(this._model,this))},e.prototype._dealRenderContent=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=this._targetGroup,a=this._coordSys,i=this._contentRect;if(n.removeAll(),!!t){var o=t.group,s=o.getBoundingRect();n.add(o),this._bgRect.z2=t.z2Range.min-10,a.setBoundingRect(s.x,s.y,s.width,s.height);var l=ft({left:"center",top:"center",aspect:s.width/s.height},i);a.setViewRect(l.x,l.y,l.width,l.height),o.attr(a.getTransformInfo().raw),this._windowRect.z2=t.z2Range.max+10,this._resetRoamController(t.roamType)}}},e.prototype.updateWindow=function(t){var n=this._bridgeRendered;n&&n.renderVersion===t.renderVersion&&(n.targetTrans=t.targetTrans),this._isEnabled()&&this._dealUpdateWindow()},e.prototype._dealUpdateWindow=function(){var t=this._bridgeRendered;if(!(!t||t.renderVersion!==this._renderVersion)){var n=Yn([],t.targetTrans),a=Sa([],this._coordSys.transform,n);this._transThisToTarget=Yn([],a);var i=t.viewportRect;i?i=i.clone():i=new ve(0,0,this._api.getWidth(),this._api.getHeight()),i.applyTransform(a);var o=this._windowRect,s=o.shape.r;o.setShape(fe({r:s},i))}},e.prototype._resetRoamController=function(t){var n=this,a=this._api,i=this._roamController;if(i||(i=this._roamController=new Ks(a.getZr())),!t||!this._isEnabled()){i.disable();return}i.enable(t,{api:a,zInfo:{component:this._model},triggerInfo:{roamTrigger:null,isInSelf:function(o,s,l){return n._contentRect.contain(s,l)}}}),i.off("pan").off("zoom").on("pan",j(this._onPan,this)).on("zoom",j(this._onZoom,this))},e.prototype._onPan=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Mt([],[t.oldX,t.oldY],n),i=Mt([],[t.oldX-t.dx,t.oldY-t.dy],n);this._api.dispatchAction(eI(this._model.getTarget().baseMapProvider,{dx:i[0]-a[0],dy:i[1]-a[1]}))}},e.prototype._onZoom=function(t){var n=this._transThisToTarget;if(!(!this._isEnabled()||!n)){var a=Mt([],[t.originX,t.originY],n);this._api.dispatchAction(eI(this._model.getTarget().baseMapProvider,{zoom:1/t.scale,originX:a[0],originY:a[1]}))}},e.prototype._isEnabled=function(){var t=this._model;if(!t||!t.shouldShow())return!1;var n=t.getTarget().baseMapProvider;return!!n},e.prototype._clear=function(){this.group.removeAll(),this._bridgeRendered=null,this._roamController&&this._roamController.disable()},e.prototype.remove=function(){this._clear()},e.prototype.dispose=function(){this._clear()},e.type="thumbnail",e})(lt);function eI(r,e){var t=r.mainType==="series"?r.subType+"Roam":r.mainType+"Roam",n={type:t};return n[r.mainType+"Id"]=r.id,H(n,e),n}function tI(r,e){var t=Ns(r);Pd(e.group,t.z,t.zlevel)}function woe(r){r.registerComponentModel(boe),r.registerComponentView(xoe)}var Toe={label:{enabled:!0},decal:{show:!1}},rI=Ae(),Coe={};function Aoe(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=se(Toe);xe(n.label,r.getLocaleModel().get("aria"),!1),xe(t.option,n,!1),a(),i();function a(){var u=t.getModel("decal"),f=u.get("show");if(f){var c=te();r.eachSeries(function(v){if(!v.isColorBySeries()){var h=c.get(v.type);h||(h={},c.set(v.type,h)),rI(v).scope=h}}),r.eachRawSeries(function(v){if(r.isSeriesFiltered(v))return;if(ie(v.enableAriaDecal)){v.enableAriaDecal();return}var h=v.getData();if(v.isColorBySeries()){var m=$0(v.ecModel,v.name,Coe,r.getSeriesCount()),_=h.getVisual("decal");h.setVisual("decal",S(_,m))}else{var p=v.getRawData(),d={},g=rI(v).scope;h.each(function(b){var x=h.getRawIndex(b);d[x]=b});var y=p.count();p.each(function(b){var x=d[b],w=p.getName(b)||b+"",T=$0(v.ecModel,w,g,y),C=h.getItemVisual(x,"decal");h.setItemVisual(x,"decal",S(C,T))})}function S(b,x){var w=b?H(H({},x),b):x;return w.dirty=!0,w}})}}function i(){var u=e.getZr().dom;if(u){var f=r.getLocaleModel().get("aria"),c=t.getModel("label");if(c.option=fe(c.option,f),!!c.get("enabled")){if(u.setAttribute("role","img"),c.get("description")){u.setAttribute("aria-label",c.get("description"));return}var v=r.getSeriesCount(),h=c.get(["data","maxCount"])||10,p=c.get(["series","maxCount"])||10,d=Math.min(v,p),g;if(!(v<1)){var y=s();if(y){var m=c.get(["general","withTitle"]);g=o(m,{title:y})}else g=c.get(["general","withoutTitle"]);var _=[],S=v>1?c.get(["series","multiple","prefix"]):c.get(["series","single","prefix"]);g+=o(S,{seriesCount:v}),r.eachSeries(function(T,C){if(C1?c.get(["series","multiple",L]):c.get(["series","single",L]),A=o(A,{seriesId:T.seriesIndex,seriesName:T.get("name"),seriesType:l(T.subType)});var I=T.getData();if(I.count()>h){var P=c.get(["data","partialData"]);A+=o(P,{displayCnt:h})}else A+=c.get(["data","allData"]);for(var E=c.get(["data","separator","middle"]),k=c.get(["data","separator","end"]),O=c.get(["data","excludeDimensionId"]),R=[],z=0;z":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},Ioe=(function(){function r(e){var t=this._condVal=q(e)?new RegExp(e):gH(e)?e:null;if(t==null){var n="";He(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return q(t)?this._condVal.test(e):ze(t)?this._condVal.test(e+""):!1},r})(),Loe=(function(){function r(){}return r.prototype.evaluate=function(){return this.value},r})(),Poe=(function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t2&&n.push(a),a=[I,P]}function f(I,P,E,k){Vl(I,E)&&Vl(P,k)||a.push(I,P,E,k,E,k)}function c(I,P,E,k,O,R){var z=Math.abs(P-I),V=Math.tan(z/4)*4/3,G=PT:D2&&n.push(a),n}function i1(r,e,t,n,a,i,o,s,l,u){if(Vl(r,t)&&Vl(e,n)&&Vl(a,o)&&Vl(i,s)){l.push(o,s);return}var f=2/u,c=f*f,v=o-r,h=s-e,p=Math.sqrt(v*v+h*h);v/=p,h/=p;var d=t-r,g=n-e,y=a-o,m=i-s,_=d*d+g*g,S=y*y+m*m;if(_=0&&T=0){l.push(o,s);return}var C=[],A=[];ao(r,t,a,o,.5,C),ao(e,n,i,s,.5,A),i1(C[0],A[0],C[1],A[1],C[2],A[2],C[3],A[3],l,u),i1(C[4],A[4],C[5],A[5],C[6],A[6],C[7],A[7],l,u)}function Zoe(r,e){var t=a1(r),n=[];e=e||1;for(var a=0;a0)for(var u=0;uMath.abs(u),c=tB([l,u],f?0:1,e),v=(f?s:u)/c.length,h=0;ha,o=tB([n,a],i?0:1,e),s=i?"width":"height",l=i?"height":"width",u=i?"x":"y",f=i?"y":"x",c=r[s]/o.length,v=0;v1?null:new ue(d*l+r,d*u+e)}function Xoe(r,e,t){var n=new ue;ue.sub(n,t,e),n.normalize();var a=new ue;ue.sub(a,r,e);var i=a.dot(n);return i}function Tl(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function qoe(r,e,t){for(var n=r.length,a=[],i=0;io?(u.x=f.x=s+i/2,u.y=l,f.y=l+o):(u.y=f.y=l+o/2,u.x=s,f.x=s+i),qoe(e,u,f)}function qp(r,e,t,n){if(t===1)n.push(e);else{var a=Math.floor(t/2),i=r(e);qp(r,i[0],a,n),qp(r,i[1],t-a,n)}return n}function joe(r,e){for(var t=[],n=0;n0;u/=2){var f=0,c=0;(r&u)>0&&(f=1),(e&u)>0&&(c=1),s+=u*u*(3*f^c),c===0&&(f===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function Jp(r){var e=1/0,t=1/0,n=-1/0,a=-1/0,i=$(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),f=l.x+l.width/2+(u?u[4]:0),c=l.y+l.height/2+(u?u[5]:0);return e=Math.min(f,e),t=Math.min(c,t),n=Math.max(f,n),a=Math.max(c,a),[f,c]}),o=$(i,function(s,l){return{cp:s,z:ise(s[0],s[1],e,t,n,a),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function aB(r){return Qoe(r.path,r.count)}function o1(){return{fromIndividuals:[],toIndividuals:[],count:0}}function ose(r,e,t){var n=[];function a(b){for(var x=0;x=0;a--)if(!t[a].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var i=l.length,u=Math.ceil(i/2);t[a].many=l.slice(u,i),t[s].many=l.slice(0,u),s++}return t}var lse={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,f;cI(r)&&(u=r,f=e),cI(e)&&(u=e,f=r);function c(y,m,_,S,b){var x=y.many,w=y.one;if(x.length===1&&!b){var T=m?x[0]:w,C=m?w:x[0];if(jp(T))c({many:[T],one:C},!0,_,S,!0);else{var A=s?fe({delay:s(_,S)},l):l;$b(T,C,A),i(T,C,T,C,A)}}else for(var D=fe({dividePath:lse[t],individualDelay:s&&function(O,R,z,V){return s(O+_,S)}},l),L=m?ose(x,w,D):sse(w,x,D),I=L.fromIndividuals,P=L.toIndividuals,E=I.length,k=0;ke.length,h=u?vI(f,u):vI(v?e:r,[v?r:e]),p=0,d=0;diB))for(var i=n.getIndices(),o=0;o0&&x.group.traverse(function(T){T instanceof Me&&!T.animators.length&&T.animateFrom({style:{opacity:0}},w)})})}function yI(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function mI(r){return W(r)?r.sort().join(","):r}function Ri(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function dse(r,e){var t=te(),n=te(),a=te();return M(r.oldSeries,function(i,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=yI(i),f=mI(u);n.set(f,{dataGroupId:s,data:l}),W(u)&&M(u,function(c){a.set(c,{key:f,dataGroupId:s,data:l})})}),M(e.updatedSeries,function(i){if(i.isUniversalTransitionEnabled()&&i.isAnimationEnabled()){var o=i.get("dataGroupId"),s=i.getData(),l=yI(i),u=mI(l),f=n.get(u);if(f)t.set(u,{oldSeries:[{dataGroupId:f.dataGroupId,divide:Ri(f.data),data:f.data}],newSeries:[{dataGroupId:o,divide:Ri(s),data:s}]});else if(W(l)){var c=[];M(l,function(p){var d=n.get(p);d.data&&c.push({dataGroupId:d.dataGroupId,divide:Ri(d.data),data:d.data})}),c.length&&t.set(u,{oldSeries:c,newSeries:[{dataGroupId:o,data:s,divide:Ri(s)}]})}else{var v=a.get(l);if(v){var h=t.get(v.key);h||(h={oldSeries:[{dataGroupId:v.dataGroupId,data:v.data,divide:Ri(v.data)}],newSeries:[]},t.set(v.key,h)),h.newSeries.push({dataGroupId:o,data:s,divide:Ri(s)})}}}}),t}function _I(r,e){for(var t=0;t=0&&a.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:Ri(e.oldData[s]),groupIdDim:o.dimension})}),M(Qe(r.to),function(o){var s=_I(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();i.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:Ri(l),groupIdDim:o.dimension})}}),a.length>0&&i.length>0&&oB(a,i,n)}function yse(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){M(Qe(n.seriesTransition),function(a){M(Qe(a.to),function(i){for(var o=n.updatedSeries,s=0;so.vmin?t+=o.vmin-n+(e-o.vmin)/(o.vmax-o.vmin)*o.gapReal:t+=e-n,n=o.vmax,a=!1;break}t+=o.vmin-n+o.gapReal,n=o.vmax}return a&&(t+=e-n),t},r.prototype.unelapse=function(e){for(var t=SI,n=bI,a=!0,i=0,o=0;ol?i=s.vmin+(e-l)/(u-l)*(s.vmax-s.vmin):i=n+e-t,n=s.vmax,a=!1;break}t=u,n=s.vmax}return a&&(i=n+e-t),i},r})();function _se(){return new mse}var SI=0,bI=0;function Sse(r,e){var t=0,n={tpAbs:{span:0,val:0},tpPrct:{span:0,val:0}},a=function(){return{has:!1,span:NaN,inExtFrac:NaN,val:NaN}},i={S:{tpAbs:a(),tpPrct:a()},E:{tpAbs:a(),tpPrct:a()}};M(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(t+=l.val);var u=Zb(s,e);if(u){var f=u.vmin!==s.vmin,c=u.vmax!==s.vmax,v=u.vmax-u.vmin;if(!(f&&c))if(f||c){var h=f?"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 n[l.type].span+=v,n[l.type].val+=l.val}});var o=t*(0+(e[1]-e[0])+(n.tpAbs.val-n.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)-n.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-n.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));M(r.breaks,function(s){var l=s.gapParsed;l.type==="tpPrct"&&(s.gapReal=t!==0?Math.max(o,0)*l.val/t:0),l.type==="tpAbs"&&(s.gapReal=l.val),s.gapReal==null&&(s.gapReal=0)})}function bse(r,e,t,n,a,i){r!=="no"&&M(t,function(o){var s=Zb(o,i);if(s)for(var l=e.length-1;l>=0;l--){var u=e[l],f=n(u),c=a*3/4;f>s.vmin-c&&fe[0]&&t=0&&o<1-1e-5}M(r,function(o){if(!(!o||o.start==null||o.end==null)&&!o.isExpanded){var s={breakOption:se(o),vmin:e(o.start),vmax:e(o.end),gapParsed:{type:"tpAbs",val:0},gapReal:null};if(o.gap!=null){var l=!1;if(q(o.gap)){var u=xn(o.gap);if(u.match(/%$/)){var f=parseFloat(u)/100;a(f)||(f=0),s.gapParsed.type="tpPrct",s.gapParsed.val=f,l=!0}}if(!l){var c=e(o.gap);(!isFinite(c)||c<0)&&(c=0),s.gapParsed.type="tpAbs",s.gapParsed.val=c}}if(s.vmin===s.vmax&&(s.gapParsed.type="tpAbs",s.gapParsed.val=0),t&&t.noNegative&&M(["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}n.push(s)}}),n.sort(function(o,s){return o.vmin-s.vmin});var i=-1/0;return M(n,function(o,s){i>o.vmin&&(n[s]=null),i=o.vmax}),{breaks:n.filter(function(o){return!!o})}}function Ub(r,e){return l1(e)===l1(r)}function l1(r){return r.start+"_\0_"+r.end}function wse(r,e,t){var n=[];M(r,function(i,o){var s=e(i);s&&s.type==="vmin"&&n.push([o])}),M(r,function(i,o){var s=e(i);if(s&&s.type==="vmax"){var l=Hs(n,function(u){return Ub(e(r[u[0]]).parsedBreak.breakOption,s.parsedBreak.breakOption)});l&&l.push(o)}});var a=[];return M(n,function(i){i.length===2&&a.push(t?i:[r[i[0]],r[i[1]]])}),a}function Tse(r,e,t,n){var a,i;if(r.break){var o=r.break.parsedBreak,s=Hs(t,function(c){return Ub(c.breakOption,r.break.parsedBreak.breakOption)}),l=n(Math.pow(e,o.vmin),s.vmin),u=n(Math.pow(e,o.vmax),s.vmax),f={type:o.gapParsed.type,val:o.gapParsed.type==="tpAbs"?Pt(Math.pow(e,o.vmin+o.gapParsed.val))-l:o.gapParsed.val};a={type:r.break.type,parsedBreak:{breakOption:o.breakOption,vmin:l,vmax:u,gapParsed:f,gapReal:o.gapReal}},i=s[r.break.type]}return{brkRoundingCriterion:i,vBreak:a}}function Cse(r,e,t){var n={noNegative:!0},a=s1(r,t,n),i=s1(r,t,n),o=Math.log(e);return i.breaks=$(i.breaks,function(s){var l=Math.log(s.vmin)/o,u=Math.log(s.vmax)/o,f={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:f,gapReal:s.gapReal,breakOption:s.breakOption}}),{parsedOriginal:a,parsedLogged:i}}var Ase={vmin:"start",vmax:"end"};function Mse(r,e){return e&&(r=r||{},r.break={type:Ase[e.type],start:e.parsedBreak.vmin,end:e.parsedBreak.vmax}),r}function Dse(){d$({createScaleBreakContext:_se,pruneTicksByBreak:bse,addBreaksToTicks:xse,parseAxisBreakOption:s1,identifyAxisBreak:Ub,serializeAxisBreakIdentifier:l1,retrieveAxisBreakPairs:wse,getTicksLogTransformBreak:Tse,logarithmicParseBreaksFromOption:Cse,makeAxisLabelFormatterParamBreak:Mse})}var xI=Ae();function Ise(r,e){var t=Hs(r,function(n){return Et().identifyAxisBreak(n.parsedBreak.breakOption,e.breakOption)});return t||r.push(t={zigzagRandomList:[],parsedBreak:e,shouldRemove:!1}),t}function Lse(r){M(r,function(e){return e.shouldRemove=!0})}function Pse(r){for(var e=r.length-1;e>=0;e--)r[e].shouldRemove&&r.splice(e,1)}function kse(r,e,t,n,a){var i=t.axis;if(i.scale.isBlank()||!Et())return;var o=Et().retrieveAxisBreakPairs(i.scale.getTicks({breakTicks:"only_break"}),function(C){return C.break},!1);if(!o.length)return;var s=t.getModel("breakArea"),l=s.get("zigzagAmplitude"),u=s.get("zigzagMinSpan"),f=s.get("zigzagMaxSpan");u=Math.max(2,u||0),f=Math.max(u,f||0);var c=s.get("expandOnClick"),v=s.get("zigzagZ"),h=s.getModel("itemStyle"),p=h.getItemStyle(),d=p.stroke,g=p.lineWidth,y=p.lineDash,m=p.fill,_=new oe({ignoreModelZ:!0}),S=i.isHorizontal(),b=xI(e).visualList||(xI(e).visualList=[]);Lse(b);for(var x=function(C){var A=o[C][0].break.parsedBreak,D=[];D[0]=i.toGlobalCoord(i.dataToCoord(A.vmin,!0)),D[1]=i.toGlobalCoord(i.dataToCoord(A.vmax,!0)),D[1]=R;Oe&&(U=R);var We=[],pe=[];We[k]=D,pe[k]=L,!he&&!Oe&&(We[k]+=F?-l:l,pe[k]-=F?l:-l),We[O]=U,pe[O]=U,V.push(We),G.push(pe);var ae=void 0;if(Jm[1]&&m.reverse(),{coordPair:m,brkId:Et().serializeAxisBreakIdentifier(y.breakOption)}});l.sort(function(g,y){return g.coordPair[0]-y.coordPair[0]});for(var u=o[0],f=null,c=0;c=0?l[0].width:l[1].width),v=(c+f.x)/2-u.x,h=Math.min(v,v-f.x),p=Math.max(v,v-f.x),d=p<0?p:h>0?h:0;s=(v-d)/f.x}var g=new ue,y=new ue;ue.scale(g,n,-s),ue.scale(y,n,1-s),u_(t[0],g),u_(t[1],y)}function Ose(r,e){var t={breaks:[]};return M(e.breaks,function(n){if(n){var a=Hs(r.get("breaks",!0),function(s){return Et().identifyAxisBreak(s,n)});if(a){var i=e.type,o={isExpanded:!!a.isExpanded};a.isExpanded=i===Hd?!0:i===MO?!1:i===DO?!a.isExpanded:a.isExpanded,t.breaks.push({start:a.start,end:a.end,isExpanded:!!a.isExpanded,old:o})}}}),t}function Nse(){PX({adjustBreakLabelPair:Rse,buildAxisBreakLine:Ese,rectCoordBuildBreakAxis:kse,updateModelAxisBreak:Ose})}function zse(r){zX(r),Dse(),Nse()}function Bse(){aq(Vse)}function Vse(r,e){M(r,function(t){if(!t.model.get(["axisLabel","inside"])){var n=Gse(t);if(n){var a=t.isHorizontal()?"height":"width",i=t.model.get(["axisLabel","margin"]);e[a]-=n[a]+i,t.position==="top"?e.y+=n.height+i:t.position==="left"&&(e.x+=n.width+i)}}})}function Gse(r){var e=r.model,t=r.scale;if(!e.get(["axisLabel","show"])||t.isBlank())return;var n,a,i=t.getExtent();t instanceof nu?a=t.count():(n=t.getTicks(),a=n.length);var o=r.getLabelModel(),s=Du(r),l,u=1;a>40&&(u=Math.ceil(a/40));for(var f=0;f
');function Hse(r,e){ed(e,!1);let t=df(e,"surveys",24,()=>[]),n=er(),a=er(),i=er(),o,s,l;const u={textStyle:{color:"#f8fafc"},title:{textStyle:{color:"#f8fafc"}},legend:{textStyle:{color:"#94a3b8"}},tooltip:{backgroundColor:"rgba(20, 35, 55, 0.9)",borderColor:"#0082FF",textStyle:{color:"#f8fafc"}}};function f(){if(!t().length)return;const m={};t().forEach(C=>{const A=C.shiftCoverage||"Unknown";m[A]=(m[A]||0)+1}),o&&o.setOption({...u,title:{text:"Shift Coverage Models",left:"center"},tooltip:{trigger:"item"},series:[{type:"pie",radius:"60%",data:Object.entries(m).map(([C,A])=>({name:C,value:A})),emphasis:{itemStyle:{shadowBlur:10,shadowOffsetX:0,shadowColor:"rgba(0, 0, 0, 0.5)"}}}]});const _=t().map(C=>C.department||"Unknown"),S=t().map(C=>C.sysIncidents||0),b=t().map(C=>C.humIncidents||0);s&&s.setOption({...u,title:{text:"Monthly Incidents by Department",left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{bottom:0,data:["System Generated","Human Generated"]},grid:{left:"3%",right:"4%",bottom:"15%",containLabel:!0},xAxis:{type:"category",data:_,axisLabel:{color:"#94a3b8"}},yAxis:{type:"value",axisLabel:{color:"#94a3b8"},splitLine:{lineStyle:{color:"rgba(255,255,255,0.08)"}}},series:[{name:"System Generated",type:"bar",stack:"total",data:S,itemStyle:{color:"#0082FF"}},{name:"Human Generated",type:"bar",stack:"total",data:b,itemStyle:{color:"#D9261C"}}]});const x=t().map(C=>C.totalApps||0),w=t().map(C=>C.ecaCount||0),T=x.map((C,A)=>Math.max(0,C-w[A]));l&&l.setOption({...u,title:{text:"Application Portfolio Breakdown",left:"center"},tooltip:{trigger:"axis",axisPointer:{type:"shadow"}},legend:{bottom:0,data:["Regular Apps","ECAs"]},grid:{left:"3%",right:"4%",bottom:"15%",containLabel:!0},xAxis:{type:"category",data:_,axisLabel:{color:"#94a3b8"}},yAxis:{type:"value",axisLabel:{color:"#94a3b8"},splitLine:{lineStyle:{color:"rgba(255,255,255,0.08)"}}},series:[{name:"Regular Apps",type:"bar",stack:"total",data:T,itemStyle:{color:"#003B70"}},{name:"ECAs",type:"bar",stack:"total",data:w,itemStyle:{color:"#0082FF"}}]})}e5(()=>{o=oy(Y(n)),s=oy(Y(a)),l=oy(Y(i)),f();const m=()=>{o.resize(),s.resize(),l.resize()};return window.addEventListener("resize",m),()=>{window.removeEventListener("resize",m),o.dispose(),s.dispose(),l.dispose()}}),eL(()=>hL(t()),()=>{t()&&f()}),tL(),_1();var c=Fse(),v=ne(c),h=ne(v);Ef(h,m=>Fe(n,m),()=>Y(n));var p=K(v,2),d=ne(p);Ef(d,m=>Fe(a,m),()=>Y(a));var g=K(p,2),y=ne(g);Ef(y,m=>Fe(i,m),()=>Y(i)),tt(r,c),td()}var Wse=ct('
  • '),$se=ct('

    Upload Errors

      '),Zse=ct('

      Total Teams

      Total Headcount

      Total Apps Managed

      Total ECAs

      ',1),Use=ct(`

      Team Survey Aggregator

      Upload JSON survey files from your leads to visualize the aggregated results.

      Drag and Drop JSON files here

      or

      `);function Yse(r,e){ed(e,!1);let t=er([]),n=er(),a=er([]);function i(_){_.dataTransfer&&_.dataTransfer.files&&s(_.dataTransfer.files)}function o(_){_.target&&_.target.files&&s(_.target.files),ex(n,Y(n).value="")}function s(_){Array.from(_).forEach(S=>{const b=new FileReader;b.onload=x=>{try{const w=JSON.parse(x.target.result),T=XL.safeParse(w);if(T.success){const C=(T.data.department||"").trim().toLowerCase(),A=(T.data.leadName||"").trim().toLowerCase(),D=Y(t).findIndex(L=>(L.department||"").trim().toLowerCase()===C&&(L.leadName||"").trim().toLowerCase()===A);D!==-1?ex(t,Y(t)[D]=T.data):Y(t).push(T.data),Fe(t,[...Y(t)])}else console.error("Validation failed for file: ",S.name,T.error),Fe(a,[...Y(a),{name:S.name,reason:"Missing required fields (Did you upload a Draft?)"}])}catch(w){console.error("JSON parse error:",w),Fe(a,[...Y(a),{name:S.name,reason:"Invalid JSON format"}])}},b.readAsText(S)})}function l(){Y(n).click()}function u(){Fe(t,[]),Fe(a,[])}_1();var f=Use(),c=K(ne(f),4),v=ne(c),h=K(ne(v),6),p=K(h,2);Ef(p,_=>Fe(n,_),()=>Y(n));var d=K(c,2);{var g=_=>{var S=$se(),b=K(ne(S),2);Zm(b,5,()=>Y(a),Wm,(w,T)=>{var C=Wse(),A=ne(C),D=K(A),L=ne(D);Er(()=>{ur(A,`${Y(T).name??""}: `),ur(L,Y(T).reason)}),tt(w,C)});var x=K(b,2);lr("click",x,()=>Fe(a,[])),tt(_,S)};Vt(d,_=>{Y(a).length>0&&_(g)})}var y=K(d,2);{var m=_=>{var S=Zse(),b=qI(S),x=ne(b),w=K(ne(x),2),T=ne(w),C=K(x,2),A=K(ne(C),2),D=ne(A),L=K(C,2),I=K(ne(L),2),P=ne(I),E=K(L,2),k=K(ne(E),2),O=ne(k),R=K(b,2),z=ne(R),V=K(R,2);Hse(V,{get surveys(){return Y(t)}}),Er((G,F,U)=>{ur(T,Y(t).length),ur(D,G),ur(P,F),ur(O,U)},[()=>Y(t).reduce((G,F)=>G+F.teamSize,0),()=>Y(t).reduce((G,F)=>G+F.totalApps,0),()=>Y(t).reduce((G,F)=>G+F.ecaCount,0)]),lr("click",z,u),tt(_,S)};Vt(y,_=>{Y(t).length>0&&_(m)})}lr("click",h,l),lr("change",p,o),lr("drop",c,Um(i)),lr("dragover",c,Um(()=>{})),tt(r,f),td()}var Xse=ct('

      Production Support Strategy 2026

      LATMEX Banking - Information Gathering

      ',1);function qse(r){let e=er("survey");var t=Xse(),n=K(qI(t),2),a=ne(n),i=K(ne(a),4),o=ne(i),s=K(o,2),l=K(a,2),u=ne(l);{var f=v=>{eH(v,{})},c=v=>{Yse(v,{})};Vt(u,v=>{Y(e)==="survey"?v(f):Y(e)==="dashboard"&&v(c,1)})}Er(()=>{Oi(o,1,`tab-btn ${Y(e)==="survey"?"active":""}`,"svelte-1n46o8q"),Oi(s,1,`tab-btn ${Y(e)==="dashboard"?"active":""}`,"svelte-1n46o8q")}),lr("click",o,()=>Fe(e,"survey")),lr("click",s,()=>Fe(e,"dashboard")),tt(r,t)}EV(qse,{target:document.getElementById("app")});