You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4501 lines
2.0 MiB
4501 lines
2.0 MiB
var f7=Object.defineProperty,d7=Object.defineProperties;var p7=Object.getOwnPropertyDescriptors;var Hg=Object.getOwnPropertySymbols;var aL=Object.prototype.hasOwnProperty,oL=Object.prototype.propertyIsEnumerable;var ux=(r,e)=>{if(e=Symbol[r])return e;throw Error("Symbol."+r+" is not defined")},cu=Math.pow,cx=(r,e,t)=>e in r?f7(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,Re=(r,e)=>{for(var t in e||(e={}))aL.call(e,t)&&cx(r,t,e[t]);if(Hg)for(var t of Hg(e))oL.call(e,t)&&cx(r,t,e[t]);return r},Xe=(r,e)=>d7(r,p7(e));var sL=(r,e)=>{var t={};for(var n in r)aL.call(r,n)&&e.indexOf(n)<0&&(t[n]=r[n]);if(r!=null&&Hg)for(var n of Hg(r))e.indexOf(n)<0&&oL.call(r,n)&&(t[n]=r[n]);return t};var bt=(r,e,t)=>(cx(r,typeof e!="symbol"?e+"":e,t),t);var Ge=(r,e,t)=>new Promise((n,i)=>{var a=l=>{try{s(t.next(l))}catch(u){i(u)}},o=l=>{try{s(t.throw(l))}catch(u){i(u)}},s=l=>l.done?n(l.value):Promise.resolve(l.value).then(a,o);s((t=t.apply(r,e)).next())}),v7=function(r,e){this[0]=r,this[1]=e};var lL=r=>{var e=r[ux("asyncIterator")],t=!1,n,i={};return e==null?(e=r[ux("iterator")](),n=a=>i[a]=o=>e[a](o)):(e=e.call(r),n=a=>i[a]=o=>{if(t){if(t=!1,a==="throw")throw o;return o}return t=!0,{done:!1,value:new v7(new Promise(s=>{var l=e[a](o);if(!(l instanceof Object))throw TypeError("Object expected");s(l)}),1)}}),i[ux("iterator")]=()=>i,n("next"),"throw"in e?n("throw"):i.throw=a=>{throw a},"return"in e&&n("return"),i};import{_ as OM,o as ie,c as oe,a as G,t as Te,r as Df,b as $e,d as tt,w as ni,p as uL,i as sf,n as Vt,u as _n,e as Se,f as uo,g as Tt,h as Ko,j as QB,k as fc,l as un,s as Ap,F as it,m as vt,q as Ji,v as Zn,x as Xt,y as ul,z as JB,A as Kw,B as Nc,C as no,D as g7,E as cL,G as hL,H as m7,I as y7,J as _7,K as x7,L as ih}from"./index-1782613078975.js";const _0=""+new URL("bottom-menu-arrow-big-180b7071-balabala-1782613078975.svg",import.meta.url).href,x0=""+new URL("bottom-menu-arrow-small-19304179-balabala-1782613078975.svg",import.meta.url).href;/** |
|
* @name: autofit.js |
|
* @author: Larry Zhu |
|
* @version: 3.2.8 |
|
* @description: autofit.js 是迄今为止最易用的自适应工具 |
|
* @license: MIT |
|
*/let hx=null,vv="",Zw="",Qw="",fx=null,fL=null,Dr=1,yf=!1;const Y_={isAutofitRunning:!1,init(r={},e=!0){e&&console.log("autofit.js is running");const{dw:t=1920,dh:n=1080,el:i=typeof r=="string"?r:"body",resize:a=!0,ignore:o=[],transition:s="none",delay:l=0,limit:u=.1,cssMode:c="scale",allowScroll:h=!1}=r;hx=i;const f=document.querySelector(i);if(!f){console.error(`autofit: '${i}' is not exist`);return}const d=document.createElement("style"),p=document.createElement("style");d.lang="text/css",p.lang="text/css",d.id="autofit-style",p.id="ignoreStyle",!h&&(d.innerHTML="body {overflow: hidden;}");const g=document.querySelector("body");g.appendChild(d),g.appendChild(p),f.style.height=`${n}px`,f.style.width=`${t}px`,f.style.transformOrigin="0 0",!h&&(f.style.overflow="hidden"),dx(t,n,f,o,u,c),fx=()=>{clearTimeout(fL),l!=0?fL=setTimeout(()=>{dx(t,n,f,o,u,c),yf&&Jw(vv,Qw,Zw)},l):(dx(t,n,f,o,u,c),yf&&Jw(vv,Qw,Zw))},a&&window.addEventListener("resize",fx),this.isAutofitRunning=!0,setTimeout(()=>{f.style.transition=`${s}s`})},off(r="body"){try{window.removeEventListener("resize",fx);const e=document.querySelector("#autofit-style");e&&e.remove();const t=document.querySelector("#ignoreStyle");t&&t.remove();const n=document.querySelector(hx||r);n&&(n.style.cssText=""),yf&&e5()}catch(e){console.error("autofit: Failed to remove normally",e)}this.isAutofitRunning=!1,console.log("autofit.js is off")},elRectification:null,scale:Dr};function Jw(r,e=!0,t=1){if(!Y_.isAutofitRunning){console.error("autofit.js:(elRectification): autofit has not been initialized yet");return}e5(),!r&&console.error(`autofit.js:elRectification bad selector: ${r}`),vv=r,Zw=t,Qw=e;const n=Array.from(document.querySelectorAll(r));if(n.length==0){console.error(`autofit.js:elRectification found no element by selector: "${r}"`);return}for(const i of n){const a=Dr==1?1:Number(Dr)*Number(t);yf||(i.originalWidth=i.clientWidth,i.originalHeight=i.clientHeight),e?(i.style.width=`${i.originalWidth*a}px`,i.style.height=`${i.originalHeight*a}px`):(i.style.width=`${100*a}%`,i.style.height=`${100*a}%`),i.style.transform=`translateZ(0) scale(${1/Number(Dr)})`,i.style.transformOrigin="0 0"}yf=!0}function e5(){if(vv){yf=!1;for(const r of Array.from(document.querySelectorAll(vv)))r.style.width="",r.style.height="",r.style.transform=""}}function dx(r,e,t,n,i,a="scale"){const o=document.documentElement.clientHeight,s=document.documentElement.clientWidth;Dr=s/o<r/e?s/r:o/e,Dr=Math.abs(1-Dr)>i?Dr:1,Y_.scale=+Dr;const l=Math.round(o/Number(Dr)),u=Math.round(s/Number(Dr));t.style.height=`${l}px`,t.style.width=`${u}px`,a==="zoom"?t.style.zoom=`${Dr}`:t.style.transform=`translateZ(0) scale(${Dr})`;const c=document.querySelector("#ignoreStyle");c.innerHTML="";for(const h of n){const f=h;let d=f.el||f.dom;if(typeof f=="string"&&(d=f),!d||typeof d=="object"&&!Object.keys(d).length){console.error(`autofit: found invalid or empty selector/object: ${d}`);continue}const p=f.scale?f.scale:1/Number(Dr),g=p!=Dr&&f.fontSize,v=p!=Dr&&f.width,m=p!=Dr&&f.height;c.innerHTML+=` |
|
${d} { |
|
transform: scale(${p})!important; |
|
transform-origin: 0 0; |
|
${v?`width: ${v}!important;`:""} |
|
${m?`height: ${m}!important;`:""} |
|
}`,g&&(c.innerHTML+=` |
|
${d} div ,${d} span,${d} a,${d} * { |
|
font-size: ${g}px; |
|
}`)}}Y_.elRectification=Jw;function fs(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function t5(r,e){r.prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e}/*! |
|
* GSAP 3.14.2 |
|
* https://gsap.com |
|
* |
|
* @license Copyright 2008-2025, GreenSock. All rights reserved. |
|
* Subject to the terms at https://gsap.com/standard-license |
|
* @author: Jack Doyle, jack@greensock.com |
|
*/var ea={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},If={duration:.5,overwrite:!1,delay:0},FM,kr,In,Ea=1e8,An=1/Ea,eb=Math.PI*2,S7=eb/4,A7=0,n5=Math.sqrt,w7=Math.cos,b7=Math.sin,Er=function(e){return typeof e=="string"},Xn=function(e){return typeof e=="function"},Ms=function(e){return typeof e=="number"},BM=function(e){return typeof e=="undefined"},Wo=function(e){return typeof e=="object"},Ei=function(e){return e!==!1},zM=function(){return typeof window!="undefined"},Wg=function(e){return Xn(e)||Er(e)},r5=typeof ArrayBuffer=="function"&&ArrayBuffer.isView||function(){},ri=Array.isArray,T7=/random\([^)]+\)/g,M7=/,\s*/g,dL=/(?:-?\.?\d|\.)+/gi,i5=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,lf=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,px=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,a5=/[+-]=-?[.\d]+/,C7=/[^,'"\[\]\s]+/gi,E7=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,Bn,To,tb,UM,ia={},S0={},o5,s5=function(e){return(S0=Nf(e,ia))&&ki},VM=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},gv=function(e,t){return!t&&console.warn(e)},l5=function(e,t){return e&&(ia[e]=t)&&S0&&(S0[e]=t)||ia},mv=function(){return 0},L7={suppressEvents:!0,isStart:!0,kill:!1},Gy={suppressEvents:!0,kill:!1},P7={suppressEvents:!0},GM={},Il=[],nb={},u5,Xi={},vx={},pL=30,Hy=[],HM="",WM=function(e){var t=e[0],n,i;if(Wo(t)||Xn(t)||(e=[e]),!(n=(t._gsap||{}).harness)){for(i=Hy.length;i--&&!Hy[i].targetTest(t););n=Hy[i]}for(i=e.length;i--;)e[i]&&(e[i]._gsap||(e[i]._gsap=new I5(e[i],n)))||e.splice(i,1);return e},dc=function(e){return e._gsap||WM(La(e))[0]._gsap},c5=function(e,t,n){return(n=e[t])&&Xn(n)?e[t]():BM(n)&&e.getAttribute&&e.getAttribute(t)||n},Li=function(e,t){return(e=e.split(",")).forEach(t)||e},Jn=function(e){return Math.round(e*1e5)/1e5||0},Fn=function(e){return Math.round(e*1e7)/1e7||0},_f=function(e,t){var n=t.charAt(0),i=parseFloat(t.substr(2));return e=parseFloat(e),n==="+"?e+i:n==="-"?e-i:n==="*"?e*i:e/i},R7=function(e,t){for(var n=t.length,i=0;e.indexOf(t[i])<0&&++i<n;);return i<n},A0=function(){var e=Il.length,t=Il.slice(0),n,i;for(nb={},Il.length=0,n=0;n<e;n++)i=t[n],i&&i._lazy&&(i.render(i._lazy[0],i._lazy[1],!0)._lazy=0)},$M=function(e){return!!(e._initted||e._startAt||e.add)},h5=function(e,t,n,i){Il.length&&!kr&&A0(),e.render(t,n,i||!!(kr&&t<0&&$M(e))),Il.length&&!kr&&A0()},f5=function(e){var t=parseFloat(e);return(t||t===0)&&(e+"").match(C7).length<2?t:Er(e)?e.trim():e},d5=function(e){return e},aa=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},D7=function(e){return function(t,n){for(var i in n)i in t||i==="duration"&&e||i==="ease"||(t[i]=n[i])}},Nf=function(e,t){for(var n in t)e[n]=t[n];return e},vL=function r(e,t){for(var n in t)n!=="__proto__"&&n!=="constructor"&&n!=="prototype"&&(e[n]=Wo(t[n])?r(e[n]||(e[n]={}),t[n]):t[n]);return e},w0=function(e,t){var n={},i;for(i in e)i in t||(n[i]=e[i]);return n},Hp=function(e){var t=e.parent||Bn,n=e.keyframes?D7(ri(e.keyframes)):aa;if(Ei(e.inherit))for(;t;)n(e,t.vars.defaults),t=t.parent||t._dp;return e},I7=function(e,t){for(var n=e.length,i=n===t.length;i&&n--&&e[n]===t[n];);return n<0},p5=function(e,t,n,i,a){n===void 0&&(n="_first"),i===void 0&&(i="_last");var o=e[i],s;if(a)for(s=t[a];o&&o[a]>s;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[i]=t,t._prev=o,t.parent=t._dp=e,t},q_=function(e,t,n,i){n===void 0&&(n="_first"),i===void 0&&(i="_last");var a=t._prev,o=t._next;a?a._next=o:e[n]===t&&(e[n]=o),o?o._prev=a:e[i]===t&&(e[i]=a),t._next=t._prev=t.parent=null},Wl=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove&&e.parent.remove(e),e._act=0},pc=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},N7=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},rb=function(e,t,n,i){return e._startAt&&(kr?e._startAt.revert(Gy):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,i))},k7=function r(e){return!e||e._ts&&r(e.parent)},gL=function(e){return e._repeat?kf(e._tTime,e=e.duration()+e._rDelay)*e:0},kf=function(e,t){var n=Math.floor(e=Fn(e/t));return e&&n===e?n-1:n},b0=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},j_=function(e){return e._end=Fn(e._start+(e._tDur/Math.abs(e._ts||e._rts||An)||0))},K_=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=Fn(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),j_(e),n._dirty||pc(n,e)),e},v5=function(e,t){var n;if((t._time||!t._dur&&t._initted||t._start<e._time&&(t._dur||!t.add))&&(n=b0(e.rawTime(),t),(!t._dur||dg(0,t.totalDuration(),n)-t._tTime>An)&&t.render(n,!0)),pc(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-An}},Po=function(e,t,n,i){return t.parent&&Wl(t),t._start=Fn((Ms(n)?n:n||e!==Bn?pa(e,n,t):e._time)+t._delay),t._end=Fn(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),p5(e,t,"_first","_last",e._sort?"_start":0),ib(t)||(e._recent=t),i||v5(e,t),e._ts<0&&K_(e,e._tTime),e},g5=function(e,t){return(ia.ScrollTrigger||VM("scrollTrigger",t))&&ia.ScrollTrigger.create(t,e)},m5=function(e,t,n,i,a){if(YM(e,t,a),!e._initted)return 1;if(!n&&e._pt&&!kr&&(e._dur&&e.vars.lazy!==!1||!e._dur&&e.vars.lazy)&&u5!==qi.frame)return Il.push(e),e._lazy=[a,i],1},O7=function r(e){var t=e.parent;return t&&t._ts&&t._initted&&!t._lock&&(t.rawTime()<0||r(t))},ib=function(e){var t=e.data;return t==="isFromStart"||t==="isStart"},F7=function(e,t,n,i){var a=e.ratio,o=t<0||!t&&(!e._start&&O7(e)&&!(!e._initted&&ib(e))||(e._ts<0||e._dp._ts<0)&&!ib(e))?0:1,s=e._rDelay,l=0,u,c,h;if(s&&e._repeat&&(l=dg(0,e._tDur,t),c=kf(l,s),e._yoyo&&c&1&&(o=1-o),c!==kf(e._tTime,s)&&(a=1-o,e.vars.repeatRefresh&&e._initted&&e.invalidate())),o!==a||kr||i||e._zTime===An||!t&&e._zTime){if(!e._initted&&m5(e,t,i,n,l))return;for(h=e._zTime,e._zTime=t||(n?An:0),n||(n=t&&!h),e.ratio=o,e._from&&(o=1-o),e._time=0,e._tTime=l,u=e._pt;u;)u.r(o,u.d),u=u._next;t<0&&rb(e,t,n,!0),e._onUpdate&&!n&&Ki(e,"onUpdate"),l&&e._repeat&&!n&&e.parent&&Ki(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===o&&(o&&Wl(e,1),!n&&!kr&&(Ki(e,o?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)},B7=function(e,t,n){var i;if(n>t)for(i=e._first;i&&i._start<=n;){if(i.data==="isPause"&&i._start>t)return i;i=i._next}else for(i=e._last;i&&i._start>=n;){if(i.data==="isPause"&&i._start<t)return i;i=i._prev}},Of=function(e,t,n,i){var a=e._repeat,o=Fn(t)||0,s=e._tTime/e._tDur;return s&&!i&&(e._time*=o/e._dur),e._dur=o,e._tDur=a?a<0?1e10:Fn(o*(a+1)+e._rDelay*a):o,s>0&&!i&&K_(e,e._tTime=e._tDur*s),e.parent&&j_(e),n||pc(e.parent,e),e},mL=function(e){return e instanceof pi?pc(e):Of(e,e._dur)},z7={_start:0,endTime:mv,totalDuration:mv},pa=function r(e,t,n){var i=e.labels,a=e._recent||z7,o=e.duration()>=Ea?a.endTime(!1):e._dur,s,l,u;return Er(t)&&(isNaN(t)||t in i)?(l=t.charAt(0),u=t.substr(-1)==="%",s=t.indexOf("="),l==="<"||l===">"?(s>=0&&(t=t.replace(/=/,"")),(l==="<"?a._start:a.endTime(a._repeat>=0))+(parseFloat(t.substr(1))||0)*(u?(s<0?a:n).totalDuration()/100:1)):s<0?(t in i||(i[t]=o),i[t]):(l=parseFloat(t.charAt(s-1)+t.substr(s+1)),u&&n&&(l=l/100*(ri(n)?n[0]:n).totalDuration()),s>1?r(e,t.substr(0,s-1),n)+l:o+l)):t==null?o:+t},Wp=function(e,t,n){var i=Ms(t[1]),a=(i?2:1)+(e<2?0:1),o=t[a],s,l;if(i&&(o.duration=t[1]),o.parent=n,e){for(s=o,l=n;l&&!("immediateRender"in s);)s=l.vars.defaults||{},l=Ei(l.vars.inherit)&&l.parent;o.immediateRender=Ei(s.immediateRender),e<2?o.runBackwards=1:o.startAt=t[a-1]}return new sr(t[0],o,t[a+1])},ru=function(e,t){return e||e===0?t(e):t},dg=function(e,t,n){return n<e?e:n>t?t:n},ei=function(e,t){return!Er(e)||!(t=E7.exec(e))?"":t[1]},U7=function(e,t,n){return ru(n,function(i){return dg(e,t,i)})},ab=[].slice,y5=function(e,t){return e&&Wo(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&Wo(e[0]))&&!e.nodeType&&e!==To},V7=function(e,t,n){return n===void 0&&(n=[]),e.forEach(function(i){var a;return Er(i)&&!t||y5(i,1)?(a=n).push.apply(a,La(i)):n.push(i)})||n},La=function(e,t,n){return In&&!t&&In.selector?In.selector(e):Er(e)&&!n&&(tb||!Ff())?ab.call((t||UM).querySelectorAll(e),0):ri(e)?V7(e,n):y5(e)?ab.call(e,0):e?[e]:[]},ob=function(e){return e=La(e)[0]||gv("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return La(t,n.querySelectorAll?n:n===e?gv("Invalid scope")||UM.createElement("div"):e)}},_5=function(e){return e.sort(function(){return .5-Math.random()})},x5=function(e){if(Xn(e))return e;var t=Wo(e)?e:{each:e},n=vc(t.ease),i=t.from||0,a=parseFloat(t.base)||0,o={},s=i>0&&i<1,l=isNaN(i)||s,u=t.axis,c=i,h=i;return Er(i)?c=h={center:.5,edges:.5,end:1}[i]||0:!s&&l&&(c=i[0],h=i[1]),function(f,d,p){var g=(p||t).length,v=o[g],m,y,_,x,S,A,w,M,C;if(!v){if(C=t.grid==="auto"?0:(t.grid||[1,Ea])[1],!C){for(w=-Ea;w<(w=p[C++].getBoundingClientRect().left)&&C<g;);C<g&&C--}for(v=o[g]=[],m=l?Math.min(C,g)*c-.5:i%C,y=C===Ea?0:l?g*h/C-.5:i/C|0,w=0,M=Ea,A=0;A<g;A++)_=A%C-m,x=y-(A/C|0),v[A]=S=u?Math.abs(u==="y"?x:_):n5(_*_+x*x),S>w&&(w=S),S<M&&(M=S);i==="random"&&_5(v),v.max=w-M,v.min=M,v.v=g=(parseFloat(t.amount)||parseFloat(t.each)*(C>g?g-1:u?u==="y"?g/C:C:Math.max(C,g/C))||0)*(i==="edges"?-1:1),v.b=g<0?a-g:a,v.u=ei(t.amount||t.each)||0,n=n&&g<0?P5(n):n}return g=(v[f]-v.min)/v.max||0,Fn(v.b+(n?n(g):g)*v.v)+v.u}},sb=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var i=Fn(Math.round(parseFloat(n)/e)*e*t);return(i-i%1)/t+(Ms(n)?0:ei(n))}},S5=function(e,t){var n=ri(e),i,a;return!n&&Wo(e)&&(i=n=e.radius||Ea,e.values?(e=La(e.values),(a=!Ms(e[0]))&&(i*=i)):e=sb(e.increment)),ru(t,n?Xn(e)?function(o){return a=e(o),Math.abs(a-o)<=i?a:o}:function(o){for(var s=parseFloat(a?o.x:o),l=parseFloat(a?o.y:0),u=Ea,c=0,h=e.length,f,d;h--;)a?(f=e[h].x-s,d=e[h].y-l,f=f*f+d*d):f=Math.abs(e[h]-s),f<u&&(u=f,c=h);return c=!i||u<=i?e[c]:o,a||c===o||Ms(o)?c:c+ei(o)}:sb(e))},A5=function(e,t,n,i){return ru(ri(e)?!t:n===!0?!!(n=0):!i,function(){return ri(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(i=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+n*.99))/n)*n*i)/i})},G7=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(i){return t.reduce(function(a,o){return o(a)},i)}},H7=function(e,t){return function(n){return e(parseFloat(n))+(t||ei(n))}},W7=function(e,t,n){return b5(e,t,0,1,n)},w5=function(e,t,n){return ru(n,function(i){return e[~~t(i)]})},$7=function r(e,t,n){var i=t-e;return ri(e)?w5(e,r(0,e.length),t):ru(n,function(a){return(i+(a-e)%i)%i+e})},X7=function r(e,t,n){var i=t-e,a=i*2;return ri(e)?w5(e,r(0,e.length-1),t):ru(n,function(o){return o=(a+(o-e)%a)%a||0,e+(o>i?a-o:o)})},yv=function(e){return e.replace(T7,function(t){var n=t.indexOf("[")+1,i=t.substring(n||7,n?t.indexOf("]"):t.length-1).split(M7);return A5(n?i:+i[0],n?0:+i[1],+i[2]||1e-5)})},b5=function(e,t,n,i,a){var o=t-e,s=i-n;return ru(a,function(l){return n+((l-e)/o*s||0)})},Y7=function r(e,t,n,i){var a=isNaN(e+t)?0:function(d){return(1-d)*e+d*t};if(!a){var o=Er(e),s={},l,u,c,h,f;if(n===!0&&(i=1)&&(n=null),o)e={p:e},t={p:t};else if(ri(e)&&!ri(t)){for(c=[],h=e.length,f=h-2,u=1;u<h;u++)c.push(r(e[u-1],e[u]));h--,a=function(p){p*=h;var g=Math.min(f,~~p);return c[g](p-g)},n=t}else i||(e=Nf(ri(e)?[]:{},e));if(!c){for(l in t)XM.call(s,e,l,"get",t[l]);a=function(p){return KM(p,s)||(o?e.p:e)}}}return ru(n,a)},yL=function(e,t,n){var i=e.labels,a=Ea,o,s,l;for(o in i)s=i[o]-t,s<0==!!n&&s&&a>(s=Math.abs(s))&&(l=o,a=s);return l},Ki=function(e,t,n){var i=e.vars,a=i[t],o=In,s=e._ctx,l,u,c;if(a)return l=i[t+"Params"],u=i.callbackScope||e,n&&Il.length&&A0(),s&&(In=s),c=l?a.apply(u,l):a.call(u),In=o,c},wp=function(e){return Wl(e),e.scrollTrigger&&e.scrollTrigger.kill(!!kr),e.progress()<1&&Ki(e,"onInterrupt"),e},uf,T5=[],M5=function(e){if(e)if(e=!e.name&&e.default||e,zM()||e.headless){var t=e.name,n=Xn(e),i=t&&!n&&e.init?function(){this._props=[]}:e,a={init:mv,render:KM,add:XM,kill:u9,modifier:l9,rawVars:0},o={targetTest:0,get:0,getSetter:jM,aliases:{},register:0};if(Ff(),e!==i){if(Xi[t])return;aa(i,aa(w0(e,a),o)),Nf(i.prototype,Nf(a,w0(e,o))),Xi[i.prop=t]=i,e.targetTest&&(Hy.push(i),GM[t]=1),t=(t==="css"?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}l5(t,i),e.register&&e.register(ki,i,Pi)}else T5.push(e)},xn=255,bp={aqua:[0,xn,xn],lime:[0,xn,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,xn],navy:[0,0,128],white:[xn,xn,xn],olive:[128,128,0],yellow:[xn,xn,0],orange:[xn,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[xn,0,0],pink:[xn,192,203],cyan:[0,xn,xn],transparent:[xn,xn,xn,0]},gx=function(e,t,n){return e+=e<0?1:e>1?-1:0,(e*6<1?t+(n-t)*e*6:e<.5?n:e*3<2?t+(n-t)*(2/3-e)*6:t)*xn+.5|0},C5=function(e,t,n){var i=e?Ms(e)?[e>>16,e>>8&xn,e&xn]:0:bp.black,a,o,s,l,u,c,h,f,d,p;if(!i){if(e.substr(-1)===","&&(e=e.substr(0,e.length-1)),bp[e])i=bp[e];else if(e.charAt(0)==="#"){if(e.length<6&&(a=e.charAt(1),o=e.charAt(2),s=e.charAt(3),e="#"+a+a+o+o+s+s+(e.length===5?e.charAt(4)+e.charAt(4):"")),e.length===9)return i=parseInt(e.substr(1,6),16),[i>>16,i>>8&xn,i&xn,parseInt(e.substr(7),16)/255];e=parseInt(e.substr(1),16),i=[e>>16,e>>8&xn,e&xn]}else if(e.substr(0,3)==="hsl"){if(i=p=e.match(dL),!t)l=+i[0]%360/360,u=+i[1]/100,c=+i[2]/100,o=c<=.5?c*(u+1):c+u-c*u,a=c*2-o,i.length>3&&(i[3]*=1),i[0]=gx(l+1/3,a,o),i[1]=gx(l,a,o),i[2]=gx(l-1/3,a,o);else if(~e.indexOf("="))return i=e.match(i5),n&&i.length<4&&(i[3]=1),i}else i=e.match(dL)||bp.transparent;i=i.map(Number)}return t&&!p&&(a=i[0]/xn,o=i[1]/xn,s=i[2]/xn,h=Math.max(a,o,s),f=Math.min(a,o,s),c=(h+f)/2,h===f?l=u=0:(d=h-f,u=c>.5?d/(2-h-f):d/(h+f),l=h===a?(o-s)/d+(o<s?6:0):h===o?(s-a)/d+2:(a-o)/d+4,l*=60),i[0]=~~(l+.5),i[1]=~~(u*100+.5),i[2]=~~(c*100+.5)),n&&i.length<4&&(i[3]=1),i},E5=function(e){var t=[],n=[],i=-1;return e.split(Nl).forEach(function(a){var o=a.match(lf)||[];t.push.apply(t,o),n.push(i+=o.length+1)}),t.c=n,t},_L=function(e,t,n){var i="",a=(e+i).match(Nl),o=t?"hsla(":"rgba(",s=0,l,u,c,h;if(!a)return e;if(a=a.map(function(f){return(f=C5(f,t,1))&&o+(t?f[0]+","+f[1]+"%,"+f[2]+"%,"+f[3]:f.join(","))+")"}),n&&(c=E5(e),l=n.c,l.join(i)!==c.c.join(i)))for(u=e.replace(Nl,"1").split(lf),h=u.length-1;s<h;s++)i+=u[s]+(~l.indexOf(s)?a.shift()||o+"0,0,0,0)":(c.length?c:a.length?a:n).shift());if(!u)for(u=e.split(Nl),h=u.length-1;s<h;s++)i+=u[s]+a[s];return i+u[h]},Nl=function(){var r="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b",e;for(e in bp)r+="|"+e+"\\b";return new RegExp(r+")","gi")}(),q7=/hsl[a]?\(/,L5=function(e){var t=e.join(" "),n;if(Nl.lastIndex=0,Nl.test(t))return n=q7.test(t),e[1]=_L(e[1],n),e[0]=_L(e[0],n,E5(e[1])),!0},_v,qi=function(){var r=Date.now,e=500,t=33,n=r(),i=n,a=1e3/240,o=a,s=[],l,u,c,h,f,d,p=function g(v){var m=r()-i,y=v===!0,_,x,S,A;if((m>e||m<0)&&(n+=m-t),i+=m,S=i-n,_=S-o,(_>0||y)&&(A=++h.frame,f=S-h.time*1e3,h.time=S=S/1e3,o+=_+(_>=a?4:a-_),x=1),y||(l=u(g)),x)for(d=0;d<s.length;d++)s[d](S,f,A,v)};return h={time:0,frame:0,tick:function(){p(!0)},deltaRatio:function(v){return f/(1e3/(v||60))},wake:function(){o5&&(!tb&&zM()&&(To=tb=window,UM=To.document||{},ia.gsap=ki,(To.gsapVersions||(To.gsapVersions=[])).push(ki.version),s5(S0||To.GreenSockGlobals||!To.gsap&&To||{}),T5.forEach(M5)),c=typeof requestAnimationFrame!="undefined"&&requestAnimationFrame,l&&h.sleep(),u=c||function(v){return setTimeout(v,o-h.time*1e3+1|0)},_v=1,p(2))},sleep:function(){(c?cancelAnimationFrame:clearTimeout)(l),_v=0,u=mv},lagSmoothing:function(v,m){e=v||1/0,t=Math.min(m||33,e)},fps:function(v){a=1e3/(v||240),o=h.time*1e3+a},add:function(v,m,y){var _=m?function(x,S,A,w){v(x,S,A,w),h.remove(_)}:v;return h.remove(v),s[y?"unshift":"push"](_),Ff(),_},remove:function(v,m){~(m=s.indexOf(v))&&s.splice(m,1)&&d>=m&&d--},_listeners:s},h}(),Ff=function(){return!_v&&qi.wake()},Zt={},j7=/^[\d.\-M][\d.\-,\s]/,K7=/["']/g,Z7=function(e){for(var t={},n=e.substr(1,e.length-3).split(":"),i=n[0],a=1,o=n.length,s,l,u;a<o;a++)l=n[a],s=a!==o-1?l.lastIndexOf(","):l.length,u=l.substr(0,s),t[i]=isNaN(u)?u.replace(K7,"").trim():+u,i=l.substr(s+1).trim();return t},Q7=function(e){var t=e.indexOf("(")+1,n=e.indexOf(")"),i=e.indexOf("(",t);return e.substring(t,~i&&i<n?e.indexOf(")",n+1):n)},J7=function(e){var t=(e+"").split("("),n=Zt[t[0]];return n&&t.length>1&&n.config?n.config.apply(null,~e.indexOf("{")?[Z7(t[1])]:Q7(e).split(",").map(f5)):Zt._CE&&j7.test(e)?Zt._CE("",e):n},P5=function(e){return function(t){return 1-e(1-t)}},R5=function r(e,t){for(var n=e._first,i;n;)n instanceof pi?r(n,t):n.vars.yoyoEase&&(!n._yoyo||!n._repeat)&&n._yoyo!==t&&(n.timeline?r(n.timeline,t):(i=n._ease,n._ease=n._yEase,n._yEase=i,n._yoyo=t)),n=n._next},vc=function(e,t){return e&&(Xn(e)?e:Zt[e]||J7(e))||t},Xc=function(e,t,n,i){n===void 0&&(n=function(l){return 1-t(1-l)}),i===void 0&&(i=function(l){return l<.5?t(l*2)/2:1-t((1-l)*2)/2});var a={easeIn:t,easeOut:n,easeInOut:i},o;return Li(e,function(s){Zt[s]=ia[s]=a,Zt[o=s.toLowerCase()]=n;for(var l in a)Zt[o+(l==="easeIn"?".in":l==="easeOut"?".out":".inOut")]=Zt[s+"."+l]=a[l]}),a},D5=function(e){return function(t){return t<.5?(1-e(1-t*2))/2:.5+e((t-.5)*2)/2}},mx=function r(e,t,n){var i=t>=1?t:1,a=(n||(e?.3:.45))/(t<1?t:1),o=a/eb*(Math.asin(1/i)||0),s=function(c){return c===1?1:i*Math.pow(2,-10*c)*b7((c-o)*a)+1},l=e==="out"?s:e==="in"?function(u){return 1-s(1-u)}:D5(s);return a=eb/a,l.config=function(u,c){return r(e,u,c)},l},yx=function r(e,t){t===void 0&&(t=1.70158);var n=function(o){return o?--o*o*((t+1)*o+t)+1:0},i=e==="out"?n:e==="in"?function(a){return 1-n(1-a)}:D5(n);return i.config=function(a){return r(e,a)},i};Li("Linear,Quad,Cubic,Quart,Quint,Strong",function(r,e){var t=e<5?e+1:e;Xc(r+",Power"+(t-1),e?function(n){return Math.pow(n,t)}:function(n){return n},function(n){return 1-Math.pow(1-n,t)},function(n){return n<.5?Math.pow(n*2,t)/2:1-Math.pow((1-n)*2,t)/2})});Zt.Linear.easeNone=Zt.none=Zt.Linear.easeIn;Xc("Elastic",mx("in"),mx("out"),mx());(function(r,e){var t=1/e,n=2*t,i=2.5*t,a=function(s){return s<t?r*s*s:s<n?r*Math.pow(s-1.5/e,2)+.75:s<i?r*(s-=2.25/e)*s+.9375:r*Math.pow(s-2.625/e,2)+.984375};Xc("Bounce",function(o){return 1-a(1-o)},a)})(7.5625,2.75);Xc("Expo",function(r){return Math.pow(2,10*(r-1))*r+r*r*r*r*r*r*(1-r)});Xc("Circ",function(r){return-(n5(1-r*r)-1)});Xc("Sine",function(r){return r===1?1:-w7(r*S7)+1});Xc("Back",yx("in"),yx("out"),yx());Zt.SteppedEase=Zt.steps=ia.SteppedEase={config:function(e,t){e===void 0&&(e=1);var n=1/e,i=e+(t?0:1),a=t?1:0,o=1-An;return function(s){return((i*dg(0,o,s)|0)+a)*n}}};If.ease=Zt["quad.out"];Li("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",function(r){return HM+=r+","+r+"Params,"});var I5=function(e,t){this.id=A7++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:c5,this.set=t?t.getSetter:jM},xv=function(){function r(t){this.vars=t,this._delay=+t.delay||0,(this._repeat=t.repeat===1/0?-2:t.repeat||0)&&(this._rDelay=t.repeatDelay||0,this._yoyo=!!t.yoyo||!!t.yoyoEase),this._ts=1,Of(this,+t.duration,1,1),this.data=t.data,In&&(this._ctx=In,In.data.push(this)),_v||qi.wake()}var e=r.prototype;return e.delay=function(n){return n||n===0?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+n-this._delay),this._delay=n,this):this._delay},e.duration=function(n){return arguments.length?this.totalDuration(this._repeat>0?n+(n+this._rDelay)*this._repeat:n):this.totalDuration()&&this._dur},e.totalDuration=function(n){return arguments.length?(this._dirty=0,Of(this,this._repeat<0?n:(n-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},e.totalTime=function(n,i){if(Ff(),!arguments.length)return this._tTime;var a=this._dp;if(a&&a.smoothChildTiming&&this._ts){for(K_(this,n),!a._dp||a.parent||v5(a,this);a&&a.parent;)a.parent._time!==a._start+(a._ts>=0?a._tTime/a._ts:(a.totalDuration()-a._tTime)/-a._ts)&&a.totalTime(a._tTime,!0),a=a.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&n<this._tDur||this._ts<0&&n>0||!this._tDur&&!n)&&Po(this._dp,this,this._start-this._delay)}return(this._tTime!==n||!this._dur&&!i||this._initted&&Math.abs(this._zTime)===An||!this._initted&&this._dur&&n||!n&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=n),h5(this,n,i)),this},e.time=function(n,i){return arguments.length?this.totalTime(Math.min(this.totalDuration(),n+gL(this))%(this._dur+this._rDelay)||(n?this._dur:0),i):this._time},e.totalProgress=function(n,i){return arguments.length?this.totalTime(this.totalDuration()*n,i):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.rawTime()>=0&&this._initted?1:0},e.progress=function(n,i){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&!(this.iteration()&1)?1-n:n)+gL(this),i):this.duration()?Math.min(1,this._time/this._dur):this.rawTime()>0?1:0},e.iteration=function(n,i){var a=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(n-1)*a,i):this._repeat?kf(this._tTime,a)+1:1},e.timeScale=function(n,i){if(!arguments.length)return this._rts===-An?0:this._rts;if(this._rts===n)return this;var a=this.parent&&this._ts?b0(this.parent._time,this):this._tTime;return this._rts=+n||0,this._ts=this._ps||n===-An?0:this._rts,this.totalTime(dg(-Math.abs(this._delay),this.totalDuration(),a),i!==!1),j_(this),N7(this)},e.paused=function(n){return arguments.length?(this._ps!==n&&(this._ps=n,n?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ff(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,this.progress()===1&&Math.abs(this._zTime)!==An&&(this._tTime-=An)))),this):this._ps},e.startTime=function(n){if(arguments.length){this._start=Fn(n);var i=this.parent||this._dp;return i&&(i._sort||!this.parent)&&Po(i,this,this._start-this._delay),this}return this._start},e.endTime=function(n){return this._start+(Ei(n)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},e.rawTime=function(n){var i=this.parent||this._dp;return i?n&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?b0(i.rawTime(n),this):this._tTime:this._tTime},e.revert=function(n){n===void 0&&(n=P7);var i=kr;return kr=n,$M(this)&&(this.timeline&&this.timeline.revert(n),this.totalTime(-.01,n.suppressEvents)),this.data!=="nested"&&n.kill!==!1&&this.kill(),kr=i,this},e.globalTime=function(n){for(var i=this,a=arguments.length?n:i.rawTime();i;)a=i._start+a/(Math.abs(i._ts)||1),i=i._dp;return!this.parent&&this._sat?this._sat.globalTime(n):a},e.repeat=function(n){return arguments.length?(this._repeat=n===1/0?-2:n,mL(this)):this._repeat===-2?1/0:this._repeat},e.repeatDelay=function(n){if(arguments.length){var i=this._time;return this._rDelay=n,mL(this),i?this.time(i):this}return this._rDelay},e.yoyo=function(n){return arguments.length?(this._yoyo=n,this):this._yoyo},e.seek=function(n,i){return this.totalTime(pa(this,n),Ei(i))},e.restart=function(n,i){return this.play().totalTime(n?-this._delay:0,Ei(i)),this._dur||(this._zTime=-An),this},e.play=function(n,i){return n!=null&&this.seek(n,i),this.reversed(!1).paused(!1)},e.reverse=function(n,i){return n!=null&&this.seek(n||this.totalDuration(),i),this.reversed(!0).paused(!1)},e.pause=function(n,i){return n!=null&&this.seek(n,i),this.paused(!0)},e.resume=function(){return this.paused(!1)},e.reversed=function(n){return arguments.length?(!!n!==this.reversed()&&this.timeScale(-this._rts||(n?-An:0)),this):this._rts<0},e.invalidate=function(){return this._initted=this._act=0,this._zTime=-An,this},e.isActive=function(){var n=this.parent||this._dp,i=this._start,a;return!!(!n||this._ts&&this._initted&&n.isActive()&&(a=n.rawTime(!0))>=i&&a<this.endTime(!0)-An)},e.eventCallback=function(n,i,a){var o=this.vars;return arguments.length>1?(i?(o[n]=i,a&&(o[n+"Params"]=a),n==="onUpdate"&&(this._onUpdate=i)):delete o[n],this):o[n]},e.then=function(n){var i=this,a=i._prom;return new Promise(function(o){var s=Xn(n)?n:d5,l=function(){var c=i.then;i.then=null,a&&a(),Xn(s)&&(s=s(i))&&(s.then||s===i)&&(i.then=c),o(s),i.then=c};i._initted&&i.totalProgress()===1&&i._ts>=0||!i._tTime&&i._ts<0?l():i._prom=l})},e.kill=function(){wp(this)},r}();aa(xv.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-An,_prom:0,_ps:!1,_rts:1});var pi=function(r){t5(e,r);function e(n,i){var a;return n===void 0&&(n={}),a=r.call(this,n)||this,a.labels={},a.smoothChildTiming=!!n.smoothChildTiming,a.autoRemoveChildren=!!n.autoRemoveChildren,a._sort=Ei(n.sortChildren),Bn&&Po(n.parent||Bn,fs(a),i),n.reversed&&a.reverse(),n.paused&&a.paused(!0),n.scrollTrigger&&g5(fs(a),n.scrollTrigger),a}var t=e.prototype;return t.to=function(i,a,o){return Wp(0,arguments,this),this},t.from=function(i,a,o){return Wp(1,arguments,this),this},t.fromTo=function(i,a,o,s){return Wp(2,arguments,this),this},t.set=function(i,a,o){return a.duration=0,a.parent=this,Hp(a).repeatDelay||(a.repeat=0),a.immediateRender=!!a.immediateRender,new sr(i,a,pa(this,o),1),this},t.call=function(i,a,o){return Po(this,sr.delayedCall(0,i,a),o)},t.staggerTo=function(i,a,o,s,l,u,c){return o.duration=a,o.stagger=o.stagger||s,o.onComplete=u,o.onCompleteParams=c,o.parent=this,new sr(i,o,pa(this,l)),this},t.staggerFrom=function(i,a,o,s,l,u,c){return o.runBackwards=1,Hp(o).immediateRender=Ei(o.immediateRender),this.staggerTo(i,a,o,s,l,u,c)},t.staggerFromTo=function(i,a,o,s,l,u,c,h){return s.startAt=o,Hp(s).immediateRender=Ei(s.immediateRender),this.staggerTo(i,a,s,l,u,c,h)},t.render=function(i,a,o){var s=this._time,l=this._dirty?this.totalDuration():this._tDur,u=this._dur,c=i<=0?0:Fn(i),h=this._zTime<0!=i<0&&(this._initted||!u),f,d,p,g,v,m,y,_,x,S,A,w;if(this!==Bn&&c>l&&i>=0&&(c=l),c!==this._tTime||o||h){if(s!==this._time&&u&&(c+=this._time-s,i+=this._time-s),f=c,x=this._start,_=this._ts,m=!_,h&&(u||(s=this._zTime),(i||!a)&&(this._zTime=i)),this._repeat){if(A=this._yoyo,v=u+this._rDelay,this._repeat<-1&&i<0)return this.totalTime(v*100+i,a,o);if(f=Fn(c%v),c===l?(g=this._repeat,f=u):(S=Fn(c/v),g=~~S,g&&g===S&&(f=u,g--),f>u&&(f=u)),S=kf(this._tTime,v),!s&&this._tTime&&S!==g&&this._tTime-S*v-this._dur<=0&&(S=g),A&&g&1&&(f=u-f,w=1),g!==S&&!this._lock){var M=A&&S&1,C=M===(A&&g&1);if(g<S&&(M=!M),s=M?0:c%u?u:c,this._lock=1,this.render(s||(w?0:Fn(g*v)),a,!u)._lock=0,this._tTime=c,!a&&this.parent&&Ki(this,"onRepeat"),this.vars.repeatRefresh&&!w&&(this.invalidate()._lock=1,S=g),s&&s!==this._time||m!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(u=this._dur,l=this._tDur,C&&(this._lock=2,s=M?u:-1e-4,this.render(s,!0),this.vars.repeatRefresh&&!w&&this.invalidate()),this._lock=0,!this._ts&&!m)return this;R5(this,w)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(y=B7(this,Fn(s),Fn(f)),y&&(c-=f-(f=y._start))),this._tTime=c,this._time=f,this._act=!_,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=i,s=0),!s&&c&&u&&!a&&!S&&(Ki(this,"onStart"),this._tTime!==c))return this;if(f>=s&&i>=0)for(d=this._first;d;){if(p=d._next,(d._act||f>=d._start)&&d._ts&&y!==d){if(d.parent!==this)return this.render(i,a,o);if(d.render(d._ts>0?(f-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(f-d._start)*d._ts,a,o),f!==this._time||!this._ts&&!m){y=0,p&&(c+=this._zTime=-An);break}}d=p}else{d=this._last;for(var b=i<0?i:f;d;){if(p=d._prev,(d._act||b<=d._end)&&d._ts&&y!==d){if(d.parent!==this)return this.render(i,a,o);if(d.render(d._ts>0?(b-d._start)*d._ts:(d._dirty?d.totalDuration():d._tDur)+(b-d._start)*d._ts,a,o||kr&&$M(d)),f!==this._time||!this._ts&&!m){y=0,p&&(c+=this._zTime=b?-An:An);break}}d=p}}if(y&&!a&&(this.pause(),y.render(f>=s?0:-An)._zTime=f>=s?1:-1,this._ts))return this._start=x,j_(this),this.render(i,a,o);this._onUpdate&&!a&&Ki(this,"onUpdate",!0),(c===l&&this._tTime>=this.totalDuration()||!c&&s)&&(x===this._start||Math.abs(_)!==Math.abs(this._ts))&&(this._lock||((i||!u)&&(c===l&&this._ts>0||!c&&this._ts<0)&&Wl(this,1),!a&&!(i<0&&!s)&&(c||s||!l)&&(Ki(this,c===l&&i>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(c<l&&this.timeScale()>0)&&this._prom())))}return this},t.add=function(i,a){var o=this;if(Ms(a)||(a=pa(this,a,i)),!(i instanceof xv)){if(ri(i))return i.forEach(function(s){return o.add(s,a)}),this;if(Er(i))return this.addLabel(i,a);if(Xn(i))i=sr.delayedCall(0,i);else return this}return this!==i?Po(this,i,a):this},t.getChildren=function(i,a,o,s){i===void 0&&(i=!0),a===void 0&&(a=!0),o===void 0&&(o=!0),s===void 0&&(s=-Ea);for(var l=[],u=this._first;u;)u._start>=s&&(u instanceof sr?a&&l.push(u):(o&&l.push(u),i&&l.push.apply(l,u.getChildren(!0,a,o)))),u=u._next;return l},t.getById=function(i){for(var a=this.getChildren(1,1,1),o=a.length;o--;)if(a[o].vars.id===i)return a[o]},t.remove=function(i){return Er(i)?this.removeLabel(i):Xn(i)?this.killTweensOf(i):(i.parent===this&&q_(this,i),i===this._recent&&(this._recent=this._last),pc(this))},t.totalTime=function(i,a){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=Fn(qi.time-(this._ts>0?i/this._ts:(this.totalDuration()-i)/-this._ts))),r.prototype.totalTime.call(this,i,a),this._forcing=0,this):this._tTime},t.addLabel=function(i,a){return this.labels[i]=pa(this,a),this},t.removeLabel=function(i){return delete this.labels[i],this},t.addPause=function(i,a,o){var s=sr.delayedCall(0,a||mv,o);return s.data="isPause",this._hasPause=1,Po(this,s,pa(this,i))},t.removePause=function(i){var a=this._first;for(i=pa(this,i);a;)a._start===i&&a.data==="isPause"&&Wl(a),a=a._next},t.killTweensOf=function(i,a,o){for(var s=this.getTweensOf(i,o),l=s.length;l--;)ml!==s[l]&&s[l].kill(i,a);return this},t.getTweensOf=function(i,a){for(var o=[],s=La(i),l=this._first,u=Ms(a),c;l;)l instanceof sr?R7(l._targets,s)&&(u?(!ml||l._initted&&l._ts)&&l.globalTime(0)<=a&&l.globalTime(l.totalDuration())>a:!a||l.isActive())&&o.push(l):(c=l.getTweensOf(s,a)).length&&o.push.apply(o,c),l=l._next;return o},t.tweenTo=function(i,a){a=a||{};var o=this,s=pa(o,i),l=a,u=l.startAt,c=l.onStart,h=l.onStartParams,f=l.immediateRender,d,p=sr.to(o,aa({ease:a.ease||"none",lazy:!1,immediateRender:!1,time:s,overwrite:"auto",duration:a.duration||Math.abs((s-(u&&"time"in u?u.time:o._time))/o.timeScale())||An,onStart:function(){if(o.pause(),!d){var v=a.duration||Math.abs((s-(u&&"time"in u?u.time:o._time))/o.timeScale());p._dur!==v&&Of(p,v,0,1).render(p._time,!0,!0),d=1}c&&c.apply(p,h||[])}},a));return f?p.render(0):p},t.tweenFromTo=function(i,a,o){return this.tweenTo(a,aa({startAt:{time:pa(this,i)}},o))},t.recent=function(){return this._recent},t.nextLabel=function(i){return i===void 0&&(i=this._time),yL(this,pa(this,i))},t.previousLabel=function(i){return i===void 0&&(i=this._time),yL(this,pa(this,i),1)},t.currentLabel=function(i){return arguments.length?this.seek(i,!0):this.previousLabel(this._time+An)},t.shiftChildren=function(i,a,o){o===void 0&&(o=0);var s=this._first,l=this.labels,u;for(i=Fn(i);s;)s._start>=o&&(s._start+=i,s._end+=i),s=s._next;if(a)for(u in l)l[u]>=o&&(l[u]+=i);return pc(this)},t.invalidate=function(i){var a=this._first;for(this._lock=0;a;)a.invalidate(i),a=a._next;return r.prototype.invalidate.call(this,i)},t.clear=function(i){i===void 0&&(i=!0);for(var a=this._first,o;a;)o=a._next,this.remove(a),a=o;return this._dp&&(this._time=this._tTime=this._pTime=0),i&&(this.labels={}),pc(this)},t.totalDuration=function(i){var a=0,o=this,s=o._last,l=Ea,u,c,h;if(arguments.length)return o.timeScale((o._repeat<0?o.duration():o.totalDuration())/(o.reversed()?-i:i));if(o._dirty){for(h=o.parent;s;)u=s._prev,s._dirty&&s.totalDuration(),c=s._start,c>l&&o._sort&&s._ts&&!o._lock?(o._lock=1,Po(o,s,c-s._delay,1)._lock=0):l=c,c<0&&s._ts&&(a-=c,(!h&&!o._dp||h&&h.smoothChildTiming)&&(o._start+=Fn(c/o._ts),o._time-=c,o._tTime-=c),o.shiftChildren(-c,!1,-1/0),l=0),s._end>a&&s._ts&&(a=s._end),s=u;Of(o,o===Bn&&o._time>a?o._time:a,1,1),o._dirty=0}return o._tDur},e.updateRoot=function(i){if(Bn._ts&&(h5(Bn,b0(i,Bn)),u5=qi.frame),qi.frame>=pL){pL+=ea.autoSleep||120;var a=Bn._first;if((!a||!a._ts)&&ea.autoSleep&&qi._listeners.length<2){for(;a&&!a._ts;)a=a._next;a||qi.sleep()}}},e}(xv);aa(pi.prototype,{_lock:0,_hasPause:0,_forcing:0});var e9=function(e,t,n,i,a,o,s){var l=new Pi(this._pt,e,t,0,1,z5,null,a),u=0,c=0,h,f,d,p,g,v,m,y;for(l.b=n,l.e=i,n+="",i+="",(m=~i.indexOf("random("))&&(i=yv(i)),o&&(y=[n,i],o(y,e,t),n=y[0],i=y[1]),f=n.match(px)||[];h=px.exec(i);)p=h[0],g=i.substring(u,h.index),d?d=(d+1)%5:g.substr(-5)==="rgba("&&(d=1),p!==f[c++]&&(v=parseFloat(f[c-1])||0,l._pt={_next:l._pt,p:g||c===1?g:",",s:v,c:p.charAt(1)==="="?_f(v,p)-v:parseFloat(p)-v,m:d&&d<4?Math.round:0},u=px.lastIndex);return l.c=u<i.length?i.substring(u,i.length):"",l.fp=s,(a5.test(i)||m)&&(l.e=0),this._pt=l,l},XM=function(e,t,n,i,a,o,s,l,u,c){Xn(i)&&(i=i(a||0,e,o));var h=e[t],f=n!=="get"?n:Xn(h)?u?e[t.indexOf("set")||!Xn(e["get"+t.substr(3)])?t:"get"+t.substr(3)](u):e[t]():h,d=Xn(h)?u?a9:F5:qM,p;if(Er(i)&&(~i.indexOf("random(")&&(i=yv(i)),i.charAt(1)==="="&&(p=_f(f,i)+(ei(f)||0),(p||p===0)&&(i=p))),!c||f!==i||lb)return!isNaN(f*i)&&i!==""?(p=new Pi(this._pt,e,t,+f||0,i-(f||0),typeof h=="boolean"?s9:B5,0,d),u&&(p.fp=u),s&&p.modifier(s,this,e),this._pt=p):(!h&&!(t in e)&&VM(t,i),e9.call(this,e,t,f,i,d,l||ea.stringFilter,u))},t9=function(e,t,n,i,a){if(Xn(e)&&(e=$p(e,a,t,n,i)),!Wo(e)||e.style&&e.nodeType||ri(e)||r5(e))return Er(e)?$p(e,a,t,n,i):e;var o={},s;for(s in e)o[s]=$p(e[s],a,t,n,i);return o},N5=function(e,t,n,i,a,o){var s,l,u,c;if(Xi[e]&&(s=new Xi[e]).init(a,s.rawVars?t[e]:t9(t[e],i,a,o,n),n,i,o)!==!1&&(n._pt=l=new Pi(n._pt,a,e,0,1,s.render,s,0,s.priority),n!==uf))for(u=n._ptLookup[n._targets.indexOf(a)],c=s._props.length;c--;)u[s._props[c]]=l;return s},ml,lb,YM=function r(e,t,n){var i=e.vars,a=i.ease,o=i.startAt,s=i.immediateRender,l=i.lazy,u=i.onUpdate,c=i.runBackwards,h=i.yoyoEase,f=i.keyframes,d=i.autoRevert,p=e._dur,g=e._startAt,v=e._targets,m=e.parent,y=m&&m.data==="nested"?m.vars.targets:v,_=e._overwrite==="auto"&&!FM,x=e.timeline,S,A,w,M,C,b,T,P,D,L,E,I,N;if(x&&(!f||!a)&&(a="none"),e._ease=vc(a,If.ease),e._yEase=h?P5(vc(h===!0?a:h,If.ease)):0,h&&e._yoyo&&!e._repeat&&(h=e._yEase,e._yEase=e._ease,e._ease=h),e._from=!x&&!!i.runBackwards,!x||f&&!i.stagger){if(P=v[0]?dc(v[0]).harness:0,I=P&&i[P.prop],S=w0(i,GM),g&&(g._zTime<0&&g.progress(1),t<0&&c&&s&&!d?g.render(-1,!0):g.revert(c&&p?Gy:L7),g._lazy=0),o){if(Wl(e._startAt=sr.set(v,aa({data:"isStart",overwrite:!1,parent:m,immediateRender:!0,lazy:!g&&Ei(l),startAt:null,delay:0,onUpdate:u&&function(){return Ki(e,"onUpdate")},stagger:0},o))),e._startAt._dp=0,e._startAt._sat=e,t<0&&(kr||!s&&!d)&&e._startAt.revert(Gy),s&&p&&t<=0&&n<=0){t&&(e._zTime=t);return}}else if(c&&p&&!g){if(t&&(s=!1),w=aa({overwrite:!1,data:"isFromStart",lazy:s&&!g&&Ei(l),immediateRender:s,stagger:0,parent:m},S),I&&(w[P.prop]=I),Wl(e._startAt=sr.set(v,w)),e._startAt._dp=0,e._startAt._sat=e,t<0&&(kr?e._startAt.revert(Gy):e._startAt.render(-1,!0)),e._zTime=t,!s)r(e._startAt,An,An);else if(!t)return}for(e._pt=e._ptCache=0,l=p&&Ei(l)||l&&!p,A=0;A<v.length;A++){if(C=v[A],T=C._gsap||WM(v)[A]._gsap,e._ptLookup[A]=L={},nb[T.id]&&Il.length&&A0(),E=y===v?A:y.indexOf(C),P&&(D=new P).init(C,I||S,e,E,y)!==!1&&(e._pt=M=new Pi(e._pt,C,D.name,0,1,D.render,D,0,D.priority),D._props.forEach(function(R){L[R]=M}),D.priority&&(b=1)),!P||I)for(w in S)Xi[w]&&(D=N5(w,S,e,E,C,y))?D.priority&&(b=1):L[w]=M=XM.call(e,C,w,"get",S[w],E,y,0,i.stringFilter);e._op&&e._op[A]&&e.kill(C,e._op[A]),_&&e._pt&&(ml=e,Bn.killTweensOf(C,L,e.globalTime(t)),N=!e.parent,ml=0),e._pt&&l&&(nb[T.id]=1)}b&&U5(e),e._onInit&&e._onInit(e)}e._onUpdate=u,e._initted=(!e._op||e._pt)&&!N,f&&t<=0&&x.render(Ea,!0,!0)},n9=function(e,t,n,i,a,o,s,l){var u=(e._pt&&e._ptCache||(e._ptCache={}))[t],c,h,f,d;if(!u)for(u=e._ptCache[t]=[],f=e._ptLookup,d=e._targets.length;d--;){if(c=f[d][t],c&&c.d&&c.d._pt)for(c=c.d._pt;c&&c.p!==t&&c.fp!==t;)c=c._next;if(!c)return lb=1,e.vars[t]="+=0",YM(e,s),lb=0,l?gv(t+" not eligible for reset"):1;u.push(c)}for(d=u.length;d--;)h=u[d],c=h._pt||h,c.s=(i||i===0)&&!a?i:c.s+(i||0)+o*c.c,c.c=n-c.s,h.e&&(h.e=Jn(n)+ei(h.e)),h.b&&(h.b=c.s+ei(h.b))},r9=function(e,t){var n=e[0]?dc(e[0]).harness:0,i=n&&n.aliases,a,o,s,l;if(!i)return t;a=Nf({},t);for(o in i)if(o in a)for(l=i[o].split(","),s=l.length;s--;)a[l[s]]=a[o];return a},i9=function(e,t,n,i){var a=t.ease||i||"power1.inOut",o,s;if(ri(t))s=n[e]||(n[e]=[]),t.forEach(function(l,u){return s.push({t:u/(t.length-1)*100,v:l,e:a})});else for(o in t)s=n[o]||(n[o]=[]),o==="ease"||s.push({t:parseFloat(e),v:t[o],e:a})},$p=function(e,t,n,i,a){return Xn(e)?e.call(t,n,i,a):Er(e)&&~e.indexOf("random(")?yv(e):e},k5=HM+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",O5={};Li(k5+",id,stagger,delay,duration,paused,scrollTrigger",function(r){return O5[r]=1});var sr=function(r){t5(e,r);function e(n,i,a,o){var s;typeof i=="number"&&(a.duration=i,i=a,a=null),s=r.call(this,o?i:Hp(i))||this;var l=s.vars,u=l.duration,c=l.delay,h=l.immediateRender,f=l.stagger,d=l.overwrite,p=l.keyframes,g=l.defaults,v=l.scrollTrigger,m=l.yoyoEase,y=i.parent||Bn,_=(ri(n)||r5(n)?Ms(n[0]):"length"in i)?[n]:La(n),x,S,A,w,M,C,b,T;if(s._targets=_.length?WM(_):gv("GSAP target "+n+" not found. https://gsap.com",!ea.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=d,p||f||Wg(u)||Wg(c)){if(i=s.vars,x=s.timeline=new pi({data:"nested",defaults:g||{},targets:y&&y.data==="nested"?y.vars.targets:_}),x.kill(),x.parent=x._dp=fs(s),x._start=0,f||Wg(u)||Wg(c)){if(w=_.length,b=f&&x5(f),Wo(f))for(M in f)~k5.indexOf(M)&&(T||(T={}),T[M]=f[M]);for(S=0;S<w;S++)A=w0(i,O5),A.stagger=0,m&&(A.yoyoEase=m),T&&Nf(A,T),C=_[S],A.duration=+$p(u,fs(s),S,C,_),A.delay=(+$p(c,fs(s),S,C,_)||0)-s._delay,!f&&w===1&&A.delay&&(s._delay=c=A.delay,s._start+=c,A.delay=0),x.to(C,A,b?b(S,C,_):0),x._ease=Zt.none;x.duration()?u=c=0:s.timeline=0}else if(p){Hp(aa(x.vars.defaults,{ease:"none"})),x._ease=vc(p.ease||i.ease||"none");var P=0,D,L,E;if(ri(p))p.forEach(function(I){return x.to(_,I,">")}),x.duration();else{A={};for(M in p)M==="ease"||M==="easeEach"||i9(M,p[M],A,p.easeEach);for(M in A)for(D=A[M].sort(function(I,N){return I.t-N.t}),P=0,S=0;S<D.length;S++)L=D[S],E={ease:L.e,duration:(L.t-(S?D[S-1].t:0))/100*u},E[M]=L.v,x.to(_,E,P),P+=E.duration;x.duration()<u&&x.to({},{duration:u-x.duration()})}}u||s.duration(u=x.duration())}else s.timeline=0;return d===!0&&!FM&&(ml=fs(s),Bn.killTweensOf(_),ml=0),Po(y,fs(s),a),i.reversed&&s.reverse(),i.paused&&s.paused(!0),(h||!u&&!p&&s._start===Fn(y._time)&&Ei(h)&&k7(fs(s))&&y.data!=="nested")&&(s._tTime=-An,s.render(Math.max(0,-c)||0)),v&&g5(fs(s),v),s}var t=e.prototype;return t.render=function(i,a,o){var s=this._time,l=this._tDur,u=this._dur,c=i<0,h=i>l-An&&!c?l:i<An?0:i,f,d,p,g,v,m,y,_,x;if(!u)F7(this,i,a,o);else if(h!==this._tTime||!i||o||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==c||this._lazy){if(f=h,_=this.timeline,this._repeat){if(g=u+this._rDelay,this._repeat<-1&&c)return this.totalTime(g*100+i,a,o);if(f=Fn(h%g),h===l?(p=this._repeat,f=u):(v=Fn(h/g),p=~~v,p&&p===v?(f=u,p--):f>u&&(f=u)),m=this._yoyo&&p&1,m&&(x=this._yEase,f=u-f),v=kf(this._tTime,g),f===s&&!o&&this._initted&&p===v)return this._tTime=h,this;p!==v&&(_&&this._yEase&&R5(_,m),this.vars.repeatRefresh&&!m&&!this._lock&&f!==g&&this._initted&&(this._lock=o=1,this.render(Fn(g*p),!0).invalidate()._lock=0))}if(!this._initted){if(m5(this,c?i:f,o,a,h))return this._tTime=0,this;if(s!==this._time&&!(o&&this.vars.repeatRefresh&&p!==v))return this;if(u!==this._dur)return this.render(i,a,o)}if(this._tTime=h,this._time=f,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=y=(x||this._ease)(f/u),this._from&&(this.ratio=y=1-y),!s&&h&&!a&&!v&&(Ki(this,"onStart"),this._tTime!==h))return this;for(d=this._pt;d;)d.r(y,d.d),d=d._next;_&&_.render(i<0?i:_._dur*_._ease(f/this._dur),a,o)||this._startAt&&(this._zTime=i),this._onUpdate&&!a&&(c&&rb(this,i,a,o),Ki(this,"onUpdate")),this._repeat&&p!==v&&this.vars.onRepeat&&!a&&this.parent&&Ki(this,"onRepeat"),(h===this._tDur||!h)&&this._tTime===h&&(c&&!this._onUpdate&&rb(this,i,!0,!0),(i||!u)&&(h===this._tDur&&this._ts>0||!h&&this._ts<0)&&Wl(this,1),!a&&!(c&&!s)&&(h||s||m)&&(Ki(this,h===l?"onComplete":"onReverseComplete",!0),this._prom&&!(h<l&&this.timeScale()>0)&&this._prom()))}return this},t.targets=function(){return this._targets},t.invalidate=function(i){return(!i||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(i),r.prototype.invalidate.call(this,i)},t.resetTo=function(i,a,o,s,l){_v||qi.wake(),this._ts||this.play();var u=Math.min(this._dur,(this._dp._time-this._start)*this._ts),c;return this._initted||YM(this,u),c=this._ease(u/this._dur),n9(this,i,a,o,s,c,u,l)?this.resetTo(i,a,o,s,1):(K_(this,0),this.parent||p5(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},t.kill=function(i,a){if(a===void 0&&(a="all"),!i&&(!a||a==="all"))return this._lazy=this._pt=0,this.parent?wp(this):this.scrollTrigger&&this.scrollTrigger.kill(!!kr),this;if(this.timeline){var o=this.timeline.totalDuration();return this.timeline.killTweensOf(i,a,ml&&ml.vars.overwrite!==!0)._first||wp(this),this.parent&&o!==this.timeline.totalDuration()&&Of(this,this._dur*this.timeline._tDur/o,0,1),this}var s=this._targets,l=i?La(i):s,u=this._ptLookup,c=this._pt,h,f,d,p,g,v,m;if((!a||a==="all")&&I7(s,l))return a==="all"&&(this._pt=0),wp(this);for(h=this._op=this._op||[],a!=="all"&&(Er(a)&&(g={},Li(a,function(y){return g[y]=1}),a=g),a=r9(s,a)),m=s.length;m--;)if(~l.indexOf(s[m])){f=u[m],a==="all"?(h[m]=a,p=f,d={}):(d=h[m]=h[m]||{},p=a);for(g in p)v=f&&f[g],v&&((!("kill"in v.d)||v.d.kill(g)===!0)&&q_(this,v,"_pt"),delete f[g]),d!=="all"&&(d[g]=1)}return this._initted&&!this._pt&&c&&wp(this),this},e.to=function(i,a){return new e(i,a,arguments[2])},e.from=function(i,a){return Wp(1,arguments)},e.delayedCall=function(i,a,o,s){return new e(a,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:i,onComplete:a,onReverseComplete:a,onCompleteParams:o,onReverseCompleteParams:o,callbackScope:s})},e.fromTo=function(i,a,o){return Wp(2,arguments)},e.set=function(i,a){return a.duration=0,a.repeatDelay||(a.repeat=0),new e(i,a)},e.killTweensOf=function(i,a,o){return Bn.killTweensOf(i,a,o)},e}(xv);aa(sr.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0});Li("staggerTo,staggerFrom,staggerFromTo",function(r){sr[r]=function(){var e=new pi,t=ab.call(arguments,0);return t.splice(r==="staggerFromTo"?5:4,0,0),e[r].apply(e,t)}});var qM=function(e,t,n){return e[t]=n},F5=function(e,t,n){return e[t](n)},a9=function(e,t,n,i){return e[t](i.fp,n)},o9=function(e,t,n){return e.setAttribute(t,n)},jM=function(e,t){return Xn(e[t])?F5:BM(e[t])&&e.setAttribute?o9:qM},B5=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e6)/1e6,t)},s9=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},z5=function(e,t){var n=t._pt,i="";if(!e&&t.b)i=t.b;else if(e===1&&t.e)i=t.e;else{for(;n;)i=n.p+(n.m?n.m(n.s+n.c*e):Math.round((n.s+n.c*e)*1e4)/1e4)+i,n=n._next;i+=t.c}t.set(t.t,t.p,i,t)},KM=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},l9=function(e,t,n,i){for(var a=this._pt,o;a;)o=a._next,a.p===i&&a.modifier(e,t,n),a=o},u9=function(e){for(var t=this._pt,n,i;t;)i=t._next,t.p===e&&!t.op||t.op===e?q_(this,t,"_pt"):t.dep||(n=1),t=i;return!n},c9=function(e,t,n,i){i.mSet(e,t,i.m.call(i.tween,n,i.mt),i)},U5=function(e){for(var t=e._pt,n,i,a,o;t;){for(n=t._next,i=a;i&&i.pr>t.pr;)i=i._next;(t._prev=i?i._prev:o)?t._prev._next=t:a=t,(t._next=i)?i._prev=t:o=t,t=n}e._pt=a},Pi=function(){function r(t,n,i,a,o,s,l,u,c){this.t=n,this.s=a,this.c=o,this.p=i,this.r=s||B5,this.d=l||this,this.set=u||qM,this.pr=c||0,this._next=t,t&&(t._prev=this)}var e=r.prototype;return e.modifier=function(n,i,a){this.mSet=this.mSet||this.set,this.set=c9,this.m=n,this.mt=a,this.tween=i},r}();Li(HM+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",function(r){return GM[r]=1});ia.TweenMax=ia.TweenLite=sr;ia.TimelineLite=ia.TimelineMax=pi;Bn=new pi({sortChildren:!1,defaults:If,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0});ea.stringFilter=L5;var gc=[],Wy={},h9=[],xL=0,f9=0,_x=function(e){return(Wy[e]||h9).map(function(t){return t()})},ub=function(){var e=Date.now(),t=[];e-xL>2&&(_x("matchMediaInit"),gc.forEach(function(n){var i=n.queries,a=n.conditions,o,s,l,u;for(s in i)o=To.matchMedia(i[s]).matches,o&&(l=1),o!==a[s]&&(a[s]=o,u=1);u&&(n.revert(),l&&t.push(n))}),_x("matchMediaRevert"),t.forEach(function(n){return n.onMatch(n,function(i){return n.add(null,i)})}),xL=e,_x("matchMedia"))},V5=function(){function r(t,n){this.selector=n&&ob(n),this.data=[],this._r=[],this.isReverted=!1,this.id=f9++,t&&this.add(t)}var e=r.prototype;return e.add=function(n,i,a){Xn(n)&&(a=i,i=n,n=Xn);var o=this,s=function(){var u=In,c=o.selector,h;return u&&u!==o&&u.data.push(o),a&&(o.selector=ob(a)),In=o,h=i.apply(o,arguments),Xn(h)&&o._r.push(h),In=u,o.selector=c,o.isReverted=!1,h};return o.last=s,n===Xn?s(o,function(l){return o.add(null,l)}):n?o[n]=s:s},e.ignore=function(n){var i=In;In=null,n(this),In=i},e.getTweens=function(){var n=[];return this.data.forEach(function(i){return i instanceof r?n.push.apply(n,i.getTweens()):i instanceof sr&&!(i.parent&&i.parent.data==="nested")&&n.push(i)}),n},e.clear=function(){this._r.length=this.data.length=0},e.kill=function(n,i){var a=this;if(n?function(){for(var s=a.getTweens(),l=a.data.length,u;l--;)u=a.data[l],u.data==="isFlip"&&(u.revert(),u.getChildren(!0,!0,!1).forEach(function(c){return s.splice(s.indexOf(c),1)}));for(s.map(function(c){return{g:c._dur||c._delay||c._sat&&!c._sat.vars.immediateRender?c.globalTime(0):-1/0,t:c}}).sort(function(c,h){return h.g-c.g||-1/0}).forEach(function(c){return c.t.revert(n)}),l=a.data.length;l--;)u=a.data[l],u instanceof pi?u.data!=="nested"&&(u.scrollTrigger&&u.scrollTrigger.revert(),u.kill()):!(u instanceof sr)&&u.revert&&u.revert(n);a._r.forEach(function(c){return c(n,a)}),a.isReverted=!0}():this.data.forEach(function(s){return s.kill&&s.kill()}),this.clear(),i)for(var o=gc.length;o--;)gc[o].id===this.id&&gc.splice(o,1)},e.revert=function(n){this.kill(n||{})},r}(),d9=function(){function r(t){this.contexts=[],this.scope=t,In&&In.data.push(this)}var e=r.prototype;return e.add=function(n,i,a){Wo(n)||(n={matches:n});var o=new V5(0,a||this.scope),s=o.conditions={},l,u,c;In&&!o.selector&&(o.selector=In.selector),this.contexts.push(o),i=o.add("onMatch",i),o.queries=n;for(u in n)u==="all"?c=1:(l=To.matchMedia(n[u]),l&&(gc.indexOf(o)<0&&gc.push(o),(s[u]=l.matches)&&(c=1),l.addListener?l.addListener(ub):l.addEventListener("change",ub)));return c&&i(o,function(h){return o.add(null,h)}),this},e.revert=function(n){this.kill(n||{})},e.kill=function(n){this.contexts.forEach(function(i){return i.kill(n,!0)})},r}(),T0={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach(function(i){return M5(i)})},timeline:function(e){return new pi(e)},getTweensOf:function(e,t){return Bn.getTweensOf(e,t)},getProperty:function(e,t,n,i){Er(e)&&(e=La(e)[0]);var a=dc(e||{}).get,o=n?d5:f5;return n==="native"&&(n=""),e&&(t?o((Xi[t]&&Xi[t].get||a)(e,t,n,i)):function(s,l,u){return o((Xi[s]&&Xi[s].get||a)(e,s,l,u))})},quickSetter:function(e,t,n){if(e=La(e),e.length>1){var i=e.map(function(c){return ki.quickSetter(c,t,n)}),a=i.length;return function(c){for(var h=a;h--;)i[h](c)}}e=e[0]||{};var o=Xi[t],s=dc(e),l=s.harness&&(s.harness.aliases||{})[t]||t,u=o?function(c){var h=new o;uf._pt=0,h.init(e,n?c+n:c,uf,0,[e]),h.render(1,h),uf._pt&&KM(1,uf)}:s.set(e,l);return o?u:function(c){return u(e,l,n?c+n:c,s,1)}},quickTo:function(e,t,n){var i,a=ki.to(e,aa((i={},i[t]="+=0.1",i.paused=!0,i.stagger=0,i),n||{})),o=function(l,u,c){return a.resetTo(t,l,u,c)};return o.tween=a,o},isTweening:function(e){return Bn.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=vc(e.ease,If.ease)),vL(If,e||{})},config:function(e){return vL(ea,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,i=e.plugins,a=e.defaults,o=e.extendTimeline;(i||"").split(",").forEach(function(s){return s&&!Xi[s]&&!ia[s]&&gv(t+" effect requires "+s+" plugin.")}),vx[t]=function(s,l,u){return n(La(s),aa(l||{},a),u)},o&&(pi.prototype[t]=function(s,l,u){return this.add(vx[t](s,Wo(l)?l:(u=l)&&{},this),u)})},registerEase:function(e,t){Zt[e]=vc(t)},parseEase:function(e,t){return arguments.length?vc(e,t):Zt},getById:function(e){return Bn.getById(e)},exportRoot:function(e,t){e===void 0&&(e={});var n=new pi(e),i,a;for(n.smoothChildTiming=Ei(e.smoothChildTiming),Bn.remove(n),n._dp=0,n._time=n._tTime=Bn._time,i=Bn._first;i;)a=i._next,(t||!(!i._dur&&i instanceof sr&&i.vars.onComplete===i._targets[0]))&&Po(n,i,i._start-i._delay),i=a;return Po(Bn,n,0),n},context:function(e,t){return e?new V5(e,t):In},matchMedia:function(e){return new d9(e)},matchMediaRefresh:function(){return gc.forEach(function(e){var t=e.conditions,n,i;for(i in t)t[i]&&(t[i]=!1,n=1);n&&e.revert()})||ub()},addEventListener:function(e,t){var n=Wy[e]||(Wy[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=Wy[e],i=n&&n.indexOf(t);i>=0&&n.splice(i,1)},utils:{wrap:$7,wrapYoyo:X7,distribute:x5,random:A5,snap:S5,normalize:W7,getUnit:ei,clamp:U7,splitColor:C5,toArray:La,selector:ob,mapRange:b5,pipe:G7,unitize:H7,interpolate:Y7,shuffle:_5},install:s5,effects:vx,ticker:qi,updateRoot:pi.updateRoot,plugins:Xi,globalTimeline:Bn,core:{PropTween:Pi,globals:l5,Tween:sr,Timeline:pi,Animation:xv,getCache:dc,_removeLinkedListItem:q_,reverting:function(){return kr},context:function(e){return e&&In&&(In.data.push(e),e._ctx=In),In},suppressOverwrites:function(e){return FM=e}}};Li("to,from,fromTo,delayedCall,set,killTweensOf",function(r){return T0[r]=sr[r]});qi.add(pi.updateRoot);uf=T0.to({},{duration:0});var p9=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},v9=function(e,t){var n=e._targets,i,a,o;for(i in t)for(a=n.length;a--;)o=e._ptLookup[a][i],o&&(o=o.d)&&(o._pt&&(o=p9(o,i)),o&&o.modifier&&o.modifier(t[i],e,n[a],i))},xx=function(e,t){return{name:e,headless:1,rawVars:1,init:function(i,a,o){o._onInit=function(s){var l,u;if(Er(a)&&(l={},Li(a,function(c){return l[c]=1}),a=l),t){l={};for(u in a)l[u]=t(a[u]);a=l}v9(s,a)}}}},ki=T0.registerPlugin({name:"attr",init:function(e,t,n,i,a){var o,s,l;this.tween=n;for(o in t)l=e.getAttribute(o)||"",s=this.add(e,"setAttribute",(l||0)+"",t[o],i,a,0,0,o),s.op=o,s.b=l,this._props.push(o)},render:function(e,t){for(var n=t._pt;n;)kr?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",headless:1,init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},xx("roundProps",sb),xx("modifiers"),xx("snap",S5))||T0;sr.version=pi.version=ki.version="3.14.2";o5=1;zM()&&Ff();Zt.Power0;Zt.Power1;Zt.Power2;Zt.Power3;Zt.Power4;Zt.Linear;Zt.Quad;Zt.Cubic;Zt.Quart;Zt.Quint;Zt.Strong;Zt.Elastic;Zt.Back;Zt.SteppedEase;Zt.Bounce;Zt.Sine;Zt.Expo;Zt.Circ;/*! |
|
* CSSPlugin 3.14.2 |
|
* https://gsap.com |
|
* |
|
* Copyright 2008-2025, GreenSock. All rights reserved. |
|
* Subject to the terms at https://gsap.com/standard-license |
|
* @author: Jack Doyle, jack@greensock.com |
|
*/var SL,yl,xf,ZM,nc,AL,QM,g9=function(){return typeof window!="undefined"},Cs={},Gu=180/Math.PI,Sf=Math.PI/180,ah=Math.atan2,wL=1e8,JM=/([A-Z])/g,m9=/(left|right|width|margin|padding|x)/i,y9=/[\s,\(]\S/,ko={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},cb=function(e,t){return t.set(t.t,t.p,Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},_9=function(e,t){return t.set(t.t,t.p,e===1?t.e:Math.round((t.s+t.c*e)*1e4)/1e4+t.u,t)},x9=function(e,t){return t.set(t.t,t.p,e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},S9=function(e,t){return t.set(t.t,t.p,e===1?t.e:e?Math.round((t.s+t.c*e)*1e4)/1e4+t.u:t.b,t)},A9=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},G5=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},H5=function(e,t){return t.set(t.t,t.p,e!==1?t.b:t.e,t)},w9=function(e,t,n){return e.style[t]=n},b9=function(e,t,n){return e.style.setProperty(t,n)},T9=function(e,t,n){return e._gsap[t]=n},M9=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},C9=function(e,t,n,i,a){var o=e._gsap;o.scaleX=o.scaleY=n,o.renderTransform(a,o)},E9=function(e,t,n,i,a){var o=e._gsap;o[t]=n,o.renderTransform(a,o)},zn="transform",Ri=zn+"Origin",L9=function r(e,t){var n=this,i=this.target,a=i.style,o=i._gsap;if(e in Cs&&a){if(this.tfm=this.tfm||{},e!=="transform")e=ko[e]||e,~e.indexOf(",")?e.split(",").forEach(function(s){return n.tfm[s]=vs(i,s)}):this.tfm[e]=o.x?o[e]:vs(i,e),e===Ri&&(this.tfm.zOrigin=o.zOrigin);else return ko.transform.split(",").forEach(function(s){return r.call(n,s,t)});if(this.props.indexOf(zn)>=0)return;o.svg&&(this.svgo=i.getAttribute("data-svg-origin"),this.props.push(Ri,t,"")),e=zn}(a||t)&&this.props.push(e,t,a[e])},W5=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},P9=function(){var e=this.props,t=this.target,n=t.style,i=t._gsap,a,o;for(a=0;a<e.length;a+=3)e[a+1]?e[a+1]===2?t[e[a]](e[a+2]):t[e[a]]=e[a+2]:e[a+2]?n[e[a]]=e[a+2]:n.removeProperty(e[a].substr(0,2)==="--"?e[a]:e[a].replace(JM,"-$1").toLowerCase());if(this.tfm){for(o in this.tfm)i[o]=this.tfm[o];i.svg&&(i.renderTransform(),t.setAttribute("data-svg-origin",this.svgo||"")),a=QM(),(!a||!a.isStart)&&!n[zn]&&(W5(n),i.zOrigin&&n[Ri]&&(n[Ri]+=" "+i.zOrigin+"px",i.zOrigin=0,i.renderTransform()),i.uncache=1)}},$5=function(e,t){var n={target:e,props:[],revert:P9,save:L9};return e._gsap||ki.core.getCache(e),t&&e.style&&e.nodeType&&t.split(",").forEach(function(i){return n.save(i)}),n},X5,hb=function(e,t){var n=yl.createElementNS?yl.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):yl.createElement(e);return n&&n.style?n:yl.createElement(e)},Zi=function r(e,t,n){var i=getComputedStyle(e);return i[t]||i.getPropertyValue(t.replace(JM,"-$1").toLowerCase())||i.getPropertyValue(t)||!n&&r(e,Bf(t)||t,1)||""},bL="O,Moz,ms,Ms,Webkit".split(","),Bf=function(e,t,n){var i=t||nc,a=i.style,o=5;if(e in a&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);o--&&!(bL[o]+e in a););return o<0?null:(o===3?"ms":o>=0?bL[o]:"")+e},fb=function(){g9()&&window.document&&(SL=window,yl=SL.document,xf=yl.documentElement,nc=hb("div")||{style:{}},hb("div"),zn=Bf(zn),Ri=zn+"Origin",nc.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",X5=!!Bf("perspective"),QM=ki.core.reverting,ZM=1)},TL=function(e){var t=e.ownerSVGElement,n=hb("svg",t&&t.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=e.cloneNode(!0),a;i.style.display="block",n.appendChild(i),xf.appendChild(n);try{a=i.getBBox()}catch(o){}return n.removeChild(i),xf.removeChild(n),a},ML=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},Y5=function(e){var t,n;try{t=e.getBBox()}catch(i){t=TL(e),n=1}return t&&(t.width||t.height)||n||(t=TL(e)),t&&!t.width&&!t.x&&!t.y?{x:+ML(e,["x","cx","x1"])||0,y:+ML(e,["y","cy","y1"])||0,width:0,height:0}:t},q5=function(e){return!!(e.getCTM&&(!e.parentNode||e.ownerSVGElement)&&Y5(e))},$l=function(e,t){if(t){var n=e.style,i;t in Cs&&t!==Ri&&(t=zn),n.removeProperty?(i=t.substr(0,2),(i==="ms"||t.substr(0,6)==="webkit")&&(t="-"+t),n.removeProperty(i==="--"?t:t.replace(JM,"-$1").toLowerCase())):n.removeAttribute(t)}},_l=function(e,t,n,i,a,o){var s=new Pi(e._pt,t,n,0,1,o?H5:G5);return e._pt=s,s.b=i,s.e=a,e._props.push(n),s},CL={deg:1,rad:1,turn:1},R9={grid:1,flex:1},Xl=function r(e,t,n,i){var a=parseFloat(n)||0,o=(n+"").trim().substr((a+"").length)||"px",s=nc.style,l=m9.test(t),u=e.tagName.toLowerCase()==="svg",c=(u?"client":"offset")+(l?"Width":"Height"),h=100,f=i==="px",d=i==="%",p,g,v,m;if(i===o||!a||CL[i]||CL[o])return a;if(o!=="px"&&!f&&(a=r(e,t,n,"px")),m=e.getCTM&&q5(e),(d||o==="%")&&(Cs[t]||~t.indexOf("adius")))return p=m?e.getBBox()[l?"width":"height"]:e[c],Jn(d?a/p*h:a/100*p);if(s[l?"width":"height"]=h+(f?o:i),g=i!=="rem"&&~t.indexOf("adius")||i==="em"&&e.appendChild&&!u?e:e.parentNode,m&&(g=(e.ownerSVGElement||{}).parentNode),(!g||g===yl||!g.appendChild)&&(g=yl.body),v=g._gsap,v&&d&&v.width&&l&&v.time===qi.time&&!v.uncache)return Jn(a/v.width*h);if(d&&(t==="height"||t==="width")){var y=e.style[t];e.style[t]=h+i,p=e[c],y?e.style[t]=y:$l(e,t)}else(d||o==="%")&&!R9[Zi(g,"display")]&&(s.position=Zi(e,"position")),g===e&&(s.position="static"),g.appendChild(nc),p=nc[c],g.removeChild(nc),s.position="absolute";return l&&d&&(v=dc(g),v.time=qi.time,v.width=g[c]),Jn(f?p*a/h:p&&a?h/p*a:0)},vs=function(e,t,n,i){var a;return ZM||fb(),t in ko&&t!=="transform"&&(t=ko[t],~t.indexOf(",")&&(t=t.split(",")[0])),Cs[t]&&t!=="transform"?(a=Av(e,i),a=t!=="transformOrigin"?a[t]:a.svg?a.origin:C0(Zi(e,Ri))+" "+a.zOrigin+"px"):(a=e.style[t],(!a||a==="auto"||i||~(a+"").indexOf("calc("))&&(a=M0[t]&&M0[t](e,t,n)||Zi(e,t)||c5(e,t)||(t==="opacity"?1:0))),n&&!~(a+"").trim().indexOf(" ")?Xl(e,t,a,n)+n:a},D9=function(e,t,n,i){if(!n||n==="none"){var a=Bf(t,e,1),o=a&&Zi(e,a,1);o&&o!==n?(t=a,n=o):t==="borderColor"&&(n=Zi(e,"borderTopColor"))}var s=new Pi(this._pt,e.style,t,0,1,z5),l=0,u=0,c,h,f,d,p,g,v,m,y,_,x,S;if(s.b=n,s.e=i,n+="",i+="",i.substring(0,6)==="var(--"&&(i=Zi(e,i.substring(4,i.indexOf(")")))),i==="auto"&&(g=e.style[t],e.style[t]=i,i=Zi(e,t)||i,g?e.style[t]=g:$l(e,t)),c=[n,i],L5(c),n=c[0],i=c[1],f=n.match(lf)||[],S=i.match(lf)||[],S.length){for(;h=lf.exec(i);)v=h[0],y=i.substring(l,h.index),p?p=(p+1)%5:(y.substr(-5)==="rgba("||y.substr(-5)==="hsla(")&&(p=1),v!==(g=f[u++]||"")&&(d=parseFloat(g)||0,x=g.substr((d+"").length),v.charAt(1)==="="&&(v=_f(d,v)+x),m=parseFloat(v),_=v.substr((m+"").length),l=lf.lastIndex-_.length,_||(_=_||ea.units[t]||x,l===i.length&&(i+=_,s.e+=_)),x!==_&&(d=Xl(e,t,g,_)||0),s._pt={_next:s._pt,p:y||u===1?y:",",s:d,c:m-d,m:p&&p<4||t==="zIndex"?Math.round:0});s.c=l<i.length?i.substring(l,i.length):""}else s.r=t==="display"&&i==="none"?H5:G5;return a5.test(i)&&(s.e=0),this._pt=s,s},EL={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},I9=function(e){var t=e.split(" "),n=t[0],i=t[1]||"50%";return(n==="top"||n==="bottom"||i==="left"||i==="right")&&(e=n,n=i,i=e),t[0]=EL[n]||n,t[1]=EL[i]||i,t.join(" ")},N9=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n=t.t,i=n.style,a=t.u,o=n._gsap,s,l,u;if(a==="all"||a===!0)i.cssText="",l=1;else for(a=a.split(","),u=a.length;--u>-1;)s=a[u],Cs[s]&&(l=1,s=s==="transformOrigin"?Ri:zn),$l(n,s);l&&($l(n,zn),o&&(o.svg&&n.removeAttribute("transform"),i.scale=i.rotate=i.translate="none",Av(n,1),o.uncache=1,W5(i)))}},M0={clearProps:function(e,t,n,i,a){if(a.data!=="isFromStart"){var o=e._pt=new Pi(e._pt,t,n,0,0,N9);return o.u=i,o.pr=-10,o.tween=a,e._props.push(n),1}}},Sv=[1,0,0,1,0,0],j5={},K5=function(e){return e==="matrix(1, 0, 0, 1, 0, 0)"||e==="none"||!e},LL=function(e){var t=Zi(e,zn);return K5(t)?Sv:t.substr(7).match(i5).map(Jn)},eC=function(e,t){var n=e._gsap||dc(e),i=e.style,a=LL(e),o,s,l,u;return n.svg&&e.getAttribute("transform")?(l=e.transform.baseVal.consolidate().matrix,a=[l.a,l.b,l.c,l.d,l.e,l.f],a.join(",")==="1,0,0,1,0,0"?Sv:a):(a===Sv&&!e.offsetParent&&e!==xf&&!n.svg&&(l=i.display,i.display="block",o=e.parentNode,(!o||!e.offsetParent&&!e.getBoundingClientRect().width)&&(u=1,s=e.nextElementSibling,xf.appendChild(e)),a=LL(e),l?i.display=l:$l(e,"display"),u&&(s?o.insertBefore(e,s):o?o.appendChild(e):xf.removeChild(e))),t&&a.length>6?[a[0],a[1],a[4],a[5],a[12],a[13]]:a)},db=function(e,t,n,i,a,o){var s=e._gsap,l=a||eC(e,!0),u=s.xOrigin||0,c=s.yOrigin||0,h=s.xOffset||0,f=s.yOffset||0,d=l[0],p=l[1],g=l[2],v=l[3],m=l[4],y=l[5],_=t.split(" "),x=parseFloat(_[0])||0,S=parseFloat(_[1])||0,A,w,M,C;n?l!==Sv&&(w=d*v-p*g)&&(M=x*(v/w)+S*(-g/w)+(g*y-v*m)/w,C=x*(-p/w)+S*(d/w)-(d*y-p*m)/w,x=M,S=C):(A=Y5(e),x=A.x+(~_[0].indexOf("%")?x/100*A.width:x),S=A.y+(~(_[1]||_[0]).indexOf("%")?S/100*A.height:S)),i||i!==!1&&s.smooth?(m=x-u,y=S-c,s.xOffset=h+(m*d+y*g)-m,s.yOffset=f+(m*p+y*v)-y):s.xOffset=s.yOffset=0,s.xOrigin=x,s.yOrigin=S,s.smooth=!!i,s.origin=t,s.originIsAbsolute=!!n,e.style[Ri]="0px 0px",o&&(_l(o,s,"xOrigin",u,x),_l(o,s,"yOrigin",c,S),_l(o,s,"xOffset",h,s.xOffset),_l(o,s,"yOffset",f,s.yOffset)),e.setAttribute("data-svg-origin",x+" "+S)},Av=function(e,t){var n=e._gsap||new I5(e);if("x"in n&&!t&&!n.uncache)return n;var i=e.style,a=n.scaleX<0,o="px",s="deg",l=getComputedStyle(e),u=Zi(e,Ri)||"0",c,h,f,d,p,g,v,m,y,_,x,S,A,w,M,C,b,T,P,D,L,E,I,N,R,F,O,V,H,Q,W,Z;return c=h=f=g=v=m=y=_=x=0,d=p=1,n.svg=!!(e.getCTM&&q5(e)),l.translate&&((l.translate!=="none"||l.scale!=="none"||l.rotate!=="none")&&(i[zn]=(l.translate!=="none"?"translate3d("+(l.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+(l.rotate!=="none"?"rotate("+l.rotate+") ":"")+(l.scale!=="none"?"scale("+l.scale.split(" ").join(",")+") ":"")+(l[zn]!=="none"?l[zn]:"")),i.scale=i.rotate=i.translate="none"),w=eC(e,n.svg),n.svg&&(n.uncache?(R=e.getBBox(),u=n.xOrigin-R.x+"px "+(n.yOrigin-R.y)+"px",N=""):N=!t&&e.getAttribute("data-svg-origin"),db(e,N||u,!!N||n.originIsAbsolute,n.smooth!==!1,w)),S=n.xOrigin||0,A=n.yOrigin||0,w!==Sv&&(T=w[0],P=w[1],D=w[2],L=w[3],c=E=w[4],h=I=w[5],w.length===6?(d=Math.sqrt(T*T+P*P),p=Math.sqrt(L*L+D*D),g=T||P?ah(P,T)*Gu:0,y=D||L?ah(D,L)*Gu+g:0,y&&(p*=Math.abs(Math.cos(y*Sf))),n.svg&&(c-=S-(S*T+A*D),h-=A-(S*P+A*L))):(Z=w[6],Q=w[7],O=w[8],V=w[9],H=w[10],W=w[11],c=w[12],h=w[13],f=w[14],M=ah(Z,H),v=M*Gu,M&&(C=Math.cos(-M),b=Math.sin(-M),N=E*C+O*b,R=I*C+V*b,F=Z*C+H*b,O=E*-b+O*C,V=I*-b+V*C,H=Z*-b+H*C,W=Q*-b+W*C,E=N,I=R,Z=F),M=ah(-D,H),m=M*Gu,M&&(C=Math.cos(-M),b=Math.sin(-M),N=T*C-O*b,R=P*C-V*b,F=D*C-H*b,W=L*b+W*C,T=N,P=R,D=F),M=ah(P,T),g=M*Gu,M&&(C=Math.cos(M),b=Math.sin(M),N=T*C+P*b,R=E*C+I*b,P=P*C-T*b,I=I*C-E*b,T=N,E=R),v&&Math.abs(v)+Math.abs(g)>359.9&&(v=g=0,m=180-m),d=Jn(Math.sqrt(T*T+P*P+D*D)),p=Jn(Math.sqrt(I*I+Z*Z)),M=ah(E,I),y=Math.abs(M)>2e-4?M*Gu:0,x=W?1/(W<0?-W:W):0),n.svg&&(N=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!K5(Zi(e,zn)),N&&e.setAttribute("transform",N))),Math.abs(y)>90&&Math.abs(y)<270&&(a?(d*=-1,y+=g<=0?180:-180,g+=g<=0?180:-180):(p*=-1,y+=y<=0?180:-180)),t=t||n.uncache,n.x=c-((n.xPercent=c&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-c)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+o,n.y=h-((n.yPercent=h&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-h)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+o,n.z=f+o,n.scaleX=Jn(d),n.scaleY=Jn(p),n.rotation=Jn(g)+s,n.rotationX=Jn(v)+s,n.rotationY=Jn(m)+s,n.skewX=y+s,n.skewY=_+s,n.transformPerspective=x+o,(n.zOrigin=parseFloat(u.split(" ")[2])||!t&&n.zOrigin||0)&&(i[Ri]=C0(u)),n.xOffset=n.yOffset=0,n.force3D=ea.force3D,n.renderTransform=n.svg?O9:X5?Z5:k9,n.uncache=0,n},C0=function(e){return(e=e.split(" "))[0]+" "+e[1]},Sx=function(e,t,n){var i=ei(t);return Jn(parseFloat(t)+parseFloat(Xl(e,"x",n+"px",i)))+i},k9=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,Z5(e,t)},hu="0deg",Dd="0px",fu=") ",Z5=function(e,t){var n=t||this,i=n.xPercent,a=n.yPercent,o=n.x,s=n.y,l=n.z,u=n.rotation,c=n.rotationY,h=n.rotationX,f=n.skewX,d=n.skewY,p=n.scaleX,g=n.scaleY,v=n.transformPerspective,m=n.force3D,y=n.target,_=n.zOrigin,x="",S=m==="auto"&&e&&e!==1||m===!0;if(_&&(h!==hu||c!==hu)){var A=parseFloat(c)*Sf,w=Math.sin(A),M=Math.cos(A),C;A=parseFloat(h)*Sf,C=Math.cos(A),o=Sx(y,o,w*C*-_),s=Sx(y,s,-Math.sin(A)*-_),l=Sx(y,l,M*C*-_+_)}v!==Dd&&(x+="perspective("+v+fu),(i||a)&&(x+="translate("+i+"%, "+a+"%) "),(S||o!==Dd||s!==Dd||l!==Dd)&&(x+=l!==Dd||S?"translate3d("+o+", "+s+", "+l+") ":"translate("+o+", "+s+fu),u!==hu&&(x+="rotate("+u+fu),c!==hu&&(x+="rotateY("+c+fu),h!==hu&&(x+="rotateX("+h+fu),(f!==hu||d!==hu)&&(x+="skew("+f+", "+d+fu),(p!==1||g!==1)&&(x+="scale("+p+", "+g+fu),y.style[zn]=x||"translate(0, 0)"},O9=function(e,t){var n=t||this,i=n.xPercent,a=n.yPercent,o=n.x,s=n.y,l=n.rotation,u=n.skewX,c=n.skewY,h=n.scaleX,f=n.scaleY,d=n.target,p=n.xOrigin,g=n.yOrigin,v=n.xOffset,m=n.yOffset,y=n.forceCSS,_=parseFloat(o),x=parseFloat(s),S,A,w,M,C;l=parseFloat(l),u=parseFloat(u),c=parseFloat(c),c&&(c=parseFloat(c),u+=c,l+=c),l||u?(l*=Sf,u*=Sf,S=Math.cos(l)*h,A=Math.sin(l)*h,w=Math.sin(l-u)*-f,M=Math.cos(l-u)*f,u&&(c*=Sf,C=Math.tan(u-c),C=Math.sqrt(1+C*C),w*=C,M*=C,c&&(C=Math.tan(c),C=Math.sqrt(1+C*C),S*=C,A*=C)),S=Jn(S),A=Jn(A),w=Jn(w),M=Jn(M)):(S=h,M=f,A=w=0),(_&&!~(o+"").indexOf("px")||x&&!~(s+"").indexOf("px"))&&(_=Xl(d,"x",o,"px"),x=Xl(d,"y",s,"px")),(p||g||v||m)&&(_=Jn(_+p-(p*S+g*w)+v),x=Jn(x+g-(p*A+g*M)+m)),(i||a)&&(C=d.getBBox(),_=Jn(_+i/100*C.width),x=Jn(x+a/100*C.height)),C="matrix("+S+","+A+","+w+","+M+","+_+","+x+")",d.setAttribute("transform",C),y&&(d.style[zn]=C)},F9=function(e,t,n,i,a){var o=360,s=Er(a),l=parseFloat(a)*(s&&~a.indexOf("rad")?Gu:1),u=l-i,c=i+u+"deg",h,f;return s&&(h=a.split("_")[1],h==="short"&&(u%=o,u!==u%(o/2)&&(u+=u<0?o:-o)),h==="cw"&&u<0?u=(u+o*wL)%o-~~(u/o)*o:h==="ccw"&&u>0&&(u=(u-o*wL)%o-~~(u/o)*o)),e._pt=f=new Pi(e._pt,t,n,i,u,_9),f.e=c,f.u="deg",e._props.push(n),f},PL=function(e,t){for(var n in t)e[n]=t[n];return e},B9=function(e,t,n){var i=PL({},n._gsap),a="perspective,force3D,transformOrigin,svgOrigin",o=n.style,s,l,u,c,h,f,d,p;i.svg?(u=n.getAttribute("transform"),n.setAttribute("transform",""),o[zn]=t,s=Av(n,1),$l(n,zn),n.setAttribute("transform",u)):(u=getComputedStyle(n)[zn],o[zn]=t,s=Av(n,1),o[zn]=u);for(l in Cs)u=i[l],c=s[l],u!==c&&a.indexOf(l)<0&&(d=ei(u),p=ei(c),h=d!==p?Xl(n,l,u,p):parseFloat(u),f=parseFloat(c),e._pt=new Pi(e._pt,s,l,h,f-h,cb),e._pt.u=p||0,e._props.push(l));PL(s,i)};Li("padding,margin,Width,Radius",function(r,e){var t="Top",n="Right",i="Bottom",a="Left",o=(e<3?[t,n,i,a]:[t+a,t+n,i+n,i+a]).map(function(s){return e<2?r+s:"border"+s+r});M0[e>1?"border"+r:r]=function(s,l,u,c,h){var f,d;if(arguments.length<4)return f=o.map(function(p){return vs(s,p,u)}),d=f.join(" "),d.split(f[0]).length===5?f[0]:d;f=(c+"").split(" "),d={},o.forEach(function(p,g){return d[p]=f[g]=f[g]||f[(g-1)/2|0]}),s.init(l,d,h)}});var Q5={name:"css",register:fb,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,i,a){var o=this._props,s=e.style,l=n.vars.startAt,u,c,h,f,d,p,g,v,m,y,_,x,S,A,w,M,C;ZM||fb(),this.styles=this.styles||$5(e),M=this.styles.props,this.tween=n;for(g in t)if(g!=="autoRound"&&(c=t[g],!(Xi[g]&&N5(g,t,n,i,e,a)))){if(d=typeof c,p=M0[g],d==="function"&&(c=c.call(n,i,e,a),d=typeof c),d==="string"&&~c.indexOf("random(")&&(c=yv(c)),p)p(this,e,g,c,n)&&(w=1);else if(g.substr(0,2)==="--")u=(getComputedStyle(e).getPropertyValue(g)+"").trim(),c+="",Nl.lastIndex=0,Nl.test(u)||(v=ei(u),m=ei(c),m?v!==m&&(u=Xl(e,g,u,m)+m):v&&(c+=v)),this.add(s,"setProperty",u,c,i,a,0,0,g),o.push(g),M.push(g,0,s[g]);else if(d!=="undefined"){if(l&&g in l?(u=typeof l[g]=="function"?l[g].call(n,i,e,a):l[g],Er(u)&&~u.indexOf("random(")&&(u=yv(u)),ei(u+"")||u==="auto"||(u+=ea.units[g]||ei(vs(e,g))||""),(u+"").charAt(1)==="="&&(u=vs(e,g))):u=vs(e,g),f=parseFloat(u),y=d==="string"&&c.charAt(1)==="="&&c.substr(0,2),y&&(c=c.substr(2)),h=parseFloat(c),g in ko&&(g==="autoAlpha"&&(f===1&&vs(e,"visibility")==="hidden"&&h&&(f=0),M.push("visibility",0,s.visibility),_l(this,s,"visibility",f?"inherit":"hidden",h?"inherit":"hidden",!h)),g!=="scale"&&g!=="transform"&&(g=ko[g],~g.indexOf(",")&&(g=g.split(",")[0]))),_=g in Cs,_){if(this.styles.save(g),C=c,d==="string"&&c.substring(0,6)==="var(--"){if(c=Zi(e,c.substring(4,c.indexOf(")"))),c.substring(0,5)==="calc("){var b=e.style.perspective;e.style.perspective=c,c=Zi(e,"perspective"),b?e.style.perspective=b:$l(e,"perspective")}h=parseFloat(c)}if(x||(S=e._gsap,S.renderTransform&&!t.parseTransform||Av(e,t.parseTransform),A=t.smoothOrigin!==!1&&S.smooth,x=this._pt=new Pi(this._pt,s,zn,0,1,S.renderTransform,S,0,-1),x.dep=1),g==="scale")this._pt=new Pi(this._pt,S,"scaleY",S.scaleY,(y?_f(S.scaleY,y+h):h)-S.scaleY||0,cb),this._pt.u=0,o.push("scaleY",g),g+="X";else if(g==="transformOrigin"){M.push(Ri,0,s[Ri]),c=I9(c),S.svg?db(e,c,0,A,0,this):(m=parseFloat(c.split(" ")[2])||0,m!==S.zOrigin&&_l(this,S,"zOrigin",S.zOrigin,m),_l(this,s,g,C0(u),C0(c)));continue}else if(g==="svgOrigin"){db(e,c,1,A,0,this);continue}else if(g in j5){F9(this,S,g,f,y?_f(f,y+c):c);continue}else if(g==="smoothOrigin"){_l(this,S,"smooth",S.smooth,c);continue}else if(g==="force3D"){S[g]=c;continue}else if(g==="transform"){B9(this,c,e);continue}}else g in s||(g=Bf(g)||g);if(_||(h||h===0)&&(f||f===0)&&!y9.test(c)&&g in s)v=(u+"").substr((f+"").length),h||(h=0),m=ei(c)||(g in ea.units?ea.units[g]:v),v!==m&&(f=Xl(e,g,u,m)),this._pt=new Pi(this._pt,_?S:s,g,f,(y?_f(f,y+h):h)-f,!_&&(m==="px"||g==="zIndex")&&t.autoRound!==!1?A9:cb),this._pt.u=m||0,_&&C!==c?(this._pt.b=u,this._pt.e=C,this._pt.r=S9):v!==m&&m!=="%"&&(this._pt.b=u,this._pt.r=x9);else if(g in s)D9.call(this,e,g,u,y?y+c:c);else if(g in e)this.add(e,g,u||e[g],y?y+c:c,i,a);else if(g!=="parseTransform"){VM(g,c);continue}_||(g in s?M.push(g,0,s[g]):typeof e[g]=="function"?M.push(g,2,e[g]()):M.push(g,1,u||e[g])),o.push(g)}}w&&U5(this)},render:function(e,t){if(t.tween._time||!QM())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:vs,aliases:ko,getSetter:function(e,t,n){var i=ko[t];return i&&i.indexOf(",")<0&&(t=i),t in Cs&&t!==Ri&&(e._gsap.x||vs(e,"x"))?n&&AL===n?t==="scale"?M9:T9:(AL=n||{})&&(t==="scale"?C9:E9):e.style&&!BM(e.style[t])?w9:~t.indexOf("-")?b9:jM(e,t)},core:{_removeProperty:$l,_getMatrix:eC}};ki.utils.checkPrefix=Bf;ki.core.getStyleSaver=$5;(function(r,e,t,n){var i=Li(r+","+e+","+t,function(a){Cs[a]=1});Li(e,function(a){ea.units[a]="deg",j5[a]=1}),ko[i[13]]=r+","+e,Li(n,function(a){var o=a.split(":");ko[o[1]]=i[o[0]]})})("x,y,z,scale,scaleX,scaleY,xPercent,yPercent","rotation,rotationX,rotationY,skewX,skewY","transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective","0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY");Li("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",function(r){ea.units[r]="px"});ki.registerPlugin(Q5);var $n=ki.registerPlugin(Q5)||ki;$n.core.Tween;const z9={name:"SvglineAnimation",props:{width:{type:Number,default:135},height:{type:Number,default:150},path:{type:String,default:"M0 72.5H682L732 0.5H3082"},color:{type:String,default:"#0091FF"},duration:{type:Number,default:3},length:{type:Number,default:100},begin:{type:Number,default:0},dir:{type:Array,default:()=>[0,1]},strokeWidth:{type:Number,default:4}},data(){let r=1;return{maskId:"svgline-"+r,radialGradientId:"radialGradient-"+r}},mounted(){let r=this._.uid;this.maskId="svgline-"+r,this.radialGradientId="radialGradient-"+r}},U9={class:"svg-line-animation"},V9=["viewBox"],G9=["id"],H9=["stop-opacity"],W9=["stop-opacity"],$9=["id"],X9=["r","fill"],Y9=["begin","dur","path","keyPoints"],q9=["d","stroke","stroke-width","mask"];function j9(r,e,t,n,i,a){return ie(),oe("div",U9,[(ie(),oe("svg",{width:"100%",height:"100%",viewBox:`0 0 ${t.width} ${t.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[G("defs",null,[G("radialGradient",{id:i.radialGradientId,cx:"50%",cy:"50%",fx:"100%",fy:"50%",r:"50%"},[G("stop",{offset:"0%","stop-color":"#fff","stop-opacity":t.dir[1]},null,8,H9),G("stop",{offset:"100%","stop-color":"#fff","stop-opacity":t.dir[0]},null,8,W9)],8,G9),G("mask",{id:i.maskId},[G("circle",{r:t.length,cx:"0",cy:"0",fill:`url(#${i.radialGradientId})`},[G("animateMotion",{begin:`${t.begin}s`,dur:`${t.duration}s`,path:t.path,rotate:"auto",keyPoints:`${t.dir[0]};${t.dir[1]}`,keyTimes:"0;1",repeatCount:"indefinite"},null,8,Y9)],8,X9)],8,$9)]),G("path",{class:"path-line",d:t.path,stroke:t.color,"stroke-width":t.strokeWidth,mask:`url(#${i.maskId})`},null,8,q9)],8,V9))])}const E0=OM(z9,[["render",j9]]);const K9={class:"m-header"},Z9={class:"m-header-wrap"},Q9={class:"m-header-title"},J9={class:"m-header-subtext"},e$={class:"m-header-left",style:{color:"#fff"}},t$={class:"m-header-right"},n$={class:"m-header-line"},r$={__name:"index",props:{title:{type:String,default:"数据可视化大屏"},subText:{type:String,default:"Visualization Platform"}},setup(r){return(e,t)=>(ie(),oe("div",K9,[G("div",Z9,[G("div",Q9,Te(r.title),1),G("div",J9,Te(r.subText),1)]),G("div",e$,[Df(e.$slots,"left")]),G("div",t$,[Df(e.$slots,"right")]),G("div",n$,[$e(E0,{class:"m-header-line-left",width:961,height:79,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:100,path:"M1 1.52783L535 25.6808C552.73 26.5835 571.454 31.3851 588.834 39.2194C593.758 41.4385 598.692 43.7289 603.643 46.0273C633.567 59.9182 664.121 74.1016 696.754 74.6262C696.765 74.6264 696.775 74.6265 696.786 74.6267C821.602 76.5993 879.336 78 961 78"}),$e(E0,{class:"m-header-line-right",width:961,height:79,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:100,path:"M1 1.52783L535 25.6808C552.73 26.5835 571.454 31.3851 588.834 39.2194C593.758 41.4385 598.692 43.7289 603.643 46.0273C633.567 59.9182 664.121 74.1016 696.754 74.6262C696.765 74.6264 696.775 74.6265 696.786 74.6267C821.602 76.5993 879.336 78 961 78"})])]))}};const i$={class:"m-menu"},a$={__name:"index",props:{defaultActive:{type:[String,Number],default:""}},emits:["select"],setup(r,{emit:e}){const t=e,n=r,i=tt(n.defaultActive);return uL("updateActive",o=>{i.value=o,t("select",o)}),uL("activeIndex",i),ni(()=>n.defaultActive,o=>{o!==i.value&&(i.value=o)}),(o,s)=>(ie(),oe("div",i$,[Df(o.$slots,"default")]))}},o$={__name:"index",props:{index:{type:[String,Number],required:!0}},setup(r){const e=r,t=sf("updateActive"),n=sf("activeIndex"),i=()=>{t(e.index)};return(a,o)=>(ie(),oe("div",{class:Vt(["m-menu-item",{"is-active":r.index===_n(n)}]),onClick:i},[Df(a.$slots,"default")],2))}};let RL=0;const DL="webkit moz ms o".split(" ");let Mo,Co;const s$=typeof window=="undefined";if(s$)Mo=function(){},Co=function(){};else{Mo=window.requestAnimationFrame,Co=window.cancelAnimationFrame;let r;for(let e=0;e<DL.length&&!(Mo&&Co);e++)r=DL[e],Mo=Mo||window[r+"RequestAnimationFrame"],Co=Co||window[r+"CancelAnimationFrame"]||window[r+"CancelRequestAnimationFrame"];(!Mo||!Co)&&(Mo=function(e){const t=new Date().getTime(),n=Math.max(0,16-(t-RL)),i=window.setTimeout(()=>{e(t+n)},n);return RL=t+n,i},Co=function(e){window.clearTimeout(e)})}const l$={props:{startVal:{type:Number,required:!1,default:0},endVal:{type:Number,required:!1,default:2017},duration:{type:Number,required:!1,default:3e3},autoplay:{type:Boolean,required:!1,default:!0},decimals:{type:Number,required:!1,default:0,validator(r){return r>=0}},decimal:{type:String,required:!1,default:"."},separator:{type:String,required:!1,default:","},prefix:{type:String,required:!1,default:""},suffix:{type:String,required:!1,default:""},useEasing:{type:Boolean,required:!1,default:!0},easingFn:{type:Function,default(r,e,t,n){return t*(-Math.pow(2,-10*r/n)+1)*1024/1023+e}}},data(){return{localStartVal:this.startVal,displayValue:this.formatNumber(this.startVal),printVal:null,paused:!1,localDuration:this.duration,startTime:null,timestamp:null,remaining:null,rAF:null}},computed:{countDown(){return this.startVal>this.endVal}},watch:{startVal(){this.autoplay&&this.start()},endVal(){this.autoplay&&this.start()}},mounted(){this.autoplay&&this.start(),this.$emit("mountedCallback")},methods:{start(){this.localStartVal=this.startVal,this.startTime=null,this.localDuration=this.duration,this.paused=!1,this.rAF=Mo(this.count)},pauseResume(){this.paused?(this.resume(),this.paused=!1):(this.pause(),this.paused=!0)},pause(){Co(this.rAF)},resume(){this.startTime=null,this.localDuration=+this.remaining,this.localStartVal=+this.printVal,Mo(this.count)},reset(){this.startTime=null,Co(this.rAF),this.displayValue=this.formatNumber(this.startVal)},count(r){this.startTime||(this.startTime=r),this.timestamp=r;const e=r-this.startTime;this.remaining=this.localDuration-e,this.useEasing?this.countDown?this.printVal=this.localStartVal-this.easingFn(e,0,this.localStartVal-this.endVal,this.localDuration):this.printVal=this.easingFn(e,this.localStartVal,this.endVal-this.localStartVal,this.localDuration):this.countDown?this.printVal=this.localStartVal-(this.localStartVal-this.endVal)*(e/this.localDuration):this.printVal=this.localStartVal+(this.endVal-this.localStartVal)*(e/this.localDuration),this.countDown?this.printVal=this.printVal<this.endVal?this.endVal:this.printVal:this.printVal=this.printVal>this.endVal?this.endVal:this.printVal,this.displayValue=this.formatNumber(this.printVal),e<this.localDuration?this.rAF=Mo(this.count):this.$emit("callback")},isNumber(r){return!isNaN(parseFloat(r))},formatNumber(r){r=r.toFixed(this.decimals),r+="";const e=r.split(".");let t=e[0];const n=e.length>1?this.decimal+e[1]:"",i=/(\d+)(\d{3})/;if(this.separator&&!this.isNumber(this.separator))for(;i.test(t);)t=t.replace(i,"$1"+this.separator+"$2");return this.prefix+t+n+this.suffix}},destroyed(){Co(this.rAF)}};function u$(r,e,t,n,i,a){return ie(),oe("span",null,Te(i.displayValue),1)}const J5=OM(l$,[["render",u$]]);typeof window!="undefined"&&window.Vue&&window.Vue.component("count-to",J5);const c$={class:"count-card-left"},h$={class:"count-card-title"},f$={class:"title-zh"},d$={key:0,class:"title-en"},p$={class:"count-card-right"},v$={class:"unit"},g$={__name:"index",props:{info:{type:Object,default:()=>({icon:"xiaoshoujine",zh:"2023年销售金额",en:"Sales amount in 2023",value:9500,unit:"万元",decimals:0})}},setup(r){const e=r,t=tt(!0),n=tt(!1),i=tt(0);let a=null;const o=Se(()=>e.info.duration||1800);ni(()=>[e.info.value,e.info.zh],()=>{a&&window.clearTimeout(a),t.value=!0,n.value=!1,i.value+=1},{immediate:!0});function s(c){return c.toUpperCase()}function l(){t.value=!0,n.value=!1}function u(){t.value=!1,n.value=!0,a&&window.clearTimeout(a),a=window.setTimeout(()=>{n.value=!1},900)}return uo(()=>{a&&window.clearTimeout(a)}),(c,h)=>(ie(),oe("div",{class:Vt(["count-card",{"is-counting":t.value,"is-settled":n.value}])},[G("div",c$,[G("div",{class:Vt(["count-card-icon","icon-"+r.info.icon])},null,2),G("div",h$,[G("div",f$,Te(r.info.zh),1),r.info.en?(ie(),oe("div",d$,Te(s(r.info.en)),1)):Tt("",!0)])]),G("div",p$,[(ie(),oe("div",{class:"value",key:i.value},[$e(_n(J5),{startVal:0,endVal:r.info.value,decimals:r.info.decimals,duration:o.value,separator:"",autoplay:!0,onMountedCallback:l,onCallback:u},null,8,["endVal","decimals","duration"])])),G("div",v$,Te(r.info.unit),1)])],2))}},m$=""+new URL("title-zs1-c15a5ee8-balabala-1782613078975.svg",import.meta.url).href,y$=""+new URL("saoguang-ccf84a88-balabala-1782613078975.svg",import.meta.url).href,_$=""+new URL("content-bottom-left-arrow-3a8a61f3-balabala-1782613078975.svg",import.meta.url).href,x$=""+new URL("content-bottom-right-arrow-a3c5270d-balabala-1782613078975.svg",import.meta.url).href,IL=""+new URL("content-middle-line-162bc0d5-balabala-1782613078975.svg",import.meta.url).href;const S$={class:"m-card-hd"},A$={class:"m-card-hd-bg"},w$=["width","viewBox"],b$=["clip-path"],T$=["width"],M$=["id"],C$=["d"],E$=["d","fill"],L$=["d","fill","mask"],P$=["clip-path"],R$=["x1"],D$=["id","x1"],I$=["id"],N$=["id"],k$=["width"],O$=["id"],F$={class:"m-card-hd-title"},B$=["width","height","viewBox"],z$={opacity:"0.6"},U$=["d"],V$=["d"],G$={class:"m-card-bd-content"},tn={__name:"index",props:{width:{type:Number,default:398},height:{type:Number,default:200},title:{type:String,default:"标题"}},setup(r){const e=r,t=tt(1),n=Se(()=>{let o=e.width;return`M165 0.5 |
|
L165.707 -0.207107 |
|
L165.414 -0.5 |
|
H165 |
|
V0.5Z |
|
M10 0.5 |
|
V-0.5 |
|
H9.58579 |
|
L9.29289 -0.207107 |
|
L10 0.5Z |
|
M175 10.5 |
|
L174.293 11.2071 |
|
L174.586 11.5 |
|
H175 |
|
V10.5Z |
|
M${o} 10.5 |
|
H${o+1} |
|
V9.5 |
|
H${o} |
|
V10.5Z |
|
M${o} 34.5 |
|
V35.5 |
|
H${o+1} |
|
V34.5 |
|
H${o}Z |
|
M0 34.5 |
|
H-1 |
|
V35.5 |
|
H0 |
|
V34.5Z |
|
M0 10.5 |
|
L-0.707107 9.79289 |
|
L-1 10.0858 |
|
V10.5 |
|
H0Z |
|
M165 -0.5 |
|
H10 |
|
V1.5 |
|
H165 |
|
V-0.5Z |
|
M175.707 9.79289 |
|
L165.707 -0.207107 |
|
L164.293 1.20711 |
|
L174.293 11.2071 |
|
L175.707 9.79289Z |
|
M${o} 9.5 |
|
H175 |
|
V11.5 |
|
H${o} |
|
V9.5Z |
|
M${o+1} 34.5 |
|
V10.5 |
|
H397 |
|
V34.5 |
|
H${o+1}Z |
|
M0 35.5 |
|
H${o} |
|
V33.5 |
|
H0 |
|
V35.5Z |
|
M-1 10.5 |
|
V34.5 |
|
H1 |
|
V10.5 |
|
H-1Z |
|
M9.29289 -0.207107 |
|
L-0.707107 9.79289 |
|
L0.707107 11.2071 |
|
L10.7071 1.20711 |
|
L9.29289 -0.207107Z`}),i=Se(()=>{let s=e.height-156,l=e.width;return`M3.485 ${46.0565+s/2} |
|
V${45.8735+s/2} |
|
L3.36682 ${45.7337+s/2} |
|
L0.5 ${42.343+s/2} |
|
V1 |
|
H${l-.5} |
|
V${42.3431+s/2} |
|
L${l-3.367} ${45.7337+s/2} |
|
L${l-3.485} ${45.8735+s/2} |
|
V${46.0565+s/2} |
|
L${l-3.367} ${88.745+s/2} |
|
L${l-.5} ${92.135+s/2} |
|
V${155+s} |
|
H0.5 |
|
V${92.135+s/2} |
|
L3.36682 ${88.745+s/2} |
|
L3.485 ${88.605+s/2} |
|
V${88.422+s/2} |
|
V${46.0565+s/2}Z`}),a=Se(()=>`width:${e.width}px;height:${e.height}px;`);return Ko(()=>{t.value="__"+QB().uid}),(o,s)=>(ie(),oe("div",{class:"m-card",style:un(a.value)},[G("div",S$,[G("div",A$,[(ie(),oe("svg",{width:r.width,height:"36",viewBox:`0 0 ${r.width} 36`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[G("g",{"clip-path":`url(#clip0_70_69244${t.value})`},[G("rect",{y:"34.5",width:r.width,height:"1",fill:"url(#paint0_linear_70_69244)"},null,8,T$),G("mask",{id:`path-2-inside-1_70_69244${t.value}`,fill:"white"},[G("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:`M10 0.5H165L175 10.5H${r.width}V34.5H0V10.5L10 0.5Z`},null,8,C$)],8,M$),G("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:`M10 0.5H165L175 10.5H${r.width}V34.5H0V10.5L10 0.5Z`,fill:`url(#paint1_linear_70_69244${t.value})`},null,8,E$),G("path",{d:n.value,fill:`url(#paint2_linear_70_69244${t.value})`,mask:`url(#path-2-inside-1_70_69244${t.value})`},null,8,L$),s[1]||(s[1]=fc('<g opacity="0.5"><mask id="mask0_70_69244" style="mask-type:alpha;" maskUnits="userSpaceOnUse" x="12" y="-12" width="165" height="29"><g style="mix-blend-mode:plus-lighter;" opacity="0.8"><path d="M177 2.5C177 -4.22 139.531 -11.5 93.9677 -11.5C48.4043 -11.5 12 -5.23199 12 2.5C12 10.232 48.4043 16.5 93.9677 16.5C139.531 16.5 177 9.22 177 2.5Z" fill="url(#paint3_diamond_70_69244)"></path></g></mask><g mask="url(#mask0_70_69244)"><g style="mix-blend-mode:plus-lighter;" opacity="0.8"><path d="M177 0.999998C177 -6 137.934 -11.5 92.371 -11.5C46.8075 -11.5 12 -5.90356 12 0.999998C12 7.90356 46.8075 13.5 92.371 13.5C137.934 13.5 177 8 177 0.999998Z" fill="url(#paint4_diamond_70_69244)"></path></g></g></g><g style="mix-blend-mode:plus-lighter;" opacity="0.1"><ellipse cx="81.5264" cy="12.5" rx="81.5264" ry="12.5" transform="matrix(1 0 0 -1 12 13.5)" fill="url(#paint5_radial_70_69244)"></ellipse></g><path d="M0 0.5H6L0 6.5V0.5Z" fill="#30DCFF"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M170 0.5H398V7.5H177L170 0.5Z" fill="url(#paint6_linear_70_69244)"></path>',4)),G("g",{style:{"mix-blend-mode":"plus-lighter"},"clip-path":`url(#clip1_70_69244${t.value})`},[...s[0]||(s[0]=[fc('<g style="mix-blend-mode:plus-lighter;" opacity="0.8"><ellipse cx="65" cy="2.16667" rx="65" ry="2.16667" transform="matrix(1 1.64302e-07 0.0495776 0.99877 27.6855 -1.82568)" fill="url(#paint7_radial_70_69244)"></ellipse></g><g style="mix-blend-mode:plus-lighter;" opacity="0.5"><ellipse cx="28.7857" cy="4.16667" rx="28.7857" ry="4.16667" transform="matrix(1 1.64302e-07 0.0495776 0.99877 63.8008 -3.82324)" fill="url(#paint8_radial_70_69244)"></ellipse></g><g style="mix-blend-mode:plus-lighter;" opacity="0.54"><ellipse cx="23.2143" cy="2.16667" rx="23.2143" ry="2.16667" transform="matrix(1 1.64302e-07 0.0495776 0.99877 69.4727 -1.82568)" fill="url(#paint9_radial_70_69244)"></ellipse></g><g style="mix-blend-mode:plus-lighter;" opacity="0.8"><ellipse cx="9.28571" cy="2.16667" rx="9.28571" ry="2.16667" transform="matrix(1 1.64302e-07 0.0495776 0.99877 83.4004 -1.82568)" fill="url(#paint10_radial_70_69244)"></ellipse></g>',4)])],8,P$)],8,b$),G("defs",null,[G("linearGradient",{id:"paint0_linear_70_69244",x1:r.width,y1:"35.5021",x2:"0",y2:"35.5021",gradientUnits:"userSpaceOnUse"},[...s[2]||(s[2]=[G("stop",{"stop-color":"#35A8EB","stop-opacity":"0.1"},null,-1),G("stop",{offset:"1","stop-color":"#30DCFF"},null,-1)])],8,R$),G("linearGradient",{id:`paint1_linear_70_69244${t.value}`,x1:r.width,y1:"17.5",x2:"7.94819",y2:"17.5",gradientUnits:"userSpaceOnUse"},[...s[3]||(s[3]=[G("stop",{offset:"0.0364889","stop-color":"#35A8EB","stop-opacity":"0.11"},null,-1),G("stop",{offset:"1","stop-color":"#30C1FF","stop-opacity":"0.27"},null,-1)])],8,D$),G("linearGradient",{id:`paint2_linear_70_69244${t.value}`,x1:"40.8948",y1:"13.5",x2:"40.895",y2:"-6.50005",gradientUnits:"userSpaceOnUse"},[...s[4]||(s[4]=[G("stop",{"stop-color":"#35A8EB","stop-opacity":"0"},null,-1),G("stop",{offset:"1","stop-color":"#30DCFF"},null,-1)])],8,I$),s[6]||(s[6]=fc('<radialGradient id="paint3_diamond_70_69244" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(94.5 3.62) rotate(-90) scale(41.1199 76.576)"><stop stop-color="#B7EEFF"></stop><stop offset="0.302515" stop-color="#9BE2FF" stop-opacity="0.76"></stop><stop offset="1" stop-color="#6BD4FF" stop-opacity="0"></stop></radialGradient><radialGradient id="paint4_diamond_70_69244" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(84.3871 2.00005) rotate(-90) scale(14.0001 188.259)"><stop stop-color="#B7EEFF"></stop><stop offset="0.302515" stop-color="#9BE2FF" stop-opacity="0.76"></stop><stop offset="1" stop-color="#6BD4FF" stop-opacity="0"></stop></radialGradient><radialGradient id="paint5_radial_70_69244" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(80.7192 12.5) rotate(90) scale(12.5 73.8747)"><stop stop-color="#00B1E9"></stop><stop offset="1" stop-color="#6BD4FF" stop-opacity="0"></stop></radialGradient><linearGradient id="paint6_linear_70_69244" x1="567.258" y1="5.49999" x2="177.933" y2="5.49993" gradientUnits="userSpaceOnUse"><stop offset="0.429792" stop-color="#35A8EB" stop-opacity="0"></stop><stop offset="1" stop-color="#30C1FF" stop-opacity="0.27"></stop></linearGradient><radialGradient id="paint7_radial_70_69244" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(64.3564 2.16667) rotate(90.0001) scale(2.16667 64.3564)"><stop stop-color="#B7EEFF"></stop><stop offset="0.302515" stop-color="#9BE2FF" stop-opacity="0.76"></stop><stop offset="1" stop-color="#6BD4FF" stop-opacity="0"></stop></radialGradient><radialGradient id="paint8_radial_70_69244" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(28.5007 4.16667) rotate(90) scale(4.16667 28.5007)"><stop stop-color="#B7EEFF"></stop><stop offset="1" stop-color="#6BD4FF" stop-opacity="0"></stop></radialGradient><radialGradient id="paint9_radial_70_69244" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(22.9844 2.16667) rotate(90) scale(2.16667 22.9844)"><stop stop-color="#B7EEFF"></stop><stop offset="0.302515" stop-color="#9BE2FF" stop-opacity="0.76"></stop><stop offset="1" stop-color="#6BD4FF" stop-opacity="0"></stop></radialGradient><radialGradient id="paint10_radial_70_69244" cx="0" cy="0" r="1" gradientUnits="userSpaceOnUse" gradientTransform="translate(9.19377 2.16667) rotate(90) scale(2.16667 9.19377)"><stop stop-color="#B7EEFF"></stop><stop offset="0.302515" stop-color="#9BE2FF" stop-opacity="0.76"></stop><stop offset="1" stop-color="#6BD4FF" stop-opacity="0"></stop></radialGradient>',8)),G("clipPath",{id:`clip0_70_69244${t.value}`},[G("rect",{width:r.width,height:"35",fill:"white",transform:"translate(0 0.5)"},null,8,k$)],8,N$),G("clipPath",{id:`clip1_70_69244${t.value}`},[...s[5]||(s[5]=[G("rect",{width:"130",height:"4",fill:"white",transform:"matrix(1 1.64302e-07 -0.0495776 -0.99877 28 4.5)"},null,-1)])],8,O$)])],8,w$))]),s[7]||(s[7]=G("img",{class:"m-card-hd-zs1",src:m$,alt:""},null,-1)),s[8]||(s[8]=G("div",{class:"saoguang"},[G("img",{src:y$,alt:""})],-1)),G("div",F$,Te(r.title),1)]),G("div",{class:"m-card-bd",style:un(a.value)},[G("div",{class:"m-card-bd-bg",style:un(a.value)},[(ie(),oe("svg",{width:r.width,height:r.height,viewBox:`0 0 ${r.width} ${r.height}`,fill:"none",xmlns:"http://www.w3.org/2000/svg"},[G("g",z$,[G("path",{d:i.value,fill:"rgba(26, 57, 77,1)"},null,8,U$),G("path",{d:i.value,stroke:"url(#paint1_linear_70_69585)"},null,8,V$)]),s[9]||(s[9]=G("defs",null,[G("linearGradient",{id:"paint1_linear_70_69585",x1:"199",y1:"203.499",x2:"199",y2:"0.499359",gradientUnits:"userSpaceOnUse"},[G("stop",{"stop-color":"#4FC5DD"}),G("stop",{offset:"1","stop-color":"#05839D","stop-opacity":"0"})])],-1))],8,B$)),s[10]||(s[10]=G("img",{class:"m-card-bd-bottom-left-arrow",src:_$,alt:""},null,-1)),s[11]||(s[11]=G("img",{class:"m-card-bd-bottom-right-arrow",src:x$,alt:""},null,-1)),s[12]||(s[12]=G("img",{class:"m-card-bd-middle-left-line",src:IL,alt:""},null,-1)),s[13]||(s[13]=G("img",{class:"m-card-bd-middle-right-line",src:IL,alt:""},null,-1))],4),G("div",G$,[Df(o.$slots,"default")])],4)],4))}};/** |
|
* @license |
|
* Copyright 2010-2023 Three.js Authors |
|
* SPDX-License-Identifier: MIT |
|
*/const tC="161",oh={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},sh={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},H$=0,NL=1,W$=2,ez=1,$$=2,hs=3,Es=0,Di=1,ur=2,kl=0,mc=1,Eo=2,kL=3,OL=4,tz=5,vl=100,X$=101,Y$=102,FL=103,BL=104,q$=200,nz=201,j$=202,K$=203,pb=204,vb=205,Z$=206,Q$=207,rz=208,J$=209,eX=210,tX=211,nX=212,rX=213,iX=214,aX=0,oX=1,sX=2,L0=3,lX=4,uX=5,cX=6,hX=7,nC=0,fX=1,dX=2,Ol=0,pX=1,vX=2,gX=3,mX=4,yX=5,_X=6,zL="attached",xX="detached",iz=300,zf=301,Uf=302,gb=303,mb=304,Z_=306,jr=1e3,ti=1001,P0=1002,vr=1003,yb=1004,Qh=1005,lr=1006,$y=1007,gs=1008,Fl=1009,SX=1010,AX=1011,rC=1012,az=1013,xl=1014,Ro=1015,wv=1016,oz=1017,sz=1018,yc=1020,wX=1021,ba=1023,bX=1024,TX=1025,_c=1026,Vf=1027,MX=1028,lz=1029,CX=1030,uz=1031,cz=1033,Ax=33776,bx=33777,Tx=33778,Mx=33779,UL=35840,VL=35841,GL=35842,HL=35843,hz=36196,WL=37492,$L=37496,XL=37808,YL=37809,qL=37810,jL=37811,KL=37812,ZL=37813,QL=37814,JL=37815,eP=37816,tP=37817,nP=37818,rP=37819,iP=37820,aP=37821,Cx=36492,oP=36494,sP=36495,EX=36283,lP=36284,uP=36285,cP=36286,bv=2300,Gf=2301,Ex=2302,hP=2400,fP=2401,dP=2402,LX=2500,PX=0,fz=1,_b=2,dz=3e3,xc=3001,RX=3200,DX=3201,iC=0,IX=1,Ta="",dn="srgb",yr="srgb-linear",aC="display-p3",Q_="display-p3-linear",R0="linear",Ln="srgb",D0="rec709",I0="p3",lh=7680,pP=519,NX=512,kX=513,OX=514,pz=515,FX=516,BX=517,zX=518,UX=519,xb=35044,vP="300 es",Sb=1035,ms=2e3,N0=2001;class Yc{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const i=this._listeners[e];if(i!==void 0){const a=i.indexOf(t);a!==-1&&i.splice(a,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const n=this._listeners[e.type];if(n!==void 0){e.target=this;const i=n.slice(0);for(let a=0,o=i.length;a<o;a++)i[a].call(this,e);e.target=null}}}const Gr=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let gP=1234567;const Xp=Math.PI/180,Hf=180/Math.PI;function Ra(){const r=Math.random()*4294967295|0,e=Math.random()*4294967295|0,t=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(Gr[r&255]+Gr[r>>8&255]+Gr[r>>16&255]+Gr[r>>24&255]+"-"+Gr[e&255]+Gr[e>>8&255]+"-"+Gr[e>>16&15|64]+Gr[e>>24&255]+"-"+Gr[t&63|128]+Gr[t>>8&255]+"-"+Gr[t>>16&255]+Gr[t>>24&255]+Gr[n&255]+Gr[n>>8&255]+Gr[n>>16&255]+Gr[n>>24&255]).toLowerCase()}function hr(r,e,t){return Math.max(e,Math.min(t,r))}function oC(r,e){return(r%e+e)%e}function VX(r,e,t,n,i){return n+(r-e)*(i-n)/(t-e)}function GX(r,e,t){return r!==e?(t-r)/(e-r):0}function Yp(r,e,t){return(1-t)*r+t*e}function HX(r,e,t,n){return Yp(r,e,1-Math.exp(-t*n))}function WX(r,e=1){return e-Math.abs(oC(r,e*2)-e)}function $X(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*(3-2*r))}function XX(r,e,t){return r<=e?0:r>=t?1:(r=(r-e)/(t-e),r*r*r*(r*(r*6-15)+10))}function YX(r,e){return r+Math.floor(Math.random()*(e-r+1))}function qX(r,e){return r+Math.random()*(e-r)}function jX(r){return r*(.5-Math.random())}function KX(r){r!==void 0&&(gP=r);let e=gP+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function ZX(r){return r*Xp}function QX(r){return r*Hf}function Ab(r){return(r&r-1)===0&&r!==0}function JX(r){return Math.pow(2,Math.ceil(Math.log(r)/Math.LN2))}function k0(r){return Math.pow(2,Math.floor(Math.log(r)/Math.LN2))}function eY(r,e,t,n,i){const a=Math.cos,o=Math.sin,s=a(t/2),l=o(t/2),u=a((e+n)/2),c=o((e+n)/2),h=a((e-n)/2),f=o((e-n)/2),d=a((n-e)/2),p=o((n-e)/2);switch(i){case"XYX":r.set(s*c,l*h,l*f,s*u);break;case"YZY":r.set(l*f,s*c,l*h,s*u);break;case"ZXZ":r.set(l*h,l*f,s*c,s*u);break;case"XZX":r.set(s*c,l*p,l*d,s*u);break;case"YXY":r.set(l*d,s*c,l*p,s*u);break;case"ZYZ":r.set(l*p,l*d,s*c,s*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}}function Ka(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return r/4294967295;case Uint16Array:return r/65535;case Uint8Array:return r/255;case Int32Array:return Math.max(r/2147483647,-1);case Int16Array:return Math.max(r/32767,-1);case Int8Array:return Math.max(r/127,-1);default:throw new Error("Invalid component type.")}}function cn(r,e){switch(e.constructor){case Float32Array:return r;case Uint32Array:return Math.round(r*4294967295);case Uint16Array:return Math.round(r*65535);case Uint8Array:return Math.round(r*255);case Int32Array:return Math.round(r*2147483647);case Int16Array:return Math.round(r*32767);case Int8Array:return Math.round(r*127);default:throw new Error("Invalid component type.")}}const sC={DEG2RAD:Xp,RAD2DEG:Hf,generateUUID:Ra,clamp:hr,euclideanModulo:oC,mapLinear:VX,inverseLerp:GX,lerp:Yp,damp:HX,pingpong:WX,smoothstep:$X,smootherstep:XX,randInt:YX,randFloat:qX,randFloatSpread:jX,seededRandom:KX,degToRad:ZX,radToDeg:QX,isPowerOfTwo:Ab,ceilPowerOfTwo:JX,floorPowerOfTwo:k0,setQuaternionFromProperEuler:eY,normalize:cn,denormalize:Ka};class Me{constructor(e=0,t=0){Me.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6],this.y=i[1]*t+i[4]*n+i[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(hr(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),i=Math.sin(t),a=this.x-e.x,o=this.y-e.y;return this.x=a*n-o*i+e.x,this.y=a*i+o*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ht{constructor(e,t,n,i,a,o,s,l,u){Ht.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,n,i,a,o,s,l,u)}set(e,t,n,i,a,o,s,l,u){const c=this.elements;return c[0]=e,c[1]=i,c[2]=s,c[3]=t,c[4]=a,c[5]=l,c[6]=n,c[7]=o,c[8]=u,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,a=this.elements,o=n[0],s=n[3],l=n[6],u=n[1],c=n[4],h=n[7],f=n[2],d=n[5],p=n[8],g=i[0],v=i[3],m=i[6],y=i[1],_=i[4],x=i[7],S=i[2],A=i[5],w=i[8];return a[0]=o*g+s*y+l*S,a[3]=o*v+s*_+l*A,a[6]=o*m+s*x+l*w,a[1]=u*g+c*y+h*S,a[4]=u*v+c*_+h*A,a[7]=u*m+c*x+h*w,a[2]=f*g+d*y+p*S,a[5]=f*v+d*_+p*A,a[8]=f*m+d*x+p*w,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[3]*=e,t[6]*=e,t[1]*=e,t[4]*=e,t[7]*=e,t[2]*=e,t[5]*=e,t[8]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8];return t*o*c-t*s*u-n*a*c+n*s*l+i*a*u-i*o*l}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=c*o-s*u,f=s*l-c*a,d=u*a-o*l,p=t*h+n*f+i*d;if(p===0)return this.set(0,0,0,0,0,0,0,0,0);const g=1/p;return e[0]=h*g,e[1]=(i*u-c*n)*g,e[2]=(s*n-i*o)*g,e[3]=f*g,e[4]=(c*t-i*l)*g,e[5]=(i*a-s*t)*g,e[6]=d*g,e[7]=(n*l-u*t)*g,e[8]=(o*t-n*a)*g,this}transpose(){let e;const t=this.elements;return e=t[1],t[1]=t[3],t[3]=e,e=t[2],t[2]=t[6],t[6]=e,e=t[5],t[5]=t[7],t[7]=e,this}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,i,a,o,s){const l=Math.cos(a),u=Math.sin(a);return this.set(n*l,n*u,-n*(l*o+u*s)+o+e,-i*u,i*l,-i*(-u*o+l*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Lx.makeScale(e,t)),this}rotate(e){return this.premultiply(Lx.makeRotation(-e)),this}translate(e,t){return this.premultiply(Lx.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<9;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const Lx=new Ht;function vz(r){for(let e=r.length-1;e>=0;--e)if(r[e]>=65535)return!0;return!1}function Tv(r){return document.createElementNS("http://www.w3.org/1999/xhtml",r)}function tY(){const r=Tv("canvas");return r.style.display="block",r}const mP={};function Sc(r){r in mP||(mP[r]=!0,console.warn(r))}const yP=new Ht().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),_P=new Ht().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),$g={[yr]:{transfer:R0,primaries:D0,toReference:r=>r,fromReference:r=>r},[dn]:{transfer:Ln,primaries:D0,toReference:r=>r.convertSRGBToLinear(),fromReference:r=>r.convertLinearToSRGB()},[Q_]:{transfer:R0,primaries:I0,toReference:r=>r.applyMatrix3(_P),fromReference:r=>r.applyMatrix3(yP)},[aC]:{transfer:Ln,primaries:I0,toReference:r=>r.convertSRGBToLinear().applyMatrix3(_P),fromReference:r=>r.applyMatrix3(yP).convertLinearToSRGB()}},nY=new Set([yr,Q_]),ln={enabled:!0,_workingColorSpace:yr,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(r){if(!nY.has(r))throw new Error(`Unsupported working color space, "${r}".`);this._workingColorSpace=r},convert:function(r,e,t){if(this.enabled===!1||e===t||!e||!t)return r;const n=$g[e].toReference,i=$g[t].fromReference;return i(n(r))},fromWorkingColorSpace:function(r,e){return this.convert(r,this._workingColorSpace,e)},toWorkingColorSpace:function(r,e){return this.convert(r,e,this._workingColorSpace)},getPrimaries:function(r){return $g[r].primaries},getTransfer:function(r){return r===Ta?R0:$g[r].transfer}};function Af(r){return r<.04045?r*.0773993808:Math.pow(r*.9478672986+.0521327014,2.4)}function Px(r){return r<.0031308?r*12.92:1.055*Math.pow(r,.41666)-.055}let uh;class gz{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement=="undefined")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{uh===void 0&&(uh=Tv("canvas")),uh.width=e.width,uh.height=e.height;const n=uh.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=uh}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if(typeof HTMLImageElement!="undefined"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&e instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&e instanceof ImageBitmap){const t=Tv("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const i=n.getImageData(0,0,e.width,e.height),a=i.data;for(let o=0;o<a.length;o++)a[o]=Af(a[o]/255)*255;return n.putImageData(i,0,0),t}else if(e.data){const t=e.data.slice(0);for(let n=0;n<t.length;n++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[n]=Math.floor(Af(t[n]/255)*255):t[n]=Af(t[n]);return{data:t,width:e.width,height:e.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}let rY=0;class mz{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:rY++}),this.uuid=Ra(),this.data=e,this.dataReady=!0,this.version=0}set needsUpdate(e){e===!0&&this.version++}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.images[this.uuid]!==void 0)return e.images[this.uuid];const n={uuid:this.uuid,url:""},i=this.data;if(i!==null){let a;if(Array.isArray(i)){a=[];for(let o=0,s=i.length;o<s;o++)i[o].isDataTexture?a.push(Rx(i[o].image)):a.push(Rx(i[o]))}else a=Rx(i);n.url=a}return t||(e.images[this.uuid]=n),n}}function Rx(r){return typeof HTMLImageElement!="undefined"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&r instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&r instanceof ImageBitmap?gz.getDataURL(r):r.data?{data:Array.from(r.data),width:r.width,height:r.height,type:r.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let iY=0;class mr extends Yc{constructor(e=mr.DEFAULT_IMAGE,t=mr.DEFAULT_MAPPING,n=ti,i=ti,a=lr,o=gs,s=ba,l=Fl,u=mr.DEFAULT_ANISOTROPY,c=Ta){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:iY++}),this.uuid=Ra(),this.name="",this.source=new mz(e),this.mipmaps=[],this.mapping=t,this.channel=0,this.wrapS=n,this.wrapT=i,this.magFilter=a,this.minFilter=o,this.anisotropy=u,this.format=s,this.internalFormat=null,this.type=l,this.offset=new Me(0,0),this.repeat=new Me(1,1),this.center=new Me(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Ht,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,typeof c=="string"?this.colorSpace=c:(Sc("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===xc?dn:Ta),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];const n={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==iz)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case jr:e.x=e.x-Math.floor(e.x);break;case ti:e.x=e.x<0?0:1;break;case P0:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case jr:e.y=e.y-Math.floor(e.y);break;case ti:e.y=e.y<0?0:1;break;case P0:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return Sc("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===dn?xc:dz}set encoding(e){Sc("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===xc?dn:Ta}}mr.DEFAULT_IMAGE=null;mr.DEFAULT_MAPPING=iz;mr.DEFAULT_ANISOTROPY=1;class an{constructor(e=0,t=0,n=0,i=1){an.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=i}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,i){return this.x=e,this.y=t,this.z=n,this.w=i,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=e.w!==void 0?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,a=this.w,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*i+o[12]*a,this.y=o[1]*t+o[5]*n+o[9]*i+o[13]*a,this.z=o[2]*t+o[6]*n+o[10]*i+o[14]*a,this.w=o[3]*t+o[7]*n+o[11]*i+o[15]*a,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,i,a;const l=e.elements,u=l[0],c=l[4],h=l[8],f=l[1],d=l[5],p=l[9],g=l[2],v=l[6],m=l[10];if(Math.abs(c-f)<.01&&Math.abs(h-g)<.01&&Math.abs(p-v)<.01){if(Math.abs(c+f)<.1&&Math.abs(h+g)<.1&&Math.abs(p+v)<.1&&Math.abs(u+d+m-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const _=(u+1)/2,x=(d+1)/2,S=(m+1)/2,A=(c+f)/4,w=(h+g)/4,M=(p+v)/4;return _>x&&_>S?_<.01?(n=0,i=.707106781,a=.707106781):(n=Math.sqrt(_),i=A/n,a=w/n):x>S?x<.01?(n=.707106781,i=0,a=.707106781):(i=Math.sqrt(x),n=A/i,a=M/i):S<.01?(n=.707106781,i=.707106781,a=0):(a=Math.sqrt(S),n=w/a,i=M/a),this.set(n,i,a,t),this}let y=Math.sqrt((v-p)*(v-p)+(h-g)*(h-g)+(f-c)*(f-c));return Math.abs(y)<.001&&(y=1),this.x=(v-p)/y,this.y=(h-g)/y,this.z=(f-c)/y,this.w=Math.acos((u+d+m-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class aY extends Yc{constructor(e=1,t=1,n={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new an(0,0,e,t),this.scissorTest=!1,this.viewport=new an(0,0,e,t);const i={width:e,height:t,depth:1};n.encoding!==void 0&&(Sc("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===xc?dn:Ta),n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:lr,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},n),this.texture=new mr(i,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=n.generateMipmaps,this.texture.internalFormat=n.internalFormat,this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}setSize(e,t,n=1){(this.width!==e||this.height!==t||this.depth!==n)&&(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return new this.constructor().copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new mz(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,e.depthTexture!==null&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class kc extends aY{constructor(e=1,t=1,n={}){super(e,t,n),this.isWebGLRenderTarget=!0}}class yz extends mr{constructor(e=null,t=1,n=1,i=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=vr,this.minFilter=vr,this.wrapR=ti,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class oY extends mr{constructor(e=null,t=1,n=1,i=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:i},this.magFilter=vr,this.minFilter=vr,this.wrapR=ti,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ao{constructor(e=0,t=0,n=0,i=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=i}static slerpFlat(e,t,n,i,a,o,s){let l=n[i+0],u=n[i+1],c=n[i+2],h=n[i+3];const f=a[o+0],d=a[o+1],p=a[o+2],g=a[o+3];if(s===0){e[t+0]=l,e[t+1]=u,e[t+2]=c,e[t+3]=h;return}if(s===1){e[t+0]=f,e[t+1]=d,e[t+2]=p,e[t+3]=g;return}if(h!==g||l!==f||u!==d||c!==p){let v=1-s;const m=l*f+u*d+c*p+h*g,y=m>=0?1:-1,_=1-m*m;if(_>Number.EPSILON){const S=Math.sqrt(_),A=Math.atan2(S,m*y);v=Math.sin(v*A)/S,s=Math.sin(s*A)/S}const x=s*y;if(l=l*v+f*x,u=u*v+d*x,c=c*v+p*x,h=h*v+g*x,v===1-s){const S=1/Math.sqrt(l*l+u*u+c*c+h*h);l*=S,u*=S,c*=S,h*=S}}e[t]=l,e[t+1]=u,e[t+2]=c,e[t+3]=h}static multiplyQuaternionsFlat(e,t,n,i,a,o){const s=n[i],l=n[i+1],u=n[i+2],c=n[i+3],h=a[o],f=a[o+1],d=a[o+2],p=a[o+3];return e[t]=s*p+c*h+l*d-u*f,e[t+1]=l*p+c*f+u*h-s*d,e[t+2]=u*p+c*d+s*f-l*h,e[t+3]=c*p-s*h-l*f-u*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,i){return this._x=e,this._y=t,this._z=n,this._w=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t=!0){const n=e._x,i=e._y,a=e._z,o=e._order,s=Math.cos,l=Math.sin,u=s(n/2),c=s(i/2),h=s(a/2),f=l(n/2),d=l(i/2),p=l(a/2);switch(o){case"XYZ":this._x=f*c*h+u*d*p,this._y=u*d*h-f*c*p,this._z=u*c*p+f*d*h,this._w=u*c*h-f*d*p;break;case"YXZ":this._x=f*c*h+u*d*p,this._y=u*d*h-f*c*p,this._z=u*c*p-f*d*h,this._w=u*c*h+f*d*p;break;case"ZXY":this._x=f*c*h-u*d*p,this._y=u*d*h+f*c*p,this._z=u*c*p+f*d*h,this._w=u*c*h-f*d*p;break;case"ZYX":this._x=f*c*h-u*d*p,this._y=u*d*h+f*c*p,this._z=u*c*p-f*d*h,this._w=u*c*h+f*d*p;break;case"YZX":this._x=f*c*h+u*d*p,this._y=u*d*h+f*c*p,this._z=u*c*p-f*d*h,this._w=u*c*h-f*d*p;break;case"XZY":this._x=f*c*h-u*d*p,this._y=u*d*h-f*c*p,this._z=u*c*p+f*d*h,this._w=u*c*h+f*d*p;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,i=Math.sin(n);return this._x=e.x*i,this._y=e.y*i,this._z=e.z*i,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],i=t[4],a=t[8],o=t[1],s=t[5],l=t[9],u=t[2],c=t[6],h=t[10],f=n+s+h;if(f>0){const d=.5/Math.sqrt(f+1);this._w=.25/d,this._x=(c-l)*d,this._y=(a-u)*d,this._z=(o-i)*d}else if(n>s&&n>h){const d=2*Math.sqrt(1+n-s-h);this._w=(c-l)/d,this._x=.25*d,this._y=(i+o)/d,this._z=(a+u)/d}else if(s>h){const d=2*Math.sqrt(1+s-n-h);this._w=(a-u)/d,this._x=(i+o)/d,this._y=.25*d,this._z=(l+c)/d}else{const d=2*Math.sqrt(1+h-n-s);this._w=(o-i)/d,this._x=(a+u)/d,this._y=(l+c)/d,this._z=.25*d}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(this._x=e.y*t.z-e.z*t.y,this._y=e.z*t.x-e.x*t.z,this._z=e.x*t.y-e.y*t.x,this._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(hr(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(n===0)return this;const i=Math.min(1,t/n);return this.slerp(e,i),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}normalize(){let e=this.length();return e===0?(this._x=0,this._y=0,this._z=0,this._w=1):(e=1/e,this._x=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,i=e._y,a=e._z,o=e._w,s=t._x,l=t._y,u=t._z,c=t._w;return this._x=n*c+o*s+i*u-a*l,this._y=i*c+o*l+a*s-n*u,this._z=a*c+o*u+n*l-i*s,this._w=o*c-n*s-i*l-a*u,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const n=this._x,i=this._y,a=this._z,o=this._w;let s=o*e._w+n*e._x+i*e._y+a*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=o,this._x=n,this._y=i,this._z=a,this;const l=1-s*s;if(l<=Number.EPSILON){const d=1-t;return this._w=d*o+t*this._w,this._x=d*n+t*this._x,this._y=d*i+t*this._y,this._z=d*a+t*this._z,this.normalize(),this}const u=Math.sqrt(l),c=Math.atan2(u,s),h=Math.sin((1-t)*c)/u,f=Math.sin(t*c)/u;return this._w=o*h+this._w*f,this._x=n*h+this._x*f,this._y=i*h+this._y*f,this._z=a*h+this._z*f,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),i=2*Math.PI*Math.random(),a=2*Math.PI*Math.random();return this.set(t*Math.cos(i),n*Math.sin(a),n*Math.cos(a),t*Math.sin(i))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class X{constructor(e=0,t=0,n=0){X.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(xP.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(xP.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,i=this.z,a=e.elements;return this.x=a[0]*t+a[3]*n+a[6]*i,this.y=a[1]*t+a[4]*n+a[7]*i,this.z=a[2]*t+a[5]*n+a[8]*i,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,i=this.z,a=e.elements,o=1/(a[3]*t+a[7]*n+a[11]*i+a[15]);return this.x=(a[0]*t+a[4]*n+a[8]*i+a[12])*o,this.y=(a[1]*t+a[5]*n+a[9]*i+a[13])*o,this.z=(a[2]*t+a[6]*n+a[10]*i+a[14])*o,this}applyQuaternion(e){const t=this.x,n=this.y,i=this.z,a=e.x,o=e.y,s=e.z,l=e.w,u=2*(o*i-s*n),c=2*(s*t-a*i),h=2*(a*n-o*t);return this.x=t+l*u+o*h-s*c,this.y=n+l*c+s*u-a*h,this.z=i+l*h+a*c-o*u,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,i=this.z,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*i,this.y=a[1]*t+a[5]*n+a[9]*i,this.z=a[2]*t+a[6]*n+a[10]*i,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,i=e.y,a=e.z,o=t.x,s=t.y,l=t.z;return this.x=i*l-a*s,this.y=a*o-n*l,this.z=n*s-i*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return Dx.copy(this).projectOnVector(e),this.sub(Dx)}reflect(e){return this.sub(Dx.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(hr(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,i=this.z-e.z;return t*t+n*n+i*i}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const i=Math.sin(t)*e;return this.x=i*Math.sin(n),this.y=Math.cos(t)*e,this.z=i*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),i=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=i,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=(Math.random()-.5)*2,t=Math.random()*Math.PI*2,n=Math.sqrt(1-cu(e,2));return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Dx=new X,xP=new ao;class Oa{constructor(e=new X(1/0,1/0,1/0),t=new X(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(Va.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(Va.fromBufferAttribute(e,t));return this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Va.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return new this.constructor().copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(n!==void 0){const a=n.getAttribute("position");if(t===!0&&a!==void 0&&e.isInstancedMesh!==!0)for(let o=0,s=a.count;o<s;o++)e.isMesh===!0?e.getVertexPosition(o,Va):Va.fromBufferAttribute(a,o),Va.applyMatrix4(e.matrixWorld),this.expandByPoint(Va);else e.boundingBox!==void 0?(e.boundingBox===null&&e.computeBoundingBox(),Xg.copy(e.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),Xg.copy(n.boundingBox)),Xg.applyMatrix4(e.matrixWorld),this.union(Xg)}const i=e.children;for(let a=0,o=i.length;a<o;a++)this.expandByObject(i[a],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Va),Va.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Id),Yg.subVectors(this.max,Id),ch.subVectors(e.a,Id),hh.subVectors(e.b,Id),fh.subVectors(e.c,Id),Gs.subVectors(hh,ch),Hs.subVectors(fh,hh),du.subVectors(ch,fh);let t=[0,-Gs.z,Gs.y,0,-Hs.z,Hs.y,0,-du.z,du.y,Gs.z,0,-Gs.x,Hs.z,0,-Hs.x,du.z,0,-du.x,-Gs.y,Gs.x,0,-Hs.y,Hs.x,0,-du.y,du.x,0];return!Ix(t,ch,hh,fh,Yg)||(t=[1,0,0,0,1,0,0,0,1],!Ix(t,ch,hh,fh,Yg))?!1:(qg.crossVectors(Gs,Hs),t=[qg.x,qg.y,qg.z],Ix(t,ch,hh,fh,Yg))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Va).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Va).length()*.5),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()?this:(ns[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ns[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ns[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ns[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ns[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ns[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ns[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ns[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ns),this)}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const ns=[new X,new X,new X,new X,new X,new X,new X,new X],Va=new X,Xg=new Oa,ch=new X,hh=new X,fh=new X,Gs=new X,Hs=new X,du=new X,Id=new X,Yg=new X,qg=new X,pu=new X;function Ix(r,e,t,n,i){for(let a=0,o=r.length-3;a<=o;a+=3){pu.fromArray(r,a);const s=i.x*Math.abs(pu.x)+i.y*Math.abs(pu.y)+i.z*Math.abs(pu.z),l=e.dot(pu),u=t.dot(pu),c=n.dot(pu);if(Math.max(-Math.max(l,u,c),Math.min(l,u,c))>s)return!1}return!0}const sY=new Oa,Nd=new X,Nx=new X;class Fa{constructor(e=new X,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;t!==void 0?n.copy(t):sY.setFromPoints(e).getCenter(n);let i=0;for(let a=0,o=e.length;a<o;a++)i=Math.max(i,n.distanceToSquared(e[a]));return this.radius=Math.sqrt(i),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Nd.subVectors(e,this.center);const t=Nd.lengthSq();if(t>this.radius*this.radius){const n=Math.sqrt(t),i=(n-this.radius)*.5;this.center.addScaledVector(Nd,i/n),this.radius+=i}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(Nx.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Nd.copy(e.center).add(Nx)),this.expandByPoint(Nd.copy(e.center).sub(Nx))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const rs=new X,kx=new X,jg=new X,Ws=new X,Ox=new X,Kg=new X,Fx=new X;class sd{constructor(e=new X,t=new X(0,0,-1)){this.origin=e,this.direction=t}set(e,t){return this.origin.copy(e),this.direction.copy(t),this}copy(e){return this.origin.copy(e.origin),this.direction.copy(e.direction),this}at(e,t){return t.copy(this.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,rs)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=rs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(rs.copy(this.origin).addScaledVector(this.direction,t),rs.distanceToSquared(e))}distanceSqToSegment(e,t,n,i){kx.copy(e).add(t).multiplyScalar(.5),jg.copy(t).sub(e).normalize(),Ws.copy(this.origin).sub(kx);const a=e.distanceTo(t)*.5,o=-this.direction.dot(jg),s=Ws.dot(this.direction),l=-Ws.dot(jg),u=Ws.lengthSq(),c=Math.abs(1-o*o);let h,f,d,p;if(c>0)if(h=o*l-s,f=o*s-l,p=a*c,h>=0)if(f>=-p)if(f<=p){const g=1/c;h*=g,f*=g,d=h*(h+o*f+2*s)+f*(o*h+f+2*l)+u}else f=a,h=Math.max(0,-(o*f+s)),d=-h*h+f*(f+2*l)+u;else f=-a,h=Math.max(0,-(o*f+s)),d=-h*h+f*(f+2*l)+u;else f<=-p?(h=Math.max(0,-(-o*a+s)),f=h>0?-a:Math.min(Math.max(-a,-l),a),d=-h*h+f*(f+2*l)+u):f<=p?(h=0,f=Math.min(Math.max(-a,-l),a),d=f*(f+2*l)+u):(h=Math.max(0,-(o*a+s)),f=h>0?a:Math.min(Math.max(-a,-l),a),d=-h*h+f*(f+2*l)+u);else f=o>0?-a:a,h=Math.max(0,-(o*f+s)),d=-h*h+f*(f+2*l)+u;return n&&n.copy(this.origin).addScaledVector(this.direction,h),i&&i.copy(kx).addScaledVector(jg,f),d}intersectSphere(e,t){rs.subVectors(e.center,this.origin);const n=rs.dot(this.direction),i=rs.dot(rs)-n*n,a=e.radius*e.radius;if(i>a)return null;const o=Math.sqrt(a-i),s=n-o,l=n+o;return l<0?null:s<0?this.at(l,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,i,a,o,s,l;const u=1/this.direction.x,c=1/this.direction.y,h=1/this.direction.z,f=this.origin;return u>=0?(n=(e.min.x-f.x)*u,i=(e.max.x-f.x)*u):(n=(e.max.x-f.x)*u,i=(e.min.x-f.x)*u),c>=0?(a=(e.min.y-f.y)*c,o=(e.max.y-f.y)*c):(a=(e.max.y-f.y)*c,o=(e.min.y-f.y)*c),n>o||a>i||((a>n||isNaN(n))&&(n=a),(o<i||isNaN(i))&&(i=o),h>=0?(s=(e.min.z-f.z)*h,l=(e.max.z-f.z)*h):(s=(e.max.z-f.z)*h,l=(e.min.z-f.z)*h),n>l||s>i)||((s>n||n!==n)&&(n=s),(l<i||i!==i)&&(i=l),i<0)?null:this.at(n>=0?n:i,t)}intersectsBox(e){return this.intersectBox(e,rs)!==null}intersectTriangle(e,t,n,i,a){Ox.subVectors(t,e),Kg.subVectors(n,e),Fx.crossVectors(Ox,Kg);let o=this.direction.dot(Fx),s;if(o>0){if(i)return null;s=1}else if(o<0)s=-1,o=-o;else return null;Ws.subVectors(this.origin,e);const l=s*this.direction.dot(Kg.crossVectors(Ws,Kg));if(l<0)return null;const u=s*this.direction.dot(Ox.cross(Ws));if(u<0||l+u>o)return null;const c=-s*Ws.dot(Fx);return c<0?null:this.at(c/o,a)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class Mt{constructor(e,t,n,i,a,o,s,l,u,c,h,f,d,p,g,v){Mt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,n,i,a,o,s,l,u,c,h,f,d,p,g,v)}set(e,t,n,i,a,o,s,l,u,c,h,f,d,p,g,v){const m=this.elements;return m[0]=e,m[4]=t,m[8]=n,m[12]=i,m[1]=a,m[5]=o,m[9]=s,m[13]=l,m[2]=u,m[6]=c,m[10]=h,m[14]=f,m[3]=d,m[7]=p,m[11]=g,m[15]=v,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return new Mt().fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,i=1/dh.setFromMatrixColumn(e,0).length(),a=1/dh.setFromMatrixColumn(e,1).length(),o=1/dh.setFromMatrixColumn(e,2).length();return t[0]=n[0]*i,t[1]=n[1]*i,t[2]=n[2]*i,t[3]=0,t[4]=n[4]*a,t[5]=n[5]*a,t[6]=n[6]*a,t[7]=0,t[8]=n[8]*o,t[9]=n[9]*o,t[10]=n[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,i=e.y,a=e.z,o=Math.cos(n),s=Math.sin(n),l=Math.cos(i),u=Math.sin(i),c=Math.cos(a),h=Math.sin(a);if(e.order==="XYZ"){const f=o*c,d=o*h,p=s*c,g=s*h;t[0]=l*c,t[4]=-l*h,t[8]=u,t[1]=d+p*u,t[5]=f-g*u,t[9]=-s*l,t[2]=g-f*u,t[6]=p+d*u,t[10]=o*l}else if(e.order==="YXZ"){const f=l*c,d=l*h,p=u*c,g=u*h;t[0]=f+g*s,t[4]=p*s-d,t[8]=o*u,t[1]=o*h,t[5]=o*c,t[9]=-s,t[2]=d*s-p,t[6]=g+f*s,t[10]=o*l}else if(e.order==="ZXY"){const f=l*c,d=l*h,p=u*c,g=u*h;t[0]=f-g*s,t[4]=-o*h,t[8]=p+d*s,t[1]=d+p*s,t[5]=o*c,t[9]=g-f*s,t[2]=-o*u,t[6]=s,t[10]=o*l}else if(e.order==="ZYX"){const f=o*c,d=o*h,p=s*c,g=s*h;t[0]=l*c,t[4]=p*u-d,t[8]=f*u+g,t[1]=l*h,t[5]=g*u+f,t[9]=d*u-p,t[2]=-u,t[6]=s*l,t[10]=o*l}else if(e.order==="YZX"){const f=o*l,d=o*u,p=s*l,g=s*u;t[0]=l*c,t[4]=g-f*h,t[8]=p*h+d,t[1]=h,t[5]=o*c,t[9]=-s*c,t[2]=-u*c,t[6]=d*h+p,t[10]=f-g*h}else if(e.order==="XZY"){const f=o*l,d=o*u,p=s*l,g=s*u;t[0]=l*c,t[4]=-h,t[8]=u*c,t[1]=f*h+g,t[5]=o*c,t[9]=d*h-p,t[2]=p*h-d,t[6]=s*c,t[10]=g*h+f}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(lY,e,uY)}lookAt(e,t,n){const i=this.elements;return Gi.subVectors(e,t),Gi.lengthSq()===0&&(Gi.z=1),Gi.normalize(),$s.crossVectors(n,Gi),$s.lengthSq()===0&&(Math.abs(n.z)===1?Gi.x+=1e-4:Gi.z+=1e-4,Gi.normalize(),$s.crossVectors(n,Gi)),$s.normalize(),Zg.crossVectors(Gi,$s),i[0]=$s.x,i[4]=Zg.x,i[8]=Gi.x,i[1]=$s.y,i[5]=Zg.y,i[9]=Gi.y,i[2]=$s.z,i[6]=Zg.z,i[10]=Gi.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,i=t.elements,a=this.elements,o=n[0],s=n[4],l=n[8],u=n[12],c=n[1],h=n[5],f=n[9],d=n[13],p=n[2],g=n[6],v=n[10],m=n[14],y=n[3],_=n[7],x=n[11],S=n[15],A=i[0],w=i[4],M=i[8],C=i[12],b=i[1],T=i[5],P=i[9],D=i[13],L=i[2],E=i[6],I=i[10],N=i[14],R=i[3],F=i[7],O=i[11],V=i[15];return a[0]=o*A+s*b+l*L+u*R,a[4]=o*w+s*T+l*E+u*F,a[8]=o*M+s*P+l*I+u*O,a[12]=o*C+s*D+l*N+u*V,a[1]=c*A+h*b+f*L+d*R,a[5]=c*w+h*T+f*E+d*F,a[9]=c*M+h*P+f*I+d*O,a[13]=c*C+h*D+f*N+d*V,a[2]=p*A+g*b+v*L+m*R,a[6]=p*w+g*T+v*E+m*F,a[10]=p*M+g*P+v*I+m*O,a[14]=p*C+g*D+v*N+m*V,a[3]=y*A+_*b+x*L+S*R,a[7]=y*w+_*T+x*E+S*F,a[11]=y*M+_*P+x*I+S*O,a[15]=y*C+_*D+x*N+S*V,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],n=e[4],i=e[8],a=e[12],o=e[1],s=e[5],l=e[9],u=e[13],c=e[2],h=e[6],f=e[10],d=e[14],p=e[3],g=e[7],v=e[11],m=e[15];return p*(+a*l*h-i*u*h-a*s*f+n*u*f+i*s*d-n*l*d)+g*(+t*l*d-t*u*f+a*o*f-i*o*d+i*u*c-a*l*c)+v*(+t*u*h-t*s*d-a*o*h+n*o*d+a*s*c-n*u*c)+m*(-i*s*c-t*l*h+t*s*f+i*o*h-n*o*f+n*l*c)}transpose(){const e=this.elements;let t;return t=e[1],e[1]=e[4],e[4]=t,t=e[2],e[2]=e[8],e[8]=t,t=e[6],e[6]=e[9],e[9]=t,t=e[3],e[3]=e[12],e[12]=t,t=e[7],e[7]=e[13],e[13]=t,t=e[11],e[11]=e[14],e[14]=t,this}setPosition(e,t,n){const i=this.elements;return e.isVector3?(i[12]=e.x,i[13]=e.y,i[14]=e.z):(i[12]=e,i[13]=t,i[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],i=e[2],a=e[3],o=e[4],s=e[5],l=e[6],u=e[7],c=e[8],h=e[9],f=e[10],d=e[11],p=e[12],g=e[13],v=e[14],m=e[15],y=h*v*u-g*f*u+g*l*d-s*v*d-h*l*m+s*f*m,_=p*f*u-c*v*u-p*l*d+o*v*d+c*l*m-o*f*m,x=c*g*u-p*h*u+p*s*d-o*g*d-c*s*m+o*h*m,S=p*h*l-c*g*l-p*s*f+o*g*f+c*s*v-o*h*v,A=t*y+n*_+i*x+a*S;if(A===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/A;return e[0]=y*w,e[1]=(g*f*a-h*v*a-g*i*d+n*v*d+h*i*m-n*f*m)*w,e[2]=(s*v*a-g*l*a+g*i*u-n*v*u-s*i*m+n*l*m)*w,e[3]=(h*l*a-s*f*a-h*i*u+n*f*u+s*i*d-n*l*d)*w,e[4]=_*w,e[5]=(c*v*a-p*f*a+p*i*d-t*v*d-c*i*m+t*f*m)*w,e[6]=(p*l*a-o*v*a-p*i*u+t*v*u+o*i*m-t*l*m)*w,e[7]=(o*f*a-c*l*a+c*i*u-t*f*u-o*i*d+t*l*d)*w,e[8]=x*w,e[9]=(p*h*a-c*g*a-p*n*d+t*g*d+c*n*m-t*h*m)*w,e[10]=(o*g*a-p*s*a+p*n*u-t*g*u-o*n*m+t*s*m)*w,e[11]=(c*s*a-o*h*a-c*n*u+t*h*u+o*n*d-t*s*d)*w,e[12]=S*w,e[13]=(c*g*i-p*h*i+p*n*f-t*g*f-c*n*v+t*h*v)*w,e[14]=(p*s*i-o*g*i-p*n*l+t*g*l+o*n*v-t*s*v)*w,e[15]=(o*h*i-c*s*i+c*n*l-t*h*l-o*n*f+t*s*f)*w,this}scale(e){const t=this.elements,n=e.x,i=e.y,a=e.z;return t[0]*=n,t[4]*=i,t[8]*=a,t[1]*=n,t[5]*=i,t[9]*=a,t[2]*=n,t[6]*=i,t[10]*=a,t[3]*=n,t[7]*=i,t[11]*=a,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],i=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,i))}makeTranslation(e,t,n){return e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),i=Math.sin(t),a=1-n,o=e.x,s=e.y,l=e.z,u=a*o,c=a*s;return this.set(u*o+n,u*s-i*l,u*l+i*s,0,u*s+i*l,c*s+n,c*l-i*o,0,u*l-i*s,c*l+i*o,a*l*l+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,i,a,o){return this.set(1,n,a,0,e,1,o,0,t,i,1,0,0,0,0,1),this}compose(e,t,n){const i=this.elements,a=t._x,o=t._y,s=t._z,l=t._w,u=a+a,c=o+o,h=s+s,f=a*u,d=a*c,p=a*h,g=o*c,v=o*h,m=s*h,y=l*u,_=l*c,x=l*h,S=n.x,A=n.y,w=n.z;return i[0]=(1-(g+m))*S,i[1]=(d+x)*S,i[2]=(p-_)*S,i[3]=0,i[4]=(d-x)*A,i[5]=(1-(f+m))*A,i[6]=(v+y)*A,i[7]=0,i[8]=(p+_)*w,i[9]=(v-y)*w,i[10]=(1-(f+g))*w,i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this}decompose(e,t,n){const i=this.elements;let a=dh.set(i[0],i[1],i[2]).length();const o=dh.set(i[4],i[5],i[6]).length(),s=dh.set(i[8],i[9],i[10]).length();this.determinant()<0&&(a=-a),e.x=i[12],e.y=i[13],e.z=i[14],Ga.copy(this);const u=1/a,c=1/o,h=1/s;return Ga.elements[0]*=u,Ga.elements[1]*=u,Ga.elements[2]*=u,Ga.elements[4]*=c,Ga.elements[5]*=c,Ga.elements[6]*=c,Ga.elements[8]*=h,Ga.elements[9]*=h,Ga.elements[10]*=h,t.setFromRotationMatrix(Ga),n.x=a,n.y=o,n.z=s,this}makePerspective(e,t,n,i,a,o,s=ms){const l=this.elements,u=2*a/(t-e),c=2*a/(n-i),h=(t+e)/(t-e),f=(n+i)/(n-i);let d,p;if(s===ms)d=-(o+a)/(o-a),p=-2*o*a/(o-a);else if(s===N0)d=-o/(o-a),p=-o*a/(o-a);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=u,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=c,l[9]=f,l[13]=0,l[2]=0,l[6]=0,l[10]=d,l[14]=p,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,n,i,a,o,s=ms){const l=this.elements,u=1/(t-e),c=1/(n-i),h=1/(o-a),f=(t+e)*u,d=(n+i)*c;let p,g;if(s===ms)p=(o+a)*h,g=-2*h;else if(s===N0)p=a*h,g=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*u,l[4]=0,l[8]=0,l[12]=-f,l[1]=0,l[5]=2*c,l[9]=0,l[13]=-d,l[2]=0,l[6]=0,l[10]=g,l[14]=-p,l[3]=0,l[7]=0,l[11]=0,l[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let i=0;i<16;i++)if(t[i]!==n[i])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const dh=new X,Ga=new Mt,lY=new X(0,0,0),uY=new X(1,1,1),$s=new X,Zg=new X,Gi=new X,SP=new Mt,AP=new ao;class J_{constructor(e=0,t=0,n=0,i=J_.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=i}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,i=this._order){return this._x=e,this._y=t,this._z=n,this._order=i,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const i=e.elements,a=i[0],o=i[4],s=i[8],l=i[1],u=i[5],c=i[9],h=i[2],f=i[6],d=i[10];switch(t){case"XYZ":this._y=Math.asin(hr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-o,a)):(this._x=Math.atan2(f,u),this._z=0);break;case"YXZ":this._x=Math.asin(-hr(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(l,u)):(this._y=Math.atan2(-h,a),this._z=0);break;case"ZXY":this._x=Math.asin(hr(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-h,d),this._z=Math.atan2(-o,u)):(this._y=0,this._z=Math.atan2(l,a));break;case"ZYX":this._y=Math.asin(-hr(h,-1,1)),Math.abs(h)<.9999999?(this._x=Math.atan2(f,d),this._z=Math.atan2(l,a)):(this._x=0,this._z=Math.atan2(-o,u));break;case"YZX":this._z=Math.asin(hr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-c,u),this._y=Math.atan2(-h,a)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-hr(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(f,u),this._y=Math.atan2(s,a)):(this._x=Math.atan2(-c,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return SP.makeRotationFromQuaternion(e),this.setFromRotationMatrix(SP,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return AP.setFromEuler(this),this.setFromQuaternion(AP,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}J_.DEFAULT_ORDER="XYZ";class lC{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return(this.mask&e.mask)!==0}isEnabled(e){return(this.mask&(1<<e|0))!==0}}let cY=0;const wP=new X,ph=new ao,is=new Mt,Qg=new X,kd=new X,hY=new X,fY=new ao,bP=new X(1,0,0),TP=new X(0,1,0),MP=new X(0,0,1),dY={type:"added"},pY={type:"removed"};class bn extends Yc{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:cY++}),this.uuid=Ra(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=bn.DEFAULT_UP.clone();const e=new X,t=new J_,n=new ao,i=new X(1,1,1);function a(){n.setFromEuler(t,!1)}function o(){t.setFromQuaternion(n,void 0,!1)}t._onChange(a),n._onChange(o),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:i},modelViewMatrix:{value:new Mt},normalMatrix:{value:new Ht}}),this.matrix=new Mt,this.matrixWorld=new Mt,this.matrixAutoUpdate=bn.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=bn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new lC,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return ph.setFromAxisAngle(e,t),this.quaternion.multiply(ph),this}rotateOnWorldAxis(e,t){return ph.setFromAxisAngle(e,t),this.quaternion.premultiply(ph),this}rotateX(e){return this.rotateOnAxis(bP,e)}rotateY(e){return this.rotateOnAxis(TP,e)}rotateZ(e){return this.rotateOnAxis(MP,e)}translateOnAxis(e,t){return wP.copy(e).applyQuaternion(this.quaternion),this.position.add(wP.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(bP,e)}translateY(e){return this.translateOnAxis(TP,e)}translateZ(e){return this.translateOnAxis(MP,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(is.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?Qg.copy(e):Qg.set(e,t,n);const i=this.parent;this.updateWorldMatrix(!0,!1),kd.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?is.lookAt(kd,Qg,this.up):is.lookAt(Qg,kd,this.up),this.quaternion.setFromRotationMatrix(is),i&&(is.extractRotation(i.matrixWorld),ph.setFromRotationMatrix(is),this.quaternion.premultiply(ph.invert()))}add(e){if(arguments.length>1){for(let t=0;t<arguments.length;t++)this.add(arguments[t]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.parent!==null&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(dY)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.remove(arguments[n]);return this}const t=this.children.indexOf(e);return t!==-1&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(pY)),this}removeFromParent(){const e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),is.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),is.multiply(e.parent.matrixWorld)),e.applyMatrix4(is),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,i=this.children.length;n<i;n++){const o=this.children[n].getObjectByProperty(e,t);if(o!==void 0)return o}}getObjectsByProperty(e,t,n=[]){this[e]===t&&n.push(this);const i=this.children;for(let a=0,o=i.length;a<o;a++)i[a].getObjectsByProperty(e,t,n);return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kd,e,hY),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(kd,fY,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);const t=this.children;for(let n=0,i=t.length;n<i;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;t!==null&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,i=t.length;n<i;n++){const a=t[n];(a.matrixWorldAutoUpdate===!0||e===!0)&&a.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(e===!0&&n!==null&&n.matrixWorldAutoUpdate===!0&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),t===!0){const i=this.children;for(let a=0,o=i.length;a<o;a++){const s=i[a];s.matrixWorldAutoUpdate===!0&&s.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=e===void 0||typeof e=="string",n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});const i={};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.castShadow===!0&&(i.castShadow=!0),this.receiveShadow===!0&&(i.receiveShadow=!0),this.visible===!1&&(i.visible=!1),this.frustumCulled===!1&&(i.frustumCulled=!1),this.renderOrder!==0&&(i.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(i.userData=this.userData),i.layers=this.layers.mask,i.matrix=this.matrix.toArray(),i.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(i.matrixAutoUpdate=!1),this.isInstancedMesh&&(i.type="InstancedMesh",i.count=this.count,i.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(i.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(i.type="BatchedMesh",i.perObjectFrustumCulled=this.perObjectFrustumCulled,i.sortObjects=this.sortObjects,i.drawRanges=this._drawRanges,i.reservedRanges=this._reservedRanges,i.visibility=this._visibility,i.active=this._active,i.bounds=this._bounds.map(s=>({boxInitialized:s.boxInitialized,boxMin:s.box.min.toArray(),boxMax:s.box.max.toArray(),sphereInitialized:s.sphereInitialized,sphereRadius:s.sphere.radius,sphereCenter:s.sphere.center.toArray()})),i.maxGeometryCount=this._maxGeometryCount,i.maxVertexCount=this._maxVertexCount,i.maxIndexCount=this._maxIndexCount,i.geometryInitialized=this._geometryInitialized,i.geometryCount=this._geometryCount,i.matricesTexture=this._matricesTexture.toJSON(e),this.boundingSphere!==null&&(i.boundingSphere={center:i.boundingSphere.center.toArray(),radius:i.boundingSphere.radius}),this.boundingBox!==null&&(i.boundingBox={min:i.boundingBox.min.toArray(),max:i.boundingBox.max.toArray()}));function a(s,l){return s[l.uuid]===void 0&&(s[l.uuid]=l.toJSON(e)),l.uuid}if(this.isScene)this.background&&(this.background.isColor?i.background=this.background.toJSON():this.background.isTexture&&(i.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(i.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){i.geometry=a(e.geometries,this.geometry);const s=this.geometry.parameters;if(s!==void 0&&s.shapes!==void 0){const l=s.shapes;if(Array.isArray(l))for(let u=0,c=l.length;u<c;u++){const h=l[u];a(e.shapes,h)}else a(e.shapes,l)}}if(this.isSkinnedMesh&&(i.bindMode=this.bindMode,i.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(e.skeletons,this.skeleton),i.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){const s=[];for(let l=0,u=this.material.length;l<u;l++)s.push(a(e.materials,this.material[l]));i.material=s}else i.material=a(e.materials,this.material);if(this.children.length>0){i.children=[];for(let s=0;s<this.children.length;s++)i.children.push(this.children[s].toJSON(e).object)}if(this.animations.length>0){i.animations=[];for(let s=0;s<this.animations.length;s++){const l=this.animations[s];i.animations.push(a(e.animations,l))}}if(t){const s=o(e.geometries),l=o(e.materials),u=o(e.textures),c=o(e.images),h=o(e.shapes),f=o(e.skeletons),d=o(e.animations),p=o(e.nodes);s.length>0&&(n.geometries=s),l.length>0&&(n.materials=l),u.length>0&&(n.textures=u),c.length>0&&(n.images=c),h.length>0&&(n.shapes=h),f.length>0&&(n.skeletons=f),d.length>0&&(n.animations=d),p.length>0&&(n.nodes=p)}return n.object=i,n;function o(s){const l=[];for(const u in s){const c=s[u];delete c.metadata,l.push(c)}return l}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n<e.children.length;n++){const i=e.children[n];this.add(i.clone())}return this}}bn.DEFAULT_UP=new X(0,1,0);bn.DEFAULT_MATRIX_AUTO_UPDATE=!0;bn.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Ha=new X,as=new X,Bx=new X,os=new X,vh=new X,gh=new X,CP=new X,zx=new X,Ux=new X,Vx=new X;let Tp=class Jh{constructor(e=new X,t=new X,n=new X){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,i){i.subVectors(n,t),Ha.subVectors(e,t),i.cross(Ha);const a=i.lengthSq();return a>0?i.multiplyScalar(1/Math.sqrt(a)):i.set(0,0,0)}static getBarycoord(e,t,n,i,a){Ha.subVectors(i,t),as.subVectors(n,t),Bx.subVectors(e,t);const o=Ha.dot(Ha),s=Ha.dot(as),l=Ha.dot(Bx),u=as.dot(as),c=as.dot(Bx),h=o*u-s*s;if(h===0)return a.set(0,0,0),null;const f=1/h,d=(u*l-s*c)*f,p=(o*c-s*l)*f;return a.set(1-d-p,p,d)}static containsPoint(e,t,n,i){return this.getBarycoord(e,t,n,i,os)===null?!1:os.x>=0&&os.y>=0&&os.x+os.y<=1}static getInterpolation(e,t,n,i,a,o,s,l){return this.getBarycoord(e,t,n,i,os)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(a,os.x),l.addScaledVector(o,os.y),l.addScaledVector(s,os.z),l)}static isFrontFacing(e,t,n,i){return Ha.subVectors(n,t),as.subVectors(e,t),Ha.cross(as).dot(i)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,i){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[i]),this}setFromAttributeAndIndices(e,t,n,i){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,i),this}clone(){return new this.constructor().copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return Ha.subVectors(this.c,this.b),as.subVectors(this.a,this.b),Ha.cross(as).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Jh.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Jh.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,n,i,a){return Jh.getInterpolation(e,this.a,this.b,this.c,t,n,i,a)}containsPoint(e){return Jh.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Jh.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,i=this.b,a=this.c;let o,s;vh.subVectors(i,n),gh.subVectors(a,n),zx.subVectors(e,n);const l=vh.dot(zx),u=gh.dot(zx);if(l<=0&&u<=0)return t.copy(n);Ux.subVectors(e,i);const c=vh.dot(Ux),h=gh.dot(Ux);if(c>=0&&h<=c)return t.copy(i);const f=l*h-c*u;if(f<=0&&l>=0&&c<=0)return o=l/(l-c),t.copy(n).addScaledVector(vh,o);Vx.subVectors(e,a);const d=vh.dot(Vx),p=gh.dot(Vx);if(p>=0&&d<=p)return t.copy(a);const g=d*u-l*p;if(g<=0&&u>=0&&p<=0)return s=u/(u-p),t.copy(n).addScaledVector(gh,s);const v=c*p-d*h;if(v<=0&&h-c>=0&&d-p>=0)return CP.subVectors(a,i),s=(h-c)/(h-c+(d-p)),t.copy(i).addScaledVector(CP,s);const m=1/(v+g+f);return o=g*m,s=f*m,t.copy(n).addScaledVector(vh,o).addScaledVector(gh,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}};const _z={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Xs={h:0,s:0,l:0},Jg={h:0,s:0,l:0};function Gx(r,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?r+(e-r)*6*t:t<1/2?e:t<2/3?r+(e-r)*6*(2/3-t):r}class nt{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(t===void 0&&n===void 0){const i=e;i&&i.isColor?this.copy(i):typeof i=="number"?this.setHex(i):typeof i=="string"&&this.setStyle(i)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=dn){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,ln.toWorkingColorSpace(this,t),this}setRGB(e,t,n,i=ln.workingColorSpace){return this.r=e,this.g=t,this.b=n,ln.toWorkingColorSpace(this,i),this}setHSL(e,t,n,i=ln.workingColorSpace){if(e=oC(e,1),t=hr(t,0,1),n=hr(n,0,1),t===0)this.r=this.g=this.b=n;else{const a=n<=.5?n*(1+t):n+t-n*t,o=2*n-a;this.r=Gx(o,a,e+1/3),this.g=Gx(o,a,e),this.b=Gx(o,a,e-1/3)}return ln.toWorkingColorSpace(this,i),this}setStyle(e,t=dn){function n(a){a!==void 0&&parseFloat(a)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let i;if(i=/^(\w+)\(([^\)]*)\)/.exec(e)){let a;const o=i[1],s=i[2];switch(o){case"rgb":case"rgba":if(a=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(a[4]),this.setRGB(Math.min(255,parseInt(a[1],10))/255,Math.min(255,parseInt(a[2],10))/255,Math.min(255,parseInt(a[3],10))/255,t);if(a=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(a[4]),this.setRGB(Math.min(100,parseInt(a[1],10))/100,Math.min(100,parseInt(a[2],10))/100,Math.min(100,parseInt(a[3],10))/100,t);break;case"hsl":case"hsla":if(a=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(a[4]),this.setHSL(parseFloat(a[1])/360,parseFloat(a[2])/100,parseFloat(a[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(i=/^\#([A-Fa-f\d]+)$/.exec(e)){const a=i[1],o=a.length;if(o===3)return this.setRGB(parseInt(a.charAt(0),16)/15,parseInt(a.charAt(1),16)/15,parseInt(a.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(a,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=dn){const n=_z[e.toLowerCase()];return n!==void 0?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Af(e.r),this.g=Af(e.g),this.b=Af(e.b),this}copyLinearToSRGB(e){return this.r=Px(e.r),this.g=Px(e.g),this.b=Px(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=dn){return ln.fromWorkingColorSpace(Hr.copy(this),e),Math.round(hr(Hr.r*255,0,255))*65536+Math.round(hr(Hr.g*255,0,255))*256+Math.round(hr(Hr.b*255,0,255))}getHexString(e=dn){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ln.workingColorSpace){ln.fromWorkingColorSpace(Hr.copy(this),t);const n=Hr.r,i=Hr.g,a=Hr.b,o=Math.max(n,i,a),s=Math.min(n,i,a);let l,u;const c=(s+o)/2;if(s===o)l=0,u=0;else{const h=o-s;switch(u=c<=.5?h/(o+s):h/(2-o-s),o){case n:l=(i-a)/h+(i<a?6:0);break;case i:l=(a-n)/h+2;break;case a:l=(n-i)/h+4;break}l/=6}return e.h=l,e.s=u,e.l=c,e}getRGB(e,t=ln.workingColorSpace){return ln.fromWorkingColorSpace(Hr.copy(this),t),e.r=Hr.r,e.g=Hr.g,e.b=Hr.b,e}getStyle(e=dn){ln.fromWorkingColorSpace(Hr.copy(this),e);const t=Hr.r,n=Hr.g,i=Hr.b;return e!==dn?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${i.toFixed(3)})`:`rgb(${Math.round(t*255)},${Math.round(n*255)},${Math.round(i*255)})`}offsetHSL(e,t,n){return this.getHSL(Xs),this.setHSL(Xs.h+e,Xs.s+t,Xs.l+n)}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Xs),e.getHSL(Jg);const n=Yp(Xs.h,Jg.h,t),i=Yp(Xs.s,Jg.s,t),a=Yp(Xs.l,Jg.l,t);return this.setHSL(n,i,a),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,i=this.b,a=e.elements;return this.r=a[0]*t+a[3]*n+a[6]*i,this.g=a[1]*t+a[4]*n+a[7]*i,this.b=a[2]*t+a[5]*n+a[8]*i,this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Hr=new nt;nt.NAMES=_z;let vY=0;class Da extends Yc{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:vY++}),this.uuid=Ra(),this.name="",this.type="Material",this.blending=mc,this.side=Es,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=pb,this.blendDst=vb,this.blendEquation=vl,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new nt(0,0,0),this.blendAlpha=0,this.depthFunc=L0,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=pP,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=lh,this.stencilZFail=lh,this.stencilZPass=lh,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const n=e[t];if(n===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const i=this[t];if(i===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}i&&i.isColor?i.set(n):i&&i.isVector3&&n&&n.isVector3?i.copy(n):this[t]=n}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==mc&&(n.blending=this.blending),this.side!==Es&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==pb&&(n.blendSrc=this.blendSrc),this.blendDst!==vb&&(n.blendDst=this.blendDst),this.blendEquation!==vl&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==L0&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==pP&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==lh&&(n.stencilFail=this.stencilFail),this.stencilZFail!==lh&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==lh&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function i(a){const o=[];for(const s in a){const l=a[s];delete l.metadata,o.push(l)}return o}if(t){const a=i(e.textures),o=i(e.images);a.length>0&&(n.textures=a),o.length>0&&(n.images=o)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(t!==null){const i=t.length;n=new Array(i);for(let a=0;a!==i;++a)n[a]=t[a].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){e===!0&&this.version++}}class Pn extends Da{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new nt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=nC,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const ar=new X,em=new Me;class Gn{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=e!==void 0?e.length/t:0,this.normalized=n,this.usage=xb,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ro,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Sc("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this.gpuType=e.gpuType,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let i=0,a=this.itemSize;i<a;i++)this.array[e+i]=t.array[n+i];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(this.itemSize===2)for(let t=0,n=this.count;t<n;t++)em.fromBufferAttribute(this,t),em.applyMatrix3(e),this.setXY(t,em.x,em.y);else if(this.itemSize===3)for(let t=0,n=this.count;t<n;t++)ar.fromBufferAttribute(this,t),ar.applyMatrix3(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)ar.fromBufferAttribute(this,t),ar.applyMatrix4(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ar.fromBufferAttribute(this,t),ar.applyNormalMatrix(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ar.fromBufferAttribute(this,t),ar.transformDirection(e),this.setXYZ(t,ar.x,ar.y,ar.z);return this}set(e,t=0){return this.array.set(e,t),this}getComponent(e,t){let n=this.array[e*this.itemSize+t];return this.normalized&&(n=Ka(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=cn(n,this.array)),this.array[e*this.itemSize+t]=n,this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Ka(t,this.array)),t}setX(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Ka(t,this.array)),t}setY(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Ka(t,this.array)),t}setZ(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Ka(t,this.array)),t}setW(e,t){return this.normalized&&(t=cn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),n=cn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,i){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),n=cn(n,this.array),i=cn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this}setXYZW(e,t,n,i,a){return e*=this.itemSize,this.normalized&&(t=cn(t,this.array),n=cn(n,this.array),i=cn(i,this.array),a=cn(a,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=i,this.array[e+3]=a,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(e.name=this.name),this.usage!==xb&&(e.usage=this.usage),e}}class xz extends Gn{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Sz extends Gn{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Nn extends Gn{constructor(e,t,n){super(new Float32Array(e),t,n)}}let gY=0;const sa=new Mt,Hx=new bn,mh=new X,Hi=new Oa,Od=new Oa,br=new X;class wn extends Yc{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:gY++}),this.uuid=Ra(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(vz(e)?Sz:xz)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return this.attributes[e]!==void 0}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;t!==void 0&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(n!==void 0){const a=new Ht().getNormalMatrix(e);n.applyNormalMatrix(a),n.needsUpdate=!0}const i=this.attributes.tangent;return i!==void 0&&(i.transformDirection(e),i.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(e){return sa.makeRotationFromQuaternion(e),this.applyMatrix4(sa),this}rotateX(e){return sa.makeRotationX(e),this.applyMatrix4(sa),this}rotateY(e){return sa.makeRotationY(e),this.applyMatrix4(sa),this}rotateZ(e){return sa.makeRotationZ(e),this.applyMatrix4(sa),this}translate(e,t,n){return sa.makeTranslation(e,t,n),this.applyMatrix4(sa),this}scale(e,t,n){return sa.makeScale(e,t,n),this.applyMatrix4(sa),this}lookAt(e){return Hx.lookAt(e),Hx.updateMatrix(),this.applyMatrix4(Hx.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(mh).negate(),this.translate(mh.x,mh.y,mh.z),this}setFromPoints(e){const t=[];for(let n=0,i=e.length;n<i;n++){const a=e[n];t.push(a.x,a.y,a.z||0)}return this.setAttribute("position",new Nn(t,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Oa);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingBox.set(new X(-1/0,-1/0,-1/0),new X(1/0,1/0,1/0));return}if(e!==void 0){if(this.boundingBox.setFromBufferAttribute(e),t)for(let n=0,i=t.length;n<i;n++){const a=t[n];Hi.setFromBufferAttribute(a),this.morphTargetsRelative?(br.addVectors(this.boundingBox.min,Hi.min),this.boundingBox.expandByPoint(br),br.addVectors(this.boundingBox.max,Hi.max),this.boundingBox.expandByPoint(br)):(this.boundingBox.expandByPoint(Hi.min),this.boundingBox.expandByPoint(Hi.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Fa);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute){console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),this.boundingSphere.set(new X,1/0);return}if(e){const n=this.boundingSphere.center;if(Hi.setFromBufferAttribute(e),t)for(let a=0,o=t.length;a<o;a++){const s=t[a];Od.setFromBufferAttribute(s),this.morphTargetsRelative?(br.addVectors(Hi.min,Od.min),Hi.expandByPoint(br),br.addVectors(Hi.max,Od.max),Hi.expandByPoint(br)):(Hi.expandByPoint(Od.min),Hi.expandByPoint(Od.max))}Hi.getCenter(n);let i=0;for(let a=0,o=e.count;a<o;a++)br.fromBufferAttribute(e,a),i=Math.max(i,n.distanceToSquared(br));if(t)for(let a=0,o=t.length;a<o;a++){const s=t[a],l=this.morphTargetsRelative;for(let u=0,c=s.count;u<c;u++)br.fromBufferAttribute(s,u),l&&(mh.fromBufferAttribute(e,u),br.add(mh)),i=Math.max(i,n.distanceToSquared(br))}this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(e===null||t.position===void 0||t.normal===void 0||t.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}const n=e.array,i=t.position.array,a=t.normal.array,o=t.uv.array,s=i.length/3;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Gn(new Float32Array(4*s),4));const l=this.getAttribute("tangent").array,u=[],c=[];for(let b=0;b<s;b++)u[b]=new X,c[b]=new X;const h=new X,f=new X,d=new X,p=new Me,g=new Me,v=new Me,m=new X,y=new X;function _(b,T,P){h.fromArray(i,b*3),f.fromArray(i,T*3),d.fromArray(i,P*3),p.fromArray(o,b*2),g.fromArray(o,T*2),v.fromArray(o,P*2),f.sub(h),d.sub(h),g.sub(p),v.sub(p);const D=1/(g.x*v.y-v.x*g.y);isFinite(D)&&(m.copy(f).multiplyScalar(v.y).addScaledVector(d,-g.y).multiplyScalar(D),y.copy(d).multiplyScalar(g.x).addScaledVector(f,-v.x).multiplyScalar(D),u[b].add(m),u[T].add(m),u[P].add(m),c[b].add(y),c[T].add(y),c[P].add(y))}let x=this.groups;x.length===0&&(x=[{start:0,count:n.length}]);for(let b=0,T=x.length;b<T;++b){const P=x[b],D=P.start,L=P.count;for(let E=D,I=D+L;E<I;E+=3)_(n[E+0],n[E+1],n[E+2])}const S=new X,A=new X,w=new X,M=new X;function C(b){w.fromArray(a,b*3),M.copy(w);const T=u[b];S.copy(T),S.sub(w.multiplyScalar(w.dot(T))).normalize(),A.crossVectors(M,T);const D=A.dot(c[b])<0?-1:1;l[b*4]=S.x,l[b*4+1]=S.y,l[b*4+2]=S.z,l[b*4+3]=D}for(let b=0,T=x.length;b<T;++b){const P=x[b],D=P.start,L=P.count;for(let E=D,I=D+L;E<I;E+=3)C(n[E+0]),C(n[E+1]),C(n[E+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(t!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Gn(new Float32Array(t.count*3),3),this.setAttribute("normal",n);else for(let f=0,d=n.count;f<d;f++)n.setXYZ(f,0,0,0);const i=new X,a=new X,o=new X,s=new X,l=new X,u=new X,c=new X,h=new X;if(e)for(let f=0,d=e.count;f<d;f+=3){const p=e.getX(f+0),g=e.getX(f+1),v=e.getX(f+2);i.fromBufferAttribute(t,p),a.fromBufferAttribute(t,g),o.fromBufferAttribute(t,v),c.subVectors(o,a),h.subVectors(i,a),c.cross(h),s.fromBufferAttribute(n,p),l.fromBufferAttribute(n,g),u.fromBufferAttribute(n,v),s.add(c),l.add(c),u.add(c),n.setXYZ(p,s.x,s.y,s.z),n.setXYZ(g,l.x,l.y,l.z),n.setXYZ(v,u.x,u.y,u.z)}else for(let f=0,d=t.count;f<d;f+=3)i.fromBufferAttribute(t,f+0),a.fromBufferAttribute(t,f+1),o.fromBufferAttribute(t,f+2),c.subVectors(o,a),h.subVectors(i,a),c.cross(h),n.setXYZ(f+0,c.x,c.y,c.z),n.setXYZ(f+1,c.x,c.y,c.z),n.setXYZ(f+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)br.fromBufferAttribute(e,t),br.normalize(),e.setXYZ(t,br.x,br.y,br.z)}toNonIndexed(){function e(s,l){const u=s.array,c=s.itemSize,h=s.normalized,f=new u.constructor(l.length*c);let d=0,p=0;for(let g=0,v=l.length;g<v;g++){s.isInterleavedBufferAttribute?d=l[g]*s.data.stride+s.offset:d=l[g]*c;for(let m=0;m<c;m++)f[p++]=u[d++]}return new Gn(f,c,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new wn,n=this.index.array,i=this.attributes;for(const s in i){const l=i[s],u=e(l,n);t.setAttribute(s,u)}const a=this.morphAttributes;for(const s in a){const l=[],u=a[s];for(let c=0,h=u.length;c<h;c++){const f=u[c],d=e(f,n);l.push(d)}t.morphAttributes[s]=l}t.morphTargetsRelative=this.morphTargetsRelative;const o=this.groups;for(let s=0,l=o.length;s<l;s++){const u=o[s];t.addGroup(u.start,u.count,u.materialIndex)}return t}toJSON(){const e={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,this.name!==""&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),this.parameters!==void 0){const l=this.parameters;for(const u in l)l[u]!==void 0&&(e[u]=l[u]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const l in n){const u=n[l];e.data.attributes[l]=u.toJSON(e.data)}const i={};let a=!1;for(const l in this.morphAttributes){const u=this.morphAttributes[l],c=[];for(let h=0,f=u.length;h<f;h++){const d=u[h];c.push(d.toJSON(e.data))}c.length>0&&(i[l]=c,a=!0)}a&&(e.data.morphAttributes=i,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const s=this.boundingSphere;return s!==null&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return new this.constructor().copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;n!==null&&this.setIndex(n.clone(t));const i=e.attributes;for(const u in i){const c=i[u];this.setAttribute(u,c.clone(t))}const a=e.morphAttributes;for(const u in a){const c=[],h=a[u];for(let f=0,d=h.length;f<d;f++)c.push(h[f].clone(t));this.morphAttributes[u]=c}this.morphTargetsRelative=e.morphTargetsRelative;const o=e.groups;for(let u=0,c=o.length;u<c;u++){const h=o[u];this.addGroup(h.start,h.count,h.materialIndex)}const s=e.boundingBox;s!==null&&(this.boundingBox=s.clone());const l=e.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}}const EP=new Mt,vu=new sd,tm=new Fa,LP=new X,yh=new X,_h=new X,xh=new X,Wx=new X,nm=new X,rm=new Me,im=new Me,am=new Me,PP=new X,RP=new X,DP=new X,om=new X,sm=new X;class rn extends bn{constructor(e=new wn,t=new Pn){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),e.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),e.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=i.length;a<o;a++){const s=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}getVertexPosition(e,t){const n=this.geometry,i=n.attributes.position,a=n.morphAttributes.position,o=n.morphTargetsRelative;t.fromBufferAttribute(i,e);const s=this.morphTargetInfluences;if(a&&s){nm.set(0,0,0);for(let l=0,u=a.length;l<u;l++){const c=s[l],h=a[l];c!==0&&(Wx.fromBufferAttribute(h,e),o?nm.addScaledVector(Wx,c):nm.addScaledVector(Wx.sub(t),c))}t.add(nm)}return t}raycast(e,t){const n=this.geometry,i=this.material,a=this.matrixWorld;i!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),tm.copy(n.boundingSphere),tm.applyMatrix4(a),vu.copy(e.ray).recast(e.near),!(tm.containsPoint(vu.origin)===!1&&(vu.intersectSphere(tm,LP)===null||vu.origin.distanceToSquared(LP)>cu(e.far-e.near,2)))&&(EP.copy(a).invert(),vu.copy(e.ray).applyMatrix4(EP),!(n.boundingBox!==null&&vu.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(e,t,vu)))}_computeIntersections(e,t,n){let i;const a=this.geometry,o=this.material,s=a.index,l=a.attributes.position,u=a.attributes.uv,c=a.attributes.uv1,h=a.attributes.normal,f=a.groups,d=a.drawRange;if(s!==null)if(Array.isArray(o))for(let p=0,g=f.length;p<g;p++){const v=f[p],m=o[v.materialIndex],y=Math.max(v.start,d.start),_=Math.min(s.count,Math.min(v.start+v.count,d.start+d.count));for(let x=y,S=_;x<S;x+=3){const A=s.getX(x),w=s.getX(x+1),M=s.getX(x+2);i=lm(this,m,e,n,u,c,h,A,w,M),i&&(i.faceIndex=Math.floor(x/3),i.face.materialIndex=v.materialIndex,t.push(i))}}else{const p=Math.max(0,d.start),g=Math.min(s.count,d.start+d.count);for(let v=p,m=g;v<m;v+=3){const y=s.getX(v),_=s.getX(v+1),x=s.getX(v+2);i=lm(this,o,e,n,u,c,h,y,_,x),i&&(i.faceIndex=Math.floor(v/3),t.push(i))}}else if(l!==void 0)if(Array.isArray(o))for(let p=0,g=f.length;p<g;p++){const v=f[p],m=o[v.materialIndex],y=Math.max(v.start,d.start),_=Math.min(l.count,Math.min(v.start+v.count,d.start+d.count));for(let x=y,S=_;x<S;x+=3){const A=x,w=x+1,M=x+2;i=lm(this,m,e,n,u,c,h,A,w,M),i&&(i.faceIndex=Math.floor(x/3),i.face.materialIndex=v.materialIndex,t.push(i))}}else{const p=Math.max(0,d.start),g=Math.min(l.count,d.start+d.count);for(let v=p,m=g;v<m;v+=3){const y=v,_=v+1,x=v+2;i=lm(this,o,e,n,u,c,h,y,_,x),i&&(i.faceIndex=Math.floor(v/3),t.push(i))}}}}function mY(r,e,t,n,i,a,o,s){let l;if(e.side===Di?l=n.intersectTriangle(o,a,i,!0,s):l=n.intersectTriangle(i,a,o,e.side===Es,s),l===null)return null;sm.copy(s),sm.applyMatrix4(r.matrixWorld);const u=t.ray.origin.distanceTo(sm);return u<t.near||u>t.far?null:{distance:u,point:sm.clone(),object:r}}function lm(r,e,t,n,i,a,o,s,l,u){r.getVertexPosition(s,yh),r.getVertexPosition(l,_h),r.getVertexPosition(u,xh);const c=mY(r,e,t,n,yh,_h,xh,om);if(c){i&&(rm.fromBufferAttribute(i,s),im.fromBufferAttribute(i,l),am.fromBufferAttribute(i,u),c.uv=Tp.getInterpolation(om,yh,_h,xh,rm,im,am,new Me)),a&&(rm.fromBufferAttribute(a,s),im.fromBufferAttribute(a,l),am.fromBufferAttribute(a,u),c.uv1=Tp.getInterpolation(om,yh,_h,xh,rm,im,am,new Me),c.uv2=c.uv1),o&&(PP.fromBufferAttribute(o,s),RP.fromBufferAttribute(o,l),DP.fromBufferAttribute(o,u),c.normal=Tp.getInterpolation(om,yh,_h,xh,PP,RP,DP,new X),c.normal.dot(n.direction)>0&&c.normal.multiplyScalar(-1));const h={a:s,b:l,c:u,normal:new X,materialIndex:0};Tp.getNormal(yh,_h,xh,h.normal),c.face=h}return c}class ld extends wn{constructor(e=1,t=1,n=1,i=1,a=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:i,heightSegments:a,depthSegments:o};const s=this;i=Math.floor(i),a=Math.floor(a),o=Math.floor(o);const l=[],u=[],c=[],h=[];let f=0,d=0;p("z","y","x",-1,-1,n,t,e,o,a,0),p("z","y","x",1,-1,n,t,-e,o,a,1),p("x","z","y",1,1,e,n,t,i,o,2),p("x","z","y",1,-1,e,n,-t,i,o,3),p("x","y","z",1,-1,e,t,n,i,a,4),p("x","y","z",-1,-1,e,t,-n,i,a,5),this.setIndex(l),this.setAttribute("position",new Nn(u,3)),this.setAttribute("normal",new Nn(c,3)),this.setAttribute("uv",new Nn(h,2));function p(g,v,m,y,_,x,S,A,w,M,C){const b=x/w,T=S/M,P=x/2,D=S/2,L=A/2,E=w+1,I=M+1;let N=0,R=0;const F=new X;for(let O=0;O<I;O++){const V=O*T-D;for(let H=0;H<E;H++){const Q=H*b-P;F[g]=Q*y,F[v]=V*_,F[m]=L,u.push(F.x,F.y,F.z),F[g]=0,F[v]=0,F[m]=A>0?1:-1,c.push(F.x,F.y,F.z),h.push(H/w),h.push(1-O/M),N+=1}}for(let O=0;O<M;O++)for(let V=0;V<w;V++){const H=f+V+E*O,Q=f+V+E*(O+1),W=f+(V+1)+E*(O+1),Z=f+(V+1)+E*O;l.push(H,Q,Z),l.push(Q,W,Z),R+=6}s.addGroup(d,R,C),d+=R,f+=N}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ld(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Wf(r){const e={};for(const t in r){e[t]={};for(const n in r[t]){const i=r[t][n];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),e[t][n]=null):e[t][n]=i.clone():Array.isArray(i)?e[t][n]=i.slice():e[t][n]=i}}return e}function ui(r){const e={};for(let t=0;t<r.length;t++){const n=Wf(r[t]);for(const i in n)e[i]=n[i]}return e}function yY(r){const e=[];for(let t=0;t<r.length;t++)e.push(r[t].clone());return e}function Az(r){return r.getRenderTarget()===null?r.outputColorSpace:ln.workingColorSpace}const uC={clone:Wf,merge:ui};var _Y=`void main() { |
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 ); |
|
}`,xY=`void main() { |
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 ); |
|
}`;class Ls extends Da{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=_Y,this.fragmentShader=xY,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1,clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Wf(e.uniforms),this.uniformsGroups=yY(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const i in this.uniforms){const o=this.uniforms[i].value;o&&o.isTexture?t.uniforms[i]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[i]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[i]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[i]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[i]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[i]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[i]={type:"m4",value:o.toArray()}:t.uniforms[i]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const n={};for(const i in this.extensions)this.extensions[i]===!0&&(n[i]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}let wz=class extends bn{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Mt,this.projectionMatrix=new Mt,this.projectionMatrixInverse=new Mt,this.coordinateSystem=ms}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,this}getWorldDirection(e){return super.getWorldDirection(e).negate()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};const Ys=new X,IP=new Me,NP=new Me;class Qr extends wz{constructor(e=50,t=1,n=.1,i=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=i,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=Hf*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Xp*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Hf*2*Math.atan(Math.tan(Xp*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,n){Ys.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(Ys.x,Ys.y).multiplyScalar(-e/Ys.z),Ys.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),n.set(Ys.x,Ys.y).multiplyScalar(-e/Ys.z)}getViewSize(e,t){return this.getViewBounds(e,IP,NP),t.subVectors(NP,IP)}setViewOffset(e,t,n,i,a,o){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Xp*.5*this.fov)/this.zoom,n=2*t,i=this.aspect*n,a=-.5*i;const o=this.view;if(this.view!==null&&this.view.enabled){const l=o.fullWidth,u=o.fullHeight;a+=o.offsetX*i/l,t-=o.offsetY*n/u,i*=o.width/l,n*=o.height/u}const s=this.filmOffset;s!==0&&(a+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(a,a+i,t,t-n,e,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const Sh=-90,Ah=1;class SY extends bn{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null,this.activeMipmapLevel=0;const i=new Qr(Sh,Ah,e,t);i.layers=this.layers,this.add(i);const a=new Qr(Sh,Ah,e,t);a.layers=this.layers,this.add(a);const o=new Qr(Sh,Ah,e,t);o.layers=this.layers,this.add(o);const s=new Qr(Sh,Ah,e,t);s.layers=this.layers,this.add(s);const l=new Qr(Sh,Ah,e,t);l.layers=this.layers,this.add(l);const u=new Qr(Sh,Ah,e,t);u.layers=this.layers,this.add(u)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,i,a,o,s,l]=t;for(const u of t)this.remove(u);if(e===ms)n.up.set(0,1,0),n.lookAt(1,0,0),i.up.set(0,1,0),i.lookAt(-1,0,0),a.up.set(0,0,-1),a.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===N0)n.up.set(0,-1,0),n.lookAt(-1,0,0),i.up.set(0,-1,0),i.lookAt(1,0,0),a.up.set(0,0,1),a.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),l.up.set(0,-1,0),l.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const u of t)this.add(u),u.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:n,activeMipmapLevel:i}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[a,o,s,l,u,c]=this.children,h=e.getRenderTarget(),f=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),p=e.xr.enabled;e.xr.enabled=!1;const g=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0,i),e.render(t,a),e.setRenderTarget(n,1,i),e.render(t,o),e.setRenderTarget(n,2,i),e.render(t,s),e.setRenderTarget(n,3,i),e.render(t,l),e.setRenderTarget(n,4,i),e.render(t,u),n.texture.generateMipmaps=g,e.setRenderTarget(n,5,i),e.render(t,c),e.setRenderTarget(h,f,d),e.xr.enabled=p,n.texture.needsPMREMUpdate=!0}}class bz extends mr{constructor(e,t,n,i,a,o,s,l,u,c){e=e!==void 0?e:[],t=t!==void 0?t:zf,super(e,t,n,i,a,o,s,l,u,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class AY extends kc{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},i=[n,n,n,n,n,n];t.encoding!==void 0&&(Sc("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===xc?dn:Ta),this.texture=new bz(i,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:lr}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.colorSpace=t.colorSpace,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={uniforms:{tEquirect:{value:null}},vertexShader:` |
|
|
|
varying vec3 vWorldDirection; |
|
|
|
vec3 transformDirection( in vec3 dir, in mat4 matrix ) { |
|
|
|
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); |
|
|
|
} |
|
|
|
void main() { |
|
|
|
vWorldDirection = transformDirection( position, modelMatrix ); |
|
|
|
#include <begin_vertex> |
|
#include <project_vertex> |
|
|
|
} |
|
`,fragmentShader:` |
|
|
|
uniform sampler2D tEquirect; |
|
|
|
varying vec3 vWorldDirection; |
|
|
|
#include <common> |
|
|
|
void main() { |
|
|
|
vec3 direction = normalize( vWorldDirection ); |
|
|
|
vec2 sampleUV = equirectUv( direction ); |
|
|
|
gl_FragColor = texture2D( tEquirect, sampleUV ); |
|
|
|
} |
|
`},i=new ld(5,5,5),a=new Ls({name:"CubemapFromEquirect",uniforms:Wf(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Di,blending:kl});a.uniforms.tEquirect.value=t;const o=new rn(i,a),s=t.minFilter;return t.minFilter===gs&&(t.minFilter=lr),new SY(1,10,this).update(e,o),t.minFilter=s,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,i){const a=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,n,i);e.setRenderTarget(a)}}const $x=new X,wY=new X,bY=new Ht;let cl=class{constructor(e=new X(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,i){return this.normal.set(e,t,n),this.constant=i,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const i=$x.subVectors(n,t).cross(wY.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(i,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta($x),i=this.normal.dot(n);if(i===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const a=-(e.start.dot(this.normal)+this.constant)/i;return a<0||a>1?null:t.copy(e.start).addScaledVector(n,a)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||bY.getNormalMatrix(e),i=this.coplanarPoint($x).applyMatrix4(e),a=this.normal.applyMatrix3(n).normalize();return this.constant=-i.dot(a),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};const gu=new Fa,um=new X;class cC{constructor(e=new cl,t=new cl,n=new cl,i=new cl,a=new cl,o=new cl){this.planes=[e,t,n,i,a,o]}set(e,t,n,i,a,o){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(i),s[4].copy(a),s[5].copy(o),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e,t=ms){const n=this.planes,i=e.elements,a=i[0],o=i[1],s=i[2],l=i[3],u=i[4],c=i[5],h=i[6],f=i[7],d=i[8],p=i[9],g=i[10],v=i[11],m=i[12],y=i[13],_=i[14],x=i[15];if(n[0].setComponents(l-a,f-u,v-d,x-m).normalize(),n[1].setComponents(l+a,f+u,v+d,x+m).normalize(),n[2].setComponents(l+o,f+c,v+p,x+y).normalize(),n[3].setComponents(l-o,f-c,v-p,x-y).normalize(),n[4].setComponents(l-s,f-h,v-g,x-_).normalize(),t===ms)n[5].setComponents(l+s,f+h,v+g,x+_).normalize();else if(t===N0)n[5].setComponents(s,h,g,_).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),gu.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),gu.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(gu)}intersectsSprite(e){return gu.center.set(0,0,0),gu.radius=.7071067811865476,gu.applyMatrix4(e.matrixWorld),this.intersectsSphere(gu)}intersectsSphere(e){const t=this.planes,n=e.center,i=-e.radius;for(let a=0;a<6;a++)if(t[a].distanceToPoint(n)<i)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const i=t[n];if(um.x=i.normal.x>0?e.max.x:e.min.x,um.y=i.normal.y>0?e.max.y:e.min.y,um.z=i.normal.z>0?e.max.z:e.min.z,i.distanceToPoint(um)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function Tz(){let r=null,e=!1,t=null,n=null;function i(a,o){t(a,o),n=r.requestAnimationFrame(i)}return{start:function(){e!==!0&&t!==null&&(n=r.requestAnimationFrame(i),e=!0)},stop:function(){r.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(a){t=a},setContext:function(a){r=a}}}function TY(r,e){const t=e.isWebGL2,n=new WeakMap;function i(u,c){const h=u.array,f=u.usage,d=h.byteLength,p=r.createBuffer();r.bindBuffer(c,p),r.bufferData(c,h,f),u.onUploadCallback();let g;if(h instanceof Float32Array)g=r.FLOAT;else if(h instanceof Uint16Array)if(u.isFloat16BufferAttribute)if(t)g=r.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else g=r.UNSIGNED_SHORT;else if(h instanceof Int16Array)g=r.SHORT;else if(h instanceof Uint32Array)g=r.UNSIGNED_INT;else if(h instanceof Int32Array)g=r.INT;else if(h instanceof Int8Array)g=r.BYTE;else if(h instanceof Uint8Array)g=r.UNSIGNED_BYTE;else if(h instanceof Uint8ClampedArray)g=r.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+h);return{buffer:p,type:g,bytesPerElement:h.BYTES_PER_ELEMENT,version:u.version,size:d}}function a(u,c,h){const f=c.array,d=c._updateRange,p=c.updateRanges;if(r.bindBuffer(h,u),d.count===-1&&p.length===0&&r.bufferSubData(h,0,f),p.length!==0){for(let g=0,v=p.length;g<v;g++){const m=p[g];t?r.bufferSubData(h,m.start*f.BYTES_PER_ELEMENT,f,m.start,m.count):r.bufferSubData(h,m.start*f.BYTES_PER_ELEMENT,f.subarray(m.start,m.start+m.count))}c.clearUpdateRanges()}d.count!==-1&&(t?r.bufferSubData(h,d.offset*f.BYTES_PER_ELEMENT,f,d.offset,d.count):r.bufferSubData(h,d.offset*f.BYTES_PER_ELEMENT,f.subarray(d.offset,d.offset+d.count)),d.count=-1),c.onUploadCallback()}function o(u){return u.isInterleavedBufferAttribute&&(u=u.data),n.get(u)}function s(u){u.isInterleavedBufferAttribute&&(u=u.data);const c=n.get(u);c&&(r.deleteBuffer(c.buffer),n.delete(u))}function l(u,c){if(u.isGLBufferAttribute){const f=n.get(u);(!f||f.version<u.version)&&n.set(u,{buffer:u.buffer,type:u.type,bytesPerElement:u.elementSize,version:u.version});return}u.isInterleavedBufferAttribute&&(u=u.data);const h=n.get(u);if(h===void 0)n.set(u,i(u,c));else if(h.version<u.version){if(h.size!==u.array.byteLength)throw new Error("THREE.WebGLAttributes: The size of the buffer attribute's array buffer does not match the original size. Resizing buffer attributes is not supported.");a(h.buffer,u,c),h.version=u.version}}return{get:o,remove:s,update:l}}class Za extends wn{constructor(e=1,t=1,n=1,i=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:i};const a=e/2,o=t/2,s=Math.floor(n),l=Math.floor(i),u=s+1,c=l+1,h=e/s,f=t/l,d=[],p=[],g=[],v=[];for(let m=0;m<c;m++){const y=m*f-o;for(let _=0;_<u;_++){const x=_*h-a;p.push(x,-y,0),g.push(0,0,1),v.push(_/s),v.push(1-m/l)}}for(let m=0;m<l;m++)for(let y=0;y<s;y++){const _=y+u*m,x=y+u*(m+1),S=y+1+u*(m+1),A=y+1+u*m;d.push(_,x,A),d.push(x,S,A)}this.setIndex(d),this.setAttribute("position",new Nn(p,3)),this.setAttribute("normal",new Nn(g,3)),this.setAttribute("uv",new Nn(v,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Za(e.width,e.height,e.widthSegments,e.heightSegments)}}var MY=`#ifdef USE_ALPHAHASH |
|
if ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard; |
|
#endif`,CY=`#ifdef USE_ALPHAHASH |
|
const float ALPHA_HASH_SCALE = 0.05; |
|
float hash2D( vec2 value ) { |
|
return fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) ); |
|
} |
|
float hash3D( vec3 value ) { |
|
return hash2D( vec2( hash2D( value.xy ), value.z ) ); |
|
} |
|
float getAlphaHashThreshold( vec3 position ) { |
|
float maxDeriv = max( |
|
length( dFdx( position.xyz ) ), |
|
length( dFdy( position.xyz ) ) |
|
); |
|
float pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv ); |
|
vec2 pixScales = vec2( |
|
exp2( floor( log2( pixScale ) ) ), |
|
exp2( ceil( log2( pixScale ) ) ) |
|
); |
|
vec2 alpha = vec2( |
|
hash3D( floor( pixScales.x * position.xyz ) ), |
|
hash3D( floor( pixScales.y * position.xyz ) ) |
|
); |
|
float lerpFactor = fract( log2( pixScale ) ); |
|
float x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y; |
|
float a = min( lerpFactor, 1.0 - lerpFactor ); |
|
vec3 cases = vec3( |
|
x * x / ( 2.0 * a * ( 1.0 - a ) ), |
|
( x - 0.5 * a ) / ( 1.0 - a ), |
|
1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) ) |
|
); |
|
float threshold = ( x < ( 1.0 - a ) ) |
|
? ( ( x < a ) ? cases.x : cases.y ) |
|
: cases.z; |
|
return clamp( threshold , 1.0e-6, 1.0 ); |
|
} |
|
#endif`,EY=`#ifdef USE_ALPHAMAP |
|
diffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).g; |
|
#endif`,LY=`#ifdef USE_ALPHAMAP |
|
uniform sampler2D alphaMap; |
|
#endif`,PY=`#ifdef USE_ALPHATEST |
|
#ifdef ALPHA_TO_COVERAGE |
|
diffuseColor.a = smoothstep( alphaTest, alphaTest + fwidth( diffuseColor.a ), diffuseColor.a ); |
|
if ( diffuseColor.a == 0.0 ) discard; |
|
#else |
|
if ( diffuseColor.a < alphaTest ) discard; |
|
#endif |
|
#endif`,RY=`#ifdef USE_ALPHATEST |
|
uniform float alphaTest; |
|
#endif`,DY=`#ifdef USE_AOMAP |
|
float ambientOcclusion = ( texture2D( aoMap, vAoMapUv ).r - 1.0 ) * aoMapIntensity + 1.0; |
|
reflectedLight.indirectDiffuse *= ambientOcclusion; |
|
#if defined( USE_CLEARCOAT ) |
|
clearcoatSpecularIndirect *= ambientOcclusion; |
|
#endif |
|
#if defined( USE_SHEEN ) |
|
sheenSpecularIndirect *= ambientOcclusion; |
|
#endif |
|
#if defined( USE_ENVMAP ) && defined( STANDARD ) |
|
float dotNV = saturate( dot( geometryNormal, geometryViewDir ) ); |
|
reflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness ); |
|
#endif |
|
#endif`,IY=`#ifdef USE_AOMAP |
|
uniform sampler2D aoMap; |
|
uniform float aoMapIntensity; |
|
#endif`,NY=`#ifdef USE_BATCHING |
|
attribute float batchId; |
|
uniform highp sampler2D batchingTexture; |
|
mat4 getBatchingMatrix( const in float i ) { |
|
int size = textureSize( batchingTexture, 0 ).x; |
|
int j = int( i ) * 4; |
|
int x = j % size; |
|
int y = j / size; |
|
vec4 v1 = texelFetch( batchingTexture, ivec2( x, y ), 0 ); |
|
vec4 v2 = texelFetch( batchingTexture, ivec2( x + 1, y ), 0 ); |
|
vec4 v3 = texelFetch( batchingTexture, ivec2( x + 2, y ), 0 ); |
|
vec4 v4 = texelFetch( batchingTexture, ivec2( x + 3, y ), 0 ); |
|
return mat4( v1, v2, v3, v4 ); |
|
} |
|
#endif`,kY=`#ifdef USE_BATCHING |
|
mat4 batchingMatrix = getBatchingMatrix( batchId ); |
|
#endif`,OY=`vec3 transformed = vec3( position ); |
|
#ifdef USE_ALPHAHASH |
|
vPosition = vec3( position ); |
|
#endif`,FY=`vec3 objectNormal = vec3( normal ); |
|
#ifdef USE_TANGENT |
|
vec3 objectTangent = vec3( tangent.xyz ); |
|
#endif`,BY=`float G_BlinnPhong_Implicit( ) { |
|
return 0.25; |
|
} |
|
float D_BlinnPhong( const in float shininess, const in float dotNH ) { |
|
return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); |
|
} |
|
vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { |
|
vec3 halfDir = normalize( lightDir + viewDir ); |
|
float dotNH = saturate( dot( normal, halfDir ) ); |
|
float dotVH = saturate( dot( viewDir, halfDir ) ); |
|
vec3 F = F_Schlick( specularColor, 1.0, dotVH ); |
|
float G = G_BlinnPhong_Implicit( ); |
|
float D = D_BlinnPhong( shininess, dotNH ); |
|
return F * ( G * D ); |
|
} // validated`,zY=`#ifdef USE_IRIDESCENCE |
|
const mat3 XYZ_TO_REC709 = mat3( |
|
3.2404542, -0.9692660, 0.0556434, |
|
-1.5371385, 1.8760108, -0.2040259, |
|
-0.4985314, 0.0415560, 1.0572252 |
|
); |
|
vec3 Fresnel0ToIor( vec3 fresnel0 ) { |
|
vec3 sqrtF0 = sqrt( fresnel0 ); |
|
return ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 ); |
|
} |
|
vec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) { |
|
return pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) ); |
|
} |
|
float IorToFresnel0( float transmittedIor, float incidentIor ) { |
|
return pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor )); |
|
} |
|
vec3 evalSensitivity( float OPD, vec3 shift ) { |
|
float phase = 2.0 * PI * OPD * 1.0e-9; |
|
vec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 ); |
|
vec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 ); |
|
vec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 ); |
|
vec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var ); |
|
xyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) ); |
|
xyz /= 1.0685e-7; |
|
vec3 rgb = XYZ_TO_REC709 * xyz; |
|
return rgb; |
|
} |
|
vec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) { |
|
vec3 I; |
|
float iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) ); |
|
float sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) ); |
|
float cosTheta2Sq = 1.0 - sinTheta2Sq; |
|
if ( cosTheta2Sq < 0.0 ) { |
|
return vec3( 1.0 ); |
|
} |
|
float cosTheta2 = sqrt( cosTheta2Sq ); |
|
float R0 = IorToFresnel0( iridescenceIOR, outsideIOR ); |
|
float R12 = F_Schlick( R0, 1.0, cosTheta1 ); |
|
float T121 = 1.0 - R12; |
|
float phi12 = 0.0; |
|
if ( iridescenceIOR < outsideIOR ) phi12 = PI; |
|
float phi21 = PI - phi12; |
|
vec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) ); vec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR ); |
|
vec3 R23 = F_Schlick( R1, 1.0, cosTheta2 ); |
|
vec3 phi23 = vec3( 0.0 ); |
|
if ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI; |
|
if ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI; |
|
if ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI; |
|
float OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2; |
|
vec3 phi = vec3( phi21 ) + phi23; |
|
vec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 ); |
|
vec3 r123 = sqrt( R123 ); |
|
vec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 ); |
|
vec3 C0 = R12 + Rs; |
|
I = C0; |
|
vec3 Cm = Rs - T121; |
|
for ( int m = 1; m <= 2; ++ m ) { |
|
Cm *= r123; |
|
vec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi ); |
|
I += Cm * Sm; |
|
} |
|
return max( I, vec3( 0.0 ) ); |
|
} |
|
#endif`,UY=`#ifdef USE_BUMPMAP |
|
uniform sampler2D bumpMap; |
|
uniform float bumpScale; |
|
vec2 dHdxy_fwd() { |
|
vec2 dSTdx = dFdx( vBumpMapUv ); |
|
vec2 dSTdy = dFdy( vBumpMapUv ); |
|
float Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x; |
|
float dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll; |
|
float dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdy ).x - Hll; |
|
return vec2( dBx, dBy ); |
|
} |
|
vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { |
|
vec3 vSigmaX = normalize( dFdx( surf_pos.xyz ) ); |
|
vec3 vSigmaY = normalize( dFdy( surf_pos.xyz ) ); |
|
vec3 vN = surf_norm; |
|
vec3 R1 = cross( vSigmaY, vN ); |
|
vec3 R2 = cross( vN, vSigmaX ); |
|
float fDet = dot( vSigmaX, R1 ) * faceDirection; |
|
vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); |
|
return normalize( abs( fDet ) * surf_norm - vGrad ); |
|
} |
|
#endif`,VY=`#if NUM_CLIPPING_PLANES > 0 |
|
vec4 plane; |
|
#ifdef ALPHA_TO_COVERAGE |
|
float distanceToPlane, distanceGradient; |
|
float clipOpacity = 1.0; |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { |
|
plane = clippingPlanes[ i ]; |
|
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; |
|
distanceGradient = fwidth( distanceToPlane ) / 2.0; |
|
clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); |
|
if ( clipOpacity == 0.0 ) discard; |
|
} |
|
#pragma unroll_loop_end |
|
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES |
|
float unionClipOpacity = 1.0; |
|
#pragma unroll_loop_start |
|
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { |
|
plane = clippingPlanes[ i ]; |
|
distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; |
|
distanceGradient = fwidth( distanceToPlane ) / 2.0; |
|
unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); |
|
} |
|
#pragma unroll_loop_end |
|
clipOpacity *= 1.0 - unionClipOpacity; |
|
#endif |
|
diffuseColor.a *= clipOpacity; |
|
if ( diffuseColor.a == 0.0 ) discard; |
|
#else |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { |
|
plane = clippingPlanes[ i ]; |
|
if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; |
|
} |
|
#pragma unroll_loop_end |
|
#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES |
|
bool clipped = true; |
|
#pragma unroll_loop_start |
|
for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { |
|
plane = clippingPlanes[ i ]; |
|
clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; |
|
} |
|
#pragma unroll_loop_end |
|
if ( clipped ) discard; |
|
#endif |
|
#endif |
|
#endif`,GY=`#if NUM_CLIPPING_PLANES > 0 |
|
varying vec3 vClipPosition; |
|
uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; |
|
#endif`,HY=`#if NUM_CLIPPING_PLANES > 0 |
|
varying vec3 vClipPosition; |
|
#endif`,WY=`#if NUM_CLIPPING_PLANES > 0 |
|
vClipPosition = - mvPosition.xyz; |
|
#endif`,$Y=`#if defined( USE_COLOR_ALPHA ) |
|
diffuseColor *= vColor; |
|
#elif defined( USE_COLOR ) |
|
diffuseColor.rgb *= vColor; |
|
#endif`,XY=`#if defined( USE_COLOR_ALPHA ) |
|
varying vec4 vColor; |
|
#elif defined( USE_COLOR ) |
|
varying vec3 vColor; |
|
#endif`,YY=`#if defined( USE_COLOR_ALPHA ) |
|
varying vec4 vColor; |
|
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) |
|
varying vec3 vColor; |
|
#endif`,qY=`#if defined( USE_COLOR_ALPHA ) |
|
vColor = vec4( 1.0 ); |
|
#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) |
|
vColor = vec3( 1.0 ); |
|
#endif |
|
#ifdef USE_COLOR |
|
vColor *= color; |
|
#endif |
|
#ifdef USE_INSTANCING_COLOR |
|
vColor.xyz *= instanceColor.xyz; |
|
#endif`,jY=`#define PI 3.141592653589793 |
|
#define PI2 6.283185307179586 |
|
#define PI_HALF 1.5707963267948966 |
|
#define RECIPROCAL_PI 0.3183098861837907 |
|
#define RECIPROCAL_PI2 0.15915494309189535 |
|
#define EPSILON 1e-6 |
|
#ifndef saturate |
|
#define saturate( a ) clamp( a, 0.0, 1.0 ) |
|
#endif |
|
#define whiteComplement( a ) ( 1.0 - saturate( a ) ) |
|
float pow2( const in float x ) { return x*x; } |
|
vec3 pow2( const in vec3 x ) { return x*x; } |
|
float pow3( const in float x ) { return x*x*x; } |
|
float pow4( const in float x ) { float x2 = x*x; return x2*x2; } |
|
float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } |
|
float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } |
|
highp float rand( const in vec2 uv ) { |
|
const highp float a = 12.9898, b = 78.233, c = 43758.5453; |
|
highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); |
|
return fract( sin( sn ) * c ); |
|
} |
|
#ifdef HIGH_PRECISION |
|
float precisionSafeLength( vec3 v ) { return length( v ); } |
|
#else |
|
float precisionSafeLength( vec3 v ) { |
|
float maxComponent = max3( abs( v ) ); |
|
return length( v / maxComponent ) * maxComponent; |
|
} |
|
#endif |
|
struct IncidentLight { |
|
vec3 color; |
|
vec3 direction; |
|
bool visible; |
|
}; |
|
struct ReflectedLight { |
|
vec3 directDiffuse; |
|
vec3 directSpecular; |
|
vec3 indirectDiffuse; |
|
vec3 indirectSpecular; |
|
}; |
|
#ifdef USE_ALPHAHASH |
|
varying vec3 vPosition; |
|
#endif |
|
vec3 transformDirection( in vec3 dir, in mat4 matrix ) { |
|
return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); |
|
} |
|
vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { |
|
return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); |
|
} |
|
mat3 transposeMat3( const in mat3 m ) { |
|
mat3 tmp; |
|
tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); |
|
tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); |
|
tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); |
|
return tmp; |
|
} |
|
float luminance( const in vec3 rgb ) { |
|
const vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 ); |
|
return dot( weights, rgb ); |
|
} |
|
bool isPerspectiveMatrix( mat4 m ) { |
|
return m[ 2 ][ 3 ] == - 1.0; |
|
} |
|
vec2 equirectUv( in vec3 dir ) { |
|
float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; |
|
float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; |
|
return vec2( u, v ); |
|
} |
|
vec3 BRDF_Lambert( const in vec3 diffuseColor ) { |
|
return RECIPROCAL_PI * diffuseColor; |
|
} |
|
vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { |
|
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); |
|
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); |
|
} |
|
float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { |
|
float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); |
|
return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); |
|
} // validated`,KY=`#ifdef ENVMAP_TYPE_CUBE_UV |
|
#define cubeUV_minMipLevel 4.0 |
|
#define cubeUV_minTileSize 16.0 |
|
float getFace( vec3 direction ) { |
|
vec3 absDirection = abs( direction ); |
|
float face = - 1.0; |
|
if ( absDirection.x > absDirection.z ) { |
|
if ( absDirection.x > absDirection.y ) |
|
face = direction.x > 0.0 ? 0.0 : 3.0; |
|
else |
|
face = direction.y > 0.0 ? 1.0 : 4.0; |
|
} else { |
|
if ( absDirection.z > absDirection.y ) |
|
face = direction.z > 0.0 ? 2.0 : 5.0; |
|
else |
|
face = direction.y > 0.0 ? 1.0 : 4.0; |
|
} |
|
return face; |
|
} |
|
vec2 getUV( vec3 direction, float face ) { |
|
vec2 uv; |
|
if ( face == 0.0 ) { |
|
uv = vec2( direction.z, direction.y ) / abs( direction.x ); |
|
} else if ( face == 1.0 ) { |
|
uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); |
|
} else if ( face == 2.0 ) { |
|
uv = vec2( - direction.x, direction.y ) / abs( direction.z ); |
|
} else if ( face == 3.0 ) { |
|
uv = vec2( - direction.z, direction.y ) / abs( direction.x ); |
|
} else if ( face == 4.0 ) { |
|
uv = vec2( - direction.x, direction.z ) / abs( direction.y ); |
|
} else { |
|
uv = vec2( direction.x, direction.y ) / abs( direction.z ); |
|
} |
|
return 0.5 * ( uv + 1.0 ); |
|
} |
|
vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { |
|
float face = getFace( direction ); |
|
float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); |
|
mipInt = max( mipInt, cubeUV_minMipLevel ); |
|
float faceSize = exp2( mipInt ); |
|
highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; |
|
if ( face > 2.0 ) { |
|
uv.y += faceSize; |
|
face -= 3.0; |
|
} |
|
uv.x += face * faceSize; |
|
uv.x += filterInt * 3.0 * cubeUV_minTileSize; |
|
uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); |
|
uv.x *= CUBEUV_TEXEL_WIDTH; |
|
uv.y *= CUBEUV_TEXEL_HEIGHT; |
|
#ifdef texture2DGradEXT |
|
return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; |
|
#else |
|
return texture2D( envMap, uv ).rgb; |
|
#endif |
|
} |
|
#define cubeUV_r0 1.0 |
|
#define cubeUV_m0 - 2.0 |
|
#define cubeUV_r1 0.8 |
|
#define cubeUV_m1 - 1.0 |
|
#define cubeUV_r4 0.4 |
|
#define cubeUV_m4 2.0 |
|
#define cubeUV_r5 0.305 |
|
#define cubeUV_m5 3.0 |
|
#define cubeUV_r6 0.21 |
|
#define cubeUV_m6 4.0 |
|
float roughnessToMip( float roughness ) { |
|
float mip = 0.0; |
|
if ( roughness >= cubeUV_r1 ) { |
|
mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; |
|
} else if ( roughness >= cubeUV_r4 ) { |
|
mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; |
|
} else if ( roughness >= cubeUV_r5 ) { |
|
mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; |
|
} else if ( roughness >= cubeUV_r6 ) { |
|
mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; |
|
} else { |
|
mip = - 2.0 * log2( 1.16 * roughness ); } |
|
return mip; |
|
} |
|
vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { |
|
float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); |
|
float mipF = fract( mip ); |
|
float mipInt = floor( mip ); |
|
vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); |
|
if ( mipF == 0.0 ) { |
|
return vec4( color0, 1.0 ); |
|
} else { |
|
vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); |
|
return vec4( mix( color0, color1, mipF ), 1.0 ); |
|
} |
|
} |
|
#endif`,ZY=`vec3 transformedNormal = objectNormal; |
|
#ifdef USE_TANGENT |
|
vec3 transformedTangent = objectTangent; |
|
#endif |
|
#ifdef USE_BATCHING |
|
mat3 bm = mat3( batchingMatrix ); |
|
transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); |
|
transformedNormal = bm * transformedNormal; |
|
#ifdef USE_TANGENT |
|
transformedTangent = bm * transformedTangent; |
|
#endif |
|
#endif |
|
#ifdef USE_INSTANCING |
|
mat3 im = mat3( instanceMatrix ); |
|
transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); |
|
transformedNormal = im * transformedNormal; |
|
#ifdef USE_TANGENT |
|
transformedTangent = im * transformedTangent; |
|
#endif |
|
#endif |
|
transformedNormal = normalMatrix * transformedNormal; |
|
#ifdef FLIP_SIDED |
|
transformedNormal = - transformedNormal; |
|
#endif |
|
#ifdef USE_TANGENT |
|
transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; |
|
#ifdef FLIP_SIDED |
|
transformedTangent = - transformedTangent; |
|
#endif |
|
#endif`,QY=`#ifdef USE_DISPLACEMENTMAP |
|
uniform sampler2D displacementMap; |
|
uniform float displacementScale; |
|
uniform float displacementBias; |
|
#endif`,JY=`#ifdef USE_DISPLACEMENTMAP |
|
transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); |
|
#endif`,eq=`#ifdef USE_EMISSIVEMAP |
|
vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); |
|
totalEmissiveRadiance *= emissiveColor.rgb; |
|
#endif`,tq=`#ifdef USE_EMISSIVEMAP |
|
uniform sampler2D emissiveMap; |
|
#endif`,nq="gl_FragColor = linearToOutputTexel( gl_FragColor );",rq=` |
|
const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( |
|
vec3( 0.8224621, 0.177538, 0.0 ), |
|
vec3( 0.0331941, 0.9668058, 0.0 ), |
|
vec3( 0.0170827, 0.0723974, 0.9105199 ) |
|
); |
|
const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( |
|
vec3( 1.2249401, - 0.2249404, 0.0 ), |
|
vec3( - 0.0420569, 1.0420571, 0.0 ), |
|
vec3( - 0.0196376, - 0.0786361, 1.0982735 ) |
|
); |
|
vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { |
|
return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); |
|
} |
|
vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { |
|
return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); |
|
} |
|
vec4 LinearTransferOETF( in vec4 value ) { |
|
return value; |
|
} |
|
vec4 sRGBTransferOETF( in vec4 value ) { |
|
return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); |
|
} |
|
vec4 LinearToLinear( in vec4 value ) { |
|
return value; |
|
} |
|
vec4 LinearTosRGB( in vec4 value ) { |
|
return sRGBTransferOETF( value ); |
|
}`,iq=`#ifdef USE_ENVMAP |
|
#ifdef ENV_WORLDPOS |
|
vec3 cameraToFrag; |
|
if ( isOrthographic ) { |
|
cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); |
|
} else { |
|
cameraToFrag = normalize( vWorldPosition - cameraPosition ); |
|
} |
|
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); |
|
#ifdef ENVMAP_MODE_REFLECTION |
|
vec3 reflectVec = reflect( cameraToFrag, worldNormal ); |
|
#else |
|
vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); |
|
#endif |
|
#else |
|
vec3 reflectVec = vReflect; |
|
#endif |
|
#ifdef ENVMAP_TYPE_CUBE |
|
vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); |
|
#else |
|
vec4 envColor = vec4( 0.0 ); |
|
#endif |
|
#ifdef ENVMAP_BLENDING_MULTIPLY |
|
outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); |
|
#elif defined( ENVMAP_BLENDING_MIX ) |
|
outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); |
|
#elif defined( ENVMAP_BLENDING_ADD ) |
|
outgoingLight += envColor.xyz * specularStrength * reflectivity; |
|
#endif |
|
#endif`,aq=`#ifdef USE_ENVMAP |
|
uniform float envMapIntensity; |
|
uniform float flipEnvMap; |
|
#ifdef ENVMAP_TYPE_CUBE |
|
uniform samplerCube envMap; |
|
#else |
|
uniform sampler2D envMap; |
|
#endif |
|
|
|
#endif`,oq=`#ifdef USE_ENVMAP |
|
uniform float reflectivity; |
|
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) |
|
#define ENV_WORLDPOS |
|
#endif |
|
#ifdef ENV_WORLDPOS |
|
varying vec3 vWorldPosition; |
|
uniform float refractionRatio; |
|
#else |
|
varying vec3 vReflect; |
|
#endif |
|
#endif`,sq=`#ifdef USE_ENVMAP |
|
#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) |
|
#define ENV_WORLDPOS |
|
#endif |
|
#ifdef ENV_WORLDPOS |
|
|
|
varying vec3 vWorldPosition; |
|
#else |
|
varying vec3 vReflect; |
|
uniform float refractionRatio; |
|
#endif |
|
#endif`,lq=`#ifdef USE_ENVMAP |
|
#ifdef ENV_WORLDPOS |
|
vWorldPosition = worldPosition.xyz; |
|
#else |
|
vec3 cameraToVertex; |
|
if ( isOrthographic ) { |
|
cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); |
|
} else { |
|
cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); |
|
} |
|
vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); |
|
#ifdef ENVMAP_MODE_REFLECTION |
|
vReflect = reflect( cameraToVertex, worldNormal ); |
|
#else |
|
vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); |
|
#endif |
|
#endif |
|
#endif`,uq=`#ifdef USE_FOG |
|
vFogDepth = - mvPosition.z; |
|
#endif`,cq=`#ifdef USE_FOG |
|
varying float vFogDepth; |
|
#endif`,hq=`#ifdef USE_FOG |
|
#ifdef FOG_EXP2 |
|
float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); |
|
#else |
|
float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); |
|
#endif |
|
gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); |
|
#endif`,fq=`#ifdef USE_FOG |
|
uniform vec3 fogColor; |
|
varying float vFogDepth; |
|
#ifdef FOG_EXP2 |
|
uniform float fogDensity; |
|
#else |
|
uniform float fogNear; |
|
uniform float fogFar; |
|
#endif |
|
#endif`,dq=`#ifdef USE_GRADIENTMAP |
|
uniform sampler2D gradientMap; |
|
#endif |
|
vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { |
|
float dotNL = dot( normal, lightDirection ); |
|
vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); |
|
#ifdef USE_GRADIENTMAP |
|
return vec3( texture2D( gradientMap, coord ).r ); |
|
#else |
|
vec2 fw = fwidth( coord ) * 0.5; |
|
return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); |
|
#endif |
|
}`,pq=`#ifdef USE_LIGHTMAP |
|
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); |
|
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; |
|
reflectedLight.indirectDiffuse += lightMapIrradiance; |
|
#endif`,vq=`#ifdef USE_LIGHTMAP |
|
uniform sampler2D lightMap; |
|
uniform float lightMapIntensity; |
|
#endif`,gq=`LambertMaterial material; |
|
material.diffuseColor = diffuseColor.rgb; |
|
material.specularStrength = specularStrength;`,mq=`varying vec3 vViewPosition; |
|
struct LambertMaterial { |
|
vec3 diffuseColor; |
|
float specularStrength; |
|
}; |
|
void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { |
|
float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); |
|
vec3 irradiance = dotNL * directLight.color; |
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
} |
|
void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { |
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
} |
|
#define RE_Direct RE_Direct_Lambert |
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,yq=`uniform bool receiveShadow; |
|
uniform vec3 ambientLightColor; |
|
#if defined( USE_LIGHT_PROBES ) |
|
uniform vec3 lightProbe[ 9 ]; |
|
#endif |
|
vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { |
|
float x = normal.x, y = normal.y, z = normal.z; |
|
vec3 result = shCoefficients[ 0 ] * 0.886227; |
|
result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; |
|
result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; |
|
result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; |
|
result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; |
|
result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; |
|
result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); |
|
result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; |
|
result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); |
|
return result; |
|
} |
|
vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { |
|
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); |
|
vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); |
|
return irradiance; |
|
} |
|
vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { |
|
vec3 irradiance = ambientLightColor; |
|
return irradiance; |
|
} |
|
float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { |
|
#if defined ( LEGACY_LIGHTS ) |
|
if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { |
|
return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); |
|
} |
|
return 1.0; |
|
#else |
|
float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); |
|
if ( cutoffDistance > 0.0 ) { |
|
distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); |
|
} |
|
return distanceFalloff; |
|
#endif |
|
} |
|
float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { |
|
return smoothstep( coneCosine, penumbraCosine, angleCosine ); |
|
} |
|
#if NUM_DIR_LIGHTS > 0 |
|
struct DirectionalLight { |
|
vec3 direction; |
|
vec3 color; |
|
}; |
|
uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; |
|
void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { |
|
light.color = directionalLight.color; |
|
light.direction = directionalLight.direction; |
|
light.visible = true; |
|
} |
|
#endif |
|
#if NUM_POINT_LIGHTS > 0 |
|
struct PointLight { |
|
vec3 position; |
|
vec3 color; |
|
float distance; |
|
float decay; |
|
}; |
|
uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; |
|
void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { |
|
vec3 lVector = pointLight.position - geometryPosition; |
|
light.direction = normalize( lVector ); |
|
float lightDistance = length( lVector ); |
|
light.color = pointLight.color; |
|
light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); |
|
light.visible = ( light.color != vec3( 0.0 ) ); |
|
} |
|
#endif |
|
#if NUM_SPOT_LIGHTS > 0 |
|
struct SpotLight { |
|
vec3 position; |
|
vec3 direction; |
|
vec3 color; |
|
float distance; |
|
float decay; |
|
float coneCos; |
|
float penumbraCos; |
|
}; |
|
uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; |
|
void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { |
|
vec3 lVector = spotLight.position - geometryPosition; |
|
light.direction = normalize( lVector ); |
|
float angleCos = dot( light.direction, spotLight.direction ); |
|
float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); |
|
if ( spotAttenuation > 0.0 ) { |
|
float lightDistance = length( lVector ); |
|
light.color = spotLight.color * spotAttenuation; |
|
light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); |
|
light.visible = ( light.color != vec3( 0.0 ) ); |
|
} else { |
|
light.color = vec3( 0.0 ); |
|
light.visible = false; |
|
} |
|
} |
|
#endif |
|
#if NUM_RECT_AREA_LIGHTS > 0 |
|
struct RectAreaLight { |
|
vec3 color; |
|
vec3 position; |
|
vec3 halfWidth; |
|
vec3 halfHeight; |
|
}; |
|
uniform sampler2D ltc_1; uniform sampler2D ltc_2; |
|
uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; |
|
#endif |
|
#if NUM_HEMI_LIGHTS > 0 |
|
struct HemisphereLight { |
|
vec3 direction; |
|
vec3 skyColor; |
|
vec3 groundColor; |
|
}; |
|
uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; |
|
vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { |
|
float dotNL = dot( normal, hemiLight.direction ); |
|
float hemiDiffuseWeight = 0.5 * dotNL + 0.5; |
|
vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); |
|
return irradiance; |
|
} |
|
#endif`,_q=`#ifdef USE_ENVMAP |
|
vec3 getIBLIrradiance( const in vec3 normal ) { |
|
#ifdef ENVMAP_TYPE_CUBE_UV |
|
vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); |
|
vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); |
|
return PI * envMapColor.rgb * envMapIntensity; |
|
#else |
|
return vec3( 0.0 ); |
|
#endif |
|
} |
|
vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { |
|
#ifdef ENVMAP_TYPE_CUBE_UV |
|
vec3 reflectVec = reflect( - viewDir, normal ); |
|
reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); |
|
reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); |
|
vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); |
|
return envMapColor.rgb * envMapIntensity; |
|
#else |
|
return vec3( 0.0 ); |
|
#endif |
|
} |
|
#ifdef USE_ANISOTROPY |
|
vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { |
|
#ifdef ENVMAP_TYPE_CUBE_UV |
|
vec3 bentNormal = cross( bitangent, viewDir ); |
|
bentNormal = normalize( cross( bentNormal, bitangent ) ); |
|
bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); |
|
return getIBLRadiance( viewDir, bentNormal, roughness ); |
|
#else |
|
return vec3( 0.0 ); |
|
#endif |
|
} |
|
#endif |
|
#endif`,xq=`ToonMaterial material; |
|
material.diffuseColor = diffuseColor.rgb;`,Sq=`varying vec3 vViewPosition; |
|
struct ToonMaterial { |
|
vec3 diffuseColor; |
|
}; |
|
void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { |
|
vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; |
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
} |
|
void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { |
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
} |
|
#define RE_Direct RE_Direct_Toon |
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,Aq=`BlinnPhongMaterial material; |
|
material.diffuseColor = diffuseColor.rgb; |
|
material.specularColor = specular; |
|
material.specularShininess = shininess; |
|
material.specularStrength = specularStrength;`,wq=`varying vec3 vViewPosition; |
|
struct BlinnPhongMaterial { |
|
vec3 diffuseColor; |
|
vec3 specularColor; |
|
float specularShininess; |
|
float specularStrength; |
|
}; |
|
void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { |
|
float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); |
|
vec3 irradiance = dotNL * directLight.color; |
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; |
|
} |
|
void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { |
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
} |
|
#define RE_Direct RE_Direct_BlinnPhong |
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,bq=`PhysicalMaterial material; |
|
material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); |
|
vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); |
|
float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); |
|
material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; |
|
material.roughness = min( material.roughness, 1.0 ); |
|
#ifdef IOR |
|
material.ior = ior; |
|
#ifdef USE_SPECULAR |
|
float specularIntensityFactor = specularIntensity; |
|
vec3 specularColorFactor = specularColor; |
|
#ifdef USE_SPECULAR_COLORMAP |
|
specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; |
|
#endif |
|
#ifdef USE_SPECULAR_INTENSITYMAP |
|
specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; |
|
#endif |
|
material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); |
|
#else |
|
float specularIntensityFactor = 1.0; |
|
vec3 specularColorFactor = vec3( 1.0 ); |
|
material.specularF90 = 1.0; |
|
#endif |
|
material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); |
|
#else |
|
material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); |
|
material.specularF90 = 1.0; |
|
#endif |
|
#ifdef USE_CLEARCOAT |
|
material.clearcoat = clearcoat; |
|
material.clearcoatRoughness = clearcoatRoughness; |
|
material.clearcoatF0 = vec3( 0.04 ); |
|
material.clearcoatF90 = 1.0; |
|
#ifdef USE_CLEARCOATMAP |
|
material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; |
|
#endif |
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP |
|
material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; |
|
#endif |
|
material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); |
|
material.clearcoatRoughness += geometryRoughness; |
|
material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); |
|
#endif |
|
#ifdef USE_IRIDESCENCE |
|
material.iridescence = iridescence; |
|
material.iridescenceIOR = iridescenceIOR; |
|
#ifdef USE_IRIDESCENCEMAP |
|
material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; |
|
#endif |
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP |
|
material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; |
|
#else |
|
material.iridescenceThickness = iridescenceThicknessMaximum; |
|
#endif |
|
#endif |
|
#ifdef USE_SHEEN |
|
material.sheenColor = sheenColor; |
|
#ifdef USE_SHEEN_COLORMAP |
|
material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; |
|
#endif |
|
material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); |
|
#ifdef USE_SHEEN_ROUGHNESSMAP |
|
material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; |
|
#endif |
|
#endif |
|
#ifdef USE_ANISOTROPY |
|
#ifdef USE_ANISOTROPYMAP |
|
mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); |
|
vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; |
|
vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; |
|
#else |
|
vec2 anisotropyV = anisotropyVector; |
|
#endif |
|
material.anisotropy = length( anisotropyV ); |
|
if( material.anisotropy == 0.0 ) { |
|
anisotropyV = vec2( 1.0, 0.0 ); |
|
} else { |
|
anisotropyV /= material.anisotropy; |
|
material.anisotropy = saturate( material.anisotropy ); |
|
} |
|
material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); |
|
material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; |
|
material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; |
|
#endif`,Tq=`struct PhysicalMaterial { |
|
vec3 diffuseColor; |
|
float roughness; |
|
vec3 specularColor; |
|
float specularF90; |
|
#ifdef USE_CLEARCOAT |
|
float clearcoat; |
|
float clearcoatRoughness; |
|
vec3 clearcoatF0; |
|
float clearcoatF90; |
|
#endif |
|
#ifdef USE_IRIDESCENCE |
|
float iridescence; |
|
float iridescenceIOR; |
|
float iridescenceThickness; |
|
vec3 iridescenceFresnel; |
|
vec3 iridescenceF0; |
|
#endif |
|
#ifdef USE_SHEEN |
|
vec3 sheenColor; |
|
float sheenRoughness; |
|
#endif |
|
#ifdef IOR |
|
float ior; |
|
#endif |
|
#ifdef USE_TRANSMISSION |
|
float transmission; |
|
float transmissionAlpha; |
|
float thickness; |
|
float attenuationDistance; |
|
vec3 attenuationColor; |
|
#endif |
|
#ifdef USE_ANISOTROPY |
|
float anisotropy; |
|
float alphaT; |
|
vec3 anisotropyT; |
|
vec3 anisotropyB; |
|
#endif |
|
}; |
|
vec3 clearcoatSpecularDirect = vec3( 0.0 ); |
|
vec3 clearcoatSpecularIndirect = vec3( 0.0 ); |
|
vec3 sheenSpecularDirect = vec3( 0.0 ); |
|
vec3 sheenSpecularIndirect = vec3(0.0 ); |
|
vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { |
|
float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); |
|
float x2 = x * x; |
|
float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); |
|
return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); |
|
} |
|
float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { |
|
float a2 = pow2( alpha ); |
|
float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); |
|
float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); |
|
return 0.5 / max( gv + gl, EPSILON ); |
|
} |
|
float D_GGX( const in float alpha, const in float dotNH ) { |
|
float a2 = pow2( alpha ); |
|
float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; |
|
return RECIPROCAL_PI * a2 / pow2( denom ); |
|
} |
|
#ifdef USE_ANISOTROPY |
|
float V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) { |
|
float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); |
|
float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); |
|
float v = 0.5 / ( gv + gl ); |
|
return saturate(v); |
|
} |
|
float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { |
|
float a2 = alphaT * alphaB; |
|
highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); |
|
highp float v2 = dot( v, v ); |
|
float w2 = a2 / v2; |
|
return RECIPROCAL_PI * a2 * pow2 ( w2 ); |
|
} |
|
#endif |
|
#ifdef USE_CLEARCOAT |
|
vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { |
|
vec3 f0 = material.clearcoatF0; |
|
float f90 = material.clearcoatF90; |
|
float roughness = material.clearcoatRoughness; |
|
float alpha = pow2( roughness ); |
|
vec3 halfDir = normalize( lightDir + viewDir ); |
|
float dotNL = saturate( dot( normal, lightDir ) ); |
|
float dotNV = saturate( dot( normal, viewDir ) ); |
|
float dotNH = saturate( dot( normal, halfDir ) ); |
|
float dotVH = saturate( dot( viewDir, halfDir ) ); |
|
vec3 F = F_Schlick( f0, f90, dotVH ); |
|
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); |
|
float D = D_GGX( alpha, dotNH ); |
|
return F * ( V * D ); |
|
} |
|
#endif |
|
vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { |
|
vec3 f0 = material.specularColor; |
|
float f90 = material.specularF90; |
|
float roughness = material.roughness; |
|
float alpha = pow2( roughness ); |
|
vec3 halfDir = normalize( lightDir + viewDir ); |
|
float dotNL = saturate( dot( normal, lightDir ) ); |
|
float dotNV = saturate( dot( normal, viewDir ) ); |
|
float dotNH = saturate( dot( normal, halfDir ) ); |
|
float dotVH = saturate( dot( viewDir, halfDir ) ); |
|
vec3 F = F_Schlick( f0, f90, dotVH ); |
|
#ifdef USE_IRIDESCENCE |
|
F = mix( F, material.iridescenceFresnel, material.iridescence ); |
|
#endif |
|
#ifdef USE_ANISOTROPY |
|
float dotTL = dot( material.anisotropyT, lightDir ); |
|
float dotTV = dot( material.anisotropyT, viewDir ); |
|
float dotTH = dot( material.anisotropyT, halfDir ); |
|
float dotBL = dot( material.anisotropyB, lightDir ); |
|
float dotBV = dot( material.anisotropyB, viewDir ); |
|
float dotBH = dot( material.anisotropyB, halfDir ); |
|
float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); |
|
float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); |
|
#else |
|
float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); |
|
float D = D_GGX( alpha, dotNH ); |
|
#endif |
|
return F * ( V * D ); |
|
} |
|
vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { |
|
const float LUT_SIZE = 64.0; |
|
const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; |
|
const float LUT_BIAS = 0.5 / LUT_SIZE; |
|
float dotNV = saturate( dot( N, V ) ); |
|
vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); |
|
uv = uv * LUT_SCALE + LUT_BIAS; |
|
return uv; |
|
} |
|
float LTC_ClippedSphereFormFactor( const in vec3 f ) { |
|
float l = length( f ); |
|
return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); |
|
} |
|
vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { |
|
float x = dot( v1, v2 ); |
|
float y = abs( x ); |
|
float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; |
|
float b = 3.4175940 + ( 4.1616724 + y ) * y; |
|
float v = a / b; |
|
float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; |
|
return cross( v1, v2 ) * theta_sintheta; |
|
} |
|
vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { |
|
vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; |
|
vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; |
|
vec3 lightNormal = cross( v1, v2 ); |
|
if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); |
|
vec3 T1, T2; |
|
T1 = normalize( V - N * dot( V, N ) ); |
|
T2 = - cross( N, T1 ); |
|
mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); |
|
vec3 coords[ 4 ]; |
|
coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); |
|
coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); |
|
coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); |
|
coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); |
|
coords[ 0 ] = normalize( coords[ 0 ] ); |
|
coords[ 1 ] = normalize( coords[ 1 ] ); |
|
coords[ 2 ] = normalize( coords[ 2 ] ); |
|
coords[ 3 ] = normalize( coords[ 3 ] ); |
|
vec3 vectorFormFactor = vec3( 0.0 ); |
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); |
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); |
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); |
|
vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); |
|
float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); |
|
return vec3( result ); |
|
} |
|
#if defined( USE_SHEEN ) |
|
float D_Charlie( float roughness, float dotNH ) { |
|
float alpha = pow2( roughness ); |
|
float invAlpha = 1.0 / alpha; |
|
float cos2h = dotNH * dotNH; |
|
float sin2h = max( 1.0 - cos2h, 0.0078125 ); |
|
return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); |
|
} |
|
float V_Neubelt( float dotNV, float dotNL ) { |
|
return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); |
|
} |
|
vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { |
|
vec3 halfDir = normalize( lightDir + viewDir ); |
|
float dotNL = saturate( dot( normal, lightDir ) ); |
|
float dotNV = saturate( dot( normal, viewDir ) ); |
|
float dotNH = saturate( dot( normal, halfDir ) ); |
|
float D = D_Charlie( sheenRoughness, dotNH ); |
|
float V = V_Neubelt( dotNV, dotNL ); |
|
return sheenColor * ( D * V ); |
|
} |
|
#endif |
|
float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { |
|
float dotNV = saturate( dot( normal, viewDir ) ); |
|
float r2 = roughness * roughness; |
|
float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; |
|
float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; |
|
float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); |
|
return saturate( DG * RECIPROCAL_PI ); |
|
} |
|
vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { |
|
float dotNV = saturate( dot( normal, viewDir ) ); |
|
const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); |
|
const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); |
|
vec4 r = roughness * c0 + c1; |
|
float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; |
|
vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; |
|
return fab; |
|
} |
|
vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { |
|
vec2 fab = DFGApprox( normal, viewDir, roughness ); |
|
return specularColor * fab.x + specularF90 * fab.y; |
|
} |
|
#ifdef USE_IRIDESCENCE |
|
void computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { |
|
#else |
|
void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { |
|
#endif |
|
vec2 fab = DFGApprox( normal, viewDir, roughness ); |
|
#ifdef USE_IRIDESCENCE |
|
vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); |
|
#else |
|
vec3 Fr = specularColor; |
|
#endif |
|
vec3 FssEss = Fr * fab.x + specularF90 * fab.y; |
|
float Ess = fab.x + fab.y; |
|
float Ems = 1.0 - Ess; |
|
vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); |
|
singleScatter += FssEss; |
|
multiScatter += Fms * Ems; |
|
} |
|
#if NUM_RECT_AREA_LIGHTS > 0 |
|
void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { |
|
vec3 normal = geometryNormal; |
|
vec3 viewDir = geometryViewDir; |
|
vec3 position = geometryPosition; |
|
vec3 lightPos = rectAreaLight.position; |
|
vec3 halfWidth = rectAreaLight.halfWidth; |
|
vec3 halfHeight = rectAreaLight.halfHeight; |
|
vec3 lightColor = rectAreaLight.color; |
|
float roughness = material.roughness; |
|
vec3 rectCoords[ 4 ]; |
|
rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; |
|
rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; |
|
rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; |
|
vec2 uv = LTC_Uv( normal, viewDir, roughness ); |
|
vec4 t1 = texture2D( ltc_1, uv ); |
|
vec4 t2 = texture2D( ltc_2, uv ); |
|
mat3 mInv = mat3( |
|
vec3( t1.x, 0, t1.y ), |
|
vec3( 0, 1, 0 ), |
|
vec3( t1.z, 0, t1.w ) |
|
); |
|
vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); |
|
reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); |
|
reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); |
|
} |
|
#endif |
|
void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { |
|
float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); |
|
vec3 irradiance = dotNL * directLight.color; |
|
#ifdef USE_CLEARCOAT |
|
float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); |
|
vec3 ccIrradiance = dotNLcc * directLight.color; |
|
clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); |
|
#endif |
|
#ifdef USE_SHEEN |
|
sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); |
|
#endif |
|
reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); |
|
reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
} |
|
void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { |
|
reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); |
|
} |
|
void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { |
|
#ifdef USE_CLEARCOAT |
|
clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); |
|
#endif |
|
#ifdef USE_SHEEN |
|
sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); |
|
#endif |
|
vec3 singleScattering = vec3( 0.0 ); |
|
vec3 multiScattering = vec3( 0.0 ); |
|
vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; |
|
#ifdef USE_IRIDESCENCE |
|
computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); |
|
#else |
|
computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); |
|
#endif |
|
vec3 totalScattering = singleScattering + multiScattering; |
|
vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); |
|
reflectedLight.indirectSpecular += radiance * singleScattering; |
|
reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; |
|
reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; |
|
} |
|
#define RE_Direct RE_Direct_Physical |
|
#define RE_Direct_RectArea RE_Direct_RectArea_Physical |
|
#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical |
|
#define RE_IndirectSpecular RE_IndirectSpecular_Physical |
|
float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { |
|
return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); |
|
}`,Mq=` |
|
vec3 geometryPosition = - vViewPosition; |
|
vec3 geometryNormal = normal; |
|
vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); |
|
vec3 geometryClearcoatNormal = vec3( 0.0 ); |
|
#ifdef USE_CLEARCOAT |
|
geometryClearcoatNormal = clearcoatNormal; |
|
#endif |
|
#ifdef USE_IRIDESCENCE |
|
float dotNVi = saturate( dot( normal, geometryViewDir ) ); |
|
if ( material.iridescenceThickness == 0.0 ) { |
|
material.iridescence = 0.0; |
|
} else { |
|
material.iridescence = saturate( material.iridescence ); |
|
} |
|
if ( material.iridescence > 0.0 ) { |
|
material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); |
|
material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); |
|
} |
|
#endif |
|
IncidentLight directLight; |
|
#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) |
|
PointLight pointLight; |
|
#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 |
|
PointLightShadow pointLightShadow; |
|
#endif |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { |
|
pointLight = pointLights[ i ]; |
|
getPointLightInfo( pointLight, geometryPosition, directLight ); |
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) |
|
pointLightShadow = pointLightShadows[ i ]; |
|
directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; |
|
#endif |
|
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) |
|
SpotLight spotLight; |
|
vec4 spotColor; |
|
vec3 spotLightCoord; |
|
bool inSpotLightMap; |
|
#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 |
|
SpotLightShadow spotLightShadow; |
|
#endif |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { |
|
spotLight = spotLights[ i ]; |
|
getSpotLightInfo( spotLight, geometryPosition, directLight ); |
|
#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) |
|
#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX |
|
#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) |
|
#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS |
|
#else |
|
#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) |
|
#endif |
|
#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) |
|
spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; |
|
inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); |
|
spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); |
|
directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; |
|
#endif |
|
#undef SPOT_LIGHT_MAP_INDEX |
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) |
|
spotLightShadow = spotLightShadows[ i ]; |
|
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; |
|
#endif |
|
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) |
|
DirectionalLight directionalLight; |
|
#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 |
|
DirectionalLightShadow directionalLightShadow; |
|
#endif |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { |
|
directionalLight = directionalLights[ i ]; |
|
getDirectionalLightInfo( directionalLight, directLight ); |
|
#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) |
|
directionalLightShadow = directionalLightShadows[ i ]; |
|
directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; |
|
#endif |
|
RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) |
|
RectAreaLight rectAreaLight; |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { |
|
rectAreaLight = rectAreaLights[ i ]; |
|
RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#if defined( RE_IndirectDiffuse ) |
|
vec3 iblIrradiance = vec3( 0.0 ); |
|
vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); |
|
#if defined( USE_LIGHT_PROBES ) |
|
irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); |
|
#endif |
|
#if ( NUM_HEMI_LIGHTS > 0 ) |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { |
|
irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#endif |
|
#if defined( RE_IndirectSpecular ) |
|
vec3 radiance = vec3( 0.0 ); |
|
vec3 clearcoatRadiance = vec3( 0.0 ); |
|
#endif`,Cq=`#if defined( RE_IndirectDiffuse ) |
|
#ifdef USE_LIGHTMAP |
|
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); |
|
vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; |
|
irradiance += lightMapIrradiance; |
|
#endif |
|
#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) |
|
iblIrradiance += getIBLIrradiance( geometryNormal ); |
|
#endif |
|
#endif |
|
#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) |
|
#ifdef USE_ANISOTROPY |
|
radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); |
|
#else |
|
radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); |
|
#endif |
|
#ifdef USE_CLEARCOAT |
|
clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); |
|
#endif |
|
#endif`,Eq=`#if defined( RE_IndirectDiffuse ) |
|
RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); |
|
#endif |
|
#if defined( RE_IndirectSpecular ) |
|
RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); |
|
#endif`,Lq=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) |
|
gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; |
|
#endif`,Pq=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) |
|
uniform float logDepthBufFC; |
|
varying float vFragDepth; |
|
varying float vIsPerspective; |
|
#endif`,Rq=`#ifdef USE_LOGDEPTHBUF |
|
#ifdef USE_LOGDEPTHBUF_EXT |
|
varying float vFragDepth; |
|
varying float vIsPerspective; |
|
#else |
|
uniform float logDepthBufFC; |
|
#endif |
|
#endif`,Dq=`#ifdef USE_LOGDEPTHBUF |
|
#ifdef USE_LOGDEPTHBUF_EXT |
|
vFragDepth = 1.0 + gl_Position.w; |
|
vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); |
|
#else |
|
if ( isPerspectiveMatrix( projectionMatrix ) ) { |
|
gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; |
|
gl_Position.z *= gl_Position.w; |
|
} |
|
#endif |
|
#endif`,Iq=`#ifdef USE_MAP |
|
vec4 sampledDiffuseColor = texture2D( map, vMapUv ); |
|
#ifdef DECODE_VIDEO_TEXTURE |
|
sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); |
|
|
|
#endif |
|
diffuseColor *= sampledDiffuseColor; |
|
#endif`,Nq=`#ifdef USE_MAP |
|
uniform sampler2D map; |
|
#endif`,kq=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) |
|
#if defined( USE_POINTS_UV ) |
|
vec2 uv = vUv; |
|
#else |
|
vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; |
|
#endif |
|
#endif |
|
#ifdef USE_MAP |
|
diffuseColor *= texture2D( map, uv ); |
|
#endif |
|
#ifdef USE_ALPHAMAP |
|
diffuseColor.a *= texture2D( alphaMap, uv ).g; |
|
#endif`,Oq=`#if defined( USE_POINTS_UV ) |
|
varying vec2 vUv; |
|
#else |
|
#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) |
|
uniform mat3 uvTransform; |
|
#endif |
|
#endif |
|
#ifdef USE_MAP |
|
uniform sampler2D map; |
|
#endif |
|
#ifdef USE_ALPHAMAP |
|
uniform sampler2D alphaMap; |
|
#endif`,Fq=`float metalnessFactor = metalness; |
|
#ifdef USE_METALNESSMAP |
|
vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); |
|
metalnessFactor *= texelMetalness.b; |
|
#endif`,Bq=`#ifdef USE_METALNESSMAP |
|
uniform sampler2D metalnessMap; |
|
#endif`,zq=`#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE ) |
|
vColor *= morphTargetBaseInfluence; |
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { |
|
#if defined( USE_COLOR_ALPHA ) |
|
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; |
|
#elif defined( USE_COLOR ) |
|
if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; |
|
#endif |
|
} |
|
#endif`,Uq=`#ifdef USE_MORPHNORMALS |
|
objectNormal *= morphTargetBaseInfluence; |
|
#ifdef MORPHTARGETS_TEXTURE |
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { |
|
if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; |
|
} |
|
#else |
|
objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; |
|
objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; |
|
objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; |
|
objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; |
|
#endif |
|
#endif`,Vq=`#ifdef USE_MORPHTARGETS |
|
uniform float morphTargetBaseInfluence; |
|
#ifdef MORPHTARGETS_TEXTURE |
|
uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; |
|
uniform sampler2DArray morphTargetsTexture; |
|
uniform ivec2 morphTargetsTextureSize; |
|
vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { |
|
int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; |
|
int y = texelIndex / morphTargetsTextureSize.x; |
|
int x = texelIndex - y * morphTargetsTextureSize.x; |
|
ivec3 morphUV = ivec3( x, y, morphTargetIndex ); |
|
return texelFetch( morphTargetsTexture, morphUV, 0 ); |
|
} |
|
#else |
|
#ifndef USE_MORPHNORMALS |
|
uniform float morphTargetInfluences[ 8 ]; |
|
#else |
|
uniform float morphTargetInfluences[ 4 ]; |
|
#endif |
|
#endif |
|
#endif`,Gq=`#ifdef USE_MORPHTARGETS |
|
transformed *= morphTargetBaseInfluence; |
|
#ifdef MORPHTARGETS_TEXTURE |
|
for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { |
|
if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; |
|
} |
|
#else |
|
transformed += morphTarget0 * morphTargetInfluences[ 0 ]; |
|
transformed += morphTarget1 * morphTargetInfluences[ 1 ]; |
|
transformed += morphTarget2 * morphTargetInfluences[ 2 ]; |
|
transformed += morphTarget3 * morphTargetInfluences[ 3 ]; |
|
#ifndef USE_MORPHNORMALS |
|
transformed += morphTarget4 * morphTargetInfluences[ 4 ]; |
|
transformed += morphTarget5 * morphTargetInfluences[ 5 ]; |
|
transformed += morphTarget6 * morphTargetInfluences[ 6 ]; |
|
transformed += morphTarget7 * morphTargetInfluences[ 7 ]; |
|
#endif |
|
#endif |
|
#endif`,Hq=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; |
|
#ifdef FLAT_SHADED |
|
vec3 fdx = dFdx( vViewPosition ); |
|
vec3 fdy = dFdy( vViewPosition ); |
|
vec3 normal = normalize( cross( fdx, fdy ) ); |
|
#else |
|
vec3 normal = normalize( vNormal ); |
|
#ifdef DOUBLE_SIDED |
|
normal *= faceDirection; |
|
#endif |
|
#endif |
|
#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) |
|
#ifdef USE_TANGENT |
|
mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); |
|
#else |
|
mat3 tbn = getTangentFrame( - vViewPosition, normal, |
|
#if defined( USE_NORMALMAP ) |
|
vNormalMapUv |
|
#elif defined( USE_CLEARCOAT_NORMALMAP ) |
|
vClearcoatNormalMapUv |
|
#else |
|
vUv |
|
#endif |
|
); |
|
#endif |
|
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) |
|
tbn[0] *= faceDirection; |
|
tbn[1] *= faceDirection; |
|
#endif |
|
#endif |
|
#ifdef USE_CLEARCOAT_NORMALMAP |
|
#ifdef USE_TANGENT |
|
mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); |
|
#else |
|
mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); |
|
#endif |
|
#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) |
|
tbn2[0] *= faceDirection; |
|
tbn2[1] *= faceDirection; |
|
#endif |
|
#endif |
|
vec3 nonPerturbedNormal = normal;`,Wq=`#ifdef USE_NORMALMAP_OBJECTSPACE |
|
normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; |
|
#ifdef FLIP_SIDED |
|
normal = - normal; |
|
#endif |
|
#ifdef DOUBLE_SIDED |
|
normal = normal * faceDirection; |
|
#endif |
|
normal = normalize( normalMatrix * normal ); |
|
#elif defined( USE_NORMALMAP_TANGENTSPACE ) |
|
vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; |
|
mapN.xy *= normalScale; |
|
normal = normalize( tbn * mapN ); |
|
#elif defined( USE_BUMPMAP ) |
|
normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); |
|
#endif`,$q=`#ifndef FLAT_SHADED |
|
varying vec3 vNormal; |
|
#ifdef USE_TANGENT |
|
varying vec3 vTangent; |
|
varying vec3 vBitangent; |
|
#endif |
|
#endif`,Xq=`#ifndef FLAT_SHADED |
|
varying vec3 vNormal; |
|
#ifdef USE_TANGENT |
|
varying vec3 vTangent; |
|
varying vec3 vBitangent; |
|
#endif |
|
#endif`,Yq=`#ifndef FLAT_SHADED |
|
vNormal = normalize( transformedNormal ); |
|
#ifdef USE_TANGENT |
|
vTangent = normalize( transformedTangent ); |
|
vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); |
|
#endif |
|
#endif`,qq=`#ifdef USE_NORMALMAP |
|
uniform sampler2D normalMap; |
|
uniform vec2 normalScale; |
|
#endif |
|
#ifdef USE_NORMALMAP_OBJECTSPACE |
|
uniform mat3 normalMatrix; |
|
#endif |
|
#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) |
|
mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { |
|
vec3 q0 = dFdx( eye_pos.xyz ); |
|
vec3 q1 = dFdy( eye_pos.xyz ); |
|
vec2 st0 = dFdx( uv.st ); |
|
vec2 st1 = dFdy( uv.st ); |
|
vec3 N = surf_norm; |
|
vec3 q1perp = cross( q1, N ); |
|
vec3 q0perp = cross( N, q0 ); |
|
vec3 T = q1perp * st0.x + q0perp * st1.x; |
|
vec3 B = q1perp * st0.y + q0perp * st1.y; |
|
float det = max( dot( T, T ), dot( B, B ) ); |
|
float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); |
|
return mat3( T * scale, B * scale, N ); |
|
} |
|
#endif`,jq=`#ifdef USE_CLEARCOAT |
|
vec3 clearcoatNormal = nonPerturbedNormal; |
|
#endif`,Kq=`#ifdef USE_CLEARCOAT_NORMALMAP |
|
vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; |
|
clearcoatMapN.xy *= clearcoatNormalScale; |
|
clearcoatNormal = normalize( tbn2 * clearcoatMapN ); |
|
#endif`,Zq=`#ifdef USE_CLEARCOATMAP |
|
uniform sampler2D clearcoatMap; |
|
#endif |
|
#ifdef USE_CLEARCOAT_NORMALMAP |
|
uniform sampler2D clearcoatNormalMap; |
|
uniform vec2 clearcoatNormalScale; |
|
#endif |
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP |
|
uniform sampler2D clearcoatRoughnessMap; |
|
#endif`,Qq=`#ifdef USE_IRIDESCENCEMAP |
|
uniform sampler2D iridescenceMap; |
|
#endif |
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP |
|
uniform sampler2D iridescenceThicknessMap; |
|
#endif`,Jq=`#ifdef OPAQUE |
|
diffuseColor.a = 1.0; |
|
#endif |
|
#ifdef USE_TRANSMISSION |
|
diffuseColor.a *= material.transmissionAlpha; |
|
#endif |
|
gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,ej=`vec3 packNormalToRGB( const in vec3 normal ) { |
|
return normalize( normal ) * 0.5 + 0.5; |
|
} |
|
vec3 unpackRGBToNormal( const in vec3 rgb ) { |
|
return 2.0 * rgb.xyz - 1.0; |
|
} |
|
const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; |
|
const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); |
|
const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); |
|
const float ShiftRight8 = 1. / 256.; |
|
vec4 packDepthToRGBA( const in float v ) { |
|
vec4 r = vec4( fract( v * PackFactors ), v ); |
|
r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; |
|
} |
|
float unpackRGBAToDepth( const in vec4 v ) { |
|
return dot( v, UnpackFactors ); |
|
} |
|
vec2 packDepthToRG( in highp float v ) { |
|
return packDepthToRGBA( v ).yx; |
|
} |
|
float unpackRGToDepth( const in highp vec2 v ) { |
|
return unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) ); |
|
} |
|
vec4 pack2HalfToRGBA( vec2 v ) { |
|
vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); |
|
return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); |
|
} |
|
vec2 unpackRGBATo2Half( vec4 v ) { |
|
return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); |
|
} |
|
float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { |
|
return ( viewZ + near ) / ( near - far ); |
|
} |
|
float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { |
|
return depth * ( near - far ) - near; |
|
} |
|
float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { |
|
return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); |
|
} |
|
float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { |
|
return ( near * far ) / ( ( far - near ) * depth - far ); |
|
}`,tj=`#ifdef PREMULTIPLIED_ALPHA |
|
gl_FragColor.rgb *= gl_FragColor.a; |
|
#endif`,nj=`vec4 mvPosition = vec4( transformed, 1.0 ); |
|
#ifdef USE_BATCHING |
|
mvPosition = batchingMatrix * mvPosition; |
|
#endif |
|
#ifdef USE_INSTANCING |
|
mvPosition = instanceMatrix * mvPosition; |
|
#endif |
|
mvPosition = modelViewMatrix * mvPosition; |
|
gl_Position = projectionMatrix * mvPosition;`,rj=`#ifdef DITHERING |
|
gl_FragColor.rgb = dithering( gl_FragColor.rgb ); |
|
#endif`,ij=`#ifdef DITHERING |
|
vec3 dithering( vec3 color ) { |
|
float grid_position = rand( gl_FragCoord.xy ); |
|
vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); |
|
dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); |
|
return color + dither_shift_RGB; |
|
} |
|
#endif`,aj=`float roughnessFactor = roughness; |
|
#ifdef USE_ROUGHNESSMAP |
|
vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); |
|
roughnessFactor *= texelRoughness.g; |
|
#endif`,oj=`#ifdef USE_ROUGHNESSMAP |
|
uniform sampler2D roughnessMap; |
|
#endif`,sj=`#if NUM_SPOT_LIGHT_COORDS > 0 |
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; |
|
#endif |
|
#if NUM_SPOT_LIGHT_MAPS > 0 |
|
uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; |
|
#endif |
|
#ifdef USE_SHADOWMAP |
|
#if NUM_DIR_LIGHT_SHADOWS > 0 |
|
uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; |
|
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; |
|
struct DirectionalLightShadow { |
|
float shadowBias; |
|
float shadowNormalBias; |
|
float shadowRadius; |
|
vec2 shadowMapSize; |
|
}; |
|
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; |
|
#endif |
|
#if NUM_SPOT_LIGHT_SHADOWS > 0 |
|
uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; |
|
struct SpotLightShadow { |
|
float shadowBias; |
|
float shadowNormalBias; |
|
float shadowRadius; |
|
vec2 shadowMapSize; |
|
}; |
|
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; |
|
#endif |
|
#if NUM_POINT_LIGHT_SHADOWS > 0 |
|
uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; |
|
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; |
|
struct PointLightShadow { |
|
float shadowBias; |
|
float shadowNormalBias; |
|
float shadowRadius; |
|
vec2 shadowMapSize; |
|
float shadowCameraNear; |
|
float shadowCameraFar; |
|
}; |
|
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; |
|
#endif |
|
float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { |
|
return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); |
|
} |
|
vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { |
|
return unpackRGBATo2Half( texture2D( shadow, uv ) ); |
|
} |
|
float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ |
|
float occlusion = 1.0; |
|
vec2 distribution = texture2DDistribution( shadow, uv ); |
|
float hard_shadow = step( compare , distribution.x ); |
|
if (hard_shadow != 1.0 ) { |
|
float distance = compare - distribution.x ; |
|
float variance = max( 0.00000, distribution.y * distribution.y ); |
|
float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); |
|
} |
|
return occlusion; |
|
} |
|
float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { |
|
float shadow = 1.0; |
|
shadowCoord.xyz /= shadowCoord.w; |
|
shadowCoord.z += shadowBias; |
|
bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; |
|
bool frustumTest = inFrustum && shadowCoord.z <= 1.0; |
|
if ( frustumTest ) { |
|
#if defined( SHADOWMAP_TYPE_PCF ) |
|
vec2 texelSize = vec2( 1.0 ) / shadowMapSize; |
|
float dx0 = - texelSize.x * shadowRadius; |
|
float dy0 = - texelSize.y * shadowRadius; |
|
float dx1 = + texelSize.x * shadowRadius; |
|
float dy1 = + texelSize.y * shadowRadius; |
|
float dx2 = dx0 / 2.0; |
|
float dy2 = dy0 / 2.0; |
|
float dx3 = dx1 / 2.0; |
|
float dy3 = dy1 / 2.0; |
|
shadow = ( |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) |
|
) * ( 1.0 / 17.0 ); |
|
#elif defined( SHADOWMAP_TYPE_PCF_SOFT ) |
|
vec2 texelSize = vec2( 1.0 ) / shadowMapSize; |
|
float dx = texelSize.x; |
|
float dy = texelSize.y; |
|
vec2 uv = shadowCoord.xy; |
|
vec2 f = fract( uv * shadowMapSize + 0.5 ); |
|
uv -= f * texelSize; |
|
shadow = ( |
|
texture2DCompare( shadowMap, uv, shadowCoord.z ) + |
|
texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + |
|
texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + |
|
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), |
|
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), |
|
f.x ) + |
|
mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), |
|
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), |
|
f.x ) + |
|
mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), |
|
texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), |
|
f.y ) + |
|
mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), |
|
texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), |
|
f.y ) + |
|
mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), |
|
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), |
|
f.x ), |
|
mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), |
|
texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), |
|
f.x ), |
|
f.y ) |
|
) * ( 1.0 / 9.0 ); |
|
#elif defined( SHADOWMAP_TYPE_VSM ) |
|
shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); |
|
#else |
|
shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); |
|
#endif |
|
} |
|
return shadow; |
|
} |
|
vec2 cubeToUV( vec3 v, float texelSizeY ) { |
|
vec3 absV = abs( v ); |
|
float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); |
|
absV *= scaleToCube; |
|
v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); |
|
vec2 planar = v.xy; |
|
float almostATexel = 1.5 * texelSizeY; |
|
float almostOne = 1.0 - almostATexel; |
|
if ( absV.z >= almostOne ) { |
|
if ( v.z > 0.0 ) |
|
planar.x = 4.0 - v.x; |
|
} else if ( absV.x >= almostOne ) { |
|
float signX = sign( v.x ); |
|
planar.x = v.z * signX + 2.0 * signX; |
|
} else if ( absV.y >= almostOne ) { |
|
float signY = sign( v.y ); |
|
planar.x = v.x + 2.0 * signY + 2.0; |
|
planar.y = v.z * signY - 2.0; |
|
} |
|
return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); |
|
} |
|
float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { |
|
vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); |
|
vec3 lightToPosition = shadowCoord.xyz; |
|
float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; |
|
vec3 bd3D = normalize( lightToPosition ); |
|
#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) |
|
vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; |
|
return ( |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + |
|
texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) |
|
) * ( 1.0 / 9.0 ); |
|
#else |
|
return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); |
|
#endif |
|
} |
|
#endif`,lj=`#if NUM_SPOT_LIGHT_COORDS > 0 |
|
uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; |
|
varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; |
|
#endif |
|
#ifdef USE_SHADOWMAP |
|
#if NUM_DIR_LIGHT_SHADOWS > 0 |
|
uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; |
|
varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; |
|
struct DirectionalLightShadow { |
|
float shadowBias; |
|
float shadowNormalBias; |
|
float shadowRadius; |
|
vec2 shadowMapSize; |
|
}; |
|
uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; |
|
#endif |
|
#if NUM_SPOT_LIGHT_SHADOWS > 0 |
|
struct SpotLightShadow { |
|
float shadowBias; |
|
float shadowNormalBias; |
|
float shadowRadius; |
|
vec2 shadowMapSize; |
|
}; |
|
uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; |
|
#endif |
|
#if NUM_POINT_LIGHT_SHADOWS > 0 |
|
uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; |
|
varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; |
|
struct PointLightShadow { |
|
float shadowBias; |
|
float shadowNormalBias; |
|
float shadowRadius; |
|
vec2 shadowMapSize; |
|
float shadowCameraNear; |
|
float shadowCameraFar; |
|
}; |
|
uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; |
|
#endif |
|
#endif`,uj=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) |
|
vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); |
|
vec4 shadowWorldPosition; |
|
#endif |
|
#if defined( USE_SHADOWMAP ) |
|
#if NUM_DIR_LIGHT_SHADOWS > 0 |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { |
|
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); |
|
vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#if NUM_POINT_LIGHT_SHADOWS > 0 |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { |
|
shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); |
|
vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#endif |
|
#if NUM_SPOT_LIGHT_COORDS > 0 |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { |
|
shadowWorldPosition = worldPosition; |
|
#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) |
|
shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; |
|
#endif |
|
vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; |
|
} |
|
#pragma unroll_loop_end |
|
#endif`,cj=`float getShadowMask() { |
|
float shadow = 1.0; |
|
#ifdef USE_SHADOWMAP |
|
#if NUM_DIR_LIGHT_SHADOWS > 0 |
|
DirectionalLightShadow directionalLight; |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { |
|
directionalLight = directionalLightShadows[ i ]; |
|
shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#if NUM_SPOT_LIGHT_SHADOWS > 0 |
|
SpotLightShadow spotLight; |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { |
|
spotLight = spotLightShadows[ i ]; |
|
shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#if NUM_POINT_LIGHT_SHADOWS > 0 |
|
PointLightShadow pointLight; |
|
#pragma unroll_loop_start |
|
for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { |
|
pointLight = pointLightShadows[ i ]; |
|
shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; |
|
} |
|
#pragma unroll_loop_end |
|
#endif |
|
#endif |
|
return shadow; |
|
}`,hj=`#ifdef USE_SKINNING |
|
mat4 boneMatX = getBoneMatrix( skinIndex.x ); |
|
mat4 boneMatY = getBoneMatrix( skinIndex.y ); |
|
mat4 boneMatZ = getBoneMatrix( skinIndex.z ); |
|
mat4 boneMatW = getBoneMatrix( skinIndex.w ); |
|
#endif`,fj=`#ifdef USE_SKINNING |
|
uniform mat4 bindMatrix; |
|
uniform mat4 bindMatrixInverse; |
|
uniform highp sampler2D boneTexture; |
|
mat4 getBoneMatrix( const in float i ) { |
|
int size = textureSize( boneTexture, 0 ).x; |
|
int j = int( i ) * 4; |
|
int x = j % size; |
|
int y = j / size; |
|
vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); |
|
vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); |
|
vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); |
|
vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); |
|
return mat4( v1, v2, v3, v4 ); |
|
} |
|
#endif`,dj=`#ifdef USE_SKINNING |
|
vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); |
|
vec4 skinned = vec4( 0.0 ); |
|
skinned += boneMatX * skinVertex * skinWeight.x; |
|
skinned += boneMatY * skinVertex * skinWeight.y; |
|
skinned += boneMatZ * skinVertex * skinWeight.z; |
|
skinned += boneMatW * skinVertex * skinWeight.w; |
|
transformed = ( bindMatrixInverse * skinned ).xyz; |
|
#endif`,pj=`#ifdef USE_SKINNING |
|
mat4 skinMatrix = mat4( 0.0 ); |
|
skinMatrix += skinWeight.x * boneMatX; |
|
skinMatrix += skinWeight.y * boneMatY; |
|
skinMatrix += skinWeight.z * boneMatZ; |
|
skinMatrix += skinWeight.w * boneMatW; |
|
skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; |
|
objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; |
|
#ifdef USE_TANGENT |
|
objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; |
|
#endif |
|
#endif`,vj=`float specularStrength; |
|
#ifdef USE_SPECULARMAP |
|
vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); |
|
specularStrength = texelSpecular.r; |
|
#else |
|
specularStrength = 1.0; |
|
#endif`,gj=`#ifdef USE_SPECULARMAP |
|
uniform sampler2D specularMap; |
|
#endif`,mj=`#if defined( TONE_MAPPING ) |
|
gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); |
|
#endif`,yj=`#ifndef saturate |
|
#define saturate( a ) clamp( a, 0.0, 1.0 ) |
|
#endif |
|
uniform float toneMappingExposure; |
|
vec3 LinearToneMapping( vec3 color ) { |
|
return saturate( toneMappingExposure * color ); |
|
} |
|
vec3 ReinhardToneMapping( vec3 color ) { |
|
color *= toneMappingExposure; |
|
return saturate( color / ( vec3( 1.0 ) + color ) ); |
|
} |
|
vec3 OptimizedCineonToneMapping( vec3 color ) { |
|
color *= toneMappingExposure; |
|
color = max( vec3( 0.0 ), color - 0.004 ); |
|
return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); |
|
} |
|
vec3 RRTAndODTFit( vec3 v ) { |
|
vec3 a = v * ( v + 0.0245786 ) - 0.000090537; |
|
vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; |
|
return a / b; |
|
} |
|
vec3 ACESFilmicToneMapping( vec3 color ) { |
|
const mat3 ACESInputMat = mat3( |
|
vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), |
|
vec3( 0.04823, 0.01566, 0.83777 ) |
|
); |
|
const mat3 ACESOutputMat = mat3( |
|
vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), |
|
vec3( -0.07367, -0.00605, 1.07602 ) |
|
); |
|
color *= toneMappingExposure / 0.6; |
|
color = ACESInputMat * color; |
|
color = RRTAndODTFit( color ); |
|
color = ACESOutputMat * color; |
|
return saturate( color ); |
|
} |
|
const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( |
|
vec3( 1.6605, - 0.1246, - 0.0182 ), |
|
vec3( - 0.5876, 1.1329, - 0.1006 ), |
|
vec3( - 0.0728, - 0.0083, 1.1187 ) |
|
); |
|
const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( |
|
vec3( 0.6274, 0.0691, 0.0164 ), |
|
vec3( 0.3293, 0.9195, 0.0880 ), |
|
vec3( 0.0433, 0.0113, 0.8956 ) |
|
); |
|
vec3 agxDefaultContrastApprox( vec3 x ) { |
|
vec3 x2 = x * x; |
|
vec3 x4 = x2 * x2; |
|
return + 15.5 * x4 * x2 |
|
- 40.14 * x4 * x |
|
+ 31.96 * x4 |
|
- 6.868 * x2 * x |
|
+ 0.4298 * x2 |
|
+ 0.1191 * x |
|
- 0.00232; |
|
} |
|
vec3 AgXToneMapping( vec3 color ) { |
|
const mat3 AgXInsetMatrix = mat3( |
|
vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), |
|
vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), |
|
vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) |
|
); |
|
const mat3 AgXOutsetMatrix = mat3( |
|
vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), |
|
vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), |
|
vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) |
|
); |
|
const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; |
|
color *= toneMappingExposure; |
|
color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; |
|
color = AgXInsetMatrix * color; |
|
color = max( color, 1e-10 ); color = log2( color ); |
|
color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); |
|
color = clamp( color, 0.0, 1.0 ); |
|
color = agxDefaultContrastApprox( color ); |
|
color = AgXOutsetMatrix * color; |
|
color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); |
|
color = LINEAR_REC2020_TO_LINEAR_SRGB * color; |
|
color = clamp( color, 0.0, 1.0 ); |
|
return color; |
|
} |
|
vec3 CustomToneMapping( vec3 color ) { return color; }`,_j=`#ifdef USE_TRANSMISSION |
|
material.transmission = transmission; |
|
material.transmissionAlpha = 1.0; |
|
material.thickness = thickness; |
|
material.attenuationDistance = attenuationDistance; |
|
material.attenuationColor = attenuationColor; |
|
#ifdef USE_TRANSMISSIONMAP |
|
material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; |
|
#endif |
|
#ifdef USE_THICKNESSMAP |
|
material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; |
|
#endif |
|
vec3 pos = vWorldPosition; |
|
vec3 v = normalize( cameraPosition - pos ); |
|
vec3 n = inverseTransformDirection( normal, viewMatrix ); |
|
vec4 transmitted = getIBLVolumeRefraction( |
|
n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, |
|
pos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness, |
|
material.attenuationColor, material.attenuationDistance ); |
|
material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); |
|
totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); |
|
#endif`,xj=`#ifdef USE_TRANSMISSION |
|
uniform float transmission; |
|
uniform float thickness; |
|
uniform float attenuationDistance; |
|
uniform vec3 attenuationColor; |
|
#ifdef USE_TRANSMISSIONMAP |
|
uniform sampler2D transmissionMap; |
|
#endif |
|
#ifdef USE_THICKNESSMAP |
|
uniform sampler2D thicknessMap; |
|
#endif |
|
uniform vec2 transmissionSamplerSize; |
|
uniform sampler2D transmissionSamplerMap; |
|
uniform mat4 modelMatrix; |
|
uniform mat4 projectionMatrix; |
|
varying vec3 vWorldPosition; |
|
float w0( float a ) { |
|
return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); |
|
} |
|
float w1( float a ) { |
|
return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); |
|
} |
|
float w2( float a ){ |
|
return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); |
|
} |
|
float w3( float a ) { |
|
return ( 1.0 / 6.0 ) * ( a * a * a ); |
|
} |
|
float g0( float a ) { |
|
return w0( a ) + w1( a ); |
|
} |
|
float g1( float a ) { |
|
return w2( a ) + w3( a ); |
|
} |
|
float h0( float a ) { |
|
return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); |
|
} |
|
float h1( float a ) { |
|
return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); |
|
} |
|
vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { |
|
uv = uv * texelSize.zw + 0.5; |
|
vec2 iuv = floor( uv ); |
|
vec2 fuv = fract( uv ); |
|
float g0x = g0( fuv.x ); |
|
float g1x = g1( fuv.x ); |
|
float h0x = h0( fuv.x ); |
|
float h1x = h1( fuv.x ); |
|
float h0y = h0( fuv.y ); |
|
float h1y = h1( fuv.y ); |
|
vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; |
|
vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; |
|
vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; |
|
vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; |
|
return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + |
|
g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); |
|
} |
|
vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { |
|
vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); |
|
vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); |
|
vec2 fLodSizeInv = 1.0 / fLodSize; |
|
vec2 cLodSizeInv = 1.0 / cLodSize; |
|
vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); |
|
vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); |
|
return mix( fSample, cSample, fract( lod ) ); |
|
} |
|
vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { |
|
vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); |
|
vec3 modelScale; |
|
modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); |
|
modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); |
|
modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); |
|
return normalize( refractionVector ) * thickness * modelScale; |
|
} |
|
float applyIorToRoughness( const in float roughness, const in float ior ) { |
|
return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); |
|
} |
|
vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { |
|
float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); |
|
return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); |
|
} |
|
vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { |
|
if ( isinf( attenuationDistance ) ) { |
|
return vec3( 1.0 ); |
|
} else { |
|
vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; |
|
vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; |
|
} |
|
} |
|
vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, |
|
const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, |
|
const in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness, |
|
const in vec3 attenuationColor, const in float attenuationDistance ) { |
|
vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); |
|
vec3 refractedRayExit = position + transmissionRay; |
|
vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); |
|
vec2 refractionCoords = ndcPos.xy / ndcPos.w; |
|
refractionCoords += 1.0; |
|
refractionCoords /= 2.0; |
|
vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); |
|
vec3 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); |
|
vec3 attenuatedColor = transmittance * transmittedLight.rgb; |
|
vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); |
|
float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; |
|
return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); |
|
} |
|
#endif`,Sj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) |
|
varying vec2 vUv; |
|
#endif |
|
#ifdef USE_MAP |
|
varying vec2 vMapUv; |
|
#endif |
|
#ifdef USE_ALPHAMAP |
|
varying vec2 vAlphaMapUv; |
|
#endif |
|
#ifdef USE_LIGHTMAP |
|
varying vec2 vLightMapUv; |
|
#endif |
|
#ifdef USE_AOMAP |
|
varying vec2 vAoMapUv; |
|
#endif |
|
#ifdef USE_BUMPMAP |
|
varying vec2 vBumpMapUv; |
|
#endif |
|
#ifdef USE_NORMALMAP |
|
varying vec2 vNormalMapUv; |
|
#endif |
|
#ifdef USE_EMISSIVEMAP |
|
varying vec2 vEmissiveMapUv; |
|
#endif |
|
#ifdef USE_METALNESSMAP |
|
varying vec2 vMetalnessMapUv; |
|
#endif |
|
#ifdef USE_ROUGHNESSMAP |
|
varying vec2 vRoughnessMapUv; |
|
#endif |
|
#ifdef USE_ANISOTROPYMAP |
|
varying vec2 vAnisotropyMapUv; |
|
#endif |
|
#ifdef USE_CLEARCOATMAP |
|
varying vec2 vClearcoatMapUv; |
|
#endif |
|
#ifdef USE_CLEARCOAT_NORMALMAP |
|
varying vec2 vClearcoatNormalMapUv; |
|
#endif |
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP |
|
varying vec2 vClearcoatRoughnessMapUv; |
|
#endif |
|
#ifdef USE_IRIDESCENCEMAP |
|
varying vec2 vIridescenceMapUv; |
|
#endif |
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP |
|
varying vec2 vIridescenceThicknessMapUv; |
|
#endif |
|
#ifdef USE_SHEEN_COLORMAP |
|
varying vec2 vSheenColorMapUv; |
|
#endif |
|
#ifdef USE_SHEEN_ROUGHNESSMAP |
|
varying vec2 vSheenRoughnessMapUv; |
|
#endif |
|
#ifdef USE_SPECULARMAP |
|
varying vec2 vSpecularMapUv; |
|
#endif |
|
#ifdef USE_SPECULAR_COLORMAP |
|
varying vec2 vSpecularColorMapUv; |
|
#endif |
|
#ifdef USE_SPECULAR_INTENSITYMAP |
|
varying vec2 vSpecularIntensityMapUv; |
|
#endif |
|
#ifdef USE_TRANSMISSIONMAP |
|
uniform mat3 transmissionMapTransform; |
|
varying vec2 vTransmissionMapUv; |
|
#endif |
|
#ifdef USE_THICKNESSMAP |
|
uniform mat3 thicknessMapTransform; |
|
varying vec2 vThicknessMapUv; |
|
#endif`,Aj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) |
|
varying vec2 vUv; |
|
#endif |
|
#ifdef USE_MAP |
|
uniform mat3 mapTransform; |
|
varying vec2 vMapUv; |
|
#endif |
|
#ifdef USE_ALPHAMAP |
|
uniform mat3 alphaMapTransform; |
|
varying vec2 vAlphaMapUv; |
|
#endif |
|
#ifdef USE_LIGHTMAP |
|
uniform mat3 lightMapTransform; |
|
varying vec2 vLightMapUv; |
|
#endif |
|
#ifdef USE_AOMAP |
|
uniform mat3 aoMapTransform; |
|
varying vec2 vAoMapUv; |
|
#endif |
|
#ifdef USE_BUMPMAP |
|
uniform mat3 bumpMapTransform; |
|
varying vec2 vBumpMapUv; |
|
#endif |
|
#ifdef USE_NORMALMAP |
|
uniform mat3 normalMapTransform; |
|
varying vec2 vNormalMapUv; |
|
#endif |
|
#ifdef USE_DISPLACEMENTMAP |
|
uniform mat3 displacementMapTransform; |
|
varying vec2 vDisplacementMapUv; |
|
#endif |
|
#ifdef USE_EMISSIVEMAP |
|
uniform mat3 emissiveMapTransform; |
|
varying vec2 vEmissiveMapUv; |
|
#endif |
|
#ifdef USE_METALNESSMAP |
|
uniform mat3 metalnessMapTransform; |
|
varying vec2 vMetalnessMapUv; |
|
#endif |
|
#ifdef USE_ROUGHNESSMAP |
|
uniform mat3 roughnessMapTransform; |
|
varying vec2 vRoughnessMapUv; |
|
#endif |
|
#ifdef USE_ANISOTROPYMAP |
|
uniform mat3 anisotropyMapTransform; |
|
varying vec2 vAnisotropyMapUv; |
|
#endif |
|
#ifdef USE_CLEARCOATMAP |
|
uniform mat3 clearcoatMapTransform; |
|
varying vec2 vClearcoatMapUv; |
|
#endif |
|
#ifdef USE_CLEARCOAT_NORMALMAP |
|
uniform mat3 clearcoatNormalMapTransform; |
|
varying vec2 vClearcoatNormalMapUv; |
|
#endif |
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP |
|
uniform mat3 clearcoatRoughnessMapTransform; |
|
varying vec2 vClearcoatRoughnessMapUv; |
|
#endif |
|
#ifdef USE_SHEEN_COLORMAP |
|
uniform mat3 sheenColorMapTransform; |
|
varying vec2 vSheenColorMapUv; |
|
#endif |
|
#ifdef USE_SHEEN_ROUGHNESSMAP |
|
uniform mat3 sheenRoughnessMapTransform; |
|
varying vec2 vSheenRoughnessMapUv; |
|
#endif |
|
#ifdef USE_IRIDESCENCEMAP |
|
uniform mat3 iridescenceMapTransform; |
|
varying vec2 vIridescenceMapUv; |
|
#endif |
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP |
|
uniform mat3 iridescenceThicknessMapTransform; |
|
varying vec2 vIridescenceThicknessMapUv; |
|
#endif |
|
#ifdef USE_SPECULARMAP |
|
uniform mat3 specularMapTransform; |
|
varying vec2 vSpecularMapUv; |
|
#endif |
|
#ifdef USE_SPECULAR_COLORMAP |
|
uniform mat3 specularColorMapTransform; |
|
varying vec2 vSpecularColorMapUv; |
|
#endif |
|
#ifdef USE_SPECULAR_INTENSITYMAP |
|
uniform mat3 specularIntensityMapTransform; |
|
varying vec2 vSpecularIntensityMapUv; |
|
#endif |
|
#ifdef USE_TRANSMISSIONMAP |
|
uniform mat3 transmissionMapTransform; |
|
varying vec2 vTransmissionMapUv; |
|
#endif |
|
#ifdef USE_THICKNESSMAP |
|
uniform mat3 thicknessMapTransform; |
|
varying vec2 vThicknessMapUv; |
|
#endif`,wj=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) |
|
vUv = vec3( uv, 1 ).xy; |
|
#endif |
|
#ifdef USE_MAP |
|
vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_ALPHAMAP |
|
vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_LIGHTMAP |
|
vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_AOMAP |
|
vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_BUMPMAP |
|
vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_NORMALMAP |
|
vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_DISPLACEMENTMAP |
|
vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_EMISSIVEMAP |
|
vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_METALNESSMAP |
|
vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_ROUGHNESSMAP |
|
vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_ANISOTROPYMAP |
|
vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_CLEARCOATMAP |
|
vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_CLEARCOAT_NORMALMAP |
|
vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_CLEARCOAT_ROUGHNESSMAP |
|
vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_IRIDESCENCEMAP |
|
vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_IRIDESCENCE_THICKNESSMAP |
|
vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_SHEEN_COLORMAP |
|
vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_SHEEN_ROUGHNESSMAP |
|
vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_SPECULARMAP |
|
vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_SPECULAR_COLORMAP |
|
vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_SPECULAR_INTENSITYMAP |
|
vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_TRANSMISSIONMAP |
|
vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; |
|
#endif |
|
#ifdef USE_THICKNESSMAP |
|
vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; |
|
#endif`,bj=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 |
|
vec4 worldPosition = vec4( transformed, 1.0 ); |
|
#ifdef USE_BATCHING |
|
worldPosition = batchingMatrix * worldPosition; |
|
#endif |
|
#ifdef USE_INSTANCING |
|
worldPosition = instanceMatrix * worldPosition; |
|
#endif |
|
worldPosition = modelMatrix * worldPosition; |
|
#endif`;const Tj=`varying vec2 vUv; |
|
uniform mat3 uvTransform; |
|
void main() { |
|
vUv = ( uvTransform * vec3( uv, 1 ) ).xy; |
|
gl_Position = vec4( position.xy, 1.0, 1.0 ); |
|
}`,Mj=`uniform sampler2D t2D; |
|
uniform float backgroundIntensity; |
|
varying vec2 vUv; |
|
void main() { |
|
vec4 texColor = texture2D( t2D, vUv ); |
|
#ifdef DECODE_VIDEO_TEXTURE |
|
texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); |
|
#endif |
|
texColor.rgb *= backgroundIntensity; |
|
gl_FragColor = texColor; |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
}`,Cj=`varying vec3 vWorldDirection; |
|
#include <common> |
|
void main() { |
|
vWorldDirection = transformDirection( position, modelMatrix ); |
|
#include <begin_vertex> |
|
#include <project_vertex> |
|
gl_Position.z = gl_Position.w; |
|
}`,Ej=`#ifdef ENVMAP_TYPE_CUBE |
|
uniform samplerCube envMap; |
|
#elif defined( ENVMAP_TYPE_CUBE_UV ) |
|
uniform sampler2D envMap; |
|
#endif |
|
uniform float flipEnvMap; |
|
uniform float backgroundBlurriness; |
|
uniform float backgroundIntensity; |
|
varying vec3 vWorldDirection; |
|
#include <cube_uv_reflection_fragment> |
|
void main() { |
|
#ifdef ENVMAP_TYPE_CUBE |
|
vec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); |
|
#elif defined( ENVMAP_TYPE_CUBE_UV ) |
|
vec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness ); |
|
#else |
|
vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); |
|
#endif |
|
texColor.rgb *= backgroundIntensity; |
|
gl_FragColor = texColor; |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
}`,Lj=`varying vec3 vWorldDirection; |
|
#include <common> |
|
void main() { |
|
vWorldDirection = transformDirection( position, modelMatrix ); |
|
#include <begin_vertex> |
|
#include <project_vertex> |
|
gl_Position.z = gl_Position.w; |
|
}`,Pj=`uniform samplerCube tCube; |
|
uniform float tFlip; |
|
uniform float opacity; |
|
varying vec3 vWorldDirection; |
|
void main() { |
|
vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); |
|
gl_FragColor = texColor; |
|
gl_FragColor.a *= opacity; |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
}`,Rj=`#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
varying vec2 vHighPrecisionZW; |
|
void main() { |
|
#include <uv_vertex> |
|
#include <batching_vertex> |
|
#include <skinbase_vertex> |
|
#ifdef USE_DISPLACEMENTMAP |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinnormal_vertex> |
|
#endif |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
vHighPrecisionZW = gl_Position.zw; |
|
}`,Dj=`#if DEPTH_PACKING == 3200 |
|
uniform float opacity; |
|
#endif |
|
#include <common> |
|
#include <packing> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
varying vec2 vHighPrecisionZW; |
|
void main() { |
|
vec4 diffuseColor = vec4( 1.0 ); |
|
#include <clipping_planes_fragment> |
|
#if DEPTH_PACKING == 3200 |
|
diffuseColor.a = opacity; |
|
#endif |
|
#include <map_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
#include <logdepthbuf_fragment> |
|
float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; |
|
#if DEPTH_PACKING == 3200 |
|
gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); |
|
#elif DEPTH_PACKING == 3201 |
|
gl_FragColor = packDepthToRGBA( fragCoordZ ); |
|
#endif |
|
}`,Ij=`#define DISTANCE |
|
varying vec3 vWorldPosition; |
|
#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <batching_vertex> |
|
#include <skinbase_vertex> |
|
#ifdef USE_DISPLACEMENTMAP |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinnormal_vertex> |
|
#endif |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <worldpos_vertex> |
|
#include <clipping_planes_vertex> |
|
vWorldPosition = worldPosition.xyz; |
|
}`,Nj=`#define DISTANCE |
|
uniform vec3 referencePosition; |
|
uniform float nearDistance; |
|
uniform float farDistance; |
|
varying vec3 vWorldPosition; |
|
#include <common> |
|
#include <packing> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main () { |
|
vec4 diffuseColor = vec4( 1.0 ); |
|
#include <clipping_planes_fragment> |
|
#include <map_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
float dist = length( vWorldPosition - referencePosition ); |
|
dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); |
|
dist = saturate( dist ); |
|
gl_FragColor = packDepthToRGBA( dist ); |
|
}`,kj=`varying vec3 vWorldDirection; |
|
#include <common> |
|
void main() { |
|
vWorldDirection = transformDirection( position, modelMatrix ); |
|
#include <begin_vertex> |
|
#include <project_vertex> |
|
}`,Oj=`uniform sampler2D tEquirect; |
|
varying vec3 vWorldDirection; |
|
#include <common> |
|
void main() { |
|
vec3 direction = normalize( vWorldDirection ); |
|
vec2 sampleUV = equirectUv( direction ); |
|
gl_FragColor = texture2D( tEquirect, sampleUV ); |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
}`,Fj=`uniform float scale; |
|
attribute float lineDistance; |
|
varying float vLineDistance; |
|
#include <common> |
|
#include <uv_pars_vertex> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
vLineDistance = scale * lineDistance; |
|
#include <uv_vertex> |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
#include <fog_vertex> |
|
}`,Bj=`uniform vec3 diffuse; |
|
uniform float opacity; |
|
uniform float dashSize; |
|
uniform float totalSize; |
|
varying float vLineDistance; |
|
#include <common> |
|
#include <color_pars_fragment> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
if ( mod( vLineDistance, totalSize ) > dashSize ) { |
|
discard; |
|
} |
|
vec3 outgoingLight = vec3( 0.0 ); |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <color_fragment> |
|
outgoingLight = diffuseColor.rgb; |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
}`,zj=`#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <envmap_pars_vertex> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <batching_vertex> |
|
#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#endif |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
#include <worldpos_vertex> |
|
#include <envmap_vertex> |
|
#include <fog_vertex> |
|
}`,Uj=`uniform vec3 diffuse; |
|
uniform float opacity; |
|
#ifndef FLAT_SHADED |
|
varying vec3 vNormal; |
|
#endif |
|
#include <common> |
|
#include <dithering_pars_fragment> |
|
#include <color_pars_fragment> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <aomap_pars_fragment> |
|
#include <lightmap_pars_fragment> |
|
#include <envmap_common_pars_fragment> |
|
#include <envmap_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <specularmap_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <color_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
#include <specularmap_fragment> |
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); |
|
#ifdef USE_LIGHTMAP |
|
vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); |
|
reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; |
|
#else |
|
reflectedLight.indirectDiffuse += vec3( 1.0 ); |
|
#endif |
|
#include <aomap_fragment> |
|
reflectedLight.indirectDiffuse *= diffuseColor.rgb; |
|
vec3 outgoingLight = reflectedLight.indirectDiffuse; |
|
#include <envmap_fragment> |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
#include <dithering_fragment> |
|
}`,Vj=`#define LAMBERT |
|
varying vec3 vViewPosition; |
|
#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <envmap_pars_vertex> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <normal_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <shadowmap_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <batching_vertex> |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#include <normal_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
vViewPosition = - mvPosition.xyz; |
|
#include <worldpos_vertex> |
|
#include <envmap_vertex> |
|
#include <shadowmap_vertex> |
|
#include <fog_vertex> |
|
}`,Gj=`#define LAMBERT |
|
uniform vec3 diffuse; |
|
uniform vec3 emissive; |
|
uniform float opacity; |
|
#include <common> |
|
#include <packing> |
|
#include <dithering_pars_fragment> |
|
#include <color_pars_fragment> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <aomap_pars_fragment> |
|
#include <lightmap_pars_fragment> |
|
#include <emissivemap_pars_fragment> |
|
#include <envmap_common_pars_fragment> |
|
#include <envmap_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <bsdfs> |
|
#include <lights_pars_begin> |
|
#include <normal_pars_fragment> |
|
#include <lights_lambert_pars_fragment> |
|
#include <shadowmap_pars_fragment> |
|
#include <bumpmap_pars_fragment> |
|
#include <normalmap_pars_fragment> |
|
#include <specularmap_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); |
|
vec3 totalEmissiveRadiance = emissive; |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <color_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
#include <specularmap_fragment> |
|
#include <normal_fragment_begin> |
|
#include <normal_fragment_maps> |
|
#include <emissivemap_fragment> |
|
#include <lights_lambert_fragment> |
|
#include <lights_fragment_begin> |
|
#include <lights_fragment_maps> |
|
#include <lights_fragment_end> |
|
#include <aomap_fragment> |
|
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; |
|
#include <envmap_fragment> |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
#include <dithering_fragment> |
|
}`,Hj=`#define MATCAP |
|
varying vec3 vViewPosition; |
|
#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <color_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <normal_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <batching_vertex> |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#include <normal_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
#include <fog_vertex> |
|
vViewPosition = - mvPosition.xyz; |
|
}`,Wj=`#define MATCAP |
|
uniform vec3 diffuse; |
|
uniform float opacity; |
|
uniform sampler2D matcap; |
|
varying vec3 vViewPosition; |
|
#include <common> |
|
#include <dithering_pars_fragment> |
|
#include <color_pars_fragment> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <normal_pars_fragment> |
|
#include <bumpmap_pars_fragment> |
|
#include <normalmap_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <color_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
#include <normal_fragment_begin> |
|
#include <normal_fragment_maps> |
|
vec3 viewDir = normalize( vViewPosition ); |
|
vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); |
|
vec3 y = cross( viewDir, x ); |
|
vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; |
|
#ifdef USE_MATCAP |
|
vec4 matcapColor = texture2D( matcap, uv ); |
|
#else |
|
vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); |
|
#endif |
|
vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
#include <dithering_fragment> |
|
}`,$j=`#define NORMAL |
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) |
|
varying vec3 vViewPosition; |
|
#endif |
|
#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <normal_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <batching_vertex> |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#include <normal_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) |
|
vViewPosition = - mvPosition.xyz; |
|
#endif |
|
}`,Xj=`#define NORMAL |
|
uniform float opacity; |
|
#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) |
|
varying vec3 vViewPosition; |
|
#endif |
|
#include <packing> |
|
#include <uv_pars_fragment> |
|
#include <normal_pars_fragment> |
|
#include <bumpmap_pars_fragment> |
|
#include <normalmap_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); |
|
#include <clipping_planes_fragment> |
|
#include <logdepthbuf_fragment> |
|
#include <normal_fragment_begin> |
|
#include <normal_fragment_maps> |
|
gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); |
|
#ifdef OPAQUE |
|
gl_FragColor.a = 1.0; |
|
#endif |
|
}`,Yj=`#define PHONG |
|
varying vec3 vViewPosition; |
|
#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <envmap_pars_vertex> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <normal_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <shadowmap_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <batching_vertex> |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#include <normal_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
vViewPosition = - mvPosition.xyz; |
|
#include <worldpos_vertex> |
|
#include <envmap_vertex> |
|
#include <shadowmap_vertex> |
|
#include <fog_vertex> |
|
}`,qj=`#define PHONG |
|
uniform vec3 diffuse; |
|
uniform vec3 emissive; |
|
uniform vec3 specular; |
|
uniform float shininess; |
|
uniform float opacity; |
|
#include <common> |
|
#include <packing> |
|
#include <dithering_pars_fragment> |
|
#include <color_pars_fragment> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <aomap_pars_fragment> |
|
#include <lightmap_pars_fragment> |
|
#include <emissivemap_pars_fragment> |
|
#include <envmap_common_pars_fragment> |
|
#include <envmap_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <bsdfs> |
|
#include <lights_pars_begin> |
|
#include <normal_pars_fragment> |
|
#include <lights_phong_pars_fragment> |
|
#include <shadowmap_pars_fragment> |
|
#include <bumpmap_pars_fragment> |
|
#include <normalmap_pars_fragment> |
|
#include <specularmap_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); |
|
vec3 totalEmissiveRadiance = emissive; |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <color_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
#include <specularmap_fragment> |
|
#include <normal_fragment_begin> |
|
#include <normal_fragment_maps> |
|
#include <emissivemap_fragment> |
|
#include <lights_phong_fragment> |
|
#include <lights_fragment_begin> |
|
#include <lights_fragment_maps> |
|
#include <lights_fragment_end> |
|
#include <aomap_fragment> |
|
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; |
|
#include <envmap_fragment> |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
#include <dithering_fragment> |
|
}`,jj=`#define STANDARD |
|
varying vec3 vViewPosition; |
|
#ifdef USE_TRANSMISSION |
|
varying vec3 vWorldPosition; |
|
#endif |
|
#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <normal_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <shadowmap_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <batching_vertex> |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#include <normal_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
vViewPosition = - mvPosition.xyz; |
|
#include <worldpos_vertex> |
|
#include <shadowmap_vertex> |
|
#include <fog_vertex> |
|
#ifdef USE_TRANSMISSION |
|
vWorldPosition = worldPosition.xyz; |
|
#endif |
|
}`,Kj=`#define STANDARD |
|
#ifdef PHYSICAL |
|
#define IOR |
|
#define USE_SPECULAR |
|
#endif |
|
uniform vec3 diffuse; |
|
uniform vec3 emissive; |
|
uniform float roughness; |
|
uniform float metalness; |
|
uniform float opacity; |
|
#ifdef IOR |
|
uniform float ior; |
|
#endif |
|
#ifdef USE_SPECULAR |
|
uniform float specularIntensity; |
|
uniform vec3 specularColor; |
|
#ifdef USE_SPECULAR_COLORMAP |
|
uniform sampler2D specularColorMap; |
|
#endif |
|
#ifdef USE_SPECULAR_INTENSITYMAP |
|
uniform sampler2D specularIntensityMap; |
|
#endif |
|
#endif |
|
#ifdef USE_CLEARCOAT |
|
uniform float clearcoat; |
|
uniform float clearcoatRoughness; |
|
#endif |
|
#ifdef USE_IRIDESCENCE |
|
uniform float iridescence; |
|
uniform float iridescenceIOR; |
|
uniform float iridescenceThicknessMinimum; |
|
uniform float iridescenceThicknessMaximum; |
|
#endif |
|
#ifdef USE_SHEEN |
|
uniform vec3 sheenColor; |
|
uniform float sheenRoughness; |
|
#ifdef USE_SHEEN_COLORMAP |
|
uniform sampler2D sheenColorMap; |
|
#endif |
|
#ifdef USE_SHEEN_ROUGHNESSMAP |
|
uniform sampler2D sheenRoughnessMap; |
|
#endif |
|
#endif |
|
#ifdef USE_ANISOTROPY |
|
uniform vec2 anisotropyVector; |
|
#ifdef USE_ANISOTROPYMAP |
|
uniform sampler2D anisotropyMap; |
|
#endif |
|
#endif |
|
varying vec3 vViewPosition; |
|
#include <common> |
|
#include <packing> |
|
#include <dithering_pars_fragment> |
|
#include <color_pars_fragment> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <aomap_pars_fragment> |
|
#include <lightmap_pars_fragment> |
|
#include <emissivemap_pars_fragment> |
|
#include <iridescence_fragment> |
|
#include <cube_uv_reflection_fragment> |
|
#include <envmap_common_pars_fragment> |
|
#include <envmap_physical_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <lights_pars_begin> |
|
#include <normal_pars_fragment> |
|
#include <lights_physical_pars_fragment> |
|
#include <transmission_pars_fragment> |
|
#include <shadowmap_pars_fragment> |
|
#include <bumpmap_pars_fragment> |
|
#include <normalmap_pars_fragment> |
|
#include <clearcoat_pars_fragment> |
|
#include <iridescence_pars_fragment> |
|
#include <roughnessmap_pars_fragment> |
|
#include <metalnessmap_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); |
|
vec3 totalEmissiveRadiance = emissive; |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <color_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
#include <roughnessmap_fragment> |
|
#include <metalnessmap_fragment> |
|
#include <normal_fragment_begin> |
|
#include <normal_fragment_maps> |
|
#include <clearcoat_normal_fragment_begin> |
|
#include <clearcoat_normal_fragment_maps> |
|
#include <emissivemap_fragment> |
|
#include <lights_physical_fragment> |
|
#include <lights_fragment_begin> |
|
#include <lights_fragment_maps> |
|
#include <lights_fragment_end> |
|
#include <aomap_fragment> |
|
vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; |
|
vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; |
|
#include <transmission_fragment> |
|
vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; |
|
#ifdef USE_SHEEN |
|
float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); |
|
outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; |
|
#endif |
|
#ifdef USE_CLEARCOAT |
|
float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); |
|
vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); |
|
outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; |
|
#endif |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
#include <dithering_fragment> |
|
}`,Zj=`#define TOON |
|
varying vec3 vViewPosition; |
|
#include <common> |
|
#include <batching_pars_vertex> |
|
#include <uv_pars_vertex> |
|
#include <displacementmap_pars_vertex> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <normal_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <shadowmap_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <batching_vertex> |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#include <normal_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <displacementmap_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
vViewPosition = - mvPosition.xyz; |
|
#include <worldpos_vertex> |
|
#include <shadowmap_vertex> |
|
#include <fog_vertex> |
|
}`,Qj=`#define TOON |
|
uniform vec3 diffuse; |
|
uniform vec3 emissive; |
|
uniform float opacity; |
|
#include <common> |
|
#include <packing> |
|
#include <dithering_pars_fragment> |
|
#include <color_pars_fragment> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <aomap_pars_fragment> |
|
#include <lightmap_pars_fragment> |
|
#include <emissivemap_pars_fragment> |
|
#include <gradientmap_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <bsdfs> |
|
#include <lights_pars_begin> |
|
#include <normal_pars_fragment> |
|
#include <lights_toon_pars_fragment> |
|
#include <shadowmap_pars_fragment> |
|
#include <bumpmap_pars_fragment> |
|
#include <normalmap_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); |
|
vec3 totalEmissiveRadiance = emissive; |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <color_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
#include <normal_fragment_begin> |
|
#include <normal_fragment_maps> |
|
#include <emissivemap_fragment> |
|
#include <lights_toon_fragment> |
|
#include <lights_fragment_begin> |
|
#include <lights_fragment_maps> |
|
#include <lights_fragment_end> |
|
#include <aomap_fragment> |
|
vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
#include <dithering_fragment> |
|
}`,Jj=`uniform float size; |
|
uniform float scale; |
|
#include <common> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
#ifdef USE_POINTS_UV |
|
varying vec2 vUv; |
|
uniform mat3 uvTransform; |
|
#endif |
|
void main() { |
|
#ifdef USE_POINTS_UV |
|
vUv = ( uvTransform * vec3( uv, 1 ) ).xy; |
|
#endif |
|
#include <color_vertex> |
|
#include <morphcolor_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <project_vertex> |
|
gl_PointSize = size; |
|
#ifdef USE_SIZEATTENUATION |
|
bool isPerspective = isPerspectiveMatrix( projectionMatrix ); |
|
if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); |
|
#endif |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
#include <worldpos_vertex> |
|
#include <fog_vertex> |
|
}`,eK=`uniform vec3 diffuse; |
|
uniform float opacity; |
|
#include <common> |
|
#include <color_pars_fragment> |
|
#include <map_particle_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
vec3 outgoingLight = vec3( 0.0 ); |
|
#include <logdepthbuf_fragment> |
|
#include <map_particle_fragment> |
|
#include <color_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
outgoingLight = diffuseColor.rgb; |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
}`,tK=`#include <common> |
|
#include <batching_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <morphtarget_pars_vertex> |
|
#include <skinning_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <shadowmap_pars_vertex> |
|
void main() { |
|
#include <batching_vertex> |
|
#include <beginnormal_vertex> |
|
#include <morphnormal_vertex> |
|
#include <skinbase_vertex> |
|
#include <skinnormal_vertex> |
|
#include <defaultnormal_vertex> |
|
#include <begin_vertex> |
|
#include <morphtarget_vertex> |
|
#include <skinning_vertex> |
|
#include <project_vertex> |
|
#include <logdepthbuf_vertex> |
|
#include <worldpos_vertex> |
|
#include <shadowmap_vertex> |
|
#include <fog_vertex> |
|
}`,nK=`uniform vec3 color; |
|
uniform float opacity; |
|
#include <common> |
|
#include <packing> |
|
#include <fog_pars_fragment> |
|
#include <bsdfs> |
|
#include <lights_pars_begin> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <shadowmap_pars_fragment> |
|
#include <shadowmask_pars_fragment> |
|
void main() { |
|
#include <logdepthbuf_fragment> |
|
gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
}`,rK=`uniform float rotation; |
|
uniform vec2 center; |
|
#include <common> |
|
#include <uv_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
void main() { |
|
#include <uv_vertex> |
|
vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); |
|
vec2 scale; |
|
scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); |
|
scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); |
|
#ifndef USE_SIZEATTENUATION |
|
bool isPerspective = isPerspectiveMatrix( projectionMatrix ); |
|
if ( isPerspective ) scale *= - mvPosition.z; |
|
#endif |
|
vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; |
|
vec2 rotatedPosition; |
|
rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; |
|
rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; |
|
mvPosition.xy += rotatedPosition; |
|
gl_Position = projectionMatrix * mvPosition; |
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
#include <fog_vertex> |
|
}`,iK=`uniform vec3 diffuse; |
|
uniform float opacity; |
|
#include <common> |
|
#include <uv_pars_fragment> |
|
#include <map_pars_fragment> |
|
#include <alphamap_pars_fragment> |
|
#include <alphatest_pars_fragment> |
|
#include <alphahash_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
void main() { |
|
vec4 diffuseColor = vec4( diffuse, opacity ); |
|
#include <clipping_planes_fragment> |
|
vec3 outgoingLight = vec3( 0.0 ); |
|
#include <logdepthbuf_fragment> |
|
#include <map_fragment> |
|
#include <alphamap_fragment> |
|
#include <alphatest_fragment> |
|
#include <alphahash_fragment> |
|
outgoingLight = diffuseColor.rgb; |
|
#include <opaque_fragment> |
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
}`,It={alphahash_fragment:MY,alphahash_pars_fragment:CY,alphamap_fragment:EY,alphamap_pars_fragment:LY,alphatest_fragment:PY,alphatest_pars_fragment:RY,aomap_fragment:DY,aomap_pars_fragment:IY,batching_pars_vertex:NY,batching_vertex:kY,begin_vertex:OY,beginnormal_vertex:FY,bsdfs:BY,iridescence_fragment:zY,bumpmap_pars_fragment:UY,clipping_planes_fragment:VY,clipping_planes_pars_fragment:GY,clipping_planes_pars_vertex:HY,clipping_planes_vertex:WY,color_fragment:$Y,color_pars_fragment:XY,color_pars_vertex:YY,color_vertex:qY,common:jY,cube_uv_reflection_fragment:KY,defaultnormal_vertex:ZY,displacementmap_pars_vertex:QY,displacementmap_vertex:JY,emissivemap_fragment:eq,emissivemap_pars_fragment:tq,colorspace_fragment:nq,colorspace_pars_fragment:rq,envmap_fragment:iq,envmap_common_pars_fragment:aq,envmap_pars_fragment:oq,envmap_pars_vertex:sq,envmap_physical_pars_fragment:_q,envmap_vertex:lq,fog_vertex:uq,fog_pars_vertex:cq,fog_fragment:hq,fog_pars_fragment:fq,gradientmap_pars_fragment:dq,lightmap_fragment:pq,lightmap_pars_fragment:vq,lights_lambert_fragment:gq,lights_lambert_pars_fragment:mq,lights_pars_begin:yq,lights_toon_fragment:xq,lights_toon_pars_fragment:Sq,lights_phong_fragment:Aq,lights_phong_pars_fragment:wq,lights_physical_fragment:bq,lights_physical_pars_fragment:Tq,lights_fragment_begin:Mq,lights_fragment_maps:Cq,lights_fragment_end:Eq,logdepthbuf_fragment:Lq,logdepthbuf_pars_fragment:Pq,logdepthbuf_pars_vertex:Rq,logdepthbuf_vertex:Dq,map_fragment:Iq,map_pars_fragment:Nq,map_particle_fragment:kq,map_particle_pars_fragment:Oq,metalnessmap_fragment:Fq,metalnessmap_pars_fragment:Bq,morphcolor_vertex:zq,morphnormal_vertex:Uq,morphtarget_pars_vertex:Vq,morphtarget_vertex:Gq,normal_fragment_begin:Hq,normal_fragment_maps:Wq,normal_pars_fragment:$q,normal_pars_vertex:Xq,normal_vertex:Yq,normalmap_pars_fragment:qq,clearcoat_normal_fragment_begin:jq,clearcoat_normal_fragment_maps:Kq,clearcoat_pars_fragment:Zq,iridescence_pars_fragment:Qq,opaque_fragment:Jq,packing:ej,premultiplied_alpha_fragment:tj,project_vertex:nj,dithering_fragment:rj,dithering_pars_fragment:ij,roughnessmap_fragment:aj,roughnessmap_pars_fragment:oj,shadowmap_pars_fragment:sj,shadowmap_pars_vertex:lj,shadowmap_vertex:uj,shadowmask_pars_fragment:cj,skinbase_vertex:hj,skinning_pars_vertex:fj,skinning_vertex:dj,skinnormal_vertex:pj,specularmap_fragment:vj,specularmap_pars_fragment:gj,tonemapping_fragment:mj,tonemapping_pars_fragment:yj,transmission_fragment:_j,transmission_pars_fragment:xj,uv_pars_fragment:Sj,uv_pars_vertex:Aj,uv_vertex:wj,worldpos_vertex:bj,background_vert:Tj,background_frag:Mj,backgroundCube_vert:Cj,backgroundCube_frag:Ej,cube_vert:Lj,cube_frag:Pj,depth_vert:Rj,depth_frag:Dj,distanceRGBA_vert:Ij,distanceRGBA_frag:Nj,equirect_vert:kj,equirect_frag:Oj,linedashed_vert:Fj,linedashed_frag:Bj,meshbasic_vert:zj,meshbasic_frag:Uj,meshlambert_vert:Vj,meshlambert_frag:Gj,meshmatcap_vert:Hj,meshmatcap_frag:Wj,meshnormal_vert:$j,meshnormal_frag:Xj,meshphong_vert:Yj,meshphong_frag:qj,meshphysical_vert:jj,meshphysical_frag:Kj,meshtoon_vert:Zj,meshtoon_frag:Qj,points_vert:Jj,points_frag:eK,shadow_vert:tK,shadow_frag:nK,sprite_vert:rK,sprite_frag:iK},Ve={common:{diffuse:{value:new nt(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ht},alphaMap:{value:null},alphaMapTransform:{value:new Ht},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ht}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ht}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ht}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ht},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ht},normalScale:{value:new Me(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ht},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ht}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ht}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ht}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new nt(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new nt(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ht},alphaTest:{value:0},uvTransform:{value:new Ht}},sprite:{diffuse:{value:new nt(16777215)},opacity:{value:1},center:{value:new Me(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ht},alphaMap:{value:null},alphaMapTransform:{value:new Ht},alphaTest:{value:0}}},Ai={basic:{uniforms:ui([Ve.common,Ve.specularmap,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.fog]),vertexShader:It.meshbasic_vert,fragmentShader:It.meshbasic_frag},lambert:{uniforms:ui([Ve.common,Ve.specularmap,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.fog,Ve.lights,{emissive:{value:new nt(0)}}]),vertexShader:It.meshlambert_vert,fragmentShader:It.meshlambert_frag},phong:{uniforms:ui([Ve.common,Ve.specularmap,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.fog,Ve.lights,{emissive:{value:new nt(0)},specular:{value:new nt(1118481)},shininess:{value:30}}]),vertexShader:It.meshphong_vert,fragmentShader:It.meshphong_frag},standard:{uniforms:ui([Ve.common,Ve.envmap,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.roughnessmap,Ve.metalnessmap,Ve.fog,Ve.lights,{emissive:{value:new nt(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:It.meshphysical_vert,fragmentShader:It.meshphysical_frag},toon:{uniforms:ui([Ve.common,Ve.aomap,Ve.lightmap,Ve.emissivemap,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.gradientmap,Ve.fog,Ve.lights,{emissive:{value:new nt(0)}}]),vertexShader:It.meshtoon_vert,fragmentShader:It.meshtoon_frag},matcap:{uniforms:ui([Ve.common,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,Ve.fog,{matcap:{value:null}}]),vertexShader:It.meshmatcap_vert,fragmentShader:It.meshmatcap_frag},points:{uniforms:ui([Ve.points,Ve.fog]),vertexShader:It.points_vert,fragmentShader:It.points_frag},dashed:{uniforms:ui([Ve.common,Ve.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:It.linedashed_vert,fragmentShader:It.linedashed_frag},depth:{uniforms:ui([Ve.common,Ve.displacementmap]),vertexShader:It.depth_vert,fragmentShader:It.depth_frag},normal:{uniforms:ui([Ve.common,Ve.bumpmap,Ve.normalmap,Ve.displacementmap,{opacity:{value:1}}]),vertexShader:It.meshnormal_vert,fragmentShader:It.meshnormal_frag},sprite:{uniforms:ui([Ve.sprite,Ve.fog]),vertexShader:It.sprite_vert,fragmentShader:It.sprite_frag},background:{uniforms:{uvTransform:{value:new Ht},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:It.background_vert,fragmentShader:It.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:It.backgroundCube_vert,fragmentShader:It.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:It.cube_vert,fragmentShader:It.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:It.equirect_vert,fragmentShader:It.equirect_frag},distanceRGBA:{uniforms:ui([Ve.common,Ve.displacementmap,{referencePosition:{value:new X},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:It.distanceRGBA_vert,fragmentShader:It.distanceRGBA_frag},shadow:{uniforms:ui([Ve.lights,Ve.fog,{color:{value:new nt(0)},opacity:{value:1}}]),vertexShader:It.shadow_vert,fragmentShader:It.shadow_frag}};Ai.physical={uniforms:ui([Ai.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ht},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ht},clearcoatNormalScale:{value:new Me(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ht},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ht},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ht},sheen:{value:0},sheenColor:{value:new nt(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ht},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ht},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ht},transmissionSamplerSize:{value:new Me},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ht},attenuationDistance:{value:0},attenuationColor:{value:new nt(0)},specularColor:{value:new nt(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ht},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ht},anisotropyVector:{value:new Me},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ht}}]),vertexShader:It.meshphysical_vert,fragmentShader:It.meshphysical_frag};const cm={r:0,b:0,g:0};function aK(r,e,t,n,i,a,o){const s=new nt(0);let l=a===!0?0:1,u,c,h=null,f=0,d=null;function p(v,m){let y=!1,_=m.isScene===!0?m.background:null;_&&_.isTexture&&(_=(m.backgroundBlurriness>0?t:e).get(_)),_===null?g(s,l):_&&_.isColor&&(g(_,1),y=!0);const x=r.xr.getEnvironmentBlendMode();x==="additive"?n.buffers.color.setClear(0,0,0,1,o):x==="alpha-blend"&&n.buffers.color.setClear(0,0,0,0,o),(r.autoClear||y)&&r.clear(r.autoClearColor,r.autoClearDepth,r.autoClearStencil),_&&(_.isCubeTexture||_.mapping===Z_)?(c===void 0&&(c=new rn(new ld(1,1,1),new Ls({name:"BackgroundCubeMaterial",uniforms:Wf(Ai.backgroundCube.uniforms),vertexShader:Ai.backgroundCube.vertexShader,fragmentShader:Ai.backgroundCube.fragmentShader,side:Di,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(S,A,w){this.matrixWorld.copyPosition(w.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=_,c.material.uniforms.flipEnvMap.value=_.isCubeTexture&&_.isRenderTargetTexture===!1?-1:1,c.material.uniforms.backgroundBlurriness.value=m.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,c.material.toneMapped=ln.getTransfer(_.colorSpace)!==Ln,(h!==_||f!==_.version||d!==r.toneMapping)&&(c.material.needsUpdate=!0,h=_,f=_.version,d=r.toneMapping),c.layers.enableAll(),v.unshift(c,c.geometry,c.material,0,0,null)):_&&_.isTexture&&(u===void 0&&(u=new rn(new Za(2,2),new Ls({name:"BackgroundMaterial",uniforms:Wf(Ai.background.uniforms),vertexShader:Ai.background.vertexShader,fragmentShader:Ai.background.fragmentShader,side:Es,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),Object.defineProperty(u.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(u)),u.material.uniforms.t2D.value=_,u.material.uniforms.backgroundIntensity.value=m.backgroundIntensity,u.material.toneMapped=ln.getTransfer(_.colorSpace)!==Ln,_.matrixAutoUpdate===!0&&_.updateMatrix(),u.material.uniforms.uvTransform.value.copy(_.matrix),(h!==_||f!==_.version||d!==r.toneMapping)&&(u.material.needsUpdate=!0,h=_,f=_.version,d=r.toneMapping),u.layers.enableAll(),v.unshift(u,u.geometry,u.material,0,0,null))}function g(v,m){v.getRGB(cm,Az(r)),n.buffers.color.setClear(cm.r,cm.g,cm.b,m,o)}return{getClearColor:function(){return s},setClearColor:function(v,m=1){s.set(v),l=m,g(s,l)},getClearAlpha:function(){return l},setClearAlpha:function(v){l=v,g(s,l)},render:p}}function oK(r,e,t,n){const i=r.getParameter(r.MAX_VERTEX_ATTRIBS),a=n.isWebGL2?null:e.get("OES_vertex_array_object"),o=n.isWebGL2||a!==null,s={},l=v(null);let u=l,c=!1;function h(L,E,I,N,R){let F=!1;if(o){const O=g(N,I,E);u!==O&&(u=O,d(u.object)),F=m(L,N,I,R),F&&y(L,N,I,R)}else{const O=E.wireframe===!0;(u.geometry!==N.id||u.program!==I.id||u.wireframe!==O)&&(u.geometry=N.id,u.program=I.id,u.wireframe=O,F=!0)}R!==null&&t.update(R,r.ELEMENT_ARRAY_BUFFER),(F||c)&&(c=!1,M(L,E,I,N),R!==null&&r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,t.get(R).buffer))}function f(){return n.isWebGL2?r.createVertexArray():a.createVertexArrayOES()}function d(L){return n.isWebGL2?r.bindVertexArray(L):a.bindVertexArrayOES(L)}function p(L){return n.isWebGL2?r.deleteVertexArray(L):a.deleteVertexArrayOES(L)}function g(L,E,I){const N=I.wireframe===!0;let R=s[L.id];R===void 0&&(R={},s[L.id]=R);let F=R[E.id];F===void 0&&(F={},R[E.id]=F);let O=F[N];return O===void 0&&(O=v(f()),F[N]=O),O}function v(L){const E=[],I=[],N=[];for(let R=0;R<i;R++)E[R]=0,I[R]=0,N[R]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:E,enabledAttributes:I,attributeDivisors:N,object:L,attributes:{},index:null}}function m(L,E,I,N){const R=u.attributes,F=E.attributes;let O=0;const V=I.getAttributes();for(const H in V)if(V[H].location>=0){const W=R[H];let Z=F[H];if(Z===void 0&&(H==="instanceMatrix"&&L.instanceMatrix&&(Z=L.instanceMatrix),H==="instanceColor"&&L.instanceColor&&(Z=L.instanceColor)),W===void 0||W.attribute!==Z||Z&&W.data!==Z.data)return!0;O++}return u.attributesNum!==O||u.index!==N}function y(L,E,I,N){const R={},F=E.attributes;let O=0;const V=I.getAttributes();for(const H in V)if(V[H].location>=0){let W=F[H];W===void 0&&(H==="instanceMatrix"&&L.instanceMatrix&&(W=L.instanceMatrix),H==="instanceColor"&&L.instanceColor&&(W=L.instanceColor));const Z={};Z.attribute=W,W&&W.data&&(Z.data=W.data),R[H]=Z,O++}u.attributes=R,u.attributesNum=O,u.index=N}function _(){const L=u.newAttributes;for(let E=0,I=L.length;E<I;E++)L[E]=0}function x(L){S(L,0)}function S(L,E){const I=u.newAttributes,N=u.enabledAttributes,R=u.attributeDivisors;I[L]=1,N[L]===0&&(r.enableVertexAttribArray(L),N[L]=1),R[L]!==E&&((n.isWebGL2?r:e.get("ANGLE_instanced_arrays"))[n.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](L,E),R[L]=E)}function A(){const L=u.newAttributes,E=u.enabledAttributes;for(let I=0,N=E.length;I<N;I++)E[I]!==L[I]&&(r.disableVertexAttribArray(I),E[I]=0)}function w(L,E,I,N,R,F,O){O===!0?r.vertexAttribIPointer(L,E,I,R,F):r.vertexAttribPointer(L,E,I,N,R,F)}function M(L,E,I,N){if(n.isWebGL2===!1&&(L.isInstancedMesh||N.isInstancedBufferGeometry)&&e.get("ANGLE_instanced_arrays")===null)return;_();const R=N.attributes,F=I.getAttributes(),O=E.defaultAttributeValues;for(const V in F){const H=F[V];if(H.location>=0){let Q=R[V];if(Q===void 0&&(V==="instanceMatrix"&&L.instanceMatrix&&(Q=L.instanceMatrix),V==="instanceColor"&&L.instanceColor&&(Q=L.instanceColor)),Q!==void 0){const W=Q.normalized,Z=Q.itemSize,ee=t.get(Q);if(ee===void 0)continue;const he=ee.buffer,le=ee.type,re=ee.bytesPerElement,be=n.isWebGL2===!0&&(le===r.INT||le===r.UNSIGNED_INT||Q.gpuType===az);if(Q.isInterleavedBufferAttribute){const de=Q.data,U=de.stride,K=Q.offset;if(de.isInstancedInterleavedBuffer){for(let te=0;te<H.locationSize;te++)S(H.location+te,de.meshPerAttribute);L.isInstancedMesh!==!0&&N._maxInstanceCount===void 0&&(N._maxInstanceCount=de.meshPerAttribute*de.count)}else for(let te=0;te<H.locationSize;te++)x(H.location+te);r.bindBuffer(r.ARRAY_BUFFER,he);for(let te=0;te<H.locationSize;te++)w(H.location+te,Z/H.locationSize,le,W,U*re,(K+Z/H.locationSize*te)*re,be)}else{if(Q.isInstancedBufferAttribute){for(let de=0;de<H.locationSize;de++)S(H.location+de,Q.meshPerAttribute);L.isInstancedMesh!==!0&&N._maxInstanceCount===void 0&&(N._maxInstanceCount=Q.meshPerAttribute*Q.count)}else for(let de=0;de<H.locationSize;de++)x(H.location+de);r.bindBuffer(r.ARRAY_BUFFER,he);for(let de=0;de<H.locationSize;de++)w(H.location+de,Z/H.locationSize,le,W,Z*re,Z/H.locationSize*de*re,be)}}else if(O!==void 0){const W=O[V];if(W!==void 0)switch(W.length){case 2:r.vertexAttrib2fv(H.location,W);break;case 3:r.vertexAttrib3fv(H.location,W);break;case 4:r.vertexAttrib4fv(H.location,W);break;default:r.vertexAttrib1fv(H.location,W)}}}}A()}function C(){P();for(const L in s){const E=s[L];for(const I in E){const N=E[I];for(const R in N)p(N[R].object),delete N[R];delete E[I]}delete s[L]}}function b(L){if(s[L.id]===void 0)return;const E=s[L.id];for(const I in E){const N=E[I];for(const R in N)p(N[R].object),delete N[R];delete E[I]}delete s[L.id]}function T(L){for(const E in s){const I=s[E];if(I[L.id]===void 0)continue;const N=I[L.id];for(const R in N)p(N[R].object),delete N[R];delete I[L.id]}}function P(){D(),c=!0,u!==l&&(u=l,d(u.object))}function D(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:h,reset:P,resetDefaultState:D,dispose:C,releaseStatesOfGeometry:b,releaseStatesOfProgram:T,initAttributes:_,enableAttribute:x,disableUnusedAttributes:A}}function sK(r,e,t,n){const i=n.isWebGL2;let a;function o(c){a=c}function s(c,h){r.drawArrays(a,c,h),t.update(h,a,1)}function l(c,h,f){if(f===0)return;let d,p;if(i)d=r,p="drawArraysInstanced";else if(d=e.get("ANGLE_instanced_arrays"),p="drawArraysInstancedANGLE",d===null){console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}d[p](a,c,h,f),t.update(h,a,f)}function u(c,h,f){if(f===0)return;const d=e.get("WEBGL_multi_draw");if(d===null)for(let p=0;p<f;p++)this.render(c[p],h[p]);else{d.multiDrawArraysWEBGL(a,c,0,h,0,f);let p=0;for(let g=0;g<f;g++)p+=h[g];t.update(p,a,1)}}this.setMode=o,this.render=s,this.renderInstances=l,this.renderMultiDraw=u}function lK(r,e,t){let n;function i(){if(n!==void 0)return n;if(e.has("EXT_texture_filter_anisotropic")===!0){const w=e.get("EXT_texture_filter_anisotropic");n=r.getParameter(w.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else n=0;return n}function a(w){if(w==="highp"){if(r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.HIGH_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision>0)return"highp";w="mediump"}return w==="mediump"&&r.getShaderPrecisionFormat(r.VERTEX_SHADER,r.MEDIUM_FLOAT).precision>0&&r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const o=typeof WebGL2RenderingContext!="undefined"&&r.constructor.name==="WebGL2RenderingContext";let s=t.precision!==void 0?t.precision:"highp";const l=a(s);l!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",l,"instead."),s=l);const u=o||e.has("WEBGL_draw_buffers"),c=t.logarithmicDepthBuffer===!0,h=r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),f=r.getParameter(r.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=r.getParameter(r.MAX_TEXTURE_SIZE),p=r.getParameter(r.MAX_CUBE_MAP_TEXTURE_SIZE),g=r.getParameter(r.MAX_VERTEX_ATTRIBS),v=r.getParameter(r.MAX_VERTEX_UNIFORM_VECTORS),m=r.getParameter(r.MAX_VARYING_VECTORS),y=r.getParameter(r.MAX_FRAGMENT_UNIFORM_VECTORS),_=f>0,x=o||e.has("OES_texture_float"),S=_&&x,A=o?r.getParameter(r.MAX_SAMPLES):0;return{isWebGL2:o,drawBuffers:u,getMaxAnisotropy:i,getMaxPrecision:a,precision:s,logarithmicDepthBuffer:c,maxTextures:h,maxVertexTextures:f,maxTextureSize:d,maxCubemapSize:p,maxAttributes:g,maxVertexUniforms:v,maxVaryings:m,maxFragmentUniforms:y,vertexTextures:_,floatFragmentTextures:x,floatVertexTextures:S,maxSamples:A}}function uK(r){const e=this;let t=null,n=0,i=!1,a=!1;const o=new cl,s=new Ht,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(h,f){const d=h.length!==0||f||n!==0||i;return i=f,n=h.length,d},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(h,f){t=c(h,f,0)},this.setState=function(h,f,d){const p=h.clippingPlanes,g=h.clipIntersection,v=h.clipShadows,m=r.get(h);if(!i||p===null||p.length===0||a&&!v)a?c(null):u();else{const y=a?0:n,_=y*4;let x=m.clippingState||null;l.value=x,x=c(p,f,_,d);for(let S=0;S!==_;++S)x[S]=t[S];m.clippingState=x,this.numIntersection=g?this.numPlanes:0,this.numPlanes+=y}};function u(){l.value!==t&&(l.value=t,l.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function c(h,f,d,p){const g=h!==null?h.length:0;let v=null;if(g!==0){if(v=l.value,p!==!0||v===null){const m=d+g*4,y=f.matrixWorldInverse;s.getNormalMatrix(y),(v===null||v.length<m)&&(v=new Float32Array(m));for(let _=0,x=d;_!==g;++_,x+=4)o.copy(h[_]).applyMatrix4(y,s),o.normal.toArray(v,x),v[x+3]=o.constant}l.value=v,l.needsUpdate=!0}return e.numPlanes=g,e.numIntersection=0,v}}function cK(r){let e=new WeakMap;function t(o,s){return s===gb?o.mapping=zf:s===mb&&(o.mapping=Uf),o}function n(o){if(o&&o.isTexture){const s=o.mapping;if(s===gb||s===mb)if(e.has(o)){const l=e.get(o).texture;return t(l,o.mapping)}else{const l=o.image;if(l&&l.height>0){const u=new AY(l.height);return u.fromEquirectangularTexture(r,o),e.set(o,u),o.addEventListener("dispose",i),t(u.texture,o.mapping)}else return null}}return o}function i(o){const s=o.target;s.removeEventListener("dispose",i);const l=e.get(s);l!==void 0&&(e.delete(s),l.dispose())}function a(){e=new WeakMap}return{get:n,dispose:a}}class e1 extends wz{constructor(e=-1,t=1,n=1,i=-1,a=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=i,this.near=a,this.far=o,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,i,a,o){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=i,this.view.width=a,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,i=(this.top+this.bottom)/2;let a=n-e,o=n+e,s=i+t,l=i-t;if(this.view!==null&&this.view.enabled){const u=(this.right-this.left)/this.view.fullWidth/this.zoom,c=(this.top-this.bottom)/this.view.fullHeight/this.zoom;a+=u*this.view.offsetX,o=a+u*this.view.width,s-=c*this.view.offsetY,l=s-c*this.view.height}this.projectionMatrix.makeOrthographic(a,o,s,l,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const cf=4,kP=[.125,.215,.35,.446,.526,.582],Ku=20,Xx=new e1,OP=new nt;let Yx=null,qx=0,jx=0;const Hu=(1+Math.sqrt(5))/2,wh=1/Hu,FP=[new X(1,1,1),new X(-1,1,1),new X(1,1,-1),new X(-1,1,-1),new X(0,Hu,wh),new X(0,Hu,-wh),new X(wh,0,Hu),new X(-wh,0,Hu),new X(Hu,wh,0),new X(-Hu,wh,0)];class BP{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,i=100){Yx=this._renderer.getRenderTarget(),qx=this._renderer.getActiveCubeFace(),jx=this._renderer.getActiveMipmapLevel(),this._setSize(256);const a=this._allocateTargets();return a.depthBuffer=!0,this._sceneToCubeUV(e,n,i,a),t>0&&this._blur(a,0,0,t),this._applyPMREM(a),this._cleanup(a),a}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=VP(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=UP(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Yx,qx,jx),e.scissorTest=!1,hm(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===zf||e.mapping===Uf?this._setSize(e.image.length===0?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Yx=this._renderer.getRenderTarget(),qx=this._renderer.getActiveCubeFace(),jx=this._renderer.getActiveMipmapLevel();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:lr,minFilter:lr,generateMipmaps:!1,type:wv,format:ba,colorSpace:yr,depthBuffer:!1},i=zP(e,t,n);if(this._pingPongRenderTarget===null||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){this._pingPongRenderTarget!==null&&this._dispose(),this._pingPongRenderTarget=zP(e,t,n);const{_lodMax:a}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=hK(a)),this._blurMaterial=fK(a,e,t)}return i}_compileMaterial(e){const t=new rn(this._lodPlanes[0],e);this._renderer.compile(t,Xx)}_sceneToCubeUV(e,t,n,i){const s=new Qr(90,1,t,n),l=[1,-1,1,1,1,1],u=[1,1,1,-1,-1,-1],c=this._renderer,h=c.autoClear,f=c.toneMapping;c.getClearColor(OP),c.toneMapping=Ol,c.autoClear=!1;const d=new Pn({name:"PMREM.Background",side:Di,depthWrite:!1,depthTest:!1}),p=new rn(new ld,d);let g=!1;const v=e.background;v?v.isColor&&(d.color.copy(v),e.background=null,g=!0):(d.color.copy(OP),g=!0);for(let m=0;m<6;m++){const y=m%3;y===0?(s.up.set(0,l[m],0),s.lookAt(u[m],0,0)):y===1?(s.up.set(0,0,l[m]),s.lookAt(0,u[m],0)):(s.up.set(0,l[m],0),s.lookAt(0,0,u[m]));const _=this._cubeSize;hm(i,y*_,m>2?_:0,_,_),c.setRenderTarget(i),g&&c.render(p,s),c.render(e,s)}p.geometry.dispose(),p.material.dispose(),c.toneMapping=f,c.autoClear=h,e.background=v}_textureToCubeUV(e,t){const n=this._renderer,i=e.mapping===zf||e.mapping===Uf;i?(this._cubemapMaterial===null&&(this._cubemapMaterial=VP()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=UP());const a=i?this._cubemapMaterial:this._equirectMaterial,o=new rn(this._lodPlanes[0],a),s=a.uniforms;s.envMap.value=e;const l=this._cubeSize;hm(t,0,0,3*l,2*l),n.setRenderTarget(t),n.render(o,Xx)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let i=1;i<this._lodPlanes.length;i++){const a=Math.sqrt(this._sigmas[i]*this._sigmas[i]-this._sigmas[i-1]*this._sigmas[i-1]),o=FP[(i-1)%FP.length];this._blur(e,i-1,i,a,o)}t.autoClear=n}_blur(e,t,n,i,a){const o=this._pingPongRenderTarget;this._halfBlur(e,o,t,n,i,"latitudinal",a),this._halfBlur(o,e,n,n,i,"longitudinal",a)}_halfBlur(e,t,n,i,a,o,s){const l=this._renderer,u=this._blurMaterial;o!=="latitudinal"&&o!=="longitudinal"&&console.error("blur direction must be either latitudinal or longitudinal!");const c=3,h=new rn(this._lodPlanes[i],u),f=u.uniforms,d=this._sizeLods[n]-1,p=isFinite(a)?Math.PI/(2*d):2*Math.PI/(2*Ku-1),g=a/p,v=isFinite(a)?1+Math.floor(c*g):Ku;v>Ku&&console.warn(`sigmaRadians, ${a}, is too large and will clip, as it requested ${v} samples when the maximum is set to ${Ku}`);const m=[];let y=0;for(let w=0;w<Ku;++w){const M=w/g,C=Math.exp(-M*M/2);m.push(C),w===0?y+=C:w<v&&(y+=2*C)}for(let w=0;w<m.length;w++)m[w]=m[w]/y;f.envMap.value=e.texture,f.samples.value=v,f.weights.value=m,f.latitudinal.value=o==="latitudinal",s&&(f.poleAxis.value=s);const{_lodMax:_}=this;f.dTheta.value=p,f.mipInt.value=_-n;const x=this._sizeLods[i],S=3*x*(i>_-cf?i-_+cf:0),A=4*(this._cubeSize-x);hm(t,S,A,3*x,2*x),l.setRenderTarget(t),l.render(h,Xx)}}function hK(r){const e=[],t=[],n=[];let i=r;const a=r-cf+1+kP.length;for(let o=0;o<a;o++){const s=Math.pow(2,i);t.push(s);let l=1/s;o>r-cf?l=kP[o-r+cf-1]:o===0&&(l=0),n.push(l);const u=1/(s-2),c=-u,h=1+u,f=[c,c,h,c,h,h,c,c,h,h,c,h],d=6,p=6,g=3,v=2,m=1,y=new Float32Array(g*p*d),_=new Float32Array(v*p*d),x=new Float32Array(m*p*d);for(let A=0;A<d;A++){const w=A%3*2/3-1,M=A>2?0:-1,C=[w,M,0,w+2/3,M,0,w+2/3,M+1,0,w,M,0,w+2/3,M+1,0,w,M+1,0];y.set(C,g*p*A),_.set(f,v*p*A);const b=[A,A,A,A,A,A];x.set(b,m*p*A)}const S=new wn;S.setAttribute("position",new Gn(y,g)),S.setAttribute("uv",new Gn(_,v)),S.setAttribute("faceIndex",new Gn(x,m)),e.push(S),i>cf&&i--}return{lodPlanes:e,sizeLods:t,sigmas:n}}function zP(r,e,t){const n=new kc(r,e,t);return n.texture.mapping=Z_,n.texture.name="PMREM.cubeUv",n.scissorTest=!0,n}function hm(r,e,t,n,i){r.viewport.set(e,t,n,i),r.scissor.set(e,t,n,i)}function fK(r,e,t){const n=new Float32Array(Ku),i=new X(0,1,0);return new Ls({name:"SphericalGaussianBlur",defines:{n:Ku,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${r}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:n},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:hC(),fragmentShader:` |
|
|
|
precision mediump float; |
|
precision mediump int; |
|
|
|
varying vec3 vOutputDirection; |
|
|
|
uniform sampler2D envMap; |
|
uniform int samples; |
|
uniform float weights[ n ]; |
|
uniform bool latitudinal; |
|
uniform float dTheta; |
|
uniform float mipInt; |
|
uniform vec3 poleAxis; |
|
|
|
#define ENVMAP_TYPE_CUBE_UV |
|
#include <cube_uv_reflection_fragment> |
|
|
|
vec3 getSample( float theta, vec3 axis ) { |
|
|
|
float cosTheta = cos( theta ); |
|
// Rodrigues' axis-angle rotation |
|
vec3 sampleDirection = vOutputDirection * cosTheta |
|
+ cross( axis, vOutputDirection ) * sin( theta ) |
|
+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); |
|
|
|
return bilinearCubeUV( envMap, sampleDirection, mipInt ); |
|
|
|
} |
|
|
|
void main() { |
|
|
|
vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); |
|
|
|
if ( all( equal( axis, vec3( 0.0 ) ) ) ) { |
|
|
|
axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); |
|
|
|
} |
|
|
|
axis = normalize( axis ); |
|
|
|
gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); |
|
gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); |
|
|
|
for ( int i = 1; i < n; i++ ) { |
|
|
|
if ( i >= samples ) { |
|
|
|
break; |
|
|
|
} |
|
|
|
float theta = dTheta * float( i ); |
|
gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); |
|
gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); |
|
|
|
} |
|
|
|
} |
|
`,blending:kl,depthTest:!1,depthWrite:!1})}function UP(){return new Ls({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:hC(),fragmentShader:` |
|
|
|
precision mediump float; |
|
precision mediump int; |
|
|
|
varying vec3 vOutputDirection; |
|
|
|
uniform sampler2D envMap; |
|
|
|
#include <common> |
|
|
|
void main() { |
|
|
|
vec3 outputDirection = normalize( vOutputDirection ); |
|
vec2 uv = equirectUv( outputDirection ); |
|
|
|
gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); |
|
|
|
} |
|
`,blending:kl,depthTest:!1,depthWrite:!1})}function VP(){return new Ls({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:hC(),fragmentShader:` |
|
|
|
precision mediump float; |
|
precision mediump int; |
|
|
|
uniform float flipEnvMap; |
|
|
|
varying vec3 vOutputDirection; |
|
|
|
uniform samplerCube envMap; |
|
|
|
void main() { |
|
|
|
gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); |
|
|
|
} |
|
`,blending:kl,depthTest:!1,depthWrite:!1})}function hC(){return` |
|
|
|
precision mediump float; |
|
precision mediump int; |
|
|
|
attribute float faceIndex; |
|
|
|
varying vec3 vOutputDirection; |
|
|
|
// RH coordinate system; PMREM face-indexing convention |
|
vec3 getDirection( vec2 uv, float face ) { |
|
|
|
uv = 2.0 * uv - 1.0; |
|
|
|
vec3 direction = vec3( uv, 1.0 ); |
|
|
|
if ( face == 0.0 ) { |
|
|
|
direction = direction.zyx; // ( 1, v, u ) pos x |
|
|
|
} else if ( face == 1.0 ) { |
|
|
|
direction = direction.xzy; |
|
direction.xz *= -1.0; // ( -u, 1, -v ) pos y |
|
|
|
} else if ( face == 2.0 ) { |
|
|
|
direction.x *= -1.0; // ( -u, v, 1 ) pos z |
|
|
|
} else if ( face == 3.0 ) { |
|
|
|
direction = direction.zyx; |
|
direction.xz *= -1.0; // ( -1, v, -u ) neg x |
|
|
|
} else if ( face == 4.0 ) { |
|
|
|
direction = direction.xzy; |
|
direction.xy *= -1.0; // ( -u, -1, v ) neg y |
|
|
|
} else if ( face == 5.0 ) { |
|
|
|
direction.z *= -1.0; // ( u, v, -1 ) neg z |
|
|
|
} |
|
|
|
return direction; |
|
|
|
} |
|
|
|
void main() { |
|
|
|
vOutputDirection = getDirection( uv, faceIndex ); |
|
gl_Position = vec4( position, 1.0 ); |
|
|
|
} |
|
`}function dK(r){let e=new WeakMap,t=null;function n(s){if(s&&s.isTexture){const l=s.mapping,u=l===gb||l===mb,c=l===zf||l===Uf;if(u||c)if(s.isRenderTargetTexture&&s.needsPMREMUpdate===!0){s.needsPMREMUpdate=!1;let h=e.get(s);return t===null&&(t=new BP(r)),h=u?t.fromEquirectangular(s,h):t.fromCubemap(s,h),e.set(s,h),h.texture}else{if(e.has(s))return e.get(s).texture;{const h=s.image;if(u&&h&&h.height>0||c&&h&&i(h)){t===null&&(t=new BP(r));const f=u?t.fromEquirectangular(s):t.fromCubemap(s);return e.set(s,f),s.addEventListener("dispose",a),f.texture}else return null}}}return s}function i(s){let l=0;const u=6;for(let c=0;c<u;c++)s[c]!==void 0&&l++;return l===u}function a(s){const l=s.target;l.removeEventListener("dispose",a);const u=e.get(l);u!==void 0&&(e.delete(l),u.dispose())}function o(){e=new WeakMap,t!==null&&(t.dispose(),t=null)}return{get:n,dispose:o}}function pK(r){const e={};function t(n){if(e[n]!==void 0)return e[n];let i;switch(n){case"WEBGL_depth_texture":i=r.getExtension("WEBGL_depth_texture")||r.getExtension("MOZ_WEBGL_depth_texture")||r.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":i=r.getExtension("EXT_texture_filter_anisotropic")||r.getExtension("MOZ_EXT_texture_filter_anisotropic")||r.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":i=r.getExtension("WEBGL_compressed_texture_s3tc")||r.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":i=r.getExtension("WEBGL_compressed_texture_pvrtc")||r.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:i=r.getExtension(n)}return e[n]=i,i}return{has:function(n){return t(n)!==null},init:function(n){n.isWebGL2?(t("EXT_color_buffer_float"),t("WEBGL_clip_cull_distance")):(t("WEBGL_depth_texture"),t("OES_texture_float"),t("OES_texture_half_float"),t("OES_texture_half_float_linear"),t("OES_standard_derivatives"),t("OES_element_index_uint"),t("OES_vertex_array_object"),t("ANGLE_instanced_arrays")),t("OES_texture_float_linear"),t("EXT_color_buffer_half_float"),t("WEBGL_multisampled_render_to_texture")},get:function(n){const i=t(n);return i===null&&console.warn("THREE.WebGLRenderer: "+n+" extension not supported."),i}}}function vK(r,e,t,n){const i={},a=new WeakMap;function o(h){const f=h.target;f.index!==null&&e.remove(f.index);for(const p in f.attributes)e.remove(f.attributes[p]);for(const p in f.morphAttributes){const g=f.morphAttributes[p];for(let v=0,m=g.length;v<m;v++)e.remove(g[v])}f.removeEventListener("dispose",o),delete i[f.id];const d=a.get(f);d&&(e.remove(d),a.delete(f)),n.releaseStatesOfGeometry(f),f.isInstancedBufferGeometry===!0&&delete f._maxInstanceCount,t.memory.geometries--}function s(h,f){return i[f.id]===!0||(f.addEventListener("dispose",o),i[f.id]=!0,t.memory.geometries++),f}function l(h){const f=h.attributes;for(const p in f)e.update(f[p],r.ARRAY_BUFFER);const d=h.morphAttributes;for(const p in d){const g=d[p];for(let v=0,m=g.length;v<m;v++)e.update(g[v],r.ARRAY_BUFFER)}}function u(h){const f=[],d=h.index,p=h.attributes.position;let g=0;if(d!==null){const y=d.array;g=d.version;for(let _=0,x=y.length;_<x;_+=3){const S=y[_+0],A=y[_+1],w=y[_+2];f.push(S,A,A,w,w,S)}}else if(p!==void 0){const y=p.array;g=p.version;for(let _=0,x=y.length/3-1;_<x;_+=3){const S=_+0,A=_+1,w=_+2;f.push(S,A,A,w,w,S)}}else return;const v=new(vz(f)?Sz:xz)(f,1);v.version=g;const m=a.get(h);m&&e.remove(m),a.set(h,v)}function c(h){const f=a.get(h);if(f){const d=h.index;d!==null&&f.version<d.version&&u(h)}else u(h);return a.get(h)}return{get:s,update:l,getWireframeAttribute:c}}function gK(r,e,t,n){const i=n.isWebGL2;let a;function o(d){a=d}let s,l;function u(d){s=d.type,l=d.bytesPerElement}function c(d,p){r.drawElements(a,p,s,d*l),t.update(p,a,1)}function h(d,p,g){if(g===0)return;let v,m;if(i)v=r,m="drawElementsInstanced";else if(v=e.get("ANGLE_instanced_arrays"),m="drawElementsInstancedANGLE",v===null){console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");return}v[m](a,p,s,d*l,g),t.update(p,a,g)}function f(d,p,g){if(g===0)return;const v=e.get("WEBGL_multi_draw");if(v===null)for(let m=0;m<g;m++)this.render(d[m]/l,p[m]);else{v.multiDrawElementsWEBGL(a,p,0,s,d,0,g);let m=0;for(let y=0;y<g;y++)m+=p[y];t.update(m,a,1)}}this.setMode=o,this.setIndex=u,this.render=c,this.renderInstances=h,this.renderMultiDraw=f}function mK(r){const e={geometries:0,textures:0},t={frame:0,calls:0,triangles:0,points:0,lines:0};function n(a,o,s){switch(t.calls++,o){case r.TRIANGLES:t.triangles+=s*(a/3);break;case r.LINES:t.lines+=s*(a/2);break;case r.LINE_STRIP:t.lines+=s*(a-1);break;case r.LINE_LOOP:t.lines+=s*a;break;case r.POINTS:t.points+=s*a;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",o);break}}function i(){t.calls=0,t.triangles=0,t.points=0,t.lines=0}return{memory:e,render:t,programs:null,autoReset:!0,reset:i,update:n}}function yK(r,e){return r[0]-e[0]}function _K(r,e){return Math.abs(e[1])-Math.abs(r[1])}function xK(r,e,t){const n={},i=new Float32Array(8),a=new WeakMap,o=new an,s=[];for(let u=0;u<8;u++)s[u]=[u,0];function l(u,c,h){const f=u.morphTargetInfluences;if(e.isWebGL2===!0){const d=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,p=d!==void 0?d.length:0;let g=a.get(c);if(g===void 0||g.count!==p){let L=function(){P.dispose(),a.delete(c),c.removeEventListener("dispose",L)};g!==void 0&&g.texture.dispose();const y=c.morphAttributes.position!==void 0,_=c.morphAttributes.normal!==void 0,x=c.morphAttributes.color!==void 0,S=c.morphAttributes.position||[],A=c.morphAttributes.normal||[],w=c.morphAttributes.color||[];let M=0;y===!0&&(M=1),_===!0&&(M=2),x===!0&&(M=3);let C=c.attributes.position.count*M,b=1;C>e.maxTextureSize&&(b=Math.ceil(C/e.maxTextureSize),C=e.maxTextureSize);const T=new Float32Array(C*b*4*p),P=new yz(T,C,b,p);P.type=Ro,P.needsUpdate=!0;const D=M*4;for(let E=0;E<p;E++){const I=S[E],N=A[E],R=w[E],F=C*b*4*E;for(let O=0;O<I.count;O++){const V=O*D;y===!0&&(o.fromBufferAttribute(I,O),T[F+V+0]=o.x,T[F+V+1]=o.y,T[F+V+2]=o.z,T[F+V+3]=0),_===!0&&(o.fromBufferAttribute(N,O),T[F+V+4]=o.x,T[F+V+5]=o.y,T[F+V+6]=o.z,T[F+V+7]=0),x===!0&&(o.fromBufferAttribute(R,O),T[F+V+8]=o.x,T[F+V+9]=o.y,T[F+V+10]=o.z,T[F+V+11]=R.itemSize===4?o.w:1)}}g={count:p,texture:P,size:new Me(C,b)},a.set(c,g),c.addEventListener("dispose",L)}let v=0;for(let y=0;y<f.length;y++)v+=f[y];const m=c.morphTargetsRelative?1:1-v;h.getUniforms().setValue(r,"morphTargetBaseInfluence",m),h.getUniforms().setValue(r,"morphTargetInfluences",f),h.getUniforms().setValue(r,"morphTargetsTexture",g.texture,t),h.getUniforms().setValue(r,"morphTargetsTextureSize",g.size)}else{const d=f===void 0?0:f.length;let p=n[c.id];if(p===void 0||p.length!==d){p=[];for(let _=0;_<d;_++)p[_]=[_,0];n[c.id]=p}for(let _=0;_<d;_++){const x=p[_];x[0]=_,x[1]=f[_]}p.sort(_K);for(let _=0;_<8;_++)_<d&&p[_][1]?(s[_][0]=p[_][0],s[_][1]=p[_][1]):(s[_][0]=Number.MAX_SAFE_INTEGER,s[_][1]=0);s.sort(yK);const g=c.morphAttributes.position,v=c.morphAttributes.normal;let m=0;for(let _=0;_<8;_++){const x=s[_],S=x[0],A=x[1];S!==Number.MAX_SAFE_INTEGER&&A?(g&&c.getAttribute("morphTarget"+_)!==g[S]&&c.setAttribute("morphTarget"+_,g[S]),v&&c.getAttribute("morphNormal"+_)!==v[S]&&c.setAttribute("morphNormal"+_,v[S]),i[_]=A,m+=A):(g&&c.hasAttribute("morphTarget"+_)===!0&&c.deleteAttribute("morphTarget"+_),v&&c.hasAttribute("morphNormal"+_)===!0&&c.deleteAttribute("morphNormal"+_),i[_]=0)}const y=c.morphTargetsRelative?1:1-m;h.getUniforms().setValue(r,"morphTargetBaseInfluence",y),h.getUniforms().setValue(r,"morphTargetInfluences",i)}}return{update:l}}function SK(r,e,t,n){let i=new WeakMap;function a(l){const u=n.render.frame,c=l.geometry,h=e.get(l,c);if(i.get(h)!==u&&(e.update(h),i.set(h,u)),l.isInstancedMesh&&(l.hasEventListener("dispose",s)===!1&&l.addEventListener("dispose",s),i.get(l)!==u&&(t.update(l.instanceMatrix,r.ARRAY_BUFFER),l.instanceColor!==null&&t.update(l.instanceColor,r.ARRAY_BUFFER),i.set(l,u))),l.isSkinnedMesh){const f=l.skeleton;i.get(f)!==u&&(f.update(),i.set(f,u))}return h}function o(){i=new WeakMap}function s(l){const u=l.target;u.removeEventListener("dispose",s),t.remove(u.instanceMatrix),u.instanceColor!==null&&t.remove(u.instanceColor)}return{update:a,dispose:o}}class Mz extends mr{constructor(e,t,n,i,a,o,s,l,u,c){if(c=c!==void 0?c:_c,c!==_c&&c!==Vf)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&c===_c&&(n=xl),n===void 0&&c===Vf&&(n=yc),super(null,i,a,o,s,l,c,n,u),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=s!==void 0?s:vr,this.minFilter=l!==void 0?l:vr,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return this.compareFunction!==null&&(t.compareFunction=this.compareFunction),t}}const Cz=new mr,Ez=new Mz(1,1);Ez.compareFunction=pz;const Lz=new yz,Pz=new oY,Rz=new bz,GP=[],HP=[],WP=new Float32Array(16),$P=new Float32Array(9),XP=new Float32Array(4);function ud(r,e,t){const n=r[0];if(n<=0||n>0)return r;const i=e*t;let a=GP[i];if(a===void 0&&(a=new Float32Array(i),GP[i]=a),e!==0){n.toArray(a,0);for(let o=1,s=0;o!==e;++o)s+=t,r[o].toArray(a,s)}return a}function _r(r,e){if(r.length!==e.length)return!1;for(let t=0,n=r.length;t<n;t++)if(r[t]!==e[t])return!1;return!0}function xr(r,e){for(let t=0,n=e.length;t<n;t++)r[t]=e[t]}function t1(r,e){let t=HP[e];t===void 0&&(t=new Int32Array(e),HP[e]=t);for(let n=0;n!==e;++n)t[n]=r.allocateTextureUnit();return t}function AK(r,e){const t=this.cache;t[0]!==e&&(r.uniform1f(this.addr,e),t[0]=e)}function wK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(r.uniform2f(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(_r(t,e))return;r.uniform2fv(this.addr,e),xr(t,e)}}function bK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(r.uniform3f(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else if(e.r!==void 0)(t[0]!==e.r||t[1]!==e.g||t[2]!==e.b)&&(r.uniform3f(this.addr,e.r,e.g,e.b),t[0]=e.r,t[1]=e.g,t[2]=e.b);else{if(_r(t,e))return;r.uniform3fv(this.addr,e),xr(t,e)}}function TK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(r.uniform4f(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(_r(t,e))return;r.uniform4fv(this.addr,e),xr(t,e)}}function MK(r,e){const t=this.cache,n=e.elements;if(n===void 0){if(_r(t,e))return;r.uniformMatrix2fv(this.addr,!1,e),xr(t,e)}else{if(_r(t,n))return;XP.set(n),r.uniformMatrix2fv(this.addr,!1,XP),xr(t,n)}}function CK(r,e){const t=this.cache,n=e.elements;if(n===void 0){if(_r(t,e))return;r.uniformMatrix3fv(this.addr,!1,e),xr(t,e)}else{if(_r(t,n))return;$P.set(n),r.uniformMatrix3fv(this.addr,!1,$P),xr(t,n)}}function EK(r,e){const t=this.cache,n=e.elements;if(n===void 0){if(_r(t,e))return;r.uniformMatrix4fv(this.addr,!1,e),xr(t,e)}else{if(_r(t,n))return;WP.set(n),r.uniformMatrix4fv(this.addr,!1,WP),xr(t,n)}}function LK(r,e){const t=this.cache;t[0]!==e&&(r.uniform1i(this.addr,e),t[0]=e)}function PK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(r.uniform2i(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(_r(t,e))return;r.uniform2iv(this.addr,e),xr(t,e)}}function RK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(r.uniform3i(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(_r(t,e))return;r.uniform3iv(this.addr,e),xr(t,e)}}function DK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(r.uniform4i(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(_r(t,e))return;r.uniform4iv(this.addr,e),xr(t,e)}}function IK(r,e){const t=this.cache;t[0]!==e&&(r.uniform1ui(this.addr,e),t[0]=e)}function NK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y)&&(r.uniform2ui(this.addr,e.x,e.y),t[0]=e.x,t[1]=e.y);else{if(_r(t,e))return;r.uniform2uiv(this.addr,e),xr(t,e)}}function kK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z)&&(r.uniform3ui(this.addr,e.x,e.y,e.z),t[0]=e.x,t[1]=e.y,t[2]=e.z);else{if(_r(t,e))return;r.uniform3uiv(this.addr,e),xr(t,e)}}function OK(r,e){const t=this.cache;if(e.x!==void 0)(t[0]!==e.x||t[1]!==e.y||t[2]!==e.z||t[3]!==e.w)&&(r.uniform4ui(this.addr,e.x,e.y,e.z,e.w),t[0]=e.x,t[1]=e.y,t[2]=e.z,t[3]=e.w);else{if(_r(t,e))return;r.uniform4uiv(this.addr,e),xr(t,e)}}function FK(r,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i);const a=this.type===r.SAMPLER_2D_SHADOW?Ez:Cz;t.setTexture2D(e||a,i)}function BK(r,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),t.setTexture3D(e||Pz,i)}function zK(r,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),t.setTextureCube(e||Rz,i)}function UK(r,e,t){const n=this.cache,i=t.allocateTextureUnit();n[0]!==i&&(r.uniform1i(this.addr,i),n[0]=i),t.setTexture2DArray(e||Lz,i)}function VK(r){switch(r){case 5126:return AK;case 35664:return wK;case 35665:return bK;case 35666:return TK;case 35674:return MK;case 35675:return CK;case 35676:return EK;case 5124:case 35670:return LK;case 35667:case 35671:return PK;case 35668:case 35672:return RK;case 35669:case 35673:return DK;case 5125:return IK;case 36294:return NK;case 36295:return kK;case 36296:return OK;case 35678:case 36198:case 36298:case 36306:case 35682:return FK;case 35679:case 36299:case 36307:return BK;case 35680:case 36300:case 36308:case 36293:return zK;case 36289:case 36303:case 36311:case 36292:return UK}}function GK(r,e){r.uniform1fv(this.addr,e)}function HK(r,e){const t=ud(e,this.size,2);r.uniform2fv(this.addr,t)}function WK(r,e){const t=ud(e,this.size,3);r.uniform3fv(this.addr,t)}function $K(r,e){const t=ud(e,this.size,4);r.uniform4fv(this.addr,t)}function XK(r,e){const t=ud(e,this.size,4);r.uniformMatrix2fv(this.addr,!1,t)}function YK(r,e){const t=ud(e,this.size,9);r.uniformMatrix3fv(this.addr,!1,t)}function qK(r,e){const t=ud(e,this.size,16);r.uniformMatrix4fv(this.addr,!1,t)}function jK(r,e){r.uniform1iv(this.addr,e)}function KK(r,e){r.uniform2iv(this.addr,e)}function ZK(r,e){r.uniform3iv(this.addr,e)}function QK(r,e){r.uniform4iv(this.addr,e)}function JK(r,e){r.uniform1uiv(this.addr,e)}function eZ(r,e){r.uniform2uiv(this.addr,e)}function tZ(r,e){r.uniform3uiv(this.addr,e)}function nZ(r,e){r.uniform4uiv(this.addr,e)}function rZ(r,e,t){const n=this.cache,i=e.length,a=t1(t,i);_r(n,a)||(r.uniform1iv(this.addr,a),xr(n,a));for(let o=0;o!==i;++o)t.setTexture2D(e[o]||Cz,a[o])}function iZ(r,e,t){const n=this.cache,i=e.length,a=t1(t,i);_r(n,a)||(r.uniform1iv(this.addr,a),xr(n,a));for(let o=0;o!==i;++o)t.setTexture3D(e[o]||Pz,a[o])}function aZ(r,e,t){const n=this.cache,i=e.length,a=t1(t,i);_r(n,a)||(r.uniform1iv(this.addr,a),xr(n,a));for(let o=0;o!==i;++o)t.setTextureCube(e[o]||Rz,a[o])}function oZ(r,e,t){const n=this.cache,i=e.length,a=t1(t,i);_r(n,a)||(r.uniform1iv(this.addr,a),xr(n,a));for(let o=0;o!==i;++o)t.setTexture2DArray(e[o]||Lz,a[o])}function sZ(r){switch(r){case 5126:return GK;case 35664:return HK;case 35665:return WK;case 35666:return $K;case 35674:return XK;case 35675:return YK;case 35676:return qK;case 5124:case 35670:return jK;case 35667:case 35671:return KK;case 35668:case 35672:return ZK;case 35669:case 35673:return QK;case 5125:return JK;case 36294:return eZ;case 36295:return tZ;case 36296:return nZ;case 35678:case 36198:case 36298:case 36306:case 35682:return rZ;case 35679:case 36299:case 36307:return iZ;case 35680:case 36300:case 36308:case 36293:return aZ;case 36289:case 36303:case 36311:case 36292:return oZ}}class lZ{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.setValue=VK(t.type)}}class uZ{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.type=t.type,this.size=t.size,this.setValue=sZ(t.type)}}class cZ{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const i=this.seq;for(let a=0,o=i.length;a!==o;++a){const s=i[a];s.setValue(e,t[s.id],n)}}}const Kx=/(\w+)(\])?(\[|\.)?/g;function YP(r,e){r.seq.push(e),r.map[e.id]=e}function hZ(r,e,t){const n=r.name,i=n.length;for(Kx.lastIndex=0;;){const a=Kx.exec(n),o=Kx.lastIndex;let s=a[1];const l=a[2]==="]",u=a[3];if(l&&(s=s|0),u===void 0||u==="["&&o+2===i){YP(t,u===void 0?new lZ(s,r,e):new uZ(s,r,e));break}else{let h=t.map[s];h===void 0&&(h=new cZ(s),YP(t,h)),t=h}}}class Xy{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let i=0;i<n;++i){const a=e.getActiveUniform(t,i),o=e.getUniformLocation(t,a.name);hZ(a,o,this)}}setValue(e,t,n,i){const a=this.map[t];a!==void 0&&a.setValue(e,n,i)}setOptional(e,t,n){const i=t[n];i!==void 0&&this.setValue(e,n,i)}static upload(e,t,n,i){for(let a=0,o=t.length;a!==o;++a){const s=t[a],l=n[s.id];l.needsUpdate!==!1&&s.setValue(e,l.value,i)}}static seqWithValue(e,t){const n=[];for(let i=0,a=e.length;i!==a;++i){const o=e[i];o.id in t&&n.push(o)}return n}}function qP(r,e,t){const n=r.createShader(e);return r.shaderSource(n,t),r.compileShader(n),n}const fZ=37297;let dZ=0;function pZ(r,e){const t=r.split(` |
|
`),n=[],i=Math.max(e-6,0),a=Math.min(e+6,t.length);for(let o=i;o<a;o++){const s=o+1;n.push(`${s===e?">":" "} ${s}: ${t[o]}`)}return n.join(` |
|
`)}function vZ(r){const e=ln.getPrimaries(ln.workingColorSpace),t=ln.getPrimaries(r);let n;switch(e===t?n="":e===I0&&t===D0?n="LinearDisplayP3ToLinearSRGB":e===D0&&t===I0&&(n="LinearSRGBToLinearDisplayP3"),r){case yr:case Q_:return[n,"LinearTransferOETF"];case dn:case aC:return[n,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",r),[n,"LinearTransferOETF"]}}function jP(r,e,t){const n=r.getShaderParameter(e,r.COMPILE_STATUS),i=r.getShaderInfoLog(e).trim();if(n&&i==="")return"";const a=/ERROR: 0:(\d+)/.exec(i);if(a){const o=parseInt(a[1]);return t.toUpperCase()+` |
|
|
|
`+i+` |
|
|
|
`+pZ(r.getShaderSource(e),o)}else return i}function gZ(r,e){const t=vZ(e);return`vec4 ${r}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function mZ(r,e){let t;switch(e){case pX:t="Linear";break;case vX:t="Reinhard";break;case gX:t="OptimizedCineon";break;case mX:t="ACESFilmic";break;case _X:t="AgX";break;case yX:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+r+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function yZ(r){return[r.extensionDerivatives||r.envMapCubeUVHeight||r.bumpMap||r.normalMapTangentSpace||r.clearcoatNormalMap||r.flatShading||r.alphaToCoverage||r.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(r.extensionFragDepth||r.logarithmicDepthBuffer)&&r.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",r.extensionDrawBuffers&&r.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(r.extensionShaderTextureLOD||r.envMap||r.transmission)&&r.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(hf).join(` |
|
`)}function _Z(r){return[r.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",r.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(hf).join(` |
|
`)}function xZ(r){const e=[];for(const t in r){const n=r[t];n!==!1&&e.push("#define "+t+" "+n)}return e.join(` |
|
`)}function SZ(r,e){const t={},n=r.getProgramParameter(e,r.ACTIVE_ATTRIBUTES);for(let i=0;i<n;i++){const a=r.getActiveAttrib(e,i),o=a.name;let s=1;a.type===r.FLOAT_MAT2&&(s=2),a.type===r.FLOAT_MAT3&&(s=3),a.type===r.FLOAT_MAT4&&(s=4),t[o]={type:a.type,location:r.getAttribLocation(e,o),locationSize:s}}return t}function hf(r){return r!==""}function KP(r,e){const t=e.numSpotLightShadows+e.numSpotLightMaps-e.numSpotLightShadowsWithMaps;return r.replace(/NUM_DIR_LIGHTS/g,e.numDirLights).replace(/NUM_SPOT_LIGHTS/g,e.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,e.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,t).replace(/NUM_RECT_AREA_LIGHTS/g,e.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,e.numPointLights).replace(/NUM_HEMI_LIGHTS/g,e.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,e.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,e.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,e.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,e.numPointLightShadows)}function ZP(r,e){return r.replace(/NUM_CLIPPING_PLANES/g,e.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,e.numClippingPlanes-e.numClipIntersection)}const AZ=/^[ \t]*#include +<([\w\d./]+)>/gm;function wb(r){return r.replace(AZ,bZ)}const wZ=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function bZ(r,e){let t=It[e];if(t===void 0){const n=wZ.get(e);if(n!==void 0)t=It[n],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,n);else throw new Error("Can not resolve #include <"+e+">")}return wb(t)}const TZ=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function QP(r){return r.replace(TZ,MZ)}function MZ(r,e,t,n){let i="";for(let a=parseInt(e);a<parseInt(t);a++)i+=n.replace(/\[\s*i\s*\]/g,"[ "+a+" ]").replace(/UNROLLED_LOOP_INDEX/g,a);return i}function JP(r){let e=`precision ${r.precision} float; |
|
precision ${r.precision} int; |
|
precision ${r.precision} sampler2D; |
|
precision ${r.precision} samplerCube; |
|
`;return r.isWebGL2&&(e+=`precision ${r.precision} sampler3D; |
|
precision ${r.precision} sampler2DArray; |
|
precision ${r.precision} sampler2DShadow; |
|
precision ${r.precision} samplerCubeShadow; |
|
precision ${r.precision} sampler2DArrayShadow; |
|
precision ${r.precision} isampler2D; |
|
precision ${r.precision} isampler3D; |
|
precision ${r.precision} isamplerCube; |
|
precision ${r.precision} isampler2DArray; |
|
precision ${r.precision} usampler2D; |
|
precision ${r.precision} usampler3D; |
|
precision ${r.precision} usamplerCube; |
|
precision ${r.precision} usampler2DArray; |
|
`),r.precision==="highp"?e+=` |
|
#define HIGH_PRECISION`:r.precision==="mediump"?e+=` |
|
#define MEDIUM_PRECISION`:r.precision==="lowp"&&(e+=` |
|
#define LOW_PRECISION`),e}function CZ(r){let e="SHADOWMAP_TYPE_BASIC";return r.shadowMapType===ez?e="SHADOWMAP_TYPE_PCF":r.shadowMapType===$$?e="SHADOWMAP_TYPE_PCF_SOFT":r.shadowMapType===hs&&(e="SHADOWMAP_TYPE_VSM"),e}function EZ(r){let e="ENVMAP_TYPE_CUBE";if(r.envMap)switch(r.envMapMode){case zf:case Uf:e="ENVMAP_TYPE_CUBE";break;case Z_:e="ENVMAP_TYPE_CUBE_UV";break}return e}function LZ(r){let e="ENVMAP_MODE_REFLECTION";if(r.envMap)switch(r.envMapMode){case Uf:e="ENVMAP_MODE_REFRACTION";break}return e}function PZ(r){let e="ENVMAP_BLENDING_NONE";if(r.envMap)switch(r.combine){case nC:e="ENVMAP_BLENDING_MULTIPLY";break;case fX:e="ENVMAP_BLENDING_MIX";break;case dX:e="ENVMAP_BLENDING_ADD";break}return e}function RZ(r){const e=r.envMapCubeUVHeight;if(e===null)return null;const t=Math.log2(e)-2,n=1/e;return{texelWidth:1/(3*Math.max(Math.pow(2,t),7*16)),texelHeight:n,maxMip:t}}function DZ(r,e,t,n){const i=r.getContext(),a=t.defines;let o=t.vertexShader,s=t.fragmentShader;const l=CZ(t),u=EZ(t),c=LZ(t),h=PZ(t),f=RZ(t),d=t.isWebGL2?"":yZ(t),p=_Z(t),g=xZ(a),v=i.createProgram();let m,y,_=t.glslVersion?"#version "+t.glslVersion+` |
|
`:"";t.isRawShaderMaterial?(m=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(hf).join(` |
|
`),m.length>0&&(m+=` |
|
`),y=[d,"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g].filter(hf).join(` |
|
`),y.length>0&&(y+=` |
|
`)):(m=[JP(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+c:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors&&t.isWebGL2?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` |
|
`].filter(hf).join(` |
|
`),y=[d,JP(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,g,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+u:"",t.envMap?"#define "+c:"",t.envMap?"#define "+h:"",f?"#define CUBEUV_TEXEL_WIDTH "+f.texelWidth:"",f?"#define CUBEUV_TEXEL_HEIGHT "+f.texelHeight:"",f?"#define CUBEUV_MAX_MIP "+f.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.useLegacyLights?"#define LEGACY_LIGHTS":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Ol?"#define TONE_MAPPING":"",t.toneMapping!==Ol?It.tonemapping_pars_fragment:"",t.toneMapping!==Ol?mZ("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",It.colorspace_pars_fragment,gZ("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` |
|
`].filter(hf).join(` |
|
`)),o=wb(o),o=KP(o,t),o=ZP(o,t),s=wb(s),s=KP(s,t),s=ZP(s,t),o=QP(o),s=QP(s),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(_=`#version 300 es |
|
`,m=[p,"precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` |
|
`)+` |
|
`+m,y=["precision mediump sampler2DArray;","#define varying in",t.glslVersion===vP?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===vP?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` |
|
`)+` |
|
`+y);const x=_+m+o,S=_+y+s,A=qP(i,i.VERTEX_SHADER,x),w=qP(i,i.FRAGMENT_SHADER,S);i.attachShader(v,A),i.attachShader(v,w),t.index0AttributeName!==void 0?i.bindAttribLocation(v,0,t.index0AttributeName):t.morphTargets===!0&&i.bindAttribLocation(v,0,"position"),i.linkProgram(v);function M(P){if(r.debug.checkShaderErrors){const D=i.getProgramInfoLog(v).trim(),L=i.getShaderInfoLog(A).trim(),E=i.getShaderInfoLog(w).trim();let I=!0,N=!0;if(i.getProgramParameter(v,i.LINK_STATUS)===!1)if(I=!1,typeof r.debug.onShaderError=="function")r.debug.onShaderError(i,v,A,w);else{const R=jP(i,A,"vertex"),F=jP(i,w,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(v,i.VALIDATE_STATUS)+` |
|
|
|
Material Name: `+P.name+` |
|
Material Type: `+P.type+` |
|
|
|
Program Info Log: `+D+` |
|
`+R+` |
|
`+F)}else D!==""?console.warn("THREE.WebGLProgram: Program Info Log:",D):(L===""||E==="")&&(N=!1);N&&(P.diagnostics={runnable:I,programLog:D,vertexShader:{log:L,prefix:m},fragmentShader:{log:E,prefix:y}})}i.deleteShader(A),i.deleteShader(w),C=new Xy(i,v),b=SZ(i,v)}let C;this.getUniforms=function(){return C===void 0&&M(this),C};let b;this.getAttributes=function(){return b===void 0&&M(this),b};let T=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return T===!1&&(T=i.getProgramParameter(v,fZ)),T},this.destroy=function(){n.releaseStatesOfProgram(this),i.deleteProgram(v),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=dZ++,this.cacheKey=e,this.usedTimes=1,this.program=v,this.vertexShader=A,this.fragmentShader=w,this}let IZ=0;class NZ{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,i=this._getShaderStage(t),a=this._getShaderStage(n),o=this._getShaderCacheForMaterial(e);return o.has(i)===!1&&(o.add(i),i.usedTimes++),o.has(a)===!1&&(o.add(a),a.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const n of t)n.usedTimes--,n.usedTimes===0&&this.shaderCache.delete(n.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return n===void 0&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return n===void 0&&(n=new kZ(e),t.set(e,n)),n}}class kZ{constructor(e){this.id=IZ++,this.code=e,this.usedTimes=0}}function OZ(r,e,t,n,i,a,o){const s=new lC,l=new NZ,u=new Set,c=[],h=i.isWebGL2,f=i.logarithmicDepthBuffer,d=i.vertexTextures;let p=i.precision;const g={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};function v(b){return u.add(b),b===0?"uv":`uv${b}`}function m(b,T,P,D,L){const E=D.fog,I=L.geometry,N=b.isMeshStandardMaterial?D.environment:null,R=(b.isMeshStandardMaterial?t:e).get(b.envMap||N),F=R&&R.mapping===Z_?R.image.height:null,O=g[b.type];b.precision!==null&&(p=i.getMaxPrecision(b.precision),p!==b.precision&&console.warn("THREE.WebGLProgram.getParameters:",b.precision,"not supported, using",p,"instead."));const V=I.morphAttributes.position||I.morphAttributes.normal||I.morphAttributes.color,H=V!==void 0?V.length:0;let Q=0;I.morphAttributes.position!==void 0&&(Q=1),I.morphAttributes.normal!==void 0&&(Q=2),I.morphAttributes.color!==void 0&&(Q=3);let W,Z,ee,he;if(O){const $t=Ai[O];W=$t.vertexShader,Z=$t.fragmentShader}else W=b.vertexShader,Z=b.fragmentShader,l.update(b),ee=l.getVertexShaderID(b),he=l.getFragmentShaderID(b);const le=r.getRenderTarget(),re=L.isInstancedMesh===!0,be=L.isBatchedMesh===!0,de=!!b.map,U=!!b.matcap,K=!!R,te=!!b.aoMap,ce=!!b.lightMap,se=!!b.bumpMap,Ne=!!b.normalMap,Oe=!!b.displacementMap,B=!!b.emissiveMap,z=!!b.metalnessMap,ne=!!b.roughnessMap,ve=b.anisotropy>0,Ae=b.clearcoat>0,we=b.iridescence>0,We=b.sheen>0,Be=b.transmission>0,je=ve&&!!b.anisotropyMap,Ye=Ae&&!!b.clearcoatMap,xt=Ae&&!!b.clearcoatNormalMap,Le=Ae&&!!b.clearcoatRoughnessMap,Wt=we&&!!b.iridescenceMap,Ct=we&&!!b.iridescenceThicknessMap,_t=We&&!!b.sheenColorMap,J=We&&!!b.sheenRoughnessMap,ue=!!b.specularMap,Ie=!!b.specularColorMap,j=!!b.specularIntensityMap,Ee=Be&&!!b.transmissionMap,Ue=Be&&!!b.thicknessMap,et=!!b.gradientMap,Y=!!b.alphaMap,De=b.alphaTest>0,q=!!b.alphaHash,Ce=!!b.extensions;let st=Ol;b.toneMapped&&(le===null||le.isXRRenderTarget===!0)&&(st=r.toneMapping);const Jt={isWebGL2:h,shaderID:O,shaderType:b.type,shaderName:b.name,vertexShader:W,fragmentShader:Z,defines:b.defines,customVertexShaderID:ee,customFragmentShaderID:he,isRawShaderMaterial:b.isRawShaderMaterial===!0,glslVersion:b.glslVersion,precision:p,batching:be,instancing:re,instancingColor:re&&L.instanceColor!==null,supportsVertexTextures:d,outputColorSpace:le===null?r.outputColorSpace:le.isXRRenderTarget===!0?le.texture.colorSpace:yr,alphaToCoverage:!!b.alphaToCoverage,map:de,matcap:U,envMap:K,envMapMode:K&&R.mapping,envMapCubeUVHeight:F,aoMap:te,lightMap:ce,bumpMap:se,normalMap:Ne,displacementMap:d&&Oe,emissiveMap:B,normalMapObjectSpace:Ne&&b.normalMapType===IX,normalMapTangentSpace:Ne&&b.normalMapType===iC,metalnessMap:z,roughnessMap:ne,anisotropy:ve,anisotropyMap:je,clearcoat:Ae,clearcoatMap:Ye,clearcoatNormalMap:xt,clearcoatRoughnessMap:Le,iridescence:we,iridescenceMap:Wt,iridescenceThicknessMap:Ct,sheen:We,sheenColorMap:_t,sheenRoughnessMap:J,specularMap:ue,specularColorMap:Ie,specularIntensityMap:j,transmission:Be,transmissionMap:Ee,thicknessMap:Ue,gradientMap:et,opaque:b.transparent===!1&&b.blending===mc&&b.alphaToCoverage===!1,alphaMap:Y,alphaTest:De,alphaHash:q,combine:b.combine,mapUv:de&&v(b.map.channel),aoMapUv:te&&v(b.aoMap.channel),lightMapUv:ce&&v(b.lightMap.channel),bumpMapUv:se&&v(b.bumpMap.channel),normalMapUv:Ne&&v(b.normalMap.channel),displacementMapUv:Oe&&v(b.displacementMap.channel),emissiveMapUv:B&&v(b.emissiveMap.channel),metalnessMapUv:z&&v(b.metalnessMap.channel),roughnessMapUv:ne&&v(b.roughnessMap.channel),anisotropyMapUv:je&&v(b.anisotropyMap.channel),clearcoatMapUv:Ye&&v(b.clearcoatMap.channel),clearcoatNormalMapUv:xt&&v(b.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Le&&v(b.clearcoatRoughnessMap.channel),iridescenceMapUv:Wt&&v(b.iridescenceMap.channel),iridescenceThicknessMapUv:Ct&&v(b.iridescenceThicknessMap.channel),sheenColorMapUv:_t&&v(b.sheenColorMap.channel),sheenRoughnessMapUv:J&&v(b.sheenRoughnessMap.channel),specularMapUv:ue&&v(b.specularMap.channel),specularColorMapUv:Ie&&v(b.specularColorMap.channel),specularIntensityMapUv:j&&v(b.specularIntensityMap.channel),transmissionMapUv:Ee&&v(b.transmissionMap.channel),thicknessMapUv:Ue&&v(b.thicknessMap.channel),alphaMapUv:Y&&v(b.alphaMap.channel),vertexTangents:!!I.attributes.tangent&&(Ne||ve),vertexColors:b.vertexColors,vertexAlphas:b.vertexColors===!0&&!!I.attributes.color&&I.attributes.color.itemSize===4,pointsUvs:L.isPoints===!0&&!!I.attributes.uv&&(de||Y),fog:!!E,useFog:b.fog===!0,fogExp2:!!E&&E.isFogExp2,flatShading:b.flatShading===!0,sizeAttenuation:b.sizeAttenuation===!0,logarithmicDepthBuffer:f,skinning:L.isSkinnedMesh===!0,morphTargets:I.morphAttributes.position!==void 0,morphNormals:I.morphAttributes.normal!==void 0,morphColors:I.morphAttributes.color!==void 0,morphTargetsCount:H,morphTextureStride:Q,numDirLights:T.directional.length,numPointLights:T.point.length,numSpotLights:T.spot.length,numSpotLightMaps:T.spotLightMap.length,numRectAreaLights:T.rectArea.length,numHemiLights:T.hemi.length,numDirLightShadows:T.directionalShadowMap.length,numPointLightShadows:T.pointShadowMap.length,numSpotLightShadows:T.spotShadowMap.length,numSpotLightShadowsWithMaps:T.numSpotLightShadowsWithMaps,numLightProbes:T.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:b.dithering,shadowMapEnabled:r.shadowMap.enabled&&P.length>0,shadowMapType:r.shadowMap.type,toneMapping:st,useLegacyLights:r._useLegacyLights,decodeVideoTexture:de&&b.map.isVideoTexture===!0&&ln.getTransfer(b.map.colorSpace)===Ln,premultipliedAlpha:b.premultipliedAlpha,doubleSided:b.side===ur,flipSided:b.side===Di,useDepthPacking:b.depthPacking>=0,depthPacking:b.depthPacking||0,index0AttributeName:b.index0AttributeName,extensionDerivatives:Ce&&b.extensions.derivatives===!0,extensionFragDepth:Ce&&b.extensions.fragDepth===!0,extensionDrawBuffers:Ce&&b.extensions.drawBuffers===!0,extensionShaderTextureLOD:Ce&&b.extensions.shaderTextureLOD===!0,extensionClipCullDistance:Ce&&b.extensions.clipCullDistance===!0&&n.has("WEBGL_clip_cull_distance"),extensionMultiDraw:Ce&&b.extensions.multiDraw===!0&&n.has("WEBGL_multi_draw"),rendererExtensionFragDepth:h||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:h||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:h||n.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:n.has("KHR_parallel_shader_compile"),customProgramCacheKey:b.customProgramCacheKey()};return Jt.vertexUv1s=u.has(1),Jt.vertexUv2s=u.has(2),Jt.vertexUv3s=u.has(3),u.clear(),Jt}function y(b){const T=[];if(b.shaderID?T.push(b.shaderID):(T.push(b.customVertexShaderID),T.push(b.customFragmentShaderID)),b.defines!==void 0)for(const P in b.defines)T.push(P),T.push(b.defines[P]);return b.isRawShaderMaterial===!1&&(_(T,b),x(T,b),T.push(r.outputColorSpace)),T.push(b.customProgramCacheKey),T.join()}function _(b,T){b.push(T.precision),b.push(T.outputColorSpace),b.push(T.envMapMode),b.push(T.envMapCubeUVHeight),b.push(T.mapUv),b.push(T.alphaMapUv),b.push(T.lightMapUv),b.push(T.aoMapUv),b.push(T.bumpMapUv),b.push(T.normalMapUv),b.push(T.displacementMapUv),b.push(T.emissiveMapUv),b.push(T.metalnessMapUv),b.push(T.roughnessMapUv),b.push(T.anisotropyMapUv),b.push(T.clearcoatMapUv),b.push(T.clearcoatNormalMapUv),b.push(T.clearcoatRoughnessMapUv),b.push(T.iridescenceMapUv),b.push(T.iridescenceThicknessMapUv),b.push(T.sheenColorMapUv),b.push(T.sheenRoughnessMapUv),b.push(T.specularMapUv),b.push(T.specularColorMapUv),b.push(T.specularIntensityMapUv),b.push(T.transmissionMapUv),b.push(T.thicknessMapUv),b.push(T.combine),b.push(T.fogExp2),b.push(T.sizeAttenuation),b.push(T.morphTargetsCount),b.push(T.morphAttributeCount),b.push(T.numDirLights),b.push(T.numPointLights),b.push(T.numSpotLights),b.push(T.numSpotLightMaps),b.push(T.numHemiLights),b.push(T.numRectAreaLights),b.push(T.numDirLightShadows),b.push(T.numPointLightShadows),b.push(T.numSpotLightShadows),b.push(T.numSpotLightShadowsWithMaps),b.push(T.numLightProbes),b.push(T.shadowMapType),b.push(T.toneMapping),b.push(T.numClippingPlanes),b.push(T.numClipIntersection),b.push(T.depthPacking)}function x(b,T){s.disableAll(),T.isWebGL2&&s.enable(0),T.supportsVertexTextures&&s.enable(1),T.instancing&&s.enable(2),T.instancingColor&&s.enable(3),T.matcap&&s.enable(4),T.envMap&&s.enable(5),T.normalMapObjectSpace&&s.enable(6),T.normalMapTangentSpace&&s.enable(7),T.clearcoat&&s.enable(8),T.iridescence&&s.enable(9),T.alphaTest&&s.enable(10),T.vertexColors&&s.enable(11),T.vertexAlphas&&s.enable(12),T.vertexUv1s&&s.enable(13),T.vertexUv2s&&s.enable(14),T.vertexUv3s&&s.enable(15),T.vertexTangents&&s.enable(16),T.anisotropy&&s.enable(17),T.alphaHash&&s.enable(18),T.batching&&s.enable(19),b.push(s.mask),s.disableAll(),T.fog&&s.enable(0),T.useFog&&s.enable(1),T.flatShading&&s.enable(2),T.logarithmicDepthBuffer&&s.enable(3),T.skinning&&s.enable(4),T.morphTargets&&s.enable(5),T.morphNormals&&s.enable(6),T.morphColors&&s.enable(7),T.premultipliedAlpha&&s.enable(8),T.shadowMapEnabled&&s.enable(9),T.useLegacyLights&&s.enable(10),T.doubleSided&&s.enable(11),T.flipSided&&s.enable(12),T.useDepthPacking&&s.enable(13),T.dithering&&s.enable(14),T.transmission&&s.enable(15),T.sheen&&s.enable(16),T.opaque&&s.enable(17),T.pointsUvs&&s.enable(18),T.decodeVideoTexture&&s.enable(19),T.alphaToCoverage&&s.enable(20),b.push(s.mask)}function S(b){const T=g[b.type];let P;if(T){const D=Ai[T];P=uC.clone(D.uniforms)}else P=b.uniforms;return P}function A(b,T){let P;for(let D=0,L=c.length;D<L;D++){const E=c[D];if(E.cacheKey===T){P=E,++P.usedTimes;break}}return P===void 0&&(P=new DZ(r,T,b,a),c.push(P)),P}function w(b){if(--b.usedTimes===0){const T=c.indexOf(b);c[T]=c[c.length-1],c.pop(),b.destroy()}}function M(b){l.remove(b)}function C(){l.dispose()}return{getParameters:m,getProgramCacheKey:y,getUniforms:S,acquireProgram:A,releaseProgram:w,releaseShaderCache:M,programs:c,dispose:C}}function FZ(){let r=new WeakMap;function e(a){let o=r.get(a);return o===void 0&&(o={},r.set(a,o)),o}function t(a){r.delete(a)}function n(a,o,s){r.get(a)[o]=s}function i(){r=new WeakMap}return{get:e,remove:t,update:n,dispose:i}}function BZ(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.material.id!==e.material.id?r.material.id-e.material.id:r.z!==e.z?r.z-e.z:r.id-e.id}function eR(r,e){return r.groupOrder!==e.groupOrder?r.groupOrder-e.groupOrder:r.renderOrder!==e.renderOrder?r.renderOrder-e.renderOrder:r.z!==e.z?e.z-r.z:r.id-e.id}function tR(){const r=[];let e=0;const t=[],n=[],i=[];function a(){e=0,t.length=0,n.length=0,i.length=0}function o(h,f,d,p,g,v){let m=r[e];return m===void 0?(m={id:h.id,object:h,geometry:f,material:d,groupOrder:p,renderOrder:h.renderOrder,z:g,group:v},r[e]=m):(m.id=h.id,m.object=h,m.geometry=f,m.material=d,m.groupOrder=p,m.renderOrder=h.renderOrder,m.z=g,m.group=v),e++,m}function s(h,f,d,p,g,v){const m=o(h,f,d,p,g,v);d.transmission>0?n.push(m):d.transparent===!0?i.push(m):t.push(m)}function l(h,f,d,p,g,v){const m=o(h,f,d,p,g,v);d.transmission>0?n.unshift(m):d.transparent===!0?i.unshift(m):t.unshift(m)}function u(h,f){t.length>1&&t.sort(h||BZ),n.length>1&&n.sort(f||eR),i.length>1&&i.sort(f||eR)}function c(){for(let h=e,f=r.length;h<f;h++){const d=r[h];if(d.id===null)break;d.id=null,d.object=null,d.geometry=null,d.material=null,d.group=null}}return{opaque:t,transmissive:n,transparent:i,init:a,push:s,unshift:l,finish:c,sort:u}}function zZ(){let r=new WeakMap;function e(n,i){const a=r.get(n);let o;return a===void 0?(o=new tR,r.set(n,[o])):i>=a.length?(o=new tR,a.push(o)):o=a[i],o}function t(){r=new WeakMap}return{get:e,dispose:t}}function UZ(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new X,color:new nt};break;case"SpotLight":t={position:new X,direction:new X,color:new nt,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new X,color:new nt,distance:0,decay:0};break;case"HemisphereLight":t={direction:new X,skyColor:new nt,groundColor:new nt};break;case"RectAreaLight":t={color:new nt,position:new X,halfWidth:new X,halfHeight:new X};break}return r[e.id]=t,t}}}function VZ(){const r={};return{get:function(e){if(r[e.id]!==void 0)return r[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Me};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Me};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Me,shadowCameraNear:1,shadowCameraFar:1e3};break}return r[e.id]=t,t}}}let GZ=0;function HZ(r,e){return(e.castShadow?2:0)-(r.castShadow?2:0)+(e.map?1:0)-(r.map?1:0)}function WZ(r,e){const t=new UZ,n=VZ(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0,numLightProbes:0};for(let c=0;c<9;c++)i.probe.push(new X);const a=new X,o=new Mt,s=new Mt;function l(c,h){let f=0,d=0,p=0;for(let P=0;P<9;P++)i.probe[P].set(0,0,0);let g=0,v=0,m=0,y=0,_=0,x=0,S=0,A=0,w=0,M=0,C=0;c.sort(HZ);const b=h===!0?Math.PI:1;for(let P=0,D=c.length;P<D;P++){const L=c[P],E=L.color,I=L.intensity,N=L.distance,R=L.shadow&&L.shadow.map?L.shadow.map.texture:null;if(L.isAmbientLight)f+=E.r*I*b,d+=E.g*I*b,p+=E.b*I*b;else if(L.isLightProbe){for(let F=0;F<9;F++)i.probe[F].addScaledVector(L.sh.coefficients[F],I);C++}else if(L.isDirectionalLight){const F=t.get(L);if(F.color.copy(L.color).multiplyScalar(L.intensity*b),L.castShadow){const O=L.shadow,V=n.get(L);V.shadowBias=O.bias,V.shadowNormalBias=O.normalBias,V.shadowRadius=O.radius,V.shadowMapSize=O.mapSize,i.directionalShadow[g]=V,i.directionalShadowMap[g]=R,i.directionalShadowMatrix[g]=L.shadow.matrix,x++}i.directional[g]=F,g++}else if(L.isSpotLight){const F=t.get(L);F.position.setFromMatrixPosition(L.matrixWorld),F.color.copy(E).multiplyScalar(I*b),F.distance=N,F.coneCos=Math.cos(L.angle),F.penumbraCos=Math.cos(L.angle*(1-L.penumbra)),F.decay=L.decay,i.spot[m]=F;const O=L.shadow;if(L.map&&(i.spotLightMap[w]=L.map,w++,O.updateMatrices(L),L.castShadow&&M++),i.spotLightMatrix[m]=O.matrix,L.castShadow){const V=n.get(L);V.shadowBias=O.bias,V.shadowNormalBias=O.normalBias,V.shadowRadius=O.radius,V.shadowMapSize=O.mapSize,i.spotShadow[m]=V,i.spotShadowMap[m]=R,A++}m++}else if(L.isRectAreaLight){const F=t.get(L);F.color.copy(E).multiplyScalar(I),F.halfWidth.set(L.width*.5,0,0),F.halfHeight.set(0,L.height*.5,0),i.rectArea[y]=F,y++}else if(L.isPointLight){const F=t.get(L);if(F.color.copy(L.color).multiplyScalar(L.intensity*b),F.distance=L.distance,F.decay=L.decay,L.castShadow){const O=L.shadow,V=n.get(L);V.shadowBias=O.bias,V.shadowNormalBias=O.normalBias,V.shadowRadius=O.radius,V.shadowMapSize=O.mapSize,V.shadowCameraNear=O.camera.near,V.shadowCameraFar=O.camera.far,i.pointShadow[v]=V,i.pointShadowMap[v]=R,i.pointShadowMatrix[v]=L.shadow.matrix,S++}i.point[v]=F,v++}else if(L.isHemisphereLight){const F=t.get(L);F.skyColor.copy(L.color).multiplyScalar(I*b),F.groundColor.copy(L.groundColor).multiplyScalar(I*b),i.hemi[_]=F,_++}}y>0&&(e.isWebGL2?r.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ve.LTC_FLOAT_1,i.rectAreaLTC2=Ve.LTC_FLOAT_2):(i.rectAreaLTC1=Ve.LTC_HALF_1,i.rectAreaLTC2=Ve.LTC_HALF_2):r.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=Ve.LTC_FLOAT_1,i.rectAreaLTC2=Ve.LTC_FLOAT_2):r.has("OES_texture_half_float_linear")===!0?(i.rectAreaLTC1=Ve.LTC_HALF_1,i.rectAreaLTC2=Ve.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=f,i.ambient[1]=d,i.ambient[2]=p;const T=i.hash;(T.directionalLength!==g||T.pointLength!==v||T.spotLength!==m||T.rectAreaLength!==y||T.hemiLength!==_||T.numDirectionalShadows!==x||T.numPointShadows!==S||T.numSpotShadows!==A||T.numSpotMaps!==w||T.numLightProbes!==C)&&(i.directional.length=g,i.spot.length=m,i.rectArea.length=y,i.point.length=v,i.hemi.length=_,i.directionalShadow.length=x,i.directionalShadowMap.length=x,i.pointShadow.length=S,i.pointShadowMap.length=S,i.spotShadow.length=A,i.spotShadowMap.length=A,i.directionalShadowMatrix.length=x,i.pointShadowMatrix.length=S,i.spotLightMatrix.length=A+w-M,i.spotLightMap.length=w,i.numSpotLightShadowsWithMaps=M,i.numLightProbes=C,T.directionalLength=g,T.pointLength=v,T.spotLength=m,T.rectAreaLength=y,T.hemiLength=_,T.numDirectionalShadows=x,T.numPointShadows=S,T.numSpotShadows=A,T.numSpotMaps=w,T.numLightProbes=C,i.version=GZ++)}function u(c,h){let f=0,d=0,p=0,g=0,v=0;const m=h.matrixWorldInverse;for(let y=0,_=c.length;y<_;y++){const x=c[y];if(x.isDirectionalLight){const S=i.directional[f];S.direction.setFromMatrixPosition(x.matrixWorld),a.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(a),S.direction.transformDirection(m),f++}else if(x.isSpotLight){const S=i.spot[p];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(m),S.direction.setFromMatrixPosition(x.matrixWorld),a.setFromMatrixPosition(x.target.matrixWorld),S.direction.sub(a),S.direction.transformDirection(m),p++}else if(x.isRectAreaLight){const S=i.rectArea[g];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(m),s.identity(),o.copy(x.matrixWorld),o.premultiply(m),s.extractRotation(o),S.halfWidth.set(x.width*.5,0,0),S.halfHeight.set(0,x.height*.5,0),S.halfWidth.applyMatrix4(s),S.halfHeight.applyMatrix4(s),g++}else if(x.isPointLight){const S=i.point[d];S.position.setFromMatrixPosition(x.matrixWorld),S.position.applyMatrix4(m),d++}else if(x.isHemisphereLight){const S=i.hemi[v];S.direction.setFromMatrixPosition(x.matrixWorld),S.direction.transformDirection(m),v++}}}return{setup:l,setupView:u,state:i}}function nR(r,e){const t=new WZ(r,e),n=[],i=[];function a(){n.length=0,i.length=0}function o(h){n.push(h)}function s(h){i.push(h)}function l(h){t.setup(n,h)}function u(h){t.setupView(n,h)}return{init:a,state:{lightsArray:n,shadowsArray:i,lights:t},setupLights:l,setupLightsView:u,pushLight:o,pushShadow:s}}function $Z(r,e){let t=new WeakMap;function n(a,o=0){const s=t.get(a);let l;return s===void 0?(l=new nR(r,e),t.set(a,[l])):o>=s.length?(l=new nR(r,e),s.push(l)):l=s[o],l}function i(){t=new WeakMap}return{get:n,dispose:i}}class XZ extends Da{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=RX,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class YZ extends Da{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}const qZ=`void main() { |
|
gl_Position = vec4( position, 1.0 ); |
|
}`,jZ=`uniform sampler2D shadow_pass; |
|
uniform vec2 resolution; |
|
uniform float radius; |
|
#include <packing> |
|
void main() { |
|
const float samples = float( VSM_SAMPLES ); |
|
float mean = 0.0; |
|
float squared_mean = 0.0; |
|
float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); |
|
float uvStart = samples <= 1.0 ? 0.0 : - 1.0; |
|
for ( float i = 0.0; i < samples; i ++ ) { |
|
float uvOffset = uvStart + i * uvStride; |
|
#ifdef HORIZONTAL_PASS |
|
vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); |
|
mean += distribution.x; |
|
squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; |
|
#else |
|
float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); |
|
mean += depth; |
|
squared_mean += depth * depth; |
|
#endif |
|
} |
|
mean = mean / samples; |
|
squared_mean = squared_mean / samples; |
|
float std_dev = sqrt( squared_mean - mean * mean ); |
|
gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); |
|
}`;function KZ(r,e,t){let n=new cC;const i=new Me,a=new Me,o=new an,s=new XZ({depthPacking:DX}),l=new YZ,u={},c=t.maxTextureSize,h={[Es]:Di,[Di]:Es,[ur]:ur},f=new Ls({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Me},radius:{value:4}},vertexShader:qZ,fragmentShader:jZ}),d=f.clone();d.defines.HORIZONTAL_PASS=1;const p=new wn;p.setAttribute("position",new Gn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const g=new rn(p,f),v=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=ez;let m=this.type;this.render=function(A,w,M){if(v.enabled===!1||v.autoUpdate===!1&&v.needsUpdate===!1||A.length===0)return;const C=r.getRenderTarget(),b=r.getActiveCubeFace(),T=r.getActiveMipmapLevel(),P=r.state;P.setBlending(kl),P.buffers.color.setClear(1,1,1,1),P.buffers.depth.setTest(!0),P.setScissorTest(!1);const D=m!==hs&&this.type===hs,L=m===hs&&this.type!==hs;for(let E=0,I=A.length;E<I;E++){const N=A[E],R=N.shadow;if(R===void 0){console.warn("THREE.WebGLShadowMap:",N,"has no shadow.");continue}if(R.autoUpdate===!1&&R.needsUpdate===!1)continue;i.copy(R.mapSize);const F=R.getFrameExtents();if(i.multiply(F),a.copy(R.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(a.x=Math.floor(c/F.x),i.x=a.x*F.x,R.mapSize.x=a.x),i.y>c&&(a.y=Math.floor(c/F.y),i.y=a.y*F.y,R.mapSize.y=a.y)),R.map===null||D===!0||L===!0){const V=this.type!==hs?{minFilter:vr,magFilter:vr}:{};R.map!==null&&R.map.dispose(),R.map=new kc(i.x,i.y,V),R.map.texture.name=N.name+".shadowMap",R.camera.updateProjectionMatrix()}r.setRenderTarget(R.map),r.clear();const O=R.getViewportCount();for(let V=0;V<O;V++){const H=R.getViewport(V);o.set(a.x*H.x,a.y*H.y,a.x*H.z,a.y*H.w),P.viewport(o),R.updateMatrices(N,V),n=R.getFrustum(),x(w,M,R.camera,N,this.type)}R.isPointLightShadow!==!0&&this.type===hs&&y(R,M),R.needsUpdate=!1}m=this.type,v.needsUpdate=!1,r.setRenderTarget(C,b,T)};function y(A,w){const M=e.update(g);f.defines.VSM_SAMPLES!==A.blurSamples&&(f.defines.VSM_SAMPLES=A.blurSamples,d.defines.VSM_SAMPLES=A.blurSamples,f.needsUpdate=!0,d.needsUpdate=!0),A.mapPass===null&&(A.mapPass=new kc(i.x,i.y)),f.uniforms.shadow_pass.value=A.map.texture,f.uniforms.resolution.value=A.mapSize,f.uniforms.radius.value=A.radius,r.setRenderTarget(A.mapPass),r.clear(),r.renderBufferDirect(w,null,M,f,g,null),d.uniforms.shadow_pass.value=A.mapPass.texture,d.uniforms.resolution.value=A.mapSize,d.uniforms.radius.value=A.radius,r.setRenderTarget(A.map),r.clear(),r.renderBufferDirect(w,null,M,d,g,null)}function _(A,w,M,C){let b=null;const T=M.isPointLight===!0?A.customDistanceMaterial:A.customDepthMaterial;if(T!==void 0)b=T;else if(b=M.isPointLight===!0?l:s,r.localClippingEnabled&&w.clipShadows===!0&&Array.isArray(w.clippingPlanes)&&w.clippingPlanes.length!==0||w.displacementMap&&w.displacementScale!==0||w.alphaMap&&w.alphaTest>0||w.map&&w.alphaTest>0){const P=b.uuid,D=w.uuid;let L=u[P];L===void 0&&(L={},u[P]=L);let E=L[D];E===void 0&&(E=b.clone(),L[D]=E,w.addEventListener("dispose",S)),b=E}if(b.visible=w.visible,b.wireframe=w.wireframe,C===hs?b.side=w.shadowSide!==null?w.shadowSide:w.side:b.side=w.shadowSide!==null?w.shadowSide:h[w.side],b.alphaMap=w.alphaMap,b.alphaTest=w.alphaTest,b.map=w.map,b.clipShadows=w.clipShadows,b.clippingPlanes=w.clippingPlanes,b.clipIntersection=w.clipIntersection,b.displacementMap=w.displacementMap,b.displacementScale=w.displacementScale,b.displacementBias=w.displacementBias,b.wireframeLinewidth=w.wireframeLinewidth,b.linewidth=w.linewidth,M.isPointLight===!0&&b.isMeshDistanceMaterial===!0){const P=r.properties.get(b);P.light=M}return b}function x(A,w,M,C,b){if(A.visible===!1)return;if(A.layers.test(w.layers)&&(A.isMesh||A.isLine||A.isPoints)&&(A.castShadow||A.receiveShadow&&b===hs)&&(!A.frustumCulled||n.intersectsObject(A))){A.modelViewMatrix.multiplyMatrices(M.matrixWorldInverse,A.matrixWorld);const D=e.update(A),L=A.material;if(Array.isArray(L)){const E=D.groups;for(let I=0,N=E.length;I<N;I++){const R=E[I],F=L[R.materialIndex];if(F&&F.visible){const O=_(A,F,C,b);A.onBeforeShadow(r,A,w,M,D,O,R),r.renderBufferDirect(M,null,D,O,A,R),A.onAfterShadow(r,A,w,M,D,O,R)}}}else if(L.visible){const E=_(A,L,C,b);A.onBeforeShadow(r,A,w,M,D,E,null),r.renderBufferDirect(M,null,D,E,A,null),A.onAfterShadow(r,A,w,M,D,E,null)}}const P=A.children;for(let D=0,L=P.length;D<L;D++)x(P[D],w,M,C,b)}function S(A){A.target.removeEventListener("dispose",S);for(const M in u){const C=u[M],b=A.target.uuid;b in C&&(C[b].dispose(),delete C[b])}}}function ZZ(r,e,t){const n=t.isWebGL2;function i(){let Y=!1;const De=new an;let q=null;const Ce=new an(0,0,0,0);return{setMask:function(st){q!==st&&!Y&&(r.colorMask(st,st,st,st),q=st)},setLocked:function(st){Y=st},setClear:function(st,Jt,$t,mn,Lr){Lr===!0&&(st*=mn,Jt*=mn,$t*=mn),De.set(st,Jt,$t,mn),Ce.equals(De)===!1&&(r.clearColor(st,Jt,$t,mn),Ce.copy(De))},reset:function(){Y=!1,q=null,Ce.set(-1,0,0,0)}}}function a(){let Y=!1,De=null,q=null,Ce=null;return{setTest:function(st){st?re(r.DEPTH_TEST):be(r.DEPTH_TEST)},setMask:function(st){De!==st&&!Y&&(r.depthMask(st),De=st)},setFunc:function(st){if(q!==st){switch(st){case aX:r.depthFunc(r.NEVER);break;case oX:r.depthFunc(r.ALWAYS);break;case sX:r.depthFunc(r.LESS);break;case L0:r.depthFunc(r.LEQUAL);break;case lX:r.depthFunc(r.EQUAL);break;case uX:r.depthFunc(r.GEQUAL);break;case cX:r.depthFunc(r.GREATER);break;case hX:r.depthFunc(r.NOTEQUAL);break;default:r.depthFunc(r.LEQUAL)}q=st}},setLocked:function(st){Y=st},setClear:function(st){Ce!==st&&(r.clearDepth(st),Ce=st)},reset:function(){Y=!1,De=null,q=null,Ce=null}}}function o(){let Y=!1,De=null,q=null,Ce=null,st=null,Jt=null,$t=null,mn=null,Lr=null;return{setTest:function(en){Y||(en?re(r.STENCIL_TEST):be(r.STENCIL_TEST))},setMask:function(en){De!==en&&!Y&&(r.stencilMask(en),De=en)},setFunc:function(en,jn,oi){(q!==en||Ce!==jn||st!==oi)&&(r.stencilFunc(en,jn,oi),q=en,Ce=jn,st=oi)},setOp:function(en,jn,oi){(Jt!==en||$t!==jn||mn!==oi)&&(r.stencilOp(en,jn,oi),Jt=en,$t=jn,mn=oi)},setLocked:function(en){Y=en},setClear:function(en){Lr!==en&&(r.clearStencil(en),Lr=en)},reset:function(){Y=!1,De=null,q=null,Ce=null,st=null,Jt=null,$t=null,mn=null,Lr=null}}}const s=new i,l=new a,u=new o,c=new WeakMap,h=new WeakMap;let f={},d={},p=new WeakMap,g=[],v=null,m=!1,y=null,_=null,x=null,S=null,A=null,w=null,M=null,C=new nt(0,0,0),b=0,T=!1,P=null,D=null,L=null,E=null,I=null;const N=r.getParameter(r.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let R=!1,F=0;const O=r.getParameter(r.VERSION);O.indexOf("WebGL")!==-1?(F=parseFloat(/^WebGL (\d)/.exec(O)[1]),R=F>=1):O.indexOf("OpenGL ES")!==-1&&(F=parseFloat(/^OpenGL ES (\d)/.exec(O)[1]),R=F>=2);let V=null,H={};const Q=r.getParameter(r.SCISSOR_BOX),W=r.getParameter(r.VIEWPORT),Z=new an().fromArray(Q),ee=new an().fromArray(W);function he(Y,De,q,Ce){const st=new Uint8Array(4),Jt=r.createTexture();r.bindTexture(Y,Jt),r.texParameteri(Y,r.TEXTURE_MIN_FILTER,r.NEAREST),r.texParameteri(Y,r.TEXTURE_MAG_FILTER,r.NEAREST);for(let $t=0;$t<q;$t++)n&&(Y===r.TEXTURE_3D||Y===r.TEXTURE_2D_ARRAY)?r.texImage3D(De,0,r.RGBA,1,1,Ce,0,r.RGBA,r.UNSIGNED_BYTE,st):r.texImage2D(De+$t,0,r.RGBA,1,1,0,r.RGBA,r.UNSIGNED_BYTE,st);return Jt}const le={};le[r.TEXTURE_2D]=he(r.TEXTURE_2D,r.TEXTURE_2D,1),le[r.TEXTURE_CUBE_MAP]=he(r.TEXTURE_CUBE_MAP,r.TEXTURE_CUBE_MAP_POSITIVE_X,6),n&&(le[r.TEXTURE_2D_ARRAY]=he(r.TEXTURE_2D_ARRAY,r.TEXTURE_2D_ARRAY,1,1),le[r.TEXTURE_3D]=he(r.TEXTURE_3D,r.TEXTURE_3D,1,1)),s.setClear(0,0,0,1),l.setClear(1),u.setClear(0),re(r.DEPTH_TEST),l.setFunc(L0),Oe(!1),B(NL),re(r.CULL_FACE),se(kl);function re(Y){f[Y]!==!0&&(r.enable(Y),f[Y]=!0)}function be(Y){f[Y]!==!1&&(r.disable(Y),f[Y]=!1)}function de(Y,De){return d[Y]!==De?(r.bindFramebuffer(Y,De),d[Y]=De,n&&(Y===r.DRAW_FRAMEBUFFER&&(d[r.FRAMEBUFFER]=De),Y===r.FRAMEBUFFER&&(d[r.DRAW_FRAMEBUFFER]=De)),!0):!1}function U(Y,De){let q=g,Ce=!1;if(Y)if(q=p.get(De),q===void 0&&(q=[],p.set(De,q)),Y.isWebGLMultipleRenderTargets){const st=Y.texture;if(q.length!==st.length||q[0]!==r.COLOR_ATTACHMENT0){for(let Jt=0,$t=st.length;Jt<$t;Jt++)q[Jt]=r.COLOR_ATTACHMENT0+Jt;q.length=st.length,Ce=!0}}else q[0]!==r.COLOR_ATTACHMENT0&&(q[0]=r.COLOR_ATTACHMENT0,Ce=!0);else q[0]!==r.BACK&&(q[0]=r.BACK,Ce=!0);Ce&&(t.isWebGL2?r.drawBuffers(q):e.get("WEBGL_draw_buffers").drawBuffersWEBGL(q))}function K(Y){return v!==Y?(r.useProgram(Y),v=Y,!0):!1}const te={[vl]:r.FUNC_ADD,[X$]:r.FUNC_SUBTRACT,[Y$]:r.FUNC_REVERSE_SUBTRACT};if(n)te[FL]=r.MIN,te[BL]=r.MAX;else{const Y=e.get("EXT_blend_minmax");Y!==null&&(te[FL]=Y.MIN_EXT,te[BL]=Y.MAX_EXT)}const ce={[q$]:r.ZERO,[nz]:r.ONE,[j$]:r.SRC_COLOR,[pb]:r.SRC_ALPHA,[eX]:r.SRC_ALPHA_SATURATE,[rz]:r.DST_COLOR,[Z$]:r.DST_ALPHA,[K$]:r.ONE_MINUS_SRC_COLOR,[vb]:r.ONE_MINUS_SRC_ALPHA,[J$]:r.ONE_MINUS_DST_COLOR,[Q$]:r.ONE_MINUS_DST_ALPHA,[tX]:r.CONSTANT_COLOR,[nX]:r.ONE_MINUS_CONSTANT_COLOR,[rX]:r.CONSTANT_ALPHA,[iX]:r.ONE_MINUS_CONSTANT_ALPHA};function se(Y,De,q,Ce,st,Jt,$t,mn,Lr,en){if(Y===kl){m===!0&&(be(r.BLEND),m=!1);return}if(m===!1&&(re(r.BLEND),m=!0),Y!==tz){if(Y!==y||en!==T){if((_!==vl||A!==vl)&&(r.blendEquation(r.FUNC_ADD),_=vl,A=vl),en)switch(Y){case mc:r.blendFuncSeparate(r.ONE,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Eo:r.blendFunc(r.ONE,r.ONE);break;case kL:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case OL:r.blendFuncSeparate(r.ZERO,r.SRC_COLOR,r.ZERO,r.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y);break}else switch(Y){case mc:r.blendFuncSeparate(r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA);break;case Eo:r.blendFunc(r.SRC_ALPHA,r.ONE);break;case kL:r.blendFuncSeparate(r.ZERO,r.ONE_MINUS_SRC_COLOR,r.ZERO,r.ONE);break;case OL:r.blendFunc(r.ZERO,r.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",Y);break}x=null,S=null,w=null,M=null,C.set(0,0,0),b=0,y=Y,T=en}return}st=st||De,Jt=Jt||q,$t=$t||Ce,(De!==_||st!==A)&&(r.blendEquationSeparate(te[De],te[st]),_=De,A=st),(q!==x||Ce!==S||Jt!==w||$t!==M)&&(r.blendFuncSeparate(ce[q],ce[Ce],ce[Jt],ce[$t]),x=q,S=Ce,w=Jt,M=$t),(mn.equals(C)===!1||Lr!==b)&&(r.blendColor(mn.r,mn.g,mn.b,Lr),C.copy(mn),b=Lr),y=Y,T=!1}function Ne(Y,De){Y.side===ur?be(r.CULL_FACE):re(r.CULL_FACE);let q=Y.side===Di;De&&(q=!q),Oe(q),Y.blending===mc&&Y.transparent===!1?se(kl):se(Y.blending,Y.blendEquation,Y.blendSrc,Y.blendDst,Y.blendEquationAlpha,Y.blendSrcAlpha,Y.blendDstAlpha,Y.blendColor,Y.blendAlpha,Y.premultipliedAlpha),l.setFunc(Y.depthFunc),l.setTest(Y.depthTest),l.setMask(Y.depthWrite),s.setMask(Y.colorWrite);const Ce=Y.stencilWrite;u.setTest(Ce),Ce&&(u.setMask(Y.stencilWriteMask),u.setFunc(Y.stencilFunc,Y.stencilRef,Y.stencilFuncMask),u.setOp(Y.stencilFail,Y.stencilZFail,Y.stencilZPass)),ne(Y.polygonOffset,Y.polygonOffsetFactor,Y.polygonOffsetUnits),Y.alphaToCoverage===!0?re(r.SAMPLE_ALPHA_TO_COVERAGE):be(r.SAMPLE_ALPHA_TO_COVERAGE)}function Oe(Y){P!==Y&&(Y?r.frontFace(r.CW):r.frontFace(r.CCW),P=Y)}function B(Y){Y!==H$?(re(r.CULL_FACE),Y!==D&&(Y===NL?r.cullFace(r.BACK):Y===W$?r.cullFace(r.FRONT):r.cullFace(r.FRONT_AND_BACK))):be(r.CULL_FACE),D=Y}function z(Y){Y!==L&&(R&&r.lineWidth(Y),L=Y)}function ne(Y,De,q){Y?(re(r.POLYGON_OFFSET_FILL),(E!==De||I!==q)&&(r.polygonOffset(De,q),E=De,I=q)):be(r.POLYGON_OFFSET_FILL)}function ve(Y){Y?re(r.SCISSOR_TEST):be(r.SCISSOR_TEST)}function Ae(Y){Y===void 0&&(Y=r.TEXTURE0+N-1),V!==Y&&(r.activeTexture(Y),V=Y)}function we(Y,De,q){q===void 0&&(V===null?q=r.TEXTURE0+N-1:q=V);let Ce=H[q];Ce===void 0&&(Ce={type:void 0,texture:void 0},H[q]=Ce),(Ce.type!==Y||Ce.texture!==De)&&(V!==q&&(r.activeTexture(q),V=q),r.bindTexture(Y,De||le[Y]),Ce.type=Y,Ce.texture=De)}function We(){const Y=H[V];Y!==void 0&&Y.type!==void 0&&(r.bindTexture(Y.type,null),Y.type=void 0,Y.texture=void 0)}function Be(){try{r.compressedTexImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function je(){try{r.compressedTexImage3D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function Ye(){try{r.texSubImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function xt(){try{r.texSubImage3D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function Le(){try{r.compressedTexSubImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function Wt(){try{r.compressedTexSubImage3D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function Ct(){try{r.texStorage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function _t(){try{r.texStorage3D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function J(){try{r.texImage2D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function ue(){try{r.texImage3D.apply(r,arguments)}catch(Y){console.error("THREE.WebGLState:",Y)}}function Ie(Y){Z.equals(Y)===!1&&(r.scissor(Y.x,Y.y,Y.z,Y.w),Z.copy(Y))}function j(Y){ee.equals(Y)===!1&&(r.viewport(Y.x,Y.y,Y.z,Y.w),ee.copy(Y))}function Ee(Y,De){let q=h.get(De);q===void 0&&(q=new WeakMap,h.set(De,q));let Ce=q.get(Y);Ce===void 0&&(Ce=r.getUniformBlockIndex(De,Y.name),q.set(Y,Ce))}function Ue(Y,De){const Ce=h.get(De).get(Y);c.get(De)!==Ce&&(r.uniformBlockBinding(De,Ce,Y.__bindingPointIndex),c.set(De,Ce))}function et(){r.disable(r.BLEND),r.disable(r.CULL_FACE),r.disable(r.DEPTH_TEST),r.disable(r.POLYGON_OFFSET_FILL),r.disable(r.SCISSOR_TEST),r.disable(r.STENCIL_TEST),r.disable(r.SAMPLE_ALPHA_TO_COVERAGE),r.blendEquation(r.FUNC_ADD),r.blendFunc(r.ONE,r.ZERO),r.blendFuncSeparate(r.ONE,r.ZERO,r.ONE,r.ZERO),r.blendColor(0,0,0,0),r.colorMask(!0,!0,!0,!0),r.clearColor(0,0,0,0),r.depthMask(!0),r.depthFunc(r.LESS),r.clearDepth(1),r.stencilMask(4294967295),r.stencilFunc(r.ALWAYS,0,4294967295),r.stencilOp(r.KEEP,r.KEEP,r.KEEP),r.clearStencil(0),r.cullFace(r.BACK),r.frontFace(r.CCW),r.polygonOffset(0,0),r.activeTexture(r.TEXTURE0),r.bindFramebuffer(r.FRAMEBUFFER,null),n===!0&&(r.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),r.bindFramebuffer(r.READ_FRAMEBUFFER,null)),r.useProgram(null),r.lineWidth(1),r.scissor(0,0,r.canvas.width,r.canvas.height),r.viewport(0,0,r.canvas.width,r.canvas.height),f={},V=null,H={},d={},p=new WeakMap,g=[],v=null,m=!1,y=null,_=null,x=null,S=null,A=null,w=null,M=null,C=new nt(0,0,0),b=0,T=!1,P=null,D=null,L=null,E=null,I=null,Z.set(0,0,r.canvas.width,r.canvas.height),ee.set(0,0,r.canvas.width,r.canvas.height),s.reset(),l.reset(),u.reset()}return{buffers:{color:s,depth:l,stencil:u},enable:re,disable:be,bindFramebuffer:de,drawBuffers:U,useProgram:K,setBlending:se,setMaterial:Ne,setFlipSided:Oe,setCullFace:B,setLineWidth:z,setPolygonOffset:ne,setScissorTest:ve,activeTexture:Ae,bindTexture:we,unbindTexture:We,compressedTexImage2D:Be,compressedTexImage3D:je,texImage2D:J,texImage3D:ue,updateUBOMapping:Ee,uniformBlockBinding:Ue,texStorage2D:Ct,texStorage3D:_t,texSubImage2D:Ye,texSubImage3D:xt,compressedTexSubImage2D:Le,compressedTexSubImage3D:Wt,scissor:Ie,viewport:j,reset:et}}function QZ(r,e,t,n,i,a,o){const s=i.isWebGL2,l=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,u=typeof navigator=="undefined"?!1:/OculusBrowser/g.test(navigator.userAgent),c=new WeakMap;let h;const f=new WeakMap;let d=!1;try{d=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch(B){}function p(B,z){return d?new OffscreenCanvas(B,z):Tv("canvas")}function g(B,z,ne,ve){let Ae=1;if((B.width>ve||B.height>ve)&&(Ae=ve/Math.max(B.width,B.height)),Ae<1||z===!0)if(typeof HTMLImageElement!="undefined"&&B instanceof HTMLImageElement||typeof HTMLCanvasElement!="undefined"&&B instanceof HTMLCanvasElement||typeof ImageBitmap!="undefined"&&B instanceof ImageBitmap){const we=z?k0:Math.floor,We=we(Ae*B.width),Be=we(Ae*B.height);h===void 0&&(h=p(We,Be));const je=ne?p(We,Be):h;return je.width=We,je.height=Be,je.getContext("2d").drawImage(B,0,0,We,Be),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+B.width+"x"+B.height+") to ("+We+"x"+Be+")."),je}else return"data"in B&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+B.width+"x"+B.height+")."),B;return B}function v(B){return Ab(B.width)&&Ab(B.height)}function m(B){return s?!1:B.wrapS!==ti||B.wrapT!==ti||B.minFilter!==vr&&B.minFilter!==lr}function y(B,z){return B.generateMipmaps&&z&&B.minFilter!==vr&&B.minFilter!==lr}function _(B){r.generateMipmap(B)}function x(B,z,ne,ve,Ae=!1){if(s===!1)return z;if(B!==null){if(r[B]!==void 0)return r[B];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+B+"'")}let we=z;if(z===r.RED&&(ne===r.FLOAT&&(we=r.R32F),ne===r.HALF_FLOAT&&(we=r.R16F),ne===r.UNSIGNED_BYTE&&(we=r.R8)),z===r.RED_INTEGER&&(ne===r.UNSIGNED_BYTE&&(we=r.R8UI),ne===r.UNSIGNED_SHORT&&(we=r.R16UI),ne===r.UNSIGNED_INT&&(we=r.R32UI),ne===r.BYTE&&(we=r.R8I),ne===r.SHORT&&(we=r.R16I),ne===r.INT&&(we=r.R32I)),z===r.RG&&(ne===r.FLOAT&&(we=r.RG32F),ne===r.HALF_FLOAT&&(we=r.RG16F),ne===r.UNSIGNED_BYTE&&(we=r.RG8)),z===r.RGBA){const We=Ae?R0:ln.getTransfer(ve);ne===r.FLOAT&&(we=r.RGBA32F),ne===r.HALF_FLOAT&&(we=r.RGBA16F),ne===r.UNSIGNED_BYTE&&(we=We===Ln?r.SRGB8_ALPHA8:r.RGBA8),ne===r.UNSIGNED_SHORT_4_4_4_4&&(we=r.RGBA4),ne===r.UNSIGNED_SHORT_5_5_5_1&&(we=r.RGB5_A1)}return(we===r.R16F||we===r.R32F||we===r.RG16F||we===r.RG32F||we===r.RGBA16F||we===r.RGBA32F)&&e.get("EXT_color_buffer_float"),we}function S(B,z,ne){return y(B,ne)===!0||B.isFramebufferTexture&&B.minFilter!==vr&&B.minFilter!==lr?Math.log2(Math.max(z.width,z.height))+1:B.mipmaps!==void 0&&B.mipmaps.length>0?B.mipmaps.length:B.isCompressedTexture&&Array.isArray(B.image)?z.mipmaps.length:1}function A(B){return B===vr||B===yb||B===Qh?r.NEAREST:r.LINEAR}function w(B){const z=B.target;z.removeEventListener("dispose",w),C(z),z.isVideoTexture&&c.delete(z)}function M(B){const z=B.target;z.removeEventListener("dispose",M),T(z)}function C(B){const z=n.get(B);if(z.__webglInit===void 0)return;const ne=B.source,ve=f.get(ne);if(ve){const Ae=ve[z.__cacheKey];Ae.usedTimes--,Ae.usedTimes===0&&b(B),Object.keys(ve).length===0&&f.delete(ne)}n.remove(B)}function b(B){const z=n.get(B);r.deleteTexture(z.__webglTexture);const ne=B.source,ve=f.get(ne);delete ve[z.__cacheKey],o.memory.textures--}function T(B){const z=B.texture,ne=n.get(B),ve=n.get(z);if(ve.__webglTexture!==void 0&&(r.deleteTexture(ve.__webglTexture),o.memory.textures--),B.depthTexture&&B.depthTexture.dispose(),B.isWebGLCubeRenderTarget)for(let Ae=0;Ae<6;Ae++){if(Array.isArray(ne.__webglFramebuffer[Ae]))for(let we=0;we<ne.__webglFramebuffer[Ae].length;we++)r.deleteFramebuffer(ne.__webglFramebuffer[Ae][we]);else r.deleteFramebuffer(ne.__webglFramebuffer[Ae]);ne.__webglDepthbuffer&&r.deleteRenderbuffer(ne.__webglDepthbuffer[Ae])}else{if(Array.isArray(ne.__webglFramebuffer))for(let Ae=0;Ae<ne.__webglFramebuffer.length;Ae++)r.deleteFramebuffer(ne.__webglFramebuffer[Ae]);else r.deleteFramebuffer(ne.__webglFramebuffer);if(ne.__webglDepthbuffer&&r.deleteRenderbuffer(ne.__webglDepthbuffer),ne.__webglMultisampledFramebuffer&&r.deleteFramebuffer(ne.__webglMultisampledFramebuffer),ne.__webglColorRenderbuffer)for(let Ae=0;Ae<ne.__webglColorRenderbuffer.length;Ae++)ne.__webglColorRenderbuffer[Ae]&&r.deleteRenderbuffer(ne.__webglColorRenderbuffer[Ae]);ne.__webglDepthRenderbuffer&&r.deleteRenderbuffer(ne.__webglDepthRenderbuffer)}if(B.isWebGLMultipleRenderTargets)for(let Ae=0,we=z.length;Ae<we;Ae++){const We=n.get(z[Ae]);We.__webglTexture&&(r.deleteTexture(We.__webglTexture),o.memory.textures--),n.remove(z[Ae])}n.remove(z),n.remove(B)}let P=0;function D(){P=0}function L(){const B=P;return B>=i.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+B+" texture units while this GPU supports only "+i.maxTextures),P+=1,B}function E(B){const z=[];return z.push(B.wrapS),z.push(B.wrapT),z.push(B.wrapR||0),z.push(B.magFilter),z.push(B.minFilter),z.push(B.anisotropy),z.push(B.internalFormat),z.push(B.format),z.push(B.type),z.push(B.generateMipmaps),z.push(B.premultiplyAlpha),z.push(B.flipY),z.push(B.unpackAlignment),z.push(B.colorSpace),z.join()}function I(B,z){const ne=n.get(B);if(B.isVideoTexture&&Ne(B),B.isRenderTargetTexture===!1&&B.version>0&&ne.__version!==B.version){const ve=B.image;if(ve===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ve.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Z(ne,B,z);return}}t.bindTexture(r.TEXTURE_2D,ne.__webglTexture,r.TEXTURE0+z)}function N(B,z){const ne=n.get(B);if(B.version>0&&ne.__version!==B.version){Z(ne,B,z);return}t.bindTexture(r.TEXTURE_2D_ARRAY,ne.__webglTexture,r.TEXTURE0+z)}function R(B,z){const ne=n.get(B);if(B.version>0&&ne.__version!==B.version){Z(ne,B,z);return}t.bindTexture(r.TEXTURE_3D,ne.__webglTexture,r.TEXTURE0+z)}function F(B,z){const ne=n.get(B);if(B.version>0&&ne.__version!==B.version){ee(ne,B,z);return}t.bindTexture(r.TEXTURE_CUBE_MAP,ne.__webglTexture,r.TEXTURE0+z)}const O={[jr]:r.REPEAT,[ti]:r.CLAMP_TO_EDGE,[P0]:r.MIRRORED_REPEAT},V={[vr]:r.NEAREST,[yb]:r.NEAREST_MIPMAP_NEAREST,[Qh]:r.NEAREST_MIPMAP_LINEAR,[lr]:r.LINEAR,[$y]:r.LINEAR_MIPMAP_NEAREST,[gs]:r.LINEAR_MIPMAP_LINEAR},H={[NX]:r.NEVER,[UX]:r.ALWAYS,[kX]:r.LESS,[pz]:r.LEQUAL,[OX]:r.EQUAL,[zX]:r.GEQUAL,[FX]:r.GREATER,[BX]:r.NOTEQUAL};function Q(B,z,ne){if(z.type===Ro&&e.has("OES_texture_float_linear")===!1&&(z.magFilter===lr||z.magFilter===$y||z.magFilter===Qh||z.magFilter===gs||z.minFilter===lr||z.minFilter===$y||z.minFilter===Qh||z.minFilter===gs)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),ne?(r.texParameteri(B,r.TEXTURE_WRAP_S,O[z.wrapS]),r.texParameteri(B,r.TEXTURE_WRAP_T,O[z.wrapT]),(B===r.TEXTURE_3D||B===r.TEXTURE_2D_ARRAY)&&r.texParameteri(B,r.TEXTURE_WRAP_R,O[z.wrapR]),r.texParameteri(B,r.TEXTURE_MAG_FILTER,V[z.magFilter]),r.texParameteri(B,r.TEXTURE_MIN_FILTER,V[z.minFilter])):(r.texParameteri(B,r.TEXTURE_WRAP_S,r.CLAMP_TO_EDGE),r.texParameteri(B,r.TEXTURE_WRAP_T,r.CLAMP_TO_EDGE),(B===r.TEXTURE_3D||B===r.TEXTURE_2D_ARRAY)&&r.texParameteri(B,r.TEXTURE_WRAP_R,r.CLAMP_TO_EDGE),(z.wrapS!==ti||z.wrapT!==ti)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),r.texParameteri(B,r.TEXTURE_MAG_FILTER,A(z.magFilter)),r.texParameteri(B,r.TEXTURE_MIN_FILTER,A(z.minFilter)),z.minFilter!==vr&&z.minFilter!==lr&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),z.compareFunction&&(r.texParameteri(B,r.TEXTURE_COMPARE_MODE,r.COMPARE_REF_TO_TEXTURE),r.texParameteri(B,r.TEXTURE_COMPARE_FUNC,H[z.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){const ve=e.get("EXT_texture_filter_anisotropic");if(z.magFilter===vr||z.minFilter!==Qh&&z.minFilter!==gs||z.type===Ro&&e.has("OES_texture_float_linear")===!1||s===!1&&z.type===wv&&e.has("OES_texture_half_float_linear")===!1)return;(z.anisotropy>1||n.get(z).__currentAnisotropy)&&(r.texParameterf(B,ve.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(z.anisotropy,i.getMaxAnisotropy())),n.get(z).__currentAnisotropy=z.anisotropy)}}function W(B,z){let ne=!1;B.__webglInit===void 0&&(B.__webglInit=!0,z.addEventListener("dispose",w));const ve=z.source;let Ae=f.get(ve);Ae===void 0&&(Ae={},f.set(ve,Ae));const we=E(z);if(we!==B.__cacheKey){Ae[we]===void 0&&(Ae[we]={texture:r.createTexture(),usedTimes:0},o.memory.textures++,ne=!0),Ae[we].usedTimes++;const We=Ae[B.__cacheKey];We!==void 0&&(Ae[B.__cacheKey].usedTimes--,We.usedTimes===0&&b(z)),B.__cacheKey=we,B.__webglTexture=Ae[we].texture}return ne}function Z(B,z,ne){let ve=r.TEXTURE_2D;(z.isDataArrayTexture||z.isCompressedArrayTexture)&&(ve=r.TEXTURE_2D_ARRAY),z.isData3DTexture&&(ve=r.TEXTURE_3D);const Ae=W(B,z),we=z.source;t.bindTexture(ve,B.__webglTexture,r.TEXTURE0+ne);const We=n.get(we);if(we.version!==We.__version||Ae===!0){t.activeTexture(r.TEXTURE0+ne);const Be=ln.getPrimaries(ln.workingColorSpace),je=z.colorSpace===Ta?null:ln.getPrimaries(z.colorSpace),Ye=z.colorSpace===Ta||Be===je?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,z.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,z.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ye);const xt=m(z)&&v(z.image)===!1;let Le=g(z.image,xt,!1,i.maxTextureSize);Le=Oe(z,Le);const Wt=v(Le)||s,Ct=a.convert(z.format,z.colorSpace);let _t=a.convert(z.type),J=x(z.internalFormat,Ct,_t,z.colorSpace,z.isVideoTexture);Q(ve,z,Wt);let ue;const Ie=z.mipmaps,j=s&&z.isVideoTexture!==!0&&J!==hz,Ee=We.__version===void 0||Ae===!0,Ue=we.dataReady,et=S(z,Le,Wt);if(z.isDepthTexture)J=r.DEPTH_COMPONENT,s?z.type===Ro?J=r.DEPTH_COMPONENT32F:z.type===xl?J=r.DEPTH_COMPONENT24:z.type===yc?J=r.DEPTH24_STENCIL8:J=r.DEPTH_COMPONENT16:z.type===Ro&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),z.format===_c&&J===r.DEPTH_COMPONENT&&z.type!==rC&&z.type!==xl&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),z.type=xl,_t=a.convert(z.type)),z.format===Vf&&J===r.DEPTH_COMPONENT&&(J=r.DEPTH_STENCIL,z.type!==yc&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),z.type=yc,_t=a.convert(z.type))),Ee&&(j?t.texStorage2D(r.TEXTURE_2D,1,J,Le.width,Le.height):t.texImage2D(r.TEXTURE_2D,0,J,Le.width,Le.height,0,Ct,_t,null));else if(z.isDataTexture)if(Ie.length>0&&Wt){j&&Ee&&t.texStorage2D(r.TEXTURE_2D,et,J,Ie[0].width,Ie[0].height);for(let Y=0,De=Ie.length;Y<De;Y++)ue=Ie[Y],j?Ue&&t.texSubImage2D(r.TEXTURE_2D,Y,0,0,ue.width,ue.height,Ct,_t,ue.data):t.texImage2D(r.TEXTURE_2D,Y,J,ue.width,ue.height,0,Ct,_t,ue.data);z.generateMipmaps=!1}else j?(Ee&&t.texStorage2D(r.TEXTURE_2D,et,J,Le.width,Le.height),Ue&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,Le.width,Le.height,Ct,_t,Le.data)):t.texImage2D(r.TEXTURE_2D,0,J,Le.width,Le.height,0,Ct,_t,Le.data);else if(z.isCompressedTexture)if(z.isCompressedArrayTexture){j&&Ee&&t.texStorage3D(r.TEXTURE_2D_ARRAY,et,J,Ie[0].width,Ie[0].height,Le.depth);for(let Y=0,De=Ie.length;Y<De;Y++)ue=Ie[Y],z.format!==ba?Ct!==null?j?Ue&&t.compressedTexSubImage3D(r.TEXTURE_2D_ARRAY,Y,0,0,0,ue.width,ue.height,Le.depth,Ct,ue.data,0,0):t.compressedTexImage3D(r.TEXTURE_2D_ARRAY,Y,J,ue.width,ue.height,Le.depth,0,ue.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):j?Ue&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,Y,0,0,0,ue.width,ue.height,Le.depth,Ct,_t,ue.data):t.texImage3D(r.TEXTURE_2D_ARRAY,Y,J,ue.width,ue.height,Le.depth,0,Ct,_t,ue.data)}else{j&&Ee&&t.texStorage2D(r.TEXTURE_2D,et,J,Ie[0].width,Ie[0].height);for(let Y=0,De=Ie.length;Y<De;Y++)ue=Ie[Y],z.format!==ba?Ct!==null?j?Ue&&t.compressedTexSubImage2D(r.TEXTURE_2D,Y,0,0,ue.width,ue.height,Ct,ue.data):t.compressedTexImage2D(r.TEXTURE_2D,Y,J,ue.width,ue.height,0,ue.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):j?Ue&&t.texSubImage2D(r.TEXTURE_2D,Y,0,0,ue.width,ue.height,Ct,_t,ue.data):t.texImage2D(r.TEXTURE_2D,Y,J,ue.width,ue.height,0,Ct,_t,ue.data)}else if(z.isDataArrayTexture)j?(Ee&&t.texStorage3D(r.TEXTURE_2D_ARRAY,et,J,Le.width,Le.height,Le.depth),Ue&&t.texSubImage3D(r.TEXTURE_2D_ARRAY,0,0,0,0,Le.width,Le.height,Le.depth,Ct,_t,Le.data)):t.texImage3D(r.TEXTURE_2D_ARRAY,0,J,Le.width,Le.height,Le.depth,0,Ct,_t,Le.data);else if(z.isData3DTexture)j?(Ee&&t.texStorage3D(r.TEXTURE_3D,et,J,Le.width,Le.height,Le.depth),Ue&&t.texSubImage3D(r.TEXTURE_3D,0,0,0,0,Le.width,Le.height,Le.depth,Ct,_t,Le.data)):t.texImage3D(r.TEXTURE_3D,0,J,Le.width,Le.height,Le.depth,0,Ct,_t,Le.data);else if(z.isFramebufferTexture){if(Ee)if(j)t.texStorage2D(r.TEXTURE_2D,et,J,Le.width,Le.height);else{let Y=Le.width,De=Le.height;for(let q=0;q<et;q++)t.texImage2D(r.TEXTURE_2D,q,J,Y,De,0,Ct,_t,null),Y>>=1,De>>=1}}else if(Ie.length>0&&Wt){j&&Ee&&t.texStorage2D(r.TEXTURE_2D,et,J,Ie[0].width,Ie[0].height);for(let Y=0,De=Ie.length;Y<De;Y++)ue=Ie[Y],j?Ue&&t.texSubImage2D(r.TEXTURE_2D,Y,0,0,Ct,_t,ue):t.texImage2D(r.TEXTURE_2D,Y,J,Ct,_t,ue);z.generateMipmaps=!1}else j?(Ee&&t.texStorage2D(r.TEXTURE_2D,et,J,Le.width,Le.height),Ue&&t.texSubImage2D(r.TEXTURE_2D,0,0,0,Ct,_t,Le)):t.texImage2D(r.TEXTURE_2D,0,J,Ct,_t,Le);y(z,Wt)&&_(ve),We.__version=we.version,z.onUpdate&&z.onUpdate(z)}B.__version=z.version}function ee(B,z,ne){if(z.image.length!==6)return;const ve=W(B,z),Ae=z.source;t.bindTexture(r.TEXTURE_CUBE_MAP,B.__webglTexture,r.TEXTURE0+ne);const we=n.get(Ae);if(Ae.version!==we.__version||ve===!0){t.activeTexture(r.TEXTURE0+ne);const We=ln.getPrimaries(ln.workingColorSpace),Be=z.colorSpace===Ta?null:ln.getPrimaries(z.colorSpace),je=z.colorSpace===Ta||We===Be?r.NONE:r.BROWSER_DEFAULT_WEBGL;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,z.flipY),r.pixelStorei(r.UNPACK_PREMULTIPLY_ALPHA_WEBGL,z.premultiplyAlpha),r.pixelStorei(r.UNPACK_ALIGNMENT,z.unpackAlignment),r.pixelStorei(r.UNPACK_COLORSPACE_CONVERSION_WEBGL,je);const Ye=z.isCompressedTexture||z.image[0].isCompressedTexture,xt=z.image[0]&&z.image[0].isDataTexture,Le=[];for(let Y=0;Y<6;Y++)!Ye&&!xt?Le[Y]=g(z.image[Y],!1,!0,i.maxCubemapSize):Le[Y]=xt?z.image[Y].image:z.image[Y],Le[Y]=Oe(z,Le[Y]);const Wt=Le[0],Ct=v(Wt)||s,_t=a.convert(z.format,z.colorSpace),J=a.convert(z.type),ue=x(z.internalFormat,_t,J,z.colorSpace),Ie=s&&z.isVideoTexture!==!0,j=we.__version===void 0||ve===!0,Ee=Ae.dataReady;let Ue=S(z,Wt,Ct);Q(r.TEXTURE_CUBE_MAP,z,Ct);let et;if(Ye){Ie&&j&&t.texStorage2D(r.TEXTURE_CUBE_MAP,Ue,ue,Wt.width,Wt.height);for(let Y=0;Y<6;Y++){et=Le[Y].mipmaps;for(let De=0;De<et.length;De++){const q=et[De];z.format!==ba?_t!==null?Ie?Ee&&t.compressedTexSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De,0,0,q.width,q.height,_t,q.data):t.compressedTexImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De,ue,q.width,q.height,0,q.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):Ie?Ee&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De,0,0,q.width,q.height,_t,J,q.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De,ue,q.width,q.height,0,_t,J,q.data)}}}else{et=z.mipmaps,Ie&&j&&(et.length>0&&Ue++,t.texStorage2D(r.TEXTURE_CUBE_MAP,Ue,ue,Le[0].width,Le[0].height));for(let Y=0;Y<6;Y++)if(xt){Ie?Ee&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,0,0,Le[Y].width,Le[Y].height,_t,J,Le[Y].data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,ue,Le[Y].width,Le[Y].height,0,_t,J,Le[Y].data);for(let De=0;De<et.length;De++){const Ce=et[De].image[Y].image;Ie?Ee&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De+1,0,0,Ce.width,Ce.height,_t,J,Ce.data):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De+1,ue,Ce.width,Ce.height,0,_t,J,Ce.data)}}else{Ie?Ee&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,0,0,_t,J,Le[Y]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,0,ue,_t,J,Le[Y]);for(let De=0;De<et.length;De++){const q=et[De];Ie?Ee&&t.texSubImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De+1,0,0,_t,J,q.image[Y]):t.texImage2D(r.TEXTURE_CUBE_MAP_POSITIVE_X+Y,De+1,ue,_t,J,q.image[Y])}}}y(z,Ct)&&_(r.TEXTURE_CUBE_MAP),we.__version=Ae.version,z.onUpdate&&z.onUpdate(z)}B.__version=z.version}function he(B,z,ne,ve,Ae,we){const We=a.convert(ne.format,ne.colorSpace),Be=a.convert(ne.type),je=x(ne.internalFormat,We,Be,ne.colorSpace);if(!n.get(z).__hasExternalTextures){const xt=Math.max(1,z.width>>we),Le=Math.max(1,z.height>>we);Ae===r.TEXTURE_3D||Ae===r.TEXTURE_2D_ARRAY?t.texImage3D(Ae,we,je,xt,Le,z.depth,0,We,Be,null):t.texImage2D(Ae,we,je,xt,Le,0,We,Be,null)}t.bindFramebuffer(r.FRAMEBUFFER,B),se(z)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,ve,Ae,n.get(ne).__webglTexture,0,ce(z)):(Ae===r.TEXTURE_2D||Ae>=r.TEXTURE_CUBE_MAP_POSITIVE_X&&Ae<=r.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&r.framebufferTexture2D(r.FRAMEBUFFER,ve,Ae,n.get(ne).__webglTexture,we),t.bindFramebuffer(r.FRAMEBUFFER,null)}function le(B,z,ne){if(r.bindRenderbuffer(r.RENDERBUFFER,B),z.depthBuffer&&!z.stencilBuffer){let ve=s===!0?r.DEPTH_COMPONENT24:r.DEPTH_COMPONENT16;if(ne||se(z)){const Ae=z.depthTexture;Ae&&Ae.isDepthTexture&&(Ae.type===Ro?ve=r.DEPTH_COMPONENT32F:Ae.type===xl&&(ve=r.DEPTH_COMPONENT24));const we=ce(z);se(z)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,we,ve,z.width,z.height):r.renderbufferStorageMultisample(r.RENDERBUFFER,we,ve,z.width,z.height)}else r.renderbufferStorage(r.RENDERBUFFER,ve,z.width,z.height);r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.RENDERBUFFER,B)}else if(z.depthBuffer&&z.stencilBuffer){const ve=ce(z);ne&&se(z)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,ve,r.DEPTH24_STENCIL8,z.width,z.height):se(z)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,ve,r.DEPTH24_STENCIL8,z.width,z.height):r.renderbufferStorage(r.RENDERBUFFER,r.DEPTH_STENCIL,z.width,z.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.RENDERBUFFER,B)}else{const ve=z.isWebGLMultipleRenderTargets===!0?z.texture:[z.texture];for(let Ae=0;Ae<ve.length;Ae++){const we=ve[Ae],We=a.convert(we.format,we.colorSpace),Be=a.convert(we.type),je=x(we.internalFormat,We,Be,we.colorSpace),Ye=ce(z);ne&&se(z)===!1?r.renderbufferStorageMultisample(r.RENDERBUFFER,Ye,je,z.width,z.height):se(z)?l.renderbufferStorageMultisampleEXT(r.RENDERBUFFER,Ye,je,z.width,z.height):r.renderbufferStorage(r.RENDERBUFFER,je,z.width,z.height)}}r.bindRenderbuffer(r.RENDERBUFFER,null)}function re(B,z){if(z&&z.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(r.FRAMEBUFFER,B),!(z.depthTexture&&z.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(z.depthTexture).__webglTexture||z.depthTexture.image.width!==z.width||z.depthTexture.image.height!==z.height)&&(z.depthTexture.image.width=z.width,z.depthTexture.image.height=z.height,z.depthTexture.needsUpdate=!0),I(z.depthTexture,0);const ve=n.get(z.depthTexture).__webglTexture,Ae=ce(z);if(z.depthTexture.format===_c)se(z)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,ve,0,Ae):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_ATTACHMENT,r.TEXTURE_2D,ve,0);else if(z.depthTexture.format===Vf)se(z)?l.framebufferTexture2DMultisampleEXT(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,ve,0,Ae):r.framebufferTexture2D(r.FRAMEBUFFER,r.DEPTH_STENCIL_ATTACHMENT,r.TEXTURE_2D,ve,0);else throw new Error("Unknown depthTexture format")}function be(B){const z=n.get(B),ne=B.isWebGLCubeRenderTarget===!0;if(B.depthTexture&&!z.__autoAllocateDepthBuffer){if(ne)throw new Error("target.depthTexture not supported in Cube render targets");re(z.__webglFramebuffer,B)}else if(ne){z.__webglDepthbuffer=[];for(let ve=0;ve<6;ve++)t.bindFramebuffer(r.FRAMEBUFFER,z.__webglFramebuffer[ve]),z.__webglDepthbuffer[ve]=r.createRenderbuffer(),le(z.__webglDepthbuffer[ve],B,!1)}else t.bindFramebuffer(r.FRAMEBUFFER,z.__webglFramebuffer),z.__webglDepthbuffer=r.createRenderbuffer(),le(z.__webglDepthbuffer,B,!1);t.bindFramebuffer(r.FRAMEBUFFER,null)}function de(B,z,ne){const ve=n.get(B);z!==void 0&&he(ve.__webglFramebuffer,B,B.texture,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,0),ne!==void 0&&be(B)}function U(B){const z=B.texture,ne=n.get(B),ve=n.get(z);B.addEventListener("dispose",M),B.isWebGLMultipleRenderTargets!==!0&&(ve.__webglTexture===void 0&&(ve.__webglTexture=r.createTexture()),ve.__version=z.version,o.memory.textures++);const Ae=B.isWebGLCubeRenderTarget===!0,we=B.isWebGLMultipleRenderTargets===!0,We=v(B)||s;if(Ae){ne.__webglFramebuffer=[];for(let Be=0;Be<6;Be++)if(s&&z.mipmaps&&z.mipmaps.length>0){ne.__webglFramebuffer[Be]=[];for(let je=0;je<z.mipmaps.length;je++)ne.__webglFramebuffer[Be][je]=r.createFramebuffer()}else ne.__webglFramebuffer[Be]=r.createFramebuffer()}else{if(s&&z.mipmaps&&z.mipmaps.length>0){ne.__webglFramebuffer=[];for(let Be=0;Be<z.mipmaps.length;Be++)ne.__webglFramebuffer[Be]=r.createFramebuffer()}else ne.__webglFramebuffer=r.createFramebuffer();if(we)if(i.drawBuffers){const Be=B.texture;for(let je=0,Ye=Be.length;je<Ye;je++){const xt=n.get(Be[je]);xt.__webglTexture===void 0&&(xt.__webglTexture=r.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(s&&B.samples>0&&se(B)===!1){const Be=we?z:[z];ne.__webglMultisampledFramebuffer=r.createFramebuffer(),ne.__webglColorRenderbuffer=[],t.bindFramebuffer(r.FRAMEBUFFER,ne.__webglMultisampledFramebuffer);for(let je=0;je<Be.length;je++){const Ye=Be[je];ne.__webglColorRenderbuffer[je]=r.createRenderbuffer(),r.bindRenderbuffer(r.RENDERBUFFER,ne.__webglColorRenderbuffer[je]);const xt=a.convert(Ye.format,Ye.colorSpace),Le=a.convert(Ye.type),Wt=x(Ye.internalFormat,xt,Le,Ye.colorSpace,B.isXRRenderTarget===!0),Ct=ce(B);r.renderbufferStorageMultisample(r.RENDERBUFFER,Ct,Wt,B.width,B.height),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+je,r.RENDERBUFFER,ne.__webglColorRenderbuffer[je])}r.bindRenderbuffer(r.RENDERBUFFER,null),B.depthBuffer&&(ne.__webglDepthRenderbuffer=r.createRenderbuffer(),le(ne.__webglDepthRenderbuffer,B,!0)),t.bindFramebuffer(r.FRAMEBUFFER,null)}}if(Ae){t.bindTexture(r.TEXTURE_CUBE_MAP,ve.__webglTexture),Q(r.TEXTURE_CUBE_MAP,z,We);for(let Be=0;Be<6;Be++)if(s&&z.mipmaps&&z.mipmaps.length>0)for(let je=0;je<z.mipmaps.length;je++)he(ne.__webglFramebuffer[Be][je],B,z,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Be,je);else he(ne.__webglFramebuffer[Be],B,z,r.COLOR_ATTACHMENT0,r.TEXTURE_CUBE_MAP_POSITIVE_X+Be,0);y(z,We)&&_(r.TEXTURE_CUBE_MAP),t.unbindTexture()}else if(we){const Be=B.texture;for(let je=0,Ye=Be.length;je<Ye;je++){const xt=Be[je],Le=n.get(xt);t.bindTexture(r.TEXTURE_2D,Le.__webglTexture),Q(r.TEXTURE_2D,xt,We),he(ne.__webglFramebuffer,B,xt,r.COLOR_ATTACHMENT0+je,r.TEXTURE_2D,0),y(xt,We)&&_(r.TEXTURE_2D)}t.unbindTexture()}else{let Be=r.TEXTURE_2D;if((B.isWebGL3DRenderTarget||B.isWebGLArrayRenderTarget)&&(s?Be=B.isWebGL3DRenderTarget?r.TEXTURE_3D:r.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),t.bindTexture(Be,ve.__webglTexture),Q(Be,z,We),s&&z.mipmaps&&z.mipmaps.length>0)for(let je=0;je<z.mipmaps.length;je++)he(ne.__webglFramebuffer[je],B,z,r.COLOR_ATTACHMENT0,Be,je);else he(ne.__webglFramebuffer,B,z,r.COLOR_ATTACHMENT0,Be,0);y(z,We)&&_(Be),t.unbindTexture()}B.depthBuffer&&be(B)}function K(B){const z=v(B)||s,ne=B.isWebGLMultipleRenderTargets===!0?B.texture:[B.texture];for(let ve=0,Ae=ne.length;ve<Ae;ve++){const we=ne[ve];if(y(we,z)){const We=B.isWebGLCubeRenderTarget?r.TEXTURE_CUBE_MAP:r.TEXTURE_2D,Be=n.get(we).__webglTexture;t.bindTexture(We,Be),_(We),t.unbindTexture()}}}function te(B){if(s&&B.samples>0&&se(B)===!1){const z=B.isWebGLMultipleRenderTargets?B.texture:[B.texture],ne=B.width,ve=B.height;let Ae=r.COLOR_BUFFER_BIT;const we=[],We=B.stencilBuffer?r.DEPTH_STENCIL_ATTACHMENT:r.DEPTH_ATTACHMENT,Be=n.get(B),je=B.isWebGLMultipleRenderTargets===!0;if(je)for(let Ye=0;Ye<z.length;Ye++)t.bindFramebuffer(r.FRAMEBUFFER,Be.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ye,r.RENDERBUFFER,null),t.bindFramebuffer(r.FRAMEBUFFER,Be.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ye,r.TEXTURE_2D,null,0);t.bindFramebuffer(r.READ_FRAMEBUFFER,Be.__webglMultisampledFramebuffer),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Be.__webglFramebuffer);for(let Ye=0;Ye<z.length;Ye++){we.push(r.COLOR_ATTACHMENT0+Ye),B.depthBuffer&&we.push(We);const xt=Be.__ignoreDepthValues!==void 0?Be.__ignoreDepthValues:!1;if(xt===!1&&(B.depthBuffer&&(Ae|=r.DEPTH_BUFFER_BIT),B.stencilBuffer&&(Ae|=r.STENCIL_BUFFER_BIT)),je&&r.framebufferRenderbuffer(r.READ_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.RENDERBUFFER,Be.__webglColorRenderbuffer[Ye]),xt===!0&&(r.invalidateFramebuffer(r.READ_FRAMEBUFFER,[We]),r.invalidateFramebuffer(r.DRAW_FRAMEBUFFER,[We])),je){const Le=n.get(z[Ye]).__webglTexture;r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0,r.TEXTURE_2D,Le,0)}r.blitFramebuffer(0,0,ne,ve,0,0,ne,ve,Ae,r.NEAREST),u&&r.invalidateFramebuffer(r.READ_FRAMEBUFFER,we)}if(t.bindFramebuffer(r.READ_FRAMEBUFFER,null),t.bindFramebuffer(r.DRAW_FRAMEBUFFER,null),je)for(let Ye=0;Ye<z.length;Ye++){t.bindFramebuffer(r.FRAMEBUFFER,Be.__webglMultisampledFramebuffer),r.framebufferRenderbuffer(r.FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ye,r.RENDERBUFFER,Be.__webglColorRenderbuffer[Ye]);const xt=n.get(z[Ye]).__webglTexture;t.bindFramebuffer(r.FRAMEBUFFER,Be.__webglFramebuffer),r.framebufferTexture2D(r.DRAW_FRAMEBUFFER,r.COLOR_ATTACHMENT0+Ye,r.TEXTURE_2D,xt,0)}t.bindFramebuffer(r.DRAW_FRAMEBUFFER,Be.__webglMultisampledFramebuffer)}}function ce(B){return Math.min(i.maxSamples,B.samples)}function se(B){const z=n.get(B);return s&&B.samples>0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&z.__useRenderToTexture!==!1}function Ne(B){const z=o.render.frame;c.get(B)!==z&&(c.set(B,z),B.update())}function Oe(B,z){const ne=B.colorSpace,ve=B.format,Ae=B.type;return B.isCompressedTexture===!0||B.isVideoTexture===!0||B.format===Sb||ne!==yr&&ne!==Ta&&(ln.getTransfer(ne)===Ln?s===!1?e.has("EXT_sRGB")===!0&&ve===ba?(B.format=Sb,B.minFilter=lr,B.generateMipmaps=!1):z=gz.sRGBToLinear(z):(ve!==ba||Ae!==Fl)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",ne)),z}this.allocateTextureUnit=L,this.resetTextureUnits=D,this.setTexture2D=I,this.setTexture2DArray=N,this.setTexture3D=R,this.setTextureCube=F,this.rebindTextures=de,this.setupRenderTarget=U,this.updateRenderTargetMipmap=K,this.updateMultisampleRenderTarget=te,this.setupDepthRenderbuffer=be,this.setupFrameBufferTexture=he,this.useMultisampledRTT=se}function JZ(r,e,t){const n=t.isWebGL2;function i(a,o=Ta){let s;const l=ln.getTransfer(o);if(a===Fl)return r.UNSIGNED_BYTE;if(a===oz)return r.UNSIGNED_SHORT_4_4_4_4;if(a===sz)return r.UNSIGNED_SHORT_5_5_5_1;if(a===SX)return r.BYTE;if(a===AX)return r.SHORT;if(a===rC)return r.UNSIGNED_SHORT;if(a===az)return r.INT;if(a===xl)return r.UNSIGNED_INT;if(a===Ro)return r.FLOAT;if(a===wv)return n?r.HALF_FLOAT:(s=e.get("OES_texture_half_float"),s!==null?s.HALF_FLOAT_OES:null);if(a===wX)return r.ALPHA;if(a===ba)return r.RGBA;if(a===bX)return r.LUMINANCE;if(a===TX)return r.LUMINANCE_ALPHA;if(a===_c)return r.DEPTH_COMPONENT;if(a===Vf)return r.DEPTH_STENCIL;if(a===Sb)return s=e.get("EXT_sRGB"),s!==null?s.SRGB_ALPHA_EXT:null;if(a===MX)return r.RED;if(a===lz)return r.RED_INTEGER;if(a===CX)return r.RG;if(a===uz)return r.RG_INTEGER;if(a===cz)return r.RGBA_INTEGER;if(a===Ax||a===bx||a===Tx||a===Mx)if(l===Ln)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(a===Ax)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(a===bx)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(a===Tx)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(a===Mx)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(a===Ax)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(a===bx)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(a===Tx)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(a===Mx)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(a===UL||a===VL||a===GL||a===HL)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(a===UL)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(a===VL)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(a===GL)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(a===HL)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(a===hz)return s=e.get("WEBGL_compressed_texture_etc1"),s!==null?s.COMPRESSED_RGB_ETC1_WEBGL:null;if(a===WL||a===$L)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(a===WL)return l===Ln?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(a===$L)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(a===XL||a===YL||a===qL||a===jL||a===KL||a===ZL||a===QL||a===JL||a===eP||a===tP||a===nP||a===rP||a===iP||a===aP)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(a===XL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(a===YL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(a===qL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(a===jL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(a===KL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(a===ZL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(a===QL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(a===JL)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(a===eP)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(a===tP)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(a===nP)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(a===rP)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(a===iP)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(a===aP)return l===Ln?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(a===Cx||a===oP||a===sP)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(a===Cx)return l===Ln?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(a===oP)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(a===sP)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(a===EX||a===lP||a===uP||a===cP)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(a===Cx)return s.COMPRESSED_RED_RGTC1_EXT;if(a===lP)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(a===uP)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(a===cP)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return a===yc?n?r.UNSIGNED_INT_24_8:(s=e.get("WEBGL_depth_texture"),s!==null?s.UNSIGNED_INT_24_8_WEBGL:null):r[a]!==void 0?r[a]:null}return{convert:i}}class eQ extends Qr{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}let Dn=class extends bn{constructor(){super(),this.isGroup=!0,this.type="Group"}};const tQ={type:"move"};class Zx{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Dn,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new Dn,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new X,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new X),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Dn,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new X,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new X),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,n){let i=null,a=null,o=null;const s=this._targetRay,l=this._grip,u=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(u&&e.hand){o=!0;for(const g of e.hand.values()){const v=t.getJointPose(g,n),m=this._getHandJoint(u,g);v!==null&&(m.matrix.fromArray(v.transform.matrix),m.matrix.decompose(m.position,m.rotation,m.scale),m.matrixWorldNeedsUpdate=!0,m.jointRadius=v.radius),m.visible=v!==null}const c=u.joints["index-finger-tip"],h=u.joints["thumb-tip"],f=c.position.distanceTo(h.position),d=.02,p=.005;u.inputState.pinching&&f>d+p?(u.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!u.inputState.pinching&&f<=d-p&&(u.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(a=t.getPose(e.gripSpace,n),a!==null&&(l.matrix.fromArray(a.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,a.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(a.linearVelocity)):l.hasLinearVelocity=!1,a.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(a.angularVelocity)):l.hasAngularVelocity=!1));s!==null&&(i=t.getPose(e.targetRaySpace,n),i===null&&a!==null&&(i=a),i!==null&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),s.matrixWorldNeedsUpdate=!0,i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(tQ)))}return s!==null&&(s.visible=i!==null),l!==null&&(l.visible=a!==null),u!==null&&(u.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const n=new Dn;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}const nQ=` |
|
void main() { |
|
|
|
gl_Position = vec4( position, 1.0 ); |
|
|
|
}`,rQ=` |
|
uniform sampler2DArray depthColor; |
|
uniform float depthWidth; |
|
uniform float depthHeight; |
|
|
|
void main() { |
|
|
|
vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); |
|
|
|
if ( coord.x >= 1.0 ) { |
|
|
|
gl_FragDepthEXT = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; |
|
|
|
} else { |
|
|
|
gl_FragDepthEXT = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; |
|
|
|
} |
|
|
|
}`;class iQ{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,n){if(this.texture===null){const i=new mr,a=e.properties.get(i);a.__webglTexture=t.texture,(t.depthNear!=n.depthNear||t.depthFar!=n.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=i}}render(e,t){if(this.texture!==null){if(this.mesh===null){const n=t.cameras[0].viewport,i=new Ls({extensions:{fragDepth:!0},vertexShader:nQ,fragmentShader:rQ,uniforms:{depthColor:{value:this.texture},depthWidth:{value:n.z},depthHeight:{value:n.w}}});this.mesh=new rn(new Za(20,20),i)}e.render(this.mesh,t)}}reset(){this.texture=null,this.mesh=null}}class aQ extends Yc{constructor(e,t){super();const n=this;let i=null,a=1,o=null,s="local-floor",l=1,u=null,c=null,h=null,f=null,d=null,p=null;const g=new iQ,v=t.getContextAttributes();let m=null,y=null;const _=[],x=[],S=new Me;let A=null;const w=new Qr;w.layers.enable(1),w.viewport=new an;const M=new Qr;M.layers.enable(2),M.viewport=new an;const C=[w,M],b=new eQ;b.layers.enable(1),b.layers.enable(2);let T=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(W){let Z=_[W];return Z===void 0&&(Z=new Zx,_[W]=Z),Z.getTargetRaySpace()},this.getControllerGrip=function(W){let Z=_[W];return Z===void 0&&(Z=new Zx,_[W]=Z),Z.getGripSpace()},this.getHand=function(W){let Z=_[W];return Z===void 0&&(Z=new Zx,_[W]=Z),Z.getHandSpace()};function D(W){const Z=x.indexOf(W.inputSource);if(Z===-1)return;const ee=_[Z];ee!==void 0&&(ee.update(W.inputSource,W.frame,u||o),ee.dispatchEvent({type:W.type,data:W.inputSource}))}function L(){i.removeEventListener("select",D),i.removeEventListener("selectstart",D),i.removeEventListener("selectend",D),i.removeEventListener("squeeze",D),i.removeEventListener("squeezestart",D),i.removeEventListener("squeezeend",D),i.removeEventListener("end",L),i.removeEventListener("inputsourceschange",E);for(let W=0;W<_.length;W++){const Z=x[W];Z!==null&&(x[W]=null,_[W].disconnect(Z))}T=null,P=null,g.reset(),e.setRenderTarget(m),d=null,f=null,h=null,i=null,y=null,Q.stop(),n.isPresenting=!1,e.setPixelRatio(A),e.setSize(S.width,S.height,!1),n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(W){a=W,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(W){s=W,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return u||o},this.setReferenceSpace=function(W){u=W},this.getBaseLayer=function(){return f!==null?f:d},this.getBinding=function(){return h},this.getFrame=function(){return p},this.getSession=function(){return i},this.setSession=function(W){return Ge(this,null,function*(){if(i=W,i!==null){if(m=e.getRenderTarget(),i.addEventListener("select",D),i.addEventListener("selectstart",D),i.addEventListener("selectend",D),i.addEventListener("squeeze",D),i.addEventListener("squeezestart",D),i.addEventListener("squeezeend",D),i.addEventListener("end",L),i.addEventListener("inputsourceschange",E),v.xrCompatible!==!0&&(yield t.makeXRCompatible()),A=e.getPixelRatio(),e.getSize(S),i.renderState.layers===void 0||e.capabilities.isWebGL2===!1){const Z={antialias:i.renderState.layers===void 0?v.antialias:!0,alpha:!0,depth:v.depth,stencil:v.stencil,framebufferScaleFactor:a};d=new XRWebGLLayer(i,t,Z),i.updateRenderState({baseLayer:d}),e.setPixelRatio(1),e.setSize(d.framebufferWidth,d.framebufferHeight,!1),y=new kc(d.framebufferWidth,d.framebufferHeight,{format:ba,type:Fl,colorSpace:e.outputColorSpace,stencilBuffer:v.stencil})}else{let Z=null,ee=null,he=null;v.depth&&(he=v.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,Z=v.stencil?Vf:_c,ee=v.stencil?yc:xl);const le={colorFormat:t.RGBA8,depthFormat:he,scaleFactor:a};h=new XRWebGLBinding(i,t),f=h.createProjectionLayer(le),i.updateRenderState({layers:[f]}),e.setPixelRatio(1),e.setSize(f.textureWidth,f.textureHeight,!1),y=new kc(f.textureWidth,f.textureHeight,{format:ba,type:Fl,depthTexture:new Mz(f.textureWidth,f.textureHeight,ee,void 0,void 0,void 0,void 0,void 0,void 0,Z),stencilBuffer:v.stencil,colorSpace:e.outputColorSpace,samples:v.antialias?4:0});const re=e.properties.get(y);re.__ignoreDepthValues=f.ignoreDepthValues}y.isXRRenderTarget=!0,this.setFoveation(l),u=null,o=yield i.requestReferenceSpace(s),Q.setContext(i),Q.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}})},this.getEnvironmentBlendMode=function(){if(i!==null)return i.environmentBlendMode};function E(W){for(let Z=0;Z<W.removed.length;Z++){const ee=W.removed[Z],he=x.indexOf(ee);he>=0&&(x[he]=null,_[he].disconnect(ee))}for(let Z=0;Z<W.added.length;Z++){const ee=W.added[Z];let he=x.indexOf(ee);if(he===-1){for(let re=0;re<_.length;re++)if(re>=x.length){x.push(ee),he=re;break}else if(x[re]===null){x[re]=ee,he=re;break}if(he===-1)break}const le=_[he];le&&le.connect(ee)}}const I=new X,N=new X;function R(W,Z,ee){I.setFromMatrixPosition(Z.matrixWorld),N.setFromMatrixPosition(ee.matrixWorld);const he=I.distanceTo(N),le=Z.projectionMatrix.elements,re=ee.projectionMatrix.elements,be=le[14]/(le[10]-1),de=le[14]/(le[10]+1),U=(le[9]+1)/le[5],K=(le[9]-1)/le[5],te=(le[8]-1)/le[0],ce=(re[8]+1)/re[0],se=be*te,Ne=be*ce,Oe=he/(-te+ce),B=Oe*-te;Z.matrixWorld.decompose(W.position,W.quaternion,W.scale),W.translateX(B),W.translateZ(Oe),W.matrixWorld.compose(W.position,W.quaternion,W.scale),W.matrixWorldInverse.copy(W.matrixWorld).invert();const z=be+Oe,ne=de+Oe,ve=se-B,Ae=Ne+(he-B),we=U*de/ne*z,We=K*de/ne*z;W.projectionMatrix.makePerspective(ve,Ae,we,We,z,ne),W.projectionMatrixInverse.copy(W.projectionMatrix).invert()}function F(W,Z){Z===null?W.matrixWorld.copy(W.matrix):W.matrixWorld.multiplyMatrices(Z.matrixWorld,W.matrix),W.matrixWorldInverse.copy(W.matrixWorld).invert()}this.updateCamera=function(W){if(i===null)return;g.texture!==null&&(W.near=g.depthNear,W.far=g.depthFar),b.near=M.near=w.near=W.near,b.far=M.far=w.far=W.far,(T!==b.near||P!==b.far)&&(i.updateRenderState({depthNear:b.near,depthFar:b.far}),T=b.near,P=b.far,w.near=T,w.far=P,M.near=T,M.far=P,w.updateProjectionMatrix(),M.updateProjectionMatrix(),W.updateProjectionMatrix());const Z=W.parent,ee=b.cameras;F(b,Z);for(let he=0;he<ee.length;he++)F(ee[he],Z);ee.length===2?R(b,w,M):b.projectionMatrix.copy(w.projectionMatrix),O(W,b,Z)};function O(W,Z,ee){ee===null?W.matrix.copy(Z.matrixWorld):(W.matrix.copy(ee.matrixWorld),W.matrix.invert(),W.matrix.multiply(Z.matrixWorld)),W.matrix.decompose(W.position,W.quaternion,W.scale),W.updateMatrixWorld(!0),W.projectionMatrix.copy(Z.projectionMatrix),W.projectionMatrixInverse.copy(Z.projectionMatrixInverse),W.isPerspectiveCamera&&(W.fov=Hf*2*Math.atan(1/W.projectionMatrix.elements[5]),W.zoom=1)}this.getCamera=function(){return b},this.getFoveation=function(){if(!(f===null&&d===null))return l},this.setFoveation=function(W){l=W,f!==null&&(f.fixedFoveation=W),d!==null&&d.fixedFoveation!==void 0&&(d.fixedFoveation=W)},this.hasDepthSensing=function(){return g.texture!==null};let V=null;function H(W,Z){if(c=Z.getViewerPose(u||o),p=Z,c!==null){const ee=c.views;d!==null&&(e.setRenderTargetFramebuffer(y,d.framebuffer),e.setRenderTarget(y));let he=!1;ee.length!==b.cameras.length&&(b.cameras.length=0,he=!0);for(let re=0;re<ee.length;re++){const be=ee[re];let de=null;if(d!==null)de=d.getViewport(be);else{const K=h.getViewSubImage(f,be);de=K.viewport,re===0&&(e.setRenderTargetTextures(y,K.colorTexture,f.ignoreDepthValues?void 0:K.depthStencilTexture),e.setRenderTarget(y))}let U=C[re];U===void 0&&(U=new Qr,U.layers.enable(re),U.viewport=new an,C[re]=U),U.matrix.fromArray(be.transform.matrix),U.matrix.decompose(U.position,U.quaternion,U.scale),U.projectionMatrix.fromArray(be.projectionMatrix),U.projectionMatrixInverse.copy(U.projectionMatrix).invert(),U.viewport.set(de.x,de.y,de.width,de.height),re===0&&(b.matrix.copy(U.matrix),b.matrix.decompose(b.position,b.quaternion,b.scale)),he===!0&&b.cameras.push(U)}const le=i.enabledFeatures;if(le&&le.includes("depth-sensing")){const re=h.getDepthInformation(ee[0]);re&&re.isValid&&re.texture&&g.init(e,re,i.renderState)}}for(let ee=0;ee<_.length;ee++){const he=x[ee],le=_[ee];he!==null&&le!==void 0&&le.update(he,Z,u||o)}g.render(e,b),V&&V(W,Z),Z.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:Z}),p=null}const Q=new Tz;Q.setAnimationLoop(H),this.setAnimationLoop=function(W){V=W},this.dispose=function(){}}}function oQ(r,e){function t(v,m){v.matrixAutoUpdate===!0&&v.updateMatrix(),m.value.copy(v.matrix)}function n(v,m){m.color.getRGB(v.fogColor.value,Az(r)),m.isFog?(v.fogNear.value=m.near,v.fogFar.value=m.far):m.isFogExp2&&(v.fogDensity.value=m.density)}function i(v,m,y,_,x){m.isMeshBasicMaterial||m.isMeshLambertMaterial?a(v,m):m.isMeshToonMaterial?(a(v,m),h(v,m)):m.isMeshPhongMaterial?(a(v,m),c(v,m)):m.isMeshStandardMaterial?(a(v,m),f(v,m),m.isMeshPhysicalMaterial&&d(v,m,x)):m.isMeshMatcapMaterial?(a(v,m),p(v,m)):m.isMeshDepthMaterial?a(v,m):m.isMeshDistanceMaterial?(a(v,m),g(v,m)):m.isMeshNormalMaterial?a(v,m):m.isLineBasicMaterial?(o(v,m),m.isLineDashedMaterial&&s(v,m)):m.isPointsMaterial?l(v,m,y,_):m.isSpriteMaterial?u(v,m):m.isShadowMaterial?(v.color.value.copy(m.color),v.opacity.value=m.opacity):m.isShaderMaterial&&(m.uniformsNeedUpdate=!1)}function a(v,m){v.opacity.value=m.opacity,m.color&&v.diffuse.value.copy(m.color),m.emissive&&v.emissive.value.copy(m.emissive).multiplyScalar(m.emissiveIntensity),m.map&&(v.map.value=m.map,t(m.map,v.mapTransform)),m.alphaMap&&(v.alphaMap.value=m.alphaMap,t(m.alphaMap,v.alphaMapTransform)),m.bumpMap&&(v.bumpMap.value=m.bumpMap,t(m.bumpMap,v.bumpMapTransform),v.bumpScale.value=m.bumpScale,m.side===Di&&(v.bumpScale.value*=-1)),m.normalMap&&(v.normalMap.value=m.normalMap,t(m.normalMap,v.normalMapTransform),v.normalScale.value.copy(m.normalScale),m.side===Di&&v.normalScale.value.negate()),m.displacementMap&&(v.displacementMap.value=m.displacementMap,t(m.displacementMap,v.displacementMapTransform),v.displacementScale.value=m.displacementScale,v.displacementBias.value=m.displacementBias),m.emissiveMap&&(v.emissiveMap.value=m.emissiveMap,t(m.emissiveMap,v.emissiveMapTransform)),m.specularMap&&(v.specularMap.value=m.specularMap,t(m.specularMap,v.specularMapTransform)),m.alphaTest>0&&(v.alphaTest.value=m.alphaTest);const y=e.get(m).envMap;if(y&&(v.envMap.value=y,v.flipEnvMap.value=y.isCubeTexture&&y.isRenderTargetTexture===!1?-1:1,v.reflectivity.value=m.reflectivity,v.ior.value=m.ior,v.refractionRatio.value=m.refractionRatio),m.lightMap){v.lightMap.value=m.lightMap;const _=r._useLegacyLights===!0?Math.PI:1;v.lightMapIntensity.value=m.lightMapIntensity*_,t(m.lightMap,v.lightMapTransform)}m.aoMap&&(v.aoMap.value=m.aoMap,v.aoMapIntensity.value=m.aoMapIntensity,t(m.aoMap,v.aoMapTransform))}function o(v,m){v.diffuse.value.copy(m.color),v.opacity.value=m.opacity,m.map&&(v.map.value=m.map,t(m.map,v.mapTransform))}function s(v,m){v.dashSize.value=m.dashSize,v.totalSize.value=m.dashSize+m.gapSize,v.scale.value=m.scale}function l(v,m,y,_){v.diffuse.value.copy(m.color),v.opacity.value=m.opacity,v.size.value=m.size*y,v.scale.value=_*.5,m.map&&(v.map.value=m.map,t(m.map,v.uvTransform)),m.alphaMap&&(v.alphaMap.value=m.alphaMap,t(m.alphaMap,v.alphaMapTransform)),m.alphaTest>0&&(v.alphaTest.value=m.alphaTest)}function u(v,m){v.diffuse.value.copy(m.color),v.opacity.value=m.opacity,v.rotation.value=m.rotation,m.map&&(v.map.value=m.map,t(m.map,v.mapTransform)),m.alphaMap&&(v.alphaMap.value=m.alphaMap,t(m.alphaMap,v.alphaMapTransform)),m.alphaTest>0&&(v.alphaTest.value=m.alphaTest)}function c(v,m){v.specular.value.copy(m.specular),v.shininess.value=Math.max(m.shininess,1e-4)}function h(v,m){m.gradientMap&&(v.gradientMap.value=m.gradientMap)}function f(v,m){v.metalness.value=m.metalness,m.metalnessMap&&(v.metalnessMap.value=m.metalnessMap,t(m.metalnessMap,v.metalnessMapTransform)),v.roughness.value=m.roughness,m.roughnessMap&&(v.roughnessMap.value=m.roughnessMap,t(m.roughnessMap,v.roughnessMapTransform)),e.get(m).envMap&&(v.envMapIntensity.value=m.envMapIntensity)}function d(v,m,y){v.ior.value=m.ior,m.sheen>0&&(v.sheenColor.value.copy(m.sheenColor).multiplyScalar(m.sheen),v.sheenRoughness.value=m.sheenRoughness,m.sheenColorMap&&(v.sheenColorMap.value=m.sheenColorMap,t(m.sheenColorMap,v.sheenColorMapTransform)),m.sheenRoughnessMap&&(v.sheenRoughnessMap.value=m.sheenRoughnessMap,t(m.sheenRoughnessMap,v.sheenRoughnessMapTransform))),m.clearcoat>0&&(v.clearcoat.value=m.clearcoat,v.clearcoatRoughness.value=m.clearcoatRoughness,m.clearcoatMap&&(v.clearcoatMap.value=m.clearcoatMap,t(m.clearcoatMap,v.clearcoatMapTransform)),m.clearcoatRoughnessMap&&(v.clearcoatRoughnessMap.value=m.clearcoatRoughnessMap,t(m.clearcoatRoughnessMap,v.clearcoatRoughnessMapTransform)),m.clearcoatNormalMap&&(v.clearcoatNormalMap.value=m.clearcoatNormalMap,t(m.clearcoatNormalMap,v.clearcoatNormalMapTransform),v.clearcoatNormalScale.value.copy(m.clearcoatNormalScale),m.side===Di&&v.clearcoatNormalScale.value.negate())),m.iridescence>0&&(v.iridescence.value=m.iridescence,v.iridescenceIOR.value=m.iridescenceIOR,v.iridescenceThicknessMinimum.value=m.iridescenceThicknessRange[0],v.iridescenceThicknessMaximum.value=m.iridescenceThicknessRange[1],m.iridescenceMap&&(v.iridescenceMap.value=m.iridescenceMap,t(m.iridescenceMap,v.iridescenceMapTransform)),m.iridescenceThicknessMap&&(v.iridescenceThicknessMap.value=m.iridescenceThicknessMap,t(m.iridescenceThicknessMap,v.iridescenceThicknessMapTransform))),m.transmission>0&&(v.transmission.value=m.transmission,v.transmissionSamplerMap.value=y.texture,v.transmissionSamplerSize.value.set(y.width,y.height),m.transmissionMap&&(v.transmissionMap.value=m.transmissionMap,t(m.transmissionMap,v.transmissionMapTransform)),v.thickness.value=m.thickness,m.thicknessMap&&(v.thicknessMap.value=m.thicknessMap,t(m.thicknessMap,v.thicknessMapTransform)),v.attenuationDistance.value=m.attenuationDistance,v.attenuationColor.value.copy(m.attenuationColor)),m.anisotropy>0&&(v.anisotropyVector.value.set(m.anisotropy*Math.cos(m.anisotropyRotation),m.anisotropy*Math.sin(m.anisotropyRotation)),m.anisotropyMap&&(v.anisotropyMap.value=m.anisotropyMap,t(m.anisotropyMap,v.anisotropyMapTransform))),v.specularIntensity.value=m.specularIntensity,v.specularColor.value.copy(m.specularColor),m.specularColorMap&&(v.specularColorMap.value=m.specularColorMap,t(m.specularColorMap,v.specularColorMapTransform)),m.specularIntensityMap&&(v.specularIntensityMap.value=m.specularIntensityMap,t(m.specularIntensityMap,v.specularIntensityMapTransform))}function p(v,m){m.matcap&&(v.matcap.value=m.matcap)}function g(v,m){const y=e.get(m).light;v.referencePosition.value.setFromMatrixPosition(y.matrixWorld),v.nearDistance.value=y.shadow.camera.near,v.farDistance.value=y.shadow.camera.far}return{refreshFogUniforms:n,refreshMaterialUniforms:i}}function sQ(r,e,t,n){let i={},a={},o=[];const s=t.isWebGL2?r.getParameter(r.MAX_UNIFORM_BUFFER_BINDINGS):0;function l(y,_){const x=_.program;n.uniformBlockBinding(y,x)}function u(y,_){let x=i[y.id];x===void 0&&(p(y),x=c(y),i[y.id]=x,y.addEventListener("dispose",v));const S=_.program;n.updateUBOMapping(y,S);const A=e.render.frame;a[y.id]!==A&&(f(y),a[y.id]=A)}function c(y){const _=h();y.__bindingPointIndex=_;const x=r.createBuffer(),S=y.__size,A=y.usage;return r.bindBuffer(r.UNIFORM_BUFFER,x),r.bufferData(r.UNIFORM_BUFFER,S,A),r.bindBuffer(r.UNIFORM_BUFFER,null),r.bindBufferBase(r.UNIFORM_BUFFER,_,x),x}function h(){for(let y=0;y<s;y++)if(o.indexOf(y)===-1)return o.push(y),y;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}function f(y){const _=i[y.id],x=y.uniforms,S=y.__cache;r.bindBuffer(r.UNIFORM_BUFFER,_);for(let A=0,w=x.length;A<w;A++){const M=Array.isArray(x[A])?x[A]:[x[A]];for(let C=0,b=M.length;C<b;C++){const T=M[C];if(d(T,A,C,S)===!0){const P=T.__offset,D=Array.isArray(T.value)?T.value:[T.value];let L=0;for(let E=0;E<D.length;E++){const I=D[E],N=g(I);typeof I=="number"||typeof I=="boolean"?(T.__data[0]=I,r.bufferSubData(r.UNIFORM_BUFFER,P+L,T.__data)):I.isMatrix3?(T.__data[0]=I.elements[0],T.__data[1]=I.elements[1],T.__data[2]=I.elements[2],T.__data[3]=0,T.__data[4]=I.elements[3],T.__data[5]=I.elements[4],T.__data[6]=I.elements[5],T.__data[7]=0,T.__data[8]=I.elements[6],T.__data[9]=I.elements[7],T.__data[10]=I.elements[8],T.__data[11]=0):(I.toArray(T.__data,L),L+=N.storage/Float32Array.BYTES_PER_ELEMENT)}r.bufferSubData(r.UNIFORM_BUFFER,P,T.__data)}}}r.bindBuffer(r.UNIFORM_BUFFER,null)}function d(y,_,x,S){const A=y.value,w=_+"_"+x;if(S[w]===void 0)return typeof A=="number"||typeof A=="boolean"?S[w]=A:S[w]=A.clone(),!0;{const M=S[w];if(typeof A=="number"||typeof A=="boolean"){if(M!==A)return S[w]=A,!0}else if(M.equals(A)===!1)return M.copy(A),!0}return!1}function p(y){const _=y.uniforms;let x=0;const S=16;for(let w=0,M=_.length;w<M;w++){const C=Array.isArray(_[w])?_[w]:[_[w]];for(let b=0,T=C.length;b<T;b++){const P=C[b],D=Array.isArray(P.value)?P.value:[P.value];for(let L=0,E=D.length;L<E;L++){const I=D[L],N=g(I),R=x%S;R!==0&&S-R<N.boundary&&(x+=S-R),P.__data=new Float32Array(N.storage/Float32Array.BYTES_PER_ELEMENT),P.__offset=x,x+=N.storage}}}const A=x%S;return A>0&&(x+=S-A),y.__size=x,y.__cache={},this}function g(y){const _={boundary:0,storage:0};return typeof y=="number"||typeof y=="boolean"?(_.boundary=4,_.storage=4):y.isVector2?(_.boundary=8,_.storage=8):y.isVector3||y.isColor?(_.boundary=16,_.storage=12):y.isVector4?(_.boundary=16,_.storage=16):y.isMatrix3?(_.boundary=48,_.storage=48):y.isMatrix4?(_.boundary=64,_.storage=64):y.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",y),_}function v(y){const _=y.target;_.removeEventListener("dispose",v);const x=o.indexOf(_.__bindingPointIndex);o.splice(x,1),r.deleteBuffer(i[_.id]),delete i[_.id],delete a[_.id]}function m(){for(const y in i)r.deleteBuffer(i[y]);o=[],i={},a={}}return{bind:l,update:u,dispose:m}}class fC{constructor(e={}){const{canvas:t=tY(),context:n=null,depth:i=!0,stencil:a=!0,alpha:o=!1,antialias:s=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:u=!1,powerPreference:c="default",failIfMajorPerformanceCaveat:h=!1}=e;this.isWebGLRenderer=!0;let f;n!==null?f=n.getContextAttributes().alpha:f=o;const d=new Uint32Array(4),p=new Int32Array(4);let g=null,v=null;const m=[],y=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this._outputColorSpace=dn,this._useLegacyLights=!1,this.toneMapping=Ol,this.toneMappingExposure=1;const _=this;let x=!1,S=0,A=0,w=null,M=-1,C=null;const b=new an,T=new an;let P=null;const D=new nt(0);let L=0,E=t.width,I=t.height,N=1,R=null,F=null;const O=new an(0,0,E,I),V=new an(0,0,E,I);let H=!1;const Q=new cC;let W=!1,Z=!1,ee=null;const he=new Mt,le=new Me,re=new X,be={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function de(){return w===null?N:1}let U=n;function K($,fe){for(let me=0;me<$.length;me++){const ye=$[me],ge=t.getContext(ye,fe);if(ge!==null)return ge}return null}try{const $={alpha:!0,depth:i,stencil:a,antialias:s,premultipliedAlpha:l,preserveDrawingBuffer:u,powerPreference:c,failIfMajorPerformanceCaveat:h};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${tC}`),t.addEventListener("webglcontextlost",et,!1),t.addEventListener("webglcontextrestored",Y,!1),t.addEventListener("webglcontextcreationerror",De,!1),U===null){const fe=["webgl2","webgl","experimental-webgl"];if(_.isWebGL1Renderer===!0&&fe.shift(),U=K(fe,$),U===null)throw K(fe)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}typeof WebGLRenderingContext!="undefined"&&U instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),U.getShaderPrecisionFormat===void 0&&(U.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch($){throw console.error("THREE.WebGLRenderer: "+$.message),$}let te,ce,se,Ne,Oe,B,z,ne,ve,Ae,we,We,Be,je,Ye,xt,Le,Wt,Ct,_t,J,ue,Ie,j;function Ee(){te=new pK(U),ce=new lK(U,te,e),te.init(ce),ue=new JZ(U,te,ce),se=new ZZ(U,te,ce),Ne=new mK(U),Oe=new FZ,B=new QZ(U,te,se,Oe,ce,ue,Ne),z=new cK(_),ne=new dK(_),ve=new TY(U,ce),Ie=new oK(U,te,ve,ce),Ae=new vK(U,ve,Ne,Ie),we=new SK(U,Ae,ve,Ne),Ct=new xK(U,ce,B),xt=new uK(Oe),We=new OZ(_,z,ne,te,ce,Ie,xt),Be=new oQ(_,Oe),je=new zZ,Ye=new $Z(te,ce),Wt=new aK(_,z,ne,se,we,f,l),Le=new KZ(_,we,ce),j=new sQ(U,Ne,ce,se),_t=new sK(U,te,Ne,ce),J=new gK(U,te,Ne,ce),Ne.programs=We.programs,_.capabilities=ce,_.extensions=te,_.properties=Oe,_.renderLists=je,_.shadowMap=Le,_.state=se,_.info=Ne}Ee();const Ue=new aQ(_,U);this.xr=Ue,this.getContext=function(){return U},this.getContextAttributes=function(){return U.getContextAttributes()},this.forceContextLoss=function(){const $=te.get("WEBGL_lose_context");$&&$.loseContext()},this.forceContextRestore=function(){const $=te.get("WEBGL_lose_context");$&&$.restoreContext()},this.getPixelRatio=function(){return N},this.setPixelRatio=function($){$!==void 0&&(N=$,this.setSize(E,I,!1))},this.getSize=function($){return $.set(E,I)},this.setSize=function($,fe,me=!0){if(Ue.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}E=$,I=fe,t.width=Math.floor($*N),t.height=Math.floor(fe*N),me===!0&&(t.style.width=$+"px",t.style.height=fe+"px"),this.setViewport(0,0,$,fe)},this.getDrawingBufferSize=function($){return $.set(E*N,I*N).floor()},this.setDrawingBufferSize=function($,fe,me){E=$,I=fe,N=me,t.width=Math.floor($*me),t.height=Math.floor(fe*me),this.setViewport(0,0,$,fe)},this.getCurrentViewport=function($){return $.copy(b)},this.getViewport=function($){return $.copy(O)},this.setViewport=function($,fe,me,ye){$.isVector4?O.set($.x,$.y,$.z,$.w):O.set($,fe,me,ye),se.viewport(b.copy(O).multiplyScalar(N).floor())},this.getScissor=function($){return $.copy(V)},this.setScissor=function($,fe,me,ye){$.isVector4?V.set($.x,$.y,$.z,$.w):V.set($,fe,me,ye),se.scissor(T.copy(V).multiplyScalar(N).floor())},this.getScissorTest=function(){return H},this.setScissorTest=function($){se.setScissorTest(H=$)},this.setOpaqueSort=function($){R=$},this.setTransparentSort=function($){F=$},this.getClearColor=function($){return $.copy(Wt.getClearColor())},this.setClearColor=function(){Wt.setClearColor.apply(Wt,arguments)},this.getClearAlpha=function(){return Wt.getClearAlpha()},this.setClearAlpha=function(){Wt.setClearAlpha.apply(Wt,arguments)},this.clear=function($=!0,fe=!0,me=!0){let ye=0;if($){let ge=!1;if(w!==null){const Ze=w.texture.format;ge=Ze===cz||Ze===uz||Ze===lz}if(ge){const Ze=w.texture.type,ct=Ze===Fl||Ze===xl||Ze===rC||Ze===yc||Ze===oz||Ze===sz,mt=Wt.getClearColor(),At=Wt.getClearAlpha(),Bt=mt.r,Et=mt.g,Rt=mt.b;ct?(d[0]=Bt,d[1]=Et,d[2]=Rt,d[3]=At,U.clearBufferuiv(U.COLOR,0,d)):(p[0]=Bt,p[1]=Et,p[2]=Rt,p[3]=At,U.clearBufferiv(U.COLOR,0,p))}else ye|=U.COLOR_BUFFER_BIT}fe&&(ye|=U.DEPTH_BUFFER_BIT),me&&(ye|=U.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),U.clear(ye)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",et,!1),t.removeEventListener("webglcontextrestored",Y,!1),t.removeEventListener("webglcontextcreationerror",De,!1),je.dispose(),Ye.dispose(),Oe.dispose(),z.dispose(),ne.dispose(),we.dispose(),Ie.dispose(),j.dispose(),We.dispose(),Ue.dispose(),Ue.removeEventListener("sessionstart",Lr),Ue.removeEventListener("sessionend",en),ee&&(ee.dispose(),ee=null),jn.stop()};function et($){$.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),x=!0}function Y(){console.log("THREE.WebGLRenderer: Context Restored."),x=!1;const $=Ne.autoReset,fe=Le.enabled,me=Le.autoUpdate,ye=Le.needsUpdate,ge=Le.type;Ee(),Ne.autoReset=$,Le.enabled=fe,Le.autoUpdate=me,Le.needsUpdate=ye,Le.type=ge}function De($){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",$.statusMessage)}function q($){const fe=$.target;fe.removeEventListener("dispose",q),Ce(fe)}function Ce($){st($),Oe.remove($)}function st($){const fe=Oe.get($).programs;fe!==void 0&&(fe.forEach(function(me){We.releaseProgram(me)}),$.isShaderMaterial&&We.releaseShaderCache($))}this.renderBufferDirect=function($,fe,me,ye,ge,Ze){fe===null&&(fe=be);const ct=ge.isMesh&&ge.matrixWorld.determinant()<0,mt=l7($,fe,me,ye,ge);se.setMaterial(ye,ct);let At=me.index,Bt=1;if(ye.wireframe===!0){if(At=Ae.getWireframeAttribute(me),At===void 0)return;Bt=2}const Et=me.drawRange,Rt=me.attributes.position;let Kn=Et.start*Bt,Vi=(Et.start+Et.count)*Bt;Ze!==null&&(Kn=Math.max(Kn,Ze.start*Bt),Vi=Math.min(Vi,(Ze.start+Ze.count)*Bt)),At!==null?(Kn=Math.max(Kn,0),Vi=Math.min(Vi,At.count)):Rt!=null&&(Kn=Math.max(Kn,0),Vi=Math.min(Vi,Rt.count));const wr=Vi-Kn;if(wr<0||wr===1/0)return;Ie.setup(ge,ye,mt,me,At);let ts,On=_t;if(At!==null&&(ts=ve.get(At),On=J,On.setIndex(ts)),ge.isMesh)ye.wireframe===!0?(se.setLineWidth(ye.wireframeLinewidth*de()),On.setMode(U.LINES)):On.setMode(U.TRIANGLES);else if(ge.isLine){let Ut=ye.linewidth;Ut===void 0&&(Ut=1),se.setLineWidth(Ut*de()),ge.isLineSegments?On.setMode(U.LINES):ge.isLineLoop?On.setMode(U.LINE_LOOP):On.setMode(U.LINE_STRIP)}else ge.isPoints?On.setMode(U.POINTS):ge.isSprite&&On.setMode(U.TRIANGLES);if(ge.isBatchedMesh)On.renderMultiDraw(ge._multiDrawStarts,ge._multiDrawCounts,ge._multiDrawCount);else if(ge.isInstancedMesh)On.renderInstances(Kn,wr,ge.count);else if(me.isInstancedBufferGeometry){const Ut=me._maxInstanceCount!==void 0?me._maxInstanceCount:1/0,ax=Math.min(me.instanceCount,Ut);On.renderInstances(Kn,wr,ax)}else On.render(Kn,wr)};function Jt($,fe,me){$.transparent===!0&&$.side===ur&&$.forceSinglePass===!1?($.side=Di,$.needsUpdate=!0,Gg($,fe,me),$.side=Es,$.needsUpdate=!0,Gg($,fe,me),$.side=ur):Gg($,fe,me)}this.compile=function($,fe,me=null){me===null&&(me=$),v=Ye.get(me),v.init(),y.push(v),me.traverseVisible(function(ge){ge.isLight&&ge.layers.test(fe.layers)&&(v.pushLight(ge),ge.castShadow&&v.pushShadow(ge))}),$!==me&&$.traverseVisible(function(ge){ge.isLight&&ge.layers.test(fe.layers)&&(v.pushLight(ge),ge.castShadow&&v.pushShadow(ge))}),v.setupLights(_._useLegacyLights);const ye=new Set;return $.traverse(function(ge){const Ze=ge.material;if(Ze)if(Array.isArray(Ze))for(let ct=0;ct<Ze.length;ct++){const mt=Ze[ct];Jt(mt,me,ge),ye.add(mt)}else Jt(Ze,me,ge),ye.add(Ze)}),y.pop(),v=null,ye},this.compileAsync=function($,fe,me=null){const ye=this.compile($,fe,me);return new Promise(ge=>{function Ze(){if(ye.forEach(function(ct){Oe.get(ct).currentProgram.isReady()&&ye.delete(ct)}),ye.size===0){ge($);return}setTimeout(Ze,10)}te.get("KHR_parallel_shader_compile")!==null?Ze():setTimeout(Ze,10)})};let $t=null;function mn($){$t&&$t($)}function Lr(){jn.stop()}function en(){jn.start()}const jn=new Tz;jn.setAnimationLoop(mn),typeof self!="undefined"&&jn.setContext(self),this.setAnimationLoop=function($){$t=$,Ue.setAnimationLoop($),$===null?jn.stop():jn.start()},Ue.addEventListener("sessionstart",Lr),Ue.addEventListener("sessionend",en),this.render=function($,fe){if(fe!==void 0&&fe.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(x===!0)return;$.matrixWorldAutoUpdate===!0&&$.updateMatrixWorld(),fe.parent===null&&fe.matrixWorldAutoUpdate===!0&&fe.updateMatrixWorld(),Ue.enabled===!0&&Ue.isPresenting===!0&&(Ue.cameraAutoUpdate===!0&&Ue.updateCamera(fe),fe=Ue.getCamera()),$.isScene===!0&&$.onBeforeRender(_,$,fe,w),v=Ye.get($,y.length),v.init(),y.push(v),he.multiplyMatrices(fe.projectionMatrix,fe.matrixWorldInverse),Q.setFromProjectionMatrix(he),Z=this.localClippingEnabled,W=xt.init(this.clippingPlanes,Z),g=je.get($,m.length),g.init(),m.push(g),oi($,fe,0,_.sortObjects),g.finish(),_.sortObjects===!0&&g.sort(R,F),this.info.render.frame++,W===!0&&xt.beginShadows();const me=v.state.shadowsArray;if(Le.render(me,$,fe),W===!0&&xt.endShadows(),this.info.autoReset===!0&&this.info.reset(),(Ue.enabled===!1||Ue.isPresenting===!1||Ue.hasDepthSensing()===!1)&&Wt.render(g,$),v.setupLights(_._useLegacyLights),fe.isArrayCamera){const ye=fe.cameras;for(let ge=0,Ze=ye.length;ge<Ze;ge++){const ct=ye[ge];JE(g,$,ct,ct.viewport)}}else JE(g,$,fe);w!==null&&(B.updateMultisampleRenderTarget(w),B.updateRenderTargetMipmap(w)),$.isScene===!0&&$.onAfterRender(_,$,fe),Ie.resetDefaultState(),M=-1,C=null,y.pop(),y.length>0?v=y[y.length-1]:v=null,m.pop(),m.length>0?g=m[m.length-1]:g=null};function oi($,fe,me,ye){if($.visible===!1)return;if($.layers.test(fe.layers)){if($.isGroup)me=$.renderOrder;else if($.isLOD)$.autoUpdate===!0&&$.update(fe);else if($.isLight)v.pushLight($),$.castShadow&&v.pushShadow($);else if($.isSprite){if(!$.frustumCulled||Q.intersectsSprite($)){ye&&re.setFromMatrixPosition($.matrixWorld).applyMatrix4(he);const ct=we.update($),mt=$.material;mt.visible&&g.push($,ct,mt,me,re.z,null)}}else if(($.isMesh||$.isLine||$.isPoints)&&(!$.frustumCulled||Q.intersectsObject($))){const ct=we.update($),mt=$.material;if(ye&&($.boundingSphere!==void 0?($.boundingSphere===null&&$.computeBoundingSphere(),re.copy($.boundingSphere.center)):(ct.boundingSphere===null&&ct.computeBoundingSphere(),re.copy(ct.boundingSphere.center)),re.applyMatrix4($.matrixWorld).applyMatrix4(he)),Array.isArray(mt)){const At=ct.groups;for(let Bt=0,Et=At.length;Bt<Et;Bt++){const Rt=At[Bt],Kn=mt[Rt.materialIndex];Kn&&Kn.visible&&g.push($,ct,Kn,me,re.z,Rt)}}else mt.visible&&g.push($,ct,mt,me,re.z,null)}}const Ze=$.children;for(let ct=0,mt=Ze.length;ct<mt;ct++)oi(Ze[ct],fe,me,ye)}function JE($,fe,me,ye){const ge=$.opaque,Ze=$.transmissive,ct=$.transparent;v.setupLightsView(me),W===!0&&xt.setGlobalState(_.clippingPlanes,me),Ze.length>0&&s7(ge,Ze,fe,me),ye&&se.viewport(b.copy(ye)),ge.length>0&&Vg(ge,fe,me),Ze.length>0&&Vg(Ze,fe,me),ct.length>0&&Vg(ct,fe,me),se.buffers.depth.setTest(!0),se.buffers.depth.setMask(!0),se.buffers.color.setMask(!0),se.setPolygonOffset(!1)}function s7($,fe,me,ye){if((me.isScene===!0?me.overrideMaterial:null)!==null)return;const Ze=ce.isWebGL2;ee===null&&(ee=new kc(1,1,{generateMipmaps:!0,type:te.has("EXT_color_buffer_half_float")?wv:Fl,minFilter:gs,samples:Ze?4:0})),_.getDrawingBufferSize(le),Ze?ee.setSize(le.x,le.y):ee.setSize(k0(le.x),k0(le.y));const ct=_.getRenderTarget();_.setRenderTarget(ee),_.getClearColor(D),L=_.getClearAlpha(),L<1&&_.setClearColor(16777215,.5),_.clear();const mt=_.toneMapping;_.toneMapping=Ol,Vg($,me,ye),B.updateMultisampleRenderTarget(ee),B.updateRenderTargetMipmap(ee);let At=!1;for(let Bt=0,Et=fe.length;Bt<Et;Bt++){const Rt=fe[Bt],Kn=Rt.object,Vi=Rt.geometry,wr=Rt.material,ts=Rt.group;if(wr.side===ur&&Kn.layers.test(ye.layers)){const On=wr.side;wr.side=Di,wr.needsUpdate=!0,eL(Kn,me,ye,Vi,wr,ts),wr.side=On,wr.needsUpdate=!0,At=!0}}At===!0&&(B.updateMultisampleRenderTarget(ee),B.updateRenderTargetMipmap(ee)),_.setRenderTarget(ct),_.setClearColor(D,L),_.toneMapping=mt}function Vg($,fe,me){const ye=fe.isScene===!0?fe.overrideMaterial:null;for(let ge=0,Ze=$.length;ge<Ze;ge++){const ct=$[ge],mt=ct.object,At=ct.geometry,Bt=ye===null?ct.material:ye,Et=ct.group;mt.layers.test(me.layers)&&eL(mt,fe,me,At,Bt,Et)}}function eL($,fe,me,ye,ge,Ze){$.onBeforeRender(_,fe,me,ye,ge,Ze),$.modelViewMatrix.multiplyMatrices(me.matrixWorldInverse,$.matrixWorld),$.normalMatrix.getNormalMatrix($.modelViewMatrix),ge.onBeforeRender(_,fe,me,ye,$,Ze),ge.transparent===!0&&ge.side===ur&&ge.forceSinglePass===!1?(ge.side=Di,ge.needsUpdate=!0,_.renderBufferDirect(me,fe,ye,ge,$,Ze),ge.side=Es,ge.needsUpdate=!0,_.renderBufferDirect(me,fe,ye,ge,$,Ze),ge.side=ur):_.renderBufferDirect(me,fe,ye,ge,$,Ze),$.onAfterRender(_,fe,me,ye,ge,Ze)}function Gg($,fe,me){fe.isScene!==!0&&(fe=be);const ye=Oe.get($),ge=v.state.lights,Ze=v.state.shadowsArray,ct=ge.state.version,mt=We.getParameters($,ge.state,Ze,fe,me),At=We.getProgramCacheKey(mt);let Bt=ye.programs;ye.environment=$.isMeshStandardMaterial?fe.environment:null,ye.fog=fe.fog,ye.envMap=($.isMeshStandardMaterial?ne:z).get($.envMap||ye.environment),Bt===void 0&&($.addEventListener("dispose",q),Bt=new Map,ye.programs=Bt);let Et=Bt.get(At);if(Et!==void 0){if(ye.currentProgram===Et&&ye.lightsStateVersion===ct)return nL($,mt),Et}else mt.uniforms=We.getUniforms($),$.onBuild(me,mt,_),$.onBeforeCompile(mt,_),Et=We.acquireProgram(mt,At),Bt.set(At,Et),ye.uniforms=mt.uniforms;const Rt=ye.uniforms;return(!$.isShaderMaterial&&!$.isRawShaderMaterial||$.clipping===!0)&&(Rt.clippingPlanes=xt.uniform),nL($,mt),ye.needsLights=c7($),ye.lightsStateVersion=ct,ye.needsLights&&(Rt.ambientLightColor.value=ge.state.ambient,Rt.lightProbe.value=ge.state.probe,Rt.directionalLights.value=ge.state.directional,Rt.directionalLightShadows.value=ge.state.directionalShadow,Rt.spotLights.value=ge.state.spot,Rt.spotLightShadows.value=ge.state.spotShadow,Rt.rectAreaLights.value=ge.state.rectArea,Rt.ltc_1.value=ge.state.rectAreaLTC1,Rt.ltc_2.value=ge.state.rectAreaLTC2,Rt.pointLights.value=ge.state.point,Rt.pointLightShadows.value=ge.state.pointShadow,Rt.hemisphereLights.value=ge.state.hemi,Rt.directionalShadowMap.value=ge.state.directionalShadowMap,Rt.directionalShadowMatrix.value=ge.state.directionalShadowMatrix,Rt.spotShadowMap.value=ge.state.spotShadowMap,Rt.spotLightMatrix.value=ge.state.spotLightMatrix,Rt.spotLightMap.value=ge.state.spotLightMap,Rt.pointShadowMap.value=ge.state.pointShadowMap,Rt.pointShadowMatrix.value=ge.state.pointShadowMatrix),ye.currentProgram=Et,ye.uniformsList=null,Et}function tL($){if($.uniformsList===null){const fe=$.currentProgram.getUniforms();$.uniformsList=Xy.seqWithValue(fe.seq,$.uniforms)}return $.uniformsList}function nL($,fe){const me=Oe.get($);me.outputColorSpace=fe.outputColorSpace,me.batching=fe.batching,me.instancing=fe.instancing,me.instancingColor=fe.instancingColor,me.skinning=fe.skinning,me.morphTargets=fe.morphTargets,me.morphNormals=fe.morphNormals,me.morphColors=fe.morphColors,me.morphTargetsCount=fe.morphTargetsCount,me.numClippingPlanes=fe.numClippingPlanes,me.numIntersection=fe.numClipIntersection,me.vertexAlphas=fe.vertexAlphas,me.vertexTangents=fe.vertexTangents,me.toneMapping=fe.toneMapping}function l7($,fe,me,ye,ge){fe.isScene!==!0&&(fe=be),B.resetTextureUnits();const Ze=fe.fog,ct=ye.isMeshStandardMaterial?fe.environment:null,mt=w===null?_.outputColorSpace:w.isXRRenderTarget===!0?w.texture.colorSpace:yr,At=(ye.isMeshStandardMaterial?ne:z).get(ye.envMap||ct),Bt=ye.vertexColors===!0&&!!me.attributes.color&&me.attributes.color.itemSize===4,Et=!!me.attributes.tangent&&(!!ye.normalMap||ye.anisotropy>0),Rt=!!me.morphAttributes.position,Kn=!!me.morphAttributes.normal,Vi=!!me.morphAttributes.color;let wr=Ol;ye.toneMapped&&(w===null||w.isXRRenderTarget===!0)&&(wr=_.toneMapping);const ts=me.morphAttributes.position||me.morphAttributes.normal||me.morphAttributes.color,On=ts!==void 0?ts.length:0,Ut=Oe.get(ye),ax=v.state.lights;if(W===!0&&(Z===!0||$!==C)){const oa=$===C&&ye.id===M;xt.setState(ye,$,oa)}let Hn=!1;ye.version===Ut.__version?(Ut.needsLights&&Ut.lightsStateVersion!==ax.state.version||Ut.outputColorSpace!==mt||ge.isBatchedMesh&&Ut.batching===!1||!ge.isBatchedMesh&&Ut.batching===!0||ge.isInstancedMesh&&Ut.instancing===!1||!ge.isInstancedMesh&&Ut.instancing===!0||ge.isSkinnedMesh&&Ut.skinning===!1||!ge.isSkinnedMesh&&Ut.skinning===!0||ge.isInstancedMesh&&Ut.instancingColor===!0&&ge.instanceColor===null||ge.isInstancedMesh&&Ut.instancingColor===!1&&ge.instanceColor!==null||Ut.envMap!==At||ye.fog===!0&&Ut.fog!==Ze||Ut.numClippingPlanes!==void 0&&(Ut.numClippingPlanes!==xt.numPlanes||Ut.numIntersection!==xt.numIntersection)||Ut.vertexAlphas!==Bt||Ut.vertexTangents!==Et||Ut.morphTargets!==Rt||Ut.morphNormals!==Kn||Ut.morphColors!==Vi||Ut.toneMapping!==wr||ce.isWebGL2===!0&&Ut.morphTargetsCount!==On)&&(Hn=!0):(Hn=!0,Ut.__version=ye.version);let lu=Ut.currentProgram;Hn===!0&&(lu=Gg(ye,fe,ge));let rL=!1,Rd=!1,ox=!1;const Vr=lu.getUniforms(),uu=Ut.uniforms;if(se.useProgram(lu.program)&&(rL=!0,Rd=!0,ox=!0),ye.id!==M&&(M=ye.id,Rd=!0),rL||C!==$){Vr.setValue(U,"projectionMatrix",$.projectionMatrix),Vr.setValue(U,"viewMatrix",$.matrixWorldInverse);const oa=Vr.map.cameraPosition;oa!==void 0&&oa.setValue(U,re.setFromMatrixPosition($.matrixWorld)),ce.logarithmicDepthBuffer&&Vr.setValue(U,"logDepthBufFC",2/(Math.log($.far+1)/Math.LN2)),(ye.isMeshPhongMaterial||ye.isMeshToonMaterial||ye.isMeshLambertMaterial||ye.isMeshBasicMaterial||ye.isMeshStandardMaterial||ye.isShaderMaterial)&&Vr.setValue(U,"isOrthographic",$.isOrthographicCamera===!0),C!==$&&(C=$,Rd=!0,ox=!0)}if(ge.isSkinnedMesh){Vr.setOptional(U,ge,"bindMatrix"),Vr.setOptional(U,ge,"bindMatrixInverse");const oa=ge.skeleton;oa&&(ce.floatVertexTextures?(oa.boneTexture===null&&oa.computeBoneTexture(),Vr.setValue(U,"boneTexture",oa.boneTexture,B)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}ge.isBatchedMesh&&(Vr.setOptional(U,ge,"batchingTexture"),Vr.setValue(U,"batchingTexture",ge._matricesTexture,B));const sx=me.morphAttributes;if((sx.position!==void 0||sx.normal!==void 0||sx.color!==void 0&&ce.isWebGL2===!0)&&Ct.update(ge,me,lu),(Rd||Ut.receiveShadow!==ge.receiveShadow)&&(Ut.receiveShadow=ge.receiveShadow,Vr.setValue(U,"receiveShadow",ge.receiveShadow)),ye.isMeshGouraudMaterial&&ye.envMap!==null&&(uu.envMap.value=At,uu.flipEnvMap.value=At.isCubeTexture&&At.isRenderTargetTexture===!1?-1:1),Rd&&(Vr.setValue(U,"toneMappingExposure",_.toneMappingExposure),Ut.needsLights&&u7(uu,ox),Ze&&ye.fog===!0&&Be.refreshFogUniforms(uu,Ze),Be.refreshMaterialUniforms(uu,ye,N,I,ee),Xy.upload(U,tL(Ut),uu,B)),ye.isShaderMaterial&&ye.uniformsNeedUpdate===!0&&(Xy.upload(U,tL(Ut),uu,B),ye.uniformsNeedUpdate=!1),ye.isSpriteMaterial&&Vr.setValue(U,"center",ge.center),Vr.setValue(U,"modelViewMatrix",ge.modelViewMatrix),Vr.setValue(U,"normalMatrix",ge.normalMatrix),Vr.setValue(U,"modelMatrix",ge.matrixWorld),ye.isShaderMaterial||ye.isRawShaderMaterial){const oa=ye.uniformsGroups;for(let lx=0,h7=oa.length;lx<h7;lx++)if(ce.isWebGL2){const iL=oa[lx];j.update(iL,lu),j.bind(iL,lu)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return lu}function u7($,fe){$.ambientLightColor.needsUpdate=fe,$.lightProbe.needsUpdate=fe,$.directionalLights.needsUpdate=fe,$.directionalLightShadows.needsUpdate=fe,$.pointLights.needsUpdate=fe,$.pointLightShadows.needsUpdate=fe,$.spotLights.needsUpdate=fe,$.spotLightShadows.needsUpdate=fe,$.rectAreaLights.needsUpdate=fe,$.hemisphereLights.needsUpdate=fe}function c7($){return $.isMeshLambertMaterial||$.isMeshToonMaterial||$.isMeshPhongMaterial||$.isMeshStandardMaterial||$.isShadowMaterial||$.isShaderMaterial&&$.lights===!0}this.getActiveCubeFace=function(){return S},this.getActiveMipmapLevel=function(){return A},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function($,fe,me){Oe.get($.texture).__webglTexture=fe,Oe.get($.depthTexture).__webglTexture=me;const ye=Oe.get($);ye.__hasExternalTextures=!0,ye.__hasExternalTextures&&(ye.__autoAllocateDepthBuffer=me===void 0,ye.__autoAllocateDepthBuffer||te.has("WEBGL_multisampled_render_to_texture")===!0&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),ye.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function($,fe){const me=Oe.get($);me.__webglFramebuffer=fe,me.__useDefaultFramebuffer=fe===void 0},this.setRenderTarget=function($,fe=0,me=0){w=$,S=fe,A=me;let ye=!0,ge=null,Ze=!1,ct=!1;if($){const At=Oe.get($);At.__useDefaultFramebuffer!==void 0?(se.bindFramebuffer(U.FRAMEBUFFER,null),ye=!1):At.__webglFramebuffer===void 0?B.setupRenderTarget($):At.__hasExternalTextures&&B.rebindTextures($,Oe.get($.texture).__webglTexture,Oe.get($.depthTexture).__webglTexture);const Bt=$.texture;(Bt.isData3DTexture||Bt.isDataArrayTexture||Bt.isCompressedArrayTexture)&&(ct=!0);const Et=Oe.get($).__webglFramebuffer;$.isWebGLCubeRenderTarget?(Array.isArray(Et[fe])?ge=Et[fe][me]:ge=Et[fe],Ze=!0):ce.isWebGL2&&$.samples>0&&B.useMultisampledRTT($)===!1?ge=Oe.get($).__webglMultisampledFramebuffer:Array.isArray(Et)?ge=Et[me]:ge=Et,b.copy($.viewport),T.copy($.scissor),P=$.scissorTest}else b.copy(O).multiplyScalar(N).floor(),T.copy(V).multiplyScalar(N).floor(),P=H;if(se.bindFramebuffer(U.FRAMEBUFFER,ge)&&ce.drawBuffers&&ye&&se.drawBuffers($,ge),se.viewport(b),se.scissor(T),se.setScissorTest(P),Ze){const At=Oe.get($.texture);U.framebufferTexture2D(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,U.TEXTURE_CUBE_MAP_POSITIVE_X+fe,At.__webglTexture,me)}else if(ct){const At=Oe.get($.texture),Bt=fe||0;U.framebufferTextureLayer(U.FRAMEBUFFER,U.COLOR_ATTACHMENT0,At.__webglTexture,me||0,Bt)}M=-1},this.readRenderTargetPixels=function($,fe,me,ye,ge,Ze,ct){if(!($&&$.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let mt=Oe.get($).__webglFramebuffer;if($.isWebGLCubeRenderTarget&&ct!==void 0&&(mt=mt[ct]),mt){se.bindFramebuffer(U.FRAMEBUFFER,mt);try{const At=$.texture,Bt=At.format,Et=At.type;if(Bt!==ba&&ue.convert(Bt)!==U.getParameter(U.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Rt=Et===wv&&(te.has("EXT_color_buffer_half_float")||ce.isWebGL2&&te.has("EXT_color_buffer_float"));if(Et!==Fl&&ue.convert(Et)!==U.getParameter(U.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Et===Ro&&(ce.isWebGL2||te.has("OES_texture_float")||te.has("WEBGL_color_buffer_float")))&&!Rt){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}fe>=0&&fe<=$.width-ye&&me>=0&&me<=$.height-ge&&U.readPixels(fe,me,ye,ge,ue.convert(Bt),ue.convert(Et),Ze)}finally{const At=w!==null?Oe.get(w).__webglFramebuffer:null;se.bindFramebuffer(U.FRAMEBUFFER,At)}}},this.copyFramebufferToTexture=function($,fe,me=0){const ye=Math.pow(2,-me),ge=Math.floor(fe.image.width*ye),Ze=Math.floor(fe.image.height*ye);B.setTexture2D(fe,0),U.copyTexSubImage2D(U.TEXTURE_2D,me,0,0,$.x,$.y,ge,Ze),se.unbindTexture()},this.copyTextureToTexture=function($,fe,me,ye=0){const ge=fe.image.width,Ze=fe.image.height,ct=ue.convert(me.format),mt=ue.convert(me.type);B.setTexture2D(me,0),U.pixelStorei(U.UNPACK_FLIP_Y_WEBGL,me.flipY),U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,me.premultiplyAlpha),U.pixelStorei(U.UNPACK_ALIGNMENT,me.unpackAlignment),fe.isDataTexture?U.texSubImage2D(U.TEXTURE_2D,ye,$.x,$.y,ge,Ze,ct,mt,fe.image.data):fe.isCompressedTexture?U.compressedTexSubImage2D(U.TEXTURE_2D,ye,$.x,$.y,fe.mipmaps[0].width,fe.mipmaps[0].height,ct,fe.mipmaps[0].data):U.texSubImage2D(U.TEXTURE_2D,ye,$.x,$.y,ct,mt,fe.image),ye===0&&me.generateMipmaps&&U.generateMipmap(U.TEXTURE_2D),se.unbindTexture()},this.copyTextureToTexture3D=function($,fe,me,ye,ge=0){if(_.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Ze=$.max.x-$.min.x+1,ct=$.max.y-$.min.y+1,mt=$.max.z-$.min.z+1,At=ue.convert(ye.format),Bt=ue.convert(ye.type);let Et;if(ye.isData3DTexture)B.setTexture3D(ye,0),Et=U.TEXTURE_3D;else if(ye.isDataArrayTexture||ye.isCompressedArrayTexture)B.setTexture2DArray(ye,0),Et=U.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}U.pixelStorei(U.UNPACK_FLIP_Y_WEBGL,ye.flipY),U.pixelStorei(U.UNPACK_PREMULTIPLY_ALPHA_WEBGL,ye.premultiplyAlpha),U.pixelStorei(U.UNPACK_ALIGNMENT,ye.unpackAlignment);const Rt=U.getParameter(U.UNPACK_ROW_LENGTH),Kn=U.getParameter(U.UNPACK_IMAGE_HEIGHT),Vi=U.getParameter(U.UNPACK_SKIP_PIXELS),wr=U.getParameter(U.UNPACK_SKIP_ROWS),ts=U.getParameter(U.UNPACK_SKIP_IMAGES),On=me.isCompressedTexture?me.mipmaps[ge]:me.image;U.pixelStorei(U.UNPACK_ROW_LENGTH,On.width),U.pixelStorei(U.UNPACK_IMAGE_HEIGHT,On.height),U.pixelStorei(U.UNPACK_SKIP_PIXELS,$.min.x),U.pixelStorei(U.UNPACK_SKIP_ROWS,$.min.y),U.pixelStorei(U.UNPACK_SKIP_IMAGES,$.min.z),me.isDataTexture||me.isData3DTexture?U.texSubImage3D(Et,ge,fe.x,fe.y,fe.z,Ze,ct,mt,At,Bt,On.data):me.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),U.compressedTexSubImage3D(Et,ge,fe.x,fe.y,fe.z,Ze,ct,mt,At,On.data)):U.texSubImage3D(Et,ge,fe.x,fe.y,fe.z,Ze,ct,mt,At,Bt,On),U.pixelStorei(U.UNPACK_ROW_LENGTH,Rt),U.pixelStorei(U.UNPACK_IMAGE_HEIGHT,Kn),U.pixelStorei(U.UNPACK_SKIP_PIXELS,Vi),U.pixelStorei(U.UNPACK_SKIP_ROWS,wr),U.pixelStorei(U.UNPACK_SKIP_IMAGES,ts),ge===0&&ye.generateMipmaps&&U.generateMipmap(Et),se.unbindTexture()},this.initTexture=function($){$.isCubeTexture?B.setTextureCube($,0):$.isData3DTexture?B.setTexture3D($,0):$.isDataArrayTexture||$.isCompressedArrayTexture?B.setTexture2DArray($,0):B.setTexture2D($,0),se.unbindTexture()},this.resetState=function(){S=0,A=0,w=null,se.reset(),Ie.reset()},typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ms}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===aC?"display-p3":"srgb",t.unpackColorSpace=ln.workingColorSpace===Q_?"display-p3":"srgb"}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===dn?xc:dz}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===xc?dn:yr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(e){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=e}}class lQ extends fC{}lQ.prototype.isWebGL1Renderer=!0;class dC{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new nt(e),this.near=t,this.far=n}clone(){return new dC(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Dz extends bn{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}class pC{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=xb,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Ra()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return Sc("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let i=0,a=this.stride;i<a;i++)this.array[e+i]=t.array[n+i];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ra()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return e.arrayBuffers===void 0&&(e.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=Ra()),e.arrayBuffers[this.array.buffer._uuid]===void 0&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const si=new X;class Ja{constructor(e,t,n,i=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=i}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)si.fromBufferAttribute(this,t),si.applyMatrix4(e),this.setXYZ(t,si.x,si.y,si.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)si.fromBufferAttribute(this,t),si.applyNormalMatrix(e),this.setXYZ(t,si.x,si.y,si.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)si.fromBufferAttribute(this,t),si.transformDirection(e),this.setXYZ(t,si.x,si.y,si.z);return this}getComponent(e,t){let n=this.array[e*this.data.stride+this.offset+t];return this.normalized&&(n=Ka(n,this.array)),n}setComponent(e,t,n){return this.normalized&&(n=cn(n,this.array)),this.data.array[e*this.data.stride+this.offset+t]=n,this}setX(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=cn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Ka(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Ka(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Ka(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Ka(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=cn(t,this.array),n=cn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=cn(t,this.array),n=cn(n,this.array),i=cn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this}setXYZW(e,t,n,i,a){return e=e*this.data.stride+this.offset,this.normalized&&(t=cn(t,this.array),n=cn(n,this.array),i=cn(i,this.array),a=cn(a,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=i,this.data.array[e+3]=a,this}clone(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)t.push(this.data.array[i+a])}return new Gn(new this.array.constructor(t),this.itemSize,this.normalized)}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new Ja(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(e===void 0){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const t=[];for(let n=0;n<this.count;n++){const i=n*this.data.stride+this.offset;for(let a=0;a<this.itemSize;a++)t.push(this.data.array[i+a])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:t,normalized:this.normalized}}else return e.interleavedBuffers===void 0&&(e.interleavedBuffers={}),e.interleavedBuffers[this.data.uuid]===void 0&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class bb extends Da{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new nt(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let bh;const Fd=new X,Th=new X,Mh=new X,Ch=new Me,Bd=new Me,Iz=new Mt,fm=new X,zd=new X,dm=new X,rR=new Me,Qx=new Me,iR=new Me;class aR extends bn{constructor(e=new bb){if(super(),this.isSprite=!0,this.type="Sprite",bh===void 0){bh=new wn;const t=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),n=new pC(t,5);bh.setIndex([0,1,2,0,2,3]),bh.setAttribute("position",new Ja(n,3,0,!1)),bh.setAttribute("uv",new Ja(n,2,3,!1))}this.geometry=bh,this.material=e,this.center=new Me(.5,.5)}raycast(e,t){e.camera===null&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Th.setFromMatrixScale(this.matrixWorld),Iz.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),Mh.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&this.material.sizeAttenuation===!1&&Th.multiplyScalar(-Mh.z);const n=this.material.rotation;let i,a;n!==0&&(a=Math.cos(n),i=Math.sin(n));const o=this.center;pm(fm.set(-.5,-.5,0),Mh,o,Th,i,a),pm(zd.set(.5,-.5,0),Mh,o,Th,i,a),pm(dm.set(.5,.5,0),Mh,o,Th,i,a),rR.set(0,0),Qx.set(1,0),iR.set(1,1);let s=e.ray.intersectTriangle(fm,zd,dm,!1,Fd);if(s===null&&(pm(zd.set(-.5,.5,0),Mh,o,Th,i,a),Qx.set(0,1),s=e.ray.intersectTriangle(fm,dm,zd,!1,Fd),s===null))return;const l=e.ray.origin.distanceTo(Fd);l<e.near||l>e.far||t.push({distance:l,point:Fd.clone(),uv:Tp.getInterpolation(Fd,fm,zd,dm,rR,Qx,iR,new Me),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function pm(r,e,t,n,i,a){Ch.subVectors(r,t).addScalar(.5).multiply(n),i!==void 0?(Bd.x=a*Ch.x-i*Ch.y,Bd.y=i*Ch.x+a*Ch.y):Bd.copy(Ch),r.copy(e),r.x+=Bd.x,r.y+=Bd.y,r.applyMatrix4(Iz)}const oR=new X,sR=new an,lR=new an,uQ=new X,uR=new Mt,vm=new X,Jx=new Fa,cR=new Mt,eS=new sd;class cQ extends rn{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=zL,this.bindMatrix=new Mt,this.bindMatrixInverse=new Mt,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;this.boundingBox===null&&(this.boundingBox=new Oa),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,vm),this.boundingBox.expandByPoint(vm)}computeBoundingSphere(){const e=this.geometry;this.boundingSphere===null&&(this.boundingSphere=new Fa),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let n=0;n<t.count;n++)this.getVertexPosition(n,vm),this.boundingSphere.expandByPoint(vm)}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,i=this.matrixWorld;n!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Jx.copy(this.boundingSphere),Jx.applyMatrix4(i),e.ray.intersectsSphere(Jx)!==!1&&(cR.copy(i).invert(),eS.copy(e.ray).applyMatrix4(cR),!(this.boundingBox!==null&&eS.intersectsBox(this.boundingBox)===!1)&&this._computeIntersections(e,t,eS)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}bind(e,t){this.skeleton=e,t===void 0&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new an,t=this.geometry.attributes.skinWeight;for(let n=0,i=t.count;n<i;n++){e.fromBufferAttribute(t,n);const a=1/e.manhattanLength();a!==1/0?e.multiplyScalar(a):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),this.bindMode===zL?this.bindMatrixInverse.copy(this.matrixWorld).invert():this.bindMode===xX?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}applyBoneTransform(e,t){const n=this.skeleton,i=this.geometry;sR.fromBufferAttribute(i.attributes.skinIndex,e),lR.fromBufferAttribute(i.attributes.skinWeight,e),oR.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let a=0;a<4;a++){const o=lR.getComponent(a);if(o!==0){const s=sR.getComponent(a);uR.multiplyMatrices(n.bones[s].matrixWorld,n.boneInverses[s]),t.addScaledVector(uQ.copy(oR).applyMatrix4(uR),o)}}return t.applyMatrix4(this.bindMatrixInverse)}}class Nz extends bn{constructor(){super(),this.isBone=!0,this.type="Bone"}}class hQ extends mr{constructor(e=null,t=1,n=1,i,a,o,s,l,u=vr,c=vr,h,f){super(null,o,s,l,u,c,i,a,h,f),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const hR=new Mt,fQ=new Mt;class vC{constructor(e=[],t=[]){this.uuid=Ra(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(e.length*16),t.length===0)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let n=0,i=this.bones.length;n<i;n++)this.boneInverses.push(new Mt)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const n=new Mt;this.bones[e]&&n.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(n)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&n.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const n=this.bones[e];n&&(n.parent&&n.parent.isBone?(n.matrix.copy(n.parent.matrixWorld).invert(),n.matrix.multiply(n.matrixWorld)):n.matrix.copy(n.matrixWorld),n.matrix.decompose(n.position,n.quaternion,n.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,i=this.boneTexture;for(let a=0,o=e.length;a<o;a++){const s=e[a]?e[a].matrixWorld:fQ;hR.multiplyMatrices(s,t[a]),hR.toArray(n,a*16)}i!==null&&(i.needsUpdate=!0)}clone(){return new vC(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(this.bones.length*4);e=Math.ceil(e/4)*4,e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new hQ(t,e,e,ba,Ro);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const i=this.bones[t];if(i.name===e)return i}}dispose(){this.boneTexture!==null&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,i=e.bones.length;n<i;n++){const a=e.bones[n];let o=t[a];o===void 0&&(console.warn("THREE.Skeleton: No bone found with UUID:",a),o=new Nz),this.bones.push(o),this.boneInverses.push(new Mt().fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let i=0,a=t.length;i<a;i++){const o=t[i];e.bones.push(o.uuid);const s=n[i];e.boneInverses.push(s.toArray())}return e}}class Tb extends Gn{constructor(e,t,n,i=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=i}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Eh=new Mt,fR=new Mt,gm=[],dR=new Oa,dQ=new Mt,Ud=new rn,Vd=new Fa;class pQ extends rn{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Tb(new Float32Array(n*16),16),this.instanceColor=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let i=0;i<n;i++)this.setMatrixAt(i,dQ)}computeBoundingBox(){const e=this.geometry,t=this.count;this.boundingBox===null&&(this.boundingBox=new Oa),e.boundingBox===null&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Eh),dR.copy(e.boundingBox).applyMatrix4(Eh),this.boundingBox.union(dR)}computeBoundingSphere(){const e=this.geometry,t=this.count;this.boundingSphere===null&&(this.boundingSphere=new Fa),e.boundingSphere===null&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Eh),Vd.copy(e.boundingSphere).applyMatrix4(Eh),this.boundingSphere.union(Vd)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),e.instanceColor!==null&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,e.boundingBox!==null&&(this.boundingBox=e.boundingBox.clone()),e.boundingSphere!==null&&(this.boundingSphere=e.boundingSphere.clone()),this}getColorAt(e,t){t.fromArray(this.instanceColor.array,e*3)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,e*16)}raycast(e,t){const n=this.matrixWorld,i=this.count;if(Ud.geometry=this.geometry,Ud.material=this.material,Ud.material!==void 0&&(this.boundingSphere===null&&this.computeBoundingSphere(),Vd.copy(this.boundingSphere),Vd.applyMatrix4(n),e.ray.intersectsSphere(Vd)!==!1))for(let a=0;a<i;a++){this.getMatrixAt(a,Eh),fR.multiplyMatrices(n,Eh),Ud.matrixWorld=fR,Ud.raycast(e,gm);for(let o=0,s=gm.length;o<s;o++){const l=gm[o];l.instanceId=a,l.object=this,t.push(l)}gm.length=0}}setColorAt(e,t){this.instanceColor===null&&(this.instanceColor=new Tb(new Float32Array(this.instanceMatrix.count*3),3)),t.toArray(this.instanceColor.array,e*3)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,e*16)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class ys extends Da{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new nt(16777215),this.map=null,this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const pR=new X,vR=new X,gR=new Mt,tS=new sd,mm=new Fa;let Mv=class extends bn{constructor(e=new wn,t=new ys){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[0];for(let i=1,a=t.count;i<a;i++)pR.fromBufferAttribute(t,i-1),vR.fromBufferAttribute(t,i),n[i]=n[i-1],n[i]+=pR.distanceTo(vR);e.setAttribute("lineDistance",new Nn(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,a=e.params.Line.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),mm.copy(n.boundingSphere),mm.applyMatrix4(i),mm.radius+=a,e.ray.intersectsSphere(mm)===!1)return;gR.copy(i).invert(),tS.copy(e.ray).applyMatrix4(gR);const s=a/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,u=new X,c=new X,h=new X,f=new X,d=this.isLineSegments?2:1,p=n.index,v=n.attributes.position;if(p!==null){const m=Math.max(0,o.start),y=Math.min(p.count,o.start+o.count);for(let _=m,x=y-1;_<x;_+=d){const S=p.getX(_),A=p.getX(_+1);if(u.fromBufferAttribute(v,S),c.fromBufferAttribute(v,A),tS.distanceSqToSegment(u,c,f,h)>l)continue;f.applyMatrix4(this.matrixWorld);const M=e.ray.origin.distanceTo(f);M<e.near||M>e.far||t.push({distance:M,point:h.clone().applyMatrix4(this.matrixWorld),index:_,face:null,faceIndex:null,object:this})}}else{const m=Math.max(0,o.start),y=Math.min(v.count,o.start+o.count);for(let _=m,x=y-1;_<x;_+=d){if(u.fromBufferAttribute(v,_),c.fromBufferAttribute(v,_+1),tS.distanceSqToSegment(u,c,f,h)>l)continue;f.applyMatrix4(this.matrixWorld);const A=e.ray.origin.distanceTo(f);A<e.near||A>e.far||t.push({distance:A,point:h.clone().applyMatrix4(this.matrixWorld),index:_,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=i.length;a<o;a++){const s=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}};const mR=new X,yR=new X;class gC extends Mv{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,n=[];for(let i=0,a=t.count;i<a;i+=2)mR.fromBufferAttribute(t,i),yR.fromBufferAttribute(t,i+1),n[i]=i===0?0:n[i-1],n[i+1]=n[i]+mR.distanceTo(yR);e.setAttribute("lineDistance",new Nn(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class O0 extends Mv{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class pg extends Da{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new nt(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const _R=new Mt,Mb=new sd,ym=new Fa,_m=new X;class mC extends bn{constructor(e=new wn,t=new pg){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=Array.isArray(e.material)?e.material.slice():e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,i=this.matrixWorld,a=e.params.Points.threshold,o=n.drawRange;if(n.boundingSphere===null&&n.computeBoundingSphere(),ym.copy(n.boundingSphere),ym.applyMatrix4(i),ym.radius+=a,e.ray.intersectsSphere(ym)===!1)return;_R.copy(i).invert(),Mb.copy(e.ray).applyMatrix4(_R);const s=a/((this.scale.x+this.scale.y+this.scale.z)/3),l=s*s,u=n.index,h=n.attributes.position;if(u!==null){const f=Math.max(0,o.start),d=Math.min(u.count,o.start+o.count);for(let p=f,g=d;p<g;p++){const v=u.getX(p);_m.fromBufferAttribute(h,v),xR(_m,v,l,i,e,t,this)}}else{const f=Math.max(0,o.start),d=Math.min(h.count,o.start+o.count);for(let p=f,g=d;p<g;p++)_m.fromBufferAttribute(h,p),xR(_m,p,l,i,e,t,this)}}updateMorphTargets(){const t=this.geometry.morphAttributes,n=Object.keys(t);if(n.length>0){const i=t[n[0]];if(i!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let a=0,o=i.length;a<o;a++){const s=i[a].name||String(a);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=a}}}}}function xR(r,e,t,n,i,a,o){const s=Mb.distanceSqToPoint(r);if(s<t){const l=new X;Mb.closestPointToPoint(r,l),l.applyMatrix4(n);const u=i.ray.origin.distanceTo(l);if(u<i.near||u>i.far)return;a.push({distance:u,distanceToRay:Math.sqrt(s),point:l,index:e,face:null,object:o})}}class yC extends mr{constructor(e,t,n,i,a,o,s,l,u){super(e,t,n,i,a,o,s,l,u),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Zo{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,i=this.getPoint(0),a=0;t.push(0);for(let o=1;o<=e;o++)n=this.getPoint(o/e),a+=n.distanceTo(i),t.push(a),i=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let i=0;const a=n.length;let o;t?o=t:o=e*n[a-1];let s=0,l=a-1,u;for(;s<=l;)if(i=Math.floor(s+(l-s)/2),u=n[i]-o,u<0)s=i+1;else if(u>0)l=i-1;else{l=i;break}if(i=l,n[i]===o)return i/(a-1);const c=n[i],f=n[i+1]-c,d=(o-c)/f;return(i+d)/(a-1)}getTangent(e,t){let i=e-1e-4,a=e+1e-4;i<0&&(i=0),a>1&&(a=1);const o=this.getPoint(i),s=this.getPoint(a),l=t||(o.isVector2?new Me:new X);return l.copy(s).sub(o).normalize(),l}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new X,i=[],a=[],o=[],s=new X,l=new Mt;for(let d=0;d<=e;d++){const p=d/e;i[d]=this.getTangentAt(p,new X)}a[0]=new X,o[0]=new X;let u=Number.MAX_VALUE;const c=Math.abs(i[0].x),h=Math.abs(i[0].y),f=Math.abs(i[0].z);c<=u&&(u=c,n.set(1,0,0)),h<=u&&(u=h,n.set(0,1,0)),f<=u&&n.set(0,0,1),s.crossVectors(i[0],n).normalize(),a[0].crossVectors(i[0],s),o[0].crossVectors(i[0],a[0]);for(let d=1;d<=e;d++){if(a[d]=a[d-1].clone(),o[d]=o[d-1].clone(),s.crossVectors(i[d-1],i[d]),s.length()>Number.EPSILON){s.normalize();const p=Math.acos(hr(i[d-1].dot(i[d]),-1,1));a[d].applyMatrix4(l.makeRotationAxis(s,p))}o[d].crossVectors(i[d],a[d])}if(t===!0){let d=Math.acos(hr(a[0].dot(a[e]),-1,1));d/=e,i[0].dot(s.crossVectors(a[0],a[e]))>0&&(d=-d);for(let p=1;p<=e;p++)a[p].applyMatrix4(l.makeRotationAxis(i[p],d*p)),o[p].crossVectors(i[p],a[p])}return{tangents:i,normals:a,binormals:o}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class _C extends Zo{constructor(e=0,t=0,n=1,i=1,a=0,o=Math.PI*2,s=!1,l=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=i,this.aStartAngle=a,this.aEndAngle=o,this.aClockwise=s,this.aRotation=l}getPoint(e,t){const n=t||new Me,i=Math.PI*2;let a=this.aEndAngle-this.aStartAngle;const o=Math.abs(a)<Number.EPSILON;for(;a<0;)a+=i;for(;a>i;)a-=i;a<Number.EPSILON&&(o?a=0:a=i),this.aClockwise===!0&&!o&&(a===i?a=-i:a=a-i);const s=this.aStartAngle+e*a;let l=this.aX+this.xRadius*Math.cos(s),u=this.aY+this.yRadius*Math.sin(s);if(this.aRotation!==0){const c=Math.cos(this.aRotation),h=Math.sin(this.aRotation),f=l-this.aX,d=u-this.aY;l=f*c-d*h+this.aX,u=f*h+d*c+this.aY}return n.set(l,u)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class vQ extends _C{constructor(e,t,n,i,a,o){super(e,t,n,n,i,a,o),this.isArcCurve=!0,this.type="ArcCurve"}}function xC(){let r=0,e=0,t=0,n=0;function i(a,o,s,l){r=a,e=s,t=-3*a+3*o-2*s-l,n=2*a-2*o+s+l}return{initCatmullRom:function(a,o,s,l,u){i(o,s,u*(s-a),u*(l-o))},initNonuniformCatmullRom:function(a,o,s,l,u,c,h){let f=(o-a)/u-(s-a)/(u+c)+(s-o)/c,d=(s-o)/c-(l-o)/(c+h)+(l-s)/h;f*=c,d*=c,i(o,s,f,d)},calc:function(a){const o=a*a,s=o*a;return r+e*a+t*o+n*s}}}const xm=new X,nS=new xC,rS=new xC,iS=new xC;class kz extends Zo{constructor(e=[],t=!1,n="centripetal",i=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=i}getPoint(e,t=new X){const n=t,i=this.points,a=i.length,o=(a-(this.closed?0:1))*e;let s=Math.floor(o),l=o-s;this.closed?s+=s>0?0:(Math.floor(Math.abs(s)/a)+1)*a:l===0&&s===a-1&&(s=a-2,l=1);let u,c;this.closed||s>0?u=i[(s-1)%a]:(xm.subVectors(i[0],i[1]).add(i[0]),u=xm);const h=i[s%a],f=i[(s+1)%a];if(this.closed||s+2<a?c=i[(s+2)%a]:(xm.subVectors(i[a-1],i[a-2]).add(i[a-1]),c=xm),this.curveType==="centripetal"||this.curveType==="chordal"){const d=this.curveType==="chordal"?.5:.25;let p=Math.pow(u.distanceToSquared(h),d),g=Math.pow(h.distanceToSquared(f),d),v=Math.pow(f.distanceToSquared(c),d);g<1e-4&&(g=1),p<1e-4&&(p=g),v<1e-4&&(v=g),nS.initNonuniformCatmullRom(u.x,h.x,f.x,c.x,p,g,v),rS.initNonuniformCatmullRom(u.y,h.y,f.y,c.y,p,g,v),iS.initNonuniformCatmullRom(u.z,h.z,f.z,c.z,p,g,v)}else this.curveType==="catmullrom"&&(nS.initCatmullRom(u.x,h.x,f.x,c.x,this.tension),rS.initCatmullRom(u.y,h.y,f.y,c.y,this.tension),iS.initCatmullRom(u.z,h.z,f.z,c.z,this.tension));return n.set(nS.calc(l),rS.calc(l),iS.calc(l)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new X().fromArray(i))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function SR(r,e,t,n,i){const a=(n-e)*.5,o=(i-t)*.5,s=r*r,l=r*s;return(2*t-2*n+a+o)*l+(-3*t+3*n-2*a-o)*s+a*r+t}function gQ(r,e){const t=1-r;return t*t*e}function mQ(r,e){return 2*(1-r)*r*e}function yQ(r,e){return r*r*e}function qp(r,e,t,n){return gQ(r,e)+mQ(r,t)+yQ(r,n)}function _Q(r,e){const t=1-r;return t*t*t*e}function xQ(r,e){const t=1-r;return 3*t*t*r*e}function SQ(r,e){return 3*(1-r)*r*r*e}function AQ(r,e){return r*r*r*e}function jp(r,e,t,n,i){return _Q(r,e)+xQ(r,t)+SQ(r,n)+AQ(r,i)}class Oz extends Zo{constructor(e=new Me,t=new Me,n=new Me,i=new Me){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new Me){const n=t,i=this.v0,a=this.v1,o=this.v2,s=this.v3;return n.set(jp(e,i.x,a.x,o.x,s.x),jp(e,i.y,a.y,o.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class wQ extends Zo{constructor(e=new X,t=new X,n=new X,i=new X){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=i}getPoint(e,t=new X){const n=t,i=this.v0,a=this.v1,o=this.v2,s=this.v3;return n.set(jp(e,i.x,a.x,o.x,s.x),jp(e,i.y,a.y,o.y,s.y),jp(e,i.z,a.z,o.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Fz extends Zo{constructor(e=new Me,t=new Me){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Me){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new Me){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class bQ extends Zo{constructor(e=new X,t=new X){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new X){const n=t;return e===1?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t=new X){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Bz extends Zo{constructor(e=new Me,t=new Me,n=new Me){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Me){const n=t,i=this.v0,a=this.v1,o=this.v2;return n.set(qp(e,i.x,a.x,o.x),qp(e,i.y,a.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class zz extends Zo{constructor(e=new X,t=new X,n=new X){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new X){const n=t,i=this.v0,a=this.v1,o=this.v2;return n.set(qp(e,i.x,a.x,o.x),qp(e,i.y,a.y,o.y),qp(e,i.z,a.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Uz extends Zo{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Me){const n=t,i=this.points,a=(i.length-1)*e,o=Math.floor(a),s=a-o,l=i[o===0?o:o-1],u=i[o],c=i[o>i.length-2?i.length-1:o+1],h=i[o>i.length-3?i.length-1:o+2];return n.set(SR(s,l.x,u.x,c.x,h.x),SR(s,l.y,u.y,c.y,h.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const i=this.points[t];e.points.push(i.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const i=e.points[t];this.points.push(new Me().fromArray(i))}return this}}var F0=Object.freeze({__proto__:null,ArcCurve:vQ,CatmullRomCurve3:kz,CubicBezierCurve:Oz,CubicBezierCurve3:wQ,EllipseCurve:_C,LineCurve:Fz,LineCurve3:bQ,QuadraticBezierCurve:Bz,QuadraticBezierCurve3:zz,SplineCurve:Uz});class TQ extends Zo{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);if(!e.equals(t)){const n=e.isVector2===!0?"LineCurve":"LineCurve3";this.curves.push(new F0[n](t,e))}return this}getPoint(e,t){const n=e*this.getLength(),i=this.getCurveLengths();let a=0;for(;a<i.length;){if(i[a]>=n){const o=i[a]-n,s=this.curves[a],l=s.getLength(),u=l===0?0:1-o/l;return s.getPointAt(u,t)}a++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,i=this.curves.length;n<i;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let i=0,a=this.curves;i<a.length;i++){const o=a[i],s=o.isEllipseCurve?e*2:o.isLineCurve||o.isLineCurve3?1:o.isSplineCurve?e*o.points.length:e,l=o.getPoints(s);for(let u=0;u<l.length;u++){const c=l[u];n&&n.equals(c)||(t.push(c),n=c)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(i.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const i=this.curves[t];e.curves.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const i=e.curves[t];this.curves.push(new F0[i.type]().fromJSON(i))}return this}}let AR=class extends TQ{constructor(e){super(),this.type="Path",this.currentPoint=new Me,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Fz(this.currentPoint.clone(),new Me(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,i){const a=new Bz(this.currentPoint.clone(),new Me(e,t),new Me(n,i));return this.curves.push(a),this.currentPoint.set(n,i),this}bezierCurveTo(e,t,n,i,a,o){const s=new Oz(this.currentPoint.clone(),new Me(e,t),new Me(n,i),new Me(a,o));return this.curves.push(s),this.currentPoint.set(a,o),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Uz(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,i,a,o){const s=this.currentPoint.x,l=this.currentPoint.y;return this.absarc(e+s,t+l,n,i,a,o),this}absarc(e,t,n,i,a,o){return this.absellipse(e,t,n,n,i,a,o),this}ellipse(e,t,n,i,a,o,s,l){const u=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+u,t+c,n,i,a,o,s,l),this}absellipse(e,t,n,i,a,o,s,l){const u=new _C(e,t,n,i,a,o,s,l);if(this.curves.length>0){const h=u.getPoint(0);h.equals(this.currentPoint)||this.lineTo(h.x,h.y)}this.curves.push(u);const c=u.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}};class Uo extends AR{constructor(e){super(e),this.uuid=Ra(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,i=this.holes.length;n<i;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(i.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const i=this.holes[t];e.holes.push(i.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const i=e.holes[t];this.holes.push(new AR().fromJSON(i))}return this}}const MQ={triangulate:function(r,e,t=2){const n=e&&e.length,i=n?e[0]*t:r.length;let a=Vz(r,0,i,t,!0);const o=[];if(!a||a.next===a.prev)return o;let s,l,u,c,h,f,d;if(n&&(a=RQ(r,e,a,t)),r.length>80*t){s=u=r[0],l=c=r[1];for(let p=t;p<i;p+=t)h=r[p],f=r[p+1],h<s&&(s=h),f<l&&(l=f),h>u&&(u=h),f>c&&(c=f);d=Math.max(u-s,c-l),d=d!==0?32767/d:0}return Cv(a,o,t,s,l,d,0),o}};function Vz(r,e,t,n,i){let a,o;if(i===GQ(r,e,t,n)>0)for(a=e;a<t;a+=n)o=wR(a,r[a],r[a+1],o);else for(a=t-n;a>=e;a-=n)o=wR(a,r[a],r[a+1],o);return o&&n1(o,o.next)&&(Lv(o),o=o.next),o}function Oc(r,e){if(!r)return r;e||(e=r);let t=r,n;do if(n=!1,!t.steiner&&(n1(t,t.next)||Un(t.prev,t,t.next)===0)){if(Lv(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function Cv(r,e,t,n,i,a,o){if(!r)return;!o&&a&&OQ(r,n,i,a);let s=r,l,u;for(;r.prev!==r.next;){if(l=r.prev,u=r.next,a?EQ(r,n,i,a):CQ(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(u.i/t|0),Lv(r),r=u.next,s=u.next;continue}if(r=u,r===s){o?o===1?(r=LQ(Oc(r),e,t),Cv(r,e,t,n,i,a,2)):o===2&&PQ(r,e,t,n,i,a):Cv(Oc(r),e,t,n,i,a,1);break}}}function CQ(r){const e=r.prev,t=r,n=r.next;if(Un(e,t,n)>=0)return!1;const i=e.x,a=t.x,o=n.x,s=e.y,l=t.y,u=n.y,c=i<a?i<o?i:o:a<o?a:o,h=s<l?s<u?s:u:l<u?l:u,f=i>a?i>o?i:o:a>o?a:o,d=s>l?s>u?s:u:l>u?l:u;let p=n.next;for(;p!==e;){if(p.x>=c&&p.x<=f&&p.y>=h&&p.y<=d&&ff(i,s,a,l,o,u,p.x,p.y)&&Un(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function EQ(r,e,t,n){const i=r.prev,a=r,o=r.next;if(Un(i,a,o)>=0)return!1;const s=i.x,l=a.x,u=o.x,c=i.y,h=a.y,f=o.y,d=s<l?s<u?s:u:l<u?l:u,p=c<h?c<f?c:f:h<f?h:f,g=s>l?s>u?s:u:l>u?l:u,v=c>h?c>f?c:f:h>f?h:f,m=Cb(d,p,e,t,n),y=Cb(g,v,e,t,n);let _=r.prevZ,x=r.nextZ;for(;_&&_.z>=m&&x&&x.z<=y;){if(_.x>=d&&_.x<=g&&_.y>=p&&_.y<=v&&_!==i&&_!==o&&ff(s,c,l,h,u,f,_.x,_.y)&&Un(_.prev,_,_.next)>=0||(_=_.prevZ,x.x>=d&&x.x<=g&&x.y>=p&&x.y<=v&&x!==i&&x!==o&&ff(s,c,l,h,u,f,x.x,x.y)&&Un(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;_&&_.z>=m;){if(_.x>=d&&_.x<=g&&_.y>=p&&_.y<=v&&_!==i&&_!==o&&ff(s,c,l,h,u,f,_.x,_.y)&&Un(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;x&&x.z<=y;){if(x.x>=d&&x.x<=g&&x.y>=p&&x.y<=v&&x!==i&&x!==o&&ff(s,c,l,h,u,f,x.x,x.y)&&Un(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}function LQ(r,e,t){let n=r;do{const i=n.prev,a=n.next.next;!n1(i,a)&&Gz(i,n,n.next,a)&&Ev(i,a)&&Ev(a,i)&&(e.push(i.i/t|0),e.push(n.i/t|0),e.push(a.i/t|0),Lv(n),Lv(n.next),n=r=a),n=n.next}while(n!==r);return Oc(n)}function PQ(r,e,t,n,i,a){let o=r;do{let s=o.next.next;for(;s!==o.prev;){if(o.i!==s.i&&zQ(o,s)){let l=Hz(o,s);o=Oc(o,o.next),l=Oc(l,l.next),Cv(o,e,t,n,i,a,0),Cv(l,e,t,n,i,a,0);return}s=s.next}o=o.next}while(o!==r)}function RQ(r,e,t,n){const i=[];let a,o,s,l,u;for(a=0,o=e.length;a<o;a++)s=e[a]*n,l=a<o-1?e[a+1]*n:r.length,u=Vz(r,s,l,n,!1),u===u.next&&(u.steiner=!0),i.push(BQ(u));for(i.sort(DQ),a=0;a<i.length;a++)t=IQ(i[a],t);return t}function DQ(r,e){return r.x-e.x}function IQ(r,e){const t=NQ(r,e);if(!t)return e;const n=Hz(t,r);return Oc(n,n.next),Oc(t,t.next)}function NQ(r,e){let t=e,n=-1/0,i;const a=r.x,o=r.y;do{if(o<=t.y&&o>=t.next.y&&t.next.y!==t.y){const f=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(f<=a&&f>n&&(n=f,i=t.x<t.next.x?t:t.next,f===a))return i}t=t.next}while(t!==e);if(!i)return null;const s=i,l=i.x,u=i.y;let c=1/0,h;t=i;do a>=t.x&&t.x>=l&&a!==t.x&&ff(o<u?a:n,o,l,u,o<u?n:a,o,t.x,t.y)&&(h=Math.abs(o-t.y)/(a-t.x),Ev(t,r)&&(h<c||h===c&&(t.x>i.x||t.x===i.x&&kQ(i,t)))&&(i=t,c=h)),t=t.next;while(t!==s);return i}function kQ(r,e){return Un(r.prev,r,e.prev)<0&&Un(e.next,r,r.next)<0}function OQ(r,e,t,n){let i=r;do i.z===0&&(i.z=Cb(i.x,i.y,e,t,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==r);i.prevZ.nextZ=null,i.prevZ=null,FQ(i)}function FQ(r){let e,t,n,i,a,o,s,l,u=1;do{for(t=r,r=null,a=null,o=0;t;){for(o++,n=t,s=0,e=0;e<u&&(s++,n=n.nextZ,!!n);e++);for(l=u;s>0||l>0&&n;)s!==0&&(l===0||!n||t.z<=n.z)?(i=t,t=t.nextZ,s--):(i=n,n=n.nextZ,l--),a?a.nextZ=i:r=i,i.prevZ=a,a=i;t=n}a.nextZ=null,u*=2}while(o>1);return r}function Cb(r,e,t,n,i){return r=(r-t)*i|0,e=(e-n)*i|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function BQ(r){let e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function ff(r,e,t,n,i,a,o,s){return(i-o)*(e-s)>=(r-o)*(a-s)&&(r-o)*(n-s)>=(t-o)*(e-s)&&(t-o)*(a-s)>=(i-o)*(n-s)}function zQ(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!UQ(r,e)&&(Ev(r,e)&&Ev(e,r)&&VQ(r,e)&&(Un(r.prev,r,e.prev)||Un(r,e.prev,e))||n1(r,e)&&Un(r.prev,r,r.next)>0&&Un(e.prev,e,e.next)>0)}function Un(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function n1(r,e){return r.x===e.x&&r.y===e.y}function Gz(r,e,t,n){const i=Am(Un(r,e,t)),a=Am(Un(r,e,n)),o=Am(Un(t,n,r)),s=Am(Un(t,n,e));return!!(i!==a&&o!==s||i===0&&Sm(r,t,e)||a===0&&Sm(r,n,e)||o===0&&Sm(t,r,n)||s===0&&Sm(t,e,n))}function Sm(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function Am(r){return r>0?1:r<0?-1:0}function UQ(r,e){let t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&Gz(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function Ev(r,e){return Un(r.prev,r,r.next)<0?Un(r,e,r.next)>=0&&Un(r,r.prev,e)>=0:Un(r,e,r.prev)<0||Un(r,r.next,e)<0}function VQ(r,e){let t=r,n=!1;const i=(r.x+e.x)/2,a=(r.y+e.y)/2;do t.y>a!=t.next.y>a&&t.next.y!==t.y&&i<(t.next.x-t.x)*(a-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==r);return n}function Hz(r,e){const t=new Eb(r.i,r.x,r.y),n=new Eb(e.i,e.x,e.y),i=r.next,a=e.prev;return r.next=e,e.prev=r,t.next=i,i.prev=t,n.next=t,t.prev=n,a.next=n,n.prev=a,n}function wR(r,e,t,n){const i=new Eb(r,e,t);return n?(i.next=n.next,i.prev=n,n.next.prev=i,n.next=i):(i.prev=i,i.next=i),i}function Lv(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Eb(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function GQ(r,e,t,n){let i=0;for(let a=e,o=t-n;a<t;a+=n)i+=(r[o]-r[a])*(r[a+1]+r[o+1]),o=a;return i}class Bl{static area(e){const t=e.length;let n=0;for(let i=t-1,a=0;a<t;i=a++)n+=e[i].x*e[a].y-e[a].x*e[i].y;return n*.5}static isClockWise(e){return Bl.area(e)<0}static triangulateShape(e,t){const n=[],i=[],a=[];bR(e),TR(n,e);let o=e.length;t.forEach(bR);for(let l=0;l<t.length;l++)i.push(o),o+=t[l].length,TR(n,t[l]);const s=MQ.triangulate(n,i);for(let l=0;l<s.length;l+=3)a.push(s.slice(l,l+3));return a}}function bR(r){const e=r.length;e>2&&r[e-1].equals(r[0])&&r.pop()}function TR(r,e){for(let t=0;t<e.length;t++)r.push(e[t].x),r.push(e[t].y)}class r1 extends wn{constructor(e=new Uo([new Me(.5,.5),new Me(-.5,.5),new Me(-.5,-.5),new Me(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,i=[],a=[];for(let s=0,l=e.length;s<l;s++){const u=e[s];o(u)}this.setAttribute("position",new Nn(i,3)),this.setAttribute("uv",new Nn(a,2)),this.computeVertexNormals();function o(s){const l=[],u=t.curveSegments!==void 0?t.curveSegments:12,c=t.steps!==void 0?t.steps:1,h=t.depth!==void 0?t.depth:1;let f=t.bevelEnabled!==void 0?t.bevelEnabled:!0,d=t.bevelThickness!==void 0?t.bevelThickness:.2,p=t.bevelSize!==void 0?t.bevelSize:d-.1,g=t.bevelOffset!==void 0?t.bevelOffset:0,v=t.bevelSegments!==void 0?t.bevelSegments:3;const m=t.extrudePath,y=t.UVGenerator!==void 0?t.UVGenerator:HQ;let _,x=!1,S,A,w,M;m&&(_=m.getSpacedPoints(c),x=!0,f=!1,S=m.computeFrenetFrames(c,!1),A=new X,w=new X,M=new X),f||(v=0,d=0,p=0,g=0);const C=s.extractPoints(u);let b=C.shape;const T=C.holes;if(!Bl.isClockWise(b)){b=b.reverse();for(let U=0,K=T.length;U<K;U++){const te=T[U];Bl.isClockWise(te)&&(T[U]=te.reverse())}}const D=Bl.triangulateShape(b,T),L=b;for(let U=0,K=T.length;U<K;U++){const te=T[U];b=b.concat(te)}function E(U,K,te){return K||console.error("THREE.ExtrudeGeometry: vec does not exist"),U.clone().addScaledVector(K,te)}const I=b.length,N=D.length;function R(U,K,te){let ce,se,Ne;const Oe=U.x-K.x,B=U.y-K.y,z=te.x-U.x,ne=te.y-U.y,ve=Oe*Oe+B*B,Ae=Oe*ne-B*z;if(Math.abs(Ae)>Number.EPSILON){const we=Math.sqrt(ve),We=Math.sqrt(z*z+ne*ne),Be=K.x-B/we,je=K.y+Oe/we,Ye=te.x-ne/We,xt=te.y+z/We,Le=((Ye-Be)*ne-(xt-je)*z)/(Oe*ne-B*z);ce=Be+Oe*Le-U.x,se=je+B*Le-U.y;const Wt=ce*ce+se*se;if(Wt<=2)return new Me(ce,se);Ne=Math.sqrt(Wt/2)}else{let we=!1;Oe>Number.EPSILON?z>Number.EPSILON&&(we=!0):Oe<-Number.EPSILON?z<-Number.EPSILON&&(we=!0):Math.sign(B)===Math.sign(ne)&&(we=!0),we?(ce=-B,se=Oe,Ne=Math.sqrt(ve)):(ce=Oe,se=B,Ne=Math.sqrt(ve/2))}return new Me(ce/Ne,se/Ne)}const F=[];for(let U=0,K=L.length,te=K-1,ce=U+1;U<K;U++,te++,ce++)te===K&&(te=0),ce===K&&(ce=0),F[U]=R(L[U],L[te],L[ce]);const O=[];let V,H=F.concat();for(let U=0,K=T.length;U<K;U++){const te=T[U];V=[];for(let ce=0,se=te.length,Ne=se-1,Oe=ce+1;ce<se;ce++,Ne++,Oe++)Ne===se&&(Ne=0),Oe===se&&(Oe=0),V[ce]=R(te[ce],te[Ne],te[Oe]);O.push(V),H=H.concat(V)}for(let U=0;U<v;U++){const K=U/v,te=d*Math.cos(K*Math.PI/2),ce=p*Math.sin(K*Math.PI/2)+g;for(let se=0,Ne=L.length;se<Ne;se++){const Oe=E(L[se],F[se],ce);he(Oe.x,Oe.y,-te)}for(let se=0,Ne=T.length;se<Ne;se++){const Oe=T[se];V=O[se];for(let B=0,z=Oe.length;B<z;B++){const ne=E(Oe[B],V[B],ce);he(ne.x,ne.y,-te)}}}const Q=p+g;for(let U=0;U<I;U++){const K=f?E(b[U],H[U],Q):b[U];x?(w.copy(S.normals[0]).multiplyScalar(K.x),A.copy(S.binormals[0]).multiplyScalar(K.y),M.copy(_[0]).add(w).add(A),he(M.x,M.y,M.z)):he(K.x,K.y,0)}for(let U=1;U<=c;U++)for(let K=0;K<I;K++){const te=f?E(b[K],H[K],Q):b[K];x?(w.copy(S.normals[U]).multiplyScalar(te.x),A.copy(S.binormals[U]).multiplyScalar(te.y),M.copy(_[U]).add(w).add(A),he(M.x,M.y,M.z)):he(te.x,te.y,h/c*U)}for(let U=v-1;U>=0;U--){const K=U/v,te=d*Math.cos(K*Math.PI/2),ce=p*Math.sin(K*Math.PI/2)+g;for(let se=0,Ne=L.length;se<Ne;se++){const Oe=E(L[se],F[se],ce);he(Oe.x,Oe.y,h+te)}for(let se=0,Ne=T.length;se<Ne;se++){const Oe=T[se];V=O[se];for(let B=0,z=Oe.length;B<z;B++){const ne=E(Oe[B],V[B],ce);x?he(ne.x,ne.y+_[c-1].y,_[c-1].x+te):he(ne.x,ne.y,h+te)}}}W(),Z();function W(){const U=i.length/3;if(f){let K=0,te=I*K;for(let ce=0;ce<N;ce++){const se=D[ce];le(se[2]+te,se[1]+te,se[0]+te)}K=c+v*2,te=I*K;for(let ce=0;ce<N;ce++){const se=D[ce];le(se[0]+te,se[1]+te,se[2]+te)}}else{for(let K=0;K<N;K++){const te=D[K];le(te[2],te[1],te[0])}for(let K=0;K<N;K++){const te=D[K];le(te[0]+I*c,te[1]+I*c,te[2]+I*c)}}n.addGroup(U,i.length/3-U,0)}function Z(){const U=i.length/3;let K=0;ee(L,K),K+=L.length;for(let te=0,ce=T.length;te<ce;te++){const se=T[te];ee(se,K),K+=se.length}n.addGroup(U,i.length/3-U,1)}function ee(U,K){let te=U.length;for(;--te>=0;){const ce=te;let se=te-1;se<0&&(se=U.length-1);for(let Ne=0,Oe=c+v*2;Ne<Oe;Ne++){const B=I*Ne,z=I*(Ne+1),ne=K+ce+B,ve=K+se+B,Ae=K+se+z,we=K+ce+z;re(ne,ve,Ae,we)}}}function he(U,K,te){l.push(U),l.push(K),l.push(te)}function le(U,K,te){be(U),be(K),be(te);const ce=i.length/3,se=y.generateTopUV(n,i,ce-3,ce-2,ce-1);de(se[0]),de(se[1]),de(se[2])}function re(U,K,te,ce){be(U),be(K),be(ce),be(K),be(te),be(ce);const se=i.length/3,Ne=y.generateSideWallUV(n,i,se-6,se-3,se-2,se-1);de(Ne[0]),de(Ne[1]),de(Ne[3]),de(Ne[1]),de(Ne[2]),de(Ne[3])}function be(U){i.push(l[U*3+0]),i.push(l[U*3+1]),i.push(l[U*3+2])}function de(U){a.push(U.x),a.push(U.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,n=this.parameters.options;return WQ(t,n,e)}static fromJSON(e,t){const n=[];for(let a=0,o=e.shapes.length;a<o;a++){const s=t[e.shapes[a]];n.push(s)}const i=e.options.extrudePath;return i!==void 0&&(e.options.extrudePath=new F0[i.type]().fromJSON(i)),new r1(n,e.options)}}const HQ={generateTopUV:function(r,e,t,n,i){const a=e[t*3],o=e[t*3+1],s=e[n*3],l=e[n*3+1],u=e[i*3],c=e[i*3+1];return[new Me(a,o),new Me(s,l),new Me(u,c)]},generateSideWallUV:function(r,e,t,n,i,a){const o=e[t*3],s=e[t*3+1],l=e[t*3+2],u=e[n*3],c=e[n*3+1],h=e[n*3+2],f=e[i*3],d=e[i*3+1],p=e[i*3+2],g=e[a*3],v=e[a*3+1],m=e[a*3+2];return Math.abs(s-c)<Math.abs(o-u)?[new Me(o,1-l),new Me(u,1-h),new Me(f,1-p),new Me(g,1-m)]:[new Me(s,1-l),new Me(c,1-h),new Me(d,1-p),new Me(v,1-m)]}};function WQ(r,e,t){if(t.shapes=[],Array.isArray(r))for(let n=0,i=r.length;n<i;n++){const a=r[n];t.shapes.push(a.uuid)}else t.shapes.push(r.uuid);return t.options=Object.assign({},e),e.extrudePath!==void 0&&(t.options.extrudePath=e.extrudePath.toJSON()),t}class vg extends wn{constructor(e=new Uo([new Me(0,.5),new Me(-.5,-.5),new Me(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],i=[],a=[],o=[];let s=0,l=0;if(Array.isArray(e)===!1)u(e);else for(let c=0;c<e.length;c++)u(e[c]),this.addGroup(s,l,c),s+=l,l=0;this.setIndex(n),this.setAttribute("position",new Nn(i,3)),this.setAttribute("normal",new Nn(a,3)),this.setAttribute("uv",new Nn(o,2));function u(c){const h=i.length/3,f=c.extractPoints(t);let d=f.shape;const p=f.holes;Bl.isClockWise(d)===!1&&(d=d.reverse());for(let v=0,m=p.length;v<m;v++){const y=p[v];Bl.isClockWise(y)===!0&&(p[v]=y.reverse())}const g=Bl.triangulateShape(d,p);for(let v=0,m=p.length;v<m;v++){const y=p[v];d=d.concat(y)}for(let v=0,m=d.length;v<m;v++){const y=d[v];i.push(y.x,y.y,0),a.push(0,0,1),o.push(y.x,y.y)}for(let v=0,m=g.length;v<m;v++){const y=g[v],_=y[0]+h,x=y[1]+h,S=y[2]+h;n.push(_,x,S),l+=3}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes;return $Q(t,e)}static fromJSON(e,t){const n=[];for(let i=0,a=e.shapes.length;i<a;i++){const o=t[e.shapes[i]];n.push(o)}return new vg(n,e.curveSegments)}}function $Q(r,e){if(e.shapes=[],Array.isArray(r))for(let t=0,n=r.length;t<n;t++){const i=r[t];e.shapes.push(i.uuid)}else e.shapes.push(r.uuid);return e}class SC extends wn{constructor(e=new zz(new X(-1,-1,0),new X(-1,1,0),new X(1,1,0)),t=64,n=1,i=8,a=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:i,closed:a};const o=e.computeFrenetFrames(t,a);this.tangents=o.tangents,this.normals=o.normals,this.binormals=o.binormals;const s=new X,l=new X,u=new Me;let c=new X;const h=[],f=[],d=[],p=[];g(),this.setIndex(p),this.setAttribute("position",new Nn(h,3)),this.setAttribute("normal",new Nn(f,3)),this.setAttribute("uv",new Nn(d,2));function g(){for(let _=0;_<t;_++)v(_);v(a===!1?t:0),y(),m()}function v(_){c=e.getPointAt(_/t,c);const x=o.normals[_],S=o.binormals[_];for(let A=0;A<=i;A++){const w=A/i*Math.PI*2,M=Math.sin(w),C=-Math.cos(w);l.x=C*x.x+M*S.x,l.y=C*x.y+M*S.y,l.z=C*x.z+M*S.z,l.normalize(),f.push(l.x,l.y,l.z),s.x=c.x+n*l.x,s.y=c.y+n*l.y,s.z=c.z+n*l.z,h.push(s.x,s.y,s.z)}}function m(){for(let _=1;_<=t;_++)for(let x=1;x<=i;x++){const S=(i+1)*(_-1)+(x-1),A=(i+1)*_+(x-1),w=(i+1)*_+x,M=(i+1)*(_-1)+x;p.push(S,A,M),p.push(A,w,M)}}function y(){for(let _=0;_<=t;_++)for(let x=0;x<=i;x++)u.x=_/t,u.y=x/i,d.push(u.x,u.y)}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new SC(new F0[e.path.type]().fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class XQ extends wn{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},e!==null){const t=[],n=new Set,i=new X,a=new X;if(e.index!==null){const o=e.attributes.position,s=e.index;let l=e.groups;l.length===0&&(l=[{start:0,count:s.count,materialIndex:0}]);for(let u=0,c=l.length;u<c;++u){const h=l[u],f=h.start,d=h.count;for(let p=f,g=f+d;p<g;p+=3)for(let v=0;v<3;v++){const m=s.getX(p+v),y=s.getX(p+(v+1)%3);i.fromBufferAttribute(o,m),a.fromBufferAttribute(o,y),MR(i,a,n)===!0&&(t.push(i.x,i.y,i.z),t.push(a.x,a.y,a.z))}}}else{const o=e.attributes.position;for(let s=0,l=o.count/3;s<l;s++)for(let u=0;u<3;u++){const c=3*s+u,h=3*s+(u+1)%3;i.fromBufferAttribute(o,c),a.fromBufferAttribute(o,h),MR(i,a,n)===!0&&(t.push(i.x,i.y,i.z),t.push(a.x,a.y,a.z))}}this.setAttribute("position",new Nn(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function MR(r,e,t){const n=`${r.x},${r.y},${r.z}-${e.x},${e.y},${e.z}`,i=`${e.x},${e.y},${e.z}-${r.x},${r.y},${r.z}`;return t.has(n)===!0||t.has(i)===!0?!1:(t.add(n),t.add(i),!0)}class Pv extends Da{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new nt(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=iC,this.normalScale=new Me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Fs extends Pv{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Me(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return hr(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(t){this.ior=(1+.4*t)/(1-.4*t)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new nt(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new nt(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new nt(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class Lb extends Da{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new nt(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new nt(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=iC,this.normalScale=new Me(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=nC,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}function wm(r,e,t){return!r||!t&&r.constructor===e?r:typeof e.BYTES_PER_ELEMENT=="number"?new e(r):Array.prototype.slice.call(r)}function YQ(r){return ArrayBuffer.isView(r)&&!(r instanceof DataView)}function qQ(r){function e(i,a){return r[i]-r[a]}const t=r.length,n=new Array(t);for(let i=0;i!==t;++i)n[i]=i;return n.sort(e),n}function CR(r,e,t){const n=r.length,i=new r.constructor(n);for(let a=0,o=0;o!==n;++a){const s=t[a]*e;for(let l=0;l!==e;++l)i[o++]=r[s+l]}return i}function Wz(r,e,t,n){let i=1,a=r[0];for(;a!==void 0&&a[n]===void 0;)a=r[i++];if(a===void 0)return;let o=a[n];if(o!==void 0)if(Array.isArray(o))do o=a[n],o!==void 0&&(e.push(a.time),t.push.apply(t,o)),a=r[i++];while(a!==void 0);else if(o.toArray!==void 0)do o=a[n],o!==void 0&&(e.push(a.time),o.toArray(t,t.length)),a=r[i++];while(a!==void 0);else do o=a[n],o!==void 0&&(e.push(a.time),t.push(o)),a=r[i++];while(a!==void 0)}class gg{constructor(e,t,n,i){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=i!==void 0?i:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,i=t[n],a=t[n-1];e:{t:{let o;n:{r:if(!(e<i)){for(let s=n+2;;){if(i===void 0){if(e<a)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===s)break;if(a=i,i=t[++n],e<i)break t}o=t.length;break n}if(!(e>=a)){const s=t[1];e<s&&(n=2,a=s);for(let l=n-2;;){if(a===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(n===l)break;if(i=a,a=t[--n-1],e>=a)break t}o=n,n=0;break n}break e}for(;n<o;){const s=n+o>>>1;e<t[s]?o=s:n=s+1}if(i=t[n],a=t[n-1],a===void 0)return this._cachedIndex=0,this.copySampleValue_(0);if(i===void 0)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,a,i)}return this.interpolate_(n,a,e,i)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,a=e*i;for(let o=0;o!==i;++o)t[o]=n[a+o];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class jQ extends gg{constructor(e,t,n,i){super(e,t,n,i),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:hP,endingEnd:hP}}intervalChanged_(e,t,n){const i=this.parameterPositions;let a=e-2,o=e+1,s=i[a],l=i[o];if(s===void 0)switch(this.getSettings_().endingStart){case fP:a=e,s=2*t-n;break;case dP:a=i.length-2,s=t+i[a]-i[a+1];break;default:a=e,s=n}if(l===void 0)switch(this.getSettings_().endingEnd){case fP:o=e,l=2*n-t;break;case dP:o=1,l=n+i[1]-i[0];break;default:o=e-1,l=t}const u=(n-t)*.5,c=this.valueSize;this._weightPrev=u/(t-s),this._weightNext=u/(l-n),this._offsetPrev=a*c,this._offsetNext=o*c}interpolate_(e,t,n,i){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=e*s,u=l-s,c=this._offsetPrev,h=this._offsetNext,f=this._weightPrev,d=this._weightNext,p=(n-t)/(i-t),g=p*p,v=g*p,m=-f*v+2*f*g-f*p,y=(1+f)*v+(-1.5-2*f)*g+(-.5+f)*p+1,_=(-1-d)*v+(1.5+d)*g+.5*p,x=d*v-d*g;for(let S=0;S!==s;++S)a[S]=m*o[c+S]+y*o[u+S]+_*o[l+S]+x*o[h+S];return a}}class KQ extends gg{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=e*s,u=l-s,c=(n-t)/(i-t),h=1-c;for(let f=0;f!==s;++f)a[f]=o[u+f]*h+o[l+f]*c;return a}}class ZQ extends gg{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e){return this.copySampleValue_(e-1)}}class Qo{constructor(e,t,n,i){if(e===void 0)throw new Error("THREE.KeyframeTrack: track name is undefined");if(t===void 0||t.length===0)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=wm(t,this.TimeBufferType),this.values=wm(n,this.ValueBufferType),this.setInterpolation(i||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:wm(e.times,Array),values:wm(e.values,Array)};const i=e.getInterpolation();i!==e.DefaultInterpolation&&(n.interpolation=i)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new ZQ(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new KQ(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new jQ(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case bv:t=this.InterpolantFactoryMethodDiscrete;break;case Gf:t=this.InterpolantFactoryMethodLinear;break;case Ex:t=this.InterpolantFactoryMethodSmooth;break}if(t===void 0){const n="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(this.createInterpolant===void 0)if(e!==this.DefaultInterpolation)this.setInterpolation(this.DefaultInterpolation);else throw new Error(n);return console.warn("THREE.KeyframeTrack:",n),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return bv;case this.InterpolantFactoryMethodLinear:return Gf;case this.InterpolantFactoryMethodSmooth:return Ex}}getValueSize(){return this.values.length/this.times.length}shift(e){if(e!==0){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]+=e}return this}scale(e){if(e!==1){const t=this.times;for(let n=0,i=t.length;n!==i;++n)t[n]*=e}return this}trim(e,t){const n=this.times,i=n.length;let a=0,o=i-1;for(;a!==i&&n[a]<e;)++a;for(;o!==-1&&n[o]>t;)--o;if(++o,a!==0||o!==i){a>=o&&(o=Math.max(o,1),a=o-1);const s=this.getValueSize();this.times=n.slice(a,o),this.values=this.values.slice(a*s,o*s)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,i=this.values,a=n.length;a===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let s=0;s!==a;s++){const l=n[s];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,s,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,s,l,o),e=!1;break}o=l}if(i!==void 0&&YQ(i))for(let s=0,l=i.length;s!==l;++s){const u=i[s];if(isNaN(u)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,s,u),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),n=this.getValueSize(),i=this.getInterpolation()===Ex,a=e.length-1;let o=1;for(let s=1;s<a;++s){let l=!1;const u=e[s],c=e[s+1];if(u!==c&&(s!==1||u!==e[0]))if(i)l=!0;else{const h=s*n,f=h-n,d=h+n;for(let p=0;p!==n;++p){const g=t[h+p];if(g!==t[f+p]||g!==t[d+p]){l=!0;break}}}if(l){if(s!==o){e[o]=e[s];const h=s*n,f=o*n;for(let d=0;d!==n;++d)t[f+d]=t[h+d]}++o}}if(a>0){e[o]=e[a];for(let s=a*n,l=o*n,u=0;u!==n;++u)t[l+u]=t[s+u];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*n)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),n=this.constructor,i=new n(this.name,e,t);return i.createInterpolant=this.createInterpolant,i}}Qo.prototype.TimeBufferType=Float32Array;Qo.prototype.ValueBufferType=Float32Array;Qo.prototype.DefaultInterpolation=Gf;class cd extends Qo{}cd.prototype.ValueTypeName="bool";cd.prototype.ValueBufferType=Array;cd.prototype.DefaultInterpolation=bv;cd.prototype.InterpolantFactoryMethodLinear=void 0;cd.prototype.InterpolantFactoryMethodSmooth=void 0;class $z extends Qo{}$z.prototype.ValueTypeName="color";class $f extends Qo{}$f.prototype.ValueTypeName="number";class QQ extends gg{constructor(e,t,n,i){super(e,t,n,i)}interpolate_(e,t,n,i){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=(n-t)/(i-t);let u=e*s;for(let c=u+s;u!==c;u+=4)ao.slerpFlat(a,0,o,u-s,o,u,l);return a}}class Fc extends Qo{InterpolantFactoryMethodLinear(e){return new QQ(this.times,this.values,this.getValueSize(),e)}}Fc.prototype.ValueTypeName="quaternion";Fc.prototype.DefaultInterpolation=Gf;Fc.prototype.InterpolantFactoryMethodSmooth=void 0;class hd extends Qo{}hd.prototype.ValueTypeName="string";hd.prototype.ValueBufferType=Array;hd.prototype.DefaultInterpolation=bv;hd.prototype.InterpolantFactoryMethodLinear=void 0;hd.prototype.InterpolantFactoryMethodSmooth=void 0;class Xf extends Qo{}Xf.prototype.ValueTypeName="vector";class JQ{constructor(e,t=-1,n,i=LX){this.name=e,this.tracks=n,this.duration=t,this.blendMode=i,this.uuid=Ra(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,i=1/(e.fps||1);for(let o=0,s=n.length;o!==s;++o)t.push(tJ(n[o]).scale(i));const a=new this(e.name,e.duration,t,e.blendMode);return a.uuid=e.uuid,a}static toJSON(e){const t=[],n=e.tracks,i={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let a=0,o=n.length;a!==o;++a)t.push(Qo.toJSON(n[a]));return i}static CreateFromMorphTargetSequence(e,t,n,i){const a=t.length,o=[];for(let s=0;s<a;s++){let l=[],u=[];l.push((s+a-1)%a,s,(s+1)%a),u.push(0,1,0);const c=qQ(l);l=CR(l,1,c),u=CR(u,1,c),!i&&l[0]===0&&(l.push(a),u.push(u[0])),o.push(new $f(".morphTargetInfluences["+t[s].name+"]",l,u).scale(1/n))}return new this(e,-1,o)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const i=e;n=i.geometry&&i.geometry.animations||i.animations}for(let i=0;i<n.length;i++)if(n[i].name===t)return n[i];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const i={},a=/^([\w-]*?)([\d]+)$/;for(let s=0,l=e.length;s<l;s++){const u=e[s],c=u.name.match(a);if(c&&c.length>1){const h=c[1];let f=i[h];f||(i[h]=f=[]),f.push(u)}}const o=[];for(const s in i)o.push(this.CreateFromMorphTargetSequence(s,i[s],t,n));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(h,f,d,p,g){if(d.length!==0){const v=[],m=[];Wz(d,v,m,p),v.length!==0&&g.push(new h(f,v,m))}},i=[],a=e.name||"default",o=e.fps||30,s=e.blendMode;let l=e.length||-1;const u=e.hierarchy||[];for(let h=0;h<u.length;h++){const f=u[h].keys;if(!(!f||f.length===0))if(f[0].morphTargets){const d={};let p;for(p=0;p<f.length;p++)if(f[p].morphTargets)for(let g=0;g<f[p].morphTargets.length;g++)d[f[p].morphTargets[g]]=-1;for(const g in d){const v=[],m=[];for(let y=0;y!==f[p].morphTargets.length;++y){const _=f[p];v.push(_.time),m.push(_.morphTarget===g?1:0)}i.push(new $f(".morphTargetInfluence["+g+"]",v,m))}l=d.length*o}else{const d=".bones["+t[h].name+"]";n(Xf,d+".position",f,"pos",i),n(Fc,d+".quaternion",f,"rot",i),n(Xf,d+".scale",f,"scl",i)}}return i.length===0?null:new this(a,l,i,s)}resetDuration(){const e=this.tracks;let t=0;for(let n=0,i=e.length;n!==i;++n){const a=this.tracks[n];t=Math.max(t,a.times[a.times.length-1])}return this.duration=t,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function eJ(r){switch(r.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return $f;case"vector":case"vector2":case"vector3":case"vector4":return Xf;case"color":return $z;case"quaternion":return Fc;case"bool":case"boolean":return cd;case"string":return hd}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+r)}function tJ(r){if(r.type===void 0)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const e=eJ(r.type);if(r.times===void 0){const t=[],n=[];Wz(r.keys,t,n,"value"),r.times=t,r.values=n}return e.parse!==void 0?e.parse(r):new e(r.name,r.times,r.values,r.interpolation)}const Sl={enabled:!1,files:{},add:function(r,e){this.enabled!==!1&&(this.files[r]=e)},get:function(r){if(this.enabled!==!1)return this.files[r]},remove:function(r){delete this.files[r]},clear:function(){this.files={}}};class Xz{constructor(e,t,n){const i=this;let a=!1,o=0,s=0,l;const u=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(c){s++,a===!1&&i.onStart!==void 0&&i.onStart(c,o,s),a=!0},this.itemEnd=function(c){o++,i.onProgress!==void 0&&i.onProgress(c,o,s),o===s&&(a=!1,i.onLoad!==void 0&&i.onLoad())},this.itemError=function(c){i.onError!==void 0&&i.onError(c)},this.resolveURL=function(c){return l?l(c):c},this.setURLModifier=function(c){return l=c,this},this.addHandler=function(c,h){return u.push(c,h),this},this.removeHandler=function(c){const h=u.indexOf(c);return h!==-1&&u.splice(h,2),this},this.getHandler=function(c){for(let h=0,f=u.length;h<f;h+=2){const d=u[h],p=u[h+1];if(d.global&&(d.lastIndex=0),d.test(c))return p}return null}}}const nJ=new Xz;class iu{constructor(e){this.manager=e!==void 0?e:nJ,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise(function(i,a){n.load(e,i,t,a)})}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}iu.DEFAULT_MATERIAL_NAME="__DEFAULT";const ss={};class rJ extends Error{constructor(e,t){super(e),this.response=t}}class Rv extends iu{constructor(e){super(e)}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=Sl.get(e);if(a!==void 0)return this.manager.itemStart(e),setTimeout(()=>{t&&t(a),this.manager.itemEnd(e)},0),a;if(ss[e]!==void 0){ss[e].push({onLoad:t,onProgress:n,onError:i});return}ss[e]=[],ss[e].push({onLoad:t,onProgress:n,onError:i});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,l=this.responseType;fetch(o).then(u=>{if(u.status===200||u.status===0){if(u.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream=="undefined"||u.body===void 0||u.body.getReader===void 0)return u;const c=ss[e],h=u.body.getReader(),f=u.headers.get("Content-Length")||u.headers.get("X-File-Size"),d=f?parseInt(f):0,p=d!==0;let g=0;const v=new ReadableStream({start(m){y();function y(){h.read().then(({done:_,value:x})=>{if(_)m.close();else{g+=x.byteLength;const S=new ProgressEvent("progress",{lengthComputable:p,loaded:g,total:d});for(let A=0,w=c.length;A<w;A++){const M=c[A];M.onProgress&&M.onProgress(S)}m.enqueue(x),y()}})}}});return new Response(v)}else throw new rJ(`fetch for "${u.url}" responded with ${u.status}: ${u.statusText}`,u)}).then(u=>{switch(l){case"arraybuffer":return u.arrayBuffer();case"blob":return u.blob();case"document":return u.text().then(c=>new DOMParser().parseFromString(c,s));case"json":return u.json();default:if(s===void 0)return u.text();{const h=/charset="?([^;"\s]*)"?/i.exec(s),f=h&&h[1]?h[1].toLowerCase():void 0,d=new TextDecoder(f);return u.arrayBuffer().then(p=>d.decode(p))}}}).then(u=>{Sl.add(e,u);const c=ss[e];delete ss[e];for(let h=0,f=c.length;h<f;h++){const d=c[h];d.onLoad&&d.onLoad(u)}}).catch(u=>{const c=ss[e];if(c===void 0)throw this.manager.itemError(e),u;delete ss[e];for(let h=0,f=c.length;h<f;h++){const d=c[h];d.onError&&d.onError(u)}this.manager.itemError(e)}).finally(()=>{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class iJ extends iu{constructor(e){super(e)}load(e,t,n,i){this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=Sl.get(e);if(o!==void 0)return a.manager.itemStart(e),setTimeout(function(){t&&t(o),a.manager.itemEnd(e)},0),o;const s=Tv("img");function l(){c(),Sl.add(e,this),t&&t(this),a.manager.itemEnd(e)}function u(h){c(),i&&i(h),a.manager.itemError(e),a.manager.itemEnd(e)}function c(){s.removeEventListener("load",l,!1),s.removeEventListener("error",u,!1)}return s.addEventListener("load",l,!1),s.addEventListener("error",u,!1),e.slice(0,5)!=="data:"&&this.crossOrigin!==void 0&&(s.crossOrigin=this.crossOrigin),a.manager.itemStart(e),s.src=e,s}}class AC extends iu{constructor(e){super(e)}load(e,t,n,i){const a=new mr,o=new iJ(this.manager);return o.setCrossOrigin(this.crossOrigin),o.setPath(this.path),o.load(e,function(s){a.image=s,a.needsUpdate=!0,t!==void 0&&t(a)},n,i),a}}class i1 extends bn{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new nt(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,this.groundColor!==void 0&&(t.object.groundColor=this.groundColor.getHex()),this.distance!==void 0&&(t.object.distance=this.distance),this.angle!==void 0&&(t.object.angle=this.angle),this.decay!==void 0&&(t.object.decay=this.decay),this.penumbra!==void 0&&(t.object.penumbra=this.penumbra),this.shadow!==void 0&&(t.object.shadow=this.shadow.toJSON()),t}}const aS=new Mt,ER=new X,LR=new X;class wC{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Me(512,512),this.map=null,this.mapPass=null,this.matrix=new Mt,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new cC,this._frameExtents=new Me(1,1),this._viewportCount=1,this._viewports=[new an(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;ER.setFromMatrixPosition(e.matrixWorld),t.position.copy(ER),LR.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(LR),t.updateMatrixWorld(),aS.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(aS),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(aS)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return new this.constructor().copy(this)}toJSON(){const e={};return this.bias!==0&&(e.bias=this.bias),this.normalBias!==0&&(e.normalBias=this.normalBias),this.radius!==1&&(e.radius=this.radius),(this.mapSize.x!==512||this.mapSize.y!==512)&&(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class aJ extends wC{constructor(){super(new Qr(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=Hf*2*e.angle*this.focus,i=this.mapSize.width/this.mapSize.height,a=e.distance||t.far;(n!==t.fov||i!==t.aspect||a!==t.far)&&(t.fov=n,t.aspect=i,t.far=a,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class oJ extends i1{constructor(e,t,n=0,i=Math.PI/3,a=0,o=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(bn.DEFAULT_UP),this.updateMatrix(),this.target=new bn,this.distance=n,this.angle=i,this.penumbra=a,this.decay=o,this.map=null,this.shadow=new aJ}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const PR=new Mt,Gd=new X,oS=new X;class sJ extends wC{constructor(){super(new Qr(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Me(4,2),this._viewportCount=6,this._viewports=[new an(2,1,1,1),new an(0,1,1,1),new an(3,1,1,1),new an(1,1,1,1),new an(3,0,1,1),new an(1,0,1,1)],this._cubeDirections=[new X(1,0,0),new X(-1,0,0),new X(0,0,1),new X(0,0,-1),new X(0,1,0),new X(0,-1,0)],this._cubeUps=[new X(0,1,0),new X(0,1,0),new X(0,1,0),new X(0,1,0),new X(0,0,1),new X(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,i=this.matrix,a=e.distance||n.far;a!==n.far&&(n.far=a,n.updateProjectionMatrix()),Gd.setFromMatrixPosition(e.matrixWorld),n.position.copy(Gd),oS.copy(n.position),oS.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(oS),n.updateMatrixWorld(),i.makeTranslation(-Gd.x,-Gd.y,-Gd.z),PR.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(PR)}}class Yz extends i1{constructor(e,t,n=0,i=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=i,this.shadow=new sJ}get power(){return this.intensity*4*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class lJ extends wC{constructor(){super(new e1(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class B0 extends i1{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(bn.DEFAULT_UP),this.updateMatrix(),this.target=new bn,this.shadow=new lJ}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class qz extends i1{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class Kp{static decodeText(e){if(typeof TextDecoder!="undefined")return new TextDecoder().decode(e);let t="";for(let n=0,i=e.length;n<i;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(n){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return t===-1?"./":e.slice(0,t+1)}static resolveURL(e,t){return typeof e!="string"||e===""?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class uJ extends wn{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class cJ extends iu{constructor(e){super(e),this.isImageBitmapLoader=!0,typeof createImageBitmap=="undefined"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch=="undefined"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,i){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const a=this,o=Sl.get(e);if(o!==void 0){if(a.manager.itemStart(e),o.then){o.then(u=>{t&&t(u),a.manager.itemEnd(e)}).catch(u=>{i&&i(u)});return}return setTimeout(function(){t&&t(o),a.manager.itemEnd(e)},0),o}const s={};s.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",s.headers=this.requestHeader;const l=fetch(e,s).then(function(u){return u.blob()}).then(function(u){return createImageBitmap(u,Object.assign(a.options,{colorSpaceConversion:"none"}))}).then(function(u){return Sl.add(e,u),t&&t(u),a.manager.itemEnd(e),u}).catch(function(u){i&&i(u),Sl.remove(e),a.manager.itemError(e),a.manager.itemEnd(e)});Sl.add(e,l),a.manager.itemStart(e)}}class hJ{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=RR(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=RR();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function RR(){return(typeof performance=="undefined"?Date:performance).now()}const bC="\\[\\]\\.:\\/",fJ=new RegExp("["+bC+"]","g"),TC="[^"+bC+"]",dJ="[^"+bC.replace("\\.","")+"]",pJ=/((?:WC+[\/:])*)/.source.replace("WC",TC),vJ=/(WCOD+)?/.source.replace("WCOD",dJ),gJ=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",TC),mJ=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",TC),yJ=new RegExp("^"+pJ+vJ+gJ+mJ+"$"),_J=["material","materials","bones","map"];class xJ{constructor(e,t,n){const i=n||hn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,i)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,i=this._bindings[n];i!==void 0&&i.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let i=this._targetGroup.nCachedObjects_,a=n.length;i!==a;++i)n[i].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}}class hn{constructor(e,t,n){this.path=t,this.parsedPath=n||hn.parseTrackName(t),this.node=hn.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new hn.Composite(e,t,n):new hn(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(fJ,"")}static parseTrackName(e){const t=yJ.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},i=n.nodeName&&n.nodeName.lastIndexOf(".");if(i!==void 0&&i!==-1){const a=n.nodeName.substring(i+1);_J.indexOf(a)!==-1&&(n.nodeName=n.nodeName.substring(0,i),n.objectName=a)}if(n.propertyName===null||n.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(n!==void 0)return n}if(e.children){const n=function(a){for(let o=0;o<a.length;o++){const s=a[o];if(s.name===t||s.uuid===t)return s;const l=n(s.children);if(l)return l}return null},i=n(e.children);if(i)return i}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)e[t++]=n[i]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)n[i]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)n[i]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let i=0,a=n.length;i!==a;++i)n[i]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,i=t.propertyName;let a=t.propertyIndex;if(e||(e=hn.findNode(this.rootNode,t.nodeName),this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(n){let u=t.objectIndex;switch(n){case"materials":if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}e=e.material.materials;break;case"bones":if(!e.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}e=e.skeleton.bones;for(let c=0;c<e.length;c++)if(e[c].name===u){u=c;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!e.material.map){console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);return}e=e.material.map;break;default:if(e[n]===void 0){console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);return}e=e[n]}if(u!==void 0){if(e[u]===void 0){console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);return}e=e[u]}}const o=e[i];if(o===void 0){const u=t.nodeName;console.error("THREE.PropertyBinding: Trying to update property for track: "+u+"."+i+" but it wasn't found.",e);return}let s=this.Versioning.None;this.targetObject=e,e.needsUpdate!==void 0?s=this.Versioning.NeedsUpdate:e.matrixWorldNeedsUpdate!==void 0&&(s=this.Versioning.MatrixWorldNeedsUpdate);let l=this.BindingType.Direct;if(a!==void 0){if(i==="morphTargetInfluences"){if(!e.geometry){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);return}if(!e.geometry.morphAttributes){console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);return}e.morphTargetDictionary[a]!==void 0&&(a=e.morphTargetDictionary[a])}l=this.BindingType.ArrayElement,this.resolvedProperty=o,this.propertyIndex=a}else o.fromArray!==void 0&&o.toArray!==void 0?(l=this.BindingType.HasFromToArray,this.resolvedProperty=o):Array.isArray(o)?(l=this.BindingType.EntireArray,this.resolvedProperty=o):this.propertyName=i;this.getValue=this.GetterByBindingType[l],this.setValue=this.SetterByBindingTypeAndVersioning[l][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}hn.Composite=xJ;hn.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3};hn.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2};hn.prototype.GetterByBindingType=[hn.prototype._getValue_direct,hn.prototype._getValue_array,hn.prototype._getValue_arrayElement,hn.prototype._getValue_toArray];hn.prototype.SetterByBindingTypeAndVersioning=[[hn.prototype._setValue_direct,hn.prototype._setValue_direct_setNeedsUpdate,hn.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[hn.prototype._setValue_array,hn.prototype._setValue_array_setNeedsUpdate,hn.prototype._setValue_array_setMatrixWorldNeedsUpdate],[hn.prototype._setValue_arrayElement,hn.prototype._setValue_arrayElement_setNeedsUpdate,hn.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[hn.prototype._setValue_fromArray,hn.prototype._setValue_fromArray_setNeedsUpdate,hn.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class Pb extends pC{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class SJ{constructor(e,t,n=0,i=1/0){this.ray=new sd(e,t),this.near=n,this.far=i,this.camera=null,this.layers=new lC,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(this.ray.origin.set(e.x,e.y,(t.near+t.far)/(t.near-t.far)).unproject(t),this.ray.direction.set(0,0,-1).transformDirection(t.matrixWorld),this.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return Rb(e,this,n,t),n.sort(DR),n}intersectObjects(e,t=!0,n=[]){for(let i=0,a=e.length;i<a;i++)Rb(e[i],this,n,t);return n.sort(DR),n}}function DR(r,e){return r.distance-e.distance}function Rb(r,e,t,n){if(r.layers.test(e.layers)&&r.raycast(e,t),n===!0){const i=r.children;for(let a=0,o=i.length;a<o;a++)Rb(i[a],e,t,!0)}}class IR{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){return this.phi=Math.max(1e-6,Math.min(Math.PI-1e-6,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),this.radius===0?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(hr(t/this.radius,-1,1))),this}clone(){return new this.constructor().copy(this)}}const NR=new X,bm=new X;class AJ{constructor(e=new X,t=new X){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){NR.subVectors(e,this.start),bm.subVectors(this.end,this.start);const n=bm.dot(bm);let a=bm.dot(NR)/n;return t&&(a=hr(a,0,1)),a}closestPointToPoint(e,t,n){const i=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(i).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}class wJ extends gC{constructor(e=10,t=10,n=4473924,i=8947848){n=new nt(n),i=new nt(i);const a=t/2,o=e/t,s=e/2,l=[],u=[];for(let f=0,d=0,p=-s;f<=t;f++,p+=o){l.push(-s,0,p,s,0,p),l.push(p,0,-s,p,0,s);const g=f===a?n:i;g.toArray(u,d),d+=3,g.toArray(u,d),d+=3,g.toArray(u,d),d+=3,g.toArray(u,d),d+=3}const c=new wn;c.setAttribute("position",new Nn(l,3)),c.setAttribute("color",new Nn(u,3));const h=new ys({vertexColors:!0,toneMapped:!1});super(c,h),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class jz extends gC{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],i=new wn;i.setAttribute("position",new Nn(t,3)),i.setAttribute("color",new Nn(n,3));const a=new ys({vertexColors:!0,toneMapped:!1});super(i,a),this.type="AxesHelper"}setColors(e,t,n){const i=new nt,a=this.geometry.attributes.color.array;return i.set(e),i.toArray(a,0),i.toArray(a,3),i.set(t),i.toArray(a,6),i.toArray(a,9),i.set(n),i.toArray(a,12),i.toArray(a,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}typeof __THREE_DEVTOOLS__!="undefined"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:tC}}));typeof window!="undefined"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=tC);function bJ(r){let e=null,t=!1,n=!1;function i(){!t||n||(r(),e=requestAnimationFrame(i))}function a(){t||(t=!0,i())}function o(){t&&(t=!1,n=!0,cancelAnimationFrame(e))}function s(){!t&&n&&(t=!0,n=!1,i())}return{start:a,pause:o,resume:s,isActive:()=>t}}class a1{constructor(){this.events=new Map}on(e,t){let n=this.events.get(e);n||(n=new Set,this.events.set(e,n)),n.add(t)}off(e,t){const n=this.events.get(e);n&&(t?n.delete(t):this.events.delete(e))}emit(e,...t){const n=this.events.get(e);n&&n.forEach(i=>{i(...t)})}once(e,t){const n=(...i)=>{t(...i),this.off(e,n)};this.on(e,n)}}class TJ extends a1{constructor({canvas:e}){super(),this.canvas=e,this.pixelRatio=2,this.init(),window.addEventListener("resize",()=>{this.init(),this.emit("resize")})}init(){var t;const e=((t=this.canvas)==null?void 0:t.parentNode)||this.canvas||document.documentElement;this.width=e.offsetWidth||window.innerWidth||1,this.height=e.offsetHeight||window.innerHeight||1,this.pixelRatio=this.pixelRatio||Math.min(window.devicePixelRatio,2)}destroy(){this.off("resize")}}class MJ extends a1{constructor(){super(),this.start=Date.now(),this.current=this.start,this.elapsed=0,this.delta=16,this.clock=new hJ,this.raf=bJ(()=>this.tick()),this.raf.start()}tick(){const e=Date.now();this.delta=e-this.current,this.current=e,this.elapsed=this.current-this.start;const t=this.clock.getDelta(),n=this.clock.getElapsedTime();this.emit("tick",t,n)}destroy(){this.pause(),this.off("tick")}pause(){this.raf.pause()}resume(){this.raf.resume()}isActive(){this.raf.isActive()}}function Kz(r,e=!1){const t=r[0].index!==null,n=new Set(Object.keys(r[0].attributes)),i=new Set(Object.keys(r[0].morphAttributes)),a={},o={},s=r[0].morphTargetsRelative,l=new wn;let u=0;for(let c=0;c<r.length;++c){const h=r[c];let f=0;if(t!==(h.index!==null))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". All geometries must have compatible attributes; make sure index attribute exists among all geometries, or in none of them."),null;for(const d in h.attributes){if(!n.has(d))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+'. All geometries must have compatible attributes; make sure "'+d+'" attribute exists among all geometries, or in none of them.'),null;a[d]===void 0&&(a[d]=[]),a[d].push(h.attributes[d]),f++}if(f!==n.size)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". Make sure all geometries have the same number of attributes."),null;if(s!==h.morphTargetsRelative)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphTargetsRelative must be consistent throughout all geometries."),null;for(const d in h.morphAttributes){if(!i.has(d))return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". .morphAttributes must be consistent throughout all geometries."),null;o[d]===void 0&&(o[d]=[]),o[d].push(h.morphAttributes[d])}if(e){let d;if(t)d=h.index.count;else if(h.attributes.position!==void 0)d=h.attributes.position.count;else return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed with geometry at index "+c+". The geometry must have either an index or a position attribute"),null;l.addGroup(u,d,c),u+=d}}if(t){let c=0;const h=[];for(let f=0;f<r.length;++f){const d=r[f].index;for(let p=0;p<d.count;++p)h.push(d.getX(p)+c);c+=r[f].attributes.position.count}l.setIndex(h)}for(const c in a){const h=kR(a[c]);if(!h)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" attribute."),null;l.setAttribute(c,h)}for(const c in o){const h=o[c][0].length;if(h===0)break;l.morphAttributes=l.morphAttributes||{},l.morphAttributes[c]=[];for(let f=0;f<h;++f){const d=[];for(let g=0;g<o[c].length;++g)d.push(o[c][g][f]);const p=kR(d);if(!p)return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the "+c+" morphAttribute."),null;l.morphAttributes[c].push(p)}}return l}function kR(r){let e,t,n,i=-1,a=0;for(let u=0;u<r.length;++u){const c=r[u];if(e===void 0&&(e=c.array.constructor),e!==c.array.constructor)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.array must be of consistent array types across matching attributes."),null;if(t===void 0&&(t=c.itemSize),t!==c.itemSize)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.itemSize must be consistent across matching attributes."),null;if(n===void 0&&(n=c.normalized),n!==c.normalized)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.normalized must be consistent across matching attributes."),null;if(i===-1&&(i=c.gpuType),i!==c.gpuType)return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."),null;a+=c.count*t}const o=new e(a),s=new Gn(o,t,n);let l=0;for(let u=0;u<r.length;++u){const c=r[u];if(c.isInterleavedBufferAttribute){const h=l/t;for(let f=0,d=c.count;f<d;f++)for(let p=0;p<t;p++){const g=c.getComponent(f,p);s.setComponent(f+h,p,g)}}else o.set(c.array,l);l+=c.count*t}return i!==void 0&&(s.gpuType=i),s}function OR(r,e){if(e===PX)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),r;if(e===_b||e===fz){let t=r.getIndex();if(t===null){const o=[],s=r.getAttribute("position");if(s!==void 0){for(let l=0;l<s.count;l++)o.push(l);r.setIndex(o),t=r.getIndex()}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),r}const n=t.count-2,i=[];if(e===_b)for(let o=1;o<=n;o++)i.push(t.getX(0)),i.push(t.getX(o)),i.push(t.getX(o+1));else for(let o=0;o<n;o++)o%2===0?(i.push(t.getX(o)),i.push(t.getX(o+1)),i.push(t.getX(o+2))):(i.push(t.getX(o+2)),i.push(t.getX(o+1)),i.push(t.getX(o)));i.length/3!==n&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const a=r.clone();return a.setIndex(i),a.clearGroups(),a}else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",e),r}class CJ extends iu{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(t){return new DJ(t)}),this.register(function(t){return new VJ(t)}),this.register(function(t){return new GJ(t)}),this.register(function(t){return new HJ(t)}),this.register(function(t){return new NJ(t)}),this.register(function(t){return new kJ(t)}),this.register(function(t){return new OJ(t)}),this.register(function(t){return new FJ(t)}),this.register(function(t){return new RJ(t)}),this.register(function(t){return new BJ(t)}),this.register(function(t){return new IJ(t)}),this.register(function(t){return new UJ(t)}),this.register(function(t){return new zJ(t)}),this.register(function(t){return new LJ(t)}),this.register(function(t){return new WJ(t)}),this.register(function(t){return new $J(t)})}load(e,t,n,i){const a=this;let o;if(this.resourcePath!=="")o=this.resourcePath;else if(this.path!==""){const u=Kp.extractUrlBase(e);o=Kp.resolveURL(u,this.path)}else o=Kp.extractUrlBase(e);this.manager.itemStart(e);const s=function(u){i?i(u):console.error(u),a.manager.itemError(e),a.manager.itemEnd(e)},l=new Rv(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,function(u){try{a.parse(u,o,function(c){t(c),a.manager.itemEnd(e)},s)}catch(c){s(c)}},n,s)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return this.pluginCallbacks.indexOf(e)===-1&&this.pluginCallbacks.push(e),this}unregister(e){return this.pluginCallbacks.indexOf(e)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let a;const o={},s={},l=new TextDecoder;if(typeof e=="string")a=JSON.parse(e);else if(e instanceof ArrayBuffer)if(l.decode(new Uint8Array(e,0,4))===Zz){try{o[Yt.KHR_BINARY_GLTF]=new XJ(e)}catch(h){i&&i(h);return}a=JSON.parse(o[Yt.KHR_BINARY_GLTF].content)}else a=JSON.parse(l.decode(e));else a=e;if(a.asset===void 0||a.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const u=new aee(a,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let c=0;c<this.pluginCallbacks.length;c++){const h=this.pluginCallbacks[c](u);h.name||console.error("THREE.GLTFLoader: Invalid plugin found: missing name"),s[h.name]=h,o[h.name]=!0}if(a.extensionsUsed)for(let c=0;c<a.extensionsUsed.length;++c){const h=a.extensionsUsed[c],f=a.extensionsRequired||[];switch(h){case Yt.KHR_MATERIALS_UNLIT:o[h]=new PJ;break;case Yt.KHR_DRACO_MESH_COMPRESSION:o[h]=new YJ(a,this.dracoLoader);break;case Yt.KHR_TEXTURE_TRANSFORM:o[h]=new qJ;break;case Yt.KHR_MESH_QUANTIZATION:o[h]=new jJ;break;default:f.indexOf(h)>=0&&s[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}u.setExtensions(o),u.setPlugins(s),u.parse(n,i)}parseAsync(e,t){const n=this;return new Promise(function(i,a){n.parse(e,t,i,a)})}}function EJ(){let r={};return{get:function(e){return r[e]},add:function(e,t){r[e]=t},remove:function(e){delete r[e]},removeAll:function(){r={}}}}const Yt={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_MATERIALS_BUMP:"EXT_materials_bump",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class LJ{constructor(e){this.parser=e,this.name=Yt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,i=t.length;n<i;n++){const a=t[n];a.extensions&&a.extensions[this.name]&&a.extensions[this.name].light!==void 0&&e._addNodeRef(this.cache,a.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let i=t.cache.get(n);if(i)return i;const a=t.json,l=((a.extensions&&a.extensions[this.name]||{}).lights||[])[e];let u;const c=new nt(16777215);l.color!==void 0&&c.setRGB(l.color[0],l.color[1],l.color[2],yr);const h=l.range!==void 0?l.range:0;switch(l.type){case"directional":u=new B0(c),u.target.position.set(0,0,-1),u.add(u.target);break;case"point":u=new Yz(c),u.distance=h;break;case"spot":u=new oJ(c),u.distance=h,l.spot=l.spot||{},l.spot.innerConeAngle=l.spot.innerConeAngle!==void 0?l.spot.innerConeAngle:0,l.spot.outerConeAngle=l.spot.outerConeAngle!==void 0?l.spot.outerConeAngle:Math.PI/4,u.angle=l.spot.outerConeAngle,u.penumbra=1-l.spot.innerConeAngle/l.spot.outerConeAngle,u.target.position.set(0,0,-1),u.add(u.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+l.type)}return u.position.set(0,0,0),u.decay=2,hl(u,l),l.intensity!==void 0&&(u.intensity=l.intensity),u.name=t.createUniqueName(l.name||"light_"+e),i=Promise.resolve(u),t.cache.add(n,i),i}getDependency(e,t){if(e==="light")return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,a=n.json.nodes[e],s=(a.extensions&&a.extensions[this.name]||{}).light;return s===void 0?null:this._loadLight(s).then(function(l){return n._getNodeRef(t.cache,s,l)})}}class PJ{constructor(){this.name=Yt.KHR_MATERIALS_UNLIT}getMaterialType(){return Pn}extendParams(e,t,n){const i=[];e.color=new nt(1,1,1),e.opacity=1;const a=t.pbrMetallicRoughness;if(a){if(Array.isArray(a.baseColorFactor)){const o=a.baseColorFactor;e.color.setRGB(o[0],o[1],o[2],yr),e.opacity=o[3]}a.baseColorTexture!==void 0&&i.push(n.assignTexture(e,"map",a.baseColorTexture,dn))}return Promise.all(i)}}class RJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=i.extensions[this.name].emissiveStrength;return a!==void 0&&(t.emissiveIntensity=a),Promise.resolve()}}class DJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];if(o.clearcoatFactor!==void 0&&(t.clearcoat=o.clearcoatFactor),o.clearcoatTexture!==void 0&&a.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),o.clearcoatRoughnessFactor!==void 0&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),o.clearcoatRoughnessTexture!==void 0&&a.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),o.clearcoatNormalTexture!==void 0&&(a.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),o.clearcoatNormalTexture.scale!==void 0)){const s=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Me(s,s)}return Promise.all(a)}}class IJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];return o.iridescenceFactor!==void 0&&(t.iridescence=o.iridescenceFactor),o.iridescenceTexture!==void 0&&a.push(n.assignTexture(t,"iridescenceMap",o.iridescenceTexture)),o.iridescenceIor!==void 0&&(t.iridescenceIOR=o.iridescenceIor),t.iridescenceThicknessRange===void 0&&(t.iridescenceThicknessRange=[100,400]),o.iridescenceThicknessMinimum!==void 0&&(t.iridescenceThicknessRange[0]=o.iridescenceThicknessMinimum),o.iridescenceThicknessMaximum!==void 0&&(t.iridescenceThicknessRange[1]=o.iridescenceThicknessMaximum),o.iridescenceThicknessTexture!==void 0&&a.push(n.assignTexture(t,"iridescenceThicknessMap",o.iridescenceThicknessTexture)),Promise.all(a)}}class NJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_SHEEN}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[];t.sheenColor=new nt(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=i.extensions[this.name];if(o.sheenColorFactor!==void 0){const s=o.sheenColorFactor;t.sheenColor.setRGB(s[0],s[1],s[2],yr)}return o.sheenRoughnessFactor!==void 0&&(t.sheenRoughness=o.sheenRoughnessFactor),o.sheenColorTexture!==void 0&&a.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,dn)),o.sheenRoughnessTexture!==void 0&&a.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(a)}}class kJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];return o.transmissionFactor!==void 0&&(t.transmission=o.transmissionFactor),o.transmissionTexture!==void 0&&a.push(n.assignTexture(t,"transmissionMap",o.transmissionTexture)),Promise.all(a)}}class OJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_VOLUME}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];t.thickness=o.thicknessFactor!==void 0?o.thicknessFactor:0,o.thicknessTexture!==void 0&&a.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const s=o.attenuationColor||[1,1,1];return t.attenuationColor=new nt().setRGB(s[0],s[1],s[2],yr),Promise.all(a)}}class FJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_IOR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const i=this.parser.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=i.extensions[this.name];return t.ior=a.ior!==void 0?a.ior:1.5,Promise.resolve()}}class BJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_SPECULAR}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];t.specularIntensity=o.specularFactor!==void 0?o.specularFactor:1,o.specularTexture!==void 0&&a.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const s=o.specularColorFactor||[1,1,1];return t.specularColor=new nt().setRGB(s[0],s[1],s[2],yr),o.specularColorTexture!==void 0&&a.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,dn)),Promise.all(a)}}class zJ{constructor(e){this.parser=e,this.name=Yt.EXT_MATERIALS_BUMP}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];return t.bumpScale=o.bumpFactor!==void 0?o.bumpFactor:1,o.bumpTexture!==void 0&&a.push(n.assignTexture(t,"bumpMap",o.bumpTexture)),Promise.all(a)}}class UJ{constructor(e){this.parser=e,this.name=Yt.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const n=this.parser.json.materials[e];return!n.extensions||!n.extensions[this.name]?null:Fs}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];return o.anisotropyStrength!==void 0&&(t.anisotropy=o.anisotropyStrength),o.anisotropyRotation!==void 0&&(t.anisotropyRotation=o.anisotropyRotation),o.anisotropyTexture!==void 0&&a.push(n.assignTexture(t,"anisotropyMap",o.anisotropyTexture)),Promise.all(a)}}class VJ{constructor(e){this.parser=e,this.name=Yt.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,i=n.textures[e];if(!i.extensions||!i.extensions[this.name])return null;const a=i.extensions[this.name],o=t.options.ktx2Loader;if(!o){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,a.source,o)}}class GJ{constructor(e){this.parser=e,this.name=Yt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,a=i.textures[e];if(!a.extensions||!a.extensions[t])return null;const o=a.extensions[t],s=i.images[o.source];let l=n.textureLoader;if(s.uri){const u=n.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,o.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class HJ{constructor(e){this.parser=e,this.name=Yt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,i=n.json,a=i.textures[e];if(!a.extensions||!a.extensions[t])return null;const o=a.extensions[t],s=i.images[o.source];let l=n.textureLoader;if(s.uri){const u=n.options.manager.getHandler(s.uri);u!==null&&(l=u)}return this.detectSupport().then(function(u){if(u)return n.loadTextureImage(e,o.source,l);if(i.extensionsRequired&&i.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(t.height===1)}})),this.isSupported}}class WJ{constructor(e){this.name=Yt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const i=n.extensions[this.name],a=this.parser.getDependency("buffer",i.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return a.then(function(s){const l=i.byteOffset||0,u=i.byteLength||0,c=i.count,h=i.byteStride,f=new Uint8Array(s,l,u);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(c,h,f,i.mode,i.filter).then(function(d){return d.buffer}):o.ready.then(function(){const d=new ArrayBuffer(c*h);return o.decodeGltfBuffer(new Uint8Array(d),c,h,f,i.mode,i.filter),d})})}else return null}}class $J{constructor(e){this.name=Yt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||n.mesh===void 0)return null;const i=t.meshes[n.mesh];for(const u of i.primitives)if(u.mode!==ga.TRIANGLES&&u.mode!==ga.TRIANGLE_STRIP&&u.mode!==ga.TRIANGLE_FAN&&u.mode!==void 0)return null;const o=n.extensions[this.name].attributes,s=[],l={};for(const u in o)s.push(this.parser.getDependency("accessor",o[u]).then(c=>(l[u]=c,l[u])));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then(u=>{const c=u.pop(),h=c.isGroup?c.children:[c],f=u[0].count,d=[];for(const p of h){const g=new Mt,v=new X,m=new ao,y=new X(1,1,1),_=new pQ(p.geometry,p.material,f);for(let x=0;x<f;x++)l.TRANSLATION&&v.fromBufferAttribute(l.TRANSLATION,x),l.ROTATION&&m.fromBufferAttribute(l.ROTATION,x),l.SCALE&&y.fromBufferAttribute(l.SCALE,x),_.setMatrixAt(x,g.compose(v,m,y));for(const x in l)if(x==="_COLOR_0"){const S=l[x];_.instanceColor=new Tb(S.array,S.itemSize,S.normalized)}else x!=="TRANSLATION"&&x!=="ROTATION"&&x!=="SCALE"&&p.geometry.setAttribute(x,l[x]);bn.prototype.copy.call(_,p),this.parser.assignFinalMaterial(_),d.push(_)}return c.isGroup?(c.clear(),c.add(...d),c):d[0]}))}}const Zz="glTF",Hd=12,FR={JSON:1313821514,BIN:5130562};class XJ{constructor(e){this.name=Yt.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,Hd),n=new TextDecoder;if(this.header={magic:n.decode(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==Zz)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const i=this.header.length-Hd,a=new DataView(e,Hd);let o=0;for(;o<i;){const s=a.getUint32(o,!0);o+=4;const l=a.getUint32(o,!0);if(o+=4,l===FR.JSON){const u=new Uint8Array(e,Hd+o,s);this.content=n.decode(u)}else if(l===FR.BIN){const u=Hd+o;this.body=e.slice(u,u+s)}o+=s}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class YJ{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Yt.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,i=this.dracoLoader,a=e.extensions[this.name].bufferView,o=e.extensions[this.name].attributes,s={},l={},u={};for(const c in o){const h=Db[c]||c.toLowerCase();s[h]=o[c]}for(const c in e.attributes){const h=Db[c]||c.toLowerCase();if(o[c]!==void 0){const f=n.accessors[e.attributes[c]],d=wf[f.componentType];u[h]=d.name,l[h]=f.normalized===!0}}return t.getDependency("bufferView",a).then(function(c){return new Promise(function(h,f){i.decodeDracoFile(c,function(d){for(const p in d.attributes){const g=d.attributes[p],v=l[p];v!==void 0&&(g.normalized=v)}h(d)},s,u,yr,f)})})}}class qJ{constructor(){this.name=Yt.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return(t.texCoord===void 0||t.texCoord===e.channel)&&t.offset===void 0&&t.rotation===void 0&&t.scale===void 0||(e=e.clone(),t.texCoord!==void 0&&(e.channel=t.texCoord),t.offset!==void 0&&e.offset.fromArray(t.offset),t.rotation!==void 0&&(e.rotation=t.rotation),t.scale!==void 0&&e.repeat.fromArray(t.scale),e.needsUpdate=!0),e}}class jJ{constructor(){this.name=Yt.KHR_MESH_QUANTIZATION}}class Qz extends gg{constructor(e,t,n,i){super(e,t,n,i)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,i=this.valueSize,a=e*i*3+i;for(let o=0;o!==i;o++)t[o]=n[a+o];return t}interpolate_(e,t,n,i){const a=this.resultBuffer,o=this.sampleValues,s=this.valueSize,l=s*2,u=s*3,c=i-t,h=(n-t)/c,f=h*h,d=f*h,p=e*u,g=p-u,v=-2*d+3*f,m=d-f,y=1-v,_=m-f+h;for(let x=0;x!==s;x++){const S=o[g+x+s],A=o[g+x+l]*c,w=o[p+x+s],M=o[p+x]*c;a[x]=y*S+_*A+v*w+m*M}return a}}const KJ=new ao;class ZJ extends Qz{interpolate_(e,t,n,i){const a=super.interpolate_(e,t,n,i);return KJ.fromArray(a).normalize().toArray(a),a}}const ga={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},wf={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},BR={9728:vr,9729:lr,9984:yb,9985:$y,9986:Qh,9987:gs},zR={33071:ti,33648:P0,10497:jr},sS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Db={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},qs={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},QJ={CUBICSPLINE:void 0,LINEAR:Gf,STEP:bv},lS={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function JJ(r){return r.DefaultMaterial===void 0&&(r.DefaultMaterial=new Pv({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Es})),r.DefaultMaterial}function mu(r,e,t){for(const n in t.extensions)r[n]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[n]=t.extensions[n])}function hl(r,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(r.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function eee(r,e,t){let n=!1,i=!1,a=!1;for(let u=0,c=e.length;u<c;u++){const h=e[u];if(h.POSITION!==void 0&&(n=!0),h.NORMAL!==void 0&&(i=!0),h.COLOR_0!==void 0&&(a=!0),n&&i&&a)break}if(!n&&!i&&!a)return Promise.resolve(r);const o=[],s=[],l=[];for(let u=0,c=e.length;u<c;u++){const h=e[u];if(n){const f=h.POSITION!==void 0?t.getDependency("accessor",h.POSITION):r.attributes.position;o.push(f)}if(i){const f=h.NORMAL!==void 0?t.getDependency("accessor",h.NORMAL):r.attributes.normal;s.push(f)}if(a){const f=h.COLOR_0!==void 0?t.getDependency("accessor",h.COLOR_0):r.attributes.color;l.push(f)}}return Promise.all([Promise.all(o),Promise.all(s),Promise.all(l)]).then(function(u){const c=u[0],h=u[1],f=u[2];return n&&(r.morphAttributes.position=c),i&&(r.morphAttributes.normal=h),a&&(r.morphAttributes.color=f),r.morphTargetsRelative=!0,r})}function tee(r,e){if(r.updateMorphTargets(),e.weights!==void 0)for(let t=0,n=e.weights.length;t<n;t++)r.morphTargetInfluences[t]=e.weights[t];if(e.extras&&Array.isArray(e.extras.targetNames)){const t=e.extras.targetNames;if(r.morphTargetInfluences.length===t.length){r.morphTargetDictionary={};for(let n=0,i=t.length;n<i;n++)r.morphTargetDictionary[t[n]]=n}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function nee(r){let e;const t=r.extensions&&r.extensions[Yt.KHR_DRACO_MESH_COMPRESSION];if(t?e="draco:"+t.bufferView+":"+t.indices+":"+uS(t.attributes):e=r.indices+":"+uS(r.attributes)+":"+r.mode,r.targets!==void 0)for(let n=0,i=r.targets.length;n<i;n++)e+=":"+uS(r.targets[n]);return e}function uS(r){let e="";const t=Object.keys(r).sort();for(let n=0,i=t.length;n<i;n++)e+=t[n]+":"+r[t[n]]+";";return e}function Ib(r){switch(r){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function ree(r){return r.search(/\.jpe?g($|\?)/i)>0||r.search(/^data\:image\/jpeg/)===0?"image/jpeg":r.search(/\.webp($|\?)/i)>0||r.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const iee=new Mt;class aee{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new EJ,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=!1,a=-1;typeof navigator!="undefined"&&(n=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,a=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap=="undefined"||n||i&&a<98?this.textureLoader=new AC(this.options.manager):this.textureLoader=new cJ(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Rv(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,i=this.json,a=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])}).then(function(o){const s={scene:o[0][i.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:i.asset,parser:n,userData:{}};return mu(a,s,i),hl(s,i),Promise.all(n._invokeAll(function(l){return l.afterRoot&&l.afterRoot(s)})).then(function(){e(s)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let i=0,a=t.length;i<a;i++){const o=t[i].joints;for(let s=0,l=o.length;s<l;s++)e[o[s]].isBone=!0}for(let i=0,a=e.length;i<a;i++){const o=e[i];o.mesh!==void 0&&(this._addNodeRef(this.meshCache,o.mesh),o.skin!==void 0&&(n[o.mesh].isSkinnedMesh=!0)),o.camera!==void 0&&this._addNodeRef(this.cameraCache,o.camera)}}_addNodeRef(e,t){t!==void 0&&(e.refs[t]===void 0&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const i=n.clone(),a=(o,s)=>{const l=this.associations.get(o);l!=null&&this.associations.set(s,l);for(const[u,c]of o.children.entries())a(c,s.children[u])};return a(n,i),i.name+="_instance_"+e.uses[t]++,i}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const i=e(t[n]);if(i)return i}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let i=0;i<t.length;i++){const a=e(t[i]);a&&n.push(a)}return n}getDependency(e,t){const n=e+":"+t;let i=this.cache.get(n);if(!i){switch(e){case"scene":i=this.loadScene(t);break;case"node":i=this._invokeOne(function(a){return a.loadNode&&a.loadNode(t)});break;case"mesh":i=this._invokeOne(function(a){return a.loadMesh&&a.loadMesh(t)});break;case"accessor":i=this.loadAccessor(t);break;case"bufferView":i=this._invokeOne(function(a){return a.loadBufferView&&a.loadBufferView(t)});break;case"buffer":i=this.loadBuffer(t);break;case"material":i=this._invokeOne(function(a){return a.loadMaterial&&a.loadMaterial(t)});break;case"texture":i=this._invokeOne(function(a){return a.loadTexture&&a.loadTexture(t)});break;case"skin":i=this.loadSkin(t);break;case"animation":i=this._invokeOne(function(a){return a.loadAnimation&&a.loadAnimation(t)});break;case"camera":i=this.loadCamera(t);break;default:if(i=this._invokeOne(function(a){return a!=this&&a.getDependency&&a.getDependency(e,t)}),!i)throw new Error("Unknown type: "+e);break}this.cache.add(n,i)}return i}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,i=this.json[e+(e==="mesh"?"es":"s")]||[];t=Promise.all(i.map(function(a,o){return n.getDependency(e,o)})),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&t.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(t.uri===void 0&&e===0)return Promise.resolve(this.extensions[Yt.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(a,o){n.load(Kp.resolveURL(t.uri,i.path),a,void 0,function(){o(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))})})}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then(function(n){const i=t.byteLength||0,a=t.byteOffset||0;return n.slice(a,a+i)})}loadAccessor(e){const t=this,n=this.json,i=this.json.accessors[e];if(i.bufferView===void 0&&i.sparse===void 0){const o=sS[i.type],s=wf[i.componentType],l=i.normalized===!0,u=new s(i.count*o);return Promise.resolve(new Gn(u,o,l))}const a=[];return i.bufferView!==void 0?a.push(this.getDependency("bufferView",i.bufferView)):a.push(null),i.sparse!==void 0&&(a.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(a).then(function(o){const s=o[0],l=sS[i.type],u=wf[i.componentType],c=u.BYTES_PER_ELEMENT,h=c*l,f=i.byteOffset||0,d=i.bufferView!==void 0?n.bufferViews[i.bufferView].byteStride:void 0,p=i.normalized===!0;let g,v;if(d&&d!==h){const m=Math.floor(f/d),y="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+m+":"+i.count;let _=t.cache.get(y);_||(g=new u(s,m*d,i.count*d/c),_=new pC(g,d/c),t.cache.add(y,_)),v=new Ja(_,l,f%d/c,p)}else s===null?g=new u(i.count*l):g=new u(s,f,i.count*l),v=new Gn(g,l,p);if(i.sparse!==void 0){const m=sS.SCALAR,y=wf[i.sparse.indices.componentType],_=i.sparse.indices.byteOffset||0,x=i.sparse.values.byteOffset||0,S=new y(o[1],_,i.sparse.count*m),A=new u(o[2],x,i.sparse.count*l);s!==null&&(v=new Gn(v.array.slice(),v.itemSize,v.normalized));for(let w=0,M=S.length;w<M;w++){const C=S[w];if(v.setX(C,A[w*l]),l>=2&&v.setY(C,A[w*l+1]),l>=3&&v.setZ(C,A[w*l+2]),l>=4&&v.setW(C,A[w*l+3]),l>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return v})}loadTexture(e){const t=this.json,n=this.options,a=t.textures[e].source,o=t.images[a];let s=this.textureLoader;if(o.uri){const l=n.manager.getHandler(o.uri);l!==null&&(s=l)}return this.loadTextureImage(e,a,s)}loadTextureImage(e,t,n){const i=this,a=this.json,o=a.textures[e],s=a.images[t],l=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,n).then(function(c){c.flipY=!1,c.name=o.name||s.name||"",c.name===""&&typeof s.uri=="string"&&s.uri.startsWith("data:image/")===!1&&(c.name=s.uri);const f=(a.samplers||{})[o.sampler]||{};return c.magFilter=BR[f.magFilter]||lr,c.minFilter=BR[f.minFilter]||gs,c.wrapS=zR[f.wrapS]||jr,c.wrapT=zR[f.wrapT]||jr,i.associations.set(c,{textures:e}),c}).catch(function(){return null});return this.textureCache[l]=u,u}loadImageSource(e,t){const n=this,i=this.json,a=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(h=>h.clone());const o=i.images[e],s=self.URL||self.webkitURL;let l=o.uri||"",u=!1;if(o.bufferView!==void 0)l=n.getDependency("bufferView",o.bufferView).then(function(h){u=!0;const f=new Blob([h],{type:o.mimeType});return l=s.createObjectURL(f),l});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(l).then(function(h){return new Promise(function(f,d){let p=f;t.isImageBitmapLoader===!0&&(p=function(g){const v=new mr(g);v.needsUpdate=!0,f(v)}),t.load(Kp.resolveURL(h,a.path),p,void 0,d)})}).then(function(h){return u===!0&&s.revokeObjectURL(l),h.userData.mimeType=o.mimeType||ree(o.uri),h}).catch(function(h){throw console.error("THREE.GLTFLoader: Couldn't load texture",l),h});return this.sourceCache[e]=c,c}assignTexture(e,t,n,i){const a=this;return this.getDependency("texture",n.index).then(function(o){if(!o)return null;if(n.texCoord!==void 0&&n.texCoord>0&&(o=o.clone(),o.channel=n.texCoord),a.extensions[Yt.KHR_TEXTURE_TRANSFORM]){const s=n.extensions!==void 0?n.extensions[Yt.KHR_TEXTURE_TRANSFORM]:void 0;if(s){const l=a.associations.get(o);o=a.extensions[Yt.KHR_TEXTURE_TRANSFORM].extendTexture(o,s),a.associations.set(o,l)}}return i!==void 0&&(o.colorSpace=i),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=t.attributes.tangent===void 0,a=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const s="PointsMaterial:"+n.uuid;let l=this.cache.get(s);l||(l=new pg,Da.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,l.sizeAttenuation=!1,this.cache.add(s,l)),n=l}else if(e.isLine){const s="LineBasicMaterial:"+n.uuid;let l=this.cache.get(s);l||(l=new ys,Da.prototype.copy.call(l,n),l.color.copy(n.color),l.map=n.map,this.cache.add(s,l)),n=l}if(i||a||o){let s="ClonedMaterial:"+n.uuid+":";i&&(s+="derivative-tangents:"),a&&(s+="vertex-colors:"),o&&(s+="flat-shading:");let l=this.cache.get(s);l||(l=n.clone(),a&&(l.vertexColors=!0),o&&(l.flatShading=!0),i&&(l.normalScale&&(l.normalScale.y*=-1),l.clearcoatNormalScale&&(l.clearcoatNormalScale.y*=-1)),this.cache.add(s,l),this.associations.set(l,this.associations.get(n))),n=l}e.material=n}getMaterialType(){return Pv}loadMaterial(e){const t=this,n=this.json,i=this.extensions,a=n.materials[e];let o;const s={},l=a.extensions||{},u=[];if(l[Yt.KHR_MATERIALS_UNLIT]){const h=i[Yt.KHR_MATERIALS_UNLIT];o=h.getMaterialType(),u.push(h.extendParams(s,a,t))}else{const h=a.pbrMetallicRoughness||{};if(s.color=new nt(1,1,1),s.opacity=1,Array.isArray(h.baseColorFactor)){const f=h.baseColorFactor;s.color.setRGB(f[0],f[1],f[2],yr),s.opacity=f[3]}h.baseColorTexture!==void 0&&u.push(t.assignTexture(s,"map",h.baseColorTexture,dn)),s.metalness=h.metallicFactor!==void 0?h.metallicFactor:1,s.roughness=h.roughnessFactor!==void 0?h.roughnessFactor:1,h.metallicRoughnessTexture!==void 0&&(u.push(t.assignTexture(s,"metalnessMap",h.metallicRoughnessTexture)),u.push(t.assignTexture(s,"roughnessMap",h.metallicRoughnessTexture))),o=this._invokeOne(function(f){return f.getMaterialType&&f.getMaterialType(e)}),u.push(Promise.all(this._invokeAll(function(f){return f.extendMaterialParams&&f.extendMaterialParams(e,s)})))}a.doubleSided===!0&&(s.side=ur);const c=a.alphaMode||lS.OPAQUE;if(c===lS.BLEND?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,c===lS.MASK&&(s.alphaTest=a.alphaCutoff!==void 0?a.alphaCutoff:.5)),a.normalTexture!==void 0&&o!==Pn&&(u.push(t.assignTexture(s,"normalMap",a.normalTexture)),s.normalScale=new Me(1,1),a.normalTexture.scale!==void 0)){const h=a.normalTexture.scale;s.normalScale.set(h,h)}if(a.occlusionTexture!==void 0&&o!==Pn&&(u.push(t.assignTexture(s,"aoMap",a.occlusionTexture)),a.occlusionTexture.strength!==void 0&&(s.aoMapIntensity=a.occlusionTexture.strength)),a.emissiveFactor!==void 0&&o!==Pn){const h=a.emissiveFactor;s.emissive=new nt().setRGB(h[0],h[1],h[2],yr)}return a.emissiveTexture!==void 0&&o!==Pn&&u.push(t.assignTexture(s,"emissiveMap",a.emissiveTexture,dn)),Promise.all(u).then(function(){const h=new o(s);return a.name&&(h.name=a.name),hl(h,a),t.associations.set(h,{materials:e}),a.extensions&&mu(i,h,a),h})}createUniqueName(e){const t=hn.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function a(s){return n[Yt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(s,t).then(function(l){return UR(l,s,t)})}const o=[];for(let s=0,l=e.length;s<l;s++){const u=e[s],c=nee(u),h=i[c];if(h)o.push(h.promise);else{let f;u.extensions&&u.extensions[Yt.KHR_DRACO_MESH_COMPRESSION]?f=a(u):f=UR(new wn,u,t),i[c]={primitive:u,promise:f},o.push(f)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,i=this.extensions,a=n.meshes[e],o=a.primitives,s=[];for(let l=0,u=o.length;l<u;l++){const c=o[l].material===void 0?JJ(this.cache):this.getDependency("material",o[l].material);s.push(c)}return s.push(t.loadGeometries(o)),Promise.all(s).then(function(l){const u=l.slice(0,l.length-1),c=l[l.length-1],h=[];for(let d=0,p=c.length;d<p;d++){const g=c[d],v=o[d];let m;const y=u[d];if(v.mode===ga.TRIANGLES||v.mode===ga.TRIANGLE_STRIP||v.mode===ga.TRIANGLE_FAN||v.mode===void 0)m=a.isSkinnedMesh===!0?new cQ(g,y):new rn(g,y),m.isSkinnedMesh===!0&&m.normalizeSkinWeights(),v.mode===ga.TRIANGLE_STRIP?m.geometry=OR(m.geometry,fz):v.mode===ga.TRIANGLE_FAN&&(m.geometry=OR(m.geometry,_b));else if(v.mode===ga.LINES)m=new gC(g,y);else if(v.mode===ga.LINE_STRIP)m=new Mv(g,y);else if(v.mode===ga.LINE_LOOP)m=new O0(g,y);else if(v.mode===ga.POINTS)m=new mC(g,y);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+v.mode);Object.keys(m.geometry.morphAttributes).length>0&&tee(m,a),m.name=t.createUniqueName(a.name||"mesh_"+e),hl(m,a),v.extensions&&mu(i,m,v),t.assignFinalMaterial(m),h.push(m)}for(let d=0,p=h.length;d<p;d++)t.associations.set(h[d],{meshes:e,primitives:d});if(h.length===1)return a.extensions&&mu(i,h[0],a),h[0];const f=new Dn;a.extensions&&mu(i,f,a),t.associations.set(f,{meshes:e});for(let d=0,p=h.length;d<p;d++)f.add(h[d]);return f})}loadCamera(e){let t;const n=this.json.cameras[e],i=n[n.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return n.type==="perspective"?t=new Qr(sC.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):n.type==="orthographic"&&(t=new e1(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),hl(t,n),Promise.resolve(t)}loadSkin(e){const t=this.json.skins[e],n=[];for(let i=0,a=t.joints.length;i<a;i++)n.push(this._loadNodeShallow(t.joints[i]));return t.inverseBindMatrices!==void 0?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then(function(i){const a=i.pop(),o=i,s=[],l=[];for(let u=0,c=o.length;u<c;u++){const h=o[u];if(h){s.push(h);const f=new Mt;a!==null&&f.fromArray(a.array,u*16),l.push(f)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[u])}return new vC(s,l)})}loadAnimation(e){const t=this.json,n=this,i=t.animations[e],a=i.name?i.name:"animation_"+e,o=[],s=[],l=[],u=[],c=[];for(let h=0,f=i.channels.length;h<f;h++){const d=i.channels[h],p=i.samplers[d.sampler],g=d.target,v=g.node,m=i.parameters!==void 0?i.parameters[p.input]:p.input,y=i.parameters!==void 0?i.parameters[p.output]:p.output;g.node!==void 0&&(o.push(this.getDependency("node",v)),s.push(this.getDependency("accessor",m)),l.push(this.getDependency("accessor",y)),u.push(p),c.push(g))}return Promise.all([Promise.all(o),Promise.all(s),Promise.all(l),Promise.all(u),Promise.all(c)]).then(function(h){const f=h[0],d=h[1],p=h[2],g=h[3],v=h[4],m=[];for(let y=0,_=f.length;y<_;y++){const x=f[y],S=d[y],A=p[y],w=g[y],M=v[y];if(x===void 0)continue;x.updateMatrix&&x.updateMatrix();const C=n._createAnimationTracks(x,S,A,w,M);if(C)for(let b=0;b<C.length;b++)m.push(C[b])}return new JQ(a,void 0,m)})}createNodeMesh(e){const t=this.json,n=this,i=t.nodes[e];return i.mesh===void 0?null:n.getDependency("mesh",i.mesh).then(function(a){const o=n._getNodeRef(n.meshCache,i.mesh,a);return i.weights!==void 0&&o.traverse(function(s){if(s.isMesh)for(let l=0,u=i.weights.length;l<u;l++)s.morphTargetInfluences[l]=i.weights[l]}),o})}loadNode(e){const t=this.json,n=this,i=t.nodes[e],a=n._loadNodeShallow(e),o=[],s=i.children||[];for(let u=0,c=s.length;u<c;u++)o.push(n.getDependency("node",s[u]));const l=i.skin===void 0?Promise.resolve(null):n.getDependency("skin",i.skin);return Promise.all([a,Promise.all(o),l]).then(function(u){const c=u[0],h=u[1],f=u[2];f!==null&&c.traverse(function(d){d.isSkinnedMesh&&d.bind(f,iee)});for(let d=0,p=h.length;d<p;d++)c.add(h[d]);return c})}_loadNodeShallow(e){const t=this.json,n=this.extensions,i=this;if(this.nodeCache[e]!==void 0)return this.nodeCache[e];const a=t.nodes[e],o=a.name?i.createUniqueName(a.name):"",s=[],l=i._invokeOne(function(u){return u.createNodeMesh&&u.createNodeMesh(e)});return l&&s.push(l),a.camera!==void 0&&s.push(i.getDependency("camera",a.camera).then(function(u){return i._getNodeRef(i.cameraCache,a.camera,u)})),i._invokeAll(function(u){return u.createNodeAttachment&&u.createNodeAttachment(e)}).forEach(function(u){s.push(u)}),this.nodeCache[e]=Promise.all(s).then(function(u){let c;if(a.isBone===!0?c=new Nz:u.length>1?c=new Dn:u.length===1?c=u[0]:c=new bn,c!==u[0])for(let h=0,f=u.length;h<f;h++)c.add(u[h]);if(a.name&&(c.userData.name=a.name,c.name=o),hl(c,a),a.extensions&&mu(n,c,a),a.matrix!==void 0){const h=new Mt;h.fromArray(a.matrix),c.applyMatrix4(h)}else a.translation!==void 0&&c.position.fromArray(a.translation),a.rotation!==void 0&&c.quaternion.fromArray(a.rotation),a.scale!==void 0&&c.scale.fromArray(a.scale);return i.associations.has(c)||i.associations.set(c,{}),i.associations.get(c).nodes=e,c}),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],i=this,a=new Dn;n.name&&(a.name=i.createUniqueName(n.name)),hl(a,n),n.extensions&&mu(t,a,n);const o=n.nodes||[],s=[];for(let l=0,u=o.length;l<u;l++)s.push(i.getDependency("node",o[l]));return Promise.all(s).then(function(l){for(let c=0,h=l.length;c<h;c++)a.add(l[c]);const u=c=>{const h=new Map;for(const[f,d]of i.associations)(f instanceof Da||f instanceof mr)&&h.set(f,d);return c.traverse(f=>{const d=i.associations.get(f);d!=null&&h.set(f,d)}),h};return i.associations=u(a),a})}_createAnimationTracks(e,t,n,i,a){const o=[],s=e.name?e.name:e.uuid,l=[];qs[a.path]===qs.weights?e.traverse(function(f){f.morphTargetInfluences&&l.push(f.name?f.name:f.uuid)}):l.push(s);let u;switch(qs[a.path]){case qs.weights:u=$f;break;case qs.rotation:u=Fc;break;case qs.position:case qs.scale:u=Xf;break;default:switch(n.itemSize){case 1:u=$f;break;case 2:case 3:default:u=Xf;break}break}const c=i.interpolation!==void 0?QJ[i.interpolation]:Gf,h=this._getArrayFromAccessor(n);for(let f=0,d=l.length;f<d;f++){const p=new u(l[f]+"."+qs[a.path],t.array,h,c);i.interpolation==="CUBICSPLINE"&&this._createCubicSplineTrackInterpolant(p),o.push(p)}return o}_getArrayFromAccessor(e){let t=e.array;if(e.normalized){const n=Ib(t.constructor),i=new Float32Array(t.length);for(let a=0,o=t.length;a<o;a++)i[a]=t[a]*n;t=i}return t}_createCubicSplineTrackInterpolant(e){e.createInterpolant=function(n){const i=this instanceof Fc?ZJ:Qz;return new i(this.times,this.values,this.getValueSize()/3,n)},e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}}function oee(r,e,t){const n=e.attributes,i=new Oa;if(n.POSITION!==void 0){const s=t.json.accessors[n.POSITION],l=s.min,u=s.max;if(l!==void 0&&u!==void 0){if(i.set(new X(l[0],l[1],l[2]),new X(u[0],u[1],u[2])),s.normalized){const c=Ib(wf[s.componentType]);i.min.multiplyScalar(c),i.max.multiplyScalar(c)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const a=e.targets;if(a!==void 0){const s=new X,l=new X;for(let u=0,c=a.length;u<c;u++){const h=a[u];if(h.POSITION!==void 0){const f=t.json.accessors[h.POSITION],d=f.min,p=f.max;if(d!==void 0&&p!==void 0){if(l.setX(Math.max(Math.abs(d[0]),Math.abs(p[0]))),l.setY(Math.max(Math.abs(d[1]),Math.abs(p[1]))),l.setZ(Math.max(Math.abs(d[2]),Math.abs(p[2]))),f.normalized){const g=Ib(wf[f.componentType]);l.multiplyScalar(g)}s.max(l)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(s)}r.boundingBox=i;const o=new Fa;i.getCenter(o.center),o.radius=i.min.distanceTo(i.max)/2,r.boundingSphere=o}function UR(r,e,t){const n=e.attributes,i=[];function a(o,s){return t.getDependency("accessor",o).then(function(l){r.setAttribute(s,l)})}for(const o in n){const s=Db[o]||o.toLowerCase();s in r.attributes||i.push(a(n[o],s))}if(e.indices!==void 0&&!r.index){const o=t.getDependency("accessor",e.indices).then(function(s){r.setIndex(s)});i.push(o)}return ln.workingColorSpace!==yr&&"COLOR_0"in n&&console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ln.workingColorSpace}" not supported.`),hl(r,e),oee(r,e,t),Promise.all(i).then(function(){return e.targets!==void 0?eee(r,e.targets,t):r})}const cS=new WeakMap;class see extends iu{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,i){const a=new Rv(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,o=>{this.parse(o,t,i)},n,i)}parse(e,t,n=()=>{}){this.decodeDracoFile(e,t,null,null,dn).catch(n)}decodeDracoFile(e,t,n,i,a=yr,o=()=>{}){const s={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:i||this.defaultAttributeTypes,useUniqueIDs:!!n,vertexColorSpace:a};return this.decodeGeometry(e,s).then(t).catch(o)}decodeGeometry(e,t){const n=JSON.stringify(t);if(cS.has(e)){const l=cS.get(e);if(l.key===n)return l.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i;const a=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(a,o).then(l=>(i=l,new Promise((u,c)=>{i._callbacks[a]={resolve:u,reject:c},i.postMessage({type:"decode",id:a,taskConfig:t,buffer:e},[e])}))).then(l=>this._createGeometry(l.geometry));return s.catch(()=>!0).then(()=>{i&&a&&this._releaseTask(i,a)}),cS.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new wn;e.index&&t.setIndex(new Gn(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const i=e.attributes[n],a=i.name,o=i.array,s=i.itemSize,l=new Gn(o,s);a==="color"&&(this._assignVertexColorSpace(l,i.vertexColorSpace),l.normalized=!(o instanceof Float32Array)),t.setAttribute(a,l)}return t}_assignVertexColorSpace(e,t){if(t!==dn)return;const n=new nt;for(let i=0,a=e.count;i<a;i++)n.fromBufferAttribute(e,i).convertSRGBToLinear(),e.setXYZ(i,n.r,n.g,n.b)}_loadLibrary(e,t){const n=new Rv(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise((i,a)=>{n.load(e,i,void 0,a)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then(n=>{const i=n[0];e||(this.decoderConfig.wasmBinary=n[1]);const a=lee.toString(),o=["/* draco decoder */",i,"","/* worker */",a.substring(a.indexOf("{")+1,a.lastIndexOf("}"))].join(` |
|
`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const i=new Worker(this.workerSourceURL);i._callbacks={},i._taskCosts={},i._taskLoad=0,i.postMessage({type:"init",decoderConfig:this.decoderConfig}),i.onmessage=function(a){const o=a.data;switch(o.type){case"decode":i._callbacks[o.id].resolve(o);break;case"error":i._callbacks[o.id].reject(o);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+o.type+'"')}},this.workerPool.push(i)}else this.workerPool.sort(function(i,a){return i._taskLoad>a._taskLoad?-1:1});const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n})}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map(e=>e._taskLoad))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this.workerSourceURL!==""&&URL.revokeObjectURL(this.workerSourceURL),this}}function lee(){let r,e;onmessage=function(o){const s=o.data;switch(s.type){case"init":r=s.decoderConfig,e=new Promise(function(c){r.onModuleLoaded=function(h){c({draco:h})},DracoDecoderModule(r)});break;case"decode":const l=s.buffer,u=s.taskConfig;e.then(c=>{const h=c.draco,f=new h.Decoder;try{const d=t(h,f,new Int8Array(l),u),p=d.attributes.map(g=>g.array.buffer);d.index&&p.push(d.index.array.buffer),self.postMessage({type:"decode",id:s.id,geometry:d},p)}catch(d){console.error(d),self.postMessage({type:"error",id:s.id,error:d.message})}finally{h.destroy(f)}});break}};function t(o,s,l,u){const c=u.attributeIDs,h=u.attributeTypes;let f,d;const p=s.GetEncodedGeometryType(l);if(p===o.TRIANGULAR_MESH)f=new o.Mesh,d=s.DecodeArrayToMesh(l,l.byteLength,f);else if(p===o.POINT_CLOUD)f=new o.PointCloud,d=s.DecodeArrayToPointCloud(l,l.byteLength,f);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!d.ok()||f.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+d.error_msg());const g={index:null,attributes:[]};for(const v in c){const m=self[h[v]];let y,_;if(u.useUniqueIDs)_=c[v],y=s.GetAttributeByUniqueId(f,_);else{if(_=s.GetAttributeId(f,o[c[v]]),_===-1)continue;y=s.GetAttribute(f,_)}const x=i(o,s,f,v,m,y);v==="color"&&(x.vertexColorSpace=u.vertexColorSpace),g.attributes.push(x)}return p===o.TRIANGULAR_MESH&&(g.index=n(o,s,f)),o.destroy(f),g}function n(o,s,l){const c=l.num_faces()*3,h=c*4,f=o._malloc(h);s.GetTrianglesUInt32Array(l,h,f);const d=new Uint32Array(o.HEAPF32.buffer,f,c).slice();return o._free(f),{array:d,itemSize:1}}function i(o,s,l,u,c,h){const f=h.num_components(),p=l.num_points()*f,g=p*c.BYTES_PER_ELEMENT,v=a(o,c),m=o._malloc(g);s.GetAttributeDataArrayForAllPoints(l,h,v,g,m);const y=new c(o.HEAPF32.buffer,m,p).slice();return o._free(m),{name:u,array:y,itemSize:f}}function a(o,s){switch(s){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let Nb={GLTFLoader:"GLTF",TextureLoader:"Texture",FontLoader:"Font",MMDLoader:"MMD",MTLLoader:"MTL",OBJLoader:"OBJ",PCDLoader:"PCD",FileLoader:"File",ImageLoader:"Image",ObjectLoader:"Object",MaterialLoader:"Material",CubeTextureLoader:"CubeTexture",RGBELoader:"RGBELoader",FBXLoader:"FBX"};const uee=Object.values(Nb);class cee extends a1{constructor({dracoPath:e}={}){super(),this.dracoPath=e||"./draco/gltf/",this.itemsLoaded=0,this.itemsTotal=0,this.assets=[],this.loaders={},this.initDefaultLoader()}initManager(){const e=new Xz;return e.onProgress=(t,n,i)=>{this.itemsLoaded=n,this.itemsTotal=i,this.emit("onProgress",t,n,i)},e.onError=t=>{this.emit("onError",t)},e}initDefaultLoader(){[{loader:CJ,name:"GLTFLoader"},{loader:AC,name:"TextureLoader"}].map(e=>this.addLoader(e.loader,e.name))}initDraco(e){const t=new see;t.setDecoderPath(this.dracoPath),t.preload(),e.setDRACOLoader(t)}addLoader(e,t=""){if(e.name&&Nb[t]){if(!this.loaders[t]){let i=new e(this.manager),a=t;i instanceof iu&&(a==="GLTFLoader"&&this.initDraco(i),this.loaders[Nb[a]]=i)}}else throw new Error("请配置正确的加载器")}loadItem(e){return new Promise((t,n)=>{if(!this.loaders[e.type])throw new Error(`资源${e.path}没有配置加载器`);this.loaders[e.type].load(e.path,i=>{this.itemsLoaded++,this.emit("onProgress",e.path,this.itemsLoaded,this.itemsTotal),t(Xe(Re({},e),{data:i}))},null,i=>{this.emit("onError",i),n(i)})})}loadAll(e){return this.itemsLoaded=0,this.itemsTotal=0,new Promise((t,n)=>{let i=this.matchType(e),a=[];this.itemsTotal=i.length,i.map(o=>{let s=this.loadItem(o);a.push(s)}),Promise.all(a).then(o=>{this.assets=o,this.emit("onLoad"),t(o)}).catch(o=>{this.emit("onError",o),n(o)})})}matchType(e){return this.assets=e.map(t=>({type:uee.includes(t.type)?t.type:"",path:t.path,name:t.name,data:null})).filter(t=>{if(!t.type)throw new Error(`资源${t.path},type不正确`);return t.type}),this.assets}getResource(e){let t=this.assets.find(n=>n.name===e);if(!t)throw new Error(`资源${e}不存在`);return t.data}destroy(){this.off("onProgress"),this.off("onLoad"),this.off("onError"),this.assets=[]}}const Jz=r=>{r instanceof Array?r.forEach(Jz):(r.map&&r.map.dispose(),r.dispose())},eU=r=>{r.geometry&&r.geometry.dispose(),r.material&&Jz(r.material),r.texture&&r.texture.dispose(),r.children&&r.children.forEach(eU)},hee=r=>{if(r&&r.children)for(;r.children.length;){const e=r.children[0];r.remove(e),eU(e)}};var MC={exports:{}},fee=function(e,t,n,i){var a=e[0],o=e[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var l=(i-n)/2,u=0,c=l-1;u<l;c=u++){var h=t[n+u*2+0],f=t[n+u*2+1],d=t[n+c*2+0],p=t[n+c*2+1],g=f>o!=p>o&&a<(d-h)*(o-f)/(p-f)+h;g&&(s=!s)}return s},dee=function(e,t,n,i){var a=e[0],o=e[1],s=!1;n===void 0&&(n=0),i===void 0&&(i=t.length);for(var l=i-n,u=0,c=l-1;u<l;c=u++){var h=t[u+n][0],f=t[u+n][1],d=t[c+n][0],p=t[c+n][1],g=f>o!=p>o&&a<(d-h)*(o-f)/(p-f)+h;g&&(s=!s)}return s},tU=fee,nU=dee;MC.exports=function(e,t,n,i){return t.length>0&&Array.isArray(t[0])?nU(e,t,n,i):tU(e,t,n,i)};MC.exports.nested=nU;MC.exports.flat=tU;function pee(r=10,e=62){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),n=[],i;if(e=e||t.length,r)for(i=0;i<r;i++)n[i]=t[0|Math.random()*e];else{var a;for(n[8]=n[13]=n[18]=n[23]="-",n[14]="4",i=0;i<36;i++)n[i]||(a=0|Math.random()*16,n[i]=t[i==19?a&3|8:a])}return n.join("")}const CC=r=>{console.log(r);let e=JSON.parse(r),t=e.features;for(let n=0;n<t.length;n++){const i=t[n];["Polygon"].includes(i.geometry.type)&&(i.geometry.coordinates=[i.geometry.coordinates])}return e};class vee{constructor({canvas:e,sizes:t,scene:n,camera:i,postprocessing:a=!1,composer:o=null}){this.canvas=e,this.sizes=t,this.scene=n,this.camera=i,this.postprocessing=a,this.composer=o,this.setInstance()}setInstance(){this.instance=new fC({alpha:!1,antialias:!0,canvas:this.canvas}),this.instance.setSize(this.sizes.width,this.sizes.height),this.instance.setPixelRatio(this.sizes.pixelRatio)}resize(){this.instance.setSize(this.sizes.width,this.sizes.height),this.instance.setPixelRatio(this.sizes.pixelRatio)}update(){this.postprocessing&&this.composer?this.composer.render():this.instance.render(this.scene,this.camera.instance)}destroy(){this.instance.dispose(),this.instance.forceContextLoss()}}const VR={type:"change"},hS={type:"start"},GR={type:"end"},Tm=new sd,HR=new cl,gee=Math.cos(70*sC.DEG2RAD);class rU extends Yc{constructor(e,t){super(),this.object=e,this.domElement=t,this.domElement.style.touchAction="none",this.enabled=!0,this.target=new X,this.cursor=new X,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:oh.ROTATE,MIDDLE:oh.DOLLY,RIGHT:oh.PAN},this.touches={ONE:sh.ROTATE,TWO:sh.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this.getPolarAngle=function(){return s.phi},this.getAzimuthalAngle=function(){return s.theta},this.getDistance=function(){return this.object.position.distanceTo(this.target)},this.listenToKeyEvents=function(j){j.addEventListener("keydown",Ye),this._domElementKeyEvents=j},this.stopListenToKeyEvents=function(){this._domElementKeyEvents.removeEventListener("keydown",Ye),this._domElementKeyEvents=null},this.saveState=function(){n.target0.copy(n.target),n.position0.copy(n.object.position),n.zoom0=n.object.zoom},this.reset=function(){n.target.copy(n.target0),n.object.position.copy(n.position0),n.object.zoom=n.zoom0,n.object.updateProjectionMatrix(),n.dispatchEvent(VR),n.update(),a=i.NONE},this.update=function(){const j=new X,Ee=new ao().setFromUnitVectors(e.up,new X(0,1,0)),Ue=Ee.clone().invert(),et=new X,Y=new ao,De=new X,q=2*Math.PI;return function(st=null){const Jt=n.object.position;j.copy(Jt).sub(n.target),j.applyQuaternion(Ee),s.setFromVector3(j),n.autoRotate&&a===i.NONE&&P(b(st)),n.enableDamping?(s.theta+=l.theta*n.dampingFactor,s.phi+=l.phi*n.dampingFactor):(s.theta+=l.theta,s.phi+=l.phi);let $t=n.minAzimuthAngle,mn=n.maxAzimuthAngle;isFinite($t)&&isFinite(mn)&&($t<-Math.PI?$t+=q:$t>Math.PI&&($t-=q),mn<-Math.PI?mn+=q:mn>Math.PI&&(mn-=q),$t<=mn?s.theta=Math.max($t,Math.min(mn,s.theta)):s.theta=s.theta>($t+mn)/2?Math.max($t,s.theta):Math.min(mn,s.theta)),s.phi=Math.max(n.minPolarAngle,Math.min(n.maxPolarAngle,s.phi)),s.makeSafe(),n.enableDamping===!0?n.target.addScaledVector(c,n.dampingFactor):n.target.add(c),n.target.sub(n.cursor),n.target.clampLength(n.minTargetRadius,n.maxTargetRadius),n.target.add(n.cursor),n.zoomToCursor&&A||n.object.isOrthographicCamera?s.radius=O(s.radius):s.radius=O(s.radius*u),j.setFromSpherical(s),j.applyQuaternion(Ue),Jt.copy(n.target).add(j),n.object.lookAt(n.target),n.enableDamping===!0?(l.theta*=1-n.dampingFactor,l.phi*=1-n.dampingFactor,c.multiplyScalar(1-n.dampingFactor)):(l.set(0,0,0),c.set(0,0,0));let Lr=!1;if(n.zoomToCursor&&A){let en=null;if(n.object.isPerspectiveCamera){const jn=j.length();en=O(jn*u);const oi=jn-en;n.object.position.addScaledVector(x,oi),n.object.updateMatrixWorld()}else if(n.object.isOrthographicCamera){const jn=new X(S.x,S.y,0);jn.unproject(n.object),n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix(),Lr=!0;const oi=new X(S.x,S.y,0);oi.unproject(n.object),n.object.position.sub(oi).add(jn),n.object.updateMatrixWorld(),en=j.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),n.zoomToCursor=!1;en!==null&&(this.screenSpacePanning?n.target.set(0,0,-1).transformDirection(n.object.matrix).multiplyScalar(en).add(n.object.position):(Tm.origin.copy(n.object.position),Tm.direction.set(0,0,-1).transformDirection(n.object.matrix),Math.abs(n.object.up.dot(Tm.direction))<gee?e.lookAt(n.target):(HR.setFromNormalAndCoplanarPoint(n.object.up,n.target),Tm.intersectPlane(HR,n.target))))}else n.object.isOrthographicCamera&&(Lr=u!==1,Lr&&(n.object.zoom=Math.max(n.minZoom,Math.min(n.maxZoom,n.object.zoom/u)),n.object.updateProjectionMatrix()));return u=1,A=!1,Lr||et.distanceToSquared(n.object.position)>o||8*(1-Y.dot(n.object.quaternion))>o||De.distanceToSquared(n.target)>0?(n.dispatchEvent(VR),et.copy(n.object.position),Y.copy(n.object.quaternion),De.copy(n.target),!0):!1}}(),this.dispose=function(){n.domElement.removeEventListener("contextmenu",Wt),n.domElement.removeEventListener("pointerdown",B),n.domElement.removeEventListener("pointercancel",ne),n.domElement.removeEventListener("wheel",we),n.domElement.removeEventListener("pointermove",z),n.domElement.removeEventListener("pointerup",ne),n._domElementKeyEvents!==null&&(n._domElementKeyEvents.removeEventListener("keydown",Ye),n._domElementKeyEvents=null)};const n=this,i={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let a=i.NONE;const o=1e-6,s=new IR,l=new IR;let u=1;const c=new X,h=new Me,f=new Me,d=new Me,p=new Me,g=new Me,v=new Me,m=new Me,y=new Me,_=new Me,x=new X,S=new Me;let A=!1;const w=[],M={};let C=!1;function b(j){return j!==null?2*Math.PI/60*n.autoRotateSpeed*j:2*Math.PI/60/60*n.autoRotateSpeed}function T(j){const Ee=Math.abs(j*.01);return Math.pow(.95,n.zoomSpeed*Ee)}function P(j){l.theta-=j}function D(j){l.phi-=j}const L=function(){const j=new X;return function(Ue,et){j.setFromMatrixColumn(et,0),j.multiplyScalar(-Ue),c.add(j)}}(),E=function(){const j=new X;return function(Ue,et){n.screenSpacePanning===!0?j.setFromMatrixColumn(et,1):(j.setFromMatrixColumn(et,0),j.crossVectors(n.object.up,j)),j.multiplyScalar(Ue),c.add(j)}}(),I=function(){const j=new X;return function(Ue,et){const Y=n.domElement;if(n.object.isPerspectiveCamera){const De=n.object.position;j.copy(De).sub(n.target);let q=j.length();q*=Math.tan(n.object.fov/2*Math.PI/180),L(2*Ue*q/Y.clientHeight,n.object.matrix),E(2*et*q/Y.clientHeight,n.object.matrix)}else n.object.isOrthographicCamera?(L(Ue*(n.object.right-n.object.left)/n.object.zoom/Y.clientWidth,n.object.matrix),E(et*(n.object.top-n.object.bottom)/n.object.zoom/Y.clientHeight,n.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),n.enablePan=!1)}}();function N(j){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u/=j:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function R(j){n.object.isPerspectiveCamera||n.object.isOrthographicCamera?u*=j:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),n.enableZoom=!1)}function F(j,Ee){if(!n.zoomToCursor)return;A=!0;const Ue=n.domElement.getBoundingClientRect(),et=j-Ue.left,Y=Ee-Ue.top,De=Ue.width,q=Ue.height;S.x=et/De*2-1,S.y=-(Y/q)*2+1,x.set(S.x,S.y,1).unproject(n.object).sub(n.object.position).normalize()}function O(j){return Math.max(n.minDistance,Math.min(n.maxDistance,j))}function V(j){h.set(j.clientX,j.clientY)}function H(j){F(j.clientX,j.clientX),m.set(j.clientX,j.clientY)}function Q(j){p.set(j.clientX,j.clientY)}function W(j){f.set(j.clientX,j.clientY),d.subVectors(f,h).multiplyScalar(n.rotateSpeed);const Ee=n.domElement;P(2*Math.PI*d.x/Ee.clientHeight),D(2*Math.PI*d.y/Ee.clientHeight),h.copy(f),n.update()}function Z(j){y.set(j.clientX,j.clientY),_.subVectors(y,m),_.y>0?N(T(_.y)):_.y<0&&R(T(_.y)),m.copy(y),n.update()}function ee(j){g.set(j.clientX,j.clientY),v.subVectors(g,p).multiplyScalar(n.panSpeed),I(v.x,v.y),p.copy(g),n.update()}function he(j){F(j.clientX,j.clientY),j.deltaY<0?R(T(j.deltaY)):j.deltaY>0&&N(T(j.deltaY)),n.update()}function le(j){let Ee=!1;switch(j.code){case n.keys.UP:j.ctrlKey||j.metaKey||j.shiftKey?D(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):I(0,n.keyPanSpeed),Ee=!0;break;case n.keys.BOTTOM:j.ctrlKey||j.metaKey||j.shiftKey?D(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):I(0,-n.keyPanSpeed),Ee=!0;break;case n.keys.LEFT:j.ctrlKey||j.metaKey||j.shiftKey?P(2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):I(n.keyPanSpeed,0),Ee=!0;break;case n.keys.RIGHT:j.ctrlKey||j.metaKey||j.shiftKey?P(-2*Math.PI*n.rotateSpeed/n.domElement.clientHeight):I(-n.keyPanSpeed,0),Ee=!0;break}Ee&&(j.preventDefault(),n.update())}function re(j){if(w.length===1)h.set(j.pageX,j.pageY);else{const Ee=ue(j),Ue=.5*(j.pageX+Ee.x),et=.5*(j.pageY+Ee.y);h.set(Ue,et)}}function be(j){if(w.length===1)p.set(j.pageX,j.pageY);else{const Ee=ue(j),Ue=.5*(j.pageX+Ee.x),et=.5*(j.pageY+Ee.y);p.set(Ue,et)}}function de(j){const Ee=ue(j),Ue=j.pageX-Ee.x,et=j.pageY-Ee.y,Y=Math.sqrt(Ue*Ue+et*et);m.set(0,Y)}function U(j){n.enableZoom&&de(j),n.enablePan&&be(j)}function K(j){n.enableZoom&&de(j),n.enableRotate&&re(j)}function te(j){if(w.length==1)f.set(j.pageX,j.pageY);else{const Ue=ue(j),et=.5*(j.pageX+Ue.x),Y=.5*(j.pageY+Ue.y);f.set(et,Y)}d.subVectors(f,h).multiplyScalar(n.rotateSpeed);const Ee=n.domElement;P(2*Math.PI*d.x/Ee.clientHeight),D(2*Math.PI*d.y/Ee.clientHeight),h.copy(f)}function ce(j){if(w.length===1)g.set(j.pageX,j.pageY);else{const Ee=ue(j),Ue=.5*(j.pageX+Ee.x),et=.5*(j.pageY+Ee.y);g.set(Ue,et)}v.subVectors(g,p).multiplyScalar(n.panSpeed),I(v.x,v.y),p.copy(g)}function se(j){const Ee=ue(j),Ue=j.pageX-Ee.x,et=j.pageY-Ee.y,Y=Math.sqrt(Ue*Ue+et*et);y.set(0,Y),_.set(0,Math.pow(y.y/m.y,n.zoomSpeed)),N(_.y),m.copy(y);const De=(j.pageX+Ee.x)*.5,q=(j.pageY+Ee.y)*.5;F(De,q)}function Ne(j){n.enableZoom&&se(j),n.enablePan&&ce(j)}function Oe(j){n.enableZoom&&se(j),n.enableRotate&&te(j)}function B(j){n.enabled!==!1&&(w.length===0&&(n.domElement.setPointerCapture(j.pointerId),n.domElement.addEventListener("pointermove",z),n.domElement.addEventListener("pointerup",ne)),Ct(j),j.pointerType==="touch"?xt(j):ve(j))}function z(j){n.enabled!==!1&&(j.pointerType==="touch"?Le(j):Ae(j))}function ne(j){switch(_t(j),w.length){case 0:n.domElement.releasePointerCapture(j.pointerId),n.domElement.removeEventListener("pointermove",z),n.domElement.removeEventListener("pointerup",ne),n.dispatchEvent(GR),a=i.NONE;break;case 1:const Ee=w[0],Ue=M[Ee];xt({pointerId:Ee,pageX:Ue.x,pageY:Ue.y});break}}function ve(j){let Ee;switch(j.button){case 0:Ee=n.mouseButtons.LEFT;break;case 1:Ee=n.mouseButtons.MIDDLE;break;case 2:Ee=n.mouseButtons.RIGHT;break;default:Ee=-1}switch(Ee){case oh.DOLLY:if(n.enableZoom===!1)return;H(j),a=i.DOLLY;break;case oh.ROTATE:if(j.ctrlKey||j.metaKey||j.shiftKey){if(n.enablePan===!1)return;Q(j),a=i.PAN}else{if(n.enableRotate===!1)return;V(j),a=i.ROTATE}break;case oh.PAN:if(j.ctrlKey||j.metaKey||j.shiftKey){if(n.enableRotate===!1)return;V(j),a=i.ROTATE}else{if(n.enablePan===!1)return;Q(j),a=i.PAN}break;default:a=i.NONE}a!==i.NONE&&n.dispatchEvent(hS)}function Ae(j){switch(a){case i.ROTATE:if(n.enableRotate===!1)return;W(j);break;case i.DOLLY:if(n.enableZoom===!1)return;Z(j);break;case i.PAN:if(n.enablePan===!1)return;ee(j);break}}function we(j){n.enabled===!1||n.enableZoom===!1||a!==i.NONE||(j.preventDefault(),n.dispatchEvent(hS),he(We(j)),n.dispatchEvent(GR))}function We(j){const Ee=j.deltaMode,Ue={clientX:j.clientX,clientY:j.clientY,deltaY:j.deltaY};switch(Ee){case 1:Ue.deltaY*=16;break;case 2:Ue.deltaY*=100;break}return j.ctrlKey&&!C&&(Ue.deltaY*=10),Ue}function Be(j){j.key==="Control"&&(C=!0,n.domElement.getRootNode().addEventListener("keyup",je,{passive:!0,capture:!0}))}function je(j){j.key==="Control"&&(C=!1,n.domElement.getRootNode().removeEventListener("keyup",je,{passive:!0,capture:!0}))}function Ye(j){n.enabled===!1||n.enablePan===!1||le(j)}function xt(j){switch(J(j),w.length){case 1:switch(n.touches.ONE){case sh.ROTATE:if(n.enableRotate===!1)return;re(j),a=i.TOUCH_ROTATE;break;case sh.PAN:if(n.enablePan===!1)return;be(j),a=i.TOUCH_PAN;break;default:a=i.NONE}break;case 2:switch(n.touches.TWO){case sh.DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;U(j),a=i.TOUCH_DOLLY_PAN;break;case sh.DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;K(j),a=i.TOUCH_DOLLY_ROTATE;break;default:a=i.NONE}break;default:a=i.NONE}a!==i.NONE&&n.dispatchEvent(hS)}function Le(j){switch(J(j),a){case i.TOUCH_ROTATE:if(n.enableRotate===!1)return;te(j),n.update();break;case i.TOUCH_PAN:if(n.enablePan===!1)return;ce(j),n.update();break;case i.TOUCH_DOLLY_PAN:if(n.enableZoom===!1&&n.enablePan===!1)return;Ne(j),n.update();break;case i.TOUCH_DOLLY_ROTATE:if(n.enableZoom===!1&&n.enableRotate===!1)return;Oe(j),n.update();break;default:a=i.NONE}}function Wt(j){n.enabled!==!1&&j.preventDefault()}function Ct(j){w.push(j.pointerId)}function _t(j){delete M[j.pointerId];for(let Ee=0;Ee<w.length;Ee++)if(w[Ee]==j.pointerId){w.splice(Ee,1);return}}function J(j){let Ee=M[j.pointerId];Ee===void 0&&(Ee=new Me,M[j.pointerId]=Ee),Ee.set(j.pageX,j.pageY)}function ue(j){const Ee=j.pointerId===w[0]?w[1]:w[0];return M[Ee]}n.domElement.addEventListener("contextmenu",Wt),n.domElement.addEventListener("pointerdown",B),n.domElement.addEventListener("pointercancel",ne),n.domElement.addEventListener("wheel",we,{passive:!1}),n.domElement.getRootNode().addEventListener("keydown",Be,{passive:!0,capture:!0}),this.update()}}class mee{constructor({sizes:e,scene:t,canvas:n},i={isOrthographic:!1}){this.sizes=e,this.scene=t,this.canvas=n,this.options=Object.assign({isOrthographic:!1},i),this.setInstance()}setInstance(){this.instance=null,this.setCamera(this.options.isOrthographic),this.instance.position.set(10,10,10),this.scene.add(this.instance)}setCamera(e=!0){let t=this.sizes.width/this.sizes.height;if(e){let n=120;this.instance=new e1(-n*t,n*t,n,-n,1,1e4)}else this.instance=new Qr(45,t,1,1e4);this.setControls()}setControls(){this.controls=new rU(this.instance,this.canvas),this.controls.enableDamping=!0,this.controls.update()}resize(){let e=this.sizes.width/this.sizes.height;if(this.options.isOrthographic){let t=120;this.instance.left=-t*e,this.instance.right=t*e,this.instance.top=t,this.instance.bottom=-t}else this.instance.aspect=e;this.instance.updateProjectionMatrix()}update(){this.controls.update()}destroy(){this.controls.dispose()}}class yee{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const t=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const a=t[i],o=e+a,s=Math.abs(e)<Math.abs(a)?e-(o-a):a-(o-e);s&&(t[n++]=s),e=o}return t[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let t=this._n,n,i,a,o=0;if(t>0){for(o=e[--t];t>0&&(n=o,i=e[--t],o=n+i,a=i-(o-n),!a););t>0&&(a<0&&e[t-1]<0||a>0&&e[t-1]>0)&&(i=a*2,n=o+i,i==n-o&&(o=n))}return o}}function*_ee(r){for(const e of r)yield*lL(e)}function iU(r){return Array.from(_ee(r))}var Cn=1e-6,xee=1e-12,Qt=Math.PI,Mi=Qt/2,WR=Qt/4,Na=Qt*2,$i=180/Qt,or=Qt/180,Yn=Math.abs,aU=Math.atan,Dv=Math.atan2,er=Math.cos,See=Math.exp,Aee=Math.log,tr=Math.sin,wee=Math.sign||function(r){return r>0?1:r<0?-1:0},o1=Math.sqrt,bee=Math.tan;function Tee(r){return r>1?0:r<-1?Qt:Math.acos(r)}function Iv(r){return r>1?Mi:r<-1?-Mi:Math.asin(r)}function Mp(){}function z0(r,e){r&&XR.hasOwnProperty(r.type)&&XR[r.type](r,e)}var $R={Feature:function(r,e){z0(r.geometry,e)},FeatureCollection:function(r,e){for(var t=r.features,n=-1,i=t.length;++n<i;)z0(t[n].geometry,e)}},XR={Sphere:function(r,e){e.sphere()},Point:function(r,e){r=r.coordinates,e.point(r[0],r[1],r[2])},MultiPoint:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)r=t[n],e.point(r[0],r[1],r[2])},LineString:function(r,e){kb(r.coordinates,e,0)},MultiLineString:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)kb(t[n],e,0)},Polygon:function(r,e){YR(r.coordinates,e)},MultiPolygon:function(r,e){for(var t=r.coordinates,n=-1,i=t.length;++n<i;)YR(t[n],e)},GeometryCollection:function(r,e){for(var t=r.geometries,n=-1,i=t.length;++n<i;)z0(t[n],e)}};function kb(r,e,t){var n=-1,i=r.length-t,a;for(e.lineStart();++n<i;)a=r[n],e.point(a[0],a[1],a[2]);e.lineEnd()}function YR(r,e){var t=-1,n=r.length;for(e.polygonStart();++t<n;)kb(r[t],e,1);e.polygonEnd()}function Mee(r,e){r&&$R.hasOwnProperty(r.type)?$R[r.type](r,e):z0(r,e)}function Ob(r){return[Dv(r[1],r[0]),Iv(r[2])]}function Yf(r){var e=r[0],t=r[1],n=er(t);return[n*er(e),n*tr(e),tr(t)]}function Mm(r,e){return r[0]*e[0]+r[1]*e[1]+r[2]*e[2]}function U0(r,e){return[r[1]*e[2]-r[2]*e[1],r[2]*e[0]-r[0]*e[2],r[0]*e[1]-r[1]*e[0]]}function fS(r,e){r[0]+=e[0],r[1]+=e[1],r[2]+=e[2]}function Cm(r,e){return[r[0]*e,r[1]*e,r[2]*e]}function Fb(r){var e=o1(r[0]*r[0]+r[1]*r[1]+r[2]*r[2]);r[0]/=e,r[1]/=e,r[2]/=e}function Bb(r,e){function t(n,i){return n=r(n,i),e(n[0],n[1])}return r.invert&&e.invert&&(t.invert=function(n,i){return n=e.invert(n,i),n&&r.invert(n[0],n[1])}),t}function zb(r,e){return Yn(r)>Qt&&(r-=Math.round(r/Na)*Na),[r,e]}zb.invert=zb;function oU(r,e,t){return(r%=Na)?e||t?Bb(jR(r),KR(e,t)):jR(r):e||t?KR(e,t):zb}function qR(r){return function(e,t){return e+=r,Yn(e)>Qt&&(e-=Math.round(e/Na)*Na),[e,t]}}function jR(r){var e=qR(r);return e.invert=qR(-r),e}function KR(r,e){var t=er(r),n=tr(r),i=er(e),a=tr(e);function o(s,l){var u=er(l),c=er(s)*u,h=tr(s)*u,f=tr(l),d=f*t+c*n;return[Dv(h*i-d*a,c*t-f*n),Iv(d*i+h*a)]}return o.invert=function(s,l){var u=er(l),c=er(s)*u,h=tr(s)*u,f=tr(l),d=f*i-h*a;return[Dv(h*i+f*a,c*t+d*n),Iv(d*t-c*n)]},o}function Cee(r){r=oU(r[0]*or,r[1]*or,r.length>2?r[2]*or:0);function e(t){return t=r(t[0]*or,t[1]*or),t[0]*=$i,t[1]*=$i,t}return e.invert=function(t){return t=r.invert(t[0]*or,t[1]*or),t[0]*=$i,t[1]*=$i,t},e}function Eee(r,e,t,n,i,a){if(t){var o=er(e),s=tr(e),l=n*t;i==null?(i=e+n*Na,a=e-l/2):(i=ZR(o,i),a=ZR(o,a),(n>0?i<a:i>a)&&(i+=n*Na));for(var u,c=i;n>0?c>a:c<a;c-=l)u=Ob([o,-s*er(c),-s*tr(c)]),r.point(u[0],u[1])}}function ZR(r,e){e=Yf(e),e[0]-=r,Fb(e);var t=Tee(-e[1]);return((-e[2]<0?-t:t)+Na-Cn)%Na}function sU(){var r=[],e;return{point:function(t,n,i){e.push([t,n,i])},lineStart:function(){r.push(e=[])},lineEnd:Mp,rejoin:function(){r.length>1&&r.push(r.pop().concat(r.shift()))},result:function(){var t=r;return r=[],e=null,t}}}function Yy(r,e){return Yn(r[0]-e[0])<Cn&&Yn(r[1]-e[1])<Cn}function Em(r,e,t,n){this.x=r,this.z=e,this.o=t,this.e=n,this.v=!1,this.n=this.p=null}function lU(r,e,t,n,i){var a=[],o=[],s,l;if(r.forEach(function(p){if(!((g=p.length-1)<=0)){var g,v=p[0],m=p[g],y;if(Yy(v,m)){if(!v[2]&&!m[2]){for(i.lineStart(),s=0;s<g;++s)i.point((v=p[s])[0],v[1]);i.lineEnd();return}m[0]+=2*Cn}a.push(y=new Em(v,p,null,!0)),o.push(y.o=new Em(v,null,y,!1)),a.push(y=new Em(m,p,null,!1)),o.push(y.o=new Em(m,null,y,!0))}}),!!a.length){for(o.sort(e),QR(a),QR(o),s=0,l=o.length;s<l;++s)o[s].e=t=!t;for(var u=a[0],c,h;;){for(var f=u,d=!0;f.v;)if((f=f.n)===u)return;c=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(s=0,l=c.length;s<l;++s)i.point((h=c[s])[0],h[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(d)for(c=f.p.z,s=c.length-1;s>=0;--s)i.point((h=c[s])[0],h[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,c=f.z,d=!d}while(!f.v);i.lineEnd()}}}function QR(r){if(e=r.length){for(var e,t=0,n=r[0],i;++t<e;)n.n=i=r[t],i.p=n,n=i;n.n=i=r[0],i.p=n}}function dS(r){return Yn(r[0])<=Qt?r[0]:wee(r[0])*((Yn(r[0])+Qt)%Na-Qt)}function Lee(r,e){var t=dS(e),n=e[1],i=tr(n),a=[tr(t),-er(t),0],o=0,s=0,l=new yee;i===1?n=Mi+Cn:i===-1&&(n=-Mi-Cn);for(var u=0,c=r.length;u<c;++u)if(f=(h=r[u]).length)for(var h,f,d=h[f-1],p=dS(d),g=d[1]/2+WR,v=tr(g),m=er(g),y=0;y<f;++y,p=x,v=A,m=w,d=_){var _=h[y],x=dS(_),S=_[1]/2+WR,A=tr(S),w=er(S),M=x-p,C=M>=0?1:-1,b=C*M,T=b>Qt,P=v*A;if(l.add(Dv(P*C*tr(b),m*w+P*er(b))),o+=T?M+C*Na:M,T^p>=t^x>=t){var D=U0(Yf(d),Yf(_));Fb(D);var L=U0(a,D);Fb(L);var E=(T^M>=0?-1:1)*Iv(L[2]);(n>E||n===E&&(D[0]||D[1]))&&(s+=T^M>=0?1:-1)}}return(o<-Cn||o<Cn&&l<-xee)^s&1}function uU(r,e,t,n){return function(i){var a=e(i),o=sU(),s=e(o),l=!1,u,c,h,f={point:d,lineStart:g,lineEnd:v,polygonStart:function(){f.point=m,f.lineStart=y,f.lineEnd=_,c=[],u=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=v,c=iU(c);var x=Lee(u,n);c.length?(l||(i.polygonStart(),l=!0),lU(c,Ree,x,t,i)):x&&(l||(i.polygonStart(),l=!0),i.lineStart(),t(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),c=u=null},sphere:function(){i.polygonStart(),i.lineStart(),t(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(x,S){r(x,S)&&i.point(x,S)}function p(x,S){a.point(x,S)}function g(){f.point=p,a.lineStart()}function v(){f.point=d,a.lineEnd()}function m(x,S){h.push([x,S]),s.point(x,S)}function y(){s.lineStart(),h=[]}function _(){m(h[0][0],h[0][1]),s.lineEnd();var x=s.clean(),S=o.result(),A,w=S.length,M,C,b;if(h.pop(),u.push(h),h=null,!!w){if(x&1){if(C=S[0],(M=C.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),A=0;A<M;++A)i.point((b=C[A])[0],b[1]);i.lineEnd()}return}w>1&&x&2&&S.push(S.pop().concat(S.shift())),c.push(S.filter(Pee))}}return f}}function Pee(r){return r.length>1}function Ree(r,e){return((r=r.x)[0]<0?r[1]-Mi-Cn:Mi-r[1])-((e=e.x)[0]<0?e[1]-Mi-Cn:Mi-e[1])}const JR=uU(function(){return!0},Dee,Nee,[-Qt,-Mi]);function Dee(r){var e=NaN,t=NaN,n=NaN,i;return{lineStart:function(){r.lineStart(),i=1},point:function(a,o){var s=a>0?Qt:-Qt,l=Yn(a-e);Yn(l-Qt)<Cn?(r.point(e,t=(t+o)/2>0?Mi:-Mi),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(s,t),r.point(a,t),i=0):n!==s&&l>=Qt&&(Yn(e-n)<Cn&&(e-=n*Cn),Yn(a-s)<Cn&&(a-=s*Cn),t=Iee(e,t,a,o),r.point(n,t),r.lineEnd(),r.lineStart(),r.point(s,t),i=0),r.point(e=a,t=o),n=s},lineEnd:function(){r.lineEnd(),e=t=NaN},clean:function(){return 2-i}}}function Iee(r,e,t,n){var i,a,o=tr(r-t);return Yn(o)>Cn?aU((tr(e)*(a=er(n))*tr(t)-tr(n)*(i=er(e))*tr(r))/(i*a*o)):(e+n)/2}function Nee(r,e,t,n){var i;if(r==null)i=t*Mi,n.point(-Qt,i),n.point(0,i),n.point(Qt,i),n.point(Qt,0),n.point(Qt,-i),n.point(0,-i),n.point(-Qt,-i),n.point(-Qt,0),n.point(-Qt,i);else if(Yn(r[0]-e[0])>Cn){var a=r[0]<e[0]?Qt:-Qt;i=t*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])}function kee(r){var e=er(r),t=2*or,n=e>0,i=Yn(e)>Cn;function a(c,h,f,d){Eee(d,r,t,f,c,h)}function o(c,h){return er(c)*er(h)>e}function s(c){var h,f,d,p,g;return{lineStart:function(){p=d=!1,g=1},point:function(v,m){var y=[v,m],_,x=o(v,m),S=n?x?0:u(v,m):x?u(v+(v<0?Qt:-Qt),m):0;if(!h&&(p=d=x)&&c.lineStart(),x!==d&&(_=l(h,y),(!_||Yy(h,_)||Yy(y,_))&&(y[2]=1)),x!==d)g=0,x?(c.lineStart(),_=l(y,h),c.point(_[0],_[1])):(_=l(h,y),c.point(_[0],_[1],2),c.lineEnd()),h=_;else if(i&&h&&n^x){var A;!(S&f)&&(A=l(y,h,!0))&&(g=0,n?(c.lineStart(),c.point(A[0][0],A[0][1]),c.point(A[1][0],A[1][1]),c.lineEnd()):(c.point(A[1][0],A[1][1]),c.lineEnd(),c.lineStart(),c.point(A[0][0],A[0][1],3)))}x&&(!h||!Yy(h,y))&&c.point(y[0],y[1]),h=y,d=x,f=S},lineEnd:function(){d&&c.lineEnd(),h=null},clean:function(){return g|(p&&d)<<1}}}function l(c,h,f){var d=Yf(c),p=Yf(h),g=[1,0,0],v=U0(d,p),m=Mm(v,v),y=v[0],_=m-y*y;if(!_)return!f&&c;var x=e*m/_,S=-e*y/_,A=U0(g,v),w=Cm(g,x),M=Cm(v,S);fS(w,M);var C=A,b=Mm(w,C),T=Mm(C,C),P=b*b-T*(Mm(w,w)-1);if(!(P<0)){var D=o1(P),L=Cm(C,(-b-D)/T);if(fS(L,w),L=Ob(L),!f)return L;var E=c[0],I=h[0],N=c[1],R=h[1],F;I<E&&(F=E,E=I,I=F);var O=I-E,V=Yn(O-Qt)<Cn,H=V||O<Cn;if(!V&&R<N&&(F=N,N=R,R=F),H?V?N+R>0^L[1]<(Yn(L[0]-E)<Cn?N:R):N<=L[1]&&L[1]<=R:O>Qt^(E<=L[0]&&L[0]<=I)){var Q=Cm(C,(-b+D)/T);return fS(Q,w),[L,Ob(Q)]}}}function u(c,h){var f=n?r:Qt-r,d=0;return c<-f?d|=1:c>f&&(d|=2),h<-f?d|=4:h>f&&(d|=8),d}return uU(o,s,a,n?[0,-r]:[-Qt,r-Qt])}function Oee(r,e,t,n,i,a){var o=r[0],s=r[1],l=e[0],u=e[1],c=0,h=1,f=l-o,d=u-s,p;if(p=t-o,!(!f&&p>0)){if(p/=f,f<0){if(p<c)return;p<h&&(h=p)}else if(f>0){if(p>h)return;p>c&&(c=p)}if(p=i-o,!(!f&&p<0)){if(p/=f,f<0){if(p>h)return;p>c&&(c=p)}else if(f>0){if(p<c)return;p<h&&(h=p)}if(p=n-s,!(!d&&p>0)){if(p/=d,d<0){if(p<c)return;p<h&&(h=p)}else if(d>0){if(p>h)return;p>c&&(c=p)}if(p=a-s,!(!d&&p<0)){if(p/=d,d<0){if(p>h)return;p>c&&(c=p)}else if(d>0){if(p<c)return;p<h&&(h=p)}return c>0&&(r[0]=o+c*f,r[1]=s+c*d),h<1&&(e[0]=o+h*f,e[1]=s+h*d),!0}}}}}var Cp=1e9,Lm=-Cp;function Fee(r,e,t,n){function i(u,c){return r<=u&&u<=t&&e<=c&&c<=n}function a(u,c,h,f){var d=0,p=0;if(u==null||(d=o(u,h))!==(p=o(c,h))||l(u,c)<0^h>0)do f.point(d===0||d===3?r:t,d>1?n:e);while((d=(d+h+4)%4)!==p);else f.point(c[0],c[1])}function o(u,c){return Yn(u[0]-r)<Cn?c>0?0:3:Yn(u[0]-t)<Cn?c>0?2:1:Yn(u[1]-e)<Cn?c>0?1:0:c>0?3:2}function s(u,c){return l(u.x,c.x)}function l(u,c){var h=o(u,1),f=o(c,1);return h!==f?h-f:h===0?c[1]-u[1]:h===1?u[0]-c[0]:h===2?u[1]-c[1]:c[0]-u[0]}return function(u){var c=u,h=sU(),f,d,p,g,v,m,y,_,x,S,A,w={point:M,lineStart:P,lineEnd:D,polygonStart:b,polygonEnd:T};function M(E,I){i(E,I)&&c.point(E,I)}function C(){for(var E=0,I=0,N=d.length;I<N;++I)for(var R=d[I],F=1,O=R.length,V=R[0],H,Q,W=V[0],Z=V[1];F<O;++F)H=W,Q=Z,V=R[F],W=V[0],Z=V[1],Q<=n?Z>n&&(W-H)*(n-Q)>(Z-Q)*(r-H)&&++E:Z<=n&&(W-H)*(n-Q)<(Z-Q)*(r-H)&&--E;return E}function b(){c=h,f=[],d=[],A=!0}function T(){var E=C(),I=A&&E,N=(f=iU(f)).length;(I||N)&&(u.polygonStart(),I&&(u.lineStart(),a(null,null,1,u),u.lineEnd()),N&&lU(f,s,E,a,u),u.polygonEnd()),c=u,f=d=p=null}function P(){w.point=L,d&&d.push(p=[]),S=!0,x=!1,y=_=NaN}function D(){f&&(L(g,v),m&&x&&h.rejoin(),f.push(h.result())),w.point=M,x&&c.lineEnd()}function L(E,I){var N=i(E,I);if(d&&p.push([E,I]),S)g=E,v=I,m=N,S=!1,N&&(c.lineStart(),c.point(E,I));else if(N&&x)c.point(E,I);else{var R=[y=Math.max(Lm,Math.min(Cp,y)),_=Math.max(Lm,Math.min(Cp,_))],F=[E=Math.max(Lm,Math.min(Cp,E)),I=Math.max(Lm,Math.min(Cp,I))];Oee(R,F,r,e,t,n)?(x||(c.lineStart(),c.point(R[0],R[1])),c.point(F[0],F[1]),N||c.lineEnd(),A=!1):N&&(c.lineStart(),c.point(E,I),A=!1)}y=E,_=I,x=N}return w}}const eD=r=>r;var qf=1/0,V0=qf,Nv=-qf,G0=Nv,Bee={point:zee,lineStart:Mp,lineEnd:Mp,polygonStart:Mp,polygonEnd:Mp,result:function(){var r=[[qf,V0],[Nv,G0]];return Nv=G0=-(V0=qf=1/0),r}};function zee(r,e){r<qf&&(qf=r),r>Nv&&(Nv=r),e<V0&&(V0=e),e>G0&&(G0=e)}const tD=Bee;function EC(r){return function(e){var t=new Ub;for(var n in r)t[n]=r[n];return t.stream=e,t}}function Ub(){}Ub.prototype={constructor:Ub,point:function(r,e){this.stream.point(r,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function LC(r,e,t){var n=r.clipExtent&&r.clipExtent();return r.scale(150).translate([0,0]),n!=null&&r.clipExtent(null),Mee(t,r.stream(tD)),e(tD.result()),n!=null&&r.clipExtent(n),r}function cU(r,e,t){return LC(r,function(n){var i=e[1][0]-e[0][0],a=e[1][1]-e[0][1],o=Math.min(i/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),s=+e[0][0]+(i-o*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(a-o*(n[1][1]+n[0][1]))/2;r.scale(150*o).translate([s,l])},t)}function Uee(r,e,t){return cU(r,[[0,0],e],t)}function Vee(r,e,t){return LC(r,function(n){var i=+e,a=i/(n[1][0]-n[0][0]),o=(i-a*(n[1][0]+n[0][0]))/2,s=-a*n[0][1];r.scale(150*a).translate([o,s])},t)}function Gee(r,e,t){return LC(r,function(n){var i=+e,a=i/(n[1][1]-n[0][1]),o=-a*n[0][0],s=(i-a*(n[1][1]+n[0][1]))/2;r.scale(150*a).translate([o,s])},t)}var nD=16,Hee=er(30*or);function rD(r,e){return+e?$ee(r,e):Wee(r)}function Wee(r){return EC({point:function(e,t){e=r(e,t),this.stream.point(e[0],e[1])}})}function $ee(r,e){function t(n,i,a,o,s,l,u,c,h,f,d,p,g,v){var m=u-n,y=c-i,_=m*m+y*y;if(_>4*e&&g--){var x=o+f,S=s+d,A=l+p,w=o1(x*x+S*S+A*A),M=Iv(A/=w),C=Yn(Yn(A)-1)<Cn||Yn(a-h)<Cn?(a+h)/2:Dv(S,x),b=r(C,M),T=b[0],P=b[1],D=T-n,L=P-i,E=y*D-m*L;(E*E/_>e||Yn((m*D+y*L)/_-.5)>.3||o*f+s*d+l*p<Hee)&&(t(n,i,a,o,s,l,T,P,C,x/=w,S/=w,A,g,v),v.point(T,P),t(T,P,C,x,S,A,u,c,h,f,d,p,g,v))}}return function(n){var i,a,o,s,l,u,c,h,f,d,p,g,v={point:m,lineStart:y,lineEnd:x,polygonStart:function(){n.polygonStart(),v.lineStart=S},polygonEnd:function(){n.polygonEnd(),v.lineStart=y}};function m(M,C){M=r(M,C),n.point(M[0],M[1])}function y(){h=NaN,v.point=_,n.lineStart()}function _(M,C){var b=Yf([M,C]),T=r(M,C);t(h,f,c,d,p,g,h=T[0],f=T[1],c=M,d=b[0],p=b[1],g=b[2],nD,n),n.point(h,f)}function x(){v.point=m,n.lineEnd()}function S(){y(),v.point=A,v.lineEnd=w}function A(M,C){_(i=M,C),a=h,o=f,s=d,l=p,u=g,v.point=_}function w(){t(h,f,c,d,p,g,a,o,i,s,l,u,nD,n),v.lineEnd=x,x()}return v}}var Xee=EC({point:function(r,e){this.stream.point(r*or,e*or)}});function Yee(r){return EC({point:function(e,t){var n=r(e,t);return this.stream.point(n[0],n[1])}})}function qee(r,e,t,n,i){function a(o,s){return o*=n,s*=i,[e+r*o,t-r*s]}return a.invert=function(o,s){return[(o-e)/r*n,(t-s)/r*i]},a}function iD(r,e,t,n,i,a){if(!a)return qee(r,e,t,n,i);var o=er(a),s=tr(a),l=o*r,u=s*r,c=o/r,h=s/r,f=(s*t-o*e)/r,d=(s*e+o*t)/r;function p(g,v){return g*=n,v*=i,[l*g-u*v+e,t-u*g-l*v]}return p.invert=function(g,v){return[n*(c*g-h*v+f),i*(d-h*g-c*v)]},p}function jee(r){return Kee(function(){return r})()}function Kee(r){var e,t=150,n=480,i=250,a=0,o=0,s=0,l=0,u=0,c,h=0,f=1,d=1,p=null,g=JR,v=null,m,y,_,x=eD,S=.5,A,w,M,C,b;function T(E){return M(E[0]*or,E[1]*or)}function P(E){return E=M.invert(E[0],E[1]),E&&[E[0]*$i,E[1]*$i]}T.stream=function(E){return C&&b===E?C:C=Xee(Yee(c)(g(A(x(b=E)))))},T.preclip=function(E){return arguments.length?(g=E,p=void 0,L()):g},T.postclip=function(E){return arguments.length?(x=E,v=m=y=_=null,L()):x},T.clipAngle=function(E){return arguments.length?(g=+E?kee(p=E*or):(p=null,JR),L()):p*$i},T.clipExtent=function(E){return arguments.length?(x=E==null?(v=m=y=_=null,eD):Fee(v=+E[0][0],m=+E[0][1],y=+E[1][0],_=+E[1][1]),L()):v==null?null:[[v,m],[y,_]]},T.scale=function(E){return arguments.length?(t=+E,D()):t},T.translate=function(E){return arguments.length?(n=+E[0],i=+E[1],D()):[n,i]},T.center=function(E){return arguments.length?(a=E[0]%360*or,o=E[1]%360*or,D()):[a*$i,o*$i]},T.rotate=function(E){return arguments.length?(s=E[0]%360*or,l=E[1]%360*or,u=E.length>2?E[2]%360*or:0,D()):[s*$i,l*$i,u*$i]},T.angle=function(E){return arguments.length?(h=E%360*or,D()):h*$i},T.reflectX=function(E){return arguments.length?(f=E?-1:1,D()):f<0},T.reflectY=function(E){return arguments.length?(d=E?-1:1,D()):d<0},T.precision=function(E){return arguments.length?(A=rD(w,S=E*E),L()):o1(S)},T.fitExtent=function(E,I){return cU(T,E,I)},T.fitSize=function(E,I){return Uee(T,E,I)},T.fitWidth=function(E,I){return Vee(T,E,I)},T.fitHeight=function(E,I){return Gee(T,E,I)};function D(){var E=iD(t,0,0,f,d,h).apply(null,e(a,o)),I=iD(t,n-E[0],i-E[1],f,d,h);return c=oU(s,l,u),w=Bb(e,I),M=Bb(c,w),A=rD(w,S),L()}function L(){return C=b=null,T}return function(){return e=r.apply(this,arguments),T.invert=e.invert&&P,D()}}function PC(r,e){return[r,Aee(bee((Mi+e)/2))]}PC.invert=function(r,e){return[r,2*aU(See(e))-Mi]};function Ac(){return Zee(PC).scale(961/Na)}function Zee(r){var e=jee(r),t=e.center,n=e.scale,i=e.translate,a=e.clipExtent,o=null,s,l,u;e.scale=function(h){return arguments.length?(n(h),c()):n()},e.translate=function(h){return arguments.length?(i(h),c()):i()},e.center=function(h){return arguments.length?(t(h),c()):t()},e.clipExtent=function(h){return arguments.length?(h==null?o=s=l=u=null:(o=+h[0][0],s=+h[0][1],l=+h[1][0],u=+h[1][1]),c()):o==null?null:[[o,s],[l,u]]};function c(){var h=Qt*n(),f=e(Cee(e.rotate()).invert([0,0]));return a(o==null?[[f[0]-h,f[1]-h],[f[0]+h,f[1]+h]]:r===PC?[[Math.max(f[0]-h,o),s],[Math.min(f[0]+h,l),u]]:[[o,Math.max(f[1]-h,s)],[l,Math.min(f[1]+h,u)]])}return c()}class Qee extends a1{constructor(e,t={}){super();let n={isOrthographic:!1};this.config=Object.assign({},n,t),this.canvas=e,this.scene=new Dz,this.sizes=new TJ(this),this.time=new MJ(this),this.camera=new mee(this,{isOrthographic:this.config.isOrthographic}),this.renderer=new vee(this),this.sizes.on("resize",()=>{this.resize()}),this.time.on("tick",i=>{this.update(i)})}setAxesHelper(e=250){if(!e)return!1;let t=new jz(e);this.scene.add(t)}resize(){this.camera.resize(),this.renderer.resize()}update(e){this.camera.update(e),this.renderer.update(e)}destroy(){var e,t;this.sizes.destroy(),this.time.destroy(),this.camera.destroy(),this.renderer.destroy(),this.scene.traverse(n=>{if(n instanceof rn){n.geometry.dispose();for(const i in n.material){const a=n.material[i];a&&typeof a.dispose=="function"&&a.dispose()}}}),(t=(e=this.canvas)==null?void 0:e.parentNode)==null||t.removeChild(this.canvas)}}class Jee{constructor({material:e,time:t,size:n,diffuseColor:i,diffuseSpeed:a,diffuseWidth:o,callback:s=()=>{}}){this.time=t,this.pointShader=null,this.callback=s;let l={size:100,diffuseSpeed:15,diffuseColor:9345950,diffuseWidth:10};this.options=Object.assign({},l,{material:e,size:n,diffuseColor:i,diffuseSpeed:a,diffuseWidth:o}),this.init()}init(){let{material:e,size:t,diffuseColor:n,diffuseSpeed:i,diffuseWidth:a}=this.options,o=t/i;e.onBeforeCompile=s=>{this.pointShader=s,this.callback(s,o),s.uniforms=Xe(Re({},s.uniforms),{uTime:{value:0},uSpeed:{value:i},uWidth:{value:a},uColor:{value:new nt(n)}}),s.vertexShader=s.vertexShader.replace("void main() {",` |
|
varying vec3 vPosition; |
|
void main(){ |
|
vPosition = position; |
|
`),s.fragmentShader=s.fragmentShader.replace("void main() {",` |
|
uniform float uTime; |
|
uniform float uSpeed; |
|
uniform float uWidth; |
|
uniform vec3 uColor; |
|
varying vec3 vPosition; |
|
void main(){ |
|
`),s.fragmentShader=s.fragmentShader.replace("#include <opaque_fragment>",` |
|
#ifdef OPAQUE |
|
diffuseColor.a = 1.0; |
|
#endif |
|
|
|
#ifdef USE_TRANSMISSION |
|
diffuseColor.a *= material.transmissionAlpha; |
|
#endif |
|
|
|
float r = uTime * uSpeed; |
|
|
|
float w = uWidth; |
|
// if(w>uWidth){ |
|
// w = uWidth; |
|
// }else{ |
|
// w = uTime * 1.5; |
|
// } |
|
|
|
vec2 center = vec2(0.0, 0.0); |
|
|
|
float rDistance = distance(vPosition.xy, center); |
|
|
|
if(rDistance > r && rDistance < r + 2.0 * w) { |
|
float per = 0.0; |
|
if(rDistance < r + w) { |
|
float p = smoothstep(0.0,1.0,(rDistance - r) / w); |
|
p*=p; |
|
outgoingLight = mix(outgoingLight, uColor, p); |
|
} else { |
|
|
|
float p = smoothstep(0.0,1.0,(rDistance - r - w) / w); |
|
|
|
outgoingLight = mix(uColor, outgoingLight, p); |
|
} |
|
gl_FragColor = vec4(outgoingLight, diffuseColor.a); |
|
} else { |
|
gl_FragColor = vec4(outgoingLight, 0.0); |
|
} |
|
`)}}}let ete=class{constructor({scene:e,time:t},n){this.scene=e,this.time=t,this.instance=null;let i={position:new X(0,0,0),gridSize:100,gridDivision:20,gridColor:2635578,shapeSize:1,shapeColor:9345950,pointSize:.2,pointColor:2635578,pointLayout:{row:200,col:200},pointBlending:mc};this.options=Object.assign({},i,n),this.init()}init(){let e=new Dn;e.name="Grid";let t=this.createGridHelp(),n=this.createShapes(),i=this.createPoint();e.add(t,n,i),e.position.copy(this.options.position),this.instance=e,this.scene.add(e)}createShapes(){let{gridSize:e,gridDivision:t,shapeSize:n,shapeColor:i}=this.options,a=e/t,o=e/2,s=new Pn({color:i,side:ur}),l=[];for(let h=0;h<t+1;h++)for(let f=0;f<t+1;f++){let d=this.createPlus(n);d.translate(-o+h*a,-o+f*a,0),l.push(d)}let u=Kz(l),c=new rn(u,s);return c.renderOrder=-1,c.rotateX(-Math.PI/2),c.position.y+=.01,c}createGridHelp(){let{gridSize:e,gridDivision:t,gridColor:n}=this.options;return new wJ(e,t,n,n)}createPoint(){let{gridSize:e,pointSize:t,pointColor:n,pointBlending:i,pointLayout:a}=this.options;const o=a.row,s=a.col,l=new Float32Array(o*s*3);for(let f=0;f<o;f++)for(let d=0;d<s;d++){let p=f/(o-1)*e-e/2,g=0,v=d/(s-1)*e-e/2,m=(f*s+d)*3;l[m]=p,l[m+1]=g,l[m+2]=v}var u=new wn;u.setAttribute("position",new Gn(l,3));let c=new pg({size:t,sizeAttenuation:!0,color:n,blending:i});return new mC(u,c)}setPointMode(){}createPlus(e=50){let t=e/6/3,n=e/3,i=[new Me(-n,-t),new Me(-t,-t),new Me(-t,-n),new Me(t,-n),new Me(t,-n),new Me(t,-t),new Me(n,-t),new Me(n,t),new Me(t,t),new Me(t,n),new Me(-t,n),new Me(-t,t),new Me(-n,t)],a=new Uo(i);return new vg(a,24)}};const aD=new X,tte=new ao,oD=new X;class hU extends bn{constructor(e=document.createElement("div")){super(),this.isCSS3DObject=!0,this.element=e,this.element.style.position="absolute",this.element.style.pointerEvents="auto",this.element.style.userSelect="none",this.element.setAttribute("draggable",!1),this.addEventListener("removed",function(){this.traverse(function(t){t.element instanceof Element&&t.element.parentNode!==null&&t.element.parentNode.removeChild(t.element)})})}copy(e,t){return super.copy(e,t),this.element=e.element.cloneNode(!0),this}}class nte extends hU{constructor(e){super(e),this.isCSS3DSprite=!0,this.rotation2D=0}copy(e,t){return super.copy(e,t),this.rotation2D=e.rotation2D,this}}const fo=new Mt,rte=new Mt;class ite{constructor(e={}){const t=this;let n,i,a,o;const s={camera:{style:""},objects:new WeakMap},l=e.element!==void 0?e.element:document.createElement("div");l.style.overflow="hidden",this.domElement=l;const u=document.createElement("div");u.style.transformOrigin="0 0",u.style.pointerEvents="none",l.appendChild(u);const c=document.createElement("div");c.style.transformStyle="preserve-3d",u.appendChild(c),this.getSize=function(){return{width:n,height:i}},this.render=function(g,v){const m=v.projectionMatrix.elements[5]*o;v.view&&v.view.enabled?(u.style.transform=`translate( ${-v.view.offsetX*(n/v.view.width)}px, ${-v.view.offsetY*(i/v.view.height)}px )`,u.style.transform+=`scale( ${v.view.fullWidth/v.view.width}, ${v.view.fullHeight/v.view.height} )`):u.style.transform="",g.matrixWorldAutoUpdate===!0&&g.updateMatrixWorld(),v.parent===null&&v.matrixWorldAutoUpdate===!0&&v.updateMatrixWorld();let y,_;v.isOrthographicCamera&&(y=-(v.right+v.left)/2,_=(v.top+v.bottom)/2);const x=v.view&&v.view.enabled?v.view.height/v.view.fullHeight:1,S=v.isOrthographicCamera?`scale( ${x} )scale(`+m+")translate("+h(y)+"px,"+h(_)+"px)"+f(v.matrixWorldInverse):`scale( ${x} )translateZ(`+m+"px)"+f(v.matrixWorldInverse),w=(v.isPerspectiveCamera?"perspective("+m+"px) ":"")+S+"translate("+a+"px,"+o+"px)";s.camera.style!==w&&(c.style.transform=w,s.camera.style=w),p(g,g,v)},this.setSize=function(g,v){n=g,i=v,a=n/2,o=i/2,l.style.width=g+"px",l.style.height=v+"px",u.style.width=g+"px",u.style.height=v+"px",c.style.width=g+"px",c.style.height=v+"px"};function h(g){return Math.abs(g)<1e-10?0:g}function f(g){const v=g.elements;return"matrix3d("+h(v[0])+","+h(-v[1])+","+h(v[2])+","+h(v[3])+","+h(v[4])+","+h(-v[5])+","+h(v[6])+","+h(v[7])+","+h(v[8])+","+h(-v[9])+","+h(v[10])+","+h(v[11])+","+h(v[12])+","+h(-v[13])+","+h(v[14])+","+h(v[15])+")"}function d(g){const v=g.elements;return"translate(-50%,-50%)"+("matrix3d("+h(v[0])+","+h(v[1])+","+h(v[2])+","+h(v[3])+","+h(-v[4])+","+h(-v[5])+","+h(-v[6])+","+h(-v[7])+","+h(v[8])+","+h(v[9])+","+h(v[10])+","+h(v[11])+","+h(v[12])+","+h(v[13])+","+h(v[14])+","+h(v[15])+")")}function p(g,v,m,y){if(g.isCSS3DObject){const _=g.visible===!0&&g.layers.test(m.layers)===!0;if(g.element.style.display=_===!0?"":"none",_===!0){g.onBeforeRender(t,v,m);let x;g.isCSS3DSprite?(fo.copy(m.matrixWorldInverse),fo.transpose(),g.rotation2D!==0&&fo.multiply(rte.makeRotationZ(g.rotation2D)),g.matrixWorld.decompose(aD,tte,oD),fo.setPosition(aD),fo.scale(oD),fo.elements[3]=0,fo.elements[7]=0,fo.elements[11]=0,fo.elements[15]=1,x=d(fo)):x=d(g.matrixWorld);const S=g.element,A=s.objects.get(g);if(A===void 0||A.style!==x){S.style.transform=x;const w={style:x};s.objects.set(g,w)}S.parentNode!==c&&c.appendChild(S),g.onAfterRender(t,v,m)}}for(let _=0,x=g.children.length;_<x;_++)p(g.children[_],v,m)}}}class ate{constructor({scene:e,camera:t,time:n,sizes:i,canvas:a}){this.scene=e,this.camera=t,this.time=n,this.sizes=i,this.canvas=a,this.parent=null;let{width:o,height:s}=this.sizes,l=new ite;this.css3dRender=l,l.setSize(o,s),l.domElement.style.position="absolute",l.domElement.style.left="0px",l.domElement.style.top="0px",l.domElement.style.pointerEvents="none",l.domElement.className="label3d-"+pee(),this.canvas.parentNode.appendChild(l.domElement),this.time.on("tick",()=>{this.update()}),this.sizes.on("resize",()=>{this.resize()})}create(e="",t="",n=!1){let i=document.createElement("div");i.innerHTML=e,i.className=t,i.style.visibility="hidden",i.style.position="absolute",t||(i.style.padding="10px",i.style.color="#fff",i.style.fontSize="12px",i.style.textAlign="center",i.style.background="rgba(0,0,0,0.6)",i.style.borderRadius="4px");let a=null;return n?a=new nte(i):a=new hU(i),a.init=(o,s)=>{a.element.innerHTML=o,a.element.style.visibility="visible",a.position.copy(s)},a.hide=()=>{a.element.style.visibility="hidden"},a.scaleHide=()=>{a.element.classList.add("scale-hidden")},a.show=()=>{a.element.style.visibility="visible",a.element.classList.remove("scale-hidden")},a.setParent=o=>{this.parent=o,o.add(a)},a.remove=()=>{this.parent.remove(a)},a}setLabelStyle(e,t=.1,n="x",i=Math.PI/2,a="none"){e.element.style.pointerEvents=a,e.scale.set(t,t,t),e.rotation[n]=i}setRenderLevel(e){this.css3dRender.domElement.style.zIndex=e}update(){this.css3dRender.render(this.scene,this.camera.instance)}destroy(){if(this.css3dRender){let e=this.css3dRender.domElement;e.parentNode.removeChild(e)}}resize(){let{width:e,height:t}=this.sizes;this.css3dRender.setSize(e,t)}}class sD{constructor({time:e},t){this.time=e,this.options=Object.assign({},{width:10,scale:1,position:new X(0,0,0),needRotate:!1,rotateSpeed:.001,material:new Pn({transparent:!0,opacity:1,depthTest:!0})},t);let n=new Za(this.options.width,this.options.width),i=new rn(n,this.options.material);i.position.copy(this.options.position),i.scale.set(this.options.scale,this.options.scale,this.options.scale),this.instance=i}setParent(e){e.add(this.instance),this.time.on("tick",()=>{this.update()})}update(){this.options.needRotate&&(this.instance.rotation.z+=this.options.rotateSpeed)}}class H0{constructor({time:e},t={}){this.instance=null,this.time=e,this.enable=!0,this.config=Object.assign({num:100,range:500,speed:.01,renderOrder:99,dir:"up",material:new pg({map:H0.createTexture(),size:20,color:16777215,transparent:!0,opacity:1,depthTest:!1,vertexColors:!0,blending:Eo,sizeAttenuation:!0})},t),this.create()}create(){const{range:e,speed:t,dir:n,material:i,num:a,renderOrder:o}=this.config,s=[],l=[],u=[];for(let h=0;h<a;h++){s.push(Math.random()*e-e/2,Math.random()*e-e/2,Math.random()*e-e/2);let f=n==="up"?1:-1;u.push(Math.random()*f,(.1+Math.random())*f,.1+Math.random()*f);const d=i.color.clone();let p={};d.getHSL(p),d.setHSL(p.h,p.s,p.l*Math.random()),l.push(d.r,d.g,d.b)}const c=new wn;c.setAttribute("position",new Gn(new Float32Array(s),3)),c.setAttribute("velocities",new Gn(new Float32Array(u),3)),c.setAttribute("color",new Gn(new Float32Array(l),3)),this.instance=new mC(c,i),this.instance.renderOrder=o}static createTexture(){let e=document.createElement("canvas");e.width=1024,e.height=1024;let t=e.getContext("2d"),n=t.createRadialGradient(512,512,0,512,512,512);return n.addColorStop(0,"rgba(255,255,255,1)"),n.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=n,t.fillRect(0,0,1024,1024),new yC(e)}update(e,t){if(!this.instance)return!1;const{range:n,speed:i,dir:a}=this.config;let o=a==="up"?1:-1,s=this.instance.geometry.getAttribute("position"),l=this.instance.geometry.getAttribute("velocities");const u=s.count;for(let c=0;c<u;c++){let h=s.getX(c);s.getY(c);let f=s.getZ(c),d=l.getX(c),p=l.getY(c);l.getZ(c),h+=Math.sin(d*t)*e,f+=i*o,f>n/2&&o===1&&(f=-n/2),f<-n/2&&o==-1&&(f=n/2),s.setX(c,h),s.setZ(c,f),l.setX(c,d),l.setY(c,p)}s.needsUpdate=!0,l.needsUpdate=!0}setParent(e){e.add(this.instance),this.time.on("tick",(t,n)=>{this.enable&&this.update(t,n)})}}class pS{constructor({},e={}){this.mapGroup=new Dn,this.coordinates=[],this.config=Object.assign({position:new X(0,0,0),geoProjectionCenter:new Me(0,0),geoProjectionScale:120,data:"",renderOrder:1,merge:!1,material:new Pn({color:1582651,transparent:!0,opacity:1})},e),this.mapGroup.position.copy(this.config.position);let t=CC(this.config.data);this.create(t)}geoProjection(e){return Ac().center(this.config.geoProjectionCenter).scale(this.config.geoProjectionScale).translate([0,0])(e)}create(e){let{merge:t}=this.config,n=[];if(e.features.forEach(i=>{const a=new bn;let{name:o,center:s=[],centroid:l=[]}=i.properties;this.coordinates.push({name:o,center:s,centroid:l}),a.userData.name=o,i.geometry.coordinates.forEach(u=>{u.forEach(c=>{const h=new Uo;for(let d=0;d<c.length;d++){if(!c[d][0]||!c[d][1])return!1;const[p,g]=this.geoProjection(c[d]);d===0&&h.moveTo(p,-g),h.lineTo(p,-g)}const f=new vg(h);if(t)n.push(f);else{const d=new rn(f,this.config.material);d.renderOrder=this.config.renderOrder,d.userData.name=o,a.add(d)}})}),t||this.mapGroup.add(a)}),t){let i=Kz(n);const a=new rn(i,this.config.material);a.renderOrder=this.config.renderOrder,this.mapGroup.add(a)}}getCoordinates(){return this.coordinates}setParent(e){e.add(this.mapGroup)}}class ote{constructor({assets:e,time:t},n={}){this.mapGroup=new Dn,this.assets=e,this.time=t,this.coordinates=[],this.config=Object.assign({position:new X(0,0,0),geoProjectionCenter:new Me(0,0),geoProjectionScale:120,data:"",renderOrder:1,topFaceMaterial:new Pn({color:1582651,transparent:!0,opacity:1}),sideMaterial:new Pn({color:464171,transparent:!0,opacity:1}),depth:.1},n),this.mapGroup.position.copy(this.config.position);let i=CC(this.config.data);this.create(i)}geoProjection(e){return Ac().center(this.config.geoProjectionCenter).scale(this.config.geoProjectionScale).translate([0,0])(e)}create(e){e.features.forEach(t=>{const n=new bn;let{name:i,center:a=[],centroid:o=[]}=t.properties;this.coordinates.push({name:i,center:a,centroid:o});const s={depth:this.config.depth,bevelEnabled:!0,bevelSegments:1,bevelThickness:.1};let l=[this.config.topFaceMaterial,this.config.sideMaterial];t.geometry.coordinates.forEach(u=>{u.forEach((c,h)=>{const f=new Uo;for(let g=0;g<c.length;g++){if(!c[g][0]||!c[g][1])return!1;const[v,m]=this.geoProjection(c[g]);g===0&&f.moveTo(v,-m),f.lineTo(v,-m)}const d=new r1(f,s),p=new rn(d,l);n.add(p)})}),this.mapGroup.add(n)})}getCoordinates(){return this.coordinates}setParent(e){e.add(this.mapGroup)}}const lD=new Oa,Pm=new X;class fU extends uJ{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry";const e=[-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],t=[-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],n=[0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5];this.setIndex(n),this.setAttribute("position",new Nn(e,3)),this.setAttribute("uv",new Nn(t,2))}applyMatrix4(e){const t=this.attributes.instanceStart,n=this.attributes.instanceEnd;return t!==void 0&&(t.applyMatrix4(e),n.applyMatrix4(e),t.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Pb(t,6,1);return this.setAttribute("instanceStart",new Ja(n,3,0)),this.setAttribute("instanceEnd",new Ja(n,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));const n=new Pb(t,6,1);return this.setAttribute("instanceColorStart",new Ja(n,3,0)),this.setAttribute("instanceColorEnd",new Ja(n,3,3)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new XQ(e.geometry)),this}fromLineSegments(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Oa);const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;e!==void 0&&t!==void 0&&(this.boundingBox.setFromBufferAttribute(e),lD.setFromBufferAttribute(t),this.boundingBox.union(lD))}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new Fa),this.boundingBox===null&&this.computeBoundingBox();const e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(e!==void 0&&t!==void 0){const n=this.boundingSphere.center;this.boundingBox.getCenter(n);let i=0;for(let a=0,o=e.count;a<o;a++)Pm.fromBufferAttribute(e,a),i=Math.max(i,n.distanceToSquared(Pm)),Pm.fromBufferAttribute(t,a),i=Math.max(i,n.distanceToSquared(Pm));this.boundingSphere.radius=Math.sqrt(i),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}Ve.line={worldUnits:{value:1},linewidth:{value:1},resolution:{value:new Me(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}};Ai.line={uniforms:uC.merge([Ve.common,Ve.fog,Ve.line]),vertexShader:` |
|
#include <common> |
|
#include <color_pars_vertex> |
|
#include <fog_pars_vertex> |
|
#include <logdepthbuf_pars_vertex> |
|
#include <clipping_planes_pars_vertex> |
|
|
|
uniform float linewidth; |
|
uniform vec2 resolution; |
|
|
|
attribute vec3 instanceStart; |
|
attribute vec3 instanceEnd; |
|
|
|
attribute vec3 instanceColorStart; |
|
attribute vec3 instanceColorEnd; |
|
|
|
#ifdef WORLD_UNITS |
|
|
|
varying vec4 worldPos; |
|
varying vec3 worldStart; |
|
varying vec3 worldEnd; |
|
|
|
#ifdef USE_DASH |
|
|
|
varying vec2 vUv; |
|
|
|
#endif |
|
|
|
#else |
|
|
|
varying vec2 vUv; |
|
|
|
#endif |
|
|
|
#ifdef USE_DASH |
|
|
|
uniform float dashScale; |
|
attribute float instanceDistanceStart; |
|
attribute float instanceDistanceEnd; |
|
varying float vLineDistance; |
|
|
|
#endif |
|
|
|
void trimSegment( const in vec4 start, inout vec4 end ) { |
|
|
|
// trim end segment so it terminates between the camera plane and the near plane |
|
|
|
// conservative estimate of the near plane |
|
float a = projectionMatrix[ 2 ][ 2 ]; // 3nd entry in 3th column |
|
float b = projectionMatrix[ 3 ][ 2 ]; // 3nd entry in 4th column |
|
float nearEstimate = - 0.5 * b / a; |
|
|
|
float alpha = ( nearEstimate - start.z ) / ( end.z - start.z ); |
|
|
|
end.xyz = mix( start.xyz, end.xyz, alpha ); |
|
|
|
} |
|
|
|
void main() { |
|
|
|
#ifdef USE_COLOR |
|
|
|
vColor.xyz = ( position.y < 0.5 ) ? instanceColorStart : instanceColorEnd; |
|
|
|
#endif |
|
|
|
#ifdef USE_DASH |
|
|
|
vLineDistance = ( position.y < 0.5 ) ? dashScale * instanceDistanceStart : dashScale * instanceDistanceEnd; |
|
vUv = uv; |
|
|
|
#endif |
|
|
|
float aspect = resolution.x / resolution.y; |
|
|
|
// camera space |
|
vec4 start = modelViewMatrix * vec4( instanceStart, 1.0 ); |
|
vec4 end = modelViewMatrix * vec4( instanceEnd, 1.0 ); |
|
|
|
#ifdef WORLD_UNITS |
|
|
|
worldStart = start.xyz; |
|
worldEnd = end.xyz; |
|
|
|
#else |
|
|
|
vUv = uv; |
|
|
|
#endif |
|
|
|
// special case for perspective projection, and segments that terminate either in, or behind, the camera plane |
|
// clearly the gpu firmware has a way of addressing this issue when projecting into ndc space |
|
// but we need to perform ndc-space calculations in the shader, so we must address this issue directly |
|
// perhaps there is a more elegant solution -- WestLangley |
|
|
|
bool perspective = ( projectionMatrix[ 2 ][ 3 ] == - 1.0 ); // 4th entry in the 3rd column |
|
|
|
if ( perspective ) { |
|
|
|
if ( start.z < 0.0 && end.z >= 0.0 ) { |
|
|
|
trimSegment( start, end ); |
|
|
|
} else if ( end.z < 0.0 && start.z >= 0.0 ) { |
|
|
|
trimSegment( end, start ); |
|
|
|
} |
|
|
|
} |
|
|
|
// clip space |
|
vec4 clipStart = projectionMatrix * start; |
|
vec4 clipEnd = projectionMatrix * end; |
|
|
|
// ndc space |
|
vec3 ndcStart = clipStart.xyz / clipStart.w; |
|
vec3 ndcEnd = clipEnd.xyz / clipEnd.w; |
|
|
|
// direction |
|
vec2 dir = ndcEnd.xy - ndcStart.xy; |
|
|
|
// account for clip-space aspect ratio |
|
dir.x *= aspect; |
|
dir = normalize( dir ); |
|
|
|
#ifdef WORLD_UNITS |
|
|
|
vec3 worldDir = normalize( end.xyz - start.xyz ); |
|
vec3 tmpFwd = normalize( mix( start.xyz, end.xyz, 0.5 ) ); |
|
vec3 worldUp = normalize( cross( worldDir, tmpFwd ) ); |
|
vec3 worldFwd = cross( worldDir, worldUp ); |
|
worldPos = position.y < 0.5 ? start: end; |
|
|
|
// height offset |
|
float hw = linewidth * 0.5; |
|
worldPos.xyz += position.x < 0.0 ? hw * worldUp : - hw * worldUp; |
|
|
|
// don't extend the line if we're rendering dashes because we |
|
// won't be rendering the endcaps |
|
#ifndef USE_DASH |
|
|
|
// cap extension |
|
worldPos.xyz += position.y < 0.5 ? - hw * worldDir : hw * worldDir; |
|
|
|
// add width to the box |
|
worldPos.xyz += worldFwd * hw; |
|
|
|
// endcaps |
|
if ( position.y > 1.0 || position.y < 0.0 ) { |
|
|
|
worldPos.xyz -= worldFwd * 2.0 * hw; |
|
|
|
} |
|
|
|
#endif |
|
|
|
// project the worldpos |
|
vec4 clip = projectionMatrix * worldPos; |
|
|
|
// shift the depth of the projected points so the line |
|
// segments overlap neatly |
|
vec3 clipPose = ( position.y < 0.5 ) ? ndcStart : ndcEnd; |
|
clip.z = clipPose.z * clip.w; |
|
|
|
#else |
|
|
|
vec2 offset = vec2( dir.y, - dir.x ); |
|
// undo aspect ratio adjustment |
|
dir.x /= aspect; |
|
offset.x /= aspect; |
|
|
|
// sign flip |
|
if ( position.x < 0.0 ) offset *= - 1.0; |
|
|
|
// endcaps |
|
if ( position.y < 0.0 ) { |
|
|
|
offset += - dir; |
|
|
|
} else if ( position.y > 1.0 ) { |
|
|
|
offset += dir; |
|
|
|
} |
|
|
|
// adjust for linewidth |
|
offset *= linewidth; |
|
|
|
// adjust for clip-space to screen-space conversion // maybe resolution should be based on viewport ... |
|
offset /= resolution.y; |
|
|
|
// select end |
|
vec4 clip = ( position.y < 0.5 ) ? clipStart : clipEnd; |
|
|
|
// back to clip space |
|
offset *= clip.w; |
|
|
|
clip.xy += offset; |
|
|
|
#endif |
|
|
|
gl_Position = clip; |
|
|
|
vec4 mvPosition = ( position.y < 0.5 ) ? start : end; // this is an approximation |
|
|
|
#include <logdepthbuf_vertex> |
|
#include <clipping_planes_vertex> |
|
#include <fog_vertex> |
|
|
|
} |
|
`,fragmentShader:` |
|
uniform vec3 diffuse; |
|
uniform float opacity; |
|
uniform float linewidth; |
|
|
|
#ifdef USE_DASH |
|
|
|
uniform float dashOffset; |
|
uniform float dashSize; |
|
uniform float gapSize; |
|
|
|
#endif |
|
|
|
varying float vLineDistance; |
|
|
|
#ifdef WORLD_UNITS |
|
|
|
varying vec4 worldPos; |
|
varying vec3 worldStart; |
|
varying vec3 worldEnd; |
|
|
|
#ifdef USE_DASH |
|
|
|
varying vec2 vUv; |
|
|
|
#endif |
|
|
|
#else |
|
|
|
varying vec2 vUv; |
|
|
|
#endif |
|
|
|
#include <common> |
|
#include <color_pars_fragment> |
|
#include <fog_pars_fragment> |
|
#include <logdepthbuf_pars_fragment> |
|
#include <clipping_planes_pars_fragment> |
|
|
|
vec2 closestLineToLine(vec3 p1, vec3 p2, vec3 p3, vec3 p4) { |
|
|
|
float mua; |
|
float mub; |
|
|
|
vec3 p13 = p1 - p3; |
|
vec3 p43 = p4 - p3; |
|
|
|
vec3 p21 = p2 - p1; |
|
|
|
float d1343 = dot( p13, p43 ); |
|
float d4321 = dot( p43, p21 ); |
|
float d1321 = dot( p13, p21 ); |
|
float d4343 = dot( p43, p43 ); |
|
float d2121 = dot( p21, p21 ); |
|
|
|
float denom = d2121 * d4343 - d4321 * d4321; |
|
|
|
float numer = d1343 * d4321 - d1321 * d4343; |
|
|
|
mua = numer / denom; |
|
mua = clamp( mua, 0.0, 1.0 ); |
|
mub = ( d1343 + d4321 * ( mua ) ) / d4343; |
|
mub = clamp( mub, 0.0, 1.0 ); |
|
|
|
return vec2( mua, mub ); |
|
|
|
} |
|
|
|
void main() { |
|
|
|
#include <clipping_planes_fragment> |
|
|
|
#ifdef USE_DASH |
|
|
|
if ( vUv.y < - 1.0 || vUv.y > 1.0 ) discard; // discard endcaps |
|
|
|
if ( mod( vLineDistance + dashOffset, dashSize + gapSize ) > dashSize ) discard; // todo - FIX |
|
|
|
#endif |
|
|
|
float alpha = opacity; |
|
|
|
#ifdef WORLD_UNITS |
|
|
|
// Find the closest points on the view ray and the line segment |
|
vec3 rayEnd = normalize( worldPos.xyz ) * 1e5; |
|
vec3 lineDir = worldEnd - worldStart; |
|
vec2 params = closestLineToLine( worldStart, worldEnd, vec3( 0.0, 0.0, 0.0 ), rayEnd ); |
|
|
|
vec3 p1 = worldStart + lineDir * params.x; |
|
vec3 p2 = rayEnd * params.y; |
|
vec3 delta = p1 - p2; |
|
float len = length( delta ); |
|
float norm = len / linewidth; |
|
|
|
#ifndef USE_DASH |
|
|
|
#ifdef USE_ALPHA_TO_COVERAGE |
|
|
|
float dnorm = fwidth( norm ); |
|
alpha = 1.0 - smoothstep( 0.5 - dnorm, 0.5 + dnorm, norm ); |
|
|
|
#else |
|
|
|
if ( norm > 0.5 ) { |
|
|
|
discard; |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#else |
|
|
|
#ifdef USE_ALPHA_TO_COVERAGE |
|
|
|
// artifacts appear on some hardware if a derivative is taken within a conditional |
|
float a = vUv.x; |
|
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; |
|
float len2 = a * a + b * b; |
|
float dlen = fwidth( len2 ); |
|
|
|
if ( abs( vUv.y ) > 1.0 ) { |
|
|
|
alpha = 1.0 - smoothstep( 1.0 - dlen, 1.0 + dlen, len2 ); |
|
|
|
} |
|
|
|
#else |
|
|
|
if ( abs( vUv.y ) > 1.0 ) { |
|
|
|
float a = vUv.x; |
|
float b = ( vUv.y > 0.0 ) ? vUv.y - 1.0 : vUv.y + 1.0; |
|
float len2 = a * a + b * b; |
|
|
|
if ( len2 > 1.0 ) discard; |
|
|
|
} |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
vec4 diffuseColor = vec4( diffuse, alpha ); |
|
|
|
#include <logdepthbuf_fragment> |
|
#include <color_fragment> |
|
|
|
gl_FragColor = vec4( diffuseColor.rgb, alpha ); |
|
|
|
#include <tonemapping_fragment> |
|
#include <colorspace_fragment> |
|
#include <fog_fragment> |
|
#include <premultiplied_alpha_fragment> |
|
|
|
} |
|
`};class dU extends Ls{constructor(e){super({type:"LineMaterial",uniforms:uC.clone(Ai.line.uniforms),vertexShader:Ai.line.vertexShader,fragmentShader:Ai.line.fragmentShader,clipping:!0}),this.isLineMaterial=!0,this.setValues(e)}get color(){return this.uniforms.diffuse.value}set color(e){this.uniforms.diffuse.value=e}get worldUnits(){return"WORLD_UNITS"in this.defines}set worldUnits(e){e===!0?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}get linewidth(){return this.uniforms.linewidth.value}set linewidth(e){this.uniforms.linewidth&&(this.uniforms.linewidth.value=e)}get dashed(){return"USE_DASH"in this.defines}set dashed(e){e===!0!==this.dashed&&(this.needsUpdate=!0),e===!0?this.defines.USE_DASH="":delete this.defines.USE_DASH}get dashScale(){return this.uniforms.dashScale.value}set dashScale(e){this.uniforms.dashScale.value=e}get dashSize(){return this.uniforms.dashSize.value}set dashSize(e){this.uniforms.dashSize.value=e}get dashOffset(){return this.uniforms.dashOffset.value}set dashOffset(e){this.uniforms.dashOffset.value=e}get gapSize(){return this.uniforms.gapSize.value}set gapSize(e){this.uniforms.gapSize.value=e}get opacity(){return this.uniforms.opacity.value}set opacity(e){this.uniforms&&(this.uniforms.opacity.value=e)}get resolution(){return this.uniforms.resolution.value}set resolution(e){this.uniforms.resolution.value.copy(e)}get alphaToCoverage(){return"USE_ALPHA_TO_COVERAGE"in this.defines}set alphaToCoverage(e){this.defines&&(e===!0!==this.alphaToCoverage&&(this.needsUpdate=!0),e===!0?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1))}}const uD=new X,cD=new X,Pr=new an,Rr=new an,po=new an,vS=new X,gS=new Mt,Ir=new AJ,hD=new X,Rm=new Oa,Dm=new Fa,vo=new an;let Do,wc;function fD(r,e,t){return vo.set(0,0,-e,1).applyMatrix4(r.projectionMatrix),vo.multiplyScalar(1/vo.w),vo.x=wc/t.width,vo.y=wc/t.height,vo.applyMatrix4(r.projectionMatrixInverse),vo.multiplyScalar(1/vo.w),Math.abs(Math.max(vo.x,vo.y))}function ste(r,e){const t=r.matrixWorld,n=r.geometry,i=n.attributes.instanceStart,a=n.attributes.instanceEnd,o=Math.min(n.instanceCount,i.count);for(let s=0,l=o;s<l;s++){Ir.start.fromBufferAttribute(i,s),Ir.end.fromBufferAttribute(a,s),Ir.applyMatrix4(t);const u=new X,c=new X;Do.distanceSqToSegment(Ir.start,Ir.end,c,u),c.distanceTo(u)<wc*.5&&e.push({point:c,pointOnLine:u,distance:Do.origin.distanceTo(c),object:r,face:null,faceIndex:s,uv:null,uv1:null})}}function lte(r,e,t){const n=e.projectionMatrix,a=r.material.resolution,o=r.matrixWorld,s=r.geometry,l=s.attributes.instanceStart,u=s.attributes.instanceEnd,c=Math.min(s.instanceCount,l.count),h=-e.near;Do.at(1,po),po.w=1,po.applyMatrix4(e.matrixWorldInverse),po.applyMatrix4(n),po.multiplyScalar(1/po.w),po.x*=a.x/2,po.y*=a.y/2,po.z=0,vS.copy(po),gS.multiplyMatrices(e.matrixWorldInverse,o);for(let f=0,d=c;f<d;f++){if(Pr.fromBufferAttribute(l,f),Rr.fromBufferAttribute(u,f),Pr.w=1,Rr.w=1,Pr.applyMatrix4(gS),Rr.applyMatrix4(gS),Pr.z>h&&Rr.z>h)continue;if(Pr.z>h){const _=Pr.z-Rr.z,x=(Pr.z-h)/_;Pr.lerp(Rr,x)}else if(Rr.z>h){const _=Rr.z-Pr.z,x=(Rr.z-h)/_;Rr.lerp(Pr,x)}Pr.applyMatrix4(n),Rr.applyMatrix4(n),Pr.multiplyScalar(1/Pr.w),Rr.multiplyScalar(1/Rr.w),Pr.x*=a.x/2,Pr.y*=a.y/2,Rr.x*=a.x/2,Rr.y*=a.y/2,Ir.start.copy(Pr),Ir.start.z=0,Ir.end.copy(Rr),Ir.end.z=0;const g=Ir.closestPointToPointParameter(vS,!0);Ir.at(g,hD);const v=sC.lerp(Pr.z,Rr.z,g),m=v>=-1&&v<=1,y=vS.distanceTo(hD)<wc*.5;if(m&&y){Ir.start.fromBufferAttribute(l,f),Ir.end.fromBufferAttribute(u,f),Ir.start.applyMatrix4(o),Ir.end.applyMatrix4(o);const _=new X,x=new X;Do.distanceSqToSegment(Ir.start,Ir.end,x,_),t.push({point:x,pointOnLine:_,distance:Do.origin.distanceTo(x),object:r,face:null,faceIndex:f,uv:null,uv1:null})}}}class ute extends rn{constructor(e=new fU,t=new dU({color:Math.random()*16777215})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){const e=this.geometry,t=e.attributes.instanceStart,n=e.attributes.instanceEnd,i=new Float32Array(2*t.count);for(let o=0,s=0,l=t.count;o<l;o++,s+=2)uD.fromBufferAttribute(t,o),cD.fromBufferAttribute(n,o),i[s]=s===0?0:i[s-1],i[s+1]=i[s]+uD.distanceTo(cD);const a=new Pb(i,2,1);return e.setAttribute("instanceDistanceStart",new Ja(a,1,0)),e.setAttribute("instanceDistanceEnd",new Ja(a,1,1)),this}raycast(e,t){const n=this.material.worldUnits,i=e.camera;i===null&&!n&&console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');const a=e.params.Line2!==void 0&&e.params.Line2.threshold||0;Do=e.ray;const o=this.matrixWorld,s=this.geometry,l=this.material;wc=l.linewidth+a,s.boundingSphere===null&&s.computeBoundingSphere(),Dm.copy(s.boundingSphere).applyMatrix4(o);let u;if(n)u=wc*.5;else{const h=Math.max(i.near,Dm.distanceToPoint(Do.origin));u=fD(i,h,l.resolution)}if(Dm.radius+=u,Do.intersectsSphere(Dm)===!1)return;s.boundingBox===null&&s.computeBoundingBox(),Rm.copy(s.boundingBox).applyMatrix4(o);let c;if(n)c=wc*.5;else{const h=Math.max(i.near,Rm.distanceToPoint(Do.origin));c=fD(i,h,l.resolution)}Rm.expandByScalar(c),Do.intersectsBox(Rm)!==!1&&(n?ste(this,t):lte(this,i,t))}}class pU extends fU{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setPositions(n),this}setColors(e){const t=e.length-3,n=new Float32Array(2*t);for(let i=0;i<t;i+=3)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];return super.setColors(n),this}fromLine(e){const t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class cte extends ute{constructor(e=new pU,t=new dU({color:Math.random()*16777215})){super(e,t),this.isLine2=!0,this.type="Line2"}}let mS=class{constructor({},e={}){this.config=Object.assign({visibelProvince:"",geoProjectionCenter:[0,0],geoProjectionScale:120,position:new X(0,0,0),data:"",material:new ys({color:16777215}),type:"LineLoop",renderOrder:1,tubeRadius:.2},e);let t=CC(this.config.data),n=this.create(t);this.lineGroup=n,this.lineGroup.position.copy(this.config.position)}geoProjection(e){return Ac().center(this.config.geoProjectionCenter).scale(this.config.geoProjectionScale).translate([0,0])(e)}create(e){const{type:t,visibelProvince:n}=this.config;let i=e.features,a=new Dn;for(let o=0;o<i.length;o++){const s=i[o];let l=new Dn;l.name="meshLineGroup"+o,s.properties.name!==n&&(s.geometry.coordinates.forEach(u=>{const c=[];let h=null;t==="Line2"?(u[0].forEach(f=>{const[d,p]=this.geoProjection(f);c.push(d,-p,0)}),h=this.createLine2(c)):t==="Line3"?(u[0].forEach(f=>{const[d,p]=this.geoProjection(f);c.push(new X(d,-p,0))}),h=this.createLine3(c)):u[0].forEach(f=>{const[d,p]=this.geoProjection(f);c.push(new X(d,-p,0)),h=this.createLine(c)}),l.add(h)}),a.add(l))}return a}createLine3(e){const t=this.config.tubeRadius,n=256*10,i=4,a=!1,{material:o,renderOrder:s}=this.config,l=new kz(e),u=new SC(l,n,t,i,a),c=new rn(u,o);return c.name="mapLine3",c.renderOrder=s,c}createLine2(e){const{material:t,renderOrder:n}=this.config,i=new pU;i.setPositions(e);let a=new cte(i,t);return a.name="mapLine2",a.renderOrder=n,a.computeLineDistances(),a}createLine(e){const{material:t,renderOrder:n,type:i}=this.config,a=new wn;a.setFromPoints(e);let o=new O0(a,t);return o.renderOrder=n,o.name="mapLine",o}setParent(e){e.add(this.lineGroup)}};class dD{constructor(e,t){this.shader=null,this.config=Object.assign({uColor1:2781042,uColor2:860197,size:15,dir:"x"},t),this.init(e)}init(e){let{uColor1:t,uColor2:n,dir:i,size:a}=this.config,o={x:1,y:2,z:3};e.onBeforeCompile=s=>{this.shader=s,s.uniforms=Xe(Re({},s.uniforms),{uColor1:{value:new nt(t)},uColor2:{value:new nt(n)},uDir:{value:o[i]},uSize:{value:a}}),s.vertexShader=s.vertexShader.replace("void main() {",` |
|
attribute float alpha; |
|
varying vec3 vPosition; |
|
varying float vAlpha; |
|
void main() { |
|
vAlpha = alpha; |
|
vPosition = position; |
|
`),s.fragmentShader=s.fragmentShader.replace("void main() {",` |
|
varying vec3 vPosition; |
|
varying float vAlpha; |
|
uniform vec3 uColor1; |
|
uniform vec3 uColor2; |
|
uniform float uDir; |
|
uniform float uSize; |
|
|
|
void main() { |
|
`),s.fragmentShader=s.fragmentShader.replace("#include <opaque_fragment>",` |
|
#ifdef OPAQUE |
|
diffuseColor.a = 1.0; |
|
#endif |
|
|
|
// https://github.com/mrdoob/three.js/pull/22425 |
|
#ifdef USE_TRANSMISSION |
|
diffuseColor.a *= transmissionAlpha + 0.1; |
|
#endif |
|
// vec3 gradient = mix(uColor1, uColor2, vPosition.x / 15.0); |
|
vec3 gradient = vec3(0.0,0.0,0.0); |
|
if(uDir==1.0){ |
|
gradient = mix(uColor1, uColor2, vPosition.x/ uSize); |
|
}else if(uDir==2.0){ |
|
gradient = mix(uColor1, uColor2, vPosition.z/ uSize); |
|
}else if(uDir==3.0){ |
|
gradient = mix(uColor1, uColor2, vPosition.y/ uSize); |
|
} |
|
outgoingLight = outgoingLight * gradient; |
|
|
|
|
|
gl_FragColor = vec4( outgoingLight, diffuseColor.a ); |
|
`)}}}const hte="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAK+SURBVHgB7dzNbdswGIdxSugCRtGBuklWSO17nXs/J0hHywA11AEMu3wDsLFT5WCJ5PtI/D8nQ5cA/FmxJJLqtofhHBSmPihUAoElEFgCgfVu7ODX95suqOKNXVDpDIElEFgCgSUQWAKBJRBYAoE1G2Q3DJ/j9fRjUGE7DI+f4niEGc0CMYzzKezjx7vWUQwjnMJdF8djDsq8M+QYLu/om0VJGP8OXI/LTc0C+fJhs4/fiIeLQ82hvMaI/zEevsVxCROb/RvSMkpuDCvLVVaLKCUwrGyXvS2hlMKwst6HtIBSEsPKfmO4ZpTSGFaRO/U1otTAsIo9OlkTSi0Mq+izrDWg1MSwij9cXDJKbQyrytPeJaJ4YFjVHr8vCcULw6o6H7IEFE8Mq/oEFRnFG8NymTEkohAwLLcpXBIKBcNynVMnoJAwLPdFDp4oNAwLserEA4WIYXVjK7C9Vr+fY8Gh7e8/Lhha/f5GhDMjJRBYAoElEFgCgSUQWAKBJRBYAoElEFgCgSUQWAKBJRBYAoElEFgCgSUQWAKBJRBYAoElEFgCgSUQWAKBJZDwvIIQs2kIA/K81tYvzKYhBMh/75vyCYHiDgLBSLmjuIK8xrBV6J1HoO11biCk/Rmk7XUuIMTNMhSU6iDUnUsWAaUqCBkj5Y1SDWQJGClPlCogS8JIeaEUB1kiRsoDpSjIkjFStVGKgawBI1UTpQjImjBStVCyg6wRI1UDJSvImjFSpVGygbSAkSqJkgWkJYxUKZTZIC1ipEqgzAJpGSOVG2UyiDBeyokyCWR3OOyFcd0Yyu4wfA83Ngnk2Pe/ziE82WdhvHSJYuNz7MPPcGOTQH5sNk+nPnyMf/xeGNcZSvyS3tv42DiFG0O94q+19Iq/BSQQWAKBJRBYAoElEFgCgSUQWKM3hsovnSGwBAJLILAEAusvLK6Na4P/Au0AAAAASUVORK5CYII=",fte=[{name:"邛溪镇",center:[102.60242339873115,32.83022561372293],centroid:[102.60242339873115,32.83022561372293]},{name:"刷经寺镇",center:[102.55651980382184,32.204097908180216],centroid:[102.55651980382184,32.204097908180216]},{name:"安曲镇",center:[102.38447320923945,32.696113484169786],centroid:[102.38447320923945,32.696113484169786]},{name:"龙日镇",center:[102.48704663740175,32.471364980560764],centroid:[102.48704663740175,32.471364980560764]},{name:"江茸乡",center:[102.29046083534963,32.355689518554044],centroid:[102.29046083534963,32.355689518554044]},{name:"查尔玛乡",center:[102.03268479676977,32.440590072394265],centroid:[102.03268479676977,32.440590072394265]},{name:"瓦切镇",center:[102.71535664604494,33.12869670968013],centroid:[102.71535664604494,33.12869670968013]},{name:"阿木乡",center:[102.77925597565002,32.73632379185147],centroid:[102.77925597565002,32.73632379185147]},{name:"麦洼乡",center:[102.95718106156616,33.15445682575394],centroid:[102.95718106156616,33.15445682575394]},{name:"色地镇",center:[103.12540730227074,33.010462261362875],centroid:[103.12540730227074,33.010462261362875]}],pD=[{name:"色地镇",enName:"sedi",center:[103.12540730227074,33.010462261362875],centroid:[103.12540730227074,33.010462261362875],value:1199},{name:"瓦切镇",enName:"waqie",center:[102.71535664604494,33.12869670968013],centroid:[102.71535664604494,33.12869670968013],value:991},{name:"刷经寺镇",enName:"shuajingsi",center:[102.55651980382184,32.204097908180216],centroid:[102.55651980382184,32.204097908180216],value:986},{name:"邛溪镇",enName:"qiongxi",center:[102.60242339873115,32.83022561372293],centroid:[102.60242339873115,32.83022561372293],value:896},{name:"阿木乡",enName:"amu",center:[102.77925597565002,32.73632379185147],centroid:[102.77925597565002,32.73632379185147],value:892},{name:"安曲镇",enName:"anqu",center:[102.38447320923945,32.696113484169786],centroid:[102.38447320923945,32.696113484169786],value:885},{name:"查尔玛乡",enName:"chaerma",center:[102.03268479676977,32.440590072394265],centroid:[102.03268479676977,32.440590072394265],value:729},{name:"龙日镇",enName:"longri",center:[102.48704663740175,32.471364980560764],centroid:[102.48704663740175,32.471364980560764],value:645},{name:"麦洼乡",enName:"maiwa",center:[102.95718106156616,33.15445682575394],centroid:[102.95718106156616,33.15445682575394],value:559},{name:"江茸乡",enName:"jiangrong",center:[102.29046083534963,32.355689518554044],centroid:[102.29046083534963,32.355689518554044],value:514}],dte=[{value:180,lng:102.60242339873115,lat:32.83022561372293},{value:160,lng:102.55651980382184,lat:32.204097908180216},{value:150,lng:102.38447320923945,lat:32.696113484169786},{value:177,lng:102.48704663740175,lat:32.471364980560764},{value:130,lng:102.29046083534963,lat:32.355689518554044},{value:165,lng:102.03268479676977,lat:32.440590072394265},{value:165,lng:102.71535664604494,lat:33.12869670968013},{value:132,lng:102.77925597565002,lat:32.73632379185147},{value:158,lng:102.95718106156616,lat:33.15445682575394},{value:187,lng:103.12540730227074,lat:33.010462261362875}],pte=[{name:"邛溪镇",level:"县城驻地",value:895.94,lng:102.60242339873115,lat:32.83022561372293},{name:"瓦切镇",level:"北部牧区",value:991,lng:102.71535664604494,lat:33.12869670968013},{name:"刷经寺镇",level:"南部通道",value:986.44,lng:102.55651980382184,lat:32.204097908180216},{name:"色地镇",level:"东部片区",value:1199.06,lng:103.12540730227074,lat:33.010462261362875}];var vD=class{constructor(r,e){bt(this,"target");bt(this,"name");bt(this,"intersected");bt(this,"wasIntersected",!1);bt(this,"wasIntersectedOnMouseDown",!1);bt(this,"distance");this.target=r,this.name=e,this.intersected=!1,this.distance=0}},yi=class{constructor(e,t=null){bt(this,"type");bt(this,"cancelBubble");bt(this,"originalEvent");bt(this,"coords",new Me(0,0));bt(this,"distance",0);bt(this,"intersected",!1);bt(this,"wasIntersected",!1);bt(this,"wasIntersectedOnMouseDown",!1);this.cancelBubble=!1,this.type=e,this.originalEvent=t}stopPropagation(){this.cancelBubble=!0}},vte=class{constructor(r,e,t,n){bt(this,"renderer");bt(this,"camera");bt(this,"domElement");bt(this,"bindEventsOnBodyElement");bt(this,"autoAdd");bt(this,"scene");bt(this,"mouse");bt(this,"supportsPointerEvents");bt(this,"interactiveObjects");bt(this,"closestObject");bt(this,"raycaster");bt(this,"treatTouchEventsAsMouseEvents");bt(this,"dispose",()=>{this.domElement.removeEventListener("click",this.onMouseClick),this.supportsPointerEvents&&(this.bindEventsOnBodyElement?this.domElement.ownerDocument.removeEventListener("pointermove",this.onDocumentPointerMove):this.domElement.removeEventListener("pointermove",this.onDocumentPointerMove),this.domElement.removeEventListener("pointerdown",this.onPointerDown),this.domElement.removeEventListener("pointerup",this.onPointerUp)),this.bindEventsOnBodyElement?this.domElement.ownerDocument.removeEventListener("mousemove",this.onDocumentMouseMove):this.domElement.removeEventListener("mousemove",this.onDocumentMouseMove),this.domElement.removeEventListener("mousedown",this.onMouseDown),this.domElement.removeEventListener("mouseup",this.onMouseUp),this.domElement.removeEventListener("touchstart",this.onTouchStart),this.domElement.removeEventListener("touchmove",this.onTouchMove),this.domElement.removeEventListener("touchend",this.onTouchEnd)});bt(this,"add",(r,e=[])=>{if(r&&!this.interactiveObjects.find(t=>t.target===r))if(e.length>0)e.forEach(t=>{let n=r.getObjectByName(t);if(n){let i=new vD(n,t);this.interactiveObjects.push(i)}});else{let t=new vD(r,r.name);this.interactiveObjects.push(t)}});bt(this,"remove",(r,e=[])=>{!r||(e.length>0?e.forEach(t=>{let n=r.getObjectByName(t);n&&(this.interactiveObjects=this.interactiveObjects.filter(i=>i.target!==n))}):this.interactiveObjects=this.interactiveObjects.filter(t=>t.target!==r))});bt(this,"update",()=>{var n;this.raycaster.setFromCamera(this.mouse,this.camera),this.interactiveObjects.forEach(i=>{i.target&&this.checkIntersection(i)}),this.interactiveObjects.sort(function(i,a){return i.distance-a.distance});let r=(n=this.interactiveObjects.find(i=>i.intersected))!=null?n:null;if(r!=this.closestObject){if(this.closestObject){let i=new yi("mouseout");this.dispatch(this.closestObject,i)}if(r){let i=new yi("mouseover");this.dispatch(r,i)}this.closestObject=r}let e;this.interactiveObjects.forEach(i=>{!i.intersected&&i.wasIntersected&&(e||(e=new yi("mouseleave")),this.dispatch(i,e))});let t;this.interactiveObjects.forEach(i=>{i.intersected&&!i.wasIntersected&&(t||(t=new yi("mouseenter")),this.dispatch(i,t))})});bt(this,"checkIntersection",r=>{let e=this.raycaster.intersectObjects([r.target],!0);if(r.wasIntersected=r.intersected,e.length>0){let t=e[0].distance;e.forEach(n=>{n.distance<t&&(t=n.distance)}),r.intersected=!0,r.distance=t}else r.intersected=!1});bt(this,"onDocumentMouseMove",r=>{this.mapPositionToPoint(this.mouse,r.clientX,r.clientY);let e=new yi("mousemove",r);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});bt(this,"onDocumentPointerMove",r=>{this.mapPositionToPoint(this.mouse,r.clientX,r.clientY);let e=new yi("pointermove",r);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});bt(this,"onTouchMove",r=>{r.touches.length>0&&this.mapPositionToPoint(this.mouse,r.touches[0].clientX,r.touches[0].clientY);let e=new yi(this.treatTouchEventsAsMouseEvents?"mousemove":"touchmove",r);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});bt(this,"onMouseClick",r=>{this.update();let e=new yi("click",r);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});bt(this,"onMouseDown",r=>{this.mapPositionToPoint(this.mouse,r.clientX,r.clientY),this.update();let e=new yi("mousedown",r);this.interactiveObjects.forEach(t=>{t.intersected?(t.wasIntersectedOnMouseDown=!0,this.dispatch(t,e)):t.wasIntersectedOnMouseDown=!1})});bt(this,"onPointerDown",r=>{this.mapPositionToPoint(this.mouse,r.clientX,r.clientY),this.update();let e=new yi("pointerdown",r);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});bt(this,"onTouchStart",r=>{r.touches.length>0&&this.mapPositionToPoint(this.mouse,r.touches[0].clientX,r.touches[0].clientY),this.update();let e=new yi(this.treatTouchEventsAsMouseEvents?"mousedown":"touchstart",r);this.interactiveObjects.forEach(t=>{t.intersected&&this.dispatch(t,e)})});bt(this,"onMouseUp",r=>{let e=new yi("mouseup",r);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});bt(this,"onPointerUp",r=>{let e=new yi("pointerup",r);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});bt(this,"onTouchEnd",r=>{r.touches.length>0&&this.mapPositionToPoint(this.mouse,r.touches[0].clientX,r.touches[0].clientY),this.update();let e=new yi(this.treatTouchEventsAsMouseEvents?"mouseup":"touchend",r);this.interactiveObjects.forEach(t=>{this.dispatch(t,e)})});bt(this,"dispatch",(r,e)=>{r.target&&!e.cancelBubble&&(e.coords=this.mouse,e.distance=r.distance,e.intersected=r.intersected,e.wasIntersected=r.wasIntersected,e.wasIntersectedOnMouseDown=r.wasIntersectedOnMouseDown,r.target.dispatchEvent(e))});bt(this,"mapPositionToPoint",(r,e,t)=>{let n=this.renderer.domElement.getBoundingClientRect();r.x=(e-n.left)/n.width*2-1,r.y=-((t-n.top)/n.height)*2+1});this.renderer=r,this.camera=e,this.domElement=t,this.bindEventsOnBodyElement=n&&typeof n.bindEventsOnBodyElement<"u"?n.bindEventsOnBodyElement:!0,this.scene=n&&typeof n.scene<"u"?n.scene:null,this.scene&&(this.scene.onBeforeRender=()=>{this.autoAdd&&this.scene!==null&&this.scene.traverse(i=>{this.add(i),i.addEventListener("removed",a=>{this.remove(a.target)})}),this.update()}),this.autoAdd=n&&typeof n.autoAdd<"u"?n.autoAdd:!1,this.autoAdd&&this.scene===null&&console.error("Attention: Options.scene needs to be set when using options.autoAdd"),this.mouse=new Me(-1,1),this.supportsPointerEvents=!!window.PointerEvent,this.interactiveObjects=[],this.closestObject=null,this.raycaster=new SJ,t.addEventListener("click",this.onMouseClick),this.supportsPointerEvents&&(this.bindEventsOnBodyElement?t.ownerDocument.addEventListener("pointermove",this.onDocumentPointerMove):t.addEventListener("pointermove",this.onDocumentPointerMove),t.addEventListener("pointerdown",this.onPointerDown),t.addEventListener("pointerup",this.onPointerUp)),this.bindEventsOnBodyElement?t.ownerDocument.addEventListener("mousemove",this.onDocumentMouseMove):t.addEventListener("mousemove",this.onDocumentMouseMove),t.addEventListener("mousedown",this.onMouseDown),t.addEventListener("mouseup",this.onMouseUp),t.addEventListener("touchstart",this.onTouchStart,{passive:!0}),t.addEventListener("touchmove",this.onTouchMove,{passive:!0}),t.addEventListener("touchend",this.onTouchEnd,{passive:!0}),this.treatTouchEventsAsMouseEvents=!0}};const df=256,gte="https://map.shuxitech.com/vt/lyrs=s&hl=zh-CN&x={x}&y={y}&z={z}",Ep={west:101.852492,south:31.851389,east:103.347518,north:33.319796};function gD(r,e,t){const n=cu(2,t),i=Math.sin(e*Math.PI/180);return{x:(r+180)/360*n,y:(.5-Math.log((1+i)/(1-i))/(4*Math.PI))*n}}function mD(r,e,t){const n=cu(2,t),i=r/n*360-180,a=Math.PI-2*Math.PI*e/n,o=180/Math.PI*Math.atan(.5*(Math.exp(a)-Math.exp(-a)));return[i,o]}function mte(r,e){const t=gD(r.west,r.north,e),n=gD(r.east,r.south,e),i=Math.floor(t.x),a=Math.floor(n.x),o=Math.floor(t.y),s=Math.floor(n.y);return{zoom:e,minX:i,maxX:a,minY:o,maxY:s,cols:a-i+1,rows:s-o+1}}function yte(r,e){const[t,n]=mD(r.minX,r.minY,r.zoom),[i,a]=mD(r.maxX+1,r.maxY+1,r.zoom),[o]=e([t,Ep.south]),[s]=e([i,Ep.south]),[,l]=e([Ep.west,n]),[,u]=e([Ep.west,a]);return{left:o,right:s,bottom:-u,top:-l}}function _te(r,e){const{width:t,height:n}=e;r.save(),r.globalCompositeOperation="multiply",r.fillStyle="rgba(5, 24, 34, 0.22)",r.fillRect(0,0,t,n),r.globalCompositeOperation="screen";const i=r.createRadialGradient(t*.5,n*.48,t*.1,t*.5,n*.5,t*.72);i.addColorStop(0,"rgba(80, 230, 255, 0.16)"),i.addColorStop(1,"rgba(0, 18, 36, 0.03)"),r.fillStyle=i,r.fillRect(0,0,t,n),r.restore()}function xte(r,e){const t=r.createLinearGradient(0,0,e.width,e.height);t.addColorStop(0,"#061927"),t.addColorStop(.5,"#0b2c3c"),t.addColorStop(1,"#07131f"),r.fillStyle=t,r.fillRect(0,0,e.width,e.height)}function Ste(r){return new Promise(e=>{const t=new Image;t.crossOrigin="anonymous",t.onload=()=>e(t),t.onerror=()=>e(null),t.src=r})}function Ate(r,e,t){return gte.replace("{x}",r).replace("{y}",e).replace("{z}",t)}function wte(r,e,t,n){return Ge(this,null,function*(){const i=[];r.save(),r.filter="brightness(0.92) contrast(1.22) saturate(1.06)";for(let a=n.minX;a<=n.maxX;a+=1)for(let o=n.minY;o<=n.maxY;o+=1)i.push(Ste(Ate(a,o,n.zoom)).then(s=>{s&&(r.drawImage(s,(a-n.minX)*df,(o-n.minY)*df,df,df),t.needsUpdate=!0)}));yield Promise.allSettled(i),r.restore(),_te(r,e),t.needsUpdate=!0})}function bte({geoProjectionCenter:r,geoProjectionScale:e,zoom:t=11}={}){const n=mte(Ep,t),i=document.createElement("canvas");i.width=n.cols*df,i.height=n.rows*df;const a=i.getContext("2d");xte(a,i);const o=new yC(i);o.colorSpace=dn,o.wrapS=ti,o.wrapT=ti,o.minFilter=lr,o.magFilter=lr,o.needsUpdate=!0;const s=Ac().center(r).scale(e).translate([0,0]),l=yte(n,s);return wte(a,i,o,n).catch(u=>{console.warn("load satellite tiles failed:",u)}),{texture:o,uvBounds:l}}function yD(r,e){const t=e.right-e.left,n=e.top-e.bottom;r.mapGroup.traverse(i=>{var s,l;const a=(l=(s=i.geometry)==null?void 0:s.attributes)==null?void 0:l.position;if(!i.isMesh||!a)return;const o=new Float32Array(a.count*2);for(let u=0;u<a.count;u+=1){const c=a.getX(u),h=a.getY(u);o[u*2]=(c-e.left)/t,o[u*2+1]=(h-e.bottom)/n}i.geometry.setAttribute("uv",new Gn(o,2)),i.geometry.attributes.uv.needsUpdate=!0})}const Mn={west:101.852492,south:31.851389,east:103.347518,north:33.319796},fl={width:2400,height:2400},Tte=12;function Mte(r){return String(r).replace(/'/g,"''")}function ci(r,e){return`${r} = '${Mte(e)}'`}const _D=[{name:"低地草甸类",fillColor:"#FFFFFF",strokeColor:"#FFFFFF"},{name:"莎草、杂类草型",fillColor:"#F67A7A",strokeColor:"#F67A7A"},{name:"山地草甸类",fillColor:"#FFFFFF",strokeColor:"#FFFFFF"},{name:"羊茅、杂类草型",fillColor:"#E69800",strokeColor:"#E69800"},{name:"早熟禾、杂类草型",fillColor:"#FFD380",strokeColor:"#FFD380"},{name:"垂穗披碱草型",fillColor:"#FFAA01",strokeColor:"#FFAA01"},{name:"苔草、杂类草型",fillColor:"#FFEBB0",strokeColor:"#FFEBB0"},{name:"委陵菜、杂类草型",fillColor:"#F5CA7B",strokeColor:"#F5CA7B"},{name:"披碱草型",fillColor:"#A87001",strokeColor:"#A87001"},{name:"高寒草甸类",fillColor:"#FFFFFF",strokeColor:"#FFFFFF"},{name:"矮生嵩草、杂类草型",fillColor:"#6CB3FF",strokeColor:"#6CB3FF"},{name:"矮生嵩草、圆穗蓼型",fillColor:"#00C7FF",strokeColor:"#00C7FF"},{name:"西藏嵩草、杂类草型",fillColor:"#8FE5FD",strokeColor:"#8FE5FD"},{name:"西藏嵩草、甘肃嵩草型",fillColor:"#7B8FED",strokeColor:"#7B8FED"},{name:"高山嵩草、矮生嵩草型",fillColor:"#71DDFE",strokeColor:"#71DDFE"},{name:"高山嵩草、苔草型",fillColor:"#7BB5F3",strokeColor:"#7BB5F3"},{name:"高山嵩草、杂类草型",fillColor:"#444E87",strokeColor:"#444E87"},{name:"具灌木的矮生嵩草型",fillColor:"#6873D1",strokeColor:"#6873D1"}].map((r,e)=>Xe(Re({},r),{key:`grassland-type-${e+1}`,cqlFilter:ci("grass_min_type",r.name),rankingPropertyName:["area_code","acreage"],rankingTownCodeKeys:["area_code"],rankingAreaKeys:["acreage"]})),xD=[{name:">4000(kg/hm2)",fillColor:"#39A700",strokeColor:"#39A700"},{name:"3000-4000(kg/hm2)",fillColor:"#8CCF00",strokeColor:"#8CCF00"},{name:"2000-3000(kg/hm2)",fillColor:"#FEFE02",strokeColor:"#FEFE02"},{name:"1500-2000(kg/hm2)",fillColor:"#FE7E01",strokeColor:"#FE7E01"},{name:"<1500(kg/hm2)",fillColor:"#FB0100",strokeColor:"#FB0100"}].map(r=>Xe(Re({},r),{selectable:!1})),Zp={1:"一级",2:"二级",3:"三级",4:"四级",5:"五级",6:"六级",7:"七级",8:"八级"},vU=[{level:"1",name:"1级草原",fillColor:"#81D10B",strokeColor:"#81D10B"},{level:"2",name:"2级草原",fillColor:"#8AE611",strokeColor:"#8AE611"},{level:"3",name:"3级草原",fillColor:"#79C801",strokeColor:"#79C801"},{level:"4",name:"4级草原",fillColor:"#D0EC03",strokeColor:"#D0EC03"},{level:"5",name:"5级草原",fillColor:"#FFCC00",strokeColor:"#FFCC00"},{level:"6",name:"6级草原",fillColor:"#FF6501",strokeColor:"#FF6501"},{level:"7",name:"7级草原",fillColor:"#FB0002",strokeColor:"#FB0002"},{level:"8",name:"8级草原",fillColor:"#D71345",strokeColor:"#D71345"}].map(r=>Xe(Re({},r),{key:`grassland-level-${r.level}`,cqlFilter:`grassland_level IN ('${r.level}','${r.name}','${Zp[r.level]}草原','${Zp[r.level]}草地')`,rankingPropertyName:["area_code","acreage"],rankingTownCodeKeys:["area_code"],rankingAreaKeys:["acreage"],level:void 0})),Cte=vU.map(r=>{const e=r.key.replace("grassland-level-",""),t=r.name.replace("草原","湿地");return Xe(Re({},r),{key:`wetland-level-${e}`,name:t,cqlFilter:`grassland_level IN ('${e}','${t}','${r.name}','${Zp[e]}湿地','${Zp[e]}草原','${Zp[e]}草地')`})}),Ete=[{key:"basic-grassland-basic",name:"基本草原",fillColor:"#2EEA78",strokeColor:"#18F8FF",cqlFilter:"(grassland_category_code = 'BASIC' OR grassland_category_name = '基本草原')",rankingValueKey:"basicAreaWanMu"},{key:"basic-grassland-general",name:"一般草原",fillColor:"#FFD15A",strokeColor:"#18F8FF",cqlFilter:"(grassland_category_code = 'GENERAL' OR grassland_category_name = '一般草原')",rankingValueKey:"generalAreaWanMu"}],jf=[{key:"grassland",name:"草地资源",color:"#8AE611",defaultLayerKey:"grassland-distribution",coreGroups:["grassLand","grassland"]},{key:"wetland",name:"湿地资源",color:"#33A3DC",defaultLayerKey:"wetland-distribution",coreGroups:["wetland"]},{key:"woodland",name:"林地资源",color:"#2BD17E",defaultLayerKey:"woodland-distribution",coreGroups:["woodland"]}],qy=[{key:"national-park",name:"若尔盖国家公园",color:"#8AE611",defaultLayerKey:"national-park-zoning"},{key:"restoration",name:"生态修复工程",color:"#33A3DC",defaultLayerKey:"restoration-projects"}],jy={woodland:[{key:"woodland-distribution",name:"林地范围",layerName:"ne:t_woodland_2023",styles:"woodland_distribution",opacity:.82,legends:[{key:"woodland-distribution-all",name:"林地范围",fillColor:"#2BD17E",strokeColor:"#2BD17E",selectable:!1}]},{key:"woodland-protection",name:"公益林",layerName:"ne:t_woodland_2023",styles:"woodland_protection",opacity:.86,legends:[{key:"woodland-protection-level-1",name:"国家一级公益林",fillColor:"#08C4C5",strokeColor:"#08C4C5",cqlFilter:ci("gjgyl_bhdj","1")},{key:"woodland-protection-level-2",name:"国家二级公益林",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:ci("gjgyl_bhdj","2")},{key:"woodland-protection-unset",name:"未划定",fillColor:"#6B8191",strokeColor:"#6B8191",cqlFilter:"(gjgyl_bhdj IS NULL OR gjgyl_bhdj = '' OR gjgyl_bhdj NOT IN ('1','2'))"}]},{key:"woodland-type",name:"林地类型",layerName:"ne:t_woodland_2023",styles:"woodland_type",opacity:.84,legends:[{key:"woodland-type-shrub",name:"灌木林地",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:ci("dlmc","灌木林地")},{key:"woodland-type-arbor",name:"乔木林地",fillColor:"#0DA368",strokeColor:"#0DA368",cqlFilter:ci("dlmc","乔木林地")},{key:"woodland-type-swamp",name:"灌丛沼泽",fillColor:"#23C7B7",strokeColor:"#23C7B7",cqlFilter:ci("dlmc","灌丛沼泽")},{key:"woodland-type-other",name:"其他林地",fillColor:"#B7D96B",strokeColor:"#B7D96B",cqlFilter:"(dlmc IS NULL OR dlmc = '' OR dlmc NOT IN ('灌木林地','乔木林地','灌丛沼泽'))"}]},{key:"woodland-quality",name:"林地质量",layerName:"ne:t_woodland_2023",styles:"woodland_quality",opacity:.84,legends:[{key:"woodland-quality-2",name:"二级质量",fillColor:"#08C4C5",strokeColor:"#08C4C5",cqlFilter:ci("zl_dj","2")},{key:"woodland-quality-3",name:"三级质量",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:ci("zl_dj","3")},{key:"woodland-quality-4",name:"四级质量",fillColor:"#23C7B7",strokeColor:"#23C7B7",cqlFilter:ci("zl_dj","4")},{key:"woodland-quality-5",name:"五级质量",fillColor:"#B7D96B",strokeColor:"#B7D96B",cqlFilter:ci("zl_dj","5")},{key:"woodland-quality-unset",name:"未划分",fillColor:"#6B8191",strokeColor:"#6B8191",cqlFilter:"(zl_dj IS NULL OR zl_dj = '' OR zl_dj NOT IN ('2','3','4','5'))"}]},{key:"woodland-ownership",name:"林地权属",layerName:"ne:t_woodland_2023",styles:"woodland_ownership",opacity:.84,legends:[{key:"woodland-ownership-collective",name:"集体林地",fillColor:"#2BD17E",strokeColor:"#2BD17E",cqlFilter:ci("ld_qs","10")},{key:"woodland-ownership-other",name:"国有或其他",fillColor:"#08C4C5",strokeColor:"#08C4C5",cqlFilter:"(ld_qs IS NULL OR ld_qs = '' OR ld_qs <> '10')"}]}],grassland:[{key:"grassland-distribution",name:"草地分布",layerName:"ne:t_grassland_result_caodi",opacity:.82,legends:[{name:"草地",fillColor:"#1D953F",strokeColor:"#1D953F"}]},{key:"basic-grassland",name:"基本/一般草原",layerName:"ne:t_basic_grassland_2023",styles:"basic_grassland_type",opacity:.84,legends:Ete},{key:"grassland-level",name:"草原级",layerName:"ne:t_grassland_result_level_caodi",opacity:.82,legends:vU},{key:"grassland-type",name:"草原类型",layerName:"ne:t_grassland_result_grass_min_type_caodi",opacity:.82,legends:_D},{key:"grassland-yield",name:"草地产草量/生产力",layerName:"ne:t_grassland_result_yield_caodi",opacity:.82,legends:xD},{key:"grassland-health",name:"草地健康/退化",layerName:"ne:2023_08_ndvi",opacity:.72,legends:[{name:"非常差",fillColor:"#FF000533",strokeColor:"#FF0005",selectable:!1},{name:"差",fillColor:"#D8EE8C33",strokeColor:"#D8EE8C",selectable:!1},{name:"正常",fillColor:"#78C96233",strokeColor:"#78C962",selectable:!1},{name:"较好",fillColor:"#25814933",strokeColor:"#258149",selectable:!1}]}],wetland:[{key:"wetland-distribution",name:"湿地分布",layerName:"ne:t_grassland_result_shidi",opacity:.84,legends:[{name:"湿地",fillColor:"#33A3DC",strokeColor:"#33A3DC"}]},{key:"wetland-level",name:"湿地级",layerName:"ne:t_grassland_result_level_shidi",opacity:.82,legends:Cte},{key:"wetland-type",name:"湿地类型",layerName:"ne:t_grassland_result_grass_min_type_shidi",opacity:.82,legends:_D},{key:"wetland-yield",name:"湿地产草量/生产力",layerName:"ne:t_grassland_result_yield_shidi",opacity:.82,legends:xD}]},gU={"national-park":[{key:"national-park-zoning",name:"国家公园分区",sourceType:"wkt-api",apiUrl:"/openApi/gjgy/gjgy_area",fallbackPath:"datas/ecological-protection/national_park_wkt.json",opacity:.9,clipBounds:{west:101.852492,south:32.757724488,east:103.227028864,north:33.319796},mapView:{targetLngLat:[102.74,33.12],distanceScale:.68,targetLocalZ:.78,duration:.95},legends:[{key:"national-park-core",name:"核心保护区",fillColor:"#2EEA78",strokeColor:"#18F8FF",match:{field:"type",value:"核心保护区"},selectable:!1},{key:"national-park-general",name:"一般控制区",fillColor:"#FFD15A",strokeColor:"#FFF2A0",match:{field:"type",value:"一般控制区"},selectable:!1}]}],restoration:[{key:"restoration-projects",name:"生态修复工程",sourceType:"geojson",dataPath:"datas/ecological-protection/ecological_restoration_projects.geojson",opacity:.9,legends:[{key:"restoration-grassland",name:"草地修复",fillColor:"#70D44B",strokeColor:"#B7FF6D",cqlFilter:ci("project_category","草地修复"),match:{field:"project_category",value:"草地修复"}},{key:"restoration-wetland",name:"湿地修复",fillColor:"#42C6DF",strokeColor:"#9CF7FF",cqlFilter:ci("project_category","湿地修复"),match:{field:"project_category",value:"湿地修复"}},{key:"restoration-woodland",name:"林地修复",fillColor:"#1FB579",strokeColor:"#57F2A6",cqlFilter:ci("project_category","林地修复"),match:{field:"project_category",value:"林地修复"}},{key:"restoration-linear",name:"线性设施",fillColor:"#F5C84B",strokeColor:"#FFE289",cqlFilter:ci("feature_role","线性设施"),match:{field:"feature_role",value:"线性设施"}}]}]},Lte=Re(Re({},jy),gU),Pte=[...jf,...qy];function yS(r){return Pte.find(e=>e.key===r)||jf[0]}function s1(r){return Lte[r]||[]}function mg(r,e){const t=s1(r);return t.find(n=>n.key===e)||t[0]}const Rte=12e3;function Dte(r,e={}){const t=new URLSearchParams;Object.entries(e).forEach(([i,a])=>{a!=null&&a!==""&&t.append(i,a)});const n=t.toString();return n?`${r}${r.includes("?")?"&":"?"}${n}`:r}function Bs(t){return Ge(this,arguments,function*(r,e={}){const u=e,{params:n,timeout:i=Rte}=u,a=sL(u,["params","timeout"]),o=new AbortController;let s=!1;const l=window.setTimeout(()=>{s=!0,o.abort()},i);try{const c=yield fetch(Dte(r,n),Xe(Re({credentials:"include"},a),{signal:o.signal,headers:Re({Accept:"application/json"},a.headers||{})}));if(!c.ok){const h=new Error(c.status===401?"用户未登录或授权已过期。":`HTTP ${c.status}`);throw h.code=`HTTP_${c.status}`,h.status=c.status,h}return yield c.json()}catch(c){if(o.signal.aborted||(c==null?void 0:c.name)==="AbortError"||/aborted/i.test((c==null?void 0:c.message)||"")){const f=new Error(s?"服务响应超时,请稍后再试。":"请求已取消,请重新发送。");throw f.code=s?"REQUEST_TIMEOUT":"REQUEST_ABORTED",f}throw c}finally{window.clearTimeout(l)}})}function Lt(r){return(r==null?void 0:r.data)!==void 0?r.data:(r==null?void 0:r.result)!==void 0?r.result:r}const RC="/geoserver/ne/wms",Ite={}.VITE_GEOSERVER_WFS_URL||RC.replace(/\/wms$/i,"/wfs");function DC(r,e){const t=new URLSearchParams;return Object.entries(e).forEach(([n,i])=>{i!=null&&i!==""&&t.append(n,i)}),`${r}${r.includes("?")?"&":"?"}${t.toString()}`}function SD(r,e={}){const t=e.bounds||Mn,n=e.size||fl;return DC(e.url||RC,{service:"WMS",version:"1.1.1",request:"GetMap",layers:r.layerName,styles:r.styles||"",format:"image/png",transparent:!0,tiled:!0,srs:"EPSG:4326",bbox:[t.west,t.south,t.east,t.north].join(","),width:n.width,height:n.height,CQL_FILTER:e.cqlFilter||r.cqlFilter,_:Date.now()})}function Nte(r,e,t={}){var a,o;const n=t.bounds||Mn,i=t.size||fl;return DC(t.url||RC,{service:"WMS",version:"1.1.1",request:"GetFeatureInfo",layers:r.layerName,query_layers:r.layerName,styles:r.styles||"",info_format:"application/json",feature_count:5,srs:"EPSG:4326",bbox:[n.west,n.south,n.east,n.north].join(","),width:i.width,height:i.height,x:Math.round(e.x),y:Math.round(e.y),buffer:(o=(a=t.buffer)!=null?a:r.queryBuffer)!=null?o:8,CQL_FILTER:t.cqlFilter||r.cqlFilter})}function AD(n,i){return Ge(this,arguments,function*(r,e,t={}){const a=Nte(r,e,t);return Bs(a,{credentials:"include"})})}function kte(r,e={}){return DC(e.url||Ite,{service:"WFS",version:e.version||"1.0.0",request:"GetFeature",typeName:r,outputFormat:"json",propertyName:Array.isArray(e.propertyName)?e.propertyName.join(","):e.propertyName,CQL_FILTER:e.cqlFilter,maxFeatures:e.maxFeatures||2e5})}function l1(t){return Ge(this,arguments,function*(r,e={}){const n=kte(r,e);return Bs(n,{credentials:"include",timeout:e.timeout||2e4})})}function wD(r){var n;const e=(n=r==null?void 0:r.features)==null?void 0:n[0];if(!e)return null;const t=e.properties||{};return{id:e.id||t.gid||t.objectid||t.OBJECTID,properties:t,feature:e}}function bD(r){return r.sort((e,t)=>t.value-e.value),r}function Lh(r){return String(r||"").replace(/\s+/g,"").trim()}function Wd(r,e=0){const t=Number(r);return Number.isFinite(t)?t:e}function TD(r){return r?/^https?:\/\//.test(r)||r.startsWith("/")?r:`./${r}`:""}class Ote extends Qee{constructor(e,t,n={}){super(e),this.geoProjectionCenter=[102.6305459723107,32.72169252326339],this.geoProjectionScale=650,this.depth=.5,this.mapFocusLabelInfo={name:"红原县",enName:"HONGYUAN COUNTY",center:[102.6305459723107,32.08]},this.clicked=!1,this.scene.fog=new dC(1058614,1,50),this.scene.background=new nt(1058614),this.camera.instance.position.set(-13.767695123014105,12.990152163077308,39.28228164159694),this.camera.instance.near=1,this.camera.instance.far=1e4,this.camera.instance.updateProjectionMatrix(),this.defaultMapCameraPosition=new X(-.17427287762525134,13.678992786206543,20.688611202093714),this.defaultMapTarget=new X(0,0,0),this.activeMapViewTweens=[],this.interactionManager=new vte(this.renderer.instance,this.camera.instance,this.canvas),this.assets=t,this.callbacks=n,this.topicLayerLoadId=0,this.visibleTopicLayers=[],this.mapAnimationComplete=!1,this.showTownRankingBars=!1,this.showTownRankingPointMarkers=!1,this.currentTownRanking=null,this.selectedFeatureGroup=null,this.selectedVectorFeatures=[],this.currentVectorFeatures=[],this.townMetaByName=new Map(pD.map(i=>[Lh(i.name),i])),this.initEnvironment(),this.init()}init(){this.labelGroup=new Dn,this.label3d=new ate(this),this.labelGroup.rotation.x=-Math.PI/2,this.scene.add(this.labelGroup),this.flyLineFocusGroup=new Dn,this.flyLineFocusGroup.visible=!1,this.flyLineFocusGroup.rotation.x=-Math.PI/2,this.scene.add(this.flyLineFocusGroup),this.eventElement=[],this.defaultMaterial=null,this.defaultLightMaterial=null,this.createBottomBg(),this.createChinaBlurLine(),this.createGrid(),this.createRotateBorder(),this.createLabel(),this.createMap(),this.createEvent(),this.createFlyLine(),this.createFocus(),this.createParticles(),this.createScatter(),this.createInfoPoint(),this.createStorke();let e=$n.timeline({onComplete:()=>{this.mapAnimationComplete=!0,this.applyLayerMapView(this.currentTopicLayer,{force:!0})}});e.pause(),this.animateTl=e,e.addLabel("focusMap",1.5),e.addLabel("focusMapOpacity",2),e.addLabel("bar",3),e.to(this.camera.instance.position,{duration:2,x:this.defaultMapCameraPosition.x,y:this.defaultMapCameraPosition.y,z:this.defaultMapCameraPosition.z,ease:"circ.out",onStart:()=>{this.flyLineFocusGroup.visible=!1}}),e.to(this.focusMapGroup.position,{duration:1,x:0,y:0,z:0},"focusMap"),e.to(this.focusMapGroup.scale,{duration:1,x:1,y:1,z:1,ease:"circ.out",onComplete:()=>{this.flyLineGroup.visible=!0,this.scatterGroup.visible=!0,this.InfoPointGroup.visible=this.showTownRankingPointMarkers&&this.hasTownRankingRows()}},"focusMap"),e.to(this.focusMapTopMaterial,{duration:1,opacity:1,ease:"circ.out"},"focusMapOpacity"),e.to(this.focusMapSideMaterial,{duration:1,opacity:1,ease:"circ.out",onComplete:()=>{this.focusMapSideMaterial.transparent=!1}},"focusMapOpacity"),this.otherLabel.map((n,i)=>{let a=n.element.querySelector(".other-label");e.to(a,{duration:1,delay:.1*i,translateY:0,opacity:1,ease:"circ.out"},"focusMapOpacity")}),e.to(this.mapLineMaterial,{duration:.5,delay:.3,opacity:1},"focusMapOpacity"),e.to(this.rotateBorder1.scale,{delay:.3,duration:1,x:1,y:1,z:1,ease:"circ.out"},"focusMapOpacity"),e.to(this.rotateBorder2.scale,{duration:1,delay:.5,x:1,y:1,z:1,ease:"circ.out",onComplete:()=>{var n,i;this.flyLineFocusGroup.visible=!0,(i=(n=this.callbacks).onPlayComplete)==null||i.call(n)}},"focusMapOpacity"),this.showTownRankingBars&&(this.allBar.map((n,i)=>{e.to(n.scale,{duration:1,delay:.1*i,x:1,y:1,z:1,ease:"circ.out"},"bar")}),this.allBarMaterial.map((n,i)=>{e.to(n,{duration:1,delay:.1*i,opacity:1,ease:"circ.out"},"bar")}));const t=this;this.allProvinceLabel.map((n,i)=>{let a=n.element.querySelector(".provinces-label-wrap"),o=n.element.querySelector(".number .value"),s={progress:0};e.to(a,{duration:1,delay:.2*i,translateY:0,opacity:1,ease:"circ.out"},"bar"),e.to(s,{duration:1,delay:.2*i,progress:1,onStart:()=>{s.progress=0},onUpdate:l},"bar");function l(){var c,h;const u=Wd((h=(c=n.userData)==null?void 0:c.targetValue)!=null?h:o.dataset.targetValue);o.innerText=t.formatMapRankingValue(u*s.progress)}}),this.showTownRankingBars&&this.allGuangquan.map((n,i)=>{e.to(n.children[0].scale,{duration:1,delay:.1*i,x:1,y:1,z:1,ease:"circ.out"},"bar"),e.to(n.children[1].scale,{duration:1,delay:.1*i,x:1,y:1,z:1,ease:"circ.out"},"bar")})}initEnvironment(){let e=new qz(16777215,5);this.scene.add(e);let t=new B0(16777215,5);t.position.set(-30,6,-8),t.castShadow=!0,t.shadow.radius=20,t.shadow.mapSize.width=1024,t.shadow.mapSize.height=1024,this.scene.add(t),this.createPointLight({color:"#1d5e5e",intensity:800,distance:1e4,x:-9,y:3,z:-3}),this.createPointLight({color:"#1d5e5e",intensity:200,distance:1e4,x:0,y:2,z:5})}createPointLight(e){const t=new Yz(1924702,e.intensity,e.distance);t.position.set(e.x,e.y,e.z),this.scene.add(t)}createMap(){let e=new Dn,t=new Dn;this.focusMapGroup=t;let{china:n,chinaTopLine:i}=this.createChina(),{map:a,mapTop:o,mapLine:s}=this.createProvince();n.setParent(e),i.setParent(e),this.createDiffuse(),a.setParent(t),o.setParent(t),s.setParent(t),t.position.set(0,0,-.01),t.scale.set(1,1,0),e.add(t),this.createTopicLayer(),e.rotation.x=-Math.PI/2,e.position.set(0,.2,0),this.scene.add(e),this.createBar()}createChina(){let e={chinaBgMaterialColor:"#152c47",lineColor:"#3f82cd"},t=this.assets.instance.getResource("china"),n=new Lb({color:new nt(e.chinaBgMaterialColor),transparent:!0,opacity:1}),i=new pS(this,{data:t,geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,merge:!0,material:n,renderOrder:2}),a=new ys({color:e.lineColor}),o=new mS(this,{data:t,geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,material:a,renderOrder:3});return o.lineGroup.position.z+=.01,{china:i,chinaTopLine:o}}createProvince(){let e=this.assets.instance.getResource("mapJson");this.mapJsonData=e;const t=bte({geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,zoom:Tte});this.enhanceTexture(t.texture);let[n,i]=this.createProvinceMaterial();this.focusMapTopMaterial=n,this.focusMapSideMaterial=i;let a=new ote(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new X(0,0,.11),data:e,depth:this.depth,topFaceMaterial:n,sideMaterial:i,renderOrder:9}),o=new Pv({color:16777215,map:t.texture,transparent:!0,opacity:.9,roughness:.9});new dD(o,{uColor1:1227744,uColor2:38069}),this.defaultMaterial=o,this.defaultLightMaterial=this.defaultMaterial.clone(),this.defaultLightMaterial.color=new nt("rgba(115,208,255,1)"),this.defaultLightMaterial.opacity=.8;let s=new pS(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new X(0,0,this.depth+.22),data:e,material:o,renderOrder:8});yD(s,t.uvBounds),s.mapGroup.children.map(u=>{u.children.map(c=>{c.type==="Mesh"&&this.eventElement.push(c)})}),this.mapLineMaterial=new ys({color:16777215,opacity:0,transparent:!0,fog:!1});let l=new mS(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,data:e,material:this.mapLineMaterial,renderOrder:3});return l.lineGroup.position.z+=this.depth+.23,{map:a,mapTop:s,mapLine:l}}createTopicLayer(){if(!this.mapJsonData)return;const e=document.createElement("canvas");e.width=fl.width,e.height=fl.height;const t=e.getContext("2d");t.clearRect(0,0,e.width,e.height);const n=new yC(e);n.colorSpace=dn,n.wrapS=ti,n.wrapT=ti,n.minFilter=lr,n.magFilter=lr,this.enhanceTexture(n),n.needsUpdate=!0;const i=new Pn({map:n,transparent:!0,opacity:0,depthWrite:!1,side:ur,fog:!1}),a=new pS(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new X(0,0,this.depth+.255),data:this.mapJsonData,material:i,renderOrder:18});yD(a,this.createLayerUvBounds()),a.setParent(this.focusMapGroup),this.topicLayerCanvas=e,this.topicLayerContext=t,this.topicLayerTexture=n,this.topicLayerMaterial=i,this.topicLayerMap=a}createSelectedFeatureGroup(){var e;this.selectedFeatureGroup||(this.selectedFeatureGroup=new Dn,this.selectedFeatureGroup.name="selected-feature-highlight",this.selectedFeatureGroup.position.z=this.depth+.31,(e=this.focusMapGroup)==null||e.add(this.selectedFeatureGroup))}createLayerUvBounds(){const e=Ac().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]),[t]=e([Mn.west,Mn.south]),[n]=e([Mn.east,Mn.south]),[,i]=e([Mn.west,Mn.north]),[,a]=e([Mn.west,Mn.south]);return{left:t,right:n,bottom:-a,top:-i}}setTopicLayer(e){var i,a;if(!e||!this.topicLayerContext||!this.topicLayerTexture)return;this.currentTopicLayer=e,this.visibleTopicLayers=[e],this.clearSelectedFeature(),this.applyLayerMapView(e);const t=++this.topicLayerLoadId;if((a=(i=this.callbacks).onLayerStatus)==null||a.call(i,{type:"loading",text:`正在加载 ${e.name}`}),e.sourceType==="wkt-api"||e.sourceType==="geojson"){this.loadVectorTopicLayer(e,t);return}const n=new Image;n.crossOrigin="anonymous",n.onload=()=>{var o,s,l;t===this.topicLayerLoadId&&(this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerContext.drawImage(n,0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=(o=e.opacity)!=null?o:.84,(l=(s=this.callbacks).onLayerStatus)==null||l.call(s,{type:"success",text:"GeoServer 图层已加载"}))},n.onerror=()=>{var o,s;t===this.topicLayerLoadId&&(this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"error",text:"GeoServer 图层加载失败"}))},n.src=SD(e)}setTopicLayers(e=[],t=e[0]){var o,s,l,u;if(!this.topicLayerContext||!this.topicLayerTexture)return;const n=e.filter(Boolean);if(!n.length){this.visibleTopicLayers=[],this.currentTopicLayer=null,this.clearSelectedFeature(),this.applyLayerMapView(null),this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"success",text:"图层已关闭"});return}if(n.length===1){this.setTopicLayer(Re(Re({},n[0]),(t==null?void 0:t.key)===n[0].key?t:{}));return}this.currentTopicLayer=t||n[n.length-1],this.visibleTopicLayers=n,this.clearSelectedFeature(),this.applyLayerMapView(this.currentTopicLayer);const i=++this.topicLayerLoadId;(u=(l=this.callbacks).onLayerStatus)==null||u.call(l,{type:"loading",text:`正在加载 ${n.length} 个林地图层`});const a=n.filter(c=>c.sourceType!=="wkt-api"&&c.sourceType!=="geojson");Promise.all(a.map(c=>this.loadTopicLayerImage(c))).then(c=>{var f,d;if(i!==this.topicLayerLoadId)return;const h=c.filter(Boolean);this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),h.forEach(({image:p,layer:g},v)=>{var y,_;this.topicLayerContext.save();const m=v===h.length-1?Math.max(.78,(y=g.opacity)!=null?y:.9):Math.min(.52,(_=g.opacity)!=null?_:.52);this.topicLayerContext.globalAlpha=Math.min(1,Math.max(.28,m)),this.topicLayerContext.drawImage(p,0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerContext.restore()}),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=h.length?1:0,(d=(f=this.callbacks).onLayerStatus)==null||d.call(f,{type:h.length?"success":"error",text:h.length?`已加载 ${h.length} 个林地图层`:"林地图层加载失败"})})}loadTopicLayerImage(e){return new Promise(t=>{const n=new Image;n.crossOrigin="anonymous",n.onload=()=>t({image:n,layer:e}),n.onerror=()=>t(null),n.src=SD(e)})}applyLayerMapView(e,t={}){var s,l;if(!((s=this.camera)!=null&&s.instance)||!((l=this.camera)!=null&&l.controls)||!this.mapAnimationComplete&&!t.force)return;const n=(e==null?void 0:e.mapView)||(e!=null&&e.cameraPosition?{cameraPosition:e.cameraPosition}:null),i=n?this.getLayerMapViewTarget(n):this.defaultMapTarget.clone(),a=n?this.getLayerMapViewCameraPosition(n,i):this.defaultMapCameraPosition.clone(),o=n&&Number.isFinite(n.duration)?n.duration:.75;this.animateMapCamera(a,i,o)}getLayerMapViewTarget(e){var t;return e!=null&&e.targetLngLat?this.lngLatToWorldPoint(e.targetLngLat,(t=e.targetLocalZ)!=null?t:.72):e!=null&&e.target?this.toVector3(e.target,this.defaultMapTarget):this.defaultMapTarget.clone()}getLayerMapViewCameraPosition(e,t){if(e!=null&&e.cameraPosition)return this.toVector3(e.cameraPosition,this.defaultMapCameraPosition);const n=Number.isFinite(e==null?void 0:e.distanceScale)?e.distanceScale:1,i=this.defaultMapCameraPosition.clone().sub(this.defaultMapTarget).multiplyScalar(n),a=t.clone().add(i);return e!=null&&e.cameraOffset&&a.add(this.toVector3(e.cameraOffset,new X(0,0,0))),a}lngLatToWorldPoint(e,t=0){const n=Array.isArray(e)?e:[e==null?void 0:e.lng,e==null?void 0:e.lat],i=Number(n==null?void 0:n[0]),a=Number(n==null?void 0:n[1]);if(!Number.isFinite(i)||!Number.isFinite(a))return this.defaultMapTarget.clone();const[o,s]=this.geoProjection([i,a]),l=new X(o,-s,Number(t)||0);return this.focusMapGroup?this.focusMapGroup.localToWorld(l):l}toVector3(e,t){if(Array.isArray(e)){const[o,s,l]=e.map(Number);return[o,s,l].every(Number.isFinite)?new X(o,s,l):t.clone()}const n=Number(e==null?void 0:e.x),i=Number(e==null?void 0:e.y),a=Number(e==null?void 0:e.z);return[n,i,a].every(Number.isFinite)?new X(n,i,a):t.clone()}animateMapCamera(e,t,n=.75){this.activeMapViewTweens.forEach(o=>{var s;return(s=o==null?void 0:o.kill)==null?void 0:s.call(o)}),this.activeMapViewTweens=[];const i=this.camera.controls,a=()=>i.update();this.activeMapViewTweens.push($n.to(this.camera.instance.position,{duration:n,x:e.x,y:e.y,z:e.z,ease:"power2.out",onUpdate:a}),$n.to(i.target,{duration:n,x:t.x,y:t.y,z:t.z,ease:"power2.out",onUpdate:a}))}loadVectorTopicLayer(e,t){return Ge(this,null,function*(){var n,i,a,o,s;try{const l=yield this.fetchVectorLayerGeojson(e);if(t!==this.topicLayerLoadId)return;this.currentVectorFeatures=l.features||[],this.drawVectorTopicLayer(e,this.currentVectorFeatures),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=(n=e.opacity)!=null?n:.9,(a=(i=this.callbacks).onLayerStatus)==null||a.call(i,{type:"success",text:"真实矢量图层已加载"})}catch(l){if(t!==this.topicLayerLoadId)return;this.currentVectorFeatures=[],this.topicLayerContext.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),this.topicLayerTexture.needsUpdate=!0,this.topicLayerMaterial.opacity=0,(s=(o=this.callbacks).onLayerStatus)==null||s.call(o,{type:"error",text:"真实矢量图层加载失败"})}})}fetchVectorLayerGeojson(e){return Ge(this,null,function*(){if(e.sourceType==="geojson"){const n=yield fetch(TD(e.dataPath),{credentials:"include"});if(!n.ok)throw new Error(`HTTP ${n.status}`);return yield n.json()}let t=[];try{const n=yield fetch(e.apiUrl,{credentials:"include"});if(!n.ok)throw new Error(`HTTP ${n.status}`);const i=yield n.json();t=Array.isArray(i==null?void 0:i.data)?i.data:[]}catch(n){const i=yield fetch(TD(e.fallbackPath),{credentials:"include"});if(!i.ok)throw n;const a=yield i.json();t=Array.isArray(a==null?void 0:a.rows)?a.rows:[]}return{type:"FeatureCollection",features:t.map(n=>({type:"Feature",properties:{id:n.id,type:n.type,totalAcreage:n.totalAcreage,cdAcreage:n.cdAcreage,sdAcreage:n.sdAcreage,cdScl:n.cdScl,sdScl:n.sdScl},geometry:this.parseWktGeometry(n.wkt)})).filter(n=>n.geometry)}})}drawVectorTopicLayer(e,t){const n=this.topicLayerContext;n.clearRect(0,0,this.topicLayerCanvas.width,this.topicLayerCanvas.height),n.save(),n.lineJoin="round",n.lineCap="round",this.clipVectorLayerContext(n,e),this.getVisibleVectorFeatures(e,t).sort((o,s)=>{var c,h;const l=this.getGeometryDrawRank((c=o.geometry)==null?void 0:c.type),u=this.getGeometryDrawRank((h=s.geometry)==null?void 0:h.type);return l-u}).forEach(o=>{const s=this.getVectorFeatureStyle(e,o);this.drawVectorFeature(n,o.geometry,s)}),this.drawSelectedVectorOverlay(n),n.restore()}drawSelectedVectorOverlay(e){const t=this.selectedVectorFeatures||[];if(!t.length)return;const n={fill:"#FFE15A",stroke:"#24F6C4",polygonAlpha:.24,lineAlpha:.98,lineWidth:12,pointRadius:9,glow:!0},i={fill:"#FFF06A",stroke:"#FFFDF2",polygonAlpha:.46,lineAlpha:1,lineWidth:5,pointRadius:6,glow:!1};e.save(),t.forEach(a=>{var s;const o=(a==null?void 0:a.geometry)||((s=a==null?void 0:a.feature)==null?void 0:s.geometry);this.drawVectorFeature(e,o,n),this.drawVectorFeature(e,o,i)}),e.restore()}redrawVectorTopicLayer(){!this.topicLayerContext||!this.topicLayerTexture||!this.currentTopicLayer||!["wkt-api","geojson"].includes(this.currentTopicLayer.sourceType)||(this.drawVectorTopicLayer(this.currentTopicLayer,this.currentVectorFeatures||[]),this.topicLayerTexture.needsUpdate=!0)}getVisibleVectorFeatures(e,t){const n=e==null?void 0:e.activeLegend,i=n==null?void 0:n.match;if(i!=null&&i.field)return(t||[]).filter(s=>{var l,u;return String((u=(l=s==null?void 0:s.properties)==null?void 0:l[i.field])!=null?u:"")===String(i.value)});const o=String((e==null?void 0:e.cqlFilter)||"").trim().match(/^([a-zA-Z0-9_]+)\s*=\s*'((?:''|[^'])*)'$/);if(o){const[,s,l]=o,u=l.replace(/''/g,"'");return(t||[]).filter(c=>{var h,f;return String((f=(h=c==null?void 0:c.properties)==null?void 0:h[s])!=null?f:"")===u})}return[...t||[]]}clipVectorLayerContext(e,t){const n=this.getLayerClipBounds(t);if(!n)return;const i=this.lngLatToLayerCanvasPoint([n.west,n.north]),a=this.lngLatToLayerCanvasPoint([n.east,n.south]),o=Math.min(i.x,a.x),s=Math.min(i.y,a.y),l=Math.abs(a.x-i.x),u=Math.abs(a.y-i.y);!l||!u||(e.beginPath(),e.rect(o,s,l,u),e.clip())}getLayerClipBounds(e){const t=e==null?void 0:e.clipBounds;if(!t)return null;const n=Math.max(Number(t.west),Mn.west),i=Math.max(Number(t.south),Mn.south),a=Math.min(Number(t.east),Mn.east),o=Math.min(Number(t.north),Mn.north);return![n,i,a,o].every(Number.isFinite)||n>=a||i>=o?null:{west:n,south:i,east:a,north:o}}getGeometryDrawRank(e){return String(e).includes("Polygon")?1:String(e).includes("LineString")?2:3}getVectorFeatureStyle(e,t){var l,u,c;const n=t.properties||{},a=(e.legends||[]).find(h=>{var d;const f=h.match;return f?String((d=n[f.field])!=null?d:"")===String(f.value):!1})||((l=e.legends)==null?void 0:l[0])||{},o=String(((u=t.geometry)==null?void 0:u.type)||"").includes("LineString"),s=((c=t.geometry)==null?void 0:c.type)==="Point";return{fill:o||s?a.strokeColor||a.fillColor||"#30DCFF":a.fillColor||"#30DCFF",stroke:a.strokeColor||a.fillColor||"#30DCFF",polygonAlpha:.36,lineAlpha:o?.92:.9,lineWidth:o?5:2.4,pointRadius:4.5,glow:!0}}drawVectorFeature(e,t,n){if(t!=null&&t.coordinates){if(t.type==="Polygon"){this.drawPolygonPath(e,t.coordinates,n);return}if(t.type==="MultiPolygon"){t.coordinates.forEach(i=>this.drawPolygonPath(e,i,n));return}if(t.type==="LineString"){this.drawLinePath(e,t.coordinates,n);return}if(t.type==="MultiLineString"){t.coordinates.forEach(i=>this.drawLinePath(e,i,n));return}t.type==="Point"&&this.drawPointPath(e,t.coordinates,n)}}drawPolygonPath(e,t,n){Array.isArray(t==null?void 0:t[0])&&(e.save(),e.beginPath(),t.forEach(i=>{i.forEach((a,o)=>{const s=this.lngLatToLayerCanvasPoint(a);o===0?e.moveTo(s.x,s.y):e.lineTo(s.x,s.y)}),e.closePath()}),e.fillStyle=this.hexToRgba(n.fill,n.polygonAlpha),e.strokeStyle=this.hexToRgba(n.stroke,n.lineAlpha),e.lineWidth=n.lineWidth,n.glow&&(e.shadowColor=n.stroke,e.shadowBlur=14),e.fill("evenodd"),e.stroke(),e.restore())}drawLinePath(e,t,n){!Array.isArray(t)||t.length<2||(e.save(),e.beginPath(),t.forEach((i,a)=>{const o=this.lngLatToLayerCanvasPoint(i);a===0?e.moveTo(o.x,o.y):e.lineTo(o.x,o.y)}),e.strokeStyle=this.hexToRgba(n.stroke,n.lineAlpha),e.lineWidth=n.lineWidth,e.shadowColor=n.stroke,e.shadowBlur=12,e.stroke(),e.restore())}drawPointPath(e,t,n){const i=this.lngLatToLayerCanvasPoint(t);e.save(),e.beginPath(),e.arc(i.x,i.y,n.pointRadius,0,Math.PI*2),e.fillStyle=this.hexToRgba(n.fill,.88),e.shadowColor=n.stroke,e.shadowBlur=12,e.fill(),e.restore()}lngLatToLayerCanvasPoint(e){const t=Number(e==null?void 0:e[0]),n=Number(e==null?void 0:e[1]);return{x:(t-Mn.west)/(Mn.east-Mn.west)*this.topicLayerCanvas.width,y:(Mn.north-n)/(Mn.north-Mn.south)*this.topicLayerCanvas.height}}hexToRgba(e,t=1){const n=String(e||"#30DCFF").replace("#",""),i=n.length===3?n.split("").map(u=>u+u).join(""):n,a=Number.parseInt(i,16);if(!Number.isFinite(a))return`rgba(48, 220, 255, ${t})`;const o=a>>16&255,s=a>>8&255,l=a&255;return`rgba(${o}, ${s}, ${l}, ${t})`}parseWktGeometry(e){var o;const t=String(e||"").trim();if(!t)return null;const n=t.match(/^([A-Z]+)(?:\s+[A-Z]+)?\s*\(/i),i=(o=n==null?void 0:n[1])==null?void 0:o.toUpperCase();if(!i)return null;const a=t.slice(t.indexOf("("));return i==="POLYGON"?{type:"Polygon",coordinates:this.parseWktPolygonBody(a)}:i==="MULTIPOLYGON"?{type:"MultiPolygon",coordinates:this.parseWktMultiPolygonBody(a)}:null}parseWktMultiPolygonBody(e){return this.getWktChildGroups(e).map(t=>this.parseWktPolygonBody(t)).filter(t=>t.length)}parseWktPolygonBody(e){return this.getWktChildGroups(e).map(t=>this.parseWktRing(t)).filter(t=>t.length>=3)}getWktChildGroups(e){const t=String(e||"").trim(),n=t.startsWith("(")&&t.endsWith(")")?t.slice(1,-1):t,i=[];let a=0,o=-1;for(let s=0;s<n.length;s+=1){const l=n[s];l==="("?(a===0&&(o=s),a+=1):l===")"&&(a-=1,a===0&&o>=0&&(i.push(n.slice(o,s+1)),o=-1))}return i.length?i:[n]}parseWktRing(e){return String(e||"").replace(/^\(+|\)+$/g,"").split(",").map(n=>n.trim().split(/\s+/).slice(0,2).map(Number)).filter(([n,i])=>Number.isFinite(n)&&Number.isFinite(i))}createProvinceMaterial(){let e=new Lb({color:16777215,transparent:!0,opacity:0,fog:!1,side:ur});e.onBeforeCompile=i=>{i.uniforms=Xe(Re({},i.uniforms),{uColor1:{value:new nt(2780818)},uColor2:{value:new nt(1058614)}}),i.vertexShader=i.vertexShader.replace("void main() {",` |
|
attribute float alpha; |
|
varying vec3 vPosition; |
|
varying float vAlpha; |
|
void main() { |
|
vAlpha = alpha; |
|
vPosition = position; |
|
`),i.fragmentShader=i.fragmentShader.replace("void main() {",` |
|
varying vec3 vPosition; |
|
varying float vAlpha; |
|
uniform vec3 uColor1; |
|
uniform vec3 uColor2; |
|
void main() { |
|
`),i.fragmentShader=i.fragmentShader.replace("#include <opaque_fragment>",` |
|
#ifdef OPAQUE |
|
diffuseColor.a = 1.0; |
|
#endif |
|
#ifdef USE_TRANSMISSION |
|
diffuseColor.a *= transmissionAlpha + 0.1; |
|
#endif |
|
vec3 gradient = mix(uColor1, uColor2, vPosition.x/15.78); |
|
outgoingLight = mix(outgoingLight, outgoingLight * gradient, 0.22); |
|
float topAlpha = 0.88; |
|
if(vPosition.z>0.3){ |
|
diffuseColor.a *= topAlpha; |
|
} |
|
gl_FragColor = vec4( outgoingLight, diffuseColor.a ); |
|
`)};let t=this.assets.instance.getResource("side");t.wrapS=jr,t.wrapT=jr,t.repeat.set(1,1.5),t.offset.y+=.065;let n=new Pv({color:16777215,map:t,fog:!1,opacity:0,side:ur});return this.time.on("tick",()=>{t.offset.y+=.005}),n.onBeforeCompile=i=>{i.uniforms=Xe(Re({},i.uniforms),{uColor1:{value:new nt(2780818)},uColor2:{value:new nt(2780818)}}),i.vertexShader=i.vertexShader.replace("void main() {",` |
|
attribute float alpha; |
|
varying vec3 vPosition; |
|
varying float vAlpha; |
|
void main() { |
|
vAlpha = alpha; |
|
vPosition = position; |
|
`),i.fragmentShader=i.fragmentShader.replace("void main() {",` |
|
varying vec3 vPosition; |
|
varying float vAlpha; |
|
uniform vec3 uColor1; |
|
uniform vec3 uColor2; |
|
void main() { |
|
`),i.fragmentShader=i.fragmentShader.replace("#include <opaque_fragment>",` |
|
#ifdef OPAQUE |
|
diffuseColor.a = 1.0; |
|
#endif |
|
#ifdef USE_TRANSMISSION |
|
diffuseColor.a *= transmissionAlpha + 0.1; |
|
#endif |
|
vec3 gradient = mix(uColor1, uColor2, vPosition.z/1.2); |
|
outgoingLight = outgoingLight*gradient; |
|
gl_FragColor = vec4( outgoingLight, diffuseColor.a ); |
|
`)},[e,n]}getDefaultTownRanking(){return{title:"乡镇统计加载中",unit:"",rows:pD.map(e=>({name:e.name,value:0,unit:""}))}}getTownRankingMeta(e=this.currentTownRanking){const t=this.getDefaultTownRanking();return{title:(e==null?void 0:e.title)||t.title,unit:(e==null?void 0:e.unit)||t.unit,metricLabel:(e==null?void 0:e.metricLabel)||(e==null?void 0:e.legendName)||"",note:(e==null?void 0:e.note)||""}}getTownRankingRows(e=this.currentTownRanking,t=7,n=!0){var l;const i=this.getDefaultTownRanking(),a=(l=e==null?void 0:e.rows)!=null&&l.length?e.rows:n?i.rows:[],o=this.getTownRankingMeta(e),s=a.map(u=>{const c=this.townMetaByName.get(Lh(u.name));return c?Xe(Re(Re({},c),u),{name:c.name,enName:c.enName,center:c.center,centroid:c.centroid,value:Wd(u.value),unit:u.unit||o.unit,metricTitle:o.title}):null}).filter(Boolean).sort((u,c)=>c.value-u.value).map((u,c)=>Xe(Re({},u),{rank:c+1}));return Number.isFinite(t)?s.slice(0,t):s}hasTownRankingRows(e=this.currentTownRanking){return this.getTownRankingRows(e,Number.POSITIVE_INFINITY,!1).length>0}formatMapRankingValue(e){const t=Wd(e);return Math.abs(t)>=100?String(Math.round(t)):Math.abs(t)>=10?String(Number(t.toFixed(1))):String(Number(t.toFixed(2)))}getBarHeight(e,t){return t?Math.max(2.8*.12,2.8*(Wd(e)/t)):2.8*.25}createBarGeometry(e){const n=new ld(.06999999999999999,.06999999999999999,e);return n.translate(0,0,e/2),n}getProvinceLabelHtml(e,t,n){return`<div class="provinces-label ${t>4?"yellow":""}"> |
|
<div class="provinces-label-wrap"> |
|
<div class="label-main"> |
|
<div class="label-title">${n.title}</div> |
|
<div class="number"><span class="value" data-target-value="${e.value}">${this.formatMapRankingValue(e.value)}</span><span class="unit">${e.unit||n.unit}</span></div> |
|
<div class="name">${e.name}</div> |
|
</div> |
|
<div class="no">${t+1}</div> |
|
</div> |
|
</div>`}updateBarItem(e,t,n,i,a=!0){var u,c;const o=this.getBarHeight(t.value,i),[s,l]=this.geoProjection(t.centroid);return e.visible=!0,(c=(u=e.geometry)==null?void 0:u.dispose)==null||c.call(u),e.geometry=this.createBarGeometry(o),e.position.set(s,-l,this.depth+.45),e.userData=Xe(Re({},t),{targetValue:t.value,geoHeight:o}),e.children.forEach(h=>{var f,d,p,g;(d=(f=h.geometry)==null?void 0:f.dispose)==null||d.call(f),Array.isArray(h.material)?h.material.forEach(v=>{var m;return(m=v==null?void 0:v.dispose)==null?void 0:m.call(v)}):(g=(p=h.material)==null?void 0:p.dispose)==null||g.call(p)}),e.clear(),e.add(...this.createHUIGUANG(o,n>3?16776948:7863285)),a?$n.to(e.scale,{duration:.45,x:1,y:1,z:1,ease:"power2.out"}):this.mapAnimationComplete&&e.scale.set(1,1,1),{x:s,y:l,geoHeight:o}}updateProvinceLabel(e,t,n,i,a,o=!0){var p;const s=Wd((p=e.userData)==null?void 0:p.targetValue,t.value);e.visible=!0,e.userData=Xe(Re({},t),{targetValue:t.value}),e.position.copy(i);const l=e.element.querySelector(".label-title"),u=e.element.querySelector(".number .value"),c=e.element.querySelector(".number .unit"),h=e.element.querySelector(".name"),f=e.element.querySelector(".no");!l||!u||!c||!h||!f?e.element.innerHTML=this.getProvinceLabelHtml(t,n,a):(l.innerText=a.title,u.dataset.targetValue=String(t.value),u.innerText=this.formatMapRankingValue(t.value),c.innerText=t.unit||a.unit,h.innerText=t.name,f.innerText=n+1);const d=e.element.querySelector(".provinces-label-wrap");if(this.mapAnimationComplete&&(d.style.opacity="1",d.style.transform="translate(50%, 0)"),o&&this.mapAnimationComplete){const g=e.element.querySelector(".number .value"),m={value:s};$n.to(m,{value:t.value,duration:.45,ease:"power2.out",onUpdate:()=>{g.innerText=this.formatMapRankingValue(m.value)},onComplete:()=>{g.dataset.previousValue=String(t.value),g.innerText=this.formatMapRankingValue(t.value)}})}}clearTownNameLabelStat(e){const t=e.element.querySelector(".town-stat-label"),n=e.element.querySelector(".town-stat-value"),i=e.element.querySelector(".town-stat-unit"),a=e.element.querySelector(".town-rank"),o=e.element.querySelector(".town-stat-metric");t==null||t.classList.remove("has-stat"),n&&(n.innerText=""),i&&(i.innerText=""),a&&(a.innerText=""),o&&(o.innerText="")}updateTownNameLabelStats(e=this.currentTownRanking){var a;if(!((a=this.townNameLabels)!=null&&a.length))return;const t=this.getTownRankingRows(e,Number.POSITIVE_INFINITY,!1),n=this.getTownRankingMeta(e),i=new Map(t.map(o=>[Lh(o.name),o]));this.townNameLabels.forEach(o=>{var g,v;const s=((g=o.userData)==null?void 0:g.townName)||((v=o.userData)==null?void 0:v.name),l=i.get(Lh(s));if(!l){this.clearTownNameLabelStat(o);return}const u=o.element.querySelector(".town-stat-label"),c=o.element.querySelector(".town-name"),h=o.element.querySelector(".town-stat-value"),f=o.element.querySelector(".town-stat-unit"),d=o.element.querySelector(".town-rank"),p=o.element.querySelector(".town-stat-metric");u==null||u.classList.add("has-stat"),c&&(c.innerText=s),p&&(p.innerText=l.metricLabel||n.metricLabel||""),h&&(h.innerText=this.formatMapRankingValue(l.value)),f&&(f.innerText=l.unit||n.unit||""),d&&(d.innerText=l.rank?`第${l.rank}名`:""),o.userData=Xe(Re(Re({},o.userData),l),{townName:s,targetValue:l.value})})}getInfoPointHtml(e,t=this.getTownRankingMeta()){const n=String(t.title||"统计指标").replace(/排行$/,"");return` <div class="info-point-wrap"> |
|
<div class="info-point-wrap-inner"> |
|
<div class="info-point-line"> |
|
<div class="line"></div> |
|
<div class="line"></div> |
|
<div class="line"></div> |
|
</div> |
|
<div class="info-point-content"> |
|
<div class="content-item"><span class="label">乡镇</span><span class="value">${e.name}</span></div> |
|
<div class="content-item"><span class="label">指标</span><span class="value">${n}</span></div> |
|
<div class="content-item"><span class="label">数值</span><span class="value">${this.formatMapRankingValue(e.value)}${e.unit||t.unit}</span></div> |
|
<div class="content-item"><span class="label">排名</span><span class="value">第${e.rank||"-"}名</span></div> |
|
</div> |
|
</div> |
|
</div> |
|
`}updateInfoPointStats(){var i,a;if(!((i=this.infoPointSprites)!=null&&i.length)||!((a=this.infoLabelElement)!=null&&a.length))return;if(!this.showTownRankingPointMarkers){this.clearInfoPointStats();return}const e=this.getTownRankingRows(this.currentTownRanking,Number.POSITIVE_INFINITY,!1);if(!e.length){this.clearInfoPointStats();return}const t=new Map(e.map(o=>[Lh(o.name),o])),n=this.getTownRankingMeta();this.infoPointSprites.forEach((o,s)=>{const l=t.get(Lh(o.userData.name));if(!l)return;o.userData=Xe(Re({},o.userData),{value:l.value,unit:l.unit||n.unit,rank:l.rank,metricTitle:n.title});const u=Math.max(...e.map(f=>f.value),1),c=.7+l.value/u*.4;o.scale.set(c,c,c);const h=this.infoLabelElement[s];h&&(h.userData=Re({},l),h.element.innerHTML=this.getInfoPointHtml(l,n))})}clearInfoPointStats(){var e,t;clearInterval(this.infoPointLabelTime),this.infoPointLabelTime=null,this.infoPointIndex=0,this.InfoPointGroup&&(this.InfoPointGroup.visible=!1),(e=this.infoLabelElement)==null||e.forEach(n=>{n.visible=!1}),(t=this.infoPointSprites)==null||t.forEach(n=>{n.visible=!1,n.scale.set(0,0,0)})}createBar(){const e=this.getTownRankingRows();this.getTownRankingMeta();const t=new Dn;this.barGroup=t;const n=Math.max(...e.map(i=>i.value),1);this.allBar=[],this.allBarMaterial=[],this.allGuangquan=[],this.allProvinceLabel=[],e.map((i,a)=>{const o=this.getBarHeight(i.value,n),s=new Pn({color:16777215,transparent:!0,opacity:0,depthTest:!1,fog:!1});new dD(s,{uColor1:a>3?16506760:5291006,uColor2:a>3?16776948:7863285,size:o,dir:"y"});const l=new rn(this.createBarGeometry(o),s);l.renderOrder=5;const[u,c]=this.geoProjection(i.centroid);l.position.set(u,-c,this.depth+.45),l.scale.set(1,1,0),l.userData=Xe(Re({},i),{targetValue:i.value,geoHeight:o});const h=this.createQuan(new X(u,this.depth+.44,c),a);l.add(...this.createHUIGUANG(o,a>3?16776948:7863285)),t.add(l),t.rotation.x=-Math.PI/2,this.allBar.push(l),this.allBarMaterial.push(s),this.allGuangquan.push(h)}),this.scene.add(t),this.updateTownNameLabelStats(this.currentTownRanking)}setTownRanking(e){var i,a,o,s,l,u,c,h;if(this.currentTownRanking=e,this.updateTownNameLabelStats(e),!((i=this.allBar)!=null&&i.length))return;if(!this.showTownRankingBars){this.allBar.forEach(f=>{f.visible=!1,f.scale.set(1,1,0)}),(a=this.allBarMaterial)==null||a.forEach(f=>{f.opacity=0}),(o=this.allProvinceLabel)==null||o.forEach(f=>{f.visible=!1}),(s=this.allGuangquan)==null||s.forEach(f=>{f.visible=!1}),this.clearInfoPointStats();return}const t=this.getTownRankingRows(e,7,!1);if(!t.length){this.allBar.forEach(f=>{f.visible=!1,f.scale.set(1,1,0)}),(l=this.allProvinceLabel)==null||l.forEach(f=>{f.visible=!1}),(u=this.allGuangquan)==null||u.forEach(f=>{f.visible=!1}),this.clearInfoPointStats();return}this.InfoPointGroup&&(this.InfoPointGroup.visible=this.showTownRankingPointMarkers&&this.mapAnimationComplete),(c=this.infoPointSprites)==null||c.forEach(f=>{f.visible=this.showTownRankingPointMarkers});const n=Math.max(...t.map(f=>f.value),1);this.allBar.forEach((f,d)=>{const p=d<t.length;f.visible=p,p||f.scale.set(1,1,0)}),(h=this.allProvinceLabel)==null||h.forEach(f=>{f.visible=!1}),this.allGuangquan.forEach((f,d)=>{f.visible=d<t.length}),t.forEach((f,d)=>{const p=this.allBar[d],g=this.allGuangquan[d];if(!p)return;const{x:v,y:m}=this.updateBarItem(p,f,d,n,this.mapAnimationComplete);g&&(g.visible=!0,g.position.set(0,0,0),g.children.forEach(y=>{y.position.set(v,this.depth+.44,m),this.mapAnimationComplete&&y.scale.set(1,1,1)}))}),this.updateInfoPointStats()}createEvent(){let e=[];const t=i=>{i.traverse(a=>{a.isMesh&&(a.material=this.defaultMaterial)})},n=i=>{i.traverse(a=>{a.isMesh&&(a.material=this.defaultLightMaterial)})};this.eventElement.map(i=>{this.interactionManager.add(i),i.addEventListener("mousedown",a=>{this.handleMapClick(a)}),i.addEventListener("mouseover",a=>{e.includes(a.target.parent)||e.push(a.target.parent),document.body.style.cursor="pointer",n(a.target.parent)}),i.addEventListener("mouseout",a=>{e=e.filter(o=>o.userData.name!==a.target.parent.userData.name),e.length>0&&e[e.length-1],t(a.target.parent),document.body.style.cursor="default"})})}createHUIGUANG(e,t){let n=new Za(.35,e);n.translate(0,e/2,0);const i=this.assets.instance.getResource("huiguang");i.colorSpace=dn,i.wrapS=jr,i.wrapT=jr;let a=new Pn({color:t,map:i,transparent:!0,opacity:.4,depthWrite:!1,side:ur,blending:Eo}),o=new rn(n,a);o.renderOrder=10,o.rotateX(Math.PI/2);let s=o.clone(),l=o.clone();return s.rotateY(Math.PI/180*60),l.rotateY(Math.PI/180*120),[o,s,l]}createQuan(e,t){const n=this.assets.instance.getResource("guangquan1"),i=this.assets.instance.getResource("guangquan2");let a=new Za(.5,.5),o=new Pn({color:16777215,map:n,alphaMap:n,opacity:1,transparent:!0,depthTest:!1,fog:!1,blending:Eo}),s=new Pn({color:16777215,map:i,alphaMap:i,opacity:1,transparent:!0,depthTest:!1,fog:!1,blending:Eo}),l=new rn(a,o),u=new rn(a,s);return l.renderOrder=6,u.renderOrder=6,l.rotateX(-Math.PI/2),u.rotateX(-Math.PI/2),l.position.copy(e),u.position.copy(e),u.position.y-=.001,l.scale.set(0,0,0),u.scale.set(0,0,0),this.quanGroup=new Dn,this.quanGroup.add(l,u),this.scene.add(this.quanGroup),this.time.on("tick",()=>{l.rotation.z+=.05}),this.quanGroup}createDiffuse(){let e=new Za(200,200),t=new Pn({color:0,depthWrite:!1,transparent:!0,blending:tz});t.blendEquation=vl,t.blendSrc=rz,t.blendDst=nz,new Jee({material:t,time:this.time,size:60,diffuseSpeed:8,diffuseColor:7442830,diffuseWidth:2,callback:i=>{setTimeout(()=>{$n.to(i.uniforms.uTime,{value:4,repeat:-1,duration:6,ease:"power1.easeIn"})},3)}});let n=new rn(e,t);n.renderOrder=3,n.rotation.x=-Math.PI/2,n.position.set(0,.21,0),this.scene.add(n)}createGrid(){new ete(this,{gridSize:50,gridDivision:20,gridColor:1788784,shapeSize:.5,shapeColor:2776970,pointSize:.1,pointColor:1396093})}createBottomBg(){let e=new Za(20,20);const t=this.assets.instance.getResource("ocean");t.colorSpace=dn,t.wrapS=jr,t.wrapT=jr,t.repeat.set(1,1);let n=new Pn({map:t,opacity:1,fog:!1}),i=new rn(e,n);i.rotation.x=-Math.PI/2,i.position.set(0,-.7,0),this.scene.add(i)}createChinaBlurLine(){let e=new Za(147,147);const t=this.assets.instance.getResource("chinaBlurLine");t.colorSpace=dn,t.wrapS=jr,t.wrapT=jr,t.generateMipmaps=!1,t.minFilter=vr,t.repeat.set(1,1);let n=new Pn({color:4162253,alphaMap:t,transparent:!0,opacity:.5}),i=new rn(e,n);i.rotateX(-Math.PI/2),i.position.set(-19.3,-.5,-19.7),this.scene.add(i)}createLabel(){let e=this,t=this.labelGroup,n=this.label3d,i=[],a=[];fte.map(u=>{if(u.hide==!0)return!1;let c=s(u,n,t);i.push(c),a.push(c)});let o=l(Re({},this.mapFocusLabelInfo),n,t);i.push(o),this.otherLabel=i,this.townNameLabels=a;function s(u,c,h){let f=c.create("",`china-label ${u.blur?" blur":""}`,!1);const[d,p]=e.geoProjection(u.center);return f.init(`<div class="other-label town-stat-label"> |
|
<div class="town-name-row"><img class="label-icon" src="${hte}"><span class="town-name">${u.name}</span><span class="town-rank"></span></div> |
|
<div class="town-stat-row"><span class="town-stat-metric"></span><span class="town-stat-value"></span><span class="town-stat-unit"></span></div> |
|
</div>`,new X(d,-p,e.depth+.85)),c.setLabelStyle(f,.018,"x"),f.setParent(h),f.userData=Xe(Re({},u),{townName:u.name}),f}function l(u,c,h){let f=c.create("","map-label",!1);const[d,p]=e.geoProjection(u.center);return f.init(`<div class="other-label"><span>${u.name}</span><span>${u.enName}</span></div>`,new X(d,-p,.4)),c.setLabelStyle(f,.015,"x"),f.setParent(h),f}}createRotateBorder(){let e=12,t=this.assets.instance.getResource("rotationBorder1"),n=this.assets.instance.getResource("rotationBorder2"),i=new sD(this,{width:e*1.178,needRotate:!0,rotateSpeed:.001,material:new Pn({map:t,color:4763647,transparent:!0,opacity:.2,side:ur,depthWrite:!1,blending:Eo}),position:new X(0,.28,0)});i.instance.rotation.x=-Math.PI/2,i.instance.renderOrder=6,i.instance.scale.set(0,0,0),i.setParent(this.scene);let a=new sD(this,{width:e*1.116,needRotate:!0,rotateSpeed:-.004,material:new Pn({map:n,color:4763647,transparent:!0,opacity:.4,side:ur,depthWrite:!1,blending:Eo}),position:new X(0,.3,0)});a.instance.rotation.x=-Math.PI/2,a.instance.renderOrder=6,a.instance.scale.set(0,0,0),a.setParent(this.scene),this.rotateBorder1=i.instance,this.rotateBorder2=a.instance}createFlyLine(){this.flyLineGroup=new Dn,this.flyLineGroup.visible=!1,this.scene.add(this.flyLineGroup)}createFocus(){this.flyLineFocusGroup.clear()}createParticles(){this.particles=new H0(this,{num:10,range:30,dir:"up",speed:.05,material:new pg({map:H0.createTexture(),size:1,color:61166,transparent:!0,opacity:1,depthTest:!1,depthWrite:!1,vertexColors:!0,blending:Eo,sizeAttenuation:!0})}),this.particleGroup=new Dn,this.scene.add(this.particleGroup),this.particleGroup.rotation.x=-Math.PI/2,this.particles.setParent(this.particleGroup),this.particles.enable=!0,this.particleGroup.visible=!0}createScatter(){this.scatterGroup=new Dn,this.scatterGroup.visible=!1,this.scatterGroup.rotation.x=-Math.PI/2,this.scene.add(this.scatterGroup);const e=this.assets.instance.getResource("arrow"),t=new bb({map:e,color:16776948,fog:!1,transparent:!0,depthTest:!1});let n=bD(dte),i=n[0].value;n.map(a=>{const o=new aR(t);o.renderOrder=23;let s=.1+a.value/i*.2;o.scale.set(s,s,s);let[l,u]=this.geoProjection([a.lng,a.lat]);o.position.set(l,-u,this.depth+.45),o.userData.position=[l,-u,this.depth+.45],this.scatterGroup.add(o)})}createInfoPoint(){let e=this;this.InfoPointGroup=new Dn,this.scene.add(this.InfoPointGroup),this.InfoPointGroup.visible=!1,this.InfoPointGroup.rotation.x=-Math.PI/2,this.infoPointIndex=0,this.infoPointLabelTime=null,this.infoLabelElement=[],this.infoPointSprites=[];let t=this.label3d;const n=this.assets.instance.getResource("point");let i=[16776948,7863285],a=bD(pte),o=a[0].value;a.map((l,u)=>{const c=new bb({map:n,color:i[u%i.length],fog:!1,transparent:!0,depthTest:!1}),h=new aR(c);h.renderOrder=23;let f=.7+l.value/o*.4;h.scale.set(f,f,f);let[d,p]=this.geoProjection([l.lng,l.lat]),g=[d,-p,this.depth+.7];h.position.set(...g),h.userData.position=[...g],h.userData={position:[d,-p,this.depth+.7],name:l.name,value:l.value,level:l.level,index:u},this.InfoPointGroup.add(h);let v=s(l,t,this.InfoPointGroup,u);this.infoLabelElement.push(v),this.infoPointSprites.push(h),this.interactionManager.add(h),h.addEventListener("mousedown",m=>{if(this.clicked||!this.InfoPointGroup.visible)return!1;this.clicked=!0,this.infoPointIndex=m.target.userData.index,this.infoLabelElement.map(y=>{y.visible=!1}),v.visible=!0,this.createInfoPointLabelLoop()}),h.addEventListener("mouseup",m=>{this.clicked=!1}),h.addEventListener("mouseover",m=>{document.body.style.cursor="pointer"}),h.addEventListener("mouseout",m=>{document.body.style.cursor="default"})});function s(l,u,c,h){let f=u.create("","info-point",!0);const[d,p]=e.geoProjection([l.lng,l.lat]);return f.init(e.getInfoPointHtml(Xe(Re({},l),{value:0,rank:h+1,unit:""}),e.getTownRankingMeta()),new X(d,-p,e.depth+1.9)),u.setLabelStyle(f,.015,"x"),f.setParent(c),f.visible=!1,f}}createInfoPointLabelLoop(){clearInterval(this.infoPointLabelTime),this.infoPointLabelTime=setInterval(()=>{this.infoPointIndex++,this.infoPointIndex>=this.infoLabelElement.length&&(this.infoPointIndex=0),this.infoLabelElement.map((e,t)=>{this.infoPointIndex===t?e.visible=!0:e.visible=!1})},3e3)}createStorke(){const e=this.assets.instance.getResource("mapStroke"),t=this.assets.instance.getResource("pathLine3");t.wrapS=t.wrapT=jr,t.repeat.set(2,1);let n=new mS(this,{geoProjectionCenter:this.geoProjectionCenter,geoProjectionScale:this.geoProjectionScale,position:new X(0,0,this.depth+.24),data:e,material:new Pn({color:2868444,map:t,alphaMap:t,fog:!1,transparent:!0,opacity:1,blending:Eo}),type:"Line3",renderOrder:22,tubeRadius:.03});this.focusMapGroup.add(n.lineGroup),this.time.on("tick",()=>{t.offset.x+=.005})}handleMapClick(e){return Ge(this,null,function*(){var a,o,s,l,u,c,h,f,d,p,g,v,m,y,_,x,S,A,w,M,C,b,T,P,D,L,E,I,N;if(!this.currentTopicLayer)return;const t=this.getScreenPointFromEvent(e),n=this.getLngLatFromEvent(e);if(!n){this.clearSelectedFeature(),(o=(a=this.callbacks).onFeatureInfo)==null||o.call(a,{feature:null});return}if(this.currentTopicLayer.sourceType==="wkt-api"||this.currentTopicLayer.sourceType==="geojson"){const R=this.pickVectorFeatureAtPoint(n);R?(this.showSelectedFeature(R),(h=(c=this.callbacks).onFeatureInfo)==null||h.call(c,{feature:{id:((s=R.properties)==null?void 0:s.id)||((l=R.properties)==null?void 0:l.feature_id)||((u=R.properties)==null?void 0:u.project_name),properties:R.properties||{},feature:R,layer:this.currentTopicLayer,lngLat:n},screen:t}),(d=(f=this.callbacks).onLayerStatus)==null||d.call(f,{type:"success",text:"真实矢量要素已选中"})):(this.clearSelectedFeature(),(g=(p=this.callbacks).onFeatureInfo)==null||g.call(p,{feature:null}),(m=(v=this.callbacks).onLayerStatus)==null||m.call(v,{type:"success",text:"当前点击位置无生态保护要素"}));return}const i=this.lngLatToWmsPixel(n);(_=(y=this.callbacks).onFeatureInfo)==null||_.call(y,{feature:null}),(S=(x=this.callbacks).onFeatureLoading)==null||S.call(x,!0);try{const R=yield AD(this.currentTopicLayer,i,{size:fl,buffer:10}),F=wD(R),O=F?null:yield this.queryFallbackFeatureInfo(n),V=F||(O==null?void 0:O.feature);if(V){const H=yield this.enrichFeatureInfo(V,i,n);this.showSelectedFeature(H.feature||H),(w=(A=this.callbacks).onFeatureInfo)==null||w.call(A,{feature:Xe(Re({},H),{layer:(O==null?void 0:O.layer)||this.currentTopicLayer,lngLat:n}),screen:t})}else this.clearSelectedFeature(),(C=(M=this.callbacks).onFeatureInfo)==null||C.call(M,{feature:null});V||(T=(b=this.callbacks).onLayerStatus)==null||T.call(b,{type:"success",text:"当前点击位置无图斑"})}catch(R){this.clearSelectedFeature(),(D=(P=this.callbacks).onFeatureInfo)==null||D.call(P,{feature:null}),(E=(L=this.callbacks).onLayerStatus)==null||E.call(L,{type:"error",text:"图斑信息查询失败"})}finally{(N=(I=this.callbacks).onFeatureLoading)==null||N.call(I,!1)}})}enrichFeatureInfo(e,t,n){return Ge(this,null,function*(){const i=this.getLayerTopicKey(this.currentTopicLayer);if(!["grassland","woodland"].includes(i))return e;const o=(jy[i]||[]).find(h=>h.key===`${i}-distribution`),s=(this.visibleTopicLayers||[]).filter(h=>this.getLayerTopicKey(h)===i).slice(0,5),l=[o,this.currentTopicLayer,...s].filter(h=>h==null?void 0:h.layerName).filter((h,f,d)=>d.findIndex(p=>this.getLayerQueryKey(p)===this.getLayerQueryKey(h))===f);if(!l.length)return e;const u=yield Promise.allSettled([...l.filter(h=>this.getLayerQueryKey(h)!==this.getLayerQueryKey(this.currentTopicLayer)).map(h=>Ge(this,null,function*(){const f=yield AD(h,t,{size:fl,buffer:10}),d=wD(f);return d?{layer:h,feature:d,source:"wms"}:null})),...l.map(h=>Ge(this,null,function*(){const f=yield this.queryLayerFeatureByPoint(h,n);return f?{layer:h,feature:f,source:"wfs"}:null}))]),c=Re({},e.properties||{});return u.forEach(h=>{var f,d;h.status!=="fulfilled"||!((d=(f=h.value)==null?void 0:f.feature)!=null&&d.properties)||this.mergeBusinessProperties(c,h.value.feature.properties,h.value.layer)}),Xe(Re({},e),{properties:c,relatedFeatures:u.filter(h=>{var f;return h.status==="fulfilled"&&((f=h.value)==null?void 0:f.feature)}).map(h=>h.value),feature:Xe(Re({},e.feature||{}),{properties:c})})})}queryFallbackFeatureInfo(e){return Ge(this,null,function*(){const t=this.getLayerTopicKey(this.currentTopicLayer);if(!["grassland","woodland"].includes(t))return null;const i=[(jy[t]||[]).find(a=>a.key===`${t}-distribution`),this.currentTopicLayer,...(this.visibleTopicLayers||[]).filter(a=>this.getLayerTopicKey(a)===t)].filter((a,o,s)=>(a==null?void 0:a.layerName)&&s.findIndex(l=>this.getLayerQueryKey(l)===this.getLayerQueryKey(a))===o);for(const a of i){const o=yield this.queryLayerFeatureByPoint(a,e,{requireContainment:!0});if(o)return{layer:a,feature:o}}return null})}queryLayerFeatureByPoint(i,a){return Ge(this,arguments,function*(e,t,n={}){var p,g,v;if(!(e!=null&&e.layerName)||!Number.isFinite(t==null?void 0:t.lng)||!Number.isFinite(t==null?void 0:t.lat))return null;const o=e.pointQueryTolerance||.0015,s=e.geometryField||"geom",l=t.lng-o,u=t.lat-o,c=t.lng+o,h=t.lat+o,f=yield l1(e.layerName,{cqlFilter:`BBOX(${s},${l},${u},${c},${h})`,maxFeatures:8,timeout:12e3}),d=this.pickFeatureAtPoint((f==null?void 0:f.features)||[],t,n);return d?{id:d.id||((p=d.properties)==null?void 0:p.gid)||((g=d.properties)==null?void 0:g.objectid)||((v=d.properties)==null?void 0:v.OBJECTID),properties:d.properties||{},feature:d}:null})}pickFeatureAtPoint(e,t,n={}){var a;if(!Array.isArray(e)||!e.length)return null;const i=e.filter(o=>this.isLngLatInGeometry(t,o.geometry)).sort((o,s)=>this.getGeometryAreaScore(o.geometry)-this.getGeometryAreaScore(s.geometry));return i.length?i[0]:n.requireContainment?null:((a=e.map(o=>({feature:o,distance:this.getGeometryDistanceScore(o.geometry,t)})).sort((o,s)=>o.distance-s.distance)[0])==null?void 0:a.feature)||null}isLngLatInGeometry(e,t){return!e||!(t!=null&&t.coordinates)?!1:t.type==="Polygon"?this.isLngLatInPolygon(e,t.coordinates):t.type==="MultiPolygon"?t.coordinates.some(n=>this.isLngLatInPolygon(e,n)):!1}isLngLatInPolygon(e,t=[]){return!t.length||!this.isLngLatInRing(e,t[0])?!1:!t.slice(1).some(i=>this.isLngLatInRing(e,i))}isLngLatInRing(e,t=[]){if(t.length<3)return!1;let n=!1;const i=e.lng,a=e.lat;for(let o=0,s=t.length-1;o<t.length;s=o++){const l=t[o],u=t[s],c=Number(l==null?void 0:l[0]),h=Number(l==null?void 0:l[1]),f=Number(u==null?void 0:u[0]),d=Number(u==null?void 0:u[1]);if(this.isPointOnSegment(i,a,c,h,f,d))return!0;h>a!=d>a&&i<(f-c)*(a-h)/(d-h)+c&&(n=!n)}return n}isPointOnSegment(e,t,n,i,a,o){const s=(e-n)*(o-i)-(t-i)*(a-n);return Math.abs(s)>1e-10?!1:(e-n)*(e-a)+(t-i)*(t-o)<=1e-10}getGeometryAreaScore(e){return e!=null&&e.coordinates?e.type==="Polygon"?this.getLngLatPolygonAreaScore(e.coordinates):e.type==="MultiPolygon"?e.coordinates.reduce((t,n)=>t+this.getLngLatPolygonAreaScore(n),0):Number.POSITIVE_INFINITY:Number.POSITIVE_INFINITY}getLngLatPolygonAreaScore(e=[]){const t=e[0]||[];if(t.length<3)return Number.POSITIVE_INFINITY;let n=0;for(let i=0;i<t.length;i++){const a=t[i],o=t[(i+1)%t.length];n+=Number((a==null?void 0:a[0])||0)*Number((o==null?void 0:o[1])||0)-Number((o==null?void 0:o[0])||0)*Number((a==null?void 0:a[1])||0)}return Math.abs(n)}getGeometryDistanceScore(e,t){const n=this.getGeometryLngLatBounds(e);if(!n)return Number.POSITIVE_INFINITY;const i=(n.minLng+n.maxLng)/2,a=(n.minLat+n.maxLat)/2;return Math.hypot(i-t.lng,a-t.lat)}getGeometryLngLatBounds(e){const t=this.getGeometryCoordinateList(e);return t.length?t.reduce((n,i)=>({minLng:Math.min(n.minLng,Number((i==null?void 0:i[0])||0)),minLat:Math.min(n.minLat,Number((i==null?void 0:i[1])||0)),maxLng:Math.max(n.maxLng,Number((i==null?void 0:i[0])||0)),maxLat:Math.max(n.maxLat,Number((i==null?void 0:i[1])||0))}),{minLng:Number.POSITIVE_INFINITY,minLat:Number.POSITIVE_INFINITY,maxLng:Number.NEGATIVE_INFINITY,maxLat:Number.NEGATIVE_INFINITY}):null}getGeometryCoordinateList(e){const t=[],n=i=>{if(Array.isArray(i)){if(typeof i[0]=="number"&&typeof i[1]=="number"){t.push(i);return}i.forEach(n)}};return n(e==null?void 0:e.coordinates),t}pickVectorFeatureAtPoint(e){const t=this.currentVectorFeatures||[],n=t.filter(a=>this.isLngLatInGeometry(e,a.geometry)).sort((a,o)=>this.getGeometryAreaScore(a.geometry)-this.getGeometryAreaScore(o.geometry));if(n.length)return n[0];const i=t.find(a=>this.isPointOrLineNearLngLat(a.geometry,e));return i||null}focusProject(e){var f,d,p,g;const t=String(e||"").trim();if(!t)return!1;const n=(this.currentVectorFeatures||[]).filter(v=>{var m;return String(((m=v==null?void 0:v.properties)==null?void 0:m.project_name)||"").trim()===t});if(!n.length)return(d=(f=this.callbacks).onLayerStatus)==null||d.call(f,{type:"success",text:"当前项目图斑尚未加载"}),!1;const i=this.getFeatureListLngLatBounds(n);if(!i)return!1;const a=this.getProjectHighlightFeatures(n);a.length?(this.showSelectedFeatures(a),this.setSelectedVectorFeatures(a)):this.clearSelectedFeature();const o=[(i.minLng+i.maxLng)/2,(i.minLat+i.maxLat)/2],s=Math.max(i.maxLng-i.minLng,i.maxLat-i.minLat),l=Math.max(.22,Math.min(.55,s*1.25)),u=this.lngLatToWorldPoint(o,.72),c=this.defaultMapCameraPosition.clone().sub(this.defaultMapTarget).multiplyScalar(l),h=u.clone().add(c);return this.animateMapCamera(h,u,.75),(g=(p=this.callbacks).onLayerStatus)==null||g.call(p,{type:"success",text:"已定位项目"}),!0}getProjectHighlightFeatures(e){const t=e.filter(i=>{var o;const a=String(((o=i==null?void 0:i.geometry)==null?void 0:o.type)||"");return a.includes("Polygon")||a.includes("LineString")}),n=t.filter(i=>{var a;return((a=i==null?void 0:i.properties)==null?void 0:a.feature_role)==="工程范围"});return n.length?n:t}getFeatureListLngLatBounds(e){return e.reduce((t,n)=>{const i=this.getGeometryLngLatBounds(n.geometry);return i?t?{minLng:Math.min(t.minLng,i.minLng),minLat:Math.min(t.minLat,i.minLat),maxLng:Math.max(t.maxLng,i.maxLng),maxLat:Math.max(t.maxLat,i.maxLat)}:Re({},i):t},null)}isPointOrLineNearLngLat(e,t){return e!=null&&e.coordinates?e.type==="Point"?this.getCoordinateDistance(e.coordinates,[t.lng,t.lat])<=.006:e.type==="LineString"?this.isCoordinateNearLine(e.coordinates,t,.004):e.type==="MultiLineString"?e.coordinates.some(n=>this.isCoordinateNearLine(n,t,.004)):!1:!1}isCoordinateNearLine(e,t,n){if(!Array.isArray(e)||e.length<2)return!1;const i=[t.lng,t.lat];for(let a=1;a<e.length;a+=1)if(this.getCoordinateSegmentDistance(i,e[a-1],e[a])<=n)return!0;return!1}getCoordinateDistance(e,t){return Math.hypot(Number(e==null?void 0:e[0])-Number(t==null?void 0:t[0]),Number(e==null?void 0:e[1])-Number(t==null?void 0:t[1]))}getCoordinateSegmentDistance(e,t,n){const i=Number(t==null?void 0:t[0]),a=Number(t==null?void 0:t[1]),o=Number(n==null?void 0:n[0])-i,s=Number(n==null?void 0:n[1])-a;if(!Number.isFinite(o)||!Number.isFinite(s))return Number.POSITIVE_INFINITY;if(!o&&!s)return this.getCoordinateDistance(e,t);const l=Math.max(0,Math.min(1,((e[0]-i)*o+(e[1]-a)*s)/(o*o+s*s)));return this.getCoordinateDistance(e,[i+l*o,a+l*s])}getLayerTopicKey(e){const t=e==null?void 0:e.layerName,n=e==null?void 0:e.key,i=Object.entries(Re(Re({},jy),gU)).find(([,a])=>a.some(o=>o.key===n||o.layerName===t));return(i==null?void 0:i[0])||""}getLayerQueryKey(e){return[(e==null?void 0:e.layerName)||"",(e==null?void 0:e.styles)||"",(e==null?void 0:e.cqlFilter)||"",(e==null?void 0:e.key)||""].join("|")}mergeBusinessProperties(e,t,n){const i=(n==null?void 0:n.key)||"";if(Object.entries(t||{}).forEach(([a,o])=>{o==null||o===""||(e[a]===void 0||e[a]===null||e[a]==="")&&(e[a]=o)}),i==="basic-grassland"){const a=(t==null?void 0:t.basic_type_name)||(t==null?void 0:t.grassland_category_name)||(t==null?void 0:t.land_class_name)||(t==null?void 0:t.land_use_name)||(t==null?void 0:t.base_grass);a!=null&&a!==""&&(e.basic_type_name=a)}if(i==="grassland-level"){const a=(t==null?void 0:t.grassland_level)||(t==null?void 0:t.level)||(t==null?void 0:t.grassland_level_name)||(t==null?void 0:t.level_name);a!=null&&a!==""&&(e.grassland_level=a)}if(i==="grassland-type"||i==="wetland-type"){const a=(t==null?void 0:t.grass_min_type)||(t==null?void 0:t.grass_type)||(t==null?void 0:t.grassland_type)||(t==null?void 0:t.type_name)||(t==null?void 0:t.type);a!=null&&a!==""&&(e.grass_min_type=a)}if(i==="grassland-yield"||i==="wetland-yield"){const a=(t==null?void 0:t.yield)||(t==null?void 0:t.xc_yield)||(t==null?void 0:t.xb_xc_yield)||(t==null?void 0:t.fresh_grass_yield)||(t==null?void 0:t.value),o=(t==null?void 0:t.mu_yield)||(t==null?void 0:t.xc_mu_yield)||(t==null?void 0:t.xb_xc_mu_yield)||(t==null?void 0:t.yield_per_mu);a!=null&&a!==""&&(e.fresh_grass_yield=a),o!=null&&o!==""&&(e.mu_yield=o)}if(i==="grassland-health"){const a=(t==null?void 0:t.health_level)||(t==null?void 0:t.health_level_name)||(t==null?void 0:t.ndvi_level)||(t==null?void 0:t.level)||(t==null?void 0:t.level_name),o=(t==null?void 0:t.ndvi)||(t==null?void 0:t.NDVI)||(t==null?void 0:t.value);a!=null&&a!==""&&(e.health_level=a),o!=null&&o!==""&&(e.ndvi=o);const s=(t==null?void 0:t.degradation_level)||(t==null?void 0:t.degradation_level_name)||(t==null?void 0:t.level)||(t==null?void 0:t.level_name);s!=null&&s!==""&&(e.degradation_level=s)}}getScreenPointFromEvent(e){var n;const t=((n=e==null?void 0:e.data)==null?void 0:n.originalEvent)||(e==null?void 0:e.originalEvent)||e;return(t==null?void 0:t.clientX)!==void 0&&(t==null?void 0:t.clientY)!==void 0?{x:t.clientX,y:t.clientY}:null}getLngLatFromEvent(e){var s,l,u;const n=(u=(((l=(s=this.interactionManager)==null?void 0:s.raycaster)==null?void 0:l.intersectObject(e.target,!1))||[])[0])==null?void 0:u.point;if(!n)return null;const i=this.focusMapGroup.worldToLocal(n.clone()),o=Ac().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0]).invert([i.x,-i.y]);return o?{lng:o[0],lat:o[1]}:null}lngLatToWmsPixel({lng:e,lat:t}){const n=(e-Mn.west)/(Mn.east-Mn.west)*fl.width,i=(Mn.north-t)/(Mn.north-Mn.south)*fl.height;return{x:n,y:i}}showSelectedFeature(e){var n;const t=(e==null?void 0:e.geometry)||((n=e==null?void 0:e.feature)==null?void 0:n.geometry);this.clearSelectedFeature(),this.createSelectedFeatureGroup(),this.addSelectedGeometry(t),this.selectedFeatureGroup.children.length||this.clearSelectedFeature()}showSelectedFeatures(e=[]){this.clearSelectedFeature(),this.createSelectedFeatureGroup(),e.forEach(t=>{var i;const n=(t==null?void 0:t.geometry)||((i=t==null?void 0:t.feature)==null?void 0:i.geometry);this.addSelectedGeometry(n)}),this.selectedFeatureGroup.children.length||this.clearSelectedFeature()}setSelectedVectorFeatures(e=[]){this.selectedVectorFeatures=[...e],this.redrawVectorTopicLayer()}addSelectedGeometry(e){if(!(e!=null&&e.coordinates)||!this.selectedFeatureGroup)return;const t=this.getDisplayFeaturePolygons(e),n=new Pn({color:16769370,transparent:!0,opacity:.5,side:ur,depthWrite:!1,fog:!1}),i=new ys({color:16777215,transparent:!0,opacity:.96,linewidth:2,depthTest:!1,fog:!1}),a=new ys({color:2422468,transparent:!0,opacity:.96,linewidth:3,depthTest:!1,fog:!1});t.length&&t.forEach(s=>{const l=this.createProjectedShape(s);if(!l)return;const u=new vg(l),c=new rn(u,n);c.renderOrder=35,this.selectedFeatureGroup.add(c),s.forEach(h=>{const f=this.createProjectedRingPoints(h);if(f.length<3)return;const d=new wn().setFromPoints(f),p=new O0(d,i);p.renderOrder=37,this.selectedFeatureGroup.add(p);const g=new wn().setFromPoints(f),v=new O0(g,a);v.renderOrder=36,v.scale.set(1.004,1.004,1),this.selectedFeatureGroup.add(v)})});const o=this.normalizeFeatureLineStrings(e);o.length&&o.forEach(s=>{const l=this.createProjectedRingPoints(s);if(l.length<2)return;const u=new wn().setFromPoints(l),c=new Mv(u,a);c.renderOrder=36,c.scale.set(1.004,1.004,1),this.selectedFeatureGroup.add(c);const h=new wn().setFromPoints(l),f=new Mv(h,i);f.renderOrder=37,this.selectedFeatureGroup.add(f)})}clearSelectedFeature(){var n,i,a;const e=!!((n=this.selectedVectorFeatures)!=null&&n.length);if(this.selectedVectorFeatures=[],e&&this.redrawVectorTopicLayer(),!this.selectedFeatureGroup)return;const t=new Set;for(;this.selectedFeatureGroup.children.length;){const o=this.selectedFeatureGroup.children.pop();(a=(i=o.geometry)==null?void 0:i.dispose)==null||a.call(i),Array.isArray(o.material)?o.material.forEach(s=>t.add(s)):t.add(o.material)}t.forEach(o=>{var s;return(s=o==null?void 0:o.dispose)==null?void 0:s.call(o)})}normalizeFeaturePolygons(e){return e!=null&&e.coordinates?e.type==="Polygon"?[e.coordinates]:e.type==="MultiPolygon"?e.coordinates:[]:[]}normalizeFeatureLineStrings(e){return e!=null&&e.coordinates?e.type==="LineString"?[e.coordinates]:e.type==="MultiLineString"?e.coordinates:[]:[]}getDisplayFeaturePolygons(e){const t=this.normalizeFeaturePolygons(e),n=this.getLayerClipBounds(this.currentTopicLayer);return n?t.map(i=>{const a=this.clipRingToBounds(i==null?void 0:i[0],n);if(a.length<3)return null;const o=i.slice(1).map(s=>this.clipRingToBounds(s,n)).filter(s=>s.length>=3);return[a,...o]}).filter(Boolean):t}clipRingToBounds(e=[],t){let n=e.map(a=>[Number(a==null?void 0:a[0]),Number(a==null?void 0:a[1])]).filter(([a,o])=>Number.isFinite(a)&&Number.isFinite(o));return[{inside:([a])=>a>=t.west,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lng",t.west)},{inside:([a])=>a<=t.east,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lng",t.east)},{inside:([,a])=>a>=t.south,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lat",t.south)},{inside:([,a])=>a<=t.north,intersect:(a,o)=>this.getLngLatLineIntersection(a,o,"lat",t.north)}].forEach(a=>{const o=n;n=[],o.length&&o.forEach((s,l)=>{const u=o[(l+o.length-1)%o.length],c=a.inside(s),h=a.inside(u);c?(h||n.push(a.intersect(u,s)),n.push(s)):h&&n.push(a.intersect(u,s))})}),n}getLngLatLineIntersection(e,t,n,i){const a=n==="lng"?0:1,o=n==="lng"?1:0,s=t[a]-e[a];if(!s)return[...e];const l=(i-e[a])/s,u=[...e];return u[a]=i,u[o]=e[o]+(t[o]-e[o])*l,u}createProjectedShape(e){const t=e==null?void 0:e[0];if(!Array.isArray(t)||t.length<3)return null;const n=new Uo;return this.createProjectedRingPoints(t).forEach((a,o)=>{o===0?n.moveTo(a.x,a.y):n.lineTo(a.x,a.y)}),e.slice(1).forEach(a=>{const o=this.createProjectedRingPoints(a);if(o.length<3)return;const s=new Uo;o.forEach((l,u)=>{u===0?s.moveTo(l.x,l.y):s.lineTo(l.x,l.y)}),n.holes.push(s)}),n}createProjectedRingPoints(e){if(!Array.isArray(e))return[];const t=[];return e.forEach(n=>{if(!Array.isArray(n)||n.length<2)return;const i=Number(n[0]),a=Number(n[1]);if(!Number.isFinite(i)||!Number.isFinite(a))return;const[o,s]=this.geoProjection([i,a]);t.push(new X(o,-s,0))}),t}enhanceTexture(e){var n,i,a;const t=(i=(n=this.renderer)==null?void 0:n.instance)==null?void 0:i.capabilities;e.anisotropy=((a=t==null?void 0:t.getMaxAnisotropy)==null?void 0:a.call(t))||1,e.needsUpdate=!0}geoProjection(e){return Ac().center(this.geoProjectionCenter).scale(this.geoProjectionScale).translate([0,0])(e)}update(){super.update(),this.interactionManager&&this.interactionManager.update()}destroy(){this.callbacks={},this.clearSelectedFeature(),super.destroy(),this.label3d&&this.label3d.destroy()}}const Fte={class:"map"},yg={__name:"map",props:{activeLayer:{type:Object,default:null},mapRanking:{type:Object,default:null}},emits:["feature-loading","feature-info","layer-status"],setup(r,{expose:e,emit:t}){const n=r,i=t,a=tt(null),o=Ap(null);uo(()=>{h()});function s(f){o.value||!a.value||(o.value=new Ote(a.value,f,{onFeatureLoading:d=>i("feature-loading",d),onFeatureInfo:d=>i("feature-info",d),onLayerStatus:d=>i("layer-status",d)}),o.value.time.pause(),n.activeLayer&&o.value.setTopicLayer(n.activeLayer),o.value.setTownRanking(n.mapRanking))}function l(){return Ge(this,null,function*(){o.value&&(o.value.time.resume(),o.value.animateTl.timeScale(1),o.value.animateTl.play())})}function u(){var f,d;(d=(f=o.value)==null?void 0:f.clearSelectedFeature)==null||d.call(f)}function c(f){var d,p;(p=(d=o.value)==null?void 0:d.focusProject)==null||p.call(d,f)}function h(){var f,d;(d=(f=o.value)==null?void 0:f.destroy)==null||d.call(f),o.value=null}return ni(()=>n.activeLayer,f=>{o.value&&f&&o.value.setTopicLayer(f)},{deep:!0}),ni(()=>n.mapRanking,f=>{o.value&&o.value.setTownRanking(f)},{deep:!0}),e({loadMap:s,play:l,clearSelectedFeature:u,focusProject:c,destroyMap:h,canvasMap:o}),(f,d)=>(ie(),oe("div",Fte,[G("canvas",{ref_key:"canvasRef",ref:a},null,512)]))}};const Bte={key:0,class:"business-stat-empty"},zte={class:"business-stat-rank"},Ute={class:"business-stat-main"},Vte={class:"business-stat-name"},Gte={class:"business-stat-bar"},Hte={class:"business-stat-value"},Wte={key:0},MD={__name:"BusinessStatList",props:{rows:{type:Array,default:()=>[]},compact:{type:Boolean,default:!1}},setup(r){const e=r,t=Se(()=>{const i=e.rows.map(a=>Number(a.value)).filter(a=>!Number.isNaN(a));return Math.max(...i,1)});function n(i){const a=Number(i.value);return Number.isNaN(a)?36:Math.max(8,Math.round(a/t.value*100))}return(i,a)=>(ie(),oe("div",{class:Vt(["business-stat-list",{"is-compact":r.compact,"is-dense":r.rows.length>10}])},[r.rows.length?Tt("",!0):(ie(),oe("div",Bte,"暂无业务统计数据")),(ie(!0),oe(it,null,vt(r.rows,(o,s)=>(ie(),oe("div",{key:o.key||o.name,class:"business-stat-row"},[G("div",zte,Te(s+1),1),G("div",Ute,[G("div",Vte,Te(o.name),1),G("div",Gte,[G("span",{style:un({width:`${n(o)}%`})},null,4)])]),G("div",Hte,[G("strong",null,Te(o.value),1),G("em",null,Te(o.unit),1),o.extra?(ie(),oe("span",Wte,Te(o.extra),1)):Tt("",!0)])]))),128))],2))}},$te=""+new URL("ring2-a1b91808-balabala-1782613078975.png",import.meta.url).href,Xte=""+new URL("ring3-fe0f60d7-balabala-1782613078975.png",import.meta.url).href,Yte=""+new URL("ring4-f2e324d6-balabala-1782613078975.png",import.meta.url).href;const qte={name:"ThreePie",props:{data:{type:Array,default:()=>[]},colors:{type:Array,default:()=>[2161326,15380744,3122407,65535,16536624]},opacity:{type:Number,default:.5},delay:{type:Number,default:5e3},loopComplete:{type:Function,default:()=>{}}},computed:{currentData(){return Xe(Re({},this.data[this.activeIndex]),{count:this.count})}},data(){return this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.axes=null,this.pieGroup=new Dn,{width:300,height:200,activeIndex:0,count:0,timer:null}},mounted(){this.width=this.$refs.pieDom.offsetWidth,this.height=this.$refs.pieDom.offsetHeight,this.count=this.data.map(r=>r.value).reduce((r,e)=>r+e,0),this.init()},beforeUnmount(){clearInterval(this.timer),this.destroy()},methods:{init(){this.scene=new Dz,this.initCamera(),this.initRenderer(),this.initLight(),this.initAxes(),this.initControls(),this.createPlane({url:$te,width:5,position:new X(0,0,-.01),color:"#00ffff"}),this.createPlane({url:Xte,width:6.5,position:new X(0,0,-.02),color:"#00ffff"}),this.createPlane({url:Yte,width:5.5,position:new X(0,0,-.03),animate:!0,color:"#00ffff"}),this.createPie(),this.loop()},createPlane(r){let e={url:"texture/ring1.png",width:5.5,z:0,position:new X(0,0,0),animate:!1,color:null},t=Object.assign(e,r);const n=new Za(t.width,t.width),i=new Pn({map:this.getTexture(t.url),transparent:!0,side:ur,depthTest:!1});t.color&&(i.color=new nt(t.color));const a=new rn(n,i);a.position.copy(t.position),a.rotation.x=-1*Math.PI/2,t.animate&&$n.to(a.rotation,{z:2*Math.PI,repeat:-1,ease:"none",duration:3}),this.scene.add(a)},getTexture(r){const e=new AC().load(r);return e.wrapS=e.wrapT=jr,e},createPie(){let r=0,e=0;for(var t=0;t<this.data.length;t++){let n=this.data[t].value/this.count;t==0?r=0:r=e+1e-4,e=e+2*Math.PI*n-1e-4;let i=this.addRing({startAngle:r,endAngle:e,color:new nt(this.colors[t%this.colors.length])});i.name="ring"+t,this.pieGroup.add(i)}this.scene.add(this.pieGroup),this.chooseRing(this.activeIndex,!0),this.timer=setInterval(()=>{this.loopChange()},this.delay)},loopChange(){let r=this.activeIndex+1;r>=this.data.length&&(r=0,this.loopComplete&&this.loopComplete()),this.chooseRing(r)},chooseRing(r=0,e=!1){let t=r-1<0?this.data.length-1:r-1,n=this.pieGroup.children[t];this.prevMesh=n,this.activeIndex=r;let i=this.pieGroup.children[r];e||($n.to(n.scale,{z:1}),$n.to(n.material,{opacity:this.opacity})),$n.to(i.scale,{z:2}),$n.to(i.material,{opacity:.8})},addRing(r={}){let e={innerRadius:1.5,outerRadius:2,thickness:.5,startAngle:0,endAngle:Math.PI/2,color:65535,segments:120},t=Object.assign(e,r),n=new Uo;n.arc(0,0,t.outerRadius,t.startAngle,t.endAngle);let i=n.getPoints(t.segments),a=new Uo;a.arc(0,0,t.innerRadius,t.endAngle,t.startAngle,!0);let o=a.getPoints(t.segments),s=new Uo(i.concat(o));const l={steps:1,depth:t.thickness,bevelEnabled:!0,bevelThickness:0,bevelSize:0,bevelOffset:0,bevelSegments:0},u=new r1(s,l);let c=new Lb({color:t.color,transparent:!0,opacity:this.opacity,side:ur});const h=new rn(u,c.clone());return h.renderOrder=10,h.rotation.x=-1*Math.PI/2,h},initCamera(){var r=this.width/this.height;this.camera=new Qr(30,r,.1,1500),this.camera.position.set(6.023813305272227,4.838542633695233,6.111272698256137),this.camera.lookAt(0,0,0)},initRenderer(){this.renderer=new fC({antialias:!0,alpha:!0}),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.setSize(this.width,this.height),this.$refs.pieDom.appendChild(this.renderer.domElement)},initLight(){let r=new B0(16777215,2);r.position.set(200,300,200);let e=new B0(16777215,2);e.position.set(-200,-300,-200);let t=new qz(16777215,2);this.scene.add(r),this.scene.add(e),this.scene.add(t)},initAxes(){this.axes=new jz(0),this.scene.add(this.axes)},initControls(){this.controls=new rU(this.camera,this.renderer.domElement),this.controls.maxPolarAngle=Math.PI,this.controls.autoRotate=!1,this.controls.enableDamping=!0,this.controls.enabled=!1},loop(){this.renderer.setAnimationLoop(()=>{this.renderer.render(this.scene,this.camera),this.controls&&this.controls.update()})},start(){this.loop(),this.controls.enabled=!0,this.timer=setInterval(()=>{this.loopChange()},this.delay)},stop(){clearInterval(this.timer),this.controls&&(this.controls.enabled=!1),this.renderer&&this.renderer.setAnimationLoop(null)},getScene(){return this.scene},getRender(){return this.renderer},resize(){this.width=this.$refs.pieDom.offsetWidth,this.height=this.$refs.pieDom.offsetHeight;let r=this.width/this.height;this.camera.aspect=r,this.camera.updateProjectionMatrix(),this.renderer.setSize(this.width,this.height),this.renderer.setPixelRatio(window.devicePixelRatio)},destroy(){this.prevMesh&&($n.set(this.prevMesh.scale,{z:1}),$n.set(this.prevMesh.material,{opacity:this.opacity})),this.stop(),window.removeEventListener("resize",()=>{this.resize()}),this.renderer&&(hee(this.pieGroup),this.renderer.dispose(),this.renderer.forceContextLoss(),this.controls.dispose(),this.$refs.pieDom.innerHTML="",this.scene=null,this.camera=null,this.renderer=null,this.controls=null,this.axes=null)}}},jte={class:"three-pie-wrap"},Kte={class:"three-pie",ref:"pieDom"},Zte={class:"three-pie-slot"};function Qte(r,e,t,n,i,a){return ie(),oe("div",jte,[G("div",Kte,null,512),G("div",Zte,[Df(r.$slots,"default",{data:a.currentData})])])}const Jte=OM(qte,[["render",Qte]]);const ene={key:0,class:"business-panel-empty"},tne={key:2,class:"business-metrics"},nne={key:3,class:"business-icon-metrics"},rne={class:"business-icon-metric-copy"},ine={key:0},ane={key:4,class:"business-spotlight"},one={class:"business-spotlight-main"},sne={class:"business-spotlight-side"},lne={key:0},une={key:1,class:"business-panel-empty"},cne={key:0,class:"business-ring-visual"},hne={class:"business-ring-inner"},fne={key:1,class:"business-donut-visual"},dne={class:"business-three-pie-center"},pne={class:"business-donut-legend"},vne={key:1,class:"business-panel-empty"},gne={key:6,class:"business-structure"},mne={class:"business-structure-overview"},yne={class:"business-structure-band"},_ne=["title"],xne={class:"business-structure-list"},Sne={key:1,class:"business-panel-empty"},Ane={key:7,class:"business-capacity"},wne={class:"business-capacity-head"},bne={class:"business-capacity-band"},Tne=["title"],Mne={class:"business-capacity-list"},Cne={key:0,class:"business-capacity-town"},Ene={key:1,class:"business-panel-empty"},Lne={class:"business-bar-name"},Pne={class:"business-bar-track"},Rne={key:0},Dne={key:1},Ine={class:"business-column-track"},Nne={key:10,class:"business-project-table"},kne={class:"business-project-search"},One={class:"business-project-frame"},Fne=["onClick","onKeydown"],Bne=["title"],zne={key:0},Une={key:0,class:"business-project-empty"},Vne={class:"business-table-head"},Gne={class:"business-table-body"},Hne={class:"business-table-name"},Wne={class:"business-table-value"},$ne={key:0},Xne={class:"business-stack-legend"},Yne={class:"business-stack-chart"},qne={class:"business-stack-track"},jne={key:14,class:"business-line"},Kne={viewBox:"0 0 320 86",preserveAspectRatio:"none","aria-hidden":"true"},Zne=["points"],Qne=["points"],Jne=["cx","cy"],ere=["cx","cy","onMouseenter"],tre=["onMouseenter"],nre={key:0},rre={key:15,class:"business-heat"},ire={key:0},are={class:"business-split-band"},ore={class:"business-split-list"},CD=3e3,Si={__name:"BusinessPanelRenderer",props:{panel:{type:Object,default:()=>({rows:[]})},compact:{type:Boolean,default:!1}},emits:["row-select"],setup(r,{emit:e}){const t=r,n=e,i=["#24f6c4","#32dcff","#ffe06b","#7ee269","#ff9a62","#9ea7ff"],a=Se(()=>{var J;return((J=t.panel)==null?void 0:J.type)||"rank"}),o=Se(()=>{var J;return(((J=t.panel)==null?void 0:J.rows)||[]).filter(ue=>ue==null?void 0:ue.name)}),s=Se(()=>o.value.map(J=>Xe(Re({},J),{value:re(J)})).filter(J=>J.value>0)),l=Se(()=>o.value.map(J=>re(J)).filter(J=>J>0)),u=Se(()=>Math.max(...l.value,1)),c=Se(()=>l.value.reduce((J,ue)=>J+ue,0)),h=Se(()=>o.value.filter(J=>re(J)>0)),f=Se(()=>o.value.filter(J=>re(J)>0)),d=Se(()=>f.value),p=Se(()=>o.value.filter(J=>re(J)>0)),g=Se(()=>f.value.slice(0,6)),v=Se(()=>{var J;return((J=t.panel)==null?void 0:J.segments)||[]}),m=Se(()=>o.value.filter(J=>be(J)>0)),y=tt(""),_=tt(null),x=Se(()=>{const J=te(y.value);return J?o.value.filter(ue=>te(ue.searchText||[ue.name,ue.projectName,ue.category,ue.year,ue.measure,ue.townships,ue.metric].filter(Boolean).join(" ")).includes(J)):o.value}),S=Se(()=>o.value.find(J=>["forage-total","wetland-yield-total"].includes(J.key))||o.value[0]),A=Se(()=>o.value.filter(J=>["forage-edible","forage-unavailable","wetland-yield-edible","wetland-yield-unavailable"].includes(J.key))),w=Se(()=>o.value.find(J=>["forage-top-town","wetland-yield-top-town"].includes(J.key))),M=tt(0),C=tt(null);let b=null;const T=Se(()=>{var J,ue;return`${((J=t.panel)==null?void 0:J.key)||((ue=t.panel)==null?void 0:ue.title)||"pie"}-${s.value.map(Ie=>`${Ie.name}:${Ie.value}`).join("|")}`}),P=Se(()=>{const J=D.value;return J?M.value%J:0}),D=Se(()=>{var J;return a.value==="structure"?p.value.length:a.value==="donut"?s.value.length:a.value==="bar"&&((J=t.panel)==null?void 0:J.variant)==="capacity"?A.value.length:a.value==="bar"||a.value==="column"?f.value.length:a.value==="table"?d.value.length:a.value==="line"?f.value.length:a.value==="split"?h.value.length:0}),L=Se(()=>s.value[P.value]||s.value[0]);Se(()=>p.value[P.value]||p.value[0]);const E=Se(()=>o.value[0]),I=Se(()=>o.value.slice(0,4).map((J,ue)=>Xe(Re({},J),{icon:xt(J,ue)}))),N=Se(()=>p.value.map((J,ue)=>Xe(Re({},J),{displayIndex:ue}))),R=Se(()=>{var J;return a.value!=="donut"?"standard":((J=t.panel)==null?void 0:J.variant)==="ring"?"ring":"three"}),F=Se(()=>{if(!s.value.length)return{};const J=c.value||1;let ue=-90;return{"--ring-gradient":`conic-gradient(${s.value.map((j,Ee)=>{const Ue=re(j)/J*360,et=ue,Y=ue+Ue;return ue=Y,`${Ye(Ee)} ${et}deg ${Y}deg`}).join(", ")})`,"--ring-active-color":Ye(P.value)}});Ko(()=>{Le()}),uo(()=>{Wt()}),ni(()=>{var J;return[(J=t.panel)==null?void 0:J.key,o.value.length]},()=>{M.value=0,C.value=null,y.value="",_.value=null,Le()});const O=Se(()=>{const J=f.value,ue=320,Ie=66,j=10,Ee=J.length>1?ue/(J.length-1):ue,Ue=J.map(q=>re(q)).filter(q=>q>0),et=Ue.length?Math.min(...Ue):0,Y=Ue.length?Math.max(...Ue):1,De=Math.max(Y-et,Y*.08,1);return J.map((q,Ce)=>{const st=re(q);return{x:Math.round(Ce*Ee),y:Math.round(j+Ie-(st-et)/De*Ie),item:q}})}),V=Se(()=>O.value.map(J=>`${J.x},${J.y}`).join(" ")),H=Se(()=>O.value.length?`0,86 ${V.value} 320,86`:""),Q=Se(()=>f.value),W=Se(()=>({gridTemplateColumns:`repeat(${Math.max(Q.value.length,1)}, minmax(0, 1fr))`})),Z=Se(()=>Number.isInteger(C.value)?O.value[C.value]:null),ee=Se(()=>O.value.length?Number.isInteger(C.value)?C.value:P.value:0),he=Se(()=>Z.value?Z.value:O.value[ee.value]||O.value[0]),le=Se(()=>{const J=he.value;if(!J)return{};const ue=J.x/320*100,Ie=J.y/86*100,j=J.y<42;return{left:`${Math.min(84,Math.max(16,ue))}%`,top:`${Ie}%`,transform:j?"translate(-50%, 10px)":"translate(-50%, calc(-100% - 8px))"}});function re(J){const ue=Number(J==null?void 0:J.value);if(!Number.isNaN(ue)&&ue>0)return ue;const Ie=Number(J==null?void 0:J.percent);return Number.isNaN(Ie)?0:Ie}function be(J){const ue=(J==null?void 0:J.segments)||(J==null?void 0:J.values)||{};return v.value.reduce((Ie,j)=>Ie+(Number(ue[j.key])||0),0)}function de(J){const ue=be(J),Ie=(J==null?void 0:J.segments)||(J==null?void 0:J.values)||{};return ue?v.value.map(j=>{const Ee=Number(Ie[j.key])||0;return Xe(Re({},j),{value:Ee,percent:Math.max(Ee>0?3:0,Ee/ue*100)})}):[]}function U(J){const ue=Number(J);return Number.isNaN(ue)?"--":Number.isInteger(ue)?`${ue}`:`${Number(ue.toFixed(2))}`}function K(J){return(J==null?void 0:J.displayValue)!==void 0&&(J==null?void 0:J.displayValue)!==null&&(J==null?void 0:J.displayValue)!==""?J.displayValue:(J==null?void 0:J.value)===void 0||(J==null?void 0:J.value)===null||(J==null?void 0:J.value)===""?"--":U(J.value)}function te(J){return String(J||"").trim().toLowerCase()}function ce(J){_.value=(J==null?void 0:J.key)||(J==null?void 0:J.name)||null,n("row-select",J)}function se(J){const ue=Number(J==null?void 0:J.scaleValue);if(!Number.isNaN(ue)&&ue>0)return Math.max(8,Math.min(100,Math.round(ue)));const Ie=re(J);return Ie?Math.max(8,Math.round(Ie/u.value*100)):8}function Ne(J,ue){const Ie=se(J),j=Math.max(.14,Math.min(.46,Ie/180));return{"--heat-color":Ye(ue),"--heat-bg":Oe(Ye(ue),j)}}function Oe(J,ue=.2){const Ie=String(J||"").replace("#","");if(Ie.length!==6)return`rgba(48, 220, 255, ${ue})`;const j=parseInt(Ie,16),Ee=j>>16&255,Ue=j>>8&255,et=j&255;return`rgba(${Ee}, ${Ue}, ${et}, ${ue})`}function B(J){const ue=O.value.length;if(!ue)return;const Ie=J.currentTarget.getBoundingClientRect(),j=Ie.width?(J.clientX-Ie.left)/Ie.width:0,Ee=Math.min(ue-1,Math.max(0,Math.round(j*(ue-1))));C.value=Ee}function z(J){const ue=re(J);return!c.value||!ue?0:Math.max(6,ue/c.value*100)}function ne(J){const ue=re(J);return!c.value||!ue?0:Math.max(2,ue/c.value*100)}function ve(J){if(!J)return"--";if(J.extra)return J.extra;const ue=re(J);return!c.value||!ue?"--":`${U(ue/c.value*100)}%`}function Ae(){const J=re(S.value);return J>0?J:A.value.reduce((ue,Ie)=>ue+re(Ie),0)}function we(J){const ue=Ae(),Ie=re(J);return!ue||!Ie?0:Math.max(6,Ie/ue*100)}function We(J){const ue=Ae(),Ie=re(J);return!ue||!Ie?"--":`${U(Ie/ue*100)}%`}function Be(J,ue){return["forage-edible","wetland-yield-edible"].includes(J==null?void 0:J.key)?"#24f6c4":["forage-unavailable","wetland-yield-unavailable"].includes(J==null?void 0:J.key)?"#ffe06b":Ye(ue)}function je(J){const ue=re(J),Ie=Number(J==null?void 0:J.count)||c.value;return!ue||!Ie?"0%":`${U(ue/Ie*100)}%`}function Ye(J){return i[J%i.length]}function xt(J,ue){if(J!=null&&J.icon)return String(J.icon).replace(/[^a-z0-9-]/gi,"");const Ie=String((J==null?void 0:J.name)||"");return Ie.includes("退化率")||Ie.includes("利用率")||Ie.includes("占比")?"rate":Ie.includes("重度")||Ie.includes("退化")?"risk":Ie.includes("可食")||Ie.includes("供给")?"leaf":Ie.includes("不可")?"stack":Ie.includes("产量")||Ie.includes("鲜草")?"yield":Ie.includes("乡镇")?"town":Ie.includes("面积")?"area":["yield","leaf","rate","risk"][ue%4]}function Le(){Wt();const J=D.value;J<2||(b=window.setInterval(()=>{M.value=(M.value+1)%J},CD))}function Wt(){b&&(window.clearInterval(b),b=null)}function Ct(J){return`linear-gradient(90deg, rgba(36, 246, 196, 0.18), ${Ye(J)})`}function _t(J){return`linear-gradient(180deg, ${Ye(J)}, rgba(50, 220, 255, 0.12))`}return(J,ue)=>{var Ie,j,Ee,Ue,et,Y,De;return ie(),oe("div",{class:Vt(["business-panel",[`is-${a.value}`,`is-${R.value}`,{"is-compact":r.compact}]])},[o.value.length?a.value==="rank"?(ie(),Ji(MD,{key:1,rows:o.value,compact:""},null,8,["rows"])):a.value==="metric"?(ie(),oe("div",tne,[(ie(!0),oe(it,null,vt(o.value.slice(0,4),q=>(ie(),oe("div",{key:q.key||q.name,class:"business-metric-item"},[G("span",null,Te(q.name),1),G("strong",null,Te(K(q)),1),G("em",null,Te(q.unit),1)]))),128))])):a.value==="iconMetric"?(ie(),oe("div",nne,[(ie(!0),oe(it,null,vt(I.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:Vt(["business-icon-metric-item",`is-tone-${Ce%i.length}`])},[G("i",{class:Vt(["business-icon-metric-mark",`is-${q.icon}`])},[...ue[2]||(ue[2]=[G("span",null,null,-1)])],2),G("div",rne,[G("span",null,Te(q.name),1),G("strong",null,[Zn(Te(K(q)),1),q.unit?(ie(),oe("em",ine,Te(q.unit),1)):Tt("",!0)])])],2))),128))])):a.value==="spotlight"?(ie(),oe("div",ane,[E.value?(ie(),oe(it,{key:0},[G("div",one,[G("span",null,Te(E.value.name),1),G("strong",null,[Zn(Te(K(E.value)),1),G("em",null,Te(E.value.unit),1)]),G("small",null,Te(E.value.extra||((Ie=r.panel)==null?void 0:Ie.note)||"核心业务指标"),1)]),G("div",sne,[(ie(!0),oe(it,null,vt(o.value.slice(1,4),(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:"business-spotlight-chip"},[G("i",{style:un({borderColor:Ye(Ce+1)})},null,4),G("span",null,Te(q.name),1),G("strong",null,[Zn(Te(K(q)),1),G("em",null,Te(q.unit),1)]),q.extra?(ie(),oe("small",lne,Te(q.extra),1)):Tt("",!0)]))),128))])],64)):(ie(),oe("div",une,"暂无业务统计数据"))])):a.value==="donut"?(ie(),oe("div",{key:5,class:Vt(["business-donut",[`is-variant-${R.value}`,{"is-dense":s.value.length>5}]])},[s.value.length?(ie(),oe(it,{key:0},[R.value==="ring"?(ie(),oe("div",cne,[G("div",{class:"business-ring-core",style:un(F.value)},[ue[3]||(ue[3]=G("div",{class:"business-ring-orbit"},null,-1)),G("div",hne,[G("strong",null,Te(je(L.value)),1),G("span",null,Te(((j=L.value)==null?void 0:j.name)||"结构占比"),1)])],4)])):(ie(),oe("div",fne,[(ie(),Ji(Jte,{key:T.value,data:s.value,delay:CD,colors:i,opacity:.62,class:"business-three-pie"},{default:Xt(({data:q})=>[G("div",dne,[G("strong",null,Te(je(q)),1),G("span",null,Te((q==null?void 0:q.name)||"结构占比"),1)])]),_:1},8,["data"]))])),G("div",pne,[(ie(!0),oe(it,null,vt(s.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:Vt(["business-donut-row",{"is-active":Ce===P.value}])},[G("i",{style:un({borderColor:Ye(Ce)})},null,4),G("span",null,Te(q.name),1),G("strong",null,Te(K(q)),1),G("em",null,Te(q.unit),1)],2))),128))])],64)):(ie(),oe("div",vne,"暂无业务统计数据"))],2)):a.value==="structure"?(ie(),oe("div",gne,[p.value.length?(ie(),oe(it,{key:0},[G("div",mne,[G("div",yne,[(ie(!0),oe(it,null,vt(p.value,(q,Ce)=>(ie(),oe("i",{key:q.key||q.name,class:Vt({"is-active":Ce===P.value}),style:un({width:`${ne(q)}%`,background:Ye(Ce),color:Ye(Ce)}),title:`${q.name}:${K(q)}${q.unit||""} ${ve(q)}`},null,14,_ne))),128))])]),G("div",xne,[(ie(!0),oe(it,null,vt(N.value,q=>(ie(),oe("div",{key:q.key||q.name,class:Vt(["business-structure-row",{"is-active":q.displayIndex===P.value}])},[G("i",{style:un({background:Ye(q.displayIndex),color:Ye(q.displayIndex)})},null,4),G("span",null,Te(q.name),1),G("strong",null,[Zn(Te(K(q)),1),G("em",null,Te(q.unit),1)]),G("small",null,Te(ve(q)),1)],2))),128))])],64)):(ie(),oe("div",Sne,"暂无业务统计数据"))])):a.value==="bar"&&((Ee=r.panel)==null?void 0:Ee.variant)==="capacity"?(ie(),oe("div",Ane,[S.value?(ie(),oe(it,{key:0},[G("div",wne,[G("span",null,Te(S.value.name),1),G("strong",null,[Zn(Te(K(S.value)),1),G("em",null,Te(S.value.unit),1)])]),G("div",bne,[(ie(!0),oe(it,null,vt(A.value,(q,Ce)=>(ie(),oe("i",{key:q.key||q.name,class:Vt({"is-active":Ce===P.value}),style:un({width:`${we(q)}%`,background:Be(q,Ce),color:Be(q,Ce)}),title:`${q.name}:${K(q)}${q.unit||""} ${We(q)}`},null,14,Tne))),128))]),G("div",Mne,[(ie(!0),oe(it,null,vt(A.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:Vt(["business-capacity-row",{"is-active":Ce===P.value}])},[G("i",{style:un({background:Be(q,Ce),color:Be(q,Ce)})},null,4),G("span",null,Te(q.name),1),G("strong",null,[Zn(Te(K(q)),1),G("em",null,Te(q.unit),1)]),G("small",null,Te(We(q)),1)],2))),128))]),w.value?(ie(),oe("div",Cne,[G("span",null,Te(w.value.name),1),G("strong",null,[Zn(Te(K(w.value)),1),G("em",null,Te(w.value.unit),1)])])):Tt("",!0)],64)):(ie(),oe("div",Ene,"暂无业务统计数据"))])):a.value==="bar"?(ie(),oe("div",{key:8,class:Vt(["business-bars",{"is-dense":f.value.length>=5,"is-long":f.value.length>10,"is-single":((Ue=r.panel)==null?void 0:Ue.span)===1,"is-distribution":((et=r.panel)==null?void 0:et.variant)==="distribution","is-capacity":((Y=r.panel)==null?void 0:Y.variant)==="capacity"}])},[(ie(!0),oe(it,null,vt(f.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:Vt(["business-bar-row",{"is-active":Ce===P.value}])},[G("span",Lne,Te(q.name),1),G("div",Pne,[G("i",{style:un({width:`${se(q)}%`,background:Ct(Ce)})},null,4)]),G("strong",null,[Zn(Te(K(q))+" ",1),q.unit?(ie(),oe("em",Rne,Te(q.unit),1)):Tt("",!0),q.extra?(ie(),oe("small",Dne,Te(q.extra),1)):Tt("",!0)])],2))),128))],2)):a.value==="column"?(ie(),oe("div",{key:9,class:Vt(["business-columns",[`is-variant-${((De=r.panel)==null?void 0:De.variant)||"solid"}`,{"is-dense":f.value.length>6}]])},[(ie(!0),oe(it,null,vt(f.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:Vt(["business-column-item",{"is-active":Ce===P.value}])},[G("strong",null,Te(K(q)),1),G("div",Ine,[G("i",{style:un({height:`${se(q)}%`,background:_t(Ce),"--column-load-delay":`${Ce*.075}s`})},null,4)]),G("span",null,Te(q.name),1)],2))),128))],2)):a.value==="projectTable"?(ie(),oe("div",Nne,[G("div",kne,[ul(G("input",{"onUpdate:modelValue":ue[0]||(ue[0]=q=>y.value=q),type:"search",placeholder:"搜索项目"},null,512),[[JB,y.value]])]),G("div",One,[G("table",null,[ue[4]||(ue[4]=G("colgroup",null,[G("col",{class:"business-project-col-name"}),G("col",{class:"business-project-col-year"}),G("col",{class:"business-project-col-category"}),G("col",{class:"business-project-col-scale"})],-1)),ue[5]||(ue[5]=G("thead",null,[G("tr",null,[G("th",null,"项目名称"),G("th",null,"年份"),G("th",null,"类型"),G("th",null,"规模")])],-1)),G("tbody",null,[(ie(!0),oe(it,null,vt(x.value,q=>(ie(),oe("tr",{key:q.key||q.name,class:Vt({"is-active":_.value===(q.key||q.name)}),tabindex:"0",onClick:Ce=>ce(q),onKeydown:[Kw(Nc(Ce=>ce(q),["prevent"]),["enter"]),Kw(Nc(Ce=>ce(q),["prevent"]),["space"])]},[G("td",{class:"business-project-name",title:q.name},Te(q.name),9,Bne),G("td",null,Te(q.year||"未知"),1),G("td",null,Te(q.category||"--"),1),G("td",null,[G("strong",null,[Zn(Te(K(q)),1),q.unit?(ie(),oe("em",zne,Te(q.unit),1)):Tt("",!0)])])],42,Fne))),128))])]),x.value.length?Tt("",!0):(ie(),oe("div",Une,"无匹配项目"))])])):a.value==="table"?(ie(),oe("div",{key:11,class:Vt(["business-table",{"is-dense":d.value.length>8}])},[G("div",Vne,[(ie(),oe(it,null,vt(2,q=>G("div",{key:q,class:"business-table-head-group"},[...ue[6]||(ue[6]=[G("span",null,"乡镇",-1),G("span",null,"亩产",-1)])])),64))]),G("div",Gne,[(ie(!0),oe(it,null,vt(d.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:Vt(["business-table-row",{"is-active":Ce===P.value}])},[G("span",Hne,Te(q.name),1),G("div",Wne,[G("strong",null,[Zn(Te(K(q)),1),q.unit?(ie(),oe("em",$ne,Te(q.unit),1)):Tt("",!0)]),G("i",null,[G("b",{style:un({width:`${se(q)}%`,background:Ct(Ce)})},null,4)])])],2))),128))])],2)):a.value==="stackColumn"?(ie(),oe("div",{key:12,class:Vt(["business-stack-columns",{"is-dense":m.value.length>6}])},[G("div",Xne,[(ie(!0),oe(it,null,vt(v.value,(q,Ce)=>(ie(),oe("span",{key:q.key||q.name},[G("i",{style:un({background:Ye(Ce)})},null,4),Zn(Te(q.name),1)]))),128))]),G("div",Yne,[(ie(!0),oe(it,null,vt(m.value,q=>(ie(),oe("div",{key:q.key||q.name,class:"business-stack-item"},[G("div",qne,[(ie(!0),oe(it,null,vt(de(q),(Ce,st)=>(ie(),oe("i",{key:Ce.key||Ce.name,style:un({height:`${Ce.percent}%`,background:Ye(st)})},null,4))),128))]),G("span",null,Te(q.name),1)]))),128))])],2)):a.value==="peak"?(ie(),oe("div",{key:13,class:Vt(["business-peaks",{"is-dense":f.value.length>5}])},[(ie(!0),oe(it,null,vt(f.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:"business-peak-item",style:un({"--peak-height":`${se(q)}%`,"--peak-color":Ye(Ce)})},[G("strong",null,Te(K(q)),1),ue[7]||(ue[7]=G("div",{class:"business-peak-stage"},[G("i")],-1)),G("span",null,Te(q.name),1)],4))),128))],2)):a.value==="line"?(ie(),oe("div",jne,[G("div",{class:"business-line-chart",onMousemove:B,onMouseleave:ue[1]||(ue[1]=q=>C.value=null)},[(ie(),oe("svg",Kne,[ue[8]||(ue[8]=G("path",{class:"business-line-grid",d:"M0 18H320M0 44H320M0 70H320"},null,-1)),G("polyline",{class:"business-line-area",points:H.value},null,8,Zne),G("polyline",{class:"business-line-stroke",points:V.value},null,8,Qne),(ie(!0),oe(it,null,vt(O.value,(q,Ce)=>(ie(),oe("circle",{key:Ce,cx:q.x,cy:q.y,r:"3",class:Vt(["business-line-dot",{"is-active":Ce===ee.value}])},null,10,Jne))),128)),(ie(!0),oe(it,null,vt(O.value,(q,Ce)=>(ie(),oe("circle",{key:`hit-${Ce}`,cx:q.x,cy:q.y,r:"13",class:"business-line-hit",onMouseenter:st=>C.value=Ce},null,40,ere))),128))])),G("div",{class:"business-line-hover-zones",style:un(W.value)},[(ie(!0),oe(it,null,vt(O.value,(q,Ce)=>(ie(),oe("i",{key:`zone-${Ce}`,onMouseenter:st=>C.value=Ce},null,40,tre))),128))],4),he.value?(ie(),oe("div",{key:0,class:"business-line-tooltip",style:un(le.value)},[G("span",null,Te(he.value.item.name),1),G("strong",null,[Zn(Te(K(he.value.item)),1),he.value.item.unit?(ie(),oe("em",nre,Te(he.value.item.unit),1)):Tt("",!0)])],4)):Tt("",!0)],32),G("div",{class:"business-line-labels",style:un(W.value)},[(ie(!0),oe(it,null,vt(Q.value,q=>(ie(),oe("span",{key:q.key||q.name},Te(q.name),1))),128))],4)])):a.value==="heat"?(ie(),oe("div",rre,[(ie(!0),oe(it,null,vt(g.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:"business-heat-cell",style:un(Ne(q,Ce))},[ue[9]||(ue[9]=G("i",null,null,-1)),G("span",null,Te(q.name),1),G("strong",null,[Zn(Te(K(q)),1),q.unit?(ie(),oe("em",ire,Te(q.unit),1)):Tt("",!0)])],4))),128))])):a.value==="split"?(ie(),oe("div",{key:16,class:Vt(["business-split",{"is-dense":h.value.length>10}])},[G("div",are,[(ie(!0),oe(it,null,vt(h.value,(q,Ce)=>(ie(),oe("i",{key:q.key||q.name,style:un({width:`${z(q)}%`,background:Ye(Ce)})},null,4))),128))]),G("div",ore,[(ie(!0),oe(it,null,vt(h.value,(q,Ce)=>(ie(),oe("div",{key:q.key||q.name,class:"business-split-row"},[G("span",null,[G("i",{style:un({background:Ye(Ce)})},null,4),Zn(Te(q.name),1)]),G("strong",null,Te(K(q))+Te(q.unit),1)]))),128))])],2)):(ie(),Ji(MD,{key:17,rows:o.value,compact:""},null,8,["rows"])):(ie(),oe("div",ene,"暂无业务统计数据"))],2)}}},ED="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAD0SURBVHgB7dEBDcAgEACxZ/5NTgkg40JaC137mgesf57wDSlCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTEHKbcBaYZyb5dAAAAAElFTkSuQmCC",sre=""+new URL("pathLine2-d4134d4b-balabala-1782613078975.png",import.meta.url).href,lre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGQAAABkCAYAAABw4pVUAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADzSURBVHgB7dEBDcAwDMCw9vw5f4MRTTYF73/NC3bnBd+QIiRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSIyQGCExQmKExAiJERIjJEZIjJAYITFCYoTECIkREiMkRkiMkBghMUJihMQIiRESIyRGSMwBQCIExogIrTYAAAAASUVORK5CYII=",ure="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAMxSURBVHgB7dZBDcJQFADBB/kCuHAgAQckHAA3Tf27aIXsjIjNXv7bfgyQdB0gSwAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgTAAgbN2erwGaHACECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCECQCErfv7M0CTA4AwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYAwAYCw9fj+BmhyABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABAmABB2Amb1BS2MWc5zAAAAAElFTkSuQmCC",cre=""+new URL("ocean-bg-8c848b8f-balabala-1782613078975.png",import.meta.url).href,hre=""+new URL("rotationBorder1-2ce8e0ef-balabala-1782613078975.png",import.meta.url).href,fre=""+new URL("rotationBorder2-7496b968-balabala-1782613078975.png",import.meta.url).href,dre=""+new URL("chinaBlurLine-1a2cbc0f-balabala-1782613078975.png",import.meta.url).href,pre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA0ESURBVHgB7Z3/VRu7E8XFO+9/kgpIKoAOEioAKoBUAFSAqSCkAkwFQAVABUAFhAoIFfjt3bzl+TlGtndG0oz2fs6ZY/L94R2v9u6MpJG0FkKYBELIXP4KhJB3oUAIiUCBEBKBAiEkAgVCSAQKhJAIFAghESgQQiJQIIREoEAIiUCBEBKBAiEkAgVCSAQKhJAIFAghESgQQiJQIIREoEAIiUCBEBKBAiEkAgVCSAQKhJAIfweSlA8fPoRPnz6Fra2t9u+NjY23/wyfsBg/f/58+/z161d4fn5++/vh4aH9JOlYC9wXSw089F+/fg2bm5tvosBnSjqhwO7u7lrx4G+iAwUiAA//7u5uKwh8LooGuehEcn19HW5vb9+iEFkdCmRFECF2dnZaQaSODlpAIBDKxcVF+0lWY0Jb3s7OziaeeXp6mpyfn08aobu67wXNlbPFDQ9WLUAsBwcHkyYSumqDzObKWRP28vIyqQ1EFQrlT+M8SA+Qy9dGE0lCE1HCzc1N288i/+FK0RaspjTrPRqhsJ/y21w5a8ZqTLPmMfTUa3ApFuYqMEQrpcY0ax5d6tUIxc2wtjauFC2xw8PDtze/NH0YQpo1SzfqVbINC5grZ3sZUgTk1NPg39LvHUqaNcv9/f2Q0i5Xzq5s01FjlibVEn33eDyeDJmTkxMz7ZzQXDm7tM2LGrMgZWj6JL2vMcQ0axbc45qjSZW1WBjHv7y8XKp48PT0NIxGo9AHfD86sKsUKaL6FrVRXcn66+vruyXr+N719fW3znFXMm8N/Jbj4+NwdXUVasSNmpcxhP1VQPoleQO+l2bhe/F2Re0WOrbNwy2KVp3hOxC5kB7iu3ENK32hSlMuV85GH5wmakz6gLH+vtfFgwo6QRwdHbViyP37cU1ce1FamRq0gcaLwJC5cnauIQKgPyGh77Bv90a39lBAuIhuJaIL2qKifokrZ/8wvDml4gAaw75WDSle7shSkUhcOfs/gzg035C1T4LhgUVU0XihLAPapkS6qWyunH2z/f199fQB31dZ/jzXIBS8DHIIBfcUbeXp/syYK2dbww1PRTPk6+peSA0d+xxCcSwSV84mFQfAG8/T/dAwRJQcS4mdisSPs9p9jllqnxVeZMtUH0hw2ifx4SgaL5U48L1INbzci9SWsn/iUCT2ndSY53iPoUeN2D1PFU2cDQHbdhCjSqnEwaix2DBokQJpoWhGs+1g3/KRRY3D9dbLm9Zk7CxoWwe/365zqxYeLsPAFvuoGe4Z7p02DgocbTrWFQFqglnkIUwEprQUi8SMR3N7TqXolA9tAjClafdLpEsOEps9p7RHTygOfdMWieFiUVsOafc7KI50pi0So6OKdpxBmNWE4khvmiIxmmrZcUZzlITiyGeaIjGYatlwBOUNWmCkxcrvGoppjm4ZS7XKO6E5aoUoZOE3Dc0wfK6VARhbl1PeCWyaoEFla6HdmeaL7vv371Z+V/mbqkUFyzvdm+Zmekbas6wDWtGDnXI7hj6EBkY67OUurvW2qXlHEq+mNdlroAzF901kv8OmaS1wM/DyK3NhregxwPMq3JhWqlU4ipS5sEb0YGpl3ypo5/wX1Rq5Ympl37TaulQUKXJG4cnJSZDy48ePdtt9Yhu0EY6YkKJxrmRf3L1R2DH3ZZgVl3bYS82uZ48gGofUM3r4AgcEoc0k4OCgptMfSpBVkdJSBPz/c/tMk5tGFClUZ5fvYhpDuxzW9WsaZfG5O+tZU6z9/f0gAWnV7e1tID45Ozt79zzGZSnRWc+mRml6JTkqjWbDpFGkwObieS6kkV5x5Mq/oS8iJWealS3FkqZXSK04cuUfpFjSNDl3mpVFidL0ip3zeky6KWDmkcz0F5FODg7xUJuaTWPId2NjI4uvWVIs6eTg1dVVIPWANOv6+jpI2NvbCznIIpCdnZ0gQXoziT3G43GQsLm5GXKwFn6HkqQ0OWNo0qzQl7W1tUDqAqUjeC7w2QdEoY8fP4bUJI8gW1tbInFwYrBO8IA/PDyEvkBYTT8kpCa5QCTiAEyv6kXattvb2yE1yQUi7aAzgtSLtG2RnaQmuUAknSlpGCa2QdtKarOk2ckyZOmD9IXiqB9JG+cYyUoqEHSk+o5SgMfHx0DqRtLGiCCS52sZkgpEmiOy/1E/0iwhdZqVPIJIkK4dIPaRCiR1Rz2pQKTqZh+kfqQV2q5TLIlAED0YQepH2s6DTbG49mM4SNp6fX09pCSpQCSlAIwew0EiENcRRAIjyHB4fX0NfRlsH0Ry04gvJNmCa4FIYIo1HCy3tVmBEGIBCoSQCBQIKc5oNGpXjfaxz58/h5RQIIREoEAIiWBWIKmH7whZhqQCkQzfpS4hIGQZzAokx5YuhCwiqUCen59DX3Js6ULIIsxGkBwL8glZRFKBSAoOpevZCdHAbAQBjCKkNEkFYn29MSGLMJtiAQqElCZ5iiURSa4t7kk5rKfRf4fEIM3qexMYQern/v6+/cRzcnd31+6FJt2SVJukR1idnZ1NJDQiyXLUFi2/oW3foxHO5PLycnJ0dJT1VNtZyxJBJGB3eO6PVSexnf+RPcCmT7TFc4AIg+1K8Xeu5yKpAqUHeN7c3BR7e9DSGtpWQo7sIssRbC8vL6KjtrAohmvU66N5xkNfMPiTerEUyFLuLjlJCMJiZ70+plOnPuTa+T+LQKS54v7+fiB1IT35OOfR4MnzOGk/BIfO4/D5HL7S8hjaVAKeqRx+ZokgyBelhYvSsw6JHQ4ODsT7NufaeTPbklvpiaaHh4eB1IE0Zc59sFKWUIXJHilMs/ybNN0GmScO890cad45Go1y3hhaAjs/P59IeHp6yupv1l1NLi4uggSkWVxE5RfU5En7krnTq6wCkQ7NQRxHR0eB+ATikFbvSl+yfcgaslCEJoFDvn4N6ZGn9AqWfeM46WgWo4hPkB5Lo8fp6WkoQVZF4u0v7awzivgyjFxJowfINTk4bdkjCIoOpXkko4gvNKLHeDwudixfdlVqzImUeqPQVjONeY/CbV3kouK1AIBrRexbBe1c5sJaUQRLMgvePFrEDg4OJhqUXHIbCl5Y5e2CDjtTLXum1TE3kCWUu7hWFGGqZc80Xn6gcPSAFb242o1kqmXHTk5OJhqgbsvA7ynrQGzrl1Ux8LYZvGm2p5HUubgD4r2zOpDzsj9SzrT6HcBI9ICVd0Jjdr0DtV6cZS9j0jq7DmMvOhNOtH0ILQy9fQZj0nUe02B42NBvM+OIWocdoKNo6bfVbFqdcoAoZOz32XEGYVUr1QIUSXrTFAcw2Ic05YxqqgUoknSmLQ6jS6rNOaSaagGKRN+0xWF4steeU9qpFuBEop5pi8P48LxJp9TKUADrtXQMw+eao1Udu7u7ln+3WcfanFQDHsIjN7xgtOY5pnGwlZNp59pThiQYG1N3aYjmWjPk06BtHfx+2w4irPdtHG40J7fDw8NJCtCmTioezDvYq8aH4pDfc+3RxA5nNXMunGz7EcuObKH40cvvsmiIGtqjiB0OB0zcOLqUSJzktSYtZdToxOFwwMSVs9F1zlqVvBjnH9KwMO6Z9tzGPJwOmLhytrV5ItHKa7sHBd9X++RiJ4xU6VQF4oC5cvbNcMO7htUSx7zBAPwb16opouQUBq7hfKjdlbP/M+SzmiMisVliXAf/vWeh5BRGJ44KJmldOZvMVtkBEB1ZL29FiAKlHCk73/PAC6WSCgZXziazPmUUeEMiqlirJYIoMPsN33JFi2kq2xvAlbNJTGsHQLyl0bEv8ebENXFt+FBCFB0YZq9pT4C1f/8YNM0bT7z7+CzYxf7h4aG1u7u7t3/jUwJ2toevjSDC5uZm+wmzcDQdzu8YjUahJgYvkKbTmrVRIRBs4z/9+fr6Ovd/u76+3j74nShgFs9oxG/Y29vLfn5gDgYtEDxwiB6kPxDFt2/fip3dkZrsB+hYAtGD9ANR4/j4OGxvb1crjg7zHaUUprlF5tDAQMCASnFcOatmKRYA1Q5Gxwa4tt+Vsyqmud59KGAJwUC3dHXlrJohRRiPxxMSB+nUwNf0u3JW3RBNcpdheAD3hMdJBAqkMwrlNxTGH+bK2eQ2xNQLnW/0MSiMuebK2WwGoaBGq+bRLhRoYnMLnqcSNVfOFjG8WRFVahALo8VqxmLFFWkerNBElvDlyxf1AsdUYKb7+vo6XF1dVVkvlRIKRAAEAsHs7Oy0FbVWBIMyEIjh8fGx/ay9FCQlFIginUggmq4UPXX1LR5+lNE/Pz+3n4gQFIQeFEhiIJBOKF3JOsrYu2izKOogGnSl8SiL70rkIYbub5IOCoSQCIMudydkERQIIREoEEIiUCCERKBACIlAgRASgQIhJAIFQkgECoSQCBQIIREoEEIiUCCERKBACIlAgRASgQIhJAIFQkgECoSQCBQIIREoEEIiUCCERKBACIlAgRAS4R+Py6dcyrAs4QAAAABJRU5ErkJggg==",vre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAYAAACtWK6eAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA4qSURBVHgB7Z3xVdvMEsX15bz/k1RAOoBUQDrAHUAHpgOgAkgF2BWAKwBXEKggUEGcCvx09d76M/LMalfalXal+zvnHhPFllbWXu3MrCT/UxTFtiCEiHwqCCEqNAghFmgQQizQIIRYoEEIsfCfgkThy5cvlU5OTopv375Vfx8dHe2WY9n++yQ2m00l8Pb2tnt9f3+vlr+8vFSvWGbeR8LyT8Eyb2dgAuj4+Ljq+MYUfQKTQDDNer3e/U26QYN4YkaFs7OznTG0EWBozCgDrVar3YhD3KFBHPjx40dxenpavUI58/z8XI0weIWIHRpEAUbAKHFxcRF8hDC5xX6OoWFyFFuu0haEYTDJcrmkWRRokD1CmcLE/0imTW5gEmmTbLcFuY1J+s3fyH1M6NelzTTLIZM3CDrWfD4vZrNZqw5mOtbr62v1OmRFyZhkv2jQdp9ubm52+zN1tlNUOVpsHx4etn/+/Nn68OvXr+3d3d22NNS27JDJ7yfaiLaizWi7L/f399V3lfp+RlRWje0sHOynpyfnDgID4f2Xl5dZGKJJZUi2LUPI6uTgA74DfC6nfQ2krBrbWji4v3//duoMxhT4zBhMoQn75msWfIcTM0pWjfWWjzHGNFL4yowsrmHYhIySVWOd5RpKYbRAfD7xOPuDysR+u1gsti7AKMhxcto/T2XV2EbhTOhqjOvr60mOFj7fpesIjGQe789p/xyVVWNVoaNfXV01Hkgc7KmGUV3kahQcg5F9t1k1VhTCo6aDN8HkMopcjDKy7zqrxn4QzlRNFRiGUnHkYpSRhF1ZNXYnl1EDyTeNEU/o/PiORz6aZNXYqsPf3t5aDwqS9JEmjEnKpTCCY5bpySqfxuJA2EYNhFNIwHPapzGpKezC/2V44sqjofP53HrdFHIRhlPDCwawzaFkeBJLv5G2kApf+MgnqrJU02iCcnAm+5Ju4zAi2GJb5hppqyk3wWUtGRy/NBvWlG+gdJtq26mPwrHSyCAvSa9RuBZIyzewnNdN5SdbWR7LccwTbXtaDTo/P1fNkcmQTClqigpw7BNsdzqNQaVKA5URVqnyF46hbXIxwQpXGg2xXWjIfGN8suUliVW4hm+EzRyc+BuvMjHJsA2wmYNX345fOMaJm2S4jWs5BytV0xKOtVaYSSCCGGbDqFho5ki45EdFkq20P3B1a5gvg+agpH4hmWTgftHvBm21cIZVFPqAdvIcaA6sv43ZzMGEnDLSEnf0nQHmwvrbmPbMJc5zUHUhOZfAxY89t6WfDWnlXJqD0qTNk+D2hx7bEX8jWjkXlxz0uKNUhtJuvuqx/Bt3A8g7pMrEQPEklZnQR6TQvMekPe7OSUl5pvcmUwNp4JNsvJVrt8qynEv5Siv/9pCPxFmxVqpjUk61lZa0Rz7hhl+pNt8xQImOGpmke9wjh1rhV4pHTko7wbyD6iotH8FjnyJtM+wKtdCKM+VUKOExTz2GWuFWplWtMKLE+KKo6Up6aHmkUCvcyqTZcoZWVAzBCFKoFaEIFGZFMAFDK6pPaddrBT4hh1mRlJizakXFllTVCtzvuq9ES5oYWlGxpUUuARP27iuREnNeiEj1Jek5WwFHkW4rkMq6TMypPqUl7IHy324rkEYPJuZU35IuQ0HfDLDu9h/WRo8+vhCK2pc2BxfgZN3+wxw9qJQU6YSdVGMoqpOkk3bHila7D0r1Z44e1NCSJg87VrT8PyTdvMLRg0pBWkWr7SjyqWjB+fn5wbKbm5uCkKHZbDbFz58/D5bP5/OiLV6O0mYuOe9BpSJpFMG/21zp6z2ClEPVwbLFYlG8vb0VhKQARpHlcvlhWWmOosxPijZ4OUqqEvCB01RqkvJkPD6oxboG2ShFRZdUafVN1r1CLCk5lxIiQlJgtVodLJvNZoUvzm6Swism51Sq0pJ1z/W4vVEKrx4fHwf/EijKpq5hlnOIJYVXpUEKQlKmXs0CvmGWk5Ok8IoPn6ZSV9cwy2kEwdxHmWt8WIYECPVmQlIGffTl5eXDMsyJSPN5Es4GqcPwiuSCVM1yNQhoHGakRIfVKyoXIcyq43GFr//KOTlI5SbpR3hccujGEOvk5ORg2Xq9LgjJCanPSn27TqNBpJLY8/NzQUhOSH3WpdzbaJDj42OnjRGSMlKflfq2hDUGq9eQmX9Quao+l+cyH2IdQRCjoWa8T72mTEgu1PMQ9O2mPMRqkPrkIHh9fS0IyRHp5N7JINJkCkcQkitSHtLJIFISQ4OQXJFuC5eipH28QiyYg9dfkVxB362bpKmSpRoECUzdIDQHyZ16BIQ+Xi9E7aMahAk6GSPv7+8Hyz5//qy+3zqC1OGjfUjuSH34+/fv6vtVg0jZPQ1Ccsc3UfcaQZiDkNyRDBIsBymn6gtCckY6yR8dHanvVw0ifUhKcAjJCWkE+fr1q/p+56eaMLwiY6Hel1tVsTgHQsZKvS+3StKbVkpIrvj0ZecqFg1CxkK9L7eqYtk+RMiYaGUQQggNQogVGoQQCzQIIRZoEEIsqAZhWZdMBVtfdzYIy75kLPjM8TmHWDQIGQs+fVk1SP2qRxqEjIV6X7bdCMgQi0yOICPI379/D5bZbiwhJAekK3dbjSC+N5YQkgOSQWw3AnqVeZueQkdI6vg+a8FrBKFBSO5Ifdj2OF3VINKHaBCSO1IfDjJRqK2ckJyQnsXbuszr+6BfQlJHmgNpPZPu+6BfQlJG+kWppqeFWg0ilb8YZpFckR6n2/RAdq8RBEi/OkVIDkgGafrFZm+DMA8hueKboBusP4Nb/xlo/JRu02coKkXhJ8yD/gw0YKJOxoCUoLv83majQaQkhnkIyQ2pz7r8YlqjQR4fH502RkjKSH1W6tsS1hisHJq2dRDLNX2OolJSPf8A6NsOn21e+dPTU9uVU9TgKvPmg/6LPu3yWad70tfr9cGyi4uLgpAckMIrqU9LOBlEmkw5OzsrCMkBqa82TRDu4zTU1OdD8G+GWVTqknJon7k858f+LJfLD/9GXXk2mxWEpIzUR31GD+DkpDKOa53oUNRQenh4OOi36Mse63DfGMMsKidJ1SvfS6W8Hl4thVmsZpFUkapXvuEVcHYTwywqJ0mTg57hFTTIRikqqk5OTjqHV5D374OsVquDZaxmkdSYz+cHy25uboo2eDkKSTmTdSplSck5wHLfdXmPIHgCRD3RQbJ+eXlZEJICUnK+WCyc7h6U8HaVlKxzFKFSEXKNgHlyu0ZIV/iWo8ggXwhFGZXTDgf9smOltd0HpVGE96tTQ0saPWCaDutMqjEU1VrS6BHgpB2+QcxFqCEU6YQdvlHX19e9fSkUBUUaPaDwDWNFi+pTmN+IGO53b6BU0bq9ve3tC6KmLfS1SKMH1H0lUkULtJm5pCgfabPms9ks1DbCNFQaRXilLxVbUr+7v78PuY0wK9KczMlDKpak/DdC5BKuwahe1WHCTsWQlphHqKCGWxmMIDUa9wXH+qKoaQphVJ1Ic3BhG64l7AGTJmri0kKrSFdxhN8B6UkSCLVY1aK6SgutAifm+wq/Ui3UYlWL6iqpaoW+FvHkG2dHtFDr6uoq1o5QIxf6To+hlVG8Hbq7uxN3iA95oHylnXDRxyJvO97KtVCL+QjlIy3v6OnK8fg7V3/IA8Djgzg/QjUpgZNs/J3EbLpExMoDNRJJFyKCHq/Q6GUjaj7CpJ3SpCXlPd9v1NuGxBJdz2cDKhNp5hjg9zH725gWT4Lz8/O+d5xKVOgLEpHnOzT1ujE1aQcs/1JaOXcgc0C9b7B6sLBkEizD/w3RJmp4af0CDNgvBtmoesEZTTJN2cwx8KOkBtuwWv7FF8VwazrCsdbMkUABZ9CNizdZGZi4j19aQg4SeXzU4A2wmoTzJOPVfD5P3RxQEo2gSSYmbZ4jMXNAyTREzUkALjngtVv5C8dQul3WkOCkcVKNUatbYMBaOBVAOHbSb1wCJOmJPvg8uQZVJT9txh3LWeHKT7ZKVeKl/SQbpd4DYGBeko9s+UYGUUGyDbMOyQAXPzLkSvv4aReomuOXQV6ZdOMq2SpcOAPxR3vSEx7zpIVUoIdbZUMpi0ZW1Q3bF47KCEeT4YURQXrskwHHMLPbG7JpaGNewtFkWGHiz3YSy7QKmVVjqzOUdneigblJv2rKNQCOWabzWFk1dieMFLbRBGBykUaJJ3R47Z7x/VEj87J8Vo39IHT+xWLReIAYdoUVjIHSrS2cAshFRnD1Q1aNFeUymtAo/X7XI5rMzaqxqnCmspWDaZRu3y0qT03GADgGI7tmLqvGNsol7No3CnMUXa6hFBhxYSSrxjoLE1UuZzyAORTe5vuvEB4h+XY1xsivjcuqsd5yiZkNuKxlqqOKCaOayrWGCYWqWTW2tXyMAlCBwWfGfA8K9g37CFO4jBYTM4ZRVo3tLNMhfDBmGcPIsj9SuJoCTCCU0pRVY4MJB9slma+DMAzxOXKcHEYXtBFtRZttV0ZLwEA4OUz5/pt//v/HZClHhaLsAEVZran+9uXl5aXS6+vr7u/NZlMMQWmG3f4cHx9Xr233abVaFXd3d4PtSypM3iD7oEOVoVRxenraqmMZjEnw+v7+Xry9vVX/xivUBbTLGAE6OjqqXssqXKc2o33L5bJ4fHwsnp+fC/I/aBCFUGaRQGfclw2YYV+h20FT2KFBHIBZIJgFrzkDI6zX6+qVpmiGBvEEZ3GEM2XiW8X5+Dv0mT0UJsxDfoRRYsj8KFdokACY+N8kxyY/6BPkNibnMcUCiHSDBomESaTNiINXk1AD82rLLfZzFJPoQzCBSfrNqMCRIQ40CCEWPhWEEBUahBALNAghFmgQQizQIIRY+C9cNXNlJEjHoQAAAABJRU5ErkJggg==",gre=""+new URL("huiguang-3c5dfda5-balabala-1782613078975.png",import.meta.url).href,mre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAFPSURBVHgB7ddhbcMwEAXglyEoBEPoGARCIYTBymBhMAgrhDFoIZTBIATC21lxtGhdYieOW7u6T7L6x5HvfPXJBpRSSj0jko2MGqWTJL7tQMkkgSN/tSiRBG5cNQadjB1KI0GfeOsDJXHVmFKjFBLseSaRM0rg2q3PAbn7c8Cn2Dn5HnwJ7p3hWuSI/QHvFiRi5xrkhv+3W59P5ITz7danRi4YdsCn5NGOGdZufRo8kgSwi6zGIPoe9oI4bzIM4tkkjngExh3wqaoYrBRTkRbbslW5bzuWnTswnRorVFiB/dPVII1rVVWvWGjxX4t9qzRIZy9rpD34vH2+zrnIaN03dtj3+zXw27TPYvrvUxcXsMH8ZjRu7pw0z2JOt9sh+MU7GJCUwdZG1ejcwg03LP8oqa9RItvew9i325P7Tf6yY3/1GdbcQymllFJKKaUy9gO4eI9ILG1riwAAAABJRU5ErkJggg==",yre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEYAAABGCAYAAABxLuKEAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAA5BSURBVHgB7VxbjxxHFT516Znd9a537axDAhGJkQKCkEDCA5ECT0TwgBTxjgQviN/DD+BP8IgEAolAECQkcYAkCiEX2TGxY+9lrt1dF75T1T1T055ZO9u9thPtkdo909Ndl6/P+c6lak10KqdyKqdyKqdyKqdyKp8rEXQXxXvfqj8hhKe7JHcFmASQ+iwb31c+isM1vt8VgE4EmCVAiCWHpNv3b6kCgyJAPvl+oiB1DkwDlBSEWktU9VkN4mextBkchsgADb8bAaqBqcFKQeocoE6BqUBJgakBYQA0fwYYGhe04LnMQaLqM890NnEgYfi7jWe/Q1RQBKgGaaZF9y0wCSj1MdMMPoZEvQoQhaMnIlAMjhwRZXU7ZzBZzLBkBHoApQ9QxkQ5rjkAVJ6NwJU0B8hWjwYu6gqgToBpgCKTQ0ND+ls4TwAILqzhmjIF9YFIJjLqGWNkRlrjHMbiNRmttfUlFT4jC8QKHw82q5K1aBNAfQIgducalGpPJ+C0BibhlBQQtY8XDlXRUIv+Oj7n0Apwxrotyz70fksL8QVM4DFJ/itSyl3n3QU8l0shPoYNXYN6vEfSf2i8+hgojTeybAoNKgFwbqMGWbRZVPyDpucmdj8BU2uKqo4+E6uK5rPGgODcd8acxaC/pIT4IQD4Dp7+GkWTWjawgSX/qrP+RU/6j47MUGo9xs1jzH5SaQ+Dk+9G06oJuhOTagVMw4QCueLIBlFbAig4ztiSNpww2xjp93pK/gQ3f4Mqsr0D2Xfk/2Qd/UYo9TZMbKwyGlSmlQP0KWvOhag1M3DuF2CCpsDuM5BlvwbFFrTppNmEhpzD8QK05Od4qr/YhB9D98GvlFfX+FnQCG0s9EXifev9rwrn3si03gcCQXtwnmxGrjG0CE4rk9LUTlKy1ZhxjzlFxMmdAWwbNoLyPED5Ge7pJ+8iN879s/T+iifogfdlbFFkuKOfKXUBbT2FK+tVR4+Bl35BUv46n5pLPaUJrO3AOQ4eL9jSuUUibiXHBqYZyO1BY+BBJIPCnKJKOlMKs9MT8hlo0C8pgBK9hvH+KgD5O0Y/AmAMpAAgvbptXB8XxrxrhPior9QzAPnL1U9PAJyfukxcF4pK9GPZvVdo8KkmYVV9PrZ0pTF4f5SpGJ+wtvQttEU5t6u0ZvOpzcJbTx/kzv0DQJSsVYrduFwYhwefWCvl2Dk3nRrz0prWEog/wv3BOJ4GOM/mxtyASZXQFIOHjYxzYXBrrRGURMafVtoAMyNeuOYM2qKg8/1RCcIFKF7YLQz8OUH+sfoBjPjj3NrXMbtSk+gDkAwj34L27cAw1gIqgqZw0wMZIl85dYLGubOv9qRUMMmH0aOGlr0grHitAGyZWisRDzEwFqRvt+KLstSSP7vQGKFiNMu5j4Y9aWeCNzqnpHhSxIGGN2e9ewvvfD8Tcg3g9IHUdiYl4hixW0XCfCPCf3+zZFgk3cQ9hXHihpXiTeX9rogctNtT4slCZmxSQ3zna5xqqJs4zlcEzOZ+XAKWdAxJg7pPYpgvNypwQrgvEMl78RB+v1iDxwSLGX7E90rpGYQ1EOzjigO95AXFCYoLGcnH8XkTGtfXirR17ipAnVbtQSvFU6EvY/ommnDoXyX5VxvpooGQ70zjW8uECWeYidwGoz5Q3wcsP8S1AmaGuWICQu7I4EiWqryQwZvJXWgda4JgQkbKfbP6XUENdgDWjmWyL0vOteoX00ma0xqY81WWzG8azKcsmV5pEeWSY8JN3fM07Vd6fvTIIE9BzXYpguAUa533B/EnRpfWBKkNyxorBCeiQXPP3nkR7EhpA0zoeD8CE8wFLkIZC3+kmoMS9T9sg+xe/R0Mu26XOYJBhfcWtjFfD1Q0W19/nsXLvZitpyWQTy2tNaYWuE0JWxdaqdgmkhuMKp+RkaB1fC5BqFPcYOC2wdVHulMuMxzSvKxAbF58jm2Kwjrr7OrJt5pbZ8Cw6GSiFkEpVD9wQnx14lHmIAAGb0FD3Pg/XN5b1RbI+gD3XMa9AzxXyDjW3QoFCzd+TWpZqgS4LqUzYKrIk8uR0TUTDXFcTX5XCNMetSQ4JwJobs+QfwfXD/wtbXl+9m00ycAi6hc5nr0oYj2HJffWvmeRX5tQwlnUPN8oex5H2sQxoWOUGz1GziGnR+7igYwNma+Xk9L5d7US36ToTuGuxFfBoFcAznV2TajByJAWkHhICnk+NuoPEO98BE25ga97IKMxnnkQsc63aV7puzqy/oNeBi8HhA1CH8R9s3rM+XlqcM+SSPafnC6DcUNdlo/SB27xo9z6NxGxfhcuq851HkH8/5x37veOxCFMDRZBe6i7oBi1YBFTHwhXMOYbPaW+j/OD/AP3gQz7JTj0EfKLXPV0juKX4zEwqW92kECyHMuUmtFkVcBGlWEBnALF22Hh3e/weTh7FkEfPMnzoOgv4hsAEOAbcb1xHPJvuPc8gP0RHnu07gptvTE07m0EfTmi3rxETVRlWT6NfZqDOTD3zJRYHNS2hHvJKkCs8pqTw7GT9hCE2x8bxyXKP6xr9QOKNRYO0y/qSMavw6DewrXcxcoBhWRQyj6g/xY07euUvDzUYz4cGfdnBDgDmNcQGjfJ0B+vIvSq1YTtpIrXRtpyTHgrLsYmPDgD4y7G5STTvV6OyQ2FpLNQnUvgghy5wo9FVV+BSGjN0zgxB3GhalI1ywS7wcVyP3fFzFtXpsb9tvT2ak+oMZc+RQSU67+8ksDhb1r/vaeFqlAU2o5aozCaQmc0QcgineccBt7Ei5uoM7pxWb5ls0yuh1ovPSxiiYCFCXW7OqjGoq4bwBxHAPblnNwlFL2uKKn2MP1DAD21pZ6srYfab86xURlBae2RWFqTL1Wqi3S/HMZClQY4OYqxeYbyQXxtXpZey2lp37VK7K8L+WwmBRfC60W2W6K0anb78Gx/HVt7Cea1D4I5yBwNwS8ARk+he9OKz8LSyk6jtEkt5NjA8HxZqgFYZNmqH1WeuSZHgWpisVbkwY2Ih9e1sKjsi3FpXOYkvbIhpIX7fkJEMJfJ4cTavxSOPoA5jrW3I8G5qgJ/eT9CrxMfTWnKmrpVOQBasnx7HOnElHCIagmD3Q+TJXMOyrKaHPQHwdihBwNnLhSnHGotcuLcK8i2N+GhLi5pdzq19kVU+i4rL/axsjBADoF4hph0cdYTB5PF4KdAorCx75Lma9utpQtTSt8QxxIc01gedGDBEiUI4SWnhEqixBkIUYODrMTkXzuj9RYXnpLGfOncf6EGl4VQN+CZJkB6Aq1hUAZcfkDFbpJFTWETMnauLTUorRfdWgFTmVOdAQcXiVim5FnCS3AqTOCbTJbaO22gOWKAKhzqB24DvFMUXlxDqfOdNaU4OYx84/313Ps3OD9CYmWElANcO0RBeYLqdwEtHKlqyRbtT7fisktqQvcuwEulejOztWOA4vYqzeElVdYcqH2OItwY5TXwArhC0iEmfAMZxKTEehEmPgsA8eD7OFD+9Pu4Z8imI8ErYK4JYiQ2HwaFib5wi6uPna5dd5pdU7X74FxceOfAa7Ygz2+5NH6qlCp5kQ0aMQbrInbxe7CHf1XPj7HA9F5PAAwpJxyryJAwBmAZ4GlNuCD6opjveqj7bg1ILV0Bk3qB2fYMX3kp8EGOIhbMIIA0RqcFNGGEcvdIWD8syf2HeAHO+3/DxK7hHngg5EreF9AWeCLPMQrvfGDXXG5EbrG7i9rSqbQm3xUbDoNpbcUBl1NeoQxLHDp4D6fsFBWmPiLfEuYyRu32GkB52Tp/GcWoIY4c5oZcSTF/QFsAhI4RLQONYNJvL2pI89xauvBKTUk5JxxrMcEMOxJM1KACJoW37gb86pFxC8QmfxNxiWCMp+DRwTTIvr3iNlSuI6e49blLTvfndS4nAcwy4TfN0WBYNsU/TgcHhqURKQrOnxD4DOKdvJ6EQJkk4kAVch9XmWV/kVNmbdMJyEkAc2QRWoc4R1XaJHh1YUNy8CsJlsdkzCuSIWYc189wMlWsjmYlNcBps9CWjPP40uCXIwHpc+C2GIShnBK4X2MGD1QrAlj94CRUhoU137Gn+TRykqa0LC8M3krF4Iz3tPBCGu924J0QO/UzfE3OkuuVuxbEku91sNlaunLXTW2pd0GkYip3ywXzmSZUN4WVxOrrmbQt3Bt2NPSW50Bdx2Ez6UpjavsXjWu1pLEGEyi74b6PxaY9Jl8fNYiFl0puyLAHL65eZvMdU7Si/c7lpEypNhtVfTZVX+xduNLG4Ix43ZlNRQRemVX2uCJ3gN9GHAyuzZd2Q0xEtwLe7LcT6SqJZFmmNSw1QIFferHSFvbbYfL7GW9JAwgUTYifZyCQlNOA86wyApkn7ddVuqb4dFzUUk4qwGMQ6n0xdUDGEwrmkkUPFVbPTASCi+S8HJvxhkMTF/F5IW1SzE2vCUiagnQuJ+mVal6p44zaVdfgTItoRky8rBWijJoispgghj11vcVai0naWhXXdCJdApOaUpoW1N4k/RsAFtebAxW8SxLI8W+1ptXE29wBnhJ65yC1BuY2PJMCRLQIGk803U0epHerRjQBadZ106Mz6dqUmuWH5m9NYDQlkXDjXtO41y05p/fHRjr665OTIl+WELkm1+u9t7WH4nOR3Nt8nuhWs2mCMqscUsdy7B1HTVmRN6XbviQt7iRPry1LH9K/Q6onv4xXZuB3+cdcJxngsaRuO6TMtGhuR4X0Ta1Yde1EpDONYVlSzWtqTn2N6PZ/LLqKWJeaz339N5EsK8BhaYJzJ30vK10u9UD3PTC1rKgFC1oEhSezzJyaGuKXXI8Nflb+vHiZHKFFy3KrWx5vXvjM/kH6Kjn9LwzuUG4H1N0Eoin/B14zT4gj8tU+AAAAAElFTkSuQmCC",_re="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAnCSURBVHgB7d3tURtXGwbgR563AN4OtgToADrAFYRUYKjASgV2KrBTAUkF0AHuQOrATgUn53iXQBxE9LHfuq6ZM/J4BKPhz3Pv2fusIgAAAAAAAAAAAAAAgGlYBDALKaVP+eU8pu2PxWJxHUDnBACYiRwATvLLQ15VTNM6r7McAL4F0Lk3AcxCMzgvoh6kU7PO68Lwh/7YAYCZyTsBp1HvBExJufL/EkBv7ADAzDSD9Cam48bwB4CW5J2AZRq/ZQAA7coD9nMar9sABqMDADOW6pMBd3mdxrisQ+MfBqUDADPWDNi3Ma6TAevQ+IfB2QGAI5DqkwFlJ+AkhvX9qKLSHwD0JIeAqzQ8T/kDgL6lYU8GLAMAGEYa5mTAxwAAhpOH8UleD6k/q1SfRgAAhpQHctUM5j6GfxUAwDjkwXya19fUna+GPwCMUOr2ZMBlAADjlLo5GbAMAGDcUrsnAzT+AWAqUjsnAx4CAJiOdPjJgFVS+gOA6WlCwD4nAzT+AWDK8iC/TLvT+AeAqUu7nQxYBgAwD3mwf9xi+Gv8A8Dc5AF/98rw1/gHgDlK9RcHrV4Y/uX/qgAA5in9+2SA4Q8AxyAP/PNnAeA8AIDjkAf/tcY/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwGFSSpdlBQAwOXmGn+T1KXaVf+gq1d4HADAZeXZXea3Kil09CwDFhwAARi/P7NNm+Kc2AkDxUBJFAACjlOf0ux9mdysB4PsvEgIAYHzKLfuX5nbsakMAKL4qBwLAODyW/TbM7FYDwCPlQAAYUKrLfg+vzOpOAkChHAgAA0j/LPvtHADexGGuk3IgAPQqz92f8stdXlXs6dAAUJyWDyEEAED3mlvwn/M6iQO0EQCKKuoQcB4AQOvS05P9ltGCtgJAUUUdApQDAaBFzS572fK/ipa0GQAeLYUAAGhHKftFPfxPo0VdBICihIDbsl0RAMBe2ij7bdJVACjKw4KcEACAPbRV9tukywBQVFH3AlrdtgCAOWuz7LdJ1wGgqKLeCbgOAGCjxyf7RYtlv036CACPPigHAsDLnjX9e9k17zMAFMqBAPCDVH/JXrnyr6InfQeAQjkQABrN7vhtdFT222SIAFBUoRwIwJFrvlRvGQMYKgAUVSgHAnCEmsf6lvv9g83AIQPAI+VAAI5Gcwu83O8/jwGNIQAUyoEAzF7zpXm9lv02GUsAKJQDAZitPN/eRX3MbxQXu2MKAMW3AIB5+n+MyJgCwG95XSwWi3UAwMzk+bbMLxcxkovdsQSAX/If5iovOwAAzFaec/f55SyvdQxs6ABQBv7PTSoCgNlrdrrLTsCXGNCQAWAd9Zb/5wCAI1JCQF5lJ+DXGMhQAWAd9fAfNP0AwJDyHCwPAvolBjBEAPg9rzNlPwD4uxz4NnouB/YdAErZ762yHwA8yXPx+8Vx9FgO7DMA3Cj7AcDL+i4H9hEAytV+ud//MQCAjfosB3YdANZR3++/DwBgK32UA7sMAPeh7AcAe+m6HNhVAPg1f/ALZT8A2F+X5cAuAsBNs3UBABzoWTlwHS1qMwAo+wFAB5oQ0Go5sK0AsA5lPwDoTLmt3mY5sI0AcB/KfgDQi6YceBMHOjQAKPsBQM+a2+3dPDkwpXSVXqfoBwADyrO4ymv1yqxebfrZfXYAlP0AYASelQN/j7Zs2AFYlbQRAMCo5Pm83GUH4LVf9GMAeDD8AWC8yu35tgOA7X4AmIA8s0/TUy/goACwDABgMp6VA/cKAJclBAQAMDl5hp/k9SEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA6XUqrKCgDgOOTBf5LXKq+H8u8AAOYvD/1P6cmnAADmLQ/89+nf3gcAME950L9Lm/0UAMC85AF/ml73tbwnAIB5aBr/q/TfynuqAACmLT01/rdV3utkAABMWR7mt2l3twEATFN6ufG/LScDAGBq0uuN/21dBwAwDem/G/+7cDIAAMYubd/431Y5HlgFADBOaffG/7ZWyckAABintF/jf1t3AQCMSzqs8b+tDwEAjENPw/+RkwEAMLQ8kM9T/84DGJVFAEcj1e38cm++in59y+tssVisAxgFAQCOxIDD/9E66hDwLYDBvQngWJTn9VcxnKr5DMAICABwBFLdxh/DE/rOk5MBANC91G/jf1tOBsDAdABgxvKgvYzxbrtfLBaL+wAGIQDATKW69PeQ11gfyetkAAxIBwBmKD01/sf8PP7y2e6SLw6CQdgBgBnKQ7Vc+U/la3m/5F2AswB6ZQcAZiaNp/G/rdPkZAAA7C+Ns/G/rfcB9MYtAJiJNO7G/7au8u2A3wLo3P8CmJOfY9r+DAAAAAAAAAAAAAAAAOCZvwCgkvxAcNS/iwAAAABJRU5ErkJggg==",xre="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACkAAAD/CAMAAABb2Q/2AAAAsVBMVEUAAAD///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////+3mHKcAAAAO3RSTlMABQoPExgdISgxJTYsQDtTRUr+9vpOWXJdaWVhgIx2om2n6oiWmYTKr5G68J22eqvBfeHZ5c++1LPdxUM4ZWUAAAZvSURBVGjerdrZdpswFAXQmnk0EMB4Ajwbz2Mc1///Yb0SuLg1km66mtfsdRBXRyIP+fH205IURZZa7794h7KqKZKEkrqFCgVpOSpOKoaJljZWOm1VwUnTRUv7/0sbvc62r2FlgJOy0o6x0kVL30NJiUh0ZkfHZuLXGWj/PTNArzPu68hMr4/MVEGqMlJaWNkDKWGukM4IK70uTipq3NVBthASMoWb1CJS644cIoG2OJDIQUYlm4KDH7mWxDJoKfX+3iSyooxEMqRSyhVlJFJp9YY2SGZoiyGZkMh+YtPRN4eWDqQCckSl1CoxIxKkQTMVSWp+pyeUQY4WbSqftuG9S+kkqWupitwkgdZSe5VSo5SeMgOpiaWqmfuVb1BZUUbkU6pyHdokJSJPs0AoZcjU7WRBMhWgQjnkSqmW2dB3ailx5HAW1FJqzJRLOd3Gjo6R7cVTym+y9aecbr1KCjLdae7hMt0090yupBAq/yLld1lHapa7WMVEElqNnimnr1JiS3+Rxqal8aVCZZp3+FJ+ylnRBalSyperA1IGM7ScFwNbIJXvSSOY3/u2QaTSIKVXudp2uVIupW7Eq3kHLetMmSu3RQ8p8/XoVQJtGieVu55A0lfXHY9m6iqhQpkg5fhNtljySKSGkPNxry2SKpGdec6VciUtIvtIOV5nbQekypLKUx4ep1rKHNk9PPZIWdRSEcmTi5KDYjl0HatZSn/IO1Kag/E9E0m1kkVSSlUg++Mic02UvD8WCKkbZn/3ORVLrZSLb0kdIdf06brGkspT9tZf6T9KiSmL25Aj5Ve5Bml8VyqNUn2u8zP1cfJ2mQmlRuToeJnRp2v/TdpE+jaVKk86IH8iZfJAy/UjRcrdkUhLIC0iH1j5uMwDnFyec7TcBrYjkDrIrJI6RuYYaYK8YqRh2vvP61gkNSpPy69t0EbI9pDK+iDx5GUbU6kJ5OIyKQKc/LnZ4TKnZ5R0zHZ63qxxmatreItdkbQM011NwqPHk1WVcJIWxJ2dJzuQDl5aukjOr5O159oYOYmWT6ny5Sb6xMktSkI9fSp9jMw30VcHpCGW4QeRpki2vyM34bITtHmSFqSSPkaO8TKMvujT4WZiSZ3IYBx+XLoI6WKljZVOJQccqbxJhyeNSv4cBLRMfBnDPD8HMVIuqTQwmRjpx7BHF5GkVYoP8EZ9DyG9UkJBOdJ6le3/JB2okleA7OFlWVBmQ0C6IDfhF5UOS2oaLUjnXkqXJ+kWUTnCyTA6j7qwSSxJBw+yew8/zgmVhqaxpe91d7XUEXIQ+zRTZUnYokEpq41XBPKaVZKb2aeSbDxb0hukAzK8iCSMs5J72CS+hMzeGuSJSJsnYfAgP64nsp0Mqfwhh1Q6fDkqZTcWy1v4McHIAZWLpC5Tk4QqeThJNzP5jgzPC6iISPaTI8gpXxovstx4kYR1iiUUJDtGONnLHiDTPU/qpdx/W9KCsiQUuTuicnXqieWJyqFIxiCXYXRd0YIypUPlcBmGRMJHli+TWvIzB8liCeucLWiV2dKv5Ga2SKjUm6RGpFfJOZRJIPsZXk5LmdF7kSVJ6fbTz0p6bGnWcgu140lakPQzjCbbVCxPIEOBtF5kXhaUKeH2HA1XX7DOfLXvYeWJL6EgtewEzVKt5GJG5LiqcrM0XuWsklqjpKWjMgQ5EshsSjMPAul7IOdfUbQ5zKHKIC2uvEThBGTCl1C6LchNQWTMlynIj7DYTkG6PLmv5YAre/vVU2YCeVrlP4nMsfKep3A8GFIH2flL2oxMUuThbFzJfZ8ldQfkiMpos8tXWDkm0ufJxfwpT0J5OMM61wcoPUiDKRMiP4ic8WU3mW6pvEFBhbI4RyALjLxSOYfSs2VM5P0KTz9CQblykKQ5kdHxLpIZkVEUVrLNkC6VOyIf9y3IgCHNV7mD0nPlfjXekXUudzkcJLb0+iDXE5ycVXItkqdapgypUNk7zQ63/y2Hv+U4zVjSKmVxm8A8P29COS+Ov+WgUcog/VouK+nwJawTl0nlmitdpNRrWc8TLW2OpJOvukROh6pITZ33+q8STodpNUgFZFz2k3SenCPPfZctkOT+pKeDyCO5Q0CW/3vyJu3qZgC5Jrdi7Dram6xGT+9kuEOie135Ur4dOfLlOoOsLjCr/rzXki6U/nVBvkf0c1Qu809Z9w4+8GeYUnrqkWm+LvMXnJRTlwruvBIAAAAASUVORK5CYII=",Sre=""+new URL("focus_bg-b6803e2d-balabala-1782613078975.png",import.meta.url).href,Are="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAMAAADDpiTIAAAAOVBMVEUAAAD///////////////////////////////////////////////////////////////////////8KOjVvAAAAEnRSTlMA3yDvvxBAn3CAYFCQzzCgj6+a/gWFAAAIxklEQVR42uzBgQAAAACAoP2pF6kCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGB27gRJcRiGAqi8O2sH3f+wM1XM1lOAHZwQKfnvBF3tjyxbBgAAAAAAAAAAAAAAAAAAAAAAAAAAAACAvfBPxkz+lro8xEBwMfyd87dumAkugx9xfhkswRXwUyb1CMH58UvTEgm0CjOVcYlLA4FCMTkOVQFABs4nLo5/ylTEdUxCP6BGyJ7vPBVxNd8TKBA6x3+EugCgDJxGTPyvnkp4HURAtOj5O18RAETgLKLn/7lQDgAicA7W8wN9OQCIwBmEhR/y5QAgAieQHT/mwj4BYJMJpIgTPxVLAXibwdRYhrDwC6kmANgHFBsc/7V+D+AWBpeDRws3LojFAKAI6BUdl4zFAKAIaBUWLnOFADRb8JL0INZwjUiv+MkYw00MtoFDZMdVRqpgY8zdbXL8Doc7gQMsXMnRCvPQ3RyvthB8lp24WqSV5v7L8DoTtoGPmg3XG+kNc+/RCIg1OK7nB3pP6G9cz+Hh6MdkruZzoAZ2TR3oCD6i40pujNTMfhkkQJSlemAbaBOhN0iAHImr+Egbqo1AIthZalj+tgggARIkrjBF2kFvkIDDpUMvZnuDBBwrcVkXaDe2QwKO1HGRt7QrO2EwcJhOxFiuNzgNHqM7/ON/Zz2XYDy8g0HCx7/2Khpzgc1ZJ2gcZ00pjPjOwKf/5WOgDwqjoDhewiRt18382kSwoUXet7Rmg8Pgx2SJ9dYaYUXpvAoNoA90iOD5FYc2YCPB8CtfdJgvfsXgGyPbWOReu3VoA/bXy13/UgLwQ8MbsEbw+hcS4LAJtEui17+QgBtBo174+hN1GArsyBqZ/f+/vrAJNGjYADwJ4XES2Mus4pgdDE4COzHS7n8fswZToV1kfk7UxH3GTGAP1qj5t2b0gTtI/NRIwozoAzdnNTSANY2goG5FlaTqX2qd/POqLlZNA3CXcRTcVtL2ifLa/mDZrIobgH9ZhxLwkQIg9td5M0rAdqzGqzWPErCZpOkE8JvFd8a3YmW/AVj/NkDcxYVwSVsHeBecytwKZNR1gHcZE4F9H4IZEm5SdXkllldaAIgiToIbsGoLAJHHSbBdUlsAiKKaCbZgRm8BeF4CHEGlQXEBIIrYA1olzQWAyOA2sJHTXACIMq4C2gxq3oE9FpyGh8yCJe0ldOQHfFaS3+M5fWPAQhvofI/Vrxb1X6V5rH6DUXcL+L0NdCli9VeatO8AROHX6o9Y/fXsGX5swzO7ERc/b+n17wBEA1b/bQlvqq7NqD8DQAt7hh0A3jfgGvXaRtWDQGjmlc8BoJFDC3BpM1qAaxvwnu7auhPcA8MP9u40yU0ghgIw6s2AWcy7/2EzNUmq8iMzeNwNSNb7jgCNpFYvVNh4ss63xEu3fYusAV3LrAF9K+ZuhaGm7pwE+NZzEuDbwMsVfFt5rNK3jQPAt2R+RzgdcSagIyeEA8A34X4w37gh0DkOAOe4FOAcTwXR+0ic0vjGpoZzbGo4xwHgHLtazrGp4RybGr4FNjV8K9zg6lvhTQe+cYezc9zh7NzGc66+zdzh7FvkjaeuLTzo7NudfSDfeNuRc7ztyLnIWaBrvPHSuZGTAN9unAT4JvivqSMXFrAGdG20//NDqpG4I9S1bP0H6OqUh6ns+RZ/v9SjPKKxCdTGEqCVXB7R3EJ6AM8ENJHLLVrcTDeCXYB6eUzRaBMtgdvBGrx9s48vgAsBVXKfTAfQGyeBh7RRo5EyMAv7wFVyhOkzFSMzQKUVphupwgxQqcByFT2CGaBWhOHtFGI7fqkwGQ4BI5gBqhXYDQECrgPUS2ZDwGh47CrSw+pyioArwQ3kCJu9gBEsAZsYYLIdGIQlYBsZgMHDdQNYAjayWnyUAQwArRQYLKdni6NWqwRzdeDIAHBKCIhKP6cgDAAtJWtJIDEANFVgKwn0YABoK5lKAgEMAOc9UlHXDsrCANDchC89OmUeDADt5WimDOjxJWEAqHusFm5bWmBmqNoy2/iwggBcBjxCgYVCMIuVSGXPBOjvByWwAjxKjvof7g02EpVNdwC69wYM+MCNYIfZlI+AAfpjlGk5qh4BA5gADlageAQMYAI43KR3BAz4xBthDpUFSvPsDTDRqLAuRHwn5e4SOeGDqTVrq3pAX60VBADXAM4x4VuydKdbBCwAzjND2efW4zezhxiNCYLvPXJ3ovyAxqz0zpao6JEHAVgAnuwOaEkDfcQfvA7oRD32pNCdICR80Nucel8D9sjYHa6PfP9XmbBrDt2hQgLf/3VW7BtCd5g8YN/a0WFW4MI80Ee+/6utuGwIlBl8/9dbcc0QKAl8/yqsuGAIlAS+fy0GPEfG3DWRe8FfXABSYMCT5Bba/LPuE+d/agx4WhpDq5/X6GlF0z3iedvLqeCe8LzI/v+JguAn0rjUdx717UnxLMz4GbmN4eUN6de3oGn/89wXt+G+dD8QwfJfrz7iFXHehr6U0HCQRZZ/lwiCKiIyp2dygKK9SPSvPKFafQ6YeP7jOqOgUm0OiOp/YvPewoo6lfOAjZ//j+kKAntn09n8Ua8uCHTfW5n9DVgEL3u9FzQz++vRy0EDIEfO/U14OQ90OxKjvxEvDoGXfgOT2Pr5xc6d4zAIAwEUDdjsm+D+h02X1pZFgcN7V5ivGRr8REUJFLxRFR3/pypI4JMSjb8m7VESQP4NGIz/6dqjuTWA7voJk0+/KsyxIIDkDYij8Vcjfw1k/pYeVru/MssR7gmgu4LLX6ecBj5pu9Vfr37dEgHw79r5aATwcu2yxiCAl9uX6YxBAC/X9cs4DWfcmkYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMC3PTgkAAAAABD0/7UrbAAAAAAAAAAAAAAAAAAAAAAAAHAKGbwwCsmp53wAAAAASUVORK5CYII=",wre=""+new URL("focus_move_bg-cf41417a-balabala-1782613078975.png",import.meta.url).href;class _g{constructor(){this.ready=null,this.init()}init(){this.instance=new cee,this.instance.addLoader(Rv,"FileLoader");let e="./",t=[{type:"Texture",name:"flyline",path:ED},{type:"Texture",name:"pathLine",path:ED},{type:"Texture",name:"pathLine2",path:lre},{type:"Texture",name:"pathLine3",path:sre},{type:"File",name:"china",path:e+"assets/json/红原县-轮廓.json"},{type:"File",name:"mapJson",path:e+"assets/json/红原县.json"},{type:"File",name:"mapStroke",path:e+"assets/json/红原县-轮廓.json"},{type:"Texture",name:"huiguang",path:gre},{type:"Texture",name:"rotationBorder1",path:hre},{type:"Texture",name:"rotationBorder2",path:fre},{type:"Texture",name:"guangquan1",path:pre},{type:"Texture",name:"guangquan2",path:vre},{type:"Texture",name:"chinaBlurLine",path:dre},{type:"Texture",name:"ocean",path:cre},{type:"Texture",name:"side",path:ure},{type:"Texture",name:"arrow",path:mre},{type:"Texture",name:"point",path:yre},{type:"Texture",name:"focusArrows",path:_re},{type:"Texture",name:"focusBar",path:xre},{type:"Texture",name:"focusBg",path:Sre},{type:"Texture",name:"focusMidQuan",path:Are},{type:"Texture",name:"focusMoveBg",path:wre}];this.ready=this.instance.loadAll(t)}}const oo={herdsmanCount:129,grasslandArea:7568515,wetArea:2429693,yakCount:10965,projectCount:17,baseCount:12},xg=[{zoneName:"色地乡",grasslandArea:1463044,yakCount:11704},{zoneName:"麦洼乡",grasslandArea:660352,yakCount:5283},{zoneName:"壤口乡",grasslandArea:763672,yakCount:6109},{zoneName:"阿木乡",grasslandArea:1115947,yakCount:8928},{zoneName:"瓦切镇",grasslandArea:1111492,yakCount:8892},{zoneName:"查尔玛乡",grasslandArea:858500,yakCount:6868},{zoneName:"江茸乡",grasslandArea:644761,yakCount:5158},{zoneName:"龙日镇",grasslandArea:874234,yakCount:6994},{zoneName:"安曲镇",grasslandArea:1165634,yakCount:9325},{zoneName:"刷经寺镇",grasslandArea:62465,yakCount:500},{zoneName:"邛溪镇",grasslandArea:1166721,yakCount:9334}],mU=[{zoneName:"色地乡",grasslandArea:350788,wetArea:166983},{zoneName:"麦洼乡",grasslandArea:162198,wetArea:71501},{zoneName:"壤口乡",grasslandArea:241024,wetArea:29239},{zoneName:"阿木乡",grasslandArea:305522,wetArea:89411},{zoneName:"瓦切镇",grasslandArea:264640,wetArea:128717},{zoneName:"查尔玛乡",grasslandArea:286159,wetArea:17664},{zoneName:"江茸乡",grasslandArea:175840,wetArea:52341},{zoneName:"龙日镇",grasslandArea:222346,wetArea:87046},{zoneName:"安曲镇",grasslandArea:304970,wetArea:107548},{zoneName:"刷经寺镇",grasslandArea:22107,wetArea:7002},{zoneName:"邛溪镇",grasslandArea:318316,wetArea:94587}],bre=[{month:"1月",count:485,speed:380},{month:"2月",count:502,speed:313},{month:"3月",count:471,speed:142},{month:"4月",count:893,speed:574},{month:"5月",count:874,speed:231},{month:"6月",count:879,speed:555},{month:"7月",count:145,speed:654},{month:"8月",count:521,speed:123},{month:"9月",count:741,speed:456},{month:"10月",count:744,speed:458},{month:"11月",count:777,speed:444},{month:"12月",count:563,speed:254}],yU=[{name:"色地乡",count:131983,devices:25},{name:"瓦切乡",count:126611,devices:24},{name:"安曲乡",count:99331,devices:20},{name:"邛溪镇",count:81727,devices:18},{name:"麦洼乡",count:78489,devices:16},{name:"龙日乡",count:66846,devices:15},{name:"阿木乡",count:64176,devices:14},{name:"查尔玛乡",count:47958,devices:11},{name:"江茸乡",count:34576,devices:9},{name:"刷经寺镇",count:30407,devices:8},{name:"壤口乡",count:19744,devices:6}],W0=yU.reduce((r,e)=>r+e.count,0),_U=1824,xU=-3672,Al=W0+_U+xU;function Tre(r,e){const t=r.map(i=>Xe(Re({},i),{count:Math.round(e*i.ratio/100)})),n=e-t.reduce((i,a)=>i+a.count,0);return n&&t[1]&&(t[1].count+=n),t}Tre([{name:"成年母牛",ratio:47},{name:"其他成年牛",ratio:22},{name:"幼畜",ratio:16},{name:"育成牛",ratio:11},{name:"公牛",ratio:4}],Al);const IC=[{label:"屠宰出栏",value:1706,yoy:6},{label:"活畜交易",value:1043,yoy:-3},{label:"外运销售",value:624,yoy:12},{label:"其他出栏",value:299,yoy:-9}],SU=[{name:"饲草储备库",value:7,capacity:10500,unit:"座"},{name:"加工企业",value:7,capacity:13e3,unit:"家"},{name:"工程数量",value:oo.projectCount,capacity:17,unit:"个"},{name:"基地数量",value:oo.baseCount,capacity:12,unit:"个"}],Mre=[{name:"越界预警",value:4},{name:"草畜平衡",value:3},{name:"防疫提醒",value:2},{name:"设备离线",value:1}],Ii=(r,e=2)=>{const t=cu(10,e);return Math.round((Number(r)||0)*t)/t},AU=(r,e)=>r.reduce((t,n)=>t+(Number(n[e])||0),0),LD=r=>Ii((Number(r)||0)/1e4,2),wU=AU(IC,"value"),u1=AU(xg,"yakCount"),Sg=Ii(oo.grasslandArea/1e4,2),NC=Ii(oo.wetArea/1e4,2),kC=177.92,bU=Ii(Sg+NC+kC,2),Cre=Ii(u1/Math.max(Sg,1),1),PD=Ii(NC/Math.max(bU,1)*100,1),RD=637.13,Ky=108.84,Ere=297.29,Vb=159.33,Lre=[{key:"forest-grass-wet-area",zh:"林草湿总量",name:"林草湿总量",value:bU,unit:"万亩",decimals:2},{key:"yak-count",zh:"牦牛存栏",name:"牦牛存栏",value:u1,unit:"头",decimals:0},{key:"trade-flow",zh:"交易流通",name:"交易流通",value:wU,unit:"头",decimals:0},{key:"support-capacity",zh:"产业载体",name:"产业载体",value:oo.baseCount+oo.projectCount,unit:"个",decimals:0}],_S=[{key:"grassland",name:"草地",value:Sg,unit:"万亩",color:"#7ee269"},{key:"wetland",name:"湿地",value:NC,unit:"万亩",color:"#32dcff"},{key:"woodland",name:"林地",value:kC,unit:"万亩",color:"#24f6c4"}],xS=[{key:"basic-grassland",name:"基本草原",value:RD,unit:"万亩",percent:Ii(RD/Math.max(Sg,1)*100,1),note:"草地保护底盘"},{key:"wetland-yield",name:"湿地生产力",value:Ky,unit:"万吨",percent:Ii(Ky/Math.max(Ere+Ky,1)*100,1),note:"鲜草产能"},{key:"public-woodland",name:"公益林面积",value:Vb,unit:"万亩",percent:Ii(Vb/Math.max(kC,1)*100,1),note:"林地保护占比"},{key:"wetland-rate",name:"湿地占比",value:PD,unit:"%",percent:PD,note:"林草湿结构"}],DD=mU.map(r=>{const e=xg.find(i=>i.zoneName===r.zoneName)||{},t=LD(r.grasslandArea),n=LD(r.wetArea);return{key:r.zoneName,name:r.zoneName,grasslandArea:t,wetlandArea:n,yakCount:e.yakCount||0,resourceTotal:Ii(t+n,2),density:Ii((e.yakCount||0)/Math.max(t+n,1),1)}}).sort((r,e)=>e.yakCount-r.yakCount),Pre=xg.map(r=>({key:r.zoneName,name:r.zoneName,value:r.yakCount,unit:"头",percent:Ii(r.yakCount/Math.max(u1,1)*100,1)})).sort((r,e)=>e.value-r.value),Gb=IC.map(r=>({key:r.label,name:r.label,value:r.value,unit:"头",yoy:r.yoy,percent:Ii(r.value/Math.max(wU,1)*100,1)})),Rre=Math.max(...SU.map(r=>Number(r.value)||0),1),Dre=SU.map(r=>{const e=r.name.includes("储备")||r.name.includes("加工")?`${Number(r.capacity||0).toLocaleString("zh-CN")}吨`:"已接入";return{key:r.name,name:r.name,value:r.value,unit:r.unit,capacity:r.capacity,capacityNote:e,percent:Ii((Number(r.value)||0)/Rre*100,1)}});var KB,ZB;const Ire=[{key:"flow-grassland",module:"林草湿",name:"草地面积分布完成乡镇归集",value:Sg,unit:"万亩",trend:"+0.8%"},{key:"flow-wetland",module:"林草湿",name:"湿地生产力指标进入总览",value:Ky,unit:"万吨",trend:"+1.2%"},{key:"flow-woodland",module:"林草湿",name:"公益林保护面积同步",value:Vb,unit:"万亩",trend:"89.6%"},{key:"flow-yak-town",module:"牦牛",name:"乡镇牦牛存栏排行刷新",value:u1,unit:"头",trend:"+2.4%"},{key:"flow-yak-density",module:"草畜",name:"草畜密度联动核算",value:Cre,unit:"头/万亩",trend:"联动"},{key:"flow-trade-1",module:"交易",name:"屠宰出栏流通记录入库",value:((KB=Gb[0])==null?void 0:KB.value)||0,unit:"头",trend:"+6%"},{key:"flow-trade-2",module:"交易",name:"活畜交易影响扣减存栏",value:((ZB=Gb[1])==null?void 0:ZB.value)||0,unit:"头",trend:"-3%"},{key:"flow-industry",module:"产业",name:"饲草储备与加工主体纳入画像",value:oo.baseCount+oo.projectCount,unit:"个",trend:"在线"}];const Nre={class:"home-dashboard"},kre={class:"home-left home-side-stack"},Ore={class:"home-right home-side-stack"},Fre={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(r,{emit:e}){const t=e,n=tt(null),i=mg("grassland","grassland-distribution");let a=null,o=!1;const s=_S.find(b=>b.key==="grassland")||{},l=xS.find(b=>b.key==="basic-grassland")||{},u=xS.find(b=>b.key==="wetland-yield")||{},c=xS.find(b=>b.key==="public-woodland")||{},h=Se(()=>_S.reduce((b,T)=>b+Number(T.value||0),0)),f=Se(()=>_S.map(b=>Xe(Re({},b),{percent:w(b)}))),d=Se(()=>Pre.slice(0,6).map(b=>Xe(Re({},b),{extra:`${b.percent}%`}))),p=Se(()=>DD.slice(0,6).map(b=>({key:b.key,name:b.name,value:b.density,unit:"头/万亩",extra:`${C(b.yakCount)}头`}))),g=Se(()=>[{key:"grassland-total",name:"草地资源",value:s.value,unit:s.unit,extra:`${w(s)}%`},{key:"basic-grassland",name:"基本草原",value:l.value,unit:l.unit,extra:`${l.percent||"--"}%`},{key:"public-woodland",name:"公益林面积",value:c.value,unit:c.unit,extra:`${c.percent||"--"}%`},{key:"wetland-yield",name:"湿地生产力",value:u.value,unit:u.unit,extra:`${u.percent||"--"}%`}]),v=Se(()=>Gb.map(b=>Xe(Re({},b),{extra:`${b.yoy>0?"+":""}${b.yoy}%`}))),m=Se(()=>Dre.map(b=>Xe(Re({},b),{extra:b.capacityNote,scaleValue:b.percent}))),y=Se(()=>DD.slice(0,5).map(b=>({key:b.key,name:b.name,value:b.resourceTotal,unit:"万亩",extra:`${b.density}头/万亩`}))),_=Se(()=>Ire.slice(0,6).map(b=>({key:b.key,name:M(b),value:b.value,unit:b.unit,extra:b.trend}))),x=Se(()=>[{key:"resource-structure",title:"林草湿资源结构",type:"donut",variant:"ring",rows:f.value},{key:"yak-town-rank",title:"乡镇牦牛存栏",type:"bar",variant:"distribution",rows:d.value},{key:"capacity-density",title:"草畜承载密度",type:"line",rows:p.value},{key:"resource-business",title:"资源业务画像",type:"structure",rows:g.value}]),S=Se(()=>[{key:"trade-structure",title:"牦牛交易结构",type:"donut",rows:v.value},{key:"support-industry",title:"产业支撑能力",type:"column",variant:"slim",rows:m.value},{key:"town-resource",title:"乡镇资源协同",type:"bar",variant:"distribution",rows:y.value},{key:"data-flow",title:"业务数据动态",type:"heat",rows:_.value}]);Ko(()=>{t("module-stats",{moduleKey:"home",items:Lre}),A()}),uo(()=>{var b,T;o=!0,(T=(b=n.value)==null?void 0:b.destroyMap)==null||T.call(b)});function A(){var T,P,D;a=new _g,t("loading-progress",{progress:0}),(P=(T=a.instance)==null?void 0:T.on)==null||P.call(T,"onProgress",(L,E,I)=>{t("loading-progress",{progress:Math.floor(E/(I||1)*100),path:L,itemsLoaded:E,itemsTotal:I})});const b=(L=0)=>Ge(this,null,function*(){var I,N;if(o)return;yield no();const E=n.value;if((I=E==null?void 0:E.loadMap)==null||I.call(E,a),E!=null&&E.canvasMap){t("loading-progress",{progress:100}),t("map-ready"),(N=E.play)==null||N.call(E);return}if(L<24){window.setTimeout(()=>b(L+1),120);return}t("map-ready")});(D=a.ready)==null||D.then(b).catch(()=>{t("map-ready")})}function w(b={}){const T=h.value||1;return Number((Number(b.value||0)/T*100).toFixed(1))}function M(b={}){const T=String(b.name||"");return T.includes("草地面积")?"草地归集":T.includes("湿地生产力")?"湿地生产力":T.includes("公益林")?"公益林同步":T.includes("牦牛存栏")?"牦牛存栏":T.includes("草畜密度")?"草畜核算":T.includes("屠宰")?"屠宰入库":T.includes("活畜")?"活畜交易":T.includes("饲草")?"产业画像":b.module||"业务动态"}function C(b){const T=Number(b);return Number.isFinite(T)?T.toLocaleString("zh-CN",{maximumFractionDigits:Number.isInteger(T)?0:2}):"--"}return(b,T)=>(ie(),oe("div",Nre,[$e(yg,{ref_key:"mapSceneRef",ref:n,class:"home-map-scene","active-layer":_n(i)},null,8,["active-layer"]),T[0]||(T[0]=G("div",{class:"home-map-scrim"},null,-1)),G("div",kre,[(ie(!0),oe(it,null,vt(x.value,P=>(ie(),Ji(tn,{key:P.key,class:"home-card left-card",title:P.title,width:398,height:186},{default:Xt(()=>[$e(Si,{panel:P,compact:""},null,8,["panel"])]),_:2},1032,["title"]))),128))]),G("div",Ore,[(ie(!0),oe(it,null,vt(S.value,P=>(ie(),Ji(tn,{key:P.key,class:"home-card right-card",title:P.title,width:398,height:186},{default:Xt(()=>[$e(Si,{panel:P,compact:""},null,8,["panel"])]),_:2},1032,["title"]))),128))])]))}},Bre="/openApi",c1={513233100:"邛溪镇",513233101:"刷经寺镇",513233103:"安曲镇",513233105:"龙日镇",513233202:"江茸乡",513233203:"查尔玛乡",513233204:"瓦切镇",513233205:"阿木乡",513233207:"麦洼乡",513233208:"色地镇"},zre=Object.values(c1).map(Kf);function TU(r){return/^https?:\/\//.test(r)?r:`${Bre}${r.startsWith("/")?r:`/${r}`}`}function gl(r,e){return Bs(TU(r),{method:"POST",body:e?JSON.stringify(e):void 0,headers:{"Content-Type":"application/json"}})}function sn(r,e){return Bs(TU(r),{params:e})}function lt(r,e){for(const t of e)if((r==null?void 0:r[t])!==void 0&&(r==null?void 0:r[t])!==null&&(r==null?void 0:r[t])!=="")return r[t]}function Oi(r){if(r==null||r==="")return;const e=Number(r);return Number.isNaN(e)?void 0:e}function St(r){const e=Oi(r);if(e!==void 0)return Number.isInteger(e)?e:Number(e.toFixed(2))}function Ni(r,e){const t=Oi(r),n=Oi(e);if(!(t===void 0||n===void 0||n===0))return t/n*100}function Im(r,e,t="占比"){var i;const n=St((i=lt(r,["areaPercent","area_percent","percent"]))!=null?i:Ni(lt(r,["areaWanMu","value"]),e));return n===void 0?"":`${t} ${n}%`}function go(r,e=""){const t=St(lt(r,["areaPercent","area_percent","percent"]));return t===void 0?"":`${e}${t}%`}function Ure(r,e=0){const t=lt(r,["name","title","label","zh","itemName","item_name"])||`指标${e+1}`,n=St(lt(r,["value","num","count","area","acreage","total"])),i=lt(r,["unit","unitName","unit_name"])||"";return{key:lt(r,["id","key","code"])||`${t}-${e}`,name:t,value:n,unit:i,source:r}}function Vre(r){return(Array.isArray(r)?r:(r==null?void 0:r.rows)||(r==null?void 0:r.list)||[]).map(Ure).filter(t=>t.name)}function Gre(r){const e=(r==null?void 0:r.core)||(r==null?void 0:r.summary)||r||{},t=((r==null?void 0:r.typeDistribution)||(r==null?void 0:r.typeStats)||[])[0]||{},n=((r==null?void 0:r.ecologicalPosition)||[])[0]||{};return[{key:"woodland-area",name:"林地总面积",value:St(lt(e,["totalAreaWanMu","total_area_wan_mu","areaWanMu","area_wan_mu"])),unit:"万亩"},{key:"woodland-main-type-rate",name:`${lt(t,["name"])||"主导类型"}占比`,value:St(lt(t,["areaPercent","area_percent","percent"])),unit:"%"},{key:"woodland-ecology-area",name:"生态重点区面积",value:St(lt(n,["areaWanMu","value"])),unit:"万亩"}]}function Hre(r){const e=(r==null?void 0:r.overview)||(r==null?void 0:r.summary)||r||{};return[{key:"grassland-total-area",name:"草地总面积",value:St(lt(e,["totalAreaWanMu","total_area_wan_mu","totalArea","total_area","areaWanMu"])),unit:lt(e,["areaUnit","area_unit"])||"万亩"},{key:"basic-grassland-area",name:"基本草原",value:St(lt(e,["basicAreaWanMu","basic_area_wan_mu","basicArea","basic_area"])),unit:lt(e,["areaUnit","area_unit"])||"万亩"},{key:"general-grassland-area",name:"一般草原",value:St(lt(e,["generalAreaWanMu","general_area_wan_mu","generalArea","general_area"])),unit:lt(e,["areaUnit","area_unit"])||"万亩"}]}function rc(r,e){const i=({woodland:[{key:"woodland-area",name:"林地总面积",unit:"万亩"},{key:"woodland-public-area",name:"公益林面积",unit:"万亩"},{key:"woodland-public-rate",name:"公益林占比",unit:"%"}],grassland:[{key:"grassland-area",name:"草地总面积",unit:"万亩"},{key:"basic-grassland",name:"基本草原",unit:"万亩"},{key:"general-grassland",name:"一般草原",unit:"万亩"}],wetland:[{key:"wetland-area",name:"湿地面积",unit:"万亩"},{key:"wetland-yield",name:"湿地生产力",unit:"万吨"},{key:"wetland-level-1-area",name:"1级湿地面积",unit:"万亩"}]}[e]||[]).map((a,o)=>{var s,l;return Xe(Re(Re({},a),r[o]||{}),{name:((s=r[o])==null?void 0:s.name)||a.name,unit:((l=r[o])==null?void 0:l.unit)||a.unit})});return i.length?i:r}function Wre(r){return Ge(this,null,function*(){let e;for(const t of r)try{return yield t()}catch(n){e=n}throw e||new Error("No request configured")})}function Sn(r=[],e={}){const{nameKeys:t=["name","townName","typeName"],valueKeys:n=["areaWanMu","value","totalAreaWanMu","basicAreaWanMu"],unit:i="万亩",max:a=Number.POSITIVE_INFINITY,extra:o}=e,s=r.map((l,u)=>{const c=St(lt(l,n)),h={key:lt(l,["key","code","townCode"])||`${lt(l,t)||u}-${u}`,name:lt(l,t)||`第${u+1}项`,value:c,unit:i,percent:St(lt(l,["percent","areaPercent","basicRatio","generalRatio"])),source:l};return o?Xe(Re({},h),{extra:o(l)}):h}).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0));return Number.isFinite(a)?s.slice(0,a):s}function Nm(r=[],e={}){const{nameKeys:t=["name"],valueKeys:n=["value"],unit:i,max:a=Number.POSITIVE_INFINITY,extra:o}=e;return Sn(r,{nameKeys:t,valueKeys:n,unit:i,max:a,extra:o})}function $re(r=[],e={}){const{nameKeys:t=["grassMinType","name"],valueKeys:n=["acreage"],unit:i="万亩",max:a=Number.POSITIVE_INFINITY}=e,o=r.map((s,l)=>{const u=lt(s,n),c=St(i==="万亩"?Oi(u)/1e4:u),h=lt(s,t)||`第${l+1}项`;return{key:lt(s,["key","code"])||`${h}-${l}`,name:h,value:c,unit:i,source:s}}).filter(s=>Number(s.value)>0).sort((s,l)=>(Number(l.value)||0)-(Number(s.value)||0));return Number.isFinite(a)?o.slice(0,a):o}function Gt(r,e,t,n="rank",i={}){return Re({key:r,title:e,type:n,rows:t||[]},i)}function $0(r=[],e=[],t={}){const{unit:n="万吨",max:i=Number.POSITIVE_INFINITY,showMuYieldExtra:a=!0}=t,o=new Map(e.map(s=>[s.areaName,s]));return Sn(r,{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:n,max:i,extra:s=>{const l=o.get(s.areaName),u=St(lt(l,["yield","value"])),c=lt(l,["unit"])||"斤";return a&&u!==void 0?`亩产 ${u} ${c}`:""}})}function Kf(r){return String(r||"").replace(/\s+/g,"").trim()}function kv(r=[]){const e=new Map(zre.map((t,n)=>[t,n]));return[...r].sort((t,n)=>{const i=e.get(Kf(t==null?void 0:t.name)),a=e.get(Kf(n==null?void 0:n.name));return i!==void 0&&a!==void 0?i-a:i!==void 0?-1:a!==void 0?1:0})}function MU(r){const e=String(r||"");return{用于畜牧业生产的人工草地:"人工草地","对调节气候、涵养水源、保持水土、防风固沙具有特殊作用的草原":"生态调节草原",国家重点保护野生动植物生存环境的草原:"野生动植物栖息草原","草原科研、教学实验基地":"科研教学草原"}[e]||e}function X0(r){return MU(r).replace(/\s+/g,"").replace(/类$/,"")}function Y0(r){const e=String(r||""),t=e.match(/level-([1-8])/);if(t)return t[1];const n=e.match(/([1-8])\s*级/);if(n)return n[1];if(/^[1-8]$/.test(e.trim()))return e.trim();const a=Object.entries({一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8"}).find(([o])=>e.includes(`${o}级`));return(a==null?void 0:a[1])||""}function CU(r){return Y0(r==null?void 0:r.key)||Y0(r==null?void 0:r.name)}function h1(r=[],e={}){const{nameKeys:t=["name","townName","areaName"],valueKeys:n=["areaWanMu","value","totalAreaWanMu","yield"],unit:i="万亩"}=e;return r.map((a,o)=>{const s=Kf(lt(a,t)),l=St(lt(a,n));return!s||l===void 0?null:{key:lt(a,["key","code","townCode"])||`${s}-${o}`,name:s,value:l,unit:lt(a,["unit"])||i,source:a}}).filter(Boolean).sort((a,o)=>(Number(o.value)||0)-(Number(a.value)||0))}function Hb(r=[],e={}){const{nameKeys:t=["townName","name","areaName"],valueKeys:n=["areaWanMu","value","totalAreaWanMu","yield"],unit:i="万亩"}=e,a=new Map;return r.forEach(o=>{const s=Kf(lt(o,t)),l=Oi(lt(o,n));if(!s||l===void 0)return;const u=a.get(s)||{key:lt(o,["townCode","code"])||s,name:s,value:0,unit:lt(o,["unit"])||i,source:[]};u.value+=l,u.source.push(o),a.set(s,u)}),Array.from(a.values()).map(o=>Xe(Re({},o),{value:St(o.value)})).sort((o,s)=>(Number(s.value)||0)-(Number(o.value)||0))}function Vo({topicKey:r,layerKey:e,title:t,unit:n="万亩",rows:i=[],note:a="",metricLabel:o=""}){const s=i.filter(l=>(l==null?void 0:l.name)&&l.value!==void 0).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0)).map((l,u)=>Xe(Re({},l),{unit:l.unit||n,rank:u+1}));return{status:s.length?"success":"empty",topicKey:r,layerKey:e,title:t,unit:n,metricLabel:o,note:a,rows:s}}function km(o){return Ge(this,arguments,function*({topicKey:r,layerKey:e,layerName:t,title:n,cqlFilter:i="",unit:a="万亩"}){const s=yield l1(t,{propertyName:["xiang","acreage"],cqlFilter:i,maxFeatures:2e5}),l=new Map;return((s==null?void 0:s.features)||[]).forEach(u=>{const c=u.properties||{},h=String(c.xiang||""),f=c1[h],d=Oi(c.acreage);if(!f||d===void 0)return;const p=l.get(f)||{key:h,name:f,value:0,unit:a};p.value+=d/1e4,l.set(f,p)}),Vo({topicKey:r,layerKey:e,title:n,unit:a,rows:Array.from(l.values()).map(u=>Xe(Re({},u),{value:St(u.value)})),note:"按 GeoServer 图斑属性汇总到乡镇"})})}function Xre(r,e,t="林地面积排行"){return Ge(this,null,function*(){const n=Lt(yield gl("/woodland/distribution"));return Vo({topicKey:r,layerKey:e,title:t,unit:"万亩",rows:h1((n==null?void 0:n.areaDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],unit:"万亩"})})})}function ID(r,e,t,n){return Ge(this,null,function*(){const i=Lt(yield sn("/basic_grassland/overview"));return Vo({topicKey:r,layerKey:e,title:n,unit:"万亩",rows:h1((i==null?void 0:i.townStats)||[],{nameKeys:["name"],valueKeys:[t],unit:"万亩"})})})}function Yre(r={},e=[],t=[]){const n=lt(r,t);if(n)return Kf(n);const i=e.map(o=>lt(r,[o])).find(o=>o!==void 0),a=String(i||"").slice(0,9);return c1[a]||""}function qre(r,e,t,n){return Ge(this,null,function*(){const i=(n==null?void 0:n.rankingTownCodeKeys)||(t==null?void 0:t.rankingTownCodeKeys)||["area_code","xiang","town_code"],a=(n==null?void 0:n.rankingTownNameKeys)||(t==null?void 0:t.rankingTownNameKeys)||["town_name","area_name","xiang_name"],o=(n==null?void 0:n.rankingAreaKeys)||(t==null?void 0:t.rankingAreaKeys)||["acreage","area_mu","area"],s=(n==null?void 0:n.rankingPropertyName)||[...i,...a,...o],l=yield l1(t.layerName,{propertyName:s,cqlFilter:n.cqlFilter,maxFeatures:2e5,timeout:25e3}),u=new Map;return((l==null?void 0:l.features)||[]).forEach(c=>{const h=c.properties||{},f=Yre(h,i,a),d=Oi(lt(h,o));if(!f||d===void 0)return;const p=u.get(f)||{key:f,name:f,value:0,unit:"万亩"};p.value+=d/1e4,u.set(f,p)}),Vo({topicKey:r,layerKey:e,title:`${n.name}面积排行`,unit:"万亩",metricLabel:n.name,rows:Array.from(u.values()).map(c=>Xe(Re({},c),{value:St(c.value),metricLabel:n.name})),note:"按选中图例过滤 GeoServer 图斑并汇总到乡镇"})})}function jre(r,e,t){return Ge(this,null,function*(){const n=Lt(yield sn("/basic_grassland/overview"));return Vo({topicKey:r,layerKey:e,title:`${t.name}面积排行`,unit:"万亩",metricLabel:t.name,rows:h1((n==null?void 0:n.townStats)||[],{nameKeys:["name"],valueKeys:[t.rankingValueKey],unit:"万亩"}).map(i=>Xe(Re({},i),{metricLabel:t.name}))})})}function f1(r,e,t,n,i={}){const a=ef(n||[],i).map(o=>Xe(Re({},o),{metricLabel:t.name}));return Vo({topicKey:r,layerKey:e,title:`${t.name}面积排行`,unit:"万亩",metricLabel:t.name,rows:a})}function Kre(r,e,t){return Ge(this,null,function*(){const n=CU(t);if(!n)return null;const i=Lt(yield sn("/grassland_grassland_level/distribution"));return f1(r,e,t,i,{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:a=>Y0(lt(a,["level","name"]))===n})})}function Zre(r,e,t){return Ge(this,null,function*(){const n=X0(t.name);if(!n)return null;const[i,a]=yield Promise.all([yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_grass_type/distribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_grass_type/minTypeAreaDistribution"))}))]);return f1(r,e,t,[...i||[],...a||[]],{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:o=>{const s=lt(o,["grassMinType","grass_min_type","grassType","grass_type","name"]);return X0(s)===n}})})}function Qre(r,e,t){return Ge(this,null,function*(){const n=CU(t);if(!n)return null;const i=Lt(yield sn("/wetland_grassland_level/distribution"));return f1(r,e,t,i,{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:a=>Y0(lt(a,["level","name"]))===n})})}function Jre(r,e,t){return Ge(this,null,function*(){const n=X0(t.name);if(!n)return null;const[i,a]=yield Promise.all([yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grass_type_copy/distribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grass_type_copy/minTypeAreaDistribution"))}))]);return f1(r,e,t,[...i||[],...a||[]],{nameKeys:["areaName","area_name","name"],valueKeys:["acreage","areaWanMu","value"],filter:o=>{const s=lt(o,["grassMinType","grass_min_type","grassType","grass_type","name"]);return X0(s)===n}})})}function eie(r,e,t){return Ge(this,null,function*(){if(!(t!=null&&t.key))return null;const n=mg(r,e);return n?r==="grassland"&&e==="basic-grassland"&&t.rankingValueKey?jre(r,e,t):r==="grassland"&&e==="grassland-level"?Kre(r,e,t):r==="grassland"&&e==="grassland-type"?Zre(r,e,t):r==="wetland"&&e==="wetland-level"?Qre(r,e,t):r==="wetland"&&e==="wetland-type"?Jre(r,e,t):t.cqlFilter&&n.layerName?qre(r,e,n,t):null:null})}function Om(r,e,t,n,i="万吨"){return Ge(this,null,function*(){const a=Lt(yield sn(t)),o=lt(a==null?void 0:a[0],["unit"])||i;return Vo({topicKey:r,layerKey:e,title:n,unit:o,rows:h1(a||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:o})})})}function Kr(r=[],e=5){return r.slice(0,e)}function Qp(r=[],e={}){var c,h;const{limit:t=5,minPercent:n=1,otherName:i="其他类型"}=e,a=r.filter(f=>(f==null?void 0:f.name)&&Number(f.value)>0).sort((f,d)=>(Number(d.value)||0)-(Number(f.value)||0)),o=a.reduce((f,d)=>f+(Number(d.value)||0),0);if(!o||a.length<=t)return a;const s=[],l=[];if(a.forEach((f,d)=>{const p=Ni(f.value,o);d<t-1&&(p===void 0||p>=n)?s.push(f):l.push(f)}),!l.length)return s;const u=l.reduce((f,d)=>f+(Number(d.value)||0),0);return[...s,{key:`${i}-${l.length}`,name:i,value:St(u),unit:((c=l[0])==null?void 0:c.unit)||((h=a[0])==null?void 0:h.unit)||"万亩",extra:`${St(Ni(u,o))}%`}]}function Bc(r=[]){return r.reduce((e,t)=>e+(Number(t.value)||0),0)}function Sa(r=[],e=Bc(r),t=""){return r.map(n=>{const i=St(Ni(n.value,e));return Xe(Re({},n),{extra:i===void 0?n.extra:`${t}${i}%`})})}function ND(r){return Array.isArray(r==null?void 0:r.rows)&&r.rows.length>0}function va(r=[],e=[],t=4){const n=[],i=new Set,a=s=>{!s||i.has(s.key)||(i.add(s.key),n.push(s))},o=[...r,...e];return o.filter(ND).forEach(a),o.filter(s=>s&&!ND(s)).forEach(a),n.slice(0,t)}function kD(r=[],e={}){const{headCount:t=4,headName:n="重点区域",tailName:i="其他区域"}=e,a=r.filter(u=>(u==null?void 0:u.name)&&Number(u.value)>0);if(!a.length)return[];const o=a.slice(0,t),s=a.slice(t),l=(u,c)=>{var h,f;return{key:u,name:u,value:St(c.reduce((d,p)=>d+(Number(p.value)||0),0)),unit:((h=c[0])==null?void 0:h.unit)||((f=a[0])==null?void 0:f.unit)||"万亩",extra:`${c.length}项`}};return[l(n,o),s.length?l(i,s):null].filter(u=>u&&Number(u.value)>0)}function bf(r,e,t){var s,l,u,c;if(!t)return r;const n={grassland:"grassland-distribution",wetland:"wetland-distribution",woodland:"woodland-distribution"}[e],i=((s=r==null?void 0:r.layerPanels)==null?void 0:s[t])||((l=r==null?void 0:r.layerPanels)==null?void 0:l[n]);if(!i)return r;const a=(u=i.leftPanels)!=null&&u.length?i.leftPanels:r.leftPanels,o=(c=i.rightPanels)!=null&&c.length?i.rightPanels:r.rightPanels;return Xe(Re({},r),{activeLayerKey:t||n,leftPanels:a,rightPanels:o,left:(a==null?void 0:a[0])||r.left,right:(o==null?void 0:o[0])||r.right})}function EU(r,e=["areaWanMu","value","acreage","areaMu"]){for(const t of e){const n=lt(r,[t]),i=Oi(n);if(i===void 0)continue;const a=String(t).toLowerCase(),o=String(lt(r,["unit","areaUnit","area_unit"])||"");return a.includes("wanmu")||o==="万亩"?i:a.includes("mu")||o==="亩"?i/1e4:i}}function ef(r=[],e={}){const{nameKeys:t=["name","areaName","townName"],valueKeys:n=["areaWanMu","value","acreage","areaMu"],nameTransform:i=l=>l,filter:a,extra:o}=e,s=new Map;return r.forEach(l=>{if(a&&!a(l))return;const u=lt(l,t),c=i(u,l),h=EU(l,n);if(!c||h===void 0)return;const f=s.get(c)||{key:lt(l,["key","code","townCode"])||c,name:c,value:0,unit:"万亩",source:[]};f.value+=h,f.source.push(l),s.set(c,f)}),Array.from(s.values()).map(l=>{const u=Xe(Re({},l),{value:St(l.value)});return o?Xe(Re({},u),{extra:o(u)}):u}).filter(l=>Number(l.value)>0).sort((l,u)=>(Number(u.value)||0)-(Number(l.value)||0))}function OD(r){return String(r||"").replace(/草原/g,"湿地")}function tie(r={},e=[]){var s;const t=(r==null?void 0:r.unit)||lt(e==null?void 0:e[0],["unit"])||"万吨",n=(s=Oi(r==null?void 0:r.xc))!=null?s:Bc(e),i=Oi(r==null?void 0:r.edibleXc),a=n!==void 0&&i!==void 0?Math.max(n-i,0):void 0,o=e[0];return[{key:"wetland-yield-total",name:"鲜草总产",value:St(n),unit:t,scaleValue:100},{key:"wetland-yield-edible",name:"可食鲜草",value:St(i),unit:t,scaleValue:St(Ni(i,n))},{key:"wetland-yield-unavailable",name:"不可食鲜草",value:St(a),unit:t,scaleValue:St(Ni(a,n))},{key:"wetland-yield-top-town",name:o!=null&&o.name?`${o.name}产量`:"最高乡镇产量",value:o==null?void 0:o.value,unit:(o==null?void 0:o.unit)||t,scaleValue:St(Ni(o==null?void 0:o.value,n))}].filter(l=>l.value!==void 0)}function LU({yieldSummary:r,townAreaRows:e,typeRows:t,levelRows:n,yieldRows:i,minTypeRows:a,muYieldRows:o,edibleYieldRows:s,edibleMuRows:l,typeTownRows:u,levelTownRows:c,minTownRows:h}){const f=Gt("wetland-town-area","湿地面积分布",kv(e),"line",{span:1,variant:"distribution"}),d=Gt("wetland-type","湿地类型结构",t,"donut",{span:1}),p=Gt("wetland-level-proportion","湿地级占比",Sa(n),"donut",{span:1}),g=Gt("wetland-min-type","湿地优势小类",Kr(a,6),"bar",{span:1}),v=Gt("wetland-yield-capacity","湿地产能结构",tie(r,i),"bar",{span:1,variant:"capacity"}),m=Gt("wetland-yield","湿地生产力分布",kv(i),"line",{span:1}),y=Gt("wetland-edible-yield","可食鲜草产量",Kr(s,6),"column",{span:1,variant:"slim"}),_=Gt("wetland-mu-yield","湿地亩产效率",Kr(o,6),"bar",{span:1}),x=Gt("wetland-level","湿地级别面积",n,"column",{span:1}),S=Gt("wetland-level-town","1级湿地分布",Kr(c,6),"bar",{span:1,variant:"distribution"}),A=Gt("wetland-type-town","湿地类型乡镇分布",Kr(u,6),"bar",{span:1,variant:"distribution"}),w=Gt("wetland-edible-mu","可食鲜草亩产",Kr(l,6),"bar",{span:1}),M=Gt("wetland-min-town","优势小类乡镇分布",Kr(h,6),"bar",{span:1,variant:"distribution"}),C=[f,d,p,g],b=[y,m,_,v];return{leftPanels:C,rightPanels:b,left:C[0],right:b[0],layerPanels:nie({townAreaPanel:f,typePanel:d,yieldCapacityPanel:v,yieldPanel:m,levelPanel:x,levelTownPanel:S,muYieldPanel:_,levelStructurePanel:p,typeTownPanel:A,minTypePanel:g,edibleYieldPanel:y,edibleMuPanel:w,minTownPanel:M})}}function nie(r={}){const{townAreaPanel:e,typePanel:t,yieldCapacityPanel:n,yieldPanel:i,levelPanel:a,levelTownPanel:o,muYieldPanel:s,levelStructurePanel:l,typeTownPanel:u,minTypePanel:c,edibleYieldPanel:h,edibleMuPanel:f,minTownPanel:d}=r;return{"wetland-distribution":{leftPanels:[e,t,l,c].filter(Boolean),rightPanels:[h,i,s,n].filter(Boolean)},"wetland-level":{leftPanels:[l,a,o,t].filter(Boolean),rightPanels:[h,i,s,n].filter(Boolean)},"wetland-type":{leftPanels:[t,u,c,d].filter(Boolean),rightPanels:[h,i,f,n].filter(Boolean)},"wetland-yield":{leftPanels:[e,t,l,c].filter(Boolean),rightPanels:[h,i,s,n].filter(Boolean)}}}function rie(r={}){const{leftPanels:e=[],rightPanels:t=[]}=r,n={leftPanels:e.filter(Boolean),rightPanels:t.filter(Boolean)};return{"grassland-distribution":n,"basic-grassland":n,"grassland-level":n,"grassland-type":n,"grassland-yield":n,"grassland-health":n}}function PU({townRows:r=[],typeRows:e=[],scaleRows:t=[],protectionRows:n=[],ownershipRows:i=[],qualityRows:a=[],originRows:o=[],ageRows:s=[],canopyRows:l=[],forestTypeRows:u=[],manageLevelRows:c=[],regionRows:h=[],ownerRows:f=[],typeTownRows:d=[],qualityLevelRows:p=[],townConcentrationRows:g=kD(r,{headCount:4,headName:"前四乡镇",tailName:"其他乡镇"}),typeConcentrationRows:v=kD(e,{headCount:2,headName:"主要类型",tailName:"其他类型"})}){const m=Gt("woodland-town","林地面积分布",kv(r),"line",{span:1,variant:"distribution"}),y=Gt("woodland-type","林地类型结构",e,"donut",{span:1}),_=Gt("woodland-protection","公益林保护等级",Sa(n),"structure",{span:1}),x=Gt("woodland-ownership","林地权属结构",Sa(i),"structure",{span:1}),S=Gt("woodland-quality","优势树种面积",Kr(a,6),"bar",{span:1}),A=Gt("woodland-origin","林地起源结构",Sa(o),"structure",{span:1}),w=Gt("woodland-age","林龄组结构",Kr(s,6),"column",{span:1}),M=Gt("woodland-canopy","郁闭度结构",Kr(l,6),"column",{span:1}),C=Gt("woodland-area-scale","林地图斑规模",t,"column",{span:1}),b=Gt("woodland-forest-type","森林类别结构",Kr(u,6),"bar",{span:1}),T=Gt("woodland-manage-level","管护等级分布",Kr(c,6),"bar",{span:1}),P=Gt("woodland-public-rank","公益林面积排行",Kr(h,6),"bar",{span:1,variant:"distribution"}),D=Gt("woodland-owner-rank","权属单位排行",Kr(f,6),"bar",{span:1}),L=Gt("woodland-type-town","乡镇类型构成",Kr(d,6),"bar",{span:1,variant:"distribution"}),E=Gt("woodland-quality-level","林地质量等级",Sa(p),"donut",{span:1}),I=Gt("woodland-town-concentration","林地集中度",Sa(g),"structure",{span:1}),N=Gt("woodland-type-concentration","类型集中度",Sa(v),"structure",{span:1}),R=va([m,y,_,x],[C,D,b,S]),F=va([S,A,w,M],[C,D,b,P,I,N]);return{leftPanels:R,rightPanels:F,left:R[0],right:F[0],layerPanels:iie({townPanel:m,typePanel:y,scalePanel:C,protectionPanel:_,ownershipPanel:x,qualityPanel:S,originPanel:A,agePanel:w,canopyPanel:M,forestTypePanel:b,manageLevelPanel:T,regionPanel:P,ownerPanel:D,typeTownPanel:L,qualityLevelPanel:E,townConcentrationPanel:I,typeConcentrationPanel:N})}}function iie(r={}){const{townPanel:e,typePanel:t,scalePanel:n,protectionPanel:i,ownershipPanel:a,qualityPanel:o,originPanel:s,agePanel:l,canopyPanel:u,forestTypePanel:c,manageLevelPanel:h,regionPanel:f,ownerPanel:d,typeTownPanel:p,qualityLevelPanel:g,townConcentrationPanel:v,typeConcentrationPanel:m}=r;return{"woodland-distribution":{leftPanels:va([e,t,i,a],[n,c,d]),rightPanels:va([o,s,l,u],[n,d,f,v,m,g])},"woodland-protection":{leftPanels:va([i,c,h,e],[t,a,n]),rightPanels:va([f,o,s,a],[d,t,n])},"woodland-type":{leftPanels:va([t,e,p,n],[i,a,c]),rightPanels:va([o,s,i,a],[l,u,d,m])},"woodland-quality":{leftPanels:va([o,s,l,u],[g,n,t]),rightPanels:va([e,t,i,a],[c,d,n])},"woodland-ownership":{leftPanels:va([a,d,e,t],[n,i,o]),rightPanels:va([i,o,s,n],[c,l,u])}}}function aie(r){const e=String(r||"").trim();return e.includes("未")&&e.includes("退")?"未退化":e.includes("轻")?"轻度退化":e.includes("中")?"中度退化":e.includes("重")?"重度退化":e||"未分级"}function oie(){return Ge(this,null,function*(){const r=yield l1("ne:t_grassland_result_caodi",{propertyName:["area_code","degradation_level","acreage"],maxFeatures:2e5,timeout:25e3}),e=new Map,t=new Map;((r==null?void 0:r.features)||[]).forEach(o=>{const s=o.properties||{},l=aie(s.degradation_level),u=Oi(s.acreage);if(!l||u===void 0)return;const c=u/1e4;if(e.set(l,(e.get(l)||0)+c),l==="未退化")return;const h=String(s.area_code||"").slice(0,9),f=c1[h];f&&t.set(f,(t.get(f)||0)+c)});const n=["未退化","轻度退化","中度退化","重度退化","未分级"],i=Array.from(e.entries()).map(([o,s])=>({key:o,name:o,value:St(s),unit:"万亩"})).filter(o=>Number(o.value)>0).sort((o,s)=>{const l=n.indexOf(o.name),u=n.indexOf(s.name);return l!==-1||u!==-1?(l===-1?99:l)-(u===-1?99:u):(Number(s.value)||0)-(Number(o.value)||0)}),a=Array.from(t.entries()).map(([o,s])=>({key:o,name:o,value:St(s),unit:"万亩"})).filter(o=>Number(o.value)>0).sort((o,s)=>(Number(s.value)||0)-(Number(o.value)||0));return{levelRows:Sa(i),townRows:a}})}function RU(r=[],e={},t=[],n=[]){var o;const i=lie(t).find(s=>s.key==="degraded-rate"),a=(o=Oi(e==null?void 0:e.xc))!=null?o:Bc(n);return[r[0],r[1],{key:"grassland-yield-total",name:"鲜草产量",value:St(a),unit:(e==null?void 0:e.unit)||"万吨"},i].filter(s=>(s==null?void 0:s.value)!==void 0)}function sie(r=[]){const e=Bc(r);return r.filter(t=>t.name&&t.name!=="未退化"&&Number(t.value)>0).map(t=>Xe(Re({},t),{extra:St(Ni(t.value,e))?`${St(Ni(t.value,e))}%`:""}))}function DU(r={},e=[]){var s;const t=(r==null?void 0:r.unit)||lt(e==null?void 0:e[0],["unit"])||"万吨",n=(s=Oi(r==null?void 0:r.xc))!=null?s:Bc(e),i=Oi(r==null?void 0:r.edibleXc),a=n!==void 0&&i!==void 0?Math.max(n-i,0):void 0,o=e.find(l=>Number(l.value)>0);return[{key:"forage-total",name:"鲜草总产",value:St(n),unit:t,scaleValue:100},{key:"forage-edible",name:"可食鲜草",value:St(i),unit:t,scaleValue:St(Ni(i,n))},{key:"forage-unavailable",name:"不可食鲜草",value:St(a),unit:t,scaleValue:St(Ni(a,n))},{key:"forage-top-town",name:o!=null&&o.name?`最高乡镇:${o.name}`:"最高乡镇产量",value:o==null?void 0:o.value,unit:(o==null?void 0:o.unit)||t,scaleValue:St(Ni(o==null?void 0:o.value,n))}].filter(l=>l.value!==void 0)}function IU(){return{levelRows:Sa([{key:"none",name:"未退化",value:642.42,unit:"万亩"},{key:"light",name:"轻度退化",value:83.95,unit:"万亩"},{key:"middle",name:"中度退化",value:17.49,unit:"万亩"},{key:"heavy",name:"重度退化",value:13.09,unit:"万亩"}]),townRows:[{key:"qiongxi",name:"邛溪镇",value:14.72,unit:"万亩"},{key:"sedi",name:"色地镇",value:13.86,unit:"万亩"},{key:"anqu",name:"安曲镇",value:12.38,unit:"万亩"},{key:"wache",name:"瓦切镇",value:10.64,unit:"万亩"},{key:"chaerma",name:"查尔玛乡",value:9.53,unit:"万亩"},{key:"amu",name:"阿木乡",value:8.71,unit:"万亩"}]}}function lie(r=[]){const e=Bc(r),t=r.filter(o=>o.name&&o.name!=="未退化"),n=Bc(t),i=t.filter(o=>o.name.includes("中")||o.name.includes("重")).reduce((o,s)=>o+(Number(s.value)||0),0),a=t.find(o=>o.name.includes("重"));return[{key:"degraded-total",name:"退化面积",value:St(n),unit:"万亩",icon:"area"},{key:"degraded-rate",name:"退化率",value:St(Ni(n,e)),unit:"%",icon:"rate"},{key:"medium-heavy-area",name:"中重度",value:St(i),unit:"万亩",icon:"risk"},{key:"heavy-area",name:"重度",value:a==null?void 0:a.value,unit:(a==null?void 0:a.unit)||"万亩",icon:"risk"}].filter(o=>o.value!==void 0)}function FD(r,e){if(r==="grassland"){const t=rc([{key:"grassland-area",name:"草地总面积",value:756.43,unit:"万亩"},{key:"basic-grassland",name:"基本草原",value:637.13,unit:"万亩"},{key:"general-grassland",name:"一般草原",value:119.31,unit:"万亩"}],r),n=Sn([{name:"色地镇",value:99.09,basicAreaWanMu:66.58},{name:"邛溪镇",value:93.01,basicAreaWanMu:70.6},{name:"安曲镇",value:90.08,basicAreaWanMu:73.49},{name:"阿木乡",value:86.3,basicAreaWanMu:77.31},{name:"查尔玛乡",value:80.8,basicAreaWanMu:79.04},{name:"瓦切镇",value:74.74,basicAreaWanMu:70.73},{name:"刷经寺镇",value:74.3,basicAreaWanMu:56.66},{name:"龙日镇",value:62.64,basicAreaWanMu:49.66},{name:"江茸乡",value:49.67,basicAreaWanMu:48.78},{name:"麦洼乡",value:45.82,basicAreaWanMu:44.28}],{nameKeys:["name"],valueKeys:["value"]}),i=Sn([{areaName:"邛溪镇",yield:38.88},{areaName:"色地镇",yield:37.78},{areaName:"安曲镇",yield:36.77},{areaName:"查尔玛乡",yield:33.21},{areaName:"瓦切镇",yield:32.62},{areaName:"阿木乡",yield:32.17},{areaName:"龙日镇",yield:24.43},{areaName:"刷经寺镇",yield:22.51},{areaName:"麦洼乡",yield:19.5},{areaName:"江茸乡",yield:19.43}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),a=Qp([{key:"grazing",name:"重要放牧场",value:516.41,unit:"万亩"},{key:"general",name:"一般草原",value:119.31,unit:"万亩"},{key:"ecology",name:"生态调节草原",value:97.23,unit:"万亩"},{key:"mowing",name:"割草地",value:15.95,unit:"万亩"},{key:"improved",name:"改良草地",value:4.33,unit:"万亩"}],{limit:4,minPercent:3,otherName:"其他草原类型"}),o=Sn([{areaName:"瓦切镇",yield:798.39},{areaName:"查尔玛乡",yield:794.32},{areaName:"麦洼乡",yield:784.16},{areaName:"邛溪镇",yield:772.43},{areaName:"安曲镇",yield:770.9}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"斤"}),l=IU().levelRows,u=Sa([{key:"level-3",name:"3级草原",value:200.9,unit:"万亩"},{key:"level-4",name:"4级草原",value:205.47,unit:"万亩"},{key:"level-5",name:"5级草原",value:385.42,unit:"万亩"},{key:"level-6",name:"6级草原",value:139.06,unit:"万亩"},{key:"level-7",name:"7级草原",value:3.68,unit:"万亩"},{key:"level-8",name:"8级草原",value:3.61,unit:"万亩"}]),c=Sa([{key:"good",name:"较健康",value:231.32,unit:"万亩"},{key:"healthy",name:"健康",value:481.87,unit:"万亩"},{key:"subhealthy",name:"亚健康",value:23.69,unit:"万亩"},{key:"unhealthy",name:"不健康",value:20.27,unit:"万亩"}]),h=DU({xc:297.29,edibleXc:192.26,unit:"万吨"},i),f=Sn([{areaName:"邛溪镇",yield:24.71},{areaName:"色地镇",yield:24.18},{areaName:"安曲镇",yield:23.48},{areaName:"查尔玛乡",yield:21.26},{areaName:"瓦切镇",yield:20.88},{areaName:"阿木乡",yield:20.59},{areaName:"龙日镇",yield:15.63},{areaName:"刷经寺镇",yield:14.41},{areaName:"麦洼乡",yield:12.48},{areaName:"江茸乡",yield:12.44}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),d=kU({core:t,townRows:n,grassTypeRows:a,grassLevelRows:u,healthRows:c,productivityRows:o,edibleYieldRows:f,forageRows:h,degradationRows:l}),p=Xe(Re({status:"fallback"},d),{top:RU(t,{xc:297.29,unit:"万吨"},l,i)});return bf(p,r,e)}if(r==="wetland"){const t=rc([{key:"wetland-area",name:"湿地面积",value:291.82,unit:"万亩"},{key:"wetland-yield",name:"湿地生产力(鲜草)",value:108.84,unit:"万吨"},{key:"wetland-level-1-area",name:"1级湿地面积",value:213.22,unit:"万亩"}],r),n=Qp([{name:"高寒草甸类",value:190.32,unit:"万亩"},{name:"山地草甸类",value:49.48,unit:"万亩"},{name:"低地草甸类",value:3.21,unit:"万亩"}],{limit:4,minPercent:1,otherName:"其他湿地类型"}),i=[{name:"1级湿地",value:213.22,unit:"万亩"},{name:"2级湿地",value:22.99,unit:"万亩"},{name:"3级湿地",value:6.42,unit:"万亩"},{name:"4级湿地",value:.36,unit:"万亩"},{name:"5级湿地",value:.02,unit:"万亩"}],a=Sn([{areaName:"色地镇",yield:21.32},{areaName:"瓦切镇",yield:17.49},{areaName:"安曲镇",yield:15.19},{areaName:"邛溪镇",yield:13.41},{areaName:"阿木乡",yield:10.37},{areaName:"龙日镇",yield:10.11},{areaName:"麦洼乡",yield:9.67},{areaName:"江茸乡",yield:5.78},{areaName:"刷经寺镇",yield:3.43},{areaName:"查尔玛乡",yield:2.08}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),o=[{name:"瓦切镇",value:944.22,unit:"斤"},{name:"安曲镇",value:913.28,unit:"斤"},{name:"麦洼乡",value:911.14,unit:"斤"},{name:"查尔玛乡",value:873.31,unit:"斤"},{name:"阿木乡",value:872,unit:"斤"}],s=[{name:"瓦切镇",value:36.38,unit:"万亩"},{name:"邛溪镇",value:29.29,unit:"万亩"},{name:"阿木乡",value:25.26,unit:"万亩"},{name:"龙日镇",value:24.59,unit:"万亩"},{name:"色地镇",value:24.62,unit:"万亩"}].sort((d,p)=>p.value-d.value),l=[{name:"矮生嵩草、杂类草型",value:108.35,unit:"万亩"},{name:"高山嵩草、矮生嵩草型",value:34.36,unit:"万亩"},{name:"西藏嵩草、杂类草型",value:32.37,unit:"万亩"},{name:"早熟禾、杂类草型",value:20.99,unit:"万亩"},{name:"苔草、杂类草型",value:14.63,unit:"万亩"}],u=Sn([{areaName:"色地镇",yield:2.82},{areaName:"邛溪镇",yield:2.71},{areaName:"瓦切镇",yield:2.64},{areaName:"麦洼乡",yield:1.76},{areaName:"安曲镇",yield:1.66}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"万吨"}),c=Sn([{areaName:"阿木乡",yield:509.83},{areaName:"瓦切镇",yield:509.52},{areaName:"邛溪镇",yield:356.74},{areaName:"色地镇",yield:287.23},{areaName:"麦洼乡",yield:281.27}],{nameKeys:["areaName"],valueKeys:["yield"],unit:"斤"}),h=LU({core:t,yieldSummary:{xc:108.84,edibleXc:1.65,unit:"万吨"},townAreaRows:s,typeRows:n,levelRows:i,yieldRows:a,minTypeRows:l,muYieldRows:o,edibleYieldRows:u,edibleMuRows:c,typeTownRows:s,levelTownRows:s,minTownRows:s}),f=Re({status:"fallback",core:t,top:[t[0],t[1],t[2]]},h);return bf(f,r,e)}if(r==="woodland"){const t=rc([{key:"woodland-area",name:"林地总面积",value:177.92,unit:"万亩"},{key:"woodland-public-area",name:"公益林面积",value:159.33,unit:"万亩"},{key:"woodland-public-rate",name:"公益林占比",value:89.55,unit:"%"}],r),n=Sn([{name:"刷经寺镇",value:59.4,percent:33.39},{name:"色地镇",value:27.97,percent:15.72},{name:"查尔玛乡",value:22.6,percent:12.7},{name:"阿木乡",value:19.37,percent:10.89},{name:"江茸乡",value:11.61,percent:6.53},{name:"邛溪镇",value:8.29,percent:4.66},{name:"瓦切镇",value:7.98,percent:4.49},{name:"安曲镇",value:7.47,percent:4.2},{name:"龙日镇",value:7.08,percent:3.98},{name:"麦洼乡",value:6.14,percent:3.45}],{nameKeys:["name"],valueKeys:["value"],extra:h=>`占比 ${St(h.percent)}%`}),i=Qp([{name:"灌木林地",value:114.78,unit:"万亩"},{name:"乔木林地",value:49.56,unit:"万亩"},{name:"灌丛沼泽",value:8.79,unit:"万亩"},{name:"其他林地",value:4.79,unit:"万亩"}],{limit:4,minPercent:1,otherName:"其他林地"}),u=PU({townRows:n,typeRows:i,scaleRows:[{name:"15-150亩",value:96.91,unit:"万亩"},{name:"<15亩",value:39.99,unit:"万亩"},{name:"150-1500亩",value:30.81,unit:"万亩"},{name:"≥1500亩",value:10.21,unit:"万亩"}],protectionRows:[{name:"国家二级公益林",value:158.33,unit:"万亩",extra:"88.99%"},{name:"未划定",value:18.72,unit:"万亩",extra:"10.52%"},{name:"国家一级公益林",value:.88,unit:"万亩",extra:"0.49%"}],ownershipRows:[{name:"集体林地",value:172.19,unit:"万亩",extra:"96.78%"},{name:"国有或其他",value:5.73,unit:"万亩",extra:"3.22%"}],ownerRows:[{name:"壤口村",value:42.74,unit:"万亩",extra:"占比 24.02%"},{name:"查龙村",value:16.34,unit:"万亩",extra:"占比 9.18%"},{name:"茸塔玛村",value:14.96,unit:"万亩",extra:"占比 8.41%"},{name:"峨扎村",value:9.96,unit:"万亩",extra:"占比 5.6%"},{name:"三家寨村",value:9.57,unit:"万亩",extra:"占比 5.38%"}]}),c=Re({status:"fallback",core:t,top:[t[0],t[1],t[2]]},u);return bf(c,r,e)}return{status:"empty",core:rc([],r),leftPanels:[],rightPanels:[],left:{title:"业务统计",rows:[]},right:{title:"业务统计",rows:[]}}}function NU(r=[],e=["name"]){const t=new Map;return r.forEach(n=>{const i=lt(n,e);!i||t.has(i)||t.set(i,n)}),Array.from(t.values())}function yn(r,e=[]){return r().catch(()=>e)}function SS(r=[],e={}){const{nameKeys:t=["name","health","level"],valueKeys:n=["value","acreage","areaWanMu"],unit:i="万亩",nameTransform:a=l=>l,max:o=Number.POSITIVE_INFINITY}=e,s=Sn(r||[],{nameKeys:t,valueKeys:n,unit:i}).map(l=>Xe(Re({},l),{name:a(l.name)}));return Sa(s).filter(l=>Number(l.value)>0).slice(0,o)}function uie(r){const e=String(r||"");return/^\d+$/.test(e)?`${e}级草原`:e.includes("级")?e.replace(/草地/g,"草原"):e}function cie(r){const e=String(r||"");return{healthy:"健康",subhealthy:"亚健康",unhealthy:"不健康"}[e]||e}function kU({core:r,townRows:e,grassTypeRows:t,grassLevelRows:n,healthRows:i,productivityRows:a,edibleYieldRows:o,forageRows:s,degradationRows:l}){const u=Gt("grassland-town","草地面积分布",kv(e),"line",{span:1}),c=Gt("grassland-productivity-town","草地生产力分布",kv(a),"line",{span:1}),h=Gt("grassland-type-proportion","草原类占比",t,"donut",{span:1}),f=Gt("grassland-edible-yield","可食鲜草产量分布",Kr(o,10),"column",{span:1,variant:"slim"}),d=Gt("grassland-degradation","草地退化统计",sie(l),"structure",{span:1}),p=Gt("grassland-health-proportion","草地健康占比",i,"donut",{span:1}),g=Gt("grassland-level-proportion","草原级占比",n,"donut",{span:1}),v=Gt("grassland-forage-capacity","饲草供给",s,"bar",{span:1,variant:"capacity"}),m=[u,h,d,g],y=[f,c,p,v];return{core:r,leftPanels:m,rightPanels:y,left:m[0],right:y[0],layerPanels:rie({leftPanels:m,rightPanels:y})}}function hie(r,e={}){const t=Vre(r),n=NU(e.typeRows||[],["name"]),i=e.yieldRows||[],a=e.levelRows||[],o=e.minTypeRows||[],s=e.edibleRows||[],l=e.edibleMuRows||[],u=e.typeDistributionRows||[],c=e.levelDistributionRows||[],h=e.minTypeDistributionRows||[],f=e.yieldSummary||{},d=Qp(Nm(n,{nameKeys:["name"],valueKeys:["value"],unit:"万亩"}),{limit:4,minPercent:1,otherName:"其他湿地类型"}),p=$0(i,e.muYieldRows||[],{showMuYieldExtra:!1}),g=Nm(e.muYieldRows||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:"斤",max:5}),v=Nm(a,{nameKeys:["name"],valueKeys:["value"],unit:"万亩"}).map(P=>Xe(Re({},P),{name:OD(P.name)})),m=$re(o),y=$0(s,l,{showMuYieldExtra:!1}),_=Nm(l,{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:lt(l==null?void 0:l[0],["unit"])||"斤",max:5}),x=ef(u,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"]}),S=ef(u,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],extra:P=>{var D;return`${((D=P.source)==null?void 0:D.length)||0}类`}}),A=ef(c,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"]}),w=ef(c,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],filter:P=>OD(lt(P,["level","name"])).startsWith("1级")}),M=ef(h,{nameKeys:["areaName","name"],valueKeys:["acreage","areaWanMu","value"],extra:P=>{var D;return`${((D=P.source)==null?void 0:D.filter(L=>EU(L,["acreage","areaWanMu","value"])>0).length)||0}型`}}),C=rc(t,"wetland"),b=v.find(P=>/^1级/.test(P.name))||v[0],T=LU({yieldSummary:f,townAreaRows:x,typeRows:d,levelRows:v,yieldRows:p,minTypeRows:m,muYieldRows:g,edibleYieldRows:y,edibleMuRows:_,typeTownRows:S,levelTownRows:w.length?w:A,minTownRows:M});return Re({core:C,top:[C[0],C[1],{key:"wetland-level-1-area",name:"1级湿地面积",value:b==null?void 0:b.value,unit:(b==null?void 0:b.unit)||"万亩"}].filter(Boolean)},T)}function fie(r,e){return Ge(this,null,function*(){var t;try{if(r==="woodland"){const[n,i,a,o,s]=yield Promise.all([gl("/woodland/distribution").then(Lt),yn(()=>Ge(this,null,function*(){return Lt(yield gl("/woodland/types"))}),{}),yn(()=>Ge(this,null,function*(){return Lt(yield gl("/woodland/protection"))}),{}),yn(()=>Ge(this,null,function*(){return Lt(yield gl("/woodland/quality"))}),{}),yn(()=>Ge(this,null,function*(){return Lt(yield gl("/woodland/ownership"))}),{})]),l=rc(Gre(n),r),u=lt((n==null?void 0:n.core)||(n==null?void 0:n.summary)||{},["totalAreaWanMu","total_area_wan_mu","areaWanMu","area_wan_mu"]),c=lt((a==null?void 0:a.summary)||{},["publicAreaWanMu","public_area_wan_mu"]),h=[l[0],{key:"woodland-public-area",name:"公益林面积",value:St(c),unit:"万亩"},{key:"woodland-public-rate",name:"公益林占比",value:St((t=lt((a==null?void 0:a.summary)||{},["publicAreaPercent","public_area_percent"]))!=null?t:Ni(c,u)),unit:"%"}].filter(Boolean),f=Sn((n==null?void 0:n.areaDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:D=>Im(D,u)}),d=Qp(Sn((i==null?void 0:i.typeStats)||(n==null?void 0:n.typeDistribution)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:go}),{limit:4,minPercent:1,otherName:"其他林地"}),p=Sn((n==null?void 0:n.patchScale)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:D=>Im(D,u)}),g=Sn((a==null?void 0:a.protectionLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:go}),v=Sn((o==null?void 0:o.speciesRanks)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:go}),m=Sn((s==null?void 0:s.ownerRanks)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:D=>Im(D,u)}),y=Sn((s==null?void 0:s.landOwnerships)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:go}),_=Sn((a==null?void 0:a.forestTypes)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:go}),x=Sn((a==null?void 0:a.manageLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],max:6,extra:go}),S=Sn((a==null?void 0:a.regionRanks)||[],{nameKeys:["regionName","name","townName"],valueKeys:["areaWanMu","value"],max:6,extra:D=>Im(D,c)}),A=Sn((o==null?void 0:o.origins)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:go}),w=Sn((o==null?void 0:o.ageGroups)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:go}),M=Sn((o==null?void 0:o.canopyLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:D=>{const L=St(lt(D,["avgCanopy","avg_canopy"]));return L!==void 0?`均值 ${L}`:go(D)}}),C=Sn((o==null?void 0:o.qualityLevels)||[],{nameKeys:["name"],valueKeys:["areaWanMu","value"],extra:go}),b=Hb((i==null?void 0:i.townComposition)||[],{nameKeys:["townName","name"],valueKeys:["areaWanMu","value"]}).slice(0,6),T=PU({townRows:f,typeRows:d,scaleRows:p,protectionRows:g,ownershipRows:y,qualityRows:v,originRows:A,ageRows:w,canopyRows:M,forestTypeRows:_,manageLevelRows:x,regionRows:S,ownerRows:m,typeTownRows:b,qualityLevelRows:C}),P=Re({status:"success",core:l,top:h},T);return bf(P,r,e)}if(r==="grassland"){const[n,i,a,o,s,l,u,c,h]=yield Promise.all([sn("/basic_grassland/overview").then(Lt),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_yield/yieldProportion"))}),{}),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_yield/distribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_yield/muYieldDistribution"))})),yn(()=>Ge(this,null,function*(){return oie()}),IU()),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_grass_type/areaProportion"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_grassland_level/areaProportion"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_health/proportion"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/grassland_yield/edibleXcDistribution"))}))]),f=s.levelRows||[],d=rc(Hre(n),r),p=$0(a||[],o||[],{showMuYieldExtra:!1}),g=Sn(o||[],{nameKeys:["areaName","name"],valueKeys:["yield","value"],unit:lt(o==null?void 0:o[0],["unit"])||"斤"}),v=Sn((n==null?void 0:n.townStats)||[],{nameKeys:["name"],valueKeys:["totalAreaWanMu"]}),m=SS(NU(l||[],["name"]),{nameKeys:["name"],valueKeys:["value","areaWanMu","acreage"],unit:"万亩",nameTransform:MU}),y=SS(u||[],{nameKeys:["name","level"],valueKeys:["value","areaWanMu","acreage"],unit:"万亩",nameTransform:uie}),_=SS(c||[],{nameKeys:["health","name"],valueKeys:["acreage","value","areaWanMu"],unit:"万亩",nameTransform:cie}),x=$0(h||[],[],{showMuYieldExtra:!1}),S=kU({core:d,townRows:v,grassTypeRows:m,grassLevelRows:y,healthRows:_,productivityRows:g,edibleYieldRows:x,forageRows:DU(i,p),degradationRows:f}),A=Xe(Re({status:"success"},S),{top:RU(d,i,f,p)});return bf(A,r,e)}if(r==="wetland"){const[n,i,a,o,s,l,u,c,h,f,d,p]=yield Promise.all([Wre([()=>Ge(this,null,function*(){return Lt(yield sn("/index/dataItem",{group:"wetland"}))}),()=>Ge(this,null,function*(){return Lt(yield sn("/index/dataItem",{group:"wetland_grassland_level"}))})]),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grass_type_copy/areaProportion"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_yield/distribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_yield/muYieldDistribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grassland_level/areaProportion"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grass_type_copy/minTypeAreaProportion"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_yield/edibleXcDistribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_yield/edibleXcMuDistribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grass_type_copy/distribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grassland_level/distribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_grass_type_copy/minTypeAreaDistribution"))})),yn(()=>Ge(this,null,function*(){return Lt(yield sn("/wetland_yield/yieldProportion"))}),{})]),g=hie(n,{typeRows:i,yieldRows:a,muYieldRows:o,levelRows:s,minTypeRows:l,edibleRows:u,edibleMuRows:c,typeDistributionRows:h,levelDistributionRows:f,minTypeDistributionRows:d,yieldSummary:p}),v=Xe(Re({status:"success"},g),{left:g.leftPanels[0],right:g.rightPanels[0]});return bf(v,r,e)}return FD(r,e)}catch(n){return Xe(Re({},FD(r,e)),{status:"error",error:n})}})}function die(r,e,t=null){return Ge(this,null,function*(){try{const n=yield eie(r,e,t);return n||(r==="woodland"?e==="woodland-protection"?yield km({topicKey:r,layerKey:e,layerName:"ne:t_woodland_2023",title:"公益林面积排行",cqlFilter:"gjgyl_bhdj IN ('1','2')"}).catch(()=>Ge(this,null,function*(){const i=Lt(yield gl("/woodland/protection")),a=Hb((i==null?void 0:i.regionRanks)||[],{nameKeys:["townName"],valueKeys:["areaWanMu"],unit:"万亩"});return Vo({topicKey:r,layerKey:e,title:"公益林面积排行",unit:"万亩",rows:a,note:"按公益林村级榜单汇总到乡镇"})})):e==="woodland-type"?yield km({topicKey:r,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地类型面积排行"}).catch(()=>Ge(this,null,function*(){const i=Lt(yield gl("/woodland/types")),a=Hb((i==null?void 0:i.townComposition)||[],{nameKeys:["townName"],valueKeys:["areaWanMu"],unit:"万亩"});return Vo({topicKey:r,layerKey:e,title:"林地类型面积排行",unit:"万亩",rows:a,note:"按林地类型组成汇总到乡镇"})})):e==="woodland-quality"?yield km({topicKey:r,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地质量面积排行",cqlFilter:"zl_dj IS NOT NULL"}):e==="woodland-ownership"?yield km({topicKey:r,layerKey:e,layerName:"ne:t_woodland_2023",title:"林地权属面积排行",cqlFilter:"ld_qs IS NOT NULL"}):yield Xre(r,e,"林地面积排行"):r==="grassland"?e==="basic-grassland"?yield ID(r,e,"basicAreaWanMu","基本草原面积排行"):e==="grassland-level"?yield Om(r,e,"/grassland_yield/muYieldDistribution","草地亩产排行","斤"):yield ID(r,e,"totalAreaWanMu","草地面积排行"):r==="wetland"?e==="wetland-level"?yield Om(r,e,"/wetland_yield/muYieldDistribution","湿地亩产排行","斤"):e==="wetland-type"?yield Om(r,e,"/wetland_yield/edibleXcDistribution","可食鲜草产量排行","万吨"):yield Om(r,e,"/wetland_yield/distribution","湿地生产力排行","万吨"):Vo({topicKey:r,layerKey:e,title:"乡镇统计排行",rows:[]}))}catch(n){return{status:"error",topicKey:r,layerKey:e,title:"乡镇统计排行",unit:"",rows:[],error:n}}})}const pie={class:"topic-switcher"},vie={class:"topic-switcher-menu"},gie=["onClick"],mie={class:"topic-name"},OC={__name:"TopicSwitcher",props:{modelValue:{type:String,required:!0},topics:{type:Array,default:()=>jf}},emits:["update:modelValue"],setup(r,{emit:e}){const t=r,n=e,i=Se(()=>{var o;return(o=t.topics)!=null&&o.length?t.topics:jf});function a(o,s){var l,u;(u=(l=o.currentTarget)==null?void 0:l.blur)==null||u.call(l),n("update:modelValue",s)}return(o,s)=>(ie(),oe("div",pie,[s[1]||(s[1]=G("div",{class:"topic-switcher-arrow"},[G("img",{src:_0,alt:""}),G("img",{src:x0,alt:""})],-1)),G("div",vie,[(ie(!0),oe(it,null,vt(i.value,l=>(ie(),oe("button",{key:l.key,class:Vt(["topic-switcher-item",{"is-active":l.key===r.modelValue}]),style:un({"--topic-color":l.color}),type:"button",onMousedown:s[0]||(s[0]=Nc(()=>{},["prevent"])),onClick:u=>a(u,l.key)},[G("span",mie,Te(l.name),1)],46,gie))),128))]),s[2]||(s[2]=G("div",{class:"topic-switcher-arrow is-reverse"},[G("img",{src:_0,alt:""}),G("img",{src:x0,alt:""})],-1))]))}};const yie={class:"layer-panel"},_ie={class:"layer-panel-list"},xie=["onClick"],Sie={key:0,class:"layer-panel-empty"},Aie={class:"layer-panel-legend"},wie=["disabled","title","onClick"],bie={class:"legend-name"},Tie={key:0,class:"legend-check"},Mie={key:1,class:"layer-panel-empty is-legend"},OU={__name:"LayerPanel",props:{topicKey:{type:String,required:!0},modelValue:{type:String,default:""},legends:{type:Array,default:()=>[]},selectedLegendKey:{type:String,default:""},height:{type:Number,default:0},width:{type:Number,default:232}},emits:["update:modelValue","update:selectedLegendKey"],setup(r,{emit:e}){const t=r,n=e,i=Se(()=>s1(t.topicKey)),a=Se(()=>t.legends.filter(c).length>1),o=Se(()=>t.legends.length===1),s=Se(()=>t.height?t.height:430);function l(f,d){var p,g;(g=(p=f.currentTarget)==null?void 0:p.blur)==null||g.call(p),n("update:modelValue",d)}function u(f,d){var p,g;(g=(p=f.currentTarget)==null?void 0:p.blur)==null||g.call(p),h(d)&&n("update:selectedLegendKey",t.selectedLegendKey===d.key?"":d.key)}function c(f){return(f==null?void 0:f.selectable)===!1?!1:!!(f!=null&&f.key&&(f.cqlFilter||f.rankingValueKey))}function h(f){return a.value&&c(f)}return(f,d)=>(ie(),Ji(tn,{title:"图层控制",width:r.width,height:s.value},{default:Xt(()=>[G("div",yie,[G("div",_ie,[(ie(!0),oe(it,null,vt(i.value,p=>(ie(),oe("button",{key:p.key,class:Vt(["layer-panel-item",{"is-active":p.key===r.modelValue,"is-checked":p.key===r.modelValue}]),type:"button",onMousedown:d[0]||(d[0]=Nc(()=>{},["prevent"])),onClick:g=>l(g,p.key)},[G("span",null,Te(p.name),1),d[2]||(d[2]=G("i",null,null,-1))],42,xie))),128)),i.value.length?Tt("",!0):(ie(),oe("div",Sie,"暂无图层配置"))]),G("div",Aie,[d[3]||(d[3]=G("div",{class:"layer-panel-section-title"},"图例",-1)),r.legends.length?(ie(),oe("div",{key:0,class:Vt(["layer-panel-legend-grid",{"is-single":o.value}])},[(ie(!0),oe(it,null,vt(r.legends,p=>(ie(),oe("button",{key:p.key||p.name,class:Vt(["layer-panel-legend-row",{"is-selected":h(p)&&p.key===r.selectedLegendKey,"is-checkable":h(p),"is-disabled":!h(p)}]),type:"button",disabled:!h(p),title:p.name,onMousedown:d[1]||(d[1]=Nc(()=>{},["prevent"])),onClick:g=>u(g,p)},[G("span",{class:"legend-swatch",style:un({backgroundColor:p.fillColor,borderColor:p.strokeColor||p.fillColor})},null,4),G("span",bie,Te(p.name),1),h(p)?(ie(),oe("i",Tie)):Tt("",!0)],42,wie))),128))],2)):(ie(),oe("div",Mie,"暂无图例"))])])]),_:1},8,["width","height"]))}};const Cie={class:"feature-info"},Eie={key:0,class:"feature-info-state"},Lie={key:1,class:"feature-info-state"},Pie={key:2,class:"feature-info-state"},Rie={key:0,class:"feature-table"},Die=["title"],Iie={key:1,class:"feature-info-state is-inline"},FU={__name:"FeatureInfoPanel",props:{feature:{type:Object,default:null},empty:{type:Boolean,default:!1},loading:{type:Boolean,default:!1},height:{type:Number,default:380},width:{type:Number,default:430}},setup(r){const e=r,t=[[["town_name","xiangName","xiang_name","xiang","xzqmc","xzqdm","town_code","area_code"],"所在乡镇"],[["village_name","cunName","cun_name","cun","c_name","cmc"],"所在村"],[["full_name"],"所在区域"],[["land_number","patch_no"],"图斑编号"],[["areaWanMu","area_wan_mu","area_mu","acreage","mj","xbmj","tbdlmj","tbmj","geomj","shape_area"],"图斑面积"]],n=[[["investigator"],"调查人"],[["survey_time","dc_rq","sjnf","delimitation_year"],"调查时间"],[["adjust_opinion_name"],"调整意见"],[["adjust_reason"],"调整原因"]],i={woodland:[[["dlmc","layer_class_name"],"地类名称"],...t,[["qsdwmc"],"权属单位"],[["zldwmc"],"坐落单位"],[["lin_ban"],"林班"],[["xiao_ban"],"小班"],[["ld_qs","tdsyqs","qsxz","ownership_name","ownership"],"土地权属"],[["gjgyl_bhdj","bh_dj","protection_level_name","protection_level"],"保护等级"],[["sen_lin_lb","forest_type"],"森林类别"],[["lin_zhong","forest_category"],"林种"],[["zl_dj","quality_level_name","quality_level"],"质量等级"],[["you_shi_sz","tree_species","dominant_tree_species"],"优势树种"],[["qi_yuan","origin"],"起源"],[["ling_zu"],"龄组"],[["yu_bi_du"],"郁闭度"],[["pingjun_sg"],"平均树高"],[["mei_gq_zs"],"每公顷株数"],[["mei_gq_xj"],"每公顷蓄积"],[["huo_lm_xj"],"活立木蓄积"],[["sheng_wu_l"],"生物量"],[["tan_chu_l"],"碳储量"],[["stqwmc"],"生态区位"],[["po_du","slope"],"坡度"],[["po_wei"],"坡位"],[["tu_ceng_hd","soil_depth"],"土层厚度"],...n],grassland:[...t,[["land_class_name","land_use_name","land_use"],"地类名称"],[["land_type"],"资源大类"],[["resource_type"],"资源类别"],[["grassland_category_name","grassland category","base_grass"],"草原类别"],[["basic_type_name"],"基本草原类型"],[["grass_type_name","grassland_type_name","grass_type"],"草原类"],[["grass_min_type"],"草原型"],[["grassland_level_name","grassland_level","level_name","level"],"草原级别"],[["degradation_level_name","degradation_level"],"退化等级"],[["vegetation_structure_name","vegetation_structure"],"植被结构"],[["vegetation_cover"],"植被盖度"],[["lbmjbl"],"裸斑面积比例"],[["dominance_level"],"优势度"],[["dominant_grass_species"],"优势草种"],[["functional_category"],"功能类别"],[["xc_yield"],"鲜草产量"],[["xc_mu_yield","xb_xc_mu_yield","mu_yield"],"鲜草亩产"],[["xb_xc_yield"],"小班鲜草产量"],[["xb_xc_mu_yield"],"小班鲜草亩产"],[["gc_yield"],"干草产量"],[["gc_mu_yield","xb_gc_mu_yield"],"干草亩产"],[["xb_gc_yield"],"小班干草产量"],[["xb_gc_mu_yield"],"小班干草亩产"],[["elevation"],"海拔"],[["landform_name","landform"],"地貌"],[["slope"],"坡度"],[["aspect"],"坡向"],[["soil_depth","tu_ceng_hd"],"土层厚度"],[["soil texture"],"土壤质地"],[["sddl"],"三调地类"],[["hqlm"],"划区轮牧"],[["cdsyq"],"草地所有权"],[["cdsyq2"],"草地使用权"],[["cdjjq"],"草地经营权"],...n],wetland:[[["grass_min_type","grassland_category_name","grassland_type_name","land_class_name","land_use_name"],"湿地类型"],...t,[["grass_type_name","grass_type"],"湿地草地型"],[["grassland_level_name","grassland_level","level_name","level"],"湿地级别"],[["vegetation_structure_name","vegetation_structure"],"植被结构"],[["vegetation_cover"],"植被盖度"],[["dominant_grass_species"],"优势草种"],[["functional_category"],"功能类别"],[["xc_yield","xb_xc_yield"],"鲜草产量"],[["xc_mu_yield","xb_xc_mu_yield","mu_yield"],"鲜草亩产"],[["edible_xc_yield"],"可食鲜草产量"],[["edible_xc_mu_yield"],"可食鲜草亩产"],[["gc_yield","xb_gc_yield"],"干草产量"],[["elevation"],"海拔"],[["landform_name","landform"],"地貌"],[["soil_depth","tu_ceng_hd"],"土层厚度"],...n],ecological:[[["type"],"管控分区"],[["project_name"],"项目名称"],[["project_category"],"项目类型"],[["measure_type"],"措施类型"],[["feature_role"],"要素类型"],[["township"],"涉及乡镇"],[["year"],"建设年份"],[["totalAcreage"],"总面积"],[["cdAcreage"],"草地面积"],[["sdAcreage"],"湿地面积"],[["area_mu"],"治理面积"],[["length_meter"],"工程长度"],[["cdScl"],"草地生产力"],[["sdScl"],"湿地生产力"],[["geometry_type"],"几何类型"]]},a={513233100:"邛溪镇",513233101:"刷经寺镇",513233103:"安曲镇",513233105:"龙日镇",513233202:"江茸乡",513233203:"查尔玛乡",513233204:"瓦切镇",513233205:"阿木乡",513233207:"麦洼乡",513233208:"色地镇","513233101000":"刷经寺镇","513233103000":"安曲镇","513233105000":"龙日镇"},o={land_type:{1:"草地",2:"湿地",caodi:"草地",shidi:"湿地",woodland:"林地",grassland:"草地",wetland:"湿地"},vegetation_structure:{1:"草本型"},landform:{2:"平原",5:"中山",6:"高山"},land_use:{"0401":"天然牧草地","0403":"人工牧草地","0404":"其他草地"},sddl:{"0401":"天然牧草地","0403":"人工牧草地","0404":"其他草地"},ld_qs:{10:"集体林地",20:"国有或其他"},qsxz:{10:"集体林地",20:"国有或其他"},tdsyqs:{10:"集体林地",20:"国有或其他"},gjgyl_bhdj:{0:"未划定",1:"国家一级公益林",2:"国家二级公益林"},bh_dj:{0:"未划定",1:"国家一级公益林",2:"国家二级公益林"},zl_dj:{2:"二级质量",3:"三级质量",4:"四级质量",5:"五级质量"},po_wei:{1:"脊部",2:"上坡",3:"中坡",4:"下坡",5:"谷地",6:"平地"}},s=new Set(["lin_zhong","sen_lin_lb","you_shi_sz","qi_yuan","ling_zu","po_xiang","tu_rang_lx","ownership","ownership_name","protection_level","forest_category","forest_type","quality_level","origin","tree_species","dominant_tree_species","base_grass","degradation_level","land_class","grass_type"]),l={xiang:"所在乡镇",xzqdm:"所在乡镇",xzqmc:"所在乡镇",town_code:"所在乡镇",area_code:"所在乡镇",cun:"所在村",cmc:"所在村",c_name:"所在村",acreage:"图斑面积",mj:"图斑面积",xbmj:"小班面积",tbdlmj:"图斑地类面积",geomj:"图斑面积",tbmj:"图斑面积",shape_area:"图斑面积",area_mu:"图斑面积",grass_min_type:"草原型",grass_type:"草原类",grass_type_name:"草原类",grassland_type_name:"草原类",patch_no:"图斑编号",land_number:"图斑编号",grassland_level:"草原级别",grassland_level_name:"草原级别",level:"等级",level_name:"等级",land_class_name:"地类名称",land_use_name:"地类名称",basic_type_name:"草原类型",grassland_category_name:"草原类别",degradation_level:"退化等级",degradation_level_name:"退化等级",vegetation_structure:"植被结构",vegetation_structure_name:"植被结构",xc_yield:"鲜草产量",gc_yield:"干草产量",xc_mu_yield:"鲜草亩产",gc_mu_yield:"干草亩产",mu_yield:"亩产",edible_xc_yield:"可食鲜草产量",edible_xc_mu_yield:"可食鲜草亩产",dlmc:"地类名称",qsdwmc:"权属单位",zldwmc:"坐落单位",lin_ban:"林班",xiao_ban:"小班",ld_qs:"土地权属",tdsyqs:"土地权属",qsxz:"土地权属",gjgyl_bhdj:"保护等级",bh_dj:"保护等级",sen_lin_lb:"森林类别",lin_zhong:"林种",zl_dj:"质量等级",you_shi_sz:"优势树种",qi_yuan:"起源",cdsyq:"草地所有权",cdsyq2:"草地使用权",cdjjq:"草地经营权",resource_type:"资源类型","grassland category":"草原类别",dominant_grass_species:"优势草种",functional_category:"功能类别",vegetation_cover:"植被盖度",xb_xc_yield:"小班鲜草产量",xb_gc_yield:"小班干草产量",base_grass:"基本草原",hqlm:"划区轮牧",elevation:"海拔",soil_depth:"土层厚度","soil texture":"土壤质地",aspect:"坡向",slope:"坡度",landform:"地貌",landform_name:"地貌",sddl:"三调地类",dominance_level:"优势度",investigator:"调查人",survey_time:"调查时间",land_type:"土地类型",status:"状态",type:"类型",xb_gc_mu_yield:"干草亩产",xb_xc_mu_yield:"鲜草亩产",grass_yield:"草地产量",full_name:"所在区域",gyl_bhlx:"公益林保护类型",ling_zu:"龄组",yu_bi_du:"郁闭度",pingjun_xj:"平均胸径",mei_gq_zs:"每公顷株数",mei_gq_xj:"每公顷蓄积",stqwmc:"生态区位",lyfq:"林业分区",qykz:"区域控制",po_wei:"坡位",tu_rang_zd:"土壤质地",zzsxmc:"主导属性",lin_chang:"林场",di_mao:"地貌",jt_qw:"交通区位",zbfglx:"植被覆盖类型",disaster_c:"灾害类型",dispe:"病虫害",pingjun_sg:"平均树高",huo_lm_xj:"活立木蓄积",sheng_wu_l:"生物量",tan_chu_l:"碳储量",g_cheng_lb:"工程类别",shi_quan_d:"事权等级",sf_tbq:"是否特别区",td_th_lx:"土地退化类型",project_name:"项目名称",project_category:"项目类型",measure_type:"措施类型",feature_role:"要素类型",township:"涉及乡镇",year:"建设年份",length_meter:"工程长度",geometry_type:"几何类型",totalAcreage:"总面积",cdAcreage:"草地面积",sdAcreage:"湿地面积",cdScl:"草地生产力",sdScl:"湿地生产力"},u=new Set(Object.keys(l)),c=new Set(["pingjun_sg","pingjun_xj","mei_gq_zs","mei_gq_xj","huo_lm_xj","sheng_wu_l","tan_chu_l","yu_bi_du","grass_yield","xb_xc_yield","xb_xc_mu_yield","xc_mu_yield","xb_gc_yield","xb_gc_mu_yield","gc_mu_yield"]),h=new Set(["xb_xc_yield","xb_gc_yield","grass_yield","gc_yield","xc_yield","yield","output","remark1","remark2","remark3","remark4","remark5","remarks"]),f=Se(()=>{var O;return((O=e.feature)==null?void 0:O.properties)||{}}),d=Se(()=>{var O,V,H;return((V=(O=e.feature)==null?void 0:O.feature)==null?void 0:V.geometry)||((H=e.feature)==null?void 0:H.geometry)||null}),p=Se(()=>{var Z,ee,he,le,re;const O=String(((Z=e.feature)==null?void 0:Z.id)||"").toLowerCase(),V=String(((he=(ee=e.feature)==null?void 0:ee.layer)==null?void 0:he.key)||"").toLowerCase(),H=String(((re=(le=e.feature)==null?void 0:le.layer)==null?void 0:re.layerName)||"").toLowerCase(),Q=`${V} ${H}`,W=f.value;return Q.includes("national-park")||Q.includes("restoration")||W.project_name||W.project_category||W.totalAcreage?"ecological":W.dlmc||O.includes("woodland")||O.includes("t_woodland")||Q.includes("woodland")?"woodland":Q.includes("wetland")||Q.includes("shidi")||O.includes("shidi")||W.land_type==="shidi"||W.land_type==="湿地"||W.land_type===2?"wetland":Q.includes("grassland")||Q.includes("caodi")||W.grassland_category_name||W.basic_type_name||O.includes("caodi")||W.land_type==="caodi"||W.land_type===1?"grassland":"woodland"}),g=Se(()=>{const O=[],V=new Set;return(i[p.value]||i.woodland).forEach(([Q,W])=>{const Z=_(f.value,Q,W,V);Z&&!O.some(ee=>ee.label===Z.label)&&(O.push(Z),V.add(Z.sourceKey))}),O.some(Q=>Q.label==="图斑面积")||y(O,V,"图斑面积",E(d.value),"geometry-area"),Object.entries(f.value).forEach(([Q,W])=>{if(V.has(Q)||D(Q,W))return;const Z=S(Q,W);x(Z)&&(O.some(ee=>ee.value===Z||ee.label===(l[Q]||F(Q)))||(O.push({key:`fallback-${Q}`,sourceKey:Q,label:l[Q]||F(Q),value:Z}),V.add(Q)))}),O}),v=Se(()=>g.value.map((O,V)=>Xe(Re({},O),{displayOrder:m(O,V)})).sort((O,V)=>O.displayOrder-V.displayOrder));function m(O,V){const H=(O==null?void 0:O.label)||"",Q=String((O==null?void 0:O.sourceKey)||"").toLowerCase();return["所在乡镇","所在村","所在区域","图斑编号","图斑面积","小班面积","图斑地类面积","地类名称","湿地类型"].includes(H)?V:["基本草原类型","草原类型","草原类","草原型","湿地草地型","草原级别","湿地级别","退化等级","功能类别","保护等级","森林类别","林种","质量等级","优势树种","起源","龄组"].includes(H)?100+V:H.includes("产量")||H.includes("亩产")||H.includes("植被")||H.includes("优势草种")||H.includes("优势度")||H.includes("海拔")||H.includes("地貌")||H.includes("坡")||H.includes("土壤")||H.includes("郁闭度")||H.includes("树高")||H.includes("蓄积")||H.includes("生物量")||H.includes("碳储量")?200+V:H.includes("权属")||H.includes("所有权")||H.includes("使用权")||H.includes("经营权")||H.includes("调查")||H.includes("调整")||H.includes("划区")||H.includes("单位")||Q.includes("owner")||Q.includes("qsdw")||Q.includes("zldw")?300+V:150+V}function y(O,V,H,Q,W){!x(Q)||O.some(Z=>Z.label===H||Z.value===Q)||(O.push({key:`static-${W}`,sourceKey:W,label:H,value:Q}),V.add(W))}function _(O,V,H,Q=new Set){for(const W of V)if(!(Q.has(W)||P(W))&&x(O==null?void 0:O[W])){const Z=S(W,O[W]);if(!x(Z))continue;return{key:`${H}-${W}`,sourceKey:W,label:H,value:Z}}return null}function x(O){return O!=null&&O!==""&&O!==" "&&O!=="null"&&O!=="undefined"}function S(O,V){var W;if(!x(V))return"";if((W=o[O])!=null&&W[String(V)])return o[O][String(V)];if(["xiang","xzqdm","town_code","area_code"].includes(O))return A(V);if(["cun","village_code"].includes(O)&&w(V))return"";if(["grassland_level","level"].includes(O)&&M(V))return p.value==="wetland"?`${Number(V)}级湿地`:`${Number(V)}级草原`;if(s.has(O)&&w(V)||L(O,V))return"";if(b(O))return T(V);if(typeof V=="number"||/^-?\d+(\.\d+)?$/.test(String(V))){const Z=Number(V);if(Z===0&&c.has(O))return"";const ee=Number.isInteger(Z)?`${Z}`:`${Number(Z.toFixed(2))}`;return["xbmj","tbdlmj","geomj","area_square_meter"].includes(O)?`${C(Z/666.6667)} 亩`:["acreage","mj","area_mu"].includes(O)?`${ee} 亩`:["length_meter"].includes(O)?`${ee} 米`:["totalAcreage","cdAcreage","sdAcreage"].includes(O)?`${ee} 万亩`:["cdScl","sdScl"].includes(O)?`${ee} 万吨`:["areaWanMu","area_wan_mu"].includes(O)?`${ee} 万亩`:["xc_yield","xb_xc_yield","gc_yield","xb_gc_yield","edible_xc_yield","grass_yield"].includes(O)?`${ee} 斤`:["mu_yield","xc_mu_yield","gc_mu_yield","xb_xc_mu_yield","xb_gc_mu_yield","edible_xc_mu_yield"].includes(O)?`${ee} 斤`:["vegetation_cover","lbmjbl","yu_bi_du"].includes(O)?`${ee}%`:["elevation","tu_ceng_hd","pingjun_sg"].includes(O)?`${ee} 米`:["po_du","slope"].includes(O)?`${ee}°`:ee}const Q=String(V);return p.value==="wetland"&&["grassland_level","level"].includes(O)?Q.replace(/草原/g,"湿地"):Q}function A(O){const V=String(O||"").trim();if(!V)return"";if(a[V])return a[V];const H=V.replace(/\D/g,"");if(a[H])return a[H];for(let Q=Math.min(12,H.length);Q>=6;Q--){const W=H.slice(0,Q);if(a[W])return a[W]}return w(V)?"":V}function w(O){return/^[0-9A-Za-z_-]{1,12}$/.test(String(O).trim())}function M(O){return/^-?\d+(\.\d+)?$/.test(String(O).trim())}function C(O){return Number.isInteger(O)?`${O}`:`${Number(O.toFixed(2))}`}function b(O){return["survey_time","dc_rq","create_time","update_time"].includes(String(O))}function T(O){const V=String(O);return/^\d{4}-\d{2}-\d{2}/.test(V)?V.slice(0,10):V}function P(O){const V=String(O).toLowerCase();return["geom","wkt","geometry","the_geom","raw_properties"].includes(V)||["bsm","ysdm","gid","id","objectid","object_id","fid","key_uid"].includes(V)||["shape_leng","shape_length","length","perimeter"].includes(V)?!0:["xzqdm","area_code","town_code","patch_no","land_number"].includes(V)?!1:["di_lei","qykz","stqw","lyfq","tbybh","patch_code"].includes(V)||V.endsWith("_code")||V.endsWith("dm")||V.endsWith("_id")||["create_by","create_time","update_by","update_time"].includes(V)?!0:V.includes("geom")||V.includes("boundary")||V.includes("wkb")}function D(O,V){var Q;if(P(O)||!x(V))return!0;const H=String(O).toLowerCase();return!!(h.has(H)||H.includes("number")||H.includes("patch_no")||!u.has(O)||w(V)&&!((Q=o[O])!=null&&Q[String(V)])&&!["xiang","xzqdm","town_code","area_code","cun","land_type","grassland_level","level","gjgyl_bhdj","bh_dj","ld_qs","qsxz","tdsyqs","zl_dj"].includes(O))}function L(O,V){var H;return!w(V)||(H=o[O])!=null&&H[String(V)]?!1:["resource_type","grassland category","functional_category","aspect","soil_depth","soil texture","cdsyq","cdsyq2","cdjjq"].includes(O)}function E(O){const V=I(O);if(!V)return"";const H=V/666.6667;return H>=1e4?`${C(H/1e4)} 万亩`:`${C(H)} 亩`}function I(O){return O!=null&&O.coordinates?O.type==="Polygon"?N(O.coordinates):O.type==="MultiPolygon"?O.coordinates.reduce((V,H)=>V+N(H),0):0:0}function N(O=[]){if(!O.length)return 0;const[V,...H]=O,Q=Math.abs(R(V)),W=H.reduce((Z,ee)=>Z+Math.abs(R(ee)),0);return Math.max(0,Q-W)}function R(O=[]){if(O.length<3)return 0;const V=O.reduce((Z,ee)=>Z+Number((ee==null?void 0:ee[1])||0),0)/O.length,H=111320,Q=H*Math.cos(V*Math.PI/180);let W=0;for(let Z=0;Z<O.length;Z++){const ee=O[Z],he=O[(Z+1)%O.length],le=Number((ee==null?void 0:ee[0])||0)*Q,re=Number((ee==null?void 0:ee[1])||0)*H,be=Number((he==null?void 0:he[0])||0)*Q,de=Number((he==null?void 0:he[1])||0)*H;W+=le*de-be*re}return W/2}function F(O){return String(O).replace(/_/g," ").replace(/\b\w/g,V=>V.toUpperCase())}return(O,V)=>(ie(),Ji(tn,{title:"图斑详情",width:r.width,height:r.height},{default:Xt(()=>[G("div",Cie,[r.loading?(ie(),oe("div",Eie,"正在查询图斑信息")):r.empty?(ie(),oe("div",Lie,"当前点击位置未查询到图斑")):r.feature?(ie(),oe(it,{key:3},[v.value.length?(ie(),oe("div",Rie,[(ie(!0),oe(it,null,vt(v.value,H=>(ie(),oe("div",{key:H.key,class:"feature-row"},[G("span",null,Te(H.label),1),G("strong",{title:H.value},Te(H.value),9,Die)]))),128))])):(ie(),oe("div",Iie,"当前图斑暂无可展示的业务字段"))],64)):(ie(),oe("div",Pie,"点击地图图层查看图斑/要素信息"))])]),_:1},8,["width","height"]))}};const Nie={class:"forest-grass-wet"},kie={class:"forest-grass-wet-ui",id:"forest-grass-wet-ui"},Oie={class:"fgw-left"},Fie={class:"fgw-side-stack is-left"},Bie={class:"fgw-right"},zie={class:"fgw-side-stack is-right"},Uie={class:"fgw-map-layer-tools"},Vie={class:"fgw-bottom-topic"},Gie={key:0,class:"loading"},Hie={class:"loading-progress"},Wie={class:"value"},$ie={__name:"index",props:{showLoading:{type:Boolean,default:!0}},emits:["topic-stats"],setup(r,{emit:e}){const t=r,n=e,i=tt(null),a=tt(jf[0].key),o=tt(jf[0].defaultLayerKey),s=tt([]),l=tt("idle"),u=tt(!1),c=tt({title:"业务统计",rows:[]}),h=tt({title:"业务统计",rows:[]}),f=tt([]),d=tt([]),p=tt({}),g=tt(null),v=tt(""),m=tt(null),y=tt(!1),_=tt(!1),x=tt(null),S=tt(0),A=tt(t.showLoading),w=tt({type:"idle",text:"等待 GeoServer 图层加载"});let M=null,C=!1,b=0,T=0;const P=new Set(["grassland-distribution","wetland-distribution","woodland-distribution","woodland-protection","woodland-type","woodland-quality","woodland-ownership"]);Se(()=>yS(a.value));const D=Se(()=>mg(a.value,o.value)),L=Se(()=>{var B;return(((B=D.value)==null?void 0:B.legends)||[]).find(z=>z.key===v.value)||null}),E=Se(()=>{var z;const B=D.value;return!B||!((z=L.value)!=null&&z.cqlFilter)?B:Xe(Re({},B),{cqlFilter:L.value.cqlFilter,activeLegend:L.value,name:L.value.name||B.name})}),I=Se(()=>190),N=Se(()=>12),R=Se(()=>I.value*2+N.value),F=Se(()=>!!x.value),O=Se(()=>{if(_.value||y.value||!m.value)return 186;const B=be(m.value);return Math.min(480,Math.max(300,86+Math.min(B,12)*34))}),V=Se(()=>{if(!x.value)return{};const B=460,z=O.value,ne=24,ve=H(x.value),Ae=ve.x>1420?-B-28:28,we=Math.min(Math.max(ve.x+Ae,ne),1920-B-ne),We=Math.min(Math.max(ve.y-z-72,188),1080-z-132);return{left:`${we}px`,top:`${We}px`,right:"auto",bottom:"auto"}});function H(B){const z=document.querySelector(".forest-grass-wet"),ne=z==null?void 0:z.getBoundingClientRect();return!(ne!=null&&ne.width)||!(ne!=null&&ne.height)?B:{x:(B.x-ne.left)/ne.width*1920,y:(B.y-ne.top)/ne.height*1080}}Ko(()=>{document.addEventListener("pointerdown",Ne,!0),Q(),W(a.value,o.value),de(a.value,o.value)}),uo(()=>{C=!0,document.removeEventListener("pointerdown",Ne,!0)}),ni(a,B=>{var Ae;const z=yS(B),ne=s1(B),ve=z.defaultLayerKey||((Ae=ne[0])==null?void 0:Ae.key)||"";v.value="",o.value=ve,se(),W(B,ve),de(B,ve,null)}),ni(o,()=>{v.value="",se(),w.value={type:"loading",text:"正在加载 GeoServer 图层"},W(a.value,o.value),de(a.value,o.value,null)}),ni(v,()=>{se(),de(a.value,o.value,L.value)});function Q(){var ve;M=new _g;let B=!1;const z={progress:0};M.instance.on("onProgress",(Ae,we,We)=>{const Be=Math.floor(we/We*100);$n.to(z,{progress:Be,onUpdate:()=>{S.value=Math.floor(z.progress)}})});const ne=()=>Ge(this,null,function*(){var Ae,we;C||B||(B=!0,(Ae=i.value)==null||Ae.loadMap(M),yield Oe(),yield no(),(we=i.value)==null||we.play())});M.instance.on("onLoad",ne),(ve=M.ready)==null||ve.then(ne).catch(()=>{C||(w.value={type:"error",text:"地图资源加载失败"})})}function W(ne){return Ge(this,arguments,function*(B,z=o.value){const ve=`${B}:${z||""}`,Ae=p.value[ve];if(Ae){Z(Ae,B);return}const we=++T;u.value=!0,l.value="loading";const We=yield fie(B,z);C||we!==T||B===a.value&&(z||"")===(o.value||"")&&(p.value=Xe(Re({},p.value),{[ve]:We}),Z(We,B))})}function Z(B,z){var ve,Ae,we;const ne=ee(B);s.value=ne.core||[],c.value=ne.left||{title:"业务统计",rows:[]},h.value=ne.right||{title:"业务统计",rows:[]},f.value=(ve=ne.leftPanels)!=null&&ve.length?ne.leftPanels:[c.value],d.value=(Ae=ne.rightPanels)!=null&&Ae.length?ne.rightPanels:[h.value],l.value=ne.status,u.value=!1,n("topic-stats",{topicKey:z,topicName:yS(z).name,items:((we=ne.top)!=null&&we.length?ne.top:ne.core||[]).slice(0,4)})}function ee(B){return B||{}}function he(B,z){return`${a.value}-${z}-${(B==null?void 0:B.key)||(B==null?void 0:B.title)||"panel"}`}function le(B){var ne;const z=((ne=B==null?void 0:B.rows)==null?void 0:ne.length)||0;return(B==null?void 0:B.span)===1?!1:(B==null?void 0:B.span)===2?!0:(B==null?void 0:B.type)==="spotlight"||(B==null?void 0:B.type)==="metric"||(B==null?void 0:B.type)==="column"&&z<=5?!1:(B==null?void 0:B.type)==="rank"&&z>4||(B==null?void 0:B.type)==="split"&&z>4||(B==null?void 0:B.type)==="donut"&&z>5||(B==null?void 0:B.type)==="structure"&&z>4||(B==null?void 0:B.type)==="bar"&&z>4||(B==null?void 0:B.type)==="line"&&z>6}function re(B){return le(B)?R.value:I.value}function be(B){var Ae;const z=(B==null?void 0:B.properties)||{},ne=Object.keys(z).filter(we=>{const We=z[we];if(We==null||We==="")return!1;const Be=we.toLowerCase();return!(["geom","wkt","geometry","the_geom","shape_leng","shape_length","length","perimeter"].includes(Be)||["gid","id","objectid","object_id","fid","key_uid","bsm","ysdm"].includes(Be))}),ve=!!((Ae=B==null?void 0:B.feature)!=null&&Ae.geometry||B!=null&&B.geometry);return ne.length+(ve?1:0)}function de(ve,Ae){return Ge(this,arguments,function*(B,z,ne=L.value){const we=++b;if(!z||!U(z,ne)){g.value=K(B,z);return}const We=yield die(B,z,ne);C||we!==b||B!==a.value||z!==o.value||((ne==null?void 0:ne.key)||"")===v.value&&(g.value=We)})}function U(B,z=null){return!!(z!=null&&z.key)||P.has(B)}function K(B,z){return{status:"disabled",topicKey:B,layerKey:z,title:"",unit:"",rows:[]}}function te(B){var ne,ve;const z=(ve=(ne=B==null?void 0:B.feature)!=null?ne:B)!=null?ve:null;if(!z){se();return}m.value=z,y.value=!1,B!=null&&B.screen&&(x.value=B.screen)}function ce(B){w.value=B}function se(){var B,z;m.value=null,y.value=!1,x.value=null,(z=(B=i.value)==null?void 0:B.clearSelectedFeature)==null||z.call(B)}function Ne(B){if(!F.value)return;const z=document.querySelector(".fgw-map-feature-info"),ne=B.target;z&&ne instanceof Node&&z.contains(ne)||se()}function Oe(){return A.value?new Promise(B=>{$n.to(".forest-grass-wet .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{A.value=!1,B()}})}):Promise.resolve()}return(B,z)=>{var ne;return ie(),oe("div",Nie,[$e(yg,{ref_key:"mapSceneRef",ref:i,"active-layer":E.value,"map-ranking":g.value,onFeatureLoading:z[0]||(z[0]=ve=>_.value=ve),onFeatureInfo:te,onLayerStatus:ce},null,8,["active-layer","map-ranking"]),G("div",kie,[G("div",Oie,[G("div",Fie,[(ie(!0),oe(it,null,vt(f.value,ve=>(ie(),Ji(tn,{key:he(ve,"left"),class:Vt(["fgw-side-card left-card",{"is-double":le(ve)}]),title:ve.title,width:398,height:re(ve)},{default:Xt(()=>[$e(Si,{panel:ve,compact:""},null,8,["panel"])]),_:2},1032,["class","title","height"]))),128))])]),G("div",Bie,[G("div",zie,[(ie(!0),oe(it,null,vt(d.value,ve=>(ie(),Ji(tn,{key:he(ve,"right"),class:Vt(["fgw-side-card right-card",{"is-double":le(ve)}]),title:ve.title,width:398,height:re(ve)},{default:Xt(()=>[$e(Si,{panel:ve,compact:""},null,8,["panel"])]),_:2},1032,["class","title","height"]))),128))])]),G("div",Uie,[$e(OU,{modelValue:o.value,"onUpdate:modelValue":z[1]||(z[1]=ve=>o.value=ve),"selected-legend-key":v.value,"onUpdate:selectedLegendKey":z[2]||(z[2]=ve=>v.value=ve),"topic-key":a.value,legends:((ne=E.value)==null?void 0:ne.legends)||[],width:248,height:430},null,8,["modelValue","selected-legend-key","topic-key","legends"])]),F.value?(ie(),oe("div",{key:0,class:"fgw-map-feature-info",style:un(V.value)},[$e(FU,{feature:m.value,empty:y.value,loading:_.value,width:460,height:O.value},null,8,["feature","empty","loading","height"])],4)):Tt("",!0),G("div",Vie,[$e(OC,{modelValue:a.value,"onUpdate:modelValue":z[3]||(z[3]=ve=>a.value=ve)},null,8,["modelValue"])])]),A.value?(ie(),oe("div",Gie,[z[5]||(z[5]=fc('<div class="loading-text"><span style="--index:1;">L</span><span style="--index:2;">O</span><span style="--index:3;">A</span><span style="--index:4;">D</span><span style="--index:5;">I</span><span style="--index:6;">N</span><span style="--index:7;">G</span></div>',1)),G("div",Hie,[G("span",Wie,Te(S.value),1),z[4]||(z[4]=G("span",{class:"unit"},"%",-1))])])):Tt("",!0)])}}},wl=(r,e)=>r.reduce((t,n)=>t+Number(n[e]||0),0),cr=(r,e=2)=>Number(Number(r||0).toFixed(e)),Qa={kpi:{projectCount:22,featureCount:29280,subjectFeatureCount:1478,controlPointCount:27802,areaWanMu:175.3693,lengthKm:1250.62,townshipCount:10},categories:[{name:"草地修复",subjectFeatureCount:1067,areaWanMu:168.0339,lengthKm:1238.18,projectCount:13},{name:"林地修复",subjectFeatureCount:244,areaWanMu:7.3354,lengthKm:0,projectCount:6},{name:"湿地修复",subjectFeatureCount:167,areaWanMu:0,lengthKm:12.44,projectCount:3}],measures:[{name:"草原改良",subjectFeatureCount:285,areaWanMu:84.2792,lengthKm:467.5,projectCount:8},{name:"人工种草",subjectFeatureCount:532,areaWanMu:29.1561,lengthKm:0,projectCount:13},{name:"封育治理",subjectFeatureCount:45,areaWanMu:21.2487,lengthKm:0,projectCount:1},{name:"围栏建设",subjectFeatureCount:223,areaWanMu:19.4235,lengthKm:660.88,projectCount:9},{name:"林草碳汇试点",subjectFeatureCount:11,areaWanMu:12.5759,lengthKm:0,projectCount:1},{name:"水源涵养",subjectFeatureCount:82,areaWanMu:5.6993,lengthKm:0,projectCount:1},{name:"人工种草/补播",subjectFeatureCount:46,areaWanMu:2.8162,lengthKm:0,projectCount:4},{name:"防风固沙林",subjectFeatureCount:6,areaWanMu:.1303,lengthKm:0,projectCount:1},{name:"草种繁育",subjectFeatureCount:4,areaWanMu:.04,lengthKm:0,projectCount:1},{name:"种草围栏",subjectFeatureCount:77,areaWanMu:0,lengthKm:109.81,projectCount:1},{name:"小型坝",subjectFeatureCount:8,areaWanMu:0,lengthKm:8.83,projectCount:1},{name:"微型坝",subjectFeatureCount:159,areaWanMu:0,lengthKm:3.61,projectCount:2}],years:[{name:2017,areaWanMu:.1412,lengthKm:0,projectCount:1},{name:2018,areaWanMu:.5608,lengthKm:0,projectCount:1},{name:2019,areaWanMu:12.513,lengthKm:0,projectCount:1},{name:2020,areaWanMu:35.9848,lengthKm:0,projectCount:2},{name:2021,areaWanMu:25.0755,lengthKm:467.5,projectCount:5},{name:2022,areaWanMu:72.024,lengthKm:656.05,projectCount:8},{name:2023,areaWanMu:29.07,lengthKm:114.64,projectCount:3},{name:"未知",areaWanMu:0,lengthKm:12.44,projectCount:2}],townships:[{name:"麦洼乡",areaWanMu:28.5019,lengthKm:84.28,projectCount:3},{name:"龙日镇",areaWanMu:15,lengthKm:26.05,projectCount:1},{name:"安曲镇",areaWanMu:13.1168,lengthKm:0,projectCount:2},{name:"瓦切镇",areaWanMu:6.6824,lengthKm:214.41,projectCount:4},{name:"色地镇",areaWanMu:6.344,lengthKm:101.25,projectCount:3},{name:"刷经寺镇",areaWanMu:5.6528,lengthKm:126.26,projectCount:1},{name:"邛溪镇",areaWanMu:2.3127,lengthKm:101.39,projectCount:4},{name:"阿木乡",areaWanMu:1.34,lengthKm:59.5,projectCount:2},{name:"龙日乡",areaWanMu:.8472,lengthKm:20,projectCount:1},{name:"查尔玛乡",areaWanMu:.7001,lengthKm:37.56,projectCount:1}],projects:[{projectName:"阿坝州红原县2020年退牧还草工程项目",projectCategory:"草地修复",year:2020,areaWanMu:35.6232,lengthKm:0,measureTypes:["人工种草","围栏建设"],townships:[],subjectFeatureCount:73},{projectName:"四川省阿坝州若尔盖草原湿地水源涵养生态保护和修复项目(红原县部分)-2022年",projectCategory:"草地修复",year:2022,areaWanMu:21.5,lengthKm:172.31,measureTypes:["人工种草","围栏建设","种草围栏","草原改良"],townships:["刷经寺镇","龙日乡","龙日镇"],subjectFeatureCount:273},{projectName:"阿坝州红原县 2022 年第二批重点生态保护和修护治理项目-草原封育治理-700",projectCategory:"草地修复",year:2022,areaWanMu:21.2487,lengthKm:272.25,measureTypes:["围栏建设","封育治理"],townships:["瓦切镇","色地镇","邛溪镇"],subjectFeatureCount:90},{projectName:"四川省阿坝州 2023 年中央财政林业草原改革发展资金预算(第三批)——红原县草原生态修复项目",projectCategory:"草地修复",year:2023,areaWanMu:18.79,lengthKm:32.32,measureTypes:["人工种草","围栏建设","草原改良","草种繁育"],townships:["瓦切镇","麦洼乡"],subjectFeatureCount:102},{projectName:"阿坝州红原县2022年第二批重点生态保护和修护治理——红原县林草碳汇创新开发建设试点项目",projectCategory:"草地修复",year:2022,areaWanMu:12.5759,lengthKm:0,measureTypes:["林草碳汇试点"],townships:["安曲镇"],subjectFeatureCount:11},{projectName:"四川省红原县2019年草原生态修复治理项目退化草地治理和天然草原改良",projectCategory:"草地修复",year:2019,areaWanMu:12.513,lengthKm:0,measureTypes:["人工种草/补播","草原改良"],townships:[],subjectFeatureCount:25},{projectName:"阿坝州红原县2021年若尔盖—甘南草原湿地生态保护和修复项目-1880",projectCategory:"草地修复",year:2021,areaWanMu:11.0031,lengthKm:467.5,measureTypes:["人工种草","草原改良"],townships:[],subjectFeatureCount:229},{projectName:"2023 年度四川省阿坝州若尔盖草原湿地水源涵养生态保护和修复项目(红原县部分)-1315",projectCategory:"草地修复",year:2023,areaWanMu:10.28,lengthKm:82.32,measureTypes:["人工种草","围栏建设","草原改良"],townships:["查尔玛乡","麦洼乡"],subjectFeatureCount:50},{projectName:"阿坝州红原县 2022 年中央财政林业草原生态保护恢复(第二批)——草原生态修复治理补助项目-1972",projectCategory:"草地修复",year:2022,areaWanMu:8.2,lengthKm:113.37,measureTypes:["围栏建设","草原改良","人工种草"],townships:["色地镇","邛溪镇","阿木乡"],subjectFeatureCount:127},{projectName:"阿坝州红原县2021年省级草原生态保护恢复项目-1790",projectCategory:"草地修复",year:2021,areaWanMu:7,lengthKm:0,measureTypes:["人工种草","草原改良"],townships:[],subjectFeatureCount:16},{projectName:"阿坝州红原县 2021 年中央财政林业草原生态保护恢复项目-984",projectCategory:"草地修复",year:2021,areaWanMu:6.5,lengthKm:0,measureTypes:["草原改良","人工种草"],townships:[],subjectFeatureCount:14},{projectName:"红原县2022年度黄河上游水源涵养补给区综合治理项目实施方案(代作业设计)变更后最终版",projectCategory:"林地修复",year:2022,areaWanMu:5.6993,lengthKm:0,measureTypes:["水源涵养"],townships:["安曲镇","瓦切镇"],subjectFeatureCount:82},{projectName:"阿坝州红原县 2022 年第二批重点生态保护和修护治理——草原生态修复治理项目-1500",projectCategory:"草地修复",year:2022,areaWanMu:2,lengthKm:81.05,measureTypes:["人工种草","围栏建设"],townships:["瓦切镇","色地镇","麦洼乡"],subjectFeatureCount:53},{projectName:"阿坝州红原县 2022 年省级林业草原生态保护恢复——草原生态修复治理补助项目-888",projectCategory:"草地修复",year:2022,areaWanMu:.8,lengthKm:17.07,measureTypes:["人工种草","围栏建设"],townships:["阿木乡"],subjectFeatureCount:4},{projectName:"红原县2018年川西高原生态脆弱区综合治理项目",projectCategory:"林地修复",year:2018,areaWanMu:.5608,lengthKm:0,measureTypes:["人工种草","人工种草/补播"],townships:[],subjectFeatureCount:107},{projectName:"红原县2021年黄河上游水源涵养补给区生态综合治理项目",projectCategory:"林地修复",year:2021,areaWanMu:.5224,lengthKm:0,measureTypes:["人工种草/补播"],townships:["邛溪镇"],subjectFeatureCount:14},{projectName:"红原县2020年川西高原生态脆弱区综合治理项目",projectCategory:"林地修复",year:2020,areaWanMu:.3617,lengthKm:0,measureTypes:["人工种草","人工种草/补播"],townships:[],subjectFeatureCount:31},{projectName:"2017年川西高原生态脆弱区综合治理项目",projectCategory:"林地修复",year:2017,areaWanMu:.1412,lengthKm:0,measureTypes:["人工种草","防风固沙林"],townships:["邛溪镇"],subjectFeatureCount:8},{projectName:"红原县2021年人工造林封山育林项目",projectCategory:"林地修复",year:2021,areaWanMu:.05,lengthKm:0,measureTypes:["围栏建设"],townships:[],subjectFeatureCount:2},{projectName:"4980小型坝(1)(1)",projectCategory:"湿地修复",year:"未知",areaWanMu:0,lengthKm:8.83,measureTypes:["小型坝"],townships:[],subjectFeatureCount:8},{projectName:"红原县蓄水保湿工程-小型坝和微型坝(1)(1)",projectCategory:"湿地修复",year:2023,areaWanMu:0,lengthKm:3.61,measureTypes:["微型坝"],townships:[],subjectFeatureCount:59},{projectName:"4980微型坝成型(1)(1)",projectCategory:"湿地修复",year:2022,areaWanMu:0,lengthKm:0,measureTypes:["微型坝"],townships:[],subjectFeatureCount:100}]},Xie=[{key:"national-park",label:"若尔盖国家公园",bottomLabel:"若尔盖国家公园"},{key:"restoration",label:"生态修复工程",bottomLabel:"生态修复工程"}],Yi=[{name:"麦洼乡",grasslandAreaWanMu:31.41,wetlandAreaWanMu:11.16,ecologyJobs:179,yakCount:61720,livestockCount:63507,cover:85,villages:"洞拉村、滚塘村、让里村、茸塔玛村"},{name:"瓦切镇",grasslandAreaWanMu:31.42,wetlandAreaWanMu:11.15,ecologyJobs:160,yakCount:33887,livestockCount:34589,cover:85,villages:"唐日村、德香村、日干村"},{name:"色地镇",grasslandAreaWanMu:31.42,wetlandAreaWanMu:11.16,ecologyJobs:39,yakCount:9572,livestockCount:9843,cover:86,villages:"色永村"}],Ci={name:"若尔盖国家公园红原区域",totalAreaWanMu:1250.51,grasslandAreaWanMu:94.25,wetlandAreaWanMu:33.47,woodlandAreaWanMu:null,woodlandDataStatus:"待接入",vegetationCoverage:cr(wl(Yi,"cover")/Yi.length,1),townCount:Yi.length,villageCount:Yi.reduce((r,e)=>r+String(e.villages||"").split("、").filter(Boolean).length,0),householdCount:3023,ecologyJobCount:wl(Yi,"ecologyJobs"),yakCount:wl(Yi,"yakCount"),livestockCount:wl(Yi,"livestockCount")};Ci.otherProtectedAreaWanMu=cr(Ci.totalAreaWanMu-Ci.grasslandAreaWanMu-Ci.wetlandAreaWanMu,2);Yi.map(r=>({key:r.name,name:r.name,value:cr(r.grasslandAreaWanMu+r.wetlandAreaWanMu,2),unit:"万亩",extra:`草地 ${r.grasslandAreaWanMu} / 湿地 ${r.wetlandAreaWanMu}`}));Yi.map(r=>({key:`${r.name}-town`,name:r.name,value:cr(r.grasslandAreaWanMu+r.wetlandAreaWanMu,2),unit:"万亩",extra:r.villages}));const Yie=[{key:"core-protection",name:"核心保护区",value:629.76,unit:"万亩"},{key:"general-control",name:"一般控制区",value:620.75,unit:"万亩"}],qie=43.66,jie=cr(qie*(192.26/297.29),2),Kie={麦洼乡:[{name:"洞拉村",grassland:.29,wetland:.34,household:.3,yak:.32,edible:.31,woodland:.3},{name:"滚塘村",grassland:.26,wetland:.27,household:.25,yak:.25,edible:.26,woodland:.25},{name:"让里村",grassland:.24,wetland:.21,household:.24,yak:.23,edible:.23,woodland:.24},{name:"茸塔玛村",grassland:.21,wetland:.18,household:.21,yak:.2,edible:.2,woodland:.21}],瓦切镇:[{name:"唐日村",grassland:.38,wetland:.42,household:.36,yak:.4,edible:.39,woodland:.38},{name:"德香村",grassland:.32,wetland:.32,household:.33,yak:.32,edible:.32,woodland:.32},{name:"日干村",grassland:.3,wetland:.26,household:.31,yak:.28,edible:.29,woodland:.3}],色地镇:[{name:"色永村",grassland:1,wetland:1,household:1,yak:1,edible:1,woodland:1}]},Zie=wl(Yi,"livestockCount")||wl(Yi,"yakCount")||1,q0=Yi.map(r=>Xe(Re({},r),{householdCount:Math.round(Ci.householdCount*Number(r.livestockCount||r.yakCount||0)/Zie),edibleGrasslandWanTon:cr(Number(r.grasslandAreaWanMu||0)/Math.max(Ci.grasslandAreaWanMu,1)*jie,2)})),BD=Ci.householdCount-wl(q0,"householdCount");BD&&q0[0]&&(q0[0].householdCount+=BD);const FC=(r,e=wl(r,"value"))=>r.map(t=>Xe(Re({},t),{extra:t.extra||`占比 ${cr(Number(t.value||0)/Math.max(e,1)*100,1)}%`})),Qie=FC([{key:"park-scope-grassland",name:"草地",value:Ci.grasslandAreaWanMu,unit:"万亩"},{key:"park-scope-wetland",name:"湿地",value:Ci.wetlandAreaWanMu,unit:"万亩"},{key:"park-scope-other",name:"其他保护范围",value:Ci.otherProtectedAreaWanMu,unit:"万亩"}]),fd=({sourceKey:r,weightKey:e,unit:t="万亩",decimals:n=2})=>{const i=q0.flatMap(a=>(Kie[a.name]||[]).map(s=>({key:`${a.name}-${s.name}-${r}`,name:s.name,town:a.name,value:cr(Number(a[r]||0)*Number(s[e]||0),n),unit:t}))).filter(a=>Number(a.value)>0).sort((a,o)=>Number(o.value||0)-Number(a.value||0));return FC(i)},Jie=fd({sourceKey:"wetlandAreaWanMu",weightKey:"wetland"}),eae=fd({sourceKey:"grasslandAreaWanMu",weightKey:"grassland"}),tae=fd({sourceKey:"householdCount",weightKey:"household",unit:"户",decimals:0}),nae=fd({sourceKey:"yakCount",weightKey:"yak",unit:"头",decimals:0}),rae=fd({sourceKey:"edibleGrasslandWanTon",weightKey:"edible",unit:"万吨"}),iae=fd({sourceKey:"wetlandAreaWanMu",weightKey:"woodland"}),aae=[{zh:"国家公园面积",value:Ci.totalAreaWanMu,unit:"万亩",decimals:2},{zh:"草地面积",value:Ci.grasslandAreaWanMu,unit:"万亩",decimals:2},{zh:"湿地面积",value:Ci.wetlandAreaWanMu,unit:"万亩",decimals:2},{zh:"牦牛数量",value:Ci.yakCount,unit:"头",decimals:0}],oae=[{zh:"修复项目",value:Qa.kpi.projectCount,unit:"个",decimals:0},{zh:"治理面积",value:Qa.kpi.areaWanMu,unit:"万亩",decimals:2},{zh:"工程长度",value:Qa.kpi.lengthKm,unit:"公里",decimals:2},{zh:"涉及乡镇",value:Qa.kpi.townshipCount,unit:"个",decimals:0}];function sae(r){return(r==="restoration"?oae:aae).map((t,n)=>Re({icon:n%2===0?"xiaoshoujine":"zongxiaoliang",en:""},t))}const lae={left:[{key:"park-resource-scope",title:"显示范围资源占比",type:"donut",rows:Qie},{key:"park-wetland-village",title:"湿地分布村级排行",type:"line",rows:Jie.slice(0,8)},{key:"park-woodland-village",title:"林地分布村级排行",type:"heat",rows:iae.slice(0,8)},{key:"park-grassland-village",title:"草地分布村级排行",type:"peak",rows:eae.slice(0,5)}],right:[{key:"park-household-village",title:"牧户分布村级排行",type:"column",variant:"pin",rows:tae.slice(0,8)},{key:"park-yak-village",title:"牦牛分布村级排行",type:"column",variant:"pin",rows:nae.slice(0,8)},{key:"park-edible-grass-village",title:"可食草地资源分布",type:"column",variant:"slim",rows:rae.slice(0,8)},{key:"park-zoning-ledger",title:"核心区和一般区分区面积",type:"structure",rows:FC(Yie)}]},BU=(Qa.townships||[]).filter(r=>/[乡镇]$/.test(String(r.name||""))).slice(0,8),uae=(Qa.projects||[]).map((r,e)=>{const t=Number(r.areaWanMu)>0,n=Number(r.lengthKm)>0,i=t?{value:cr(r.areaWanMu,2),unit:"万亩",metric:"治理面积"}:n?{value:cr(r.lengthKm,2),unit:"公里",metric:"工程长度"}:{value:r.subjectFeatureCount||0,unit:"个",metric:"主体要素"},a=(r.measureTypes||[]).join("、"),o=(r.townships||[]).join("、");return{key:r.id||r.projectName,index:e+1,name:r.projectName,projectName:r.projectName,category:r.projectCategory,year:r.year||"未知",areaWanMu:cr(r.areaWanMu,4),lengthKm:cr(r.lengthKm,2),measure:a,townships:o,subjectFeatureCount:r.subjectFeatureCount||0,value:i.value,unit:i.unit,metric:i.metric,extra:[r.year||"未知",a].filter(Boolean).join(" / "),searchText:[r.projectName,r.projectCategory,r.year,a,o].filter(Boolean).join(" ")}}),cae={left:[{key:"restoration-year-area",title:"治理面积分布",type:"line",rows:(Qa.years||[]).map(r=>({key:r.name,name:`${r.name}`,value:cr(r.areaWanMu,2),unit:"万亩",extra:`${r.projectCount||0}个项目`}))},{key:"restoration-town-area",title:"乡镇治理面积分布",type:"line",rows:BU.map(r=>({key:r.name,name:r.name,value:cr(r.areaWanMu,2),unit:"万亩",extra:`${cr(r.lengthKm,2)}公里`}))},{key:"restoration-category",title:"修复类型占比",type:"donut",rows:(Qa.categories||[]).map(r=>({key:r.name,name:r.name,value:cr(r.areaWanMu||r.lengthKm||r.subjectFeatureCount,2),unit:r.areaWanMu?"万亩":r.lengthKm?"公里":"个",extra:`${r.subjectFeatureCount}个图斑`}))},{key:"restoration-year-length",title:"年度工程长度",type:"column",variant:"slim",rows:(Qa.years||[]).filter(r=>Number(r.lengthKm)>0).map(r=>({key:r.name,name:`${r.name}`,value:cr(r.lengthKm,2),unit:"公里",extra:`${r.projectCount||0}个项目`}))}],right:[{key:"restoration-measure-area",title:"修复措施统计",type:"structure",rows:(Qa.measures||[]).slice(0,8).map(r=>({key:r.name,name:r.name,value:cr(r.areaWanMu||r.lengthKm||r.subjectFeatureCount,2),unit:r.areaWanMu?"万亩":r.lengthKm?"公里":"个",extra:`${r.projectCount}个项目`}))},{key:"restoration-year-project",title:"年度项目数量",type:"column",variant:"slim",rows:(Qa.years||[]).map(r=>({key:r.name,name:`${r.name}`,value:r.projectCount,unit:"个",extra:`${cr(r.areaWanMu,2)}万亩`}))},{key:"restoration-projects",title:"重点项目库",type:"projectTable",span:2,rows:uae}]};function hae(r){return r==="restoration"?{status:"success",title:"乡镇治理排行",metricLabel:"治理面积",unit:"万亩",rows:BU.map(e=>({name:e.name,value:cr(e.areaWanMu,2),unit:"万亩"}))}:{status:"success",title:"国家公园牦牛分布",metricLabel:"牦牛数量",unit:"头",rows:Yi.map(e=>({name:e.name,value:e.yakCount,unit:"头"}))}}const fae={class:"forest-grass-wet ecological-protection"},dae={class:"forest-grass-wet-ui ecological-protection-ui"},pae={class:"fgw-left"},vae={class:"fgw-side-stack is-left"},gae={class:"fgw-right"},mae={class:"fgw-side-stack is-right"},yae={class:"fgw-map-layer-tools"},_ae={class:"fgw-bottom-topic ecological-bottom-topic"},xae={key:0,class:"loading"},Sae={class:"loading-progress"},Aae={class:"value"},zD=190,wae=12,bae={__name:"index",props:{activeView:{type:String,default:"national-park"},showLoading:{type:Boolean,default:!0}},emits:["module-stats","view-change"],setup(r,{emit:e}){const t=r,n=e,i=tt(null),a=tt(""),o=tt(""),s=tt(null),l=tt(!1),u=tt(!1),c=tt(null),h=tt(0),f=tt(t.showLoading),d=tt(null),p=tt({type:"idle",text:"等待生态保护图层加载"});let g=null,v=!1;const m=Se(()=>t.activeView==="restoration"?"restoration":"national-park"),y=Se(()=>mg(m.value,a.value)),_=Se(()=>{var ee;return(((ee=y.value)==null?void 0:ee.legends)||[]).find(he=>he.key===o.value)||null}),x=Se(()=>{const ee=y.value;return!ee||!_.value?ee:Xe(Re({},ee),{cqlFilter:_.value.cqlFilter||ee.cqlFilter,activeLegend:_.value,name:_.value.name||ee.name})}),S=Se(()=>m.value==="restoration"?cae:lae),A=Se(()=>S.value.left||[]),w=Se(()=>S.value.right||[]),M=zD*2+wae,C=Se(()=>!!c.value),b=Se(()=>{if(u.value||l.value||!s.value)return 186;const ee=F(s.value);return Math.min(480,Math.max(300,86+Math.min(ee,12)*34))}),T=Se(()=>{if(!c.value)return{};const ee=460,he=b.value,le=24,re=E(c.value),be=re.x>1420?-ee-28:28,de=Math.min(Math.max(re.x+be,le),1920-ee-le),U=Math.min(Math.max(re.y-he-72,188),1080-he-132);return{left:`${de}px`,top:`${U}px`,right:"auto",bottom:"auto"}});Ko(()=>{document.addEventListener("pointerdown",W,!0),L(),P(m.value)}),uo(()=>{v=!0,document.removeEventListener("pointerdown",W,!0)}),ni(m,ee=>{P(ee)}),ni(a,()=>{o.value="",Q()}),ni(o,()=>{Q()});function P(ee){var re;const he=qy.find(be=>be.key===ee)||qy[0],le=s1(ee);o.value="",a.value=he.defaultLayerKey||((re=le[0])==null?void 0:re.key)||"",d.value=hae(ee),Q(),n("module-stats",{moduleKey:"ecological-protection",viewKey:ee,items:sae(ee)})}function D(ee){n("view-change",ee==="restoration"?"restoration":"national-park")}function L(){var re;g=new _g;let ee=!1;const he={progress:0};g.instance.on("onProgress",(be,de,U)=>{const K=Math.floor(de/U*100);$n.to(he,{progress:K,onUpdate:()=>{h.value=Math.floor(he.progress)}})});const le=()=>Ge(this,null,function*(){var be,de;v||ee||(ee=!0,(be=i.value)==null||be.loadMap(g),yield Z(),yield no(),(de=i.value)==null||de.play())});g.instance.on("onLoad",le),(re=g.ready)==null||re.then(le).catch(()=>{v||(p.value={type:"error",text:"地图资源加载失败"})})}function E(ee){const he=document.querySelector(".ecological-protection"),le=he==null?void 0:he.getBoundingClientRect();return!(le!=null&&le.width)||!(le!=null&&le.height)?ee:{x:(ee.x-le.left)/le.width*1920,y:(ee.y-le.top)/le.height*1080}}function I(ee,he){return`${m.value}-${he}-${(ee==null?void 0:ee.key)||(ee==null?void 0:ee.title)||"panel"}`}function N(ee){return(ee==null?void 0:ee.span)===2}function R(ee){return N(ee)?M:zD}function F(ee){const he=(ee==null?void 0:ee.properties)||{};return Object.keys(he).filter(le=>{const re=he[le];return re==null||re===""?!1:!["geom","wkt","geometry","the_geom","raw_properties"].includes(String(le).toLowerCase())}).length}function O(ee){var le,re;const he=(re=(le=ee==null?void 0:ee.feature)!=null?le:ee)!=null?re:null;if(!he){Q();return}s.value=he,l.value=!1,ee!=null&&ee.screen&&(c.value=ee.screen)}function V(ee){p.value=ee}function H(ee,he){var re,be;if(m.value!=="restoration"||(ee==null?void 0:ee.key)!=="restoration-projects")return;const le=(he==null?void 0:he.projectName)||(he==null?void 0:he.name);le&&(Q(),(be=(re=i.value)==null?void 0:re.focusProject)==null||be.call(re,le))}function Q(){var ee,he;s.value=null,l.value=!1,c.value=null,(he=(ee=i.value)==null?void 0:ee.clearSelectedFeature)==null||he.call(ee)}function W(ee){if(!C.value)return;const he=document.querySelector(".fgw-map-feature-info"),le=ee.target;he&&le instanceof Node&&he.contains(le)||Q()}function Z(){return f.value?new Promise(ee=>{$n.to(".ecological-protection .loading",{opacity:0,duration:.8,delay:.2,onComplete:()=>{f.value=!1,ee()}})}):Promise.resolve()}return(ee,he)=>{var le;return ie(),oe("div",fae,[$e(yg,{ref_key:"mapSceneRef",ref:i,"active-layer":x.value,"map-ranking":d.value,onFeatureLoading:he[0]||(he[0]=re=>u.value=re),onFeatureInfo:O,onLayerStatus:V},null,8,["active-layer","map-ranking"]),G("div",dae,[G("div",pae,[G("div",vae,[(ie(!0),oe(it,null,vt(A.value,re=>(ie(),Ji(tn,{key:I(re,"left"),class:Vt(["fgw-side-card left-card",{"is-double":N(re)}]),title:re.title,width:398,height:R(re)},{default:Xt(()=>[$e(Si,{panel:re,compact:"",onRowSelect:be=>H(re,be)},null,8,["panel","onRowSelect"])]),_:2},1032,["class","title","height"]))),128))])]),G("div",gae,[G("div",mae,[(ie(!0),oe(it,null,vt(w.value,re=>(ie(),Ji(tn,{key:I(re,"right"),class:Vt(["fgw-side-card right-card",{"is-double":N(re)}]),title:re.title,width:398,height:R(re)},{default:Xt(()=>[$e(Si,{panel:re,compact:"",onRowSelect:be=>H(re,be)},null,8,["panel","onRowSelect"])]),_:2},1032,["class","title","height"]))),128))])]),G("div",yae,[$e(OU,{modelValue:a.value,"onUpdate:modelValue":he[1]||(he[1]=re=>a.value=re),"selected-legend-key":o.value,"onUpdate:selectedLegendKey":he[2]||(he[2]=re=>o.value=re),"topic-key":m.value,legends:((le=x.value)==null?void 0:le.legends)||[],width:248,height:430},null,8,["modelValue","selected-legend-key","topic-key","legends"])]),C.value?(ie(),oe("div",{key:0,class:"fgw-map-feature-info",style:un(T.value)},[$e(FU,{feature:s.value,empty:l.value,loading:u.value,width:460,height:b.value},null,8,["feature","empty","loading","height"])],4)):Tt("",!0),G("div",_ae,[$e(OC,{"model-value":m.value,topics:_n(qy),"onUpdate:modelValue":D},null,8,["model-value","topics"])])]),f.value?(ie(),oe("div",xae,[he[4]||(he[4]=fc('<div class="loading-text"><span style="--index:1;">L</span><span style="--index:2;">O</span><span style="--index:3;">A</span><span style="--index:4;">D</span><span style="--index:5;">I</span><span style="--index:6;">N</span><span style="--index:7;">G</span></div>',1)),G("div",Sae,[G("span",Aae,Te(h.value),1),he[3]||(he[3]=G("span",{class:"unit"},"%",-1))])])):Tt("",!0)])}}};/*! ***************************************************************************** |
|
Copyright (c) Microsoft Corporation. |
|
|
|
Permission to use, copy, modify, and/or distribute this software for any |
|
purpose with or without fee is hereby granted. |
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH |
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY |
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, |
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM |
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR |
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR |
|
PERFORMANCE OF THIS SOFTWARE. |
|
***************************************************************************** */var Wb=function(r,e){return Wb=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])},Wb(r,e)};function ae(r,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");Wb(r,e);function t(){this.constructor=r}r.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}var Tae=function(){function r(){this.firefox=!1,this.ie=!1,this.edge=!1,this.newEdge=!1,this.weChat=!1}return r}(),Mae=function(){function r(){this.browser=new Tae,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!="undefined"}return r}(),ol=new Mae;typeof wx=="object"&&typeof wx.getSystemInfoSync=="function"?(ol.wxa=!0,ol.touchEventsSupported=!0):typeof document=="undefined"&&typeof self!="undefined"?ol.worker=!0:!ol.hasGlobalWindow||"Deno"in window?(ol.node=!0,ol.svgSupported=!0):Cae(navigator.userAgent,ol);function Cae(r,e){var t=e.browser,n=r.match(/Firefox\/([\d.]+)/),i=r.match(/MSIE\s([\d.]+)/)||r.match(/Trident\/.+?rv:(([\d.]+))/),a=r.match(/Edge?\/([\d.]+)/),o=/micromessenger/i.test(r);n&&(t.firefox=!0,t.version=n[1]),i&&(t.ie=!0,t.version=i[1]),a&&(t.edge=!0,t.version=a[1],t.newEdge=+a[1].split(".")[0]>18),o&&(t.weChat=!0),e.svgSupported=typeof SVGRect!="undefined",e.touchEventsSupported="ontouchstart"in window&&!t.ie&&!t.edge,e.pointerEventsSupported="onpointerdown"in window&&(t.edge||t.ie&&+t.version>=11),e.domSupported=typeof document!="undefined";var s=document.documentElement.style;e.transform3dSupported=(t.ie&&"transition"in s||t.edge||"WebKitCSSMatrix"in window&&"m11"in new WebKitCSSMatrix||"MozPerspective"in s)&&!("OTransition"in s),e.transformSupported=e.transform3dSupported||t.ie&&+t.version>=9}const kt=ol;var BC=12,zU="sans-serif",Yl=BC+"px "+zU,Eae=20,Lae=100,Pae="007LLmW'55;N0500LLLLLLLLLL00NNNLzWW\\\\WQb\\0FWLg\\bWb\\WQ\\WrWWQ000CL5LLFLL0LL**F*gLLLL5F0LF\\FFF5.5N";function Rae(r){var e={};if(typeof JSON=="undefined")return e;for(var t=0;t<r.length;t++){var n=String.fromCharCode(t+32),i=(r.charCodeAt(t)-Eae)/Lae;e[n]=i}return e}var Dae=Rae(Pae),ql={createCanvas:function(){return typeof document!="undefined"&&document.createElement("canvas")},measureText:function(){var r,e;return function(t,n){if(!r){var i=ql.createCanvas();r=i&&i.getContext("2d")}if(r)return e!==n&&(e=r.font=n||Yl),r.measureText(t);t=t||"",n=n||Yl;var a=/((?:\d+)?\.?\d*)px/.exec(n),o=a&&+a[1]||BC,s=0;if(n.indexOf("mono")>=0)s=o*t.length;else for(var l=0;l<t.length;l++){var u=Dae[t[l]];s+=u==null?o:u*o}return{width:s}}}(),loadImage:function(r,e,t){var n=new Image;return n.onload=e,n.onerror=t,n.src=r,n}},UU=$o(["Function","RegExp","Date","Error","CanvasGradient","CanvasPattern","Image","Canvas"],function(r,e){return r["[object "+e+"]"]=!0,r},{}),VU=$o(["Int8","Uint8","Uint8Clamped","Int16","Uint16","Int32","Uint32","Float32","Float64"],function(r,e){return r["[object "+e+"Array]"]=!0,r},{}),dd=Object.prototype.toString,d1=Array.prototype,Iae=d1.forEach,Nae=d1.filter,zC=d1.slice,kae=d1.map,UD=function(){}.constructor,Fm=UD?UD.prototype:null,UC="__proto__",Oae=2311;function GU(){return Oae++}function VC(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];typeof console!="undefined"&&console.error.apply(console,r)}function Je(r){if(r==null||typeof r!="object")return r;var e=r,t=dd.call(r);if(t==="[object Array]"){if(!Jp(r)){e=[];for(var n=0,i=r.length;n<i;n++)e[n]=Je(r[n])}}else if(VU[t]){if(!Jp(r)){var a=r.constructor;if(a.from)e=a.from(r);else{e=new a(r.length);for(var n=0,i=r.length;n<i;n++)e[n]=r[n]}}}else if(!UU[t]&&!Jp(r)&&!Zf(r)){e={};for(var o in r)r.hasOwnProperty(o)&&o!==UC&&(e[o]=Je(r[o]))}return e}function ht(r,e,t){if(!Qe(e)||!Qe(r))return t?Je(e):r;for(var n in e)if(e.hasOwnProperty(n)&&n!==UC){var i=r[n],a=e[n];Qe(a)&&Qe(i)&&!_e(a)&&!_e(i)&&!Zf(a)&&!Zf(i)&&!VD(a)&&!VD(i)&&!Jp(a)&&!Jp(i)?ht(i,a,t):(t||!(n in r))&&(r[n]=Je(e[n]))}return r}function GC(r,e){for(var t=r[0],n=1,i=r.length;n<i;n++)t=ht(t,r[n],e);return t}function pe(r,e){if(Object.assign)Object.assign(r,e);else for(var t in e)e.hasOwnProperty(t)&&t!==UC&&(r[t]=e[t]);return r}function Ke(r,e,t){for(var n=wt(e),i=0,a=n.length;i<a;i++){var o=n[i];(t?e[o]!=null:r[o]==null)&&(r[o]=e[o])}return r}function pt(r,e){if(r){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t}return-1}function Fae(r,e){var t=r.prototype;function n(){}n.prototype=e.prototype,r.prototype=new n;for(var i in t)t.hasOwnProperty(i)&&(r.prototype[i]=t[i]);r.prototype.constructor=r,r.superClass=e}function ir(r,e,t){if(r="prototype"in r?r.prototype:r,e="prototype"in e?e.prototype:e,Object.getOwnPropertyNames)for(var n=Object.getOwnPropertyNames(e),i=0;i<n.length;i++){var a=n[i];a!=="constructor"&&(t?e[a]!=null:r[a]==null)&&(r[a]=e[a])}else Ke(r,e,t)}function ii(r){return!r||typeof r=="string"?!1:typeof r.length=="number"}function k(r,e,t){if(r&&e)if(r.forEach&&r.forEach===Iae)r.forEach(e,t);else if(r.length===+r.length)for(var n=0,i=r.length;n<i;n++)e.call(t,r[n],n,r);else for(var a in r)r.hasOwnProperty(a)&&e.call(t,r[a],a,r)}function xe(r,e,t){if(!r)return[];if(!e)return HC(r);if(r.map&&r.map===kae)return r.map(e,t);for(var n=[],i=0,a=r.length;i<a;i++)n.push(e.call(t,r[i],i,r));return n}function $o(r,e,t,n){if(r&&e){for(var i=0,a=r.length;i<a;i++)t=e.call(n,t,r[i],i,r);return t}}function jt(r,e,t){if(!r)return[];if(!e)return HC(r);if(r.filter&&r.filter===Nae)return r.filter(e,t);for(var n=[],i=0,a=r.length;i<a;i++)e.call(t,r[i],i,r)&&n.push(r[i]);return n}function Bae(r,e,t){if(r&&e){for(var n=0,i=r.length;n<i;n++)if(e.call(t,r[n],n,r))return r[n]}}function wt(r){if(!r)return[];if(Object.keys)return Object.keys(r);var e=[];for(var t in r)r.hasOwnProperty(t)&&e.push(t);return e}function zae(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return function(){return r.apply(e,t.concat(zC.call(arguments)))}}var Fe=Fm&&qe(Fm.bind)?Fm.call.bind(Fm.bind):zae;function ut(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return function(){return r.apply(this,e.concat(zC.call(arguments)))}}function _e(r){return Array.isArray?Array.isArray(r):dd.call(r)==="[object Array]"}function qe(r){return typeof r=="function"}function ke(r){return typeof r=="string"}function $b(r){return dd.call(r)==="[object String]"}function Ft(r){return typeof r=="number"}function Qe(r){var e=typeof r;return e==="function"||!!r&&e==="object"}function VD(r){return!!UU[dd.call(r)]}function Fi(r){return!!VU[dd.call(r)]}function Zf(r){return typeof r=="object"&&typeof r.nodeType=="number"&&typeof r.ownerDocument=="object"}function p1(r){return r.colorStops!=null}function Uae(r){return r.image!=null}function Vae(r){return dd.call(r)==="[object RegExp]"}function Ov(r){return r!==r}function Mr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];for(var t=0,n=r.length;t<n;t++)if(r[t]!=null)return r[t]}function ot(r,e){return r!=null?r:e}function Go(r,e,t){return r!=null?r:e!=null?e:t}function HC(r){for(var e=[],t=1;t<arguments.length;t++)e[t-1]=arguments[t];return zC.apply(r,e)}function WC(r){if(typeof r=="number")return[r,r,r,r];var e=r.length;return e===2?[r[0],r[1],r[0],r[1]]:e===3?[r[0],r[1],r[2],r[1]]:r}function gi(r,e){if(!r)throw new Error(e)}function eo(r){return r==null?null:typeof r.trim=="function"?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}var HU="__ec_primitive__";function j0(r){r[HU]=!0}function Jp(r){return r[HU]}var Gae=function(){function r(){this.data={}}return r.prototype.delete=function(e){var t=this.has(e);return t&&delete this.data[e],t},r.prototype.has=function(e){return this.data.hasOwnProperty(e)},r.prototype.get=function(e){return this.data[e]},r.prototype.set=function(e,t){return this.data[e]=t,this},r.prototype.keys=function(){return wt(this.data)},r.prototype.forEach=function(e){var t=this.data;for(var n in t)t.hasOwnProperty(n)&&e(t[n],n)},r}(),WU=typeof Map=="function";function Hae(){return WU?new Map:new Gae}var Wae=function(){function r(e){var t=_e(e);this.data=Hae();var n=this;e instanceof r?e.each(i):e&&k(e,i);function i(a,o){t?n.set(a,o):n.set(o,a)}}return r.prototype.hasKey=function(e){return this.data.has(e)},r.prototype.get=function(e){return this.data.get(e)},r.prototype.set=function(e,t){return this.data.set(e,t),t},r.prototype.each=function(e,t){this.data.forEach(function(n,i){e.call(t,n,i)})},r.prototype.keys=function(){var e=this.data.keys();return WU?Array.from(e):e},r.prototype.removeKey=function(e){this.data.delete(e)},r}();function He(r){return new Wae(r)}function Fv(r,e){for(var t=new r.constructor(r.length+e.length),n=0;n<r.length;n++)t[n]=r[n];for(var i=r.length,n=0;n<e.length;n++)t[n+i]=e[n];return t}function v1(r,e){var t;if(Object.create)t=Object.create(r);else{var n=function(){};n.prototype=r,t=new n}return e&&pe(t,e),t}function $U(r){var e=r.style;e.webkitUserSelect="none",e.userSelect="none",e.webkitTapHighlightColor="rgba(0,0,0,0)",e["-webkit-touch-callout"]="none"}function ze(r,e){return r.hasOwnProperty(e)}function qn(){}var Zy=180/Math.PI;function qc(r,e){return r==null&&(r=0),e==null&&(e=0),[r,e]}function hi(r,e){return r[0]=e[0],r[1]=e[1],r}function Ss(r){return[r[0],r[1]]}function $ae(r,e,t){return r[0]=e,r[1]=t,r}function GD(r,e,t){return r[0]=e[0]+t[0],r[1]=e[1]+t[1],r}function Xb(r,e,t,n){return r[0]=e[0]+t[0]*n,r[1]=e[1]+t[1]*n,r}function ic(r,e,t){return r[0]=e[0]-t[0],r[1]=e[1]-t[1],r}function Yb(r){return Math.sqrt(Xae(r))}function Xae(r){return r[0]*r[0]+r[1]*r[1]}function Qy(r,e,t){return r[0]=e[0]*t,r[1]=e[1]*t,r}function pd(r,e){var t=Yb(e);return t===0?(r[0]=0,r[1]=0):(r[0]=e[0]/t,r[1]=e[1]/t),r}function qb(r,e){return Math.sqrt((r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1]))}var bl=qb;function Yae(r,e){return(r[0]-e[0])*(r[0]-e[0])+(r[1]-e[1])*(r[1]-e[1])}var bc=Yae;function Jy(r,e,t,n){return r[0]=e[0]+n*(t[0]-e[0]),r[1]=e[1]+n*(t[1]-e[1]),r}function Or(r,e,t){var n=e[0],i=e[1];return r[0]=t[0]*n+t[2]*i+t[4],r[1]=t[1]*n+t[3]*i+t[5],r}function Tl(r,e,t){return r[0]=Math.min(e[0],t[0]),r[1]=Math.min(e[1],t[1]),r}function Ml(r,e,t){return r[0]=Math.max(e[0],t[0]),r[1]=Math.max(e[1],t[1]),r}var Ph=function(){function r(e,t){this.target=e,this.topTarget=t&&t.topTarget}return r}(),qae=function(){function r(e){this.handler=e,e.on("mousedown",this._dragStart,this),e.on("mousemove",this._drag,this),e.on("mouseup",this._dragEnd,this)}return r.prototype._dragStart=function(e){for(var t=e.target;t&&!t.draggable;)t=t.parent||t.__hostTarget;t&&(this._draggingTarget=t,t.dragging=!0,this._x=e.offsetX,this._y=e.offsetY,this.handler.dispatchToElement(new Ph(t,e),"dragstart",e.event))},r.prototype._drag=function(e){var t=this._draggingTarget;if(t){var n=e.offsetX,i=e.offsetY,a=n-this._x,o=i-this._y;this._x=n,this._y=i,t.drift(a,o,e),this.handler.dispatchToElement(new Ph(t,e),"drag",e.event);var s=this.handler.findHover(n,i,t).target,l=this._dropTarget;this._dropTarget=s,t!==s&&(l&&s!==l&&this.handler.dispatchToElement(new Ph(l,e),"dragleave",e.event),s&&s!==l&&this.handler.dispatchToElement(new Ph(s,e),"dragenter",e.event))}},r.prototype._dragEnd=function(e){var t=this._draggingTarget;t&&(t.dragging=!1),this.handler.dispatchToElement(new Ph(t,e),"dragend",e.event),this._dropTarget&&this.handler.dispatchToElement(new Ph(this._dropTarget,e),"drop",e.event),this._draggingTarget=null,this._dropTarget=null},r}();const jae=qae;var Kae=function(){function r(e){e&&(this._$eventProcessor=e)}return r.prototype.on=function(e,t,n,i){this._$handlers||(this._$handlers={});var a=this._$handlers;if(typeof t=="function"&&(i=n,n=t,t=null),!n||!e)return this;var o=this._$eventProcessor;t!=null&&o&&o.normalizeQuery&&(t=o.normalizeQuery(t)),a[e]||(a[e]=[]);for(var s=0;s<a[e].length;s++)if(a[e][s].h===n)return this;var l={h:n,query:t,ctx:i||this,callAtLast:n.zrEventfulCallAtLast},u=a[e].length-1,c=a[e][u];return c&&c.callAtLast?a[e].splice(u,0,l):a[e].push(l),this},r.prototype.isSilent=function(e){var t=this._$handlers;return!t||!t[e]||!t[e].length},r.prototype.off=function(e,t){var n=this._$handlers;if(!n)return this;if(!e)return this._$handlers={},this;if(t){if(n[e]){for(var i=[],a=0,o=n[e].length;a<o;a++)n[e][a].h!==t&&i.push(n[e][a]);n[e]=i}n[e]&&n[e].length===0&&delete n[e]}else delete n[e];return this},r.prototype.trigger=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=i.length,l=0;l<s;l++){var u=i[l];if(!(a&&a.filter&&u.query!=null&&!a.filter(e,u.query)))switch(o){case 0:u.h.call(u.ctx);break;case 1:u.h.call(u.ctx,t[0]);break;case 2:u.h.call(u.ctx,t[0],t[1]);break;default:u.h.apply(u.ctx,t);break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r.prototype.triggerWithContext=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];if(!this._$handlers)return this;var i=this._$handlers[e],a=this._$eventProcessor;if(i)for(var o=t.length,s=t[o-1],l=i.length,u=0;u<l;u++){var c=i[u];if(!(a&&a.filter&&c.query!=null&&!a.filter(e,c.query)))switch(o){case 0:c.h.call(s);break;case 1:c.h.call(s,t[0]);break;case 2:c.h.call(s,t[0],t[1]);break;default:c.h.apply(s,t.slice(1,o-1));break}}return a&&a.afterTrigger&&a.afterTrigger(e),this},r}();const Ba=Kae;var Zae=Math.log(2);function jb(r,e,t,n,i,a){var o=n+"-"+i,s=r.length;if(a.hasOwnProperty(o))return a[o];if(e===1){var l=Math.round(Math.log((1<<s)-1&~i)/Zae);return r[t][l]}for(var u=n|1<<t,c=t+1;n&1<<c;)c++;for(var h=0,f=0,d=0;f<s;f++){var p=1<<f;p&i||(h+=(d%2?-1:1)*r[t][f]*jb(r,e-1,c,u,i|p,a),d++)}return a[o]=h,h}function HD(r,e){var t=[[r[0],r[1],1,0,0,0,-e[0]*r[0],-e[0]*r[1]],[0,0,0,r[0],r[1],1,-e[1]*r[0],-e[1]*r[1]],[r[2],r[3],1,0,0,0,-e[2]*r[2],-e[2]*r[3]],[0,0,0,r[2],r[3],1,-e[3]*r[2],-e[3]*r[3]],[r[4],r[5],1,0,0,0,-e[4]*r[4],-e[4]*r[5]],[0,0,0,r[4],r[5],1,-e[5]*r[4],-e[5]*r[5]],[r[6],r[7],1,0,0,0,-e[6]*r[6],-e[6]*r[7]],[0,0,0,r[6],r[7],1,-e[7]*r[6],-e[7]*r[7]]],n={},i=jb(t,8,0,0,0,n);if(i!==0){for(var a=[],o=0;o<8;o++)for(var s=0;s<8;s++)a[s]==null&&(a[s]=0),a[s]+=((o+s)%2?-1:1)*jb(t,7,o===0?1:0,1<<o,1<<s,n)/i*e[o];return function(l,u,c){var h=u*a[6]+c*a[7]+1;l[0]=(u*a[0]+c*a[1]+a[2])/h,l[1]=(u*a[3]+c*a[4]+a[5])/h}}}var WD="___zrEVENTSAVED",AS=[];function Qae(r,e,t,n,i){return Kb(AS,e,n,i,!0)&&Kb(r,t,AS[0],AS[1])}function Kb(r,e,t,n,i){if(e.getBoundingClientRect&&kt.domSupported&&!XU(e)){var a=e[WD]||(e[WD]={}),o=Jae(e,a),s=eoe(o,a,i);if(s)return s(r,t,n),!0}return!1}function Jae(r,e){var t=e.markers;if(t)return t;t=e.markers=[];for(var n=["left","right"],i=["top","bottom"],a=0;a<4;a++){var o=document.createElement("div"),s=o.style,l=a%2,u=(a>>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",i[u]+":0",n[1-l]+":auto",i[1-u]+":auto",""].join("!important;"),r.appendChild(o),t.push(o)}return t}function eoe(r,e,t){for(var n=t?"invTrans":"trans",i=e[n],a=e.srcCoords,o=[],s=[],l=!0,u=0;u<4;u++){var c=r[u].getBoundingClientRect(),h=2*u,f=c.left,d=c.top;o.push(f,d),l=l&&a&&f===a[h]&&d===a[h+1],s.push(r[u].offsetLeft,r[u].offsetTop)}return l&&i?i:(e.srcCoords=o,e[n]=t?HD(s,o):HD(o,s))}function XU(r){return r.nodeName.toUpperCase()==="CANVAS"}var toe=/([&<>"'])/g,noe={"&":"&","<":"<",">":">",'"':""","'":"'"};function Jr(r){return r==null?"":(r+"").replace(toe,function(e,t){return noe[t]})}var roe=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,wS=[],ioe=kt.browser.firefox&&+kt.browser.version.split(".")[0]<39;function Zb(r,e,t,n){return t=t||{},n?$D(r,e,t):ioe&&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):$D(r,e,t),t}function $D(r,e,t){if(kt.domSupported&&r.getBoundingClientRect){var n=e.clientX,i=e.clientY;if(XU(r)){var a=r.getBoundingClientRect();t.zrX=n-a.left,t.zrY=i-a.top;return}else if(Kb(wS,r,n,i)){t.zrX=wS[0],t.zrY=wS[1];return}}t.zrX=t.zrY=0}function $C(r){return r||window.event}function ma(r,e,t){if(e=$C(e),e.zrX!=null)return e;var n=e.type,i=n&&n.indexOf("touch")>=0;if(i){var o=n!=="touchend"?e.targetTouches[0]:e.changedTouches[0];o&&Zb(r,o,e,t)}else{Zb(r,e,e,t);var a=aoe(e);e.zrDelta=a?a/120:-(e.detail||0)/3}var s=e.button;return e.which==null&&s!==void 0&&roe.test(e.type)&&(e.which=s&1?1:s&2?3:s&4?2:0),e}function aoe(r){var e=r.wheelDelta;if(e)return e;var t=r.deltaX,n=r.deltaY;if(t==null||n==null)return e;var i=Math.abs(n!==0?n:t),a=n>0?-1:n<0?1:t>0?-1:1;return 3*i*a}function Qb(r,e,t,n){r.addEventListener(e,t,n)}function ooe(r,e,t,n){r.removeEventListener(e,t,n)}var Ps=function(r){r.preventDefault(),r.stopPropagation(),r.cancelBubble=!0};function XD(r){return r.which===2||r.which===3}var soe=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 i=e.touches;if(i){for(var a={points:[],touches:[],target:t,event:e},o=0,s=i.length;o<s;o++){var l=i[o],u=Zb(n,l,{});a.points.push([u.zrX,u.zrY]),a.touches.push(l)}this._track.push(a)}},r.prototype._recognize=function(e){for(var t in bS)if(bS.hasOwnProperty(t)){var n=bS[t](this._track,e);if(n)return n}},r}();function YD(r){var e=r[1][0]-r[0][0],t=r[1][1]-r[0][1];return Math.sqrt(e*e+t*t)}function loe(r){return[(r[0][0]+r[1][0])/2,(r[0][1]+r[1][1])/2]}var bS={pinch:function(r,e){var t=r.length;if(t){var n=(r[t-1]||{}).points,i=(r[t-2]||{}).points||n;if(i&&i.length>1&&n&&n.length>1){var a=YD(n)/YD(i);!isFinite(a)&&(a=1),e.pinchScale=a;var o=loe(n);return e.pinchX=o[0],e.pinchY=o[1],{type:"pinch",target:r[0].target,event:e}}}}};function ta(){return[1,0,0,1,0,0]}function g1(r){return r[0]=1,r[1]=0,r[2]=0,r[3]=1,r[4]=0,r[5]=0,r}function XC(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 As(r,e,t){var n=e[0]*t[0]+e[2]*t[1],i=e[1]*t[0]+e[3]*t[1],a=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]=i,r[2]=a,r[3]=o,r[4]=s,r[5]=l,r}function Xo(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 jc(r,e,t,n){n===void 0&&(n=[0,0]);var i=e[0],a=e[2],o=e[4],s=e[1],l=e[3],u=e[5],c=Math.sin(t),h=Math.cos(t);return r[0]=i*h+s*c,r[1]=-i*c+s*h,r[2]=a*h+l*c,r[3]=-a*c+h*l,r[4]=h*(o-n[0])+c*(u-n[1])+n[0],r[5]=h*(u-n[1])-c*(o-n[0])+n[1],r}function YC(r,e,t){var n=t[0],i=t[1];return r[0]=e[0]*n,r[1]=e[1]*i,r[2]=e[2]*n,r[3]=e[3]*i,r[4]=e[4]*n,r[5]=e[5]*i,r}function vd(r,e){var t=e[0],n=e[2],i=e[4],a=e[1],o=e[3],s=e[5],l=t*o-a*n;return l?(l=1/l,r[0]=o*l,r[1]=-a*l,r[2]=-n*l,r[3]=t*l,r[4]=(n*s-o*i)*l,r[5]=(a*i-t*s)*l,r):null}function uoe(r){var e=ta();return XC(e,r),e}var coe=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,i){e.x=t.x+n.x*i,e.y=t.y+n.y*i},r.lerp=function(e,t,n,i){var a=1-i;e.x=a*t.x+i*n.x,e.y=a*t.y+i*n.y},r}();const ft=coe;var Bm=Math.min,zm=Math.max,yu=new ft,_u=new ft,xu=new ft,Su=new ft,$d=new ft,Xd=new ft,hoe=function(){function r(e,t,n,i){n<0&&(e=e+n,n=-n),i<0&&(t=t+i,i=-i),this.x=e,this.y=t,this.width=n,this.height=i}return r.prototype.union=function(e){var t=Bm(e.x,this.x),n=Bm(e.y,this.y);isFinite(this.x)&&isFinite(this.width)?this.width=zm(e.x+e.width,this.x+this.width)-t:this.width=e.width,isFinite(this.y)&&isFinite(this.height)?this.height=zm(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,i=e.height/t.height,a=ta();return Xo(a,a,[-t.x,-t.y]),YC(a,a,[n,i]),Xo(a,a,[e.x,e.y]),a},r.prototype.intersect=function(e,t){if(!e)return!1;e instanceof r||(e=r.create(e));var n=this,i=n.x,a=n.x+n.width,o=n.y,s=n.y+n.height,l=e.x,u=e.x+e.width,c=e.y,h=e.y+e.height,f=!(a<l||u<i||s<c||h<o);if(t){var d=1/0,p=0,g=Math.abs(a-l),v=Math.abs(u-i),m=Math.abs(s-c),y=Math.abs(h-o),_=Math.min(g,v),x=Math.min(m,y);a<l||u<i?_>p&&(p=_,g<v?ft.set(Xd,-g,0):ft.set(Xd,v,0)):_<d&&(d=_,g<v?ft.set($d,g,0):ft.set($d,-v,0)),s<c||h<o?x>p&&(p=x,m<y?ft.set(Xd,0,-m):ft.set(Xd,0,y)):_<d&&(d=_,m<y?ft.set($d,0,m):ft.set($d,0,-y))}return t&&ft.copy(t,f?$d:Xd),f},r.prototype.contain=function(e,t){var n=this;return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height},r.prototype.clone=function(){return new r(this.x,this.y,this.width,this.height)},r.prototype.copy=function(e){r.copy(this,e)},r.prototype.plain=function(){return{x:this.x,y:this.y,width:this.width,height:this.height}},r.prototype.isFinite=function(){return isFinite(this.x)&&isFinite(this.y)&&isFinite(this.width)&&isFinite(this.height)},r.prototype.isZero=function(){return this.width===0||this.height===0},r.create=function(e){return new r(e.x,e.y,e.width,e.height)},r.copy=function(e,t){e.x=t.x,e.y=t.y,e.width=t.width,e.height=t.height},r.applyTransform=function(e,t,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 i=n[0],a=n[3],o=n[4],s=n[5];e.x=t.x*i+o,e.y=t.y*a+s,e.width=t.width*i,e.height=t.height*a,e.width<0&&(e.x+=e.width,e.width=-e.width),e.height<0&&(e.y+=e.height,e.height=-e.height);return}yu.x=xu.x=t.x,yu.y=Su.y=t.y,_u.x=Su.x=t.x+t.width,_u.y=xu.y=t.y+t.height,yu.transform(n),Su.transform(n),_u.transform(n),xu.transform(n),e.x=Bm(yu.x,_u.x,xu.x,Su.x),e.y=Bm(yu.y,_u.y,xu.y,Su.y);var l=zm(yu.x,_u.x,xu.x,Su.x),u=zm(yu.y,_u.y,xu.y,Su.y);e.width=l-e.x,e.height=u-e.y},r}();const dt=hoe;var YU="silent";function foe(r,e,t){return{type:r,event:t,target:e.target,topTarget:e.topTarget,cancelBubble:!1,offsetX:t.zrX,offsetY:t.zrY,gestureEvent:t.gestureEvent,pinchX:t.pinchX,pinchY:t.pinchY,pinchScale:t.pinchScale,wheelDelta:t.zrDelta,zrByTouch:t.zrByTouch,which:t.which,stop:doe}}function doe(){Ps(this.event)}var poe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.handler=null,t}return e.prototype.dispose=function(){},e.prototype.setCursor=function(){},e}(Ba),Yd=function(){function r(e,t){this.x=e,this.y=t}return r}(),voe=["click","dblclick","mousewheel","mouseout","mouseup","mousedown","mousemove","contextmenu"],TS=new dt(0,0,0,0),qU=function(r){ae(e,r);function e(t,n,i,a,o){var s=r.call(this)||this;return s._hovered=new Yd(0,0),s.storage=t,s.painter=n,s.painterRoot=a,s._pointerSize=o,i=i||new poe,s.proxy=null,s.setHandlerProxy(i),s._draggingMgr=new jae(s),s}return e.prototype.setHandlerProxy=function(t){this.proxy&&this.proxy.dispose(),t&&(k(voe,function(n){t.on&&t.on(n,this[n],this)},this),t.handler=this),this.proxy=t},e.prototype.mousemove=function(t){var n=t.zrX,i=t.zrY,a=jU(this,n,i),o=this._hovered,s=o.target;s&&!s.__zr&&(o=this.findHover(o.x,o.y),s=o.target);var l=this._hovered=a?new Yd(n,i):this.findHover(n,i),u=l.target,c=this.proxy;c.setCursor&&c.setCursor(u?u.cursor:"default"),s&&u!==s&&this.dispatchToElement(o,"mouseout",t),this.dispatchToElement(l,"mousemove",t),u&&u!==s&&this.dispatchToElement(l,"mouseover",t)},e.prototype.mouseout=function(t){var n=t.zrEventControl;n!=="only_globalout"&&this.dispatchToElement(this._hovered,"mouseout",t),n!=="no_globalout"&&this.trigger("globalout",{type:"globalout",event:t})},e.prototype.resize=function(){this._hovered=new Yd(0,0)},e.prototype.dispatch=function(t,n){var i=this[t];i&&i.call(this,n)},e.prototype.dispose=function(){this.proxy.dispose(),this.storage=null,this.proxy=null,this.painter=null},e.prototype.setCursorStyle=function(t){var n=this.proxy;n.setCursor&&n.setCursor(t)},e.prototype.dispatchToElement=function(t,n,i){t=t||{};var a=t.target;if(!(a&&a.silent)){for(var o="on"+n,s=foe(n,t,i);a&&(a[o]&&(s.cancelBubble=!!a[o].call(a,s)),a.trigger(n,s),a=a.__hostTarget?a.__hostTarget:a.parent,!s.cancelBubble););s.cancelBubble||(this.trigger(n,s),this.painter&&this.painter.eachOtherLayer&&this.painter.eachOtherLayer(function(l){typeof l[o]=="function"&&l[o].call(l,s),l.trigger&&l.trigger(n,s)}))}},e.prototype.findHover=function(t,n,i){var a=this.storage.getDisplayList(),o=new Yd(t,n);if(qD(a,o,t,n,i),this._pointerSize&&!o.target){for(var s=[],l=this._pointerSize,u=l/2,c=new dt(t-u,n-u,l,l),h=a.length-1;h>=0;h--){var f=a[h];f!==i&&!f.ignore&&!f.ignoreCoarsePointer&&(!f.parent||!f.parent.ignoreCoarsePointer)&&(TS.copy(f.getBoundingRect()),f.transform&&TS.applyTransform(f.transform),TS.intersect(c)&&s.push(f))}if(s.length)for(var d=4,p=Math.PI/12,g=Math.PI*2,v=0;v<u;v+=d)for(var m=0;m<g;m+=p){var y=t+v*Math.cos(m),_=n+v*Math.sin(m);if(qD(s,o,y,_,i),o.target)return o}}return o},e.prototype.processGesture=function(t,n){this._gestureMgr||(this._gestureMgr=new soe);var i=this._gestureMgr;n==="start"&&i.clear();var a=i.recognize(t,this.findHover(t.zrX,t.zrY,null).target,this.proxy.dom);if(n==="end"&&i.clear(),a){var o=a.type;t.gestureEvent=o;var s=new Yd;s.target=a.target,this.dispatchToElement(s,o,a.event)}},e}(Ba);k(["click","mousedown","mouseup","mousewheel","dblclick","contextmenu"],function(r){qU.prototype[r]=function(e){var t=e.zrX,n=e.zrY,i=jU(this,t,n),a,o;if((r!=="mouseup"||!i)&&(a=this.findHover(t,n),o=a.target),r==="mousedown")this._downEl=o,this._downPoint=[e.zrX,e.zrY],this._upEl=o;else if(r==="mouseup")this._upEl=o;else if(r==="click"){if(this._downEl!==this._upEl||!this._downPoint||bl(this._downPoint,[e.zrX,e.zrY])>4)return;this._downPoint=null}this.dispatchToElement(a,r,e)}});function goe(r,e,t){if(r[r.rectHover?"rectContain":"contain"](e,t)){for(var n=r,i=void 0,a=!1;n;){if(n.ignoreClip&&(a=!0),!a){var o=n.getClipPath();if(o&&!o.contain(e,t))return!1}n.silent&&(i=!0);var s=n.__hostTarget;n=s||n.parent}return i?YU:!0}return!1}function qD(r,e,t,n,i){for(var a=r.length-1;a>=0;a--){var o=r[a],s=void 0;if(o!==i&&!o.ignore&&(s=goe(o,t,n))&&(!e.topTarget&&(e.topTarget=o),s!==YU)){e.target=o;break}}}function jU(r,e,t){var n=r.painter;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}const moe=qU;var KU=32,qd=7;function yoe(r){for(var e=0;r>=KU;)e|=r&1,r>>=1;return r+e}function jD(r,e,t,n){var i=e+1;if(i===t)return 1;if(n(r[i++],r[e])<0){for(;i<t&&n(r[i],r[i-1])<0;)i++;_oe(r,e,i)}else for(;i<t&&n(r[i],r[i-1])>=0;)i++;return i-e}function _oe(r,e,t){for(t--;e<t;){var n=r[e];r[e++]=r[t],r[t--]=n}}function KD(r,e,t,n,i){for(n===e&&n++;n<t;n++){for(var a=r[n],o=e,s=n,l;o<s;)l=o+s>>>1,i(a,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]=a}}function MS(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])>0){for(s=n-i;l<s&&a(r,e[t+i+l])>0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}else{for(s=i+1;l<s&&a(r,e[t+i-l])<=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}for(o++;o<l;){var c=o+(l-o>>>1);a(r,e[t+c])>0?o=c+1:l=c}return l}function CS(r,e,t,n,i,a){var o=0,s=0,l=1;if(a(r,e[t+i])<0){for(s=i+1;l<s&&a(r,e[t+i-l])<0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s);var u=o;o=i-l,l=i-u}else{for(s=n-i;l<s&&a(r,e[t+i+l])>=0;)o=l,l=(l<<1)+1,l<=0&&(l=s);l>s&&(l=s),o+=i,l+=i}for(o++;o<l;){var c=o+(l-o>>>1);a(r,e[t+c])<0?l=c:o=c+1}return l}function xoe(r,e){var t=qd,n,i,a=0,o=[];n=[],i=[];function s(d,p){n[a]=d,i[a]=p,a+=1}function l(){for(;a>1;){var d=a-2;if(d>=1&&i[d-1]<=i[d]+i[d+1]||d>=2&&i[d-2]<=i[d]+i[d-1])i[d-1]<i[d+1]&&d--;else if(i[d]>i[d+1])break;c(d)}}function u(){for(;a>1;){var d=a-2;d>0&&i[d-1]<i[d+1]&&d--,c(d)}}function c(d){var p=n[d],g=i[d],v=n[d+1],m=i[d+1];i[d]=g+m,d===a-3&&(n[d+1]=n[d+2],i[d+1]=i[d+2]),a--;var y=CS(r[v],r,p,g,0,e);p+=y,g-=y,g!==0&&(m=MS(r[p+g-1],r,v,m,m-1,e),m!==0&&(g<=m?h(p,g,v,m):f(p,g,v,m)))}function h(d,p,g,v){var m=0;for(m=0;m<p;m++)o[m]=r[d+m];var y=0,_=g,x=d;if(r[x++]=r[_++],--v===0){for(m=0;m<p;m++)r[x+m]=o[y+m];return}if(p===1){for(m=0;m<v;m++)r[x+m]=r[_+m];r[x+v]=o[y];return}for(var S=t,A,w,M;;){A=0,w=0,M=!1;do if(e(r[_],o[y])<0){if(r[x++]=r[_++],w++,A=0,--v===0){M=!0;break}}else if(r[x++]=o[y++],A++,w=0,--p===1){M=!0;break}while((A|w)<S);if(M)break;do{if(A=CS(r[_],o,y,p,0,e),A!==0){for(m=0;m<A;m++)r[x+m]=o[y+m];if(x+=A,y+=A,p-=A,p<=1){M=!0;break}}if(r[x++]=r[_++],--v===0){M=!0;break}if(w=MS(o[y],r,_,v,0,e),w!==0){for(m=0;m<w;m++)r[x+m]=r[_+m];if(x+=w,_+=w,v-=w,v===0){M=!0;break}}if(r[x++]=o[y++],--p===1){M=!0;break}S--}while(A>=qd||w>=qd);if(M)break;S<0&&(S=0),S+=2}if(t=S,t<1&&(t=1),p===1){for(m=0;m<v;m++)r[x+m]=r[_+m];r[x+v]=o[y]}else{if(p===0)throw new Error;for(m=0;m<p;m++)r[x+m]=o[y+m]}}function f(d,p,g,v){var m=0;for(m=0;m<v;m++)o[m]=r[g+m];var y=d+p-1,_=v-1,x=g+v-1,S=0,A=0;if(r[x--]=r[y--],--p===0){for(S=x-(v-1),m=0;m<v;m++)r[S+m]=o[m];return}if(v===1){for(x-=p,y-=p,A=x+1,S=y+1,m=p-1;m>=0;m--)r[A+m]=r[S+m];r[x]=o[_];return}for(var w=t;;){var M=0,C=0,b=!1;do if(e(o[_],r[y])<0){if(r[x--]=r[y--],M++,C=0,--p===0){b=!0;break}}else if(r[x--]=o[_--],C++,M=0,--v===1){b=!0;break}while((M|C)<w);if(b)break;do{if(M=p-CS(o[_],r,d,p,p-1,e),M!==0){for(x-=M,y-=M,p-=M,A=x+1,S=y+1,m=M-1;m>=0;m--)r[A+m]=r[S+m];if(p===0){b=!0;break}}if(r[x--]=o[_--],--v===1){b=!0;break}if(C=v-MS(r[y],o,0,v,v-1,e),C!==0){for(x-=C,_-=C,v-=C,A=x+1,S=_+1,m=0;m<C;m++)r[A+m]=o[S+m];if(v<=1){b=!0;break}}if(r[x--]=r[y--],--p===0){b=!0;break}w--}while(M>=qd||C>=qd);if(b)break;w<0&&(w=0),w+=2}if(t=w,t<1&&(t=1),v===1){for(x-=p,y-=p,A=x+1,S=y+1,m=p-1;m>=0;m--)r[A+m]=r[S+m];r[x]=o[_]}else{if(v===0)throw new Error;for(S=x-(v-1),m=0;m<v;m++)r[S+m]=o[m]}}return{mergeRuns:l,forceMergeRuns:u,pushRun:s}}function e0(r,e,t,n){t||(t=0),n||(n=r.length);var i=n-t;if(!(i<2)){var a=0;if(i<KU){a=jD(r,t,n,e),KD(r,t,n,t+a,e);return}var o=xoe(r,e),s=yoe(i);do{if(a=jD(r,t,n,e),a<s){var l=i;l>s&&(l=s),KD(r,t,t+l,t+a,e),a=l}o.pushRun(t,a),o.mergeRuns(),i-=a,t+=a}while(i!==0);o.forceMergeRuns()}}var ji=1,Lp=2,tf=4,ZD=!1;function ES(){ZD||(ZD=!0,console.warn("z / z2 / zlevel of displayable is invalid, which may cause unexpected errors"))}function QD(r,e){return r.zlevel===e.zlevel?r.z===e.z?r.z2-e.z2:r.z-e.z:r.zlevel-e.zlevel}var Soe=function(){function r(){this._roots=[],this._displayList=[],this._displayListLen=0,this.displayableSortFunc=QD}return r.prototype.traverse=function(e,t){for(var n=0;n<this._roots.length;n++)this._roots[n].traverse(e,t)},r.prototype.getDisplayList=function(e,t){t=t||!1;var n=this._displayList;return(e||!n.length)&&this.updateDisplayList(t),n},r.prototype.updateDisplayList=function(e){this._displayListLen=0;for(var t=this._roots,n=this._displayList,i=0,a=t.length;i<a;i++)this._updateAndAddDisplayable(t[i],null,e);n.length=this._displayListLen,e0(n,QD)},r.prototype._updateAndAddDisplayable=function(e,t,n){if(!(e.ignore&&!n)){e.beforeUpdate(),e.update(),e.afterUpdate();var i=e.getClipPath();if(e.ignoreClip)t=null;else if(i){t?t=t.slice():t=[];for(var a=i,o=e;a;)a.parent=o,a.updateTransform(),t.push(a),o=a,a=a.getClipPath()}if(e.childrenRef){for(var s=e.childrenRef(),l=0;l<s.length;l++){var u=s[l];e.__dirty&&(u.__dirty|=ji),this._updateAndAddDisplayable(u,t,n)}e.__dirty=0}else{var c=e;t&&t.length?c.__clipPaths=t:c.__clipPaths&&c.__clipPaths.length>0&&(c.__clipPaths=[]),isNaN(c.z)&&(ES(),c.z=0),isNaN(c.z2)&&(ES(),c.z2=0),isNaN(c.zlevel)&&(ES(),c.zlevel=0),this._displayList[this._displayListLen++]=c}var h=e.getDecalElement&&e.getDecalElement();h&&this._updateAndAddDisplayable(h,t,n);var f=e.getTextGuideLine();f&&this._updateAndAddDisplayable(f,t,n);var d=e.getTextContent();d&&this._updateAndAddDisplayable(d,t,n)}},r.prototype.addRoot=function(e){e.__zr&&e.__zr.storage===this||this._roots.push(e)},r.prototype.delRoot=function(e){if(e instanceof Array){for(var t=0,n=e.length;t<n;t++)this.delRoot(e[t]);return}var i=pt(this._roots,e);i>=0&&this._roots.splice(i,1)},r.prototype.delAllRoots=function(){this._roots=[],this._displayList=[],this._displayListLen=0},r.prototype.getRoots=function(){return this._roots},r.prototype.dispose=function(){this._displayList=null,this._roots=null},r}();const Aoe=Soe;var ZU;ZU=kt.hasGlobalWindow&&(window.requestAnimationFrame&&window.requestAnimationFrame.bind(window)||window.msRequestAnimationFrame&&window.msRequestAnimationFrame.bind(window)||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame)||function(r){return setTimeout(r,16)};const Jb=ZU;var t0={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-t0.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?t0.bounceIn(r*2)*.5:t0.bounceOut(r*2-1)*.5+.5}};const QU=t0;var Um=Math.pow,zl=Math.sqrt,K0=1e-8,JU=1e-4,JD=zl(3),Vm=1/3,Io=qc(),Aa=qc(),Tf=qc();function Cl(r){return r>-K0&&r<K0}function e4(r){return r>K0||r<-K0}function pr(r,e,t,n,i){var a=1-i;return a*a*(a*r+3*i*e)+i*i*(i*n+3*a*t)}function eI(r,e,t,n,i){var a=1-i;return 3*(((e-r)*a+2*(t-e)*i)*a+(n-t)*i*i)}function Z0(r,e,t,n,i,a){var o=n+3*(e-t)-r,s=3*(t-e*2+r),l=3*(e-r),u=r-i,c=s*s-3*o*l,h=s*l-9*o*u,f=l*l-3*s*u,d=0;if(Cl(c)&&Cl(h))if(Cl(s))a[0]=0;else{var p=-l/s;p>=0&&p<=1&&(a[d++]=p)}else{var g=h*h-4*c*f;if(Cl(g)){var v=h/c,p=-s/o+v,m=-v/2;p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m)}else if(g>0){var y=zl(g),_=c*s+1.5*o*(-h+y),x=c*s+1.5*o*(-h-y);_<0?_=-Um(-_,Vm):_=Um(_,Vm),x<0?x=-Um(-x,Vm):x=Um(x,Vm);var p=(-s-(_+x))/(3*o);p>=0&&p<=1&&(a[d++]=p)}else{var S=(2*c*s-3*o*h)/(2*zl(c*c*c)),A=Math.acos(S)/3,w=zl(c),M=Math.cos(A),p=(-s-2*w*M)/(3*o),m=(-s+w*(M+JD*Math.sin(A)))/(3*o),C=(-s+w*(M-JD*Math.sin(A)))/(3*o);p>=0&&p<=1&&(a[d++]=p),m>=0&&m<=1&&(a[d++]=m),C>=0&&C<=1&&(a[d++]=C)}}return d}function t4(r,e,t,n,i){var a=6*t-12*e+6*r,o=9*e+3*n-3*r-9*t,s=3*e-3*r,l=0;if(Cl(o)){if(e4(a)){var u=-s/a;u>=0&&u<=1&&(i[l++]=u)}}else{var c=a*a-4*o*s;if(Cl(c))i[0]=-a/(2*o);else if(c>0){var h=zl(c),u=(-a+h)/(2*o),f=(-a-h)/(2*o);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function jl(r,e,t,n,i,a){var o=(e-r)*i+r,s=(t-e)*i+e,l=(n-t)*i+t,u=(s-o)*i+o,c=(l-s)*i+s,h=(c-u)*i+u;a[0]=r,a[1]=o,a[2]=u,a[3]=h,a[4]=h,a[5]=c,a[6]=l,a[7]=n}function n4(r,e,t,n,i,a,o,s,l,u,c){var h,f=.005,d=1/0,p,g,v,m;Io[0]=l,Io[1]=u;for(var y=0;y<1;y+=.05)Aa[0]=pr(r,t,i,o,y),Aa[1]=pr(e,n,a,s,y),v=bc(Io,Aa),v<d&&(h=y,d=v);d=1/0;for(var _=0;_<32&&!(f<JU);_++)p=h-f,g=h+f,Aa[0]=pr(r,t,i,o,p),Aa[1]=pr(e,n,a,s,p),v=bc(Aa,Io),p>=0&&v<d?(h=p,d=v):(Tf[0]=pr(r,t,i,o,g),Tf[1]=pr(e,n,a,s,g),m=bc(Tf,Io),g<=1&&m<d?(h=g,d=m):f*=.5);return c&&(c[0]=pr(r,t,i,o,h),c[1]=pr(e,n,a,s,h)),zl(d)}function woe(r,e,t,n,i,a,o,s,l){for(var u=r,c=e,h=0,f=1/l,d=1;d<=l;d++){var p=d*f,g=pr(r,t,i,o,p),v=pr(e,n,a,s,p),m=g-u,y=v-c;h+=Math.sqrt(m*m+y*y),u=g,c=v}return h}function Tr(r,e,t,n){var i=1-n;return i*(i*r+2*n*e)+n*n*t}function eT(r,e,t,n){return 2*((1-n)*(e-r)+n*(t-e))}function boe(r,e,t,n,i){var a=r-2*e+t,o=2*(e-r),s=r-n,l=0;if(Cl(a)){if(e4(o)){var u=-s/o;u>=0&&u<=1&&(i[l++]=u)}}else{var c=o*o-4*a*s;if(Cl(c)){var u=-o/(2*a);u>=0&&u<=1&&(i[l++]=u)}else if(c>0){var h=zl(c),u=(-o+h)/(2*a),f=(-o-h)/(2*a);u>=0&&u<=1&&(i[l++]=u),f>=0&&f<=1&&(i[l++]=f)}}return l}function r4(r,e,t){var n=r+t-2*e;return n===0?.5:(r-e)/n}function Bv(r,e,t,n,i){var a=(e-r)*n+r,o=(t-e)*n+e,s=(o-a)*n+a;i[0]=r,i[1]=a,i[2]=s,i[3]=s,i[4]=o,i[5]=t}function i4(r,e,t,n,i,a,o,s,l){var u,c=.005,h=1/0;Io[0]=o,Io[1]=s;for(var f=0;f<1;f+=.05){Aa[0]=Tr(r,t,i,f),Aa[1]=Tr(e,n,a,f);var d=bc(Io,Aa);d<h&&(u=f,h=d)}h=1/0;for(var p=0;p<32&&!(c<JU);p++){var g=u-c,v=u+c;Aa[0]=Tr(r,t,i,g),Aa[1]=Tr(e,n,a,g);var d=bc(Aa,Io);if(g>=0&&d<h)u=g,h=d;else{Tf[0]=Tr(r,t,i,v),Tf[1]=Tr(e,n,a,v);var m=bc(Tf,Io);v<=1&&m<h?(u=v,h=m):c*=.5}}return l&&(l[0]=Tr(r,t,i,u),l[1]=Tr(e,n,a,u)),zl(h)}function Toe(r,e,t,n,i,a,o){for(var s=r,l=e,u=0,c=1/o,h=1;h<=o;h++){var f=h*c,d=Tr(r,t,i,f),p=Tr(e,n,a,f),g=d-s,v=p-l;u+=Math.sqrt(g*g+v*v),s=d,l=p}return u}var Moe=/cubic-bezier\(([0-9,\.e ]+)\)/;function qC(r){var e=r&&Moe.exec(r);if(e){var t=e[1].split(","),n=+eo(t[0]),i=+eo(t[1]),a=+eo(t[2]),o=+eo(t[3]);if(isNaN(n+i+a+o))return;var s=[];return function(l){return l<=0?0:l>=1?1:Z0(0,n,a,1,l,s)&&pr(0,i,o,1,s[0])}}}var Coe=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||qn,this.ondestroy=e.ondestroy||qn,this.onrestart=e.onrestart||qn,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,i=e-this._startTime-this._pausedTime,a=i/n;a<0&&(a=0),a=Math.min(a,1);var o=this.easingFunc,s=o?o(a):a;if(this.onframe(s),a===1)if(this.loop){var l=i%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=qe(e)?e:QU[e]||qC(e)},r}();const Eoe=Coe;var a4=function(){function r(e){this.value=e}return r}(),Loe=function(){function r(){this._len=0}return r.prototype.insert=function(e){var t=new a4(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}(),Poe=function(){function r(e){this._list=new Loe,this._maxSize=10,this._map={},this._maxSize=e}return r.prototype.put=function(e,t){var n=this._list,i=this._map,a=null;if(i[e]==null){var o=n.len(),s=this._lastRemovedEntry;if(o>=this._maxSize&&o>0){var l=n.head;n.remove(l),delete i[l.key],a=l.value,this._lastRemovedEntry=l}s?s.value=t:s=new a4(t),s.key=e,n.insertEntry(s),i[e]=s}return a},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}();const Ag=Poe;var tI={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 ro(r){return r=Math.round(r),r<0?0:r>255?255:r}function Roe(r){return r=Math.round(r),r<0?0:r>360?360:r}function zv(r){return r<0?0:r>1?1:r}function LS(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?ro(parseFloat(e)/100*255):ro(parseInt(e,10))}function Tc(r){var e=r;return e.length&&e.charAt(e.length-1)==="%"?zv(parseFloat(e)/100):zv(parseFloat(e))}function PS(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 El(r,e,t){return r+(e-r)*t}function da(r,e,t,n,i){return r[0]=e,r[1]=t,r[2]=n,r[3]=i,r}function tT(r,e){return r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3],r}var o4=new Ag(20),Gm=null;function Rh(r,e){Gm&&tT(Gm,e),Gm=o4.put(r,Gm||e.slice())}function na(r,e){if(r){e=e||[];var t=o4.get(r);if(t)return tT(e,t);r=r+"";var n=r.replace(/ /g,"").toLowerCase();if(n in tI)return tT(e,tI[n]),Rh(r,e),e;var i=n.length;if(n.charAt(0)==="#"){if(i===4||i===5){var a=parseInt(n.slice(1,4),16);if(!(a>=0&&a<=4095)){da(e,0,0,0,1);return}return da(e,(a&3840)>>4|(a&3840)>>8,a&240|(a&240)>>4,a&15|(a&15)<<4,i===5?parseInt(n.slice(4),16)/15:1),Rh(r,e),e}else if(i===7||i===9){var a=parseInt(n.slice(1,7),16);if(!(a>=0&&a<=16777215)){da(e,0,0,0,1);return}return da(e,(a&16711680)>>16,(a&65280)>>8,a&255,i===9?parseInt(n.slice(7),16)/255:1),Rh(r,e),e}return}var o=n.indexOf("("),s=n.indexOf(")");if(o!==-1&&s+1===i){var l=n.substr(0,o),u=n.substr(o+1,s-(o+1)).split(","),c=1;switch(l){case"rgba":if(u.length!==4)return u.length===3?da(e,+u[0],+u[1],+u[2],1):da(e,0,0,0,1);c=Tc(u.pop());case"rgb":if(u.length>=3)return da(e,LS(u[0]),LS(u[1]),LS(u[2]),u.length===3?c:Tc(u[3])),Rh(r,e),e;da(e,0,0,0,1);return;case"hsla":if(u.length!==4){da(e,0,0,0,1);return}return u[3]=Tc(u[3]),nT(u,e),Rh(r,e),e;case"hsl":if(u.length!==3){da(e,0,0,0,1);return}return nT(u,e),Rh(r,e),e;default:return}}da(e,0,0,0,1)}}function nT(r,e){var t=(parseFloat(r[0])%360+360)%360/360,n=Tc(r[1]),i=Tc(r[2]),a=i<=.5?i*(n+1):i+n-i*n,o=i*2-a;return e=e||[],da(e,ro(PS(o,a,t+1/3)*255),ro(PS(o,a,t)*255),ro(PS(o,a,t-1/3)*255),1),r.length===4&&(e[3]=r[3]),e}function Doe(r){if(r){var e=r[0]/255,t=r[1]/255,n=r[2]/255,i=Math.min(e,t,n),a=Math.max(e,t,n),o=a-i,s=(a+i)/2,l,u;if(o===0)l=0,u=0;else{s<.5?u=o/(a+i):u=o/(2-a-i);var c=((a-e)/6+o/2)/o,h=((a-t)/6+o/2)/o,f=((a-n)/6+o/2)/o;e===a?l=f-h:t===a?l=1/3+c-f:n===a&&(l=2/3+h-c),l<0&&(l+=1),l>1&&(l-=1)}var d=[l*360,u,s];return r[3]!=null&&d.push(r[3]),d}}function rT(r,e){var t=na(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 ws(t,t.length===4?"rgba":"rgb")}}function RS(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){t=t||[];var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=e[i],s=e[a],l=n-i;return t[0]=ro(El(o[0],s[0],l)),t[1]=ro(El(o[1],s[1],l)),t[2]=ro(El(o[2],s[2],l)),t[3]=zv(El(o[3],s[3],l)),t}}function Ioe(r,e,t){if(!(!(e&&e.length)||!(r>=0&&r<=1))){var n=r*(e.length-1),i=Math.floor(n),a=Math.ceil(n),o=na(e[i]),s=na(e[a]),l=n-i,u=ws([ro(El(o[0],s[0],l)),ro(El(o[1],s[1],l)),ro(El(o[2],s[2],l)),zv(El(o[3],s[3],l))],"rgba");return t?{color:u,leftIndex:i,rightIndex:a,value:n}:u}}function ev(r,e,t,n){var i=na(r);if(r)return i=Doe(i),e!=null&&(i[0]=Roe(e)),t!=null&&(i[1]=Tc(t)),n!=null&&(i[2]=Tc(n)),ws(nT(i),"rgba")}function Q0(r,e){var t=na(r);if(t&&e!=null)return t[3]=zv(e),ws(t,"rgba")}function ws(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 J0(r,e){var t=na(r);return t?(.299*t[0]+.587*t[1]+.114*t[2])*t[3]/255+(1-t[3])*e:0}var nI=new Ag(100);function iT(r){if(ke(r)){var e=nI.get(r);return e||(e=rT(r,-.1),nI.put(r,e)),e}else if(p1(r)){var t=pe({},r);return t.colorStops=xe(r.colorStops,function(n){return{offset:n.offset,color:rT(n.color,-.1)}}),t}return r}var e_=Math.round;function Uv(r){var e;if(!r||r==="transparent")r="none";else if(typeof r=="string"&&r.indexOf("rgba")>-1){var t=na(r);t&&(r="rgb("+t[0]+","+t[1]+","+t[2]+")",e=t[3])}return{color:r,opacity:e==null?1:e}}var rI=1e-4;function Ll(r){return r<rI&&r>-rI}function Hm(r){return e_(r*1e3)/1e3}function aT(r){return e_(r*1e4)/1e4}function Noe(r){return"matrix("+Hm(r[0])+","+Hm(r[1])+","+Hm(r[2])+","+Hm(r[3])+","+aT(r[4])+","+aT(r[5])+")"}var koe={left:"start",right:"end",center:"middle",middle:"middle"};function Ooe(r,e,t){return t==="top"?r+=e/2:t==="bottom"&&(r-=e/2),r}function Foe(r){return r&&(r.shadowBlur||r.shadowOffsetX||r.shadowOffsetY)}function Boe(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 s4(r){return r&&!!r.image}function zoe(r){return r&&!!r.svgElement}function jC(r){return s4(r)||zoe(r)}function l4(r){return r.type==="linear"}function u4(r){return r.type==="radial"}function c4(r){return r&&(r.type==="linear"||r.type==="radial")}function m1(r){return"url(#"+r+")"}function h4(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 f4(r){var e=r.x||0,t=r.y||0,n=(r.rotation||0)*Zy,i=ot(r.scaleX,1),a=ot(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+")"),(i!==1||a!==1)&&l.push("scale("+i+","+a+")"),(o||s)&&l.push("skew("+e_(o*Zy)+"deg, "+e_(s*Zy)+"deg)"),l.join(" ")}var Uoe=function(){return kt.hasGlobalWindow&&qe(window.btoa)?function(r){return window.btoa(unescape(encodeURIComponent(r)))}:typeof Buffer!="undefined"?function(r){return Buffer.from(r).toString("base64")}:function(r){return null}}(),oT=Array.prototype.slice;function ds(r,e,t){return(e-r)*t+r}function DS(r,e,t,n){for(var i=e.length,a=0;a<i;a++)r[a]=ds(e[a],t[a],n);return r}function Voe(r,e,t,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=ds(e[o][s],t[o][s],n)}return r}function Wm(r,e,t,n){for(var i=e.length,a=0;a<i;a++)r[a]=e[a]+t[a]*n;return r}function iI(r,e,t,n){for(var i=e.length,a=i&&e[0].length,o=0;o<i;o++){r[o]||(r[o]=[]);for(var s=0;s<a;s++)r[o][s]=e[o][s]+t[o][s]*n}return r}function Goe(r,e){for(var t=r.length,n=e.length,i=t>n?e:r,a=Math.min(t,n),o=i[a-1]||{color:[0,0,0,0],offset:0},s=a;s<Math.max(t,n);s++)i.push({offset:o.offset,color:o.color.slice()})}function Hoe(r,e,t){var n=r,i=e;if(!(!n.push||!i.push)){var a=n.length,o=i.length;if(a!==o){var s=a>o;if(s)n.length=o;else for(var l=a;l<o;l++)n.push(t===1?i[l]:oT.call(i[l]))}for(var u=n[0]&&n[0].length,l=0;l<n.length;l++)if(t===1)isNaN(n[l])&&(n[l]=i[l]);else for(var c=0;c<u;c++)isNaN(n[l][c])&&(n[l][c]=i[l][c])}}function tv(r){if(ii(r)){var e=r.length;if(ii(r[0])){for(var t=[],n=0;n<e;n++)t.push(oT.call(r[n]));return t}return oT.call(r)}return r}function n0(r){return r[0]=Math.floor(r[0])||0,r[1]=Math.floor(r[1])||0,r[2]=Math.floor(r[2])||0,r[3]=r[3]==null?1:r[3],"rgba("+r.join(",")+")"}function Woe(r){return ii(r&&r[0])?2:1}var $m=0,r0=1,d4=2,Pp=3,sT=4,lT=5,aI=6;function oI(r){return r===sT||r===lT}function Xm(r){return r===r0||r===d4}var jd=[0,0,0,0],$oe=function(){function r(e){this.keyframes=[],this.discrete=!1,this._invalid=!1,this._needsSort=!1,this._lastFr=0,this._lastFrP=0,this.propName=e}return r.prototype.isFinished=function(){return this._finished},r.prototype.setFinished=function(){this._finished=!0,this._additiveTrack&&this._additiveTrack.setFinished()},r.prototype.needsAnimate=function(){return this.keyframes.length>=1},r.prototype.getAdditiveTrack=function(){return this._additiveTrack},r.prototype.addKeyframe=function(e,t,n){this._needsSort=!0;var i=this.keyframes,a=i.length,o=!1,s=aI,l=t;if(ii(t)){var u=Woe(t);s=u,(u===1&&!Ft(t[0])||u===2&&!Ft(t[0][0]))&&(o=!0)}else if(Ft(t)&&!Ov(t))s=$m;else if(ke(t))if(!isNaN(+t))s=$m;else{var c=na(t);c&&(l=c,s=Pp)}else if(p1(t)){var h=pe({},l);h.colorStops=xe(t.colorStops,function(d){return{offset:d.offset,color:na(d.color)}}),l4(t)?s=sT:u4(t)&&(s=lT),l=h}a===0?this.valType=s:(s!==this.valType||s===aI)&&(o=!0),this.discrete=this.discrete||o;var f={time:e,value:l,rawValue:t,percent:0};return n&&(f.easing=n,f.easingFunc=qe(n)?n:QU[n]||qC(n)),i.push(f),f},r.prototype.prepare=function(e,t){var n=this.keyframes;this._needsSort&&n.sort(function(g,v){return g.time-v.time});for(var i=this.valType,a=n.length,o=n[a-1],s=this.discrete,l=Xm(i),u=oI(i),c=0;c<a;c++){var h=n[c],f=h.value,d=o.value;h.percent=h.time/e,s||(l&&c!==a-1?Hoe(f,d,i):u&&Goe(f.colorStops,d.colorStops))}if(!s&&i!==lT&&t&&this.needsAnimate()&&t.needsAnimate()&&i===t.valType&&!t._finished){this._additiveTrack=t;for(var p=n[0].value,c=0;c<a;c++)i===$m?n[c].additiveValue=n[c].value-p:i===Pp?n[c].additiveValue=Wm([],n[c].value,p,-1):Xm(i)&&(n[c].additiveValue=i===r0?Wm([],n[c].value,p,-1):iI([],n[c].value,p,-1))}},r.prototype.step=function(e,t){if(!this._finished){this._additiveTrack&&this._additiveTrack._finished&&(this._additiveTrack=null);var n=this._additiveTrack!=null,i=n?"additiveValue":"value",a=this.valType,o=this.keyframes,s=o.length,l=this.propName,u=a===Pp,c,h=this._lastFr,f=Math.min,d,p;if(s===1)d=p=o[0];else{if(t<0)c=0;else if(t<this._lastFrP){var g=f(h+1,s-1);for(c=g;c>=0&&!(o[c].percent<=t);c--);c=f(c,s-2)}else{for(c=h;c<s&&!(o[c].percent>t);c++);c=f(c-1,s-2)}p=o[c+1],d=o[c]}if(d&&p){this._lastFr=c,this._lastFrP=t;var v=p.percent-d.percent,m=v===0?1:f((t-d.percent)/v,1);p.easingFunc&&(m=p.easingFunc(m));var y=n?this._additiveValue:u?jd:e[l];if((Xm(a)||u)&&!y&&(y=this._additiveValue=[]),this.discrete)e[l]=m<1?d.rawValue:p.rawValue;else if(Xm(a))a===r0?DS(y,d[i],p[i],m):Voe(y,d[i],p[i],m);else if(oI(a)){var _=d[i],x=p[i],S=a===sT;e[l]={type:S?"linear":"radial",x:ds(_.x,x.x,m),y:ds(_.y,x.y,m),colorStops:xe(_.colorStops,function(w,M){var C=x.colorStops[M];return{offset:ds(w.offset,C.offset,m),color:n0(DS([],w.color,C.color,m))}}),global:x.global},S?(e[l].x2=ds(_.x2,x.x2,m),e[l].y2=ds(_.y2,x.y2,m)):e[l].r=ds(_.r,x.r,m)}else if(u)DS(y,d[i],p[i],m),n||(e[l]=n0(y));else{var A=ds(d[i],p[i],m);n?this._additiveValue=A:e[l]=A}n&&this._addToTarget(e)}}},r.prototype._addToTarget=function(e){var t=this.valType,n=this.propName,i=this._additiveValue;t===$m?e[n]=e[n]+i:t===Pp?(na(e[n],jd),Wm(jd,jd,i,1),e[n]=n0(jd)):t===r0?Wm(e[n],e[n],i,1):t===d4&&iI(e[n],e[n],i,1)},r}(),KC=function(){function r(e,t,n,i){if(this._tracks={},this._trackKeys=[],this._maxTime=0,this._started=0,this._clip=null,this._target=e,this._loop=t,t&&i){VC("Can' use additive animation on looped animation.");return}this._additiveAnimators=i,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,wt(t),n)},r.prototype.whenWithKeys=function(e,t,n,i){for(var a=this._tracks,o=0;o<n.length;o++){var s=n[o],l=a[s];if(!l){l=a[s]=new $oe(s);var u=void 0,c=this._getAdditiveTrack(s);if(c){var h=c.keyframes,f=h[h.length-1];u=f&&f.value,c.valType===Pp&&u&&(u=n0(u))}else u=this._target[s];if(u==null)continue;e>0&&l.addKeyframe(0,tv(u),i),this._trackKeys.push(s)}l.addKeyframe(e,tv(t[s]),i)}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;n<t;n++)e[n].call(this)},r.prototype._abortedCallback=function(){this._setTracksFinished();var e=this.animation,t=this._abortedCbs;if(e&&e.removeClip(this._clip),this._clip=null,t)for(var n=0;n<t.length;n++)t[n].call(this)},r.prototype._setTracksFinished=function(){for(var e=this._tracks,t=this._trackKeys,n=0;n<t.length;n++)e[t[n]].setFinished()},r.prototype._getAdditiveTrack=function(e){var t,n=this._additiveAnimators;if(n)for(var i=0;i<n.length;i++){var a=n[i].getTrack(e);a&&(t=a)}return t},r.prototype.start=function(e){if(!(this._started>0)){this._started=1;for(var t=this,n=[],i=this._maxTime||0,a=0;a<this._trackKeys.length;a++){var o=this._trackKeys[a],s=this._tracks[o],l=this._getAdditiveTrack(o),u=s.keyframes,c=u.length;if(s.prepare(i,l),s.needsAnimate())if(!this._allowDiscrete&&s.discrete){var h=u[c-1];h&&(t._target[s.propName]=h.rawValue),s.setFinished()}else n.push(s)}if(n.length||this._force){var f=new Eoe({life:i,loop:this._loop,delay:this._delay||0,onframe:function(d){t._started=2;var p=t._additiveAnimators;if(p){for(var g=!1,v=0;v<p.length;v++)if(p[v]._clip){g=!0;break}g||(t._additiveAnimators=null)}for(var v=0;v<n.length;v++)n[v].step(t._target,d);var m=t._onframeCbs;if(m)for(var v=0;v<m.length;v++)m[v](t._target,d)},ondestroy:function(){t._doneCallback()}});this._clip=f,this.animation&&this.animation.addClip(f),e&&f.setEasing(e)}else this._doneCallback();return this}},r.prototype.stop=function(e){if(this._clip){var t=this._clip;e&&t.onframe(1),this._abortedCallback()}},r.prototype.delay=function(e){return this._delay=e,this},r.prototype.during=function(e){return e&&(this._onframeCbs||(this._onframeCbs=[]),this._onframeCbs.push(e)),this},r.prototype.done=function(e){return e&&(this._doneCbs||(this._doneCbs=[]),this._doneCbs.push(e)),this},r.prototype.aborted=function(e){return e&&(this._abortedCbs||(this._abortedCbs=[]),this._abortedCbs.push(e)),this},r.prototype.getClip=function(){return this._clip},r.prototype.getTrack=function(e){return this._tracks[e]},r.prototype.getTracks=function(){var e=this;return xe(this._trackKeys,function(t){return e._tracks[t]})},r.prototype.stopTracks=function(e,t){if(!e.length||!this._clip)return!0;for(var n=this._tracks,i=this._trackKeys,a=0;a<e.length;a++){var o=n[e[a]];o&&!o.isFinished()&&(t?o.step(this._target,1):this._started===1&&o.step(this._target,0),o.setFinished())}for(var s=!0,a=0;a<i.length;a++)if(!n[i[a]].isFinished()){s=!1;break}return s&&this._abortedCallback(),s},r.prototype.saveTo=function(e,t,n){if(e){t=t||this._trackKeys;for(var i=0;i<t.length;i++){var a=t[i],o=this._tracks[a];if(!(!o||o.isFinished())){var s=o.keyframes,l=s[n?0:s.length-1];l&&(e[a]=tv(l.rawValue))}}}},r.prototype.__changeFinalValue=function(e,t){t=t||wt(e);for(var n=0;n<t.length;n++){var i=t[n],a=this._tracks[i];if(a){var o=a.keyframes;if(o.length>1){var s=o.pop();a.addKeyframe(s.time,e[i]),a.prepare(this._maxTime,a.getAdditiveTrack())}}}},r}();function pf(){return new Date().getTime()}var Xoe=function(r){ae(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,i=t.next;n?n.next=i:this._head=i,i?i.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=pf()-this._pausedTime,i=n-this._time,a=this._head;a;){var o=a.next,s=a.step(n,i);s&&(a.ondestroy(),this.removeClip(a)),a=o}this._time=n,t||(this.trigger("frame",i),this.stage.update&&this.stage.update())},e.prototype._startLoop=function(){var t=this;this._running=!0;function n(){t._running&&(Jb(n),!t._paused&&t.update())}Jb(n)},e.prototype.start=function(){this._running||(this._time=pf(),this._pausedTime=0,this._startLoop())},e.prototype.stop=function(){this._running=!1},e.prototype.pause=function(){this._paused||(this._pauseStart=pf(),this._paused=!0)},e.prototype.resume=function(){this._paused&&(this._pausedTime+=pf()-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 i=new KC(t,n.loop);return this.addAnimator(i),i},e}(Ba);const Yoe=Xoe;var qoe=300,IS=kt.domSupported,NS=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=xe(r,function(i){var a=i.replace("mouse","pointer");return t.hasOwnProperty(a)?a:i});return{mouse:r,touch:e,pointer:n}}(),sI={mouse:["mousemove","mouseup"],pointer:["pointermove","pointerup"]},lI=!1;function uT(r){var e=r.pointerType;return e==="pen"||e==="touch"}function joe(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 kS(r){r&&(r.zrByTouch=!0)}function Koe(r,e){return ma(r.dom,new Zoe(r,e),!0)}function p4(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 Zoe=function(){function r(e,t){this.stopPropagation=qn,this.stopImmediatePropagation=qn,this.preventDefault=qn,this.type=t.type,this.target=this.currentTarget=e.dom,this.pointerType=t.pointerType,this.clientX=t.clientX,this.clientY=t.clientY}return r}(),Ya={mousedown:function(r){r=ma(this.dom,r),this.__mayPointerCapture=[r.zrX,r.zrY],this.trigger("mousedown",r)},mousemove:function(r){r=ma(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=ma(this.dom,r),this.__togglePointerCapture(!1),this.trigger("mouseup",r)},mouseout:function(r){r=ma(this.dom,r);var e=r.toElement||r.relatedTarget;p4(this,e)||(this.__pointerCapturing&&(r.zrEventControl="no_globalout"),this.trigger("mouseout",r))},wheel:function(r){lI=!0,r=ma(this.dom,r),this.trigger("mousewheel",r)},mousewheel:function(r){lI||(r=ma(this.dom,r),this.trigger("mousewheel",r))},touchstart:function(r){r=ma(this.dom,r),kS(r),this.__lastTouchMoment=new Date,this.handler.processGesture(r,"start"),Ya.mousemove.call(this,r),Ya.mousedown.call(this,r)},touchmove:function(r){r=ma(this.dom,r),kS(r),this.handler.processGesture(r,"change"),Ya.mousemove.call(this,r)},touchend:function(r){r=ma(this.dom,r),kS(r),this.handler.processGesture(r,"end"),Ya.mouseup.call(this,r),+new Date-+this.__lastTouchMoment<qoe&&Ya.click.call(this,r)},pointerdown:function(r){Ya.mousedown.call(this,r)},pointermove:function(r){uT(r)||Ya.mousemove.call(this,r)},pointerup:function(r){Ya.mouseup.call(this,r)},pointerout:function(r){uT(r)||Ya.mouseout.call(this,r)}};k(["click","dblclick","contextmenu"],function(r){Ya[r]=function(e){e=ma(this.dom,e),this.trigger(r,e)}});var cT={pointermove:function(r){uT(r)||cT.mousemove.call(this,r)},pointerup:function(r){cT.mouseup.call(this,r)},mousemove:function(r){this.trigger("mousemove",r)},mouseup:function(r){var e=this.__pointerCapturing;this.__togglePointerCapture(!1),this.trigger("mouseup",r),e&&(r.zrEventControl="only_globalout",this.trigger("mouseout",r))}};function Qoe(r,e){var t=e.domHandlers;kt.pointerEventsSupported?k(NS.pointer,function(n){i0(e,n,function(i){t[n].call(r,i)})}):(kt.touchEventsSupported&&k(NS.touch,function(n){i0(e,n,function(i){t[n].call(r,i),joe(e)})}),k(NS.mouse,function(n){i0(e,n,function(i){i=$C(i),e.touching||t[n].call(r,i)})}))}function Joe(r,e){kt.pointerEventsSupported?k(sI.pointer,t):kt.touchEventsSupported||k(sI.mouse,t);function t(n){function i(a){a=$C(a),p4(r,a.target)||(a=Koe(r,a),e.domHandlers[n].call(r,a))}i0(e,n,i,{capture:!0})}}function i0(r,e,t,n){r.mounted[e]=t,r.listenerOpts[e]=n,Qb(r.domTarget,e,t,n)}function OS(r){var e=r.mounted;for(var t in e)e.hasOwnProperty(t)&&ooe(r.domTarget,t,e[t],r.listenerOpts[t]);r.mounted={}}var uI=function(){function r(e,t){this.mounted={},this.listenerOpts={},this.touching=!1,this.domTarget=e,this.domHandlers=t}return r}(),ese=function(r){ae(e,r);function e(t,n){var i=r.call(this)||this;return i.__pointerCapturing=!1,i.dom=t,i.painterRoot=n,i._localHandlerScope=new uI(t,Ya),IS&&(i._globalHandlerScope=new uI(document,cT)),Qoe(i,i._localHandlerScope),i}return e.prototype.dispose=function(){OS(this._localHandlerScope),IS&&OS(this._globalHandlerScope)},e.prototype.setCursor=function(t){this.dom.style&&(this.dom.style.cursor=t||"default")},e.prototype.__togglePointerCapture=function(t){if(this.__mayPointerCapture=null,IS&&+this.__pointerCapturing^+t){this.__pointerCapturing=t;var n=this._globalHandlerScope;t?Joe(this,n):OS(n)}},e}(Ba);const tse=ese;var v4=1;kt.hasGlobalWindow&&(v4=Math.max(window.devicePixelRatio||window.screen&&window.screen.deviceXDPI/window.screen.logicalXDPI||1,1));var t_=v4,hT=.4,fT="#333",dT="#ccc",nse="#eee",cI=g1,hI=5e-5;function Au(r){return r>hI||r<-hI}var wu=[],Dh=[],FS=ta(),BS=Math.abs,rse=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 Au(this.rotation)||Au(this.x)||Au(this.y)||Au(this.scaleX-1)||Au(this.scaleY-1)||Au(this.skewX)||Au(this.skewY)},r.prototype.updateTransform=function(){var e=this.parent&&this.parent.transform,t=this.needLocalTransform(),n=this.transform;if(!(t||e)){n&&(cI(n),this.invTransform=null);return}n=n||ta(),t?this.getLocalTransform(n):cI(n),e&&(t?As(n,e,n):XC(n,e)),this.transform=n,this._resolveGlobalScaleRatio(n)},r.prototype._resolveGlobalScaleRatio=function(e){var t=this.globalScaleRatio;if(t!=null&&t!==1){this.getGlobalScale(wu);var n=wu[0]<0?-1:1,i=wu[1]<0?-1:1,a=((wu[0]-n)*t+n)/wu[0]||0,o=((wu[1]-i)*t+i)/wu[1]||0;e[0]*=a,e[1]*=a,e[2]*=o,e[3]*=o}this.invTransform=this.invTransform||ta(),vd(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],i=Math.atan2(e[1],e[0]),a=Math.PI/2+i-Math.atan2(e[3],e[2]);n=Math.sqrt(n)*Math.cos(a),t=Math.sqrt(t),this.skewX=a,this.skewY=0,this.rotation=-i,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||ta(),As(Dh,e.invTransform,t),t=Dh);var n=this.originX,i=this.originY;(n||i)&&(FS[4]=n,FS[5]=i,As(Dh,t,FS),Dh[4]-=n,Dh[5]-=i,t=Dh),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],i=this.invTransform;return i&&Or(n,n,i),n},r.prototype.transformCoordToGlobal=function(e,t){var n=[e,t],i=this.transform;return i&&Or(n,n,i),n},r.prototype.getLineScale=function(){var e=this.transform;return e&&BS(e[0]-1)>1e-10&&BS(e[3]-1)>1e-10?Math.sqrt(BS(e[0]*e[3]-e[2]*e[1])):1},r.prototype.copyTransform=function(e){g4(this,e)},r.getLocalTransform=function(e,t){t=t||[];var n=e.originX||0,i=e.originY||0,a=e.scaleX,o=e.scaleY,s=e.anchorX,l=e.anchorY,u=e.rotation||0,c=e.x,h=e.y,f=e.skewX?Math.tan(e.skewX):0,d=e.skewY?Math.tan(-e.skewY):0;if(n||i||s||l){var p=n+s,g=i+l;t[4]=-p*a-f*g*o,t[5]=-g*o-d*p*a}else t[4]=t[5]=0;return t[0]=a,t[3]=o,t[1]=d*a,t[2]=f*o,u&&jc(t,t,u),t[4]+=n+c,t[5]+=i+h,t},r.initDefaultProps=function(){var e=r.prototype;e.scaleX=e.scaleY=e.globalScaleRatio=1,e.x=e.y=e.originX=e.originY=e.skewX=e.skewY=e.rotation=e.anchorX=e.anchorY=0}(),r}(),Yo=["x","y","originX","originY","anchorX","anchorY","rotation","scaleX","scaleY","skewX","skewY"];function g4(r,e){for(var t=0;t<Yo.length;t++){var n=Yo[t];r[n]=e[n]}}const _s=rse;var fI={};function ra(r,e){e=e||Yl;var t=fI[e];t||(t=fI[e]=new Ag(500));var n=t.get(r);return n==null&&(n=ql.measureText(r,e).width,t.put(r,n)),n}function dI(r,e,t,n){var i=ra(r,e),a=y1(e),o=Rp(0,i,t),s=nf(0,a,n),l=new dt(o,s,i,a);return l}function wg(r,e,t,n){var i=((r||"")+"").split(` |
|
`),a=i.length;if(a===1)return dI(i[0],e,t,n);for(var o=new dt(0,0,0,0),s=0;s<i.length;s++){var l=dI(i[s],e,t,n);s===0?o.copy(l):o.union(l)}return o}function Rp(r,e,t){return t==="right"?r-=e:t==="center"&&(r-=e/2),r}function nf(r,e,t){return t==="middle"?r-=e/2:t==="bottom"&&(r-=e),r}function y1(r){return ra("国",r)}function so(r,e){return typeof r=="string"?r.lastIndexOf("%")>=0?parseFloat(r)/100*e:parseFloat(r):r}function n_(r,e,t){var n=e.position||"inside",i=e.distance!=null?e.distance:5,a=t.height,o=t.width,s=a/2,l=t.x,u=t.y,c="left",h="top";if(n instanceof Array)l+=so(n[0],t.width),u+=so(n[1],t.height),c=null,h=null;else switch(n){case"left":l-=i,u+=s,c="right",h="middle";break;case"right":l+=i+o,u+=s,h="middle";break;case"top":l+=o/2,u-=i,c="center",h="bottom";break;case"bottom":l+=o/2,u+=a+i,c="center";break;case"inside":l+=o/2,u+=s,c="center",h="middle";break;case"insideLeft":l+=i,u+=s,h="middle";break;case"insideRight":l+=o-i,u+=s,c="right",h="middle";break;case"insideTop":l+=o/2,u+=i,c="center";break;case"insideBottom":l+=o/2,u+=a-i,c="center",h="bottom";break;case"insideTopLeft":l+=i,u+=i;break;case"insideTopRight":l+=o-i,u+=i,c="right";break;case"insideBottomLeft":l+=i,u+=a-i,h="bottom";break;case"insideBottomRight":l+=o-i,u+=a-i,c="right",h="bottom";break}return r=r||{},r.x=l,r.y=u,r.align=c,r.verticalAlign=h,r}var zS="__zr_normal__",US=Yo.concat(["ignore"]),ise=$o(Yo,function(r,e){return r[e]=!0,r},{ignore:!1}),Ih={},ase=new dt(0,0,0,0),ZC=function(){function r(e){this.id=GU(),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 i=this.transform;i||(i=this.transform=[1,0,0,1,0,0]),i[4]+=e,i[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,i=n.local,a=t.innerTransformable,o=void 0,s=void 0,l=!1;a.parent=i?this:null;var u=!1;if(a.copyTransform(t),n.position!=null){var c=ase;n.layoutRect?c.copy(n.layoutRect):c.copy(this.getBoundingRect()),i||c.applyTransform(this.transform),this.calculateTextPosition?this.calculateTextPosition(Ih,n,c):n_(Ih,n,c),a.x=Ih.x,a.y=Ih.y,o=Ih.align,s=Ih.verticalAlign;var h=n.origin;if(h&&n.rotation!=null){var f=void 0,d=void 0;h==="center"?(f=c.width*.5,d=c.height*.5):(f=so(h[0],c.width),d=so(h[1],c.height)),u=!0,a.originX=-a.x+f+(i?0:c.x),a.originY=-a.y+d+(i?0:c.y)}}n.rotation!=null&&(a.rotation=n.rotation);var p=n.offset;p&&(a.x+=p[0],a.y+=p[1],u||(a.originX=-p[0],a.originY=-p[1]));var g=n.inside==null?typeof n.position=="string"&&n.position.indexOf("inside")>=0:n.inside,v=this._innerTextDefaultStyle||(this._innerTextDefaultStyle={}),m=void 0,y=void 0,_=void 0;g&&this.canBeInsideText()?(m=n.insideFill,y=n.insideStroke,(m==null||m==="auto")&&(m=this.getInsideTextFill()),(y==null||y==="auto")&&(y=this.getInsideTextStroke(m),_=!0)):(m=n.outsideFill,y=n.outsideStroke,(m==null||m==="auto")&&(m=this.getOutsideFill()),(y==null||y==="auto")&&(y=this.getOutsideStroke(m),_=!0)),m=m||"#000",(m!==v.fill||y!==v.stroke||_!==v.autoStroke||o!==v.align||s!==v.verticalAlign)&&(l=!0,v.fill=m,v.stroke=y,v.autoStroke=_,v.align=o,v.verticalAlign=s,t.setDefaultTextStyle(v)),t.__dirty|=ji,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()?dT:fT},r.prototype.getOutsideStroke=function(e){var t=this.__zr&&this.__zr.getBackgroundColor(),n=typeof t=="string"&&na(t);n||(n=[255,255,255,1]);for(var i=n[3],a=this.__zr.isDarkMode(),o=0;o<3;o++)n[o]=n[o]*i+(a?0:255)*(1-i);return n[3]=1,ws(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||{},pe(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(Qe(e))for(var n=e,i=wt(n),a=0;a<i.length;a++){var o=i[a];this.attrKV(o,e[o])}return this.markRedraw(),this},r.prototype.saveCurrentToNormalState=function(e){this._innerSaveToNormal(e);for(var t=this._normalState,n=0;n<this.animators.length;n++){var i=this.animators[n],a=i.__fromStateTransition;if(!(i.getLoop()||a&&a!==zS)){var o=i.targetName,s=o?t[o]:t;i.saveTo(s)}}},r.prototype._innerSaveToNormal=function(e){var t=this._normalState;t||(t=this._normalState={}),e.textConfig&&!t.textConfig&&(t.textConfig=this.textConfig),this._savePrimaryToNormal(e,t,US)},r.prototype._savePrimaryToNormal=function(e,t,n){for(var i=0;i<n.length;i++){var a=n[i];e[a]!=null&&!(a in t)&&(t[a]=this[a])}},r.prototype.hasState=function(){return this.currentStates.length>0},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(zS,!1,e)},r.prototype.useState=function(e,t,n,i){var a=e===zS,o=this.hasState();if(!(!o&&a)){var s=this.currentStates,l=this.stateTransition;if(!(pt(s,e)>=0&&(t||s.length===1))){var u;if(this.stateProxy&&!a&&(u=this.stateProxy(e)),u||(u=this.states&&this.states[e]),!u&&!a){VC("State "+e+" not exists.");return}a||this.saveCurrentToNormalState(u);var c=!!(u&&u.hoverLayer||i);c&&this._toggleHoverLayerFlag(!0),this._applyStateObj(e,u,this._normalState,t,!n&&!this.__inHover&&l&&l.duration>0,l);var h=this._textContent,f=this._textGuide;return h&&h.useState(e,t,n,c),f&&f.useState(e,t,n,c),a?(this.currentStates=[],this._normalState={}):t?this.currentStates.push(e):this.currentStates=[e],this._updateAnimationTargets(),this.markRedraw(),!c&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ji),u}}},r.prototype.useStates=function(e,t,n){if(!e.length)this.clearStates();else{var i=[],a=this.currentStates,o=e.length,s=o===a.length;if(s){for(var l=0;l<o;l++)if(e[l]!==a[l]){s=!1;break}}if(s)return;for(var l=0;l<o;l++){var u=e[l],c=void 0;this.stateProxy&&(c=this.stateProxy(u,e)),c||(c=this.states[u]),c&&i.push(c)}var h=i[o-1],f=!!(h&&h.hoverLayer||n);f&&this._toggleHoverLayerFlag(!0);var d=this._mergeStates(i),p=this.stateTransition;this.saveCurrentToNormalState(d),this._applyStateObj(e.join(","),d,this._normalState,!1,!t&&!this.__inHover&&p&&p.duration>0,p);var g=this._textContent,v=this._textGuide;g&&g.useStates(e,t,f),v&&v.useStates(e,t,f),this._updateAnimationTargets(),this.currentStates=e.slice(),this.markRedraw(),!f&&this.__inHover&&(this._toggleHoverLayerFlag(!1),this.__dirty&=~ji)}},r.prototype.isSilent=function(){for(var e=this.silent,t=this.parent;!e&&t;){if(t.silent){e=!0;break}t=t.parent}return e},r.prototype._updateAnimationTargets=function(){for(var e=0;e<this.animators.length;e++){var t=this.animators[e];t.targetName&&t.changeTarget(this[t.targetName])}},r.prototype.removeState=function(e){var t=pt(this.currentStates,e);if(t>=0){var n=this.currentStates.slice();n.splice(t,1),this.useStates(n)}},r.prototype.replaceState=function(e,t,n){var i=this.currentStates.slice(),a=pt(i,e),o=pt(i,t)>=0;a>=0?o?i.splice(a,1):i[a]=t:n&&!o&&i.push(t),this.useStates(i)},r.prototype.toggleState=function(e,t){t?this.useState(e,!0):this.removeState(e)},r.prototype._mergeStates=function(e){for(var t={},n,i=0;i<e.length;i++){var a=e[i];pe(t,a),a.textConfig&&(n=n||{},pe(n,a.textConfig))}return n&&(t.textConfig=n),t},r.prototype._applyStateObj=function(e,t,n,i,a,o){var s=!(t&&i);t&&t.textConfig?(this.textConfig=pe({},i?this.textConfig:n.textConfig),pe(this.textConfig,t.textConfig)):s&&n.textConfig&&(this.textConfig=n.textConfig);for(var l={},u=!1,c=0;c<US.length;c++){var h=US[c],f=a&&ise[h];t&&t[h]!=null?f?(u=!0,l[h]=t[h]):this[h]=t[h]:s&&n[h]!=null&&(f?(u=!0,l[h]=n[h]):this[h]=n[h])}if(!a)for(var c=0;c<this.animators.length;c++){var d=this.animators[c],p=d.targetName;d.getLoop()||d.__changeFinalValue(p?(t||n)[p]:t||n)}u&&this._transitionState(e,l,o)},r.prototype._attachComponent=function(e){if(!(e.__zr&&!e.__hostTarget)&&e!==this){var t=this.__zr;t&&e.addSelfToZr(t),e.__zr=t,e.__hostTarget=this}},r.prototype._detachComponent=function(e){e.__zr&&e.removeSelfFromZr(e.__zr),e.__zr=null,e.__hostTarget=null},r.prototype.getClipPath=function(){return this._clipPath},r.prototype.setClipPath=function(e){this._clipPath&&this._clipPath!==e&&this.removeClipPath(),this._attachComponent(e),this._clipPath=e,this.markRedraw()},r.prototype.removeClipPath=function(){var e=this._clipPath;e&&(this._detachComponent(e),this._clipPath=null,this.markRedraw())},r.prototype.getTextContent=function(){return this._textContent},r.prototype.setTextContent=function(e){var t=this._textContent;t!==e&&(t&&t!==e&&this.removeTextContent(),e.innerTransformable=new _s,this._attachComponent(e),this._textContent=e,this.markRedraw())},r.prototype.setTextConfig=function(e){this.textConfig||(this.textConfig={}),pe(this.textConfig,e),this.markRedraw()},r.prototype.removeTextConfig=function(){this.textConfig=null,this.markRedraw()},r.prototype.removeTextContent=function(){var e=this._textContent;e&&(e.innerTransformable=null,this._detachComponent(e),this._textContent=null,this._innerTextDefaultStyle=null,this.markRedraw())},r.prototype.getTextGuideLine=function(){return this._textGuide},r.prototype.setTextGuideLine=function(e){this._textGuide&&this._textGuide!==e&&this.removeTextGuideLine(),this._attachComponent(e),this._textGuide=e,this.markRedraw()},r.prototype.removeTextGuideLine=function(){var e=this._textGuide;e&&(this._detachComponent(e),this._textGuide=null,this.markRedraw())},r.prototype.markRedraw=function(){this.__dirty|=ji;var e=this.__zr;e&&(this.__inHover?e.refreshHover():e.refresh()),this.__hostTarget&&this.__hostTarget.markRedraw()},r.prototype.dirty=function(){this.markRedraw()},r.prototype._toggleHoverLayerFlag=function(e){this.__inHover=e;var t=this._textContent,n=this._textGuide;t&&(t.__inHover=e),n&&(n.__inHover=e)},r.prototype.addSelfToZr=function(e){if(this.__zr!==e){this.__zr=e;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.addAnimator(t[n]);this._clipPath&&this._clipPath.addSelfToZr(e),this._textContent&&this._textContent.addSelfToZr(e),this._textGuide&&this._textGuide.addSelfToZr(e)}},r.prototype.removeSelfFromZr=function(e){if(this.__zr){this.__zr=null;var t=this.animators;if(t)for(var n=0;n<t.length;n++)e.animation.removeAnimator(t[n]);this._clipPath&&this._clipPath.removeSelfFromZr(e),this._textContent&&this._textContent.removeSelfFromZr(e),this._textGuide&&this._textGuide.removeSelfFromZr(e)}},r.prototype.animate=function(e,t,n){var i=e?this[e]:this,a=new KC(i,t,n);return e&&(a.targetName=e),this.addAnimator(a,e),a},r.prototype.addAnimator=function(e,t){var n=this.__zr,i=this;e.during(function(){i.updateDuringAnimation(t)}).done(function(){var a=i.animators,o=pt(a,e);o>=0&&a.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,i=n.length,a=[],o=0;o<i;o++){var s=n[o];!e||e===s.scope?s.stop(t):a.push(s)}return this.animators=a,this},r.prototype.animateTo=function(e,t,n){VS(this,e,t,n)},r.prototype.animateFrom=function(e,t,n){VS(this,e,t,n,!0)},r.prototype._transitionState=function(e,t,n,i){for(var a=VS(this,t,n,i),o=0;o<a.length;o++)a[o].__fromStateTransition=e},r.prototype.getBoundingRect=function(){return null},r.prototype.getPaintRect=function(){return null},r.initDefaultProps=function(){var e=r.prototype;e.type="element",e.name="",e.ignore=e.silent=e.isGroup=e.draggable=e.dragging=e.ignoreClip=e.__inHover=!1,e.__dirty=ji;function t(n,i,a,o){Object.defineProperty(e,n,{get:function(){if(!this[i]){var l=this[i]=[];s(this,l)}return this[i]},set:function(l){this[a]=l[0],this[o]=l[1],this[i]=l,s(this,l)}});function s(l,u){Object.defineProperty(u,0,{get:function(){return l[a]},set:function(c){l[a]=c}}),Object.defineProperty(u,1,{get:function(){return l[o]},set:function(c){l[o]=c}})}}Object.defineProperty&&(t("position","_legacyPos","x","y"),t("scale","_legacyScale","scaleX","scaleY"),t("origin","_legacyOrigin","originX","originY"))}(),r}();ir(ZC,Ba);ir(ZC,_s);function VS(r,e,t,n,i){t=t||{};var a=[];m4(r,"",r,e,t,n,a,i);var o=a.length,s=!1,l=t.done,u=t.aborted,c=function(){s=!0,o--,o<=0&&(s?l&&l():u&&u())},h=function(){o--,o<=0&&(s?l&&l():u&&u())};o||l&&l(),a.length>0&&t.during&&a[0].during(function(p,g){t.during(g)});for(var f=0;f<a.length;f++){var d=a[f];c&&d.done(c),h&&d.aborted(h),t.force&&d.duration(t.duration),d.start(t.easing)}return a}function GS(r,e,t){for(var n=0;n<t;n++)r[n]=e[n]}function ose(r){return ii(r[0])}function sse(r,e,t){if(ii(e[t]))if(ii(r[t])||(r[t]=[]),Fi(e[t])){var n=e[t].length;r[t].length!==n&&(r[t]=new e[t].constructor(n),GS(r[t],e[t],n))}else{var i=e[t],a=r[t],o=i.length;if(ose(i))for(var s=i[0].length,l=0;l<o;l++)a[l]?GS(a[l],i[l],s):a[l]=Array.prototype.slice.call(i[l]);else GS(a,i,o);a.length=i.length}else r[t]=e[t]}function lse(r,e){return r===e||ii(r)&&ii(e)&&use(r,e)}function use(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++)if(r[n]!==e[n])return!1;return!0}function m4(r,e,t,n,i,a,o,s){for(var l=wt(n),u=i.duration,c=i.delay,h=i.additive,f=i.setToFinal,d=!Qe(a),p=r.animators,g=[],v=0;v<l.length;v++){var m=l[v],y=n[m];if(y!=null&&t[m]!=null&&(d||a[m]))if(Qe(y)&&!ii(y)&&!p1(y)){if(e){s||(t[m]=y,r.updateDuringAnimation(e));continue}m4(r,m,t[m],y,i,a&&a[m],o,s)}else g.push(m);else s||(t[m]=y,r.updateDuringAnimation(e),g.push(m))}var _=g.length;if(!h&&_)for(var x=0;x<p.length;x++){var S=p[x];if(S.targetName===e){var A=S.stopTracks(g);if(A){var w=pt(p,S);p.splice(w,1)}}}if(i.force||(g=jt(g,function(T){return!lse(n[T],t[T])}),_=g.length),_>0||i.force&&!o.length){var M=void 0,C=void 0,b=void 0;if(s){C={},f&&(M={});for(var x=0;x<_;x++){var m=g[x];C[m]=t[m],f?M[m]=n[m]:t[m]=n[m]}}else if(f){b={};for(var x=0;x<_;x++){var m=g[x];b[m]=tv(t[m]),sse(t,n,m)}}var S=new KC(t,!1,!1,h?jt(p,function(P){return P.targetName===e}):null);S.targetName=e,i.scope&&(S.scope=i.scope),f&&M&&S.whenWithKeys(0,M,g),b&&S.whenWithKeys(0,b,g),S.whenWithKeys(u==null?500:u,s?C:n,g).delay(c||0),r.addAnimator(S,e),o.push(S)}}const y4=ZC;var _4=function(r){ae(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,i=0;i<n.length;i++)if(n[i].name===t)return n[i]},e.prototype.childCount=function(){return this._children.length},e.prototype.add=function(t){return t&&t!==this&&t.parent!==this&&(this._children.push(t),this._doAdd(t)),this},e.prototype.addBefore=function(t,n){if(t&&t!==this&&t.parent!==this&&n&&n.parent===this){var i=this._children,a=i.indexOf(n);a>=0&&(i.splice(a,0,t),this._doAdd(t))}return this},e.prototype.replace=function(t,n){var i=pt(this._children,t);return i>=0&&this.replaceAt(n,i),this},e.prototype.replaceAt=function(t,n){var i=this._children,a=i[n];if(t&&t!==this&&t.parent!==this&&t!==a){i[n]=t,a.parent=null;var o=this.__zr;o&&a.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,i=this._children,a=pt(i,t);return a<0?this:(i.splice(a,1),t.parent=null,n&&t.removeSelfFromZr(n),n&&n.refresh(),this)},e.prototype.removeAll=function(){for(var t=this._children,n=this.__zr,i=0;i<t.length;i++){var a=t[i];n&&a.removeSelfFromZr(n),a.parent=null}return t.length=0,this},e.prototype.eachChild=function(t,n){for(var i=this._children,a=0;a<i.length;a++){var o=i[a];t.call(n,o,a)}return this},e.prototype.traverse=function(t,n){for(var i=0;i<this._children.length;i++){var a=this._children[i],o=t.call(n,a);a.isGroup&&!o&&a.traverse(t,n)}return this},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.addSelfToZr(t)}},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++){var i=this._children[n];i.removeSelfFromZr(t)}},e.prototype.getBoundingRect=function(t){for(var n=new dt(0,0,0,0),i=t||this._children,a=[],o=null,s=0;s<i.length;s++){var l=i[s];if(!(l.ignore||l.invisible)){var u=l.getBoundingRect(),c=l.getLocalTransform(a);c?(dt.applyTransform(n,u,c),o=o||n.clone(),o.union(n)):(o=o||u.clone(),o.union(u))}}return o||n},e}(y4);_4.prototype.type="group";const rt=_4;/*! |
|
* ZRender, a high performance 2d drawing library. |
|
* |
|
* Copyright (c) 2013, Baidu Inc. |
|
* All rights reserved. |
|
* |
|
* LICENSE |
|
* https://github.com/ecomfe/zrender/blob/master/LICENSE.txt |
|
*/var a0={},x4={};function cse(r){delete x4[r]}function hse(r){if(!r)return!1;if(typeof r=="string")return J0(r,1)<hT;if(r.colorStops){for(var e=r.colorStops,t=0,n=e.length,i=0;i<n;i++)t+=J0(e[i].color,1);return t/=n,t<hT}return!1}var fse=function(){function r(e,t,n){var i=this;this._sleepAfterStill=10,this._stillFrameAccum=0,this._needsRefresh=!0,this._needsRefreshHover=!0,this._darkMode=!1,n=n||{},this.dom=t,this.id=e;var a=new Aoe,o=n.renderer||"canvas";a0[o]||(o=wt(a0)[0]),n.useDirtyRect=n.useDirtyRect==null?!1:n.useDirtyRect;var s=new a0[o](t,a,n,e),l=n.ssr||s.ssrOnly;this.storage=a,this.painter=s;var u=!kt.node&&!kt.worker&&!l?new tse(s.getViewportRoot(),s.root):null,c=n.useCoarsePointer,h=c==null||c==="auto"?kt.touchEventsSupported:!!c,f=44,d;h&&(d=ot(n.pointerSize,f)),this.handler=new moe(a,s,u,s.root,d),this.animation=new Yoe({stage:{update:l?null:function(){return i._flush(!0)}}}),l||this.animation.start()}return r.prototype.add=function(e){this._disposed||!e||(this.storage.addRoot(e),e.addSelfToZr(this),this.refresh())},r.prototype.remove=function(e){this._disposed||!e||(this.storage.delRoot(e),e.removeSelfFromZr(this),this.refresh())},r.prototype.configLayer=function(e,t){this._disposed||(this.painter.configLayer&&this.painter.configLayer(e,t),this.refresh())},r.prototype.setBackgroundColor=function(e){this._disposed||(this.painter.setBackgroundColor&&this.painter.setBackgroundColor(e),this.refresh(),this._backgroundColor=e,this._darkMode=hse(e))},r.prototype.getBackgroundColor=function(){return this._backgroundColor},r.prototype.setDarkMode=function(e){this._darkMode=e},r.prototype.isDarkMode=function(){return this._darkMode},r.prototype.refreshImmediately=function(e){this._disposed||(e||this.animation.update(!0),this._needsRefresh=!1,this.painter.refresh(),this._needsRefresh=!1)},r.prototype.refresh=function(){this._disposed||(this._needsRefresh=!0,this.animation.start())},r.prototype.flush=function(){this._disposed||this._flush(!1)},r.prototype._flush=function(e){var t,n=pf();this._needsRefresh&&(t=!0,this.refreshImmediately(e)),this._needsRefreshHover&&(t=!0,this.refreshHoverImmediately());var i=pf();t?(this._stillFrameAccum=0,this.trigger("rendered",{elapsedTime:i-n})):this._sleepAfterStill>0&&(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;t<e.length;t++)e[t]instanceof rt&&e[t].removeSelfFromZr(this);this.storage.delAllRoots(),this.painter.clear()}},r.prototype.dispose=function(){this._disposed||(this.animation.stop(),this.clear(),this.storage.dispose(),this.painter.dispose(),this.handler.dispose(),this.animation=this.storage=this.painter=this.handler=null,this._disposed=!0,cse(this.id))},r}();function pI(r,e){var t=new fse(GU(),r,e);return x4[t.id]=t,t}function dse(r,e){a0[r]=e}var pT;function pse(r){if(typeof pT=="function")return pT(r)}function vse(r){pT=r}var vI=1e-4,S4=20;function gse(r){return r.replace(/^\s+|\s+$/g,"")}function Kt(r,e,t,n){var i=e[0],a=e[1],o=t[0],s=t[1],l=a-i,u=s-o;if(l===0)return u===0?o:(o+s)/2;if(n)if(l>0){if(r<=i)return o;if(r>=a)return s}else{if(r>=i)return o;if(r<=a)return s}else{if(r===i)return o;if(r===a)return s}return(r-i)/l*u+o}function Pe(r,e){switch(r){case"center":case"middle":r="50%";break;case"left":case"top":r="0%";break;case"right":case"bottom":r="100%";break}return ke(r)?gse(r).match(/%$/)?parseFloat(r)/100*e:parseFloat(r):r==null?NaN:+r}function Vn(r,e,t){return e==null&&(e=10),e=Math.min(Math.max(0,e),S4),r=(+r).toFixed(e),t?r:+r}function Pa(r){return r.sort(function(e,t){return e-t}),r}function Oo(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 mse(r)}function mse(r){var e=r.toString().toLowerCase(),t=e.indexOf("e"),n=t>0?+e.slice(t+1):0,i=t>0?t:e.length,a=e.indexOf("."),o=a<0?0:i-1-a;return Math.max(0,o-n)}function A4(r,e){var t=Math.log,n=Math.LN10,i=Math.floor(t(r[1]-r[0])/n),a=Math.round(t(Math.abs(e[1]-e[0]))/n),o=Math.min(Math.max(-i+a,0),20);return isFinite(o)?o:20}function yse(r,e){var t=$o(r,function(d,p){return d+(isNaN(p)?0:p)},0);if(t===0)return[];for(var n=Math.pow(10,e),i=xe(r,function(d){return(isNaN(d)?0:d)/t*n*100}),a=n*100,o=xe(i,function(d){return Math.floor(d)}),s=$o(o,function(d,p){return d+p},0),l=xe(i,function(d,p){return d-o[p]});s<a;){for(var u=Number.NEGATIVE_INFINITY,c=null,h=0,f=l.length;h<f;++h)l[h]>u&&(u=l[h],c=h);++o[c],l[c]=0,++s}return xe(o,function(d){return d/n})}function _se(r,e){var t=Math.max(Oo(r),Oo(e)),n=r+e;return t>S4?n:Vn(n,t)}var gI=9007199254740991;function w4(r){var e=Math.PI*2;return(r%e+e)%e}function Vv(r){return r>-vI&&r<vI}var xse=/^(?:(\d{4})(?:[-\/](\d{1,2})(?:[-\/](\d{1,2})(?:[T ](\d{1,2})(?::(\d{1,2})(?::(\d{1,2})(?:[.,](\d+))?)?)?(Z|[\+\-]\d\d:?\d\d)?)?)?)?)?$/;function qo(r){if(r instanceof Date)return r;if(ke(r)){var e=xse.exec(r);if(!e)return new Date(NaN);if(e[8]){var t=+e[4]||0;return e[8].toUpperCase()!=="Z"&&(t-=+e[8].slice(0,3)),new Date(Date.UTC(+e[1],+(e[2]||1)-1,+e[3]||1,t,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0))}else return new Date(+e[1],+(e[2]||1)-1,+e[3]||1,+e[4]||0,+(e[5]||0),+e[6]||0,e[7]?+e[7].substring(0,3):0)}else if(r==null)return new Date(NaN);return new Date(Math.round(r))}function Sse(r){return Math.pow(10,QC(r))}function QC(r){if(r===0)return 0;var e=Math.floor(Math.log(r)/Math.LN10);return r/Math.pow(10,e)>=10&&e++,e}function b4(r,e){var t=QC(r),n=Math.pow(10,t),i=r/n,a;return e?i<1.5?a=1:i<2.5?a=2:i<4?a=3:i<7?a=5:a=10:i<1?a=1:i<2?a=2:i<3?a=3:i<5?a=5:a=10,r=a*n,t>=-20?+r.toFixed(t<0?-t:0):r}function HS(r,e){var t=(r.length-1)*e+1,n=Math.floor(t),i=+r[n-1],a=t-n;return a?i+a*(r[n]-i):i}function mI(r){r.sort(function(l,u){return s(l,u,0)?-1:1});for(var e=-1/0,t=1,n=0;n<r.length;){for(var i=r[n].interval,a=r[n].close,o=0;o<2;o++)i[o]<=e&&(i[o]=e,a[o]=o?1:1-t),e=i[o],t=a[o];i[0]===i[1]&&a[0]*a[1]!==1?r.splice(n,1):n++}return r;function s(l,u,c){return l.interval[c]<u.interval[c]||l.interval[c]===u.interval[c]&&(l.close[c]-u.close[c]===(c?-1:1)||!c&&s(l,u,1))}}function Rs(r){var e=parseFloat(r);return e==r&&(e!==0||!ke(r)||r.indexOf("x")<=0)?e:NaN}function T4(r){return!isNaN(Rs(r))}function M4(){return Math.round(Math.random()*9)}function C4(r,e){return e===0?r:C4(e,r%e)}function yI(r,e){return r==null?e:e==null?r:r*e/C4(r,e)}function qt(r){throw new Error(r)}function _I(r,e,t){return(e-r)*t+r}var E4="series\0",L4="\0_ec_\0";function nn(r){return r instanceof Array?r:r==null?[]:[r]}function zc(r,e,t){if(r){r[e]=r[e]||{},r.emphasis=r.emphasis||{},r.emphasis[e]=r.emphasis[e]||{};for(var n=0,i=t.length;n<i;n++){var a=t[n];!r.emphasis[e].hasOwnProperty(a)&&r[e].hasOwnProperty(a)&&(r.emphasis[e][a]=r[e][a])}}}var xI=["fontStyle","fontWeight","fontSize","fontFamily","rich","tag","color","textBorderColor","textBorderWidth","width","height","lineHeight","align","verticalAlign","baseline","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY","backgroundColor","borderColor","borderWidth","borderRadius","padding"];function gd(r){return Qe(r)&&!_e(r)&&!(r instanceof Date)?r.value:r}function Ase(r){return Qe(r)&&!(r instanceof Array)}function P4(r,e,t){var n=t==="normalMerge",i=t==="replaceMerge",a=t==="replaceAll";r=r||[],e=(e||[]).slice();var o=He();k(e,function(l,u){if(!Qe(l)){e[u]=null;return}});var s=wse(r,o,t);return(n||i)&&bse(s,r,o,e),n&&Tse(s,e),n||i?Mse(s,e,i):a&&Cse(s,e),Ese(s),s}function wse(r,e,t){var n=[];if(t==="replaceAll")return n;for(var i=0;i<r.length;i++){var a=r[i];a&&a.id!=null&&e.set(a.id,i),n.push({existing:t==="replaceMerge"||Gv(a)?null:a,newOption:null,keyInfo:null,brandNew:null})}return n}function bse(r,e,t,n){k(n,function(i,a){if(!(!i||i.id==null)){var o=nv(i.id),s=t.get(o);if(s!=null){var l=r[s];gi(!l.newOption,'Duplicated option on id "'+o+'".'),l.newOption=i,l.existing=e[s],n[a]=null}}})}function Tse(r,e){k(e,function(t,n){if(!(!t||t.name==null))for(var i=0;i<r.length;i++){var a=r[i].existing;if(!r[i].newOption&&a&&(a.id==null||t.id==null)&&!Gv(t)&&!Gv(a)&&R4("name",a,t)){r[i].newOption=t,e[n]=null;return}}})}function Mse(r,e,t){k(e,function(n){if(n){for(var i,a=0;(i=r[a])&&(i.newOption||Gv(i.existing)||i.existing&&n.id!=null&&!R4("id",n,i.existing));)a++;i?(i.newOption=n,i.brandNew=t):r.push({newOption:n,brandNew:t,existing:null,keyInfo:null}),a++}})}function Cse(r,e){k(e,function(t){r.push({newOption:t,brandNew:!0,existing:null,keyInfo:null})})}function Ese(r){var e=He();k(r,function(t){var n=t.existing;n&&e.set(n.id,t)}),k(r,function(t){var n=t.newOption;gi(!n||n.id==null||!e.get(n.id)||e.get(n.id)===t,"id duplicates: "+(n&&n.id)),n&&n.id!=null&&e.set(n.id,t),!t.keyInfo&&(t.keyInfo={})}),k(r,function(t,n){var i=t.existing,a=t.newOption,o=t.keyInfo;if(Qe(a)){if(o.name=a.name!=null?nv(a.name):i?i.name:E4+n,i)o.id=nv(i.id);else if(a.id!=null)o.id=nv(a.id);else{var s=0;do o.id="\0"+o.name+"\0"+s++;while(e.get(o.id))}e.set(o.id,t)}})}function R4(r,e,t){var n=fr(e[r],null),i=fr(t[r],null);return n!=null&&i!=null&&n===i}function nv(r){return fr(r,"")}function fr(r,e){return r==null?e:ke(r)?r:Ft(r)||$b(r)?r+"":e}function JC(r){var e=r.name;return!!(e&&e.indexOf(E4))}function Gv(r){return r&&r.id!=null&&nv(r.id).indexOf(L4)===0}function Lse(r){return L4+r}function Pse(r,e,t){k(r,function(n){var i=n.newOption;Qe(i)&&(n.keyInfo.mainType=e,n.keyInfo.subType=Rse(e,i,n.existing,t))})}function Rse(r,e,t,n){var i=e.type?e.type:t?t.subType:n.determineSubType(r,e);return i}function Dse(r,e){var t={},n={};return i(r||[],t),i(e||[],n,t),[a(t),a(n)];function i(o,s,l){for(var u=0,c=o.length;u<c;u++){var h=fr(o[u].seriesId,null);if(h==null)return;for(var f=nn(o[u].dataIndex),d=l&&l[h],p=0,g=f.length;p<g;p++){var v=f[p];d&&d[v]?d[v]=null:(s[h]||(s[h]={}))[v]=1}}}function a(o,s){var l=[];for(var u in o)if(o.hasOwnProperty(u)&&o[u]!=null)if(s)l.push(+u);else{var c=a(o[u],!0);c.length&&l.push({seriesId:u,dataIndex:c})}return l}}function Uc(r,e){if(e.dataIndexInside!=null)return e.dataIndexInside;if(e.dataIndex!=null)return _e(e.dataIndex)?xe(e.dataIndex,function(t){return r.indexOfRawIndex(t)}):r.indexOfRawIndex(e.dataIndex);if(e.name!=null)return _e(e.name)?xe(e.name,function(t){return r.indexOfName(t)}):r.indexOfName(e.name)}function Pt(){var r="__ec_inner_"+Ise++;return function(e){return e[r]||(e[r]={})}}var Ise=M4();function rv(r,e,t){var n=e2(e,t),i=n.mainTypeSpecified,a=n.queryOptionMap,o=n.others,s=o,l=t?t.defaultMainType:null;return!i&&l&&a.set(l,{}),a.each(function(u,c){var h=bg(r,c,u,{useDefault:l===c,enableAll:t&&t.enableAll!=null?t.enableAll:!0,enableNone:t&&t.enableNone!=null?t.enableNone:!0});s[c+"Models"]=h.models,s[c+"Model"]=h.models[0]}),s}function e2(r,e){var t;if(ke(r)){var n={};n[r+"Index"]=0,t=n}else t=r;var i=He(),a={},o=!1;return k(t,function(s,l){if(l==="dataIndex"||l==="dataIndexInside"){a[l]=s;return}var u=l.match(/^(\w+)(Index|Id|Name)$/)||[],c=u[1],h=(u[2]||"").toLowerCase();if(!(!c||!h||e&&e.includeMainTypes&&pt(e.includeMainTypes,c)<0)){o=o||!!c;var f=i.get(c)||i.set(c,{});f[h]=s}}),{mainTypeSpecified:o,queryOptionMap:i,others:a}}var nr={useDefault:!0,enableAll:!1,enableNone:!1},Nse={useDefault:!1,enableAll:!0,enableNone:!0};function bg(r,e,t,n){n=n||nr;var i=t.index,a=t.id,o=t.name,s={models:null,specified:i!=null||a!=null||o!=null};if(!s.specified){var l=void 0;return s.models=n.useDefault&&(l=r.getComponent(e))?[l]:[],s}return i==="none"||i===!1?(gi(n.enableNone,'`"none"` or `false` is not a valid value on index option.'),s.models=[],s):(i==="all"&&(gi(n.enableAll,'`"all"` is not a valid value on index option.'),i=a=o=null),s.models=r.queryComponents({mainType:e,index:i,id:a,name:o}),s)}function D4(r,e,t){r.setAttribute?r.setAttribute(e,t):r[e]=t}function kse(r,e){return r.getAttribute?r.getAttribute(e):r[e]}function Ose(r){return r==="auto"?kt.domSupported?"html":"richText":r||"html"}function vT(r,e){var t=He(),n=[];return k(r,function(i){var a=e(i);(t.get(a)||(n.push(a),t.set(a,[]))).push(i)}),{keys:n,buckets:t}}function I4(r,e,t,n,i){var a=e==null||e==="auto";if(n==null)return n;if(Ft(n)){var o=_I(t||0,n,i);return Vn(o,a?Math.max(Oo(t||0),Oo(n)):e)}else{if(ke(n))return i<1?t:n;for(var s=[],l=t,u=n,c=Math.max(l?l.length:0,u.length),h=0;h<c;++h){var f=r.getDimensionInfo(h);if(f&&f.type==="ordinal")s[h]=(i<1&&l?l:u)[h];else{var d=l&&l[h]?l[h]:0,p=u[h],o=_I(d,p,i);s[h]=Vn(o,a?Math.max(Oo(d),Oo(p)):e)}}return s}}var Fse=".",bu="___EC__COMPONENT__CONTAINER___",N4="___EC__EXTENDED_CLASS___";function Fo(r){var e={main:"",sub:""};if(r){var t=r.split(Fse);e.main=t[0]||"",e.sub=t[1]||""}return e}function Bse(r){gi(/^[a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)?$/.test(r),'componentType "'+r+'" illegal')}function zse(r){return!!(r&&r[N4])}function t2(r,e){r.$constructor=r,r.extend=function(t){var n=this,i;return Use(n)?i=function(a){ae(o,a);function o(){return a.apply(this,arguments)||this}return o}(n):(i=function(){(t.$constructor||n).apply(this,arguments)},Fae(i,this)),pe(i.prototype,t),i[N4]=!0,i.extend=this.extend,i.superCall=Hse,i.superApply=Wse,i.superClass=n,i}}function Use(r){return qe(r)&&/^class\s/.test(Function.prototype.toString.call(r))}function k4(r,e){r.extend=e.extend}var Vse=Math.round(Math.random()*10);function Gse(r){var e=["__\0is_clz",Vse++].join("_");r.prototype[e]=!0,r.isInstance=function(t){return!!(t&&t[e])}}function Hse(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];return this.superClass.prototype[e].apply(r,t)}function Wse(r,e,t){return this.superClass.prototype[e].apply(r,t)}function _1(r){var e={};r.registerClass=function(n){var i=n.type||n.prototype.type;if(i){Bse(i),n.prototype.type=i;var a=Fo(i);if(!a.sub)e[a.main]=n;else if(a.sub!==bu){var o=t(a);o[a.sub]=n}}return n},r.getClass=function(n,i,a){var o=e[n];if(o&&o[bu]&&(o=i?o[i]:null),a&&!o)throw new Error(i?"Component "+n+"."+(i||"")+" is used but not imported.":n+".type should be specified.");return o},r.getClassesByMainType=function(n){var i=Fo(n),a=[],o=e[i.main];return o&&o[bu]?k(o,function(s,l){l!==bu&&a.push(s)}):a.push(o),a},r.hasClass=function(n){var i=Fo(n);return!!e[i.main]},r.getAllClassMainTypes=function(){var n=[];return k(e,function(i,a){n.push(a)}),n},r.hasSubTypes=function(n){var i=Fo(n),a=e[i.main];return a&&a[bu]};function t(n){var i=e[n.main];return(!i||!i[bu])&&(i=e[n.main]={},i[bu]=!0),i}}function Vc(r,e){for(var t=0;t<r.length;t++)r[t][1]||(r[t][1]=r[t][0]);return e=e||!1,function(n,i,a){for(var o={},s=0;s<r.length;s++){var l=r[s][1];if(!(i&&pt(i,l)>=0||a&&pt(a,l)<0)){var u=n.getShallow(l,e);u!=null&&(o[r[s][0]]=u)}}return o}}var $se=[["fill","color"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["opacity"],["shadowColor"]],Xse=Vc($se),Yse=function(){function r(){}return r.prototype.getAreaStyle=function(e,t){return Xse(this,e,t)},r}(),gT=new Ag(50);function qse(r){if(typeof r=="string"){var e=gT.get(r);return e&&e.image}else return r}function n2(r,e,t,n,i){if(r)if(typeof r=="string"){if(e&&e.__zrImageSrc===r||!t)return e;var a=gT.get(r),o={hostEl:t,cb:n,cbPayload:i};return a?(e=a.image,!x1(e)&&a.pending.push(o)):(e=ql.loadImage(r,SI,SI),e.__zrImageSrc=r,gT.put(r,e.__cachedImgObj={image:e,pending:[o]})),e}else return r;else return e}function SI(){var r=this.__cachedImgObj;this.onload=this.onerror=this.__cachedImgObj=null;for(var e=0;e<r.pending.length;e++){var t=r.pending[e],n=t.cb;n&&n(this,t.cbPayload),t.hostEl.dirty()}r.pending.length=0}function x1(r){return r&&r.width&&r.height}var WS=/\{([a-zA-Z0-9_]+)\|([^}]*)\}/g;function jse(r,e,t,n,i,a){if(!t){r.text="",r.isTruncated=!1;return}var o=(e+"").split(` |
|
`);a=O4(t,n,i,a);for(var s=!1,l={},u=0,c=o.length;u<c;u++)F4(l,o[u],a),o[u]=l.textLine,s=s||l.isTruncated;r.text=o.join(` |
|
`),r.isTruncated=s}function O4(r,e,t,n){n=n||{};var i=pe({},n);i.font=e,t=ot(t,"..."),i.maxIterations=ot(n.maxIterations,2);var a=i.minChar=ot(n.minChar,0);i.cnCharWidth=ra("国",e);var o=i.ascCharWidth=ra("a",e);i.placeholder=ot(n.placeholder,"");for(var s=r=Math.max(0,r-1),l=0;l<a&&s>=o;l++)s-=o;var u=ra(t,e);return u>s&&(t="",u=0),s=r-u,i.ellipsis=t,i.ellipsisWidth=u,i.contentWidth=s,i.containerWidth=r,i}function F4(r,e,t){var n=t.containerWidth,i=t.font,a=t.contentWidth;if(!n){r.textLine="",r.isTruncated=!1;return}var o=ra(e,i);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?Kse(e,a,t.ascCharWidth,t.cnCharWidth):o>0?Math.floor(e.length*a/o):0;e=e.substr(0,l),o=ra(e,i)}e===""&&(e=t.placeholder),r.textLine=e,r.isTruncated=!0}function Kse(r,e,t,n){for(var i=0,a=0,o=r.length;a<o&&i<e;a++){var s=r.charCodeAt(a);i+=0<=s&&s<=127?t:n}return a}function Zse(r,e){r!=null&&(r+="");var t=e.overflow,n=e.padding,i=e.font,a=t==="truncate",o=y1(i),s=ot(e.lineHeight,o),l=!!e.backgroundColor,u=e.lineOverflow==="truncate",c=!1,h=e.width,f;h!=null&&(t==="break"||t==="breakAll")?f=r?B4(r,e.font,h,t==="breakAll",0).lines:[]:f=r?r.split(` |
|
`):[];var d=f.length*s,p=ot(e.height,d);if(d>p&&u){var g=Math.floor(p/s);c=c||f.length>g,f=f.slice(0,g)}if(r&&a&&h!=null)for(var v=O4(h,i,e.ellipsis,{minChar:e.truncateMinChar,placeholder:e.placeholder}),m={},y=0;y<f.length;y++)F4(m,f[y],v),f[y]=m.textLine,c=c||m.isTruncated;for(var _=p,x=0,y=0;y<f.length;y++)x=Math.max(ra(f[y],i),x);h==null&&(h=x);var S=x;return n&&(_+=n[0]+n[2],S+=n[1]+n[3],h+=n[1]+n[3]),l&&(S=h),{lines:f,height:p,outerWidth:S,outerHeight:_,lineHeight:s,calculatedLineHeight:o,contentWidth:x,contentHeight:d,width:h,isTruncated:c}}var Qse=function(){function r(){}return r}(),AI=function(){function r(e){this.tokens=[],e&&(this.tokens=e)}return r}(),Jse=function(){function r(){this.width=0,this.height=0,this.contentWidth=0,this.contentHeight=0,this.outerWidth=0,this.outerHeight=0,this.lines=[],this.isTruncated=!1}return r}();function ele(r,e){var t=new Jse;if(r!=null&&(r+=""),!r)return t;for(var n=e.width,i=e.height,a=e.overflow,o=(a==="break"||a==="breakAll")&&n!=null?{width:n,accumWidth:0,breakAll:a==="breakAll"}:null,s=WS.lastIndex=0,l;(l=WS.exec(r))!=null;){var u=l.index;u>s&&$S(t,r.substring(s,u),e,o),$S(t,l[2],e,o,l[1]),s=WS.lastIndex}s<r.length&&$S(t,r.substring(s,r.length),e,o);var c=[],h=0,f=0,d=e.padding,p=a==="truncate",g=e.lineOverflow==="truncate",v={};function m(O,V,H){O.width=V,O.lineHeight=H,h+=H,f=Math.max(f,V)}e:for(var y=0;y<t.lines.length;y++){for(var _=t.lines[y],x=0,S=0,A=0;A<_.tokens.length;A++){var w=_.tokens[A],M=w.styleName&&e.rich[w.styleName]||{},C=w.textPadding=M.padding,b=C?C[1]+C[3]:0,T=w.font=M.font||e.font;w.contentHeight=y1(T);var P=ot(M.height,w.contentHeight);if(w.innerHeight=P,C&&(P+=C[0]+C[2]),w.height=P,w.lineHeight=Go(M.lineHeight,e.lineHeight,P),w.align=M&&M.align||e.align,w.verticalAlign=M&&M.verticalAlign||"middle",g&&i!=null&&h+w.lineHeight>i){var D=t.lines.length;A>0?(_.tokens=_.tokens.slice(0,A),m(_,S,x),t.lines=t.lines.slice(0,y+1)):t.lines=t.lines.slice(0,y),t.isTruncated=t.isTruncated||t.lines.length<D;break e}var L=M.width,E=L==null||L==="auto";if(typeof L=="string"&&L.charAt(L.length-1)==="%")w.percentWidth=L,c.push(w),w.contentWidth=ra(w.text,T);else{if(E){var I=M.backgroundColor,N=I&&I.image;N&&(N=qse(N),x1(N)&&(w.width=Math.max(w.width,N.width*P/N.height)))}var R=p&&n!=null?n-S:null;R!=null&&R<w.width?!E||R<b?(w.text="",w.width=w.contentWidth=0):(jse(v,w.text,R-b,T,e.ellipsis,{minChar:e.truncateMinChar}),w.text=v.text,t.isTruncated=t.isTruncated||v.isTruncated,w.width=w.contentWidth=ra(w.text,T)):w.contentWidth=ra(w.text,T)}w.width+=b,S+=w.width,M&&(x=Math.max(x,w.lineHeight))}m(_,S,x)}t.outerWidth=t.width=ot(n,f),t.outerHeight=t.height=ot(i,h),t.contentHeight=h,t.contentWidth=f,d&&(t.outerWidth+=d[1]+d[3],t.outerHeight+=d[0]+d[2]);for(var y=0;y<c.length;y++){var w=c[y],F=w.percentWidth;w.width=parseInt(F,10)/100*t.width}return t}function $S(r,e,t,n,i){var a=e==="",o=i&&t.rich[i]||{},s=r.lines,l=o.font||t.font,u=!1,c,h;if(n){var f=o.padding,d=f?f[1]+f[3]:0;if(o.width!=null&&o.width!=="auto"){var p=so(o.width,n.width)+d;s.length>0&&p+n.accumWidth>n.width&&(c=e.split(` |
|
`),u=!0),n.accumWidth=p}else{var g=B4(e,l,n.width,n.breakAll,n.accumWidth);n.accumWidth=g.accumWidth+d,h=g.linesWidths,c=g.lines}}else c=e.split(` |
|
`);for(var v=0;v<c.length;v++){var m=c[v],y=new Qse;if(y.styleName=i,y.text=m,y.isLineHolder=!m&&!a,typeof o.width=="number"?y.width=o.width:y.width=h?h[v]:ra(m,l),!v&&!u){var _=(s[s.length-1]||(s[0]=new AI)).tokens,x=_.length;x===1&&_[0].isLineHolder?_[0]=y:(m||!x||a)&&_.push(y)}else s.push(new AI([y]))}}function tle(r){var e=r.charCodeAt(0);return e>=32&&e<=591||e>=880&&e<=4351||e>=4608&&e<=5119||e>=7680&&e<=8303}var nle=$o(",&?/;] ".split(""),function(r,e){return r[e]=!0,r},{});function rle(r){return tle(r)?!!nle[r]:!0}function B4(r,e,t,n,i){for(var a=[],o=[],s="",l="",u=0,c=0,h=0;h<r.length;h++){var f=r.charAt(h);if(f===` |
|
`){l&&(s+=l,c+=u),a.push(s),o.push(c),s="",l="",u=0,c=0;continue}var d=ra(f,e),p=n?!1:!rle(f);if(a.length?c+d>t:i+c+d>t){c?(s||l)&&(p?(s||(s=l,l="",u=0,c=u),a.push(s),o.push(c-u),l+=f,u+=d,s="",c=u):(l&&(s+=l,l="",u=0),a.push(s),o.push(c),s=f,c=d)):p?(a.push(l),o.push(u),l=f,u=d):(a.push(f),o.push(d));continue}c+=d,p?(l+=f,u+=d):(l&&(s+=l,l="",u=0),s+=f)}return!a.length&&!s&&(s=r,l="",u=0),l&&(s+=l),s&&(a.push(s),o.push(c)),a.length===1&&(c+=i),{accumWidth:c,lines:a,linesWidths:o}}var mT="__zr_style_"+Math.round(Math.random()*10),Mc={shadowBlur:0,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"#000",opacity:1,blend:"source-over"},S1={style:{shadowBlur:!0,shadowOffsetX:!0,shadowOffsetY:!0,shadowColor:!0,opacity:!0}};Mc[mT]=!0;var wI=["z","z2","invisible"],ile=["invisible"],ale=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype._init=function(t){for(var n=wt(t),i=0;i<n.length;i++){var a=n[i];a==="style"?this.useStyle(t[a]):r.prototype.attrKV.call(this,a,t[a])}this.style||this.useStyle({})},e.prototype.beforeBrush=function(){},e.prototype.afterBrush=function(){},e.prototype.innerBeforeBrush=function(){},e.prototype.innerAfterBrush=function(){},e.prototype.shouldBePainted=function(t,n,i,a){var o=this.transform;if(this.ignore||this.invisible||this.style.opacity===0||this.culling&&ole(this,t,n)||o&&!o[0]&&!o[3])return!1;if(i&&this.__clipPaths){for(var s=0;s<this.__clipPaths.length;++s)if(this.__clipPaths[s].isZeroArea())return!1}if(a&&this.parent)for(var l=this.parent;l;){if(l.ignore)return!1;l=l.parent}return!0},e.prototype.contain=function(t,n){return this.rectContain(t,n)},e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.rectContain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();return a.contain(i[0],i[1])},e.prototype.getPaintRect=function(){var t=this._paintRect;if(!this._paintRect||this.__dirty){var n=this.transform,i=this.getBoundingRect(),a=this.style,o=a.shadowBlur||0,s=a.shadowOffsetX||0,l=a.shadowOffsetY||0;t=this._paintRect||(this._paintRect=new dt(0,0,0,0)),n?dt.applyTransform(t,i,n):t.copy(i),(o||s||l)&&(t.width+=o*2+Math.abs(s),t.height+=o*2+Math.abs(l),t.x=Math.min(t.x,t.x+s-o),t.y=Math.min(t.y,t.y+l-o));var u=this.dirtyRectTolerance;t.isZero()||(t.x=Math.floor(t.x-u),t.y=Math.floor(t.y-u),t.width=Math.ceil(t.width+1+u*2),t.height=Math.ceil(t.height+1+u*2))}return t},e.prototype.setPrevPaintRect=function(t){t?(this._prevPaintRect=this._prevPaintRect||new dt(0,0,0,0),this._prevPaintRect.copy(t)):this._prevPaintRect=null},e.prototype.getPrevPaintRect=function(){return this._prevPaintRect},e.prototype.animateStyle=function(t){return this.animate("style",t)},e.prototype.updateDuringAnimation=function(t){t==="style"?this.dirtyStyle():this.markRedraw()},e.prototype.attrKV=function(t,n){t!=="style"?r.prototype.attrKV.call(this,t,n):this.style?this.setStyle(n):this.useStyle(n)},e.prototype.setStyle=function(t,n){return typeof t=="string"?this.style[t]=n:pe(this.style,t),this.dirtyStyle(),this},e.prototype.dirtyStyle=function(t){t||this.markRedraw(),this.__dirty|=Lp,this._rect&&(this._rect=null)},e.prototype.dirty=function(){this.dirtyStyle()},e.prototype.styleChanged=function(){return!!(this.__dirty&Lp)},e.prototype.styleUpdated=function(){this.__dirty&=~Lp},e.prototype.createStyle=function(t){return v1(Mc,t)},e.prototype.useStyle=function(t){t[mT]||(t=this.createStyle(t)),this.__inHover?this.__hoverStyle=t:this.style=t,this.dirtyStyle()},e.prototype.isStyleObject=function(t){return t[mT]},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.style&&!n.style&&(n.style=this._mergeStyle(this.createStyle(),this.style)),this._savePrimaryToNormal(t,n,wI)},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.style?o?a?u=n.style:(u=this._mergeStyle(this.createStyle(),i.style),this._mergeStyle(u,n.style)):(u=this._mergeStyle(this.createStyle(),a?this.style:i.style),this._mergeStyle(u,n.style)):l&&(u=i.style),u)if(o){var c=this.style;if(this.style=this.createStyle(l?{}:c),l)for(var h=wt(c),f=0;f<h.length;f++){var d=h[f];d in u&&(u[d]=u[d],this.style[d]=c[d])}for(var p=wt(u),f=0;f<p.length;f++){var d=p[f];this.style[d]=this.style[d]}this._transitionState(t,{style:u},s,this.getAnimationStyleProps())}else this.useStyle(u);for(var g=this.__inHover?ile:wI,f=0;f<g.length;f++){var d=g[f];n&&n[d]!=null?this[d]=n[d]:l&&i[d]!=null&&(this[d]=i[d])}},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),i,a=0;a<t.length;a++){var o=t[a];o.style&&(i=i||{},this._mergeStyle(i,o.style))}return i&&(n.style=i),n},e.prototype._mergeStyle=function(t,n){return pe(t,n),t},e.prototype.getAnimationStyleProps=function(){return S1},e.initDefaultProps=function(){var t=e.prototype;t.type="displayable",t.invisible=!1,t.z=0,t.z2=0,t.zlevel=0,t.culling=!1,t.cursor="pointer",t.rectHover=!1,t.incremental=!1,t._rect=null,t.dirtyRectTolerance=0,t.__dirty=ji|Lp}(),e}(y4),XS=new dt(0,0,0,0),YS=new dt(0,0,0,0);function ole(r,e,t){return XS.copy(r.getBoundingRect()),r.transform&&XS.applyTransform(r.transform),YS.width=e,YS.height=t,!XS.intersect(YS)}const ka=ale;var wi=Math.min,bi=Math.max,qS=Math.sin,jS=Math.cos,Tu=Math.PI*2,Ym=qc(),qm=qc(),jm=qc();function A1(r,e,t){if(r.length!==0){for(var n=r[0],i=n[0],a=n[0],o=n[1],s=n[1],l=1;l<r.length;l++)n=r[l],i=wi(i,n[0]),a=bi(a,n[0]),o=wi(o,n[1]),s=bi(s,n[1]);e[0]=i,e[1]=o,t[0]=a,t[1]=s}}function bI(r,e,t,n,i,a){i[0]=wi(r,t),i[1]=wi(e,n),a[0]=bi(r,t),a[1]=bi(e,n)}var TI=[],MI=[];function sle(r,e,t,n,i,a,o,s,l,u){var c=t4,h=pr,f=c(r,t,i,o,TI);l[0]=1/0,l[1]=1/0,u[0]=-1/0,u[1]=-1/0;for(var d=0;d<f;d++){var p=h(r,t,i,o,TI[d]);l[0]=wi(p,l[0]),u[0]=bi(p,u[0])}f=c(e,n,a,s,MI);for(var d=0;d<f;d++){var g=h(e,n,a,s,MI[d]);l[1]=wi(g,l[1]),u[1]=bi(g,u[1])}l[0]=wi(r,l[0]),u[0]=bi(r,u[0]),l[0]=wi(o,l[0]),u[0]=bi(o,u[0]),l[1]=wi(e,l[1]),u[1]=bi(e,u[1]),l[1]=wi(s,l[1]),u[1]=bi(s,u[1])}function lle(r,e,t,n,i,a,o,s){var l=r4,u=Tr,c=bi(wi(l(r,t,i),1),0),h=bi(wi(l(e,n,a),1),0),f=u(r,t,i,c),d=u(e,n,a,h);o[0]=wi(r,i,f),o[1]=wi(e,a,d),s[0]=bi(r,i,f),s[1]=bi(e,a,d)}function ule(r,e,t,n,i,a,o,s,l){var u=Tl,c=Ml,h=Math.abs(i-a);if(h%Tu<1e-4&&h>1e-4){s[0]=r-t,s[1]=e-n,l[0]=r+t,l[1]=e+n;return}if(Ym[0]=jS(i)*t+r,Ym[1]=qS(i)*n+e,qm[0]=jS(a)*t+r,qm[1]=qS(a)*n+e,u(s,Ym,qm),c(l,Ym,qm),i=i%Tu,i<0&&(i=i+Tu),a=a%Tu,a<0&&(a=a+Tu),i>a&&!o?a+=Tu:i<a&&o&&(i+=Tu),o){var f=a;a=i,i=f}for(var d=0;d<a;d+=Math.PI/2)d>i&&(jm[0]=jS(d)*t+r,jm[1]=qS(d)*n+e,u(s,jm,s),c(l,jm,l))}var on={M:1,L:2,C:3,Q:4,A:5,Z:6,R:7},Mu=[],Cu=[],mo=[],js=[],yo=[],_o=[],KS=Math.min,ZS=Math.max,Eu=Math.cos,Lu=Math.sin,ls=Math.abs,yT=Math.PI,sl=yT*2,QS=typeof Float32Array!="undefined",Kd=[];function JS(r){var e=Math.round(r/yT*1e8)/1e8;return e%2*yT}function r2(r,e){var t=JS(r[0]);t<0&&(t+=sl);var n=t-r[0],i=r[1];i+=n,!e&&i-t>=sl?i=t+sl:e&&t-i>=sl?i=t-sl:!e&&t>i?i=t+(sl-JS(t-i)):e&&t<i&&(i=t-(sl-JS(i-t))),r[0]=t,r[1]=i}var jo=function(){function r(e){this.dpr=1,this._xi=0,this._yi=0,this._x0=0,this._y0=0,this._len=0,e&&(this._saveData=!1),this._saveData&&(this.data=[])}return r.prototype.increaseVersion=function(){this._version++},r.prototype.getVersion=function(){return this._version},r.prototype.setScale=function(e,t,n){n=n||0,n>0&&(this._ux=ls(n/t_/e)||0,this._uy=ls(n/t_/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(on.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=ls(e-this._xi),i=ls(t-this._yi),a=n>this._ux||i>this._uy;if(this.addData(on.L,e,t),this._ctx&&a&&this._ctx.lineTo(e,t),a)this._xi=e,this._yi=t,this._pendingPtDist=0;else{var o=n*n+i*i;o>this._pendingPtDist&&(this._pendingPtX=e,this._pendingPtY=t,this._pendingPtDist=o)}return this},r.prototype.bezierCurveTo=function(e,t,n,i,a,o){return this._drawPendingPt(),this.addData(on.C,e,t,n,i,a,o),this._ctx&&this._ctx.bezierCurveTo(e,t,n,i,a,o),this._xi=a,this._yi=o,this},r.prototype.quadraticCurveTo=function(e,t,n,i){return this._drawPendingPt(),this.addData(on.Q,e,t,n,i),this._ctx&&this._ctx.quadraticCurveTo(e,t,n,i),this._xi=n,this._yi=i,this},r.prototype.arc=function(e,t,n,i,a,o){this._drawPendingPt(),Kd[0]=i,Kd[1]=a,r2(Kd,o),i=Kd[0],a=Kd[1];var s=a-i;return this.addData(on.A,e,t,n,n,i,s,0,o?0:1),this._ctx&&this._ctx.arc(e,t,n,i,a,o),this._xi=Eu(a)*n+e,this._yi=Lu(a)*n+t,this},r.prototype.arcTo=function(e,t,n,i,a){return this._drawPendingPt(),this._ctx&&this._ctx.arcTo(e,t,n,i,a),this},r.prototype.rect=function(e,t,n,i){return this._drawPendingPt(),this._ctx&&this._ctx.rect(e,t,n,i),this.addData(on.R,e,t,n,i),this},r.prototype.closePath=function(){this._drawPendingPt(),this.addData(on.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){var t=e.length;!(this.data&&this.data.length===t)&&QS&&(this.data=new Float32Array(t));for(var n=0;n<t;n++)this.data[n]=e[n];this._len=t},r.prototype.appendPath=function(e){e instanceof Array||(e=[e]);for(var t=e.length,n=0,i=this._len,a=0;a<t;a++)n+=e[a].len();QS&&this.data instanceof Float32Array&&(this.data=new Float32Array(i+n));for(var a=0;a<t;a++)for(var o=e[a].data,s=0;s<o.length;s++)this.data[i++]=o[s];this._len=i},r.prototype.addData=function(e,t,n,i,a,o,s,l,u){if(this._saveData){var c=this.data;this._len+arguments.length>c.length&&(this._expandData(),c=this.data);for(var h=0;h<arguments.length;h++)c[this._len++]=arguments[h]}},r.prototype._drawPendingPt=function(){this._pendingPtDist>0&&(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;t<this._len;t++)e[t]=this.data[t];this.data=e}},r.prototype.toStatic=function(){if(this._saveData){this._drawPendingPt();var e=this.data;e instanceof Array&&(e.length=this._len,QS&&this._len>11&&(this.data=new Float32Array(e)))}},r.prototype.getBoundingRect=function(){mo[0]=mo[1]=yo[0]=yo[1]=Number.MAX_VALUE,js[0]=js[1]=_o[0]=_o[1]=-Number.MAX_VALUE;var e=this.data,t=0,n=0,i=0,a=0,o;for(o=0;o<this._len;){var s=e[o++],l=o===1;switch(l&&(t=e[o],n=e[o+1],i=t,a=n),s){case on.M:t=i=e[o++],n=a=e[o++],yo[0]=i,yo[1]=a,_o[0]=i,_o[1]=a;break;case on.L:bI(t,n,e[o],e[o+1],yo,_o),t=e[o++],n=e[o++];break;case on.C:sle(t,n,e[o++],e[o++],e[o++],e[o++],e[o],e[o+1],yo,_o),t=e[o++],n=e[o++];break;case on.Q:lle(t,n,e[o++],e[o++],e[o],e[o+1],yo,_o),t=e[o++],n=e[o++];break;case on.A:var u=e[o++],c=e[o++],h=e[o++],f=e[o++],d=e[o++],p=e[o++]+d;o+=1;var g=!e[o++];l&&(i=Eu(d)*h+u,a=Lu(d)*f+c),ule(u,c,h,f,d,p,g,yo,_o),t=Eu(p)*h+u,n=Lu(p)*f+c;break;case on.R:i=t=e[o++],a=n=e[o++];var v=e[o++],m=e[o++];bI(i,a,i+v,a+m,yo,_o);break;case on.Z:t=i,n=a;break}Tl(mo,mo,yo),Ml(js,js,_o)}return o===0&&(mo[0]=mo[1]=js[0]=js[1]=0),new dt(mo[0],mo[1],js[0]-mo[0],js[1]-mo[1])},r.prototype._calculateLength=function(){var e=this.data,t=this._len,n=this._ux,i=this._uy,a=0,o=0,s=0,l=0;this._pathSegLen||(this._pathSegLen=[]);for(var u=this._pathSegLen,c=0,h=0,f=0;f<t;){var d=e[f++],p=f===1;p&&(a=e[f],o=e[f+1],s=a,l=o);var g=-1;switch(d){case on.M:a=s=e[f++],o=l=e[f++];break;case on.L:{var v=e[f++],m=e[f++],y=v-a,_=m-o;(ls(y)>n||ls(_)>i||f===t-1)&&(g=Math.sqrt(y*y+_*_),a=v,o=m);break}case on.C:{var x=e[f++],S=e[f++],v=e[f++],m=e[f++],A=e[f++],w=e[f++];g=woe(a,o,x,S,v,m,A,w,10),a=A,o=w;break}case on.Q:{var x=e[f++],S=e[f++],v=e[f++],m=e[f++];g=Toe(a,o,x,S,v,m,10),a=v,o=m;break}case on.A:var M=e[f++],C=e[f++],b=e[f++],T=e[f++],P=e[f++],D=e[f++],L=D+P;f+=1,p&&(s=Eu(P)*b+M,l=Lu(P)*T+C),g=ZS(b,T)*KS(sl,Math.abs(D)),a=Eu(L)*b+M,o=Lu(L)*T+C;break;case on.R:{s=a=e[f++],l=o=e[f++];var E=e[f++],I=e[f++];g=E*2+I*2;break}case on.Z:{var y=s-a,_=l-o;g=Math.sqrt(y*y+_*_),a=s,o=l;break}}g>=0&&(u[h++]=g,c+=g)}return this._pathLen=c,c},r.prototype.rebuildPath=function(e,t){var n=this.data,i=this._ux,a=this._uy,o=this._len,s,l,u,c,h,f,d=t<1,p,g,v=0,m=0,y,_=0,x,S;if(!(d&&(this._pathSegLen||this._calculateLength(),p=this._pathSegLen,g=this._pathLen,y=t*g,!y)))e:for(var A=0;A<o;){var w=n[A++],M=A===1;switch(M&&(u=n[A],c=n[A+1],s=u,l=c),w!==on.L&&_>0&&(e.lineTo(x,S),_=0),w){case on.M:s=u=n[A++],l=c=n[A++],e.moveTo(u,c);break;case on.L:{h=n[A++],f=n[A++];var C=ls(h-u),b=ls(f-c);if(C>i||b>a){if(d){var T=p[m++];if(v+T>y){var P=(y-v)/T;e.lineTo(u*(1-P)+h*P,c*(1-P)+f*P);break e}v+=T}e.lineTo(h,f),u=h,c=f,_=0}else{var D=C*C+b*b;D>_&&(x=h,S=f,_=D)}break}case on.C:{var L=n[A++],E=n[A++],I=n[A++],N=n[A++],R=n[A++],F=n[A++];if(d){var T=p[m++];if(v+T>y){var P=(y-v)/T;jl(u,L,I,R,P,Mu),jl(c,E,N,F,P,Cu),e.bezierCurveTo(Mu[1],Cu[1],Mu[2],Cu[2],Mu[3],Cu[3]);break e}v+=T}e.bezierCurveTo(L,E,I,N,R,F),u=R,c=F;break}case on.Q:{var L=n[A++],E=n[A++],I=n[A++],N=n[A++];if(d){var T=p[m++];if(v+T>y){var P=(y-v)/T;Bv(u,L,I,P,Mu),Bv(c,E,N,P,Cu),e.quadraticCurveTo(Mu[1],Cu[1],Mu[2],Cu[2]);break e}v+=T}e.quadraticCurveTo(L,E,I,N),u=I,c=N;break}case on.A:var O=n[A++],V=n[A++],H=n[A++],Q=n[A++],W=n[A++],Z=n[A++],ee=n[A++],he=!n[A++],le=H>Q?H:Q,re=ls(H-Q)>.001,be=W+Z,de=!1;if(d){var T=p[m++];v+T>y&&(be=W+Z*(y-v)/T,de=!0),v+=T}if(re&&e.ellipse?e.ellipse(O,V,H,Q,ee,W,be,he):e.arc(O,V,le,W,be,he),de)break e;M&&(s=Eu(W)*H+O,l=Lu(W)*Q+V),u=Eu(be)*H+O,c=Lu(be)*Q+V;break;case on.R:s=u=n[A],l=c=n[A+1],h=n[A++],f=n[A++];var U=n[A++],K=n[A++];if(d){var T=p[m++];if(v+T>y){var te=y-v;e.moveTo(h,f),e.lineTo(h+KS(te,U),f),te-=U,te>0&&e.lineTo(h+U,f+KS(te,K)),te-=K,te>0&&e.lineTo(h+ZS(U-te,0),f+K),te-=U,te>0&&e.lineTo(h,f+ZS(K-te,0));break e}v+=T}e.rect(h,f,U,K);break;case on.Z:if(d){var T=p[m++];if(v+T>y){var P=(y-v)/T;e.lineTo(u*(1-P)+s*P,c*(1-P)+l*P);break e}v+=T}e.closePath(),u=s,c=l}}},r.prototype.clone=function(){var e=new r,t=this.data;return e.data=t.slice?t.slice():Array.prototype.slice.call(t),e._len=this._len,e},r.CMD=on,r.initDefaultProps=function(){var e=r.prototype;e._saveData=!0,e._ux=0,e._uy=0,e._pendingPtDist=0,e._version=0}(),r}();function dl(r,e,t,n,i,a,o){if(i===0)return!1;var s=i,l=0,u=r;if(o>e+s&&o>n+s||o<e-s&&o<n-s||a>r+s&&a>t+s||a<r-s&&a<t-s)return!1;if(r!==t)l=(e-n)/(r-t),u=(r*n-t*e)/(r-t);else return Math.abs(a-r)<=s/2;var c=l*a-o+u,h=c*c/(l*l+1);return h<=s/2*s/2}function cle(r,e,t,n,i,a,o,s,l,u,c){if(l===0)return!1;var h=l;if(c>e+h&&c>n+h&&c>a+h&&c>s+h||c<e-h&&c<n-h&&c<a-h&&c<s-h||u>r+h&&u>t+h&&u>i+h&&u>o+h||u<r-h&&u<t-h&&u<i-h&&u<o-h)return!1;var f=n4(r,e,t,n,i,a,o,s,u,c,null);return f<=h/2}function z4(r,e,t,n,i,a,o,s,l){if(o===0)return!1;var u=o;if(l>e+u&&l>n+u&&l>a+u||l<e-u&&l<n-u&&l<a-u||s>r+u&&s>t+u&&s>i+u||s<r-u&&s<t-u&&s<i-u)return!1;var c=i4(r,e,t,n,i,a,s,l,null);return c<=u/2}var CI=Math.PI*2;function Qi(r){return r%=CI,r<0&&(r+=CI),r}var Zd=Math.PI*2;function hle(r,e,t,n,i,a,o,s,l){if(o===0)return!1;var u=o;s-=r,l-=e;var c=Math.sqrt(s*s+l*l);if(c-u>t||c+u<t)return!1;if(Math.abs(n-i)%Zd<1e-4)return!0;if(a){var h=n;n=Qi(i),i=Qi(h)}else n=Qi(n),i=Qi(i);n>i&&(i+=Zd);var f=Math.atan2(l,s);return f<0&&(f+=Zd),f>=n&&f<=i||f+Zd>=n&&f+Zd<=i}function ps(r,e,t,n,i,a){if(a>e&&a>n||a<e&&a<n||n===e)return 0;var o=(a-e)/(n-e),s=n<e?1:-1;(o===1||o===0)&&(s=n<e?.5:-.5);var l=o*(t-r)+r;return l===i?1/0:l>i?s:0}var Ks=jo.CMD,Pu=Math.PI*2,fle=1e-4;function dle(r,e){return Math.abs(r-e)<fle}var fi=[-1,-1,-1],_a=[-1,-1];function ple(){var r=_a[0];_a[0]=_a[1],_a[1]=r}function vle(r,e,t,n,i,a,o,s,l,u){if(u>e&&u>n&&u>a&&u>s||u<e&&u<n&&u<a&&u<s)return 0;var c=Z0(e,n,a,s,u,fi);if(c===0)return 0;for(var h=0,f=-1,d=void 0,p=void 0,g=0;g<c;g++){var v=fi[g],m=v===0||v===1?.5:1,y=pr(r,t,i,o,v);y<l||(f<0&&(f=t4(e,n,a,s,_a),_a[1]<_a[0]&&f>1&&ple(),d=pr(e,n,a,s,_a[0]),f>1&&(p=pr(e,n,a,s,_a[1]))),f===2?v<_a[0]?h+=d<e?m:-m:v<_a[1]?h+=p<d?m:-m:h+=s<p?m:-m:v<_a[0]?h+=d<e?m:-m:h+=s<d?m:-m)}return h}function gle(r,e,t,n,i,a,o,s){if(s>e&&s>n&&s>a||s<e&&s<n&&s<a)return 0;var l=boe(e,n,a,s,fi);if(l===0)return 0;var u=r4(e,n,a);if(u>=0&&u<=1){for(var c=0,h=Tr(e,n,a,u),f=0;f<l;f++){var d=fi[f]===0||fi[f]===1?.5:1,p=Tr(r,t,i,fi[f]);p<o||(fi[f]<u?c+=h<e?d:-d:c+=a<h?d:-d)}return c}else{var d=fi[0]===0||fi[0]===1?.5:1,p=Tr(r,t,i,fi[0]);return p<o?0:a<e?d:-d}}function mle(r,e,t,n,i,a,o,s){if(s-=e,s>t||s<-t)return 0;var l=Math.sqrt(t*t-s*s);fi[0]=-l,fi[1]=l;var u=Math.abs(n-i);if(u<1e-4)return 0;if(u>=Pu-1e-4){n=0,i=Pu;var c=a?1:-1;return o>=fi[0]+r&&o<=fi[1]+r?c:0}if(n>i){var h=n;n=i,i=h}n<0&&(n+=Pu,i+=Pu);for(var f=0,d=0;d<2;d++){var p=fi[d];if(p+r>o){var g=Math.atan2(s,p),c=a?1:-1;g<0&&(g=Pu+g),(g>=n&&g<=i||g+Pu>=n&&g+Pu<=i)&&(g>Math.PI/2&&g<Math.PI*1.5&&(c=-c),f+=c)}}return f}function U4(r,e,t,n,i){for(var a=r.data,o=r.len(),s=0,l=0,u=0,c=0,h=0,f,d,p=0;p<o;){var g=a[p++],v=p===1;switch(g===Ks.M&&p>1&&(t||(s+=ps(l,u,c,h,n,i))),v&&(l=a[p],u=a[p+1],c=l,h=u),g){case Ks.M:c=a[p++],h=a[p++],l=c,u=h;break;case Ks.L:if(t){if(dl(l,u,a[p],a[p+1],e,n,i))return!0}else s+=ps(l,u,a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ks.C:if(t){if(cle(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=vle(l,u,a[p++],a[p++],a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ks.Q:if(t){if(z4(l,u,a[p++],a[p++],a[p],a[p+1],e,n,i))return!0}else s+=gle(l,u,a[p++],a[p++],a[p],a[p+1],n,i)||0;l=a[p++],u=a[p++];break;case Ks.A:var m=a[p++],y=a[p++],_=a[p++],x=a[p++],S=a[p++],A=a[p++];p+=1;var w=!!(1-a[p++]);f=Math.cos(S)*_+m,d=Math.sin(S)*x+y,v?(c=f,h=d):s+=ps(l,u,f,d,n,i);var M=(n-m)*x/_+m;if(t){if(hle(m,y,x,S,S+A,w,e,M,i))return!0}else s+=mle(m,y,x,S,S+A,w,M,i);l=Math.cos(S+A)*_+m,u=Math.sin(S+A)*x+y;break;case Ks.R:c=l=a[p++],h=u=a[p++];var C=a[p++],b=a[p++];if(f=c+C,d=h+b,t){if(dl(c,h,f,h,e,n,i)||dl(f,h,f,d,e,n,i)||dl(f,d,c,d,e,n,i)||dl(c,d,c,h,e,n,i))return!0}else s+=ps(f,h,f,d,n,i),s+=ps(c,d,c,h,n,i);break;case Ks.Z:if(t){if(dl(l,u,c,h,e,n,i))return!0}else s+=ps(l,u,c,h,n,i);l=c,u=h;break}}return!t&&!dle(u,h)&&(s+=ps(l,u,c,h,n,i)||0),s!==0}function yle(r,e,t){return U4(r,0,!1,e,t)}function _le(r,e,t,n){return U4(r,e,!0,t,n)}var r_=Ke({fill:"#000",stroke:null,strokePercent:1,fillOpacity:1,strokeOpacity:1,lineDashOffset:0,lineWidth:1,lineCap:"butt",miterLimit:10,strokeNoScale:!1,strokeFirst:!1},Mc),xle={style:Ke({fill:!0,stroke:!0,strokePercent:!0,fillOpacity:!0,strokeOpacity:!0,lineDashOffset:!0,lineWidth:!0,miterLimit:!0},S1.style)},eA=Yo.concat(["invisible","culling","z","z2","zlevel","parent"]),Sle=function(r){ae(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 i=this._decalEl=this._decalEl||new e;i.buildPath===e.prototype.buildPath&&(i.buildPath=function(l){t.buildPath(l,t.shape)}),i.silent=!0;var a=i.style;for(var o in n)a[o]!==n[o]&&(a[o]=n[o]);a.fill=n.fill?n.decal:null,a.decal=null,a.shadowColor=null,n.strokeFirst&&(a.stroke=null);for(var s=0;s<eA.length;++s)i[eA[s]]=this[eA[s]];i.__dirty|=ji}else this._decalEl&&(this._decalEl=null)},e.prototype.getDecalElement=function(){return this._decalEl},e.prototype._init=function(t){var n=wt(t);this.shape=this.getDefaultShape();var i=this.getDefaultStyle();i&&this.useStyle(i);for(var a=0;a<n.length;a++){var o=n[a],s=t[o];o==="style"?this.style?pe(this.style,s):this.useStyle(s):o==="shape"?pe(this.shape,s):r.prototype.attrKV.call(this,o,s)}this.style||this.useStyle({})},e.prototype.getDefaultStyle=function(){return null},e.prototype.getDefaultShape=function(){return{}},e.prototype.canBeInsideText=function(){return this.hasFill()},e.prototype.getInsideTextFill=function(){var t=this.style.fill;if(t!=="none"){if(ke(t)){var n=J0(t,0);return n>.5?fT:n>.2?nse:dT}else if(t)return dT}return fT},e.prototype.getInsideTextStroke=function(t){var n=this.style.fill;if(ke(n)){var i=this.__zr,a=!!(i&&i.isDarkMode()),o=J0(t,0)<hT;if(a===o)return n}},e.prototype.buildPath=function(t,n,i){},e.prototype.pathUpdated=function(){this.__dirty&=~tf},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 jo(!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,i=!t;if(i){var a=!1;this.path||(a=!0,this.createPathProxy());var o=this.path;(a||this.__dirty&tf)&&(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||i){s.copy(t);var l=n.strokeNoScale?this.getLineScale():1,u=n.lineWidth;if(!this.hasFill()){var c=this.strokeContainThreshold;u=Math.max(u,c==null?4:c)}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 i=this.transformCoordToLocal(t,n),a=this.getBoundingRect(),o=this.style;if(t=i[0],n=i[1],a.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)),_le(s,l/u,t,n)))return!0}if(this.hasFill())return yle(s,t,n)}return!1},e.prototype.dirtyShape=function(){this.__dirty|=tf,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 i=this.shape;return i||(i=this.shape={}),typeof t=="string"?i[t]=n:pe(i,t),this.dirtyShape(),this},e.prototype.shapeChanged=function(){return!!(this.__dirty&tf)},e.prototype.createStyle=function(t){return v1(r_,t)},e.prototype._innerSaveToNormal=function(t){r.prototype._innerSaveToNormal.call(this,t);var n=this._normalState;t.shape&&!n.shape&&(n.shape=pe({},this.shape))},e.prototype._applyStateObj=function(t,n,i,a,o,s){r.prototype._applyStateObj.call(this,t,n,i,a,o,s);var l=!(n&&a),u;if(n&&n.shape?o?a?u=n.shape:(u=pe({},i.shape),pe(u,n.shape)):(u=pe({},a?this.shape:i.shape),pe(u,n.shape)):l&&(u=i.shape),u)if(o){this.shape=pe({},this.shape);for(var c={},h=wt(u),f=0;f<h.length;f++){var d=h[f];typeof u[d]=="object"?this.shape[d]=u[d]:c[d]=u[d]}this._transitionState(t,{shape:c},s)}else this.shape=u,this.dirtyShape()},e.prototype._mergeStates=function(t){for(var n=r.prototype._mergeStates.call(this,t),i,a=0;a<t.length;a++){var o=t[a];o.shape&&(i=i||{},this._mergeStyle(i,o.shape))}return i&&(n.shape=i),n},e.prototype.getAnimationStyleProps=function(){return xle},e.prototype.isZeroArea=function(){return!1},e.extend=function(t){var n=function(a){ae(o,a);function o(s){var l=a.call(this,s)||this;return t.init&&t.init.call(l,s),l}return o.prototype.getDefaultStyle=function(){return Je(t.style)},o.prototype.getDefaultShape=function(){return Je(t.shape)},o}(e);for(var i in t)typeof t[i]=="function"&&(n.prototype[i]=t[i]);return n},e.initDefaultProps=function(){var t=e.prototype;t.type="path",t.strokeContainThreshold=5,t.segmentIgnoreThreshold=0,t.subPixelOptimize=!1,t.autoBatch=!1,t.__dirty=ji|Lp|tf}(),e}(ka);const yt=Sle;var Ale=Ke({strokeFirst:!0,font:Yl,x:0,y:0,textAlign:"left",textBaseline:"top",miterLimit:2},r_),V4=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return 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.createStyle=function(t){return v1(Ale,t)},e.prototype.setBoundingRect=function(t){this._rect=t},e.prototype.getBoundingRect=function(){var t=this.style;if(!this._rect){var n=t.text;n!=null?n+="":n="";var i=wg(n,t.font,t.textAlign,t.textBaseline);if(i.x+=t.x||0,i.y+=t.y||0,this.hasStroke()){var a=t.lineWidth;i.x-=a/2,i.y-=a/2,i.width+=a,i.height+=a}this._rect=i}return this._rect},e.initDefaultProps=function(){var t=e.prototype;t.dirtyRectTolerance=10}(),e}(ka);V4.prototype.type="tspan";const Hv=V4;var wle=Ke({x:0,y:0},Mc),ble={style:Ke({x:!0,y:!0,width:!0,height:!0,sx:!0,sy:!0,sWidth:!0,sHeight:!0},S1.style)};function Tle(r){return!!(r&&typeof r!="string"&&r.width&&r.height)}var G4=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.createStyle=function(t){return v1(wle,t)},e.prototype._getSize=function(t){var n=this.style,i=n[t];if(i!=null)return i;var a=Tle(n.image)?n.image:this.__image;if(!a)return 0;var o=t==="width"?"height":"width",s=n[o];return s==null?a[t]:a[t]/a[o]*s},e.prototype.getWidth=function(){return this._getSize("width")},e.prototype.getHeight=function(){return this._getSize("height")},e.prototype.getAnimationStyleProps=function(){return ble},e.prototype.getBoundingRect=function(){var t=this.style;return this._rect||(this._rect=new dt(t.x||0,t.y||0,this.getWidth(),this.getHeight())),this._rect},e}(ka);G4.prototype.type="image";const Ur=G4;function Mle(r,e){var t=e.x,n=e.y,i=e.width,a=e.height,o=e.r,s,l,u,c;i<0&&(t=t+i,i=-i),a<0&&(n=n+a,a=-a),typeof o=="number"?s=l=u=c=o:o instanceof Array?o.length===1?s=l=u=c=o[0]:o.length===2?(s=u=o[0],l=c=o[1]):o.length===3?(s=o[0],l=c=o[1],u=o[2]):(s=o[0],l=o[1],u=o[2],c=o[3]):s=l=u=c=0;var h;s+l>i&&(h=s+l,s*=i/h,l*=i/h),u+c>i&&(h=u+c,u*=i/h,c*=i/h),l+u>a&&(h=l+u,l*=a/h,u*=a/h),s+c>a&&(h=s+c,s*=a/h,c*=a/h),r.moveTo(t+s,n),r.lineTo(t+i-l,n),l!==0&&r.arc(t+i-l,n+l,l,-Math.PI/2,0),r.lineTo(t+i,n+a-u),u!==0&&r.arc(t+i-u,n+a-u,u,0,Math.PI/2),r.lineTo(t+c,n+a),c!==0&&r.arc(t+c,n+a-c,c,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 vf=Math.round;function H4(r,e,t){if(e){var n=e.x1,i=e.x2,a=e.y1,o=e.y2;r.x1=n,r.x2=i,r.y1=a,r.y2=o;var s=t&&t.lineWidth;return s&&(vf(n*2)===vf(i*2)&&(r.x1=r.x2=ac(n,s,!0)),vf(a*2)===vf(o*2)&&(r.y1=r.y2=ac(a,s,!0))),r}}function W4(r,e,t){if(e){var n=e.x,i=e.y,a=e.width,o=e.height;r.x=n,r.y=i,r.width=a,r.height=o;var s=t&&t.lineWidth;return s&&(r.x=ac(n,s,!0),r.y=ac(i,s,!0),r.width=Math.max(ac(n+a,s,!1)-r.x,a===0?0:1),r.height=Math.max(ac(i+o,s,!1)-r.y,o===0?0:1)),r}}function ac(r,e,t){if(!e)return r;var n=vf(r*2);return(n+vf(e))%2===0?n/2:(n+(t?1:-1))/2}var Cle=function(){function r(){this.x=0,this.y=0,this.width=0,this.height=0}return r}(),Ele={},$4=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new Cle},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=W4(Ele,n,this.style);i=l.x,a=l.y,o=l.width,s=l.height,l.r=n.r,n=l}else i=n.x,a=n.y,o=n.width,s=n.height;n.r?Mle(t,n):t.rect(i,a,o,s)},e.prototype.isZeroArea=function(){return!this.shape.width||!this.shape.height},e}(yt);$4.prototype.type="rect";const Dt=$4;var EI={fill:"#000"},LI=2,Lle={style:Ke({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},S1.style)},X4=function(r){ae(e,r);function e(t){var n=r.call(this)||this;return n.type="text",n._children=[],n._defaultStyle=EI,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;t<this._children.length;t++){var n=this._children[t];n.zlevel=this.zlevel,n.z=this.z,n.z2=this.z2,n.culling=this.culling,n.cursor=this.cursor,n.invisible=this.invisible}},e.prototype.updateTransform=function(){var t=this.innerTransformable;t?(t.updateTransform(),t.transform&&(this.transform=t.transform)):r.prototype.updateTransform.call(this)},e.prototype.getLocalTransform=function(t){var n=this.innerTransformable;return n?n.getLocalTransform(t):r.prototype.getLocalTransform.call(this,t)},e.prototype.getComputedTransform=function(){return this.__hostTarget&&(this.__hostTarget.getComputedTransform(),this.__hostTarget.updateInnerText(!0)),r.prototype.getComputedTransform.call(this)},e.prototype._updateSubTexts=function(){this._childCursor=0,Dle(this.style),this.style.rich?this._updateRichTexts():this._updatePlainTexts(),this._children.length=this._childCursor,this.styleUpdated()},e.prototype.addSelfToZr=function(t){r.prototype.addSelfToZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=t},e.prototype.removeSelfFromZr=function(t){r.prototype.removeSelfFromZr.call(this,t);for(var n=0;n<this._children.length;n++)this._children[n].__zr=null},e.prototype.getBoundingRect=function(){if(this.styleChanged()&&this._updateSubTexts(),!this._rect){for(var t=new dt(0,0,0,0),n=this._children,i=[],a=null,o=0;o<n.length;o++){var s=n[o],l=s.getBoundingRect(),u=s.getLocalTransform(i);u?(t.copy(l),t.applyTransform(u),a=a||t.clone(),a.union(t)):(a=a||l.clone(),a.union(l))}this._rect=a||t}return this._rect},e.prototype.setDefaultTextStyle=function(t){this._defaultStyle=t||EI},e.prototype.setTextContent=function(t){},e.prototype._mergeStyle=function(t,n){if(!n)return t;var i=n.rich,a=t.rich||i&&{};return pe(t,n),i&&a?(this._mergeRich(a,i),t.rich=a):a&&(t.rich=a),t},e.prototype._mergeRich=function(t,n){for(var i=wt(n),a=0;a<i.length;a++){var o=i[a];t[o]=t[o]||{},pe(t[o],n[o])}},e.prototype.getAnimationStyleProps=function(){return Lle},e.prototype._getOrCreateChild=function(t){var n=this._children[this._childCursor];return(!n||!(n instanceof t))&&(n=new t),this._children[this._childCursor++]=n,n.__zr=this.__zr,n.parent=this,n},e.prototype._updatePlainTexts=function(){var t=this.style,n=t.font||Yl,i=t.padding,a=OI(t),o=Zse(a,t),s=tA(t),l=!!t.backgroundColor,u=o.outerHeight,c=o.outerWidth,h=o.contentWidth,f=o.lines,d=o.lineHeight,p=this._defaultStyle;this.isTruncated=!!o.isTruncated;var g=t.x||0,v=t.y||0,m=t.align||p.align||"left",y=t.verticalAlign||p.verticalAlign||"top",_=g,x=nf(v,o.contentHeight,y);if(s||i){var S=Rp(g,c,m),A=nf(v,u,y);s&&this._renderBackground(t,t,S,A,c,u)}x+=d/2,i&&(_=kI(g,m,i),y==="top"?x+=i[0]:y==="bottom"&&(x-=i[2]));for(var w=0,M=!1,C=NI("fill"in t?t.fill:(M=!0,p.fill)),b=II("stroke"in t?t.stroke:!l&&(!p.autoStroke||M)?(w=LI,p.stroke):null),T=t.textShadowBlur>0,P=t.width!=null&&(t.overflow==="truncate"||t.overflow==="break"||t.overflow==="breakAll"),D=o.calculatedLineHeight,L=0;L<f.length;L++){var E=this._getOrCreateChild(Hv),I=E.createStyle();E.useStyle(I),I.text=f[L],I.x=_,I.y=x,m&&(I.textAlign=m),I.textBaseline="middle",I.opacity=t.opacity,I.strokeFirst=!0,T&&(I.shadowBlur=t.textShadowBlur||0,I.shadowColor=t.textShadowColor||"transparent",I.shadowOffsetX=t.textShadowOffsetX||0,I.shadowOffsetY=t.textShadowOffsetY||0),I.stroke=b,I.fill=C,b&&(I.lineWidth=t.lineWidth||w,I.lineDash=t.lineDash,I.lineDashOffset=t.lineDashOffset||0),I.font=n,RI(I,t),x+=d,P&&E.setBoundingRect(new dt(Rp(I.x,h,I.textAlign),nf(I.y,D,I.textBaseline),h,D))}},e.prototype._updateRichTexts=function(){var t=this.style,n=OI(t),i=ele(n,t),a=i.width,o=i.outerWidth,s=i.outerHeight,l=t.padding,u=t.x||0,c=t.y||0,h=this._defaultStyle,f=t.align||h.align,d=t.verticalAlign||h.verticalAlign;this.isTruncated=!!i.isTruncated;var p=Rp(u,o,f),g=nf(c,s,d),v=p,m=g;l&&(v+=l[3],m+=l[0]);var y=v+a;tA(t)&&this._renderBackground(t,t,p,g,o,s);for(var _=!!t.backgroundColor,x=0;x<i.lines.length;x++){for(var S=i.lines[x],A=S.tokens,w=A.length,M=S.lineHeight,C=S.width,b=0,T=v,P=y,D=w-1,L=void 0;b<w&&(L=A[b],!L.align||L.align==="left");)this._placeToken(L,t,M,m,T,"left",_),C-=L.width,T+=L.width,b++;for(;D>=0&&(L=A[D],L.align==="right");)this._placeToken(L,t,M,m,P,"right",_),C-=L.width,P-=L.width,D--;for(T+=(a-(T-v)-(y-P)-C)/2;b<=D;)L=A[b],this._placeToken(L,t,M,m,T+L.width/2,"center",_),T+=L.width,b++;m+=M}},e.prototype._placeToken=function(t,n,i,a,o,s,l){var u=n.rich[t.styleName]||{};u.text=t.text;var c=t.verticalAlign,h=a+i/2;c==="top"?h=a+t.height/2:c==="bottom"&&(h=a+i-t.height/2);var f=!t.isLineHolder&&tA(u);f&&this._renderBackground(u,n,s==="right"?o-t.width:s==="center"?o-t.width/2:o,h-t.height/2,t.width,t.height);var d=!!u.backgroundColor,p=t.textPadding;p&&(o=kI(o,s,p),h-=t.height/2-p[0]-t.innerHeight/2);var g=this._getOrCreateChild(Hv),v=g.createStyle();g.useStyle(v);var m=this._defaultStyle,y=!1,_=0,x=NI("fill"in u?u.fill:"fill"in n?n.fill:(y=!0,m.fill)),S=II("stroke"in u?u.stroke:"stroke"in n?n.stroke:!d&&!l&&(!m.autoStroke||y)?(_=LI,m.stroke):null),A=u.textShadowBlur>0||n.textShadowBlur>0;v.text=t.text,v.x=o,v.y=h,A&&(v.shadowBlur=u.textShadowBlur||n.textShadowBlur||0,v.shadowColor=u.textShadowColor||n.textShadowColor||"transparent",v.shadowOffsetX=u.textShadowOffsetX||n.textShadowOffsetX||0,v.shadowOffsetY=u.textShadowOffsetY||n.textShadowOffsetY||0),v.textAlign=s,v.textBaseline="middle",v.font=t.font||Yl,v.opacity=Go(u.opacity,n.opacity,1),RI(v,u),S&&(v.lineWidth=Go(u.lineWidth,n.lineWidth,_),v.lineDash=ot(u.lineDash,n.lineDash),v.lineDashOffset=n.lineDashOffset||0,v.stroke=S),x&&(v.fill=x);var w=t.contentWidth,M=t.contentHeight;g.setBoundingRect(new dt(Rp(v.x,w,v.textAlign),nf(v.y,M,v.textBaseline),w,M))},e.prototype._renderBackground=function(t,n,i,a,o,s){var l=t.backgroundColor,u=t.borderWidth,c=t.borderColor,h=l&&l.image,f=l&&!h,d=t.borderRadius,p=this,g,v;if(f||t.lineHeight||u&&c){g=this._getOrCreateChild(Dt),g.useStyle(g.createStyle()),g.style.fill=null;var m=g.shape;m.x=i,m.y=a,m.width=o,m.height=s,m.r=d,g.dirtyShape()}if(f){var y=g.style;y.fill=l||null,y.fillOpacity=ot(t.fillOpacity,1)}else if(h){v=this._getOrCreateChild(Ur),v.onload=function(){p.dirtyStyle()};var _=v.style;_.image=l.image,_.x=i,_.y=a,_.width=o,_.height=s}if(u&&c){var y=g.style;y.lineWidth=u,y.stroke=c,y.strokeOpacity=ot(t.strokeOpacity,1),y.lineDash=t.borderDash,y.lineDashOffset=t.borderDashOffset||0,g.strokeContainThreshold=0,g.hasFill()&&g.hasStroke()&&(y.strokeFirst=!0,y.lineWidth*=2)}var x=(g||v).style;x.shadowBlur=t.shadowBlur||0,x.shadowColor=t.shadowColor||"transparent",x.shadowOffsetX=t.shadowOffsetX||0,x.shadowOffsetY=t.shadowOffsetY||0,x.opacity=Go(t.opacity,n.opacity,1)},e.makeFont=function(t){var n="";return q4(t)&&(n=[t.fontStyle,t.fontWeight,Y4(t.fontSize),t.fontFamily||"sans-serif"].join(" ")),n&&eo(n)||t.textFont||t.font},e}(ka),Ple={left:!0,right:1,center:1},Rle={top:1,bottom:1,middle:1},PI=["fontStyle","fontWeight","fontSize","fontFamily"];function Y4(r){return typeof r=="string"&&(r.indexOf("px")!==-1||r.indexOf("rem")!==-1||r.indexOf("em")!==-1)?r:isNaN(+r)?BC+"px":r+"px"}function RI(r,e){for(var t=0;t<PI.length;t++){var n=PI[t],i=e[n];i!=null&&(r[n]=i)}}function q4(r){return r.fontSize!=null||r.fontFamily||r.fontWeight}function Dle(r){return DI(r),k(r.rich,DI),r}function DI(r){if(r){r.font=X4.makeFont(r);var e=r.align;e==="middle"&&(e="center"),r.align=e==null||Ple[e]?e:"left";var t=r.verticalAlign;t==="center"&&(t="middle"),r.verticalAlign=t==null||Rle[t]?t:"top";var n=r.padding;n&&(r.padding=WC(r.padding))}}function II(r,e){return r==null||e<=0||r==="transparent"||r==="none"?null:r.image||r.colorStops?"#000":r}function NI(r){return r==null||r==="none"?null:r.image||r.colorStops?"#000":r}function kI(r,e,t){return e==="right"?r-t[1]:e==="center"?r+t[3]/2-t[1]/2:r+t[3]}function OI(r){var e=r.text;return e!=null&&(e+=""),e}function tA(r){return!!(r.backgroundColor||r.lineHeight||r.borderWidth&&r.borderColor)}const Ot=X4;var at=Pt(),_T=function(r,e,t,n){if(n){var i=at(n);i.dataIndex=t,i.dataType=e,i.seriesIndex=r,i.ssrType="chart",n.type==="group"&&n.traverse(function(a){var o=at(a);o.seriesIndex=r,o.dataIndex=t,o.dataType=e,o.ssrType="chart"})}},FI=1,BI={},j4=Pt(),i2=Pt(),a2=0,Tg=1,w1=2,mi=["emphasis","blur","select"],Wv=["normal","emphasis","blur","select"],md=10,Ile=9,Cc="highlight",o0="downplay",iv="select",s0="unselect",av="toggleSelect";function Nh(r){return r!=null&&r!=="none"}function b1(r,e,t){r.onHoverStateChange&&(r.hoverState||0)!==t&&r.onHoverStateChange(e),r.hoverState=t}function K4(r){b1(r,"emphasis",w1)}function Z4(r){r.hoverState===w1&&b1(r,"normal",a2)}function o2(r){b1(r,"blur",Tg)}function Q4(r){r.hoverState===Tg&&b1(r,"normal",a2)}function Nle(r){r.selected=!0}function kle(r){r.selected=!1}function zI(r,e,t){e(r,t)}function zs(r,e,t){zI(r,e,t),r.isGroup&&r.traverse(function(n){zI(n,e,t)})}function i_(r,e){switch(e){case"emphasis":r.hoverState=w1;break;case"normal":r.hoverState=a2;break;case"blur":r.hoverState=Tg;break;case"select":r.selected=!0}}function Ole(r,e,t,n){for(var i=r.style,a={},o=0;o<e.length;o++){var s=e[o],l=i[s];a[s]=l==null?n&&n[s]:l}for(var o=0;o<r.animators.length;o++){var u=r.animators[o];u.__fromStateTransition&&u.__fromStateTransition.indexOf(t)<0&&u.targetName==="style"&&u.saveTo(a,e)}return a}function Fle(r,e,t,n){var i=t&&pt(t,"select")>=0,a=!1;if(r instanceof yt){var o=j4(r),s=i&&o.selectFill||o.normalFill,l=i&&o.selectStroke||o.normalStroke;if(Nh(s)||Nh(l)){n=n||{};var u=n.style||{};u.fill==="inherit"?(a=!0,n=pe({},n),u=pe({},u),u.fill=s):!Nh(u.fill)&&Nh(s)?(a=!0,n=pe({},n),u=pe({},u),u.fill=iT(s)):!Nh(u.stroke)&&Nh(l)&&(a||(n=pe({},n),u=pe({},u)),u.stroke=iT(l)),n.style=u}}if(n&&n.z2==null){a||(n=pe({},n));var c=r.z2EmphasisLift;n.z2=r.z2+(c!=null?c:md)}return n}function Ble(r,e,t){if(t&&t.z2==null){t=pe({},t);var n=r.z2SelectLift;t.z2=r.z2+(n!=null?n:Ile)}return t}function zle(r,e,t){var n=pt(r.currentStates,e)>=0,i=r.style.opacity,a=n?null:Ole(r,["opacity"],e,{opacity:1});t=t||{};var o=t.style||{};return o.opacity==null&&(t=pe({},t),o=pe({opacity:n?i:a.opacity*.1},o),t.style=o),t}function nA(r,e){var t=this.states[r];if(this.style){if(r==="emphasis")return Fle(this,r,e,t);if(r==="blur")return zle(this,r,t);if(r==="select")return Ble(this,r,t)}return t}function Gc(r){r.stateProxy=nA;var e=r.getTextContent(),t=r.getTextGuideLine();e&&(e.stateProxy=nA),t&&(t.stateProxy=nA)}function UI(r,e){!nV(r,e)&&!r.__highByOuter&&zs(r,K4)}function VI(r,e){!nV(r,e)&&!r.__highByOuter&&zs(r,Z4)}function Ds(r,e){r.__highByOuter|=1<<(e||0),zs(r,K4)}function Is(r,e){!(r.__highByOuter&=~(1<<(e||0)))&&zs(r,Z4)}function J4(r){zs(r,o2)}function s2(r){zs(r,Q4)}function eV(r){zs(r,Nle)}function tV(r){zs(r,kle)}function nV(r,e){return r.__highDownSilentOnTouch&&e.zrByTouch}function rV(r){var e=r.getModel(),t=[],n=[];e.eachComponent(function(i,a){var o=i2(a),s=i==="series",l=s?r.getViewOfSeriesModel(a):r.getViewOfComponentModel(a);!s&&n.push(l),o.isBlured&&(l.group.traverse(function(u){Q4(u)}),s&&t.push(a)),o.isBlured=!1}),k(n,function(i){i&&i.toggleBlurSeries&&i.toggleBlurSeries(t,!1,e)})}function xT(r,e,t,n){var i=n.getModel();t=t||"coordinateSystem";function a(u,c){for(var h=0;h<c.length;h++){var f=u.getItemGraphicEl(c[h]);f&&s2(f)}}if(r!=null&&!(!e||e==="none")){var o=i.getSeriesByIndex(r),s=o.coordinateSystem;s&&s.master&&(s=s.master);var l=[];i.eachSeries(function(u){var c=o===u,h=u.coordinateSystem;h&&h.master&&(h=h.master);var f=h&&s?h===s:c;if(!(t==="series"&&!c||t==="coordinateSystem"&&!f||e==="series"&&c)){var d=n.getViewOfSeriesModel(u);if(d.group.traverse(function(v){v.__highByOuter&&c&&e==="self"||o2(v)}),ii(e))a(u.getData(),e);else if(Qe(e))for(var p=wt(e),g=0;g<p.length;g++)a(u.getData(p[g]),e[p[g]]);l.push(u),i2(u).isBlured=!0}}),i.eachComponent(function(u,c){if(u!=="series"){var h=n.getViewOfComponentModel(c);h&&h.toggleBlurSeries&&h.toggleBlurSeries(l,!0,i)}})}}function ST(r,e,t){if(!(r==null||e==null)){var n=t.getModel().getComponent(r,e);if(n){i2(n).isBlured=!0;var i=t.getViewOfComponentModel(n);!i||!i.focusBlurEnabled||i.group.traverse(function(a){o2(a)})}}}function Ule(r,e,t){var n=r.seriesIndex,i=r.getData(e.dataType);if(i){var a=Uc(i,e);a=(_e(a)?a[0]:a)||0;var o=i.getItemGraphicEl(a);if(!o)for(var s=i.count(),l=0;!o&&l<s;)o=i.getItemGraphicEl(l++);if(o){var u=at(o);xT(n,u.focus,u.blurScope,t)}else{var c=r.get(["emphasis","focus"]),h=r.get(["emphasis","blurScope"]);c!=null&&xT(n,c,h,t)}}}function l2(r,e,t,n){var i={focusSelf:!1,dispatchers:null};if(r==null||r==="series"||e==null||t==null)return i;var a=n.getModel().getComponent(r,e);if(!a)return i;var o=n.getViewOfComponentModel(a);if(!o||!o.findHighDownDispatchers)return i;for(var s=o.findHighDownDispatchers(t),l,u=0;u<s.length;u++)if(at(s[u]).focus==="self"){l=!0;break}return{focusSelf:l,dispatchers:s}}function Vle(r,e,t){var n=at(r),i=l2(n.componentMainType,n.componentIndex,n.componentHighDownName,t),a=i.dispatchers,o=i.focusSelf;a?(o&&ST(n.componentMainType,n.componentIndex,t),k(a,function(s){return UI(s,e)})):(xT(n.seriesIndex,n.focus,n.blurScope,t),n.focus==="self"&&ST(n.componentMainType,n.componentIndex,t),UI(r,e))}function Gle(r,e,t){rV(t);var n=at(r),i=l2(n.componentMainType,n.componentIndex,n.componentHighDownName,t).dispatchers;i?k(i,function(a){return VI(a,e)}):VI(r,e)}function Hle(r,e,t){if(wT(e)){var n=e.dataType,i=r.getData(n),a=Uc(i,e);_e(a)||(a=[a]),r[e.type===av?"toggleSelect":e.type===iv?"select":"unselect"](a,n)}}function GI(r){var e=r.getAllData();k(e,function(t){var n=t.data,i=t.type;n.eachItemGraphicEl(function(a,o){r.isSelected(o,i)?eV(a):tV(a)})})}function Wle(r){var e=[];return r.eachSeries(function(t){var n=t.getAllData();k(n,function(i){i.data;var a=i.type,o=t.getSelectedDataIndices();if(o.length>0){var s={dataIndex:o,seriesIndex:t.seriesIndex};a!=null&&(s.dataType=a),e.push(s)}})}),e}function Ec(r,e,t){oc(r,!0),zs(r,Gc),AT(r,e,t)}function $le(r){oc(r,!1)}function Rn(r,e,t,n){n?$le(r):Ec(r,e,t)}function AT(r,e,t){var n=at(r);e!=null?(n.focus=e,n.blurScope=t):n.focus&&(n.focus=null)}var HI=["emphasis","blur","select"],Xle={itemStyle:"getItemStyle",lineStyle:"getLineStyle",areaStyle:"getAreaStyle"};function Br(r,e,t,n){t=t||"itemStyle";for(var i=0;i<HI.length;i++){var a=HI[i],o=e.getModel([a,t]),s=r.ensureState(a);s.style=n?n(o):o[Xle[t]]()}}function oc(r,e){var t=e===!1,n=r;r.highDownSilentOnTouch&&(n.__highDownSilentOnTouch=r.highDownSilentOnTouch),(!t||n.__highDownDispatcher)&&(n.__highByOuter=n.__highByOuter||0,n.__highDownDispatcher=!t)}function $v(r){return!!(r&&r.__highDownDispatcher)}function Yle(r,e,t){var n=at(r);n.componentMainType=e.mainType,n.componentIndex=e.componentIndex,n.componentHighDownName=t}function qle(r){var e=BI[r];return e==null&&FI<=32&&(e=BI[r]=FI++),e}function wT(r){var e=r.type;return e===iv||e===s0||e===av}function WI(r){var e=r.type;return e===Cc||e===o0}function jle(r){var e=j4(r);e.normalFill=r.style.fill,e.normalStroke=r.style.stroke;var t=r.states.select||{};e.selectFill=t.style&&t.style.fill||null,e.selectStroke=t.style&&t.style.stroke||null}var kh=jo.CMD,Kle=[[],[],[]],$I=Math.sqrt,Zle=Math.atan2;function iV(r,e){if(e){var t=r.data,n=r.len(),i,a,o,s,l,u,c=kh.M,h=kh.C,f=kh.L,d=kh.R,p=kh.A,g=kh.Q;for(o=0,s=0;o<n;){switch(i=t[o++],s=o,a=0,i){case c:a=1;break;case f:a=1;break;case h:a=3;break;case g:a=2;break;case p:var v=e[4],m=e[5],y=$I(e[0]*e[0]+e[1]*e[1]),_=$I(e[2]*e[2]+e[3]*e[3]),x=Zle(-e[1]/_,e[0]/y);t[o]*=y,t[o++]+=v,t[o]*=_,t[o++]+=m,t[o++]*=y,t[o++]*=_,t[o++]+=x,t[o++]+=x,o+=2,s=o;break;case d:u[0]=t[o++],u[1]=t[o++],Or(u,u,e),t[s++]=u[0],t[s++]=u[1],u[0]+=t[o++],u[1]+=t[o++],Or(u,u,e),t[s++]=u[0],t[s++]=u[1]}for(l=0;l<a;l++){var S=Kle[l];S[0]=t[o++],S[1]=t[o++],Or(S,S,e),t[s++]=S[0],t[s++]=S[1]}}r.increaseVersion()}}var rA=Math.sqrt,Km=Math.sin,Zm=Math.cos,Qd=Math.PI;function XI(r){return Math.sqrt(r[0]*r[0]+r[1]*r[1])}function bT(r,e){return(r[0]*e[0]+r[1]*e[1])/(XI(r)*XI(e))}function YI(r,e){return(r[0]*e[1]<r[1]*e[0]?-1:1)*Math.acos(bT(r,e))}function qI(r,e,t,n,i,a,o,s,l,u,c){var h=l*(Qd/180),f=Zm(h)*(r-t)/2+Km(h)*(e-n)/2,d=-1*Km(h)*(r-t)/2+Zm(h)*(e-n)/2,p=f*f/(o*o)+d*d/(s*s);p>1&&(o*=rA(p),s*=rA(p));var g=(i===a?-1:1)*rA((o*o*(s*s)-o*o*(d*d)-s*s*(f*f))/(o*o*(d*d)+s*s*(f*f)))||0,v=g*o*d/s,m=g*-s*f/o,y=(r+t)/2+Zm(h)*v-Km(h)*m,_=(e+n)/2+Km(h)*v+Zm(h)*m,x=YI([1,0],[(f-v)/o,(d-m)/s]),S=[(f-v)/o,(d-m)/s],A=[(-1*f-v)/o,(-1*d-m)/s],w=YI(S,A);if(bT(S,A)<=-1&&(w=Qd),bT(S,A)>=1&&(w=0),w<0){var M=Math.round(w/Qd*1e6)/1e6;w=Qd*2+M%2*Qd}c.addData(u,y,_,o,s,x,w,h,a)}var Qle=/([mlvhzcqtsa])([^mlvhzcqtsa]*)/ig,Jle=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function eue(r){var e=new jo;if(!r)return e;var t=0,n=0,i=t,a=n,o,s=jo.CMD,l=r.match(Qle);if(!l)return e;for(var u=0;u<l.length;u++){for(var c=l[u],h=c.charAt(0),f=void 0,d=c.match(Jle)||[],p=d.length,g=0;g<p;g++)d[g]=parseFloat(d[g]);for(var v=0;v<p;){var m=void 0,y=void 0,_=void 0,x=void 0,S=void 0,A=void 0,w=void 0,M=t,C=n,b=void 0,T=void 0;switch(h){case"l":t+=d[v++],n+=d[v++],f=s.L,e.addData(f,t,n);break;case"L":t=d[v++],n=d[v++],f=s.L,e.addData(f,t,n);break;case"m":t+=d[v++],n+=d[v++],f=s.M,e.addData(f,t,n),i=t,a=n,h="l";break;case"M":t=d[v++],n=d[v++],f=s.M,e.addData(f,t,n),i=t,a=n,h="L";break;case"h":t+=d[v++],f=s.L,e.addData(f,t,n);break;case"H":t=d[v++],f=s.L,e.addData(f,t,n);break;case"v":n+=d[v++],f=s.L,e.addData(f,t,n);break;case"V":n=d[v++],f=s.L,e.addData(f,t,n);break;case"C":f=s.C,e.addData(f,d[v++],d[v++],d[v++],d[v++],d[v++],d[v++]),t=d[v-2],n=d[v-1];break;case"c":f=s.C,e.addData(f,d[v++]+t,d[v++]+n,d[v++]+t,d[v++]+n,d[v++]+t,d[v++]+n),t+=d[v-2],n+=d[v-1];break;case"S":m=t,y=n,b=e.len(),T=e.data,o===s.C&&(m+=t-T[b-4],y+=n-T[b-3]),f=s.C,M=d[v++],C=d[v++],t=d[v++],n=d[v++],e.addData(f,m,y,M,C,t,n);break;case"s":m=t,y=n,b=e.len(),T=e.data,o===s.C&&(m+=t-T[b-4],y+=n-T[b-3]),f=s.C,M=t+d[v++],C=n+d[v++],t+=d[v++],n+=d[v++],e.addData(f,m,y,M,C,t,n);break;case"Q":M=d[v++],C=d[v++],t=d[v++],n=d[v++],f=s.Q,e.addData(f,M,C,t,n);break;case"q":M=d[v++]+t,C=d[v++]+n,t+=d[v++],n+=d[v++],f=s.Q,e.addData(f,M,C,t,n);break;case"T":m=t,y=n,b=e.len(),T=e.data,o===s.Q&&(m+=t-T[b-4],y+=n-T[b-3]),t=d[v++],n=d[v++],f=s.Q,e.addData(f,m,y,t,n);break;case"t":m=t,y=n,b=e.len(),T=e.data,o===s.Q&&(m+=t-T[b-4],y+=n-T[b-3]),t+=d[v++],n+=d[v++],f=s.Q,e.addData(f,m,y,t,n);break;case"A":_=d[v++],x=d[v++],S=d[v++],A=d[v++],w=d[v++],M=t,C=n,t=d[v++],n=d[v++],f=s.A,qI(M,C,t,n,A,w,_,x,S,f,e);break;case"a":_=d[v++],x=d[v++],S=d[v++],A=d[v++],w=d[v++],M=t,C=n,t+=d[v++],n+=d[v++],f=s.A,qI(M,C,t,n,A,w,_,x,S,f,e);break}}(h==="z"||h==="Z")&&(f=s.Z,e.addData(f),t=i,n=a),o=f}return e.toStatic(),e}var aV=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.applyTransform=function(t){},e}(yt);function oV(r){return r.setData!=null}function sV(r,e){var t=eue(r),n=pe({},e);return n.buildPath=function(i){if(oV(i)){i.setData(t.data);var a=i.getContext();a&&i.rebuildPath(a,1)}else{var a=i;t.rebuildPath(a,1)}},n.applyTransform=function(i){iV(t,i),this.dirtyShape()},n}function lV(r,e){return new aV(sV(r,e))}function tue(r,e){var t=sV(r,e),n=function(i){ae(a,i);function a(o){var s=i.call(this,o)||this;return s.applyTransform=t.applyTransform,s.buildPath=t.buildPath,s}return a}(aV);return n}function nue(r,e){for(var t=[],n=r.length,i=0;i<n;i++){var a=r[i];t.push(a.getUpdatedPathProxy(!0))}var o=new yt(e);return o.createPathProxy(),o.buildPath=function(s){if(oV(s)){s.appendPath(t);var l=s.getContext();l&&s.rebuildPath(l,1)}},o}function u2(r,e){e=e||{};var t=new yt;return r.shape&&t.setShape(r.shape),t.setStyle(r.style),e.bakeTransform?iV(t.path,r.getComputedTransform()):e.toLocal?t.setLocalTransform(r.getComputedTransform()):t.copyTransform(r),t.buildPath=r.buildPath,t.applyTransform=t.applyTransform,t.z=r.z,t.z2=r.z2,t.zlevel=r.zlevel,t}var rue=function(){function r(){this.cx=0,this.cy=0,this.r=0}return r}(),uV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new rue},e.prototype.buildPath=function(t,n){t.moveTo(n.cx+n.r,n.cy),t.arc(n.cx,n.cy,n.r,0,Math.PI*2)},e}(yt);uV.prototype.type="circle";const au=uV;var iue=function(){function r(){this.cx=0,this.cy=0,this.rx=0,this.ry=0}return r}(),cV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new iue},e.prototype.buildPath=function(t,n){var i=.5522848,a=n.cx,o=n.cy,s=n.rx,l=n.ry,u=s*i,c=l*i;t.moveTo(a-s,o),t.bezierCurveTo(a-s,o-c,a-u,o-l,a,o-l),t.bezierCurveTo(a+u,o-l,a+s,o-c,a+s,o),t.bezierCurveTo(a+s,o+c,a+u,o+l,a,o+l),t.bezierCurveTo(a-u,o+l,a-s,o+c,a-s,o),t.closePath()},e}(yt);cV.prototype.type="ellipse";const c2=cV;var hV=Math.PI,iA=hV*2,Ru=Math.sin,Oh=Math.cos,aue=Math.acos,Wr=Math.atan2,jI=Math.abs,ov=Math.sqrt,Dp=Math.max,xo=Math.min,Xa=1e-4;function oue(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,h=s-a,f=h*l-c*u;if(!(f*f<Xa))return f=(c*(e-a)-h*(r-i))/f,[r+f*l,e+f*u]}function Qm(r,e,t,n,i,a,o){var s=r-t,l=e-n,u=(o?a:-a)/ov(s*s+l*l),c=u*l,h=-u*s,f=r+c,d=e+h,p=t+c,g=n+h,v=(f+p)/2,m=(d+g)/2,y=p-f,_=g-d,x=y*y+_*_,S=i-a,A=f*g-p*d,w=(_<0?-1:1)*ov(Dp(0,S*S*x-A*A)),M=(A*_-y*w)/x,C=(-A*y-_*w)/x,b=(A*_+y*w)/x,T=(-A*y+_*w)/x,P=M-v,D=C-m,L=b-v,E=T-m;return P*P+D*D>L*L+E*E&&(M=b,C=T),{cx:M,cy:C,x0:-c,y0:-h,x1:M*(i/S-1),y1:C*(i/S-1)}}function sue(r){var e;if(_e(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 lue(r,e){var t,n=Dp(e.r,0),i=Dp(e.r0||0,0),a=n>0,o=i>0;if(!(!a&&!o)){if(a||(n=i,i=0),i>n){var s=n;n=i,i=s}var l=e.startAngle,u=e.endAngle;if(!(isNaN(l)||isNaN(u))){var c=e.cx,h=e.cy,f=!!e.clockwise,d=jI(u-l),p=d>iA&&d%iA;if(p>Xa&&(d=p),!(n>Xa))r.moveTo(c,h);else if(d>iA-Xa)r.moveTo(c+n*Oh(l),h+n*Ru(l)),r.arc(c,h,n,l,u,!f),i>Xa&&(r.moveTo(c+i*Oh(u),h+i*Ru(u)),r.arc(c,h,i,u,l,f));else{var g=void 0,v=void 0,m=void 0,y=void 0,_=void 0,x=void 0,S=void 0,A=void 0,w=void 0,M=void 0,C=void 0,b=void 0,T=void 0,P=void 0,D=void 0,L=void 0,E=n*Oh(l),I=n*Ru(l),N=i*Oh(u),R=i*Ru(u),F=d>Xa;if(F){var O=e.cornerRadius;O&&(t=sue(O),g=t[0],v=t[1],m=t[2],y=t[3]);var V=jI(n-i)/2;if(_=xo(V,m),x=xo(V,y),S=xo(V,g),A=xo(V,v),C=w=Dp(_,x),b=M=Dp(S,A),(w>Xa||M>Xa)&&(T=n*Oh(u),P=n*Ru(u),D=i*Oh(l),L=i*Ru(l),d<hV)){var H=oue(E,I,D,L,T,P,N,R);if(H){var Q=E-H[0],W=I-H[1],Z=T-H[0],ee=P-H[1],he=1/Ru(aue((Q*Z+W*ee)/(ov(Q*Q+W*W)*ov(Z*Z+ee*ee)))/2),le=ov(H[0]*H[0]+H[1]*H[1]);C=xo(w,(n-le)/(he+1)),b=xo(M,(i-le)/(he-1))}}}if(!F)r.moveTo(c+E,h+I);else if(C>Xa){var re=xo(m,C),be=xo(y,C),de=Qm(D,L,E,I,n,re,f),U=Qm(T,P,N,R,n,be,f);r.moveTo(c+de.cx+de.x0,h+de.cy+de.y0),C<w&&re===be?r.arc(c+de.cx,h+de.cy,C,Wr(de.y0,de.x0),Wr(U.y0,U.x0),!f):(re>0&&r.arc(c+de.cx,h+de.cy,re,Wr(de.y0,de.x0),Wr(de.y1,de.x1),!f),r.arc(c,h,n,Wr(de.cy+de.y1,de.cx+de.x1),Wr(U.cy+U.y1,U.cx+U.x1),!f),be>0&&r.arc(c+U.cx,h+U.cy,be,Wr(U.y1,U.x1),Wr(U.y0,U.x0),!f))}else r.moveTo(c+E,h+I),r.arc(c,h,n,l,u,!f);if(!(i>Xa)||!F)r.lineTo(c+N,h+R);else if(b>Xa){var re=xo(g,b),be=xo(v,b),de=Qm(N,R,T,P,i,-be,f),U=Qm(E,I,D,L,i,-re,f);r.lineTo(c+de.cx+de.x0,h+de.cy+de.y0),b<M&&re===be?r.arc(c+de.cx,h+de.cy,b,Wr(de.y0,de.x0),Wr(U.y0,U.x0),!f):(be>0&&r.arc(c+de.cx,h+de.cy,be,Wr(de.y0,de.x0),Wr(de.y1,de.x1),!f),r.arc(c,h,i,Wr(de.cy+de.y1,de.cx+de.x1),Wr(U.cy+U.y1,U.cx+U.x1),f),re>0&&r.arc(c+U.cx,h+U.cy,re,Wr(U.y1,U.x1),Wr(U.y0,U.x0),!f))}else r.lineTo(c+N,h+R),r.arc(c,h,i,u,l,f)}r.closePath()}}}var uue=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}(),fV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new uue},e.prototype.buildPath=function(t,n){lue(t,n)},e.prototype.isZeroArea=function(){return this.shape.startAngle===this.shape.endAngle||this.shape.r===this.shape.r0},e}(yt);fV.prototype.type="sector";const Bi=fV;var cue=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.r0=0}return r}(),dV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new cue},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.PI*2;t.moveTo(i+n.r,a),t.arc(i,a,n.r,0,o,!1),t.moveTo(i+n.r0,a),t.arc(i,a,n.r0,0,o,!0)},e}(yt);dV.prototype.type="ring";const T1=dV;function hue(r,e,t,n){var i=[],a=[],o=[],s=[],l,u,c,h;if(n){c=[1/0,1/0],h=[-1/0,-1/0];for(var f=0,d=r.length;f<d;f++)Tl(c,c,r[f]),Ml(h,h,r[f]);Tl(c,c,n[0]),Ml(h,h,n[1])}for(var f=0,d=r.length;f<d;f++){var p=r[f];if(t)l=r[f?f-1:d-1],u=r[(f+1)%d];else if(f===0||f===d-1){i.push(Ss(r[f]));continue}else l=r[f-1],u=r[f+1];ic(a,u,l),Qy(a,a,e);var g=qb(p,l),v=qb(p,u),m=g+v;m!==0&&(g/=m,v/=m),Qy(o,a,-g),Qy(s,a,v);var y=GD([],p,o),_=GD([],p,s);n&&(Ml(y,y,c),Tl(y,y,h),Ml(_,_,c),Tl(_,_,h)),i.push(y),i.push(_)}return t&&i.push(i.shift()),i}function pV(r,e,t){var n=e.smooth,i=e.points;if(i&&i.length>=2){if(n){var a=hue(i,n,t,e.smoothConstraint);r.moveTo(i[0][0],i[0][1]);for(var o=i.length,s=0;s<(t?o:o-1);s++){var l=a[s*2],u=a[s*2+1],c=i[(s+1)%o];r.bezierCurveTo(l[0],l[1],u[0],u[1],c[0],c[1])}}else{r.moveTo(i[0][0],i[0][1]);for(var s=1,h=i.length;s<h;s++)r.lineTo(i[s][0],i[s][1])}t&&r.closePath()}}var fue=function(){function r(){this.points=null,this.smooth=0,this.smoothConstraint=null}return r}(),vV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new fue},e.prototype.buildPath=function(t,n){pV(t,n,!0)},e}(yt);vV.prototype.type="polygon";const zi=vV;var due=function(){function r(){this.points=null,this.percent=1,this.smooth=0,this.smoothConstraint=null}return r}(),gV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new due},e.prototype.buildPath=function(t,n){pV(t,n,!1)},e}(yt);gV.prototype.type="polyline";const Ui=gV;var pue={},vue=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}(),mV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new vue},e.prototype.buildPath=function(t,n){var i,a,o,s;if(this.subPixelOptimize){var l=H4(pue,n,this.style);i=l.x1,a=l.y1,o=l.x2,s=l.y2}else i=n.x1,a=n.y1,o=n.x2,s=n.y2;var u=n.percent;u!==0&&(t.moveTo(i,a),u<1&&(o=i*(1-u)+o*u,s=a*(1-u)+s*u),t.lineTo(o,s))},e.prototype.pointAt=function(t){var n=this.shape;return[n.x1*(1-t)+n.x2*t,n.y1*(1-t)+n.y2*t]},e}(yt);mV.prototype.type="line";const Cr=mV;var _i=[],gue=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.cpx1=0,this.cpy1=0,this.percent=1}return r}();function KI(r,e,t){var n=r.cpx2,i=r.cpy2;return n!=null||i!=null?[(t?eI:pr)(r.x1,r.cpx1,r.cpx2,r.x2,e),(t?eI:pr)(r.y1,r.cpy1,r.cpy2,r.y2,e)]:[(t?eT:Tr)(r.x1,r.cpx1,r.x2,e),(t?eT:Tr)(r.y1,r.cpy1,r.y2,e)]}var yV=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new gue},e.prototype.buildPath=function(t,n){var i=n.x1,a=n.y1,o=n.x2,s=n.y2,l=n.cpx1,u=n.cpy1,c=n.cpx2,h=n.cpy2,f=n.percent;f!==0&&(t.moveTo(i,a),c==null||h==null?(f<1&&(Bv(i,l,o,f,_i),l=_i[1],o=_i[2],Bv(a,u,s,f,_i),u=_i[1],s=_i[2]),t.quadraticCurveTo(l,u,o,s)):(f<1&&(jl(i,l,c,o,f,_i),l=_i[1],c=_i[2],o=_i[3],jl(a,u,h,s,f,_i),u=_i[1],h=_i[2],s=_i[3]),t.bezierCurveTo(l,u,c,h,o,s)))},e.prototype.pointAt=function(t){return KI(this.shape,t,!1)},e.prototype.tangentAt=function(t){var n=KI(this.shape,t,!0);return pd(n,n)},e}(yt);yV.prototype.type="bezier-curve";const M1=yV;var mue=function(){function r(){this.cx=0,this.cy=0,this.r=0,this.startAngle=0,this.endAngle=Math.PI*2,this.clockwise=!0}return r}(),_V=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new mue},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r,0),s=n.startAngle,l=n.endAngle,u=n.clockwise,c=Math.cos(s),h=Math.sin(s);t.moveTo(c*o+i,h*o+a),t.arc(i,a,o,s,l,!u)},e}(yt);_V.prototype.type="arc";const h2=_V;var yue=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="compound",t}return e.prototype._updatePathDirty=function(){for(var t=this.shape.paths,n=this.shapeChanged(),i=0;i<t.length;i++)n=n||t[i].shapeChanged();n&&this.dirtyShape()},e.prototype.beforeBrush=function(){this._updatePathDirty();for(var t=this.shape.paths||[],n=this.getGlobalScale(),i=0;i<t.length;i++)t[i].path||t[i].createPathProxy(),t[i].path.setScale(n[0],n[1],t[i].segmentIgnoreThreshold)},e.prototype.buildPath=function(t,n){for(var i=n.paths||[],a=0;a<i.length;a++)i[a].buildPath(t,i[a].shape,!0)},e.prototype.afterBrush=function(){for(var t=this.shape.paths||[],n=0;n<t.length;n++)t[n].pathUpdated()},e.prototype.getBoundingRect=function(){return this._updatePathDirty.call(this),yt.prototype.getBoundingRect.call(this)},e}(yt);const f2=yue;var _ue=function(){function r(e){this.colorStops=e||[]}return r.prototype.addColorStop=function(e,t){this.colorStops.push({offset:e,color:t})},r}();const xV=_ue;var xue=function(r){ae(e,r);function e(t,n,i,a,o,s){var l=r.call(this,o)||this;return l.x=t==null?0:t,l.y=n==null?0:n,l.x2=i==null?1:i,l.y2=a==null?0:a,l.type="linear",l.global=s||!1,l}return e}(xV);const Ul=xue;var Sue=function(r){ae(e,r);function e(t,n,i,a,o){var s=r.call(this,a)||this;return s.x=t==null?.5:t,s.y=n==null?.5:n,s.r=i==null?.5:i,s.type="radial",s.global=o||!1,s}return e}(xV);const SV=Sue;var Du=[0,0],Iu=[0,0],Jm=new ft,ey=new ft,Aue=function(){function r(e,t){this._corners=[],this._axes=[],this._origin=[0,0];for(var n=0;n<4;n++)this._corners[n]=new ft;for(var n=0;n<2;n++)this._axes[n]=new ft;e&&this.fromBoundingRect(e,t)}return r.prototype.fromBoundingRect=function(e,t){var n=this._corners,i=this._axes,a=e.x,o=e.y,s=a+e.width,l=o+e.height;if(n[0].set(a,o),n[1].set(s,o),n[2].set(s,l),n[3].set(a,l),t)for(var u=0;u<4;u++)n[u].transform(t);ft.sub(i[0],n[1],n[0]),ft.sub(i[1],n[3],n[0]),i[0].normalize(),i[1].normalize();for(var u=0;u<2;u++)this._origin[u]=i[u].dot(n[0])},r.prototype.intersect=function(e,t){var n=!0,i=!t;return Jm.set(1/0,1/0),ey.set(0,0),!this._intersectCheckOneSide(this,e,Jm,ey,i,1)&&(n=!1,i)||!this._intersectCheckOneSide(e,this,Jm,ey,i,-1)&&(n=!1,i)||i||ft.copy(t,n?Jm:ey),n},r.prototype._intersectCheckOneSide=function(e,t,n,i,a,o){for(var s=!0,l=0;l<2;l++){var u=this._axes[l];if(this._getProjMinMaxOnAxis(l,e._corners,Du),this._getProjMinMaxOnAxis(l,t._corners,Iu),Du[1]<Iu[0]||Du[0]>Iu[1]){if(s=!1,a)return s;var c=Math.abs(Iu[0]-Du[1]),h=Math.abs(Du[0]-Iu[1]);Math.min(c,h)>i.len()&&(c<h?ft.scale(i,u,-c*o):ft.scale(i,u,h*o))}else if(n){var c=Math.abs(Iu[0]-Du[1]),h=Math.abs(Du[0]-Iu[1]);Math.min(c,h)<n.len()&&(c<h?ft.scale(n,u,c*o):ft.scale(n,u,-h*o))}}return s},r.prototype._getProjMinMaxOnAxis=function(e,t,n){for(var i=this._axes[e],a=this._origin,o=t[0].dot(i)+a[e],s=o,l=o,u=1;u<t.length;u++){var c=t[u].dot(i)+a[e];s=Math.min(c,s),l=Math.max(c,l)}n[0]=s,n[1]=l},r}();const a_=Aue;var wue=[],bue=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.notClear=!0,t.incremental=!0,t._displayables=[],t._temporaryDisplayables=[],t._cursor=0,t}return e.prototype.traverse=function(t,n){t.call(n,this)},e.prototype.useStyle=function(){this.style={}},e.prototype.getCursor=function(){return this._cursor},e.prototype.innerAfterBrush=function(){this._cursor=this._displayables.length},e.prototype.clearDisplaybles=function(){this._displayables=[],this._temporaryDisplayables=[],this._cursor=0,this.markRedraw(),this.notClear=!1},e.prototype.clearTemporalDisplayables=function(){this._temporaryDisplayables=[]},e.prototype.addDisplayable=function(t,n){n?this._temporaryDisplayables.push(t):this._displayables.push(t),this.markRedraw()},e.prototype.addDisplayables=function(t,n){n=n||!1;for(var i=0;i<t.length;i++)this.addDisplayable(t[i],n)},e.prototype.getDisplayables=function(){return this._displayables},e.prototype.getTemporalDisplayables=function(){return this._temporaryDisplayables},e.prototype.eachPendingDisplayable=function(t){for(var n=this._cursor;n<this._displayables.length;n++)t&&t(this._displayables[n]);for(var n=0;n<this._temporaryDisplayables.length;n++)t&&t(this._temporaryDisplayables[n])},e.prototype.update=function(){this.updateTransform();for(var t=this._cursor;t<this._displayables.length;t++){var n=this._displayables[t];n.parent=this,n.update(),n.parent=null}for(var t=0;t<this._temporaryDisplayables.length;t++){var n=this._temporaryDisplayables[t];n.parent=this,n.update(),n.parent=null}},e.prototype.getBoundingRect=function(){if(!this._rect){for(var t=new dt(1/0,1/0,-1/0,-1/0),n=0;n<this._displayables.length;n++){var i=this._displayables[n],a=i.getBoundingRect().clone();i.needLocalTransform()&&a.applyTransform(i.getLocalTransform(wue)),t.union(a)}this._rect=t}return this._rect},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(a.contain(i[0],i[1]))for(var o=0;o<this._displayables.length;o++){var s=this._displayables[o];if(s.contain(t,n))return!0}return!1},e}(ka);const Tue=bue;var AV=Pt();function yd(r,e,t,n,i){var a;if(e&&e.ecModel){var o=e.ecModel.getUpdatePayload();a=o&&o.animation}var s=e&&e.isAnimationEnabled(),l=r==="update";if(s){var u=void 0,c=void 0,h=void 0;n?(u=ot(n.duration,200),c=ot(n.easing,"cubicOut"),h=0):(u=e.getShallow(l?"animationDurationUpdate":"animationDuration"),c=e.getShallow(l?"animationEasingUpdate":"animationEasing"),h=e.getShallow(l?"animationDelayUpdate":"animationDelay")),a&&(a.duration!=null&&(u=a.duration),a.easing!=null&&(c=a.easing),a.delay!=null&&(h=a.delay)),qe(h)&&(h=h(t,i)),qe(u)&&(u=u(t));var f={duration:u||0,delay:h,easing:c};return f}else return null}function d2(r,e,t,n,i,a,o){var s=!1,l;qe(i)?(o=a,a=i,i=null):Qe(i)&&(a=i.cb,o=i.during,s=i.isFrom,l=i.removeOpt,i=i.dataIndex);var u=r==="leave";u||e.stopAnimation("leave");var c=yd(r,n,i,u?l||{}:null,n&&n.getAnimationDelayParams?n.getAnimationDelayParams(e,i):null);if(c&&c.duration>0){var h=c.duration,f=c.delay,d=c.easing,p={duration:h,delay:f||0,easing:d,done:a,force:!!a||!!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),a&&a()}function zt(r,e,t,n,i,a){d2("update",r,e,t,n,i,a)}function Tn(r,e,t,n,i,a){d2("enter",r,e,t,n,i,a)}function Mf(r){if(!r.__zr)return!0;for(var e=0;e<r.animators.length;e++){var t=r.animators[e];if(t.scope==="leave")return!0}return!1}function Kl(r,e,t,n,i,a){Mf(r)||d2("leave",r,e,t,n,i,a)}function ZI(r,e,t,n){r.removeTextContent(),r.removeTextGuideLine(),Kl(r,{style:{opacity:0}},e,t,n)}function Xv(r,e,t){function n(){r.parent&&r.parent.remove(r)}r.isGroup?r.traverse(function(i){i.isGroup||ZI(i,e,t,n)}):ZI(r,e,t,n)}function lo(r){AV(r).oldStyle=r.style}function Mue(r){return AV(r).oldStyle}var o_=Math.max,s_=Math.min,TT={};function Cue(r){return yt.extend(r)}var Eue=tue;function Lue(r,e){return Eue(r,e)}function co(r,e){TT[r]=e}function p2(r){if(TT.hasOwnProperty(r))return TT[r]}function C1(r,e,t,n){var i=lV(r,e);return t&&(n==="center"&&(t=bV(t,i.getBoundingRect())),TV(i,t)),i}function wV(r,e,t){var n=new Ur({style:{image:r,x:e.x,y:e.y,width:e.width,height:e.height},onload:function(i){if(t==="center"){var a={width:i.width,height:i.height};n.setStyle(bV(e,a))}}});return n}function bV(r,e){var t=e.width/e.height,n=r.height*t,i;n<=r.width?i=r.height:(n=r.width,i=n/t);var a=r.x+r.width/2,o=r.y+r.height/2;return{x:a-n/2,y:o-i/2,width:n,height:i}}var Ma=nue;function TV(r,e){if(r.applyTransform){var t=r.getBoundingRect(),n=t.calculateTransform(e);r.applyTransform(n)}}function Qf(r,e){return H4(r,r,{lineWidth:e}),r}function Pue(r){return W4(r.shape,r.shape,r.style),r}var l0=ac;function Lc(r,e){for(var t=g1([]);r&&r!==e;)As(t,r.getLocalTransform(),t),r=r.parent;return t}function io(r,e,t){return e&&!ii(e)&&(e=_s.getLocalTransform(e)),t&&(e=vd([],e)),Or([],r,e)}function E1(r,e,t){var n=e[4]===0||e[5]===0||e[0]===0?1:Math.abs(2*e[4]/e[0]),i=e[4]===0||e[5]===0||e[2]===0?1:Math.abs(2*e[4]/e[2]),a=[r==="left"?-n:r==="right"?n:0,r==="top"?-i:r==="bottom"?i:0];return a=io(a,e,t),Math.abs(a[0])>Math.abs(a[1])?a[0]>0?"right":"left":a[1]>0?"bottom":"top"}function QI(r){return!r.isGroup}function Rue(r){return r.shape!=null}function Mg(r,e,t){if(!r||!e)return;function n(o){var s={};return o.traverse(function(l){QI(l)&&l.anid&&(s[l.anid]=l)}),s}function i(o){var s={x:o.x,y:o.y,rotation:o.rotation};return Rue(o)&&(s.shape=pe({},o.shape)),s}var a=n(r);e.traverse(function(o){if(QI(o)&&o.anid){var s=a[o.anid];if(s){var l=i(o);o.attr(i(s)),zt(o,l,t,at(o).dataIndex)}}})}function MV(r,e){return xe(r,function(t){var n=t[0];n=o_(n,e.x),n=s_(n,e.x+e.width);var i=t[1];return i=o_(i,e.y),i=s_(i,e.y+e.height),[n,i]})}function Due(r,e){var t=o_(r.x,e.x),n=s_(r.x+r.width,e.x+e.width),i=o_(r.y,e.y),a=s_(r.y+r.height,e.y+e.height);if(n>=t&&a>=i)return{x:t,y:i,width:n-t,height:a-i}}function Cg(r,e,t){var n=pe({rectHover:!0},e),i=n.style={strokeNoScale:!0};if(t=t||{x:-1,y:-1,width:2,height:2},r)return r.indexOf("image://")===0?(i.image=r.slice(8),Ke(i,t),new Ur(n)):C1(r.replace("path://",""),n,t,"center")}function Ip(r,e,t,n,i){for(var a=0,o=i[i.length-1];a<i.length;a++){var s=i[a];if(CV(r,e,t,n,s[0],s[1],o[0],o[1]))return!0;o=s}}function CV(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,h=s-a,f=aA(c,h,l,u);if(Iue(f))return!1;var d=r-i,p=e-a,g=aA(d,p,l,u)/f;if(g<0||g>1)return!1;var v=aA(d,p,c,h)/f;return!(v<0||v>1)}function aA(r,e,t,n){return r*n-t*e}function Iue(r){return r<=1e-6&&r>=-1e-6}function Kc(r){var e=r.itemTooltipOption,t=r.componentModel,n=r.itemName,i=ke(e)?{formatter:e}:e,a=t.mainType,o=t.componentIndex,s={componentType:a,name:n,$vars:["name"]};s[a+"Index"]=o;var l=r.formatterParamsExtra;l&&k(wt(l),function(c){ze(s,c)||(s[c]=l[c],s.$vars.push(c))});var u=at(r.el);u.componentMainType=a,u.componentIndex=o,u.tooltipConfig={name:n,option:Ke({content:n,encodeHTMLContent:!0,formatterParams:s},i)}}function JI(r,e){var t;r.isGroup&&(t=e(r)),t||r.traverse(e)}function ou(r,e){if(r)if(_e(r))for(var t=0;t<r.length;t++)JI(r[t],e);else JI(r,e)}co("circle",au);co("ellipse",c2);co("sector",Bi);co("ring",T1);co("polygon",zi);co("polyline",Ui);co("rect",Dt);co("line",Cr);co("bezierCurve",M1);co("arc",h2);const Zc=Object.freeze(Object.defineProperty({__proto__:null,Arc:h2,BezierCurve:M1,BoundingRect:dt,Circle:au,CompoundPath:f2,Ellipse:c2,Group:rt,Image:Ur,IncrementalDisplayable:Tue,Line:Cr,LinearGradient:Ul,OrientedBoundingRect:a_,Path:yt,Point:ft,Polygon:zi,Polyline:Ui,RadialGradient:SV,Rect:Dt,Ring:T1,Sector:Bi,Text:Ot,applyTransform:io,clipPointsByRect:MV,clipRectByRect:Due,createIcon:Cg,extendPath:Lue,extendShape:Cue,getShapeClass:p2,getTransform:Lc,groupTransition:Mg,initProps:Tn,isElementRemoved:Mf,lineLineIntersect:CV,linePolygonIntersect:Ip,makeImage:wV,makePath:C1,mergePath:Ma,registerShape:co,removeElement:Kl,removeElementWithFadeOut:Xv,resizePath:TV,setTooltipConfig:Kc,subPixelOptimize:l0,subPixelOptimizeLine:Qf,subPixelOptimizeRect:Pue,transformDirection:E1,traverseElements:ou,updateProps:zt},Symbol.toStringTag,{value:"Module"}));var L1={};function EV(r,e){for(var t=0;t<mi.length;t++){var n=mi[t],i=e[n],a=r.ensureState(n);a.style=a.style||{},a.style.text=i}var o=r.currentStates.slice();r.clearStates(!0),r.setStyle({text:e.normal}),r.useStates(o,!0)}function MT(r,e,t){var n=r.labelFetcher,i=r.labelDataIndex,a=r.labelDimIndex,o=e.normal,s;n&&(s=n.getFormattedLabel(i,"normal",null,a,o&&o.get("formatter"),t!=null?{interpolatedValue:t}:null)),s==null&&(s=qe(r.defaultText)?r.defaultText(i,r,t):r.defaultText);for(var l={normal:s},u=0;u<mi.length;u++){var c=mi[u],h=e[c];l[c]=ot(n?n.getFormattedLabel(i,c,null,a,h&&h.get("formatter")):null,s)}return l}function zr(r,e,t,n){t=t||L1;for(var i=r instanceof Ot,a=!1,o=0;o<Wv.length;o++){var s=e[Wv[o]];if(s&&s.getShallow("show")){a=!0;break}}var l=i?r:r.getTextContent();if(a){i||(l||(l=new Ot,r.setTextContent(l)),r.stateProxy&&(l.stateProxy=r.stateProxy));var u=MT(t,e),c=e.normal,h=!!c.getShallow("show"),f=pn(c,n&&n.normal,t,!1,!i);f.text=u.normal,i||r.setTextConfig(l_(c,t,!1));for(var o=0;o<mi.length;o++){var d=mi[o],s=e[d];if(s){var p=l.ensureState(d),g=!!ot(s.getShallow("show"),h);if(g!==h&&(p.ignore=!g),p.style=pn(s,n&&n[d],t,!0,!i),p.style.text=u[d],!i){var v=r.ensureState(d);v.textConfig=l_(s,t,!0)}}}l.silent=!!c.getShallow("silent"),l.style.x!=null&&(f.x=l.style.x),l.style.y!=null&&(f.y=l.style.y),l.ignore=!h,l.useStyle(f),l.dirty(),t.enableTextSetter&&(_d(l).setLabelText=function(m){var y=MT(t,e,m);EV(l,y)})}else l&&(l.ignore=!0);r.dirty()}function Sr(r,e){e=e||"label";for(var t={normal:r.getModel(e)},n=0;n<mi.length;n++){var i=mi[n];t[i]=r.getModel([i,e])}return t}function pn(r,e,t,n,i){var a={};return Nue(a,r,t,n,i),e&&pe(a,e),a}function l_(r,e,t){e=e||{};var n={},i,a=r.getShallow("rotate"),o=ot(r.getShallow("distance"),t?null:5),s=r.getShallow("offset");return i=r.getShallow("position")||(t?null:"inside"),i==="outside"&&(i=e.defaultOutsidePosition||"top"),i!=null&&(n.position=i),s!=null&&(n.offset=s),a!=null&&(a*=Math.PI/180,n.rotation=a),o!=null&&(n.distance=o),n.outsideFill=r.get("color")==="inherit"?e.inheritColor||null:"auto",n}function Nue(r,e,t,n,i){t=t||L1;var a=e.ecModel,o=a&&a.option.textStyle,s=kue(e),l;if(s){l={};for(var u in s)if(s.hasOwnProperty(u)){var c=e.getModel(["rich",u]);rN(l[u]={},c,o,t,n,i,!1,!0)}}l&&(r.rich=l);var h=e.get("overflow");h&&(r.overflow=h);var f=e.get("minMargin");f!=null&&(r.margin=f),rN(r,e,o,t,n,i,!0,!1)}function kue(r){for(var e;r&&r!==r.ecModel;){var t=(r.option||L1).rich;if(t){e=e||{};for(var n=wt(t),i=0;i<n.length;i++){var a=n[i];e[a]=1}}r=r.parentModel}return e}var eN=["fontStyle","fontWeight","fontSize","fontFamily","textShadowColor","textShadowBlur","textShadowOffsetX","textShadowOffsetY"],tN=["align","lineHeight","width","height","tag","verticalAlign","ellipsis"],nN=["padding","borderWidth","borderRadius","borderDashOffset","backgroundColor","borderColor","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"];function rN(r,e,t,n,i,a,o,s){t=!i&&t||L1;var l=n&&n.inheritColor,u=e.getShallow("color"),c=e.getShallow("textBorderColor"),h=ot(e.getShallow("opacity"),t.opacity);(u==="inherit"||u==="auto")&&(l?u=l:u=null),(c==="inherit"||c==="auto")&&(l?c=l:c=null),a||(u=u||t.color,c=c||t.textBorderColor),u!=null&&(r.fill=u),c!=null&&(r.stroke=c);var f=ot(e.getShallow("textBorderWidth"),t.textBorderWidth);f!=null&&(r.lineWidth=f);var d=ot(e.getShallow("textBorderType"),t.textBorderType);d!=null&&(r.lineDash=d);var p=ot(e.getShallow("textBorderDashOffset"),t.textBorderDashOffset);p!=null&&(r.lineDashOffset=p),!i&&h==null&&!s&&(h=n&&n.defaultOpacity),h!=null&&(r.opacity=h),!i&&!a&&r.fill==null&&n.inheritColor&&(r.fill=n.inheritColor);for(var g=0;g<eN.length;g++){var v=eN[g],m=ot(e.getShallow(v),t[v]);m!=null&&(r[v]=m)}for(var g=0;g<tN.length;g++){var v=tN[g],m=e.getShallow(v);m!=null&&(r[v]=m)}if(r.verticalAlign==null){var y=e.getShallow("baseline");y!=null&&(r.verticalAlign=y)}if(!o||!n.disableBox){for(var g=0;g<nN.length;g++){var v=nN[g],m=e.getShallow(v);m!=null&&(r[v]=m)}var _=e.getShallow("borderType");_!=null&&(r.borderDash=_),(r.backgroundColor==="auto"||r.backgroundColor==="inherit")&&l&&(r.backgroundColor=l),(r.borderColor==="auto"||r.borderColor==="inherit")&&l&&(r.borderColor=l)}}function v2(r,e){var t=e&&e.getModel("textStyle");return eo([r.fontStyle||t&&t.getShallow("fontStyle")||"",r.fontWeight||t&&t.getShallow("fontWeight")||"",(r.fontSize||t&&t.getShallow("fontSize")||12)+"px",r.fontFamily||t&&t.getShallow("fontFamily")||"sans-serif"].join(" "))}var _d=Pt();function LV(r,e,t,n){if(r){var i=_d(r);i.prevValue=i.value,i.value=t;var a=e.normal;i.valueAnimation=a.get("valueAnimation"),i.valueAnimation&&(i.precision=a.get("precision"),i.defaultInterpolatedText=n,i.statesModels=e)}}function PV(r,e,t,n,i){var a=_d(r);if(!a.valueAnimation||a.prevValue===a.value)return;var o=a.defaultInterpolatedText,s=ot(a.interpolatedValue,a.prevValue),l=a.value;function u(c){var h=I4(t,a.precision,s,l,c);a.interpolatedValue=c===1?null:h;var f=MT({labelDataIndex:e,labelFetcher:i,defaultText:o?o(h):h+""},a.statesModels,h);EV(r,f)}r.percent=0,(a.prevValue==null?Tn:zt)(r,{percent:1},n,e,null,u)}var Oue=["textStyle","color"],oA=["fontStyle","fontWeight","fontSize","fontFamily","padding","lineHeight","rich","width","height","overflow"],sA=new Ot,Fue=function(){function r(){}return r.prototype.getTextColor=function(e){var t=this.ecModel;return this.getShallow("color")||(!e&&t?t.get(Oue):null)},r.prototype.getFont=function(){return v2({fontStyle:this.getShallow("fontStyle"),fontWeight:this.getShallow("fontWeight"),fontSize:this.getShallow("fontSize"),fontFamily:this.getShallow("fontFamily")},this.ecModel)},r.prototype.getTextRect=function(e){for(var t={text:e,verticalAlign:this.getShallow("verticalAlign")||this.getShallow("baseline")},n=0;n<oA.length;n++)t[oA[n]]=this.getShallow(oA[n]);return sA.useStyle(t),sA.update(),sA.getBoundingRect()},r}();const Bue=Fue;var RV=[["lineWidth","width"],["stroke","color"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","type"],["lineDashOffset","dashOffset"],["lineCap","cap"],["lineJoin","join"],["miterLimit"]],zue=Vc(RV),Uue=function(){function r(){}return r.prototype.getLineStyle=function(e){return zue(this,e)},r}(),DV=[["fill","color"],["stroke","borderColor"],["lineWidth","borderWidth"],["opacity"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"],["lineDash","borderType"],["lineDashOffset","borderDashOffset"],["lineCap","borderCap"],["lineJoin","borderJoin"],["miterLimit","borderMiterLimit"]],Vue=Vc(DV),Gue=function(){function r(){}return r.prototype.getItemStyle=function(e,t){return Vue(this,e,t)},r}(),Qc=function(){function r(e,t,n){this.parentModel=t,this.ecModel=n,this.option=e}return r.prototype.init=function(e,t,n){},r.prototype.mergeOption=function(e,t){ht(this.option,e,!0)},r.prototype.get=function(e,t){return e==null?this.option:this._doGet(this.parsePath(e),!t&&this.parentModel)},r.prototype.getShallow=function(e,t){var n=this.option,i=n==null?n:n[e];if(i==null&&!t){var a=this.parentModel;a&&(i=a.getShallow(e))}return i},r.prototype.getModel=function(e,t){var n=e!=null,i=n?this.parsePath(e):null,a=n?this._doGet(i):this.option;return t=t||this.parentModel&&this.parentModel.getModel(this.resolveParentPath(i)),new r(a,t,this.ecModel)},r.prototype.isEmpty=function(){return this.option==null},r.prototype.restoreData=function(){},r.prototype.clone=function(){var e=this.constructor;return new e(Je(this.option))},r.prototype.parsePath=function(e){return typeof e=="string"?e.split("."):e},r.prototype.resolveParentPath=function(e){return e},r.prototype.isAnimationEnabled=function(){if(!kt.node&&this.option){if(this.option.animation!=null)return!!this.option.animation;if(this.parentModel)return this.parentModel.isAnimationEnabled()}},r.prototype._doGet=function(e,t){var n=this.option;if(!e)return n;for(var i=0;i<e.length&&!(e[i]&&(n=n&&typeof n=="object"?n[e[i]]:null,n==null));i++);return n==null&&t&&(n=t._doGet(this.resolveParentPath(e),t.parentModel)),n},r}();t2(Qc);Gse(Qc);ir(Qc,Uue);ir(Qc,Gue);ir(Qc,Yse);ir(Qc,Bue);const vn=Qc;var Hue=Math.round(Math.random()*10);function xd(r){return[r||"",Hue++].join("_")}function Wue(r){var e={};r.registerSubTypeDefaulter=function(t,n){var i=Fo(t);e[i.main]=n},r.determineSubType=function(t,n){var i=n.type;if(!i){var a=Fo(t).main;r.hasSubTypes(t)&&e[a]&&(i=e[a](n))}return i}}function $ue(r,e){r.topologicalTravel=function(a,o,s,l){if(!a.length)return;var u=t(o),c=u.graph,h=u.noEntryList,f={};for(k(a,function(y){f[y]=!0});h.length;){var d=h.pop(),p=c[d],g=!!f[d];g&&(s.call(l,d,p.originalDeps.slice()),delete f[d]),k(p.successor,g?m:v)}k(f,function(){var y="";throw new Error(y)});function v(y){c[y].entryCount--,c[y].entryCount===0&&h.push(y)}function m(y){f[y]=!0,v(y)}};function t(a){var o={},s=[];return k(a,function(l){var u=n(o,l),c=u.originalDeps=e(l),h=i(c,a);u.entryCount=h.length,u.entryCount===0&&s.push(l),k(h,function(f){pt(u.predecessor,f)<0&&u.predecessor.push(f);var d=n(o,f);pt(d.successor,f)<0&&d.successor.push(l)})}),{graph:o,noEntryList:s}}function n(a,o){return a[o]||(a[o]={predecessor:[],successor:[]}),a[o]}function i(a,o){var s=[];return k(a,function(l){pt(o,l)>=0&&s.push(l)}),s}}function su(r,e){return ht(ht({},r,!0),e,!0)}const Xue={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:". "}}}},Yue={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 u_="ZH",g2="EN",Cf=g2,u0={},m2={},IV=kt.domSupported?function(){var r=(document.documentElement.lang||navigator.language||navigator.browserLanguage||Cf).toUpperCase();return r.indexOf(u_)>-1?u_:Cf}():Cf;function NV(r,e){r=r.toUpperCase(),m2[r]=new vn(e),u0[r]=e}function que(r){if(ke(r)){var e=u0[r.toUpperCase()]||{};return r===u_||r===g2?Je(e):ht(Je(e),Je(u0[Cf]),!1)}else return ht(Je(r),Je(u0[Cf]),!1)}function CT(r){return m2[r]}function jue(){return m2[Cf]}NV(g2,Xue);NV(u_,Yue);var y2=1e3,_2=y2*60,sv=_2*60,Ca=sv*24,iN=Ca*365,Np={year:"{yyyy}",month:"{MMM}",day:"{d}",hour:"{HH}:{mm}",minute:"{HH}:{mm}",second:"{HH}:{mm}:{ss}",millisecond:"{HH}:{mm}:{ss} {SSS}",none:"{yyyy}-{MM}-{dd} {HH}:{mm}:{ss} {SSS}"},ty="{yyyy}-{MM}-{dd}",aN={year:"{yyyy}",month:"{yyyy}-{MM}",day:ty,hour:ty+" "+Np.hour,minute:ty+" "+Np.minute,second:ty+" "+Np.second,millisecond:Np.none},lA=["year","month","day","hour","minute","second","millisecond"],kV=["year","half-year","quarter","month","week","half-week","day","half-day","quarter-day","hour","minute","second","millisecond"];function Zs(r,e){return r+="","0000".substr(0,e-r.length)+r}function Ef(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 Kue(r){return r===Ef(r)}function Zue(r){switch(r){case"year":case"month":return"day";case"millisecond":return"millisecond";default:return"second"}}function P1(r,e,t,n){var i=qo(r),a=i[x2(t)](),o=i[Lf(t)]()+1,s=Math.floor((o-1)/3)+1,l=i[R1(t)](),u=i["get"+(t?"UTC":"")+"Day"](),c=i[Yv(t)](),h=(c-1)%12+1,f=i[D1(t)](),d=i[I1(t)](),p=i[N1(t)](),g=c>=12?"pm":"am",v=g.toUpperCase(),m=n instanceof vn?n:CT(n||IV)||jue(),y=m.getModel("time"),_=y.get("month"),x=y.get("monthAbbr"),S=y.get("dayOfWeek"),A=y.get("dayOfWeekAbbr");return(e||"").replace(/{a}/g,g+"").replace(/{A}/g,v+"").replace(/{yyyy}/g,a+"").replace(/{yy}/g,Zs(a%100+"",2)).replace(/{Q}/g,s+"").replace(/{MMMM}/g,_[o-1]).replace(/{MMM}/g,x[o-1]).replace(/{MM}/g,Zs(o,2)).replace(/{M}/g,o+"").replace(/{dd}/g,Zs(l,2)).replace(/{d}/g,l+"").replace(/{eeee}/g,S[u]).replace(/{ee}/g,A[u]).replace(/{e}/g,u+"").replace(/{HH}/g,Zs(c,2)).replace(/{H}/g,c+"").replace(/{hh}/g,Zs(h+"",2)).replace(/{h}/g,h+"").replace(/{mm}/g,Zs(f,2)).replace(/{m}/g,f+"").replace(/{ss}/g,Zs(d,2)).replace(/{s}/g,d+"").replace(/{SSS}/g,Zs(p,3)).replace(/{S}/g,p+"")}function Que(r,e,t,n,i){var a=null;if(ke(t))a=t;else if(qe(t))a=t(r.value,e,{level:r.level});else{var o=pe({},Np);if(r.level>0)for(var s=0;s<lA.length;++s)o[lA[s]]="{primary|"+o[lA[s]]+"}";var l=t?t.inherit===!1?t:Ke(t,o):o,u=OV(r.value,i);if(l[u])a=l[u];else if(l.inherit){for(var c=kV.indexOf(u),s=c-1;s>=0;--s)if(l[u]){a=l[u];break}a=a||o.none}if(_e(a)){var h=r.level==null?0:r.level>=0?r.level:a.length+r.level;h=Math.min(h,a.length-1),a=a[h]}}return P1(new Date(r.value),a,i,n)}function OV(r,e){var t=qo(r),n=t[Lf(e)]()+1,i=t[R1(e)](),a=t[Yv(e)](),o=t[D1(e)](),s=t[I1(e)](),l=t[N1(e)](),u=l===0,c=u&&s===0,h=c&&o===0,f=h&&a===0,d=f&&i===1,p=d&&n===1;return p?"year":d?"month":f?"day":h?"hour":c?"minute":u?"second":"millisecond"}function oN(r,e,t){var n=Ft(r)?qo(r):r;switch(e=e||OV(r,t),e){case"year":return n[x2(t)]();case"half-year":return n[Lf(t)]()>=6?1:0;case"quarter":return Math.floor((n[Lf(t)]()+1)/4);case"month":return n[Lf(t)]();case"day":return n[R1(t)]();case"half-day":return n[Yv(t)]()/24;case"hour":return n[Yv(t)]();case"minute":return n[D1(t)]();case"second":return n[I1(t)]();case"millisecond":return n[N1(t)]()}}function x2(r){return r?"getUTCFullYear":"getFullYear"}function Lf(r){return r?"getUTCMonth":"getMonth"}function R1(r){return r?"getUTCDate":"getDate"}function Yv(r){return r?"getUTCHours":"getHours"}function D1(r){return r?"getUTCMinutes":"getMinutes"}function I1(r){return r?"getUTCSeconds":"getSeconds"}function N1(r){return r?"getUTCMilliseconds":"getMilliseconds"}function Jue(r){return r?"setUTCFullYear":"setFullYear"}function FV(r){return r?"setUTCMonth":"setMonth"}function BV(r){return r?"setUTCDate":"setDate"}function zV(r){return r?"setUTCHours":"setHours"}function UV(r){return r?"setUTCMinutes":"setMinutes"}function VV(r){return r?"setUTCSeconds":"setSeconds"}function GV(r){return r?"setUTCMilliseconds":"setMilliseconds"}function HV(r){if(!T4(r))return ke(r)?r:"-";var e=(r+"").split(".");return e[0].replace(/(\d{1,3})(?=(?:\d{3})+(?!\d))/g,"$1,")+(e.length>1?"."+e[1]:"")}function WV(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 Sd=WC;function ET(r,e,t){var n="{yyyy}-{MM}-{dd} {HH}:{mm}:{ss}";function i(c){return c&&eo(c)?c:"-"}function a(c){return!!(c!=null&&!isNaN(c)&&isFinite(c))}var o=e==="time",s=r instanceof Date;if(o||s){var l=o?qo(r):r;if(isNaN(+l)){if(s)return"-"}else return P1(l,n,t)}if(e==="ordinal")return $b(r)?i(r):Ft(r)&&a(r)?r+"":"-";var u=Rs(r);return a(u)?HV(u):$b(r)?i(r):typeof r=="boolean"?r+"":"-"}var sN=["a","b","c","d","e","f","g"],uA=function(r,e){return"{"+r+(e==null?"":e)+"}"};function $V(r,e,t){_e(e)||(e=[e]);var n=e.length;if(!n)return"";for(var i=e[0].$vars||[],a=0;a<i.length;a++){var o=sN[a];r=r.replace(uA(o),uA(o,0))}for(var s=0;s<n;s++)for(var l=0;l<i.length;l++){var u=e[s][i[l]];r=r.replace(uA(sN[l],s),t?Jr(u):u)}return r}function ece(r,e,t){return k(e,function(n,i){r=r.replace("{"+i+"}",t?Jr(n):n)}),r}function tce(r,e){var t=ke(r)?{color:r,extraCssText:e}:r||{},n=t.color,i=t.type;e=t.extraCssText;var a=t.renderMode||"html";if(!n)return"";if(a==="html")return i==="subItem"?'<span style="display:inline-block;vertical-align:middle;margin-right:8px;margin-left:3px;border-radius:4px;width:4px;height:4px;background-color:'+Jr(n)+";"+(e||"")+'"></span>':'<span style="display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:'+Jr(n)+";"+(e||"")+'"></span>';var o=t.markerId||"markerX";return{renderMode:a,content:"{"+o+"|} ",style:i==="subItem"?{width:4,height:4,borderRadius:2,backgroundColor:n}:{width:10,height:10,borderRadius:5,backgroundColor:n}}}function Hc(r,e){return e=e||"transparent",ke(r)?r:Qe(r)&&r.colorStops&&(r.colorStops[0]||{}).color||e}function c_(r,e){if(e==="_blank"||e==="blank"){var t=window.open();t.opener=null,t.location.href=r}else window.open(r,e)}var c0=k,XV=["left","right","top","bottom","width","height"],sc=[["width","left","right"],["height","top","bottom"]];function S2(r,e,t,n,i){var a=0,o=0;n==null&&(n=1/0),i==null&&(i=1/0);var s=0;e.eachChild(function(l,u){var c=l.getBoundingRect(),h=e.childAt(u+1),f=h&&h.getBoundingRect(),d,p;if(r==="horizontal"){var g=c.width+(f?-f.x+c.x:0);d=a+g,d>n||l.newline?(a=0,d=g,o+=s+t,s=c.height):s=Math.max(s,c.height)}else{var v=c.height+(f?-f.y+c.y:0);p=o+v,p>i||l.newline?(a+=s+t,o=0,p=v,s=c.width):s=Math.max(s,c.width)}l.newline||(l.x=a,l.y=o,l.markRedraw(),r==="horizontal"?a=d+t:o=p+t)})}var Pc=S2;ut(S2,"vertical");ut(S2,"horizontal");function nce(r,e,t){var n=e.width,i=e.height,a=Pe(r.left,n),o=Pe(r.top,i),s=Pe(r.right,n),l=Pe(r.bottom,i);return(isNaN(a)||isNaN(parseFloat(r.left)))&&(a=0),(isNaN(s)||isNaN(parseFloat(r.right)))&&(s=n),(isNaN(o)||isNaN(parseFloat(r.top)))&&(o=0),(isNaN(l)||isNaN(parseFloat(r.bottom)))&&(l=i),t=Sd(t||0),{width:Math.max(s-a-t[1]-t[3],0),height:Math.max(l-o-t[0]-t[2],0)}}function dr(r,e,t){t=Sd(t||0);var n=e.width,i=e.height,a=Pe(r.left,n),o=Pe(r.top,i),s=Pe(r.right,n),l=Pe(r.bottom,i),u=Pe(r.width,n),c=Pe(r.height,i),h=t[2]+t[0],f=t[1]+t[3],d=r.aspect;switch(isNaN(u)&&(u=n-s-f-a),isNaN(c)&&(c=i-l-h-o),d!=null&&(isNaN(u)&&isNaN(c)&&(d>n/i?u=n*.8:c=i*.8),isNaN(u)&&(u=d*c),isNaN(c)&&(c=u/d)),isNaN(a)&&(a=n-s-u-f),isNaN(o)&&(o=i-l-c-h),r.left||r.right){case"center":a=n/2-u/2-t[3];break;case"right":a=n-u-f;break}switch(r.top||r.bottom){case"middle":case"center":o=i/2-c/2-t[0];break;case"bottom":o=i-c-h;break}a=a||0,o=o||0,isNaN(u)&&(u=n-f-a-(s||0)),isNaN(c)&&(c=i-h-o-(l||0));var p=new dt(a+t[3],o+t[0],u,c);return p.margin=t,p}function k1(r,e,t,n,i,a){var o=!i||!i.hv||i.hv[0],s=!i||!i.hv||i.hv[1],l=i&&i.boundingMode||"all";if(a=a||r,a.x=r.x,a.y=r.y,!o&&!s)return!1;var u;if(l==="raw")u=r.type==="group"?new dt(0,0,+e.width||0,+e.height||0):r.getBoundingRect();else if(u=r.getBoundingRect(),r.needLocalTransform()){var c=r.getLocalTransform();u=u.clone(),u.applyTransform(c)}var h=dr(Ke({width:u.width,height:u.height},e),t,n),f=o?h.x-u.x:0,d=s?h.y-u.y:0;return l==="raw"?(a.x=f,a.y=d):(a.x+=f,a.y+=d),a===r&&r.markRedraw(),!0}function rce(r,e){return r[sc[e][0]]!=null||r[sc[e][1]]!=null&&r[sc[e][2]]!=null}function qv(r){var e=r.layoutMode||r.constructor.layoutMode;return Qe(e)?e:e?{type:e}:null}function Zl(r,e,t){var n=t&&t.ignoreSize;!_e(n)&&(n=[n,n]);var i=o(sc[0],0),a=o(sc[1],1);u(sc[0],r,i),u(sc[1],r,a);function o(c,h){var f={},d=0,p={},g=0,v=2;if(c0(c,function(_){p[_]=r[_]}),c0(c,function(_){s(e,_)&&(f[_]=p[_]=e[_]),l(f,_)&&d++,l(p,_)&&g++}),n[h])return l(e,c[1])?p[c[2]]=null:l(e,c[2])&&(p[c[1]]=null),p;if(g===v||!d)return p;if(d>=v)return f;for(var m=0;m<c.length;m++){var y=c[m];if(!s(f,y)&&s(r,y)){f[y]=r[y];break}}return f}function s(c,h){return c.hasOwnProperty(h)}function l(c,h){return c[h]!=null&&c[h]!=="auto"}function u(c,h,f){c0(c,function(d){h[d]=f[d]})}}function Ad(r){return YV({},r)}function YV(r,e){return e&&r&&c0(XV,function(t){e.hasOwnProperty(t)&&(r[t]=e[t])}),r}var ice=Pt(),wd=function(r){ae(e,r);function e(t,n,i){var a=r.call(this,t,n,i)||this;return a.uid=xd("ec_cpt_model"),a}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=qv(this),a=i?Ad(t):{},o=n.getTheme();ht(t,o.get(this.mainType)),ht(t,this.getDefaultOption()),i&&Zl(t,a,i)},e.prototype.mergeOption=function(t,n){ht(this.option,t,!0);var i=qv(this);i&&Zl(this.option,t,i)},e.prototype.optionUpdated=function(t,n){},e.prototype.getDefaultOption=function(){var t=this.constructor;if(!zse(t))return t.defaultOption;var n=ice(this);if(!n.defaultOption){for(var i=[],a=t;a;){var o=a.prototype.defaultOption;o&&i.push(o),a=a.superClass}for(var s={},l=i.length-1;l>=0;l--)s=ht(s,i[l],!0);n.defaultOption=s}return n.defaultOption},e.prototype.getReferringComponents=function(t,n){var i=t+"Index",a=t+"Id";return bg(this.ecModel,t,{index:this.get(i,!0),id:this.get(a,!0)},n)},e.prototype.getBoxLayoutParams=function(){var t=this;return{left:t.get("left"),top:t.get("top"),right:t.get("right"),bottom:t.get("bottom"),width:t.get("width"),height:t.get("height")}},e.prototype.getZLevelKey=function(){return""},e.prototype.setZLevel=function(t){this.option.zlevel=t},e.protoInitialize=function(){var t=e.prototype;t.type="component",t.id="",t.name="",t.mainType="",t.subType="",t.componentIndex=0}(),e}(vn);k4(wd,vn);_1(wd);Wue(wd);$ue(wd,ace);function ace(r){var e=[];return k(wd.getClassesByMainType(r),function(t){e=e.concat(t.dependencies||t.prototype.dependencies||[])}),e=xe(e,function(t){return Fo(t).main}),r!=="dataset"&&pt(e,"dataset")<=0&&e.unshift("dataset"),e}const Nt=wd;var qV="";typeof navigator!="undefined"&&(qV=navigator.platform||"");var Fh="rgba(0, 0, 0, 0.2)";const oce={darkMode:"auto",colorBy:"series",color:["#5470c6","#91cc75","#fac858","#ee6666","#73c0de","#3ba272","#fc8452","#9a60b4","#ea7ccc"],gradientColor:["#f6efa6","#d88273","#bf444c"],aria:{decal:{decals:[{color:Fh,dashArrayX:[1,0],dashArrayY:[2,5],symbolSize:1,rotation:Math.PI/6},{color:Fh,symbol:"circle",dashArrayX:[[8,8],[0,8,8,0]],dashArrayY:[6,0],symbolSize:.8},{color:Fh,dashArrayX:[1,0],dashArrayY:[4,3],rotation:-Math.PI/4},{color:Fh,dashArrayX:[[6,6],[0,6,6,0]],dashArrayY:[6,0]},{color:Fh,dashArrayX:[[1,0],[1,6]],dashArrayY:[1,0,6,0],rotation:Math.PI/4},{color:Fh,symbol:"triangle",dashArrayX:[[9,9],[0,9,9,0]],dashArrayY:[7,2],symbolSize:.75}]}},textStyle:{fontFamily:qV.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 jV=He(["tooltip","label","itemName","itemId","itemGroupId","itemChildGroupId","seriesName"]),za="original",ai="arrayRows",Ua="objectRows",Jo="keyedColumns",Vl="typedArray",KV="unknown",Ho="column",bd="row",Nr={Must:1,Might:2,Not:3},ZV=Pt();function sce(r){ZV(r).datasetMap=He()}function QV(r,e,t){var n={},i=w2(e);if(!i||!r)return n;var a=[],o=[],s=e.ecModel,l=ZV(s).datasetMap,u=i.uid+"_"+t.seriesLayoutBy,c,h;r=r.slice(),k(r,function(g,v){var m=Qe(g)?g:r[v]={name:g};m.type==="ordinal"&&c==null&&(c=v,h=p(m)),n[m.name]=[]});var f=l.get(u)||l.set(u,{categoryWayDim:h,valueWayDim:0});k(r,function(g,v){var m=g.name,y=p(g);if(c==null){var _=f.valueWayDim;d(n[m],_,y),d(o,_,y),f.valueWayDim+=y}else if(c===v)d(n[m],0,y),d(a,0,y);else{var _=f.categoryWayDim;d(n[m],_,y),d(o,_,y),f.categoryWayDim+=y}});function d(g,v,m){for(var y=0;y<m;y++)g.push(v+y)}function p(g){var v=g.dimsDef;return v?v.length:1}return a.length&&(n.itemName=a),o.length&&(n.seriesName=o),n}function A2(r,e,t){var n={},i=w2(r);if(!i)return n;var a=e.sourceFormat,o=e.dimensionsDefine,s;(a===Ua||a===Jo)&&k(o,function(c,h){(Qe(c)?c.name:c)==="name"&&(s=h)});var l=function(){for(var c={},h={},f=[],d=0,p=Math.min(5,t);d<p;d++){var g=eG(e.data,a,e.seriesLayoutBy,o,e.startIndex,d);f.push(g);var v=g===Nr.Not;if(v&&c.v==null&&d!==s&&(c.v=d),(c.n==null||c.n===c.v||!v&&f[c.n]===Nr.Not)&&(c.n=d),m(c)&&f[c.n]!==Nr.Not)return c;v||(g===Nr.Might&&h.v==null&&d!==s&&(h.v=d),(h.n==null||h.n===h.v)&&(h.n=d))}function m(y){return y.v!=null&&y.n!=null}return m(c)?c:m(h)?h:null}();if(l){n.value=[l.v];var u=s!=null?s:l.n;n.itemName=[u],n.seriesName=[u]}return n}function w2(r){var e=r.get("data",!0);if(!e)return bg(r.ecModel,"dataset",{index:r.get("datasetIndex",!0),id:r.get("datasetId",!0)},nr).models[0]}function lce(r){return!r.get("transform",!0)&&!r.get("fromTransformResult",!0)?[]:bg(r.ecModel,"dataset",{index:r.get("fromDatasetIndex",!0),id:r.get("fromDatasetId",!0)},nr).models}function JV(r,e){return eG(r.data,r.sourceFormat,r.seriesLayoutBy,r.dimensionsDefine,r.startIndex,e)}function eG(r,e,t,n,i,a){var o,s=5;if(Fi(r))return Nr.Not;var l,u;if(n){var c=n[a];Qe(c)?(l=c.name,u=c.type):ke(c)&&(l=c)}if(u!=null)return u==="ordinal"?Nr.Must:Nr.Not;if(e===ai){var h=r;if(t===bd){for(var f=h[a],d=0;d<(f||[]).length&&d<s;d++)if((o=x(f[i+d]))!=null)return o}else for(var d=0;d<h.length&&d<s;d++){var p=h[i+d];if(p&&(o=x(p[a]))!=null)return o}}else if(e===Ua){var g=r;if(!l)return Nr.Not;for(var d=0;d<g.length&&d<s;d++){var v=g[d];if(v&&(o=x(v[l]))!=null)return o}}else if(e===Jo){var m=r;if(!l)return Nr.Not;var f=m[l];if(!f||Fi(f))return Nr.Not;for(var d=0;d<f.length&&d<s;d++)if((o=x(f[d]))!=null)return o}else if(e===za)for(var y=r,d=0;d<y.length&&d<s;d++){var v=y[d],_=gd(v);if(!_e(_))return Nr.Not;if((o=x(_[a]))!=null)return o}function x(S){var A=ke(S);if(S!=null&&Number.isFinite(Number(S))&&S!=="")return A?Nr.Might:Nr.Not;if(A&&S!=="-")return Nr.Must}return Nr.Not}var LT=He();function uce(r,e){gi(LT.get(r)==null&&e),LT.set(r,e)}function cce(r,e,t){var n=LT.get(e);if(!n)return t;var i=n(r);return i?t.concat(i):t}var lN=Pt(),hce=Pt(),b2=function(){function r(){}return r.prototype.getColorFromPalette=function(e,t,n){var i=nn(this.get("color",!0)),a=this.get("colorLayer",!0);return tG(this,lN,i,a,e,t,n)},r.prototype.clearColorPalette=function(){dce(this,lN)},r}();function PT(r,e,t,n){var i=nn(r.get(["aria","decal","decals"]));return tG(r,hce,i,null,e,t,n)}function fce(r,e){for(var t=r.length,n=0;n<t;n++)if(r[n].length>e)return r[n];return r[t-1]}function tG(r,e,t,n,i,a,o){a=a||r;var s=e(a),l=s.paletteIdx||0,u=s.paletteNameMap=s.paletteNameMap||{};if(u.hasOwnProperty(i))return u[i];var c=o==null||!n?t:fce(n,o);if(c=c||t,!(!c||!c.length)){var h=c[l];return i&&(u[i]=h),s.paletteIdx=(l+1)%c.length,h}}function dce(r,e){e(r).paletteIdx=0,e(r).paletteNameMap={}}var ny,Jd,uN,cN="\0_ec_inner",pce=1,nG=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(t,n,i,a,o,s){a=a||{},this.option=null,this._theme=new vn(a),this._locale=new vn(o),this._optionManager=s},e.prototype.setOption=function(t,n,i){var a=dN(n);this._optionManager.setOption(t,i,a),this._resetOption(null,a)},e.prototype.resetOption=function(t,n){return this._resetOption(t,dN(n))},e.prototype._resetOption=function(t,n){var i=!1,a=this._optionManager;if(!t||t==="recreate"){var o=a.mountOption(t==="recreate");!this.option||t==="recreate"?uN(this,o):(this.restoreData(),this._mergeOption(o,n)),i=!0}if((t==="timeline"||t==="media")&&this.restoreData(),!t||t==="recreate"||t==="timeline"){var s=a.getTimelineOption(this);s&&(i=!0,this._mergeOption(s,n))}if(!t||t==="recreate"||t==="media"){var l=a.getMediaOption(this);l.length&&k(l,function(u){i=!0,this._mergeOption(u,n)},this)}return i},e.prototype.mergeOption=function(t){this._mergeOption(t,null)},e.prototype._mergeOption=function(t,n){var i=this.option,a=this._componentsMap,o=this._componentsCount,s=[],l=He(),u=n&&n.replaceMergeMainTypeMap;sce(this),k(t,function(h,f){h!=null&&(Nt.hasClass(f)?f&&(s.push(f),l.set(f,!0)):i[f]=i[f]==null?Je(h):ht(i[f],h,!0))}),u&&u.each(function(h,f){Nt.hasClass(f)&&!l.get(f)&&(s.push(f),l.set(f,!0))}),Nt.topologicalTravel(s,Nt.getAllClassMainTypes(),c,this);function c(h){var f=cce(this,h,nn(t[h])),d=a.get(h),p=d?u&&u.get(h)?"replaceMerge":"normalMerge":"replaceAll",g=P4(d,f,p);Pse(g,h,Nt),i[h]=null,a.set(h,null),o.set(h,0);var v=[],m=[],y=0,_;k(g,function(x,S){var A=x.existing,w=x.newOption;if(!w)A&&(A.mergeOption({},this),A.optionUpdated({},!1));else{var M=h==="series",C=Nt.getClass(h,x.keyInfo.subType,!M);if(!C)return;if(h==="tooltip"){if(_)return;_=!0}if(A&&A.constructor===C)A.name=x.keyInfo.name,A.mergeOption(w,this),A.optionUpdated(w,!1);else{var b=pe({componentIndex:S},x.keyInfo);A=new C(w,this,this,b),pe(A,b),x.brandNew&&(A.__requireNewView=!0),A.init(w,this,this),A.optionUpdated(null,!0)}}A?(v.push(A.option),m.push(A),y++):(v.push(void 0),m.push(void 0))},this),i[h]=v,a.set(h,m),o.set(h,y),h==="series"&&ny(this)}this._seriesIndices||ny(this)},e.prototype.getOption=function(){var t=Je(this.option);return k(t,function(n,i){if(Nt.hasClass(i)){for(var a=nn(n),o=a.length,s=!1,l=o-1;l>=0;l--)a[l]&&!Gv(a[l])?s=!0:(a[l]=null,!s&&o--);a.length=o,t[i]=a}}),delete t[cN],t},e.prototype.getTheme=function(){return this._theme},e.prototype.getLocaleModel=function(){return this._locale},e.prototype.setUpdatePayload=function(t){this._payload=t},e.prototype.getUpdatePayload=function(){return this._payload},e.prototype.getComponent=function(t,n){var i=this._componentsMap.get(t);if(i){var a=i[n||0];if(a)return a;if(n==null){for(var o=0;o<i.length;o++)if(i[o])return i[o]}}},e.prototype.queryComponents=function(t){var n=t.mainType;if(!n)return[];var i=t.index,a=t.id,o=t.name,s=this._componentsMap.get(n);if(!s||!s.length)return[];var l;return i!=null?(l=[],k(nn(i),function(u){s[u]&&l.push(s[u])})):a!=null?l=hN("id",a,s):o!=null?l=hN("name",o,s):l=jt(s,function(u){return!!u}),fN(l,t)},e.prototype.findComponents=function(t){var n=t.query,i=t.mainType,a=s(n),o=a?this.queryComponents(a):jt(this._componentsMap.get(i),function(u){return!!u});return l(fN(o,t));function s(u){var c=i+"Index",h=i+"Id",f=i+"Name";return u&&(u[c]!=null||u[h]!=null||u[f]!=null)?{mainType:i,index:u[c],id:u[h],name:u[f]}:null}function l(u){return t.filter?jt(u,t.filter):u}},e.prototype.eachComponent=function(t,n,i){var a=this._componentsMap;if(qe(t)){var o=n,s=t;a.each(function(h,f){for(var d=0;h&&d<h.length;d++){var p=h[d];p&&s.call(o,f,p,p.componentIndex)}})}else for(var l=ke(t)?a.get(t):Qe(t)?this.findComponents(t):null,u=0;l&&u<l.length;u++){var c=l[u];c&&n.call(i,c,c.componentIndex)}},e.prototype.getSeriesByName=function(t){var n=fr(t,null);return jt(this._componentsMap.get("series"),function(i){return!!i&&n!=null&&i.name===n})},e.prototype.getSeriesByIndex=function(t){return this._componentsMap.get("series")[t]},e.prototype.getSeriesByType=function(t){return jt(this._componentsMap.get("series"),function(n){return!!n&&n.subType===t})},e.prototype.getSeries=function(){return jt(this._componentsMap.get("series"),function(t){return!!t})},e.prototype.getSeriesCount=function(){return this._componentsCount.get("series")},e.prototype.eachSeries=function(t,n){Jd(this),k(this._seriesIndices,function(i){var a=this._componentsMap.get("series")[i];t.call(n,a,i)},this)},e.prototype.eachRawSeries=function(t,n){k(this._componentsMap.get("series"),function(i){i&&t.call(n,i,i.componentIndex)})},e.prototype.eachSeriesByType=function(t,n,i){Jd(this),k(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];o.subType===t&&n.call(i,o,a)},this)},e.prototype.eachRawSeriesByType=function(t,n,i){return k(this.getSeriesByType(t),n,i)},e.prototype.isSeriesFiltered=function(t){return Jd(this),this._seriesIndicesMap.get(t.componentIndex)==null},e.prototype.getCurrentSeriesIndices=function(){return(this._seriesIndices||[]).slice()},e.prototype.filterSeries=function(t,n){Jd(this);var i=[];k(this._seriesIndices,function(a){var o=this._componentsMap.get("series")[a];t.call(n,o,a)&&i.push(a)},this),this._seriesIndices=i,this._seriesIndicesMap=He(i)},e.prototype.restoreData=function(t){ny(this);var n=this._componentsMap,i=[];n.each(function(a,o){Nt.hasClass(o)&&i.push(o)}),Nt.topologicalTravel(i,Nt.getAllClassMainTypes(),function(a){k(n.get(a),function(o){o&&(a!=="series"||!vce(o,t))&&o.restoreData()})})},e.internalField=function(){ny=function(t){var n=t._seriesIndices=[];k(t._componentsMap.get("series"),function(i){i&&n.push(i.componentIndex)}),t._seriesIndicesMap=He(n)},Jd=function(t){},uN=function(t,n){t.option={},t.option[cN]=pce,t._componentsMap=He({series:[]}),t._componentsCount=He();var i=n.aria;Qe(i)&&i.enabled==null&&(i.enabled=!0),gce(n,t._theme.option),ht(n,oce,!1),t._mergeOption(n,null)}}(),e}(vn);function vce(r,e){if(e){var t=e.seriesIndex,n=e.seriesId,i=e.seriesName;return t!=null&&r.componentIndex!==t||n!=null&&r.id!==n||i!=null&&r.name!==i}}function gce(r,e){var t=r.color&&!r.colorLayer;k(e,function(n,i){i==="colorLayer"&&t||Nt.hasClass(i)||(typeof n=="object"?r[i]=r[i]?ht(r[i],n,!1):Je(n):r[i]==null&&(r[i]=n))})}function hN(r,e,t){if(_e(e)){var n=He();return k(e,function(a){if(a!=null){var o=fr(a,null);o!=null&&n.set(a,!0)}}),jt(t,function(a){return a&&n.get(a[r])})}else{var i=fr(e,null);return jt(t,function(a){return a&&i!=null&&a[r]===i})}}function fN(r,e){return e.hasOwnProperty("subType")?jt(r,function(t){return t&&t.subType===e.subType}):r}function dN(r){var e=He();return r&&k(nn(r.replaceMerge),function(t){e.set(t,!0)}),{replaceMergeMainTypeMap:e}}ir(nG,b2);const rG=nG;var mce=["getDom","getZr","getWidth","getHeight","getDevicePixelRatio","dispatchAction","isSSR","isDisposed","on","off","getDataURL","getConnectedDataURL","getOption","getId","updateLabelLayout"],yce=function(){function r(e){k(mce,function(t){this[t]=Fe(e[t],e)},this)}return r}();const iG=yce;var cA={},_ce=function(){function r(){this._coordinateSystems=[]}return r.prototype.create=function(e,t){var n=[];k(cA,function(i,a){var o=i.create(e,t);n=n.concat(o||[])}),this._coordinateSystems=n},r.prototype.update=function(e,t){k(this._coordinateSystems,function(n){n.update&&n.update(e,t)})},r.prototype.getCoordinateSystems=function(){return this._coordinateSystems.slice()},r.register=function(e,t){cA[e]=t},r.get=function(e){return cA[e]},r}();const Eg=_ce;var xce=/^(min|max)?(.+)$/,Sce=function(){function r(e){this._timelineOptions=[],this._mediaList=[],this._currentMediaIndices=[],this._api=e}return r.prototype.setOption=function(e,t,n){e&&(k(nn(e.series),function(o){o&&o.data&&Fi(o.data)&&j0(o.data)}),k(nn(e.dataset),function(o){o&&o.source&&Fi(o.source)&&j0(o.source)})),e=Je(e);var i=this._optionBackup,a=Ace(e,t,!i);this._newBaseOption=a.baseOption,i?(a.timelineOptions.length&&(i.timelineOptions=a.timelineOptions),a.mediaList.length&&(i.mediaList=a.mediaList),a.mediaDefault&&(i.mediaDefault=a.mediaDefault)):this._optionBackup=a},r.prototype.mountOption=function(e){var t=this._optionBackup;return this._timelineOptions=t.timelineOptions,this._mediaList=t.mediaList,this._mediaDefault=t.mediaDefault,this._currentMediaIndices=[],Je(e?t.baseOption:this._newBaseOption)},r.prototype.getTimelineOption=function(e){var t,n=this._timelineOptions;if(n.length){var i=e.getComponent("timeline");i&&(t=Je(n[i.getCurrentIndex()]))}return t},r.prototype.getMediaOption=function(e){var t=this._api.getWidth(),n=this._api.getHeight(),i=this._mediaList,a=this._mediaDefault,o=[],s=[];if(!i.length&&!a)return s;for(var l=0,u=i.length;l<u;l++)wce(i[l].query,t,n)&&o.push(l);return!o.length&&a&&(o=[-1]),o.length&&!Tce(o,this._currentMediaIndices)&&(s=xe(o,function(c){return Je(c===-1?a.option:i[c].option)})),this._currentMediaIndices=o,s},r}();function Ace(r,e,t){var n=[],i,a,o=r.baseOption,s=r.timeline,l=r.options,u=r.media,c=!!r.media,h=!!(l||s||o&&o.timeline);o?(a=o,a.timeline||(a.timeline=s)):((h||c)&&(r.options=r.media=null),a=r),c&&_e(u)&&k(u,function(d){d&&d.option&&(d.query?n.push(d):i||(i=d))}),f(a),k(l,function(d){return f(d)}),k(n,function(d){return f(d.option)});function f(d){k(e,function(p){p(d,t)})}return{baseOption:a,timelineOptions:l||[],mediaDefault:i,mediaList:n}}function wce(r,e,t){var n={width:e,height:t,aspectratio:e/t},i=!0;return k(r,function(a,o){var s=o.match(xce);if(!(!s||!s[1]||!s[2])){var l=s[1],u=s[2].toLowerCase();bce(n[u],a,l)||(i=!1)}}),i}function bce(r,e,t){return t==="min"?r>=e:t==="max"?r<=e:r===e}function Tce(r,e){return r.join(",")===e.join(",")}const Mce=Sce;var Wa=k,jv=Qe,pN=["areaStyle","lineStyle","nodeStyle","linkStyle","chordStyle","label","labelLine"];function hA(r){var e=r&&r.itemStyle;if(e)for(var t=0,n=pN.length;t<n;t++){var i=pN[t],a=e.normal,o=e.emphasis;a&&a[i]&&(r[i]=r[i]||{},r[i].normal?ht(r[i].normal,a[i]):r[i].normal=a[i],a[i]=null),o&&o[i]&&(r[i]=r[i]||{},r[i].emphasis?ht(r[i].emphasis,o[i]):r[i].emphasis=o[i],o[i]=null)}}function Zr(r,e,t){if(r&&r[e]&&(r[e].normal||r[e].emphasis)){var n=r[e].normal,i=r[e].emphasis;n&&(t?(r[e].normal=r[e].emphasis=null,Ke(r[e],n)):r[e]=n),i&&(r.emphasis=r.emphasis||{},r.emphasis[e]=i,i.focus&&(r.emphasis.focus=i.focus),i.blurScope&&(r.emphasis.blurScope=i.blurScope))}}function kp(r){Zr(r,"itemStyle"),Zr(r,"lineStyle"),Zr(r,"areaStyle"),Zr(r,"label"),Zr(r,"labelLine"),Zr(r,"upperLabel"),Zr(r,"edgeLabel")}function Qn(r,e){var t=jv(r)&&r[e],n=jv(t)&&t.textStyle;if(n)for(var i=0,a=xI.length;i<a;i++){var o=xI[i];n.hasOwnProperty(o)&&(t[o]=n[o])}}function ya(r){r&&(kp(r),Qn(r,"label"),r.emphasis&&Qn(r.emphasis,"label"))}function Cce(r){if(jv(r)){hA(r),kp(r),Qn(r,"label"),Qn(r,"upperLabel"),Qn(r,"edgeLabel"),r.emphasis&&(Qn(r.emphasis,"label"),Qn(r.emphasis,"upperLabel"),Qn(r.emphasis,"edgeLabel"));var e=r.markPoint;e&&(hA(e),ya(e));var t=r.markLine;t&&(hA(t),ya(t));var n=r.markArea;n&&ya(n);var i=r.data;if(r.type==="graph"){i=i||r.nodes;var a=r.links||r.edges;if(a&&!Fi(a))for(var o=0;o<a.length;o++)ya(a[o]);k(r.categories,function(u){kp(u)})}if(i&&!Fi(i))for(var o=0;o<i.length;o++)ya(i[o]);if(e=r.markPoint,e&&e.data)for(var s=e.data,o=0;o<s.length;o++)ya(s[o]);if(t=r.markLine,t&&t.data)for(var l=t.data,o=0;o<l.length;o++)_e(l[o])?(ya(l[o][0]),ya(l[o][1])):ya(l[o]);r.type==="gauge"?(Qn(r,"axisLabel"),Qn(r,"title"),Qn(r,"detail")):r.type==="treemap"?(Zr(r.breadcrumb,"itemStyle"),k(r.levels,function(u){kp(u)})):r.type==="tree"&&kp(r.leaves)}}function us(r){return _e(r)?r:r?[r]:[]}function vN(r){return(_e(r)?r[0]:r)||{}}function Ece(r,e){Wa(us(r.series),function(n){jv(n)&&Cce(n)});var t=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","parallelAxis","radar"];e&&t.push("valueAxis","categoryAxis","logAxis","timeAxis"),Wa(t,function(n){Wa(us(r[n]),function(i){i&&(Qn(i,"axisLabel"),Qn(i.axisPointer,"label"))})}),Wa(us(r.parallel),function(n){var i=n&&n.parallelAxisDefault;Qn(i,"axisLabel"),Qn(i&&i.axisPointer,"label")}),Wa(us(r.calendar),function(n){Zr(n,"itemStyle"),Qn(n,"dayLabel"),Qn(n,"monthLabel"),Qn(n,"yearLabel")}),Wa(us(r.radar),function(n){Qn(n,"name"),n.name&&n.axisName==null&&(n.axisName=n.name,delete n.name),n.nameGap!=null&&n.axisNameGap==null&&(n.axisNameGap=n.nameGap,delete n.nameGap)}),Wa(us(r.geo),function(n){jv(n)&&(ya(n),Wa(us(n.regions),function(i){ya(i)}))}),Wa(us(r.timeline),function(n){ya(n),Zr(n,"label"),Zr(n,"itemStyle"),Zr(n,"controlStyle",!0);var i=n.data;_e(i)&&k(i,function(a){Qe(a)&&(Zr(a,"label"),Zr(a,"itemStyle"))})}),Wa(us(r.toolbox),function(n){Zr(n,"iconStyle"),Wa(n.feature,function(i){Zr(i,"iconStyle")})}),Qn(vN(r.axisPointer),"label"),Qn(vN(r.tooltip).axisPointer,"label")}function Lce(r,e){for(var t=e.split(","),n=r,i=0;i<t.length&&(n=n&&n[t[i]],n!=null);i++);return n}function Pce(r,e,t,n){for(var i=e.split(","),a=r,o,s=0;s<i.length-1;s++)o=i[s],a[o]==null&&(a[o]={}),a=a[o];(n||a[i[s]]==null)&&(a[i[s]]=t)}function gN(r){r&&k(Rce,function(e){e[0]in r&&!(e[1]in r)&&(r[e[1]]=r[e[0]])})}var Rce=[["x","left"],["y","top"],["x2","right"],["y2","bottom"]],Dce=["grid","geo","parallel","legend","toolbox","title","visualMap","dataZoom","timeline"],fA=[["borderRadius","barBorderRadius"],["borderColor","barBorderColor"],["borderWidth","barBorderWidth"]];function ep(r){var e=r&&r.itemStyle;if(e)for(var t=0;t<fA.length;t++){var n=fA[t][1],i=fA[t][0];e[n]!=null&&(e[i]=e[n])}}function mN(r){r&&r.alignTo==="edge"&&r.margin!=null&&r.edgeDistance==null&&(r.edgeDistance=r.margin)}function yN(r){r&&r.downplay&&!r.blur&&(r.blur=r.downplay)}function Ice(r){r&&r.focusNodeAdjacency!=null&&(r.emphasis=r.emphasis||{},r.emphasis.focus==null&&(r.emphasis.focus="adjacency"))}function aG(r,e){if(r)for(var t=0;t<r.length;t++)e(r[t]),r[t]&&aG(r[t].children,e)}function oG(r,e){Ece(r,e),r.series=nn(r.series),k(r.series,function(t){if(Qe(t)){var n=t.type;if(n==="line")t.clipOverflow!=null&&(t.clip=t.clipOverflow);else if(n==="pie"||n==="gauge"){t.clockWise!=null&&(t.clockwise=t.clockWise),mN(t.label);var i=t.data;if(i&&!Fi(i))for(var a=0;a<i.length;a++)mN(i[a]);t.hoverOffset!=null&&(t.emphasis=t.emphasis||{},(t.emphasis.scaleSize=null)&&(t.emphasis.scaleSize=t.hoverOffset))}else if(n==="gauge"){var o=Lce(t,"pointer.color");o!=null&&Pce(t,"itemStyle.color",o)}else if(n==="bar"){ep(t),ep(t.backgroundStyle),ep(t.emphasis);var i=t.data;if(i&&!Fi(i))for(var a=0;a<i.length;a++)typeof i[a]=="object"&&(ep(i[a]),ep(i[a]&&i[a].emphasis))}else if(n==="sunburst"){var s=t.highlightPolicy;s&&(t.emphasis=t.emphasis||{},t.emphasis.focus||(t.emphasis.focus=s)),yN(t),aG(t.data,yN)}else n==="graph"||n==="sankey"?Ice(t):n==="map"&&(t.mapType&&!t.map&&(t.map=t.mapType),t.mapLocation&&Ke(t,t.mapLocation));t.hoverAnimation!=null&&(t.emphasis=t.emphasis||{},t.emphasis&&t.emphasis.scale==null&&(t.emphasis.scale=t.hoverAnimation)),gN(t)}}),r.dataRange&&(r.visualMap=r.dataRange),k(Dce,function(t){var n=r[t];n&&(_e(n)||(n=[n]),k(n,function(i){gN(i)}))})}function Nce(r){var e=He();r.eachSeries(function(t){var n=t.get("stack");if(n){var i=e.get(n)||e.set(n,[]),a=t.getData(),o={stackResultDimension:a.getCalculationInfo("stackResultDimension"),stackedOverDimension:a.getCalculationInfo("stackedOverDimension"),stackedDimension:a.getCalculationInfo("stackedDimension"),stackedByDimension:a.getCalculationInfo("stackedByDimension"),isStackedByIndex:a.getCalculationInfo("isStackedByIndex"),data:a,seriesModel:t};if(!o.stackedDimension||!(o.isStackedByIndex||o.stackedByDimension))return;i.length&&a.setCalculationInfo("stackedOnSeries",i[i.length-1].seriesModel),i.push(o)}}),e.each(kce)}function kce(r){k(r,function(e,t){var n=[],i=[NaN,NaN],a=[e.stackResultDimension,e.stackedOverDimension],o=e.data,s=e.isStackedByIndex,l=e.seriesModel.get("stackStrategy")||"samesign";o.modify(a,function(u,c,h){var f=o.get(e.stackedDimension,h);if(isNaN(f))return i;var d,p;s?p=o.getRawIndex(h):d=o.get(e.stackedByDimension,h);for(var g=NaN,v=t-1;v>=0;v--){var m=r[v];if(s||(p=m.data.rawIndexOf(m.stackedByDimension,d)),p>=0){var y=m.data.getByRawIndex(m.stackResultDimension,p);if(l==="all"||l==="positive"&&y>0||l==="negative"&&y<0||l==="samesign"&&f>=0&&y>0||l==="samesign"&&f<=0&&y<0){f=_se(f,y),g=y;break}}}return n[0]=f,n[1]=g,n})})}var O1=function(){function r(e){this.data=e.data||(e.sourceFormat===Jo?{}:[]),this.sourceFormat=e.sourceFormat||KV,this.seriesLayoutBy=e.seriesLayoutBy||Ho,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;n<t.length;n++){var i=t[n];i.type==null&&JV(this,n)===Nr.Must&&(i.type="ordinal")}}return r}();function T2(r){return r instanceof O1}function RT(r,e,t){t=t||sG(r);var n=e.seriesLayoutBy,i=Fce(r,t,n,e.sourceHeader,e.dimensions),a=new O1({data:r,sourceFormat:t,seriesLayoutBy:n,dimensionsDefine:i.dimensionsDefine,startIndex:i.startIndex,dimensionsDetectedCount:i.dimensionsDetectedCount,metaRawOption:Je(e)});return a}function M2(r){return new O1({data:r,sourceFormat:Fi(r)?Vl:za})}function Oce(r){return new O1({data:r.data,sourceFormat:r.sourceFormat,seriesLayoutBy:r.seriesLayoutBy,dimensionsDefine:Je(r.dimensionsDefine),startIndex:r.startIndex,dimensionsDetectedCount:r.dimensionsDetectedCount})}function sG(r){var e=KV;if(Fi(r))e=Vl;else if(_e(r)){r.length===0&&(e=ai);for(var t=0,n=r.length;t<n;t++){var i=r[t];if(i!=null){if(_e(i)||Fi(i)){e=ai;break}else if(Qe(i)){e=Ua;break}}}}else if(Qe(r)){for(var a in r)if(ze(r,a)&&ii(r[a])){e=Jo;break}}return e}function Fce(r,e,t,n,i){var a,o;if(!r)return{dimensionsDefine:_N(i),startIndex:o,dimensionsDetectedCount:a};if(e===ai){var s=r;n==="auto"||n==null?xN(function(u){u!=null&&u!=="-"&&(ke(u)?o==null&&(o=1):o=0)},t,s,10):o=Ft(n)?n:n?1:0,!i&&o===1&&(i=[],xN(function(u,c){i[c]=u!=null?u+"":""},t,s,1/0)),a=i?i.length:t===bd?s.length:s[0]?s[0].length:null}else if(e===Ua)i||(i=Bce(r));else if(e===Jo)i||(i=[],k(r,function(u,c){i.push(c)}));else if(e===za){var l=gd(r[0]);a=_e(l)&&l.length||1}return{startIndex:o,dimensionsDefine:_N(i),dimensionsDetectedCount:a}}function Bce(r){for(var e=0,t;e<r.length&&!(t=r[e++]););if(t)return wt(t)}function _N(r){if(r){var e=He();return xe(r,function(t,n){t=Qe(t)?t:{name:t};var i={name:t.name,displayName:t.displayName,type:t.type};if(i.name==null)return i;i.name+="",i.displayName==null&&(i.displayName=i.name);var a=e.get(i.name);return a?i.name+="-"+a.count++:e.set(i.name,{count:1}),i})}}function xN(r,e,t,n){if(e===bd)for(var i=0;i<t.length&&i<n;i++)r(t[i]?t[i][0]:null,i);else for(var a=t[0]||[],i=0;i<a.length&&i<n;i++)r(a[i],i)}function lG(r){var e=r.sourceFormat;return e===Ua||e===Jo}var Nu,ku,Ou,SN,AN,uG=function(){function r(e,t){var n=T2(e)?e:M2(e);this._source=n;var i=this._data=n.data;n.sourceFormat===Vl&&(this._offset=0,this._dimSize=t,this._data=i),AN(this,i,n)}return r.prototype.getSource=function(){return this._source},r.prototype.count=function(){return 0},r.prototype.getItem=function(e,t){},r.prototype.appendData=function(e){},r.prototype.clean=function(){},r.protoInitialize=function(){var e=r.prototype;e.pure=!1,e.persistent=!0}(),r.internalField=function(){var e;AN=function(o,s,l){var u=l.sourceFormat,c=l.seriesLayoutBy,h=l.startIndex,f=l.dimensionsDefine,d=SN[C2(u,c)];if(pe(o,d),u===Vl)o.getItem=t,o.count=i,o.fillStorage=n;else{var p=cG(u,c);o.getItem=Fe(p,null,s,h,f);var g=hG(u,c);o.count=Fe(g,null,s,h,f)}};var t=function(o,s){o=o-this._offset,s=s||[];for(var l=this._data,u=this._dimSize,c=u*o,h=0;h<u;h++)s[h]=l[c+h];return s},n=function(o,s,l,u){for(var c=this._data,h=this._dimSize,f=0;f<h;f++){for(var d=u[f],p=d[0]==null?1/0:d[0],g=d[1]==null?-1/0:d[1],v=s-o,m=l[f],y=0;y<v;y++){var _=c[y*h+f];m[o+y]=_,_<p&&(p=_),_>g&&(g=_)}d[0]=p,d[1]=g}},i=function(){return this._data?this._data.length/this._dimSize:0};SN=(e={},e[ai+"_"+Ho]={pure:!0,appendData:a},e[ai+"_"+bd]={pure:!0,appendData:function(){throw new Error('Do not support appendData when set seriesLayoutBy: "row".')}},e[Ua]={pure:!0,appendData:a},e[Jo]={pure:!0,appendData:function(o){var s=this._data;k(o,function(l,u){for(var c=s[u]||(s[u]=[]),h=0;h<(l||[]).length;h++)c.push(l[h])})}},e[za]={appendData:a},e[Vl]={persistent:!1,pure:!0,appendData:function(o){this._data=o},clean:function(){this._offset+=this.count(),this._data=null}},e);function a(o){for(var s=0;s<o.length;s++)this._data.push(o[s])}}(),r}(),wN=function(r,e,t,n){return r[n]},zce=(Nu={},Nu[ai+"_"+Ho]=function(r,e,t,n){return r[n+e]},Nu[ai+"_"+bd]=function(r,e,t,n,i){n+=e;for(var a=i||[],o=r,s=0;s<o.length;s++){var l=o[s];a[s]=l?l[n]:null}return a},Nu[Ua]=wN,Nu[Jo]=function(r,e,t,n,i){for(var a=i||[],o=0;o<t.length;o++){var s=t[o].name,l=r[s];a[o]=l?l[n]:null}return a},Nu[za]=wN,Nu);function cG(r,e){var t=zce[C2(r,e)];return t}var bN=function(r,e,t){return r.length},Uce=(ku={},ku[ai+"_"+Ho]=function(r,e,t){return Math.max(0,r.length-e)},ku[ai+"_"+bd]=function(r,e,t){var n=r[0];return n?Math.max(0,n.length-e):0},ku[Ua]=bN,ku[Jo]=function(r,e,t){var n=t[0].name,i=r[n];return i?i.length:0},ku[za]=bN,ku);function hG(r,e){var t=Uce[C2(r,e)];return t}var dA=function(r,e,t){return r[e]},Vce=(Ou={},Ou[ai]=dA,Ou[Ua]=function(r,e,t){return r[t]},Ou[Jo]=dA,Ou[za]=function(r,e,t){var n=gd(r);return n instanceof Array?n[e]:n},Ou[Vl]=dA,Ou);function fG(r){var e=Vce[r];return e}function C2(r,e){return r===ai?r+"_"+e:r}function Jf(r,e,t){if(r){var n=r.getRawDataItem(e);if(n!=null){var i=r.getStore(),a=i.getSource().sourceFormat;if(t!=null){var o=r.getDimensionIndex(t),s=i.getDimensionProperty(o);return fG(a)(n,o,s)}else{var l=n;return a===za&&(l=gd(n)),l}}}}var Gce=/\{@(.+?)\}/g,F1=function(){function r(){}return r.prototype.getDataParams=function(e,t){var n=this.getData(t),i=this.getRawValue(e,t),a=n.getRawIndex(e),o=n.getName(e),s=n.getRawDataItem(e),l=n.getItemVisual(e,"style"),u=l&&l[n.getItemVisual(e,"drawType")||"fill"],c=l&&l.stroke,h=this.mainType,f=h==="series",d=n.userOutput&&n.userOutput.get();return{componentType:h,componentSubType:this.subType,componentIndex:this.componentIndex,seriesType:f?this.subType:null,seriesIndex:this.seriesIndex,seriesId:f?this.id:null,seriesName:f?this.name:null,name:o,dataIndex:a,data:s,dataType:t,value:i,color:u,borderColor:c,dimensionNames:d?d.fullDimensions:null,encode:d?d.encode:null,$vars:["seriesName","name","value"]}},r.prototype.getFormattedLabel=function(e,t,n,i,a,o){t=t||"normal";var s=this.getData(n),l=this.getDataParams(e,n);if(o&&(l.value=o.interpolatedValue),i!=null&&_e(l.value)&&(l.value=l.value[i]),!a){var u=s.getItemModel(e);a=u.get(t==="normal"?["label","formatter"]:[t,"label","formatter"])}if(qe(a))return l.status=t,l.dimensionIndex=i,a(l);if(ke(a)){var c=$V(a,l);return c.replace(Gce,function(h,f){var d=f.length,p=f;p.charAt(0)==="["&&p.charAt(d-1)==="]"&&(p=+p.slice(1,d-1));var g=Jf(s,e,p);if(o&&_e(o.interpolatedValue)){var v=s.getDimensionIndex(p);v>=0&&(g=o.interpolatedValue[v])}return g!=null?g+"":""})}},r.prototype.getRawValue=function(e,t){return Jf(this.getData(t),e)},r.prototype.formatTooltip=function(e,t,n){},r}();function TN(r){var e,t;return Qe(r)?r.type&&(t=r):e=r,{text:e,frag:t}}function lv(r){return new Hce(r)}var Hce=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 i=this.context;i.data=i.outputData=t.context.outputData}this.__pipeline&&(this.__pipeline.currentTask=this);var a;this._plan&&!n&&(a=this._plan(this.context));var o=c(this._modBy),s=this._modDataCount||0,l=c(e&&e.modBy),u=e&&e.modDataCount||0;(o!==l||s!==u)&&(a="reset");function c(y){return!(y>=1)&&(y=1),y}var h;(this._dirty||a==="reset")&&(this._dirty=!1,h=this._doReset(n)),this._modBy=l,this._modDataCount=u;var f=e&&e.step;if(t?this._dueEnd=t._outputDueEnd:this._dueEnd=this._count?this._count(this.context):1/0,this._progress){var d=this._dueIndex,p=Math.min(f!=null?this._dueIndex+f:1/0,this._dueEnd);if(!n&&(h||d<p)){var g=this._progress;if(_e(g))for(var v=0;v<g.length;v++)this._doProgress(g[v],d,p,l,u);else this._doProgress(g,d,p,l,u)}this._dueIndex=p;var m=this._settedOutputEnd!=null?this._settedOutputEnd:p;this._outputDueEnd=m}else this._dueIndex=this._outputDueEnd=this._settedOutputEnd!=null?this._settedOutputEnd:this._dueEnd;return this.unfinished()},r.prototype.dirty=function(){this._dirty=!0,this._onDirty&&this._onDirty(this.context)},r.prototype._doProgress=function(e,t,n,i,a){MN.reset(t,n,i,a),this._callingProgress=e,this._callingProgress({start:t,end:n,count:n-t,next:MN.next},this.context)},r.prototype._doReset=function(e){this._dueIndex=this._outputDueEnd=this._dueEnd=0,this._settedOutputEnd=null;var t,n;!e&&this._reset&&(t=this._reset(this.context),t&&t.progress&&(n=t.forceFirstProgress,t=t.progress),_e(t)&&!t.length&&(t=null)),this._progress=t,this._modBy=this._modDataCount=null;var i=this._downstream;return i&&i.dirty(),n},r.prototype.unfinished=function(){return this._progress&&this._dueIndex<this._dueEnd},r.prototype.pipe=function(e){(this._downstream!==e||this._dirty)&&(this._downstream=e,e._upstream=this,e.dirty())},r.prototype.dispose=function(){this._disposed||(this._upstream&&(this._upstream._downstream=null),this._downstream&&(this._downstream._upstream=null),this._dirty=!1,this._disposed=!0)},r.prototype.getUpstream=function(){return this._upstream},r.prototype.getDownstream=function(){return this._downstream},r.prototype.setOutputEnd=function(e){this._outputDueEnd=this._settedOutputEnd=e},r}(),MN=function(){var r,e,t,n,i,a={reset:function(l,u,c,h){e=l,r=u,t=c,n=h,i=Math.ceil(n/t),a.next=t>1&&n>0?s:o}};return a;function o(){return e<r?e++:null}function s(){var l=e%i*t+Math.ceil(e/i),u=e>=r?null:l<n?l:e;return e++,u}}();function Gl(r,e){var t=e&&e.type;return t==="ordinal"?r:(t==="time"&&!Ft(r)&&r!=null&&r!=="-"&&(r=+qo(r)),r==null||r===""?NaN:Number(r))}var Wce=He({number:function(r){return parseFloat(r)},time:function(r){return+qo(r)},trim:function(r){return ke(r)?eo(r):r}});function dG(r){return Wce.get(r)}var pG={lt:function(r,e){return r<e},lte:function(r,e){return r<=e},gt:function(r,e){return r>e},gte:function(r,e){return r>=e}},$ce=function(){function r(e,t){if(!Ft(t)){var n="";qt(n)}this._opFn=pG[e],this._rvalFloat=Rs(t)}return r.prototype.evaluate=function(e){return Ft(e)?this._opFn(e,this._rvalFloat):this._opFn(Rs(e),this._rvalFloat)},r}(),vG=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=Ft(e)?e:Rs(e),i=Ft(t)?t:Rs(t),a=isNaN(n),o=isNaN(i);if(a&&(n=this._incomparable),o&&(i=this._incomparable),a&&o){var s=ke(e),l=ke(t);s&&(n=l?e:0),l&&(i=s?t:0)}return n<i?this._resultLT:n>i?-this._resultLT:0},r}(),Xce=function(){function r(e,t){this._rval=t,this._isEQ=e,this._rvalTypeof=typeof t,this._rvalFloat=Rs(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=Rs(e)===this._rvalFloat)}return this._isEQ?t:!t},r}();function Yce(r,e){return r==="eq"||r==="ne"?new Xce(r==="eq",e):ze(pG,r)?new $ce(r,e):null}var qce=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 Gl(e,t)},r}();function jce(r,e){var t=new qce,n=r.data,i=t.sourceFormat=r.sourceFormat,a=r.startIndex,o="";r.seriesLayoutBy!==Ho&&qt(o);var s=[],l={},u=r.dimensionsDefine;if(u)k(u,function(g,v){var m=g.name,y={index:v,name:m,displayName:g.displayName};if(s.push(y),m!=null){var _="";ze(l,m)&&qt(_),l[m]=y}});else for(var c=0;c<r.dimensionsDetectedCount;c++)s.push({index:c});var h=cG(i,Ho);e.__isBuiltIn&&(t.getRawDataItem=function(g){return h(n,a,s,g)},t.getRawData=Fe(Kce,null,r)),t.cloneRawData=Fe(Zce,null,r);var f=hG(i,Ho);t.count=Fe(f,null,n,a,s);var d=fG(i);t.retrieveValue=function(g,v){var m=h(n,a,s,g);return p(m,v)};var p=t.retrieveValueFromItem=function(g,v){if(g!=null){var m=s[v];if(m)return d(g,v,m.name)}};return t.getDimensionInfo=Fe(Qce,null,s,l),t.cloneAllDimensionInfo=Fe(Jce,null,s),t}function Kce(r){var e=r.sourceFormat;if(!E2(e)){var t="";qt(t)}return r.data}function Zce(r){var e=r.sourceFormat,t=r.data;if(!E2(e)){var n="";qt(n)}if(e===ai){for(var i=[],a=0,o=t.length;a<o;a++)i.push(t[a].slice());return i}else if(e===Ua){for(var i=[],a=0,o=t.length;a<o;a++)i.push(pe({},t[a]));return i}}function Qce(r,e,t){if(t!=null){if(Ft(t)||!isNaN(t)&&!ze(e,t))return r[t];if(ze(e,t))return e[t]}}function Jce(r){return Je(r)}var gG=He();function ehe(r){r=Je(r);var e=r.type,t="";e||qt(t);var n=e.split(":");n.length!==2&&qt(t);var i=!1;n[0]==="echarts"&&(e=n[1],i=!0),r.__isBuiltIn=i,gG.set(e,r)}function the(r,e,t){var n=nn(r),i=n.length,a="";i||qt(a);for(var o=0,s=i;o<s;o++){var l=n[o];e=nhe(l,e),o!==s-1&&(e.length=Math.max(e.length,1))}return e}function nhe(r,e,t,n){var i="";e.length||qt(i),Qe(r)||qt(i);var a=r.type,o=gG.get(a);o||qt(i);var s=xe(e,function(u){return jce(u,o)}),l=nn(o.transform({upstream:s[0],upstreamList:s,config:Je(r.config)}));return xe(l,function(u,c){var h="";Qe(u)||qt(h),u.data||qt(h);var f=sG(u.data);E2(f)||qt(h);var d,p=e[0];if(p&&c===0&&!u.dimensions){var g=p.startIndex;g&&(u.data=p.data.slice(0,g).concat(u.data)),d={seriesLayoutBy:Ho,sourceHeader:g,dimensions:p.metaRawOption.dimensions}}else d={seriesLayoutBy:Ho,sourceHeader:0,dimensions:u.dimensions};return RT(u.data,d,null)})}function E2(r){return r===ai||r===Ua}var B1="undefined",rhe=typeof Uint32Array===B1?Array:Uint32Array,ihe=typeof Uint16Array===B1?Array:Uint16Array,mG=typeof Int32Array===B1?Array:Int32Array,CN=typeof Float64Array===B1?Array:Float64Array,yG={float:CN,int:mG,ordinal:Array,number:Array,time:CN},pA;function Bh(r){return r>65535?rhe:ihe}function zh(){return[1/0,-1/0]}function ahe(r){var e=r.constructor;return e===Array?r.slice():new e(r)}function EN(r,e,t,n,i){var a=yG[t||"float"];if(i){var o=r[e],s=o&&o.length;if(s!==n){for(var l=new a(n),u=0;u<s;u++)l[u]=o[u];r[e]=l}}else r[e]=new a(n)}var DT=function(){function r(){this._chunks=[],this._rawExtent=[],this._extent=[],this._count=0,this._rawCount=0,this._calcDimNameToIdx=He()}return r.prototype.initData=function(e,t,n){this._provider=e,this._chunks=[],this._indices=null,this.getRawIndex=this._getRawIdxIdentity;var i=e.getSource(),a=this.defaultDimValueGetter=pA[i.sourceFormat];this._dimValueGetter=n||a,this._rawExtent=[],lG(i),this._dimensions=xe(t,function(o){return{type:o.type,property:o.property}}),this._initDataFromProvider(0,e.count())},r.prototype.getProvider=function(){return this._provider},r.prototype.getSource=function(){return this._provider.getSource()},r.prototype.ensureCalculationDimension=function(e,t){var n=this._calcDimNameToIdx,i=this._dimensions,a=n.get(e);if(a!=null){if(i[a].type===t)return a}else a=i.length;return i[a]={type:t},n.set(e,a),this._chunks[a]=new yG[t||"float"](this._rawCount),this._rawExtent[a]=zh(),a},r.prototype.collectOrdinalMeta=function(e,t){var n=this._chunks[e],i=this._dimensions[e],a=this._rawExtent,o=i.ordinalOffset||0,s=n.length;o===0&&(a[e]=zh());for(var l=a[e],u=o;u<s;u++){var c=n[u]=t.parseAndCollect(n[u]);isNaN(c)||(l[0]=Math.min(c,l[0]),l[1]=Math.max(c,l[1]))}i.ordinalMeta=t,i.ordinalOffset=s,i.type="ordinal"},r.prototype.getOrdinalMeta=function(e){var t=this._dimensions[e],n=t.ordinalMeta;return n},r.prototype.getDimensionProperty=function(e){var t=this._dimensions[e];return t&&t.property},r.prototype.appendData=function(e){var t=this._provider,n=this.count();t.appendData(e);var i=t.count();return t.persistent||(i+=n),n<i&&this._initDataFromProvider(n,i,!0),[n,i]},r.prototype.appendValues=function(e,t){for(var n=this._chunks,i=this._dimensions,a=i.length,o=this._rawExtent,s=this.count(),l=s+Math.max(e.length,t||0),u=0;u<a;u++){var c=i[u];EN(n,u,c.type,l,!0)}for(var h=[],f=s;f<l;f++)for(var d=f-s,p=0;p<a;p++){var c=i[p],g=pA.arrayRows.call(this,e[d]||h,c.property,d,p);n[p][f]=g;var v=o[p];g<v[0]&&(v[0]=g),g>v[1]&&(v[1]=g)}return this._rawCount=this._count=l,{start:s,end:l}},r.prototype._initDataFromProvider=function(e,t,n){for(var i=this._provider,a=this._chunks,o=this._dimensions,s=o.length,l=this._rawExtent,u=xe(o,function(y){return y.property}),c=0;c<s;c++){var h=o[c];l[c]||(l[c]=zh()),EN(a,c,h.type,t,n)}if(i.fillStorage)i.fillStorage(e,t,a,l);else for(var f=[],d=e;d<t;d++){f=i.getItem(d,f);for(var p=0;p<s;p++){var g=a[p],v=this._dimValueGetter(f,u[p],d,p);g[d]=v;var m=l[p];v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}!i.persistent&&i.clean&&i.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<this._count))return NaN;var n=this._chunks[e];return n?n[this.getRawIndex(t)]:NaN},r.prototype.getValues=function(e,t){var n=[],i=[];if(t==null){t=e,e=[];for(var a=0;a<this._dimensions.length;a++)i.push(a)}else i=e;for(var a=0,o=i.length;a<o;a++)n.push(this.get(i[a],t));return n},r.prototype.getByRawIndex=function(e,t){if(!(t>=0&&t<this._rawCount))return NaN;var n=this._chunks[e];return n?n[t]:NaN},r.prototype.getSum=function(e){var t=this._chunks[e],n=0;if(t)for(var i=0,a=this.count();i<a;i++){var o=this.get(e,i);isNaN(o)||(n+=o)}return n},r.prototype.getMedian=function(e){var t=[];this.each([e],function(a){isNaN(a)||t.push(a)});var n=t.sort(function(a,o){return a-o}),i=this.count();return i===0?0:i%2===1?n[(i-1)/2]:(n[i/2]+n[i/2-1])/2},r.prototype.indexOfRawIndex=function(e){if(e>=this._rawCount||e<0)return-1;if(!this._indices)return e;var t=this._indices,n=t[e];if(n!=null&&n<this._count&&n===e)return e;for(var i=0,a=this._count-1;i<=a;){var o=(i+a)/2|0;if(t[o]<e)i=o+1;else if(t[o]>e)a=o-1;else return o}return-1},r.prototype.indicesOfNearest=function(e,t,n){var i=this._chunks,a=i[e],o=[];if(!a)return o;n==null&&(n=1/0);for(var s=1/0,l=-1,u=0,c=0,h=this.count();c<h;c++){var f=this.getRawIndex(c),d=t-a[f],p=Math.abs(d);p<=n&&((p<s||p===s&&d>=0&&l<0)&&(s=p,l=d,u=0),d===l&&(o[u++]=c))}return o.length=u,o},r.prototype.getIndices=function(){var e,t=this._indices;if(t){var n=t.constructor,i=this._count;if(n===Array){e=new n(i);for(var a=0;a<i;a++)e[a]=t[a]}else e=new n(t.buffer,0,i)}else{var n=Bh(this._rawCount);e=new n(this.count());for(var a=0;a<e.length;a++)e[a]=a}return e},r.prototype.filter=function(e,t){if(!this._count)return this;for(var n=this.clone(),i=n.count(),a=Bh(n._rawCount),o=new a(i),s=[],l=e.length,u=0,c=e[0],h=n._chunks,f=0;f<i;f++){var d=void 0,p=n.getRawIndex(f);if(l===0)d=t(f);else if(l===1){var g=h[c][p];d=t(g,f)}else{for(var v=0;v<l;v++)s[v]=h[e[v]][p];s[v]=f,d=t.apply(null,s)}d&&(o[u++]=p)}return u<i&&(n._indices=o),n._count=u,n._extent=[],n._updateGetRawIdx(),n},r.prototype.selectRange=function(e){var t=this.clone(),n=t._count;if(!n)return this;var i=wt(e),a=i.length;if(!a)return this;var o=t.count(),s=Bh(t._rawCount),l=new s(o),u=0,c=i[0],h=e[c][0],f=e[c][1],d=t._chunks,p=!1;if(!t._indices){var g=0;if(a===1){for(var v=d[i[0]],m=0;m<n;m++){var y=v[m];(y>=h&&y<=f||isNaN(y))&&(l[u++]=g),g++}p=!0}else if(a===2){for(var v=d[i[0]],_=d[i[1]],x=e[i[1]][0],S=e[i[1]][1],m=0;m<n;m++){var y=v[m],A=_[m];(y>=h&&y<=f||isNaN(y))&&(A>=x&&A<=S||isNaN(A))&&(l[u++]=g),g++}p=!0}}if(!p)if(a===1)for(var m=0;m<o;m++){var w=t.getRawIndex(m),y=d[i[0]][w];(y>=h&&y<=f||isNaN(y))&&(l[u++]=w)}else for(var m=0;m<o;m++){for(var M=!0,w=t.getRawIndex(m),C=0;C<a;C++){var b=i[C],y=d[b][w];(y<e[b][0]||y>e[b][1])&&(M=!1)}M&&(l[u++]=t.getRawIndex(m))}return u<o&&(t._indices=l),t._count=u,t._extent=[],t._updateGetRawIdx(),t},r.prototype.map=function(e,t){var n=this.clone(e);return this._updateDims(n,e,t),n},r.prototype.modify=function(e,t){this._updateDims(this,e,t)},r.prototype._updateDims=function(e,t,n){for(var i=e._chunks,a=[],o=t.length,s=e.count(),l=[],u=e._rawExtent,c=0;c<t.length;c++)u[t[c]]=zh();for(var h=0;h<s;h++){for(var f=e.getRawIndex(h),d=0;d<o;d++)l[d]=i[t[d]][f];l[o]=h;var p=n&&n.apply(null,l);if(p!=null){typeof p!="object"&&(a[0]=p,p=a);for(var c=0;c<p.length;c++){var g=t[c],v=p[c],m=u[g],y=i[g];y&&(y[f]=v),v<m[0]&&(m[0]=v),v>m[1]&&(m[1]=v)}}}},r.prototype.lttbDownSample=function(e,t){var n=this.clone([e],!0),i=n._chunks,a=i[e],o=this.count(),s=0,l=Math.floor(1/t),u=this.getRawIndex(0),c,h,f,d=new(Bh(this._rawCount))(Math.min((Math.ceil(o/l)+2)*2,o));d[s++]=u;for(var p=1;p<o-1;p+=l){for(var g=Math.min(p+l,o-1),v=Math.min(p+l*2,o),m=(v+g)/2,y=0,_=g;_<v;_++){var x=this.getRawIndex(_),S=a[x];isNaN(S)||(y+=S)}y/=v-g;var A=p,w=Math.min(p+l,o),M=p-1,C=a[u];c=-1,f=A;for(var b=-1,T=0,_=A;_<w;_++){var x=this.getRawIndex(_),S=a[x];if(isNaN(S)){T++,b<0&&(b=x);continue}h=Math.abs((M-m)*(S-C)-(M-_)*(y-C)),h>c&&(c=h,f=x)}T>0&&T<w-A&&(d[s++]=Math.min(b,f),f=Math.max(b,f)),d[s++]=f,u=f}return d[s++]=this.getRawIndex(o-1),n._count=s,n._indices=d,n.getRawIndex=this._getRawIdx,n},r.prototype.minmaxDownSample=function(e,t){for(var n=this.clone([e],!0),i=n._chunks,a=Math.floor(1/t),o=i[e],s=this.count(),l=new(Bh(this._rawCount))(Math.ceil(s/a)*2),u=0,c=0;c<s;c+=a){var h=c,f=o[this.getRawIndex(h)],d=c,p=o[this.getRawIndex(d)],g=a;c+a>s&&(g=s-c);for(var v=0;v<g;v++){var m=this.getRawIndex(c+v),y=o[m];y<f&&(f=y,h=c+v),y>p&&(p=y,d=c+v)}var _=this.getRawIndex(h),x=this.getRawIndex(d);h<d?(l[u++]=_,l[u++]=x):(l[u++]=x,l[u++]=_)}return n._count=u,n._indices=l,n._updateGetRawIdx(),n},r.prototype.downSample=function(e,t,n,i){for(var a=this.clone([e],!0),o=a._chunks,s=[],l=Math.floor(1/t),u=o[e],c=this.count(),h=a._rawExtent[e]=zh(),f=new(Bh(this._rawCount))(Math.ceil(c/l)),d=0,p=0;p<c;p+=l){l>c-p&&(l=c-p,s.length=l);for(var g=0;g<l;g++){var v=this.getRawIndex(p+g);s[g]=u[v]}var m=n(s),y=this.getRawIndex(Math.min(p+i(s,m)||0,c-1));u[y]=m,m<h[0]&&(h[0]=m),m>h[1]&&(h[1]=m),f[d++]=y}return a._count=d,a._indices=f,a._updateGetRawIdx(),a},r.prototype.each=function(e,t){if(this._count)for(var n=e.length,i=this._chunks,a=0,o=this.count();a<o;a++){var s=this.getRawIndex(a);switch(n){case 0:t(a);break;case 1:t(i[e[0]][s],a);break;case 2:t(i[e[0]][s],i[e[1]][s],a);break;default:for(var l=0,u=[];l<n;l++)u[l]=i[e[l]][s];u[l]=a,t.apply(null,u)}}},r.prototype.getDataExtent=function(e){var t=this._chunks[e],n=zh();if(!t)return n;var i=this.count(),a=!this._indices,o;if(a)return this._rawExtent[e].slice();if(o=this._extent[e],o)return o.slice();o=n;for(var s=o[0],l=o[1],u=0;u<i;u++){var c=this.getRawIndex(u),h=t[c];h<s&&(s=h),h>l&&(l=h)}return o=[s,l],this._extent[e]=o,o},r.prototype.getRawDataItem=function(e){var t=this.getRawIndex(e);if(this._provider.persistent)return this._provider.getItem(t);for(var n=[],i=this._chunks,a=0;a<i.length;a++)n.push(i[a][t]);return n},r.prototype.clone=function(e,t){var n=new r,i=this._chunks,a=e&&$o(e,function(s,l){return s[l]=!0,s},{});if(a)for(var o=0;o<i.length;o++)n._chunks[o]=a[o]?ahe(i[o]):i[o];else n._chunks=i;return this._copyCommonProps(n),t||(n._indices=this._cloneIndices()),n._updateGetRawIdx(),n},r.prototype._copyCommonProps=function(e){e._count=this._count,e._rawCount=this._rawCount,e._provider=this._provider,e._dimensions=this._dimensions,e._extent=Je(this._extent),e._rawExtent=Je(this._rawExtent)},r.prototype._cloneIndices=function(){if(this._indices){var e=this._indices.constructor,t=void 0;if(e===Array){var n=this._indices.length;t=new e(n);for(var i=0;i<n;i++)t[i]=this._indices[i]}else t=new e(this._indices);return t}return null},r.prototype._getRawIdxIdentity=function(e){return e},r.prototype._getRawIdx=function(e){return e<this._count&&e>=0?this._indices[e]:-1},r.prototype._updateGetRawIdx=function(){this.getRawIndex=this._indices?this._getRawIdx:this._getRawIdxIdentity},r.internalField=function(){function e(t,n,i,a){return Gl(t[a],this._dimensions[a])}pA={arrayRows:e,objectRows:function(t,n,i,a){return Gl(t[n],this._dimensions[a])},keyedColumns:e,original:function(t,n,i,a){var o=t&&(t.value==null?t:t.value);return Gl(o instanceof Array?o[a]:o,this._dimensions[a])},typedArray:function(t,n,i,a){return t[a]}}}(),r}(),_G=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,i,a;if(ry(e)){var o=e,s=void 0,l=void 0,u=void 0;if(n){var c=t[0];c.prepareSource(),u=c.getSource(),s=u.data,l=u.sourceFormat,a=[c._getVersionSign()]}else s=o.get("data",!0),l=Fi(s)?Vl:za,a=[];var h=this._getSourceMetaRawOption()||{},f=u&&u.metaRawOption||{},d=ot(h.seriesLayoutBy,f.seriesLayoutBy)||null,p=ot(h.sourceHeader,f.sourceHeader),g=ot(h.dimensions,f.dimensions),v=d!==f.seriesLayoutBy||!!p!=!!f.sourceHeader||g;i=v?[RT(s,{seriesLayoutBy:d,sourceHeader:p,dimensions:g},l)]:[]}else{var m=e;if(n){var y=this._applyTransform(t);i=y.sourceList,a=y.upstreamSignList}else{var _=m.get("source",!0);i=[RT(_,this._getSourceMetaRawOption(),null)],a=[]}}this._setLocalSource(i,a)},r.prototype._applyTransform=function(e){var t=this._sourceHost,n=t.get("transform",!0),i=t.get("fromTransformResult",!0);if(i!=null){var a="";e.length!==1&&PN(a)}var o,s=[],l=[];return k(e,function(u){u.prepareSource();var c=u.getSource(i||0),h="";i!=null&&!c&&PN(h),s.push(c),l.push(u._getVersionSign())}),n?o=the(n,s,{datasetIndex:t.componentIndex}):i!=null&&(o=[Oce(s[0])]),{sourceList:o,upstreamSignList:l}},r.prototype._isDirty=function(){if(this._dirty)return!0;for(var e=this._getUpstreamSourceManagers(),t=0;t<e.length;t++){var n=e[t];if(n._isDirty()||this._upstreamSignList[t]!==n._getVersionSign())return!0}},r.prototype.getSource=function(e){e=e||0;var t=this._sourceList[e];if(!t){var n=this._getUpstreamSourceManagers();return n[0]&&n[0].getSource(e)}return t},r.prototype.getSharedDataStore=function(e){var t=e.makeStoreSchema();return this._innerGetDataStore(t.dimensions,e.source,t.hash)},r.prototype._innerGetDataStore=function(e,t,n){var i=0,a=this._storeList,o=a[i];o||(o=a[i]={});var s=o[n];if(!s){var l=this._getUpstreamSourceManagers()[0];ry(this._sourceHost)&&l?s=l._innerGetDataStore(e,t,n):(s=new DT,s.initData(new uG(t,e.length),e)),o[n]=s}return s},r.prototype._getUpstreamSourceManagers=function(){var e=this._sourceHost;if(ry(e)){var t=w2(e);return t?[t.getSourceManager()]:[]}else return xe(lce(e),function(n){return n.getSourceManager()})},r.prototype._getSourceMetaRawOption=function(){var e=this._sourceHost,t,n,i;if(ry(e))t=e.get("seriesLayoutBy",!0),n=e.get("sourceHeader",!0),i=e.get("dimensions",!0);else if(!this._getUpstreamSourceManagers().length){var a=e;t=a.get("seriesLayoutBy",!0),n=a.get("sourceHeader",!0),i=a.get("dimensions",!0)}return{seriesLayoutBy:t,sourceHeader:n,dimensions:i}},r}();function LN(r){var e=r.option.transform;e&&j0(r.option.transform)}function ry(r){return r.mainType==="series"}function PN(r){throw new Error(r)}var ohe="line-height:1";function xG(r){var e=r.lineHeight;return e==null?ohe:"line-height:"+Jr(e+"")+"px"}function SG(r,e){var t=r.color||"#6e7079",n=r.fontSize||12,i=r.fontWeight||"400",a=r.color||"#464646",o=r.fontSize||14,s=r.fontWeight||"900";return e==="html"?{nameStyle:"font-size:"+Jr(n+"")+"px;color:"+Jr(t)+";font-weight:"+Jr(i+""),valueStyle:"font-size:"+Jr(o+"")+"px;color:"+Jr(a)+";font-weight:"+Jr(s+"")}:{nameStyle:{fontSize:n,fill:t,fontWeight:i},valueStyle:{fontSize:o,fill:a,fontWeight:s}}}var she=[0,10,20,30],lhe=["",` |
|
`,` |
|
|
|
`,` |
|
|
|
|
|
`];function Ar(r,e){return e.type=r,e}function IT(r){return r.type==="section"}function AG(r){return IT(r)?uhe:che}function wG(r){if(IT(r)){var e=0,t=r.blocks.length,n=t>1||t>0&&!r.noHeader;return k(r.blocks,function(i){var a=wG(i);a>=e&&(e=a+ +(n&&(!a||IT(i)&&!i.noHeader)))}),e}return 0}function uhe(r,e,t,n){var i=e.noHeader,a=hhe(wG(e)),o=[],s=e.blocks||[];gi(!s||_e(s)),s=s||[];var l=r.orderMode;if(e.sortBlocks&&l){s=s.slice();var u={valueAsc:"asc",valueDesc:"desc"};if(ze(u,l)){var c=new vG(u[l],null);s.sort(function(g,v){return c.evaluate(g.sortParam,v.sortParam)})}else l==="seriesDesc"&&s.reverse()}k(s,function(g,v){var m=e.valueFormatter,y=AG(g)(m?pe(pe({},r),{valueFormatter:m}):r,g,v>0?a.html:0,n);y!=null&&o.push(y)});var h=r.renderMode==="richText"?o.join(a.richText):NT(n,o.join(""),i?t:a.html);if(i)return h;var f=ET(e.header,"ordinal",r.useUTC),d=SG(n,r.renderMode).nameStyle,p=xG(n);return r.renderMode==="richText"?bG(r,f,d)+a.richText+h:NT(n,'<div style="'+d+";"+p+';">'+Jr(f)+"</div>"+h,t)}function che(r,e,t,n){var i=r.renderMode,a=e.noName,o=e.noValue,s=!e.markerType,l=e.name,u=r.useUTC,c=e.valueFormatter||r.valueFormatter||function(x){return x=_e(x)?x:[x],xe(x,function(S,A){return ET(S,_e(d)?d[A]:d,u)})};if(!(a&&o)){var h=s?"":r.markupStyleCreator.makeTooltipMarker(e.markerType,e.markerColor||"#333",i),f=a?"":ET(l,"ordinal",u),d=e.valueType,p=o?[]:c(e.value,e.dataIndex),g=!s||!a,v=!s&&a,m=SG(n,i),y=m.nameStyle,_=m.valueStyle;return i==="richText"?(s?"":h)+(a?"":bG(r,f,y))+(o?"":phe(r,p,g,v,_)):NT(n,(s?"":h)+(a?"":fhe(f,!s,y))+(o?"":dhe(p,g,v,_)),t)}}function RN(r,e,t,n,i,a){if(r){var o=AG(r),s={useUTC:i,renderMode:t,orderMode:n,markupStyleCreator:e,valueFormatter:r.valueFormatter};return o(s,r,0,a)}}function hhe(r){return{html:she[r],richText:lhe[r]}}function NT(r,e,t){var n='<div style="clear:both"></div>',i="margin: "+t+"px 0 0",a=xG(r);return'<div style="'+i+";"+a+';">'+e+n+"</div>"}function fhe(r,e,t){var n=e?"margin-left:2px":"";return'<span style="'+t+";"+n+'">'+Jr(r)+"</span>"}function dhe(r,e,t,n){var i=t?"10px":"20px",a=e?"float:right;margin-left:"+i:"";return r=_e(r)?r:[r],'<span style="'+a+";"+n+'">'+xe(r,function(o){return Jr(o)}).join(" ")+"</span>"}function bG(r,e,t){return r.markupStyleCreator.wrapRichTextStyle(e,t)}function phe(r,e,t,n,i){var a=[i],o=n?10:20;return t&&a.push({padding:[0,0,0,o],align:"right"}),r.markupStyleCreator.wrapRichTextStyle(_e(e)?e.join(" "):e,a)}function TG(r,e){var t=r.getData().getItemVisual(e,"style"),n=t[r.visualDrawType];return Hc(n)}function MG(r,e){var t=r.get("padding");return t!=null?t:e==="richText"?[8,10]:10}var vA=function(){function r(){this.richTextStyles={},this._nextStyleNameId=M4()}return r.prototype._generateStyleName=function(){return"__EC_aUTo_"+this._nextStyleNameId++},r.prototype.makeTooltipMarker=function(e,t,n){var i=n==="richText"?this._generateStyleName():null,a=tce({color:t,type:e,renderMode:n,markerId:i});return ke(a)?a:(this.richTextStyles[i]=a.style,a.content)},r.prototype.wrapRichTextStyle=function(e,t){var n={};_e(t)?k(t,function(a){return pe(n,a)}):pe(n,t);var i=this._generateStyleName();return this.richTextStyles[i]=n,"{"+i+"|"+e+"}"},r}();function CG(r){var e=r.series,t=r.dataIndex,n=r.multipleSeries,i=e.getData(),a=i.mapDimensionsAll("defaultedTooltip"),o=a.length,s=e.getRawValue(t),l=_e(s),u=TG(e,t),c,h,f,d;if(o>1||l&&!o){var p=vhe(s,e,t,a,u);c=p.inlineValues,h=p.inlineValueTypes,f=p.blocks,d=p.inlineValues[0]}else if(o){var g=i.getDimensionInfo(a[0]);d=c=Jf(i,t,a[0]),h=g.type}else d=c=l?s[0]:s;var v=JC(e),m=v&&e.name||"",y=i.getName(t),_=n?m:y;return Ar("section",{header:m,noHeader:n||!v,sortParam:d,blocks:[Ar("nameValue",{markerType:"item",markerColor:u,name:_,noName:!eo(_),value:c,valueType:h,dataIndex:t})].concat(f||[])})}function vhe(r,e,t,n,i){var a=e.getData(),o=$o(r,function(h,f,d){var p=a.getDimensionInfo(d);return h=h||p&&p.tooltip!==!1&&p.displayName!=null},!1),s=[],l=[],u=[];n.length?k(n,function(h){c(Jf(a,t,h),h)}):k(r,c);function c(h,f){var d=a.getDimensionInfo(f);!d||d.otherDims.tooltip===!1||(o?u.push(Ar("nameValue",{markerType:"subItem",markerColor:i,name:d.displayName,value:h,valueType:d.type})):(s.push(h),l.push(d.type)))}return{inlineValues:s,inlineValueTypes:l,blocks:u}}var Qs=Pt();function iy(r,e){return r.getName(e)||r.getId(e)}var h0="__universalTransitionEnabled",z1=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._selectedDataIndicesMap={},t}return e.prototype.init=function(t,n,i){this.seriesIndex=this.componentIndex,this.dataTask=lv({count:mhe,reset:yhe}),this.dataTask.context={model:this},this.mergeDefaultAndTheme(t,i);var a=Qs(this).sourceManager=new _G(this);a.prepareSource();var o=this.getInitialData(t,i);IN(o,this),this.dataTask.context.data=o,Qs(this).dataBeforeProcessed=o,DN(this),this._initSelectedMapFromData(o)},e.prototype.mergeDefaultAndTheme=function(t,n){var i=qv(this),a=i?Ad(t):{},o=this.subType;Nt.hasClass(o)&&(o+="Series"),ht(t,n.getTheme().get(this.subType)),ht(t,this.getDefaultOption()),zc(t,"label",["show"]),this.fillDataTextStyle(t.data),i&&Zl(t,a,i)},e.prototype.mergeOption=function(t,n){t=ht(this.option,t,!0),this.fillDataTextStyle(t.data);var i=qv(this);i&&Zl(this.option,t,i);var a=Qs(this).sourceManager;a.dirty(),a.prepareSource();var o=this.getInitialData(t,n);IN(o,this),this.dataTask.dirty(),this.dataTask.context.data=o,Qs(this).dataBeforeProcessed=o,DN(this),this._initSelectedMapFromData(o)},e.prototype.fillDataTextStyle=function(t){if(t&&!Fi(t))for(var n=["show"],i=0;i<t.length;i++)t[i]&&t[i].label&&zc(t[i],"label",n)},e.prototype.getInitialData=function(t,n){},e.prototype.appendData=function(t){var n=this.getRawData();n.appendData(t.data)},e.prototype.getData=function(t){var n=kT(this);if(n){var i=n.context.data;return t==null||!i.getLinkedData?i:i.getLinkedData(t)}else return Qs(this).data},e.prototype.getAllData=function(){var t=this.getData();return t&&t.getLinkedDataAll?t.getLinkedDataAll():[{data:t}]},e.prototype.setData=function(t){var n=kT(this);if(n){var i=n.context;i.outputData=t,n!==this.dataTask&&(i.data=t)}Qs(this).data=t},e.prototype.getEncode=function(){var t=this.get("encode",!0);if(t)return He(t)},e.prototype.getSourceManager=function(){return Qs(this).sourceManager},e.prototype.getSource=function(){return this.getSourceManager().getSource()},e.prototype.getRawData=function(){return Qs(this).dataBeforeProcessed},e.prototype.getColorBy=function(){var t=this.get("colorBy");return t||"series"},e.prototype.isColorBySeries=function(){return this.getColorBy()==="series"},e.prototype.getBaseAxis=function(){var t=this.coordinateSystem;return t&&t.getBaseAxis&&t.getBaseAxis()},e.prototype.formatTooltip=function(t,n,i){return CG({series:this,dataIndex:t,multipleSeries:n})},e.prototype.isAnimationEnabled=function(){var t=this.ecModel;if(kt.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,i){var a=this.ecModel,o=b2.prototype.getColorFromPalette.call(this,t,n,i);return o||(o=a.getColorFromPalette(t,n,i)),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 i=this.option.selectedMap;if(i){var a=this.option.selectedMode,o=this.getData(n);if(a==="series"||i==="all"){this.option.selectedMap={},this._selectedDataIndicesMap={};return}for(var s=0;s<t.length;s++){var l=t[s],u=iy(o,l);i[u]=!1,this._selectedDataIndicesMap[u]=-1}}},e.prototype.toggleSelect=function(t,n){for(var i=[],a=0;a<t.length;a++)i[0]=t[a],this.isSelected(t[a],n)?this.unselect(i,n):this.select(i,n)},e.prototype.getSelectedDataIndices=function(){if(this.option.selectedMap==="all")return[].slice.call(this.getData().getIndices());for(var t=this._selectedDataIndicesMap,n=wt(t),i=[],a=0;a<n.length;a++){var o=t[n[a]];o>=0&&i.push(o)}return i},e.prototype.isSelected=function(t,n){var i=this.option.selectedMap;if(!i)return!1;var a=this.getData(n);return(i==="all"||i[iy(a,t)])&&!a.getItemModel(t).get(["select","disabled"])},e.prototype.isUniversalTransitionEnabled=function(){if(this[h0])return!0;var t=this.option.universalTransition;return t?t===!0?!0:t&&t.enabled:!1},e.prototype._innerSelect=function(t,n){var i,a,o=this.option,s=o.selectedMode,l=n.length;if(!(!s||!l)){if(s==="series")o.selectedMap="all";else if(s==="multiple"){Qe(o.selectedMap)||(o.selectedMap={});for(var u=o.selectedMap,c=0;c<l;c++){var h=n[c],f=iy(t,h);u[f]=!0,this._selectedDataIndicesMap[f]=t.getRawIndex(h)}}else if(s==="single"||s===!0){var d=n[l-1],f=iy(t,d);o.selectedMap=(i={},i[f]=!0,i),this._selectedDataIndicesMap=(a={},a[f]=t.getRawIndex(d),a)}}},e.prototype._initSelectedMapFromData=function(t){if(!this.option.selectedMap){var n=[];t.hasItemOption&&t.each(function(i){var a=t.getRawDataItem(i);a&&a.selected&&n.push(i)}),n.length>0&&this._innerSelect(t,n)}},e.registerClass=function(t){return Nt.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}(Nt);ir(z1,F1);ir(z1,b2);k4(z1,Nt);function DN(r){var e=r.name;JC(r)||(r.name=ghe(r)||e)}function ghe(r){var e=r.getRawData(),t=e.mapDimensionsAll("seriesName"),n=[];return k(t,function(i){var a=e.getDimensionInfo(i);a.displayName&&n.push(a.displayName)}),n.join(" ")}function mhe(r){return r.model.getRawData().count()}function yhe(r){var e=r.model;return e.setData(e.getRawData().cloneShallow()),_he}function _he(r,e){e.outputData&&r.end>e.outputData.count()&&e.model.getRawData().cloneShallow(e.outputData)}function IN(r,e){k(Fv(r.CHANGABLE_METHODS,r.DOWNSAMPLE_METHODS),function(t){r.wrapMethod(t,ut(xhe,e))})}function xhe(r,e){var t=kT(r);return t&&t.setOutputEnd((e||this).count()),e}function kT(r){var e=(r.ecModel||{}).scheduler,t=e&&e.getPipeline(r.uid);if(t){var n=t.currentTask;if(n){var i=n.agentStubMap;i&&(n=i.get(r.uid))}return n}}const En=z1;var L2=function(){function r(){this.group=new rt,this.uid=xd("viewComponent")}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){},r.prototype.updateLayout=function(e,t,n,i){},r.prototype.updateVisual=function(e,t,n,i){},r.prototype.toggleBlurSeries=function(e,t,n){},r.prototype.eachRendered=function(e){var t=this.group;t&&t.traverse(e)},r}();t2(L2);_1(L2);const kn=L2;function Td(){var r=Pt();return function(e){var t=r(e),n=e.pipelineContext,i=!!t.large,a=!!t.progressiveRender,o=t.large=!!(n&&n.large),s=t.progressiveRender=!!(n&&n.progressiveRender);return(i!==o||a!==s)&&"reset"}}var EG=Pt(),She=Td(),P2=function(){function r(){this.group=new rt,this.uid=xd("viewChart"),this.renderTask=lv({plan:Ahe,reset:whe}),this.renderTask.context={view:this}}return r.prototype.init=function(e,t){},r.prototype.render=function(e,t,n,i){},r.prototype.highlight=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&kN(a,i,"emphasis")},r.prototype.downplay=function(e,t,n,i){var a=e.getData(i&&i.dataType);a&&kN(a,i,"normal")},r.prototype.remove=function(e,t){this.group.removeAll()},r.prototype.dispose=function(e,t){},r.prototype.updateView=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateLayout=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.updateVisual=function(e,t,n,i){this.render(e,t,n,i)},r.prototype.eachRendered=function(e){ou(this.group,e)},r.markUpdateMethod=function(e,t){EG(e).updateMethod=t},r.protoInitialize=function(){var e=r.prototype;e.type="chart"}(),r}();function NN(r,e,t){r&&$v(r)&&(e==="emphasis"?Ds:Is)(r,t)}function kN(r,e,t){var n=Uc(r,e),i=e&&e.highlightKey!=null?qle(e.highlightKey):null;n!=null?k(nn(n),function(a){NN(r.getItemGraphicEl(a),t,i)}):r.eachItemGraphicEl(function(a){NN(a,t,i)})}t2(P2);_1(P2);function Ahe(r){return She(r.model)}function whe(r){var e=r.model,t=r.ecModel,n=r.api,i=r.payload,a=e.pipelineContext.progressiveRender,o=r.view,s=i&&EG(i).updateMethod,l=a?"incrementalPrepareRender":s&&o[s]?s:"render";return l!=="render"&&o[l](e,t,n,i),bhe[l]}var bhe={incrementalPrepareRender:{progress:function(r,e){e.view.incrementalRender(r,e.model,e.ecModel,e.api,e.payload)}},render:{forceFirstProgress:!0,progress:function(r,e){e.view.render(e.model,e.ecModel,e.api,e.payload)}}};const gn=P2;var h_="\0__throttleOriginMethod",ON="\0__throttleRate",FN="\0__throttleType";function U1(r,e,t){var n,i=0,a=0,o=null,s,l,u,c;e=e||0;function h(){a=new Date().getTime(),o=null,r.apply(l,u||[])}var f=function(){for(var d=[],p=0;p<arguments.length;p++)d[p]=arguments[p];n=new Date().getTime(),l=this,u=d;var g=c||e,v=c||t;c=null,s=n-(v?i:a)-g,clearTimeout(o),v?o=setTimeout(h,g):s>=0?h():o=setTimeout(h,-s),i=n};return f.clear=function(){o&&(clearTimeout(o),o=null)},f.debounceNextCall=function(d){c=d},f}function Md(r,e,t,n){var i=r[e];if(i){var a=i[h_]||i,o=i[FN],s=i[ON];if(s!==t||o!==n){if(t==null||!n)return r[e]=a;i=r[e]=U1(a,t,n==="debounce"),i[h_]=a,i[FN]=n,i[ON]=t}return i}}function Kv(r,e){var t=r[e];t&&t[h_]&&(t.clear&&t.clear(),r[e]=t[h_])}var BN=Pt(),zN={itemStyle:Vc(DV,!0),lineStyle:Vc(RV,!0)},The={lineStyle:"stroke",itemStyle:"fill"};function LG(r,e){var t=r.visualStyleMapper||zN[e];return t||(console.warn("Unknown style type '"+e+"'."),zN.itemStyle)}function PG(r,e){var t=r.visualDrawType||The[e];return t||(console.warn("Unknown style type '"+e+"'."),"fill")}var Mhe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=r.getModel(n),a=LG(r,n),o=a(i),s=i.getShallow("decal");s&&(t.setVisual("decal",s),s.dirty=!0);var l=PG(r,n),u=o[l],c=qe(u)?u:null,h=o.fill==="auto"||o.stroke==="auto";if(!o[l]||c||h){var f=r.getColorFromPalette(r.name,null,e.getSeriesCount());o[l]||(o[l]=f,t.setVisual("colorFromPalette",!0)),o.fill=o.fill==="auto"||qe(o.fill)?f:o.fill,o.stroke=o.stroke==="auto"||qe(o.stroke)?f:o.stroke}if(t.setVisual("style",o),t.setVisual("drawType",l),!e.isSeriesFiltered(r)&&c)return t.setVisual("colorFromPalette",!1),{dataEach:function(d,p){var g=r.getDataParams(p),v=pe({},o);v[l]=c(g),d.setItemVisual(p,"style",v)}}}},tp=new vn,Che={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!(r.ignoreStyleOnData||e.isSeriesFiltered(r))){var t=r.getData(),n=r.visualStyleAccessPath||"itemStyle",i=LG(r,n),a=t.getVisual("drawType");return{dataEach:t.hasItemOption?function(o,s){var l=o.getRawDataItem(s);if(l&&l[n]){tp.option=l[n];var u=i(tp),c=o.ensureUniqueItemVisual(s,"style");pe(c,u),tp.option.decal&&(o.setItemVisual(s,"decal",tp.option.decal),tp.option.decal.dirty=!0),a in u&&o.setItemVisual(s,"colorFromPalette",!1)}}:null}}}},Ehe={performRawSeries:!0,overallReset:function(r){var e=He();r.eachSeries(function(t){var n=t.getColorBy();if(!t.isColorBySeries()){var i=t.type+"-"+n,a=e.get(i);a||(a={},e.set(i,a)),BN(t).scope=a}}),r.eachSeries(function(t){if(!(t.isColorBySeries()||r.isSeriesFiltered(t))){var n=t.getRawData(),i={},a=t.getData(),o=BN(t).scope,s=t.visualStyleAccessPath||"itemStyle",l=PG(t,s);a.each(function(u){var c=a.getRawIndex(u);i[c]=u}),n.each(function(u){var c=i[u],h=a.getItemVisual(c,"colorFromPalette");if(h){var f=a.ensureUniqueItemVisual(c,"style"),d=n.getName(u)||u+"",p=n.count();f[l]=t.getColorFromPalette(d,o,p)}})}})}},ay=Math.PI;function Lhe(r,e){e=e||{},Ke(e,{text:"loading",textColor:"#000",fontSize:12,fontWeight:"normal",fontStyle:"normal",fontFamily:"sans-serif",maskColor:"rgba(255, 255, 255, 0.8)",showSpinner:!0,color:"#5470c6",spinnerRadius:10,lineWidth:5,zlevel:0});var t=new rt,n=new Dt({style:{fill:e.maskColor},zlevel:e.zlevel,z:1e4});t.add(n);var i=new Ot({style:{text:e.text,fill:e.textColor,fontSize:e.fontSize,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontFamily:e.fontFamily},zlevel:e.zlevel,z:10001}),a=new Dt({style:{fill:"none"},textContent:i,textConfig:{position:"right",distance:10},zlevel:e.zlevel,z:10001});t.add(a);var o;return e.showSpinner&&(o=new h2({shape:{startAngle:-ay/2,endAngle:-ay/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:ay*3/2}).start("circularInOut"),o.animateShape(!0).when(1e3,{startAngle:ay*3/2}).delay(300).start("circularInOut"),t.add(o)),t.resize=function(){var s=i.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),c=r.getHeight()/2;e.showSpinner&&o.setShape({cx:u,cy:c}),a.setShape({x:u-l,y:c-l,width:l*2,height:l*2}),n.setShape({x:0,y:0,width:r.getWidth(),height:r.getHeight()})},t.resize(),t}var Phe=function(){function r(e,t,n,i){this._stageTaskMap=He(),this.ecInstance=e,this.api=t,n=this._dataProcessorHandlers=n.slice(),i=this._visualHandlers=i.slice(),this._allHandlers=n.concat(i)}return r.prototype.restoreData=function(e,t){e.restoreData(t),this._stageTaskMap.each(function(n){var i=n.overallTask;i&&i.dirty()})},r.prototype.getPerformArgs=function(e,t){if(e.__pipeline){var n=this._pipelineMap.get(e.__pipeline.id),i=n.context,a=!t&&n.progressiveEnabled&&(!i||i.progressiveRender)&&e.__idxInPipeline>n.blockIndex,o=a?n.step:null,s=i&&i.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),i=e.getData(),a=i.count(),o=n.progressiveEnabled&&t.incrementalPrepareRender&&a>=n.threshold,s=e.get("large")&&a>=e.get("largeThreshold"),l=e.get("progressiveChunkMode")==="mod"?a:null;e.pipelineContext=n.context={progressiveRender:o,modDataCount:l,large:s}},r.prototype.restorePipelines=function(e){var t=this,n=t._pipelineMap=He();e.eachSeries(function(i){var a=i.getProgressive(),o=i.uid;n.set(o,{id:o,head:null,tail:null,threshold:i.getProgressiveThreshold(),progressiveEnabled:a&&!(i.preventIncremental&&i.preventIncremental()),blockIndex:-1,step:Math.round(a||700),count:0}),t._pipe(i,i.dataTask)})},r.prototype.prepareStageTasks=function(){var e=this._stageTaskMap,t=this.api.getModel(),n=this.api;k(this._allHandlers,function(i){var a=e.get(i.uid)||e.set(i.uid,{}),o="";gi(!(i.reset&&i.overallReset),o),i.reset&&this._createSeriesStageTask(i,a,t,n),i.overallReset&&this._createOverallStageTask(i,a,t,n)},this)},r.prototype.prepareView=function(e,t,n,i){var a=e.renderTask,o=a.context;o.model=t,o.ecModel=n,o.api=i,a.__block=!e.incrementalPrepareRender,this._pipe(t,a)},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,i){i=i||{};var a=!1,o=this;k(e,function(l,u){if(!(i.visualType&&i.visualType!==l.visualType)){var c=o._stageTaskMap.get(l.uid),h=c.seriesTaskMap,f=c.overallTask;if(f){var d,p=f.agentStubMap;p.each(function(v){s(i,v)&&(v.dirty(),d=!0)}),d&&f.dirty(),o.updatePayload(f,n);var g=o.getPerformArgs(f,i.block);p.each(function(v){v.perform(g)}),f.perform(g)&&(a=!0)}else h&&h.each(function(v,m){s(i,v)&&v.dirty();var y=o.getPerformArgs(v,i.block);y.skip=!l.performRawSeries&&t.isSeriesFiltered(v.context.model),o.updatePayload(v,n),v.perform(y)&&(a=!0)})}});function s(l,u){return l.setDirty&&(!l.dirtyMap||l.dirtyMap.get(u.__pipeline.id))}this.unfinished=a||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,i){var a=this,o=t.seriesTaskMap,s=t.seriesTaskMap=He(),l=e.seriesType,u=e.getTargetSeries;e.createOnAllSeries?n.eachRawSeries(c):l?n.eachRawSeriesByType(l,c):u&&u(n,i).each(c);function c(h){var f=h.uid,d=s.set(f,o&&o.get(f)||lv({plan:khe,reset:Ohe,count:Bhe}));d.context={model:h,ecModel:n,api:i,useClearVisual:e.isVisual&&!e.isLayout,plan:e.plan,reset:e.reset,scheduler:a},a._pipe(h,d)}},r.prototype._createOverallStageTask=function(e,t,n,i){var a=this,o=t.overallTask=t.overallTask||lv({reset:Rhe});o.context={ecModel:n,api:i,overallReset:e.overallReset,scheduler:a};var s=o.agentStubMap,l=o.agentStubMap=He(),u=e.seriesType,c=e.getTargetSeries,h=!0,f=!1,d="";gi(!e.createOnAllSeries,d),u?n.eachRawSeriesByType(u,p):c?c(n,i).each(p):(h=!1,k(n.getSeries(),p));function p(g){var v=g.uid,m=l.set(v,s&&s.get(v)||(f=!0,lv({reset:Dhe,onDirty:Nhe})));m.context={model:g,overallProgress:h},m.agent=o,m.__block=h,a._pipe(g,m)}f&&o.dirty()},r.prototype._pipe=function(e,t){var n=e.uid,i=this._pipelineMap.get(n);!i.head&&(i.head=t),i.tail&&i.tail.pipe(t),i.tail=t,t.__idxInPipeline=i.count++,t.__pipeline=i},r.wrapStageHandler=function(e,t){return qe(e)&&(e={overallReset:e,seriesType:zhe(e)}),e.uid=xd("stageHandler"),t&&(e.visualType=t),e},r}();function Rhe(r){r.overallReset(r.ecModel,r.api,r.payload)}function Dhe(r){return r.overallProgress&&Ihe}function Ihe(){this.agent.dirty(),this.getDownstream().dirty()}function Nhe(){this.agent&&this.agent.dirty()}function khe(r){return r.plan?r.plan(r.model,r.ecModel,r.api,r.payload):null}function Ohe(r){r.useClearVisual&&r.data.clearAllVisual();var e=r.resetDefines=nn(r.reset(r.model,r.ecModel,r.api,r.payload));return e.length>1?xe(e,function(t,n){return RG(n)}):Fhe}var Fhe=RG(0);function RG(r){return function(e,t){var n=t.data,i=t.resetDefines[r];if(i&&i.dataEach)for(var a=e.start;a<e.end;a++)i.dataEach(n,a);else i&&i.progress&&i.progress(e,n)}}function Bhe(r){return r.data.count()}function zhe(r){f_=null;try{r(Zv,DG)}catch(e){}return f_}var Zv={},DG={},f_;IG(Zv,rG);IG(DG,iG);Zv.eachSeriesByType=Zv.eachRawSeriesByType=function(r){f_=r};Zv.eachComponent=function(r){r.mainType==="series"&&r.subType&&(f_=r.subType)};function IG(r,e){for(var t in e.prototype)r[t]=qn}const NG=Phe;var UN=["#37A2DA","#32C5E9","#67E0E3","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#E062AE","#E690D1","#e7bcf3","#9d96f5","#8378EA","#96BFFF"];const Uhe={color:UN,colorLayer:[["#37A2DA","#ffd85c","#fd7b5f"],["#37A2DA","#67E0E3","#FFDB5C","#ff9f7f","#E062AE","#9d96f5"],["#37A2DA","#32C5E9","#9FE6B8","#FFDB5C","#ff9f7f","#fb7293","#e7bcf3","#8378EA","#96BFFF"],UN]};var qr="#B9B8CE",VN="#100C2A",oy=function(){return{axisLine:{lineStyle:{color:qr}},splitLine:{lineStyle:{color:"#484753"}},splitArea:{areaStyle:{color:["rgba(255,255,255,0.02)","rgba(255,255,255,0.05)"]}},minorSplitLine:{lineStyle:{color:"#20203B"}}}},GN=["#4992ff","#7cffb2","#fddd60","#ff6e76","#58d9f9","#05c091","#ff8a45","#8d48e3","#dd79ff"],kG={darkMode:!0,color:GN,backgroundColor:VN,axisPointer:{lineStyle:{color:"#817f91"},crossStyle:{color:"#817f91"},label:{color:"#fff"}},legend:{textStyle:{color:qr},pageTextStyle:{color:qr}},textStyle:{color:qr},title:{textStyle:{color:"#EEF1FA"},subtextStyle:{color:"#B9B8CE"}},toolbox:{iconStyle:{borderColor:qr}},dataZoom:{borderColor:"#71708A",textStyle:{color:qr},brushStyle:{color:"rgba(135,163,206,0.3)"},handleStyle:{color:"#353450",borderColor:"#C5CBE3"},moveHandleStyle:{color:"#B0B6C3",opacity:.3},fillerColor:"rgba(135,163,206,0.2)",emphasis:{handleStyle:{borderColor:"#91B7F2",color:"#4D587D"},moveHandleStyle:{color:"#636D9A",opacity:.7}},dataBackground:{lineStyle:{color:"#71708A",width:1},areaStyle:{color:"#71708A"}},selectedDataBackground:{lineStyle:{color:"#87A3CE"},areaStyle:{color:"#87A3CE"}}},visualMap:{textStyle:{color:qr}},timeline:{lineStyle:{color:qr},label:{color:qr},controlStyle:{color:qr,borderColor:qr}},calendar:{itemStyle:{color:VN},dayLabel:{color:qr},monthLabel:{color:qr},yearLabel:{color:qr}},timeAxis:oy(),logAxis:oy(),valueAxis:oy(),categoryAxis:oy(),line:{symbol:"circle"},graph:{color:GN},gauge:{title:{color:qr},axisLine:{lineStyle:{color:[[1,"rgba(207,212,219,0.2)"]]}},axisLabel:{color:qr},detail:{color:"#EEF1FA"}},candlestick:{itemStyle:{color:"#f64e56",color0:"#54ea92",borderColor:"#f64e56",borderColor0:"#54ea92"}}};kG.categoryAxis.splitLine.show=!1;const Vhe=kG;var Ghe=function(){function r(){}return r.prototype.normalizeQuery=function(e){var t={},n={},i={};if(ke(e)){var a=Fo(e);t.mainType=a.main||null,t.subType=a.sub||null}else{var o=["Index","Name","Id"],s={name:1,dataIndex:1,dataType:1};k(e,function(l,u){for(var c=!1,h=0;h<o.length;h++){var f=o[h],d=u.lastIndexOf(f);if(d>0&&d===u.length-f.length){var p=u.slice(0,d);p!=="data"&&(t.mainType=p,t[f.toLowerCase()]=l,c=!0)}}s.hasOwnProperty(u)&&(n[u]=l,c=!0),c||(i[u]=l)})}return{cptQuery:t,dataQuery:n,otherQuery:i}},r.prototype.filter=function(e,t){var n=this.eventInfo;if(!n)return!0;var i=n.targetEl,a=n.packedEvent,o=n.model,s=n.view;if(!o||!s)return!0;var l=t.cptQuery,u=t.dataQuery;return c(l,o,"mainType")&&c(l,o,"subType")&&c(l,o,"index","componentIndex")&&c(l,o,"name")&&c(l,o,"id")&&c(u,a,"name")&&c(u,a,"dataIndex")&&c(u,a,"dataType")&&(!s.filterForExposedEvent||s.filterForExposedEvent(e,t.otherQuery,i,a));function c(h,f,d,p){return h[d]==null||f[p||d]===h[d]}},r.prototype.afterTrigger=function(){this.eventInfo=null},r}(),OT=["symbol","symbolSize","symbolRotate","symbolOffset"],HN=OT.concat(["symbolKeepAspect"]),Hhe={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={},i={},a=!1,o=0;o<OT.length;o++){var s=OT[o],l=r.get(s);qe(l)?(a=!0,i[s]=l):n[s]=l}if(n.symbol=n.symbol||r.defaultSymbol,t.setVisual(pe({legendIcon:r.legendIcon||n.symbol,symbolKeepAspect:r.get("symbolKeepAspect")},n)),e.isSeriesFiltered(r))return;var u=wt(i);function c(h,f){for(var d=r.getRawValue(f),p=r.getDataParams(f),g=0;g<u.length;g++){var v=u[g];h.setItemVisual(f,v,i[v](d,p))}}return{dataEach:a?c:null}}},Whe={createOnAllSeries:!0,performRawSeries:!0,reset:function(r,e){if(!r.hasSymbolVisual||e.isSeriesFiltered(r))return;var t=r.getData();function n(i,a){for(var o=i.getItemModel(a),s=0;s<HN.length;s++){var l=HN[s],u=o.getShallow(l,!0);u!=null&&i.setItemVisual(a,l,u)}}return{dataEach:t.hasItemOption?n:null}}};function R2(r,e,t){switch(t){case"color":var n=r.getItemVisual(e,"style");return n[r.getVisual("drawType")];case"opacity":return r.getItemVisual(e,"style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getItemVisual(e,t)}}function Lg(r,e){switch(e){case"color":var t=r.getVisual("style");return t[r.getVisual("drawType")];case"opacity":return r.getVisual("style").opacity;case"symbol":case"symbolSize":case"liftZ":return r.getVisual(e)}}function OG(r,e,t,n){switch(t){case"color":var i=r.ensureUniqueItemVisual(e,"style");i[r.getVisual("drawType")]=n,r.setItemVisual(e,"colorFromPalette",!1);break;case"opacity":r.ensureUniqueItemVisual(e,"style").opacity=n;break;case"symbol":case"symbolSize":case"liftZ":r.setItemVisual(e,t,n);break}}function FG(r,e){function t(n,i){var a=[];return n.eachComponent({mainType:"series",subType:r,query:i},function(o){a.push(o.seriesIndex)}),a}k([[r+"ToggleSelect","toggleSelect"],[r+"Select","select"],[r+"UnSelect","unselect"]],function(n){e(n[0],function(i,a,o){i=pe({},i),o.dispatchAction(pe(i,{type:n[1],seriesIndex:t(a,i)}))})})}function Uh(r,e,t,n,i){var a=r+e;t.isSilent(a)||n.eachComponent({mainType:"series",subType:"pie"},function(o){for(var s=o.seriesIndex,l=o.option.selectedMap,u=i.selected,c=0;c<u.length;c++)if(u[c].seriesIndex===s){var h=o.getData(),f=Uc(h,i.fromActionPayload);t.trigger(a,{type:a,seriesId:o.id,name:_e(f)?h.getName(f[0]):h.getName(f),selected:ke(l)?l:pe({},l)})}})}function $he(r,e,t){r.on("selectchanged",function(n){var i=t.getModel();n.isFromClick?(Uh("map","selectchanged",e,i,n),Uh("pie","selectchanged",e,i,n)):n.fromAction==="select"?(Uh("map","selected",e,i,n),Uh("pie","selected",e,i,n)):n.fromAction==="unselect"&&(Uh("map","unselected",e,i,n),Uh("pie","unselected",e,i,n))})}function lc(r,e,t){for(var n;r&&!(e(r)&&(n=r,t));)r=r.__hostTarget||r.parent;return n}var Xhe=Math.round(Math.random()*9),Yhe=typeof Object.defineProperty=="function",qhe=function(){function r(){this._id="__ec_inner_"+Xhe++}return r.prototype.get=function(e){return this._guard(e)[this._id]},r.prototype.set=function(e,t){var n=this._guard(e);return Yhe?Object.defineProperty(n,this._id,{value:t,enumerable:!1,configurable:!0}):n[this._id]=t,this},r.prototype.delete=function(e){return this.has(e)?(delete this._guard(e)[this._id],!0):!1},r.prototype.has=function(e){return!!this._guard(e)[this._id]},r.prototype._guard=function(e){if(e!==Object(e))throw TypeError("Value of WeakMap is not a non-null object.");return e},r}();const jhe=qhe;var Khe=yt.extend({type:"triangle",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,i=e.width/2,a=e.height/2;r.moveTo(t,n-a),r.lineTo(t+i,n+a),r.lineTo(t-i,n+a),r.closePath()}}),Zhe=yt.extend({type:"diamond",shape:{cx:0,cy:0,width:0,height:0},buildPath:function(r,e){var t=e.cx,n=e.cy,i=e.width/2,a=e.height/2;r.moveTo(t,n-a),r.lineTo(t+i,n),r.lineTo(t,n+a),r.lineTo(t-i,n),r.closePath()}}),Qhe=yt.extend({type:"pin",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.x,n=e.y,i=e.width/5*3,a=Math.max(i,e.height),o=i/2,s=o*o/(a-o),l=n-a+o+s,u=Math.asin(s/o),c=Math.cos(u)*o,h=Math.sin(u),f=Math.cos(u),d=o*.6,p=o*.7;r.moveTo(t-c,l+s),r.arc(t,l,o,Math.PI-u,Math.PI*2+u),r.bezierCurveTo(t+c-h*d,l+s+f*d,t,n-p,t,n),r.bezierCurveTo(t,n-p,t-c+h*d,l+s+f*d,t-c,l+s),r.closePath()}}),Jhe=yt.extend({type:"arrow",shape:{x:0,y:0,width:0,height:0},buildPath:function(r,e){var t=e.height,n=e.width,i=e.x,a=e.y,o=n/3*2;r.moveTo(i,a),r.lineTo(i+o,a+t),r.lineTo(i,a+t/4*3),r.lineTo(i-o,a+t),r.lineTo(i,a),r.closePath()}}),efe={line:Cr,rect:Dt,roundRect:Dt,square:Dt,circle:au,diamond:Zhe,pin:Qhe,arrow:Jhe,triangle:Khe},tfe={line:function(r,e,t,n,i){i.x1=r,i.y1=e+n/2,i.x2=r+t,i.y2=e+n/2},rect:function(r,e,t,n,i){i.x=r,i.y=e,i.width=t,i.height=n},roundRect:function(r,e,t,n,i){i.x=r,i.y=e,i.width=t,i.height=n,i.r=Math.min(t,n)/4},square:function(r,e,t,n,i){var a=Math.min(t,n);i.x=r,i.y=e,i.width=a,i.height=a},circle:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.r=Math.min(t,n)/2},diamond:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.width=t,i.height=n},pin:function(r,e,t,n,i){i.x=r+t/2,i.y=e+n/2,i.width=t,i.height=n},arrow:function(r,e,t,n,i){i.x=r+t/2,i.y=e+n/2,i.width=t,i.height=n},triangle:function(r,e,t,n,i){i.cx=r+t/2,i.cy=e+n/2,i.width=t,i.height=n}},d_={};k(efe,function(r,e){d_[e]=new r});var nfe=yt.extend({type:"symbol",shape:{symbolType:"",x:0,y:0,width:0,height:0},calculateTextPosition:function(r,e,t){var n=n_(r,e,t),i=this.shape;return i&&i.symbolType==="pin"&&e.position==="inside"&&(n.y=t.y+t.height*.4),n},buildPath:function(r,e,t){var n=e.symbolType;if(n!=="none"){var i=d_[n];i||(n="rect",i=d_[n]),tfe[n](e.x,e.y,e.width,e.height,i.shape),i.buildPath(r,i.shape,t)}}});function rfe(r,e){if(this.type!=="image"){var t=this.style;this.__isEmptyBrush?(t.stroke=r,t.fill=e||"#fff",t.lineWidth=2):this.shape.symbolType==="line"?t.stroke=r:t.fill=r,this.markRedraw()}}function rr(r,e,t,n,i,a,o){var s=r.indexOf("empty")===0;s&&(r=r.substr(5,1).toLowerCase()+r.substr(6));var l;return r.indexOf("image://")===0?l=wV(r.slice(8),new dt(e,t,n,i),o?"center":"cover"):r.indexOf("path://")===0?l=C1(r.slice(7),{},new dt(e,t,n,i),o?"center":"cover"):l=new nfe({shape:{symbolType:r,x:e,y:t,width:n,height:i}}),l.__isEmptyBrush=s,l.setColor=rfe,a&&l.setColor(a),l}function Cd(r){return _e(r)||(r=[+r,+r]),[r[0]||0,r[1]||0]}function Jc(r,e){if(r!=null)return _e(r)||(r=[r,r]),[Pe(r[0],e[0])||0,Pe(ot(r[1],r[0]),e[1])||0]}function uc(r){return isFinite(r)}function ife(r,e,t){var n=e.x==null?0:e.x,i=e.x2==null?1:e.x2,a=e.y==null?0:e.y,o=e.y2==null?0:e.y2;e.global||(n=n*t.width+t.x,i=i*t.width+t.x,a=a*t.height+t.y,o=o*t.height+t.y),n=uc(n)?n:0,i=uc(i)?i:1,a=uc(a)?a:0,o=uc(o)?o:0;var s=r.createLinearGradient(n,a,i,o);return s}function afe(r,e,t){var n=t.width,i=t.height,a=Math.min(n,i),o=e.x==null?.5:e.x,s=e.y==null?.5:e.y,l=e.r==null?.5:e.r;e.global||(o=o*n+t.x,s=s*i+t.y,l=l*a),o=uc(o)?o:.5,s=uc(s)?s:.5,l=l>=0&&uc(l)?l:.5;var u=r.createRadialGradient(o,s,0,o,s,l);return u}function FT(r,e,t){for(var n=e.type==="radial"?afe(r,e,t):ife(r,e,t),i=e.colorStops,a=0;a<i.length;a++)n.addColorStop(i[a].offset,i[a].color);return n}function ofe(r,e){if(r===e||!r&&!e)return!1;if(!r||!e||r.length!==e.length)return!0;for(var t=0;t<r.length;t++)if(r[t]!==e[t])return!0;return!1}function sy(r){return parseInt(r,10)}function gf(r,e,t){var n=["width","height"][e],i=["clientWidth","clientHeight"][e],a=["paddingLeft","paddingTop"][e],o=["paddingRight","paddingBottom"][e];if(t[n]!=null&&t[n]!=="auto")return parseFloat(t[n]);var s=document.defaultView.getComputedStyle(r);return(r[i]||sy(s[n])||sy(r.style[n]))-(sy(s[a])||0)-(sy(s[o])||0)|0}function sfe(r,e){return!r||r==="solid"||!(e>0)?null:r==="dashed"?[4*e,2*e]:r==="dotted"?[e]:Ft(r)?[r]:_e(r)?r:null}function D2(r){var e=r.style,t=e.lineDash&&e.lineWidth>0&&sfe(e.lineDash,e.lineWidth),n=e.lineDashOffset;if(t){var i=e.strokeNoScale&&r.getLineScale?r.getLineScale():1;i&&i!==1&&(t=xe(t,function(a){return a/i}),n/=i)}return[t,n]}var lfe=new jo(!0);function p_(r){var e=r.stroke;return!(e==null||e==="none"||!(r.lineWidth>0))}function WN(r){return typeof r=="string"&&r!=="none"}function v_(r){var e=r.fill;return e!=null&&e!=="none"}function $N(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 XN(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 BT(r,e,t){var n=n2(e.image,e.__image,t);if(x1(n)){var i=r.createPattern(n,e.repeat||"repeat");if(typeof DOMMatrix=="function"&&i&&i.setTransform){var a=new DOMMatrix;a.translateSelf(e.x||0,e.y||0),a.rotateSelf(0,0,(e.rotation||0)*Zy),a.scaleSelf(e.scaleX||1,e.scaleY||1),i.setTransform(a)}return i}}function ufe(r,e,t,n){var i,a=p_(t),o=v_(t),s=t.strokePercent,l=s<1,u=!e.path;(!e.silent||l)&&u&&e.createPathProxy();var c=e.path||lfe,h=e.__dirty;if(!n){var f=t.fill,d=t.stroke,p=o&&!!f.colorStops,g=a&&!!d.colorStops,v=o&&!!f.image,m=a&&!!d.image,y=void 0,_=void 0,x=void 0,S=void 0,A=void 0;(p||g)&&(A=e.getBoundingRect()),p&&(y=h?FT(r,f,A):e.__canvasFillGradient,e.__canvasFillGradient=y),g&&(_=h?FT(r,d,A):e.__canvasStrokeGradient,e.__canvasStrokeGradient=_),v&&(x=h||!e.__canvasFillPattern?BT(r,f,e):e.__canvasFillPattern,e.__canvasFillPattern=x),m&&(S=h||!e.__canvasStrokePattern?BT(r,d,e):e.__canvasStrokePattern,e.__canvasStrokePattern=x),p?r.fillStyle=y:v&&(x?r.fillStyle=x:o=!1),g?r.strokeStyle=_:m&&(S?r.strokeStyle=S:a=!1)}var w=e.getGlobalScale();c.setScale(w[0],w[1],e.segmentIgnoreThreshold);var M,C;r.setLineDash&&t.lineDash&&(i=D2(e),M=i[0],C=i[1]);var b=!0;(u||h&tf)&&(c.setDPR(r.dpr),l?c.setContext(null):(c.setContext(r),b=!1),c.reset(),e.buildPath(c,e.shape,n),c.toStatic(),e.pathUpdated()),b&&c.rebuildPath(r,l?s:1),M&&(r.setLineDash(M),r.lineDashOffset=C),n||(t.strokeFirst?(a&&XN(r,t),o&&$N(r,t)):(o&&$N(r,t),a&&XN(r,t))),M&&r.setLineDash([])}function cfe(r,e,t){var n=e.__image=n2(t.image,e.__image,e,e.onload);if(!(!n||!x1(n))){var i=t.x||0,a=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,c=t.sy||0;r.drawImage(n,u,c,t.sWidth,t.sHeight,i,a,o,s)}else if(t.sx&&t.sy){var u=t.sx,c=t.sy,h=o-u,f=s-c;r.drawImage(n,u,c,h,f,i,a,o,s)}else r.drawImage(n,i,a,o,s)}}function hfe(r,e,t){var n,i=t.text;if(i!=null&&(i+=""),i){r.font=t.font||Yl,r.textAlign=t.textAlign,r.textBaseline=t.textBaseline;var a=void 0,o=void 0;r.setLineDash&&t.lineDash&&(n=D2(e),a=n[0],o=n[1]),a&&(r.setLineDash(a),r.lineDashOffset=o),t.strokeFirst?(p_(t)&&r.strokeText(i,t.x,t.y),v_(t)&&r.fillText(i,t.x,t.y)):(v_(t)&&r.fillText(i,t.x,t.y),p_(t)&&r.strokeText(i,t.x,t.y)),a&&r.setLineDash([])}}var YN=["shadowBlur","shadowOffsetX","shadowOffsetY"],qN=[["lineCap","butt"],["lineJoin","miter"],["miterLimit",10]];function BG(r,e,t,n,i){var a=!1;if(!n&&(t=t||{},e===t))return!1;if(n||e.opacity!==t.opacity){Ti(r,i),a=!0;var o=Math.max(Math.min(e.opacity,1),0);r.globalAlpha=isNaN(o)?Mc.opacity:o}(n||e.blend!==t.blend)&&(a||(Ti(r,i),a=!0),r.globalCompositeOperation=e.blend||Mc.blend);for(var s=0;s<YN.length;s++){var l=YN[s];(n||e[l]!==t[l])&&(a||(Ti(r,i),a=!0),r[l]=r.dpr*(e[l]||0))}return(n||e.shadowColor!==t.shadowColor)&&(a||(Ti(r,i),a=!0),r.shadowColor=e.shadowColor||Mc.shadowColor),a}function jN(r,e,t,n,i){var a=Qv(e,i.inHover),o=n?null:t&&Qv(t,i.inHover)||{};if(a===o)return!1;var s=BG(r,a,o,n,i);if((n||a.fill!==o.fill)&&(s||(Ti(r,i),s=!0),WN(a.fill)&&(r.fillStyle=a.fill)),(n||a.stroke!==o.stroke)&&(s||(Ti(r,i),s=!0),WN(a.stroke)&&(r.strokeStyle=a.stroke)),(n||a.opacity!==o.opacity)&&(s||(Ti(r,i),s=!0),r.globalAlpha=a.opacity==null?1:a.opacity),e.hasStroke()){var l=a.lineWidth,u=l/(a.strokeNoScale&&e.getLineScale?e.getLineScale():1);r.lineWidth!==u&&(s||(Ti(r,i),s=!0),r.lineWidth=u)}for(var c=0;c<qN.length;c++){var h=qN[c],f=h[0];(n||a[f]!==o[f])&&(s||(Ti(r,i),s=!0),r[f]=a[f]||h[1])}return s}function ffe(r,e,t,n,i){return BG(r,Qv(e,i.inHover),t&&Qv(t,i.inHover),n,i)}function zG(r,e){var t=e.transform,n=r.dpr||1;t?r.setTransform(n*t[0],n*t[1],n*t[2],n*t[3],n*t[4],n*t[5]):r.setTransform(n,0,0,n,0,0)}function dfe(r,e,t){for(var n=!1,i=0;i<r.length;i++){var a=r[i];n=n||a.isZeroArea(),zG(e,a),e.beginPath(),a.buildPath(e,a.shape),e.clip()}t.allClipped=n}function pfe(r,e){return r&&e?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&&!e)}var KN=1,ZN=2,QN=3,JN=4;function vfe(r){var e=v_(r),t=p_(r);return!(r.lineDash||!(+e^+t)||e&&typeof r.fill!="string"||t&&typeof r.stroke!="string"||r.strokePercent<1||r.strokeOpacity<1||r.fillOpacity<1)}function Ti(r,e){e.batchFill&&r.fill(),e.batchStroke&&r.stroke(),e.batchFill="",e.batchStroke=""}function Qv(r,e){return e&&r.__hoverStyle||r.style}function UG(r,e){cc(r,e,{inHover:!1,viewWidth:0,viewHeight:0},!0)}function cc(r,e,t,n){var i=e.transform;if(!e.shouldBePainted(t.viewWidth,t.viewHeight,!1,!1)){e.__dirty&=~ji,e.__isRendered=!1;return}var a=e.__clipPaths,o=t.prevElClipPaths,s=!1,l=!1;if((!o||ofe(a,o))&&(o&&o.length&&(Ti(r,t),r.restore(),l=s=!0,t.prevElClipPaths=null,t.allClipped=!1,t.prevEl=null),a&&a.length&&(Ti(r,t),r.save(),dfe(a,r,t),s=!0),t.prevElClipPaths=a),t.allClipped){e.__isRendered=!1;return}e.beforeBrush&&e.beforeBrush(),e.innerBeforeBrush();var u=t.prevEl;u||(l=s=!0);var c=e instanceof yt&&e.autoBatch&&vfe(e.style);s||pfe(i,u.transform)?(Ti(r,t),zG(r,e)):c||Ti(r,t);var h=Qv(e,t.inHover);e instanceof yt?(t.lastDrawType!==KN&&(l=!0,t.lastDrawType=KN),jN(r,e,u,l,t),(!c||!t.batchFill&&!t.batchStroke)&&r.beginPath(),ufe(r,e,h,c),c&&(t.batchFill=h.fill||"",t.batchStroke=h.stroke||"")):e instanceof Hv?(t.lastDrawType!==QN&&(l=!0,t.lastDrawType=QN),jN(r,e,u,l,t),hfe(r,e,h)):e instanceof Ur?(t.lastDrawType!==ZN&&(l=!0,t.lastDrawType=ZN),ffe(r,e,u,l,t),cfe(r,e,h)):e.getTemporalDisplayables&&(t.lastDrawType!==JN&&(l=!0,t.lastDrawType=JN),gfe(r,e,t)),c&&n&&Ti(r,t),e.innerAfterBrush(),e.afterBrush&&e.afterBrush(),t.prevEl=e,e.__dirty=0,e.__isRendered=!0}function gfe(r,e,t){var n=e.getDisplayables(),i=e.getTemporalDisplayables();r.save();var a={prevElClipPaths:null,prevEl:null,allClipped:!1,viewWidth:t.viewWidth,viewHeight:t.viewHeight,inHover:t.inHover},o,s;for(o=e.getCursor(),s=n.length;o<s;o++){var l=n[o];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),cc(r,l,a,o===s-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}for(var u=0,c=i.length;u<c;u++){var l=i[u];l.beforeBrush&&l.beforeBrush(),l.innerBeforeBrush(),cc(r,l,a,u===c-1),l.innerAfterBrush(),l.afterBrush&&l.afterBrush(),a.prevEl=l}e.clearTemporalDisplayables(),e.notClear=!0,r.restore()}var gA=new jhe,ek=new Ag(100),tk=["symbol","symbolSize","symbolKeepAspect","color","backgroundColor","dashArrayX","dashArrayY","maxTileWidth","maxTileHeight"];function ed(r,e){if(r==="none")return null;var t=e.getDevicePixelRatio(),n=e.getZr(),i=n.painter.type==="svg";r.dirty&&gA.delete(r);var a=gA.get(r);if(a)return a;var o=Ke(r,{symbol:"rect",symbolSize:1,symbolKeepAspect:!0,color:"rgba(0, 0, 0, 0.2)",backgroundColor:null,dashArrayX:5,dashArrayY:5,rotation:0,maxTileWidth:512,maxTileHeight:512});o.backgroundColor==="none"&&(o.backgroundColor=null);var s={repeat:"repeat"};return l(s),s.rotation=o.rotation,s.scaleX=s.scaleY=i?1:1/t,gA.set(r,s),r.dirty=!1,s;function l(u){for(var c=[t],h=!0,f=0;f<tk.length;++f){var d=o[tk[f]];if(d!=null&&!_e(d)&&!ke(d)&&!Ft(d)&&typeof d!="boolean"){h=!1;break}c.push(d)}var p;if(h){p=c.join(",")+(i?"-svg":"");var g=ek.get(p);g&&(i?u.svgElement=g:u.image=g)}var v=GG(o.dashArrayX),m=mfe(o.dashArrayY),y=VG(o.symbol),_=yfe(v),x=HG(m),S=!i&&ql.createCanvas(),A=i&&{tag:"g",attrs:{},key:"dcl",children:[]},w=C(),M;S&&(S.width=w.width*t,S.height=w.height*t,M=S.getContext("2d")),b(),h&&ek.put(p,S||A),u.image=S,u.svgElement=A,u.svgWidth=w.width,u.svgHeight=w.height;function C(){for(var T=1,P=0,D=_.length;P<D;++P)T=yI(T,_[P]);for(var L=1,P=0,D=y.length;P<D;++P)L=yI(L,y[P].length);T*=L;var E=x*_.length*y.length;return{width:Math.max(1,Math.min(T,o.maxTileWidth)),height:Math.max(1,Math.min(E,o.maxTileHeight))}}function b(){M&&(M.clearRect(0,0,S.width,S.height),o.backgroundColor&&(M.fillStyle=o.backgroundColor,M.fillRect(0,0,S.width,S.height)));for(var T=0,P=0;P<m.length;++P)T+=m[P];if(T<=0)return;for(var D=-x,L=0,E=0,I=0;D<w.height;){if(L%2===0){for(var N=E/2%y.length,R=0,F=0,O=0;R<w.width*2;){for(var V=0,P=0;P<v[I].length;++P)V+=v[I][P];if(V<=0)break;if(F%2===0){var H=(1-o.symbolSize)*.5,Q=R+v[I][F]*H,W=D+m[L]*H,Z=v[I][F]*o.symbolSize,ee=m[L]*o.symbolSize,he=O/2%y[N].length;le(Q,W,Z,ee,y[N][he])}R+=v[I][F],++O,++F,F===v[I].length&&(F=0)}++I,I===v.length&&(I=0)}D+=m[L],++E,++L,L===m.length&&(L=0)}function le(re,be,de,U,K){var te=i?1:t,ce=rr(K,re*te,be*te,de*te,U*te,o.color,o.symbolKeepAspect);if(i){var se=n.painter.renderOneToVNode(ce);se&&A.children.push(se)}else UG(M,ce)}}}}function VG(r){if(!r||r.length===0)return[["rect"]];if(ke(r))return[[r]];for(var e=!0,t=0;t<r.length;++t)if(!ke(r[t])){e=!1;break}if(e)return VG([r]);for(var n=[],t=0;t<r.length;++t)ke(r[t])?n.push([r[t]]):n.push(r[t]);return n}function GG(r){if(!r||r.length===0)return[[0,0]];if(Ft(r)){var e=Math.ceil(r);return[[e,e]]}for(var t=!0,n=0;n<r.length;++n)if(!Ft(r[n])){t=!1;break}if(t)return GG([r]);for(var i=[],n=0;n<r.length;++n)if(Ft(r[n])){var e=Math.ceil(r[n]);i.push([e,e])}else{var e=xe(r[n],function(s){return Math.ceil(s)});e.length%2===1?i.push(e.concat(e)):i.push(e)}return i}function mfe(r){if(!r||typeof r=="object"&&r.length===0)return[0,0];if(Ft(r)){var e=Math.ceil(r);return[e,e]}var t=xe(r,function(n){return Math.ceil(n)});return r.length%2?t.concat(t):t}function yfe(r){return xe(r,function(e){return HG(e)})}function HG(r){for(var e=0,t=0;t<r.length;++t)e+=r[t];return r.length%2===1?e*2:e}function _fe(r,e){r.eachRawSeries(function(t){if(!r.isSeriesFiltered(t)){var n=t.getData();n.hasItemVisual()&&n.each(function(o){var s=n.getItemVisual(o,"decal");if(s){var l=n.ensureUniqueItemVisual(o,"style");l.decal=ed(s,e)}});var i=n.getVisual("decal");if(i){var a=n.getVisual("style");a.decal=ed(i,e)}}})}var xfe=new Ba;const qa=xfe;var WG={};function Sfe(r,e){WG[r]=e}function Afe(r){return WG[r]}var wfe=1,bfe=800,Tfe=900,Mfe=1e3,Cfe=2e3,Efe=5e3,$G=1e3,Lfe=1100,I2=2e3,XG=3e3,Pfe=4e3,V1=4500,Rfe=4600,Dfe=5e3,Ife=6e3,YG=7e3,Nfe={PROCESSOR:{FILTER:Mfe,SERIES_FILTER:bfe,STATISTIC:Efe},VISUAL:{LAYOUT:$G,PROGRESSIVE_LAYOUT:Lfe,GLOBAL:I2,CHART:XG,POST_CHART_LAYOUT:Rfe,COMPONENT:Pfe,BRUSH:Dfe,CHART_ITEM:V1,ARIA:Ife,DECAL:YG}},$r="__flagInMainProcess",xi="__pendingUpdate",mA="__needsUpdateStatus",nk=/^[a-zA-Z0-9_]+$/,yA="__connectUpdateStatus",rk=0,kfe=1,Ofe=2;function qG(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(this.isDisposed()){this.id;return}return KG(this,r,e)}}function jG(r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return KG(this,r,e)}}function KG(r,e,t){return t[0]=t[0]&&t[0].toLowerCase(),Ba.prototype[e].apply(r,t)}var ZG=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(Ba),QG=ZG.prototype;QG.on=jG("on");QG.off=jG("off");var Vh,_A,ly,Js,xA,SA,AA,np,rp,ik,ak,wA,ok,uy,sk,JG,la,lk,eH=function(r){ae(e,r);function e(t,n,i){var a=r.call(this,new Ghe)||this;a._chartsViews=[],a._chartsMap={},a._componentsViews=[],a._componentsMap={},a._pendingActions=[],i=i||{},ke(n)&&(n=tH[n]),a._dom=t;var o="canvas",s="auto",l=!1;i.ssr&&vse(function(f){var d=at(f),p=d.dataIndex;if(p!=null){var g=He();return g.set("series_index",d.seriesIndex),g.set("data_index",p),d.ssrType&&g.set("ssr_type",d.ssrType),g}});var u=a._zr=pI(t,{renderer:i.renderer||o,devicePixelRatio:i.devicePixelRatio,width:i.width,height:i.height,ssr:i.ssr,useDirtyRect:ot(i.useDirtyRect,l),useCoarsePointer:ot(i.useCoarsePointer,s),pointerSize:i.pointerSize});a._ssr=i.ssr,a._throttledZrFlush=U1(Fe(u.flush,u),17),n=Je(n),n&&oG(n,!0),a._theme=n,a._locale=que(i.locale||IV),a._coordSysMgr=new Eg;var c=a._api=sk(a);function h(f,d){return f.__prio-d.__prio}return e0(m_,h),e0(zT,h),a._scheduler=new NG(a,c,zT,m_),a._messageCenter=new ZG,a._initEvents(),a.resize=Fe(a.resize,a),u.animation.on("frame",a._onframe,a),ik(u,a),ak(u,a),j0(a),a}return e.prototype._onframe=function(){if(!this._disposed){lk(this);var t=this._scheduler;if(this[xi]){var n=this[xi].silent;this[$r]=!0;try{Vh(this),Js.update.call(this,null,this[xi].updateParams)}catch(l){throw this[$r]=!1,this[xi]=null,l}this._zr.flush(),this[$r]=!1,this[xi]=null,np.call(this,n),rp.call(this,n)}else if(t.unfinished){var i=wfe,a=this._model,o=this._api;t.unfinished=!1;do{var s=+new Date;t.performSeriesTasks(a),t.performDataProcessorTasks(a),SA(this,a),t.performVisualTasks(a),uy(this,this._model,o,"remain",{}),i-=+new Date-s}while(i>0&&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,i){if(!this[$r]){if(this._disposed){this.id;return}var a,o,s;if(Qe(n)&&(i=n.lazyUpdate,a=n.silent,o=n.replaceMerge,s=n.transition,n=n.notMerge),this[$r]=!0,!this._model||n){var l=new Mce(this._api),u=this._theme,c=this._model=new rG;c.scheduler=this._scheduler,c.ssr=this._ssr,c.init(null,null,null,u,this._locale,l)}this._model.setOption(t,{replaceMerge:o},UT);var h={seriesTransition:s,optionChanged:!0};if(i)this[xi]={silent:a,updateParams:h},this[$r]=!1,this.getZr().wakeUp();else{try{Vh(this),Js.update.call(this,null,h)}catch(f){throw this[xi]=null,this[$r]=!1,f}this._ssr||this._zr.flush(),this[xi]=null,this[$r]=!1,np.call(this,a),rp.call(this,a)}}},e.prototype.setTheme=function(){},e.prototype.getModel=function(){return this._model},e.prototype.getOption=function(){return this._model&&this._model.getOption()},e.prototype.getWidth=function(){return this._zr.getWidth()},e.prototype.getHeight=function(){return this._zr.getHeight()},e.prototype.getDevicePixelRatio=function(){return this._zr.painter.dpr||kt.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(){if(kt.svgSupported){var t=this._zr,n=t.storage.getDisplayList();return k(n,function(i){i.stopAnimation(null,!0)}),t.painter.toDataURL()}},e.prototype.getDataURL=function(t){if(this._disposed){this.id;return}t=t||{};var n=t.excludeComponents,i=this._model,a=[],o=this;k(n,function(l){i.eachComponent({mainType:l},function(u){var c=o._componentsMap[u.__viewId];c.group.ignore||(a.push(c),c.group.ignore=!0)})});var s=this._zr.painter.getType()==="svg"?this.getSvgDataURL():this.renderToCanvas(t).toDataURL("image/"+(t&&t.type||"png"));return k(a,function(l){l.group.ignore=!1}),s},e.prototype.getConnectedDataURL=function(t){if(this._disposed){this.id;return}var n=t.type==="svg",i=this.group,a=Math.min,o=Math.max,s=1/0;if(uk[i]){var l=s,u=s,c=-s,h=-s,f=[],d=t&&t.pixelRatio||this.getDevicePixelRatio();k(cv,function(_,x){if(_.group===i){var S=n?_.getZr().painter.getSvgDom().innerHTML:_.renderToCanvas(Je(t)),A=_.getDom().getBoundingClientRect();l=a(A.left,l),u=a(A.top,u),c=o(A.right,c),h=o(A.bottom,h),f.push({dom:S,left:A.left,top:A.top})}}),l*=d,u*=d,c*=d,h*=d;var p=c-l,g=h-u,v=ql.createCanvas(),m=pI(v,{renderer:n?"svg":"canvas"});if(m.resize({width:p,height:g}),n){var y="";return k(f,function(_){var x=_.left-l,S=_.top-u;y+='<g transform="translate('+x+","+S+')">'+_.dom+"</g>"}),m.painter.getSvgRoot().innerHTML=y,t.connectedBackgroundColor&&m.painter.setBackgroundColor(t.connectedBackgroundColor),m.refreshImmediately(),m.painter.toDataURL()}else return t.connectedBackgroundColor&&m.add(new Dt({shape:{x:0,y:0,width:p,height:g},style:{fill:t.connectedBackgroundColor}})),k(f,function(_){var x=new Ur({style:{x:_.left*d-l,y:_.top*d-u,image:_.dom}});m.add(x)}),m.refreshImmediately(),v.toDataURL("image/"+(t&&t.type||"png"))}else return this.getDataURL(t)},e.prototype.convertToPixel=function(t,n){return xA(this,"convertToPixel",t,n)},e.prototype.convertFromPixel=function(t,n){return xA(this,"convertFromPixel",t,n)},e.prototype.containPixel=function(t,n){if(this._disposed){this.id;return}var i=this._model,a,o=rv(i,t);return k(o,function(s,l){l.indexOf("Models")>=0&&k(s,function(u){var c=u.coordinateSystem;if(c&&c.containPoint)a=a||!!c.containPoint(n);else if(l==="seriesModels"){var h=this._chartsMap[u.__viewId];h&&h.containPoint&&(a=a||h.containPoint(n,u))}},this)},this),!!a},e.prototype.getVisual=function(t,n){var i=this._model,a=rv(i,t,{defaultMainType:"series"}),o=a.seriesModel,s=o.getData(),l=a.hasOwnProperty("dataIndexInside")?a.dataIndexInside:a.hasOwnProperty("dataIndex")?s.indexOfRawIndex(a.dataIndex):null;return l!=null?R2(s,l,n):Lg(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;k(Ffe,function(n){var i=function(a){var o=t.getModel(),s=a.target,l,u=n==="globalout";if(u?l={}:s&&lc(s,function(p){var g=at(p);if(g&&g.dataIndex!=null){var v=g.dataModel||o.getSeriesByIndex(g.seriesIndex);return l=v&&v.getDataParams(g.dataIndex,g.dataType,s)||{},!0}else if(g.eventData)return l=pe({},g.eventData),!0},!0),l){var c=l.componentType,h=l.componentIndex;(c==="markLine"||c==="markPoint"||c==="markArea")&&(c="series",h=l.seriesIndex);var f=c&&h!=null&&o.getComponent(c,h),d=f&&t[f.mainType==="series"?"_chartsMap":"_componentsMap"][f.__viewId];l.event=a,l.type=n,t._$eventProcessor.eventInfo={targetEl:s,packedEvent:l,model:f,view:d},t.trigger(n,l)}};i.zrEventfulCallAtLast=!0,t._zr.on(n,i,t)}),k(uv,function(n,i){t._messageCenter.on(i,function(a){this.trigger(i,a)},t)}),k(["selectchanged"],function(n){t._messageCenter.on(n,function(i){this.trigger(n,i)},t)}),$he(this._messageCenter,this,this._api)},e.prototype.isDisposed=function(){return this._disposed},e.prototype.clear=function(){if(this._disposed){this.id;return}this.setOption({series:[]},!0)},e.prototype.dispose=function(){if(this._disposed){this.id;return}this._disposed=!0;var t=this.getDom();t&&D4(this.getDom(),k2,"");var n=this,i=n._api,a=n._model;k(n._componentsViews,function(o){o.dispose(a,i)}),k(n._chartsViews,function(o){o.dispose(a,i)}),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 cv[n.id]},e.prototype.resize=function(t){if(!this[$r]){if(this._disposed){this.id;return}this._zr.resize(t);var n=this._model;if(this._loadingFX&&this._loadingFX.resize(),!!n){var i=n.resetOption("media"),a=t&&t.silent;this[xi]&&(a==null&&(a=this[xi].silent),i=!0,this[xi]=null),this[$r]=!0;try{i&&Vh(this),Js.update.call(this,{type:"resize",animation:pe({duration:0},t&&t.animation)})}catch(o){throw this[$r]=!1,o}this[$r]=!1,np.call(this,a),rp.call(this,a)}}},e.prototype.showLoading=function(t,n){if(this._disposed){this.id;return}if(Qe(t)&&(n=t,t=""),t=t||"default",this.hideLoading(),!!VT[t]){var i=VT[t](this._api,n),a=this._zr;this._loadingFX=i,a.add(i)}},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=pe({},t);return n.type=uv[t.type],n},e.prototype.dispatchAction=function(t,n){if(this._disposed){this.id;return}if(Qe(n)||(n={silent:!!n}),!!g_[t.type]&&this._model){if(this[$r]){this._pendingActions.push(t);return}var i=n.silent;AA.call(this,t,i);var a=n.flush;a?this._zr.flush():a!==!1&&kt.browser.weChat&&this._throttledZrFlush(),np.call(this,i),rp.call(this,i)}},e.prototype.updateLabelLayout=function(){qa.trigger("series:layoutlabels",this._model,this._api,{updatedSeries:[]})},e.prototype.appendData=function(t){if(this._disposed){this.id;return}var n=t.seriesIndex,i=this.getModel(),a=i.getSeriesByIndex(n);a.appendData(t),this._scheduler.unfinished=!0,this.getZr().wakeUp()},e.internalField=function(){Vh=function(h){var f=h._scheduler;f.restorePipelines(h._model),f.prepareStageTasks(),_A(h,!0),_A(h,!1),f.plan()},_A=function(h,f){for(var d=h._model,p=h._scheduler,g=f?h._componentsViews:h._chartsViews,v=f?h._componentsMap:h._chartsMap,m=h._zr,y=h._api,_=0;_<g.length;_++)g[_].__alive=!1;f?d.eachComponent(function(A,w){A!=="series"&&x(w)}):d.eachSeries(x);function x(A){var w=A.__requireNewView;A.__requireNewView=!1;var M="_ec_"+A.id+"_"+A.type,C=!w&&v[M];if(!C){var b=Fo(A.type),T=f?kn.getClass(b.main,b.sub):gn.getClass(b.sub);C=new T,C.init(d,y),v[M]=C,g.push(C),m.add(C.group)}A.__viewId=C.__id=M,C.__alive=!0,C.__model=A,C.group.__ecComponentInfo={mainType:A.mainType,index:A.componentIndex},!f&&p.prepareView(C,A,d,y)}for(var _=0;_<g.length;){var S=g[_];S.__alive?_++:(!f&&S.renderTask.dispose(),m.remove(S.group),S.dispose(d,y),g.splice(_,1),v[S.__id]===S&&delete v[S.__id],S.__id=S.group.__ecComponentInfo=null)}},ly=function(h,f,d,p,g){var v=h._model;if(v.setUpdatePayload(d),!p){k([].concat(h._componentsViews).concat(h._chartsViews),S);return}var m={};m[p+"Id"]=d[p+"Id"],m[p+"Index"]=d[p+"Index"],m[p+"Name"]=d[p+"Name"];var y={mainType:p,query:m};g&&(y.subType=g);var _=d.excludeSeriesId,x;_!=null&&(x=He(),k(nn(_),function(A){var w=fr(A,null);w!=null&&x.set(w,!0)})),v&&v.eachComponent(y,function(A){var w=x&&x.get(A.id)!=null;if(!w)if(WI(d))if(A instanceof En)d.type===Cc&&!d.notBlur&&!A.get(["emphasis","disabled"])&&Ule(A,d,h._api);else{var M=l2(A.mainType,A.componentIndex,d.name,h._api),C=M.focusSelf,b=M.dispatchers;d.type===Cc&&C&&!d.notBlur&&ST(A.mainType,A.componentIndex,h._api),b&&k(b,function(T){d.type===Cc?Ds(T):Is(T)})}else wT(d)&&A instanceof En&&(Hle(A,d,h._api),GI(A),la(h))},h),v&&v.eachComponent(y,function(A){var w=x&&x.get(A.id)!=null;w||S(h[p==="series"?"_chartsMap":"_componentsMap"][A.__viewId])},h);function S(A){A&&A.__alive&&A[f]&&A[f](A.__model,v,h._api,d)}},Js={prepareAndUpdate:function(h){Vh(this),Js.update.call(this,h,{optionChanged:h.newOption!=null})},update:function(h,f){var d=this._model,p=this._api,g=this._zr,v=this._coordSysMgr,m=this._scheduler;if(d){d.setUpdatePayload(h),m.restoreData(d,h),m.performSeriesTasks(d),v.create(d,p),m.performDataProcessorTasks(d,h),SA(this,d),v.update(d,p),t(d),m.performVisualTasks(d,h),wA(this,d,p,h,f);var y=d.get("backgroundColor")||"transparent",_=d.get("darkMode");g.setBackgroundColor(y),_!=null&&_!=="auto"&&g.setDarkMode(_),qa.trigger("afterupdate",d,p)}},updateTransform:function(h){var f=this,d=this._model,p=this._api;if(d){d.setUpdatePayload(h);var g=[];d.eachComponent(function(m,y){if(m!=="series"){var _=f.getViewOfComponentModel(y);if(_&&_.__alive)if(_.updateTransform){var x=_.updateTransform(y,d,p,h);x&&x.update&&g.push(_)}else g.push(_)}});var v=He();d.eachSeries(function(m){var y=f._chartsMap[m.__viewId];if(y.updateTransform){var _=y.updateTransform(m,d,p,h);_&&_.update&&v.set(m.uid,1)}else v.set(m.uid,1)}),t(d),this._scheduler.performVisualTasks(d,h,{setDirty:!0,dirtyMap:v}),uy(this,d,p,h,{},v),qa.trigger("afterupdate",d,p)}},updateView:function(h){var f=this._model;f&&(f.setUpdatePayload(h),gn.markUpdateMethod(h,"updateView"),t(f),this._scheduler.performVisualTasks(f,h,{setDirty:!0}),wA(this,f,this._api,h,{}),qa.trigger("afterupdate",f,this._api))},updateVisual:function(h){var f=this,d=this._model;d&&(d.setUpdatePayload(h),d.eachSeries(function(p){p.getData().clearAllVisual()}),gn.markUpdateMethod(h,"updateVisual"),t(d),this._scheduler.performVisualTasks(d,h,{visualType:"visual",setDirty:!0}),d.eachComponent(function(p,g){if(p!=="series"){var v=f.getViewOfComponentModel(g);v&&v.__alive&&v.updateVisual(g,d,f._api,h)}}),d.eachSeries(function(p){var g=f._chartsMap[p.__viewId];g.updateVisual(p,d,f._api,h)}),qa.trigger("afterupdate",d,this._api))},updateLayout:function(h){Js.update.call(this,h)}},xA=function(h,f,d,p){if(h._disposed){h.id;return}for(var g=h._model,v=h._coordSysMgr.getCoordinateSystems(),m,y=rv(g,d),_=0;_<v.length;_++){var x=v[_];if(x[f]&&(m=x[f](g,y,p))!=null)return m}},SA=function(h,f){var d=h._chartsMap,p=h._scheduler;f.eachSeries(function(g){p.updateStreamModes(g,d[g.__viewId])})},AA=function(h,f){var d=this,p=this.getModel(),g=h.type,v=h.escapeConnect,m=g_[g],y=m.actionInfo,_=(y.update||"update").split(":"),x=_.pop(),S=_[0]!=null&&Fo(_[0]);this[$r]=!0;var A=[h],w=!1;h.batch&&(w=!0,A=xe(h.batch,function(L){return L=Ke(pe({},L),h),L.batch=null,L}));var M=[],C,b=wT(h),T=WI(h);if(T&&rV(this._api),k(A,function(L){if(C=m.action(L,d._model,d._api),C=C||pe({},L),C.type=y.event||C.type,M.push(C),T){var E=e2(h),I=E.queryOptionMap,N=E.mainTypeSpecified,R=N?I.keys()[0]:"series";ly(d,x,L,R),la(d)}else b?(ly(d,x,L,"series"),la(d)):S&&ly(d,x,L,S.main,S.sub)}),x!=="none"&&!T&&!b&&!S)try{this[xi]?(Vh(this),Js.update.call(this,h),this[xi]=null):Js[x].call(this,h)}catch(L){throw this[$r]=!1,L}if(w?C={type:y.event||g,escapeConnect:v,batch:M}:C=M[0],this[$r]=!1,!f){var P=this._messageCenter;if(P.trigger(C.type,C),b){var D={type:"selectchanged",escapeConnect:v,selected:Wle(p),isFromClick:h.isFromClick||!1,fromAction:h.type,fromActionPayload:h};P.trigger(D.type,D)}}},np=function(h){for(var f=this._pendingActions;f.length;){var d=f.shift();AA.call(this,d,h)}},rp=function(h){!h&&this.trigger("updated")},ik=function(h,f){h.on("rendered",function(d){f.trigger("rendered",d),h.animation.isFinished()&&!f[xi]&&!f._scheduler.unfinished&&!f._pendingActions.length&&f.trigger("finished")})},ak=function(h,f){h.on("mouseover",function(d){var p=d.target,g=lc(p,$v);g&&(Vle(g,d,f._api),la(f))}).on("mouseout",function(d){var p=d.target,g=lc(p,$v);g&&(Gle(g,d,f._api),la(f))}).on("click",function(d){var p=d.target,g=lc(p,function(y){return at(y).dataIndex!=null},!0);if(g){var v=g.selected?"unselect":"select",m=at(g);f._api.dispatchAction({type:v,dataType:m.dataType,dataIndexInside:m.dataIndex,seriesIndex:m.seriesIndex,isFromClick:!0})}})};function t(h){h.clearColorPalette(),h.eachSeries(function(f){f.clearColorPalette()})}function n(h){var f=[],d=[],p=!1;if(h.eachComponent(function(y,_){var x=_.get("zlevel")||0,S=_.get("z")||0,A=_.getZLevelKey();p=p||!!A,(y==="series"?d:f).push({zlevel:x,z:S,idx:_.componentIndex,type:y,key:A})}),p){var g=f.concat(d),v,m;e0(g,function(y,_){return y.zlevel===_.zlevel?y.z-_.z:y.zlevel-_.zlevel}),k(g,function(y){var _=h.getComponent(y.type,y.idx),x=y.zlevel,S=y.key;v!=null&&(x=Math.max(v,x)),S?(x===v&&S!==m&&x++,m=S):m&&(x===v&&x++,m=""),v=x,_.setZLevel(x)})}}wA=function(h,f,d,p,g){n(f),ok(h,f,d,p,g),k(h._chartsViews,function(v){v.__alive=!1}),uy(h,f,d,p,g),k(h._chartsViews,function(v){v.__alive||v.remove(f,d)})},ok=function(h,f,d,p,g,v){k(v||h._componentsViews,function(m){var y=m.__model;u(y,m),m.render(y,f,d,p),s(y,m),c(y,m)})},uy=function(h,f,d,p,g,v){var m=h._scheduler;g=pe(g||{},{updatedSeries:f.getSeries()}),qa.trigger("series:beforeupdate",f,d,g);var y=!1;f.eachSeries(function(_){var x=h._chartsMap[_.__viewId];x.__alive=!0;var S=x.renderTask;m.updatePayload(S,p),u(_,x),v&&v.get(_.uid)&&S.dirty(),S.perform(m.getPerformArgs(S))&&(y=!0),x.group.silent=!!_.get("silent"),o(_,x),GI(_)}),m.unfinished=y||m.unfinished,qa.trigger("series:layoutlabels",f,d,g),qa.trigger("series:transition",f,d,g),f.eachSeries(function(_){var x=h._chartsMap[_.__viewId];s(_,x),c(_,x)}),a(h,f),qa.trigger("series:afterupdate",f,d,g)},la=function(h){h[mA]=!0,h.getZr().wakeUp()},lk=function(h){h[mA]&&(h.getZr().storage.traverse(function(f){Mf(f)||i(f)}),h[mA]=!1)};function i(h){for(var f=[],d=h.currentStates,p=0;p<d.length;p++){var g=d[p];g==="emphasis"||g==="blur"||g==="select"||f.push(g)}h.selected&&h.states.select&&f.push("select"),h.hoverState===w1&&h.states.emphasis?f.push("emphasis"):h.hoverState===Tg&&h.states.blur&&f.push("blur"),h.useStates(f)}function a(h,f){var d=h._zr,p=d.storage,g=0;p.traverse(function(v){v.isGroup||g++}),g>f.get("hoverLayerThreshold")&&!kt.node&&!kt.worker&&f.eachSeries(function(v){if(!v.preventUsingHoverLayer){var m=h._chartsMap[v.__viewId];m.__alive&&m.eachRendered(function(y){y.states.emphasis&&(y.states.emphasis.hoverLayer=!0)})}})}function o(h,f){var d=h.get("blendMode")||null;f.eachRendered(function(p){p.isGroup||(p.style.blend=d)})}function s(h,f){if(!h.preventAutoZ){var d=h.get("z")||0,p=h.get("zlevel")||0;f.eachRendered(function(g){return l(g,d,p,-1/0),!0})}}function l(h,f,d,p){var g=h.getTextContent(),v=h.getTextGuideLine(),m=h.isGroup;if(m)for(var y=h.childrenRef(),_=0;_<y.length;_++)p=Math.max(l(y[_],f,d,p),p);else h.z=f,h.zlevel=d,p=Math.max(h.z2,p);if(g&&(g.z=f,g.zlevel=d,isFinite(p)&&(g.z2=p+2)),v){var x=h.textGuideLineConfig;v.z=f,v.zlevel=d,isFinite(p)&&(v.z2=p+(x&&x.showAbove?1:-1))}return p}function u(h,f){f.eachRendered(function(d){if(!Mf(d)){var p=d.getTextContent(),g=d.getTextGuideLine();d.stateTransition&&(d.stateTransition=null),p&&p.stateTransition&&(p.stateTransition=null),g&&g.stateTransition&&(g.stateTransition=null),d.hasState()?(d.prevStates=d.currentStates,d.clearStates()):d.prevStates&&(d.prevStates=null)}})}function c(h,f){var d=h.getModel("stateAnimation"),p=h.isAnimationEnabled(),g=d.get("duration"),v=g>0?{duration:g,delay:d.get("delay"),easing:d.get("easing")}:null;f.eachRendered(function(m){if(m.states&&m.states.emphasis){if(Mf(m))return;if(m instanceof yt&&jle(m),m.__dirty){var y=m.prevStates;y&&m.useStates(y)}if(p){m.stateTransition=v;var _=m.getTextContent(),x=m.getTextGuideLine();_&&(_.stateTransition=v),x&&(x.stateTransition=v)}m.__dirty&&i(m)}})}sk=function(h){return new(function(f){ae(d,f);function d(){return f!==null&&f.apply(this,arguments)||this}return d.prototype.getCoordinateSystems=function(){return h._coordSysMgr.getCoordinateSystems()},d.prototype.getComponentByElement=function(p){for(;p;){var g=p.__ecComponentInfo;if(g!=null)return h._model.getComponent(g.mainType,g.index);p=p.parent}},d.prototype.enterEmphasis=function(p,g){Ds(p,g),la(h)},d.prototype.leaveEmphasis=function(p,g){Is(p,g),la(h)},d.prototype.enterBlur=function(p){J4(p),la(h)},d.prototype.leaveBlur=function(p){s2(p),la(h)},d.prototype.enterSelect=function(p){eV(p),la(h)},d.prototype.leaveSelect=function(p){tV(p),la(h)},d.prototype.getModel=function(){return h.getModel()},d.prototype.getViewOfComponentModel=function(p){return h.getViewOfComponentModel(p)},d.prototype.getViewOfSeriesModel=function(p){return h.getViewOfSeriesModel(p)},d}(iG))(h)},JG=function(h){function f(d,p){for(var g=0;g<d.length;g++){var v=d[g];v[yA]=p}}k(uv,function(d,p){h._messageCenter.on(p,function(g){if(uk[h.group]&&h[yA]!==rk){if(g&&g.escapeConnect)return;var v=h.makeActionFromEvent(g),m=[];k(cv,function(y){y!==h&&y.group===h.group&&m.push(y)}),f(m,rk),k(m,function(y){y[yA]!==kfe&&y.dispatchAction(v)}),f(m,Ofe)}})})}}(),e}(Ba),N2=eH.prototype;N2.on=qG("on");N2.off=qG("off");N2.one=function(r,e,t){var n=this;function i(){for(var a=[],o=0;o<arguments.length;o++)a[o]=arguments[o];e&&e.apply&&e.apply(this,a),n.off(r,i)}this.on.call(this,r,i,t)};var Ffe=["click","dblclick","mouseover","mouseout","mousemove","mousedown","mouseup","globalout","contextmenu"];var g_={},uv={},zT=[],UT=[],m_=[],tH={},VT={},cv={},uk={},Bfe=+new Date-0,k2="_echarts_instance_";function zfe(r,e,t){var n=!(t&&t.ssr);if(n){var i=Ufe(r);if(i)return i}var a=new eH(r,e,t);return a.id="ec_"+Bfe++,cv[a.id]=a,n&&D4(r,k2,a.id),JG(a),qa.trigger("afterinit",a),a}function Ufe(r){return cv[kse(r,k2)]}function nH(r,e){tH[r]=e}function rH(r){pt(UT,r)<0&&UT.push(r)}function iH(r,e){F2(zT,r,e,Cfe)}function Vfe(r){O2("afterinit",r)}function Gfe(r){O2("afterupdate",r)}function O2(r,e){qa.on(r,e)}function es(r,e,t){qe(e)&&(t=e,e="");var n=Qe(r)?r.type:[r,r={event:e}][0];r.event=(r.event||n).toLowerCase(),e=r.event,!uv[e]&&(gi(nk.test(n)&&nk.test(e)),g_[n]||(g_[n]={action:t,actionInfo:r}),uv[e]=n)}function Hfe(r,e){Eg.register(r,e)}function Wfe(r,e){F2(m_,r,e,$G,"layout")}function eh(r,e){F2(m_,r,e,XG,"visual")}var ck=[];function F2(r,e,t,n,i){if((qe(e)||Qe(e))&&(t=e,e=n),!(pt(ck,t)>=0)){ck.push(t);var a=NG.wrapStageHandler(t,i);a.__prio=e,a.__raw=t,r.push(a)}}function aH(r,e){VT[r]=e}function $fe(r,e,t){var n=Afe("registerMap");n&&n(r,e,t)}var Xfe=ehe;eh(I2,Mhe);eh(V1,Che);eh(V1,Ehe);eh(I2,Hhe);eh(V1,Whe);eh(YG,_fe);rH(oG);iH(Tfe,Nce);aH("default",Lhe);es({type:Cc,event:Cc,update:Cc},qn);es({type:o0,event:o0,update:o0},qn);es({type:iv,event:iv,update:iv},qn);es({type:s0,event:s0,update:s0},qn);es({type:av,event:av,update:av},qn);nH("light",Uhe);nH("dark",Vhe);var hk=[],Yfe={registerPreprocessor:rH,registerProcessor:iH,registerPostInit:Vfe,registerPostUpdate:Gfe,registerUpdateLifecycle:O2,registerAction:es,registerCoordinateSystem:Hfe,registerLayout:Wfe,registerVisual:eh,registerTransform:Xfe,registerLoading:aH,registerMap:$fe,registerImpl:Sfe,PRIORITY:Nfe,ComponentModel:Nt,ComponentView:kn,SeriesModel:En,ChartView:gn,registerComponentModel:function(r){Nt.registerClass(r)},registerComponentView:function(r){kn.registerClass(r)},registerSeriesModel:function(r){En.registerClass(r)},registerChartView:function(r){gn.registerClass(r)},registerSubTypeDefaulter:function(r,e){Nt.registerSubTypeDefaulter(r,e)},registerPainter:function(r,e){dse(r,e)}};function gt(r){if(_e(r)){k(r,function(e){gt(e)});return}pt(hk,r)>=0||(hk.push(r),qe(r)&&(r={install:r}),r.install(Yfe))}function ip(r){return r==null?0:r.length||1}function fk(r){return r}var qfe=function(){function r(e,t,n,i,a,o){this._old=e,this._new=t,this._oldKeyGetter=n||fk,this._newKeyGetter=i||fk,this.context=a,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={},i=new Array(e.length),a=new Array(t.length);this._initIndexMap(e,null,i,"_oldKeyGetter"),this._initIndexMap(t,n,a,"_newKeyGetter");for(var o=0;o<e.length;o++){var s=i[o],l=n[s],u=ip(l);if(u>1){var c=l.shift();l.length===1&&(n[s]=l[0]),this._update&&this._update(c,o)}else u===1?(n[s]=null,this._update&&this._update(l,o)):this._remove&&this._remove(o)}this._performRestAdd(a,n)},r.prototype._executeMultiple=function(){var e=this._old,t=this._new,n={},i={},a=[],o=[];this._initIndexMap(e,n,a,"_oldKeyGetter"),this._initIndexMap(t,i,o,"_newKeyGetter");for(var s=0;s<a.length;s++){var l=a[s],u=n[l],c=i[l],h=ip(u),f=ip(c);if(h>1&&f===1)this._updateManyToOne&&this._updateManyToOne(c,u),i[l]=null;else if(h===1&&f>1)this._updateOneToMany&&this._updateOneToMany(c,u),i[l]=null;else if(h===1&&f===1)this._update&&this._update(c,u),i[l]=null;else if(h>1&&f>1)this._updateManyToMany&&this._updateManyToMany(c,u),i[l]=null;else if(h>1)for(var d=0;d<h;d++)this._remove&&this._remove(u[d]);else this._remove&&this._remove(u)}this._performRestAdd(o,i)},r.prototype._performRestAdd=function(e,t){for(var n=0;n<e.length;n++){var i=e[n],a=t[i],o=ip(a);if(o>1)for(var s=0;s<o;s++)this._add&&this._add(a[s]);else o===1&&this._add&&this._add(a);t[i]=null}},r.prototype._initIndexMap=function(e,t,n,i){for(var a=this._diffModeMultiple,o=0;o<e.length;o++){var s="_ec_"+this[i](e[o],o);if(a||(n[o]=s),!!t){var l=t[s],u=ip(l);u===0?(t[s]=o,a&&n.push(s)):u===1?t[s]=[l,o]:l.push(o)}}},r}();const Ns=qfe;var jfe=function(){function r(e,t){this._encode=e,this._schema=t}return r.prototype.get=function(){return{fullDimensions:this._getFullDimensionNames(),encode:this._encode}},r.prototype._getFullDimensionNames=function(){return this._cachedDimNames||(this._cachedDimNames=this._schema?this._schema.makeOutputDimensionNames():[]),this._cachedDimNames},r}();function Kfe(r,e){var t={},n=t.encode={},i=He(),a=[],o=[],s={};k(r.dimensions,function(f){var d=r.getDimensionInfo(f),p=d.coordDim;if(p){var g=d.coordDimIndex;bA(n,p)[g]=f,d.isExtraCoord||(i.set(p,1),Zfe(d.type)&&(a[0]=f),bA(s,p)[g]=r.getDimensionIndex(d.name)),d.defaultTooltip&&o.push(f)}jV.each(function(v,m){var y=bA(n,m),_=d.otherDims[m];_!=null&&_!==!1&&(y[_]=d.name)})});var l=[],u={};i.each(function(f,d){var p=n[d];u[d]=p[0],l=l.concat(p)}),t.dataDimsOnCoord=l,t.dataDimIndicesOnCoord=xe(l,function(f){return r.getDimensionInfo(f).storeDimIndex}),t.encodeFirstDimNotExtra=u;var c=n.label;c&&c.length&&(a=c.slice());var h=n.tooltip;return h&&h.length?o=h.slice():o.length||(o=a.slice()),n.defaultedLabel=a,n.defaultedTooltip=o,t.userOutput=new jfe(s,e),t}function bA(r,e){return r.hasOwnProperty(e)||(r[e]=[]),r[e]}function y_(r){return r==="category"?"ordinal":r==="time"?"time":"float"}function Zfe(r){return!(r==="ordinal"||r==="time")}var Qfe=function(){function r(e){this.otherDims={},e!=null&&pe(this,e)}return r}();const f0=Qfe;var Jfe=Pt(),ede={float:"f",int:"i",ordinal:"o",number:"n",time:"t"},oH=function(){function r(e){this.dimensions=e.dimensions,this._dimOmitted=e.dimensionOmitted,this.source=e.source,this._fullDimCount=e.fullDimensionCount,this._updateDimOmitted(e.dimensionOmitted)}return r.prototype.isDimensionOmitted=function(){return this._dimOmitted},r.prototype._updateDimOmitted=function(e){this._dimOmitted=e,e&&(this._dimNameMap||(this._dimNameMap=uH(this.source)))},r.prototype.getSourceDimensionIndex=function(e){return ot(this._dimNameMap.get(e),-1)},r.prototype.getSourceDimension=function(e){var t=this.source.dimensionsDefine;if(t)return t[e]},r.prototype.makeStoreSchema=function(){for(var e=this._fullDimCount,t=lG(this.source),n=!cH(e),i="",a=[],o=0,s=0;o<e;o++){var l=void 0,u=void 0,c=void 0,h=this.dimensions[s];if(h&&h.storeDimIndex===o)l=t?h.name:null,u=h.type,c=h.ordinalMeta,s++;else{var f=this.getSourceDimension(o);f&&(l=t?f.name:null,u=f.type)}a.push({property:l,type:u,ordinalMeta:c}),t&&l!=null&&(!h||!h.isCalculationCoord)&&(i+=n?l.replace(/\`/g,"`1").replace(/\$/g,"`2"):l),i+="$",i+=ede[u]||"f",c&&(i+=c.uid),i+="$"}var d=this.source,p=[d.seriesLayoutBy,d.startIndex,i].join("$$");return{dimensions:a,hash:p}},r.prototype.makeOutputDimensionNames=function(){for(var e=[],t=0,n=0;t<this._fullDimCount;t++){var i=void 0,a=this.dimensions[n];if(a&&a.storeDimIndex===t)a.isCalculationCoord||(i=a.name),n++;else{var o=this.getSourceDimension(t);o&&(i=o.name)}e.push(i)}return e},r.prototype.appendCalculationDimension=function(e){this.dimensions.push(e),e.isCalculationCoord=!0,this._fullDimCount++,this._updateDimOmitted(!0)},r}();function sH(r){return r instanceof oH}function lH(r){for(var e=He(),t=0;t<(r||[]).length;t++){var n=r[t],i=Qe(n)?n.name:n;i!=null&&e.get(i)==null&&e.set(i,t)}return e}function uH(r){var e=Jfe(r);return e.dimNameMap||(e.dimNameMap=lH(r.dimensionsDefine))}function cH(r){return r>30}var ap=Qe,el=xe,tde=typeof Int32Array=="undefined"?Array:Int32Array,nde="e\0\0",dk=-1,rde=["hasItemOption","_nameList","_idList","_invertedIndicesMap","_dimSummary","userOutput","_rawData","_dimValueGetter","_nameDimIdx","_idDimIdx","_nameRepeatCount"],ide=["_approximateExtent"],pk,cy,op,sp,TA,lp,MA,ade=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,i=!1;sH(e)?(n=e.dimensions,this._dimOmitted=e.isDimensionOmitted(),this._schema=e):(i=!0,n=e),n=n||["x","y"];for(var a={},o=[],s={},l=!1,u={},c=0;c<n.length;c++){var h=n[c],f=ke(h)?new f0({name:h}):h instanceof f0?h:new f0(h),d=f.name;f.type=f.type||"float",f.coordDim||(f.coordDim=d,f.coordDimIndex=0);var p=f.otherDims=f.otherDims||{};o.push(d),a[d]=f,u[d]!=null&&(l=!0),f.createInvertedIndices&&(s[d]=[]),p.itemName===0&&(this._nameDimIdx=c),p.itemId===0&&(this._idDimIdx=c),i&&(f.storeDimIndex=c)}if(this.dimensions=o,this._dimInfos=a,this._initGetDimensionInfo(l),this.hostModel=t,this._invertedIndicesMap=s,this._dimOmitted){var g=this._dimIdxToName=He();k(o,function(v){g.set(a[v].storeDimIndex,v)})}}return r.prototype.getDimension=function(e){var t=this._recognizeDimIndex(e);if(t==null)return e;if(t=e,!this._dimOmitted)return this.dimensions[t];var n=this._dimIdxToName.get(t);if(n!=null)return n;var i=this._schema.getSourceDimension(t);if(i)return i.name},r.prototype.getDimensionIndex=function(e){var t=this._recognizeDimIndex(e);if(t!=null)return t;if(e==null)return-1;var n=this._getDimInfo(e);return n?n.storeDimIndex:this._dimOmitted?this._schema.getSourceDimensionIndex(e):-1},r.prototype._recognizeDimIndex=function(e){if(Ft(e)||e!=null&&!isNaN(e)&&!this._getDimInfo(e)&&(!this._dimOmitted||this._schema.getSourceDimensionIndex(e)<0))return+e},r.prototype._getStoreDimIndex=function(e){var t=this.getDimensionIndex(e);return t},r.prototype.getDimensionInfo=function(e){return this._getDimInfo(this.getDimension(e))},r.prototype._initGetDimensionInfo=function(e){var t=this._dimInfos;this._getDimInfo=e?function(n){return t.hasOwnProperty(n)?t[n]:void 0}:function(n){return t[n]}},r.prototype.getDimensionsOnCoord=function(){return this._dimSummary.dataDimsOnCoord.slice()},r.prototype.mapDimension=function(e,t){var n=this._dimSummary;if(t==null)return n.encodeFirstDimNotExtra[e];var i=n.encode[e];return i?i[t]:null},r.prototype.mapDimensionsAll=function(e){var t=this._dimSummary,n=t.encode[e];return(n||[]).slice()},r.prototype.getStore=function(){return this._store},r.prototype.initData=function(e,t,n){var i=this,a;if(e instanceof DT&&(a=e),!a){var o=this.dimensions,s=T2(e)||ii(e)?new uG(e,o.length):e;a=new DT;var l=el(o,function(u){return{type:i._dimInfos[u].type,property:u}});a.initData(s,l,n)}this._store=a,this._nameList=(t||[]).slice(),this._idList=[],this._nameRepeatCount={},this._doInit(0,a.count()),this._dimSummary=Kfe(this,this._schema),this.userOutput=this._dimSummary.userOutput},r.prototype.appendData=function(e){var t=this._store.appendData(e);this._doInit(t[0],t[1])},r.prototype.appendValues=function(e,t){var n=this._store.appendValues(e,t&&t.length),i=n.start,a=n.end,o=this._shouldMakeIdFromName();if(this._updateOrdinalMeta(),t)for(var s=i;s<a;s++){var l=s-i;this._nameList[s]=t[l],o&&MA(this,s)}},r.prototype._updateOrdinalMeta=function(){for(var e=this._store,t=this.dimensions,n=0;n<t.length;n++){var i=this._dimInfos[t[n]];i.ordinalMeta&&e.collectOrdinalMeta(i.storeDimIndex,i.ordinalMeta)}},r.prototype._shouldMakeIdFromName=function(){var e=this._store.getProvider();return this._idDimIdx==null&&e.getSource().sourceFormat!==Vl&&!e.fillStorage},r.prototype._doInit=function(e,t){if(!(e>=t)){var n=this._store,i=n.getProvider();this._updateOrdinalMeta();var a=this._nameList,o=this._idList,s=i.getSource().sourceFormat,l=s===za;if(l&&!i.pure)for(var u=[],c=e;c<t;c++){var h=i.getItem(c,u);if(!this.hasItemOption&&Ase(h)&&(this.hasItemOption=!0),h){var f=h.name;a[c]==null&&f!=null&&(a[c]=fr(f,null));var d=h.id;o[c]==null&&d!=null&&(o[c]=fr(d,null))}}if(this._shouldMakeIdFromName())for(var c=e;c<t;c++)MA(this,c);pk(this)}},r.prototype.getApproximateExtent=function(e){return this._approximateExtent[e]||this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.setApproximateExtent=function(e,t){t=this.getDimension(t),this._approximateExtent[t]=e.slice()},r.prototype.getCalculationInfo=function(e){return this._calculationInfo[e]},r.prototype.setCalculationInfo=function(e,t){ap(e)?pe(this._calculationInfo,e):this._calculationInfo[e]=t},r.prototype.getName=function(e){var t=this.getRawIndex(e),n=this._nameList[t];return n==null&&this._nameDimIdx!=null&&(n=op(this,this._nameDimIdx,t)),n==null&&(n=""),n},r.prototype._getCategory=function(e,t){var n=this._store.get(e,t),i=this._store.getOrdinalMeta(e);return i?i.categories[n]:n},r.prototype.getId=function(e){return cy(this,this.getRawIndex(e))},r.prototype.count=function(){return this._store.count()},r.prototype.get=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.get(i.storeDimIndex,t)},r.prototype.getByRawIndex=function(e,t){var n=this._store,i=this._dimInfos[e];if(i)return n.getByRawIndex(i.storeDimIndex,t)},r.prototype.getIndices=function(){return this._store.getIndices()},r.prototype.getDataExtent=function(e){return this._store.getDataExtent(this._getStoreDimIndex(e))},r.prototype.getSum=function(e){return this._store.getSum(this._getStoreDimIndex(e))},r.prototype.getMedian=function(e){return this._store.getMedian(this._getStoreDimIndex(e))},r.prototype.getValues=function(e,t){var n=this,i=this._store;return _e(e)?i.getValues(el(e,function(a){return n._getStoreDimIndex(a)}),t):i.getValues(e)},r.prototype.hasValue=function(e){for(var t=this._dimSummary.dataDimIndicesOnCoord,n=0,i=t.length;n<i;n++)if(isNaN(this._store.get(t[n],e)))return!1;return!0},r.prototype.indexOfName=function(e){for(var t=0,n=this._store.count();t<n;t++)if(this.getName(t)===e)return t;return-1},r.prototype.getRawIndex=function(e){return this._store.getRawIndex(e)},r.prototype.indexOfRawIndex=function(e){return this._store.indexOfRawIndex(e)},r.prototype.rawIndexOf=function(e,t){var n=e&&this._invertedIndicesMap[e],i=n&&n[t];return i==null||isNaN(i)?dk:i},r.prototype.indicesOfNearest=function(e,t,n){return this._store.indicesOfNearest(this._getStoreDimIndex(e),t,n)},r.prototype.each=function(e,t,n){qe(e)&&(n=t,t=e,e=[]);var i=n||this,a=el(sp(e),this._getStoreDimIndex,this);this._store.each(a,i?Fe(t,i):t)},r.prototype.filterSelf=function(e,t,n){qe(e)&&(n=t,t=e,e=[]);var i=n||this,a=el(sp(e),this._getStoreDimIndex,this);return this._store=this._store.filter(a,i?Fe(t,i):t),this},r.prototype.selectRange=function(e){var t=this,n={},i=wt(e);return k(i,function(a){var o=t._getStoreDimIndex(a);n[o]=e[a]}),this._store=this._store.selectRange(n),this},r.prototype.mapArray=function(e,t,n){qe(e)&&(n=t,t=e,e=[]),n=n||this;var i=[];return this.each(e,function(){i.push(t&&t.apply(this,arguments))},n),i},r.prototype.map=function(e,t,n,i){var a=n||i||this,o=el(sp(e),this._getStoreDimIndex,this),s=lp(this);return s._store=this._store.map(o,a?Fe(t,a):t),s},r.prototype.modify=function(e,t,n,i){var a=n||i||this,o=el(sp(e),this._getStoreDimIndex,this);this._store.modify(o,a?Fe(t,a):t)},r.prototype.downSample=function(e,t,n,i){var a=lp(this);return a._store=this._store.downSample(this._getStoreDimIndex(e),t,n,i),a},r.prototype.minmaxDownSample=function(e,t){var n=lp(this);return n._store=this._store.minmaxDownSample(this._getStoreDimIndex(e),t),n},r.prototype.lttbDownSample=function(e,t){var n=lp(this);return n._store=this._store.lttbDownSample(this._getStoreDimIndex(e),t),n},r.prototype.getRawDataItem=function(e){return this._store.getRawDataItem(e)},r.prototype.getItemModel=function(e){var t=this.hostModel,n=this.getRawDataItem(e);return new vn(n,t,t&&t.ecModel)},r.prototype.diff=function(e){var t=this;return new Ns(e?e.getStore().getIndices():[],this.getStore().getIndices(),function(n){return cy(e,n)},function(n){return cy(t,n)})},r.prototype.getVisual=function(e){var t=this._visual;return t&&t[e]},r.prototype.setVisual=function(e,t){this._visual=this._visual||{},ap(e)?pe(this._visual,e):this._visual[e]=t},r.prototype.getItemVisual=function(e,t){var n=this._itemVisuals[e],i=n&&n[t];return i==null?this.getVisual(t):i},r.prototype.hasItemVisual=function(){return this._itemVisuals.length>0},r.prototype.ensureUniqueItemVisual=function(e,t){var n=this._itemVisuals,i=n[e];i||(i=n[e]={});var a=i[t];return a==null&&(a=this.getVisual(t),_e(a)?a=a.slice():ap(a)&&(a=pe({},a)),i[t]=a),a},r.prototype.setItemVisual=function(e,t,n){var i=this._itemVisuals[e]||{};this._itemVisuals[e]=i,ap(t)?pe(i,t):i[t]=n},r.prototype.clearAllVisual=function(){this._visual={},this._itemVisuals=[]},r.prototype.setLayout=function(e,t){ap(e)?pe(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?pe(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;_T(n,this.dataType,e,t),this._graphicEls[e]=t},r.prototype.getItemGraphicEl=function(e){return this._graphicEls[e]},r.prototype.eachItemGraphicEl=function(e,t){k(this._graphicEls,function(n,i){n&&e&&e.call(t,n,i)})},r.prototype.cloneShallow=function(e){return e||(e=new r(this._schema?this._schema:el(this.dimensions,this._getDimInfo,this),this.hostModel)),TA(e,this),e._store=this._store,e},r.prototype.wrapMethod=function(e,t){var n=this[e];qe(n)&&(this.__wrappedMethods=this.__wrappedMethods||[],this.__wrappedMethods.push(e),this[e]=function(){var i=n.apply(this,arguments);return t.apply(this,[i].concat(HC(arguments)))})},r.internalField=function(){pk=function(e){var t=e._invertedIndicesMap;k(t,function(n,i){var a=e._dimInfos[i],o=a.ordinalMeta,s=e._store;if(o){n=t[i]=new tde(o.categories.length);for(var l=0;l<n.length;l++)n[l]=dk;for(var l=0;l<s.count();l++)n[s.get(a.storeDimIndex,l)]=l}})},op=function(e,t,n){return fr(e._getCategory(t,n),null)},cy=function(e,t){var n=e._idList[t];return n==null&&e._idDimIdx!=null&&(n=op(e,e._idDimIdx,t)),n==null&&(n=nde+t),n},sp=function(e){return _e(e)||(e=e!=null?[e]:[]),e},lp=function(e){var t=new r(e._schema?e._schema:el(e.dimensions,e._getDimInfo,e),e.hostModel);return TA(t,e),t},TA=function(e,t){k(rde.concat(t.__wrappedMethods||[]),function(n){t.hasOwnProperty(n)&&(e[n]=t[n])}),e.__wrappedMethods=t.__wrappedMethods,k(ide,function(n){e[n]=Je(t[n])}),e._calculationInfo=pe({},t._calculationInfo)},MA=function(e,t){var n=e._nameList,i=e._idList,a=e._nameDimIdx,o=e._idDimIdx,s=n[t],l=i[t];if(s==null&&a!=null&&(n[t]=s=op(e,a,t)),l==null&&o!=null&&(i[t]=l=op(e,o,t)),l==null&&s!=null){var u=e._nameRepeatCount,c=u[s]=(u[s]||0)+1;l=s,c>1&&(l+="__ec__"+c),i[t]=l}}}(),r}();const vi=ade;function Pg(r,e){T2(r)||(r=M2(r)),e=e||{};var t=e.coordDimensions||[],n=e.dimensionsDefine||r.dimensionsDefine||[],i=He(),a=[],o=sde(r,t,n,e.dimensionsCount),s=e.canOmitUnusedDimensions&&cH(o),l=n===r.dimensionsDefine,u=l?uH(r):lH(n),c=e.encodeDefine;!c&&e.encodeDefaulter&&(c=e.encodeDefaulter(r,o));for(var h=He(c),f=new mG(o),d=0;d<f.length;d++)f[d]=-1;function p(C){var b=f[C];if(b<0){var T=n[C],P=Qe(T)?T:{name:T},D=new f0,L=P.name;L!=null&&u.get(L)!=null&&(D.name=D.displayName=L),P.type!=null&&(D.type=P.type),P.displayName!=null&&(D.displayName=P.displayName);var E=a.length;return f[C]=E,D.storeDimIndex=C,a.push(D),D}return a[b]}if(!s)for(var d=0;d<o;d++)p(d);h.each(function(C,b){var T=nn(C).slice();if(T.length===1&&!ke(T[0])&&T[0]<0){h.set(b,!1);return}var P=h.set(b,[]);k(T,function(D,L){var E=ke(D)?u.get(D):D;E!=null&&E<o&&(P[L]=E,v(p(E),b,L))})});var g=0;k(t,function(C){var b,T,P,D;if(ke(C))b=C,D={};else{D=C,b=D.name;var L=D.ordinalMeta;D.ordinalMeta=null,D=pe({},D),D.ordinalMeta=L,T=D.dimsDef,P=D.otherDims,D.name=D.coordDim=D.coordDimIndex=D.dimsDef=D.otherDims=null}var E=h.get(b);if(E!==!1){if(E=nn(E),!E.length)for(var I=0;I<(T&&T.length||1);I++){for(;g<o&&p(g).coordDim!=null;)g++;g<o&&E.push(g++)}k(E,function(N,R){var F=p(N);if(l&&D.type!=null&&(F.type=D.type),v(Ke(F,D),b,R),F.name==null&&T){var O=T[R];!Qe(O)&&(O={name:O}),F.name=F.displayName=O.name,F.defaultTooltip=O.defaultTooltip}P&&Ke(F.otherDims,P)})}});function v(C,b,T){jV.get(b)!=null?C.otherDims[b]=T:(C.coordDim=b,C.coordDimIndex=T,i.set(b,!0))}var m=e.generateCoord,y=e.generateCoordCount,_=y!=null;y=m?y||1:0;var x=m||"value";function S(C){C.name==null&&(C.name=C.coordDim)}if(s)k(a,function(C){S(C)}),a.sort(function(C,b){return C.storeDimIndex-b.storeDimIndex});else for(var A=0;A<o;A++){var w=p(A),M=w.coordDim;M==null&&(w.coordDim=lde(x,i,_),w.coordDimIndex=0,(!m||y<=0)&&(w.isExtraCoord=!0),y--),S(w),w.type==null&&(JV(r,A)===Nr.Must||w.isExtraCoord&&(w.otherDims.itemName!=null||w.otherDims.seriesName!=null))&&(w.type="ordinal")}return ode(a),new oH({source:r,dimensions:a,fullDimensionCount:o,dimensionOmitted:s})}function ode(r){for(var e=He(),t=0;t<r.length;t++){var n=r[t],i=n.name,a=e.get(i)||0;a>0&&(n.name=i+(a-1)),a++,e.set(i,a)}}function sde(r,e,t,n){var i=Math.max(r.dimensionsDetectedCount||1,e.length,t.length,n||0);return k(e,function(a){var o;Qe(a)&&(o=a.dimsDef)&&(i=Math.max(i,o.length))}),i}function lde(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 ude=function(){function r(e){this.coordSysDims=[],this.axisMap=He(),this.categoryAxisMap=He(),this.coordSysName=e}return r}();function cde(r){var e=r.get("coordinateSystem"),t=new ude(e),n=hde[e];if(n)return n(r,t,t.axisMap,t.categoryAxisMap),t}var hde={cartesian2d:function(r,e,t,n){var i=r.getReferringComponents("xAxis",nr).models[0],a=r.getReferringComponents("yAxis",nr).models[0];e.coordSysDims=["x","y"],t.set("x",i),t.set("y",a),Gh(i)&&(n.set("x",i),e.firstCategoryDimIndex=0),Gh(a)&&(n.set("y",a),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=1))},singleAxis:function(r,e,t,n){var i=r.getReferringComponents("singleAxis",nr).models[0];e.coordSysDims=["single"],t.set("single",i),Gh(i)&&(n.set("single",i),e.firstCategoryDimIndex=0)},polar:function(r,e,t,n){var i=r.getReferringComponents("polar",nr).models[0],a=i.findAxisModel("radiusAxis"),o=i.findAxisModel("angleAxis");e.coordSysDims=["radius","angle"],t.set("radius",a),t.set("angle",o),Gh(a)&&(n.set("radius",a),e.firstCategoryDimIndex=0),Gh(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 i=r.ecModel,a=i.getComponent("parallel",r.get("parallelIndex")),o=e.coordSysDims=a.dimensions.slice();k(a.parallelAxisIndex,function(s,l){var u=i.getComponent("parallelAxis",s),c=o[l];t.set(c,u),Gh(u)&&(n.set(c,u),e.firstCategoryDimIndex==null&&(e.firstCategoryDimIndex=l))})}};function Gh(r){return r.get("type")==="category"}function fde(r,e,t){t=t||{};var n=t.byIndex,i=t.stackedCoordDimension,a,o,s;dde(e)?a=e:(o=e.schema,a=o.dimensions,s=e.store);var l=!!(r&&r.get("stack")),u,c,h,f;if(k(a,function(y,_){ke(y)&&(a[_]=y={name:y}),l&&!y.isExtraCoord&&(!n&&!u&&y.ordinalMeta&&(u=y),!c&&y.type!=="ordinal"&&y.type!=="time"&&(!i||i===y.coordDim)&&(c=y))}),c&&!n&&!u&&(n=!0),c){h="__\0ecstackresult_"+r.id,f="__\0ecstackedover_"+r.id,u&&(u.createInvertedIndices=!0);var d=c.coordDim,p=c.type,g=0;k(a,function(y){y.coordDim===d&&g++});var v={name:h,coordDim:d,coordDimIndex:g,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length},m={name:f,coordDim:f,coordDimIndex:g+1,type:p,isExtraCoord:!0,isCalculationCoord:!0,storeDimIndex:a.length+1};o?(s&&(v.storeDimIndex=s.ensureCalculationDimension(f,p),m.storeDimIndex=s.ensureCalculationDimension(h,p)),o.appendCalculationDimension(v),o.appendCalculationDimension(m)):(a.push(v),a.push(m))}return{stackedDimension:c&&c.name,stackedByDimension:u&&u.name,isStackedByIndex:n,stackedOverDimension:f,stackResultDimension:h}}function dde(r){return!sH(r.schema)}function Ql(r,e){return!!e&&e===r.getCalculationInfo("stackedDimension")}function hH(r,e){return Ql(r,e)?r.getCalculationInfo("stackResultDimension"):e}function pde(r,e){var t=r.get("coordinateSystem"),n=Eg.get(t),i;return e&&e.coordSysDims&&(i=xe(e.coordSysDims,function(a){var o={name:a},s=e.axisMap.get(a);if(s){var l=s.get("type");o.type=y_(l)}return o})),i||(i=n&&(n.getDimensionsInfo?n.getDimensionsInfo():n.dimensions.slice())||["x","y"]),i}function vde(r,e,t){var n,i;return t&&k(r,function(a,o){var s=a.coordDim,l=t.categoryAxisMap.get(s);l&&(n==null&&(n=o),a.ordinalMeta=l.getOrdinalMeta(),e&&(a.createInvertedIndices=!0)),a.otherDims.itemName!=null&&(i=!0)}),!i&&n!=null&&(r[n].otherDims.itemName=0),n}function Us(r,e,t){t=t||{};var n=e.getSourceManager(),i,a=!1;r?(a=!0,i=M2(r)):(i=n.getSource(),a=i.sourceFormat===za);var o=cde(e),s=pde(e,o),l=t.useEncodeDefaulter,u=qe(l)?l:l?ut(QV,s,e):null,c={coordDimensions:s,generateCoord:t.generateCoord,encodeDefine:e.getEncode(),encodeDefaulter:u,canOmitUnusedDimensions:!a},h=Pg(i,c),f=vde(h.dimensions,t.createInvertedIndices,o),d=a?null:n.getSharedDataStore(h),p=fde(e,{schema:h,store:d}),g=new vi(h,e);g.setCalculationInfo(p);var v=f!=null&&gde(i)?function(m,y,_,x){return x===f?_:this.defaultDimValueGetter(m,y,_,x)}:null;return g.hasItemOption=!1,g.initData(a?i:d,null,v),g}function gde(r){if(r.sourceFormat===za){var e=mde(r.data||[]);return!_e(gd(e))}}function mde(r){for(var e=0;e<r.length&&r[e]==null;)e++;return r[e]}var fH=function(){function r(e){this._setting=e||{},this._extent=[1/0,-1/0]}return r.prototype.getSetting=function(e){return this._setting[e]},r.prototype.unionExtent=function(e){var t=this._extent;e[0]<t[0]&&(t[0]=e[0]),e[1]>t[1]&&(t[1]=e[1])},r.prototype.unionExtentFromData=function(e,t){this.unionExtent(e.getApproximateExtent(t))},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.setExtent=function(e,t){var n=this._extent;isNaN(e)||(n[0]=e),isNaN(t)||(n[1]=t)},r.prototype.isInExtentRange=function(e){return this._extent[0]<=e&&this._extent[1]>=e},r.prototype.isBlank=function(){return this._isBlank},r.prototype.setBlank=function(e){this._isBlank=e},r}();_1(fH);const Vs=fH;var yde=0,_de=function(){function r(e){this.categories=e.categories||[],this._needCollect=e.needCollect,this._deduplication=e.deduplication,this.uid=++yde}return r.createByAxisModel=function(e){var t=e.option,n=t.data,i=n&&xe(n,xde);return new r({categories:i,needCollect:!i,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(!ke(e)&&!n)return e;if(n&&!this._deduplication)return t=this.categories.length,this.categories[t]=e,t;var i=this._getOrCreateMap();return t=i.get(e),t==null&&(n?(t=this.categories.length,this.categories[t]=e,i.set(e,t)):t=NaN),t},r.prototype._getOrCreateMap=function(){return this._map||(this._map=He(this.categories))},r}();function xde(r){return Qe(r)&&r.value!=null?r.value:r+""}const GT=_de;function HT(r){return r.type==="interval"||r.type==="log"}function Sde(r,e,t,n){var i={},a=r[1]-r[0],o=i.interval=b4(a/e,!0);t!=null&&o<t&&(o=i.interval=t),n!=null&&o>n&&(o=i.interval=n);var s=i.intervalPrecision=dH(o),l=i.niceTickExtent=[Vn(Math.ceil(r[0]/o)*o,s),Vn(Math.floor(r[1]/o)*o,s)];return Ade(l,r),i}function CA(r){var e=Math.pow(10,QC(r)),t=r/e;return t?t===2?t=3:t===3?t=5:t*=2:t=1,Vn(t*e)}function dH(r){return Oo(r)+2}function vk(r,e,t){r[e]=Math.max(Math.min(r[e],t[1]),t[0])}function Ade(r,e){!isFinite(r[0])&&(r[0]=e[0]),!isFinite(r[1])&&(r[1]=e[1]),vk(r,0,e),vk(r,1,e),r[0]>r[1]&&(r[0]=r[1])}function G1(r,e){return r>=e[0]&&r<=e[1]}function H1(r,e){return e[1]===e[0]?.5:(r-e[0])/(e[1]-e[0])}function W1(r,e){return r*(e[1]-e[0])+e[0]}var pH=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;n.type="ordinal";var i=n.getSetting("ordinalMeta");return i||(i=new GT({})),_e(i)&&(i=new GT({categories:xe(i,function(a){return Qe(a)?a.value:a})})),n._ordinalMeta=i,n._extent=n.getSetting("extent")||[0,i.categories.length-1],n}return e.prototype.parse=function(t){return t==null?NaN:ke(t)?this._ordinalMeta.getOrdinal(t):Math.round(t)},e.prototype.contain=function(t){return t=this.parse(t),G1(t,this._extent)&&this._ordinalMeta.categories[t]!=null},e.prototype.normalize=function(t){return t=this._getTickNumber(this.parse(t)),H1(t,this._extent)},e.prototype.scale=function(t){return t=Math.round(W1(t,this._extent)),this.getRawOrdinalNumber(t)},e.prototype.getTicks=function(){for(var t=[],n=this._extent,i=n[0];i<=n[1];)t.push({value:i}),i++;return t},e.prototype.getMinorTicks=function(t){},e.prototype.setSortInfo=function(t){if(t==null){this._ordinalNumbersByTick=this._ticksByOrdinalNumber=null;return}for(var n=t.ordinalNumbers,i=this._ordinalNumbersByTick=[],a=this._ticksByOrdinalNumber=[],o=0,s=this._ordinalMeta.categories.length,l=Math.min(s,n.length);o<l;++o){var u=n[o];i[o]=u,a[u]=o}for(var c=0;o<s;++o){for(;a[c]!=null;)c++;i.push(c),a[c]=o}},e.prototype._getTickNumber=function(t){var n=this._ticksByOrdinalNumber;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getRawOrdinalNumber=function(t){var n=this._ordinalNumbersByTick;return n&&t>=0&&t<n.length?n[t]:t},e.prototype.getLabel=function(t){if(!this.isBlank()){var n=this.getRawOrdinalNumber(t.value),i=this._ordinalMeta.categories[n];return i==null?"":i+""}},e.prototype.count=function(){return this._extent[1]-this._extent[0]+1},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.isInExtentRange=function(t){return t=this._getTickNumber(t),this._extent[0]<=t&&this._extent[1]>=t},e.prototype.getOrdinalMeta=function(){return this._ordinalMeta},e.prototype.calcNiceTicks=function(){},e.prototype.calcNiceExtent=function(){},e.type="ordinal",e}(Vs);Vs.registerClass(pH);const B2=pH;var Fu=Vn,vH=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="interval",t._interval=0,t._intervalPrecision=2,t}return e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return G1(t,this._extent)},e.prototype.normalize=function(t){return H1(t,this._extent)},e.prototype.scale=function(t){return W1(t,this._extent)},e.prototype.setExtent=function(t,n){var i=this._extent;isNaN(t)||(i[0]=parseFloat(t)),isNaN(n)||(i[1]=parseFloat(n))},e.prototype.unionExtent=function(t){var n=this._extent;t[0]<n[0]&&(n[0]=t[0]),t[1]>n[1]&&(n[1]=t[1]),this.setExtent(n[0],n[1])},e.prototype.getInterval=function(){return this._interval},e.prototype.setInterval=function(t){this._interval=t,this._niceExtent=this._extent.slice(),this._intervalPrecision=dH(t)},e.prototype.getTicks=function(t){var n=this._interval,i=this._extent,a=this._niceExtent,o=this._intervalPrecision,s=[];if(!n)return s;var l=1e4;i[0]<a[0]&&(t?s.push({value:Fu(a[0]-n,o)}):s.push({value:i[0]}));for(var u=a[0];u<=a[1]&&(s.push({value:u}),u=Fu(u+n,o),u!==s[s.length-1].value);)if(s.length>l)return[];var c=s.length?s[s.length-1].value:a[1];return i[1]>c&&(t?s.push({value:Fu(c+n,o)}):s.push({value:i[1]})),s},e.prototype.getMinorTicks=function(t){for(var n=this.getTicks(!0),i=[],a=this.getExtent(),o=1;o<n.length;o++){for(var s=n[o],l=n[o-1],u=0,c=[],h=s.value-l.value,f=h/t;u<t-1;){var d=Fu(l.value+(u+1)*f);d>a[0]&&d<a[1]&&c.push(d),u++}i.push(c)}return i},e.prototype.getLabel=function(t,n){if(t==null)return"";var i=n&&n.precision;i==null?i=Oo(t.value)||0:i==="auto"&&(i=this._intervalPrecision);var a=Fu(t.value,i,!0);return HV(a)},e.prototype.calcNiceTicks=function(t,n,i){t=t||5;var a=this._extent,o=a[1]-a[0];if(isFinite(o)){o<0&&(o=-o,a.reverse());var s=Sde(a,t,n,i);this._intervalPrecision=s.intervalPrecision,this._interval=s.interval,this._niceExtent=s.niceTickExtent}},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1])if(n[0]!==0){var i=Math.abs(n[0]);t.fixMax||(n[1]+=i/2),n[0]-=i/2}else n[1]=1;var a=n[1]-n[0];isFinite(a)||(n[0]=0,n[1]=1),this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval);var o=this._interval;t.fixMin||(n[0]=Fu(Math.floor(n[0]/o)*o)),t.fixMax||(n[1]=Fu(Math.ceil(n[1]/o)*o))},e.prototype.setNiceExtent=function(t,n){this._niceExtent=[t,n]},e.type="interval",e}(Vs);Vs.registerClass(vH);const Jl=vH;var gH=typeof Float32Array!="undefined",wde=gH?Float32Array:Array;function Bo(r){return _e(r)?gH?new Float32Array(r):r:new wde(r)}var WT="__ec_stack_";function z2(r){return r.get("stack")||WT+r.seriesIndex}function U2(r){return r.dim+r.index}function bde(r){var e=[],t=r.axis,n="axis0";if(t.type==="category"){for(var i=t.getBandWidth(),a=0;a<r.count;a++)e.push(Ke({bandWidth:i,axisKey:n,stackId:WT+a},r));for(var o=_H(e),s=[],a=0;a<r.count;a++){var l=o[n][WT+a];l.offsetCenter=l.offset+l.width/2,s.push(l)}return s}}function mH(r,e){var t=[];return e.eachSeriesByType(r,function(n){AH(n)&&t.push(n)}),t}function Tde(r){var e={};k(r,function(l){var u=l.coordinateSystem,c=u.getBaseAxis();if(!(c.type!=="time"&&c.type!=="value"))for(var h=l.getData(),f=c.dim+"_"+c.index,d=h.getDimensionIndex(h.mapDimension(c.dim)),p=h.getStore(),g=0,v=p.count();g<v;++g){var m=p.get(d,g);e[f]?e[f].push(m):e[f]=[m]}});var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(i){i.sort(function(l,u){return l-u});for(var a=null,o=1;o<i.length;++o){var s=i[o]-i[o-1];s>0&&(a=a===null?s:Math.min(a,s))}t[n]=a}}return t}function yH(r){var e=Tde(r),t=[];return k(r,function(n){var i=n.coordinateSystem,a=i.getBaseAxis(),o=a.getExtent(),s;if(a.type==="category")s=a.getBandWidth();else if(a.type==="value"||a.type==="time"){var l=a.dim+"_"+a.index,u=e[l],c=Math.abs(o[1]-o[0]),h=a.scale.getExtent(),f=Math.abs(h[1]-h[0]);s=u?c/f*u:c}else{var d=n.getData();s=Math.abs(o[1]-o[0])/d.count()}var p=Pe(n.get("barWidth"),s),g=Pe(n.get("barMaxWidth"),s),v=Pe(n.get("barMinWidth")||(wH(n)?.5:1),s),m=n.get("barGap"),y=n.get("barCategoryGap");t.push({bandWidth:s,barWidth:p,barMaxWidth:g,barMinWidth:v,barGap:m,barCategoryGap:y,axisKey:U2(a),stackId:z2(n)})}),_H(t)}function _H(r){var e={};k(r,function(n,i){var a=n.axisKey,o=n.bandWidth,s=e[a]||{bandWidth:o,remainedWidth:o,autoWidthCount:0,categoryGap:null,gap:"20%",stacks:{}},l=s.stacks;e[a]=s;var u=n.stackId;l[u]||s.autoWidthCount++,l[u]=l[u]||{width:0,maxWidth:0};var c=n.barWidth;c&&!l[u].width&&(l[u].width=c,c=Math.min(s.remainedWidth,c),s.remainedWidth-=c);var h=n.barMaxWidth;h&&(l[u].maxWidth=h);var f=n.barMinWidth;f&&(l[u].minWidth=f);var d=n.barGap;d!=null&&(s.gap=d);var p=n.barCategoryGap;p!=null&&(s.categoryGap=p)});var t={};return k(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=n.categoryGap;if(s==null){var l=wt(a).length;s=Math.max(35-l*4,15)+"%"}var u=Pe(s,o),c=Pe(n.gap,1),h=n.remainedWidth,f=n.autoWidthCount,d=(h-u)/(f+(f-1)*c);d=Math.max(d,0),k(a,function(m){var y=m.maxWidth,_=m.minWidth;if(m.width){var x=m.width;y&&(x=Math.min(x,y)),_&&(x=Math.max(x,_)),m.width=x,h-=x+c*x,f--}else{var x=d;y&&y<x&&(x=Math.min(y,h)),_&&_>x&&(x=_),x!==d&&(m.width=x,h-=x+c*x,f--)}}),d=(h-u)/(f+(f-1)*c),d=Math.max(d,0);var p=0,g;k(a,function(m,y){m.width||(m.width=d),g=m,p+=m.width*(1+c)}),g&&(p-=g.width*c);var v=-p/2;k(a,function(m,y){t[i][y]=t[i][y]||{bandWidth:o,offset:v,width:m.width},v+=m.width*(1+c)})}),t}function Mde(r,e,t){if(r&&e){var n=r[U2(e)];return n!=null&&t!=null?n[z2(t)]:n}}function xH(r,e){var t=mH(r,e),n=yH(t);k(t,function(i){var a=i.getData(),o=i.coordinateSystem,s=o.getBaseAxis(),l=z2(i),u=n[U2(s)][l],c=u.offset,h=u.width;a.setLayout({bandWidth:u.bandWidth,offset:c,size:h})})}function SH(r){return{seriesType:r,plan:Td(),reset:function(e){if(AH(e)){var t=e.getData(),n=e.coordinateSystem,i=n.getBaseAxis(),a=n.getOtherAxis(i),o=t.getDimensionIndex(t.mapDimension(a.dim)),s=t.getDimensionIndex(t.mapDimension(i.dim)),l=e.get("showBackground",!0),u=t.mapDimension(a.dim),c=t.getCalculationInfo("stackResultDimension"),h=Ql(t,u)&&!!t.getCalculationInfo("stackedOnSeries"),f=a.isHorizontal(),d=Cde(i,a),p=wH(e),g=e.get("barMinHeight")||0,v=c&&t.getDimensionIndex(c),m=t.getLayout("size"),y=t.getLayout("offset");return{progress:function(_,x){for(var S=_.count,A=p&&Bo(S*3),w=p&&l&&Bo(S*3),M=p&&Bo(S),C=n.master.getRect(),b=f?C.width:C.height,T,P=x.getStore(),D=0;(T=_.next())!=null;){var L=P.get(h?v:o,T),E=P.get(s,T),I=d,N=void 0;h&&(N=+L-P.get(o,T));var R=void 0,F=void 0,O=void 0,V=void 0;if(f){var H=n.dataToPoint([L,E]);if(h){var Q=n.dataToPoint([N,E]);I=Q[0]}R=I,F=H[1]+y,O=H[0]-I,V=m,Math.abs(O)<g&&(O=(O<0?-1:1)*g)}else{var H=n.dataToPoint([E,L]);if(h){var Q=n.dataToPoint([E,N]);I=Q[1]}R=H[0]+y,F=I,O=m,V=H[1]-I,Math.abs(V)<g&&(V=(V<=0?-1:1)*g)}p?(A[D]=R,A[D+1]=F,A[D+2]=f?O:V,w&&(w[D]=f?C.x:R,w[D+1]=f?F:C.y,w[D+2]=b),M[T]=T):x.setItemLayout(T,{x:R,y:F,width:O,height:V}),D+=3}p&&x.setLayout({largePoints:A,largeDataIndices:M,largeBackgroundPoints:w,valueAxisHorizontal:f})}}}}}}function AH(r){return r.coordinateSystem&&r.coordinateSystem.type==="cartesian2d"}function wH(r){return r.pipelineContext&&r.pipelineContext.large}function Cde(r,e){var t=e.model.get("startValue");return t||(t=0),e.toGlobalCoord(e.dataToCoord(e.type==="log"?t>0?t:1:t))}var Ede=function(r,e,t,n){for(;t<n;){var i=t+n>>>1;r[i][1]<e?t=i+1:n=i}return t},bH=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="time",n}return e.prototype.getLabel=function(t){var n=this.getSetting("useUTC");return P1(t.value,aN[Zue(Ef(this._minLevelUnit))]||aN.second,n,this.getSetting("locale"))},e.prototype.getFormattedLabel=function(t,n,i){var a=this.getSetting("useUTC"),o=this.getSetting("locale");return Que(t,n,i,o,a)},e.prototype.getTicks=function(){var t=this._interval,n=this._extent,i=[];if(!t)return i;i.push({value:n[0],level:0});var a=this.getSetting("useUTC"),o=kde(this._minLevelUnit,this._approxInterval,a,n);return i=i.concat(o),i.push({value:n[1],level:0}),i},e.prototype.calcNiceExtent=function(t){var n=this._extent;if(n[0]===n[1]&&(n[0]-=Ca,n[1]+=Ca),n[1]===-1/0&&n[0]===1/0){var i=new Date;n[1]=+new Date(i.getFullYear(),i.getMonth(),i.getDate()),n[0]=n[1]-Ca}this.calcNiceTicks(t.splitNumber,t.minInterval,t.maxInterval)},e.prototype.calcNiceTicks=function(t,n,i){t=t||10;var a=this._extent,o=a[1]-a[0];this._approxInterval=o/t,n!=null&&this._approxInterval<n&&(this._approxInterval=n),i!=null&&this._approxInterval>i&&(this._approxInterval=i);var s=hy.length,l=Math.min(Ede(hy,this._approxInterval,0,s),s-1);this._interval=hy[l][1],this._minLevelUnit=hy[Math.max(l-1,0)][0]},e.prototype.parse=function(t){return Ft(t)?t:+qo(t)},e.prototype.contain=function(t){return G1(this.parse(t),this._extent)},e.prototype.normalize=function(t){return H1(this.parse(t),this._extent)},e.prototype.scale=function(t){return W1(t,this._extent)},e.type="time",e}(Jl),hy=[["second",y2],["minute",_2],["hour",sv],["quarter-day",sv*6],["half-day",sv*12],["day",Ca*1.2],["half-week",Ca*3.5],["week",Ca*7],["month",Ca*31],["quarter",Ca*95],["half-year",iN/2],["year",iN]];function Lde(r,e,t,n){var i=qo(e),a=qo(t),o=function(p){return oN(i,p,n)===oN(a,p,n)},s=function(){return o("year")},l=function(){return s()&&o("month")},u=function(){return l()&&o("day")},c=function(){return u()&&o("hour")},h=function(){return c()&&o("minute")},f=function(){return h()&&o("second")},d=function(){return f()&&o("millisecond")};switch(r){case"year":return s();case"month":return l();case"day":return u();case"hour":return c();case"minute":return h();case"second":return f();case"millisecond":return d()}}function Pde(r,e){return r/=Ca,r>16?16:r>7.5?7:r>3.5?4:r>1.5?2:1}function Rde(r){var e=30*Ca;return r/=e,r>6?6:r>3?3:r>2?2:1}function Dde(r){return r/=sv,r>12?12:r>6?6:r>3.5?4:r>2?2:1}function gk(r,e){return r/=e?_2:y2,r>30?30:r>20?20:r>15?15:r>10?10:r>5?5:r>2?2:1}function Ide(r){return b4(r,!0)}function Nde(r,e,t){var n=new Date(r);switch(Ef(e)){case"year":case"month":n[FV(t)](0);case"day":n[BV(t)](1);case"hour":n[zV(t)](0);case"minute":n[UV(t)](0);case"second":n[VV(t)](0),n[GV(t)](0)}return n.getTime()}function kde(r,e,t,n){var i=1e4,a=kV,o=0;function s(b,T,P,D,L,E,I){for(var N=new Date(T),R=T,F=N[D]();R<P&&R<=n[1];)I.push({value:R}),F+=b,N[L](F),R=N.getTime();I.push({value:R,notAdd:!0})}function l(b,T,P){var D=[],L=!T.length;if(!Lde(Ef(b),n[0],n[1],t)){L&&(T=[{value:Nde(new Date(n[0]),b,t)},{value:n[1]}]);for(var E=0;E<T.length-1;E++){var I=T[E].value,N=T[E+1].value;if(I!==N){var R=void 0,F=void 0,O=void 0,V=!1;switch(b){case"year":R=Math.max(1,Math.round(e/Ca/365)),F=x2(t),O=Jue(t);break;case"half-year":case"quarter":case"month":R=Rde(e),F=Lf(t),O=FV(t);break;case"week":case"half-week":case"day":R=Pde(e),F=R1(t),O=BV(t),V=!0;break;case"half-day":case"quarter-day":case"hour":R=Dde(e),F=Yv(t),O=zV(t);break;case"minute":R=gk(e,!0),F=D1(t),O=UV(t);break;case"second":R=gk(e,!1),F=I1(t),O=VV(t);break;case"millisecond":R=Ide(e),F=N1(t),O=GV(t);break}s(R,I,N,F,O,V,D),b==="year"&&P.length>1&&E===0&&P.unshift({value:P[0].value-R})}}for(var E=0;E<D.length;E++)P.push(D[E]);return D}}for(var u=[],c=[],h=0,f=0,d=0;d<a.length&&o++<i;++d){var p=Ef(a[d]);if(Kue(a[d])){l(a[d],u[u.length-1]||[],c);var g=a[d+1]?Ef(a[d+1]):null;if(p!==g){if(c.length){f=h,c.sort(function(b,T){return b.value-T.value});for(var v=[],m=0;m<c.length;++m){var y=c[m].value;(m===0||c[m-1].value!==y)&&(v.push(c[m]),y>=n[0]&&y<=n[1]&&h++)}var _=(n[1]-n[0])/e;if(h>_*1.5&&f>_/1.5||(u.push(v),h>_||r===a[d]))break}c=[]}}}for(var x=jt(xe(u,function(b){return jt(b,function(T){return T.value>=n[0]&&T.value<=n[1]&&!T.notAdd})}),function(b){return b.length>0}),S=[],A=x.length-1,d=0;d<x.length;++d)for(var w=x[d],M=0;M<w.length;++M)S.push({value:w[M].value,level:A-d});S.sort(function(b,T){return b.value-T.value});for(var C=[],d=0;d<S.length;++d)(d===0||S[d].value!==S[d-1].value)&&C.push(S[d]);return C}Vs.registerClass(bH);const TH=bH;var mk=Vs.prototype,hv=Jl.prototype,Ode=Vn,Fde=Math.floor,Bde=Math.ceil,fy=Math.pow,$a=Math.log,V2=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="log",t.base=10,t._originalScale=new Jl,t._interval=0,t}return e.prototype.getTicks=function(t){var n=this._originalScale,i=this._extent,a=n.getExtent(),o=hv.getTicks.call(this,t);return xe(o,function(s){var l=s.value,u=Vn(fy(this.base,l));return u=l===i[0]&&this._fixMin?dy(u,a[0]):u,u=l===i[1]&&this._fixMax?dy(u,a[1]):u,{value:u}},this)},e.prototype.setExtent=function(t,n){var i=$a(this.base);t=$a(Math.max(0,t))/i,n=$a(Math.max(0,n))/i,hv.setExtent.call(this,t,n)},e.prototype.getExtent=function(){var t=this.base,n=mk.getExtent.call(this);n[0]=fy(t,n[0]),n[1]=fy(t,n[1]);var i=this._originalScale,a=i.getExtent();return this._fixMin&&(n[0]=dy(n[0],a[0])),this._fixMax&&(n[1]=dy(n[1],a[1])),n},e.prototype.unionExtent=function(t){this._originalScale.unionExtent(t);var n=this.base;t[0]=$a(t[0])/$a(n),t[1]=$a(t[1])/$a(n),mk.unionExtent.call(this,t)},e.prototype.unionExtentFromData=function(t,n){this.unionExtent(t.getApproximateExtent(n))},e.prototype.calcNiceTicks=function(t){t=t||10;var n=this._extent,i=n[1]-n[0];if(!(i===1/0||i<=0)){var a=Sse(i),o=t/i*a;for(o<=.5&&(a*=10);!isNaN(a)&&Math.abs(a)<1&&Math.abs(a)>0;)a*=10;var s=[Vn(Bde(n[0]/a)*a),Vn(Fde(n[1]/a)*a)];this._interval=a,this._niceExtent=s}},e.prototype.calcNiceExtent=function(t){hv.calcNiceExtent.call(this,t),this._fixMin=t.fixMin,this._fixMax=t.fixMax},e.prototype.parse=function(t){return t},e.prototype.contain=function(t){return t=$a(t)/$a(this.base),G1(t,this._extent)},e.prototype.normalize=function(t){return t=$a(t)/$a(this.base),H1(t,this._extent)},e.prototype.scale=function(t){return t=W1(t,this._extent),fy(this.base,t)},e.type="log",e}(Vs),MH=V2.prototype;MH.getMinorTicks=hv.getMinorTicks;MH.getLabel=hv.getLabel;function dy(r,e){return Ode(r,Oo(e))}Vs.registerClass(V2);const zde=V2;var Ude=function(){function r(e,t,n){this._prepareParams(e,t,n)}return r.prototype._prepareParams=function(e,t,n){n[1]<n[0]&&(n=[NaN,NaN]),this._dataMin=n[0],this._dataMax=n[1];var i=this._isOrdinal=e.type==="ordinal";this._needCrossZero=e.type==="interval"&&t.getNeedCrossZero&&t.getNeedCrossZero();var a=t.get("min",!0);a==null&&(a=t.get("startValue",!0));var o=this._modelMinRaw=a;qe(o)?this._modelMinNum=py(e,o({min:n[0],max:n[1]})):o!=="dataMin"&&(this._modelMinNum=py(e,o));var s=this._modelMaxRaw=t.get("max",!0);if(qe(s)?this._modelMaxNum=py(e,s({min:n[0],max:n[1]})):s!=="dataMax"&&(this._modelMaxNum=py(e,s)),i)this._axisDataLen=t.getCategories().length;else{var l=t.get("boundaryGap"),u=_e(l)?l:[l||0,l||0];typeof u[0]=="boolean"||typeof u[1]=="boolean"?this._boundaryGapInner=[0,0]:this._boundaryGapInner=[so(u[0],1),so(u[1],1)]}},r.prototype.calculate=function(){var e=this._isOrdinal,t=this._dataMin,n=this._dataMax,i=this._axisDataLen,a=this._boundaryGapInner,o=e?null:n-t||Math.abs(t),s=this._modelMinRaw==="dataMin"?t:this._modelMinNum,l=this._modelMaxRaw==="dataMax"?n:this._modelMaxNum,u=s!=null,c=l!=null;s==null&&(s=e?i?0:NaN:t-a[0]*o),l==null&&(l=e?i?i-1:NaN:n+a[1]*o),(s==null||!isFinite(s))&&(s=NaN),(l==null||!isFinite(l))&&(l=NaN);var h=Ov(s)||Ov(l)||e&&!i;this._needCrossZero&&(s>0&&l>0&&!u&&(s=0),s<0&&l<0&&!c&&(l=0));var f=this._determinedMin,d=this._determinedMax;return f!=null&&(s=f,u=!0),d!=null&&(l=d,c=!0),{min:s,max:l,minFixed:u,maxFixed:c,isBlank:h}},r.prototype.modifyDataMinMax=function(e,t){this[Gde[e]]=t},r.prototype.setDeterminedMinMax=function(e,t){var n=Vde[e];this[n]=t},r.prototype.freeze=function(){this.frozen=!0},r}(),Vde={min:"_determinedMin",max:"_determinedMax"},Gde={min:"_dataMin",max:"_dataMax"};function CH(r,e,t){var n=r.rawExtentInfo;return n||(n=new Ude(r,e,t),r.rawExtentInfo=n,n)}function py(r,e){return e==null?null:Ov(e)?NaN:r.parse(e)}function EH(r,e){var t=r.type,n=CH(r,e,r.getExtent()).calculate();r.setBlank(n.isBlank);var i=n.min,a=n.max,o=e.ecModel;if(o&&t==="time"){var s=mH("bar",o),l=!1;if(k(s,function(h){l=l||h.getBaseAxis()===e.axis}),l){var u=yH(s),c=Hde(i,a,e,u);i=c.min,a=c.max}}return{extent:[i,a],fixMin:n.minFixed,fixMax:n.maxFixed}}function Hde(r,e,t,n){var i=t.axis.getExtent(),a=Math.abs(i[1]-i[0]),o=Mde(n,t.axis);if(o===void 0)return{min:r,max:e};var s=1/0;k(o,function(d){s=Math.min(d.offset,s)});var l=-1/0;k(o,function(d){l=Math.max(d.offset+d.width,l)}),s=Math.abs(s),l=Math.abs(l);var u=s+l,c=e-r,h=1-(s+l)/a,f=c/h-c;return e+=f*(l/u),r-=f*(s/u),{min:r,max:e}}function td(r,e){var t=e,n=EH(r,t),i=n.extent,a=t.get("splitNumber");r instanceof zde&&(r.base=t.get("logBase"));var o=r.type,s=t.get("interval"),l=o==="interval"||o==="time";r.setExtent(i[0],i[1]),r.calcNiceExtent({splitNumber:a,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 $1(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new B2({ordinalMeta:r.getOrdinalMeta?r.getOrdinalMeta():r.getCategories(),extent:[1/0,-1/0]});case"time":return new TH({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new(Vs.getClass(e)||Jl)}}function Wde(r){var e=r.scale.getExtent(),t=e[0],n=e[1];return!(t>0&&n>0||t<0&&n<0)}function Ed(r){var e=r.getLabelModel().get("formatter"),t=r.type==="category"?r.scale.getExtent()[0]:null;return r.scale.type==="time"?function(n){return function(i,a){return r.scale.getFormattedLabel(i,a,n)}}(e):ke(e)?function(n){return function(i){var a=r.scale.getLabel(i),o=n.replace("{value}",a!=null?a:"");return o}}(e):qe(e)?function(n){return function(i,a){return t!=null&&(a=i.value-t),n(G2(r,i),a,i.level!=null?{level:i.level}:null)}}(e):function(n){return r.scale.getLabel(n)}}function G2(r,e){return r.type==="category"?r.scale.getLabel(e):e.value}function $de(r){var e=r.model,t=r.scale;if(!(!e.get(["axisLabel","show"])||t.isBlank())){var n,i,a=t.getExtent();t instanceof B2?i=t.count():(n=t.getTicks(),i=n.length);var o=r.getLabelModel(),s=Ed(r),l,u=1;i>40&&(u=Math.ceil(i/40));for(var c=0;c<i;c+=u){var h=n?n[c]:{value:a[0]+c},f=s(h,c),d=o.getTextRect(f),p=Xde(d,o.get("rotate")||0);l?l.union(p):l=p}return l}}function Xde(r,e){var t=e*Math.PI/180,n=r.width,i=r.height,a=n*Math.abs(Math.cos(t))+Math.abs(i*Math.sin(t)),o=n*Math.abs(Math.sin(t))+Math.abs(i*Math.cos(t)),s=new dt(r.x,r.y,a,o);return s}function H2(r){var e=r.get("interval");return e==null?"auto":e}function LH(r){return r.type==="category"&&H2(r.getLabelModel())===0}function __(r,e){var t={};return k(r.mapDimensionsAll(e),function(n){t[hH(r,n)]=!0}),wt(t)}function Yde(r,e,t){e&&k(__(e,t),function(n){var i=e.getApproximateExtent(n);i[0]<r[0]&&(r[0]=i[0]),i[1]>r[1]&&(r[1]=i[1])})}var Rg=function(){function r(){}return r.prototype.getNeedCrossZero=function(){var e=this.option;return!e.scale},r.prototype.getCoordSysModel=function(){},r}(),qde=1e-8;function yk(r,e){return Math.abs(r-e)<qde}function Zu(r,e,t){var n=0,i=r[0];if(!i)return!1;for(var a=1;a<r.length;a++){var o=r[a];n+=ps(i[0],i[1],o[0],o[1],e,t),i=o}var s=r[0];return(!yk(i[0],s[0])||!yk(i[1],s[1]))&&(n+=ps(i[0],i[1],s[0],s[1],e,t)),n!==0}var jde=[];function EA(r,e){for(var t=0;t<r.length;t++)Or(r[t],r[t],e)}function _k(r,e,t,n){for(var i=0;i<r.length;i++){var a=r[i];n&&(a=n.project(a)),a&&isFinite(a[0])&&isFinite(a[1])&&(Tl(e,e,a),Ml(t,t,a))}}function Kde(r){for(var e=0,t=0,n=0,i=r.length,a=r[i-1][0],o=r[i-1][1],s=0;s<i;s++){var l=r[s][0],u=r[s][1],c=a*u-l*o;e+=c,t+=(a+l)*c,n+=(o+u)*c,a=l,o=u}return e?[t/e/3,n/e/3,e]:[r[0][0]||0,r[0][1]||0]}var PH=function(){function r(e){this.name=e}return r.prototype.setCenter=function(e){this._center=e},r.prototype.getCenter=function(){var e=this._center;return e||(e=this._center=this.calcCenter()),e},r}(),xk=function(){function r(e,t){this.type="polygon",this.exterior=e,this.interiors=t}return r}(),Sk=function(){function r(e){this.type="linestring",this.points=e}return r}(),RH=function(r){ae(e,r);function e(t,n,i){var a=r.call(this,t)||this;return a.type="geoJSON",a.geometries=n,a._center=i&&[i[0],i[1]],a}return e.prototype.calcCenter=function(){for(var t=this.geometries,n,i=0,a=0;a<t.length;a++){var o=t[a],s=o.exterior,l=s&&s.length;l>i&&(n=o,i=l)}if(n)return Kde(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 i=[1/0,1/0],a=[-1/0,-1/0],o=this.geometries;return k(o,function(s){s.type==="polygon"?_k(s.exterior,i,a,t):k(s.points,function(l){_k(l,i,a,t)})}),isFinite(i[0])&&isFinite(i[1])&&isFinite(a[0])&&isFinite(a[1])||(i[0]=i[1]=a[0]=a[1]=0),n=new dt(i[0],i[1],a[0]-i[0],a[1]-i[1]),t||(this._rect=n),n},e.prototype.contain=function(t){var n=this.getBoundingRect(),i=this.geometries;if(!n.contain(t[0],t[1]))return!1;e:for(var a=0,o=i.length;a<o;a++){var s=i[a];if(s.type==="polygon"){var l=s.exterior,u=s.interiors;if(Zu(l,t[0],t[1])){for(var c=0;c<(u?u.length:0);c++)if(Zu(u[c],t[0],t[1]))continue e;return!0}}}return!1},e.prototype.transformTo=function(t,n,i,a){var o=this.getBoundingRect(),s=o.width/o.height;i?a||(a=i/s):i=s*a;for(var l=new dt(t,n,i,a),u=o.calculateTransform(l),c=this.geometries,h=0;h<c.length;h++){var f=c[h];f.type==="polygon"?(EA(f.exterior,u),k(f.interiors,function(d){EA(d,u)})):k(f.points,function(d){EA(d,u)})}o=this._rect,o.copy(l),this._center=[o.x+o.width/2,o.y+o.height/2]},e.prototype.cloneShallow=function(t){t==null&&(t=this.name);var n=new e(t,this.geometries,this._center);return n._rect=this._rect,n.transformTo=null,n},e}(PH),Zde=function(r){ae(e,r);function e(t,n){var i=r.call(this,t)||this;return i.type="geoSVG",i._elOnlyForCalculate=n,i}return e.prototype.calcCenter=function(){for(var t=this._elOnlyForCalculate,n=t.getBoundingRect(),i=[n.x+n.width/2,n.y+n.height/2],a=g1(jde),o=t;o&&!o.isGeoSVGGraphicRoot;)As(a,o.getLocalTransform(),a),o=o.parent;return vd(a,a),Or(i,i,a),i},e}(PH);function Qde(r){if(!r.UTF8Encoding)return r;var e=r,t=e.UTF8Scale;t==null&&(t=1024);var n=e.features;return k(n,function(i){var a=i.geometry,o=a.encodeOffsets,s=a.coordinates;if(o)switch(a.type){case"LineString":a.coordinates=DH(s,o,t);break;case"Polygon":LA(s,o,t);break;case"MultiLineString":LA(s,o,t);break;case"MultiPolygon":k(s,function(l,u){return LA(l,o[u],t)})}}),e.UTF8Encoding=!1,e}function LA(r,e,t){for(var n=0;n<r.length;n++)r[n]=DH(r[n],e[n],t)}function DH(r,e,t){for(var n=[],i=e[0],a=e[1],o=0;o<r.length;o+=2){var s=r.charCodeAt(o)-64,l=r.charCodeAt(o+1)-64;s=s>>1^-(s&1),l=l>>1^-(l&1),s+=i,l+=a,i=s,a=l,n.push([s/t,l/t])}return n}function Jde(r,e){return r=Qde(r),xe(jt(r.features,function(t){return t.geometry&&t.properties&&t.geometry.coordinates.length>0}),function(t){var n=t.properties,i=t.geometry,a=[];switch(i.type){case"Polygon":var o=i.coordinates;a.push(new xk(o[0],o.slice(1)));break;case"MultiPolygon":k(i.coordinates,function(l){l[0]&&a.push(new xk(l[0],l.slice(1)))});break;case"LineString":a.push(new Sk([i.coordinates]));break;case"MultiLineString":a.push(new Sk(i.coordinates))}var s=new RH(n[e||"name"],a,n.cp);return s.properties=n,s})}var Jv=Pt();function IH(r,e){var t=xe(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 epe(r){var e=r.getLabelModel().get("customValues");if(e){var t=Ed(r),n=r.scale.getExtent(),i=IH(r,e),a=jt(i,function(o){return o>=n[0]&&o<=n[1]});return{labels:xe(a,function(o){var s={value:o};return{formattedLabel:t(s),rawLabel:r.scale.getLabel(s),tickValue:o}})}}return r.type==="category"?npe(r):ipe(r)}function tpe(r,e){var t=r.getTickModel().get("customValues");if(t){var n=r.scale.getExtent(),i=IH(r,t);return{ticks:jt(i,function(a){return a>=n[0]&&a<=n[1]})}}return r.type==="category"?rpe(r,e):{ticks:xe(r.scale.getTicks(),function(a){return a.value})}}function npe(r){var e=r.getLabelModel(),t=NH(r,e);return!e.get("show")||r.scale.isBlank()?{labels:[],labelCategoryInterval:t.labelCategoryInterval}:t}function NH(r,e){var t=kH(r,"labels"),n=H2(e),i=OH(t,n);if(i)return i;var a,o;return qe(n)?a=zH(r,n):(o=n==="auto"?ape(r):n,a=BH(r,o)),FH(t,n,{labels:a,labelCategoryInterval:o})}function rpe(r,e){var t=kH(r,"ticks"),n=H2(e),i=OH(t,n);if(i)return i;var a,o;if((!e.get("show")||r.scale.isBlank())&&(a=[]),qe(n))a=zH(r,n,!0);else if(n==="auto"){var s=NH(r,r.getLabelModel());o=s.labelCategoryInterval,a=xe(s.labels,function(l){return l.tickValue})}else o=n,a=BH(r,o,!0);return FH(t,n,{ticks:a,tickCategoryInterval:o})}function ipe(r){var e=r.scale.getTicks(),t=Ed(r);return{labels:xe(e,function(n,i){return{level:n.level,formattedLabel:t(n,i),rawLabel:r.scale.getLabel(n),tickValue:n.value}})}}function kH(r,e){return Jv(r)[e]||(Jv(r)[e]=[])}function OH(r,e){for(var t=0;t<r.length;t++)if(r[t].key===e)return r[t].value}function FH(r,e,t){return r.push({key:e,value:t}),t}function ape(r){var e=Jv(r).autoInterval;return e!=null?e:Jv(r).autoInterval=r.calculateCategoryInterval()}function ope(r){var e=spe(r),t=Ed(r),n=(e.axisRotate-e.labelRotate)/180*Math.PI,i=r.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=1;o>40&&(s=Math.max(1,Math.floor(o/40)));for(var l=a[0],u=r.dataToCoord(l+1)-r.dataToCoord(l),c=Math.abs(u*Math.cos(n)),h=Math.abs(u*Math.sin(n)),f=0,d=0;l<=a[1];l+=s){var p=0,g=0,v=wg(t({value:l}),e.font,"center","top");p=v.width*1.3,g=v.height*1.3,f=Math.max(f,p,7),d=Math.max(d,g,7)}var m=f/c,y=d/h;isNaN(m)&&(m=1/0),isNaN(y)&&(y=1/0);var _=Math.max(0,Math.floor(Math.min(m,y))),x=Jv(r.model),S=r.getExtent(),A=x.lastAutoInterval,w=x.lastTickCount;return A!=null&&w!=null&&Math.abs(A-_)<=1&&Math.abs(w-o)<=1&&A>_&&x.axisExtent0===S[0]&&x.axisExtent1===S[1]?_=A:(x.lastTickCount=o,x.lastAutoInterval=_,x.axisExtent0=S[0],x.axisExtent1=S[1]),_}function spe(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 BH(r,e,t){var n=Ed(r),i=r.scale,a=i.getExtent(),o=r.getLabelModel(),s=[],l=Math.max((e||0)+1,1),u=a[0],c=i.count();u!==0&&l>1&&c/l>2&&(u=Math.round(Math.ceil(u/l)*l));var h=LH(r),f=o.get("showMinLabel")||h,d=o.get("showMaxLabel")||h;f&&u!==a[0]&&g(a[0]);for(var p=u;p<=a[1];p+=l)g(p);d&&p-l!==a[1]&&g(a[1]);function g(v){var m={value:v};s.push(t?v:{formattedLabel:n(m),rawLabel:i.getLabel(m),tickValue:v})}return s}function zH(r,e,t){var n=r.scale,i=Ed(r),a=[];return k(n.getTicks(),function(o){var s=n.getLabel(o),l=o.value;e(o.value,s)&&a.push(t?l:{formattedLabel:i(o),rawLabel:s,tickValue:l})}),a}var Ak=[0,1],lpe=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]),i=Math.max(t[0],t[1]);return e>=n&&e<=i},r.prototype.containData=function(e){return this.scale.contain(e)},r.prototype.getExtent=function(){return this._extent.slice()},r.prototype.getPixelPrecision=function(e){return A4(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,i=this.scale;return e=i.normalize(e),this.onBand&&i.type==="ordinal"&&(n=n.slice(),wk(n,i.count())),Kt(e,Ak,n,t)},r.prototype.coordToData=function(e,t){var n=this._extent,i=this.scale;this.onBand&&i.type==="ordinal"&&(n=n.slice(),wk(n,i.count()));var a=Kt(e,n,Ak,t);return this.scale.scale(a)},r.prototype.pointToData=function(e,t){},r.prototype.getTicksCoords=function(e){e=e||{};var t=e.tickModel||this.getTickModel(),n=tpe(this,t),i=n.ticks,a=xe(i,function(s){return{coord:this.dataToCoord(this.scale.type==="ordinal"?this.scale.getRawOrdinalNumber(s):s),tickValue:s}},this),o=t.get("alignWithLabel");return upe(this,a,o,e.clamp),a},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),i=xe(n,function(a){return xe(a,function(o){return{coord:this.dataToCoord(o),tickValue:o}},this)},this);return i},r.prototype.getViewLabels=function(){return epe(this).labels},r.prototype.getLabelModel=function(){return this.model.getModel("axisLabel")},r.prototype.getTickModel=function(){return this.model.getModel("axisTick")},r.prototype.getBandWidth=function(){var e=this._extent,t=this.scale.getExtent(),n=t[1]-t[0]+(this.onBand?1:0);n===0&&(n=1);var i=Math.abs(e[1]-e[0]);return Math.abs(i)/n},r.prototype.calculateCategoryInterval=function(){return ope(this)},r}();function wk(r,e){var t=r[1]-r[0],n=e,i=t/n/2;r[0]+=i,r[1]-=i}function upe(r,e,t,n){var i=e.length;if(!r.onBand||t||!i)return;var a=r.getExtent(),o,s;if(i===1)e[0].coord=a[0],o=e[1]={coord:a[1],tickValue:e[0].tickValue};else{var l=e[i-1].tickValue-e[0].tickValue,u=(e[i-1].coord-e[0].coord)/l;k(e,function(d){d.coord-=u/2});var c=r.scale.getExtent();s=1+c[1]-e[i-1].tickValue,o={coord:e[i-1].coord+u*s,tickValue:c[1]+1},e.push(o)}var h=a[0]>a[1];f(e[0].coord,a[0])&&(n?e[0].coord=a[0]:e.shift()),n&&f(a[0],e[0].coord)&&e.unshift({coord:a[0]}),f(a[1],o.coord)&&(n?o.coord=a[1]:e.pop()),n&&f(o.coord,a[1])&&e.push({coord:a[1]});function f(d,p){return d=Vn(d),p=Vn(p),h?d>p:d<p}}const ho=lpe;var up=Math.PI*2,Bu=jo.CMD,cpe=["top","right","bottom","left"];function hpe(r,e,t,n,i){var a=t.width,o=t.height;switch(r){case"top":n.set(t.x+a/2,t.y-e),i.set(0,-1);break;case"bottom":n.set(t.x+a/2,t.y+o+e),i.set(0,1);break;case"left":n.set(t.x-e,t.y+o/2),i.set(-1,0);break;case"right":n.set(t.x+a+e,t.y+o/2),i.set(1,0);break}}function fpe(r,e,t,n,i,a,o,s,l){o-=r,s-=e;var u=Math.sqrt(o*o+s*s);o/=u,s/=u;var c=o*t+r,h=s*t+e;if(Math.abs(n-i)%up<1e-4)return l[0]=c,l[1]=h,u-t;if(a){var f=n;n=Qi(i),i=Qi(f)}else n=Qi(n),i=Qi(i);n>i&&(i+=up);var d=Math.atan2(s,o);if(d<0&&(d+=up),d>=n&&d<=i||d+up>=n&&d+up<=i)return l[0]=c,l[1]=h,u-t;var p=t*Math.cos(n)+r,g=t*Math.sin(n)+e,v=t*Math.cos(i)+r,m=t*Math.sin(i)+e,y=(p-o)*(p-o)+(g-s)*(g-s),_=(v-o)*(v-o)+(m-s)*(m-s);return y<_?(l[0]=p,l[1]=g,Math.sqrt(y)):(l[0]=v,l[1]=m,Math.sqrt(_))}function x_(r,e,t,n,i,a,o,s){var l=i-r,u=a-e,c=t-r,h=n-e,f=Math.sqrt(c*c+h*h);c/=f,h/=f;var d=l*c+u*h,p=d/f;s&&(p=Math.min(Math.max(p,0),1)),p*=f;var g=o[0]=r+p*c,v=o[1]=e+p*h;return Math.sqrt((g-i)*(g-i)+(v-a)*(v-a))}function UH(r,e,t,n,i,a,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(i,r),s),c=o[1]=Math.min(Math.max(a,e),l);return Math.sqrt((u-i)*(u-i)+(c-a)*(c-a))}var ja=[];function dpe(r,e,t){var n=UH(e.x,e.y,e.width,e.height,r.x,r.y,ja);return t.set(ja[0],ja[1]),n}function ppe(r,e,t){for(var n=0,i=0,a=0,o=0,s,l,u=1/0,c=e.data,h=r.x,f=r.y,d=0;d<c.length;){var p=c[d++];d===1&&(n=c[d],i=c[d+1],a=n,o=i);var g=u;switch(p){case Bu.M:a=c[d++],o=c[d++],n=a,i=o;break;case Bu.L:g=x_(n,i,c[d],c[d+1],h,f,ja,!0),n=c[d++],i=c[d++];break;case Bu.C:g=n4(n,i,c[d++],c[d++],c[d++],c[d++],c[d],c[d+1],h,f,ja),n=c[d++],i=c[d++];break;case Bu.Q:g=i4(n,i,c[d++],c[d++],c[d],c[d+1],h,f,ja),n=c[d++],i=c[d++];break;case Bu.A:var v=c[d++],m=c[d++],y=c[d++],_=c[d++],x=c[d++],S=c[d++];d+=1;var A=!!(1-c[d++]);s=Math.cos(x)*y+v,l=Math.sin(x)*_+m,d<=1&&(a=s,o=l);var w=(h-v)*_/y+v;g=fpe(v,m,_,x,x+S,A,w,f,ja),n=Math.cos(x+S)*y+v,i=Math.sin(x+S)*_+m;break;case Bu.R:a=n=c[d++],o=i=c[d++];var M=c[d++],C=c[d++];g=UH(a,o,M,C,h,f,ja);break;case Bu.Z:g=x_(n,i,a,o,h,f,ja,!0),n=a,i=o;break}g<u&&(u=g,t.set(ja[0],ja[1]))}return u}var to=new ft,fn=new ft,Wn=new ft,zo=new ft,No=new ft;function bk(r,e){if(r){var t=r.getTextGuideLine(),n=r.getTextContent();if(n&&t){var i=r.textGuideLineConfig||{},a=[[0,0],[0,0],[0,0]],o=i.candidates||cpe,s=n.getBoundingRect().clone();s.applyTransform(n.getComputedTransform());var l=1/0,u=i.anchor,c=r.getComputedTransform(),h=c&&vd([],c),f=e.get("length2")||0;u&&Wn.copy(u);for(var d=0;d<o.length;d++){var p=o[d];hpe(p,0,s,to,zo),ft.scaleAndAdd(fn,to,zo,f),fn.transform(h);var g=r.getBoundingRect(),v=u?u.distance(fn):r instanceof yt?ppe(fn,r.path,Wn):dpe(fn,g,Wn);v<l&&(l=v,fn.transform(c),Wn.transform(c),Wn.toArray(a[0]),fn.toArray(a[1]),to.toArray(a[2]))}VH(a,e.get("minTurnAngle")),t.setShape({points:a})}}}var S_=[],di=new ft;function VH(r,e){if(e<=180&&e>0){e=e/180*Math.PI,to.fromArray(r[0]),fn.fromArray(r[1]),Wn.fromArray(r[2]),ft.sub(zo,to,fn),ft.sub(No,Wn,fn);var t=zo.len(),n=No.len();if(!(t<.001||n<.001)){zo.scale(1/t),No.scale(1/n);var i=zo.dot(No),a=Math.cos(e);if(a<i){var o=x_(fn.x,fn.y,Wn.x,Wn.y,to.x,to.y,S_,!1);di.fromArray(S_),di.scaleAndAdd(No,o/Math.tan(Math.PI-e));var s=Wn.x!==fn.x?(di.x-fn.x)/(Wn.x-fn.x):(di.y-fn.y)/(Wn.y-fn.y);if(isNaN(s))return;s<0?ft.copy(di,fn):s>1&&ft.copy(di,Wn),di.toArray(r[1])}}}}function vpe(r,e,t){if(t<=180&&t>0){t=t/180*Math.PI,to.fromArray(r[0]),fn.fromArray(r[1]),Wn.fromArray(r[2]),ft.sub(zo,fn,to),ft.sub(No,Wn,fn);var n=zo.len(),i=No.len();if(!(n<.001||i<.001)){zo.scale(1/n),No.scale(1/i);var a=zo.dot(e),o=Math.cos(t);if(a<o){var s=x_(fn.x,fn.y,Wn.x,Wn.y,to.x,to.y,S_,!1);di.fromArray(S_);var l=Math.PI/2,u=Math.acos(No.dot(e)),c=l+u-t;if(c>=l)ft.copy(di,Wn);else{di.scaleAndAdd(No,s/Math.tan(Math.PI/2-c));var h=Wn.x!==fn.x?(di.x-fn.x)/(Wn.x-fn.x):(di.y-fn.y)/(Wn.y-fn.y);if(isNaN(h))return;h<0?ft.copy(di,fn):h>1&&ft.copy(di,Wn)}di.toArray(r[1])}}}}function PA(r,e,t,n){var i=t==="normal",a=i?r:r.ensureState(t);a.ignore=e;var o=n.get("smooth");o&&o===!0&&(o=.3),a.shape=a.shape||{},o>0&&(a.shape.smooth=o);var s=n.getModel("lineStyle").getLineStyle();i?r.useStyle(s):a.style=s}function gpe(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 i=bl(n[0],n[1]),a=bl(n[1],n[2]);if(!i||!a){r.lineTo(n[1][0],n[1][1]),r.lineTo(n[2][0],n[2][1]);return}var o=Math.min(i,a)*t,s=Jy([],n[1],n[0],o/i),l=Jy([],n[1],n[2],o/a),u=Jy([],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 c=1;c<n.length;c++)r.lineTo(n[c][0],n[c][1])}function W2(r,e,t){var n=r.getTextGuideLine(),i=r.getTextContent();if(!i){n&&r.removeTextGuideLine();return}for(var a=e.normal,o=a.get("show"),s=i.ignore,l=0;l<Wv.length;l++){var u=Wv[l],c=e[u],h=u==="normal";if(c){var f=c.get("show"),d=h?s:ot(i.states[u]&&i.states[u].ignore,s);if(d||!ot(f,o)){var p=h?n:n&&n.states[u];p&&(p.ignore=!0),n&&PA(n,!0,u,c);continue}n||(n=new Ui,r.setTextGuideLine(n),!h&&(s||!o)&&PA(n,!0,"normal",e.normal),r.stateProxy&&(n.stateProxy=r.stateProxy)),PA(n,!1,u,c)}}if(n){Ke(n.style,t),n.style.fill=null;var g=a.get("showAbove"),v=r.textGuideLineConfig=r.textGuideLineConfig||{};v.showAbove=g||!1,n.buildPath=gpe}}function $2(r,e){e=e||"labelLine";for(var t={normal:r.getModel(e)},n=0;n<mi.length;n++){var i=mi[n];t[i]=r.getModel([i,e])}return t}function GH(r){for(var e=[],t=0;t<r.length;t++){var n=r[t];if(!n.defaultAttr.ignore){var i=n.label,a=i.getComputedTransform(),o=i.getBoundingRect(),s=!a||a[1]<1e-5&&a[2]<1e-5,l=i.style.margin||0,u=o.clone();u.applyTransform(a),u.x-=l/2,u.y-=l/2,u.width+=l,u.height+=l;var c=s?new a_(o,a):null;e.push({label:i,labelLine:n.labelLine,rect:u,localRect:o,obb:c,priority:n.priority,defaultAttr:n.defaultAttr,layoutOption:n.computedLayoutOption,axisAligned:s,transform:a})}}return e}function HH(r,e,t,n,i,a){var o=r.length;if(o<2)return;r.sort(function(M,C){return M.rect[e]-C.rect[e]});for(var s=0,l,u=!1,c=0,h=0;h<o;h++){var f=r[h],d=f.rect;l=d[e]-s,l<0&&(d[e]-=l,f.label[e]-=l,u=!0);var p=Math.max(-l,0);c+=p,s=d[e]+d[t]}c>0&&a&&S(-c/o,0,o);var g=r[0],v=r[o-1],m,y;_(),m<0&&A(-m,.8),y<0&&A(y,.8),_(),x(m,y,1),x(y,m,-1),_(),m<0&&w(-m),y<0&&w(y);function _(){m=g.rect[e]-n,y=i-v.rect[e]-v.rect[t]}function x(M,C,b){if(M<0){var T=Math.min(C,-M);if(T>0){S(T*b,0,o);var P=T+M;P<0&&A(-P*b,1)}else A(-M*b,1)}}function S(M,C,b){M!==0&&(u=!0);for(var T=C;T<b;T++){var P=r[T],D=P.rect;D[e]+=M,P.label[e]+=M}}function A(M,C){for(var b=[],T=0,P=1;P<o;P++){var D=r[P-1].rect,L=Math.max(r[P].rect[e]-D[e]-D[t],0);b.push(L),T+=L}if(T){var E=Math.min(Math.abs(M)/T,C);if(M>0)for(var P=0;P<o-1;P++){var I=b[P]*E;S(I,0,P+1)}else for(var P=o-1;P>0;P--){var I=b[P-1]*E;S(-I,P,o)}}}function w(M){var C=M<0?-1:1;M=Math.abs(M);for(var b=Math.ceil(M/(o-1)),T=0;T<o-1;T++)if(C>0?S(b,0,T+1):S(-b,o-T-1,o),M-=b,M<=0)return}return u}function mpe(r,e,t,n){return HH(r,"x","width",e,t,n)}function WH(r,e,t,n){return HH(r,"y","height",e,t,n)}function $H(r){var e=[];r.sort(function(g,v){return v.priority-g.priority});var t=new dt(0,0,0,0);function n(g){if(!g.ignore){var v=g.ensureState("emphasis");v.ignore==null&&(v.ignore=!1)}g.ignore=!0}for(var i=0;i<r.length;i++){var a=r[i],o=a.axisAligned,s=a.localRect,l=a.transform,u=a.label,c=a.labelLine;t.copy(a.rect),t.width-=.1,t.height-=.1,t.x+=.05,t.y+=.05;for(var h=a.obb,f=!1,d=0;d<e.length;d++){var p=e[d];if(t.intersect(p.rect)){if(o&&p.axisAligned){f=!0;break}if(p.obb||(p.obb=new a_(p.localRect,p.transform)),h||(h=new a_(s,l)),h.intersect(p.obb)){f=!0;break}}}f?(n(u),c&&n(c)):(u.attr("ignore",a.defaultAttr.ignore),c&&c.attr("ignore",a.defaultAttr.labelGuideIgnore),e.push(a))}}function ype(r){if(r){for(var e=[],t=0;t<r.length;t++)e.push(r[t].slice());return e}}function _pe(r,e){var t=r.label,n=e&&e.getTextGuideLine();return{dataIndex:r.dataIndex,dataType:r.dataType,seriesIndex:r.seriesModel.seriesIndex,text:r.label.style.text,rect:r.hostRect,labelRect:r.rect,align:t.style.align,verticalAlign:t.style.verticalAlign,labelLinePoints:ype(n&&n.shape.points)}}var Tk=["align","verticalAlign","width","height","fontSize"],li=new _s,RA=Pt(),xpe=Pt();function vy(r,e,t){for(var n=0;n<t.length;n++){var i=t[n];e[i]!=null&&(r[i]=e[i])}}var gy=["x","y","rotation"],Spe=function(){function r(){this._labelList=[],this._chartViewList=[]}return r.prototype.clearLabels=function(){this._labelList=[],this._chartViewList=[]},r.prototype._addLabel=function(e,t,n,i,a){var o=i.style,s=i.__hostTarget,l=s.textConfig||{},u=i.getComputedTransform(),c=i.getBoundingRect().plain();dt.applyTransform(c,c,u),u?li.setLocalTransform(u):(li.x=li.y=li.rotation=li.originX=li.originY=0,li.scaleX=li.scaleY=1),li.rotation=Qi(li.rotation);var h=i.__hostTarget,f;if(h){f=h.getBoundingRect().plain();var d=h.getComputedTransform();dt.applyTransform(f,f,d)}var p=f&&h.getTextGuideLine();this._labelList.push({label:i,labelLine:p,seriesModel:n,dataIndex:e,dataType:t,layoutOption:a,computedLayoutOption:null,rect:c,hostRect:f,priority:f?f.width*f.height:0,defaultAttr:{ignore:i.ignore,labelGuideIgnore:p&&p.ignore,x:li.x,y:li.y,scaleX:li.scaleX,scaleY:li.scaleY,rotation:li.rotation,style:{x:o.x,y:o.y,align:o.align,verticalAlign:o.verticalAlign,width:o.width,height:o.height,fontSize:o.fontSize},cursor:i.cursor,attachedPos:l.position,attachedRot:l.rotation}})},r.prototype.addLabelsOfSeries=function(e){var t=this;this._chartViewList.push(e);var n=e.__model,i=n.get("labelLayout");(qe(i)||wt(i).length)&&e.group.traverse(function(a){if(a.ignore)return!0;var o=a.getTextContent(),s=at(a);o&&!o.disableLabelLayout&&t._addLabel(s.dataIndex,s.dataType,n,o,i)})},r.prototype.updateLayoutConfig=function(e){var t=e.getWidth(),n=e.getHeight();function i(_,x){return function(){bk(_,x)}}for(var a=0;a<this._labelList.length;a++){var o=this._labelList[a],s=o.label,l=s.__hostTarget,u=o.defaultAttr,c=void 0;qe(o.layoutOption)?c=o.layoutOption(_pe(o,l)):c=o.layoutOption,c=c||{},o.computedLayoutOption=c;var h=Math.PI/180;l&&l.setTextConfig({local:!1,position:c.x!=null||c.y!=null?null:u.attachedPos,rotation:c.rotate!=null?c.rotate*h:u.attachedRot,offset:[c.dx||0,c.dy||0]});var f=!1;if(c.x!=null?(s.x=Pe(c.x,t),s.setStyle("x",0),f=!0):(s.x=u.x,s.setStyle("x",u.style.x)),c.y!=null?(s.y=Pe(c.y,n),s.setStyle("y",0),f=!0):(s.y=u.y,s.setStyle("y",u.style.y)),c.labelLinePoints){var d=l.getTextGuideLine();d&&(d.setShape({points:c.labelLinePoints}),f=!1)}var p=RA(s);p.needsUpdateLabelLine=f,s.rotation=c.rotate!=null?c.rotate*h:u.rotation,s.scaleX=u.scaleX,s.scaleY=u.scaleY;for(var g=0;g<Tk.length;g++){var v=Tk[g];s.setStyle(v,c[v]!=null?c[v]:u.style[v])}if(c.draggable){if(s.draggable=!0,s.cursor="move",l){var m=o.seriesModel;if(o.dataIndex!=null){var y=o.seriesModel.getData(o.dataType);m=y.getItemModel(o.dataIndex)}s.on("drag",i(l,m.getModel("labelLine")))}}else s.off("drag"),s.cursor=u.cursor}},r.prototype.layout=function(e){var t=e.getWidth(),n=e.getHeight(),i=GH(this._labelList),a=jt(i,function(l){return l.layoutOption.moveOverlap==="shiftX"}),o=jt(i,function(l){return l.layoutOption.moveOverlap==="shiftY"});mpe(a,0,t),WH(o,0,n);var s=jt(i,function(l){return l.layoutOption.hideOverlap});$H(s)},r.prototype.processLabelsOverall=function(){var e=this;k(this._chartViewList,function(t){var n=t.__model,i=t.ignoreLabelLineUpdate,a=n.isAnimationEnabled();t.group.traverse(function(o){if(o.ignore&&!o.forceLabelAnimation)return!0;var s=!i,l=o.getTextContent();!s&&l&&(s=RA(l).needsUpdateLabelLine),s&&e._updateLabelLine(o,n),a&&e._animateLabels(o,n)})})},r.prototype._updateLabelLine=function(e,t){var n=e.getTextContent(),i=at(e),a=i.dataIndex;if(n&&a!=null){var o=t.getData(i.dataType),s=o.getItemModel(a),l={},u=o.getItemVisual(a,"style");if(u){var c=o.getVisual("drawType");l.stroke=u[c]}var h=s.getModel("labelLine");W2(e,$2(s),l),bk(e,h)}},r.prototype._animateLabels=function(e,t){var n=e.getTextContent(),i=e.getTextGuideLine();if(n&&(e.forceLabelAnimation||!n.ignore&&!n.invisible&&!e.disableLabelAnimation&&!Mf(e))){var a=RA(n),o=a.oldLayout,s=at(e),l=s.dataIndex,u={x:n.x,y:n.y,rotation:n.rotation},c=t.getData(s.dataType);if(o){n.attr(o);var f=e.prevStates;f&&(pt(f,"select")>=0&&n.attr(a.oldLayoutSelect),pt(f,"emphasis")>=0&&n.attr(a.oldLayoutEmphasis)),zt(n,u,t,l)}else if(n.attr(u),!_d(n).valueAnimation){var h=ot(n.style.opacity,1);n.style.opacity=0,Tn(n,{style:{opacity:h}},t,l)}if(a.oldLayout=u,n.states.select){var d=a.oldLayoutSelect={};vy(d,u,gy),vy(d,n.states.select,gy)}if(n.states.emphasis){var p=a.oldLayoutEmphasis={};vy(p,u,gy),vy(p,n.states.emphasis,gy)}PV(n,l,c,t,t)}if(i&&!i.ignore&&!i.invisible){var a=xpe(i),o=a.oldLayout,g={points:i.shape.points};o?(i.attr({shape:o}),zt(i,{shape:g},t)):(i.setShape(g),i.style.strokePercent=0,Tn(i,{style:{strokePercent:1}},t)),a.oldLayout=g}},r}();const Ape=Spe;var DA=Pt();function wpe(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){var i=DA(t).labelManager;i||(i=DA(t).labelManager=new Ape),i.clearLabels()}),r.registerUpdateLifecycle("series:layoutlabels",function(e,t,n){var i=DA(t).labelManager;n.updatedSeries.forEach(function(a){i.addLabelsOfSeries(t.getViewOfSeriesModel(a))}),i.updateLayoutConfig(t),i.layout(t),i.processLabelsOverall()})}var IA=Math.sin,NA=Math.cos,XH=Math.PI,zu=Math.PI*2,bpe=180/XH,Tpe=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,i,a,o){this._add("C",e,t,n,i,a,o)},r.prototype.quadraticCurveTo=function(e,t,n,i){this._add("Q",e,t,n,i)},r.prototype.arc=function(e,t,n,i,a,o){this.ellipse(e,t,n,n,0,i,a,o)},r.prototype.ellipse=function(e,t,n,i,a,o,s,l){var u=s-o,c=!l,h=Math.abs(u),f=Ll(h-zu)||(c?u>=zu:-u>=zu),d=u>0?u%zu:u%zu+zu,p=!1;f?p=!0:Ll(h)?p=!1:p=d>=XH==!!c;var g=e+n*NA(o),v=t+i*IA(o);this._start&&this._add("M",g,v);var m=Math.round(a*bpe);if(f){var y=1/this._p,_=(c?1:-1)*(zu-y);this._add("A",n,i,m,1,+c,e+n*NA(o+_),t+i*IA(o+_)),y>.01&&this._add("A",n,i,m,0,+c,g,v)}else{var x=e+n*NA(s),S=t+i*IA(s);this._add("A",n,i,m,+p,+c,x,S)}},r.prototype.rect=function(e,t,n,i){this._add("M",e,t),this._add("l",n,0),this._add("l",0,i),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,i,a,o,s,l,u){for(var c=[],h=this._p,f=1;f<arguments.length;f++){var d=arguments[f];if(isNaN(d)){this._invalid=!0;return}c.push(Math.round(d*h)/h)}this._d.push(e+c.join(" ")),this._start=e==="Z"},r.prototype.generateStr=function(){this._str=this._invalid?"":this._d.join(""),this._d=[]},r.prototype.getStr=function(){return this._str},r}();const YH=Tpe;var fv="none",Mpe=Math.round;function Cpe(r){var e=r.fill;return e!=null&&e!==fv}function Epe(r){var e=r.stroke;return e!=null&&e!==fv}var $T=["lineCap","miterLimit","lineJoin"],Lpe=xe($T,function(r){return"stroke-"+r.toLowerCase()});function Ppe(r,e,t,n){var i=e.opacity==null?1:e.opacity;if(t instanceof Ur){r("opacity",i);return}if(Cpe(e)){var a=Uv(e.fill);r("fill",a.color);var o=e.fillOpacity!=null?e.fillOpacity*a.opacity*i:a.opacity*i;(n||o<1)&&r("fill-opacity",o)}else r("fill",fv);if(Epe(e)){var s=Uv(e.stroke);r("stroke",s.color);var l=e.strokeNoScale?t.getLineScale():1,u=l?(e.lineWidth||0)/l:0,c=e.strokeOpacity!=null?e.strokeOpacity*s.opacity*i:s.opacity*i,h=e.strokeFirst;if((n||u!==1)&&r("stroke-width",u),(n||h)&&r("paint-order",h?"stroke":"fill"),(n||c<1)&&r("stroke-opacity",c),e.lineDash){var f=D2(t),d=f[0],p=f[1];d&&(p=Mpe(p||0),r("stroke-dasharray",d.join(",")),(p||n)&&r("stroke-dashoffset",p))}else n&&r("stroke-dasharray",fv);for(var g=0;g<$T.length;g++){var v=$T[g];if(n||e[v]!==r_[v]){var m=e[v]||r_[v];m&&r(Lpe[g],m)}}}else n&&r("stroke",fv)}var qH="http://www.w3.org/2000/svg",jH="http://www.w3.org/1999/xlink",Rpe="http://www.w3.org/2000/xmlns/",Dpe="http://www.w3.org/XML/1998/namespace",Mk="ecmeta_";function KH(r){return document.createElementNS(qH,r)}function gr(r,e,t,n,i){return{tag:r,attrs:t||{},children:n,text:i,key:e}}function Ipe(r,e){var t=[];if(e)for(var n in e){var i=e[n],a=n;i!==!1&&(i!==!0&&i!=null&&(a+='="'+i+'"'),t.push(a))}return"<"+r+" "+t.join(" ")+">"}function Npe(r){return"</"+r+">"}function X2(r,e){e=e||{};var t=e.newline?` |
|
`:"";function n(i){var a=i.children,o=i.tag,s=i.attrs,l=i.text;return Ipe(o,s)+(o!=="style"?Jr(l):l||"")+(a?""+t+xe(a,function(u){return n(u)}).join(t)+t:"")+Npe(o)}return n(r)}function kpe(r,e,t){t=t||{};var n=t.newline?` |
|
`:"",i=" {"+n,a=n+"}",o=xe(wt(r),function(l){return l+i+xe(wt(r[l]),function(u){return u+":"+r[l][u]+";"}).join(n)+a}).join(n),s=xe(wt(e),function(l){return"@keyframes "+l+i+xe(wt(e[l]),function(u){return u+i+xe(wt(e[l][u]),function(c){var h=e[l][u][c];return c==="d"&&(h='path("'+h+'")'),c+":"+h+";"}).join(n)+a}).join(n)+a}).join(n);return!o&&!s?"":["<![CDATA[",o,s,"]]>"].join(n)}function XT(r){return{zrId:r,shadowCache:{},patternCache:{},gradientCache:{},clipPathCache:{},defs:{},cssNodes:{},cssAnims:{},cssStyleCache:{},cssAnimIdx:0,shadowIdx:0,gradientIdx:0,patternIdx:0,clipPathIdx:0}}function Ck(r,e,t,n){return gr("svg","root",{width:r,height:e,xmlns:qH,"xmlns:xlink":jH,version:"1.1",baseProfile:"full",viewBox:n?"0 0 "+r+" "+e:!1},t)}var Ope=0;function ZH(){return Ope++}var Ek={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"},Wu="transform-origin";function Fpe(r,e,t){var n=pe({},r.shape);pe(n,e),r.buildPath(t,n);var i=new YH;return i.reset(h4(r)),t.rebuildPath(i,1),i.generateStr(),i.getStr()}function Bpe(r,e){var t=e.originX,n=e.originY;(t||n)&&(r[Wu]=t+"px "+n+"px")}var zpe={fill:"fill",opacity:"opacity",lineWidth:"stroke-width",lineDashOffset:"stroke-dashoffset"};function QH(r,e){var t=e.zrId+"-ani-"+e.cssAnimIdx++;return e.cssAnims[t]=r,t}function Upe(r,e,t){var n=r.shape.paths,i={},a,o;if(k(n,function(l){var u=XT(t.zrId);u.animation=!0,X1(l,{},u,!0);var c=u.cssAnims,h=u.cssNodes,f=wt(c),d=f.length;if(d){o=f[d-1];var p=c[o];for(var g in p){var v=p[g];i[g]=i[g]||{d:""},i[g].d+=v.d||""}for(var m in h){var y=h[m].animation;y.indexOf(o)>=0&&(a=y)}}}),!!a){e.d=!1;var s=QH(i,t);return a.replace(o,s)}}function Lk(r){return ke(r)?Ek[r]?"cubic-bezier("+Ek[r]+")":qC(r)?r:"":""}function X1(r,e,t,n){var i=r.animators,a=i.length,o=[];if(r instanceof f2){var s=Upe(r,e,t);if(s)o.push(s);else if(!a)return}else if(!a)return;for(var l={},u=0;u<a;u++){var c=i[u],h=[c.getMaxTime()/1e3+"s"],f=Lk(c.getClip().easing),d=c.getDelay();f?h.push(f):h.push("linear"),d&&h.push(d/1e3+"s"),c.getLoop()&&h.push("infinite");var p=h.join(" ");l[p]=l[p]||[p,[]],l[p][1].push(c)}function g(y){var _=y[1],x=_.length,S={},A={},w={},M="animation-timing-function";function C(le,re,be){for(var de=le.getTracks(),U=le.getMaxTime(),K=0;K<de.length;K++){var te=de[K];if(te.needsAnimate()){var ce=te.keyframes,se=te.propName;if(be&&(se=be(se)),se)for(var Ne=0;Ne<ce.length;Ne++){var Oe=ce[Ne],B=Math.round(Oe.time/U*100)+"%",z=Lk(Oe.easing),ne=Oe.rawValue;(ke(ne)||Ft(ne))&&(re[B]=re[B]||{},re[B][se]=Oe.rawValue,z&&(re[B][M]=z))}}}}for(var b=0;b<x;b++){var T=_[b],P=T.targetName;P?P==="shape"&&C(T,A):!n&&C(T,S)}for(var D in S){var L={};g4(L,r),pe(L,S[D]);var E=f4(L),I=S[D][M];w[D]=E?{transform:E}:{},Bpe(w[D],L),I&&(w[D][M]=I)}var N,R=!0;for(var D in A){w[D]=w[D]||{};var F=!N,I=A[D][M];F&&(N=new jo);var O=N.len();N.reset(),w[D].d=Fpe(r,A[D],N);var V=N.len();if(!F&&O!==V){R=!1;break}I&&(w[D][M]=I)}if(!R)for(var D in w)delete w[D].d;if(!n)for(var b=0;b<x;b++){var T=_[b],P=T.targetName;P==="style"&&C(T,w,function(de){return zpe[de]})}for(var H=wt(w),Q=!0,W,b=1;b<H.length;b++){var Z=H[b-1],ee=H[b];if(w[Z][Wu]!==w[ee][Wu]){Q=!1;break}W=w[Z][Wu]}if(Q&&W){for(var D in w)w[D][Wu]&&delete w[D][Wu];e[Wu]=W}if(jt(H,function(le){return wt(w[le]).length>0}).length){var he=QH(w,t);return he+" "+y[0]+" both"}}for(var v in l){var s=g(l[v]);s&&o.push(s)}if(o.length){var m=t.zrId+"-cls-"+ZH();t.cssNodes["."+m]={animation:o.join(",")},e.class=m}}function Vpe(r,e,t){if(!r.ignore)if(r.isSilent()){var n={"pointer-events":"none"};Pk(n,e,t,!0)}else{var i=r.states.emphasis&&r.states.emphasis.style?r.states.emphasis.style:{},a=i.fill;if(!a){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&&(a=iT(l))}var u=i.lineWidth;if(u){var c=!i.strokeNoScale&&r.transform?r.transform[0]:1;u=u/c}var n={cursor:"pointer"};a&&(n.fill=a),i.stroke&&(n.stroke=i.stroke),u&&(n["stroke-width"]=u),Pk(n,e,t,!0)}}function Pk(r,e,t,n){var i=JSON.stringify(r),a=t.cssStyleCache[i];a||(a=t.zrId+"-cls-"+ZH(),t.cssStyleCache[i]=a,t.cssNodes["."+a+(n?":hover":"")]=r),e.class=e.class?e.class+" "+a:a}var eg=Math.round;function JH(r){return r&&ke(r.src)}function e8(r){return r&&qe(r.toDataURL)}function Y2(r,e,t,n){Ppe(function(i,a){var o=i==="fill"||i==="stroke";o&&c4(a)?n8(e,r,i,n):o&&jC(a)?r8(t,r,i,n):r[i]=a,o&&n.ssr&&a==="none"&&(r["pointer-events"]="visible")},e,t,!1),qpe(t,r,n)}function q2(r,e){var t=pse(e);t&&(t.each(function(n,i){n!=null&&(r[(Mk+i).toLowerCase()]=n+"")}),e.isSilent()&&(r[Mk+"silent"]="true"))}function Rk(r){return Ll(r[0]-1)&&Ll(r[1])&&Ll(r[2])&&Ll(r[3]-1)}function Gpe(r){return Ll(r[4])&&Ll(r[5])}function j2(r,e,t){if(e&&!(Gpe(e)&&Rk(e))){var n=t?10:1e4;r.transform=Rk(e)?"translate("+eg(e[4]*n)/n+" "+eg(e[5]*n)/n+")":Noe(e)}}function Dk(r,e,t){for(var n=r.points,i=[],a=0;a<n.length;a++)i.push(eg(n[a][0]*t)/t),i.push(eg(n[a][1]*t)/t);e.points=i.join(" ")}function Ik(r){return!r.smooth}function Hpe(r){var e=xe(r,function(t){return typeof t=="string"?[t,t]:t});return function(t,n,i){for(var a=0;a<e.length;a++){var o=e[a],s=t[o[0]];s!=null&&(n[o[1]]=eg(s*i)/i)}}}var Wpe={circle:[Hpe(["cx","cy","r"])],polyline:[Dk,Ik],polygon:[Dk,Ik]};function $pe(r){for(var e=r.animators,t=0;t<e.length;t++)if(e[t].targetName==="shape")return!0;return!1}function t8(r,e){var t=r.style,n=r.shape,i=Wpe[r.type],a={},o=e.animation,s="path",l=r.style.strokePercent,u=e.compress&&h4(r)||4;if(i&&!e.willUpdate&&!(i[1]&&!i[1](n))&&!(o&&$pe(r))&&!(l<1)){s=r.type;var c=Math.pow(10,u);i[0](n,a,c)}else{var h=!r.path||r.shapeChanged();r.path||r.createPathProxy();var f=r.path;h&&(f.beginPath(),r.buildPath(f,r.shape),r.pathUpdated());var d=f.getVersion(),p=r,g=p.__svgPathBuilder;(p.__svgPathVersion!==d||!g||l!==p.__svgPathStrokePercent)&&(g||(g=p.__svgPathBuilder=new YH),g.reset(u),f.rebuildPath(g,l),g.generateStr(),p.__svgPathVersion=d,p.__svgPathStrokePercent=l),a.d=g.getStr()}return j2(a,r.transform),Y2(a,t,r,e),q2(a,r),e.animation&&X1(r,a,e),e.emphasis&&Vpe(r,a,e),gr(s,r.id+"",a)}function Xpe(r,e){var t=r.style,n=t.image;if(n&&!ke(n)&&(JH(n)?n=n.src:e8(n)&&(n=n.toDataURL())),!!n){var i=t.x||0,a=t.y||0,o=t.width,s=t.height,l={href:n,width:o,height:s};return i&&(l.x=i),a&&(l.y=a),j2(l,r.transform),Y2(l,t,r,e),q2(l,r),e.animation&&X1(r,l,e),gr("image",r.id+"",l)}}function Ype(r,e){var t=r.style,n=t.text;if(n!=null&&(n+=""),!(!n||isNaN(t.x)||isNaN(t.y))){var i=t.font||Yl,a=t.x||0,o=Ooe(t.y||0,y1(i),t.textBaseline),s=koe[t.textAlign]||t.textAlign,l={"dominant-baseline":"central","text-anchor":s};if(q4(t)){var u="",c=t.fontStyle,h=Y4(t.fontSize);if(!parseFloat(h))return;var f=t.fontFamily||zU,d=t.fontWeight;u+="font-size:"+h+";font-family:"+f+";",c&&c!=="normal"&&(u+="font-style:"+c+";"),d&&d!=="normal"&&(u+="font-weight:"+d+";"),l.style=u}else l.style="font: "+i;return n.match(/\s/)&&(l["xml:space"]="preserve"),a&&(l.x=a),o&&(l.y=o),j2(l,r.transform),Y2(l,t,r,e),q2(l,r),e.animation&&X1(r,l,e),gr("text",r.id+"",l,void 0,n)}}function Nk(r,e){if(r instanceof yt)return t8(r,e);if(r instanceof Ur)return Xpe(r,e);if(r instanceof Hv)return Ype(r,e)}function qpe(r,e,t){var n=r.style;if(Foe(n)){var i=Boe(r),a=t.shadowCache,o=a[i];if(!o){var s=r.getGlobalScale(),l=s[0],u=s[1];if(!l||!u)return;var c=n.shadowOffsetX||0,h=n.shadowOffsetY||0,f=n.shadowBlur,d=Uv(n.shadowColor),p=d.opacity,g=d.color,v=f/2/l,m=f/2/u,y=v+" "+m;o=t.zrId+"-s"+t.shadowIdx++,t.defs[o]=gr("filter",o,{id:o,x:"-100%",y:"-100%",width:"300%",height:"300%"},[gr("feDropShadow","",{dx:c/l,dy:h/u,stdDeviation:y,"flood-color":g,"flood-opacity":p})]),a[i]=o}e.filter=m1(o)}}function n8(r,e,t,n){var i=r[t],a,o={gradientUnits:i.global?"userSpaceOnUse":"objectBoundingBox"};if(l4(i))a="linearGradient",o.x1=i.x,o.y1=i.y,o.x2=i.x2,o.y2=i.y2;else if(u4(i))a="radialGradient",o.cx=ot(i.x,.5),o.cy=ot(i.y,.5),o.r=ot(i.r,.5);else return;for(var s=i.colorStops,l=[],u=0,c=s.length;u<c;++u){var h=aT(s[u].offset)*100+"%",f=s[u].color,d=Uv(f),p=d.color,g=d.opacity,v={offset:h};v["stop-color"]=p,g<1&&(v["stop-opacity"]=g),l.push(gr("stop",u+"",v))}var m=gr(a,"",o,l),y=X2(m),_=n.gradientCache,x=_[y];x||(x=n.zrId+"-g"+n.gradientIdx++,_[y]=x,o.id=x,n.defs[x]=gr(a,x,o,l)),e[t]=m1(x)}function r8(r,e,t,n){var i=r.style[t],a=r.getBoundingRect(),o={},s=i.repeat,l=s==="no-repeat",u=s==="repeat-x",c=s==="repeat-y",h;if(s4(i)){var f=i.imageWidth,d=i.imageHeight,p=void 0,g=i.image;if(ke(g)?p=g:JH(g)?p=g.src:e8(g)&&(p=g.toDataURL()),typeof Image=="undefined"){var v="Image width/height must been given explictly in svg-ssr renderer.";gi(f,v),gi(d,v)}else if(f==null||d==null){var m=function(b,T){if(b){var P=b.elm,D=f||T.width,L=d||T.height;b.tag==="pattern"&&(u?(L=1,D/=a.width):c&&(D=1,L/=a.height)),b.attrs.width=D,b.attrs.height=L,P&&(P.setAttribute("width",D),P.setAttribute("height",L))}},y=n2(p,null,r,function(b){l||m(A,b),m(h,b)});y&&y.width&&y.height&&(f=f||y.width,d=d||y.height)}h=gr("image","img",{href:p,width:f,height:d}),o.width=f,o.height=d}else i.svgElement&&(h=Je(i.svgElement),o.width=i.svgWidth,o.height=i.svgHeight);if(h){var _,x;l?_=x=1:u?(x=1,_=o.width/a.width):c?(_=1,x=o.height/a.height):o.patternUnits="userSpaceOnUse",_!=null&&!isNaN(_)&&(o.width=_),x!=null&&!isNaN(x)&&(o.height=x);var S=f4(i);S&&(o.patternTransform=S);var A=gr("pattern","",o,[h]),w=X2(A),M=n.patternCache,C=M[w];C||(C=n.zrId+"-p"+n.patternIdx++,M[w]=C,o.id=C,A=n.defs[C]=gr("pattern",C,o,[h])),e[t]=m1(C)}}function jpe(r,e,t){var n=t.clipPathCache,i=t.defs,a=n[r.id];if(!a){a=t.zrId+"-c"+t.clipPathIdx++;var o={id:a};n[r.id]=a,i[a]=gr("clipPath",a,o,[t8(r,t)])}e["clip-path"]=m1(a)}function kk(r){return document.createTextNode(r)}function Qu(r,e,t){r.insertBefore(e,t)}function Ok(r,e){r.removeChild(e)}function Fk(r,e){r.appendChild(e)}function i8(r){return r.parentNode}function a8(r){return r.nextSibling}function kA(r,e){r.textContent=e}var Bk=58,Kpe=120,Zpe=gr("","");function YT(r){return r===void 0}function Lo(r){return r!==void 0}function Qpe(r,e,t){for(var n={},i=e;i<=t;++i){var a=r[i].key;a!==void 0&&(n[a]=i)}return n}function Op(r,e){var t=r.key===e.key,n=r.tag===e.tag;return n&&t}function tg(r){var e,t=r.children,n=r.tag;if(Lo(n)){var i=r.elm=KH(n);if(K2(Zpe,r),_e(t))for(e=0;e<t.length;++e){var a=t[e];a!=null&&Fk(i,tg(a))}else Lo(r.text)&&!Qe(r.text)&&Fk(i,kk(r.text))}else r.elm=kk(r.text);return r.elm}function o8(r,e,t,n,i){for(;n<=i;++n){var a=t[n];a!=null&&Qu(r,tg(a),e)}}function A_(r,e,t,n){for(;t<=n;++t){var i=e[t];if(i!=null)if(Lo(i.tag)){var a=i8(i.elm);Ok(a,i.elm)}else Ok(r,i.elm)}}function K2(r,e){var t,n=e.elm,i=r&&r.attrs||{},a=e.attrs||{};if(i!==a){for(t in a){var o=a[t],s=i[t];s!==o&&(o===!0?n.setAttribute(t,""):o===!1?n.removeAttribute(t):t==="style"?n.style.cssText=o:t.charCodeAt(0)!==Kpe?n.setAttribute(t,o):t==="xmlns:xlink"||t==="xmlns"?n.setAttributeNS(Rpe,t,o):t.charCodeAt(3)===Bk?n.setAttributeNS(Dpe,t,o):t.charCodeAt(5)===Bk?n.setAttributeNS(jH,t,o):n.setAttribute(t,o))}for(t in i)t in a||n.removeAttribute(t)}}function Jpe(r,e,t){for(var n=0,i=0,a=e.length-1,o=e[0],s=e[a],l=t.length-1,u=t[0],c=t[l],h,f,d,p;n<=a&&i<=l;)o==null?o=e[++n]:s==null?s=e[--a]:u==null?u=t[++i]:c==null?c=t[--l]:Op(o,u)?(rf(o,u),o=e[++n],u=t[++i]):Op(s,c)?(rf(s,c),s=e[--a],c=t[--l]):Op(o,c)?(rf(o,c),Qu(r,o.elm,a8(s.elm)),o=e[++n],c=t[--l]):Op(s,u)?(rf(s,u),Qu(r,s.elm,o.elm),s=e[--a],u=t[++i]):(YT(h)&&(h=Qpe(e,n,a)),f=h[u.key],YT(f)?Qu(r,tg(u),o.elm):(d=e[f],d.tag!==u.tag?Qu(r,tg(u),o.elm):(rf(d,u),e[f]=void 0,Qu(r,d.elm,o.elm))),u=t[++i]);(n<=a||i<=l)&&(n>a?(p=t[l+1]==null?null:t[l+1].elm,o8(r,p,t,i,l)):A_(r,e,n,a))}function rf(r,e){var t=e.elm=r.elm,n=r.children,i=e.children;r!==e&&(K2(r,e),YT(e.text)?Lo(n)&&Lo(i)?n!==i&&Jpe(t,n,i):Lo(i)?(Lo(r.text)&&kA(t,""),o8(t,null,i,0,i.length-1)):Lo(n)?A_(t,n,0,n.length-1):Lo(r.text)&&kA(t,""):r.text!==e.text&&(Lo(n)&&A_(t,n,0,n.length-1),kA(t,e.text)))}function eve(r,e){if(Op(r,e))rf(r,e);else{var t=r.elm,n=i8(t);tg(e),n!==null&&(Qu(n,e.elm,a8(t)),A_(n,[r],0,0))}return e}var tve=0,nve=function(){function r(e,t,n){if(this.type="svg",this.refreshHover=zk(),this.configLayer=zk(),this.storage=t,this._opts=n=pe({},n),this.root=e,this._id="zr"+tve++,this._oldVNode=Ck(n.width,n.height),e&&!n.ssr){var i=this._viewport=document.createElement("div");i.style.cssText="position:relative;overflow:hidden";var a=this._svgDom=this._oldVNode.elm=KH("svg");K2(null,this._oldVNode),i.appendChild(a),e.appendChild(i)}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",eve(this._oldVNode,e),this._oldVNode=e}},r.prototype.renderOneToVNode=function(e){return Nk(e,XT(this._id))},r.prototype.renderToVNode=function(e){e=e||{};var t=this.storage.getDisplayList(!0),n=this._width,i=this._height,a=XT(this._id);a.animation=e.animation,a.willUpdate=e.willUpdate,a.compress=e.compress,a.emphasis=e.emphasis,a.ssr=this._opts.ssr;var o=[],s=this._bgVNode=rve(n,i,this._backgroundColor,a);s&&o.push(s);var l=e.compress?null:this._mainVNode=gr("g","main",{},[]);this._paintList(t,a,l?l.children:o),l&&o.push(l);var u=xe(wt(a.defs),function(f){return a.defs[f]});if(u.length&&o.push(gr("defs","defs",{},u)),e.animation){var c=kpe(a.cssNodes,a.cssAnims,{newline:!0});if(c){var h=gr("style","stl",{},[],c);o.push(h)}}return Ck(n,i,o,e.useViewBox)},r.prototype.renderToString=function(e){return e=e||{},X2(this.renderToVNode({animation:ot(e.cssAnimation,!0),emphasis:ot(e.cssEmphasis,!0),willUpdate:!1,compress:!0,useViewBox:ot(e.useViewBox,!0)}),{newline:!0})},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e},r.prototype.getSvgRoot=function(){return this._mainVNode&&this._mainVNode.elm},r.prototype._paintList=function(e,t,n){for(var i=e.length,a=[],o=0,s,l,u=0,c=0;c<i;c++){var h=e[c];if(!h.invisible){var f=h.__clipPaths,d=f&&f.length||0,p=l&&l.length||0,g=void 0;for(g=Math.max(d-1,p-1);g>=0&&!(f&&l&&f[g]===l[g]);g--);for(var v=p-1;v>g;v--)o--,s=a[o-1];for(var m=g+1;m<d;m++){var y={};jpe(f[m],y,t);var _=gr("g","clip-g-"+u++,y,[]);(s?s.children:n).push(_),a[o++]=_,s=_}l=f;var x=Nk(h,t);x&&(s?s.children:n).push(x)}}},r.prototype.resize=function(e,t){var n=this._opts,i=this.root,a=this._viewport;if(e!=null&&(n.width=e),t!=null&&(n.height=t),i&&a&&(a.style.display="none",e=gf(i,0,n),t=gf(i,1,n),a.style.display=""),this._width!==e||this._height!==t){if(this._width=e,this._height=t,a){var o=a.style;o.width=e+"px",o.height=t+"px"}if(jC(this._backgroundColor))this.refresh();else{var s=this._svgDom;s&&(s.setAttribute("width",e),s.setAttribute("height",t));var l=this._bgVNode&&this._bgVNode.elm;l&&(l.setAttribute("width",e),l.setAttribute("height",t))}}},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r.prototype.dispose=function(){this.root&&(this.root.innerHTML=""),this._svgDom=this._viewport=this.storage=this._oldVNode=this._bgVNode=this._mainVNode=null},r.prototype.clear=function(){this._svgDom&&(this._svgDom.innerHTML=null),this._oldVNode=null},r.prototype.toDataURL=function(e){var t=this.renderToString(),n="data:image/svg+xml;";return e?(t=Uoe(t),t&&n+"base64,"+t):n+"charset=UTF-8,"+encodeURIComponent(t)},r}();function zk(r){return function(){}}function rve(r,e,t,n){var i;if(t&&t!=="none")if(i=gr("rect","bg",{width:r,height:e,x:"0",y:"0"}),c4(t))n8({fill:t},i.attrs,"fill",n);else if(jC(t))r8({style:{fill:t},dirty:qn,getBoundingRect:function(){return{width:r,height:e}}},i.attrs,"fill",n);else{var a=Uv(t),o=a.color,s=a.opacity;i.attrs.fill=o,s<1&&(i.attrs["fill-opacity"]=s)}return i}const ive=nve;function ave(r){r.registerPainter("svg",ive)}function Uk(r,e,t){var n=ql.createCanvas(),i=e.getWidth(),a=e.getHeight(),o=n.style;return o&&(o.position="absolute",o.left="0",o.top="0",o.width=i+"px",o.height=a+"px",n.setAttribute("data-zr-dom-id",r)),n.width=i*t,n.height=a*t,n}var ove=function(r){ae(e,r);function e(t,n,i){var a=r.call(this)||this;a.motionBlur=!1,a.lastFrameAlpha=.7,a.dpr=1,a.virtual=!1,a.config={},a.incremental=!1,a.zlevel=0,a.maxRepaintRectCount=5,a.__dirty=!0,a.__firstTimePaint=!0,a.__used=!1,a.__drawIndex=0,a.__startIndex=0,a.__endIndex=0,a.__prevStartIndex=null,a.__prevEndIndex=null;var o;i=i||t_,typeof t=="string"?o=Uk(t,n,i):Qe(t)&&(o=t,t=o.id),a.id=t,a.dom=o;var s=o.style;return s&&($U(o),o.onselectstart=function(){return!1},s.padding="0",s.margin="0",s.borderWidth="0"),a.painter=n,a.dpr=i,a}return e.prototype.getElementCount=function(){return this.__endIndex-this.__startIndex},e.prototype.afterBrush=function(){this.__prevStartIndex=this.__startIndex,this.__prevEndIndex=this.__endIndex},e.prototype.initContext=function(){this.ctx=this.dom.getContext("2d"),this.ctx.dpr=this.dpr},e.prototype.setUnpainted=function(){this.__firstTimePaint=!0},e.prototype.createBackBuffer=function(){var t=this.dpr;this.domBack=Uk("back-"+this.id,this.painter,t),this.ctxBack=this.domBack.getContext("2d"),t!==1&&this.ctxBack.scale(t,t)},e.prototype.createRepaintRects=function(t,n,i,a){if(this.__firstTimePaint)return this.__firstTimePaint=!1,null;var o=[],s=this.maxRepaintRectCount,l=!1,u=new dt(0,0,0,0);function c(y){if(!(!y.isFinite()||y.isZero()))if(o.length===0){var _=new dt(0,0,0,0);_.copy(y),o.push(_)}else{for(var x=!1,S=1/0,A=0,w=0;w<o.length;++w){var M=o[w];if(M.intersect(y)){var C=new dt(0,0,0,0);C.copy(M),C.union(y),o[w]=C,x=!0;break}else if(l){u.copy(y),u.union(M);var b=y.width*y.height,T=M.width*M.height,P=u.width*u.height,D=P-b-T;D<S&&(S=D,A=w)}}if(l&&(o[A].union(y),x=!0),!x){var _=new dt(0,0,0,0);_.copy(y),o.push(_)}l||(l=o.length>=s)}}for(var h=this.__startIndex;h<this.__endIndex;++h){var f=t[h];if(f){var d=f.shouldBePainted(i,a,!0,!0),p=f.__isRendered&&(f.__dirty&ji||!d)?f.getPrevPaintRect():null;p&&c(p);var g=d&&(f.__dirty&ji||!f.__isRendered)?f.getPaintRect():null;g&&c(g)}}for(var h=this.__prevStartIndex;h<this.__prevEndIndex;++h){var f=n[h],d=f&&f.shouldBePainted(i,a,!0,!0);if(f&&(!d||!f.__zr)&&f.__isRendered){var p=f.getPrevPaintRect();p&&c(p)}}var v;do{v=!1;for(var h=0;h<o.length;){if(o[h].isZero()){o.splice(h,1);continue}for(var m=h+1;m<o.length;)o[h].intersect(o[m])?(v=!0,o[h].union(o[m]),o.splice(m,1)):m++;h++}}while(v);return this._paintRects=o,o},e.prototype.debugGetPaintRects=function(){return(this._paintRects||[]).slice()},e.prototype.resize=function(t,n){var i=this.dpr,a=this.dom,o=a.style,s=this.domBack;o&&(o.width=t+"px",o.height=n+"px"),a.width=t*i,a.height=n*i,s&&(s.width=t*i,s.height=n*i,i!==1&&this.ctxBack.scale(i,i))},e.prototype.clear=function(t,n,i){var a=this.dom,o=this.ctx,s=a.width,l=a.height;n=n||this.clearColor;var u=this.motionBlur&&!t,c=this.lastFrameAlpha,h=this.dpr,f=this;u&&(this.domBack||this.createBackBuffer(),this.ctxBack.globalCompositeOperation="copy",this.ctxBack.drawImage(a,0,0,s/h,l/h));var d=this.domBack;function p(g,v,m,y){if(o.clearRect(g,v,m,y),n&&n!=="transparent"){var _=void 0;if(p1(n)){var x=n.global||n.__width===m&&n.__height===y;_=x&&n.__canvasGradient||FT(o,n,{x:0,y:0,width:m,height:y}),n.__canvasGradient=_,n.__width=m,n.__height=y}else Uae(n)&&(n.scaleX=n.scaleX||h,n.scaleY=n.scaleY||h,_=BT(o,n,{dirty:function(){f.setUnpainted(),f.painter.refresh()}}));o.save(),o.fillStyle=_||n,o.fillRect(g,v,m,y),o.restore()}u&&(o.save(),o.globalAlpha=c,o.drawImage(d,g,v,m,y),o.restore())}!i||u?p(0,0,s,l):i.length&&k(i,function(g){p(g.x*h,g.y*h,g.width*h,g.height*h)})},e}(Ba);const OA=ove;var Vk=1e5,Uu=314159,my=.01,sve=.001;function lve(r){return r?r.__builtin__?!0:!(typeof r.resize!="function"||typeof r.refresh!="function"):!1}function uve(r,e){var t=document.createElement("div");return t.style.cssText=["position:relative","width:"+r+"px","height:"+e+"px","padding:0","margin:0","border-width:0"].join(";")+";",t}var cve=function(){function r(e,t,n,i){this.type="canvas",this._zlevelList=[],this._prevDisplayList=[],this._layers={},this._layerConfig={},this._needsManuallyCompositing=!1,this.type="canvas";var a=!e.nodeName||e.nodeName.toUpperCase()==="CANVAS";this._opts=n=pe({},n||{}),this.dpr=n.devicePixelRatio||t_,this._singleCanvas=a,this.root=e;var o=e.style;o&&($U(e),e.innerHTML=""),this.storage=t;var s=this._zlevelList;this._prevDisplayList=[];var l=this._layers;if(a){var c=e,h=c.width,f=c.height;n.width!=null&&(h=n.width),n.height!=null&&(f=n.height),this.dpr=n.devicePixelRatio||1,c.width=h*this.dpr,c.height=f*this.dpr,this._width=h,this._height=f;var d=new OA(c,this,this.dpr);d.__builtin__=!0,d.initContext(),l[Uu]=d,d.zlevel=Uu,s.push(Uu),this._domRoot=e}else{this._width=gf(e,0,n),this._height=gf(e,1,n);var u=this._domRoot=uve(this._width,this._height);e.appendChild(u)}}return r.prototype.getType=function(){return"canvas"},r.prototype.isSingleCanvas=function(){return this._singleCanvas},r.prototype.getViewportRoot=function(){return this._domRoot},r.prototype.getViewportRootOffset=function(){var e=this.getViewportRoot();if(e)return{offsetLeft:e.offsetLeft||0,offsetTop:e.offsetTop||0}},r.prototype.refresh=function(e){var t=this.storage.getDisplayList(!0),n=this._prevDisplayList,i=this._zlevelList;this._redrawId=Math.random(),this._paintList(t,n,e,this._redrawId);for(var a=0;a<i.length;a++){var o=i[a],s=this._layers[o];if(!s.__builtin__&&s.refresh){var l=a===0?this._backgroundColor:null;s.refresh(l)}}return this._opts.useDirtyRect&&(this._prevDisplayList=t.slice()),this},r.prototype.refreshHover=function(){this._paintHoverList(this.storage.getDisplayList(!1))},r.prototype._paintHoverList=function(e){var t=e.length,n=this._hoverlayer;if(n&&n.clear(),!!t){for(var i={inHover:!0,viewWidth:this._width,viewHeight:this._height},a,o=0;o<t;o++){var s=e[o];s.__inHover&&(n||(n=this._hoverlayer=this.getLayer(Vk)),a||(a=n.ctx,a.save()),cc(a,s,i,o===t-1))}a&&a.restore()}},r.prototype.getHoverLayer=function(){return this.getLayer(Vk)},r.prototype.paintOne=function(e,t){UG(e,t)},r.prototype._paintList=function(e,t,n,i){if(this._redrawId===i){n=n||!1,this._updateLayerStatus(e);var a=this._doPaintList(e,t,n),o=a.finished,s=a.needsRefreshHover;if(this._needsManuallyCompositing&&this._compositeManually(),s&&this._paintHoverList(e),o)this.eachLayer(function(u){u.afterBrush&&u.afterBrush()});else{var l=this;Jb(function(){l._paintList(e,t,n,i)})}}},r.prototype._compositeManually=function(){var e=this.getLayer(Uu).ctx,t=this._domRoot.width,n=this._domRoot.height;e.clearRect(0,0,t,n),this.eachBuiltinLayer(function(i){i.virtual&&e.drawImage(i.dom,0,0,t,n)})},r.prototype._doPaintList=function(e,t,n){for(var i=this,a=[],o=this._opts.useDirtyRect,s=0;s<this._zlevelList.length;s++){var l=this._zlevelList[s],u=this._layers[l];u.__builtin__&&u!==this._hoverlayer&&(u.__dirty||n)&&a.push(u)}for(var c=!0,h=!1,f=function(g){var v=a[g],m=v.ctx,y=o&&v.createRepaintRects(e,t,d._width,d._height),_=n?v.__startIndex:v.__drawIndex,x=!n&&v.incremental&&Date.now,S=x&&Date.now(),A=v.zlevel===d._zlevelList[0]?d._backgroundColor:null;if(v.__startIndex===v.__endIndex)v.clear(!1,A,y);else if(_===v.__startIndex){var w=e[_];(!w.incremental||!w.notClear||n)&&v.clear(!1,A,y)}_===-1&&(console.error("For some unknown reason. drawIndex is -1"),_=v.__startIndex);var M,C=function(D){var L={inHover:!1,allClipped:!1,prevEl:null,viewWidth:i._width,viewHeight:i._height};for(M=_;M<v.__endIndex;M++){var E=e[M];if(E.__inHover&&(h=!0),i._doPaintEl(E,v,o,D,L,M===v.__endIndex-1),x){var I=Date.now()-S;if(I>15)break}}L.prevElClipPaths&&m.restore()};if(y)if(y.length===0)M=v.__endIndex;else for(var b=d.dpr,T=0;T<y.length;++T){var P=y[T];m.save(),m.beginPath(),m.rect(P.x*b,P.y*b,P.width*b,P.height*b),m.clip(),C(P),m.restore()}else m.save(),C(),m.restore();v.__drawIndex=M,v.__drawIndex<v.__endIndex&&(c=!1)},d=this,p=0;p<a.length;p++)f(p);return kt.wxa&&k(this._layers,function(g){g&&g.ctx&&g.ctx.draw&&g.ctx.draw()}),{finished:c,needsRefreshHover:h}},r.prototype._doPaintEl=function(e,t,n,i,a,o){var s=t.ctx;if(n){var l=e.getPaintRect();(!i||l&&l.intersect(i))&&(cc(s,e,a,o),e.setPrevPaintRect(l))}else cc(s,e,a,o)},r.prototype.getLayer=function(e,t){this._singleCanvas&&!this._needsManuallyCompositing&&(e=Uu);var n=this._layers[e];return n||(n=new OA("zr_"+e,this,this.dpr),n.zlevel=e,n.__builtin__=!0,this._layerConfig[e]?ht(n,this._layerConfig[e],!0):this._layerConfig[e-my]&&ht(n,this._layerConfig[e-my],!0),t&&(n.virtual=t),this.insertLayer(e,n),n.initContext()),n},r.prototype.insertLayer=function(e,t){var n=this._layers,i=this._zlevelList,a=i.length,o=this._domRoot,s=null,l=-1;if(!n[e]&&lve(t)){if(a>0&&e>i[0]){for(l=0;l<a-1&&!(i[l]<e&&i[l+1]>e);l++);s=n[i[l]]}if(i.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,i=0;i<n.length;i++){var a=n[i];e.call(t,this._layers[a],a)}},r.prototype.eachBuiltinLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__&&e.call(t,o,a)}},r.prototype.eachOtherLayer=function(e,t){for(var n=this._zlevelList,i=0;i<n.length;i++){var a=n[i],o=this._layers[a];o.__builtin__||e.call(t,o,a)}},r.prototype.getLayers=function(){return this._layers},r.prototype._updateLayerStatus=function(e){this.eachBuiltinLayer(function(h,f){h.__dirty=h.__used=!1});function t(h){a&&(a.__endIndex!==h&&(a.__dirty=!0),a.__endIndex=h)}if(this._singleCanvas)for(var n=1;n<e.length;n++){var i=e[n];if(i.zlevel!==e[n-1].zlevel||i.incremental){this._needsManuallyCompositing=!0;break}}var a=null,o=0,s,l;for(l=0;l<e.length;l++){var i=e[l],u=i.zlevel,c=void 0;s!==u&&(s=u,o=0),i.incremental?(c=this.getLayer(u+sve,this._needsManuallyCompositing),c.incremental=!0,o=1):c=this.getLayer(u+(o>0?my:0),this._needsManuallyCompositing),c.__builtin__||VC("ZLevel "+u+" has been used by unkown layer "+c.id),c!==a&&(c.__used=!0,c.__startIndex!==l&&(c.__dirty=!0),c.__startIndex=l,c.incremental?c.__drawIndex=-1:c.__drawIndex=l,t(l),a=c),i.__dirty&ji&&!i.__inHover&&(c.__dirty=!0,c.incremental&&c.__drawIndex<0&&(c.__drawIndex=l))}t(l),this.eachBuiltinLayer(function(h,f){!h.__used&&h.getElementCount()>0&&(h.__dirty=!0,h.__startIndex=h.__endIndex=h.__drawIndex=0),h.__dirty&&h.__drawIndex<0&&(h.__drawIndex=h.__startIndex)})},r.prototype.clear=function(){return this.eachBuiltinLayer(this._clearLayer),this},r.prototype._clearLayer=function(e){e.clear()},r.prototype.setBackgroundColor=function(e){this._backgroundColor=e,k(this._layers,function(t){t.setUnpainted()})},r.prototype.configLayer=function(e,t){if(t){var n=this._layerConfig;n[e]?ht(n[e],t,!0):n[e]=t;for(var i=0;i<this._zlevelList.length;i++){var a=this._zlevelList[i];if(a===e||a===e+my){var o=this._layers[a];ht(o,n[e],!0)}}}},r.prototype.delLayer=function(e){var t=this._layers,n=this._zlevelList,i=t[e];i&&(i.dom.parentNode.removeChild(i.dom),delete t[e],n.splice(pt(n,e),1))},r.prototype.resize=function(e,t){if(this._domRoot.style){var n=this._domRoot;n.style.display="none";var i=this._opts,a=this.root;if(e!=null&&(i.width=e),t!=null&&(i.height=t),e=gf(a,0,i),t=gf(a,1,i),n.style.display="",this._width!==e||t!==this._height){n.style.width=e+"px",n.style.height=t+"px";for(var o in this._layers)this._layers.hasOwnProperty(o)&&this._layers[o].resize(e,t);this.refresh(!0)}this._width=e,this._height=t}else{if(e==null||t==null)return;this._width=e,this._height=t,this.getLayer(Uu).resize(e,t)}return this},r.prototype.clearLayer=function(e){var t=this._layers[e];t&&t.clear()},r.prototype.dispose=function(){this.root.innerHTML="",this.root=this.storage=this._domRoot=this._layers=null},r.prototype.getRenderedCanvas=function(e){if(e=e||{},this._singleCanvas&&!this._compositeManually)return this._layers[Uu].dom;var t=new OA("image",this,e.pixelRatio||this.dpr);t.initContext(),t.clear(!1,e.backgroundColor||this._backgroundColor);var n=t.ctx;if(e.pixelRatio<=this.dpr){this.refresh();var i=t.dom.width,a=t.dom.height;this.eachLayer(function(h){h.__builtin__?n.drawImage(h.dom,0,0,i,a):h.renderToCanvas&&(n.save(),h.renderToCanvas(n),n.restore())})}else for(var o={inHover:!1,viewWidth:this._width,viewHeight:this._height},s=this.storage.getDisplayList(!0),l=0,u=s.length;l<u;l++){var c=s[l];cc(n,c,o,l===u-1)}return t.dom},r.prototype.getWidth=function(){return this._width},r.prototype.getHeight=function(){return this._height},r}();const hve=cve;function fve(r){r.registerPainter("canvas",hve)}var dve=function(r){ae(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){return Us(null,this,{useEncodeDefaulter:!0})},e.prototype.getLegendIcon=function(t){var n=new rt,i=rr("line",0,t.itemHeight/2,t.itemWidth,0,t.lineStyle.stroke,!1);n.add(i),i.setStyle(t.lineStyle);var a=this.getData().getVisual("symbol"),o=this.getData().getVisual("symbolRotate"),s=a==="none"?"circle":a,l=t.itemHeight*.8,u=rr(s,(t.itemWidth-l)/2,(t.itemHeight-l)/2,l,l,t.itemStyle.fill);n.add(u),u.setStyle(t.itemStyle);var c=t.iconRotate==="inherit"?o:t.iconRotate||0;return u.rotation=c*Math.PI/180,u.setOrigin([t.itemWidth/2,t.itemHeight/2]),s.indexOf("empty")>-1&&(u.style.stroke=u.style.fill,u.style.fill="#fff",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:4,symbolRotate:null,showSymbol:!0,showAllSymbol:"auto",connectNulls:!1,sampling:"none",animationEasing:"linear",progressive:0,hoverLayerThreshold:1/0,universalTransition:{divideShape:"clone"},triggerLineEvent:!1},e}(En);const pve=dve;function nd(r,e){var t=r.mapDimensionsAll("defaultedLabel"),n=t.length;if(n===1){var i=Jf(r,e,t[0]);return i!=null?i+"":null}else if(n){for(var a=[],o=0;o<t.length;o++)a.push(Jf(r,e,t[o]));return a.join(" ")}}function s8(r,e){var t=r.mapDimensionsAll("defaultedLabel");if(!_e(e))return e+"";for(var n=[],i=0;i<t.length;i++){var a=r.getDimensionIndex(t[i]);a>=0&&n.push(e[a])}return n.join(" ")}var vve=function(r){ae(e,r);function e(t,n,i,a){var o=r.call(this)||this;return o.updateData(t,n,i,a),o}return e.prototype._createSymbol=function(t,n,i,a,o){this.removeAll();var s=rr(t,-1,-1,2,2,null,o);s.attr({z2:100,culling:!0,scaleX:a[0]/2,scaleY:a[1]/2}),s.drift=gve,this._symbolType=t,this.add(s)},e.prototype.stopSymbolAnimation=function(t){this.childAt(0).stopAnimation(null,t)},e.prototype.getSymbolType=function(){return this._symbolType},e.prototype.getSymbolPath=function(){return this.childAt(0)},e.prototype.highlight=function(){Ds(this.childAt(0))},e.prototype.downplay=function(){Is(this.childAt(0))},e.prototype.setZ=function(t,n){var i=this.childAt(0);i.zlevel=t,i.z=n},e.prototype.setDraggable=function(t,n){var i=this.childAt(0);i.draggable=t,i.cursor=!n&&t?"move":i.cursor},e.prototype.updateData=function(t,n,i,a){this.silent=!1;var o=t.getItemVisual(n,"symbol")||"circle",s=t.hostModel,l=e.getSymbolSize(t,n),u=o!==this._symbolType,c=a&&a.disableAnimation;if(u){var h=t.getItemVisual(n,"symbolKeepAspect");this._createSymbol(o,t,n,l,h)}else{var f=this.childAt(0);f.silent=!1;var d={scaleX:l[0]/2,scaleY:l[1]/2};c?f.attr(d):zt(f,d,s,n),lo(f)}if(this._updateCommon(t,n,l,i,a),u){var f=this.childAt(0);if(!c){var d={scaleX:this._sizeX,scaleY:this._sizeY,style:{opacity:f.style.opacity}};f.scaleX=f.scaleY=0,f.style.opacity=0,Tn(f,d,s,n)}}c&&this.childAt(0).stopAnimation("leave")},e.prototype._updateCommon=function(t,n,i,a,o){var s=this.childAt(0),l=t.hostModel,u,c,h,f,d,p,g,v,m;if(a&&(u=a.emphasisItemStyle,c=a.blurItemStyle,h=a.selectItemStyle,f=a.focus,d=a.blurScope,g=a.labelStatesModels,v=a.hoverScale,m=a.cursorStyle,p=a.emphasisDisabled),!a||t.hasItemOption){var y=a&&a.itemModel?a.itemModel:t.getItemModel(n),_=y.getModel("emphasis");u=_.getModel("itemStyle").getItemStyle(),h=y.getModel(["select","itemStyle"]).getItemStyle(),c=y.getModel(["blur","itemStyle"]).getItemStyle(),f=_.get("focus"),d=_.get("blurScope"),p=_.get("disabled"),g=Sr(y),v=_.getShallow("scale"),m=y.getShallow("cursor")}var x=t.getItemVisual(n,"symbolRotate");s.attr("rotation",(x||0)*Math.PI/180||0);var S=Jc(t.getItemVisual(n,"symbolOffset"),i);S&&(s.x=S[0],s.y=S[1]),m&&s.attr("cursor",m);var A=t.getItemVisual(n,"style"),w=A.fill;if(s instanceof Ur){var M=s.style;s.useStyle(pe({image:M.image,x:M.x,y:M.y,width:M.width,height:M.height},A))}else s.__isEmptyBrush?s.useStyle(pe({},A)):s.useStyle(A),s.style.decal=null,s.setColor(w,o&&o.symbolInnerColor),s.style.strokeNoScale=!0;var C=t.getItemVisual(n,"liftZ"),b=this._z2;C!=null?b==null&&(this._z2=s.z2,s.z2+=C):b!=null&&(s.z2=b,this._z2=null);var T=o&&o.useNameLabel;zr(s,g,{labelFetcher:l,labelDataIndex:n,defaultText:P,inheritColor:w,defaultOpacity:A.opacity});function P(E){return T?t.getName(E):nd(t,E)}this._sizeX=i[0]/2,this._sizeY=i[1]/2;var D=s.ensureState("emphasis");D.style=u,s.ensureState("select").style=h,s.ensureState("blur").style=c;var L=v==null||v===!0?Math.max(1.1,3/this._sizeY):isFinite(v)&&v>0?+v:1;D.scaleX=this._sizeX*L,D.scaleY=this._sizeY*L,this.setSymbolScale(1),Rn(this,f,d,p)},e.prototype.setSymbolScale=function(t){this.scaleX=this.scaleY=t},e.prototype.fadeOut=function(t,n,i){var a=this.childAt(0),o=at(this).dataIndex,s=i&&i.animation;if(this.silent=a.silent=!0,i&&i.fadeLabel){var l=a.getTextContent();l&&Kl(l,{style:{opacity:0}},n,{dataIndex:o,removeOpt:s,cb:function(){a.removeTextContent()}})}else a.removeTextContent();Kl(a,{style:{opacity:0},scaleX:0,scaleY:0},n,{dataIndex:o,cb:t,removeOpt:s})},e.getSymbolSize=function(t,n){return Cd(t.getItemVisual(n,"symbolSize"))},e}(rt);function gve(r,e){this.parent.drift(r,e)}const Dg=vve;function FA(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 Gk(r){return r!=null&&!Qe(r)&&(r={isIgnore:r}),r||{}}function Hk(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:Sr(e),cursorStyle:e.get("cursor")}}var mve=function(){function r(e){this.group=new rt,this._SymbolCtor=e||Dg}return r.prototype.updateData=function(e,t){this._progressiveEls=null,t=Gk(t);var n=this.group,i=e.hostModel,a=this._data,o=this._SymbolCtor,s=t.disableAnimation,l=Hk(e),u={disableAnimation:s},c=t.getSymbolPoint||function(h){return e.getItemLayout(h)};a||n.removeAll(),e.diff(a).add(function(h){var f=c(h);if(FA(e,f,h,t)){var d=new o(e,h,l,u);d.setPosition(f),e.setItemGraphicEl(h,d),n.add(d)}}).update(function(h,f){var d=a.getItemGraphicEl(f),p=c(h);if(!FA(e,p,h,t)){n.remove(d);return}var g=e.getItemVisual(h,"symbol")||"circle",v=d&&d.getSymbolType&&d.getSymbolType();if(!d||v&&v!==g)n.remove(d),d=new o(e,h,l,u),d.setPosition(p);else{d.updateData(e,h,l,u);var m={x:p[0],y:p[1]};s?d.attr(m):zt(d,m,i)}n.add(d),e.setItemGraphicEl(h,d)}).remove(function(h){var f=a.getItemGraphicEl(h);f&&f.fadeOut(function(){n.remove(f)},i)}).execute(),this._getSymbolPoint=c,this._data=e},r.prototype.updateLayout=function(){var e=this,t=this._data;t&&t.eachItemGraphicEl(function(n,i){var a=e._getSymbolPoint(i);n.setPosition(a),n.markRedraw()})},r.prototype.incrementalPrepareUpdate=function(e){this._seriesScope=Hk(e),this._data=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t,n){this._progressiveEls=[],n=Gk(n);function i(l){l.isGroup||(l.incremental=!0,l.ensureState("emphasis").hoverLayer=!0)}for(var a=e.start;a<e.end;a++){var o=t.getItemLayout(a);if(FA(t,o,a,n)){var s=new this._SymbolCtor(t,a,this._seriesScope);s.traverse(i),s.setPosition(o),this.group.add(s),t.setItemGraphicEl(a,s),this._progressiveEls.push(s)}}},r.prototype.eachRendered=function(e){ou(this._progressiveEls||this.group,e)},r.prototype.remove=function(e){var t=this.group,n=this._data;n&&e?n.eachItemGraphicEl(function(i){i.fadeOut(function(){t.remove(i)},n.hostModel)}):t.removeAll()},r}();const Ig=mve;function l8(r,e,t){var n=r.getBaseAxis(),i=r.getOtherAxis(n),a=yve(i,t),o=n.dim,s=i.dim,l=e.mapDimension(s),u=e.mapDimension(o),c=s==="x"||s==="radius"?1:0,h=xe(r.dimensions,function(p){return e.mapDimension(p)}),f=!1,d=e.getCalculationInfo("stackResultDimension");return Ql(e,h[0])&&(f=!0,h[0]=d),Ql(e,h[1])&&(f=!0,h[1]=d),{dataDimsForPoint:h,valueStart:a,valueAxisDim:s,baseAxisDim:o,stacked:!!f,valueDim:l,baseDim:u,baseDataOffset:c,stackedOverDimension:e.getCalculationInfo("stackedOverDimension")}}function yve(r,e){var t=0,n=r.scale.getExtent();return e==="start"?t=n[0]:e==="end"?t=n[1]:Ft(e)&&!isNaN(e)?t=e:n[0]>0?t=n[0]:n[1]<0&&(t=n[1]),t}function u8(r,e,t,n){var i=NaN;r.stacked&&(i=t.get(t.getCalculationInfo("stackedOverDimension"),n)),isNaN(i)&&(i=r.valueStart);var a=r.baseDataOffset,o=[];return o[a]=t.get(r.baseDim,n),o[1-a]=i,e.dataToPoint(o)}function _ve(r,e){var t=[];return e.diff(r).add(function(n){t.push({cmd:"+",idx:n})}).update(function(n,i){t.push({cmd:"=",idx:i,idx1:n})}).remove(function(n){t.push({cmd:"-",idx:n})}).execute(),t}function xve(r,e,t,n,i,a,o,s){for(var l=_ve(r,e),u=[],c=[],h=[],f=[],d=[],p=[],g=[],v=l8(i,e,o),m=r.getLayout("points")||[],y=e.getLayout("points")||[],_=0;_<l.length;_++){var x=l[_],S=!0,A=void 0,w=void 0;switch(x.cmd){case"=":A=x.idx*2,w=x.idx1*2;var M=m[A],C=m[A+1],b=y[w],T=y[w+1];(isNaN(M)||isNaN(C))&&(M=b,C=T),u.push(M,C),c.push(b,T),h.push(t[A],t[A+1]),f.push(n[w],n[w+1]),g.push(e.getRawIndex(x.idx1));break;case"+":var P=x.idx,D=v.dataDimsForPoint,L=i.dataToPoint([e.get(D[0],P),e.get(D[1],P)]);w=P*2,u.push(L[0],L[1]),c.push(y[w],y[w+1]);var E=u8(v,i,e,P);h.push(E[0],E[1]),f.push(n[w],n[w+1]),g.push(e.getRawIndex(P));break;case"-":S=!1}S&&(d.push(x),p.push(p.length))}p.sort(function(Z,ee){return g[Z]-g[ee]});for(var I=u.length,N=Bo(I),R=Bo(I),F=Bo(I),O=Bo(I),V=[],_=0;_<p.length;_++){var H=p[_],Q=_*2,W=H*2;N[Q]=u[W],N[Q+1]=u[W+1],R[Q]=c[W],R[Q+1]=c[W+1],F[Q]=h[W],F[Q+1]=h[W+1],O[Q]=f[W],O[Q+1]=f[W+1],V[_]=d[H]}return{current:N,next:R,stackedOnCurrent:F,stackedOnNext:O,status:V}}var tl=Math.min,nl=Math.max;function Rc(r,e){return isNaN(r)||isNaN(e)}function qT(r,e,t,n,i,a,o,s,l){for(var u,c,h,f,d,p,g=t,v=0;v<n;v++){var m=e[g*2],y=e[g*2+1];if(g>=i||g<0)break;if(Rc(m,y)){if(l){g+=a;continue}break}if(g===t)r[a>0?"moveTo":"lineTo"](m,y),h=m,f=y;else{var _=m-u,x=y-c;if(_*_+x*x<.5){g+=a;continue}if(o>0){for(var S=g+a,A=e[S*2],w=e[S*2+1];A===m&&w===y&&v<n;)v++,S+=a,g+=a,A=e[S*2],w=e[S*2+1],m=e[g*2],y=e[g*2+1],_=m-u,x=y-c;var M=v+1;if(l)for(;Rc(A,w)&&M<n;)M++,S+=a,A=e[S*2],w=e[S*2+1];var C=.5,b=0,T=0,P=void 0,D=void 0;if(M>=n||Rc(A,w))d=m,p=y;else{b=A-u,T=w-c;var L=m-u,E=A-m,I=y-c,N=w-y,R=void 0,F=void 0;if(s==="x"){R=Math.abs(L),F=Math.abs(E);var O=b>0?1:-1;d=m-O*R*o,p=y,P=m+O*F*o,D=y}else if(s==="y"){R=Math.abs(I),F=Math.abs(N);var V=T>0?1:-1;d=m,p=y-V*R*o,P=m,D=y+V*F*o}else R=Math.sqrt(L*L+I*I),F=Math.sqrt(E*E+N*N),C=F/(F+R),d=m-b*o*(1-C),p=y-T*o*(1-C),P=m+b*o*C,D=y+T*o*C,P=tl(P,nl(A,m)),D=tl(D,nl(w,y)),P=nl(P,tl(A,m)),D=nl(D,tl(w,y)),b=P-m,T=D-y,d=m-b*R/F,p=y-T*R/F,d=tl(d,nl(u,m)),p=tl(p,nl(c,y)),d=nl(d,tl(u,m)),p=nl(p,tl(c,y)),b=m-d,T=y-p,P=m+b*F/R,D=y+T*F/R}r.bezierCurveTo(h,f,d,p,m,y),h=P,f=D}else r.lineTo(m,y)}u=m,c=y,g+=a}return v}var c8=function(){function r(){this.smooth=0,this.smoothConstraint=!0}return r}(),Sve=function(r){ae(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:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new c8},e.prototype.buildPath=function(t,n){var i=n.points,a=0,o=i.length/2;if(n.connectNulls){for(;o>0&&Rc(i[o*2-2],i[o*2-1]);o--);for(;a<o&&Rc(i[a*2],i[a*2+1]);a++);}for(;a<o;)a+=qT(t,i,a,o,o,1,n.smooth,n.smoothMonotone,n.connectNulls)+1},e.prototype.getPointOn=function(t,n){this.path||(this.createPathProxy(),this.buildPath(this.path,this.shape));for(var i=this.path,a=i.data,o=jo.CMD,s,l,u=n==="x",c=[],h=0;h<a.length;){var f=a[h++],d=void 0,p=void 0,g=void 0,v=void 0,m=void 0,y=void 0,_=void 0;switch(f){case o.M:s=a[h++],l=a[h++];break;case o.L:if(d=a[h++],p=a[h++],_=u?(t-s)/(d-s):(t-l)/(p-l),_<=1&&_>=0){var x=u?(p-l)*_+l:(d-s)*_+s;return u?[t,x]:[x,t]}s=d,l=p;break;case o.C:d=a[h++],p=a[h++],g=a[h++],v=a[h++],m=a[h++],y=a[h++];var S=u?Z0(s,d,g,m,t,c):Z0(l,p,v,y,t,c);if(S>0)for(var A=0;A<S;A++){var w=c[A];if(w<=1&&w>=0){var x=u?pr(l,p,v,y,w):pr(s,d,g,m,w);return u?[t,x]:[x,t]}}s=m,l=y;break}}},e}(yt),Ave=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(c8),h8=function(r){ae(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 Ave},e.prototype.buildPath=function(t,n){var i=n.points,a=n.stackedOnPoints,o=0,s=i.length/2,l=n.smoothMonotone;if(n.connectNulls){for(;s>0&&Rc(i[s*2-2],i[s*2-1]);s--);for(;o<s&&Rc(i[o*2],i[o*2+1]);o++);}for(;o<s;){var u=qT(t,i,o,s,s,1,n.smooth,l,n.connectNulls);qT(t,a,o+u-1,u,s,-1,n.stackedOnSmooth,l,n.connectNulls),o+=u+1,t.closePath()}},e}(yt);function f8(r,e,t,n,i){var a=r.getArea(),o=a.x,s=a.y,l=a.width,u=a.height,c=t.get(["lineStyle","width"])||0;o-=c/2,s-=c/2,l+=c,u+=c,l=Math.ceil(l),o!==Math.floor(o)&&(o=Math.floor(o),l++);var h=new Dt({shape:{x:o,y:s,width:l,height:u}});if(e){var f=r.getBaseAxis(),d=f.isHorizontal(),p=f.inverse;d?(p&&(h.shape.x+=l),h.shape.width=0):(p||(h.shape.y+=u),h.shape.height=0);var g=qe(i)?function(v){i(v,h)}:null;Tn(h,{shape:{width:l,height:u,x:o,y:s}},t,null,n,g)}return h}function d8(r,e,t){var n=r.getArea(),i=Vn(n.r0,1),a=Vn(n.r,1),o=new Bi({shape:{cx:Vn(r.cx,1),cy:Vn(r.cy,1),r0:i,r:a,startAngle:n.startAngle,endAngle:n.endAngle,clockwise:n.clockwise}});if(e){var s=r.getBaseAxis().dim==="angle";s?o.shape.endAngle=n.startAngle:o.shape.r=i,Tn(o,{shape:{endAngle:n.endAngle,r:a}},t)}return o}function Ng(r,e,t,n,i){if(r){if(r.type==="polar")return d8(r,e,t);if(r.type==="cartesian2d")return f8(r,e,t,n,i)}else return null;return null}function th(r,e){return r.type===e}function Wk(r,e){if(r.length===e.length){for(var t=0;t<r.length;t++)if(r[t]!==e[t])return;return!0}}function $k(r){for(var e=1/0,t=1/0,n=-1/0,i=-1/0,a=0;a<r.length;){var o=r[a++],s=r[a++];isNaN(o)||(e=Math.min(o,e),n=Math.max(o,n)),isNaN(s)||(t=Math.min(s,t),i=Math.max(s,i))}return[[e,t],[n,i]]}function Xk(r,e){var t=$k(r),n=t[0],i=t[1],a=$k(e),o=a[0],s=a[1];return Math.max(Math.abs(n[0]-o[0]),Math.abs(n[1]-o[1]),Math.abs(i[0]-s[0]),Math.abs(i[1]-s[1]))}function Yk(r){return Ft(r)?r:r?.5:0}function wve(r,e,t){if(!t.valueDim)return[];for(var n=e.count(),i=Bo(n*2),a=0;a<n;a++){var o=u8(t,r,e,a);i[a*2]=o[0],i[a*2+1]=o[1]}return i}function rl(r,e,t,n,i){var a=t.getBaseAxis(),o=a.dim==="x"||a.dim==="radius"?0:1,s=[],l=0,u=[],c=[],h=[],f=[];if(i){for(l=0;l<r.length;l+=2){var d=e||r;!isNaN(d[l])&&!isNaN(d[l+1])&&f.push(r[l],r[l+1])}r=f}for(l=0;l<r.length-2;l+=2)switch(h[0]=r[l+2],h[1]=r[l+3],c[0]=r[l],c[1]=r[l+1],s.push(c[0],c[1]),n){case"end":u[o]=h[o],u[1-o]=c[1-o],s.push(u[0],u[1]);break;case"middle":var p=(c[o]+h[o])/2,g=[];u[o]=g[o]=p,u[1-o]=c[1-o],g[1-o]=h[1-o],s.push(u[0],u[1]),s.push(g[0],g[1]);break;default:u[o]=c[o],u[1-o]=h[1-o],s.push(u[0],u[1])}return s.push(r[l++],r[l++]),s}function bve(r,e){var t=[],n=r.length,i,a;function o(c,h,f){var d=c.coord,p=(f-d)/(h.coord-d),g=Ioe(p,[c.color,h.color]);return{coord:f,color:g}}for(var s=0;s<n;s++){var l=r[s],u=l.coord;if(u<0)i=l;else if(u>e){a?t.push(o(a,l,e)):i&&t.push(o(i,l,0),o(i,l,e));break}else i&&(t.push(o(i,l,0)),i=null),t.push(l),a=l}return t}function Tve(r,e,t){var n=r.getVisual("visualMeta");if(!(!n||!n.length||!r.count())&&e.type==="cartesian2d"){for(var i,a,o=n.length-1;o>=0;o--){var s=r.getDimensionInfo(n[o].dimension);if(i=s&&s.coordDim,i==="x"||i==="y"){a=n[o];break}}if(a){var l=e.getAxis(i),u=xe(a.stops,function(_){return{coord:l.toGlobalCoord(l.dataToCoord(_.value)),color:_.color}}),c=u.length,h=a.outerColors.slice();c&&u[0].coord>u[c-1].coord&&(u.reverse(),h.reverse());var f=bve(u,i==="x"?t.getWidth():t.getHeight()),d=f.length;if(!d&&c)return u[0].coord<0?h[1]?h[1]:u[c-1].color:h[0]?h[0]:u[0].color;var p=10,g=f[0].coord-p,v=f[d-1].coord+p,m=v-g;if(m<.001)return"transparent";k(f,function(_){_.offset=(_.coord-g)/m}),f.push({offset:d?f[d-1].offset:.5,color:h[1]||"transparent"}),f.unshift({offset:d?f[0].offset:.5,color:h[0]||"transparent"});var y=new Ul(0,0,0,0,f,!0);return y[i]=g,y[i+"2"]=v,y}}}function Mve(r,e,t){var n=r.get("showAllSymbol"),i=n==="auto";if(!(n&&!i)){var a=t.getAxesByScale("ordinal")[0];if(a&&!(i&&Cve(a,e))){var o=e.mapDimension(a.dim),s={};return k(a.getViewLabels(),function(l){var u=a.scale.getRawOrdinalNumber(l.tickValue);s[u]=1}),function(l){return!s.hasOwnProperty(e.get(o,l))}}}}function Cve(r,e){var t=r.getExtent(),n=Math.abs(t[1]-t[0])/r.scale.count();isNaN(n)&&(n=0);for(var i=e.count(),a=Math.max(1,Math.round(i/5)),o=0;o<i;o+=a)if(Dg.getSymbolSize(e,o)[r.isHorizontal()?1:0]*1.5>n)return!1;return!0}function Eve(r,e){return isNaN(r)||isNaN(e)}function Lve(r){for(var e=r.length/2;e>0&&Eve(r[e*2-2],r[e*2-1]);e--);return e-1}function qk(r,e){return[r[e*2],r[e*2+1]]}function Pve(r,e,t){for(var n=r.length/2,i=t==="x"?0:1,a,o,s=0,l=-1,u=0;u<n;u++)if(o=r[u*2+i],!(isNaN(o)||isNaN(r[u*2+1-i]))){if(u===0){a=o;continue}if(a<=e&&o>=e||a>=e&&o<=e){l=u;break}s=u,a=o}return{range:[s,l],t:(e-a)/(o-a)}}function p8(r){if(r.get(["endLabel","show"]))return!0;for(var e=0;e<mi.length;e++)if(r.get([mi[e],"endLabel","show"]))return!0;return!1}function BA(r,e,t,n){if(th(e,"cartesian2d")){var i=n.getModel("endLabel"),a=i.get("valueAnimation"),o=n.getData(),s={lastFrameIndex:0},l=p8(n)?function(d,p){r._endLabelOnDuring(d,p,o,s,a,i,e)}:null,u=e.getBaseAxis().isHorizontal(),c=f8(e,t,n,function(){var d=r._endLabel;d&&t&&s.originalX!=null&&d.attr({x:s.originalX,y:s.originalY})},l);if(!n.get("clip",!0)){var h=c.shape,f=Math.max(h.width,h.height);u?(h.y-=f,h.height+=f*2):(h.x-=f,h.width+=f*2)}return l&&l(1,c),c}else return d8(e,t,n)}function Rve(r,e){var t=e.getBaseAxis(),n=t.isHorizontal(),i=t.inverse,a=n?i?"right":"left":"center",o=n?"middle":i?"top":"bottom";return{normal:{align:r.get("align")||a,verticalAlign:r.get("verticalAlign")||o}}}var Dve=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.init=function(){var t=new rt,n=new Ig;this.group.add(n.group),this._symbolDraw=n,this._lineGroup=t,this._changePolyState=Fe(this._changePolyState,this)},e.prototype.render=function(t,n,i){var a=t.coordinateSystem,o=this.group,s=t.getData(),l=t.getModel("lineStyle"),u=t.getModel("areaStyle"),c=s.getLayout("points")||[],h=a.type==="polar",f=this._coordSys,d=this._symbolDraw,p=this._polyline,g=this._polygon,v=this._lineGroup,m=!n.ssr&&t.get("animation"),y=!u.isEmpty(),_=u.get("origin"),x=l8(a,s,_),S=y&&wve(a,s,x),A=t.get("showSymbol"),w=t.get("connectNulls"),M=A&&!h&&Mve(t,s,a),C=this._data;C&&C.eachItemGraphicEl(function(Z,ee){Z.__temp&&(o.remove(Z),C.setItemGraphicEl(ee,null))}),A||d.remove(),o.add(v);var b=h?!1:t.get("step"),T;a&&a.getArea&&t.get("clip",!0)&&(T=a.getArea(),T.width!=null?(T.x-=.1,T.y-=.1,T.width+=.2,T.height+=.2):T.r0&&(T.r0-=.5,T.r+=.5)),this._clipShapeForSymbol=T;var P=Tve(s,a,i)||s.getVisual("style")[s.getVisual("drawType")];if(!(p&&f.type===a.type&&b===this._step))A&&d.updateData(s,{isIgnore:M,clipShape:T,disableAnimation:!0,getSymbolPoint:function(Z){return[c[Z*2],c[Z*2+1]]}}),m&&this._initSymbolLabelAnimation(s,a,T),b&&(S&&(S=rl(S,c,a,b,w)),c=rl(c,null,a,b,w)),p=this._newPolyline(c),y?g=this._newPolygon(c,S):g&&(v.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(t,a,Hc(P)),v.setClipPath(BA(this,a,!0,t));else{y&&!g?g=this._newPolygon(c,S):g&&!y&&(v.remove(g),g=this._polygon=null),h||this._initOrUpdateEndLabel(t,a,Hc(P));var D=v.getClipPath();if(D){var L=BA(this,a,!1,t);Tn(D,{shape:L.shape},t)}else v.setClipPath(BA(this,a,!0,t));A&&d.updateData(s,{isIgnore:M,clipShape:T,disableAnimation:!0,getSymbolPoint:function(Z){return[c[Z*2],c[Z*2+1]]}}),(!Wk(this._stackedOnPoints,S)||!Wk(this._points,c))&&(m?this._doUpdateAnimation(s,S,a,i,b,_,w):(b&&(S&&(S=rl(S,c,a,b,w)),c=rl(c,null,a,b,w)),p.setShape({points:c}),g&&g.setShape({points:c,stackedOnPoints:S})))}var E=t.getModel("emphasis"),I=E.get("focus"),N=E.get("blurScope"),R=E.get("disabled");if(p.useStyle(Ke(l.getLineStyle(),{fill:"none",stroke:P,lineJoin:"bevel"})),Br(p,t,"lineStyle"),p.style.lineWidth>0&&t.get(["emphasis","lineStyle","width"])==="bolder"){var F=p.getState("emphasis").style;F.lineWidth=+p.style.lineWidth+1}at(p).seriesIndex=t.seriesIndex,Rn(p,I,N,R);var O=Yk(t.get("smooth")),V=t.get("smoothMonotone");if(p.setShape({smooth:O,smoothMonotone:V,connectNulls:w}),g){var H=s.getCalculationInfo("stackedOnSeries"),Q=0;g.useStyle(Ke(u.getAreaStyle(),{fill:P,opacity:.7,lineJoin:"bevel",decal:s.getVisual("style").decal})),H&&(Q=Yk(H.get("smooth"))),g.setShape({smooth:O,stackedOnSmooth:Q,smoothMonotone:V,connectNulls:w}),Br(g,t,"areaStyle"),at(g).seriesIndex=t.seriesIndex,Rn(g,I,N,R)}var W=this._changePolyState;s.eachItemGraphicEl(function(Z){Z&&(Z.onHoverStateChange=W)}),this._polyline.onHoverStateChange=W,this._data=s,this._coordSys=a,this._stackedOnPoints=S,this._points=c,this._step=b,this._valueOrigin=_,t.get("triggerLineEvent")&&(this.packEventData(t,p),g&&this.packEventData(t,g))},e.prototype.packEventData=function(t,n){at(n).eventData={componentType:"series",componentSubType:"line",componentIndex:t.componentIndex,seriesIndex:t.seriesIndex,seriesName:t.name,seriesType:"line"}},e.prototype.highlight=function(t,n,i,a){var o=t.getData(),s=Uc(o,a);if(this._changePolyState("emphasis"),!(s instanceof Array)&&s!=null&&s>=0){var l=o.getLayout("points"),u=o.getItemGraphicEl(s);if(!u){var c=l[s*2],h=l[s*2+1];if(isNaN(c)||isNaN(h)||this._clipShapeForSymbol&&!this._clipShapeForSymbol.contain(c,h))return;var f=t.get("zlevel")||0,d=t.get("z")||0;u=new Dg(o,s),u.x=c,u.y=h,u.setZ(f,d);var p=u.getSymbolPath().getTextContent();p&&(p.zlevel=f,p.z=d,p.z2=this._polyline.z2+1),u.__temp=!0,o.setItemGraphicEl(s,u),u.stopSymbolAnimation(!0),this.group.add(u)}u.highlight()}else gn.prototype.highlight.call(this,t,n,i,a)},e.prototype.downplay=function(t,n,i,a){var o=t.getData(),s=Uc(o,a);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 gn.prototype.downplay.call(this,t,n,i,a)},e.prototype._changePolyState=function(t){var n=this._polygon;i_(this._polyline,t),n&&i_(n,t)},e.prototype._newPolyline=function(t){var n=this._polyline;return n&&this._lineGroup.remove(n),n=new Sve({shape:{points:t},segmentIgnoreThreshold:2,z2:10}),this._lineGroup.add(n),this._polyline=n,n},e.prototype._newPolygon=function(t,n){var i=this._polygon;return i&&this._lineGroup.remove(i),i=new h8({shape:{points:t,stackedOnPoints:n},segmentIgnoreThreshold:2}),this._lineGroup.add(i),this._polygon=i,i},e.prototype._initSymbolLabelAnimation=function(t,n,i){var a,o,s=n.getBaseAxis(),l=s.inverse;n.type==="cartesian2d"?(a=s.isHorizontal(),o=!1):n.type==="polar"&&(a=s.dim==="angle",o=!0);var u=t.hostModel,c=u.get("animationDuration");qe(c)&&(c=c(null));var h=u.get("animationDelay")||0,f=qe(h)?h(null):h;t.eachItemGraphicEl(function(d,p){var g=d;if(g){var v=[d.x,d.y],m=void 0,y=void 0,_=void 0;if(i)if(o){var x=i,S=n.pointToCoord(v);a?(m=x.startAngle,y=x.endAngle,_=-S[1]/180*Math.PI):(m=x.r0,y=x.r,_=S[0])}else{var A=i;a?(m=A.x,y=A.x+A.width,_=d.x):(m=A.y+A.height,y=A.y,_=d.y)}var w=y===m?0:(_-m)/(y-m);l&&(w=1-w);var M=qe(h)?h(p):c*w+f,C=g.getSymbolPath(),b=C.getTextContent();g.attr({scaleX:0,scaleY:0}),g.animateTo({scaleX:1,scaleY:1},{duration:200,setToFinal:!0,delay:M}),b&&b.animateFrom({style:{opacity:0}},{duration:300,delay:M}),C.disableLabelAnimation=!0}})},e.prototype._initOrUpdateEndLabel=function(t,n,i){var a=t.getModel("endLabel");if(p8(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 Ot({z2:200}),u.ignoreClip=!0,s.setTextContent(this._endLabel),s.disableLabelAnimation=!0);var c=Lve(l);c>=0&&(zr(s,Sr(t,"endLabel"),{inheritColor:i,labelFetcher:t,labelDataIndex:c,defaultText:function(h,f,d){return d!=null?s8(o,d):nd(o,h)},enableTextSetter:!0},Rve(a,n)),s.textConfig.position=null)}else this._endLabel&&(this._polyline.removeTextContent(),this._endLabel=null)},e.prototype._endLabelOnDuring=function(t,n,i,a,o,s,l){var u=this._endLabel,c=this._polyline;if(u){t<1&&a.originalX==null&&(a.originalX=u.x,a.originalY=u.y);var h=i.getLayout("points"),f=i.hostModel,d=f.get("connectNulls"),p=s.get("precision"),g=s.get("distance")||0,v=l.getBaseAxis(),m=v.isHorizontal(),y=v.inverse,_=n.shape,x=y?m?_.x:_.y+_.height:m?_.x+_.width:_.y,S=(m?g:0)*(y?-1:1),A=(m?0:-g)*(y?-1:1),w=m?"x":"y",M=Pve(h,x,w),C=M.range,b=C[1]-C[0],T=void 0;if(b>=1){if(b>1&&!d){var P=qk(h,C[0]);u.attr({x:P[0]+S,y:P[1]+A}),o&&(T=f.getRawValue(C[0]))}else{var P=c.getPointOn(x,w);P&&u.attr({x:P[0]+S,y:P[1]+A});var D=f.getRawValue(C[0]),L=f.getRawValue(C[1]);o&&(T=I4(i,p,D,L,M.t))}a.lastFrameIndex=C[0]}else{var E=t===1||a.lastFrameIndex>0?C[0]:0,P=qk(h,E);o&&(T=f.getRawValue(E)),u.attr({x:P[0]+S,y:P[1]+A})}if(o){var I=_d(u);typeof I.setLabelText=="function"&&I.setLabelText(T)}}},e.prototype._doUpdateAnimation=function(t,n,i,a,o,s,l){var u=this._polyline,c=this._polygon,h=t.hostModel,f=xve(this._data,t,this._stackedOnPoints,n,this._coordSys,i,this._valueOrigin),d=f.current,p=f.stackedOnCurrent,g=f.next,v=f.stackedOnNext;if(o&&(p=rl(f.stackedOnCurrent,f.current,i,o,l),d=rl(f.current,null,i,o,l),v=rl(f.stackedOnNext,f.next,i,o,l),g=rl(f.next,null,i,o,l)),Xk(d,g)>3e3||c&&Xk(p,v)>3e3){u.stopAnimation(),u.setShape({points:g}),c&&(c.stopAnimation(),c.setShape({points:g,stackedOnPoints:v}));return}u.shape.__points=f.current,u.shape.points=d;var m={shape:{points:g}};f.current!==d&&(m.shape.__points=f.next),u.stopAnimation(),zt(u,m,h),c&&(c.setShape({points:d,stackedOnPoints:p}),c.stopAnimation(),zt(c,{shape:{stackedOnPoints:v}},h),u.shape.points!==c.shape.points&&(c.shape.points=u.shape.points));for(var y=[],_=f.status,x=0;x<_.length;x++){var S=_[x].cmd;if(S==="="){var A=t.getItemGraphicEl(_[x].idx1);A&&y.push({el:A,ptIdx:x})}}u.animators&&u.animators.length&&u.animators[0].during(function(){c&&c.dirtyShape();for(var w=u.shape.__points,M=0;M<y.length;M++){var C=y[M].el,b=y[M].ptIdx*2;C.x=w[b],C.y=w[b+1],C.markRedraw()}})},e.prototype.remove=function(t){var n=this.group,i=this._data;this._lineGroup.removeAll(),this._symbolDraw.remove(!0),i&&i.eachItemGraphicEl(function(a,o){a.__temp&&(n.remove(a),i.setItemGraphicEl(o,null))}),this._polyline=this._polygon=this._coordSys=this._points=this._stackedOnPoints=this._endLabel=this._data=null},e.type="line",e}(gn);const Ive=Dve;function kg(r,e){return{seriesType:r,plan:Td(),reset:function(t){var n=t.getData(),i=t.coordinateSystem,a=t.pipelineContext,o=e||a.large;if(i){var s=xe(i.dimensions,function(d){return n.mapDimension(d)}).slice(0,2),l=s.length,u=n.getCalculationInfo("stackResultDimension");Ql(n,s[0])&&(s[0]=u),Ql(n,s[1])&&(s[1]=u);var c=n.getStore(),h=n.getDimensionIndex(s[0]),f=n.getDimensionIndex(s[1]);return l&&{progress:function(d,p){for(var g=d.end-d.start,v=o&&Bo(g*l),m=[],y=[],_=d.start,x=0;_<d.end;_++){var S=void 0;if(l===1){var A=c.get(h,_);S=i.dataToPoint(A,null,y)}else m[0]=c.get(h,_),m[1]=c.get(f,_),S=i.dataToPoint(m,null,y);o?(v[x++]=S[0],v[x++]=S[1]):p.setItemLayout(_,S.slice())}o&&p.setLayout("points",v)}}}}}}var Nve={average:function(r){for(var e=0,t=0,n=0;n<r.length;n++)isNaN(r[n])||(e+=r[n],t++);return t===0?NaN:e/t},sum:function(r){for(var e=0,t=0;t<r.length;t++)e+=r[t]||0;return e},max:function(r){for(var e=-1/0,t=0;t<r.length;t++)r[t]>e&&(e=r[t]);return isFinite(e)?e:NaN},min:function(r){for(var e=1/0,t=0;t<r.length;t++)r[t]<e&&(e=r[t]);return isFinite(e)?e:NaN},nearest:function(r){return r[0]}},kve=function(r){return Math.round(r.length/2)};function v8(r){return{seriesType:r,reset:function(e,t,n){var i=e.getData(),a=e.get("sampling"),o=e.coordinateSystem,s=i.count();if(s>10&&o.type==="cartesian2d"&&a){var l=o.getBaseAxis(),u=o.getOtherAxis(l),c=l.getExtent(),h=n.getDevicePixelRatio(),f=Math.abs(c[1]-c[0])*(h||1),d=Math.round(s/f);if(isFinite(d)&&d>1){a==="lttb"?e.setData(i.lttbDownSample(i.mapDimension(u.dim),1/d)):a==="minmax"&&e.setData(i.minmaxDownSample(i.mapDimension(u.dim),1/d));var p=void 0;ke(a)?p=Nve[a]:qe(a)&&(p=a),p&&e.setData(i.downSample(i.mapDimension(u.dim),1/d,p,kve))}}}}}function Ove(r){r.registerChartView(Ive),r.registerSeriesModel(pve),r.registerLayout(kg("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,v8("line"))}var g8=function(r){ae(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 Us(null,this,{useEncodeDefaulter:!0})},e.prototype.getMarkerPosition=function(t,n,i){var a=this.coordinateSystem;if(a&&a.clampData){var o=a.clampData(t),s=a.dataToPoint(o);if(i)k(a.getAxes(),function(f,d){if(f.type==="category"&&n!=null){var p=f.getTicksCoords(),g=f.getTickModel().get("alignWithLabel"),v=o[d],m=n[d]==="x1"||n[d]==="y1";if(m&&!g&&(v+=1),p.length<2)return;if(p.length===2){s[d]=f.toGlobalCoord(f.getExtent()[m?1:0]);return}for(var y=void 0,_=void 0,x=1,S=0;S<p.length;S++){var A=p[S].coord,w=S===p.length-1?p[S-1].tickValue+x:p[S].tickValue;if(w===v){_=A;break}else if(w<v)y=A;else if(y!=null&&w>v){_=(A+y)/2;break}S===1&&(x=w-p[0].tickValue)}_==null&&(y?y&&(_=p[p.length-1].coord):_=p[0].coord),s[d]=f.toGlobalCoord(_)}});else{var l=this.getData(),u=l.getLayout("offset"),c=l.getLayout("size"),h=a.getBaseAxis().isHorizontal()?0:1;s[h]+=u+c/2}return s}return[NaN,NaN]},e.type="series.__base_bar__",e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,barMinHeight:0,barMinAngle:0,large:!1,largeThreshold:400,progressive:3e3,progressiveChunkMode:"mod"},e}(En);En.registerClass(g8);const w_=g8;var Fve=function(r){ae(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 Us(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,i){return i.rect(n.getItemLayout(t))},e.type="series.bar",e.dependencies=["grid","polar"],e.defaultOption=su(w_.defaultOption,{clip:!0,roundCap:!1,showBackground:!1,backgroundStyle:{color:"rgba(180, 180, 180, 0.2)",borderColor:null,borderWidth:0,borderType:"solid",borderRadius:0,shadowBlur:0,shadowColor:null,shadowOffsetX:0,shadowOffsetY:0,opacity:1},select:{itemStyle:{borderColor:"#212121"}},realtimeSort:!1}),e}(w_);const Bve=Fve;var zve=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}(),Uve=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="sausage",n}return e.prototype.getDefaultShape=function(){return new zve},e.prototype.buildPath=function(t,n){var i=n.cx,a=n.cy,o=Math.max(n.r0||0,0),s=Math.max(n.r,0),l=(s-o)*.5,u=o+l,c=n.startAngle,h=n.endAngle,f=n.clockwise,d=Math.PI*2,p=f?h-c<d:c-h<d;p||(c=h-(f?d:-d));var g=Math.cos(c),v=Math.sin(c),m=Math.cos(h),y=Math.sin(h);p?(t.moveTo(g*o+i,v*o+a),t.arc(g*u+i,v*u+a,l,-Math.PI+c,c,!f)):t.moveTo(g*s+i,v*s+a),t.arc(i,a,s,c,h,!f),t.arc(m*u+i,y*u+a,l,h-Math.PI*2,h-Math.PI,!f),o!==0&&t.arc(i,a,o,h,c,f)},e}(yt);const b_=Uve;function Vve(r,e){e=e||{};var t=e.isRoundCap;return function(n,i,a){var o=i.position;if(!o||o instanceof Array)return n_(n,i,a);var s=r(o),l=i.distance!=null?i.distance:5,u=this.shape,c=u.cx,h=u.cy,f=u.r,d=u.r0,p=(f+d)/2,g=u.startAngle,v=u.endAngle,m=(g+v)/2,y=t?Math.abs(f-d)/2:0,_=Math.cos,x=Math.sin,S=c+f*_(g),A=h+f*x(g),w="left",M="top";switch(s){case"startArc":S=c+(d-l)*_(m),A=h+(d-l)*x(m),w="center",M="top";break;case"insideStartArc":S=c+(d+l)*_(m),A=h+(d+l)*x(m),w="center",M="bottom";break;case"startAngle":S=c+p*_(g)+yy(g,l+y,!1),A=h+p*x(g)+_y(g,l+y,!1),w="right",M="middle";break;case"insideStartAngle":S=c+p*_(g)+yy(g,-l+y,!1),A=h+p*x(g)+_y(g,-l+y,!1),w="left",M="middle";break;case"middle":S=c+p*_(m),A=h+p*x(m),w="center",M="middle";break;case"endArc":S=c+(f+l)*_(m),A=h+(f+l)*x(m),w="center",M="bottom";break;case"insideEndArc":S=c+(f-l)*_(m),A=h+(f-l)*x(m),w="center",M="top";break;case"endAngle":S=c+p*_(v)+yy(v,l+y,!0),A=h+p*x(v)+_y(v,l+y,!0),w="left",M="middle";break;case"insideEndAngle":S=c+p*_(v)+yy(v,-l+y,!0),A=h+p*x(v)+_y(v,-l+y,!0),w="right",M="middle";break;default:return n_(n,i,a)}return n=n||{},n.x=S,n.y=A,n.align=w,n.verticalAlign=M,n}}function Gve(r,e,t,n){if(Ft(n)){r.setTextConfig({rotation:n});return}else if(_e(e)){r.setTextConfig({rotation:0});return}var i=r.shape,a=i.clockwise?i.startAngle:i.endAngle,o=i.clockwise?i.endAngle:i.startAngle,s=(a+o)/2,l,u=t(e);switch(u){case"startArc":case"insideStartArc":case"middle":case"insideEndArc":case"endArc":l=s;break;case"startAngle":case"insideStartAngle":l=a;break;case"endAngle":case"insideEndAngle":l=o;break;default:r.setTextConfig({rotation:0});return}var c=Math.PI*1.5-l;u==="middle"&&c>Math.PI/2&&c<Math.PI*1.5&&(c-=Math.PI),r.setTextConfig({rotation:c})}function yy(r,e,t){return e*Math.sin(r)*(t?-1:1)}function _y(r,e,t){return e*Math.cos(r)*(t?1:-1)}function hc(r,e,t){var n=r.get("borderRadius");if(n==null)return t?{cornerRadius:0}:null;_e(n)||(n=[n,n,n,n]);var i=Math.abs(e.r||0-e.r0||0);return{cornerRadius:xe(n,function(a){return so(a,i)})}}var zA=Math.max,UA=Math.min;function Hve(r,e){var t=r.getArea&&r.getArea();if(th(r,"cartesian2d")){var n=r.getBaseAxis();if(n.type!=="category"||!n.onBand){var i=e.getLayout("bandWidth");n.isHorizontal()?(t.x-=i,t.width+=i*2):(t.y-=i,t.height+=i*2)}}return t}var Wve=function(r){ae(e,r);function e(){var t=r.call(this)||this;return t.type=e.type,t._isFirstFrame=!0,t}return e.prototype.render=function(t,n,i,a){this._model=t,this._removeOnRenderedListener(i),this._updateDrawMode(t);var o=t.get("coordinateSystem");(o==="cartesian2d"||o==="polar")&&(this._progressiveEls=null,this._isLargeDraw?this._renderLarge(t,n,i):this._renderNormal(t,n,i,a))},e.prototype.incrementalPrepareRender=function(t){this._clear(),this._updateDrawMode(t),this._updateLargeClip(t)},e.prototype.incrementalRender=function(t,n){this._progressiveEls=[],this._incrementalRenderLarge(t,n)},e.prototype.eachRendered=function(t){ou(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,n,i,a){var o=this.group,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.getBaseAxis(),h;u.type==="cartesian2d"?h=c.isHorizontal():u.type==="polar"&&(h=c.dim==="angle");var f=t.isAnimationEnabled()?t:null,d=$ve(t,u);d&&this._enableRealtimeSort(d,s,i);var p=t.get("clip",!0)||d,g=Hve(u,s);o.removeClipPath();var v=t.get("roundCap",!0),m=t.get("showBackground",!0),y=t.getModel("backgroundStyle"),_=y.get("borderRadius")||0,x=[],S=this._backgroundEls,A=a&&a.isInitSort,w=a&&a.type==="changeAxisOrder";function M(T){var P=xy[u.type](s,T),D=Qve(u,h,P);return D.useStyle(y.getItemStyle()),u.type==="cartesian2d"?D.setShape("r",_):D.setShape("cornerRadius",_),x[T]=D,D}s.diff(l).add(function(T){var P=s.getItemModel(T),D=xy[u.type](s,T,P);if(m&&M(T),!(!s.hasValue(T)||!Jk[u.type](D))){var L=!1;p&&(L=jk[u.type](g,D));var E=Kk[u.type](t,s,T,D,h,f,c.model,!1,v);d&&(E.forceLabelAnimation=!0),e3(E,s,T,P,D,t,h,u.type==="polar"),A?E.attr({shape:D}):d?Zk(d,f,E,D,T,h,!1,!1):Tn(E,{shape:D},t,T),s.setItemGraphicEl(T,E),o.add(E),E.ignore=L}}).update(function(T,P){var D=s.getItemModel(T),L=xy[u.type](s,T,D);if(m){var E=void 0;S.length===0?E=M(P):(E=S[P],E.useStyle(y.getItemStyle()),u.type==="cartesian2d"?E.setShape("r",_):E.setShape("cornerRadius",_),x[T]=E);var I=xy[u.type](s,T),N=y8(h,I,u);zt(E,{shape:N},f,T)}var R=l.getItemGraphicEl(P);if(!s.hasValue(T)||!Jk[u.type](L)){o.remove(R);return}var F=!1;if(p&&(F=jk[u.type](g,L),F&&o.remove(R)),R?lo(R):R=Kk[u.type](t,s,T,L,h,f,c.model,!!R,v),d&&(R.forceLabelAnimation=!0),w){var O=R.getTextContent();if(O){var V=_d(O);V.prevValue!=null&&(V.prevValue=V.value)}}else e3(R,s,T,D,L,t,h,u.type==="polar");A?R.attr({shape:L}):d?Zk(d,f,R,L,T,h,!0,w):zt(R,{shape:L},t,T,null),s.setItemGraphicEl(T,R),R.ignore=F,o.add(R)}).remove(function(T){var P=l.getItemGraphicEl(T);P&&Xv(P,t,T)}).execute();var C=this._backgroundGroup||(this._backgroundGroup=new rt);C.removeAll();for(var b=0;b<x.length;++b)C.add(x[b]);o.add(C),this._backgroundEls=x,this._data=s},e.prototype._renderLarge=function(t,n,i){this._clear(),n3(t,this.group),this._updateLargeClip(t)},e.prototype._incrementalRenderLarge=function(t,n){this._removeBackground(),n3(n,this.group,this._progressiveEls,!0)},e.prototype._updateLargeClip=function(t){var n=t.get("clip",!0)&&Ng(t.coordinateSystem,!1,t),i=this.group;n?i.setClipPath(n):i.removeClipPath()},e.prototype._enableRealtimeSort=function(t,n,i){var a=this;if(n.count()){var o=t.baseAxis;if(this._isFirstFrame)this._dispatchInitSort(n,t,i),this._isFirstFrame=!1;else{var s=function(l){var u=n.getItemGraphicEl(l),c=u&&u.shape;return c&&Math.abs(o.isHorizontal()?c.height:c.width)||0};this._onRendered=function(){a._updateSortWithinSameData(n,s,o,i)},i.getZr().on("rendered",this._onRendered)}}},e.prototype._dataSort=function(t,n,i){var a=[];return t.each(t.mapDimension(n.dim),function(o,s){var l=i(s);l=l==null?NaN:l,a.push({dataIndex:s,mappedValue:l,ordinalNumber:o})}),a.sort(function(o,s){return s.mappedValue-o.mappedValue}),{ordinalNumbers:xe(a,function(o){return o.ordinalNumber})}},e.prototype._isOrderChangedWithinSameData=function(t,n,i){for(var a=i.scale,o=t.mapDimension(i.dim),s=Number.MAX_VALUE,l=0,u=a.getOrdinalMeta().categories.length;l<u;++l){var c=t.rawIndexOf(o,a.getRawOrdinalNumber(l)),h=c<0?Number.MIN_VALUE:n(t.indexOfRawIndex(c));if(h>s)return!0;s=h}return!1},e.prototype._isOrderDifferentInView=function(t,n){for(var i=n.scale,a=i.getExtent(),o=Math.max(0,a[0]),s=Math.min(a[1],i.getOrdinalMeta().categories.length-1);o<=s;++o)if(t.ordinalNumbers[o]!==i.getRawOrdinalNumber(o))return!0},e.prototype._updateSortWithinSameData=function(t,n,i,a){if(this._isOrderChangedWithinSameData(t,n,i)){var o=this._dataSort(t,i,n);this._isOrderDifferentInView(o,i)&&(this._removeOnRenderedListener(a),a.dispatchAction({type:"changeAxisOrder",componentType:i.dim+"Axis",axisId:i.index,sortInfo:o}))}},e.prototype._dispatchInitSort=function(t,n,i){var a=n.baseAxis,o=this._dataSort(t,a,function(s){return t.get(t.mapDimension(n.otherAxis.dim),s)});i.dispatchAction({type:"changeAxisOrder",componentType:a.dim+"Axis",isInitSort:!0,axisId:a.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,i=this._data;t&&t.isAnimationEnabled()&&i&&!this._isLargeDraw?(this._removeBackground(),this._backgroundEls=[],i.eachItemGraphicEl(function(a){Xv(a,t,at(a).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}(gn),jk={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 i=r.x+r.width,a=r.y+r.height,o=zA(e.x,r.x),s=UA(e.x+e.width,i),l=zA(e.y,r.y),u=UA(e.y+e.height,a),c=s<o,h=u<l;return e.x=c&&o>i?s:o,e.y=h&&l>a?u:l,e.width=c?0:s-o,e.height=h?0:u-l,t<0&&(e.x+=e.width,e.width=-e.width),n<0&&(e.y+=e.height,e.height=-e.height),c||h},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 i=UA(e.r,r.r),a=zA(e.r0,r.r0);e.r=i,e.r0=a;var o=i-a<0;if(t<0){var n=e.r;e.r=e.r0,e.r0=n}return o}},Kk={cartesian2d:function(r,e,t,n,i,a,o,s,l){var u=new Dt({shape:pe({},n),z2:1});if(u.__dataIndex=t,u.name="item",a){var c=u.shape,h=i?"height":"width";c[h]=0}return u},polar:function(r,e,t,n,i,a,o,s,l){var u=!i&&l?b_:Bi,c=new u({shape:n,z2:1});c.name="item";var h=m8(i);if(c.calculateTextPosition=Vve(h,{isRoundCap:u===b_}),a){var f=c.shape,d=i?"r":"endAngle",p={};f[d]=i?n.r0:n.startAngle,p[d]=n[d],(s?zt:Tn)(c,{shape:p},a)}return c}};function $ve(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 Zk(r,e,t,n,i,a,o,s){var l,u;a?(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?zt:Tn)(t,{shape:l},e,i,null);var c=e?r.baseAxis.model:null;(o?zt:Tn)(t,{shape:u},c,i)}function Qk(r,e){for(var t=0;t<e.length;t++)if(!isFinite(r[e[t]]))return!0;return!1}var Xve=["x","y","width","height"],Yve=["cx","cy","r","startAngle","endAngle"],Jk={cartesian2d:function(r){return!Qk(r,Xve)},polar:function(r){return!Qk(r,Yve)}},xy={cartesian2d:function(r,e,t){var n=r.getItemLayout(e),i=t?jve(t,n):0,a=n.width>0?1:-1,o=n.height>0?1:-1;return{x:n.x+a*i/2,y:n.y+o*i/2,width:n.width-a*i,height:n.height-o*i}},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 qve(r){return r.startAngle!=null&&r.endAngle!=null&&r.startAngle===r.endAngle}function m8(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 e3(r,e,t,n,i,a,o,s){var l=e.getItemVisual(t,"style");if(s){if(!a.get("roundCap")){var c=r.shape,h=hc(n.getModel("itemStyle"),c,!0);pe(c,h),r.setShape(c)}}else{var u=n.get(["itemStyle","borderRadius"])||0;r.setShape("r",u)}r.useStyle(l);var f=n.getShallow("cursor");f&&r.attr("cursor",f);var d=s?o?i.r>=i.r0?"endArc":"startArc":i.endAngle>=i.startAngle?"endAngle":"startAngle":o?i.height>=0?"bottom":"top":i.width>=0?"right":"left",p=Sr(n);zr(r,p,{labelFetcher:a,labelDataIndex:t,defaultText:nd(a.getData(),t),inheritColor:l.fill,defaultOpacity:l.opacity,defaultOutsidePosition:d});var g=r.getTextContent();if(s&&g){var v=n.get(["label","position"]);r.textConfig.inside=v==="middle"?!0:null,Gve(r,v==="outside"?d:v,m8(o),n.get(["label","rotate"]))}LV(g,p,a.getRawValue(t),function(y){return s8(e,y)});var m=n.getModel(["emphasis"]);Rn(r,m.get("focus"),m.get("blurScope"),m.get("disabled")),Br(r,n),qve(i)&&(r.style.fill="none",r.style.stroke="none",k(r.states,function(y){y.style&&(y.style.fill=y.style.stroke="none")}))}function jve(r,e){var t=r.get(["itemStyle","borderColor"]);if(!t||t==="none")return 0;var n=r.get(["itemStyle","borderWidth"])||0,i=isNaN(e.width)?Number.MAX_VALUE:Math.abs(e.width),a=isNaN(e.height)?Number.MAX_VALUE:Math.abs(e.height);return Math.min(n,i,a)}var Kve=function(){function r(){}return r}(),t3=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeBar",n}return e.prototype.getDefaultShape=function(){return new Kve},e.prototype.buildPath=function(t,n){for(var i=n.points,a=this.baseDimIdx,o=1-this.baseDimIdx,s=[],l=[],u=this.barWidth,c=0;c<i.length;c+=3)l[a]=u,l[o]=i[c+2],s[a]=i[c+a],s[o]=i[c+o],t.rect(s[0],s[1],l[0],l[1])},e}(yt);function n3(r,e,t,n){var i=r.getData(),a=i.getLayout("valueAxisHorizontal")?1:0,o=i.getLayout("largeDataIndices"),s=i.getLayout("size"),l=r.getModel("backgroundStyle"),u=i.getLayout("largeBackgroundPoints");if(u){var c=new t3({shape:{points:u},incremental:!!n,silent:!0,z2:0});c.baseDimIdx=a,c.largeDataIndices=o,c.barWidth=s,c.useStyle(l.getItemStyle()),e.add(c),t&&t.push(c)}var h=new t3({shape:{points:i.getLayout("largePoints")},incremental:!!n,ignoreCoarsePointer:!0,z2:1});h.baseDimIdx=a,h.largeDataIndices=o,h.barWidth=s,e.add(h),h.useStyle(i.getVisual("style")),h.style.stroke=null,at(h).seriesIndex=r.seriesIndex,r.get("silent")||(h.on("mousedown",r3),h.on("mousemove",r3)),t&&t.push(h)}var r3=U1(function(r){var e=this,t=Zve(e,r.offsetX,r.offsetY);at(e).dataIndex=t>=0?t:null},30,!1);function Zve(r,e,t){for(var n=r.baseDimIdx,i=1-n,a=r.shape.points,o=r.largeDataIndices,s=[],l=[],u=r.barWidth,c=0,h=a.length/3;c<h;c++){var f=c*3;if(l[n]=u,l[i]=a[f+2],s[n]=a[f+n],s[i]=a[f+i],l[i]<0&&(s[i]+=l[i],l[i]=-l[i]),e>=s[0]&&e<=s[0]+l[0]&&t>=s[1]&&t<=s[1]+l[1])return o[c]}return-1}function y8(r,e,t){if(th(t,"cartesian2d")){var n=e,i=t.getArea();return{x:r?n.x:i.x,y:r?i.y:n.y,width:r?n.width:i.width,height:r?i.height:n.height}}else{var i=t.getArea(),a=e;return{cx:i.cx,cy:i.cy,r0:r?i.r0:a.r0,r:r?i.r:a.r,startAngle:r?a.startAngle:0,endAngle:r?a.endAngle:Math.PI*2}}}function Qve(r,e,t){var n=r.type==="polar"?Bi:Dt;return new n({shape:y8(e,t,r),silent:!0,z2:0})}const Jve=Wve;function ege(r){r.registerChartView(Jve),r.registerSeriesModel(Bve),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(xH,"bar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,SH("bar")),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,v8("bar")),r.registerAction({type:"changeAxisOrder",event:"changeAxisOrder",update:"update"},function(e,t){var n=e.componentType||"series";t.eachComponent({mainType:n,query:e},function(i){e.sortInfo&&i.axis.setCategorySortInfo(e.sortInfo)})})}var i3=Math.PI*2,Sy=Math.PI/180;function _8(r,e){return dr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function x8(r,e){var t=_8(r,e),n=r.get("center"),i=r.get("radius");_e(i)||(i=[0,i]);var a=Pe(t.width,e.getWidth()),o=Pe(t.height,e.getHeight()),s=Math.min(a,o),l=Pe(i[0],s/2),u=Pe(i[1],s/2),c,h,f=r.coordinateSystem;if(f){var d=f.dataToPoint(n);c=d[0]||0,h=d[1]||0}else _e(n)||(n=[n,n]),c=Pe(n[0],a)+t.x,h=Pe(n[1],o)+t.y;return{cx:c,cy:h,r0:l,r:u}}function tge(r,e,t){e.eachSeriesByType(r,function(n){var i=n.getData(),a=i.mapDimension("value"),o=_8(n,t),s=x8(n,t),l=s.cx,u=s.cy,c=s.r,h=s.r0,f=-n.get("startAngle")*Sy,d=n.get("endAngle"),p=n.get("padAngle")*Sy;d=d==="auto"?f-i3:-d*Sy;var g=n.get("minAngle")*Sy,v=g+p,m=0;i.each(a,function(N){!isNaN(N)&&m++});var y=i.getSum(a),_=Math.PI/(y||m)*2,x=n.get("clockwise"),S=n.get("roseType"),A=n.get("stillShowZeroSum"),w=i.getDataExtent(a);w[0]=0;var M=x?1:-1,C=[f,d],b=M*p/2;r2(C,!x),f=C[0],d=C[1];var T=S8(n);T.startAngle=f,T.endAngle=d,T.clockwise=x;var P=Math.abs(d-f),D=P,L=0,E=f;if(i.setLayout({viewRect:o,r:c}),i.each(a,function(N,R){var F;if(isNaN(N)){i.setItemLayout(R,{angle:NaN,startAngle:NaN,endAngle:NaN,clockwise:x,cx:l,cy:u,r0:h,r:S?NaN:c});return}S!=="area"?F=y===0&&A?_:N*_:F=P/m,F<v?(F=v,D-=v):L+=N;var O=E+M*F,V=0,H=0;p>F?(V=E+M*F/2,H=V):(V=E+b,H=O-b),i.setItemLayout(R,{angle:F,startAngle:V,endAngle:H,clockwise:x,cx:l,cy:u,r0:h,r:S?Kt(N,w,[h,c]):c}),E=O}),D<i3&&m)if(D<=.001){var I=P/m;i.each(a,function(N,R){if(!isNaN(N)){var F=i.getItemLayout(R);F.angle=I;var O=0,V=0;I<p?(O=f+M*(R+1/2)*I,V=O):(O=f+M*R*I+b,V=f+M*(R+1)*I-b),F.startAngle=O,F.endAngle=V}})}else _=D/L,E=f,i.each(a,function(N,R){if(!isNaN(N)){var F=i.getItemLayout(R),O=F.angle===v?v:N*_,V=0,H=0;O<p?(V=E+M*O/2,H=V):(V=E+b,H=E+M*O-b),F.startAngle=V,F.endAngle=H,E+=M*O}})})}var S8=Pt();function Og(r){return{seriesType:r,reset:function(e,t){var n=t.findComponents({mainType:"legend"});if(!(!n||!n.length)){var i=e.getData();i.filterSelf(function(a){for(var o=i.getName(a),s=0;s<n.length;s++)if(!n[s].isSelected(o))return!1;return!0})}}}}var nge=Math.PI/180;function a3(r,e,t,n,i,a,o,s,l,u){if(r.length<2)return;function c(g){for(var v=g.rB,m=v*v,y=0;y<g.list.length;y++){var _=g.list[y],x=Math.abs(_.label.y-t),S=n+_.len,A=S*S,w=Math.sqrt(Math.abs((1-x*x/m)*A)),M=e+(w+_.len2)*i,C=M-_.label.x,b=_.targetTextWidth-C*i;A8(_,b,!0),_.label.x=M}}function h(g){for(var v={list:[],maxY:0},m={list:[],maxY:0},y=0;y<g.length;y++)if(g[y].labelAlignTo==="none"){var _=g[y],x=_.label.y>t?m:v,S=Math.abs(_.label.y-t);if(S>=x.maxY){var A=_.label.x-e-_.len2*i,w=n+_.len,M=Math.abs(A)<w?Math.sqrt(S*S/(1-A*A/w/w)):w;x.rB=M,x.maxY=S}x.list.push(_)}c(v),c(m)}for(var f=r.length,d=0;d<f;d++)if(r[d].position==="outer"&&r[d].labelAlignTo==="labelLine"){var p=r[d].label.x-u;r[d].linePoints[1][0]+=p,r[d].label.x=u}WH(r,l,l+o)&&h(r)}function rge(r,e,t,n,i,a,o,s){for(var l=[],u=[],c=Number.MAX_VALUE,h=-Number.MAX_VALUE,f=0;f<r.length;f++){var d=r[f].label;VA(r[f])||(d.x<e?(c=Math.min(c,d.x),l.push(r[f])):(h=Math.max(h,d.x),u.push(r[f])))}for(var f=0;f<r.length;f++){var p=r[f];if(!VA(p)&&p.linePoints){if(p.labelStyleWidth!=null)continue;var d=p.label,g=p.linePoints,v=void 0;p.labelAlignTo==="edge"?d.x<e?v=g[2][0]-p.labelDistance-o-p.edgeDistance:v=o+i-p.edgeDistance-g[2][0]-p.labelDistance:p.labelAlignTo==="labelLine"?d.x<e?v=c-o-p.bleedMargin:v=o+i-h-p.bleedMargin:d.x<e?v=d.x-o-p.bleedMargin:v=o+i-d.x-p.bleedMargin,p.targetTextWidth=v,A8(p,v)}}a3(u,e,t,n,1,i,a,o,s,h),a3(l,e,t,n,-1,i,a,o,s,c);for(var f=0;f<r.length;f++){var p=r[f];if(!VA(p)&&p.linePoints){var d=p.label,g=p.linePoints,m=p.labelAlignTo==="edge",y=d.style.padding,_=y?y[1]+y[3]:0,x=d.style.backgroundColor?0:_,S=p.rect.width+x,A=g[1][0]-g[2][0];m?d.x<e?g[2][0]=o+p.edgeDistance+S+p.labelDistance:g[2][0]=o+i-p.edgeDistance-S-p.labelDistance:(d.x<e?g[2][0]=d.x+p.labelDistance:g[2][0]=d.x-p.labelDistance,g[1][0]=g[2][0]+A),g[1][1]=g[2][1]=d.y}}}function A8(r,e,t){if(t===void 0&&(t=!1),r.labelStyleWidth==null){var n=r.label,i=n.style,a=r.rect,o=i.backgroundColor,s=i.padding,l=s?s[1]+s[3]:0,u=i.overflow,c=a.width+(o?0:l);if(e<c||t){var h=a.height;if(u&&u.match("break")){n.setStyle("backgroundColor",null),n.setStyle("width",e-l);var f=n.getBoundingRect();n.setStyle("width",Math.ceil(f.width)),n.setStyle("backgroundColor",o)}else{var d=e-l,p=e<c?d:t?d>r.unconstrainedWidth?null:d:null;n.setStyle("width",p)}var g=n.getBoundingRect();a.width=g.width;var v=(n.style.margin||0)+2.1;a.height=g.height+v,a.y-=(a.height-h)/2}}}function VA(r){return r.position==="center"}function ige(r){var e=r.getData(),t=[],n,i,a=!1,o=(r.get("minShowLabelAngle")||0)*nge,s=e.getLayout("viewRect"),l=e.getLayout("r"),u=s.width,c=s.x,h=s.y,f=s.height;function d(A){A.ignore=!0}function p(A){if(!A.ignore)return!0;for(var w in A.states)if(A.states[w].ignore===!1)return!0;return!1}e.each(function(A){var w=e.getItemGraphicEl(A),M=w.shape,C=w.getTextContent(),b=w.getTextGuideLine(),T=e.getItemModel(A),P=T.getModel("label"),D=P.get("position")||T.get(["emphasis","label","position"]),L=P.get("distanceToLabelLine"),E=P.get("alignTo"),I=Pe(P.get("edgeDistance"),u),N=P.get("bleedMargin"),R=T.getModel("labelLine"),F=R.get("length");F=Pe(F,u);var O=R.get("length2");if(O=Pe(O,u),Math.abs(M.endAngle-M.startAngle)<o){k(C.states,d),C.ignore=!0,b&&(k(b.states,d),b.ignore=!0);return}if(p(C)){var V=(M.startAngle+M.endAngle)/2,H=Math.cos(V),Q=Math.sin(V),W,Z,ee,he;n=M.cx,i=M.cy;var le=D==="inside"||D==="inner";if(D==="center")W=M.cx,Z=M.cy,he="center";else{var re=(le?(M.r+M.r0)/2*H:M.r*H)+n,be=(le?(M.r+M.r0)/2*Q:M.r*Q)+i;if(W=re+H*3,Z=be+Q*3,!le){var de=re+H*(F+l-M.r),U=be+Q*(F+l-M.r),K=de+(H<0?-1:1)*O,te=U;E==="edge"?W=H<0?c+I:c+u-I:W=K+(H<0?-L:L),Z=te,ee=[[re,be],[de,U],[K,te]]}he=le?"center":E==="edge"?H>0?"right":"left":H>0?"left":"right"}var ce=Math.PI,se=0,Ne=P.get("rotate");if(Ft(Ne))se=Ne*(ce/180);else if(D==="center")se=0;else if(Ne==="radial"||Ne===!0){var Oe=H<0?-V+ce:-V;se=Oe}else if(Ne==="tangential"&&D!=="outside"&&D!=="outer"){var B=Math.atan2(H,Q);B<0&&(B=ce*2+B);var z=Q>0;z&&(B=ce+B),se=B-ce}if(a=!!se,C.x=W,C.y=Z,C.rotation=se,C.setStyle({verticalAlign:"middle"}),le){C.setStyle({align:he});var Ae=C.states.select;Ae&&(Ae.x+=C.x,Ae.y+=C.y)}else{var ne=C.getBoundingRect().clone();ne.applyTransform(C.getComputedTransform());var ve=(C.style.margin||0)+2.1;ne.y-=ve/2,ne.height+=ve,t.push({label:C,labelLine:b,position:D,len:F,len2:O,minTurnAngle:R.get("minTurnAngle"),maxSurfaceAngle:R.get("maxSurfaceAngle"),surfaceNormal:new ft(H,Q),linePoints:ee,textAlign:he,labelDistance:L,labelAlignTo:E,edgeDistance:I,bleedMargin:N,rect:ne,unconstrainedWidth:ne.width,labelStyleWidth:C.style.width})}w.setTextConfig({inside:le})}}),!a&&r.get("avoidLabelOverlap")&&rge(t,n,i,l,u,f,c,h);for(var g=0;g<t.length;g++){var v=t[g],m=v.label,y=v.labelLine,_=isNaN(m.x)||isNaN(m.y);if(m){m.setStyle({align:v.textAlign}),_&&(k(m.states,d),m.ignore=!0);var x=m.states.select;x&&(x.x+=m.x,x.y+=m.y)}if(y){var S=v.linePoints;_||!S?(k(y.states,d),y.ignore=!0):(VH(S,v.minTurnAngle),vpe(S,v.surfaceNormal,v.maxSurfaceAngle),y.setShape({points:S}),m.__hostTarget.textGuideLineConfig={anchor:new ft(S[0][0],S[0][1])})}}}var age=function(r){ae(e,r);function e(t,n,i){var a=r.call(this)||this;a.z2=2;var o=new Ot;return a.setTextContent(o),a.updateData(t,n,i,!0),a}return e.prototype.updateData=function(t,n,i,a){var o=this,s=t.hostModel,l=t.getItemModel(n),u=l.getModel("emphasis"),c=t.getItemLayout(n),h=pe(hc(l.getModel("itemStyle"),c,!0),c);if(isNaN(h.startAngle)){o.setShape(h);return}if(a){o.setShape(h);var f=s.getShallow("animationType");s.ecModel.ssr?(Tn(o,{scaleX:0,scaleY:0},s,{dataIndex:n,isFrom:!0}),o.originX=h.cx,o.originY=h.cy):f==="scale"?(o.shape.r=c.r0,Tn(o,{shape:{r:c.r}},s,n)):i!=null?(o.setShape({startAngle:i,endAngle:i}),Tn(o,{shape:{startAngle:c.startAngle,endAngle:c.endAngle}},s,n)):(o.shape.endAngle=c.startAngle,zt(o,{shape:{endAngle:c.endAngle}},s,n))}else lo(o),zt(o,{shape:h},s,n);o.useStyle(t.getItemVisual(n,"style")),Br(o,l);var d=(c.startAngle+c.endAngle)/2,p=s.get("selectedOffset"),g=Math.cos(d)*p,v=Math.sin(d)*p,m=l.getShallow("cursor");m&&o.attr("cursor",m),this._updateLabel(s,t,n),o.ensureState("emphasis").shape=pe({r:c.r+(u.get("scale")&&u.get("scaleSize")||0)},hc(u.getModel("itemStyle"),c)),pe(o.ensureState("select"),{x:g,y:v,shape:hc(l.getModel(["select","itemStyle"]),c)}),pe(o.ensureState("blur"),{shape:hc(l.getModel(["blur","itemStyle"]),c)});var y=o.getTextGuideLine(),_=o.getTextContent();y&&pe(y.ensureState("select"),{x:g,y:v}),pe(_.ensureState("select"),{x:g,y:v}),Rn(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n,i){var a=this,o=n.getItemModel(i),s=o.getModel("labelLine"),l=n.getItemVisual(i,"style"),u=l&&l.fill,c=l&&l.opacity;zr(a,Sr(o),{labelFetcher:n.hostModel,labelDataIndex:i,inheritColor:u,defaultOpacity:c,defaultText:t.getFormattedLabel(i,"normal")||n.getName(i)});var h=a.getTextContent();a.setTextConfig({position:null,rotation:null}),h.attr({z2:10});var f=t.get(["label","position"]);if(f!=="outside"&&f!=="outer")a.removeTextGuideLine();else{var d=this.getTextGuideLine();d||(d=new Ui,this.setTextGuideLine(d)),W2(this,$2(o),{stroke:u,opacity:Go(s.get(["lineStyle","opacity"]),c,1)})}},e}(Bi),oge=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.ignoreLabelLineUpdate=!0,t}return e.prototype.render=function(t,n,i,a){var o=t.getData(),s=this._data,l=this.group,u;if(!s&&o.count()>0){for(var c=o.getItemLayout(0),h=1;isNaN(c&&c.startAngle)&&h<o.count();++h)c=o.getItemLayout(h);c&&(u=c.startAngle)}if(this._emptyCircleSector&&l.remove(this._emptyCircleSector),o.count()===0&&t.get("showEmptyCircle")){var f=S8(t),d=new Bi({shape:pe(x8(t,i),f)});d.useStyle(t.getModel("emptyCircleStyle").getItemStyle()),this._emptyCircleSector=d,l.add(d)}o.diff(s).add(function(p){var g=new age(o,p,u);o.setItemGraphicEl(p,g),l.add(g)}).update(function(p,g){var v=s.getItemGraphicEl(g);v.updateData(o,p,u),v.off("click"),l.add(v),o.setItemGraphicEl(p,v)}).remove(function(p){var g=s.getItemGraphicEl(p);Xv(g,t,p)}).execute(),ige(t),t.get("animationTypeUpdate")!=="expansion"&&(this._data=o)},e.prototype.dispose=function(){},e.prototype.containPoint=function(t,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="pie",e}(gn);const sge=oge;function Ld(r,e,t){e=_e(e)&&{coordDimensions:e}||pe({encodeDefine:r.getEncode()},e);var n=r.getSource(),i=Pg(n,e).dimensions,a=new vi(i,r);return a.initData(n,t),a}var lge=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}();const Fg=lge;var uge=Pt(),cge=function(r){ae(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 Fg(Fe(this.getData,this),Fe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.mergeOption=function(){r.prototype.mergeOption.apply(this,arguments)},e.prototype.getInitialData=function(){return Ld(this,{coordDimensions:["value"],encodeDefaulter:ut(A2,this)})},e.prototype.getDataParams=function(t){var n=this.getData(),i=uge(n),a=i.seats;if(!a){var o=[];n.each(n.mapDimension("value"),function(l){o.push(l)}),a=i.seats=yse(o,n.hostModel.get("percentPrecision"))}var s=r.prototype.getDataParams.call(this,t);return s.percent=a[t]||0,s.$vars.push("percent"),s},e.prototype._defaultLabelLine=function(t){zc(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.type="series.pie",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",center:["50%","50%"],radius:[0,"75%"],clockwise:!0,startAngle:90,endAngle:"auto",padAngle:0,minAngle:0,minShowLabelAngle:0,selectedOffset:10,percentPrecision:2,stillShowZeroSum:!0,left:0,top:0,right:0,bottom:0,width:null,height:null,label:{rotate:0,show:!0,overflow:"truncate",position:"outer",alignTo:"none",edgeDistance:"25%",bleedMargin:10,distanceToLabelLine:5},labelLine:{show:!0,length:15,length2:15,smooth:!1,minTurnAngle:90,maxSurfaceAngle:90,lineStyle:{width:1,type:"solid"}},itemStyle:{borderWidth:1,borderJoin:"round"},showEmptyCircle:!0,emptyCircleStyle:{color:"lightgray",opacity:1},labelLayout:{hideOverlap:!0},emphasis:{scale:!0,scaleSize:5},avoidLabelOverlap:!0,animationType:"expansion",animationDuration:1e3,animationTypeUpdate:"transition",animationEasingUpdate:"cubicInOut",animationDurationUpdate:500,animationEasing:"cubicInOut"},e}(En);const hge=cge;function fge(r){return{seriesType:r,reset:function(e,t){var n=e.getData();n.filterSelf(function(i){var a=n.mapDimension("value"),o=n.get(a,i);return!(Ft(o)&&!isNaN(o)&&o<0)})}}}function dge(r){r.registerChartView(sge),r.registerSeriesModel(hge),FG("pie",r.registerAction),r.registerLayout(ut(tge,"pie")),r.registerProcessor(Og("pie")),r.registerProcessor(fge("pie"))}var pge=function(r){ae(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 Us(null,this,{useEncodeDefaulter:!0})},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?5e3:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?1e4:this.get("progressiveThreshold"):t},e.prototype.brushSelector=function(t,n,i){return i.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"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,symbolSize:10,large:!1,largeThreshold:2e3,itemStyle:{opacity:.8},emphasis:{scale:!0},clip:!0,select:{itemStyle:{borderColor:"#212121"}},universalTransition:{divideShape:"clone"}},e}(En);const vge=pge;var w8=4,gge=function(){function r(){}return r}(),mge=function(r){ae(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 gge},e.prototype.reset=function(){this.notClear=!1,this._off=0},e.prototype.buildPath=function(t,n){var i=n.points,a=n.size,o=this.symbolProxy,s=o.shape,l=t.getContext?t.getContext():t,u=l&&a[0]<w8,c=this.softClipShape,h;if(u){this._ctx=l;return}for(this._ctx=null,h=this._off;h<i.length;){var f=i[h++],d=i[h++];isNaN(f)||isNaN(d)||c&&!c.contain(f,d)||(s.x=f-a[0]/2,s.y=d-a[1]/2,s.width=a[0],s.height=a[1],o.buildPath(t,s,!0))}this.incremental&&(this._off=h,this.notClear=!0)},e.prototype.afterBrush=function(){var t=this.shape,n=t.points,i=t.size,a=this._ctx,o=this.softClipShape,s;if(a){for(s=this._off;s<n.length;){var l=n[s++],u=n[s++];isNaN(l)||isNaN(u)||o&&!o.contain(l,u)||a.fillRect(l-i[0]/2,u-i[1]/2,i[0],i[1])}this.incremental&&(this._off=s,this.notClear=!0)}},e.prototype.findDataIndex=function(t,n){for(var i=this.shape,a=i.points,o=i.size,s=Math.max(o[0],4),l=Math.max(o[1],4),u=a.length/2-1;u>=0;u--){var c=u*2,h=a[c]-s/2,f=a[c+1]-l/2;if(t>=h&&n>=f&&t<=h+s&&n<=f+l)return u}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.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,i=n.points,a=n.size,o=a[0],s=a[1],l=1/0,u=1/0,c=-1/0,h=-1/0,f=0;f<i.length;){var d=i[f++],p=i[f++];l=Math.min(d,l),c=Math.max(d,c),u=Math.min(p,u),h=Math.max(p,h)}t=this._rect=new dt(l-o/2,u-s/2,c-l+o,h-u+s)}return t},e}(yt),yge=function(){function r(){this.group=new rt}return r.prototype.updateData=function(e,t){this._clear();var n=this._create();n.setShape({points:e.getLayout("points")}),this._setCommon(n,e,t)},r.prototype.updateLayout=function(e){var t=e.getLayout("points");this.group.eachChild(function(n){if(n.startIndex!=null){var i=(n.endIndex-n.startIndex)*2,a=n.startIndex*4*2;t=new Float32Array(t.buffer,a,i)}n.setShape("points",t),n.reset()})},r.prototype.incrementalPrepareUpdate=function(e){this._clear()},r.prototype.incrementalUpdate=function(e,t,n){var i=this._newAdded[0],a=t.getLayout("points"),o=i&&i.shape.points;if(o&&o.length<2e4){var s=o.length,l=new Float32Array(s+a.length);l.set(o),l.set(a,s),i.endIndex=e.end,i.setShape({points:l})}else{this._newAdded=[];var u=this._create();u.startIndex=e.start,u.endIndex=e.end,u.incremental=!0,u.setShape({points:a}),this._setCommon(u,t,n)}},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new mge({cursor:"default"});return e.ignoreCoarsePointer=!0,this.group.add(e),this._newAdded.push(e),e},r.prototype._setCommon=function(e,t,n){var i=t.hostModel;n=n||{};var a=t.getVisual("symbolSize");e.setShape("size",a instanceof Array?a:[a,a]),e.softClipShape=n.clipShape||null,e.symbolProxy=rr(t.getVisual("symbol"),0,0,0,0),e.setColor=e.symbolProxy.setColor;var o=e.shape.size[0]<w8;e.useStyle(i.getModel("itemStyle").getItemStyle(o?["color","shadowBlur","shadowColor"]:["color"]));var s=t.getVisual("style"),l=s&&s.fill;l&&e.setColor(l);var u=at(e);u.seriesIndex=i.seriesIndex,e.on("mousemove",function(c){u.dataIndex=null;var h=e.hoverDataIdx;h>=0&&(u.dataIndex=h+(e.startIndex||0))})},r.prototype.remove=function(){this._clear()},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const _ge=yge;var xge=function(r){ae(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,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.updateData(a,{clipShape:this._getClipShape(t)}),this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateSymbolDraw(a,t);o.incrementalPrepareUpdate(a),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){this._symbolDraw.incrementalUpdate(t,n.getData(),{clipShape:this._getClipShape(n)}),this._finished=t.end===n.getData().count()},e.prototype.updateTransform=function(t,n,i){var a=t.getData();if(this.group.dirty(),!this._finished||a.count()>1e4)return{update:!0};var o=kg("").reset(t,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout(a)},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 i=this._symbolDraw,a=n.pipelineContext,o=a.large;return(!i||o!==this._isLargeDraw)&&(i&&i.remove(),i=this._symbolDraw=o?new _ge:new Ig,this._isLargeDraw=o,this.group.removeAll()),this.group.add(i.group),i},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0),this._symbolDraw=null},e.prototype.dispose=function(){},e.type="scatter",e}(gn);const Sge=xge;var Age=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.type="grid",e.dependencies=["xAxis","yAxis"],e.layoutMode="box",e.defaultOption={show:!1,z:0,left:"10%",top:60,right:"10%",bottom:70,containLabel:!1,backgroundColor:"rgba(0,0,0,0)",borderWidth:1,borderColor:"#ccc"},e}(Nt);const wge=Age;var jT=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("grid",nr).models[0]},e.type="cartesian2dAxis",e}(Nt);ir(jT,Rg);var b8={show:!0,z:0,inverse:!1,name:"",nameLocation:"end",nameRotate:null,nameTruncate:{maxWidth:null,ellipsis:"...",placeholder:"."},nameTextStyle:{},nameGap:15,silent:!1,triggerEvent:!1,tooltip:{show:!1},axisPointer:{},axisLine:{show:!0,onZero:!0,onZeroAxisIndex:null,lineStyle:{color:"#6E7079",width:1,type:"solid"},symbol:["none","none"],symbolSize:[10,15]},axisTick:{show:!0,inside:!1,length:5,lineStyle:{width:1}},axisLabel:{show:!0,inside:!1,rotate:0,showMinLabel:null,showMaxLabel:null,margin:8,fontSize:12},splitLine:{show:!0,showMinLine:!0,showMaxLine:!0,lineStyle:{color:["#E0E6F1"],width:1,type:"solid"}},splitArea:{show:!1,areaStyle:{color:["rgba(250,250,250,0.2)","rgba(210,219,238,0.2)"]}}},bge=ht({boundaryGap:!0,deduplication:null,splitLine:{show:!1},axisTick:{alignWithLabel:!1,interval:"auto"},axisLabel:{interval:"auto"}},b8),Z2=ht({boundaryGap:[0,0],axisLine:{show:"auto"},axisTick:{show:"auto"},splitNumber:5,minorTick:{show:!1,splitNumber:5,length:3,lineStyle:{}},minorSplitLine:{show:!1,lineStyle:{color:"#F4F7FD",width:1}}},b8),Tge=ht({splitNumber:6,axisLabel:{showMinLabel:!1,showMaxLabel:!1,rich:{primary:{fontWeight:"bold"}}},splitLine:{show:!1}},Z2),Mge=Ke({logBase:10},Z2);const T8={category:bge,value:Z2,time:Tge,log:Mge};var Cge={value:1,category:1,time:1,log:1};function rd(r,e,t,n){k(Cge,function(i,a){var o=ht(ht({},T8[a],!0),n,!0),s=function(l){ae(u,l);function u(){var c=l!==null&&l.apply(this,arguments)||this;return c.type=e+"Axis."+a,c}return u.prototype.mergeDefaultAndTheme=function(c,h){var f=qv(this),d=f?Ad(c):{},p=h.getTheme();ht(c,p.get(a+"Axis")),ht(c,this.getDefaultOption()),c.type=o3(c),f&&Zl(c,d,f)},u.prototype.optionUpdated=function(){var c=this.option;c.type==="category"&&(this.__ordinalMeta=GT.createByAxisModel(this))},u.prototype.getCategories=function(c){var h=this.option;if(h.type==="category")return c?h.data:this.__ordinalMeta.categories},u.prototype.getOrdinalMeta=function(){return this.__ordinalMeta},u.type=e+"Axis."+a,u.defaultOption=o,u}(t);r.registerComponentModel(s)}),r.registerSubTypeDefaulter(e+"Axis",o3)}function o3(r){return r.type||(r.data?"category":"value")}var Ege=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 xe(this._dimList,function(e){return this._axes[e]},this)},r.prototype.getAxesByScale=function(e){return e=e.toLowerCase(),jt(this.getAxes(),function(t){return t.scale.type===e})},r.prototype.addAxis=function(e){var t=e.dim;this._axes[t]=e,this._dimList.push(t)},r}();const Lge=Ege;var KT=["x","y"];function s3(r){return r.type==="interval"||r.type==="time"}var Pge=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="cartesian2d",t.dimensions=KT,t}return e.prototype.calcAffineTransform=function(){this._transform=this._invTransform=null;var t=this.getAxis("x").scale,n=this.getAxis("y").scale;if(!(!s3(t)||!s3(n))){var i=t.getExtent(),a=n.getExtent(),o=this.dataToPoint([i[0],a[0]]),s=this.dataToPoint([i[1],a[1]]),l=i[1]-i[0],u=a[1]-a[0];if(!(!l||!u)){var c=(s[0]-o[0])/l,h=(s[1]-o[1])/u,f=o[0]-i[0]*c,d=o[1]-a[0]*h,p=this._transform=[c,0,0,h,f,d];this._invTransform=vd([],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"),i=this.getAxis("y");return n.contain(n.toLocalCoord(t[0]))&&i.contain(i.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 i=this.dataToPoint(t),a=this.dataToPoint(n),o=this.getArea(),s=new dt(i[0],i[1],a[0]-i[0],a[1]-i[1]);return o.intersect(s)},e.prototype.dataToPoint=function(t,n,i){i=i||[];var a=t[0],o=t[1];if(this._transform&&a!=null&&isFinite(a)&&o!=null&&isFinite(o))return Or(i,t,this._transform);var s=this.getAxis("x"),l=this.getAxis("y");return i[0]=s.toGlobalCoord(s.dataToCoord(a,n)),i[1]=l.toGlobalCoord(l.dataToCoord(o,n)),i},e.prototype.clampData=function(t,n){var i=this.getAxis("x").scale,a=this.getAxis("y").scale,o=i.getExtent(),s=a.getExtent(),l=i.parse(t[0]),u=a.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){var i=[];if(this._invTransform)return Or(i,t,this._invTransform);var a=this.getAxis("x"),o=this.getAxis("y");return i[0]=a.coordToData(a.toLocalCoord(t[0]),n),i[1]=o.coordToData(o.toLocalCoord(t[1]),n),i},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(),i=this.getAxis("y").getGlobalExtent(),a=Math.min(n[0],n[1])-t,o=Math.min(i[0],i[1])-t,s=Math.max(n[0],n[1])-a+t,l=Math.max(i[0],i[1])-o+t;return new dt(a,o,s,l)},e}(Lge),Rge=function(r){ae(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.index=0,s.type=a||"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}(ho);const Dge=Rge;function ZT(r,e,t){t=t||{};var n=r.coordinateSystem,i=e.axis,a={},o=i.getAxesOnZeroOf()[0],s=i.position,l=o?"onZero":s,u=i.dim,c=n.getRect(),h=[c.x,c.x+c.width,c.y,c.y+c.height],f={left:0,right:1,top:0,bottom:1,onZero:2},d=e.get("offset")||0,p=u==="x"?[h[2]-d,h[3]+d]:[h[0]-d,h[1]+d];if(o){var g=o.toGlobalCoord(o.dataToCoord(0));p[f.onZero]=Math.max(Math.min(g,p[1]),p[0])}a.position=[u==="y"?p[f[l]]:h[0],u==="x"?p[f[l]]:h[3]],a.rotation=Math.PI/2*(u==="x"?0:1);var v={top:-1,bottom:1,left:-1,right:1};a.labelDirection=a.tickDirection=a.nameDirection=v[s],a.labelOffset=o?p[f[s]]-p[f.onZero]:0,e.get(["axisTick","inside"])&&(a.tickDirection=-a.tickDirection),Mr(t.labelInside,e.get(["axisLabel","inside"]))&&(a.labelDirection=-a.labelDirection);var m=e.get(["axisLabel","rotate"]);return a.labelRotate=l==="top"?-m:m,a.z2=1,a}function l3(r){return r.get("coordinateSystem")==="cartesian2d"}function u3(r){var e={xAxisModel:null,yAxisModel:null};return k(e,function(t,n){var i=n.replace(/Model$/,""),a=r.getReferringComponents(i,nr).models[0];e[n]=a}),e}var GA=Math.log;function M8(r,e,t){var n=Jl.prototype,i=n.getTicks.call(t),a=n.getTicks.call(t,!0),o=i.length-1,s=n.getInterval.call(t),l=EH(r,e),u=l.extent,c=l.fixMin,h=l.fixMax;if(r.type==="log"){var f=GA(r.base);u=[GA(u[0])/f,GA(u[1])/f]}r.setExtent(u[0],u[1]),r.calcNiceExtent({splitNumber:o,fixMin:c,fixMax:h});var d=n.getExtent.call(r);c&&(u[0]=d[0]),h&&(u[1]=d[1]);var p=n.getInterval.call(r),g=u[0],v=u[1];if(c&&h)p=(v-g)/o;else if(c)for(v=u[0]+p*o;v<u[1]&&isFinite(v)&&isFinite(u[1]);)p=CA(p),v=u[0]+p*o;else if(h)for(g=u[1]-p*o;g>u[0]&&isFinite(g)&&isFinite(u[0]);)p=CA(p),g=u[1]-p*o;else{var m=r.getTicks().length-1;m>o&&(p=CA(p));var y=p*o;v=Math.ceil(u[1]/p)*p,g=Vn(v-y),g<0&&u[0]>=0?(g=0,v=Vn(y)):v>0&&u[1]<=0&&(v=0,g=-Vn(y))}var _=(i[0].value-a[0].value)/s,x=(i[o].value-a[o].value)/s;n.setExtent.call(r,g+p*_,v+p*x),n.setInterval.call(r,p),(_||x)&&n.setNiceExtent.call(r,g+p,v-p)}var Ige=function(){function r(e,t,n){this.type="grid",this._coordsMap={},this._coordsList=[],this._axesMap={},this._axesList=[],this.axisPointerEnabled=!0,this.dimensions=KT,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 i(o){var s,l=wt(o),u=l.length;if(u){for(var c=[],h=u-1;h>=0;h--){var f=+l[h],d=o[f],p=d.model,g=d.scale;HT(g)&&p.get("alignTicks")&&p.get("interval")==null?c.push(d):(td(g,p),HT(g)&&(s=d))}c.length&&(s||(s=c.pop(),td(s.scale,s.model)),k(c,function(v){M8(v.scale,v.model,s.scale)}))}}i(n.x),i(n.y);var a={};k(n.x,function(o){c3(n,"y",o,a)}),k(n.y,function(o){c3(n,"x",o,a)}),this.resize(this.model,t)},r.prototype.resize=function(e,t,n){var i=e.getBoxLayoutParams(),a=!n&&e.get("containLabel"),o=dr(i,{width:t.getWidth(),height:t.getHeight()});this._rect=o;var s=this._axesList;l(),a&&(k(s,function(u){if(!u.model.get(["axisLabel","inside"])){var c=$de(u);if(c){var h=u.isHorizontal()?"height":"width",f=u.model.get(["axisLabel","margin"]);o[h]-=c[h]+f,u.position==="top"?o.y+=c.height+f:u.position==="left"&&(o.x+=c.width+f)}}}),l()),k(this._coordsList,function(u){u.calcAffineTransform()});function l(){k(s,function(u){var c=u.isHorizontal(),h=c?[0,o.width]:[0,o.height],f=u.inverse?1:0;u.setExtent(h[f],h[1-f]),Nge(u,c?o.x:o.y)})}},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]}Qe(e)&&(t=e.yAxisIndex,e=e.xAxisIndex);for(var i=0,a=this._coordsList;i<a.length;i++)if(a[i].getAxis("x").index===e||a[i].getAxis("y").index===t)return a[i]},r.prototype.getCartesians=function(){return this._coordsList.slice()},r.prototype.convertToPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.dataToPoint(n):i.axis?i.axis.toGlobalCoord(i.axis.dataToCoord(n)):null},r.prototype.convertFromPixel=function(e,t,n){var i=this._findConvertTarget(t);return i.cartesian?i.cartesian.pointToData(n):i.axis?i.axis.coordToData(i.axis.toLocalCoord(n)):null},r.prototype._findConvertTarget=function(e){var t=e.seriesModel,n=e.xAxisModel||t&&t.getReferringComponents("xAxis",nr).models[0],i=e.yAxisModel||t&&t.getReferringComponents("yAxis",nr).models[0],a=e.gridModel,o=this._coordsList,s,l;if(t)s=t.coordinateSystem,pt(o,s)<0&&(s=null);else if(n&&i)s=this.getCartesian(n.componentIndex,i.componentIndex);else if(n)l=this.getAxis("x",n.componentIndex);else if(i)l=this.getAxis("y",i.componentIndex);else if(a){var u=a.coordinateSystem;u===this&&(s=this._coordsList[0])}return{cartesian:s,axis:l}},r.prototype.containPoint=function(e){var t=this._coordsList[0];if(t)return t.containPoint(e)},r.prototype._initCartesian=function(e,t,n){var i=this,a=this,o={left:!1,right:!1,top:!1,bottom:!1},s={x:{},y:{}},l={x:0,y:0};if(t.eachComponent("xAxis",u("x"),this),t.eachComponent("yAxis",u("y"),this),!l.x||!l.y){this._axesMap={},this._axesList=[];return}this._axesMap=s,k(s.x,function(c,h){k(s.y,function(f,d){var p="x"+h+"y"+d,g=new Pge(p);g.master=i,g.model=e,i._coordsMap[p]=g,i._coordsList.push(g),g.addAxis(c),g.addAxis(f)})});function u(c){return function(h,f){if(HA(h,e)){var d=h.get("position");c==="x"?d!=="top"&&d!=="bottom"&&(d=o.bottom?"top":"bottom"):d!=="left"&&d!=="right"&&(d=o.left?"right":"left"),o[d]=!0;var p=new Dge(c,$1(h),[0,0],h.get("type"),d),g=p.type==="category";p.onBand=g&&h.get("boundaryGap"),p.inverse=h.get("inverse"),h.axis=p,p.model=h,p.grid=a,p.index=f,a._axesList.push(p),s[c][f]=p,l[c]++}}}},r.prototype._updateScale=function(e,t){k(this._axesList,function(i){if(i.scale.setExtent(1/0,-1/0),i.type==="category"){var a=i.model.get("categorySortInfo");i.scale.setSortInfo(a)}}),e.eachSeries(function(i){if(l3(i)){var a=u3(i),o=a.xAxisModel,s=a.yAxisModel;if(!HA(o,t)||!HA(s,t))return;var l=this.getCartesian(o.componentIndex,s.componentIndex),u=i.getData(),c=l.getAxis("x"),h=l.getAxis("y");n(u,c),n(u,h)}},this);function n(i,a){k(__(i,a.dim),function(o){a.scale.unionExtentFromData(i,o)})}},r.prototype.getTooltipAxes=function(e){var t=[],n=[];return k(this.getCartesians(),function(i){var a=e!=null&&e!=="auto"?i.getAxis(e):i.getBaseAxis(),o=i.getOtherAxis(a);pt(t,a)<0&&t.push(a),pt(n,o)<0&&n.push(o)}),{baseAxes:t,otherAxes:n}},r.create=function(e,t){var n=[];return e.eachComponent("grid",function(i,a){var o=new r(i,e,t);o.name="grid_"+a,o.resize(i,t,!0),i.coordinateSystem=o,n.push(o)}),e.eachSeries(function(i){if(l3(i)){var a=u3(i),o=a.xAxisModel,s=a.yAxisModel,l=o.getCoordSysModel(),u=l.coordinateSystem;i.coordinateSystem=u.getCartesian(o.componentIndex,s.componentIndex)}}),n},r.dimensions=KT,r}();function HA(r,e){return r.getCoordSysModel()===e}function c3(r,e,t,n){t.getAxesOnZeroOf=function(){return a?[a]:[]};var i=r[e],a,o=t.model,s=o.get(["axisLine","onZero"]),l=o.get(["axisLine","onZeroAxisIndex"]);if(!s)return;if(l!=null)h3(i[l])&&(a=i[l]);else for(var u in i)if(i.hasOwnProperty(u)&&h3(i[u])&&!n[c(i[u])]){a=i[u];break}a&&(n[c(a)]=!0);function c(h){return h.dim+"_"+h.index}}function h3(r){return r&&r.type!=="category"&&r.type!=="time"&&Wde(r)}function Nge(r,e){var t=r.getExtent(),n=t[0]+t[1];r.toGlobalCoord=r.dim==="x"?function(i){return i+e}:function(i){return n-i+e},r.toLocalCoord=r.dim==="x"?function(i){return i-e}:function(i){return n-i+e}}const kge=Ige;var Pl=Math.PI,Dc=function(){function r(e,t){this.group=new rt,this.opt=t,this.axisModel=e,Ke(t,{labelOffset:0,nameDirection:1,tickDirection:1,labelDirection:1,silent:!0,handleAutoShown:function(){return!0}});var n=new rt({x:t.position[0],y:t.position[1],rotation:t.rotation});n.updateTransform(),this._transformGroup=n}return r.prototype.hasBuilder=function(e){return!!f3[e]},r.prototype.add=function(e){f3[e](this.opt,this.axisModel,this.group,this._transformGroup)},r.prototype.getGroup=function(){return this.group},r.innerTextLayout=function(e,t,n){var i=w4(t-e),a,o;return Vv(i)?(o=n>0?"top":"bottom",a="center"):Vv(i-Pl)?(o=n>0?"bottom":"top",a="center"):(o="middle",i>0&&i<Pl?a=n>0?"right":"left":a=n>0?"left":"right"),{rotation:i,textAlign:a,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}(),f3={axisLine:function(r,e,t,n){var i=e.get(["axisLine","show"]);if(i==="auto"&&r.handleAutoShown&&(i=r.handleAutoShown("axisLine")),!!i){var a=e.axis.getExtent(),o=n.transform,s=[a[0],0],l=[a[1],0],u=s[0]>l[0];o&&(Or(s,s,o),Or(l,l,o));var c=pe({lineCap:"round"},e.getModel(["axisLine","lineStyle"]).getLineStyle()),h=new Cr({shape:{x1:s[0],y1:s[1],x2:l[0],y2:l[1]},style:c,strokeContainThreshold:r.strokeContainThreshold||5,silent:!0,z2:1});Qf(h.shape,h.style.lineWidth),h.anid="line",t.add(h);var f=e.get(["axisLine","symbol"]);if(f!=null){var d=e.get(["axisLine","symbolSize"]);ke(f)&&(f=[f,f]),(ke(d)||Ft(d))&&(d=[d,d]);var p=Jc(e.get(["axisLine","symbolOffset"])||0,d),g=d[0],v=d[1];k([{rotate:r.rotation+Math.PI/2,offset:p[0],r:0},{rotate:r.rotation-Math.PI/2,offset:p[1],r:Math.sqrt((s[0]-l[0])*(s[0]-l[0])+(s[1]-l[1])*(s[1]-l[1]))}],function(m,y){if(f[y]!=="none"&&f[y]!=null){var _=rr(f[y],-g/2,-v/2,g,v,c.stroke,!0),x=m.r+m.offset,S=u?l:s;_.attr({rotation:m.rotate,x:S[0]+x*Math.cos(r.rotation),y:S[1]-x*Math.sin(r.rotation),silent:!0,z2:11}),t.add(_)}})}}},axisTickLabel:function(r,e,t,n){var i=Bge(t,n,e,r),a=Uge(t,n,e,r);if(Fge(e,a,i),zge(t,n,e,r.tickDirection),e.get(["axisLabel","hideOverlap"])){var o=GH(xe(a,function(s){return{label:s,priority:s.z2,defaultAttr:{ignore:s.ignore}}}));$H(o)}},axisName:function(r,e,t,n){var i=Mr(r.axisName,e.get("name"));if(i){var a=e.get("nameLocation"),o=r.nameDirection,s=e.getModel("nameTextStyle"),l=e.get("nameGap")||0,u=e.axis.getExtent(),c=u[0]>u[1]?-1:1,h=[a==="start"?u[0]-c*l:a==="end"?u[1]+c*l:(u[0]+u[1])/2,p3(a)?r.labelOffset+o*l:0],f,d=e.get("nameRotate");d!=null&&(d=d*Pl/180);var p;p3(a)?f=Dc.innerTextLayout(r.rotation,d!=null?d:r.rotation,o):(f=Oge(r.rotation,a,d||0,u),p=r.axisNameAvailableWidth,p!=null&&(p=Math.abs(p/Math.sin(f.rotation)),!isFinite(p)&&(p=null)));var g=s.getFont(),v=e.get("nameTruncate",!0)||{},m=v.ellipsis,y=Mr(r.nameTruncateMaxWidth,v.maxWidth,p),_=new Ot({x:h[0],y:h[1],rotation:f.rotation,silent:Dc.isLabelSilent(e),style:pn(s,{text:i,font:g,overflow:"truncate",width:y,ellipsis:m,fill:s.getTextColor()||e.get(["axisLine","lineStyle","color"]),align:s.get("align")||f.textAlign,verticalAlign:s.get("verticalAlign")||f.textVerticalAlign}),z2:1});if(Kc({el:_,componentModel:e,itemName:i}),_.__fullText=i,_.anid="name",e.get("triggerEvent")){var x=Dc.makeAxisEventDataBase(e);x.targetType="axisName",x.name=i,at(_).eventData=x}n.add(_),_.updateTransform(),t.add(_),_.decomposeTransform()}}};function Oge(r,e,t,n){var i=w4(t-r),a,o,s=n[0]>n[1],l=e==="start"&&!s||e!=="start"&&s;return Vv(i-Pl/2)?(o=l?"bottom":"top",a="center"):Vv(i-Pl*1.5)?(o=l?"top":"bottom",a="center"):(o="middle",i<Pl*1.5&&i>Pl/2?a=l?"left":"right":a=l?"right":"left"),{rotation:i,textAlign:a,textVerticalAlign:o}}function Fge(r,e,t){if(!LH(r.axis)){var n=r.get(["axisLabel","showMinLabel"]),i=r.get(["axisLabel","showMaxLabel"]);e=e||[],t=t||[];var a=e[0],o=e[1],s=e[e.length-1],l=e[e.length-2],u=t[0],c=t[1],h=t[t.length-1],f=t[t.length-2];n===!1?(ua(a),ua(u)):d3(a,o)&&(n?(ua(o),ua(c)):(ua(a),ua(u))),i===!1?(ua(s),ua(h)):d3(l,s)&&(i?(ua(l),ua(f)):(ua(s),ua(h)))}}function ua(r){r&&(r.ignore=!0)}function d3(r,e){var t=r&&r.getBoundingRect().clone(),n=e&&e.getBoundingRect().clone();if(!(!t||!n)){var i=g1([]);return jc(i,i,-r.rotation),t.applyTransform(As([],i,r.getLocalTransform())),n.applyTransform(As([],i,e.getLocalTransform())),t.intersect(n)}}function p3(r){return r==="middle"||r==="center"}function C8(r,e,t,n,i){for(var a=[],o=[],s=[],l=0;l<r.length;l++){var u=r[l].coord;o[0]=u,o[1]=0,s[0]=u,s[1]=t,e&&(Or(o,o,e),Or(s,s,e));var c=new Cr({shape:{x1:o[0],y1:o[1],x2:s[0],y2:s[1]},style:n,z2:2,autoBatch:!0,silent:!0});Qf(c.shape,c.style.lineWidth),c.anid=i+"_"+r[l].tickValue,a.push(c)}return a}function Bge(r,e,t,n){var i=t.axis,a=t.getModel("axisTick"),o=a.get("show");if(o==="auto"&&n.handleAutoShown&&(o=n.handleAutoShown("axisTick")),!(!o||i.scale.isBlank())){for(var s=a.getModel("lineStyle"),l=n.tickDirection*a.get("length"),u=i.getTicksCoords(),c=C8(u,e.transform,l,Ke(s.getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])}),"ticks"),h=0;h<c.length;h++)r.add(c[h]);return c}}function zge(r,e,t,n){var i=t.axis,a=t.getModel("minorTick");if(!(!a.get("show")||i.scale.isBlank())){var o=i.getMinorTicksCoords();if(o.length)for(var s=a.getModel("lineStyle"),l=n*a.get("length"),u=Ke(s.getLineStyle(),Ke(t.getModel("axisTick").getLineStyle(),{stroke:t.get(["axisLine","lineStyle","color"])})),c=0;c<o.length;c++)for(var h=C8(o[c],e.transform,l,u,"minorticks_"+c),f=0;f<h.length;f++)r.add(h[f])}}function Uge(r,e,t,n){var i=t.axis,a=Mr(n.axisLabelShow,t.get(["axisLabel","show"]));if(!(!a||i.scale.isBlank())){var o=t.getModel("axisLabel"),s=o.get("margin"),l=i.getViewLabels(),u=(Mr(n.labelRotate,o.get("rotate"))||0)*Pl/180,c=Dc.innerTextLayout(n.rotation,u,n.labelDirection),h=t.getCategories&&t.getCategories(!0),f=[],d=Dc.isLabelSilent(t),p=t.get("triggerEvent");return k(l,function(g,v){var m=i.scale.type==="ordinal"?i.scale.getRawOrdinalNumber(g.tickValue):g.tickValue,y=g.formattedLabel,_=g.rawLabel,x=o;if(h&&h[m]){var S=h[m];Qe(S)&&S.textStyle&&(x=new vn(S.textStyle,o,t.ecModel))}var A=x.getTextColor()||t.get(["axisLine","lineStyle","color"]),w=i.dataToCoord(m),M=x.getShallow("align",!0)||c.textAlign,C=ot(x.getShallow("alignMinLabel",!0),M),b=ot(x.getShallow("alignMaxLabel",!0),M),T=x.getShallow("verticalAlign",!0)||x.getShallow("baseline",!0)||c.textVerticalAlign,P=ot(x.getShallow("verticalAlignMinLabel",!0),T),D=ot(x.getShallow("verticalAlignMaxLabel",!0),T),L=new Ot({x:w,y:n.labelOffset+n.labelDirection*s,rotation:c.rotation,silent:d,z2:10+(g.level||0),style:pn(x,{text:y,align:v===0?C:v===l.length-1?b:M,verticalAlign:v===0?P:v===l.length-1?D:T,fill:qe(A)?A(i.type==="category"?_:i.type==="value"?m+"":m,v):A})});if(L.anid="label_"+m,Kc({el:L,componentModel:t,itemName:y,formatterParamsExtra:{isTruncated:function(){return L.isTruncated},value:_,tickIndex:v}}),p){var E=Dc.makeAxisEventDataBase(t);E.targetType="axisLabel",E.value=_,E.tickIndex=v,i.type==="category"&&(E.dataIndex=m),at(L).eventData=E}e.add(L),L.updateTransform(),f.push(L),r.add(L),L.decomposeTransform()}),f}}const ks=Dc;function Vge(r,e){var t={axesInfo:{},seriesInvolved:!1,coordSysAxesInfo:{},coordSysMap:{}};return Gge(t,r,e),t.seriesInvolved&&Wge(t,r),t}function Gge(r,e,t){var n=e.getComponent("tooltip"),i=e.getComponent("axisPointer"),a=i.get("link",!0)||[],o=[];k(t.getCoordinateSystems(),function(s){if(!s.axisPointerEnabled)return;var l=ng(s.model),u=r.coordSysAxesInfo[l]={};r.coordSysMap[l]=s;var c=s.model,h=c.getModel("tooltip",n);if(k(s.getAxes(),ut(g,!1,null)),s.getTooltipAxes&&n&&h.get("show")){var f=h.get("trigger")==="axis",d=h.get(["axisPointer","type"])==="cross",p=s.getTooltipAxes(h.get(["axisPointer","axis"]));(f||d)&&k(p.baseAxes,ut(g,d?"cross":!0,f)),d&&k(p.otherAxes,ut(g,"cross",!1))}function g(v,m,y){var _=y.model.getModel("axisPointer",i),x=_.get("show");if(!(!x||x==="auto"&&!v&&!QT(_))){m==null&&(m=_.get("triggerTooltip")),_=v?Hge(y,h,i,e,v,m):_;var S=_.get("snap"),A=_.get("triggerEmphasis"),w=ng(y.model),M=m||S||y.type==="category",C=r.axesInfo[w]={key:w,axis:y,coordSys:s,axisPointerModel:_,triggerTooltip:m,triggerEmphasis:A,involveSeries:M,snap:S,useHandle:QT(_),seriesModels:[],linkGroup:null};u[w]=C,r.seriesInvolved=r.seriesInvolved||M;var b=$ge(a,y);if(b!=null){var T=o[b]||(o[b]={axesInfo:{}});T.axesInfo[w]=C,T.mapper=a[b].mapper,C.linkGroup=T}}}})}function Hge(r,e,t,n,i,a){var o=e.getModel("axisPointer"),s=["type","snap","lineStyle","shadowStyle","label","animation","animationDurationUpdate","animationEasingUpdate","z"],l={};k(s,function(f){l[f]=Je(o.get(f))}),l.snap=r.type!=="category"&&!!a,o.get("type")==="cross"&&(l.type="line");var u=l.label||(l.label={});if(u.show==null&&(u.show=!1),i==="cross"){var c=o.get(["label","show"]);if(u.show=c!=null?c:!0,!a){var h=l.lineStyle=o.get("crossStyle");h&&Ke(u,h.textStyle)}}return r.model.getModel("axisPointer",new vn(l,t,n))}function Wge(r,e){e.eachSeries(function(t){var n=t.coordinateSystem,i=t.get(["tooltip","trigger"],!0),a=t.get(["tooltip","show"],!0);!n||i==="none"||i===!1||i==="item"||a===!1||t.get(["axisPointer","show"],!0)===!1||k(r.coordSysAxesInfo[ng(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 $ge(r,e){for(var t=e.model,n=e.dim,i=0;i<r.length;i++){var a=r[i]||{};if(WA(a[n+"AxisId"],t.id)||WA(a[n+"AxisIndex"],t.componentIndex)||WA(a[n+"AxisName"],t.name))return i}}function WA(r,e){return r==="all"||_e(r)&&pt(r,e)>=0||r===e}function Xge(r){var e=Q2(r);if(e){var t=e.axisPointerModel,n=e.axis.scale,i=t.option,a=t.get("status"),o=t.get("value");o!=null&&(o=n.parse(o));var s=QT(t);a==null&&(i.status=s?"show":"hide");var l=n.getExtent().slice();l[0]>l[1]&&l.reverse(),(o==null||o>l[1])&&(o=l[1]),o<l[0]&&(o=l[0]),i.value=o,s&&(i.status=e.axis.scale.isBlank()?"hide":"show")}}function Q2(r){var e=(r.ecModel.getComponent("axisPointer")||{}).coordSysAxesInfo;return e&&e.axesInfo[ng(r)]}function Yge(r){var e=Q2(r);return e&&e.axisPointerModel}function QT(r){return!!r.get(["handle","show"])}function ng(r){return r.type+"||"+r.id}var v3={},qge=function(r){ae(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,i,a){this.axisPointerClass&&Xge(t),r.prototype.render.apply(this,arguments),this._doUpdateAxisPointerClass(t,i,!0)},e.prototype.updateAxisPointer=function(t,n,i,a){this._doUpdateAxisPointerClass(t,i,!1)},e.prototype.remove=function(t,n){var i=this._axisPointer;i&&i.remove(n)},e.prototype.dispose=function(t,n){this._disposeAxisPointer(n),r.prototype.dispose.apply(this,arguments)},e.prototype._doUpdateAxisPointerClass=function(t,n,i){var a=e.getAxisPointerClass(this.axisPointerClass);if(a){var o=Yge(t);o?(this._axisPointer||(this._axisPointer=new a)).render(t,o,n,i):this._disposeAxisPointer(n)}},e.prototype._disposeAxisPointer=function(t){this._axisPointer&&this._axisPointer.dispose(t),this._axisPointer=null},e.registerAxisPointerClass=function(t,n){v3[t]=n},e.getAxisPointerClass=function(t){return t&&v3[t]},e.type="axis",e}(kn);const nh=qge;var JT=Pt();function E8(r,e,t,n){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitArea"),o=a.getModel("areaStyle"),s=o.get("color"),l=n.coordinateSystem.getRect(),u=i.getTicksCoords({tickModel:a,clamp:!0});if(u.length){var c=s.length,h=JT(r).splitAreaColors,f=He(),d=0;if(h)for(var p=0;p<u.length;p++){var g=h.get(u[p].tickValue);if(g!=null){d=(g+(c-1)*p)%c;break}}var v=i.toGlobalCoord(u[0].coord),m=o.getAreaStyle();s=_e(s)?s:[s];for(var p=1;p<u.length;p++){var y=i.toGlobalCoord(u[p].coord),_=void 0,x=void 0,S=void 0,A=void 0;i.isHorizontal()?(_=v,x=l.y,S=y-_,A=l.height,v=_+S):(_=l.x,x=v,S=l.width,A=y-x,v=x+A);var w=u[p-1].tickValue;w!=null&&f.set(w,d),e.add(new Dt({anid:w!=null?"area_"+w:null,shape:{x:_,y:x,width:S,height:A},style:Ke({fill:s[d]},m),autoBatch:!0,silent:!0})),d=(d+1)%c}JT(r).splitAreaColors=f}}}function L8(r){JT(r).splitAreaColors=null}var jge=["axisLine","axisTickLabel","axisName"],Kge=["splitArea","splitLine","minorSplitLine"],P8=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="CartesianAxisPointer",t}return e.prototype.render=function(t,n,i,a){this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new rt,this.group.add(this._axisGroup),!!t.get("show")){var s=t.getCoordSysModel(),l=ZT(s,t),u=new ks(t,pe({handleAutoShown:function(h){for(var f=s.coordinateSystem.getCartesians(),d=0;d<f.length;d++)if(HT(f[d].getOtherAxis(t.axis).scale))return!0;return!1}},l));k(jge,u.add,u),this._axisGroup.add(u.getGroup()),k(Kge,function(h){t.get([h,"show"])&&Zge[h](this,this._axisGroup,t,s)},this);var c=a&&a.type==="changeAxisOrder"&&a.isInitSort;c||Mg(o,this._axisGroup,t),r.prototype.render.call(this,t,n,i,a)}},e.prototype.remove=function(){L8(this)},e.type="cartesianAxis",e}(nh),Zge={splitLine:function(r,e,t,n){var i=t.axis;if(!i.scale.isBlank()){var a=t.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color"),l=a.get("showMinLine")!==!1,u=a.get("showMaxLine")!==!1;s=_e(s)?s:[s];for(var c=n.coordinateSystem.getRect(),h=i.isHorizontal(),f=0,d=i.getTicksCoords({tickModel:a}),p=[],g=[],v=o.getLineStyle(),m=0;m<d.length;m++){var y=i.toGlobalCoord(d[m].coord);if(!(m===0&&!l||m===d.length-1&&!u)){var _=d[m].tickValue;h?(p[0]=y,p[1]=c.y,g[0]=y,g[1]=c.y+c.height):(p[0]=c.x,p[1]=y,g[0]=c.x+c.width,g[1]=y);var x=f++%s.length,S=new Cr({anid:_!=null?"line_"+_:null,autoBatch:!0,shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},style:Ke({stroke:s[x]},v),silent:!0});Qf(S.shape,v.lineWidth),e.add(S)}}}},minorSplitLine:function(r,e,t,n){var i=t.axis,a=t.getModel("minorSplitLine"),o=a.getModel("lineStyle"),s=n.coordinateSystem.getRect(),l=i.isHorizontal(),u=i.getMinorTicksCoords();if(u.length)for(var c=[],h=[],f=o.getLineStyle(),d=0;d<u.length;d++)for(var p=0;p<u[d].length;p++){var g=i.toGlobalCoord(u[d][p].coord);l?(c[0]=g,c[1]=s.y,h[0]=g,h[1]=s.y+s.height):(c[0]=s.x,c[1]=g,h[0]=s.x+s.width,h[1]=g);var v=new Cr({anid:"minor_line_"+u[d][p].tickValue,autoBatch:!0,shape:{x1:c[0],y1:c[1],x2:h[0],y2:h[1]},style:f,silent:!0});Qf(v.shape,f.lineWidth),e.add(v)}},splitArea:function(r,e,t,n){E8(r,e,t,n)}},R8=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="xAxis",e}(P8),Qge=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=R8.type,t}return e.type="yAxis",e}(P8),Jge=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="grid",t}return e.prototype.render=function(t,n){this.group.removeAll(),t.get("show")&&this.group.add(new Dt({shape:t.coordinateSystem.getRect(),style:Ke({fill:t.get("backgroundColor")},t.getItemStyle()),silent:!0,z2:-1}))},e.type="grid",e}(kn),g3={offset:0};function D8(r){r.registerComponentView(Jge),r.registerComponentModel(wge),r.registerCoordinateSystem("cartesian2d",kge),rd(r,"x",jT,g3),rd(r,"y",jT,g3),r.registerComponentView(R8),r.registerComponentView(Qge),r.registerPreprocessor(function(e){e.xAxis&&e.yAxis&&!e.grid&&(e.grid={})})}function eme(r){gt(D8),r.registerSeriesModel(vge),r.registerChartView(Sge),r.registerLayout(kg("scatter"))}function tme(r){r.eachSeriesByType("radar",function(e){var t=e.getData(),n=[],i=e.coordinateSystem;if(i){var a=i.getIndicatorAxes();k(a,function(o,s){t.each(t.mapDimension(a[s].dim),function(l,u){n[u]=n[u]||[];var c=i.dataToPoint(l,s);n[u][s]=m3(c)?c:y3(i)})}),t.each(function(o){var s=Bae(n[o],function(l){return m3(l)})||y3(i);n[o].push(s.slice()),t.setItemLayout(o,n[o])})}})}function m3(r){return!isNaN(r[0])&&!isNaN(r[1])}function y3(r){return[r.cx,r.cy]}function nme(r){var e=r.polar;if(e){_e(e)||(e=[e]);var t=[];k(e,function(n,i){n.indicator?(n.type&&!n.shape&&(n.shape=n.type),r.radar=r.radar||[],_e(r.radar)||(r.radar=[r.radar]),r.radar.push(n)):t.push(n)}),r.polar=t}k(r.series,function(n){n&&n.type==="radar"&&n.polarIndex&&(n.radarIndex=n.polarIndex)})}var rme=function(r){ae(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,i){var a=t.coordinateSystem,o=this.group,s=t.getData(),l=this._data;function u(f,d){var p=f.getItemVisual(d,"symbol")||"circle";if(p!=="none"){var g=Cd(f.getItemVisual(d,"symbolSize")),v=rr(p,-1,-1,2,2),m=f.getItemVisual(d,"symbolRotate")||0;return v.attr({style:{strokeNoScale:!0},z2:100,scaleX:g[0]/2,scaleY:g[1]/2,rotation:m*Math.PI/180||0}),v}}function c(f,d,p,g,v,m){p.removeAll();for(var y=0;y<d.length-1;y++){var _=u(g,v);_&&(_.__dimIdx=y,f[y]?(_.setPosition(f[y]),Zc[m?"initProps":"updateProps"](_,{x:d[y][0],y:d[y][1]},t,v)):_.setPosition(d[y]),p.add(_))}}function h(f){return xe(f,function(d){return[a.cx,a.cy]})}s.diff(l).add(function(f){var d=s.getItemLayout(f);if(d){var p=new zi,g=new Ui,v={shape:{points:d}};p.shape.points=h(d),g.shape.points=h(d),Tn(p,v,t,f),Tn(g,v,t,f);var m=new rt,y=new rt;m.add(g),m.add(p),m.add(y),c(g.shape.points,d,y,s,f,!0),s.setItemGraphicEl(f,m)}}).update(function(f,d){var p=l.getItemGraphicEl(d),g=p.childAt(0),v=p.childAt(1),m=p.childAt(2),y={shape:{points:s.getItemLayout(f)}};y.shape.points&&(c(g.shape.points,y.shape.points,m,s,f,!1),lo(v),lo(g),zt(g,y,t),zt(v,y,t),s.setItemGraphicEl(f,p))}).remove(function(f){o.remove(l.getItemGraphicEl(f))}).execute(),s.eachItemGraphicEl(function(f,d){var p=s.getItemModel(d),g=f.childAt(0),v=f.childAt(1),m=f.childAt(2),y=s.getItemVisual(d,"style"),_=y.fill;o.add(f),g.useStyle(Ke(p.getModel("lineStyle").getLineStyle(),{fill:"none",stroke:_})),Br(g,p,"lineStyle"),Br(v,p,"areaStyle");var x=p.getModel("areaStyle"),S=x.isEmpty()&&x.parentModel.isEmpty();v.ignore=S,k(["emphasis","select","blur"],function(M){var C=p.getModel([M,"areaStyle"]),b=C.isEmpty()&&C.parentModel.isEmpty();v.ensureState(M).ignore=b&&S}),v.useStyle(Ke(x.getAreaStyle(),{fill:_,opacity:.7,decal:y.decal}));var A=p.getModel("emphasis"),w=A.getModel("itemStyle").getItemStyle();m.eachChild(function(M){if(M instanceof Ur){var C=M.style;M.useStyle(pe({image:C.image,x:C.x,y:C.y,width:C.width,height:C.height},y))}else M.useStyle(y),M.setColor(_),M.style.strokeNoScale=!0;var b=M.ensureState("emphasis");b.style=Je(w);var T=s.getStore().get(s.getDimensionIndex(M.__dimIdx),d);(T==null||isNaN(T))&&(T=""),zr(M,Sr(p),{labelFetcher:s.hostModel,labelDataIndex:d,labelDimIndex:M.__dimIdx,defaultText:T,inheritColor:_,defaultOpacity:y.opacity})}),Rn(f,A.get("focus"),A.get("blurScope"),A.get("disabled"))}),this._data=s},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.type="radar",e}(gn);const ime=rme;var ame=function(r){ae(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),this.legendVisualProvider=new Fg(Fe(this.getData,this),Fe(this.getRawData,this))},e.prototype.getInitialData=function(t,n){return Ld(this,{generateCoord:"indicator_",generateCoordCount:1/0})},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.coordinateSystem,s=o.getIndicatorAxes(),l=this.getData().getName(t),u=l===""?this.name:l,c=TG(this,t);return Ar("section",{header:u,sortBlocks:!0,blocks:xe(s,function(h){var f=a.get(a.mapDimension(h.dim),t);return Ar("nameValue",{markerType:"subItem",markerColor:c,name:h.name,value:f,sortParam:f})})})},e.prototype.getTooltipPosition=function(t){if(t!=null){for(var n=this.getData(),i=this.coordinateSystem,a=n.getValues(xe(i.dimensions,function(u){return n.mapDimension(u)}),t),o=0,s=a.length;o<s;o++)if(!isNaN(a[o])){var l=i.getIndicatorAxes();return i.coordToPoint(l[o].dataToCoord(a[o]),o)}}},e.type="series.radar",e.dependencies=["radar"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"radar",legendHoverLink:!0,radarIndex:0,lineStyle:{width:2,type:"solid",join:"round"},label:{position:"top"},symbolSize:8},e}(En);const ome=ame;var cp=T8.value;function Ay(r,e){return Ke({show:e},r)}var sme=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.optionUpdated=function(){var t=this.get("boundaryGap"),n=this.get("splitNumber"),i=this.get("scale"),a=this.get("axisLine"),o=this.get("axisTick"),s=this.get("axisLabel"),l=this.get("axisName"),u=this.get(["axisName","show"]),c=this.get(["axisName","formatter"]),h=this.get("axisNameGap"),f=this.get("triggerEvent"),d=xe(this.get("indicator")||[],function(p){p.max!=null&&p.max>0&&!p.min?p.min=0:p.min!=null&&p.min<0&&!p.max&&(p.max=0);var g=l;p.color!=null&&(g=Ke({color:p.color},l));var v=ht(Je(p),{boundaryGap:t,splitNumber:n,scale:i,axisLine:a,axisTick:o,axisLabel:s,name:p.text,showName:u,nameLocation:"end",nameGap:h,nameTextStyle:g,triggerEvent:f},!1);if(ke(c)){var m=v.name;v.name=c.replace("{value}",m!=null?m:"")}else qe(c)&&(v.name=c(v.name,v));var y=new vn(v,null,this.ecModel);return ir(y,Rg.prototype),y.mainType="radar",y.componentIndex=this.componentIndex,y},this);this._indicatorModels=d},e.prototype.getIndicatorModels=function(){return this._indicatorModels},e.type="radar",e.defaultOption={z:0,center:["50%","50%"],radius:"75%",startAngle:90,axisName:{show:!0},boundaryGap:[0,0],splitNumber:5,axisNameGap:15,scale:!1,shape:"polygon",axisLine:ht({lineStyle:{color:"#bbb"}},cp.axisLine),axisLabel:Ay(cp.axisLabel,!1),axisTick:Ay(cp.axisTick,!1),splitLine:Ay(cp.splitLine,!0),splitArea:Ay(cp.splitArea,!0),indicator:[]},e}(Nt);const lme=sme;var ume=["axisLine","axisTickLabel","axisName"],cme=function(r){ae(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,i){var a=this.group;a.removeAll(),this._buildAxes(t),this._buildSplitLineAndArea(t)},e.prototype._buildAxes=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes(),a=xe(i,function(o){var s=o.model.get("showName")?o.name:"",l=new ks(o.model,{axisName:s,position:[n.cx,n.cy],rotation:o.angle,labelDirection:-1,tickDirection:-1,nameDirection:1});return l});k(a,function(o){k(ume,o.add,o),this.group.add(o.getGroup())},this)},e.prototype._buildSplitLineAndArea=function(t){var n=t.coordinateSystem,i=n.getIndicatorAxes();if(!i.length)return;var a=t.get("shape"),o=t.getModel("splitLine"),s=t.getModel("splitArea"),l=o.getModel("lineStyle"),u=s.getModel("areaStyle"),c=o.get("show"),h=s.get("show"),f=l.get("color"),d=u.get("color"),p=_e(f)?f:[f],g=_e(d)?d:[d],v=[],m=[];function y(E,I,N){var R=N%I.length;return E[R]=E[R]||[],R}if(a==="circle")for(var _=i[0].getTicksCoords(),x=n.cx,S=n.cy,A=0;A<_.length;A++){if(c){var w=y(v,p,A);v[w].push(new au({shape:{cx:x,cy:S,r:_[A].coord}}))}if(h&&A<_.length-1){var w=y(m,g,A);m[w].push(new T1({shape:{cx:x,cy:S,r0:_[A].coord,r:_[A+1].coord}}))}}else for(var M,C=xe(i,function(E,I){var N=E.getTicksCoords();return M=M==null?N.length-1:Math.min(N.length-1,M),xe(N,function(R){return n.coordToPoint(R.coord,I)})}),b=[],A=0;A<=M;A++){for(var T=[],P=0;P<i.length;P++)T.push(C[P][A]);if(T[0]&&T.push(T[0].slice()),c){var w=y(v,p,A);v[w].push(new Ui({shape:{points:T}}))}if(h&&b){var w=y(m,g,A-1);m[w].push(new zi({shape:{points:T.concat(b)}}))}b=T.slice().reverse()}var D=l.getLineStyle(),L=u.getAreaStyle();k(m,function(E,I){this.group.add(Ma(E,{style:Ke({stroke:"none",fill:g[I%g.length]},L),silent:!0}))},this),k(v,function(E,I){this.group.add(Ma(E,{style:Ke({fill:"none",stroke:p[I%p.length]},D),silent:!0}))},this)},e.type="radar",e}(kn);const hme=cme;var fme=function(r){ae(e,r);function e(t,n,i){var a=r.call(this,t,n,i)||this;return a.type="value",a.angle=0,a.name="",a}return e}(ho);const dme=fme;var pme=function(){function r(e,t,n){this.dimensions=[],this._model=e,this._indicatorAxes=xe(e.getIndicatorModels(),function(i,a){var o="indicator_"+a,s=new dme(o,new Jl);return s.name=i.get("name"),s.model=i,i.axis=s,this.dimensions.push(o),s},this),this.resize(e,n)}return r.prototype.getIndicatorAxes=function(){return this._indicatorAxes},r.prototype.dataToPoint=function(e,t){var n=this._indicatorAxes[t];return this.coordToPoint(n.dataToCoord(e),t)},r.prototype.coordToPoint=function(e,t){var n=this._indicatorAxes[t],i=n.angle,a=this.cx+e*Math.cos(i),o=this.cy-e*Math.sin(i);return[a,o]},r.prototype.pointToData=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=Math.sqrt(t*t+n*n);t/=i,n/=i;for(var a=Math.atan2(-n,t),o=1/0,s,l=-1,u=0;u<this._indicatorAxes.length;u++){var c=this._indicatorAxes[u],h=Math.abs(a-c.angle);h<o&&(s=c,l=u,o=h)}return[l,+(s&&s.coordToData(i))]},r.prototype.resize=function(e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight(),o=Math.min(i,a)/2;this.cx=Pe(n[0],i),this.cy=Pe(n[1],a),this.startAngle=e.get("startAngle")*Math.PI/180;var s=e.get("radius");(ke(s)||Ft(s))&&(s=[0,s]),this.r0=Pe(s[0],o),this.r=Pe(s[1],o),k(this._indicatorAxes,function(l,u){l.setExtent(this.r0,this.r);var c=this.startAngle+u*Math.PI*2/this._indicatorAxes.length;c=Math.atan2(Math.sin(c),Math.cos(c)),l.angle=c},this)},r.prototype.update=function(e,t){var n=this._indicatorAxes,i=this._model;k(n,function(s){s.scale.setExtent(1/0,-1/0)}),e.eachSeriesByType("radar",function(s,l){if(!(s.get("coordinateSystem")!=="radar"||e.getComponent("radar",s.get("radarIndex"))!==i)){var u=s.getData();k(n,function(c){c.scale.unionExtentFromData(u,u.mapDimension(c.dim))})}},this);var a=i.get("splitNumber"),o=new Jl;o.setExtent(0,a),o.setInterval(1),k(n,function(s,l){M8(s.scale,s.model,o)})},r.prototype.convertToPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.convertFromPixel=function(e,t,n){return console.warn("Not implemented."),null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.create=function(e,t){var n=[];return e.eachComponent("radar",function(i){var a=new r(i,e,t);n.push(a),i.coordinateSystem=a}),e.eachSeriesByType("radar",function(i){i.get("coordinateSystem")==="radar"&&(i.coordinateSystem=n[i.get("radarIndex")||0])}),n},r.dimensions=[],r}();const vme=pme;function gme(r){r.registerCoordinateSystem("radar",vme),r.registerComponentModel(lme),r.registerComponentView(hme),r.registerVisual({seriesType:"radar",reset:function(e){var t=e.getData();t.each(function(n){t.setItemVisual(n,"legendIcon","roundRect")}),t.setVisual("legendIcon","roundRect")}})}function mme(r){gt(gme),r.registerChartView(ime),r.registerSeriesModel(ome),r.registerLayout(tme),r.registerProcessor(Og("radar")),r.registerPreprocessor(nme)}var _3="\0_ec_interaction_mutex";function yme(r,e,t){var n=J2(r);n[e]=t}function _me(r,e,t){var n=J2(r),i=n[e];i===t&&(n[e]=null)}function x3(r,e){return!!J2(r)[e]}function J2(r){return r[_3]||(r[_3]={})}es({type:"takeGlobalCursor",event:"globalCursorTaken",update:"update"},qn);var xme=function(r){ae(e,r);function e(t){var n=r.call(this)||this;n._zr=t;var i=Fe(n._mousedownHandler,n),a=Fe(n._mousemoveHandler,n),o=Fe(n._mouseupHandler,n),s=Fe(n._mousewheelHandler,n),l=Fe(n._pinchHandler,n);return n.enable=function(u,c){this.disable(),this._opt=Ke(Je(c)||{},{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),u==null&&(u=!0),(u===!0||u==="move"||u==="pan")&&(t.on("mousedown",i),t.on("mousemove",a),t.on("mouseup",o)),(u===!0||u==="scale"||u==="zoom")&&(t.on("mousewheel",s),t.on("pinch",l))},n.disable=function(){t.off("mousedown",i),t.off("mousemove",a),t.off("mouseup",o),t.off("mousewheel",s),t.off("pinch",l)},n}return e.prototype.isDragging=function(){return this._dragging},e.prototype.isPinching=function(){return this._pinching},e.prototype.setPointerChecker=function(t){this.pointerChecker=t},e.prototype.dispose=function(){this.disable()},e.prototype._mousedownHandler=function(t){if(!XD(t)){for(var n=t.target;n;){if(n.draggable)return;n=n.__hostTarget||n.parent}var i=t.offsetX,a=t.offsetY;this.pointerChecker&&this.pointerChecker(t,i,a)&&(this._x=i,this._y=a,this._dragging=!0)}},e.prototype._mousemoveHandler=function(t){if(!(!this._dragging||!d0("moveOnMouseMove",t,this._opt)||t.gestureEvent==="pinch"||x3(this._zr,"globalPan"))){var n=t.offsetX,i=t.offsetY,a=this._x,o=this._y,s=n-a,l=i-o;this._x=n,this._y=i,this._opt.preventDefaultMouseMove&&Ps(t.event),I8(this,"pan","moveOnMouseMove",t,{dx:s,dy:l,oldX:a,oldY:o,newX:n,newY:i,isAvailableBehavior:null})}},e.prototype._mouseupHandler=function(t){XD(t)||(this._dragging=!1)},e.prototype._mousewheelHandler=function(t){var n=d0("zoomOnMouseWheel",t,this._opt),i=d0("moveOnMouseWheel",t,this._opt),a=t.wheelDelta,o=Math.abs(a),s=t.offsetX,l=t.offsetY;if(!(a===0||!n&&!i)){if(n){var u=o>3?1.4:o>1?1.2:1.1,c=a>0?u:1/u;$A(this,"zoom","zoomOnMouseWheel",t,{scale:c,originX:s,originY:l,isAvailableBehavior:null})}if(i){var h=Math.abs(a),f=(a>0?1:-1)*(h>3?.4:h>1?.15:.05);$A(this,"scrollMove","moveOnMouseWheel",t,{scrollDelta:f,originX:s,originY:l,isAvailableBehavior:null})}}},e.prototype._pinchHandler=function(t){if(!x3(this._zr,"globalPan")){var n=t.pinchScale>1?1.1:1/1.1;$A(this,"zoom",null,t,{scale:n,originX:t.pinchX,originY:t.pinchY,isAvailableBehavior:null})}},e}(Ba);function $A(r,e,t,n,i){r.pointerChecker&&r.pointerChecker(n,i.originX,i.originY)&&(Ps(n.event),I8(r,e,t,n,i))}function I8(r,e,t,n,i){i.isAvailableBehavior=Fe(d0,null,t,n),r.trigger(e,i)}function d0(r,e,t){var n=t[r];return!r||n&&(!ke(n)||e.event[n+"Key"])}const Bg=xme;function eE(r,e,t){var n=r.target;n.x+=e,n.y+=t,n.dirty()}function tE(r,e,t,n){var i=r.target,a=r.zoomLimit,o=r.zoom=r.zoom||1;if(o*=e,a){var s=a.min||0,l=a.max||1/0;o=Math.max(Math.min(l,o),s)}var u=o/r.zoom;r.zoom=o,i.x-=(t-i.x)*(u-1),i.y-=(n-i.y)*(u-1),i.scaleX*=u,i.scaleY*=u,i.dirty()}var Sme={axisPointer:1,tooltip:1,brush:1};function Y1(r,e,t){var n=e.getComponentByElement(r.topTarget),i=n&&n.coordinateSystem;return n&&n!==t&&!Sme.hasOwnProperty(n.mainType)&&i&&i.model!==t}function N8(r){if(ke(r)){var e=new DOMParser;r=e.parseFromString(r,"text/xml")}var t=r;for(t.nodeType===9&&(t=t.firstChild);t.nodeName.toLowerCase()!=="svg"||t.nodeType!==1;)t=t.nextSibling;return t}var XA,T_={fill:"fill",stroke:"stroke","stroke-width":"lineWidth",opacity:"opacity","fill-opacity":"fillOpacity","stroke-opacity":"strokeOpacity","stroke-dasharray":"lineDash","stroke-dashoffset":"lineDashOffset","stroke-linecap":"lineCap","stroke-linejoin":"lineJoin","stroke-miterlimit":"miterLimit","font-family":"fontFamily","font-size":"fontSize","font-style":"fontStyle","font-weight":"fontWeight","text-anchor":"textAlign",visibility:"visibility",display:"display"},S3=wt(T_),M_={"alignment-baseline":"textBaseline","stop-color":"stopColor"},A3=wt(M_),Ame=function(){function r(){this._defs={},this._root=null}return r.prototype.parse=function(e,t){t=t||{};var n=N8(e);this._defsUsePending=[];var i=new rt;this._root=i;var a=[],o=n.getAttribute("viewBox")||"",s=parseFloat(n.getAttribute("width")||t.width),l=parseFloat(n.getAttribute("height")||t.height);isNaN(s)&&(s=null),isNaN(l)&&(l=null),Wi(n,i,null,!0,!1);for(var u=n.firstChild;u;)this._parseNode(u,i,a,null,!1,!1),u=u.nextSibling;Tme(this._defs,this._defsUsePending),this._defsUsePending=[];var c,h;if(o){var f=q1(o);f.length>=4&&(c={x:parseFloat(f[0]||0),y:parseFloat(f[1]||0),width:parseFloat(f[2]),height:parseFloat(f[3])})}if(c&&s!=null&&l!=null&&(h=O8(c,{x:0,y:0,width:s,height:l}),!t.ignoreViewBox)){var d=i;i=new rt,i.add(d),d.scaleX=d.scaleY=h.scale,d.x=h.x,d.y=h.y}return!t.ignoreRootClip&&s!=null&&l!=null&&i.setClipPath(new Dt({shape:{x:0,y:0,width:s,height:l}})),{root:i,width:s,height:l,viewBoxRect:c,viewBoxTransform:h,named:a}},r.prototype._parseNode=function(e,t,n,i,a,o){var s=e.nodeName.toLowerCase(),l,u=i;if(s==="defs"&&(a=!0),s==="text"&&(o=!0),s==="defs"||s==="switch")l=t;else{if(!a){var c=XA[s];if(c&&ze(XA,s)){l=c.call(this,e,t);var h=e.getAttribute("name");if(h){var f={name:h,namedFrom:null,svgNodeTagLower:s,el:l};n.push(f),s==="g"&&(u=f)}else i&&n.push({name:i.name,namedFrom:i,svgNodeTagLower:s,el:l});t.add(l)}}var d=w3[s];if(d&&ze(w3,s)){var p=d.call(this,e),g=e.getAttribute("id");g&&(this._defs[g]=p)}}if(l&&l.isGroup)for(var v=e.firstChild;v;)v.nodeType===1?this._parseNode(v,l,n,u,a,o):v.nodeType===3&&o&&this._parseText(v,l),v=v.nextSibling},r.prototype._parseText=function(e,t){var n=new Hv({style:{text:e.textContent},silent:!0,x:this._textX||0,y:this._textY||0});ca(t,n),Wi(e,n,this._defsUsePending,!1,!1),wme(n,t);var i=n.style,a=i.fontSize;a&&a<9&&(i.fontSize=9,n.scaleX*=a/9,n.scaleY*=a/9);var o=(i.fontSize||i.fontFamily)&&[i.fontStyle,i.fontWeight,(i.fontSize||12)+"px",i.fontFamily||"sans-serif"].join(" ");i.font=o;var s=n.getBoundingRect();return this._textX+=s.width,t.add(n),n},r.internalField=function(){XA={g:function(e,t){var n=new rt;return ca(t,n),Wi(e,n,this._defsUsePending,!1,!1),n},rect:function(e,t){var n=new Dt;return ca(t,n),Wi(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 au;return ca(t,n),Wi(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 Cr;return ca(t,n),Wi(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 c2;return ca(t,n),Wi(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"),i;n&&(i=M3(n));var a=new zi({shape:{points:i||[]},silent:!0});return ca(t,a),Wi(e,a,this._defsUsePending,!1,!1),a},polyline:function(e,t){var n=e.getAttribute("points"),i;n&&(i=M3(n));var a=new Ui({shape:{points:i||[]},silent:!0});return ca(t,a),Wi(e,a,this._defsUsePending,!1,!1),a},image:function(e,t){var n=new Ur;return ca(t,n),Wi(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",i=e.getAttribute("y")||"0",a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0";this._textX=parseFloat(n)+parseFloat(a),this._textY=parseFloat(i)+parseFloat(o);var s=new rt;return ca(t,s),Wi(e,s,this._defsUsePending,!1,!0),s},tspan:function(e,t){var n=e.getAttribute("x"),i=e.getAttribute("y");n!=null&&(this._textX=parseFloat(n)),i!=null&&(this._textY=parseFloat(i));var a=e.getAttribute("dx")||"0",o=e.getAttribute("dy")||"0",s=new rt;return ca(t,s),Wi(e,s,this._defsUsePending,!1,!0),this._textX+=parseFloat(a),this._textY+=parseFloat(o),s},path:function(e,t){var n=e.getAttribute("d")||"",i=lV(n);return ca(t,i),Wi(e,i,this._defsUsePending,!1,!1),i.silent=!0,i}}}(),r}(),w3={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),i=parseInt(r.getAttribute("y2")||"0",10),a=new Ul(e,t,n,i);return b3(r,a),T3(r,a),a},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),i=new SV(e,t,n);return b3(r,i),T3(r,i),i}};function b3(r,e){var t=r.getAttribute("gradientUnits");t==="userSpaceOnUse"&&(e.global=!0)}function T3(r,e){for(var t=r.firstChild;t;){if(t.nodeType===1&&t.nodeName.toLocaleLowerCase()==="stop"){var n=t.getAttribute("offset"),i=void 0;n&&n.indexOf("%")>0?i=parseInt(n,10)/100:n?i=parseFloat(n):i=0;var a={};k8(t,a,a);var o=a.stopColor||t.getAttribute("stop-color")||"#000000";e.colorStops.push({offset:i,color:o})}t=t.nextSibling}}function ca(r,e){r&&r.__inheritedStyle&&(e.__inheritedStyle||(e.__inheritedStyle={}),Ke(e.__inheritedStyle,r.__inheritedStyle))}function M3(r){for(var e=q1(r),t=[],n=0;n<e.length;n+=2){var i=parseFloat(e[n]),a=parseFloat(e[n+1]);t.push([i,a])}return t}function Wi(r,e,t,n,i){var a=e,o=a.__inheritedStyle=a.__inheritedStyle||{},s={};r.nodeType===1&&(Eme(r,e),k8(r,o,s),n||Lme(r,o,s)),a.style=a.style||{},o.fill!=null&&(a.style.fill=C3(a,"fill",o.fill,t)),o.stroke!=null&&(a.style.stroke=C3(a,"stroke",o.stroke,t)),k(["lineWidth","opacity","fillOpacity","strokeOpacity","miterLimit","fontSize"],function(l){o[l]!=null&&(a.style[l]=parseFloat(o[l]))}),k(["lineDashOffset","lineCap","lineJoin","fontWeight","fontFamily","fontStyle","textAlign"],function(l){o[l]!=null&&(a.style[l]=o[l])}),i&&(a.__selfStyle=s),o.lineDash&&(a.style.lineDash=xe(q1(o.lineDash),function(l){return parseFloat(l)})),(o.visibility==="hidden"||o.visibility==="collapse")&&(a.invisible=!0),o.display==="none"&&(a.ignore=!0)}function wme(r,e){var t=e.__selfStyle;if(t){var n=t.textBaseline,i=n;!n||n==="auto"||n==="baseline"?i="alphabetic":n==="before-edge"||n==="text-before-edge"?i="top":n==="after-edge"||n==="text-after-edge"?i="bottom":(n==="central"||n==="mathematical")&&(i="middle"),r.style.textBaseline=i}var a=e.__inheritedStyle;if(a){var o=a.textAlign,s=o;o&&(o==="middle"&&(s="center"),r.style.textAlign=s)}}var bme=/^url\(\s*#(.*?)\)/;function C3(r,e,t,n){var i=t&&t.match(bme);if(i){var a=eo(i[1]);n.push([r,e,a]);return}return t==="none"&&(t=null),t}function Tme(r,e){for(var t=0;t<e.length;t++){var n=e[t];n[0].style[n[1]]=r[n[2]]}}var Mme=/-?([0-9]*\.)?[0-9]+([eE]-?[0-9]+)?/g;function q1(r){return r.match(Mme)||[]}var Cme=/(translate|scale|rotate|skewX|skewY|matrix)\(([\-\s0-9\.eE,]*)\)/g,YA=Math.PI/180;function Eme(r,e){var t=r.getAttribute("transform");if(t){t=t.replace(/,/g," ");var n=[],i=null;t.replace(Cme,function(h,f,d){return n.push(f,d),""});for(var a=n.length-1;a>0;a-=2){var o=n[a],s=n[a-1],l=q1(o);switch(i=i||ta(),s){case"translate":Xo(i,i,[parseFloat(l[0]),parseFloat(l[1]||"0")]);break;case"scale":YC(i,i,[parseFloat(l[0]),parseFloat(l[1]||l[0])]);break;case"rotate":jc(i,i,-parseFloat(l[0])*YA,[parseFloat(l[1]||"0"),parseFloat(l[2]||"0")]);break;case"skewX":var u=Math.tan(parseFloat(l[0])*YA);As(i,[1,0,u,1,0,0],i);break;case"skewY":var c=Math.tan(parseFloat(l[0])*YA);As(i,[1,c,0,1,0,0],i);break;case"matrix":i[0]=parseFloat(l[0]),i[1]=parseFloat(l[1]),i[2]=parseFloat(l[2]),i[3]=parseFloat(l[3]),i[4]=parseFloat(l[4]),i[5]=parseFloat(l[5]);break}}e.setLocalTransform(i)}}var E3=/([^\s:;]+)\s*:\s*([^:;]+)/g;function k8(r,e,t){var n=r.getAttribute("style");if(n){E3.lastIndex=0;for(var i;(i=E3.exec(n))!=null;){var a=i[1],o=ze(T_,a)?T_[a]:null;o&&(e[o]=i[2]);var s=ze(M_,a)?M_[a]:null;s&&(t[s]=i[2])}}}function Lme(r,e,t){for(var n=0;n<S3.length;n++){var i=S3[n],a=r.getAttribute(i);a!=null&&(e[T_[i]]=a)}for(var n=0;n<A3.length;n++){var i=A3[n],a=r.getAttribute(i);a!=null&&(t[M_[i]]=a)}}function O8(r,e){var t=e.width/r.width,n=e.height/r.height,i=Math.min(t,n);return{scale:i,x:-(r.x+r.width/2)*i+(e.x+e.width/2),y:-(r.y+r.height/2)*i+(e.y+e.height/2)}}function Pme(r,e){var t=new Ame;return t.parse(r,e)}var Rme=He(["rect","circle","line","ellipse","polygon","polyline","path","text","tspan","g"]),Dme=function(){function r(e,t){this.type="geoSVG",this._usedGraphicMap=He(),this._freedGraphics=[],this._mapName=e,this._parsedXML=N8(t)}return r.prototype.load=function(){var e=this._firstGraphic;if(!e){e=this._firstGraphic=this._buildGraphic(this._parsedXML),this._freedGraphics.push(e),this._boundingRect=this._firstGraphic.boundingRect.clone();var t=Nme(e.named),n=t.regions,i=t.regionsMap;this._regions=n,this._regionsMap=i}return{boundingRect:this._boundingRect,regions:this._regions,regionsMap:this._regionsMap}},r.prototype._buildGraphic=function(e){var t,n;try{t=e&&Pme(e,{ignoreViewBox:!0,ignoreRootClip:!0})||{},n=t.root,gi(n!=null)}catch(v){throw new Error(`Invalid svg format |
|
`+v.message)}var i=new rt;i.add(n),i.isGeoSVGGraphicRoot=!0;var a=t.width,o=t.height,s=t.viewBoxRect,l=this._boundingRect;if(!l){var u=void 0,c=void 0,h=void 0,f=void 0;if(a!=null?(u=0,h=a):s&&(u=s.x,h=s.width),o!=null?(c=0,f=o):s&&(c=s.y,f=s.height),u==null||c==null){var d=n.getBoundingRect();u==null&&(u=d.x,h=d.width),c==null&&(c=d.y,f=d.height)}l=this._boundingRect=new dt(u,c,h,f)}if(s){var p=O8(s,l);n.scaleX=n.scaleY=p.scale,n.x=p.x,n.y=p.y}i.setClipPath(new Dt({shape:l.plain()}));var g=[];return k(t.named,function(v){Rme.get(v.svgNodeTagLower)!=null&&(g.push(v),Ime(v.el))}),{root:i,boundingRect:l,named:g}},r.prototype.useGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);return n||(n=this._freedGraphics.pop()||this._buildGraphic(this._parsedXML),t.set(e,n),n)},r.prototype.freeGraphic=function(e){var t=this._usedGraphicMap,n=t.get(e);n&&(t.removeKey(e),this._freedGraphics.push(n))},r}();function Ime(r){r.silent=!1,r.isGroup&&r.traverse(function(e){e.silent=!1})}function Nme(r){var e=[],t=He();return k(r,function(n){if(n.namedFrom==null){var i=new Zde(n.name,n.el);e.push(i),t.set(n.name,i)}}),{regions:e,regionsMap:t}}var eM=[126,25],L3="南海诸岛",$u=[[[0,3.5],[7,11.2],[15,11.9],[30,7],[42,.7],[52,.7],[56,7.7],[59,.7],[64,.7],[64,0],[5,0],[0,3.5]],[[13,16.1],[19,14.7],[16,21.7],[11,23.1],[13,16.1]],[[12,32.2],[14,38.5],[15,38.5],[13,32.2],[12,32.2]],[[16,47.6],[12,53.2],[13,53.2],[18,47.6],[16,47.6]],[[6,64.4],[8,70],[9,70],[8,64.4],[6,64.4]],[[23,82.6],[29,79.8],[30,79.8],[25,82.6],[23,82.6]],[[37,70.7],[43,62.3],[44,62.3],[39,70.7],[37,70.7]],[[48,51.1],[51,45.5],[53,45.5],[50,51.1],[48,51.1]],[[51,35],[51,28.7],[53,28.7],[53,35],[51,35]],[[52,22.4],[55,17.5],[56,17.5],[53,22.4],[52,22.4]],[[58,12.6],[62,7],[63,7],[60,12.6],[58,12.6]],[[0,3.5],[0,93.1],[64,93.1],[64,0],[63,0],[63,92.4],[1,92.4],[1,3.5],[0,3.5]]];for(var Vu=0;Vu<$u.length;Vu++)for(var Hh=0;Hh<$u[Vu].length;Hh++)$u[Vu][Hh][0]/=10.5,$u[Vu][Hh][1]/=-10.5/.75,$u[Vu][Hh][0]+=eM[0],$u[Vu][Hh][1]+=eM[1];function kme(r,e){if(r==="china"){for(var t=0;t<e.length;t++)if(e[t].name===L3)return;e.push(new RH(L3,xe($u,function(n){return{type:"polygon",exterior:n}}),eM))}}var Ome={南海诸岛:[32,80],广东:[0,-10],香港:[10,5],澳门:[-10,10],天津:[5,5]};function Fme(r,e){if(r==="china"){var t=Ome[e.name];if(t){var n=e.getCenter();n[0]+=t[0]/10.5,n[1]+=-t[1]/(10.5/.75),e.setCenter(n)}}}var Bme=[[[123.45165252685547,25.73527164402261],[123.49731445312499,25.73527164402261],[123.49731445312499,25.750734064600884],[123.45165252685547,25.750734064600884],[123.45165252685547,25.73527164402261]]];function zme(r,e){r==="china"&&e.name==="台湾"&&e.geometries.push({type:"polygon",exterior:Bme[0]})}var Ume="name",Vme=function(){function r(e,t,n){this.type="geoJSON",this._parsedMap=He(),this._mapName=e,this._specialAreas=n,this._geoJSON=Hme(t)}return r.prototype.load=function(e,t){t=t||Ume;var n=this._parsedMap.get(t);if(!n){var i=this._parseToRegions(t);n=this._parsedMap.set(t,{regions:i,boundingRect:Gme(i)})}var a=He(),o=[];return k(n.regions,function(s){var l=s.name;e&&ze(e,l)&&(s=s.cloneShallow(l=e[l])),o.push(s),a.set(l,s)}),{regions:o,boundingRect:n.boundingRect||new dt(0,0,0,0),regionsMap:a}},r.prototype._parseToRegions=function(e){var t=this._mapName,n=this._geoJSON,i;try{i=n?Jde(n,e):[]}catch(a){throw new Error(`Invalid geoJson format |
|
`+a.message)}return kme(t,i),k(i,function(a){var o=a.name;Fme(t,a),zme(t,a);var s=this._specialAreas&&this._specialAreas[o];s&&a.transformTo(s.left,s.top,s.width,s.height)},this),i},r.prototype.getMapForUser=function(){return{geoJson:this._geoJSON,geoJSON:this._geoJSON,specialAreas:this._specialAreas}},r}();function Gme(r){for(var e,t=0;t<r.length;t++){var n=r[t].getBoundingRect();e=e||n.clone(),e.union(n)}return e}function Hme(r){return ke(r)?typeof JSON!="undefined"&&JSON.parse?JSON.parse(r):new Function("return ("+r+");")():r}var hp=He();const Os={registerMap:function(r,e,t){if(e.svg){var n=new Dme(r,e.svg);hp.set(r,n)}else{var i=e.geoJson||e.geoJSON;i&&!e.features?t=e.specialAreas:i=e;var n=new Vme(r,i,t);hp.set(r,n)}},getGeoResource:function(r){return hp.get(r)},getMapForUser:function(r){var e=hp.get(r);return e&&e.type==="geoJSON"&&e.getMapForUser()},load:function(r,e,t){var n=hp.get(r);if(n)return n.load(e,t)}};var nE=["rect","circle","line","ellipse","polygon","polyline","path"],Wme=He(nE),$me=He(nE.concat(["g"])),Xme=He(nE.concat(["g"])),F8=Pt();function wy(r){var e=r.getItemStyle(),t=r.get("areaColor");return t!=null&&(e.fill=t),e}function P3(r){var e=r.style;e&&(e.stroke=e.stroke||e.fill,e.fill=null)}var Yme=function(){function r(e){var t=new rt;this.uid=xd("ec_map_draw"),this._controller=new Bg(e.getZr()),this._controllerHost={target:t},this.group=t,t.add(this._regionsGroup=new rt),t.add(this._svgGroup=new rt)}return r.prototype.draw=function(e,t,n,i,a){var o=e.mainType==="geo",s=e.getData&&e.getData();o&&t.eachComponent({mainType:"series",subType:"map"},function(m){!s&&m.getHostGeoModel()===e&&(s=m.getData())});var l=e.coordinateSystem,u=this._regionsGroup,c=this.group,h=l.getTransformInfo(),f=h.raw,d=h.roam,p=!u.childAt(0)||a;p?(c.x=d.x,c.y=d.y,c.scaleX=d.scaleX,c.scaleY=d.scaleY,c.dirty()):zt(c,d,e);var g=s&&s.getVisual("visualMeta")&&s.getVisual("visualMeta").length>0,v={api:n,geo:l,mapOrGeoModel:e,data:s,isVisualEncodedByVisualMap:g,isGeo:o,transformInfoRaw:f};l.resourceType==="geoJSON"?this._buildGeoJSON(v):l.resourceType==="geoSVG"&&this._buildSVG(v),this._updateController(e,t,n),this._updateMapSelectHandler(e,u,n,i)},r.prototype._buildGeoJSON=function(e){var t=this._regionsGroupByName=He(),n=He(),i=this._regionsGroup,a=e.transformInfoRaw,o=e.mapOrGeoModel,s=e.data,l=e.geo.projection,u=l&&l.stream;function c(d,p){return p&&(d=p(d)),d&&[d[0]*a.scaleX+a.x,d[1]*a.scaleY+a.y]}function h(d){for(var p=[],g=!u&&l&&l.project,v=0;v<d.length;++v){var m=c(d[v],g);m&&p.push(m)}return p}function f(d){return{shape:{points:h(d)}}}i.removeAll(),k(e.geo.regions,function(d){var p=d.name,g=t.get(p),v=n.get(p)||{},m=v.dataIdx,y=v.regionModel;if(!g){g=t.set(p,new rt),i.add(g),m=s?s.indexOfName(p):null,y=e.isGeo?o.getRegionModel(p):s?s.getItemModel(m):null;var _=y.get("silent",!0);_!=null&&(g.silent=_),n.set(p,{dataIdx:m,regionModel:y})}var x=[],S=[];k(d.geometries,function(M){if(M.type==="polygon"){var C=[M.exterior].concat(M.interiors||[]);u&&(C=O3(C,u)),k(C,function(T){x.push(new zi(f(T)))})}else{var b=M.points;u&&(b=O3(b,u,!0)),k(b,function(T){S.push(new Ui(f(T)))})}});var A=c(d.getCenter(),l&&l.project);function w(M,C){if(M.length){var b=new f2({culling:!0,segmentIgnoreThreshold:1,shape:{paths:M}});g.add(b),R3(e,b,m,y),D3(e,b,p,y,o,m,A),C&&(P3(b),k(b.states,P3))}}w(x),w(S,!0)}),t.each(function(d,p){var g=n.get(p),v=g.dataIdx,m=g.regionModel;I3(e,d,p,m,o,v),N3(e,d,p,m,o),k3(e,d,p,m,o)},this)},r.prototype._buildSVG=function(e){var t=e.geo.map,n=e.transformInfoRaw;this._svgGroup.x=n.x,this._svgGroup.y=n.y,this._svgGroup.scaleX=n.scaleX,this._svgGroup.scaleY=n.scaleY,this._svgResourceChanged(t)&&(this._freeSVG(),this._useSVG(t));var i=this._svgDispatcherMap=He(),a=!1;k(this._svgGraphicRecord.named,function(o){var s=o.name,l=e.mapOrGeoModel,u=e.data,c=o.svgNodeTagLower,h=o.el,f=u?u.indexOfName(s):null,d=l.getRegionModel(s);Wme.get(c)!=null&&h instanceof ka&&R3(e,h,f,d),h instanceof ka&&(h.culling=!0);var p=d.get("silent",!0);if(p!=null&&(h.silent=p),h.z2EmphasisLift=0,!o.namedFrom&&(Xme.get(c)!=null&&D3(e,h,s,d,l,f,null),I3(e,h,s,d,l,f),N3(e,h,s,d,l),$me.get(c)!=null)){var g=k3(e,h,s,d,l);g==="self"&&(a=!0);var v=i.get(s)||i.set(s,[]);v.push(h)}},this),this._enableBlurEntireSVG(a,e)},r.prototype._enableBlurEntireSVG=function(e,t){if(e&&t.isGeo){var n=t.mapOrGeoModel.getModel(["blur","itemStyle"]).getItemStyle(),i=n.opacity;this._svgGraphicRecord.root.traverse(function(a){if(!a.isGroup){Gc(a);var o=a.ensureState("blur").style||{};o.opacity==null&&i!=null&&(o.opacity=i),a.ensureState("emphasis")}})}},r.prototype.remove=function(){this._regionsGroup.removeAll(),this._regionsGroupByName=null,this._svgGroup.removeAll(),this._freeSVG(),this._controller.dispose(),this._controllerHost=null},r.prototype.findHighDownDispatchers=function(e,t){if(e==null)return[];var n=t.coordinateSystem;if(n.resourceType==="geoJSON"){var i=this._regionsGroupByName;if(i){var a=i.get(e);return a?[a]:[]}}else if(n.resourceType==="geoSVG")return this._svgDispatcherMap&&this._svgDispatcherMap.get(e)||[]},r.prototype._svgResourceChanged=function(e){return this._svgMapName!==e},r.prototype._useSVG=function(e){var t=Os.getGeoResource(e);if(t&&t.type==="geoSVG"){var n=t.useGraphic(this.uid);this._svgGroup.add(n.root),this._svgGraphicRecord=n,this._svgMapName=e}},r.prototype._freeSVG=function(){var e=this._svgMapName;if(e!=null){var t=Os.getGeoResource(e);t&&t.type==="geoSVG"&&t.freeGraphic(this.uid),this._svgGraphicRecord=null,this._svgDispatcherMap=null,this._svgGroup.removeAll(),this._svgMapName=null}},r.prototype._updateController=function(e,t,n){var i=e.coordinateSystem,a=this._controller,o=this._controllerHost;o.zoomLimit=e.get("scaleLimit"),o.zoom=i.getZoom(),a.enable(e.get("roam")||!1);var s=e.mainType;function l(){var u={type:"geoRoam",componentType:s};return u[s+"Id"]=e.id,u}a.off("pan").on("pan",function(u){this._mouseDownFlag=!1,eE(o,u.dx,u.dy),n.dispatchAction(pe(l(),{dx:u.dx,dy:u.dy,animation:{duration:0}}))},this),a.off("zoom").on("zoom",function(u){this._mouseDownFlag=!1,tE(o,u.scale,u.originX,u.originY),n.dispatchAction(pe(l(),{totalZoom:o.zoom,zoom:u.scale,originX:u.originX,originY:u.originY,animation:{duration:0}}))},this),a.setPointerChecker(function(u,c,h){return i.containPoint([c,h])&&!Y1(u,n,e)})},r.prototype.resetForLabelLayout=function(){this.group.traverse(function(e){var t=e.getTextContent();t&&(t.ignore=F8(t).ignore)})},r.prototype._updateMapSelectHandler=function(e,t,n,i){var a=this;t.off("mousedown"),t.off("click"),e.get("selectedMode")&&(t.on("mousedown",function(){a._mouseDownFlag=!0}),t.on("click",function(o){a._mouseDownFlag&&(a._mouseDownFlag=!1)}))},r}();function R3(r,e,t,n){var i=n.getModel("itemStyle"),a=n.getModel(["emphasis","itemStyle"]),o=n.getModel(["blur","itemStyle"]),s=n.getModel(["select","itemStyle"]),l=wy(i),u=wy(a),c=wy(s),h=wy(o),f=r.data;if(f){var d=f.getItemVisual(t,"style"),p=f.getItemVisual(t,"decal");r.isVisualEncodedByVisualMap&&d.fill&&(l.fill=d.fill),p&&(l.decal=ed(p,r.api))}e.setStyle(l),e.style.strokeNoScale=!0,e.ensureState("emphasis").style=u,e.ensureState("select").style=c,e.ensureState("blur").style=h,Gc(e)}function D3(r,e,t,n,i,a,o){var s=r.data,l=r.isGeo,u=s&&isNaN(s.get(s.mapDimension("value"),a)),c=s&&s.getItemLayout(a);if(l||u||c&&c.showLabel){var h=l?t:a,f=void 0;(!s||a>=0)&&(f=i);var d=o?{normal:{align:"center",verticalAlign:"middle"}}:null;zr(e,Sr(n),{labelFetcher:f,labelDataIndex:h,defaultText:t},d);var p=e.getTextContent();if(p&&(F8(p).ignore=p.ignore,e.textConfig&&o)){var g=e.getBoundingRect().clone();e.textConfig.layoutRect=g,e.textConfig.position=[(o[0]-g.x)/g.width*100+"%",(o[1]-g.y)/g.height*100+"%"]}e.disableLabelAnimation=!0}else e.removeTextContent(),e.removeTextConfig(),e.disableLabelAnimation=null}function I3(r,e,t,n,i,a){r.data?r.data.setItemGraphicEl(a,e):at(e).eventData={componentType:"geo",componentIndex:i.componentIndex,geoIndex:i.componentIndex,name:t,region:n&&n.option||{}}}function N3(r,e,t,n,i){r.data||Kc({el:e,componentModel:i,itemName:t,itemTooltipOption:n.get("tooltip")})}function k3(r,e,t,n,i){e.highDownSilentOnTouch=!!i.get("selectedMode");var a=n.getModel("emphasis"),o=a.get("focus");return Rn(e,o,a.get("blurScope"),a.get("disabled")),r.isGeo&&Yle(e,i,t),o}function O3(r,e,t){var n=[],i;function a(){i=[]}function o(){i.length&&(n.push(i),i=[])}var s=e({polygonStart:a,polygonEnd:o,lineStart:a,lineEnd:o,point:function(l,u){isFinite(l)&&isFinite(u)&&i.push([l,u])},sphere:function(){}});return!t&&s.polygonStart(),k(r,function(l){s.lineStart();for(var u=0;u<l.length;u++)s.point(l[u][0],l[u][1]);s.lineEnd()}),!t&&s.polygonEnd(),n}const B8=Yme;var qme=function(r){ae(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,i,a){if(!(a&&a.type==="mapToggleSelect"&&a.from===this.uid)){var o=this.group;if(o.removeAll(),!t.getHostGeoModel()){if(this._mapDraw&&a&&a.type==="geoRoam"&&this._mapDraw.resetForLabelLayout(),a&&a.type==="geoRoam"&&a.componentType==="series"&&a.seriesId===t.id){var s=this._mapDraw;s&&o.add(s.group)}else if(t.needsDrawMap){var s=this._mapDraw||new B8(i);o.add(s.group),s.draw(t,n,i,this,a),this._mapDraw=s}else this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;t.get("showLegendSymbol")&&n.getComponent("legend")&&this._renderSymbols(t,n,i)}}},e.prototype.remove=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null,this.group.removeAll()},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null},e.prototype._renderSymbols=function(t,n,i){var a=t.originalData,o=this.group;a.each(a.mapDimension("value"),function(s,l){if(!isNaN(s)){var u=a.getItemLayout(l);if(!(!u||!u.point)){var c=u.point,h=u.offset,f=new au({style:{fill:t.getData().getVisual("style").fill},shape:{cx:c[0]+h*9,cy:c[1],r:3},silent:!0,z2:8+(h?0:md+1)});if(!h){var d=t.mainSeries.getData(),p=a.getName(l),g=d.indexOfName(p),v=a.getItemModel(l),m=v.getModel("label"),y=d.getItemGraphicEl(g);zr(f,Sr(v),{labelFetcher:{getFormattedLabel:function(_,x){return t.getFormattedLabel(g,x)}},defaultText:p}),f.disableLabelAnimation=!0,m.get("position")||f.setTextConfig({position:"bottom"}),y.onHoverStateChange=function(_){i_(f,_)}}o.add(f)}}})},e.type="map",e}(gn);const jme=qme;var Kme=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.needsDrawMap=!1,t.seriesGroup=[],t.getTooltipPosition=function(n){if(n!=null){var i=this.getData().getName(n),a=this.coordinateSystem,o=a.getRegion(i);return o&&a.dataToPoint(o.getCenter())}},t}return e.prototype.getInitialData=function(t){for(var n=Ld(this,{coordDimensions:["value"],encodeDefaulter:ut(A2,this)}),i=He(),a=[],o=0,s=n.count();o<s;o++){var l=n.getName(o);i.set(l,o)}var u=Os.load(this.getMapType(),this.option.nameMap,this.option.nameProperty);return k(u.regions,function(c){var h=c.name,f=i.get(h),d=c.properties&&c.properties.echartsStyle,p;f==null?(p={name:h},a.push(p)):p=n.getRawDataItem(f),d&&ht(p,d)}),n.appendData(a),n},e.prototype.getHostGeoModel=function(){var t=this.option.geoIndex;return t!=null?this.ecModel.getComponent("geo",t):null},e.prototype.getMapType=function(){return(this.getHostGeoModel()||this).option.map},e.prototype.getRawValue=function(t){var n=this.getData();return n.get(n.mapDimension("value"),t)},e.prototype.getRegionModel=function(t){var n=this.getData();return n.getItemModel(n.indexOfName(t))},e.prototype.formatTooltip=function(t,n,i){for(var a=this.getData(),o=this.getRawValue(t),s=a.getName(t),l=this.seriesGroup,u=[],c=0;c<l.length;c++){var h=l[c].originalData.indexOfName(s),f=a.mapDimension("value");isNaN(l[c].originalData.get(f,h))||u.push(l[c].name)}return Ar("section",{header:u.join(", "),noHeader:!u.length,blocks:[Ar("nameValue",{name:s,value:o})]})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.getLegendIcon=function(t){var n=t.icon||"roundRect",i=rr(n,0,0,t.itemWidth,t.itemHeight,t.itemStyle.fill);return i.setStyle(t.itemStyle),i.style.stroke="none",n.indexOf("empty")>-1&&(i.style.stroke=i.style.fill,i.style.fill="#fff",i.style.lineWidth=2),i},e.type="series.map",e.dependencies=["geo"],e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"geo",map:"",left:"center",top:"center",aspectScale:null,showLegendSymbol:!0,boundingCoords:null,center:null,zoom:1,scaleLimit:null,selectedMode:!0,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444",areaColor:"#eee"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{areaColor:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},nameProperty:"name"},e}(En);const Zme=Kme;function Qme(r,e){var t={};return k(r,function(n){n.each(n.mapDimension("value"),function(i,a){var o="ec-"+n.getName(a);t[o]=t[o]||[],isNaN(i)||t[o].push(i)})}),r[0].map(r[0].mapDimension("value"),function(n,i){for(var a="ec-"+r[0].getName(i),o=0,s=1/0,l=-1/0,u=t[a].length,c=0;c<u;c++)s=Math.min(s,t[a][c]),l=Math.max(l,t[a][c]),o+=t[a][c];var h;return e==="min"?h=s:e==="max"?h=l:e==="average"?h=o/u:h=o,u===0?NaN:h})}function Jme(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getHostGeoModel(),i=n?"o"+n.id:"i"+t.getMapType();(e[i]=e[i]||[]).push(t)}),k(e,function(t,n){for(var i=Qme(xe(t,function(o){return o.getData()}),t[0].get("mapValueCalculation")),a=0;a<t.length;a++)t[a].originalData=t[a].getData();for(var a=0;a<t.length;a++)t[a].seriesGroup=t,t[a].needsDrawMap=a===0&&!t[a].getHostGeoModel(),t[a].setData(i.cloneShallow()),t[a].mainSeries=t[0]})}function eye(r){var e={};r.eachSeriesByType("map",function(t){var n=t.getMapType();if(!(t.getHostGeoModel()||e[n])){var i={};k(t.seriesGroup,function(o){var s=o.coordinateSystem,l=o.originalData;o.get("showLegendSymbol")&&r.getComponent("legend")&&l.each(l.mapDimension("value"),function(u,c){var h=l.getName(c),f=s.getRegion(h);if(!(!f||isNaN(u))){var d=i[h]||0,p=s.dataToPoint(f.getCenter());i[h]=d+1,l.setItemLayout(c,{point:p,offset:d})}})});var a=t.getData();a.each(function(o){var s=a.getName(o),l=a.getItemLayout(o)||{};l.showLabel=!i[s],a.setItemLayout(o,l)}),e[n]=!0}})}var F3=Or,tye=function(r){ae(e,r);function e(t){var n=r.call(this)||this;return n.type="view",n.dimensions=["x","y"],n._roamTransformable=new _s,n._rawTransformable=new _s,n.name=t,n}return e.prototype.setBoundingRect=function(t,n,i,a){return this._rect=new dt(t,n,i,a),this._rect},e.prototype.getBoundingRect=function(){return this._rect},e.prototype.setViewRect=function(t,n,i,a){this._transformTo(t,n,i,a),this._viewRect=new dt(t,n,i,a)},e.prototype._transformTo=function(t,n,i,a){var o=this.getBoundingRect(),s=this._rawTransformable;s.transform=o.calculateTransform(new dt(t,n,i,a));var l=s.parent;s.parent=null,s.decomposeTransform(),s.parent=l,this._updateTransform()},e.prototype.setCenter=function(t,n){t&&(this._center=[Pe(t[0],n.getWidth()),Pe(t[1],n.getHeight())],this._updateCenterAndZoom())},e.prototype.setZoom=function(t){t=t||1;var n=this.zoomLimit;n&&(n.max!=null&&(t=Math.min(n.max,t)),n.min!=null&&(t=Math.max(n.min,t))),this._zoom=t,this._updateCenterAndZoom()},e.prototype.getDefaultCenter=function(){var t=this.getBoundingRect(),n=t.x+t.width/2,i=t.y+t.height/2;return[n,i]},e.prototype.getCenter=function(){return this._center||this.getDefaultCenter()},e.prototype.getZoom=function(){return this._zoom||1},e.prototype.getRoamTransform=function(){return this._roamTransformable.getLocalTransform()},e.prototype._updateCenterAndZoom=function(){var t=this._rawTransformable.getLocalTransform(),n=this._roamTransformable,i=this.getDefaultCenter(),a=this.getCenter(),o=this.getZoom();a=Or([],a,t),i=Or([],i,t),n.originX=a[0],n.originY=a[1],n.x=i[0]-a[0],n.y=i[1]-a[1],n.scaleX=n.scaleY=o,this._updateTransform()},e.prototype._updateTransform=function(){var t=this._roamTransformable,n=this._rawTransformable;n.parent=t,t.updateTransform(),n.updateTransform(),XC(this.transform||(this.transform=[]),n.transform||ta()),this._rawTransform=n.getLocalTransform(),this.invTransform=this.invTransform||[],vd(this.invTransform,this.transform),this.decomposeTransform()},e.prototype.getTransformInfo=function(){var t=this._rawTransformable,n=this._roamTransformable,i=new _s;return i.transform=n.transform,i.decomposeTransform(),{roam:{x:i.x,y:i.y,scaleX:i.scaleX,scaleY:i.scaleY},raw:{x:t.x,y:t.y,scaleX:t.scaleX,scaleY:t.scaleY}}},e.prototype.getViewRect=function(){return this._viewRect},e.prototype.getViewRectAfterRoam=function(){var t=this.getBoundingRect().clone();return t.applyTransform(this.transform),t},e.prototype.dataToPoint=function(t,n,i){var a=n?this._rawTransform:this.transform;return i=i||[],a?F3(i,t,a):hi(i,t)},e.prototype.pointToData=function(t){var n=this.invTransform;return n?F3([],t,n):[t[0],t[1]]},e.prototype.convertToPixel=function(t,n,i){var a=B3(n);return a===this?a.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,n,i){var a=B3(n);return a===this?a.pointToData(i):null},e.prototype.containPoint=function(t){return this.getViewRectAfterRoam().contain(t[0],t[1])},e.dimensions=["x","y"],e}(_s);function B3(r){var e=r.seriesModel;return e?e.coordinateSystem:null}const zg=tye;var nye={geoJSON:{aspectScale:.75,invertLongitute:!0},geoSVG:{aspectScale:1,invertLongitute:!1}},z8=["lng","lat"],U8=function(r){ae(e,r);function e(t,n,i){var a=r.call(this,t)||this;a.dimensions=z8,a.type="geo",a._nameCoordMap=He(),a.map=n;var o=i.projection,s=Os.load(n,i.nameMap,i.nameProperty),l=Os.getGeoResource(n);a.resourceType=l?l.type:null;var u=a.regions=s.regions,c=nye[l.type];a._regionsMap=s.regionsMap,a.regions=s.regions,a.projection=o;var h;if(o)for(var f=0;f<u.length;f++){var d=u[f].getBoundingRect(o);h=h||d.clone(),h.union(d)}else h=s.boundingRect;return a.setBoundingRect(h.x,h.y,h.width,h.height),a.aspectScale=o?1:ot(i.aspectScale,c.aspectScale),a._invertLongitute=o?!1:c.invertLongitute,a}return e.prototype._transformTo=function(t,n,i,a){var o=this.getBoundingRect(),s=this._invertLongitute;o=o.clone(),s&&(o.y=-o.y-o.height);var l=this._rawTransformable;l.transform=o.calculateTransform(new dt(t,n,i,a));var u=l.parent;l.parent=null,l.decomposeTransform(),l.parent=u,s&&(l.scaleY=-l.scaleY),this._updateTransform()},e.prototype.getRegion=function(t){return this._regionsMap.get(t)},e.prototype.getRegionByCoord=function(t){for(var n=this.regions,i=0;i<n.length;i++){var a=n[i];if(a.type==="geoJSON"&&a.contain(t))return n[i]}},e.prototype.addGeoCoord=function(t,n){this._nameCoordMap.set(t,n)},e.prototype.getGeoCoord=function(t){var n=this._regionsMap.get(t);return this._nameCoordMap.get(t)||n&&n.getCenter()},e.prototype.dataToPoint=function(t,n,i){if(ke(t)&&(t=this.getGeoCoord(t)),t){var a=this.projection;return a&&(t=a.project(t)),t&&this.projectedToPoint(t,n,i)}},e.prototype.pointToData=function(t){var n=this.projection;return n&&(t=n.unproject(t)),t&&this.pointToProjected(t)},e.prototype.pointToProjected=function(t){return r.prototype.pointToData.call(this,t)},e.prototype.projectedToPoint=function(t,n,i){return r.prototype.dataToPoint.call(this,t,n,i)},e.prototype.convertToPixel=function(t,n,i){var a=z3(n);return a===this?a.dataToPoint(i):null},e.prototype.convertFromPixel=function(t,n,i){var a=z3(n);return a===this?a.pointToData(i):null},e}(zg);ir(U8,zg);function z3(r){var e=r.geoModel,t=r.seriesModel;return e?e.coordinateSystem:t?t.coordinateSystem||(t.getReferringComponents("geo",nr).models[0]||{}).coordinateSystem:null}const U3=U8;function V3(r,e){var t=r.get("boundingCoords");if(t!=null){var n=t[0],i=t[1];if(isFinite(n[0])&&isFinite(n[1])&&isFinite(i[0])&&isFinite(i[1])){var a=this.projection;if(a){var o=n[0],s=n[1],l=i[0],u=i[1];n=[1/0,1/0],i=[-1/0,-1/0];var c=function(A,w,M,C){for(var b=M-A,T=C-w,P=0;P<=100;P++){var D=P/100,L=a.project([A+b*D,w+T*D]);Tl(n,n,L),Ml(i,i,L)}};c(o,s,l,s),c(l,s,l,u),c(l,u,o,u),c(o,u,l,s)}this.setBoundingRect(n[0],n[1],i[0]-n[0],i[1]-n[1])}}var h=this.getBoundingRect(),f=r.get("layoutCenter"),d=r.get("layoutSize"),p=e.getWidth(),g=e.getHeight(),v=h.width/h.height*this.aspectScale,m=!1,y,_;f&&d&&(y=[Pe(f[0],p),Pe(f[1],g)],_=Pe(d,Math.min(p,g)),!isNaN(y[0])&&!isNaN(y[1])&&!isNaN(_)&&(m=!0));var x;if(m)x={},v>1?(x.width=_,x.height=_/v):(x.height=_,x.width=_*v),x.y=y[1]-x.height/2,x.x=y[0]-x.width/2;else{var S=r.getBoxLayoutParams();S.aspect=v,x=dr(S,{width:p,height:g})}this.setViewRect(x.x,x.y,x.width,x.height),this.setCenter(r.get("center"),e),this.setZoom(r.get("zoom"))}function rye(r,e){k(e.get("geoCoord"),function(t,n){r.addGeoCoord(n,t)})}var iye=function(){function r(){this.dimensions=z8}return r.prototype.create=function(e,t){var n=[];function i(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 U3(l+s,l,pe({nameMap:o.get("nameMap")},i(o)));u.zoomLimit=o.get("scaleLimit"),n.push(u),o.coordinateSystem=u,u.model=o,u.resize=V3,u.resize(o,t)}),e.eachSeries(function(o){var s=o.get("coordinateSystem");if(s==="geo"){var l=o.get("geoIndex")||0;o.coordinateSystem=n[l]}});var a={};return e.eachSeriesByType("map",function(o){if(!o.getHostGeoModel()){var s=o.getMapType();a[s]=a[s]||[],a[s].push(o)}}),k(a,function(o,s){var l=xe(o,function(c){return c.get("nameMap")}),u=new U3(s,s,pe({nameMap:GC(l)},i(o[0])));u.zoomLimit=Mr.apply(null,xe(o,function(c){return c.get("scaleLimit")})),n.push(u),u.resize=V3,u.resize(o[0],t),k(o,function(c){c.coordinateSystem=u,rye(u,c)})}),n},r.prototype.getFilledRegions=function(e,t,n,i){for(var a=(e||[]).slice(),o=He(),s=0;s<a.length;s++)o.set(a[s].name,a[s]);var l=Os.load(t,n,i);return k(l.regions,function(u){var c=u.name,h=o.get(c),f=u.properties&&u.properties.echartsStyle;h||(h={name:c},a.push(h)),f&&ht(h,f)}),a},r}(),aye=new iye;const V8=aye;var oye=function(r){ae(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,i){var a=Os.getGeoResource(t.map);if(a&&a.type==="geoJSON"){var o=t.itemStyle=t.itemStyle||{};"color"in o||(o.color="#eee")}this.mergeDefaultAndTheme(t,i),zc(t,"label",["show"])},e.prototype.optionUpdated=function(){var t=this,n=this.option;n.regions=V8.getFilledRegions(n.regions,n.map,n.nameMap,n.nameProperty);var i={};this._optionModelMap=$o(n.regions||[],function(a,o){var s=o.name;return s&&(a.set(s,new vn(o,t,t.ecModel)),o.selected&&(i[s]=!0)),a},He()),n.selectedMap||(n.selectedMap=i)},e.prototype.getRegionModel=function(t){return this._optionModelMap.get(t)||new vn(null,this,this.ecModel)},e.prototype.getFormattedLabel=function(t,n){var i=this.getRegionModel(t),a=n==="normal"?i.get(["label","formatter"]):i.get(["emphasis","label","formatter"]),o={name:t};if(qe(a))return o.status=n,a(o);if(ke(a))return a.replace("{a}",t!=null?t:"")},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.select=function(t){var n=this.option,i=n.selectedMode;if(i){i!=="multiple"&&(n.selectedMap=null);var a=n.selectedMap||(n.selectedMap={});a[t]=!0}},e.prototype.unSelect=function(t){var n=this.option.selectedMap;n&&(n[t]=!1)},e.prototype.toggleSelected=function(t){this[this.isSelected(t)?"unSelect":"select"](t)},e.prototype.isSelected=function(t){var n=this.option.selectedMap;return!!(n&&n[t])},e.type="geo",e.layoutMode="box",e.defaultOption={z:0,show:!0,left:"center",top:"center",aspectScale:null,silent:!1,map:"",boundingCoords:null,center:null,zoom:1,scaleLimit:null,label:{show:!1,color:"#000"},itemStyle:{borderWidth:.5,borderColor:"#444"},emphasis:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},select:{label:{show:!0,color:"rgb(100,0,0)"},itemStyle:{color:"rgba(255,215,0,0.8)"}},regions:[]},e}(Nt);const sye=oye;function G3(r,e){return r.pointToProjected?r.pointToProjected(e):r.pointToData(e)}function rE(r,e,t,n){var i=r.getZoom(),a=r.getCenter(),o=e.zoom,s=r.projectedToPoint?r.projectedToPoint(a):r.dataToPoint(a);if(e.dx!=null&&e.dy!=null&&(s[0]-=e.dx,s[1]-=e.dy,r.setCenter(G3(r,s),n)),o!=null){if(t){var l=t.min||0,u=t.max||1/0;o=Math.max(Math.min(i*o,u),l)/i}r.scaleX*=o,r.scaleY*=o;var c=(e.originX-r.x)*(o-1),h=(e.originY-r.y)*(o-1);r.x-=c,r.y-=h,r.updateTransform(),r.setCenter(G3(r,s),n),r.setZoom(o*i)}return{center:r.getCenter(),zoom:r.getZoom()}}var lye=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.focusBlurEnabled=!0,t}return e.prototype.init=function(t,n){this._api=n},e.prototype.render=function(t,n,i,a){if(this._model=t,!t.get("show")){this._mapDraw&&this._mapDraw.remove(),this._mapDraw=null;return}this._mapDraw||(this._mapDraw=new B8(i));var o=this._mapDraw;o.draw(t,n,i,this,a),o.group.on("click",this._handleRegionClick,this),o.group.silent=t.get("silent"),this.group.add(o.group),this.updateSelectStatus(t,n,i)},e.prototype._handleRegionClick=function(t){var n;lc(t.target,function(i){return(n=at(i).eventData)!=null},!0),n&&this._api.dispatchAction({type:"geoToggleSelect",geoId:this._model.id,name:n.name})},e.prototype.updateSelectStatus=function(t,n,i){var a=this;this._mapDraw.group.traverse(function(o){var s=at(o).eventData;if(s)return a._model.isSelected(s.name)?i.enterSelect(o):i.leaveSelect(o),!0})},e.prototype.findHighDownDispatchers=function(t){return this._mapDraw&&this._mapDraw.findHighDownDispatchers(t,this._model)},e.prototype.dispose=function(){this._mapDraw&&this._mapDraw.remove()},e.type="geo",e}(kn);const uye=lye;function cye(r,e,t){Os.registerMap(r,e,t)}function G8(r){r.registerCoordinateSystem("geo",V8),r.registerComponentModel(sye),r.registerComponentView(uye),r.registerImpl("registerMap",cye),r.registerImpl("getMap",function(t){return Os.getMapForUser(t)});function e(t,n){n.update="geo:updateSelectStatus",r.registerAction(n,function(i,a){var o={},s=[];return a.eachComponent({mainType:"geo",query:i},function(l){l[t](i.name);var u=l.coordinateSystem;k(u.regions,function(h){o[h.name]=l.isSelected(h.name)||!1});var c=[];k(o,function(h,f){o[f]&&c.push(f)}),s.push({geoIndex:l.componentIndex,name:c})}),{selected:o,allSelected:s,name:i.name}})}e("toggleSelected",{type:"geoToggleSelect",event:"geoselectchanged"}),e("select",{type:"geoSelect",event:"geoselected"}),e("unSelect",{type:"geoUnSelect",event:"geounselected"}),r.registerAction({type:"geoRoam",event:"geoRoam",update:"updateTransform"},function(t,n,i){var a=t.componentType||"series";n.eachComponent({mainType:a,query:t},function(o){var s=o.coordinateSystem;if(s.type==="geo"){var l=rE(s,t,o.get("scaleLimit"),i);o.setCenter&&o.setCenter(l.center),o.setZoom&&o.setZoom(l.zoom),a==="series"&&k(o.seriesGroup,function(u){u.setCenter(l.center),u.setZoom(l.zoom)})}})})}function hye(r){gt(G8),r.registerChartView(jme),r.registerSeriesModel(Zme),r.registerLayout(eye),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,Jme),FG("map",r.registerAction)}function fye(r){var e=r;e.hierNode={defaultAncestor:null,ancestor:e,prelim:0,modifier:0,change:0,shift:0,i:0,thread:null};for(var t=[e],n,i;n=t.pop();)if(i=n.children,n.isExpand&&i.length)for(var a=i.length,o=a-1;o>=0;o--){var s=i[o];s.hierNode={defaultAncestor:null,ancestor:s,prelim:0,modifier:0,change:0,shift:0,i:o,thread:null},t.push(s)}}function dye(r,e){var t=r.isExpand?r.children:[],n=r.parentNode.children,i=r.hierNode.i?n[r.hierNode.i-1]:null;if(t.length){gye(r);var a=(t[0].hierNode.prelim+t[t.length-1].hierNode.prelim)/2;i?(r.hierNode.prelim=i.hierNode.prelim+e(r,i),r.hierNode.modifier=r.hierNode.prelim-a):r.hierNode.prelim=a}else i&&(r.hierNode.prelim=i.hierNode.prelim+e(r,i));r.parentNode.hierNode.defaultAncestor=mye(r,i,r.parentNode.hierNode.defaultAncestor||n[0],e)}function pye(r){var e=r.hierNode.prelim+r.parentNode.hierNode.modifier;r.setLayout({x:e},!0),r.hierNode.modifier+=r.parentNode.hierNode.modifier}function H3(r){return arguments.length?r:xye}function Fp(r,e){return r-=Math.PI/2,{x:e*Math.cos(r),y:e*Math.sin(r)}}function vye(r,e){return dr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function gye(r){for(var e=r.children,t=e.length,n=0,i=0;--t>=0;){var a=e[t];a.hierNode.prelim+=n,a.hierNode.modifier+=n,i+=a.hierNode.change,n+=a.hierNode.shift+i}}function mye(r,e,t,n){if(e){for(var i=r,a=r,o=a.parentNode.children[0],s=e,l=i.hierNode.modifier,u=a.hierNode.modifier,c=o.hierNode.modifier,h=s.hierNode.modifier;s=qA(s),a=jA(a),s&&a;){i=qA(i),o=jA(o),i.hierNode.ancestor=r;var f=s.hierNode.prelim+h-a.hierNode.prelim-u+n(s,a);f>0&&(_ye(yye(s,r,t),r,f),u+=f,l+=f),h+=s.hierNode.modifier,u+=a.hierNode.modifier,l+=i.hierNode.modifier,c+=o.hierNode.modifier}s&&!qA(i)&&(i.hierNode.thread=s,i.hierNode.modifier+=h-l),a&&!jA(o)&&(o.hierNode.thread=a,o.hierNode.modifier+=u-c,t=r)}return t}function qA(r){var e=r.children;return e.length&&r.isExpand?e[e.length-1]:r.hierNode.thread}function jA(r){var e=r.children;return e.length&&r.isExpand?e[0]:r.hierNode.thread}function yye(r,e,t){return r.hierNode.ancestor.parentNode===e.parentNode?r.hierNode.ancestor:t}function _ye(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 xye(r,e){return r.parentNode===e.parentNode?1:2}var Sye=function(){function r(){this.parentPoint=[],this.childPoints=[]}return r}(),Aye=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Sye},e.prototype.buildPath=function(t,n){var i=n.childPoints,a=i.length,o=n.parentPoint,s=i[0],l=i[a-1];if(a===1){t.moveTo(o[0],o[1]),t.lineTo(s[0],s[1]);return}var u=n.orient,c=u==="TB"||u==="BT"?0:1,h=1-c,f=Pe(n.forkPosition,1),d=[];d[c]=o[c],d[h]=o[h]+(l[h]-o[h])*f,t.moveTo(o[0],o[1]),t.lineTo(d[0],d[1]),t.moveTo(s[0],s[1]),d[c]=s[c],t.lineTo(d[0],d[1]),d[c]=l[c],t.lineTo(d[0],d[1]),t.lineTo(l[0],l[1]);for(var p=1;p<a-1;p++){var g=i[p];t.moveTo(g[0],g[1]),d[c]=g[c],t.lineTo(d[0],d[1])}},e}(yt),wye=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._mainGroup=new rt,t}return e.prototype.init=function(t,n){this._controller=new Bg(n.getZr()),this._controllerHost={target:this.group},this.group.add(this._mainGroup)},e.prototype.render=function(t,n,i){var a=t.getData(),o=t.layoutInfo,s=this._mainGroup,l=t.get("layout");l==="radial"?(s.x=o.x+o.width/2,s.y=o.y+o.height/2):(s.x=o.x,s.y=o.y),this._updateViewCoordSys(t,i),this._updateController(t,n,i);var u=this._data;a.diff(u).add(function(c){W3(a,c)&&$3(a,c,null,s,t)}).update(function(c,h){var f=u.getItemGraphicEl(h);if(!W3(a,c)){f&&Y3(u,h,f,s,t);return}$3(a,c,f,s,t)}).remove(function(c){var h=u.getItemGraphicEl(c);h&&Y3(u,c,h,s,t)}).execute(),this._nodeScaleRatio=t.get("nodeScaleRatio"),this._updateNodeAndLinkScale(t),t.get("expandAndCollapse")===!0&&a.eachItemGraphicEl(function(c,h){c.off("click").on("click",function(){i.dispatchAction({type:"treeExpandAndCollapse",seriesId:t.id,dataIndex:h})})}),this._data=a},e.prototype._updateViewCoordSys=function(t,n){var i=t.getData(),a=[];i.each(function(h){var f=i.getItemLayout(h);f&&!isNaN(f.x)&&!isNaN(f.y)&&a.push([+f.x,+f.y])});var o=[],s=[];A1(a,o,s);var l=this._min,u=this._max;s[0]-o[0]===0&&(o[0]=l?l[0]:o[0]-1,s[0]=u?u[0]:s[0]+1),s[1]-o[1]===0&&(o[1]=l?l[1]:o[1]-1,s[1]=u?u[1]:s[1]+1);var c=t.coordinateSystem=new zg;c.zoomLimit=t.get("scaleLimit"),c.setBoundingRect(o[0],o[1],s[0]-o[0],s[1]-o[1]),c.setCenter(t.get("center"),n),c.setZoom(t.get("zoom")),this.group.attr({x:c.x,y:c.y,scaleX:c.scaleX,scaleY:c.scaleY}),this._min=o,this._max=s},e.prototype._updateController=function(t,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;o.setPointerChecker(function(u,c,h){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(c,h)&&!Y1(u,i,t)}),o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){eE(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"treeRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){tE(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"treeRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(t),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(t){var n=t.getData(),i=this._getNodeGlobalScale(t);n.eachItemGraphicEl(function(a,o){a.setSymbolScale(i)})},e.prototype._getNodeGlobalScale=function(t){var n=t.coordinateSystem;if(n.type!=="view")return 1;var i=this._nodeScaleRatio,a=n.scaleX||1,o=n.getZoom(),s=(o-1)*i+1;return s/a},e.prototype.dispose=function(){this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype.remove=function(){this._mainGroup.removeAll(),this._data=null},e.type="tree",e}(gn);function W3(r,e){var t=r.getItemLayout(e);return t&&!isNaN(t.x)&&!isNaN(t.y)}function $3(r,e,t,n,i){var a=!t,o=r.tree.getNodeByDataIndex(e),s=o.getModel(),l=o.getVisual("style").fill,u=o.isExpand===!1&&o.children.length!==0?l:"#fff",c=r.tree.root,h=o.parentNode===c?o:o.parentNode||o,f=r.getItemGraphicEl(h.dataIndex),d=h.getLayout(),p=f?{x:f.__oldX,y:f.__oldY,rawX:f.__radialOldRawX,rawY:f.__radialOldRawY}:d,g=o.getLayout();a?(t=new Dg(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.x=p.x,t.y=p.y):t.updateData(r,e,null,{symbolInnerColor:u,useNameLabel:!0}),t.__radialOldRawX=t.__radialRawX,t.__radialOldRawY=t.__radialRawY,t.__radialRawX=g.rawX,t.__radialRawY=g.rawY,n.add(t),r.setItemGraphicEl(e,t),t.__oldX=t.x,t.__oldY=t.y,zt(t,{x:g.x,y:g.y},i);var v=t.getSymbolPath();if(i.get("layout")==="radial"){var m=c.children[0],y=m.getLayout(),_=m.children.length,x=void 0,S=void 0;if(g.x===y.x&&o.isExpand===!0&&m.children.length){var A={x:(m.children[0].getLayout().x+m.children[_-1].getLayout().x)/2,y:(m.children[0].getLayout().y+m.children[_-1].getLayout().y)/2};x=Math.atan2(A.y-y.y,A.x-y.x),x<0&&(x=Math.PI*2+x),S=A.x<y.x,S&&(x=x-Math.PI)}else x=Math.atan2(g.y-y.y,g.x-y.x),x<0&&(x=Math.PI*2+x),o.children.length===0||o.children.length!==0&&o.isExpand===!1?(S=g.x<y.x,S&&(x=x-Math.PI)):(S=g.x>y.x,S||(x=x-Math.PI));var w=S?"left":"right",M=s.getModel("label"),C=M.get("rotate"),b=C*(Math.PI/180),T=v.getTextContent();T&&(v.setTextConfig({position:M.get("position")||w,rotation:C==null?-x:b,origin:"center"}),T.setStyle("verticalAlign","middle"))}var P=s.get(["emphasis","focus"]),D=P==="relative"?Fv(o.getAncestorsIndices(),o.getDescendantIndices()):P==="ancestor"?o.getAncestorsIndices():P==="descendant"?o.getDescendantIndices():null;D&&(at(t).focus=D),bye(i,o,c,t,p,d,g,n),t.__edge&&(t.onHoverStateChange=function(L){if(L!=="blur"){var E=o.parentNode&&r.getItemGraphicEl(o.parentNode.dataIndex);E&&E.hoverState===Tg||i_(t.__edge,L)}})}function bye(r,e,t,n,i,a,o,s){var l=e.getModel(),u=r.get("edgeShape"),c=r.get("layout"),h=r.getOrient(),f=r.get(["lineStyle","curveness"]),d=r.get("edgeForkPosition"),p=l.getModel("lineStyle").getLineStyle(),g=n.__edge;if(u==="curve")e.parentNode&&e.parentNode!==t&&(g||(g=n.__edge=new M1({shape:tM(c,h,f,i,i)})),zt(g,{shape:tM(c,h,f,a,o)},r));else if(u==="polyline"&&c==="orthogonal"&&e!==t&&e.children&&e.children.length!==0&&e.isExpand===!0){for(var v=e.children,m=[],y=0;y<v.length;y++){var _=v[y].getLayout();m.push([_.x,_.y])}g||(g=n.__edge=new Aye({shape:{parentPoint:[o.x,o.y],childPoints:[[o.x,o.y]],orient:h,forkPosition:d}})),zt(g,{shape:{parentPoint:[o.x,o.y],childPoints:m}},r)}g&&!(u==="polyline"&&!e.isExpand)&&(g.useStyle(Ke({strokeNoScale:!0,fill:null},p)),Br(g,l,"lineStyle"),Gc(g),s.add(g))}function X3(r,e,t,n,i){var a=e.tree.root,o=H8(a,r),s=o.source,l=o.sourceLayout,u=e.getItemGraphicEl(r.dataIndex);if(u){var c=e.getItemGraphicEl(s.dataIndex),h=c.__edge,f=u.__edge||(s.isExpand===!1||s.children.length===1?h:void 0),d=n.get("edgeShape"),p=n.get("layout"),g=n.get("orient"),v=n.get(["lineStyle","curveness"]);f&&(d==="curve"?Kl(f,{shape:tM(p,g,v,l,l),style:{opacity:0}},n,{cb:function(){t.remove(f)},removeOpt:i}):d==="polyline"&&n.get("layout")==="orthogonal"&&Kl(f,{shape:{parentPoint:[l.x,l.y],childPoints:[[l.x,l.y]]},style:{opacity:0}},n,{cb:function(){t.remove(f)},removeOpt:i}))}}function H8(r,e){for(var t=e.parentNode===r?e:e.parentNode||e,n;n=t.getLayout(),n==null;)t=t.parentNode===r?t:t.parentNode||t;return{source:t,sourceLayout:n}}function Y3(r,e,t,n,i){var a=r.tree.getNodeByDataIndex(e),o=r.tree.root,s=H8(o,a).sourceLayout,l={duration:i.get("animationDurationUpdate"),easing:i.get("animationEasingUpdate")};Kl(t,{x:s.x+1,y:s.y+1},i,{cb:function(){n.remove(t),r.setItemGraphicEl(e,null)},removeOpt:l}),t.fadeOut(null,r.hostModel,{fadeLabel:!0,animation:l}),a.children.forEach(function(u){X3(u,r,n,i,l)}),X3(a,r,n,i,l)}function tM(r,e,t,n,i){var a,o,s,l,u,c,h,f;if(r==="radial"){u=n.rawX,h=n.rawY,c=i.rawX,f=i.rawY;var d=Fp(u,h),p=Fp(u,h+(f-h)*t),g=Fp(c,f+(h-f)*t),v=Fp(c,f);return{x1:d.x||0,y1:d.y||0,x2:v.x||0,y2:v.y||0,cpx1:p.x||0,cpy1:p.y||0,cpx2:g.x||0,cpy2:g.y||0}}else u=n.x,h=n.y,c=i.x,f=i.y,(e==="LR"||e==="RL")&&(a=u+(c-u)*t,o=h,s=c+(u-c)*t,l=f),(e==="TB"||e==="BT")&&(a=u,o=h+(f-h)*t,s=c,l=f+(h-f)*t);return{x1:u,y1:h,x2:c,y2:f,cpx1:a,cpy1:o,cpx2:s,cpy2:l}}const Tye=wye;var Ia=Pt();function W8(r){var e=r.mainData,t=r.datas;t||(t={main:e},r.datasAttr={main:"data"}),r.datas=r.mainData=null,$8(e,t,r),k(t,function(n){k(e.TRANSFERABLE_METHODS,function(i){n.wrapMethod(i,ut(Mye,r))})}),e.wrapMethod("cloneShallow",ut(Eye,r)),k(e.CHANGABLE_METHODS,function(n){e.wrapMethod(n,ut(Cye,r))}),gi(t[e.dataType]===e)}function Mye(r,e){if(Rye(this)){var t=pe({},Ia(this).datas);t[this.dataType]=e,$8(e,t,r)}else iE(e,this.dataType,Ia(this).mainData,r);return e}function Cye(r,e){return r.struct&&r.struct.update(),e}function Eye(r,e){return k(Ia(e).datas,function(t,n){t!==e&&iE(t.cloneShallow(),n,e,r)}),e}function Lye(r){var e=Ia(this).mainData;return r==null||e==null?e:Ia(e).datas[r]}function Pye(){var r=Ia(this).mainData;return r==null?[{data:r}]:xe(wt(Ia(r).datas),function(e){return{type:e,data:Ia(r).datas[e]}})}function Rye(r){return Ia(r).mainData===r}function $8(r,e,t){Ia(r).datas={},k(e,function(n,i){iE(n,i,r,t)})}function iE(r,e,t,n){Ia(t).datas[e]=r,Ia(r).mainData=t,r.dataType=e,n.struct&&(r[n.structAttr]=n.struct,n.struct[n.datasAttr[e]]=r),r.getLinkedData=Lye,r.getLinkedDataAll=Pye}var Dye=function(){function r(e,t){this.depth=0,this.height=0,this.dataIndex=-1,this.children=[],this.viewChildren=[],this.isExpand=!1,this.name=e||"",this.hostTree=t}return r.prototype.isRemoved=function(){return this.dataIndex<0},r.prototype.eachNode=function(e,t,n){qe(e)&&(n=t,t=e,e=null),e=e||{},ke(e)&&(e={order:e});var i=e.order||"preorder",a=this[e.attr||"children"],o;i==="preorder"&&(o=t.call(n,this));for(var s=0;!o&&s<a.length;s++)a[s].eachNode(e,t,n);i==="postorder"&&t.call(n,this)},r.prototype.updateDepthAndHeight=function(e){var t=0;this.depth=e;for(var n=0;n<this.children.length;n++){var i=this.children[n];i.updateDepthAndHeight(e+1),i.height>t&&(t=i.height)}this.height=t+1},r.prototype.getNodeById=function(e){if(this.getId()===e)return this;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].getNodeById(e);if(a)return a}},r.prototype.contains=function(e){if(e===this)return!0;for(var t=0,n=this.children,i=n.length;t<i;t++){var a=n[t].contains(e);if(a)return a}},r.prototype.getAncestors=function(e){for(var t=[],n=e?this:this.parentNode;n;)t.push(n),n=n.parentNode;return t.reverse(),t},r.prototype.getAncestorsIndices=function(){for(var e=[],t=this;t;)e.push(t.dataIndex),t=t.parentNode;return e.reverse(),e},r.prototype.getDescendantIndices=function(){var e=[];return this.eachNode(function(t){e.push(t.dataIndex)}),e},r.prototype.getValue=function(e){var t=this.hostTree.data;return t.getStore().get(t.getDimensionIndex(e||"value"),this.dataIndex)},r.prototype.setLayout=function(e,t){this.dataIndex>=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<e.length;++t)if(e[t]===this)return t;return-1}return-1},r.prototype.isAncestorOf=function(e){for(var t=e.parentNode;t;){if(t===this)return!0;t=t.parentNode}return!1},r.prototype.isDescendantOf=function(e){return e!==this&&e.isAncestorOf(this)},r}(),Iye=function(){function r(e){this.type="tree",this._nodes=[],this.hostModel=e}return r.prototype.eachNode=function(e,t,n){this.root.eachNode(e,t,n)},r.prototype.getNodeByDataIndex=function(e){var t=this.data.getRawIndex(e);return this._nodes[t]},r.prototype.getNodeById=function(e){return this.root.getNodeById(e)},r.prototype.update=function(){for(var e=this.data,t=this._nodes,n=0,i=t.length;n<i;n++)t[n].dataIndex=-1;for(var n=0,i=e.count();n<i;n++)t[e.getRawIndex(n)].dataIndex=n},r.prototype.clearLayouts=function(){this.data.clearItemLayouts()},r.createTree=function(e,t,n){var i=new r(t),a=[],o=1;s(e);function s(c,h){var f=c.value;o=Math.max(o,_e(f)?f.length:1),a.push(c);var d=new Dye(fr(c.name,""),i);h?Nye(d,h):i.root=d,i._nodes.push(d);var p=c.children;if(p)for(var g=0;g<p.length;g++)s(p[g],d)}i.root.updateDepthAndHeight(0);var l=Pg(a,{coordDimensions:["value"],dimensionsCount:o}).dimensions,u=new vi(l,t);return u.initData(a),n&&n(u),W8({mainData:u,struct:i,structAttr:"tree"}),i.update(),i},r}();function Nye(r,e){var t=e.children;r.parentNode!==e&&(t.push(r),r.parentNode=e)}const aE=Iye;function rg(r,e,t){if(r&&pt(e,r.type)>=0){var n=t.getData().tree.root,i=r.targetNode;if(ke(i)&&(i=n.getNodeById(i)),i&&n.contains(i))return{node:i};var a=r.targetNodeId;if(a!=null&&(i=n.getNodeById(a)))return{node:i}}}function X8(r){for(var e=[];r;)r=r.parentNode,r&&e.push(r);return e.reverse()}function oE(r,e){var t=X8(r);return pt(t,e)>=0}function j1(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 kye=function(r){ae(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},i=t.leaves||{},a=new vn(i,this,this.ecModel),o=aE.createTree(n,this,s);function s(h){h.wrapMethod("getItemModel",function(f,d){var p=o.getNodeByDataIndex(d);return p&&p.children.length&&p.isExpand||(f.parentModel=a),f})}var l=0;o.eachNode("preorder",function(h){h.depth>l&&(l=h.depth)});var u=t.expandAndCollapse,c=u&&t.initialTreeDepth>=0?t.initialTreeDepth:l;return o.root.eachNode("preorder",function(h){var f=h.hostTree.data.getRawDataItem(h.dataIndex);h.isExpand=f&&f.collapsed!=null?!f.collapsed:h.depth<=c}),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,i){for(var a=this.getData().tree,o=a.root.children[0],s=a.getNodeByDataIndex(t),l=s.getValue(),u=s.name;s&&s!==o;)u=s.parentNode.name+"."+u,s=s.parentNode;return Ar("nameValue",{name:u,value:l,noValue:isNaN(l)||l==null})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=j1(i,this),n.collapsed=!i.isExpand,n},e.type="series.tree",e.layoutMode="box",e.defaultOption={z:2,coordinateSystem:"view",left:"12%",top:"12%",right:"12%",bottom:"12%",layout:"orthogonal",edgeShape:"curve",edgeForkPosition:"50%",roam:!1,nodeScaleRatio:.4,center:null,zoom:1,orient:"LR",symbol:"emptyCircle",symbolSize:7,expandAndCollapse:!0,initialTreeDepth:2,lineStyle:{color:"#ccc",width:1.5,curveness:.5},itemStyle:{color:"lightsteelblue",borderWidth:1.5},label:{show:!0},animationEasing:"linear",animationDuration:700,animationDurationUpdate:500},e}(En);const Oye=kye;function Fye(r,e,t){for(var n=[r],i=[],a;a=n.pop();)if(i.push(a),a.isExpand){var o=a.children;if(o.length)for(var s=0;s<o.length;s++)n.push(o[s])}for(;a=i.pop();)e(a,t)}function fp(r,e){for(var t=[r],n;n=t.pop();)if(e(n),n.isExpand){var i=n.children;if(i.length)for(var a=i.length-1;a>=0;a--)t.push(i[a])}}function Bye(r,e){r.eachSeriesByType("tree",function(t){zye(t,e)})}function zye(r,e){var t=vye(r,e);r.layoutInfo=t;var n=r.get("layout"),i=0,a=0,o=null;n==="radial"?(i=2*Math.PI,a=Math.min(t.height,t.width)/2,o=H3(function(_,x){return(_.parentNode===x.parentNode?1:2)/_.depth})):(i=t.width,a=t.height,o=H3());var s=r.getData().tree.root,l=s.children[0];if(l){fye(s),Fye(l,dye,o),s.hierNode.modifier=-l.hierNode.prelim,fp(l,pye);var u=l,c=l,h=l;fp(l,function(_){var x=_.getLayout().x;x<u.getLayout().x&&(u=_),x>c.getLayout().x&&(c=_),_.depth>h.depth&&(h=_)});var f=u===c?1:o(u,c)/2,d=f-u.getLayout().x,p=0,g=0,v=0,m=0;if(n==="radial")p=i/(c.getLayout().x+f+d),g=a/(h.depth-1||1),fp(l,function(_){v=(_.getLayout().x+d)*p,m=(_.depth-1)*g;var x=Fp(v,m);_.setLayout({x:x.x,y:x.y,rawX:v,rawY:m},!0)});else{var y=r.getOrient();y==="RL"||y==="LR"?(g=a/(c.getLayout().x+f+d),p=i/(h.depth-1||1),fp(l,function(_){m=(_.getLayout().x+d)*g,v=y==="LR"?(_.depth-1)*p:i-(_.depth-1)*p,_.setLayout({x:v,y:m},!0)})):(y==="TB"||y==="BT")&&(p=i/(c.getLayout().x+f+d),g=a/(h.depth-1||1),fp(l,function(_){v=(_.getLayout().x+d)*p,m=y==="TB"?(_.depth-1)*g:a-(_.depth-1)*g,_.setLayout({x:v,y:m},!0)}))}}}function Uye(r){r.eachSeriesByType("tree",function(e){var t=e.getData(),n=t.tree;n.eachNode(function(i){var a=i.getModel(),o=a.getModel("itemStyle").getItemStyle(),s=t.ensureUniqueItemVisual(i.dataIndex,"style");pe(s,o)})})}function Vye(r){r.registerAction({type:"treeExpandAndCollapse",event:"treeExpandAndCollapse",update:"update"},function(e,t){t.eachComponent({mainType:"series",subType:"tree",query:e},function(n){var i=e.dataIndex,a=n.getData().tree,o=a.getNodeByDataIndex(i);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(i){var a=i.coordinateSystem,o=rE(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}function Gye(r){r.registerChartView(Tye),r.registerSeriesModel(Oye),r.registerLayout(Bye),r.registerVisual(Uye),Vye(r)}var q3=["treemapZoomToNode","treemapRender","treemapMove"];function Hye(r){for(var e=0;e<q3.length;e++)r.registerAction({type:q3[e],update:"updateView"},qn);r.registerAction({type:"treemapRootToNode",update:"updateView"},function(t,n){n.eachComponent({mainType:"series",subType:"treemap",query:t},i);function i(a,o){var s=["treemapZoomToNode","treemapRootToNode"],l=rg(t,s,a);if(l){var u=a.getViewRoot();u&&(t.direction=oE(u,l.node)?"rollUp":"drillDown"),a.resetViewRoot(l.node)}}})}function Y8(r){var e=r.getData(),t=e.tree,n={};t.eachNode(function(i){for(var a=i;a&&a.depth>1;)a=a.parentNode;var o=PT(r.ecModel,a.name||a.dataIndex+"",n);i.setVisual("decal",o)})}var Wye=function(r){ae(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 i={name:t.name,children:t.data};q8(i);var a=t.levels||[],o=this.designatedVisualItemStyle={},s=new vn({itemStyle:o},this,n);a=t.levels=$ye(a,n);var l=xe(a||[],function(h){return new vn(h,s,n)},this),u=aE.createTree(i,this,c);function c(h){h.wrapMethod("getItemModel",function(f,d){var p=u.getNodeByDataIndex(d),g=p?l[p.depth]:null;return f.parentModel=g||s,f})}return u.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return Ar("nameValue",{name:s,value:o})},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treeAncestors=j1(i,this),n.treePathInfo=n.treeAncestors,n},e.prototype.setLayoutInfo=function(t){this.layoutInfo=this.layoutInfo||{},pe(this.layoutInfo,t)},e.prototype.mapIdToIndex=function(t){var n=this._idIndexMap;n||(n=this._idIndexMap=He(),this._idIndexMapCount=0);var i=n.get(t);return i==null&&n.set(t,i=this._idIndexMapCount++),i},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(){Y8(this)},e.type="series.treemap",e.layoutMode="box",e.defaultOption={progressive:0,left:"center",top:"middle",width:"80%",height:"80%",sort:!0,clipWindow:"origin",squareRatio:.5*(1+Math.sqrt(5)),leafDepth:null,drillDownIcon:"▶",zoomToNodeRatio:.32*.32,scaleLimit:null,roam:!0,nodeClick:"zoomToNode",animation:!0,animationDurationUpdate:900,animationEasing:"quinticInOut",breadcrumb:{show:!0,height:22,left:"center",top:"bottom",emptyItemWidth:25,itemStyle:{color:"rgba(0,0,0,0.7)",textStyle:{color:"#fff"}},emphasis:{itemStyle:{color:"rgba(0,0,0,0.9)"}}},label:{show:!0,distance:0,padding:5,position:"inside",color:"#fff",overflow:"truncate"},upperLabel:{show:!1,position:[0,"50%"],height:20,overflow:"truncate",verticalAlign:"middle"},itemStyle:{color:null,colorAlpha:null,colorSaturation:null,borderWidth:0,gapWidth:0,borderColor:"#fff",borderColorSaturation:null},emphasis:{upperLabel:{show:!0,position:[0,"50%"],overflow:"truncate",verticalAlign:"middle"}},visualDimension:0,visualMin:null,visualMax:null,color:[],colorAlpha:null,colorSaturation:null,colorMappingBy:"index",visibleMin:10,childrenVisibleMin:null,levels:[]},e}(En);function q8(r){var e=0;k(r.children,function(n){q8(n);var i=n.value;_e(i)&&(i=i[0]),e+=i});var t=r.value;_e(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),_e(r.value)?r.value[0]=t:r.value=t}function $ye(r,e){var t=nn(e.get("color")),n=nn(e.get(["aria","decal","decals"]));if(t){r=r||[];var i,a;k(r,function(s){var l=new vn(s),u=l.get("color"),c=l.get("decal");(l.get(["itemStyle","color"])||u&&u!=="none")&&(i=!0),(l.get(["itemStyle","decal"])||c&&c!=="none")&&(a=!0)});var o=r[0]||(r[0]={});return i||(o.color=t.slice()),!a&&n&&(o.decal=n.slice()),r}}const Xye=Wye;var Yye=8,j3=8,KA=5,qye=function(){function r(e){this.group=new rt,e.add(this.group)}return r.prototype.render=function(e,t,n,i){var a=e.getModel("breadcrumb"),o=this.group;if(o.removeAll(),!(!a.get("show")||!n)){var s=a.getModel("itemStyle"),l=a.getModel("emphasis"),u=s.getModel("textStyle"),c=l.getModel(["itemStyle","textStyle"]),h={pos:{left:a.get("left"),right:a.get("right"),top:a.get("top"),bottom:a.get("bottom")},box:{width:t.getWidth(),height:t.getHeight()},emptyItemWidth:a.get("emptyItemWidth"),totalWidth:0,renderList:[]};this._prepare(n,h,u),this._renderContent(e,h,s,l,u,c,i),k1(o,h.pos,h.box)}},r.prototype._prepare=function(e,t,n){for(var i=e;i;i=i.parentNode){var a=fr(i.getModel().get("name"),""),o=n.getTextRect(a),s=Math.max(o.width+Yye*2,t.emptyItemWidth);t.totalWidth+=s+j3,t.renderList.push({node:i,text:a,width:s})}},r.prototype._renderContent=function(e,t,n,i,a,o,s){for(var l=0,u=t.emptyItemWidth,c=e.get(["breadcrumb","height"]),h=nce(t.pos,t.box),f=t.totalWidth,d=t.renderList,p=i.getModel("itemStyle").getItemStyle(),g=d.length-1;g>=0;g--){var v=d[g],m=v.node,y=v.width,_=v.text;f>h.width&&(f-=y-u,y=u,_=null);var x=new zi({shape:{points:jye(l,0,y,c,g===d.length-1,g===0)},style:Ke(n.getItemStyle(),{lineJoin:"bevel"}),textContent:new Ot({style:pn(a,{text:_})}),textConfig:{position:"inside"},z2:md*1e4,onclick:ut(s,m)});x.disableLabelAnimation=!0,x.getTextContent().ensureState("emphasis").style=pn(o,{text:_}),x.ensureState("emphasis").style=p,Rn(x,i.get("focus"),i.get("blurScope"),i.get("disabled")),this.group.add(x),Kye(x,e,m),l+=y+j3}},r.prototype.remove=function(){this.group.removeAll()},r}();function jye(r,e,t,n,i,a){var o=[[i?r:r-KA,e],[r+t,e],[r+t,e+n],[i?r:r-KA,e+n]];return!a&&o.splice(2,0,[r+t+KA,e+n/2]),!i&&o.push([r,e+n/2]),o}function Kye(r,e,t){at(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&&j1(t,e)}}const Zye=qye;var Qye=function(){function r(){this._storage=[],this._elExistsMap={}}return r.prototype.add=function(e,t,n,i,a){return this._elExistsMap[e.id]?!1:(this._elExistsMap[e.id]=!0,this._storage.push({el:e,target:t,duration:n,delay:i,easing:a}),!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())},i=0,a=this._storage.length;i<a;i++){var o=this._storage[i];o.el.animateTo(o.target,{duration:o.duration,delay:o.delay,easing:o.easing,setToFinal:!0,done:n,aborted:n})}return this},r}();function Jye(){return new Qye}var nM=rt,K3=Dt,Z3=3,Q3="label",J3="upperLabel",e0e=md*10,t0e=md*2,n0e=md*3,Xu=Vc([["fill","color"],["stroke","strokeColor"],["lineWidth","strokeWidth"],["shadowBlur"],["shadowOffsetX"],["shadowOffsetY"],["shadowColor"]]),eO=function(r){var e=Xu(r);return e.stroke=e.fill=e.lineWidth=null,e},C_=Pt(),r0e=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._state="ready",t._storage=dp(),t}return e.prototype.render=function(t,n,i,a){var o=n.findComponents({mainType:"series",subType:"treemap",query:a});if(!(pt(o,t)<0)){this.seriesModel=t,this.api=i,this.ecModel=n;var s=["treemapZoomToNode","treemapRootToNode"],l=rg(a,s,t),u=a&&a.type,c=t.layoutInfo,h=!this._oldTree,f=this._storage,d=u==="treemapRootToNode"&&l&&f?{rootNodeGroup:f.nodeGroup[l.node.getRawIndex()],direction:a.direction}:null,p=this._giveContainerGroup(c),g=t.get("animation"),v=this._doRender(p,t,d);g&&!h&&(!u||u==="treemapZoomToNode"||u==="treemapRootToNode")?this._doAnimation(p,v,t,d):v.renderFinally(),this._resetController(i),this._renderBreadcrumb(t,i,l)}},e.prototype._giveContainerGroup=function(t){var n=this._containerGroup;return n||(n=this._containerGroup=new nM,this._initEvents(n),this.group.add(n)),n.x=t.x,n.y=t.y,n},e.prototype._doRender=function(t,n,i){var a=n.getData().tree,o=this._oldTree,s=dp(),l=dp(),u=this._storage,c=[];function h(y,_,x,S){return i0e(n,l,u,i,s,c,y,_,x,S)}g(a.root?[a.root]:[],o&&o.root?[o.root]:[],t,a===o||!o,0);var f=v(u);if(this._oldTree=a,this._storage=l,this._controllerHost){var d=this.seriesModel.layoutInfo,p=a.root.getLayout();p.width===d.width&&p.height===d.height&&(this._controllerHost.zoom=1)}return{lastsForAnimation:s,willDeleteEls:f,renderFinally:m};function g(y,_,x,S,A){S?(_=y,k(y,function(C,b){!C.isRemoved()&&M(b,b)})):new Ns(_,y,w,w).add(M).update(M).remove(ut(M,null)).execute();function w(C){return C.getId()}function M(C,b){var T=C!=null?y[C]:null,P=b!=null?_[b]:null,D=h(T,P,x,A);D&&g(T&&T.viewChildren||[],P&&P.viewChildren||[],D,S,A+1)}}function v(y){var _=dp();return y&&k(y,function(x,S){var A=_[S];k(x,function(w){w&&(A.push(w),C_(w).willDelete=!0)})}),_}function m(){k(f,function(y){k(y,function(_){_.parent&&_.parent.remove(_)})}),k(c,function(y){y.invisible=!0,y.dirty()})}},e.prototype._doAnimation=function(t,n,i,a){var o=i.get("animationDurationUpdate"),s=i.get("animationEasing"),l=(qe(o)?0:o)||0,u=(qe(s)?null:s)||"cubicOut",c=Jye();k(n.willDeleteEls,function(h,f){k(h,function(d,p){if(!d.invisible){var g=d.parent,v,m=C_(g);if(a&&a.direction==="drillDown")v=g===a.rootNodeGroup?{shape:{x:0,y:0,width:m.nodeWidth,height:m.nodeHeight},style:{opacity:0}}:{style:{opacity:0}};else{var y=0,_=0;m.willDelete||(y=m.nodeWidth/2,_=m.nodeHeight/2),v=f==="nodeGroup"?{x:y,y:_,style:{opacity:0}}:{shape:{x:y,y:_,width:0,height:0},style:{opacity:0}}}v&&c.add(d,v,l,0,u)}})}),k(this._storage,function(h,f){k(h,function(d,p){var g=n.lastsForAnimation[f][p],v={};g&&(d instanceof rt?g.oldX!=null&&(v.x=d.x,v.y=d.y,d.x=g.oldX,d.y=g.oldY):(g.oldShape&&(v.shape=pe({},d.shape),d.setShape(g.oldShape)),g.fadein?(d.setStyle("opacity",0),v.style={opacity:1}):d.style.opacity!==1&&(v.style={opacity:1})),c.add(d,v,l,0,u))})},this),this._state="animating",c.finished(Fe(function(){this._state="ready",n.renderFinally()},this)).start()},e.prototype._resetController=function(t){var n=this._controller,i=this._controllerHost;i||(this._controllerHost={target:this.group},i=this._controllerHost),n||(n=this._controller=new Bg(t.getZr()),n.enable(this.seriesModel.get("roam")),i.zoomLimit=this.seriesModel.get("scaleLimit"),i.zoom=this.seriesModel.get("zoom"),n.on("pan",Fe(this._onPan,this)),n.on("zoom",Fe(this._onZoom,this)));var a=new dt(0,0,t.getWidth(),t.getHeight());n.setPointerChecker(function(o,s,l){return a.contain(s,l)})},e.prototype._clearController=function(){var t=this._controller;this._controllerHost=null,t&&(t.dispose(),t=null)},e.prototype._onPan=function(t){if(this._state!=="animating"&&(Math.abs(t.dx)>Z3||Math.abs(t.dy)>Z3)){var n=this.seriesModel.getData().tree.root;if(!n)return;var i=n.getLayout();if(!i)return;this.api.dispatchAction({type:"treemapMove",from:this.uid,seriesId:this.seriesModel.id,rootRect:{x:i.x+t.dx,y:i.y+t.dy,width:i.width,height:i.height}})}},e.prototype._onZoom=function(t){var n=t.originX,i=t.originY,a=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 dt(s.x,s.y,s.width,s.height),u=null,c=this._controllerHost;u=c.zoomLimit;var h=c.zoom=c.zoom||1;if(h*=a,u){var f=u.min||0,d=u.max||1/0;h=Math.max(Math.min(d,h),f)}var p=h/c.zoom;c.zoom=h;var g=this.seriesModel.layoutInfo;n-=g.x,i-=g.y;var v=ta();Xo(v,v,[-n,-i]),YC(v,v,[p,p]),Xo(v,v,[n,i]),l.applyTransform(v),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(i){if(n._state==="ready"){var a=n.seriesModel.get("nodeClick",!0);if(a){var o=n.findTarget(i.offsetX,i.offsetY);if(o){var s=o.node;if(s.getLayout().isLeafRoot)n._rootToNode(o);else if(a==="zoomToNode")n._zoomToNode(o);else if(a==="link"){var l=s.hostTree.data.getItemModel(s.dataIndex),u=l.get("link",!0),c=l.get("target",!0)||"blank";u&&c_(u,c)}}}}},this)},e.prototype._renderBreadcrumb=function(t,n,i){var a=this;i||(i=t.get("leafDepth",!0)!=null?{node:t.getViewRoot()}:this.findTarget(n.getWidth()/2,n.getHeight()/2),i||(i={node:t.getData().tree.root})),(this._breadcrumb||(this._breadcrumb=new Zye(this.group))).render(t,n,i.node,function(o){a._state!=="animating"&&(oE(t.getViewRoot(),o)?a._rootToNode({node:o}):a._zoomToNode({node:o}))})},e.prototype.remove=function(){this._clearController(),this._containerGroup&&this._containerGroup.removeAll(),this._storage=dp(),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 i,a=this.seriesModel.getViewRoot();return a.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)i={node:o,offsetX:l[0],offsetY:l[1]};else return!1}},this),i},e.type="treemap",e}(gn);function dp(){return{nodeGroup:[],background:[],content:[]}}function i0e(r,e,t,n,i,a,o,s,l,u){if(!o)return;var c=o.getLayout(),h=r.getData(),f=o.getModel();if(h.setItemGraphicEl(o.dataIndex,null),!c||!c.isInView)return;var d=c.width,p=c.height,g=c.borderWidth,v=c.invisible,m=o.getRawIndex(),y=s&&s.getRawIndex(),_=o.viewChildren,x=c.upperHeight,S=_&&_.length,A=f.getModel("itemStyle"),w=f.getModel(["emphasis","itemStyle"]),M=f.getModel(["blur","itemStyle"]),C=f.getModel(["select","itemStyle"]),b=A.get("borderRadius")||0,T=Z("nodeGroup",nM);if(!T)return;if(l.add(T),T.x=c.x||0,T.y=c.y||0,T.markRedraw(),C_(T).nodeWidth=d,C_(T).nodeHeight=p,c.isAboveViewRoot)return T;var P=Z("background",K3,u,t0e);P&&O(T,P,S&&c.upperLabelHeight);var D=f.getModel("emphasis"),L=D.get("focus"),E=D.get("blurScope"),I=D.get("disabled"),N=L==="ancestor"?o.getAncestorsIndices():L==="descendant"?o.getDescendantIndices():L;if(S)$v(T)&&oc(T,!1),P&&(oc(P,!I),h.setItemGraphicEl(o.dataIndex,P),AT(P,N,E));else{var R=Z("content",K3,u,n0e);R&&V(T,R),P.disableMorphing=!0,P&&$v(P)&&oc(P,!1),oc(T,!I),h.setItemGraphicEl(o.dataIndex,T);var F=f.getShallow("cursor");F&&R.attr("cursor",F),AT(T,N,E)}return T;function O(le,re,be){var de=at(re);if(de.dataIndex=o.dataIndex,de.seriesIndex=r.seriesIndex,re.setShape({x:0,y:0,width:d,height:p,r:b}),v)H(re);else{re.invisible=!1;var U=o.getVisual("style"),K=U.stroke,te=eO(A);te.fill=K;var ce=Xu(w);ce.fill=w.get("borderColor");var se=Xu(M);se.fill=M.get("borderColor");var Ne=Xu(C);if(Ne.fill=C.get("borderColor"),be){var Oe=d-2*g;Q(re,K,U.opacity,{x:g,y:0,width:Oe,height:x})}else re.removeTextContent();re.setStyle(te),re.ensureState("emphasis").style=ce,re.ensureState("blur").style=se,re.ensureState("select").style=Ne,Gc(re)}le.add(re)}function V(le,re){var be=at(re);be.dataIndex=o.dataIndex,be.seriesIndex=r.seriesIndex;var de=Math.max(d-2*g,0),U=Math.max(p-2*g,0);if(re.culling=!0,re.setShape({x:g,y:g,width:de,height:U,r:b}),v)H(re);else{re.invisible=!1;var K=o.getVisual("style"),te=K.fill,ce=eO(A);ce.fill=te,ce.decal=K.decal;var se=Xu(w),Ne=Xu(M),Oe=Xu(C);Q(re,te,K.opacity,null),re.setStyle(ce),re.ensureState("emphasis").style=se,re.ensureState("blur").style=Ne,re.ensureState("select").style=Oe,Gc(re)}le.add(re)}function H(le){!le.invisible&&a.push(le)}function Q(le,re,be,de){var U=f.getModel(de?J3:Q3),K=fr(f.get("name"),null),te=U.getShallow("show");zr(le,Sr(f,de?J3:Q3),{defaultText:te?K:null,inheritColor:re,defaultOpacity:be,labelFetcher:r,labelDataIndex:o.dataIndex});var ce=le.getTextContent();if(ce){var se=ce.style,Ne=WC(se.padding||0);de&&(le.setTextConfig({layoutRect:de}),ce.disableLabelLayout=!0),ce.beforeUpdate=function(){var B=Math.max((de?de.width:le.shape.width)-Ne[1]-Ne[3],0),z=Math.max((de?de.height:le.shape.height)-Ne[0]-Ne[2],0);(se.width!==B||se.height!==z)&&ce.setStyle({width:B,height:z})},se.truncateMinChar=2,se.lineOverflow="truncate",W(se,de,c);var Oe=ce.getState("emphasis");W(Oe?Oe.style:null,de,c)}}function W(le,re,be){var de=le?le.text:null;if(!re&&be.isLeafRoot&&de!=null){var U=r.get("drillDownIcon",!0);le.text=U?U+" "+de:de}}function Z(le,re,be,de){var U=y!=null&&t[le][y],K=i[le];return U?(t[le][y]=null,ee(K,U)):v||(U=new re,U instanceof ka&&(U.z2=a0e(be,de)),he(K,U)),e[le][m]=U}function ee(le,re){var be=le[m]={};re instanceof nM?(be.oldX=re.x,be.oldY=re.y):be.oldShape=pe({},re.shape)}function he(le,re){var be=le[m]={},de=o.parentNode,U=re instanceof rt;if(de&&(!n||n.direction==="drillDown")){var K=0,te=0,ce=i.background[de.getRawIndex()];!n&&ce&&ce.oldShape&&(K=ce.oldShape.width,te=ce.oldShape.height),U?(be.oldX=0,be.oldY=te):be.oldShape={x:K,y:te,width:0,height:0}}be.fadein=!U}}function a0e(r,e){return r*e0e+e}const o0e=r0e;var ig=k,s0e=Qe,E_=-1,sE=function(){function r(e){var t=e.mappingMethod,n=e.type,i=this.option=Je(e);this.type=n,this.mappingMethod=t,this._normalizeData=c0e[t];var a=r.visualHandlers[n];this.applyVisual=a.applyVisual,this.getColorMapper=a.getColorMapper,this._normalizedToVisual=a._normalizedToVisual[t],t==="piecewise"?(ZA(i),l0e(i)):t==="category"?i.categories?u0e(i):ZA(i,!0):(gi(t!=="linear"||i.dataExtent),ZA(i))}return r.prototype.mapValueToVisual=function(e){var t=this._normalizeData(e);return this._normalizedToVisual(t,e)},r.prototype.getNormalizer=function(){return Fe(this._normalizeData,this)},r.listVisualTypes=function(){return wt(r.visualHandlers)},r.isValidType=function(e){return r.visualHandlers.hasOwnProperty(e)},r.eachVisual=function(e,t,n){Qe(e)?k(e,t,n):t.call(n,e)},r.mapVisual=function(e,t,n){var i,a=_e(e)?[]:Qe(e)?{}:(i=!0,null);return r.eachVisual(e,function(o,s){var l=t.call(n,o,s);i?a=l:a[s]=l}),a},r.retrieveVisuals=function(e){var t={},n;return e&&ig(r.visualHandlers,function(i,a){e.hasOwnProperty(a)&&(t[a]=e[a],n=!0)}),n?t:null},r.prepareVisualTypes=function(e){if(_e(e))e=e.slice();else if(s0e(e)){var t=[];ig(e,function(n,i){t.push(i)}),e=t}else return[];return e.sort(function(n,i){return i==="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 i,a=1/0,o=0,s=t.length;o<s;o++){var l=t[o].value;if(l!=null){if(l===e||ke(l)&&l===e+"")return o;n&&f(l,o)}}for(var o=0,s=t.length;o<s;o++){var u=t[o],c=u.interval,h=u.close;if(c){if(c[0]===-1/0){if(Ty(h[1],e,c[1]))return o}else if(c[1]===1/0){if(Ty(h[0],c[0],e))return o}else if(Ty(h[0],c[0],e)&&Ty(h[1],e,c[1]))return o;n&&f(c[0],o),n&&f(c[1],o)}}if(n)return e===1/0?t.length-1:e===-1/0?0:i;function f(d,p){var g=Math.abs(d-e);g<a&&(a=g,i=p)}},r.visualHandlers={color:{applyVisual:pp("color"),getColorMapper:function(){var e=this.option;return Fe(e.mappingMethod==="category"?function(t,n){return!n&&(t=this._normalizeData(t)),Bp.call(this,t)}:function(t,n,i){var a=!!i;return!n&&(t=this._normalizeData(t)),i=RS(t,e.parsedVisual,i),a?i:ws(i,"rgba")},this)},_normalizedToVisual:{linear:function(e){return ws(RS(e,this.option.parsedVisual),"rgba")},category:Bp,piecewise:function(e,t){var n=iM.call(this,t);return n==null&&(n=ws(RS(e,this.option.parsedVisual),"rgba")),n},fixed:Yu}},colorHue:by(function(e,t){return ev(e,t)}),colorSaturation:by(function(e,t){return ev(e,null,t)}),colorLightness:by(function(e,t){return ev(e,null,null,t)}),colorAlpha:by(function(e,t){return Q0(e,t)}),decal:{applyVisual:pp("decal"),_normalizedToVisual:{linear:null,category:Bp,piecewise:null,fixed:null}},opacity:{applyVisual:pp("opacity"),_normalizedToVisual:rM([0,1])},liftZ:{applyVisual:pp("liftZ"),_normalizedToVisual:{linear:Yu,category:Yu,piecewise:Yu,fixed:Yu}},symbol:{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);n("symbol",i)},_normalizedToVisual:{linear:tO,category:Bp,piecewise:function(e,t){var n=iM.call(this,t);return n==null&&(n=tO.call(this,e)),n},fixed:Yu}},symbolSize:{applyVisual:pp("symbolSize"),_normalizedToVisual:rM([0,1])}},r}();function l0e(r){var e=r.pieceList;r.hasSpecialVisual=!1,k(e,function(t,n){t.originIndex=n,t.visual!=null&&(r.hasSpecialVisual=!0)})}function u0e(r){var e=r.categories,t=r.categoryMap={},n=r.visual;if(ig(e,function(o,s){t[o]=s}),!_e(n)){var i=[];Qe(n)?ig(n,function(o,s){var l=t[s];i[l!=null?l:E_]=o}):i[E_]=n,n=j8(r,i)}for(var a=e.length-1;a>=0;a--)n[a]==null&&(delete t[e[a]],e.pop())}function ZA(r,e){var t=r.visual,n=[];Qe(t)?ig(t,function(a){n.push(a)}):t!=null&&n.push(t);var i={color:1,symbol:1};!e&&n.length===1&&!i.hasOwnProperty(r.type)&&(n[1]=n[0]),j8(r,n)}function by(r){return{applyVisual:function(e,t,n){var i=this.mapValueToVisual(e);n("color",r(t("color"),i))},_normalizedToVisual:rM([0,1])}}function tO(r){var e=this.option.visual;return e[Math.round(Kt(r,[0,1],[0,e.length-1],!0))]||{}}function pp(r){return function(e,t,n){n(r,this.mapValueToVisual(e))}}function Bp(r){var e=this.option.visual;return e[this.option.loop&&r!==E_?r%e.length:r]}function Yu(){return this.option.visual[0]}function rM(r){return{linear:function(e){return Kt(e,r,this.option.visual,!0)},category:Bp,piecewise:function(e,t){var n=iM.call(this,t);return n==null&&(n=Kt(e,r,this.option.visual,!0)),n},fixed:Yu}}function iM(r){var e=this.option,t=e.pieceList;if(e.hasSpecialVisual){var n=sE.findPieceIndex(r,t),i=t[n];if(i&&i.visual)return i.visual[this.type]}}function j8(r,e){return r.visual=e,r.type==="color"&&(r.parsedVisual=xe(e,function(t){var n=na(t);return n||[0,0,0,1]})),e}var c0e={linear:function(r){return Kt(r,this.option.dataExtent,[0,1],!0)},piecewise:function(r){var e=this.option.pieceList,t=sE.findPieceIndex(r,e,!0);if(t!=null)return Kt(t,[0,e.length-1],[0,1],!0)},category:function(r){var e=this.option.categories?this.option.categoryMap[r]:r;return e==null?E_:e},fixed:qn};function Ty(r,e,t){return r?e<=t:e<t}const Fr=sE;var h0e="itemStyle",K8=Pt();const f0e={seriesType:"treemap",reset:function(r){var e=r.getData().tree,t=e.root;t.isRemoved()||Z8(t,{},r.getViewRoot().getAncestors(),r)}};function Z8(r,e,t,n){var i=r.getModel(),a=r.getLayout(),o=r.hostTree.data;if(!(!a||a.invisible||!a.isInView)){var s=i.getModel(h0e),l=d0e(s,e,n),u=o.ensureUniqueItemVisual(r.dataIndex,"style"),c=s.get("borderColor"),h=s.get("borderColorSaturation"),f;h!=null&&(f=nO(l),c=p0e(h,f)),u.stroke=c;var d=r.viewChildren;if(!d||!d.length)f=nO(l),u.fill=f;else{var p=v0e(r,i,a,s,l,d);k(d,function(g,v){if(g.depth>=t.length||g===t[g.depth]){var m=g0e(i,l,g,v,p,n);Z8(g,m,t,n)}})}}}function d0e(r,e,t){var n=pe({},e),i=t.designatedVisualItemStyle;return k(["color","colorAlpha","colorSaturation"],function(a){i[a]=e[a];var o=r.get(a);i[a]=null,o!=null&&(n[a]=o)}),n}function nO(r){var e=QA(r,"color");if(e){var t=QA(r,"colorAlpha"),n=QA(r,"colorSaturation");return n&&(e=ev(e,null,null,n)),t&&(e=Q0(e,t)),e}}function p0e(r,e){return e!=null?ev(e,null,null,r):null}function QA(r,e){var t=r[e];if(t!=null&&t!=="none")return t}function v0e(r,e,t,n,i,a){if(!(!a||!a.length)){var o=JA(e,"color")||i.color!=null&&i.color!=="none"&&(JA(e,"colorAlpha")||JA(e,"colorSaturation"));if(o){var s=e.get("visualMin"),l=e.get("visualMax"),u=t.dataExtent.slice();s!=null&&s<u[0]&&(u[0]=s),l!=null&&l>u[1]&&(u[1]=l);var c=e.get("colorMappingBy"),h={type:o.name,dataExtent:u,visual:o.range};h.type==="color"&&(c==="index"||c==="id")?(h.mappingMethod="category",h.loop=!0):h.mappingMethod="linear";var f=new Fr(h);return K8(f).drColorMappingBy=c,f}}}function JA(r,e){var t=r.get(e);return _e(t)&&t.length?{name:e,range:t}:null}function g0e(r,e,t,n,i,a){var o=pe({},e);if(i){var s=i.type,l=s==="color"&&K8(i).drColorMappingBy,u=l==="index"?n:l==="id"?a.mapIdToIndex(t.getId()):t.getValue(r.get("visualDimension"));o[s]=i.mapValueToVisual(u)}return o}var ag=Math.max,L_=Math.min,rO=Mr,lE=k,Q8=["itemStyle","borderWidth"],m0e=["itemStyle","gapWidth"],y0e=["upperLabel","show"],_0e=["upperLabel","height"];const x0e={seriesType:"treemap",reset:function(r,e,t,n){var i=t.getWidth(),a=t.getHeight(),o=r.option,s=dr(r.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),l=o.size||[],u=Pe(rO(s.width,l[0]),i),c=Pe(rO(s.height,l[1]),a),h=n&&n.type,f=["treemapZoomToNode","treemapRootToNode"],d=rg(n,f,r),p=h==="treemapRender"||h==="treemapMove"?n.rootRect:null,g=r.getViewRoot(),v=X8(g);if(h!=="treemapMove"){var m=h==="treemapZoomToNode"?M0e(r,d,g,u,c):p?[p.width,p.height]:[u,c],y=o.sort;y&&y!=="asc"&&y!=="desc"&&(y="desc");var _={squareRatio:o.squareRatio,sort:y,leafDepth:o.leafDepth};g.hostTree.clearLayouts();var x={x:0,y:0,width:m[0],height:m[1],area:m[0]*m[1]};g.setLayout(x),J8(g,_,!1,0),x=g.getLayout(),lE(v,function(A,w){var M=(v[w+1]||g).getValue();A.setLayout(pe({dataExtent:[M,M],borderWidth:0,upperHeight:0},x))})}var S=r.getData().tree.root;S.setLayout(C0e(s,p,d),!0),r.setLayoutInfo(s),e6(S,new dt(-s.x,-s.y,i,a),v,g,0)}};function J8(r,e,t,n){var i,a;if(!r.isRemoved()){var o=r.getLayout();i=o.width,a=o.height;var s=r.getModel(),l=s.get(Q8),u=s.get(m0e)/2,c=t6(s),h=Math.max(l,c),f=l-u,d=h-u;r.setLayout({borderWidth:l,upperHeight:h,upperLabelHeight:c},!0),i=ag(i-2*f,0),a=ag(a-f-d,0);var p=i*a,g=S0e(r,s,p,e,t,n);if(g.length){var v={x:f,y:d,width:i,height:a},m=L_(i,a),y=1/0,_=[];_.area=0;for(var x=0,S=g.length;x<S;){var A=g[x];_.push(A),_.area+=A.getLayout().area;var w=T0e(_,m,e.squareRatio);w<=y?(x++,y=w):(_.area-=_.pop().getLayout().area,iO(_,m,v,u,!1),m=L_(v.width,v.height),_.length=_.area=0,y=1/0)}if(_.length&&iO(_,m,v,u,!0),!t){var M=s.get("childrenVisibleMin");M!=null&&p<M&&(t=!0)}for(var x=0,S=g.length;x<S;x++)J8(g[x],e,t,n+1)}}}function S0e(r,e,t,n,i,a){var o=r.children||[],s=n.sort;s!=="asc"&&s!=="desc"&&(s=null);var l=n.leafDepth!=null&&n.leafDepth<=a;if(i&&!l)return r.viewChildren=[];o=jt(o,function(d){return!d.isRemoved()}),w0e(o,s);var u=b0e(e,o,s);if(u.sum===0)return r.viewChildren=[];if(u.sum=A0e(e,t,u.sum,s,o),u.sum===0)return r.viewChildren=[];for(var c=0,h=o.length;c<h;c++){var f=o[c].getValue()/u.sum*t;o[c].setLayout({area:f})}return l&&(o.length&&r.setLayout({isLeafRoot:!0},!0),o.length=0),r.viewChildren=o,r.setLayout({dataExtent:u.dataExtent},!0),o}function A0e(r,e,t,n,i){if(!n)return t;for(var a=r.get("visibleMin"),o=i.length,s=o,l=o-1;l>=0;l--){var u=i[n==="asc"?o-l-1:l].getValue();u/t*e<a&&(s=l,t-=u)}return n==="asc"?i.splice(0,o-s):i.splice(s,o-s),t}function w0e(r,e){return e&&r.sort(function(t,n){var i=e==="asc"?t.getValue()-n.getValue():n.getValue()-t.getValue();return i===0?e==="asc"?t.dataIndex-n.dataIndex:n.dataIndex-t.dataIndex:i}),r}function b0e(r,e,t){for(var n=0,i=0,a=e.length;i<a;i++)n+=e[i].getValue();var o=r.get("visualDimension"),s;return!e||!e.length?s=[NaN,NaN]:o==="value"&&t?(s=[e[e.length-1].getValue(),e[0].getValue()],t==="asc"&&s.reverse()):(s=[1/0,-1/0],lE(e,function(l){var u=l.getValue(o);u<s[0]&&(s[0]=u),u>s[1]&&(s[1]=u)})),{sum:n,dataExtent:s}}function T0e(r,e,t){for(var n=0,i=1/0,a=0,o=void 0,s=r.length;a<s;a++)o=r[a].getLayout().area,o&&(o<i&&(i=o),o>n&&(n=o));var l=r.area*r.area,u=e*e*t;return l?ag(u*n/l,l/(u*i)):1/0}function iO(r,e,t,n,i){var a=e===t.width?0:1,o=1-a,s=["x","y"],l=["width","height"],u=t[s[a]],c=e?r.area/e:0;(i||c>t[l[o]])&&(c=t[l[o]]);for(var h=0,f=r.length;h<f;h++){var d=r[h],p={},g=c?d.getLayout().area/c:0,v=p[l[o]]=ag(c-2*n,0),m=t[s[a]]+t[l[a]]-u,y=h===f-1||m<g?m:g,_=p[l[a]]=ag(y-2*n,0);p[s[o]]=t[s[o]]+L_(n,v/2),p[s[a]]=u+L_(n,_/2),u+=y,d.setLayout(p,!0)}t[s[o]]+=c,t[l[o]]-=c}function M0e(r,e,t,n,i){var a=(e||{}).node,o=[n,i];if(!a||a===t)return o;for(var s,l=n*i,u=l*r.option.zoomToNodeRatio;s=a.parentNode;){for(var c=0,h=s.children,f=0,d=h.length;f<d;f++)c+=h[f].getValue();var p=a.getValue();if(p===0)return o;u*=c/p;var g=s.getModel(),v=g.get(Q8),m=Math.max(v,t6(g));u+=4*v*v+(3*v+m)*Math.pow(u,.5),u>gI&&(u=gI),a=s}u<l&&(u=l);var y=Math.pow(u/l,.5);return[n*y,i*y]}function C0e(r,e,t){if(e)return{x:e.x,y:e.y};var n={x:0,y:0};if(!t)return n;var i=t.node,a=i.getLayout();if(!a)return n;for(var o=[a.width/2,a.height/2],s=i;s;){var l=s.getLayout();o[0]+=l.x,o[1]+=l.y,s=s.parentNode}return{x:r.width/2-o[0],y:r.height/2-o[1]}}function e6(r,e,t,n,i){var a=r.getLayout(),o=t[i],s=o&&o===r;if(!(o&&!s||i===t.length&&r!==n)){r.setLayout({isInView:!0,invisible:!s&&!e.intersect(a),isAboveViewRoot:s},!0);var l=new dt(e.x-a.x,e.y-a.y,e.width,e.height);lE(r.viewChildren||[],function(u){e6(u,l,t,n,i+1)})}}function t6(r){return r.get(y0e)?r.get(_0e):0}function E0e(r){r.registerSeriesModel(Xye),r.registerChartView(o0e),r.registerVisual(f0e),r.registerLayout(x0e),Hye(r)}function L0e(r){var e=r.findComponents({mainType:"legend"});!e||!e.length||r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),i=t.getGraph(),a=i.data,o=n.mapArray(n.getName);a.filterSelf(function(s){var l=a.getItemModel(s),u=l.getShallow("category");if(u!=null){Ft(u)&&(u=o[u]);for(var c=0;c<e.length;c++)if(!e[c].isSelected(u))return!1}return!0})})}function P0e(r){var e={};r.eachSeriesByType("graph",function(t){var n=t.getCategoriesData(),i=t.getData(),a={};n.each(function(o){var s=n.getName(o);a["ec-"+s]=o;var l=n.getItemModel(o),u=l.getModel("itemStyle").getItemStyle();u.fill||(u.fill=t.getColorFromPalette(s,e)),n.setItemVisual(o,"style",u);for(var c=["symbol","symbolSize","symbolKeepAspect"],h=0;h<c.length;h++){var f=l.getShallow(c[h],!0);f!=null&&n.setItemVisual(o,c[h],f)}}),n.count()&&i.each(function(o){var s=i.getItemModel(o),l=s.getShallow("category");if(l!=null){ke(l)&&(l=a["ec-"+l]);var u=n.getItemVisual(l,"style"),c=i.ensureUniqueItemVisual(o,"style");pe(c,u);for(var h=["symbol","symbolSize","symbolKeepAspect"],f=0;f<h.length;f++)i.setItemVisual(o,h[f],n.getItemVisual(l,h[f]))}})})}function My(r){return r instanceof Array||(r=[r,r]),r}function R0e(r){r.eachSeriesByType("graph",function(e){var t=e.getGraph(),n=e.getEdgeData(),i=My(e.get("edgeSymbol")),a=My(e.get("edgeSymbolSize"));n.setVisual("fromSymbol",i&&i[0]),n.setVisual("toSymbol",i&&i[1]),n.setVisual("fromSymbolSize",a&&a[0]),n.setVisual("toSymbolSize",a&&a[1]),n.setVisual("style",e.getModel("lineStyle").getLineStyle()),n.each(function(o){var s=n.getItemModel(o),l=t.getEdgeByIndex(o),u=My(s.getShallow("symbol",!0)),c=My(s.getShallow("symbolSize",!0)),h=s.getModel("lineStyle").getLineStyle(),f=n.ensureUniqueItemVisual(o,"style");switch(pe(f,h),f.stroke){case"source":{var d=l.node1.getVisual("style");f.stroke=d&&d.fill;break}case"target":{var d=l.node2.getVisual("style");f.stroke=d&&d.fill;break}}u[0]&&l.setVisual("fromSymbol",u[0]),u[1]&&l.setVisual("toSymbol",u[1]),c[0]&&l.setVisual("fromSymbolSize",c[0]),c[1]&&l.setVisual("toSymbolSize",c[1])})})}var aM="-->",K1=function(r){return r.get("autoCurveness")||null},n6=function(r,e){var t=K1(r),n=20,i=[];if(Ft(t))n=t;else if(_e(t)){r.__curvenessList=t;return}e>n&&(n=e);var a=n%2?n+2:n+3;i=[];for(var o=0;o<a;o++)i.push((o%2?o+1:o)/10*(o%2?-1:1));r.__curvenessList=i},og=function(r,e,t){var n=[r.id,r.dataIndex].join("."),i=[e.id,e.dataIndex].join(".");return[t.uid,n,i].join(aM)},r6=function(r){var e=r.split(aM);return[e[0],e[2],e[1]].join(aM)},D0e=function(r,e){var t=og(r.node1,r.node2,e);return e.__edgeMap[t]},I0e=function(r,e){var t=oM(og(r.node1,r.node2,e),e),n=oM(og(r.node2,r.node1,e),e);return t+n},oM=function(r,e){var t=e.__edgeMap;return t[r]?t[r].length:0};function N0e(r){K1(r)&&(r.__curvenessList=[],r.__edgeMap={},n6(r))}function k0e(r,e,t,n){if(K1(t)){var i=og(r,e,t),a=t.__edgeMap,o=a[r6(i)];a[i]&&!o?a[i].isForward=!0:o&&a[i]&&(o.isForward=!0,a[i].isForward=!1),a[i]=a[i]||[],a[i].push(n)}}function uE(r,e,t,n){var i=K1(e),a=_e(i);if(!i)return null;var o=D0e(r,e);if(!o)return null;for(var s=-1,l=0;l<o.length;l++)if(o[l]===t){s=l;break}var u=I0e(r,e);n6(e,u),r.lineStyle=r.lineStyle||{};var c=og(r.node1,r.node2,e),h=e.__curvenessList,f=a||u%2?0:1;if(o.isForward)return h[f+s];var d=r6(c),p=oM(d,e),g=h[s+p+f];return n?a?i&&i[0]===0?(p+f)%2?g:-g:((p%2?0:1)+f)%2?g:-g:(p+f)%2?g:-g:h[s+p+f]}function i6(r){var e=r.coordinateSystem;if(!(e&&e.type!=="view")){var t=r.getGraph();t.eachNode(function(n){var i=n.getModel();n.setLayout([+i.get("x"),+i.get("y")])}),cE(t,r)}}function cE(r,e){r.eachEdge(function(t,n){var i=Go(t.getModel().get(["lineStyle","curveness"]),-uE(t,e,n,!0),0),a=Ss(t.node1.getLayout()),o=Ss(t.node2.getLayout()),s=[a,o];+i&&s.push([(a[0]+o[0])/2-(a[1]-o[1])*i,(a[1]+o[1])/2-(o[0]-a[0])*i]),t.setLayout(s)})}function O0e(r,e){r.eachSeriesByType("graph",function(t){var n=t.get("layout"),i=t.coordinateSystem;if(i&&i.type!=="view"){var a=t.getData(),o=[];k(i.dimensions,function(f){o=o.concat(a.mapDimensionsAll(f))});for(var s=0;s<a.count();s++){for(var l=[],u=!1,c=0;c<o.length;c++){var h=a.get(o[c],s);isNaN(h)||(u=!0),l.push(h)}u?a.setItemLayout(s,i.dataToPoint(l)):a.setItemLayout(s,[NaN,NaN])}cE(a.graph,t)}else(!n||n==="none")&&i6(t)})}function zp(r){var e=r.coordinateSystem;if(e.type!=="view")return 1;var t=r.option.nodeScaleRatio,n=e.scaleX,i=e.getZoom(),a=(i-1)*t+1;return a/n}function Up(r){var e=r.getVisual("symbolSize");return e instanceof Array&&(e=(e[0]+e[1])/2),+e}var aO=Math.PI,ew=[];function hE(r,e,t,n){var i=r.coordinateSystem;if(!(i&&i.type!=="view")){var a=i.getBoundingRect(),o=r.getData(),s=o.graph,l=a.width/2+a.x,u=a.height/2+a.y,c=Math.min(a.width,a.height)/2,h=o.count();if(o.setLayout({cx:l,cy:u}),!!h){if(t){var f=i.pointToData(n),d=f[0],p=f[1],g=[d-l,p-u];pd(g,g),Qy(g,g,c),t.setLayout([l+g[0],u+g[1]],!0);var v=r.get(["circular","rotateLabel"]);a6(t,v,l,u)}F0e[e](r,s,o,c,l,u,h),s.eachEdge(function(m,y){var _=Go(m.getModel().get(["lineStyle","curveness"]),uE(m,r,y),0),x=Ss(m.node1.getLayout()),S=Ss(m.node2.getLayout()),A,w=(x[0]+S[0])/2,M=(x[1]+S[1])/2;+_&&(_*=3,A=[l*_+w*(1-_),u*_+M*(1-_)]),m.setLayout([x,S,A])})}}}var F0e={value:function(r,e,t,n,i,a,o){var s=0,l=t.getSum("value"),u=Math.PI*2/(l||o);e.eachNode(function(c){var h=c.getValue("value"),f=u*(l?h:1)/2;s+=f,c.setLayout([n*Math.cos(s)+i,n*Math.sin(s)+a]),s+=f})},symbolSize:function(r,e,t,n,i,a,o){var s=0;ew.length=o;var l=zp(r);e.eachNode(function(h){var f=Up(h);isNaN(f)&&(f=2),f<0&&(f=0),f*=l;var d=Math.asin(f/2/n);isNaN(d)&&(d=aO/2),ew[h.dataIndex]=d,s+=d*2});var u=(2*aO-s)/o/2,c=0;e.eachNode(function(h){var f=u+ew[h.dataIndex];c+=f,(!h.getLayout()||!h.getLayout().fixed)&&h.setLayout([n*Math.cos(c)+i,n*Math.sin(c)+a]),c+=f})}};function a6(r,e,t,n){var i=r.getGraphicEl();if(i){var a=r.getModel(),o=a.get(["label","rotate"])||0,s=i.getSymbolPath();if(e){var l=r.getLayout(),u=Math.atan2(l[1]-n,l[0]-t);u<0&&(u=Math.PI*2+u);var c=l[0]<t;c&&(u=u-Math.PI);var h=c?"left":"right";s.setTextConfig({rotation:-u,position:h,origin:"center"});var f=s.ensureState("emphasis");pe(f.textConfig||(f.textConfig={}),{position:h})}else s.setTextConfig({rotation:o*=Math.PI/180})}}function B0e(r){r.eachSeriesByType("graph",function(e){e.get("layout")==="circular"&&hE(e,"symbolSize")})}var Wh=Xb;function z0e(r,e,t){for(var n=r,i=e,a=t.rect,o=a.width,s=a.height,l=[a.x+o/2,a.y+s/2],u=t.gravity==null?.1:t.gravity,c=0;c<n.length;c++){var h=n[c];h.p||(h.p=qc(o*(Math.random()-.5)+l[0],s*(Math.random()-.5)+l[1])),h.pp=Ss(h.p),h.edges=null}var f=t.friction==null?.6:t.friction,d=f,p,g;return{warmUp:function(){d=f*.8},setFixed:function(v){n[v].fixed=!0},setUnfixed:function(v){n[v].fixed=!1},beforeStep:function(v){p=v},afterStep:function(v){g=v},step:function(v){p&&p(n,i);for(var m=[],y=n.length,_=0;_<i.length;_++){var x=i[_];if(!x.ignoreForceLayout){var S=x.n1,A=x.n2;ic(m,A.p,S.p);var w=Yb(m)-x.d,M=A.w/(S.w+A.w);isNaN(M)&&(M=0),pd(m,m),!S.fixed&&Wh(S.p,S.p,m,M*w*d),!A.fixed&&Wh(A.p,A.p,m,-(1-M)*w*d)}}for(var _=0;_<y;_++){var C=n[_];C.fixed||(ic(m,l,C.p),Wh(C.p,C.p,m,u*d))}for(var _=0;_<y;_++)for(var S=n[_],b=_+1;b<y;b++){var A=n[b];ic(m,A.p,S.p);var w=Yb(m);w===0&&($ae(m,Math.random()-.5,Math.random()-.5),w=1);var T=(S.rep+A.rep)/w/w;!S.fixed&&Wh(S.pp,S.pp,m,T),!A.fixed&&Wh(A.pp,A.pp,m,-T)}for(var P=[],_=0;_<y;_++){var C=n[_];C.fixed||(ic(P,C.p,C.pp),Wh(C.p,C.p,P,d),hi(C.pp,C.p))}d=d*.992;var D=d<.01;g&&g(n,i,D),v&&v(D)}}}function U0e(r){r.eachSeriesByType("graph",function(e){var t=e.coordinateSystem;if(!(t&&t.type!=="view"))if(e.get("layout")==="force"){var n=e.preservedPoints||{},i=e.getGraph(),a=i.data,o=i.edgeData,s=e.getModel("force"),l=s.get("initLayout");e.preservedPoints?a.each(function(_){var x=a.getId(_);a.setItemLayout(_,n[x]||[NaN,NaN])}):!l||l==="none"?i6(e):l==="circular"&&hE(e,"value");var u=a.getDataExtent("value"),c=o.getDataExtent("value"),h=s.get("repulsion"),f=s.get("edgeLength"),d=_e(h)?h:[h,h],p=_e(f)?f:[f,f];p=[p[1],p[0]];var g=a.mapArray("value",function(_,x){var S=a.getItemLayout(x),A=Kt(_,u,d);return isNaN(A)&&(A=(d[0]+d[1])/2),{w:A,rep:A,fixed:a.getItemModel(x).get("fixed"),p:!S||isNaN(S[0])||isNaN(S[1])?null:S}}),v=o.mapArray("value",function(_,x){var S=i.getEdgeByIndex(x),A=Kt(_,c,p);isNaN(A)&&(A=(p[0]+p[1])/2);var w=S.getModel(),M=Go(S.getModel().get(["lineStyle","curveness"]),-uE(S,e,x,!0),0);return{n1:g[S.node1.dataIndex],n2:g[S.node2.dataIndex],d:A,curveness:M,ignoreForceLayout:w.get("ignoreForceLayout")}}),m=t.getBoundingRect(),y=z0e(g,v,{rect:m,gravity:s.get("gravity"),friction:s.get("friction")});y.beforeStep(function(_,x){for(var S=0,A=_.length;S<A;S++)_[S].fixed&&hi(_[S].p,i.getNodeByIndex(S).getLayout())}),y.afterStep(function(_,x,S){for(var A=0,w=_.length;A<w;A++)_[A].fixed||i.getNodeByIndex(A).setLayout(_[A].p),n[a.getId(A)]=_[A].p;for(var A=0,w=x.length;A<w;A++){var M=x[A],C=i.getEdgeByIndex(A),b=M.n1.p,T=M.n2.p,P=C.getLayout();P=P?P.slice():[],P[0]=P[0]||[],P[1]=P[1]||[],hi(P[0],b),hi(P[1],T),+M.curveness&&(P[2]=[(b[0]+T[0])/2-(b[1]-T[1])*M.curveness,(b[1]+T[1])/2-(T[0]-b[0])*M.curveness]),C.setLayout(P)}}),e.forceLayout=y,e.preservedPoints=n,y.step()}else e.forceLayout=null})}function V0e(r,e,t){var n=pe(r.getBoxLayoutParams(),{aspect:t});return dr(n,{width:e.getWidth(),height:e.getHeight()})}function G0e(r,e){var t=[];return r.eachSeriesByType("graph",function(n){var i=n.get("coordinateSystem");if(!i||i==="view"){var a=n.getData(),o=a.mapArray(function(v){var m=a.getItemModel(v);return[+m.get("x"),+m.get("y")]}),s=[],l=[];A1(o,s,l),l[0]-s[0]===0&&(l[0]+=1,s[0]-=1),l[1]-s[1]===0&&(l[1]+=1,s[1]-=1);var u=(l[0]-s[0])/(l[1]-s[1]),c=V0e(n,e,u);isNaN(u)&&(s=[c.x,c.y],l=[c.x+c.width,c.y+c.height]);var h=l[0]-s[0],f=l[1]-s[1],d=c.width,p=c.height,g=n.coordinateSystem=new zg;g.zoomLimit=n.get("scaleLimit"),g.setBoundingRect(s[0],s[1],h,f),g.setViewRect(c.x,c.y,d,p),g.setCenter(n.get("center"),e),g.setZoom(n.get("zoom")),t.push(g)}}),t}var oO=Cr.prototype,tw=M1.prototype,o6=function(){function r(){this.x1=0,this.y1=0,this.x2=0,this.y2=0,this.percent=1}return r}();(function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e})(o6);function nw(r){return isNaN(+r.cpx1)||isNaN(+r.cpy1)}var H0e=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="ec-line",n}return e.prototype.getDefaultStyle=function(){return{stroke:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new o6},e.prototype.buildPath=function(t,n){nw(n)?oO.buildPath.call(this,t,n):tw.buildPath.call(this,t,n)},e.prototype.pointAt=function(t){return nw(this.shape)?oO.pointAt.call(this,t):tw.pointAt.call(this,t)},e.prototype.tangentAt=function(t){var n=this.shape,i=nw(n)?[n.x2-n.x1,n.y2-n.y1]:tw.tangentAt.call(this,t);return pd(i,i)},e}(yt);const W0e=H0e;var rw=["fromSymbol","toSymbol"];function sO(r){return"_"+r+"Type"}function lO(r,e,t){var n=e.getItemVisual(t,r);if(!n||n==="none")return n;var i=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Cd(i),u=Jc(o||0,l);return n+l+u+(a||"")+(s||"")}function uO(r,e,t){var n=e.getItemVisual(t,r);if(!(!n||n==="none")){var i=e.getItemVisual(t,r+"Size"),a=e.getItemVisual(t,r+"Rotate"),o=e.getItemVisual(t,r+"Offset"),s=e.getItemVisual(t,r+"KeepAspect"),l=Cd(i),u=Jc(o||0,l),c=rr(n,-l[0]/2+u[0],-l[1]/2+u[1],l[0],l[1],null,s);return c.__specifiedRotation=a==null||isNaN(a)?void 0:+a*Math.PI/180||0,c.name=r,c}}function $0e(r){var e=new W0e({name:"line",subPixelOptimize:!0});return sM(e.shape,r),e}function sM(r,e){r.x1=e[0][0],r.y1=e[0][1],r.x2=e[1][0],r.y2=e[1][1],r.percent=1;var t=e[2];t?(r.cpx1=t[0],r.cpy1=t[1]):(r.cpx1=NaN,r.cpy1=NaN)}var X0e=function(r){ae(e,r);function e(t,n,i){var a=r.call(this)||this;return a._createLine(t,n,i),a}return e.prototype._createLine=function(t,n,i){var a=t.hostModel,o=t.getItemLayout(n),s=$0e(o);s.shape.percent=0,Tn(s,{shape:{percent:1}},a,n),this.add(s),k(rw,function(l){var u=uO(l,t,n);this.add(u),this[sO(l)]=lO(l,t,n)},this),this._updateCommonStl(t,n,i)},e.prototype.updateData=function(t,n,i){var a=t.hostModel,o=this.childOfName("line"),s=t.getItemLayout(n),l={shape:{}};sM(l.shape,s),zt(o,l,a,n),k(rw,function(u){var c=lO(u,t,n),h=sO(u);if(this[h]!==c){this.remove(this.childOfName(u));var f=uO(u,t,n);this.add(f)}this[h]=c},this),this._updateCommonStl(t,n,i)},e.prototype.getLinePath=function(){return this.childAt(0)},e.prototype._updateCommonStl=function(t,n,i){var a=t.hostModel,o=this.childOfName("line"),s=i&&i.emphasisLineStyle,l=i&&i.blurLineStyle,u=i&&i.selectLineStyle,c=i&&i.labelStatesModels,h=i&&i.emphasisDisabled,f=i&&i.focus,d=i&&i.blurScope;if(!i||t.hasItemOption){var p=t.getItemModel(n),g=p.getModel("emphasis");s=g.getModel("lineStyle").getLineStyle(),l=p.getModel(["blur","lineStyle"]).getLineStyle(),u=p.getModel(["select","lineStyle"]).getLineStyle(),h=g.get("disabled"),f=g.get("focus"),d=g.get("blurScope"),c=Sr(p)}var v=t.getItemVisual(n,"style"),m=v.stroke;o.useStyle(v),o.style.fill=null,o.style.strokeNoScale=!0,o.ensureState("emphasis").style=s,o.ensureState("blur").style=l,o.ensureState("select").style=u,k(rw,function(A){var w=this.childOfName(A);if(w){w.setColor(m),w.style.opacity=v.opacity;for(var M=0;M<mi.length;M++){var C=mi[M],b=o.getState(C);if(b){var T=b.style||{},P=w.ensureState(C),D=P.style||(P.style={});T.stroke!=null&&(D[w.__isEmptyBrush?"stroke":"fill"]=T.stroke),T.opacity!=null&&(D.opacity=T.opacity)}}w.markRedraw()}},this);var y=a.getRawValue(n);zr(this,c,{labelDataIndex:n,labelFetcher:{getFormattedLabel:function(A,w){return a.getFormattedLabel(A,w,t.dataType)}},inheritColor:m||"#000",defaultOpacity:v.opacity,defaultText:(y==null?t.getName(n):isFinite(y)?Vn(y):y)+""});var _=this.getTextContent();if(_){var x=c.normal;_.__align=_.style.align,_.__verticalAlign=_.style.verticalAlign,_.__position=x.get("position")||"middle";var S=x.get("distance");_e(S)||(S=[S,S]),_.__labelDistance=S}this.setTextConfig({position:null,local:!0,inside:!1}),Rn(this,f,d,h)},e.prototype.highlight=function(){Ds(this)},e.prototype.downplay=function(){Is(this)},e.prototype.updateLayout=function(t,n){this.setLinePoints(t.getItemLayout(n))},e.prototype.setLinePoints=function(t){var n=this.childOfName("line");sM(n.shape,t),n.dirty()},e.prototype.beforeUpdate=function(){var t=this,n=t.childOfName("fromSymbol"),i=t.childOfName("toSymbol"),a=t.getTextContent();if(!n&&!i&&(!a||a.ignore))return;for(var o=1,s=this.parent;s;)s.scaleX&&(o/=s.scaleX),s=s.parent;var l=t.childOfName("line");if(!this.__dirty&&!l.__dirty)return;var u=l.shape.percent,c=l.pointAt(0),h=l.pointAt(u),f=ic([],h,c);pd(f,f);function d(b,T){var P=b.__specifiedRotation;if(P==null){var D=l.tangentAt(T);b.attr("rotation",(T===1?-1:1)*Math.PI/2-Math.atan2(D[1],D[0]))}else b.attr("rotation",P)}if(n&&(n.setPosition(c),d(n,0),n.scaleX=n.scaleY=o*u,n.markRedraw()),i&&(i.setPosition(h),d(i,1),i.scaleX=i.scaleY=o*u,i.markRedraw()),a&&!a.ignore){a.x=a.y=0,a.originX=a.originY=0;var p=void 0,g=void 0,v=a.__labelDistance,m=v[0]*o,y=v[1]*o,_=u/2,x=l.tangentAt(_),S=[x[1],-x[0]],A=l.pointAt(_);S[1]>0&&(S[0]=-S[0],S[1]=-S[1]);var w=x[0]<0?-1:1;if(a.__position!=="start"&&a.__position!=="end"){var M=-Math.atan2(x[1],x[0]);h[0]<c[0]&&(M=Math.PI+M),a.rotation=M}var C=void 0;switch(a.__position){case"insideStartTop":case"insideMiddleTop":case"insideEndTop":case"middle":C=-y,g="bottom";break;case"insideStartBottom":case"insideMiddleBottom":case"insideEndBottom":C=y,g="top";break;default:C=0,g="middle"}switch(a.__position){case"end":a.x=f[0]*m+h[0],a.y=f[1]*y+h[1],p=f[0]>.8?"left":f[0]<-.8?"right":"center",g=f[1]>.8?"top":f[1]<-.8?"bottom":"middle";break;case"start":a.x=-f[0]*m+c[0],a.y=-f[1]*y+c[1],p=f[0]>.8?"right":f[0]<-.8?"left":"center",g=f[1]>.8?"bottom":f[1]<-.8?"top":"middle";break;case"insideStartTop":case"insideStart":case"insideStartBottom":a.x=m*w+c[0],a.y=c[1]+C,p=x[0]<0?"right":"left",a.originX=-m*w,a.originY=-C;break;case"insideMiddleTop":case"insideMiddle":case"insideMiddleBottom":case"middle":a.x=A[0],a.y=A[1]+C,p="center",a.originY=-C;break;case"insideEndTop":case"insideEnd":case"insideEndBottom":a.x=-m*w+h[0],a.y=h[1]+C,p=x[0]>=0?"right":"left",a.originX=m*w,a.originY=-C;break}a.scaleX=a.scaleY=o,a.setStyle({verticalAlign:a.__verticalAlign||g,align:a.__align||p})}},e}(rt);const fE=X0e;var Y0e=function(){function r(e){this.group=new rt,this._LineCtor=e||fE}return r.prototype.updateData=function(e){var t=this;this._progressiveEls=null;var n=this,i=n.group,a=n._lineData;n._lineData=e,a||i.removeAll();var o=cO(e);e.diff(a).add(function(s){t._doAdd(e,s,o)}).update(function(s,l){t._doUpdate(a,e,l,s,o)}).remove(function(s){i.remove(a.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=cO(e),this._lineData=null,this.group.removeAll()},r.prototype.incrementalUpdate=function(e,t){this._progressiveEls=[];function n(s){!s.isGroup&&!q0e(s)&&(s.incremental=!0,s.ensureState("emphasis").hoverLayer=!0)}for(var i=e.start;i<e.end;i++){var a=t.getItemLayout(i);if(iw(a)){var o=new this._LineCtor(t,i,this._seriesScope);o.traverse(n),this.group.add(o),t.setItemGraphicEl(i,o),this._progressiveEls.push(o)}}},r.prototype.remove=function(){this.group.removeAll()},r.prototype.eachRendered=function(e){ou(this._progressiveEls||this.group,e)},r.prototype._doAdd=function(e,t,n){var i=e.getItemLayout(t);if(iw(i)){var a=new this._LineCtor(e,t,n);e.setItemGraphicEl(t,a),this.group.add(a)}},r.prototype._doUpdate=function(e,t,n,i,a){var o=e.getItemGraphicEl(n);if(!iw(t.getItemLayout(i))){this.group.remove(o);return}o?o.updateData(t,i,a):o=new this._LineCtor(t,i,a),t.setItemGraphicEl(i,o),this.group.add(o)},r}();function q0e(r){return r.animators&&r.animators.length>0}function cO(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:Sr(e)}}function hO(r){return isNaN(r[0])||isNaN(r[1])}function iw(r){return r&&!hO(r[0])&&!hO(r[1])}const dE=Y0e;var aw=[],ow=[],sw=[],$h=Tr,lw=bc,fO=Math.abs;function dO(r,e,t){for(var n=r[0],i=r[1],a=r[2],o=1/0,s,l=t*t,u=.1,c=.1;c<=.9;c+=.1){aw[0]=$h(n[0],i[0],a[0],c),aw[1]=$h(n[1],i[1],a[1],c);var h=fO(lw(aw,e)-l);h<o&&(o=h,s=c)}for(var f=0;f<32;f++){var d=s+u;ow[0]=$h(n[0],i[0],a[0],s),ow[1]=$h(n[1],i[1],a[1],s),sw[0]=$h(n[0],i[0],a[0],d),sw[1]=$h(n[1],i[1],a[1],d);var h=lw(ow,e)-l;if(fO(h)<.01)break;var p=lw(sw,e)-l;u/=2,h<0?p>=0?s=s+u:s=s-u:p>=0?s=s-u:s=s+u}return s}function uw(r,e){var t=[],n=Bv,i=[[],[],[]],a=[[],[]],o=[];e/=2,r.eachEdge(function(s,l){var u=s.getLayout(),c=s.getVisual("fromSymbol"),h=s.getVisual("toSymbol");u.__original||(u.__original=[Ss(u[0]),Ss(u[1])],u[2]&&u.__original.push(Ss(u[2])));var f=u.__original;if(u[2]!=null){if(hi(i[0],f[0]),hi(i[1],f[2]),hi(i[2],f[1]),c&&c!=="none"){var d=Up(s.node1),p=dO(i,f[0],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[0][0]=t[3],i[1][0]=t[4],n(i[0][1],i[1][1],i[2][1],p,t),i[0][1]=t[3],i[1][1]=t[4]}if(h&&h!=="none"){var d=Up(s.node2),p=dO(i,f[1],d*e);n(i[0][0],i[1][0],i[2][0],p,t),i[1][0]=t[1],i[2][0]=t[2],n(i[0][1],i[1][1],i[2][1],p,t),i[1][1]=t[1],i[2][1]=t[2]}hi(u[0],i[0]),hi(u[1],i[2]),hi(u[2],i[1])}else{if(hi(a[0],f[0]),hi(a[1],f[1]),ic(o,a[1],a[0]),pd(o,o),c&&c!=="none"){var d=Up(s.node1);Xb(a[0],a[0],o,d*e)}if(h&&h!=="none"){var d=Up(s.node2);Xb(a[1],a[1],o,-d*e)}hi(u[0],a[0]),hi(u[1],a[1])}})}function pO(r){return r.type==="view"}var j0e=function(r){ae(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 i=new Ig,a=new dE,o=this.group;this._controller=new Bg(n.getZr()),this._controllerHost={target:o},o.add(i.group),o.add(a.group),this._symbolDraw=i,this._lineDraw=a,this._firstRender=!0},e.prototype.render=function(t,n,i){var a=this,o=t.coordinateSystem;this._model=t;var s=this._symbolDraw,l=this._lineDraw,u=this.group;if(pO(o)){var c={x:o.x,y:o.y,scaleX:o.scaleX,scaleY:o.scaleY};this._firstRender?u.attr(c):zt(u,c,t)}uw(t.getGraph(),zp(t));var h=t.getData();s.updateData(h);var f=t.getEdgeData();l.updateData(f),this._updateNodeAndLinkScale(),this._updateController(t,n,i),clearTimeout(this._layoutTimeout);var d=t.forceLayout,p=t.get(["force","layoutAnimation"]);d&&this._startForceLayoutIteration(d,p);var g=t.get("layout");h.graph.eachNode(function(_){var x=_.dataIndex,S=_.getGraphicEl(),A=_.getModel();if(S){S.off("drag").off("dragend");var w=A.get("draggable");w&&S.on("drag",function(C){switch(g){case"force":d.warmUp(),!a._layouting&&a._startForceLayoutIteration(d,p),d.setFixed(x),h.setItemLayout(x,[S.x,S.y]);break;case"circular":h.setItemLayout(x,[S.x,S.y]),_.setLayout({fixed:!0},!0),hE(t,"symbolSize",_,[C.offsetX,C.offsetY]),a.updateLayout(t);break;case"none":default:h.setItemLayout(x,[S.x,S.y]),cE(t.getGraph(),t),a.updateLayout(t);break}}).on("dragend",function(){d&&d.setUnfixed(x)}),S.setDraggable(w,!!A.get("cursor"));var M=A.get(["emphasis","focus"]);M==="adjacency"&&(at(S).focus=_.getAdjacentDataIndices())}}),h.graph.eachEdge(function(_){var x=_.getGraphicEl(),S=_.getModel().get(["emphasis","focus"]);x&&S==="adjacency"&&(at(x).focus={edge:[_.dataIndex],node:[_.node1.dataIndex,_.node2.dataIndex]})});var v=t.get("layout")==="circular"&&t.get(["circular","rotateLabel"]),m=h.getLayout("cx"),y=h.getLayout("cy");h.graph.eachNode(function(_){a6(_,v,m,y)}),this._firstRender=!1},e.prototype.dispose=function(){this.remove(),this._controller&&this._controller.dispose(),this._controllerHost=null},e.prototype._startForceLayoutIteration=function(t,n){var i=this;(function a(){t.step(function(o){i.updateLayout(i._model),(i._layouting=!o)&&(n?i._layoutTimeout=setTimeout(a,16):a())})})()},e.prototype._updateController=function(t,n,i){var a=this,o=this._controller,s=this._controllerHost,l=this.group;if(o.setPointerChecker(function(u,c,h){var f=l.getBoundingRect();return f.applyTransform(l.transform),f.contain(c,h)&&!Y1(u,i,t)}),!pO(t.coordinateSystem)){o.disable();return}o.enable(t.get("roam")),s.zoomLimit=t.get("scaleLimit"),s.zoom=t.coordinateSystem.getZoom(),o.off("pan").off("zoom").on("pan",function(u){eE(s,u.dx,u.dy),i.dispatchAction({seriesId:t.id,type:"graphRoam",dx:u.dx,dy:u.dy})}).on("zoom",function(u){tE(s,u.scale,u.originX,u.originY),i.dispatchAction({seriesId:t.id,type:"graphRoam",zoom:u.scale,originX:u.originX,originY:u.originY}),a._updateNodeAndLinkScale(),uw(t.getGraph(),zp(t)),a._lineDraw.updateLayout(),i.updateLabelLayout()})},e.prototype._updateNodeAndLinkScale=function(){var t=this._model,n=t.getData(),i=zp(t);n.eachItemGraphicEl(function(a,o){a&&a.setSymbolScale(i)})},e.prototype.updateLayout=function(t){uw(t.getGraph(),zp(t)),this._symbolDraw.updateLayout(),this._lineDraw.updateLayout()},e.prototype.remove=function(){clearTimeout(this._layoutTimeout),this._layouting=!1,this._layoutTimeout=null,this._symbolDraw&&this._symbolDraw.remove(),this._lineDraw&&this._lineDraw.remove()},e.type="graph",e}(gn);const K0e=j0e;function Xh(r){return"_EC_"+r}var Z0e=function(){function r(e){this.type="graph",this.nodes=[],this.edges=[],this._nodesMap={},this._edgesMap={},this._directed=e||!1}return r.prototype.isDirected=function(){return this._directed},r.prototype.addNode=function(e,t){e=e==null?""+t:""+e;var n=this._nodesMap;if(!n[Xh(e)]){var i=new qu(e,t);return i.hostGraph=this,this.nodes.push(i),n[Xh(e)]=i,i}},r.prototype.getNodeByIndex=function(e){var t=this.data.getRawIndex(e);return this.nodes[t]},r.prototype.getNodeById=function(e){return this._nodesMap[Xh(e)]},r.prototype.addEdge=function(e,t,n){var i=this._nodesMap,a=this._edgesMap;if(Ft(e)&&(e=this.nodes[e]),Ft(t)&&(t=this.nodes[t]),e instanceof qu||(e=i[Xh(e)]),t instanceof qu||(t=i[Xh(t)]),!(!e||!t)){var o=e.id+"-"+t.id,s=new s6(e,t,n);return s.hostGraph=this,this._directed&&(e.outEdges.push(s),t.inEdges.push(s)),e.edges.push(s),e!==t&&t.edges.push(s),this.edges.push(s),a[o]=s,s}},r.prototype.getEdgeByIndex=function(e){var t=this.edgeData.getRawIndex(e);return this.edges[t]},r.prototype.getEdge=function(e,t){e instanceof qu&&(e=e.id),t instanceof qu&&(t=t.id);var n=this._edgesMap;return this._directed?n[e+"-"+t]:n[e+"-"+t]||n[t+"-"+e]},r.prototype.eachNode=function(e,t){for(var n=this.nodes,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&e.call(t,n[a],a)},r.prototype.eachEdge=function(e,t){for(var n=this.edges,i=n.length,a=0;a<i;a++)n[a].dataIndex>=0&&n[a].node1.dataIndex>=0&&n[a].node2.dataIndex>=0&&e.call(t,n[a],a)},r.prototype.breadthFirstTraverse=function(e,t,n,i){if(t instanceof qu||(t=this._nodesMap[Xh(t)]),!!t){for(var a=n==="out"?"outEdges":n==="in"?"inEdges":"edges",o=0;o<this.nodes.length;o++)this.nodes[o].__visited=!1;if(!e.call(i,t,null))for(var s=[t];s.length;)for(var l=s.shift(),u=l[a],o=0;o<u.length;o++){var c=u[o],h=c.node1===l?c.node2:c.node1;if(!h.__visited){if(e.call(i,h,l))return;s.push(h),h.__visited=!0}}}},r.prototype.update=function(){for(var e=this.data,t=this.edgeData,n=this.nodes,i=this.edges,a=0,o=n.length;a<o;a++)n[a].dataIndex=-1;for(var a=0,o=e.count();a<o;a++)n[e.getRawIndex(a)].dataIndex=a;t.filterSelf(function(s){var l=i[t.getRawIndex(s)];return l.node1.dataIndex>=0&&l.node2.dataIndex>=0});for(var a=0,o=i.length;a<o;a++)i[a].dataIndex=-1;for(var a=0,o=t.count();a<o;a++)i[t.getRawIndex(a)].dataIndex=a},r.prototype.clone=function(){for(var e=new r(this._directed),t=this.nodes,n=this.edges,i=0;i<t.length;i++)e.addNode(t[i].id,t[i].dataIndex);for(var i=0;i<n.length;i++){var a=n[i];e.addEdge(a.node1.id,a.node2.id,a.dataIndex)}return e},r}(),qu=function(){function r(e,t){this.inEdges=[],this.outEdges=[],this.edges=[],this.dataIndex=-1,this.id=e==null?"":e,this.dataIndex=t==null?-1:t}return r.prototype.degree=function(){return this.edges.length},r.prototype.inDegree=function(){return this.inEdges.length},r.prototype.outDegree=function(){return this.outEdges.length},r.prototype.getModel=function(e){if(!(this.dataIndex<0)){var t=this.hostGraph,n=t.data.getItemModel(this.dataIndex);return n.getModel(e)}},r.prototype.getAdjacentDataIndices=function(){for(var e={edge:[],node:[]},t=0;t<this.edges.length;t++){var n=this.edges[t];n.dataIndex<0||(e.edge.push(n.dataIndex),e.node.push(n.node1.dataIndex,n.node2.dataIndex))}return e},r.prototype.getTrajectoryDataIndices=function(){for(var e=He(),t=He(),n=0;n<this.edges.length;n++){var i=this.edges[n];if(!(i.dataIndex<0)){e.set(i.dataIndex,!0);for(var a=[i.node1],o=[i.node2],s=0;s<a.length;){var l=a[s];s++,t.set(l.dataIndex,!0);for(var u=0;u<l.inEdges.length;u++)e.set(l.inEdges[u].dataIndex,!0),a.push(l.inEdges[u].node1)}for(s=0;s<o.length;){var c=o[s];s++,t.set(c.dataIndex,!0);for(var u=0;u<c.outEdges.length;u++)e.set(c.outEdges[u].dataIndex,!0),o.push(c.outEdges[u].node2)}}}return{edge:e.keys(),node:t.keys()}},r}(),s6=function(){function r(e,t,n){this.dataIndex=-1,this.node1=e,this.node2=t,this.dataIndex=n==null?-1:n}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=He(),t=He();e.set(this.dataIndex,!0);for(var n=[this.node1],i=[this.node2],a=0;a<n.length;){var o=n[a];a++,t.set(o.dataIndex,!0);for(var s=0;s<o.inEdges.length;s++)e.set(o.inEdges[s].dataIndex,!0),n.push(o.inEdges[s].node1)}for(a=0;a<i.length;){var l=i[a];a++,t.set(l.dataIndex,!0);for(var s=0;s<l.outEdges.length;s++)e.set(l.outEdges[s].dataIndex,!0),i.push(l.outEdges[s].node2)}return{edge:e.keys(),node:t.keys()}},r}();function l6(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)}}}ir(qu,l6("hostGraph","data"));ir(s6,l6("hostGraph","edgeData"));const Q0e=Z0e;function u6(r,e,t,n,i){for(var a=new Q0e(n),o=0;o<r.length;o++)a.addNode(Mr(r[o].id,r[o].name,o),o);for(var s=[],l=[],u=0,o=0;o<e.length;o++){var c=e[o],h=c.source,f=c.target;a.addEdge(h,f,u)&&(l.push(c),s.push(Mr(fr(c.id,null),h+" > "+f)),u++)}var d=t.get("coordinateSystem"),p;if(d==="cartesian2d"||d==="polar")p=Us(r,t);else{var g=Eg.get(d),v=g?g.dimensions||[]:[];pt(v,"value")<0&&v.concat(["value"]);var m=Pg(r,{coordDimensions:v,encodeDefine:t.getEncode()}).dimensions;p=new vi(m,t),p.initData(r)}var y=new vi(["value"],t);return y.initData(l,s),i&&i(p,y),W8({mainData:p,struct:a,structAttr:"graph",datas:{node:p,edge:y},datasAttr:{node:"data",edge:"edgeData"}}),a.update(),a}var J0e=function(r){ae(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 i(){return n._categoriesData}this.legendVisualProvider=new Fg(i,i),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),zc(t,"edgeLabel",["show"])},e.prototype.getInitialData=function(t,n){var i=t.edges||t.links||[],a=t.data||t.nodes||[],o=this;if(a&&i){N0e(this);var s=u6(a,i,this,!0,l);return k(s.edges,function(u){k0e(u.node1,u.node2,this,u.dataIndex)},this),s.data}function l(u,c){u.wrapMethod("getItemModel",function(p){var g=o._categoriesModels,v=p.getShallow("category"),m=g[v];return m&&(m.parentModel=p.parentModel,p.parentModel=m),p});var h=vn.prototype.getModel;function f(p,g){var v=h.call(this,p,g);return v.resolveParentPath=d,v}c.wrapMethod("getItemModel",function(p){return p.resolveParentPath=d,p.getModel=f,p});function d(p){if(p&&(p[0]==="label"||p[1]==="label")){var g=p.slice();return p[0]==="label"?g[0]="edgeLabel":p[1]==="label"&&(g[1]="edgeLabel"),g}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,i){if(i==="edge"){var a=this.getData(),o=this.getDataParams(t,i),s=a.graph.getEdgeByIndex(t),l=a.getName(s.node1.dataIndex),u=a.getName(s.node2.dataIndex),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Ar("nameValue",{name:c.join(" > "),value:o.value,noValue:o.value==null})}var h=CG({series:this,dataIndex:t,multipleSeries:n});return h},e.prototype._updateCategoriesData=function(){var t=xe(this.option.categories||[],function(i){return i.value!=null?i:pe({value:0},i)}),n=new vi(["value"],this);n.initData(t),this._categoriesData=n,this._categoriesModels=n.mapArray(function(i){return n.getItemModel(i)})},e.prototype.setZoom=function(t){this.option.zoom=t},e.prototype.setCenter=function(t){this.option.center=t},e.prototype.isAnimationEnabled=function(){return r.prototype.isAnimationEnabled.call(this)&&!(this.get("layout")==="force"&&this.get(["force","layoutAnimation"]))},e.type="series.graph",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={z:2,coordinateSystem:"view",legendHoverLink:!0,layout:null,circular:{rotateLabel:!1},force:{initLayout:null,repulsion:[0,50],gravity:.1,friction:.6,edgeLength:30,layoutAnimation:!0},left:"center",top:"center",symbol:"circle",symbolSize:10,edgeSymbol:["none","none"],edgeSymbolSize:10,edgeLabel:{position:"middle",distance:5},draggable:!1,roam:!1,center:null,zoom:1,nodeScaleRatio:.6,label:{show:!1,formatter:"{b}"},itemStyle:{},lineStyle:{color:"#aaa",width:1,opacity:.5},emphasis:{scale:!0,label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(En);const e_e=J0e;var t_e={type:"graphRoam",event:"graphRoam",update:"none"};function n_e(r){r.registerChartView(K0e),r.registerSeriesModel(e_e),r.registerProcessor(L0e),r.registerVisual(P0e),r.registerVisual(R0e),r.registerLayout(O0e),r.registerLayout(r.PRIORITY.VISUAL.POST_CHART_LAYOUT,B0e),r.registerLayout(U0e),r.registerCoordinateSystem("graphView",{dimensions:zg.dimensions,create:G0e}),r.registerAction({type:"focusNodeAdjacency",event:"focusNodeAdjacency",update:"series:focusNodeAdjacency"},qn),r.registerAction({type:"unfocusNodeAdjacency",event:"unfocusNodeAdjacency",update:"series:unfocusNodeAdjacency"},qn),r.registerAction(t_e,function(e,t,n){t.eachComponent({mainType:"series",query:e},function(i){var a=i.coordinateSystem,o=rE(a,e,void 0,n);i.setCenter&&i.setCenter(o.center),i.setZoom&&i.setZoom(o.zoom)})})}var r_e=function(){function r(){this.angle=0,this.width=10,this.r=10,this.x=0,this.y=0}return r}(),i_e=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="pointer",n}return e.prototype.getDefaultShape=function(){return new r_e},e.prototype.buildPath=function(t,n){var i=Math.cos,a=Math.sin,o=n.r,s=n.width,l=n.angle,u=n.x-i(l)*s*(s>=o/3?1:2),c=n.y-a(l)*s*(s>=o/3?1:2);l=n.angle-Math.PI/2,t.moveTo(u,c),t.lineTo(n.x+i(l)*s,n.y+a(l)*s),t.lineTo(n.x+i(n.angle)*o,n.y+a(n.angle)*o),t.lineTo(n.x-i(l)*s,n.y-a(l)*s),t.lineTo(u,c)},e}(yt);const a_e=i_e;function o_e(r,e){var t=r.get("center"),n=e.getWidth(),i=e.getHeight(),a=Math.min(n,i),o=Pe(t[0],e.getWidth()),s=Pe(t[1],e.getHeight()),l=Pe(r.get("radius"),a/2);return{cx:o,cy:s,r:l}}function Cy(r,e){var t=r==null?"":r+"";return e&&(ke(e)?t=e.replace("{value}",t):qe(e)&&(t=e(r))),t}var s_e=function(r){ae(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,i){this.group.removeAll();var a=t.get(["axisLine","lineStyle","color"]),o=o_e(t,i);this._renderMain(t,n,i,a,o),this._data=t.getData()},e.prototype.dispose=function(){},e.prototype._renderMain=function(t,n,i,a,o){var s=this.group,l=t.get("clockwise"),u=-t.get("startAngle")/180*Math.PI,c=-t.get("endAngle")/180*Math.PI,h=t.getModel("axisLine"),f=h.get("roundCap"),d=f?b_:Bi,p=h.get("show"),g=h.getModel("lineStyle"),v=g.get("width"),m=[u,c];r2(m,!l),u=m[0],c=m[1];for(var y=c-u,_=u,x=[],S=0;p&&S<a.length;S++){var A=Math.min(Math.max(a[S][0],0),1);c=u+y*A;var w=new d({shape:{startAngle:_,endAngle:c,cx:o.cx,cy:o.cy,clockwise:l,r0:o.r-v,r:o.r},silent:!0});w.setStyle({fill:a[S][1]}),w.setStyle(g.getLineStyle(["color","width"])),x.push(w),_=c}x.reverse(),k(x,function(C){return s.add(C)});var M=function(C){if(C<=0)return a[0][1];var b;for(b=0;b<a.length;b++)if(a[b][0]>=C&&(b===0?0:a[b-1][0])<C)return a[b][1];return a[b-1][1]};this._renderTicks(t,n,i,M,o,u,c,l,v),this._renderTitleAndDetail(t,n,i,M,o),this._renderAnchor(t,o),this._renderPointer(t,n,i,M,o,u,c,l,v)},e.prototype._renderTicks=function(t,n,i,a,o,s,l,u,c){for(var h=this.group,f=o.cx,d=o.cy,p=o.r,g=+t.get("min"),v=+t.get("max"),m=t.getModel("splitLine"),y=t.getModel("axisTick"),_=t.getModel("axisLabel"),x=t.get("splitNumber"),S=y.get("splitNumber"),A=Pe(m.get("length"),p),w=Pe(y.get("length"),p),M=s,C=(l-s)/x,b=C/S,T=m.getModel("lineStyle").getLineStyle(),P=y.getModel("lineStyle").getLineStyle(),D=m.get("distance"),L,E,I=0;I<=x;I++){if(L=Math.cos(M),E=Math.sin(M),m.get("show")){var N=D?D+c:c,R=new Cr({shape:{x1:L*(p-N)+f,y1:E*(p-N)+d,x2:L*(p-A-N)+f,y2:E*(p-A-N)+d},style:T,silent:!0});T.stroke==="auto"&&R.setStyle({stroke:a(I/x)}),h.add(R)}if(_.get("show")){var N=_.get("distance")+D,F=Cy(Vn(I/x*(v-g)+g),_.get("formatter")),O=a(I/x),V=L*(p-A-N)+f,H=E*(p-A-N)+d,Q=_.get("rotate"),W=0;Q==="radial"?(W=-M+2*Math.PI,W>Math.PI/2&&(W+=Math.PI)):Q==="tangential"?W=-M-Math.PI/2:Ft(Q)&&(W=Q*Math.PI/180),W===0?h.add(new Ot({style:pn(_,{text:F,x:V,y:H,verticalAlign:E<-.8?"top":E>.8?"bottom":"middle",align:L<-.4?"left":L>.4?"right":"center"},{inheritColor:O}),silent:!0})):h.add(new Ot({style:pn(_,{text:F,x:V,y:H,verticalAlign:"middle",align:"center"},{inheritColor:O}),silent:!0,originX:V,originY:H,rotation:W}))}if(y.get("show")&&I!==x){var N=y.get("distance");N=N?N+c:c;for(var Z=0;Z<=S;Z++){L=Math.cos(M),E=Math.sin(M);var ee=new Cr({shape:{x1:L*(p-N)+f,y1:E*(p-N)+d,x2:L*(p-w-N)+f,y2:E*(p-w-N)+d},silent:!0,style:P});P.stroke==="auto"&&ee.setStyle({stroke:a((I+Z/S)/x)}),h.add(ee),M+=b}M-=b}else M+=C}},e.prototype._renderPointer=function(t,n,i,a,o,s,l,u,c){var h=this.group,f=this._data,d=this._progressEls,p=[],g=t.get(["pointer","show"]),v=t.getModel("progress"),m=v.get("show"),y=t.getData(),_=y.mapDimension("value"),x=+t.get("min"),S=+t.get("max"),A=[x,S],w=[s,l];function M(b,T){var P=y.getItemModel(b),D=P.getModel("pointer"),L=Pe(D.get("width"),o.r),E=Pe(D.get("length"),o.r),I=t.get(["pointer","icon"]),N=D.get("offsetCenter"),R=Pe(N[0],o.r),F=Pe(N[1],o.r),O=D.get("keepAspect"),V;return I?V=rr(I,R-L/2,F-E,L,E,null,O):V=new a_e({shape:{angle:-Math.PI/2,width:L,r:E,x:R,y:F}}),V.rotation=-(T+Math.PI/2),V.x=o.cx,V.y=o.cy,V}function C(b,T){var P=v.get("roundCap"),D=P?b_:Bi,L=v.get("overlap"),E=L?v.get("width"):c/y.count(),I=L?o.r-E:o.r-(b+1)*E,N=L?o.r:o.r-b*E,R=new D({shape:{startAngle:s,endAngle:T,cx:o.cx,cy:o.cy,clockwise:u,r0:I,r:N}});return L&&(R.z2=Kt(y.get(_,b),[x,S],[100,0],!0)),R}(m||g)&&(y.diff(f).add(function(b){var T=y.get(_,b);if(g){var P=M(b,s);Tn(P,{rotation:-((isNaN(+T)?w[0]:Kt(T,A,w,!0))+Math.PI/2)},t),h.add(P),y.setItemGraphicEl(b,P)}if(m){var D=C(b,s),L=v.get("clip");Tn(D,{shape:{endAngle:Kt(T,A,w,L)}},t),h.add(D),_T(t.seriesIndex,y.dataType,b,D),p[b]=D}}).update(function(b,T){var P=y.get(_,b);if(g){var D=f.getItemGraphicEl(T),L=D?D.rotation:s,E=M(b,L);E.rotation=L,zt(E,{rotation:-((isNaN(+P)?w[0]:Kt(P,A,w,!0))+Math.PI/2)},t),h.add(E),y.setItemGraphicEl(b,E)}if(m){var I=d[T],N=I?I.shape.endAngle:s,R=C(b,N),F=v.get("clip");zt(R,{shape:{endAngle:Kt(P,A,w,F)}},t),h.add(R),_T(t.seriesIndex,y.dataType,b,R),p[b]=R}}).execute(),y.each(function(b){var T=y.getItemModel(b),P=T.getModel("emphasis"),D=P.get("focus"),L=P.get("blurScope"),E=P.get("disabled");if(g){var I=y.getItemGraphicEl(b),N=y.getItemVisual(b,"style"),R=N.fill;if(I instanceof Ur){var F=I.style;I.useStyle(pe({image:F.image,x:F.x,y:F.y,width:F.width,height:F.height},N))}else I.useStyle(N),I.type!=="pointer"&&I.setColor(R);I.setStyle(T.getModel(["pointer","itemStyle"]).getItemStyle()),I.style.fill==="auto"&&I.setStyle("fill",a(Kt(y.get(_,b),A,[0,1],!0))),I.z2EmphasisLift=0,Br(I,T),Rn(I,D,L,E)}if(m){var O=p[b];O.useStyle(y.getItemVisual(b,"style")),O.setStyle(T.getModel(["progress","itemStyle"]).getItemStyle()),O.z2EmphasisLift=0,Br(O,T),Rn(O,D,L,E)}}),this._progressEls=p)},e.prototype._renderAnchor=function(t,n){var i=t.getModel("anchor"),a=i.get("show");if(a){var o=i.get("size"),s=i.get("icon"),l=i.get("offsetCenter"),u=i.get("keepAspect"),c=rr(s,n.cx-o/2+Pe(l[0],n.r),n.cy-o/2+Pe(l[1],n.r),o,o,null,u);c.z2=i.get("showAbove")?1:0,c.setStyle(i.getModel("itemStyle").getItemStyle()),this.group.add(c)}},e.prototype._renderTitleAndDetail=function(t,n,i,a,o){var s=this,l=t.getData(),u=l.mapDimension("value"),c=+t.get("min"),h=+t.get("max"),f=new rt,d=[],p=[],g=t.isAnimationEnabled(),v=t.get(["pointer","showAbove"]);l.diff(this._data).add(function(m){d[m]=new Ot({silent:!0}),p[m]=new Ot({silent:!0})}).update(function(m,y){d[m]=s._titleEls[y],p[m]=s._detailEls[y]}).execute(),l.each(function(m){var y=l.getItemModel(m),_=l.get(u,m),x=new rt,S=a(Kt(_,[c,h],[0,1],!0)),A=y.getModel("title");if(A.get("show")){var w=A.get("offsetCenter"),M=o.cx+Pe(w[0],o.r),C=o.cy+Pe(w[1],o.r),b=d[m];b.attr({z2:v?0:2,style:pn(A,{x:M,y:C,text:l.getName(m),align:"center",verticalAlign:"middle"},{inheritColor:S})}),x.add(b)}var T=y.getModel("detail");if(T.get("show")){var P=T.get("offsetCenter"),D=o.cx+Pe(P[0],o.r),L=o.cy+Pe(P[1],o.r),E=Pe(T.get("width"),o.r),I=Pe(T.get("height"),o.r),N=t.get(["progress","show"])?l.getItemVisual(m,"style").fill:S,b=p[m],R=T.get("formatter");b.attr({z2:v?0:2,style:pn(T,{x:D,y:L,text:Cy(_,R),width:isNaN(E)?null:E,height:isNaN(I)?null:I,align:"center",verticalAlign:"middle"},{inheritColor:N})}),LV(b,{normal:T},_,function(O){return Cy(O,R)}),g&&PV(b,m,l,t,{getFormattedLabel:function(O,V,H,Q,W,Z){return Cy(Z?Z.interpolatedValue:_,R)}}),x.add(b)}f.add(x)}),this.group.add(f),this._titleEls=d,this._detailEls=p},e.type="gauge",e}(gn);const l_e=s_e;var u_e=function(r){ae(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 Ld(this,["value"])},e.type="series.gauge",e.defaultOption={z:2,colorBy:"data",center:["50%","50%"],legendHoverLink:!0,radius:"75%",startAngle:225,endAngle:-45,clockwise:!0,min:0,max:100,splitNumber:10,axisLine:{show:!0,roundCap:!1,lineStyle:{color:[[1,"#E6EBF8"]],width:10}},progress:{show:!1,overlap:!0,width:10,roundCap:!1,clip:!0},splitLine:{show:!0,length:10,distance:10,lineStyle:{color:"#63677A",width:3,type:"solid"}},axisTick:{show:!0,splitNumber:5,length:6,distance:10,lineStyle:{color:"#63677A",width:1,type:"solid"}},axisLabel:{show:!0,distance:15,color:"#464646",fontSize:12,rotate:0},pointer:{icon:null,offsetCenter:[0,0],show:!0,showAbove:!0,length:"60%",width:6,keepAspect:!1},anchor:{show:!1,showAbove:!1,size:6,icon:"circle",offsetCenter:[0,0],keepAspect:!1,itemStyle:{color:"#fff",borderWidth:0,borderColor:"#5470c6"}},title:{show:!0,offsetCenter:[0,"20%"],color:"#464646",fontSize:16,valueAnimation:!1},detail:{show:!0,backgroundColor:"rgba(0,0,0,0)",borderWidth:0,borderColor:"#ccc",width:100,height:null,padding:[5,10],offsetCenter:[0,"40%"],color:"#464646",fontSize:30,fontWeight:"bold",lineHeight:30,valueAnimation:!1}},e}(En);const c_e=u_e;function h_e(r){r.registerChartView(l_e),r.registerSeriesModel(c_e)}var f_e=["itemStyle","opacity"],d_e=function(r){ae(e,r);function e(t,n){var i=r.call(this)||this,a=i,o=new Ui,s=new Ot;return a.setTextContent(s),i.setTextGuideLine(o),i.updateData(t,n,!0),i}return e.prototype.updateData=function(t,n,i){var a=this,o=t.hostModel,s=t.getItemModel(n),l=t.getItemLayout(n),u=s.getModel("emphasis"),c=s.get(f_e);c=c==null?1:c,i||lo(a),a.useStyle(t.getItemVisual(n,"style")),a.style.lineJoin="round",i?(a.setShape({points:l.points}),a.style.opacity=0,Tn(a,{style:{opacity:c}},o,n)):zt(a,{style:{opacity:c},shape:{points:l.points}},o,n),Br(a,s),this._updateLabel(t,n),Rn(this,u.get("focus"),u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t,n){var i=this,a=this.getTextGuideLine(),o=i.getTextContent(),s=t.hostModel,l=t.getItemModel(n),u=t.getItemLayout(n),c=u.label,h=t.getItemVisual(n,"style"),f=h.fill;zr(o,Sr(l),{labelFetcher:t.hostModel,labelDataIndex:n,defaultOpacity:h.opacity,defaultText:t.getName(n)},{normal:{align:c.textAlign,verticalAlign:c.verticalAlign}}),i.setTextConfig({local:!0,inside:!!c.inside,insideStroke:f,outsideFill:f});var d=c.linePoints;a.setShape({points:d}),i.textGuideLineConfig={anchor:d?new ft(d[0][0],d[0][1]):null},zt(o,{style:{x:c.x,y:c.y}},s,n),o.attr({rotation:c.rotation,originX:c.x,originY:c.y,z2:10}),W2(i,$2(l),{stroke:f})},e}(zi),p_e=function(r){ae(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,i){var a=t.getData(),o=this._data,s=this.group;a.diff(o).add(function(l){var u=new d_e(a,l);a.setItemGraphicEl(l,u),s.add(u)}).update(function(l,u){var c=o.getItemGraphicEl(u);c.updateData(a,l),s.add(c),a.setItemGraphicEl(l,c)}).remove(function(l){var u=o.getItemGraphicEl(l);Xv(u,t,l)}).execute(),this._data=a},e.prototype.remove=function(){this.group.removeAll(),this._data=null},e.prototype.dispose=function(){},e.type="funnel",e}(gn);const v_e=p_e;var g_e=function(r){ae(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 Fg(Fe(this.getData,this),Fe(this.getRawData,this)),this._defaultLabelLine(t)},e.prototype.getInitialData=function(t,n){return Ld(this,{coordDimensions:["value"],encodeDefaulter:ut(A2,this)})},e.prototype._defaultLabelLine=function(t){zc(t,"labelLine",["show"]);var n=t.labelLine,i=t.emphasis.labelLine;n.show=n.show&&t.label.show,i.show=i.show&&t.emphasis.label.show},e.prototype.getDataParams=function(t){var n=this.getData(),i=r.prototype.getDataParams.call(this,t),a=n.mapDimension("value"),o=n.getSum(a);return i.percent=o?+(n.get(a,t)/o*100).toFixed(2):0,i.$vars.push("percent"),i},e.type="series.funnel",e.defaultOption={z:2,legendHoverLink:!0,colorBy:"data",left:80,top:60,right:80,bottom:60,minSize:"0%",maxSize:"100%",sort:"descending",orient:"vertical",gap:0,funnelAlign:"center",label:{show:!0,position:"outer"},labelLine:{show:!0,length:20,lineStyle:{width:1}},itemStyle:{borderColor:"#fff",borderWidth:1},emphasis:{label:{show:!0}},select:{itemStyle:{borderColor:"#212121"}}},e}(En);const m_e=g_e;function y_e(r,e){return dr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function __e(r,e){for(var t=r.mapDimension("value"),n=r.mapArray(t,function(l){return l}),i=[],a=e==="ascending",o=0,s=r.count();o<s;o++)i[o]=o;return qe(e)?i.sort(e):e!=="none"&&i.sort(function(l,u){return a?n[l]-n[u]:n[u]-n[l]}),i}function x_e(r){var e=r.hostModel,t=e.get("orient");r.each(function(n){var i=r.getItemModel(n),a=i.getModel("label"),o=a.get("position"),s=i.getModel("labelLine"),l=r.getItemLayout(n),u=l.points,c=o==="inner"||o==="inside"||o==="center"||o==="insideLeft"||o==="insideRight",h,f,d,p;if(c)o==="insideLeft"?(f=(u[0][0]+u[3][0])/2+5,d=(u[0][1]+u[3][1])/2,h="left"):o==="insideRight"?(f=(u[1][0]+u[2][0])/2-5,d=(u[1][1]+u[2][1])/2,h="right"):(f=(u[0][0]+u[1][0]+u[2][0]+u[3][0])/4,d=(u[0][1]+u[1][1]+u[2][1]+u[3][1])/4,h="center"),p=[[f,d],[f,d]];else{var g=void 0,v=void 0,m=void 0,y=void 0,_=s.get("length");o==="left"?(g=(u[3][0]+u[0][0])/2,v=(u[3][1]+u[0][1])/2,m=g-_,f=m-5,h="right"):o==="right"?(g=(u[1][0]+u[2][0])/2,v=(u[1][1]+u[2][1])/2,m=g+_,f=m+5,h="left"):o==="top"?(g=(u[3][0]+u[0][0])/2,v=(u[3][1]+u[0][1])/2,y=v-_,d=y-5,h="center"):o==="bottom"?(g=(u[1][0]+u[2][0])/2,v=(u[1][1]+u[2][1])/2,y=v+_,d=y+5,h="center"):o==="rightTop"?(g=t==="horizontal"?u[3][0]:u[1][0],v=t==="horizontal"?u[3][1]:u[1][1],t==="horizontal"?(y=v-_,d=y-5,h="center"):(m=g+_,f=m+5,h="top")):o==="rightBottom"?(g=u[2][0],v=u[2][1],t==="horizontal"?(y=v+_,d=y+5,h="center"):(m=g+_,f=m+5,h="bottom")):o==="leftTop"?(g=u[0][0],v=t==="horizontal"?u[0][1]:u[1][1],t==="horizontal"?(y=v-_,d=y-5,h="center"):(m=g-_,f=m-5,h="right")):o==="leftBottom"?(g=t==="horizontal"?u[1][0]:u[3][0],v=t==="horizontal"?u[1][1]:u[2][1],t==="horizontal"?(y=v+_,d=y+5,h="center"):(m=g-_,f=m-5,h="right")):(g=(u[1][0]+u[2][0])/2,v=(u[1][1]+u[2][1])/2,t==="horizontal"?(y=v+_,d=y+5,h="center"):(m=g+_,f=m+5,h="left")),t==="horizontal"?(m=g,f=m):(y=v,d=y),p=[[g,v],[m,y]]}l.label={linePoints:p,x:f,y:d,verticalAlign:"middle",textAlign:h,inside:c}})}function S_e(r,e){r.eachSeriesByType("funnel",function(t){var n=t.getData(),i=n.mapDimension("value"),a=t.get("sort"),o=y_e(t,e),s=t.get("orient"),l=o.width,u=o.height,c=__e(n,a),h=o.x,f=o.y,d=s==="horizontal"?[Pe(t.get("minSize"),u),Pe(t.get("maxSize"),u)]:[Pe(t.get("minSize"),l),Pe(t.get("maxSize"),l)],p=n.getDataExtent(i),g=t.get("min"),v=t.get("max");g==null&&(g=Math.min(p[0],0)),v==null&&(v=p[1]);var m=t.get("funnelAlign"),y=t.get("gap"),_=s==="horizontal"?l:u,x=(_-y*(n.count()-1))/n.count(),S=function(L,E){if(s==="horizontal"){var I=n.get(i,L)||0,N=Kt(I,[g,v],d,!0),R=void 0;switch(m){case"top":R=f;break;case"center":R=f+(u-N)/2;break;case"bottom":R=f+(u-N);break}return[[E,R],[E,R+N]]}var F=n.get(i,L)||0,O=Kt(F,[g,v],d,!0),V;switch(m){case"left":V=h;break;case"center":V=h+(l-O)/2;break;case"right":V=h+l-O;break}return[[V,E],[V+O,E]]};a==="ascending"&&(x=-x,y=-y,s==="horizontal"?h+=l:f+=u,c=c.reverse());for(var A=0;A<c.length;A++){var w=c[A],M=c[A+1],C=n.getItemModel(w);if(s==="horizontal"){var b=C.get(["itemStyle","width"]);b==null?b=x:(b=Pe(b,l),a==="ascending"&&(b=-b));var T=S(w,h),P=S(M,h+b);h+=b+y,n.setItemLayout(w,{points:T.concat(P.slice().reverse())})}else{var D=C.get(["itemStyle","height"]);D==null?D=x:(D=Pe(D,u),a==="ascending"&&(D=-D));var T=S(w,f),P=S(M,f+D);f+=D+y,n.setItemLayout(w,{points:T.concat(P.slice().reverse())})}}x_e(n)})}function A_e(r){r.registerChartView(v_e),r.registerSeriesModel(m_e),r.registerLayout(S_e),r.registerProcessor(Og("funnel"))}var w_e=.3,b_e=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._dataGroup=new rt,t._initialized=!1,t}return e.prototype.init=function(){this.group.add(this._dataGroup)},e.prototype.render=function(t,n,i,a){this._progressiveEls=null;var o=this._dataGroup,s=t.getData(),l=this._data,u=t.coordinateSystem,c=u.dimensions,h=gO(t);s.diff(l).add(f).update(d).remove(p).execute();function f(v){var m=vO(s,o,v,c,u);cw(m,s,v,h)}function d(v,m){var y=l.getItemGraphicEl(m),_=c6(s,v,c,u);s.setItemGraphicEl(v,y),zt(y,{shape:{points:_}},t,v),lo(y),cw(y,s,v,h)}function p(v){var m=l.getItemGraphicEl(v);o.remove(m)}if(!this._initialized){this._initialized=!0;var g=T_e(u,t,function(){setTimeout(function(){o.removeClipPath()})});o.setClipPath(g)}this._data=s},e.prototype.incrementalPrepareRender=function(t,n,i){this._initialized=!0,this._data=null,this._dataGroup.removeAll()},e.prototype.incrementalRender=function(t,n,i){for(var a=n.getData(),o=n.coordinateSystem,s=o.dimensions,l=gO(n),u=this._progressiveEls=[],c=t.start;c<t.end;c++){var h=vO(a,this._dataGroup,c,s,o);h.incremental=!0,cw(h,a,c,l),u.push(h)}},e.prototype.remove=function(){this._dataGroup&&this._dataGroup.removeAll(),this._data=null},e.type="parallel",e}(gn);function T_e(r,e,t){var n=r.model,i=r.getRect(),a=new Dt({shape:{x:i.x,y:i.y,width:i.width,height:i.height}}),o=n.get("layout")==="horizontal"?"width":"height";return a.setShape(o,0),Tn(a,{shape:{width:i.width,height:i.height}},e,t),a}function c6(r,e,t,n){for(var i=[],a=0;a<t.length;a++){var o=t[a],s=r.get(r.mapDimension(o),e);M_e(s,n.getAxis(o).type)||i.push(n.dataToPoint(s,o))}return i}function vO(r,e,t,n,i){var a=c6(r,t,n,i),o=new Ui({shape:{points:a},z2:10});return e.add(o),r.setItemGraphicEl(t,o),o}function gO(r){var e=r.get("smooth",!0);return e===!0&&(e=w_e),e=Rs(e),Ov(e)&&(e=0),{smooth:e}}function cw(r,e,t,n){r.useStyle(e.getItemVisual(t,"style")),r.style.fill=null,r.setShape("smooth",n.smooth);var i=e.getItemModel(t),a=i.getModel("emphasis");Br(r,i,"lineStyle"),Rn(r,a.get("focus"),a.get("blurScope"),a.get("disabled"))}function M_e(r,e){return e==="category"?r==null:r==null||isNaN(r)}const C_e=b_e;var E_e=function(r){ae(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.getInitialData=function(t,n){return Us(null,this,{useEncodeDefaulter:Fe(L_e,null,this)})},e.prototype.getRawIndicesByActiveState=function(t){var n=this.coordinateSystem,i=this.getData(),a=[];return n.eachActiveState(i,function(o,s){t===o&&a.push(i.getRawIndex(s))}),a},e.type="series.parallel",e.dependencies=["parallel"],e.defaultOption={z:2,coordinateSystem:"parallel",parallelIndex:0,label:{show:!1},inactiveOpacity:.05,activeOpacity:1,lineStyle:{width:1,opacity:.45,type:"solid"},emphasis:{label:{show:!1}},progressive:500,smooth:!1,animationEasing:"linear"},e}(En);function L_e(r){var e=r.ecModel.getComponent("parallel",r.get("parallelIndex"));if(e){var t={};return k(e.dimensions,function(n){var i=P_e(n);t[n]=i}),t}}function P_e(r){return+r.replace("dim","")}const R_e=E_e;var D_e=["lineStyle","opacity"],I_e={seriesType:"parallel",reset:function(r,e){var t=r.coordinateSystem,n={normal:r.get(["lineStyle","opacity"]),active:r.get("activeOpacity"),inactive:r.get("inactiveOpacity")};return{progress:function(i,a){t.eachActiveState(a,function(o,s){var l=n[o];if(o==="normal"&&a.hasItemOption){var u=a.getItemModel(s).get(D_e,!0);u!=null&&(l=u)}var c=a.ensureUniqueItemVisual(s,"style");c.opacity=l},i.start,i.end)}}}};const N_e=I_e;function k_e(r){O_e(r),F_e(r)}function O_e(r){if(!r.parallel){var e=!1;k(r.series,function(t){t&&t.type==="parallel"&&(e=!0)}),e&&(r.parallel=[{}])}}function F_e(r){var e=nn(r.parallelAxis);k(e,function(t){if(Qe(t)){var n=t.parallelIndex||0,i=nn(r.parallel)[n];i&&i.parallelAxisDefault&&ht(t,i.parallelAxisDefault,!1)}})}var B_e=5,z_e=function(r){ae(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,i){this._model=t,this._api=i,this._handlers||(this._handlers={},k(U_e,function(a,o){i.getZr().on(o,this._handlers[o]=Fe(a,this))},this)),Md(this,"_throttledDispatchExpand",t.get("axisExpandRate"),"fixRate")},e.prototype.dispose=function(t,n){Kv(this,"_throttledDispatchExpand"),k(this._handlers,function(i,a){n.getZr().off(a,i)}),this._handlers=null},e.prototype._throttledDispatchExpand=function(t){this._dispatchExpand(t)},e.prototype._dispatchExpand=function(t){t&&this._api.dispatchAction(pe({type:"parallelAxisExpand"},t))},e.type="parallel",e}(kn),U_e={mousedown:function(r){hw(this,"click")&&(this._mouseDownPoint=[r.offsetX,r.offsetY])},mouseup:function(r){var e=this._mouseDownPoint;if(hw(this,"click")&&e){var t=[r.offsetX,r.offsetY],n=Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2);if(n>B_e)return;var i=this._model.coordinateSystem.getSlidedAxisExpandWindow([r.offsetX,r.offsetY]);i.behavior!=="none"&&this._dispatchExpand({axisExpandWindow:i.axisExpandWindow})}this._mouseDownPoint=null},mousemove:function(r){if(!(this._mouseDownPoint||!hw(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 hw(r,e){var t=r._model;return t.get("axisExpandable")&&t.get("axisExpandTriggerOn")===e}const V_e=z_e;var G_e=function(r){ae(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&&ht(n,t,!0),this._initDimensions()},e.prototype.contains=function(t,n){var i=t.get("parallelIndex");return i!=null&&n.getComponent("parallel",i)===this},e.prototype.setAxisExpand=function(t){k(["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=[],i=jt(this.ecModel.queryComponents({mainType:"parallelAxis"}),function(a){return(a.get("parallelIndex")||0)===this.componentIndex},this);k(i,function(a){t.push("dim"+a.get("dim")),n.push(a.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}(Nt);const H_e=G_e;var W_e=function(r){ae(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.type=a||"value",s.axisIndex=o,s}return e.prototype.isHorizontal=function(){return this.coordinateSystem.getModel().get("layout")!=="horizontal"},e}(ho);const $_e=W_e;function rh(r,e,t,n,i,a){r=r||0;var o=t[1]-t[0];if(i!=null&&(i=Yh(i,[0,o])),a!=null&&(a=Math.max(a,i!=null?i:0)),n==="all"){var s=Math.abs(e[1]-e[0]);s=Yh(s,[0,o]),i=a=Yh(s,[i,a]),n=0}e[0]=Yh(e[0],t),e[1]=Yh(e[1],t);var l=fw(e,n);e[n]+=r;var u=i||0,c=t.slice();l.sign<0?c[0]+=u:c[1]-=u,e[n]=Yh(e[n],c);var h;return h=fw(e,n),i!=null&&(h.sign!==l.sign||h.span<i)&&(e[1-n]=e[n]+l.sign*i),h=fw(e,n),a!=null&&h.span>a&&(e[1-n]=e[n]+h.sign*a),e}function fw(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 Yh(r,e){return Math.min(e[1]!=null?e[1]:1/0,Math.max(e[0]!=null?e[0]:-1/0,r))}var dw=k,h6=Math.min,f6=Math.max,mO=Math.floor,X_e=Math.ceil,yO=Vn,Y_e=Math.PI,q_e=function(){function r(e,t,n){this.type="parallel",this._axesMap=He(),this._axesLayout={},this.dimensions=e.dimensions,this._model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var i=e.dimensions,a=e.parallelAxisIndex;dw(i,function(o,s){var l=a[s],u=t.getComponent("parallelAxis",l),c=this._axesMap.set(o,new $_e(o,$1(u),[0,0],u.get("type"),l)),h=c.type==="category";c.onBand=h&&u.get("boundaryGap"),c.inverse=u.get("inverse"),u.axis=c,c.model=u,c.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,i=t.layoutBase,a=t.pixelDimIndex,o=e[1-a],s=e[a];return o>=n&&o<=n+t.axisLength&&s>=i&&s<=i+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 i=n.getData();dw(this.dimensions,function(a){var o=this._axesMap.get(a);o.scale.unionExtentFromData(i,i.mapDimension(a)),td(o.scale,o.model)},this)}},this)},r.prototype.resize=function(e,t){this._rect=dr(e.getBoxLayoutParams(),{width:t.getWidth(),height:t.getHeight()}),this._layoutAxes()},r.prototype.getRect=function(){return this._rect},r.prototype._makeLayoutInfo=function(){var e=this._model,t=this._rect,n=["x","y"],i=["width","height"],a=e.get("layout"),o=a==="horizontal"?0:1,s=t[i[o]],l=[0,s],u=this.dimensions.length,c=Ey(e.get("axisExpandWidth"),l),h=Ey(e.get("axisExpandCount")||0,[0,u]),f=e.get("axisExpandable")&&u>3&&u>h&&h>1&&c>0&&s>0,d=e.get("axisExpandWindow"),p;if(d)p=Ey(d[1]-d[0],l),d[1]=d[0]+p;else{p=Ey(c*(h-1),l);var g=e.get("axisExpandCenter")||mO(u/2);d=[c*g-p/2],d[1]=d[0]+p}var v=(s-p)/(u-h);v<3&&(v=0);var m=[mO(yO(d[0]/c,1))+1,X_e(yO(d[1]/c,1))-1],y=v/c*d[0];return{layout:a,pixelDimIndex:o,layoutBase:t[n[o]],layoutLength:s,axisBase:t[n[1-o]],axisLength:t[i[1-o]],axisExpandable:f,axisExpandWidth:c,axisCollapseWidth:v,axisExpandWindow:d,axisCount:u,winInnerIndices:m,axisExpandWindow0Pos:y}},r.prototype._layoutAxes=function(){var e=this._rect,t=this._axesMap,n=this.dimensions,i=this._makeLayoutInfo(),a=i.layout;t.each(function(o){var s=[0,i.axisLength],l=o.inverse?1:0;o.setExtent(s[l],s[1-l])}),dw(n,function(o,s){var l=(i.axisExpandable?K_e:j_e)(s,i),u={horizontal:{x:l.position,y:i.axisLength},vertical:{x:0,y:l.position}},c={horizontal:Y_e/2,vertical:0},h=[u[a].x+e.x,u[a].y+e.y],f=c[a],d=ta();jc(d,d,f),Xo(d,d,h),this._axesLayout[o]={position:h,rotation:f,transform:d,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,i){n==null&&(n=0),i==null&&(i=e.count());var a=this._axesMap,o=this.dimensions,s=[],l=[];k(o,function(v){s.push(e.mapDimension(v)),l.push(a.get(v).model)});for(var u=this.hasAxisBrushed(),c=n;c<i;c++){var h=void 0;if(!u)h="normal";else{h="active";for(var f=e.getValues(s,c),d=0,p=o.length;d<p;d++){var g=l[d].getActiveState(f[d]);if(g==="inactive"){h="inactive";break}}}t(h,c)}},r.prototype.hasAxisBrushed=function(){for(var e=this.dimensions,t=this._axesMap,n=!1,i=0,a=e.length;i<a;i++)t.get(e[i]).model.getActiveState()!=="normal"&&(n=!0);return n},r.prototype.axisCoordToPoint=function(e,t){var n=this._axesLayout[t];return io([e,0],n.transform)},r.prototype.getAxisLayout=function(e){return Je(this._axesLayout[e])},r.prototype.getSlidedAxisExpandWindow=function(e){var t=this._makeLayoutInfo(),n=t.pixelDimIndex,i=t.axisExpandWindow.slice(),a=i[1]-i[0],o=[0,t.axisExpandWidth*(t.axisCount-1)];if(!this.containPoint(e))return{behavior:"none",axisExpandWindow:i};var s=e[n]-t.layoutBase-t.axisExpandWindow0Pos,l,u="slide",c=t.axisCollapseWidth,h=this._model.get("axisExpandSlideTriggerArea"),f=h[0]!=null;if(c)f&&c&&s<a*h[0]?(u="jump",l=s-a*h[2]):f&&c&&s>a*(1-h[0])?(u="jump",l=s-a*(1-h[2])):(l=s-a*h[1])>=0&&(l=s-a*(1-h[1]))<=0&&(l=0),l*=t.axisExpandWidth/c,l?rh(l,i,o,"all"):u="none";else{var d=i[1]-i[0],p=o[1]*s/d;i=[f6(0,p-d/2)],i[1]=h6(o[1],i[0]+d),i[0]=i[1]-d}return{axisExpandWindow:i,behavior:u}},r}();function Ey(r,e){return h6(f6(r,e[0]),e[1])}function j_e(r,e){var t=e.layoutLength/(e.axisCount-1);return{position:t*r,axisNameAvailableWidth:t,axisLabelShow:!0}}function K_e(r,e){var t=e.layoutLength,n=e.axisExpandWidth,i=e.axisCount,a=e.axisCollapseWidth,o=e.winInnerIndices,s,l=a,u=!1,c;return r<o[0]?(s=r*a,c=a):r<=o[1]?(s=e.axisExpandWindow0Pos+r*n-e.axisExpandWindow[0],l=n,u=!0):(s=t-(i-1-r)*a,c=a),{position:s,axisNameAvailableWidth:l,axisLabelShow:u,nameTruncateMaxWidth:c}}const Z_e=q_e;function Q_e(r,e){var t=[];return r.eachComponent("parallel",function(n,i){var a=new Z_e(n,r,e);a.name="parallel_"+i,a.resize(n,e),n.coordinateSystem=a,a.model=n,t.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="parallel"){var i=n.getReferringComponents("parallel",nr).models[0];n.coordinateSystem=i.coordinateSystem}}),t}var J_e={create:Q_e};const e1e=J_e;var d6=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.activeIntervals=[],t}return e.prototype.getAreaSelectStyle=function(){return Vc([["fill","color"],["lineWidth","borderWidth"],["stroke","borderColor"],["width","width"],["opacity","opacity"]])(this.getModel("areaSelectStyle"))},e.prototype.setActiveIntervals=function(t){var n=this.activeIntervals=Je(t);if(n)for(var i=n.length-1;i>=0;i--)Pa(n[i])},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 i=n[0];if(i[0]<=t&&t<=i[1])return"active"}else for(var a=0,o=n.length;a<o;a++)if(n[a][0]<=t&&t<=n[a][1])return"active";return"inactive"},e}(Nt);ir(d6,Rg);const _O=d6;var Wc=!0,sg=Math.min,id=Math.max,t1e=Math.pow,n1e=1e4,r1e=6,i1e=6,xO="globalPan",a1e={w:[0,0],e:[0,1],n:[1,0],s:[1,1]},o1e={w:"ew",e:"ew",n:"ns",s:"ns",ne:"nesw",sw:"nesw",nw:"nwse",se:"nwse"},SO={brushStyle:{lineWidth:2,stroke:"rgba(210,219,238,0.3)",fill:"#D2DBEE"},transformable:!0,brushMode:"single",removeOnClick:!1},s1e=0,l1e=function(r){ae(e,r);function e(t){var n=r.call(this)||this;return n._track=[],n._covers=[],n._handlers={},n._zr=t,n.group=new rt,n._uid="brushController_"+s1e++,k(v1e,function(i,a){this._handlers[a]=Fe(i,this)},n),n}return e.prototype.enableBrush=function(t){return this._brushType&&this._doDisableBrush(),t.brushType&&this._doEnableBrush(t),this},e.prototype._doEnableBrush=function(t){var n=this._zr;this._enableGlobalPan||yme(n,xO,this._uid),k(this._handlers,function(i,a){n.on(a,i)}),this._brushType=t.brushType,this._brushOption=ht(Je(SO),t,!0)},e.prototype._doDisableBrush=function(){var t=this._zr;_me(t,xO,this._uid),k(this._handlers,function(n,i){t.off(i,n)}),this._brushType=this._brushOption=null},e.prototype.setPanels=function(t){if(t&&t.length){var n=this._panels={};k(t,function(i){n[i.panelId]=Je(i)})}else this._panels=null;return this},e.prototype.mount=function(t){t=t||{},this._enableGlobalPan=t.enableGlobalPan;var n=this.group;return this._zr.add(n),n.attr({x:t.x||0,y:t.y||0,rotation:t.rotation||0,scaleX:t.scaleX||1,scaleY:t.scaleY||1}),this._transform=n.getLocalTransform(),this},e.prototype.updateCovers=function(t){t=xe(t,function(f){return ht(Je(SO),f,!0)});var n="\0-brush-index-",i=this._covers,a=this._covers=[],o=this,s=this._creatingCover;return new Ns(i,t,u,l).add(c).update(c).remove(h).execute(),this;function l(f,d){return(f.id!=null?f.id:n+d)+"-"+f.brushType}function u(f,d){return l(f.__brushOption,d)}function c(f,d){var p=t[f];if(d!=null&&i[d]===s)a[f]=i[d];else{var g=a[f]=d!=null?(i[d].__brushOption=p,i[d]):v6(o,p6(o,p));pE(o,g)}}function h(f){i[f]!==s&&o.group.remove(i[f])}},e.prototype.unmount=function(){return this.enableBrush(!1),lM(this),this._zr.remove(this.group),this},e.prototype.dispose=function(){this.unmount(),this.off()},e}(Ba);function p6(r,e){var t=Z1[e.brushType].createCover(r,e);return t.__brushOption=e,m6(t,e),r.group.add(t),t}function v6(r,e){var t=vE(e);return t.endCreating&&(t.endCreating(r,e),m6(e,e.__brushOption)),e}function g6(r,e){var t=e.__brushOption;vE(e).updateCoverShape(r,e,t.range,t)}function m6(r,e){var t=e.z;t==null&&(t=n1e),r.traverse(function(n){n.z=t,n.z2=t})}function pE(r,e){vE(e).updateCommon(r,e),g6(r,e)}function vE(r){return Z1[r.__brushOption.brushType]}function gE(r,e,t){var n=r._panels;if(!n)return Wc;var i,a=r._transform;return k(n,function(o){o.isTargetByCursor(e,t,a)&&(i=o)}),i}function y6(r,e){var t=r._panels;if(!t)return Wc;var n=e.__brushOption.panelId;return n!=null?t[n]:Wc}function lM(r){var e=r._covers,t=e.length;return k(e,function(n){r.group.remove(n)},r),e.length=0,!!t}function $c(r,e){var t=xe(r._covers,function(n){var i=n.__brushOption,a=Je(i.range);return{brushType:i.brushType,panelId:i.panelId,range:a}});r.trigger("brush",{areas:t,isEnd:!!e.isEnd,removeOnClick:!!e.removeOnClick})}function u1e(r){var e=r._track;if(!e.length)return!1;var t=e[e.length-1],n=e[0],i=t[0]-n[0],a=t[1]-n[1],o=t1e(i*i+a*a,.5);return o>r1e}function _6(r){var e=r.length-1;return e<0&&(e=0),[r[0],r[e]]}function x6(r,e,t,n){var i=new rt;return i.add(new Dt({name:"main",style:mE(t),silent:!0,draggable:!0,cursor:"move",drift:ut(AO,r,e,i,["n","s","w","e"]),ondragend:ut($c,e,{isEnd:!0})})),k(n,function(a){i.add(new Dt({name:a.join(""),style:{opacity:0},draggable:!0,silent:!0,invisible:!0,drift:ut(AO,r,e,i,a),ondragend:ut($c,e,{isEnd:!0})}))}),i}function S6(r,e,t,n){var i=n.brushStyle.lineWidth||0,a=id(i,i1e),o=t[0][0],s=t[1][0],l=o-i/2,u=s-i/2,c=t[0][1],h=t[1][1],f=c-a+i/2,d=h-a+i/2,p=c-o,g=h-s,v=p+i,m=g+i;cs(r,e,"main",o,s,p,g),n.transformable&&(cs(r,e,"w",l,u,a,m),cs(r,e,"e",f,u,a,m),cs(r,e,"n",l,u,v,a),cs(r,e,"s",l,d,v,a),cs(r,e,"nw",l,u,a,a),cs(r,e,"ne",f,u,a,a),cs(r,e,"sw",l,d,a,a),cs(r,e,"se",f,d,a,a))}function uM(r,e){var t=e.__brushOption,n=t.transformable,i=e.childAt(0);i.useStyle(mE(t)),i.attr({silent:!n,cursor:n?"move":"default"}),k([["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]],function(a){var o=e.childOfName(a.join("")),s=a.length===1?cM(r,a[0]):h1e(r,a);o&&o.attr({silent:!n,invisible:!n,cursor:n?o1e[s]+"-resize":null})})}function cs(r,e,t,n,i,a,o){var s=e.childOfName(t);s&&s.setShape(d1e(yE(r,e,[[n,i],[n+a,i+o]])))}function mE(r){return Ke({strokeNoScale:!0},r.brushStyle)}function A6(r,e,t,n){var i=[sg(r,t),sg(e,n)],a=[id(r,t),id(e,n)];return[[i[0],a[0]],[i[1],a[1]]]}function c1e(r){return Lc(r.group)}function cM(r,e){var t={w:"left",e:"right",n:"top",s:"bottom"},n={left:"w",right:"e",top:"n",bottom:"s"},i=E1(t[e],c1e(r));return n[i]}function h1e(r,e){var t=[cM(r,e[0]),cM(r,e[1])];return(t[0]==="e"||t[0]==="w")&&t.reverse(),t.join("")}function AO(r,e,t,n,i,a){var o=t.__brushOption,s=r.toRectRange(o.range),l=w6(e,i,a);k(n,function(u){var c=a1e[u];s[c[0]][c[1]]+=l[c[0]]}),o.range=r.fromRectRange(A6(s[0][0],s[1][0],s[0][1],s[1][1])),pE(e,t),$c(e,{isEnd:!1})}function f1e(r,e,t,n){var i=e.__brushOption.range,a=w6(r,t,n);k(i,function(o){o[0]+=a[0],o[1]+=a[1]}),pE(r,e),$c(r,{isEnd:!1})}function w6(r,e,t){var n=r.group,i=n.transformCoordToLocal(e,t),a=n.transformCoordToLocal(0,0);return[i[0]-a[0],i[1]-a[1]]}function yE(r,e,t){var n=y6(r,e);return n&&n!==Wc?n.clipPath(t,r._transform):Je(t)}function d1e(r){var e=sg(r[0][0],r[1][0]),t=sg(r[0][1],r[1][1]),n=id(r[0][0],r[1][0]),i=id(r[0][1],r[1][1]);return{x:e,y:t,width:n-e,height:i-t}}function p1e(r,e,t){if(!(!r._brushType||g1e(r,e.offsetX,e.offsetY))){var n=r._zr,i=r._covers,a=gE(r,e,t);if(!r._dragging)for(var o=0;o<i.length;o++){var s=i[o].__brushOption;if(a&&(a===Wc||s.panelId===a.panelId)&&Z1[s.brushType].contain(i[o],t[0],t[1]))return}a&&n.setCursorStyle("crosshair")}}function hM(r){var e=r.event;e.preventDefault&&e.preventDefault()}function fM(r,e,t){return r.childOfName("main").contain(e,t)}function b6(r,e,t,n){var i=r._creatingCover,a=r._creatingPanel,o=r._brushOption,s;if(r._track.push(t.slice()),u1e(r)||i){if(a&&!i){o.brushMode==="single"&&lM(r);var l=Je(o);l.brushType=wO(l.brushType,a),l.panelId=a===Wc?null:a.panelId,i=r._creatingCover=p6(r,l),r._covers.push(i)}if(i){var u=Z1[wO(r._brushType,a)],c=i.__brushOption;c.range=u.getCreatingRange(yE(r,i,r._track)),n&&(v6(r,i),u.updateCommon(r,i)),g6(r,i),s={isEnd:n}}}else n&&o.brushMode==="single"&&o.removeOnClick&&gE(r,e,t)&&lM(r)&&(s={isEnd:n,removeOnClick:!0});return s}function wO(r,e){return r==="auto"?e.defaultBrushType:r}var v1e={mousedown:function(r){if(this._dragging)bO(this,r);else if(!r.target||!r.target.draggable){hM(r);var e=this.group.transformCoordToLocal(r.offsetX,r.offsetY);this._creatingCover=null;var t=this._creatingPanel=gE(this,r,e);t&&(this._dragging=!0,this._track=[e.slice()])}},mousemove:function(r){var e=r.offsetX,t=r.offsetY,n=this.group.transformCoordToLocal(e,t);if(p1e(this,r,n),this._dragging){hM(r);var i=b6(this,r,n,!1);i&&$c(this,i)}},mouseup:function(r){bO(this,r)}};function bO(r,e){if(r._dragging){hM(e);var t=e.offsetX,n=e.offsetY,i=r.group.transformCoordToLocal(t,n),a=b6(r,e,i,!0);r._dragging=!1,r._track=[],r._creatingCover=null,a&&$c(r,a)}}function g1e(r,e,t){var n=r._zr;return e<0||e>n.getWidth()||t<0||t>n.getHeight()}var Z1={lineX:TO(0),lineY:TO(1),rect:{createCover:function(r,e){function t(n){return n}return x6({toRectRange:t,fromRectRange:t},r,e,[["w"],["e"],["n"],["s"],["s","e"],["s","w"],["n","e"],["n","w"]])},getCreatingRange:function(r){var e=_6(r);return A6(e[1][0],e[1][1],e[0][0],e[0][1])},updateCoverShape:function(r,e,t,n){S6(r,e,t,n)},updateCommon:uM,contain:fM},polygon:{createCover:function(r,e){var t=new rt;return t.add(new Ui({name:"main",style:mE(e),silent:!0})),t},getCreatingRange:function(r){return r},endCreating:function(r,e){e.remove(e.childAt(0)),e.add(new zi({name:"main",draggable:!0,drift:ut(f1e,r,e),ondragend:ut($c,r,{isEnd:!0})}))},updateCoverShape:function(r,e,t,n){e.childAt(0).setShape({points:yE(r,e,t)})},updateCommon:uM,contain:fM}};function TO(r){return{createCover:function(e,t){return x6({toRectRange:function(n){var i=[n,[0,100]];return r&&i.reverse(),i},fromRectRange:function(n){return n[r]}},e,t,[[["w"],["e"]],[["n"],["s"]]][r])},getCreatingRange:function(e){var t=_6(e),n=sg(t[0][r],t[1][r]),i=id(t[0][r],t[1][r]);return[n,i]},updateCoverShape:function(e,t,n,i){var a,o=y6(e,t);if(o!==Wc&&o.getLinearBrushOtherExtent)a=o.getLinearBrushOtherExtent(r);else{var s=e._zr;a=[0,[s.getWidth(),s.getHeight()][1-r]]}var l=[n,a];r&&l.reverse(),S6(e,t,l,i)},updateCommon:uM,contain:fM}}const _E=l1e;function T6(r){return r=xE(r),function(e){return MV(e,r)}}function M6(r,e){return r=xE(r),function(t){var n=e!=null?e:t,i=n?r.width:r.height,a=n?r.x:r.y;return[a,a+(i||0)]}}function C6(r,e,t){var n=xE(r);return function(i,a){return n.contain(a[0],a[1])&&!Y1(i,e,t)}}function xE(r){return dt.create(r)}var m1e=["axisLine","axisTickLabel","axisName"],y1e=function(r){ae(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 _E(n.getZr())).on("brush",Fe(this._onBrush,this))},e.prototype.render=function(t,n,i,a){if(!_1e(t,n,a)){this.axisModel=t,this.api=i,this.group.removeAll();var o=this._axisGroup;if(this._axisGroup=new rt,this.group.add(this._axisGroup),!!t.get("show")){var s=S1e(t,n),l=s.coordinateSystem,u=t.getAreaSelectStyle(),c=u.width,h=t.axis.dim,f=l.getAxisLayout(h),d=pe({strokeContainThreshold:c},f),p=new ks(t,d);k(m1e,p.add,p),this._axisGroup.add(p.getGroup()),this._refreshBrushController(d,u,t,s,c,i),Mg(o,this._axisGroup,t)}}},e.prototype._refreshBrushController=function(t,n,i,a,o,s){var l=i.axis.getExtent(),u=l[1]-l[0],c=Math.min(30,Math.abs(u)*.1),h=dt.create({x:l[0],y:-o/2,width:u,height:o});h.x-=c,h.width+=2*c,this._brushController.mount({enableGlobalPan:!0,rotation:t.rotation,x:t.position[0],y:t.position[1]}).setPanels([{panelId:"pl",clipPath:T6(h),isTargetByCursor:C6(h,s,a),getLinearBrushOtherExtent:M6(h,0)}]).enableBrush({brushType:"lineX",brushStyle:n,removeOnClick:!0}).updateCovers(x1e(i))},e.prototype._onBrush=function(t){var n=t.areas,i=this.axisModel,a=i.axis,o=xe(n,function(s){return[a.coordToData(s.range[0],!0),a.coordToData(s.range[1],!0)]});(!i.option.realtime===t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"axisAreaSelect",parallelAxisId:i.id,intervals:o})},e.prototype.dispose=function(){this._brushController.dispose()},e.type="parallelAxis",e}(kn);function _1e(r,e,t){return t&&t.type==="axisAreaSelect"&&e.findComponents({mainType:"parallelAxis",query:t})[0]===r}function x1e(r){var e=r.axis;return xe(r.activeIntervals,function(t){return{brushType:"lineX",panelId:"pl",range:[e.dataToCoord(t[0],!0),e.dataToCoord(t[1],!0)]}})}function S1e(r,e){return e.getComponent("parallel",r.get("parallelIndex"))}const A1e=y1e;var w1e={type:"axisAreaSelect",event:"axisAreaSelected"};function b1e(r){r.registerAction(w1e,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 T1e={type:"value",areaSelectStyle:{width:20,borderWidth:1,borderColor:"rgba(160,197,232)",color:"rgba(160,197,232)",opacity:.3},realtime:!0,z:10};function E6(r){r.registerComponentView(V_e),r.registerComponentModel(H_e),r.registerCoordinateSystem("parallel",e1e),r.registerPreprocessor(k_e),r.registerComponentModel(_O),r.registerComponentView(A1e),rd(r,"parallel",_O,T1e),b1e(r)}function M1e(r){gt(E6),r.registerChartView(C_e),r.registerSeriesModel(R_e),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,N_e)}var C1e=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}(),E1e=function(r){ae(e,r);function e(t){return r.call(this,t)||this}return e.prototype.getDefaultShape=function(){return new C1e},e.prototype.buildPath=function(t,n){var i=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+i,n.y2),t.bezierCurveTo(n.cpx2+i,n.cpy2,n.cpx1+i,n.cpy1,n.x1+i,n.y1)):(t.lineTo(n.x2,n.y2+i),t.bezierCurveTo(n.cpx2,n.cpy2+i,n.cpx1,n.cpy1+i,n.x1,n.y1+i)),t.closePath()},e.prototype.highlight=function(){Ds(this)},e.prototype.downplay=function(){Is(this)},e}(yt),L1e=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._focusAdjacencyDisabled=!1,t}return e.prototype.render=function(t,n,i){var a=this,o=t.getGraph(),s=this.group,l=t.layoutInfo,u=l.width,c=l.height,h=t.getData(),f=t.getData("edge"),d=t.get("orient");this._model=t,s.removeAll(),s.x=l.x,s.y=l.y,o.eachEdge(function(p){var g=new E1e,v=at(g);v.dataIndex=p.dataIndex,v.seriesIndex=t.seriesIndex,v.dataType="edge";var m=p.getModel(),y=m.getModel("lineStyle"),_=y.get("curveness"),x=p.node1.getLayout(),S=p.node1.getModel(),A=S.get("localX"),w=S.get("localY"),M=p.node2.getLayout(),C=p.node2.getModel(),b=C.get("localX"),T=C.get("localY"),P=p.getLayout(),D,L,E,I,N,R,F,O;g.shape.extent=Math.max(1,P.dy),g.shape.orient=d,d==="vertical"?(D=(A!=null?A*u:x.x)+P.sy,L=(w!=null?w*c:x.y)+x.dy,E=(b!=null?b*u:M.x)+P.ty,I=T!=null?T*c:M.y,N=D,R=L*(1-_)+I*_,F=E,O=L*_+I*(1-_)):(D=(A!=null?A*u:x.x)+x.dx,L=(w!=null?w*c:x.y)+P.sy,E=b!=null?b*u:M.x,I=(T!=null?T*c:M.y)+P.ty,N=D*(1-_)+E*_,R=L,F=D*_+E*(1-_),O=I),g.setShape({x1:D,y1:L,x2:E,y2:I,cpx1:N,cpy1:R,cpx2:F,cpy2:O}),g.useStyle(y.getItemStyle()),MO(g.style,d,p);var V=""+m.get("value"),H=Sr(m,"edgeLabel");zr(g,H,{labelFetcher:{getFormattedLabel:function(Z,ee,he,le,re,be){return t.getFormattedLabel(Z,ee,"edge",le,Go(re,H.normal&&H.normal.get("formatter"),V),be)}},labelDataIndex:p.dataIndex,defaultText:V}),g.setTextConfig({position:"inside"});var Q=m.getModel("emphasis");Br(g,m,"lineStyle",function(Z){var ee=Z.getItemStyle();return MO(ee,d,p),ee}),s.add(g),f.setItemGraphicEl(p.dataIndex,g);var W=Q.get("focus");Rn(g,W==="adjacency"?p.getAdjacentDataIndices():W==="trajectory"?p.getTrajectoryDataIndices():W,Q.get("blurScope"),Q.get("disabled"))}),o.eachNode(function(p){var g=p.getLayout(),v=p.getModel(),m=v.get("localX"),y=v.get("localY"),_=v.getModel("emphasis"),x=v.get(["itemStyle","borderRadius"])||0,S=new Dt({shape:{x:m!=null?m*u:g.x,y:y!=null?y*c:g.y,width:g.dx,height:g.dy,r:x},style:v.getModel("itemStyle").getItemStyle(),z2:10});zr(S,Sr(v),{labelFetcher:{getFormattedLabel:function(w,M){return t.getFormattedLabel(w,M,"node")}},labelDataIndex:p.dataIndex,defaultText:p.id}),S.disableLabelAnimation=!0,S.setStyle("fill",p.getVisual("color")),S.setStyle("decal",p.getVisual("style").decal),Br(S,v),s.add(S),h.setItemGraphicEl(p.dataIndex,S),at(S).dataType="node";var A=_.get("focus");Rn(S,A==="adjacency"?p.getAdjacentDataIndices():A==="trajectory"?p.getTrajectoryDataIndices():A,_.get("blurScope"),_.get("disabled"))}),h.eachItemGraphicEl(function(p,g){var v=h.getItemModel(g);v.get("draggable")&&(p.drift=function(m,y){a._focusAdjacencyDisabled=!0,this.shape.x+=m,this.shape.y+=y,this.dirty(),i.dispatchAction({type:"dragNode",seriesId:t.id,dataIndex:h.getRawIndex(g),localX:this.shape.x/u,localY:this.shape.y/c})},p.ondragend=function(){a._focusAdjacencyDisabled=!1},p.draggable=!0,p.cursor="move")}),!this._data&&t.isAnimationEnabled()&&s.setClipPath(P1e(s.getBoundingRect(),t,function(){s.removeClipPath()})),this._data=t.getData()},e.prototype.dispose=function(){},e.type="sankey",e}(gn);function MO(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"),i=t.node2.getVisual("color");ke(n)&&ke(i)&&(r.fill=new Ul(0,0,+(e==="horizontal"),+(e==="vertical"),[{color:n,offset:0},{color:i,offset:1}]))}}function P1e(r,e,t){var n=new Dt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Tn(n,{shape:{width:r.width+20}},e,t),n}const R1e=L1e;var D1e=function(r){ae(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 i=t.edges||t.links||[],a=t.data||t.nodes||[],o=t.levels||[];this.levelModels=[];for(var s=this.levelModels,l=0;l<o.length;l++)o[l].depth!=null&&o[l].depth>=0&&(s[o[l].depth]=new vn(o[l],this,n));var u=u6(a,i,this,!0,c);return u.data;function c(h,f){h.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,v=g.getData().getItemLayout(p);if(v){var m=v.depth,y=g.levelModels[m];y&&(d.parentModel=y)}return d}),f.wrapMethod("getItemModel",function(d,p){var g=d.parentModel,v=g.getGraph().getEdgeByIndex(p),m=v.node1.getLayout();if(m){var y=m.depth,_=g.levelModels[y];_&&(d.parentModel=_)}return d})}},e.prototype.setNodePosition=function(t,n){var i=this.option.data||this.option.nodes,a=i[t];a.localX=n[0],a.localY=n[1]},e.prototype.getGraph=function(){return this.getData().graph},e.prototype.getEdgeData=function(){return this.getGraph().edgeData},e.prototype.formatTooltip=function(t,n,i){function a(d){return isNaN(d)||d==null}if(i==="edge"){var o=this.getDataParams(t,i),s=o.data,l=o.value,u=s.source+" -- "+s.target;return Ar("nameValue",{name:u,value:l,noValue:a(l)})}else{var c=this.getGraph().getNodeByIndex(t),h=c.getLayout().value,f=this.getDataParams(t,i).data.name;return Ar("nameValue",{name:f!=null?f+"":null,value:h,noValue:a(h)})}},e.prototype.optionUpdated=function(){},e.prototype.getDataParams=function(t,n){var i=r.prototype.getDataParams.call(this,t,n);if(i.value==null&&n==="node"){var a=this.getGraph().getNodeByIndex(t),o=a.getLayout().value;i.value=o}return i},e.type="series.sankey",e.defaultOption={z:2,coordinateSystem:"view",left:"5%",top:"5%",right:"20%",bottom:"5%",orient:"horizontal",nodeWidth:20,nodeGap:8,draggable:!0,layoutIterations:32,label:{show:!0,position:"right",fontSize:12},edgeLabel:{show:!1,fontSize:12},levels:[],nodeAlign:"justify",lineStyle:{color:"#314656",opacity:.2,curveness:.5},emphasis:{label:{show:!0},lineStyle:{opacity:.5}},select:{itemStyle:{borderColor:"#212121"}},animationEasing:"linear",animationDuration:1e3},e}(En);const I1e=D1e;function N1e(r,e){r.eachSeriesByType("sankey",function(t){var n=t.get("nodeWidth"),i=t.get("nodeGap"),a=k1e(t,e);t.layoutInfo=a;var o=a.width,s=a.height,l=t.getGraph(),u=l.nodes,c=l.edges;F1e(u);var h=jt(u,function(g){return g.getLayout().value===0}),f=h.length!==0?0:t.get("layoutIterations"),d=t.get("orient"),p=t.get("nodeAlign");O1e(u,c,n,i,o,s,f,d,p)})}function k1e(r,e){return dr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()})}function O1e(r,e,t,n,i,a,o,s,l){B1e(r,e,t,i,a,s,l),G1e(r,e,a,i,n,o,s),Z1e(r,s)}function F1e(r){k(r,function(e){var t=Hl(e.outEdges,P_),n=Hl(e.inEdges,P_),i=e.getValue()||0,a=Math.max(t,n,i);e.setLayout({value:a},!0)})}function B1e(r,e,t,n,i,a,o){for(var s=[],l=[],u=[],c=[],h=0,f=0;f<e.length;f++)s[f]=1;for(var f=0;f<r.length;f++)l[f]=r[f].inEdges.length,l[f]===0&&u.push(r[f]);for(var d=-1;u.length;){for(var p=0;p<u.length;p++){var g=u[p],v=g.hostGraph.data.getRawDataItem(g.dataIndex),m=v.depth!=null&&v.depth>=0;m&&v.depth>d&&(d=v.depth),g.setLayout({depth:m?v.depth:h},!0),a==="vertical"?g.setLayout({dy:t},!0):g.setLayout({dx:t},!0);for(var y=0;y<g.outEdges.length;y++){var _=g.outEdges[y],x=e.indexOf(_);s[x]=0;var S=_.node2,A=r.indexOf(S);--l[A]===0&&c.indexOf(S)<0&&c.push(S)}}++h,u=c,c=[]}for(var f=0;f<s.length;f++)if(s[f]===1)throw new Error("Sankey is a DAG, the original data has cycle!");var w=d>h-1?d:h-1;o&&o!=="left"&&z1e(r,o,a,w);var M=a==="vertical"?(i-t)/w:(n-t)/w;V1e(r,M,a)}function L6(r){var e=r.hostGraph.data.getRawDataItem(r.dataIndex);return e.depth!=null&&e.depth>=0}function z1e(r,e,t,n){if(e==="right"){for(var i=[],a=r,o=0;a.length;){for(var s=0;s<a.length;s++){var l=a[s];l.setLayout({skNodeHeight:o},!0);for(var u=0;u<l.inEdges.length;u++){var c=l.inEdges[u];i.indexOf(c.node1)<0&&i.push(c.node1)}}a=i,i=[],++o}k(r,function(h){L6(h)||h.setLayout({depth:Math.max(0,n-h.getLayout().skNodeHeight)},!0)})}else e==="justify"&&U1e(r,n)}function U1e(r,e){k(r,function(t){!L6(t)&&!t.outEdges.length&&t.setLayout({depth:e},!0)})}function V1e(r,e,t){k(r,function(n){var i=n.getLayout().depth*e;t==="vertical"?n.setLayout({y:i},!0):n.setLayout({x:i},!0)})}function G1e(r,e,t,n,i,a,o){var s=H1e(r,o);W1e(s,e,t,n,i,o),pw(s,i,t,n,o);for(var l=1;a>0;a--)l*=.99,$1e(s,l,o),pw(s,i,t,n,o),K1e(s,l,o),pw(s,i,t,n,o)}function H1e(r,e){var t=[],n=e==="vertical"?"y":"x",i=vT(r,function(a){return a.getLayout()[n]});return i.keys.sort(function(a,o){return a-o}),k(i.keys,function(a){t.push(i.buckets.get(a))}),t}function W1e(r,e,t,n,i,a){var o=1/0;k(r,function(s){var l=s.length,u=0;k(s,function(h){u+=h.getLayout().value});var c=a==="vertical"?(n-(l-1)*i)/u:(t-(l-1)*i)/u;c<o&&(o=c)}),k(r,function(s){k(s,function(l,u){var c=l.getLayout().value*o;a==="vertical"?(l.setLayout({x:u},!0),l.setLayout({dx:c},!0)):(l.setLayout({y:u},!0),l.setLayout({dy:c},!0))})}),k(e,function(s){var l=+s.getValue()*o;s.setLayout({dy:l},!0)})}function pw(r,e,t,n,i){var a=i==="vertical"?"x":"y";k(r,function(o){o.sort(function(g,v){return g.getLayout()[a]-v.getLayout()[a]});for(var s,l,u,c=0,h=o.length,f=i==="vertical"?"dx":"dy",d=0;d<h;d++)l=o[d],u=c-l.getLayout()[a],u>0&&(s=l.getLayout()[a]+u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]+l.getLayout()[f]+e;var p=i==="vertical"?n:t;if(u=c-e-p,u>0){s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0),c=s;for(var d=h-2;d>=0;--d)l=o[d],u=l.getLayout()[a]+l.getLayout()[f]+e-c,u>0&&(s=l.getLayout()[a]-u,i==="vertical"?l.setLayout({x:s},!0):l.setLayout({y:s},!0)),c=l.getLayout()[a]}})}function $1e(r,e,t){k(r.slice().reverse(),function(n){k(n,function(i){if(i.outEdges.length){var a=Hl(i.outEdges,X1e,t)/Hl(i.outEdges,P_);if(isNaN(a)){var o=i.outEdges.length;a=o?Hl(i.outEdges,Y1e,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(a-eu(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-eu(i,t))*e;i.setLayout({y:l},!0)}}})})}function X1e(r,e){return eu(r.node2,e)*r.getValue()}function Y1e(r,e){return eu(r.node2,e)}function q1e(r,e){return eu(r.node1,e)*r.getValue()}function j1e(r,e){return eu(r.node1,e)}function eu(r,e){return e==="vertical"?r.getLayout().x+r.getLayout().dx/2:r.getLayout().y+r.getLayout().dy/2}function P_(r){return r.getValue()}function Hl(r,e,t){for(var n=0,i=r.length,a=-1;++a<i;){var o=+e(r[a],t);isNaN(o)||(n+=o)}return n}function K1e(r,e,t){k(r,function(n){k(n,function(i){if(i.inEdges.length){var a=Hl(i.inEdges,q1e,t)/Hl(i.inEdges,P_);if(isNaN(a)){var o=i.inEdges.length;a=o?Hl(i.inEdges,j1e,t)/o:0}if(t==="vertical"){var s=i.getLayout().x+(a-eu(i,t))*e;i.setLayout({x:s},!0)}else{var l=i.getLayout().y+(a-eu(i,t))*e;i.setLayout({y:l},!0)}}})})}function Z1e(r,e){var t=e==="vertical"?"x":"y";k(r,function(n){n.outEdges.sort(function(i,a){return i.node2.getLayout()[t]-a.node2.getLayout()[t]}),n.inEdges.sort(function(i,a){return i.node1.getLayout()[t]-a.node1.getLayout()[t]})}),k(r,function(n){var i=0,a=0;k(n.outEdges,function(o){o.setLayout({sy:i},!0),i+=o.getLayout().dy}),k(n.inEdges,function(o){o.setLayout({ty:a},!0),a+=o.getLayout().dy})})}function Q1e(r){r.eachSeriesByType("sankey",function(e){var t=e.getGraph(),n=t.nodes,i=t.edges;if(n.length){var a=1/0,o=-1/0;k(n,function(s){var l=s.getLayout().value;l<a&&(a=l),l>o&&(o=l)}),k(n,function(s){var l=new Fr({type:"color",mappingMethod:"linear",dataExtent:[a,o],visual:e.get("color")}),u=l.mapValueToVisual(s.getLayout().value),c=s.getModel().get(["itemStyle","color"]);c!=null?(s.setVisual("color",c),s.setVisual("style",{fill:c})):(s.setVisual("color",u),s.setVisual("style",{fill:u}))})}i.length&&k(i,function(s){var l=s.getModel().get("lineStyle");s.setVisual("style",l)})})}function J1e(r){r.registerChartView(R1e),r.registerSeriesModel(I1e),r.registerLayout(N1e),r.registerVisual(Q1e),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])})})}var P6=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,i=t.getComponent("xAxis",this.get("xAxisIndex")),a=t.getComponent("yAxis",this.get("yAxisIndex")),o=i.get("type"),s=a.get("type"),l;o==="category"?(e.layout="horizontal",n=i.getOrdinalMeta(),l=!this._hasEncodeRule("x")):s==="category"?(e.layout="vertical",n=a.getOrdinalMeta(),l=!this._hasEncodeRule("y")):e.layout=e.layout||"horizontal";var u=["x","y"],c=e.layout==="horizontal"?0:1,h=this._baseAxisDim=u[c],f=u[1-c],d=[i,a],p=d[c].get("type"),g=d[1-c].get("type"),v=e.data;if(v&&l){var m=[];k(v,function(x,S){var A;_e(x)?(A=x.slice(),x.unshift(S)):_e(x.value)?(A=pe({},x),A.value=A.value.slice(),x.value.unshift(S)):A=x,m.push(A)}),e.data=m}var y=this.defaultValueDimensions,_=[{name:h,type:y_(p),ordinalMeta:n,otherDims:{tooltip:!1,itemName:0},dimsDef:["base"]},{name:f,type:y_(g),dimsDef:y.slice()}];return Ld(this,{coordDimensions:_,dimensionsCount:y.length+1,encodeDefaulter:ut(QV,_,this)})},r.prototype.getBaseAxis=function(){var e=this._baseAxisDim;return this.ecModel.getComponent(e+"Axis",this.get(e+"AxisIndex")).axis},r}(),R6=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"min",defaultTooltip:!0},{name:"Q1",defaultTooltip:!0},{name:"median",defaultTooltip:!0},{name:"Q3",defaultTooltip:!0},{name:"max",defaultTooltip:!0}],t.visualDrawType="stroke",t}return e.type="series.boxplot",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,boxWidth:[7,50],itemStyle:{color:"#fff",borderWidth:1},emphasis:{scale:!0,itemStyle:{borderWidth:2,shadowBlur:5,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}},animationDuration:800},e}(En);ir(R6,P6,!0);const exe=R6;var txe=function(r){ae(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,i){var a=t.getData(),o=this.group,s=this._data;this._data||o.removeAll();var l=t.get("layout")==="horizontal"?1:0;a.diff(s).add(function(u){if(a.hasValue(u)){var c=a.getItemLayout(u),h=CO(c,a,u,l,!0);a.setItemGraphicEl(u,h),o.add(h)}}).update(function(u,c){var h=s.getItemGraphicEl(c);if(!a.hasValue(u)){o.remove(h);return}var f=a.getItemLayout(u);h?(lo(h),D6(f,h,a,u)):h=CO(f,a,u,l),o.add(h),a.setItemGraphicEl(u,h)}).remove(function(u){var c=s.getItemGraphicEl(u);c&&o.remove(c)}).execute(),this._data=a},e.prototype.remove=function(t){var n=this.group,i=this._data;this._data=null,i&&i.eachItemGraphicEl(function(a){a&&n.remove(a)})},e.type="boxplot",e}(gn),nxe=function(){function r(){}return r}(),rxe=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="boxplotBoxPath",n}return e.prototype.getDefaultShape=function(){return new nxe},e.prototype.buildPath=function(t,n){var i=n.points,a=0;for(t.moveTo(i[a][0],i[a][1]),a++;a<4;a++)t.lineTo(i[a][0],i[a][1]);for(t.closePath();a<i.length;a++)t.moveTo(i[a][0],i[a][1]),a++,t.lineTo(i[a][0],i[a][1])},e}(yt);function CO(r,e,t,n,i){var a=r.ends,o=new rxe({shape:{points:i?ixe(a,n,r):a}});return D6(r,o,e,t,i),o}function D6(r,e,t,n,i){var a=t.hostModel,o=Zc[i?"initProps":"updateProps"];o(e,{shape:{points:r.ends}},a,n),e.useStyle(t.getItemVisual(n,"style")),e.style.strokeNoScale=!0,e.z2=100;var s=t.getItemModel(n),l=s.getModel("emphasis");Br(e,s),Rn(e,l.get("focus"),l.get("blurScope"),l.get("disabled"))}function ixe(r,e,t){return xe(r,function(n){return n=n.slice(),n[e]=t.initBaseline,n})}const axe=txe;var dv=k;function oxe(r){var e=sxe(r);dv(e,function(t){var n=t.seriesModels;n.length&&(lxe(t),dv(n,function(i,a){uxe(i,t.boxOffsetList[a],t.boxWidthList[a])}))})}function sxe(r){var e=[],t=[];return r.eachSeriesByType("boxplot",function(n){var i=n.getBaseAxis(),a=pt(t,i);a<0&&(a=t.length,t[a]=i,e[a]={axis:i,seriesModels:[]}),e[a].seriesModels.push(n)}),e}function lxe(r){var e=r.axis,t=r.seriesModels,n=t.length,i=r.boxWidthList=[],a=r.boxOffsetList=[],o=[],s;if(e.type==="category")s=e.getBandWidth();else{var l=0;dv(t,function(p){l=Math.max(l,p.getData().count())});var u=e.getExtent();s=Math.abs(u[1]-u[0])/l}dv(t,function(p){var g=p.get("boxWidth");_e(g)||(g=[g,g]),o.push([Pe(g[0],s)||0,Pe(g[1],s)||0])});var c=s*.8-2,h=c/n*.3,f=(c-h*(n-1))/n,d=f/2-c/2;dv(t,function(p,g){a.push(d),d+=h+f,i.push(Math.min(Math.max(f,o[g][0]),o[g][1]))})}function uxe(r,e,t){var n=r.coordinateSystem,i=r.getData(),a=t/2,o=r.get("layout")==="horizontal"?0:1,s=1-o,l=["x","y"],u=i.mapDimension(l[o]),c=i.mapDimensionsAll(l[s]);if(u==null||c.length<5)return;for(var h=0;h<i.count();h++){var f=i.get(u,h),d=_(f,c[2],h),p=_(f,c[0],h),g=_(f,c[1],h),v=_(f,c[3],h),m=_(f,c[4],h),y=[];x(y,g,!1),x(y,v,!0),y.push(p,g,m,v),S(y,p),S(y,m),S(y,d),i.setItemLayout(h,{initBaseline:d[s],ends:y})}function _(A,w,M){var C=i.get(w,M),b=[];b[o]=A,b[s]=C;var T;return isNaN(A)||isNaN(C)?T=[NaN,NaN]:(T=n.dataToPoint(b),T[o]+=e),T}function x(A,w,M){var C=w.slice(),b=w.slice();C[o]+=a,b[o]-=a,M?A.push(C,b):A.push(b,C)}function S(A,w){var M=w.slice(),C=w.slice();M[o]-=a,C[o]+=a,A.push(M,C)}}function cxe(r,e){e=e||{};for(var t=[],n=[],i=e.boundIQR,a=i==="none"||i===0,o=0;o<r.length;o++){var s=Pa(r[o].slice()),l=HS(s,.25),u=HS(s,.5),c=HS(s,.75),h=s[0],f=s[s.length-1],d=(i==null?1.5:i)*(c-l),p=a?h:Math.max(h,l-d),g=a?f:Math.min(f,c+d),v=e.itemNameFormatter,m=qe(v)?v({value:o}):ke(v)?v.replace("{value}",o+""):o+"";t.push([m,p,l,u,c,g]);for(var y=0;y<s.length;y++){var _=s[y];if(_<p||_>g){var x=[m,_];n.push(x)}}}return{boxData:t,outliers:n}}var hxe={type:"echarts:boxplot",transform:function(e){var t=e.upstream;if(t.sourceFormat!==ai){var n="";qt(n)}var i=cxe(t.getRawData(),e.config);return[{dimensions:["ItemName","Low","Q1","Q2","Q3","High"],data:i.boxData},{data:i.outliers}]}};function fxe(r){r.registerSeriesModel(exe),r.registerChartView(axe),r.registerLayout(oxe),r.registerTransform(hxe)}var dxe=["itemStyle","borderColor"],pxe=["itemStyle","borderColor0"],vxe=["itemStyle","borderColorDoji"],gxe=["itemStyle","color"],mxe=["itemStyle","color0"];function SE(r,e){return e.get(r>0?gxe:mxe)}function AE(r,e){return e.get(r===0?vxe:r>0?dxe:pxe)}var yxe={seriesType:"candlestick",plan:Td(),performRawSeries:!0,reset:function(r,e){if(!e.isSeriesFiltered(r)){var t=r.pipelineContext.large;return!t&&{progress:function(n,i){for(var a;(a=n.next())!=null;){var o=i.getItemModel(a),s=i.getItemLayout(a).sign,l=o.getItemStyle();l.fill=SE(s,o),l.stroke=AE(s,o)||l.fill;var u=i.ensureUniqueItemVisual(a,"style");pe(u,l)}}}}}};const _xe=yxe;var xxe=["color","borderColor"],Sxe=function(r){ae(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,i){this.group.removeClipPath(),this._progressiveEls=null,this._updateDrawMode(t),this._isLargeDraw?this._renderLarge(t):this._renderNormal(t)},e.prototype.incrementalPrepareRender=function(t,n,i){this._clear(),this._updateDrawMode(t)},e.prototype.incrementalRender=function(t,n,i,a){this._progressiveEls=[],this._isLargeDraw?this._incrementalRenderLarge(t,n):this._incrementalRenderNormal(t,n)},e.prototype.eachRendered=function(t){ou(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(),i=this._data,a=this.group,o=n.getLayout("isSimpleBox"),s=t.get("clip",!0),l=t.coordinateSystem,u=l.getArea&&l.getArea();this._data||a.removeAll(),n.diff(i).add(function(c){if(n.hasValue(c)){var h=n.getItemLayout(c);if(s&&EO(u,h))return;var f=vw(h,c,!0);Tn(f,{shape:{points:h.ends}},t,c),gw(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}}).update(function(c,h){var f=i.getItemGraphicEl(h);if(!n.hasValue(c)){a.remove(f);return}var d=n.getItemLayout(c);if(s&&EO(u,d)){a.remove(f);return}f?(zt(f,{shape:{points:d.ends}},t,c),lo(f)):f=vw(d),gw(f,n,c,o),a.add(f),n.setItemGraphicEl(c,f)}).remove(function(c){var h=i.getItemGraphicEl(c);h&&a.remove(h)}).execute(),this._data=n},e.prototype._renderLarge=function(t){this._clear(),LO(t,this.group);var n=t.get("clip",!0)?Ng(t.coordinateSystem,!1,t):null;n?this.group.setClipPath(n):this.group.removeClipPath()},e.prototype._incrementalRenderNormal=function(t,n){for(var i=n.getData(),a=i.getLayout("isSimpleBox"),o;(o=t.next())!=null;){var s=i.getItemLayout(o),l=vw(s);gw(l,i,o,a),l.incremental=!0,this.group.add(l),this._progressiveEls.push(l)}},e.prototype._incrementalRenderLarge=function(t,n){LO(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}(gn),Axe=function(){function r(){}return r}(),wxe=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="normalCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new Axe},e.prototype.buildPath=function(t,n){var i=n.points;this.__simpleBox?(t.moveTo(i[4][0],i[4][1]),t.lineTo(i[6][0],i[6][1])):(t.moveTo(i[0][0],i[0][1]),t.lineTo(i[1][0],i[1][1]),t.lineTo(i[2][0],i[2][1]),t.lineTo(i[3][0],i[3][1]),t.closePath(),t.moveTo(i[4][0],i[4][1]),t.lineTo(i[5][0],i[5][1]),t.moveTo(i[6][0],i[6][1]),t.lineTo(i[7][0],i[7][1]))},e}(yt);function vw(r,e,t){var n=r.ends;return new wxe({shape:{points:t?bxe(n,r):n},z2:100})}function EO(r,e){for(var t=!0,n=0;n<e.ends.length;n++)if(r.contain(e.ends[n][0],e.ends[n][1])){t=!1;break}return t}function gw(r,e,t,n){var i=e.getItemModel(t);r.useStyle(e.getItemVisual(t,"style")),r.style.strokeNoScale=!0,r.__simpleBox=n,Br(r,i);var a=e.getItemLayout(t).sign;k(r.states,function(s,l){var u=i.getModel(l),c=SE(a,u),h=AE(a,u)||c,f=s.style||(s.style={});c&&(f.fill=c),h&&(f.stroke=h)});var o=i.getModel("emphasis");Rn(r,o.get("focus"),o.get("blurScope"),o.get("disabled"))}function bxe(r,e){return xe(r,function(t){return t=t.slice(),t[1]=e.initBaseline,t})}var Txe=function(){function r(){}return r}(),mw=function(r){ae(e,r);function e(t){var n=r.call(this,t)||this;return n.type="largeCandlestickBox",n}return e.prototype.getDefaultShape=function(){return new Txe},e.prototype.buildPath=function(t,n){for(var i=n.points,a=0;a<i.length;)if(this.__sign===i[a++]){var o=i[a++];t.moveTo(o,i[a++]),t.lineTo(o,i[a++])}else a+=3},e}(yt);function LO(r,e,t,n){var i=r.getData(),a=i.getLayout("largePoints"),o=new mw({shape:{points:a},__sign:1,ignoreCoarsePointer:!0});e.add(o);var s=new mw({shape:{points:a},__sign:-1,ignoreCoarsePointer:!0});e.add(s);var l=new mw({shape:{points:a},__sign:0,ignoreCoarsePointer:!0});e.add(l),yw(1,o,r),yw(-1,s,r),yw(0,l,r),n&&(o.incremental=!0,s.incremental=!0),t&&t.push(o,s)}function yw(r,e,t,n){var i=AE(r,t)||SE(r,t),a=t.getModel("itemStyle").getItemStyle(xxe);e.useStyle(a),e.style.fill=null,e.style.stroke=i}const Mxe=Sxe;var I6=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.defaultValueDimensions=[{name:"open",defaultTooltip:!0},{name:"close",defaultTooltip:!0},{name:"lowest",defaultTooltip:!0},{name:"highest",defaultTooltip:!0}],t}return e.prototype.getShadowDim=function(){return"open"},e.prototype.brushSelector=function(t,n,i){var a=n.getItemLayout(t);return a&&i.rect(a.brushRect)},e.type="series.candlestick",e.dependencies=["xAxis","yAxis","grid"],e.defaultOption={z:2,coordinateSystem:"cartesian2d",legendHoverLink:!0,layout:null,clip:!0,itemStyle:{color:"#eb5454",color0:"#47b262",borderColor:"#eb5454",borderColor0:"#47b262",borderColorDoji:null,borderWidth:1},emphasis:{itemStyle:{borderWidth:2}},barMaxWidth:null,barMinWidth:null,barWidth:null,large:!0,largeThreshold:600,progressive:3e3,progressiveThreshold:1e4,progressiveChunkMode:"mod",animationEasing:"linear",animationDuration:300},e}(En);ir(I6,P6,!0);const Cxe=I6;function Exe(r){!r||!_e(r.series)||k(r.series,function(e){Qe(e)&&e.type==="k"&&(e.type="candlestick")})}var Lxe={seriesType:"candlestick",plan:Td(),reset:function(r){var e=r.coordinateSystem,t=r.getData(),n=Pxe(r,t),i=0,a=1,o=["x","y"],s=t.getDimensionIndex(t.mapDimension(o[i])),l=xe(t.mapDimensionsAll(o[a]),t.getDimensionIndex,t),u=l[0],c=l[1],h=l[2],f=l[3];if(t.setLayout({candleWidth:n,isSimpleBox:n<=1.3}),s<0||l.length<4)return;return{progress:r.pipelineContext.large?p:d};function d(g,v){for(var m,y=v.getStore();(m=g.next())!=null;){var _=y.get(s,m),x=y.get(u,m),S=y.get(c,m),A=y.get(h,m),w=y.get(f,m),M=Math.min(x,S),C=Math.max(x,S),b=N(M,_),T=N(C,_),P=N(A,_),D=N(w,_),L=[];R(L,T,0),R(L,b,1),L.push(O(D),O(T),O(P),O(b));var E=v.getItemModel(m),I=!!E.get(["itemStyle","borderColorDoji"]);v.setItemLayout(m,{sign:PO(y,m,x,S,c,I),initBaseline:x>S?T[a]:b[a],ends:L,brushRect:F(A,w,_)})}function N(V,H){var Q=[];return Q[i]=H,Q[a]=V,isNaN(H)||isNaN(V)?[NaN,NaN]:e.dataToPoint(Q)}function R(V,H,Q){var W=H.slice(),Z=H.slice();W[i]=l0(W[i]+n/2,1,!1),Z[i]=l0(Z[i]-n/2,1,!0),Q?V.push(W,Z):V.push(Z,W)}function F(V,H,Q){var W=N(V,Q),Z=N(H,Q);return W[i]-=n/2,Z[i]-=n/2,{x:W[0],y:W[1],width:n,height:Z[1]-W[1]}}function O(V){return V[i]=l0(V[i],1),V}}function p(g,v){for(var m=Bo(g.count*4),y=0,_,x=[],S=[],A,w=v.getStore(),M=!!r.get(["itemStyle","borderColorDoji"]);(A=g.next())!=null;){var C=w.get(s,A),b=w.get(u,A),T=w.get(c,A),P=w.get(h,A),D=w.get(f,A);if(isNaN(C)||isNaN(P)||isNaN(D)){m[y++]=NaN,y+=3;continue}m[y++]=PO(w,A,b,T,c,M),x[i]=C,x[a]=P,_=e.dataToPoint(x,null,S),m[y++]=_?_[0]:NaN,m[y++]=_?_[1]:NaN,x[a]=D,_=e.dataToPoint(x,null,S),m[y++]=_?_[1]:NaN}v.setLayout("largePoints",m)}}};function PO(r,e,t,n,i,a){var o;return t>n?o=-1:t<n?o=1:o=a?0:e>0?r.get(i,e-1)<=n?1:-1:1,o}function Pxe(r,e){var t=r.getBaseAxis(),n,i=t.type==="category"?t.getBandWidth():(n=t.getExtent(),Math.abs(n[1]-n[0])/e.count()),a=Pe(ot(r.get("barMaxWidth"),i),i),o=Pe(ot(r.get("barMinWidth"),1),i),s=r.get("barWidth");return s!=null?Pe(s,i):Math.max(Math.min(i/2,a),o)}const Rxe=Lxe;function Dxe(r){r.registerChartView(Mxe),r.registerSeriesModel(Cxe),r.registerPreprocessor(Exe),r.registerVisual(_xe),r.registerLayout(Rxe)}function RO(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 Ixe=function(r){ae(e,r);function e(t,n){var i=r.call(this)||this,a=new Dg(t,n),o=new rt;return i.add(a),i.add(o),i.updateData(t,n),i}return e.prototype.stopEffectAnimation=function(){this.childAt(1).removeAll()},e.prototype.startEffectAnimation=function(t){for(var n=t.symbolType,i=t.color,a=t.rippleNumber,o=this.childAt(1),s=0;s<a;s++){var l=rr(n,-1,-1,2,2,i);l.attr({style:{strokeNoScale:!0},z2:99,silent:!0,scaleX:.5,scaleY:.5});var u=-s/a*t.period+t.effectOffset;l.animate("",!0).when(t.period,{scaleX:t.rippleScale/2,scaleY:t.rippleScale/2}).delay(u).start(),l.animateStyle(!0).when(t.period,{opacity:0}).delay(u).start(),o.add(l)}RO(o,t)},e.prototype.updateEffectAnimation=function(t){for(var n=this._effectCfg,i=this.childAt(1),a=["symbolType","period","rippleScale","rippleNumber"],o=0;o<a.length;o++){var s=a[o];if(n[s]!==t[s]){this.stopEffectAnimation(),this.startEffectAnimation(t);return}}RO(i,t)},e.prototype.highlight=function(){Ds(this)},e.prototype.downplay=function(){Is(this)},e.prototype.getSymbolType=function(){var t=this.childAt(0);return t&&t.getSymbolType()},e.prototype.updateData=function(t,n){var i=this,a=t.hostModel;this.childAt(0).updateData(t,n);var o=this.childAt(1),s=t.getItemModel(n),l=t.getItemVisual(n,"symbol"),u=Cd(t.getItemVisual(n,"symbolSize")),c=t.getItemVisual(n,"style"),h=c&&c.fill,f=s.getModel("emphasis");o.setScale(u),o.traverse(function(v){v.setStyle("fill",h)});var d=Jc(t.getItemVisual(n,"symbolOffset"),u);d&&(o.x=d[0],o.y=d[1]);var p=t.getItemVisual(n,"symbolRotate");o.rotation=(p||0)*Math.PI/180||0;var g={};g.showEffectOn=a.get("showEffectOn"),g.rippleScale=s.get(["rippleEffect","scale"]),g.brushType=s.get(["rippleEffect","brushType"]),g.period=s.get(["rippleEffect","period"])*1e3,g.effectOffset=n/t.count(),g.z=a.getShallow("z")||0,g.zlevel=a.getShallow("zlevel")||0,g.symbolType=l,g.color=h,g.rippleEffectColor=s.get(["rippleEffect","color"]),g.rippleNumber=s.get(["rippleEffect","number"]),g.showEffectOn==="render"?(this._effectCfg?this.updateEffectAnimation(g):this.startEffectAnimation(g),this._effectCfg=g):(this._effectCfg=null,this.stopEffectAnimation(),this.onHoverStateChange=function(v){v==="emphasis"?g.showEffectOn!=="render"&&i.startEffectAnimation(g):v==="normal"&&g.showEffectOn!=="render"&&i.stopEffectAnimation()}),this._effectCfg=g,Rn(this,f.get("focus"),f.get("blurScope"),f.get("disabled"))},e.prototype.fadeOut=function(t){t&&t()},e}(rt);const Nxe=Ixe;var kxe=function(r){ae(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._symbolDraw=new Ig(Nxe)},e.prototype.render=function(t,n,i){var a=t.getData(),o=this._symbolDraw;o.updateData(a,{clipShape:this._getClipShape(t)}),this.group.add(o.group)},e.prototype._getClipShape=function(t){var n=t.coordinateSystem,i=n&&n.getArea&&n.getArea();return t.get("clip",!0)?i:null},e.prototype.updateTransform=function(t,n,i){var a=t.getData();this.group.dirty();var o=kg("").reset(t,n,i);o.progress&&o.progress({start:0,end:a.count(),count:a.count()},a),this._symbolDraw.updateLayout()},e.prototype._updateGroupTransform=function(t){var n=t.coordinateSystem;n&&n.getRoamTransform&&(this.group.transform=uoe(n.getRoamTransform()),this.group.decomposeTransform())},e.prototype.remove=function(t,n){this._symbolDraw&&this._symbolDraw.remove(!0)},e.type="effectScatter",e}(gn);const Oxe=kxe;var Fxe=function(r){ae(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 Us(null,this,{useEncodeDefaulter:!0})},e.prototype.brushSelector=function(t,n,i){return i.point(n.getItemLayout(t))},e.type="series.effectScatter",e.dependencies=["grid","polar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,effectType:"ripple",progressive:0,showEffectOn:"render",clip:!0,rippleEffect:{period:4,scale:2.5,brushType:"fill",number:3},universalTransition:{divideShape:"clone"},symbolSize:10},e}(En);const Bxe=Fxe;function zxe(r){r.registerChartView(Oxe),r.registerSeriesModel(Bxe),r.registerLayout(kg("effectScatter"))}var Uxe=function(r){ae(e,r);function e(t,n,i){var a=r.call(this)||this;return a.add(a.createLine(t,n,i)),a._updateEffectSymbol(t,n),a}return e.prototype.createLine=function(t,n,i){return new fE(t,n,i)},e.prototype._updateEffectSymbol=function(t,n){var i=t.getItemModel(n),a=i.getModel("effect"),o=a.get("symbolSize"),s=a.get("symbol");_e(o)||(o=[o,o]);var l=t.getItemVisual(n,"style"),u=a.get("color")||l&&l.stroke,c=this.childAt(1);this._symbolType!==s&&(this.remove(c),c=rr(s,-.5,-.5,1,1,u),c.z2=100,c.culling=!0,this.add(c)),c&&(c.setStyle("shadowColor",u),c.setStyle(a.getItemStyle(["color"])),c.scaleX=o[0],c.scaleY=o[1],c.setColor(u),this._symbolType=s,this._symbolScale=o,this._updateEffectAnimation(t,a,n))},e.prototype._updateEffectAnimation=function(t,n,i){var a=this.childAt(1);if(a){var o=t.getItemLayout(i),s=n.get("period")*1e3,l=n.get("loop"),u=n.get("roundTrip"),c=n.get("constantSpeed"),h=Mr(n.get("delay"),function(d){return d/t.count()*s/3});if(a.ignore=!0,this._updateAnimationPoints(a,o),c>0&&(s=this._getLineLength(a)/c*1e3),s!==this._period||l!==this._loop||u!==this._roundTrip){a.stopAnimation();var f=void 0;qe(h)?f=h(i):f=h,a.__t>0&&(f=-s*a.__t),this._animateSymbol(a,s,f,l,u)}this._period=s,this._loop=l,this._roundTrip=u}},e.prototype._animateSymbol=function(t,n,i,a,o){if(n>0){t.__t=0;var s=this,l=t.animate("",a).when(o?n*2:n,{__t:o?2:1}).delay(i).during(function(){s._updateSymbolPosition(t)});a||l.done(function(){s.remove(t)}),l.start()}},e.prototype._getLineLength=function(t){return bl(t.__p1,t.__cp1)+bl(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,i){this.childAt(0).updateData(t,n,i),this._updateEffectSymbol(t,n)},e.prototype._updateSymbolPosition=function(t){var n=t.__p1,i=t.__p2,a=t.__cp1,o=t.__t<1?t.__t:2-t.__t,s=[t.x,t.y],l=s.slice(),u=Tr,c=eT;s[0]=u(n[0],a[0],i[0],o),s[1]=u(n[1],a[1],i[1],o);var h=t.__t<1?c(n[0],a[0],i[0],o):c(i[0],a[0],n[0],1-o),f=t.__t<1?c(n[1],a[1],i[1],o):c(i[1],a[1],n[1],1-o);t.rotation=-Math.atan2(f,h)-Math.PI/2,(this._symbolType==="line"||this._symbolType==="rect"||this._symbolType==="roundRect")&&(t.__lastT!==void 0&&t.__lastT<t.__t?(t.scaleY=bl(l,s)*1.05,o===1&&(s[0]=l[0]+(s[0]-l[0])/2,s[1]=l[1]+(s[1]-l[1])/2)):t.__lastT===1?t.scaleY=2*bl(n,s):t.scaleY=this._symbolScale[1]),t.__lastT=t.__t,t.ignore=!1,t.x=s[0],t.y=s[1]},e.prototype.updateLayout=function(t,n){this.childAt(0).updateLayout(t,n);var i=t.getItemModel(n).getModel("effect");this._updateEffectAnimation(t,i,n)},e}(rt);const N6=Uxe;var Vxe=function(r){ae(e,r);function e(t,n,i){var a=r.call(this)||this;return a._createPolyline(t,n,i),a}return e.prototype._createPolyline=function(t,n,i){var a=t.getItemLayout(n),o=new Ui({shape:{points:a}});this.add(o),this._updateCommonStl(t,n,i)},e.prototype.updateData=function(t,n,i){var a=t.hostModel,o=this.childAt(0),s={shape:{points:t.getItemLayout(n)}};zt(o,s,a,n),this._updateCommonStl(t,n,i)},e.prototype._updateCommonStl=function(t,n,i){var a=this.childAt(0),o=t.getItemModel(n),s=i&&i.emphasisLineStyle,l=i&&i.focus,u=i&&i.blurScope,c=i&&i.emphasisDisabled;if(!i||t.hasItemOption){var h=o.getModel("emphasis");s=h.getModel("lineStyle").getLineStyle(),c=h.get("disabled"),l=h.get("focus"),u=h.get("blurScope")}a.useStyle(t.getItemVisual(n,"style")),a.style.fill=null,a.style.strokeNoScale=!0;var f=a.ensureState("emphasis");f.style=s,Rn(this,l,u,c)},e.prototype.updateLayout=function(t,n){var i=this.childAt(0);i.setShape("points",t.getItemLayout(n))},e}(rt);const k6=Vxe;var Gxe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._lastFrame=0,t._lastFramePercent=0,t}return e.prototype.createLine=function(t,n,i){return new k6(t,n,i)},e.prototype._updateAnimationPoints=function(t,n){this._points=n;for(var i=[0],a=0,o=1;o<n.length;o++){var s=n[o-1],l=n[o];a+=bl(s,l),i.push(a)}if(a===0){this._length=0;return}for(var o=0;o<i.length;o++)i[o]/=a;this._offsets=i,this._length=a},e.prototype._getLineLength=function(){return this._length},e.prototype._updateSymbolPosition=function(t){var n=t.__t<1?t.__t:2-t.__t,i=this._points,a=this._offsets,o=i.length;if(a){var s=this._lastFrame,l;if(n<this._lastFramePercent){var u=Math.min(s+1,o-1);for(l=u;l>=0&&!(a[l]<=n);l--);l=Math.min(l,o-2)}else{for(l=s;l<o&&!(a[l]>n);l++);l=Math.min(l-1,o-2)}var c=(n-a[l])/(a[l+1]-a[l]),h=i[l],f=i[l+1];t.x=h[0]*(1-c)+c*f[0],t.y=h[1]*(1-c)+c*f[1];var d=t.__t<1?f[0]-h[0]:h[0]-f[0],p=t.__t<1?f[1]-h[1]:h[1]-f[1];t.rotation=-Math.atan2(p,d)-Math.PI/2,this._lastFrame=l,this._lastFramePercent=n,t.ignore=!1}},e}(N6);const Hxe=Gxe;var Wxe=function(){function r(){this.polyline=!1,this.curveness=0,this.segs=[]}return r}(),$xe=function(r){ae(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:"#000",fill:null}},e.prototype.getDefaultShape=function(){return new Wxe},e.prototype.buildPath=function(t,n){var i=n.segs,a=n.curveness,o;if(n.polyline)for(o=this._off;o<i.length;){var s=i[o++];if(s>0){t.moveTo(i[o++],i[o++]);for(var l=1;l<s;l++)t.lineTo(i[o++],i[o++])}}else for(o=this._off;o<i.length;){var u=i[o++],c=i[o++],h=i[o++],f=i[o++];if(t.moveTo(u,c),a>0){var d=(u+h)/2-(c-f)*a,p=(c+f)/2-(h-u)*a;t.quadraticCurveTo(d,p,h,f)}else t.lineTo(h,f)}this.incremental&&(this._off=o,this.notClear=!0)},e.prototype.findDataIndex=function(t,n){var i=this.shape,a=i.segs,o=i.curveness,s=this.style.lineWidth;if(i.polyline)for(var l=0,u=0;u<a.length;){var c=a[u++];if(c>0)for(var h=a[u++],f=a[u++],d=1;d<c;d++){var p=a[u++],g=a[u++];if(dl(h,f,p,g,s,t,n))return l}l++}else for(var l=0,u=0;u<a.length;){var h=a[u++],f=a[u++],p=a[u++],g=a[u++];if(o>0){var v=(h+p)/2-(f-g)*o,m=(f+g)/2-(p-h)*o;if(z4(h,f,v,m,p,g,s,t,n))return l}else if(dl(h,f,p,g,s,t,n))return l;l++}return-1},e.prototype.contain=function(t,n){var i=this.transformCoordToLocal(t,n),a=this.getBoundingRect();if(t=i[0],n=i[1],a.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,i=n.segs,a=1/0,o=1/0,s=-1/0,l=-1/0,u=0;u<i.length;){var c=i[u++],h=i[u++];a=Math.min(c,a),s=Math.max(c,s),o=Math.min(h,o),l=Math.max(h,l)}t=this._rect=new dt(a,o,s,l)}return t},e}(yt),Xxe=function(){function r(){this.group=new rt}return r.prototype.updateData=function(e){this._clear();var t=this._create();t.setShape({segs:e.getLayout("linesPoints")}),this._setCommon(t,e)},r.prototype.incrementalPrepareUpdate=function(e){this.group.removeAll(),this._clear()},r.prototype.incrementalUpdate=function(e,t){var n=this._newAdded[0],i=t.getLayout("linesPoints"),a=n&&n.shape.segs;if(a&&a.length<2e4){var o=a.length,s=new Float32Array(o+i.length);s.set(a),s.set(i,o),n.setShape({segs:s})}else{this._newAdded=[];var l=this._create();l.incremental=!0,l.setShape({segs:i}),this._setCommon(l,t),l.__startIndex=e.start}},r.prototype.remove=function(){this._clear()},r.prototype.eachRendered=function(e){this._newAdded[0]&&e(this._newAdded[0])},r.prototype._create=function(){var e=new $xe({cursor:"default",ignoreCoarsePointer:!0});return this._newAdded.push(e),this.group.add(e),e},r.prototype._setCommon=function(e,t,n){var i=t.hostModel;e.setShape({polyline:i.get("polyline"),curveness:i.get(["lineStyle","curveness"])}),e.useStyle(i.getModel("lineStyle").getLineStyle()),e.style.strokeNoScale=!0;var a=t.getVisual("style");a&&a.stroke&&e.setStyle("stroke",a.stroke),e.setStyle("fill",null);var o=at(e);o.seriesIndex=i.seriesIndex,e.on("mousemove",function(s){o.dataIndex=null;var l=e.hoverDataIdx;l>0&&(o.dataIndex=l+e.__startIndex)})},r.prototype._clear=function(){this._newAdded=[],this.group.removeAll()},r}();const Yxe=Xxe;var qxe={seriesType:"lines",plan:Td(),reset:function(r){var e=r.coordinateSystem;if(e){var t=r.get("polyline"),n=r.pipelineContext.large;return{progress:function(i,a){var o=[];if(n){var s=void 0,l=i.end-i.start;if(t){for(var u=0,c=i.start;c<i.end;c++)u+=r.getLineCoordsCount(c);s=new Float32Array(l+u*2)}else s=new Float32Array(l*4);for(var h=0,f=[],c=i.start;c<i.end;c++){var d=r.getLineCoords(c,o);t&&(s[h++]=d);for(var p=0;p<d;p++)f=e.dataToPoint(o[p],!1,f),s[h++]=f[0],s[h++]=f[1]}a.setLayout("linesPoints",s)}else for(var c=i.start;c<i.end;c++){var g=a.getItemModel(c),d=r.getLineCoords(c,o),v=[];if(t)for(var m=0;m<d;m++)v.push(e.dataToPoint(o[m]));else{v[0]=e.dataToPoint(o[0]),v[1]=e.dataToPoint(o[1]);var y=g.get(["lineStyle","curveness"]);+y&&(v[2]=[(v[0][0]+v[1][0])/2-(v[0][1]-v[1][1])*y,(v[0][1]+v[1][1])/2-(v[1][0]-v[0][0])*y])}a.setItemLayout(c,v)}}}}}};const O6=qxe;var jxe=function(r){ae(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,i){var a=t.getData(),o=this._updateLineDraw(a,t),s=t.get("zlevel"),l=t.get(["effect","trailLength"]),u=i.getZr(),c=u.painter.getType()==="svg";c||u.painter.getLayer(s).clear(!0),this._lastZlevel!=null&&!c&&u.configLayer(this._lastZlevel,{motionBlur:!1}),this._showEffect(t)&&l>0&&(c||u.configLayer(s,{motionBlur:!0,lastFrameAlpha:Math.max(Math.min(l/10+.9,1),0)})),o.updateData(a);var h=t.get("clip",!0)&&Ng(t.coordinateSystem,!1,t);h?this.group.setClipPath(h):this.group.removeClipPath(),this._lastZlevel=s,this._finished=!0},e.prototype.incrementalPrepareRender=function(t,n,i){var a=t.getData(),o=this._updateLineDraw(a,t);o.incrementalPrepareUpdate(a),this._clearLayer(i),this._finished=!1},e.prototype.incrementalRender=function(t,n,i){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,i){var a=t.getData(),o=t.pipelineContext;if(!this._finished||o.large||o.progressiveRender)return{update:!0};var s=O6.reset(t,n,i);s.progress&&s.progress({start:0,end:a.count(),count:a.count()},a),this._lineDraw.updateLayout(),this._clearLayer(i)},e.prototype._updateLineDraw=function(t,n){var i=this._lineDraw,a=this._showEffect(n),o=!!n.get("polyline"),s=n.pipelineContext,l=s.large;return(!i||a!==this._hasEffet||o!==this._isPolyline||l!==this._isLargeDraw)&&(i&&i.remove(),i=this._lineDraw=l?new Yxe:new dE(o?a?Hxe:k6:a?N6:fE),this._hasEffet=a,this._isPolyline=o,this._isLargeDraw=l),this.group.add(i.group),i},e.prototype._showEffect=function(t){return!!t.get(["effect","show"])},e.prototype._clearLayer=function(t){var n=t.getZr(),i=n.painter.getType()==="svg";!i&&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}(gn);const Kxe=jxe;var Zxe=typeof Uint32Array=="undefined"?Array:Uint32Array,Qxe=typeof Float64Array=="undefined"?Array:Float64Array;function DO(r){var e=r.data;e&&e[0]&&e[0][0]&&e[0][0].coord&&(r.data=xe(e,function(t){var n=[t[0].coord,t[1].coord],i={coords:n};return t[0].name&&(i.fromName=t[0].name),t[1].name&&(i.toName=t[1].name),GC([i,t[0],t[1]])}))}var Jxe=function(r){ae(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||[],DO(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(DO(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=Fv(this._flatCoords,n.flatCoords),this._flatCoordsOffset=Fv(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),i=n.option instanceof Array?n.option:n.getShallow("coords");return i},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 i=this._flatCoordsOffset[t*2],a=this._flatCoordsOffset[t*2+1],o=0;o<a;o++)n[o]=n[o]||[],n[o][0]=this._flatCoords[i+o*2],n[o][1]=this._flatCoords[i+o*2+1];return a}else{for(var s=this._getCoordsFromItemModel(t),o=0;o<s.length;o++)n[o]=n[o]||[],n[o][0]=s[o][0],n[o][1]=s[o][1];return s.length}},e.prototype._processFlatCoordsArray=function(t){var n=0;if(this._flatCoords&&(n=this._flatCoords.length),Ft(t[0])){for(var i=t.length,a=new Zxe(i),o=new Qxe(i),s=0,l=0,u=0,c=0;c<i;){u++;var h=t[c++];a[l++]=s+n,a[l++]=h;for(var f=0;f<h;f++){var d=t[c++],p=t[c++];o[s++]=d,o[s++]=p}}return{flatCoordsOffset:new Uint32Array(a.buffer,0,l),flatCoords:o,count:u}}return{flatCoordsOffset:null,flatCoords:null,count:t.length}},e.prototype.getInitialData=function(t,n){var i=new vi(["value"],this);return i.hasItemOption=!1,i.initData(t.data,[],function(a,o,s,l){if(a instanceof Array)return NaN;i.hasItemOption=!0;var u=a.value;if(u!=null)return u instanceof Array?u[l]:u}),i},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=a.getItemModel(t),s=o.get("name");if(s)return s;var l=o.get("fromName"),u=o.get("toName"),c=[];return l!=null&&c.push(l),u!=null&&c.push(u),Ar("nameValue",{name:c.join(" > ")})},e.prototype.preventIncremental=function(){return!!this.get(["effect","show"])},e.prototype.getProgressive=function(){var t=this.option.progressive;return t==null?this.option.large?1e4:this.get("progressive"):t},e.prototype.getProgressiveThreshold=function(){var t=this.option.progressiveThreshold;return t==null?this.option.large?2e4:this.get("progressiveThreshold"):t},e.prototype.getZLevelKey=function(){var t=this.getModel("effect"),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}(En);const eSe=Jxe;function Ly(r){return r instanceof Array||(r=[r,r]),r}var tSe={seriesType:"lines",reset:function(r){var e=Ly(r.get("symbol")),t=Ly(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 i(a,o){var s=a.getItemModel(o),l=Ly(s.getShallow("symbol",!0)),u=Ly(s.getShallow("symbolSize",!0));l[0]&&a.setItemVisual(o,"fromSymbol",l[0]),l[1]&&a.setItemVisual(o,"toSymbol",l[1]),u[0]&&a.setItemVisual(o,"fromSymbolSize",u[0]),u[1]&&a.setItemVisual(o,"toSymbolSize",u[1])}return{dataEach:n.hasItemOption?i:null}}};const nSe=tSe;function rSe(r){r.registerChartView(Kxe),r.registerSeriesModel(eSe),r.registerLayout(O6),r.registerVisual(nSe)}var iSe=256,aSe=function(){function r(){this.blurSize=30,this.pointSize=20,this.maxOpacity=1,this.minOpacity=0,this._gradientPixels={inRange:null,outOfRange:null};var e=ql.createCanvas();this.canvas=e}return r.prototype.update=function(e,t,n,i,a,o){var s=this._getBrush(),l=this._getGradient(a,"inRange"),u=this._getGradient(a,"outOfRange"),c=this.pointSize+this.blurSize,h=this.canvas,f=h.getContext("2d"),d=e.length;h.width=t,h.height=n;for(var p=0;p<d;++p){var g=e[p],v=g[0],m=g[1],y=g[2],_=i(y);f.globalAlpha=_,f.drawImage(s,v-c,m-c)}if(!h.width||!h.height)return h;for(var x=f.getImageData(0,0,h.width,h.height),S=x.data,A=0,w=S.length,M=this.minOpacity,C=this.maxOpacity,b=C-M;A<w;){var _=S[A+3]/256,T=Math.floor(_*(iSe-1))*4;if(_>0){var P=o(_)?l:u;_>0&&(_=_*b+M),S[A++]=P[T],S[A++]=P[T+1],S[A++]=P[T+2],S[A++]=P[T+3]*_*256}else A+=4}return f.putImageData(x,0,0),h},r.prototype._getBrush=function(){var e=this._brushCanvas||(this._brushCanvas=ql.createCanvas()),t=this.pointSize+this.blurSize,n=t*2;e.width=n,e.height=n;var i=e.getContext("2d");return i.clearRect(0,0,n,n),i.shadowOffsetX=n,i.shadowBlur=this.blurSize,i.shadowColor="#000",i.beginPath(),i.arc(-t,t,this.pointSize,0,Math.PI*2,!0),i.closePath(),i.fill(),e},r.prototype._getGradient=function(e,t){for(var n=this._gradientPixels,i=n[t]||(n[t]=new Uint8ClampedArray(256*4)),a=[0,0,0,0],o=0,s=0;s<256;s++)e[t](s/255,!0,a),i[o++]=a[0],i[o++]=a[1],i[o++]=a[2],i[o++]=a[3];return i},r}();const oSe=aSe;function sSe(r,e,t){var n=r[1]-r[0];e=xe(e,function(o){return{interval:[(o.interval[0]-r[0])/n,(o.interval[1]-r[0])/n]}});var i=e.length,a=0;return function(o){var s;for(s=a;s<i;s++){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}if(s===i)for(s=a-1;s>=0;s--){var l=e[s].interval;if(l[0]<=o&&o<=l[1]){a=s;break}}return s>=0&&s<i&&t[s]}}function lSe(r,e){var t=r[1]-r[0];return e=[(e[0]-r[0])/t,(e[1]-r[0])/t],function(n){return n>=e[0]&&n<=e[1]}}function IO(r){var e=r.dimensions;return e[0]==="lng"&&e[1]==="lat"}var uSe=function(r){ae(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,i){var a;n.eachComponent("visualMap",function(s){s.eachTargetSeries(function(l){l===t&&(a=s)})}),this._progressiveEls=null,this.group.removeAll();var o=t.coordinateSystem;o.type==="cartesian2d"||o.type==="calendar"?this._renderOnCartesianAndCalendar(t,i,0,t.getData().count()):IO(o)&&this._renderOnGeo(o,t,a,i)},e.prototype.incrementalPrepareRender=function(t,n,i){this.group.removeAll()},e.prototype.incrementalRender=function(t,n,i,a){var o=n.coordinateSystem;o&&(IO(o)?this.render(n,i,a):(this._progressiveEls=[],this._renderOnCartesianAndCalendar(n,a,t.start,t.end,!0)))},e.prototype.eachRendered=function(t){ou(this._progressiveEls||this.group,t)},e.prototype._renderOnCartesianAndCalendar=function(t,n,i,a,o){var s=t.coordinateSystem,l=th(s,"cartesian2d"),u,c,h,f;if(l){var d=s.getAxis("x"),p=s.getAxis("y");u=d.getBandWidth()+.5,c=p.getBandWidth()+.5,h=d.scale.getExtent(),f=p.scale.getExtent()}for(var g=this.group,v=t.getData(),m=t.getModel(["emphasis","itemStyle"]).getItemStyle(),y=t.getModel(["blur","itemStyle"]).getItemStyle(),_=t.getModel(["select","itemStyle"]).getItemStyle(),x=t.get(["itemStyle","borderRadius"]),S=Sr(t),A=t.getModel("emphasis"),w=A.get("focus"),M=A.get("blurScope"),C=A.get("disabled"),b=l?[v.mapDimension("x"),v.mapDimension("y"),v.mapDimension("value")]:[v.mapDimension("time"),v.mapDimension("value")],T=i;T<a;T++){var P=void 0,D=v.getItemVisual(T,"style");if(l){var L=v.get(b[0],T),E=v.get(b[1],T);if(isNaN(v.get(b[2],T))||isNaN(L)||isNaN(E)||L<h[0]||L>h[1]||E<f[0]||E>f[1])continue;var I=s.dataToPoint([L,E]);P=new Dt({shape:{x:I[0]-u/2,y:I[1]-c/2,width:u,height:c},style:D})}else{if(isNaN(v.get(b[1],T)))continue;P=new Dt({z2:1,shape:s.dataToRect([v.get(b[0],T)]).contentShape,style:D})}if(v.hasItemOption){var N=v.getItemModel(T),R=N.getModel("emphasis");m=R.getModel("itemStyle").getItemStyle(),y=N.getModel(["blur","itemStyle"]).getItemStyle(),_=N.getModel(["select","itemStyle"]).getItemStyle(),x=N.get(["itemStyle","borderRadius"]),w=R.get("focus"),M=R.get("blurScope"),C=R.get("disabled"),S=Sr(N)}P.shape.r=x;var F=t.getRawValue(T),O="-";F&&F[2]!=null&&(O=F[2]+""),zr(P,S,{labelFetcher:t,labelDataIndex:T,defaultOpacity:D.opacity,defaultText:O}),P.ensureState("emphasis").style=m,P.ensureState("blur").style=y,P.ensureState("select").style=_,Rn(P,w,M,C),P.incremental=o,o&&(P.states.emphasis.hoverLayer=!0),g.add(P),v.setItemGraphicEl(T,P),this._progressiveEls&&this._progressiveEls.push(P)}},e.prototype._renderOnGeo=function(t,n,i,a){var o=i.targetVisuals.inRange,s=i.targetVisuals.outOfRange,l=n.getData(),u=this._hmLayer||this._hmLayer||new oSe;u.blurSize=n.get("blurSize"),u.pointSize=n.get("pointSize"),u.minOpacity=n.get("minOpacity"),u.maxOpacity=n.get("maxOpacity");var c=t.getViewRect().clone(),h=t.getRoamTransform();c.applyTransform(h);var f=Math.max(c.x,0),d=Math.max(c.y,0),p=Math.min(c.width+c.x,a.getWidth()),g=Math.min(c.height+c.y,a.getHeight()),v=p-f,m=g-d,y=[l.mapDimension("lng"),l.mapDimension("lat"),l.mapDimension("value")],_=l.mapArray(y,function(w,M,C){var b=t.dataToPoint([w,M]);return b[0]-=f,b[1]-=d,b.push(C),b}),x=i.getExtent(),S=i.type==="visualMap.continuous"?lSe(x,i.option.range):sSe(x,i.getPieceList(),i.option.selected);u.update(_,v,m,o.color.getNormalizer(),{inRange:o.color.getColorMapper(),outOfRange:s.color.getColorMapper()},S);var A=new Ur({style:{width:v,height:m,x:f,y:d,image:u.canvas},silent:!0});this.group.add(A)},e.type="heatmap",e}(gn);const cSe=uSe;var hSe=function(r){ae(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 Us(null,this,{generateCoord:"value"})},e.prototype.preventIncremental=function(){var t=Eg.get(this.get("coordinateSystem"));if(t&&t.dimensions)return t.dimensions[0]==="lng"&&t.dimensions[1]==="lat"},e.type="series.heatmap",e.dependencies=["grid","geo","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,geoIndex:0,blurSize:30,pointSize:20,maxOpacity:1,minOpacity:0,select:{itemStyle:{borderColor:"#212121"}}},e}(En);const fSe=hSe;function dSe(r){r.registerChartView(cSe),r.registerSeriesModel(fSe)}var pSe=["itemStyle","borderWidth"],NO=[{xy:"x",wh:"width",index:0,posDesc:["left","right"]},{xy:"y",wh:"height",index:1,posDesc:["top","bottom"]}],_w=new au,vSe=function(r){ae(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,i){var a=this.group,o=t.getData(),s=this._data,l=t.coordinateSystem,u=l.getBaseAxis(),c=u.isHorizontal(),h=l.master.getRect(),f={ecSize:{width:i.getWidth(),height:i.getHeight()},seriesModel:t,coordSys:l,coordSysExtent:[[h.x,h.x+h.width],[h.y,h.y+h.height]],isHorizontal:c,valueDim:NO[+c],categoryDim:NO[1-+c]};o.diff(s).add(function(p){if(o.hasValue(p)){var g=OO(o,p),v=kO(o,p,g,f),m=FO(o,f,v);o.setItemGraphicEl(p,m),a.add(m),zO(m,f,v)}}).update(function(p,g){var v=s.getItemGraphicEl(g);if(!o.hasValue(p)){a.remove(v);return}var m=OO(o,p),y=kO(o,p,m,f),_=G6(o,y);v&&_!==v.__pictorialShapeStr&&(a.remove(v),o.setItemGraphicEl(p,null),v=null),v?ASe(v,f,y):v=FO(o,f,y,!0),o.setItemGraphicEl(p,v),v.__pictorialSymbolMeta=y,a.add(v),zO(v,f,y)}).remove(function(p){var g=s.getItemGraphicEl(p);g&&BO(s,p,g.__pictorialSymbolMeta.animationModel,g)}).execute();var d=t.get("clip",!0)?Ng(t.coordinateSystem,!1,t):null;return d?a.setClipPath(d):a.removeClipPath(),this._data=o,this.group},e.prototype.remove=function(t,n){var i=this.group,a=this._data;t.get("animation")?a&&a.eachItemGraphicEl(function(o){BO(a,at(o).dataIndex,t,o)}):i.removeAll()},e.type="pictorialBar",e}(gn);function kO(r,e,t,n){var i=r.getItemLayout(e),a=t.get("symbolRepeat"),o=t.get("symbolClip"),s=t.get("symbolPosition")||"start",l=t.get("symbolRotate"),u=(l||0)*Math.PI/180||0,c=t.get("symbolPatternSize")||2,h=t.isAnimationEnabled(),f={dataIndex:e,layout:i,itemModel:t,symbolType:r.getItemVisual(e,"symbol")||"circle",style:r.getItemVisual(e,"style"),symbolClip:o,symbolRepeat:a,symbolRepeatDirection:t.get("symbolRepeatDirection"),symbolPatternSize:c,rotation:u,animationModel:h?t:null,hoverScale:h&&t.get(["emphasis","scale"]),z2:t.getShallow("z",!0)||0};gSe(t,a,i,n,f),mSe(r,e,i,a,o,f.boundingLength,f.pxSign,c,n,f),ySe(t,f.symbolScale,u,n,f);var d=f.symbolSize,p=Jc(t.get("symbolOffset"),d);return _Se(t,d,i,a,o,p,s,f.valueLineWidth,f.boundingLength,f.repeatCutLength,n,f),f}function gSe(r,e,t,n,i){var a=n.valueDim,o=r.get("symbolBoundingData"),s=n.coordSys.getOtherAxis(n.coordSys.getBaseAxis()),l=s.toGlobalCoord(s.dataToCoord(0)),u=1-+(t[a.wh]<=0),c;if(_e(o)){var h=[xw(s,o[0])-l,xw(s,o[1])-l];h[1]<h[0]&&h.reverse(),c=h[u]}else o!=null?c=xw(s,o)-l:e?c=n.coordSysExtent[a.index][u]-l:c=t[a.wh];i.boundingLength=c,e&&(i.repeatCutLength=t[a.wh]);var f=a.xy==="x",d=s.inverse;i.pxSign=f&&!d||!f&&d?c>=0?1:-1:c>0?1:-1}function xw(r,e){return r.toGlobalCoord(r.dataToCoord(r.scale.parse(e)))}function mSe(r,e,t,n,i,a,o,s,l,u){var c=l.valueDim,h=l.categoryDim,f=Math.abs(t[h.wh]),d=r.getItemVisual(e,"symbolSize"),p;_e(d)?p=d.slice():d==null?p=["100%","100%"]:p=[d,d],p[h.index]=Pe(p[h.index],f),p[c.index]=Pe(p[c.index],n?f:Math.abs(a)),u.symbolSize=p;var g=u.symbolScale=[p[0]/s,p[1]/s];g[c.index]*=(l.isHorizontal?-1:1)*o}function ySe(r,e,t,n,i){var a=r.get(pSe)||0;a&&(_w.attr({scaleX:e[0],scaleY:e[1],rotation:t}),_w.updateTransform(),a/=_w.getLineScale(),a*=e[n.valueDim.index]),i.valueLineWidth=a||0}function _Se(r,e,t,n,i,a,o,s,l,u,c,h){var f=c.categoryDim,d=c.valueDim,p=h.pxSign,g=Math.max(e[d.index]+s,0),v=g;if(n){var m=Math.abs(l),y=Mr(r.get("symbolMargin"),"15%")+"",_=!1;y.lastIndexOf("!")===y.length-1&&(_=!0,y=y.slice(0,y.length-1));var x=Pe(y,e[d.index]),S=Math.max(g+x*2,0),A=_?0:x*2,w=T4(n),M=w?n:UO((m+A)/S),C=m-M*g;x=C/2/(_?M:Math.max(M-1,1)),S=g+x*2,A=_?0:x*2,!w&&n!=="fixed"&&(M=u?UO((Math.abs(u)+A)/S):0),v=M*S-A,h.repeatTimes=M,h.symbolMargin=x}var b=p*(v/2),T=h.pathPosition=[];T[f.index]=t[f.wh]/2,T[d.index]=o==="start"?b:o==="end"?l-b:l/2,a&&(T[0]+=a[0],T[1]+=a[1]);var P=h.bundlePosition=[];P[f.index]=t[f.xy],P[d.index]=t[d.xy];var D=h.barRectShape=pe({},t);D[d.wh]=p*Math.max(Math.abs(t[d.wh]),Math.abs(T[d.index]+b)),D[f.wh]=t[f.wh];var L=h.clipShape={};L[f.xy]=-t[f.xy],L[f.wh]=c.ecSize[f.wh],L[d.xy]=0,L[d.wh]=t[d.wh]}function F6(r){var e=r.symbolPatternSize,t=rr(r.symbolType,-e/2,-e/2,e,e);return t.attr({culling:!0}),t.type!=="image"&&t.setStyle({strokeNoScale:!0}),t}function B6(r,e,t,n){var i=r.__pictorialBundle,a=t.symbolSize,o=t.valueLineWidth,s=t.pathPosition,l=e.valueDim,u=t.repeatTimes||0,c=0,h=a[e.valueDim.index]+o+t.symbolMargin*2;for(wE(r,function(g){g.__pictorialAnimationIndex=c,g.__pictorialRepeatTimes=u,c<u?Pf(g,null,p(c),t,n):Pf(g,null,{scaleX:0,scaleY:0},t,n,function(){i.remove(g)}),c++});c<u;c++){var f=F6(t);f.__pictorialAnimationIndex=c,f.__pictorialRepeatTimes=u,i.add(f);var d=p(c);Pf(f,{x:d.x,y:d.y,scaleX:0,scaleY:0},{scaleX:d.scaleX,scaleY:d.scaleY,rotation:d.rotation},t,n)}function p(g){var v=s.slice(),m=t.pxSign,y=g;return(t.symbolRepeatDirection==="start"?m>0:m<0)&&(y=u-1-g),v[l.index]=h*(y-u/2+.5)+s[l.index],{x:v[0],y:v[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation}}}function z6(r,e,t,n){var i=r.__pictorialBundle,a=r.__pictorialMainPath;a?Pf(a,null,{x:t.pathPosition[0],y:t.pathPosition[1],scaleX:t.symbolScale[0],scaleY:t.symbolScale[1],rotation:t.rotation},t,n):(a=r.__pictorialMainPath=F6(t),i.add(a),Pf(a,{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 U6(r,e,t){var n=pe({},e.barRectShape),i=r.__pictorialBarRect;i?Pf(i,null,{shape:n},e,t):(i=r.__pictorialBarRect=new Dt({z2:2,shape:n,silent:!0,style:{stroke:"transparent",fill:"transparent",lineWidth:0}}),i.disableMorphing=!0,r.add(i))}function V6(r,e,t,n){if(t.symbolClip){var i=r.__pictorialClipPath,a=pe({},t.clipShape),o=e.valueDim,s=t.animationModel,l=t.dataIndex;if(i)zt(i,{shape:a},s,l);else{a[o.wh]=0,i=new Dt({shape:a}),r.__pictorialBundle.setClipPath(i),r.__pictorialClipPath=i;var u={};u[o.wh]=t.clipShape[o.wh],Zc[n?"updateProps":"initProps"](i,{shape:u},s,l)}}}function OO(r,e){var t=r.getItemModel(e);return t.getAnimationDelayParams=xSe,t.isAnimationEnabled=SSe,t}function xSe(r){return{index:r.__pictorialAnimationIndex,count:r.__pictorialRepeatTimes}}function SSe(){return this.parentModel.isAnimationEnabled()&&!!this.getShallow("animation")}function FO(r,e,t,n){var i=new rt,a=new rt;return i.add(a),i.__pictorialBundle=a,a.x=t.bundlePosition[0],a.y=t.bundlePosition[1],t.symbolRepeat?B6(i,e,t):z6(i,e,t),U6(i,t,n),V6(i,e,t,n),i.__pictorialShapeStr=G6(r,t),i.__pictorialSymbolMeta=t,i}function ASe(r,e,t){var n=t.animationModel,i=t.dataIndex,a=r.__pictorialBundle;zt(a,{x:t.bundlePosition[0],y:t.bundlePosition[1]},n,i),t.symbolRepeat?B6(r,e,t,!0):z6(r,e,t,!0),U6(r,t,!0),V6(r,e,t,!0)}function BO(r,e,t,n){var i=n.__pictorialBarRect;i&&i.removeTextContent();var a=[];wE(n,function(o){a.push(o)}),n.__pictorialMainPath&&a.push(n.__pictorialMainPath),n.__pictorialClipPath&&(t=null),k(a,function(o){Kl(o,{scaleX:0,scaleY:0},t,e,function(){n.parent&&n.parent.remove(n)})}),r.setItemGraphicEl(e,null)}function G6(r,e){return[r.getItemVisual(e.dataIndex,"symbol")||"none",!!e.symbolRepeat,!!e.symbolClip].join(":")}function wE(r,e,t){k(r.__pictorialBundle.children(),function(n){n!==r.__pictorialBarRect&&e.call(t,n)})}function Pf(r,e,t,n,i,a){e&&r.attr(e),n.symbolClip&&!i?t&&r.attr(t):t&&Zc[i?"updateProps":"initProps"](r,t,n.animationModel,n.dataIndex,a)}function zO(r,e,t){var n=t.dataIndex,i=t.itemModel,a=i.getModel("emphasis"),o=a.getModel("itemStyle").getItemStyle(),s=i.getModel(["blur","itemStyle"]).getItemStyle(),l=i.getModel(["select","itemStyle"]).getItemStyle(),u=i.getShallow("cursor"),c=a.get("focus"),h=a.get("blurScope"),f=a.get("scale");wE(r,function(g){if(g instanceof Ur){var v=g.style;g.useStyle(pe({image:v.image,x:v.x,y:v.y,width:v.width,height:v.height},t.style))}else g.useStyle(t.style);var m=g.ensureState("emphasis");m.style=o,f&&(m.scaleX=g.scaleX*1.1,m.scaleY=g.scaleY*1.1),g.ensureState("blur").style=s,g.ensureState("select").style=l,u&&(g.cursor=u),g.z2=t.z2});var d=e.valueDim.posDesc[+(t.boundingLength>0)],p=r.__pictorialBarRect;p.ignoreClip=!0,zr(p,Sr(i),{labelFetcher:e.seriesModel,labelDataIndex:n,defaultText:nd(e.seriesModel.getData(),n),inheritColor:t.style.fill,defaultOpacity:t.style.opacity,defaultOutsidePosition:d}),Rn(r,c,h,a.get("disabled"))}function UO(r){var e=Math.round(r);return Math.abs(r-e)<1e-4?e:Math.ceil(r)}const wSe=vSe;var bSe=function(r){ae(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=su(w_.defaultOption,{symbol:"circle",symbolSize:null,symbolRotate:null,symbolPosition:null,symbolOffset:null,symbolMargin:null,symbolRepeat:!1,symbolRepeatDirection:"end",symbolClip:!1,symbolBoundingData:null,symbolPatternSize:400,barGap:"-100%",clip:!1,progressive:0,emphasis:{scale:!1},select:{itemStyle:{borderColor:"#212121"}}}),e}(w_);const TSe=bSe;function MSe(r){r.registerChartView(wSe),r.registerSeriesModel(TSe),r.registerLayout(r.PRIORITY.VISUAL.LAYOUT,ut(xH,"pictorialBar")),r.registerLayout(r.PRIORITY.VISUAL.PROGRESSIVE_LAYOUT,SH("pictorialBar"))}var CSe=function(r){ae(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,i){var a=t.getData(),o=this,s=this.group,l=t.getLayerSeries(),u=a.getLayout("layoutInfo"),c=u.rect,h=u.boundaryGap;s.x=0,s.y=c.y+h[0];function f(v){return v.name}var d=new Ns(this._layersSeries||[],l,f,f),p=[];d.add(Fe(g,this,"add")).update(Fe(g,this,"update")).remove(Fe(g,this,"remove")).execute();function g(v,m,y){var _=o._layers;if(v==="remove"){s.remove(_[m]);return}for(var x=[],S=[],A,w=l[m].indices,M=0;M<w.length;M++){var C=a.getItemLayout(w[M]),b=C.x,T=C.y0,P=C.y;x.push(b,T),S.push(b,T+P),A=a.getItemVisual(w[M],"style")}var D,L=a.getItemLayout(w[0]),E=t.getModel("label"),I=E.get("margin"),N=t.getModel("emphasis");if(v==="add"){var R=p[m]=new rt;D=new h8({shape:{points:x,stackedOnPoints:S,smooth:.4,stackedOnSmooth:.4,smoothConstraint:!1},z2:0}),R.add(D),s.add(R),t.isAnimationEnabled()&&D.setClipPath(ESe(D.getBoundingRect(),t,function(){D.removeClipPath()}))}else{var R=_[y];D=R.childAt(0),s.add(R),p[m]=R,zt(D,{shape:{points:x,stackedOnPoints:S}},t),lo(D)}zr(D,Sr(t),{labelDataIndex:w[M-1],defaultText:a.getName(w[M-1]),inheritColor:A.fill},{normal:{verticalAlign:"middle"}}),D.setTextConfig({position:null,local:!0});var F=D.getTextContent();F&&(F.x=L.x-I,F.y=L.y0+L.y/2),D.useStyle(A),a.setItemGraphicEl(m,D),Br(D,t),Rn(D,N.get("focus"),N.get("blurScope"),N.get("disabled"))}this._layersSeries=l,this._layers=p},e.type="themeRiver",e}(gn);function ESe(r,e,t){var n=new Dt({shape:{x:r.x-10,y:r.y-10,width:0,height:r.height+20}});return Tn(n,{shape:{x:r.x-50,width:r.width+100,height:r.height+20}},e,t),n}const LSe=CSe;var Sw=2,PSe=function(r){ae(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 Fg(Fe(this.getData,this),Fe(this.getRawData,this))},e.prototype.fixData=function(t){var n=t.length,i={},a=vT(t,function(f){return i.hasOwnProperty(f[0]+"")||(i[f[0]+""]=-1),f[2]}),o=[];a.buckets.each(function(f,d){o.push({name:d,dataList:f})});for(var s=o.length,l=0;l<s;++l){for(var u=o[l].name,c=0;c<o[l].dataList.length;++c){var h=o[l].dataList[c][0]+"";i[h]=l}for(var h in i)i.hasOwnProperty(h)&&i[h]!==l&&(i[h]=l,t[n]=[h,0,u],n++)}return t},e.prototype.getInitialData=function(t,n){for(var i=this.getReferringComponents("singleAxis",nr).models[0],a=i.get("type"),o=jt(t.data,function(p){return p[2]!==void 0}),s=this.fixData(o||[]),l=[],u=this.nameMap=He(),c=0,h=0;h<s.length;++h)l.push(s[h][Sw]),u.get(s[h][Sw])||(u.set(s[h][Sw],c),c++);var f=Pg(s,{coordDimensions:["single"],dimensionsDefine:[{name:"time",type:y_(a)},{name:"value",type:"float"},{name:"name",type:"ordinal"}],encodeDefine:{single:0,value:1,itemName:2}}).dimensions,d=new vi(f,this);return d.initData(s),d},e.prototype.getLayerSeries=function(){for(var t=this.getData(),n=t.count(),i=[],a=0;a<n;++a)i[a]=a;var o=t.mapDimension("single"),s=vT(i,function(u){return t.get("name",u)}),l=[];return s.buckets.each(function(u,c){u.sort(function(h,f){return t.get(o,h)-t.get(o,f)}),l.push({name:c,indices:u})}),l},e.prototype.getAxisTooltipData=function(t,n,i){_e(t)||(t=t?[t]:[]);for(var a=this.getData(),o=this.getLayerSeries(),s=[],l=o.length,u,c=0;c<l;++c){for(var h=Number.MAX_VALUE,f=-1,d=o[c].indices.length,p=0;p<d;++p){var g=a.get(t[0],o[c].indices[p]),v=Math.abs(g-n);v<=h&&(u=g,h=v,f=o[c].indices[p])}s.push(f)}return{dataIndices:s,nestestValue:u}},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=a.getName(t),s=a.get(a.mapDimension("value"),t);return Ar("nameValue",{name:o,value:s})},e.type="series.themeRiver",e.dependencies=["singleAxis"],e.defaultOption={z:2,colorBy:"data",coordinateSystem:"singleAxis",boundaryGap:["10%","10%"],singleAxisIndex:0,animationEasing:"linear",label:{margin:4,show:!0,position:"left",fontSize:11},emphasis:{label:{show:!0}}},e}(En);const RSe=PSe;function DSe(r,e){r.eachSeriesByType("themeRiver",function(t){var n=t.getData(),i=t.coordinateSystem,a={},o=i.getRect();a.rect=o;var s=t.get("boundaryGap"),l=i.getAxis();if(a.boundaryGap=s,l.orient==="horizontal"){s[0]=Pe(s[0],o.height),s[1]=Pe(s[1],o.height);var u=o.height-s[0]-s[1];VO(n,t,u)}else{s[0]=Pe(s[0],o.width),s[1]=Pe(s[1],o.width);var c=o.width-s[0]-s[1];VO(n,t,c)}n.setLayout("layoutInfo",a)})}function VO(r,e,t){if(r.count())for(var n=e.coordinateSystem,i=e.getLayerSeries(),a=r.mapDimension("single"),o=r.mapDimension("value"),s=xe(i,function(v){return xe(v.indices,function(m){var y=n.dataToPoint(r.get(a,m));return y[1]=r.get(o,m),y})}),l=ISe(s),u=l.y0,c=t/l.max,h=i.length,f=i[0].indices.length,d,p=0;p<f;++p){d=u[p]*c,r.setItemLayout(i[0].indices[p],{layerIndex:0,x:s[0][p][0],y0:d,y:s[0][p][1]*c});for(var g=1;g<h;++g)d+=s[g-1][p][1]*c,r.setItemLayout(i[g].indices[p],{layerIndex:g,x:s[g][p][0],y0:d,y:s[g][p][1]*c})}}function ISe(r){for(var e=r.length,t=r[0].length,n=[],i=[],a=0,o=0;o<t;++o){for(var s=0,l=0;l<e;++l)s+=r[l][o][1];s>a&&(a=s),n.push(s)}for(var u=0;u<t;++u)i[u]=(a-n[u])/2;a=0;for(var c=0;c<t;++c){var h=n[c]+i[c];h>a&&(a=h)}return{y0:i,max:a}}function NSe(r){r.registerChartView(LSe),r.registerSeriesModel(RSe),r.registerLayout(DSe),r.registerProcessor(Og("themeRiver"))}var kSe=2,OSe=4,FSe=function(r){ae(e,r);function e(t,n,i,a){var o=r.call(this)||this;o.z2=kSe,o.textConfig={inside:!0},at(o).seriesIndex=n.seriesIndex;var s=new Ot({z2:OSe,silent:t.getModel().get(["label","silent"])});return o.setTextContent(s),o.updateData(!0,t,n,i,a),o}return e.prototype.updateData=function(t,n,i,a,o){this.node=n,n.piece=this,i=i||this._seriesModel,a=a||this._ecModel;var s=this;at(s).dataIndex=n.dataIndex;var l=n.getModel(),u=l.getModel("emphasis"),c=n.getLayout(),h=pe({},c);h.label=null;var f=n.getVisual("style");f.lineJoin="bevel";var d=n.getVisual("decal");d&&(f.decal=ed(d,o));var p=hc(l.getModel("itemStyle"),h,!0);pe(h,p),k(mi,function(y){var _=s.ensureState(y),x=l.getModel([y,"itemStyle"]);_.style=x.getItemStyle();var S=hc(x,h);S&&(_.shape=S)}),t?(s.setShape(h),s.shape.r=c.r0,Tn(s,{shape:{r:c.r}},i,n.dataIndex)):(zt(s,{shape:h},i),lo(s)),s.useStyle(f),this._updateLabel(i);var g=l.getShallow("cursor");g&&s.attr("cursor",g),this._seriesModel=i||this._seriesModel,this._ecModel=a||this._ecModel;var v=u.get("focus"),m=v==="relative"?Fv(n.getAncestorsIndices(),n.getDescendantIndices()):v==="ancestor"?n.getAncestorsIndices():v==="descendant"?n.getDescendantIndices():v;Rn(this,m,u.get("blurScope"),u.get("disabled"))},e.prototype._updateLabel=function(t){var n=this,i=this.node.getModel(),a=i.getModel("label"),o=this.node.getLayout(),s=o.endAngle-o.startAngle,l=(o.startAngle+o.endAngle)/2,u=Math.cos(l),c=Math.sin(l),h=this,f=h.getTextContent(),d=this.node.dataIndex,p=a.get("minAngle")/180*Math.PI,g=a.get("show")&&!(p!=null&&Math.abs(s)<p);f.ignore=!g,k(Wv,function(m){var y=m==="normal"?i.getModel("label"):i.getModel([m,"label"]),_=m==="normal",x=_?f:f.ensureState(m),S=t.getFormattedLabel(d,m);_&&(S=S||n.node.name),x.style=pn(y,{},null,m!=="normal",!0),S&&(x.style.text=S);var A=y.get("show");A!=null&&!_&&(x.ignore=!A);var w=v(y,"position"),M=_?h:h.states[m],C=M.style.fill;M.textConfig={outsideFill:y.get("color")==="inherit"?C:null,inside:w!=="outside"};var b,T=v(y,"distance")||0,P=v(y,"align"),D=v(y,"rotate"),L=Math.PI*.5,E=Math.PI*1.5,I=Qi(D==="tangential"?Math.PI/2-l:l),N=I>L&&!Vv(I-L)&&I<E;w==="outside"?(b=o.r+T,P=N?"right":"left"):!P||P==="center"?(s===2*Math.PI&&o.r0===0?b=0:b=(o.r+o.r0)/2,P="center"):P==="left"?(b=o.r0+T,P=N?"right":"left"):P==="right"&&(b=o.r-T,P=N?"left":"right"),x.style.align=P,x.style.verticalAlign=v(y,"verticalAlign")||"middle",x.x=b*u+o.cx,x.y=b*c+o.cy;var R=0;D==="radial"?R=Qi(-l)+(N?Math.PI:0):D==="tangential"?R=Qi(Math.PI/2-l)+(N?Math.PI:0):Ft(D)&&(R=D*Math.PI/180),x.rotation=Qi(R)});function v(m,y){var _=m.get(y);return _==null?a.get(y):_}f.dirtyStyle()},e}(Bi);const GO=FSe;var dM="sunburstRootToNode",HO="sunburstHighlight",BSe="sunburstUnhighlight";function zSe(r){r.registerAction({type:dM,update:"updateView"},function(e,t){t.eachComponent({mainType:"series",subType:"sunburst",query:e},n);function n(i,a){var o=rg(e,[dM],i);if(o){var s=i.getViewRoot();s&&(e.direction=oE(s,o.node)?"rollUp":"drillDown"),i.resetViewRoot(o.node)}}}),r.registerAction({type:HO,update:"none"},function(e,t,n){e=pe({},e),t.eachComponent({mainType:"series",subType:"sunburst",query:e},i);function i(a){var o=rg(e,[HO],a);o&&(e.dataIndex=o.node.dataIndex)}n.dispatchAction(pe(e,{type:"highlight"}))}),r.registerAction({type:BSe,update:"updateView"},function(e,t,n){e=pe({},e),n.dispatchAction(pe(e,{type:"downplay"}))})}var USe=function(r){ae(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,i,a){var o=this;this.seriesModel=t,this.api=i,this.ecModel=n;var s=t.getData(),l=s.tree.root,u=t.getViewRoot(),c=this.group,h=t.get("renderLabelForZeroData"),f=[];u.eachNode(function(y){f.push(y)});var d=this._oldChildren||[];p(f,d),m(l,u),this._initEvents(),this._oldChildren=f;function p(y,_){if(y.length===0&&_.length===0)return;new Ns(_,y,x,x).add(S).update(S).remove(ut(S,null)).execute();function x(A){return A.getId()}function S(A,w){var M=A==null?null:y[A],C=w==null?null:_[w];g(M,C)}}function g(y,_){if(!h&&y&&!y.getValue()&&(y=null),y!==l&&_!==l){if(_&&_.piece)y?(_.piece.updateData(!1,y,t,n,i),s.setItemGraphicEl(y.dataIndex,_.piece)):v(_);else if(y){var x=new GO(y,t,n,i);c.add(x),s.setItemGraphicEl(y.dataIndex,x)}}}function v(y){y&&y.piece&&(c.remove(y.piece),y.piece=null)}function m(y,_){_.depth>0?(o.virtualPiece?o.virtualPiece.updateData(!1,y,t,n,i):(o.virtualPiece=new GO(y,t,n,i),c.add(o.virtualPiece)),_.piece.off("click"),o.virtualPiece.on("click",function(x){o._rootToNode(_.parentNode)})):o.virtualPiece&&(c.remove(o.virtualPiece),o.virtualPiece=null)}},e.prototype._initEvents=function(){var t=this;this.group.off("click"),this.group.on("click",function(n){var i=!1,a=t.seriesModel.getViewRoot();a.eachNode(function(o){if(!i&&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 c=l.get("target",!0)||"_blank";c_(u,c)}}i=!0}})})},e.prototype._rootToNode=function(t){t!==this.seriesModel.getViewRoot()&&this.api.dispatchAction({type:dM,from:this.uid,seriesId:this.seriesModel.id,targetNode:t})},e.prototype.containPoint=function(t,n){var i=n.getData(),a=i.getItemLayout(0);if(a){var o=t[0]-a.cx,s=t[1]-a.cy,l=Math.sqrt(o*o+s*s);return l<=a.r&&l>=a.r0}},e.type="sunburst",e}(gn);const VSe=USe;var GSe=function(r){ae(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 i={name:t.name,children:t.data};H6(i);var a=this._levelModels=xe(t.levels||[],function(l){return new vn(l,this,n)},this),o=aE.createTree(i,this,s);function s(l){l.wrapMethod("getItemModel",function(u,c){var h=o.getNodeByDataIndex(c),f=a[h.depth];return f&&(u.parentModel=f),u})}return o.data},e.prototype.optionUpdated=function(){this.resetViewRoot()},e.prototype.getDataParams=function(t){var n=r.prototype.getDataParams.apply(this,arguments),i=this.getData().tree.getNodeByDataIndex(t);return n.treePathInfo=j1(i,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(){Y8(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}(En);function H6(r){var e=0;k(r.children,function(n){H6(n);var i=n.value;_e(i)&&(i=i[0]),e+=i});var t=r.value;_e(t)&&(t=t[0]),(t==null||isNaN(t))&&(t=e),t<0&&(t=0),_e(r.value)?r.value[0]=t:r.value=t}const HSe=GSe;var WO=Math.PI/180;function WSe(r,e,t){e.eachSeriesByType(r,function(n){var i=n.get("center"),a=n.get("radius");_e(a)||(a=[0,a]),_e(i)||(i=[i,i]);var o=t.getWidth(),s=t.getHeight(),l=Math.min(o,s),u=Pe(i[0],o),c=Pe(i[1],s),h=Pe(a[0],l/2),f=Pe(a[1],l/2),d=-n.get("startAngle")*WO,p=n.get("minAngle")*WO,g=n.getData().tree.root,v=n.getViewRoot(),m=v.depth,y=n.get("sort");y!=null&&W6(v,y);var _=0;k(v.children,function(I){!isNaN(I.getValue())&&_++});var x=v.getValue(),S=Math.PI/(x||_)*2,A=v.depth>0,w=v.height-(A?-1:1),M=(f-h)/(w||1),C=n.get("clockwise"),b=n.get("stillShowZeroSum"),T=C?1:-1,P=function(I,N){if(I){var R=N;if(I!==g){var F=I.getValue(),O=x===0&&b?S:F*S;O<p&&(O=p),R=N+T*O;var V=I.depth-m-(A?-1:1),H=h+M*V,Q=h+M*(V+1),W=n.getLevelModel(I);if(W){var Z=W.get("r0",!0),ee=W.get("r",!0),he=W.get("radius",!0);he!=null&&(Z=he[0],ee=he[1]),Z!=null&&(H=Pe(Z,l/2)),ee!=null&&(Q=Pe(ee,l/2))}I.setLayout({angle:O,startAngle:N,endAngle:R,clockwise:C,cx:u,cy:c,r0:H,r:Q})}if(I.children&&I.children.length){var le=0;k(I.children,function(re){le+=P(re,N+le)})}return R-N}};if(A){var D=h,L=h+M,E=Math.PI*2;g.setLayout({angle:E,startAngle:d,endAngle:d+E,clockwise:C,cx:u,cy:c,r0:D,r:L})}P(v,d)})}function W6(r,e){var t=r.children||[];r.children=$Se(t,e),t.length&&k(r.children,function(n){W6(n,e)})}function $Se(r,e){if(qe(e)){var t=xe(r,function(i,a){var o=i.getValue();return{params:{depth:i.depth,height:i.height,dataIndex:i.dataIndex,getValue:function(){return o}},index:a}});return t.sort(function(i,a){return e(i.params,a.params)}),xe(t,function(i){return r[i.index]})}else{var n=e==="asc";return r.sort(function(i,a){var o=(i.getValue()-a.getValue())*(n?1:-1);return o===0?(i.dataIndex-a.dataIndex)*(n?-1:1):o})}}function XSe(r){var e={};function t(n,i,a){for(var o=n;o&&o.depth>1;)o=o.parentNode;var s=i.getColorFromPalette(o.name||o.dataIndex+"",e);return n.depth>1&&ke(s)&&(s=rT(s,(n.depth-1)/(a-1)*.5)),s}r.eachSeriesByType("sunburst",function(n){var i=n.getData(),a=i.tree;a.eachNode(function(o){var s=o.getModel(),l=s.getModel("itemStyle").getItemStyle();l.fill||(l.fill=t(o,n,a.root.height));var u=i.ensureUniqueItemVisual(o.dataIndex,"style");pe(u,l)})})}function YSe(r){r.registerChartView(VSe),r.registerSeriesModel(HSe),r.registerLayout(ut(WSe,"sunburst")),r.registerProcessor(ut(Og,"sunburst")),r.registerVisual(XSe),zSe(r)}var $O={color:"fill",borderColor:"stroke"},qSe={symbol:1,symbolSize:1,symbolKeepAspect:1,legendIcon:1,visualMeta:1,liftZ:1,decal:1},bs=Pt(),jSe=function(r){ae(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 Us(null,this)},e.prototype.getDataParams=function(t,n,i){var a=r.prototype.getDataParams.call(this,t,n);return i&&(a.info=bs(i).info),a},e.type="series.custom",e.dependencies=["grid","polar","geo","singleAxis","calendar"],e.defaultOption={coordinateSystem:"cartesian2d",z:2,legendHoverLink:!0,clip:!1},e}(En);const KSe=jSe;function ZSe(r,e){return e=e||[0,0],xe(["x","y"],function(t,n){var i=this.getAxis(t),a=e[n],o=r[n]/2;return i.type==="category"?i.getBandWidth():Math.abs(i.dataToCoord(a-o)-i.dataToCoord(a+o))},this)}function QSe(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:Fe(ZSe,r)}}}function JSe(r,e){return e=e||[0,0],xe([0,1],function(t){var n=e[t],i=r[t]/2,a=[],o=[];return a[t]=n-i,o[t]=n+i,a[1-t]=o[1-t]=e[1-t],Math.abs(this.dataToPoint(a)[t]-this.dataToPoint(o)[t])},this)}function eAe(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:Fe(JSe,r)}}}function tAe(r,e){var t=this.getAxis(),n=e instanceof Array?e[0]:e,i=(r instanceof Array?r[0]:r)/2;return t.type==="category"?t.getBandWidth():Math.abs(t.dataToCoord(n-i)-t.dataToCoord(n+i))}function nAe(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:Fe(tAe,r)}}}function rAe(r,e){return e=e||[0,0],xe(["Radius","Angle"],function(t,n){var i="get"+t+"Axis",a=this[i](),o=e[n],s=r[n]/2,l=a.type==="category"?a.getBandWidth():Math.abs(a.dataToCoord(o-s)-a.dataToCoord(o+s));return t==="Angle"&&(l=l*Math.PI/180),l},this)}function iAe(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(i){var a=e.dataToRadius(i[0]),o=t.dataToAngle(i[1]),s=r.coordToPoint([a,o]);return s.push(a,o*Math.PI/180),s},size:Fe(rAe,r)}}}function aAe(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,i){return r.dataToPoint(n,i)}}}}function $6(r,e,t,n){return r&&(r.legacy||r.legacy!==!1&&!t&&!n&&e!=="tspan"&&(e==="text"||ze(r,"text")))}function X6(r,e,t){var n=r,i,a,o;if(e==="text")o=n;else{o={},ze(n,"text")&&(o.text=n.text),ze(n,"rich")&&(o.rich=n.rich),ze(n,"textFill")&&(o.fill=n.textFill),ze(n,"textStroke")&&(o.stroke=n.textStroke),ze(n,"fontFamily")&&(o.fontFamily=n.fontFamily),ze(n,"fontSize")&&(o.fontSize=n.fontSize),ze(n,"fontStyle")&&(o.fontStyle=n.fontStyle),ze(n,"fontWeight")&&(o.fontWeight=n.fontWeight),a={type:"text",style:o,silent:!0},i={};var s=ze(n,"textPosition");t?i.position=s?n.textPosition:"inside":s&&(i.position=n.textPosition),ze(n,"textPosition")&&(i.position=n.textPosition),ze(n,"textOffset")&&(i.offset=n.textOffset),ze(n,"textRotation")&&(i.rotation=n.textRotation),ze(n,"textDistance")&&(i.distance=n.textDistance)}return XO(o,r),k(o.rich,function(l){XO(l,l)}),{textConfig:i,textContent:a}}function XO(r,e){e&&(e.font=e.textFont||e.font,ze(e,"textStrokeWidth")&&(r.lineWidth=e.textStrokeWidth),ze(e,"textAlign")&&(r.align=e.textAlign),ze(e,"textVerticalAlign")&&(r.verticalAlign=e.textVerticalAlign),ze(e,"textLineHeight")&&(r.lineHeight=e.textLineHeight),ze(e,"textWidth")&&(r.width=e.textWidth),ze(e,"textHeight")&&(r.height=e.textHeight),ze(e,"textBackgroundColor")&&(r.backgroundColor=e.textBackgroundColor),ze(e,"textPadding")&&(r.padding=e.textPadding),ze(e,"textBorderColor")&&(r.borderColor=e.textBorderColor),ze(e,"textBorderWidth")&&(r.borderWidth=e.textBorderWidth),ze(e,"textBorderRadius")&&(r.borderRadius=e.textBorderRadius),ze(e,"textBoxShadowColor")&&(r.shadowColor=e.textBoxShadowColor),ze(e,"textBoxShadowBlur")&&(r.shadowBlur=e.textBoxShadowBlur),ze(e,"textBoxShadowOffsetX")&&(r.shadowOffsetX=e.textBoxShadowOffsetX),ze(e,"textBoxShadowOffsetY")&&(r.shadowOffsetY=e.textBoxShadowOffsetY))}function YO(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 i=n.textPosition.indexOf("inside")>=0,a=r.fill||"#000";qO(n,e);var o=n.textFill==null;return i?o&&(n.textFill=t.insideFill||"#fff",!n.textStroke&&t.insideStroke&&(n.textStroke=t.insideStroke),!n.textStroke&&(n.textStroke=a),n.textStrokeWidth==null&&(n.textStrokeWidth=2)):(o&&(n.textFill=r.fill||t.outsideFill||"#000"),!n.textStroke&&t.outsideStroke&&(n.textStroke=t.outsideStroke)),n.text=e.text,n.rich=e.rich,k(e.rich,function(s){qO(s,s)}),n}function qO(r,e){e&&(ze(e,"fill")&&(r.textFill=e.fill),ze(e,"stroke")&&(r.textStroke=e.fill),ze(e,"lineWidth")&&(r.textStrokeWidth=e.lineWidth),ze(e,"font")&&(r.font=e.font),ze(e,"fontStyle")&&(r.fontStyle=e.fontStyle),ze(e,"fontWeight")&&(r.fontWeight=e.fontWeight),ze(e,"fontSize")&&(r.fontSize=e.fontSize),ze(e,"fontFamily")&&(r.fontFamily=e.fontFamily),ze(e,"align")&&(r.textAlign=e.align),ze(e,"verticalAlign")&&(r.textVerticalAlign=e.verticalAlign),ze(e,"lineHeight")&&(r.textLineHeight=e.lineHeight),ze(e,"width")&&(r.textWidth=e.width),ze(e,"height")&&(r.textHeight=e.height),ze(e,"backgroundColor")&&(r.textBackgroundColor=e.backgroundColor),ze(e,"padding")&&(r.textPadding=e.padding),ze(e,"borderColor")&&(r.textBorderColor=e.borderColor),ze(e,"borderWidth")&&(r.textBorderWidth=e.borderWidth),ze(e,"borderRadius")&&(r.textBorderRadius=e.borderRadius),ze(e,"shadowColor")&&(r.textBoxShadowColor=e.shadowColor),ze(e,"shadowBlur")&&(r.textBoxShadowBlur=e.shadowBlur),ze(e,"shadowOffsetX")&&(r.textBoxShadowOffsetX=e.shadowOffsetX),ze(e,"shadowOffsetY")&&(r.textBoxShadowOffsetY=e.shadowOffsetY),ze(e,"textShadowColor")&&(r.textShadowColor=e.textShadowColor),ze(e,"textShadowBlur")&&(r.textShadowBlur=e.textShadowBlur),ze(e,"textShadowOffsetX")&&(r.textShadowOffsetX=e.textShadowOffsetX),ze(e,"textShadowOffsetY")&&(r.textShadowOffsetY=e.textShadowOffsetY))}var Y6={position:["x","y"],scale:["scaleX","scaleY"],origin:["originX","originY"]},jO=wt(Y6);$o(Yo,function(r,e){return r[e]=1,r},{});Yo.join(", ");var R_=["","style","shape","extra"],ad=Pt();function bE(r,e,t,n,i){var a=r+"Animation",o=yd(r,n,i)||{},s=ad(e).userDuring;return o.duration>0&&(o.during=s?Fe(cAe,{el:e,userDuring:s}):null,o.setToFinal=!0,o.scope=r),pe(o,t[a]),o}function p0(r,e,t,n){n=n||{};var i=n.dataIndex,a=n.isInit,o=n.clearStyle,s=t.isAnimationEnabled(),l=ad(r),u=e.style;l.userDuring=e.during;var c={},h={};if(fAe(r,e,h),ZO("shape",e,h),ZO("extra",e,h),!a&&s&&(hAe(r,e,c),KO("shape",r,e,c),KO("extra",r,e,c),dAe(r,e,u,c)),h.style=u,oAe(r,h,o),lAe(r,e),s)if(a){var f={};k(R_,function(p){var g=p?e[p]:e;g&&g.enterFrom&&(p&&(f[p]=f[p]||{}),pe(p?f[p]:f,g.enterFrom))});var d=bE("enter",r,e,t,i);d.duration>0&&r.animateFrom(f,d)}else sAe(r,e,i||0,t,c);q6(r,e),u?r.dirty():r.markRedraw()}function q6(r,e){for(var t=ad(r).leaveToProps,n=0;n<R_.length;n++){var i=R_[n],a=i?e[i]:e;a&&a.leaveTo&&(t||(t=ad(r).leaveToProps={}),i&&(t[i]=t[i]||{}),pe(i?t[i]:t,a.leaveTo))}}function Q1(r,e,t,n){if(r){var i=r.parent,a=ad(r).leaveToProps;if(a){var o=bE("update",r,e,t,0);o.done=function(){i.remove(r),n&&n()},r.animateTo(a,o)}else i.remove(r),n&&n()}}function Ic(r){return r==="all"}function oAe(r,e,t){var n=e.style;if(!r.isGroup&&n){if(t){r.useStyle({});for(var i=r.animators,a=0;a<i.length;a++){var o=i[a];o.targetName==="style"&&o.changeTarget(r.style)}}r.setStyle(n)}e&&(e.style=null,e&&r.attr(e),e.style=n)}function sAe(r,e,t,n,i){if(i){var a=bE("update",r,e,n,t);a.duration>0&&r.animateFrom(i,a)}}function lAe(r,e){ze(e,"silent")&&(r.silent=e.silent),ze(e,"ignore")&&(r.ignore=e.ignore),r instanceof ka&&ze(e,"invisible")&&(r.invisible=e.invisible),r instanceof yt&&ze(e,"autoBatch")&&(r.autoBatch=e.autoBatch)}var Ao={},uAe={setTransform:function(r,e){return Ao.el[r]=e,this},getTransform:function(r){return Ao.el[r]},setShape:function(r,e){var t=Ao.el,n=t.shape||(t.shape={});return n[r]=e,t.dirtyShape&&t.dirtyShape(),this},getShape:function(r){var e=Ao.el.shape;if(e)return e[r]},setStyle:function(r,e){var t=Ao.el,n=t.style;return n&&(n[r]=e,t.dirtyStyle&&t.dirtyStyle()),this},getStyle:function(r){var e=Ao.el.style;if(e)return e[r]},setExtra:function(r,e){var t=Ao.el.extra||(Ao.el.extra={});return t[r]=e,this},getExtra:function(r){var e=Ao.el.extra;if(e)return e[r]}};function cAe(){var r=this,e=r.el;if(e){var t=ad(e).userDuring,n=r.userDuring;if(t!==n){r.el=r.userDuring=null;return}Ao.el=e,n(uAe)}}function KO(r,e,t,n){var i=t[r];if(i){var a=e[r],o;if(a){var s=t.transition,l=i.transition;if(l)if(!o&&(o=n[r]={}),Ic(l))pe(o,a);else for(var u=nn(l),c=0;c<u.length;c++){var h=u[c],f=a[h];o[h]=f}else if(Ic(s)||pt(s,r)>=0){!o&&(o=n[r]={});for(var d=wt(a),c=0;c<d.length;c++){var h=d[c],f=a[h];pAe(i[h],f)&&(o[h]=f)}}}}}function ZO(r,e,t){var n=e[r];if(n)for(var i=t[r]={},a=wt(n),o=0;o<a.length;o++){var s=a[o];i[s]=tv(n[s])}}function hAe(r,e,t){for(var n=e.transition,i=Ic(n)?Yo:nn(n||[]),a=0;a<i.length;a++){var o=i[a];if(!(o==="style"||o==="shape"||o==="extra")){var s=r[o];t[o]=s}}}function fAe(r,e,t){for(var n=0;n<jO.length;n++){var i=jO[n],a=Y6[i],o=e[i];o&&(t[a[0]]=o[0],t[a[1]]=o[1])}for(var n=0;n<Yo.length;n++){var s=Yo[n];e[s]!=null&&(t[s]=e[s])}}function dAe(r,e,t,n){if(t){var i=r.style,a;if(i){var o=t.transition,s=e.transition;if(o&&!Ic(o)){var l=nn(o);!a&&(a=n.style={});for(var u=0;u<l.length;u++){var c=l[u],h=i[c];a[c]=h}}else if(r.getAnimationStyleProps&&(Ic(s)||Ic(o)||pt(s,"style")>=0)){var f=r.getAnimationStyleProps(),d=f?f.style:null;if(d){!a&&(a=n.style={});for(var p=wt(t),u=0;u<p.length;u++){var c=p[u];if(d[c]){var h=i[c];a[c]=h}}}}}}}function pAe(r,e){return ii(r)?r!==e:r!=null&&isFinite(r)}var j6=Pt(),vAe=["percent","easing","shape","style","extra"];function K6(r){r.stopAnimation("keyframe"),r.attr(j6(r))}function D_(r,e,t){if(!(!t.isAnimationEnabled()||!e)){if(_e(e)){k(e,function(s){D_(r,s,t)});return}var n=e.keyframes,i=e.duration;if(t&&i==null){var a=yd("enter",t,0);i=a&&a.duration}if(!(!n||!i)){var o=j6(r);k(R_,function(s){if(!(s&&!r[s])){var l;n.sort(function(u,c){return u.percent-c.percent}),k(n,function(u){var c=r.animators,h=s?u[s]:u;if(h){var f=wt(h);if(s||(f=jt(f,function(g){return pt(vAe,g)<0})),!!f.length){l||(l=r.animate(s,e.loop,!0),l.scope="keyframe");for(var d=0;d<c.length;d++)c[d]!==l&&c[d].targetName===l.targetName&&c[d].stopTracks(f);s&&(o[s]=o[s]||{});var p=s?o[s]:o;k(f,function(g){p[g]=((s?r[s]:r)||{})[g]}),l.whenWithKeys(i*u.percent,h,f,u.easing)}}}),l&&l.delay(e.delay||0).duration(i).start(e.easing)}})}}}var Ts="emphasis",Rl="normal",TE="blur",ME="select",tu=[Rl,Ts,TE,ME],Aw={normal:["itemStyle"],emphasis:[Ts,"itemStyle"],blur:[TE,"itemStyle"],select:[ME,"itemStyle"]},ww={normal:["label"],emphasis:[Ts,"label"],blur:[TE,"label"],select:[ME,"label"]},gAe=["x","y"],mAe="e\0\0",ha={normal:{},emphasis:{},blur:{},select:{}},yAe={cartesian2d:QSe,geo:eAe,single:nAe,polar:iAe,calendar:aAe};function pM(r){return r instanceof yt}function vM(r){return r instanceof ka}function _Ae(r,e){e.copyTransform(r),vM(e)&&vM(r)&&(e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel,e.invisible=r.invisible,e.ignore=r.ignore,pM(e)&&pM(r)&&e.setShape(r.shape))}var xAe=function(r){ae(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,i,a){this._progressiveEls=null;var o=this._data,s=t.getData(),l=this.group,u=QO(t,s,n,i);o||l.removeAll(),s.diff(o).add(function(h){bw(i,null,h,u(h,a),t,l,s)}).remove(function(h){var f=o.getItemGraphicEl(h);f&&Q1(f,bs(f).option,t)}).update(function(h,f){var d=o.getItemGraphicEl(f);bw(i,d,h,u(h,a),t,l,s)}).execute();var c=t.get("clip",!0)?Ng(t.coordinateSystem,!1,t):null;c?l.setClipPath(c):l.removeClipPath(),this._data=s},e.prototype.incrementalPrepareRender=function(t,n,i){this.group.removeAll(),this._data=null},e.prototype.incrementalRender=function(t,n,i,a,o){var s=n.getData(),l=QO(n,s,i,a),u=this._progressiveEls=[];function c(d){d.isGroup||(d.incremental=!0,d.ensureState("emphasis").hoverLayer=!0)}for(var h=t.start;h<t.end;h++){var f=bw(null,null,h,l(h,o),n,this.group,s);f&&(f.traverse(c),u.push(f))}},e.prototype.eachRendered=function(t){ou(this._progressiveEls||this.group,t)},e.prototype.filterForExposedEvent=function(t,n,i,a){var o=n.element;if(o==null||i.name===o)return!0;for(;(i=i.__hostTarget||i.parent)&&i!==this.group;)if(i.name===o)return!0;return!1},e.type="custom",e}(gn);const SAe=xAe;function CE(r){var e=r.type,t;if(e==="path"){var n=r.shape,i=n.width!=null&&n.height!=null?{x:n.x||0,y:n.y||0,width:n.width,height:n.height}:null,a=J6(n);t=C1(a,null,i,n.layout||"center"),bs(t).customPathData=a}else if(e==="image")t=new Ur({}),bs(t).customImagePath=r.style.image;else if(e==="text")t=new Ot({});else if(e==="group")t=new rt;else{if(e==="compoundPath")throw new Error('"compoundPath" is not supported yet.');var o=p2(e);if(!o){var s="";qt(s)}t=new o}return bs(t).customGraphicType=e,t.name=r.name,t.z2EmphasisLift=1,t.z2SelectLift=1,t}function EE(r,e,t,n,i,a,o){K6(e);var s=i&&i.normal.cfg;s&&e.setTextConfig(s),n&&n.transition==null&&(n.transition=gAe);var l=n&&n.style;if(l){if(e.type==="text"){var u=l;ze(u,"textFill")&&(u.fill=u.textFill),ze(u,"textStroke")&&(u.stroke=u.textStroke)}var c=void 0,h=pM(e)?l.decal:null;r&&h&&(h.dirty=!0,c=ed(h,r)),l.__decalPattern=c}if(vM(e)&&l){var c=l.__decalPattern;c&&(l.decal=c)}p0(e,n,a,{dataIndex:t,isInit:o,clearStyle:!0}),D_(e,n.keyframeAnimation,a)}function Z6(r,e,t,n,i){var a=e.isGroup?null:e,o=i&&i[r].cfg;if(a){var s=a.ensureState(r);if(n===!1){var l=a.getState(r);l&&(l.style=null)}else s.style=n||null;o&&(s.textConfig=o),Gc(a)}}function AAe(r,e,t){if(!r.isGroup){var n=r,i=t.currentZ,a=t.currentZLevel;n.z=i,n.zlevel=a;var o=e.z2;o!=null&&(n.z2=o||0);for(var s=0;s<tu.length;s++)wAe(n,e,tu[s])}}function wAe(r,e,t){var n=t===Rl,i=n?e:I_(e,t),a=i?i.z2:null,o;a!=null&&(o=n?r:r.ensureState(t),o.z2=a||0)}function QO(r,e,t,n){var i=r.get("renderItem"),a=r.coordinateSystem,o={};a&&(o=a.prepareCustoms?a.prepareCustoms(a):yAe[a.type](a));for(var s=Ke({getWidth:n.getWidth,getHeight:n.getHeight,getZr:n.getZr,getDevicePixelRatio:n.getDevicePixelRatio,value:x,style:A,ordinalRawValue:S,styleEmphasis:w,visual:b,barLayout:T,currentSeriesIndices:P,font:D},o.api||{}),l={context:{},seriesId:r.id,seriesName:r.name,seriesIndex:r.seriesIndex,coordSys:o.coordSys,dataInsideLength:e.count(),encode:bAe(r.getData())},u,c,h={},f={},d={},p={},g=0;g<tu.length;g++){var v=tu[g];d[v]=r.getModel(Aw[v]),p[v]=r.getModel(ww[v])}function m(L){return L===u?c||(c=e.getItemModel(L)):e.getItemModel(L)}function y(L,E){return e.hasItemOption?L===u?h[E]||(h[E]=m(L).getModel(Aw[E])):m(L).getModel(Aw[E]):d[E]}function _(L,E){return e.hasItemOption?L===u?f[E]||(f[E]=m(L).getModel(ww[E])):m(L).getModel(ww[E]):p[E]}return function(L,E){return u=L,c=null,h={},f={},i&&i(Ke({dataIndexInside:L,dataIndex:e.getRawIndex(L),actionType:E?E.type:null},l),s)};function x(L,E){return E==null&&(E=u),e.getStore().get(e.getDimensionIndex(L||0),E)}function S(L,E){E==null&&(E=u),L=L||0;var I=e.getDimensionInfo(L);if(!I){var N=e.getDimensionIndex(L);return N>=0?e.getStore().get(N,E):void 0}var R=e.get(I.name,E),F=I&&I.ordinalMeta;return F?F.categories[R]:R}function A(L,E){E==null&&(E=u);var I=e.getItemVisual(E,"style"),N=I&&I.fill,R=I&&I.opacity,F=y(E,Rl).getItemStyle();N!=null&&(F.fill=N),R!=null&&(F.opacity=R);var O={inheritColor:ke(N)?N:"#000"},V=_(E,Rl),H=pn(V,null,O,!1,!0);H.text=V.getShallow("show")?ot(r.getFormattedLabel(E,Rl),nd(e,E)):null;var Q=l_(V,O,!1);return C(L,F),F=YO(F,H,Q),L&&M(F,L),F.legacy=!0,F}function w(L,E){E==null&&(E=u);var I=y(E,Ts).getItemStyle(),N=_(E,Ts),R=pn(N,null,null,!0,!0);R.text=N.getShallow("show")?Go(r.getFormattedLabel(E,Ts),r.getFormattedLabel(E,Rl),nd(e,E)):null;var F=l_(N,null,!0);return C(L,I),I=YO(I,R,F),L&&M(I,L),I.legacy=!0,I}function M(L,E){for(var I in E)ze(E,I)&&(L[I]=E[I])}function C(L,E){L&&(L.textFill&&(E.textFill=L.textFill),L.textPosition&&(E.textPosition=L.textPosition))}function b(L,E){if(E==null&&(E=u),ze($O,L)){var I=e.getItemVisual(E,"style");return I?I[$O[L]]:null}if(ze(qSe,L))return e.getItemVisual(E,L)}function T(L){if(a.type==="cartesian2d"){var E=a.getBaseAxis();return bde(Ke({axis:E},L))}}function P(){return t.getCurrentSeriesIndices()}function D(L){return v2(L,t)}}function bAe(r){var e={};return k(r.dimensions,function(t){var n=r.getDimensionInfo(t);if(!n.isExtraCoord){var i=n.coordDim,a=e[i]=e[i]||[];a[n.coordDimIndex]=r.getDimensionIndex(t)}}),e}function bw(r,e,t,n,i,a,o){if(!n){a.remove(e);return}var s=LE(r,e,t,n,i,a);return s&&o.setItemGraphicEl(t,s),s&&Rn(s,n.focus,n.blurScope,n.emphasisDisabled),s}function LE(r,e,t,n,i,a){var o=-1,s=e;e&&Q6(e,n,i)&&(o=pt(a.childrenRef(),e),e=null);var l=!e,u=e;u?u.clearStates():(u=CE(n),s&&_Ae(s,u)),n.morph===!1?u.disableMorphing=!0:u.disableMorphing&&(u.disableMorphing=!1),ha.normal.cfg=ha.normal.conOpt=ha.emphasis.cfg=ha.emphasis.conOpt=ha.blur.cfg=ha.blur.conOpt=ha.select.cfg=ha.select.conOpt=null,ha.isLegacy=!1,MAe(u,t,n,i,l,ha),TAe(u,t,n,i,l),EE(r,u,t,n,ha,i,l),ze(n,"info")&&(bs(u).info=n.info);for(var c=0;c<tu.length;c++){var h=tu[c];if(h!==Rl){var f=I_(n,h),d=PE(n,f,h);Z6(h,u,f,d,ha)}}return AAe(u,n,i),n.type==="group"&&CAe(r,u,t,n,i),o>=0?a.replaceAt(u,o):a.add(u),u}function Q6(r,e,t){var n=bs(r),i=e.type,a=e.shape,o=e.style;return t.isUniversalTransitionEnabled()||i!=null&&i!==n.customGraphicType||i==="path"&&RAe(a)&&J6(a)!==n.customPathData||i==="image"&&ze(o,"image")&&o.image!==n.customImagePath}function TAe(r,e,t,n,i){var a=t.clipPath;if(a===!1)r&&r.getClipPath()&&r.removeClipPath();else if(a){var o=r.getClipPath();o&&Q6(o,a,n)&&(o=null),o||(o=CE(a),r.setClipPath(o)),EE(null,o,e,a,null,n,i)}}function MAe(r,e,t,n,i,a){if(!r.isGroup){JO(t,null,a),JO(t,Ts,a);var o=a.normal.conOpt,s=a.emphasis.conOpt,l=a.blur.conOpt,u=a.select.conOpt;if(o!=null||s!=null||u!=null||l!=null){var c=r.getTextContent();if(o===!1)c&&r.removeTextContent();else{o=a.normal.conOpt=o||{type:"text"},c?c.clearStates():(c=CE(o),r.setTextContent(c)),EE(null,c,e,o,null,n,i);for(var h=o&&o.style,f=0;f<tu.length;f++){var d=tu[f];if(d!==Rl){var p=a[d].conOpt;Z6(d,c,p,PE(o,p,d),null)}}h?c.dirty():c.markRedraw()}}}}function JO(r,e,t){var n=e?I_(r,e):r,i=e?PE(r,n,Ts):r.style,a=r.type,o=n?n.textConfig:null,s=r.textContent,l=s?e?I_(s,e):s:null;if(i&&(t.isLegacy||$6(i,a,!!o,!!l))){t.isLegacy=!0;var u=X6(i,a,!e);!o&&u.textConfig&&(o=u.textConfig),!l&&u.textContent&&(l=u.textContent)}if(!e&&l){var c=l;!c.type&&(c.type="text")}var h=e?t[e]:t.normal;h.cfg=o,h.conOpt=l}function I_(r,e){return e?r?r[e]:null:r}function PE(r,e,t){var n=e&&e.style;return n==null&&t===Ts&&r&&(n=r.styleEmphasis),n}function CAe(r,e,t,n,i){var a=n.children,o=a?a.length:0,s=n.$mergeChildren,l=s==="byName"||n.diffChildrenByName,u=s===!1;if(!(!o&&!l&&!u)){if(l){LAe({api:r,oldChildren:e.children()||[],newChildren:a||[],dataIndex:t,seriesModel:i,group:e});return}u&&e.removeAll();for(var c=0;c<o;c++){var h=a[c],f=e.childAt(c);h?(h.ignore==null&&(h.ignore=!1),LE(r,f,t,h,i,e)):f.ignore=!0}for(var d=e.childCount()-1;d>=c;d--){var p=e.childAt(d);EAe(e,p,i)}}}function EAe(r,e,t){e&&Q1(e,bs(r).option,t)}function LAe(r){new Ns(r.oldChildren,r.newChildren,eF,eF,r).add(tF).update(tF).remove(PAe).execute()}function eF(r,e){var t=r&&r.name;return t!=null?t:mAe+e}function tF(r,e){var t=this.context,n=r!=null?t.newChildren[r]:null,i=e!=null?t.oldChildren[e]:null;LE(t.api,i,t.dataIndex,n,t.seriesModel,t.group)}function PAe(r){var e=this.context,t=e.oldChildren[r];t&&Q1(t,bs(t).option,e.seriesModel)}function J6(r){return r&&(r.pathData||r.d)}function RAe(r){return r&&(ze(r,"pathData")||ze(r,"d"))}function DAe(r){r.registerChartView(SAe),r.registerSeriesModel(KSe)}var Ju=Pt(),nF=Je,Tw=Fe,IAe=function(){function r(){this._dragging=!1,this.animationThreshold=15}return r.prototype.render=function(e,t,n,i){var a=t.get("value"),o=t.get("status");if(this._axisModel=e,this._axisPointerModel=t,this._api=n,!(!i&&this._lastValue===a&&this._lastStatus===o)){this._lastValue=a,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,a,e,t,n);var c=u.graphicKey;c!==this._lastGraphicKey&&this.clear(n),this._lastGraphicKey=c;var h=this._moveAnimation=this.determineAnimation(e,t);if(!s)s=this._group=new rt,this.createPointerEl(s,u,e,t),this.createLabelEl(s,u,e,t),n.getZr().add(s);else{var f=ut(rF,t,h);this.updatePointerEl(s,u,f),this.updateLabelEl(s,u,f,t)}aF(s,t,!0),this._renderHandle(a)}},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"),i=e.axis,a=i.type==="category",o=t.get("snap");if(!o&&!a)return!1;if(n==="auto"||n==null){var s=this.animationThreshold;if(a&&i.getBandWidth()>s)return!0;if(o){var l=Q2(e).seriesDataCount,u=i.getExtent();return Math.abs(u[0]-u[1])/l>s}return!1}return n===!0},r.prototype.makeElOption=function(e,t,n,i,a){},r.prototype.createPointerEl=function(e,t,n,i){var a=t.pointer;if(a){var o=Ju(e).pointerEl=new Zc[a.type](nF(t.pointer));e.add(o)}},r.prototype.createLabelEl=function(e,t,n,i){if(t.label){var a=Ju(e).labelEl=new Ot(nF(t.label));e.add(a),iF(a,i)}},r.prototype.updatePointerEl=function(e,t,n){var i=Ju(e).pointerEl;i&&t.pointer&&(i.setStyle(t.pointer.style),n(i,{shape:t.pointer.shape}))},r.prototype.updateLabelEl=function(e,t,n,i){var a=Ju(e).labelEl;a&&(a.setStyle(t.label.style),n(a,{x:t.label.x,y:t.label.y}),iF(a,i))},r.prototype._renderHandle=function(e){if(!(this._dragging||!this.updateHandleTransform)){var t=this._axisPointerModel,n=this._api.getZr(),i=this._handle,a=t.getModel("handle"),o=t.get("status");if(!a.get("show")||!o||o==="hide"){i&&n.remove(i),this._handle=null;return}var s;this._handle||(s=!0,i=this._handle=Cg(a.get("icon"),{cursor:"move",draggable:!0,onmousemove:function(u){Ps(u.event)},onmousedown:Tw(this._onHandleDragMove,this,0,0),drift:Tw(this._onHandleDragMove,this),ondragend:Tw(this._onHandleDragEnd,this)}),n.add(i)),aF(i,t,!1),i.setStyle(a.getItemStyle(null,["color","borderColor","borderWidth","opacity","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"]));var l=a.get("size");_e(l)||(l=[l,l]),i.scaleX=l[0]/2,i.scaleY=l[1]/2,Md(this,"_doDispatchAxisPointer",a.get("throttle")||0,"fixRate"),this._moveHandleToValue(e,s)}},r.prototype._moveHandleToValue=function(e,t){rF(this._axisPointerModel,!t&&this._moveAnimation,this._handle,Mw(this.getHandleTransform(e,this._axisModel,this._axisPointerModel)))},r.prototype._onHandleDragMove=function(e,t){var n=this._handle;if(n){this._dragging=!0;var i=this.updateHandleTransform(Mw(n),[e,t],this._axisModel,this._axisPointerModel);this._payloadInfo=i,n.stopAnimation(),n.attr(Mw(i)),Ju(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,i=this._handle;t&&n&&(this._lastGraphicKey=null,n&&t.remove(n),i&&t.remove(i),this._group=null,this._handle=null,this._payloadInfo=null),Kv(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 rF(r,e,t,n){eW(Ju(t).lastProp,n)||(Ju(t).lastProp=n,e?zt(t,n,r):(t.stopAnimation(),t.attr(n)))}function eW(r,e){if(Qe(r)&&Qe(e)){var t=!0;return k(e,function(n,i){t=t&&eW(r[i],n)}),!!t}else return r===e}function iF(r,e){r[e.get(["label","show"])?"show":"hide"]()}function Mw(r){return{x:r.x||0,y:r.y||0,rotation:r.rotation||0}}function aF(r,e,t){var n=e.get("z"),i=e.get("zlevel");r&&r.traverse(function(a){a.type!=="group"&&(n!=null&&(a.z=n),i!=null&&(a.zlevel=i),a.silent=t)})}const RE=IAe;function DE(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 tW(r,e,t,n,i){var a=t.get("value"),o=nW(a,e.axis,e.ecModel,t.get("seriesDataIndices"),{precision:t.get(["label","precision"]),formatter:t.get(["label","formatter"])}),s=t.getModel("label"),l=Sd(s.get("padding")||0),u=s.getFont(),c=wg(o,u),h=i.position,f=c.width+l[1]+l[3],d=c.height+l[0]+l[2],p=i.align;p==="right"&&(h[0]-=f),p==="center"&&(h[0]-=f/2);var g=i.verticalAlign;g==="bottom"&&(h[1]-=d),g==="middle"&&(h[1]-=d/2),NAe(h,f,d,n);var v=s.get("backgroundColor");(!v||v==="auto")&&(v=e.get(["axisLine","lineStyle","color"])),r.label={x:h[0],y:h[1],style:pn(s,{text:o,font:u,fill:s.getTextColor(),padding:l,backgroundColor:v}),z2:10}}function NAe(r,e,t,n){var i=n.getWidth(),a=n.getHeight();r[0]=Math.min(r[0]+e,i)-e,r[1]=Math.min(r[1]+t,a)-t,r[0]=Math.max(r[0],0),r[1]=Math.max(r[1],0)}function nW(r,e,t,n,i){r=e.scale.parse(r);var a=e.scale.getLabel({value:r},{precision:i.precision}),o=i.formatter;if(o){var s={value:G2(e,{value:r}),axisDimension:e.dim,axisIndex:e.index,seriesData:[]};k(n,function(l){var u=t.getSeriesByIndex(l.seriesIndex),c=l.dataIndexInside,h=u&&u.getDataParams(c);h&&s.seriesData.push(h)}),ke(o)?a=o.replace("{value}",a):qe(o)&&(a=o(s))}return a}function IE(r,e,t){var n=ta();return jc(n,n,t.rotation),Xo(n,n,t.position),io([r.dataToCoord(e),(t.labelOffset||0)+(t.labelDirection||1)*(t.labelMargin||0)],n)}function rW(r,e,t,n,i,a){var o=ks.innerTextLayout(t.rotation,0,t.labelDirection);t.labelMargin=i.get(["label","margin"]),tW(e,n,i,a,{position:IE(n.axis,r,t),align:o.textAlign,verticalAlign:o.textVerticalAlign})}function NE(r,e,t){return t=t||0,{x1:r[t],y1:r[1-t],x2:e[t],y2:e[1-t]}}function iW(r,e,t){return t=t||0,{x:r[t],y:r[1-t],width:e[t],height:e[1-t]}}function oF(r,e,t,n,i,a){return{cx:r,cy:e,r0:t,r:n,startAngle:i,endAngle:a,clockwise:!0}}var kAe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.grid,u=a.get("type"),c=sF(l,s).getOtherAxis(s).getGlobalExtent(),h=s.toGlobalCoord(s.dataToCoord(n,!0));if(u&&u!=="none"){var f=DE(a),d=OAe[u](s,h,c);d.style=f,t.graphicKey=d.type,t.pointer=d}var p=ZT(l.model,i);rW(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=ZT(n.axis.grid.model,n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=IE(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.grid,l=o.getGlobalExtent(!0),u=sF(s,o).getOtherAxis(o).getGlobalExtent(),c=o.dim==="x"?0:1,h=[t.x,t.y];h[c]+=n[c],h[c]=Math.min(l[1],h[c]),h[c]=Math.max(l[0],h[c]);var f=(u[1]+u[0])/2,d=[f,f];d[c]=h[c];var p=[{verticalAlign:"middle"},{align:"center"}];return{x:h[0],y:h[1],rotation:t.rotation,cursorPoint:d,tooltipOption:p[c]}},e}(RE);function sF(r,e){var t={};return t[e.dim+"AxisIndex"]=e.index,r.getCartesian(t)}var OAe={line:function(r,e,t){var n=NE([e,t[0]],[e,t[1]],lF(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=Math.max(1,r.getBandWidth()),i=t[1]-t[0];return{type:"Rect",shape:iW([e-n/2,t[0]],[n,i],lF(r))}}};function lF(r){return r.dim==="x"?0:1}const FAe=kAe;var BAe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="axisPointer",e.defaultOption={show:"auto",z:50,type:"line",snap:!1,triggerTooltip:!0,triggerEmphasis:!0,value:null,status:null,link:[],animation:null,animationDurationUpdate:200,lineStyle:{color:"#B9BEC9",width:1,type:"dashed"},shadowStyle:{color:"rgba(210,219,238,0.2)"},label:{show:!0,formatter:null,precision:"auto",margin:3,color:"#fff",padding:[5,7,5,7],backgroundColor:"auto",borderColor:null,borderWidth:0,borderRadius:3},handle:{show:!1,icon:"M10.7,11.9v-1.3H9.3v1.3c-4.9,0.3-8.8,4.4-8.8,9.4c0,5,3.9,9.1,8.8,9.4h1.3c4.9-0.3,8.8-4.4,8.8-9.4C19.5,16.3,15.6,12.2,10.7,11.9z M13.3,24.4H6.7v-1.2h6.6z M13.3,22H6.7v-1.2h6.6z M13.3,19.6H6.7v-1.2h6.6z",size:45,margin:50,color:"#333",shadowBlur:3,shadowColor:"#aaa",shadowOffsetX:0,shadowOffsetY:2,throttle:40}},e}(Nt);const zAe=BAe;var xs=Pt(),UAe=k;function aW(r,e,t){if(!kt.node){var n=e.getZr();xs(n).records||(xs(n).records={}),VAe(n,e);var i=xs(n).records[r]||(xs(n).records[r]={});i.handler=t}}function VAe(r,e){if(xs(r).initialized)return;xs(r).initialized=!0,t("click",ut(uF,"click")),t("mousemove",ut(uF,"mousemove")),t("globalout",HAe);function t(n,i){r.on(n,function(a){var o=WAe(e);UAe(xs(r).records,function(s){s&&i(s,a,o.dispatchAction)}),GAe(o.pendings,e)})}}function GAe(r,e){var t=r.showTip.length,n=r.hideTip.length,i;t?i=r.showTip[t-1]:n&&(i=r.hideTip[n-1]),i&&(i.dispatchAction=null,e.dispatchAction(i))}function HAe(r,e,t){r.handler("leave",null,t)}function uF(r,e,t,n){e.handler(r,t,n)}function WAe(r){var e={showTip:[],hideTip:[]},t=function(n){var i=e[n.type];i?i.push(n):(n.dispatchAction=t,r.dispatchAction(n))};return{dispatchAction:t,pendings:e}}function gM(r,e){if(!kt.node){var t=e.getZr(),n=(xs(t).records||{})[r];n&&(xs(t).records[r]=null)}}var $Ae=function(r){ae(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,i){var a=n.getComponent("tooltip"),o=t.get("triggerOn")||a&&a.get("triggerOn")||"mousemove|click";aW("axisPointer",i,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){gM("axisPointer",n)},e.prototype.dispose=function(t,n){gM("axisPointer",n)},e.type="axisPointer",e}(kn);const XAe=$Ae;function oW(r,e){var t=[],n=r.seriesIndex,i;if(n==null||!(i=e.getSeriesByIndex(n)))return{point:[]};var a=i.getData(),o=Uc(a,r);if(o==null||o<0||_e(o))return{point:[]};var s=a.getItemGraphicEl(o),l=i.coordinateSystem;if(i.getTooltipPosition)t=i.getTooltipPosition(o)||[];else if(l&&l.dataToPoint)if(r.isStacked){var u=l.getBaseAxis(),c=l.getOtherAxis(u),h=c.dim,f=u.dim,d=h==="x"||h==="radius"?1:0,p=a.mapDimension(f),g=[];g[d]=a.get(p,o),g[1-d]=a.get(a.getCalculationInfo("stackResultDimension"),o),t=l.dataToPoint(g)||[]}else t=l.dataToPoint(a.getValues(xe(l.dimensions,function(m){return a.mapDimension(m)}),o))||[];else if(s){var v=s.getBoundingRect().clone();v.applyTransform(s.transform),t=[v.x+v.width/2,v.y+v.height/2]}return{point:t,el:s}}var cF=Pt();function YAe(r,e,t){var n=r.currTrigger,i=[r.x,r.y],a=r,o=r.dispatchAction||Fe(t.dispatchAction,t),s=e.getComponent("axisPointer").coordSysAxesInfo;if(s){v0(i)&&(i=oW({seriesIndex:a.seriesIndex,dataIndex:a.dataIndex},e).point);var l=v0(i),u=a.axesInfo,c=s.axesInfo,h=n==="leave"||v0(i),f={},d={},p={list:[],map:{}},g={showPointer:ut(jAe,d),showTooltip:ut(KAe,p)};k(s.coordSysMap,function(m,y){var _=l||m.containPoint(i);k(s.coordSysAxesInfo[y],function(x,S){var A=x.axis,w=ewe(u,x);if(!h&&_&&(!u||w)){var M=w&&w.value;M==null&&!l&&(M=A.pointToData(i)),M!=null&&hF(x,M,g,!1,f)}})});var v={};return k(c,function(m,y){var _=m.linkGroup;_&&!d[y]&&k(_.axesInfo,function(x,S){var A=d[S];if(x!==m&&A){var w=A.value;_.mapper&&(w=m.axis.scale.parse(_.mapper(w,fF(x),fF(m)))),v[m.key]=w}})}),k(v,function(m,y){hF(c[y],m,g,!0,f)}),ZAe(d,c,f),QAe(p,i,r,o),JAe(c,o,t),f}}function hF(r,e,t,n,i){var a=r.axis;if(!(a.scale.isBlank()||!a.containData(e))){if(!r.involveSeries){t.showPointer(r,e);return}var o=qAe(e,r),s=o.payloadBatch,l=o.snapToValue;s[0]&&i.seriesIndex==null&&pe(i,s[0]),!n&&r.snap&&a.containData(l)&&l!=null&&(e=l),t.showPointer(r,e,s),t.showTooltip(r,o,l)}}function qAe(r,e){var t=e.axis,n=t.dim,i=r,a=[],o=Number.MAX_VALUE,s=-1;return k(e.seriesModels,function(l,u){var c=l.getData().mapDimensionsAll(n),h,f;if(l.getAxisTooltipData){var d=l.getAxisTooltipData(c,r,t);f=d.dataIndices,h=d.nestestValue}else{if(f=l.getData().indicesOfNearest(c[0],r,t.type==="category"?.5:null),!f.length)return;h=l.getData().get(c[0],f[0])}if(!(h==null||!isFinite(h))){var p=r-h,g=Math.abs(p);g<=o&&((g<o||p>=0&&s<0)&&(o=g,s=p,i=h,a.length=0),k(f,function(v){a.push({seriesIndex:l.seriesIndex,dataIndexInside:v,dataIndex:l.getData().getRawIndex(v)})}))}}),{payloadBatch:a,snapToValue:i}}function jAe(r,e,t,n){r[e.key]={value:t,payloadBatch:n}}function KAe(r,e,t,n){var i=t.payloadBatch,a=e.axis,o=a.model,s=e.axisPointerModel;if(!(!e.triggerTooltip||!i.length)){var l=e.coordSys.model,u=ng(l),c=r.map[u];c||(c=r.map[u]={coordSysId:l.id,coordSysIndex:l.componentIndex,coordSysType:l.type,coordSysMainType:l.mainType,dataByAxis:[]},r.list.push(c)),c.dataByAxis.push({axisDim:a.dim,axisIndex:o.componentIndex,axisType:o.type,axisId:o.id,value:n,valueLabelOpt:{precision:s.get(["label","precision"]),formatter:s.get(["label","formatter"])},seriesDataIndices:i.slice()})}}function ZAe(r,e,t){var n=t.axesInfo=[];k(e,function(i,a){var o=i.axisPointerModel.option,s=r[a];s?(!i.useHandle&&(o.status="show"),o.value=s.value,o.seriesDataIndices=(s.payloadBatch||[]).slice()):!i.useHandle&&(o.status="hide"),o.status==="show"&&n.push({axisDim:i.axis.dim,axisIndex:i.axis.model.componentIndex,value:o.value})})}function QAe(r,e,t,n){if(v0(e)||!r.list.length){n({type:"hideTip"});return}var i=((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:i.dataIndexInside,dataIndex:i.dataIndex,seriesIndex:i.seriesIndex,dataByCoordSys:r.list})}function JAe(r,e,t){var n=t.getZr(),i="axisPointerLastHighlights",a=cF(n)[i]||{},o=cF(n)[i]={};k(r,function(u,c){var h=u.axisPointerModel.option;h.status==="show"&&u.triggerEmphasis&&k(h.seriesDataIndices,function(f){var d=f.seriesIndex+" | "+f.dataIndex;o[d]=f})});var s=[],l=[];k(a,function(u,c){!o[c]&&l.push(u)}),k(o,function(u,c){!a[c]&&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 ewe(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 fF(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 v0(r){return!r||r[0]==null||isNaN(r[0])||r[1]==null||isNaN(r[1])}function Ug(r){nh.registerAxisPointerClass("CartesianAxisPointer",FAe),r.registerComponentModel(zAe),r.registerComponentView(XAe),r.registerPreprocessor(function(e){if(e){(!e.axisPointer||e.axisPointer.length===0)&&(e.axisPointer={});var t=e.axisPointer.link;t&&!_e(t)&&(e.axisPointer.link=[t])}}),r.registerProcessor(r.PRIORITY.PROCESSOR.STATISTIC,function(e,t){e.getComponent("axisPointer").coordSysAxesInfo=Vge(e,t)}),r.registerAction({type:"updateAxisPointer",event:"updateAxisPointer",update:":updateAxisPointer"},YAe)}function twe(r){gt(D8),gt(Ug)}var nwe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis;s.dim==="angle"&&(this.animationThreshold=Math.PI/18);var l=s.polar,u=l.getOtherAxis(s),c=u.getExtent(),h=s.dataToCoord(n),f=a.get("type");if(f&&f!=="none"){var d=DE(a),p=iwe[f](s,l,h,c);p.style=d,t.graphicKey=p.type,t.pointer=p}var g=a.get(["label","margin"]),v=rwe(n,i,a,l,g);tW(t,i,a,o,v)},e}(RE);function rwe(r,e,t,n,i){var a=e.axis,o=a.dataToCoord(r),s=n.getAngleAxis().getExtent()[0];s=s/180*Math.PI;var l=n.getRadiusAxis().getExtent(),u,c,h;if(a.dim==="radius"){var f=ta();jc(f,f,s),Xo(f,f,[n.cx,n.cy]),u=io([o,-i],f);var d=e.getModel("axisLabel").get("rotate")||0,p=ks.innerTextLayout(s,d*Math.PI/180,-1);c=p.textAlign,h=p.textVerticalAlign}else{var g=l[1];u=n.coordToPoint([g+i,o]);var v=n.cx,m=n.cy;c=Math.abs(u[0]-v)/g<.3?"center":u[0]>v?"left":"right",h=Math.abs(u[1]-m)/g<.3?"middle":u[1]>m?"top":"bottom"}return{position:u,align:c,verticalAlign:h}}var iwe={line:function(r,e,t,n){return r.dim==="angle"?{type:"Line",shape:NE(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 i=Math.max(1,r.getBandWidth()),a=Math.PI/180;return r.dim==="angle"?{type:"Sector",shape:oF(e.cx,e.cy,n[0],n[1],(-t-i/2)*a,(-t+i/2)*a)}:{type:"Sector",shape:oF(e.cx,e.cy,t-i/2,t+i/2,0,Math.PI*2)}}};const awe=nwe;var owe=function(r){ae(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,i=this.ecModel;return i.eachComponent(t,function(a){a.getCoordSysModel()===this&&(n=a)},this),n},e.type="polar",e.dependencies=["radiusAxis","angleAxis"],e.defaultOption={z:0,center:["50%","50%"],radius:"80%"},e}(Nt);const swe=owe;var kE=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.getCoordSysModel=function(){return this.getReferringComponents("polar",nr).models[0]},e.type="polarAxis",e}(Nt);ir(kE,Rg);var lwe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="angleAxis",e}(kE),uwe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="radiusAxis",e}(kE),OE=function(r){ae(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}(ho);OE.prototype.dataToRadius=ho.prototype.dataToCoord;OE.prototype.radiusToData=ho.prototype.coordToData;const cwe=OE;var hwe=Pt(),FE=function(r){ae(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(),i=t.scale,a=i.getExtent(),o=i.count();if(a[1]-a[0]<1)return 0;var s=a[0],l=t.dataToCoord(s+1)-t.dataToCoord(s),u=Math.abs(l),c=wg(s==null?"":s+"",n.getFont(),"center","top"),h=Math.max(c.height,7),f=h/u;isNaN(f)&&(f=1/0);var d=Math.max(0,Math.floor(f)),p=hwe(t.model),g=p.lastAutoInterval,v=p.lastTickCount;return g!=null&&v!=null&&Math.abs(g-d)<=1&&Math.abs(v-o)<=1&&g>d?d=g:(p.lastTickCount=o,p.lastAutoInterval=d),d},e}(ho);FE.prototype.dataToAngle=ho.prototype.dataToCoord;FE.prototype.angleToData=ho.prototype.coordToData;const fwe=FE;var sW=["radius","angle"],dwe=function(){function r(e){this.dimensions=sW,this.type="polar",this.cx=0,this.cy=0,this._radiusAxis=new cwe,this._angleAxis=new fwe,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,i=this._radiusAxis;return n.scale.type===e&&t.push(n),i.scale.type===e&&t.push(i),t},r.prototype.getAngleAxis=function(){return this._angleAxis},r.prototype.getRadiusAxis=function(){return this._radiusAxis},r.prototype.getOtherAxis=function(e){var t=this._angleAxis;return e===t?this._radiusAxis:t},r.prototype.getBaseAxis=function(){return this.getAxesByScale("ordinal")[0]||this.getAxesByScale("time")[0]||this.getAngleAxis()},r.prototype.getTooltipAxes=function(e){var t=e!=null&&e!=="auto"?this.getAxis(e):this.getBaseAxis();return{baseAxes:[t],otherAxes:[this.getOtherAxis(t)]}},r.prototype.dataToPoint=function(e,t){return this.coordToPoint([this._radiusAxis.dataToRadius(e[0],t),this._angleAxis.dataToAngle(e[1],t)])},r.prototype.pointToData=function(e,t){var n=this.pointToCoord(e);return[this._radiusAxis.radiusToData(n[0],t),this._angleAxis.angleToData(n[1],t)]},r.prototype.pointToCoord=function(e){var t=e[0]-this.cx,n=e[1]-this.cy,i=this.getAngleAxis(),a=i.getExtent(),o=Math.min(a[0],a[1]),s=Math.max(a[0],a[1]);i.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,c=u<o?1:-1;u<o||u>s;)u+=c*360;return[l,u]},r.prototype.coordToPoint=function(e){var t=e[0],n=e[1]/180*Math.PI,i=Math.cos(n)*t+this.cx,a=-Math.sin(n)*t+this.cy;return[i,a]},r.prototype.getArea=function(){var e=this.getAngleAxis(),t=this.getRadiusAxis(),n=t.getExtent().slice();n[0]>n[1]&&n.reverse();var i=e.getExtent(),a=Math.PI/180,o=1e-4;return{cx:this.cx,cy:this.cy,r0:n[0],r:n[1],startAngle:-i[0]*a,endAngle:-i[1]*a,clockwise:e.inverse,contain:function(s,l){var u=s-this.cx,c=l-this.cy,h=u*u+c*c,f=this.r,d=this.r0;return f!==d&&h-o<=f*f&&h+o>=d*d}}},r.prototype.convertToPixel=function(e,t,n){var i=dF(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=dF(t);return i===this?this.pointToData(n):null},r}();function dF(r){var e=r.seriesModel,t=r.polarModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}const pwe=dwe;function vwe(r,e,t){var n=e.get("center"),i=t.getWidth(),a=t.getHeight();r.cx=Pe(n[0],i),r.cy=Pe(n[1],a);var o=r.getRadiusAxis(),s=Math.min(i,a)/2,l=e.get("radius");l==null?l=[0,"100%"]:_e(l)||(l=[0,l]);var u=[Pe(l[0],s),Pe(l[1],s)];o.inverse?o.setExtent(u[1],u[0]):o.setExtent(u[0],u[1])}function gwe(r,e){var t=this,n=t.getAngleAxis(),i=t.getRadiusAxis();if(n.scale.setExtent(1/0,-1/0),i.scale.setExtent(1/0,-1/0),r.eachSeries(function(s){if(s.coordinateSystem===t){var l=s.getData();k(__(l,"radius"),function(u){i.scale.unionExtentFromData(l,u)}),k(__(l,"angle"),function(u){n.scale.unionExtentFromData(l,u)})}}),td(n.scale,n.model),td(i.scale,i.model),n.type==="category"&&!n.onBand){var a=n.getExtent(),o=360/n.scale.count();n.inverse?a[1]+=o:a[1]-=o,n.setExtent(a[0],a[1])}}function mwe(r){return r.mainType==="angleAxis"}function pF(r,e){var t;if(r.type=e.get("type"),r.scale=$1(e),r.onBand=e.get("boundaryGap")&&r.type==="category",r.inverse=e.get("inverse"),mwe(e)){r.inverse=r.inverse!==e.get("clockwise");var n=e.get("startAngle"),i=(t=e.get("endAngle"))!==null&&t!==void 0?t:n+(r.inverse?-360:360);r.setExtent(n,i)}e.axis=r,r.model=e}var ywe={dimensions:sW,create:function(r,e){var t=[];return r.eachComponent("polar",function(n,i){var a=new pwe(i+"");a.update=gwe;var o=a.getRadiusAxis(),s=a.getAngleAxis(),l=n.findAxisModel("radiusAxis"),u=n.findAxisModel("angleAxis");pF(o,l),pF(s,u),vwe(a,n,e),t.push(a),n.coordinateSystem=a,a.model=n}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="polar"){var i=n.getReferringComponents("polar",nr).models[0];n.coordinateSystem=i.coordinateSystem}}),t}};const _we=ywe;var xwe=["axisLine","axisLabel","axisTick","minorTick","splitLine","minorSplitLine","splitArea"];function Py(r,e,t){e[1]>e[0]&&(e=e.slice().reverse());var n=r.coordToPoint([e[0],t]),i=r.coordToPoint([e[1],t]);return{x1:n[0],y1:n[1],x2:i[0],y2:i[1]}}function Ry(r){var e=r.getRadiusAxis();return e.inverse?0:1}function vF(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 Swe=function(r){ae(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 i=t.axis,a=i.polar,o=a.getRadiusAxis().getExtent(),s=i.getTicksCoords(),l=i.getMinorTicksCoords(),u=xe(i.getViewLabels(),function(c){c=Je(c);var h=i.scale,f=h.type==="ordinal"?h.getRawOrdinalNumber(c.tickValue):c.tickValue;return c.coord=i.dataToCoord(f),c});vF(u),vF(s),k(xwe,function(c){t.get([c,"show"])&&(!i.scale.isBlank()||c==="axisLine")&&Awe[c](this.group,t,a,s,l,o,u)},this)}},e.type="angleAxis",e}(nh),Awe={axisLine:function(r,e,t,n,i,a){var o=e.getModel(["axisLine","lineStyle"]),s=t.getAngleAxis(),l=Math.PI/180,u=s.getExtent(),c=Ry(t),h=c?0:1,f,d=Math.abs(u[1]-u[0])===360?"Circle":"Arc";a[h]===0?f=new Zc[d]({shape:{cx:t.cx,cy:t.cy,r:a[c],startAngle:-u[0]*l,endAngle:-u[1]*l,clockwise:s.inverse},style:o.getLineStyle(),z2:1,silent:!0}):f=new T1({shape:{cx:t.cx,cy:t.cy,r:a[c],r0:a[h]},style:o.getLineStyle(),z2:1,silent:!0}),f.style.fill=null,r.add(f)},axisTick:function(r,e,t,n,i,a){var o=e.getModel("axisTick"),s=(o.get("inside")?-1:1)*o.get("length"),l=a[Ry(t)],u=xe(n,function(c){return new Cr({shape:Py(t,[l,l+s],c.coord)})});r.add(Ma(u,{style:Ke(o.getModel("lineStyle").getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])})}))},minorTick:function(r,e,t,n,i,a){if(i.length){for(var o=e.getModel("axisTick"),s=e.getModel("minorTick"),l=(o.get("inside")?-1:1)*s.get("length"),u=a[Ry(t)],c=[],h=0;h<i.length;h++)for(var f=0;f<i[h].length;f++)c.push(new Cr({shape:Py(t,[u,u+l],i[h][f].coord)}));r.add(Ma(c,{style:Ke(s.getModel("lineStyle").getLineStyle(),Ke(o.getLineStyle(),{stroke:e.get(["axisLine","lineStyle","color"])}))}))}},axisLabel:function(r,e,t,n,i,a,o){var s=e.getCategories(!0),l=e.getModel("axisLabel"),u=l.get("margin"),c=e.get("triggerEvent");k(o,function(h,f){var d=l,p=h.tickValue,g=a[Ry(t)],v=t.coordToPoint([g+u,h.coord]),m=t.cx,y=t.cy,_=Math.abs(v[0]-m)/g<.3?"center":v[0]>m?"left":"right",x=Math.abs(v[1]-y)/g<.3?"middle":v[1]>y?"top":"bottom";if(s&&s[p]){var S=s[p];Qe(S)&&S.textStyle&&(d=new vn(S.textStyle,l,l.ecModel))}var A=new Ot({silent:ks.isLabelSilent(e),style:pn(d,{x:v[0],y:v[1],fill:d.getTextColor()||e.get(["axisLine","lineStyle","color"]),text:h.formattedLabel,align:_,verticalAlign:x})});if(r.add(A),c){var w=ks.makeAxisEventDataBase(e);w.targetType="axisLabel",w.value=h.rawLabel,at(A).eventData=w}},this)},splitLine:function(r,e,t,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=0;h<n.length;h++){var f=u++%l.length;c[f]=c[f]||[],c[f].push(new Cr({shape:Py(t,a,n[h].coord)}))}for(var h=0;h<c.length;h++)r.add(Ma(c[h],{style:Ke({stroke:l[h%l.length]},s.getLineStyle()),silent:!0,z:e.get("z")}))},minorSplitLine:function(r,e,t,n,i,a){if(i.length){for(var o=e.getModel("minorSplitLine"),s=o.getModel("lineStyle"),l=[],u=0;u<i.length;u++)for(var c=0;c<i[u].length;c++)l.push(new Cr({shape:Py(t,a,i[u][c].coord)}));r.add(Ma(l,{style:s.getLineStyle(),silent:!0,z:e.get("z")}))}},splitArea:function(r,e,t,n,i,a){if(n.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=Math.PI/180,f=-n[0].coord*h,d=Math.min(a[0],a[1]),p=Math.max(a[0],a[1]),g=e.get("clockwise"),v=1,m=n.length;v<=m;v++){var y=v===m?n[0].coord:n[v].coord,_=u++%l.length;c[_]=c[_]||[],c[_].push(new Bi({shape:{cx:t.cx,cy:t.cy,r0:d,r:p,startAngle:f,endAngle:-y*h,clockwise:g},silent:!0})),f=-y*h}for(var v=0;v<c.length;v++)r.add(Ma(c[v],{style:Ke({fill:l[v%l.length]},s.getAreaStyle()),silent:!0}))}}};const wwe=Swe;var bwe=["axisLine","axisTickLabel","axisName"],Twe=["splitLine","splitArea","minorSplitLine"],Mwe=function(r){ae(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 i=this._axisGroup,a=this._axisGroup=new rt;this.group.add(a);var o=t.axis,s=o.polar,l=s.getAngleAxis(),u=o.getTicksCoords(),c=o.getMinorTicksCoords(),h=l.getExtent()[0],f=o.getExtent(),d=Ewe(s,t,h),p=new ks(t,d);k(bwe,p.add,p),a.add(p.getGroup()),Mg(i,a,t),k(Twe,function(g){t.get([g,"show"])&&!o.scale.isBlank()&&Cwe[g](this.group,t,s,h,f,u,c)},this)}},e.type="radiusAxis",e}(nh),Cwe={splitLine:function(r,e,t,n,i,a){var o=e.getModel("splitLine"),s=o.getModel("lineStyle"),l=s.get("color"),u=0,c=t.getAngleAxis(),h=Math.PI/180,f=c.getExtent(),d=Math.abs(f[1]-f[0])===360?"Circle":"Arc";l=l instanceof Array?l:[l];for(var p=[],g=0;g<a.length;g++){var v=u++%l.length;p[v]=p[v]||[],p[v].push(new Zc[d]({shape:{cx:t.cx,cy:t.cy,r:Math.max(a[g].coord,0),startAngle:-f[0]*h,endAngle:-f[1]*h,clockwise:c.inverse}}))}for(var g=0;g<p.length;g++)r.add(Ma(p[g],{style:Ke({stroke:l[g%l.length],fill:null},s.getLineStyle()),silent:!0}))},minorSplitLine:function(r,e,t,n,i,a,o){if(o.length){for(var s=e.getModel("minorSplitLine"),l=s.getModel("lineStyle"),u=[],c=0;c<o.length;c++)for(var h=0;h<o[c].length;h++)u.push(new au({shape:{cx:t.cx,cy:t.cy,r:o[c][h].coord}}));r.add(Ma(u,{style:Ke({fill:null},l.getLineStyle()),silent:!0}))}},splitArea:function(r,e,t,n,i,a){if(a.length){var o=e.getModel("splitArea"),s=o.getModel("areaStyle"),l=s.get("color"),u=0;l=l instanceof Array?l:[l];for(var c=[],h=a[0].coord,f=1;f<a.length;f++){var d=u++%l.length;c[d]=c[d]||[],c[d].push(new Bi({shape:{cx:t.cx,cy:t.cy,r0:h,r:a[f].coord,startAngle:0,endAngle:Math.PI*2},silent:!0})),h=a[f].coord}for(var f=0;f<c.length;f++)r.add(Ma(c[f],{style:Ke({fill:l[f%l.length]},s.getAreaStyle()),silent:!0}))}}};function Ewe(r,e,t){return{position:[r.cx,r.cy],rotation:t/180*Math.PI,labelDirection:-1,tickDirection:-1,nameDirection:1,labelRotate:e.getModel("axisLabel").get("rotate"),z2:1}}const Lwe=Mwe;function lW(r){return r.get("stack")||"__ec_stack_"+r.seriesIndex}function uW(r,e){return e.dim+r.model.componentIndex}function Pwe(r,e,t){var n={},i=Rwe(jt(e.getSeriesByType(r),function(a){return!e.isSeriesFiltered(a)&&a.coordinateSystem&&a.coordinateSystem.type==="polar"}));e.eachSeriesByType(r,function(a){if(a.coordinateSystem.type==="polar"){var o=a.getData(),s=a.coordinateSystem,l=s.getBaseAxis(),u=uW(s,l),c=lW(a),h=i[u][c],f=h.offset,d=h.width,p=s.getOtherAxis(l),g=a.coordinateSystem.cx,v=a.coordinateSystem.cy,m=a.get("barMinHeight")||0,y=a.get("barMinAngle")||0;n[c]=n[c]||[];for(var _=o.mapDimension(p.dim),x=o.mapDimension(l.dim),S=Ql(o,_),A=l.dim!=="radius"||!a.get("roundCap",!0),w=p.model,M=w.get("startValue"),C=p.dataToCoord(M||0),b=0,T=o.count();b<T;b++){var P=o.get(_,b),D=o.get(x,b),L=P>=0?"p":"n",E=C;S&&(n[c][D]||(n[c][D]={p:C,n:C}),E=n[c][D][L]);var I=void 0,N=void 0,R=void 0,F=void 0;if(p.dim==="radius"){var O=p.dataToCoord(P)-C,V=l.dataToCoord(D);Math.abs(O)<m&&(O=(O<0?-1:1)*m),I=E,N=E+O,R=V-f,F=R-d,S&&(n[c][D][L]=N)}else{var H=p.dataToCoord(P,A)-C,Q=l.dataToCoord(D);Math.abs(H)<y&&(H=(H<0?-1:1)*y),I=Q+f,N=I+d,R=E,F=E+H,S&&(n[c][D][L]=F)}o.setItemLayout(b,{cx:g,cy:v,r0:I,r:N,startAngle:-R*Math.PI/180,endAngle:-F*Math.PI/180,clockwise:R>=F})}}})}function Rwe(r){var e={};k(r,function(n,i){var a=n.getData(),o=n.coordinateSystem,s=o.getBaseAxis(),l=uW(o,s),u=s.getExtent(),c=s.type==="category"?s.getBandWidth():Math.abs(u[1]-u[0])/a.count(),h=e[l]||{bandWidth:c,remainedWidth:c,autoWidthCount:0,categoryGap:"20%",gap:"30%",stacks:{}},f=h.stacks;e[l]=h;var d=lW(n);f[d]||h.autoWidthCount++,f[d]=f[d]||{width:0,maxWidth:0};var p=Pe(n.get("barWidth"),c),g=Pe(n.get("barMaxWidth"),c),v=n.get("barGap"),m=n.get("barCategoryGap");p&&!f[d].width&&(p=Math.min(h.remainedWidth,p),f[d].width=p,h.remainedWidth-=p),g&&(f[d].maxWidth=g),v!=null&&(h.gap=v),m!=null&&(h.categoryGap=m)});var t={};return k(e,function(n,i){t[i]={};var a=n.stacks,o=n.bandWidth,s=Pe(n.categoryGap,o),l=Pe(n.gap,1),u=n.remainedWidth,c=n.autoWidthCount,h=(u-s)/(c+(c-1)*l);h=Math.max(h,0),k(a,function(g,v){var m=g.maxWidth;m&&m<h&&(m=Math.min(m,u),g.width&&(m=Math.min(m,g.width)),u-=m,g.width=m,c--)}),h=(u-s)/(c+(c-1)*l),h=Math.max(h,0);var f=0,d;k(a,function(g,v){g.width||(g.width=h),d=g,f+=g.width*(1+l)}),d&&(f-=d.width*l);var p=-f/2;k(a,function(g,v){t[i][v]=t[i][v]||{offset:p,width:g.width},p+=g.width*(1+l)})}),t}var Dwe={startAngle:90,clockwise:!0,splitNumber:12,axisLabel:{rotate:0}},Iwe={splitNumber:5},Nwe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="polar",e}(kn);function kwe(r){gt(Ug),nh.registerAxisPointerClass("PolarAxisPointer",awe),r.registerCoordinateSystem("polar",_we),r.registerComponentModel(swe),r.registerComponentView(Nwe),rd(r,"angle",lwe,Dwe),rd(r,"radius",uwe,Iwe),r.registerComponentView(wwe),r.registerComponentView(Lwe),r.registerLayout(ut(Pwe,"bar"))}function mM(r,e){e=e||{};var t=r.coordinateSystem,n=r.axis,i={},a=n.position,o=n.orient,s=t.getRect(),l=[s.x,s.x+s.width,s.y,s.y+s.height],u={horizontal:{top:l[2],bottom:l[3]},vertical:{left:l[0],right:l[1]}};i.position=[o==="vertical"?u.vertical[a]:l[0],o==="horizontal"?u.horizontal[a]:l[3]];var c={horizontal:0,vertical:1};i.rotation=Math.PI/2*c[o];var h={top:-1,bottom:1,right:1,left:-1};i.labelDirection=i.tickDirection=i.nameDirection=h[a],r.get(["axisTick","inside"])&&(i.tickDirection=-i.tickDirection),Mr(e.labelInside,r.get(["axisLabel","inside"]))&&(i.labelDirection=-i.labelDirection);var f=e.rotate;return f==null&&(f=r.get(["axisLabel","rotate"])),i.labelRotation=a==="top"?-f:f,i.z2=1,i}var Owe=["axisLine","axisTickLabel","axisName"],Fwe=["splitArea","splitLine"],Bwe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.axisPointerClass="SingleAxisPointer",t}return e.prototype.render=function(t,n,i,a){var o=this.group;o.removeAll();var s=this._axisGroup;this._axisGroup=new rt;var l=mM(t),u=new ks(t,l);k(Owe,u.add,u),o.add(this._axisGroup),o.add(u.getGroup()),k(Fwe,function(c){t.get([c,"show"])&&zwe[c](this,this.group,this._axisGroup,t)},this),Mg(s,this._axisGroup,t),r.prototype.render.call(this,t,n,i,a)},e.prototype.remove=function(){L8(this)},e.type="singleAxis",e}(nh),zwe={splitLine:function(r,e,t,n){var i=n.axis;if(!i.scale.isBlank()){var a=n.getModel("splitLine"),o=a.getModel("lineStyle"),s=o.get("color");s=s instanceof Array?s:[s];for(var l=o.get("width"),u=n.coordinateSystem.getRect(),c=i.isHorizontal(),h=[],f=0,d=i.getTicksCoords({tickModel:a}),p=[],g=[],v=0;v<d.length;++v){var m=i.toGlobalCoord(d[v].coord);c?(p[0]=m,p[1]=u.y,g[0]=m,g[1]=u.y+u.height):(p[0]=u.x,p[1]=m,g[0]=u.x+u.width,g[1]=m);var y=new Cr({shape:{x1:p[0],y1:p[1],x2:g[0],y2:g[1]},silent:!0});Qf(y.shape,l);var _=f++%s.length;h[_]=h[_]||[],h[_].push(y)}for(var x=o.getLineStyle(["color"]),v=0;v<h.length;++v)e.add(Ma(h[v],{style:Ke({stroke:s[v%s.length]},x),silent:!0}))}},splitArea:function(r,e,t,n){E8(r,t,n,n)}};const Uwe=Bwe;var cW=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.getCoordSysModel=function(){return this},e.type="singleAxis",e.layoutMode="box",e.defaultOption={left:"5%",top:"5%",right:"5%",bottom:"5%",type:"value",position:"bottom",orient:"horizontal",axisLine:{show:!0,lineStyle:{width:1,type:"solid"}},tooltip:{show:!0},axisTick:{show:!0,length:6,lineStyle:{width:1}},axisLabel:{show:!0,interval:"auto"},splitLine:{show:!0,lineStyle:{type:"dashed",opacity:.2}}},e}(Nt);ir(cW,Rg.prototype);const Cw=cW;var Vwe=function(r){ae(e,r);function e(t,n,i,a,o){var s=r.call(this,t,n,i)||this;return s.type=a||"value",s.position=o||"bottom",s}return e.prototype.isHorizontal=function(){var t=this.position;return t==="top"||t==="bottom"},e.prototype.pointToData=function(t,n){return this.coordinateSystem.pointToData(t)[0]},e}(ho);const Gwe=Vwe;var hW=["single"],Hwe=function(){function r(e,t,n){this.type="single",this.dimension="single",this.dimensions=hW,this.axisPointerEnabled=!0,this.model=e,this._init(e,t,n)}return r.prototype._init=function(e,t,n){var i=this.dimension,a=new Gwe(i,$1(e),[0,0],e.get("type"),e.get("position")),o=a.type==="category";a.onBand=o&&e.get("boundaryGap"),a.inverse=e.get("inverse"),a.orient=e.get("orient"),e.axis=a,a.model=e,a.coordinateSystem=this,this._axis=a},r.prototype.update=function(e,t){e.eachSeries(function(n){if(n.coordinateSystem===this){var i=n.getData();k(i.mapDimensionsAll(this.dimension),function(a){this._axis.scale.unionExtentFromData(i,a)},this),td(this._axis.scale,this._axis.model)}},this)},r.prototype.resize=function(e,t){this._rect=dr({left:e.get("left"),top:e.get("top"),right:e.get("right"),bottom:e.get("bottom"),width:e.get("width"),height:e.get("height")},{width:t.getWidth(),height:t.getHeight()}),this._adjustAxis()},r.prototype.getRect=function(){return this._rect},r.prototype._adjustAxis=function(){var e=this._rect,t=this._axis,n=t.isHorizontal(),i=n?[0,e.width]:[0,e.height],a=t.inverse?1:0;t.setExtent(i[a],i[1-a]),this._updateAxisTransform(t,n?e.x:e.y)},r.prototype._updateAxisTransform=function(e,t){var n=e.getExtent(),i=n[0]+n[1],a=e.isHorizontal();e.toGlobalCoord=a?function(o){return o+t}:function(o){return i-o+t},e.toLocalCoord=a?function(o){return o-t}:function(o){return i-o+t}},r.prototype.getAxis=function(){return this._axis},r.prototype.getBaseAxis=function(){return this._axis},r.prototype.getAxes=function(){return[this._axis]},r.prototype.getTooltipAxes=function(){return{baseAxes:[this.getAxis()],otherAxes:[]}},r.prototype.containPoint=function(e){var t=this.getRect(),n=this.getAxis(),i=n.orient;return i==="horizontal"?n.contain(n.toLocalCoord(e[0]))&&e[1]>=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){var t=this.getAxis();return[t.coordToData(t.toLocalCoord(e[t.orient==="horizontal"?0:1]))]},r.prototype.dataToPoint=function(e){var t=this.getAxis(),n=this.getRect(),i=[],a=t.orient==="horizontal"?0:1;return e instanceof Array&&(e=e[0]),i[a]=t.toGlobalCoord(t.dataToCoord(+e)),i[1-a]=a===0?n.y+n.height/2:n.x+n.width/2,i},r.prototype.convertToPixel=function(e,t,n){var i=gF(t);return i===this?this.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=gF(t);return i===this?this.pointToData(n):null},r}();function gF(r){var e=r.seriesModel,t=r.singleAxisModel;return t&&t.coordinateSystem||e&&e.coordinateSystem}function Wwe(r,e){var t=[];return r.eachComponent("singleAxis",function(n,i){var a=new Hwe(n,r,e);a.name="single_"+i,a.resize(n,e),n.coordinateSystem=a,t.push(a)}),r.eachSeries(function(n){if(n.get("coordinateSystem")==="singleAxis"){var i=n.getReferringComponents("singleAxis",nr).models[0];n.coordinateSystem=i&&i.coordinateSystem}}),t}var $we={create:Wwe,dimensions:hW};const Xwe=$we;var mF=["x","y"],Ywe=["width","height"],qwe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.makeElOption=function(t,n,i,a,o){var s=i.axis,l=s.coordinateSystem,u=Ew(l,1-N_(s)),c=l.dataToPoint(n)[0],h=a.get("type");if(h&&h!=="none"){var f=DE(a),d=jwe[h](s,c,u);d.style=f,t.graphicKey=d.type,t.pointer=d}var p=mM(i);rW(n,t,p,i,a,o)},e.prototype.getHandleTransform=function(t,n,i){var a=mM(n,{labelInside:!1});a.labelMargin=i.get(["handle","margin"]);var o=IE(n.axis,t,a);return{x:o[0],y:o[1],rotation:a.rotation+(a.labelDirection<0?Math.PI:0)}},e.prototype.updateHandleTransform=function(t,n,i,a){var o=i.axis,s=o.coordinateSystem,l=N_(o),u=Ew(s,l),c=[t.x,t.y];c[l]+=n[l],c[l]=Math.min(u[1],c[l]),c[l]=Math.max(u[0],c[l]);var h=Ew(s,1-l),f=(h[1]+h[0])/2,d=[f,f];return d[l]=c[l],{x:c[0],y:c[1],rotation:t.rotation,cursorPoint:d,tooltipOption:{verticalAlign:"middle"}}},e}(RE),jwe={line:function(r,e,t){var n=NE([e,t[0]],[e,t[1]],N_(r));return{type:"Line",subPixelOptimize:!0,shape:n}},shadow:function(r,e,t){var n=r.getBandWidth(),i=t[1]-t[0];return{type:"Rect",shape:iW([e-n/2,t[0]],[n,i],N_(r))}}};function N_(r){return r.isHorizontal()?0:1}function Ew(r,e){var t=r.getRect();return[t[mF[e]],t[mF[e]]+t[Ywe[e]]]}const Kwe=qwe;var Zwe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="single",e}(kn);function Qwe(r){gt(Ug),nh.registerAxisPointerClass("SingleAxisPointer",Kwe),r.registerComponentView(Zwe),r.registerComponentView(Uwe),r.registerComponentModel(Cw),rd(r,"single",Cw,Cw.defaultOption),r.registerCoordinateSystem("single",Xwe)}var Jwe=function(r){ae(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,i){var a=Ad(t);r.prototype.init.apply(this,arguments),yF(t,a)},e.prototype.mergeOption=function(t){r.prototype.mergeOption.apply(this,arguments),yF(this.option,t)},e.prototype.getCellSize=function(){return this.option.cellSize},e.type="calendar",e.defaultOption={z:2,left:80,top:60,cellSize:20,orient:"horizontal",splitLine:{show:!0,lineStyle:{color:"#000",width:1,type:"solid"}},itemStyle:{color:"#fff",borderWidth:1,borderColor:"#ccc"},dayLabel:{show:!0,firstDay:0,position:"start",margin:"50%",color:"#000"},monthLabel:{show:!0,position:"start",margin:5,align:"center",formatter:null,color:"#000"},yearLabel:{show:!0,position:null,margin:30,formatter:null,color:"#ccc",fontFamily:"sans-serif",fontWeight:"bolder",fontSize:20}},e}(Nt);function yF(r,e){var t=r.cellSize,n;_e(t)?n=t:n=r.cellSize=[t,t],n.length===1&&(n[1]=n[0]);var i=xe([0,1],function(a){return rce(e,a)&&(n[a]="auto"),n[a]!=null&&n[a]!=="auto"});Zl(r,e,{type:"box",ignoreSize:i})}const ebe=Jwe;var tbe=function(r){ae(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,i){var a=this.group;a.removeAll();var o=t.coordinateSystem,s=o.getRangeInfo(),l=o.getOrient(),u=n.getLocaleModel();this._renderDayRect(t,s,a),this._renderLines(t,s,l,a),this._renderYearText(t,s,l,a),this._renderMonthText(t,u,l,a),this._renderWeekText(t,u,s,l,a)},e.prototype._renderDayRect=function(t,n,i){for(var a=t.coordinateSystem,o=t.getModel("itemStyle").getItemStyle(),s=a.getCellWidth(),l=a.getCellHeight(),u=n.start.time;u<=n.end.time;u=a.getNextNDay(u,1).time){var c=a.dataToRect([u],!1).tl,h=new Dt({shape:{x:c[0],y:c[1],width:s,height:l},cursor:"default",style:o});i.add(h)}},e.prototype._renderLines=function(t,n,i,a){var o=this,s=t.coordinateSystem,l=t.getModel(["splitLine","lineStyle"]).getLineStyle(),u=t.get(["splitLine","show"]),c=l.lineWidth;this._tlpoints=[],this._blpoints=[],this._firstDayOfMonth=[],this._firstDayPoints=[];for(var h=n.start,f=0;h.time<=n.end.time;f++){p(h.formatedDate),f===0&&(h=s.getDateInfo(n.start.y+"-"+n.start.m));var d=h.date;d.setMonth(d.getMonth()+1),h=s.getDateInfo(d)}p(s.getNextNDay(n.end.time,1).formatedDate);function p(g){o._firstDayOfMonth.push(s.getDateInfo(g)),o._firstDayPoints.push(s.dataToRect([g],!1).tl);var v=o._getLinePointsOfOneWeek(t,g,i);o._tlpoints.push(v[0]),o._blpoints.push(v[v.length-1]),u&&o._drawSplitline(v,l,a)}u&&this._drawSplitline(o._getEdgesPoints(o._tlpoints,c,i),l,a),u&&this._drawSplitline(o._getEdgesPoints(o._blpoints,c,i),l,a)},e.prototype._getEdgesPoints=function(t,n,i){var a=[t[0].slice(),t[t.length-1].slice()],o=i==="horizontal"?0:1;return a[0][o]=a[0][o]-n/2,a[1][o]=a[1][o]+n/2,a},e.prototype._drawSplitline=function(t,n,i){var a=new Ui({z2:20,shape:{points:t},style:n});i.add(a)},e.prototype._getLinePointsOfOneWeek=function(t,n,i){for(var a=t.coordinateSystem,o=a.getDateInfo(n),s=[],l=0;l<7;l++){var u=a.getNextNDay(o.time,l),c=a.dataToRect([u.time],!1);s[2*u.day]=c.tl,s[2*u.day+1]=c[i==="horizontal"?"bl":"tr"]}return s},e.prototype._formatterLabel=function(t,n){return ke(t)&&t?ece(t,n):qe(t)?t(n):n.nameMap},e.prototype._yearTextPositionControl=function(t,n,i,a,o){var s=n[0],l=n[1],u=["center","bottom"];a==="bottom"?(l+=o,u=["center","top"]):a==="left"?s-=o:a==="right"?(s+=o,u=["center","top"]):l-=o;var c=0;return(a==="left"||a==="right")&&(c=Math.PI/2),{rotation:c,x:s,y:l,style:{align:u[0],verticalAlign:u[1]}}},e.prototype._renderYearText=function(t,n,i,a){var o=t.getModel("yearLabel");if(o.get("show")){var s=o.get("margin"),l=o.get("position");l||(l=i!=="horizontal"?"top":"left");var u=[this._tlpoints[this._tlpoints.length-1],this._blpoints[0]],c=(u[0][0]+u[1][0])/2,h=(u[0][1]+u[1][1])/2,f=i==="horizontal"?0:1,d={top:[c,u[f][1]],bottom:[c,u[1-f][1]],left:[u[1-f][0],h],right:[u[f][0],h]},p=n.start.y;+n.end.y>+n.start.y&&(p=p+"-"+n.end.y);var g=o.get("formatter"),v={start:n.start.y,end:n.end.y,nameMap:p},m=this._formatterLabel(g,v),y=new Ot({z2:30,style:pn(o,{text:m}),silent:o.get("silent")});y.attr(this._yearTextPositionControl(y,d[l],i,l,s)),a.add(y)}},e.prototype._monthTextPositionControl=function(t,n,i,a,o){var s="left",l="top",u=t[0],c=t[1];return i==="horizontal"?(c=c+o,n&&(s="center"),a==="start"&&(l="bottom")):(u=u+o,n&&(l="middle"),a==="start"&&(s="right")),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderMonthText=function(t,n,i,a){var o=t.getModel("monthLabel");if(o.get("show")){var s=o.get("nameMap"),l=o.get("margin"),u=o.get("position"),c=o.get("align"),h=[this._tlpoints,this._blpoints];(!s||ke(s))&&(s&&(n=CT(s)||n),s=n.get(["time","monthAbbr"])||[]);var f=u==="start"?0:1,d=i==="horizontal"?0:1;l=u==="start"?-l:l;for(var p=c==="center",g=o.get("silent"),v=0;v<h[f].length-1;v++){var m=h[f][v].slice(),y=this._firstDayOfMonth[v];if(p){var _=this._firstDayPoints[v];m[d]=(_[d]+h[0][v+1][d])/2}var x=o.get("formatter"),S=s[+y.m-1],A={yyyy:y.y,yy:(y.y+"").slice(2),MM:y.m,M:+y.m,nameMap:S},w=this._formatterLabel(x,A),M=new Ot({z2:30,style:pe(pn(o,{text:w}),this._monthTextPositionControl(m,p,i,u,l)),silent:g});a.add(M)}}},e.prototype._weekTextPositionControl=function(t,n,i,a,o){var s="center",l="middle",u=t[0],c=t[1],h=i==="start";return n==="horizontal"?(u=u+a+(h?1:-1)*o[0]/2,s=h?"right":"left"):(c=c+a+(h?1:-1)*o[1]/2,l=h?"bottom":"top"),{x:u,y:c,align:s,verticalAlign:l}},e.prototype._renderWeekText=function(t,n,i,a,o){var s=t.getModel("dayLabel");if(s.get("show")){var l=t.coordinateSystem,u=s.get("position"),c=s.get("nameMap"),h=s.get("margin"),f=l.getFirstDayOfWeek();if(!c||ke(c)){c&&(n=CT(c)||n);var d=n.get(["time","dayOfWeekShort"]);c=d||xe(n.get(["time","dayOfWeekAbbr"]),function(A){return A[0]})}var p=l.getNextNDay(i.end.time,7-i.lweek).time,g=[l.getCellWidth(),l.getCellHeight()];h=Pe(h,Math.min(g[1],g[0])),u==="start"&&(p=l.getNextNDay(i.start.time,-(7+i.fweek)).time,h=-h);for(var v=s.get("silent"),m=0;m<7;m++){var y=l.getNextNDay(p,m),_=l.dataToRect([y.time],!1).center,x=m;x=Math.abs((m+f)%7);var S=new Ot({z2:30,style:pe(pn(s,{text:c[x]}),this._weekTextPositionControl(_,a,u,h,g)),silent:v});o.add(S)}}},e.type="calendar",e}(kn);const nbe=tbe;var Lw=864e5,rbe=function(){function r(e,t,n){this.type="calendar",this.dimensions=r.dimensions,this.getDimensionsInfo=r.getDimensionsInfo,this._model=e}return r.getDimensionsInfo=function(){return[{name:"time",type:"time"},"value"]},r.prototype.getRangeInfo=function(){return this._rangeInfo},r.prototype.getModel=function(){return this._model},r.prototype.getRect=function(){return this._rect},r.prototype.getCellWidth=function(){return this._sw},r.prototype.getCellHeight=function(){return this._sh},r.prototype.getOrient=function(){return this._orient},r.prototype.getFirstDayOfWeek=function(){return this._firstDayOfWeek},r.prototype.getDateInfo=function(e){e=qo(e);var t=e.getFullYear(),n=e.getMonth()+1,i=n<10?"0"+n:""+n,a=e.getDate(),o=a<10?"0"+a:""+a,s=e.getDay();return s=Math.abs((s+7-this.getFirstDayOfWeek())%7),{y:t+"",m:i,d:o,day:s,time:e.getTime(),formatedDate:t+"-"+i+"-"+o,date:e}},r.prototype.getNextNDay=function(e,t){return t=t||0,t===0?this.getDateInfo(e):(e=new Date(this.getDateInfo(e).time),e.setDate(e.getDate()+t),this.getDateInfo(e))},r.prototype.update=function(e,t){this._firstDayOfWeek=+this._model.getModel("dayLabel").get("firstDay"),this._orient=this._model.get("orient"),this._lineWidth=this._model.getModel("itemStyle").getItemStyle().lineWidth||0,this._rangeInfo=this._getRangeInfo(this._initRangeOption());var n=this._rangeInfo.weeks||1,i=["width","height"],a=this._model.getCellSize().slice(),o=this._model.getBoxLayoutParams(),s=this._orient==="horizontal"?[n,7]:[7,n];k([0,1],function(h){c(a,h)&&(o[i[h]]=a[h]*s[h])});var l={width:t.getWidth(),height:t.getHeight()},u=this._rect=dr(o,l);k([0,1],function(h){c(a,h)||(a[h]=u[i[h]]/s[h])});function c(h,f){return h[f]!=null&&h[f]!=="auto"}this._sw=a[0],this._sh=a[1]},r.prototype.dataToPoint=function(e,t){_e(e)&&(e=e[0]),t==null&&(t=!0);var n=this.getDateInfo(e),i=this._rangeInfo,a=n.formatedDate;if(t&&!(n.time>=i.start.time&&n.time<i.end.time+Lw))return[NaN,NaN];var o=n.day,s=this._getRangeInfo([i.start.time,a]).nthWeek;return this._orient==="vertical"?[this._rect.x+o*this._sw+this._sw/2,this._rect.y+s*this._sh+this._sh/2]:[this._rect.x+s*this._sw+this._sw/2,this._rect.y+o*this._sh+this._sh/2]},r.prototype.pointToData=function(e){var t=this.pointToDate(e);return t&&t.time},r.prototype.dataToRect=function(e,t){var n=this.dataToPoint(e,t);return{contentShape:{x:n[0]-(this._sw-this._lineWidth)/2,y:n[1]-(this._sh-this._lineWidth)/2,width:this._sw-this._lineWidth,height:this._sh-this._lineWidth},center:n,tl:[n[0]-this._sw/2,n[1]-this._sh/2],tr:[n[0]+this._sw/2,n[1]-this._sh/2],br:[n[0]+this._sw/2,n[1]+this._sh/2],bl:[n[0]-this._sw/2,n[1]+this._sh/2]}},r.prototype.pointToDate=function(e){var t=Math.floor((e[0]-this._rect.x)/this._sw)+1,n=Math.floor((e[1]-this._rect.y)/this._sh)+1,i=this._rangeInfo.range;return this._orient==="vertical"?this._getDateByWeeksAndDay(n,t-1,i):this._getDateByWeeksAndDay(t,n-1,i)},r.prototype.convertToPixel=function(e,t,n){var i=_F(t);return i===this?i.dataToPoint(n):null},r.prototype.convertFromPixel=function(e,t,n){var i=_F(t);return i===this?i.pointToData(n):null},r.prototype.containPoint=function(e){return console.warn("Not implemented."),!1},r.prototype._initRangeOption=function(){var e=this._model.get("range"),t;if(_e(e)&&e.length===1&&(e=e[0]),_e(e))t=e;else{var n=e.toString();if(/^\d{4}$/.test(n)&&(t=[n+"-01-01",n+"-12-31"]),/^\d{4}[\/|-]\d{1,2}$/.test(n)){var i=this.getDateInfo(n),a=i.date;a.setMonth(a.getMonth()+1);var o=this.getNextNDay(a,-1);t=[i.formatedDate,o.formatedDate]}/^\d{4}[\/|-]\d{1,2}[\/|-]\d{1,2}$/.test(n)&&(t=[n,n])}if(!t)return e;var s=this._getRangeInfo(t);return s.start.time>s.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 i=Math.floor(t[1].time/Lw)-Math.floor(t[0].time/Lw)+1,a=new Date(t[0].time),o=a.getDate(),s=t[1].date.getDate();a.setDate(o+i-1);var l=a.getDate();if(l!==s)for(var u=a.getTime()-t[1].time>0?1:-1;(l=a.getDate())!==s&&(a.getTime()-t[1].time)*u>0;)i-=u,a.setDate(l-u);var c=Math.floor((i+t[0].day+6)/7),h=n?-c+1:c-1;return n&&t.reverse(),{range:[t[0].formatedDate,t[1].formatedDate],start:t[0],end:t[1],allDay:i,weeks:c,nthWeek:h,fweek:t[0].day,lweek:t[1].day}},r.prototype._getDateByWeeksAndDay=function(e,t,n){var i=this._getRangeInfo(n);if(e>i.weeks||e===0&&t<i.fweek||e===i.weeks&&t>i.lweek)return null;var a=(e-1)*7-i.fweek+t,o=new Date(i.start.time);return o.setDate(+i.start.d+a),this.getDateInfo(o)},r.create=function(e,t){var n=[];return e.eachComponent("calendar",function(i){var a=new r(i);n.push(a),i.coordinateSystem=a}),e.eachSeries(function(i){i.get("coordinateSystem")==="calendar"&&(i.coordinateSystem=n[i.get("calendarIndex")||0])}),n},r.dimensions=["time","value"],r}();function _F(r){var e=r.calendarModel,t=r.seriesModel,n=e?e.coordinateSystem:t?t.coordinateSystem:null;return n}const ibe=rbe;function abe(r){r.registerComponentModel(ebe),r.registerComponentView(nbe),r.registerCoordinateSystem("calendar",ibe)}function obe(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 xF(r,e){var t;return k(e,function(n){r[n]!=null&&r[n]!=="auto"&&(t=!0)}),t}function sbe(r,e,t){var n=pe({},t),i=r[e],a=t.$action||"merge";a==="merge"?i?(ht(i,n,!0),Zl(i,n,{ignoreSize:!0}),YV(t,i),Dy(t,i),Dy(t,i,"shape"),Dy(t,i,"style"),Dy(t,i,"extra"),t.clipPath=i.clipPath):r[e]=n:a==="replace"?r[e]=n:a==="remove"&&i&&(r[e]=null)}var fW=["transition","enterFrom","leaveTo"],lbe=fW.concat(["enterAnimation","updateAnimation","leaveAnimation"]);function Dy(r,e,t){if(t&&(!r[t]&&e[t]&&(r[t]={}),r=r[t],e=e[t]),!(!r||!e))for(var n=t?fW:lbe,i=0;i<n.length;i++){var a=n[i];r[a]==null&&e[a]!=null&&(r[a]=e[a])}}function ube(r,e){if(r&&(r.hv=e.hv=[xF(e,["left","right"]),xF(e,["top","bottom"])],r.type==="group")){var t=r,n=e;t.width==null&&(t.width=n.width=0),t.height==null&&(t.height=n.height=0)}}var cbe=function(r){ae(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.mergeOption=function(t,n){var i=this.option.elements;this.option.elements=null,r.prototype.mergeOption.call(this,t,n),this.option.elements=i},e.prototype.optionUpdated=function(t,n){var i=this.option,a=(n?i:t).elements,o=i.elements=n?[]:i.elements,s=[];this._flatten(a,s,null);var l=P4(o,s,"normalMerge"),u=this._elOptionsToUpdate=[];k(l,function(c,h){var f=c.newOption;f&&(u.push(f),obe(c,f),sbe(o,h,f),ube(o[h],f))},this),i.elements=jt(o,function(c){return c&&delete c.$action,c!=null})},e.prototype._flatten=function(t,n,i){k(t,function(a){if(a){i&&(a.parentOption=i),n.push(a);var o=a.children;o&&o.length&&this._flatten(o,n,a),delete a.children}},this)},e.prototype.useElOptionsToUpdate=function(){var t=this._elOptionsToUpdate;return this._elOptionsToUpdate=null,t},e.type="graphic",e.defaultOption={elements:[]},e}(Nt),SF={path:null,compoundPath:null,group:rt,image:Ur,text:Ot},xa=Pt(),hbe=function(r){ae(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._elMap=He()},e.prototype.render=function(t,n,i){t!==this._lastGraphicModel&&this._clear(),this._lastGraphicModel=t,this._updateElements(t),this._relocate(t,i)},e.prototype._updateElements=function(t){var n=t.useElOptionsToUpdate();if(n){var i=this._elMap,a=this.group,o=t.get("z"),s=t.get("zlevel");k(n,function(l){var u=fr(l.id,null),c=u!=null?i.get(u):null,h=fr(l.parentId,null),f=h!=null?i.get(h):a,d=l.type,p=l.style;d==="text"&&p&&l.hv&&l.hv[1]&&(p.textVerticalAlign=p.textBaseline=p.verticalAlign=p.align=null);var g=l.textContent,v=l.textConfig;if(p&&$6(p,d,!!v,!!g)){var m=X6(p,d,!0);!v&&m.textConfig&&(v=l.textConfig=m.textConfig),!g&&m.textContent&&(g=m.textContent)}var y=fbe(l),_=l.$action||"merge",x=_==="merge",S=_==="replace";if(x){var A=!c,w=c;A?w=AF(u,f,l.type,i):(w&&(xa(w).isNew=!1),K6(w)),w&&(p0(w,y,t,{isInit:A}),wF(w,l,o,s))}else if(S){g0(c,l,i,t);var M=AF(u,f,l.type,i);M&&(p0(M,y,t,{isInit:!0}),wF(M,l,o,s))}else _==="remove"&&(q6(c,l),g0(c,l,i,t));var C=i.get(u);if(C&&g)if(x){var b=C.getTextContent();b?b.attr(g):C.setTextContent(new Ot(g))}else S&&C.setTextContent(new Ot(g));if(C){var T=l.clipPath;if(T){var P=T.type,D=void 0,A=!1;if(x){var L=C.getClipPath();A=!L||xa(L).type!==P,D=A?yM(P):L}else S&&(A=!0,D=yM(P));C.setClipPath(D),p0(D,T,t,{isInit:A}),D_(D,T.keyframeAnimation,t)}var E=xa(C);C.setTextConfig(v),E.option=l,dbe(C,t,l),Kc({el:C,componentModel:t,itemName:C.name,itemTooltipOption:l.tooltip}),D_(C,l.keyframeAnimation,t)}})}},e.prototype._relocate=function(t,n){for(var i=t.option.elements,a=this.group,o=this._elMap,s=n.getWidth(),l=n.getHeight(),u=["x","y"],c=0;c<i.length;c++){var h=i[c],f=fr(h.id,null),d=f!=null?o.get(f):null;if(!(!d||!d.isGroup)){var p=d.parent,g=p===a,v=xa(d),m=xa(p);v.width=Pe(v.option.width,g?s:m.width)||0,v.height=Pe(v.option.height,g?l:m.height)||0}}for(var c=i.length-1;c>=0;c--){var h=i[c],f=fr(h.id,null),d=f!=null?o.get(f):null;if(d){var p=d.parent,m=xa(p),y=p===a?{width:s,height:l}:{width:m.width,height:m.height},_={},x=k1(d,h,y,null,{hv:h.hv,boundingMode:h.bounding},_);if(!xa(d).isNew&&x){for(var S=h.transition,A={},w=0;w<u.length;w++){var M=u[w],C=_[M];S&&(Ic(S)||pt(S,M)>=0)?A[M]=C:d[M]=C}zt(d,A,t,0)}else d.attr(_)}}},e.prototype._clear=function(){var t=this,n=this._elMap;n.each(function(i){g0(i,xa(i).option,n,t._lastGraphicModel)}),this._elMap=He()},e.prototype.dispose=function(){this._clear()},e.type="graphic",e}(kn);function yM(r){var e=ze(SF,r)?SF[r]:p2(r),t=new e({});return xa(t).type=r,t}function AF(r,e,t,n){var i=yM(t);return e.add(i),n.set(r,i),xa(i).id=r,xa(i).isNew=!0,i}function g0(r,e,t,n){var i=r&&r.parent;i&&(r.type==="group"&&r.traverse(function(a){g0(a,e,t,n)}),Q1(r,e,n),t.removeKey(xa(r).id))}function wF(r,e,t,n){r.isGroup||k([["cursor",ka.prototype.cursor],["zlevel",n||0],["z",t||0],["z2",0]],function(i){var a=i[0];ze(e,a)?r[a]=ot(e[a],i[1]):r[a]==null&&(r[a]=i[1])}),k(wt(e),function(i){if(i.indexOf("on")===0){var a=e[i];r[i]=qe(a)?a:null}}),ze(e,"draggable")&&(r.draggable=e.draggable),e.name!=null&&(r.name=e.name),e.id!=null&&(r.id=e.id)}function fbe(r){return r=pe({},r),k(["id","parentId","$action","hv","bounding","textContent","clipPath"].concat(XV),function(e){delete r[e]}),r}function dbe(r,e,t){var n=at(r).eventData;!r.silent&&!r.ignore&&!n&&(n=at(r).eventData={componentType:"graphic",componentIndex:e.componentIndex,name:r.name}),n&&(n.info=t.info)}function pbe(r){r.registerComponentModel(cbe),r.registerComponentView(hbe),r.registerPreprocessor(function(e){var t=e.graphic;_e(t)?!t[0]||!t[0].elements?e.graphic=[{elements:t}]:e.graphic=[e.graphic[0]]:t&&!t.elements&&(e.graphic=[{elements:[t]}])})}var bF=["x","y","radius","angle","single"],vbe=["cartesian2d","polar","singleAxis"];function gbe(r){var e=r.get("coordinateSystem");return pt(vbe,e)>=0}function Dl(r){return r+"Axis"}function mbe(r,e){var t=He(),n=[],i=He();r.eachComponent({mainType:"dataZoom",query:e},function(c){i.get(c.uid)||s(c)});var a;do a=!1,r.eachComponent("dataZoom",o);while(a);function o(c){!i.get(c.uid)&&l(c)&&(s(c),a=!0)}function s(c){i.set(c.uid,!0),n.push(c),u(c)}function l(c){var h=!1;return c.eachTargetAxis(function(f,d){var p=t.get(f);p&&p[d]&&(h=!0)}),h}function u(c){c.eachTargetAxis(function(h,f){(t.get(h)||t.set(h,[]))[f]=!0})}return n}function dW(r){var e=r.ecModel,t={infoList:[],infoMap:He()};return r.eachTargetAxis(function(n,i){var a=e.getComponent(Dl(n),i);if(a){var o=a.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(a)}}}),t}var Pw=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}(),ybe=function(r){ae(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,i){var a=TF(t);this.settledOption=a,this.mergeDefaultAndTheme(t,i),this._doInit(a)},e.prototype.mergeOption=function(t){var n=TF(t);ht(this.option,t,!0),ht(this.settledOption,n,!0),this._doInit(n)},e.prototype._doInit=function(t){var n=this.option;this._setDefaultThrottle(t),this._updateRangeUse(t);var i=this.settledOption;k([["start","startValue"],["end","endValue"]],function(a,o){this._rangePropMode[o]==="value"&&(n[a[0]]=i[a[0]]=null)},this),this._resetTarget()},e.prototype._resetTarget=function(){var t=this.get("orient",!0),n=this._targetAxisInfoMap=He(),i=this._fillSpecifiedTargetAxis(n);i?this._orient=t||this._makeAutoOrientByTargetAxis():(this._orient=t||"horizontal",this._fillAutoTargetAxisByOrient(n,this._orient)),this._noTarget=!0,n.each(function(a){a.indexList.length&&(this._noTarget=!1)},this)},e.prototype._fillSpecifiedTargetAxis=function(t){var n=!1;return k(bF,function(i){var a=this.getReferringComponents(Dl(i),Nse);if(a.specified){n=!0;var o=new Pw;k(a.models,function(s){o.add(s.componentIndex)}),t.set(i,o)}},this),n},e.prototype._fillAutoTargetAxisByOrient=function(t,n){var i=this.ecModel,a=!0;if(a){var o=n==="vertical"?"y":"x",s=i.findComponents({mainType:o+"Axis"});l(s,o)}if(a){var s=i.findComponents({mainType:"singleAxis",filter:function(c){return c.get("orient",!0)===n}});l(s,"single")}function l(u,c){var h=u[0];if(h){var f=new Pw;if(f.add(h.componentIndex),t.set(c,f),a=!1,c==="x"||c==="y"){var d=h.getReferringComponents("grid",nr).models[0];d&&k(u,function(p){h.componentIndex!==p.componentIndex&&d===p.getReferringComponents("grid",nr).models[0]&&f.add(p.componentIndex)})}}}a&&k(bF,function(u){if(a){var c=i.findComponents({mainType:Dl(u),filter:function(f){return f.get("type",!0)==="category"}});if(c[0]){var h=new Pw;h.add(c[0].componentIndex),t.set(u,h),a=!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,i=this.get("rangeMode");k([["start","startValue"],["end","endValue"]],function(a,o){var s=t[a[0]]!=null,l=t[a[1]]!=null;s&&!l?n[o]="percent":!s&&l?n[o]="value":i?n[o]=i[o]:s&&(n[o]="percent")})},e.prototype.noTarget=function(){return this._noTarget},e.prototype.getFirstTargetAxisModel=function(){var t;return this.eachTargetAxis(function(n,i){t==null&&(t=this.ecModel.getComponent(Dl(n),i))},this),t},e.prototype.eachTargetAxis=function(t,n){this._targetAxisInfoMap.each(function(i,a){k(i.indexList,function(o){t.call(n,a,o)})})},e.prototype.getAxisProxy=function(t,n){var i=this.getAxisModel(t,n);if(i)return i.__dzAxisProxy},e.prototype.getAxisModel=function(t,n){var i=this._targetAxisInfoMap.get(t);if(i&&i.indexMap[n])return this.ecModel.getComponent(Dl(t),n)},e.prototype.setRawRange=function(t){var n=this.option,i=this.settledOption;k([["start","startValue"],["end","endValue"]],function(a){(t[a[0]]!=null||t[a[1]]!=null)&&(n[a[0]]=i[a[0]]=t[a[0]],n[a[1]]=i[a[1]]=t[a[1]])},this),this._updateRangeUse(t)},e.prototype.setCalculatedRange=function(t){var n=this.option;k(["start","startValue","end","endValue"],function(i){n[i]=t[i]})},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 i=this.findRepresentativeAxisProxy();if(i)return i.getDataValueWindow()}else return this.getAxisProxy(t,n).getDataValueWindow()},e.prototype.findRepresentativeAxisProxy=function(t){if(t)return t.__dzAxisProxy;for(var n,i=this._targetAxisInfoMap.keys(),a=0;a<i.length;a++)for(var o=i[a],s=this._targetAxisInfoMap.get(o),l=0;l<s.indexList.length;l++){var u=this.getAxisProxy(o,s.indexList[l]);if(u.hostedBy(this))return u;n||(n=u)}return n},e.prototype.getRangePropMode=function(){return this._rangePropMode.slice()},e.prototype.getOrient=function(){return this._orient},e.type="dataZoom",e.dependencies=["xAxis","yAxis","radiusAxis","angleAxis","singleAxis","series","toolbox"],e.defaultOption={z:4,filterMode:"filter",start:0,end:100},e}(Nt);function TF(r){var e={};return k(["start","end","startValue","endValue","throttle"],function(t){r.hasOwnProperty(t)&&(e[t]=r[t])}),e}const lg=ybe;var _be=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(lg);const xbe=_be;var Sbe=function(r){ae(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,i,a){this.dataZoomModel=t,this.ecModel=n,this.api=i},e.type="dataZoom",e}(kn);const BE=Sbe;var Abe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="dataZoom.select",e}(BE);const wbe=Abe;var af=k,MF=Pa,bbe=function(){function r(e,t,n,i){this._dimName=e,this._axisIndex=t,this.ecModel=i,this._dataZoomModel=n}return r.prototype.hostedBy=function(e){return this._dataZoomModel===e},r.prototype.getDataValueWindow=function(){return this._valueWindow.slice()},r.prototype.getDataPercentWindow=function(){return this._percentWindow.slice()},r.prototype.getTargetSeriesModels=function(){var e=[];return this.ecModel.eachSeries(function(t){if(gbe(t)){var n=Dl(this._dimName),i=t.getReferringComponents(n,nr).models[0];i&&this._axisIndex===i.componentIndex&&e.push(t)}},this),e},r.prototype.getAxisModel=function(){return this.ecModel.getComponent(this._dimName+"Axis",this._axisIndex)},r.prototype.getMinMaxSpan=function(){return Je(this._minMaxSpan)},r.prototype.calculateDataWindow=function(e){var t=this._dataExtent,n=this.getAxisModel(),i=n.axis.scale,a=this._dataZoomModel.getRangePropMode(),o=[0,100],s=[],l=[],u;af(["start","end"],function(f,d){var p=e[f],g=e[f+"Value"];a[d]==="percent"?(p==null&&(p=o[d]),g=i.parse(Kt(p,o,t))):(u=!0,g=g==null?t[d]:i.parse(g),p=Kt(g,t,o)),l[d]=g==null||isNaN(g)?t[d]:g,s[d]=p==null||isNaN(p)?o[d]:p}),MF(l),MF(s);var c=this._minMaxSpan;u?h(l,s,t,o,!1):h(s,l,o,t,!0);function h(f,d,p,g,v){var m=v?"Span":"ValueSpan";rh(0,f,p,"all",c["min"+m],c["max"+m]);for(var y=0;y<2;y++)d[y]=Kt(f[y],p,g,!0),v&&(d[y]=i.parse(d[y]))}return{valueWindow:l,percentWindow:s}},r.prototype.reset=function(e){if(e===this._dataZoomModel){var t=this.getTargetSeriesModels();this._dataExtent=Tbe(this,this._dimName,t),this._updateMinMaxSpan();var n=this.calculateDataWindow(e.settledOption);this._valueWindow=n.valueWindow,this._percentWindow=n.percentWindow,this._setAxisModel()}},r.prototype.filterData=function(e,t){if(e!==this._dataZoomModel)return;var n=this._dimName,i=this.getTargetSeriesModels(),a=e.get("filterMode"),o=this._valueWindow;if(a==="none")return;af(i,function(l){var u=l.getData(),c=u.mapDimensionsAll(n);if(c.length){if(a==="weakFilter"){var h=u.getStore(),f=xe(c,function(d){return u.getDimensionIndex(d)},u);u.filterSelf(function(d){for(var p,g,v,m=0;m<c.length;m++){var y=h.get(f[m],d),_=!isNaN(y),x=y<o[0],S=y>o[1];if(_&&!x&&!S)return!0;_&&(v=!0),x&&(p=!0),S&&(g=!0)}return v&&p&&g})}else af(c,function(d){if(a==="empty")l.setData(u=u.map(d,function(g){return s(g)?g:NaN}));else{var p={};p[d]=o,u.selectRange(p)}});af(c,function(d){u.setApproximateExtent(o,d)})}});function s(l){return l>=o[0]&&l<=o[1]}},r.prototype._updateMinMaxSpan=function(){var e=this._minMaxSpan={},t=this._dataZoomModel,n=this._dataExtent;af(["min","max"],function(i){var a=t.get(i+"Span"),o=t.get(i+"ValueSpan");o!=null&&(o=this.getAxisModel().axis.scale.parse(o)),o!=null?a=Kt(n[0]+o,n,[0,100],!0):a!=null&&(o=Kt(a,[0,100],n,!0)-n[0]),e[i+"Span"]=a,e[i+"ValueSpan"]=o},this)},r.prototype._setAxisModel=function(){var e=this.getAxisModel(),t=this._percentWindow,n=this._valueWindow;if(t){var i=A4(n,[0,500]);i=Math.min(i,20);var a=e.axis.scale.rawExtentInfo;t[0]!==0&&a.setDeterminedMinMax("min",+n[0].toFixed(i)),t[1]!==100&&a.setDeterminedMinMax("max",+n[1].toFixed(i)),a.freeze()}},r}();function Tbe(r,e,t){var n=[1/0,-1/0];af(t,function(o){Yde(n,o.getData(),e)});var i=r.getAxisModel(),a=CH(i.axis.scale,i,n).calculate();return[a.min,a.max]}const Mbe=bbe;var Cbe={getTargetSeries:function(r){function e(i){r.eachComponent("dataZoom",function(a){a.eachTargetAxis(function(o,s){var l=r.getComponent(Dl(o),s);i(o,s,l,a)})})}e(function(i,a,o,s){o.__dzAxisProxy=null});var t=[];e(function(i,a,o,s){o.__dzAxisProxy||(o.__dzAxisProxy=new Mbe(i,a,s,r),t.push(o.__dzAxisProxy))});var n=He();return k(t,function(i){k(i.getTargetSeriesModels(),function(a){n.set(a.uid,a)})}),n},overallReset:function(r,e){r.eachComponent("dataZoom",function(t){t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).reset(t)}),t.eachTargetAxis(function(n,i){t.getAxisProxy(n,i).filterData(t,e)})}),r.eachComponent("dataZoom",function(t){var n=t.findRepresentativeAxisProxy();if(n){var i=n.getDataPercentWindow(),a=n.getDataValueWindow();t.setCalculatedRange({start:i[0],end:i[1],startValue:a[0],endValue:a[1]})}})}};const Ebe=Cbe;function Lbe(r){r.registerAction("dataZoom",function(e,t){var n=mbe(t,e);k(n,function(i){i.setRawRange({start:e.start,end:e.end,startValue:e.startValue,endValue:e.endValue})})})}var CF=!1;function zE(r){CF||(CF=!0,r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,Ebe),Lbe(r),r.registerSubTypeDefaulter("dataZoom",function(){return"slider"}))}function Pbe(r){r.registerComponentModel(xbe),r.registerComponentView(wbe),zE(r)}var wa=function(){function r(){}return r}(),pW={};function of(r,e){pW[r]=e}function vW(r){return pW[r]}var Rbe=function(r){ae(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;k(this.option.feature,function(n,i){var a=vW(i);a&&(a.getDefaultOption&&(a.defaultOption=a.getDefaultOption(t)),ht(n,a.defaultOption))})},e.type="toolbox",e.layoutMode={type:"box",ignoreSize:!0},e.defaultOption={show:!0,z:6,orient:"horizontal",left:"right",top:"top",backgroundColor:"transparent",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemSize:15,itemGap:8,showTitle:!0,iconStyle:{borderColor:"#666",color:"none"},emphasis:{iconStyle:{borderColor:"#3E98C5"}},tooltip:{show:!1,position:"bottom"}},e}(Nt);const Dbe=Rbe;function Ibe(r,e,t){var n=e.getBoxLayoutParams(),i=e.get("padding"),a={width:t.getWidth(),height:t.getHeight()},o=dr(n,a,i);Pc(e.get("orient"),r,e.get("itemGap"),o.width,o.height),k1(r,n,a,i)}function gW(r,e){var t=Sd(e.get("padding")),n=e.getItemStyle(["color","opacity"]);return n.fill=e.get("backgroundColor"),r=new Dt({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}),r}var Nbe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){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")||{},c=this._features||(this._features={}),h=[];k(u,function(p,g){h.push(g)}),new Ns(this._featureNames||[],h).add(f).update(f).remove(ut(f,null)).execute(),this._featureNames=h;function f(p,g){var v=h[p],m=h[g],y=u[v],_=new vn(y,t,t.ecModel),x;if(a&&a.newTitle!=null&&a.featureName===v&&(y.title=a.newTitle),v&&!m){if(kbe(v))x={onclick:_.option.onclick,featureName:v};else{var S=vW(v);if(!S)return;x=new S}c[v]=x}else if(x=c[m],!x)return;x.uid=xd("toolbox-feature"),x.model=_,x.ecModel=n,x.api=i;var A=x instanceof wa;if(!v&&m){A&&x.dispose&&x.dispose(n,i);return}if(!_.get("show")||A&&x.unusable){A&&x.remove&&x.remove(n,i);return}d(_,x,v),_.setIconStatus=function(w,M){var C=this.option,b=this.iconPaths;C.iconStatus=C.iconStatus||{},C.iconStatus[w]=M,b[w]&&(M==="emphasis"?Ds:Is)(b[w])},x instanceof wa&&x.render&&x.render(_,n,i,a)}function d(p,g,v){var m=p.getModel("iconStyle"),y=p.getModel(["emphasis","iconStyle"]),_=g instanceof wa&&g.getIcons?g.getIcons():p.get("icon"),x=p.get("title")||{},S,A;ke(_)?(S={},S[v]=_):S=_,ke(x)?(A={},A[v]=x):A=x;var w=p.iconPaths={};k(S,function(M,C){var b=Cg(M,{},{x:-s/2,y:-s/2,width:s,height:s});b.setStyle(m.getItemStyle());var T=b.ensureState("emphasis");T.style=y.getItemStyle();var P=new Ot({style:{text:A[C],align:y.get("textAlign"),borderRadius:y.get("textBorderRadius"),padding:y.get("textPadding"),fill:null,font:v2({fontStyle:y.get("textFontStyle"),fontFamily:y.get("textFontFamily"),fontSize:y.get("textFontSize"),fontWeight:y.get("textFontWeight")},n)},ignore:!0});b.setTextContent(P),Kc({el:b,componentModel:t,itemName:C,formatterParamsExtra:{title:A[C]}}),b.__title=A[C],b.on("mouseover",function(){var D=y.getItemStyle(),L=l?t.get("right")==null&&t.get("left")!=="right"?"right":"left":t.get("bottom")==null&&t.get("top")!=="bottom"?"bottom":"top";P.setStyle({fill:y.get("textFill")||D.fill||D.stroke||"#000",backgroundColor:y.get("textBackgroundColor")}),b.setTextConfig({position:y.get("textPosition")||L}),P.ignore=!t.get("showTitle"),i.enterEmphasis(this)}).on("mouseout",function(){p.get(["iconStatus",C])!=="emphasis"&&i.leaveEmphasis(this),P.hide()}),(p.get(["iconStatus",C])==="emphasis"?Ds:Is)(b),o.add(b),b.on("click",Fe(g.onclick,g,n,i,C)),w[C]=b})}Ibe(o,t,i),o.add(gW(o.getBoundingRect(),t)),l||o.eachChild(function(p){var g=p.__title,v=p.ensureState("emphasis"),m=v.textConfig||(v.textConfig={}),y=p.getTextContent(),_=y&&y.ensureState("emphasis");if(_&&!qe(_)&&g){var x=_.style||(_.style={}),S=wg(g,Ot.makeFont(x)),A=p.x+o.x,w=p.y+o.y+s,M=!1;w+S.height>i.getHeight()&&(m.position="top",M=!0);var C=M?-5-S.height:s+10;A+S.width/2>i.getWidth()?(m.position=["100%",C],x.align="right"):A-S.width/2<0&&(m.position=[0,C],x.align="left")}})},e.prototype.updateView=function(t,n,i,a){k(this._features,function(o){o instanceof wa&&o.updateView&&o.updateView(o.model,n,i,a)})},e.prototype.remove=function(t,n){k(this._features,function(i){i instanceof wa&&i.remove&&i.remove(t,n)}),this.group.removeAll()},e.prototype.dispose=function(t,n){k(this._features,function(i){i instanceof wa&&i.dispose&&i.dispose(t,n)})},e.type="toolbox",e}(kn);function kbe(r){return r.indexOf("my")===0}const Obe=Nbe;var Fbe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){var i=this.model,a=i.get("name")||t.get("title.0.text")||"echarts",o=n.getZr().painter.getType()==="svg",s=o?"svg":i.get("type",!0)||"png",l=n.getConnectedDataURL({type:s,backgroundColor:i.get("backgroundColor",!0)||t.get("backgroundColor")||"#fff",connectedBackgroundColor:i.get("connectedBackgroundColor"),excludeComponents:i.get("excludeComponents"),pixelRatio:i.get("pixelRatio")}),u=kt.browser;if(typeof MouseEvent=="function"&&(u.newEdge||!u.ie&&!u.edge)){var c=document.createElement("a");c.download=a+"."+s,c.target="_blank",c.href=l;var h=new MouseEvent("click",{view:document.defaultView,bubbles:!0,cancelable:!1});c.dispatchEvent(h)}else if(window.navigator.msSaveOrOpenBlob||o){var f=l.split(","),d=f[0].indexOf("base64")>-1,p=o?decodeURIComponent(f[1]):f[1];d&&(p=window.atob(p));var g=a+"."+s;if(window.navigator.msSaveOrOpenBlob){for(var v=p.length,m=new Uint8Array(v);v--;)m[v]=p.charCodeAt(v);var y=new Blob([m]);window.navigator.msSaveOrOpenBlob(y,g)}else{var _=document.createElement("iframe");document.body.appendChild(_);var x=_.contentWindow,S=x.document;S.open("image/svg+xml","replace"),S.write(p),S.close(),x.focus(),S.execCommand("SaveAs",!0,g),document.body.removeChild(_)}}else{var A=i.get("lang"),w='<body style="margin:0;"><img src="'+l+'" style="max-width:100%;" title="'+(A&&A[0]||"")+'" /></body>',M=window.open();M.document.write(w),M.document.title=a}},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:"#fff",name:"",excludeComponents:["toolbox"],lang:t.getLocaleModel().get(["toolbox","saveAsImage","lang"])};return n},e}(wa);const Bbe=Fbe;var EF="__ec_magicType_stack__",zbe=[["line","bar"],["stack"]],Ube=function(r){ae(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"),i={};return k(t.get("type"),function(a){n[a]&&(i[a]=n[a])}),i},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,i){var a=this.model,o=a.get(["seriesIndex",i]);if(LF[i]){var s={series:[]},l=function(h){var f=h.subType,d=h.id,p=LF[i](f,d,h,a);p&&(Ke(p,h.option),s.series.push(p));var g=h.coordinateSystem;if(g&&g.type==="cartesian2d"&&(i==="line"||i==="bar")){var v=g.getAxesByScale("ordinal")[0];if(v){var m=v.dim,y=m+"Axis",_=h.getReferringComponents(y,nr).models[0],x=_.componentIndex;s[y]=s[y]||[];for(var S=0;S<=x;S++)s[y][x]=s[y][x]||{};s[y][x].boundaryGap=i==="bar"}}};k(zbe,function(h){pt(h,i)>=0&&k(h,function(f){a.setIconStatus(f,"normal")})}),a.setIconStatus(i,"emphasis"),t.eachComponent({mainType:"series",query:o==null?null:{seriesIndex:o}},l);var u,c=i;i==="stack"&&(u=ht({stack:a.option.title.tiled,tiled:a.option.title.stack},a.option.title),a.get(["iconStatus",i])!=="emphasis"&&(c="tiled")),n.dispatchAction({type:"changeMagicType",currentType:c,newOption:s,newTitle:u,featureName:"magicType"})}},e}(wa),LF={line:function(r,e,t,n){if(r==="bar")return ht({id:e,type:"line",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","line"])||{},!0)},bar:function(r,e,t,n){if(r==="line")return ht({id:e,type:"bar",data:t.get("data"),stack:t.get("stack"),markPoint:t.get("markPoint"),markLine:t.get("markLine")},n.get(["option","bar"])||{},!0)},stack:function(r,e,t,n){var i=t.get("stack")===EF;if(r==="line"||r==="bar")return n.setIconStatus("stack",i?"normal":"emphasis"),ht({id:e,stack:i?"":EF},n.get(["option","stack"])||{},!0)}};es({type:"changeMagicType",event:"magicTypeChanged",update:"prepareAndUpdate"},function(r,e){e.mergeOption(r.newOption)});const Vbe=Ube;var J1=new Array(60).join("-"),od=" ";function Gbe(r){var e={},t=[],n=[];return r.eachRawSeries(function(i){var a=i.coordinateSystem;if(a&&(a.type==="cartesian2d"||a.type==="polar")){var o=a.getBaseAxis();if(o.type==="category"){var s=o.dim+"_"+o.index;e[s]||(e[s]={categoryAxis:o,valueAxis:a.getOtherAxis(o),series:[]},n.push({axisDim:o.dim,axisIndex:o.index})),e[s].series.push(i)}else t.push(i)}else t.push(i)}),{seriesGroupByCategoryAxis:e,other:t,meta:n}}function Hbe(r){var e=[];return k(r,function(t,n){var i=t.categoryAxis,a=t.valueAxis,o=a.dim,s=[" "].concat(xe(t.series,function(d){return d.name})),l=[i.model.getCategories()];k(t.series,function(d){var p=d.getRawData();l.push(d.getRawData().mapArray(p.mapDimension(o),function(g){return g}))});for(var u=[s.join(od)],c=0;c<l[0].length;c++){for(var h=[],f=0;f<l.length;f++)h.push(l[f][c]);u.push(h.join(od))}e.push(u.join(` |
|
`))}),e.join(` |
|
|
|
`+J1+` |
|
|
|
`)}function Wbe(r){return xe(r,function(e){var t=e.getRawData(),n=[e.name],i=[];return t.each(t.dimensions,function(){for(var a=arguments.length,o=arguments[a-1],s=t.getName(o),l=0;l<a-1;l++)i[l]=arguments[l];n.push((s?s+od:"")+i.join(od))}),n.join(` |
|
`)}).join(` |
|
|
|
`+J1+` |
|
|
|
`)}function $be(r){var e=Gbe(r);return{value:jt([Hbe(e.seriesGroupByCategoryAxis),Wbe(e.other)],function(t){return!!t.replace(/[\n\t\s]/g,"")}).join(` |
|
|
|
`+J1+` |
|
|
|
`),meta:e.meta}}function k_(r){return r.replace(/^\s\s*/,"").replace(/\s\s*$/,"")}function Xbe(r){var e=r.slice(0,r.indexOf(` |
|
`));if(e.indexOf(od)>=0)return!0}var _M=new RegExp("["+od+"]+","g");function Ybe(r){for(var e=r.split(/\n+/g),t=k_(e.shift()).split(_M),n=[],i=xe(t,function(l){return{name:l,data:[]}}),a=0;a<e.length;a++){var o=k_(e[a]).split(_M);n.push(o.shift());for(var s=0;s<o.length;s++)i[s]&&(i[s].data[a]=o[s])}return{series:i,categories:n}}function qbe(r){for(var e=r.split(/\n+/g),t=k_(e.shift()),n=[],i=0;i<e.length;i++){var a=k_(e[i]);if(a){var o=a.split(_M),s="",l=void 0,u=!1;isNaN(o[0])?(u=!0,s=o[0],o=o.slice(1),n[i]={name:s,value:[]},l=n[i].value):l=n[i]=[];for(var c=0;c<o.length;c++)l.push(+o[c]);l.length===1&&(u?n[i].value=l[0]:n[i]=l[0])}}return{name:t,data:n}}function jbe(r,e){var t=r.split(new RegExp(` |
|
*`+J1+` |
|
*`,"g")),n={series:[]};return k(t,function(i,a){if(Xbe(i)){var o=Ybe(i),s=e[a],l=s.axisDim+"Axis";s&&(n[l]=n[l]||[],n[l][s.axisIndex]={data:o.categories},n.series=n.series.concat(o.series))}else{var o=qbe(i);n.series.push(o)}}),n}var Kbe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){setTimeout(function(){n.dispatchAction({type:"hideTip"})});var i=n.getDom(),a=this.model;this._dom&&i.removeChild(this._dom);var o=document.createElement("div");o.style.cssText="position:absolute;top:0;bottom:0;left:0;right:0;padding:5px",o.style.backgroundColor=a.get("backgroundColor")||"#fff";var s=document.createElement("h4"),l=a.get("lang")||[];s.innerHTML=l[0]||a.get("title"),s.style.cssText="margin:10px 20px",s.style.color=a.get("textColor");var u=document.createElement("div"),c=document.createElement("textarea");u.style.cssText="overflow:auto";var h=a.get("optionToContent"),f=a.get("contentToOption"),d=$be(t);if(qe(h)){var p=h(n.getOption());ke(p)?u.innerHTML=p:Zf(p)&&u.appendChild(p)}else{c.readOnly=a.get("readOnly");var g=c.style;g.cssText="display:block;width:100%;height:100%;font-family:monospace;font-size:14px;line-height:1.6rem;resize:none;box-sizing:border-box;outline:none",g.color=a.get("textColor"),g.borderColor=a.get("textareaBorderColor"),g.backgroundColor=a.get("textareaColor"),c.value=d.value,u.appendChild(c)}var v=d.meta,m=document.createElement("div");m.style.cssText="position:absolute;bottom:5px;left:0;right:0";var y="float:right;margin-right:20px;border:none;cursor:pointer;padding:2px 5px;font-size:12px;border-radius:3px",_=document.createElement("div"),x=document.createElement("div");y+=";background-color:"+a.get("buttonColor"),y+=";color:"+a.get("buttonTextColor");var S=this;function A(){i.removeChild(o),S._dom=null}Qb(_,"click",A),Qb(x,"click",function(){if(f==null&&h!=null||f!=null&&h==null){A();return}var w;try{qe(f)?w=f(u,n.getOption()):w=jbe(c.value,v)}catch(M){throw A(),new Error("Data view format error "+M)}w&&n.dispatchAction({type:"changeDataView",newOption:w}),A()}),_.innerHTML=l[1],x.innerHTML=l[2],x.style.cssText=_.style.cssText=y,!a.get("readOnly")&&m.appendChild(x),m.appendChild(_),o.appendChild(s),o.appendChild(u),o.appendChild(m),u.style.height=i.clientHeight-80+"px",i.appendChild(o),this._dom=o},e.prototype.remove=function(t,n){this._dom&&n.getDom().removeChild(this._dom)},e.prototype.dispose=function(t,n){this.remove(t,n)},e.getDefaultOption=function(t){var n={show:!0,readOnly:!1,optionToContent:null,contentToOption:null,icon:"M17.5,17.3H33 M17.5,17.3H33 M45.4,29.5h-28 M11.5,2v56H51V14.8L38.4,2H11.5z M38.4,2.2v12.7H51 M45.4,41.7h-28",title:t.getLocaleModel().get(["toolbox","dataView","title"]),lang:t.getLocaleModel().get(["toolbox","dataView","lang"]),backgroundColor:"#fff",textColor:"#000",textareaColor:"#fff",textareaBorderColor:"#333",buttonColor:"#c23531",buttonTextColor:"#fff"};return n},e}(wa);function Zbe(r,e){return xe(r,function(t,n){var i=e&&e[n];if(Qe(i)&&!_e(i)){var a=Qe(t)&&!_e(t);a||(t={value:t});var o=i.name!=null&&t.name==null;return t=Ke(t,i),o&&delete t.name,t}else return t})}es({type:"changeDataView",event:"dataViewChanged",update:"prepareAndUpdate"},function(r,e){var t=[];k(r.newOption.series,function(n){var i=e.getSeriesByName(n.name)[0];if(!i)t.push(pe({type:"scatter"},n));else{var a=i.get("data");t.push({name:n.name,data:Zbe(n.data,a)})}}),e.mergeOption(Ke({series:t},r.newOption))});const Qbe=Kbe;var mW=k,yW=Pt();function Jbe(r,e){var t=UE(r);mW(e,function(n,i){for(var a=t.length-1;a>=0;a--){var o=t[a];if(o[i])break}if(a<0){var s=r.queryComponents({mainType:"dataZoom",subType:"select",id:i})[0];if(s){var l=s.getPercentRange();t[0][i]={dataZoomId:i,start:l[0],end:l[1]}}}}),t.push(e)}function eTe(r){var e=UE(r),t=e[e.length-1];e.length>1&&e.pop();var n={};return mW(t,function(i,a){for(var o=e.length-1;o>=0;o--)if(i=e[o][a],i){n[a]=i;break}}),n}function tTe(r){yW(r).snapshots=null}function nTe(r){return UE(r).length}function UE(r){var e=yW(r);return e.snapshots||(e.snapshots=[{}]),e.snapshots}var rTe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.onclick=function(t,n){tTe(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}(wa);es({type:"restore",event:"restore",update:"prepareAndUpdate"},function(r,e){e.resetOption("recreate")});const iTe=rTe;var aTe=["grid","xAxis","yAxis","geo","graph","polar","radiusAxis","angleAxis","bmap"],oTe=function(){function r(e,t,n){var i=this;this._targetInfoList=[];var a=PF(t,e);k(sTe,function(o,s){(!n||!n.include||pt(n.include,s)>=0)&&o(a,i._targetInfoList)})}return r.prototype.setOutputRanges=function(e,t){return this.matchOutputRanges(e,t,function(n,i,a){if((n.coordRanges||(n.coordRanges=[])).push(i),!n.coordRange){n.coordRange=i;var o=Rw[n.brushType](0,a,i);n.__rangeOffset={offset:NF[n.brushType](o.values,n.range,[1,1]),xyMinMax:o.xyMinMax}}}),e},r.prototype.matchOutputRanges=function(e,t,n){k(e,function(i){var a=this.findTargetInfo(i,t);a&&a!==!0&&k(a.coordSyses,function(o){var s=Rw[i.brushType](1,o,i.range,!0);n(i,s.values,o,t)})},this)},r.prototype.setInputRanges=function(e,t){k(e,function(n){var i=this.findTargetInfo(n,t);if(n.range=n.range||[],i&&i!==!0){n.panelId=i.panelId;var a=Rw[n.brushType](0,i.coordSys,n.coordRange),o=n.__rangeOffset;n.range=o?NF[n.brushType](a.values,o.offset,lTe(a.xyMinMax,o.xyMinMax)):a.values}},this)},r.prototype.makePanelOpts=function(e,t){return xe(this._targetInfoList,function(n){var i=n.getPanelRect();return{panelId:n.panelId,defaultBrushType:t?t(n):null,clipPath:T6(i),isTargetByCursor:C6(i,e,n.coordSysModel),getLinearBrushOtherExtent:M6(i)}})},r.prototype.controlSeries=function(e,t,n){var i=this.findTargetInfo(e,n);return i===!0||i&&pt(i.coordSyses,t.coordinateSystem)>=0},r.prototype.findTargetInfo=function(e,t){for(var n=this._targetInfoList,i=PF(t,e),a=0;a<n.length;a++){var o=n[a],s=e.panelId;if(s){if(o.panelId===s)return o}else for(var l=0;l<RF.length;l++)if(RF[l](i,o))return o}return!0},r}();function xM(r){return r[0]>r[1]&&r.reverse(),r}function PF(r,e){return rv(r,e,{includeMainTypes:aTe})}var sTe={grid:function(r,e){var t=r.xAxisModels,n=r.yAxisModels,i=r.gridModels,a=He(),o={},s={};!t&&!n&&!i||(k(t,function(l){var u=l.axis.grid.model;a.set(u.id,u),o[u.id]=!0}),k(n,function(l){var u=l.axis.grid.model;a.set(u.id,u),s[u.id]=!0}),k(i,function(l){a.set(l.id,l),o[l.id]=!0,s[l.id]=!0}),a.each(function(l){var u=l.coordinateSystem,c=[];k(u.getCartesians(),function(h,f){(pt(t,h.getAxis("x").model)>=0||pt(n,h.getAxis("y").model)>=0)&&c.push(h)}),e.push({panelId:"grid--"+l.id,gridModel:l,coordSysModel:l,coordSys:c[0],coordSyses:c,getPanelRect:DF.grid,xAxisDeclared:o[l.id],yAxisDeclared:s[l.id]})}))},geo:function(r,e){k(r.geoModels,function(t){var n=t.coordinateSystem;e.push({panelId:"geo--"+t.id,geoModel:t,coordSysModel:t,coordSys:n,coordSyses:[n],getPanelRect:DF.geo})})}},RF=[function(r,e){var t=r.xAxisModel,n=r.yAxisModel,i=r.gridModel;return!i&&t&&(i=t.axis.grid.model),!i&&n&&(i=n.axis.grid.model),i&&i===e.gridModel},function(r,e){var t=r.geoModel;return t&&t===e.geoModel}],DF={grid:function(){return this.coordSys.master.getRect().clone()},geo:function(){var r=this.coordSys,e=r.getBoundingRect().clone();return e.applyTransform(Lc(r)),e}},Rw={lineX:ut(IF,0),lineY:ut(IF,1),rect:function(r,e,t,n){var i=r?e.pointToData([t[0][0],t[1][0]],n):e.dataToPoint([t[0][0],t[1][0]],n),a=r?e.pointToData([t[0][1],t[1][1]],n):e.dataToPoint([t[0][1],t[1][1]],n),o=[xM([i[0],a[0]]),xM([i[1],a[1]])];return{values:o,xyMinMax:o}},polygon:function(r,e,t,n){var i=[[1/0,-1/0],[1/0,-1/0]],a=xe(t,function(o){var s=r?e.pointToData(o,n):e.dataToPoint(o,n);return i[0][0]=Math.min(i[0][0],s[0]),i[1][0]=Math.min(i[1][0],s[1]),i[0][1]=Math.max(i[0][1],s[0]),i[1][1]=Math.max(i[1][1],s[1]),s});return{values:a,xyMinMax:i}}};function IF(r,e,t,n){var i=t.getAxis(["x","y"][r]),a=xM(xe([0,1],function(s){return e?i.coordToData(i.toLocalCoord(n[s]),!0):i.toGlobalCoord(i.dataToCoord(n[s]))})),o=[];return o[r]=a,o[1-r]=[NaN,NaN],{values:a,xyMinMax:o}}var NF={lineX:ut(kF,0),lineY:ut(kF,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 xe(r,function(n,i){return[n[0]-t[0]*e[i][0],n[1]-t[1]*e[i][1]]})}};function kF(r,e,t,n){return[e[0]-n[r]*t[0],e[1]-n[r]*t[1]]}function lTe(r,e){var t=OF(r),n=OF(e),i=[t[0]/n[0],t[1]/n[1]];return isNaN(i[0])&&(i[0]=1),isNaN(i[1])&&(i[1]=1),i}function OF(r){return r?[r[0][1]-r[0][0],r[1][1]-r[1][0]]:[NaN,NaN]}const VE=oTe;var SM=k,uTe=Lse("toolbox-dataZoom_"),cTe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i,a){this._brushController||(this._brushController=new _E(i.getZr()),this._brushController.on("brush",Fe(this._onBrush,this)).mount()),dTe(t,n,this,a,i),fTe(t,n)},e.prototype.onclick=function(t,n,i){hTe[i].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 i={},a=this.ecModel;this._brushController.updateCovers([]);var o=new VE(GE(this.model),a,{include:["grid"]});o.matchOutputRanges(n,a,function(u,c,h){if(h.type==="cartesian2d"){var f=u.brushType;f==="rect"?(s("x",h,c[0]),s("y",h,c[1])):s({lineX:"x",lineY:"y"}[f],h,c)}}),Jbe(a,i),this._dispatchZoomAction(i);function s(u,c,h){var f=c.getAxis(u),d=f.model,p=l(u,d,a),g=p.findRepresentativeAxisProxy(d).getMinMaxSpan();(g.minValueSpan!=null||g.maxValueSpan!=null)&&(h=rh(0,h.slice(),f.scale.getExtent(),0,g.minValueSpan,g.maxValueSpan)),p&&(i[p.id]={dataZoomId:p.id,startValue:h[0],endValue:h[1]})}function l(u,c,h){var f;return h.eachComponent({mainType:"dataZoom",subType:"select"},function(d){var p=d.getAxisModel(u,c.componentIndex);p&&(f=d)}),f}},e.prototype._dispatchZoomAction=function(t){var n=[];SM(t,function(i,a){n.push(Je(i))}),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:"rgba(210,219,238,0.2)"}};return n},e}(wa),hTe={zoom:function(){var r=!this._isZoomActive;this.api.dispatchAction({type:"takeGlobalCursor",key:"dataZoomSelect",dataZoomSelectActive:r})},back:function(){this._dispatchZoomAction(eTe(this.ecModel))}};function GE(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 fTe(r,e){r.setIconStatus("back",nTe(e)>1?"emphasis":"normal")}function dTe(r,e,t,n,i){var a=t._isZoomActive;n&&n.type==="takeGlobalCursor"&&(a=n.key==="dataZoomSelect"?n.dataZoomSelectActive:!1),t._isZoomActive=a,r.setIconStatus("zoom",a?"emphasis":"normal");var o=new VE(GE(r),e,{include:["grid"]}),s=o.makePanelOpts(i,function(l){return l.xAxisDeclared&&!l.yAxisDeclared?"lineX":!l.xAxisDeclared&&l.yAxisDeclared?"lineY":"rect"});t._brushController.setPanels(s).enableBrush(a&&s.length?{brushType:"auto",brushStyle:r.getModel("brushStyle").getItemStyle()}:!1)}uce("dataZoom",function(r){var e=r.getComponent("toolbox",0),t=["feature","dataZoom"];if(!e||e.get(t)==null)return;var n=e.getModel(t),i=[],a=GE(n),o=rv(r,a);SM(o.xAxisModels,function(l){return s(l,"xAxis","xAxisIndex")}),SM(o.yAxisModels,function(l){return s(l,"yAxis","yAxisIndex")});function s(l,u,c){var h=l.componentIndex,f={type:"select",$fromToolbox:!0,filterMode:n.get("filterMode",!0)||"filter",id:uTe+u+h};f[c]=h,i.push(f)}return i});const pTe=cTe;function vTe(r){r.registerComponentModel(Dbe),r.registerComponentView(Obe),of("saveAsImage",Bbe),of("magicType",Vbe),of("dataView",Qbe),of("dataZoom",pTe),of("restore",iTe),gt(Pbe)}var gTe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="tooltip",e.dependencies=["axisPointer"],e.defaultOption={z:60,show:!0,showContent:!0,trigger:"item",triggerOn:"mousemove|click",alwaysShowContent:!1,displayMode:"single",renderMode:"auto",confine:null,showDelay:0,hideDelay:100,transitionDuration:.4,enterable:!1,backgroundColor:"#fff",shadowBlur:10,shadowColor:"rgba(0, 0, 0, .2)",shadowOffsetX:1,shadowOffsetY:2,borderRadius:4,borderWidth:1,padding:null,extraCssText:"",axisPointer:{type:"line",axis:"auto",animation:"auto",animationDurationUpdate:200,animationEasingUpdate:"exponentialOut",crossStyle:{color:"#999",width:1,type:"dashed",textStyle:{}}},textStyle:{color:"#666",fontSize:14}},e}(Nt);const mTe=gTe;function _W(r){var e=r.get("confine");return e!=null?!!e:r.get("renderMode")==="richText"}function xW(r){if(kt.domSupported){for(var e=document.documentElement.style,t=0,n=r.length;t<n;t++)if(r[t]in e)return r[t]}}var SW=xW(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),yTe=xW(["webkitTransition","transition","OTransition","MozTransition","msTransition"]);function AW(r,e){if(!r)return e;e=WV(e,!0);var t=r.indexOf(e);return r=t===-1?e:"-"+r.slice(0,t)+"-"+e,r.toLowerCase()}function _Te(r,e){var t=r.currentStyle||document.defaultView&&document.defaultView.getComputedStyle(r);return t?e?t[e]:t:null}var xTe=AW(yTe,"transition"),HE=AW(SW,"transform"),STe="position:absolute;display:block;border-style:solid;white-space:nowrap;z-index:9999999;"+(kt.transform3dSupported?"will-change:transform;":"");function ATe(r){return r=r==="left"?"right":r==="right"?"left":r==="top"?"bottom":"top",r}function wTe(r,e,t){if(!ke(t)||t==="inside")return"";var n=r.get("backgroundColor"),i=r.get("borderWidth");e=Hc(e);var a=ATe(t),o=Math.max(Math.round(i)*1.5,6),s="",l=HE+":",u;pt(["left","right"],a)>-1?(s+="top:50%",l+="translateY(-50%) rotate("+(u=a==="left"?-225:-45)+"deg)"):(s+="left:50%",l+="translateX(-50%) rotate("+(u=a==="top"?225:45)+"deg)");var c=u*Math.PI/180,h=o+i,f=h*Math.abs(Math.cos(c))+h*Math.abs(Math.sin(c)),d=Math.round(((f-Math.SQRT2*i)/2+Math.SQRT2*i-(f-h)/2)*100)/100;s+=";"+a+":-"+d+"px";var p=e+" solid "+i+"px;",g=["position:absolute;width:"+o+"px;height:"+o+"px;z-index:-1;",s+";"+l+";","border-bottom:"+p,"border-right:"+p,"background-color:"+n+";"];return'<div style="'+g.join("")+'"></div>'}function bTe(r,e){var t="cubic-bezier(0.23,1,0.32,1)",n=" "+r/2+"s "+t,i="opacity"+n+",visibility"+n;return e||(n=" "+r+"s "+t,i+=kt.transformSupported?","+HE+n:",left"+n+",top"+n),xTe+":"+i}function FF(r,e,t){var n=r.toFixed(0)+"px",i=e.toFixed(0)+"px";if(!kt.transformSupported)return t?"top:"+i+";left:"+n+";":[["top",i],["left",n]];var a=kt.transform3dSupported,o="translate"+(a?"3d":"")+"("+n+","+i+(a?",0":"")+")";return t?"top:0;left:0;"+HE+":"+o+";":[["top",0],["left",0],[SW,o]]}function TTe(r){var e=[],t=r.get("fontSize"),n=r.getTextColor();n&&e.push("color:"+n),e.push("font:"+r.getFont());var i=ot(r.get("lineHeight"),Math.round(t*3/2));t&&e.push("line-height:"+i+"px");var a=r.get("textShadowColor"),o=r.get("textShadowBlur")||0,s=r.get("textShadowOffsetX")||0,l=r.get("textShadowOffsetY")||0;return a&&o&&e.push("text-shadow:"+s+"px "+l+"px "+o+"px "+a),k(["decoration","align"],function(u){var c=r.get(u);c&&e.push("text-"+u+":"+c)}),e.join(";")}function MTe(r,e,t){var n=[],i=r.get("transitionDuration"),a=r.get("backgroundColor"),o=r.get("shadowBlur"),s=r.get("shadowColor"),l=r.get("shadowOffsetX"),u=r.get("shadowOffsetY"),c=r.getModel("textStyle"),h=MG(r,"html"),f=l+"px "+u+"px "+o+"px "+s;return n.push("box-shadow:"+f),e&&i&&n.push(bTe(i,t)),a&&n.push("background-color:"+a),k(["width","color","radius"],function(d){var p="border-"+d,g=WV(p),v=r.get(g);v!=null&&n.push(p+":"+v+(d==="color"?"":"px"))}),n.push(TTe(c)),h!=null&&n.push("padding:"+Sd(h).join("px ")+"px"),n.join(";")+";"}function BF(r,e,t,n,i){var a=e&&e.painter;if(t){var o=a&&a.getViewportRoot();o&&Qae(r,o,t,n,i)}else{r[0]=n,r[1]=i;var s=a&&a.getViewportRootOffset();s&&(r[0]+=s.offsetLeft,r[1]+=s.offsetTop)}r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}var CTe=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,kt.wxa)return null;var n=document.createElement("div");n.domBelongToZr=!0,this.el=n;var i=this._zr=e.getZr(),a=t.appendTo,o=a&&(ke(a)?document.querySelector(a):Zf(a)?a:qe(a)&&a(e.getDom()));BF(this._styleCoord,i,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=i.handler,c=i.painter.getViewportRoot();ma(c,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=_Te(t,"position"),i=t.style;i.position!=="absolute"&&n!=="absolute"&&(i.position="relative")}var a=e.get("alwaysShowContent");a&&this._moveIfResized(),this._alwaysShowContent=a,this.el.className=e.get("className")||""},r.prototype.show=function(e,t){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var n=this.el,i=n.style,a=this._styleCoord;n.innerHTML?i.cssText=STe+MTe(e,!this._firstShow,this._longHide)+FF(a[0],a[1],!0)+("border-color:"+Hc(t)+";")+(e.get("extraCssText")||"")+(";pointer-events:"+(this._enterable?"auto":"none")):i.display="none",this._show=!0,this._firstShow=!1,this._longHide=!1},r.prototype.setContent=function(e,t,n,i,a){var o=this.el;if(e==null){o.innerHTML="";return}var s="";if(ke(a)&&n.get("trigger")==="item"&&!_W(n)&&(s=wTe(n,i,a)),ke(e))o.innerHTML=e+s;else if(e){o.innerHTML="",_e(e)||(e=[e]);for(var l=0;l<e.length;l++)Zf(e[l])&&e[l].parentNode!==o&&o.appendChild(e[l]);if(s&&o.childNodes.length){var u=document.createElement("div");u.innerHTML=s,o.appendChild(u)}}},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el;return e?[e.offsetWidth,e.offsetHeight]:[0,0]},r.prototype.moveTo=function(e,t){if(this.el){var n=this._styleCoord;if(BF(n,this._zr,this._container,e,t),n[0]!=null&&n[1]!=null){var i=this.el.style,a=FF(n[0],n[1]);k(a,function(o){i[o[0]]=o[1]})}}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){var e=this,t=this.el.style;t.visibility="hidden",t.opacity="0",kt.transform3dSupported&&(t.willChange=""),this._show=!1,this._longHideTimeout=setTimeout(function(){return e._longHide=!0},500)},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Fe(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){clearTimeout(this._hideTimeout),clearTimeout(this._longHideTimeout);var e=this.el.parentNode;e&&e.removeChild(this.el),this.el=this._container=null},r}();const ETe=CTe;var LTe=function(){function r(e){this._show=!1,this._styleCoord=[0,0,0,0],this._alwaysShowContent=!1,this._enterable=!0,this._zr=e.getZr(),UF(this._styleCoord,this._zr,e.getWidth()/2,e.getHeight()/2)}return r.prototype.update=function(e){var t=e.get("alwaysShowContent");t&&this._moveIfResized(),this._alwaysShowContent=t},r.prototype.show=function(){this._hideTimeout&&clearTimeout(this._hideTimeout),this.el.show(),this._show=!0},r.prototype.setContent=function(e,t,n,i,a){var o=this;Qe(e)&&qt(""),this.el&&this._zr.remove(this.el);var s=n.getModel("textStyle");this.el=new Ot({style:{rich:t.richTextStyles,text:e,lineHeight:22,borderWidth:1,borderColor:i,textShadowColor:s.get("textShadowColor"),fill:n.get(["textStyle","color"]),padding:MG(n,"richText"),verticalAlign:"top",align:"left"},z:n.get("z")}),k(["backgroundColor","borderRadius","shadowColor","shadowBlur","shadowOffsetX","shadowOffsetY"],function(u){o.el.style[u]=n.get(u)}),k(["textShadowBlur","textShadowOffsetX","textShadowOffsetY"],function(u){o.el.style[u]=s.get(u)||0}),this._zr.add(this.el);var l=this;this.el.on("mouseover",function(){l._enterable&&(clearTimeout(l._hideTimeout),l._show=!0),l._inContent=!0}),this.el.on("mouseout",function(){l._enterable&&l._show&&l.hideLater(l._hideDelay),l._inContent=!1})},r.prototype.setEnterable=function(e){this._enterable=e},r.prototype.getSize=function(){var e=this.el,t=this.el.getBoundingRect(),n=zF(e.style);return[t.width+n.left+n.right,t.height+n.top+n.bottom]},r.prototype.moveTo=function(e,t){var n=this.el;if(n){var i=this._styleCoord;UF(i,this._zr,e,t),e=i[0],t=i[1];var a=n.style,o=ll(a.borderWidth||0),s=zF(a);n.x=e+o+s.left,n.y=t+o+s.top,n.markRedraw()}},r.prototype._moveIfResized=function(){var e=this._styleCoord[2],t=this._styleCoord[3];this.moveTo(e*this._zr.getWidth(),t*this._zr.getHeight())},r.prototype.hide=function(){this.el&&this.el.hide(),this._show=!1},r.prototype.hideLater=function(e){this._show&&!(this._inContent&&this._enterable)&&!this._alwaysShowContent&&(e?(this._hideDelay=e,this._show=!1,this._hideTimeout=setTimeout(Fe(this.hide,this),e)):this.hide())},r.prototype.isShow=function(){return this._show},r.prototype.dispose=function(){this._zr.remove(this.el)},r}();function ll(r){return Math.max(0,r)}function zF(r){var e=ll(r.shadowBlur||0),t=ll(r.shadowOffsetX||0),n=ll(r.shadowOffsetY||0);return{left:ll(e-t),right:ll(e+t),top:ll(e-n),bottom:ll(e+n)}}function UF(r,e,t,n){r[0]=t,r[1]=n,r[2]=r[0]/e.getWidth(),r[3]=r[1]/e.getHeight()}const PTe=LTe;var RTe=new Dt({shape:{x:-1,y:-1,width:2,height:2}}),DTe=function(r){ae(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){if(!(kt.node||!n.getDom())){var i=t.getComponent("tooltip"),a=this._renderMode=Ose(i.get("renderMode"));this._tooltipContent=a==="richText"?new PTe(n):new ETe(n,{appendTo:i.get("appendToBody",!0)?"body":i.get("appendTo",!0)})}},e.prototype.render=function(t,n,i){if(!(kt.node||!i.getDom())){this.group.removeAll(),this._tooltipModel=t,this._ecModel=n,this._api=i;var a=this._tooltipContent;a.update(t),a.setEnterable(t.get("enterable")),this._initGlobalListener(),this._keepShow(),this._renderMode!=="richText"&&t.get("transitionDuration")?Md(this,"_updatePosition",50,"fixRate"):Kv(this,"_updatePosition")}},e.prototype._initGlobalListener=function(){var t=this._tooltipModel,n=t.get("triggerOn");aW("itemTooltip",this._api,Fe(function(i,a,o){n!=="none"&&(n.indexOf(i)>=0?this._tryShow(a,o):i==="leave"&&this._hide(o))},this))},e.prototype._keepShow=function(){var t=this._tooltipModel,n=this._ecModel,i=this._api,a=t.get("triggerOn");if(this._lastX!=null&&this._lastY!=null&&a!=="none"&&a!=="click"){var o=this;clearTimeout(this._refreshUpdateTimeout),this._refreshUpdateTimeout=setTimeout(function(){!i.isDisposed()&&o.manuallyShowTip(t,n,i,{x:o._lastX,y:o._lastY,dataByCoordSys:o._lastDataByCoordSys})})}},e.prototype.manuallyShowTip=function(t,n,i,a){if(!(a.from===this.uid||kt.node||!i.getDom())){var o=VF(a,i);this._ticket="";var s=a.dataByCoordSys,l=OTe(a,n,i);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:a.position,positionDefault:"bottom"},o)}else if(a.tooltip&&a.x!=null&&a.y!=null){var c=RTe;c.x=a.x,c.y=a.y,c.update(),at(c).tooltipConfig={name:null,option:a.tooltip},this._tryShow({offsetX:a.x,offsetY:a.y,target:c},o)}else if(s)this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,dataByCoordSys:s,tooltipOption:a.tooltipOption},o);else if(a.seriesIndex!=null){if(this._manuallyAxisShowTip(t,n,i,a))return;var h=oW(a,n),f=h.point[0],d=h.point[1];f!=null&&d!=null&&this._tryShow({offsetX:f,offsetY:d,target:h.el,position:a.position,positionDefault:"bottom"},o)}else a.x!=null&&a.y!=null&&(i.dispatchAction({type:"updateAxisPointer",x:a.x,y:a.y}),this._tryShow({offsetX:a.x,offsetY:a.y,position:a.position,target:i.getZr().findHover(a.x,a.y).target},o))}},e.prototype.manuallyHideTip=function(t,n,i,a){var o=this._tooltipContent;this._tooltipModel&&o.hideLater(this._tooltipModel.get("hideDelay")),this._lastX=this._lastY=this._lastDataByCoordSys=null,a.from!==this.uid&&this._hide(VF(a,i))},e.prototype._manuallyAxisShowTip=function(t,n,i,a){var o=a.seriesIndex,s=a.dataIndex,l=n.getComponent("axisPointer").coordSysAxesInfo;if(!(o==null||s==null||l==null)){var u=n.getSeriesByIndex(o);if(u){var c=u.getData(),h=vp([c.getItemModel(s),u,(u.coordinateSystem||{}).model],this._tooltipModel);if(h.get("trigger")==="axis")return i.dispatchAction({type:"updateAxisPointer",seriesIndex:o,dataIndex:s,position:a.position}),!0}}},e.prototype._tryShow=function(t,n){var i=t.target,a=this._tooltipModel;if(a){this._lastX=t.offsetX,this._lastY=t.offsetY;var o=t.dataByCoordSys;if(o&&o.length)this._showAxisTooltip(o,t);else if(i){var s=at(i);if(s.ssrType==="legend")return;this._lastDataByCoordSys=null;var l,u;lc(i,function(c){if(at(c).dataIndex!=null)return l=c,!0;if(at(c).tooltipConfig!=null)return u=c,!0},!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 i=t.get("showDelay");n=Fe(n,this),clearTimeout(this._showTimout),i>0?this._showTimout=setTimeout(n,i):n()},e.prototype._showAxisTooltip=function(t,n){var i=this._ecModel,a=this._tooltipModel,o=[n.offsetX,n.offsetY],s=vp([n.tooltipOption],a),l=this._renderMode,u=[],c=Ar("section",{blocks:[],noHeader:!0}),h=[],f=new vA;k(t,function(y){k(y.dataByAxis,function(_){var x=i.getComponent(_.axisDim+"Axis",_.axisIndex),S=_.value;if(!(!x||S==null)){var A=nW(S,x.axis,i,_.seriesDataIndices,_.valueLabelOpt),w=Ar("section",{header:A,noHeader:!eo(A),sortBlocks:!0,blocks:[]});c.blocks.push(w),k(_.seriesDataIndices,function(M){var C=i.getSeriesByIndex(M.seriesIndex),b=M.dataIndexInside,T=C.getDataParams(b);if(!(T.dataIndex<0)){T.axisDim=_.axisDim,T.axisIndex=_.axisIndex,T.axisType=_.axisType,T.axisId=_.axisId,T.axisValue=G2(x.axis,{value:S}),T.axisValueLabel=A,T.marker=f.makeTooltipMarker("item",Hc(T.color),l);var P=TN(C.formatTooltip(b,!0,null)),D=P.frag;if(D){var L=vp([C],a).get("valueFormatter");w.blocks.push(L?pe({valueFormatter:L},D):D)}P.text&&h.push(P.text),u.push(T)}})}})}),c.blocks.reverse(),h.reverse();var d=n.position,p=s.get("order"),g=RN(c,f,l,p,i.get("useUTC"),s.get("textStyle"));g&&h.unshift(g);var v=l==="richText"?` |
|
|
|
`:"<br/>",m=h.join(v);this._showOrMove(s,function(){this._updateContentNotChangedOnAxis(t,u)?this._updatePosition(s,d,o[0],o[1],this._tooltipContent,u):this._showTooltipContent(s,m,u,Math.random()+"",o[0],o[1],d,null,f)})},e.prototype._showSeriesItemTooltip=function(t,n,i){var a=this._ecModel,o=at(n),s=o.seriesIndex,l=a.getSeriesByIndex(s),u=o.dataModel||l,c=o.dataIndex,h=o.dataType,f=u.getData(h),d=this._renderMode,p=t.positionDefault,g=vp([f.getItemModel(c),u,l&&(l.coordinateSystem||{}).model],this._tooltipModel,p?{position:p}:null),v=g.get("trigger");if(!(v!=null&&v!=="item")){var m=u.getDataParams(c,h),y=new vA;m.marker=y.makeTooltipMarker("item",Hc(m.color),d);var _=TN(u.formatTooltip(c,!1,h)),x=g.get("order"),S=g.get("valueFormatter"),A=_.frag,w=A?RN(S?pe({valueFormatter:S},A):A,y,d,x,a.get("useUTC"),g.get("textStyle")):_.text,M="item_"+u.name+"_"+c;this._showOrMove(g,function(){this._showTooltipContent(g,w,m,M,t.offsetX,t.offsetY,t.position,t.target,y)}),i({type:"showTip",dataIndexInside:c,dataIndex:f.getRawIndex(c),seriesIndex:s,from:this.uid})}},e.prototype._showComponentItemTooltip=function(t,n,i){var a=this._renderMode==="html",o=at(n),s=o.tooltipConfig,l=s.option||{},u=l.encodeHTMLContent;if(ke(l)){var c=l;l={content:c,formatter:c},u=!0}u&&a&&l.content&&(l=Je(l),l.content=Jr(l.content));var h=[l],f=this._ecModel.getComponent(o.componentMainType,o.componentIndex);f&&h.push(f),h.push({formatter:l.content});var d=t.positionDefault,p=vp(h,this._tooltipModel,d?{position:d}:null),g=p.get("content"),v=Math.random()+"",m=new vA;this._showOrMove(p,function(){var y=Je(p.get("formatterParams")||{});this._showTooltipContent(p,g,y,v,t.offsetX,t.offsetY,t.position,n,m)}),i({type:"showTip",from:this.uid})},e.prototype._showTooltipContent=function(t,n,i,a,o,s,l,u,c){if(this._ticket="",!(!t.get("showContent")||!t.get("show"))){var h=this._tooltipContent;h.setEnterable(t.get("enterable"));var f=t.get("formatter");l=l||t.get("position");var d=n,p=this._getNearestPoint([o,s],i,t.get("trigger"),t.get("borderColor")),g=p.color;if(f)if(ke(f)){var v=t.ecModel.get("useUTC"),m=_e(i)?i[0]:i,y=m&&m.axisType&&m.axisType.indexOf("time")>=0;d=f,y&&(d=P1(m.axisValue,d,v)),d=$V(d,i,!0)}else if(qe(f)){var _=Fe(function(x,S){x===this._ticket&&(h.setContent(S,c,t,g,l),this._updatePosition(t,l,o,s,h,i,u))},this);this._ticket=a,d=f(i,a,_)}else d=f;h.setContent(d,c,t,g,l),h.show(t,g),this._updatePosition(t,l,o,s,h,i,u)}},e.prototype._getNearestPoint=function(t,n,i,a){if(i==="axis"||_e(n))return{color:a||(this._renderMode==="html"?"#fff":"none")};if(!_e(n))return{color:a||n.color||n.borderColor}},e.prototype._updatePosition=function(t,n,i,a,o,s,l){var u=this._api.getWidth(),c=this._api.getHeight();n=n||t.get("position");var h=o.getSize(),f=t.get("align"),d=t.get("verticalAlign"),p=l&&l.getBoundingRect().clone();if(l&&p.applyTransform(l.transform),qe(n)&&(n=n([i,a],s,o.el,p,{viewSize:[u,c],contentSize:h.slice()})),_e(n))i=Pe(n[0],u),a=Pe(n[1],c);else if(Qe(n)){var g=n;g.width=h[0],g.height=h[1];var v=dr(g,{width:u,height:c});i=v.x,a=v.y,f=null,d=null}else if(ke(n)&&l){var m=kTe(n,p,h,t.get("borderWidth"));i=m[0],a=m[1]}else{var m=ITe(i,a,o,u,c,f?null:20,d?null:20);i=m[0],a=m[1]}if(f&&(i-=GF(f)?h[0]/2:f==="right"?h[0]:0),d&&(a-=GF(d)?h[1]/2:d==="bottom"?h[1]:0),_W(t)){var m=NTe(i,a,o,u,c);i=m[0],a=m[1]}o.moveTo(i,a)},e.prototype._updateContentNotChangedOnAxis=function(t,n){var i=this._lastDataByCoordSys,a=this._cbParamsList,o=!!i&&i.length===t.length;return o&&k(i,function(s,l){var u=s.dataByAxis||[],c=t[l]||{},h=c.dataByAxis||[];o=o&&u.length===h.length,o&&k(u,function(f,d){var p=h[d]||{},g=f.seriesDataIndices||[],v=p.seriesDataIndices||[];o=o&&f.value===p.value&&f.axisType===p.axisType&&f.axisId===p.axisId&&g.length===v.length,o&&k(g,function(m,y){var _=v[y];o=o&&m.seriesIndex===_.seriesIndex&&m.dataIndex===_.dataIndex}),a&&k(f.seriesDataIndices,function(m){var y=m.seriesIndex,_=n[y],x=a[y];_&&x&&x.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){kt.node||!n.getDom()||(Kv(this,"_updatePosition"),this._tooltipContent.dispose(),gM("itemTooltip",n))},e.type="tooltip",e}(kn);function vp(r,e,t){var n=e.ecModel,i;t?(i=new vn(t,n,n),i=new vn(e.option,i,n)):i=e;for(var a=r.length-1;a>=0;a--){var o=r[a];o&&(o instanceof vn&&(o=o.get("tooltip",!0)),ke(o)&&(o={formatter:o}),o&&(i=new vn(o,i,n)))}return i}function VF(r,e){return r.dispatchAction||Fe(e.dispatchAction,e)}function ITe(r,e,t,n,i,a,o){var s=t.getSize(),l=s[0],u=s[1];return a!=null&&(r+l+a+2>n?r-=l+a:r+=a),o!=null&&(e+u+o>i?e-=u+o:e+=o),[r,e]}function NTe(r,e,t,n,i){var a=t.getSize(),o=a[0],s=a[1];return r=Math.min(r+o,n)-o,e=Math.min(e+s,i)-s,r=Math.max(r,0),e=Math.max(e,0),[r,e]}function kTe(r,e,t,n){var i=t[0],a=t[1],o=Math.ceil(Math.SQRT2*n)+8,s=0,l=0,u=e.width,c=e.height;switch(r){case"inside":s=e.x+u/2-i/2,l=e.y+c/2-a/2;break;case"top":s=e.x+u/2-i/2,l=e.y-a-o;break;case"bottom":s=e.x+u/2-i/2,l=e.y+c+o;break;case"left":s=e.x-i-o,l=e.y+c/2-a/2;break;case"right":s=e.x+u+o,l=e.y+c/2-a/2}return[s,l]}function GF(r){return r==="center"||r==="middle"}function OTe(r,e,t){var n=e2(r).queryOptionMap,i=n.keys()[0];if(!(!i||i==="series")){var a=bg(e,i,n.get(i),{useDefault:!1,enableAll:!1,enableNone:!1}),o=a.models[0];if(o){var s=t.getViewOfComponentModel(o),l;if(s.group.traverse(function(u){var c=at(u).tooltipConfig;if(c&&c.name===r.name)return l=u,!0}),l)return{componentMainType:i,componentIndex:o.componentIndex,el:l}}}}const FTe=DTe;function BTe(r){gt(Ug),r.registerComponentModel(mTe),r.registerComponentView(FTe),r.registerAction({type:"showTip",event:"showTip",update:"tooltip:manuallyShowTip"},qn),r.registerAction({type:"hideTip",event:"hideTip",update:"tooltip:manuallyHideTip"},qn)}var zTe=["rect","polygon","keep","clear"];function UTe(r,e){var t=nn(r?r.brush:[]);if(t.length){var n=[];k(t,function(l){var u=l.hasOwnProperty("toolbox")?l.toolbox:[];u instanceof Array&&(n=n.concat(u))});var i=r&&r.toolbox;_e(i)&&(i=i[0]),i||(i={feature:{}},r.toolbox=[i]);var a=i.feature||(i.feature={}),o=a.brush||(a.brush={}),s=o.type||(o.type=[]);s.push.apply(s,n),VTe(s),e&&!s.length&&s.push.apply(s,zTe)}}function VTe(r){var e={};k(r,function(t){e[t]=1}),r.length=0,k(e,function(t,n){r.push(n)})}var HF=k;function WF(r){if(r){for(var e in r)if(r.hasOwnProperty(e))return!0}}function AM(r,e,t){var n={};return HF(e,function(a){var o=n[a]=i();HF(r[a],function(s,l){if(Fr.isValidType(l)){var u={type:l,visual:s};t&&t(u,a),o[l]=new Fr(u),l==="opacity"&&(u=Je(u),u.type="colorAlpha",o.__hidden.__alphaForOpacity=new Fr(u))}})}),n;function i(){var a=function(){};a.prototype.__hidden=a.prototype;var o=new a;return o}}function wW(r,e,t){var n;k(t,function(i){e.hasOwnProperty(i)&&WF(e[i])&&(n=!0)}),n&&k(t,function(i){e.hasOwnProperty(i)&&WF(e[i])?r[i]=Je(e[i]):delete r[i]})}function GTe(r,e,t,n,i,a){var o={};k(r,function(h){var f=Fr.prepareVisualTypes(e[h]);o[h]=f});var s;function l(h){return R2(t,s,h)}function u(h,f){OG(t,s,h,f)}a==null?t.each(c):t.each([a],c);function c(h,f){s=a==null?h:f;var d=t.getRawDataItem(s);if(!(d&&d.visualMap===!1))for(var p=n.call(i,h),g=e[p],v=o[p],m=0,y=v.length;m<y;m++){var _=v[m];g[_]&&g[_].applyVisual(h,l,u)}}}function HTe(r,e,t,n){var i={};return k(r,function(a){var o=Fr.prepareVisualTypes(e[a]);i[a]=o}),{progress:function(o,s){var l;n!=null&&(l=s.getDimensionIndex(n));function u(S){return R2(s,h,S)}function c(S,A){OG(s,h,S,A)}for(var h,f=s.getStore();(h=o.next())!=null;){var d=s.getRawDataItem(h);if(!(d&&d.visualMap===!1))for(var p=n!=null?f.get(l,h):h,g=t(p),v=e[g],m=i[g],y=0,_=m.length;y<_;y++){var x=m[y];v[x]&&v[x].applyVisual(p,u,c)}}}}}function WTe(r){var e=r.brushType,t={point:function(n){return $F[e].point(n,t,r)},rect:function(n){return $F[e].rect(n,t,r)}};return t}var $F={lineX:XF(0),lineY:XF(1),rect:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])},rect:function(r,e,t){return r&&t.boundingRect.intersect(r)}},polygon:{point:function(r,e,t){return r&&t.boundingRect.contain(r[0],r[1])&&Zu(t.range,r[0],r[1])},rect:function(r,e,t){var n=t.range;if(!r||n.length<=1)return!1;var i=r.x,a=r.y,o=r.width,s=r.height,l=n[0];if(Zu(n,i,a)||Zu(n,i+o,a)||Zu(n,i,a+s)||Zu(n,i+o,a+s)||dt.create(r).contain(l[0],l[1])||Ip(i,a,i+o,a,n)||Ip(i,a,i,a+s,n)||Ip(i+o,a,i+o,a+s,n)||Ip(i,a+s,i+o,a+s,n))return!0}}};function XF(r){var e=["x","y"],t=["width","height"];return{point:function(n,i,a){if(n){var o=a.range,s=n[r];return gp(s,o)}},rect:function(n,i,a){if(n){var o=a.range,s=[n[e[r]],n[e[r]]+n[t[r]]];return s[1]<s[0]&&s.reverse(),gp(s[0],o)||gp(s[1],o)||gp(o[0],s)||gp(o[1],s)}}}}function gp(r,e){return e[0]<=r&&r<=e[1]}var YF=["inBrush","outOfBrush"],Dw="__ecBrushSelect",wM="__ecInBrushSelectEvent";function bW(r){r.eachComponent({mainType:"brush"},function(e){var t=e.brushTargetManager=new VE(e.option,r);t.setInputRanges(e.areas,r)})}function $Te(r,e,t){var n=[],i,a;r.eachComponent({mainType:"brush"},function(o){t&&t.type==="takeGlobalCursor"&&o.setBrushOption(t.key==="brush"?t.brushOption:{brushType:!1})}),bW(r),r.eachComponent({mainType:"brush"},function(o,s){var l={brushId:o.id,brushIndex:s,brushName:o.name,areas:Je(o.areas),selected:[]};n.push(l);var u=o.option,c=u.brushLink,h=[],f=[],d=[],p=!1;s||(i=u.throttleType,a=u.throttleDelay);var g=xe(o.areas,function(S){var A=jTe[S.brushType],w=Ke({boundingRect:A?A(S):void 0},S);return w.selectors=WTe(w),w}),v=AM(o.option,YF,function(S){S.mappingMethod="fixed"});_e(c)&&k(c,function(S){h[S]=1});function m(S){return c==="all"||!!h[S]}function y(S){return!!S.length}r.eachSeries(function(S,A){var w=d[A]=[];S.subType==="parallel"?_(S,A):x(S,A,w)});function _(S,A){var w=S.coordinateSystem;p=p||w.hasAxisBrushed(),m(A)&&w.eachActiveState(S.getData(),function(M,C){M==="active"&&(f[C]=1)})}function x(S,A,w){if(!(!S.brushSelector||qTe(o,A))&&(k(g,function(C){o.brushTargetManager.controlSeries(C,S,r)&&w.push(C),p=p||y(w)}),m(A)&&y(w))){var M=S.getData();M.each(function(C){qF(S,w,M,C)&&(f[C]=1)})}}r.eachSeries(function(S,A){var w={seriesId:S.id,seriesIndex:A,seriesName:S.name,dataIndex:[]};l.selected.push(w);var M=d[A],C=S.getData(),b=m(A)?function(T){return f[T]?(w.dataIndex.push(C.getRawIndex(T)),"inBrush"):"outOfBrush"}:function(T){return qF(S,M,C,T)?(w.dataIndex.push(C.getRawIndex(T)),"inBrush"):"outOfBrush"};(m(A)?p:y(M))&>e(YF,v,C,b)})}),XTe(e,i,a,n,t)}function XTe(r,e,t,n,i){if(i){var a=r.getZr();if(!a[wM]){a[Dw]||(a[Dw]=YTe);var o=Md(a,Dw,t,e);o(r,n)}}}function YTe(r,e){if(!r.isDisposed()){var t=r.getZr();t[wM]=!0,r.dispatchAction({type:"brushSelect",batch:e}),t[wM]=!1}}function qF(r,e,t,n){for(var i=0,a=e.length;i<a;i++){var o=e[i];if(r.brushSelector(n,t,o.selectors,o))return!0}}function qTe(r,e){var t=r.option.seriesIndex;return t!=null&&t!=="all"&&(_e(t)?pt(t,e)<0:e!==t)}var jTe={rect:function(r){return jF(r.range)},polygon:function(r){for(var e,t=r.range,n=0,i=t.length;n<i;n++){e=e||[[1/0,-1/0],[1/0,-1/0]];var a=t[n];a[0]<e[0][0]&&(e[0][0]=a[0]),a[0]>e[0][1]&&(e[0][1]=a[0]),a[1]<e[1][0]&&(e[1][0]=a[1]),a[1]>e[1][1]&&(e[1][1]=a[1])}return e&&jF(e)}};function jF(r){return new dt(r[0][0],r[1][0],r[0][1]-r[0][0],r[1][1]-r[1][0])}var KTe=function(r){ae(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 _E(n.getZr())).on("brush",Fe(this._onBrush,this)).mount()},e.prototype.render=function(t,n,i,a){this.model=t,this._updateController(t,n,i,a)},e.prototype.updateTransform=function(t,n,i,a){bW(n),this._updateController(t,n,i,a)},e.prototype.updateVisual=function(t,n,i,a){this.updateTransform(t,n,i,a)},e.prototype.updateView=function(t,n,i,a){this._updateController(t,n,i,a)},e.prototype._updateController=function(t,n,i,a){(!a||a.$from!==t.id)&&this._brushController.setPanels(t.brushTargetManager.makePanelOpts(i)).enableBrush(t.brushOption).updateCovers(t.areas.slice())},e.prototype.dispose=function(){this._brushController.dispose()},e.prototype._onBrush=function(t){var n=this.model.id,i=this.model.brushTargetManager.setOutputRanges(t.areas,this.ecModel);(!t.isEnd||t.removeOnClick)&&this.api.dispatchAction({type:"brush",brushId:n,areas:Je(i),$from:n}),t.isEnd&&this.api.dispatchAction({type:"brushEnd",brushId:n,areas:Je(i),$from:n})},e.type="brush",e}(kn);const ZTe=KTe;var QTe="#ddd",JTe=function(r){ae(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 i=this.option;!n&&wW(i,t,["inBrush","outOfBrush"]);var a=i.inBrush=i.inBrush||{};i.outOfBrush=i.outOfBrush||{color:QTe},a.hasOwnProperty("liftZ")||(a.liftZ=5)},e.prototype.setAreas=function(t){t&&(this.areas=xe(t,function(n){return KF(this.option,n)},this))},e.prototype.setBrushOption=function(t){this.brushOption=KF(this.option,t),this.brushType=this.brushOption.brushType},e.type="brush",e.dependencies=["geo","grid","xAxis","yAxis","parallel","series"],e.defaultOption={seriesIndex:"all",brushType:"rect",brushMode:"single",transformable:!0,brushStyle:{borderWidth:1,color:"rgba(210,219,238,0.3)",borderColor:"#D2DBEE"},throttleType:"fixRate",throttleDelay:0,removeOnClick:!0,z:1e4},e}(Nt);function KF(r,e){return ht({brushType:r.brushType,brushMode:r.brushMode,transformable:r.transformable,brushStyle:new vn(r.brushStyle).getItemStyle(),removeOnClick:r.removeOnClick,z:r.z},e,!0)}const eMe=JTe;var tMe=["rect","polygon","lineX","lineY","keep","clear"],nMe=function(r){ae(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.render=function(t,n,i){var a,o,s;n.eachComponent({mainType:"brush"},function(l){a=l.brushType,o=l.brushOption.brushMode||"single",s=s||!!l.areas.length}),this._brushType=a,this._brushMode=o,k(t.get("type",!0),function(l){t.setIconStatus(l,(l==="keep"?o==="multiple":l==="clear"?s:l===a)?"emphasis":"normal")})},e.prototype.updateView=function(t,n,i){this.render(t,n,i)},e.prototype.getIcons=function(){var t=this.model,n=t.get("icon",!0),i={};return k(t.get("type",!0),function(a){n[a]&&(i[a]=n[a])}),i},e.prototype.onclick=function(t,n,i){var a=this._brushType,o=this._brushMode;i==="clear"?(n.dispatchAction({type:"axisAreaSelect",intervals:[]}),n.dispatchAction({type:"brush",command:"clear",areas:[]})):n.dispatchAction({type:"takeGlobalCursor",key:"brush",brushOption:{brushType:i==="keep"?a:a===i?!1:i,brushMode:i==="keep"?o==="multiple"?"single":"multiple":o}})},e.getDefaultOption=function(t){var n={show:!0,type:tMe.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}(wa);const rMe=nMe;function iMe(r){r.registerComponentView(ZTe),r.registerComponentModel(eMe),r.registerPreprocessor(UTe),r.registerVisual(r.PRIORITY.VISUAL.BRUSH,$Te),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"},qn),r.registerAction({type:"brushEnd",event:"brushEnd",update:"none"},qn),of("brush",rMe)}var aMe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.layoutMode={type:"box",ignoreSize:!0},t}return e.type="title",e.defaultOption={z:6,show:!0,text:"",target:"blank",subtext:"",subtarget:"blank",left:0,top:0,backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,padding:5,itemGap:10,textStyle:{fontSize:18,fontWeight:"bold",color:"#464646"},subtextStyle:{fontSize:12,color:"#6E7079"}},e}(Nt),oMe=function(r){ae(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,i){if(this.group.removeAll(),!!t.get("show")){var a=this.group,o=t.getModel("textStyle"),s=t.getModel("subtextStyle"),l=t.get("textAlign"),u=ot(t.get("textBaseline"),t.get("textVerticalAlign")),c=new Ot({style:pn(o,{text:t.get("text"),fill:o.getTextColor()},{disableBox:!0}),z2:10}),h=c.getBoundingRect(),f=t.get("subtext"),d=new Ot({style:pn(s,{text:f,fill:s.getTextColor(),y:h.height+t.get("itemGap"),verticalAlign:"top"},{disableBox:!0}),z2:10}),p=t.get("link"),g=t.get("sublink"),v=t.get("triggerEvent",!0);c.silent=!p&&!v,d.silent=!g&&!v,p&&c.on("click",function(){c_(p,"_"+t.get("target"))}),g&&d.on("click",function(){c_(g,"_"+t.get("subtarget"))}),at(c).eventData=at(d).eventData=v?{componentType:"title",componentIndex:t.componentIndex}:null,a.add(c),f&&a.add(d);var m=a.getBoundingRect(),y=t.getBoxLayoutParams();y.width=m.width,y.height=m.height;var _=dr(y,{width:i.getWidth(),height:i.getHeight()},t.get("padding"));l||(l=t.get("left")||t.get("right"),l==="middle"&&(l="center"),l==="right"?_.x+=_.width:l==="center"&&(_.x+=_.width/2)),u||(u=t.get("top")||t.get("bottom"),u==="center"&&(u="middle"),u==="bottom"?_.y+=_.height:u==="middle"&&(_.y+=_.height/2),u=u||"top"),a.x=_.x,a.y=_.y,a.markRedraw();var x={align:l,verticalAlign:u};c.setStyle(x),d.setStyle(x),m=a.getBoundingRect();var S=_.margin,A=t.getItemStyle(["color","opacity"]);A.fill=t.get("backgroundColor");var w=new Dt({shape:{x:m.x-S[3],y:m.y-S[0],width:m.width+S[1]+S[3],height:m.height+S[0]+S[2],r:t.get("borderRadius")},style:A,subPixelOptimize:!0,silent:!0});a.add(w)}},e.type="title",e}(kn);function sMe(r){r.registerComponentModel(aMe),r.registerComponentView(oMe)}var lMe=function(r){ae(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,i){this.mergeDefaultAndTheme(t,i),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||[],i=t.axisType,a=this._names=[],o;i==="category"?(o=[],k(n,function(u,c){var h=fr(gd(u),""),f;Qe(u)?(f=Je(u),f.value=c):f=c,o.push(f),a.push(h)})):o=n;var s={category:"ordinal",time:"time",value:"number"}[i]||"number",l=this._data=new vi([{name:"value",type:s}],this);l.initData(o,a)},e.prototype.getData=function(){return this._data},e.prototype.getCategories=function(){if(this.get("axisType")==="category")return this._names.slice()},e.type="timeline",e.defaultOption={z:4,show:!0,axisType:"time",realtime:!0,left:"20%",top:null,right:"20%",bottom:0,width:null,height:40,padding:5,controlPosition:"left",autoPlay:!1,rewind:!1,loop:!0,playInterval:2e3,currentIndex:0,itemStyle:{},label:{color:"#000"},data:[]},e}(Nt);const ZF=lMe;var TW=function(r){ae(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=su(ZF.defaultOption,{backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderWidth:0,orient:"horizontal",inverse:!1,tooltip:{trigger:"item"},symbol:"circle",symbolSize:12,lineStyle:{show:!0,width:2,color:"#DAE1F5"},label:{position:"auto",show:!0,interval:"auto",rotate:0,color:"#A4B1D7"},itemStyle:{color:"#A4B1D7",borderWidth:1},checkpointStyle:{symbol:"circle",symbolSize:15,color:"#316bf3",borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0, 0, 0, 0.3)",animation:!0,animationDuration:300,animationEasing:"quinticInOut"},controlStyle:{show:!0,showPlayBtn:!0,showPrevBtn:!0,showNextBtn:!0,itemSize:24,itemGap:12,position:"left",playIcon:"path://M31.6,53C17.5,53,6,41.5,6,27.4S17.5,1.8,31.6,1.8C45.7,1.8,57.2,13.3,57.2,27.4S45.7,53,31.6,53z M31.6,3.3 C18.4,3.3,7.5,14.1,7.5,27.4c0,13.3,10.8,24.1,24.1,24.1C44.9,51.5,55.7,40.7,55.7,27.4C55.7,14.1,44.9,3.3,31.6,3.3z M24.9,21.3 c0-2.2,1.6-3.1,3.5-2l10.5,6.1c1.899,1.1,1.899,2.9,0,4l-10.5,6.1c-1.9,1.1-3.5,0.2-3.5-2V21.3z",stopIcon:"path://M30.9,53.2C16.8,53.2,5.3,41.7,5.3,27.6S16.8,2,30.9,2C45,2,56.4,13.5,56.4,27.6S45,53.2,30.9,53.2z M30.9,3.5C17.6,3.5,6.8,14.4,6.8,27.6c0,13.3,10.8,24.1,24.101,24.1C44.2,51.7,55,40.9,55,27.6C54.9,14.4,44.1,3.5,30.9,3.5z M36.9,35.8c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H36c0.5,0,0.9,0.4,0.9,1V35.8z M27.8,35.8 c0,0.601-0.4,1-0.9,1h-1.3c-0.5,0-0.9-0.399-0.9-1V19.5c0-0.6,0.4-1,0.9-1H27c0.5,0,0.9,0.4,0.9,1L27.8,35.8L27.8,35.8z",nextIcon:"M2,18.5A1.52,1.52,0,0,1,.92,18a1.49,1.49,0,0,1,0-2.12L7.81,9.36,1,3.11A1.5,1.5,0,1,1,3,.89l8,7.34a1.48,1.48,0,0,1,.49,1.09,1.51,1.51,0,0,1-.46,1.1L3,18.08A1.5,1.5,0,0,1,2,18.5Z",prevIcon:"M10,.5A1.52,1.52,0,0,1,11.08,1a1.49,1.49,0,0,1,0,2.12L4.19,9.64,11,15.89a1.5,1.5,0,1,1-2,2.22L1,10.77A1.48,1.48,0,0,1,.5,9.68,1.51,1.51,0,0,1,1,8.58L9,.92A1.5,1.5,0,0,1,10,.5Z",prevBtnSize:18,nextBtnSize:18,color:"#A4B1D7",borderColor:"#A4B1D7",borderWidth:1},emphasis:{label:{show:!0,color:"#6f778d"},itemStyle:{color:"#316BF3"},controlStyle:{color:"#316BF3",borderColor:"#316BF3",borderWidth:2}},progress:{lineStyle:{color:"#316BF3"},itemStyle:{color:"#316BF3"},label:{color:"#6f778d"}},data:[]}),e}(ZF);ir(TW,F1.prototype);const uMe=TW;var cMe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.type="timeline",e}(kn);const hMe=cMe;var fMe=function(r){ae(e,r);function e(t,n,i,a){var o=r.call(this,t,n,i)||this;return o.type=a||"value",o}return e.prototype.getLabelModel=function(){return this.model.getModel("label")},e.prototype.isHorizontal=function(){return this.model.get("orient")==="horizontal"},e}(ho);const dMe=fMe;var Iw=Math.PI,QF=Pt(),pMe=function(r){ae(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,i){if(this.model=t,this.api=i,this.ecModel=n,this.group.removeAll(),t.get("show",!0)){var a=this._layout(t,i),o=this._createGroup("_mainGroup"),s=this._createGroup("_labelGroup"),l=this._axis=this._createAxis(a,t);t.formatTooltip=function(u){var c=l.scale.getLabel({value:u});return Ar("nameValue",{noName:!0,value:c})},k(["AxisLine","AxisTick","Control","CurrentPointer"],function(u){this["_render"+u](a,o,l,t)},this),this._renderAxisLabel(a,s,l,t),this._position(a,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 i=t.get(["label","position"]),a=t.get("orient"),o=gMe(t,n),s;i==null||i==="auto"?s=a==="horizontal"?o.y+o.height/2<n.getHeight()/2?"-":"+":o.x+o.width/2<n.getWidth()/2?"+":"-":ke(i)?s={horizontal:{top:"-",bottom:"+"},vertical:{left:"-",right:"+"}}[a][i]:s=i;var l={horizontal:"center",vertical:s>=0||s==="+"?"left":"right"},u={horizontal:s>=0||s==="+"?"top":"bottom",vertical:"middle"},c={horizontal:0,vertical:Iw/2},h=a==="vertical"?o.height:o.width,f=t.getModel("controlStyle"),d=f.get("show",!0),p=d?f.get("itemSize"):0,g=d?f.get("itemGap"):0,v=p+g,m=t.get(["label","rotate"])||0;m=m*Iw/180;var y,_,x,S=f.get("position",!0),A=d&&f.get("showPlayBtn",!0),w=d&&f.get("showPrevBtn",!0),M=d&&f.get("showNextBtn",!0),C=0,b=h;S==="left"||S==="bottom"?(A&&(y=[0,0],C+=v),w&&(_=[C,0],C+=v),M&&(x=[b-p,0],b-=v)):(A&&(y=[b-p,0],b-=v),w&&(_=[0,0],C+=v),M&&(x=[b-p,0],b-=v));var T=[C,b];return t.get("inverse")&&T.reverse(),{viewRect:o,mainLength:h,orient:a,rotation:c[a],labelRotation:m,labelPosOpt:s,labelAlign:t.get(["label","align"])||l[a],labelBaseline:t.get(["label","verticalAlign"])||t.get(["label","baseline"])||u[a],playPosition:y,prevBtnPosition:_,nextBtnPosition:x,axisExtent:T,controlSize:p,controlGap:g}},e.prototype._position=function(t,n){var i=this._mainGroup,a=this._labelGroup,o=t.viewRect;if(t.orient==="vertical"){var s=ta(),l=o.x,u=o.y+o.height;Xo(s,s,[-l,-u]),jc(s,s,-Iw/2),Xo(s,s,[l,u]),o=o.clone(),o.applyTransform(s)}var c=y(o),h=y(i.getBoundingRect()),f=y(a.getBoundingRect()),d=[i.x,i.y],p=[a.x,a.y];p[0]=d[0]=c[0][0];var g=t.labelPosOpt;if(g==null||ke(g)){var v=g==="+"?0:1;_(d,h,c,1,v),_(p,f,c,1,1-v)}else{var v=g>=0?0:1;_(d,h,c,1,v),p[1]=d[1]+g}i.setPosition(d),a.setPosition(p),i.rotation=a.rotation=t.rotation,m(i),m(a);function m(x){x.originX=c[0][0]-x.x,x.originY=c[1][0]-x.y}function y(x){return[[x.x,x.x+x.width],[x.y,x.y+x.height]]}function _(x,S,A,w,M){x[w]+=A[w][M]-S[w][M]}},e.prototype._createAxis=function(t,n){var i=n.getData(),a=n.get("axisType"),o=vMe(n,a);o.getTicks=function(){return i.mapArray(["value"],function(u){return{value:u}})};var s=i.getDataExtent("value");o.setExtent(s[0],s[1]),o.calcNiceTicks();var l=new dMe("value",o,t.axisExtent,a);return l.model=n,l},e.prototype._createGroup=function(t){var n=this[t]=new rt;return this.group.add(n),n},e.prototype._renderAxisLine=function(t,n,i,a){var o=i.getExtent();if(a.get(["lineStyle","show"])){var s=new Cr({shape:{x1:o[0],y1:0,x2:o[1],y2:0},style:pe({lineCap:"round"},a.getModel("lineStyle").getLineStyle()),silent:!0,z2:1});n.add(s);var l=this._progressLine=new Cr({shape:{x1:o[0],x2:this._currentPointer?this._currentPointer.x:o[0],y1:0,y2:0},style:Ke({lineCap:"round",lineWidth:s.style.lineWidth},a.getModel(["progress","lineStyle"]).getLineStyle()),silent:!0,z2:1});n.add(l)}},e.prototype._renderAxisTick=function(t,n,i,a){var o=this,s=a.getData(),l=i.scale.getTicks();this._tickSymbols=[],k(l,function(u){var c=i.dataToCoord(u.value),h=s.getItemModel(u.value),f=h.getModel("itemStyle"),d=h.getModel(["emphasis","itemStyle"]),p=h.getModel(["progress","itemStyle"]),g={x:c,y:0,onclick:Fe(o._changeTimeline,o,u.value)},v=JF(h,f,n,g);v.ensureState("emphasis").style=d.getItemStyle(),v.ensureState("progress").style=p.getItemStyle(),Ec(v);var m=at(v);h.get("tooltip")?(m.dataIndex=u.value,m.dataModel=a):m.dataIndex=m.dataModel=null,o._tickSymbols.push(v)})},e.prototype._renderAxisLabel=function(t,n,i,a){var o=this,s=i.getLabelModel();if(s.get("show")){var l=a.getData(),u=i.getViewLabels();this._tickLabels=[],k(u,function(c){var h=c.tickValue,f=l.getItemModel(h),d=f.getModel("label"),p=f.getModel(["emphasis","label"]),g=f.getModel(["progress","label"]),v=i.dataToCoord(c.tickValue),m=new Ot({x:v,y:0,rotation:t.labelRotation-t.rotation,onclick:Fe(o._changeTimeline,o,h),silent:!1,style:pn(d,{text:c.formattedLabel,align:t.labelAlign,verticalAlign:t.labelBaseline})});m.ensureState("emphasis").style=pn(p),m.ensureState("progress").style=pn(g),n.add(m),Ec(m),QF(m).dataIndex=h,o._tickLabels.push(m)})}},e.prototype._renderControl=function(t,n,i,a){var o=t.controlSize,s=t.rotation,l=a.getModel("controlStyle").getItemStyle(),u=a.getModel(["emphasis","controlStyle"]).getItemStyle(),c=a.getPlayState(),h=a.get("inverse",!0);f(t.nextBtnPosition,"next",Fe(this._changeTimeline,this,h?"-":"+")),f(t.prevBtnPosition,"prev",Fe(this._changeTimeline,this,h?"+":"-")),f(t.playPosition,c?"stop":"play",Fe(this._handlePlayClick,this,!c),!0);function f(d,p,g,v){if(d){var m=so(ot(a.get(["controlStyle",p+"BtnSize"]),o),o),y=[0,-m/2,m,m],_=mMe(a,p+"Icon",y,{x:d[0],y:d[1],originX:o/2,originY:0,rotation:v?-s:0,rectHover:!0,style:l,onclick:g});_.ensureState("emphasis").style=u,n.add(_),Ec(_)}}},e.prototype._renderCurrentPointer=function(t,n,i,a){var o=a.getData(),s=a.getCurrentIndex(),l=o.getItemModel(s).getModel("checkpointStyle"),u=this,c={onCreate:function(h){h.draggable=!0,h.drift=Fe(u._handlePointerDrag,u),h.ondragend=Fe(u._handlePointerDragend,u),eB(h,u._progressLine,s,i,a,!0)},onUpdate:function(h){eB(h,u._progressLine,s,i,a)}};this._currentPointer=JF(l,l,this._mainGroup,{},this._currentPointer,c)},e.prototype._handlePlayClick=function(t){this._clearTimer(),this.api.dispatchAction({type:"timelinePlayChange",playState:t,from:this.uid})},e.prototype._handlePointerDrag=function(t,n,i){this._clearTimer(),this._pointerChangeTimeline([i.offsetX,i.offsetY])},e.prototype._handlePointerDragend=function(t){this._pointerChangeTimeline([t.offsetX,t.offsetY],!0)},e.prototype._pointerChangeTimeline=function(t,n){var i=this._toAxisCoord(t)[0],a=this._axis,o=Pa(a.getExtent().slice());i>o[1]&&(i=o[1]),i<o[0]&&(i=o[0]),this._currentPointer.x=i,this._currentPointer.markRedraw();var s=this._progressLine;s&&(s.shape.x2=i,s.dirty());var l=this._findNearestTick(i),u=this.model;(n||l!==u.getCurrentIndex()&&u.get("realtime"))&&this._changeTimeline(l)},e.prototype._doPlayStop=function(){var t=this;this._clearTimer(),this.model.getPlayState()&&(this._timer=setTimeout(function(){var n=t.model;t._changeTimeline(n.getCurrentIndex()+(n.get("rewind",!0)?-1:1))},this.model.get("playInterval")))},e.prototype._toAxisCoord=function(t){var n=this._mainGroup.getLocalTransform();return io(t,n,!0)},e.prototype._findNearestTick=function(t){var n=this.model.getData(),i=1/0,a,o=this._axis;return n.each(["value"],function(s,l){var u=o.dataToCoord(s),c=Math.abs(u-t);c<i&&(i=c,a=l)}),a},e.prototype._clearTimer=function(){this._timer&&(clearTimeout(this._timer),this._timer=null)},e.prototype._changeTimeline=function(t){var n=this.model.getCurrentIndex();t==="+"?t=n+1:t==="-"&&(t=n-1),this.api.dispatchAction({type:"timelineChange",currentIndex:t,from:this.uid})},e.prototype._updateTicksStatus=function(){var t=this.model.getCurrentIndex(),n=this._tickSymbols,i=this._tickLabels;if(n)for(var a=0;a<n.length;a++)n&&n[a]&&n[a].toggleState("progress",a<t);if(i)for(var a=0;a<i.length;a++)i&&i[a]&&i[a].toggleState("progress",QF(i[a]).dataIndex<=t)},e.type="timeline.slider",e}(hMe);function vMe(r,e){if(e=e||r.get("type"),e)switch(e){case"category":return new B2({ordinalMeta:r.getCategories(),extent:[1/0,-1/0]});case"time":return new TH({locale:r.ecModel.getLocaleModel(),useUTC:r.ecModel.get("useUTC")});default:return new Jl}}function gMe(r,e){return dr(r.getBoxLayoutParams(),{width:e.getWidth(),height:e.getHeight()},r.get("padding"))}function mMe(r,e,t,n){var i=n.style,a=Cg(r.get(["controlStyle",e]),n||{},new dt(t[0],t[1],t[2],t[3]));return i&&a.setStyle(i),a}function JF(r,e,t,n,i,a){var o=e.get("color");if(i)i.setColor(o),t.add(i),a&&a.onUpdate(i);else{var s=r.get("symbol");i=rr(s,-1,-1,2,2,o),i.setStyle("strokeNoScale",!0),t.add(i),a&&a.onCreate(i)}var l=e.getItemStyle(["color"]);i.setStyle(l),n=ht({rectHover:!0,z2:100},n,!0);var u=Cd(r.get("symbolSize"));n.scaleX=u[0]/2,n.scaleY=u[1]/2;var c=Jc(r.get("symbolOffset"),u);c&&(n.x=(n.x||0)+c[0],n.y=(n.y||0)+c[1]);var h=r.get("symbolRotate");return n.rotation=(h||0)*Math.PI/180||0,i.attr(n),i.updateTransform(),i}function eB(r,e,t,n,i,a){if(!r.dragging){var o=i.getModel("checkpointStyle"),s=n.dataToCoord(i.getData().get("value",t));if(a||!o.get("animation",!0))r.attr({x:s,y:0}),e&&e.attr({shape:{x2:s}});else{var l={duration:o.get("animationDuration",!0),easing:o.get("animationEasing",!0)};r.stopAnimation(null,!0),r.animateTo({x:s,y:0},l),e&&e.animateTo({shape:{x2:s}},l)}}}const yMe=pMe;function _Me(r){r.registerAction({type:"timelineChange",event:"timelineChanged",update:"prepareAndUpdate"},function(e,t,n){var i=t.getComponent("timeline");return i&&e.currentIndex!=null&&(i.setCurrentIndex(e.currentIndex),!i.get("loop",!0)&&i.isIndexMax()&&i.getPlayState()&&(i.setPlayState(!1),n.dispatchAction({type:"timelinePlayChange",playState:!1,from:e.from}))),t.resetOption("timeline",{replaceMerge:i.get("replaceMerge",!0)}),Ke({currentIndex:i.option.currentIndex},e)}),r.registerAction({type:"timelinePlayChange",event:"timelinePlayChanged",update:"update"},function(e,t){var n=t.getComponent("timeline");n&&e.playState!=null&&n.setPlayState(e.playState)})}function xMe(r){var e=r&&r.timeline;_e(e)||(e=e?[e]:[]),k(e,function(t){t&&SMe(t)})}function SMe(r){var e=r.type,t={number:"value",time:"time"};if(t[e]&&(r.axisType=t[e],delete r.type),tB(r),ec(r,"controlPosition")){var n=r.controlStyle||(r.controlStyle={});ec(n,"position")||(n.position=r.controlPosition),n.position==="none"&&!ec(n,"show")&&(n.show=!1,delete n.position),delete r.controlPosition}k(r.data||[],function(i){Qe(i)&&!_e(i)&&(!ec(i,"value")&&ec(i,"name")&&(i.value=i.name),tB(i))})}function tB(r){var e=r.itemStyle||(r.itemStyle={}),t=e.emphasis||(e.emphasis={}),n=r.label||r.label||{},i=n.normal||(n.normal={}),a={normal:1,emphasis:1};k(n,function(o,s){!a[s]&&!ec(i,s)&&(i[s]=o)}),t.label&&!ec(n,"emphasis")&&(n.emphasis=t.label,delete t.label)}function ec(r,e){return r.hasOwnProperty(e)}function AMe(r){r.registerComponentModel(uMe),r.registerComponentView(yMe),r.registerSubTypeDefaulter("timeline",function(){return"slider"}),_Me(r),r.registerPreprocessor(xMe)}function WE(r,e){if(!r)return!1;for(var t=_e(r)?r:[r],n=0;n<t.length;n++)if(t[n]&&t[n][e])return!0;return!1}function Iy(r){zc(r,"label",["show"])}var Ny=Pt(),MW=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.createdBySelf=!1,t}return e.prototype.init=function(t,n,i){this.mergeDefaultAndTheme(t,i),this._mergeOption(t,i,!1,!0)},e.prototype.isAnimationEnabled=function(){if(kt.node)return!1;var t=this.__hostSeries;return this.getShallow("animation")&&t&&t.isAnimationEnabled()},e.prototype.mergeOption=function(t,n){this._mergeOption(t,n,!1,!1)},e.prototype._mergeOption=function(t,n,i,a){var o=this.mainType;i||n.eachSeries(function(s){var l=s.get(this.mainType,!0),u=Ny(s)[o];if(!l||!l.data){Ny(s)[o]=null;return}u?u._mergeOption(l,n,!0):(a&&Iy(l),k(l.data,function(c){c instanceof Array?(Iy(c[0]),Iy(c[1])):Iy(c)}),u=this.createMarkerModelFromSeries(l,this,n),pe(u,{mainType:this.mainType,seriesIndex:s.seriesIndex,name:s.name,createdBySelf:!0}),u.__hostSeries=s),Ny(s)[o]=u},this)},e.prototype.formatTooltip=function(t,n,i){var a=this.getData(),o=this.getRawValue(t),s=a.getName(t);return Ar("section",{header:this.name,blocks:[Ar("nameValue",{name:s,value:o,noName:!s,noValue:o==null})]})},e.prototype.getData=function(){return this._data},e.prototype.setData=function(t){this._data=t},e.prototype.getDataParams=function(t,n){var i=F1.prototype.getDataParams.call(this,t,n),a=this.__hostSeries;return a&&(i.seriesId=a.id,i.seriesName=a.name,i.seriesType=a.subType),i},e.getMarkerModelFromSeries=function(t,n){return Ny(t)[n]},e.type="marker",e.dependencies=["series","grid","polar","geo"],e}(Nt);ir(MW,F1.prototype);const nu=MW;var wMe=function(r){ae(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,i){return new e(t,n,i)},e.type="markPoint",e.defaultOption={z:5,symbol:"pin",symbolSize:50,tooltip:{trigger:"item"},label:{show:!0,position:"inside"},itemStyle:{borderWidth:2},emphasis:{label:{show:!0}}},e}(nu);const bMe=wMe;function bM(r){return!(isNaN(parseFloat(r.x))&&isNaN(parseFloat(r.y)))}function TMe(r){return!isNaN(parseFloat(r.x))&&!isNaN(parseFloat(r.y))}function ky(r,e,t,n,i,a){var o=[],s=Ql(e,n),l=s?e.getCalculationInfo("stackResultDimension"):n,u=$E(e,l,r),c=e.indicesOfNearest(l,u)[0];o[i]=e.get(t,c),o[a]=e.get(l,c);var h=e.get(n,c),f=Oo(e.get(n,c));return f=Math.min(f,20),f>=0&&(o[a]=+o[a].toFixed(f)),[o,h]}var Nw={min:ut(ky,"min"),max:ut(ky,"max"),average:ut(ky,"average"),median:ut(ky,"median")};function ug(r,e){if(e){var t=r.getData(),n=r.coordinateSystem,i=n&&n.dimensions;if(!TMe(e)&&!_e(e.coord)&&_e(i)){var a=CW(e,t,n,r);if(e=Je(e),e.type&&Nw[e.type]&&a.baseAxis&&a.valueAxis){var o=pt(i,a.baseAxis.dim),s=pt(i,a.valueAxis.dim),l=Nw[e.type](t,a.baseDataDim,a.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||!_e(i))e.coord=[];else for(var u=e.coord,c=0;c<2;c++)Nw[u[c]]&&(u[c]=$E(t,t.mapDimension(i[c]),u[c]));return e}}function CW(r,e,t,n){var i={};return r.valueIndex!=null||r.valueDim!=null?(i.valueDataDim=r.valueIndex!=null?e.getDimension(r.valueIndex):r.valueDim,i.valueAxis=t.getAxis(MMe(n,i.valueDataDim)),i.baseAxis=t.getOtherAxis(i.valueAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim)):(i.baseAxis=n.getBaseAxis(),i.valueAxis=t.getOtherAxis(i.baseAxis),i.baseDataDim=e.mapDimension(i.baseAxis.dim),i.valueDataDim=e.mapDimension(i.valueAxis.dim)),i}function MMe(r,e){var t=r.getData().getDimensionInfo(e);return t&&t.coordDim}function cg(r,e){return r&&r.containData&&e.coord&&!bM(e)?r.containData(e.coord):!0}function CMe(r,e,t){return r&&r.containZone&&e.coord&&t.coord&&!bM(e)&&!bM(t)?r.containZone(e.coord,t.coord):!0}function EW(r,e){return r?function(t,n,i,a){var o=a<2?t.coord&&t.coord[a]:t.value;return Gl(o,e[a])}:function(t,n,i,a){return Gl(t.value,e[a])}}function $E(r,e,t){if(t==="average"){var n=0,i=0;return r.each(e,function(a,o){isNaN(a)||(n+=a,i++)}),n/i}else return t==="median"?r.getMedian(e):r.getDataExtent(e)[t==="max"?1:0]}var kw=Pt(),EMe=function(r){ae(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=He()},e.prototype.render=function(t,n,i){var a=this,o=this.markerGroupMap;o.each(function(s){kw(s).keep=!1}),n.eachSeries(function(s){var l=nu.getMarkerModelFromSeries(s,a.type);l&&a.renderSeries(s,l,n,i)}),o.each(function(s){!kw(s).keep&&a.group.remove(s.group)})},e.prototype.markKeep=function(t){kw(t).keep=!0},e.prototype.toggleBlurSeries=function(t,n){var i=this;k(t,function(a){var o=nu.getMarkerModelFromSeries(a,i.type);if(o){var s=o.getData();s.eachItemGraphicEl(function(l){l&&(n?J4(l):s2(l))})}})},e.type="marker",e}(kn);const XE=EMe;function nB(r,e,t){var n=e.coordinateSystem;r.each(function(i){var a=r.getItemModel(i),o,s=Pe(a.get("x"),t.getWidth()),l=Pe(a.get("y"),t.getHeight());if(!isNaN(s)&&!isNaN(l))o=[s,l];else if(e.getMarkerPosition)o=e.getMarkerPosition(r.getValues(r.dimensions,i));else if(n){var u=r.get(n.dimensions[0],i),c=r.get(n.dimensions[1],i);o=n.dataToPoint([u,c])}isNaN(s)||(o[0]=s),isNaN(l)||(o[1]=l),r.setItemLayout(i,o)})}var LMe=function(r){ae(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,i){n.eachSeries(function(a){var o=nu.getMarkerModelFromSeries(a,"markPoint");o&&(nB(o.getData(),a,i),this.markerGroupMap.get(a.id).updateLayout())},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new Ig),h=PMe(o,t,n);n.setData(h),nB(n.getData(),t,a),h.each(function(f){var d=h.getItemModel(f),p=d.getShallow("symbol"),g=d.getShallow("symbolSize"),v=d.getShallow("symbolRotate"),m=d.getShallow("symbolOffset"),y=d.getShallow("symbolKeepAspect");if(qe(p)||qe(g)||qe(v)||qe(m)){var _=n.getRawValue(f),x=n.getDataParams(f);qe(p)&&(p=p(_,x)),qe(g)&&(g=g(_,x)),qe(v)&&(v=v(_,x)),qe(m)&&(m=m(_,x))}var S=d.getModel("itemStyle").getItemStyle(),A=Lg(l,"color");S.fill||(S.fill=A),h.setItemVisual(f,{symbol:p,symbolSize:g,symbolRotate:v,symbolOffset:m,symbolKeepAspect:y,style:S})}),c.updateData(h),this.group.add(c.group),h.eachItemGraphicEl(function(f){f.traverse(function(d){at(d).dataModel=n})}),this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markPoint",e}(XE);function PMe(r,e,t){var n;r?n=xe(r&&r.dimensions,function(s){var l=e.getData().getDimensionInfo(e.getData().mapDimension(s))||{};return pe(pe({},l),{name:s,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new vi(n,t),a=xe(t.get("data"),ut(ug,e));r&&(a=jt(a,ut(cg,r)));var o=EW(!!r,n);return i.initData(a,null,o),i}const RMe=LMe;function DMe(r){r.registerComponentModel(bMe),r.registerComponentView(RMe),r.registerPreprocessor(function(e){WE(e.series,"markPoint")&&(e.markPoint=e.markPoint||{})})}var IMe=function(r){ae(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,i){return new e(t,n,i)},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}(nu);const NMe=IMe;var Oy=Pt(),kMe=function(r,e,t,n){var i=r.getData(),a;if(_e(n))a=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=Mr(n.yAxis,n.xAxis);else{var u=CW(n,i,e,r);s=u.valueAxis;var c=hH(i,u.valueDataDim);l=$E(i,c,o)}var h=s.dim==="x"?0:1,f=1-h,d=Je(n),p={coord:[]};d.type=null,d.coord=[],d.coord[f]=-1/0,p.coord[f]=1/0;var g=t.get("precision");g>=0&&Ft(l)&&(l=+l.toFixed(Math.min(g,20))),d.coord[h]=p.coord[h]=l,a=[d,p,{type:o,valueIndex:n.valueIndex,value:l}]}else a=[]}var v=[ug(r,a[0]),ug(r,a[1]),pe({},a[2])];return v[2].type=v[2].type||null,ht(v[2],v[0]),ht(v[2],v[1]),v};function O_(r){return!isNaN(r)&&!isFinite(r)}function rB(r,e,t,n){var i=1-r,a=n.dimensions[r];return O_(e[i])&&O_(t[i])&&e[r]===t[r]&&n.getAxis(a).containData(e[r])}function OMe(r,e){if(r.type==="cartesian2d"){var t=e[0].coord,n=e[1].coord;if(t&&n&&(rB(1,t,n,r)||rB(0,t,n,r)))return!0}return cg(r,e[0])&&cg(r,e[1])}function Ow(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=Pe(o.get("x"),i.getWidth()),u=Pe(o.get("y"),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition)s=n.getMarkerPosition(r.getValues(r.dimensions,e));else{var c=a.dimensions,h=r.get(c[0],e),f=r.get(c[1],e);s=a.dataToPoint([h,f])}if(th(a,"cartesian2d")){var d=a.getAxis("x"),p=a.getAxis("y"),c=a.dimensions;O_(r.get(c[0],e))?s[0]=d.toGlobalCoord(d.getExtent()[t?0:1]):O_(r.get(c[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 FMe=function(r){ae(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,i){n.eachSeries(function(a){var o=nu.getMarkerModelFromSeries(a,"markLine");if(o){var s=o.getData(),l=Oy(o).from,u=Oy(o).to;l.each(function(c){Ow(l,c,!0,a,i),Ow(u,c,!1,a,i)}),s.each(function(c){s.setItemLayout(c,[l.getItemLayout(c),u.getItemLayout(c)])}),this.markerGroupMap.get(a.id).updateLayout()}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,new dE);this.group.add(c.group);var h=BMe(o,t,n),f=h.from,d=h.to,p=h.line;Oy(n).from=f,Oy(n).to=d,n.setData(p);var g=n.get("symbol"),v=n.get("symbolSize"),m=n.get("symbolRotate"),y=n.get("symbolOffset");_e(g)||(g=[g,g]),_e(v)||(v=[v,v]),_e(m)||(m=[m,m]),_e(y)||(y=[y,y]),h.from.each(function(x){_(f,x,!0),_(d,x,!1)}),p.each(function(x){var S=p.getItemModel(x).getModel("lineStyle").getLineStyle();p.setItemLayout(x,[f.getItemLayout(x),d.getItemLayout(x)]),S.stroke==null&&(S.stroke=f.getItemVisual(x,"style").fill),p.setItemVisual(x,{fromSymbolKeepAspect:f.getItemVisual(x,"symbolKeepAspect"),fromSymbolOffset:f.getItemVisual(x,"symbolOffset"),fromSymbolRotate:f.getItemVisual(x,"symbolRotate"),fromSymbolSize:f.getItemVisual(x,"symbolSize"),fromSymbol:f.getItemVisual(x,"symbol"),toSymbolKeepAspect:d.getItemVisual(x,"symbolKeepAspect"),toSymbolOffset:d.getItemVisual(x,"symbolOffset"),toSymbolRotate:d.getItemVisual(x,"symbolRotate"),toSymbolSize:d.getItemVisual(x,"symbolSize"),toSymbol:d.getItemVisual(x,"symbol"),style:S})}),c.updateData(p),h.line.eachItemGraphicEl(function(x){at(x).dataModel=n,x.traverse(function(S){at(S).dataModel=n})});function _(x,S,A){var w=x.getItemModel(S);Ow(x,S,A,t,a);var M=w.getModel("itemStyle").getItemStyle();M.fill==null&&(M.fill=Lg(l,"color")),x.setItemVisual(S,{symbolKeepAspect:w.get("symbolKeepAspect"),symbolOffset:ot(w.get("symbolOffset",!0),y[A?0:1]),symbolRotate:ot(w.get("symbolRotate",!0),m[A?0:1]),symbolSize:ot(w.get("symbolSize"),v[A?0:1]),symbol:ot(w.get("symbol",!0),g[A?0:1]),style:M})}this.markKeep(c),c.group.silent=n.get("silent")||t.get("silent")},e.type="markLine",e}(XE);function BMe(r,e,t){var n;r?n=xe(r&&r.dimensions,function(u){var c=e.getData().getDimensionInfo(e.getData().mapDimension(u))||{};return pe(pe({},c),{name:u,ordinalMeta:null})}):n=[{name:"value",type:"float"}];var i=new vi(n,t),a=new vi(n,t),o=new vi([],t),s=xe(t.get("data"),ut(kMe,e,r,t));r&&(s=jt(s,ut(OMe,r)));var l=EW(!!r,n);return i.initData(xe(s,function(u){return u[0]}),null,l),a.initData(xe(s,function(u){return u[1]}),null,l),o.initData(xe(s,function(u){return u[2]})),o.hasItemOption=!0,{from:i,to:a,line:o}}const zMe=FMe;function UMe(r){r.registerComponentModel(NMe),r.registerComponentView(zMe),r.registerPreprocessor(function(e){WE(e.series,"markLine")&&(e.markLine=e.markLine||{})})}var VMe=function(r){ae(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,i){return new e(t,n,i)},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}(nu);const GMe=VMe;var Fy=Pt(),HMe=function(r,e,t,n){var i=n[0],a=n[1];if(!(!i||!a)){var o=ug(r,i),s=ug(r,a),l=o.coord,u=s.coord;l[0]=Mr(l[0],-1/0),l[1]=Mr(l[1],-1/0),u[0]=Mr(u[0],1/0),u[1]=Mr(u[1],1/0);var c=GC([{},o,s]);return c.coord=[o.coord,s.coord],c.x0=o.x,c.y0=o.y,c.x1=s.x,c.y1=s.y,c}};function F_(r){return!isNaN(r)&&!isFinite(r)}function iB(r,e,t,n){var i=1-r;return F_(e[i])&&F_(t[i])}function WMe(r,e){var t=e.coord[0],n=e.coord[1],i={coord:t,x:e.x0,y:e.y0},a={coord:n,x:e.x1,y:e.y1};return th(r,"cartesian2d")?t&&n&&(iB(1,t,n)||iB(0,t,n))?!0:CMe(r,i,a):cg(r,i)||cg(r,a)}function aB(r,e,t,n,i){var a=n.coordinateSystem,o=r.getItemModel(e),s,l=Pe(o.get(t[0]),i.getWidth()),u=Pe(o.get(t[1]),i.getHeight());if(!isNaN(l)&&!isNaN(u))s=[l,u];else{if(n.getMarkerPosition){var c=r.getValues(["x0","y0"],e),h=r.getValues(["x1","y1"],e),f=a.clampData(c),d=a.clampData(h),p=[];t[0]==="x0"?p[0]=f[0]>d[0]?h[0]:c[0]:p[0]=f[0]>d[0]?c[0]:h[0],t[1]==="y0"?p[1]=f[1]>d[1]?h[1]:c[1]:p[1]=f[1]>d[1]?c[1]:h[1],s=n.getMarkerPosition(p,t,!0)}else{var g=r.get(t[0],e),v=r.get(t[1],e),m=[g,v];a.clampData&&a.clampData(m,m),s=a.dataToPoint(m,!0)}if(th(a,"cartesian2d")){var y=a.getAxis("x"),_=a.getAxis("y"),g=r.get(t[0],e),v=r.get(t[1],e);F_(g)?s[0]=y.toGlobalCoord(y.getExtent()[t[0]==="x0"?0:1]):F_(v)&&(s[1]=_.toGlobalCoord(_.getExtent()[t[1]==="y0"?0:1]))}isNaN(l)||(s[0]=l),isNaN(u)||(s[1]=u)}return s}var oB=[["x0","y0"],["x1","y0"],["x1","y1"],["x0","y1"]],$Me=function(r){ae(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,i){n.eachSeries(function(a){var o=nu.getMarkerModelFromSeries(a,"markArea");if(o){var s=o.getData();s.each(function(l){var u=xe(oB,function(h){return aB(s,l,h,a,i)});s.setItemLayout(l,u);var c=s.getItemGraphicEl(l);c.setShape("points",u)})}},this)},e.prototype.renderSeries=function(t,n,i,a){var o=t.coordinateSystem,s=t.id,l=t.getData(),u=this.markerGroupMap,c=u.get(s)||u.set(s,{group:new rt});this.group.add(c.group),this.markKeep(c);var h=XMe(o,t,n);n.setData(h),h.each(function(f){var d=xe(oB,function(M){return aB(h,f,M,t,a)}),p=o.getAxis("x").scale,g=o.getAxis("y").scale,v=p.getExtent(),m=g.getExtent(),y=[p.parse(h.get("x0",f)),p.parse(h.get("x1",f))],_=[g.parse(h.get("y0",f)),g.parse(h.get("y1",f))];Pa(y),Pa(_);var x=!(v[0]>y[1]||v[1]<y[0]||m[0]>_[1]||m[1]<_[0]),S=!x;h.setItemLayout(f,{points:d,allClipped:S});var A=h.getItemModel(f).getModel("itemStyle").getItemStyle(),w=Lg(l,"color");A.fill||(A.fill=w,ke(A.fill)&&(A.fill=Q0(A.fill,.4))),A.stroke||(A.stroke=w),h.setItemVisual(f,"style",A)}),h.diff(Fy(c).data).add(function(f){var d=h.getItemLayout(f);if(!d.allClipped){var p=new zi({shape:{points:d.points}});h.setItemGraphicEl(f,p),c.group.add(p)}}).update(function(f,d){var p=Fy(c).data.getItemGraphicEl(d),g=h.getItemLayout(f);g.allClipped?p&&c.group.remove(p):(p?zt(p,{shape:{points:g.points}},n,f):p=new zi({shape:{points:g.points}}),h.setItemGraphicEl(f,p),c.group.add(p))}).remove(function(f){var d=Fy(c).data.getItemGraphicEl(f);c.group.remove(d)}).execute(),h.eachItemGraphicEl(function(f,d){var p=h.getItemModel(d),g=h.getItemVisual(d,"style");f.useStyle(h.getItemVisual(d,"style")),zr(f,Sr(p),{labelFetcher:n,labelDataIndex:d,defaultText:h.getName(d)||"",inheritColor:ke(g.fill)?Q0(g.fill,1):"#000"}),Br(f,p),Rn(f,null,null,p.get(["emphasis","disabled"])),at(f).dataModel=n}),Fy(c).data=h,c.group.silent=n.get("silent")||t.get("silent")},e.type="markArea",e}(XE);function XMe(r,e,t){var n,i,a=["x0","y0","x1","y1"];if(r){var o=xe(r&&r.dimensions,function(u){var c=e.getData(),h=c.getDimensionInfo(c.mapDimension(u))||{};return pe(pe({},h),{name:u,ordinalMeta:null})});i=xe(a,function(u,c){return{name:u,type:o[c%2].type}}),n=new vi(i,t)}else i=[{name:"value",type:"float"}],n=new vi(i,t);var s=xe(t.get("data"),ut(HMe,e,r,t));r&&(s=jt(s,ut(WMe,r)));var l=r?function(u,c,h,f){var d=u.coord[Math.floor(f/2)][f%2];return Gl(d,i[f])}:function(u,c,h,f){return Gl(u.value,i[f])};return n.initData(s,null,l),n.hasItemOption=!0,n}const YMe=$Me;function qMe(r){r.registerComponentModel(GMe),r.registerComponentView(YMe),r.registerPreprocessor(function(e){WE(e.series,"markArea")&&(e.markArea=e.markArea||{})})}var jMe=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"])}},KMe=function(r){ae(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,i){this.mergeDefaultAndTheme(t,i),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,i=this.ecModel;n===!0&&(n=t.selector=["all","inverse"]),_e(n)&&k(n,function(a,o){ke(a)&&(a={type:a}),n[o]=ht(a,jMe(i,a.type))})},e.prototype.optionUpdated=function(){this._updateData(this.ecModel);var t=this._data;if(t[0]&&this.get("selectedMode")==="single"){for(var n=!1,i=0;i<t.length;i++){var a=t[i].get("name");if(this.isSelected(a)){this.select(a),n=!0;break}}!n&&this.select(t[0].get("name"))}},e.prototype._updateData=function(t){var n=[],i=[];t.eachRawSeries(function(l){var u=l.name;i.push(u);var c;if(l.legendVisualProvider){var h=l.legendVisualProvider,f=h.getAllNames();t.isSeriesFiltered(l)||(i=i.concat(f)),f.length?n=n.concat(f):c=!0}else c=!0;c&&JC(l)&&n.push(l.name)}),this._availableNames=i;var a=this.get("data")||n,o=He(),s=xe(a,function(l){return(ke(l)||Ft(l))&&(l={name:l}),o.get(l.name)?null:(o.set(l.name,!0),new vn(l,this,this.ecModel))},this);this._data=jt(s,function(l){return!!l})},e.prototype.getData=function(){return this._data},e.prototype.select=function(t){var n=this.option.selected,i=this.get("selectedMode");if(i==="single"){var a=this._data;k(a,function(o){n[o.get("name")]=!1})}n[t]=!0},e.prototype.unSelect=function(t){this.get("selectedMode")!=="single"&&(this.option.selected[t]=!1)},e.prototype.toggleSelected=function(t){var n=this.option.selected;n.hasOwnProperty(t)||(n[t]=!0),this[n[t]?"unSelect":"select"](t)},e.prototype.allSelect=function(){var t=this._data,n=this.option.selected;k(t,function(i){n[i.get("name",!0)]=!0})},e.prototype.inverseSelect=function(){var t=this._data,n=this.option.selected;k(t,function(i){var a=i.get("name",!0);n.hasOwnProperty(a)||(n[a]=!0),n[a]=!n[a]})},e.prototype.isSelected=function(t){var n=this.option.selected;return!(n.hasOwnProperty(t)&&!n[t])&&pt(this._availableNames,t)>=0},e.prototype.getOrient=function(){return this.get("orient")==="vertical"?{index:1,name:"vertical"}:{index:0,name:"horizontal"}},e.type="legend.plain",e.dependencies=["series"],e.defaultOption={z:4,show:!0,orient:"horizontal",left:"center",top:0,align:"auto",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",borderRadius:0,borderWidth:0,padding:5,itemGap:10,itemWidth:25,itemHeight:14,symbolRotate:"inherit",symbolKeepAspect:!0,inactiveColor:"#ccc",inactiveBorderColor:"#ccc",inactiveBorderWidth:"auto",itemStyle:{color:"inherit",opacity:"inherit",borderColor:"inherit",borderWidth:"auto",borderCap:"inherit",borderJoin:"inherit",borderDashOffset:"inherit",borderMiterLimit:"inherit"},lineStyle:{width:"auto",color:"inherit",inactiveColor:"#ccc",inactiveWidth:2,opacity:"inherit",type:"inherit",cap:"inherit",join:"inherit",dashOffset:"inherit",miterLimit:"inherit"},textStyle:{color:"#333"},selectedMode:!0,selector:!1,selectorLabel:{show:!0,borderRadius:10,padding:[3,5,3,5],fontSize:12,fontFamily:"sans-serif",color:"#666",borderWidth:1,borderColor:"#666"},emphasis:{selectorLabel:{show:!0,color:"#eee",backgroundColor:"#666"}},selectorPosition:"auto",selectorItemGap:7,selectorButtonGap:10,tooltip:{show:!1}},e}(Nt);const TM=KMe;var qh=ut,MM=k,By=rt,ZMe=function(r){ae(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 By),this.group.add(this._selectorGroup=new By),this._isFirstRender=!0},e.prototype.getContentGroup=function(){return this._contentGroup},e.prototype.getSelectorGroup=function(){return this._selectorGroup},e.prototype.render=function(t,n,i){var a=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,i,l,s,u);var c=t.getBoxLayoutParams(),h={width:i.getWidth(),height:i.getHeight()},f=t.get("padding"),d=dr(c,h,f),p=this.layoutInner(t,o,d,a,l,u),g=dr(Ke({width:p.width,height:p.height},c),h,f);this.group.x=g.x-p.x,this.group.y=g.y-p.y,this.group.markRedraw(),this.group.add(this._backgroundEl=gW(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,i,a,o,s,l){var u=this.getContentGroup(),c=He(),h=n.get("selectedMode"),f=[];i.eachRawSeries(function(d){!d.get("legendHoverLink")&&f.push(d.id)}),MM(n.getData(),function(d,p){var g=d.get("name");if(!this.newlineDisabled&&(g===""||g===` |
|
`)){var v=new By;v.newline=!0,u.add(v);return}var m=i.getSeriesByName(g)[0];if(!c.get(g))if(m){var y=m.getData(),_=y.getVisual("legendLineStyle")||{},x=y.getVisual("legendIcon"),S=y.getVisual("style"),A=this._createItem(m,g,p,d,n,t,_,S,x,h,a);A.on("click",qh(sB,g,null,a,f)).on("mouseover",qh(CM,m.name,null,a,f)).on("mouseout",qh(EM,m.name,null,a,f)),i.ssr&&A.eachChild(function(w){var M=at(w);M.seriesIndex=m.seriesIndex,M.dataIndex=p,M.ssrType="legend"}),c.set(g,!0)}else i.eachRawSeries(function(w){if(!c.get(g)&&w.legendVisualProvider){var M=w.legendVisualProvider;if(!M.containName(g))return;var C=M.indexOfName(g),b=M.getItemVisual(C,"style"),T=M.getItemVisual(C,"legendIcon"),P=na(b.fill);P&&P[3]===0&&(P[3]=.2,b=pe(pe({},b),{fill:ws(P,"rgba")}));var D=this._createItem(w,g,p,d,n,t,{},b,T,h,a);D.on("click",qh(sB,null,g,a,f)).on("mouseover",qh(CM,null,g,a,f)).on("mouseout",qh(EM,null,g,a,f)),i.ssr&&D.eachChild(function(L){var E=at(L);E.seriesIndex=w.seriesIndex,E.dataIndex=p,E.ssrType="legend"}),c.set(g,!0)}},this)},this),o&&this._createSelector(o,n,a,s,l)},e.prototype._createSelector=function(t,n,i,a,o){var s=this.getSelectorGroup();MM(t,function(u){var c=u.type,h=new Ot({style:{x:0,y:0,align:"center",verticalAlign:"middle"},onclick:function(){i.dispatchAction({type:c==="all"?"legendAllSelect":"legendInverseSelect",legendId:n.id})}});s.add(h);var f=n.getModel("selectorLabel"),d=n.getModel(["emphasis","selectorLabel"]);zr(h,{normal:f,emphasis:d},{defaultText:u.title}),Ec(h)})},e.prototype._createItem=function(t,n,i,a,o,s,l,u,c,h,f){var d=t.visualDrawType,p=o.get("itemWidth"),g=o.get("itemHeight"),v=o.isSelected(n),m=a.get("symbolRotate"),y=a.get("symbolKeepAspect"),_=a.get("icon");c=_||c||"roundRect";var x=QMe(c,a,l,u,d,v,f),S=new By,A=a.getModel("textStyle");if(qe(t.getLegendIcon)&&(!_||_==="inherit"))S.add(t.getLegendIcon({itemWidth:p,itemHeight:g,icon:c,iconRotate:m,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}));else{var w=_==="inherit"&&t.getData().getVisual("symbol")?m==="inherit"?t.getData().getVisual("symbolRotate"):m:0;S.add(JMe({itemWidth:p,itemHeight:g,icon:c,iconRotate:w,itemStyle:x.itemStyle,lineStyle:x.lineStyle,symbolKeepAspect:y}))}var M=s==="left"?p+5:-5,C=s,b=o.get("formatter"),T=n;ke(b)&&b?T=b.replace("{name}",n!=null?n:""):qe(b)&&(T=b(n));var P=v?A.getTextColor():a.get("inactiveColor");S.add(new Ot({style:pn(A,{text:T,x:M,y:g/2,fill:P,align:C,verticalAlign:"middle"},{inheritColor:P})}));var D=new Dt({shape:S.getBoundingRect(),style:{fill:"transparent"}}),L=a.getModel("tooltip");return L.get("show")&&Kc({el:D,componentModel:o,itemName:n,itemTooltipOption:L.option}),S.add(D),S.eachChild(function(E){E.silent=!0}),D.silent=!h,this.getContentGroup().add(S),Ec(S),S.__legendDataIndex=i,S},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getContentGroup(),u=this.getSelectorGroup();Pc(t.get("orient"),l,t.get("itemGap"),i.width,i.height);var c=l.getBoundingRect(),h=[-c.x,-c.y];if(u.markRedraw(),l.markRedraw(),o){Pc("horizontal",u,t.get("selectorItemGap",!0));var f=u.getBoundingRect(),d=[-f.x,-f.y],p=t.get("selectorButtonGap",!0),g=t.getOrient().index,v=g===0?"width":"height",m=g===0?"height":"width",y=g===0?"y":"x";s==="end"?d[g]+=c[v]+p:h[g]+=f[v]+p,d[1-g]+=c[m]/2-f[m]/2,u.x=d[0],u.y=d[1],l.x=h[0],l.y=h[1];var _={x:0,y:0};return _[v]=c[v]+p+f[v],_[m]=Math.max(c[m],f[m]),_[y]=Math.min(0,f[y]+d[1-g]),_}else return l.x=h[0],l.y=h[1],this.group.getBoundingRect()},e.prototype.remove=function(){this.getContentGroup().removeAll(),this._isFirstRender=!0},e.type="legend.plain",e}(kn);function QMe(r,e,t,n,i,a,o){function s(v,m){v.lineWidth==="auto"&&(v.lineWidth=m.lineWidth>0?2:0),MM(v,function(y,_){v[_]==="inherit"&&(v[_]=m[_])})}var l=e.getModel("itemStyle"),u=l.getItemStyle(),c=r.lastIndexOf("empty",0)===0?"fill":"stroke",h=l.getShallow("decal");u.decal=!h||h==="inherit"?n.decal:ed(h,o),u.fill==="inherit"&&(u.fill=n[i]),u.stroke==="inherit"&&(u.stroke=n[c]),u.opacity==="inherit"&&(u.opacity=(i==="fill"?n:t).opacity),s(u,n);var f=e.getModel("lineStyle"),d=f.getLineStyle();if(s(d,t),u.fill==="auto"&&(u.fill=n.fill),u.stroke==="auto"&&(u.stroke=n.fill),d.stroke==="auto"&&(d.stroke=n.fill),!a){var p=e.get("inactiveBorderWidth"),g=u[c];u.lineWidth=p==="auto"?n.lineWidth>0&&g?2:0:u.lineWidth,u.fill=e.get("inactiveColor"),u.stroke=e.get("inactiveBorderColor"),d.stroke=f.get("inactiveColor"),d.lineWidth=f.get("inactiveWidth")}return{itemStyle:u,lineStyle:d}}function JMe(r){var e=r.icon||"roundRect",t=rr(e,0,0,r.itemWidth,r.itemHeight,r.itemStyle.fill,r.symbolKeepAspect);return t.setStyle(r.itemStyle),t.rotation=(r.iconRotate||0)*Math.PI/180,t.setOrigin([r.itemWidth/2,r.itemHeight/2]),e.indexOf("empty")>-1&&(t.style.stroke=t.style.fill,t.style.fill="#fff",t.style.lineWidth=2),t}function sB(r,e,t,n){EM(r,e,t,n),t.dispatchAction({type:"legendToggleSelect",name:r!=null?r:e}),CM(r,e,t,n)}function LW(r){for(var e=r.getZr().storage.getDisplayList(),t,n=0,i=e.length;n<i&&!(t=e[n].states.emphasis);)n++;return t&&t.hoverLayer}function CM(r,e,t,n){LW(t)||t.dispatchAction({type:"highlight",seriesName:r,name:e,excludeSeriesId:n})}function EM(r,e,t,n){LW(t)||t.dispatchAction({type:"downplay",seriesName:r,name:e,excludeSeriesId:n})}const PW=ZMe;function eCe(r){var e=r.findComponents({mainType:"legend"});e&&e.length&&r.filterSeries(function(t){for(var n=0;n<e.length;n++)if(!e[n].isSelected(t.name))return!1;return!0})}function mp(r,e,t){var n=r==="allSelect"||r==="inverseSelect",i={},a=[];t.eachComponent({mainType:"legend",query:e},function(s){n?s[r]():s[r](e.name),lB(s,i),a.push(s.componentIndex)});var o={};return t.eachComponent("legend",function(s){k(i,function(l,u){s[l?"select":"unSelect"](u)}),lB(s,o)}),n?{selected:o,legendIndex:a}:{name:e.name,selected:o}}function lB(r,e){var t=e||{};return k(r.getData(),function(n){var i=n.get("name");if(!(i===` |
|
`||i==="")){var a=r.isSelected(i);ze(t,i)?t[i]=t[i]&&a:t[i]=a}}),t}function tCe(r){r.registerAction("legendToggleSelect","legendselectchanged",ut(mp,"toggleSelected")),r.registerAction("legendAllSelect","legendselectall",ut(mp,"allSelect")),r.registerAction("legendInverseSelect","legendinverseselect",ut(mp,"inverseSelect")),r.registerAction("legendSelect","legendselected",ut(mp,"select")),r.registerAction("legendUnSelect","legendunselected",ut(mp,"unSelect"))}function RW(r){r.registerComponentModel(TM),r.registerComponentView(PW),r.registerProcessor(r.PRIORITY.PROCESSOR.SERIES_FILTER,eCe),r.registerSubTypeDefaulter("legend",function(){return"plain"}),tCe(r)}var nCe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t}return e.prototype.setScrollDataIndex=function(t){this.option.scrollDataIndex=t},e.prototype.init=function(t,n,i){var a=Ad(t);r.prototype.init.call(this,t,n,i),uB(this,t,a)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),uB(this,this.option,t)},e.type="legend.scroll",e.defaultOption=su(TM.defaultOption,{scrollDataIndex:0,pageButtonItemGap:5,pageButtonGap:null,pageButtonPosition:"end",pageFormatter:"{current}/{total}",pageIcons:{horizontal:["M0,0L12,-10L12,10z","M0,0L-12,-10L-12,10z"],vertical:["M0,0L20,0L10,-20z","M0,0L20,0L10,20z"]},pageIconColor:"#2f4554",pageIconInactiveColor:"#aaa",pageIconSize:15,pageTextStyle:{color:"#333"},animationDurationUpdate:800}),e}(TM);function uB(r,e,t){var n=r.getOrient(),i=[1,1];i[n.index]=0,Zl(e,t,{type:"box",ignoreSize:!!i})}const rCe=nCe;var cB=rt,Fw=["width","height"],Bw=["x","y"],iCe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.newlineDisabled=!0,t._currentIndex=0,t}return e.prototype.init=function(){r.prototype.init.call(this),this.group.add(this._containerGroup=new cB),this._containerGroup.add(this.getContentGroup()),this.group.add(this._controllerGroup=new cB)},e.prototype.resetInner=function(){r.prototype.resetInner.call(this),this._controllerGroup.removeAll(),this._containerGroup.removeClipPath(),this._containerGroup.__rectSize=null},e.prototype.renderInner=function(t,n,i,a,o,s,l){var u=this;r.prototype.renderInner.call(this,t,n,i,a,o,s,l);var c=this._controllerGroup,h=n.get("pageIconSize",!0),f=_e(h)?h:[h,h];p("pagePrev",0);var d=n.getModel("pageTextStyle");c.add(new Ot({name:"pageText",style:{text:"xx/xx",fill:d.getTextColor(),font:d.getFont(),verticalAlign:"middle",align:"center"},silent:!0})),p("pageNext",1);function p(g,v){var m=g+"DataIndex",y=Cg(n.get("pageIcons",!0)[n.getOrient().name][v],{onclick:Fe(u._pageGo,u,m,n,a)},{x:-f[0]/2,y:-f[1]/2,width:f[0],height:f[1]});y.name=g,c.add(y)}},e.prototype.layoutInner=function(t,n,i,a,o,s){var l=this.getSelectorGroup(),u=t.getOrient().index,c=Fw[u],h=Bw[u],f=Fw[1-u],d=Bw[1-u];o&&Pc("horizontal",l,t.get("selectorItemGap",!0));var p=t.get("selectorButtonGap",!0),g=l.getBoundingRect(),v=[-g.x,-g.y],m=Je(i);o&&(m[c]=i[c]-g[c]-p);var y=this._layoutContentAndController(t,a,m,u,c,f,d,h);if(o){if(s==="end")v[u]+=y[c]+p;else{var _=g[c]+p;v[u]-=_,y[h]-=_}y[c]+=g[c]+p,v[1-u]+=y[d]+y[f]/2-g[f]/2,y[f]=Math.max(y[f],g[f]),y[d]=Math.min(y[d],g[d]+v[1-u]),l.x=v[0],l.y=v[1],l.markRedraw()}return y},e.prototype._layoutContentAndController=function(t,n,i,a,o,s,l,u){var c=this.getContentGroup(),h=this._containerGroup,f=this._controllerGroup;Pc(t.get("orient"),c,t.get("itemGap"),a?i.width:null,a?null:i.height),Pc("horizontal",f,t.get("pageButtonItemGap",!0));var d=c.getBoundingRect(),p=f.getBoundingRect(),g=this._showController=d[o]>i[o],v=[-d.x,-d.y];n||(v[a]=c[u]);var m=[0,0],y=[-p.x,-p.y],_=ot(t.get("pageButtonGap",!0),t.get("itemGap",!0));if(g){var x=t.get("pageButtonPosition",!0);x==="end"?y[a]+=i[o]-p[o]:m[a]+=p[o]+_}y[1-a]+=d[s]/2-p[s]/2,c.setPosition(v),h.setPosition(m),f.setPosition(y);var S={x:0,y:0};if(S[o]=g?i[o]:d[o],S[s]=Math.max(d[s],p[s]),S[l]=Math.min(0,p[l]+y[1-a]),h.__rectSize=i[o],g){var A={x:0,y:0};A[o]=Math.max(i[o]-p[o]-_,0),A[s]=S[s],h.setClipPath(new Dt({shape:A})),h.__rectSize=A[o]}else f.eachChild(function(M){M.attr({invisible:!0,silent:!0})});var w=this._getPageInfo(t);return w.pageIndex!=null&&zt(c,{x:w.contentPosition[0],y:w.contentPosition[1]},g?t:null),this._updatePageInfoView(t,w),S},e.prototype._pageGo=function(t,n,i){var a=this._getPageInfo(n)[t];a!=null&&i.dispatchAction({type:"legendScroll",scrollDataIndex:a,legendId:n.id})},e.prototype._updatePageInfoView=function(t,n){var i=this._controllerGroup;k(["pagePrev","pageNext"],function(c){var h=c+"DataIndex",f=n[h]!=null,d=i.childOfName(c);d&&(d.setStyle("fill",f?t.get("pageIconColor",!0):t.get("pageIconInactiveColor",!0)),d.cursor=f?"pointer":"default")});var a=i.childOfName("pageText"),o=t.get("pageFormatter"),s=n.pageIndex,l=s!=null?s+1:0,u=n.pageCount;a&&o&&a.setStyle("text",ke(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),i=this.getContentGroup(),a=this._containerGroup.__rectSize,o=t.getOrient().index,s=Fw[o],l=Bw[o],u=this._findTargetItemIndex(n),c=i.children(),h=c[u],f=c.length,d=f?1:0,p={contentPosition:[i.x,i.y],pageCount:d,pageIndex:d-1,pagePrevDataIndex:null,pageNextDataIndex:null};if(!h)return p;var g=x(h);p.contentPosition[o]=-g.s;for(var v=u+1,m=g,y=g,_=null;v<=f;++v)_=x(c[v]),(!_&&y.e>m.s+a||_&&!S(_,m.s))&&(y.i>m.i?m=y:m=_,m&&(p.pageNextDataIndex==null&&(p.pageNextDataIndex=m.i),++p.pageCount)),y=_;for(var v=u-1,m=g,y=g,_=null;v>=-1;--v)_=x(c[v]),(!_||!S(y,_.s))&&m.i<y.i&&(y=m,p.pagePrevDataIndex==null&&(p.pagePrevDataIndex=m.i),++p.pageCount,++p.pageIndex),m=_;return p;function x(A){if(A){var w=A.getBoundingRect(),M=w[l]+A[l];return{s:M,e:M+w[s],i:A.__legendDataIndex}}}function S(A,w){return A.e>=w&&A.s<=w+a}},e.prototype._findTargetItemIndex=function(t){if(!this._showController)return 0;var n,i=this.getContentGroup(),a;return i.eachChild(function(o,s){var l=o.__legendDataIndex;a==null&&l!=null&&(a=s),l===t&&(n=s)}),n!=null?n:a},e.type="legend.scroll",e}(PW);const aCe=iCe;function oCe(r){r.registerAction("legendScroll","legendscroll",function(e,t){var n=e.scrollDataIndex;n!=null&&t.eachComponent({mainType:"legend",subType:"scroll",query:e},function(i){i.setScrollDataIndex(n)})})}function sCe(r){gt(RW),r.registerComponentModel(rCe),r.registerComponentView(aCe),oCe(r)}function lCe(r){gt(RW),gt(sCe)}var uCe=function(r){ae(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=su(lg.defaultOption,{disabled:!1,zoomLock:!1,zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!1,preventDefaultMouseMove:!0}),e}(lg);const cCe=uCe;var YE=Pt();function hCe(r,e,t){YE(r).coordSysRecordMap.each(function(n){var i=n.dataZoomInfoMap.get(e.uid);i&&(i.getRange=t)})}function fCe(r,e){for(var t=YE(r).coordSysRecordMap,n=t.keys(),i=0;i<n.length;i++){var a=n[i],o=t.get(a),s=o.dataZoomInfoMap;if(s){var l=e.uid,u=s.get(l);u&&(s.removeKey(l),s.keys().length||DW(t,o))}}}function DW(r,e){if(e){r.removeKey(e.model.uid);var t=e.controller;t&&t.dispose()}}function dCe(r,e){var t={model:e,containsPoint:ut(vCe,e),dispatchAction:ut(pCe,r),dataZoomInfoMap:null,controller:null},n=t.controller=new Bg(r.getZr());return k(["pan","zoom","scrollMove"],function(i){n.on(i,function(a){var o=[];t.dataZoomInfoMap.each(function(s){if(a.isAvailableBehavior(s.model.option)){var l=(s.getRange||{})[i],u=l&&l(s.dzReferCoordSysInfo,t.model.mainType,t.controller,a);!s.model.get("disabled",!0)&&u&&o.push({dataZoomId:s.model.id,start:u[0],end:u[1]})}}),o.length&&t.dispatchAction(o)})}),t}function pCe(r,e){r.isDisposed()||r.dispatchAction({type:"dataZoom",animation:{easing:"cubicOut",duration:100},batch:e})}function vCe(r,e,t,n){return r.coordinateSystem.containPoint([t,n])}function gCe(r){var e,t="type_",n={type_true:2,type_move:1,type_false:0,type_undefined:-1},i=!0;return r.each(function(a){var o=a.model,s=o.get("disabled",!0)?!1:o.get("zoomLock",!0)?"move":!0;n[t+s]>n[t+e]&&(e=s),i=i&&o.get("preventDefaultMouseMove",!0)}),{controlType:e,opt:{zoomOnMouseWheel:!0,moveOnMouseMove:!0,moveOnMouseWheel:!0,preventDefaultMouseMove:!!i}}}function mCe(r){r.registerProcessor(r.PRIORITY.PROCESSOR.FILTER,function(e,t){var n=YE(t),i=n.coordSysRecordMap||(n.coordSysRecordMap=He());i.each(function(a){a.dataZoomInfoMap=null}),e.eachComponent({mainType:"dataZoom",subType:"inside"},function(a){var o=dW(a);k(o.infoList,function(s){var l=s.model.uid,u=i.get(l)||i.set(l,dCe(t,s.model)),c=u.dataZoomInfoMap||(u.dataZoomInfoMap=He());c.set(a.uid,{dzReferCoordSysInfo:s,model:a,getRange:null})})}),i.each(function(a){var o=a.controller,s,l=a.dataZoomInfoMap;if(l){var u=l.keys()[0];u!=null&&(s=l.get(u))}if(!s){DW(i,a);return}var c=gCe(l);o.enable(c.controlType,c.opt),o.setPointerChecker(a.containsPoint),Md(a,"dispatchAction",s.model.get("throttle",!0),"fixRate")})})}var yCe=function(r){ae(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,i){if(r.prototype.render.apply(this,arguments),t.noTarget()){this._clear();return}this.range=t.getPercentRange(),hCe(i,t,{pan:Fe(zw.pan,this),zoom:Fe(zw.zoom,this),scrollMove:Fe(zw.scrollMove,this)})},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){fCe(this.api,this.dataZoomModel),this.range=null},e.type="dataZoom.inside",e}(BE),zw={zoom:function(r,e,t,n){var i=this.range,a=i.slice(),o=r.axisModels[0];if(o){var s=Uw[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*(a[1]-a[0])+a[0],u=Math.max(1/n.scale,0);a[0]=(a[0]-l)*u+l,a[1]=(a[1]-l)*u+l;var c=this.dataZoomModel.findRepresentativeAxisProxy().getMinMaxSpan();if(rh(0,a,[0,100],0,c.minSpan,c.maxSpan),this.range=a,i[0]!==a[0]||i[1]!==a[1])return a}},pan:hB(function(r,e,t,n,i,a){var o=Uw[n]([a.oldX,a.oldY],[a.newX,a.newY],e,i,t);return o.signal*(r[1]-r[0])*o.pixel/o.pixelLength}),scrollMove:hB(function(r,e,t,n,i,a){var o=Uw[n]([0,0],[a.scrollDelta,a.scrollDelta],e,i,t);return o.signal*(r[1]-r[0])*a.scrollDelta})};function hB(r){return function(e,t,n,i){var a=this.range,o=a.slice(),s=e.axisModels[0];if(s){var l=r(o,s,e,t,n,i);if(rh(l,o,[0,100],"all"),this.range=o,a[0]!==o[0]||a[1]!==o[1])return o}}}var Uw={grid:function(r,e,t,n,i){var a=t.axis,o={},s=i.model.coordinateSystem.getRect();return r=r||[0,0],a.dim==="x"?(o.pixel=e[0]-r[0],o.pixelLength=s.width,o.pixelStart=s.x,o.signal=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=s.height,o.pixelStart=s.y,o.signal=a.inverse?-1:1),o},polar:function(r,e,t,n,i){var a=t.axis,o={},s=i.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=a.inverse?1:-1):(o.pixel=e[1]-r[1],o.pixelLength=u[1]-u[0],o.pixelStart=u[0],o.signal=a.inverse?-1:1),o},singleAxis:function(r,e,t,n,i){var a=t.axis,o=i.model.coordinateSystem.getRect(),s={};return r=r||[0,0],a.orient==="horizontal"?(s.pixel=e[0]-r[0],s.pixelLength=o.width,s.pixelStart=o.x,s.signal=a.inverse?1:-1):(s.pixel=e[1]-r[1],s.pixelLength=o.height,s.pixelStart=o.y,s.signal=a.inverse?-1:1),s}};const _Ce=yCe;function IW(r){zE(r),r.registerComponentModel(cCe),r.registerComponentView(_Ce),mCe(r)}var xCe=function(r){ae(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=su(lg.defaultOption,{show:!0,right:"ph",top:"ph",width:"ph",height:"ph",left:null,bottom:null,borderColor:"#d2dbee",borderRadius:3,backgroundColor:"rgba(47,69,84,0)",dataBackground:{lineStyle:{color:"#d2dbee",width:.5},areaStyle:{color:"#d2dbee",opacity:.2}},selectedDataBackground:{lineStyle:{color:"#8fb0f7",width:.5},areaStyle:{color:"#8fb0f7",opacity:.2}},fillerColor:"rgba(135,175,274,0.2)",handleIcon:"path://M-9.35,34.56V42m0-40V9.5m-2,0h4a2,2,0,0,1,2,2v21a2,2,0,0,1-2,2h-4a2,2,0,0,1-2-2v-21A2,2,0,0,1-11.35,9.5Z",handleSize:"100%",handleStyle:{color:"#fff",borderColor:"#ACB8D1"},moveHandleSize:7,moveHandleIcon:"path://M-320.9-50L-320.9-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-348-41-339-50-320.9-50z M-212.3-50L-212.3-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-239.4-41-230.4-50-212.3-50z M-103.7-50L-103.7-50c18.1,0,27.1,9,27.1,27.1V85.7c0,18.1-9,27.1-27.1,27.1l0,0c-18.1,0-27.1-9-27.1-27.1V-22.9C-130.9-41-121.8-50-103.7-50z",moveHandleStyle:{color:"#D2DBEE",opacity:.7},showDetail:!0,showDataShadow:"auto",realtime:!0,zoomLock:!1,textStyle:{color:"#6E7079"},brushSelect:!0,brushStyle:{color:"rgba(135,175,274,0.15)"},emphasis:{handleLabel:{show:!0},handleStyle:{borderColor:"#8FB0F7"},moveHandleStyle:{color:"#8FB0F7"}}}),e}(lg);const SCe=xCe;var yp=Dt,fB=7,ACe=1,Vw=30,wCe=7,_p="horizontal",dB="vertical",bCe=5,TCe=["line","bar","candlestick","scatter"],MCe={easing:"cubicOut",duration:100,delay:0},CCe=function(r){ae(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=Fe(this._onBrush,this),this._onBrushEnd=Fe(this._onBrushEnd,this)},e.prototype.render=function(t,n,i,a){if(r.prototype.render.apply(this,arguments),Md(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}(!a||a.type!=="dataZoom"||a.from!==this.uid)&&this._buildView(),this._updateView()},e.prototype.dispose=function(){this._clear(),r.prototype.dispose.apply(this,arguments)},e.prototype._clear=function(){Kv(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 rt;this._renderBackground(),this._renderHandle(),this._renderDataShadow(),t.add(n),this._positionGroup()},e.prototype._resetLocation=function(){var t=this.dataZoomModel,n=this.api,i=t.get("brushSelect"),a=i?wCe:0,o=this._findCoordRect(),s={width:n.getWidth(),height:n.getHeight()},l=this._orient===_p?{right:s.width-o.x-o.width,top:s.height-Vw-fB-a,width:o.width,height:Vw}:{right:fB,top:o.y,width:Vw,height:o.height},u=Ad(t.option);k(["right","top","width","height"],function(h){u[h]==="ph"&&(u[h]=l[h])});var c=dr(u,s);this._location={x:c.x,y:c.y},this._size=[c.width,c.height],this._orient===dB&&this._size.reverse()},e.prototype._positionGroup=function(){var t=this.group,n=this._location,i=this._orient,a=this.dataZoomModel.getFirstTargetAxisModel(),o=a&&a.get("inverse"),s=this._displayables.sliderGroup,l=(this._dataShadowInfo||{}).otherAxisInverse;s.attr(i===_p&&!o?{scaleY:l?1:-1,scaleX:1}:i===_p&&o?{scaleY:l?1:-1,scaleX:-1}:i===dB&&!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,i=this._displayables.sliderGroup,a=t.get("brushSelect");i.add(new yp({silent:!0,shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:t.get("backgroundColor")},z2:-40}));var o=new yp({shape:{x:0,y:0,width:n[0],height:n[1]},style:{fill:"transparent"},z2:0,onclick:Fe(this._onClickPanel,this)}),s=this.api.getZr();a?(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)),i.add(o)},e.prototype._renderDataShadow=function(){var t=this._dataShadowInfo=this._prepareDataShadowInfo();if(this._displayables.dataShadowSegs=[],!t)return;var n=this._size,i=this._shadowSize||[],a=t.series,o=a.getRawData(),s=a.getShadowDim&&a.getShadowDim(),l=s&&o.getDimensionInfo(s)?a.getShadowDim():t.otherDim;if(l==null)return;var u=this._shadowPolygonPts,c=this._shadowPolylinePts;if(o!==this._shadowData||l!==this._shadowDim||n[0]!==i[0]||n[1]!==i[1]){var h=o.getDataExtent(l),f=(h[1]-h[0])*.3;h=[h[0]-f,h[1]+f];var d=[0,n[1]],p=[0,n[0]],g=[[n[0],0],[0,0]],v=[],m=p[1]/(o.count()-1),y=0,_=Math.round(o.count()/n[0]),x;o.each([l],function(C,b){if(_>0&&b%_){y+=m;return}var T=C==null||isNaN(C)||C==="",P=T?0:Kt(C,h,d,!0);T&&!x&&b?(g.push([g[g.length-1][0],0]),v.push([v[v.length-1][0],0])):!T&&x&&(g.push([y,0]),v.push([y,0])),g.push([y,P]),v.push([y,P]),y+=m,x=T}),u=this._shadowPolygonPts=g,c=this._shadowPolylinePts=v}this._shadowData=o,this._shadowDim=l,this._shadowSize=[n[0],n[1]];var S=this.dataZoomModel;function A(C){var b=S.getModel(C?"selectedDataBackground":"dataBackground"),T=new rt,P=new zi({shape:{points:u},segmentIgnoreThreshold:1,style:b.getModel("areaStyle").getAreaStyle(),silent:!0,z2:-20}),D=new Ui({shape:{points:c},segmentIgnoreThreshold:1,style:b.getModel("lineStyle").getLineStyle(),silent:!0,z2:-19});return T.add(P),T.add(D),T}for(var w=0;w<3;w++){var M=A(w===1);this._displayables.sliderGroup.add(M),this._displayables.dataShadowSegs.push(M)}},e.prototype._prepareDataShadowInfo=function(){var t=this.dataZoomModel,n=t.get("showDataShadow");if(n!==!1){var i,a=this.ecModel;return t.eachTargetAxis(function(o,s){var l=t.getAxisProxy(o,s).getTargetSeriesModels();k(l,function(u){if(!i&&!(n!==!0&&pt(TCe,u.get("type"))<0)){var c=a.getComponent(Dl(o),s).axis,h=ECe(o),f,d=u.coordinateSystem;h!=null&&d.getOtherAxis&&(f=d.getOtherAxis(c).inverse),h=u.getData().mapDimension(h),i={thisAxis:c,series:u,thisDim:o,otherDim:h,otherAxisInverse:f}}},this)},this),i}},e.prototype._renderHandle=function(){var t=this.group,n=this._displayables,i=n.handles=[null,null],a=n.handleLabels=[null,null],o=this._displayables.sliderGroup,s=this._size,l=this.dataZoomModel,u=this.api,c=l.get("borderRadius")||0,h=l.get("brushSelect"),f=n.filler=new yp({silent:h,style:{fill:l.get("fillerColor")},textConfig:{position:"inside"}});o.add(f),o.add(new yp({silent:!0,subPixelOptimize:!0,shape:{x:0,y:0,width:s[0],height:s[1],r:c},style:{stroke:l.get("dataBackgroundColor")||l.get("borderColor"),lineWidth:ACe,fill:"rgba(0,0,0,0)"}})),k([0,1],function(_){var x=l.get("handleIcon");!d_[x]&&x.indexOf("path://")<0&&x.indexOf("image://")<0&&(x="path://"+x);var S=rr(x,-1,0,2,2,null,!0);S.attr({cursor:pB(this._orient),draggable:!0,drift:Fe(this._onDragMove,this,_),ondragend:Fe(this._onDragEnd,this),onmouseover:Fe(this._showDataInfo,this,!0),onmouseout:Fe(this._showDataInfo,this,!1),z2:5});var A=S.getBoundingRect(),w=l.get("handleSize");this._handleHeight=Pe(w,this._size[1]),this._handleWidth=A.width/A.height*this._handleHeight,S.setStyle(l.getModel("handleStyle").getItemStyle()),S.style.strokeNoScale=!0,S.rectHover=!0,S.ensureState("emphasis").style=l.getModel(["emphasis","handleStyle"]).getItemStyle(),Ec(S);var M=l.get("handleColor");M!=null&&(S.style.fill=M),o.add(i[_]=S);var C=l.getModel("textStyle"),b=l.get("handleLabel")||{},T=b.show||!1;t.add(a[_]=new Ot({silent:!0,invisible:!T,style:pn(C,{x:0,y:0,text:"",verticalAlign:"middle",align:"center",fill:C.getTextColor(),font:C.getFont()}),z2:10}))},this);var d=f;if(h){var p=Pe(l.get("moveHandleSize"),s[1]),g=n.moveHandle=new Dt({style:l.getModel("moveHandleStyle").getItemStyle(),silent:!0,shape:{r:[0,0,2,2],y:s[1]-.5,height:p}}),v=p*.8,m=n.moveHandleIcon=rr(l.get("moveHandleIcon"),-v/2,-v/2,v,v,"#fff",!0);m.silent=!0,m.y=s[1]+p/2-.5,g.ensureState("emphasis").style=l.getModel(["emphasis","moveHandleStyle"]).getItemStyle();var y=Math.min(s[1]/2,Math.max(p,10));d=n.moveZone=new Dt({invisible:!0,shape:{y:s[1]-y,height:p+y}}),d.on("mouseover",function(){u.enterEmphasis(g)}).on("mouseout",function(){u.leaveEmphasis(g)}),o.add(g),o.add(m),o.add(d)}d.attr({draggable:!0,cursor:pB(this._orient),drift:Fe(this._onDragMove,this,"all"),ondragstart:Fe(this._showDataInfo,this,!0),ondragend:Fe(this._onDragEnd,this),onmouseover:Fe(this._showDataInfo,this,!0),onmouseout:Fe(this._showDataInfo,this,!1)})},e.prototype._resetInterval=function(){var t=this._range=this.dataZoomModel.getPercentRange(),n=this._getViewExtent();this._handleEnds=[Kt(t[0],[0,100],n,!0),Kt(t[1],[0,100],n,!0)]},e.prototype._updateInterval=function(t,n){var i=this.dataZoomModel,a=this._handleEnds,o=this._getViewExtent(),s=i.findRepresentativeAxisProxy().getMinMaxSpan(),l=[0,100];rh(n,a,o,i.get("zoomLock")?"all":t,s.minSpan!=null?Kt(s.minSpan,l,o,!0):null,s.maxSpan!=null?Kt(s.maxSpan,l,o,!0):null);var u=this._range,c=this._range=Pa([Kt(a[0],o,l,!0),Kt(a[1],o,l,!0)]);return!u||u[0]!==c[0]||u[1]!==c[1]},e.prototype._updateView=function(t){var n=this._displayables,i=this._handleEnds,a=Pa(i.slice()),o=this._size;k([0,1],function(d){var p=n.handles[d],g=this._handleHeight;p.attr({scaleX:g/2,scaleY:g/2,x:i[d]+(d?-1:1),y:o[1]/2-g/2})},this),n.filler.setShape({x:a[0],y:0,width:a[1]-a[0],height:o[1]});var s={x:a[0],width:a[1]-a[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,a[0],a[1],o[0]],c=0;c<l.length;c++){var h=l[c],f=h.getClipPath();f||(f=new Dt,h.setClipPath(f)),f.setShape({x:u[c],y:0,width:u[c+1]-u[c],height:o[1]})}this._updateDataInfo(t)},e.prototype._updateDataInfo=function(t){var n=this.dataZoomModel,i=this._displayables,a=i.handleLabels,o=this._orient,s=["",""];if(n.get("showDetail")){var l=n.findRepresentativeAxisProxy();if(l){var u=l.getAxisModel().axis,c=this._range,h=t?l.calculateDataWindow({start:c[0],end:c[1]}).valueWindow:l.getDataValueWindow();s=[this._formatLabel(h[0],u),this._formatLabel(h[1],u)]}}var f=Pa(this._handleEnds.slice());d.call(this,0),d.call(this,1);function d(p){var g=Lc(i.handles[p].parent,this.group),v=E1(p===0?"right":"left",g),m=this._handleWidth/2+bCe,y=io([f[p]+(p===0?-m:m),this._size[1]/2],g);a[p].setStyle({x:y[0],y:y[1],verticalAlign:o===_p?"middle":v,align:o===_p?v:"center",text:s[p]})}},e.prototype._formatLabel=function(t,n){var i=this.dataZoomModel,a=i.get("labelFormatter"),o=i.get("labelPrecision");(o==null||o==="auto")&&(o=n.getPixelPrecision());var s=t==null||isNaN(t)?"":n.type==="category"||n.type==="time"?n.scale.getLabel({value:Math.round(t)}):t.toFixed(Math.min(o,20));return qe(a)?a(t,s):ke(a)?a.replace("{value}",s):s},e.prototype._showDataInfo=function(t){var n=this.dataZoomModel.get("handleLabel")||{},i=n.show||!1,a=this.dataZoomModel.getModel(["emphasis","handleLabel"]),o=a.get("show")||!1,s=t||this._dragging?o:i,l=this._displayables,u=l.handleLabels;u[0].attr("invisible",!s),u[1].attr("invisible",!s),l.moveHandle&&this.api[s?"enterEmphasis":"leaveEmphasis"](l.moveHandle,1)},e.prototype._onDragMove=function(t,n,i,a){this._dragging=!0,Ps(a.event);var o=this._displayables.sliderGroup.getLocalTransform(),s=io([n,i],o,!0),l=this._updateInterval(t,s[0]),u=this.dataZoomModel.get("realtime");this._updateView(!u),l&&u&&this._dispatchZoomAction(!0)},e.prototype._onDragEnd=function(){this._dragging=!1,this._showDataInfo(!1);var t=this.dataZoomModel.get("realtime");!t&&this._dispatchZoomAction(!1)},e.prototype._onClickPanel=function(t){var n=this._size,i=this._displayables.sliderGroup.transformCoordToLocal(t.offsetX,t.offsetY);if(!(i[0]<0||i[0]>n[0]||i[1]<0||i[1]>n[1])){var a=this._handleEnds,o=(a[0]+a[1])/2,s=this._updateInterval("all",i[0]-o);this._updateView(),s&&this._dispatchZoomAction(!1)}},e.prototype._onBrushStart=function(t){var n=t.offsetX,i=t.offsetY;this._brushStart=new ft(n,i),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 i=n.shape,a=+new Date;if(!(a-this._brushStartTime<200&&Math.abs(i.width)<5)){var o=this._getViewExtent(),s=[0,100];this._range=Pa([Kt(i.x,o,s,!0),Kt(i.x+i.width,o,s,!0)]),this._handleEnds=[i.x,i.x+i.width],this._updateView(),this._dispatchZoomAction(!1)}}}},e.prototype._onBrush=function(t){this._brushing&&(Ps(t.event),this._updateBrushRect(t.offsetX,t.offsetY))},e.prototype._updateBrushRect=function(t,n){var i=this._displayables,a=this.dataZoomModel,o=i.brushRect;o||(o=i.brushRect=new yp({silent:!0,style:a.getModel("brushStyle").getItemStyle()}),i.sliderGroup.add(o)),o.attr("ignore",!1);var s=this._brushStart,l=this._displayables.sliderGroup,u=l.transformCoordToLocal(t,n),c=l.transformCoordToLocal(s.x,s.y),h=this._size;u[0]=Math.max(Math.min(h[0],u[0]),0),o.setShape({x:c[0],y:0,width:u[0]-c[0],height:h[1]})},e.prototype._dispatchZoomAction=function(t){var n=this._range;this.api.dispatchAction({type:"dataZoom",from:this.uid,dataZoomId:this.dataZoomModel.id,animation:t?MCe:null,start:n[0],end:n[1]})},e.prototype._findCoordRect=function(){var t,n=dW(this.dataZoomModel).infoList;if(!t&&n.length){var i=n[0].model.coordinateSystem;t=i.getRect&&i.getRect()}if(!t){var a=this.api.getWidth(),o=this.api.getHeight();t={x:a*.2,y:o*.2,width:a*.6,height:o*.6}}return t},e.type="dataZoom.slider",e}(BE);function ECe(r){var e={x:"y",y:"x",radius:"angle",angle:"radius"};return e[r]}function pB(r){return r==="vertical"?"ns-resize":"ew-resize"}const LCe=CCe;function NW(r){r.registerComponentModel(SCe),r.registerComponentView(LCe),zE(r)}function PCe(r){gt(IW),gt(NW)}var RCe={get:function(r,e,t){var n=Je((DCe[r]||{})[e]);return t&&_e(n)?n[n.length-1]:n}},DCe={color:{active:["#006edd","#e0ffff"],inactive:["rgba(0,0,0,0)"]},colorHue:{active:[0,360],inactive:[0,0]},colorSaturation:{active:[.3,1],inactive:[0,0]},colorLightness:{active:[.9,.5],inactive:[0,0]},colorAlpha:{active:[.3,1],inactive:[0,0]},opacity:{active:[.3,1],inactive:[0,0]},symbol:{active:["circle","roundRect","diamond"],inactive:["none"]},symbolSize:{active:[10,50],inactive:[0,0]}};const kW=RCe;var vB=Fr.mapVisual,ICe=Fr.eachVisual,NCe=_e,gB=k,kCe=Pa,OCe=Kt,FCe=function(r){ae(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,i){this.mergeDefaultAndTheme(t,i)},e.prototype.optionUpdated=function(t,n){var i=this.option;!n&&wW(i,t,this.replacableOptionKeys),this.textStyleModel=this.getModel("textStyle"),this.resetItemSize(),this.completeVisualOption()},e.prototype.resetVisual=function(t){var n=this.stateList;t=Fe(t,this),this.controllerVisuals=AM(this.option.controller,n,t),this.targetVisuals=AM(this.option.target,n,t)},e.prototype.getItemSymbol=function(){return null},e.prototype.getTargetSeriesIndices=function(){var t=this.option.seriesIndex,n=[];return t==null||t==="all"?this.ecModel.eachSeries(function(i,a){n.push(a)}):n=nn(t),n},e.prototype.eachTargetSeries=function(t,n){k(this.getTargetSeriesIndices(),function(i){var a=this.ecModel.getSeriesByIndex(i);a&&t.call(n,a)},this)},e.prototype.isTargetSeries=function(t){var n=!1;return this.eachTargetSeries(function(i){i===t&&(n=!0)}),n},e.prototype.formatValueText=function(t,n,i){var a=this.option,o=a.precision,s=this.dataBound,l=a.formatter,u;i=i||["<",">"],_e(t)&&(t=t.slice(),u=!0);var c=n?t:u?[h(t[0]),h(t[1])]:h(t);if(ke(l))return l.replace("{value}",u?c[0]:c).replace("{value2}",u?c[1]:c);if(qe(l))return u?l(t[0],t[1]):l(t);if(u)return t[0]===s[0]?i[0]+" "+c[1]:t[1]===s[1]?i[1]+" "+c[0]:c[0]+" - "+c[1];return c;function h(f){return f===s[0]?"min":f===s[1]?"max":(+f).toFixed(Math.min(o,20))}},e.prototype.resetExtent=function(){var t=this.option,n=kCe([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 i=t.dimensions,a=i.length-1;a>=0;a--){var o=i[a],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,i={inRange:n.inRange,outOfRange:n.outOfRange},a=n.target||(n.target={}),o=n.controller||(n.controller={});ht(a,i),ht(o,i);var s=this.isCategory();l.call(this,a),l.call(this,o),u.call(this,a,"inRange","outOfRange"),c.call(this,o);function l(h){NCe(n.color)&&!h.inRange&&(h.inRange={color:n.color.slice().reverse()}),h.inRange=h.inRange||{color:t.get("gradientColor")}}function u(h,f,d){var p=h[f],g=h[d];p&&!g&&(g=h[d]={},gB(p,function(v,m){if(Fr.isValidType(m)){var y=kW.get(m,"inactive",s);y!=null&&(g[m]=y,m==="color"&&!g.hasOwnProperty("opacity")&&!g.hasOwnProperty("colorAlpha")&&(g.opacity=[0,0]))}}))}function c(h){var f=(h.inRange||{}).symbol||(h.outOfRange||{}).symbol,d=(h.inRange||{}).symbolSize||(h.outOfRange||{}).symbolSize,p=this.get("inactiveColor"),g=this.getItemSymbol(),v=g||"roundRect";gB(this.stateList,function(m){var y=this.itemSize,_=h[m];_||(_=h[m]={color:s?p:[p]}),_.symbol==null&&(_.symbol=f&&Je(f)||(s?v:[v])),_.symbolSize==null&&(_.symbolSize=d&&Je(d)||(s?y[0]:[y[0],y[0]])),_.symbol=vB(_.symbol,function(A){return A==="none"?v:A});var x=_.symbolSize;if(x!=null){var S=-1/0;ICe(x,function(A){A>S&&(S=A)}),_.symbolSize=vB(x,function(A){return OCe(A,[0,S],[0,y[0]],!0)})}},this)}},e.prototype.resetItemSize=function(){this.itemSize=[parseFloat(this.get("itemWidth")),parseFloat(this.get("itemHeight"))]},e.prototype.isCategory=function(){return!!this.option.categories},e.prototype.setSelected=function(t){},e.prototype.getSelected=function(){return null},e.prototype.getValueState=function(t){return null},e.prototype.getVisualMeta=function(t){return null},e.type="visualMap",e.dependencies=["series"],e.defaultOption={show:!0,z:4,seriesIndex:"all",min:0,max:200,left:0,right:null,top:null,bottom:0,itemWidth:null,itemHeight:null,inverse:!1,orient:"vertical",backgroundColor:"rgba(0,0,0,0)",borderColor:"#ccc",contentColor:"#5793f3",inactiveColor:"#aaa",borderWidth:0,padding:5,textGap:10,precision:0,textStyle:{color:"#333"}},e}(Nt);const B_=FCe;var mB=[20,140],BCe=function(r){ae(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(i){i.mappingMethod="linear",i.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]=mB[0]),(t[1]==null||isNaN(t[1]))&&(t[1]=mB[1])},e.prototype._resetRange=function(){var t=this.getExtent(),n=this.option.range;!n||n.auto?(t.auto=1,this.option.range=t):_e(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),k(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=Pa((this.get("range")||[]).slice());return n[0]>t[1]&&(n[0]=t[1]),n[1]>t[1]&&(n[1]=t[1]),n[0]<t[0]&&(n[0]=t[0]),n[1]<t[0]&&(n[1]=t[0]),n},e.prototype.getValueState=function(t){var n=this.option.range,i=this.getExtent();return(n[0]<=i[0]||n[0]<=t)&&(n[1]>=i[1]||t<=n[1])?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[];return this.eachTargetSeries(function(i){var a=[],o=i.getData();o.each(this.getDataDimensionIndex(o),function(s,l){t[0]<=s&&s<=t[1]&&a.push(l)},this),n.push({seriesId:i.id,dataIndex:a})},this),n},e.prototype.getVisualMeta=function(t){var n=yB(this,"outOfRange",this.getExtent()),i=yB(this,"inRange",this.option.range.slice()),a=[];function o(d,p){a.push({value:d,color:t(d,p)})}for(var s=0,l=0,u=i.length,c=n.length;l<c&&(!i.length||n[l]<=i[0]);l++)n[l]<i[s]&&o(n[l],"outOfRange");for(var h=1;s<u;s++,h=0)h&&a.length&&o(i[s],"outOfRange"),o(i[s],"inRange");for(var h=1;l<c;l++)(!i.length||i[i.length-1]<n[l])&&(h&&(a.length&&o(a[a.length-1].value,"outOfRange"),h=0),o(n[l],"outOfRange"));var f=a.length;return{stops:a,outerColors:[f?a[0].color:"transparent",f?a[f-1].color:"transparent"]}},e.type="visualMap.continuous",e.defaultOption=su(B_.defaultOption,{align:"auto",calculable:!1,hoverLink:!0,realtime:!0,handleIcon:"path://M-11.39,9.77h0a3.5,3.5,0,0,1-3.5,3.5h-22a3.5,3.5,0,0,1-3.5-3.5h0a3.5,3.5,0,0,1,3.5-3.5h22A3.5,3.5,0,0,1-11.39,9.77Z",handleSize:"120%",handleStyle:{borderColor:"#fff",borderWidth:1},indicatorIcon:"circle",indicatorSize:"50%",indicatorStyle:{borderColor:"#fff",borderWidth:2,shadowBlur:2,shadowOffsetX:1,shadowOffsetY:1,shadowColor:"rgba(0,0,0,0.2)"}}),e}(B_);function yB(r,e,t){if(t[0]===t[1])return t.slice();for(var n=200,i=(t[1]-t[0])/n,a=t[0],o=[],s=0;s<=n&&a<t[1];s++)o.push(a),a+=i;return o.push(t[1]),o}const zCe=BCe;var UCe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t.autoPositionValues={left:1,right:1,top:1,bottom:1},t}return e.prototype.init=function(t,n){this.ecModel=t,this.api=n},e.prototype.render=function(t,n,i,a){if(this.visualMapModel=t,t.get("show")===!1){this.group.removeAll();return}this.doRender(t,n,i,a)},e.prototype.renderBackground=function(t){var n=this.visualMapModel,i=Sd(n.get("padding")||0),a=t.getBoundingRect();t.add(new Dt({z2:-1,silent:!0,shape:{x:a.x-i[3],y:a.y-i[0],width:a.width+i[3]+i[1],height:a.height+i[0]+i[2]},style:{fill:n.get("backgroundColor"),stroke:n.get("borderColor"),lineWidth:n.get("borderWidth")}}))},e.prototype.getControllerVisual=function(t,n,i){i=i||{};var a=i.forceState,o=this.visualMapModel,s={};if(n==="color"){var l=o.get("contentColor");s.color=l}function u(d){return s[d]}function c(d,p){s[d]=p}var h=o.controllerVisuals[a||o.getValueState(t)],f=Fr.prepareVisualTypes(h);return k(f,function(d){var p=h[d];i.convertOpacityToAlpha&&d==="opacity"&&(d="colorAlpha",p=h.__alphaForOpacity),Fr.dependsOn(d,n)&&p&&p.applyVisual(t,u,c)}),s[n]},e.prototype.positionGroup=function(t){var n=this.visualMapModel,i=this.api;k1(t,n.getBoxLayoutParams(),{width:i.getWidth(),height:i.getHeight()})},e.prototype.doRender=function(t,n,i,a){},e.type="visualMap",e}(kn);const OW=UCe;var _B=[["left","right","width"],["top","bottom","height"]];function FW(r,e,t){var n=r.option,i=n.align;if(i!=null&&i!=="auto")return i;for(var a={width:e.getWidth(),height:e.getHeight()},o=n.orient==="horizontal"?1:0,s=_B[o],l=[0,null,10],u={},c=0;c<3;c++)u[_B[1-o][c]]=l[c],u[s[c]]=c===2?t[0]:n[s[c]];var h=[["x","width",3],["y","height",0]][o],f=dr(u,a,n.padding);return s[(f.margin[h[2]]||0)+f[h[0]]+f[h[1]]*.5<a[h[1]]*.5?0:1]}function m0(r,e){return k(r||[],function(t){t.dataIndex!=null&&(t.dataIndexInside=t.dataIndex,t.dataIndex=null),t.highlightKey="visualMap"+(e?e.componentIndex:"")}),r}var wo=Kt,VCe=k,xB=Math.min,Gw=Math.max,GCe=12,HCe=6,WCe=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type=e.type,t._shapes={},t._dataInterval=[],t._handleEnds=[],t._hoverLinkDataIndices=[],t}return e.prototype.init=function(t,n){r.prototype.init.call(this,t,n),this._hoverLinkFromSeriesMouseOver=Fe(this._hoverLinkFromSeriesMouseOver,this),this._hideIndicator=Fe(this._hideIndicator,this)},e.prototype.doRender=function(t,n,i,a){(!a||a.type!=="selectDataRange"||a.from!==this.uid)&&this._buildView()},e.prototype._buildView=function(){this.group.removeAll();var t=this.visualMapModel,n=this.group;this._orient=t.get("orient"),this._useHandle=t.get("calculable"),this._resetInterval(),this._renderBar(n);var i=t.get("text");this._renderEndsText(n,i,0),this._renderEndsText(n,i,1),this._updateView(!0),this.renderBackground(n),this._updateView(),this._enableHoverLinkToSeries(),this._enableHoverLinkFromSeries(),this.positionGroup(n)},e.prototype._renderEndsText=function(t,n,i){if(n){var a=n[1-i];a=a!=null?a+"":"";var o=this.visualMapModel,s=o.get("textGap"),l=o.itemSize,u=this._shapes.mainGroup,c=this._applyTransform([l[0]/2,i===0?-s:l[1]+s],u),h=this._applyTransform(i===0?"bottom":"top",u),f=this._orient,d=this.visualMapModel.textStyleModel;this.group.add(new Ot({style:pn(d,{x:c[0],y:c[1],verticalAlign:f==="horizontal"?"middle":h,align:f==="horizontal"?h:"center",text:a})}))}},e.prototype._renderBar=function(t){var n=this.visualMapModel,i=this._shapes,a=n.itemSize,o=this._orient,s=this._useHandle,l=FW(n,this.api,a),u=i.mainGroup=this._createBarGroup(l),c=new rt;u.add(c),c.add(i.outOfRange=SB()),c.add(i.inRange=SB(null,s?wB(this._orient):null,Fe(this._dragHandle,this,"all",!1),Fe(this._dragHandle,this,"all",!0))),c.setClipPath(new Dt({shape:{x:0,y:0,width:a[0],height:a[1],r:3}}));var h=n.textStyleModel.getTextRect("国"),f=Gw(h.width,h.height);s&&(i.handleThumbs=[],i.handleLabels=[],i.handleLabelPoints=[],this._createHandle(n,u,0,a,f,o),this._createHandle(n,u,1,a,f,o)),this._createIndicator(n,u,a,f,o),t.add(u)},e.prototype._createHandle=function(t,n,i,a,o,s){var l=Fe(this._dragHandle,this,i,!1),u=Fe(this._dragHandle,this,i,!0),c=so(t.get("handleSize"),a[0]),h=rr(t.get("handleIcon"),-c/2,-c/2,c,c,null,!0),f=wB(this._orient);h.attr({cursor:f,draggable:!0,drift:l,ondragend:u,onmousemove:function(m){Ps(m.event)}}),h.x=a[0]/2,h.useStyle(t.getModel("handleStyle").getItemStyle()),h.setStyle({strokeNoScale:!0,strokeFirst:!0}),h.style.lineWidth*=2,h.ensureState("emphasis").style=t.getModel(["emphasis","handleStyle"]).getItemStyle(),oc(h,!0),n.add(h);var d=this.visualMapModel.textStyleModel,p=new Ot({cursor:f,draggable:!0,drift:l,onmousemove:function(m){Ps(m.event)},ondragend:u,style:pn(d,{x:0,y:0,text:""})});p.ensureState("blur").style={opacity:.1},p.stateTransition={duration:200},this.group.add(p);var g=[c,0],v=this._shapes;v.handleThumbs[i]=h,v.handleLabelPoints[i]=g,v.handleLabels[i]=p},e.prototype._createIndicator=function(t,n,i,a,o){var s=so(t.get("indicatorSize"),i[0]),l=rr(t.get("indicatorIcon"),-s/2,-s/2,s,s,null,!0);l.attr({cursor:"move",invisible:!0,silent:!0,x:i[0]/2});var u=t.getModel("indicatorStyle").getItemStyle();if(l instanceof Ur){var c=l.style;l.useStyle(pe({image:c.image,x:c.x,y:c.y,width:c.width,height:c.height},u))}else l.useStyle(u);n.add(l);var h=this.visualMapModel.textStyleModel,f=new Ot({silent:!0,invisible:!0,style:pn(h,{x:0,y:0,text:""})});this.group.add(f);var d=[(o==="horizontal"?a/2:HCe)+i[0]/2,0],p=this._shapes;p.indicator=l,p.indicatorLabel=f,p.indicatorLabelPoint=d,this._firstShowIndicator=!0},e.prototype._dragHandle=function(t,n,i,a){if(this._useHandle){if(this._dragging=!n,!n){var o=this._applyTransform([i,a],this._shapes.mainGroup,!0);this._updateInterval(t,o[1]),this._hideIndicator(),this._updateView()}n===!this.visualMapModel.get("realtime")&&this.api.dispatchAction({type:"selectDataRange",from:this.uid,visualMapId:this.visualMapModel.id,selected:this._dataInterval.slice()}),n?!this._hovering&&this._clearHoverLinkToSeries():AB(this.visualMapModel)&&this._doHoverLinkToSeries(this._handleEnds[t],!1)}},e.prototype._resetInterval=function(){var t=this.visualMapModel,n=this._dataInterval=t.getSelected(),i=t.getExtent(),a=[0,t.itemSize[1]];this._handleEnds=[wo(n[0],i,a,!0),wo(n[1],i,a,!0)]},e.prototype._updateInterval=function(t,n){n=n||0;var i=this.visualMapModel,a=this._handleEnds,o=[0,i.itemSize[1]];rh(n,a,o,t,0);var s=i.getExtent();this._dataInterval=[wo(a[0],o,s,!0),wo(a[1],o,s,!0)]},e.prototype._updateView=function(t){var n=this.visualMapModel,i=n.getExtent(),a=this._shapes,o=[0,n.itemSize[1]],s=t?o:this._handleEnds,l=this._createBarVisual(this._dataInterval,i,s,"inRange"),u=this._createBarVisual(i,i,o,"outOfRange");a.inRange.setStyle({fill:l.barColor}).setShape("points",l.barPoints),a.outOfRange.setStyle({fill:u.barColor}).setShape("points",u.barPoints),this._updateHandle(s,l)},e.prototype._createBarVisual=function(t,n,i,a){var o={forceState:a,convertOpacityToAlpha:!0},s=this._makeColorGradient(t,o),l=[this.getControllerVisual(t[0],"symbolSize",o),this.getControllerVisual(t[1],"symbolSize",o)],u=this._createBarPoints(i,l);return{barColor:new Ul(0,0,0,1,s),barPoints:u,handlesColor:[s[0].color,s[s.length-1].color]}},e.prototype._makeColorGradient=function(t,n){var i=100,a=[],o=(t[1]-t[0])/i;a.push({color:this.getControllerVisual(t[0],"color",n),offset:0});for(var s=1;s<i;s++){var l=t[0]+o*s;if(l>t[1])break;a.push({color:this.getControllerVisual(l,"color",n),offset:s/i})}return a.push({color:this.getControllerVisual(t[1],"color",n),offset:1}),a},e.prototype._createBarPoints=function(t,n){var i=this.visualMapModel.itemSize;return[[i[0]-n[0],t[0]],[i[0],t[0]],[i[0],t[1]],[i[0]-n[1],t[1]]]},e.prototype._createBarGroup=function(t){var n=this._orient,i=this.visualMapModel.get("inverse");return new rt(n==="horizontal"&&!i?{scaleX:t==="bottom"?1:-1,rotation:Math.PI/2}:n==="horizontal"&&i?{scaleX:t==="bottom"?-1:1,rotation:-Math.PI/2}:n==="vertical"&&!i?{scaleX:t==="left"?1:-1,scaleY:-1}:{scaleX:t==="left"?1:-1})},e.prototype._updateHandle=function(t,n){if(this._useHandle){var i=this._shapes,a=this.visualMapModel,o=i.handleThumbs,s=i.handleLabels,l=a.itemSize,u=a.getExtent(),c=this._applyTransform("left",i.mainGroup);VCe([0,1],function(h){var f=o[h];f.setStyle("fill",n.handlesColor[h]),f.y=t[h];var d=wo(t[h],[0,l[1]],u,!0),p=this.getControllerVisual(d,"symbolSize");f.scaleX=f.scaleY=p/l[0],f.x=l[0]-p/2;var g=io(i.handleLabelPoints[h],Lc(f,this.group));if(this._orient==="horizontal"){var v=c==="left"||c==="top"?(l[0]-p)/2:(l[0]-p)/-2;g[1]+=v}s[h].setStyle({x:g[0],y:g[1],text:a.formatValueText(this._dataInterval[h]),verticalAlign:"middle",align:this._orient==="vertical"?this._applyTransform("left",i.mainGroup):"center"})},this)}},e.prototype._showIndicator=function(t,n,i,a){var o=this.visualMapModel,s=o.getExtent(),l=o.itemSize,u=[0,l[1]],c=this._shapes,h=c.indicator;if(h){h.attr("invisible",!1);var f={convertOpacityToAlpha:!0},d=this.getControllerVisual(t,"color",f),p=this.getControllerVisual(t,"symbolSize"),g=wo(t,s,u,!0),v=l[0]-p/2,m={x:h.x,y:h.y};h.y=g,h.x=v;var y=io(c.indicatorLabelPoint,Lc(h,this.group)),_=c.indicatorLabel;_.attr("invisible",!1);var x=this._applyTransform("left",c.mainGroup),S=this._orient,A=S==="horizontal";_.setStyle({text:(i||"")+o.formatValueText(n),verticalAlign:A?x:"middle",align:A?"center":x});var w={x:v,y:g,style:{fill:d}},M={style:{x:y[0],y:y[1]}};if(o.ecModel.isAnimationEnabled()&&!this._firstShowIndicator){var C={duration:100,easing:"cubicInOut",additive:!0};h.x=m.x,h.y=m.y,h.animateTo(w,C),_.animateTo(M,C)}else h.attr(w),_.attr(M);this._firstShowIndicator=!1;var b=this._shapes.handleLabels;if(b)for(var T=0;T<b.length;T++)this.api.enterBlur(b[T])}},e.prototype._enableHoverLinkToSeries=function(){var t=this;this._shapes.mainGroup.on("mousemove",function(n){if(t._hovering=!0,!t._dragging){var i=t.visualMapModel.itemSize,a=t._applyTransform([n.offsetX,n.offsetY],t._shapes.mainGroup,!0,!0);a[1]=xB(Gw(0,a[1]),i[1]),t._doHoverLinkToSeries(a[1],0<=a[0]&&a[0]<=i[0])}}).on("mouseout",function(){t._hovering=!1,!t._dragging&&t._clearHoverLinkToSeries()})},e.prototype._enableHoverLinkFromSeries=function(){var t=this.api.getZr();this.visualMapModel.option.hoverLink?(t.on("mouseover",this._hoverLinkFromSeriesMouseOver,this),t.on("mouseout",this._hideIndicator,this)):this._clearHoverLinkFromSeries()},e.prototype._doHoverLinkToSeries=function(t,n){var i=this.visualMapModel,a=i.itemSize;if(i.option.hoverLink){var o=[0,a[1]],s=i.getExtent();t=xB(Gw(o[0],t),o[1]);var l=$Ce(i,s,o),u=[t-l,t+l],c=wo(t,o,s,!0),h=[wo(u[0],o,s,!0),wo(u[1],o,s,!0)];u[0]<o[0]&&(h[0]=-1/0),u[1]>o[1]&&(h[1]=1/0),n&&(h[0]===-1/0?this._showIndicator(c,h[1],"< ",l):h[1]===1/0?this._showIndicator(c,h[0],"> ",l):this._showIndicator(c,c,"≈ ",l));var f=this._hoverLinkDataIndices,d=[];(n||AB(i))&&(d=this._hoverLinkDataIndices=i.findTargetDataIndices(h));var p=Dse(f,d);this._dispatchHighDown("downplay",m0(p[0],i)),this._dispatchHighDown("highlight",m0(p[1],i))}},e.prototype._hoverLinkFromSeriesMouseOver=function(t){var n;if(lc(t.target,function(l){var u=at(l);if(u.dataIndex!=null)return n=u,!0},!0),!!n){var i=this.ecModel.getSeriesByIndex(n.seriesIndex),a=this.visualMapModel;if(a.isTargetSeries(i)){var o=i.getData(n.dataType),s=o.getStore().get(a.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 i=0;i<n.length;i++)this.api.leaveBlur(n[i])},e.prototype._clearHoverLinkToSeries=function(){this._hideIndicator();var t=this._hoverLinkDataIndices;this._dispatchHighDown("downplay",m0(t,this.visualMapModel)),t.length=0},e.prototype._clearHoverLinkFromSeries=function(){this._hideIndicator();var t=this.api.getZr();t.off("mouseover",this._hoverLinkFromSeriesMouseOver),t.off("mouseout",this._hideIndicator)},e.prototype._applyTransform=function(t,n,i,a){var o=Lc(n,a?null:this.group);return _e(t)?io(t,o,i):E1(t,o,i)},e.prototype._dispatchHighDown=function(t,n){n&&n.length&&this.api.dispatchAction({type:t,batch:n})},e.prototype.dispose=function(){this._clearHoverLinkFromSeries(),this._clearHoverLinkToSeries()},e.type="visualMap.continuous",e}(OW);function SB(r,e,t,n){return new zi({shape:{points:r},draggable:!!t,cursor:e,drift:t,onmousemove:function(i){Ps(i.event)},ondragend:n})}function $Ce(r,e,t){var n=GCe/2,i=r.get("hoverLinkDataSize");return i&&(n=wo(i,e,t,!0)/2),n}function AB(r){var e=r.get("hoverLinkOnHandle");return!!(e==null?r.get("realtime"):e)}function wB(r){return r==="vertical"?"ns-resize":"ew-resize"}const XCe=WCe;var YCe={type:"selectDataRange",event:"dataRangeSelected",update:"update"},qCe=function(r,e){e.eachComponent({mainType:"visualMap",query:r},function(t){t.setSelected(r.selected)})},jCe=[{createOnAllSeries:!0,reset:function(r,e){var t=[];return e.eachComponent("visualMap",function(n){var i=r.pipelineContext;!n.isTargetSeries(r)||i&&i.large||t.push(HTe(n.stateList,n.targetVisuals,Fe(n.getValueState,n),n.getDataDimensionIndex(r.getData())))}),t}},{createOnAllSeries:!0,reset:function(r,e){var t=r.getData(),n=[];e.eachComponent("visualMap",function(i){if(i.isTargetSeries(r)){var a=i.getVisualMeta(Fe(KCe,null,r,i))||{stops:[],outerColors:[]},o=i.getDataDimensionIndex(t);o>=0&&(a.dimension=o,n.push(a))}}),r.getData().setVisual("visualMeta",n)}}];function KCe(r,e,t,n){for(var i=e.targetVisuals[n],a=Fr.prepareVisualTypes(i),o={color:Lg(r.getData(),"color")},s=0,l=a.length;s<l;s++){var u=a[s],c=i[u==="opacity"?"__alphaForOpacity":u];c&&c.applyVisual(t,h,f)}return o.color;function h(d){return o[d]}function f(d,p){o[d]=p}}var bB=k;function ZCe(r){var e=r&&r.visualMap;_e(e)||(e=e?[e]:[]),bB(e,function(t){if(t){jh(t,"splitList")&&!jh(t,"pieces")&&(t.pieces=t.splitList,delete t.splitList);var n=t.pieces;n&&_e(n)&&bB(n,function(i){Qe(i)&&(jh(i,"start")&&!jh(i,"min")&&(i.min=i.start),jh(i,"end")&&!jh(i,"max")&&(i.max=i.end))})}})}function jh(r,e){return r&&r.hasOwnProperty&&r.hasOwnProperty(e)}var TB=!1;function BW(r){TB||(TB=!0,r.registerSubTypeDefaulter("visualMap",function(e){return!e.categories&&(!(e.pieces?e.pieces.length>0:e.splitNumber>0)||e.calculable)?"continuous":"piecewise"}),r.registerAction(YCe,qCe),k(jCe,function(e){r.registerVisual(r.PRIORITY.VISUAL.COMPONENT,e)}),r.registerPreprocessor(ZCe))}function zW(r){r.registerComponentModel(zCe),r.registerComponentView(XCe),BW(r)}var QCe=function(r){ae(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 i=this._mode=this._determineMode();this._pieceList=[],JCe[this._mode].call(this,this._pieceList),this._resetSelected(t,n);var a=this.option.categories;this.resetVisual(function(o,s){i==="categories"?(o.mappingMethod="category",o.categories=Je(a)):(o.dataExtent=this.getExtent(),o.mappingMethod="piecewise",o.pieceList=xe(this._pieceList,function(l){return l=Je(l),s!=="inRange"&&(l.visual=null),l}))})},e.prototype.completeVisualOption=function(){var t=this.option,n={},i=Fr.listVisualTypes(),a=this.isCategory();k(t.pieces,function(s){k(i,function(l){s.hasOwnProperty(l)&&(n[l]=1)})}),k(n,function(s,l){var u=!1;k(this.stateList,function(c){u=u||o(t,c,l)||o(t.target,c,l)},this),!u&&k(this.stateList,function(c){(t[c]||(t[c]={}))[l]=kW.get(l,c==="inRange"?"active":"inactive",a)})},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 i=this.option,a=this._pieceList,o=(n?i:t).selected||{};if(i.selected=o,k(a,function(l,u){var c=this.getSelectedMapKey(l);o.hasOwnProperty(c)||(o[c]=!0)},this),i.selectedMode==="single"){var s=!1;k(a,function(l,u){var c=this.getSelectedMapKey(l);o[c]&&(s?o[c]=!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=Je(t)},e.prototype.getValueState=function(t){var n=Fr.findPieceIndex(t,this._pieceList);return n!=null&&this.option.selected[this.getSelectedMapKey(this._pieceList[n])]?"inRange":"outOfRange"},e.prototype.findTargetDataIndices=function(t){var n=[],i=this._pieceList;return this.eachTargetSeries(function(a){var o=[],s=a.getData();s.each(this.getDataDimensionIndex(s),function(l,u){var c=Fr.findPieceIndex(l,i);c===t&&o.push(u)},this),n.push({seriesId:a.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 i=t.interval||[];n=i[0]===-1/0&&i[1]===1/0?0:(i[0]+i[1])/2}return n},e.prototype.getVisualMeta=function(t){if(this.isCategory())return;var n=[],i=["",""],a=this;function o(c,h){var f=a.getRepresentValue({interval:c});h||(h=a.getValueState(f));var d=t(f,h);c[0]===-1/0?i[0]=d:c[1]===1/0?i[1]=d:n.push({value:c[0],color:d},{value:c[1],color:d})}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 k(s,function(c){var h=c.interval;h&&(h[0]>u&&o([u,h[0]],"outOfRange"),o(h.slice()),u=h[1])},this),{stops:n,outerColors:i}},e.type="visualMap.piecewise",e.defaultOption=su(B_.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}(B_),JCe={splitNumber:function(r){var e=this.option,t=Math.min(e.precision,20),n=this.getExtent(),i=e.splitNumber;i=Math.max(parseInt(i,10),1),e.splitNumber=i;for(var a=(n[1]-n[0])/i;+a.toFixed(t)!==a&&t<5;)t++;e.precision=t,a=+a.toFixed(t),e.minOpen&&r.push({interval:[-1/0,n[0]],close:[0,0]});for(var o=0,s=n[0];o<i;s+=a,o++){var l=o===i-1?n[1]:s+a;r.push({interval:[s,l],close:[1,1]})}e.maxOpen&&r.push({interval:[n[1],1/0],close:[0,0]}),mI(r),k(r,function(u,c){u.index=c,u.text=this.formatValueText(u.interval)},this)},categories:function(r){var e=this.option;k(e.categories,function(t){r.push({text:this.formatValueText(t,!0),value:t})},this),MB(e,r)},pieces:function(r){var e=this.option;k(e.pieces,function(t,n){Qe(t)||(t={value:t});var i={text:"",index:n};if(t.label!=null&&(i.text=t.label),t.hasOwnProperty("value")){var a=i.value=t.value;i.interval=[a,a],i.close=[1,1]}else{for(var o=i.interval=[],s=i.close=[0,0],l=[1,0,1],u=[-1/0,1/0],c=[],h=0;h<2;h++){for(var f=[["gte","gt","min"],["lte","lt","max"]][h],d=0;d<3&&o[h]==null;d++)o[h]=t[f[d]],s[h]=l[d],c[h]=d===2;o[h]==null&&(o[h]=u[h])}c[0]&&o[1]===1/0&&(s[0]=0),c[1]&&o[0]===-1/0&&(s[1]=0),o[0]===o[1]&&s[0]&&s[1]&&(i.value=o[0])}i.visual=Fr.retrieveVisuals(t),r.push(i)},this),MB(e,r),mI(r),k(r,function(t){var n=t.close,i=[["<","≤"][n[1]],[">","≥"][n[0]]];t.text=t.text||this.formatValueText(t.value!=null?t.value:t.interval,!1,i)},this)}};function MB(r,e){var t=r.inverse;(r.orient==="vertical"?!t:t)&&e.reverse()}const e2e=QCe;var t2e=function(r){ae(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,i=n.get("textGap"),a=n.textStyleModel,o=a.getFont(),s=a.getTextColor(),l=this._getItemAlign(),u=n.itemSize,c=this._getViewData(),h=c.endsText,f=Mr(n.get("showLabel",!0),!h),d=!n.get("selectedMode");h&&this._renderEndsText(t,h[0],u,f,l),k(c.viewPieceList,function(p){var g=p.piece,v=new rt;v.onclick=Fe(this._onItemClick,this,g),this._enableHoverLink(v,p.indexInModelPieceList);var m=n.getRepresentValue(g);if(this._createItemSymbol(v,m,[0,0,u[0],u[1]],d),f){var y=this.visualMapModel.getValueState(m);v.add(new Ot({style:{x:l==="right"?-i:u[0]+i,y:u[1]/2,text:g.text,verticalAlign:"middle",align:l,font:o,fill:s,opacity:y==="outOfRange"?.5:1},silent:d}))}t.add(v)},this),h&&this._renderEndsText(t,h[1],u,f,l),Pc(n.get("orient"),t,n.get("itemGap")),this.renderBackground(t),this.positionGroup(t)},e.prototype._enableHoverLink=function(t,n){var i=this;t.on("mouseover",function(){return a("highlight")}).on("mouseout",function(){return a("downplay")});var a=function(o){var s=i.visualMapModel;s.option.hoverLink&&i.api.dispatchAction({type:o,batch:m0(s.findTargetDataIndices(n),s)})}},e.prototype._getItemAlign=function(){var t=this.visualMapModel,n=t.option;if(n.orient==="vertical")return FW(t,this.api,t.itemSize);var i=n.align;return(!i||i==="auto")&&(i="left"),i},e.prototype._renderEndsText=function(t,n,i,a,o){if(n){var s=new rt,l=this.visualMapModel.textStyleModel;s.add(new Ot({style:pn(l,{x:a?o==="right"?i[0]:0:i[0]/2,y:i[1]/2,verticalAlign:"middle",align:a?o:"center",text:n})})),t.add(s)}},e.prototype._getViewData=function(){var t=this.visualMapModel,n=xe(t.getPieceList(),function(s,l){return{piece:s,indexInModelPieceList:l}}),i=t.get("text"),a=t.get("orient"),o=t.get("inverse");return(a==="horizontal"?o:!o)?n.reverse():i&&(i=i.slice().reverse()),{viewPieceList:n,endsText:i}},e.prototype._createItemSymbol=function(t,n,i,a){var o=rr(this.getControllerVisual(n,"symbol"),i[0],i[1],i[2],i[3],this.getControllerVisual(n,"color"));o.silent=a,t.add(o)},e.prototype._onItemClick=function(t){var n=this.visualMapModel,i=n.option,a=i.selectedMode;if(a){var o=Je(i.selected),s=n.getSelectedMapKey(t);a==="single"||a===!0?(o[s]=!0,k(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}(OW);const n2e=t2e;function UW(r){r.registerComponentModel(e2e),r.registerComponentView(n2e),BW(r)}function r2e(r){gt(zW),gt(UW)}var i2e={label:{enabled:!0},decal:{show:!1}},CB=Pt(),a2e={};function o2e(r,e){var t=r.getModel("aria");if(!t.get("enabled"))return;var n=Je(i2e);ht(n.label,r.getLocaleModel().get("aria"),!1),ht(t.option,n,!1),i(),a();function i(){var u=t.getModel("decal"),c=u.get("show");if(c){var h=He();r.eachSeries(function(f){if(!f.isColorBySeries()){var d=h.get(f.type);d||(d={},h.set(f.type,d)),CB(f).scope=d}}),r.eachRawSeries(function(f){if(r.isSeriesFiltered(f))return;if(qe(f.enableAriaDecal)){f.enableAriaDecal();return}var d=f.getData();if(f.isColorBySeries()){var y=PT(f.ecModel,f.name,a2e,r.getSeriesCount()),_=d.getVisual("decal");d.setVisual("decal",x(_,y))}else{var p=f.getRawData(),g={},v=CB(f).scope;d.each(function(S){var A=d.getRawIndex(S);g[A]=S});var m=p.count();p.each(function(S){var A=g[S],w=p.getName(S)||S+"",M=PT(f.ecModel,w,v,m),C=d.getItemVisual(A,"decal");d.setItemVisual(A,"decal",x(C,M))})}function x(S,A){var w=S?pe(pe({},A),S):A;return w.dirty=!0,w}})}}function a(){var u=e.getZr().dom;if(u){var c=r.getLocaleModel().get("aria"),h=t.getModel("label");if(h.option=Ke(h.option,c),!!h.get("enabled")){if(u.setAttribute("role","img"),h.get("description")){u.setAttribute("aria-label",h.get("description"));return}var f=r.getSeriesCount(),d=h.get(["data","maxCount"])||10,p=h.get(["series","maxCount"])||10,g=Math.min(f,p),v;if(!(f<1)){var m=s();if(m){var y=h.get(["general","withTitle"]);v=o(y,{title:m})}else v=h.get(["general","withoutTitle"]);var _=[],x=f>1?h.get(["series","multiple","prefix"]):h.get(["series","single","prefix"]);v+=o(x,{seriesCount:f}),r.eachSeries(function(M,C){if(C<g){var b=void 0,T=M.get("name"),P=T?"withName":"withoutName";b=f>1?h.get(["series","multiple",P]):h.get(["series","single",P]),b=o(b,{seriesId:M.seriesIndex,seriesName:M.get("name"),seriesType:l(M.subType)});var D=M.getData();if(D.count()>d){var L=h.get(["data","partialData"]);b+=o(L,{displayCnt:d})}else b+=h.get(["data","allData"]);for(var E=h.get(["data","separator","middle"]),I=h.get(["data","separator","end"]),N=h.get(["data","excludeDimensionId"]),R=[],F=0;F<D.count();F++)if(F<d){var O=D.getName(F),V=N?jt(D.getValues(F),function(Q,W){return pt(N,W)===-1}):D.getValues(F),H=h.get(["data",O?"withName":"withoutName"]);R.push(o(H,{name:O,value:V.join(E)}))}b+=R.join(E)+I,_.push(b)}});var S=h.getModel(["series","multiple","separator"]),A=S.get("middle"),w=S.get("end");v+=_.join(A)+w,u.setAttribute("aria-label",v)}}}}function o(u,c){if(!ke(u))return u;var h=u;return k(c,function(f,d){h=h.replace(new RegExp("\\{\\s*"+d+"\\s*\\}","g"),f)}),h}function s(){var u=r.get("title");return u&&u.length&&(u=u[0]),u&&u.text}function l(u){var c=r.getLocaleModel().get(["series","typeNames"]);return c[u]||c.chart}}function s2e(r){if(!(!r||!r.aria)){var e=r.aria;e.show!=null&&(e.enabled=e.show),e.label=e.label||{},k(["description","general","series","data"],function(t){e[t]!=null&&(e.label[t]=e[t])})}}function l2e(r){r.registerPreprocessor(s2e),r.registerVisual(r.PRIORITY.VISUAL.ARIA,o2e)}var EB={value:"eq","<":"lt","<=":"lte",">":"gt",">=":"gte","=":"eq","!=":"ne","<>":"ne"},u2e=function(){function r(e){var t=this._condVal=ke(e)?new RegExp(e):Vae(e)?e:null;if(t==null){var n="";qt(n)}}return r.prototype.evaluate=function(e){var t=typeof e;return ke(t)?this._condVal.test(e):Ft(t)?this._condVal.test(e+""):!1},r}(),c2e=function(){function r(){}return r.prototype.evaluate=function(){return this.value},r}(),h2e=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(!e[t].evaluate())return!1;return!0},r}(),f2e=function(){function r(){}return r.prototype.evaluate=function(){for(var e=this.children,t=0;t<e.length;t++)if(e[t].evaluate())return!0;return!1},r}(),d2e=function(){function r(){}return r.prototype.evaluate=function(){return!this.child.evaluate()},r}(),p2e=function(){function r(){}return r.prototype.evaluate=function(){for(var e=!!this.valueParser,t=this.getValue,n=t(this.valueGetterParam),i=e?this.valueParser(n):null,a=0;a<this.subCondList.length;a++)if(!this.subCondList[a].evaluate(e?i:n))return!1;return!0},r}();function qE(r,e){if(r===!0||r===!1){var t=new c2e;return t.value=r,t}var n="";return VW(r)||qt(n),r.and?LB("and",r,e):r.or?LB("or",r,e):r.not?v2e(r,e):g2e(r,e)}function LB(r,e,t){var n=e[r],i="";_e(n)||qt(i),n.length||qt(i);var a=r==="and"?new h2e:new f2e;return a.children=xe(n,function(o){return qE(o,t)}),a.children.length||qt(i),a}function v2e(r,e){var t=r.not,n="";VW(t)||qt(n);var i=new d2e;return i.child=qE(t,e),i.child||qt(n),i}function g2e(r,e){for(var t="",n=e.prepareGetValue(r),i=[],a=wt(r),o=r.parser,s=o?dG(o):null,l=0;l<a.length;l++){var u=a[l];if(!(u==="parser"||e.valueGetterAttrMap.get(u))){var c=ze(EB,u)?EB[u]:u,h=r[u],f=s?s(h):h,d=Yce(c,f)||c==="reg"&&new u2e(f);d||qt(t),i.push(d)}}i.length||qt(t);var p=new p2e;return p.valueGetterParam=n,p.valueParser=s,p.getValue=e.getValue,p.subCondList=i,p}function VW(r){return Qe(r)&&!ii(r)}var m2e=function(){function r(e,t){this._cond=qE(e,t)}return r.prototype.evaluate=function(){return this._cond.evaluate()},r}();function y2e(r,e){return new m2e(r,e)}var _2e={type:"echarts:filter",transform:function(r){for(var e=r.upstream,t,n=y2e(r.config,{valueGetterAttrMap:He({dimension:!0}),prepareGetValue:function(s){var l="",u=s.dimension;ze(s,"dimension")||qt(l);var c=e.getDimensionInfo(u);return c||qt(l),{dimIdx:c.index}},getValue:function(s){return e.retrieveValueFromItem(t,s.dimIdx)}}),i=[],a=0,o=e.count();a<o;a++)t=e.getRawDataItem(a),n.evaluate()&&i.push(t);return{data:i}}},x2e={type:"echarts:sort",transform:function(r){var e=r.upstream,t=r.config,n="",i=nn(t);i.length||qt(n);var a=[];k(i,function(c){var h=c.dimension,f=c.order,d=c.parser,p=c.incomparable;if(h==null&&qt(n),f!=="asc"&&f!=="desc"&&qt(n),p&&p!=="min"&&p!=="max"){var g="";qt(g)}if(f!=="asc"&&f!=="desc"){var v="";qt(v)}var m=e.getDimensionInfo(h);m||qt(n);var y=d?dG(d):null;d&&!y&&qt(n),a.push({dimIdx:m.index,parser:y,comparator:new vG(f,p)})});var o=e.sourceFormat;o!==ai&&o!==Ua&&qt(n);for(var s=[],l=0,u=e.count();l<u;l++)s.push(e.getRawDataItem(l));return s.sort(function(c,h){for(var f=0;f<a.length;f++){var d=a[f],p=e.retrieveValueFromItem(c,d.dimIdx),g=e.retrieveValueFromItem(h,d.dimIdx);d.parser&&(p=d.parser(p),g=d.parser(g));var v=d.comparator.evaluate(p,g);if(v!==0)return v}return 0}),{data:s}}};function S2e(r){r.registerTransform(_2e),r.registerTransform(x2e)}var A2e=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.prototype.init=function(t,n,i){r.prototype.init.call(this,t,n,i),this._sourceManager=new _G(this),LN(this)},e.prototype.mergeOption=function(t,n){r.prototype.mergeOption.call(this,t,n),LN(this)},e.prototype.optionUpdated=function(){this._sourceManager.dirty()},e.prototype.getSourceManager=function(){return this._sourceManager},e.type="dataset",e.defaultOption={seriesLayoutBy:Ho},e}(Nt),w2e=function(r){ae(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t.type="dataset",t}return e.type="dataset",e}(kn);function b2e(r){r.registerComponentModel(A2e),r.registerComponentView(w2e)}var So=jo.CMD;function mf(r,e){return Math.abs(r-e)<1e-5}function LM(r){var e=r.data,t=r.len(),n=[],i,a=0,o=0,s=0,l=0;function u(D,L){i&&i.length>2&&n.push(i),i=[D,L]}function c(D,L,E,I){mf(D,E)&&mf(L,I)||i.push(D,L,E,I,E,I)}function h(D,L,E,I,N,R){var F=Math.abs(L-D),O=Math.tan(F/4)*4/3,V=L<D?-1:1,H=Math.cos(D),Q=Math.sin(D),W=Math.cos(L),Z=Math.sin(L),ee=H*N+E,he=Q*R+I,le=W*N+E,re=Z*R+I,be=N*O*V,de=R*O*V;i.push(ee-be*Q,he+de*H,le+be*Z,re-de*W,le,re)}for(var f,d,p,g,v=0;v<t;){var m=e[v++],y=v===1;switch(y&&(a=e[v],o=e[v+1],s=a,l=o,(m===So.L||m===So.C||m===So.Q)&&(i=[s,l])),m){case So.M:a=s=e[v++],o=l=e[v++],u(s,l);break;case So.L:f=e[v++],d=e[v++],c(a,o,f,d),a=f,o=d;break;case So.C:i.push(e[v++],e[v++],e[v++],e[v++],a=e[v++],o=e[v++]);break;case So.Q:f=e[v++],d=e[v++],p=e[v++],g=e[v++],i.push(a+2/3*(f-a),o+2/3*(d-o),p+2/3*(f-p),g+2/3*(d-g),p,g),a=p,o=g;break;case So.A:var _=e[v++],x=e[v++],S=e[v++],A=e[v++],w=e[v++],M=e[v++]+w;v+=1;var C=!e[v++];f=Math.cos(w)*S+_,d=Math.sin(w)*A+x,y?(s=f,l=d,u(s,l)):c(a,o,f,d),a=Math.cos(M)*S+_,o=Math.sin(M)*A+x;for(var b=(C?-1:1)*Math.PI/2,T=w;C?T>M:T<M;T+=b){var P=C?Math.max(T+b,M):Math.min(T+b,M);h(T,P,_,x,S,A)}break;case So.R:s=a=e[v++],l=o=e[v++],f=s+e[v++],d=l+e[v++],u(f,l),c(f,l,f,d),c(f,d,s,d),c(s,d,s,l),c(s,l,f,l);break;case So.Z:i&&c(a,o,s,l),a=s,o=l;break}}return i&&i.length>2&&n.push(i),n}function PM(r,e,t,n,i,a,o,s,l,u){if(mf(r,t)&&mf(e,n)&&mf(i,o)&&mf(a,s)){l.push(o,s);return}var c=2/u,h=c*c,f=o-r,d=s-e,p=Math.sqrt(f*f+d*d);f/=p,d/=p;var g=t-r,v=n-e,m=i-o,y=a-s,_=g*g+v*v,x=m*m+y*y;if(_<h&&x<h){l.push(o,s);return}var S=f*g+d*v,A=-f*m-d*y,w=_-S*S,M=x-A*A;if(w<h&&S>=0&&M<h&&A>=0){l.push(o,s);return}var C=[],b=[];jl(r,t,i,o,.5,C),jl(e,n,a,s,.5,b),PM(C[0],b[0],C[1],b[1],C[2],b[2],C[3],b[3],l,u),PM(C[4],b[4],C[5],b[5],C[6],b[6],C[7],b[7],l,u)}function T2e(r,e){var t=LM(r),n=[];e=e||1;for(var i=0;i<t.length;i++){var a=t[i],o=[],s=a[0],l=a[1];o.push(s,l);for(var u=2;u<a.length;){var c=a[u++],h=a[u++],f=a[u++],d=a[u++],p=a[u++],g=a[u++];PM(s,l,c,h,f,d,p,g,o,e),s=p,l=g}n.push(o)}return n}function GW(r,e,t){var n=r[e],i=r[1-e],a=Math.abs(n/i),o=Math.ceil(Math.sqrt(a*t)),s=Math.floor(t/o);s===0&&(s=1,o=t);for(var l=[],u=0;u<o;u++)l.push(s);var c=o*s,h=t-c;if(h>0)for(var u=0;u<h;u++)l[u%o]+=1;return l}function PB(r,e,t){for(var n=r.r0,i=r.r,a=r.startAngle,o=r.endAngle,s=Math.abs(o-a),l=s*i,u=i-n,c=l>Math.abs(u),h=GW([l,u],c?0:1,e),f=(c?s:u)/h.length,d=0;d<h.length;d++)for(var p=(c?u:s)/h[d],g=0;g<h[d];g++){var v={};c?(v.startAngle=a+f*d,v.endAngle=a+f*(d+1),v.r0=n+p*g,v.r=n+p*(g+1)):(v.startAngle=a+p*g,v.endAngle=a+p*(g+1),v.r0=n+f*d,v.r=n+f*(d+1)),v.clockwise=r.clockwise,v.cx=r.cx,v.cy=r.cy,t.push(v)}}function M2e(r,e,t){for(var n=r.width,i=r.height,a=n>i,o=GW([n,i],a?0:1,e),s=a?"width":"height",l=a?"height":"width",u=a?"x":"y",c=a?"y":"x",h=r[s]/o.length,f=0;f<o.length;f++)for(var d=r[l]/o[f],p=0;p<o[f];p++){var g={};g[u]=f*h,g[c]=p*d,g[s]=h,g[l]=d,g.x+=r.x,g.y+=r.y,t.push(g)}}function RB(r,e,t,n){return r*n-t*e}function C2e(r,e,t,n,i,a,o,s){var l=t-r,u=n-e,c=o-i,h=s-a,f=RB(c,h,l,u);if(Math.abs(f)<1e-6)return null;var d=r-i,p=e-a,g=RB(d,p,c,h)/f;return g<0||g>1?null:new ft(g*l+r,g*u+e)}function E2e(r,e,t){var n=new ft;ft.sub(n,t,e),n.normalize();var i=new ft;ft.sub(i,r,e);var a=i.dot(n);return a}function Kh(r,e){var t=r[r.length-1];t&&t[0]===e[0]&&t[1]===e[1]||r.push(e)}function L2e(r,e,t){for(var n=r.length,i=[],a=0;a<n;a++){var o=r[a],s=r[(a+1)%n],l=C2e(o[0],o[1],s[0],s[1],e.x,e.y,t.x,t.y);l&&i.push({projPt:E2e(l,e,t),pt:l,idx:a})}if(i.length<2)return[{points:r},{points:r}];i.sort(function(v,m){return v.projPt-m.projPt});var u=i[0],c=i[i.length-1];if(c.idx<u.idx){var h=u;u=c,c=h}for(var f=[u.pt.x,u.pt.y],d=[c.pt.x,c.pt.y],p=[f],g=[d],a=u.idx+1;a<=c.idx;a++)Kh(p,r[a].slice());Kh(p,d),Kh(p,f);for(var a=c.idx+1;a<=u.idx+n;a++)Kh(g,r[a%n].slice());return Kh(g,f),Kh(g,d),[{points:p},{points:g}]}function DB(r){var e=r.points,t=[],n=[];A1(e,t,n);var i=new dt(t[0],t[1],n[0]-t[0],n[1]-t[1]),a=i.width,o=i.height,s=i.x,l=i.y,u=new ft,c=new ft;return a>o?(u.x=c.x=s+a/2,u.y=l,c.y=l+o):(u.y=c.y=l+o/2,u.x=s,c.x=s+a),L2e(e,u,c)}function z_(r,e,t,n){if(t===1)n.push(e);else{var i=Math.floor(t/2),a=r(e);z_(r,a[0],i,n),z_(r,a[1],t-i,n)}return n}function P2e(r,e){for(var t=[],n=0;n<e;n++)t.push(u2(r));return t}function R2e(r,e){e.setStyle(r.style),e.z=r.z,e.z2=r.z2,e.zlevel=r.zlevel}function D2e(r){for(var e=[],t=0;t<r.length;)e.push([r[t++],r[t++]]);return e}function I2e(r,e){var t=[],n=r.shape,i;switch(r.type){case"rect":M2e(n,e,t),i=Dt;break;case"sector":PB(n,e,t),i=Bi;break;case"circle":PB({r0:0,r:n.r,startAngle:0,endAngle:Math.PI*2,cx:n.cx,cy:n.cy},e,t),i=Bi;break;default:var a=r.getComputedTransform(),o=a?Math.sqrt(Math.max(a[0]*a[0]+a[1]*a[1],a[2]*a[2]+a[3]*a[3])):1,s=xe(T2e(r.getUpdatedPathProxy(),o),function(m){return D2e(m)}),l=s.length;if(l===0)z_(DB,{points:s[0]},e,t);else if(l===e)for(var u=0;u<l;u++)t.push({points:s[u]});else{var c=0,h=xe(s,function(m){var y=[],_=[];A1(m,y,_);var x=(_[1]-y[1])*(_[0]-y[0]);return c+=x,{poly:m,area:x}});h.sort(function(m,y){return y.area-m.area});for(var f=e,u=0;u<l;u++){var d=h[u];if(f<=0)break;var p=u===l-1?f:Math.ceil(d.area/c*e);p<0||(z_(DB,{points:d.poly},p,t),f-=p)}}i=zi;break}if(!i)return P2e(r,e);for(var g=[],u=0;u<t.length;u++){var v=new i;v.setShape(t[u]),R2e(r,v),g.push(v)}return g}function N2e(r,e){var t=r.length,n=e.length;if(t===n)return[r,e];for(var i=[],a=[],o=t<n?r:e,s=Math.min(t,n),l=Math.abs(n-t)/6,u=(s-2)/6,c=Math.ceil(l/u)+1,h=[o[0],o[1]],f=l,d=2;d<s;){var p=o[d-2],g=o[d-1],v=o[d++],m=o[d++],y=o[d++],_=o[d++],x=o[d++],S=o[d++];if(f<=0){h.push(v,m,y,_,x,S);continue}for(var A=Math.min(f,c-1)+1,w=1;w<=A;w++){var M=w/A;jl(p,v,y,x,M,i),jl(g,m,_,S,M,a),p=i[3],g=a[3],h.push(i[1],a[1],i[2],a[2],p,g),v=i[5],m=a[5],y=i[6],_=a[6]}f-=A-1}return o===r?[h,e]:[r,h]}function IB(r,e){for(var t=r.length,n=r[t-2],i=r[t-1],a=[],o=0;o<e.length;)a[o++]=n,a[o++]=i;return a}function k2e(r,e){for(var t,n,i,a=[],o=[],s=0;s<Math.max(r.length,e.length);s++){var l=r[s],u=e[s],c=void 0,h=void 0;l?u?(t=N2e(l,u),c=t[0],h=t[1],n=c,i=h):(h=IB(i||l,l),c=l):(c=IB(n||u,u),h=u),a.push(c),o.push(h)}return[a,o]}function NB(r){for(var e=0,t=0,n=0,i=r.length,a=0,o=i-2;a<i;o=a,a+=2){var s=r[o],l=r[o+1],u=r[a],c=r[a+1],h=s*c-u*l;e+=h,t+=(s+u)*h,n+=(l+c)*h}return e===0?[r[0]||0,r[1]||0]:[t/e/3,n/e/3,e]}function O2e(r,e,t,n){for(var i=(r.length-2)/6,a=1/0,o=0,s=r.length,l=s-2,u=0;u<i;u++){for(var c=u*6,h=0,f=0;f<s;f+=2){var d=f===0?c:(c+f-2)%l+2,p=r[d]-t[0],g=r[d+1]-t[1],v=e[f]-n[0],m=e[f+1]-n[1],y=v-p,_=m-g;h+=y*y+_*_}h<a&&(a=h,o=u)}return o}function F2e(r){for(var e=[],t=r.length,n=0;n<t;n+=2)e[n]=r[t-n-2],e[n+1]=r[t-n-1];return e}function B2e(r,e,t,n){for(var i=[],a,o=0;o<r.length;o++){var s=r[o],l=e[o],u=NB(s),c=NB(l);a==null&&(a=u[2]<0!=c[2]<0);var h=[],f=[],d=0,p=1/0,g=[],v=s.length;a&&(s=F2e(s));for(var m=O2e(s,l,u,c)*6,y=v-2,_=0;_<y;_+=2){var x=(m+_)%y+2;h[_+2]=s[x]-u[0],h[_+3]=s[x+1]-u[1]}if(h[0]=s[m]-u[0],h[1]=s[m+1]-u[1],t>0)for(var S=n/t,A=-n/2;A<=n/2;A+=S){for(var w=Math.sin(A),M=Math.cos(A),C=0,_=0;_<s.length;_+=2){var b=h[_],T=h[_+1],P=l[_]-c[0],D=l[_+1]-c[1],L=P*M-D*w,E=P*w+D*M;g[_]=L,g[_+1]=E;var I=L-b,N=E-T;C+=I*I+N*N}if(C<p){p=C,d=A;for(var R=0;R<g.length;R++)f[R]=g[R]}}else for(var F=0;F<v;F+=2)f[F]=l[F]-c[0],f[F+1]=l[F+1]-c[1];i.push({from:h,to:f,fromCp:u,toCp:c,rotation:-d})}return i}function U_(r){return r.__isCombineMorphing}var HW="__mOriginal_";function V_(r,e,t){var n=HW+e,i=r[n]||r[e];r[n]||(r[n]=r[e]);var a=t.replace,o=t.after,s=t.before;r[e]=function(){var l=arguments,u;return s&&s.apply(this,l),a?u=a.apply(this,l):u=i.apply(this,l),o&&o.apply(this,l),u}}function pv(r,e){var t=HW+e;r[t]&&(r[e]=r[t],r[t]=null)}function kB(r,e){for(var t=0;t<r.length;t++)for(var n=r[t],i=0;i<n.length;){var a=n[i],o=n[i+1];n[i++]=e[0]*a+e[2]*o+e[4],n[i++]=e[1]*a+e[3]*o+e[5]}}function WW(r,e){var t=r.getUpdatedPathProxy(),n=e.getUpdatedPathProxy(),i=k2e(LM(t),LM(n)),a=i[0],o=i[1],s=r.getComputedTransform(),l=e.getComputedTransform();function u(){this.transform=null}s&&kB(a,s),l&&kB(o,l),V_(e,"updateTransform",{replace:u}),e.transform=null;var c=B2e(a,o,10,Math.PI),h=[];V_(e,"buildPath",{replace:function(f){for(var d=e.__morphT,p=1-d,g=[],v=0;v<c.length;v++){var m=c[v],y=m.from,_=m.to,x=m.rotation*d,S=m.fromCp,A=m.toCp,w=Math.sin(x),M=Math.cos(x);Jy(g,S,A,d);for(var C=0;C<y.length;C+=2){var b=y[C],T=y[C+1],P=_[C],D=_[C+1],L=b*p+P*d,E=T*p+D*d;h[C]=L*M-E*w+g[0],h[C+1]=L*w+E*M+g[1]}var I=h[0],N=h[1];f.moveTo(I,N);for(var C=2;C<y.length;){var P=h[C++],D=h[C++],R=h[C++],F=h[C++],O=h[C++],V=h[C++];I===P&&N===D&&R===O&&F===V?f.lineTo(O,V):f.bezierCurveTo(P,D,R,F,O,V),I=O,N=V}}}})}function jE(r,e,t){if(!r||!e)return e;var n=t.done,i=t.during;WW(r,e),e.__morphT=0;function a(){pv(e,"buildPath"),pv(e,"updateTransform"),e.__morphT=-1,e.createPathProxy(),e.dirtyShape()}return e.animateTo({__morphT:1},Ke({during:function(o){e.dirtyShape(),i&&i(o)},done:function(){a(),n&&n()}},t)),e}function z2e(r,e,t,n,i,a){var o=16;r=i===t?0:Math.round(32767*(r-t)/(i-t)),e=a===n?0:Math.round(32767*(e-n)/(a-n));for(var s=0,l,u=(1<<o)/2;u>0;u/=2){var c=0,h=0;(r&u)>0&&(c=1),(e&u)>0&&(h=1),s+=u*u*(3*c^h),h===0&&(c===1&&(r=u-1-r,e=u-1-e),l=r,r=e,e=l)}return s}function G_(r){var e=1/0,t=1/0,n=-1/0,i=-1/0,a=xe(r,function(s){var l=s.getBoundingRect(),u=s.getComputedTransform(),c=l.x+l.width/2+(u?u[4]:0),h=l.y+l.height/2+(u?u[5]:0);return e=Math.min(c,e),t=Math.min(h,t),n=Math.max(c,n),i=Math.max(h,i),[c,h]}),o=xe(a,function(s,l){return{cp:s,z:z2e(s[0],s[1],e,t,n,i),path:r[l]}});return o.sort(function(s,l){return s.z-l.z}).map(function(s){return s.path})}function $W(r){return I2e(r.path,r.count)}function RM(){return{fromIndividuals:[],toIndividuals:[],count:0}}function U2e(r,e,t){var n=[];function i(S){for(var A=0;A<S.length;A++){var w=S[A];U_(w)?i(w.childrenRef()):w instanceof yt&&n.push(w)}}i(r);var a=n.length;if(!a)return RM();var o=t.dividePath||$W,s=o({path:e,count:a});if(s.length!==a)return console.error("Invalid morphing: unmatched splitted path"),RM();n=G_(n),s=G_(s);for(var l=t.done,u=t.during,c=t.individualDelay,h=new _s,f=0;f<a;f++){var d=n[f],p=s[f];p.parent=e,p.copyTransform(h),c||WW(d,p)}e.__isCombineMorphing=!0,e.childrenRef=function(){return s};function g(S){for(var A=0;A<s.length;A++)s[A].addSelfToZr(S)}V_(e,"addSelfToZr",{after:function(S){g(S)}}),V_(e,"removeSelfFromZr",{after:function(S){for(var A=0;A<s.length;A++)s[A].removeSelfFromZr(S)}});function v(){e.__isCombineMorphing=!1,e.__morphT=-1,e.childrenRef=null,pv(e,"addSelfToZr"),pv(e,"removeSelfFromZr")}var m=s.length;if(c)for(var y=m,_=function(){y--,y===0&&(v(),l&&l())},f=0;f<m;f++){var x=c?Ke({delay:(t.delay||0)+c(f,m,n[f],s[f]),done:_},t):t;jE(n[f],s[f],x)}else e.__morphT=0,e.animateTo({__morphT:1},Ke({during:function(S){for(var A=0;A<m;A++){var w=s[A];w.__morphT=e.__morphT,w.dirtyShape()}u&&u(S)},done:function(){v();for(var S=0;S<r.length;S++)pv(r[S],"updateTransform");l&&l()}},t));return e.__zr&&g(e.__zr),{fromIndividuals:n,toIndividuals:s,count:m}}function V2e(r,e,t){var n=e.length,i=[],a=t.dividePath||$W;function o(d){for(var p=0;p<d.length;p++){var g=d[p];U_(g)?o(g.childrenRef()):g instanceof yt&&i.push(g)}}if(U_(r)){o(r.childrenRef());var s=i.length;if(s<n)for(var l=0,u=s;u<n;u++)i.push(u2(i[l++%s]));i.length=n}else{i=a({path:r,count:n});for(var c=r.getComputedTransform(),u=0;u<i.length;u++)i[u].setLocalTransform(c);if(i.length!==n)return console.error("Invalid morphing: unmatched splitted path"),RM()}i=G_(i),e=G_(e);for(var h=t.individualDelay,u=0;u<n;u++){var f=h?Ke({delay:(t.delay||0)+h(u,n,i[u],e[u])},t):t;jE(i[u],e[u],f)}return{fromIndividuals:i,toIndividuals:e,count:e.length}}function OB(r){return _e(r[0])}function FB(r,e){for(var t=[],n=r.length,i=0;i<n;i++)t.push({one:r[i],many:[]});for(var i=0;i<e.length;i++){var a=e[i].length,o=void 0;for(o=0;o<a;o++)t[o%n].many.push(e[i][o])}for(var s=0,i=n-1;i>=0;i--)if(!t[i].many.length){var l=t[s].many;if(l.length<=1)if(s)s=0;else return t;var a=l.length,u=Math.ceil(a/2);t[i].many=l.slice(u,a),t[s].many=l.slice(0,u),s++}return t}var G2e={clone:function(r){for(var e=[],t=1-Math.pow(1-r.path.style.opacity,1/r.count),n=0;n<r.count;n++){var i=u2(r.path);i.setStyle("opacity",t),e.push(i)}return e},split:null};function Hw(r,e,t,n,i,a){if(!r.length||!e.length)return;var o=yd("update",n,i);if(!(o&&o.duration>0))return;var s=n.getModel("universalTransition").get("delay"),l=Object.assign({setToFinal:!0},o),u,c;OB(r)&&(u=r,c=e),OB(e)&&(u=e,c=r);function h(m,y,_,x,S){var A=m.many,w=m.one;if(A.length===1&&!S){var M=y?A[0]:w,C=y?w:A[0];if(U_(M))h({many:[M],one:C},!0,_,x,!0);else{var b=s?Ke({delay:s(_,x)},l):l;jE(M,C,b),a(M,C,M,C,b)}}else for(var T=Ke({dividePath:G2e[t],individualDelay:s&&function(N,R,F,O){return s(N+_,x)}},l),P=y?U2e(A,w,T):V2e(w,A,T),D=P.fromIndividuals,L=P.toIndividuals,E=D.length,I=0;I<E;I++){var b=s?Ke({delay:s(I,E)},l):l;a(D[I],L[I],y?A[I]:m.one,y?m.one:A[I],b)}}for(var f=u?u===r:r.length>e.length,d=u?FB(c,u):FB(f?e:r,[f?r:e]),p=0,g=0;g<d.length;g++)p+=d[g].many.length;for(var v=0,g=0;g<d.length;g++)h(d[g],f,v,p),v+=d[g].many.length}function ju(r){if(!r)return[];if(_e(r)){for(var e=[],t=0;t<r.length;t++)e.push(ju(r[t]));return e}var n=[];return r.traverse(function(i){i instanceof yt&&!i.disableMorphing&&!i.invisible&&!i.ignore&&n.push(i)}),n}var XW=1e4,H2e=0,BB=1,zB=2,W2e=Pt();function $2e(r,e){for(var t=r.dimensions,n=0;n<t.length;n++){var i=r.getDimensionInfo(t[n]);if(i&&i.otherDims[e]===0)return t[n]}}function X2e(r,e,t){var n=r.getDimensionInfo(t),i=n&&n.ordinalMeta;if(n){var a=r.get(n.name,e);return i&&i.categories[a]||a+""}}function UB(r,e,t,n){var i=n?"itemChildGroupId":"itemGroupId",a=$2e(r,i);if(a){var o=X2e(r,e,a);return o}var s=r.getRawDataItem(e),l=n?"childGroupId":"groupId";if(s&&s[l])return s[l]+"";if(!n)return t||r.getId(e)}function VB(r){var e=[];return k(r,function(t){var n=t.data,i=t.dataGroupId;if(!(n.count()>XW))for(var a=n.getIndices(),o=0;o<a.length;o++)e.push({data:n,groupId:UB(n,o,i,!1),childGroupId:UB(n,o,i,!0),divide:t.divide,dataIndex:o})}),e}function Ww(r,e,t){r.traverse(function(n){n instanceof yt&&Tn(n,{style:{opacity:0}},e,{dataIndex:t,isFrom:!0})})}function $w(r){if(r.parent){var e=r.getComputedTransform();r.setLocalTransform(e),r.parent.remove(r)}}function Zh(r){r.stopAnimation(),r.isGroup&&r.traverse(function(e){e.stopAnimation()})}function Y2e(r,e,t){var n=yd("update",t,e);n&&r.traverse(function(i){if(i instanceof ka){var a=Mue(i);a&&i.animateFrom({style:a},n)}})}function q2e(r,e){var t=r.length;if(t!==e.length)return!1;for(var n=0;n<t;n++){var i=r[n],a=e[n];if(i.data.getId(i.dataIndex)!==a.data.getId(a.dataIndex))return!1}return!0}function YW(r,e,t){var n=VB(r),i=VB(e);function a(_,x,S,A,w){(S||_)&&x.animateFrom({style:S&&S!==_?pe(pe({},S.style),_.style):_.style},w)}var o=!1,s=H2e,l=He(),u=He();n.forEach(function(_){_.groupId&&l.set(_.groupId,!0),_.childGroupId&&u.set(_.childGroupId,!0)});for(var c=0;c<i.length;c++){var h=i[c].groupId;if(u.get(h)){s=BB;break}var f=i[c].childGroupId;if(f&&l.get(f)){s=zB;break}}function d(_,x){return function(S){var A=S.data,w=S.dataIndex;return x?A.getId(w):_?s===BB?S.childGroupId:S.groupId:s===zB?S.childGroupId:S.groupId}}var p=q2e(n,i),g={};if(!p)for(var c=0;c<i.length;c++){var v=i[c],m=v.data.getItemGraphicEl(v.dataIndex);m&&(g[m.id]=!0)}function y(_,x){var S=n[x],A=i[_],w=A.data.hostModel,M=S.data.getItemGraphicEl(S.dataIndex),C=A.data.getItemGraphicEl(A.dataIndex);if(M===C){C&&Y2e(C,A.dataIndex,w);return}M&&g[M.id]||C&&(Zh(C),M?(Zh(M),$w(M),o=!0,Hw(ju(M),ju(C),A.divide,w,_,a)):Ww(C,w,_))}new Ns(n,i,d(!0,p),d(!1,p),null,"multiple").update(y).updateManyToOne(function(_,x){var S=i[_],A=S.data,w=A.hostModel,M=A.getItemGraphicEl(S.dataIndex),C=jt(xe(x,function(b){return n[b].data.getItemGraphicEl(n[b].dataIndex)}),function(b){return b&&b!==M&&!g[b.id]});M&&(Zh(M),C.length?(k(C,function(b){Zh(b),$w(b)}),o=!0,Hw(ju(C),ju(M),S.divide,w,_,a)):Ww(M,w,S.dataIndex))}).updateOneToMany(function(_,x){var S=n[x],A=S.data.getItemGraphicEl(S.dataIndex);if(!(A&&g[A.id])){var w=jt(xe(_,function(C){return i[C].data.getItemGraphicEl(i[C].dataIndex)}),function(C){return C&&C!==A}),M=i[_[0]].data.hostModel;w.length&&(k(w,function(C){return Zh(C)}),A?(Zh(A),$w(A),o=!0,Hw(ju(A),ju(w),S.divide,M,_[0],a)):k(w,function(C){return Ww(C,M,_[0])}))}}).updateManyToMany(function(_,x){new Ns(x,_,function(S){return n[S].data.getId(n[S].dataIndex)},function(S){return i[S].data.getId(i[S].dataIndex)}).update(function(S,A){y(_[S],x[A])}).execute()}).execute(),o&&k(e,function(_){var x=_.data,S=x.hostModel,A=S&&t.getViewOfSeriesModel(S),w=yd("update",S,0);A&&S.isAnimationEnabled()&&w&&w.duration>0&&A.group.traverse(function(M){M instanceof yt&&!M.animators.length&&M.animateFrom({style:{opacity:0}},w)})})}function GB(r){var e=r.getModel("universalTransition").get("seriesKey");return e||r.id}function HB(r){return _e(r)?r.sort().join(","):r}function pl(r){if(r.hostModel)return r.hostModel.getModel("universalTransition").get("divideShape")}function j2e(r,e){var t=He(),n=He(),i=He();return k(r.oldSeries,function(a,o){var s=r.oldDataGroupIds[o],l=r.oldData[o],u=GB(a),c=HB(u);n.set(c,{dataGroupId:s,data:l}),_e(u)&&k(u,function(h){i.set(h,{key:c,dataGroupId:s,data:l})})}),k(e.updatedSeries,function(a){if(a.isUniversalTransitionEnabled()&&a.isAnimationEnabled()){var o=a.get("dataGroupId"),s=a.getData(),l=GB(a),u=HB(l),c=n.get(u);if(c)t.set(u,{oldSeries:[{dataGroupId:c.dataGroupId,divide:pl(c.data),data:c.data}],newSeries:[{dataGroupId:o,divide:pl(s),data:s}]});else if(_e(l)){var h=[];k(l,function(p){var g=n.get(p);g.data&&h.push({dataGroupId:g.dataGroupId,divide:pl(g.data),data:g.data})}),h.length&&t.set(u,{oldSeries:h,newSeries:[{dataGroupId:o,data:s,divide:pl(s)}]})}else{var f=i.get(l);if(f){var d=t.get(f.key);d||(d={oldSeries:[{dataGroupId:f.dataGroupId,data:f.data,divide:pl(f.data)}],newSeries:[]},t.set(f.key,d)),d.newSeries.push({dataGroupId:o,data:s,divide:pl(s)})}}}}),t}function WB(r,e){for(var t=0;t<r.length;t++){var n=e.seriesIndex!=null&&e.seriesIndex===r[t].seriesIndex||e.seriesId!=null&&e.seriesId===r[t].id;if(n)return t}}function K2e(r,e,t,n){var i=[],a=[];k(nn(r.from),function(o){var s=WB(e.oldSeries,o);s>=0&&i.push({dataGroupId:e.oldDataGroupIds[s],data:e.oldData[s],divide:pl(e.oldData[s]),groupIdDim:o.dimension})}),k(nn(r.to),function(o){var s=WB(t.updatedSeries,o);if(s>=0){var l=t.updatedSeries[s].getData();a.push({dataGroupId:e.oldDataGroupIds[s],data:l,divide:pl(l),groupIdDim:o.dimension})}}),i.length>0&&a.length>0&&YW(i,a,n)}function Z2e(r){r.registerUpdateLifecycle("series:beforeupdate",function(e,t,n){k(nn(n.seriesTransition),function(i){k(nn(i.to),function(a){for(var o=n.updatedSeries,s=0;s<o.length;s++)(a.seriesIndex!=null&&a.seriesIndex===o[s].seriesIndex||a.seriesId!=null&&a.seriesId===o[s].id)&&(o[s][h0]=!0)})})}),r.registerUpdateLifecycle("series:transition",function(e,t,n){var i=W2e(t);if(i.oldSeries&&n.updatedSeries&&n.optionChanged){var a=n.seriesTransition;if(a)k(nn(a),function(d){K2e(d,i,n,t)});else{var o=j2e(i,n);k(o.keys(),function(d){var p=o.get(d);YW(p.oldSeries,p.newSeries,t)})}k(n.updatedSeries,function(d){d[h0]&&(d[h0]=!1)})}for(var s=e.getSeries(),l=i.oldSeries=[],u=i.oldDataGroupIds=[],c=i.oldData=[],h=0;h<s.length;h++){var f=s[h].getData();f.count()<XW&&(l.push(s[h]),u.push(s[h].get("dataGroupId")),c.push(f))}})}gt([fve]);gt([ave]);gt([Ove,ege,dge,eme,mme,hye,Gye,E0e,n_e,h_e,A_e,M1e,J1e,fxe,Dxe,zxe,rSe,dSe,MSe,NSe,YSe,DAe]);gt(twe);gt(kwe);gt(G8);gt(Qwe);gt(E6);gt(abe);gt(pbe);gt(vTe);gt(BTe);gt(Ug);gt(iMe);gt(sMe);gt(AMe);gt(DMe);gt(UMe);gt(qMe);gt(lCe);gt(PCe);gt(IW);gt(NW);gt(r2e);gt(zW);gt(UW);gt(l2e);gt(S2e);gt(b2e);gt(Z2e);gt(wpe);var Xw=null;function Q2e(r){return Xw||(Xw=(window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){return setTimeout(e,16)}).bind(window)),Xw(r)}var Yw=null;function J2e(r){Yw||(Yw=(window.cancelAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame||function(e){clearTimeout(e)}).bind(window)),Yw(r)}function eEe(r){var e=document.createElement("style");return e.styleSheet?e.styleSheet.cssText=r:e.appendChild(document.createTextNode(r)),(document.querySelector("head")||document.body).appendChild(e),e}function zy(r,e){e===void 0&&(e={});var t=document.createElement(r);return Object.keys(e).forEach(function(n){t[n]=e[n]}),t}function qW(r,e,t){var n=window.getComputedStyle(r,t||null)||{display:"none"};return n[e]}function DM(r){if(!document.documentElement.contains(r))return{detached:!0,rendered:!1};for(var e=r;e!==document;){if(qW(e,"display")==="none")return{detached:!1,rendered:!1};e=e.parentNode}return{detached:!1,rendered:!0}}var tEe='.resize-triggers{visibility:hidden;opacity:0;pointer-events:none}.resize-contract-trigger,.resize-contract-trigger:before,.resize-expand-trigger,.resize-triggers{content:"";position:absolute;top:0;left:0;height:100%;width:100%;overflow:hidden}.resize-contract-trigger,.resize-expand-trigger{background:#eee;overflow:auto}.resize-contract-trigger:before{width:200%;height:200%}',IM=0,y0=null;function nEe(r,e){r.__resize_mutation_handler__||(r.__resize_mutation_handler__=aEe.bind(r));var t=r.__resize_listeners__;if(!t){if(r.__resize_listeners__=[],window.ResizeObserver){var n=r.offsetWidth,i=r.offsetHeight,a=new ResizeObserver(function(){!r.__resize_observer_triggered__&&(r.__resize_observer_triggered__=!0,r.offsetWidth===n&&r.offsetHeight===i)||H_(r)}),o=DM(r),s=o.detached,l=o.rendered;r.__resize_observer_triggered__=s===!1&&l===!1,r.__resize_observer__=a,a.observe(r)}else if(r.attachEvent&&r.addEventListener)r.__resize_legacy_resize_handler__=function(){H_(r)},r.attachEvent("onresize",r.__resize_legacy_resize_handler__),document.addEventListener("DOMSubtreeModified",r.__resize_mutation_handler__);else if(IM||(y0=eEe(tEe)),oEe(r),r.__resize_rendered__=DM(r).rendered,window.MutationObserver){var u=new MutationObserver(r.__resize_mutation_handler__);u.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),r.__resize_mutation_observer__=u}}r.__resize_listeners__.push(e),IM++}function rEe(r,e){var t=r.__resize_listeners__;if(t){if(e&&t.splice(t.indexOf(e),1),!t.length||!e){if(r.detachEvent&&r.removeEventListener){r.detachEvent("onresize",r.__resize_legacy_resize_handler__),document.removeEventListener("DOMSubtreeModified",r.__resize_mutation_handler__);return}r.__resize_observer__?(r.__resize_observer__.unobserve(r),r.__resize_observer__.disconnect(),r.__resize_observer__=null):(r.__resize_mutation_observer__&&(r.__resize_mutation_observer__.disconnect(),r.__resize_mutation_observer__=null),r.removeEventListener("scroll",KE),r.removeChild(r.__resize_triggers__.triggers),r.__resize_triggers__=null),r.__resize_listeners__=null}!--IM&&y0&&y0.parentNode.removeChild(y0)}}function iEe(r){var e=r.__resize_last__,t=e.width,n=e.height,i=r.offsetWidth,a=r.offsetHeight;return i!==t||a!==n?{width:i,height:a}:null}function aEe(){var r=DM(this),e=r.rendered,t=r.detached;e!==this.__resize_rendered__&&(!t&&this.__resize_triggers__&&(ZE(this),this.addEventListener("scroll",KE,!0)),this.__resize_rendered__=e,H_(this))}function KE(){var r=this;ZE(this),this.__resize_raf__&&J2e(this.__resize_raf__),this.__resize_raf__=Q2e(function(){var e=iEe(r);e&&(r.__resize_last__=e,H_(r))})}function H_(r){!r||!r.__resize_listeners__||r.__resize_listeners__.forEach(function(e){e.call(r,r)})}function oEe(r){var e=qW(r,"position");(!e||e==="static")&&(r.style.position="relative"),r.__resize_old_position__=e,r.__resize_last__={};var t=zy("div",{className:"resize-triggers"}),n=zy("div",{className:"resize-expand-trigger"}),i=zy("div"),a=zy("div",{className:"resize-contract-trigger"});n.appendChild(i),t.appendChild(n),t.appendChild(a),r.appendChild(t),r.__resize_triggers__={triggers:t,expand:n,expandChild:i,contract:a},ZE(r),r.addEventListener("scroll",KE,!0),r.__resize_last__={width:r.offsetWidth,height:r.offsetHeight}}function ZE(r){var e=r.__resize_triggers__,t=e.expand,n=e.expandChild,i=e.contract,a=i.scrollWidth,o=i.scrollHeight,s=t.offsetWidth,l=t.offsetHeight,u=t.scrollWidth,c=t.scrollHeight;i.scrollLeft=a,i.scrollTop=o,n.style.width=s+1+"px",n.style.height=l+1+"px",t.scrollLeft=u,t.scrollTop=c}var bo=function(){return bo=Object.assign||function(r){for(var e,t=1,n=arguments.length;t<n;t++)for(var i in e=arguments[t])Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=e[i]);return r},bo.apply(this,arguments)};var sEe=["getWidth","getHeight","getDom","getOption","resize","dispatchAction","convertToPixel","convertFromPixel","containPixel","getDataURL","getConnectedDataURL","appendData","clear","isDisposed","dispose"];function lEe(r){return e=Object.create(null),sEe.forEach(function(t){e[t]=function(n){return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];if(!r.value)throw new Error("ECharts is not initialized yet.");return r.value[n].apply(r.value,i)}}(t)}),e;var e}var uEe={autoresize:[Boolean,Object]},cEe=/^on[^a-z]/,$B=function(r){return cEe.test(r)};function Uy(r,e){var t=y7(r)?_n(r):r;return t&&typeof t=="object"&&"value"in t?t.value||e:t||e}var hEe="ecLoadingOptions",fEe={loading:Boolean,loadingOptions:Object},xp=null,jW="x-vue-echarts",XB=[],Sp=[];(function(r,e){if(r&&typeof document!="undefined"){var t,n=e.prepend===!0?"prepend":"append",i=e.singleTag===!0,a=typeof e.container=="string"?document.querySelector(e.container):document.getElementsByTagName("head")[0];if(i){var o=XB.indexOf(a);o===-1&&(o=XB.push(a)-1,Sp[o]={}),t=Sp[o]&&Sp[o][n]?Sp[o][n]:Sp[o][n]=s()}else t=s();r.charCodeAt(0)===65279&&(r=r.substring(1)),t.styleSheet?t.styleSheet.cssText+=r:t.appendChild(document.createTextNode(r))}function s(){var l=document.createElement("style");if(l.setAttribute("type","text/css"),e.attributes)for(var u=Object.keys(e.attributes),c=0;c<u.length;c++)l.setAttribute(u[c],e.attributes[u[c]]);var h=n==="prepend"?"afterbegin":"beforeend";return a.insertAdjacentElement(h,l),l}})(`x-vue-echarts{display:flex;flex-direction:column;width:100%;height:100%;min-width:0} |
|
.vue-echarts-inner{flex-grow:1;min-width:0;width:auto!important;height:auto!important} |
|
`,{});var dEe=function(){if(xp!=null)return xp;if(typeof HTMLElement=="undefined"||typeof customElements=="undefined")return xp=!1;try{new Function("tag",`class EChartsElement extends HTMLElement { |
|
__dispose = null; |
|
|
|
disconnectedCallback() { |
|
if (this.__dispose) { |
|
this.__dispose(); |
|
this.__dispose = null; |
|
} |
|
} |
|
} |
|
|
|
if (customElements.get(tag) == null) { |
|
customElements.define(tag, EChartsElement); |
|
} |
|
`)(jW)}catch(r){return xp=!1}return xp=!0}(),pEe="ecTheme",vEe="ecInitOptions",gEe="ecUpdateOptions",YB=/(^&?~?!?)native:/,fa=g7({name:"echarts",props:bo(bo({option:Object,theme:{type:[Object,String]},initOptions:Object,updateOptions:Object,group:String,manualUpdate:Boolean},uEe),fEe),emits:{},inheritAttrs:!1,setup:function(r,e){var t=e.attrs,n=Ap(),i=Ap(),a=Ap(),o=Ap(),s=sf(pEe,null),l=sf(vEe,null),u=sf(gEe,null),c=m7(r),h=c.autoresize,f=c.manualUpdate,d=c.loading,p=c.loadingOptions,g=Se(function(){return o.value||r.option||null}),v=Se(function(){return r.theme||Uy(s,{})}),m=Se(function(){return r.initOptions||Uy(l,{})}),y=Se(function(){return r.updateOptions||Uy(u,{})}),_=Se(function(){return function(T){var P={};for(var D in T)$B(D)||(P[D]=T[D]);return P}(t)}),x={},S=QB().proxy.$listeners,A={};function w(T){if(i.value){var P=a.value=zfe(i.value,v.value,m.value);r.group&&(P.group=r.group),Object.keys(A).forEach(function(L){var E=A[L];if(E){var I=L.toLowerCase();I.charAt(0)==="~"&&(I=I.substring(1),E.__once__=!0);var N=P;if(I.indexOf("zr:")===0&&(N=P.getZr(),I=I.substring(3)),E.__once__){delete E.__once__;var R=E;E=function(){for(var F=[],O=0;O<arguments.length;O++)F[O]=arguments[O];R.apply(void 0,F),N.off(I,E)}}N.on(I,E)}}),h.value?no(function(){P&&!P.isDisposed()&&P.resize(),D()}):D()}function D(){var L=T||g.value;L&&P.setOption(L,y.value)}}function M(){a.value&&(a.value.dispose(),a.value=void 0)}S?Object.keys(S).forEach(function(T){YB.test(T)?x[T.replace(YB,"$1")]=S[T]:A[T]=S[T]}):Object.keys(t).filter(function(T){return $B(T)}).forEach(function(T){var P=T.charAt(2).toLowerCase()+T.slice(3);if(P.indexOf("native:")!==0)P.substring(P.length-4)==="Once"&&(P="~".concat(P.substring(0,P.length-4))),A[P]=t[T];else{var D="on".concat(P.charAt(7).toUpperCase()).concat(P.slice(8));x[D]=t[T]}});var C=null;ni(f,function(T){typeof C=="function"&&(C(),C=null),T||(C=ni(function(){return r.option},function(P,D){P&&(a.value?a.value.setOption(P,bo({notMerge:P!==D},y.value)):w())},{deep:!0}))},{immediate:!0}),ni([v,m],function(){M(),w()},{deep:!0}),cL(function(){r.group&&a.value&&(a.value.group=r.group)});var b=lEe(a);return function(T,P,D){var L=sf(hEe,{}),E=Se(function(){return bo(bo({},Uy(L,{})),D==null?void 0:D.value)});cL(function(){var I=T.value;I&&(P.value?I.showLoading(E.value):I.hideLoading())})}(a,d,p),function(T,P,D){var L=null;ni([D,T,P],function(E,I,N){var R=E[0],F=E[1],O=E[2];if(R&&F&&O){var V=O===!0?{}:O,H=V.throttle,Q=H===void 0?100:H,W=V.onResize,Z=function(){F.resize(),W==null||W()};L=Q?U1(Z,Q):Z,nEe(R,L)}N(function(){R&&L&&rEe(R,L)})})}(a,h,i),Ko(function(){w()}),uo(function(){dEe&&n.value?n.value.__dispose=M:M()}),bo({chart:a,root:n,inner:i,setOption:function(T,P){r.manualUpdate&&(o.value=T),a.value?a.value.setOption(T,P||{}):w(T)},nonEventAttrs:_,nativeListeners:x},b)},render:function(){var r=bo(bo({},this.nonEventAttrs),this.nativeListeners);return r.ref="root",r.class=r.class?["echarts"].concat(r.class):"echarts",hL(jW,r,[hL("div",{ref:"inner",class:"vue-echarts-inner"})])}});const KW="/jsyApi";new Date().getFullYear();function mEe(r,e){return/^https?:\/\//.test(e)?e:`${r}${e.startsWith("/")?e:`/${e}`}`}function yEe(r){if((r==null?void 0:r.success)===!1&&(r==null?void 0:r.code)!==void 0&&![0,200,"0","200"].includes(r.code))throw new Error((r==null?void 0:r.msg)||(r==null?void 0:r.message)||"接口请求失败");return Lt(r)}function ZW(r,e,t,n={}){return Bs(mEe(r,e),{params:t,timeout:n.timeout||18e3}).then(yEe)}function _Ee(){return ZW(KW,"/api/yak/distribution").then(r=>QW(r))}function xEe(){return ZW(KW,"/api/yak/forecast").then(r=>QW(r))}function SEe(){return Ge(this,null,function*(){return(yield _Ee()).map((e,t)=>({key:Rf(e,["areaCode","area_code","code","id"],`yak-town-${t}`),name:Rf(e,["areaName","area_name","zoneName","townName","name"],`区域${t+1}`),value:QE(Rf(e,["number","yakCount","yak_count","count","value"])),unit:"头"})).filter(e=>e.name&&Number.isFinite(e.value)).sort((e,t)=>t.value-e.value)})}function AEe(){return Ge(this,null,function*(){return(yield xEe()).map((e,t)=>{const n=Rf(e,["month","date","name","time"],`预测${t+1}`);return{key:`${n}-${t}`,name:wEe(n),value:QE(Rf(e,["number","count","yakCount","value"])),unit:"头",extra:bEe("增速",Rf(e,["speed","growth","growthRate","rate"]))}}).filter(e=>e.name&&Number.isFinite(e.value))})}function QW(r){return Array.isArray(r)?r:Array.isArray(r==null?void 0:r.rows)?r.rows:Array.isArray(r==null?void 0:r.list)?r.list:Array.isArray(r==null?void 0:r.records)?r.records:Array.isArray(r==null?void 0:r.data)?r.data:[]}function Rf(r,e,t=""){for(const n of e){const i=r==null?void 0:r[n];if(i!=null&&i!=="")return i}return t}function wEe(r){const e=String(r||""),t=e.match(/(?:^|\D)(1[0-2]|0?[1-9])(?:月|$|-)/);return t?`${Number(t[1])}月`:e}function bEe(r,e){const t=QE(e);return Number.isFinite(t)?`${r}:${t.toLocaleString("zh-CN",{maximumFractionDigits:2})}`:""}function QE(r){if(r==null||r==="")return NaN;const e=Number(String(r).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(e)?e:NaN}const TEe={色地镇:"色地乡",瓦切镇:"瓦切乡",安曲镇:"安曲乡",龙日镇:"龙日乡"};function Vp(r){return TEe[r]||r}const NM=yU.slice().sort((r,e)=>e.count-r.count),Vy=PEe([{key:"adultCow",name:"成年母牛",ratio:47,source:"专家共识模型"},{key:"otherAdult",name:"其他成年牛",ratio:22,source:"专家共识模型"},{key:"calf",name:"幼畜(≤1岁)",ratio:16,source:"专家共识模型"},{key:"yearling",name:"育成牛(1-2岁)",ratio:11,source:"专家共识模型"},{key:"bull",name:"公牛",ratio:4,source:"专家共识模型"}],Al),qB=IC.map((r,e)=>Xe(Re({},r),{color:["#ff8f6b","#30dcff","#ffd76c","#7aa7ff"][e%4]})),qw=[{age:"≤1岁",cow:61280,bull:64892},{age:"1-2岁",cow:43076,bull:43752},{age:"2-4岁",cow:148260,bull:78240},{age:"4-8岁",cow:169420,bull:51860},{age:"8岁以上",cow:45534,bull:21416}],tc=[{key:"2026",label:"2026年底",shortLabel:"2026",months:7,stock:781236,births:44763,outflow:21684,correction:-21843,structure:{adultCow:47,otherAdult:22,calf:16,yearling:11,bull:4}},{key:"2027",label:"2027年底",shortLabel:"2027",months:19,stock:779428,births:121374,outflow:61286,correction:-60660,structure:{adultCow:47,otherAdult:21,calf:17,yearling:11,bull:4}},{key:"2028",label:"2028年底",shortLabel:"2028",months:31,stock:782617,births:199642,outflow:102517,correction:-94508,structure:{adultCow:46,otherAdult:22,calf:17,yearling:11,bull:4}}],jB=[{name:"繁殖补充",value:86},{name:"出栏周转",value:62},{name:"死亡淘汰",value:48},{name:"母牛基础",value:91},{name:"幼畜存活",value:73}];function MEe(r){return tc.find(e=>e.key===r)||tc[1]}function CEe(r){var i,a,o,s,l;const e=(r==null?void 0:r.structure)||{},t=[{key:"adultCow",name:"成年母牛",ratio:(i=e.adultCow)!=null?i:47},{key:"otherAdult",name:"其他成年牛",ratio:(a=e.otherAdult)!=null?a:22},{key:"calf",name:"幼畜(≤1岁)",ratio:(o=e.calf)!=null?o:16},{key:"yearling",name:"育成牛(1-2岁)",ratio:(s=e.yearling)!=null?s:11},{key:"bull",name:"公牛",ratio:(l=e.bull)!=null?l:4}].map(u=>Xe(Re({},u),{count:Math.round(r.stock*u.ratio/100),source:"预测模型"})),n=r.stock-t.reduce((u,c)=>u+c.count,0);return n&&t[1]&&(t[1].count+=n),t}function EEe(r){const e=r.stock/W0,t=NM.map((i,a)=>Xe(Re({},i),{forecast:Math.round(i.count*e+(a%3-1)*r.months*18)})),n=r.stock-t.reduce((i,a)=>i+a.forecast,0);if(n){const i=t.reduce((a,o)=>o.count>a.count?o:a,t[0]);i.forecast+=n}return t.map(i=>Xe(Re({},i),{change:i.forecast-i.count})).sort((i,a)=>a.forecast-i.forecast)}function LEe(r){const e=r.months+1,t=Array.from({length:e},(o,s)=>s===0?"2026-06":s===r.months?r.label:`+${s}月`),n=t.map((o,s)=>{const l=s/r.months,u=Math.sin(s/2.6)*Math.min(360,r.months*18);return Math.round(Al+(r.stock-Al)*l+u)}),i=t.map((o,s)=>Math.round(r.births/r.months*s)),a=t.map((o,s)=>Math.round(r.outflow/r.months*s));return{labels:t,stock:n,births:i,outflow:a}}function PEe(r,e){const t=r.map(i=>Xe(Re({},i),{count:Math.round(e*i.ratio/100)})),n=e-t.reduce((i,a)=>i+a.count,0);return n&&t[1]&&(t[1].count+=n),t}function REe(r){const e=new Map;return r.forEach(t=>{const n=Vp(t.name),i=e.get(n)||{name:n,count:0,devices:0};i.count+=Number(t.count||0),i.devices+=Number(t.devices||0),e.set(n,i)}),[...e.values()].sort((t,n)=>n.count-t.count)}const DEe={class:"yak-management"},IEe={key:0,class:"yak-map-loading"},NEe={class:"yak-management-ui"},kEe={class:"yak-left"},OEe={class:"yak-side-stack is-left"},FEe={class:"yak-formula-card"},BEe={class:"yak-formula-row"},zEe={class:"formula-box"},UEe={class:"formula-box is-gold"},VEe={class:"formula-box is-red"},GEe={class:"formula-result"},HEe={class:"yak-formula-card is-forecast"},WEe={class:"yak-period-tabs"},$Ee=["onClick"],XEe={class:"yak-formula-row"},YEe={class:"formula-box"},qEe={class:"formula-box is-gold"},jEe={class:"formula-box is-red"},KEe={class:"formula-result"},ZEe={class:"yak-right"},QEe={class:"yak-side-stack is-right"},JEe={class:"yak-structure-list"},eLe={class:"structure-item-head"},tLe={class:"forecast-heat-list"},nLe={class:"yak-bottom-topic"},Xr=398,Yr=190,rLe={__name:"index",emits:["module-stats"],setup(r,{emit:e}){const t=e,n=["#30dcff","#27f0c0","#ffd76c","#7aa7ff","#ff8f6b","#a6f06d"],i=[{key:"structure",name:"畜群结构",color:"#30dcff"},{key:"forecast",name:"畜群预测",color:"#ffd76c"}],a=tt("structure"),o=tt("2027"),s=tt([]),l=tt([]),u=tt(null),c=tt(!1);let h=null,f=!1;const d=Se(()=>MEe(o.value)),p=Se(()=>new Map(NM.map(U=>[Vp(U.name),U]))),g=Se(()=>(s.value.length>=5?s.value:NM).map(K=>{const te=p.value.get(Vp(K.name));return Xe(Re({},K),{devices:Number(K.devices||(te==null?void 0:te.devices)||0)})})),v=Se(()=>l.value.length>=6?l.value:bre),m=Se(()=>EEe(d.value)),y=Se(()=>CEe(d.value)),_=Se(()=>a.value==="forecast"?m.value:g.value),x=Se(()=>W(_.value,a.value==="forecast"?"forecast":"count")),S=Se(()=>({title:a.value==="forecast"?`${d.value.shortLabel}预测存栏`:"牦牛识别数量",metricLabel:a.value==="forecast"?"预测":"识别",unit:"万头",rows:x.value.map(U=>({name:U.name,value:Number((U.value/1e4).toFixed(2)),unit:"万头"}))})),A=Se(()=>({color:n,tooltip:ee(U=>`${U.name}<br/>占比:${U.percent}%<br/>数量:${le(U.value)}头`),legend:{orient:"vertical",right:8,top:"middle",itemWidth:9,itemHeight:9,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:11}},series:[{name:"畜群结构",type:"pie",radius:["46%","70%"],center:["33%","52%"],avoidLabelOverlap:!0,label:{color:"#fff",fontSize:11,formatter:"{d}%"},labelLine:{lineStyle:{color:"rgba(223, 250, 255, 0.36)"}},itemStyle:{borderColor:"rgba(3, 18, 31, 0.9)",borderWidth:3},data:Vy.map(U=>({name:U.name,value:U.count}))}]})),w=Se(()=>({color:["#ffd76c","#30dcff"],tooltip:Xe(Re({},ee()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(U){const K=U.map(te=>`${te.marker}${te.seriesName}:${le(Math.abs(te.value))}头`);return`${U[0].name}<br/>${K.join("<br/>")}`}}),legend:{top:4,right:12,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.8)",fontSize:11}},grid:{left:22,right:22,top:32,bottom:12,containLabel:!0},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:U=>re(Math.abs(U))},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"category",data:qw.map(U=>U.age),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:11},axisLine:{show:!1},axisTick:{show:!1}},series:[{name:"母牛",type:"bar",stack:"gender",barWidth:12,data:qw.map(U=>-U.cow),itemStyle:{borderRadius:[7,0,0,7]}},{name:"公牛",type:"bar",stack:"gender",barWidth:12,data:qw.map(U=>U.bull),itemStyle:{borderRadius:[0,7,7,0]}}]})),M=Se(()=>{const U=g.value.slice(0,6),K=U.map(te=>te.count);return{color:n,tooltip:Xe(Re({},ee()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(te){const ce=te.map(se=>`${se.marker}${se.seriesName}:${le(se.value)}头`);return`${te[0].name}<br/>${ce.join("<br/>")}<br/>合计:${le(K[te[0].dataIndex])}头`}}),legend:{top:0,right:0,itemWidth:8,itemHeight:6,itemGap:6,textStyle:{color:"rgba(222, 250, 255, 0.75)",fontSize:9}},grid:{left:56,right:36,top:28,bottom:10},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.56)",fontSize:10,formatter:re},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}},axisLine:{show:!1},axisTick:{show:!1}},yAxis:{type:"category",inverse:!0,data:U.map(te=>te.name),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:11},axisLine:{show:!1},axisTick:{show:!1}},series:Vy.map(te=>({name:te.name.replace("(≤1岁)","").replace("(1-2岁)",""),type:"bar",stack:"town",barWidth:11,data:U.map(ce=>Math.round(ce.count*te.ratio/100))}))}}),C=Se(()=>H(g.value.slice(0,8),"count","头")),b=Se(()=>{const U=g.value.slice(0,8);return{tooltip:ee(K=>`${K.data.name}<br/>在线设备:${K.value[0]}台<br/>识别数量:${le(K.value[1])}头`),grid:{left:46,right:28,top:22,bottom:32},xAxis:{type:"value",min:0,max:Math.max(...U.map(K=>Number(K.devices||0)),1)+3,name:"设备",nameGap:8,nameTextStyle:{color:"rgba(223, 250, 255, 0.6)",fontSize:10},axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.22)"}},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.08)"}}},yAxis:{type:"value",name:"识别",nameGap:8,nameTextStyle:{color:"rgba(223, 250, 255, 0.6)",fontSize:10},axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,formatter:re},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.22)"}},axisTick:{show:!1},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.08)",type:"dashed"}}},series:[{name:"设备识别",type:"scatter",symbolSize:K=>Math.max(12,Math.min(28,K[1]/5200)),itemStyle:{color:K=>n[K.dataIndex%n.length],opacity:.92,shadowBlur:18,shadowColor:"rgba(48, 220, 255, 0.42)"},label:{show:!0,formatter:"{b}",position:"top",color:"rgba(223, 252, 255, 0.88)",fontSize:10},labelLayout:{hideOverlap:!0},emphasis:{scale:1.12,label:{show:!0,color:"#ffffff",fontWeight:700}},data:U.map(K=>({name:K.name,value:[K.devices||0,K.count]}))}]}}),T=Se(()=>{const U=qB.slice().sort((K,te)=>te.value-K.value);return H(U,"value","头",{labelKey:"label",colors:U.map(K=>K.color),tooltipFormatter(K){const te=U[K.dataIndex],ce=qB.reduce((se,Ne)=>se+Ne.value,0);return`${te.label}<br/>数量:${le(te.value)}头<br/>占比:${be(te.value/ce*100)}<br/>同比:${te.yoy>0?"+":""}${te.yoy}%`}})}),P=Se(()=>{const U=LEe(d.value);return{color:["#30dcff","#ffd76c","#ff8f6b"],tooltip:Xe(Re({},ee()),{trigger:"axis"}),legend:{top:4,right:8,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},grid:{left:44,right:40,top:34,bottom:28},xAxis:{type:"category",boundaryGap:!1,data:U.labels,axisLabel:{color:"rgba(223, 250, 255, 0.62)",fontSize:10,interval:d.value.months>18?4:d.value.months>12?2:1},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.28)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:re},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.48)",fontSize:10,formatter:re},splitLine:{show:!1}}],series:[Q("预测存栏",U.stock,"#30dcff",0,!0),Q("繁殖补充",U.births,"#ffd76c",1),Q("出栏扣减",U.outflow,"#ff8f6b",1)]}}),D=Se(()=>({color:["#30dcff","#ffd76c"],tooltip:Xe(Re({},ee()),{trigger:"axis"}),legend:{top:4,right:12,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},grid:{left:40,right:42,top:34,bottom:28},xAxis:{type:"category",data:v.value.map(U=>U.month||U.name),axisLabel:{color:"rgba(223, 250, 255, 0.68)",fontSize:10,interval:1},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.26)"}},axisTick:{show:!1}},yAxis:[{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.48)",fontSize:10},splitLine:{show:!1}}],series:[{name:"数量",type:"bar",barWidth:12,data:v.value.map(U=>U.count||U.value),itemStyle:{borderRadius:[8,8,0,0],color:new Ul(0,0,0,1,[{offset:0,color:"#30dcff"},{offset:1,color:"rgba(48, 220, 255, 0.08)"}])}},{name:"增速",type:"line",yAxisIndex:1,smooth:!0,symbolSize:5,data:v.value.map(U=>U.speed||U.growthRate||0),lineStyle:{width:2.4,color:"#ffd76c"},itemStyle:{color:"#ffd76c"}}]})),L=Se(()=>({tooltip:ee(),radar:{center:["50%","54%"],radius:"68%",splitNumber:4,indicator:jB.map(U=>({name:U.name,max:100})),axisName:{color:"rgba(223, 250, 255, 0.76)",fontSize:11},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.22)"}},splitArea:{areaStyle:{color:["rgba(48, 220, 255, 0.04)","rgba(39, 240, 192, 0.02)"]}},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.18)"}}},series:[{type:"radar",data:[{name:"预测因子",value:jB.map(U=>U.value),areaStyle:{color:"rgba(48, 220, 255, 0.22)"},lineStyle:{color:"#30dcff",width:2},itemStyle:{color:"#ffd76c"}}]}]})),E=Se(()=>H(m.value.slice(0,8),"forecast","头")),I=Se(()=>H(y.value,"ratio","%",{tooltipFormatter(U){const K=y.value[U.dataIndex];return`${K.name}<br/>预测占比:${be(K.ratio)}<br/>预测数量:${le(K.count)}头`}})),N=Se(()=>({color:["#ffd76c","#ff8f6b","#7aa7ff"],tooltip:Xe(Re({},ee()),{trigger:"axis",axisPointer:{type:"shadow"}}),legend:{top:4,right:8,itemWidth:12,itemHeight:8,textStyle:{color:"rgba(222, 250, 255, 0.78)",fontSize:10}},grid:{left:44,right:26,top:34,bottom:28},xAxis:{type:"category",data:tc.map(U=>U.shortLabel),axisLabel:{color:"rgba(223, 250, 255, 0.76)",fontSize:11},axisLine:{lineStyle:{color:"rgba(48, 220, 255, 0.26)"}},axisTick:{show:!1}},yAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.58)",fontSize:10,formatter:re},splitLine:{lineStyle:{color:"rgba(48, 220, 255, 0.1)",type:"dashed"}}},series:[{name:"繁殖补充",type:"bar",barWidth:12,data:tc.map(U=>U.births),itemStyle:{borderRadius:[7,7,0,0]}},{name:"出栏流出",type:"bar",barWidth:12,data:tc.map(U=>-U.outflow),itemStyle:{borderRadius:[0,0,7,7]}},{name:"稳态校正",type:"line",smooth:!0,symbolSize:6,data:tc.map(U=>U.correction),lineStyle:{width:2.4}}]})),R=Se(()=>{const U=m.value.slice(0,7),K=Math.max(...U.map(te=>Math.abs(te.change)),1);return U.map(te=>Xe(Re({},te),{width:Math.max(8,Math.round(Math.abs(te.change)/K*100))}))});Ko(()=>{O(),F()}),uo(()=>{var U,K;f=!0,(K=(U=u.value)==null?void 0:U.destroyMap)==null||K.call(U)}),ni([a,d,g],()=>{V()},{immediate:!0});function F(){return Ge(this,null,function*(){var te,ce;const[U,K]=yield Promise.allSettled([SEe(),AEe()]);U.status==="fulfilled"&&((te=U.value)!=null&&te.length)&&(s.value=REe(U.value.map(se=>{var Ne;return{name:Vp(se.name),count:Number(se.value),devices:((Ne=p.value.get(Vp(se.name)))==null?void 0:Ne.devices)||0}}).filter(se=>se.name&&Number.isFinite(se.count)))),K.status==="fulfilled"&&((ce=K.value)!=null&&ce.length)&&(l.value=K.value.map(se=>({month:se.name,count:Number(se.value),speed:he(se.extra)})).filter(se=>se.month&&Number.isFinite(se.count)))})}function O(){var K;h=new _g;const U=(te=0)=>Ge(this,null,function*(){var se,Ne;if(f)return;yield no();const ce=u.value;if((se=ce==null?void 0:ce.loadMap)==null||se.call(ce,h),ce!=null&&ce.canvasMap){c.value=!0,(Ne=ce.play)==null||Ne.call(ce);return}te<24&&window.setTimeout(()=>U(te+1),120)});(K=h.ready)==null||K.then(U).catch(()=>{c.value=!0})}function V(){if(a.value==="forecast"){const K=d.value.stock-Al;t("module-stats",{moduleKey:"yak-management",items:[{zh:"预测期末存栏",value:d.value.stock,unit:"头"},{zh:"繁殖补充",value:d.value.births,unit:"头"},{zh:"出栏流出",value:d.value.outflow,unit:"头"},{zh:"预测净变化",value:K,unit:"头"}]});return}const U=Vy.find(K=>K.key==="adultCow");t("module-stats",{moduleKey:"yak-management",items:[{zh:"当前估算存栏",value:Al,unit:"头"},{zh:"无人机识别总数",value:W0,unit:"头"},{zh:"成年母牛",value:(U==null?void 0:U.count)||0,unit:"头"},{zh:"识别乡镇",value:g.value.length,unit:"个"}]})}function H(U,K,te,ce={}){const se=ce.labelKey||"name",Ne=ce.colors||n,Oe=Math.max(...U.map(B=>Number(B[K]||0)),1);return{tooltip:Xe(Re({},ee()),{trigger:"axis",axisPointer:{type:"shadow"},formatter(B){if(ce.tooltipFormatter)return ce.tooltipFormatter(B[0]);const z=U[B[0].dataIndex];return`${z[se]}<br/>数值:${le(z[K])}${te}`}}),grid:{left:74,right:54,top:14,bottom:14},xAxis:{type:"value",axisLabel:{color:"rgba(223, 250, 255, 0.56)",fontSize:10,formatter:te==="%"?"{value}%":re},axisLine:{show:!1},axisTick:{show:!1},splitLine:{show:!1}},yAxis:{type:"category",inverse:!0,data:U.map(B=>B[se]),axisLabel:{color:"rgba(223, 250, 255, 0.82)",fontSize:11},axisLine:{show:!1},axisTick:{show:!1}},series:[{type:"bar",barWidth:U.length>6?11:13,data:U.map((B,z)=>({value:B[K],itemStyle:{borderRadius:[0,7,7,0],color:new Ul(0,0,1,0,[{offset:0,color:"rgba(48, 220, 255, 0.12)"},{offset:1,color:Ne[z%Ne.length]}])}})),showBackground:!0,backgroundStyle:{color:"rgba(48, 220, 255, 0.055)",borderRadius:[0,7,7,0]},label:{show:!0,position:"right",color:"#ffffff",fontSize:10,formatter:({value:B})=>`${te==="%"?be(B):re(B)}`},markLine:ce.showAverage===!1?void 0:{silent:!0,symbol:"none",label:{show:!1},lineStyle:{color:"rgba(255, 215, 108, 0.22)",type:"dashed",width:1},data:[{xAxis:Math.round(Oe*.72)}]}}]}}function Q(U,K,te,ce=0,se=!1){return{name:U,type:"line",yAxisIndex:ce,smooth:!0,symbolSize:5,data:K,lineStyle:{width:2.5,color:te},itemStyle:{color:te},areaStyle:se?{color:new Ul(0,0,0,1,[{offset:0,color:`${te}44`},{offset:1,color:`${te}05`}])}:void 0}}function W(U,K){const te=new Map;return U.forEach(ce=>{const se=Z(ce.name);if(!se)return;const Ne=te.get(se)||{name:se,value:0};Ne.value+=Number(ce[K]||0),te.set(se,Ne)}),[...te.values()].sort((ce,se)=>se.value-ce.value)}function Z(U){return{色地乡:"色地镇",瓦切乡:"瓦切镇",安曲乡:"安曲镇",龙日乡:"龙日镇",色地镇:"色地镇",瓦切镇:"瓦切镇",安曲镇:"安曲镇",龙日镇:"龙日镇",邛溪镇:"邛溪镇",刷经寺镇:"刷经寺镇",阿木乡:"阿木乡",查尔玛乡:"查尔玛乡",江茸乡:"江茸乡",麦洼乡:"麦洼乡"}[U]||""}function ee(U){return{trigger:"item",backgroundColor:"rgba(5, 31, 51, 0.96)",borderColor:"rgba(0, 210, 255, 0.54)",borderWidth:1,textStyle:{color:"#e7fbff",fontSize:12},extraCssText:"box-shadow:0 0 18px rgba(0,210,255,.2);",formatter:U}}function he(U){const K=String(U||"").match(/-?\d+(?:\.\d+)?/);return K?Number(K[0]):0}function le(U){const K=Number(U);return Number.isFinite(K)?K.toLocaleString("zh-CN",{maximumFractionDigits:Number.isInteger(K)?0:2}):"--"}function re(U){const K=Number(U);return Number.isFinite(K)?Math.abs(K)>=1e4?`${(K/1e4).toFixed(Math.abs(K)>=1e5?0:1)}万`:Math.abs(K)>=1e3?`${Math.round(K/1e3)}k`:`${Math.round(K)}`:"--"}function be(U){const K=Number(U);return Number.isFinite(K)?`${Number.isInteger(K)?K:K.toFixed(1)}%`:"--"}function de(U){const K=Number(U);return Number.isFinite(K)?`${K>=0?"+":"-"}${le(Math.abs(K))}`:"--"}return(U,K)=>(ie(),oe("div",DEe,[$e(yg,{ref_key:"mapSceneRef",ref:u,class:"yak-map-scene","map-ranking":S.value},null,8,["map-ranking"]),K[15]||(K[15]=G("div",{class:"yak-map-scrim"},null,-1)),c.value?Tt("",!0):(ie(),oe("div",IEe,"3D地图加载中")),G("div",NEe,[G("div",kEe,[G("div",OEe,[a.value==="structure"?(ie(),oe(it,{key:0},[$e(tn,{class:"yak-side-card left-card",title:"存栏估算口径",width:Xr,height:Yr},{default:Xt(()=>[G("div",FEe,[G("div",BEe,[G("div",zEe,[K[1]||(K[1]=G("span",null,"无人机识别",-1)),G("strong",null,Te(le(_n(W0))),1)]),K[4]||(K[4]=G("i",null,"+",-1)),G("div",UEe,[K[2]||(K[2]=G("span",null,"待归属校正",-1)),G("strong",null,Te(le(_n(_U))),1)]),K[5]||(K[5]=G("i",null,"-",-1)),G("div",VEe,[K[3]||(K[3]=G("span",null,"周转扣减",-1)),G("strong",null,Te(le(Math.abs(_n(xU)))),1)])]),G("div",GEe,[K[7]||(K[7]=G("span",null,"当前估算存栏",-1)),G("strong",null,[Zn(Te(le(_n(Al))),1),K[6]||(K[6]=G("em",null,"头",-1))])])])]),_:1}),$e(tn,{class:"yak-side-card left-card",title:"畜群结构占比",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:A.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card left-card",title:"母牛/公牛年龄结构",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:w.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card left-card",title:"乡镇结构堆叠",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:M.value,autoresize:!0},null,8,["option"])]),_:1})],64)):(ie(),oe(it,{key:1},[$e(tn,{class:"yak-side-card left-card",title:"预测模型口径",width:Xr,height:Yr},{default:Xt(()=>[G("div",HEe,[G("div",WEe,[(ie(!0),oe(it,null,vt(_n(tc),te=>(ie(),oe("button",{key:te.key,type:"button",class:Vt({active:te.key===o.value}),onClick:ce=>o.value=te.key},Te(te.shortLabel),11,$Ee))),128))]),G("div",XEe,[G("div",YEe,[K[8]||(K[8]=G("span",null,"当前存栏",-1)),G("strong",null,Te(re(_n(Al))),1)]),K[11]||(K[11]=G("i",null,"+",-1)),G("div",qEe,[K[9]||(K[9]=G("span",null,"繁殖补充",-1)),G("strong",null,Te(re(d.value.births)),1)]),K[12]||(K[12]=G("i",null,"-",-1)),G("div",jEe,[K[10]||(K[10]=G("span",null,"出栏流出",-1)),G("strong",null,Te(re(d.value.outflow)),1)])]),G("div",KEe,[G("span",null,Te(d.value.label)+"预测存栏",1),G("strong",null,[Zn(Te(le(d.value.stock)),1),K[13]||(K[13]=G("em",null,"头",-1))])])])]),_:1}),$e(tn,{class:"yak-side-card left-card",title:"未来存栏趋势",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:P.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card left-card",title:"月度数量预测",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:D.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card left-card",title:"预测因子雷达",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:L.value,autoresize:!0},null,8,["option"])]),_:1})],64))])]),G("div",ZEe,[G("div",QEe,[a.value==="structure"?(ie(),oe(it,{key:0},[$e(tn,{class:"yak-side-card right-card",title:"识别数量排行",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:C.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card right-card",title:"设备与识别关系",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:b.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card right-card",title:"出栏/交易影响",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:T.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card right-card",title:"结构明细",width:Xr,height:Yr},{default:Xt(()=>[G("div",JEe,[(ie(!0),oe(it,null,vt(_n(Vy),(te,ce)=>(ie(),oe("div",{key:te.key,class:"structure-item",style:un({"--ratio-width":`${Math.max(8,te.ratio*1.8)}%`,"--item-color":n[ce%n.length]})},[G("div",eLe,[G("span",null,Te(te.name),1),G("strong",null,Te(be(te.ratio)),1),G("em",null,Te(re(te.count))+"头",1)]),K[14]||(K[14]=G("div",{class:"structure-track"},[G("i")],-1))],4))),128))])]),_:1})],64)):(ie(),oe(it,{key:1},[$e(tn,{class:"yak-side-card right-card",title:"乡镇预测排行",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:E.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card right-card",title:"期末结构预测",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:I.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card right-card",title:"补充/流出对比",width:Xr,height:Yr},{default:Xt(()=>[$e(_n(fa),{class:"yak-chart",option:N.value,autoresize:!0},null,8,["option"])]),_:1}),$e(tn,{class:"yak-side-card right-card",title:"预测变化热力",width:Xr,height:Yr},{default:Xt(()=>[G("div",tLe,[(ie(!0),oe(it,null,vt(R.value,te=>(ie(),oe("div",{key:te.name,class:"heat-row",style:un({"--heat-width":`${te.width}%`})},[G("span",null,Te(te.name),1),G("strong",null,Te(de(te.change)),1)],4))),128))])]),_:1})],64))])]),G("div",nLe,[$e(OC,{"model-value":a.value,topics:i,"onUpdate:modelValue":K[0]||(K[0]=te=>a.value=te)},null,8,["model-value"])])])]))}},JW="/jsyApi";function e7(r,e){return/^https?:\/\//.test(e)?e:`${r}${e.startsWith("/")?e:`/${e}`}`}function t7(r){if((r==null?void 0:r.success)===!1||(r==null?void 0:r.code)!==void 0&&![0,200,"0","200"].includes(r.code)){const t=new Error((r==null?void 0:r.msg)||(r==null?void 0:r.message)||"接口请求失败");throw t.code=r==null?void 0:r.code,t}return Lt(r)}function iLe(r,e,t={}){return Bs(e7(JW,r),{params:e,timeout:t.timeout||12e3}).then(t7)}function ex(r,e,t={}){return Bs(e7(JW,r),{method:"POST",params:e,timeout:t.timeout||12e3}).then(t7)}function aLe(){return ex("/dataItem",{group:"pastures"}).then(r=>(r==null?void 0:r.data)||r||[])}function oLe(){return ex("/muhu/distribution").then(r=>(r==null?void 0:r.data)||r||[])}function sLe(){return ex("/muhu/age").then(r=>(r==null?void 0:r.data)||r||[])}function lLe(){return ex("/muhu/upline_rate").then(r=>(r==null?void 0:r.data)||r||[])}function uLe(){return iLe("/pasturesList").then(r=>(r==null?void 0:r.data)||r||[])}function cLe(){return Ge(this,null,function*(){const[r,e,t,n,i]=yield Promise.allSettled([aLe(),oLe(),sLe(),lLe(),uLe()]);return{core:r.status==="fulfilled"?r.value:[],distribution:e.status==="fulfilled"?e.value:[],age:t.status==="fulfilled"?t.value:[],online:n.status==="fulfilled"?n.value:[],list:i.status==="fulfilled"?i.value:[]}})}const Pd=(r,e=2)=>{const t=cu(10,e);return Math.round((Number(r)||0)*t)/t},hLe=(r,e)=>r.reduce((t,n)=>t+(Number(n[e])||0),0),W_=r=>Pd((Number(r)||0)/1e4,2),hg=W_(oo.grasslandArea),tx=hLe(xg,"yakCount"),fLe=W_(oo.wetArea),fg=oo.herdsmanCount,n7=112,dLe=Pd(hg/Math.max(fg,1),2),$_=164820,kM=158460,pLe=Pd((kM-$_)/$_*100,1),r7=[{key:"pasture-count",zh:"牧场总数",name:"牧场总数",value:fg,unit:"户",decimals:0},{key:"pasture-grassland",zh:"牧场草地",name:"牧场草地",value:hg,unit:"万亩",decimals:2},{key:"pasture-yak",zh:"关联牦牛",name:"关联牦牛",value:tx,unit:"头",decimals:0},{key:"pasture-online",zh:"在线牧户",name:"在线牧户",value:n7,unit:"户",decimals:0}],Gp=[{key:"pasture-total",name:"牧场总数",value:fg,unit:"户",icon:"town"},{key:"pasture-grassland-area",name:"草地面积",value:hg,unit:"万亩",icon:"area"},{key:"pasture-yak-total",name:"牦牛存栏",value:tx,unit:"头",icon:"yield"},{key:"pasture-online-rate",name:"在线率",value:Pd(n7/fg*100,1),unit:"%",icon:"rate"}],nx=xg.map((r,e)=>{const t=mU.find(o=>o.zoneName===r.zoneName)||{},n=W_(r.grasslandArea||t.grasslandArea),i=W_(t.wetArea),a=Math.max(5,Math.round(r.yakCount/Math.max(tx,1)*fg));return{key:r.zoneName,name:r.zoneName,value:a,unit:"户",yakCount:r.yakCount,grasslandArea:n,wetlandArea:i,onlineRate:Math.min(98,78+e*7%18),density:Pd(r.yakCount/Math.max(n,1),1)}}).sort((r,e)=>e.value-r.value),i7=[{key:"age-30",name:"30岁以下",value:12,unit:"人"},{key:"age-40",name:"30-40岁",value:31,unit:"人"},{key:"age-50",name:"40-50岁",value:38,unit:"人"},{key:"age-60",name:"50-60岁",value:29,unit:"人"},{key:"age-60-plus",name:"60岁以上",value:19,unit:"人"}],a7=[{key:"male",name:"男性牧户",value:72,unit:"户"},{key:"female",name:"女性牧户",value:57,unit:"户"}],o7=nx.slice(0,6).map(r=>({key:`${r.key}-online`,name:r.name,value:r.onlineRate,unit:"%",extra:`${r.value}户`})),vLe=[{key:"grassland",name:"可利用草地",value:hg,unit:"万亩"},{key:"wetland",name:"关联湿地",value:fLe,unit:"万亩"},{key:"average",name:"户均草地",value:dLe,unit:"万亩/户"},{key:"density",name:"草畜密度",value:Pd(tx/Math.max(hg,1),1),unit:"头/万亩"}],gLe=[{key:"capacity",name:"理论承载力",value:$_,unit:"羊单位"},{key:"actual",name:"实际载畜量",value:kM,unit:"羊单位"},{key:"surplus",name:"承载余量",value:Math.abs(kM-$_),unit:"羊单位"},{key:"overload-rate",name:"超载率",value:Math.max(pLe,0),unit:"%"}],mLe=[{key:"inspection",name:"草场巡查",value:86,unit:"%",extra:"本月完成"},{key:"insurance",name:"保险覆盖",value:74,unit:"%",extra:"牧户覆盖"},{key:"epidemic",name:"防疫到位",value:91,unit:"%",extra:"年度任务"},{key:"device",name:"设备在线",value:88,unit:"%",extra:"定位设备"}],yLe=Mre.map((r,e)=>({key:r.name,name:r.name,value:r.value,unit:"条",scaleValue:[72,58,42,28][e]||20})),_Le=nx.map(r=>({name:r.name,value:r.value,unit:"户"})),jw={topStats:r7,coreRows:Gp,townRows:nx,ageRows:i7,genderRows:a7,onlineRows:o7};const xLe={class:"pasture-management"},SLe={key:0,class:"pasture-map-loading"},ALe={class:"pasture-management-ui"},wLe={class:"pasture-left"},bLe={class:"pasture-side-stack is-left"},TLe={class:"pasture-center-panel"},MLe={class:"pasture-center-metrics"},CLe={class:"pasture-right"},ELe={class:"pasture-side-stack is-right"},LLe={class:"pasture-bottom-status"},il=398,al=190,PLe={__name:"index",emits:["module-stats","loading-progress","map-ready"],setup(r,{emit:e}){const t=e,n=tt(null),i=tt(!1),a=tt(jw),o=mg("grassland","grassland-distribution");let s=null,l=!1;const u=Se(()=>T(a.value.core).length?T(a.value.core):Gp),c=Se(()=>P(a.value.distribution).length?P(a.value.distribution):nx),h=Se(()=>L(a.value.age,{nameKeys:["name","age","ageRange","label"],valueKeys:["value","count","num"],unit:"人"}).length?L(a.value.age,{nameKeys:["name","age","ageRange","label"],valueKeys:["value","count","num"],unit:"人"}):i7),f=Se(()=>D(a.value.online).length?D(a.value.online):o7),d=Se(()=>a7),p=Se(()=>mLe),g=Se(()=>[u.value[0]||Gp[0],u.value[1]||Gp[1],u.value[2]||Gp[2]]),v=Se(()=>({title:"牧场分布排行",metricLabel:"牧场",unit:"户",rows:(c.value.length?c.value:_Le).slice(0,8).map(N=>({name:N.name,value:Number(N.value)||0,unit:N.unit||"户"}))})),m=Se(()=>({key:"pasture-core",type:"iconMetric",rows:u.value})),y=Se(()=>({key:"pasture-town",type:"bar",variant:"distribution",rows:c.value.slice(0,7)})),_=Se(()=>({key:"pasture-age",type:"column",variant:"slim",rows:h.value})),x=Se(()=>({key:"pasture-gender",type:"donut",variant:"ring",rows:d.value})),S=Se(()=>({key:"pasture-online",type:"line",rows:f.value})),A=Se(()=>({key:"pasture-resource",type:"structure",rows:vLe})),w=Se(()=>({key:"pasture-balance",type:"bar",rows:gLe})),M=Se(()=>({key:"pasture-warning",type:"heat",rows:yLe}));Ko(()=>{t("module-stats",{moduleKey:"pasture-management",items:r7}),b(),C()}),uo(()=>{var N,R;l=!0,(R=(N=n.value)==null?void 0:N.destroyMap)==null||R.call(N)});function C(){return Ge(this,null,function*(){try{const N=yield cLe();if(l)return;a.value=Re(Re({},jw),N)}catch(N){a.value=jw}})}function b(){var R,F,O;s=new _g,t("loading-progress",{progress:0}),(F=(R=s.instance)==null?void 0:R.on)==null||F.call(R,"onProgress",(V,H,Q)=>{t("loading-progress",{progress:Math.floor(H/(Q||1)*100),path:V,itemsLoaded:H,itemsTotal:Q})});const N=(V=0)=>Ge(this,null,function*(){var Q,W;if(l)return;yield no();const H=n.value;if((Q=H==null?void 0:H.loadMap)==null||Q.call(H,s),H!=null&&H.canvasMap){i.value=!0,t("loading-progress",{progress:100}),t("map-ready"),(W=H.play)==null||W.call(H);return}if(V<24){window.setTimeout(()=>N(V+1),120);return}i.value=!0,t("map-ready")});(O=s.ready)==null||O.then(N).catch(()=>{i.value=!0,t("map-ready")})}function T(N=[]){return(Array.isArray(N)?N:[]).map((R,F)=>{const O=R.name||R.title||R.label||R.zh,V=E(R,["value","num","count","dataValue"]);return!O||V===void 0||V===null||V===""?null:{key:R.key||R.id||O,name:O,value:Number(V)||0,unit:R.unit||R.dw||"",icon:R.icon||["town","area","yield","rate"][F%4]}}).filter(Boolean).slice(0,4)}function P(N=[]){return(Array.isArray(N)?N:[]).map(R=>{const F=E(R,["areaName","name","townName","zoneName"]),O=E(R,["value","count","num","pastureCount","muhuCount"]);return!F||O===void 0||O===null||O===""?null:{key:R.code||R.areaCode||F,name:F,value:Number(O)||0,unit:"户"}}).filter(Boolean).sort((R,F)=>F.value-R.value)}function D(N=[]){return(Array.isArray(N)?N:[]).map(R=>{const F=E(R,["areaName","name","townName","zoneName"]),O=E(R,["onlinePercent","value","percent","rate"]);return!F||O===void 0||O===null||O===""?null:{key:R.code||R.areaCode||F,name:F,value:Number(String(O).replace("%",""))||0,unit:"%"}}).filter(Boolean).slice(0,7)}function L(N=[],R={}){const{nameKeys:F=["name"],valueKeys:O=["value"],unit:V=""}=R;return(Array.isArray(N)?N:[]).map(H=>{const Q=E(H,F),W=E(H,O);return!Q||W===void 0||W===null||W===""?null:{key:H.key||H.id||Q,name:Q,value:Number(W)||0,unit:H.unit||V}}).filter(Boolean)}function E(N={},R=[]){for(const F of R){const O=N==null?void 0:N[F];if(O!=null&&O!=="")return O}}function I(N){const R=Number(N);return Number.isFinite(R)?R.toLocaleString("zh-CN",{maximumFractionDigits:Number.isInteger(R)?0:2}):"--"}return(N,R)=>(ie(),oe("div",xLe,[$e(yg,{ref_key:"mapSceneRef",ref:n,class:"pasture-map-scene","active-layer":_n(o),"map-ranking":v.value},null,8,["active-layer","map-ranking"]),R[1]||(R[1]=G("div",{class:"pasture-map-scrim"},null,-1)),i.value?Tt("",!0):(ie(),oe("div",SLe,"3D地图加载中")),G("div",ALe,[G("div",wLe,[G("div",bLe,[$e(tn,{class:"pasture-side-card left-card",title:"牧场核心指标",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:m.value,compact:""},null,8,["panel"])]),_:1}),$e(tn,{class:"pasture-side-card left-card",title:"乡镇牧场分布",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:y.value,compact:""},null,8,["panel"])]),_:1}),$e(tn,{class:"pasture-side-card left-card",title:"牧户年龄结构",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:_.value,compact:""},null,8,["panel"])]),_:1}),$e(tn,{class:"pasture-side-card left-card",title:"牧户性别占比",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:x.value,compact:""},null,8,["panel"])]),_:1})])]),G("section",TLe,[R[0]||(R[0]=G("div",{class:"pasture-center-title"},[G("span",null,"Pasture Management"),G("strong",null,"牧场管理")],-1)),G("div",MLe,[(ie(!0),oe(it,null,vt(g.value,F=>(ie(),oe("div",{key:F.key,class:"pasture-center-metric"},[G("span",null,Te(F.name),1),G("strong",null,[Zn(Te(I(F.value)),1),G("em",null,Te(F.unit),1)])]))),128))])]),G("div",CLe,[G("div",ELe,[$e(tn,{class:"pasture-side-card right-card",title:"牧户在线率",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:S.value,compact:""},null,8,["panel"])]),_:1}),$e(tn,{class:"pasture-side-card right-card",title:"牧场资源画像",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:A.value,compact:""},null,8,["panel"])]),_:1}),$e(tn,{class:"pasture-side-card right-card",title:"草畜平衡状态",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:w.value,compact:""},null,8,["panel"])]),_:1}),$e(tn,{class:"pasture-side-card right-card",title:"牧场服务预警",width:il,height:al},{default:Xt(()=>[$e(Si,{panel:M.value,compact:""},null,8,["panel"])]),_:1})])]),G("div",LLe,[(ie(!0),oe(it,null,vt(p.value,F=>(ie(),oe("div",{key:F.key,class:"pasture-status-item"},[G("span",null,Te(F.name),1),G("strong",null,[Zn(Te(I(F.value)),1),G("em",null,Te(F.unit),1)]),G("small",null,Te(F.extra),1)]))),128))])])]))}},rx="/openApi";function RLe(r,e){return/^https?:\/\//.test(e)?e:`${r}${e.startsWith("/")?e:`/${e}`}`}function ix(r,e,t,n={}){return Bs(RLe(r,e),{params:t,timeout:n.timeout}).then(DLe)}function DLe(r){if((r==null?void 0:r.success)===!1||(r==null?void 0:r.code)!==void 0&&![0,200,"0","200"].includes(r.code)){const t=new Error((r==null?void 0:r.msg)||(r==null?void 0:r.message)||"接口请求失败");throw t.code=r==null?void 0:r.code,t}return Lt(r)}function ILe(r,e=window.location.hash||window.location.pathname,t="智慧管理"){return ix(rx,"/ai/stat/question",{question:r,pagePath:e,pageName:t},{timeout:45e3})}function NLe(r){return ix(rx,"/ai/balance/targets",{question:r},{timeout:18e3}).then(e=>Array.isArray(e)?e:(e==null?void 0:e.rows)||(e==null?void 0:e.list)||[])}function kLe({areaCode:r,pasturesId:e}={}){return ix(rx,"/ai/balance/advice",{areaCode:r,pasturesId:e},{timeout:18e3})}function OLe(){return ix(rx,"/ai/balance/welcome",void 0,{timeout:12e3})}const FLe="/openApi";function BLe(r){return/^https?:\/\//.test(r)?r:`${FLe}${r.startsWith("/")?r:`/${r}`}`}function zLe(r){if((r==null?void 0:r.success)===!1||(r==null?void 0:r.code)!==void 0&&![0,200,"0","200"].includes(r.code)){const t=new Error((r==null?void 0:r.msg)||(r==null?void 0:r.message)||"图表接口请求失败");throw t.code=r==null?void 0:r.code,t}return Lt(r)}function ULe(n){return Ge(this,arguments,function*(r,e=window.location.hash||window.location.pathname,t="智慧管理"){const i=yield Bs(BLe("/ai/stat/charts"),{params:{question:r,pagePath:e,pageName:t},timeout:3e4}).then(zLe);return(Array.isArray(i==null?void 0:i.charts)?i.charts:[]).map(VLe).filter(o=>o.rows.length)})}function VLe(r,e){const t=Array.isArray(r==null?void 0:r.rows)?r.rows:[];return{id:(r==null?void 0:r.id)||`smart-chart-${e}`,type:GLe(r==null?void 0:r.type),title:(r==null?void 0:r.title)||`统计图表${e+1}`,subtitle:(r==null?void 0:r.subtitle)||HLe(r==null?void 0:r.source),unit:(r==null?void 0:r.unit)||"",source:(r==null?void 0:r.source)||{},rows:t.map((n,i)=>({key:(n==null?void 0:n.key)||`${(n==null?void 0:n.name)||"row"}-${i}`,name:String((n==null?void 0:n.name)||`指标${i+1}`),value:WLe(n==null?void 0:n.value),rawValue:n==null?void 0:n.value,unit:(n==null?void 0:n.unit)||(r==null?void 0:r.unit)||"",extra:(n==null?void 0:n.extra)||""})).filter(n=>n.name&&Number.isFinite(n.value))}}function GLe(r){return["pie","donut"].includes(r)?"pie":["line","trend"].includes(r)?"line":"bar"}function HLe(r={}){const e=r.table?`来源:${r.table}`:"来源:openApi 统计库",t=r.period?`,${r.period}`:"";return`${e}${t}`}function WLe(r){if(r==null||r==="")return NaN;const e=Number(String(r).replace(/,/g,"").replace(/%/g,""));return Number.isFinite(e)?e:NaN}const $Le={class:"wisdom-management"},XLe={class:"wisdom-chat"},YLe={key:0,class:"wisdom-empty-state"},qLe={class:"wisdom-prompt-grid"},jLe=["disabled","onClick"],KLe={key:0,class:"wisdom-message-mark"},ZLe={class:"wisdom-bubble"},QLe={key:0,class:"wisdom-steps"},JLe={key:1,class:"wisdom-digesting"},ePe={key:2,class:"wisdom-chart-list"},tPe={key:3,class:"wisdom-insight-list"},nPe=["innerHTML"],rPe={key:5,class:"wisdom-stream-caret"},iPe={key:6,class:"wisdom-suggestion-list"},aPe=["disabled","onClick"],oPe={key:7,class:"wisdom-choice-list"},sPe=["disabled","onClick"],lPe={class:"wisdom-input-shell"},uPe=["disabled"],cPe=["disabled"],hPe={key:0,class:"wisdom-button-loading"},fPe={__name:"index",setup(r){const e=_7({loader:()=>x7(()=>import("./SmartChartRenderer-8df650d8-1782613078975.js"),["./SmartChartRenderer-8df650d8-1782613078975.js","./index-1782613078975.js","./index-b8a77371-balabala-1782613078975.css","./SmartChartRenderer-8fd37aa6-balabala-1782613078975.css"],import.meta.url),loadingComponent:{template:'<div class="smart-chart-loading">正在绘制统计图表</div>'}}),t=tt(""),n=tt([]),i=tt(!1),a=tt(null),o=tt("可以直接询问牦牛数量、草地面积、牧户情况、饲草产量、林地面积、基地分布、畜群结构和交易流通等统计问题。"),s=[{label:"牦牛分布",question:"牦牛分布"},{label:"畜群结构",question:"牦牛结构占比"},{label:"草地面积",question:"草地面积分布"},{label:"草畜平衡",question:"红原县草畜平衡建议"},{label:"湿地类型",question:"湿地类型结构"},{label:"公益林保护",question:"公益林保护等级统计"}];let l=null;Ko(()=>{OLe().then(N=>{const R=(N==null?void 0:N.value)||(N==null?void 0:N.text)||N;typeof R=="string"&&R.trim()&&(o.value=R)}).catch(()=>{})}),uo(()=>{T()});function u(){return`${Date.now()}-${Math.random().toString(16).slice(2)}`}function c(){return Ge(this,arguments,function*(N=t.value){const R=String(N||"").trim();if(!R||i.value)return;const F={id:u(),role:"user",text:R},O={id:u(),role:"assistant",steps:[`正在理解:${R}`],digesting:!0,digestText:"小牧正在匹配业务数据",visibleText:"",fullText:"",streaming:!1,choices:[],charts:[],insights:[],suggestions:[]};if(n.value=[...n.value,F,O],t.value="",i.value=!0,yield E(),g(R)){yield f(R,O.id);return}yield h(R,O.id)})}function h(N,R){return Ge(this,null,function*(){w(R,{digestText:"正在理解问题并查询统计库"});const F=ILe(N,window.location.hash||window.location.pathname,"智慧管理"),O=ULe(N,window.location.hash||window.location.pathname,"智慧管理"),[V,H]=yield Promise.allSettled([F,O]),Q=H.status==="fulfilled"?H.value||[]:[],W=H.status==="rejected"?H.reason:null;if(V.status==="fulfilled"){const Z=V.value,ee=(Z==null?void 0:Z.answer)||"小牧暂时没有查到相关统计数据,可以换一种说法再问一次。",he=[`正在理解:${N}`,"已查询统计库","已生成统计回答"];Q.length?he.push(`已生成 ${Q.length} 个数据图表`):W&&he.push("图表生成暂时不可用"),w(R,{digesting:!1,steps:he,insights:Q.length?S(Q):[],suggestions:A(N,Q),allowFollowUp:!0}),b(R,W?`${ee} |
|
|
|
**图表状态** |
|
- ${C(W,"图表接口暂时不可用,已先返回文字分析。")}`:ee,Q);return}if(Q.length){w(R,{digesting:!1,steps:[`正在理解:${N}`,"已查询统计库",`已生成 ${Q.length} 个数据图表`,"文字分析暂时不可用"],insights:S(Q),suggestions:A(N,Q),allowFollowUp:!0}),b(R,"文字分析服务暂时没有返回结果,已按统计库真实数据生成可视化图表。",Q);return}M(R,C(V.reason,"小牧暂时没有获取到统计结果,请稍后再试。"))})}function f(N,R){return Ge(this,null,function*(){w(R,{digestText:"正在检索草畜平衡对象"});try{const F=yield NLe(N),O=v(F);if(!O.length){w(R,{digesting:!1,steps:[`正在理解:${N}`,"未匹配到草畜平衡对象"]}),b(R,"暂时没有匹配到对应的区域或牧户。可以输入更明确的乡镇、村名、牧户或牧场名称,例如“红原县草畜平衡建议”。");return}if(O.length>1){w(R,{digesting:!1,steps:[`正在理解:${N}`,"已匹配多个对象,请选择一个继续"],choices:O.slice(0,8)}),i.value=!1;return}yield p(O[0],R)}catch(F){M(R,C(F,"草畜平衡对象检索失败,请稍后再试。"))}})}function d(N){return Ge(this,null,function*(){if(i.value)return;const R=N.name||N.label||"草畜平衡建议",F={id:u(),role:"user",text:R},O={id:u(),role:"assistant",steps:[`已选择:${R}`],digesting:!0,digestText:"正在消化草畜平衡数据",visibleText:"",fullText:"",streaming:!1,choices:[],charts:[],insights:[],suggestions:[]};n.value=[...n.value,F,O],i.value=!0,yield E(),yield p(N,O.id)})}function p(N,R){return Ge(this,null,function*(){const F=(N==null?void 0:N.name)||(N==null?void 0:N.label)||"该区域",O=m(N);w(R,{steps:[`已锁定:${F}`,"正在消化草畜平衡数据"],digestText:"正在生成平衡建议"});try{const V=yield kLe(O);w(R,{digesting:!1,steps:[`已锁定:${F}`,"已生成草畜平衡建议"]}),b(R,y(F,V||{}))}catch(V){M(R,C(V,"小牧刚才没有消化成功,请稍后再问一次。"))}})}function g(N){return/草畜|平衡|承载|载畜|超载|放牧压力|轮牧|休牧|牧场建议|牧户建议/.test(N)}function v(N=[]){return N.map((R,F)=>({key:(R==null?void 0:R.key)||(R==null?void 0:R.type)||"area_code",value:(R==null?void 0:R.value)||(R==null?void 0:R.id)||(R==null?void 0:R.code)||(R==null?void 0:R.areaCode)||(R==null?void 0:R.pasturesId),name:(R==null?void 0:R.name)||(R==null?void 0:R.label)||(R==null?void 0:R.areaName)||(R==null?void 0:R.pasturesName)||`对象${F+1}`,raw:R})).filter(R=>R.value||R.name==="红原县")}function m(N){return(N==null?void 0:N.key)==="pasturesId"||(N==null?void 0:N.key)==="pastures_id"?{pasturesId:N.value}:{areaCode:(N==null?void 0:N.value)||"513233"}}function y(N,R={}){const F=_(R,["areaRange","arearange","area_range","area","acreage"],0),O=_(R,["yakNumber","yaknumber","yak_number","livestock_capacity","livestockCapacity","livestockcapacity"],0),V=_(R,["level","conclusion"],"暂无等级"),H=_(R,["overloadRate","overloadrate","overload_rate"],0),Q=_(R,["advice","balanceAdvice","balanceadvice","balance_advice"],"暂无建议,请稍后再试。");return`**${N}草畜平衡建议** |
|
|
|
- 草地面积:${x(F)} 亩 |
|
- 牦牛/载畜量:${x(O)} 头 |
|
- 草畜平衡等级:${V} |
|
- 超载率:${x(H)}% |
|
|
|
**建议** |
|
${Q}`}function _(N,R,F=""){for(const O of R){const V=N==null?void 0:N[O];if(V!=null&&V!=="")return V}return F}function x(N){const R=Number(String(N).replace(/,/g,""));return Number.isFinite(R)?R.toLocaleString("zh-CN",{maximumFractionDigits:2}):N||"--"}function S(N=[]){const R=[];return N.slice(0,2).forEach(F=>{var he;const O=(F.rows||[]).map(le=>Xe(Re({},le),{value:Number(le.value)})).filter(le=>le.name&&Number.isFinite(le.value));if(!O.length)return;const V=F.unit||((he=O.find(le=>le.unit))==null?void 0:he.unit)||"",H=O.slice().sort((le,re)=>re.value-le.value),Q=O.reduce((le,re)=>le+re.value,0),W=Q/O.length,Z=H[0],ee=H[H.length-1];R.push({label:"最高",value:`${Z.name} ${x(Z.value)}${V}`,note:F.title}),O.length>2&&R.push({label:F.type==="pie"?"占比项":"最低",value:`${ee.name} ${x(ee.value)}${V}`,note:F.type==="pie"?"最小结构项":"低值区域"}),R.push({label:"合计",value:`${x(Q)}${V}`,note:O.length>1?`覆盖 ${O.length} 项`:F.title}),F.type!=="pie"&&O.length>1&&R.push({label:"均值",value:`${x(W)}${V}`,note:"按当前图表项计算"})}),R.slice(0,4)}function A(N,R=[]){const F=String(N||""),O=[],V=(H,Q)=>{!O.some(W=>W.question===Q)&&Q!==F&&O.push({label:H,question:Q})};return(/牦牛|畜群|存栏|牛/.test(F)||R.some(H=>{var Q,W;return(W=(Q=H.source)==null?void 0:Q.localKey)==null?void 0:W.includes("yak")}))&&(V("看畜群结构","牦牛结构占比"),V("看存栏预测","牦牛存栏预测"),V("看交易结构","牦牛交易结构")),/草地|草原|饲草|鲜草/.test(F)&&(V("看草地健康","草地健康占比"),V("看生产力","草地生产力分布"),V("看退化统计","草地退化统计")),/湿地/.test(F)&&(V("看湿地类型","湿地类型结构"),V("看湿地级别","湿地级别面积统计")),/林地|公益林|森林/.test(F)&&(V("看权属结构","林地权属结构"),V("看公益林等级","公益林保护等级统计")),/草畜|平衡|承载|载畜/.test(F)&&(V("看牦牛分布","牦牛分布"),V("看草地面积","草地面积分布")),V("换个图表",`${F} 图表`),O.slice(0,3)}function w(N,R,F=!0){n.value=n.value.map(O=>O.id===N?Re(Re({},O),R):O),F&&E()}function M(N,R){w(N,{digesting:!1,steps:["请求已结束"]}),b(N,R)}function C(N,R){const F=String((N==null?void 0:N.message)||"");return(N==null?void 0:N.code)===401||(N==null?void 0:N.code)==="401"||(N==null?void 0:N.code)==="HTTP_401"||/未登录|授权|Unauthorized|HTTP 401/i.test(F)?"接口需要登录授权。当前智慧管理不会使用假数据,请先完成平台登录或使用 openApi 统计库口径继续问数。":(N==null?void 0:N.code)==="REQUEST_TIMEOUT"||/timeout|timed out|超时/i.test(F)?"服务响应时间较长,请稍后再试,或换一个更具体的问题。":(N==null?void 0:N.code)==="REQUEST_ABORTED"||/aborted|abort|signal/i.test(F)?"本次请求被中断了,请重新发送一次。":/Failed to fetch|NetworkError|Load failed|HTTP 50|HTTP 40/i.test(F)||/[a-zA-Z]{4,}/.test(F)?R:F||R}function b(N,R,F=[]){T();const O=String(R||""),V=O.length>1200?36:O.length>700?24:14;let H=0;const Q=F.length>0;w(N,{fullText:O,visibleText:"",streaming:!0,choices:[],charts:F}),Q&&I();const W=()=>{if(H=Math.min(H+V,O.length),w(N,{visibleText:O.slice(0,H),streaming:H<O.length},!Q),H>=O.length){l=null,F.length&&w(N,{charts:F},!1),i.value=!1;return}l=window.setTimeout(W,18)};l=window.setTimeout(W,0)}function T(){l&&(window.clearTimeout(l),l=null)}function P(N){const R=L(N).split(/\r?\n/),F=[];let O=[],V=!1;const H=()=>{O.length&&(F.push(`<${V?"ol":"ul"}>${O.map(Q=>`<li>${D(Q)}</li>`).join("")}</${V?"ol":"ul"}>`),O=[],V=!1)};return R.forEach(Q=>{const W=Q.trim();if(!W){H();return}const Z=W.match(/^#{1,4}\s+(.+)$/)||W.match(/^\*\*(.+)\*\*$/);if(Z){H(),F.push(`<h3>${D(Z[1])}</h3>`);return}const ee=W.match(/^\d+[.)、]\s+(.+)$/),he=W.match(/^[-*]\s+(.+)$/);if(ee||he){const le=!!ee;O.length&&V!==le&&H(),V=le,O.push(ee?ee[1]:he[1]);return}H(),F.push(`<p>${D(W)}</p>`)}),H(),F.join("")}function D(N){return N.replace(/\*\*([^*]+)\*\*/g,"<strong>$1</strong>")}function L(N){return String(N||"").replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function E(){return Ge(this,null,function*(){yield no(),window.requestAnimationFrame(()=>{a.value&&(a.value.scrollTop=a.value.scrollHeight)})})}function I(){return Ge(this,null,function*(){yield no(),window.requestAnimationFrame(()=>{const N=a.value,R=N==null?void 0:N.querySelector(".wisdom-message.is-assistant:last-child .wisdom-chart-list");if(!N||!R)return;const F=N.getBoundingClientRect(),O=R.getBoundingClientRect();N.scrollTop+=O.top-F.top-12})})}return(N,R)=>(ie(),oe("div",$Le,[R[11]||(R[11]=fc('<div class="wisdom-backdrop" aria-hidden="true"><div class="wisdom-grid"></div><div class="wisdom-orbit wisdom-orbit-a"></div><div class="wisdom-orbit wisdom-orbit-b"></div><div class="wisdom-scan"></div></div>',1)),G("main",XLe,[G("div",{ref_key:"dialogueRef",ref:a,class:Vt(["wisdom-dialogue",{"is-empty":!n.value.length}])},[n.value.length?Tt("",!0):(ie(),oe("section",YLe,[R[3]||(R[3]=G("div",{class:"wisdom-empty-mark"},[G("span"),G("strong",null,"AI")],-1)),R[4]||(R[4]=G("h2",null,"智慧管理问答",-1)),G("p",null,Te(o.value),1),G("div",qLe,[(ie(),oe(it,null,vt(s,F=>G("button",{key:F.question,type:"button",disabled:i.value,onClick:O=>c(F.question)},Te(F.label),9,jLe)),64))])])),(ie(!0),oe(it,null,vt(n.value,F=>{var O,V,H,Q,W;return ie(),oe("article",{key:F.id,class:Vt(["wisdom-message",`is-${F.role}`])},[F.role==="assistant"?(ie(),oe("div",KLe,[...R[5]||(R[5]=[G("span",null,"牧",-1)])])):Tt("",!0),G("div",ZLe,[F.role==="user"?(ie(),oe(it,{key:0},[Zn(Te(F.text),1)],64)):(ie(),oe(it,{key:1},[(O=F.steps)!=null&&O.length?(ie(),oe("div",QLe,[(ie(!0),oe(it,null,vt(F.steps,Z=>(ie(),oe("div",{key:Z,class:"wisdom-step"},[R[6]||(R[6]=G("span",null,null,-1)),Zn(Te(Z),1)]))),128))])):Tt("",!0),F.digesting?(ie(),oe("div",JLe,[R[7]||(R[7]=G("span",null,null,-1)),R[8]||(R[8]=G("span",null,null,-1)),R[9]||(R[9]=G("span",null,null,-1)),G("em",null,Te(F.digestText||"小牧正在消化中"),1)])):Tt("",!0),(V=F.charts)!=null&&V.length?(ie(),oe("div",ePe,[(ie(!0),oe(it,null,vt(F.charts,Z=>(ie(),Ji(_n(e),{key:Z.id,chart:Z,onReady:E},null,8,["chart"]))),128))])):Tt("",!0),(H=F.insights)!=null&&H.length?(ie(),oe("div",tPe,[(ie(!0),oe(it,null,vt(F.insights,Z=>(ie(),oe("div",{key:`${Z.label}-${Z.value}`,class:"wisdom-insight-item"},[G("span",null,Te(Z.label),1),G("strong",null,Te(Z.value),1),G("em",null,Te(Z.note),1)]))),128))])):Tt("",!0),F.visibleText?(ie(),oe("div",{key:4,class:"wisdom-answer",innerHTML:P(F.visibleText)},null,8,nPe)):Tt("",!0),F.streaming?(ie(),oe("span",rPe)):Tt("",!0),(Q=F.suggestions)!=null&&Q.length&&(F.allowFollowUp||!F.digesting&&!F.streaming)?(ie(),oe("div",iPe,[(ie(!0),oe(it,null,vt(F.suggestions,Z=>(ie(),oe("button",{key:Z.question,type:"button",disabled:i.value,onClick:ee=>c(Z.question)},Te(Z.label),9,aPe))),128))])):Tt("",!0),(W=F.choices)!=null&&W.length?(ie(),oe("div",oPe,[(ie(!0),oe(it,null,vt(F.choices,(Z,ee)=>(ie(),oe("button",{key:`${Z.key||"choice"}-${Z.value||ee}`,type:"button",disabled:i.value,onClick:he=>d(Z)},Te(Z.name||Z.label||Z.value),9,sPe))),128))])):Tt("",!0)],64))])],2)}),128))],2),G("form",{class:"wisdom-input-bar",onSubmit:R[2]||(R[2]=Nc(F=>c(),["prevent"]))},[G("div",lPe,[R[10]||(R[10]=G("span",{class:"wisdom-input-icon"},null,-1)),ul(G("input",{"onUpdate:modelValue":R[0]||(R[0]=F=>t.value=F),disabled:i.value,autocomplete:"off",placeholder:"输入牧户、区域或草畜平衡问题",onKeydown:R[1]||(R[1]=Kw(Nc(F=>c(),["prevent"]),["enter"]))},null,40,uPe),[[JB,t.value]]),G("button",{type:"submit",disabled:i.value||!t.value.trim()},[i.value?(ie(),oe("span",hPe)):Tt("",!0),G("span",null,Te(i.value?"消化中":"发送"),1)],8,cPe)])],32)])]))}},X_=[{key:"home",label:"首页",bottomLabel:"核心指标",status:"ready"},{key:"forest-grass-wet",label:"林草湿一张图",bottomLabel:"林草湿",status:"ready"},{key:"ecological-protection",label:"生态保护",bottomLabel:"生态保护",status:"ready"},{key:"grass-livestock-balance",label:"草畜平衡",bottomLabel:"草畜平衡",status:"coming"},{key:"yak-management",label:"牦牛管理",bottomLabel:"牦牛管理",status:"ready"},{key:"pasture-management",label:"牧场管理",bottomLabel:"牧场管理",status:"ready"},{key:"yak-industry-chain",label:"牦牛产业全链",bottomLabel:"产业全链",status:"coming"},{key:"smart-management",label:"智慧管理",bottomLabel:"智慧管理",status:"ready"}];function dPe(r){return X_.find(e=>e.key===r)||X_[1]}const pPe={key:0,class:"platform-module-pane"},vPe={key:1,class:"platform-module-pane"},gPe={key:2,class:"platform-module-pane"},mPe={key:3,class:"platform-module-pane"},yPe={key:4,class:"platform-module-pane"},_Pe={key:5,class:"platform-module-pane"},xPe={class:"large-screen-wrap"},SPe={class:"m-header-date"},APe={class:"top-menu"},wPe={key:0,class:"top-menu-mid-space"},bPe={key:1,class:"module-coming"},TPe={class:"module-coming-title"},MPe={key:2,class:"bottom-tray"},CPe={class:"bottom-menu"},EPe=["onClick"],LPe={key:6,class:"loading platform-loading"},PPe={class:"loading-progress"},RPe={class:"value"},DPe=1200,IPe={__name:"index",setup(r){const e=tt("home"),t=tt("national-park"),n=tt({home:!0}),i=tt({}),a=tt(""),o=tt(""),s=tt(!0),l=tt(0);let u=null,c=null,h=!1;const f=Date.now(),d={progress:0},p=["xiaoshoujine","zongxiaoliang","xiaoshoujine","zongxiaoliang"],g=Se(()=>dPe(e.value)),v=Se(()=>e.value==="ecological-protection"?Xie:X_),m=Se(()=>e.value==="ecological-protection"?t.value:e.value),y=Se(()=>{const E=i.value[e.value];return E!=null&&E.length?E:T([{zh:"草地总面积",en:"",value:756.43,unit:"万亩",decimals:2},{zh:"林地总面积",en:"",value:177.92,unit:"万亩",decimals:2},{zh:"湿地面积",en:"",value:291.82,unit:"万亩",decimals:2}])});Ko(()=>{c=Y_.init({dh:1080,dw:1920,el:"#large-screen",resize:!0}),L(),D(),u=window.setInterval(D,1e3)}),uo(()=>{var E;u&&window.clearInterval(u),(E=c==null?void 0:c.off)==null||E.call(c,"#large-screen"),$n.killTweensOf(d)});function _(E){P(E),e.value=E,no(L)}function x(E){if(e.value==="ecological-protection"){S(E.key),no(L);return}_(E.key)}function S(E){t.value=E==="restoration"?"restoration":"national-park",no(L)}function A(E){const I=E.moduleKey||(E.topicKey?"forest-grass-wet":e.value);i.value=Xe(Re({},i.value),{[I]:T(E.items||[])})}function w(E={}){const I=typeof E=="number"?E:E.progress;C(I)}function M(){$n.killTweensOf(d),d.progress=100,l.value=100;const E=Date.now()-f,I=Math.max(180,DPe-E);window.setTimeout(b,I)}function C(E){if(!s.value)return;const I=Math.max(0,Math.min(100,Math.floor(Number(E)||0)));I<l.value||$n.to(d,{progress:I,duration:.35,ease:"power2.out",onUpdate:()=>{l.value=Math.floor(d.progress)}})}function b(){if(!s.value||h)return;h=!0;const E=$n.timeline({onComplete:()=>{s.value=!1}});E.to(".platform-loading .loading-text span",{y:"200%",opacity:0,ease:"power4.inOut",duration:1.4,stagger:.14}),E.to(".platform-loading .loading-progress",{opacity:0,ease:"power4.inOut",duration:1.2},"<"),E.to(".platform-loading",{opacity:0,ease:"power4.inOut",duration:.8},"-=0.55")}function T(E=[]){return E.slice(0,4).map((I,N)=>{var O;const R=Number(I.value)||0,F={zh:I.zh||I.name||`指标${N+1}`,en:I.en||"",value:R,unit:I.unit||"",decimals:(O=I.decimals)!=null?O:Number.isInteger(R)?0:2};return Re({icon:p[N%p.length]},F)})}function P(E){["home","forest-grass-wet","ecological-protection","yak-management","pasture-management","smart-management"].includes(E)&&(n.value[E]||(n.value=Xe(Re({},n.value),{[E]:!0})))}function D(){const E=new Date,I=N=>`${N}`.padStart(2,"0");a.value=`${E.getFullYear()}-${I(E.getMonth()+1)}-${I(E.getDate())}`,o.value=`${I(E.getHours())}:${I(E.getMinutes())}:${I(E.getSeconds())}`}function L(){window.scrollTo(0,0),document.documentElement.scrollTop=0,document.body.scrollTop=0;const E=document.querySelector("#app");E&&(E.scrollTop=0)}return(E,I)=>(ie(),oe("div",{class:Vt(["large-screen platform-screen",{"is-home":g.value.key==="home","is-forest-grass-wet":g.value.key==="forest-grass-wet","is-ecological-protection":g.value.key==="ecological-protection","is-yak-management":g.value.key==="yak-management","is-pasture-management":g.value.key==="pasture-management","is-smart-management":g.value.key==="smart-management"}]),id:"large-screen"},[n.value.home?ul((ie(),oe("div",pPe,[$e(Fre,{onLoadingProgress:w,onMapReady:M,onModuleStats:A})],512)),[[ih,g.value.key==="home"]]):Tt("",!0),n.value["forest-grass-wet"]?ul((ie(),oe("div",vPe,[$e($ie,{"show-loading":!1,onTopicStats:A})],512)),[[ih,g.value.key==="forest-grass-wet"]]):Tt("",!0),n.value["ecological-protection"]?ul((ie(),oe("div",gPe,[$e(bae,{"active-view":t.value,"show-loading":!1,onModuleStats:A,onViewChange:S},null,8,["active-view"])],512)),[[ih,g.value.key==="ecological-protection"]]):Tt("",!0),n.value["yak-management"]?ul((ie(),oe("div",mPe,[$e(rLe,{onModuleStats:A})],512)),[[ih,g.value.key==="yak-management"]]):Tt("",!0),n.value["pasture-management"]?ul((ie(),oe("div",yPe,[$e(PLe,{onLoadingProgress:w,onMapReady:M,onModuleStats:A})],512)),[[ih,g.value.key==="pasture-management"]]):Tt("",!0),n.value["smart-management"]?ul((ie(),oe("div",_Pe,[$e(fPe)],512)),[[ih,g.value.key==="smart-management"]]):Tt("",!0),G("div",xPe,[$e(r$,{title:"红原县数字畜牧业监管平台","sub-text":"Hongyuan Digital Animal Husbandry Supervision Platform"},{right:Xt(()=>[G("div",SPe,[G("span",null,Te(a.value),1),G("span",null,Te(o.value),1)])]),_:1}),G("div",APe,[$e(a$,{"default-active":e.value,onSelect:_},{default:Xt(()=>[(ie(!0),oe(it,null,vt(_n(X_),(N,R)=>(ie(),oe(it,{key:N.key},[$e(o$,{index:N.key},{default:Xt(()=>[Zn(Te(N.label),1)]),_:2},1032,["index"]),R===3?(ie(),oe("div",wPe)):Tt("",!0)],64))),128))]),_:1},8,["default-active"])]),g.value.key!=="smart-management"?(ie(),oe("div",{key:0,class:Vt(["top-count-card",{"is-four":y.value.length>3}])},[(ie(!0),oe(it,null,vt(y.value,N=>(ie(),Ji(g$,{key:N.zh,info:N},null,8,["info"]))),128))],2)):Tt("",!0),g.value.status!=="ready"?(ie(),oe("div",bPe,[G("div",TPe,Te(g.value.label),1),I[0]||(I[0]=G("div",{class:"module-coming-text"},"模块建设中,平台框架已预留入口",-1))])):Tt("",!0),["home","forest-grass-wet","ecological-protection","yak-management","pasture-management","smart-management"].includes(g.value.key)?Tt("",!0):(ie(),oe("div",MPe,[$e(E0,{class:"bottom-svg-line-left",width:721,height:57,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:50,path:"M1 56.6105C1 31.5123 185.586 10.0503 451.904 1.35519C458.942 1.12543 465.781 4.00883 470.505 9.22964L484.991 25.2383C487.971 28.4775 492.938 30.4201 498.254 30.4201H720.142"}),$e(E0,{class:"bottom-svg-line-left bottom-svg-line-right",width:721,height:57,color:"#30DCFF",strokeWidth:2,dir:[0,1],length:50,path:"M1 56.6105C1 31.5123 185.586 10.0503 451.904 1.35519C458.942 1.12543 465.781 4.00883 470.505 9.22964L484.991 25.2383C487.971 28.4775 492.938 30.4201 498.254 30.4201H720.142"}),I[1]||(I[1]=G("div",{class:"bottom-tray-arrow"},[G("img",{src:_0,alt:""}),G("img",{src:x0,alt:""})],-1)),G("div",CPe,[(ie(!0),oe(it,null,vt(v.value,N=>(ie(),oe("div",{key:N.key,class:Vt(["bottom-menu-item",{"is-active":N.key===m.value}]),onClick:R=>x(N)},[G("span",null,Te(N.bottomLabel),1)],10,EPe))),128))]),I[2]||(I[2]=G("div",{class:"bottom-tray-arrow is-reverse"},[G("img",{src:_0,alt:""}),G("img",{src:x0,alt:""})],-1))])),I[3]||(I[3]=G("div",{class:"large-screen-left-zsline"},null,-1)),I[4]||(I[4]=G("div",{class:"large-screen-right-zsline"},null,-1))]),s.value?(ie(),oe("div",LPe,[I[6]||(I[6]=fc('<div class="loading-text"><span style="--index:1;">L</span><span style="--index:2;">O</span><span style="--index:3;">A</span><span style="--index:4;">D</span><span style="--index:5;">I</span><span style="--index:6;">N</span><span style="--index:7;">G</span></div>',1)),G("div",PPe,[G("span",RPe,Te(l.value),1),I[5]||(I[5]=G("span",{class:"unit"},"%",-1))])])):Tt("",!0)],2))}},WPe=Object.freeze(Object.defineProperty({__proto__:null,default:IPe},Symbol.toStringTag,{value:"Module"}));export{fa as H,Ul as L,WPe as i};
|